@applica-software-guru/react-admin 1.5.321 → 1.5.323

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.
@@ -222,5 +222,5 @@ function print() { __p += __j.call(arguments, '') }
222
222
 
223
223
  attempted value: ${a}
224
224
  `+(c!==a?`result of cast: ${c}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:a=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let p of Object.values(this.internalTests))p&&d.push(p);this.runTests({path:i,value:u,originalValue:a,options:n,tests:d},r,p=>{if(p.length)return o(p,u);this.runTests({path:i,value:u,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:a,originalValue:c,path:u,options:d}=t,p=x=>{o||(o=!0,n(x,a))},g=x=>{o||(o=!0,r(x,a))},v=i.length,y=[];if(!v)return g([]);let b={value:a,originalValue:c,path:u,options:d,schema:this};for(let x=0;x<i.length;x++){const w=i[x];w(b,p,function(j){j&&(Array.isArray(j)?y.push(...j):y.push(j)),--v<=0&&g(y)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:i,options:a}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const p=Object.assign({},a,{strict:!0,parent:r,value:d,originalValue:i[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${o||""}[${u?c:`"${c}"`}]`:(o?`${o}.`:"")+t});return(g,v,y)=>this.resolve(p)._validate(d,p,v,y)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,c)=>o._validate(t,n,(u,d)=>{kn.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new kn(u,d,void 0,void 0,i)):a(d)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw kn.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new kn(c,t,void 0,void 0,a);i=u}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(kn.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(kn.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Fs(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Ms({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Ms({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Kr.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Kr.notNull){return this.nullability(!1,t)}required(t=Kr.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Kr.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Ms(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(i||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=RS(t).map(i=>new Ai(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new Yu(o,n):Yu.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Ms({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Kr.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Ms({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),r}notOneOf(t,n=Kr.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Ms({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:a}=n.spec;return{meta:o,label:r,optional:i,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,p)=>p.findIndex(g=>g.name===u.name)===d)}}}pr.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])pr.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=AY(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])pr.prototype[e]=pr.prototype.oneOf;for(const e of["not","nope"])pr.prototype[e]=pr.prototype.notOneOf;const IY=()=>!0;function VS(e){return new WS(e)}class WS extends pr{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:IY},t))}}VS.prototype=WS.prototype;const OY=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function PY(e){const t=Pg(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function Pg(e){var t,n;const r=OY.exec(e);return r?{year:go(r[1]),month:go(r[2],1)-1,day:go(r[3],1),hour:go(r[4]),minute:go(r[5]),second:go(r[6]),millisecond:r[7]?go(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:go(r[10]),minuteOffset:go(r[11])}:null}function go(e,t=0){return Number(e)||t}let jY=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,kY=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,MY=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,FY="^\\d{4}-\\d{2}-\\d{2}",_Y="\\d{2}:\\d{2}:\\d{2}",RY="(([+-]\\d{2}(:?\\d{2})?)|Z)",DY=new RegExp(`${FY}T${_Y}(\\.\\d+)?${RY}$`),LY=e=>ho(e)||e===e.trim(),BY={}.toString();function mo(){return new zS}class zS extends pr{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===BY?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Kr.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Mn.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Mn.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Mn.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||Mn.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=Mn.email){return this.matches(jY,{name:"email",message:t,excludeEmptyString:!0})}url(t=Mn.url){return this.matches(kY,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Mn.uuid){return this.matches(MY,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(DY,{name:"datetime",message:n||Mn.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Mn.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const a=Pg(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||Mn.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const a=Pg(i);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Mn.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:LY})}lowercase(t=Mn.lowercase){return this.transform(n=>ho(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ho(n)||n===n.toLowerCase()})}uppercase(t=Mn.uppercase){return this.transform(n=>ho(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ho(n)||n===n.toUpperCase()})}}mo.prototype=zS.prototype;let NY=e=>e!=+e;function US(){return new HS}class HS extends pr{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!NY(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=Uo.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Uo.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Uo.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=Uo.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=Uo.positive){return this.moreThan(0,t)}negative(t=Uo.negative){return this.lessThan(0,t)}integer(t=Uo.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>ho(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>ho(o)?o:Math[t](o))}}US.prototype=HS.prototype;let VY=new Date(""),WY=e=>Object.prototype.toString.call(e)==="[object Date]";class Zu extends pr{constructor(){super({type:"date",check(t){return WY(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=PY(t),isNaN(t)?Zu.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Ai.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=Ig.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=Ig.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}Zu.INVALID_DATE=VY,Zu.prototype;function zY(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,c])=>`${a}-${c}`));function i(a,c){let u=Ti.split(a)[0];r.add(u),o.has(`${c}-${u}`)||n.push([c,u])}for(const a of Object.keys(e)){let c=e[a];r.add(a),Ai.isRef(c)&&c.isSibling?i(c.path,a):Og(c)&&"deps"in c&&c.deps.forEach(u=>i(u,a))}return vY.array(Array.from(r),n).reverse()}function GS(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function YS(e){return(t,n)=>GS(e,t)-GS(e,n)}const UY=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function Qu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Qu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Qu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Qu)}):"optional"in e?e.optional():e}const HY=(e,t)=>{const n=[...Ti.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=Ti.getter(Ti.join(n),!0)(e);return!!(o&&r in o)};let KS=e=>Object.prototype.toString.call(e)==="[object Object]";function XS(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const GY=YS([]);function jg(e){return new ZS(e)}class ZS extends pr{constructor(t){super({type:"object",check(n){return KS(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=GY,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(o).filter(g=>!this._nodes.includes(g))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),p=!1;for(const g of c){let v=i[g],y=g in o;if(v){let b,x=o[g];d.path=(n.path?`${n.path}.`:"")+g,v=v.resolve({value:x,context:n.context,parent:u});let w=v instanceof pr?v.spec:void 0,A=w==null?void 0:w.strict;if(w!=null&&w.strip){p=p||g in o;continue}b=!n.__validating||!A?v.cast(o[g],d):o[g],b!==void 0&&(u[g]=b)}else y&&!a&&(u[g]=o[g]);(y!==g in u||u[g]!==o[g])&&(p=!0)}return p?u:o}_validate(t,n={},r,o){let{from:i=[],originalValue:a=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:a},...i],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(u,d)=>{if(!c||!KS(d)){o(u,d);return}a=a||d;let p=[];for(let g of this._nodes){let v=this.fields[g];!v||Ai.isRef(v)||p.push(v.asNestedTest({options:n,key:g,parent:d,parentPath:n.path,originalParent:a}))}this.runTests({tests:p,value:d,originalValue:a,options:n},r,g=>{o(g.sort(this._sortErrors).concat(u),d)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?i:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=zY(t,n),r._sortErrors=YS(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return Qu(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=Ti.getter(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return HY(i,t)&&(a=Object.assign({},i),r||delete a[t],a[n]=o(i)),a})}json(){return this.transform(UY)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Gu.exact,test(n){if(n==null)return!0;const r=XS(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Gu.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=XS(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Gu.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(Tg.camelCase)}snakeCase(){return this.transformKeys(Tg.snakeCase)}constantCase(){return this.transformKeys(t=>Tg.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,a]of Object.entries(n.fields)){var o;let c=t;(o=c)!=null&&o.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[i]})),r.fields[i]=a.describe(c)}return r}}jg.prototype=ZS.prototype;const QS=VS().test("function","Invalid function",e=>te.isFunction(e));class JS{constructor(){Io(this,_i);Io(this,Qo,[])}get(t){if(mo().required().validateSync(t),Ul(this,_i,Hl).call(this)){const n=localStorage.getItem(t);return te.isNil(n)?null:JSON.parse(n)}else return null}set(t,n){return mo().required().validateSync(t),Ul(this,_i,Hl).call(this)?(localStorage.setItem(t,JSON.stringify(n)),n):null}watch(t,n){mo().required().validateSync(t),QS.validateSync(n),Ul(this,_i,Hl).call(this)&&(Nn(this,Qo).push({key:t,callback:n}),window.addEventListener("storage",r=>{r.storageArea===localStorage&&r.key===t&&n(this.get(t))}))}unwatch(t,n){mo().required().validateSync(t),QS.optional().default(te.identity).validateSync(n),Ul(this,_i,Hl).call(this)&&(n!==void 0?si(this,Qo,te.reject(Nn(this,Qo),r=>r.key===t&&r.callback===n)):si(this,Qo,te.reject(Nn(this,Qo),r=>r.key===t)))}}Qo=new WeakMap,_i=new WeakSet,Hl=function(){return typeof window<"u"};function Ju(e={},t=[],n={}){const{isEmpty:r=te.isEmpty}=n;return!te.some(t,o=>r((e??{})[o.locale]))}function qS(e={},t=[],n={}){const{isEmpty:r=te.isEmpty}=n;return te.some(t,o=>!r((e??{})[o.locale]))}function kg(e,t,n){if(!te.isPlainObject(e)||t===void 0)return;const r=te.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let i=e[String(t)];if(i===void 0&&o){const a=te.isArray(r.fallbackLocales)&&!te.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];i=te.chain(a).map(c=>e[String(c)]).reject(te.isUndefined).first().value(),i===void 0&&(i=te.chain(e).values().first().value())}return i}function qu(e=[],t){const n=te.isArray(e)?e:[e],r=te.filter(n,o=>E.isValidElement(o));te.each(r,o=>{var i;t(o),qu(((i=o==null?void 0:o.props)==null?void 0:i.children)??[],t)})}var $S={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(xn,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",c="minute",u="hour",d="day",p="week",g="month",v="quarter",y="year",b="date",x="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var J=["th","st","nd","rd"],V=Z%100;return"["+Z+(J[(V-20)%10]||J[V]||J[0])+"]"}},T=function(Z,J,V){var $=String(Z);return!$||$.length>=J?Z:""+Array(J+1-$.length).join(V)+Z},P={s:T,z:function(Z){var J=-Z.utcOffset(),V=Math.abs(J),$=Math.floor(V/60),W=V%60;return(J<=0?"+":"-")+T($,2,"0")+":"+T(W,2,"0")},m:function Z(J,V){if(J.date()<V.date())return-Z(V,J);var $=12*(V.year()-J.year())+(V.month()-J.month()),W=J.clone().add($,g),ie=V-W<0,U=J.clone().add($+(ie?-1:1),g);return+(-($+(V-W)/(ie?W-U:U-W))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:g,y,w:p,d,D:b,h:u,m:c,s:a,ms:i,Q:v}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},O="en",_={};_[O]=j;var R="$isDayjsObject",N=function(Z){return Z instanceof re||!(!Z||!Z[R])},Y=function Z(J,V,$){var W;if(!J)return O;if(typeof J=="string"){var ie=J.toLowerCase();_[ie]&&(W=ie),V&&(_[ie]=V,W=ie);var U=J.split("-");if(!W&&U.length>1)return Z(U[0])}else{var ee=J.name;_[ee]=J,W=ee}return!$&&W&&(O=W),W||!$&&O},X=function(Z,J){if(N(Z))return Z.clone();var V=typeof J=="object"?J:{};return V.date=Z,V.args=arguments,new re(V)},G=P;G.l=Y,G.i=N,G.w=function(Z,J){return X(Z,{locale:J.$L,utc:J.$u,x:J.$x,$offset:J.$offset})};var re=function(){function Z(V){this.$L=Y(V.locale,null,!0),this.parse(V),this.$x=this.$x||V.x||{},this[R]=!0}var J=Z.prototype;return J.parse=function(V){this.$d=function($){var W=$.date,ie=$.utc;if(W===null)return new Date(NaN);if(G.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var U=W.match(w);if(U){var ee=U[2]-1||0,de=(U[7]||"0").substring(0,3);return ie?new Date(Date.UTC(U[1],ee,U[3]||1,U[4]||0,U[5]||0,U[6]||0,de)):new Date(U[1],ee,U[3]||1,U[4]||0,U[5]||0,U[6]||0,de)}}return new Date(W)}(V),this.init()},J.init=function(){var V=this.$d;this.$y=V.getFullYear(),this.$M=V.getMonth(),this.$D=V.getDate(),this.$W=V.getDay(),this.$H=V.getHours(),this.$m=V.getMinutes(),this.$s=V.getSeconds(),this.$ms=V.getMilliseconds()},J.$utils=function(){return G},J.isValid=function(){return this.$d.toString()!==x},J.isSame=function(V,$){var W=X(V);return this.startOf($)<=W&&W<=this.endOf($)},J.isAfter=function(V,$){return X(V)<this.startOf($)},J.isBefore=function(V,$){return this.endOf($)<X(V)},J.$g=function(V,$,W){return G.u(V)?this[$]:this.set(W,V)},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this.$d.getTime()},J.startOf=function(V,$){var W=this,ie=!!G.u($)||$,U=G.p(V),ee=function(ye,we){var Ie=G.w(W.$u?Date.UTC(W.$y,we,ye):new Date(W.$y,we,ye),W);return ie?Ie:Ie.endOf(d)},de=function(ye,we){return G.w(W.toDate()[ye].apply(W.toDate("s"),(ie?[0,0,0,0]:[23,59,59,999]).slice(we)),W)},ge=this.$W,fe=this.$M,he=this.$D,me="set"+(this.$u?"UTC":"");switch(U){case y:return ie?ee(1,0):ee(31,11);case g:return ie?ee(1,fe):ee(0,fe+1);case p:var Se=this.$locale().weekStart||0,be=(ge<Se?ge+7:ge)-Se;return ee(ie?he-be:he+(6-be),fe);case d:case b:return de(me+"Hours",0);case u:return de(me+"Minutes",1);case c:return de(me+"Seconds",2);case a:return de(me+"Milliseconds",3);default:return this.clone()}},J.endOf=function(V){return this.startOf(V,!1)},J.$set=function(V,$){var W,ie=G.p(V),U="set"+(this.$u?"UTC":""),ee=(W={},W[d]=U+"Date",W[b]=U+"Date",W[g]=U+"Month",W[y]=U+"FullYear",W[u]=U+"Hours",W[c]=U+"Minutes",W[a]=U+"Seconds",W[i]=U+"Milliseconds",W)[ie],de=ie===d?this.$D+($-this.$W):$;if(ie===g||ie===y){var ge=this.clone().set(b,1);ge.$d[ee](de),ge.init(),this.$d=ge.set(b,Math.min(this.$D,ge.daysInMonth())).$d}else ee&&this.$d[ee](de);return this.init(),this},J.set=function(V,$){return this.clone().$set(V,$)},J.get=function(V){return this[G.p(V)]()},J.add=function(V,$){var W,ie=this;V=Number(V);var U=G.p($),ee=function(fe){var he=X(ie);return G.w(he.date(he.date()+Math.round(fe*V)),ie)};if(U===g)return this.set(g,this.$M+V);if(U===y)return this.set(y,this.$y+V);if(U===d)return ee(1);if(U===p)return ee(7);var de=(W={},W[c]=r,W[u]=o,W[a]=n,W)[U]||1,ge=this.$d.getTime()+V*de;return G.w(ge,this)},J.subtract=function(V,$){return this.add(-1*V,$)},J.format=function(V){var $=this,W=this.$locale();if(!this.isValid())return W.invalidDate||x;var ie=V||"YYYY-MM-DDTHH:mm:ssZ",U=G.z(this),ee=this.$H,de=this.$m,ge=this.$M,fe=W.weekdays,he=W.months,me=W.meridiem,Se=function(we,Ie,pe,Ke){return we&&(we[Ie]||we($,ie))||pe[Ie].slice(0,Ke)},be=function(we){return G.s(ee%12||12,we,"0")},ye=me||function(we,Ie,pe){var Ke=we<12?"AM":"PM";return pe?Ke.toLowerCase():Ke};return ie.replace(A,function(we,Ie){return Ie||function(pe){switch(pe){case"YY":return String($.$y).slice(-2);case"YYYY":return G.s($.$y,4,"0");case"M":return ge+1;case"MM":return G.s(ge+1,2,"0");case"MMM":return Se(W.monthsShort,ge,he,3);case"MMMM":return Se(he,ge);case"D":return $.$D;case"DD":return G.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Se(W.weekdaysMin,$.$W,fe,2);case"ddd":return Se(W.weekdaysShort,$.$W,fe,3);case"dddd":return fe[$.$W];case"H":return String(ee);case"HH":return G.s(ee,2,"0");case"h":return be(1);case"hh":return be(2);case"a":return ye(ee,de,!0);case"A":return ye(ee,de,!1);case"m":return String(de);case"mm":return G.s(de,2,"0");case"s":return String($.$s);case"ss":return G.s($.$s,2,"0");case"SSS":return G.s($.$ms,3,"0");case"Z":return U}return null}(we)||U.replace(":","")})},J.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},J.diff=function(V,$,W){var ie,U=this,ee=G.p($),de=X(V),ge=(de.utcOffset()-this.utcOffset())*r,fe=this-de,he=function(){return G.m(U,de)};switch(ee){case y:ie=he()/12;break;case g:ie=he();break;case v:ie=he()/3;break;case p:ie=(fe-ge)/6048e5;break;case d:ie=(fe-ge)/864e5;break;case u:ie=fe/o;break;case c:ie=fe/r;break;case a:ie=fe/n;break;default:ie=fe}return W?ie:G.a(ie)},J.daysInMonth=function(){return this.endOf(g).$D},J.$locale=function(){return _[this.$L]},J.locale=function(V,$){if(!V)return this.$L;var W=this.clone(),ie=Y(V,$,!0);return ie&&(W.$L=ie),W},J.clone=function(){return G.w(this.$d,this)},J.toDate=function(){return new Date(this.valueOf())},J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toISOString=function(){return this.$d.toISOString()},J.toString=function(){return this.$d.toUTCString()},Z}(),ne=re.prototype;return X.prototype=ne,[["$ms",i],["$s",a],["$m",c],["$H",u],["$W",d],["$M",g],["$y",y],["$D",b]].forEach(function(Z){ne[Z[1]]=function(J){return this.$g(J,Z[0],Z[1])}}),X.extend=function(Z,J){return Z.$i||(Z(J,re,X),Z.$i=!0),X},X.locale=Y,X.isDayjs=N,X.unix=function(Z){return X(1e3*Z)},X.en=_[O],X.Ls=_,X.p={},X})})($S);var eE=$S.exports;const Or=Dr(eE);function tE(e){const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Or().hour(n).minute(r)}const al=new JS;function YY(e,t,n){return function(r){const o=te.isFunction(r)?r(t):r;return al.set(e,o),n(o),o}}function Mg(e,t){var u;mo().required().validateSync(e);const[n,r]=E.useState(al.get(e)??t),o=E.useRef(t),i=te.isEqual(o.current,t)?o.current:t,a=E.useRef(),c=a.current;return E.useEffect(()=>{r(al.get(e)??i)},[e,i,r]),E.useEffect(()=>{function d(p){r(p)}return al.watch(e,d),()=>{al.unwatch(e,d)}},[e,r]),(e!==(c==null?void 0:c.key)||!te.isEqual(n,c==null?void 0:c.value))&&(a.current={key:e,value:n,setter:YY(e,n,r)}),[n,((u=a.current)==null?void 0:u.setter)??te.noop]}function nE(e){const[t]=q.useLocaleState();return e!==void 0?String(e):t}function KY(e,t){const n=nE(t==null?void 0:t.locale);return kg(e,n,t)}function XY(e){const t=nE(e==null?void 0:e.locale);return E.useCallback(r=>kg(r,t,e),[t,e])}function rE(e){if(!te.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=E.useState(e);return E.useEffect(()=>{te.isEqual(e,t)||n(e)},[e,t]),t}function _s(){const[e,t]=E.useState(null),n=!!e,r=E.useCallback(a=>t((a==null?void 0:a.currentTarget)??null),[t]),o=E.useCallback(()=>t(null),[t]),i=E.useCallback(a=>{n?o():r(a)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:i}}function ZY(e,t){const[n,r]=E.useState({width:1,height:1}),o=e.current;return E.useEffect(()=>{function i(){var d;let c=0,u=0;switch(t){case"client":c=(o==null?void 0:o.clientWidth)??0,u=(o==null?void 0:o.clientHeight)??0;break;case"offset":c=(o==null?void 0:o.offsetWidth)??0,u=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":c=(o==null?void 0:o.scrollWidth)??0,u=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const p=((d=e.current)==null?void 0:d.getBoundingClientRect())??{width:0,height:0};c=p.width,u=p.height;break}}r({width:c,height:u})}const a=new ResizeObserver(i);return te.isEmpty(e==null?void 0:e.current)||(a.observe(e==null?void 0:e.current),i()),()=>{a.disconnect()}},[o,t,e]),n}function Fg(e){const t=L.useRecordContext(),n=L.useTranslate(),r=L.useResourceContext(),o=t!=null&&t.id?"edit":"create";return E.useMemo(()=>{if(e===!1)return;const a=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(a,{_:a}),...t})},[o,t,r,n,e])}function oE(){const{mode:e}=Cn(),t=window.matchMedia("(prefers-color-scheme: dark)"),[n,r]=E.useState(()=>e==="auto"?t.matches?"dark":"light":e),o=E.useRef(n);return E.useEffect(()=>{function i(){const c=t.matches?"dark":"light";c!==o.current&&(r(c),o.current=c)}i();const a=t;return a.addEventListener("change",i),()=>{a.removeEventListener("change",i)}},[t]),n}function Xr(){throw new Error("Method must be implemented")}const iE={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2,setFontFamily:Xr,setMenuOrientation:Xr,setMiniDrawer:Xr,setContainer:Xr,setMode:Xr,setPresetColor:Xr,setThemeDirection:Xr,setAppDefaultPath:Xr,setDrawerWidth:Xr,setHorizontalMaxItems:Xr,isVerticalLayout:e=>!1,isHorizontalLayout:e=>!1};function QY(e){return e==="vertical"}function JY(e){return e==="horizontal"}const _g=E.createContext(iE);function Rg({initialConfig:e,children:t}){const[n,r]=Mg("theme-config",{...iE,...e});function o(b){r(x=>({...x,fontFamily:b}))}function i(b){r(x=>({...x,menuOrientation:b}))}function a(b){r(x=>({...x,miniDrawer:b}))}function c(b){r(x=>({...x,container:b}))}function u(b){r(x=>({...x,mode:b}))}function d(b){r(x=>({...x,presetColor:b}))}function p(b){r(x=>({...x,themeDirection:b}))}function g(b){r(x=>({...x,appDefaultPath:b}))}function v(b){r(x=>({...x,drawerWidth:b}))}function y(b){r(x=>({...x,horizontalMaxItems:b}))}return f.jsx(_g.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:i,setMiniDrawer:a,setContainer:c,setMode:u,setPresetColor:d,setThemeDirection:p,setAppDefaultPath:g,setDrawerWidth:v,setHorizontalMaxItems:y,isVerticalLayout:QY,isHorizontalLayout:JY},children:t})}function Dg(){return E.useContext(_g)}function Cn(){return Dg()}const qY=Na(L.Toolbar,{slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end",position:"initial !important","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}}));function Ho(e){return f.jsx(qY,{...e})}function sE({children:e,spacing:t,defaultValues:n,...r}){const{spacing:o}=Cn();return f.jsx(eK,{defaultValues:n,spacing:t||o,children:f.jsx(S.Grid,{container:!0,...r,spacing:t||o,children:e})})}function $Y({children:e,content:t=!0,title:n,subheader:r=null,secondary:o=null,toolbar:i=!1,lg:a=12,md:c=12,sm:u=12,xs:d=12,...p}){const g=L.useTranslate(),v=L.useResourceContext(),{cardTitle:y,cardSubheader:b}=E.useMemo(()=>{const x=n||`resources.${v}.title`;return{cardTitle:g(x,{_:x}),cardSubheader:r!==null?g(r,{_:r}):null}},[v,r,n,g]);return f.jsx(S.Grid,{item:!0,...p,lg:a,md:c,sm:u,xs:d,children:f.jsx(On,{content:t,title:y,subheader:b,secondary:o,divider:!0,children:f.jsxs(f.Fragment,{children:[e,i===!0?f.jsx(Ho,{children:f.jsx(L.SaveButton,{})}):i]})})})}const eK=ue(L.Form,{slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*1.25),padding:0,minHeight:"unset"},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingRight:"0 !important",paddingLeft:"0 !important",paddingBottom:"0 !important"}}));sE.Section=$Y;function aE(e){const{confirmTitle:t,confirmContent:n,confirmColor:r="primary",dialogSx:o,icon:i=rK,label:a="ra.action.delete",mutationMode:c="pessimistic",mutationOptions:u={},onClick:d,onSuccess:p,onError:g,...v}=e,{meta:y,...b}=u,{selectedIds:x,onUnselectItems:w}=q.useListContext(e),[A,j]=q.useSafeSetState(!1),T=q.useNotify(),P=q.useResourceContext(e),O=q.useRefresh(),_=q.useTranslate(),R=pt(),[N,{isLoading:Y}]=q.useDeleteMany(P,{ids:x,meta:y},{onSuccess:()=>{O(),T("ra.notification.deleted",{type:"info",messageArgs:{smart_count:x.length},undoable:c==="undoable"}),w(),j(!1),p&&te.isFunction(p)&&p()},onError:ne=>{T(typeof ne=="string"?ne:ne.message||"ra.notification.http_error",{type:"error",messageArgs:{_:typeof ne=="string"?ne:ne&&ne.message?ne.message:void 0}}),j(!1),g&&te.isFunction(g)&&g()},mutationMode:c,...b});function X(ne){j(!0),ne.stopPropagation()}function G(){j(!1)}function re(ne){N(),typeof d=="function"&&d(ne)}return f.jsxs(f.Fragment,{children:[f.jsx(nK,{onClick:X,label:a,...tK(v),children:i}),f.jsx(L.Confirm,{isOpen:A,loading:Y,sx:o||{"& .MuiPaper-root":{p:2},"& .MuiDialogActions-root":{display:"flex",justifyContent:"space-between",width:"100%","& .RaConfirm-confirmPrimary":{backgroundColor:R.palette.primary.main,color:R.palette.primary.contrastText,ml:2,"&:hover":{backgroundColor:R.palette.primary.dark}},"& .MuiButtonBase-root":{width:"50%",border:`1px solid ${R.palette.action.disabled}`},"& .MuiButton-icon":{display:"none"}}},title:t?typeof t=="string"?_(t):t:f.jsx(S.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(S.Box,{sx:{color:"primary.main",fontSize:"28px",borderRadius:"50%",backgroundColor:"primary.lighter",width:"56px",height:"56px",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(Ue.DeleteFilled,{})})}),content:n||f.jsx(S.Typography,{maxWidth:"300px",variant:"h4",align:"center",children:_("ra.message.bulk_delete_content",{_:"ra.message.bulk_delete_content",smart_count:x.length,name:_(`resources.${P}.forcedCaseName`,{smart_count:x.length,_:Vo.humanize(_(`resources.${P}.name`,{smart_count:x.length,_:Vo.inflect(P,x.length)}),!0)})})}),confirmColor:r,translateOptions:{smart_count:x.length,name:_(`resources.${P}.forcedCaseName`,{smart_count:x.length,_:Vo.humanize(_(`resources.${P}.name`,{smart_count:x.length,_:Vo.inflect(P,x.length)}),!0)})},onConfirm:re,onClose:G})]})}function tK({classes:e,filterValues:t,label:n,selectedIds:r,...o}){return o}const nK=ue(L.Button,{name:"RaBulkDeleteWithConfirmButton",overridesResolver:e=>e.root})(({theme:e})=>({color:e.palette.error.main,"&:hover":{backgroundColor:et(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}})),rK=f.jsx(zh,{});aE.propTypes={confirmTitle:m.node,confirmContent:m.node,confirmColor:m.string,dialogSx:m.object,icon:m.element,label:m.string,mutationMode:m.oneOf(["pessimistic","optimistic","undoable"]),resource:m.string,selectedIds:m.arrayOf(m.any),onSuccess:m.func,onError:m.func};const oK="RaButton";function iK(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}const sK=ue(S.Button,{name:oK,overridesResolver:(e,t)=>t.root})({"&.MuiButton-sizeSmall":{lineHeight:1.5}});function Ii(e){const{disableIconOnly:t=!1,label:n,children:r,className:o,color:i,size:a,disabled:c,alignIcon:u,to:d,...p}=e,g=L.useTranslate(),v=iK(d);if(t){const y=n?g(n,{_:n}):void 0;return f.jsx(sK,{className:o,color:i,size:a,"aria-label":y,disabled:c,startIcon:u==="left"&&r?r:void 0,endIcon:u==="right"&&r?r:void 0,...v,...p,children:y})}return f.jsx(L.Button,{...e})}function lE(e){const{className:t,icon:n=aK,label:r="ra.action.create",resource:o,scrollToTop:i=!0,variant:a,to:c,state:u={},disableFloatingButton:d=!1,...p}=e,g=q.useResourceContext(e),v=q.useCreatePath(),y=q.useTranslate(),b=S.useMediaQuery(A=>A.breakpoints.down("md")),x=Iw({},lK.get(String(i)),u),w=fK(c);return!d&&b?f.jsx(cK,{component:ut.Link,to:v({resource:g,type:"create"}),state:x,color:"primary",className:Be(ed.floating,t),"aria-label":r?y(r):"ra.action.create",...p,...w,children:n}):f.jsx(uK,{component:ut.Link,to:v({resource:g,type:"create"}),state:x,className:Be(ed.root,t),label:r,variant:a,...p,...w,children:n})}const aK=f.jsx(bh,{}),lK=new Map([["true",{_scrollToTop:!0}],["false",{}]]);lE.propTypes={resource:m.string,className:m.string,icon:m.element,label:m.string};const $u="RaCreateButton",ed={root:`${$u}-root`,floating:`${$u}-floating`},cK=ue(S.Fab,{name:$u,overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${ed.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),uK=ue(Ii,{name:$u,overridesResolver:(e,t)=>t.root})({});function dK(e,t){return e.resource===t.resource&&e.label===t.label&&e.translate===t.translate&&e.disabled===t.disabled&&$a(e.to,t.to)&&$a(e.state,t.state)}const cE=D.memo(lE,dK);function fK(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}function Lg(e,t){const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]}function pK(e,t){return e&&e.data?{data:Lg(e.data,t),total:e.total+1}:e}function hK(e,t){return e&&e.length>0?Lg(e,t):e}function gK(e,t){return e&&e.data?{...e,data:Lg(e.data,t),total:e.total+1}:e}function mK(e){const{disableFloatingButton:t,label:n="ra.action.create",startIcon:r=f.jsx(Ue.PlusCircleOutlined,{}),...o}=e,i=E.useCallback(a=>{var c;a.preventDefault(),(c=e==null?void 0:e.onClick)==null||c.call(e)},[e]);return t?f.jsx(Ii,{...o,onClick:i,label:n,children:r}):f.jsx(lz,{...e,onClick:i,label:n,children:r})}function vK(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=tn.useFormContext(),o=q.useTranslate(),i=E.useCallback(a=>{a.preventDefault(),a.stopPropagation(),r(c=>t(c,n))()},[r,t,n]);return f.jsx(S.Button,{onClick:i,color:"primary",variant:"contained",size:"medium",children:o("ra.action.save")})}function yK(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,onSubmit:i,mutationOptions:a,scroll:c="body",...u}=e,d=Xi.useQueryClient(),p=q.useResourceContext(),g=q.useTranslate(),v=E.Children.only(t),[y,b]=E.useState(!1),x=q.useNotify(),w=E.useCallback(()=>b(!0),[]),A=E.useCallback(()=>b(!1),[]),j=E.useCallback((T,P,O)=>{var N,Y;const R=Date.now();d.setQueryData([p,"getOne",{id:T.id}],T),d.setQueriesData([p,"getList"],X=>gK(X,T),{updatedAt:R}),d.setQueriesData([p,"getMany"],X=>hK(X,T),{updatedAt:R}),d.setQueriesData([p,"getManyReference"],X=>pK(X,T),{updatedAt:R}),A(),x("ra.notification.created",{messageArgs:{smart_count:1}}),(Y=(N=e==null?void 0:e.mutationOptions)==null?void 0:N.onSuccess)==null||Y.call(N,T,P,O)},[A,x,e.mutationOptions,d,p]);return f.jsxs(f.Fragment,{children:[f.jsx(mK,{...u,onClick:w}),f.jsx(S.Dialog,{open:y,scroll:c,onClose:A,maxWidth:n,fullWidth:r,fullScreen:o,children:f.jsx(S.DialogContent,{sx:{m:0,p:0},children:f.jsx(q.CreateBase,{...e,mutationOptions:{...a,onSuccess:j},children:E.isValidElement(v)?E.cloneElement(v,{...v.props,modal:!0,toolbar:f.jsxs(Ho,{children:[f.jsx(S.Button,{variant:"text",size:"medium",onClick:A,children:g("ra.action.cancel")}),i?f.jsx(vK,{onSubmit:i,closeDialog:A}):f.jsx(pg,{type:"button"})]})}):null})})})]})}function ll(e){const{className:t,confirmTitle:n,confirmContent:r,confirmColor:o="primary",color:i="error",dialogSx:a,icon:c=f.jsx(zh,{}),label:u="ra.action.delete",mutationMode:d="pessimistic",mutationOptions:p,onClick:g,redirect:v="list",translateOptions:y={},...b}=e,x=q.useTranslate(),w=q.useRecordContext(e),A=q.useResourceContext(e),j=S.useTheme(),{open:T,isLoading:P,handleDialogOpen:O,handleDialogClose:_,handleDelete:R}=q.useDeleteWithConfirmController({record:w,redirect:v,mutationMode:d,onClick:g,mutationOptions:p,resource:A});return f.jsxs(f.Fragment,{children:[f.jsx(Ii,{onClick:O,label:u,className:Be("ra-delete-button",t),color:i,...b,children:c},"button"),f.jsx(Uw,{isOpen:T,loading:P,sx:a||{"& .MuiPaper-root":{p:2},"& .MuiDialogActions-root":{display:"flex",justifyContent:"space-between",width:"100%","& .RaConfirm-confirmPrimary":{backgroundColor:j.palette.primary.main,color:j.palette.primary.contrastText,ml:2,"&:hover":{backgroundColor:j.palette.primary.dark}},"& .MuiButtonBase-root":{width:"50%",border:`1px solid ${j.palette.action.disabled}`},"& .MuiButton-icon":{display:"none"}}},title:n?typeof n=="string"?x(n):n:f.jsx(S.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(S.Box,{sx:{color:"primary.main",fontSize:"28px",borderRadius:"50%",backgroundColor:"primary.lighter",width:"56px",height:"56px",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(Ue.DeleteFilled,{})})}),content:r||f.jsx(S.Typography,{maxWidth:"300px",variant:"h4",align:"center",children:x("ra.message.delete_content",{_:"ra.message.delete_content",name:x(`resources.${A}.forcedCaseName`,{smart_count:1,_:Vo.humanize(x(`resources.${A}.name`,{smart_count:1,_:Vo.singularize(A)}),!0)}),id:w==null?void 0:w.id})}),confirmColor:o,translateOptions:{name:x(`resources.${A}.forcedCaseName`,{smart_count:1,_:Vo.humanize(x(`resources.${A}.name`,{smart_count:1,_:Vo.singularize(A)}),!0)}),id:w==null?void 0:w.id,...y},onConfirm:R,onClose:_})]})}ll.propTypes={basePath:m.string,className:m.string,confirmColor:m.string,confirmContent:m.oneOfType([m.string,m.element]),confirmTitle:m.oneOfType([m.string,m.element]),icon:m.element,label:m.string,mutationMode:m.oneOf(["pessimistic","optimistic","undoable"]),onClick:m.func,record:m.any,redirect:m.oneOfType([m.string,m.bool,m.func]),resource:m.string,translateOptions:m.object};function bK(e){const t=E.useCallback(n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e==null?void 0:e.onClick)==null||r.call(e)},[e]);return f.jsx(Qw,{...e,onClick:t})}function xK(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=tn.useFormContext(),o=E.useCallback(i=>{i.preventDefault(),i.stopPropagation(),r(a=>t(a,n))()},[r,t,n]);return f.jsx(Ii,{disableIconOnly:!0,onClick:o,color:"primary",variant:"contained",size:"medium",label:"ra.action.save"})}function CK(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,mutationOptions:i,onSubmit:a,scroll:c="body",...u}=e,d=q.useNotify(),[p,g]=E.useState(!1),v=E.Children.only(t),y=E.useCallback(()=>g(!0),[]),b=E.useCallback(()=>g(!1),[]),x=E.useCallback((A,j,T)=>{var P,O;b(),d("ra.notification.updated",{messageArgs:{smart_count:1},undoable:(e==null?void 0:e.mutationMode)==="undoable"}),(O=(P=e==null?void 0:e.mutationOptions)==null?void 0:P.onSuccess)==null||O.call(P,A,j,T)},[b,d,e.mutationOptions,e.mutationMode]),w=q.useRecordContext();return f.jsxs(f.Fragment,{children:[f.jsx(bK,{...u,onClick:y}),f.jsx(S.Dialog,{open:p,scroll:c,onClose:b,fullWidth:r,maxWidth:n,fullScreen:o,keepMounted:!1,children:f.jsx(S.DialogContent,{sx:{m:0,p:0},children:f.jsx(q.EditBase,{...e,id:w.id,mutationMode:"pessimistic",mutationOptions:{...i,onSuccess:x},children:E.isValidElement(v)?E.cloneElement(v,{...v.props,modal:!0,toolbar:f.jsxs(Ho,{children:[f.jsx(Ii,{disableIconOnly:!0,variant:"text",size:"medium",onClick:b,label:"ra.action.cancel"}),a?f.jsx(xK,{onSubmit:a,closeDialog:b}):f.jsx(pg,{type:"button"})]})}):null})})})]})}function wK({label:e="ra.auth.sign_in",...t}){const n=L.useRecordContext(),[r,o]=E.useState(!1),i=L.useAuthProvider(),a=E.useCallback(c=>{c.stopPropagation(),c.preventDefault(),o(!0),i.impersonate(n==null?void 0:n.id).then(()=>{o(!1),document.location.href="/"})},[i,n==null?void 0:n.id]);return f.jsx(L.Button,{disabled:r||i.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:f.jsx(en.VpnKey,{})})}const SK=Na(L.SimpleForm,{slot:"Root"})(({theme:e})=>({[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}}));function Bg({title:e,modal:t=!1,content:n=!1,subheader:r=null,toolbar:o=f.jsx(Ho,{children:f.jsx(L.SaveButton,{type:"button"})}),secondary:i=f.jsx(No,{children:f.jsx(ll,{})}),sx:a,...c}){const u=Fg(e),d=L.useRecordContext(),p=Op();return f.jsx(On,{content:n,title:u,subheader:r,secondary:d!=null&&d.id?i:null,sx:{...a,"& .MuiToolbar-root":{paddingLeft:p.spacing(2.5),paddingRight:p.spacing(2.5),paddingBottom:p.spacing(2.5),paddingTop:t?p.spacing(2.5):0,borderTop:t?`1px solid ${p.palette.divider}`:void 0}},border:!t,divider:!0,children:f.jsx(SK,{toolbar:o,...c})})}const uE={openDialogs:[],getCurrentDialog:()=>null,openDialog:(e,t)=>{throw new Error(`openDialog not yet ready for: ${e}, ${t}`)},closeDialog:(e,t)=>{throw new Error(`closeDialog not yet ready for: ${e}, ${t}`)}},dE=E.createContext(uE);function EK(e){const[t,n]=E.useState(uE);function r(a,c){n(u=>({...u,openDialogs:[...u.openDialogs,a]})),c&&c()}function o(a,c){n(u=>({...u,openDialogs:u.openDialogs.filter(d=>d!==a)})),c&&c()}function i(){return t.openDialogs.length>0?t.openDialogs[t.openDialogs.length-1]:null}return f.jsx(dE.Provider,{value:{...t,openDialog:r,closeDialog:o,getCurrentDialog:i},children:e.children})}function fE(){const e=E.useContext(dE);if(e===void 0)throw new Error("useAppState must be used within an AppStateProvider");return e}function Ng(){return fE()}function pE({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:i,divider:a=!1,fullWidth:c,...u}){const d=Wt.useTheme(),{getCurrentDialog:p}=Ng(),{source:g,resource:v,isRequired:y}=u,{getFieldState:b,formState:x}=tn.useFormContext(),{error:w}=b(g,x),A=p();return f.jsxs(S.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:w?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},width:c?"100%":"auto",...o},children:[n==="label"&&e!==!1&&i!==!1&&f.jsx(S.InputLabel,{error:!!w,sx:{borderBottom:a?`1px solid ${d.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:f.jsx(L.FieldTitle,{label:e,source:g,resource:A||v,isRequired:y})}),E.isValidElement(t)?E.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r?f.jsx(S.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!w,children:r}):null]})}const TK=ue(L.ArrayInput,{slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}}));function AK({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...i}){return f.jsx(pE,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:i==null?void 0:i.fullWidth,children:f.jsx(TK,{source:n,label:!1,...i})})}function IK({canEdit:e=!0,canDelete:t=!0,canClone:n=!1}){return!e&&!t&&!n?null:f.jsxs(No,{children:[e?f.jsx(L.EditButton,{}):null,t?f.jsx(ll,{}):null,n?f.jsx(L.CloneButton,{}):null]})}const hE=ue("div",{overridesResolver:(e,t)=>t.root})({display:"inline-block"}),OK=ue("ul")({display:"inline-block"});function PK(e){var p;const{className:t,emptyText:n,source:r,title:o,...i}=e,a=q.useRecordContext(e),c=Ze.get(a,r),u=q.useTranslate();if(!c)return n?f.jsx(S.Typography,{component:"span",variant:"body2",className:t,...i,children:n?u(n,{_:n}):null}):f.jsx(hE,{className:t,...i});if(Array.isArray(c))return f.jsx(OK,{className:t,...i,children:c.map((g,v)=>{var b;const y=o instanceof String?(b=Ze.get(g,o))==null?void 0:b.toString():o;return f.jsx("li",{children:y},v)})});const d=o instanceof String?(p=Ze.get(a,o))==null?void 0:p.toString():o;return f.jsx(hE,{className:t,...i,children:d})}function gE({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",resource:i,...a}){const[c,u]=E.useState(null),d=L.useRecordContext(a),p=L.useDataProvider(),g=L.useResourceContext(),v=L.useNotify(),y=E.useCallback(async w=>{w.preventDefault(),w.stopPropagation(),v("ra.notification.download",{type:"info"});const A=Ze.get(d,a==null?void 0:a.source),j=(i||g).replace("entities/",""),T=e||(d==null?void 0:d.id),P=await p.getFile(`/attachments/${j}/${T}/${t||(a==null?void 0:a.source)}/${(A==null?void 0:A.id)||(d==null?void 0:d.id)}`),O=document.createElement("a");O.href=P,O.download=Ze.get(d,(a==null?void 0:a.title)||(a==null?void 0:a.source)),O.click()},[p,d,e,g,i,t,a==null?void 0:a.source,a==null?void 0:a.title,v]),b=E.useMemo(()=>({...d,[a==null?void 0:a.source]:(d==null?void 0:d.src)||Ze.get(d,a==null?void 0:a.source),[a==null?void 0:a.title]:(d==null?void 0:d.title)||Ze.get(d,(a==null?void 0:a.title)||(a==null?void 0:a.source))}),[d,a==null?void 0:a.source,a==null?void 0:a.title]),x=L.useTranslate();return E.useEffect(()=>{!d||!(d!=null&&d.userId)||r===!1||p.getOne(o,{id:d==null?void 0:d.userId}).then(({data:w})=>u(w)).catch(()=>u(null))},[d,p,o,r]),f.jsx(PK,{...a,disabled:n,record:b,onClick:y,title:f.jsxs(S.Box,{sx:{cursor:"pointer"},children:[f.jsx(S.Typography,{variant:"subtitle1",children:Ze.get(b,(a==null?void 0:a.title)||(a==null?void 0:a.source))}),f.jsxs(S.Typography,{variant:"caption",color:"secondary",children:[Ze.get(b,"sizeDescription"),r&&c?" | ":null,r&&c?x("ra.attachment.info",{user:c==null?void 0:c.name,created:Or(b==null?void 0:b.createdAt).format("DD/MM/YYYY HH:mm")}):null]})]})})}const jK=ue(L.ImageField,{slot:"root"})(()=>({}));function mE(e){const t=`_${e==null?void 0:e.source}`;return f.jsx(jK,{...e,source:t})}function vE({width:e=150,height:t=150,circle:n=!1,justify:r="flex-start",record:o,sx:i,...a}){const c=E.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5,...i}),[e,t,n,i]),u=L.useRecordContext(),d=o||u;return f.jsx(mE,{sx:p=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${p.palette.divider}`,objectFit:"cover !important",...c,minWidth:c.width,minHeight:c.height}}),...a,record:d})}var kK={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(xn,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],o=n%100;return"["+n+(r[(o-20)%10]||r[o]||r[0])+"]"}}})})(kK);var MK={exports:{}};(function(e,t){(function(n,r){e.exports=r(eE)})(xn,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),i={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(a){return a+"º"}};return o.default.locale(i,null,!0),i})})(MK);var yE={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(xn,function(){return function(n,r,o){n=n||{};var i=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function c(d,p,g,v){return i.fromToBase(d,p,g,v)}o.en.relativeTime=a,i.fromToBase=function(d,p,g,v,y){for(var b,x,w,A=g.$locale().relativeTime||a,j=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"}],T=j.length,P=0;P<T;P+=1){var O=j[P];O.d&&(b=v?o(d).diff(g,O.d,!0):g.diff(d,O.d,!0));var _=(n.rounding||Math.round)(Math.abs(b));if(w=b>0,_<=O.r||!O.r){_<=1&&P>0&&(O=j[P-1]);var R=A[O.l];y&&(_=y(""+_)),x=typeof R=="string"?R.replace("%d",_):R(_,p,O.l,w);break}}if(p)return x;var N=w?A.future:A.past;return typeof N=="function"?N(x):N.replace("%s",x)},i.to=function(d,p){return c(d,p,this,!0)},i.from=function(d,p){return c(d,p,this)};var u=function(d){return d.$u?o.utc():o()};i.toNow=function(d){return this.to(u(this),d)},i.fromNow=function(d){return this.from(u(this),d)}}})})(yE);var FK=yE.exports;const _K=Dr(FK);Or.extend(_K);function bE(e){const t=L.useRecordContext(e),[n]=L.useLocaleState(),r=E.useMemo(()=>Or(Ze.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return f.jsxs(f.Fragment,{children:[f.jsx(L.DateField,{record:t,source:e.source,showTime:!0}),f.jsx("br",{}),f.jsx(S.Typography,{variant:"caption",color:"textSecondary",children:r})]})}const RK=ue(L.DateField,{slot:"Root"})(()=>({}));function DK({variant:e="body1",...t}){return f.jsx(RK,{...t,variant:e})}const LK=ue(L.EmailField,{slot:"Root"})(()=>({}));function BK({variant:e="body1",...t}){return f.jsx(LK,{...t,variant:e})}const NK=ue(L.FileField,{slot:"root"})(()=>({}));function xE({...e}){const t=L.useRecordContext(e),n=E.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=Ze.get(t,`_${e==null?void 0:e.source}`,Ze.get(t,e==null?void 0:e.source)),i=Ze.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),a=document.createElement("a");a.href=o,a.download=i,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return f.jsx(NK,{...e,record:t,onClick:n})}function VK({variant:e="body1",...t}){return f.jsx(L.FunctionField,{...t,variant:e})}const WK=ue(L.TextField,{slot:"Root"})(()=>({}));function CE({variant:e="body1",...t}){return f.jsx(WK,{...t,variant:e})}function zK(e){const t=S.useTheme(),n=q.useLocales(),{source:r=""}=e,i=q.useRecordContext(e)[r],a=!Ju(i,n),c=Ir(e,{flex:1}),[u]=q.useLocaleState(),d=E.useMemo(()=>a?f.jsx(Ue.FlagFilled,{style:{color:t.palette.warning.main}}):f.jsx(Ue.FlagOutlined,{}),[a,t.palette.warning.main]),p=E.useMemo(()=>f.jsx(S.Stack,{children:te.map(n,(g,v)=>f.jsx(S.Typography,{children:`${g.locale.toUpperCase()}: ${(i??{})[g.locale]??""}`},v))}),[i,n]);return f.jsx(fu,{title:p,arrow:!1,children:f.jsxs(S.Stack,{alignItems:"center",direction:"row",gap:1,children:[d,f.jsx(CE,{...e,source:`${r}.${u}`,sx:c})]})})}const UK=ue("div")(({theme:e,fullWidth:t})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:t?"100%":"auto",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}}));function HK({source:e,defaultValue:t="&nbsp;",...n}){const r=L.useRecordContext(n),o=Ze.get(r,e,t);return f.jsx(S.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})}function GK({title:e,children:t}){return t==null?null:typeof e=="string"||e===!0?f.jsx(S.Tooltip,{title:e,placement:"top",children:t}):t}function YK({label:e,source:t,defaultValue:n="&nbsp;",children:r=f.jsx(HK,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...i}){const a=E.Children.only(r),{getCurrentDialog:c}=fE(),u=L.useRecordContext(i),d=L.useResourceContext(i),p=c(),g=E.useMemo(()=>o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?Ze.get(u,o,o):o,[u,o]),v=Ir(i,{width:i!=null&&i.fullWidth?"100%":"auto"});return f.jsx(GK,{title:g,children:f.jsxs(f.Fragment,{children:[f.jsx(S.InputLabel,{sx:{pt:1},children:f.jsx(L.FieldTitle,{label:e,source:t,resource:p||d})}),f.jsx(UK,{...i,children:E.isValidElement(a)?E.cloneElement(a,{...a.props,source:t,record:u,defaultValue:n,resource:p||d,sx:v}):null})]})})}function KK({children:e=null,className:t=""}){return f.jsx("div",{className:t,children:e})}const XK=Na(KK,{slot:"root"})(({theme:e,bulkActionButtons:t})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,"&>div:first-of-type":{alignItems:"center","& form":{padding:e.spacing(2.5)},"& .MuiToolbar-root":{alignItems:"center",padding:"0 !important",marginTop:e.spacing(1),[e.breakpoints.up("sm")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),width:`calc(100% - ${e.spacing(4)})`},[e.breakpoints.down("md")]:{marginTop:0,display:"contents"}}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:t===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 26px)"},"& .RaBulkActionsToolbar-toolbar":{borderRadius:0,"& > .RaBulkActionsToolbar-title":{alignItems:"center"},[e.breakpoints.down("sm")]:{paddingLeft:e.spacing(3)}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`}},"& .MuiTablePagination-toolbar":{marginTop:"0 !important",marginBottom:"0 !important"},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0}}));function wE(e){return f.jsx(XK,{...e,children:f.jsx(L.ReferenceManyField,{pagination:f.jsx(L.Pagination,{}),...e})})}function ZK({source:e,...t}){const n=L.useRecordContext(t),r=Ze.get(n,e,0),o=r/1024,i=o/1024,a=i/1024,c=a>1?`${a.toFixed(2)} GB`:i>1?`${i.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return f.jsx(S.Typography,{component:"span",variant:"body1",...t,children:c})}function dn({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:i,divider:a=!1,...c}){const u=pt(),{getCurrentDialog:d}=Ng(),{source:p,resource:g,isRequired:v,chip:y}=c,{fieldState:{invalid:b}}=L.useInput(c),x=d();return f.jsxs(S.Stack,{spacing:1,sx:{width:c!=null&&c.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{pb:0,color:b?u.palette.error.main:u.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&i!==!1&&f.jsx(S.InputLabel,{error:b===!0,sx:{borderBottom:a?`1px solid ${u.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:f.jsx(L.FieldTitle,{label:e,source:p,resource:x||g,isRequired:v})}),E.isValidElement(t)?E.cloneElement(t,{...t.props,...c,chip:y&&typeof y=="function"?E.createElement(y):y,label:n==="legend"?e:!1}):t,r?f.jsx(S.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:b===!0,children:r}):null]})}function QK(e){return e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{}}const JK=ue(L.FileInput,{slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...QK(e)}));function qK({children:e=f.jsx(gE,{title:"name",source:"path"}),multiple:t=!1,disabled:n=!1,type:r="attachment",...o}){const i=L.useRecordContext(o),a=o==null?void 0:o.source,c=i==null?void 0:i.id;return L.useInput({source:`__${r}__${o==null?void 0:o.source}`,defaultValue:o==null?void 0:o.source}),f.jsx(dn,{...o,disabled:n,children:f.jsx(JK,{type:r,multiple:t,disabled:n,children:E.cloneElement(e,{entityId:c,property:a,...e.props})})})}const $K=ue(L.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall:has(.MuiChip-root)":{paddingBottom:"4px"},"& .MuiAutocomplete-tag":{margin:"0px 4px 4px 0px"}}));function eX({size:e="small",...t}){return f.jsx(dn,{...t,children:f.jsx($K,{size:e})})}const tX=ue(L.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}}));function nX({size:e="small",...t}){const{perPage:n,...r}=t;return f.jsx(dn,{...r,children:f.jsx(tX,{size:e})})}const rX=ue(L.BooleanInput,{slot:"Root"})(()=>({marginTop:"0 !important"}));function oX({...e}){const t=Wt.useTheme();return f.jsx(dn,{...e,children:f.jsx(rX,{sx:{"& .MuiFormControlLabel-root":{marginLeft:"0 !important",marginRight:"0 !important"},"& .MuiSwitch-root":{margin:"0 !important",marginTop:e.display==="legend"?0:`${t.spacing(1)} !important`}}})})}const iX=4,sX=ue(L.DateInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function aX(e){const[t,n]=E.useState(""),r=E.useCallback(o=>{const i=o.target.value;Or(i).year().toString().length>iX?o.target.value=t:n(i)},[t]);return f.jsx(dn,{...e,children:f.jsx(sX,{...e,onInput:r})})}const lX=ue(L.DateTimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function cX(e){return f.jsx(dn,{...e,children:f.jsx(lX,{})})}const uX=ue(L.FileInput,{slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}}));function dX({children:e=f.jsx(xE,{source:"",title:""}),title:t,...n}){const r=tn.useWatch({name:n.source}),o=L.useRecordContext(n),{source:i}=n,a=E.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const c=Ze.get(o,i);if(c){const u=c.split("__");return u.length>0?u[u.length-1]:c}return c},[o,i,r]);return f.jsx(dn,{...n,children:f.jsx(uX,{children:E.cloneElement(e,{...e.props,title:t||i,source:i,record:{...o,[i]:(r==null?void 0:r.title)||Ze.get(o,i),[`_${i}`]:(r==null?void 0:r.src)||Ze.get(o,`_${i}`),[t||i]:a}})})})}function fX({children:e=f.jsx(vE,{}),title:t,multiple:n=!1,...r}){const o=tn.useWatch({name:r.source}),i=L.useRecordContext(r),{source:a}=r;return L.useInput({source:`__image__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),f.jsx(dn,{...r,multiple:n,children:f.jsx(L.ImageInput,{accept:"image/*",children:E.cloneElement(e,{...e.props,title:t,source:a,record:{...i,[a]:(o==null?void 0:o.title)||Ze.get(i,a),[`_${a}`]:(o==null?void 0:o.src)||Ze.get(i,`_${a}`)}})})})}function hr(e){return f.jsx(dn,{...e,children:f.jsx(L.TextInput,{})})}const pX={vertical:"bottom",horizontal:"right"},hX={vertical:"top",horizontal:"right"};function gX({requiredAtLeastOneLocale:e,requiredLocale:t,validate:n,required:r,...o}){const{source:i}=o,a=q.useLocales(),c=E.useCallback((_="ra.validation.required",R="ra.validation.required_locale")=>N=>{if(e&&!t&&!qS(N,a))return _;if(t&&(!te.has(N,t)||te.isEmpty(te.get(N,t))))return{message:R,args:{locale:t}};if(!e&&r&&!Ju(N,a))return _},[e,t,a,r]),u=E.useMemo(()=>q.composeValidators(n,c()),[n,c]),{fieldState:d}=q.useInput({...o,validate:u}),{error:p}=d,g=tn.useWatch({name:i}),v=!Ju(g,a),[y]=q.useLocaleState(),[b,x]=E.useState(y),[w,A]=E.useState(null),j=!!w,T=E.useCallback(_=>A(j?null:_.currentTarget),[j,A]),P=E.useCallback(()=>A(null),[A]),O=E.useMemo(()=>te.map(a,(_,R)=>f.jsx(S.MenuItem,{onClick:()=>{x(_.locale),P()},children:f.jsx(S.ListItemText,{primary:`${_.locale.toUpperCase()}: ${(g??{})[_.locale]??""}`})},R)),[a,x,P,g]);return f.jsx(dn,{...o,validate:u,helperText:p!=null&&p.message?f.jsx(q.ValidationError,{error:p==null?void 0:p.message}):o==null?void 0:o.helperText,children:f.jsx(f.Fragment,{children:f.jsxs(S.Box,{flex:1,children:[te.map(a,(_,R)=>f.jsx(hr,{...o,source:`${i}.${_.locale}`,sx:{width:"100%",display:_.locale===b?"inline-flex":"none"},label:!1,helperText:!1,required:!1,InputProps:{endAdornment:f.jsx(S.Chip,{label:f.jsx(S.Typography,{variant:"button",children:b}),size:"small",onClick:T,color:v?"warning":void 0})}},R)),f.jsx(S.Menu,{anchorEl:w,open:j,anchorOrigin:pX,transformOrigin:hX,onClose:P,children:O})]})})})}const mX=ue(L.NumberInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function vX(e){return f.jsx(dn,{...e,children:f.jsx(mX,{})})}const yX=ue(L.RadioButtonGroupInput,{slot:"root"})(()=>({marginTop:"0 !important","& .MuiFormControlLabel-root":{marginLeft:-8}}));function bX(e){return f.jsx(dn,{...e,children:f.jsx(yX,{})})}function xX({source:e,minWidth:t=300,children:n}){const r=L.useResourceContext(),o=L.useRecordContext(),[i,a]=E.useState(Ze.get(o,e,"")),[c,u]=E.useState(!1),d=E.useCallback(b=>a(b.target.value),[]),p=L.useDataProvider(),g=E.useCallback(b=>{b.key==="Enter"&&(u(!0),p.update(r,{id:o.id,data:{...o,[e]:i,_changed:e},previousData:o}).then(()=>u(!1)))},[i,p,r,o,e]),v=E.useCallback(()=>{Ze.get(o,e)!==i&&(u(!0),p.update(r,{id:o.id,data:{...o,[e]:i,_changed:e},previousData:o}).then(()=>u(!1)))},[i,p,r,e,o]),y=E.useCallback(b=>{u(!0),p.update(r,{id:o.id,data:{...o,[e]:b,_changed:e},previousData:o}).then(()=>u(!1))},[p,r,e,o]);return E.useEffect(()=>a(Ze.get(o,e)),[o,e]),n?E.cloneElement(n,{...n.props,source:e,value:i,onChange:y}):f.jsx(S.TextField,{value:i,disabled:c,onChange:d,onKeyPress:g,onBlur:v,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})}function CX({children:e,...t}){const n=E.Children.only(e);return f.jsx(L.ReferenceArrayInput,{...t,children:E.cloneElement(n,{...t,source:n.props.source||t.source})})}function wX({children:e,...t}){const n=E.Children.only(e);return f.jsx(L.ReferenceInput,{...t,children:E.cloneElement(n,{...t,source:n.props.source||t.source})})}function SX({reference:e,target:t,children:n,filters:r,actions:o,...i}){return f.jsx(L.ResourceContextProvider,{value:e,children:f.jsx(wE,{perPage:5,pagination:f.jsx(L.Pagination,{}),...i,reference:e,target:t,children:f.jsxs(f.Fragment,{children:[f.jsx(L.ListToolbar,{filters:r,actions:o}),n]})})})}const EX=ue(L.SearchInput,{slot:"root"})(()=>({}));function TX(e){return f.jsx(EX,{...e})}const AX=ue(L.SelectArrayInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiFormLabel-root.MuiInputLabel-root":{marginTop:"-3px"},"& .MuiInputLabel-root.MuiInputLabel-shrink":{marginTop:0},"& .MuiOutlinedInput-input:has(.MuiChip-root)":{paddingTop:"4px",paddingBottom:"6px",paddingLeft:"6px"}}));function IX({optionText:e="name",optionValue:t="id",...n}){return f.jsx(dn,{...n,children:f.jsx(AX,{optionText:e,optionValue:t,options:{autoWidth:!1}})})}const OX=ue(L.SelectInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1||e===null?0:"auto"}}));function PX(e){return f.jsx(dn,{...e,children:f.jsx(OX,{})})}function jX({multiline:e=!1,...t}){var u,d;const n=L.useTranslate(),r=L.maxLength(t==null?void 0:t.maxLength,"app.input.max_length_error"),o=(d=(u=tn.useController({name:t==null?void 0:t.source}))==null?void 0:u.field)==null?void 0:d.value;let i=t.helperText,a=t.validate;a?Array.isArray(a)&&a.indexOf(r)===-1&&a.push(r):a=[r];const c=n("app.input.max_length_info",{count:(o==null?void 0:o.length)||0,max:t==null?void 0:t.maxLength});return t!=null&&t.maxLength&&(i=i&&i.length>0?`${c} - ${n(i)}`:c),f.jsx(hr,{...t,validate:a,helperText:i,multiline:e,inputProps:{maxLength:t==null?void 0:t.maxLength}})}function kX(e){if(!e)return"";const t=tE(e);return t?t.format("HH:mm"):""}function MX(e){return e}const FX=ue(L.TimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function _X({parse:e=MX,format:t=kX,...n}){return f.jsx(dn,{...n,children:f.jsx(FX,{parse:e,format:t,...n})})}function Vg({onSuccess:e,firstAccess:t}){const{spacing:n}=Cn(),[r,o]=E.useState(!1),i=q.useAuthProvider(),a=q.useTranslate(),c=q.useNotify(),u=E.useCallback(d=>{const{oldPassword:p,newPassword:g}=d;o(!0),i==null||i.changePassword(p,g).then(()=>{c("ra.auth.password_changed"),e()}).catch(v=>{c((v==null?void 0:v.message)||(v==null?void 0:v.toString()),{type:"error"})}).finally(()=>o(!1))},[i,e,c]);return f.jsx(q.ResourceContextProvider,{value:"user/change-password",children:f.jsx(q.EditContextProvider,{value:{record:{},resource:"user/change-password",save:u},children:f.jsx(Bg,{onSubmit:u,toolbar:f.jsx(Ho,{children:f.jsx(L.SaveButton,{disabled:r})}),children:f.jsxs(S.Grid,{container:!0,spacing:n,children:[t===!0&&f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Alert,{severity:"warning",children:[f.jsx(S.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsx(hr,{source:"oldPassword",type:"password",validate:q.required()})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsx(hr,{source:"newPassword",type:"password",validate:q.required()})})]})})})})}const SE=E.createContext({});function RX(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=L.useResourceContext(),o=L.useDataProvider(),{search:i}=ai.useLocation(),a=`${r}/new`,c=E.useCallback(()=>{if(!t||!te.isFunction(o.get))return Promise.resolve({});const v={};return new URLSearchParams(i??"").forEach((y,b)=>{v[b]=y}),o.get(a,v).then(y=>y.data).then(y=>{const{responseCode:b,value:x}=y;return b==="ok"?x:Promise.reject(y)})},[t,i,o,a]),u=E.useMemo(()=>te.chain(n).extend({queryKey:[r,i],queryFn:c}).value(),[r,i,c,n]),{data:d,isLoading:p}=Xi.useQuery(u),g=te.omit(e,["useDefaults"]);return p?f.jsx(S.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:f.jsx(S.CircularProgress,{})}):f.jsx(SE.Provider,{value:d??{},children:f.jsx(L.Create,{...g,children:e.children})})}const DX=ue(RX,{slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main":{marginTop:0},"& .RaCreate-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaCreate-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaCreate-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function LX(){return E.useContext(SE)}const BX=ue(L.Edit,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaEdit-main":{marginTop:0},"& .RaEdit-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaEdit-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function NX(e){return f.jsx(BX,{...e})}const VX=ue(S.CardHeader)(({theme:e})=>({marginTop:e.spacing(2.5),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),WX=ue(S.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`}));function zX({title:e,divider:t=!0,variant:n="h5"}){const r=L.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsx(VX,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t?f.jsx(WX,{}):null]})}function Wg(e){return e.id??e.label}function EE(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function UX(e){return te.map(e,"id")}function td(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function TE(e,t){const n=e!==void 0?td(e):0;return te.chain(t).filter(o=>e!==void 0?EE(e,o.id):!0).filter(o=>td(o.id)===n+1).value()}function HX(e,t){var i;const n=te.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return te.extend(n,{formRootPath:o});case"setSyncWithLocation":return te.extend(n,{syncWithLocation:o});case"setErrorCount":return te.extend(n,{errorCount:o});case"setActiveItem":return te.includes(UX(e.items),o)?te.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return te.extend(n,{items:te.chain(n.items).clone().reject(c=>c.id===a).concat([o]).orderBy(c=>c.index).value()})}case"removeItem":{const a=te.isString(o)?o:o.id,c=te.chain(n.items).clone().reject(u=>u.id===a).value();return te.extend(n,{items:c}),n.activeItem===a&&te.extend(n,{activeItem:((i=te.first(c))==null?void 0:i.id)??void 0}),n}default:return n}}const GX={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},AE=E.createContext(void 0);function IE(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=ai.useLocation(),[i,a]=E.useReducer(HX,te.cloneDeep(GX)),{formRootPath:c,items:u}=i,d=E.useMemo(()=>({state:i,dispatch:a}),[i,a]);return E.useEffect(()=>{const p=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&p.push(r);const g=te.chain(p).map(y=>ai.matchPath(y,o)).reject(y=>y===null).first().value(),v=g==null?void 0:g.pathnameBase;v!==void 0&&v!==c&&a({type:"setFormRootPath",payload:v})},[o,c,r]),E.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),E.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),E.useEffect(()=>{var p;if(t&&c!==void 0){let g=o.replace(c,"").replace(new RegExp(/^\/?/),"");te.isEmpty(g)&&(g=((p=te.chain(u).filter(v=>TE(v.id,u).length===0).orderBy([v=>td(v.id),v=>v.index]).first().value())==null?void 0:p.id)??void 0),a({type:"setActiveItem",payload:g})}},[a,c,o,u,t]),f.jsx(AE.Provider,{value:d,children:e.children})}function OE(){const e=E.useContext(AE);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function cl(){return OE().state}function zg(){return OE().dispatch}function PE(){return cl().formRootPath}function jE(){return cl().activeItem}function kE(){return cl().items}function ME(){return cl().syncWithLocation}function FE(){return cl().errorCount}function _E(){const e=zg();return E.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function RE(){const e=zg();return E.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function DE(){const e=zg();return E.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}const YX=ue(S.Grid,{name:"LongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root.RaToolbar-desktopToolbar":{marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,paddingTop:e.spacing(2.5),paddingBottom:e.spacing(2.5),[e.breakpoints.down("sm")]:{width:"auto !important",marginRight:0}},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingLeft:"0 !important",paddingRight:"0 !important",paddingBottom:"0 !important"},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function LE(e){const{spacing:t}=Cn(),{spacing:n=t}=e,r=te.omit(e,["spacing"]);return f.jsx(L.Form,{...r,className:"LongFormView",children:f.jsx(YX,{container:!0,spacing:n*2,children:e.children})})}function BE(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=te.omit(e,["disposition"]);return f.jsx(S.Grid,{...n,item:!0,...t,children:e.children})}function NE(e){const t=jE();return t===void 0?!1:e===t||EE(e,t)}function VE(e){const t=kE();return E.useMemo(()=>TE(e,t),[t,e])}function KX(){const e=PE(),{search:t}=ai.useLocation(),n=ai.useNavigate();return E.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n,t])}function WE(){const e=VE();return f.jsx(S.Card,{variant:"outlined",children:f.jsx(S.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:te.map(e,(t,n)=>f.jsx(Ug,{...t},n))})})}function Ug(e){const t=q.useTranslate()??te.identity,n=zE(e),{selected:r,label:o,icon:i,onClick:a,badge:c,items:u,isGroup:d,level:p,errors:g=0}=n,{spacing:v}=Cn(),[y,b]=E.useState(r),x=E.useCallback(j=>{b(!y),a(j)},[a,y]),w=i!==void 0,A=te.omit(e,["label","icon","selected","badge"]);return E.useEffect(()=>{r&&!y&&b(r)},[r,y,b]),f.jsxs(f.Fragment,{children:[f.jsx(S.ListItem,{...A,disablePadding:!0,children:f.jsxs(S.ListItemButton,{selected:r?!d:null,onClick:x,sx:{pl:v*p},children:[w?f.jsx(S.ListItemIcon,{children:i}):null,f.jsx(S.ListItemText,{inset:!w,primary:g===0?t(o):f.jsx(S.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),c?f.jsx(S.ListItemAvatar,{children:f.jsx(Xc,{type:"filled",size:"xs",color:c.color??"default",children:c.content})}):null,d?y?f.jsx(en.ExpandLess,{}):f.jsx(en.ExpandMore,{}):null]})}),d?f.jsx(S.Collapse,{in:y,timeout:"auto",children:f.jsx(S.List,{children:te.map(u,(j,T)=>f.jsx(Ug,{...j},T))})}):null]})}function zE(e){const{id:t}=e,n=NE(t),r=td(t),o=KX(),i=ME(),a=_E(),c=VE(t),u=!te.isEmpty(c),d=E.useCallback(g=>{u||(i?o(e.id):a(e.id)),te.isFunction(e.onClick)&&e.onClick(g)},[a,o,e,i,u]);return E.useMemo(()=>({...e,selected:n,onClick:d,items:c,isGroup:u,level:r}),[e,n,d,c,u,r])}var XX=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},UE=e=>e.firstChild?e.firstChild.offsetParent===e:!0,ZX=(e,t)=>{let n=e,r=0;UE(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},QX=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},ul=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?ul="sticky":CSS.supports("position","-webkit-sticky")&&(ul="-webkit-sticky"));var nd=!1;try{const e=Object.defineProperty({},"passive",{get(){nd={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var Hg=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const i=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),a=o(i()),c=()=>{Object.assign(a,o(i())),n()};return window.addEventListener("resize",c,nd),r.push(()=>window.removeEventListener("resize",c)),a}else{const i=o(t.getBoundingClientRect()),a=()=>{Object.assign(i,o(t.getBoundingClientRect())),n()},c=new ResizeObserver(a);return c.observe(t),r.push(()=>c.disconnect()),i}},JX=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},qX=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:i}=n,a=XX(e);let c=!1;const u=()=>{c||requestAnimationFrame(()=>{const R=g();R!==T&&P(R),c=!1}),c=!0};let d=a===window?window.scrollY:a.scrollTop;const p=R=>{const{offsetTop:N,height:Y}=y,{naturalTop:X}=w,{height:G}=A;return R+N+Y>=X+G+j+o},g=()=>{const{height:R}=y,{height:N}=A;return N+i+o<=R?3:p(d)?1:2},v=a!==window&&UE(a),y=Hg({el:a,onChange:u,unsubs:t,measure:({height:R,top:N})=>({height:R,offsetTop:v?N:0})}),b=QX(e),x=b===window?{top:0,bottom:0}:JX(b),w=Hg({el:b,onChange:u,unsubs:t,measure:({height:R})=>({height:R-x.top-x.bottom,naturalTop:b===window?0:ZX(b,a)+x.top+y.offsetTop})}),A=Hg({el:e,onChange:u,unsubs:t,measure:({height:R})=>({height:R})});let j=0,T=g();const P=R=>{const N=T;if(T=R,N===2&&(j=-1),R===3){e.style.position=ul,r?e.style.bottom=`${o}px`:e.style.top=`${i}px`;return}const{height:Y,offsetTop:X}=y,{height:G,naturalTop:re}=w,{height:ne}=A;if(R===2)if(e.style.position="relative",j=N===0?Math.max(0,X+d-re+i):Math.max(0,X+d+Y-(re+ne+o)),r){const Z=Math.max(0,G-ne-j);e.style.bottom=`${Z}px`}else e.style.top=`${j}px`;else e.style.position=ul,R===1?r?e.style.bottom=`${o}px`:e.style.top=`${Y-ne-o}px`:r?e.style.bottom=`${Y-ne-o}px`:e.style.top=`${i}px`};P(T);const O=R=>{if(R===d)return;const N=R-d;if(d=R,T===3)return;const{offsetTop:Y,height:X}=y,{naturalTop:G,height:re}=w,{height:ne}=A;if(N>0)if(T===0){if(R+Y+i>G){const Z=Math.max(0,Y+d-G+i);R+Y+X<=G+ne+Z+o?P(2):P(1)}}else T===2&&p(R)&&P(1);else if(T===1){if(Y+R+X<G+re+o){const Z=Math.max(0,Y+d+X-(G+ne+o));Y+R+i>=G+Z?P(2):P(0)}}else T===2&&Y+R+i<G+j&&P(0)},_=a===window?()=>O(window.scrollY):()=>O(a.scrollTop);a.addEventListener("scroll",_,nd),a.addEventListener("mousewheel",_,nd),t.push(()=>a.removeEventListener("scroll",_),()=>a.removeEventListener("mousewheel",_))},$X=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=E.useState(null);return E.useEffect(()=>{if(!r||!ul)return;const i=[];return qX(r,i,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{i.forEach(a=>a())}},[r,t,e,n]),o},eZ=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:i,style:a}=e,c=$X({offsetTop:t,offsetBottom:n,bottom:r});return f.jsx("div",{className:i,style:a,ref:c,children:o})},tZ=eZ,HE=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(HE||{});function GE(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=te.omit(e,["sticky","disposition","spacing"]),i=t?tZ:S.Box,a=E.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return f.jsx(S.Grid,{...o,item:!0,...n,children:f.jsx(i,{...a,children:f.jsx(S.Stack,{spacing:r,children:e.children})})})}function YE(e){return f.jsx(f.Fragment,{children:e.children})}function KE(e){const{children:t}=e;return E.useMemo(()=>{const r={top:[],bottom:[]};return E.Children.forEach(t,o=>{if(E.isValidElement(o)&&(o==null?void 0:o.type)===YE){const{position:i}=o.props;switch(i){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function XE(e){const{errors:t}=tn.useFormState(),n=FE(),{label:r,icon:o,badge:i,index:a=0,children:c}=e,u=Wg(e),d=RE(),p=DE(),g=NE(u),v=[];n&&(e.sources!==void 0?v.push(...e.sources):qu(c,b=>{var x;((x=b==null?void 0:b.props)==null?void 0:x.source)!==void 0&&v.push(b.props.source)}));const y=te.chain(v).uniq().map(b=>te.get(t,b)).reject(b=>b===void 0).value().length;return E.useEffect(()=>{d({id:u,index:a,label:r,icon:o,badge:i,errors:y})},[d,p,r,o,u,i,a,y]),E.useEffect(()=>()=>{p(u)},[u,p]),f.jsx(S.Box,{display:g?"unset":"none",children:e.children})}function ZE(e){const t=Gg(e),n=Wg(e);return f.jsx(XE,{...e,id:n,children:E.Children.map(t,r=>{const o=Wg(r.props);return E.cloneElement(r,{id:`${n}.${o}`})})})}function QE(e){return f.jsx(XE,{...e})}function Gg(e){const{children:t}=e;return E.useMemo(()=>te.chain(E.Children.toArray(t)).filter(r=>E.isValidElement(r)&&((r==null?void 0:r.type)===QE||(r==null?void 0:r.type)===ZE)).map((r,o)=>E.cloneElement(r,{index:o})).value(),[t])}function nZ(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=te.pick(e,["syncWithLocation","errorCount"]),i=te.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:c}=KE(e),u=Gg(e);return f.jsx(IE,{...o,children:f.jsxs(LE,{...i,spacing:r,children:[f.jsxs(GE,{disposition:t,spacing:r,children:[a,f.jsx(WE,{}),c]}),f.jsx(BE,{disposition:n,children:u})]})})}const _t=nZ;_t.BaseForm=LE,_t.Content=BE,_t.Provider=IE,_t.useItems=kE,_t.useSyncWithLocation=ME,_t.useErrorCount=FE,_t.useFormRootPath=PE,_t.useActiveItem=jE,_t.useSetActiveItem=_E,_t.useAddItem=RE,_t.useRemoveItem=DE,_t.Sidebar=GE,_t.SidebarSection=YE,_t.SidebarSectionPosition=HE,_t.useSidebarChildren=KE,_t.NavMenu=WE,_t.NavMenuItem=Ug,_t.useNavMenuItem=zE,_t.Tab=QE,_t.Group=ZE,_t.useBaseItemChildren=Gg;const rZ=ue(L.Show,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}}));function oZ(e){return f.jsx(rZ,{...e})}const iZ=ue(L.SimpleFormIterator,{root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}}));function sZ(e){return f.jsx(iZ,{...e})}const aZ=Na(L.TabbedForm,{slot:"Root"})(({theme:e})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:0},[e.breakpoints.down("sm")]:{paddingBottom:0,"& .MuiTableContainer-root":{paddingBottom:e.spacing(1)}}}));function lZ({children:e}){return f.jsx(f.Fragment,{children:e})}function Yg(e){const{title:t,modal:n,content:r,subheader:o,secondary:i=f.jsx(No,{children:f.jsx(ll,{})}),sx:a,noPadding:c,toolbar:u=f.jsx(Ho,{children:f.jsx(L.SaveButton,{type:"button"})}),...d}=e,p=Fg(t),g=S.useTheme();return f.jsx(On,{title:p,modal:n,content:r,subheader:o,secondary:i,sx:{...a,"& .MuiTabs-root":{m:2.5,mb:0},"& .tabbed-form > .MuiDivider-root":{ml:2.5,mr:2.5},"& .MuiToolbar-root.RaToolbar-desktopToolbar":{paddingTop:n?g.spacing(2.5):0},"& .MuiToolbar-root":{padding:g.spacing(2.5),borderTop:n?`1px solid ${g.palette.divider}`:void 0}},border:!n,divider:!0,children:f.jsx(aZ,{toolbar:u,component:c?lZ:void 0,...d})})}function cZ({children:e,...t}){return f.jsx(L.TabbedForm.Tab,{...t,children:f.jsx(S.Box,{sx:{width:"100%",p:2.5},children:e})})}Yg.Tab=L.TabbedForm.Tab,Yg.TabStack=cZ;function Kg(e){const{label:t,disableAdd:n,onClick:r,inset:o}=e,i=S.useTheme(),a=i.palette.mode==="dark"?i.palette.grey.A400:i.palette.grey.A800,c=i.palette.mode==="light"?"#000000":"#FFFFFF";return f.jsxs(S.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:o?{p:2.5}:{pt:2},children:[t!==!1&&f.jsx(S.Typography,{children:t}),!n&&(E.isValidElement(e==null?void 0:e.customButton)?E.cloneElement(e==null?void 0:e.customButton,{onClick:r}):f.jsx(S.IconButton,{color:"secondary",sx:{border:`1px solid ${a}`},onClick:r,children:f.jsx(Ue.PlusCircleOutlined,{style:{color:c}})}))]})}const Xg=E.createContext(void 0);function JE(){return E.useContext(Xg)}function rd(e){const{children:t}=e,{item:n,index:r}=JE(),[o,i]=E.useState(!1),{update:a}=L.useArrayInput(),c=L.useTranslate(),u=E.useCallback(d=>(i(!1),a(r,d),Promise.resolve()),[r,a]);return f.jsxs(f.Fragment,{children:[f.jsx(S.Button,{color:"primary",onClick:()=>i(!0),sx:{justifyContent:"flex-start"},children:c("ra.action.edit")}),f.jsx(S.Dialog,{open:o,onClose:()=>i(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(L.EditContextProvider,{value:{record:n,save:u},children:t})})]})}function qE({source:e,children:t}){const n=E.Children.only(t),{getValues:r}=tn.useFormContext(),o=L.useRecordContext({record:r()});return E.isValidElement(n)?E.cloneElement(n,{source:e,record:o}):null}function Zg(e){const{label:t,disableAdd:n,inset:r,source:o,template:i}=e,[a,c]=E.useState(!1),{append:u}=L.useArrayInput(),d=E.useCallback(()=>{c(g=>!g)},[c]),p=E.useCallback(g=>(c(!1),u(g),Promise.resolve()),[c,u]);return f.jsxs(f.Fragment,{children:[E.cloneElement(f.jsx(Kg,{}),{label:t,source:o,disableAdd:n,template:i,onClick:d,inset:r}),f.jsx(S.Dialog,{open:a,onClose:d,maxWidth:"xs",children:f.jsx(q.CreateContextProvider,{value:{save:p},children:e.children})})]})}const Qg=E.createContext(void 0);function $E(){return E.useContext(Qg)}const eT=D.forwardRef((e,t)=>{const{children:n,disabled:r,disableRemove:o=!1,index:i,member:a,resource:c,record:u}=e,d=L.useTranslate(),[p,g]=D.useState(!1),{total:v,remove:y}=$E(),b=D.useCallback(()=>{g(!1),y(i)},[i,y]),x=E.useMemo(()=>({index:i,total:v,item:u,remove:()=>y(i)}),[i,v,y,u]),w=E.useMemo(()=>E.Children.map(n,A=>E.isValidElement(A)&&(A==null?void 0:A.type)===rd&&D.isValidElement(A)?A:null),[n]);return f.jsxs(Xg.Provider,{value:x,children:[E.Children.map(n,(A,j)=>{if(A.type===rd||!E.isValidElement(A))return null;const{source:T,...P}=A.props;return f.jsx(S.TableCell,{children:E.cloneElement(A,{source:T?`${a}.${T}`:a,index:T?void 0:j,resource:c,disabled:r,...P,label:""})})}),!o&&f.jsx(S.TableCell,{children:f.jsx(S.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:f.jsxs(No,{horizontal:!0,children:[f.jsx(S.Button,{onClick:()=>g(!0),color:"error",sx:{justifyContent:"flex-start"},children:d("ra.action.delete")}),w]})})}),o&&w?f.jsx(S.TableCell,{children:f.jsx(S.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:f.jsx(No,{horizontal:!0,children:w})})}):null,n.length>0&&f.jsx(L.Confirm,{isOpen:p,title:d("ra.action.remove_item"),content:d("ra.message.remove_item"),onConfirm:b,onClose:()=>g(!1)})]})});function uZ(e){var $,W;const{children:t,resource:n,source:r,label:o,disableAdd:i=!1,disableRemove:a=!1,enableClearAll:c=!1,className:u,empty:d,template:p={},addButton:g=f.jsx(Kg,{}),inset:v,sx:y}=e,[b,x]=E.useState(!1),{fields:w,remove:A,replace:j,append:T}=L.useArrayInput(e),{resetField:P}=tn.useFormContext(),O=pt(),_=q.useTranslate(),R=E.useRef(p||{}),N=q.useTranslateLabel(),Y=E.useCallback(ie=>{A(ie)},[A]);if(w.length>0){const{...ie}=w[0];R.current=ie;for(const U in R.current)R.current[U]=null}const X=E.useCallback((ie=void 0)=>{let U=ie;ie==null&&(U=R.current,E.Children.count(t)===1&&D.isValidElement(E.Children.only(t))&&!E.Children.only(t).props.source&&E.Children.map(t,de=>D.isValidElement(de)&&de.type!==q.FormDataConsumer).some(Boolean)?U="":(U=U||{},E.Children.forEach(t,de=>{D.isValidElement(de)&&de.type!==q.FormDataConsumer&&de.props.source&&(U[de.props.source]=de.props.defaultValue??null)})));const ee={...U,...p};T(ee),P(`${r}.${w.length}`,{defaultValue:U})},[T,t,P,r,w.length,p]);function G(ie){return U=>{X(),ie&&ie(U)}}const re=E.useCallback(()=>{j([]),x(!1)},[j]),ne=E.useMemo(()=>({total:w.length,remove:Y,source:r}),[w.length,Y,r]),Z=O.palette.mode==="dark"?O.palette.grey.A400:O.palette.grey.A800,J=w.length>0&&c,V=v===!0?{borderRadius:0,borderBottom:`1px solid ${O.palette.divider}`}:{mt:2,border:`1px solid ${Z}`,boxShadow:O.customShadows.z0};return w?f.jsx(Qg.Provider,{value:ne,children:f.jsxs("div",{className:u,children:[D.cloneElement(g,{label:o,source:r,disableAdd:i,template:p,onClick:(g==null?void 0:g.type)!==Zg?G((W=($=e==null?void 0:e.addButton)==null?void 0:$.props)==null?void 0:W.onClick):void 0,inset:v}),f.jsx(S.TableContainer,{component:S.Paper,sx:{...V,boxShadow:O.customShadows.z0,...y},children:f.jsxs(S.Table,{size:"small",children:[f.jsx(S.TableHead,{sx:v===!0?{}:{borderTop:0,borderBottom:`1px solid ${Z}`},children:f.jsxs(S.TableRow,{children:[E.Children.map(t,(ie,U)=>{if(ie.type===rd||!D.isValidElement(ie))return null;const ee=f.jsx(S.Typography,{display:"flex",variant:"subtitle1",color:"text.primary",textTransform:"none",children:N({...ie.props,resource:n})});return f.jsx(S.TableCell,{children:ie.props.title?f.jsx(fu,{title:ie.props.title,arrow:!0,children:ee}):ee},U)}),!a&&J?f.jsx(S.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:f.jsx(No,{horizontal:!0,children:f.jsx(S.Typography,{color:"error",onClick:()=>x(!0),children:_("ra.action.delete")})})},"actions"):f.jsx(S.TableCell,{},"empty_actions")]})}),f.jsxs(S.TableBody,{children:[w.length===0&&f.jsx(S.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:f.jsx(S.TableCell,{colSpan:4+(a?0:1),align:"center",children:d||f.jsx(S.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),w.length>0&&w.map((ie,U)=>f.jsx(S.TableRow,{sx:{borderBottom:0},children:f.jsx(eT,{disableRemove:a,index:U,member:`${r}.${U}`,onRemoveField:Y,record:w&&w[U]||{},resource:n,source:r,children:t})},ie.id))]})]})}),w.length>0&&f.jsx(L.Confirm,{isOpen:b,title:_("ra.action.clear_array_input"),content:_("ra.message.clear_array_input"),onConfirm:re,onClose:()=>x(!1)})]})}):null}const od=ue(uZ,{slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8.25)})`}},[e.breakpoints.down("sm")]:{"& .MuiTableRow-root:last-child":{borderBottom:0}}}));od.CreateButton=Zg,od.EditButton=rd,od.Field=qE;const tT=E.createContext(void 0);function id(){const e=E.useContext(tT);if(!e)throw new Error("useWizardFormContext must be used within a WizardFormProvider");return e}function dZ({value:e,children:t}){return f.jsx(tT.Provider,{value:e,children:t})}function fZ({cancelButton:e,...t}){const{hasNextStep:n,hasPreviousStep:r,goToNextStep:o,goToPreviousStep:i}=id(),a=q.useTranslate(),{handleSubmit:c}=tn.useFormContext(),u=E.useCallback(()=>{o()},[o]);return f.jsxs(Ho,{...t,children:[f.jsx(S.Box,{sx:{"& .MuiButtonBase-root":{ml:0}},children:e?E.cloneElement(e):null}),f.jsx(S.Box,{sx:{flex:"1 1 auto"}}),r()&&f.jsx(S.Button,{variant:"text",color:"primary",onClick:i,children:a("ra.action.back")}),n()?f.jsx(S.Button,{variant:"contained",color:"primary",onClick:c(u),children:a("ra.action.next")}):f.jsx(L.SaveButton,{})]})}const pZ=S.styled(S.Stepper,{shouldForwardProp:e=>e!=="isHorizontal"})(({theme:e,isHorizontal:t})=>({paddingBottom:e.spacing(2),display:"flex",justifyContent:t?"space-between":"flex-start",".MuiStep-root":{flex:t?1:"none",maxWidth:t?"none":"100%",display:"flex",justifyContent:t?"center":"flex-start"},".MuiStepConnector-line.MuiStepConnector-lineVertical":{minHeight:12},".MuiStepConnector-vertical":{marginLeft:14.5},".MuiStepConnector-horizontal":{marginLeft:-10}})),hZ=S.styled(S.Box)(({theme:e,ownerState:t})=>({backgroundColor:t.error?e.palette.error.main:t.completed||t.active?e.palette.primary.main:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[400],zIndex:1,color:e.palette.common.white,width:30,height:30,display:"flex",borderRadius:"50%",justifyContent:"center",alignItems:"center"}));function gZ({completed:e,active:t,error:n,icon:r,className:o}){return f.jsx(hZ,{ownerState:{completed:e,active:t,error:n},className:o,children:n?"!":r})}function mZ({isHorizontal:e,setCurrentStep:t,stepFields:n}){const{currentStep:r,steps:o}=id(),{errors:i}=tn.useFormState();function a(c){c<=r&&t(c)}return f.jsx(pZ,{activeStep:r,orientation:e?"horizontal":"vertical",isHorizontal:e,sx:{p:3,mt:1},children:o.map((c,u)=>{const d=n[u].some(v=>te.get(i,v)),{label:p,icon:g}=c.props;return f.jsx(S.Step,{children:f.jsx(S.StepLabel,{StepIconComponent:gZ,error:d,icon:g,onClick:()=>a(u),style:{cursor:u<=r?"pointer":"default"},children:e?null:p})},u)})})}function vZ({title:e,subheader:t,secondary:n,toolbar:r,progress:o,isSmall:i,modal:a,sx:c,setCurrentStep:u}){const{currentStep:d,steps:p}=id(),g=L.useTranslate(),v=S.useTheme(),y=i||a,b=E.useMemo(()=>r?E.Children.toArray(r.props.children).find(w=>{var A;return E.isValidElement(w)&&w.type===S.Button&&((A=w.props)==null?void 0:A.children)===g("ra.action.cancel")}):null,[r,g]),x=p.map(w=>{const A=[],{sources:j}=w.props;return j!==void 0?A.push(...j):qu(w,T=>{var P;((P=T==null?void 0:T.props)==null?void 0:P.source)!==void 0&&A.push(T.props.source)}),A});return f.jsxs(S.Grid,{container:!0,spacing:2,sx:c,children:[f.jsx(S.Grid,{item:!0,xl:a?12:2,lg:a?12:3,md:a?12:3,sm:a?12:4,xs:12,children:o||f.jsx(mZ,{isHorizontal:y,setCurrentStep:u,stepFields:x})}),a?f.jsx(S.Divider,{sx:{width:"100%"}}):null,f.jsx(S.Grid,{item:!0,xl:a?12:10,lg:a?12:9,md:a?12:9,sm:a?12:8,xs:12,sx:{paddingTop:a?"0 !important":null},children:f.jsxs(On,{title:e||p[d].props.label,subheader:t,secondary:n,border:!a,divider:!0,children:[f.jsx(S.Box,{children:p[d]}),f.jsx(S.Box,{sx:{"& .MuiToolbar-root":{paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:v.spacing(2)}},children:r&&!b?r:f.jsx(fZ,{cancelButton:b})})]})})]})}const yZ=S.styled(L.Form,{shouldForwardProp:e=>e!=="modal"})(({theme:e,modal:t})=>({[e.breakpoints.down("sm")]:t?{}:{paddingBottom:`${e.spacing(2.5)}`}}));function nT({children:e,toolbar:t,progress:n,title:r,subheader:o=null,secondary:i=null,sx:a,modal:c=!1,...u}){const[d,p]=E.useState(0),g=E.Children.toArray(e),v=S.useMediaQuery(j=>j.breakpoints.down("sm"));function y(){return d<g.length-1}function b(){return d>0}function x(){p(j=>Math.min(j+1,g.length-1))}function w(){p(j=>Math.max(j-1,0))}const A={currentStep:d,steps:g,hasNextStep:y,hasPreviousStep:b,goToNextStep:x,goToPreviousStep:w};return f.jsx(dZ,{value:A,children:f.jsx(yZ,{...u,modal:c,children:f.jsx(vZ,{title:r,subheader:o,secondary:i,modal:c,sx:a,toolbar:t,progress:n,isSmall:v,setCurrentStep:p})})})}function bZ({children:e}){return f.jsx(f.Fragment,{children:e})}nT.Step=bZ;function xZ(e,t){const n=te.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const i=te.chain(n.media).clone().extend(o).value();return te.extend(n,{media:i})}case"updateDrawer":{const i=te.chain(n.drawer).clone().extend(o).value();return te.extend(n,{drawer:i})}case"updateLogo":{const i=te.chain(n.logo).clone().extend(o).value();return te.extend(n,{logo:i})}case"updateNotifications":{const i=te.chain(n.notifications).clone().extend(o).value();return te.extend(n,{notifications:i})}case"updateTheme":{const i=te.chain(n.theme).clone().extend(o).value();return te.extend(n,{theme:i})}default:return n}}const CZ={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},rT=E.createContext(void 0);function oT(e){var X;const t=q.useAuthProvider(),n=q.useGetIdentity(),r=S.useTheme(),o=S.useMediaQuery(r.breakpoints.down("md")),i=S.useMediaQuery(r.breakpoints.down("lg")),a=S.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:c,isHorizontalLayout:u,themeDirection:d,drawerWidth:p}=Dg(),g=u(d)&&!i,{drawerOpen:v,openDrawer:y}=zu(),b=E.useCallback(()=>{y(!v)},[v,y]),[x,w]=E.useState(!1),[A,j]=E.useReducer(xZ,te.chain(CZ).clone().merge({drawer:{open:!c||v}}).value()),T=E.useCallback(()=>w(!1),[]),P=E.useMemo(()=>({state:A,dispatch:j}),[A,j]),{logoIcon:O,logoMain:_,enableNotification:R,notification:N}=e,Y=L.useLoading();return E.useEffect(()=>{j({type:"updateMedia",payload:{downMd:o,downLg:i,downXl:a,horizontal:g}})},[o,i,a,g]),E.useEffect(()=>{j({type:"updateDrawer",payload:{open:v,width:p,handleDrawerToggle:b}})},[v,p,b]),E.useEffect(()=>{c||y(!a)},[a,c]),E.useEffect(()=>{j({type:"updateLogo",payload:{main:_,icon:O}})},[O,_]),E.useEffect(()=>{j({type:"updateNotifications",payload:{enable:R,resource:N??"entities/notification"}})},[R,N]),E.useEffect(()=>{j({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),E.useEffect(()=>{if(!Y){if(!t.isImpersonating){console.warn("authProvider does not contain a method called isImpersonating",t);return}t==null||t.isImpersonating().then(G=>{var re;w(!G&&((re=n==null?void 0:n.data)==null?void 0:re.needToChangePassword)===!0)})}},[(X=n==null?void 0:n.data)==null?void 0:X.needToChangePassword,t,Y]),f.jsxs(rT.Provider,{value:P,children:[f.jsx(S.Dialog,{open:x,maxWidth:"xs",fullWidth:!0,children:f.jsx(Vg,{onSuccess:T,firstAccess:!0})}),e.children]})}function iT(e){return E.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:i,notification:a}=t;return f.jsx(oT,{logoIcon:r,logoMain:o,enableNotification:i,notification:a,children:f.jsx(e,{ref:n,...t})})})}function Jg(){const e=E.useContext(rT);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function wZ(){return Jg().dispatch}function Rs(){return Jg().state}function Gn(){return Rs().media}function Oi(){return Rs().drawer}function sT(){return Rs().logo}function sd(){return Rs().notifications}function SZ(){return Rs().theme}function aT(e){const{width:t}=Oi(),{horizontal:n}=Gn(),{container:r}=Cn(),[o,i]=E.useState(null);function a(u,d){i(d)}const c=pt();return f.jsx(zU,{onError:a,fallbackRender:({error:u,resetErrorBoundary:d})=>f.jsx(vg,{error:u,errorComponent:e.error,errorInfo:o,resetErrorBoundary:d}),children:f.jsx(E.Suspense,{fallback:f.jsx(Xw,{}),children:f.jsxs(S.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[f.jsx(S.Toolbar,{sx:{mt:n?8:"inherit"}})," ",f.jsx(S.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column",[c.breakpoints.down("sm")]:{px:"12px"}},children:e.children})]})})})}const lT=ue(S.Box,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({...e.mixins.toolbar,display:"flex",alignItems:"center",justifyContent:t?"flex-start":"center",paddingLeft:e.spacing(t?3:0)}));function cT({isIcon:e,sx:t,to:n,logoIcon:r,logoMain:o}){const{appDefaultPath:i}=Cn();return f.jsx(S.ButtonBase,{disableRipple:!0,component:ut.Link,to:n||i,sx:t,children:e?r:o})}function uT(e){const t=S.useTheme(),{horizontal:n}=Gn(),{open:r}=Oi(),{icon:o,main:i}=sT(),a=Ir(e,{minHeight:n?"unset":"60px",width:n?{xs:"100%",lg:"424px"}:"inherit",paddingTop:n?{xs:"10px",lg:"0"}:"8px",paddingBottom:n?{xs:"18px",lg:"0"}:"8px",paddingLeft:n?{xs:"24px",lg:"0"}:r?"24px":0});return f.jsx(lT,{theme:t,open:r,sx:a,children:f.jsx(cT,{to:"/",isIcon:!r,sx:{width:r?"auto":35,height:35},logoMain:i,logoIcon:o})})}function dT(e,t){return{width:t,borderRight:`1px solid ${e.palette.divider}`,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden",boxShadow:e.palette.mode==="dark"?e.customShadows.z1:"none"}}function fT(e){return{transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:e.spacing(7.5),borderRight:"none",boxShadow:e.customShadows.z1}}const EZ=ue(S.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Cn();return{width:n,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...dT(e,n),"& .MuiDrawer-paper":dT(e,n)},...!t&&{...fT(e),"& .MuiDrawer-paper":fT(e)}}});var Te={},qg={exports:{}};(function(e,t){(function(n,r){var o="1.0.39",i="",a="?",c="function",u="undefined",d="object",p="string",g="major",v="model",y="name",b="type",x="vendor",w="version",A="architecture",j="console",T="mobile",P="tablet",O="smarttv",_="wearable",R="embedded",N=500,Y="Amazon",X="Apple",G="ASUS",re="BlackBerry",ne="Browser",Z="Chrome",J="Edge",V="Firefox",$="Google",W="Huawei",ie="LG",U="Microsoft",ee="Motorola",de="Opera",ge="Samsung",fe="Sharp",he="Sony",me="Xiaomi",Se="Zebra",be="Facebook",ye="Chromium OS",we="Mac OS",Ie=" Browser",pe=function(_e,Le){var Oe={};for(var Ce in _e)Le[Ce]&&Le[Ce].length%2===0?Oe[Ce]=Le[Ce].concat(_e[Ce]):Oe[Ce]=_e[Ce];return Oe},Ke=function(_e){for(var Le={},Oe=0;Oe<_e.length;Oe++)Le[_e[Oe].toUpperCase()]=_e[Oe];return Le},ve=function(_e,Le){return typeof _e===p?$e(Le).indexOf($e(_e))!==-1:!1},$e=function(_e){return _e.toLowerCase()},gn=function(_e){return typeof _e===p?_e.replace(/[^\d\.]/g,i).split(".")[0]:r},It=function(_e,Le){if(typeof _e===p)return _e=_e.replace(/^\s\s*/,i),typeof Le===u?_e:_e.substring(0,N)},bt=function(_e,Le){for(var Oe=0,Ce,gt,Xt,We,Pe,sn;Oe<Le.length&&!Pe;){var vr=Le[Oe],jr=Le[Oe+1];for(Ce=gt=0;Ce<vr.length&&!Pe&&vr[Ce];)if(Pe=vr[Ce++].exec(_e),Pe)for(Xt=0;Xt<jr.length;Xt++)sn=Pe[++gt],We=jr[Xt],typeof We===d&&We.length>0?We.length===2?typeof We[1]==c?this[We[0]]=We[1].call(this,sn):this[We[0]]=We[1]:We.length===3?typeof We[1]===c&&!(We[1].exec&&We[1].test)?this[We[0]]=sn?We[1].call(this,sn,We[2]):r:this[We[0]]=sn?sn.replace(We[1],We[2]):r:We.length===4&&(this[We[0]]=sn?We[3].call(this,sn.replace(We[1],We[2])):r):this[We]=sn||r;Oe+=2}},Zn=function(_e,Le){for(var Oe in Le)if(typeof Le[Oe]===d&&Le[Oe].length>0){for(var Ce=0;Ce<Le[Oe].length;Ce++)if(ve(Le[Oe][Ce],_e))return Oe===a?r:Oe}else if(ve(Le[Oe],_e))return Oe===a?r:Oe;return Le.hasOwnProperty("*")?Le["*"]:_e},Ot={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},xt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},qt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[y,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[y,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[y,w],[/opios[\/ ]+([\w\.]+)/i],[w,[y,de+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[w,[y,de+" GX"]],[/\bopr\/([\w\.]+)/i],[w,[y,de]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[w,[y,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[y,w],[/quark(?:pc)?\/([-\w\.]+)/i],[w,[y,"Quark"]],[/\bddg\/([\w\.]+)/i],[w,[y,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[y,"UC"+ne]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[w,[y,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[y,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[y,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[y,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[w,[y,"Smart Lenovo "+ne]],[/(avast|avg)\/([\w\.]+)/i],[[y,/(.+)/,"$1 Secure "+ne],w],[/\bfocus\/([\w\.]+)/i],[w,[y,V+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[y,de+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[y,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[y,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[y,de+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[y,"MIUI "+ne]],[/fxios\/([-\w\.]+)/i],[w,[y,V]],[/\bqihu|(qi?ho?o?|360)browser/i],[[y,"360"+Ie]],[/\b(qq)\/([\w\.]+)/i],[[y,/(.+)/,"$1Browser"],w],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[y,/(.+)/,"$1"+Ie],w],[/samsungbrowser\/([\w\.]+)/i],[w,[y,ge+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[y,/_/g," "],w],[/metasr[\/ ]?([\d\.]+)/i],[w,[y,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[y,"Sogou Mobile"],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[y,w],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[y],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[y,be],w],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[y,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[y,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[y,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[y,Z+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[y,Z+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[y,"Android "+ne]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[y,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[y,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,y],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[y,[w,Zn,Ot]],[/(webkit|khtml)\/([\w\.]+)/i],[y,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[y,"Netscape"],w],[/(wolvic)\/([\w\.]+)/i],[y,w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[y,V+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[y,[w,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[y,[w,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,$e]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,i,$e]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,$e]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[v,[x,ge],[b,P]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[v,[x,ge],[b,T]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[v,[x,X],[b,T]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[v,[x,X],[b,P]],[/(macintosh);/i],[v,[x,X]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[v,[x,fe],[b,T]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[v,[x,W],[b,P]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[v,[x,W],[b,T]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[v,/_/g," "],[x,me],[b,T]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[v,/_/g," "],[x,me],[b,P]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[v,[x,"OPPO"],[b,T]],[/\b(opd2\d{3}a?) bui/i],[v,[x,"OPPO"],[b,P]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[v,[x,"Vivo"],[b,T]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[v,[x,"Realme"],[b,T]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[v,[x,ee],[b,T]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[v,[x,ee],[b,P]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[v,[x,ie],[b,P]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[v,[x,ie],[b,T]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[v,[x,"Lenovo"],[b,P]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[v,/_/g," "],[x,"Nokia"],[b,T]],[/(pixel c)\b/i],[v,[x,$],[b,P]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[v,[x,$],[b,T]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[v,[x,he],[b,T]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[v,"Xperia Tablet"],[x,he],[b,P]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[v,[x,"OnePlus"],[b,T]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[v,[x,Y],[b,P]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[v,/(.+)/g,"Fire Phone $1"],[x,Y],[b,T]],[/(playbook);[-\w\),; ]+(rim)/i],[v,x,[b,P]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[v,[x,re],[b,T]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[v,[x,G],[b,P]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[v,[x,G],[b,T]],[/(nexus 9)/i],[v,[x,"HTC"],[b,P]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[x,[v,/_/g," "],[b,T]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[v,[x,"TCL"],[b,P]],[/(itel) ((\w+))/i],[[x,$e],v,[b,Zn,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[v,[x,"Acer"],[b,P]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[v,[x,"Meizu"],[b,T]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[v,[x,"Ulefone"],[b,T]],[/droid.+; (a(?:015|06[35]|142p?))/i],[v,[x,"Nothing"],[b,T]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[x,v,[b,T]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[x,v,[b,P]],[/(surface duo)/i],[v,[x,U],[b,P]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[v,[x,"Fairphone"],[b,T]],[/(u304aa)/i],[v,[x,"AT&T"],[b,T]],[/\bsie-(\w*)/i],[v,[x,"Siemens"],[b,T]],[/\b(rct\w+) b/i],[v,[x,"RCA"],[b,P]],[/\b(venue[\d ]{2,7}) b/i],[v,[x,"Dell"],[b,P]],[/\b(q(?:mv|ta)\w+) b/i],[v,[x,"Verizon"],[b,P]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[v,[x,"Barnes & Noble"],[b,P]],[/\b(tm\d{3}\w+) b/i],[v,[x,"NuVision"],[b,P]],[/\b(k88) b/i],[v,[x,"ZTE"],[b,P]],[/\b(nx\d{3}j) b/i],[v,[x,"ZTE"],[b,T]],[/\b(gen\d{3}) b.+49h/i],[v,[x,"Swiss"],[b,T]],[/\b(zur\d{3}) b/i],[v,[x,"Swiss"],[b,P]],[/\b((zeki)?tb.*\b) b/i],[v,[x,"Zeki"],[b,P]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[x,"Dragon Touch"],v,[b,P]],[/\b(ns-?\w{0,9}) b/i],[v,[x,"Insignia"],[b,P]],[/\b((nxa|next)-?\w{0,9}) b/i],[v,[x,"NextBook"],[b,P]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[x,"Voice"],v,[b,T]],[/\b(lvtel\-)?(v1[12]) b/i],[[x,"LvTel"],v,[b,T]],[/\b(ph-1) /i],[v,[x,"Essential"],[b,T]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[v,[x,"Envizen"],[b,P]],[/\b(trio[-\w\. ]+) b/i],[v,[x,"MachSpeed"],[b,P]],[/\btu_(1491) b/i],[v,[x,"Rotor"],[b,P]],[/(shield[\w ]+) b/i],[v,[x,"Nvidia"],[b,P]],[/(sprint) (\w+)/i],[x,v,[b,T]],[/(kin\.[onetw]{3})/i],[[v,/\./g," "],[x,U],[b,T]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[v,[x,Se],[b,P]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[v,[x,Se],[b,T]],[/smart-tv.+(samsung)/i],[x,[b,O]],[/hbbtv.+maple;(\d+)/i],[[v,/^/,"SmartTV"],[x,ge],[b,O]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[x,ie],[b,O]],[/(apple) ?tv/i],[x,[v,X+" TV"],[b,O]],[/crkey/i],[[v,Z+"cast"],[x,$],[b,O]],[/droid.+aft(\w+)( bui|\))/i],[v,[x,Y],[b,O]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[v,[x,fe],[b,O]],[/(bravia[\w ]+)( bui|\))/i],[v,[x,he],[b,O]],[/(mitv-\w{5}) bui/i],[v,[x,me],[b,O]],[/Hbbtv.*(technisat) (.*);/i],[x,v,[b,O]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[x,It],[v,It],[b,O]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[b,O]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[x,v,[b,j]],[/droid.+; (shield) bui/i],[v,[x,"Nvidia"],[b,j]],[/(playstation [345portablevi]+)/i],[v,[x,he],[b,j]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[v,[x,U],[b,j]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[v,[x,ge],[b,_]],[/((pebble))app/i],[x,v,[b,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[v,[x,X],[b,_]],[/droid.+; (glass) \d/i],[v,[x,$],[b,_]],[/droid.+; (wt63?0{2,3})\)/i],[v,[x,Se],[b,_]],[/(quest( \d| pro)?)/i],[v,[x,be],[b,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[x,[b,R]],[/(aeobc)\b/i],[v,[x,Y],[b,R]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[v,[b,T]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[v,[b,P]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,P]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,T]],[/(android[-\w\. ]{0,9});.+buil/i],[v,[x,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[y,J+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[y,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[y,w],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,y]],os:[[/microsoft (windows) (vista|xp)/i],[y,w],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[y,[w,Zn,xt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,Zn,xt],[y,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[y,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[y,we],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,y],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[y,w],[/\(bb(10);/i],[w,[y,re]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[w,[y,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[y,V+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[y,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[y,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[y,Z+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[y,ye],w],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[y,w],[/(sunos) ?([\w\.\d]*)/i],[[y,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[y,w]]},Ct=function(_e,Le){if(typeof _e===d&&(Le=_e,_e=r),!(this instanceof Ct))return new Ct(_e,Le).getResult();var Oe=typeof n!==u&&n.navigator?n.navigator:r,Ce=_e||(Oe&&Oe.userAgent?Oe.userAgent:i),gt=Oe&&Oe.userAgentData?Oe.userAgentData:r,Xt=Le?pe(qt,Le):qt,We=Oe&&Oe.userAgent==Ce;return this.getBrowser=function(){var Pe={};return Pe[y]=r,Pe[w]=r,bt.call(Pe,Ce,Xt.browser),Pe[g]=gn(Pe[w]),We&&Oe&&Oe.brave&&typeof Oe.brave.isBrave==c&&(Pe[y]="Brave"),Pe},this.getCPU=function(){var Pe={};return Pe[A]=r,bt.call(Pe,Ce,Xt.cpu),Pe},this.getDevice=function(){var Pe={};return Pe[x]=r,Pe[v]=r,Pe[b]=r,bt.call(Pe,Ce,Xt.device),We&&!Pe[b]&&gt&&gt.mobile&&(Pe[b]=T),We&&Pe[v]=="Macintosh"&&Oe&&typeof Oe.standalone!==u&&Oe.maxTouchPoints&&Oe.maxTouchPoints>2&&(Pe[v]="iPad",Pe[b]=P),Pe},this.getEngine=function(){var Pe={};return Pe[y]=r,Pe[w]=r,bt.call(Pe,Ce,Xt.engine),Pe},this.getOS=function(){var Pe={};return Pe[y]=r,Pe[w]=r,bt.call(Pe,Ce,Xt.os),We&&!Pe[y]&&gt&&gt.platform&&gt.platform!="Unknown"&&(Pe[y]=gt.platform.replace(/chrome os/i,ye).replace(/macos/i,we)),Pe},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Ce},this.setUA=function(Pe){return Ce=typeof Pe===p&&Pe.length>N?It(Pe,N):Pe,this},this.setUA(Ce),this};Ct.VERSION=o,Ct.BROWSER=Ke([y,w,g]),Ct.CPU=Ke([A]),Ct.DEVICE=Ke([v,x,b,j,T,O,P,_,R]),Ct.ENGINE=Ct.OS=Ke([y,w]),e.exports&&(t=e.exports=Ct),t.UAParser=Ct;var Kt=typeof n!==u&&(n.jQuery||n.Zepto);if(Kt&&!Kt.ua){var Pt=new Ct;Kt.ua=Pt.getResult(),Kt.ua.get=function(){return Pt.getUA()},Kt.ua.set=function(_e){Pt.setUA(_e);var Le=Pt.getResult();for(var Oe in Le)Kt.ua[Oe]=Le[Oe]}}})(typeof window=="object"?window:xn)})(qg,qg.exports);var TZ=qg.exports;Object.defineProperty(Te,"__esModule",{value:!0});function AZ(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var fn=E,ht=AZ(fn),pT=TZ,Go=new pT,pn=Go.getBrowser(),IZ=Go.getCPU(),Yn=Go.getDevice(),$g=Go.getEngine(),Yo=Go.getOS(),dl=Go.getUA(),hT=function(t){return Go.setUA(t)},fl=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new pT(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(o){return n.setUA(o)}}},gT=Object.freeze({ClientUAInstance:Go,browser:pn,cpu:IZ,device:Yn,engine:$g,os:Yo,ua:dl,setUa:hT,parseUserAgent:fl});function mT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function OZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mT(Object(n),!0).forEach(function(r){MZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pl(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pl=function(t){return typeof t}:pl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pl(e)}function PZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kZ(e,t,n){return t&&jZ(e.prototype,t),e}function MZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function em(){return em=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},em.apply(this,arguments)}function FZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nm(e,t)}function tm(e){return tm=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},tm(e)}function nm(e,t){return nm=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},nm(e,t)}function _Z(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function gr(e,t){if(e==null)return{};var n=_Z(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ad(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RZ(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ad(e)}function DZ(e,t){return LZ(e)||BZ(e,t)||NZ(e,t)||VZ()}function LZ(e){if(Array.isArray(e))return e}function BZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,c;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){i=!0,c=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw c}}return r}}function NZ(e,t){if(e){if(typeof e=="string")return vT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vT(e,t)}}function vT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
225
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var hn={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},Fn={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},Ds={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},WZ={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},zZ=function(t){switch(t){case hn.Mobile:return{isMobile:!0};case hn.Tablet:return{isTablet:!0};case hn.SmartTv:return{isSmartTV:!0};case hn.Console:return{isConsole:!0};case hn.Wearable:return{isWearable:!0};case hn.Browser:return{isBrowser:!0};case hn.Embedded:return{isEmbedded:!0};default:return WZ}},UZ=function(t){return hT(t)},De=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},rm=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},om=function(t){var n=rm();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},HZ=function(t,n,r,o,i){return{isBrowser:t,browserMajorVersion:De(n.major),browserFullVersion:De(n.version),browserName:De(n.name),engineName:De(r.name),engineVersion:De(r.version),osName:De(o.name),osVersion:De(o.version),userAgent:De(i)}},yT=function(t,n,r,o){return OZ({},t,{vendor:De(n.vendor),model:De(n.model),os:De(r.name),osVersion:De(r.version),ua:De(o)})},GZ=function(t,n,r,o){return{isSmartTV:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},YZ=function(t,n,r,o){return{isConsole:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},KZ=function(t,n,r,o){return{isWearable:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},XZ=function(t,n,r,o,i){return{isEmbedded:t,vendor:De(n.vendor),model:De(n.model),engineName:De(r.name),engineVersion:De(r.version),osName:De(o.name),osVersion:De(o.version),userAgent:De(i)}};function ZZ(e){var t=e?fl(e):gT,n=t.device,r=t.browser,o=t.engine,i=t.os,a=t.ua,c=zZ(n.type),u=c.isBrowser,d=c.isMobile,p=c.isTablet,g=c.isSmartTV,v=c.isConsole,y=c.isWearable,b=c.isEmbedded;if(u)return HZ(u,r,o,i,a);if(g)return GZ(g,o,i,a);if(v)return YZ(v,o,i,a);if(d||p)return yT(c,n,i,a);if(y)return KZ(y,o,i,a);if(b)return XZ(b,n,o,i,a)}var bT=function(t){var n=t.type;return n===hn.Mobile},xT=function(t){var n=t.type;return n===hn.Tablet},CT=function(t){var n=t.type;return n===hn.Mobile||n===hn.Tablet},wT=function(t){var n=t.type;return n===hn.SmartTv},ld=function(t){var n=t.type;return n===hn.Browser},ST=function(t){var n=t.type;return n===hn.Wearable},ET=function(t){var n=t.type;return n===hn.Console},TT=function(t){var n=t.type;return n===hn.Embedded},AT=function(t){var n=t.vendor;return De(n)},IT=function(t){var n=t.model;return De(n)},OT=function(t){var n=t.type;return De(n,"browser")},PT=function(t){var n=t.name;return n===Ds.Android},jT=function(t){var n=t.name;return n===Ds.Windows},kT=function(t){var n=t.name;return n===Ds.MAC_OS},MT=function(t){var n=t.name;return n===Ds.WindowsPhone},FT=function(t){var n=t.name;return n===Ds.IOS},_T=function(t){var n=t.version;return De(n)},RT=function(t){var n=t.name;return De(n)},DT=function(t){var n=t.name;return n===Fn.Chrome},LT=function(t){var n=t.name;return n===Fn.Firefox},BT=function(t){var n=t.name;return n===Fn.Chromium},cd=function(t){var n=t.name;return n===Fn.Edge},NT=function(t){var n=t.name;return n===Fn.Yandex},VT=function(t){var n=t.name;return n===Fn.Safari||n===Fn.MobileSafari},WT=function(t){var n=t.name;return n===Fn.MobileSafari},zT=function(t){var n=t.name;return n===Fn.Opera},UT=function(t){var n=t.name;return n===Fn.InternetExplorer||n===Fn.Ie},HT=function(t){var n=t.name;return n===Fn.MIUI},GT=function(t){var n=t.name;return n===Fn.SamsungBrowser},YT=function(t){var n=t.version;return De(n)},KT=function(t){var n=t.major;return De(n)},XT=function(t){var n=t.name;return De(n)},ZT=function(t){var n=t.name;return De(n)},QT=function(t){var n=t.version;return De(n)},JT=function(){var t=rm(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},Ls=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},qT=function(){var t=rm();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},Zr=function(){return om("iPad")},$T=function(){return om("iPhone")},eA=function(){return om("iPod")},tA=function(t){return De(t)};function nA(e){var t=e||gT,n=t.device,r=t.browser,o=t.os,i=t.engine,a=t.ua;return{isSmartTV:wT(n),isConsole:ET(n),isWearable:ST(n),isEmbedded:TT(n),isMobileSafari:WT(r)||Zr(),isChromium:BT(r),isMobile:CT(n)||Zr(),isMobileOnly:bT(n),isTablet:xT(n)||Zr(),isBrowser:ld(n),isDesktop:ld(n),isAndroid:PT(o),isWinPhone:MT(o),isIOS:FT(o)||Zr(),isChrome:DT(r),isFirefox:LT(r),isSafari:VT(r),isOpera:zT(r),isIE:UT(r),osVersion:_T(o),osName:RT(o),fullBrowserVersion:YT(r),browserVersion:KT(r),browserName:XT(r),mobileVendor:AT(n),mobileModel:IT(n),engineName:ZT(i),engineVersion:QT(i),getUA:tA(a),isEdge:cd(r)||Ls(a),isYandex:NT(r),deviceType:OT(n),isIOS13:qT(),isIPad13:Zr(),isIPhone13:$T(),isIPod13:eA(),isElectron:JT(),isEdgeChromium:Ls(a),isLegacyEdge:cd(r)&&!Ls(a),isWindows:jT(o),isMacOs:kT(o),isMIUI:HT(r),isSamsungBrowser:GT(r)}}var rA=wT(Yn),oA=ET(Yn),iA=ST(Yn),QZ=TT(Yn),JZ=WT(pn)||Zr(),qZ=BT(pn),ud=CT(Yn)||Zr(),sA=bT(Yn),aA=xT(Yn)||Zr(),lA=ld(Yn),$Z=ld(Yn),cA=PT(Yo),uA=MT(Yo),dA=FT(Yo)||Zr(),eQ=DT(pn),tQ=LT(pn),nQ=VT(pn),rQ=zT(pn),fA=UT(pn),oQ=_T(Yo),iQ=RT(Yo),sQ=YT(pn),aQ=KT(pn),lQ=XT(pn),cQ=AT(Yn),uQ=IT(Yn),dQ=ZT($g),fQ=QT($g),pQ=tA(dl),hQ=cd(pn)||Ls(dl),gQ=NT(pn),mQ=OT(Yn),vQ=qT(),yQ=Zr(),bQ=$T(),xQ=eA(),CQ=JT(),wQ=Ls(dl),SQ=cd(pn)&&!Ls(dl),EQ=jT(Yo),TQ=kT(Yo),AQ=HT(pn),IQ=GT(pn),OQ=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=fl(t),r=n.device,o=n.browser,i=n.os,a=n.engine,c=n.ua;return nA({device:r,browser:o,os:i,engine:a,ua:c})},PQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return cA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},jQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return lA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},kQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return fA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},MQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return dA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},FQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return ud?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},_Q=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return aA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},RQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return uA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},DQ=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=gr(t,["renderWithFragment","children","viewClassName","style"]);return sA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},LQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return rA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},BQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return oA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},NQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return iA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},VQ=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,i=gr(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",i,r):null};function WQ(e){return function(t){FZ(n,t);function n(r){var o;return PZ(this,n),o=RZ(this,tm(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(ad(o)),o.onOrientationChange=o.onOrientationChange.bind(ad(o)),o.onPageLoad=o.onPageLoad.bind(ad(o)),o.state={isLandscape:!1,isPortrait:!1},o}return kZ(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var o=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:o===0,isLandscape:o===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":pl(window))!==void 0&&ud&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return ht.createElement(e,em({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(ht.Component)}function zQ(){var e=fn.useState(function(){var i=window.innerWidth>window.innerHeight?90:0;return{isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"}}),t=DZ(e,2),n=t[0],r=t[1],o=fn.useCallback(function(){var i=window.innerWidth>window.innerHeight?90:0,a={isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return fn.useEffect(function(){return(typeof window>"u"?"undefined":pl(window))!==void 0&&ud&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),n}function pA(e){var t=e||window.navigator.userAgent;return fl(t)}function UQ(e){var t=e||window.navigator.userAgent,n=pA(t),r=nA(n);return[r,n]}Te.AndroidView=PQ,Te.BrowserTypes=Fn;var HQ=Te.BrowserView=jQ;Te.ConsoleView=BQ,Te.CustomView=VQ,Te.IEView=kQ,Te.IOSView=MQ,Te.MobileOnlyView=DQ;var GQ=Te.MobileView=FQ;Te.OsTypes=Ds,Te.SmartTVView=LQ,Te.TabletView=_Q,Te.WearableView=NQ,Te.WinPhoneView=RQ,Te.browserName=lQ,Te.browserVersion=aQ,Te.deviceDetect=ZZ,Te.deviceType=mQ,Te.engineName=dQ,Te.engineVersion=fQ,Te.fullBrowserVersion=sQ,Te.getSelectorsByUserAgent=OQ,Te.getUA=pQ,Te.isAndroid=cA,Te.isBrowser=lA,Te.isChrome=eQ,Te.isChromium=qZ,Te.isConsole=oA,Te.isDesktop=$Z,Te.isEdge=hQ,Te.isEdgeChromium=wQ,Te.isElectron=CQ,Te.isEmbedded=QZ,Te.isFirefox=tQ,Te.isIE=fA,Te.isIOS=dA,Te.isIOS13=vQ,Te.isIPad13=yQ,Te.isIPhone13=bQ,Te.isIPod13=xQ,Te.isLegacyEdge=SQ,Te.isMIUI=AQ,Te.isMacOs=TQ,Te.isMobile=ud,Te.isMobileOnly=sA,Te.isMobileSafari=JZ,Te.isOpera=rQ,Te.isSafari=nQ,Te.isSamsungBrowser=IQ,Te.isSmartTV=rA,Te.isTablet=aA,Te.isWearable=iA,Te.isWinPhone=uA,Te.isWindows=EQ,Te.isYandex=gQ,Te.mobileModel=uQ,Te.mobileVendor=cQ,Te.osName=iQ,Te.osVersion=oQ,Te.parseUserAgent=fl,Te.setUserAgent=UZ,Te.useDeviceData=pA,Te.useDeviceSelectors=UQ,Te.useMobileOrientation=zQ,Te.withOrientationChange=WQ;var YQ=typeof global=="object"&&global&&global.Object===Object&&global,KQ=typeof self=="object"&&self&&self.Object===Object&&self,hA=YQ||KQ||Function("return this")(),dd=hA.Symbol,gA=Object.prototype,XQ=gA.hasOwnProperty,ZQ=gA.toString,hl=dd?dd.toStringTag:void 0;function QQ(e){var t=XQ.call(e,hl),n=e[hl];try{e[hl]=void 0;var r=!0}catch{}var o=ZQ.call(e);return r&&(t?e[hl]=n:delete e[hl]),o}var JQ=Object.prototype,qQ=JQ.toString;function $Q(e){return qQ.call(e)}var eJ="[object Null]",tJ="[object Undefined]",mA=dd?dd.toStringTag:void 0;function nJ(e){return e==null?e===void 0?tJ:eJ:mA&&mA in Object(e)?QQ(e):$Q(e)}function rJ(e){return e!=null&&typeof e=="object"}var oJ="[object Symbol]";function iJ(e){return typeof e=="symbol"||rJ(e)&&nJ(e)==oJ}var sJ=/\s/;function aJ(e){for(var t=e.length;t--&&sJ.test(e.charAt(t)););return t}var lJ=/^\s+/;function cJ(e){return e&&e.slice(0,aJ(e)+1).replace(lJ,"")}function fd(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vA=NaN,uJ=/^[-+]0x[0-9a-f]+$/i,dJ=/^0b[01]+$/i,fJ=/^0o[0-7]+$/i,pJ=parseInt;function yA(e){if(typeof e=="number")return e;if(iJ(e))return vA;if(fd(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fd(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=cJ(e);var n=dJ.test(e);return n||fJ.test(e)?pJ(e.slice(2),n?2:8):uJ.test(e)?vA:+e}var im=function(){return hA.Date.now()},hJ="Expected a function",gJ=Math.max,mJ=Math.min;function pd(e,t,n){var r,o,i,a,c,u,d=0,p=!1,g=!1,v=!0;if(typeof e!="function")throw new TypeError(hJ);t=yA(t)||0,fd(n)&&(p=!!n.leading,g="maxWait"in n,i=g?gJ(yA(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v);function y(_){var R=r,N=o;return r=o=void 0,d=_,a=e.apply(N,R),a}function b(_){return d=_,c=setTimeout(A,t),p?y(_):a}function x(_){var R=_-u,N=_-d,Y=t-R;return g?mJ(Y,i-N):Y}function w(_){var R=_-u,N=_-d;return u===void 0||R>=t||R<0||g&&N>=i}function A(){var _=im();if(w(_))return j(_);c=setTimeout(A,x(_))}function j(_){return c=void 0,v&&r?y(_):(r=o=void 0,a)}function T(){c!==void 0&&clearTimeout(c),d=0,r=u=o=c=void 0}function P(){return c===void 0?a:j(im())}function O(){var _=im(),R=w(_);if(r=arguments,o=this,u=_,R){if(c===void 0)return b(u);if(g)return clearTimeout(c),c=setTimeout(A,t),y(u)}return c===void 0&&(c=setTimeout(A,t)),a}return O.cancel=T,O.flush=P,O}var vJ="Expected a function";function yJ(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(vJ);return fd(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),pd(e,t,{leading:r,maxWait:t,trailing:o})}var Bs=function(){return Bs=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Bs.apply(this,arguments)};function bA(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function xA(e){return!e||!e.ownerDocument?document:e.ownerDocument}var CA=function(e){var t={},n=Array.prototype.reduce.call(e,function(r,o){var i=o.name.match(/data-simplebar-(.+)/);if(i){var a=i[1].replace(/\W+(.)/g,function(c,u){return u.toUpperCase()});switch(o.value){case"true":r[a]=!0;break;case"false":r[a]=!1;break;case void 0:r[a]=!0;break;default:r[a]=o.value}}return r},t);return n};function wA(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function SA(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function EA(e){return".".concat(e.split(" ").join("."))}var sm=!!(typeof window<"u"&&window.document&&window.document.createElement),bJ=Object.freeze({__proto__:null,addClasses:wA,canUseDOM:sm,classNamesToQuery:EA,getElementDocument:xA,getElementWindow:bA,getOptions:CA,removeClasses:SA}),Ns=null,TA=null;sm&&window.addEventListener("resize",function(){TA!==window.devicePixelRatio&&(TA=window.devicePixelRatio,Ns=null)});function AA(){if(Ns===null){if(typeof document>"u")return Ns=0,Ns;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),Ns=n}return Ns}var Ko=bA,am=xA,xJ=CA,Xo=wA,Zo=SA,_n=EA,hd=function(){function e(t,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var o=Ko(r.el);r.scrollXTicking||(o.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(o.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,Xo(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){Zo(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(Xo(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){Zo(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(o){r.mouseX=o.clientX,r.mouseY=o.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(o){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var i,a;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(i=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(a=r.isWithinBounds(r.axis.y.track.rect)),(i||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(i&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(o,"x"):r.onTrackClick(o,"x")),a&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(o,"y"):r.onTrackClick(o,"y"))))}},this.drag=function(o){var i,a,c,u,d,p,g,v,y,b,x;if(!(!r.draggedAxis||!r.contentWrapperEl)){var w,A=r.axis[r.draggedAxis].track,j=(a=(i=A.rect)===null||i===void 0?void 0:i[r.axis[r.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,T=r.axis[r.draggedAxis].scrollbar,P=(u=(c=r.contentWrapperEl)===null||c===void 0?void 0:c[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&u!==void 0?u:0,O=parseInt((p=(d=r.elStyles)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&p!==void 0?p:"0px",10);o.preventDefault(),o.stopPropagation(),r.draggedAxis==="y"?w=o.pageY:w=o.pageX;var _=w-((v=(g=A.rect)===null||g===void 0?void 0:g[r.axis[r.draggedAxis].offsetAttr])!==null&&v!==void 0?v:0)-r.axis[r.draggedAxis].dragOffset;_=r.draggedAxis==="x"&&r.isRtl?((b=(y=A.rect)===null||y===void 0?void 0:y[r.axis[r.draggedAxis].sizeAttr])!==null&&b!==void 0?b:0)-T.size-_:_;var R=_/(j-T.size),N=R*(P-O);r.draggedAxis==="x"&&r.isRtl&&(N=!((x=e.getRtlHelpers())===null||x===void 0)&&x.isScrollingToNegative?-N:N),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=N}},this.onEndDrag=function(o){r.isDragging=!1;var i=am(r.el),a=Ko(r.el);o.preventDefault(),o.stopPropagation(),Zo(r.el,r.classNames.dragging),r.onStopScrolling(),i.removeEventListener("mousemove",r.drag,!0),i.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=a.setTimeout(function(){i.removeEventListener("click",r.preventClick,!0),i.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=Bs(Bs({},e.defaultOptions),n),this.classNames=Bs(Bs({},e.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=yJ(this._onMouseMove,64),this.onWindowResize=pd(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=pd(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=pd(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=t.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var o=e.getOffset(n),i=e.getOffset(r);n.scrollLeft=-999;var a=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:o.left!==i.left,isScrollingToNegative:i.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:AA()}catch{return AA()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=am(t),o=Ko(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){sm&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,n;this.wrapperEl=this.el.querySelector(_n(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(_n(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(_n(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(_n(this.classNames.offset)),this.maskEl=this.el.querySelector(_n(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,_n(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(_n(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(_n(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(_n(this.classNames.track)).concat(_n(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(_n(this.classNames.track)).concat(_n(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(_n(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(_n(this.classNames.scrollbar)))||null,this.options.autoHide||(Xo(this.axis.x.scrollbar.el,this.classNames.visible),Xo(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=Ko(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var o=!1,i=r.ResizeObserver||ResizeObserver;this.resizeObserver=new i(function(){o&&r.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){o=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=Ko(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1||n>0,i=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,c=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var u=this.contentEl.scrollHeight,d=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=o?"".concat(n||d,"px"):"auto",this.placeholderEl.style.height="".concat(u,"px");var p=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&d>n,this.axis.y.isOverflowing=u>p,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=c==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var g=this.axis.x.isOverflowing?this.scrollbarWidth:0,v=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&d>i-v,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>p-g,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var n,r;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var o=this.contentEl[this.axis[t].scrollSizeAttr],i=(r=(n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])!==null&&r!==void 0?r:0,a=i/o,c;return c=Math.max(~~(a*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(c=Math.min(c,this.options.scrollbarMaxSize)),c},e.prototype.positionScrollbar=function(t){var n,r,o;t===void 0&&(t="y");var i=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!i.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],c=((n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])||0,u=parseInt(this.elStyles[this.axis[t].sizeAttr],10),d=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];d=t==="x"&&this.isRtl&&(!((r=e.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-d:d,t==="x"&&this.isRtl&&(d=!((o=e.getRtlHelpers())===null||o===void 0)&&o.isScrollingToNegative?d:-d);var p=d/(a-u),g=~~((c-i.size)*p);g=t==="x"&&this.isRtl?-g+(c-i.size):g,i.el.style.transform=t==="x"?"translate3d(".concat(g,"px, 0, 0)"):"translate3d(0, ".concat(g,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var n=this.axis[t].track.el,r=this.axis[t].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(Xo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(Zo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var n=this.axis[t];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(t),Xo(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?Xo(n.scrollbar.el,this.classNames.hover):Zo(n.scrollbar.el,this.classNames.hover)):(Zo(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),Zo(this.axis[t].track.el,this.classNames.hover),Zo(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,n){var r;n===void 0&&(n="y"),this.isDragging=!0;var o=am(this.el),i=Ko(this.el),a=this.axis[n].scrollbar,c=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=c-(((r=a.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,Xo(this.el,this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var r=this,o,i,a,c;n===void 0&&(n="y");var u=this.axis[n];if(!(!this.options.clickOnTrack||!u.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var d=Ko(this.el);this.axis[n].scrollbar.rect=u.scrollbar.el.getBoundingClientRect();var p=this.axis[n].scrollbar,g=(i=(o=p.rect)===null||o===void 0?void 0:o[this.axis[n].offsetAttr])!==null&&i!==void 0?i:0,v=parseInt((c=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[n].sizeAttr])!==null&&c!==void 0?c:"0px",10),y=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],b=n==="y"?this.mouseY-g:this.mouseX-g,x=b<0?-1:1,w=x===-1?y-v:y+v,A=40,j=function(){r.contentWrapperEl&&(x===-1?y>w&&(y-=A,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=y,d.requestAnimationFrame(j)):y<w&&(y+=A,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=y,d.requestAnimationFrame(j)))};j()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Ko(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,n){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(o){return r.call(o,n)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=xJ,e.helpers=bJ,e}(),Kn=function(){return Kn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Kn.apply(this,arguments)};function CJ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var IA=D.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,i=CJ(e,["children","scrollableNodeProps"]),a=D.useRef(),c=D.useRef(),u=D.useRef(),d={},p={};Object.keys(i).forEach(function(y){Object.prototype.hasOwnProperty.call(hd.defaultOptions,y)?d[y]=i[y]:p[y]=i[y]});var g=Kn(Kn({},hd.defaultOptions.classNames),d.classNames),v=Kn(Kn({},o),{className:"".concat(g.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":d.ariaLabel||hd.defaultOptions.ariaLabel});return D.useEffect(function(){var y;return c.current=v.ref?v.ref.current:c.current,a.current&&(y=new hd(a.current,Kn(Kn(Kn({},d),c.current&&{scrollableNode:c.current}),u.current&&{contentNode:u.current})),typeof t=="function"?t(y):t&&(t.current=y)),function(){y==null||y.unMount(),y=null,typeof t=="function"&&t(null)}},[]),D.createElement("div",Kn({"data-simplebar":"init",ref:a},p),D.createElement("div",{className:g.wrapper},D.createElement("div",{className:g.heightAutoObserverWrapperEl},D.createElement("div",{className:g.heightAutoObserverEl})),D.createElement("div",{className:g.mask},D.createElement("div",{className:g.offset},typeof n=="function"?n({scrollableNodeRef:c,scrollableNodeProps:Kn(Kn({},v),{ref:c}),contentNodeRef:u,contentNodeProps:{className:g.contentEl,ref:u}}):D.createElement("div",Kn({},v),D.createElement("div",{className:g.contentEl},n)))),D.createElement("div",{className:g.placeholder})),D.createElement("div",{className:"".concat(g.track," simplebar-horizontal")},D.createElement("div",{className:g.scrollbar})),D.createElement("div",{className:"".concat(g.track," simplebar-vertical")},D.createElement("div",{className:g.scrollbar})))});IA.displayName="SimpleBar";const wJ=ue(HQ)({flexGrow:1,height:"100%",overflow:"hidden"}),SJ=ue(IA)(({theme:e})=>({maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:et(e.palette.grey[500],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-track.simplebar-vertical":{width:10},"& .simplebar-track.simplebar-horizontal .simplebar-scrollbar":{height:6},"& .simplebar-mask":{zIndex:"inherit"}}));function OA({children:e,sx:t,...n}){return f.jsxs(f.Fragment,{children:[f.jsx(wJ,{children:f.jsx(SJ,{timeout:500,clickOnTrack:!1,sx:t,...n,children:e})}),f.jsx(GQ,{children:f.jsx(S.Box,{sx:{overflowX:"auto",...t},...n,children:e})})]})}function PA(e){const t=S.useTheme(),n=Ir(e,{flexShrink:{md:0},zIndex:1200}),{downLg:r}=Gn(),{open:o,handleDrawerToggle:i,width:a}=Oi(),c=r?S.Drawer:EZ,u=document.body,d=E.useMemo(()=>r?{container:u,variant:"temporary",onClose:i,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",lg:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:a,borderRight:`1px solid ${t.palette.divider}`,backgroundImage:"none",boxShadow:"inherit",overflow:"auto"}}}:{variant:"permanent"},[r,u,i,a,t.palette.divider]);return f.jsx(S.Box,{component:"nav",sx:n,"aria-label":"mailbox folders",children:f.jsxs(c,{...d,open:o,children:[f.jsx(uT,{}),f.jsx(OA,{sx:{"& .simplebar-content":{display:"flex",flexDirection:"column"}},children:e.children})]})})}function lm(e){const{name:t,version:n,copy:r="&copy; Applica Software Guru for"}=e;return f.jsx(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",flexGrow:1,height:"auto",sx:{pt:1},children:f.jsxs(S.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}const jA=ue(S.AppBar,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Cn();return{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...!t&&{width:`calc(100% - ${e.spacing(7.5)})`},...t&&{marginLeft:n,width:`calc(100% - ${n}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}}),kA=E.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary"},{defaults:!0});return f.jsx(S.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),EJ=E.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary"},{defaults:!0});return f.jsx(eu,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Vs=E.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return f.jsx(S.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function MA({onClick:e=void 0}){const{open:t,anchorEl:n,handleClose:r,handleToggle:o}=_s(),[i,a]=q.useLocaleState(),c=q.useLocales();if(c.length===0)return null;function u(d){if(e){e(d,r);return}a(d),r()}return f.jsxs(f.Fragment,{children:[f.jsx(kA,{value:"locale",onClick:o,sx:{minWidth:"auto"},children:f.jsxs(S.Stack,{direction:"row",spacing:.5,children:[f.jsx(S.Typography,{variant:"body1",children:i.toUpperCase()}),t?f.jsx(Ue.CaretUpOutlined,{}):f.jsx(Ue.CaretDownOutlined,{})]})}),f.jsx(S.Menu,{id:"menu-appbar",anchorEl:n,keepMounted:!0,open:t,onClose:r,children:c.map((d,p)=>f.jsx(S.MenuItem,{onClick:()=>u(d.locale),children:d.name},p))})]})}const TJ={ml:{xs:0,lg:-2}};function FA(){const{open:e,handleDrawerToggle:t}=Oi();return f.jsx(Vs,{value:"drawer","aria-label":"open drawer",sx:TJ,onChange:t,selected:e,children:e?f.jsx(Ue.MenuFoldOutlined,{}):f.jsx(Ue.MenuUnfoldOutlined,{})})}function _A(e){const t=E.useRef(),n=S.useTheme(),{downLg:r,horizontal:o}=Gn(),{open:i,width:a}=Oi(),c=r?S.AppBar:jA,d={position:"fixed",color:"inherit",elevation:0,sx:Ir(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":i?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}})};return r||te.extend(d,{open:i}),f.jsx(c,{ref:t,...d,children:f.jsxs(S.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx(FA,{}),e.children]})})}function AJ(e){const t=S.useTheme(),{notification:n,onClick:r,selected:o,divider:i}=e,{resource:a}=sd(),c=q.useNotify(),u=q.useRedirect(),[d]=q.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:Or().toISOString()}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(u(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{c("resources.notifications.messages.readed.error","warning")}}),p=E.useCallback(()=>d(),[d]),[g]=q.useLocaleState(),v=E.useMemo(()=>Or(n.created).locale(g).fromNow(),[n,g]);return f.jsx(S.ListItem,{disablePadding:!0,divider:i,children:f.jsxs(S.ListItemButton,{selected:o,onClick:p,children:[f.jsx(S.ListItemAvatar,{children:f.jsx(S.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(Ue.MessageOutlined,{})})}),f.jsx(S.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),f.jsx(S.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(S.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:v,primaryTypographyProps:{variant:"caption"}})]})})}const IJ={width:36,height:36,fontSize:"1rem"},OJ={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function RA(){const{enable:e}=sd();return e?f.jsx(PJ,{}):null}function PJ(){const e=q.useTranslate(),t=S.useTheme(),n=q.useRefresh(),r=q.useNotify(),{downMd:o}=Gn(),{resource:i}=sd(),[a,c]=E.useState([]),{data:u,isLoading:d}=q.useGetList(i,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),p=a.filter(j=>j.readed===null).length,{open:g,anchorEl:v,handleClose:y,handleToggle:b}=_s();E.useEffect(()=>{!d&&u&&c(u??[])},[u,d]);const x=a.filter(j=>!j.readed).map(j=>j.id),[w]=q.useUpdateMany(i,{ids:x,data:{readed:Or().toISOString()}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),A=E.useCallback(()=>{w()},[w]);return f.jsxs(f.Fragment,{children:[f.jsx(Vs,{value:"notifications",selected:g,onChange:b,children:f.jsx(S.Badge,{badgeContent:p,color:"primary",children:f.jsx(Ue.BellOutlined,{})})}),f.jsx(S.Popper,{placement:o?"bottom":"bottom-end",open:g,anchorEl:v,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:j})=>f.jsx(Bo,{type:"grow",position:o?"top":"top-right",in:g,...j,children:f.jsx(S.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(S.ClickAwayListener,{onClickAway:y,children:f.jsxs(On,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:p>0&&f.jsx(S.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:A,children:f.jsx(eu,{color:"success",size:"small",children:f.jsx(Ue.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(S.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":IJ,"& .MuiListItemSecondaryAction-root":{...OJ,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((T,P)=>f.jsx(AJ,{selected:p>0,notification:T,onClick:y,divider:P<a.length-1},T.id))}),f.jsx(S.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${i}`,LinkComponent:ut.Link,onClick:y,children:f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),f.jsx(S.Divider,{})]})})})})})]})}function DA(){const[e,t]=E.useState(!1),n=E.useCallback(()=>t(!1),[t]),r=E.useCallback(()=>t(!0),[t]),o=q.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsxs(S.ListItemButton,{onClick:r,children:[f.jsx(S.ListItemIcon,{children:f.jsx(en.Key,{})}),f.jsx(S.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(S.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(Vg,{onSuccess:n})})]})}function LA(){const e=q.useLogout(),t=q.useTranslate();return f.jsx(f.Fragment,{children:f.jsxs(S.ListItemButton,{onClick:e,children:[f.jsx(S.ListItemIcon,{children:f.jsx(en.LogoutOutlined,{})}),f.jsx(S.ListItemText,{primary:t("ra.auth.logout")})]})})}function BA(){const e=q.useTranslate(),t=q.useAuthProvider(),n=E.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t]),[r,o]=E.useState(!1);return E.useEffect(()=>{if(!t.isImpersonating){console.warn("The authProvider does not support the isImpersonating feature",t);return}t.isImpersonating().then(i=>o(i))},[t,o]),r?f.jsx(f.Fragment,{children:f.jsxs(S.ListItemButton,{onClick:n,children:[f.jsx(S.ListItemIcon,{children:f.jsx(en.LogoutOutlined,{})}),f.jsx(S.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null}function NA(e){var x;const{roles:t}=e,n=S.useTheme(),r=q.useDataProvider(),{identity:o}=q.useGetIdentity(),i=o!==void 0&&o.image&&o.image!==null&&o.image!=="",[a,c]=E.useState(null),{open:u,anchorEl:d,handleToggle:p,handleClose:g}=_s(),v=q.useLogout(),y=E.useCallback(()=>{v()},[v]);E.useEffect(()=>{i&&r.getFile("/profile/me/image").then(w=>c(w))},[r,i]);const b=E.useMemo(()=>{var w;return E.isValidElement(t)?t:t?f.jsx(f.Fragment,{children:t}):(w=o==null?void 0:o.roles)==null?void 0:w.map(A=>A.name.replace("ROLE_","")).join(",")},[t,o]);return f.jsxs(f.Fragment,{children:[f.jsx(Vs,{sx:{p:.25,width:"auto"},onClick:p,value:"profile",selected:u,children:f.jsxs(S.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Xc,{alt:(x=o==null?void 0:o.name)==null?void 0:x.toUpperCase(),src:a,size:"xs"}),f.jsx(S.Typography,{variant:"subtitle1",children:o==null?void 0:o.name})]})}),f.jsx(hh,{placement:"bottom-end",open:u,anchorEl:d,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:w})=>f.jsx(Bo,{type:"grow",position:"top-right",in:u,...w,children:f.jsx(S.Paper,{sx:{boxShadow:n.customShadows.z1,width:290,minWidth:240,maxWidth:290,[n.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(S.ClickAwayListener,{onClickAway:g,children:f.jsxs(On,{elevation:0,border:!1,content:!1,children:[f.jsx(S.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(S.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(S.Grid,{item:!0,children:f.jsxs(S.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Xc,{alt:"profile user",src:a,sx:{width:32,height:32}}),f.jsxs(S.Stack,{children:[f.jsx(S.Typography,{variant:"h6",children:o==null?void 0:o.name}),f.jsx(S.Typography,{variant:"body2",color:"textSecondary",children:b})]})]})}),f.jsx(S.Grid,{item:!0,children:f.jsx(S.Tooltip,{title:"Logout",children:f.jsx(eu,{size:"large",sx:{color:"text.primary"},onClick:y,children:f.jsx(Ue.LogoutOutlined,{})})})})]})}),f.jsx(S.Grid,{container:!0,children:f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(DA,{}),f.jsx(LA,{}),f.jsx(BA,{})]})})})]})})})})})]})}function VA(e){const t=pt(),{downMd:n}=Gn(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=_s();return n?f.jsxs(f.Fragment,{children:[f.jsx(Vs,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:i,selected:r,children:f.jsx(Ue.MoreOutlined,{})}),f.jsx(S.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:c})=>f.jsx(Bo,{type:"fade",in:r,...c,children:f.jsx(S.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(S.ClickAwayListener,{onClickAway:a,children:f.jsx(S.AppBar,{color:"inherit",children:f.jsx(S.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})}function WA(e){return f.jsx(S.Box,{...e,flex:1})}function zA(e){const t=S.useTheme(),n=S.useScrollTrigger({disableHysteresis:!0,threshold:0}),{container:r}=Cn();return t.shadows[4]=t.customShadows.z1,f.jsx(S.AppBar,{elevation:n?4:0,sx:{top:60,bgcolor:t.palette.background.paper,width:"100%",height:62,justifyContent:"center",borderTop:`1px solid ${t.palette.divider}`,borderBottom:`1px solid ${t.palette.divider}`,zIndex:1098,color:t.palette.grey[500]},children:f.jsx(S.Container,{maxWidth:r?"xl":!1,children:f.jsx(S.Box,{sx:{display:"flex",alignItems:"center"},children:e.children})})})}function UA(e){const{horizontal:t}=Gn();return t?f.jsx(zA,{children:e.children}):f.jsx(PA,{children:e.children})}function gl({item:e,level:t}){const n=pt(),{horizontal:r,downLg:o}=Gn(),{drawerOpen:i,openItem:a,activeItem:c,openDrawer:u}=sl();let d="_self";e.target&&(d="_blank");const p=(e==null?void 0:e.external)!==!1?{component:E.forwardRef((A,j)=>f.jsx(ut.Link,{...A,to:e.url,target:d,ref:j}))}:{component:"a",href:e.url,target:d},g=e.icon,v=e.icon?f.jsx(g,{style:{fontSize:i?"1rem":"1.25rem"}}):!1,y=a.findIndex(A=>A===e.id)>-1,{pathname:b}=ut.useLocation();E.useEffect(()=>{b.endsWith(e.url)&&c([e.id])},[b]);const x=n.palette.mode==="dark"?"grey.400":"text.primary",w=n.palette.mode==="dark"&&i?"text.primary":"primary.main";return f.jsx(f.Fragment,{children:r?f.jsxs(S.ListItemButton,{...p,disabled:e.disabled,selected:y,sx:{zIndex:1201,...i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{bgcolor:"transparent",color:w,"&:hover":{color:w,bgcolor:"transparent"}}},...!i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[v?f.jsx(S.ListItemIcon,{sx:{minWidth:36,...!i&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!i&&y&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:v}):null,!v&&f.jsx(S.ListItemIcon,{sx:{color:y?"primary.main":"secondary.main",...!i&&{borderRadius:1.5,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!i&&y&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:f.jsx(rh,{size:4,color:y?"primary":"secondary"})}),f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",color:"inherit",children:e.title})}),(i||!i&&t!==1)&&e.chip?f.jsx(S.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?f.jsx(S.Avatar,{children:e.chip.avatar}):null}):null]}):f.jsxs(S.ListItemButton,{...p,disabled:e.disabled,selected:y,sx:{zIndex:1201,pl:i?`${t*28}px`:1.5,py:!i&&t===1?1.25:1,...i&&{"&:hover":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter",borderRight:`2px solid ${n.palette.primary.main}`,color:w,"&:hover":{color:w,bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"}}},...!i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},...o&&{onClick:()=>u(!1)},children:[v?f.jsx(S.ListItemIcon,{sx:{minWidth:28,color:y?w:x,...!i&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:n.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!i&&y&&{bgcolor:n.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:n.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:v}):null,i||!i&&t!==1?f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",sx:{color:y?w:x},children:e.title})}):null,(i||!i&&t!==1)&&e.chip?f.jsx(S.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?f.jsx(S.Avatar,{children:e.chip.avatar}):null}):null]})})}const HA=ue(S.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:38,left:-5,width:10,height:10,backgroundColor:e.palette.background.paper,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderLeft:`1px solid ${e.palette.grey.A800}`,borderBottom:`1px solid ${e.palette.grey.A800}`}}));function ml({menu:e,level:t,parentId:n,setSelectedItems:r,selectedItems:o,setSelectedLevel:i,selectedLevel:a}){var W;const c=pt(),{activeItem:u}=sl(),{horizontal:d}=Gn(),{drawerOpen:p}=sl(),g=ut.useNavigate(),[v,y]=E.useState(!1),[b,x]=E.useState(null),[w,A]=E.useState(null);function j(ie){A(null),i(t),p?(y(!v),x(b?null:e.id),r(b?"":e.id),e.url&&g(`${e.url}`)):A(ie==null?void 0:ie.currentTarget)}function T(){p||e.url&&g(`${e.url}`)}function P(ie){A(ie==null?void 0:ie.currentTarget)}function O(){y(!1),x(null),A(null)}E.useMemo(()=>{b===o?t===1&&y(!0):t===a&&(y(!1),x(null))},[o,t,b,a]);const{pathname:_}=ut.useLocation(),R=!!w;function N(ie,U){ie.forEach(ee=>{ee.url===_&&(y(!0),x(U))})}E.useEffect(()=>{y(!1),x(null),R&&A(null),e.children&&e.children.forEach(ie=>{var U;(U=ie.children)!=null&&U.length&&N(ie.children,e.id),ie.url===_&&(x(e.id),y(!0)),_.includes(ie.url)&&(x(e.id),y(!0))})},[_,e.children]),E.useEffect(()=>{e.url===_&&b!==e.id&&(u([e.id]),x(e.id),A(null),y(!0))},[_,e,b,u]);const Y=(W=e.children)==null?void 0:W.map(ie=>{switch(ie.type){case"collapse":return f.jsx(ml,{setSelectedItems:r,setSelectedLevel:i,selectedLevel:a,selectedItems:o,menu:ie,level:t+1,parentId:n},ie.id);case"item":return f.jsx(gl,{item:ie,level:t+1},ie.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Collapse or Item"},ie.id)}}),X=b===e.id,G=t===1?f.jsx(Ue.BorderOutlined,{style:{fontSize:"1rem"}}):!1,re=e.icon,ne=e.icon?f.jsx(re,{style:{fontSize:p?"1rem":"1.25rem"}}):G,Z=c.palette.mode==="dark"?"grey.400":"text.primary",J=c.palette.mode==="dark"&&p?c.palette.text.primary:c.palette.primary.main,V=R?`collapse-pop-${e.id}`:void 0,$={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"};return f.jsx(f.Fragment,{children:d?f.jsx(f.Fragment,{children:f.jsxs(S.ListItemButton,{id:`boundary-${V}`,disableRipple:!0,selected:X,onMouseEnter:P,onMouseLeave:O,onClick:P,"aria-describedby":V,sx:{"&.Mui-selected":{bgcolor:"transparent"}},children:[f.jsxs(S.Box,{onClick:T,sx:$,children:[ne?f.jsx(S.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,color:c.palette.secondary.dark},children:ne}):null,!ne&&t!==1&&f.jsx(S.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,bgcolor:"transparent","&:hover":{bgcolor:"transparent"}},children:f.jsx(rh,{size:4,color:X?"primary":"secondary"})}),f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"body1",color:"inherit",sx:{my:"auto"},children:e.title})}),R?f.jsx(Ue.RightOutlined,{}):f.jsx(Ue.DownOutlined,{})]}),w?f.jsx(HA,{id:V,open:R,anchorEl:w,placement:"right-start",style:{zIndex:2001},modifiers:[{name:"offset",options:{offset:[-10,0]}}],children:({TransitionProps:ie})=>f.jsx(Bo,{in:R,...ie,children:f.jsx(S.Paper,{sx:{overflow:"hidden",mt:1.5,py:.5,boxShadow:c.shadows[8],backgroundImage:"none"},children:f.jsx(S.ClickAwayListener,{onClickAway:O,children:f.jsx(S.Box,{children:Y})})})})}):null]})}):f.jsxs(f.Fragment,{children:[f.jsxs(S.ListItemButton,{disableRipple:!0,selected:b===e.id,...!p&&{onMouseEnter:j,onMouseLeave:O},onClick:j,sx:{pl:p?`${t*28}px`:1.5,py:!p&&t===1?1.25:1,...p&&{"&:hover":{bgcolor:c.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:"transparent",color:J,"&:hover":{color:J,bgcolor:c.palette.mode==="dark"?"divider":"transparent"}}},...!p&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[ne?f.jsx(S.ListItemIcon,{onClick:T,sx:{minWidth:28,color:b===e.id?"primary.main":Z,...!p&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:c.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!p&&b===e.id&&{bgcolor:c.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:c.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:ne}):null,p||!p&&t!==1?f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",color:b===e.id?"primary":Z,children:e.title}),secondary:e.caption?f.jsx(S.Typography,{variant:"caption",color:"secondary",children:e.caption}):null}):null,p||!p&&t!==1?R||v?f.jsx(Ue.UpOutlined,{style:{fontSize:"0.625rem",marginLeft:1,color:c.palette.primary.main}}):f.jsx(Ue.DownOutlined,{style:{fontSize:"0.625rem",marginLeft:1}}):null,!p&&f.jsx(HA,{open:R,anchorEl:w,placement:"right-start",style:{zIndex:2001},popperOptions:{modifiers:[{name:"offset",options:{offset:[-12,1]}}]},children:({TransitionProps:ie})=>f.jsx(Bo,{in:R,...ie,children:f.jsx(S.Paper,{sx:{overflow:"hidden",mt:1.5,boxShadow:c.customShadows.z1,backgroundImage:"none",border:`1px solid ${c.palette.divider}`},children:f.jsx(S.ClickAwayListener,{onClickAway:O,children:f.jsx(S.Box,{children:Y})})})})})]}),p?f.jsx(S.Collapse,{in:v,timeout:"auto",unmountOnExit:!0,children:f.jsx(S.List,{sx:{p:0},children:Y})}):null]})})}const jJ=ue(S.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:5,left:32,width:12,height:12,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderWidth:"6px",borderStyle:"solid",borderColor:`${e.palette.background.paper} transparent transparent ${e.palette.background.paper}`}}));function GA({item:e,lastItem:t,remItems:n,lastItemId:r,setSelectedItems:o,selectedItems:i,setSelectedLevel:a,selectedLevel:c}){var V,$;const u=pt(),d=L.useTranslate(),{pathname:p}={pathname:""},{horizontal:g,downLg:v}=Gn(),y=sl(),{drawerOpen:b,selectedID:x,activeID:w}=y,[A,j]=E.useState(null),[T,P]=E.useState(e),O=!!A;E.useEffect(()=>{if(t)if(e.id===r){const W={...e},ie=n.map(U=>U.elements);W.children=ie.flat(1),P(W)}else P(e)},[e,t,v]);function _(W,ie){W.forEach(U=>{var ee;(ee=U.children)!=null&&ee.length&&_(U.children,T.id),U.url===p&&w(ie)})}function R(W){(W.children?W.children:[]).forEach(U=>{var ee;(ee=U.children)!=null&&ee.length&&_(U.children,T.id),U.url===p&&w(T.id)})}E.useEffect(()=>{R(T),O&&j(null)},[p,T]);function N(W){O||j(W==null?void 0:W.currentTarget)}function Y(){j(null)}const X=T==null?void 0:T.icon,G=T!=null&&T.icon?f.jsx(X,{style:{fontSize:20,stroke:"1.5",color:x===T.id?u.palette.primary.main:u.palette.secondary.dark}}):null,re=(V=e.children)==null?void 0:V.map(W=>{switch(W.type){case"collapse":return f.jsx(ml,{menu:W,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:i,level:1,parentId:T.id},W.id);case"item":return f.jsx(gl,{item:W,level:1},W.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},W.id)}}),ne=n.map((W,ie)=>{var U;return f.jsxs(E.Fragment,{children:[W.title?f.jsx(S.Typography,{variant:"caption",sx:{pl:2},children:W.title}):null,(U=W==null?void 0:W.elements)==null?void 0:U.map(ee=>{switch(ee.type){case"collapse":return f.jsx(ml,{menu:ee,level:1,parentId:T.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:i},ee.id);case"item":return f.jsx(gl,{item:ee,level:1},ee.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},ee.id)}})]},ie)}),Z=($=T.children)==null?void 0:$.map(W=>{switch(W.type){case"collapse":return f.jsx(ml,{menu:W,level:1,parentId:T.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:i},W.id);case"item":return f.jsx(gl,{item:W,level:1},W.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},W.id)}}),J=O?`group-pop-${e.id}`:void 0;return f.jsx(f.Fragment,{children:g?f.jsx(S.List,{children:f.jsxs(S.ListItemButton,{selected:x===T.id,sx:{p:1,my:.5,mr:1,display:"flex",alignItems:"center",backgroundColor:"inherit","&.Mui-selected":{bgcolor:"transparent"}},onMouseEnter:N,onClick:N,onMouseLeave:Y,"aria-describedby":J,children:[G?f.jsx(S.ListItemIcon,{sx:{minWidth:28},children:T.id===r?f.jsx(Ue.DownOutlined,{style:{fontSize:20,stroke:"1.5"}}):G}):null,f.jsx(S.ListItemText,{sx:{mr:1},primary:f.jsx(S.Typography,{variant:"body1",color:x===T.id?u.palette.primary.main:u.palette.secondary.dark,children:T.id===r?d("ra.actions.more"):T.title})}),O?f.jsx(Ue.DownOutlined,{style:{fontSize:16,stroke:"1.5"}}):f.jsx(Ue.RightOutlined,{style:{fontSize:16,stroke:"1.5"}}),A?f.jsx(jJ,{id:J,open:O,anchorEl:A,placement:"bottom-start",style:{zIndex:2001},children:({TransitionProps:W})=>f.jsx(Bo,{in:O,...W,children:f.jsx(S.Paper,{sx:{mt:.5,py:1.25,boxShadow:u.shadows[8],backgroundImage:"none"},children:f.jsx(S.ClickAwayListener,{onClickAway:Y,children:f.jsx(S.Box,{sx:{maxHeight:"calc(100vh - 170px)",overflowY:"auto","&::-webkit-scrollbar":{opacity:0,width:4,"&:hover":{opacity:.7}},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:u.palette.divider,borderRadius:4}},children:T.id!==r?Z:ne})})})})}):null]})}):f.jsx(S.List,{subheader:e.title&&b?f.jsxs(S.Box,{sx:{pl:3,mb:1.5},children:[f.jsx(S.Typography,{variant:"subtitle2",color:u.palette.mode==="dark"?"textSecondary":"text.secondary",children:e.title}),e.caption?f.jsx(S.Typography,{variant:"caption",color:"secondary",children:e.caption}):null]}):null,sx:{mt:b&&e.title?1.5:0,py:0,zIndex:0},children:re})})}function YA(e){const{horizontal:t}=Gn(),{open:n}=Oi(),r=Ir(e,{pt:n?t?0:2:0,"& > ul:first-of-type":{mt:0},display:t?{xs:"block",lg:"flex"}:"block"});return f.jsx(S.Box,{sx:r,children:e.children})}function KA(e){const{horizontal:t}=Gn(),{menu:n,isLoading:r}=bg(),[o,i]=E.useState(""),[a,c]=E.useState(0),{horizontalMaxItems:u}=Cn(),d=t?u:void 0;let p=r?0:(n??[]).length-1,g=[],v;return!r&&d&&d<(n??[]).length&&(v=(n??[])[d-1].id,p=d-1,g=(n??[]).slice(d-1,(n??[]).length).map(y=>({title:y.title,elements:y.children,icon:y.icon}))),f.jsx(YA,{...e,children:!r&&te.map((n??[]).slice(0,p+1),y=>{const{type:b}=y;switch(b){case"group":return f.jsx(GA,{item:y,setSelectedItems:i,setSelectedLevel:c,selectedLevel:a,selectedItems:o,lastItem:d,remItems:g,lastItemId:v},y.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Navigation Group"},y.id)}})})}function kJ({open:e,anchorEl:t,handleClose:n,theme:r,mode:o,toggleThemeMode:i}){const a=q.useTranslate();return f.jsx(hh,{placement:"bottom-end",open:e,anchorEl:t,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:c})=>f.jsx(Bo,{type:"grow",position:"top-right",in:e,...c,children:f.jsx(S.Paper,{sx:{boxShadow:r.customShadows.z1,minWidth:200,[r.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(S.ClickAwayListener,{onClickAway:n,children:f.jsx(On,{elevation:0,border:!1,content:!1,children:f.jsxs(S.List,{children:[f.jsxs(S.ListItemButton,{selected:o==="light",onClick:()=>i("light"),children:[f.jsx(Ue.SunOutlined,{}),f.jsx(S.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.light")})]}),f.jsxs(S.ListItemButton,{selected:o==="dark",onClick:()=>i("dark"),children:[f.jsx(Ue.MoonOutlined,{}),f.jsx(S.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.dark")})]}),f.jsxs(S.ListItemButton,{selected:o==="auto",onClick:()=>i("auto"),children:[f.jsx(en.Brightness6,{}),f.jsx(S.Typography,{variant:"subtitle1",ml:1,textTransform:"none",children:a("ra.preferences.theme.auto")})]})]})})})})})})}function XA(){const e=S.useTheme(),{mode:t,setMode:n}=Cn(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=_s(),c=E.useCallback(d=>{n(d)},[n]),u=E.useCallback(()=>{switch(t){case"light":return f.jsx(Ue.SunOutlined,{});case"dark":return f.jsx(Ue.MoonOutlined,{});default:return f.jsx(en.Brightness6,{})}},[t]);return f.jsxs(Vs,{value:"theme-mode","aria-label":"toggle mode",onClick:i,selected:!1,children:[f.jsx(u,{}),r?f.jsx(kJ,{open:r,anchorEl:o,handleClose:a,theme:e,mode:t,toggleThemeMode:c}):null]})}const ZA=E.forwardRef((e,t)=>{const n=Ir(e,{display:"flex",width:"100%"});return f.jsx(S.Box,{ref:t,...e,sx:n,children:e.children})});function cm({source:e="paper"}){const{mode:t}=Cn(),n=S.useTheme();return E.useEffect(()=>{var o;const r=te.get(n.palette.background,e);(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",r)},[t,n,e]),null}const QA=iT(function(t){const{name:n,version:r,enableThemeToggler:o,enableNotification:i,enableLocaleSwitcher:a}=t,{isLoading:c,navigation:u,breadcrumbs:d}=IS();return f.jsxs(ZA,{children:[f.jsxs(_A,{children:[f.jsx(WA,{}),a?f.jsx(MA,{}):null,o?f.jsx(XA,{}):null,f.jsx(cm,{}),f.jsx(kw,{}),i?f.jsx(RA,{}):null,f.jsx(VA,{children:f.jsx(NA,{})})]}),f.jsx(UA,{children:f.jsx(KA,{})}),f.jsxs(aT,{error:t.error,children:[!c&&f.jsx(BC,{titleBottom:!0,mode:"breadcrumbs",navigation:u,breadcrumbs:d,card:!1,divider:!1,icon:!0,icons:!0}),t.children,f.jsx(ut.Outlet,{}),f.jsx(lm,{name:n,version:r,copy:t==null?void 0:t.copy})]})]})});function MJ(e){const{sx:t}=e;return f.jsx(S.Box,{sx:{...t,flex:"1 1 auto",backgroundColor:"background.paper",overflowY:"auto"},children:e.children})}const FJ=444;function _J(e){const{sx:t,anchor:n="right",variant:r="temporary",open:o=!1,onClose:i}=e,a=S.useTheme(),u=S.useMediaQuery(a.breakpoints.down("sm"))?"bottom":n,d=E.useCallback(()=>{Ze.isFunction(i)&&i()},[i]),p={backgroundImage:"none",boxShadow:"-10px 4px 42px 0px rgba(0, 0, 0, 0.25)",width:{sm:"30%"},maxWidth:{sm:FJ},[a.breakpoints.down("sm")]:{width:"100% !important",maxWidth:"100% !important"}};return f.jsx(S.Drawer,{...e,anchor:u,onClose:d,open:o,PaperProps:{sx:{...p,...t}},variant:r,children:e.children})}function RJ(e){return f.jsxs(S.Box,{children:[f.jsx(S.Divider,{}),f.jsx(S.Box,{bgcolor:"background.paper",px:2,py:2.5,children:e.children})]})}function DJ(e){const{sx:t}=e;return f.jsxs(S.Box,{children:[f.jsx(S.Stack,{alignItems:"center",bgcolor:"background.paper",direction:"row",px:2.5,py:2,spacing:2,minHeight:"64px",sx:t,children:e.children}),f.jsx(S.Divider,{sx:{opacity:.6}})]})}function LJ(e){const{primary:t,secondary:n}=e;return f.jsxs(S.Box,{display:"inline-flex",flexGrow:1,flexShrink:1,flexDirection:"column",children:[t?f.jsx(S.Typography,{variant:"h5",children:t}):null,n?f.jsx(S.Typography,{variant:"h6",children:n}):null]})}function BJ(e){return f.jsx(S.Box,{display:"inline-flex",flexGrow:0,flexShrink:0,children:e.children})}const mr=_J;mr.Content=MJ,mr.Footer=RJ,mr.Header=DJ,mr.HeaderText=LJ,mr.HeaderAction=BJ;function JA(e){const t=S.useMediaQuery(n=>n.breakpoints.down("sm"));return f.jsx(NJ,{disableGutters:!0,variant:t?"regular":"dense",...VJ(e)})}JA.propTypes={children:m.node,className:m.string};const NJ=S.styled(S.Toolbar,{name:"RaTopToolbar",overridesResolver:e=>e.root})(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",gap:e.spacing(1),whiteSpace:"nowrap",flex:"0 1 auto",paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5),paddingInline:e.spacing(2),[e.breakpoints.down("md")]:{flex:"0 1 100%"},[e.breakpoints.down("sm")]:{backgroundColor:e.palette.background.paper,justifyContent:"space-between",alignItems:"center"}}));function VJ({hasCreate:e,...t}){return t}const WJ=ue("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}}));function qA(){return f.jsx(WJ,{children:f.jsx(S.LinearProgress,{color:"primary"})})}function zJ(e){return t=>f.jsx(E.Suspense,{fallback:f.jsx(qA,{}),children:f.jsx(e,{...t})})}function um({title:e}){return f.jsxs(S.Stack,{direction:"row",children:[f.jsx(S.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",f.jsx(S.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]})}const UJ=ue(L.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}}));function $A(e){return f.jsx(UJ,{...e})}var vl=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(vl||{});const eI=mo().required(),tI=mo().oneOf(Object.values(vl));function HJ(e){var A;const t=Xi.useQueryClient(),[n,r]=E.useState(!1),[o,i]=E.useState(()=>()=>Promise.resolve()),a=q.useGetIdentity(),c=(A=a==null?void 0:a.data)==null?void 0:A.email,u=q.useDataProvider(),d=E.useCallback(()=>c?u.get("onboarding").then(j=>{var T;return(T=j==null?void 0:j.data)==null?void 0:T.value}):Promise.reject(),[u,c]),{data:p,isLoading:g,isError:v}=Xi.useQuery({queryKey:["GET","onboarding",c],queryFn:d,staleTime:24*60*60*1e3,retry:c!==void 0}),[y,b]=E.useState(()=>()=>Promise.resolve()),w=Xi.useMutation({mutationFn:y}).mutateAsync;return E.useEffect(()=>{function j(){const T=te.chain(p??{}).clone().extend({[e]:Date.now()}).value();return u.post("onboarding",T).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}b(()=>j)},[u,p,e,t,c]),E.useEffect(()=>{r(te.isNil((p??{})[e]))},[p,e,r]),E.useEffect(()=>{i(()=>()=>w())},[w]),{loading:g,error:v,onboardingRequired:n,acknowledgeOnboarding:o}}function GJ(e){const[t,n]=Mg("onboarding",{}),[r,o]=E.useState(!1),[i,a]=E.useState(()=>()=>Promise.resolve());return E.useEffect(()=>{o(te.isNil((t??{})[e]))},[t,e,o]),E.useEffect(()=>{a(()=>()=>(n(c=>te.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:i}}function YJ(){return{onboardingRequired:!1,acknowledgeOnboarding:E.useRef(()=>Promise.resolve()).current}}function nI(e,t){jg({mode:tI,topic:eI}).validateSync({mode:e,topic:t});const n=HJ(t),r=GJ(t),o=YJ();switch(e){case vl.USER:return n.loading?o:n.error?r:te.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case vl.BROWSER:return r;default:return o}}var Ws=(e=>(e.RESTART="RESTART",e.SET_SHOW="SET_SHOW",e.REGISTER_TIP="REGISTER_TIP",e.UNREGISTER_TIP="UNREGISTER_TIP",e.DISMISS_TIP="DISMISS_TIP",e.SET_ON_COMPLETE="SET_ON_COMPLETE",e))(Ws||{});function KJ(e,t){var o;const n=te.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:i}=t;return te.extend(n,{show:i})}case"REGISTER_TIP":{const{payload:i}=t,{id:a}=i,c=te.chain(n.tips).clone().reject(p=>p.id===a).value(),u=te.find(n.tips,{id:a}),d=te.chain(u??{}).clone().extend(i).value();return c.push(d),te.extend(n,{tips:te.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:i}=t,a=te.isString(i)?i:i.id,c=te.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return te.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:i}=t,a=te.isString(i)?i:i.id,c=te.chain(n.tips).reject(v=>v.id===a).value(),u=te.find(n.tips,{id:a});if(te.isNil(u))return n;const d=te.chain(u).clone().extend({dismissed:!0}).value();c.push(d);const p=((o=te.chain(c).reject(v=>v.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&te.chain(c).reject(v=>v.step<p).reject(v=>v.dismissed??!1).isEmpty().value()&&e.onComplete(),te.extend(n,{tips:te.sortBy(c,["step"]),currentStep:p})}case"SET_ON_COMPLETE":{const{payload:i}=t;return te.extend(n,{onComplete:i})}case"RESTART":{const i=te.chain(n.tips).clone().map(a=>te.omit(a,"dismissed")).value();return te.extend(n,{tips:i,currentStep:0})}default:return n}}const dm=E.createContext(void 0);function XJ(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=nI(t,n),[i,a]=E.useReducer(KJ,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),c=E.useMemo(()=>({state:i,dispatch:a}),[i,a]);return E.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),E.useEffect(()=>{function u(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:u})},[o,a]),f.jsx(dm.Provider,{value:c,children:e.children})}function rI(){const e=E.useContext(dm);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function ZJ(){return rI().state}function oI(){return rI().dispatch}function iI(e){jg({id:mo().required(),step:US().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:i,currentStep:a}=ZJ(),c=te.find(i,{id:t}),{dismissed:u}=c??{},d=oI(),p=E.useCallback(()=>{d({type:Ws.DISMISS_TIP,payload:t})},[d,t]);return E.useEffect(()=>{(te.isNil(c)||n!==(c==null?void 0:c.step))&&d({type:Ws.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c,d]),E.useEffect(()=>()=>{d({type:Ws.UNREGISTER_TIP,payload:t})},[t,d]),{tip:te.chain(c??e).clone().extend({open:o&&!te.isNil(c)&&a===n&&!u}).value(),dismiss:p}}function QJ(){const e=oI();return E.useCallback(()=>{e({type:Ws.RESTART})},[e])}function JJ(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:i,dismiss:a}=iI({id:t,step:n,completeOnboarding:o}),{open:c}=i,u=te.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(fu,{...u,arrow:!0,open:c,title:f.jsxs(S.Stack,{gap:1,children:[f.jsx(S.Typography,{children:r}),f.jsx(S.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const qJ=S.styled(JJ)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${S.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${S.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${S.tooltipClasses.arrow}`]:{color:r.main}}}),fm=E.memo(e=>{const{page:t,rowsPerPage:n,count:r,onPageChange:o,size:i="small",className:a,...c}=e,u=q.useTranslate(),d=Math.ceil(r/n)||1;if(d===1)return f.jsx(sI,{className:a});function p(g,v,y){return g==="page"?y?u("ra.navigation.current_page",{page:v,_:`page ${v}`}):u("ra.navigation.page",{page:v,_:`Go to page ${v}`}):u(`ra.navigation.${g}`,{_:`Go to ${g} page`})}return f.jsx(sI,{className:a,children:f.jsx(S.Pagination,{size:i,count:d,page:t+1,onChange:(g,v)=>o(g,v-1),...$J(c),getItemAriaLabel:p})})});fm.propTypes={count:m.number.isRequired,onPageChange:m.func.isRequired,page:m.number.isRequired,rowsPerPage:m.number.isRequired,color:m.oneOf(["primary","secondary","standard"]),size:m.oneOf(["small","medium","large"])};const sI=ue("div",{name:"RaPaginationActions",overridesResolver:e=>e.root})(()=>({flexShrink:0,ml:4}));function $J({nextIconButtonProps:e,backIconButtonProps:t,slotProps:n,...r}){return r}const pm=E.memo(e=>{const{rowsPerPageOptions:t=eq,actions:n,limit:r=null,...o}=e,{isLoading:i,hasNextPage:a,page:c,perPage:u,total:d,setPage:p,setPerPage:g}=q.useListPaginationContext(e),v=q.useTranslate(),y=S.useMediaQuery(N=>N.breakpoints.down("md")),[b,x]=E.useState(c-1),{hasCreate:w}=q.useResourceDefinition(e),A=E.useMemo(()=>d!=null?Math.ceil(d/u):void 0,[u,d]),j=E.useCallback(Ze.debounce(N=>{p(N+1)},500),[p]),T=E.useCallback((N,Y)=>{var re,ne;if(!N)return;if(N.preventDefault(),Y<0||A!==void 0&&Y>A-1)throw new Error(v("ra.navigation.page_out_of_boundaries",{page:Y+1}));const X=(((re=N.target.dataset)==null?void 0:re.testid)||((ne=N.target.classList)==null?void 0:ne.value))??"",G=X.includes("MuiPaginationItem-previousNext")||X.includes("NavigateBeforeIcon")||X.includes("NavigateNextIcon")||X.includes("KeyboardArrowLeftIcon")||X.includes("KeyboardArrowRightIcon");x(Y),G?j(Y):p(Y+1)},[j,p,v,A]),P=E.useCallback(N=>{g(Number(N.target.value))},[g]),O=E.useCallback(({from:N,to:Y,count:X})=>X===-1&&a?v("ra.navigation.partial_page_range_info",{offsetBegin:N,offsetEnd:Y,_:"%{from}-%{to} of more than %{to}"}):v("ra.navigation.page_range_info",{offsetBegin:N,offsetEnd:Y,total:X===-1?Y:X,_:"%{from}-%{to} of %{count === -1 ? to : count}"}),[v,a]),_=E.useCallback(N=>v(`ra.navigation.${N}`,{_:`Go to ${N} page`}),[v]);if(i)return f.jsx(S.Toolbar,{variant:"dense"});if(d===0||c<1||A!==void 0&&c>A)return r!=null&&process.env.NODE_ENV==="development"&&console.warn("The Pagination limit prop is deprecated. Empty state should be handled by the component displaying data (Datagrid, SimpleList)."),null;if(y)return f.jsx(S.TablePagination,{count:d??-1,rowsPerPage:u,page:b,onPageChange:T,rowsPerPageOptions:tq,component:"span",labelDisplayedRows:O,sx:{justifyContent:w?"flex-start":"flex-end",display:w?"flex":"block"},...q.sanitizeListRestProps(o)});const R=n||(!i&&d!=null?fm:void 0);return f.jsx(S.TablePagination,{count:d??-1,rowsPerPage:u,page:b,onPageChange:T,onRowsPerPageChange:P,ActionsComponent:R,nextIconButtonProps:{disabled:!a},component:"span",labelRowsPerPage:v("ra.navigation.page_rows_per_page"),labelDisplayedRows:O,getItemAriaLabel:_,rowsPerPageOptions:t,...q.sanitizeListRestProps(o)})});pm.propTypes={actions:q.ComponentPropType,limit:m.element,rowsPerPageOptions:m.arrayOf(m.oneOfType([m.number,m.shape({label:m.string.isRequired,value:m.number.isRequired})]))};const eq=[5,10,25,50],tq=[];function aI({children:e}){const t=ut.useLocation(),{pathname:n}=t;return E.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),f.jsx(f.Fragment,{children:e})}const nq=ue("div")({width:"100%",overflowX:"auto",display:"block"});function rq({shadow:e,children:t,...n}){return f.jsx(On,{content:!1,border:!1,shadow:e,boxShadow:!0,...n,children:t})}function lI({title:e}){return f.jsx(S.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substring(0,1).toUpperCase()})}function oq({source:e,label:t,variant:n="body1",record:r,spaceBottom:o,spaceTop:i,component:a,leftIcon:c,rightIcon:u,button:d,buttonProps:p,...g}){const{getCurrentDialog:v}=Ng(),y=q.useResourceContext(g),b=v(),x=q.useRecordContext(),w=r||x,A=Ze.get(w,e||"");return f.jsxs(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:j=>({pt:1,pb:1,borderBottom:`1px solid ${j.palette.divider}`,...o&&{mb:2},...i&&{mt:2}}),children:[f.jsxs(S.Stack,{direction:"row",alignItems:"start",children:[c?E.isValidElement(c)?E.cloneElement(c,{style:gd}):E.createElement(c,{style:gd}):null,f.jsx(q.FieldTitle,{label:t,source:e,resource:b||y})]}),f.jsxs(S.Stack,{direction:"row",alignItems:"center",children:[a?E.isValidElement(a)?E.cloneElement(a,{record:w,resource:y,value:A}):E.createElement(a,{source:e,record:w,resource:y,value:A}):f.jsx(S.Typography,{variant:n,children:A}),u?E.isValidElement(u)?E.cloneElement(u,{style:gd}):E.createElement(u,{style:gd}):null,d?f.jsx(S.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:d}):null]})]})}const gd={width:"1.5rem",alignSelf:"center"};function cI(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:i,resource:a,selectedIds:c=[],onUnselectItems:u}=q.useListContext(e),d=q.useTranslate(),p=E.useCallback(()=>{u()},[u]);return f.jsx(iq,{className:r,children:f.jsxs(S.Toolbar,{"data-test":"bulk-actions-toolbar",className:Be(Pr.toolbar,{[Pr.collapsed]:c.length===0}),...q.sanitizeListRestProps(o),children:[f.jsxs("div",{className:Pr.title,children:[f.jsx(S.IconButton,{className:Pr.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:p,size:"small",children:f.jsx(en.Close,{fontSize:"small"})}),f.jsx(S.Typography,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:c.length})})]}),f.jsx(L.TopToolbar,{className:Pr.topToolbar,children:E.Children.map(n,g=>E.isValidElement(g)?E.cloneElement(g,{filterValues:i,resource:a,selectedIds:c}):null)})]})})}const Pi="RaBulkActionsToolbar",Pr={toolbar:`${Pi}-toolbar`,topToolbar:`${Pi}-topToolbar`,buttons:`${Pi}-buttons`,collapsed:`${Pi}-collapsed`,title:`${Pi}-title`,icon:`${Pi}-icon`},iq=ue("div",{name:Pi,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${Pr.toolbar}`]:{position:"absolute",left:0,right:0,zIndex:3,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.text.primary,justifyContent:"space-between",backgroundColor:e.palette.mode==="light"?Zp(e.palette.primary.light,.8):e.palette.primary.dark,minHeight:e.spacing(6),height:e.spacing(6),transform:`translateY(-${e.spacing(6)})`,transition:`${e.transitions.create("height")}, ${e.transitions.create("min-height")}, ${e.transitions.create("transform")}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},[`& .${Pr.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${Pr.buttons}`]:{},[`& .${Pr.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${Pr.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${Pr.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),hm={p:0,m:0},uI={p:2,m:0,borderRadius:0,width:"100%"};function sq(e){const{children:t}=e,[n,r]=D.useState(null);function o(b){r(b.currentTarget)}function i(){r(null)}const a=S.useMediaQuery(b=>b.breakpoints.down("md")),{filterValues:c,resource:u,selectedIds:d=[],onUnselectItems:p}=L.useListContext(e),g=!!n&&d!==void 0&&d.length>0,v=g?"simple-popover":void 0,y=D.useCallback(()=>{p(),r(null)},[p,r]);return f.jsx(S.Fade,{in:d!==void 0&&d.length>0,children:f.jsxs(S.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[f.jsx(S.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),f.jsx(S.Popover,{id:v,open:g,anchorEl:n,onClose:i,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:f.jsxs(S.List,{sx:hm,children:[f.jsx(S.ListItem,{sx:hm,children:f.jsx(L.Button,{onClick:y,sx:uI,label:"ra.action.unselect",startIcon:f.jsx(mg,{}),children:f.jsx(mg,{})})}),D.Children.map(t,b=>{var x;return f.jsx(S.ListItem,{sx:hm,children:D.isValidElement(b)?D.cloneElement(b,{filterValues:c,resource:u,selectedIds:d,sx:uI,...(x=b.props)!=null&&x.popover?{closePopover:i}:{}}):null})})]})})]})})}const dI=E.createContext({});dI.displayName="DatagridContext";function aq({children:e,value:t}){return f.jsx(dI.Provider,{value:t,children:e})}const lq=S.styled("div")(({theme:e})=>({padding:e.spacing(2)})),yl="ApplicaEmpty",ji={message:`${yl}-message`,icon:`${yl}-icon`,toolbar:`${yl}-toolbar`},cq=S.styled("span",{name:yl,slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,height:"calc(100vh - 200px)",[`& .${ji.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${ji.icon}`]:{fontSize:"9em",marginTop:"16px",marginBottom:"16px"},[`& .${ji.toolbar}`]:{textAlign:"center"}}));function md({actions:e,className:t,hasCreate:n,icon:r=f.jsx(Ue.DropboxOutlined,{className:ji.icon}),title:o,subtitle:i,sx:a,...c}){const{hasCreate:u}=q.useResourceDefinition(c),d=n??u,p=q.useResourceContext(c),g=q.useTranslate(),v=q.useGetResourceLabel(),y=g(`resources.${p}.forcedCaseName`,{smart_count:0,_:v(p,0)}),b=g("ra.page.empty",{name:y}),x=g("ra.page.invite");return f.jsxs(cq,{className:Be(`${yl}-root`,t),sx:a,children:[f.jsxs(S.Box,{className:ji.message,children:[r,f.jsx(S.Typography,{variant:"h4",paragraph:!0,children:o||g(`resources.${p}.empty`,{_:b})}),i||(d?f.jsx(S.Typography,{variant:"body1",children:g(`resources.${p}.invite`,{_:x})}):null)]}),f.jsx(lq,{className:ji.toolbar,children:e||(d?f.jsx(cE,{disableFloatingButton:!0}):null)})]})}const fI=f.jsx(L.BulkDeleteButton,{}),pI=D.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?L.PureDatagridBody:L.DatagridBody,header:o=L.DatagridHeader,children:i,className:a,empty:c,expand:u,bulkActionsToolbar:d=!1,bulkActionButtons:p=fI,hover:g,isRowSelectable:v,isRowExpandable:y,resource:b,rowClick:x,rowSx:w,rowStyle:A,size:j="small",sx:T,expandSingle:P=!1,...O}=e,_=q.useTranslate(),{sort:R,data:N,isLoading:Y,onSelect:X,onToggleItem:G,selectedIds:re,setSort:ne,total:Z}=q.useListContext(e),J=!!p,V=E.useMemo(()=>({isRowExpandable:y,expandSingle:P}),[y,P]),$=E.useRef(null);E.useEffect(()=>{(!re||re.length===0)&&($.current=null)},[JSON.stringify(re)]);const W=E.useCallback((U,ee)=>{const de=N.map(fe=>fe.id),ge=de.indexOf($.current);if($.current=ee.target.checked?U:null,ee.shiftKey&&ge!==-1){const fe=de.indexOf(U),he=de.slice(Math.min(ge,fe),Math.max(ge,fe)+1),me=ee.target.checked?kG(re,he):YG(re,he);X(v?me.filter(Se=>v(N.find(be=>be.id===Se))):me)}else G(U)},[N,v,X,G,re]),ie=f.jsx(md,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:f.jsx(S.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:_("ra.navigation.no_results")})});return Y===!0?f.jsx(L.DatagridLoading,{className:a,expand:u,hasBulkActions:J,nbChildren:D.Children.count(i),size:j}):N==null||N.length===0||Z===0?c||ie:f.jsx(aq,{value:V,children:f.jsxs(L.DatagridRoot,{sx:T,className:Be(L.DatagridClasses.root,a),children:[d!=null&&E.isValidElement(d)?E.cloneElement(d,{selectedIds:re,total:Z}):p!==!1?f.jsx(cI,{children:E.isValidElement(p)?p:fI}):null,f.jsx("div",{className:L.DatagridClasses.tableWrapper,children:f.jsxs(S.Table,{ref:t,className:L.DatagridClasses.table,size:j,...dq(O),children:[hI(o,{children:i,sort:R,data:N,hasExpand:!!u,hasBulkActions:J,isRowSelectable:v,onSelect:X,resource:b,selectedIds:re,setSort:ne},i),hI(r,{expand:u,rowClick:x,data:N,hasBulkActions:J,hover:g,onToggleItem:W,resource:b,rowSx:w,rowStyle:A,selectedIds:re,isRowSelectable:v},i)]})})]})})});function hI(e,t,n){return E.isValidElement(e)?E.cloneElement(e,t,n):E.createElement(e,t,n)}const uq=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"];function dq(e){return Object.keys(q.sanitizeListRestProps(e)).filter(t=>!uq.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{})}pI.displayName="Datagrid";const fq=ue(pI,{slot:"root"})(({theme:e})=>({"& .RaBulkActionsToolbar-toolbar":{height:48},"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",backgroundColor:"inherit !important",textTransform:"none",fontSize:e.typography.subtitle1.fontSize}}));function pq(e){return f.jsx(fq,{...e})}const gm=E.createContext({hasFilterSidebar:!1});function gI(){var e;return((e=E.useContext(gm))==null?void 0:e.hasFilterSidebar)??!1}function mm({source:e,value:t}){const n=E.useContext(L.FilterContext),r=L.useResourceContext(),o=E.useMemo(()=>n.find(u=>{var d;return E.isValidElement(u)&&((d=u.props)==null?void 0:d.source)===e}),[n,e]),i=E.useMemo(()=>E.isValidElement(o)?o.props:{},[o]);if(!(i!=null&&i.chip))throw new Error(`No chip component found for filter source "${e}". Ensure your filter components define a 'chip' prop.`);const a={...i,record:{[e]:t},value:t,resource:r};return E.isValidElement(i.chip)?E.cloneElement(i.chip,a):Ze.isFunction(i.chip)?E.createElement(i.chip,a):null}function hq(e){const{value:t,source:n,lastItem:r}=e,o=mm({source:n,value:t});return f.jsxs(S.Stack,{children:[f.jsx(S.ListItem,{alignItems:"flex-start",sx:{pl:0},children:f.jsx(S.ListItemText,{primary:o,sx:{my:0}})}),r===n?null:f.jsx(S.Divider,{})]})}function gq(){const{filterValues:e}=q.useListContext(),t=q.useTranslate();return f.jsxs(S.Stack,{mt:4,width:"100%",children:[f.jsx(S.Typography,{variant:"h6",fontWeight:"bold",color:"secondary",children:t("ra.title.selected_filters")}),f.jsx(S.List,{sx:{bgcolor:"background.paper",pt:0},children:e?Object.entries(e).map(([n,r])=>{const o=Object.entries(e).pop(),i=o?o[0]:"";return f.jsx(hq,{lastItem:i,value:r,source:n},n)}):null})]})}function mq(e){const{onClose:t,addQuery:n}=e,r=q.useTranslate(),{handleSubmit:o}=tn.useFormContext(),i=E.useCallback(a=>{n(a.queryName)},[n]);return f.jsxs(S.Toolbar,{sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[f.jsx(S.Button,{onClick:t,children:r("ra.action.cancel")}),f.jsx(S.Button,{variant:"contained",onClick:o(i),children:r("ra.action.save")})]})}function mI(e){const{open:t,onClose:n}=e,{filterValues:r,sort:o,perPage:i,displayedFilters:a,resource:c}=q.useListContext(),[u,d]=yS(c),p=q.useTranslate(),g=E.useCallback(y=>{const b={label:y.trim(),value:{filter:r,sort:o,perPage:i,displayedFilters:a}},x=bS(u);d(x.concat(b)),n()},[r,o,i,a,u,d,n]),v=E.useCallback(()=>y=>{if(u.some(b=>b.label===(y==null?void 0:y.trim())))return"ra.validation.already_exists"},[u]);return f.jsx(S.Dialog,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:f.jsxs(Bg,{toolbar:f.jsx(mq,{addQuery:g,onClose:n}),title:p("ra.title.save_favorite_filter"),modal:!0,children:[f.jsx(hr,{fullWidth:!0,source:"queryName",label:p("ra.input.query_name"),placeholder:p("ra.input.query_name_placeholder"),validate:[q.required(),v()]}),f.jsx(gq,{})]})})}function vI(){const[e,t]=E.useState(!1),n=q.useTranslate(),r=E.useCallback(()=>{t(!1)},[]),o=E.useCallback(()=>{t(!0)},[]);return f.jsxs(f.Fragment,{children:[f.jsx(S.Button,{sx:{height:"36px"},variant:"contained",onClick:o,children:n("ra.action.save_filter")}),f.jsx(mI,{open:e,onClose:r})]})}function vq(e){const{onDelete:t,value:n,source:r}=e,o=mm({source:r,value:n});return o&&f.jsx(S.Chip,{label:o,variant:"combined",color:"primary",sx:{height:"36px","& .MuiChip-deleteIcon":{fontSize:"1rem !important",mr:1}},deleteIcon:f.jsx(en.Close,{}),onDelete:t})}function yq(){const{filterValues:e,setFilters:t}=q.useListContext(),n=S.useTheme(),r=S.useMediaQuery(n.breakpoints.down("sm")),o=q.useTranslate(),i=E.useCallback(()=>{t({})},[t]),a=E.useCallback(u=>{const d={...e};delete d[u],t(d)},[e,t]),c=E.useCallback(()=>f.jsxs(S.Stack,{flexDirection:"row",gap:2,children:[f.jsx(vI,{}),f.jsx(S.Button,{variant:"outlined",onClick:i,children:o("ra.action.reset_filters")})]}),[i,o]);return f.jsxs(S.Stack,{gap:2,flexDirection:r?"column":"row",children:[f.jsxs(S.Stack,{flexDirection:"row",flexWrap:r?"nowrap":"wrap",gap:2,py:.5,overflow:"auto",width:r?window.innerWidth-58:"auto",children:[Object.entries(e).map(([u,d])=>f.jsx(vq,{source:u,value:d,onDelete:()=>a(u)},u)),r?null:f.jsx(c,{})]}),r?f.jsx(c,{}):null]})}function vm(){const{filterValues:e}=q.useListContext(),t=S.useTheme(),n=S.useMediaQuery(t.breakpoints.down("sm")),r=q.useTranslate();return e&&!Ze.isEmpty(e)?f.jsxs(S.Stack,{flexDirection:n?"column":"row",alignItems:"baseline",gap:2,m:n?2:0,children:[f.jsx(S.Typography,{variant:"h6",color:"secondary",whiteSpace:"nowrap",children:r("ra.title.active_filters")}),f.jsx(yq,{})]}):null}function yI({open:e,onClose:t,filterToRemove:n}){var b;const r=q.useTranslate(),{resource:o,filterValues:i,sort:a,perPage:c,displayedFilters:u}=q.useListContext(),d=((b=n==null?void 0:n.value)==null?void 0:b.filter)||i,p=(n==null?void 0:n.label)??"",[g,v]=L.useSavedQueries(o);function y(){const x={filter:d,sort:a,perPage:c,displayedFilters:u},w=L.extractValidSavedQueries(g),A=w.findIndex(j=>$a(j.value,x));v([...w.slice(0,A),...w.slice(A+1)]),t()}return f.jsxs(S.Dialog,{open:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[f.jsx(S.DialogTitle,{id:"alert-dialog-title",children:r("ra.saved_queries.remove_dialog_title",{label:p,_:"Remove saved query?"})}),f.jsx(S.DialogContent,{children:f.jsx(S.DialogContentText,{children:r("ra.saved_queries.remove_message",{_:"Are you sure you want to remove that item from your list of saved queries?"})})}),f.jsxs(S.DialogActions,{children:[f.jsx(S.Button,{onClick:t,children:r("ra.action.cancel")}),f.jsx(S.Button,{onClick:y,color:"primary",autoFocus:!0,children:r("ra.action.confirm")})]})]})}function bq(e){const{query:t}=e,[n,r]=E.useState(!1),o=E.useCallback(()=>{r(a=>!a)},[]),i=q.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsx(S.Button,{size:"small",color:"primary",onClick:o,children:i("ra.action.delete")}),f.jsx(yI,{open:n,onClose:o,filterToRemove:t})]})}function bI(e){const{closeSidebar:t}=e,{resource:n,setFilters:r,setSort:o,setPage:i,setPerPage:a}=q.useListContext(),[c,u]=E.useState(!1),d=pt(),[p]=yS(n),g=bS(p),v=q.useTranslate(),y=E.useCallback(()=>{u(x=>!x)},[]),b=E.useCallback(x=>{const{value:w}=x;r(w.filter),o({field:w.sort.field,order:w.sort.order}),i(1),a(w.perPage),t()},[r,o,i,a,t]);return p&&p.length>0?f.jsx(S.Box,{sx:{mt:"-1px",mb:2,"& .MuiAccordion-root":{borderColor:d.palette.divider,"& .Mui-expanded:last-of-type":{marginBottom:"inherit"},"& .MuiAccordionSummary-root":{bgcolor:"transparent",flexDirection:"row"},"& .MuiAccordionSummary-content":{justifyContent:"space-between",marginLeft:0},"& .MuiAccordionDetails-root":{borderColor:d.palette.divider},"& .MuiAccordionSummary-expandIconWrapper":{color:d.palette.text.primary,"&.Mui-expanded":{transform:"rotate(180deg)"}}}},children:f.jsxs(S.Accordion,{expanded:c,onChange:y,children:[f.jsx(S.AccordionSummary,{sx:{px:"20px"},expandIcon:f.jsx(Hw,{fontSize:"small"}),children:f.jsxs(S.Typography,{variant:"h5",fontWeight:"bold",children:[v("ra.action.saved_filters")," (",g.length,")"]})}),g==null?void 0:g.map((x,w)=>f.jsxs(S.AccordionDetails,{sx:{display:"flex",justifyContent:"space-between",px:"20px",alignItems:"center"},children:[f.jsx(S.Typography,{variant:"body1",children:x.label}),f.jsxs(S.Stack,{flexDirection:"row",alignItems:"center",children:[f.jsx(bq,{query:x}),f.jsx(S.Button,{size:"small",color:"primary",onClick:()=>b({value:x.value}),children:v("ra.action.apply")})]})]},w))]})}):f.jsx(S.Box,{height:16})}function xq(e){const{form:t,filters:n}=e,r=q.useResourceContext();return f.jsx(L.FilterContext.Provider,{value:Array.isArray(n)?n:[n],children:f.jsx(tn.FormProvider,{...t,children:f.jsx(S.Box,{px:"20px",children:n?(Array.isArray(n)?n:[n]).map((o,i)=>{const a={...o.props,display:"label"};return E.isValidElement(o)?f.jsx(S.Box,{mb:1,children:E.cloneElement(o,{...a,resource:r})},i):null}):null})})})}function vd(e){const{filters:t}=e,[n,r]=E.useState(!1),{setSidebarOpen:o,sidebarOpen:i}=ym(),{filterValues:a,setFilters:c}=q.useListContext(),u=q.useTranslate(),d=tn.useForm({defaultValues:a}),{handleSubmit:p,getValues:g,reset:v,watch:y}=d,b=y(),x=E.useMemo(()=>{const O={};return t&&(Array.isArray(t)?t:[t]).forEach(_=>{O[_.props.source]=(a==null?void 0:a[_.props.source])??""}),O},[t,a]);E.useEffect(()=>{const O=L.getFilterFormValues(g(),a),_=g();Ze.isEqual(O,_)||v(O)},[JSON.stringify(a),a,g,v]);const w=E.useCallback(()=>{Ze.isFunction(o)&&o(!1)},[o]),A=E.useCallback(O=>{c(O),w()},[c,w]),j=E.useCallback(()=>{v({}),c({})},[v,c]),T=E.useCallback(()=>{r(O=>!O),j(),setTimeout(()=>{r(!1)},1e3)},[j]),P=E.useMemo(()=>{const O=g();return Ze.isEmpty(x)||Ze.isEqual(O,x)},[x,g,b]);return f.jsxs(mr,{sx:{height:"100%"},open:i,onClose:w,children:[f.jsxs(mr.Header,{children:[f.jsx(mr.HeaderText,{primary:u("ra.action.add_filter")}),f.jsx(mr.HeaderAction,{children:f.jsx(p1,{variant:"text",loading:n,loadingPosition:"start",startIcon:f.jsx(Ue.ReloadOutlined,{}),onClick:T,children:u("ra.action.reset_filters")})})]}),f.jsxs(mr.Content,{children:[f.jsx(bI,{closeSidebar:w}),f.jsx(xq,{form:d,filters:t})]}),f.jsx(mr.Footer,{children:f.jsxs(S.Stack,{direction:"row",spacing:2,children:[f.jsx(S.Button,{fullWidth:!0,onClick:()=>{v({}),w()},children:u("ra.action.close")}),f.jsx(S.Button,{fullWidth:!0,disabled:P,variant:"contained",color:"primary",onClick:p(A),children:u("ra.action.apply_filters")})]})})]})}function Cq(){const{setSidebarOpen:e}=ym(),t=E.useContext(L.FilterContext),n=gI(),r=L.useTranslate(),o=S.useTheme(),i=S.useMediaQuery(o.breakpoints.down("sm"));if(!n)throw new Error("The <FilterSidebarButton> component requires the <List aside={<FilterSidebar />}> prop to be set");if(t===void 0)throw new Error("The <FilterSidebarButton> component requires the <List filters> prop to be set");const a=E.useCallback(()=>{Ze.isFunction(e)&&e(!0)},[e]);return i?f.jsxs(S.Button,{className:"add-filter",onClick:a,children:[f.jsx(en.FilterList,{sx:{fontSize:"1rem",mr:.5}}),f.jsx(S.Typography,{variant:"h6",children:r("ra.action.add_filter")})]}):f.jsx(Ii,{label:"ra.action.add_filter",onClick:a,children:f.jsx(en.FilterList,{})})}function xI(e){const{filters:t,actions:n,className:r,hasFilterSidebar:o,...i}=e,a=pt(),c=S.useMediaQuery(a.breakpoints.down("sm")),u=n?E.cloneElement(n,{...i,...n.props}):null,{filterValues:d}=q.useListContext();return Array.isArray(t)?f.jsx(gm.Provider,{value:{hasFilterSidebar:o},children:f.jsx(L.FilterContext.Provider,{value:t,children:c&&o?f.jsxs("div",{children:[u,Ze.isEmpty(d)?null:f.jsxs("div",{children:[f.jsx(S.Divider,{}),f.jsx(vm,{})]})]}):f.jsxs(CI,{className:r,children:[o?f.jsx(vm,{}):f.jsx(L.FilterForm,{}),f.jsx("span",{}),u]})})}):f.jsxs(CI,{className:r,children:[t?E.cloneElement(t,{...i,context:"form"}):null,f.jsx("span",{}),n?E.cloneElement(n,{...i,filters:t,...n.props}):null]})}xI.propTypes={filters:m.oneOfType([m.element,m.arrayOf(m.element)]),actions:m.oneOfType([m.bool,m.element]),exporter:m.oneOfType([m.func,m.bool])};const CI=ue("div",{name:"RaListToolbar",overridesResolver:e=>e.root})(({theme:e})=>({display:"flex",position:"relative",justifyContent:"space-between",alignItems:"flex-end",width:"100%",[e.breakpoints.down("sm")]:{backgroundColor:e.palette.background.paper,flexWrap:"inherit",flexDirection:"column-reverse"}})),wI=E.memo(xI),wq=f.jsx(L.ListActions,{}),Sq=f.jsx(L.Pagination,{}),Eq=f.jsx(md,{}),Tq=S.Card;function Aq(e){const{actions:t=wq,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:i,hasCreate:a,pagination:c=Sq,children:u,className:d,component:p=Tq,title:g,empty:v=Eq,...y}=e,{defaultTitle:b,data:x,error:w,isLoading:A,filterValues:j,resource:T}=q.useListContext(e),P=pt(),O=D.isValidElement(n)&&(n==null?void 0:n.type)!==vd,_=D.isValidElement(n)&&(n==null?void 0:n.type)===vd;if(!u||!x&&A&&i)return null;function R(J){return f.jsxs("div",{className:Qr.main,style:{border:O?"1px solid":"none",borderRadius:O?4:0,borderColor:O?P.palette.mode==="dark"?P.palette.divider:P.palette.grey.A800:"transparent",backgroundColor:O?P.palette.background.paper:"transparent"},children:[r||t?f.jsx(wI,{className:Qr.actions,filters:r,actions:t,hasCreate:a,hasFilterSidebar:_}):null,!w&&f.jsx(p,{className:Qr.content,sx:J?{background:"transparent"}:{},children:o&&u&&D.isValidElement(u)?E.cloneElement(u,{bulkActionButtons:o}):u}),w?f.jsx(vg,{error:w,resetErrorBoundary:null}):c!==!1&&c]})}function N(){return v!==!1&&E.cloneElement(v,{className:Qr.noResults,hasCreate:a})}const Y=!A&&(x==null?void 0:x.length)===0,X=!A&&(x==null?void 0:x.length)===0&&!Object.keys(j).length&&v!==!1,G=D.isValidElement(n),re=G&&(n==null?void 0:n.type)===vd,ne=A||X||G&&!re?D.Fragment:On,Z=!A&&!X&&(!n||re)?{content:!1}:void 0;return f.jsxs(Oq,{className:Be("list-page",d),...y,sx:Y?{"& .MuiPaper-root":{backgroundColor:"transparent",border:"none"},"& .RaList-actions":{border:"1px solid",borderRadius:`${P.shape.borderRadius}px`,borderColor:P.palette.mode==="dark"?P.palette.divider:P.palette.grey.A800,backgroundColor:P.palette.background.paper}}:{},children:[f.jsx(L.Title,{title:g,defaultTitle:b,preferenceKey:`${T}.list.title`}),f.jsx(ne,{...Z,children:A?f.jsx(S.CircularProgress,{sx:{position:"absolute",top:"50%",left:"50%",marginTop:"-20px",marginLeft:"-20px"}}):X?N():R(Y)}),O?f.jsx(Iq,{aside:n}):null,_?D.cloneElement(n,{filters:r}):null]})}function Iq({aside:e}){var r;const t=((r=e==null?void 0:e.props)==null?void 0:r.order)??-1,n=pt();return f.jsx(S.Card,{className:Qr.asideCard,sx:{order:t,mr:t===-1?2:0,ml:t!==-1?2:0,width:200,border:"1px solid",borderRadius:1,borderColor:n.palette.mode==="dark"?n.palette.divider:n.palette.grey.A800,backgroundColor:n.palette.background.paper,backgroundImage:"none"},children:f.jsx(S.CardContent,{sx:{pt:1},children:E.cloneElement(e,{})})})}const zs="RaList",Qr={main:`${zs}-main`,content:`${zs}-content`,actions:`${zs}-actions`,noResults:`${zs}-noResults`,asideCard:`${zs}-asideCard`},Oq=ue("div",{name:zs,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex","& >.MuiPaper-root":{flex:1},[`& .${Qr.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${Qr.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${Qr.actions}`]:{},[`& .${Qr.noResults}`]:{alignContent:"center"},[`& .${Qr.asideCard}`]:{[e.breakpoints.down("md")]:{display:"none"},[`& .${L.SavedQueriesListClasses.floatingIcon}`]:{fontSize:"1.125rem"},[`& .${L.SavedQueriesListClasses.floatingTooltip}`]:{top:"-1.2em"},"& form":{marginTop:e.spacing(2)}}})),SI=E.createContext({sidebarOpen:!1,setSidebarOpen:()=>{}});function EI(e){const[t,n]=E.useState(!1);return f.jsx(SI.Provider,{value:{sidebarOpen:t,setSidebarOpen:n},children:e.children})}function ym(){return E.useContext(SI)}function Pq({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=jq,filterDefaultValues:i,perPage:a=10,queryOptions:c,resource:u,sort:d,storeKey:p,...g}){return f.jsx(q.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:i,perPage:a,queryOptions:c,resource:u,sort:d,storeKey:p,children:f.jsx(EI,{children:f.jsx(Aq,{...g})})})}const jq={},kq=Na(Pq,{slot:"root"})(({theme:e})=>({"& .RaList-main":{overflowX:"auto","& .RaBulkActionsToolbar-toolbar":{height:36,top:42,paddingTop:16,"& .RaBulkActionsToolbar-title":{alignItems:"end","& .MuiTypography-root":{alignSelf:"center"}}},"& .MuiToolbar-root":{"& form":{padding:e.spacing(2),paddingBottom:e.spacing(2),alignItems:"flex-start"}},"& .MuiButton-root":{margin:0},"& .RaList-actions":{minHeight:80,alignItems:"center",padding:e.spacing(2.5),[e.breakpoints.down("sm")]:{flexDirection:"row"},"& form":{alignItems:"center",minHeight:"auto",paddingBottom:0,rowGap:e.spacing(2.5)},"& .RaFilterForm-filterFormInput":{margin:0,"& .MuiInputLabel-root":{paddingTop:0},"& .MuiFormControl-root":{marginTop:0},"& .ra-input":{alignSelf:"center",marginTop:0},[e.breakpoints.down("sm")]:{"&>.MuiStack-root":{width:"100%","&>div:not(.MuiStack-root)":{width:"100%"}}}},"& .RaFilterFormInput-hideButton":{margin:"0 !important",alignSelf:"center"},"& > .MuiToolbar-root":{flex:"unset",padding:0,alignSelf:"center",minHeight:"fit-content",[e.breakpoints.down("sm")]:{paddingBottom:e.spacing(2)}}},"& .RaList-content":{borderRadius:0,"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}},"& .ApplicaEmpty-root":{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"calc(100vh - 260px)"}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}}));function Mq(e){return f.jsx(kq,{...e,pagination:f.jsx(pm,{})})}function Fq(){const e=L.useRefresh(),t=L.useNotify(),n=L.useResourceContext(),r=L.useUnselectAll(n),{selectedIds:o,data:i}=L.useListContext(),a=L.useRecordContext(),c=o.map(g=>i.find(v=>v.id===g)),[u,{isLoading:d}]=L.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Or().toISOString()},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),r()},onError:()=>t("ra.notification.readed_error",{type:"warning"}),onFailure:()=>t("ra.notification.readed_error",{type:"warning"})}),p=E.useCallback(()=>{u()},[u]);return f.jsx(L.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:p,children:f.jsx(en.Email,{})})}function _q(){const e=L.useRefresh(),t=L.useNotify(),n=L.useResourceContext(),r=L.useUnselectAll(n),{selectedIds:o,data:i}=L.useListContext(),a=L.useRecordContext(),c=o.map(g=>i.find(v=>v.id===g)).concat([a]),[u,{isLoading:d}]=L.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:null},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),r()},onFailure:()=>t("resources.notifications.messages.unreaded.error",{type:"warning"})}),p=E.useCallback(()=>{u()},[u]);return f.jsx(L.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:p,children:f.jsx(en.Drafts,{})})}function Rq(e){const t=L.useRecordContext(e),n=L.useResourceContext(e),r=L.useRedirect(),o=L.useNotify(),i=L.useTranslate(),[a]=L.useLocaleState(),c=E.useMemo(()=>t!=null&&t.readed?Or(t==null?void 0:t.readed).locale(a).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,a]),[u]=L.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Or().toISOString()}},{onSuccess:()=>{t!=null&&t.resource&&(t!=null&&t.resource.startsWith("/")?r(t==null?void 0:t.resource):document.location.href=t==null?void 0:t.resource)},onError:()=>{o("ra.notification.readed_error",{type:"warning"})}}),d=E.useCallback(()=>u(),[u]);return f.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[f.jsx(S.Typography,{variant:"subtitle1",children:f.jsxs(S.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),f.jsx(S.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),c?f.jsx(S.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:i("ra.notification.readed",{readed:c})}):null]})}function Dq({...e}){const t=S.useTheme(),{mode:n,colorize:r,density:o}=E.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?S.darken:S.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]);function i(a){return{backgroundColor:a!=null&&a.readed?r(t.palette.secondary[n],o):r(t.palette.primary[n],o)}}return f.jsxs(L.Datagrid,{...e,rowSx:i,children:[f.jsx(Rq,{source:"notification",sortable:!1}),f.jsx(bE,{source:"created"}),f.jsxs(No,{children:[f.jsx(Fq,{}),f.jsx(_q,{})]})]})}function Lq({empty:e,...t}){const n=L.useTranslate(),r=f.jsx(md,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:f.jsx(S.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:n("ra.navigation.no_results")})});return f.jsx(L.SimpleList,{...t,empty:e||r})}function Bq({children:e}){const t=pt();return f.jsx(On,{sx:{maxWidth:{xs:400,lg:475},margin:{xs:2.5,md:3},"& > *":{flexGrow:1,flexBasis:"50%"}},content:!1,border:!1,boxShadow:!0,shadow:t.customShadows.z1,children:f.jsx(S.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})}function yd({version:e,name:t,copy:n,children:r,logo:o,background:i=pu,footer:a=!0}){return f.jsxs(S.Box,{children:[f.jsx(cm,{source:"default"}),E.isValidElement(i)?i:E.createElement(i),f.jsxs(S.Grid,{container:!0,direction:"column",justifyContent:"flex-end",children:[f.jsx(S.Grid,{item:!0,xs:12,sx:{ml:3},children:o||f.jsx(um,{title:t})}),f.jsxs(S.Grid,{item:!0,xs:12,children:[f.jsx(S.Grid,{item:!0,xs:12,container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:{xs:"calc(100vh - 210px)",sm:"calc(100vh - 134px)",md:"calc(100vh - 112px)"}},children:f.jsx(S.Grid,{item:!0,children:f.jsx(Bq,{children:r})})}),a?f.jsx(S.Grid,{item:!0,sx:{pb:1,position:"absolute",bottom:0,ml:2},children:f.jsx(lm,{name:t,copy:n,version:e})}):null]})]})]})}function Nq({name:e,copy:t,logo:n,version:r,background:o}){const i=q.useTranslate(),a=q.useAuthProvider(),c=q.useNotify(),u=ut.useNavigate(),{token:d}=ut.useParams();return E.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(d).then(()=>{c("ra.auth.activate_success",{type:"info"}),te.delay(()=>u("/login"),1e3)}).catch(p=>{c(p,{type:"error"}),te.delay(()=>u("/login"),1e3)})},[d,a,c,u]),f.jsx(yd,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:i("ra.auth.activate")}),f.jsx(S.Typography,{component:ut.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:i("ra.auth.back_to_login")})]})}),f.jsx(S.Grid,{item:!0,xs:12,children:i("ra.auth.activate_pending")})]})})}function TI(){const e=E.useCallback(()=>location.reload(),[]);return f.jsx(S.Container,{children:f.jsxs(S.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[f.jsx("img",{alt:"Error",src:v1,style:{width:"100%",maxWidth:450}}),f.jsx(S.Typography,{variant:"h2",children:"Ops! An error occurred..."}),f.jsx(S.Typography,{children:"We're fixing the problem. Please try again later."}),f.jsx(S.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}function AI({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:i=!1,redirectTo:a,background:c=f.jsx(pu,{})}){const[u,d]=q.useSafeSetState(!1),p=q.useLogin(),g=q.useTranslate(),v=q.useNotify(),y=q.useCheckAuth(),b=ut.useNavigate();E.useEffect(()=>{y({},!1).then(()=>{b("/")}).catch(()=>{})},[y,b]);function x(w){d(!0),p(w,a).then(()=>{d(!1)}).catch(A=>{d(!1),v(typeof A=="string"?A:typeof A>"u"||!A.message?"ra.auth.sign_in_error":A.message,{type:"error",messageArgs:{_:typeof A=="string"?A:A&&A.message?A.message:void 0}})})}return f.jsx(yd,{name:t,version:e,copy:n,logo:r,background:c,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:"Login"}),i?f.jsx(S.Typography,{component:ut.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:g("ra.auth.register")}):null]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(q.Form,{onSubmit:x,children:[f.jsxs(S.Grid,{container:!0,children:[f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(hr,{autoFocus:!0,source:"username",label:g("ra.auth.username"),autoComplete:"username",validate:q.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(hr,{source:"password",label:g("ra.auth.password"),type:"password",autoComplete:"current-password",validate:q.required(),placeholder:g("ra.auth.password_placeholder"),fullWidth:!0})})]}),o?f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:f.jsx(S.Link,{variant:"h6",component:ut.Link,to:"/recover",color:"text.primary",children:g("ra.auth.forgot_password")})})}):null,f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Button,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0,children:u?f.jsx(S.CircularProgress,{size:19,thickness:3}):g("ra.auth.sign_in")})})]})})]})})}function Vq({name:e,copy:t,logo:n,version:r,background:o}){const[i,a]=E.useState(!1),c=q.useTranslate(),u=q.useRedirect(),d=q.useNotify(),p=q.useAuthProvider();function g({email:v}){a(!0),p.recover(v).then(y=>{const b=`ra.auth.recover_${y.responseCode}`,x=y.responseCode==="ok"?"info":"error";d(b,{type:x}),u("/login")}).catch(y=>{d((y==null?void 0:y.message)||(y==null?void 0:y.toString()),{type:"error"})}).finally(()=>a(!1))}return f.jsx(yd,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:c("ra.auth.recover.title")}),f.jsx(S.Typography,{component:ut.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.back_to_login")})]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(L.Form,{onSubmit:g,children:[f.jsx(S.Grid,{container:!0,children:f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(hr,{source:"email",validate:[q.required(),q.email()]})})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:f.jsx(S.Typography,{variant:"caption",children:c("ra.auth.recover.inbox_help")})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?f.jsx(S.CircularProgress,{size:19,thickness:3}):c("ra.auth.recover")})})]})})]})})}function Wq({name:e,copy:t,version:n,logo:r,background:o}){const[i,a]=E.useState(!1),c=q.useTranslate(),u=q.useRedirect(),d=q.useNotify(),p=q.useAuthProvider();function g(v){a(!0),p.register(v).then(y=>{const b=`ra.auth.register_${y.responseCode}`,x=y.responseCode==="ok"?"info":"error";d(b,{type:x}),u("/login")}).catch(y=>{d(y,{type:"error"})}).finally(()=>a(!1))}return f.jsx(yd,{name:e,copy:t,logo:r,background:o,version:n,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:c("ra.auth.register.title")}),f.jsx(S.Typography,{component:ut.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.already_have_account")})]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(L.Form,{onSubmit:g,children:[f.jsxs(S.Grid,{container:!0,children:[f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(hr,{source:"name",label:c("ra.register.name"),validate:q.required()})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(hr,{source:"email",type:"email",validate:[q.required(),q.email()]})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(hr,{source:"password",type:"password",validate:q.required()})})]}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?f.jsx(S.CircularProgress,{size:19,thickness:3}):c("ra.auth.create_account")})})]})})]})})}function zq(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 Uq(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function Hq(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:f.jsx(Ue.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 ki({color:e,theme:t}){const n=nn(t,e),{lighter:r,light:o,main:i}=n;return{borderColor:et(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:i}}}function Gq(e){const t=ki({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":ki({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":ki({color:"secondary",theme:e}),"&.MuiAlert-borderError":ki({color:"error",theme:e}),"&.MuiAlert-borderSuccess":ki({color:"success",theme:e}),"&.MuiAlert-borderInfo":ki({color:"info",theme:e}),"&.MuiAlert-borderWarning":ki({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 Yq(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function Kq(e){var t;return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},popper:{border:`1px solid ${e.palette.mode==="dark"?(t=e.palette.dark)==null?void 0:t.main:e.palette.grey[100]}`},clearIndicator:{width:"auto",height:"auto"}}}}}function Mi({color:e,theme:t}){const n=nn(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function Xq(e){const t=Mi({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Mi({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Mi({color:"secondary",theme:e}),"&.MuiBadge-colorError":Mi({color:"error",theme:e}),"&.MuiBadge-colorInfo":Mi({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Mi({color:"success",theme:e}),"&.MuiBadge-colorWarning":Mi({color:"warning",theme:e})}}}}}function tt({variant:e,color:t,theme:n}){const r=nn(n,t),{lighter:o,main:i,dark:a,contrastText:c}=r,u=`${t}Button`,d=bs(n,u),p={"&::after":{boxShadow:`0 0 5px 5px ${et(i,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${et(i,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...p};case"shadow":return{color:c,backgroundColor:i,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:a},...p};case"outlined":return{borderColor:i,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...p};case"dashed":return{color:i,borderColor:i,backgroundColor:o,"&:hover":{color:a,borderColor:a},...p};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...p}}}function Zq(e){const t=tt({variant:"dashed",color:"primary",theme:e}),n=tt({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":tt({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":tt({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":tt({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":tt({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":tt({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":tt({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":tt({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":tt({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":tt({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":tt({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":tt({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":tt({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:tt({variant:"contained",color:"primary",theme:e}),containedSecondary:tt({variant:"contained",color:"secondary",theme:e}),containedError:tt({variant:"contained",color:"error",theme:e}),containedSuccess:tt({variant:"contained",color:"success",theme:e}),containedInfo:tt({variant:"contained",color:"info",theme:e}),containedWarning:tt({variant:"contained",color:"warning",theme:e}),outlinedPrimary:tt({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:tt({variant:"outlined",color:"secondary",theme:e}),outlinedError:tt({variant:"outlined",color:"error",theme:e}),outlinedSuccess:tt({variant:"outlined",color:"success",theme:e}),outlinedInfo:tt({variant:"outlined",color:"info",theme:e}),outlinedWarning:tt({variant:"outlined",color:"warning",theme:e}),textPrimary:tt({variant:"text",color:"primary",theme:e}),textSecondary:tt({variant:"text",color:"secondary",theme:e}),textError:tt({variant:"text",color:"error",theme:e}),textSuccess:tt({variant:"text",color:"success",theme:e}),textInfo:tt({variant:"text",color:"info",theme:e}),textWarning:tt({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function Qq(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function Jq(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function qq(){return{MuiCard:{styleOverrides:{root:{boxShadow:"none"}}}}}function $q(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Us({color:e,theme:t}){const n=nn(t,e),{lighter:r,main:o,dark:i}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${i}`,outlineOffset:-4}}}function e$(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 bm(e){const t=e$(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function t$(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(Ue.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(Ue.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...bm("small")},"&.size-medium":{...bm("medium")},"&.size-large":{...bm("large")}},colorPrimary:Us({color:"primary",theme:e}),colorSecondary:Us({color:"secondary",theme:e}),colorSuccess:Us({color:"success",theme:e}),colorWarning:Us({color:"warning",theme:e}),colorInfo:Us({color:"info",theme:e}),colorError:Us({color:"error",theme:e})}}}}function Hs({color:e,theme:t}){const n=nn(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Xn({color:e,theme:t}){const n=nn(t,e),{light:r,lighter:o,main:i}=n;return{color:i,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:i,"&:hover":{color:r}}}}function n$(e){const t=Xn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":Hs({color:"primary",theme:e}),"&.MuiChip-colorSecondary":Hs({color:"secondary",theme:e}),"&.MuiChip-colorError":Hs({color:"error",theme:e}),"&.MuiChip-colorInfo":Hs({color:"info",theme:e}),"&.MuiChip-colorSuccess":Hs({color:"success",theme:e}),"&.MuiChip-colorWarning":Hs({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":Xn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":Xn({color:"secondary",theme:e}),"&.MuiChip-lightError":Xn({color:"error",theme:e}),"&.MuiChip-lightInfo":Xn({color:"info",theme:e}),"&.MuiChip-lightSuccess":Xn({color:"success",theme:e}),"&.MuiChip-lightWarning":Xn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":Xn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":Xn({color:"secondary",theme:e}),"&.MuiChip-combinedError":Xn({color:"error",theme:e}),"&.MuiChip-combinedInfo":Xn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":Xn({color:"success",theme:e}),"&.MuiChip-combinedWarning":Xn({color:"warning",theme:e})}}}}}function r$(e){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:et("#000",.7)},"& .MuiCardContent-root":{[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}},"& .MuiPaper-root:has(.tabbed-form)":{overflowY:"unset",width:"100%"}}}}}}function o$(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function i$(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function Gs({color:e,theme:t}){const n=nn(t,e),{main:r,dark:o,contrastText:i}=n,a=`${e}Button`,c=bs(t,a);return{color:i,backgroundColor:r,boxShadow:c,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${et(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${et(r,.9)}`}}}function s$(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":Gs({color:"primary",theme:e}),"&.MuiFab-secondary":Gs({color:"secondary",theme:e}),"&.Mui-error":Gs({color:"error",theme:e}),"&.MuiFab-success":Gs({color:"success",theme:e}),"&.MuiFab-info":Gs({color:"info",theme:e}),"&.MuiFab-warning":Gs({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 a$(e){return{MuiIconButton:{styleOverrides:{root:{borderRadius:4},sizeLarge:{width:e.spacing(5.5),height:e.spacing(5.5),fontSize:"1.25rem"},sizeMedium:{width:e.spacing(4.5),height:e.spacing(4.5),fontSize:"1rem"},sizeSmall:{width:e.spacing(3.75),height:e.spacing(3.75),fontSize:"0.75rem"},sizeExtraSmall:{width:e.spacing(2.6875),height:e.spacing(2.6875),fontSize:"0.625rem"}}}}}function l$(e){return{MuiInputBase:{styleOverrides:{}}}}function c$(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1.3em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function u$(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function d$(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function f$(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function p$(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function h$(e){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function g$(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Fi({variant:e,theme:t}){const n=nn(t,e),{light:r}=n,o=bs(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function m$(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:{...Fi({variant:"primary",theme:e}),"&.Mui-error":{...Fi({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:Fi({variant:"secondary",theme:e}),colorError:Fi({variant:"error",theme:e}),colorWarning:Fi({variant:"warning",theme:e}),colorInfo:Fi({variant:"info",theme:e}),colorSuccess:Fi({variant:"success",theme:e})}}}}function v$(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function Et({variant:e,color:t,theme:n}){const r=nn(n,t),{lighter:o,light:i,dark:a,main:c,contrastText:u}=r,d={"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:u,backgroundColor:c,"&:hover":{backgroundColor:i},...d};case"outlined":return{borderColor:c,"&:hover":{backgroundColor:o,borderColor:i},...d};case"text":default:return{color:c,"&:hover":{backgroundColor:c,color:o},...d}}}function y$(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":Et({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":Et({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":Et({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":Et({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":Et({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":Et({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":Et({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":Et({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":Et({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":Et({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":Et({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":Et({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":Et({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":Et({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":Et({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":Et({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":Et({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":Et({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":Et({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":Et({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":Et({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":Et({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":Et({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":Et({variant:"outlined",color:"warning",theme:e})}}}}}}function b$(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function Ys({color:e,theme:t}){const n=nn(t,e),{lighter:r,main:o,dark:i}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${i}`,outlineOffset:-4}}}function x$(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 xm(e){const t=x$(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function C$(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:f.jsx(S.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":{...xm("small")},"&.size-medium":{...xm("medium")},"&.size-large":{...xm("large")}},colorPrimary:Ys({color:"primary",theme:e}),colorSecondary:Ys({color:"secondary",theme:e}),colorSuccess:Ys({color:"success",theme:e}),colorWarning:Ys({color:"warning",theme:e}),colorInfo:Ys({color:"info",theme:e}),colorError:Ys({color:"error",theme:e})}}}}function Ks({color:e,theme:t}){const n=nn(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function w$(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":Ks({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":Ks({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":Ks({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":Ks({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":Ks({color:"info",theme:e}),"&.MuiSlider-thumbColorError":Ks({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 S$(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 Cm(e,t){const n=S$(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 E$(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},...Cm(e,"medium")},sizeLarge:{...Cm(e,"large")},sizeSmall:{...Cm(e,"small")}}}}}function T$(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 A$(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 I$(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 O$(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function P$(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function j$(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function k$(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function M$(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function F$(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 _$(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function R$(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function D$(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function L$(e){return Ze.merge(zq(e),Uq(e),Hq(e),Gq(e),Yq(),Kq(e),Xq(e),Zq(e),Qq(),Jq(),qq(),$q(),t$(e),n$(e),r$(e),o$(e),i$(),s$(e),a$(e),l$(),c$(e),u$(),d$(),f$(e),p$(e),h$(),g$(),m$(e),v$(),y$(e),b$(e),C$(e),w$(e),E$(e),T$(e),A$(e),I$(e),O$(e),P$(e),j$(),k$(),M$(),F$(e),_$(e),R$(),D$())}function B$(e){const{blue:t,red:n,gold:r,cyan:o,green:i,grey:a}=e,c={0:a[0],50:a[1],100:a[2],200:a[3],300:a[4],400:a[5],500:a[6],600:a[7],700:a[8],800:a[9],900:a[10],A50:a[15],A100:a[11],A200:a[12],A400:a[13],A700:a[14],A800:a[16]},u="#fff";return{primary:{lighter:t[0],100:t[1],200:t[2],light:t[3],400:t[4],main:t[5],dark:t[6],700:t[7],darker:t[8],900:t[9],contrastText:u},secondary:{lighter:c[100],100:c[100],200:c[200],light:c[300],400:c[400],main:c[500],600:c[600],dark:c[700],800:c[800],darker:c[900],A100:c[0],A200:c.A400,A300:c.A700,contrastText:c[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:u},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:c[100]},info:{lighter:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:u},success:{lighter:i[0],light:i[3],main:i[5],dark:i[7],darker:i[9],contrastText:u},grey:c}}function N$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],c=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],u=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(i=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],c=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],u=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function V$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function W$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function z$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function U$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function H$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function G$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Y$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function K$(e,t,n){switch(t){case"theme1":return N$(e,n);case"theme2":return V$(e,n);case"theme3":return W$(e,n);case"theme4":return z$(e,n);case"theme5":return U$(e,n);case"theme6":return H$(e,n);case"theme7":return G$(e,n);case"theme8":return Y$(e,n);default:return B$(e)}}var wm=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];wm.primary=wm[5];var Sm=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Sm.primary=Sm[5];var Em=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Em.primary=Em[5];var Tm=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Tm.primary=Tm[5];var Am=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Am.primary=Am[5];var Im=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Im.primary=Im[5];var Om=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Om.primary=Om[5];var Pm=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Pm.primary=Pm[5];var jm=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];jm.primary=jm[5];var km=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];km.primary=km[5];var Mm=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Mm.primary=Mm[5];var Fm=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Fm.primary=Fm[5];var _m=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];_m.primary=_m[5];var X$={red:wm,volcano:Sm,orange:Em,gold:Tm,yellow:Am,lime:Im,green:Om,cyan:Pm,blue:jm,geekblue:km,purple:Mm,magenta:Fm,grey:_m},Rm=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Rm.primary=Rm[5];var Dm=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];Dm.primary=Dm[5];var Lm=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];Lm.primary=Lm[5];var Bm=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];Bm.primary=Bm[5];var Nm=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];Nm.primary=Nm[5];var Vm=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];Vm.primary=Vm[5];var Wm=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];Wm.primary=Wm[5];var zm=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];zm.primary=zm[5];var Um=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];Um.primary=Um[5];var Hm=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];Hm.primary=Hm[5];var Gm=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];Gm.primary=Gm[5];var Ym=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];Ym.primary=Ym[5];var Km=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];Km.primary=Km[5];var Z$={red:Rm,volcano:Dm,orange:Lm,gold:Bm,yellow:Nm,lime:Vm,green:Wm,cyan:zm,blue:Um,geekblue:Hm,purple:Gm,magenta:Ym,grey:Km};function Q$(e,t){const n=e==="dark"?Z$:X$;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],i=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],i=["#121212","#d3d8db"]),n.grey=[...r,...o,...i];const a=K$(n,t,e);return Fp({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?et(a.grey[900],.87):a.grey[700],secondary:e==="dark"?et(a.grey[900],.45):a.grey[500],disabled:e==="dark"?et(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?et(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})}function J$(e){return{button:e.palette.mode==="dark"?"0 2px 0 rgb(0 0 0 / 5%)":"0 2px #0000000b",text:"0 -1px 0 rgb(0 0 0 / 12%)",z0:"none",z1:e.palette.mode==="dark"?"0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)":`0px 1px 4px ${et(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${et(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${et(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${et(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${et(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${et(e.palette.info.main,.2)}`,success:`0 0 0 2px ${et(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${et(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${et(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${et(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${et(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${et(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${et(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${et(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${et(e.palette.grey[500],.2)}`}}function q$(e){return{htmlFontSize:16,fontFamily:e,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:600,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:600,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{lineHeight:1.66},button:{textTransform:"capitalize"}}}function Xm({themeOverrides:e,children:t}){const n=Cn(),{themeDirection:r,mode:o,presetColor:i,fontFamily:a}=n,c=oE(),u=E.useMemo(()=>o==="auto"?c:o,[o,c]),d=E.useMemo(()=>Q$(u,i),[u,i]),p=E.useMemo(()=>q$(a),[a]),g=E.useMemo(()=>J$(d),[d]),v=E.useMemo(()=>te.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:d.palette,customShadows:g,typography:p,components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:d.spacing(2.6875),height:d.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(d):e),[r,d,p,g,e]),y=Fp(v),b=te.cloneDeep(y.components??{});return y.components=te.merge(L$(y),b),f.jsx(S.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(AC,{theme:y,children:[f.jsx(S.CssBaseline,{enableColorScheme:!0}),t]})})}function $$({children:e,theme:t,...n}){return f.jsx(L.CoreAdminContext,{...n,children:f.jsx(Xm,{themeOverrides:t,children:f.jsx(aI,{children:e})})})}function II(e){const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:i,disableTelemetry:a,history:c,i18nProvider:u,layout:d,loading:p,loginPage:g,authCallbackPage:v,menu:y,notification:b,queryClient:x,requireAuth:w,store:A=L.localStorageStore(),ready:j,theme:T,title:P="React Admin"}=e;return f.jsx($$,{authProvider:t,dataProvider:i,i18nProvider:u,store:A,history:c,queryClient:x,theme:T,children:f.jsx(L.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:y,catchAll:n,title:P,loading:p,loginPage:g,authCallbackPage:v,notification:b,requireAuth:w,ready:j,children:r})})}class OI{constructor({catch:t,display:n,log:r,error:o}){zl(this,"catch");zl(this,"display");zl(this,"log");zl(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}class eee{constructor(t){Io(this,bl);Io(this,xl);Io(this,Xs,new Set);const{apiUrl:n}=t??{};if(!te.isString(n)||te.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");si(this,xl,n),si(this,bl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var c;const{message:n,filename:r,lineno:o,colno:i}=t,a=`${n}${r}${o}${i}`;Nn(this,Xs).has(a)||(Nn(this,Xs).add(a),fetch(`${Nn(this,xl)}/ui/error-log`,{method:"PUT",headers:Nn(this,bl),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(c=t.error)==null?void 0:c.stack})}).catch(u=>{console.warn("Unable to send error to server",u),Nn(this,Xs).delete(a)}))}}bl=new WeakMap,xl=new WeakMap,Xs=new WeakMap;function tee({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=i=>new OI({catch:i!=null,display:!1,log:i!=null,error:i}),...o}){const i=D.useMemo(()=>o.errorHandler?o.errorHandler:new eee({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=D.useCallback(function(u,...d){var g;if(!u)return!1;const p=r(u instanceof ErrorEvent?u:(g=u==null?void 0:u.toString())==null?void 0:g.replace(/%s/g,()=>d.shift()));return p.isCatched()||(p.logError()&&(u instanceof ErrorEvent?i.handle(u):i.handle(new ErrorEvent("window.onerror",{error:u,message:u.toString()}))),p.displayError()&&a.apply(console,arguments)),!1},[r,i,a]);return D.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c,a]),!0}class nee{constructor(t){Io(this,Cl);Io(this,wl);Io(this,Ri,[]);const{apiUrl:n}=t??{};if(!te.isString(n)||te.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");si(this,wl,n),si(this,Cl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!te.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!te.isString(n)||te.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!te.isString(r)||te.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!te.some(Nn(this,Ri),o=>te.isEqual(o,{code:n,lang:r}))){Nn(this,Ri).push({code:n,lang:r}),fetch(`${Nn(this,wl)}/i18n/message`,{method:"put",headers:Nn(this,Cl),body:JSON.stringify({code:n,lang:r,text:n})}).then(o=>o.json()).then(()=>{console.log(`[MissingMessageHandler] handleMessage: created message for lang ${r} and code ${n}`)}).catch(o=>{console.error(o),si(this,Ri,te.reject(Nn(this,Ri),i=>te.isEqual(i,{code:n,lang:r})))});return}}}Cl=new WeakMap,wl=new WeakMap,Ri=new WeakMap;function PI(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,i=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),c=new nee({apiUrl:t});function u(){return fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(g=>g.json()).catch(()=>Promise.resolve(i))}function d(){return fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(g=>g.json()).then(g=>g.reduce((v,y)=>({...v,[y.lang]:{...v[y.lang]||{},[y.code]:y.text}}),{}))}function p(g,v,y){return r||console.error(`Warning: Missing translation for key: "${g}"`),o&&(te.isString(g)?g.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${g}`):c.handleMessage({code:g,lang:y}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),g}return Promise.all([u(),d()]).then(g=>{const[v,y]=g;function b(x){return te.get(y,x,{})}return gv(b,n,v,{allowMissing:r||o,onMissingKey:p})})}function ree(e){const{defaultLocale:t,path:n}=e,r=[{locale:t,name:t}],o=new Headers({Accept:"application/json","Content-Type":"application/json"});function i(){return fetch(`${n}/languages.json`,{headers:o,method:"get"}).then(c=>c.json()).catch(()=>Promise.resolve(r))}function a(){return fetch(`${n}/messages.json`,{headers:o,method:"get"}).then(c=>c.json()).then(c=>c.reduce((u,d)=>({...u,[d.lang]:{...u[d.lang]||{},[d.code]:d.text}}),{}))}return Promise.all([i(),a()]).then(c=>{const[u,d]=c;function p(g){return te.get(d,g,{})}return gv(p,t,u,{allowMissing:!0})})}function oee({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})}){const[r,o]=E.useState({loading:!0,languages:null});return E.useEffect(()=>{const i=new Headers;i.append("Accept","application/json"),i.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:i}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r}function jI(e){const[t,n]=E.useState(),r=rE(e);return E.useEffect(()=>{if(e.customProvider!==void 0){e.customProvider.then(n);return}PI(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r,e==null?void 0:e.customProvider]),t}const iee=new Xi.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function see({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:i,logoIcon:a,loginPage:c=f.jsx(AI,{version:"0.0.0",name:"Applica",redirectTo:"/",background:f.jsx(pu,{})}),menu:u,name:d,copy:p,version:g="0.0.0",dataProvider:v,authProvider:y,i18nProvider:b,errorHandler:x,error:w,enableNotification:A=!1,enableRegistration:j=!1,enablePasswordRecover:T=!1,enableThemeToggler:P=!1,enableLocaleSwitcher:O=!1,queryClient:_=iee,background:R,notificationAPI:N="entities/notification",...Y}){tee({apiUrl:n,errorHandler:x,catcherFn:ne=>{const Z=ne==null?void 0:ne.toString(),V=["Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.","Support for defaultProps will be removed from function components in a future major release.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>.","Missing translation for key:","HttpError: "].some(W=>Z==null?void 0:Z.includes(W));return new OI({catch:V,display:!V,log:!V&&o===!0,error:Z})}});const X=E.useMemo(()=>E.isValidElement(c)?E.cloneElement(c,{name:d,copy:p,logo:i,version:g,background:R,enableRegistration:j,enablePasswordRecover:T}):c,[c,d,g,p,R,i,j,T]),G=E.useMemo(()=>ne=>{const Z=d?f.jsx(um,{title:d}):i,J=d?f.jsx(lI,{title:d}):a;return f.jsx(QA,{...ne,name:d,copy:p,version:g,logoMain:Z,logoIcon:J,notification:N,enableThemeToggler:P,enableNotification:A,enableLocaleSwitcher:O,error:w})},[i,a,d,p,g,w,N,A,P,O]),re=jI({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o,customProvider:b});return re===void 0?f.jsx(f.Fragment,{}):re.error?f.jsx(Rg,{initialConfig:t,children:f.jsx(Xm,{themeOverrides:e,children:f.jsx(TI,{})})}):f.jsx(EK,{children:f.jsx(AS,{menu:u,children:f.jsx(Rg,{initialConfig:t,children:f.jsx(II,{theme:e,layout:G,notification:$A,queryClient:_,dataProvider:v,authProvider:y,i18nProvider:re,loginPage:X,...Y})})})})}Object.defineProperty(k,"ArrayField",{enumerable:!0,get:()=>L.ArrayField}),Object.defineProperty(k,"ArrayInputContext",{enumerable:!0,get:()=>L.ArrayInputContext}),Object.defineProperty(k,"BooleanField",{enumerable:!0,get:()=>L.BooleanField}),Object.defineProperty(k,"ChipField",{enumerable:!0,get:()=>L.ChipField}),Object.defineProperty(k,"Confirm",{enumerable:!0,get:()=>L.Confirm}),Object.defineProperty(k,"CreateContextProvider",{enumerable:!0,get:()=>L.CreateContextProvider}),Object.defineProperty(k,"CustomRoutes",{enumerable:!0,get:()=>L.CustomRoutes}),Object.defineProperty(k,"DeleteWithUndoButton",{enumerable:!0,get:()=>L.DeleteWithUndoButton}),Object.defineProperty(k,"EditButton",{enumerable:!0,get:()=>L.EditButton}),Object.defineProperty(k,"EditContextProvider",{enumerable:!0,get:()=>L.EditContextProvider}),Object.defineProperty(k,"FieldTitle",{enumerable:!0,get:()=>L.FieldTitle}),Object.defineProperty(k,"FilterButton",{enumerable:!0,get:()=>L.FilterButton}),Object.defineProperty(k,"FilterList",{enumerable:!0,get:()=>L.FilterList}),Object.defineProperty(k,"FilterListItem",{enumerable:!0,get:()=>L.FilterListItem}),Object.defineProperty(k,"FilterLiveSearch",{enumerable:!0,get:()=>L.FilterLiveSearch}),Object.defineProperty(k,"Form",{enumerable:!0,get:()=>L.Form}),Object.defineProperty(k,"FormDataConsumer",{enumerable:!0,get:()=>L.FormDataConsumer}),Object.defineProperty(k,"HttpError",{enumerable:!0,get:()=>L.HttpError}),Object.defineProperty(k,"I18nContextProvider",{enumerable:!0,get:()=>L.I18nContextProvider}),Object.defineProperty(k,"ListBase",{enumerable:!0,get:()=>L.ListBase}),Object.defineProperty(k,"LoadingIndicator",{enumerable:!0,get:()=>L.LoadingIndicator}),Object.defineProperty(k,"RaSimpleFormIterator",{enumerable:!0,get:()=>L.SimpleFormIterator}),Object.defineProperty(k,"RecordContextProvider",{enumerable:!0,get:()=>L.RecordContextProvider}),Object.defineProperty(k,"ReferenceArrayField",{enumerable:!0,get:()=>L.ReferenceArrayField}),Object.defineProperty(k,"ReferenceField",{enumerable:!0,get:()=>L.ReferenceField}),Object.defineProperty(k,"Resource",{enumerable:!0,get:()=>L.Resource}),Object.defineProperty(k,"ResourceContextProvider",{enumerable:!0,get:()=>L.ResourceContextProvider}),Object.defineProperty(k,"SaveButton",{enumerable:!0,get:()=>L.SaveButton}),Object.defineProperty(k,"SavedQueriesList",{enumerable:!0,get:()=>L.SavedQueriesList}),Object.defineProperty(k,"SimpleFormIteratorContext",{enumerable:!0,get:()=>L.SimpleFormIteratorContext}),Object.defineProperty(k,"SimpleShowLayout",{enumerable:!0,get:()=>L.SimpleShowLayout}),Object.defineProperty(k,"SingleFieldList",{enumerable:!0,get:()=>L.SingleFieldList}),Object.defineProperty(k,"TabbedFormTabs",{enumerable:!0,get:()=>L.TabbedFormTabs}),Object.defineProperty(k,"UrlField",{enumerable:!0,get:()=>L.UrlField}),Object.defineProperty(k,"ValidationError",{enumerable:!0,get:()=>L.ValidationError}),Object.defineProperty(k,"WithListContext",{enumerable:!0,get:()=>L.WithListContext}),Object.defineProperty(k,"choices",{enumerable:!0,get:()=>L.choices}),Object.defineProperty(k,"email",{enumerable:!0,get:()=>L.email}),Object.defineProperty(k,"maxLength",{enumerable:!0,get:()=>L.maxLength}),Object.defineProperty(k,"maxValue",{enumerable:!0,get:()=>L.maxValue}),Object.defineProperty(k,"minLength",{enumerable:!0,get:()=>L.minLength}),Object.defineProperty(k,"minValue",{enumerable:!0,get:()=>L.minValue}),Object.defineProperty(k,"number",{enumerable:!0,get:()=>L.number}),Object.defineProperty(k,"regex",{enumerable:!0,get:()=>L.regex}),Object.defineProperty(k,"required",{enumerable:!0,get:()=>L.required}),Object.defineProperty(k,"useArrayInput",{enumerable:!0,get:()=>L.useArrayInput}),Object.defineProperty(k,"useAuthProvider",{enumerable:!0,get:()=>L.useAuthProvider}),Object.defineProperty(k,"useCheckAuth",{enumerable:!0,get:()=>L.useCheckAuth}),Object.defineProperty(k,"useChoices",{enumerable:!0,get:()=>L.useChoices}),Object.defineProperty(k,"useChoicesContext",{enumerable:!0,get:()=>L.useChoicesContext}),Object.defineProperty(k,"useCreate",{enumerable:!0,get:()=>L.useCreate}),Object.defineProperty(k,"useCreateContext",{enumerable:!0,get:()=>L.useCreateContext}),Object.defineProperty(k,"useCreateController",{enumerable:!0,get:()=>L.useCreateController}),Object.defineProperty(k,"useCreateSuggestionContext",{enumerable:!0,get:()=>L.useCreateSuggestionContext}),Object.defineProperty(k,"useDataProvider",{enumerable:!0,get:()=>L.useDataProvider}),Object.defineProperty(k,"useDeleteMany",{enumerable:!0,get:()=>L.useDeleteMany}),Object.defineProperty(k,"useEditContext",{enumerable:!0,get:()=>L.useEditContext}),Object.defineProperty(k,"useEditController",{enumerable:!0,get:()=>L.useEditController}),Object.defineProperty(k,"useGetIdentity",{enumerable:!0,get:()=>L.useGetIdentity}),Object.defineProperty(k,"useGetList",{enumerable:!0,get:()=>L.useGetList}),Object.defineProperty(k,"useGetMany",{enumerable:!0,get:()=>L.useGetMany}),Object.defineProperty(k,"useGetManyReference",{enumerable:!0,get:()=>L.useGetManyReference}),Object.defineProperty(k,"useGetOne",{enumerable:!0,get:()=>L.useGetOne}),Object.defineProperty(k,"useInput",{enumerable:!0,get:()=>L.useInput}),Object.defineProperty(k,"useListContext",{enumerable:!0,get:()=>L.useListContext}),Object.defineProperty(k,"useListController",{enumerable:!0,get:()=>L.useListController}),Object.defineProperty(k,"useLocaleState",{enumerable:!0,get:()=>L.useLocaleState}),Object.defineProperty(k,"useLocales",{enumerable:!0,get:()=>L.useLocales}),Object.defineProperty(k,"useLogin",{enumerable:!0,get:()=>L.useLogin}),Object.defineProperty(k,"useLogout",{enumerable:!0,get:()=>L.useLogout}),Object.defineProperty(k,"useNotify",{enumerable:!0,get:()=>L.useNotify}),Object.defineProperty(k,"usePermissions",{enumerable:!0,get:()=>L.usePermissions}),Object.defineProperty(k,"useRecordContext",{enumerable:!0,get:()=>L.useRecordContext}),Object.defineProperty(k,"useReferenceArrayFieldController",{enumerable:!0,get:()=>L.useReferenceArrayFieldController}),Object.defineProperty(k,"useRefresh",{enumerable:!0,get:()=>L.useRefresh}),Object.defineProperty(k,"useRemoveFromStore",{enumerable:!0,get:()=>L.useRemoveFromStore}),Object.defineProperty(k,"useResetStore",{enumerable:!0,get:()=>L.useResetStore}),Object.defineProperty(k,"useResourceContext",{enumerable:!0,get:()=>L.useResourceContext}),Object.defineProperty(k,"useResourceDefinition",{enumerable:!0,get:()=>L.useResourceDefinition}),Object.defineProperty(k,"useResourceDefinitions",{enumerable:!0,get:()=>L.useResourceDefinitions}),Object.defineProperty(k,"useSafeSetState",{enumerable:!0,get:()=>L.useSafeSetState}),Object.defineProperty(k,"useShowContext",{enumerable:!0,get:()=>L.useShowContext}),Object.defineProperty(k,"useShowController",{enumerable:!0,get:()=>L.useShowController}),Object.defineProperty(k,"useSimpleFormIterator",{enumerable:!0,get:()=>L.useSimpleFormIterator}),Object.defineProperty(k,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>L.useSimpleFormIteratorItem}),Object.defineProperty(k,"useStore",{enumerable:!0,get:()=>L.useStore}),Object.defineProperty(k,"useStoreContext",{enumerable:!0,get:()=>L.useStoreContext}),Object.defineProperty(k,"useTranslate",{enumerable:!0,get:()=>L.useTranslate}),Object.defineProperty(k,"useTranslateLabel",{enumerable:!0,get:()=>L.useTranslateLabel}),Object.defineProperty(k,"useUnselect",{enumerable:!0,get:()=>L.useUnselect}),Object.defineProperty(k,"useUnselectAll",{enumerable:!0,get:()=>L.useUnselectAll}),Object.defineProperty(k,"useUpdate",{enumerable:!0,get:()=>L.useUpdate}),Object.defineProperty(k,"useUpdateMany",{enumerable:!0,get:()=>L.useUpdateMany}),Object.defineProperty(k,"withLifecycleCallbacks",{enumerable:!0,get:()=>L.withLifecycleCallbacks}),k.ActionsField=IK,k.ActionsMenu=No,k.ActivatePage=Nq,k.ActiveFiltersChips=vm,k.AddTableRow=Kg,k.Admin=II,k.AnimateButton=uk,k.AppBarStyled=jA,k.ApplicaAdmin=see,k.ArrayInput=AK,k.AttachmentField=gE,k.AttachmentInput=qK,k.AuthBackground=pu,k.AutocompleteArrayInput=eX,k.AutocompleteInput=nX,k.Avatar=Xc,k.BooleanInput=oX,k.Breadcrumbs=BC,k.BulkActionsToolbar=cI,k.BulkDeleteWithConfirmButton=aE,k.BulkFloatingActionsToolbar=sq,k.Button=Ii,k.CardForm=sE,k.ChangePasswordButton=DA,k.ChangePasswordForm=Vg,k.CircularWithLabel=cR,k.CircularWithPath=uR,k.CoverField=vE,k.Create=DX,k.CreateButton=cE,k.CreateButtonClasses=ed,k.CreateInDialogButton=yK,k.Datagrid=pq,k.DateAgoField=bE,k.DateField=DK,k.DateInput=aX,k.DateTimeInput=cX,k.DeleteWithConfirmButton=ll,k.Dot=rh,k.Drawer=PA,k.DrawerHeader=uT,k.DrawerHeaderStyled=lT,k.DrawerToggle=FA,k.Edit=NX,k.EditInDialogButton=CK,k.EmailField=BK,k.Empty=md,k.EmptyClasses=ji,k.Error=vg,k.Field=qE,k.FileField=xE,k.FileInput=dX,k.FilterSidebar=vd,k.FilterSidebarButton=Cq,k.FilterSidebarContext=gm,k.Footer=lm,k.FormHeader=zX,k.FunctionField=VK,k.GenericErrorPage=TI,k.Header=_A,k.HeaderButton=kA,k.HeaderIconButton=EJ,k.HeaderNotification=RA,k.HeaderProfile=NA,k.HeaderSpacer=WA,k.HeaderToggleButton=Vs,k.HorizontalBar=zA,k.IconButton=eu,k.ImageField=mE,k.ImageInput=fX,k.ImpersonateUserButton=wK,k.LabeledArrayInput=pE,k.LabeledInput=dn,k.Layout=QA,k.LayoutContent=aT,k.LayoutProvider=oT,k.LayoutWrapper=ZA,k.LinearWithIcon=dR,k.LinearWithLabel=fR,k.List=Mq,k.ListItem=oq,k.ListToolbar=wI,k.ListViewProvider=EI,k.Loadable=zJ,k.Loader=qA,k.LoadingButton=p1,k.LocalStorage=JS,k.LocaleButton=MA,k.LocalizedTextField=zK,k.LocalizedTextInput=gX,k.LoginPage=AI,k.Logo=cT,k.LogoutButton=LA,k.LongForm=_t,k.MainCard=On,k.MainIcon=um,k.MenuConfigProvider=AS,k.MenuPopover=m1,k.NavCollapse=ml,k.NavGroup=GA,k.NavItem=gl,k.NavList=YA,k.NavMenu=UA,k.Navigation=KA,k.Notification=$A,k.NotificationList=Dq,k.NumberInput=vX,k.OnboardingActionType=Ws,k.OnboardingContext=dm,k.OnboardingModes=vl,k.OnboardingProvider=XJ,k.OnboardingTip=qJ,k.Pagination=pm,k.PaginationActions=fm,k.PopupTransition=lR,k.RadioButtonGroupInput=bX,k.ReadonlyField=YK,k.RecordInput=xX,k.RecoverPage=Vq,k.ReferenceArrayInput=CX,k.ReferenceInput=wX,k.ReferenceManyField=wE,k.ReferenceManyInput=SX,k.RegisterPage=Wq,k.RemoveSavedQueryDialog=yI,k.ResponsiveSection=VA,k.SaveFiltersButton=vI,k.SaveFiltersDialog=mI,k.SavedFiltersList=bI,k.ScrollTop=aI,k.ScrollX=nq,k.SearchInput=TX,k.SelectArrayInput=IX,k.SelectInput=PX,k.ShadowBox=rq,k.Show=oZ,k.Sidebar=mr,k.SimpleBar=OA,k.SimpleForm=Bg,k.SimpleFormIterator=sZ,k.SimpleList=Lq,k.SizeField=ZK,k.SmallIcon=lI,k.SmartTextInput=jX,k.StopImpersonateButton=BA,k.StyledArrow=h1,k.TabbedForm=Yg,k.TableCreateButton=Zg,k.TableFormIterator=od,k.TableFormIteratorContext=Qg,k.TableFormIteratorItem=eT,k.TableFormIteratorItemContext=Xg,k.TextField=CE,k.TextInput=hr,k.ThemeColor=cm,k.ThemeContext=_g,k.ThemeCustomizationProvider=Xm,k.ThemeProvider=Rg,k.ThemeToggler=XA,k.TimeInput=_X,k.Toolbar=Ho,k.Tooltip=fu,k.TopToolbar=JA,k.Transitions=Bo,k.WizardForm=nT,k.createI18nProvider=PI,k.createJsonI18nProvider=ree,k.getLocalizedValue=kg,k.getPosition=g1,k.getThemeColor=nn,k.getThemeShadow=bs,k.localizedValueHasAllLocales=Ju,k.localizedValueHasAtLeastOneLocale=qS,k.onboardingModesSchema=tI,k.onboardingTopicSchema=eI,k.parseTime=tE,k.useBreadcrumbs=IS,k.useGetChipValue=mm,k.useGetLocalizedValue=XY,k.useI18nLanguages=oee,k.useI18nProvider=jI,k.useIsEnabledSidebarFilter=gI,k.useLayoutContext=Jg,k.useLayoutDispatch=wZ,k.useLayoutDrawerState=Oi,k.useLayoutLogoState=sT,k.useLayoutMediaState=Gn,k.useLayoutNotificationsState=sd,k.useLayoutState=Rs,k.useLayoutThemeState=SZ,k.useListViewContext=ym,k.useLocalStorage=Mg,k.useLocalizedValue=KY,k.useMemoizedObject=rE,k.useMenu=bg,k.useMenuConfig=sl,k.useMenuContext=zu,k.useOnboardingDataProvider=nI,k.useOnboardingTip=iI,k.usePopoverState=_s,k.useRefDimensions=ZY,k.useResourceDefaultValues=LX,k.useResourceTitle=Fg,k.useRestartOnboarding=QJ,k.useSx=Ir,k.useSystemTheme=oE,k.useTableFormIterator=$E,k.useTableFormIteratorItem=JE,k.useThemeConfig=Cn,k.useThemeContext=Dg,k.useWizardFormContext=id,k.uuid=rY,k.walkChildren=qu,k.withLayoutProvider=iT,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
225
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var hn={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},Fn={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},Ds={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},WZ={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},zZ=function(t){switch(t){case hn.Mobile:return{isMobile:!0};case hn.Tablet:return{isTablet:!0};case hn.SmartTv:return{isSmartTV:!0};case hn.Console:return{isConsole:!0};case hn.Wearable:return{isWearable:!0};case hn.Browser:return{isBrowser:!0};case hn.Embedded:return{isEmbedded:!0};default:return WZ}},UZ=function(t){return hT(t)},De=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},rm=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},om=function(t){var n=rm();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},HZ=function(t,n,r,o,i){return{isBrowser:t,browserMajorVersion:De(n.major),browserFullVersion:De(n.version),browserName:De(n.name),engineName:De(r.name),engineVersion:De(r.version),osName:De(o.name),osVersion:De(o.version),userAgent:De(i)}},yT=function(t,n,r,o){return OZ({},t,{vendor:De(n.vendor),model:De(n.model),os:De(r.name),osVersion:De(r.version),ua:De(o)})},GZ=function(t,n,r,o){return{isSmartTV:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},YZ=function(t,n,r,o){return{isConsole:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},KZ=function(t,n,r,o){return{isWearable:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},XZ=function(t,n,r,o,i){return{isEmbedded:t,vendor:De(n.vendor),model:De(n.model),engineName:De(r.name),engineVersion:De(r.version),osName:De(o.name),osVersion:De(o.version),userAgent:De(i)}};function ZZ(e){var t=e?fl(e):gT,n=t.device,r=t.browser,o=t.engine,i=t.os,a=t.ua,c=zZ(n.type),u=c.isBrowser,d=c.isMobile,p=c.isTablet,g=c.isSmartTV,v=c.isConsole,y=c.isWearable,b=c.isEmbedded;if(u)return HZ(u,r,o,i,a);if(g)return GZ(g,o,i,a);if(v)return YZ(v,o,i,a);if(d||p)return yT(c,n,i,a);if(y)return KZ(y,o,i,a);if(b)return XZ(b,n,o,i,a)}var bT=function(t){var n=t.type;return n===hn.Mobile},xT=function(t){var n=t.type;return n===hn.Tablet},CT=function(t){var n=t.type;return n===hn.Mobile||n===hn.Tablet},wT=function(t){var n=t.type;return n===hn.SmartTv},ld=function(t){var n=t.type;return n===hn.Browser},ST=function(t){var n=t.type;return n===hn.Wearable},ET=function(t){var n=t.type;return n===hn.Console},TT=function(t){var n=t.type;return n===hn.Embedded},AT=function(t){var n=t.vendor;return De(n)},IT=function(t){var n=t.model;return De(n)},OT=function(t){var n=t.type;return De(n,"browser")},PT=function(t){var n=t.name;return n===Ds.Android},jT=function(t){var n=t.name;return n===Ds.Windows},kT=function(t){var n=t.name;return n===Ds.MAC_OS},MT=function(t){var n=t.name;return n===Ds.WindowsPhone},FT=function(t){var n=t.name;return n===Ds.IOS},_T=function(t){var n=t.version;return De(n)},RT=function(t){var n=t.name;return De(n)},DT=function(t){var n=t.name;return n===Fn.Chrome},LT=function(t){var n=t.name;return n===Fn.Firefox},BT=function(t){var n=t.name;return n===Fn.Chromium},cd=function(t){var n=t.name;return n===Fn.Edge},NT=function(t){var n=t.name;return n===Fn.Yandex},VT=function(t){var n=t.name;return n===Fn.Safari||n===Fn.MobileSafari},WT=function(t){var n=t.name;return n===Fn.MobileSafari},zT=function(t){var n=t.name;return n===Fn.Opera},UT=function(t){var n=t.name;return n===Fn.InternetExplorer||n===Fn.Ie},HT=function(t){var n=t.name;return n===Fn.MIUI},GT=function(t){var n=t.name;return n===Fn.SamsungBrowser},YT=function(t){var n=t.version;return De(n)},KT=function(t){var n=t.major;return De(n)},XT=function(t){var n=t.name;return De(n)},ZT=function(t){var n=t.name;return De(n)},QT=function(t){var n=t.version;return De(n)},JT=function(){var t=rm(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},Ls=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},qT=function(){var t=rm();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},Zr=function(){return om("iPad")},$T=function(){return om("iPhone")},eA=function(){return om("iPod")},tA=function(t){return De(t)};function nA(e){var t=e||gT,n=t.device,r=t.browser,o=t.os,i=t.engine,a=t.ua;return{isSmartTV:wT(n),isConsole:ET(n),isWearable:ST(n),isEmbedded:TT(n),isMobileSafari:WT(r)||Zr(),isChromium:BT(r),isMobile:CT(n)||Zr(),isMobileOnly:bT(n),isTablet:xT(n)||Zr(),isBrowser:ld(n),isDesktop:ld(n),isAndroid:PT(o),isWinPhone:MT(o),isIOS:FT(o)||Zr(),isChrome:DT(r),isFirefox:LT(r),isSafari:VT(r),isOpera:zT(r),isIE:UT(r),osVersion:_T(o),osName:RT(o),fullBrowserVersion:YT(r),browserVersion:KT(r),browserName:XT(r),mobileVendor:AT(n),mobileModel:IT(n),engineName:ZT(i),engineVersion:QT(i),getUA:tA(a),isEdge:cd(r)||Ls(a),isYandex:NT(r),deviceType:OT(n),isIOS13:qT(),isIPad13:Zr(),isIPhone13:$T(),isIPod13:eA(),isElectron:JT(),isEdgeChromium:Ls(a),isLegacyEdge:cd(r)&&!Ls(a),isWindows:jT(o),isMacOs:kT(o),isMIUI:HT(r),isSamsungBrowser:GT(r)}}var rA=wT(Yn),oA=ET(Yn),iA=ST(Yn),QZ=TT(Yn),JZ=WT(pn)||Zr(),qZ=BT(pn),ud=CT(Yn)||Zr(),sA=bT(Yn),aA=xT(Yn)||Zr(),lA=ld(Yn),$Z=ld(Yn),cA=PT(Yo),uA=MT(Yo),dA=FT(Yo)||Zr(),eQ=DT(pn),tQ=LT(pn),nQ=VT(pn),rQ=zT(pn),fA=UT(pn),oQ=_T(Yo),iQ=RT(Yo),sQ=YT(pn),aQ=KT(pn),lQ=XT(pn),cQ=AT(Yn),uQ=IT(Yn),dQ=ZT($g),fQ=QT($g),pQ=tA(dl),hQ=cd(pn)||Ls(dl),gQ=NT(pn),mQ=OT(Yn),vQ=qT(),yQ=Zr(),bQ=$T(),xQ=eA(),CQ=JT(),wQ=Ls(dl),SQ=cd(pn)&&!Ls(dl),EQ=jT(Yo),TQ=kT(Yo),AQ=HT(pn),IQ=GT(pn),OQ=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=fl(t),r=n.device,o=n.browser,i=n.os,a=n.engine,c=n.ua;return nA({device:r,browser:o,os:i,engine:a,ua:c})},PQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return cA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},jQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return lA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},kQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return fA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},MQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return dA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},FQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return ud?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},_Q=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return aA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},RQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return uA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},DQ=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=gr(t,["renderWithFragment","children","viewClassName","style"]);return sA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},LQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return rA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},BQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return oA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},NQ=function(t){var n=t.renderWithFragment,r=t.children,o=gr(t,["renderWithFragment","children"]);return iA?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",o,r):null},VQ=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,i=gr(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?ht.createElement(fn.Fragment,null,r):ht.createElement("div",i,r):null};function WQ(e){return function(t){FZ(n,t);function n(r){var o;return PZ(this,n),o=RZ(this,tm(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(ad(o)),o.onOrientationChange=o.onOrientationChange.bind(ad(o)),o.onPageLoad=o.onPageLoad.bind(ad(o)),o.state={isLandscape:!1,isPortrait:!1},o}return kZ(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var o=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:o===0,isLandscape:o===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":pl(window))!==void 0&&ud&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return ht.createElement(e,em({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(ht.Component)}function zQ(){var e=fn.useState(function(){var i=window.innerWidth>window.innerHeight?90:0;return{isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"}}),t=DZ(e,2),n=t[0],r=t[1],o=fn.useCallback(function(){var i=window.innerWidth>window.innerHeight?90:0,a={isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return fn.useEffect(function(){return(typeof window>"u"?"undefined":pl(window))!==void 0&&ud&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),n}function pA(e){var t=e||window.navigator.userAgent;return fl(t)}function UQ(e){var t=e||window.navigator.userAgent,n=pA(t),r=nA(n);return[r,n]}Te.AndroidView=PQ,Te.BrowserTypes=Fn;var HQ=Te.BrowserView=jQ;Te.ConsoleView=BQ,Te.CustomView=VQ,Te.IEView=kQ,Te.IOSView=MQ,Te.MobileOnlyView=DQ;var GQ=Te.MobileView=FQ;Te.OsTypes=Ds,Te.SmartTVView=LQ,Te.TabletView=_Q,Te.WearableView=NQ,Te.WinPhoneView=RQ,Te.browserName=lQ,Te.browserVersion=aQ,Te.deviceDetect=ZZ,Te.deviceType=mQ,Te.engineName=dQ,Te.engineVersion=fQ,Te.fullBrowserVersion=sQ,Te.getSelectorsByUserAgent=OQ,Te.getUA=pQ,Te.isAndroid=cA,Te.isBrowser=lA,Te.isChrome=eQ,Te.isChromium=qZ,Te.isConsole=oA,Te.isDesktop=$Z,Te.isEdge=hQ,Te.isEdgeChromium=wQ,Te.isElectron=CQ,Te.isEmbedded=QZ,Te.isFirefox=tQ,Te.isIE=fA,Te.isIOS=dA,Te.isIOS13=vQ,Te.isIPad13=yQ,Te.isIPhone13=bQ,Te.isIPod13=xQ,Te.isLegacyEdge=SQ,Te.isMIUI=AQ,Te.isMacOs=TQ,Te.isMobile=ud,Te.isMobileOnly=sA,Te.isMobileSafari=JZ,Te.isOpera=rQ,Te.isSafari=nQ,Te.isSamsungBrowser=IQ,Te.isSmartTV=rA,Te.isTablet=aA,Te.isWearable=iA,Te.isWinPhone=uA,Te.isWindows=EQ,Te.isYandex=gQ,Te.mobileModel=uQ,Te.mobileVendor=cQ,Te.osName=iQ,Te.osVersion=oQ,Te.parseUserAgent=fl,Te.setUserAgent=UZ,Te.useDeviceData=pA,Te.useDeviceSelectors=UQ,Te.useMobileOrientation=zQ,Te.withOrientationChange=WQ;var YQ=typeof global=="object"&&global&&global.Object===Object&&global,KQ=typeof self=="object"&&self&&self.Object===Object&&self,hA=YQ||KQ||Function("return this")(),dd=hA.Symbol,gA=Object.prototype,XQ=gA.hasOwnProperty,ZQ=gA.toString,hl=dd?dd.toStringTag:void 0;function QQ(e){var t=XQ.call(e,hl),n=e[hl];try{e[hl]=void 0;var r=!0}catch{}var o=ZQ.call(e);return r&&(t?e[hl]=n:delete e[hl]),o}var JQ=Object.prototype,qQ=JQ.toString;function $Q(e){return qQ.call(e)}var eJ="[object Null]",tJ="[object Undefined]",mA=dd?dd.toStringTag:void 0;function nJ(e){return e==null?e===void 0?tJ:eJ:mA&&mA in Object(e)?QQ(e):$Q(e)}function rJ(e){return e!=null&&typeof e=="object"}var oJ="[object Symbol]";function iJ(e){return typeof e=="symbol"||rJ(e)&&nJ(e)==oJ}var sJ=/\s/;function aJ(e){for(var t=e.length;t--&&sJ.test(e.charAt(t)););return t}var lJ=/^\s+/;function cJ(e){return e&&e.slice(0,aJ(e)+1).replace(lJ,"")}function fd(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vA=NaN,uJ=/^[-+]0x[0-9a-f]+$/i,dJ=/^0b[01]+$/i,fJ=/^0o[0-7]+$/i,pJ=parseInt;function yA(e){if(typeof e=="number")return e;if(iJ(e))return vA;if(fd(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=fd(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=cJ(e);var n=dJ.test(e);return n||fJ.test(e)?pJ(e.slice(2),n?2:8):uJ.test(e)?vA:+e}var im=function(){return hA.Date.now()},hJ="Expected a function",gJ=Math.max,mJ=Math.min;function pd(e,t,n){var r,o,i,a,c,u,d=0,p=!1,g=!1,v=!0;if(typeof e!="function")throw new TypeError(hJ);t=yA(t)||0,fd(n)&&(p=!!n.leading,g="maxWait"in n,i=g?gJ(yA(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v);function y(_){var R=r,N=o;return r=o=void 0,d=_,a=e.apply(N,R),a}function b(_){return d=_,c=setTimeout(A,t),p?y(_):a}function x(_){var R=_-u,N=_-d,Y=t-R;return g?mJ(Y,i-N):Y}function w(_){var R=_-u,N=_-d;return u===void 0||R>=t||R<0||g&&N>=i}function A(){var _=im();if(w(_))return j(_);c=setTimeout(A,x(_))}function j(_){return c=void 0,v&&r?y(_):(r=o=void 0,a)}function T(){c!==void 0&&clearTimeout(c),d=0,r=u=o=c=void 0}function P(){return c===void 0?a:j(im())}function O(){var _=im(),R=w(_);if(r=arguments,o=this,u=_,R){if(c===void 0)return b(u);if(g)return clearTimeout(c),c=setTimeout(A,t),y(u)}return c===void 0&&(c=setTimeout(A,t)),a}return O.cancel=T,O.flush=P,O}var vJ="Expected a function";function yJ(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(vJ);return fd(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),pd(e,t,{leading:r,maxWait:t,trailing:o})}var Bs=function(){return Bs=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Bs.apply(this,arguments)};function bA(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function xA(e){return!e||!e.ownerDocument?document:e.ownerDocument}var CA=function(e){var t={},n=Array.prototype.reduce.call(e,function(r,o){var i=o.name.match(/data-simplebar-(.+)/);if(i){var a=i[1].replace(/\W+(.)/g,function(c,u){return u.toUpperCase()});switch(o.value){case"true":r[a]=!0;break;case"false":r[a]=!1;break;case void 0:r[a]=!0;break;default:r[a]=o.value}}return r},t);return n};function wA(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function SA(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function EA(e){return".".concat(e.split(" ").join("."))}var sm=!!(typeof window<"u"&&window.document&&window.document.createElement),bJ=Object.freeze({__proto__:null,addClasses:wA,canUseDOM:sm,classNamesToQuery:EA,getElementDocument:xA,getElementWindow:bA,getOptions:CA,removeClasses:SA}),Ns=null,TA=null;sm&&window.addEventListener("resize",function(){TA!==window.devicePixelRatio&&(TA=window.devicePixelRatio,Ns=null)});function AA(){if(Ns===null){if(typeof document>"u")return Ns=0,Ns;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),Ns=n}return Ns}var Ko=bA,am=xA,xJ=CA,Xo=wA,Zo=SA,_n=EA,hd=function(){function e(t,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var o=Ko(r.el);r.scrollXTicking||(o.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(o.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,Xo(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){Zo(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(Xo(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){Zo(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(o){r.mouseX=o.clientX,r.mouseY=o.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(o){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var i,a;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(i=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(a=r.isWithinBounds(r.axis.y.track.rect)),(i||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(i&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(o,"x"):r.onTrackClick(o,"x")),a&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(o,"y"):r.onTrackClick(o,"y"))))}},this.drag=function(o){var i,a,c,u,d,p,g,v,y,b,x;if(!(!r.draggedAxis||!r.contentWrapperEl)){var w,A=r.axis[r.draggedAxis].track,j=(a=(i=A.rect)===null||i===void 0?void 0:i[r.axis[r.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,T=r.axis[r.draggedAxis].scrollbar,P=(u=(c=r.contentWrapperEl)===null||c===void 0?void 0:c[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&u!==void 0?u:0,O=parseInt((p=(d=r.elStyles)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&p!==void 0?p:"0px",10);o.preventDefault(),o.stopPropagation(),r.draggedAxis==="y"?w=o.pageY:w=o.pageX;var _=w-((v=(g=A.rect)===null||g===void 0?void 0:g[r.axis[r.draggedAxis].offsetAttr])!==null&&v!==void 0?v:0)-r.axis[r.draggedAxis].dragOffset;_=r.draggedAxis==="x"&&r.isRtl?((b=(y=A.rect)===null||y===void 0?void 0:y[r.axis[r.draggedAxis].sizeAttr])!==null&&b!==void 0?b:0)-T.size-_:_;var R=_/(j-T.size),N=R*(P-O);r.draggedAxis==="x"&&r.isRtl&&(N=!((x=e.getRtlHelpers())===null||x===void 0)&&x.isScrollingToNegative?-N:N),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=N}},this.onEndDrag=function(o){r.isDragging=!1;var i=am(r.el),a=Ko(r.el);o.preventDefault(),o.stopPropagation(),Zo(r.el,r.classNames.dragging),r.onStopScrolling(),i.removeEventListener("mousemove",r.drag,!0),i.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=a.setTimeout(function(){i.removeEventListener("click",r.preventClick,!0),i.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=Bs(Bs({},e.defaultOptions),n),this.classNames=Bs(Bs({},e.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=yJ(this._onMouseMove,64),this.onWindowResize=pd(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=pd(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=pd(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=t.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var o=e.getOffset(n),i=e.getOffset(r);n.scrollLeft=-999;var a=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:o.left!==i.left,isScrollingToNegative:i.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:AA()}catch{return AA()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=am(t),o=Ko(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){sm&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,n;this.wrapperEl=this.el.querySelector(_n(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(_n(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(_n(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(_n(this.classNames.offset)),this.maskEl=this.el.querySelector(_n(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,_n(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(_n(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(_n(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(_n(this.classNames.track)).concat(_n(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(_n(this.classNames.track)).concat(_n(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(_n(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(_n(this.classNames.scrollbar)))||null,this.options.autoHide||(Xo(this.axis.x.scrollbar.el,this.classNames.visible),Xo(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=Ko(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var o=!1,i=r.ResizeObserver||ResizeObserver;this.resizeObserver=new i(function(){o&&r.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){o=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=Ko(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1||n>0,i=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,c=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var u=this.contentEl.scrollHeight,d=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=o?"".concat(n||d,"px"):"auto",this.placeholderEl.style.height="".concat(u,"px");var p=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&d>n,this.axis.y.isOverflowing=u>p,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=c==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var g=this.axis.x.isOverflowing?this.scrollbarWidth:0,v=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&d>i-v,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>p-g,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var n,r;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var o=this.contentEl[this.axis[t].scrollSizeAttr],i=(r=(n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])!==null&&r!==void 0?r:0,a=i/o,c;return c=Math.max(~~(a*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(c=Math.min(c,this.options.scrollbarMaxSize)),c},e.prototype.positionScrollbar=function(t){var n,r,o;t===void 0&&(t="y");var i=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!i.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],c=((n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])||0,u=parseInt(this.elStyles[this.axis[t].sizeAttr],10),d=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];d=t==="x"&&this.isRtl&&(!((r=e.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-d:d,t==="x"&&this.isRtl&&(d=!((o=e.getRtlHelpers())===null||o===void 0)&&o.isScrollingToNegative?d:-d);var p=d/(a-u),g=~~((c-i.size)*p);g=t==="x"&&this.isRtl?-g+(c-i.size):g,i.el.style.transform=t==="x"?"translate3d(".concat(g,"px, 0, 0)"):"translate3d(0, ".concat(g,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var n=this.axis[t].track.el,r=this.axis[t].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(Xo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(Zo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var n=this.axis[t];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(t),Xo(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?Xo(n.scrollbar.el,this.classNames.hover):Zo(n.scrollbar.el,this.classNames.hover)):(Zo(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),Zo(this.axis[t].track.el,this.classNames.hover),Zo(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,n){var r;n===void 0&&(n="y"),this.isDragging=!0;var o=am(this.el),i=Ko(this.el),a=this.axis[n].scrollbar,c=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=c-(((r=a.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,Xo(this.el,this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var r=this,o,i,a,c;n===void 0&&(n="y");var u=this.axis[n];if(!(!this.options.clickOnTrack||!u.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var d=Ko(this.el);this.axis[n].scrollbar.rect=u.scrollbar.el.getBoundingClientRect();var p=this.axis[n].scrollbar,g=(i=(o=p.rect)===null||o===void 0?void 0:o[this.axis[n].offsetAttr])!==null&&i!==void 0?i:0,v=parseInt((c=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[n].sizeAttr])!==null&&c!==void 0?c:"0px",10),y=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],b=n==="y"?this.mouseY-g:this.mouseX-g,x=b<0?-1:1,w=x===-1?y-v:y+v,A=40,j=function(){r.contentWrapperEl&&(x===-1?y>w&&(y-=A,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=y,d.requestAnimationFrame(j)):y<w&&(y+=A,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=y,d.requestAnimationFrame(j)))};j()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Ko(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,n){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(o){return r.call(o,n)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=xJ,e.helpers=bJ,e}(),Kn=function(){return Kn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Kn.apply(this,arguments)};function CJ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var IA=D.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,i=CJ(e,["children","scrollableNodeProps"]),a=D.useRef(),c=D.useRef(),u=D.useRef(),d={},p={};Object.keys(i).forEach(function(y){Object.prototype.hasOwnProperty.call(hd.defaultOptions,y)?d[y]=i[y]:p[y]=i[y]});var g=Kn(Kn({},hd.defaultOptions.classNames),d.classNames),v=Kn(Kn({},o),{className:"".concat(g.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":d.ariaLabel||hd.defaultOptions.ariaLabel});return D.useEffect(function(){var y;return c.current=v.ref?v.ref.current:c.current,a.current&&(y=new hd(a.current,Kn(Kn(Kn({},d),c.current&&{scrollableNode:c.current}),u.current&&{contentNode:u.current})),typeof t=="function"?t(y):t&&(t.current=y)),function(){y==null||y.unMount(),y=null,typeof t=="function"&&t(null)}},[]),D.createElement("div",Kn({"data-simplebar":"init",ref:a},p),D.createElement("div",{className:g.wrapper},D.createElement("div",{className:g.heightAutoObserverWrapperEl},D.createElement("div",{className:g.heightAutoObserverEl})),D.createElement("div",{className:g.mask},D.createElement("div",{className:g.offset},typeof n=="function"?n({scrollableNodeRef:c,scrollableNodeProps:Kn(Kn({},v),{ref:c}),contentNodeRef:u,contentNodeProps:{className:g.contentEl,ref:u}}):D.createElement("div",Kn({},v),D.createElement("div",{className:g.contentEl},n)))),D.createElement("div",{className:g.placeholder})),D.createElement("div",{className:"".concat(g.track," simplebar-horizontal")},D.createElement("div",{className:g.scrollbar})),D.createElement("div",{className:"".concat(g.track," simplebar-vertical")},D.createElement("div",{className:g.scrollbar})))});IA.displayName="SimpleBar";const wJ=ue(HQ)({flexGrow:1,height:"100%",overflow:"hidden"}),SJ=ue(IA)(({theme:e})=>({maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:et(e.palette.grey[500],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-track.simplebar-vertical":{width:10},"& .simplebar-track.simplebar-horizontal .simplebar-scrollbar":{height:6},"& .simplebar-mask":{zIndex:"inherit"}}));function OA({children:e,sx:t,...n}){return f.jsxs(f.Fragment,{children:[f.jsx(wJ,{children:f.jsx(SJ,{timeout:500,clickOnTrack:!1,sx:t,...n,children:e})}),f.jsx(GQ,{children:f.jsx(S.Box,{sx:{overflowX:"auto",...t},...n,children:e})})]})}function PA(e){const t=S.useTheme(),n=Ir(e,{flexShrink:{md:0},zIndex:1200}),{downLg:r}=Gn(),{open:o,handleDrawerToggle:i,width:a}=Oi(),c=r?S.Drawer:EZ,u=document.body,d=E.useMemo(()=>r?{container:u,variant:"temporary",onClose:i,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",lg:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:a,borderRight:`1px solid ${t.palette.divider}`,backgroundImage:"none",boxShadow:"inherit",overflow:"auto"}}}:{variant:"permanent"},[r,u,i,a,t.palette.divider]);return f.jsx(S.Box,{component:"nav",sx:n,"aria-label":"mailbox folders",children:f.jsxs(c,{...d,open:o,children:[f.jsx(uT,{}),f.jsx(OA,{sx:{"& .simplebar-content":{display:"flex",flexDirection:"column"}},children:e.children})]})})}function lm(e){const{name:t,version:n,copy:r="&copy; Applica Software Guru for"}=e;return f.jsx(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",flexGrow:1,height:"auto",sx:{pt:1},children:f.jsxs(S.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}const jA=ue(S.AppBar,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Cn();return{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...!t&&{width:`calc(100% - ${e.spacing(7.5)})`},...t&&{marginLeft:n,width:`calc(100% - ${n}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}}),kA=E.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary"},{defaults:!0});return f.jsx(S.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),EJ=E.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary"},{defaults:!0});return f.jsx(eu,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Vs=E.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return f.jsx(S.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function MA({onClick:e=void 0}){const{open:t,anchorEl:n,handleClose:r,handleToggle:o}=_s(),[i,a]=q.useLocaleState(),c=q.useLocales();if(c.length===0)return null;function u(d){if(e){e(d,r);return}a(d),r()}return f.jsxs(f.Fragment,{children:[f.jsx(kA,{value:"locale",onClick:o,sx:{minWidth:"auto"},children:f.jsxs(S.Stack,{direction:"row",spacing:.5,children:[f.jsx(S.Typography,{variant:"body1",children:i.toUpperCase()}),t?f.jsx(Ue.CaretUpOutlined,{}):f.jsx(Ue.CaretDownOutlined,{})]})}),f.jsx(S.Menu,{id:"menu-appbar",anchorEl:n,keepMounted:!0,open:t,onClose:r,children:c.map((d,p)=>f.jsx(S.MenuItem,{onClick:()=>u(d.locale),children:d.name},p))})]})}const TJ={ml:{xs:0,lg:-2}};function FA(){const{open:e,handleDrawerToggle:t}=Oi();return f.jsx(Vs,{value:"drawer","aria-label":"open drawer",sx:TJ,onChange:t,selected:e,children:e?f.jsx(Ue.MenuFoldOutlined,{}):f.jsx(Ue.MenuUnfoldOutlined,{})})}function _A(e){const t=E.useRef(),n=S.useTheme(),{downLg:r,horizontal:o}=Gn(),{open:i,width:a}=Oi(),c=r?S.AppBar:jA,d={position:"fixed",color:"inherit",elevation:0,sx:Ir(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":i?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}})};return r||te.extend(d,{open:i}),f.jsx(c,{ref:t,...d,children:f.jsxs(S.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx(FA,{}),e.children]})})}function AJ(e){const t=S.useTheme(),{notification:n,onClick:r,selected:o,divider:i}=e,{resource:a}=sd(),c=q.useNotify(),u=q.useRedirect(),[d]=q.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:Or().toISOString()}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(u(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{c("resources.notifications.messages.readed.error","warning")}}),p=E.useCallback(()=>d(),[d]),[g]=q.useLocaleState(),v=E.useMemo(()=>Or(n.created).locale(g).fromNow(),[n,g]);return f.jsx(S.ListItem,{disablePadding:!0,divider:i,children:f.jsxs(S.ListItemButton,{selected:o,onClick:p,children:[f.jsx(S.ListItemAvatar,{children:f.jsx(S.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(Ue.MessageOutlined,{})})}),f.jsx(S.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),f.jsx(S.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(S.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:v,primaryTypographyProps:{variant:"caption"}})]})})}const IJ={width:36,height:36,fontSize:"1rem"},OJ={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function RA(){const{enable:e}=sd();return e?f.jsx(PJ,{}):null}function PJ(){const e=q.useTranslate(),t=S.useTheme(),n=q.useRefresh(),r=q.useNotify(),{downMd:o}=Gn(),{resource:i}=sd(),[a,c]=E.useState([]),{data:u,isLoading:d}=q.useGetList(i,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),p=a.filter(j=>j.readed===null).length,{open:g,anchorEl:v,handleClose:y,handleToggle:b}=_s();E.useEffect(()=>{!d&&u&&c(u??[])},[u,d]);const x=a.filter(j=>!j.readed).map(j=>j.id),[w]=q.useUpdateMany(i,{ids:x,data:{readed:Or().toISOString()}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),A=E.useCallback(()=>{w()},[w]);return f.jsxs(f.Fragment,{children:[f.jsx(Vs,{value:"notifications",selected:g,onChange:b,children:f.jsx(S.Badge,{badgeContent:p,color:"primary",children:f.jsx(Ue.BellOutlined,{})})}),f.jsx(S.Popper,{placement:o?"bottom":"bottom-end",open:g,anchorEl:v,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:j})=>f.jsx(Bo,{type:"grow",position:o?"top":"top-right",in:g,...j,children:f.jsx(S.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(S.ClickAwayListener,{onClickAway:y,children:f.jsxs(On,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:p>0&&f.jsx(S.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:A,children:f.jsx(eu,{color:"success",size:"small",children:f.jsx(Ue.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(S.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":IJ,"& .MuiListItemSecondaryAction-root":{...OJ,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((T,P)=>f.jsx(AJ,{selected:p>0,notification:T,onClick:y,divider:P<a.length-1},T.id))}),f.jsx(S.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${i}`,LinkComponent:ut.Link,onClick:y,children:f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),f.jsx(S.Divider,{})]})})})})})]})}function DA(){const[e,t]=E.useState(!1),n=E.useCallback(()=>t(!1),[t]),r=E.useCallback(()=>t(!0),[t]),o=q.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsxs(S.ListItemButton,{onClick:r,children:[f.jsx(S.ListItemIcon,{children:f.jsx(en.Key,{})}),f.jsx(S.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(S.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(Vg,{onSuccess:n})})]})}function LA(){const e=q.useLogout(),t=q.useTranslate();return f.jsx(f.Fragment,{children:f.jsxs(S.ListItemButton,{onClick:e,children:[f.jsx(S.ListItemIcon,{children:f.jsx(en.LogoutOutlined,{})}),f.jsx(S.ListItemText,{primary:t("ra.auth.logout")})]})})}function BA(){const e=q.useTranslate(),t=q.useAuthProvider(),n=E.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t]),[r,o]=E.useState(!1);return E.useEffect(()=>{if(!t.isImpersonating){console.warn("The authProvider does not support the isImpersonating feature",t);return}t.isImpersonating().then(i=>o(i))},[t,o]),r?f.jsx(f.Fragment,{children:f.jsxs(S.ListItemButton,{onClick:n,children:[f.jsx(S.ListItemIcon,{children:f.jsx(en.LogoutOutlined,{})}),f.jsx(S.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null}function NA(e){var x;const{roles:t}=e,n=S.useTheme(),r=q.useDataProvider(),{identity:o}=q.useGetIdentity(),i=o!==void 0&&o.image&&o.image!==null&&o.image!=="",[a,c]=E.useState(null),{open:u,anchorEl:d,handleToggle:p,handleClose:g}=_s(),v=q.useLogout(),y=E.useCallback(()=>{v()},[v]);E.useEffect(()=>{i&&r.getFile("/profile/me/image").then(w=>c(w))},[r,i]);const b=E.useMemo(()=>{var w;return E.isValidElement(t)?t:t?f.jsx(f.Fragment,{children:t}):(w=o==null?void 0:o.roles)==null?void 0:w.map(A=>A.name.replace("ROLE_","")).join(",")},[t,o]);return f.jsxs(f.Fragment,{children:[f.jsx(Vs,{sx:{p:.25,width:"auto"},onClick:p,value:"profile",selected:u,children:f.jsxs(S.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Xc,{alt:(x=o==null?void 0:o.name)==null?void 0:x.toUpperCase(),src:a,size:"xs"}),f.jsx(S.Typography,{variant:"subtitle1",children:o==null?void 0:o.name})]})}),f.jsx(hh,{placement:"bottom-end",open:u,anchorEl:d,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:w})=>f.jsx(Bo,{type:"grow",position:"top-right",in:u,...w,children:f.jsx(S.Paper,{sx:{boxShadow:n.customShadows.z1,width:290,minWidth:240,maxWidth:290,[n.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(S.ClickAwayListener,{onClickAway:g,children:f.jsxs(On,{elevation:0,border:!1,content:!1,children:[f.jsx(S.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(S.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(S.Grid,{item:!0,children:f.jsxs(S.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Xc,{alt:"profile user",src:a,sx:{width:32,height:32}}),f.jsxs(S.Stack,{children:[f.jsx(S.Typography,{variant:"h6",children:o==null?void 0:o.name}),f.jsx(S.Typography,{variant:"body2",color:"textSecondary",children:b})]})]})}),f.jsx(S.Grid,{item:!0,children:f.jsx(S.Tooltip,{title:"Logout",children:f.jsx(eu,{size:"large",sx:{color:"text.primary"},onClick:y,children:f.jsx(Ue.LogoutOutlined,{})})})})]})}),f.jsx(S.Grid,{container:!0,children:f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(DA,{}),f.jsx(LA,{}),f.jsx(BA,{})]})})})]})})})})})]})}function VA(e){const t=pt(),{downMd:n}=Gn(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=_s();return n?f.jsxs(f.Fragment,{children:[f.jsx(Vs,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:i,selected:r,children:f.jsx(Ue.MoreOutlined,{})}),f.jsx(S.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:c})=>f.jsx(Bo,{type:"fade",in:r,...c,children:f.jsx(S.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(S.ClickAwayListener,{onClickAway:a,children:f.jsx(S.AppBar,{color:"inherit",children:f.jsx(S.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})}function WA(e){return f.jsx(S.Box,{...e,flex:1})}function zA(e){const t=S.useTheme(),n=S.useScrollTrigger({disableHysteresis:!0,threshold:0}),{container:r}=Cn();return t.shadows[4]=t.customShadows.z1,f.jsx(S.AppBar,{elevation:n?4:0,sx:{top:60,bgcolor:t.palette.background.paper,width:"100%",height:62,justifyContent:"center",borderTop:`1px solid ${t.palette.divider}`,borderBottom:`1px solid ${t.palette.divider}`,zIndex:1098,color:t.palette.grey[500]},children:f.jsx(S.Container,{maxWidth:r?"xl":!1,children:f.jsx(S.Box,{sx:{display:"flex",alignItems:"center"},children:e.children})})})}function UA(e){const{horizontal:t}=Gn();return t?f.jsx(zA,{children:e.children}):f.jsx(PA,{children:e.children})}function gl({item:e,level:t}){const n=pt(),{horizontal:r,downLg:o}=Gn(),{drawerOpen:i,openItem:a,activeItem:c,openDrawer:u}=sl();let d="_self";e.target&&(d="_blank");const p=(e==null?void 0:e.external)!==!1?{component:E.forwardRef((A,j)=>f.jsx(ut.Link,{...A,to:e.url,target:d,ref:j}))}:{component:"a",href:e.url,target:d},g=e.icon,v=e.icon?f.jsx(g,{style:{fontSize:i?"1rem":"1.25rem"}}):!1,y=a.findIndex(A=>A===e.id)>-1,{pathname:b}=ut.useLocation();E.useEffect(()=>{b.endsWith(e.url)&&c([e.id])},[b]);const x=n.palette.mode==="dark"?"grey.400":"text.primary",w=n.palette.mode==="dark"&&i?"text.primary":"primary.main";return f.jsx(f.Fragment,{children:r?f.jsxs(S.ListItemButton,{...p,disabled:e.disabled,selected:y,sx:{zIndex:1201,...i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{bgcolor:"transparent",color:w,"&:hover":{color:w,bgcolor:"transparent"}}},...!i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[v?f.jsx(S.ListItemIcon,{sx:{minWidth:36,...!i&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!i&&y&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:v}):null,!v&&f.jsx(S.ListItemIcon,{sx:{color:y?"primary.main":"secondary.main",...!i&&{borderRadius:1.5,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!i&&y&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:f.jsx(rh,{size:4,color:y?"primary":"secondary"})}),f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",color:"inherit",children:e.title})}),(i||!i&&t!==1)&&e.chip?f.jsx(S.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?f.jsx(S.Avatar,{children:e.chip.avatar}):null}):null]}):f.jsxs(S.ListItemButton,{...p,disabled:e.disabled,selected:y,sx:{zIndex:1201,pl:i?`${t*28}px`:1.5,py:!i&&t===1?1.25:1,...i&&{"&:hover":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter",borderRight:`2px solid ${n.palette.primary.main}`,color:w,"&:hover":{color:w,bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"}}},...!i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},...o&&{onClick:()=>u(!1)},children:[v?f.jsx(S.ListItemIcon,{sx:{minWidth:28,color:y?w:x,...!i&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:n.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!i&&y&&{bgcolor:n.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:n.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:v}):null,i||!i&&t!==1?f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",sx:{color:y?w:x},children:e.title})}):null,(i||!i&&t!==1)&&e.chip?f.jsx(S.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?f.jsx(S.Avatar,{children:e.chip.avatar}):null}):null]})})}const HA=ue(S.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:38,left:-5,width:10,height:10,backgroundColor:e.palette.background.paper,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderLeft:`1px solid ${e.palette.grey.A800}`,borderBottom:`1px solid ${e.palette.grey.A800}`}}));function ml({menu:e,level:t,parentId:n,setSelectedItems:r,selectedItems:o,setSelectedLevel:i,selectedLevel:a}){var W;const c=pt(),{activeItem:u}=sl(),{horizontal:d}=Gn(),{drawerOpen:p}=sl(),g=ut.useNavigate(),[v,y]=E.useState(!1),[b,x]=E.useState(null),[w,A]=E.useState(null);function j(ie){A(null),i(t),p?(y(!v),x(b?null:e.id),r(b?"":e.id),e.url&&g(`${e.url}`)):A(ie==null?void 0:ie.currentTarget)}function T(){p||e.url&&g(`${e.url}`)}function P(ie){A(ie==null?void 0:ie.currentTarget)}function O(){y(!1),x(null),A(null)}E.useMemo(()=>{b===o?t===1&&y(!0):t===a&&(y(!1),x(null))},[o,t,b,a]);const{pathname:_}=ut.useLocation(),R=!!w;function N(ie,U){ie.forEach(ee=>{ee.url===_&&(y(!0),x(U))})}E.useEffect(()=>{y(!1),x(null),R&&A(null),e.children&&e.children.forEach(ie=>{var U;(U=ie.children)!=null&&U.length&&N(ie.children,e.id),ie.url===_&&(x(e.id),y(!0)),_.includes(ie.url)&&(x(e.id),y(!0))})},[_,e.children]),E.useEffect(()=>{e.url===_&&b!==e.id&&(u([e.id]),x(e.id),A(null),y(!0))},[_,e,b,u]);const Y=(W=e.children)==null?void 0:W.map(ie=>{switch(ie.type){case"collapse":return f.jsx(ml,{setSelectedItems:r,setSelectedLevel:i,selectedLevel:a,selectedItems:o,menu:ie,level:t+1,parentId:n},ie.id);case"item":return f.jsx(gl,{item:ie,level:t+1},ie.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Collapse or Item"},ie.id)}}),X=b===e.id,G=t===1?f.jsx(Ue.BorderOutlined,{style:{fontSize:"1rem"}}):!1,re=e.icon,ne=e.icon?f.jsx(re,{style:{fontSize:p?"1rem":"1.25rem"}}):G,Z=c.palette.mode==="dark"?"grey.400":"text.primary",J=c.palette.mode==="dark"&&p?c.palette.text.primary:c.palette.primary.main,V=R?`collapse-pop-${e.id}`:void 0,$={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"};return f.jsx(f.Fragment,{children:d?f.jsx(f.Fragment,{children:f.jsxs(S.ListItemButton,{id:`boundary-${V}`,disableRipple:!0,selected:X,onMouseEnter:P,onMouseLeave:O,onClick:P,"aria-describedby":V,sx:{"&.Mui-selected":{bgcolor:"transparent"}},children:[f.jsxs(S.Box,{onClick:T,sx:$,children:[ne?f.jsx(S.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,color:c.palette.secondary.dark},children:ne}):null,!ne&&t!==1&&f.jsx(S.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,bgcolor:"transparent","&:hover":{bgcolor:"transparent"}},children:f.jsx(rh,{size:4,color:X?"primary":"secondary"})}),f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"body1",color:"inherit",sx:{my:"auto"},children:e.title})}),R?f.jsx(Ue.RightOutlined,{}):f.jsx(Ue.DownOutlined,{})]}),w?f.jsx(HA,{id:V,open:R,anchorEl:w,placement:"right-start",style:{zIndex:2001},modifiers:[{name:"offset",options:{offset:[-10,0]}}],children:({TransitionProps:ie})=>f.jsx(Bo,{in:R,...ie,children:f.jsx(S.Paper,{sx:{overflow:"hidden",mt:1.5,py:.5,boxShadow:c.shadows[8],backgroundImage:"none"},children:f.jsx(S.ClickAwayListener,{onClickAway:O,children:f.jsx(S.Box,{children:Y})})})})}):null]})}):f.jsxs(f.Fragment,{children:[f.jsxs(S.ListItemButton,{disableRipple:!0,selected:b===e.id,...!p&&{onMouseEnter:j,onMouseLeave:O},onClick:j,sx:{pl:p?`${t*28}px`:1.5,py:!p&&t===1?1.25:1,...p&&{"&:hover":{bgcolor:c.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:"transparent",color:J,"&:hover":{color:J,bgcolor:c.palette.mode==="dark"?"divider":"transparent"}}},...!p&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[ne?f.jsx(S.ListItemIcon,{onClick:T,sx:{minWidth:28,color:b===e.id?"primary.main":Z,...!p&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:c.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!p&&b===e.id&&{bgcolor:c.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:c.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:ne}):null,p||!p&&t!==1?f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",color:b===e.id?"primary":Z,children:e.title}),secondary:e.caption?f.jsx(S.Typography,{variant:"caption",color:"secondary",children:e.caption}):null}):null,p||!p&&t!==1?R||v?f.jsx(Ue.UpOutlined,{style:{fontSize:"0.625rem",marginLeft:1,color:c.palette.primary.main}}):f.jsx(Ue.DownOutlined,{style:{fontSize:"0.625rem",marginLeft:1}}):null,!p&&f.jsx(HA,{open:R,anchorEl:w,placement:"right-start",style:{zIndex:2001},popperOptions:{modifiers:[{name:"offset",options:{offset:[-12,1]}}]},children:({TransitionProps:ie})=>f.jsx(Bo,{in:R,...ie,children:f.jsx(S.Paper,{sx:{overflow:"hidden",mt:1.5,boxShadow:c.customShadows.z1,backgroundImage:"none",border:`1px solid ${c.palette.divider}`},children:f.jsx(S.ClickAwayListener,{onClickAway:O,children:f.jsx(S.Box,{children:Y})})})})})]}),p?f.jsx(S.Collapse,{in:v,timeout:"auto",unmountOnExit:!0,children:f.jsx(S.List,{sx:{p:0},children:Y})}):null]})})}const jJ=ue(S.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:5,left:32,width:12,height:12,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderWidth:"6px",borderStyle:"solid",borderColor:`${e.palette.background.paper} transparent transparent ${e.palette.background.paper}`}}));function GA({item:e,lastItem:t,remItems:n,lastItemId:r,setSelectedItems:o,selectedItems:i,setSelectedLevel:a,selectedLevel:c}){var V,$;const u=pt(),d=L.useTranslate(),{pathname:p}={pathname:""},{horizontal:g,downLg:v}=Gn(),y=sl(),{drawerOpen:b,selectedID:x,activeID:w}=y,[A,j]=E.useState(null),[T,P]=E.useState(e),O=!!A;E.useEffect(()=>{if(t)if(e.id===r){const W={...e},ie=n.map(U=>U.elements);W.children=ie.flat(1),P(W)}else P(e)},[e,t,v]);function _(W,ie){W.forEach(U=>{var ee;(ee=U.children)!=null&&ee.length&&_(U.children,T.id),U.url===p&&w(ie)})}function R(W){(W.children?W.children:[]).forEach(U=>{var ee;(ee=U.children)!=null&&ee.length&&_(U.children,T.id),U.url===p&&w(T.id)})}E.useEffect(()=>{R(T),O&&j(null)},[p,T]);function N(W){O||j(W==null?void 0:W.currentTarget)}function Y(){j(null)}const X=T==null?void 0:T.icon,G=T!=null&&T.icon?f.jsx(X,{style:{fontSize:20,stroke:"1.5",color:x===T.id?u.palette.primary.main:u.palette.secondary.dark}}):null,re=(V=e.children)==null?void 0:V.map(W=>{switch(W.type){case"collapse":return f.jsx(ml,{menu:W,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:i,level:1,parentId:T.id},W.id);case"item":return f.jsx(gl,{item:W,level:1},W.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},W.id)}}),ne=n.map((W,ie)=>{var U;return f.jsxs(E.Fragment,{children:[W.title?f.jsx(S.Typography,{variant:"caption",sx:{pl:2},children:W.title}):null,(U=W==null?void 0:W.elements)==null?void 0:U.map(ee=>{switch(ee.type){case"collapse":return f.jsx(ml,{menu:ee,level:1,parentId:T.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:i},ee.id);case"item":return f.jsx(gl,{item:ee,level:1},ee.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},ee.id)}})]},ie)}),Z=($=T.children)==null?void 0:$.map(W=>{switch(W.type){case"collapse":return f.jsx(ml,{menu:W,level:1,parentId:T.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:i},W.id);case"item":return f.jsx(gl,{item:W,level:1},W.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},W.id)}}),J=O?`group-pop-${e.id}`:void 0;return f.jsx(f.Fragment,{children:g?f.jsx(S.List,{children:f.jsxs(S.ListItemButton,{selected:x===T.id,sx:{p:1,my:.5,mr:1,display:"flex",alignItems:"center",backgroundColor:"inherit","&.Mui-selected":{bgcolor:"transparent"}},onMouseEnter:N,onClick:N,onMouseLeave:Y,"aria-describedby":J,children:[G?f.jsx(S.ListItemIcon,{sx:{minWidth:28},children:T.id===r?f.jsx(Ue.DownOutlined,{style:{fontSize:20,stroke:"1.5"}}):G}):null,f.jsx(S.ListItemText,{sx:{mr:1},primary:f.jsx(S.Typography,{variant:"body1",color:x===T.id?u.palette.primary.main:u.palette.secondary.dark,children:T.id===r?d("ra.actions.more"):T.title})}),O?f.jsx(Ue.DownOutlined,{style:{fontSize:16,stroke:"1.5"}}):f.jsx(Ue.RightOutlined,{style:{fontSize:16,stroke:"1.5"}}),A?f.jsx(jJ,{id:J,open:O,anchorEl:A,placement:"bottom-start",style:{zIndex:2001},children:({TransitionProps:W})=>f.jsx(Bo,{in:O,...W,children:f.jsx(S.Paper,{sx:{mt:.5,py:1.25,boxShadow:u.shadows[8],backgroundImage:"none"},children:f.jsx(S.ClickAwayListener,{onClickAway:Y,children:f.jsx(S.Box,{sx:{maxHeight:"calc(100vh - 170px)",overflowY:"auto","&::-webkit-scrollbar":{opacity:0,width:4,"&:hover":{opacity:.7}},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:u.palette.divider,borderRadius:4}},children:T.id!==r?Z:ne})})})})}):null]})}):f.jsx(S.List,{subheader:e.title&&b?f.jsxs(S.Box,{sx:{pl:3,mb:1.5},children:[f.jsx(S.Typography,{variant:"subtitle2",color:u.palette.mode==="dark"?"textSecondary":"text.secondary",children:e.title}),e.caption?f.jsx(S.Typography,{variant:"caption",color:"secondary",children:e.caption}):null]}):null,sx:{mt:b&&e.title?1.5:0,py:0,zIndex:0},children:re})})}function YA(e){const{horizontal:t}=Gn(),{open:n}=Oi(),r=Ir(e,{pt:n?t?0:2:0,"& > ul:first-of-type":{mt:0},display:t?{xs:"block",lg:"flex"}:"block"});return f.jsx(S.Box,{sx:r,children:e.children})}function KA(e){const{horizontal:t}=Gn(),{menu:n,isLoading:r}=bg(),[o,i]=E.useState(""),[a,c]=E.useState(0),{horizontalMaxItems:u}=Cn(),d=t?u:void 0;let p=r?0:(n??[]).length-1,g=[],v;return!r&&d&&d<(n??[]).length&&(v=(n??[])[d-1].id,p=d-1,g=(n??[]).slice(d-1,(n??[]).length).map(y=>({title:y.title,elements:y.children,icon:y.icon}))),f.jsx(YA,{...e,children:!r&&te.map((n??[]).slice(0,p+1),y=>{const{type:b}=y;switch(b){case"group":return f.jsx(GA,{item:y,setSelectedItems:i,setSelectedLevel:c,selectedLevel:a,selectedItems:o,lastItem:d,remItems:g,lastItemId:v},y.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Navigation Group"},y.id)}})})}function kJ({open:e,anchorEl:t,handleClose:n,theme:r,mode:o,toggleThemeMode:i}){const a=q.useTranslate();return f.jsx(hh,{placement:"bottom-end",open:e,anchorEl:t,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:c})=>f.jsx(Bo,{type:"grow",position:"top-right",in:e,...c,children:f.jsx(S.Paper,{sx:{boxShadow:r.customShadows.z1,minWidth:200,[r.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(S.ClickAwayListener,{onClickAway:n,children:f.jsx(On,{elevation:0,border:!1,content:!1,children:f.jsxs(S.List,{children:[f.jsxs(S.ListItemButton,{selected:o==="light",onClick:()=>i("light"),children:[f.jsx(Ue.SunOutlined,{}),f.jsx(S.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.light")})]}),f.jsxs(S.ListItemButton,{selected:o==="dark",onClick:()=>i("dark"),children:[f.jsx(Ue.MoonOutlined,{}),f.jsx(S.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.dark")})]}),f.jsxs(S.ListItemButton,{selected:o==="auto",onClick:()=>i("auto"),children:[f.jsx(en.Brightness6,{}),f.jsx(S.Typography,{variant:"subtitle1",ml:1,textTransform:"none",children:a("ra.preferences.theme.auto")})]})]})})})})})})}function XA(){const e=S.useTheme(),{mode:t,setMode:n}=Cn(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=_s(),c=E.useCallback(d=>{n(d)},[n]),u=E.useCallback(()=>{switch(t){case"light":return f.jsx(Ue.SunOutlined,{});case"dark":return f.jsx(Ue.MoonOutlined,{});default:return f.jsx(en.Brightness6,{})}},[t]);return f.jsxs(Vs,{value:"theme-mode","aria-label":"toggle mode",onClick:i,selected:!1,children:[f.jsx(u,{}),r?f.jsx(kJ,{open:r,anchorEl:o,handleClose:a,theme:e,mode:t,toggleThemeMode:c}):null]})}const ZA=E.forwardRef((e,t)=>{const n=Ir(e,{display:"flex",width:"100%"});return f.jsx(S.Box,{ref:t,...e,sx:n,children:e.children})});function cm({source:e="paper"}){const{mode:t}=Cn(),n=S.useTheme();return E.useEffect(()=>{var o;const r=te.get(n.palette.background,e);(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",r)},[t,n,e]),null}const QA=iT(function(t){const{name:n,version:r,enableThemeToggler:o,enableNotification:i,enableLocaleSwitcher:a}=t,{isLoading:c,navigation:u,breadcrumbs:d}=IS();return f.jsxs(ZA,{children:[f.jsxs(_A,{children:[f.jsx(WA,{}),a?f.jsx(MA,{}):null,o?f.jsx(XA,{}):null,f.jsx(cm,{}),f.jsx(kw,{}),i?f.jsx(RA,{}):null,f.jsx(VA,{children:f.jsx(NA,{})})]}),f.jsx(UA,{children:f.jsx(KA,{})}),f.jsxs(aT,{error:t.error,children:[!c&&f.jsx(BC,{titleBottom:!0,mode:"breadcrumbs",navigation:u,breadcrumbs:d,card:!1,divider:!1,icon:!0,icons:!0}),t.children,f.jsx(ut.Outlet,{}),f.jsx(lm,{name:n,version:r,copy:t==null?void 0:t.copy})]})]})});function MJ(e){const{sx:t}=e;return f.jsx(S.Box,{sx:{...t,flex:"1 1 auto",backgroundColor:"background.paper",overflowY:"auto"},children:e.children})}const FJ=444;function _J(e){const{sx:t,anchor:n="right",variant:r="temporary",open:o=!1,onClose:i}=e,a=S.useTheme(),u=S.useMediaQuery(a.breakpoints.down("sm"))?"bottom":n,d=E.useCallback(()=>{Ze.isFunction(i)&&i()},[i]),p={backgroundImage:"none",boxShadow:"-10px 4px 42px 0px rgba(0, 0, 0, 0.25)",width:{sm:"30%"},maxWidth:{sm:FJ},[a.breakpoints.down("sm")]:{width:"100% !important",maxWidth:"100% !important"}};return f.jsx(S.Drawer,{...e,anchor:u,onClose:d,open:o,PaperProps:{sx:{...p,...t}},variant:r,children:e.children})}function RJ(e){return f.jsxs(S.Box,{children:[f.jsx(S.Divider,{}),f.jsx(S.Box,{bgcolor:"background.paper",px:2,py:2.5,children:e.children})]})}function DJ(e){const{sx:t}=e;return f.jsxs(S.Box,{children:[f.jsx(S.Stack,{alignItems:"center",bgcolor:"background.paper",direction:"row",px:2.5,py:2,spacing:2,minHeight:"64px",sx:t,children:e.children}),f.jsx(S.Divider,{sx:{opacity:.6}})]})}function LJ(e){const{primary:t,secondary:n}=e;return f.jsxs(S.Box,{display:"inline-flex",flexGrow:1,flexShrink:1,flexDirection:"column",children:[t?f.jsx(S.Typography,{variant:"h5",children:t}):null,n?f.jsx(S.Typography,{variant:"h6",children:n}):null]})}function BJ(e){return f.jsx(S.Box,{display:"inline-flex",flexGrow:0,flexShrink:0,children:e.children})}const mr=_J;mr.Content=MJ,mr.Footer=RJ,mr.Header=DJ,mr.HeaderText=LJ,mr.HeaderAction=BJ;function JA(e){const t=S.useMediaQuery(n=>n.breakpoints.down("sm"));return f.jsx(NJ,{disableGutters:!0,variant:t?"regular":"dense",...VJ(e)})}JA.propTypes={children:m.node,className:m.string};const NJ=S.styled(S.Toolbar,{name:"RaTopToolbar",overridesResolver:e=>e.root})(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",gap:e.spacing(1),whiteSpace:"nowrap",flex:"0 1 auto",paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5),paddingInline:e.spacing(2),[e.breakpoints.down("md")]:{flex:"0 1 100%"},[e.breakpoints.down("sm")]:{backgroundColor:e.palette.background.paper,justifyContent:"space-between",alignItems:"center"}}));function VJ({hasCreate:e,...t}){return t}const WJ=ue("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}}));function qA(){return f.jsx(WJ,{children:f.jsx(S.LinearProgress,{color:"primary"})})}function zJ(e){return t=>f.jsx(E.Suspense,{fallback:f.jsx(qA,{}),children:f.jsx(e,{...t})})}function um({title:e}){return f.jsxs(S.Stack,{direction:"row",children:[f.jsx(S.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",f.jsx(S.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]})}const UJ=ue(L.Notification,{})(({theme:e})=>({zIndex:2e3,"& *":{fontSize:e.typography.body1.fontSize}}));function $A(e){return f.jsx(UJ,{...e})}var vl=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(vl||{});const eI=mo().required(),tI=mo().oneOf(Object.values(vl));function HJ(e){var A;const t=Xi.useQueryClient(),[n,r]=E.useState(!1),[o,i]=E.useState(()=>()=>Promise.resolve()),a=q.useGetIdentity(),c=(A=a==null?void 0:a.data)==null?void 0:A.email,u=q.useDataProvider(),d=E.useCallback(()=>c?u.get("onboarding").then(j=>{var T;return(T=j==null?void 0:j.data)==null?void 0:T.value}):Promise.reject(),[u,c]),{data:p,isLoading:g,isError:v}=Xi.useQuery({queryKey:["GET","onboarding",c],queryFn:d,staleTime:24*60*60*1e3,retry:c!==void 0}),[y,b]=E.useState(()=>()=>Promise.resolve()),w=Xi.useMutation({mutationFn:y}).mutateAsync;return E.useEffect(()=>{function j(){const T=te.chain(p??{}).clone().extend({[e]:Date.now()}).value();return u.post("onboarding",T).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}b(()=>j)},[u,p,e,t,c]),E.useEffect(()=>{r(te.isNil((p??{})[e]))},[p,e,r]),E.useEffect(()=>{i(()=>()=>w())},[w]),{loading:g,error:v,onboardingRequired:n,acknowledgeOnboarding:o}}function GJ(e){const[t,n]=Mg("onboarding",{}),[r,o]=E.useState(!1),[i,a]=E.useState(()=>()=>Promise.resolve());return E.useEffect(()=>{o(te.isNil((t??{})[e]))},[t,e,o]),E.useEffect(()=>{a(()=>()=>(n(c=>te.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:i}}function YJ(){return{onboardingRequired:!1,acknowledgeOnboarding:E.useRef(()=>Promise.resolve()).current}}function nI(e,t){jg({mode:tI,topic:eI}).validateSync({mode:e,topic:t});const n=HJ(t),r=GJ(t),o=YJ();switch(e){case vl.USER:return n.loading?o:n.error?r:te.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case vl.BROWSER:return r;default:return o}}var Ws=(e=>(e.RESTART="RESTART",e.SET_SHOW="SET_SHOW",e.REGISTER_TIP="REGISTER_TIP",e.UNREGISTER_TIP="UNREGISTER_TIP",e.DISMISS_TIP="DISMISS_TIP",e.SET_ON_COMPLETE="SET_ON_COMPLETE",e))(Ws||{});function KJ(e,t){var o;const n=te.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:i}=t;return te.extend(n,{show:i})}case"REGISTER_TIP":{const{payload:i}=t,{id:a}=i,c=te.chain(n.tips).clone().reject(p=>p.id===a).value(),u=te.find(n.tips,{id:a}),d=te.chain(u??{}).clone().extend(i).value();return c.push(d),te.extend(n,{tips:te.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:i}=t,a=te.isString(i)?i:i.id,c=te.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return te.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:i}=t,a=te.isString(i)?i:i.id,c=te.chain(n.tips).reject(v=>v.id===a).value(),u=te.find(n.tips,{id:a});if(te.isNil(u))return n;const d=te.chain(u).clone().extend({dismissed:!0}).value();c.push(d);const p=((o=te.chain(c).reject(v=>v.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&te.chain(c).reject(v=>v.step<p).reject(v=>v.dismissed??!1).isEmpty().value()&&e.onComplete(),te.extend(n,{tips:te.sortBy(c,["step"]),currentStep:p})}case"SET_ON_COMPLETE":{const{payload:i}=t;return te.extend(n,{onComplete:i})}case"RESTART":{const i=te.chain(n.tips).clone().map(a=>te.omit(a,"dismissed")).value();return te.extend(n,{tips:i,currentStep:0})}default:return n}}const dm=E.createContext(void 0);function XJ(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=nI(t,n),[i,a]=E.useReducer(KJ,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),c=E.useMemo(()=>({state:i,dispatch:a}),[i,a]);return E.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),E.useEffect(()=>{function u(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:u})},[o,a]),f.jsx(dm.Provider,{value:c,children:e.children})}function rI(){const e=E.useContext(dm);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function ZJ(){return rI().state}function oI(){return rI().dispatch}function iI(e){jg({id:mo().required(),step:US().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:i,currentStep:a}=ZJ(),c=te.find(i,{id:t}),{dismissed:u}=c??{},d=oI(),p=E.useCallback(()=>{d({type:Ws.DISMISS_TIP,payload:t})},[d,t]);return E.useEffect(()=>{(te.isNil(c)||n!==(c==null?void 0:c.step))&&d({type:Ws.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c,d]),E.useEffect(()=>()=>{d({type:Ws.UNREGISTER_TIP,payload:t})},[t,d]),{tip:te.chain(c??e).clone().extend({open:o&&!te.isNil(c)&&a===n&&!u}).value(),dismiss:p}}function QJ(){const e=oI();return E.useCallback(()=>{e({type:Ws.RESTART})},[e])}function JJ(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:i,dismiss:a}=iI({id:t,step:n,completeOnboarding:o}),{open:c}=i,u=te.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(fu,{...u,arrow:!0,open:c,title:f.jsxs(S.Stack,{gap:1,children:[f.jsx(S.Typography,{children:r}),f.jsx(S.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const qJ=S.styled(JJ)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${S.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${S.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${S.tooltipClasses.arrow}`]:{color:r.main}}}),fm=E.memo(e=>{const{page:t,rowsPerPage:n,count:r,onPageChange:o,size:i="small",className:a,...c}=e,u=q.useTranslate(),d=Math.ceil(r/n)||1;if(d===1)return f.jsx(sI,{className:a});function p(g,v,y){return g==="page"?y?u("ra.navigation.current_page",{page:v,_:`page ${v}`}):u("ra.navigation.page",{page:v,_:`Go to page ${v}`}):u(`ra.navigation.${g}`,{_:`Go to ${g} page`})}return f.jsx(sI,{className:a,children:f.jsx(S.Pagination,{size:i,count:d,page:t+1,onChange:(g,v)=>o(g,v-1),...$J(c),getItemAriaLabel:p})})});fm.propTypes={count:m.number.isRequired,onPageChange:m.func.isRequired,page:m.number.isRequired,rowsPerPage:m.number.isRequired,color:m.oneOf(["primary","secondary","standard"]),size:m.oneOf(["small","medium","large"])};const sI=ue("div",{name:"RaPaginationActions",overridesResolver:e=>e.root})(()=>({flexShrink:0,ml:4}));function $J({nextIconButtonProps:e,backIconButtonProps:t,slotProps:n,...r}){return r}const pm=E.memo(e=>{const{rowsPerPageOptions:t=eq,actions:n,limit:r=null,...o}=e,{isLoading:i,hasNextPage:a,page:c,perPage:u,total:d,setPage:p,setPerPage:g}=q.useListPaginationContext(e),v=q.useTranslate(),y=S.useMediaQuery(N=>N.breakpoints.down("md")),[b,x]=E.useState(c-1),{hasCreate:w}=q.useResourceDefinition(e),A=E.useMemo(()=>d!=null?Math.ceil(d/u):void 0,[u,d]),j=E.useCallback(Ze.debounce(N=>{p(N+1)},500),[p]),T=E.useCallback((N,Y)=>{var re,ne;if(!N)return;if(N.preventDefault(),Y<0||A!==void 0&&Y>A-1)throw new Error(v("ra.navigation.page_out_of_boundaries",{page:Y+1}));const X=(((re=N.target.dataset)==null?void 0:re.testid)||((ne=N.target.classList)==null?void 0:ne.value))??"",G=X.includes("MuiPaginationItem-previousNext")||X.includes("NavigateBeforeIcon")||X.includes("NavigateNextIcon")||X.includes("KeyboardArrowLeftIcon")||X.includes("KeyboardArrowRightIcon");x(Y),G?j(Y):p(Y+1)},[j,p,v,A]),P=E.useCallback(N=>{g(Number(N.target.value))},[g]),O=E.useCallback(({from:N,to:Y,count:X})=>X===-1&&a?v("ra.navigation.partial_page_range_info",{offsetBegin:N,offsetEnd:Y,_:"%{from}-%{to} of more than %{to}"}):v("ra.navigation.page_range_info",{offsetBegin:N,offsetEnd:Y,total:X===-1?Y:X,_:"%{from}-%{to} of %{count === -1 ? to : count}"}),[v,a]),_=E.useCallback(N=>v(`ra.navigation.${N}`,{_:`Go to ${N} page`}),[v]);if(i)return f.jsx(S.Toolbar,{variant:"dense"});if(d===0||c<1||A!==void 0&&c>A)return r!=null&&process.env.NODE_ENV==="development"&&console.warn("The Pagination limit prop is deprecated. Empty state should be handled by the component displaying data (Datagrid, SimpleList)."),null;if(y)return f.jsx(S.TablePagination,{count:d??-1,rowsPerPage:u,page:b,onPageChange:T,rowsPerPageOptions:tq,component:"span",labelDisplayedRows:O,sx:{justifyContent:w?"flex-start":"flex-end",display:w?"flex":"block"},...q.sanitizeListRestProps(o)});const R=n||(!i&&d!=null?fm:void 0);return f.jsx(S.TablePagination,{count:d??-1,rowsPerPage:u,page:b,onPageChange:T,onRowsPerPageChange:P,ActionsComponent:R,nextIconButtonProps:{disabled:!a},component:"span",labelRowsPerPage:v("ra.navigation.page_rows_per_page"),labelDisplayedRows:O,getItemAriaLabel:_,rowsPerPageOptions:t,...q.sanitizeListRestProps(o)})});pm.propTypes={actions:q.ComponentPropType,limit:m.element,rowsPerPageOptions:m.arrayOf(m.oneOfType([m.number,m.shape({label:m.string.isRequired,value:m.number.isRequired})]))};const eq=[5,10,25,50],tq=[];function aI({children:e}){const t=ut.useLocation(),{pathname:n}=t;return E.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),f.jsx(f.Fragment,{children:e})}const nq=ue("div")({width:"100%",overflowX:"auto",display:"block"});function rq({shadow:e,children:t,...n}){return f.jsx(On,{content:!1,border:!1,shadow:e,boxShadow:!0,...n,children:t})}function lI({title:e}){return f.jsx(S.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substring(0,1).toUpperCase()})}function oq({source:e,label:t,variant:n="body1",record:r,spaceBottom:o,spaceTop:i,component:a,leftIcon:c,rightIcon:u,button:d,buttonProps:p,...g}){const{getCurrentDialog:v}=Ng(),y=q.useResourceContext(g),b=v(),x=q.useRecordContext(),w=r||x,A=Ze.get(w,e||"");return f.jsxs(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:j=>({pt:1,pb:1,borderBottom:`1px solid ${j.palette.divider}`,...o&&{mb:2},...i&&{mt:2}}),children:[f.jsxs(S.Stack,{direction:"row",alignItems:"start",children:[c?E.isValidElement(c)?E.cloneElement(c,{style:gd}):E.createElement(c,{style:gd}):null,f.jsx(q.FieldTitle,{label:t,source:e,resource:b||y})]}),f.jsxs(S.Stack,{direction:"row",alignItems:"center",children:[a?E.isValidElement(a)?E.cloneElement(a,{record:w,resource:y,value:A}):E.createElement(a,{source:e,record:w,resource:y,value:A}):f.jsx(S.Typography,{variant:n,children:A}),u?E.isValidElement(u)?E.cloneElement(u,{style:gd}):E.createElement(u,{style:gd}):null,d?f.jsx(S.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:d}):null]})]})}const gd={width:"1.5rem",alignSelf:"center"};function cI(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:i,resource:a,selectedIds:c=[],onUnselectItems:u}=q.useListContext(e),d=q.useTranslate(),p=E.useCallback(()=>{u()},[u]);return f.jsx(iq,{className:r,children:f.jsxs(S.Toolbar,{"data-test":"bulk-actions-toolbar",className:Be(Pr.toolbar,{[Pr.collapsed]:c.length===0}),...q.sanitizeListRestProps(o),children:[f.jsxs("div",{className:Pr.title,children:[f.jsx(S.IconButton,{className:Pr.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:p,size:"small",children:f.jsx(en.Close,{fontSize:"small"})}),f.jsx(S.Typography,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:c.length})})]}),f.jsx(L.TopToolbar,{className:Pr.topToolbar,children:E.Children.map(n,g=>E.isValidElement(g)?E.cloneElement(g,{filterValues:i,resource:a,selectedIds:c}):null)})]})})}const Pi="RaBulkActionsToolbar",Pr={toolbar:`${Pi}-toolbar`,topToolbar:`${Pi}-topToolbar`,buttons:`${Pi}-buttons`,collapsed:`${Pi}-collapsed`,title:`${Pi}-title`,icon:`${Pi}-icon`},iq=ue("div",{name:Pi,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${Pr.toolbar}`]:{position:"absolute",left:0,right:0,zIndex:3,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.text.primary,justifyContent:"space-between",backgroundColor:e.palette.mode==="light"?Zp(e.palette.primary.light,.8):e.palette.primary.dark,minHeight:e.spacing(6),height:e.spacing(6),transform:`translateY(-${e.spacing(6)})`,transition:`${e.transitions.create("height")}, ${e.transitions.create("min-height")}, ${e.transitions.create("transform")}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},[`& .${Pr.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${Pr.buttons}`]:{},[`& .${Pr.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${Pr.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${Pr.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),hm={p:0,m:0},uI={p:2,m:0,borderRadius:0,width:"100%"};function sq(e){const{children:t}=e,[n,r]=D.useState(null);function o(b){r(b.currentTarget)}function i(){r(null)}const a=S.useMediaQuery(b=>b.breakpoints.down("md")),{filterValues:c,resource:u,selectedIds:d=[],onUnselectItems:p}=L.useListContext(e),g=!!n&&d!==void 0&&d.length>0,v=g?"simple-popover":void 0,y=D.useCallback(()=>{p(),r(null)},[p,r]);return f.jsx(S.Fade,{in:d!==void 0&&d.length>0,children:f.jsxs(S.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[f.jsx(S.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),f.jsx(S.Popover,{id:v,open:g,anchorEl:n,onClose:i,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:f.jsxs(S.List,{sx:hm,children:[f.jsx(S.ListItem,{sx:hm,children:f.jsx(L.Button,{onClick:y,sx:uI,label:"ra.action.unselect",startIcon:f.jsx(mg,{}),children:f.jsx(mg,{})})}),D.Children.map(t,b=>{var x;return f.jsx(S.ListItem,{sx:hm,children:D.isValidElement(b)?D.cloneElement(b,{filterValues:c,resource:u,selectedIds:d,sx:uI,...(x=b.props)!=null&&x.popover?{closePopover:i}:{}}):null})})]})})]})})}const dI=E.createContext({});dI.displayName="DatagridContext";function aq({children:e,value:t}){return f.jsx(dI.Provider,{value:t,children:e})}const lq=S.styled("div")(({theme:e})=>({padding:e.spacing(2),display:"flex",justifyContent:"center",gap:e.spacing(2)})),yl="ApplicaEmpty",ji={message:`${yl}-message`,icon:`${yl}-icon`,toolbar:`${yl}-toolbar`},cq=S.styled("span",{name:yl,slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,height:"calc(100vh - 200px)",[`& .${ji.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${ji.icon}`]:{fontSize:"9em",marginTop:"16px",marginBottom:"16px"},[`& .${ji.toolbar}`]:{textAlign:"center"}}));function md({actions:e,className:t,hasCreate:n,icon:r=f.jsx(Ue.DropboxOutlined,{className:ji.icon}),title:o,subtitle:i,sx:a,...c}){const{hasCreate:u}=q.useResourceDefinition(c),d=n??u,p=q.useResourceContext(c),g=q.useTranslate(),v=q.useGetResourceLabel(),y=g(`resources.${p}.forcedCaseName`,{smart_count:0,_:v(p,0)}),b=g("ra.page.empty",{name:y}),x=g("ra.page.invite");return f.jsxs(cq,{className:Be(`${yl}-root`,t),sx:a,children:[f.jsxs(S.Box,{className:ji.message,children:[r,f.jsx(S.Typography,{variant:"h4",paragraph:!0,children:o||g(`resources.${p}.empty`,{_:b})}),i||(d?f.jsx(S.Typography,{variant:"body1",children:g(`resources.${p}.invite`,{_:x})}):null)]}),f.jsx(lq,{className:ji.toolbar,children:e||(d?f.jsx(cE,{disableFloatingButton:!0}):null)})]})}const fI=f.jsx(L.BulkDeleteButton,{}),pI=D.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?L.PureDatagridBody:L.DatagridBody,header:o=L.DatagridHeader,children:i,className:a,empty:c,expand:u,bulkActionsToolbar:d=!1,bulkActionButtons:p=fI,hover:g,isRowSelectable:v,isRowExpandable:y,resource:b,rowClick:x,rowSx:w,rowStyle:A,size:j="small",sx:T,expandSingle:P=!1,...O}=e,_=q.useTranslate(),{sort:R,data:N,isLoading:Y,onSelect:X,onToggleItem:G,selectedIds:re,setSort:ne,total:Z}=q.useListContext(e),J=!!p,V=E.useMemo(()=>({isRowExpandable:y,expandSingle:P}),[y,P]),$=E.useRef(null);E.useEffect(()=>{(!re||re.length===0)&&($.current=null)},[JSON.stringify(re)]);const W=E.useCallback((U,ee)=>{const de=N.map(fe=>fe.id),ge=de.indexOf($.current);if($.current=ee.target.checked?U:null,ee.shiftKey&&ge!==-1){const fe=de.indexOf(U),he=de.slice(Math.min(ge,fe),Math.max(ge,fe)+1),me=ee.target.checked?kG(re,he):YG(re,he);X(v?me.filter(Se=>v(N.find(be=>be.id===Se))):me)}else G(U)},[N,v,X,G,re]),ie=f.jsx(md,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:f.jsx(S.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:_("ra.navigation.no_results")})});return Y===!0?f.jsx(L.DatagridLoading,{className:a,expand:u,hasBulkActions:J,nbChildren:D.Children.count(i),size:j}):N==null||N.length===0||Z===0?c||ie:f.jsx(aq,{value:V,children:f.jsxs(L.DatagridRoot,{sx:T,className:Be(L.DatagridClasses.root,a),children:[d!=null&&E.isValidElement(d)?E.cloneElement(d,{selectedIds:re,total:Z}):p!==!1?f.jsx(cI,{children:E.isValidElement(p)?p:fI}):null,f.jsx("div",{className:L.DatagridClasses.tableWrapper,children:f.jsxs(S.Table,{ref:t,className:L.DatagridClasses.table,size:j,...dq(O),children:[hI(o,{children:i,sort:R,data:N,hasExpand:!!u,hasBulkActions:J,isRowSelectable:v,onSelect:X,resource:b,selectedIds:re,setSort:ne},i),hI(r,{expand:u,rowClick:x,data:N,hasBulkActions:J,hover:g,onToggleItem:W,resource:b,rowSx:w,rowStyle:A,selectedIds:re,isRowSelectable:v},i)]})})]})})});function hI(e,t,n){return E.isValidElement(e)?E.cloneElement(e,t,n):E.createElement(e,t,n)}const uq=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"];function dq(e){return Object.keys(q.sanitizeListRestProps(e)).filter(t=>!uq.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{})}pI.displayName="Datagrid";const fq=ue(pI,{slot:"root"})(({theme:e})=>({"& .RaBulkActionsToolbar-toolbar":{height:48},"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",backgroundColor:"inherit !important",textTransform:"none",fontSize:e.typography.subtitle1.fontSize}}));function pq(e){return f.jsx(fq,{...e})}const gm=E.createContext({hasFilterSidebar:!1});function gI(){var e;return((e=E.useContext(gm))==null?void 0:e.hasFilterSidebar)??!1}function mm({source:e,value:t}){const n=E.useContext(L.FilterContext),r=L.useResourceContext(),o=E.useMemo(()=>n.find(u=>{var d;return E.isValidElement(u)&&((d=u.props)==null?void 0:d.source)===e}),[n,e]),i=E.useMemo(()=>E.isValidElement(o)?o.props:{},[o]);if(!(i!=null&&i.chip))throw new Error(`No chip component found for filter source "${e}". Ensure your filter components define a 'chip' prop.`);const a={...i,record:{[e]:t},value:t,resource:r};return E.isValidElement(i.chip)?E.cloneElement(i.chip,a):Ze.isFunction(i.chip)?E.createElement(i.chip,a):null}function hq(e){const{value:t,source:n,lastItem:r}=e,o=mm({source:n,value:t});return f.jsxs(S.Stack,{children:[f.jsx(S.ListItem,{alignItems:"flex-start",sx:{pl:0},children:f.jsx(S.ListItemText,{primary:o,sx:{my:0}})}),r===n?null:f.jsx(S.Divider,{})]})}function gq(){const{filterValues:e}=q.useListContext(),t=q.useTranslate();return f.jsxs(S.Stack,{mt:4,width:"100%",children:[f.jsx(S.Typography,{variant:"h6",fontWeight:"bold",color:"secondary",children:t("ra.title.selected_filters")}),f.jsx(S.List,{sx:{bgcolor:"background.paper",pt:0},children:e?Object.entries(e).map(([n,r])=>{const o=Object.entries(e).pop(),i=o?o[0]:"";return f.jsx(hq,{lastItem:i,value:r,source:n},n)}):null})]})}function mq(e){const{onClose:t,addQuery:n}=e,r=q.useTranslate(),{handleSubmit:o}=tn.useFormContext(),i=E.useCallback(a=>{n(a.queryName)},[n]);return f.jsxs(S.Toolbar,{sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[f.jsx(S.Button,{onClick:t,children:r("ra.action.cancel")}),f.jsx(S.Button,{variant:"contained",onClick:o(i),children:r("ra.action.save")})]})}function mI(e){const{open:t,onClose:n}=e,{filterValues:r,sort:o,perPage:i,displayedFilters:a,resource:c}=q.useListContext(),[u,d]=yS(c),p=q.useTranslate(),g=E.useCallback(y=>{const b={label:y.trim(),value:{filter:r,sort:o,perPage:i,displayedFilters:a}},x=bS(u);d(x.concat(b)),n()},[r,o,i,a,u,d,n]),v=E.useCallback(()=>y=>{if(u.some(b=>b.label===(y==null?void 0:y.trim())))return"ra.validation.already_exists"},[u]);return f.jsx(S.Dialog,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:f.jsxs(Bg,{toolbar:f.jsx(mq,{addQuery:g,onClose:n}),title:p("ra.title.save_favorite_filter"),modal:!0,children:[f.jsx(hr,{fullWidth:!0,source:"queryName",label:p("ra.input.query_name"),placeholder:p("ra.input.query_name_placeholder"),validate:[q.required(),v()]}),f.jsx(gq,{})]})})}function vI(){const[e,t]=E.useState(!1),n=q.useTranslate(),r=E.useCallback(()=>{t(!1)},[]),o=E.useCallback(()=>{t(!0)},[]);return f.jsxs(f.Fragment,{children:[f.jsx(S.Button,{sx:{height:"36px"},variant:"contained",onClick:o,children:n("ra.action.save_filter")}),f.jsx(mI,{open:e,onClose:r})]})}function vq(e){const{onDelete:t,value:n,source:r}=e,o=mm({source:r,value:n});return o&&f.jsx(S.Chip,{label:o,variant:"combined",color:"primary",sx:{height:"36px","& .MuiChip-deleteIcon":{fontSize:"1rem !important",mr:1}},deleteIcon:f.jsx(en.Close,{}),onDelete:t})}function yq(){const{filterValues:e,setFilters:t}=q.useListContext(),n=S.useTheme(),r=S.useMediaQuery(n.breakpoints.down("sm")),o=q.useTranslate(),i=E.useCallback(()=>{t({})},[t]),a=E.useCallback(u=>{const d={...e};delete d[u],t(d)},[e,t]),c=E.useCallback(()=>f.jsxs(S.Stack,{flexDirection:"row",gap:2,children:[f.jsx(vI,{}),f.jsx(S.Button,{variant:"outlined",onClick:i,children:o("ra.action.reset_filters")})]}),[i,o]);return f.jsxs(S.Stack,{gap:2,flexDirection:r?"column":"row",children:[f.jsxs(S.Stack,{flexDirection:"row",flexWrap:r?"nowrap":"wrap",gap:2,py:.5,overflow:"auto",width:r?window.innerWidth-58:"auto",children:[Object.entries(e).map(([u,d])=>f.jsx(vq,{source:u,value:d,onDelete:()=>a(u)},u)),r?null:f.jsx(c,{})]}),r?f.jsx(c,{}):null]})}function vm(){const{filterValues:e}=q.useListContext(),t=S.useTheme(),n=S.useMediaQuery(t.breakpoints.down("sm")),r=q.useTranslate();return e&&!Ze.isEmpty(e)?f.jsxs(S.Stack,{flexDirection:n?"column":"row",alignItems:"baseline",gap:2,m:n?2:0,children:[f.jsx(S.Typography,{variant:"h6",color:"secondary",whiteSpace:"nowrap",children:r("ra.title.active_filters")}),f.jsx(yq,{})]}):null}function yI({open:e,onClose:t,filterToRemove:n}){var b;const r=q.useTranslate(),{resource:o,filterValues:i,sort:a,perPage:c,displayedFilters:u}=q.useListContext(),d=((b=n==null?void 0:n.value)==null?void 0:b.filter)||i,p=(n==null?void 0:n.label)??"",[g,v]=L.useSavedQueries(o);function y(){const x={filter:d,sort:a,perPage:c,displayedFilters:u},w=L.extractValidSavedQueries(g),A=w.findIndex(j=>$a(j.value,x));v([...w.slice(0,A),...w.slice(A+1)]),t()}return f.jsxs(S.Dialog,{open:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[f.jsx(S.DialogTitle,{id:"alert-dialog-title",children:r("ra.saved_queries.remove_dialog_title",{label:p,_:"Remove saved query?"})}),f.jsx(S.DialogContent,{children:f.jsx(S.DialogContentText,{children:r("ra.saved_queries.remove_message",{_:"Are you sure you want to remove that item from your list of saved queries?"})})}),f.jsxs(S.DialogActions,{children:[f.jsx(S.Button,{onClick:t,children:r("ra.action.cancel")}),f.jsx(S.Button,{onClick:y,color:"primary",autoFocus:!0,children:r("ra.action.confirm")})]})]})}function bq(e){const{query:t}=e,[n,r]=E.useState(!1),o=E.useCallback(()=>{r(a=>!a)},[]),i=q.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsx(S.Button,{size:"small",color:"primary",onClick:o,children:i("ra.action.delete")}),f.jsx(yI,{open:n,onClose:o,filterToRemove:t})]})}function bI(e){const{closeSidebar:t}=e,{resource:n,setFilters:r,setSort:o,setPage:i,setPerPage:a}=q.useListContext(),[c,u]=E.useState(!1),d=pt(),[p]=yS(n),g=bS(p),v=q.useTranslate(),y=E.useCallback(()=>{u(x=>!x)},[]),b=E.useCallback(x=>{const{value:w}=x;r(w.filter),o({field:w.sort.field,order:w.sort.order}),i(1),a(w.perPage),t()},[r,o,i,a,t]);return p&&p.length>0?f.jsx(S.Box,{sx:{mt:"-1px",mb:2,"& .MuiAccordion-root":{borderColor:d.palette.divider,"& .Mui-expanded:last-of-type":{marginBottom:"inherit"},"& .MuiAccordionSummary-root":{bgcolor:"transparent",flexDirection:"row"},"& .MuiAccordionSummary-content":{justifyContent:"space-between",marginLeft:0},"& .MuiAccordionDetails-root":{borderColor:d.palette.divider},"& .MuiAccordionSummary-expandIconWrapper":{color:d.palette.text.primary,"&.Mui-expanded":{transform:"rotate(180deg)"}}}},children:f.jsxs(S.Accordion,{expanded:c,onChange:y,children:[f.jsx(S.AccordionSummary,{sx:{px:"20px"},expandIcon:f.jsx(Hw,{fontSize:"small"}),children:f.jsxs(S.Typography,{variant:"h5",fontWeight:"bold",children:[v("ra.action.saved_filters")," (",g.length,")"]})}),g==null?void 0:g.map((x,w)=>f.jsxs(S.AccordionDetails,{sx:{display:"flex",justifyContent:"space-between",px:"20px",alignItems:"center"},children:[f.jsx(S.Typography,{variant:"body1",children:x.label}),f.jsxs(S.Stack,{flexDirection:"row",alignItems:"center",children:[f.jsx(bq,{query:x}),f.jsx(S.Button,{size:"small",color:"primary",onClick:()=>b({value:x.value}),children:v("ra.action.apply")})]})]},w))]})}):f.jsx(S.Box,{height:16})}function xq(e){const{form:t,filters:n}=e,r=q.useResourceContext();return f.jsx(L.FilterContext.Provider,{value:Array.isArray(n)?n:[n],children:f.jsx(tn.FormProvider,{...t,children:f.jsx(S.Box,{px:"20px",children:n?(Array.isArray(n)?n:[n]).map((o,i)=>{const a={...o.props,display:"label"};return E.isValidElement(o)?f.jsx(S.Box,{mb:1,children:E.cloneElement(o,{...a,resource:r})},i):null}):null})})})}function vd(e){const{filters:t}=e,[n,r]=E.useState(!1),{setSidebarOpen:o,sidebarOpen:i}=ym(),{filterValues:a,setFilters:c}=q.useListContext(),u=q.useTranslate(),d=tn.useForm({defaultValues:a}),{handleSubmit:p,getValues:g,reset:v,watch:y}=d,b=y(),x=E.useMemo(()=>{const O={};return t&&(Array.isArray(t)?t:[t]).forEach(_=>{O[_.props.source]=(a==null?void 0:a[_.props.source])??""}),O},[t,a]);E.useEffect(()=>{const O=L.getFilterFormValues(g(),a),_=g();Ze.isEqual(O,_)||v(O)},[JSON.stringify(a),a,g,v]);const w=E.useCallback(()=>{Ze.isFunction(o)&&o(!1)},[o]),A=E.useCallback(O=>{c(O),w()},[c,w]),j=E.useCallback(()=>{v({}),c({})},[v,c]),T=E.useCallback(()=>{r(O=>!O),j(),setTimeout(()=>{r(!1)},1e3)},[j]),P=E.useMemo(()=>{const O=g();return Ze.isEmpty(x)||Ze.isEqual(O,x)},[x,g,b]);return f.jsxs(mr,{sx:{height:"100%"},open:i,onClose:w,children:[f.jsxs(mr.Header,{children:[f.jsx(mr.HeaderText,{primary:u("ra.action.add_filter")}),f.jsx(mr.HeaderAction,{children:f.jsx(p1,{variant:"text",loading:n,loadingPosition:"start",startIcon:f.jsx(Ue.ReloadOutlined,{}),onClick:T,children:u("ra.action.reset_filters")})})]}),f.jsxs(mr.Content,{children:[f.jsx(bI,{closeSidebar:w}),f.jsx(xq,{form:d,filters:t})]}),f.jsx(mr.Footer,{children:f.jsxs(S.Stack,{direction:"row",spacing:2,children:[f.jsx(S.Button,{fullWidth:!0,onClick:()=>{v({}),w()},children:u("ra.action.close")}),f.jsx(S.Button,{fullWidth:!0,disabled:P,variant:"contained",color:"primary",onClick:p(A),children:u("ra.action.apply_filters")})]})})]})}function Cq(){const{setSidebarOpen:e}=ym(),t=E.useContext(L.FilterContext),n=gI(),r=L.useTranslate(),o=S.useTheme(),i=S.useMediaQuery(o.breakpoints.down("sm"));if(!n)throw new Error("The <FilterSidebarButton> component requires the <List aside={<FilterSidebar />}> prop to be set");if(t===void 0)throw new Error("The <FilterSidebarButton> component requires the <List filters> prop to be set");const a=E.useCallback(()=>{Ze.isFunction(e)&&e(!0)},[e]);return i?f.jsxs(S.Button,{className:"add-filter",onClick:a,children:[f.jsx(en.FilterList,{sx:{fontSize:"1rem",mr:.5}}),f.jsx(S.Typography,{variant:"h6",children:r("ra.action.add_filter")})]}):f.jsx(Ii,{label:"ra.action.add_filter",onClick:a,children:f.jsx(en.FilterList,{})})}function xI(e){const{filters:t,actions:n,className:r,hasFilterSidebar:o,...i}=e,a=pt(),c=S.useMediaQuery(a.breakpoints.down("sm")),u=n?E.cloneElement(n,{...i,...n.props}):null,{filterValues:d}=q.useListContext();return Array.isArray(t)?f.jsx(gm.Provider,{value:{hasFilterSidebar:o},children:f.jsx(L.FilterContext.Provider,{value:t,children:c&&o?f.jsxs("div",{children:[u,Ze.isEmpty(d)?null:f.jsxs("div",{children:[f.jsx(S.Divider,{}),f.jsx(vm,{})]})]}):f.jsxs(CI,{className:r,children:[o?f.jsx(vm,{}):f.jsx(L.FilterForm,{}),f.jsx("span",{}),u]})})}):f.jsxs(CI,{className:r,children:[t?E.cloneElement(t,{...i,context:"form"}):null,f.jsx("span",{}),n?E.cloneElement(n,{...i,filters:t,...n.props}):null]})}xI.propTypes={filters:m.oneOfType([m.element,m.arrayOf(m.element)]),actions:m.oneOfType([m.bool,m.element]),exporter:m.oneOfType([m.func,m.bool])};const CI=ue("div",{name:"RaListToolbar",overridesResolver:e=>e.root})(({theme:e})=>({display:"flex",position:"relative",justifyContent:"space-between",alignItems:"flex-end",width:"100%",[e.breakpoints.down("sm")]:{backgroundColor:e.palette.background.paper,flexWrap:"inherit",flexDirection:"column-reverse"}})),wI=E.memo(xI),wq=f.jsx(L.ListActions,{}),Sq=f.jsx(L.Pagination,{}),Eq=f.jsx(md,{}),Tq=S.Card;function Aq(e){const{actions:t=wq,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:i,hasCreate:a,pagination:c=Sq,children:u,className:d,component:p=Tq,title:g,empty:v=Eq,...y}=e,{defaultTitle:b,data:x,error:w,isLoading:A,filterValues:j,resource:T}=q.useListContext(e),P=pt(),O=D.isValidElement(n)&&(n==null?void 0:n.type)!==vd,_=D.isValidElement(n)&&(n==null?void 0:n.type)===vd;if(!u||!x&&A&&i)return null;function R(J){return f.jsxs("div",{className:Qr.main,style:{border:O?"1px solid":"none",borderRadius:O?4:0,borderColor:O?P.palette.mode==="dark"?P.palette.divider:P.palette.grey.A800:"transparent",backgroundColor:O?P.palette.background.paper:"transparent"},children:[r||t?f.jsx(wI,{className:Qr.actions,filters:r,actions:t,hasCreate:a,hasFilterSidebar:_}):null,!w&&f.jsx(p,{className:Qr.content,sx:J?{background:"transparent"}:{},children:o&&u&&D.isValidElement(u)?E.cloneElement(u,{bulkActionButtons:o}):u}),w?f.jsx(vg,{error:w,resetErrorBoundary:null}):c!==!1&&c]})}function N(){return v!==!1&&E.cloneElement(v,{className:Qr.noResults,hasCreate:a})}const Y=!A&&(x==null?void 0:x.length)===0,X=!A&&(x==null?void 0:x.length)===0&&!Object.keys(j).length&&v!==!1,G=D.isValidElement(n),re=G&&(n==null?void 0:n.type)===vd,ne=A||X||G&&!re?D.Fragment:On,Z=!A&&!X&&(!n||re)?{content:!1}:void 0;return f.jsxs(Oq,{className:Be("list-page",d),...y,sx:Y?{"& .MuiPaper-root":{backgroundColor:"transparent",border:"none"},"& .RaList-actions":{border:"1px solid",borderRadius:`${P.shape.borderRadius}px`,borderColor:P.palette.mode==="dark"?P.palette.divider:P.palette.grey.A800,backgroundColor:P.palette.background.paper}}:{},children:[f.jsx(L.Title,{title:g,defaultTitle:b,preferenceKey:`${T}.list.title`}),f.jsx(ne,{...Z,children:A?f.jsx(S.CircularProgress,{sx:{position:"absolute",top:"50%",left:"50%",marginTop:"-20px",marginLeft:"-20px"}}):X?N():R(Y)}),O?f.jsx(Iq,{aside:n}):null,_?D.cloneElement(n,{filters:r}):null]})}function Iq({aside:e}){var r;const t=((r=e==null?void 0:e.props)==null?void 0:r.order)??-1,n=pt();return f.jsx(S.Card,{className:Qr.asideCard,sx:{order:t,mr:t===-1?2:0,ml:t!==-1?2:0,width:200,border:"1px solid",borderRadius:1,borderColor:n.palette.mode==="dark"?n.palette.divider:n.palette.grey.A800,backgroundColor:n.palette.background.paper,backgroundImage:"none"},children:f.jsx(S.CardContent,{sx:{pt:1},children:E.cloneElement(e,{})})})}const zs="RaList",Qr={main:`${zs}-main`,content:`${zs}-content`,actions:`${zs}-actions`,noResults:`${zs}-noResults`,asideCard:`${zs}-asideCard`},Oq=ue("div",{name:zs,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex","& >.MuiPaper-root":{flex:1},[`& .${Qr.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${Qr.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${Qr.actions}`]:{},[`& .${Qr.noResults}`]:{alignContent:"center"},[`& .${Qr.asideCard}`]:{[e.breakpoints.down("md")]:{display:"none"},[`& .${L.SavedQueriesListClasses.floatingIcon}`]:{fontSize:"1.125rem"},[`& .${L.SavedQueriesListClasses.floatingTooltip}`]:{top:"-1.2em"},"& form":{marginTop:e.spacing(2)}}})),SI=E.createContext({sidebarOpen:!1,setSidebarOpen:()=>{}});function EI(e){const[t,n]=E.useState(!1);return f.jsx(SI.Provider,{value:{sidebarOpen:t,setSidebarOpen:n},children:e.children})}function ym(){return E.useContext(SI)}function Pq({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=jq,filterDefaultValues:i,perPage:a=10,queryOptions:c,resource:u,sort:d,storeKey:p,...g}){return f.jsx(q.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:i,perPage:a,queryOptions:c,resource:u,sort:d,storeKey:p,children:f.jsx(EI,{children:f.jsx(Aq,{...g})})})}const jq={},kq=Na(Pq,{slot:"root"})(({theme:e})=>({"& .RaList-main":{overflowX:"auto","& .RaBulkActionsToolbar-toolbar":{height:36,top:42,paddingTop:16,"& .RaBulkActionsToolbar-title":{alignItems:"end","& .MuiTypography-root":{alignSelf:"center"}}},"& .MuiToolbar-root":{"& form":{padding:e.spacing(2),paddingBottom:e.spacing(2),alignItems:"flex-start"}},"& .MuiButton-root":{margin:0},"& .RaList-actions":{minHeight:80,alignItems:"center",padding:e.spacing(2.5),[e.breakpoints.down("sm")]:{flexDirection:"row"},"& form":{alignItems:"center",minHeight:"auto",paddingBottom:0,rowGap:e.spacing(2.5)},"& .RaFilterForm-filterFormInput":{margin:0,"& .MuiInputLabel-root":{paddingTop:0},"& .MuiFormControl-root":{marginTop:0},"& .ra-input":{alignSelf:"center",marginTop:0},[e.breakpoints.down("sm")]:{"&>.MuiStack-root":{width:"100%","&>div:not(.MuiStack-root)":{width:"100%"}}}},"& .RaFilterFormInput-hideButton":{margin:"0 !important",alignSelf:"center"},"& > .MuiToolbar-root":{flex:"unset",padding:0,alignSelf:"center",minHeight:"fit-content",[e.breakpoints.down("sm")]:{paddingBottom:e.spacing(2)}}},"& .RaList-content":{borderRadius:0,"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}},"& .ApplicaEmpty-root":{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"calc(100vh - 260px)"}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}}));function Mq(e){return f.jsx(kq,{...e,pagination:f.jsx(pm,{})})}function Fq(){const e=L.useRefresh(),t=L.useNotify(),n=L.useResourceContext(),r=L.useUnselectAll(n),{selectedIds:o,data:i}=L.useListContext(),a=L.useRecordContext(),c=o.map(g=>i.find(v=>v.id===g)),[u,{isLoading:d}]=L.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Or().toISOString()},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),r()},onError:()=>t("ra.notification.readed_error",{type:"warning"}),onFailure:()=>t("ra.notification.readed_error",{type:"warning"})}),p=E.useCallback(()=>{u()},[u]);return f.jsx(L.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:p,children:f.jsx(en.Email,{})})}function _q(){const e=L.useRefresh(),t=L.useNotify(),n=L.useResourceContext(),r=L.useUnselectAll(n),{selectedIds:o,data:i}=L.useListContext(),a=L.useRecordContext(),c=o.map(g=>i.find(v=>v.id===g)).concat([a]),[u,{isLoading:d}]=L.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:null},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),r()},onFailure:()=>t("resources.notifications.messages.unreaded.error",{type:"warning"})}),p=E.useCallback(()=>{u()},[u]);return f.jsx(L.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:p,children:f.jsx(en.Drafts,{})})}function Rq(e){const t=L.useRecordContext(e),n=L.useResourceContext(e),r=L.useRedirect(),o=L.useNotify(),i=L.useTranslate(),[a]=L.useLocaleState(),c=E.useMemo(()=>t!=null&&t.readed?Or(t==null?void 0:t.readed).locale(a).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,a]),[u]=L.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Or().toISOString()}},{onSuccess:()=>{t!=null&&t.resource&&(t!=null&&t.resource.startsWith("/")?r(t==null?void 0:t.resource):document.location.href=t==null?void 0:t.resource)},onError:()=>{o("ra.notification.readed_error",{type:"warning"})}}),d=E.useCallback(()=>u(),[u]);return f.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[f.jsx(S.Typography,{variant:"subtitle1",children:f.jsxs(S.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),f.jsx(S.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),c?f.jsx(S.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:i("ra.notification.readed",{readed:c})}):null]})}function Dq({...e}){const t=S.useTheme(),{mode:n,colorize:r,density:o}=E.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?S.darken:S.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]);function i(a){return{backgroundColor:a!=null&&a.readed?r(t.palette.secondary[n],o):r(t.palette.primary[n],o)}}return f.jsxs(L.Datagrid,{...e,rowSx:i,children:[f.jsx(Rq,{source:"notification",sortable:!1}),f.jsx(bE,{source:"created"}),f.jsxs(No,{children:[f.jsx(Fq,{}),f.jsx(_q,{})]})]})}function Lq({empty:e,...t}){const n=L.useTranslate(),r=f.jsx(md,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:f.jsx(S.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:n("ra.navigation.no_results")})});return f.jsx(L.SimpleList,{...t,empty:e||r})}function Bq({children:e}){const t=pt();return f.jsx(On,{sx:{maxWidth:{xs:400,lg:475},margin:{xs:2.5,md:3},"& > *":{flexGrow:1,flexBasis:"50%"}},content:!1,border:!1,boxShadow:!0,shadow:t.customShadows.z1,children:f.jsx(S.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})}function yd({version:e,name:t,copy:n,children:r,logo:o,background:i=pu,footer:a=!0}){return f.jsxs(S.Box,{children:[f.jsx(cm,{source:"default"}),E.isValidElement(i)?i:E.createElement(i),f.jsxs(S.Grid,{container:!0,direction:"column",justifyContent:"flex-end",children:[f.jsx(S.Grid,{item:!0,xs:12,sx:{ml:3},children:o||f.jsx(um,{title:t})}),f.jsxs(S.Grid,{item:!0,xs:12,children:[f.jsx(S.Grid,{item:!0,xs:12,container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:{xs:"calc(100vh - 210px)",sm:"calc(100vh - 134px)",md:"calc(100vh - 112px)"}},children:f.jsx(S.Grid,{item:!0,children:f.jsx(Bq,{children:r})})}),a?f.jsx(S.Grid,{item:!0,sx:{pb:1,position:"absolute",bottom:0,ml:2},children:f.jsx(lm,{name:t,copy:n,version:e})}):null]})]})]})}function Nq({name:e,copy:t,logo:n,version:r,background:o}){const i=q.useTranslate(),a=q.useAuthProvider(),c=q.useNotify(),u=ut.useNavigate(),{token:d}=ut.useParams();return E.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(d).then(()=>{c("ra.auth.activate_success",{type:"info"}),te.delay(()=>u("/login"),1e3)}).catch(p=>{c(p,{type:"error"}),te.delay(()=>u("/login"),1e3)})},[d,a,c,u]),f.jsx(yd,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:i("ra.auth.activate")}),f.jsx(S.Typography,{component:ut.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:i("ra.auth.back_to_login")})]})}),f.jsx(S.Grid,{item:!0,xs:12,children:i("ra.auth.activate_pending")})]})})}function TI(){const e=E.useCallback(()=>location.reload(),[]);return f.jsx(S.Container,{children:f.jsxs(S.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[f.jsx("img",{alt:"Error",src:v1,style:{width:"100%",maxWidth:450}}),f.jsx(S.Typography,{variant:"h2",children:"Ops! An error occurred..."}),f.jsx(S.Typography,{children:"We're fixing the problem. Please try again later."}),f.jsx(S.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}function AI({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:i=!1,redirectTo:a,background:c=f.jsx(pu,{})}){const[u,d]=q.useSafeSetState(!1),p=q.useLogin(),g=q.useTranslate(),v=q.useNotify(),y=q.useCheckAuth(),b=ut.useNavigate();E.useEffect(()=>{y({},!1).then(()=>{b("/")}).catch(()=>{})},[y,b]);function x(w){d(!0),p(w,a).then(()=>{d(!1)}).catch(A=>{d(!1),v(typeof A=="string"?A:typeof A>"u"||!A.message?"ra.auth.sign_in_error":A.message,{type:"error",messageArgs:{_:typeof A=="string"?A:A&&A.message?A.message:void 0}})})}return f.jsx(yd,{name:t,version:e,copy:n,logo:r,background:c,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:"Login"}),i?f.jsx(S.Typography,{component:ut.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:g("ra.auth.register")}):null]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(q.Form,{onSubmit:x,children:[f.jsxs(S.Grid,{container:!0,children:[f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(hr,{autoFocus:!0,source:"username",label:g("ra.auth.username"),autoComplete:"username",validate:q.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(hr,{source:"password",label:g("ra.auth.password"),type:"password",autoComplete:"current-password",validate:q.required(),placeholder:g("ra.auth.password_placeholder"),fullWidth:!0})})]}),o?f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:f.jsx(S.Link,{variant:"h6",component:ut.Link,to:"/recover",color:"text.primary",children:g("ra.auth.forgot_password")})})}):null,f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Button,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0,children:u?f.jsx(S.CircularProgress,{size:19,thickness:3}):g("ra.auth.sign_in")})})]})})]})})}function Vq({name:e,copy:t,logo:n,version:r,background:o}){const[i,a]=E.useState(!1),c=q.useTranslate(),u=q.useRedirect(),d=q.useNotify(),p=q.useAuthProvider();function g({email:v}){a(!0),p.recover(v).then(y=>{const b=`ra.auth.recover_${y.responseCode}`,x=y.responseCode==="ok"?"info":"error";d(b,{type:x}),u("/login")}).catch(y=>{d((y==null?void 0:y.message)||(y==null?void 0:y.toString()),{type:"error"})}).finally(()=>a(!1))}return f.jsx(yd,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:c("ra.auth.recover.title")}),f.jsx(S.Typography,{component:ut.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.back_to_login")})]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(L.Form,{onSubmit:g,children:[f.jsx(S.Grid,{container:!0,children:f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(hr,{source:"email",validate:[q.required(),q.email()]})})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:f.jsx(S.Typography,{variant:"caption",children:c("ra.auth.recover.inbox_help")})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?f.jsx(S.CircularProgress,{size:19,thickness:3}):c("ra.auth.recover")})})]})})]})})}function Wq({name:e,copy:t,version:n,logo:r,background:o}){const[i,a]=E.useState(!1),c=q.useTranslate(),u=q.useRedirect(),d=q.useNotify(),p=q.useAuthProvider();function g(v){a(!0),p.register(v).then(y=>{const b=`ra.auth.register_${y.responseCode}`,x=y.responseCode==="ok"?"info":"error";d(b,{type:x}),u("/login")}).catch(y=>{d(y,{type:"error"})}).finally(()=>a(!1))}return f.jsx(yd,{name:e,copy:t,logo:r,background:o,version:n,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:c("ra.auth.register.title")}),f.jsx(S.Typography,{component:ut.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.already_have_account")})]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(L.Form,{onSubmit:g,children:[f.jsxs(S.Grid,{container:!0,children:[f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(hr,{source:"name",label:c("ra.register.name"),validate:q.required()})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(hr,{source:"email",type:"email",validate:[q.required(),q.email()]})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(hr,{source:"password",type:"password",validate:q.required()})})]}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?f.jsx(S.CircularProgress,{size:19,thickness:3}):c("ra.auth.create_account")})})]})})]})})}function zq(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 Uq(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function Hq(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:f.jsx(Ue.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 ki({color:e,theme:t}){const n=nn(t,e),{lighter:r,light:o,main:i}=n;return{borderColor:et(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:i}}}function Gq(e){const t=ki({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":ki({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":ki({color:"secondary",theme:e}),"&.MuiAlert-borderError":ki({color:"error",theme:e}),"&.MuiAlert-borderSuccess":ki({color:"success",theme:e}),"&.MuiAlert-borderInfo":ki({color:"info",theme:e}),"&.MuiAlert-borderWarning":ki({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 Yq(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function Kq(e){var t;return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},popper:{border:`1px solid ${e.palette.mode==="dark"?(t=e.palette.dark)==null?void 0:t.main:e.palette.grey[100]}`},clearIndicator:{width:"auto",height:"auto"}}}}}function Mi({color:e,theme:t}){const n=nn(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function Xq(e){const t=Mi({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Mi({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Mi({color:"secondary",theme:e}),"&.MuiBadge-colorError":Mi({color:"error",theme:e}),"&.MuiBadge-colorInfo":Mi({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Mi({color:"success",theme:e}),"&.MuiBadge-colorWarning":Mi({color:"warning",theme:e})}}}}}function tt({variant:e,color:t,theme:n}){const r=nn(n,t),{lighter:o,main:i,dark:a,contrastText:c}=r,u=`${t}Button`,d=bs(n,u),p={"&::after":{boxShadow:`0 0 5px 5px ${et(i,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${et(i,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...p};case"shadow":return{color:c,backgroundColor:i,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:a},...p};case"outlined":return{borderColor:i,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...p};case"dashed":return{color:i,borderColor:i,backgroundColor:o,"&:hover":{color:a,borderColor:a},...p};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...p}}}function Zq(e){const t=tt({variant:"dashed",color:"primary",theme:e}),n=tt({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":tt({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":tt({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":tt({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":tt({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":tt({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":tt({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":tt({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":tt({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":tt({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":tt({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":tt({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":tt({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:tt({variant:"contained",color:"primary",theme:e}),containedSecondary:tt({variant:"contained",color:"secondary",theme:e}),containedError:tt({variant:"contained",color:"error",theme:e}),containedSuccess:tt({variant:"contained",color:"success",theme:e}),containedInfo:tt({variant:"contained",color:"info",theme:e}),containedWarning:tt({variant:"contained",color:"warning",theme:e}),outlinedPrimary:tt({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:tt({variant:"outlined",color:"secondary",theme:e}),outlinedError:tt({variant:"outlined",color:"error",theme:e}),outlinedSuccess:tt({variant:"outlined",color:"success",theme:e}),outlinedInfo:tt({variant:"outlined",color:"info",theme:e}),outlinedWarning:tt({variant:"outlined",color:"warning",theme:e}),textPrimary:tt({variant:"text",color:"primary",theme:e}),textSecondary:tt({variant:"text",color:"secondary",theme:e}),textError:tt({variant:"text",color:"error",theme:e}),textSuccess:tt({variant:"text",color:"success",theme:e}),textInfo:tt({variant:"text",color:"info",theme:e}),textWarning:tt({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function Qq(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function Jq(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function qq(){return{MuiCard:{styleOverrides:{root:{boxShadow:"none"}}}}}function $q(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Us({color:e,theme:t}){const n=nn(t,e),{lighter:r,main:o,dark:i}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${i}`,outlineOffset:-4}}}function e$(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 bm(e){const t=e$(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function t$(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(Ue.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(Ue.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...bm("small")},"&.size-medium":{...bm("medium")},"&.size-large":{...bm("large")}},colorPrimary:Us({color:"primary",theme:e}),colorSecondary:Us({color:"secondary",theme:e}),colorSuccess:Us({color:"success",theme:e}),colorWarning:Us({color:"warning",theme:e}),colorInfo:Us({color:"info",theme:e}),colorError:Us({color:"error",theme:e})}}}}function Hs({color:e,theme:t}){const n=nn(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Xn({color:e,theme:t}){const n=nn(t,e),{light:r,lighter:o,main:i}=n;return{color:i,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:i,"&:hover":{color:r}}}}function n$(e){const t=Xn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":Hs({color:"primary",theme:e}),"&.MuiChip-colorSecondary":Hs({color:"secondary",theme:e}),"&.MuiChip-colorError":Hs({color:"error",theme:e}),"&.MuiChip-colorInfo":Hs({color:"info",theme:e}),"&.MuiChip-colorSuccess":Hs({color:"success",theme:e}),"&.MuiChip-colorWarning":Hs({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":Xn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":Xn({color:"secondary",theme:e}),"&.MuiChip-lightError":Xn({color:"error",theme:e}),"&.MuiChip-lightInfo":Xn({color:"info",theme:e}),"&.MuiChip-lightSuccess":Xn({color:"success",theme:e}),"&.MuiChip-lightWarning":Xn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":Xn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":Xn({color:"secondary",theme:e}),"&.MuiChip-combinedError":Xn({color:"error",theme:e}),"&.MuiChip-combinedInfo":Xn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":Xn({color:"success",theme:e}),"&.MuiChip-combinedWarning":Xn({color:"warning",theme:e})}}}}}function r$(e){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:et("#000",.7)},"& .MuiCardContent-root":{[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}},"& .MuiPaper-root:has(.tabbed-form)":{overflowY:"unset",width:"100%"}}}}}}function o$(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function i$(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function Gs({color:e,theme:t}){const n=nn(t,e),{main:r,dark:o,contrastText:i}=n,a=`${e}Button`,c=bs(t,a);return{color:i,backgroundColor:r,boxShadow:c,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${et(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${et(r,.9)}`}}}function s$(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":Gs({color:"primary",theme:e}),"&.MuiFab-secondary":Gs({color:"secondary",theme:e}),"&.Mui-error":Gs({color:"error",theme:e}),"&.MuiFab-success":Gs({color:"success",theme:e}),"&.MuiFab-info":Gs({color:"info",theme:e}),"&.MuiFab-warning":Gs({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 a$(e){return{MuiIconButton:{styleOverrides:{root:{borderRadius:4},sizeLarge:{width:e.spacing(5.5),height:e.spacing(5.5),fontSize:"1.25rem"},sizeMedium:{width:e.spacing(4.5),height:e.spacing(4.5),fontSize:"1rem"},sizeSmall:{width:e.spacing(3.75),height:e.spacing(3.75),fontSize:"0.75rem"},sizeExtraSmall:{width:e.spacing(2.6875),height:e.spacing(2.6875),fontSize:"0.625rem"}}}}}function l$(e){return{MuiInputBase:{styleOverrides:{}}}}function c$(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1.3em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function u$(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function d$(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function f$(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function p$(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function h$(e){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function g$(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Fi({variant:e,theme:t}){const n=nn(t,e),{light:r}=n,o=bs(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function m$(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:{...Fi({variant:"primary",theme:e}),"&.Mui-error":{...Fi({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:Fi({variant:"secondary",theme:e}),colorError:Fi({variant:"error",theme:e}),colorWarning:Fi({variant:"warning",theme:e}),colorInfo:Fi({variant:"info",theme:e}),colorSuccess:Fi({variant:"success",theme:e})}}}}function v$(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function Et({variant:e,color:t,theme:n}){const r=nn(n,t),{lighter:o,light:i,dark:a,main:c,contrastText:u}=r,d={"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:u,backgroundColor:c,"&:hover":{backgroundColor:i},...d};case"outlined":return{borderColor:c,"&:hover":{backgroundColor:o,borderColor:i},...d};case"text":default:return{color:c,"&:hover":{backgroundColor:c,color:o},...d}}}function y$(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":Et({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":Et({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":Et({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":Et({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":Et({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":Et({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":Et({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":Et({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":Et({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":Et({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":Et({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":Et({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":Et({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":Et({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":Et({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":Et({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":Et({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":Et({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":Et({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":Et({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":Et({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":Et({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":Et({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":Et({variant:"outlined",color:"warning",theme:e})}}}}}}function b$(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function Ys({color:e,theme:t}){const n=nn(t,e),{lighter:r,main:o,dark:i}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${i}`,outlineOffset:-4}}}function x$(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 xm(e){const t=x$(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function C$(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:f.jsx(S.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":{...xm("small")},"&.size-medium":{...xm("medium")},"&.size-large":{...xm("large")}},colorPrimary:Ys({color:"primary",theme:e}),colorSecondary:Ys({color:"secondary",theme:e}),colorSuccess:Ys({color:"success",theme:e}),colorWarning:Ys({color:"warning",theme:e}),colorInfo:Ys({color:"info",theme:e}),colorError:Ys({color:"error",theme:e})}}}}function Ks({color:e,theme:t}){const n=nn(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function w$(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":Ks({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":Ks({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":Ks({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":Ks({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":Ks({color:"info",theme:e}),"&.MuiSlider-thumbColorError":Ks({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 S$(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 Cm(e,t){const n=S$(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 E$(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},...Cm(e,"medium")},sizeLarge:{...Cm(e,"large")},sizeSmall:{...Cm(e,"small")}}}}}function T$(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 A$(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 I$(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 O$(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function P$(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function j$(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function k$(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function M$(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function F$(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 _$(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function R$(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function D$(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function L$(e){return Ze.merge(zq(e),Uq(e),Hq(e),Gq(e),Yq(),Kq(e),Xq(e),Zq(e),Qq(),Jq(),qq(),$q(),t$(e),n$(e),r$(e),o$(e),i$(),s$(e),a$(e),l$(),c$(e),u$(),d$(),f$(e),p$(e),h$(),g$(),m$(e),v$(),y$(e),b$(e),C$(e),w$(e),E$(e),T$(e),A$(e),I$(e),O$(e),P$(e),j$(),k$(),M$(),F$(e),_$(e),R$(),D$())}function B$(e){const{blue:t,red:n,gold:r,cyan:o,green:i,grey:a}=e,c={0:a[0],50:a[1],100:a[2],200:a[3],300:a[4],400:a[5],500:a[6],600:a[7],700:a[8],800:a[9],900:a[10],A50:a[15],A100:a[11],A200:a[12],A400:a[13],A700:a[14],A800:a[16]},u="#fff";return{primary:{lighter:t[0],100:t[1],200:t[2],light:t[3],400:t[4],main:t[5],dark:t[6],700:t[7],darker:t[8],900:t[9],contrastText:u},secondary:{lighter:c[100],100:c[100],200:c[200],light:c[300],400:c[400],main:c[500],600:c[600],dark:c[700],800:c[800],darker:c[900],A100:c[0],A200:c.A400,A300:c.A700,contrastText:c[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:u},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:c[100]},info:{lighter:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:u},success:{lighter:i[0],light:i[3],main:i[5],dark:i[7],darker:i[9],contrastText:u},grey:c}}function N$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],c=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],u=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(i=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],c=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],u=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function V$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function W$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function z$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function U$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function H$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function G$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function Y$(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let i=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function K$(e,t,n){switch(t){case"theme1":return N$(e,n);case"theme2":return V$(e,n);case"theme3":return W$(e,n);case"theme4":return z$(e,n);case"theme5":return U$(e,n);case"theme6":return H$(e,n);case"theme7":return G$(e,n);case"theme8":return Y$(e,n);default:return B$(e)}}var wm=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];wm.primary=wm[5];var Sm=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Sm.primary=Sm[5];var Em=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Em.primary=Em[5];var Tm=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Tm.primary=Tm[5];var Am=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Am.primary=Am[5];var Im=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Im.primary=Im[5];var Om=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Om.primary=Om[5];var Pm=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Pm.primary=Pm[5];var jm=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];jm.primary=jm[5];var km=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];km.primary=km[5];var Mm=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Mm.primary=Mm[5];var Fm=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Fm.primary=Fm[5];var _m=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];_m.primary=_m[5];var X$={red:wm,volcano:Sm,orange:Em,gold:Tm,yellow:Am,lime:Im,green:Om,cyan:Pm,blue:jm,geekblue:km,purple:Mm,magenta:Fm,grey:_m},Rm=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Rm.primary=Rm[5];var Dm=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];Dm.primary=Dm[5];var Lm=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];Lm.primary=Lm[5];var Bm=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];Bm.primary=Bm[5];var Nm=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];Nm.primary=Nm[5];var Vm=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];Vm.primary=Vm[5];var Wm=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];Wm.primary=Wm[5];var zm=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];zm.primary=zm[5];var Um=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];Um.primary=Um[5];var Hm=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];Hm.primary=Hm[5];var Gm=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];Gm.primary=Gm[5];var Ym=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];Ym.primary=Ym[5];var Km=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];Km.primary=Km[5];var Z$={red:Rm,volcano:Dm,orange:Lm,gold:Bm,yellow:Nm,lime:Vm,green:Wm,cyan:zm,blue:Um,geekblue:Hm,purple:Gm,magenta:Ym,grey:Km};function Q$(e,t){const n=e==="dark"?Z$:X$;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],i=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],i=["#121212","#d3d8db"]),n.grey=[...r,...o,...i];const a=K$(n,t,e);return Fp({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?et(a.grey[900],.87):a.grey[700],secondary:e==="dark"?et(a.grey[900],.45):a.grey[500],disabled:e==="dark"?et(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?et(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})}function J$(e){return{button:e.palette.mode==="dark"?"0 2px 0 rgb(0 0 0 / 5%)":"0 2px #0000000b",text:"0 -1px 0 rgb(0 0 0 / 12%)",z0:"none",z1:e.palette.mode==="dark"?"0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)":`0px 1px 4px ${et(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${et(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${et(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${et(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${et(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${et(e.palette.info.main,.2)}`,success:`0 0 0 2px ${et(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${et(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${et(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${et(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${et(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${et(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${et(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${et(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${et(e.palette.grey[500],.2)}`}}function q$(e){return{htmlFontSize:16,fontFamily:e,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:600,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:600,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{lineHeight:1.66},button:{textTransform:"capitalize"}}}function Xm({themeOverrides:e,children:t}){const n=Cn(),{themeDirection:r,mode:o,presetColor:i,fontFamily:a}=n,c=oE(),u=E.useMemo(()=>o==="auto"?c:o,[o,c]),d=E.useMemo(()=>Q$(u,i),[u,i]),p=E.useMemo(()=>q$(a),[a]),g=E.useMemo(()=>J$(d),[d]),v=E.useMemo(()=>te.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:d.palette,customShadows:g,typography:p,components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:d.spacing(2.6875),height:d.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(d):e),[r,d,p,g,e]),y=Fp(v),b=te.cloneDeep(y.components??{});return y.components=te.merge(L$(y),b),f.jsx(S.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(AC,{theme:y,children:[f.jsx(S.CssBaseline,{enableColorScheme:!0}),t]})})}function $$({children:e,theme:t,...n}){return f.jsx(L.CoreAdminContext,{...n,children:f.jsx(Xm,{themeOverrides:t,children:f.jsx(aI,{children:e})})})}function II(e){const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:i,disableTelemetry:a,history:c,i18nProvider:u,layout:d,loading:p,loginPage:g,authCallbackPage:v,menu:y,notification:b,queryClient:x,requireAuth:w,store:A=L.localStorageStore(),ready:j,theme:T,title:P="React Admin"}=e;return f.jsx($$,{authProvider:t,dataProvider:i,i18nProvider:u,store:A,history:c,queryClient:x,theme:T,children:f.jsx(L.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:y,catchAll:n,title:P,loading:p,loginPage:g,authCallbackPage:v,notification:b,requireAuth:w,ready:j,children:r})})}class OI{constructor({catch:t,display:n,log:r,error:o}){zl(this,"catch");zl(this,"display");zl(this,"log");zl(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}class eee{constructor(t){Io(this,bl);Io(this,xl);Io(this,Xs,new Set);const{apiUrl:n}=t??{};if(!te.isString(n)||te.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");si(this,xl,n),si(this,bl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var c;const{message:n,filename:r,lineno:o,colno:i}=t,a=`${n}${r}${o}${i}`;Nn(this,Xs).has(a)||(Nn(this,Xs).add(a),fetch(`${Nn(this,xl)}/ui/error-log`,{method:"PUT",headers:Nn(this,bl),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(c=t.error)==null?void 0:c.stack})}).catch(u=>{console.warn("Unable to send error to server",u),Nn(this,Xs).delete(a)}))}}bl=new WeakMap,xl=new WeakMap,Xs=new WeakMap;function tee({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=i=>new OI({catch:i!=null,display:!1,log:i!=null,error:i}),...o}){const i=D.useMemo(()=>o.errorHandler?o.errorHandler:new eee({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=D.useCallback(function(u,...d){var g;if(!u)return!1;const p=r(u instanceof ErrorEvent?u:(g=u==null?void 0:u.toString())==null?void 0:g.replace(/%s/g,()=>d.shift()));return p.isCatched()||(p.logError()&&(u instanceof ErrorEvent?i.handle(u):i.handle(new ErrorEvent("window.onerror",{error:u,message:u.toString()}))),p.displayError()&&a.apply(console,arguments)),!1},[r,i,a]);return D.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c,a]),!0}class nee{constructor(t){Io(this,Cl);Io(this,wl);Io(this,Ri,[]);const{apiUrl:n}=t??{};if(!te.isString(n)||te.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");si(this,wl,n),si(this,Cl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!te.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!te.isString(n)||te.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!te.isString(r)||te.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!te.some(Nn(this,Ri),o=>te.isEqual(o,{code:n,lang:r}))){Nn(this,Ri).push({code:n,lang:r}),fetch(`${Nn(this,wl)}/i18n/message`,{method:"put",headers:Nn(this,Cl),body:JSON.stringify({code:n,lang:r,text:n})}).then(o=>o.json()).then(()=>{console.log(`[MissingMessageHandler] handleMessage: created message for lang ${r} and code ${n}`)}).catch(o=>{console.error(o),si(this,Ri,te.reject(Nn(this,Ri),i=>te.isEqual(i,{code:n,lang:r})))});return}}}Cl=new WeakMap,wl=new WeakMap,Ri=new WeakMap;function PI(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,i=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),c=new nee({apiUrl:t});function u(){return fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(g=>g.json()).catch(()=>Promise.resolve(i))}function d(){return fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(g=>g.json()).then(g=>g.reduce((v,y)=>({...v,[y.lang]:{...v[y.lang]||{},[y.code]:y.text}}),{}))}function p(g,v,y){return r||console.error(`Warning: Missing translation for key: "${g}"`),o&&(te.isString(g)?g.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${g}`):c.handleMessage({code:g,lang:y}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),g}return Promise.all([u(),d()]).then(g=>{const[v,y]=g;function b(x){return te.get(y,x,{})}return gv(b,n,v,{allowMissing:r||o,onMissingKey:p})})}function ree(e){const{defaultLocale:t,path:n}=e,r=[{locale:t,name:t}],o=new Headers({Accept:"application/json","Content-Type":"application/json"});function i(){return fetch(`${n}/languages.json`,{headers:o,method:"get"}).then(c=>c.json()).catch(()=>Promise.resolve(r))}function a(){return fetch(`${n}/messages.json`,{headers:o,method:"get"}).then(c=>c.json()).then(c=>c.reduce((u,d)=>({...u,[d.lang]:{...u[d.lang]||{},[d.code]:d.text}}),{}))}return Promise.all([i(),a()]).then(c=>{const[u,d]=c;function p(g){return te.get(d,g,{})}return gv(p,t,u,{allowMissing:!0})})}function oee({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})}){const[r,o]=E.useState({loading:!0,languages:null});return E.useEffect(()=>{const i=new Headers;i.append("Accept","application/json"),i.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:i}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r}function jI(e){const[t,n]=E.useState(),r=rE(e);return E.useEffect(()=>{if(e.customProvider!==void 0){e.customProvider.then(n);return}PI(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r,e==null?void 0:e.customProvider]),t}const iee=new Xi.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function see({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:i,logoIcon:a,loginPage:c=f.jsx(AI,{version:"0.0.0",name:"Applica",redirectTo:"/",background:f.jsx(pu,{})}),menu:u,name:d,copy:p,version:g="0.0.0",dataProvider:v,authProvider:y,i18nProvider:b,errorHandler:x,error:w,enableNotification:A=!1,enableRegistration:j=!1,enablePasswordRecover:T=!1,enableThemeToggler:P=!1,enableLocaleSwitcher:O=!1,queryClient:_=iee,background:R,notificationAPI:N="entities/notification",...Y}){tee({apiUrl:n,errorHandler:x,catcherFn:ne=>{const Z=ne==null?void 0:ne.toString(),V=["Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.","Support for defaultProps will be removed from function components in a future major release.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>.","Missing translation for key:","HttpError: "].some(W=>Z==null?void 0:Z.includes(W));return new OI({catch:V,display:!V,log:!V&&o===!0,error:Z})}});const X=E.useMemo(()=>E.isValidElement(c)?E.cloneElement(c,{name:d,copy:p,logo:i,version:g,background:R,enableRegistration:j,enablePasswordRecover:T}):c,[c,d,g,p,R,i,j,T]),G=E.useMemo(()=>ne=>{const Z=d?f.jsx(um,{title:d}):i,J=d?f.jsx(lI,{title:d}):a;return f.jsx(QA,{...ne,name:d,copy:p,version:g,logoMain:Z,logoIcon:J,notification:N,enableThemeToggler:P,enableNotification:A,enableLocaleSwitcher:O,error:w})},[i,a,d,p,g,w,N,A,P,O]),re=jI({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o,customProvider:b});return re===void 0?f.jsx(f.Fragment,{}):re.error?f.jsx(Rg,{initialConfig:t,children:f.jsx(Xm,{themeOverrides:e,children:f.jsx(TI,{})})}):f.jsx(EK,{children:f.jsx(AS,{menu:u,children:f.jsx(Rg,{initialConfig:t,children:f.jsx(II,{theme:e,layout:G,notification:$A,queryClient:_,dataProvider:v,authProvider:y,i18nProvider:re,loginPage:X,...Y})})})})}Object.defineProperty(k,"ArrayField",{enumerable:!0,get:()=>L.ArrayField}),Object.defineProperty(k,"ArrayInputContext",{enumerable:!0,get:()=>L.ArrayInputContext}),Object.defineProperty(k,"BooleanField",{enumerable:!0,get:()=>L.BooleanField}),Object.defineProperty(k,"ChipField",{enumerable:!0,get:()=>L.ChipField}),Object.defineProperty(k,"Confirm",{enumerable:!0,get:()=>L.Confirm}),Object.defineProperty(k,"CreateContextProvider",{enumerable:!0,get:()=>L.CreateContextProvider}),Object.defineProperty(k,"CustomRoutes",{enumerable:!0,get:()=>L.CustomRoutes}),Object.defineProperty(k,"DeleteWithUndoButton",{enumerable:!0,get:()=>L.DeleteWithUndoButton}),Object.defineProperty(k,"EditButton",{enumerable:!0,get:()=>L.EditButton}),Object.defineProperty(k,"EditContextProvider",{enumerable:!0,get:()=>L.EditContextProvider}),Object.defineProperty(k,"FieldTitle",{enumerable:!0,get:()=>L.FieldTitle}),Object.defineProperty(k,"FilterButton",{enumerable:!0,get:()=>L.FilterButton}),Object.defineProperty(k,"FilterList",{enumerable:!0,get:()=>L.FilterList}),Object.defineProperty(k,"FilterListItem",{enumerable:!0,get:()=>L.FilterListItem}),Object.defineProperty(k,"FilterLiveSearch",{enumerable:!0,get:()=>L.FilterLiveSearch}),Object.defineProperty(k,"Form",{enumerable:!0,get:()=>L.Form}),Object.defineProperty(k,"FormDataConsumer",{enumerable:!0,get:()=>L.FormDataConsumer}),Object.defineProperty(k,"HttpError",{enumerable:!0,get:()=>L.HttpError}),Object.defineProperty(k,"I18nContextProvider",{enumerable:!0,get:()=>L.I18nContextProvider}),Object.defineProperty(k,"ListBase",{enumerable:!0,get:()=>L.ListBase}),Object.defineProperty(k,"LoadingIndicator",{enumerable:!0,get:()=>L.LoadingIndicator}),Object.defineProperty(k,"RaSimpleFormIterator",{enumerable:!0,get:()=>L.SimpleFormIterator}),Object.defineProperty(k,"RecordContextProvider",{enumerable:!0,get:()=>L.RecordContextProvider}),Object.defineProperty(k,"ReferenceArrayField",{enumerable:!0,get:()=>L.ReferenceArrayField}),Object.defineProperty(k,"ReferenceField",{enumerable:!0,get:()=>L.ReferenceField}),Object.defineProperty(k,"Resource",{enumerable:!0,get:()=>L.Resource}),Object.defineProperty(k,"ResourceContextProvider",{enumerable:!0,get:()=>L.ResourceContextProvider}),Object.defineProperty(k,"SaveButton",{enumerable:!0,get:()=>L.SaveButton}),Object.defineProperty(k,"SavedQueriesList",{enumerable:!0,get:()=>L.SavedQueriesList}),Object.defineProperty(k,"SimpleFormIteratorContext",{enumerable:!0,get:()=>L.SimpleFormIteratorContext}),Object.defineProperty(k,"SimpleShowLayout",{enumerable:!0,get:()=>L.SimpleShowLayout}),Object.defineProperty(k,"SingleFieldList",{enumerable:!0,get:()=>L.SingleFieldList}),Object.defineProperty(k,"TabbedFormTabs",{enumerable:!0,get:()=>L.TabbedFormTabs}),Object.defineProperty(k,"UrlField",{enumerable:!0,get:()=>L.UrlField}),Object.defineProperty(k,"ValidationError",{enumerable:!0,get:()=>L.ValidationError}),Object.defineProperty(k,"WithListContext",{enumerable:!0,get:()=>L.WithListContext}),Object.defineProperty(k,"choices",{enumerable:!0,get:()=>L.choices}),Object.defineProperty(k,"email",{enumerable:!0,get:()=>L.email}),Object.defineProperty(k,"maxLength",{enumerable:!0,get:()=>L.maxLength}),Object.defineProperty(k,"maxValue",{enumerable:!0,get:()=>L.maxValue}),Object.defineProperty(k,"minLength",{enumerable:!0,get:()=>L.minLength}),Object.defineProperty(k,"minValue",{enumerable:!0,get:()=>L.minValue}),Object.defineProperty(k,"number",{enumerable:!0,get:()=>L.number}),Object.defineProperty(k,"regex",{enumerable:!0,get:()=>L.regex}),Object.defineProperty(k,"required",{enumerable:!0,get:()=>L.required}),Object.defineProperty(k,"useArrayInput",{enumerable:!0,get:()=>L.useArrayInput}),Object.defineProperty(k,"useAuthProvider",{enumerable:!0,get:()=>L.useAuthProvider}),Object.defineProperty(k,"useCheckAuth",{enumerable:!0,get:()=>L.useCheckAuth}),Object.defineProperty(k,"useChoices",{enumerable:!0,get:()=>L.useChoices}),Object.defineProperty(k,"useChoicesContext",{enumerable:!0,get:()=>L.useChoicesContext}),Object.defineProperty(k,"useCreate",{enumerable:!0,get:()=>L.useCreate}),Object.defineProperty(k,"useCreateContext",{enumerable:!0,get:()=>L.useCreateContext}),Object.defineProperty(k,"useCreateController",{enumerable:!0,get:()=>L.useCreateController}),Object.defineProperty(k,"useCreateSuggestionContext",{enumerable:!0,get:()=>L.useCreateSuggestionContext}),Object.defineProperty(k,"useDataProvider",{enumerable:!0,get:()=>L.useDataProvider}),Object.defineProperty(k,"useDeleteMany",{enumerable:!0,get:()=>L.useDeleteMany}),Object.defineProperty(k,"useEditContext",{enumerable:!0,get:()=>L.useEditContext}),Object.defineProperty(k,"useEditController",{enumerable:!0,get:()=>L.useEditController}),Object.defineProperty(k,"useGetIdentity",{enumerable:!0,get:()=>L.useGetIdentity}),Object.defineProperty(k,"useGetList",{enumerable:!0,get:()=>L.useGetList}),Object.defineProperty(k,"useGetMany",{enumerable:!0,get:()=>L.useGetMany}),Object.defineProperty(k,"useGetManyReference",{enumerable:!0,get:()=>L.useGetManyReference}),Object.defineProperty(k,"useGetOne",{enumerable:!0,get:()=>L.useGetOne}),Object.defineProperty(k,"useInput",{enumerable:!0,get:()=>L.useInput}),Object.defineProperty(k,"useListContext",{enumerable:!0,get:()=>L.useListContext}),Object.defineProperty(k,"useListController",{enumerable:!0,get:()=>L.useListController}),Object.defineProperty(k,"useLocaleState",{enumerable:!0,get:()=>L.useLocaleState}),Object.defineProperty(k,"useLocales",{enumerable:!0,get:()=>L.useLocales}),Object.defineProperty(k,"useLogin",{enumerable:!0,get:()=>L.useLogin}),Object.defineProperty(k,"useLogout",{enumerable:!0,get:()=>L.useLogout}),Object.defineProperty(k,"useNotify",{enumerable:!0,get:()=>L.useNotify}),Object.defineProperty(k,"usePermissions",{enumerable:!0,get:()=>L.usePermissions}),Object.defineProperty(k,"useRecordContext",{enumerable:!0,get:()=>L.useRecordContext}),Object.defineProperty(k,"useReferenceArrayFieldController",{enumerable:!0,get:()=>L.useReferenceArrayFieldController}),Object.defineProperty(k,"useRefresh",{enumerable:!0,get:()=>L.useRefresh}),Object.defineProperty(k,"useRemoveFromStore",{enumerable:!0,get:()=>L.useRemoveFromStore}),Object.defineProperty(k,"useResetStore",{enumerable:!0,get:()=>L.useResetStore}),Object.defineProperty(k,"useResourceContext",{enumerable:!0,get:()=>L.useResourceContext}),Object.defineProperty(k,"useResourceDefinition",{enumerable:!0,get:()=>L.useResourceDefinition}),Object.defineProperty(k,"useResourceDefinitions",{enumerable:!0,get:()=>L.useResourceDefinitions}),Object.defineProperty(k,"useSafeSetState",{enumerable:!0,get:()=>L.useSafeSetState}),Object.defineProperty(k,"useShowContext",{enumerable:!0,get:()=>L.useShowContext}),Object.defineProperty(k,"useShowController",{enumerable:!0,get:()=>L.useShowController}),Object.defineProperty(k,"useSimpleFormIterator",{enumerable:!0,get:()=>L.useSimpleFormIterator}),Object.defineProperty(k,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>L.useSimpleFormIteratorItem}),Object.defineProperty(k,"useStore",{enumerable:!0,get:()=>L.useStore}),Object.defineProperty(k,"useStoreContext",{enumerable:!0,get:()=>L.useStoreContext}),Object.defineProperty(k,"useTranslate",{enumerable:!0,get:()=>L.useTranslate}),Object.defineProperty(k,"useTranslateLabel",{enumerable:!0,get:()=>L.useTranslateLabel}),Object.defineProperty(k,"useUnselect",{enumerable:!0,get:()=>L.useUnselect}),Object.defineProperty(k,"useUnselectAll",{enumerable:!0,get:()=>L.useUnselectAll}),Object.defineProperty(k,"useUpdate",{enumerable:!0,get:()=>L.useUpdate}),Object.defineProperty(k,"useUpdateMany",{enumerable:!0,get:()=>L.useUpdateMany}),Object.defineProperty(k,"withLifecycleCallbacks",{enumerable:!0,get:()=>L.withLifecycleCallbacks}),k.ActionsField=IK,k.ActionsMenu=No,k.ActivatePage=Nq,k.ActiveFiltersChips=vm,k.AddTableRow=Kg,k.Admin=II,k.AnimateButton=uk,k.AppBarStyled=jA,k.ApplicaAdmin=see,k.ArrayInput=AK,k.AttachmentField=gE,k.AttachmentInput=qK,k.AuthBackground=pu,k.AutocompleteArrayInput=eX,k.AutocompleteInput=nX,k.Avatar=Xc,k.BooleanInput=oX,k.Breadcrumbs=BC,k.BulkActionsToolbar=cI,k.BulkDeleteWithConfirmButton=aE,k.BulkFloatingActionsToolbar=sq,k.Button=Ii,k.CardForm=sE,k.ChangePasswordButton=DA,k.ChangePasswordForm=Vg,k.CircularWithLabel=cR,k.CircularWithPath=uR,k.CoverField=vE,k.Create=DX,k.CreateButton=cE,k.CreateButtonClasses=ed,k.CreateInDialogButton=yK,k.Datagrid=pq,k.DateAgoField=bE,k.DateField=DK,k.DateInput=aX,k.DateTimeInput=cX,k.DeleteWithConfirmButton=ll,k.Dot=rh,k.Drawer=PA,k.DrawerHeader=uT,k.DrawerHeaderStyled=lT,k.DrawerToggle=FA,k.Edit=NX,k.EditInDialogButton=CK,k.EmailField=BK,k.Empty=md,k.EmptyClasses=ji,k.Error=vg,k.Field=qE,k.FileField=xE,k.FileInput=dX,k.FilterSidebar=vd,k.FilterSidebarButton=Cq,k.FilterSidebarContext=gm,k.Footer=lm,k.FormHeader=zX,k.FunctionField=VK,k.GenericErrorPage=TI,k.Header=_A,k.HeaderButton=kA,k.HeaderIconButton=EJ,k.HeaderNotification=RA,k.HeaderProfile=NA,k.HeaderSpacer=WA,k.HeaderToggleButton=Vs,k.HorizontalBar=zA,k.IconButton=eu,k.ImageField=mE,k.ImageInput=fX,k.ImpersonateUserButton=wK,k.LabeledArrayInput=pE,k.LabeledInput=dn,k.Layout=QA,k.LayoutContent=aT,k.LayoutProvider=oT,k.LayoutWrapper=ZA,k.LinearWithIcon=dR,k.LinearWithLabel=fR,k.List=Mq,k.ListItem=oq,k.ListToolbar=wI,k.ListViewProvider=EI,k.Loadable=zJ,k.Loader=qA,k.LoadingButton=p1,k.LocalStorage=JS,k.LocaleButton=MA,k.LocalizedTextField=zK,k.LocalizedTextInput=gX,k.LoginPage=AI,k.Logo=cT,k.LogoutButton=LA,k.LongForm=_t,k.MainCard=On,k.MainIcon=um,k.MenuConfigProvider=AS,k.MenuPopover=m1,k.NavCollapse=ml,k.NavGroup=GA,k.NavItem=gl,k.NavList=YA,k.NavMenu=UA,k.Navigation=KA,k.Notification=$A,k.NotificationList=Dq,k.NumberInput=vX,k.OnboardingActionType=Ws,k.OnboardingContext=dm,k.OnboardingModes=vl,k.OnboardingProvider=XJ,k.OnboardingTip=qJ,k.Pagination=pm,k.PaginationActions=fm,k.PopupTransition=lR,k.RadioButtonGroupInput=bX,k.ReadonlyField=YK,k.RecordInput=xX,k.RecoverPage=Vq,k.ReferenceArrayInput=CX,k.ReferenceInput=wX,k.ReferenceManyField=wE,k.ReferenceManyInput=SX,k.RegisterPage=Wq,k.RemoveSavedQueryDialog=yI,k.ResponsiveSection=VA,k.SaveFiltersButton=vI,k.SaveFiltersDialog=mI,k.SavedFiltersList=bI,k.ScrollTop=aI,k.ScrollX=nq,k.SearchInput=TX,k.SelectArrayInput=IX,k.SelectInput=PX,k.ShadowBox=rq,k.Show=oZ,k.Sidebar=mr,k.SimpleBar=OA,k.SimpleForm=Bg,k.SimpleFormIterator=sZ,k.SimpleList=Lq,k.SizeField=ZK,k.SmallIcon=lI,k.SmartTextInput=jX,k.StopImpersonateButton=BA,k.StyledArrow=h1,k.TabbedForm=Yg,k.TableCreateButton=Zg,k.TableFormIterator=od,k.TableFormIteratorContext=Qg,k.TableFormIteratorItem=eT,k.TableFormIteratorItemContext=Xg,k.TextField=CE,k.TextInput=hr,k.ThemeColor=cm,k.ThemeContext=_g,k.ThemeCustomizationProvider=Xm,k.ThemeProvider=Rg,k.ThemeToggler=XA,k.TimeInput=_X,k.Toolbar=Ho,k.Tooltip=fu,k.TopToolbar=JA,k.Transitions=Bo,k.WizardForm=nT,k.createI18nProvider=PI,k.createJsonI18nProvider=ree,k.getLocalizedValue=kg,k.getPosition=g1,k.getThemeColor=nn,k.getThemeShadow=bs,k.localizedValueHasAllLocales=Ju,k.localizedValueHasAtLeastOneLocale=qS,k.onboardingModesSchema=tI,k.onboardingTopicSchema=eI,k.parseTime=tE,k.useBreadcrumbs=IS,k.useGetChipValue=mm,k.useGetLocalizedValue=XY,k.useI18nLanguages=oee,k.useI18nProvider=jI,k.useIsEnabledSidebarFilter=gI,k.useLayoutContext=Jg,k.useLayoutDispatch=wZ,k.useLayoutDrawerState=Oi,k.useLayoutLogoState=sT,k.useLayoutMediaState=Gn,k.useLayoutNotificationsState=sd,k.useLayoutState=Rs,k.useLayoutThemeState=SZ,k.useListViewContext=ym,k.useLocalStorage=Mg,k.useLocalizedValue=KY,k.useMemoizedObject=rE,k.useMenu=bg,k.useMenuConfig=sl,k.useMenuContext=zu,k.useOnboardingDataProvider=nI,k.useOnboardingTip=iI,k.usePopoverState=_s,k.useRefDimensions=ZY,k.useResourceDefaultValues=LX,k.useResourceTitle=Fg,k.useRestartOnboarding=QJ,k.useSx=Ir,k.useSystemTheme=oE,k.useTableFormIterator=$E,k.useTableFormIteratorItem=JE,k.useThemeConfig=Cn,k.useThemeContext=Dg,k.useWizardFormContext=id,k.uuid=rY,k.walkChildren=qu,k.withLayoutProvider=iT,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
226
226
  //# sourceMappingURL=react-admin.umd.js.map