@firecms/core 3.0.0-alpha.18 → 3.0.0-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -676,10 +676,10 @@
676
676
  .rc-md-editor .header-list .list-item:hover {
677
677
  }
678
678
 
679
- `;function vi({propertyKey:e,value:t,error:c,showError:i,isSubmitting:a,setValue:l,tableMode:s,property:d,includeDescription:u,underlyingValueHasChanged:A,context:y,disabled:h}){if(ne(),!Array.isArray(d.resolvedProperties))throw Error("ArrayCustomShapedFieldBinding misconfiguration. Property `of` not set");const I=d.expanded===void 0?!0:d.expanded;Te({property:d,value:t,setValue:l});const _=n.jsx(Ce,{icon:ke(d,"small"),required:d.validation?.required,className:"text-text-secondary dark:text-text-secondary-dark",title:d.name}),g=d.resolvedProperties.map((b,p)=>{const w={propertyKey:`${e}[${p}]`,disabled:h,property:b,includeDescription:u,underlyingValueHasChanged:A,context:y,tableMode:!1,partOfArray:!0,partOfBlock:!1,autoFocus:!1};return n.jsx("div",{className:"pb-4",children:n.jsx(pn,{...w})},`custom_shaped_array_${p}`)});return n.jsxs(n.Fragment,{children:[!s&&n.jsx(dn,{initiallyExpanded:I,title:_,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",children:g}),s&&g,n.jsx(Se,{includeDescription:u,showError:i,error:c,disabled:h,property:d})]})}De.addMethod(De.array,"uniqueInArray",function(e=c=>c,t){return this.test("uniqueInArray",t,c=>!c||c.length===new Set(c.map(e)).size)});function Ki(e,t,c){const i={};return Object.entries(t).forEach(([a,l])=>{i[a]=so({property:l,customFieldValidator:c,name:a,entityId:e})}),De.object().shape(i)}function so(e){const t=e.property;if(Le(t))throw console.error("Error in property",e),Error("Trying to create a yup mapping from a property builder. Please use resolved properties only");if(t.dataType==="string")return pz(e);if(t.dataType==="number")return wz(e);if(t.dataType==="boolean")return Kz(e);if(t.dataType==="map")return bz(e);if(t.dataType==="array")return Sz(e);if(t.dataType==="date")return mz(e);if(t.dataType==="geopoint")return kz(e);if(t.dataType==="reference")return vz(e);throw console.error("Unsupported data type in yup mapping",t),Error("Unsupported data type in yup mapping")}function bz({property:e,entityId:t,customFieldValidator:c,name:i}){const a={};return e.validation,e.properties&&Object.entries(e.properties).forEach(([l,s])=>{a[l]=so({property:s,parentProperty:e,customFieldValidator:c,name:`${i}[${l}]`,entityId:t})}),De.object().shape(a)}function pz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){let l=De.string();const s=e.validation;if(e.enumValues){s?.required&&(l=l.required(s?.requiredMessage?s.requiredMessage:"Required"));const d=tn(e.enumValues);l=l.oneOf((s?.required?d:[...d,null]).map(u=>u?.id??null)).nullable(!0)}if(s){if(l=s.required?l.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):l.notRequired().nullable(!0),s.unique&&c&&i&&(l=l.test("unique","This value already exists and should be unique",(d,u)=>c({name:i,property:e,parentProperty:t,value:d,entityId:a}))),(s.min||s.min===0)&&(l=l.min(s.min,`${e.name} must be min ${s.min} characters long`)),(s.max||s.max===0)&&(l=l.max(s.max,`${e.name} must be max ${s.max} characters long`)),s.matches){const d=typeof s.matches=="string"?Pi(s.matches):s.matches;d&&(l=l.matches(d,s.matchesMessage?{message:s.matchesMessage}:void 0))}s.trim&&(l=l.trim()),s.lowercase&&(l=l.lowercase()),s.uppercase&&(l=l.uppercase()),e.email&&(l=l.email(`${e.name} must be an email`)),e.url&&(l=l.url(`${e.name} must be a url`))}else l=l.notRequired().nullable(!0);return l}function wz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){const l=e.validation;let s=De.number().typeError("Must be a number");return l?(s=l.required?s.required(l.requiredMessage?l.requiredMessage:"Required").nullable(!0):s.notRequired().nullable(!0),l.unique&&c&&i&&(s=s.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:a}))),(l.min||l.min===0)&&(s=s.min(l.min,`${e.name} must be higher or equal to ${l.min}`)),(l.max||l.max===0)&&(s=s.max(l.max,`${e.name} must be lower or equal to ${l.max}`)),(l.lessThan||l.lessThan===0)&&(s=s.lessThan(l.lessThan,`${e.name} must be higher than ${l.lessThan}`)),(l.moreThan||l.moreThan===0)&&(s=s.moreThan(l.moreThan,`${e.name} must be lower than ${l.moreThan}`)),l.positive&&(s=s.positive(`${e.name} must be positive`)),l.negative&&(s=s.negative(`${e.name} must be negative`)),l.integer&&(s=s.integer(`${e.name} must be an integer`))):s=s.notRequired().nullable(!0),s}function kz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){let l=De.object();const s=e.validation;return s?.unique&&c&&i&&(l=l.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:a}))),s?.required?l=l.required(s.requiredMessage).nullable(!0):l=l.notRequired().nullable(!0),l}function mz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){if(e.autoValue)return De.object().nullable();let l=De.date();const s=e.validation;return s?(l=s.required?l.required(s?.requiredMessage?s.requiredMessage:"Required"):l.notRequired(),s.unique&&c&&i&&(l=l.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:a}))),s.min&&(l=l.min(s.min,`${e.name} must be after ${s.min}`)),s.max&&(l=l.max(s.max,`${e.name} must be before ${s.min}`))):l=l.notRequired(),l.transform(d=>d instanceof Date?d:null).nullable()}function vz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){let l=De.object();const s=e.validation;return s?(l=s.required?l.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):l.notRequired().nullable(!0),s.unique&&c&&i&&(l=l.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:a})))):l=l.notRequired().nullable(!0),l}function Kz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){let l=De.boolean();const s=e.validation;return s?(l=s.required?l.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):l.notRequired().nullable(!0),s.unique&&c&&i&&(l=l.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:a})))):l=l.notRequired().nullable(!0),l}function Cz(e){return e.validation?.uniqueInArray?!0:e.dataType==="map"&&e.properties?Object.entries(e.properties).filter(([t,c])=>c.validation?.uniqueInArray):!1}function Sz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){let l=De.array();if(e.of)if(Array.isArray(e.of)){const d=e.of.map((u,A)=>({[`${i}[${A}]`]:so({property:u,parentProperty:e,entityId:a})})).reduce((u,A)=>({...u,...A}),{});return De.array().of(De.mixed().test("Dynamic object validation","Dynamic object validation error",(u,A)=>rn(d,A.path).validate(u)))}else{l=l.of(so({property:e.of,parentProperty:e,entityId:a}));const d=Cz(e.of);d&&(typeof d=="boolean"?l=l.uniqueInArray(u=>u,`${e.name} should have unique values within the array`):Array.isArray(d)&&d.forEach(([u,A])=>{l=l.uniqueInArray(y=>y&&y[u],`${e.name} → ${A.name??u}: should have unique values within the array`)}))}const s=e.validation;return s?(l=s.required?l.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):l.notRequired().nullable(!0),(s.min||s.min===0)&&(l=l.min(s.min,`${e.name} should be min ${s.min} entries long`)),s.max&&(l=l.max(s.max,`${e.name} should be max ${s.max} entries long`))):l=l.notRequired().nullable(!0),l}const Bz=({containerRef:e})=>{const{isSubmitting:t,isValidating:c,errors:i}=Fe.useFormikContext();return f.useEffect(()=>{const a=Object.keys(i);if(a.length>0&&t&&!c){const l=e?.current?.querySelector(`#form_field_${a[0]}`);if(l&&e?.current){const s=Ci(e.current);if(s){const u=l.getBoundingClientRect().top;s.scrollTo({top:s.scrollTop+u-64,behavior:"smooth"})}const d=l.querySelector("input");d&&d.focus()}}},[t,c,i,e]),null},Ez=e=>{const t=e&&e.scrollHeight>e.clientHeight,c=e?window.getComputedStyle(e).overflowY:null,i=c&&c.indexOf("hidden")!==-1;return t&&!i},Ci=e=>!e||e===document.body?document.body:Ez(e)?e:Ci(e.parentNode);function Fz({customId:e,entityId:t,status:c,onChange:i,error:a,entity:l}){const s=c==="existing"||!e,d=c!=="existing"&&!e,u=f.useMemo(()=>{if(!(!e||typeof e=="boolean"||e==="optional"))return tn(e)},[e]),A=an(),{copy:y}=Uc({onSuccess:_=>A.open({type:"success",message:`Copied ${_}`})}),h=ne(),I={label:d?"ID is set automatically":"ID",disabled:s,name:"id",value:(l&&c==="existing"?l.id:t)??"",endAdornment:l?n.jsxs(n.Fragment,{children:[n.jsx(_e,{title:"Copy",children:n.jsx(R,{onClick:_=>y(l.id),"aria-label":"copy-id",children:n.jsx(no,{size:"small"})})}),h?.entityLinkBuilder&&n.jsx(_e,{title:"Open in the console",children:n.jsx(R,{component:"a",href:h.entityLinkBuilder({entity:l}),rel:"noopener noreferrer",target:"_blank",onClick:_=>_.stopPropagation(),"aria-label":"go-to-datasource",children:n.jsx(ro,{size:"small"})})})]}):void 0};return n.jsxs(n.Fragment,{children:[u&&n.jsx(Xe,{error:a,onValueChange:_=>i(_),...I,renderValue:_=>{const g=u.find(b=>b.id===_);return g?`${g.id} - ${g.label}`:_},children:u.map(_=>n.jsx(xe,{value:String(_.id),children:n.jsx(Ee,{enumKey:_.id,enumValues:u,size:"medium"})},_.id))}),!u&&n.jsx(un,{...I,error:a,placeholder:e==="optional"?"Autogenerated ID, it can be manually changed":c==="new"||c==="copy"?"ID of the new document":"ID of the document",onChange:_=>{let g=_.target.value;return g&&(g=g.trim()),i(g.length?g:void 0)}}),n.jsx(Fe.ErrorMessage,{name:"id",component:"div",children:_=>"You need to specify an ID"})]})}function te({children:e,className:t,variant:c="filled",disabled:i=!1,size:a="medium",startIcon:l=null,fullWidth:s=!1,component:d,...u}){const A="rounded-md border uppercase inline-flex items-center justify-center p-2 px-4 text-sm font-medium focus:outline-none transition ease-in-out duration-150 gap-2",y=E({"w-full":s,"w-fit":!s,"border-transparent bg-primary hover:bg-blue-600 focus:ring-blue-400 !text-white shadow hover:ring-1 hover:ring-primary":c==="filled"&&!i,"border-primary !text-primary hover:bg-primary hover:bg-opacity-10 hover:border-blue-600 !hover:text-blue-600 focus:ring-blue-400 hover:ring-1 hover:ring-primary":c==="outlined"&&!i,"border-transparent !text-primary !hover:text-blue-600 hover:bg-primary hover:bg-opacity-10":c==="text"&&!i,"border-blue-600 border-opacity-50 dark:border-blue-500 dark:border-opacity-50 opacity-50 !text-blue-600 !dark:text-blue-500 text-opacity-50 dark:text-opacity-50":c==="outlined"&&i,"border-transparent outline-none opacity-50 !text-gray-600 !dark:text-gray-500":(c==="filled"||c==="text")&&i}),h=E({"py-1 px-2":a==="small","py-2 px-4":a==="medium","py-2 px-5":a==="large"});return d?n.jsxs(d,{onClick:u.onClick,className:E(he,l?"pl-3":"",A,y,h,t),...u,children:[l,e]}):n.jsxs("button",{type:u.type??"button",onClick:u.onClick,className:E(he,l?"pl-3":"",A,y,h,t),disabled:i,...u,children:[l,e]})}const Si=f.memo(Pz,(e,t)=>e.status===t.status&&e.path===t.path&&de(e.entity?.values,t.entity?.values));function Pz({status:e,path:t,collection:c,entity:i,onEntitySaveRequested:a,onDiscard:l,onModified:s,onValuesChanged:d,onIdChange:u,onFormContextChange:A,hideId:y,autoSave:h,onIdUpdateError:I}){const _=ne(),g=Qe(),b=_.plugins,p=f.useMemo(()=>Me({collection:c,path:t,values:i?.values,fields:_.fields}),[i?.values,t]),w=(e==="new"||e==="copy")&&!!p.customId&&p.customId!=="optional",k=f.useMemo(()=>e==="new"||e==="copy"?w?void 0:g.generateEntityId(t):i?.id,[]),v=f.useRef(!1),K=f.useMemo(()=>{const Q=p.properties;if((e==="existing"||e==="copy")&&i)return i.values??eo(Q);if(e==="new")return eo(Q);throw console.error({status:e,entity:i}),new Error("Form has not been initialised with the correct parameters")},[e,p,i]),[m,C]=f.useState(k),[B,P]=f.useState(!1),[F,D]=f.useState(),S=f.useRef(i?.values??K),T=S.current,[N,q]=f.useState(T),G=Q=>{q(Q),d&&d(Q),h&&Q&&!de(Q,T)&&H(Q)};f.useEffect(()=>{m&&u&&u(m)},[m,u]);const V=Me({collection:c,path:t,entityId:m,values:N,previousValues:T,fields:_.fields}),oe=V.callbacks?.onIdUpdate;f.useEffect(()=>{if(oe&&N&&(e==="new"||e==="copy"))try{const Q=oe({collection:V,path:t,entityId:m,values:N,context:_});C(Q)}catch(Q){I&&I(Q),console.error(Q)}},[m,N,e]);const O=f.useMemo(()=>T&&e==="existing"?Object.entries(V.properties).map(([Q,X])=>{if(Rn(X))return{};const ee=T[Q],U=K[Q];return de(ee,U)?{}:{[Q]:U}}).reduce((Q,X)=>({...Q,...X}),{}):{},[K,V.properties,T,e]),H=Q=>a({collection:V,path:t,entityId:m,values:Q,previousValues:i?.values,closeAfterSave:v.current,autoSave:h??!1}).then(X=>{const ee=e==="new"?"new_entity_saved":e==="copy"?"entity_copied":e==="existing"?"entity_edited":"unmapped_event";_.onAnalyticsEvent?.(ee,{path:t}),S.current=Q}).catch(X=>{console.error(X),D(X)}).finally(()=>{v.current=!1}),Z=(Q,X)=>{if(w&&!m){console.error("Missing custom Id"),P(!0),X.setSubmitting(!1);return}if(D(void 0),P(!1),e==="existing"){if(!i?.id)throw Error("Form misconfiguration when saving, no id for existing entity")}else if(e==="new"||e==="copy"){if(V.customId&&V.customId!=="optional"&&!m)throw Error("Form misconfiguration when saving, entityId should be set")}else throw Error("New FormType added, check EntityForm");H(Q)?.then(ee=>{X.resetForm({values:Q,submitCount:0,touched:{}})}).finally(()=>{X.setSubmitting(!1)})},L=f.useCallback(({name:Q,value:X,property:ee})=>g.checkUniqueField(t,Q,X,ee,m),[g,t,m]),W=f.useMemo(()=>m?Ki(m,V.properties,L):void 0,[m,V.properties,L]);return n.jsx(Fe.Formik,{initialValues:K,onSubmit:Z,validationSchema:W,validate:Q=>console.debug("Validating",Q),onReset:()=>l&&l(),children:Q=>{const X=[],ee={setFieldValue:Q.setFieldValue,values:Q.values,collection:Me({collection:V,path:t,fields:_.fields}),entityId:m,path:t,save:H};if(f.useEffect(()=>{A&&A(ee)},[A,ee]),b&&V){const U={entityId:m,path:t,status:e,collection:c,context:_,currentEntityId:m,formContext:ee};X.push(...b.map((re,J)=>re.form?.Actions?n.jsx(re.form.Actions,{...U},`actions_${re.name}`):null).filter(Boolean))}return n.jsxs("div",{className:"h-full overflow-auto",children:[X.length>0&&n.jsx("div",{className:E("w-full flex justify-end items-center sticky top-0 right-0 left-0 z-10 bg-opacity-60 bg-slate-200 dark:bg-opacity-60 dark:bg-slate-800 backdrop-blur-md"),children:X}),n.jsxs("div",{className:"pl-4 pr-4 pt-12 pb-16 md:pl-8",children:[n.jsx("div",{className:`w-full py-2 flex items-center mt-${4+(X?8:0)} lg:mt-${8+(X?8:0)} mb-8`,children:n.jsx(j,{className:"mt-4 flex-grow "+V.hideIdFromForm?"mb-2":"mb-0",variant:"h4",children:V.singularName??V.name})}),!y&&n.jsx(Fz,{customId:V.customId,entityId:m,status:e,onChange:C,error:B,entity:i}),m&&n.jsx(Dz,{...Q,initialValues:T,onModified:s,onValuesChanged:G,underlyingChanges:O,entity:i,resolvedCollection:V,formContext:ee,status:e,savingError:F,closeAfterSaveRef:v,autoSave:h})]})]})}})}function Dz(e){const{values:t,onModified:c,onValuesChanged:i,underlyingChanges:a,formContext:l,entity:s,touched:d,setFieldValue:u,resolvedCollection:A,isSubmitting:y,status:h,handleSubmit:I,savingError:_,dirty:g,closeAfterSaveRef:b,autoSave:p}=e,w=g;f.useEffect(()=>{c&&c(w),i&&i(t)},[w,t]),f.useEffect(()=>{!p&&a&&s&&Object.entries(a).forEach(([m,C])=>{const B=t[m];!de(C,B)&&!d[m]&&(console.debug("Updated value from the datasource:",m,C),u(m,C!==void 0?C:null))})},[p,a,s,t,d,u]);const k=n.jsx("div",{className:"flex flex-col gap-8",children:(A.propertiesOrder??Object.keys(A.properties)).map(m=>{const C=A.properties[m];if(!C)return console.warn(`Property ${m} not found in collection ${A.name}`),null;const B=!!a&&Object.keys(a).includes(m)&&!!d[m],P=!p&&y||Cn(C)||!!C.disabled;if(Rn(C))return null;const D={propertyKey:m,disabled:P,property:C,includeDescription:C.description||C.longDescription,underlyingValueHasChanged:B&&!p,context:l,tableMode:!1,partOfArray:!1,partOfBlock:!1,autoFocus:!1};return n.jsx("div",{id:`form_field_${m}`,children:n.jsx(ie,{children:n.jsx(pn,{...D})})},`field_${A.name}_${m}`)}).filter(Boolean)}),v=y||!w&&h==="existing",K=f.useRef(null);return n.jsxs(Fe.Form,{onSubmit:I,noValidate:!0,children:[n.jsxs("div",{className:"mt-12",ref:K,children:[k,n.jsx(Bz,{containerRef:K})]}),n.jsx("div",{className:"h-14"}),!p&&n.jsxs(kn,{position:"absolute",children:[_&&n.jsx("div",{className:"text-right",children:n.jsx(j,{color:"error",children:_.message})}),n.jsx(te,{variant:"text",disabled:v,type:"reset",children:h==="existing"?"Discard":"Clear"}),n.jsxs(te,{variant:"text",color:"primary",type:"submit",disabled:v,onClick:()=>{b.current=!1},children:[h==="existing"&&"Save",h==="copy"&&"Create copy",h==="new"&&"Create"]}),n.jsxs(te,{variant:"filled",color:"primary",type:"submit",disabled:v,onClick:()=>{b.current=!0},children:[h==="existing"&&"Save and close",h==="copy"&&"Create copy and close",h==="new"&&"Create and close"]})]})]})}function Bi(e,t){try{const c=Object.keys(e);return(t??c).map(a=>{if(e[a]){const l=e[a];return!Le(l)&&l?.dataType==="map"&&l.properties?{[a]:{...l,properties:Bi(l.properties,l.propertiesOrder)}}:{[a]:l}}else return}).filter(a=>a!==void 0).reduce((a,l)=>({...a,...l}),{})}catch(c){return console.error("Error sorting properties",c),e}}function nt(e,t){if(e)return typeof e=="string"?e:e(t)}const Ei="::";function ot(e){return Fi(Ze(e))}function Fi(e){return e.length===1?e[0]:e.reduce((t,c)=>`${t}${Ei}${c}`)}function Ze(e){return e.split("/").filter((t,c)=>c%2===0)}function Nz(e){return e?e.toString():""}function Pi(e){if(!e)return;const t=e.match(/\/(.*?)\/([a-z]*)?$/i);return t?new RegExp(t[1],t[2]||""):new RegExp(e,"")}function Tz(e){return e.match(/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/)?!0:!!e.match(/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)/)}function Oo(e,t,c,i=300){const a=f.useRef(!1),l=()=>{t(),a.current=!1},s=f.useRef(void 0);f.useEffect(()=>(a.current=!0,clearTimeout(s.current),s.current=setTimeout(l,i),()=>{c&&l()}),[c,e])}function Mz(e,t=300){const[c,i]=f.useState(e);return f.useEffect(()=>{const a=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(a)}},[e,t]),c}function Di(e,t){const c=Ne({propertyKey:"ignore",propertyOrBuilder:e,fields:t});return c?c.dataType==="reference"?!0:c.dataType==="array"?Array.isArray(c.of)?!1:c.of?.dataType==="reference":!1:null}function Oz(e){return n.jsx(gr,{size:e})}function rt(e,t){const c=e?.Icon??gr;return n.jsx(c,{size:t})}function ke(e,t="small",c={}){if(Le(e))return n.jsx(pc,{size:t});{const i=Go(e,c);return rt(i,t)}}function Lz(e,t){return Le(e)?"#888":Go(e,t)?.color??"#666"}function wn(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const c=t.split("."),i=e[c[0]];if(typeof i=="object"&&i.dataType==="map"&&i.properties)return wn(i.properties,c.slice(1).join("."))}}}function tt(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const c=t.split("."),i=e[c[0]];if(i.dataType==="map"&&i.properties)return tt(i.properties,c.slice(1).join("."))}}}function Qz(e){return e.replace(/\.([^.]*)/g,"[$1]")}function Ni(e,t){if(!t)return e;const c={};return t.forEach(i=>{const a=wn(e,i);typeof a=="object"&&a.dataType==="map"&&a.properties&&(c[i]={...a,properties:Ni(a.properties,a.propertiesOrder??[])}),a&&(c[i]=a)}),c}const Lo={read:!0,edit:!0,create:!0,delete:!0};function uo(e,t,c,i){const a=e.permissions;if(a===void 0)return Lo;if(typeof a=="object")return a;if(typeof a=="function")return a({entity:i,user:t.user,authController:t,collection:e,pathSegments:c});throw console.error("Permissions:",a),Error("New type of permission added and not mapped")}function ct(e,t,c,i){return uo(e,t,c,i).edit??Lo.edit}function Qo(e,t,c,i){return uo(e,t,c,i).create??Lo.create}function it(e,t,c,i){return uo(e,t,c,i).delete??Lo.delete}function Ti(e,t){if(e&&(e=No(e),e in Wo))return e in Wo?n.jsx(r,{iconKey:e,size:"medium",className:t}):void 0}function Vo(e,t){const c=Ti(e.icon,t);if(e?.icon&&c)return c;let i=No(("singularName"in e?e.singularName:void 0)??e.name),a;i in Wo&&(a=i),a||(i=No(e.path),i in Wo&&(a=i));const l=_r.length;return a||(a=_r[Jt(e.path)%l]),n.jsx(r,{iconKey:a,size:"medium",className:t})}const Wo=oc.reduce((e,t)=>(e[t]=t,e),{});function Vz(e,t){if(t!==void 0&&t===1)return e;const c={"(quiz)$":"$1zes","^(ox)$":"$1en","([m|l])ouse$":"$1ice","(matr|vert|ind)ix|ex$":"$1ices","(x|ch|ss|sh)$":"$1es","([^aeiouy]|qu)y$":"$1ies","(hive)$":"$1s","(?:([^f])fe|([lr])f)$":"$1$2ves","(shea|lea|loa|thie)f$":"$1ves",sis$:"ses","([ti])um$":"$1a","(tomat|potat|ech|her|vet)o$":"$1oes","(bu)s$":"$1ses","(alias)$":"$1es","(octop)us$":"$1i","(ax|test)is$":"$1es","(us)$":"$1es","([^s]+)$":"$1s"},i={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const l in i){const s=new RegExp(`${l}$`,"i"),d=i[l];if(s.test(e))return e.replace(s,d)}for(const l in c){const s=new RegExp(l,"i");if(s.test(e))return e.replace(s,c[l])}return e}function Wz(e,t){if(t!==void 0&&t!==1)return e;const c={"(quiz)zes$":"$1","(matr)ices$":"$1ix","(vert|ind)ices$":"$1ex","^(ox)en$":"$1","(alias)es$":"$1","(octop|vir)i$":"$1us","(cris|ax|test)es$":"$1is","(shoe)s$":"$1","(o)es$":"$1","(bus)es$":"$1","([m|l])ice$":"$1ouse","(x|ch|ss|sh)es$":"$1","(m)ovies$":"$1ovie","(s)eries$":"$1eries","([^aeiouy]|qu)ies$":"$1y","([lr])ves$":"$1f","(tive)s$":"$1","(hive)s$":"$1","(li|wi|kni)ves$":"$1fe","(shea|loa|lea|thie)ves$":"$1f","(^analy)ses$":"$1sis","((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$":"$1$2sis","([ti])a$":"$1um","(n)ews$":"$1ews","(h|bl)ouses$":"$1ouse","(corpse)s$":"$1","(us)es$":"$1",s$:""},i={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const l in i){const s=new RegExp(`${i[l]}$`,"i");if(s.test(e))return e.replace(s,l)}for(const l in c){const s=new RegExp(l,"i");if(s.test(e))return e.replace(s,c[l])}return e}function Mi(e,t,c,i=3){const a=Object.keys(e.properties);let l=c?.filter(s=>a.includes(s));return l&&l.length>0?l:(l=a,l.filter(s=>{const d=e.properties[s];return d&&!Le(d)&&!Di(d,t)}).slice(0,i))}function Oi(e,t=166){let c;function i(...a){const l=()=>{e.apply(this,a)};clearTimeout(c),c=setTimeout(l,t)}return i.clear=()=>{clearTimeout(c)},i}function at(e,t=""){return e&&Object.keys(e).reduce((c,i)=>{const a=t?`${t}.${i}`:i;return typeof e[i]=="object"&&e[i]!==null?Array.isArray(e[i])?e[i].forEach((l,s)=>{Object.assign(c,at(l,`${a}[${s}]`))}):Object.assign(c,at(e[i],a)):c[a]=e[i],c},{})}function Li(e){return e.reduce((t,c)=>(Object.entries(c).forEach(([i,a])=>{if(Array.isArray(a)&&(t[i]=Math.max(t[i]||0,a.length)),typeof a=="object"&&a!==null){const l=Li([a]);Object.entries(l).forEach(([s,d])=>{const u=`${i}.${s}`;t[u]=Math.max(t[u]||0,d)})}}),t),{})}function Qi(e){return Object.keys(lt).includes(e)}const lt={text_field:{key:"text_field",name:"Text field",description:"Simple short text",Icon:Pc,color:"#2d7ff9",property:{dataType:"string",Field:Mn}},multiline:{key:"multiline",name:"Multiline",description:"Text with multiple lines",Icon:Dc,color:"#2d7ff9",property:{dataType:"string",multiline:!0,Field:Mn}},markdown:{key:"markdown",name:"Markdown",description:"Text with advanced markdown syntax",Icon:bc,color:"#2d7ff9",property:{dataType:"string",markdown:!0,Field:mi}},url:{key:"url",name:"Url",description:"Text with URL validation",Icon:wc,color:"#154fb3",property:{dataType:"string",url:!0,Field:Mn}},email:{key:"email",name:"Email",description:"Text with email validation",Icon:_c,color:"#154fb3",property:{dataType:"string",email:!0,Field:Mn}},select:{key:"select",name:"Select/enum",description:"Select one text value from within an enumeration",Icon:Kc,color:"#4223c9",property:{dataType:"string",enumValues:[],Field:zr}},multi_select:{key:"multi_select",name:"Multi select",description:"Select multiple text values from within an enumeration",Icon:Cc,color:"#4223c9",property:{dataType:"array",of:{dataType:"string",enumValues:[]},Field:$r}},number_input:{key:"number_input",name:"Number input",description:"Simple number field with validation",Icon:Bc,color:"#bec920",property:{dataType:"number",Field:Mn}},number_select:{key:"number_select",name:"Number select",description:"Select a number value from within an enumeration",Icon:pr,color:"#bec920",property:{dataType:"number",enumValues:[],Field:zr}},multi_number_select:{key:"multi_number_select",name:"Multiple number select",description:"Select multiple number values from within an enumeration",Icon:pr,color:"#bec920",property:{dataType:"array",of:{dataType:"number",enumValues:[]},Field:$r}},file_upload:{key:"file_upload",name:"File upload",description:"Input for uploading single files",Icon:Nc,color:"#f92d9a",property:{dataType:"string",storage:{storagePath:"{path}"},Field:Jr}},multi_file_upload:{key:"multi_file_upload",name:"Multiple file upload",description:"Input for uploading multiple files",Icon:fc,color:"#f92d9a",property:{dataType:"array",of:{dataType:"string",storage:{storagePath:"{path}"}},Field:Jr}},reference:{key:"reference",name:"Reference",description:"The value refers to a different collection",Icon:vc,color:"#ff0042",property:{dataType:"reference",Field:Ii}},multi_references:{key:"multi_references",name:"Multiple references",description:"Multiple values that refer to a different collection",Icon:tc,color:"#ff0042",property:{dataType:"array",of:{dataType:"reference"},Field:li}},switch:{key:"switch",name:"Switch",description:"Boolean true or false field (or yes or no, 0 or 1...)",Icon:Ic,color:"#20d9d2",property:{dataType:"boolean",Field:hi}},date_time:{key:"date_time",name:"Date/time",description:"A date time select field",Icon:Fc,color:"#8b46ff",property:{dataType:"date",Field:gi}},group:{key:"group",name:"Group",description:"Group of multiple fields",Icon:hr,color:"#ff9408",property:{dataType:"map",properties:{},Field:bi}},key_value:{key:"key_value",name:"Key-value",description:"Flexible field that allows the user to add multiple key-value pairs",Icon:hr,color:"#ff9408",property:{dataType:"map",keyValue:!0,Field:pi}},repeat:{key:"repeat",name:"Repeat/list",description:"A field that gets repeated multiple times (e.g. multiple text fields)",Icon:mr,color:"#ff9408",property:{dataType:"array",of:{dataType:"string"},Field:wi}},custom_array:{key:"custom_array",name:"Custom array",description:"A field that saved its value as an array of custom objects",Icon:mr,color:"#ff9408",property:{dataType:"array",of:[],Field:vi}},block:{key:"block",name:"Block",description:"A complex field that allows the user to compose different fields together, with a key->value format",Icon:Tc,color:"#ff9408",property:{dataType:"array",oneOf:{properties:{}},Field:ki}}};function Go(e,t){const c=dt(e),i=st(e);if(!i){console.error("No field id found for property",e);return}const a=lt[i],l=c?t[c]:void 0;return qe(a??{},l??{})}function st(e){if(e.dataType==="string")return e.multiline?"multiline":e.markdown?"markdown":e.storage?"file_upload":e.url?"url":e.email?"email":e.enumValues?"select":"text_field";if(e.dataType==="number")return e.enumValues?"number_select":"number_input";if(e.dataType==="map"){if(e.keyValue)return"key_value";if(e.properties)return"group"}else if(e.dataType==="array"){const t=e.of;return e.oneOf?"block":Array.isArray(t)?"custom_array":Le(t)?"repeat":t?.dataType==="string"&&t.enumValues?"multi_select":t?.dataType==="number"&&t.enumValues?"multi_number_select":t?.dataType==="string"&&t.storage?"multi_file_upload":t?.dataType==="reference"?"multi_references":"repeat"}else{if(e.dataType==="boolean")return"switch";if(e.dataType==="date")return"date_time";if(e.dataType==="reference")return"reference"}console.error("Unsupported field config mapping",e)}function dt(e){return e.fieldConfig?e.fieldConfig:st(e)}const Me=({collection:e,path:t,entityId:c,values:i,previousValues:a,userConfigPersistence:l,fields:s})=>{const d=l?.getCollectionConfig(t),u=rn(d,"properties"),A=eo(e.properties),y=i??A,h=a??i??A,I=Object.entries(e.properties).map(([b,p])=>{const w=y?Fe.getIn(y,b):void 0;return{[b]:Ne({propertyKey:b,propertyOrBuilder:p,values:y,previousValues:h,path:t,propertyValue:w,entityId:c,fields:s})}}).filter(b=>b!==null).reduce((b,p)=>({...b,...p}),{}),_=qe(I,u),g=Object.entries(_).filter(([b,p])=>!!p?.dataType).map(([b,p])=>({[b]:p})).reduce((b,p)=>({...b,...p}),{});return{...e,properties:g,originalCollection:e}};function Ne({propertyOrBuilder:e,propertyValue:t,fromBuilder:c=!1,...i}){if(typeof e=="object"&&"resolved"in e)return e;let a=null;if(e)if(Le(e)){const l=i.path;if(!l)throw Error("Trying to resolve a property builder without specifying the entity path");const s=e({...i,path:l,propertyValue:t,values:i.values??{},previousValues:i.previousValues??i.values??{}});if(!s)return console.debug("Property builder not returning `Property` so it is not rendered",l,i.entityId,e),null;a=Ne({...i,propertyValue:t,propertyOrBuilder:s,fromBuilder:!0})}else{const l=e;if(l.dataType==="map"&&l.properties){const s=ut({...i,properties:l.properties,propertyValue:t});a={...l,resolved:!0,fromBuilder:c,properties:s}}else l.dataType==="array"?a=sn({property:l,propertyValue:t,fromBuilder:c,...i}):(l.dataType==="string"||l.dataType==="number")&&l.enumValues&&(a=ft(l,c))}else return null;if(a||(a={...e,resolved:!0,fromBuilder:c}),a.fieldConfig&&!Qi(a.fieldConfig)){const l=i.fields;if(!l)throw Error(`Trying to resolve a property with key ${a.fieldConfig} that inherits from a custom field but no custom fields were provided. Use the property 'fields' in your top level component to provide them`);const s=l[a.fieldConfig];if(!s)throw Error(`Trying to resolve a property that inherits from a custom field but no custom field with id ${a.fieldConfig} was found. Check the \`fields\` in your top level component`);if(s.property){const d=Ne({propertyOrBuilder:s.property,propertyValue:t,...i});d&&(a=qe(d,a))}}return a?{...a,resolved:!0}:null}function sn({propertyKey:e,property:t,propertyValue:c,...i}){if(t.of){if(Array.isArray(t.of))return{...t,resolved:!0,fromBuilder:i.fromBuilder,resolvedProperties:t.of.map((a,l)=>Ne({propertyKey:`${e}.${l}`,propertyOrBuilder:a,propertyValue:Array.isArray(c)?c[l]:void 0,...i,index:l}))};{const a=t.of,l=Array.isArray(c)?c.map((d,u)=>Ne({propertyKey:`${e}.${u}`,propertyOrBuilder:a,propertyValue:d,...i,index:u})).filter(d=>!!d):[],s=Ne({propertyKey:`${e}`,propertyOrBuilder:a,propertyValue:void 0,...i});if(!s)throw Error("When using a property builder as the 'of' prop of an ArrayProperty, you must return a valid child property");return{...t,resolved:!0,fromBuilder:i.fromBuilder,of:s,resolvedProperties:l}}}else if(t.oneOf){const a=t.oneOf?.typeField??xn,l=Array.isArray(c)?c.map((d,u)=>{const A=d&&d[a],y=t.oneOf?.properties[A];return!A||!y?null:Ne({propertyKey:`${e}.${u}`,propertyOrBuilder:y,propertyValue:c,...i})}).filter(d=>!!d):[],s=ut({properties:t.oneOf.properties,propertyValue:void 0,...i});return{...t,resolved:!0,oneOf:{...t.oneOf,properties:s},fromBuilder:i.fromBuilder,resolvedProperties:l}}else{if(t.Field)return{...t,resolved:!0,fromBuilder:i.fromBuilder};throw Error("The array property needs to declare an 'of' or a 'oneOf' property, or provide a custom `Field`")}}function ut({properties:e,propertyValue:t,...c}){return Object.entries(e).map(([i,a])=>({[i]:Ne({propertyKey:i,propertyOrBuilder:a,propertyValue:t&&typeof t=="object"?rn(t,i):void 0,...c})})).filter(i=>i!==null).reduce((i,a)=>({...i,...a}),{})}function ft(e,t){return typeof e.enumValues=="object"?{...e,resolved:!0,enumValues:tn(e.enumValues)?.filter(c=>c&&c.id&&c.label)??[],fromBuilder:t??!1}:e}function Gz(e){return typeof e=="object"?Object.entries(e).map(([t,c])=>typeof c=="string"?{id:t,label:c}:c):Array.isArray(e)?e:void 0}function At(e,t){return typeof e=="string"?t?.find(c=>c.key===e):e}function _t(e){const{path:t,collections:c=[],currentFullPath:i}=e,a=pe(t).split("/"),l=bo(a),s=[];for(let d=0;d<l.length;d++){const u=l[d],A=c&&c.find(y=>y.alias===u||y.path===u);if(A){const y=A.alias??A.path,h=i&&i.length>0?i+"/"+y:y;s.push({type:"collection",path:h,collection:A});const I=pe(pe(t).replace(u,"")),_=I.length>0?I.split("/"):[];if(_.length>0){const g=_[0],b=h+"/"+g;if(s.push({type:"entity",entityId:g,path:h,parentCollection:A}),_.length>1){const p=_.slice(1).join("/");if(!A)throw Error("collection not found resolving path: "+A);const w=A.entityViews,k=w&&w.map(v=>At(v,e.contextEntityViews)).filter(Boolean).find(v=>v.key===p);if(k){const v=i&&i.length>0?i+"/"+k.key:k.key;s.push({type:"custom_view",path:v,view:k})}else A.subcollections&&s.push(..._t({path:p,collections:A.subcollections,currentFullPath:b,contextEntityViews:e.contextEntityViews}))}}break}}return s}function Vi(e){return n.jsx(_e,{...e,tooltipClassName:"!text-red-500 bg-red-50",children:e.children})}function we({title:e,error:t,tooltip:c}){const i=t instanceof Error?t.message:t,a=n.jsxs("div",{className:"flex items-center m-2",children:[n.jsx(br,{size:"small",color:"error"}),n.jsxs("div",{className:"pl-2",children:[e&&n.jsx(j,{variant:"body2",className:"font-medium",children:e}),n.jsx(j,{variant:"body2",children:i})]})]});return c?n.jsx(Vi,{title:c,children:a}):a}function yt({entity:e,collection:t,path:c,className:i}){const a=ne(),l=f.useMemo(()=>Me({collection:t,path:c,entityId:e.id,values:e.values,fields:a.fields}),[t,c,e]),s=ne(),d=l.properties;return n.jsx("div",{className:"w-full "+i,children:n.jsxs("div",{className:"w-full mb-4",children:[n.jsxs("div",{className:E(ue,"flex justify-between py-2 border-b last:border-b-0"),children:[n.jsx("div",{className:"flex items-center w-1/4",children:n.jsx("span",{className:"pl-2 text-sm text-gray-600",children:"Id"})}),n.jsxs("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:[n.jsx("span",{className:"flex-grow mr-2",children:e.id}),s?.entityLinkBuilder&&n.jsx("a",{href:s.entityLinkBuilder({entity:e}),rel:"noopener noreferrer",target:"_blank",children:n.jsx(R,{children:n.jsx(ro,{size:"small"})})})]})]}),Object.entries(d).map(([u,A])=>{const y=e.values[u];return n.jsxs("div",{className:E(ue,"flex justify-between py-2 border-b last:border-b-0"),children:[n.jsx("div",{className:"flex items-center w-1/4",children:n.jsx("span",{className:"pl-2 text-sm text-gray-600",children:A.name})}),n.jsx("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:n.jsx(Be,{propertyKey:u,value:y,entity:e,property:A,size:"medium"})})]},`reference_previews_${u}`)})]})})}function zz(e){return e.dataType==="boolean"?"center":e.dataType==="number"?e.enumValues?"left":"right":e.dataType==="date"?"right":"left"}function Wi(e){if(e.columnWidth)return e.columnWidth;if(e.dataType==="string")return e.url?280:e.storage?160:e.enumValues?200:e.multiline||e.markdown?300:(e.email,200);if(e.dataType==="array"){const t=e;return t.of?Array.isArray(e.of)?300:Wi(t.of):300}else return e.dataType==="number"?e.enumValues?200:140:e.dataType==="map"?360:e.dataType==="date"?200:e.dataType==="reference"?220:e.dataType==="boolean"?140:200}function ht(e){return`subcollection:${e.alias??e.path}`}function zo(e){return parseInt(e,10)||0}const Hz={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Gi(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const gt=ce.forwardRef(function(t,c){const{onChange:i,onScroll:a,onResize:l,maxRows:s,minRows:d=1,style:u,value:A,onFocus:y,onBlur:h,sizeRef:I,..._}=t,{current:g}=ce.useRef(A!=null),b=ce.useRef(null),p=Uz(c,b),w=ce.useRef(null),k=ce.useRef(0),[v,K]=ce.useState({outerHeightStyle:0}),m=ce.useCallback(()=>{const D=b.current;if(typeof window>"u")return{outerHeightStyle:0};const T=window.getComputedStyle(D);if(T.width==="0px")return{outerHeightStyle:0};const N=I?.current??w.current,q=w.current;N.style.width=T.width,q.value=D.value||t.placeholder||"x",q.value.slice(-1)===`
680
- `&&(q.value+=" ");const G=T.boxSizing,V=zo(T.paddingBottom)+zo(T.paddingTop),oe=zo(T.borderBottomWidth)+zo(T.borderTopWidth),O=N.scrollHeight;q.value="x";const H=N.scrollHeight;let Z=O;d&&(Z=Math.max(Number(d)*H,Z)),s&&(Z=Math.min(Number(s)*H,Z)),Z=Math.max(Z,H);const L=Z+(G==="border-box"?V+oe:0),W=Math.abs(Z-O)<=1;return{outerHeightStyle:L,overflow:W}},[s,d,t.placeholder]),C=(D,S)=>{const{outerHeightStyle:T,overflow:N}=S;return k.current<20&&(T>0&&Math.abs((D.outerHeightStyle||0)-T)>1||D.overflow!==N)?(k.current+=1,{overflow:N,outerHeightStyle:T}):(process.env.NODE_ENV!=="production"&&k.current===20&&console.error(["MUI: Too many re-renders. The layout is unstable.","TextareaAutosize limits the number of renders to prevent an infinite loop."].join(`
679
+ `;function vi({propertyKey:e,value:t,error:c,showError:i,isSubmitting:a,setValue:l,tableMode:s,property:d,includeDescription:u,underlyingValueHasChanged:A,context:y,disabled:h}){if(ne(),!Array.isArray(d.resolvedProperties))throw Error("ArrayCustomShapedFieldBinding misconfiguration. Property `of` not set");const I=d.expanded===void 0?!0:d.expanded;Te({property:d,value:t,setValue:l});const _=n.jsx(Ce,{icon:ke(d,"small"),required:d.validation?.required,className:"text-text-secondary dark:text-text-secondary-dark",title:d.name}),g=d.resolvedProperties.map((b,p)=>{const w={propertyKey:`${e}[${p}]`,disabled:h,property:b,includeDescription:u,underlyingValueHasChanged:A,context:y,tableMode:!1,partOfArray:!0,partOfBlock:!1,autoFocus:!1};return n.jsx("div",{className:"pb-4",children:n.jsx(pn,{...w})},`custom_shaped_array_${p}`)});return n.jsxs(n.Fragment,{children:[!s&&n.jsx(dn,{initiallyExpanded:I,title:_,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",children:g}),s&&g,n.jsx(Se,{includeDescription:u,showError:i,error:c,disabled:h,property:d})]})}De.addMethod(De.array,"uniqueInArray",function(e=c=>c,t){return this.test("uniqueInArray",t,c=>!c||c.length===new Set(c.map(e)).size)});function Ki(e,t,c){const i={};return Object.entries(t).forEach(([a,l])=>{i[a]=so({property:l,customFieldValidator:c,name:a,entityId:e})}),De.object().shape(i)}function so(e){const t=e.property;if(Le(t))throw console.error("Error in property",e),Error("Trying to create a yup mapping from a property builder. Please use resolved properties only");if(t.dataType==="string")return pz(e);if(t.dataType==="number")return wz(e);if(t.dataType==="boolean")return Kz(e);if(t.dataType==="map")return bz(e);if(t.dataType==="array")return Sz(e);if(t.dataType==="date")return mz(e);if(t.dataType==="geopoint")return kz(e);if(t.dataType==="reference")return vz(e);throw console.error("Unsupported data type in yup mapping",t),Error("Unsupported data type in yup mapping")}function bz({property:e,entityId:t,customFieldValidator:c,name:i}){const a={};return e.validation,e.properties&&Object.entries(e.properties).forEach(([l,s])=>{a[l]=so({property:s,parentProperty:e,customFieldValidator:c,name:`${i}[${l}]`,entityId:t})}),De.object().shape(a)}function pz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){let l=De.string();const s=e.validation;if(e.enumValues){s?.required&&(l=l.required(s?.requiredMessage?s.requiredMessage:"Required"));const d=tn(e.enumValues);l=l.oneOf((s?.required?d:[...d,null]).map(u=>u?.id??null)).nullable(!0)}if(s){if(l=s.required?l.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):l.notRequired().nullable(!0),s.unique&&c&&i&&(l=l.test("unique","This value already exists and should be unique",(d,u)=>c({name:i,property:e,parentProperty:t,value:d,entityId:a}))),(s.min||s.min===0)&&(l=l.min(s.min,`${e.name} must be min ${s.min} characters long`)),(s.max||s.max===0)&&(l=l.max(s.max,`${e.name} must be max ${s.max} characters long`)),s.matches){const d=typeof s.matches=="string"?Pi(s.matches):s.matches;d&&(l=l.matches(d,s.matchesMessage?{message:s.matchesMessage}:void 0))}s.trim&&(l=l.trim()),s.lowercase&&(l=l.lowercase()),s.uppercase&&(l=l.uppercase()),e.email&&(l=l.email(`${e.name} must be an email`)),e.url&&(l=l.url(`${e.name} must be a url`))}else l=l.notRequired().nullable(!0);return l}function wz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){const l=e.validation;let s=De.number().typeError("Must be a number");return l?(s=l.required?s.required(l.requiredMessage?l.requiredMessage:"Required").nullable(!0):s.notRequired().nullable(!0),l.unique&&c&&i&&(s=s.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:a}))),(l.min||l.min===0)&&(s=s.min(l.min,`${e.name} must be higher or equal to ${l.min}`)),(l.max||l.max===0)&&(s=s.max(l.max,`${e.name} must be lower or equal to ${l.max}`)),(l.lessThan||l.lessThan===0)&&(s=s.lessThan(l.lessThan,`${e.name} must be higher than ${l.lessThan}`)),(l.moreThan||l.moreThan===0)&&(s=s.moreThan(l.moreThan,`${e.name} must be lower than ${l.moreThan}`)),l.positive&&(s=s.positive(`${e.name} must be positive`)),l.negative&&(s=s.negative(`${e.name} must be negative`)),l.integer&&(s=s.integer(`${e.name} must be an integer`))):s=s.notRequired().nullable(!0),s}function kz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){let l=De.object();const s=e.validation;return s?.unique&&c&&i&&(l=l.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:a}))),s?.required?l=l.required(s.requiredMessage).nullable(!0):l=l.notRequired().nullable(!0),l}function mz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){if(e.autoValue)return De.object().nullable();let l=De.date();const s=e.validation;return s?(l=s.required?l.required(s?.requiredMessage?s.requiredMessage:"Required"):l.notRequired(),s.unique&&c&&i&&(l=l.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:a}))),s.min&&(l=l.min(s.min,`${e.name} must be after ${s.min}`)),s.max&&(l=l.max(s.max,`${e.name} must be before ${s.min}`))):l=l.notRequired(),l.transform(d=>d instanceof Date?d:null).nullable()}function vz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){let l=De.object();const s=e.validation;return s?(l=s.required?l.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):l.notRequired().nullable(!0),s.unique&&c&&i&&(l=l.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:a})))):l=l.notRequired().nullable(!0),l}function Kz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){let l=De.boolean();const s=e.validation;return s?(l=s.required?l.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):l.notRequired().nullable(!0),s.unique&&c&&i&&(l=l.test("unique","This value already exists and should be unique",d=>c({name:i,property:e,parentProperty:t,value:d,entityId:a})))):l=l.notRequired().nullable(!0),l}function Cz(e){return e.validation?.uniqueInArray?!0:e.dataType==="map"&&e.properties?Object.entries(e.properties).filter(([t,c])=>c.validation?.uniqueInArray):!1}function Sz({property:e,parentProperty:t,customFieldValidator:c,name:i,entityId:a}){let l=De.array();if(e.of)if(Array.isArray(e.of)){const d=e.of.map((u,A)=>({[`${i}[${A}]`]:so({property:u,parentProperty:e,entityId:a})})).reduce((u,A)=>({...u,...A}),{});return De.array().of(De.mixed().test("Dynamic object validation","Dynamic object validation error",(u,A)=>rn(d,A.path).validate(u)))}else{l=l.of(so({property:e.of,parentProperty:e,entityId:a}));const d=Cz(e.of);d&&(typeof d=="boolean"?l=l.uniqueInArray(u=>u,`${e.name} should have unique values within the array`):Array.isArray(d)&&d.forEach(([u,A])=>{l=l.uniqueInArray(y=>y&&y[u],`${e.name} → ${A.name??u}: should have unique values within the array`)}))}const s=e.validation;return s?(l=s.required?l.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):l.notRequired().nullable(!0),(s.min||s.min===0)&&(l=l.min(s.min,`${e.name} should be min ${s.min} entries long`)),s.max&&(l=l.max(s.max,`${e.name} should be max ${s.max} entries long`))):l=l.notRequired().nullable(!0),l}const Bz=({containerRef:e})=>{const{isSubmitting:t,isValidating:c,errors:i}=Fe.useFormikContext();return f.useEffect(()=>{const a=Object.keys(i);if(a.length>0&&t&&!c){const l=e?.current?.querySelector(`#form_field_${a[0]}`);if(l&&e?.current){const s=Ci(e.current);if(s){const u=l.getBoundingClientRect().top;s.scrollTo({top:s.scrollTop+u-64,behavior:"smooth"})}const d=l.querySelector("input");d&&d.focus()}}},[t,c,i,e]),null},Ez=e=>{const t=e&&e.scrollHeight>e.clientHeight,c=e?window.getComputedStyle(e).overflowY:null,i=c&&c.indexOf("hidden")!==-1;return t&&!i},Ci=e=>!e||e===document.body?document.body:Ez(e)?e:Ci(e.parentNode);function Fz({customId:e,entityId:t,status:c,onChange:i,error:a,entity:l}){const s=c==="existing"||!e,d=c!=="existing"&&!e,u=f.useMemo(()=>{if(!(!e||typeof e=="boolean"||e==="optional"))return tn(e)},[e]),A=an(),{copy:y}=Uc({onSuccess:_=>A.open({type:"success",message:`Copied ${_}`})}),h=ne(),I={label:d?"ID is set automatically":"ID",disabled:s,name:"id",value:(l&&c==="existing"?l.id:t)??"",endAdornment:l?n.jsxs(n.Fragment,{children:[n.jsx(_e,{title:"Copy",children:n.jsx(R,{onClick:_=>y(l.id),"aria-label":"copy-id",children:n.jsx(no,{size:"small"})})}),h?.entityLinkBuilder&&n.jsx(_e,{title:"Open in the console",children:n.jsx(R,{component:"a",href:h.entityLinkBuilder({entity:l}),rel:"noopener noreferrer",target:"_blank",onClick:_=>_.stopPropagation(),"aria-label":"go-to-datasource",children:n.jsx(ro,{size:"small"})})})]}):void 0};return n.jsxs(n.Fragment,{children:[u&&n.jsx(Xe,{error:a,onValueChange:_=>i(_),...I,renderValue:_=>{const g=u.find(b=>b.id===_);return g?`${g.id} - ${g.label}`:_},children:u.map(_=>n.jsx(xe,{value:String(_.id),children:n.jsx(Ee,{enumKey:_.id,enumValues:u,size:"medium"})},_.id))}),!u&&n.jsx(un,{...I,error:a,placeholder:e==="optional"?"Autogenerated ID, it can be manually changed":c==="new"||c==="copy"?"ID of the new document":"ID of the document",onChange:_=>{let g=_.target.value;return g&&(g=g.trim()),i(g.length?g:void 0)}}),n.jsx(Fe.ErrorMessage,{name:"id",component:"div",children:_=>"You need to specify an ID"})]})}function te({children:e,className:t,variant:c="filled",disabled:i=!1,size:a="medium",startIcon:l=null,fullWidth:s=!1,component:d,...u}){const A="rounded-md border uppercase inline-flex items-center justify-center p-2 px-4 text-sm font-medium focus:outline-none transition ease-in-out duration-150 gap-2",y=E({"w-full":s,"w-fit":!s,"border-transparent bg-primary hover:bg-blue-600 focus:ring-blue-400 !text-white shadow hover:ring-1 hover:ring-primary":c==="filled"&&!i,"border-primary !text-primary hover:bg-primary hover:bg-opacity-10 hover:border-blue-600 !hover:text-blue-600 focus:ring-blue-400 hover:ring-1 hover:ring-primary":c==="outlined"&&!i,"border-transparent !text-primary !hover:text-blue-600 hover:bg-primary hover:bg-opacity-10":c==="text"&&!i,"border-blue-600 border-opacity-50 dark:border-blue-500 dark:border-opacity-50 opacity-50 !text-blue-600 !dark:text-blue-500 text-opacity-50 dark:text-opacity-50":c==="outlined"&&i,"border-transparent outline-none opacity-50 !text-gray-600 !dark:text-gray-500":(c==="filled"||c==="text")&&i}),h=E({"py-1 px-2":a==="small","py-2 px-4":a==="medium","py-2 px-5":a==="large"});return d?n.jsxs(d,{onClick:u.onClick,className:E(he,l?"pl-3":"",A,y,h,t),...u,children:[l,e]}):n.jsxs("button",{type:u.type??"button",onClick:u.onClick,className:E(he,l?"pl-3":"",A,y,h,t),disabled:i,...u,children:[l,e]})}const Si=f.memo(Pz,(e,t)=>e.status===t.status&&e.path===t.path&&de(e.entity?.values,t.entity?.values));function Pz({status:e,path:t,collection:c,entity:i,onEntitySaveRequested:a,onDiscard:l,onModified:s,onValuesChanged:d,onIdChange:u,onFormContextChange:A,hideId:y,autoSave:h,onIdUpdateError:I}){const _=ne(),g=Qe(),b=_.plugins,p=f.useMemo(()=>Me({collection:c,path:t,values:i?.values,fields:_.fields}),[i?.values,t]),w=(e==="new"||e==="copy")&&!!p.customId&&p.customId!=="optional",k=f.useMemo(()=>e==="new"||e==="copy"?w?void 0:g.generateEntityId(t):i?.id,[]),v=f.useRef(!1),K=f.useMemo(()=>{const Q=p.properties;if((e==="existing"||e==="copy")&&i)return i.values??eo(Q);if(e==="new")return eo(Q);throw console.error({status:e,entity:i}),new Error("Form has not been initialised with the correct parameters")},[e,p,i]),[m,C]=f.useState(k),[B,P]=f.useState(!1),[F,D]=f.useState(),S=f.useRef(i?.values??K),T=S.current,[N,q]=f.useState(T),z=Q=>{q(Q),d&&d(Q),h&&Q&&!de(Q,T)&&H(Q)};f.useEffect(()=>{m&&u&&u(m)},[m,u]);const V=Me({collection:c,path:t,entityId:m,values:N,previousValues:T,fields:_.fields}),oe=V.callbacks?.onIdUpdate;f.useEffect(()=>{if(oe&&N&&(e==="new"||e==="copy"))try{const Q=oe({collection:V,path:t,entityId:m,values:N,context:_});C(Q)}catch(Q){I&&I(Q),console.error(Q)}},[m,N,e]);const O=f.useMemo(()=>T&&e==="existing"?Object.entries(V.properties).map(([Q,X])=>{if(Rn(X))return{};const ee=T[Q],U=K[Q];return de(ee,U)?{}:{[Q]:U}}).reduce((Q,X)=>({...Q,...X}),{}):{},[K,V.properties,T,e]),H=Q=>a({collection:V,path:t,entityId:m,values:Q,previousValues:i?.values,closeAfterSave:v.current,autoSave:h??!1}).then(X=>{const ee=e==="new"?"new_entity_saved":e==="copy"?"entity_copied":e==="existing"?"entity_edited":"unmapped_event";_.onAnalyticsEvent?.(ee,{path:t}),S.current=Q}).catch(X=>{console.error(X),D(X)}).finally(()=>{v.current=!1}),Z=(Q,X)=>{if(w&&!m){console.error("Missing custom Id"),P(!0),X.setSubmitting(!1);return}if(D(void 0),P(!1),e==="existing"){if(!i?.id)throw Error("Form misconfiguration when saving, no id for existing entity")}else if(e==="new"||e==="copy"){if(V.customId&&V.customId!=="optional"&&!m)throw Error("Form misconfiguration when saving, entityId should be set")}else throw Error("New FormType added, check EntityForm");H(Q)?.then(ee=>{X.resetForm({values:Q,submitCount:0,touched:{}})}).finally(()=>{X.setSubmitting(!1)})},L=f.useCallback(({name:Q,value:X,property:ee})=>g.checkUniqueField(t,Q,X,ee,m),[g,t,m]),W=f.useMemo(()=>m?Ki(m,V.properties,L):void 0,[m,V.properties,L]);return n.jsx(Fe.Formik,{initialValues:K,onSubmit:Z,validationSchema:W,validate:Q=>console.debug("Validating",Q),onReset:()=>l&&l(),children:Q=>{const X=[],ee={setFieldValue:Q.setFieldValue,values:Q.values,collection:Me({collection:V,path:t,fields:_.fields}),entityId:m,path:t,save:H};if(f.useEffect(()=>{A&&A(ee)},[A,ee]),b&&V){const U={entityId:m,path:t,status:e,collection:c,context:_,currentEntityId:m,formContext:ee};X.push(...b.map((re,J)=>re.form?.Actions?n.jsx(re.form.Actions,{...U},`actions_${re.name}`):null).filter(Boolean))}return n.jsxs("div",{className:"h-full overflow-auto",children:[X.length>0&&n.jsx("div",{className:E("w-full flex justify-end items-center sticky top-0 right-0 left-0 z-10 bg-opacity-60 bg-slate-200 dark:bg-opacity-60 dark:bg-slate-800 backdrop-blur-md"),children:X}),n.jsxs("div",{className:"pl-4 pr-4 pt-12 pb-16 md:pl-8",children:[n.jsx("div",{className:`w-full py-2 flex items-center mt-${4+(X?8:0)} lg:mt-${8+(X?8:0)} mb-8`,children:n.jsx(j,{className:"mt-4 flex-grow "+V.hideIdFromForm?"mb-2":"mb-0",variant:"h4",children:V.singularName??V.name})}),!y&&n.jsx(Fz,{customId:V.customId,entityId:m,status:e,onChange:C,error:B,entity:i}),m&&n.jsx(Dz,{...Q,initialValues:T,onModified:s,onValuesChanged:z,underlyingChanges:O,entity:i,resolvedCollection:V,formContext:ee,status:e,savingError:F,closeAfterSaveRef:v,autoSave:h})]})]})}})}function Dz(e){const{values:t,onModified:c,onValuesChanged:i,underlyingChanges:a,formContext:l,entity:s,touched:d,setFieldValue:u,resolvedCollection:A,isSubmitting:y,status:h,handleSubmit:I,savingError:_,dirty:g,closeAfterSaveRef:b,autoSave:p}=e,w=g;f.useEffect(()=>{c&&c(w),i&&i(t)},[w,t]),f.useEffect(()=>{!p&&a&&s&&Object.entries(a).forEach(([m,C])=>{const B=t[m];!de(C,B)&&!d[m]&&(console.debug("Updated value from the datasource:",m,C),u(m,C!==void 0?C:null))})},[p,a,s,t,d,u]);const k=n.jsx("div",{className:"flex flex-col gap-8",children:(A.propertiesOrder??Object.keys(A.properties)).map(m=>{const C=A.properties[m];if(!C)return console.warn(`Property ${m} not found in collection ${A.name}`),null;const B=!!a&&Object.keys(a).includes(m)&&!!d[m],P=!p&&y||Cn(C)||!!C.disabled;if(Rn(C))return null;const D={propertyKey:m,disabled:P,property:C,includeDescription:C.description||C.longDescription,underlyingValueHasChanged:B&&!p,context:l,tableMode:!1,partOfArray:!1,partOfBlock:!1,autoFocus:!1};return n.jsx("div",{id:`form_field_${m}`,children:n.jsx(ie,{children:n.jsx(pn,{...D})})},`field_${A.name}_${m}`)}).filter(Boolean)}),v=y||!w&&h==="existing",K=f.useRef(null);return n.jsxs(Fe.Form,{onSubmit:I,noValidate:!0,children:[n.jsxs("div",{className:"mt-12",ref:K,children:[k,n.jsx(Bz,{containerRef:K})]}),n.jsx("div",{className:"h-14"}),!p&&n.jsxs(kn,{position:"absolute",children:[_&&n.jsx("div",{className:"text-right",children:n.jsx(j,{color:"error",children:_.message})}),n.jsx(te,{variant:"text",disabled:v,type:"reset",children:h==="existing"?"Discard":"Clear"}),n.jsxs(te,{variant:"text",color:"primary",type:"submit",disabled:v,onClick:()=>{b.current=!1},children:[h==="existing"&&"Save",h==="copy"&&"Create copy",h==="new"&&"Create"]}),n.jsxs(te,{variant:"filled",color:"primary",type:"submit",disabled:v,onClick:()=>{b.current=!0},children:[h==="existing"&&"Save and close",h==="copy"&&"Create copy and close",h==="new"&&"Create and close"]})]})]})}function Bi(e,t){try{const c=Object.keys(e);return(t??c).map(a=>{if(e[a]){const l=e[a];return!Le(l)&&l?.dataType==="map"&&l.properties?{[a]:{...l,properties:Bi(l.properties,l.propertiesOrder)}}:{[a]:l}}else return}).filter(a=>a!==void 0).reduce((a,l)=>({...a,...l}),{})}catch(c){return console.error("Error sorting properties",c),e}}function nt(e,t){if(e)return typeof e=="string"?e:e(t)}const Ei="::";function ot(e){return Fi(Ze(e))}function Fi(e){return e.length===1?e[0]:e.reduce((t,c)=>`${t}${Ei}${c}`)}function Ze(e){return e.split("/").filter((t,c)=>c%2===0)}function Nz(e){return e?e.toString():""}function Pi(e){if(!e)return;const t=e.match(/\/(.*?)\/([a-z]*)?$/i);return t?new RegExp(t[1],t[2]||""):new RegExp(e,"")}function Tz(e){return e.match(/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/)?!0:!!e.match(/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)/)}function Oo(e,t,c,i=300){const a=f.useRef(!1),l=()=>{t(),a.current=!1},s=f.useRef(void 0);f.useEffect(()=>(a.current=!0,clearTimeout(s.current),s.current=setTimeout(l,i),()=>{c&&l()}),[c,e])}function Mz(e,t=300){const[c,i]=f.useState(e);return f.useEffect(()=>{const a=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(a)}},[e,t]),c}function Di(e,t){const c=Ne({propertyKey:"ignore",propertyOrBuilder:e,fields:t});return c?c.dataType==="reference"?!0:c.dataType==="array"?Array.isArray(c.of)?!1:c.of?.dataType==="reference":!1:null}function Oz(e){return n.jsx(gr,{size:e})}function rt(e,t){const c=e?.Icon??gr;return n.jsx(c,{size:t})}function ke(e,t="small",c={}){if(Le(e))return n.jsx(pc,{size:t});{const i=Go(e,c);return rt(i,t)}}function Lz(e,t){return Le(e)?"#888":Go(e,t)?.color??"#666"}function wn(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const c=t.split("."),i=e[c[0]];if(typeof i=="object"&&i.dataType==="map"&&i.properties)return wn(i.properties,c.slice(1).join("."))}}}function tt(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const c=t.split("."),i=e[c[0]];if(i.dataType==="map"&&i.properties)return tt(i.properties,c.slice(1).join("."))}}}function Qz(e){return e.replace(/\.([^.]*)/g,"[$1]")}function Ni(e,t){if(!t)return e;const c={};return t.forEach(i=>{const a=wn(e,i);typeof a=="object"&&a.dataType==="map"&&a.properties&&(c[i]={...a,properties:Ni(a.properties,a.propertiesOrder??[])}),a&&(c[i]=a)}),c}const Lo={read:!0,edit:!0,create:!0,delete:!0};function uo(e,t,c,i){const a=e.permissions;if(a===void 0)return Lo;if(typeof a=="object")return a;if(typeof a=="function")return a({entity:i,user:t.user,authController:t,collection:e,pathSegments:c});throw console.error("Permissions:",a),Error("New type of permission added and not mapped")}function ct(e,t,c,i){return uo(e,t,c,i).edit??Lo.edit}function Qo(e,t,c,i){return uo(e,t,c,i).create??Lo.create}function it(e,t,c,i){return uo(e,t,c,i).delete??Lo.delete}function Ti(e,t){if(e&&(e=No(e),e in Wo))return e in Wo?n.jsx(r,{iconKey:e,size:"medium",className:t}):void 0}function Vo(e,t){const c=Ti(e.icon,t);if(e?.icon&&c)return c;let i=No(("singularName"in e?e.singularName:void 0)??e.name),a;i in Wo&&(a=i),a||(i=No(e.path),i in Wo&&(a=i));const l=_r.length;return a||(a=_r[Jt(e.path)%l]),n.jsx(r,{iconKey:a,size:"medium",className:t})}const Wo=oc.reduce((e,t)=>(e[t]=t,e),{});function Vz(e,t){if(t!==void 0&&t===1)return e;const c={"(quiz)$":"$1zes","^(ox)$":"$1en","([m|l])ouse$":"$1ice","(matr|vert|ind)ix|ex$":"$1ices","(x|ch|ss|sh)$":"$1es","([^aeiouy]|qu)y$":"$1ies","(hive)$":"$1s","(?:([^f])fe|([lr])f)$":"$1$2ves","(shea|lea|loa|thie)f$":"$1ves",sis$:"ses","([ti])um$":"$1a","(tomat|potat|ech|her|vet)o$":"$1oes","(bu)s$":"$1ses","(alias)$":"$1es","(octop)us$":"$1i","(ax|test)is$":"$1es","(us)$":"$1es","([^s]+)$":"$1s"},i={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const l in i){const s=new RegExp(`${l}$`,"i"),d=i[l];if(s.test(e))return e.replace(s,d)}for(const l in c){const s=new RegExp(l,"i");if(s.test(e))return e.replace(s,c[l])}return e}function Wz(e,t){if(t!==void 0&&t!==1)return e;const c={"(quiz)zes$":"$1","(matr)ices$":"$1ix","(vert|ind)ices$":"$1ex","^(ox)en$":"$1","(alias)es$":"$1","(octop|vir)i$":"$1us","(cris|ax|test)es$":"$1is","(shoe)s$":"$1","(o)es$":"$1","(bus)es$":"$1","([m|l])ice$":"$1ouse","(x|ch|ss|sh)es$":"$1","(m)ovies$":"$1ovie","(s)eries$":"$1eries","([^aeiouy]|qu)ies$":"$1y","([lr])ves$":"$1f","(tive)s$":"$1","(hive)s$":"$1","(li|wi|kni)ves$":"$1fe","(shea|loa|lea|thie)ves$":"$1f","(^analy)ses$":"$1sis","((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$":"$1$2sis","([ti])a$":"$1um","(n)ews$":"$1ews","(h|bl)ouses$":"$1ouse","(corpse)s$":"$1","(us)es$":"$1",s$:""},i={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const l in i){const s=new RegExp(`${i[l]}$`,"i");if(s.test(e))return e.replace(s,l)}for(const l in c){const s=new RegExp(l,"i");if(s.test(e))return e.replace(s,c[l])}return e}function Mi(e,t,c,i=3){const a=Object.keys(e.properties);let l=c?.filter(s=>a.includes(s));return l&&l.length>0?l:(l=a,l.filter(s=>{const d=e.properties[s];return d&&!Le(d)&&!Di(d,t)}).slice(0,i))}function Oi(e,t=166){let c;function i(...a){const l=()=>{e.apply(this,a)};clearTimeout(c),c=setTimeout(l,t)}return i.clear=()=>{clearTimeout(c)},i}function at(e,t=""){return e&&Object.keys(e).reduce((c,i)=>{const a=t?`${t}.${i}`:i;return typeof e[i]=="object"&&e[i]!==null?Array.isArray(e[i])?e[i].forEach((l,s)=>{Object.assign(c,at(l,`${a}[${s}]`))}):Object.assign(c,at(e[i],a)):c[a]=e[i],c},{})}function Li(e){return e.reduce((t,c)=>(Object.entries(c).forEach(([i,a])=>{if(Array.isArray(a)&&(t[i]=Math.max(t[i]||0,a.length)),typeof a=="object"&&a!==null){const l=Li([a]);Object.entries(l).forEach(([s,d])=>{const u=`${i}.${s}`;t[u]=Math.max(t[u]||0,d)})}}),t),{})}function Qi(e){return Object.keys(lt).includes(e)}const lt={text_field:{key:"text_field",name:"Text field",description:"Simple short text",Icon:Pc,color:"#2d7ff9",property:{dataType:"string",Field:Mn}},multiline:{key:"multiline",name:"Multiline",description:"Text with multiple lines",Icon:Dc,color:"#2d7ff9",property:{dataType:"string",multiline:!0,Field:Mn}},markdown:{key:"markdown",name:"Markdown",description:"Text with advanced markdown syntax",Icon:bc,color:"#2d7ff9",property:{dataType:"string",markdown:!0,Field:mi}},url:{key:"url",name:"Url",description:"Text with URL validation",Icon:wc,color:"#154fb3",property:{dataType:"string",url:!0,Field:Mn}},email:{key:"email",name:"Email",description:"Text with email validation",Icon:_c,color:"#154fb3",property:{dataType:"string",email:!0,Field:Mn}},select:{key:"select",name:"Select/enum",description:"Select one text value from within an enumeration",Icon:Kc,color:"#4223c9",property:{dataType:"string",enumValues:[],Field:zr}},multi_select:{key:"multi_select",name:"Multi select",description:"Select multiple text values from within an enumeration",Icon:Cc,color:"#4223c9",property:{dataType:"array",of:{dataType:"string",enumValues:[]},Field:$r}},number_input:{key:"number_input",name:"Number input",description:"Simple number field with validation",Icon:Bc,color:"#bec920",property:{dataType:"number",Field:Mn}},number_select:{key:"number_select",name:"Number select",description:"Select a number value from within an enumeration",Icon:pr,color:"#bec920",property:{dataType:"number",enumValues:[],Field:zr}},multi_number_select:{key:"multi_number_select",name:"Multiple number select",description:"Select multiple number values from within an enumeration",Icon:pr,color:"#bec920",property:{dataType:"array",of:{dataType:"number",enumValues:[]},Field:$r}},file_upload:{key:"file_upload",name:"File upload",description:"Input for uploading single files",Icon:Nc,color:"#f92d9a",property:{dataType:"string",storage:{storagePath:"{path}"},Field:Jr}},multi_file_upload:{key:"multi_file_upload",name:"Multiple file upload",description:"Input for uploading multiple files",Icon:fc,color:"#f92d9a",property:{dataType:"array",of:{dataType:"string",storage:{storagePath:"{path}"}},Field:Jr}},reference:{key:"reference",name:"Reference",description:"The value refers to a different collection",Icon:vc,color:"#ff0042",property:{dataType:"reference",Field:Ii}},multi_references:{key:"multi_references",name:"Multiple references",description:"Multiple values that refer to a different collection",Icon:tc,color:"#ff0042",property:{dataType:"array",of:{dataType:"reference"},Field:li}},switch:{key:"switch",name:"Switch",description:"Boolean true or false field (or yes or no, 0 or 1...)",Icon:Ic,color:"#20d9d2",property:{dataType:"boolean",Field:hi}},date_time:{key:"date_time",name:"Date/time",description:"A date time select field",Icon:Fc,color:"#8b46ff",property:{dataType:"date",Field:gi}},group:{key:"group",name:"Group",description:"Group of multiple fields",Icon:hr,color:"#ff9408",property:{dataType:"map",properties:{},Field:bi}},key_value:{key:"key_value",name:"Key-value",description:"Flexible field that allows the user to add multiple key-value pairs",Icon:hr,color:"#ff9408",property:{dataType:"map",keyValue:!0,Field:pi}},repeat:{key:"repeat",name:"Repeat/list",description:"A field that gets repeated multiple times (e.g. multiple text fields)",Icon:mr,color:"#ff9408",property:{dataType:"array",of:{dataType:"string"},Field:wi}},custom_array:{key:"custom_array",name:"Custom array",description:"A field that saved its value as an array of custom objects",Icon:mr,color:"#ff9408",property:{dataType:"array",of:[],Field:vi}},block:{key:"block",name:"Block",description:"A complex field that allows the user to compose different fields together, with a key->value format",Icon:Tc,color:"#ff9408",property:{dataType:"array",oneOf:{properties:{}},Field:ki}}};function Go(e,t){const c=dt(e),i=st(e);if(!i){console.error("No field id found for property",e);return}const a=lt[i],l=c?t[c]:void 0;return qe(a??{},l??{})}function st(e){if(e.dataType==="string")return e.multiline?"multiline":e.markdown?"markdown":e.storage?"file_upload":e.url?"url":e.email?"email":e.enumValues?"select":"text_field";if(e.dataType==="number")return e.enumValues?"number_select":"number_input";if(e.dataType==="map"){if(e.keyValue)return"key_value";if(e.properties)return"group"}else if(e.dataType==="array"){const t=e.of;return e.oneOf?"block":Array.isArray(t)?"custom_array":Le(t)?"repeat":t?.dataType==="string"&&t.enumValues?"multi_select":t?.dataType==="number"&&t.enumValues?"multi_number_select":t?.dataType==="string"&&t.storage?"multi_file_upload":t?.dataType==="reference"?"multi_references":"repeat"}else{if(e.dataType==="boolean")return"switch";if(e.dataType==="date")return"date_time";if(e.dataType==="reference")return"reference"}console.error("Unsupported field config mapping",e)}function dt(e){return e.fieldConfig?e.fieldConfig:st(e)}const Me=({collection:e,path:t,entityId:c,values:i,previousValues:a,userConfigPersistence:l,fields:s})=>{const d=l?.getCollectionConfig(t),u=rn(d,"properties"),A=eo(e.properties),y=i??A,h=a??i??A,I=Object.entries(e.properties).map(([b,p])=>{const w=y?Fe.getIn(y,b):void 0;return{[b]:Ne({propertyKey:b,propertyOrBuilder:p,values:y,previousValues:h,path:t,propertyValue:w,entityId:c,fields:s})}}).filter(b=>b!==null).reduce((b,p)=>({...b,...p}),{}),_=qe(I,u),g=Object.entries(_).filter(([b,p])=>!!p?.dataType).map(([b,p])=>({[b]:p})).reduce((b,p)=>({...b,...p}),{});return{...e,properties:g,originalCollection:e}};function Ne({propertyOrBuilder:e,propertyValue:t,fromBuilder:c=!1,...i}){if(typeof e=="object"&&"resolved"in e)return e;let a=null;if(e)if(Le(e)){const l=i.path;if(!l)throw Error("Trying to resolve a property builder without specifying the entity path");const s=e({...i,path:l,propertyValue:t,values:i.values??{},previousValues:i.previousValues??i.values??{}});if(!s)return console.debug("Property builder not returning `Property` so it is not rendered",l,i.entityId,e),null;a=Ne({...i,propertyValue:t,propertyOrBuilder:s,fromBuilder:!0})}else{const l=e;if(l.dataType==="map"&&l.properties){const s=ut({...i,properties:l.properties,propertyValue:t});a={...l,resolved:!0,fromBuilder:c,properties:s}}else l.dataType==="array"?a=sn({property:l,propertyValue:t,fromBuilder:c,...i}):(l.dataType==="string"||l.dataType==="number")&&l.enumValues&&(a=ft(l,c))}else return null;if(a||(a={...e,resolved:!0,fromBuilder:c}),a.fieldConfig&&!Qi(a.fieldConfig)){const l=i.fields;if(!l)throw Error(`Trying to resolve a property with key ${a.fieldConfig} that inherits from a custom field but no custom fields were provided. Use the property 'fields' in your top level component to provide them`);const s=l[a.fieldConfig];if(!s)throw Error(`Trying to resolve a property that inherits from a custom field but no custom field with id ${a.fieldConfig} was found. Check the \`fields\` in your top level component`);if(s.property){const d=Ne({propertyOrBuilder:s.property,propertyValue:t,...i});d&&(a=qe(d,a))}}return a?{...a,resolved:!0}:null}function sn({propertyKey:e,property:t,propertyValue:c,...i}){if(t.of){if(Array.isArray(t.of))return{...t,resolved:!0,fromBuilder:i.fromBuilder,resolvedProperties:t.of.map((a,l)=>Ne({propertyKey:`${e}.${l}`,propertyOrBuilder:a,propertyValue:Array.isArray(c)?c[l]:void 0,...i,index:l}))};{const a=t.of,l=Array.isArray(c)?c.map((d,u)=>Ne({propertyKey:`${e}.${u}`,propertyOrBuilder:a,propertyValue:d,...i,index:u})).filter(d=>!!d):[],s=Ne({propertyKey:`${e}`,propertyOrBuilder:a,propertyValue:void 0,...i});if(!s)throw Error("When using a property builder as the 'of' prop of an ArrayProperty, you must return a valid child property");return{...t,resolved:!0,fromBuilder:i.fromBuilder,of:s,resolvedProperties:l}}}else if(t.oneOf){const a=t.oneOf?.typeField??xn,l=Array.isArray(c)?c.map((d,u)=>{const A=d&&d[a],y=t.oneOf?.properties[A];return!A||!y?null:Ne({propertyKey:`${e}.${u}`,propertyOrBuilder:y,propertyValue:c,...i})}).filter(d=>!!d):[],s=ut({properties:t.oneOf.properties,propertyValue:void 0,...i});return{...t,resolved:!0,oneOf:{...t.oneOf,properties:s},fromBuilder:i.fromBuilder,resolvedProperties:l}}else{if(t.Field)return{...t,resolved:!0,fromBuilder:i.fromBuilder};throw Error("The array property needs to declare an 'of' or a 'oneOf' property, or provide a custom `Field`")}}function ut({properties:e,propertyValue:t,...c}){return Object.entries(e).map(([i,a])=>({[i]:Ne({propertyKey:i,propertyOrBuilder:a,propertyValue:t&&typeof t=="object"?rn(t,i):void 0,...c})})).filter(i=>i!==null).reduce((i,a)=>({...i,...a}),{})}function ft(e,t){return typeof e.enumValues=="object"?{...e,resolved:!0,enumValues:tn(e.enumValues)?.filter(c=>c&&c.id&&c.label)??[],fromBuilder:t??!1}:e}function Gz(e){return typeof e=="object"?Object.entries(e).map(([t,c])=>typeof c=="string"?{id:t,label:c}:c):Array.isArray(e)?e:void 0}function At(e,t){return typeof e=="string"?t?.find(c=>c.key===e):e}function _t(e){const{path:t,collections:c=[],currentFullPath:i}=e,a=pe(t).split("/"),l=bo(a),s=[];for(let d=0;d<l.length;d++){const u=l[d],A=c&&c.find(y=>y.alias===u||y.path===u);if(A){const y=A.alias??A.path,h=i&&i.length>0?i+"/"+y:y;s.push({type:"collection",path:h,collection:A});const I=pe(pe(t).replace(u,"")),_=I.length>0?I.split("/"):[];if(_.length>0){const g=_[0],b=h+"/"+g;if(s.push({type:"entity",entityId:g,path:h,parentCollection:A}),_.length>1){const p=_.slice(1).join("/");if(!A)throw Error("collection not found resolving path: "+A);const w=A.entityViews,k=w&&w.map(v=>At(v,e.contextEntityViews)).filter(Boolean).find(v=>v.key===p);if(k){const v=i&&i.length>0?i+"/"+k.key:k.key;s.push({type:"custom_view",path:v,view:k})}else A.subcollections&&s.push(..._t({path:p,collections:A.subcollections,currentFullPath:b,contextEntityViews:e.contextEntityViews}))}}break}}return s}function Vi(e){return n.jsx(_e,{...e,tooltipClassName:"!text-red-500 bg-red-50",children:e.children})}function we({title:e,error:t,tooltip:c}){const i=t instanceof Error?t.message:t,a=n.jsxs("div",{className:"flex items-center m-2",children:[n.jsx(br,{size:"small",color:"error"}),n.jsxs("div",{className:"pl-2",children:[e&&n.jsx(j,{variant:"body2",className:"font-medium",children:e}),n.jsx(j,{variant:"body2",children:i})]})]});return c?n.jsx(Vi,{title:c,children:a}):a}function yt({entity:e,collection:t,path:c,className:i}){const a=ne(),l=f.useMemo(()=>Me({collection:t,path:c,entityId:e.id,values:e.values,fields:a.fields}),[t,c,e]),s=ne(),d=l.properties;return n.jsx("div",{className:"w-full "+i,children:n.jsxs("div",{className:"w-full mb-4",children:[n.jsxs("div",{className:E(ue,"flex justify-between py-2 border-b last:border-b-0"),children:[n.jsx("div",{className:"flex items-center w-1/4",children:n.jsx("span",{className:"pl-2 text-sm text-gray-600",children:"Id"})}),n.jsxs("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:[n.jsx("span",{className:"flex-grow mr-2",children:e.id}),s?.entityLinkBuilder&&n.jsx("a",{href:s.entityLinkBuilder({entity:e}),rel:"noopener noreferrer",target:"_blank",children:n.jsx(R,{children:n.jsx(ro,{size:"small"})})})]})]}),Object.entries(d).map(([u,A])=>{const y=e.values[u];return n.jsxs("div",{className:E(ue,"flex justify-between py-2 border-b last:border-b-0"),children:[n.jsx("div",{className:"flex items-center w-1/4",children:n.jsx("span",{className:"pl-2 text-sm text-gray-600",children:A.name})}),n.jsx("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:n.jsx(Be,{propertyKey:u,value:y,entity:e,property:A,size:"medium"})})]},`reference_previews_${u}`)})]})})}function zz(e){return e.dataType==="boolean"?"center":e.dataType==="number"?e.enumValues?"left":"right":e.dataType==="date"?"right":"left"}function Wi(e){if(e.columnWidth)return e.columnWidth;if(e.dataType==="string")return e.url?280:e.storage?160:e.enumValues?200:e.multiline||e.markdown?300:(e.email,200);if(e.dataType==="array"){const t=e;return t.of?Array.isArray(e.of)?300:Wi(t.of):300}else return e.dataType==="number"?e.enumValues?200:140:e.dataType==="map"?360:e.dataType==="date"?200:e.dataType==="reference"?220:e.dataType==="boolean"?140:200}function ht(e){return`subcollection:${e.alias??e.path}`}function zo(e){return parseInt(e,10)||0}const Hz={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Gi(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflow}const gt=ce.forwardRef(function(t,c){const{onChange:i,onScroll:a,onResize:l,maxRows:s,minRows:d=1,style:u,value:A,onFocus:y,onBlur:h,sizeRef:I,..._}=t,{current:g}=ce.useRef(A!=null),b=ce.useRef(null),p=Uz(c,b),w=ce.useRef(null),k=ce.useRef(0),[v,K]=ce.useState({outerHeightStyle:0}),m=ce.useCallback(()=>{const D=b.current;if(typeof window>"u")return{outerHeightStyle:0};const T=window.getComputedStyle(D);if(T.width==="0px")return{outerHeightStyle:0};const N=I?.current??w.current,q=w.current;N.style.width=T.width,q.value=D.value||t.placeholder||"x",q.value.slice(-1)===`
680
+ `&&(q.value+=" ");const z=T.boxSizing,V=zo(T.paddingBottom)+zo(T.paddingTop),oe=zo(T.borderBottomWidth)+zo(T.borderTopWidth),O=N.scrollHeight;q.value="x";const H=N.scrollHeight;let Z=O;d&&(Z=Math.max(Number(d)*H,Z)),s&&(Z=Math.min(Number(s)*H,Z)),Z=Math.max(Z,H);const L=Z+(z==="border-box"?V+oe:0),W=Math.abs(Z-O)<=1;return{outerHeightStyle:L,overflow:W}},[s,d,t.placeholder]),C=(D,S)=>{const{outerHeightStyle:T,overflow:N}=S;return k.current<20&&(T>0&&Math.abs((D.outerHeightStyle||0)-T)>1||D.overflow!==N)?(k.current+=1,{overflow:N,outerHeightStyle:T}):(process.env.NODE_ENV!=="production"&&k.current===20&&console.error(["MUI: Too many re-renders. The layout is unstable.","TextareaAutosize limits the number of renders to prevent an infinite loop."].join(`
681
681
  `)),D)},B=ce.useCallback(()=>{const D=m();Gi(D)||(l&&l(D),K(S=>C(S,D)))},[m,l]),P=()=>{const D=m();Gi(D)||La.flushSync(()=>{K(S=>C(S,D))})};ce.useEffect(()=>{const D=Oi(()=>{k.current=0,b.current&&P()});let S;const T=b.current,N=window;if(!(typeof window>"u"))return N.addEventListener("resize",D),typeof ResizeObserver<"u"&&(S=new ResizeObserver(D),S.observe(T)),()=>{D.clear(),N.removeEventListener("resize",D),S&&S.disconnect()}}),f.useLayoutEffect(()=>{B()}),ce.useEffect(()=>{k.current=0},[A]);const F=D=>{k.current=0,g||B(),i&&i(D)};return n.jsxs(ce.Fragment,{children:[n.jsx("textarea",{value:A,onChange:F,className:t.className,ref:p,onFocus:y,onBlur:h,rows:d,style:{height:v.outerHeightStyle,overflow:v.overflow?"hidden":void 0,...u},onScroll:a,..._}),n.jsx("textarea",{"aria-hidden":!0,className:t.shadowClassName,readOnly:!0,ref:w,tabIndex:-1,style:{...Hz.shadow,...u,padding:0}})]})});function Uz(...e){return ce.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(c=>{Yz(c,t)})},e)}function Yz(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function $z(e){const t=f.useRef(null),{disabled:c,value:i,multiline:a,updateValue:l,focused:s}=e,d=f.useRef(i),[u,A]=f.useState(i),y=f.useRef(!1);f.useEffect(()=>{d.current!==i&&i!==u&&A(i),d.current=i},[i]);const h=f.useCallback(()=>{!i&&!u||u!==i&&(d.current=u,l(u))},[u,l,i]);return Oo(u,h,!s,2e3),f.useEffect(()=>{t.current&&s&&!y.current?(y.current=!0,t.current.focus({preventScroll:!0}),t.current.selectionStart=t.current.value.length,t.current.selectionEnd=t.current.value.length):y.current=s},[s,t]),n.jsx(gt,{ref:t,style:{padding:0,margin:0,width:"100%",color:"unset",fontWeight:"unset",lineHeight:"unset",fontSize:"unset",fontFamily:"unset",background:"unset",border:"unset",resize:"none",outline:"none"},value:u??"",onChange:I=>{const _=I.target.value;(a||!_.endsWith(`
682
- `))&&A(_)},onFocus:()=>{y.current=!0},onBlur:()=>{y.current=!1,h()}})}function It(e){const{name:t,enumValues:c,error:i,internalValue:a,disabled:l,small:s,focused:d,updateValue:u,multiple:A,valueType:y}=e,h=Array.isArray(a)&&A||!Array.isArray(a)&&!A,I=f.useRef(null);f.useEffect(()=>{I.current&&d&&I.current?.focus({preventScroll:!0})},[d,I]);const _=f.useCallback(b=>{if(y==="number")if(A){const p=b.map(w=>parseFloat(w));u(p)}else u(parseFloat(b));else if(y==="string")u(b||null);else throw Error("Missing mapping in TableSelect")},[A,u,y]),g=(b,p)=>A&&Array.isArray(b)?n.jsx(Qr,{value:b,name:t,enumValues:c,size:s?"small":"medium"},`${b}-${p}`):n.jsx(Ee,{enumKey:b,enumValues:c,size:s?"small":"medium"},`${b}-${p}`);return A?n.jsx(Ur,{inputRef:I,containerClassName:"w-full h-full",className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:l,padding:!1,includeFocusOutline:!1,value:h?a.map(b=>b.toString()):[],onMultiValueChange:_,renderValue:g,children:c?.map(b=>n.jsx(Yr,{value:String(b.id),children:n.jsx(Ee,{enumKey:b.id,enumValues:c,size:s?"small":"medium"})},b.id))}):n.jsx(Xe,{inputRef:I,className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:l,multiple:A,padding:!1,includeFocusOutline:!1,value:h?A?a.map(b=>b.toString()):a?.toString():A?[]:"",onValueChange:_,onMultiValueChange:_,renderValue:g,children:c?.map(b=>n.jsx(xe,{value:String(b.id),children:n.jsx(Ee,{enumKey:b.id,enumValues:c,size:s?"small":"medium"})},b.id))})}function jz(e){const{align:t,value:c,updateValue:i,focused:a}=e,l=c&&typeof c=="number"?c.toString():"",[s,d]=f.useState(l),u=f.useRef(c);f.useEffect(()=>{u.current!==c&&String(c)!==s&&d(c?c.toString():null),u.current=c},[c]);const A=f.useCallback(()=>{if(s!==l)if(s!=null){const I=parseFloat(s);if(isNaN(I))return;I!=null&&i(I)}else i(null)},[s,c]);Oo(s,A,!a,2e3),f.useEffect(()=>{!a&&l!==s&&d(c!=null?c.toString():null)},[c,a]);const y=f.useRef(null);f.useEffect(()=>{y.current&&a&&y.current.focus({preventScroll:!0})},[a,y]);const h=/^-?[0-9]+[,.]?[0-9]*$/;return n.jsx("input",{ref:y,className:"w-full text-right p-0 m-0 bg-transparent border-none resize-none outline-none font-normal leading-normal text-unset",style:{textAlign:t},value:s??"",onChange:I=>{const _=I.target.value.replace(",",".");_.length===0&&d(null),(h.test(_)||_.startsWith("-"))&&d(_)}})}function qz(e){const{internalValue:t,updateValue:c,focused:i}=e,a=f.useRef(null);return f.useEffect(()=>{a.current&&i&&a.current.focus({preventScroll:!0})},[i,a]),n.jsx(Zr,{ref:a,size:"small",value:!!t,onValueChange:c})}function Jz(e){const{disabled:t,error:c,mode:i,internalValue:a,updateValue:l}=e;return n.jsx(Vn,{value:a??void 0,onChange:s=>l(s),size:"medium",invisible:!0,className:"w-full h-full",inputClassName:"w-full h-full",mode:i})}function zi({showError:e,disabled:t,showExpandIcon:c,selected:i,openPopup:a,children:l}){const s=f.useRef(null),d=f.useCallback(()=>{if(a){const A=s&&s?.current?.getBoundingClientRect();a(A)}},[]),u=f.useRef();return f.useEffect(()=>{u.current&&i&&u.current.focus({preventScroll:!0})},[i]),n.jsx(n.Fragment,{children:(e||!t&&c)&&n.jsxs("div",{ref:s,className:"absolute top-0.5 right-0.5 flex items-center",children:[i&&l,i&&!t&&c&&n.jsx(R,{ref:u,color:"inherit",size:"small",onClick:d,children:n.jsxs("svg",{fill:"#888",width:"20",height:"20",viewBox:"0 0 24 24",children:[n.jsx("path",{className:"cls-2",d:"M20,5a1,1,0,0,0-1-1L14,4h0a1,1,0,0,0,0,2h2.57L13.29,9.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L18,7.42V10a1,1,0,0,0,1,1h0a1,1,0,0,0,1-1Z"}),n.jsx("path",{className:"cls-2",d:"M10.71,13.29a1,1,0,0,0-1.42,0L6,16.57V14a1,1,0,0,0-1-1H5a1,1,0,0,0-1,1l0,5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2H7.42l3.29-3.29A1,1,0,0,0,10.71,13.29Z"})]})}),e&&n.jsx(Vi,{side:"left",className:"flex items-center justify-center",style:{width:32,height:32},title:e.message,children:n.jsx(yc,{size:"small",color:"error"})})]})})}const Zz="max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",Xz="pt-0 border-2 border-solid",xz="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500 bg-green-50 dark:bg-green-900",Rz="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500 bg-red-50 dark:bg-red-900";function e3(e){const{propertyKey:t,error:c,selected:i,openPopup:a,value:l,disabled:s,property:d,entity:u,path:A,previewSize:y,updateValue:h}=e,I=Bn(),{internalValue:_,setInternalValue:g,onFilesAdded:b,storage:p,onFileUploadComplete:w,storagePathBuilder:k,multipleFilesSupported:v}=di({entityValues:u.values,entityId:u.id,path:A,property:d,propertyKey:t,storageSource:I,onChange:h,value:l,disabled:s});return n.jsx(n3,{internalValue:_,setInternalValue:g,name:t,disabled:s,autoFocus:!1,openPopup:a,error:c,selected:i,property:d,onChange:h,entity:u,storagePathBuilder:k,storage:p,multipleFilesSupported:v,onFilesAdded:b,onFileUploadComplete:w,previewSize:y})}function n3({property:e,name:t,internalValue:c,setInternalValue:i,openPopup:a,entity:l,selected:s,error:d,onChange:u,multipleFilesSupported:A,previewSize:y,disabled:h,autoFocus:I,storage:_,onFilesAdded:g,onFileUploadComplete:b,storagePathBuilder:p}){const[w,k]=f.useState(!1),v=A&&y==="medium"?"small":y;if(A){const O=e;if(Array.isArray(O.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(O.of){if(O.of.dataType!=="string")throw Error("Storage field using array must be of data type string")}else throw Error("Storage field using array must be of data type string")}const K=_?.metadata,m=!!c,C=an(),{open:B,getRootProps:P,getInputProps:F,isDragActive:D,isDragAccept:S,isDragReject:T}=Ro.useDropzone({accept:_.acceptedFiles?_.acceptedFiles.map(O=>({[O]:[]})).reduce((O,H)=>({...O,...H}),{}):void 0,disabled:h,maxSize:_.maxSize,noClick:!0,noKeyboard:!0,onDrop:g,onDropRejected:(O,H)=>{for(const Z of O)for(const L of Z.errors)C.open({type:"error",message:`Error uploading file: File is larger than ${_.maxSize} bytes`})}}),{...N}=P(),q=A?"Drag 'n' drop some files here, or click here to edit":"Drag 'n' drop a file here, or click here edit",G=A?e.of:e,V=f.useMemo(()=>Pn(v),[v]),oe=!h&&d;return n.jsxs("div",{...N,onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>k(!1),className:E(Zz,"relative w-full h-full flex",`justify-${m?"start":"center"}`,D?Xz:"",S?xz:"",T?Rz:""),children:[n.jsx("input",{autoFocus:I,...F()}),c.map((O,H)=>{let Z;return O.storagePathOrDownloadUrl?Z=n.jsx(o3,{property:G,value:O.storagePathOrDownloadUrl,entity:l,size:v},`storage_preview_${H}`):O.file&&(Z=n.jsx(_i,{entry:O,metadata:K,storagePath:p(O.file),onFileUploadComplete:b,imageSize:V,simple:!0},`storage_progress_${H}`)),Z}),!c&&n.jsx("div",{className:"flex-grow m-2 max-w-[200px]",onClick:B,children:n.jsx(j,{className:"text-gray-400 dark:text-gray-600",variant:"body2",align:"center",children:q})}),n.jsx(zi,{showError:oe,disabled:h,showExpandIcon:!0,selected:s,openPopup:h?void 0:a,children:n.jsx(R,{color:"inherit",size:"small",onClick:B,children:n.jsx(Ac,{size:"small",className:"text-gray-500"})})})]})}function o3({property:e,value:t,size:c,entity:i}){return n.jsx("div",{className:"relative m-2",children:t&&n.jsx(ie,{children:n.jsx(Be,{propertyKey:"ignore",value:t,property:e,entity:i,size:c})})})}function Hi(e){const{name:t,internalValue:c,updateValue:i,multiselect:a,path:l,size:s,previewProperties:d,title:u,disabled:A,forceFilter:y}=e,[h,I]=f.useState(!1),_=f.useCallback(()=>I(!0),[]),g=f.useCallback(()=>I(!1),[]),p=fe().getCollection(l);if(!p)throw Error(`Couldn't find the corresponding collection view for the path: ${l}`);const w=f.useCallback(F=>{i(F?hn(F):null)},[i]),k=f.useCallback(F=>{i(F.map(D=>hn(D)))},[i]),v=c?Array.isArray(c)?c.map(F=>F.id):c.id?[c.id]:[]:[],K=io({multiselect:a,path:l,collection:p,onMultipleEntitiesSelected:k,onSingleEntitySelected:w,selectedEntityIds:v,forceFilter:y}),m=f.useCallback(()=>{A||K.open()},[A,K]),C=!c||Array.isArray(c)&&c.length===0,B=()=>c instanceof je?n.jsx(nn,{onClick:A?void 0:m,size:ln(s),reference:c,onHover:h,disabled:!l,previewProperties:d}):n.jsx(Po,{onClick:A?void 0:m,size:ln(s),children:n.jsx(we,{title:"Value is not a reference.",error:"Click to edit"})}),P=()=>Array.isArray(c)?n.jsx(n.Fragment,{children:c.map((F,D)=>n.jsx("div",{className:"m-1 w-full",children:n.jsx(nn,{onClick:A?void 0:m,size:"tiny",reference:F,onHover:h,disabled:!l,previewProperties:d})},`preview_array_ref_${t}_${D}`))}):n.jsx(we,{error:"Data is not an array of references"});return p?n.jsxs("div",{className:"w-full",onMouseEnter:_,onMouseMove:_,onMouseLeave:g,children:[c&&!a&&B(),c&&a&&P(),C&&n.jsxs(te,{onClick:m,size:"small",variant:"outlined",color:"primary",children:["Edit ",u]})]}):n.jsx(we,{error:"The specified collection does not exist"})}function Ln(e){switch(e){case"xl":return 400;case"l":return 280;case"m":return 140;case"s":return 80;case"xs":return 54;default:throw Error("Missing mapping for collection size -> height")}}const r3=({justifyContent:e,scrollable:t,faded:c,fullHeight:i,children:a})=>n.jsx("div",{className:E("flex flex-col max-h-full w-full",{"items-start":c||t}),style:{justifyContent:e,height:i?"100%":void 0,overflow:t?"auto":void 0,WebkitMaskImage:c?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0,maskImage:c?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0},children:a}),bt=f.memo(function({children:t,actions:c,size:i,selected:a,disabled:l,disabledTooltip:s,saved:d,error:u,align:A,allowScroll:y,removePadding:h,fullHeight:I,onSelect:_,width:g,hideOverflow:b=!0,showExpandIcon:p=!0}){const[w,k]=er(),v=f.useRef(null);Do(v,()=>{a&&_&&_(void 0)},!!(a&&_));const[K,m]=f.useState(!1),C=f.useMemo(()=>Ln(i),[i]),[B,P]=f.useState(!1),[F,D]=f.useState(d),S=!l&&u;f.useEffect(()=>{d&&D(!0);const L=setTimeout(()=>{D(!1)},800);return()=>{clearTimeout(L)}},[d]);let T=0;if(!h)switch(i){case"l":case"xl":T=4;break;case"m":T=2;break;case"s":default:T=1;break}let N;switch(A){case"right":N="flex-end";break;case"center":N="center";break;case"left":default:N="flex-start"}const q=f.useCallback(()=>{if(!_)return;const L=v&&v?.current?.getBoundingClientRect();l?_(void 0):!a&&L&&_(L)},[v,_,a,l]),G=f.useCallback(L=>{q(),L.stopPropagation()},[q]);f.useEffect(()=>{if(k){const L=k.height>C;K!==L&&m(L)}},[k,K,C]);const V=!S&&a,oe=!l&&y&&K,O=!l&&!y&&K,H=f.useCallback(()=>P(!0),[]),Z=f.useCallback(()=>P(!1),[]);return n.jsxs("div",{ref:v,className:E("transition-colors duration-100 ease-in-out",`flex relative h-full rounded-md p-${T} border border-4 border-opacity-75`,B&&!l?"bg-gray-50 dark:bg-gray-900":"",d?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",!V&&!F&&!S?"border-transparent":"",b?"overflow-hidden":"",V?"bg-gray-50 dark:bg-gray-900":"",V&&!F?"border-primary":"",F?"border-green-500 ":"",S?"border-red-500":""),style:{justifyContent:N,alignItems:l||!K?"center":void 0,width:g??"100%",textAlign:A},tabIndex:a||l?void 0:0,onFocus:G,onMouseEnter:H,onMouseMove:H,onMouseLeave:Z,children:[n.jsxs(ie,{children:[I&&!O&&t,(!I||O)&&n.jsx(r3,{fullHeight:I??!1,justifyContent:N,scrollable:oe??!1,faded:O,children:!I&&n.jsx("div",{ref:w,style:{display:"flex",width:"100%",justifyContent:N,height:I?"100%":void 0},children:t})})]}),c,l&&B&&s&&n.jsx("div",{className:"absolute top-1 right-1 text-xs",children:n.jsx(_e,{title:s,children:n.jsx(Ec,{size:"smallest",color:"disabled",className:"text-gray-500"})})})]})},(e,t)=>e.error===t.error&&e.value===t.value&&e.disabled===t.disabled&&e.saved===t.saved&&e.allowScroll===t.allowScroll&&e.align===t.align&&e.size===t.size&&e.disabledTooltip===t.disabledTooltip&&e.width===t.width&&e.showExpandIcon===t.showExpandIcon&&e.removePadding===t.removePadding&&e.fullHeight===t.fullHeight&&e.selected===t.selected);function t3(e){return e.dataType==="string"&&e.storage?!0:e.dataType==="array"?Array.isArray(e.of)?!1:e.of?.dataType==="string"&&e.of?.storage:!1}const c3=f.memo(function({propertyKey:t,customFieldValidator:c,value:i,property:a,align:l,width:s,height:d,path:u,entity:A,readonly:y,disabled:h}){const I=ne(),{onValueChange:_,size:g,selectedCell:b,select:p,setPopupCell:w}=F3(),k=b?.propertyKey===t&&b?.entity.path===A.path&&b?.entity.id===A.id,[v,K]=f.useState(i),m=f.useRef(i),[C,B]=f.useState(),[P,F]=f.useState(!1),D=f.useCallback(()=>{F(!0),setTimeout(()=>{F(!1)},100)},[]),S=!!a.Field,T=!!a.Preview,N=Cn(a),q=typeof a.disabled=="object"?a.disabled.disabledMessage:void 0,G=y||h||!!a.disabled,V=f.useMemo(()=>so({property:a,entityId:A.id,customFieldValidator:c,name:t}),[A.id,a,t]);f.useEffect(()=>{de(i,m.current)||(B(void 0),K(i),m.current=i,D())},[D,i]);const oe=Y=>{F(!1),V.validate(Y).then(()=>{B(void 0),_&&_({value:Y,propertyKey:t,setError:B,onValueUpdated:D,entity:A,fullPath:u,context:I})}).catch(x=>{B(x)})};f.useEffect(()=>{V.validate(v).then(()=>B(void 0)).catch(Y=>{B(Y)})},[v,V]);const O=Y=>{let x;Y===void 0?x=null:x=Y,m.current=x,K(x),oe(x)};Te({property:a,value:v,setValue:O});const H=f.useCallback(Y=>{p(Y?{width:s,height:d,entity:A,cellRect:Y,propertyKey:t}:void 0)},[A,d,t,p,s]),Z=Y=>{w&&w(Y?{width:s,height:d,entity:A,cellRect:Y,propertyKey:t}:void 0)};let L,W=!1,Q=!1,X=!0,ee=!1,U=!1,re=!0;const J=!G&&C;if(y||N)return n.jsx(bt,{size:g,width:s,saved:P,value:v,align:l??"left",fullHeight:!1,disabledTooltip:q??(N?"Read only":void 0),disabled:!0,children:n.jsx(Be,{width:s,height:Ln(g),propertyKey:t,property:a,entity:A,value:i,size:ln(g)})},`${t}_${A.path}_${A.id}`);if(!S&&(!T||k)){if(t3(a))L=n.jsx(e3,{error:C,disabled:G,focused:k,selected:k,openPopup:w?Z:void 0,property:a,entity:A,path:u,value:v,previewSize:ln(g),updateValue:O,propertyKey:t}),re=!1,Q=!0,U=!0,ee=!0;else if(k&&a.dataType==="number"){const x=a;x.enumValues?(L=n.jsx(It,{name:t,multiple:!1,disabled:G,focused:k,valueType:"number",small:ln(g)!=="medium",enumValues:x.enumValues,error:C,internalValue:v,updateValue:O}),U=!0):(L=n.jsx(jz,{align:l,error:C,focused:k,disabled:G,value:v,updateValue:O}),W=!0)}else if(k&&a.dataType==="string"){const x=a;if(x.enumValues)L=n.jsx(It,{name:t,multiple:!1,focused:k,disabled:G,valueType:"string",small:ln(g)!=="medium",enumValues:x.enumValues,error:C,internalValue:v,updateValue:O}),U=!0;else if(!x.storage){const ge=!!x.multiline||!!x.markdown;L=n.jsx($z,{error:C,disabled:G,multiline:ge,focused:k,value:v,updateValue:O}),W=!0}}else if(a.dataType==="boolean")L=n.jsx(qz,{error:C,disabled:G,focused:k,internalValue:v,updateValue:O});else if(a.dataType==="date")L=n.jsx(Jz,{name:t,error:C,disabled:G,mode:a.mode,focused:k,internalValue:v,updateValue:O}),U=!0,X=!1,W=!1;else if(a.dataType==="reference")typeof a.path=="string"&&(L=n.jsx(Hi,{name:t,internalValue:v,updateValue:O,disabled:G,size:g,path:a.path,multiselect:!1,previewProperties:a.previewProperties,title:a.name,forceFilter:a.forceFilter})),W=!1;else if(a.dataType==="array"){const x=a;if(!x.of&&!x.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);x.of&&!Array.isArray(x.of)&&(x.of.dataType==="string"||x.of.dataType==="number"?k&&x.of.enumValues&&(L=n.jsx(It,{name:t,multiple:!0,disabled:G,focused:k,small:ln(g)!=="medium",valueType:x.of.dataType,enumValues:x.of.enumValues,error:C,internalValue:v,updateValue:O}),W=!0,U=!0,X=!1):x.of.dataType==="reference"&&(typeof x.of.key=="string"&&(L=n.jsx(Hi,{name:t,disabled:G,internalValue:v,updateValue:O,size:g,multiselect:!0,path:x.of.key,previewProperties:x.of.previewProperties,title:x.of.name,forceFilter:x.of.forceFilter})),W=!1))}}return L||(W=!1,Q=k&&!L&&!G&&!N,L=n.jsx(Be,{width:s,height:d,entity:A,propertyKey:t,value:v,property:a,size:ln(g)})),n.jsx(bt,{size:g,width:s,onSelect:H,selected:k,disabled:G||N,disabledTooltip:q??"Disabled",removePadding:ee,fullHeight:U,saved:P,error:C,align:l,allowScroll:W,showExpandIcon:Q,value:v,hideOverflow:X,actions:re&&n.jsx(zi,{showError:J,disabled:G,showExpandIcon:Q,selected:k,openPopup:G?void 0:Z}),children:L},`cell_${t}_${A.path}_${A.id}`)},i3);function i3(e,t){return e.height===t.height&&e.propertyKey===t.propertyKey&&e.align===t.align&&e.width===t.width&&de(e.property,t.property)&&de(e.value,t.value)&&de(e.entity.values,t.entity.values)}function fo({text:e,...t}){return n.jsx("div",{className:"flex w-full h-screen max-h-full max-w-full bg-gray-50 dark:bg-gray-900 gap-4",children:n.jsxs("div",{className:"m-auto flex flex-col gap-2 items-center",children:[n.jsx(Gn,{...t}),e&&n.jsx(j,{color:"secondary",variant:"caption",className:"text-center",children:e})]})})}function Ui({trigger:e,children:t,open:c,onOpenChange:i,side:a,sideOffset:l=5,align:s,alignOffset:d,arrowPadding:u,sticky:A,hideWhenDetached:y,avoidCollisions:h,enabled:I=!0}){return Dn("Popover",a3),I?n.jsxs(Xn.Root,{open:c,onOpenChange:i,children:[n.jsx(Xn.Trigger,{asChild:!0,children:e}),n.jsx(Xn.Portal,{children:n.jsxs(Xn.Content,{className:E(Ge,"PopoverContent shadow z-50"),side:a,sideOffset:l,align:s,alignOffset:d,arrowPadding:u,sticky:A,hideWhenDetached:y,avoidCollisions:h,children:[t,n.jsx(Xn.Arrow,{className:"fill-white dark:fill-gray-950"})]})})]}):n.jsx(n.Fragment,{children:e})}const a3=`
682
+ `))&&A(_)},onFocus:()=>{y.current=!0},onBlur:()=>{y.current=!1,h()}})}function It(e){const{name:t,enumValues:c,error:i,internalValue:a,disabled:l,small:s,focused:d,updateValue:u,multiple:A,valueType:y}=e,h=Array.isArray(a)&&A||!Array.isArray(a)&&!A,I=f.useRef(null);f.useEffect(()=>{I.current&&d&&I.current?.focus({preventScroll:!0})},[d,I]);const _=f.useCallback(b=>{if(y==="number")if(A){const p=b.map(w=>parseFloat(w));u(p)}else u(parseFloat(b));else if(y==="string")u(b||null);else throw Error("Missing mapping in TableSelect")},[A,u,y]),g=(b,p)=>A&&Array.isArray(b)?n.jsx(Qr,{value:b,name:t,enumValues:c,size:s?"small":"medium"},`${b}-${p}`):n.jsx(Ee,{enumKey:b,enumValues:c,size:s?"small":"medium"},`${b}-${p}`);return A?n.jsx(Ur,{inputRef:I,containerClassName:"w-full h-full",className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:l,padding:!1,includeFocusOutline:!1,value:h?a.map(b=>b.toString()):[],onMultiValueChange:_,renderValue:g,children:c?.map(b=>n.jsx(Yr,{value:String(b.id),children:n.jsx(Ee,{enumKey:b.id,enumValues:c,size:s?"small":"medium"})},b.id))}):n.jsx(Xe,{inputRef:I,className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:l,multiple:A,padding:!1,includeFocusOutline:!1,value:h?A?a.map(b=>b.toString()):a?.toString():A?[]:"",onValueChange:_,onMultiValueChange:_,renderValue:g,children:c?.map(b=>n.jsx(xe,{value:String(b.id),children:n.jsx(Ee,{enumKey:b.id,enumValues:c,size:s?"small":"medium"})},b.id))})}function jz(e){const{align:t,value:c,updateValue:i,focused:a}=e,l=c&&typeof c=="number"?c.toString():"",[s,d]=f.useState(l),u=f.useRef(c);f.useEffect(()=>{u.current!==c&&String(c)!==s&&d(c?c.toString():null),u.current=c},[c]);const A=f.useCallback(()=>{if(s!==l)if(s!=null){const I=parseFloat(s);if(isNaN(I))return;I!=null&&i(I)}else i(null)},[s,c]);Oo(s,A,!a,2e3),f.useEffect(()=>{!a&&l!==s&&d(c!=null?c.toString():null)},[c,a]);const y=f.useRef(null);f.useEffect(()=>{y.current&&a&&y.current.focus({preventScroll:!0})},[a,y]);const h=/^-?[0-9]+[,.]?[0-9]*$/;return n.jsx("input",{ref:y,className:"w-full text-right p-0 m-0 bg-transparent border-none resize-none outline-none font-normal leading-normal text-unset",style:{textAlign:t},value:s??"",onChange:I=>{const _=I.target.value.replace(",",".");_.length===0&&d(null),(h.test(_)||_.startsWith("-"))&&d(_)}})}function qz(e){const{internalValue:t,updateValue:c,focused:i}=e,a=f.useRef(null);return f.useEffect(()=>{a.current&&i&&a.current.focus({preventScroll:!0})},[i,a]),n.jsx(Zr,{ref:a,size:"small",value:!!t,onValueChange:c})}function Jz(e){const{disabled:t,error:c,mode:i,internalValue:a,updateValue:l}=e;return n.jsx(Vn,{value:a??void 0,onChange:s=>l(s),size:"medium",invisible:!0,className:"w-full h-full",inputClassName:"w-full h-full",mode:i})}function zi({showError:e,disabled:t,showExpandIcon:c,selected:i,openPopup:a,children:l}){const s=f.useRef(null),d=f.useCallback(()=>{if(a){const A=s&&s?.current?.getBoundingClientRect();a(A)}},[]),u=f.useRef();return f.useEffect(()=>{u.current&&i&&u.current.focus({preventScroll:!0})},[i]),n.jsx(n.Fragment,{children:(e||!t&&c)&&n.jsxs("div",{ref:s,className:"absolute top-0.5 right-0.5 flex items-center",children:[i&&l,i&&!t&&c&&n.jsx(R,{ref:u,color:"inherit",size:"small",onClick:d,children:n.jsxs("svg",{fill:"#888",width:"20",height:"20",viewBox:"0 0 24 24",children:[n.jsx("path",{className:"cls-2",d:"M20,5a1,1,0,0,0-1-1L14,4h0a1,1,0,0,0,0,2h2.57L13.29,9.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L18,7.42V10a1,1,0,0,0,1,1h0a1,1,0,0,0,1-1Z"}),n.jsx("path",{className:"cls-2",d:"M10.71,13.29a1,1,0,0,0-1.42,0L6,16.57V14a1,1,0,0,0-1-1H5a1,1,0,0,0-1,1l0,5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2H7.42l3.29-3.29A1,1,0,0,0,10.71,13.29Z"})]})}),e&&n.jsx(Vi,{side:"left",className:"flex items-center justify-center",style:{width:32,height:32},title:e.message,children:n.jsx(yc,{size:"small",color:"error"})})]})})}const Zz="max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",Xz="pt-0 border-2 border-solid",xz="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500 bg-green-50 dark:bg-green-900",Rz="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500 bg-red-50 dark:bg-red-900";function e3(e){const{propertyKey:t,error:c,selected:i,openPopup:a,value:l,disabled:s,property:d,entity:u,path:A,previewSize:y,updateValue:h}=e,I=Bn(),{internalValue:_,setInternalValue:g,onFilesAdded:b,storage:p,onFileUploadComplete:w,storagePathBuilder:k,multipleFilesSupported:v}=di({entityValues:u.values,entityId:u.id,path:A,property:d,propertyKey:t,storageSource:I,onChange:h,value:l,disabled:s});return n.jsx(n3,{internalValue:_,setInternalValue:g,name:t,disabled:s,autoFocus:!1,openPopup:a,error:c,selected:i,property:d,onChange:h,entity:u,storagePathBuilder:k,storage:p,multipleFilesSupported:v,onFilesAdded:b,onFileUploadComplete:w,previewSize:y})}function n3({property:e,name:t,internalValue:c,setInternalValue:i,openPopup:a,entity:l,selected:s,error:d,onChange:u,multipleFilesSupported:A,previewSize:y,disabled:h,autoFocus:I,storage:_,onFilesAdded:g,onFileUploadComplete:b,storagePathBuilder:p}){const[w,k]=f.useState(!1),v=A&&y==="medium"?"small":y;if(A){const O=e;if(Array.isArray(O.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(O.of){if(O.of.dataType!=="string")throw Error("Storage field using array must be of data type string")}else throw Error("Storage field using array must be of data type string")}const K=_?.metadata,m=!!c,C=an(),{open:B,getRootProps:P,getInputProps:F,isDragActive:D,isDragAccept:S,isDragReject:T}=Ro.useDropzone({accept:_.acceptedFiles?_.acceptedFiles.map(O=>({[O]:[]})).reduce((O,H)=>({...O,...H}),{}):void 0,disabled:h,maxSize:_.maxSize,noClick:!0,noKeyboard:!0,onDrop:g,onDropRejected:(O,H)=>{for(const Z of O)for(const L of Z.errors)C.open({type:"error",message:`Error uploading file: File is larger than ${_.maxSize} bytes`})}}),{...N}=P(),q=A?"Drag 'n' drop some files here, or click here to edit":"Drag 'n' drop a file here, or click here edit",z=A?e.of:e,V=f.useMemo(()=>Pn(v),[v]),oe=!h&&d;return n.jsxs("div",{...N,onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>k(!1),className:E(Zz,"relative w-full h-full flex",`justify-${m?"start":"center"}`,D?Xz:"",S?xz:"",T?Rz:""),children:[n.jsx("input",{autoFocus:I,...F()}),c.map((O,H)=>{let Z;return O.storagePathOrDownloadUrl?Z=n.jsx(o3,{property:z,value:O.storagePathOrDownloadUrl,entity:l,size:v},`storage_preview_${H}`):O.file&&(Z=n.jsx(_i,{entry:O,metadata:K,storagePath:p(O.file),onFileUploadComplete:b,imageSize:V,simple:!0},`storage_progress_${H}`)),Z}),!c&&n.jsx("div",{className:"flex-grow m-2 max-w-[200px]",onClick:B,children:n.jsx(j,{className:"text-gray-400 dark:text-gray-600",variant:"body2",align:"center",children:q})}),n.jsx(zi,{showError:oe,disabled:h,showExpandIcon:!0,selected:s,openPopup:h?void 0:a,children:n.jsx(R,{color:"inherit",size:"small",onClick:B,children:n.jsx(Ac,{size:"small",className:"text-gray-500"})})})]})}function o3({property:e,value:t,size:c,entity:i}){return n.jsx("div",{className:"relative m-2",children:t&&n.jsx(ie,{children:n.jsx(Be,{propertyKey:"ignore",value:t,property:e,entity:i,size:c})})})}function Hi(e){const{name:t,internalValue:c,updateValue:i,multiselect:a,path:l,size:s,previewProperties:d,title:u,disabled:A,forceFilter:y}=e,[h,I]=f.useState(!1),_=f.useCallback(()=>I(!0),[]),g=f.useCallback(()=>I(!1),[]),p=fe().getCollection(l);if(!p)throw Error(`Couldn't find the corresponding collection view for the path: ${l}`);const w=f.useCallback(F=>{i(F?hn(F):null)},[i]),k=f.useCallback(F=>{i(F.map(D=>hn(D)))},[i]),v=c?Array.isArray(c)?c.map(F=>F.id):c.id?[c.id]:[]:[],K=io({multiselect:a,path:l,collection:p,onMultipleEntitiesSelected:k,onSingleEntitySelected:w,selectedEntityIds:v,forceFilter:y}),m=f.useCallback(()=>{A||K.open()},[A,K]),C=!c||Array.isArray(c)&&c.length===0,B=()=>c instanceof je?n.jsx(nn,{onClick:A?void 0:m,size:ln(s),reference:c,onHover:h,disabled:!l,previewProperties:d}):n.jsx(Po,{onClick:A?void 0:m,size:ln(s),children:n.jsx(we,{title:"Value is not a reference.",error:"Click to edit"})}),P=()=>Array.isArray(c)?n.jsx(n.Fragment,{children:c.map((F,D)=>n.jsx("div",{className:"m-1 w-full",children:n.jsx(nn,{onClick:A?void 0:m,size:"tiny",reference:F,onHover:h,disabled:!l,previewProperties:d})},`preview_array_ref_${t}_${D}`))}):n.jsx(we,{error:"Data is not an array of references"});return p?n.jsxs("div",{className:"w-full",onMouseEnter:_,onMouseMove:_,onMouseLeave:g,children:[c&&!a&&B(),c&&a&&P(),C&&n.jsxs(te,{onClick:m,size:"small",variant:"outlined",color:"primary",children:["Edit ",u]})]}):n.jsx(we,{error:"The specified collection does not exist"})}function Ln(e){switch(e){case"xl":return 400;case"l":return 280;case"m":return 140;case"s":return 80;case"xs":return 54;default:throw Error("Missing mapping for collection size -> height")}}const r3=({justifyContent:e,scrollable:t,faded:c,fullHeight:i,children:a})=>n.jsx("div",{className:E("flex flex-col max-h-full w-full",{"items-start":c||t}),style:{justifyContent:e,height:i?"100%":void 0,overflow:t?"auto":void 0,WebkitMaskImage:c?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0,maskImage:c?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0},children:a}),bt=f.memo(function({children:t,actions:c,size:i,selected:a,disabled:l,disabledTooltip:s,saved:d,error:u,align:A,allowScroll:y,removePadding:h,fullHeight:I,onSelect:_,width:g,hideOverflow:b=!0,showExpandIcon:p=!0}){const[w,k]=er(),v=f.useRef(null);Do(v,()=>{a&&_&&_(void 0)},!!(a&&_));const[K,m]=f.useState(!1),C=f.useMemo(()=>Ln(i),[i]),[B,P]=f.useState(!1),[F,D]=f.useState(d),S=!l&&u;f.useEffect(()=>{d&&D(!0);const L=setTimeout(()=>{D(!1)},800);return()=>{clearTimeout(L)}},[d]);let T=0;if(!h)switch(i){case"l":case"xl":T=4;break;case"m":T=2;break;case"s":default:T=1;break}let N;switch(A){case"right":N="flex-end";break;case"center":N="center";break;case"left":default:N="flex-start"}const q=f.useCallback(()=>{if(!_)return;const L=v&&v?.current?.getBoundingClientRect();l?_(void 0):!a&&L&&_(L)},[v,_,a,l]),z=f.useCallback(L=>{q(),L.stopPropagation()},[q]);f.useEffect(()=>{if(k){const L=k.height>C;K!==L&&m(L)}},[k,K,C]);const V=!S&&a,oe=!l&&y&&K,O=!l&&!y&&K,H=f.useCallback(()=>P(!0),[]),Z=f.useCallback(()=>P(!1),[]);return n.jsxs("div",{ref:v,className:E("transition-colors duration-100 ease-in-out",`flex relative h-full rounded-md p-${T} border border-4 border-opacity-75`,B&&!l?"bg-gray-50 dark:bg-gray-900":"",d?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",!V&&!F&&!S?"border-transparent":"",b?"overflow-hidden":"",V?"bg-gray-50 dark:bg-gray-900":"",V&&!F?"border-primary":"",F?"border-green-500 ":"",S?"border-red-500":""),style:{justifyContent:N,alignItems:l||!K?"center":void 0,width:g??"100%",textAlign:A},tabIndex:a||l?void 0:0,onFocus:z,onMouseEnter:H,onMouseMove:H,onMouseLeave:Z,children:[n.jsxs(ie,{children:[I&&!O&&t,(!I||O)&&n.jsx(r3,{fullHeight:I??!1,justifyContent:N,scrollable:oe??!1,faded:O,children:!I&&n.jsx("div",{ref:w,style:{display:"flex",width:"100%",justifyContent:N,height:I?"100%":void 0},children:t})})]}),c,l&&B&&s&&n.jsx("div",{className:"absolute top-1 right-1 text-xs",children:n.jsx(_e,{title:s,children:n.jsx(Ec,{size:"smallest",color:"disabled",className:"text-gray-500"})})})]})},(e,t)=>e.error===t.error&&e.value===t.value&&e.disabled===t.disabled&&e.saved===t.saved&&e.allowScroll===t.allowScroll&&e.align===t.align&&e.size===t.size&&e.disabledTooltip===t.disabledTooltip&&e.width===t.width&&e.showExpandIcon===t.showExpandIcon&&e.removePadding===t.removePadding&&e.fullHeight===t.fullHeight&&e.selected===t.selected);function t3(e){return e.dataType==="string"&&e.storage?!0:e.dataType==="array"?Array.isArray(e.of)?!1:e.of?.dataType==="string"&&e.of?.storage:!1}const c3=f.memo(function({propertyKey:t,customFieldValidator:c,value:i,property:a,align:l,width:s,height:d,path:u,entity:A,readonly:y,disabled:h}){const I=ne(),{onValueChange:_,size:g,selectedCell:b,select:p,setPopupCell:w}=F3(),k=b?.propertyKey===t&&b?.entity.path===A.path&&b?.entity.id===A.id,[v,K]=f.useState(i),m=f.useRef(i),[C,B]=f.useState(),[P,F]=f.useState(!1),D=f.useCallback(()=>{F(!0),setTimeout(()=>{F(!1)},100)},[]),S=!!a.Field,T=!!a.Preview,N=Cn(a),q=typeof a.disabled=="object"?a.disabled.disabledMessage:void 0,z=y||h||!!a.disabled,V=f.useMemo(()=>so({property:a,entityId:A.id,customFieldValidator:c,name:t}),[A.id,a,t]);f.useEffect(()=>{de(i,m.current)||(B(void 0),K(i),m.current=i,D())},[D,i]);const oe=Y=>{F(!1),V.validate(Y).then(()=>{B(void 0),_&&_({value:Y,propertyKey:t,setError:B,onValueUpdated:D,entity:A,fullPath:u,context:I})}).catch(x=>{B(x)})};f.useEffect(()=>{V.validate(v).then(()=>B(void 0)).catch(Y=>{B(Y)})},[v,V]);const O=Y=>{let x;Y===void 0?x=null:x=Y,m.current=x,K(x),oe(x)};Te({property:a,value:v,setValue:O});const H=f.useCallback(Y=>{p(Y?{width:s,height:d,entity:A,cellRect:Y,propertyKey:t}:void 0)},[A,d,t,p,s]),Z=Y=>{w&&w(Y?{width:s,height:d,entity:A,cellRect:Y,propertyKey:t}:void 0)};let L,W=!1,Q=!1,X=!0,ee=!1,U=!1,re=!0;const J=!z&&C;if(y||N)return n.jsx(bt,{size:g,width:s,saved:P,value:v,align:l??"left",fullHeight:!1,disabledTooltip:q??(N?"Read only":void 0),disabled:!0,children:n.jsx(Be,{width:s,height:Ln(g),propertyKey:t,property:a,entity:A,value:i,size:ln(g)})},`${t}_${A.path}_${A.id}`);if(!S&&(!T||k)){if(t3(a))L=n.jsx(e3,{error:C,disabled:z,focused:k,selected:k,openPopup:w?Z:void 0,property:a,entity:A,path:u,value:v,previewSize:ln(g),updateValue:O,propertyKey:t}),re=!1,Q=!0,U=!0,ee=!0;else if(k&&a.dataType==="number"){const x=a;x.enumValues?(L=n.jsx(It,{name:t,multiple:!1,disabled:z,focused:k,valueType:"number",small:ln(g)!=="medium",enumValues:x.enumValues,error:C,internalValue:v,updateValue:O}),U=!0):(L=n.jsx(jz,{align:l,error:C,focused:k,disabled:z,value:v,updateValue:O}),W=!0)}else if(k&&a.dataType==="string"){const x=a;if(x.enumValues)L=n.jsx(It,{name:t,multiple:!1,focused:k,disabled:z,valueType:"string",small:ln(g)!=="medium",enumValues:x.enumValues,error:C,internalValue:v,updateValue:O}),U=!0;else if(!x.storage){const ge=!!x.multiline||!!x.markdown;L=n.jsx($z,{error:C,disabled:z,multiline:ge,focused:k,value:v,updateValue:O}),W=!0}}else if(a.dataType==="boolean")L=n.jsx(qz,{error:C,disabled:z,focused:k,internalValue:v,updateValue:O});else if(a.dataType==="date")L=n.jsx(Jz,{name:t,error:C,disabled:z,mode:a.mode,focused:k,internalValue:v,updateValue:O}),U=!0,X=!1,W=!1;else if(a.dataType==="reference")typeof a.path=="string"&&(L=n.jsx(Hi,{name:t,internalValue:v,updateValue:O,disabled:z,size:g,path:a.path,multiselect:!1,previewProperties:a.previewProperties,title:a.name,forceFilter:a.forceFilter})),W=!1;else if(a.dataType==="array"){const x=a;if(!x.of&&!x.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);x.of&&!Array.isArray(x.of)&&(x.of.dataType==="string"||x.of.dataType==="number"?k&&x.of.enumValues&&(L=n.jsx(It,{name:t,multiple:!0,disabled:z,focused:k,small:ln(g)!=="medium",valueType:x.of.dataType,enumValues:x.of.enumValues,error:C,internalValue:v,updateValue:O}),W=!0,U=!0,X=!1):x.of.dataType==="reference"&&(typeof x.of.key=="string"&&(L=n.jsx(Hi,{name:t,disabled:z,internalValue:v,updateValue:O,size:g,multiselect:!0,path:x.of.key,previewProperties:x.of.previewProperties,title:x.of.name,forceFilter:x.of.forceFilter})),W=!1))}}return L||(W=!1,Q=k&&!L&&!z&&!N,L=n.jsx(Be,{width:s,height:d,entity:A,propertyKey:t,value:v,property:a,size:ln(g)})),n.jsx(bt,{size:g,width:s,onSelect:H,selected:k,disabled:z||N,disabledTooltip:q??"Disabled",removePadding:ee,fullHeight:U,saved:P,error:C,align:l,allowScroll:W,showExpandIcon:Q,value:v,hideOverflow:X,actions:re&&n.jsx(zi,{showError:J,disabled:z,showExpandIcon:Q,selected:k,openPopup:z?void 0:Z}),children:L},`cell_${t}_${A.path}_${A.id}`)},i3);function i3(e,t){return e.height===t.height&&e.propertyKey===t.propertyKey&&e.align===t.align&&e.width===t.width&&de(e.property,t.property)&&de(e.value,t.value)&&de(e.entity.values,t.entity.values)}function fo({text:e,...t}){return n.jsx("div",{className:"flex w-full h-screen max-h-full max-w-full bg-gray-50 dark:bg-gray-900 gap-4",children:n.jsxs("div",{className:"m-auto flex flex-col gap-2 items-center",children:[n.jsx(Gn,{...t}),e&&n.jsx(j,{color:"secondary",variant:"caption",className:"text-center",children:e})]})})}function Ui({trigger:e,children:t,open:c,onOpenChange:i,side:a,sideOffset:l=5,align:s,alignOffset:d,arrowPadding:u,sticky:A,hideWhenDetached:y,avoidCollisions:h,enabled:I=!0}){return Dn("Popover",a3),I?n.jsxs(Xn.Root,{open:c,onOpenChange:i,children:[n.jsx(Xn.Trigger,{asChild:!0,children:e}),n.jsx(Xn.Portal,{children:n.jsxs(Xn.Content,{className:E(Ge,"PopoverContent shadow z-50"),side:a,sideOffset:l,align:s,alignOffset:d,arrowPadding:u,sticky:A,hideWhenDetached:y,avoidCollisions:h,children:[t,n.jsx(Xn.Arrow,{className:"fill-white dark:fill-gray-950"})]})})]}):n.jsx(n.Fragment,{children:e})}const a3=`
683
683
 
684
684
  .PopoverContent {
685
685
  animation-duration: 400ms;
@@ -746,7 +746,7 @@
746
746
  `,l3=e=>{switch(e){case"primary":return"bg-primary";case"secondary":return"bg-secondary";case"error":return"bg-red-500";default:return"bg-gray-300 dark:bg-gray-700"}},Yi=({color:e="primary",invisible:t=!1,children:c})=>n.jsxs("div",{className:"relative inline-block",children:[c,n.jsx("span",{className:`absolute top-0 right-0 transform translate-x-1/2 -translate-y-1/2 rounded-full
747
747
  ${l3(e)}
748
748
  transition-all duration-200 ease-out
749
- ${t?"w-0 h-0":"w-2 h-2"}`})]}),s3=f.memo(function({resizeHandleRef:t,columnIndex:c,isResizingIndex:i,sort:a,onColumnSort:l,onFilterUpdate:s,filter:d,column:u,onClickResizeColumn:A,createFilterField:y}){const[h,I]=f.useState(!1),[_,g]=f.useState(!1),b=f.useCallback(K=>{g(!0)},[]),p=f.useCallback((K,m)=>{s(u,K),m!==void 0&&g(m)},[u,s]),w=i===c,v=!(i!==c&&i>0)&&(h||w);return n.jsx(ie,{children:n.jsxs("div",{className:E("flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-gray-50 dark:bg-gray-900","text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200 ","hover:bg-gray-100 dark:hover:bg-gray-800 hover:bg-opacity-50 dark:hover:bg-opacity-50",u.frozen?"sticky left-0 z-10":"relative z-0"),style:{left:u.frozen?0:void 0,minWidth:u.width,maxWidth:u.width},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>I(!1),children:[n.jsx("div",{className:"overflow-hidden flex-grow",children:n.jsxs("div",{className:`flex items-center justify-${u.headerAlign} flex-row`,children:[u.icon&&u.icon(h||_),n.jsx("div",{className:"truncate -webkit-box w-full mx-1 overflow-hidden",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:2,justifyContent:u.align},children:u.title})]})}),u.sortable&&(a||v||_)&&n.jsx(Yi,{color:"secondary",invisible:!a,children:n.jsxs(R,{size:"small",className:h||_?"bg-white dark:bg-gray-950":void 0,onClick:()=>{l(u.key)},children:[!a&&n.jsx(So,{}),a==="asc"&&n.jsx(So,{}),a==="desc"&&n.jsx(So,{className:"rotate-180"})]})}),u.filter&&y&&n.jsx("div",{children:n.jsx(Yi,{color:"secondary",invisible:!d,children:n.jsx(Ui,{open:_,onOpenChange:g,trigger:n.jsx(R,{className:h||_?"bg-white dark:bg-gray-950":void 0,size:"small",onClick:b,children:n.jsx(oo,{})}),children:u.filter&&n.jsx(d3,{column:u,filter:d,onHover:h,onFilterUpdate:p,createFilterField:y,popupOpen:_,setPopupOpen:g})})})}),u.resizable&&n.jsx("div",{ref:t,className:E("absolute h-full w-[6px] top-0 right-0 cursor-col-resize",v&&"bg-gray-300 dark:bg-gray-700"),onMouseDown:A?()=>A(c,u):void 0})]})})},de);function d3({column:e,onFilterUpdate:t,filter:c,onHover:i,createFilterField:a,popupOpen:l,setPopupOpen:s}){const d=e.key,[u,A]=f.useState(c);if(f.useEffect(()=>{A(c)},[c]),!e.filter)return null;const y=()=>{t(u,!1)},h=g=>{t(void 0,!1)},I=!!c,_=a({id:d,filterValue:u,setFilterValue:A,column:e,popupOpen:l,setPopupOpen:s});return _?n.jsxs("div",{className:E("text-gray-900 dark:text-white"),children:[n.jsx("div",{className:E(ue,"py-4 px-6 text-xs font-semibold uppercase border-b"),children:e.title??d}),_&&n.jsx("div",{className:"m-4",children:_}),n.jsxs("div",{className:"flex justify-end m-4",children:[n.jsx(te,{className:"mr-4",disabled:!I,variant:"text",color:"primary",type:"reset","aria-label":"filter clear",onClick:h,children:"Clear"}),n.jsx(te,{variant:"outlined",color:"primary",onClick:y,children:"Filter"})]})]}):null}const u3=({columns:e,currentSort:t,onColumnSort:c,onFilterUpdate:i,sortByProperty:a,filter:l,onColumnResize:s,onColumnResizeEnd:d,createFilterField:u})=>{const A=e.map(()=>f.createRef()),[y,h]=f.useState(-1),I=f.useCallback((K,m,C)=>{const B=e[K],P=100,F=800,D=m>F?F:m<P?P:m,S={width:D,key:B.key,column:{...B,width:D}};C?d(S):s(S)},[e,s,d]),_=f.useCallback(K=>{if(y>=0){const m=A[y].current?.parentElement?.getBoundingClientRect().left;return m?K.clientX-m:void 0}},[A,y]),g=f.useCallback(K=>{document.body.style.cursor=K?"col-resize":"auto"},[]),b=f.useCallback(K=>{K.stopPropagation(),K.preventDefault();const m=_(K);m&&I(y,m,!1)},[I,_,y]),p=f.useCallback(K=>{K.stopPropagation(),K.preventDefault();const m=_(K);m&&I(y,m,!0),h(-1),g(!1)},[I,_,y,g]),w=f.useCallback(()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",p)},[b,p]),k=f.useCallback(()=>{document.addEventListener("mousemove",b),document.addEventListener("mouseup",p)},[b,p]);f.useEffect(()=>(y>=0?k():w(),()=>{w()}),[k,y,w]);const v=f.useCallback(K=>{h(K),g(!0)},[g]);return n.jsx("div",{className:E(ue,"z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900"),children:e.map((K,m)=>{const C=e[m],B=C&&l&&l[C.key]?l[C.key]:void 0;return n.jsx(ie,{children:n.jsx(s3,{resizeHandleRef:A[m],columnIndex:m,isResizingIndex:y,onFilterUpdate:i,filter:B,sort:a===C.key?t:void 0,onColumnSort:c,onClickResizeColumn:v,column:C,createFilterField:u})},"header_"+C.key)})})},f3=f.memo(function({rowData:t,rowIndex:c,children:i,onRowClick:a,size:l,style:s,hoverRow:d,rowClassName:u}){const A=f.useCallback(y=>a?a({rowData:t,rowIndex:c,event:y}):void 0,[a,t,c]);return n.jsx("div",{className:E("flex min-w-full text-sm border-b border-gray-200 dark:border-gray-800 border-opacity-40 dark:border-opacity-40",u?u(t):"",{"hover:bg-opacity-95":d,"cursor-pointer":a}),onClick:A,style:{...s,height:Ln(l),width:"fit-content"},children:i})},de),A3=f.memo(function(t){return t.rowData&&t.cellRenderer({cellData:t.cellData,rowData:t.rowData,rowIndex:t.rowIndex,isScrolling:!1,column:t.column,columns:t.columns,columnIndex:t.columnIndex,width:t.column.width})},(e,t)=>de(e,t)),Ho=f.createContext({});Ho.displayName="VirtualListContext";const _3=f.forwardRef(({children:e,...t},c)=>n.jsx(Ho.Consumer,{children:i=>{const a=i.customView;return n.jsxs(n.Fragment,{children:[n.jsx("div",{id:"virtual-table",style:{position:"relative",height:"100%"},children:n.jsxs("div",{ref:c,...t,style:{...t?.style,minHeight:"100%",position:"relative"},children:[n.jsx(u3,{...i}),!a&&e]})}),a&&n.jsx("div",{style:{position:"sticky",top:"56px",flexGrow:1,height:"calc(100% - 56px)",marginTop:"calc(56px - 100vh)",left:0},children:a})]})}})),$i=f.memo(function({data:t,onResetPagination:c,onEndReached:i,size:a="m",columns:l,onRowClick:s,onColumnResize:d,filter:u,checkFilterCombination:A,onFilterUpdate:y,sortBy:h,error:I,emptyMessage:_,onSortByUpdate:g,loading:b,cellRenderer:p,hoverRow:w,createFilterField:k,rowClassName:v,className:K,endAdornment:m}){const C=h?h[0]:void 0,B=h?h[1]:void 0,[P,F]=f.useState(l),D=f.useRef(null),S=f.useRef(0);f.useEffect(()=>{F(l)},[l]);const[T,N]=er(),q=f.useCallback(J=>{F(P.map(Y=>Y.key===J.column.key?J.column:Y))},[P]),G=f.useCallback(J=>{F(P.map(Y=>Y.key===J.column.key?J.column:Y)),d&&d(J)},[P,d]),V=f.useRef();f.useEffect(()=>{V.current=u},[u]);const oe=f.useCallback(()=>{S.current=0,D.current&&D.current.scrollTo(D.current?.scrollLeft,0)},[]),O=f.useCallback(J=>{const Y=C===J&&B==="desc",ge=C===J&&B==="asc"?"desc":Y?void 0:"asc",He=Y?void 0:J,ve=V.current,fn=ge&&He?[He,ge]:void 0;ve&&A&&!A(ve,fn)&&y&&y(void 0),c&&c(),g&&g(fn),oe()},[A,B,y,c,g,oe,C]),H=f.useCallback(()=>{S.current=0,g&&g(void 0)},[g]),Z=Math.max((t?.length??0)*Ln(a)-N.height,0),L=f.useCallback(J=>{i&&(t?.length??0)>0&&J>S.current+500&&(S.current=J,i())},[t,i]),W=f.useCallback(({scrollOffset:J,scrollUpdateWasRequested:Y})=>{!Y&&J>=Z-500&&L(J)},[Z,L]),Q=f.useCallback((J,Y)=>{S.current=0;const x=V.current;let ge=x?{...x}:{};Y?ge[J.key]=Y:delete ge[J.key],!A||A(ge,C&&B?[C,B]:void 0)||(ge=Y?{[J.key]:Y}:{}),y&&y(ge),J.key!==C&&H()},[A,B,y,H,C]),X=f.useCallback(()=>n.jsxs("div",{className:"h-full flex flex-col items-center justify-center sticky left-0",children:[n.jsx(j,{variant:"h6",children:"Error fetching data from the data source"}),I?.message&&n.jsx(lo,{className:"px-4 break-all",source:I.message})]}),[I?.message]),ee=f.useCallback(()=>b?n.jsx(fo,{}):n.jsxs("div",{className:"flex overflow-auto items-center justify-center p-2 gap-2 h-full",children:[n.jsx(ic,{}),n.jsx(j,{children:_})]}),[_,b]),U=!b&&(t?.length??0)===0,re=I?X():U?ee():void 0;return n.jsx("div",{ref:T,className:E("h-full w-full",K),children:n.jsx(Ho.Provider,{value:{data:t,size:a,cellRenderer:p,columns:P,currentSort:B,onRowClick:s,customView:re,onColumnResize:q,onColumnResizeEnd:G,filter:V.current,onColumnSort:O,onFilterUpdate:Q,sortByProperty:C,hoverRow:w??!1,createFilterField:k,rowClassName:v,endAdornment:m},children:n.jsx(y3,{outerRef:D,width:N.width,height:N.height,itemCount:(t?.length??0)+(m?1:0),onScroll:W,itemSize:Ln(a)},a)})})},de);function y3({outerRef:e,width:t,height:c,itemCount:i,onScroll:a,itemSize:l}){const s=f.useCallback(({index:d,style:u})=>n.jsx(Ho.Consumer,{children:({onRowClick:A,data:y,columns:h,size:I="m",cellRenderer:_,hoverRow:g,rowClassName:b,endAdornment:p})=>{if(p&&d===(y??[]).length)return n.jsx("div",{style:{...u,height:"auto",position:"sticky",bottom:0,zIndex:1},children:p});const w=y&&y[d];return n.jsx(f3,{rowData:w,rowIndex:d,onRowClick:A,columns:h,hoverRow:g,rowClassName:b,style:{...u,top:`calc(${u.top}px + 48px)`},size:I,children:h.map((k,v)=>{const K=w&&w[k.key];return n.jsx(A3,{dataKey:k.key,cellRenderer:_,column:k,columns:h,rowData:w,cellData:K,rowIndex:d,columnIndex:v},`cell_${k.key}`)})},`row_${d}`)}}),[]);return n.jsx(Na.FixedSizeList,{outerRef:e,innerElementType:_3,width:t,height:c,overscanCount:4,itemCount:i,onScroll:a,itemSize:l,children:s})}function Qn({children:e,trigger:t,open:c,defaultOpen:i,onOpenChange:a}){return n.jsxs(Jn.Root,{open:c,defaultOpen:i,onOpenChange:a,children:[n.jsx(Jn.Trigger,{asChild:!0,children:t}),n.jsx(Jn.Portal,{children:n.jsx(Jn.Content,{className:E(Ge,"shadow py-2 z-30"),children:e})})]})}function me({children:e,dense:t,onClick:c}){return n.jsx(Jn.Item,{className:E(he,c&&"cursor-pointer","rounded-md px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-900 flex items-center gap-4"),onClick:c,children:e})}function pt({entity:e,width:t,frozen:c,isSelected:i,selectionEnabled:a,size:l,toggleEntitySelection:s,onCopyClicked:d,onEditClicked:u,onDeleteClicked:A,hideId:y}){const h=ze(),I=!!u,_=!!d,g=!!A,b=f.useCallback(v=>{s&&s(e)},[e,s]),p=f.useCallback(v=>{v.stopPropagation(),A&&A(e)},[e,A]),w=f.useCallback(v=>{v.stopPropagation(),d&&d(e)},[e,d]),k=f.useCallback(v=>{v.stopPropagation(),s&&s(e)},[e,s]);return n.jsxs("div",{onClick:k,className:E("h-full flex items-center justify-center flex-col bg-gray-50 dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-10",c?"sticky left-0":""),style:{width:t,position:c?"sticky":"initial",left:c?0:"initial",contain:"strict"},children:[(I||g||a)&&n.jsxs("div",{className:"w-34 flex justify-center",children:[I&&n.jsx(_e,{title:`Edit ${e.id}`,children:n.jsx(R,{onClick:v=>{v.stopPropagation(),u&&u(e)},size:h?"medium":"small",children:n.jsx(Eo,{})})}),a&&n.jsx(_e,{title:`Select ${e.id}`,children:n.jsx(Gr,{size:h?"medium":"small",checked:i,onCheckedChange:b})}),(_||g)&&n.jsxs(Qn,{trigger:n.jsx(R,{size:h?"medium":"small",children:n.jsx(kr,{})}),children:[g&&n.jsxs(me,{onClick:p,children:[n.jsx(Bo,{}),"Delete"]}),_&&n.jsxs(me,{onClick:w,children:[n.jsx(hc,{}),"Copy"]})]})]}),!y&&l!=="xs"&&n.jsx("div",{className:"w-[138px] text-center overflow-hidden truncate",children:e?n.jsxs(j,{className:"font-mono",variant:"caption",color:"secondary",children:[" ",e.id," "]}):n.jsx(Ve,{})})]})}function h3(e){const t=ze(),c=!e.forceFilter&&e.filterIsSet&&e.clearFilter&&n.jsxs(te,{variant:"outlined",className:"h-fit-content","aria-label":"filter clear",onClick:e.clearFilter,size:"small",children:[n.jsx(gc,{}),"Clear filter"]}),i=n.jsx(Xe,{value:e.size,className:"w-16 h-10",size:"small",onValueChange:a=>e.onSizeChanged(a),renderValue:a=>n.jsx("div",{className:"font-medium",children:a.toUpperCase()}),children:["xs","s","m","l","xl"].map(a=>n.jsx(xe,{value:a,className:"w-12 font-medium text-center",children:a.toUpperCase()},a))});return n.jsxs("div",{className:E(ue,"no-scrollbar min-h-[56px] overflow-x-auto px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full"),children:[n.jsxs("div",{className:"flex items-center gap-2",children:[e.title&&n.jsx("div",{className:"hidden lg:block",children:e.title}),i,e.actionsStart,c]}),n.jsxs("div",{className:"flex items-center gap-2",children:[t&&n.jsx("div",{className:"w-[22px]",children:e.loading&&n.jsx(Gn,{size:"small"})}),e.onTextSearch&&n.jsx(Qt,{onTextSearch:e.onTextSearch,expandable:!0},"search-bar"),e.actions]})]})}const ji={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Contains Any"},wt=["array-contains-any","in","not-in"];function g3({name:e,value:t,setValue:c,isArray:i,path:a,title:l,previewProperties:s,setPopupOpen:d}){const u=i?["array-contains"]:["==","!=",">","<",">=","<="],[A,y]=f.useState(!1);i?u.push("array-contains-any"):u.push("in","not-in");const[h,I]=t||[u[0],void 0],[_,g]=f.useState(h),[b,p]=f.useState(I),w=b?Array.isArray(b)?b.map(S=>S instanceof je?S.id:null).filter(Boolean):[b.id]:[];function k(S,T){const N=wt.includes(_),q=wt.includes(S);let G=T;N!==q&&(G=q?G instanceof je?[G]:[]:void 0),g(S),p(G);const V=G!==null&&Array.isArray(G)?G.length>0:G!==void 0;c(S&&V?[S,G]:void 0)}const v=fe(),K=f.useMemo(()=>a?v.getCollection(a):void 0,[a]),m=S=>{k(_,hn(S))},C=S=>{k(_,S.map(T=>hn(T)))},B=wt.includes(_),P=io({multiselect:B,path:a,collection:K,onSingleEntitySelected:m,onMultipleEntitiesSelected:C,selectedEntityIds:w,onClose:()=>{d(!0)}}),F=()=>{d(!1),P.open()},D=S=>n.jsx("div",{className:"mb-0.5",onMouseEnter:()=>y(!0),onMouseMove:()=>y(!0),onMouseLeave:()=>y(!1),children:n.jsx(nn,{disabled:!a,previewProperties:s,size:"medium",onClick:F,reference:S,onHover:A,allowEntityNavigation:!1})});return n.jsxs("div",{className:"flex w-[440px] flex-row",children:[n.jsx("div",{className:"w-[120px]",children:n.jsx(Xe,{value:_,onValueChange:S=>{k(S,b)},renderValue:S=>ji[S],children:u.map(S=>n.jsx(xe,{value:S,children:ji[S]},S))})}),n.jsxs("div",{className:"flex-grow ml-2 h-full",children:[b&&Array.isArray(b)&&n.jsx("div",{children:b.map((S,T)=>D(S))}),b&&!Array.isArray(b)&&n.jsx("div",{children:D(b)}),(!b||Array.isArray(b)&&b.length===0)&&n.jsx(te,{onClick:F,className:"h-full",children:B?"Select references":"Select reference"})]})]})}const qi={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Any"},kt=["array-contains-any","in","not-in"];function I3({name:e,value:t,setValue:c,dataType:i,isArray:a,enumValues:l,title:s}){const d=a?["array-contains"]:["==","!=",">","<",">=","<="];l&&(a?d.push("array-contains-any"):d.push("in","not-in"));const[u,A]=t||[d[0],void 0],[y,h]=f.useState(u),[I,_]=f.useState(A);function g(p,w){let k=w;const v=kt.includes(y),K=kt.includes(p);v!==K&&(k=K?typeof w=="string"||typeof w=="number"?[w]:[]:""),typeof k=="number"&&isNaN(k)&&(k=void 0),h(p),_(k);const m=k!==null&&Array.isArray(k)?k.length>0:k!==void 0;c(p&&m?[p,k]:void 0)}const b=kt.includes(y);return n.jsxs("div",{className:"flex w-[440px] items-center",children:[n.jsx("div",{className:"w-[80px]",children:n.jsx(Xe,{value:y,position:"item-aligned",onValueChange:p=>{g(p,I)},renderValue:p=>qi[p],children:d.map(p=>n.jsx(xe,{value:p,children:qi[p]},p))})}),n.jsxs("div",{className:"flex-grow ml-2",children:[!l&&n.jsx(un,{type:i==="number"?"number":void 0,value:I!==void 0?String(I):"",onChange:p=>{const w=i==="number"?parseFloat(p.target.value):p.target.value;g(y,w)},endAdornment:I&&n.jsx(R,{className:"absolute right-3 top-2",onClick:p=>g(y,void 0),children:n.jsx(cn,{})})}),l&&n.jsx(Xe,{position:"item-aligned",value:I!==void 0?Array.isArray(I)?I.map(p=>String(p)):String(I):a?[]:"",onValueChange:p=>{g(y,i==="number"?parseInt(p):p)},multiple:b,endAdornment:I&&n.jsx(R,{className:"absolute right-3 top-2",onClick:p=>g(y,void 0),children:n.jsx(cn,{})}),renderValue:p=>n.jsx(Ee,{enumKey:p,enumValues:l,size:"small"},`select_value_${e}_${p}`),children:l.map(p=>n.jsx(xe,{value:String(p.id),children:n.jsx(Ee,{enumKey:String(p.id),enumValues:l,size:"small"})},`select_value_${e}_${p.id}`))})]})]})}function b3({name:e,title:t,value:c,setValue:i}){function a(d){i(d!==void 0?["==",d]:void 0)}const l=c&&c[1],s=!!c;return n.jsx("div",{className:"w-[200px]",children:n.jsx(On,{value:l,allowIndeterminate:!0,onValueChange:d=>a(d===null?void 0:d),label:s?l?`${t} is true`:`${t} is false`:"No filter"})})}const p3="hover:bg-gray-200 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75",w3="inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150",k3="dark:text-gray-100 text-gray-700 visited:text-gray-700 dark:visited:text-gray-100",m3={medium:"w-10 !h-10 min-w-10 min-h-10",small:"w-8 !h-8 min-w-8 min-h-8",large:"w-12 !h-12 min-w-12 min-h-12"},v3={circular:"rounded-full",square:"rounded-md"},K3=({children:e,className:t,size:c="medium",variant:i="ghost",shape:a="circular",disabled:l,toggled:s,component:d,...u},A)=>{const y=i==="ghost"?"bg-transparent":"bg-gray-50 dark:bg-gray-950",h=d||"button";return n.jsx(h,{type:"button",ref:A,...u,className:E(he,l?"opacity-50 pointer-events-none":"cursor-pointer",s?"outline outline-2 outline-primary":"",k3,y,w3,p3,v3[a],m3[c],t),children:e})},R=f.forwardRef(K3),mt=ce.forwardRef(function(t,c){const{shrink:i,className:a,...l}=t,s={root:"origin-left transition-transform block whitespace-nowrap overflow-hidden text-overflow-ellipsis max-w-full",shrink:"transform translate-y-[2px] scale-75 translate-x-[12px]",expanded:"translate-x-[16px] top-0 transform translate-y-[16px] scale-100"},d=E(s.root,{[s.shrink]:i,[s.expanded]:!i},a);return n.jsx("label",{"data-shrink":i,ref:c,className:d,...l})}),Vn=({value:e,label:t,onChange:c,disabled:i,clearable:a,mode:l="date",error:s,size:d,className:u,style:A,inputClassName:y,preventOpenOnFocus:h,invisible:I})=>{const _=f.useRef(null),{locale:g}=ne(),b=f.useRef(null),[p,w]=f.useState(document.activeElement===b.current),k=e!=null,v=e!=null&&!(e instanceof Date);Dn("DateTimeField",C3);const K=m=>{m.preventDefault(),c(null)};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:E("rounded-md relative max-w-full",!I&&Je,i?Re:We,{"min-h-[48px]":d==="small","min-h-[64px]":d==="medium"},u),style:A,children:[t&&n.jsx(mt,{className:E("absolute top-1 pointer-events-none",s?"text-red-500 dark:text-red-600":p?"text-primary":"text-text-secondary dark:text-text-secondary-dark",i?"opacity-50":""),shrink:k||p,children:t}),n.jsx(xo,{ref:_,locale:g,selected:(v?null:e)??null,onChange:c,disabled:!1,popperClassName:E(Ge,"my-4 shadow"),onClick:m=>m.stopPropagation(),onFocus:()=>w(!0),onBlur:()=>w(!1),showTimeSelect:l==="date_time",timeFormat:"HH:mm",timeIntervals:15,timeCaption:"time",dateFormat:l==="date_time"?"Pp":"P",preventOpenOnFocus:!0,className:E("w-full outline-none bg-transparent leading-normal text-base px-3",a?"pr-14":"pr-12","rounded-md",!I&&he,d==="small"?"min-h-[48px]":"min-h-[64px]",t?"pt-[28px] pb-2":"py-2",y,i&&"border border-transparent outline-none opacity-50 dark:opacity-50 text-gray-600 dark:text-gray-500")}),n.jsx(R,{onClick:()=>_.current?.setOpen(!0),className:"absolute right-3 top-1/2 transform -translate-y-1/2 !text-gray-500 ",children:n.jsx(ac,{color:"disabled"})}),a&&e&&n.jsx(R,{onClick:K,className:"absolute right-14 top-1/2 transform -translate-y-1/2 text-gray-400 ",children:n.jsx(cn,{})})]}),v&&n.jsx(we,{title:"Invalid date value for this field",error:`The provided value is: ${JSON.stringify(e)}`})]})},C3=`
749
+ ${t?"w-0 h-0":"w-2 h-2"}`})]}),s3=f.memo(function({resizeHandleRef:t,columnIndex:c,isResizingIndex:i,sort:a,onColumnSort:l,onFilterUpdate:s,filter:d,column:u,onClickResizeColumn:A,createFilterField:y}){const[h,I]=f.useState(!1),[_,g]=f.useState(!1),b=f.useCallback(K=>{g(!0)},[]),p=f.useCallback((K,m)=>{s(u,K),m!==void 0&&g(m)},[u,s]),w=i===c,v=!(i!==c&&i>0)&&(h||w);return n.jsx(ie,{children:n.jsxs("div",{className:E("flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-gray-50 dark:bg-gray-900","text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200 ","hover:bg-gray-100 dark:hover:bg-gray-800 hover:bg-opacity-50 dark:hover:bg-opacity-50",u.frozen?"sticky left-0 z-10":"relative z-0"),style:{left:u.frozen?0:void 0,minWidth:u.width,maxWidth:u.width},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>I(!1),children:[n.jsx("div",{className:"overflow-hidden flex-grow",children:n.jsxs("div",{className:`flex items-center justify-${u.headerAlign} flex-row`,children:[u.icon&&u.icon(h||_),n.jsx("div",{className:"truncate -webkit-box w-full mx-1 overflow-hidden",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:2,justifyContent:u.align},children:u.title})]})}),u.sortable&&(a||v||_)&&n.jsx(Yi,{color:"secondary",invisible:!a,children:n.jsxs(R,{size:"small",className:h||_?"bg-white dark:bg-gray-950":void 0,onClick:()=>{l(u.key)},children:[!a&&n.jsx(So,{}),a==="asc"&&n.jsx(So,{}),a==="desc"&&n.jsx(So,{className:"rotate-180"})]})}),u.filter&&y&&n.jsx("div",{children:n.jsx(Yi,{color:"secondary",invisible:!d,children:n.jsx(Ui,{open:_,onOpenChange:g,trigger:n.jsx(R,{className:h||_?"bg-white dark:bg-gray-950":void 0,size:"small",onClick:b,children:n.jsx(oo,{})}),children:u.filter&&n.jsx(d3,{column:u,filter:d,onHover:h,onFilterUpdate:p,createFilterField:y,popupOpen:_,setPopupOpen:g})})})}),u.resizable&&n.jsx("div",{ref:t,className:E("absolute h-full w-[6px] top-0 right-0 cursor-col-resize",v&&"bg-gray-300 dark:bg-gray-700"),onMouseDown:A?()=>A(c,u):void 0})]})})},de);function d3({column:e,onFilterUpdate:t,filter:c,onHover:i,createFilterField:a,popupOpen:l,setPopupOpen:s}){const d=e.key,[u,A]=f.useState(c);if(f.useEffect(()=>{A(c)},[c]),!e.filter)return null;const y=()=>{t(u,!1)},h=g=>{t(void 0,!1)},I=!!c,_=a({id:d,filterValue:u,setFilterValue:A,column:e,popupOpen:l,setPopupOpen:s});return _?n.jsxs("div",{className:E("text-gray-900 dark:text-white"),children:[n.jsx("div",{className:E(ue,"py-4 px-6 text-xs font-semibold uppercase border-b"),children:e.title??d}),_&&n.jsx("div",{className:"m-4",children:_}),n.jsxs("div",{className:"flex justify-end m-4",children:[n.jsx(te,{className:"mr-4",disabled:!I,variant:"text",color:"primary",type:"reset","aria-label":"filter clear",onClick:h,children:"Clear"}),n.jsx(te,{variant:"outlined",color:"primary",onClick:y,children:"Filter"})]})]}):null}const u3=({columns:e,currentSort:t,onColumnSort:c,onFilterUpdate:i,sortByProperty:a,filter:l,onColumnResize:s,onColumnResizeEnd:d,createFilterField:u})=>{const A=e.map(()=>f.createRef()),[y,h]=f.useState(-1),I=f.useCallback((K,m,C)=>{const B=e[K],P=100,F=800,D=m>F?F:m<P?P:m,S={width:D,key:B.key,column:{...B,width:D}};C?d(S):s(S)},[e,s,d]),_=f.useCallback(K=>{if(y>=0){const m=A[y].current?.parentElement?.getBoundingClientRect().left;return m?K.clientX-m:void 0}},[A,y]),g=f.useCallback(K=>{document.body.style.cursor=K?"col-resize":"auto"},[]),b=f.useCallback(K=>{K.stopPropagation(),K.preventDefault();const m=_(K);m&&I(y,m,!1)},[I,_,y]),p=f.useCallback(K=>{K.stopPropagation(),K.preventDefault();const m=_(K);m&&I(y,m,!0),h(-1),g(!1)},[I,_,y,g]),w=f.useCallback(()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",p)},[b,p]),k=f.useCallback(()=>{document.addEventListener("mousemove",b),document.addEventListener("mouseup",p)},[b,p]);f.useEffect(()=>(y>=0?k():w(),()=>{w()}),[k,y,w]);const v=f.useCallback(K=>{h(K),g(!0)},[g]);return n.jsx("div",{className:E(ue,"z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900"),children:e.map((K,m)=>{const C=e[m],B=C&&l&&l[C.key]?l[C.key]:void 0;return n.jsx(ie,{children:n.jsx(s3,{resizeHandleRef:A[m],columnIndex:m,isResizingIndex:y,onFilterUpdate:i,filter:B,sort:a===C.key?t:void 0,onColumnSort:c,onClickResizeColumn:v,column:C,createFilterField:u})},"header_"+C.key)})})},f3=f.memo(function({rowData:t,rowIndex:c,children:i,onRowClick:a,size:l,style:s,hoverRow:d,rowClassName:u}){const A=f.useCallback(y=>a?a({rowData:t,rowIndex:c,event:y}):void 0,[a,t,c]);return n.jsx("div",{className:E("flex min-w-full text-sm border-b border-gray-200 dark:border-gray-800 border-opacity-40 dark:border-opacity-40",u?u(t):"",{"hover:bg-opacity-95":d,"cursor-pointer":a}),onClick:A,style:{...s,height:Ln(l),width:"fit-content"},children:i})},de),A3=f.memo(function(t){return t.rowData&&t.cellRenderer({cellData:t.cellData,rowData:t.rowData,rowIndex:t.rowIndex,isScrolling:!1,column:t.column,columns:t.columns,columnIndex:t.columnIndex,width:t.column.width})},(e,t)=>de(e,t)),Ho=f.createContext({});Ho.displayName="VirtualListContext";const _3=f.forwardRef(({children:e,...t},c)=>n.jsx(Ho.Consumer,{children:i=>{const a=i.customView;return n.jsxs(n.Fragment,{children:[n.jsx("div",{id:"virtual-table",style:{position:"relative",height:"100%"},children:n.jsxs("div",{ref:c,...t,style:{...t?.style,minHeight:"100%",position:"relative"},children:[n.jsx(u3,{...i}),!a&&e]})}),a&&n.jsx("div",{style:{position:"sticky",top:"56px",flexGrow:1,height:"calc(100% - 56px)",marginTop:"calc(56px - 100vh)",left:0},children:a})]})}})),$i=f.memo(function({data:t,onResetPagination:c,onEndReached:i,size:a="m",columns:l,onRowClick:s,onColumnResize:d,filter:u,checkFilterCombination:A,onFilterUpdate:y,sortBy:h,error:I,emptyMessage:_,onSortByUpdate:g,loading:b,cellRenderer:p,hoverRow:w,createFilterField:k,rowClassName:v,className:K,endAdornment:m}){const C=h?h[0]:void 0,B=h?h[1]:void 0,[P,F]=f.useState(l),D=f.useRef(null),S=f.useRef(0);f.useEffect(()=>{F(l)},[l]);const[T,N]=er(),q=f.useCallback(J=>{F(P.map(Y=>Y.key===J.column.key?J.column:Y))},[P]),z=f.useCallback(J=>{F(P.map(Y=>Y.key===J.column.key?J.column:Y)),d&&d(J)},[P,d]),V=f.useRef();f.useEffect(()=>{V.current=u},[u]);const oe=f.useCallback(()=>{S.current=0,D.current&&D.current.scrollTo(D.current?.scrollLeft,0)},[]),O=f.useCallback(J=>{const Y=C===J&&B==="desc",ge=C===J&&B==="asc"?"desc":Y?void 0:"asc",He=Y?void 0:J,ve=V.current,fn=ge&&He?[He,ge]:void 0;ve&&A&&!A(ve,fn)&&y&&y(void 0),c&&c(),g&&g(fn),oe()},[A,B,y,c,g,oe,C]),H=f.useCallback(()=>{S.current=0,g&&g(void 0)},[g]),Z=Math.max((t?.length??0)*Ln(a)-N.height,0),L=f.useCallback(J=>{i&&(t?.length??0)>0&&J>S.current+500&&(S.current=J,i())},[t,i]),W=f.useCallback(({scrollOffset:J,scrollUpdateWasRequested:Y})=>{!Y&&J>=Z-500&&L(J)},[Z,L]),Q=f.useCallback((J,Y)=>{S.current=0;const x=V.current;let ge=x?{...x}:{};Y?ge[J.key]=Y:delete ge[J.key],!A||A(ge,C&&B?[C,B]:void 0)||(ge=Y?{[J.key]:Y}:{}),y&&y(ge),J.key!==C&&H()},[A,B,y,H,C]),X=f.useCallback(()=>n.jsxs("div",{className:"h-full flex flex-col items-center justify-center sticky left-0",children:[n.jsx(j,{variant:"h6",children:"Error fetching data from the data source"}),I?.message&&n.jsx(lo,{className:"px-4 break-all",source:I.message})]}),[I?.message]),ee=f.useCallback(()=>b?n.jsx(fo,{}):n.jsxs("div",{className:"flex overflow-auto items-center justify-center p-2 gap-2 h-full",children:[n.jsx(ic,{}),n.jsx(j,{children:_})]}),[_,b]),U=!b&&(t?.length??0)===0,re=I?X():U?ee():void 0;return n.jsx("div",{ref:T,className:E("h-full w-full",K),children:n.jsx(Ho.Provider,{value:{data:t,size:a,cellRenderer:p,columns:P,currentSort:B,onRowClick:s,customView:re,onColumnResize:q,onColumnResizeEnd:z,filter:V.current,onColumnSort:O,onFilterUpdate:Q,sortByProperty:C,hoverRow:w??!1,createFilterField:k,rowClassName:v,endAdornment:m},children:n.jsx(y3,{outerRef:D,width:N.width,height:N.height,itemCount:(t?.length??0)+(m?1:0),onScroll:W,itemSize:Ln(a)},a)})})},de);function y3({outerRef:e,width:t,height:c,itemCount:i,onScroll:a,itemSize:l}){const s=f.useCallback(({index:d,style:u})=>n.jsx(Ho.Consumer,{children:({onRowClick:A,data:y,columns:h,size:I="m",cellRenderer:_,hoverRow:g,rowClassName:b,endAdornment:p})=>{if(p&&d===(y??[]).length)return n.jsx("div",{style:{...u,height:"auto",position:"sticky",bottom:0,zIndex:1},children:p});const w=y&&y[d];return n.jsx(f3,{rowData:w,rowIndex:d,onRowClick:A,columns:h,hoverRow:g,rowClassName:b,style:{...u,top:`calc(${u.top}px + 48px)`},size:I,children:h.map((k,v)=>{const K=w&&w[k.key];return n.jsx(A3,{dataKey:k.key,cellRenderer:_,column:k,columns:h,rowData:w,cellData:K,rowIndex:d,columnIndex:v},`cell_${k.key}`)})},`row_${d}`)}}),[]);return n.jsx(Na.FixedSizeList,{outerRef:e,innerElementType:_3,width:t,height:c,overscanCount:4,itemCount:i,onScroll:a,itemSize:l,children:s})}function Qn({children:e,trigger:t,open:c,defaultOpen:i,onOpenChange:a}){return n.jsxs(Jn.Root,{open:c,defaultOpen:i,onOpenChange:a,children:[n.jsx(Jn.Trigger,{asChild:!0,children:t}),n.jsx(Jn.Portal,{children:n.jsx(Jn.Content,{className:E(Ge,"shadow py-2 z-30"),children:e})})]})}function me({children:e,dense:t,onClick:c}){return n.jsx(Jn.Item,{className:E(he,c&&"cursor-pointer","rounded-md px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-900 flex items-center gap-4"),onClick:c,children:e})}function pt({entity:e,width:t,frozen:c,isSelected:i,selectionEnabled:a,size:l,toggleEntitySelection:s,onCopyClicked:d,onEditClicked:u,onDeleteClicked:A,hideId:y}){const h=ze(),I=!!u,_=!!d,g=!!A,b=f.useCallback(v=>{s&&s(e)},[e,s]),p=f.useCallback(v=>{v.stopPropagation(),A&&A(e)},[e,A]),w=f.useCallback(v=>{v.stopPropagation(),d&&d(e)},[e,d]),k=f.useCallback(v=>{v.stopPropagation(),s&&s(e)},[e,s]);return n.jsxs("div",{onClick:k,className:E("h-full flex items-center justify-center flex-col bg-gray-50 dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-10",c?"sticky left-0":""),style:{width:t,position:c?"sticky":"initial",left:c?0:"initial",contain:"strict"},children:[(I||g||a)&&n.jsxs("div",{className:"w-34 flex justify-center",children:[I&&n.jsx(_e,{title:`Edit ${e.id}`,children:n.jsx(R,{onClick:v=>{v.stopPropagation(),u&&u(e)},size:h?"medium":"small",children:n.jsx(Eo,{})})}),a&&n.jsx(_e,{title:`Select ${e.id}`,children:n.jsx(Gr,{size:h?"medium":"small",checked:i,onCheckedChange:b})}),(_||g)&&n.jsxs(Qn,{trigger:n.jsx(R,{size:h?"medium":"small",children:n.jsx(kr,{})}),children:[g&&n.jsxs(me,{onClick:p,children:[n.jsx(Bo,{}),"Delete"]}),_&&n.jsxs(me,{onClick:w,children:[n.jsx(hc,{}),"Copy"]})]})]}),!y&&l!=="xs"&&n.jsx("div",{className:"w-[138px] text-center overflow-hidden truncate",children:e?n.jsxs(j,{className:"font-mono",variant:"caption",color:"secondary",children:[" ",e.id," "]}):n.jsx(Ve,{})})]})}function h3(e){const t=ze(),c=!e.forceFilter&&e.filterIsSet&&e.clearFilter&&n.jsxs(te,{variant:"outlined",className:"h-fit-content","aria-label":"filter clear",onClick:e.clearFilter,size:"small",children:[n.jsx(gc,{}),"Clear filter"]}),i=n.jsx(Xe,{value:e.size,className:"w-16 h-10",size:"small",onValueChange:a=>e.onSizeChanged(a),renderValue:a=>n.jsx("div",{className:"font-medium",children:a.toUpperCase()}),children:["xs","s","m","l","xl"].map(a=>n.jsx(xe,{value:a,className:"w-12 font-medium text-center",children:a.toUpperCase()},a))});return n.jsxs("div",{className:E(ue,"no-scrollbar min-h-[56px] overflow-x-auto px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full"),children:[n.jsxs("div",{className:"flex items-center gap-2",children:[e.title&&n.jsx("div",{className:"hidden lg:block",children:e.title}),i,e.actionsStart,c]}),n.jsxs("div",{className:"flex items-center gap-2",children:[t&&n.jsx("div",{className:"w-[22px]",children:e.loading&&n.jsx(Gn,{size:"small"})}),e.onTextSearch&&n.jsx(Qt,{onTextSearch:e.onTextSearch,expandable:!0},"search-bar"),e.actions]})]})}const ji={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Contains Any"},wt=["array-contains-any","in","not-in"];function g3({name:e,value:t,setValue:c,isArray:i,path:a,title:l,previewProperties:s,setPopupOpen:d}){const u=i?["array-contains"]:["==","!=",">","<",">=","<="],[A,y]=f.useState(!1);i?u.push("array-contains-any"):u.push("in","not-in");const[h,I]=t||[u[0],void 0],[_,g]=f.useState(h),[b,p]=f.useState(I),w=b?Array.isArray(b)?b.map(S=>S instanceof je?S.id:null).filter(Boolean):[b.id]:[];function k(S,T){const N=wt.includes(_),q=wt.includes(S);let z=T;N!==q&&(z=q?z instanceof je?[z]:[]:void 0),g(S),p(z);const V=z!==null&&Array.isArray(z)?z.length>0:z!==void 0;c(S&&V?[S,z]:void 0)}const v=fe(),K=f.useMemo(()=>a?v.getCollection(a):void 0,[a]),m=S=>{k(_,hn(S))},C=S=>{k(_,S.map(T=>hn(T)))},B=wt.includes(_),P=io({multiselect:B,path:a,collection:K,onSingleEntitySelected:m,onMultipleEntitiesSelected:C,selectedEntityIds:w,onClose:()=>{d(!0)}}),F=()=>{d(!1),P.open()},D=S=>n.jsx("div",{className:"mb-0.5",onMouseEnter:()=>y(!0),onMouseMove:()=>y(!0),onMouseLeave:()=>y(!1),children:n.jsx(nn,{disabled:!a,previewProperties:s,size:"medium",onClick:F,reference:S,onHover:A,allowEntityNavigation:!1})});return n.jsxs("div",{className:"flex w-[440px] flex-row",children:[n.jsx("div",{className:"w-[120px]",children:n.jsx(Xe,{value:_,onValueChange:S=>{k(S,b)},renderValue:S=>ji[S],children:u.map(S=>n.jsx(xe,{value:S,children:ji[S]},S))})}),n.jsxs("div",{className:"flex-grow ml-2 h-full",children:[b&&Array.isArray(b)&&n.jsx("div",{children:b.map((S,T)=>D(S))}),b&&!Array.isArray(b)&&n.jsx("div",{children:D(b)}),(!b||Array.isArray(b)&&b.length===0)&&n.jsx(te,{onClick:F,className:"h-full",children:B?"Select references":"Select reference"})]})]})}const qi={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Any"},kt=["array-contains-any","in","not-in"];function I3({name:e,value:t,setValue:c,dataType:i,isArray:a,enumValues:l,title:s}){const d=a?["array-contains"]:["==","!=",">","<",">=","<="];l&&(a?d.push("array-contains-any"):d.push("in","not-in"));const[u,A]=t||[d[0],void 0],[y,h]=f.useState(u),[I,_]=f.useState(A);function g(p,w){let k=w;const v=kt.includes(y),K=kt.includes(p);v!==K&&(k=K?typeof w=="string"||typeof w=="number"?[w]:[]:""),typeof k=="number"&&isNaN(k)&&(k=void 0),h(p),_(k);const m=k!==null&&Array.isArray(k)?k.length>0:k!==void 0;c(p&&m?[p,k]:void 0)}const b=kt.includes(y);return n.jsxs("div",{className:"flex w-[440px] items-center",children:[n.jsx("div",{className:"w-[80px]",children:n.jsx(Xe,{value:y,position:"item-aligned",onValueChange:p=>{g(p,I)},renderValue:p=>qi[p],children:d.map(p=>n.jsx(xe,{value:p,children:qi[p]},p))})}),n.jsxs("div",{className:"flex-grow ml-2",children:[!l&&n.jsx(un,{type:i==="number"?"number":void 0,value:I!==void 0?String(I):"",onChange:p=>{const w=i==="number"?parseFloat(p.target.value):p.target.value;g(y,w)},endAdornment:I&&n.jsx(R,{className:"absolute right-3 top-2",onClick:p=>g(y,void 0),children:n.jsx(cn,{})})}),l&&n.jsx(Xe,{position:"item-aligned",value:I!==void 0?Array.isArray(I)?I.map(p=>String(p)):String(I):a?[]:"",onValueChange:p=>{g(y,i==="number"?parseInt(p):p)},multiple:b,endAdornment:I&&n.jsx(R,{className:"absolute right-3 top-2",onClick:p=>g(y,void 0),children:n.jsx(cn,{})}),renderValue:p=>n.jsx(Ee,{enumKey:p,enumValues:l,size:"small"},`select_value_${e}_${p}`),children:l.map(p=>n.jsx(xe,{value:String(p.id),children:n.jsx(Ee,{enumKey:String(p.id),enumValues:l,size:"small"})},`select_value_${e}_${p.id}`))})]})]})}function b3({name:e,title:t,value:c,setValue:i}){function a(d){i(d!==void 0?["==",d]:void 0)}const l=c&&c[1],s=!!c;return n.jsx("div",{className:"w-[200px]",children:n.jsx(On,{value:l,allowIndeterminate:!0,onValueChange:d=>a(d===null?void 0:d),label:s?l?`${t} is true`:`${t} is false`:"No filter"})})}const p3="hover:bg-gray-200 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75",w3="inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150",k3="dark:text-gray-100 text-gray-700 visited:text-gray-700 dark:visited:text-gray-100",m3={medium:"w-10 !h-10 min-w-10 min-h-10",small:"w-8 !h-8 min-w-8 min-h-8",large:"w-12 !h-12 min-w-12 min-h-12"},v3={circular:"rounded-full",square:"rounded-md"},K3=({children:e,className:t,size:c="medium",variant:i="ghost",shape:a="circular",disabled:l,toggled:s,component:d,...u},A)=>{const y=i==="ghost"?"bg-transparent":"bg-gray-50 dark:bg-gray-950",h=d||"button";return n.jsx(h,{type:"button",ref:A,...u,className:E(he,l?"opacity-50 pointer-events-none":"cursor-pointer",s?"outline outline-2 outline-primary":"",k3,y,w3,p3,v3[a],m3[c],t),children:e})},R=f.forwardRef(K3),mt=ce.forwardRef(function(t,c){const{shrink:i,className:a,...l}=t,s={root:"origin-left transition-transform block whitespace-nowrap overflow-hidden text-overflow-ellipsis max-w-full",shrink:"transform translate-y-[2px] scale-75 translate-x-[12px]",expanded:"translate-x-[16px] top-0 transform translate-y-[16px] scale-100"},d=E(s.root,{[s.shrink]:i,[s.expanded]:!i},a);return n.jsx("label",{"data-shrink":i,ref:c,className:d,...l})}),Vn=({value:e,label:t,onChange:c,disabled:i,clearable:a,mode:l="date",error:s,size:d,className:u,style:A,inputClassName:y,preventOpenOnFocus:h,invisible:I})=>{const _=f.useRef(null),{locale:g}=ne(),b=f.useRef(null),[p,w]=f.useState(document.activeElement===b.current),k=e!=null,v=e!=null&&!(e instanceof Date);Dn("DateTimeField",C3);const K=m=>{m.preventDefault(),c(null)};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:E("rounded-md relative max-w-full",!I&&Je,i?Re:We,{"min-h-[48px]":d==="small","min-h-[64px]":d==="medium"},u),style:A,children:[t&&n.jsx(mt,{className:E("absolute top-1 pointer-events-none",s?"text-red-500 dark:text-red-600":p?"text-primary":"text-text-secondary dark:text-text-secondary-dark",i?"opacity-50":""),shrink:k||p,children:t}),n.jsx(xo,{ref:_,locale:g,selected:(v?null:e)??null,onChange:c,disabled:!1,popperClassName:E(Ge,"my-4 shadow"),onClick:m=>m.stopPropagation(),onFocus:()=>w(!0),onBlur:()=>w(!1),showTimeSelect:l==="date_time",timeFormat:"HH:mm",timeIntervals:15,timeCaption:"time",dateFormat:l==="date_time"?"Pp":"P",preventOpenOnFocus:!0,className:E("w-full outline-none bg-transparent leading-normal text-base px-3",a?"pr-14":"pr-12","rounded-md",!I&&he,d==="small"?"min-h-[48px]":"min-h-[64px]",t?"pt-[28px] pb-2":"py-2",y,i&&"border border-transparent outline-none opacity-50 dark:opacity-50 text-gray-600 dark:text-gray-500")}),n.jsx(R,{onClick:()=>_.current?.setOpen(!0),className:"absolute right-3 top-1/2 transform -translate-y-1/2 !text-gray-500 ",children:n.jsx(ac,{color:"disabled"})}),a&&e&&n.jsx(R,{onClick:K,className:"absolute right-14 top-1/2 transform -translate-y-1/2 text-gray-400 ",children:n.jsx(cn,{})})]}),v&&n.jsx(we,{title:"Invalid date value for this field",error:`The provided value is: ${JSON.stringify(e)}`})]})},C3=`
750
750
  .react-datepicker__year-read-view--down-arrow,
751
751
  .react-datepicker__month-read-view--down-arrow,
752
752
  .react-datepicker__month-year-read-view--down-arrow, .react-datepicker__navigation-icon::before {
@@ -1580,7 +1580,7 @@
1580
1580
  .react-datepicker__day--outside-month{
1581
1581
  color: #666 !important;
1582
1582
  }
1583
- `,Ji={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=","not-in":"not in",in:"in","array-contains":"Contains","array-contains-any":"Any"},Zi=["array-contains-any","in"];function S3({name:e,isArray:t,mode:c,value:i,setValue:a,title:l}){const s=t?["array-contains"]:["==","!=",">","<",">=","<="],[d,u]=i||[s[0],void 0],[A,y]=f.useState(d),[h,I]=f.useState(u);function _(g,b){let p=b;const w=Zi.includes(A),k=Zi.includes(g);w!==k&&(p=k?b?[b]:[]:""),y(g),I(p===null?void 0:p);const v=p!==null&&Array.isArray(p)?p.length>0:p!==void 0;a(g&&v?[g,p]:void 0)}return n.jsxs("div",{className:"flex w-[440px] items-center",children:[n.jsx("div",{className:"w-[80px]",children:n.jsx(Xe,{value:A,onValueChange:g=>{_(g,h)},renderValue:g=>Ji[g],children:s.map(g=>n.jsx(xe,{value:g,children:Ji[g]},g))})}),n.jsx("div",{className:"flex-grow ml-2",children:n.jsx(Vn,{mode:c,size:"medium",value:h,onChange:g=>{_(A,g===null?void 0:g)},clearable:!0})})]})}const Xi="collectionGroupParent";function xi(e,t){return f.useMemo(()=>e.propertiesOrder?Ri(e,e.propertiesOrder):B3(e,t),[e,t])}function Ri(e,t){return t.flatMap(c=>{const i=e.properties[c];return i?i.hideFromCollection?[null]:i.disabled&&typeof i.disabled=="object"&&i.disabled.hidden?[null]:i.dataType==="map"&&i.spreadChildren&&i.properties?vt(i,c):[{key:c,disabled:!!i.disabled||!!i.readOnly}]:e.additionalFields?.find(l=>l.id===c)?[{key:c,disabled:!0}]:e.subcollections&&e.subcollections.find(s=>ht(s)===c)?[{key:c,disabled:!0}]:e.collectionGroup&&c===Xi?[{key:c,disabled:!0}]:[null]}).filter(Boolean)}function B3(e,t){const c=Object.keys(e.properties),i=e.additionalFields??[],a=e.subcollections??[],l=[...c,...i.map(s=>s.id)];if(t){const s=a.map(d=>ht(d));l.push(...s.filter(d=>!l.includes(d)))}return e.collectionGroup&&l.push(Xi),Ri(e,l)}function vt(e,t,c){return e.dataType==="map"&&e.spreadChildren&&e.properties?Object.entries(e.properties).flatMap(([i,a])=>vt(a,`${t}.${i}`,c||!!e.disabled||!!e.readOnly)):[{key:t,disabled:c||!!e.disabled||!!e.readOnly}]}const E3={},ea=f.createContext(E3),F3=()=>f.useContext(ea),Kt=f.memo(function({forceFilter:t,actionsStart:c,actions:i,title:a,tableRowActionsBuilder:l,uniqueFieldValidator:s,getPropertyFor:d,onValueChange:u,selectionController:A,highlightedEntities:y,onEntityClick:h,onColumnResize:I,onSizeChanged:_,textSearchEnabled:g=!1,hoverRow:b=!0,inlineEditing:p=!1,additionalFields:w,displayedColumnIds:k,defaultSize:v,properties:K,tableController:{data:m,dataLoading:C,noMoreToLoad:B,dataLoadingError:P,filterValues:F,setFilterValues:D,sortBy:S,setSortBy:T,searchString:N,setSearchString:q,clearFilter:G,itemCount:V,setItemCount:oe,pageSize:O=50,paginationEnabled:H,checkFilterCombination:Z,setPopupCell:L},filterable:W=!0,sortable:Q=!0,endAdornment:X}){const ee=ze(),U=!!t,re=A?.selectedEntities?.length>0?A?.selectedEntities:y,J=ne(),[Y,x]=f.useState(v??"m"),[ge,He]=f.useState(void 0),ve=re?.map($=>$.id),fn=!!F&&Object.keys(F).length>0,An=()=>{!H||C||B||V!==void 0&&oe?.(V+O)},zn=f.useCallback(()=>{oe?.(O)},[O]),_o=f.useCallback(({rowData:$})=>{if(!p)return h&&h($)},[h,p]),mn=f.useCallback($=>{_&&_($),x($)},[]),Hn=f.useCallback($=>q?.($),[]),_n=f.useMemo(()=>w?w.map($=>({[$.id]:$})).reduce(($,se)=>({...$,...se}),{}):{},[w]);f.useEffect(()=>{const $=se=>{se.keyCode===27&&yo()};return document.addEventListener("keydown",$,!1),()=>{document.removeEventListener("keydown",$,!1)}});const Un=f.useCallback($=>{He($)},[]),yo=f.useCallback(()=>{He(void 0)},[]),z=s,Ae=f.useCallback(({column:$,columnIndex:se,rowData:Ke,rowIndex:Ue})=>{const ye=Ke,on=$.key;let Yn=$.custom?.disabled;const ho=ye.values?rn(ye.values,on):void 0,$n=d?.({propertyKey:on,propertyValue:ho,entity:ye})??$.custom.resolvedProperty;return $n?.disabled||(Yn=!1),$n?n.jsx(ie,{children:ye?n.jsx(c3,{readonly:!p,align:$.align??"left",propertyKey:on,property:$n,value:ye?.values?rn(ye.values,on):void 0,customFieldValidator:z,columnIndex:se,width:$.width,height:Ln(Y),entity:ye,disabled:Yn,path:ye.path},`property_table_cell_${ye.id}_${on}`):en()}):null},[z,p,Y,ve]),ae=f.useCallback(({column:$,rowData:se,width:Ke})=>{const Ue=se,ye=_n[$.key],on=ye.dependencies?Object.entries(Ue.values).filter(([ho,$n])=>ye.dependencies.includes(ho)).reduce((ho,$n)=>({...ho,...$n}),{}):Ue,Yn=ye.Builder;if(!Yn)throw new Error("No builder provided for additional field");return n.jsx(bt,{width:Ke,size:Y,value:on,selected:!1,disabled:!0,align:"left",allowScroll:!1,showExpandIcon:!1,disabledTooltip:"This column can't be edited directly",children:n.jsx(ie,{children:n.jsx(Yn,{entity:Ue,context:J})})},`additional_table_cell_${Ue.id}_${$.key}`)},[_n,Y,ve]),M=f.useMemo(()=>{const $=Object.entries(K).flatMap(([Ke,Ue])=>vt(Ue,Ke)).map(({key:Ke,disabled:Ue})=>{const ye=tt(K,Ke);if(!ye)throw Error("Internal error: no property found in path "+Ke);const on=na(ye);return{key:Ke,align:zz(ye),icon:Yn=>ke(ye,"small"),title:ye.name??Ke,sortable:Q&&(t?Object.keys(t).includes(Ke):!0),filter:!U&&on,width:Wi(ye),resizable:!0,custom:{resolvedProperty:ye,disabled:Ue}}}),se=w?w.map(Ke=>({key:Ke.id,align:"left",sortable:!1,title:Ke.name,width:Ke.width??200})):[];return[...$,...se]},[w,U,t,K,Q]),le=f.useMemo(()=>({key:"id_ewcfedcswdf3",width:ee?160:130,title:"ID",resizable:!1,frozen:ee,headerAlign:"center"}),[ee]),Ie=f.useMemo(()=>[le,...k.map($=>M.find(se=>se.key===$.key)).filter(Boolean)],[M,k,le]),Oe=f.useCallback($=>{const se=$.column,Ke=$.columns,Ue=se.key;if($.columnIndex===0)return l?l({entity:$.rowData,size:Y,width:se.width,frozen:se.frozen}):n.jsx(pt,{entity:$.rowData,width:se.width,frozen:se.frozen,isSelected:!1,size:Y});if(_n[Ue])return ae($);if($.columnIndex<Ke.length+1)return Ae($);throw Error("Internal: columns not mapped properly")},[_n,l,Y,ae,Ae]),vn=f.useCallback($=>{D?.({...$,...t})},[t]);return n.jsx(ea.Provider,{value:{setPopupCell:L,select:Un,onValueChange:u,size:Y,selectedCell:ge,selectedEntityIds:ve},children:n.jsxs("div",{className:"h-full w-full flex flex-col bg-white dark:bg-gray-950",children:[n.jsx(h3,{forceFilter:U,filterIsSet:fn,onTextSearch:g?Hn:void 0,clearFilter:G,size:Y,onSizeChanged:mn,title:a,actionsStart:c,actions:i,loading:C}),n.jsx($i,{data:m,columns:Ie,cellRenderer:Oe,onRowClick:p?void 0:h?_o:void 0,onEndReached:An,onResetPagination:zn,error:P,paginationEnabled:H,onColumnResize:I,size:Y,loading:C,filter:F,onFilterUpdate:D?vn:void 0,sortBy:S,onSortByUpdate:T,hoverRow:b,checkFilterCombination:Z,createFilterField:W?P3:void 0,rowClassName:f.useCallback($=>ve?.includes($.id)?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",[ve]),className:"flex-grow",endAdornment:X})]})})},de);function P3({id:e,filterValue:t,setFilterValue:c,column:i,popupOpen:a,setPopupOpen:l}){if(!i.custom)return null;const{resolvedProperty:s}=i.custom,d=s?.dataType==="array",u=d?s.of:s;if(!u)return null;if(u.dataType==="reference")return n.jsx(g3,{value:t,setValue:c,name:e,isArray:d,path:u.path,title:s?.name,previewProperties:u?.previewProperties,popupOpen:a,setPopupOpen:l});if(u.dataType==="number"||u.dataType==="string"){const A=u.name,y=u.enumValues?tn(u.enumValues):void 0;return n.jsx(I3,{value:t,setValue:c,name:e,dataType:u.dataType,isArray:d,enumValues:y,title:A})}else if(u.dataType==="boolean"){const A=u.name;return n.jsx(b3,{value:t,setValue:c,name:e,title:A})}else if(u.dataType==="date"){const A=u.name;return n.jsx(S3,{value:t,setValue:c,name:e,mode:u.mode,isArray:d,title:A})}return n.jsx("div",{children:`Currently the filter field ${s.dataType} is not supported`})}function na(e,t=!1){return t?["string","number","date","reference"].includes(e.dataType):e.dataType==="array"?e.of?na(e.of,!0):!1:["string","number","boolean","date","reference","array"].includes(e.dataType)}function D3({data:e,entitiesDisplayedFirst:t}){if(!t)return e;const c=new Set(t.map(i=>i.id));return[...t,...e.filter(i=>!c.has(i.id))]}function N3(e,t,c=5e3){const[i,a]=f.useState(e),l=f.useRef(i.length??0),s=f.useRef(!1),d=f.useRef(t),u=!de(d.current,t),A=e.length>=l.current||u;return f.useEffect(()=>{const y=()=>{de(i,e)||(d.current=t,l.current=e.length,a(e)),s.current=!1};s.current=!0;let h;return A?y():h=setTimeout(y,c),()=>{clearTimeout(h),s.current&&A&&y()}},[e,c,t,A]),A?e:i}const T3=50;function Ct({fullPath:e,collection:t,entitiesDisplayedFirst:c,lastDeleteTimestamp:i,forceFilter:a}){const{initialFilter:l,initialSort:s,forceFilter:d}=t,[u,A]=f.useState(void 0),y=fe(),h=Qe(),I=f.useMemo(()=>y.resolveAliasesFrom(e),[e,y.resolveAliasesFrom]),_=a??d,g=t.pagination===void 0||!!t.pagination,b=typeof t.pagination=="number"?t.pagination:T3,[p,w]=f.useState(),[k,v]=f.useState(g?b:void 0),K=f.useCallback((O,H)=>h.isFilterCombinationValid?h.isFilterCombinationValid({path:I,collection:t,filterValues:O,sortBy:H}):!0,[]),m=f.useMemo(()=>{if(s&&_&&!K(_,s)){console.warn("Initial sort is not compatible with the force filter. Ignoring initial sort");return}return s},[s,_]),[C,B]=f.useState(_??l??void 0),[P,F]=f.useState(m),D=f.useCallback(()=>B(_??void 0),[_]),S=f.useCallback(O=>{if(_){console.warn("Filter is not compatible with the force filter. Ignoring filter");return}O&&Object.keys(O).length===0?B(void 0):B(O)},[_]),{data:T,dataLoading:N,noMoreToLoad:q,dataLoadingError:G}=Gc({path:e,collection:t,filterValues:C,sortBy:P,searchString:p,itemCount:k}),V=D3({data:T,entitiesDisplayedFirst:c});return{data:N3(V,{filterValues:C,sortBy:P,searchString:p,lastDeleteTimestamp:i}),dataLoading:N,noMoreToLoad:q,dataLoadingError:G,filterValues:C,setFilterValues:S,sortBy:P,setSortBy:F,searchString:p,setSearchString:w,clearFilter:D,itemCount:k,setItemCount:v,paginationEnabled:g,pageSize:b,checkFilterCombination:K,popupCell:u,setPopupCell:A}}function M3(e,t){const[c,i]=f.useState(),{navigator:a}=f.useContext(be.UNSAFE_NavigationContext),l=be.useNavigate(),s=()=>{i(void 0)},d=()=>{t(),i(void 0),l(-1)},u=f.useCallback(({action:A,location:y,retry:h})=>{switch(A){case"REPLACE":{h();return}case"POP":i(y)}},[]);return f.useEffect(()=>{if(!e||c||!("block"in a))return;const A=a.block(y=>{const h={...y,retry(){A(),y.retry()}};u(h)});return A},[a,u,e,c]),{navigationWasBlocked:!!c,handleCancel:s,handleOk:d}}function O3({open:e,handleOk:t,handleCancel:c,body:i,title:a}){return n.jsxs(Jo,{open:e,onOpenChange:l=>l?c():t(),children:[n.jsxs(Zo,{children:[n.jsx(j,{variant:"h6",children:a}),i,n.jsx(j,{children:"Are you sure you want to leave this page?"})]}),n.jsxs(kn,{children:[n.jsx(te,{variant:"text",onClick:c,autoFocus:!0,children:" Cancel "}),n.jsx(te,{onClick:t,children:" Ok "})]})]})}const oa=f.createContext({width:"",blocked:!1,setBlocked:e=>{},setBlockedNavigationMessage:e=>{},close:()=>{}}),Uo=()=>f.useContext(oa);function L3(){const t=co().sidePanels,c=[...t];return c.push(void 0),n.jsx(n.Fragment,{children:c.map((i,a)=>n.jsx(Q3,{panel:i,offsetPosition:t.length-a-1},`side_dialog_${a}`))})}function Q3({offsetPosition:e,panel:t}){const[c,i]=f.useState(!1),[a,l]=f.useState(!1),[s,d]=f.useState(),u=f.useRef(t?.width),A=u.current,y=co(),{navigationWasBlocked:h,handleOk:I,handleCancel:_}=M3(a&&!c,()=>l(!1));f.useEffect(()=>{t&&(u.current=t.width)},[t]);const g=()=>{l(!1),i(!1),y.close(),t?.onClose?.()},b=()=>{i(!1)},p=w=>{a&&!w?i(!0):(y.close(),t?.onClose?.())};return n.jsxs(oa.Provider,{value:{blocked:a,setBlocked:l,setBlockedNavigationMessage:d,width:A,close:p},children:[n.jsxs(Vt,{open:!!t,onOpenChange:w=>!w&&p(),children:[t&&n.jsx("div",{className:"transform max-w-[100vw] lg:max-w-[95vw] flex flex-col h-full transition-all duration-250 ease-in-out bg-white dark:bg-gray-900 ",style:{width:t.width,transform:`translateX(-${e*200}px)`},children:n.jsx(ie,{children:t.component})}),!t&&n.jsx("div",{style:{width:A}})]}),n.jsx(O3,{open:h||c,handleOk:c?g:I,handleCancel:c?b:_,body:s})]})}function V3({entityOrEntitiesToDelete:e,collection:t,onClose:c,open:i,callbacks:a,onEntityDelete:l,onMultipleEntitiesDelete:s,path:d}){const u=Qe(),A=an(),[y,h]=f.useState(!1),[I,_]=f.useState(),[g,b]=f.useState(),p=ne();f.useEffect(()=>{if(e){const S=Array.isArray(e)&&e.length===1?e[0]:e;_(S),b(Array.isArray(S))}},[e]);const w=f.useMemo(()=>Me({collection:t,path:d,fields:p.fields}),[t,d]),k=f.useCallback(()=>{c()},[c]),v=f.useCallback(S=>{console.debug("Deleted",S)},[]),K=f.useCallback((S,T)=>{A.open({type:"error",message:"Error deleting: "+T?.message}),console.error("Error deleting entity"),console.error(T)},[w.name]),m=f.useCallback((S,T)=>{A.open({type:"error",message:"Error before deleting: "+T?.message}),console.error(T)},[w.name]),C=f.useCallback((S,T)=>{A.open({type:"error",message:"Error after deleting: "+T?.message}),console.error(T)},[w.name]),B=f.useCallback(S=>zc({dataSource:u,entity:S,collection:w,callbacks:a,onDeleteSuccess:v,onDeleteFailure:K,onPreDeleteHookError:m,onDeleteSuccessHookError:C,context:p}),[u,w,a,v,K,m,C,p]),P=f.useCallback(async()=>{I&&(h(!0),g?Promise.all(I.map(B)).then(S=>{h(!1),s&&I&&s(d,I),S.every(Boolean)?A.open({type:"success",message:`${w.name}: multiple deleted`}):S.some(Boolean)?A.open({type:"warning",message:`${w.name}: Some of the entities have been deleted, but not all`}):A.open({type:"error",message:`${w.name}: Error deleting entities`}),c()}):B(I).then(S=>{h(!1),S&&(l&&I&&l(d,I),A.open({type:"success",message:`${w.singularName??w.name} deleted`}),c())}))},[I,g,B,s,d,c,A,w.name,l]);let F;if(I&&g)F=n.jsx(n.Fragment,{children:"Multiple entities"});else{const S=I;F=S?n.jsx(yt,{entity:S,collection:t,path:d}):n.jsx(n.Fragment,{})}const D=g?n.jsxs(n.Fragment,{children:[n.jsx("b",{children:w.name}),": Confirm multiple delete?"]}):`Would you like to delete this ${w.singularName??w.name}?`;return n.jsxs(Jo,{maxWidth:"2xl","aria-labelledby":"delete-dialog",open:i,onOpenChange:S=>S?void 0:c(),children:[n.jsxs(Zo,{fullHeight:!0,children:[n.jsx(j,{variant:"subtitle2",className:"p-4",children:D}),!g&&n.jsx("div",{className:"p-4",children:F})]}),n.jsxs(kn,{children:[y&&n.jsx(Gn,{size:"small"}),n.jsx(te,{onClick:k,disabled:y,variant:"text",color:"primary",children:"Cancel"}),n.jsx(te,{autoFocus:!0,disabled:y,onClick:P,variant:"filled",color:"primary",children:"Ok"})]})]})}function Yo(e){return Array.isArray(e)?e:e?[e]:[]}function W3({collection:e,relativePath:t,parentPathSegments:c,onNewClick:i,onMultipleDeleteClick:a,selectionEnabled:l,path:s,selectionController:d,tableController:u,collectionEntitiesCount:A}){const y=ne(),h=y.plugins??[],I=In(),_=ze(),g=d.selectedEntities,b=Qo(e,I,Ze(s),null)&&i&&(_?n.jsxs(te,{id:`add_entity_${s}`,onClick:i,startIcon:n.jsx(gn,{}),size:"large",variant:"filled",color:"primary",children:["Add ",e.singularName??e.name]}):n.jsx(te,{id:`add_entity_${s}`,onClick:i,size:"medium",variant:"filled",color:"primary",children:n.jsx(gn,{})})),p=it(e,I,Ze(s),null);let w;if(l){const m=_?n.jsxs(te,{variant:"text",disabled:!g?.length||!p,startIcon:n.jsx(Bo,{}),onClick:a,color:"primary",className:"lg:w-20",children:["(",g?.length,")"]}):n.jsx(R,{color:"primary",disabled:!g?.length||!p,onClick:a,children:n.jsx(Bo,{})});w=n.jsx(_e,{title:p?"Delete":"You have selected at least one entity you cannot delete",children:m})}const k={path:s,relativePath:t,parentPathSegments:c,collection:e,selectionController:d,context:y,tableController:u,collectionEntitiesCount:A},v=[];v.push(...Yo(e.Actions)),h&&h.forEach(m=>{m.collections?.CollectionActions&&v.push(...Yo(m.collections?.CollectionActions))});const K=n.jsx(n.Fragment,{children:v.map((m,C)=>n.jsx(m,{...k},`actions_${C}`))});return n.jsxs(n.Fragment,{children:[K,w,b]})}function G3({containerRef:e,innerRef:t,x:c,y:i,onMove:a}){let l=0,s=0;const d=f.useRef(!1),u=g=>{if(g.button!==0||!e.current||g.defaultPrevented||g.innerClicked)return;const{x:b,y:p}=e.current.getBoundingClientRect();l=g.screenX-b,s=g.screenY-p,document.addEventListener("mousemove",I),document.addEventListener("mouseup",h),document.addEventListener("selectstart",y),d.current=!0},A=g=>{g.innerClicked=!0},y=g=>{g.preventDefault(),g.stopPropagation()},h=g=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",h),document.removeEventListener("selectstart",y),g.stopPropagation(),d.current=!1},I=g=>{g.target.localName==="input"||!d.current||(a({x:g.screenX-l,y:g.screenY-s}),g.stopPropagation())},_=()=>{e.current&&(e.current.style.top=`${i}px`,e.current.style.left=`${c}px`)};f.useEffect(()=>{const g=e.current,b=t.current;if(!(!g||!b))return b&&b.addEventListener("mousedown",A),g&&g.addEventListener("mousedown",u),_(),()=>{g&&g.removeEventListener("mousedown",u),b&&b.removeEventListener("mousedown",A)}})}function z3(){const[e,t]=f.useState({width:0,height:0});return f.useLayoutEffect(()=>{function c(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",c),c(),()=>window.removeEventListener("resize",c)},[]),e}const H3=({onResize:e})=>{const t=f.useRef(0),c=f.useRef(null),i=f.useRef(e);i.current=e;const a=f.useCallback(s=>{t.current&&cancelAnimationFrame(t.current),t.current=requestAnimationFrame(()=>{i.current(s)})},[]),l=f.useCallback(()=>{const s=c.current;s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.addEventListener("resize",a)},[a]);return f.useEffect(()=>{const s=c.current;return()=>{s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.removeEventListener("resize",a)}},[a]),n.jsx("object",{onLoad:l,ref:c,tabIndex:-1,type:"text/html",data:"about:blank",title:"",style:{position:"absolute",top:0,left:0,height:"100%",width:"100%",pointerEvents:"none",zIndex:-1,opacity:0}})};function U3(e){return e.open?n.jsx(Y3,{...e}):null}function Y3({tableKey:e,entity:t,customFieldValidator:c,propertyKey:i,collection:a,path:l,cellRect:s,open:d,onClose:u,onCellValueChange:A,container:y}){const h=Qe(),I=ne(),[_,g]=f.useState(),[b,p]=f.useState(),w=t?.id,[k,v]=f.useState(t);f.useEffect(()=>w&&a?h.listenEntity?.({path:l,entityId:w,collection:a,onUpdate:v}):()=>{},[h,w,a,l]);const[K,m]=f.useState(k?.values),C=a?Me({collection:a,path:l,values:K,entityId:w,fields:I.fields}):void 0,B=z3(),P=f.useRef(null),F=f.useRef(null),D=f.useRef(!1),S=f.useCallback(()=>{if(!s)throw Error("getInitialLocation error");return{x:s.left<B.width-s.right?s.x+s.width/2:s.x-s.width/2,y:s.top<B.height-s.bottom?s.y+s.height/2:s.y-s.height/2}},[s,B.height,B.width]),T=f.useCallback(({x:H,y:Z})=>{const L=P.current?.getBoundingClientRect();if(!L)throw Error("normalizePosition called before draggableBoundingRect is set");return{x:Math.max(0,Math.min(H,B.width-L.width)),y:Math.max(0,Math.min(Z,B.height-L.height))}},[B]),N=f.useCallback(H=>{const Z=P.current?.getBoundingClientRect();if(!s||!Z)return;const L=H??T(S());(!b||L.x!==b.x||L.y!==b.y)&&p(L)},[s,S,T,b]);G3({containerRef:P,innerRef:F,x:b?.x,y:b?.y,onMove:N}),f.useEffect(()=>{D.current=!1},[i,k]),f.useLayoutEffect(()=>{const H=P.current?.getBoundingClientRect();!s||!H||D.current||(N(),D.current=!0)},[s,N,D.current]),f.useLayoutEffect(()=>{N(b)},[B,s]);const q=f.useMemo(()=>{if(!(!C||!w))return Ki(w,i&&C.properties[i]?{[i]:C.properties[i]}:{},c)},[C,w,i,c]),G=f.useCallback(()=>N(b),[b,N]),V=async H=>(g(null),a&&k&&A&&i?A({value:H[i],propertyKey:i,entity:k,setError:g,onValueUpdated:()=>{},fullPath:l,context:I}):Promise.resolve());if(!k)return n.jsx(n.Fragment,{});const oe=k&&n.jsxs("div",{className:`text-gray-900 dark:text-white overflow-auto rounded rounded-md bg-white dark:bg-gray-950 ${d?"":"hidden"} cursor-grab max-w-[100vw]`,children:[n.jsx(Fe.Formik,{initialValues:k?.values??{},validationSchema:q,validateOnMount:!0,validate:H=>console.debug("Validating",H),onSubmit:(H,Z)=>{V(H).then(()=>u()).finally(()=>Z.setSubmitting(!1))},children:({values:H,setFieldValue:Z,handleSubmit:L,isSubmitting:W})=>{if(f.useEffect(()=>{de(H,K)||m(H)},[H]),!k)return n.jsx(we,{error:"PopupFormField misconfiguration"});if(!C)return n.jsx(n.Fragment,{});const Q=W,X={collection:C,entityId:w,values:H,path:l,setFieldValue:Z,save:V},ee=i&&wn(C.properties,i),U=i&&ee?{propertyKey:i,disabled:W||Cn(ee)||!!ee.disabled,property:ee,includeDescription:!1,underlyingValueHasChanged:!1,context:X,tableMode:!0,partOfArray:!1,partOfBlock:!1,autoFocus:d}:void 0;let re=n.jsx(n.Fragment,{children:n.jsx("div",{className:"w-[560px] max-w-full max-h-[85vh]",children:n.jsxs(Fe.Form,{onSubmit:L,noValidate:!0,children:[n.jsx("div",{className:"mb-1 p-4 flex flex-col relative",children:n.jsx("div",{ref:F,className:"cursor-auto",style:{cursor:"auto !important"},children:U&&n.jsx(pn,{...U})})}),n.jsx(kn,{children:n.jsx(te,{variant:"filled",color:"primary",type:"submit",disabled:Q,children:"Save"})})]})},`popup_form_${e}_${w}_${i}`)});const J=I.plugins;return J&&J.forEach(Y=>{Y.form?.provider&&(re=n.jsx(Y.form.provider.Component,{status:"existing",path:l,collection:C,entity:k,context:I,currentEntityId:w,formContext:X,...Y.form.provider.props,children:re}))}),re}}),_&&n.jsx(j,{color:"error",children:_.message})]}),O=n.jsxs("div",{style:{boxShadow:"0 0 0 2px rgba(128,128,128,0.2)"},className:`inline-block fixed z-20 shadow-outline rounded-md bg-white dark:bg-gray-950 ${d?"visible":"invisible"} cursor-grab overflow-visible`,ref:P,children:[n.jsx(H3,{onResize:G}),n.jsxs("div",{className:"overflow-hidden",children:[oe,n.jsx("div",{className:"absolute -top-3.5 -right-3.5 bg-gray-500 rounded-full",style:{width:"32px",height:"32px"},children:n.jsx(R,{size:"small",onClick:H=>{H.stopPropagation(),u()},children:n.jsx(cn,{className:"text-white",size:"small"})})})]})]},`draggable_${i}_${w}_${d}`);return n.jsx(Va.Root,{asChild:!0,container:y,children:O})}const $3="collectionGroupParent",St=f.memo(function({fullPath:t,parentPathSegments:c,isSubCollection:i,className:a,...l}){const s=Qe(),d=fe(),u=Sn(),A=In(),y=En(),h=ne(),I=f.useRef(null),_=f.useMemo(()=>{const z=y?.getCollectionConfig(t);return z?qe(l,z):l},[l,t,y?.getCollectionConfig]),[g,b]=f.useState(void 0),[p,w]=f.useState(void 0),[k,v]=f.useState(0),[K,m]=f.useState(0),C=f.useCallback(()=>{const z=g;setTimeout(()=>{z===g&&b(void 0)},2400)},[g]),B=f.useCallback(z=>ct(_,A,Ze(t),z??null)?_.inlineEditing===void 0||_.inlineEditing:!1,[_,A,t]),P=_.selectionEnabled===void 0||_.selectionEnabled,F=!B(),[D,S]=f.useState(!1),T=Bt(),N=_.selectionController??T,{selectedEntities:q,toggleEntitySelection:G,isEntitySelected:V,setSelectedEntities:oe}=N;f.useEffect(()=>{w(void 0)},[q]);const O=Ct({fullPath:t,collection:_,entitiesDisplayedFirst:[],lastDeleteTimestamp:k}),H=f.useRef(Math.random().toString(36)),Z=O.popupCell,L=f.useCallback(()=>{O.setPopupCell?.(void 0)},[O.setPopupCell]),W=f.useCallback(z=>(b(z),h.onAnalyticsEvent?.("edit_entity_clicked",{path:z.path,entityId:z.id}),u.open({entityId:z.id,path:t,collection:_,updateUrl:!0,onClose:C})),[t,_,u]),Q=f.useCallback(()=>{h.onAnalyticsEvent?.("new_entity_click",{path:t}),u.open({path:t,collection:_,updateUrl:!0,onClose:C})},[t,_,u]),X=f.useCallback(z=>{h.onAnalyticsEvent?.("single_delete_dialog_open",{path:t}),w(z)},[h,t]),ee=f.useCallback(()=>{h.onAnalyticsEvent?.("multiple_delete_dialog_open",{path:t}),w(q)},[h,t,q]),U=f.useCallback((z,Ae)=>{h.onAnalyticsEvent?.("single_entity_deleted",{path:t}),oe(ae=>ae.filter(M=>M.id!==Ae.id)),v(Date.now())},[h,t,oe]),re=f.useCallback((z,Ae)=>{h.onAnalyticsEvent?.("multiple_entities_deleted",{path:t}),oe([]),w(void 0),v(Date.now())},[oe]),J=f.useCallback((z,Ae)=>{if(y){const ae=y.getCollectionConfig(z),M=qe(ae,Ae);y.onCollectionModified(z,M)}},[y]),Y=f.useCallback(({width:z,key:Ae})=>{if(!wn(_.properties,Ae))return;const ae=ra(Ae,z);J(t,ae)},[_,J,t]),x=f.useCallback(z=>{y&&J(t,{defaultSize:z})},[J,t,y]),ge=Qo(_,A,Ze(t),null),He=f.useCallback(({name:z,value:Ae,property:ae,entityId:M})=>s.checkUniqueField(t,z,Ae,ae,M),[t]),ve=({fullPath:z,context:Ae,value:ae,propertyKey:M,onValueUpdated:le,setError:Ie,entity:Oe})=>{const vn=Fe.setIn({...Oe.values},M,ae),$={path:z,entityId:Oe.id,values:vn,previousValues:Oe.values,collection:_,status:"existing"};return Fr({...$,callbacks:_.callbacks,dataSource:s,context:Ae,onSaveSuccess:()=>le(),onSaveFailure:se=>{console.error("Save failure"),console.error(se),Ie(se)}})},fn=d.resolveAliasesFrom(t),An=f.useMemo(()=>Me({collection:_,path:t,fields:h.fields}),[_,t]),zn=f.useCallback(({propertyKey:z,propertyValue:Ae,entity:ae})=>{let M=wn(_.properties,z);return M||(M=wn(An.properties,z)),Ne({propertyKey:z,propertyOrBuilder:M,path:t,propertyValue:Ae,values:ae.values,entityId:ae.id,fields:h.fields})},[_.properties,h.fields,t,An.properties]),_o=xi(An,!0),mn=f.useCallback(z=>{b(z),h.onAnalyticsEvent?.("copy_entity_click",{path:z.path,entityId:z.id}),u.open({entityId:z.id,path:t,copy:!0,collection:_,updateUrl:!0,onClose:C})},[u,_,t,C]),Hn=f.useCallback(z=>{b(z),h.onAnalyticsEvent?.("entity_click",{path:z.path,entityId:z.id}),u.open({entityId:z.id,path:z.path,collection:_,updateUrl:!0,onClose:C})},[u,_,t,C]),_n=f.useMemo(()=>{const z=_.subcollections?.map(ae=>({id:ht(ae),name:ae.name,width:200,dependencies:[],Builder:({entity:M})=>n.jsx(te,{color:"primary",variant:"outlined",startIcon:n.jsx(Eo,{size:"small"}),onClick:le=>{le.stopPropagation(),u.open({path:t,entityId:M.id,selectedSubPath:ae.alias??ae.path,collection:_,updateUrl:!0})},children:ae.name})}))??[],Ae=_.collectionGroup?[{id:$3,name:"Parent entities",width:260,dependencies:[],Builder:({entity:ae})=>{const M=d.getParentReferencesFromPath(ae.path);return n.jsx(n.Fragment,{children:M.map(le=>n.jsx(nn,{reference:le,size:"tiny"},le.path+"/"+le.id))})}}]:[];return[..._.additionalFields??[],...z,...Ae]},[_,t]),Un=f.useCallback(({entity:z,size:Ae,width:ae,frozen:M})=>{const le=V(z),Ie=it(_,A,Ze(t),z);return n.jsx(pt,{entity:z,width:ae,frozen:M,isSelected:le,selectionEnabled:P,size:Ae,toggleEntitySelection:G,onEditClicked:Hn,onCopyClicked:ge?mn:void 0,onDeleteClicked:Ie?X:void 0,hideId:_?.hideIdFromCollection})},[V,_,A,t,P,G,Hn,ge,mn]),yo=n.jsx(Ui,{open:D,onOpenChange:S,enabled:!!_.description,trigger:n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx(j,{variant:"subtitle1",className:`leading-none truncate max-w-[160px] lg:max-w-[240px] ${_.description?"cursor-pointer":"cursor-auto"}`,onClick:_.description?z=>{S(!0),z.stopPropagation()}:void 0,children:`${_.name}`}),n.jsx(j3,{fullPath:t,collection:_,filter:O.filterValues,sortBy:O.sortBy,onCountChange:m})]}),children:_.description&&n.jsx("div",{className:"m-4 text-gray-900 dark:text-white",children:n.jsx(lo,{source:_.description})})});return n.jsxs("div",{className:E("overflow-hidden h-full w-full",a),ref:I,children:[n.jsx(Kt,{additionalFields:_n,tableController:O,displayedColumnIds:_o,onSizeChanged:x,onEntityClick:W,onColumnResize:Y,onValueChange:ve,tableRowActionsBuilder:Un,uniqueFieldValidator:He,title:yo,selectionController:N,highlightedEntities:g?[g]:[],defaultSize:_.defaultSize,properties:An.properties,getPropertyFor:zn,actions:n.jsx(W3,{parentPathSegments:c??[],collection:_,tableController:O,onMultipleDeleteClick:ee,onNewClick:Q,path:t,relativePath:_.path,selectionController:N,selectionEnabled:P,collectionEntitiesCount:K}),hoverRow:F,inlineEditing:B()},`collection_table_${t}`),n.jsx(U3,{open:!!Z,onClose:L,cellRect:Z?.cellRect,propertyKey:Z?.propertyKey,collection:_,entity:Z?.entity,tableKey:H.current,customFieldValidator:He,path:fn,onCellValueChange:ve,container:I.current},`popup_form_${Z?.propertyKey}_${Z?.entity?.id}`),p&&n.jsx(V3,{entityOrEntitiesToDelete:p,path:t,collection:_,callbacks:_.callbacks,open:!!p,onEntityDelete:U,onMultipleEntitiesDelete:re,onClose:()=>w(void 0)})]})},de);function Bt(){const[e,t]=f.useState([]),c=f.useCallback(a=>{let l;e.map(s=>s.id).includes(a.id)?l=e.filter(s=>s.id!==a.id):l=[...e,a],t(l)},[e]),i=f.useCallback(a=>e.map(l=>l.id).includes(a.id),[e]);return{selectedEntities:e,setSelectedEntities:t,isEntitySelected:i,toggleEntitySelection:c}}function j3({fullPath:e,collection:t,filter:c,sortBy:i,onCountChange:a}){const l=Qe(),s=fe(),[d,u]=f.useState(void 0),[A,y]=f.useState(void 0),h=i?i[0]:void 0,I=i?i[1]:void 0,_=f.useMemo(()=>s.resolveAliasesFrom(e),[e,s.resolveAliasesFrom]);return f.useEffect(()=>{l.countEntities({path:_,collection:t,filter:c,orderBy:h,order:I}).then(u).catch(y)},[e,l,_,t,c,h,I]),f.useEffect(()=>{a&&a(d??0)},[a,d]),A?null:n.jsx(j,{className:"w-full text-ellipsis block overflow-hidden whitespace-nowrap max-w-xs text-left w-fit-content",variant:"caption",color:"secondary",children:d!==void 0?`${d} entities`:n.jsx(Ve,{className:"w-full max-w-[80px] mt-1"})})}function ra(e,t){if(e.includes(".")){const[c,...i]=e.split(".");return{properties:{[c]:ra(i.join("."),t)}}}return{properties:{[e]:{columnWidth:t}}}}function ta({onSingleEntitySelected:e,onMultipleEntitiesSelected:t,multiselect:c,collection:i,path:a,selectedEntityIds:l,description:s,forceFilter:d,maxSelection:u}){const A=Uo(),y=Sn(),h=fe(),I=ne(),_=h.resolveAliasesFrom(a),g=Qe(),[b,p]=f.useState([]),w=Bt();f.useEffect(()=>{let S=!1;const T=l?.map(N=>N?.toString()).filter(Boolean);return T&&i?Promise.all(T.map(N=>g.fetchEntity({path:_,entityId:N,collection:i}))).then(N=>{if(!S){const q=N.filter(G=>G!==void 0);w.setSelectedEntities(q),p(q)}}):(w.setSelectedEntities([]),p([])),()=>{S=!0}},[g,_,l,i,w.setSelectedEntities]);const k=f.useCallback(()=>{I.onAnalyticsEvent?.("reference_selection_clear",{path:_}),w.setSelectedEntities([]),!c&&e?e(null):t&&t([])},[c,t,e]),v=f.useCallback(S=>{let T;const N=w.selectedEntities;if(I.onAnalyticsEvent?.("reference_selection_toggle",{path:_,entityId:S.id}),N){if(N.map(q=>q.id).indexOf(S.id)>-1)T=N.filter(q=>q.id!==S.id);else{if(u&&N.length>=u)return;T=[...N,S]}w.setSelectedEntities(T),t&&t(T)}},[t,w.selectedEntities]),K=f.useCallback(S=>{!c&&e?(I.onAnalyticsEvent?.("reference_selected_single",{path:_,entityId:S.id}),e(S),A.close(!1)):v(S)},[A,c,e,v]),m=f.useCallback(()=>{I.onAnalyticsEvent?.("reference_selection_new_entity",{path:_}),y.open({path:_,collection:i,updateUrl:!0,onUpdate:({entity:S})=>{p([S,...b]),K(S)},closeOnSave:!0})},[y,_,i,b,K]),C=f.useCallback(({entity:S,size:T,width:N,frozen:q})=>{const G=w.selectedEntities,V=G&&G.map(oe=>oe.id).indexOf(S.id)>-1;return n.jsx(pt,{width:N,frozen:q,entity:S,size:T,isSelected:V,selectionEnabled:c,toggleEntitySelection:v,hideId:i?.hideIdFromCollection})},[c,w.selectedEntities,v,i?.hideIdFromCollection]),B=f.useCallback(S=>{S.stopPropagation(),A.close(!1)},[A]);if(!i)return n.jsx(we,{error:"Could not find collection with id "+i});const P=f.useMemo(()=>Me({collection:i,path:_,values:{},fields:I.fields}),[i,I.fields,_]),F=xi(P,!1),D=Ct({fullPath:_,collection:i,entitiesDisplayedFirst:b,forceFilter:d});return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsx("div",{className:"flex-grow",children:b&&n.jsx(Kt,{displayedColumnIds:F,onEntityClick:K,tableController:D,tableRowActionsBuilder:C,title:n.jsx(j,{variant:"subtitle2",children:i.singularName?`Select ${i.singularName}`:`Select from ${i.name}`}),defaultSize:i.defaultSize,properties:P.properties,forceFilter:d,inlineEditing:!1,selectionController:w,actions:n.jsx(q3,{collection:i,path:_,onNewClick:m,onClear:k})})}),n.jsxs(kn,{translucent:!1,children:[s&&n.jsx(j,{variant:"body2",className:"flex-grow text-left",children:s}),n.jsx(te,{onClick:B,color:"primary",variant:"filled",children:"Done"})]})]})}function q3({collection:e,path:t,onClear:c,onNewClick:i}){const a=In(),l=ze(),s=i?u=>{u.preventDefault(),i()}:void 0,d=Qo(e,a,Ze(t),null)&&s&&(l?n.jsxs(te,{onClick:s,startIcon:n.jsx(gn,{}),variant:"outlined",color:"primary",children:["Add ",e.singularName??e.name]}):n.jsx(te,{onClick:s,size:"medium",variant:"outlined",color:"primary",children:n.jsx(gn,{})}));return n.jsxs(n.Fragment,{children:[n.jsx(te,{onClick:c,variant:"text",color:"primary",children:"Clear"}),d]})}function dn({title:e,children:t,invisible:c=!1,initiallyExpanded:i=!0,onExpandedChange:a,titleClassName:l,asField:s,className:d}){Dn("ExpandablePanel",`
1583
+ `,Ji={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=","not-in":"not in",in:"in","array-contains":"Contains","array-contains-any":"Any"},Zi=["array-contains-any","in"];function S3({name:e,isArray:t,mode:c,value:i,setValue:a,title:l}){const s=t?["array-contains"]:["==","!=",">","<",">=","<="],[d,u]=i||[s[0],void 0],[A,y]=f.useState(d),[h,I]=f.useState(u);function _(g,b){let p=b;const w=Zi.includes(A),k=Zi.includes(g);w!==k&&(p=k?b?[b]:[]:""),y(g),I(p===null?void 0:p);const v=p!==null&&Array.isArray(p)?p.length>0:p!==void 0;a(g&&v?[g,p]:void 0)}return n.jsxs("div",{className:"flex w-[440px] items-center",children:[n.jsx("div",{className:"w-[80px]",children:n.jsx(Xe,{value:A,onValueChange:g=>{_(g,h)},renderValue:g=>Ji[g],children:s.map(g=>n.jsx(xe,{value:g,children:Ji[g]},g))})}),n.jsx("div",{className:"flex-grow ml-2",children:n.jsx(Vn,{mode:c,size:"medium",value:h,onChange:g=>{_(A,g===null?void 0:g)},clearable:!0})})]})}const Xi="collectionGroupParent";function xi(e,t){return f.useMemo(()=>e.propertiesOrder?Ri(e,e.propertiesOrder):B3(e,t),[e,t])}function Ri(e,t){return t.flatMap(c=>{const i=e.properties[c];return i?i.hideFromCollection?[null]:i.disabled&&typeof i.disabled=="object"&&i.disabled.hidden?[null]:i.dataType==="map"&&i.spreadChildren&&i.properties?vt(i,c):[{key:c,disabled:!!i.disabled||!!i.readOnly}]:e.additionalFields?.find(l=>l.id===c)?[{key:c,disabled:!0}]:e.subcollections&&e.subcollections.find(s=>ht(s)===c)?[{key:c,disabled:!0}]:e.collectionGroup&&c===Xi?[{key:c,disabled:!0}]:[null]}).filter(Boolean)}function B3(e,t){const c=Object.keys(e.properties),i=e.additionalFields??[],a=e.subcollections??[],l=[...c,...i.map(s=>s.id)];if(t){const s=a.map(d=>ht(d));l.push(...s.filter(d=>!l.includes(d)))}return e.collectionGroup&&l.push(Xi),Ri(e,l)}function vt(e,t,c){return e.dataType==="map"&&e.spreadChildren&&e.properties?Object.entries(e.properties).flatMap(([i,a])=>vt(a,`${t}.${i}`,c||!!e.disabled||!!e.readOnly)):[{key:t,disabled:c||!!e.disabled||!!e.readOnly}]}const E3={},ea=f.createContext(E3),F3=()=>f.useContext(ea),Kt=f.memo(function({forceFilter:t,actionsStart:c,actions:i,title:a,tableRowActionsBuilder:l,uniqueFieldValidator:s,getPropertyFor:d,onValueChange:u,selectionController:A,highlightedEntities:y,onEntityClick:h,onColumnResize:I,onSizeChanged:_,textSearchEnabled:g=!1,hoverRow:b=!0,inlineEditing:p=!1,additionalFields:w,displayedColumnIds:k,defaultSize:v,properties:K,tableController:{data:m,dataLoading:C,noMoreToLoad:B,dataLoadingError:P,filterValues:F,setFilterValues:D,sortBy:S,setSortBy:T,searchString:N,setSearchString:q,clearFilter:z,itemCount:V,setItemCount:oe,pageSize:O=50,paginationEnabled:H,checkFilterCombination:Z,setPopupCell:L},filterable:W=!0,sortable:Q=!0,endAdornment:X}){const ee=ze(),U=!!t,re=A?.selectedEntities?.length>0?A?.selectedEntities:y,J=ne(),[Y,x]=f.useState(v??"m"),[ge,He]=f.useState(void 0),ve=re?.map($=>$.id),fn=!!F&&Object.keys(F).length>0,An=()=>{!H||C||B||V!==void 0&&oe?.(V+O)},zn=f.useCallback(()=>{oe?.(O)},[O]),_o=f.useCallback(({rowData:$})=>{if(!p)return h&&h($)},[h,p]),mn=f.useCallback($=>{_&&_($),x($)},[]),Hn=f.useCallback($=>q?.($),[]),_n=f.useMemo(()=>w?w.map($=>({[$.id]:$})).reduce(($,se)=>({...$,...se}),{}):{},[w]);f.useEffect(()=>{const $=se=>{se.keyCode===27&&yo()};return document.addEventListener("keydown",$,!1),()=>{document.removeEventListener("keydown",$,!1)}});const Un=f.useCallback($=>{He($)},[]),yo=f.useCallback(()=>{He(void 0)},[]),G=s,Ae=f.useCallback(({column:$,columnIndex:se,rowData:Ke,rowIndex:Ue})=>{const ye=Ke,on=$.key;let Yn=$.custom?.disabled;const ho=ye.values?rn(ye.values,on):void 0,$n=d?.({propertyKey:on,propertyValue:ho,entity:ye})??$.custom.resolvedProperty;return $n?.disabled||(Yn=!1),$n?n.jsx(ie,{children:ye?n.jsx(c3,{readonly:!p,align:$.align??"left",propertyKey:on,property:$n,value:ye?.values?rn(ye.values,on):void 0,customFieldValidator:G,columnIndex:se,width:$.width,height:Ln(Y),entity:ye,disabled:Yn,path:ye.path},`property_table_cell_${ye.id}_${on}`):en()}):null},[G,p,Y,ve]),ae=f.useCallback(({column:$,rowData:se,width:Ke})=>{const Ue=se,ye=_n[$.key],on=ye.dependencies?Object.entries(Ue.values).filter(([ho,$n])=>ye.dependencies.includes(ho)).reduce((ho,$n)=>({...ho,...$n}),{}):Ue,Yn=ye.Builder;if(!Yn)throw new Error("No builder provided for additional field");return n.jsx(bt,{width:Ke,size:Y,value:on,selected:!1,disabled:!0,align:"left",allowScroll:!1,showExpandIcon:!1,disabledTooltip:"This column can't be edited directly",children:n.jsx(ie,{children:n.jsx(Yn,{entity:Ue,context:J})})},`additional_table_cell_${Ue.id}_${$.key}`)},[_n,Y,ve]),M=f.useMemo(()=>{const $=Object.entries(K).flatMap(([Ke,Ue])=>vt(Ue,Ke)).map(({key:Ke,disabled:Ue})=>{const ye=tt(K,Ke);if(!ye)throw Error("Internal error: no property found in path "+Ke);const on=na(ye);return{key:Ke,align:zz(ye),icon:Yn=>ke(ye,"small"),title:ye.name??Ke,sortable:Q&&(t?Object.keys(t).includes(Ke):!0),filter:!U&&on,width:Wi(ye),resizable:!0,custom:{resolvedProperty:ye,disabled:Ue}}}),se=w?w.map(Ke=>({key:Ke.id,align:"left",sortable:!1,title:Ke.name,width:Ke.width??200})):[];return[...$,...se]},[w,U,t,K,Q]),le=f.useMemo(()=>({key:"id_ewcfedcswdf3",width:ee?160:130,title:"ID",resizable:!1,frozen:ee,headerAlign:"center"}),[ee]),Ie=f.useMemo(()=>[le,...k.map($=>M.find(se=>se.key===$.key)).filter(Boolean)],[M,k,le]),Oe=f.useCallback($=>{const se=$.column,Ke=$.columns,Ue=se.key;if($.columnIndex===0)return l?l({entity:$.rowData,size:Y,width:se.width,frozen:se.frozen}):n.jsx(pt,{entity:$.rowData,width:se.width,frozen:se.frozen,isSelected:!1,size:Y});if(_n[Ue])return ae($);if($.columnIndex<Ke.length+1)return Ae($);throw Error("Internal: columns not mapped properly")},[_n,l,Y,ae,Ae]),vn=f.useCallback($=>{D?.({...$,...t})},[t]);return n.jsx(ea.Provider,{value:{setPopupCell:L,select:Un,onValueChange:u,size:Y,selectedCell:ge,selectedEntityIds:ve},children:n.jsxs("div",{className:"h-full w-full flex flex-col bg-white dark:bg-gray-950",children:[n.jsx(h3,{forceFilter:U,filterIsSet:fn,onTextSearch:g?Hn:void 0,clearFilter:z,size:Y,onSizeChanged:mn,title:a,actionsStart:c,actions:i,loading:C}),n.jsx($i,{data:m,columns:Ie,cellRenderer:Oe,onRowClick:p?void 0:h?_o:void 0,onEndReached:An,onResetPagination:zn,error:P,paginationEnabled:H,onColumnResize:I,size:Y,loading:C,filter:F,onFilterUpdate:D?vn:void 0,sortBy:S,onSortByUpdate:T,hoverRow:b,checkFilterCombination:Z,createFilterField:W?P3:void 0,rowClassName:f.useCallback($=>ve?.includes($.id)?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",[ve]),className:"flex-grow",endAdornment:X})]})})},de);function P3({id:e,filterValue:t,setFilterValue:c,column:i,popupOpen:a,setPopupOpen:l}){if(!i.custom)return null;const{resolvedProperty:s}=i.custom,d=s?.dataType==="array",u=d?s.of:s;if(!u)return null;if(u.dataType==="reference")return n.jsx(g3,{value:t,setValue:c,name:e,isArray:d,path:u.path,title:s?.name,previewProperties:u?.previewProperties,popupOpen:a,setPopupOpen:l});if(u.dataType==="number"||u.dataType==="string"){const A=u.name,y=u.enumValues?tn(u.enumValues):void 0;return n.jsx(I3,{value:t,setValue:c,name:e,dataType:u.dataType,isArray:d,enumValues:y,title:A})}else if(u.dataType==="boolean"){const A=u.name;return n.jsx(b3,{value:t,setValue:c,name:e,title:A})}else if(u.dataType==="date"){const A=u.name;return n.jsx(S3,{value:t,setValue:c,name:e,mode:u.mode,isArray:d,title:A})}return n.jsx("div",{children:`Currently the filter field ${s.dataType} is not supported`})}function na(e,t=!1){return t?["string","number","date","reference"].includes(e.dataType):e.dataType==="array"?e.of?na(e.of,!0):!1:["string","number","boolean","date","reference","array"].includes(e.dataType)}function D3({data:e,entitiesDisplayedFirst:t}){if(!t)return e;const c=new Set(t.map(i=>i.id));return[...t,...e.filter(i=>!c.has(i.id))]}function N3(e,t,c=5e3){const[i,a]=f.useState(e),l=f.useRef(i.length??0),s=f.useRef(!1),d=f.useRef(t),u=!de(d.current,t),A=e.length>=l.current||u;return f.useEffect(()=>{const y=()=>{de(i,e)||(d.current=t,l.current=e.length,a(e)),s.current=!1};s.current=!0;let h;return A?y():h=setTimeout(y,c),()=>{clearTimeout(h),s.current&&A&&y()}},[e,c,t,A]),A?e:i}const T3=50;function Ct({fullPath:e,collection:t,entitiesDisplayedFirst:c,lastDeleteTimestamp:i,forceFilter:a}){const{initialFilter:l,initialSort:s,forceFilter:d}=t,[u,A]=f.useState(void 0),y=fe(),h=Qe(),I=f.useMemo(()=>y.resolveAliasesFrom(e),[e,y.resolveAliasesFrom]),_=a??d,g=t.pagination===void 0||!!t.pagination,b=typeof t.pagination=="number"?t.pagination:T3,[p,w]=f.useState(),[k,v]=f.useState(g?b:void 0),K=f.useCallback((O,H)=>h.isFilterCombinationValid?h.isFilterCombinationValid({path:I,collection:t,filterValues:O,sortBy:H}):!0,[]),m=f.useMemo(()=>{if(s&&_&&!K(_,s)){console.warn("Initial sort is not compatible with the force filter. Ignoring initial sort");return}return s},[s,_]),[C,B]=f.useState(_??l??void 0),[P,F]=f.useState(m),D=f.useCallback(()=>B(_??void 0),[_]),S=f.useCallback(O=>{if(_){console.warn("Filter is not compatible with the force filter. Ignoring filter");return}O&&Object.keys(O).length===0?B(void 0):B(O)},[_]),{data:T,dataLoading:N,noMoreToLoad:q,dataLoadingError:z}=Gc({path:e,collection:t,filterValues:C,sortBy:P,searchString:p,itemCount:k}),V=D3({data:T,entitiesDisplayedFirst:c});return{data:N3(V,{filterValues:C,sortBy:P,searchString:p,lastDeleteTimestamp:i}),dataLoading:N,noMoreToLoad:q,dataLoadingError:z,filterValues:C,setFilterValues:S,sortBy:P,setSortBy:F,searchString:p,setSearchString:w,clearFilter:D,itemCount:k,setItemCount:v,paginationEnabled:g,pageSize:b,checkFilterCombination:K,popupCell:u,setPopupCell:A}}function M3(e,t){const[c,i]=f.useState(),{navigator:a}=f.useContext(be.UNSAFE_NavigationContext),l=be.useNavigate(),s=()=>{i(void 0)},d=()=>{t(),i(void 0),l(-1)},u=f.useCallback(({action:A,location:y,retry:h})=>{switch(A){case"REPLACE":{h();return}case"POP":i(y)}},[]);return f.useEffect(()=>{if(!e||c||!("block"in a))return;const A=a.block(y=>{const h={...y,retry(){A(),y.retry()}};u(h)});return A},[a,u,e,c]),{navigationWasBlocked:!!c,handleCancel:s,handleOk:d}}function O3({open:e,handleOk:t,handleCancel:c,body:i,title:a}){return n.jsxs(Jo,{open:e,onOpenChange:l=>l?c():t(),children:[n.jsxs(Zo,{children:[n.jsx(j,{variant:"h6",children:a}),i,n.jsx(j,{children:"Are you sure you want to leave this page?"})]}),n.jsxs(kn,{children:[n.jsx(te,{variant:"text",onClick:c,autoFocus:!0,children:" Cancel "}),n.jsx(te,{onClick:t,children:" Ok "})]})]})}const oa=f.createContext({width:"",blocked:!1,setBlocked:e=>{},setBlockedNavigationMessage:e=>{},close:()=>{}}),Uo=()=>f.useContext(oa);function L3(){const t=co().sidePanels,c=[...t];return c.push(void 0),n.jsx(n.Fragment,{children:c.map((i,a)=>n.jsx(Q3,{panel:i,offsetPosition:t.length-a-1},`side_dialog_${a}`))})}function Q3({offsetPosition:e,panel:t}){const[c,i]=f.useState(!1),[a,l]=f.useState(!1),[s,d]=f.useState(),u=f.useRef(t?.width),A=u.current,y=co(),{navigationWasBlocked:h,handleOk:I,handleCancel:_}=M3(a&&!c,()=>l(!1));f.useEffect(()=>{t&&(u.current=t.width)},[t]);const g=()=>{l(!1),i(!1),y.close(),t?.onClose?.()},b=()=>{i(!1)},p=w=>{a&&!w?i(!0):(y.close(),t?.onClose?.())};return n.jsxs(oa.Provider,{value:{blocked:a,setBlocked:l,setBlockedNavigationMessage:d,width:A,close:p},children:[n.jsxs(Vt,{open:!!t,onOpenChange:w=>!w&&p(),children:[t&&n.jsx("div",{className:"transform max-w-[100vw] lg:max-w-[95vw] flex flex-col h-full transition-all duration-250 ease-in-out bg-white dark:bg-gray-900 ",style:{width:t.width,transform:`translateX(-${e*200}px)`},children:n.jsx(ie,{children:t.component})}),!t&&n.jsx("div",{style:{width:A}})]}),n.jsx(O3,{open:h||c,handleOk:c?g:I,handleCancel:c?b:_,body:s})]})}function V3({entityOrEntitiesToDelete:e,collection:t,onClose:c,open:i,callbacks:a,onEntityDelete:l,onMultipleEntitiesDelete:s,path:d}){const u=Qe(),A=an(),[y,h]=f.useState(!1),[I,_]=f.useState(),[g,b]=f.useState(),p=ne();f.useEffect(()=>{if(e){const S=Array.isArray(e)&&e.length===1?e[0]:e;_(S),b(Array.isArray(S))}},[e]);const w=f.useMemo(()=>Me({collection:t,path:d,fields:p.fields}),[t,d]),k=f.useCallback(()=>{c()},[c]),v=f.useCallback(S=>{console.debug("Deleted",S)},[]),K=f.useCallback((S,T)=>{A.open({type:"error",message:"Error deleting: "+T?.message}),console.error("Error deleting entity"),console.error(T)},[w.name]),m=f.useCallback((S,T)=>{A.open({type:"error",message:"Error before deleting: "+T?.message}),console.error(T)},[w.name]),C=f.useCallback((S,T)=>{A.open({type:"error",message:"Error after deleting: "+T?.message}),console.error(T)},[w.name]),B=f.useCallback(S=>zc({dataSource:u,entity:S,collection:w,callbacks:a,onDeleteSuccess:v,onDeleteFailure:K,onPreDeleteHookError:m,onDeleteSuccessHookError:C,context:p}),[u,w,a,v,K,m,C,p]),P=f.useCallback(async()=>{I&&(h(!0),g?Promise.all(I.map(B)).then(S=>{h(!1),s&&I&&s(d,I),S.every(Boolean)?A.open({type:"success",message:`${w.name}: multiple deleted`}):S.some(Boolean)?A.open({type:"warning",message:`${w.name}: Some of the entities have been deleted, but not all`}):A.open({type:"error",message:`${w.name}: Error deleting entities`}),c()}):B(I).then(S=>{h(!1),S&&(l&&I&&l(d,I),A.open({type:"success",message:`${w.singularName??w.name} deleted`}),c())}))},[I,g,B,s,d,c,A,w.name,l]);let F;if(I&&g)F=n.jsx(n.Fragment,{children:"Multiple entities"});else{const S=I;F=S?n.jsx(yt,{entity:S,collection:t,path:d}):n.jsx(n.Fragment,{})}const D=g?n.jsxs(n.Fragment,{children:[n.jsx("b",{children:w.name}),": Confirm multiple delete?"]}):`Would you like to delete this ${w.singularName??w.name}?`;return n.jsxs(Jo,{maxWidth:"2xl","aria-labelledby":"delete-dialog",open:i,onOpenChange:S=>S?void 0:c(),children:[n.jsxs(Zo,{fullHeight:!0,children:[n.jsx(j,{variant:"subtitle2",className:"p-4",children:D}),!g&&n.jsx("div",{className:"p-4",children:F})]}),n.jsxs(kn,{children:[y&&n.jsx(Gn,{size:"small"}),n.jsx(te,{onClick:k,disabled:y,variant:"text",color:"primary",children:"Cancel"}),n.jsx(te,{autoFocus:!0,disabled:y,onClick:P,variant:"filled",color:"primary",children:"Ok"})]})]})}function Yo(e){return Array.isArray(e)?e:e?[e]:[]}function W3({collection:e,relativePath:t,parentPathSegments:c,onNewClick:i,onMultipleDeleteClick:a,selectionEnabled:l,path:s,selectionController:d,tableController:u,collectionEntitiesCount:A}){const y=ne(),h=y.plugins??[],I=In(),_=ze(),g=d.selectedEntities,b=Qo(e,I,Ze(s),null)&&i&&(_?n.jsxs(te,{id:`add_entity_${s}`,onClick:i,startIcon:n.jsx(gn,{}),size:"large",variant:"filled",color:"primary",children:["Add ",e.singularName??e.name]}):n.jsx(te,{id:`add_entity_${s}`,onClick:i,size:"medium",variant:"filled",color:"primary",children:n.jsx(gn,{})})),p=it(e,I,Ze(s),null);let w;if(l){const m=_?n.jsxs(te,{variant:"text",disabled:!g?.length||!p,startIcon:n.jsx(Bo,{}),onClick:a,color:"primary",className:"lg:w-20",children:["(",g?.length,")"]}):n.jsx(R,{color:"primary",disabled:!g?.length||!p,onClick:a,children:n.jsx(Bo,{})});w=n.jsx(_e,{title:p?"Delete":"You have selected at least one entity you cannot delete",children:m})}const k={path:s,relativePath:t,parentPathSegments:c,collection:e,selectionController:d,context:y,tableController:u,collectionEntitiesCount:A},v=[];v.push(...Yo(e.Actions)),h&&h.forEach(m=>{m.collections?.CollectionActions&&v.push(...Yo(m.collections?.CollectionActions))});const K=n.jsx(n.Fragment,{children:v.map((m,C)=>n.jsx(m,{...k},`actions_${C}`))});return n.jsxs(n.Fragment,{children:[K,w,b]})}function G3({containerRef:e,innerRef:t,x:c,y:i,onMove:a}){let l=0,s=0;const d=f.useRef(!1),u=g=>{if(g.button!==0||!e.current||g.defaultPrevented||g.innerClicked)return;const{x:b,y:p}=e.current.getBoundingClientRect();l=g.screenX-b,s=g.screenY-p,document.addEventListener("mousemove",I),document.addEventListener("mouseup",h),document.addEventListener("selectstart",y),d.current=!0},A=g=>{g.innerClicked=!0},y=g=>{g.preventDefault(),g.stopPropagation()},h=g=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",h),document.removeEventListener("selectstart",y),g.stopPropagation(),d.current=!1},I=g=>{g.target.localName==="input"||!d.current||(a({x:g.screenX-l,y:g.screenY-s}),g.stopPropagation())},_=()=>{e.current&&(e.current.style.top=`${i}px`,e.current.style.left=`${c}px`)};f.useEffect(()=>{const g=e.current,b=t.current;if(!(!g||!b))return b&&b.addEventListener("mousedown",A),g&&g.addEventListener("mousedown",u),_(),()=>{g&&g.removeEventListener("mousedown",u),b&&b.removeEventListener("mousedown",A)}})}function z3(){const[e,t]=f.useState({width:0,height:0});return f.useLayoutEffect(()=>{function c(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",c),c(),()=>window.removeEventListener("resize",c)},[]),e}const H3=({onResize:e})=>{const t=f.useRef(0),c=f.useRef(null),i=f.useRef(e);i.current=e;const a=f.useCallback(s=>{t.current&&cancelAnimationFrame(t.current),t.current=requestAnimationFrame(()=>{i.current(s)})},[]),l=f.useCallback(()=>{const s=c.current;s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.addEventListener("resize",a)},[a]);return f.useEffect(()=>{const s=c.current;return()=>{s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.removeEventListener("resize",a)}},[a]),n.jsx("object",{onLoad:l,ref:c,tabIndex:-1,type:"text/html",data:"about:blank",title:"",style:{position:"absolute",top:0,left:0,height:"100%",width:"100%",pointerEvents:"none",zIndex:-1,opacity:0}})};function U3(e){return e.open?n.jsx(Y3,{...e}):null}function Y3({tableKey:e,entity:t,customFieldValidator:c,propertyKey:i,collection:a,path:l,cellRect:s,open:d,onClose:u,onCellValueChange:A,container:y}){const h=Qe(),I=ne(),[_,g]=f.useState(),[b,p]=f.useState(),w=t?.id,[k,v]=f.useState(t);f.useEffect(()=>w&&a?h.listenEntity?.({path:l,entityId:w,collection:a,onUpdate:v}):()=>{},[h,w,a,l]);const[K,m]=f.useState(k?.values),C=a?Me({collection:a,path:l,values:K,entityId:w,fields:I.fields}):void 0,B=z3(),P=f.useRef(null),F=f.useRef(null),D=f.useRef(!1),S=f.useCallback(()=>{if(!s)throw Error("getInitialLocation error");return{x:s.left<B.width-s.right?s.x+s.width/2:s.x-s.width/2,y:s.top<B.height-s.bottom?s.y+s.height/2:s.y-s.height/2}},[s,B.height,B.width]),T=f.useCallback(({x:H,y:Z})=>{const L=P.current?.getBoundingClientRect();if(!L)throw Error("normalizePosition called before draggableBoundingRect is set");return{x:Math.max(0,Math.min(H,B.width-L.width)),y:Math.max(0,Math.min(Z,B.height-L.height))}},[B]),N=f.useCallback(H=>{const Z=P.current?.getBoundingClientRect();if(!s||!Z)return;const L=H??T(S());(!b||L.x!==b.x||L.y!==b.y)&&p(L)},[s,S,T,b]);G3({containerRef:P,innerRef:F,x:b?.x,y:b?.y,onMove:N}),f.useEffect(()=>{D.current=!1},[i,k]),f.useLayoutEffect(()=>{const H=P.current?.getBoundingClientRect();!s||!H||D.current||(N(),D.current=!0)},[s,N,D.current]),f.useLayoutEffect(()=>{N(b)},[B,s]);const q=f.useMemo(()=>{if(!(!C||!w))return Ki(w,i&&C.properties[i]?{[i]:C.properties[i]}:{},c)},[C,w,i,c]),z=f.useCallback(()=>N(b),[b,N]),V=async H=>(g(null),a&&k&&A&&i?A({value:H[i],propertyKey:i,entity:k,setError:g,onValueUpdated:()=>{},fullPath:l,context:I}):Promise.resolve());if(!k)return n.jsx(n.Fragment,{});const oe=k&&n.jsxs("div",{className:`text-gray-900 dark:text-white overflow-auto rounded rounded-md bg-white dark:bg-gray-950 ${d?"":"hidden"} cursor-grab max-w-[100vw]`,children:[n.jsx(Fe.Formik,{initialValues:k?.values??{},validationSchema:q,validateOnMount:!0,validate:H=>console.debug("Validating",H),onSubmit:(H,Z)=>{V(H).then(()=>u()).finally(()=>Z.setSubmitting(!1))},children:({values:H,setFieldValue:Z,handleSubmit:L,isSubmitting:W})=>{if(f.useEffect(()=>{de(H,K)||m(H)},[H]),!k)return n.jsx(we,{error:"PopupFormField misconfiguration"});if(!C)return n.jsx(n.Fragment,{});const Q=W,X={collection:C,entityId:w,values:H,path:l,setFieldValue:Z,save:V},ee=i&&wn(C.properties,i),U=i&&ee?{propertyKey:i,disabled:W||Cn(ee)||!!ee.disabled,property:ee,includeDescription:!1,underlyingValueHasChanged:!1,context:X,tableMode:!0,partOfArray:!1,partOfBlock:!1,autoFocus:d}:void 0;let re=n.jsx(n.Fragment,{children:n.jsx("div",{className:"w-[560px] max-w-full max-h-[85vh]",children:n.jsxs(Fe.Form,{onSubmit:L,noValidate:!0,children:[n.jsx("div",{className:"mb-1 p-4 flex flex-col relative",children:n.jsx("div",{ref:F,className:"cursor-auto",style:{cursor:"auto !important"},children:U&&n.jsx(pn,{...U})})}),n.jsx(kn,{children:n.jsx(te,{variant:"filled",color:"primary",type:"submit",disabled:Q,children:"Save"})})]})},`popup_form_${e}_${w}_${i}`)});const J=I.plugins;return J&&J.forEach(Y=>{Y.form?.provider&&(re=n.jsx(Y.form.provider.Component,{status:"existing",path:l,collection:C,entity:k,context:I,currentEntityId:w,formContext:X,...Y.form.provider.props,children:re}))}),re}}),_&&n.jsx(j,{color:"error",children:_.message})]}),O=n.jsxs("div",{style:{boxShadow:"0 0 0 2px rgba(128,128,128,0.2)"},className:`inline-block fixed z-20 shadow-outline rounded-md bg-white dark:bg-gray-950 ${d?"visible":"invisible"} cursor-grab overflow-visible`,ref:P,children:[n.jsx(H3,{onResize:z}),n.jsxs("div",{className:"overflow-hidden",children:[oe,n.jsx("div",{className:"absolute -top-3.5 -right-3.5 bg-gray-500 rounded-full",style:{width:"32px",height:"32px"},children:n.jsx(R,{size:"small",onClick:H=>{H.stopPropagation(),u()},children:n.jsx(cn,{className:"text-white",size:"small"})})})]})]},`draggable_${i}_${w}_${d}`);return n.jsx(Va.Root,{asChild:!0,container:y,children:O})}const $3="collectionGroupParent",St=f.memo(function({fullPath:t,parentPathSegments:c,isSubCollection:i,className:a,...l}){const s=Qe(),d=fe(),u=Sn(),A=In(),y=En(),h=ne(),I=f.useRef(null),_=f.useMemo(()=>{const G=y?.getCollectionConfig(t);return G?qe(l,G):l},[l,t,y?.getCollectionConfig]),[g,b]=f.useState(void 0),[p,w]=f.useState(void 0),[k,v]=f.useState(0),[K,m]=f.useState(0),C=f.useCallback(()=>{const G=g;setTimeout(()=>{G===g&&b(void 0)},2400)},[g]),B=f.useCallback(G=>ct(_,A,Ze(t),G??null)?_.inlineEditing===void 0||_.inlineEditing:!1,[_,A,t]),P=_.selectionEnabled===void 0||_.selectionEnabled,F=!B(),[D,S]=f.useState(!1),T=Bt(),N=_.selectionController??T,{selectedEntities:q,toggleEntitySelection:z,isEntitySelected:V,setSelectedEntities:oe}=N;f.useEffect(()=>{w(void 0)},[q]);const O=Ct({fullPath:t,collection:_,entitiesDisplayedFirst:[],lastDeleteTimestamp:k}),H=f.useRef(Math.random().toString(36)),Z=O.popupCell,L=f.useCallback(()=>{O.setPopupCell?.(void 0)},[O.setPopupCell]),W=f.useCallback(G=>(b(G),h.onAnalyticsEvent?.("edit_entity_clicked",{path:G.path,entityId:G.id}),u.open({entityId:G.id,path:G.path,collection:_,updateUrl:!0,onClose:C})),[t,_,u]),Q=f.useCallback(()=>{h.onAnalyticsEvent?.("new_entity_click",{path:t}),u.open({path:t,collection:_,updateUrl:!0,onClose:C})},[t,_,u]),X=f.useCallback(G=>{h.onAnalyticsEvent?.("single_delete_dialog_open",{path:t}),w(G)},[h,t]),ee=f.useCallback(()=>{h.onAnalyticsEvent?.("multiple_delete_dialog_open",{path:t}),w(q)},[h,t,q]),U=f.useCallback((G,Ae)=>{h.onAnalyticsEvent?.("single_entity_deleted",{path:t}),oe(ae=>ae.filter(M=>M.id!==Ae.id)),v(Date.now())},[h,t,oe]),re=f.useCallback((G,Ae)=>{h.onAnalyticsEvent?.("multiple_entities_deleted",{path:t}),oe([]),w(void 0),v(Date.now())},[oe]),J=f.useCallback((G,Ae)=>{if(y){const ae=y.getCollectionConfig(G),M=qe(ae,Ae);y.onCollectionModified(G,M)}},[y]),Y=f.useCallback(({width:G,key:Ae})=>{if(!wn(_.properties,Ae))return;const ae=ra(Ae,G);J(t,ae)},[_,J,t]),x=f.useCallback(G=>{y&&J(t,{defaultSize:G})},[J,t,y]),ge=Qo(_,A,Ze(t),null),He=f.useCallback(({name:G,value:Ae,property:ae,entityId:M})=>s.checkUniqueField(t,G,Ae,ae,M),[t]),ve=({fullPath:G,context:Ae,value:ae,propertyKey:M,onValueUpdated:le,setError:Ie,entity:Oe})=>{const vn=Fe.setIn({...Oe.values},M,ae),$={path:G,entityId:Oe.id,values:vn,previousValues:Oe.values,collection:_,status:"existing"};return Fr({...$,callbacks:_.callbacks,dataSource:s,context:Ae,onSaveSuccess:()=>le(),onSaveFailure:se=>{console.error("Save failure"),console.error(se),Ie(se)}})},fn=d.resolveAliasesFrom(t),An=f.useMemo(()=>Me({collection:_,path:t,fields:h.fields}),[_,t]),zn=f.useCallback(({propertyKey:G,propertyValue:Ae,entity:ae})=>{let M=wn(_.properties,G);return M||(M=wn(An.properties,G)),Ne({propertyKey:G,propertyOrBuilder:M,path:t,propertyValue:Ae,values:ae.values,entityId:ae.id,fields:h.fields})},[_.properties,h.fields,t,An.properties]),_o=xi(An,!0),mn=f.useCallback(G=>{b(G),h.onAnalyticsEvent?.("copy_entity_click",{path:G.path,entityId:G.id}),u.open({entityId:G.id,path:G.path,copy:!0,collection:_,updateUrl:!0,onClose:C})},[u,_,t,C]),Hn=f.useCallback(G=>{b(G),h.onAnalyticsEvent?.("entity_click",{path:G.path,entityId:G.id}),u.open({entityId:G.id,path:G.path,collection:_,updateUrl:!0,onClose:C})},[u,_,t,C]),_n=f.useMemo(()=>{const G=_.subcollections?.map(ae=>({id:ht(ae),name:ae.name,width:200,dependencies:[],Builder:({entity:M})=>n.jsx(te,{color:"primary",variant:"outlined",startIcon:n.jsx(Eo,{size:"small"}),onClick:le=>{le.stopPropagation(),u.open({path:t,entityId:M.id,selectedSubPath:ae.alias??ae.path,collection:_,updateUrl:!0})},children:ae.name})}))??[],Ae=_.collectionGroup?[{id:$3,name:"Parent entities",width:260,dependencies:[],Builder:({entity:ae})=>{const M=d.getParentReferencesFromPath(ae.path);return n.jsx(n.Fragment,{children:M.map(le=>n.jsx(nn,{reference:le,size:"tiny"},le.path+"/"+le.id))})}}]:[];return[..._.additionalFields??[],...G,...Ae]},[_,t]),Un=f.useCallback(({entity:G,size:Ae,width:ae,frozen:M})=>{const le=V(G),Ie=it(_,A,Ze(t),G);return n.jsx(pt,{entity:G,width:ae,frozen:M,isSelected:le,selectionEnabled:P,size:Ae,toggleEntitySelection:z,onEditClicked:Hn,onCopyClicked:ge?mn:void 0,onDeleteClicked:Ie?X:void 0,hideId:_?.hideIdFromCollection})},[V,_,A,t,P,z,Hn,ge,mn]),yo=n.jsx(Ui,{open:D,onOpenChange:S,enabled:!!_.description,trigger:n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx(j,{variant:"subtitle1",className:`leading-none truncate max-w-[160px] lg:max-w-[240px] ${_.description?"cursor-pointer":"cursor-auto"}`,onClick:_.description?G=>{S(!0),G.stopPropagation()}:void 0,children:`${_.name}`}),n.jsx(j3,{fullPath:t,collection:_,filter:O.filterValues,sortBy:O.sortBy,onCountChange:m})]}),children:_.description&&n.jsx("div",{className:"m-4 text-gray-900 dark:text-white",children:n.jsx(lo,{source:_.description})})});return n.jsxs("div",{className:E("overflow-hidden h-full w-full",a),ref:I,children:[n.jsx(Kt,{additionalFields:_n,tableController:O,displayedColumnIds:_o,onSizeChanged:x,onEntityClick:W,onColumnResize:Y,onValueChange:ve,tableRowActionsBuilder:Un,uniqueFieldValidator:He,title:yo,selectionController:N,highlightedEntities:g?[g]:[],defaultSize:_.defaultSize,properties:An.properties,getPropertyFor:zn,actions:n.jsx(W3,{parentPathSegments:c??[],collection:_,tableController:O,onMultipleDeleteClick:ee,onNewClick:Q,path:t,relativePath:_.path,selectionController:N,selectionEnabled:P,collectionEntitiesCount:K}),hoverRow:F,inlineEditing:B()},`collection_table_${t}`),n.jsx(U3,{open:!!Z,onClose:L,cellRect:Z?.cellRect,propertyKey:Z?.propertyKey,collection:_,entity:Z?.entity,tableKey:H.current,customFieldValidator:He,path:fn,onCellValueChange:ve,container:I.current},`popup_form_${Z?.propertyKey}_${Z?.entity?.id}`),p&&n.jsx(V3,{entityOrEntitiesToDelete:p,path:t,collection:_,callbacks:_.callbacks,open:!!p,onEntityDelete:U,onMultipleEntitiesDelete:re,onClose:()=>w(void 0)})]})},de);function Bt(){const[e,t]=f.useState([]),c=f.useCallback(a=>{let l;e.map(s=>s.id).includes(a.id)?l=e.filter(s=>s.id!==a.id):l=[...e,a],t(l)},[e]),i=f.useCallback(a=>e.map(l=>l.id).includes(a.id),[e]);return{selectedEntities:e,setSelectedEntities:t,isEntitySelected:i,toggleEntitySelection:c}}function j3({fullPath:e,collection:t,filter:c,sortBy:i,onCountChange:a}){const l=Qe(),s=fe(),[d,u]=f.useState(void 0),[A,y]=f.useState(void 0),h=i?i[0]:void 0,I=i?i[1]:void 0,_=f.useMemo(()=>s.resolveAliasesFrom(e),[e,s.resolveAliasesFrom]);return f.useEffect(()=>{l.countEntities({path:_,collection:t,filter:c,orderBy:h,order:I}).then(u).catch(y)},[e,l,_,t,c,h,I]),f.useEffect(()=>{a&&a(d??0)},[a,d]),A?null:n.jsx(j,{className:"w-full text-ellipsis block overflow-hidden whitespace-nowrap max-w-xs text-left w-fit-content",variant:"caption",color:"secondary",children:d!==void 0?`${d} entities`:n.jsx(Ve,{className:"w-full max-w-[80px] mt-1"})})}function ra(e,t){if(e.includes(".")){const[c,...i]=e.split(".");return{properties:{[c]:ra(i.join("."),t)}}}return{properties:{[e]:{columnWidth:t}}}}function ta({onSingleEntitySelected:e,onMultipleEntitiesSelected:t,multiselect:c,collection:i,path:a,selectedEntityIds:l,description:s,forceFilter:d,maxSelection:u}){const A=Uo(),y=Sn(),h=fe(),I=ne(),_=h.resolveAliasesFrom(a),g=Qe(),[b,p]=f.useState([]),w=Bt();f.useEffect(()=>{let S=!1;const T=l?.map(N=>N?.toString()).filter(Boolean);return T&&i?Promise.all(T.map(N=>g.fetchEntity({path:_,entityId:N,collection:i}))).then(N=>{if(!S){const q=N.filter(z=>z!==void 0);w.setSelectedEntities(q),p(q)}}):(w.setSelectedEntities([]),p([])),()=>{S=!0}},[g,_,l,i,w.setSelectedEntities]);const k=f.useCallback(()=>{I.onAnalyticsEvent?.("reference_selection_clear",{path:_}),w.setSelectedEntities([]),!c&&e?e(null):t&&t([])},[c,t,e]),v=f.useCallback(S=>{let T;const N=w.selectedEntities;if(I.onAnalyticsEvent?.("reference_selection_toggle",{path:_,entityId:S.id}),N){if(N.map(q=>q.id).indexOf(S.id)>-1)T=N.filter(q=>q.id!==S.id);else{if(u&&N.length>=u)return;T=[...N,S]}w.setSelectedEntities(T),t&&t(T)}},[t,w.selectedEntities]),K=f.useCallback(S=>{!c&&e?(I.onAnalyticsEvent?.("reference_selected_single",{path:_,entityId:S.id}),e(S),A.close(!1)):v(S)},[A,c,e,v]),m=f.useCallback(()=>{I.onAnalyticsEvent?.("reference_selection_new_entity",{path:_}),y.open({path:_,collection:i,updateUrl:!0,onUpdate:({entity:S})=>{p([S,...b]),K(S)},closeOnSave:!0})},[y,_,i,b,K]),C=f.useCallback(({entity:S,size:T,width:N,frozen:q})=>{const z=w.selectedEntities,V=z&&z.map(oe=>oe.id).indexOf(S.id)>-1;return n.jsx(pt,{width:N,frozen:q,entity:S,size:T,isSelected:V,selectionEnabled:c,toggleEntitySelection:v,hideId:i?.hideIdFromCollection})},[c,w.selectedEntities,v,i?.hideIdFromCollection]),B=f.useCallback(S=>{S.stopPropagation(),A.close(!1)},[A]);if(!i)return n.jsx(we,{error:"Could not find collection with id "+i});const P=f.useMemo(()=>Me({collection:i,path:_,values:{},fields:I.fields}),[i,I.fields,_]),F=xi(P,!1),D=Ct({fullPath:_,collection:i,entitiesDisplayedFirst:b,forceFilter:d});return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsx("div",{className:"flex-grow",children:b&&n.jsx(Kt,{displayedColumnIds:F,onEntityClick:K,tableController:D,tableRowActionsBuilder:C,title:n.jsx(j,{variant:"subtitle2",children:i.singularName?`Select ${i.singularName}`:`Select from ${i.name}`}),defaultSize:i.defaultSize,properties:P.properties,forceFilter:d,inlineEditing:!1,selectionController:w,actions:n.jsx(q3,{collection:i,path:_,onNewClick:m,onClear:k})})}),n.jsxs(kn,{translucent:!1,children:[s&&n.jsx(j,{variant:"body2",className:"flex-grow text-left",children:s}),n.jsx(te,{onClick:B,color:"primary",variant:"filled",children:"Done"})]})]})}function q3({collection:e,path:t,onClear:c,onNewClick:i}){const a=In(),l=ze(),s=i?u=>{u.preventDefault(),i()}:void 0,d=Qo(e,a,Ze(t),null)&&s&&(l?n.jsxs(te,{onClick:s,startIcon:n.jsx(gn,{}),variant:"outlined",color:"primary",children:["Add ",e.singularName??e.name]}):n.jsx(te,{onClick:s,size:"medium",variant:"outlined",color:"primary",children:n.jsx(gn,{})}));return n.jsxs(n.Fragment,{children:[n.jsx(te,{onClick:c,variant:"text",color:"primary",children:"Clear"}),d]})}function dn({title:e,children:t,invisible:c=!1,initiallyExpanded:i=!0,onExpandedChange:a,titleClassName:l,asField:s,className:d}){Dn("ExpandablePanel",`
1584
1584
  .CollapsibleContent {
1585
1585
  overflow: hidden;
1586
1586
  }
@@ -1607,5 +1607,5 @@
1607
1607
  to {
1608
1608
  height: 0;
1609
1609
  }
1610
- }`);const[u,A]=f.useState(i),[y,h]=f.useState(u);return f.useEffect(()=>{u?setTimeout(()=>{h(!0)},220):h(!1)},[u]),n.jsx(n.Fragment,{children:n.jsxs(qn.Root,{className:E(!c&&ue+" border","rounded-md"),open:u,onOpenChange:I=>{a?.(I),A(I)},children:[n.jsxs(qn.Trigger,{className:E(he,"rounded flex items-center justify-between w-full min-h-[52px]",c?"border-b px-2":"p-4",c&&ue,s&&Je,l),children:[e,n.jsx(oo,{className:E("transition",u?"rotate-180":"")})]}),n.jsx(qn.Content,{className:E("CollapsibleContent"),style:{overflow:y?"visible":"hidden"},children:n.jsx("div",{className:d,children:t})})]})})}function Et({children:e,group:t}){const c=En();return n.jsx(dn,{invisible:!0,titleClassName:"font-medium text-sm text-gray-600 dark:text-gray-400",className:"py-4",initiallyExpanded:!(c?.collapsedGroups??[]).includes(t??"ungrouped"),onExpandedChange:i=>{if(c)if(i)c.setCollapsedGroups((c.collapsedGroups??[]).filter(a=>a!==(t??"ungrouped")));else{const a=(c.collapsedGroups??[]).concat(t??"ungrouped");c.setCollapsedGroups(a)}},title:n.jsx(j,{color:"secondary",className:"font-medium ml-1",children:t?.toUpperCase()??"Views".toUpperCase()}),children:n.jsx("div",{className:"mb-8",children:e})})}function ca({view:e,path:t,collection:c,url:i,name:a,description:l,onClick:s}){const d=En(),u=Vo(c??e),A=be.useNavigate(),y=ne(),h=(d?.favouritePaths??[]).includes(t);let I;if(y.plugins&&c){const _={path:t,collection:c,context:y};I=n.jsx(n.Fragment,{children:y.plugins.map((g,b)=>g.homePage?.CollectionActions?n.jsx(g.homePage.CollectionActions,{..._,extraProps:g.homePage.extraProps},`actions_${b}`):null)})}return n.jsx(ga,{className:E("h-full p-4 cursor-pointer min-h-[230px]"),onClick:()=>{s?.(),A(i),d&&d.setRecentlyVisitedPaths([t,...(d.recentlyVisitedPaths??[]).filter(_=>_!==t)])},children:n.jsxs("div",{className:"flex flex-col items-start h-full",children:[n.jsxs("div",{className:"flex-grow w-full",children:[n.jsxs("div",{className:"h-10 flex items-center w-full justify-between text-gray-300 dark:text-gray-600",children:[u,n.jsxs("div",{className:"flex items-center gap-1",onClick:_=>{_.preventDefault(),_.stopPropagation()},children:[I,d&&n.jsx(R,{onClick:_=>{_.preventDefault(),_.stopPropagation(),h?d.setFavouritePaths(d.favouritePaths.filter(g=>g!==t)):d.setFavouritePaths([...d.favouritePaths,t])},children:h?n.jsx(vr,{size:18,className:"text-secondary"}):n.jsx(Kr,{size:18,className:"text-gray-400 dark:text-gray-500"})})]})]}),n.jsx(j,{gutterBottom:!0,variant:"h5",component:"h2",children:a}),l&&n.jsx(j,{variant:"body2",color:"secondary",component:"div",children:n.jsx(lo,{source:l})})]}),n.jsx("div",{style:{alignSelf:"flex-end"},children:n.jsx("div",{className:"p-4",children:n.jsx(cc,{className:"text-primary"})})})]})})}function J3({entry:e}){const t=be.useNavigate(),c=En();if(!c)return null;const i=c.favouritePaths.includes(e.path),a=l=>{l.preventDefault(),l.stopPropagation(),i?c.setFavouritePaths(c.favouritePaths.filter(s=>s!==e.path)):c.setFavouritePaths([...c.favouritePaths,e.path])};return n.jsx(Fo,{onClick:()=>t(e.url),icon:i?n.jsx(vr,{onClick:a,size:18,className:"text-secondary"}):n.jsx(Kr,{onClick:a,size:18,className:"text-gray-400 dark:text-gray-500"}),children:e.name},e.path)}function Z3({hidden:e}){const t=fe(),c=En();if(!c)return null;const i=(c?.favouritePaths??[]).map(a=>t.topLevelNavigation?.navigationEntries.find(l=>l.path===a)).filter(Boolean);return n.jsx(To,{in:i.length>0,children:n.jsx("div",{className:"flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]",children:i.map(a=>n.jsx(J3,{entry:a},a.path))})})}const Ft={};function X3(){const e=be.useLocation(),t=f.useRef(null),[c,i]=f.useState(0),[a,l]=f.useState("down"),s=f.useCallback(()=>{!t.current||!e.key||(Ft[e.key]=t.current.scrollTop,i(t.current.scrollTop),l(t.current.scrollTop>c?"down":"up"))},[t,e.key,c]);return f.useEffect(()=>{const d=t.current;if(d)return d.addEventListener("scroll",s,{passive:!0}),()=>{d&&d.removeEventListener("scroll",s)}},[t,s,e]),f.useEffect(()=>{!t.current||!Ft[e.key]||t.current.scrollTo({top:Ft[e.key],behavior:"auto"})},[e]),{containerRef:t,scroll:c,direction:a}}const Wn=new Qa.Search("url");Wn.addIndex("name"),Wn.addIndex("description"),Wn.addIndex("group"),Wn.addIndex("path");function ia({additionalChildrenStart:e,additionalChildrenEnd:t}){const c=ne(),i=fe();if(!i.topLevelNavigation)throw Error("Navigation not ready in FireCMSHomePage");const{containerRef:a,scroll:l,direction:s}=X3(),{navigationEntries:d,groups:u}=i.topLevelNavigation,[A,y]=f.useState(null),h=A?d.filter(p=>A.includes(p.url)):d;f.useEffect(()=>{Wn.addDocuments(d)},[d]);const I=f.useCallback(p=>{if(!p||p==="")y(null);else{const w=Wn.search(p);y(w.map(k=>k.url))}},[]),_=[...u];(h.filter(p=>!p.group).length>0||h.length===0)&&_.push(void 0);let g,b;if(c.plugins){const p={context:c};b=n.jsx(n.Fragment,{children:c.plugins.filter(w=>w.homePage?.includeSection).map((w,k)=>{const v=w.homePage.includeSection(p);return n.jsx(Et,{group:v.title,children:v.children},`plugin_section_${w.name}`)})}),g=n.jsx("div",{className:"flex flex-col gap-2",children:c.plugins.filter(w=>w.homePage?.additionalChildrenStart).map((w,k)=>n.jsx("div",{children:w.homePage.additionalChildrenStart},`plugin_children_start_${k}`))})}return n.jsx("div",{id:"home_page",ref:a,className:"py-2 overflow-auto h-full w-full",children:n.jsxs(Ot,{maxWidth:"6xl",children:[n.jsx("div",{className:"sticky py-4 transition-all duration-400 ease-in-out top-0 z-10",style:{top:s==="down"?-84:0},children:n.jsx(Qt,{onTextSearch:I,placeholder:"Search collections",large:!1,className:"w-full"})}),n.jsx(Z3,{hidden:!!A}),e,g,_.map((p,w)=>{const k=[],v={group:p,context:c};c.plugins&&c.plugins.forEach(m=>{m.homePage?.AdditionalCards&&k.push(...Yo(m.homePage?.AdditionalCards))});const K=h.filter(m=>m.group===p||!m.group&&p===void 0);return K.length===0&&k.length===0?null:n.jsx(Et,{group:p,children:n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[K.map(m=>n.jsx("div",{className:"col-span-1",children:n.jsx(ca,{...m,onClick:()=>{const C=m.type==="collection"?"home_navigate_to_collection":m.type==="view"?"home_navigate_to_view":"unmapped_event";c.onAnalyticsEvent?.(C,{path:m.path})}})},`nav_${m.group}_${m.name}`)),k&&k.map((m,C)=>n.jsx("div",{children:n.jsx(m,{...v})},`nav_${p}_add_${C}`))]})},`plugin_section_${p}`)}),b,t]})})}function x3({fieldConfig:e}){const t="h-8 w-8 p-1 rounded-full shadow text-white";return n.jsx("div",{className:t,style:{background:e?.color??"#888"},children:rt(e,"medium")})}function R3({children:e,title:t,path:c}){const i=Dr();return f.useEffect(()=>{i.set({breadcrumbs:[{title:t,url:c}]})},[c,t]),n.jsx(n.Fragment,{children:e})}function aa(){return n.jsx("div",{className:"flex w-full h-full",children:n.jsxs("div",{className:"m-auto flex items-center flex-col",children:[n.jsx(j,{variant:"h4",align:"center",gutterBottom:!0,children:"Page not found"}),n.jsx(j,{align:"center",gutterBottom:!0,children:"This page does not exist or you may not have access to it"}),n.jsx(te,{variant:"text",component:be.Link,to:"/",children:"Back to home"})]})})}function eH({open:e,onAccept:t,onCancel:c,title:i,loading:a,body:l}){return n.jsxs(Jo,{open:e,onOpenChange:s=>s?void 0:c(),children:[n.jsxs(Zo,{children:[n.jsx(j,{variant:"h6",className:"mb-2",children:i}),l]}),n.jsxs(kn,{children:[n.jsx(te,{variant:"text",onClick:c,autoFocus:!0,children:"Cancel"}),n.jsx(Ia,{color:"primary",type:"submit",loading:a,onClick:t,children:"Ok"})]})]})}function la({width:e,height:t,className:c,style:i}){return n.jsxs("svg",{width:e??"100%",height:t??"100%",viewBox:"0 0 599 599",version:"1.1",style:i,className:c,xmlns:"http://www.w3.org/2000/svg",children:[n.jsxs("defs",{children:[n.jsxs("radialGradient",{cx:"28.6213569%",cy:"43.1133328%",fx:"28.6213569%",fy:"43.1133328%",r:"71.5003456%",gradientTransform:"translate(0.286214,0.431133),rotate(3.343450),scale(1.000000,0.996175),translate(-0.286214,-0.431133)",id:"radialGradient-1",children:[n.jsx("stop",{stopColor:"#FF5B79",offset:"0%"}),n.jsx("stop",{stopColor:"#FA5574",offset:"28.0930803%"}),n.jsx("stop",{stopColor:"#EC4C51",offset:"44.7242531%"}),n.jsx("stop",{stopColor:"#9543C1",offset:"71.4578165%"}),n.jsx("stop",{stopColor:"#3857B3",offset:"100%"})]}),n.jsxs("radialGradient",{cx:"53.6205516%",cy:"47.2473036%",fx:"53.6205516%",fy:"47.2473036%",r:"50.8229649%",gradientTransform:"translate(0.536206,0.472473),rotate(90.000000),scale(1.000000,1.206631),translate(-0.536206,-0.472473)",id:"radialGradient-2",children:[n.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),n.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"75.3503173%"}),n.jsx("stop",{stopColor:"#0D060B",stopOpacity:"0.437431709",offset:"100%"})]}),n.jsxs("radialGradient",{cx:"53.8605015%",cy:"48.1990423%",fx:"53.8605015%",fy:"48.1990423%",r:"59.9151549%",gradientTransform:"translate(0.538605,0.481990),rotate(180.000000),scale(1.000000,0.925027),translate(-0.538605,-0.481990)",id:"radialGradient-3",children:[n.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),n.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"84.0867343%"}),n.jsx("stop",{stopColor:"#FF0000",stopOpacity:"0.567324765",offset:"100%"})]})]}),n.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:n.jsxs("g",{id:"firecms_logo",children:[n.jsx("circle",{fill:"url(#radialGradient-1)",cx:"299.5",cy:"299.5",r:"299.5"}),n.jsx("circle",{fill:"url(#radialGradient-2)",cx:"299.5",cy:"299.5",r:"299.5"}),n.jsx("circle",{fill:"url(#radialGradient-3)",cx:"299.5",cy:"299.5",r:"299.5"})]})})]})}const nH={info:"bg-sky-200 dark:bg-teal-900",warn:"bg-orange-200 dark:bg-yellow-950"};function oH({children:e,mode:t="info"}){return n.jsx("div",{className:E("my-3 py-2 px-4 rounded",nH[t]),children:e})}const sa=function({title:t,endAdornment:c,startAdornment:i,drawerOpen:a,dropDownActions:l,includeDrawer:s,className:d,style:u,user:A}){const y=fe(),h=In(),{mode:I,toggleMode:_}=Pr(),g=ze(),b=A??h.user;let p;if(b&&b.photoURL)p=n.jsx(Mt,{src:b.photoURL});else if(b===void 0||h.initialLoading)p=n.jsx("div",{className:"p-1 flex justify-center",children:n.jsx(Ve,{className:"w-10 h-10 rounded-full"})});else{const w=b?.displayName?b.displayName[0].toUpperCase():b?.email?b.email[0].toUpperCase():"A";p=n.jsx(Mt,{children:w})}return n.jsx("div",{style:u,className:E("pr-2",{"ml-[17rem]":a&&g,"ml-16":s&&!(a&&g)&&!i,"h-16":!0,"z-10":g,"transition-all":!0,"ease-in":!0,"duration-75":!0,"w-full":!s,"w-[calc(100%-64px)]":s&&!(a&&g),"w-[calc(100%-17rem)]":s&&a&&g,"duration-150":a&&g,fixed:!0},d),children:n.jsxs("div",{className:"flex flex-row gap-2 px-4 h-full items-center",children:[i,y&&n.jsx("div",{className:"mr-8 hidden lg:block",children:n.jsx(be.Link,{className:"visited:text-inherit visited:dark:text-inherit",to:y?.basePath??"/",children:n.jsx(j,{variant:"subtitle1",noWrap:!0,className:"ml-2 !font-medium",children:t})})}),n.jsx("div",{className:"flex-grow"}),c&&n.jsx(ie,{children:c}),n.jsx(R,{color:"inherit","aria-label":"Open drawer",onClick:_,size:"large",children:I==="dark"?n.jsx(dc,{}):n.jsx(mc,{})}),n.jsxs(Qn,{trigger:p,children:[l,!l&&n.jsxs(me,{onClick:h.signOut,children:[n.jsx(Sc,{}),"Log Out"]})]})]})})},rH=e=>e&&Array.isArray(e)&&e.length>0?e.map((t,c)=>t?{[ir(t)+c]:Ao()}:{}).reduce((t,c)=>({...t,...c}),{}):{};function Pt({droppableId:e,addLabel:t,value:c,disabled:i=!1,buildEntry:a,size:l,onInternalIdAdded:s,includeAddButton:d,newDefaultEntry:u,onValueChange:A}){const y=c&&Array.isArray(c)&&c.length>0,h=f.useRef(rH(c)),[I,_]=f.useState(y?Object.values(h.current):[]);f.useEffect(()=>{if(y&&c&&c.length!==I.length){const k=c.map((v,K)=>{const m=ir(v)+K;if(m in h.current)return h.current[m];{const C=Ao();return h.current[m]=C,C}});_(k)}},[y,I.length,c]);const g=k=>{if(k.preventDefault(),i)return;const v=Ao(),K=[...I,v];s&&s(v),_(K),A([...c??[],u])},b=k=>{const v=[...I];v.splice(k,1),_(v),A(c.filter((K,m)=>m!==k))},p=k=>{const v=Ao(),K=c[k],m=[...I.splice(0,k+1),v,...I.splice(k+1,I.length-k-1)];s&&s(v),_(m),A([...c.slice(0,k+1),K,...c.slice(k+1)])},w=k=>{if(!k.destination)return;const v=k.source.index,K=k.destination.index,m=[...I],C=m[v];m[v]=m[K],m[K]=C,_(m),A(tH(c,v,K))};return n.jsx(Kn.DragDropContext,{onDragEnd:w,children:n.jsx(Kn.Droppable,{droppableId:e,renderClone:(k,v,K)=>{const m=K.source.index,C=I[m];return n.jsx(Dt,{provided:k,internalId:C,index:m,size:l,disabled:i,buildEntry:a,remove:b,copy:p,isDragging:v.isDragging})},children:(k,v)=>n.jsxs("div",{...k.droppableProps,ref:k.innerRef,children:[y&&I.map((K,m)=>n.jsx(Kn.Draggable,{draggableId:`array_field_${K}`,isDragDisabled:i,index:m,children:(C,B)=>n.jsx(Dt,{provided:C,internalId:K,index:m,size:l,disabled:i,buildEntry:a,remove:b,copy:p,isDragging:B.isDragging})},`array_field_${K}`)),k.placeholder,d&&n.jsx("div",{className:"p-4 justify-center text-left",children:n.jsx(te,{variant:l==="small"?"text":"outlined",size:l==="small"?"small":"medium",color:"primary",disabled:i,startIcon:n.jsx(gn,{}),onClick:g,children:t??"Add"})})]})})})}function Dt({provided:e,index:t,internalId:c,size:i,disabled:a,buildEntry:l,remove:s,copy:d,isDragging:u}){const[A,y]=er(),h=i!=="small"&&y.height===0,I=i!=="small"&&y.height<100,[_,g]=f.useState(!1),b=f.useCallback(()=>g(!0),[]),p=f.useCallback(()=>g(!1),[]);return n.jsx("div",{onMouseEnter:b,onMouseMove:b,onMouseLeave:p,ref:e.innerRef,...e.draggableProps,style:e.draggableProps.style,className:`${u||_?We:""} mb-1 rounded-md opacity-100`,children:n.jsxs("div",{className:"flex items-start",children:[n.jsx("div",{ref:A,className:"flex-grow w-[calc(100%-48px)] text-text-primary dark:text-text-primary-dark",children:l(t,c)}),n.jsx(da,{direction:i==="small"?"row":"column",disabled:a,remove:s,index:t,provided:e,measuring:h,contentOverflow:I,copy:d})]})})}function da({direction:e,disabled:t,remove:c,index:i,provided:a,copy:l,contentOverflow:s,measuring:d}){return n.jsxs("div",{className:`p-1 flex ${e==="row"?"flex-row-reverse":"flex-col"} items-center`,...a.dragHandleProps,children:[n.jsx(_e,{side:e==="column"?"left":void 0,title:"Move",children:n.jsx(R,{size:"small",disabled:t,className:`cursor-${t?"inherit":"grab"}`,children:n.jsx("svg",{focusable:"false",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 24 24",children:n.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})})})}),!d&&!s&&n.jsxs(n.Fragment,{children:[n.jsx(_e,{title:"Remove",side:e==="column"?"left":void 0,children:n.jsx(R,{size:"small","aria-label":"remove",disabled:t,onClick:()=>c(i),children:n.jsx(to,{size:"small"})})}),n.jsx(_e,{side:e==="column"?"left":void 0,title:"Copy in this position",children:n.jsx(R,{size:"small","aria-label":"copy",disabled:t,onClick:()=>l(i),children:n.jsx(no,{size:"small"})})})]}),!d&&s&&n.jsx(n.Fragment,{children:n.jsxs(Qn,{trigger:n.jsx(R,{size:"small",children:n.jsx(kr,{size:"small"})}),children:[n.jsxs(me,{dense:!0,onClick:()=>c(i),children:[n.jsx(to,{size:"small"}),"Remove"]}),n.jsxs(me,{dense:!0,onClick:()=>l(i),children:[n.jsx(no,{size:"small"}),"Copy"]})]})})]})}function tH(e,t,c){const i=Array.from(e),[a]=i.splice(t,1);return i.splice(c,0,a),i}function Ao(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}const cH="100vw",iH="55vw",ua="768px",$o="main_##Q$SC^#S6";function aH({path:e,entityId:t,selectedSubPath:c,copy:i,collection:a,onValuesAreModified:l,formWidth:s,onUpdate:d,onClose:u}){a.customId&&a.formAutoSave&&console.warn(`The collection ${a.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);const[A,y]=f.useState(!1),[h,I]=f.useState(void 0);Oo(h,()=>{h&&Y({entityId:L?.id,collection:a,path:e,values:h,closeAfterSave:!1})},!1,2e3);const _=Qe(),g=Uo(),b=Sn(),p=an(),w=ne(),k=In(),[v,K]=f.useState(void 0),[m,C]=f.useState(i?"copy":t?"existing":"new"),B=f.useRef(void 0),P=B.current,F=(a.subcollections??[]).filter(M=>!M.hideFromNavigation),D=F?.length??0,S=a.entityViews,T=S?.length??0,N=a.formAutoSave&&!a.customId,q=T>0||D>0,G=c??nt(a?a.defaultSelectedView:void 0,{status:m,entityId:t}),V=f.useRef(G??$o),oe=V.current===$o,{entity:O,dataLoading:H,dataLoadingError:Z}=Er({path:e,entityId:t,collection:a,useCache:!1}),[L,W]=f.useState(O),[Q,X]=f.useState(void 0);f.useEffect(()=>{O&&W(O)},[O]),f.useEffect(()=>{if(m==="new")X(!1);else{const M=L?ct(a,k,Ze(e),L??null):!1;L&&X(!M)}},[k,L,m]);const ee=f.useCallback(M=>{y(!1),p.open({type:"error",message:"Error before saving: "+M?.message}),console.error(M)},[p]),U=f.useCallback(M=>{y(!1),p.open({type:"error",message:"Error after saving (entity is saved): "+M?.message}),console.error(M)},[p]),re=(M,le)=>{y(!1),N||p.open({type:"success",message:`${a.singularName??a.name}: Saved correctly`}),W(M),C("existing"),l(!1),d&&d({entity:M}),le?(g.setBlocked(!1),g.close(!0),u?.()):m!=="existing"&&b.replace({path:e,entityId:M.id,selectedSubPath:V.current,updateUrl:!0,collection:a})},J=f.useCallback(M=>{y(!1),p.open({type:"error",message:"Error saving: "+M?.message}),console.error("Error saving entity",e,t),console.error(M)},[t,e,p]),Y=({values:M,previousValues:le,closeAfterSave:Ie,entityId:Oe,collection:vn,path:$})=>{y(!0),Fr({path:$,entityId:Oe,values:M,previousValues:le,collection:vn,status:m,dataSource:_,context:w,onSaveSuccess:se=>re(se,Ie),onSaveFailure:J,onPreSaveHookError:ee,onSaveSuccessHookError:U}).then()},x=async({collection:M,path:le,entityId:Ie,values:Oe,previousValues:vn,closeAfterSave:$,autoSave:se})=>{m&&(se?I(Oe):Y({collection:M,path:le,entityId:Ie,values:Oe,previousValues:vn,closeAfterSave:$}))},ge=S?S.map(M=>At(M,w.entityViews)).filter(Boolean):[],He=S&&ge.map((M,le)=>{if(!M||V.current!==M.key)return null;const Ie=M.Builder;return Ie?n.jsx("div",{className:E(ue,"relative flex-grow w-full h-full overflow-auto "),role:"tabpanel",children:n.jsx(ie,{children:v&&n.jsx(Ie,{collection:a,entity:L,modifiedValues:P??L?.values,formContext:v})})},`custom_view_${M.key}`):(console.error("customView.Builder is not defined"),null)}).filter(Boolean),ve=H&&!L||(!L||Q===void 0)&&(m==="existing"||m==="copy"),fn=ve||A,An=F&&F.map((M,le)=>{const Ie=M.alias??M.path,Oe=L?`${e}/${L?.id}/${pe(Ie)}`:void 0;return V.current!==Ie?null:n.jsxs("div",{className:"relative flex-grow h-full overflow-auto w-full",role:"tabpanel",children:[fn&&n.jsx(fo,{}),!ve&&(L&&Oe?n.jsx(St,{fullPath:Oe,parentPathSegments:Ze(e),isSubCollection:!0,...M}):n.jsx("div",{className:"flex items-center justify-center w-full h-full p-3",children:n.jsx(j,{variant:"label",children:"You need to save your entity before adding additional collections"})}))]},`subcol_${Ie}`)}).filter(Boolean),zn=f.useCallback(()=>{l(!1)},[]),_o=M=>{V.current=M,b.replace({path:e,entityId:t,selectedSubPath:M===$o?void 0:M,updateUrl:!0,collection:a})},mn=f.useCallback(M=>{B.current=M},[]),Hn=f.useCallback(M=>{p.open({type:"error",message:"Error updating id, check the console"})},[]),_n=f.useCallback(M=>{W(le=>le?{...le,id:M}:void 0)},[]),Un=M=>{N||l(M)};function yo(){const M=w.plugins;let le=n.jsx(Si,{status:m,path:e,collection:a,onEntitySaveRequested:x,onDiscard:zn,onValuesChanged:mn,onModified:Un,entity:L,onIdChange:_n,onFormContextChange:K,hideId:a.hideIdFromForm,autoSave:N,onIdUpdateError:Hn});return M&&M.forEach(Ie=>{Ie.form?.provider&&(le=n.jsx(Ie.form.provider.Component,{status:m,path:e,collection:a,onDiscard:zn,onValuesChanged:mn,onModified:Un,entity:L,context:w,formContext:v,...Ie.form.provider.props,children:le}))}),n.jsx(ie,{children:le})}const z=Q===void 0?n.jsx(n.Fragment,{}):Q?n.jsxs(n.Fragment,{children:[n.jsx(j,{className:"mt-16 mb-8 mx-8",variant:"h4",children:a.singularName??a.name}),n.jsx(yt,{className:"px-12",entity:L,path:e,collection:a})]}):yo(),Ae=F&&F.map(M=>n.jsx(Xo,{className:"text-sm min-w-[140px]",value:M.path,children:M.name},`entity_detail_collection_tab_${M.name}`)),ae=ge.map(M=>n.jsx(Xo,{className:"text-sm min-w-[140px]",value:M.key,children:M.name},`entity_detail_collection_tab_${M.name}`));return n.jsx("div",{className:"flex flex-col h-full w-full transition-width duration-250 ease-in-out",children:n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:E(ue,"no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),children:[n.jsx("div",{className:"pb-1 self-center",children:n.jsx(R,{onClick:()=>(u?.(),g.close(!1)),size:"large",children:n.jsx(Ir,{})})}),n.jsx("div",{className:"flex-grow"}),ve&&n.jsx("div",{className:"self-center",children:n.jsx(Gn,{size:"small"})}),n.jsxs(ba,{value:V.current,onValueChange:M=>{_o(M)},className:"pl-4 pr-4 pt-0",children:[n.jsx(Xo,{disabled:!q,value:$o,className:`${q?"":"hidden"} text-sm min-w-[140px]`,children:a.singularName??a.name}),ae,Ae]})]}),n.jsxs("div",{className:"flex-grow h-full flex overflow-auto flex-row w-full ",style:{},children:[n.jsx("div",{role:"tabpanel",hidden:!oe,id:`form_${e}`,className:" w-full",children:ve?n.jsx(fo,{}):z}),He,An]})]})})}function lH(e){const{blocked:t,setBlocked:c,setBlockedNavigationMessage:i}=Uo(),a=fe(),l=f.useMemo(()=>{if(!e)return;let d=e.collection;if(!d&&(d=a.getCollection(e.path,e.entityId),!d))throw console.error("ERROR: No collection found in path `",e.path,"`. Entity id: ",e.entityId),Error("ERROR: No collection found in path `"+e.path+"`. Make sure you have defined a collection for this path in the root navigation.");return d},[a,e]);f.useEffect(()=>{function d(u){t&&l&&(u.preventDefault(),u.returnValue=`You have unsaved changes in this ${l.name}. Are you sure you want to leave this page?`)}return typeof window<"u"&&window.addEventListener("beforeunload",d),()=>{typeof window<"u"&&window.removeEventListener("beforeunload",d)}},[t,l]);const s=f.useCallback(d=>{c(d),i(d?n.jsxs(n.Fragment,{children:[" You have unsaved changes in this ",n.jsx("b",{children:l?.singularName??l?.name}),"."]}):void 0)},[l?.name,c,i]);return!e||!l?n.jsx("div",{className:"w-full"}):n.jsx(n.Fragment,{children:n.jsx(ie,{children:n.jsx(aH,{...e,formWidth:e.width,collection:l,onValuesAreModified:s})})})}const fa="new";function sH(e,t){if(t)return cH;const c=!e.selectedSubPath,i=typeof e.width=="number"?`${e.width}px`:e.width;return c?i??ua:`calc(${iH} + ${i??ua})`}const dH=(e,t)=>{const c=be.useLocation(),i=f.useRef(!1),a=!ze();f.useEffect(()=>{if(!e.loading&&!i.current){if(e.isUrlCollectionPath(c.pathname)){const u=c.hash===`#${fa}`,A=e.urlPathToDataPath(c.pathname),y=uH(A,e.collections,u);t.replace(y.map(h=>Nt(h,e,a)))}i.current=!0}},[c,e,t,a]);const l=f.useCallback(()=>{t.close()},[t]),s=f.useCallback(u=>{if(u.copy&&!u.entityId)throw Error("If you want to copy an entity you need to provide an entityId");const A=nt(u.collection?u.collection.defaultSelectedView:void 0,{status:u.copy?"copy":u.entityId?"existing":"new",entityId:u.entityId});t.open(Nt({selectedSubPath:A,...u},e,a))},[t,e,a]),d=f.useCallback(u=>{if(u.copy&&!u.entityId)throw Error("If you want to copy an entity you need to provide an entityId");t.replace(Nt(u,e,a))},[e,t,a]);return{close:l,open:s,replace:d}};function uH(e,t,c){const i=_t({path:e,collections:t}),a=[];let l="";for(let s=0;s<i.length;s++){const d=i[s];if(d.type==="collection"&&(l=d.path),s>0){const u=i[s-1];if(d.type==="entity")a.push({path:d.path,entityId:d.entityId,copy:!1});else if(d.type==="custom_view"){if(u.type==="entity"){const A=a[a.length-1];A&&(A.selectedSubPath=d.view.key)}}else if(d.type==="collection"&&u.type==="entity"){const A=a[a.length-1];A&&(A.selectedSubPath=d.collection.alias??d.collection.path)}}}return c&&a.push({path:l,copy:!1}),a}const Nt=(e,t,c)=>{const i=pe(e.path),a=e.entityId?t.buildUrlCollectionPath(`${i}/${e.entityId}/${e.selectedSubPath||""}`):t.buildUrlCollectionPath(`${i}#${fa}`);return{key:`${e.path}/${e.entityId}`,component:n.jsx(lH,{...e}),urlPath:a,parentUrlPath:t.buildUrlCollectionPath(i),width:sH(e,c),onClose:e.onClose}};function Aa(e){const{path:t,collections:c=[],currentFullPath:i}=e,a=pe(t).split("/"),l=bo(a),s=[];for(let d=0;d<l.length;d++){const u=l[d],A=c&&c.find(y=>y.alias===u||y.path===u);if(A){const y=A.alias??A.path,h=i&&i.length>0?i+"/"+y:y,I=pe(pe(t).replace(u,"")),_=I.length>0?I.split("/"):[];if(_.length>0){const g=_[0],b=h+"/"+g;if(s.push(new je(g,h)),_.length>1){const p=_.slice(1).join("/");if(!A)throw Error("collection not found resolving path: "+A);A.subcollections&&s.push(...Aa({path:p,collections:A.subcollections,currentFullPath:b}))}}break}}return s}function fH({basePath:e,baseCollectionPath:t,authController:c,collections:i,views:a,userConfigPersistence:l,plugins:s,dataSource:d}){const u=be.useLocation(),[A,y]=f.useState(),[h,I]=f.useState(),[_,g]=f.useState(!1),[b,p]=f.useState(void 0),[w,k]=f.useState(!0),[v,K]=f.useState(void 0),m=pe(e),C=pe(t),B=m?`/${m}`:"/",P=m?`/${m}/${C}`:`/${C}`,F=f.useCallback(W=>m?`/${m}/${jo(W)}`:`/${jo(W)}`,[m]),D=f.useCallback(W=>`${pe(t)}/${jo(W)}`,[t]),S=f.useCallback((W,Q)=>{const X=[...(W??[]).map(U=>U.hideFromNavigation?void 0:{url:D(U.alias??U.path),type:"collection",name:U.name.trim(),path:U.alias??U.path,collection:U,description:U.description?.trim(),group:U.group?.trim()}).filter(Boolean),...(Q??[]).map(U=>U.hideFromNavigation?void 0:{url:F(Array.isArray(U.path)?U.path[0]:U.path),name:U.name.trim(),type:"view",view:U,description:U.description?.trim(),group:U.group?.trim()}).filter(Boolean)],ee=Object.values(X).map(U=>U.group).filter(Boolean).filter((U,re,J)=>J.indexOf(U)===re);return{navigationEntries:X,groups:ee}},[F,D]),T=f.useCallback(async()=>{if(!c.initialLoading){try{const[W=[],Q=[]]=await Promise.all([AH(i,c,d,s),_H(a,c,d)]);y(W),I(Q),p(S(W??[],Q))}catch(W){console.error(W),K(W)}k(!1),g(!0)}},[i,c.user,c.initialLoading,d,s,a,S]);f.useEffect(()=>{T()},[T]);const N=f.useCallback((W,Q,X=!1)=>{if(!A)return;const ee=Io(pe(W),A),U=X?l?.getCollectionConfig(W):void 0,re=ee?qe(ee,U):void 0;let J=re;if(re){const Y=re.subcollections,x=re.callbacks,ge=re.permissions;J={...J,subcollections:J?.subcollections??Y,callbacks:J?.callbacks??x,permissions:J?.permissions??ge}}if(J)return{...re,...J}},[e,t,A]),q=f.useCallback(W=>{let Q=A;if(!Q)throw Error("Collections have not been initialised yet");for(let X=0;X<W.length;X++){const ee=W[X],U=Q.find(re=>re.alias===ee||re.path===ee);if(!U)return;if(Q=U.subcollections,X===W.length-1)return U}},[A]),G=f.useCallback(W=>pe(W+"/").startsWith(pe(P)+"/"),[P]),V=f.useCallback(W=>{if(W.startsWith(P))return W.replace(P,"");throw Error("Expected path starting with "+P)},[P]),oe=f.useCallback(({path:W})=>`s/edit/${jo(W)}`,[]),O=f.useCallback(W=>{if(!A)throw Error("Collections have not been initialised yet");return rr(W,A)},[A]),H=u.state,Z=H&&H.base_location?H.base_location:u,L=f.useCallback(W=>Aa({path:W,collections:A}),[A]);return f.useMemo(()=>({collections:A??[],views:h??[],loading:!_||w,navigationLoadingError:v,homeUrl:B,basePath:e,baseCollectionPath:t,initialised:_,getCollection:N,getCollectionFromPaths:q,isUrlCollectionPath:G,urlPathToDataPath:V,buildUrlCollectionPath:D,buildUrlEditCollectionPath:oe,buildCMSUrlPath:F,resolveAliasesFrom:O,topLevelNavigation:b,baseLocation:Z,refreshNavigation:T,getParentReferencesFromPath:L}),[t,Z,e,F,D,oe,A,L,N,q,B,_,G,w,v,T,O,b,V,h])}function jo(e){return encodeURIComponent(pe(e)).replaceAll("%2F","/").replaceAll("%23","#")}function _a(e,t){return e.filter(c=>c.permissions?uo(c,t,[c.path],null).read!==!1:!0).map(c=>c.subcollections?{...c,subcollections:_a(c.subcollections,t)}:c)}async function AH(e,t,c,i){let a=[];return typeof e=="function"?a=await e({user:t.user,authController:t,dataSource:c}):Array.isArray(e)&&(a=e),a=_a(a,t),i&&i.forEach(l=>{l.collections?.injectCollections&&(a=l.collections?.injectCollections(a??[]))}),a}async function _H(e,t,c){let i=[];return typeof e=="function"?i=await e({user:t.user,authController:t,dataSource:c}):Array.isArray(e)&&(i=e),i}function yH(){const e=be.useLocation(),t=be.useNavigate(),[c,i]=f.useState([]),a=f.useRef(c),l=f.useRef({}),s=f.useRef(0),d=h=>{a.current=h,i(h)};f.useEffect(()=>{const _=(e.state?.panels??[]).map(g=>l.current[g]).filter(g=>!!g);de(a.current.map(g=>g.key),_.map(g=>g.key))||d(_)},[e]);const u=f.useCallback(()=>{if(c.length===0)return;const h=c[c.length-1],I=[...c.slice(0,-1)];if(d(I),s.current>0)h.urlPath&&t(-1),s.current--;else if(h.parentUrlPath){const _=e.state?.base_location??e;t(h.parentUrlPath,{replace:!0,state:{base_location:_,panels:I.map(g=>g.key)}})}},[c,t,e]),A=f.useCallback(h=>{const I=Array.isArray(h)?h:[h];I.forEach(b=>{l.current[b.key]=b}),s.current=s.current+I.length;const _=e.state?.base_location??e,g=[...c,...I];d(g),I.forEach(b=>{b.urlPath&&t(b.urlPath,{state:{base_location:_,panels:g.map(p=>p.key)}})})},[e,t,c]),y=f.useCallback(h=>{const I=Array.isArray(h)?h:[h];I.forEach(b=>{l.current[b.key]=b});const _=e.state?.base_location??e,g=[...c.slice(0,-I.length),...I];d(g),I.forEach(b=>{b.urlPath&&t(b.urlPath,{replace:!0,state:{base_location:_,panels:g.map(p=>p.key)}})})},[e,t,c]);return{sidePanels:c,close:u,open:A,replace:y}}function hH(e){f.useEffect(()=>{if(!e)return;const t=Ut[e];t&&(xo.registerLocale(e,t),xo.setDefaultLocale(e))},[e])}const gH="/",IH="/c";function bH(e){const t=Pr(),{children:c,collections:i,views:a,entityLinkBuilder:l,userConfigPersistence:s,dateTimeFormat:d,locale:u,authController:A,storageSource:y,dataSource:h,basePath:I=gH,baseCollectionPath:_=IH,plugins:g,onAnalyticsEvent:b,fields:p,entityViews:w}=e;hH(u);const k=fH({basePath:I,baseCollectionPath:_,authController:A,collections:i,views:a,userConfigPersistence:s,dataSource:h,plugins:g}),v=yH(),K=dH(k,v),m=A.initialLoading||k.loading||(g?.some(B=>B.loading)??!1),C=f.useMemo(()=>({entityLinkBuilder:l,dateTimeFormat:d,locale:u,plugins:g,onAnalyticsEvent:b,entityViews:w??[],fields:p??{}}),[d,u,g,w,p]);return k.navigationLoadingError?n.jsx(Lt,{maxWidth:"md",fullScreen:!0,children:n.jsx(we,{title:"Error loading navigation",error:k.navigationLoadingError})}):A.authError?n.jsx(Lt,{maxWidth:"md",fullScreen:!0,children:n.jsx(we,{title:"Error loading auth",error:A.authError})}):n.jsx(or.Provider,{value:t,children:n.jsx(Sr.Provider,{value:C,children:n.jsx(Wc.Provider,{value:s,children:n.jsx(Vc.Provider,{value:y,children:n.jsx(Mc.Provider,{value:h,children:n.jsx(Cr.Provider,{value:A,children:n.jsx(Lc.Provider,{value:v,children:n.jsx(Qc.Provider,{value:K,children:n.jsx(Oc.Provider,{value:k,children:n.jsx(Ga,{children:n.jsx(pH,{loading:m,children:c})})})})})})})})})})})}function pH({loading:e,children:t}){const c=ne();let i=t({context:c,loading:e});const a=c.plugins;return!e&&a&&a.forEach(l=>{l.provider&&(i=n.jsx(l.provider.Component,{...l.provider.props,context:c,children:i}))}),n.jsx(n.Fragment,{children:i})}function ya({hovered:e,drawerOpen:t,closeDrawer:c}){const i=ne(),a=fe(),l=e&&!t,s=ze();if(!a.topLevelNavigation)throw Error("Navigation not ready in Drawer");const{navigationEntries:d,groups:u}=a.topLevelNavigation,A=Object.values(d).filter(I=>!I.group),y=f.useCallback(I=>t?n.jsx("div",{className:"pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",children:n.jsx(j,{variant:"caption",color:"secondary",className:"font-medium flex-grow",children:I?I.toUpperCase():"Views".toUpperCase()})}):n.jsx("div",{className:"h-4"}),[t]),h=I=>{const _=I.type==="collection"?"drawer_navigate_to_collection":I.type==="view"?"drawer_navigate_to_view":"unmapped_event";i.onAnalyticsEvent?.(_,{url:I.url}),s||c()};return n.jsxs("div",{className:"flex-grow overflow-scroll no-scrollbar",children:[u.map(I=>n.jsxs(f.Fragment,{children:[y(I),Object.values(d).filter(_=>_.group===I).map((_,g)=>n.jsx(Tt,{icon:Vo(_.collection??_.view),tooltipsOpen:l,drawerOpen:t,onClick:()=>h(_),url:_.url,name:_.name},`navigation_${g}`))]},`drawer_group_${I}`)),A.length>0&&y(),A.map((I,_)=>n.jsx(Tt,{icon:Vo(I.collection??I.view),tooltipsOpen:l,onClick:()=>h(I),drawerOpen:t,url:I.url,name:I.name},`navigation_${_}`))]})}function Tt({name:e,icon:t,drawerOpen:c,tooltipsOpen:i,url:a,onClick:l}){const s=n.jsx("div",{className:"text-gray-600 dark:text-gray-500",children:t}),d=n.jsxs(be.NavLink,{onClick:l,className:({isActive:u})=>E("rounded-r-xl truncate","hover:bg-gray-200 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-gray-100","flex flex-row items-center w-full mr-8",c?"pl-8 h-12":"pl-6 h-11","font-medium text-sm",u?"bg-gray-100 dark:bg-gray-800":""),to:a,children:[s,n.jsx("div",{className:E(c?"opacity-100":"opacity-0 hidden","ml-4 font-inherit text-inherit"),children:e.toUpperCase()})]});return c?d:n.jsx(_e,{open:i,side:"right",title:e,children:d})}const wH=280,kH=f.memo(function(t){const{children:c,name:i,logo:a,includeDrawer:l=!0,autoOpenDrawer:s,Drawer:d=ya,drawerProps:u,FireCMSAppBarComponent:A=sa,fireCMSAppBarComponentProps:y}=t,h=ze(),I=fe(),[_,g]=f.useState(!1),[b,p]=f.useState(!1),w=f.useCallback(()=>p(!0),[]),k=f.useCallback(()=>p(!1),[]),v=f.useCallback(()=>{g(!1)},[]),K=_||!!(h&&s&&b);return n.jsxs("div",{className:"flex h-screen w-screen bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-white overflow-hidden",style:{paddingTop:"env(safe-area-inset-top)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)",paddingBottom:"env(safe-area-inset-bottom)",height:"100dvh"},children:[n.jsx(A,{title:i,includeDrawer:l,drawerOpen:K,...y}),n.jsx(vH,{displayed:l,onMouseEnter:w,onMouseMove:w,onMouseLeave:k,open:K,logo:a,hovered:b,setDrawerOpen:g,children:l&&(I.loading?n.jsx(fo,{}):n.jsx(d,{hovered:b,drawerOpen:K,closeDrawer:v,...u}))}),n.jsxs("main",{className:"flex flex-col flex-grow overflow-auto",children:[n.jsx(mH,{}),n.jsx("div",{className:E(ue,"flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1"),children:n.jsx(ie,{children:c})})]})]})},de),mH=()=>n.jsx("div",{className:"flex flex-col min-h-[68px]"});function vH(e){const t=fe(),c=e.displayed?e.open?wH:72:0,i=n.jsxs("div",{className:"relative h-full no-scrollbar overflow-y-auto overflow-x-hidden",style:{width:c,transition:"left 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[!e.open&&e.displayed&&n.jsx(_e,{title:"Open menu",side:"right",sideOffset:12,className:"fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit",children:n.jsx(R,{color:"inherit","aria-label":"Open menu",className:"sticky top-2 left-3 ",onClick:()=>e.setDrawerOpen(!0),size:"large",children:n.jsx(wr,{})})}),n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsx("div",{style:{transition:"padding 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",padding:e.open?"32px 96px 0px 24px":"72px 16px 0px"},className:E("cursor-pointer"),children:n.jsx(_e,{title:"Home",sideOffset:20,side:"right",children:n.jsx(be.Link,{to:t.basePath,children:e.logo?n.jsx("img",{src:e.logo,alt:"Logo",className:E("max-w-full max-h-full",e.open??"w-[160px] h-[160px]")}):n.jsx(la,{})})})}),e.children]})]});return ze()?n.jsxs("div",{className:"relative",onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseLeave:e.onMouseLeave,style:{width:c,transition:"left 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[i,n.jsx("div",{className:`absolute right-0 top-4 ${e.open?"opacity-100":"opacity-0 invisible"} transition-opacity duration-1000 ease-in-out`,children:n.jsx(R,{"aria-label":"Close drawer",onClick:()=>e.setDrawerOpen(!1),children:n.jsx(sc,{})})})]}):e.displayed?n.jsxs(n.Fragment,{children:[n.jsx(R,{color:"inherit","aria-label":"Open drawer",onClick:()=>e.setDrawerOpen(!0),size:"large",className:"absolute top-2 left-6",children:n.jsx(wr,{})}),n.jsx(Vt,{side:"left",transparent:!0,open:e.open,onOpenChange:e.setDrawerOpen,children:i})]}):null}const KH=f.memo(function({HomePage:t=ia,customRoutes:c}){const i=be.useLocation(),a=fe();if(!a)return n.jsx(n.Fragment,{});const l=i.state,s=l&&l.base_location?l.base_location:i,d=[];a.views&&a.views.forEach(I=>{Array.isArray(I.path)?d.push(...I.path.map(_=>ha(_,I))):d.push(ha(I.path,I))});const A=[...a.collections??[]].sort((I,_)=>_.path.length-I.path.length).map(I=>{const _=a.buildUrlCollectionPath(I.alias??I.path);return n.jsx(be.Route,{path:_+"/*",element:n.jsx(qo,{path:_,title:I.name,type:"collection",children:n.jsx(St,{isSubCollection:!1,parentPathSegments:[],fullPath:I.alias??I.path,...I,Actions:Yo(I.Actions)},`collection_view_${I.alias??I.path}`)})},`navigation_${I.alias??I.path}`)}),y=n.jsx(be.Route,{path:"/",element:n.jsx(qo,{path:a.homeUrl,title:"Home",type:"home",children:n.jsx(t,{})},"navigation_home")}),h=n.jsx(be.Route,{path:"*",element:n.jsx(aa,{})});return n.jsxs(be.Routes,{location:s,children:[A,d,y,h,c]})}),ha=(e,t)=>n.jsx(be.Route,{path:e,element:n.jsx(qo,{path:e,title:t.name,type:"view",children:t.view},`navigation_${e}`)},"navigation_view_"+e),qo=f.memo(function({children:t,title:c,path:i,type:a}){const l=Dr();return f.useEffect(()=>{l.set({breadcrumbs:[{title:c,url:i}]})},[i,c]),n.jsx(n.Fragment,{children:t})},de);function CH(e){return e}function SH(e){return e}function BH(e){return e}function EH(e){return e}function FH(e){return e}function PH(e){return e}function DH(e){return e}function NH(e){return e}function TH(e){return e}function MH(){const e=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)"),c=(localStorage.getItem("prefers-dark-mode")!=null?localStorage.getItem("prefers-dark-mode")==="true":null)??e,[i,a]=f.useState(c?"dark":"light");f.useEffect(()=>{a(c?"dark":"light"),d(c?"dark":"light")},[c]);const l=f.useCallback(()=>{a("dark"),d("dark")},[e]),s=f.useCallback(()=>{a("light"),d("light")},[]),d=A=>{document.body.style.setProperty("color-scheme",A),document.documentElement.dataset.theme=A},u=f.useCallback(()=>{i==="light"?(e?localStorage.removeItem("prefers-dark-mode"):localStorage.setItem("prefers-dark-mode","true"),l()):(e?localStorage.setItem("prefers-dark-mode","false"):localStorage.removeItem("prefers-dark-mode"),s())},[i,e]);return{mode:i,setMode:a,toggleMode:u}}function OH(){const[e,t]=f.useState({}),c=f.useCallback(g=>{const b=localStorage.getItem(g);return b?JSON.parse(b):{}},[]),i=f.useCallback(g=>{const b=`collection_config::${ot(g)}`;return e[b]?e[b]:c(b)},[e,c]),a=f.useCallback((g,b)=>{const p=`collection_config::${ot(g)}`;localStorage.setItem(p,JSON.stringify(b)),t(w=>{const k=w[p],v=qe(k??c(g),b);return qe(w,v)})},[c]),[l,s]=f.useState([]),[d,u]=f.useState([]),[A,y]=f.useState([]);f.useEffect(()=>{s(localStorage.getItem("recently_visited_paths")?JSON.parse(localStorage.getItem("recently_visited_paths")):[]),u(localStorage.getItem("favourite_paths")?JSON.parse(localStorage.getItem("favourite_paths")):[]),y(localStorage.getItem("collapsed_groups")?JSON.parse(localStorage.getItem("collapsed_groups")):[])},[]);const h=f.useCallback(g=>{localStorage.setItem("recently_visited_paths",JSON.stringify(g)),s(g)},[]),I=f.useCallback(g=>{localStorage.setItem("favourite_paths",JSON.stringify(g)),u(g)},[]),_=f.useCallback(g=>{localStorage.setItem("collapsed_groups",JSON.stringify(g)),y(g)},[]);return{onCollectionModified:a,getCollectionConfig:i,recentlyVisitedPaths:l,setRecentlyVisitedPaths:h,favouritePaths:d,setFavouritePaths:I,collapsedGroups:A,setCollapsedGroups:_}}const LH=({children:e})=>n.jsx(Gt.SnackbarProvider,{maxSnack:3,autoHideDuration:3500,children:e}),QH=({ref:e})=>{const[t,c]=f.useState(!1),[i,a]=f.useState(!1);return f.useEffect(()=>{e.current&&(e.current.onfocus=()=>{c(!0),a(!0)},e.current.onblur=()=>{a(!1)})},[e]),{inputFocused:i,autoCompleteOpen:t,setAutoCompleteOpen:c}};function VH({children:e,open:t,setOpen:c}){const i=f.useRef(null);return Do(i,()=>c(!1)),n.jsx(To,{in:t,duration:50,className:E("absolute top-full left-0 right-0 overflow-visible",t?"shadow":"","my-2","z-20","w-full"),children:n.jsx("div",{ref:i,className:E(t?Ge:"","bg-gray-50 dark:bg-gray-900 py-2"),children:e})})}function WH({children:e,onClick:t}){return n.jsx("div",{className:"flex w-full items-center pr-6 pl-14 h-[48px] cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800",onClick:t,children:e})}const GH=e=>{switch(e){case"error":return"bg-red-50 dark:bg-red-800 dark:text-red-100 text-red-900";case"warning":return"bg-amber-50 dark:bg-amber-800 dark:text-amber-100 text-amber-900";case"info":return"bg-blue-50 dark:bg-blue-800 dark:text-blue-100 text-blue-900";case"success":return"bg-emerald-50 dark:bg-emerald-800 dark:text-emerald-100 text-emerald-900";default:return"bg-blue-50 dark:bg-blue-800 dark:text-blue-100 text-blue-900"}},zH=({children:e,onDismiss:t,color:c="info",action:i,className:a,style:l})=>{const s=GH(c);return n.jsxs("div",{style:l,className:E("px-4 py-2 rounded-md flex items-center gap-2",s,a),children:[n.jsx("span",{className:"flex-grow",children:e}),t&&n.jsx("button",{className:"text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-400",onClick:t,children:"×"}),i]})},HH=({src:e,alt:t,children:c,className:i,...a},l)=>n.jsx("button",{ref:l,...a,className:E("rounded-full flex items-center justify-center overflow-hidden",he,"p-1 hover:bg-gray-200 hover:dark:bg-gray-700",i),children:e?n.jsx("img",{className:"object-cover rounded-full w-10 h-10 bg-gray-100 dark:bg-gray-800",src:e,alt:t}):n.jsx("span",{className:"py-1.5 text-lg font-medium text-gray-900 dark:text-white rounded-full w-10 h-10 bg-gray-100 dark:bg-gray-800",children:c})}),Mt=f.forwardRef(HH);function ga({children:e,style:t,onClick:c,className:i}){const a=f.useCallback(l=>{(l.key==="Enter"||l.key===" ")&&c?.()},[c]);return n.jsx("div",{onKeyPress:a,role:c?"button":void 0,tabIndex:c?0:void 0,onClick:c,className:E(Rt,c&&he,c&&ec,i),style:t,children:e})}const UH={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},YH=({children:e,className:t,style:c,maxWidth:i="7xl"},a)=>{const l=i?UH[i]:"";return n.jsx("div",{ref:a,className:E("mx-auto px-3 md:px-4 lg-px-6",l,t),style:c,children:e})},Ot=f.forwardRef(YH);function Lt({children:e,maxWidth:t,fullScreen:c=!1,className:i}){return n.jsx("div",{className:"flex flex-col flex-grow h-full",children:n.jsx(Ot,{className:E("m-auto",i),maxWidth:t,children:e})})}function Gn({size:e="medium",className:t}){let c="";e==="small"?c="w-4 h-4 m-1":e==="medium"?c="w-8 h-8 m-1":c="w-10 h-10 m-1";let i="";return e==="small"?i="border-[3px]":e==="medium"?i="border-4":i="border-[6px]",n.jsx("div",{className:E(c,i,"inline-block animate-spin rounded-full border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]","text-blue-600 dark:text-blue-400",t),role:"status",children:n.jsx("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}const $H={xs:"max-w-xs min-w-xs w-xs",sm:"max-w-sm min-w-sm w-sm",md:"max-w-md min-w-md w-md",lg:"max-w-lg min-w-lg w-lg",xl:"max-w-xl min-w-xl w-xl","2xl":"max-w-2xl min-w-2xl w-2xl","3xl":"max-w-3xl min-w-3xl w-3xl","4xl":"max-w-4xl min-w-4xl w-4xl","5xl":"max-w-5xl min-w-5xl w-5xl","6xl":"max-w-6xl min-w-6xl w-6xl","7xl":"max-w-7xl min-w-7xl w-7xl",full:"max-w-full min-w-full w-full"},Jo=({open:e,onOpenChange:t,children:c,className:i,fullWidth:a=!0,fullHeight:l,fullScreen:s,scrollable:d=!0,maxWidth:u="lg"})=>{const[A,y]=f.useState(!1);return f.useEffect(()=>{if(e)return y(!0),()=>{};{const h=setTimeout(()=>{y(!1)},250);return()=>clearTimeout(h)}},[e]),n.jsx(Ye.Root,{open:A||e,onOpenChange:t,children:n.jsx(Ye.Portal,{children:n.jsxs("div",{className:"fixed inset-0 z-40",children:[n.jsx(Ye.Overlay,{className:E("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 bg-black bg-opacity-50 dark:bg-opacity-60 backdrop-blur-sm ",A&&e?"opacity-100":"opacity-0","z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center"),style:{pointerEvents:A?"auto":"none"}}),n.jsx(Ye.Content,{className:E("h-full outline-none flex justify-center items-center z-50 opacity-100 transition-all duration-200 ease-in-out"),children:n.jsx("div",{className:E(Ge,"z-30","relative","outline-none focus:outline-none",a&&!s?"w-11/12":void 0,l&&!s?"h-full":void 0,"text-gray-900 dark:text-white","justify-center items-center",s?"h-screen w-screen":"max-h-[90vh] shadow-xl","ease-in-out duration-200",d&&"overflow-y-auto",A&&e?"opacity-100":"opacity-0",u&&!s?$H[u]:void 0,i),children:c})})]})})})};function kn({children:e,position:t="sticky",translucent:c=!0,className:i}){return n.jsx("div",{className:E(ue,"py-3 px-4 border-t flex flex-row items-center justify-end bottom-0 right-0 left-0 text-right z-2 gap-2",t,"bg-white bg-opacity-60 dark:bg-gray-900 dark:bg-opacity-60",c?"backdrop-blur-sm":"",i),children:e})}function Zo({children:e,className:t,fullHeight:c}){return c?n.jsx("div",{className:"flex-grow flex flex-col h-full relative",children:e}):n.jsx("div",{className:E("py-6 px-6 h-full flex-grow",t),children:e})}function jH({accept:e,onFilesAdded:t,onFilesRejected:c,maxSize:i,disabled:a,maxFiles:l,title:s,uploadDescription:d="Drag and drop a file here or click",children:u,preventDropOnDocument:A=!0,size:y}){const{getRootProps:h,getInputProps:I,isDragActive:_,isDragAccept:g,isDragReject:b}=Ro.useDropzone({accept:e,noDragEventsBubbling:!0,maxSize:i,onDrop:t,onDropRejected:c,disabled:a,maxFiles:l,preventDropOnDocument:A});return n.jsxs("div",{...h(),className:E(Je,We,he,"flex gap-2","p-4 box-border relative items-center border-2 border-solid border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",{"h-44":y==="medium","h-28":y==="small","cursor-pointer":!a,"hover:bg-field-hover dark:hover:bg-field-hover-dark":!_,"transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-red-500":b,"transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-green-500":g}),children:[n.jsx(j,{variant:"caption",color:"secondary",className:"absolute top-2 left-3.5 cursor-inherit",children:s}),n.jsx("input",{...I()}),u,n.jsx("div",{className:"flex-grow h-28 box-border flex flex-col items-center justify-center text-center",children:n.jsx(j,{align:"center",variant:"label",children:d})})]})}function Ia({children:e,loading:t,disabled:c,onClick:i,startIcon:a,...l}){return n.jsxs(te,{disabled:t||c,onClick:i,component:l.component,...l,children:[t&&n.jsx(Gn,{size:"small"}),!t&&a,e]})}function qH({children:e,style:t,className:c}){return n.jsx("div",{className:E(Ge,c),style:t,children:e})}function Xe({inputRef:e,open:t,name:c,id:i,onOpenChange:a,value:l,onChange:s,onValueChange:d,onMultiValueChange:u,className:A,inputClassName:y,placeholder:h,renderValue:I,renderValues:_,label:g,size:b="medium",includeFocusOutline:p=!0,error:w,disabled:k,padding:v=!0,position:K="item-aligned",endAdornment:m,multiple:C,invisible:B,children:P,...F}){const[D,S]=f.useState(!1);f.useEffect(()=>{S(t??!1)},[t]);const T=f.useCallback(N=>{C?Array.isArray(l)&&l.includes(N)?u?.(l.filter(q=>q!==N)):u?.([...l??[],N]):d?.(N),!C&&s&&s({target:{name:c,value:N}})},[C,s,l,u,d]);return n.jsxs($e.Root,{name:c,value:Array.isArray(l)?void 0:l,defaultOpen:t,open:D,disabled:k,onValueChange:T,onOpenChange:N=>{a?.(N),S(N)},...F,children:[typeof g=="string"?n.jsx(ii,{error:w,children:g}):g,n.jsxs("div",{className:E(b==="small"?"min-h-[42px]":"min-h-[64px]","select-none rounded-md text-sm",B?Ar:Je,k?Re:We,"relative flex items-center",A),children:[n.jsxs($e.Trigger,{ref:e,id:i,className:E("w-full h-full",b==="small"?"h-[42px]":"h-[64px]",v?"px-4 ":"","outlin e-none focus:outline-none","select-none rounded-md text-sm",w?"text-red-500 dark:text-red-600":"focus:text-text-primary dark:focus:text-text-primary-dark",w?"border border-red-500 dark:border-red-600":"",k?"text-gray-600 dark:text-gray-400":"text-gray-800 dark:text-gray-200","relative flex items-center",p?he:"",y),children:[n.jsx($e.Value,{asChild:!0,children:n.jsxs("div",{className:E("flex-grow w-full max-w-full flex flex-row gap-2 items-center","overflow-visible",b==="small"?"h-[42px]":"h-[64px]"),children:[I&&(l&&Array.isArray(l)?l.map((N,q)=>n.jsx("div",{className:"flex items-center gap-1 max-w-full",children:I?I(N,q):N},N)):typeof l=="string"?I?I(l,0):l:h),_&&(!l||Array.isArray(l))?_(l??[]):null,!I&&!_&&l]})}),n.jsx($e.Icon,{className:E("px-2 h-full flex items-center"),children:n.jsx(oo,{size:"small",className:E("transition",t?"rotate-180":"")})})]}),m&&n.jsx("div",{className:E("absolute h-full flex items-center",b==="small"?"right-10":"right-14"),onClick:N=>N.stopPropagation(),children:m})]}),n.jsx($e.Portal,{children:n.jsx($e.Content,{position:K,className:"z-50 overflow-hidden relative border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-800 p-2 rounded-lg shadow-lg",children:n.jsx($e.Viewport,{children:P})})})]})}function xe({value:e,children:t,disabled:c,className:i}){return n.jsxs($e.Item,{value:e,disabled:c,onClick:a=>{a.preventDefault(),a.stopPropagation()},className:E("w-full","relative relative flex items-center p-2 rounded-md text-sm text-gray-700 dark:text-gray-300",he,"focus:z-10","data-[state=checked]:bg-gray-100 data-[state=checked]:dark:bg-gray-900 focus:bg-gray-100 dark:focus:bg-gray-950","data-[state=checked]:focus:bg-gray-200 data-[state=checked]:dark:focus:bg-gray-950",c?"opacity-50 cursor-not-allowed":"cursor-pointer","[&>*]:w-full","overflow-visible",i),children:[n.jsx($e.ItemText,{children:t}),n.jsx("div",{className:"absolute left-1 data-[state=checked]:block hidden",children:n.jsx(lc,{size:16})})]},e)}function JH({label:e,children:t,className:c}){return n.jsxs(n.Fragment,{children:[n.jsx($e.Group,{className:E("text-xs text-gray-900 dark:text-gray-100 uppercase tracking-wider font-bold mt-6 first:mt-2","px-2 py-2",c),children:e}),t]})}function Qt({onTextSearch:e,placeholder:t="Search",expandable:c=!1,large:i=!1,className:a,autoFocus:l}){const[s,d]=f.useState(""),[u,A]=f.useState(!1),y=f.useDeferredValue(s);f.useEffect(()=>{e(y||void 0)},[y]);const h=f.useCallback(()=>{d(""),e(void 0)},[]);return n.jsxs("div",{className:E("relative",i?"h-14":"h-[42px]","bg-gray-50 dark:bg-gray-800 transition duration-150 ease-in-out border",ue,"rounded"),children:[n.jsx("div",{className:"absolute p-0 px-4 h-full absolute pointer-events-none flex items-center justify-center top-0",children:n.jsx(rc,{className:"text-gray-500"})}),n.jsx("input",{placeholder:t,value:s,onChange:I=>{d(I.target.value)},autoFocus:l,onFocus:()=>A(!0),onBlur:()=>A(!1),className:E("relative flex items-center rounded transition-all bg-transparent outline-none appearance-none border-none","pl-12 h-full text-current ",c?u?"w-[220px]":"w-[180px]":"",he,a)}),s?n.jsx(R,{className:`${i?"mr-2 top-1":"mr-1 top-0"} absolute right-0 z-10`,onClick:h,children:n.jsx(cn,{size:"small"})}):n.jsx("div",{style:{width:26}})]})}const Vt=({children:e,side:t="right",open:c,onOpenChange:i,transparent:a,...l})=>{const[s,d]=f.useState(!1);f.useEffect(()=>{if(c)return d(!0),()=>{};{const A=setTimeout(()=>{d(!1)},250);return()=>clearTimeout(A)}},[c]);const u={top:"-translate-y-full",bottom:"translate-y-full",left:"-translate-x-full",right:"translate-x-full"};return n.jsx(Ye.Root,{open:s||c,onOpenChange:i,children:n.jsxs(Ye.Portal,{children:[n.jsx(Ye.Overlay,{className:E("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 backdrop-blur-sm",a?"bg-white bg-opacity-80":"bg-black bg-opacity-50","dark:bg-black dark:bg-opacity-60",s&&c?"opacity-100":"opacity-0"),style:{pointerEvents:s?"auto":"none"}}),n.jsx(Ye.Content,{...l,className:E("text-gray-900 dark:text-white","fixed transform z-20 transition-all duration-[240ms] ease-in-out","outline-none focus:outline-none",a?"":"shadow-md",t==="top"||t==="bottom"?"w-full":"h-full",t==="left"||t==="top"?"left-0 top-0":"right-0 bottom-0",s&&c?"opacity-100":"opacity-0",!s||!c?u[t]:""),children:e})]})})};function ZH(){return n.jsxs("div",{role:"status",children:[n.jsxs("svg",{"aria-hidden":"true",className:"w-8 h-8 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-primary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),n.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),n.jsx("span",{className:"sr-only",children:"Loading..."})]})}function un({value:e,onChange:t,label:c,type:i="text",multiline:a=!1,invisible:l,rows:s,disabled:d,error:u,endAdornment:A,autoFocus:y,placeholder:h,size:I="medium",className:_,style:g,inputClassName:b,inputStyle:p,inputRef:w,...k}){const v=w??f.useRef(null),[K,m]=f.useState(document.activeElement===v.current),C=e!=null&&e!=="",B=f.useCallback(F=>{F.target.blur(),F.stopPropagation(),setTimeout(()=>{F.target.focus()},0)},[]),P=a?n.jsx(gt,{...k,ref:v,placeholder:h,autoFocus:y,rows:s,value:e??"",onChange:t,style:p,className:E(l?ur:he,"rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-[28px]",d&&"border border-transparent outline-none opacity-50 text-gray-600 dark:text-gray-500")}):n.jsx("input",{...k,ref:v,onWheel:i==="number"?B:void 0,disabled:d,style:p,className:E("w-full outline-none bg-transparent leading-normal px-3","rounded-md",l?ur:he,d?Re:We,I==="small"?"min-h-[48px]":"min-h-[64px]",c?I==="medium"?"pt-[28px] pb-2":"pt-4 pb-2":"py-2",K?"text-text-primary dark:text-text-primary-dark":"",A?"pr-10":"pr-3",b,d&&"border border-transparent outline-none opacity-50 dark:opacity-50 text-gray-800 dark:text-gray-200"),placeholder:h,autoFocus:y,onFocus:()=>m(!0),onBlur:()=>m(!1),type:i,value:Number.isNaN(e)?"":e??"",onChange:t});return n.jsxs("div",{className:E("rounded-md relative max-w-full",l?Ar:Je,d?Re:We,u?"border border-red-500 dark:border-red-600":"",{"min-h-[48px]":!l&&I==="small","min-h-[64px]":!l&&I==="medium"},_),style:g,children:[c&&n.jsx(mt,{className:E("pointer-events-none absolute",I==="medium"?"top-1":"-top-1",u?"text-red-500 dark:text-red-600":K?"text-primary":"text-text-secondary dark:text-text-secondary-dark",d?"opacity-50":""),shrink:C||K,children:c}),P,A&&n.jsx("div",{className:"flex absolute right-0 top-3 mr-3 ",children:A})]})}function ba({value:e,onValueChange:t,className:c,children:i}){return n.jsx(nr.Root,{value:e,onValueChange:t,children:n.jsx(nr.List,{className:E("flex text-sm font-medium text-center text-gray-800 dark:text-gray-200",c),children:i})})}function Xo({value:e,className:t,children:c,disabled:i}){return n.jsx(nr.Trigger,{value:e,disabled:i,className:E(he,"border-b-2 border-transparent","data-[state=active]:border-secondary",i?"text-gray-400 dark:text-gray-500":E("text-gray-700 dark:text-gray-300","data-[state=active]:text-gray-900 data-[state=active]:dark:text-gray-100","hover:text-gray-800 dark:hover:text-gray-200"),t),children:n.jsx("div",{className:E("uppercase inline-block p-2 px-4 m-2 rounded","hover:bg-gray-100 dark:hover:bg-gray-800"),children:c})})}const XH=({children:e,className:t,style:c})=>n.jsx("table",{className:E("w-full text-left text-gray-800 dark:text-gray-200 rounded-md overflow-x-auto",t),style:c,children:e}),xH=({children:e,className:t})=>n.jsx("tbody",{className:E("bg-white text-sm dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700",t),children:e}),RH=({children:e,className:t})=>n.jsx("thead",{children:n.jsx("tr",{className:E(ue,"text-sm font-medium text-gray-700 dark:text-gray-300","bg-gray-50 border-b dark:bg-gray-900",t),children:e})}),eU=({children:e,className:t,onClick:c,style:i})=>n.jsx("tr",{onClick:c,style:i,className:E("divide-gray-100 dark:divide-gray-800","bg-white dark:bg-gray-950",c?"hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer":"",t),children:e}),nU=({children:e,header:t=!1,scope:c="",align:i,className:a,style:l,colspan:s})=>{const d=f.useRef(null),u=t||oU(d.current)==="TableHeader"?"th":"td";return n.jsx(u,{scope:c,colSpan:s,ref:d,style:l,className:E("px-4 py-3 text-clip ",i==="center"?"text-center":i==="right"?"text-right":"text-left",a),children:e})};function oU(e){if(e){const t=Object.keys(e).find(l=>l.startsWith("__reactFiber$")||l.startsWith("__reactInternalInstance$")),c=e[t],i=l=>{let s=l.return;for(;typeof s.type=="string";)s=s.return;return s};let a=i(c);return a=i(a),a?.elementType?.name}}o.AbcIcon=ls,o.AcUnitIcon=ss,o.AccessAlarmIcon=ds,o.AccessAlarmsIcon=us,o.AccessTimeFilledIcon=As,o.AccessTimeIcon=fs,o.AccessibilityIcon=_s,o.AccessibilityNewIcon=ys,o.AccessibleForwardIcon=gs,o.AccessibleIcon=hs,o.AccountBalanceIcon=Is,o.AccountBalanceWalletIcon=bs,o.AccountBoxIcon=ps,o.AccountCircleIcon=ws,o.AccountTreeIcon=ks,o.AdUnitsIcon=ms,o.AdbIcon=vs,o.AddAPhotoIcon=Ks,o.AddAlarmIcon=Cs,o.AddAlertIcon=Ss,o.AddBoxIcon=Bs,o.AddBusinessIcon=Es,o.AddCardIcon=Fs,o.AddChartIcon=Ps,o.AddCircleIcon=Ds,o.AddCircleOutlineIcon=Ns,o.AddCommentIcon=Ts,o.AddHomeIcon=Ms,o.AddHomeWorkIcon=Os,o.AddIcCallIcon=Ls,o.AddIcon=gn,o.AddLinkIcon=tc,o.AddLocationAltIcon=Vs,o.AddLocationIcon=Qs,o.AddModeratorIcon=Ws,o.AddPhotoAlternateIcon=Gs,o.AddReactionIcon=zs,o.AddRoadIcon=Hs,o.AddShoppingCartIcon=Us,o.AddTaskIcon=Ys,o.AddToDriveIcon=$s,o.AddToHomeScreenIcon=js,o.AddToPhotosIcon=qs,o.AddToQueueIcon=Js,o.AdfScannerIcon=Zs,o.AdjustIcon=Xs,o.AdminPanelSettingsIcon=xs,o.AdsClickIcon=Rs,o.AgricultureIcon=ed,o.AirIcon=nd,o.AirlineSeatFlatAngledIcon=rd,o.AirlineSeatFlatIcon=od,o.AirlineSeatIndividualSuiteIcon=td,o.AirlineSeatLegroomExtraIcon=cd,o.AirlineSeatLegroomNormalIcon=id,o.AirlineSeatLegroomReducedIcon=ad,o.AirlineSeatReclineExtraIcon=ld,o.AirlineSeatReclineNormalIcon=sd,o.AirlineStopsIcon=dd,o.AirlinesIcon=ud,o.AirplaneTicketIcon=fd,o.AirplanemodeActiveIcon=Ad,o.AirplanemodeInactiveIcon=_d,o.AirplayIcon=yd,o.AirportShuttleIcon=hd,o.AlarmAddIcon=Id,o.AlarmIcon=gd,o.AlarmOffIcon=bd,o.AlarmOnIcon=pd,o.AlbumIcon=wd,o.Alert=zH,o.AlignHorizontalCenterIcon=kd,o.AlignHorizontalLeftIcon=md,o.AlignHorizontalRightIcon=vd,o.AlignVerticalBottomIcon=Kd,o.AlignVerticalCenterIcon=Cd,o.AlignVerticalTopIcon=Sd,o.AllInboxIcon=Bd,o.AllInclusiveIcon=Ed,o.AllOutIcon=Fd,o.AltRouteIcon=Pd,o.AlternateEmailIcon=Dd,o.AnalyticsIcon=Nd,o.AnchorIcon=Td,o.AndroidIcon=Md,o.AnimationIcon=Od,o.AnnouncementIcon=Ld,o.AodIcon=Qd,o.ApartmentIcon=Vd,o.ApiIcon=Wd,o.AppBlockingIcon=Gd,o.AppRegistrationIcon=zd,o.AppSettingsAltIcon=Hd,o.AppShortcutIcon=Ud,o.ApprovalIcon=Yd,o.AppsIcon=$d,o.AppsOutageIcon=jd,o.ArchitectureIcon=qd,o.ArchiveIcon=Jd,o.AreaChartIcon=Zd,o.ArrayContainer=Pt,o.ArrayContainerItem=Dt,o.ArrayCustomShapedFieldBinding=vi,o.ArrayEnumPreview=Qr,o.ArrayItemOptions=da,o.ArrayOfMapsPreview=Jc,o.ArrayOfReferencesFieldBinding=li,o.ArrayOfReferencesPreview=Xc,o.ArrayOfStorageComponentsPreview=xc,o.ArrayOfStringsPreview=Rc,o.ArrayOneOfPreview=ei,o.ArrayPropertyEnumPreview=Vr,o.ArrayPropertyPreview=Lr,o.ArrowBackIcon=Xd,o.ArrowBackIosIcon=xd,o.ArrowBackIosNewIcon=Rd,o.ArrowCircleDownIcon=eu,o.ArrowCircleLeftIcon=nu,o.ArrowCircleRightIcon=ou,o.ArrowCircleUpIcon=ru,o.ArrowDownwardIcon=tu,o.ArrowDropDownCircleIcon=cu,o.ArrowDropDownIcon=yr,o.ArrowDropUpIcon=iu,o.ArrowForwardIcon=cc,o.ArrowForwardIosIcon=au,o.ArrowLeftIcon=lu,o.ArrowOutwardIcon=su,o.ArrowRightAltIcon=uu,o.ArrowRightIcon=du,o.ArrowUpwardIcon=So,o.ArtTrackIcon=fu,o.ArticleIcon=Au,o.AspectRatioIcon=_u,o.AssessmentIcon=yu,o.AssignmentIcon=ic,o.AssignmentIndIcon=hu,o.AssignmentLateIcon=gu,o.AssignmentReturnIcon=Iu,o.AssignmentReturnedIcon=bu,o.AssignmentTurnedInIcon=pu,o.AssistWalkerIcon=wu,o.AssistantDirectionIcon=mu,o.AssistantIcon=ku,o.AssistantPhotoIcon=vu,o.AssuredWorkloadIcon=Ku,o.AsyncPreviewComponent=$G,o.AtmIcon=Cu,o.AttachEmailIcon=Su,o.AttachFileIcon=Bu,o.AttachMoneyIcon=Eu,o.AttachmentIcon=Fu,o.AttractionsIcon=Pu,o.AttributionIcon=Du,o.AudioFileIcon=Nu,o.AudiotrackIcon=Tu,o.AuthControllerContext=Cr,o.AutoAwesomeIcon=Mu,o.AutoAwesomeMosaicIcon=Ou,o.AutoAwesomeMotionIcon=Lu,o.AutoDeleteIcon=Qu,o.AutoFixHighIcon=Vu,o.AutoFixNormalIcon=Wu,o.AutoFixOffIcon=Gu,o.AutoGraphIcon=zu,o.AutoModeIcon=Hu,o.AutoStoriesIcon=Uu,o.Autocomplete=VH,o.AutocompleteItem=WH,o.AutofpsSelectIcon=Yu,o.AutorenewIcon=$u,o.AvTimerIcon=ju,o.Avatar=Mt,o.BabyChangingStationIcon=qu,o.BackHandIcon=Ju,o.BackpackIcon=Zu,o.BackspaceIcon=Xu,o.BackupIcon=xu,o.BackupTableIcon=Ru,o.BadgeIcon=ef,o.BakeryDiningIcon=nf,o.BalanceIcon=of,o.BalconyIcon=rf,o.BallotIcon=hr,o.BarChartIcon=tf,o.BatchPredictionIcon=cf,o.BathroomIcon=af,o.BathtubIcon=lf,o.Battery0BarIcon=sf,o.Battery1BarIcon=df,o.Battery2BarIcon=uf,o.Battery3BarIcon=ff,o.Battery4BarIcon=Af,o.Battery5BarIcon=_f,o.Battery6BarIcon=yf,o.BatteryAlertIcon=hf,o.BatteryChargingFullIcon=gf,o.BatteryFullIcon=If,o.BatterySaverIcon=bf,o.BatteryStdIcon=pf,o.BatteryUnknownIcon=wf,o.BeachAccessIcon=kf,o.BedIcon=mf,o.BedroomBabyIcon=vf,o.BedroomChildIcon=Kf,o.BedroomParentIcon=Cf,o.BedtimeIcon=Sf,o.BedtimeOffIcon=Bf,o.BeenhereIcon=Ef,o.BentoIcon=Ff,o.BikeScooterIcon=Pf,o.BiotechIcon=Df,o.BlenderIcon=Nf,o.BlindIcon=Tf,o.BlindsClosedIcon=Of,o.BlindsIcon=Mf,o.BlockFieldBinding=ki,o.BlockIcon=Lf,o.BloodtypeIcon=Qf,o.BluetoothAudioIcon=Wf,o.BluetoothConnectedIcon=Gf,o.BluetoothDisabledIcon=zf,o.BluetoothDriveIcon=Hf,o.BluetoothIcon=Vf,o.BluetoothSearchingIcon=Uf,o.BlurCircularIcon=Yf,o.BlurLinearIcon=$f,o.BlurOffIcon=jf,o.BlurOnIcon=qf,o.BoltIcon=Jf,o.BookIcon=Zf,o.BookOnlineIcon=Xf,o.BookmarkAddIcon=Rf,o.BookmarkAddedIcon=eA,o.BookmarkBorderIcon=nA,o.BookmarkIcon=xf,o.BookmarkRemoveIcon=oA,o.BookmarksIcon=rA,o.BooleanPreview=ti,o.BooleanSwitch=Zr,o.BooleanSwitchWithLabel=On,o.BorderAllIcon=tA,o.BorderBottomIcon=cA,o.BorderClearIcon=iA,o.BorderColorIcon=aA,o.BorderHorizontalIcon=lA,o.BorderInnerIcon=sA,o.BorderLeftIcon=dA,o.BorderOuterIcon=uA,o.BorderRightIcon=fA,o.BorderStyleIcon=AA,o.BorderTopIcon=_A,o.BorderVerticalIcon=yA,o.BoyIcon=hA,o.BrandingWatermarkIcon=gA,o.BreadcrumbUpdater=R3,o.BreakfastDiningIcon=IA,o.Brightness1Icon=bA,o.Brightness2Icon=pA,o.Brightness3Icon=wA,o.Brightness4Icon=kA,o.Brightness5Icon=mA,o.Brightness6Icon=vA,o.Brightness7Icon=KA,o.BrightnessAutoIcon=CA,o.BrightnessHighIcon=SA,o.BrightnessLowIcon=BA,o.BrightnessMediumIcon=EA,o.BroadcastOnHomeIcon=FA,o.BroadcastOnPersonalIcon=PA,o.BrokenImageIcon=DA,o.BrowseGalleryIcon=NA,o.BrowserNotSupportedIcon=TA,o.BrowserUpdatedIcon=MA,o.BrunchDiningIcon=OA,o.BrushIcon=LA,o.BubbleChartIcon=QA,o.BugReportIcon=VA,o.BuildCircleIcon=GA,o.BuildIcon=WA,o.BungalowIcon=zA,o.BurstModeIcon=HA,o.BusAlertIcon=UA,o.BusinessCenterIcon=$A,o.BusinessIcon=YA,o.Button=te,o.COLLECTION_PATH_SEPARATOR=Ei,o.CabinIcon=jA,o.CableIcon=qA,o.CachedIcon=JA,o.CakeIcon=ZA,o.CalculateIcon=XA,o.CalendarMonthIcon=ac,o.CalendarTodayIcon=xA,o.CalendarViewDayIcon=RA,o.CalendarViewMonthIcon=e_,o.CalendarViewWeekIcon=n_,o.CallEndIcon=r_,o.CallIcon=o_,o.CallMadeIcon=t_,o.CallMergeIcon=c_,o.CallMissedIcon=i_,o.CallMissedOutgoingIcon=a_,o.CallReceivedIcon=l_,o.CallSplitIcon=s_,o.CallToActionIcon=d_,o.CameraAltIcon=f_,o.CameraEnhanceIcon=A_,o.CameraFrontIcon=__,o.CameraIcon=u_,o.CameraIndoorIcon=y_,o.CameraOutdoorIcon=h_,o.CameraRearIcon=g_,o.CameraRollIcon=I_,o.CameraswitchIcon=b_,o.CampaignIcon=p_,o.CancelIcon=w_,o.CancelPresentationIcon=k_,o.CancelScheduleSendIcon=m_,o.CandlestickChartIcon=v_,o.CarCrashIcon=K_,o.CarRentalIcon=C_,o.CarRepairIcon=S_,o.Card=ga,o.CardGiftcardIcon=B_,o.CardMembershipIcon=E_,o.CardTravelIcon=F_,o.CarpenterIcon=P_,o.CasesIcon=D_,o.CasinoIcon=N_,o.CastConnectedIcon=M_,o.CastForEducationIcon=O_,o.CastIcon=T_,o.CastleIcon=L_,o.CatchingPokemonIcon=Q_,o.CategoryIcon=V_,o.CelebrationIcon=W_,o.CellTowerIcon=G_,o.CellWifiIcon=z_,o.CenterFocusStrongIcon=H_,o.CenterFocusWeakIcon=U_,o.CenteredView=Lt,o.ChairAltIcon=$_,o.ChairIcon=Y_,o.ChaletIcon=j_,o.ChangeCircleIcon=q_,o.ChangeHistoryIcon=J_,o.ChargingStationIcon=Z_,o.ChatBubbleIcon=x_,o.ChatBubbleOutlineIcon=R_,o.ChatIcon=X_,o.CheckBoxIcon=ey,o.CheckBoxOutlineBlankIcon=ny,o.CheckCircleIcon=oy,o.CheckCircleOutlineIcon=ry,o.CheckIcon=lc,o.Checkbox=Gr,o.ChecklistIcon=ty,o.ChecklistRtlIcon=cy,o.CheckroomIcon=iy,o.ChevronLeftIcon=sc,o.ChevronRightIcon=ay,o.ChildCareIcon=ly,o.ChildFriendlyIcon=sy,o.Chip=Fo,o.ChromeReaderModeIcon=dy,o.ChurchIcon=uy,o.CircleIcon=gr,o.CircleNotificationsIcon=fy,o.CircularProgress=Gn,o.CircularProgressCenter=fo,o.ClassIcon=Ay,o.CleanHandsIcon=_y,o.CleaningServicesIcon=yy,o.ClearAllIcon=hy,o.ClearIcon=cn,o.CloseFullscreenIcon=gy,o.CloseIcon=Ir,o.ClosedCaptionDisabledIcon=by,o.ClosedCaptionIcon=Iy,o.ClosedCaptionOffIcon=py,o.CloudCircleIcon=ky,o.CloudDoneIcon=my,o.CloudDownloadIcon=vy,o.CloudIcon=wy,o.CloudOffIcon=Ky,o.CloudQueueIcon=Cy,o.CloudSyncIcon=Sy,o.CloudUploadIcon=By,o.Co2Icon=Ey,o.CoPresentIcon=Fy,o.CodeIcon=Py,o.CodeOffIcon=Dy,o.CoffeeIcon=Ny,o.CoffeeMakerIcon=Ty,o.Collapse=To,o.CollectionsBookmarkIcon=Oy,o.CollectionsIcon=My,o.ColorLensIcon=Ly,o.ColorizeIcon=Qy,o.CommentBankIcon=Wy,o.CommentIcon=Vy,o.CommentsDisabledIcon=Gy,o.CommitIcon=zy,o.CommuteIcon=Hy,o.CompareArrowsIcon=Yy,o.CompareIcon=Uy,o.CompassCalibrationIcon=$y,o.CompostIcon=jy,o.CompressIcon=qy,o.ComputerIcon=Jy,o.ConfirmationNumberIcon=Zy,o.ConnectWithoutContactIcon=Xy,o.ConnectedTvIcon=xy,o.ConnectingAirportsIcon=Ry,o.ConstructionIcon=eh,o.ContactEmergencyIcon=nh,o.ContactMailIcon=oh,o.ContactPageIcon=rh,o.ContactPhoneIcon=th,o.ContactSupportIcon=ch,o.ContactlessIcon=ih,o.ContactsIcon=ah,o.Container=Ot,o.ContentCopyIcon=no,o.ContentCutIcon=lh,o.ContentPasteGoIcon=dh,o.ContentPasteIcon=sh,o.ContentPasteOffIcon=uh,o.ContentPasteSearchIcon=fh,o.ContrastIcon=Ah,o.ControlCameraIcon=_h,o.ControlPointDuplicateIcon=hh,o.ControlPointIcon=yh,o.CookieIcon=gh,o.CopyAllIcon=Ih,o.CopyrightIcon=bh,o.CoronavirusIcon=ph,o.CorporateFareIcon=wh,o.CottageIcon=kh,o.CountertopsIcon=mh,o.CreateIcon=vh,o.CreateNewFolderIcon=Kh,o.CreditCardIcon=Ch,o.CreditCardOffIcon=Sh,o.CreditScoreIcon=Bh,o.CribIcon=Eh,o.CrisisAlertIcon=Fh,o.Crop169Icon=Dh,o.Crop32Icon=Nh,o.Crop54Icon=Th,o.Crop75Icon=Mh,o.CropDinIcon=Oh,o.CropFreeIcon=Lh,o.CropIcon=Ph,o.CropLandscapeIcon=Qh,o.CropOriginalIcon=Vh,o.CropPortraitIcon=Wh,o.CropRotateIcon=Gh,o.CropSquareIcon=zh,o.CrueltyFreeIcon=Hh,o.CssIcon=Uh,o.CurrencyBitcoinIcon=Yh,o.CurrencyExchangeIcon=$h,o.CurrencyFrancIcon=jh,o.CurrencyLiraIcon=qh,o.CurrencyPoundIcon=Jh,o.CurrencyRubleIcon=Zh,o.CurrencyRupeeIcon=Xh,o.CurrencyYenIcon=xh,o.CurrencyYuanIcon=Rh,o.CurtainsClosedIcon=ng,o.CurtainsIcon=eg,o.CycloneIcon=og,o.DEFAULT_FIELD_CONFIGS=lt,o.DangerousIcon=rg,o.DarkModeIcon=dc,o.DashboardCustomizeIcon=cg,o.DashboardIcon=tg,o.DataArrayIcon=ig,o.DataExplorationIcon=ag,o.DataObjectIcon=lg,o.DataSaverOffIcon=sg,o.DataSaverOnIcon=dg,o.DataThresholdingIcon=ug,o.DataUsageIcon=fg,o.DatasetIcon=Ag,o.DatasetLinkedIcon=_g,o.DatePreview=ri,o.DateRangeIcon=yg,o.DateTimeField=Vn,o.DateTimeFieldBinding=gi,o.DeblurIcon=hg,o.DebouncedTextField=nl,o.DeckIcon=gg,o.DefaultHomePage=ia,o.DehazeIcon=Ig,o.DeleteConfirmationDialog=eH,o.DeleteForeverIcon=bg,o.DeleteIcon=Bo,o.DeleteOutlineIcon=pg,o.DeleteSweepIcon=wg,o.DeliveryDiningIcon=kg,o.DensityLargeIcon=mg,o.DensityMediumIcon=vg,o.DensitySmallIcon=Kg,o.DepartureBoardIcon=Cg,o.DescriptionIcon=uc,o.DeselectIcon=Sg,o.DesignServicesIcon=Bg,o.DeskIcon=Eg,o.DesktopAccessDisabledIcon=Fg,o.DesktopMacIcon=Pg,o.DesktopWindowsIcon=Dg,o.DetailsIcon=Ng,o.DeveloperBoardIcon=Tg,o.DeveloperBoardOffIcon=Mg,o.DeveloperModeIcon=Og,o.DeviceHubIcon=Lg,o.DeviceThermostatIcon=Qg,o.DeviceUnknownIcon=Vg,o.DevicesFoldIcon=Gg,o.DevicesIcon=Wg,o.DevicesOtherIcon=zg,o.DialerSipIcon=Hg,o.Dialog=Jo,o.DialogActions=kn,o.DialogContent=Zo,o.DialpadIcon=Ug,o.DiamondIcon=Yg,o.DifferenceIcon=$g,o.DiningIcon=jg,o.DinnerDiningIcon=qg,o.DirectionsBikeIcon=Zg,o.DirectionsBoatFilledIcon=xg,o.DirectionsBoatIcon=Xg,o.DirectionsBusFilledIcon=eI,o.DirectionsBusIcon=Rg,o.DirectionsCarFilledIcon=oI,o.DirectionsCarIcon=nI,o.DirectionsIcon=Jg,o.DirectionsOffIcon=rI,o.DirectionsRailwayFilledIcon=cI,o.DirectionsRailwayIcon=tI,o.DirectionsRunIcon=iI,o.DirectionsSubwayFilledIcon=lI,o.DirectionsSubwayIcon=aI,o.DirectionsTransitFilledIcon=dI,o.DirectionsTransitIcon=sI,o.DirectionsWalkIcon=uI,o.DirtyLensIcon=fI,o.DisabledByDefaultIcon=AI,o.DisabledVisibleIcon=_I,o.DiscFullIcon=yI,o.DiscountIcon=hI,o.DisplaySettingsIcon=gI,o.Diversity1Icon=II,o.Diversity2Icon=bI,o.Diversity3Icon=pI,o.DnsIcon=wI,o.DoDisturbAltIcon=mI,o.DoDisturbIcon=kI,o.DoDisturbOffIcon=vI,o.DoDisturbOnIcon=KI,o.DoNotDisturbAltIcon=SI,o.DoNotDisturbIcon=CI,o.DoNotDisturbOffIcon=BI,o.DoNotDisturbOnIcon=EI,o.DoNotDisturbOnTotalSilenceIcon=FI,o.DoNotStepIcon=PI,o.DoNotTouchIcon=DI,o.DockIcon=NI,o.DocumentScannerIcon=TI,o.DomainAddIcon=OI,o.DomainDisabledIcon=LI,o.DomainIcon=MI,o.DomainVerificationIcon=QI,o.DoneAllIcon=WI,o.DoneIcon=VI,o.DoneOutlineIcon=GI,o.DonutLargeIcon=zI,o.DonutSmallIcon=HI,o.DoorBackIcon=UI,o.DoorFrontIcon=YI,o.DoorSlidingIcon=$I,o.DoorbellIcon=jI,o.DoubleArrowIcon=qI,o.DownhillSkiingIcon=JI,o.DownloadDoneIcon=XI,o.DownloadForOfflineIcon=xI,o.DownloadIcon=ZI,o.DownloadingIcon=RI,o.DraftsIcon=eb,o.DragHandleIcon=nb,o.DragIndicatorIcon=ob,o.DrawIcon=rb,o.Drawer=ya,o.DrawerNavigationItem=Tt,o.DriveEtaIcon=tb,o.DriveFileMoveIcon=cb,o.DriveFileMoveRtlIcon=ib,o.DriveFileRenameOutlineIcon=ab,o.DriveFolderUploadIcon=fc,o.DryCleaningIcon=sb,o.DryIcon=lb,o.DuoIcon=db,o.DvrIcon=ub,o.DynamicFeedIcon=fb,o.DynamicFormIcon=Ab,o.EMobiledataIcon=_b,o.EarbudsBatteryIcon=hb,o.EarbudsIcon=yb,o.EastIcon=gb,o.EdgesensorHighIcon=Ib,o.EdgesensorLowIcon=bb,o.EditAttributesIcon=pb,o.EditCalendarIcon=wb,o.EditIcon=Ac,o.EditLocationAltIcon=mb,o.EditLocationIcon=kb,o.EditNoteIcon=vb,o.EditNotificationsIcon=Kb,o.EditOffIcon=Cb,o.EditRoadIcon=Sb,o.EggAltIcon=Eb,o.EggIcon=Bb,o.EjectIcon=Fb,o.ElderlyIcon=Pb,o.ElderlyWomanIcon=Db,o.ElectricBikeIcon=Nb,o.ElectricBoltIcon=Tb,o.ElectricCarIcon=Mb,o.ElectricMeterIcon=Ob,o.ElectricMopedIcon=Lb,o.ElectricRickshawIcon=Qb,o.ElectricScooterIcon=Vb,o.ElectricalServicesIcon=Wb,o.ElevatorIcon=Gb,o.EmailIcon=_c,o.EmergencyIcon=zb,o.EmergencyRecordingIcon=Hb,o.EmergencyShareIcon=Ub,o.EmojiEmotionsIcon=Yb,o.EmojiEventsIcon=$b,o.EmojiFoodBeverageIcon=jb,o.EmojiNatureIcon=qb,o.EmojiObjectsIcon=Jb,o.EmojiPeopleIcon=Zb,o.EmojiSymbolsIcon=Xb,o.EmojiTransportationIcon=xb,o.EmptyValue=Fn,o.EnergySavingsLeafIcon=Rb,o.EngineeringIcon=ep,o.EnhancedEncryptionIcon=np,o.EntityCollectionTable=Kt,o.EntityCollectionView=St,o.EntityForm=Si,o.EntityPreview=yt,o.EntityReference=je,o.EnumValuesChip=Ee,o.EqualizerIcon=op,o.ErrorBoundary=ie,o.ErrorIcon=br,o.ErrorOutlineIcon=yc,o.ErrorView=we,o.EscalatorIcon=rp,o.EscalatorWarningIcon=tp,o.EuroIcon=cp,o.EuroSymbolIcon=ip,o.EvStationIcon=ap,o.EventAvailableIcon=sp,o.EventBusyIcon=dp,o.EventIcon=lp,o.EventNoteIcon=up,o.EventRepeatIcon=fp,o.EventSeatIcon=Ap,o.ExitToAppIcon=_p,o.ExpandCircleDownIcon=hp,o.ExpandIcon=yp,o.ExpandLessIcon=gp,o.ExpandMoreIcon=oo,o.ExpandablePanel=dn,o.ExplicitIcon=Ip,o.ExploreIcon=bp,o.ExploreOffIcon=pp,o.ExposureIcon=wp,o.ExposureNeg1Icon=kp,o.ExposureNeg2Icon=mp,o.ExposurePlus1Icon=vp,o.ExposurePlus2Icon=Kp,o.ExposureZeroIcon=Cp,o.ExtensionIcon=Sp,o.ExtensionOffIcon=Bp,o.Face2Icon=Fp,o.Face3Icon=Pp,o.Face4Icon=Dp,o.Face5Icon=Np,o.Face6Icon=Tp,o.FaceIcon=Ep,o.FaceRetouchingNaturalIcon=Mp,o.FaceRetouchingOffIcon=Op,o.FactCheckIcon=Lp,o.FactoryIcon=Qp,o.FamilyRestroomIcon=Vp,o.FastForwardIcon=Wp,o.FastRewindIcon=Gp,o.FastfoodIcon=zp,o.FavoriteBorderIcon=Up,o.FavoriteIcon=Hp,o.FaxIcon=Yp,o.FeaturedPlayListIcon=$p,o.FeaturedVideoIcon=jp,o.FeedIcon=qp,o.FeedbackIcon=Jp,o.FemaleIcon=Zp,o.FenceIcon=Xp,o.FestivalIcon=xp,o.FiberDvrIcon=Rp,o.FiberManualRecordIcon=ew,o.FiberNewIcon=nw,o.FiberPinIcon=ow,o.FiberSmartRecordIcon=rw,o.FieldConfigBadge=x3,o.FieldHelperText=Se,o.FileCopyIcon=hc,o.FileDownloadDoneIcon=cw,o.FileDownloadIcon=tw,o.FileDownloadOffIcon=iw,o.FileOpenIcon=aw,o.FilePresentIcon=lw,o.FileUpload=jH,o.FileUploadIcon=sw,o.Filter1Icon=uw,o.Filter2Icon=fw,o.Filter3Icon=Aw,o.Filter4Icon=_w,o.Filter5Icon=yw,o.Filter6Icon=hw,o.Filter7Icon=gw,o.Filter8Icon=Iw,o.Filter9Icon=bw,o.Filter9PlusIcon=pw,o.FilterAltIcon=ww,o.FilterAltOffIcon=kw,o.FilterBAndWIcon=mw,o.FilterCenterFocusIcon=vw,o.FilterDramaIcon=Kw,o.FilterFramesIcon=Cw,o.FilterHdrIcon=Sw,o.FilterIcon=dw,o.FilterListIcon=Bw,o.FilterListOffIcon=gc,o.FilterNoneIcon=Ew,o.FilterTiltShiftIcon=Fw,o.FilterVintageIcon=Pw,o.FindInPageIcon=Dw,o.FindReplaceIcon=Nw,o.FingerprintIcon=Tw,o.FireCMS=bH,o.FireCMSAppBar=sa,o.FireCMSContextInstance=Sr,o.FireCMSLogo=la,o.FireExtinguisherIcon=Mw,o.FireHydrantAltIcon=Ow,o.FireTruckIcon=Lw,o.FireplaceIcon=Qw,o.FirstPageIcon=Vw,o.FitScreenIcon=Ww,o.FitbitIcon=Gw,o.FitnessCenterIcon=zw,o.FlagCircleIcon=Hw,o.FlagIcon=Ic,o.FlakyIcon=Uw,o.FlareIcon=Yw,o.FlashAutoIcon=$w,o.FlashOffIcon=jw,o.FlashOnIcon=qw,o.FlashlightOffIcon=Jw,o.FlashlightOnIcon=Zw,o.FlatwareIcon=Xw,o.FlightClassIcon=Rw,o.FlightIcon=xw,o.FlightLandIcon=ek,o.FlightTakeoffIcon=nk,o.FlipCameraAndroidIcon=rk,o.FlipCameraIosIcon=tk,o.FlipIcon=ok,o.FlipToBackIcon=ck,o.FlipToFrontIcon=ik,o.FloodIcon=ak,o.FluorescentIcon=lk,o.FlutterDashIcon=sk,o.FmdBadIcon=dk,o.FmdGoodIcon=uk,o.FolderCopyIcon=Ak,o.FolderDeleteIcon=_k,o.FolderIcon=fk,o.FolderOffIcon=yk,o.FolderOpenIcon=hk,o.FolderSharedIcon=gk,o.FolderSpecialIcon=Ik,o.FolderZipIcon=bk,o.FollowTheSignsIcon=pk,o.FontDownloadIcon=wk,o.FontDownloadOffIcon=kk,o.FoodBankIcon=mk,o.ForestIcon=vk,o.ForkLeftIcon=Kk,o.ForkRightIcon=Ck,o.FormatAlignCenterIcon=Sk,o.FormatAlignJustifyIcon=Bk,o.FormatAlignLeftIcon=Ek,o.FormatAlignRightIcon=Fk,o.FormatBoldIcon=Pk,o.FormatClearIcon=Dk,o.FormatColorFillIcon=Nk,o.FormatColorResetIcon=Tk,o.FormatColorTextIcon=Mk,o.FormatIndentDecreaseIcon=Ok,o.FormatIndentIncreaseIcon=Lk,o.FormatItalicIcon=Qk,o.FormatLineSpacingIcon=Vk,o.FormatListBulletedIcon=Wk,o.FormatListNumberedIcon=pr,o.FormatListNumberedRtlIcon=Gk,o.FormatOverlineIcon=zk,o.FormatPaintIcon=Hk,o.FormatQuoteIcon=bc,o.FormatShapesIcon=Uk,o.FormatSizeIcon=Yk,o.FormatStrikethroughIcon=$k,o.FormatTextdirectionLToRIcon=jk,o.FormatTextdirectionRToLIcon=qk,o.FormatUnderlinedIcon=Jk,o.FormikArrayContainer=Co,o.FortIcon=Zk,o.ForumIcon=Xk,o.Forward10Icon=Rk,o.Forward30Icon=em,o.Forward5Icon=nm,o.ForwardIcon=xk,o.ForwardToInboxIcon=om,o.FoundationIcon=rm,o.FreeBreakfastIcon=tm,o.FreeCancellationIcon=cm,o.FrontHandIcon=im,o.FullscreenExitIcon=lm,o.FullscreenIcon=am,o.FunctionsIcon=pc,o.GMobiledataIcon=sm,o.GTranslateIcon=dm,o.GamepadIcon=um,o.GamesIcon=fm,o.GarageIcon=Am,o.GasMeterIcon=_m,o.GavelIcon=ym,o.GeneratingTokensIcon=hm,o.GeoPoint=tr,o.GestureIcon=gm,o.GetAppIcon=Im,o.GifBoxIcon=pm,o.GifIcon=bm,o.GirlIcon=wm,o.GitHubIcon=tl,o.GiteIcon=km,o.GolfCourseIcon=mm,o.GppBadIcon=vm,o.GppGoodIcon=Km,o.GppMaybeIcon=Cm,o.GpsFixedIcon=Sm,o.GpsNotFixedIcon=Bm,o.GpsOffIcon=Em,o.GradeIcon=Fm,o.GradientIcon=Pm,o.GradingIcon=Dm,o.GrainIcon=Nm,o.GraphicEqIcon=Tm,o.GrassIcon=Mm,o.Grid3x3Icon=Om,o.Grid4x4Icon=Lm,o.GridGoldenratioIcon=Qm,o.GridOffIcon=Vm,o.GridOnIcon=Wm,o.GridViewIcon=Gm,o.GroupAddIcon=Hm,o.GroupIcon=zm,o.GroupOffIcon=Um,o.GroupRemoveIcon=Ym,o.GroupWorkIcon=$m,o.Groups2Icon=qm,o.Groups3Icon=Jm,o.GroupsIcon=jm,o.HMobiledataIcon=Zm,o.HPlusMobiledataIcon=Xm,o.HailIcon=xm,o.HandshakeIcon=Rm,o.HandymanIcon=ev,o.HardwareIcon=nv,o.HdIcon=ov,o.HdrAutoIcon=rv,o.HdrAutoSelectIcon=tv,o.HdrEnhancedSelectIcon=cv,o.HdrOffIcon=iv,o.HdrOffSelectIcon=av,o.HdrOnIcon=lv,o.HdrOnSelectIcon=sv,o.HdrPlusIcon=dv,o.HdrStrongIcon=uv,o.HdrWeakIcon=fv,o.HeadphonesBatteryIcon=_v,o.HeadphonesIcon=Av,o.HeadsetIcon=yv,o.HeadsetMicIcon=hv,o.HeadsetOffIcon=gv,o.HealingIcon=Iv,o.HealthAndSafetyIcon=bv,o.HearingDisabledIcon=wv,o.HearingIcon=pv,o.HeartBrokenIcon=kv,o.HeatPumpIcon=mv,o.HeightIcon=vv,o.HelpCenterIcon=Cv,o.HelpIcon=Kv,o.HelpOutlineIcon=Sv,o.HevcIcon=Bv,o.HexagonIcon=Ev,o.HideImageIcon=Fv,o.HideSourceIcon=Pv,o.HighQualityIcon=Dv,o.HighlightAltIcon=Tv,o.HighlightIcon=Nv,o.HighlightOffIcon=Mv,o.HikingIcon=Ov,o.HistoryEduIcon=Qv,o.HistoryIcon=Lv,o.HistoryToggleOffIcon=Vv,o.HiveIcon=Wv,o.HlsIcon=Gv,o.HlsOffIcon=zv,o.HolidayVillageIcon=Hv,o.HomeIcon=Uv,o.HomeMaxIcon=Yv,o.HomeMiniIcon=$v,o.HomeRepairServiceIcon=jv,o.HomeWorkIcon=qv,o.HorizontalDistributeIcon=Jv,o.HorizontalRuleIcon=Zv,o.HorizontalSplitIcon=Xv,o.HotTubIcon=xv,o.HotelClassIcon=e0,o.HotelIcon=Rv,o.HourglassBottomIcon=n0,o.HourglassDisabledIcon=o0,o.HourglassEmptyIcon=r0,o.HourglassFullIcon=t0,o.HourglassTopIcon=c0,o.HouseIcon=i0,o.HouseSidingIcon=a0,o.HouseboatIcon=l0,o.HowToRegIcon=s0,o.HowToVoteIcon=d0,o.HtmlIcon=u0,o.HttpIcon=wc,o.HttpsIcon=f0,o.HubIcon=A0,o.HvacIcon=_0,o.IceSkatingIcon=y0,o.IcecreamIcon=h0,o.Icon=r,o.IconButton=R,o.ImageAspectRatioIcon=I0,o.ImageIcon=g0,o.ImageNotSupportedIcon=b0,o.ImagePreview=Yc,o.ImageSearchIcon=p0,o.ImagesearchRollerIcon=w0,o.ImportContactsIcon=k0,o.ImportExportIcon=m0,o.ImportantDevicesIcon=v0,o.InboxIcon=K0,o.IncompleteCircleIcon=C0,o.IndeterminateCheckBoxIcon=S0,o.InfoIcon=kc,o.InfoLabel=oH,o.InputIcon=B0,o.InputLabel=mt,o.InsertChartIcon=E0,o.InsertChartOutlinedIcon=F0,o.InsertCommentIcon=P0,o.InsertDriveFileIcon=D0,o.InsertEmoticonIcon=N0,o.InsertInvitationIcon=T0,o.InsertLinkIcon=M0,o.InsertPageBreakIcon=O0,o.InsertPhotoIcon=L0,o.InsightsIcon=Q0,o.InstallDesktopIcon=V0,o.InstallMobileIcon=W0,o.IntegrationInstructionsIcon=G0,o.InterestsIcon=z0,o.InterpreterModeIcon=H0,o.Inventory2Icon=Y0,o.InventoryIcon=U0,o.InvertColorsIcon=$0,o.InvertColorsOffIcon=j0,o.IosShareIcon=q0,o.IronIcon=J0,o.IsoIcon=Z0,o.JavascriptIcon=X0,o.JoinFullIcon=x0,o.JoinInnerIcon=R0,o.JoinLeftIcon=eK,o.JoinRightIcon=nK,o.KayakingIcon=oK,o.KebabDiningIcon=rK,o.KeyIcon=tK,o.KeyOffIcon=cK,o.KeyValueFieldBinding=pi,o.KeyValuePreview=Wr,o.KeyboardAltIcon=aK,o.KeyboardArrowDownIcon=lK,o.KeyboardArrowLeftIcon=sK,o.KeyboardArrowRightIcon=dK,o.KeyboardArrowUpIcon=uK,o.KeyboardBackspaceIcon=fK,o.KeyboardCapslockIcon=AK,o.KeyboardCommandKeyIcon=_K,o.KeyboardControlKeyIcon=yK,o.KeyboardDoubleArrowDownIcon=hK,o.KeyboardDoubleArrowLeftIcon=gK,o.KeyboardDoubleArrowRightIcon=IK,o.KeyboardDoubleArrowUpIcon=bK,o.KeyboardHideIcon=pK,o.KeyboardIcon=iK,o.KeyboardOptionKeyIcon=wK,o.KeyboardReturnIcon=kK,o.KeyboardTabIcon=Eo,o.KeyboardVoiceIcon=mK,o.KingBedIcon=vK,o.KitchenIcon=KK,o.KitesurfingIcon=CK,o.LabelIcon=SK,o.LabelImportantIcon=BK,o.LabelOffIcon=EK,o.LabelWithIcon=Ce,o.LanIcon=FK,o.LandscapeIcon=PK,o.LandslideIcon=DK,o.LanguageIcon=NK,o.LaptopChromebookIcon=MK,o.LaptopIcon=TK,o.LaptopMacIcon=OK,o.LaptopWindowsIcon=LK,o.LastPageIcon=QK,o.LaunchIcon=VK,o.LayersClearIcon=GK,o.LayersIcon=WK,o.LeaderboardIcon=zK,o.LeakAddIcon=HK,o.LeakRemoveIcon=UK,o.LegendToggleIcon=YK,o.LensBlurIcon=jK,o.LensIcon=$K,o.LibraryAddCheckIcon=JK,o.LibraryAddIcon=qK,o.LibraryBooksIcon=ZK,o.LibraryMusicIcon=XK,o.LightIcon=xK,o.LightModeIcon=mc,o.LightbulbCircleIcon=eC,o.LightbulbIcon=RK,o.LineAxisIcon=nC,o.LineStyleIcon=oC,o.LineWeightIcon=rC,o.LinearScaleIcon=tC,o.LinkIcon=vc,o.LinkOffIcon=cC,o.LinkedCameraIcon=iC,o.LiquorIcon=aC,o.ListAltIcon=Cc,o.ListIcon=Kc,o.LiveHelpIcon=lC,o.LiveTvIcon=sC,o.LivingIcon=dC,o.LoadingButton=Ia,o.LocalActivityIcon=uC,o.LocalAirportIcon=fC,o.LocalAtmIcon=AC,o.LocalBarIcon=_C,o.LocalCafeIcon=yC,o.LocalCarWashIcon=hC,o.LocalConvenienceStoreIcon=gC,o.LocalDiningIcon=IC,o.LocalDrinkIcon=bC,o.LocalFireDepartmentIcon=pC,o.LocalFloristIcon=wC,o.LocalGasStationIcon=kC,o.LocalGroceryStoreIcon=mC,o.LocalHospitalIcon=vC,o.LocalHotelIcon=KC,o.LocalLaundryServiceIcon=CC,o.LocalLibraryIcon=SC,o.LocalMallIcon=BC,o.LocalMoviesIcon=EC,o.LocalOfferIcon=FC,o.LocalParkingIcon=PC,o.LocalPharmacyIcon=DC,o.LocalPhoneIcon=NC,o.LocalPizzaIcon=TC,o.LocalPlayIcon=MC,o.LocalPoliceIcon=OC,o.LocalPostOfficeIcon=LC,o.LocalPrintshopIcon=QC,o.LocalSeeIcon=VC,o.LocalShippingIcon=WC,o.LocalTaxiIcon=GC,o.LocationCityIcon=zC,o.LocationDisabledIcon=HC,o.LocationOffIcon=UC,o.LocationOnIcon=YC,o.LocationSearchingIcon=$C,o.LockClockIcon=qC,o.LockIcon=jC,o.LockOpenIcon=JC,o.LockPersonIcon=ZC,o.LockResetIcon=XC,o.LoginIcon=xC,o.LogoDevIcon=RC,o.LogoutIcon=Sc,o.Looks3Icon=nS,o.Looks4Icon=oS,o.Looks5Icon=rS,o.Looks6Icon=tS,o.LooksIcon=eS,o.LooksOneIcon=cS,o.LooksTwoIcon=iS,o.LoopIcon=aS,o.LoupeIcon=lS,o.LowPriorityIcon=sS,o.LoyaltyIcon=dS,o.LteMobiledataIcon=uS,o.LtePlusMobiledataIcon=fS,o.LuggageIcon=AS,o.LunchDiningIcon=_S,o.LyricsIcon=yS,o.MacroOffIcon=hS,o.MailIcon=gS,o.MailLockIcon=IS,o.MailOutlineIcon=bS,o.MaleIcon=pS,o.Man2Icon=kS,o.Man3Icon=mS,o.Man4Icon=vS,o.ManIcon=wS,o.ManageAccountsIcon=KS,o.ManageHistoryIcon=CS,o.ManageSearchIcon=SS,o.MapFieldBinding=bi,o.MapIcon=BS,o.MapPropertyPreview=ni,o.MapsHomeWorkIcon=ES,o.MapsUgcIcon=FS,o.MarginIcon=PS,o.MarkAsUnreadIcon=DS,o.MarkChatReadIcon=NS,o.MarkChatUnreadIcon=TS,o.MarkEmailReadIcon=MS,o.MarkEmailUnreadIcon=OS,o.MarkUnreadChatAltIcon=LS,o.Markdown=lo,o.MarkdownFieldBinding=mi,o.MarkunreadIcon=QS,o.MarkunreadMailboxIcon=VS,o.MasksIcon=WS,o.MaximizeIcon=GS,o.MediaBluetoothOffIcon=zS,o.MediaBluetoothOnIcon=HS,o.MediationIcon=US,o.MedicalInformationIcon=YS,o.MedicalServicesIcon=$S,o.MedicationIcon=jS,o.MedicationLiquidIcon=qS,o.MeetingRoomIcon=JS,o.MemoryIcon=ZS,o.Menu=Qn,o.MenuBookIcon=XS,o.MenuIcon=wr,o.MenuItem=me,o.MenuOpenIcon=xS,o.MergeIcon=RS,o.MergeTypeIcon=eB,o.MessageIcon=nB,o.MicExternalOffIcon=rB,o.MicExternalOnIcon=tB,o.MicIcon=oB,o.MicNoneIcon=cB,o.MicOffIcon=iB,o.MicrowaveIcon=aB,o.MilitaryTechIcon=lB,o.MinimizeIcon=sB,o.MinorCrashIcon=dB,o.MiscellaneousServicesIcon=uB,o.MissedVideoCallIcon=fB,o.MmsIcon=AB,o.MobileFriendlyIcon=_B,o.MobileOffIcon=yB,o.MobileScreenShareIcon=hB,o.MobiledataOffIcon=gB,o.ModeCommentIcon=bB,o.ModeControllerProvider=Ha,o.ModeEditIcon=pB,o.ModeEditOutlineIcon=wB,o.ModeFanOffIcon=kB,o.ModeIcon=IB,o.ModeNightIcon=mB,o.ModeOfTravelIcon=vB,o.ModeStandbyIcon=KB,o.ModelTrainingIcon=CB,o.MonetizationOnIcon=SB,o.MoneyIcon=BB,o.MoneyOffCsredIcon=FB,o.MoneyOffIcon=EB,o.MonitorHeartIcon=DB,o.MonitorIcon=PB,o.MonitorWeightIcon=NB,o.MonochromePhotosIcon=TB,o.MoodBadIcon=OB,o.MoodIcon=MB,o.MopedIcon=LB,o.MoreHorizIcon=VB,o.MoreIcon=QB,o.MoreTimeIcon=WB,o.MoreVertIcon=kr,o.MosqueIcon=GB,o.MotionPhotosAutoIcon=zB,o.MotionPhotosOffIcon=HB,o.MotionPhotosOnIcon=UB,o.MotionPhotosPauseIcon=YB,o.MotionPhotosPausedIcon=$B,o.MouseIcon=jB,o.MoveDownIcon=qB,o.MoveToInboxIcon=JB,o.MoveUpIcon=ZB,o.MovieCreationIcon=xB,o.MovieFilterIcon=RB,o.MovieIcon=XB,o.MovingIcon=eE,o.MpIcon=nE,o.MultiSelect=Ur,o.MultiSelectBinding=$r,o.MultiSelectContext=Hr,o.MultiSelectItem=Yr,o.MultilineChartIcon=oE,o.MultipleStopIcon=rE,o.MuseumIcon=tE,o.MusicNoteIcon=cE,o.MusicOffIcon=iE,o.MusicVideoIcon=aE,o.MyLocationIcon=lE,o.NatIcon=sE,o.NatureIcon=dE,o.NaturePeopleIcon=uE,o.NavigateBeforeIcon=fE,o.NavigateNextIcon=AE,o.NavigationCollectionCard=ca,o.NavigationGroup=Et,o.NavigationIcon=_E,o.NavigationRoutes=KH,o.NearMeDisabledIcon=hE,o.NearMeIcon=yE,o.NearbyErrorIcon=gE,o.NearbyOffIcon=IE,o.NestCamWiredStandIcon=bE,o.NetworkCellIcon=pE,o.NetworkCheckIcon=wE,o.NetworkLockedIcon=kE,o.NetworkPingIcon=mE,o.NetworkWifi1BarIcon=KE,o.NetworkWifi2BarIcon=CE,o.NetworkWifi3BarIcon=SE,o.NetworkWifiIcon=vE,o.NewLabelIcon=BE,o.NewReleasesIcon=EE,o.NewspaperIcon=FE,o.NextPlanIcon=PE,o.NextWeekIcon=DE,o.NfcIcon=NE,o.NightShelterIcon=TE,o.NightlifeIcon=ME,o.NightlightIcon=OE,o.NightlightRoundIcon=LE,o.NightsStayIcon=QE,o.NoAccountsIcon=VE,o.NoAdultContentIcon=WE,o.NoBackpackIcon=GE,o.NoCellIcon=zE,o.NoCrashIcon=HE,o.NoDrinksIcon=UE,o.NoEncryptionGmailerrorredIcon=$E,o.NoEncryptionIcon=YE,o.NoFlashIcon=jE,o.NoFoodIcon=qE,o.NoLuggageIcon=JE,o.NoMealsIcon=ZE,o.NoMeetingRoomIcon=XE,o.NoPhotographyIcon=xE,o.NoSimIcon=RE,o.NoStrollerIcon=eF,o.NoTransferIcon=nF,o.NoiseAwareIcon=oF,o.NoiseControlOffIcon=rF,o.NordicWalkingIcon=tF,o.NorthEastIcon=iF,o.NorthIcon=cF,o.NorthWestIcon=aF,o.NotAccessibleIcon=lF,o.NotFoundPage=aa,o.NotInterestedIcon=sF,o.NotListedLocationIcon=dF,o.NotStartedIcon=uF,o.NoteAddIcon=AF,o.NoteAltIcon=_F,o.NoteIcon=fF,o.NotesIcon=yF,o.NotificationAddIcon=hF,o.NotificationImportantIcon=gF,o.NotificationsActiveIcon=bF,o.NotificationsIcon=IF,o.NotificationsNoneIcon=pF,o.NotificationsOffIcon=wF,o.NotificationsPausedIcon=kF,o.NumberPropertyPreview=ci,o.NumbersIcon=Bc,o.OfflineBoltIcon=mF,o.OfflinePinIcon=vF,o.OfflineShareIcon=KF,o.OilBarrelIcon=CF,o.OnDeviceTrainingIcon=SF,o.OndemandVideoIcon=BF,o.OnlinePredictionIcon=EF,o.OpacityIcon=FF,o.OpenInBrowserIcon=PF,o.OpenInFullIcon=DF,o.OpenInNewIcon=ro,o.OpenInNewOffIcon=NF,o.OpenWithIcon=TF,o.OtherHousesIcon=MF,o.OutboundIcon=OF,o.OutboxIcon=LF,o.OutdoorGrillIcon=QF,o.OutletIcon=VF,o.OutlinedFlagIcon=WF,o.OutputIcon=GF,o.PaddingIcon=zF,o.PagesIcon=HF,o.PageviewIcon=UF,o.PaidIcon=YF,o.PaletteIcon=$F,o.PanToolAltIcon=qF,o.PanToolIcon=jF,o.PanoramaFishEyeIcon=ZF,o.PanoramaHorizontalIcon=XF,o.PanoramaHorizontalSelectIcon=xF,o.PanoramaIcon=JF,o.PanoramaPhotosphereIcon=RF,o.PanoramaPhotosphereSelectIcon=eP,o.PanoramaVerticalIcon=nP,o.PanoramaVerticalSelectIcon=oP,o.PanoramaWideAngleIcon=rP,o.PanoramaWideAngleSelectIcon=tP,o.Paper=qH,o.ParaglidingIcon=cP,o.ParkIcon=iP,o.PartyModeIcon=aP,o.PasswordIcon=lP,o.PatternIcon=sP,o.PauseCircleFilledIcon=fP,o.PauseCircleIcon=uP,o.PauseCircleOutlineIcon=AP,o.PauseIcon=dP,o.PausePresentationIcon=_P,o.PaymentIcon=yP,o.PaymentsIcon=hP,o.PedalBikeIcon=gP,o.PendingActionsIcon=bP,o.PendingIcon=IP,o.PentagonIcon=pP,o.PeopleAltIcon=kP,o.PeopleIcon=wP,o.PeopleOutlineIcon=mP,o.PercentIcon=vP,o.PermCameraMicIcon=KP,o.PermContactCalendarIcon=CP,o.PermDataSettingIcon=SP,o.PermDeviceInformationIcon=BP,o.PermIdentityIcon=EP,o.PermMediaIcon=FP,o.PermPhoneMsgIcon=PP,o.PermScanWifiIcon=DP,o.Person2Icon=TP,o.Person3Icon=MP,o.Person4Icon=OP,o.PersonAddAlt1Icon=VP,o.PersonAddAltIcon=QP,o.PersonAddDisabledIcon=WP,o.PersonAddIcon=LP,o.PersonIcon=NP,o.PersonOffIcon=GP,o.PersonOutlineIcon=zP,o.PersonPinCircleIcon=UP,o.PersonPinIcon=HP,o.PersonRemoveAlt1Icon=$P,o.PersonRemoveIcon=YP,o.PersonSearchIcon=jP,o.PersonalInjuryIcon=qP,o.PersonalVideoIcon=JP,o.PestControlIcon=ZP,o.PestControlRodentIcon=XP,o.PetsIcon=xP,o.PhishingIcon=RP,o.PhoneAndroidIcon=n1,o.PhoneBluetoothSpeakerIcon=o1,o.PhoneCallbackIcon=r1,o.PhoneDisabledIcon=t1,o.PhoneEnabledIcon=c1,o.PhoneForwardedIcon=i1,o.PhoneIcon=e1,o.PhoneIphoneIcon=a1,o.PhoneLockedIcon=l1,o.PhoneMissedIcon=s1,o.PhonePausedIcon=d1,o.PhonelinkEraseIcon=f1,o.PhonelinkIcon=u1,o.PhonelinkLockIcon=A1,o.PhonelinkOffIcon=_1,o.PhonelinkRingIcon=y1,o.PhonelinkSetupIcon=h1,o.PhotoAlbumIcon=I1,o.PhotoCameraBackIcon=p1,o.PhotoCameraFrontIcon=w1,o.PhotoCameraIcon=b1,o.PhotoFilterIcon=k1,o.PhotoIcon=g1,o.PhotoLibraryIcon=m1,o.PhotoSizeSelectActualIcon=v1,o.PhotoSizeSelectLargeIcon=K1,o.PhotoSizeSelectSmallIcon=C1,o.PhpIcon=S1,o.PianoIcon=B1,o.PianoOffIcon=E1,o.PictureAsPdfIcon=F1,o.PictureInPictureAltIcon=D1,o.PictureInPictureIcon=P1,o.PieChartIcon=N1,o.PieChartOutlineIcon=T1,o.PinDropIcon=O1,o.PinEndIcon=L1,o.PinIcon=M1,o.PinInvokeIcon=Q1,o.PinchIcon=V1,o.PivotTableChartIcon=W1,o.PixIcon=G1,o.PlaceIcon=z1,o.PlagiarismIcon=H1,o.PlayArrowIcon=U1,o.PlayCircleFilledIcon=$1,o.PlayCircleIcon=Y1,o.PlayCircleOutlineIcon=j1,o.PlayDisabledIcon=q1,o.PlayForWorkIcon=J1,o.PlayLessonIcon=Z1,o.PlaylistAddCheckCircleIcon=R1,o.PlaylistAddCheckIcon=x1,o.PlaylistAddCircleIcon=eD,o.PlaylistAddIcon=X1,o.PlaylistPlayIcon=nD,o.PlaylistRemoveIcon=oD,o.PlumbingIcon=rD,o.PlusOneIcon=tD,o.PodcastsIcon=cD,o.PointOfSaleIcon=iD,o.PolicyIcon=aD,o.PollIcon=lD,o.PolylineIcon=sD,o.PolymerIcon=dD,o.PoolIcon=uD,o.PortableWifiOffIcon=fD,o.PortraitIcon=AD,o.PostAddIcon=_D,o.PowerIcon=yD,o.PowerInputIcon=hD,o.PowerOffIcon=gD,o.PowerSettingsNewIcon=ID,o.PrecisionManufacturingIcon=bD,o.PregnantWomanIcon=pD,o.PresentToAllIcon=wD,o.PreviewIcon=kD,o.PriceChangeIcon=mD,o.PriceCheckIcon=vD,o.PrintDisabledIcon=CD,o.PrintIcon=KD,o.PriorityHighIcon=SD,o.PrivacyTipIcon=BD,o.PrivateConnectivityIcon=ED,o.ProductionQuantityLimitsIcon=FD,o.PropaneIcon=PD,o.PropaneTankIcon=DD,o.PropertyFieldBinding=pn,o.PropertyPreview=Be,o.PsychologyAltIcon=TD,o.PsychologyIcon=ND,o.PublicIcon=MD,o.PublicOffIcon=OD,o.PublishIcon=LD,o.PublishedWithChangesIcon=QD,o.PunchClockIcon=VD,o.PushPinIcon=WD,o.QrCode2Icon=zD,o.QrCodeIcon=GD,o.QrCodeScannerIcon=HD,o.QueryBuilderIcon=UD,o.QueryStatsIcon=YD,o.QuestionAnswerIcon=$D,o.QuestionMarkIcon=jD,o.QueueIcon=qD,o.QueueMusicIcon=JD,o.QueuePlayNextIcon=ZD,o.QuickreplyIcon=XD,o.QuizIcon=xD,o.RMobiledataIcon=RD,o.RadarIcon=eN,o.RadioButtonCheckedIcon=oN,o.RadioButtonUncheckedIcon=rN,o.RadioIcon=nN,o.RailwayAlertIcon=tN,o.RamenDiningIcon=cN,o.RampLeftIcon=iN,o.RampRightIcon=aN,o.RateReviewIcon=lN,o.RawOffIcon=sN,o.RawOnIcon=dN,o.ReadMoreIcon=uN,o.ReadOnlyFieldBinding=Xr,o.RealEstateAgentIcon=fN,o.ReceiptIcon=AN,o.ReceiptLongIcon=_N,o.RecentActorsIcon=yN,o.RecommendIcon=hN,o.RecordVoiceOverIcon=gN,o.RectangleIcon=IN,o.RecyclingIcon=bN,o.RedeemIcon=pN,o.RedoIcon=wN,o.ReduceCapacityIcon=kN,o.ReferenceFieldBinding=Ii,o.ReferencePreview=nn,o.ReferencePreviewContainer=Po,o.ReferenceSelectionInner=ta,o.RefreshIcon=mN,o.RememberMeIcon=vN,o.RemoveCircleIcon=Ec,o.RemoveCircleOutlineIcon=KN,o.RemoveDoneIcon=CN,o.RemoveFromQueueIcon=SN,o.RemoveIcon=to,o.RemoveModeratorIcon=BN,o.RemoveRedEyeIcon=EN,o.RemoveRoadIcon=FN,o.RemoveShoppingCartIcon=PN,o.ReorderIcon=DN,o.RepartitionIcon=NN,o.RepeatFieldBinding=wi,o.RepeatIcon=mr,o.RepeatOnIcon=TN,o.RepeatOneIcon=MN,o.RepeatOneOnIcon=ON,o.Replay10Icon=QN,o.Replay30Icon=VN,o.Replay5Icon=WN,o.ReplayCircleFilledIcon=GN,o.ReplayIcon=LN,o.ReplyAllIcon=HN,o.ReplyIcon=zN,o.ReportGmailerrorredIcon=YN,o.ReportIcon=UN,o.ReportOffIcon=$N,o.ReportProblemIcon=jN,o.RequestPageIcon=qN,o.RequestQuoteIcon=JN,o.ResetTvIcon=ZN,o.RestartAltIcon=XN,o.RestaurantIcon=xN,o.RestaurantMenuIcon=RN,o.RestoreFromTrashIcon=nT,o.RestoreIcon=eT,o.RestorePageIcon=oT,o.ReviewsIcon=rT,o.RiceBowlIcon=tT,o.RingVolumeIcon=cT,o.RocketIcon=iT,o.RocketLaunchIcon=aT,o.RollerShadesClosedIcon=sT,o.RollerShadesIcon=lT,o.RollerSkatingIcon=dT,o.RoofingIcon=uT,o.RoomIcon=fT,o.RoomPreferencesIcon=AT,o.RoomServiceIcon=_T,o.Rotate90DegreesCcwIcon=yT,o.Rotate90DegreesCwIcon=hT,o.RotateLeftIcon=gT,o.RotateRightIcon=IT,o.RoundaboutLeftIcon=bT,o.RoundaboutRightIcon=pT,o.RoundedCornerIcon=wT,o.RouteIcon=kT,o.RouteWrapper=qo,o.RouterIcon=mT,o.RowingIcon=vT,o.RssFeedIcon=KT,o.RsvpIcon=CT,o.RttIcon=ST,o.RuleFolderIcon=ET,o.RuleIcon=BT,o.RunCircleIcon=FT,o.RunningWithErrorsIcon=PT,o.RvHookupIcon=DT,o.SafetyCheckIcon=NT,o.SafetyDividerIcon=TT,o.SailingIcon=MT,o.SanitizerIcon=OT,o.SatelliteAltIcon=QT,o.SatelliteIcon=LT,o.SaveAltIcon=WT,o.SaveAsIcon=GT,o.SaveIcon=VT,o.SavedSearchIcon=zT,o.SavingsIcon=HT,o.Scaffold=kH,o.ScaleIcon=UT,o.ScannerIcon=YT,o.ScatterPlotIcon=$T,o.ScheduleIcon=Fc,o.ScheduleSendIcon=jT,o.SchemaIcon=qT,o.SchoolIcon=JT,o.ScienceIcon=ZT,o.ScoreIcon=XT,o.ScoreboardIcon=xT,o.ScreenLockLandscapeIcon=RT,o.ScreenLockPortraitIcon=eM,o.ScreenLockRotationIcon=nM,o.ScreenRotationAltIcon=rM,o.ScreenRotationIcon=oM,o.ScreenSearchDesktopIcon=tM,o.ScreenShareIcon=cM,o.ScreenshotIcon=iM,o.ScreenshotMonitorIcon=aM,o.ScubaDivingIcon=lM,o.SdCardAlertIcon=uM,o.SdCardIcon=dM,o.SdIcon=sM,o.SdStorageIcon=fM,o.SearchBar=Qt,o.SearchIcon=rc,o.SearchOffIcon=AM,o.SecurityIcon=_M,o.SecurityUpdateGoodIcon=hM,o.SecurityUpdateIcon=yM,o.SecurityUpdateWarningIcon=gM,o.SegmentIcon=IM,o.Select=Xe,o.SelectAllIcon=bM,o.SelectFieldBinding=zr,o.SelectGroup=JH,o.SelectItem=xe,o.SelfImprovementIcon=pM,o.SellIcon=wM,o.SendAndArchiveIcon=mM,o.SendIcon=kM,o.SendTimeExtensionIcon=vM,o.SendToMobileIcon=KM,o.SensorDoorIcon=CM,o.SensorOccupiedIcon=SM,o.SensorWindowIcon=BM,o.SensorsIcon=EM,o.SensorsOffIcon=FM,o.SentimentDissatisfiedIcon=PM,o.SentimentNeutralIcon=DM,o.SentimentSatisfiedAltIcon=TM,o.SentimentSatisfiedIcon=NM,o.SentimentVeryDissatisfiedIcon=MM,o.SentimentVerySatisfiedIcon=OM,o.SetMealIcon=LM,o.SettingsAccessibilityIcon=VM,o.SettingsApplicationsIcon=WM,o.SettingsBackupRestoreIcon=GM,o.SettingsBluetoothIcon=zM,o.SettingsBrightnessIcon=HM,o.SettingsCellIcon=UM,o.SettingsEthernetIcon=YM,o.SettingsIcon=QM,o.SettingsInputAntennaIcon=$M,o.SettingsInputComponentIcon=jM,o.SettingsInputCompositeIcon=qM,o.SettingsInputHdmiIcon=JM,o.SettingsInputSvideoIcon=ZM,o.SettingsOverscanIcon=XM,o.SettingsPhoneIcon=xM,o.SettingsPowerIcon=RM,o.SettingsRemoteIcon=e2,o.SettingsSuggestIcon=n2,o.SettingsSystemDaydreamIcon=o2,o.SettingsVoiceIcon=r2,o.SevereColdIcon=t2,o.ShapeLineIcon=c2,o.ShareIcon=i2,o.ShareLocationIcon=a2,o.Sheet=Vt,o.ShieldIcon=l2,o.ShieldMoonIcon=s2,o.Shop2Icon=u2,o.ShopIcon=d2,o.ShopTwoIcon=f2,o.ShoppingBagIcon=A2,o.ShoppingBasketIcon=_2,o.ShoppingCartCheckoutIcon=h2,o.ShoppingCartIcon=y2,o.ShortTextIcon=Pc,o.ShortcutIcon=g2,o.ShowChartIcon=I2,o.ShowerIcon=b2,o.ShuffleIcon=p2,o.ShuffleOnIcon=w2,o.ShutterSpeedIcon=k2,o.SickIcon=m2,o.SideDialogs=L3,o.SignLanguageIcon=v2,o.SignalCellular0BarIcon=K2,o.SignalCellular4BarIcon=C2,o.SignalCellularAlt1BarIcon=B2,o.SignalCellularAlt2BarIcon=E2,o.SignalCellularAltIcon=S2,o.SignalCellularConnectedNoInternet0BarIcon=F2,o.SignalCellularConnectedNoInternet4BarIcon=P2,o.SignalCellularNoSimIcon=D2,o.SignalCellularNodataIcon=N2,o.SignalCellularNullIcon=T2,o.SignalCellularOffIcon=M2,o.SignalWifi0BarIcon=O2,o.SignalWifi4BarIcon=L2,o.SignalWifi4BarLockIcon=Q2,o.SignalWifiBadIcon=V2,o.SignalWifiConnectedNoInternet4Icon=W2,o.SignalWifiOffIcon=G2,o.SignalWifiStatusbar4BarIcon=z2,o.SignalWifiStatusbarConnectedNoInternet4Icon=H2,o.SignalWifiStatusbarNullIcon=U2,o.SignpostIcon=Y2,o.SimCardAlertIcon=j2,o.SimCardDownloadIcon=q2,o.SimCardIcon=$2,o.SingleBedIcon=J2,o.SipIcon=Z2,o.SkateboardingIcon=X2,o.SkeletonPropertyComponent=Nn,o.SkipNextIcon=x2,o.SkipPreviousIcon=R2,o.SleddingIcon=eO,o.SlideshowIcon=nO,o.SlowMotionVideoIcon=oO,o.SmartButtonIcon=rO,o.SmartDisplayIcon=tO,o.SmartScreenIcon=cO,o.SmartToyIcon=iO,o.SmartphoneIcon=aO,o.SmokeFreeIcon=lO,o.SmokingRoomsIcon=sO,o.SmsFailedIcon=uO,o.SmsIcon=dO,o.SnackbarProvider=LH,o.SnippetFolderIcon=fO,o.SnoozeIcon=AO,o.SnowboardingIcon=_O,o.SnowmobileIcon=yO,o.SnowshoeingIcon=hO,o.SoapIcon=gO,o.SocialDistanceIcon=IO,o.SolarPowerIcon=bO,o.SortByAlphaIcon=wO,o.SortIcon=pO,o.SosIcon=kO,o.SoupKitchenIcon=mO,o.SourceIcon=vO,o.SouthAmericaIcon=CO,o.SouthEastIcon=SO,o.SouthIcon=KO,o.SouthWestIcon=BO,o.SpaIcon=EO,o.SpaceBarIcon=FO,o.SpaceDashboardIcon=PO,o.SpatialAudioIcon=DO,o.SpatialAudioOffIcon=NO,o.SpatialTrackingIcon=TO,o.SpeakerGroupIcon=OO,o.SpeakerIcon=MO,o.SpeakerNotesIcon=LO,o.SpeakerNotesOffIcon=QO,o.SpeakerPhoneIcon=VO,o.SpeedIcon=WO,o.SpellcheckIcon=GO,o.Spinner=ZH,o.SplitscreenIcon=zO,o.SpokeIcon=HO,o.SportsBarIcon=YO,o.SportsBaseballIcon=$O,o.SportsBasketballIcon=jO,o.SportsCricketIcon=qO,o.SportsEsportsIcon=JO,o.SportsFootballIcon=ZO,o.SportsGolfIcon=XO,o.SportsGymnasticsIcon=xO,o.SportsHandballIcon=RO,o.SportsHockeyIcon=eL,o.SportsIcon=UO,o.SportsKabaddiIcon=nL,o.SportsMartialArtsIcon=oL,o.SportsMmaIcon=rL,o.SportsMotorsportsIcon=tL,o.SportsRugbyIcon=cL,o.SportsScoreIcon=iL,o.SportsSoccerIcon=aL,o.SportsTennisIcon=lL,o.SportsVolleyballIcon=sL,o.SquareFootIcon=uL,o.SquareIcon=dL,o.SsidChartIcon=fL,o.StackedBarChartIcon=AL,o.StackedLineChartIcon=_L,o.StadiumIcon=yL,o.StairsIcon=hL,o.StarBorderIcon=Kr,o.StarBorderPurple500Icon=gL,o.StarHalfIcon=IL,o.StarIcon=vr,o.StarOutlineIcon=bL,o.StarPurple500Icon=pL,o.StarRateIcon=wL,o.StarsIcon=kL,o.StartIcon=mL,o.StayCurrentLandscapeIcon=vL,o.StayCurrentPortraitIcon=KL,o.StayPrimaryLandscapeIcon=CL,o.StayPrimaryPortraitIcon=SL,o.StickyNote2Icon=BL,o.StopCircleIcon=FL,o.StopIcon=EL,o.StopScreenShareIcon=PL,o.StorageIcon=DL,o.StorageThumbnail=$c,o.StorageThumbnailInternal=qc,o.StorageUploadFieldBinding=Jr,o.StoreIcon=NL,o.StoreMallDirectoryIcon=TL,o.StorefrontIcon=ML,o.StormIcon=OL,o.StraightIcon=LL,o.StraightenIcon=QL,o.StreamIcon=VL,o.StreetviewIcon=WL,o.StrikethroughSIcon=GL,o.StringPropertyPreview=Or,o.StrollerIcon=zL,o.StyleIcon=HL,o.SubdirectoryArrowLeftIcon=UL,o.SubdirectoryArrowRightIcon=YL,o.SubjectIcon=Dc,o.SubscriptIcon=$L,o.SubscriptionsIcon=jL,o.SubtitlesIcon=qL,o.SubtitlesOffIcon=JL,o.SubwayIcon=ZL,o.SummarizeIcon=XL,o.SuperscriptIcon=xL,o.SupervisedUserCircleIcon=RL,o.SupervisorAccountIcon=e4,o.SupportAgentIcon=o4,o.SupportIcon=n4,o.SurfingIcon=r4,o.SurroundSoundIcon=t4,o.SwapCallsIcon=c4,o.SwapHorizIcon=i4,o.SwapHorizontalCircleIcon=a4,o.SwapVertIcon=l4,o.SwapVerticalCircleIcon=s4,o.SwipeDownAltIcon=f4,o.SwipeDownIcon=u4,o.SwipeIcon=d4,o.SwipeLeftAltIcon=_4,o.SwipeLeftIcon=A4,o.SwipeRightAltIcon=h4,o.SwipeRightIcon=y4,o.SwipeUpAltIcon=I4,o.SwipeUpIcon=g4,o.SwipeVerticalIcon=b4,o.SwitchAccessShortcutAddIcon=w4,o.SwitchAccessShortcutIcon=p4,o.SwitchAccountIcon=k4,o.SwitchCameraIcon=m4,o.SwitchControl=ol,o.SwitchFieldBinding=hi,o.SwitchLeftIcon=v4,o.SwitchRightIcon=K4,o.SwitchVideoIcon=C4,o.SynagogueIcon=S4,o.SyncAltIcon=E4,o.SyncDisabledIcon=F4,o.SyncIcon=B4,o.SyncLockIcon=P4,o.SyncProblemIcon=D4,o.SystemSecurityUpdateGoodIcon=T4,o.SystemSecurityUpdateIcon=N4,o.SystemSecurityUpdateWarningIcon=M4,o.SystemUpdateAltIcon=L4,o.SystemUpdateIcon=O4,o.Tab=Xo,o.TabIcon=Q4,o.TabUnselectedIcon=V4,o.Table=XH,o.TableBarIcon=W4,o.TableBody=xH,o.TableCell=nU,o.TableChartIcon=G4,o.TableHeader=RH,o.TableRestaurantIcon=z4,o.TableRow=eU,o.TableRowsIcon=H4,o.TableViewIcon=U4,o.TabletAndroidIcon=$4,o.TabletIcon=Y4,o.TabletMacIcon=j4,o.Tabs=ba,o.TagFacesIcon=J4,o.TagIcon=q4,o.TakeoutDiningIcon=Z4,o.TapAndPlayIcon=X4,o.TapasIcon=x4,o.TaskAltIcon=eQ,o.TaskIcon=R4,o.TaxiAlertIcon=nQ,o.TempleBuddhistIcon=oQ,o.TempleHinduIcon=rQ,o.TerminalIcon=tQ,o.TerrainIcon=cQ,o.TextDecreaseIcon=iQ,o.TextField=un,o.TextFieldBinding=Mn,o.TextFieldsIcon=aQ,o.TextFormatIcon=lQ,o.TextIncreaseIcon=sQ,o.TextRotateUpIcon=dQ,o.TextRotateVerticalIcon=uQ,o.TextRotationAngledownIcon=fQ,o.TextRotationAngleupIcon=AQ,o.TextRotationDownIcon=_Q,o.TextRotationNoneIcon=yQ,o.TextSnippetIcon=hQ,o.TextareaAutosize=gt,o.TextsmsIcon=gQ,o.TextureIcon=IQ,o.TheaterComedyIcon=bQ,o.TheatersIcon=pQ,o.ThermostatAutoIcon=kQ,o.ThermostatIcon=wQ,o.ThumbDownAltIcon=vQ,o.ThumbDownIcon=mQ,o.ThumbDownOffAltIcon=KQ,o.ThumbUpAltIcon=SQ,o.ThumbUpIcon=CQ,o.ThumbUpOffAltIcon=BQ,o.ThumbsUpDownIcon=EQ,o.ThunderstormIcon=FQ,o.TimeToLeaveIcon=PQ,o.TimelapseIcon=DQ,o.TimelineIcon=NQ,o.Timer10Icon=MQ,o.Timer10SelectIcon=OQ,o.Timer3Icon=LQ,o.Timer3SelectIcon=QQ,o.TimerIcon=TQ,o.TimerOffIcon=VQ,o.TipsAndUpdatesIcon=WQ,o.TireRepairIcon=GQ,o.TitleIcon=zQ,o.TocIcon=HQ,o.TodayIcon=UQ,o.ToggleOffIcon=YQ,o.ToggleOnIcon=$Q,o.TokenIcon=jQ,o.TollIcon=qQ,o.TonalityIcon=JQ,o.Tooltip=_e,o.TopicIcon=ZQ,o.TornadoIcon=XQ,o.TouchAppIcon=xQ,o.TourIcon=RQ,o.ToysIcon=eV,o.TrackChangesIcon=nV,o.TrafficIcon=oV,o.TrainIcon=rV,o.TramIcon=tV,o.TranscribeIcon=cV,o.TransferWithinAStationIcon=iV,o.TransformIcon=aV,o.TransgenderIcon=lV,o.TransitEnterexitIcon=sV,o.TranslateIcon=dV,o.TravelExploreIcon=uV,o.TrendingDownIcon=fV,o.TrendingFlatIcon=AV,o.TrendingUpIcon=_V,o.TripOriginIcon=yV,o.TroubleshootIcon=hV,o.TryIcon=gV,o.TsunamiIcon=IV,o.TtyIcon=bV,o.TuneIcon=pV,o.TungstenIcon=wV,o.TurnLeftIcon=kV,o.TurnRightIcon=mV,o.TurnSharpLeftIcon=vV,o.TurnSharpRightIcon=KV,o.TurnSlightLeftIcon=CV,o.TurnSlightRightIcon=SV,o.TurnedInIcon=BV,o.TurnedInNotIcon=EV,o.TvIcon=FV,o.TvOffIcon=PV,o.TwoWheelerIcon=DV,o.TypeSpecimenIcon=NV,o.Typography=j,o.UTurnLeftIcon=TV,o.UTurnRightIcon=MV,o.UmbrellaIcon=OV,o.UnarchiveIcon=LV,o.UndoIcon=QV,o.UnfoldLessDoubleIcon=WV,o.UnfoldLessIcon=VV,o.UnfoldMoreDoubleIcon=zV,o.UnfoldMoreIcon=GV,o.UnpublishedIcon=HV,o.UnsubscribeIcon=UV,o.UpcomingIcon=YV,o.UpdateDisabledIcon=jV,o.UpdateIcon=$V,o.UpgradeIcon=qV,o.UploadFileIcon=Nc,o.UploadIcon=JV,o.UrlComponentPreview=ao,o.UsbIcon=ZV,o.UsbOffIcon=XV,o.VaccinesIcon=xV,o.VapeFreeIcon=RV,o.VapingRoomsIcon=e5,o.VerifiedIcon=n5,o.VerifiedUserIcon=o5,o.VerticalAlignBottomIcon=r5,o.VerticalAlignCenterIcon=t5,o.VerticalAlignTopIcon=c5,o.VerticalDistributeIcon=i5,o.VerticalShadesClosedIcon=l5,o.VerticalShadesIcon=a5,o.VerticalSplitIcon=s5,o.VibrationIcon=d5,o.VideoCallIcon=u5,o.VideoCameraBackIcon=f5,o.VideoCameraFrontIcon=A5,o.VideoChatIcon=_5,o.VideoFileIcon=y5,o.VideoLabelIcon=h5,o.VideoLibraryIcon=g5,o.VideoSettingsIcon=I5,o.VideoStableIcon=b5,o.VideocamIcon=p5,o.VideocamOffIcon=w5,o.VideogameAssetIcon=k5,o.VideogameAssetOffIcon=m5,o.ViewAgendaIcon=v5,o.ViewArrayIcon=K5,o.ViewCarouselIcon=C5,o.ViewColumnIcon=S5,o.ViewComfyAltIcon=E5,o.ViewComfyIcon=B5,o.ViewCompactAltIcon=P5,o.ViewCompactIcon=F5,o.ViewCozyIcon=D5,o.ViewDayIcon=N5,o.ViewHeadlineIcon=T5,o.ViewInArIcon=M5,o.ViewKanbanIcon=O5,o.ViewListIcon=L5,o.ViewModuleIcon=Q5,o.ViewQuiltIcon=V5,o.ViewSidebarIcon=W5,o.ViewStreamIcon=Tc,o.ViewTimelineIcon=G5,o.ViewWeekIcon=z5,o.VignetteIcon=H5,o.VillaIcon=U5,o.VirtualTable=$i,o.VisibilityIcon=Y5,o.VisibilityOffIcon=$5,o.VoiceChatIcon=j5,o.VoiceOverOffIcon=q5,o.VoicemailIcon=J5,o.VolcanoIcon=Z5,o.VolumeDownIcon=X5,o.VolumeMuteIcon=x5,o.VolumeOffIcon=R5,o.VolumeUpIcon=eW,o.VolunteerActivismIcon=nW,o.VpnKeyIcon=oW,o.VpnKeyOffIcon=rW,o.VpnLockIcon=tW,o.VrpanoIcon=cW,o.WalletIcon=iW,o.WallpaperIcon=aW,o.WarehouseIcon=lW,o.WarningAmberIcon=dW,o.WarningIcon=sW,o.WashIcon=uW,o.WatchIcon=fW,o.WatchLaterIcon=AW,o.WatchOffIcon=_W,o.WaterDamageIcon=hW,o.WaterDropIcon=gW,o.WaterIcon=yW,o.WaterfallChartIcon=IW,o.WavesIcon=bW,o.WavingHandIcon=pW,o.WbAutoIcon=wW,o.WbCloudyIcon=kW,o.WbIncandescentIcon=mW,o.WbIridescentIcon=vW,o.WbShadeIcon=KW,o.WbSunnyIcon=CW,o.WbTwilightIcon=SW,o.WcIcon=BW,o.WebAssetIcon=FW,o.WebAssetOffIcon=PW,o.WebIcon=EW,o.WebStoriesIcon=DW,o.WebhookIcon=NW,o.WeekendIcon=TW,o.WestIcon=MW,o.WhatshotIcon=OW,o.WheelchairPickupIcon=LW,o.WhereToVoteIcon=QW,o.WidgetsIcon=VW,o.WidthFullIcon=WW,o.WidthNormalIcon=GW,o.WidthWideIcon=zW,o.Wifi1BarIcon=UW,o.Wifi2BarIcon=YW,o.WifiCalling3Icon=jW,o.WifiCallingIcon=$W,o.WifiChannelIcon=qW,o.WifiFindIcon=JW,o.WifiIcon=HW,o.WifiLockIcon=ZW,o.WifiOffIcon=XW,o.WifiPasswordIcon=xW,o.WifiProtectedSetupIcon=RW,o.WifiTetheringErrorIcon=nG,o.WifiTetheringIcon=eG,o.WifiTetheringOffIcon=oG,o.WindPowerIcon=rG,o.WindowIcon=tG,o.WineBarIcon=cG,o.Woman2Icon=aG,o.WomanIcon=iG,o.WorkHistoryIcon=sG,o.WorkIcon=lG,o.WorkOffIcon=dG,o.WorkOutlineIcon=uG,o.WorkspacePremiumIcon=fG,o.WorkspacesIcon=AG,o.WrapTextIcon=_G,o.WrongLocationIcon=yG,o.WysiwygIcon=hG,o.YardIcon=gG,o.YoutubeSearchedForIcon=IG,o.ZoomInIcon=bG,o.ZoomInMapIcon=pG,o.ZoomOutIcon=wG,o.ZoomOutMapIcon=kG,o._10kIcon=al,o._10mpIcon=ll,o._11mpIcon=sl,o._123Icon=cl,o._12mpIcon=dl,o._13mpIcon=ul,o._14mpIcon=fl,o._15mpIcon=Al,o._16mpIcon=_l,o._17mpIcon=yl,o._18UpRatingIcon=hl,o._18mpIcon=gl,o._19mpIcon=Il,o._1kIcon=bl,o._1kPlusIcon=pl,o._1xMobiledataIcon=wl,o._20mpIcon=kl,o._21mpIcon=ml,o._22mpIcon=vl,o._23mpIcon=Kl,o._24mpIcon=Cl,o._2kIcon=Sl,o._2kPlusIcon=Bl,o._2mpIcon=El,o._30fpsIcon=Fl,o._30fpsSelectIcon=Pl,o._360Icon=il,o._3dRotationIcon=Dl,o._3gMobiledataIcon=Nl,o._3kIcon=Tl,o._3kPlusIcon=Ml,o._3mpIcon=Ol,o._3pIcon=Ll,o._4gMobiledataIcon=Ql,o._4gPlusMobiledataIcon=Vl,o._4kIcon=Wl,o._4kPlusIcon=Gl,o._4mpIcon=zl,o._5gIcon=Hl,o._5kIcon=Ul,o._5kPlusIcon=Yl,o._5mpIcon=$l,o._60fpsIcon=jl,o._60fpsSelectIcon=ql,o._6FtApartIcon=Jl,o._6kIcon=Zl,o._6kPlusIcon=Xl,o._6mpIcon=xl,o._7kIcon=Rl,o._7kPlusIcon=es,o._7mpIcon=ns,o._8kIcon=os,o._8kPlusIcon=rs,o._8mpIcon=ts,o._9kIcon=cs,o._9kPlusIcon=is,o._9mpIcon=as,o.addInitialSlash=Ya,o.buildAdditionalFieldDelegate=NH,o.buildCollection=CH,o.buildEntityCallbacks=DH,o.buildEnumLabel=xt,o.buildEnumValueConfig=PH,o.buildEnumValues=FH,o.buildFieldConfig=TH,o.buildProperties=BH,o.buildPropertiesOrBuilder=EH,o.buildProperty=SH,o.canCreateEntity=Qo,o.canDeleteEntity=it,o.canEditEntity=ct,o.cardClickableMixin=ec,o.cardMixin=Rt,o.cardSelectedMixin=xa,o.cn=E,o.coolIconKeys=_r,o.debounce=Oi,o.defaultBorderMixin=ue,o.defaultDateFormat=oi,o.deleteEntityWithCallbacks=zc,o.enumToObjectEntries=tn,o.fieldBackgroundDisabledMixin=Re,o.fieldBackgroundHoverMixin=We,o.fieldBackgroundInvisibleMixin=Ar,o.fieldBackgroundMixin=Je,o.flattenObject=at,o.focusedClasses=fr,o.focusedInvisibleMixin=ur,o.focusedMixin=he,o.fullPathToCollectionSegments=Ze,o.getArrayValuesCount=Li,o.getBracketNotation=Qz,o.getCollectionByPathOrAlias=Io,o.getCollectionPathsCombinations=bo,o.getColorForProperty=Lz,o.getColorScheme=Xt,o.getDefaultFieldId=st,o.getDefaultValueFor=ko,o.getDefaultValueForDataType=sr,o.getDefaultValuesFor=eo,o.getFieldConfig=Go,o.getFieldId=dt,o.getHashValue=ir,o.getIcon=Ti,o.getIconForProperty=ke,o.getIconForView=Vo,o.getIconForWidget=rt,o.getIdIcon=Oz,o.getLabelOrConfigFrom=Ko,o.getLastSegment=$a,o.getPropertiesWithPropertiesOrder=Ni,o.getPropertyInPath=wn,o.getRandomId=Ao,o.getReferenceFrom=hn,o.getReferencePreviewKeys=Mi,o.getResolvedPropertyInPath=tt,o.getValueInPath=rn,o.hydrateRegExp=Pi,o.iconKeys=oc,o.isDefaultFieldConfigId=Qi,o.isEmptyObject=lr,o.isEnumValueDisabled=Xa,o.isHidden=Rn,o.isObject=po,o.isPropertyBuilder=Le,o.isReadOnly=Cn,o.isReferenceProperty=Di,o.isValidRegExp=Tz,o.mergeDeep=qe,o.paperMixin=Ge,o.pick=qt,o.plural=Vz,o.randomColor=xG,o.randomString=Tn,o.removeFunctions=cr,o.removeInPath=ja,o.removeInitialAndTrailingSlashes=pe,o.removeInitialSlash=$t,o.removeTrailingSlash=jt,o.removeUndefined=ar,o.renderSkeletonCaptionText=QG,o.renderSkeletonIcon=Mr,o.renderSkeletonImageThumbnail=Tr,o.renderSkeletonText=en,o.resolveArrayProperty=sn,o.resolveCollection=Me,o.resolveCollectionPathAliases=rr,o.resolveDefaultSelectedView=nt,o.resolveEntityView=At,o.resolveEnumValues=Gz,o.resolveNavigationFrom=Hc,o.resolvePermissions=uo,o.resolveProperties=ut,o.resolveProperty=Ne,o.resolvePropertyEnum=ft,o.sanitizeData=Ja,o.saveEntityWithCallbacks=Fr,o.segmentsToStrippedPath=Fi,o.serializeRegExp=Nz,o.singular=Wz,o.slugify=No,o.sortProperties=Bi,o.stripCollectionPath=ot,o.toKebabCase=JG,o.toSnakeCase=XG,o.traverseValueProperty=mo,o.traverseValuesProperties=dr,o.unslugify=Ua,o.updateDateAutoValues=qa,o.useAuthController=In,o.useAutoComplete=QH,o.useBreadcrumbsContext=Dr,o.useBrowserTitleAndIcon=CG,o.useBuildLocalConfigurationPersistence=OH,o.useBuildModeController=MH,o.useClearRestoreValue=Te,o.useClipboard=Uc,o.useCollectionFetch=Gc,o.useDataSource=Qe,o.useDebounce=Oo,o.useDebounceValue=Mz,o.useEntityCollectionTableController=Ct,o.useEntityFetch=Er,o.useFireCMSContext=ne,o.useLargeLayout=ze,o.useModeController=Pr,o.useNavigationContext=fe,o.useOutsideAlerter=Do,o.useReferenceDialog=io,o.useResolvedNavigationFrom=mG,o.useSelectionController=Bt,o.useSideDialogContext=Uo,o.useSideDialogsController=co,o.useSideEntityController=Sn,o.useSnackbarController=an,o.useStorageSource=Bn,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
1610
+ }`);const[u,A]=f.useState(i),[y,h]=f.useState(u);return f.useEffect(()=>{u?setTimeout(()=>{h(!0)},220):h(!1)},[u]),n.jsx(n.Fragment,{children:n.jsxs(qn.Root,{className:E(!c&&ue+" border","rounded-md"),open:u,onOpenChange:I=>{a?.(I),A(I)},children:[n.jsxs(qn.Trigger,{className:E(he,"rounded flex items-center justify-between w-full min-h-[52px]",c?"border-b px-2":"p-4",c&&ue,s&&Je,l),children:[e,n.jsx(oo,{className:E("transition",u?"rotate-180":"")})]}),n.jsx(qn.Content,{className:E("CollapsibleContent"),style:{overflow:y?"visible":"hidden"},children:n.jsx("div",{className:d,children:t})})]})})}function Et({children:e,group:t}){const c=En();return n.jsx(dn,{invisible:!0,titleClassName:"font-medium text-sm text-gray-600 dark:text-gray-400",className:"py-4",initiallyExpanded:!(c?.collapsedGroups??[]).includes(t??"ungrouped"),onExpandedChange:i=>{if(c)if(i)c.setCollapsedGroups((c.collapsedGroups??[]).filter(a=>a!==(t??"ungrouped")));else{const a=(c.collapsedGroups??[]).concat(t??"ungrouped");c.setCollapsedGroups(a)}},title:n.jsx(j,{color:"secondary",className:"font-medium ml-1",children:t?.toUpperCase()??"Views".toUpperCase()}),children:n.jsx("div",{className:"mb-8",children:e})})}function ca({view:e,path:t,collection:c,url:i,name:a,description:l,onClick:s}){const d=En(),u=Vo(c??e),A=be.useNavigate(),y=ne(),h=(d?.favouritePaths??[]).includes(t);let I;if(y.plugins&&c){const _={path:t,collection:c,context:y};I=n.jsx(n.Fragment,{children:y.plugins.map((g,b)=>g.homePage?.CollectionActions?n.jsx(g.homePage.CollectionActions,{..._,extraProps:g.homePage.extraProps},`actions_${b}`):null)})}return n.jsx(ga,{className:E("h-full p-4 cursor-pointer min-h-[230px]"),onClick:()=>{s?.(),A(i),d&&d.setRecentlyVisitedPaths([t,...(d.recentlyVisitedPaths??[]).filter(_=>_!==t)])},children:n.jsxs("div",{className:"flex flex-col items-start h-full",children:[n.jsxs("div",{className:"flex-grow w-full",children:[n.jsxs("div",{className:"h-10 flex items-center w-full justify-between text-gray-300 dark:text-gray-600",children:[u,n.jsxs("div",{className:"flex items-center gap-1",onClick:_=>{_.preventDefault(),_.stopPropagation()},children:[I,d&&n.jsx(R,{onClick:_=>{_.preventDefault(),_.stopPropagation(),h?d.setFavouritePaths(d.favouritePaths.filter(g=>g!==t)):d.setFavouritePaths([...d.favouritePaths,t])},children:h?n.jsx(vr,{size:18,className:"text-secondary"}):n.jsx(Kr,{size:18,className:"text-gray-400 dark:text-gray-500"})})]})]}),n.jsx(j,{gutterBottom:!0,variant:"h5",component:"h2",children:a}),l&&n.jsx(j,{variant:"body2",color:"secondary",component:"div",children:n.jsx(lo,{source:l})})]}),n.jsx("div",{style:{alignSelf:"flex-end"},children:n.jsx("div",{className:"p-4",children:n.jsx(cc,{className:"text-primary"})})})]})})}function J3({entry:e}){const t=be.useNavigate(),c=En();if(!c)return null;const i=c.favouritePaths.includes(e.path),a=l=>{l.preventDefault(),l.stopPropagation(),i?c.setFavouritePaths(c.favouritePaths.filter(s=>s!==e.path)):c.setFavouritePaths([...c.favouritePaths,e.path])};return n.jsx(Fo,{onClick:()=>t(e.url),icon:i?n.jsx(vr,{onClick:a,size:18,className:"text-secondary"}):n.jsx(Kr,{onClick:a,size:18,className:"text-gray-400 dark:text-gray-500"}),children:e.name},e.path)}function Z3({hidden:e}){const t=fe(),c=En();if(!c)return null;const i=(c?.favouritePaths??[]).map(a=>t.topLevelNavigation?.navigationEntries.find(l=>l.path===a)).filter(Boolean);return n.jsx(To,{in:i.length>0,children:n.jsx("div",{className:"flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]",children:i.map(a=>n.jsx(J3,{entry:a},a.path))})})}const Ft={};function X3(){const e=be.useLocation(),t=f.useRef(null),[c,i]=f.useState(0),[a,l]=f.useState("down"),s=f.useCallback(()=>{!t.current||!e.key||(Ft[e.key]=t.current.scrollTop,i(t.current.scrollTop),l(t.current.scrollTop>c?"down":"up"))},[t,e.key,c]);return f.useEffect(()=>{const d=t.current;if(d)return d.addEventListener("scroll",s,{passive:!0}),()=>{d&&d.removeEventListener("scroll",s)}},[t,s,e]),f.useEffect(()=>{!t.current||!Ft[e.key]||t.current.scrollTo({top:Ft[e.key],behavior:"auto"})},[e]),{containerRef:t,scroll:c,direction:a}}const Wn=new Qa.Search("url");Wn.addIndex("name"),Wn.addIndex("description"),Wn.addIndex("group"),Wn.addIndex("path");function ia({additionalChildrenStart:e,additionalChildrenEnd:t}){const c=ne(),i=fe();if(!i.topLevelNavigation)throw Error("Navigation not ready in FireCMSHomePage");const{containerRef:a,scroll:l,direction:s}=X3(),{navigationEntries:d,groups:u}=i.topLevelNavigation,[A,y]=f.useState(null),h=A?d.filter(p=>A.includes(p.url)):d;f.useEffect(()=>{Wn.addDocuments(d)},[d]);const I=f.useCallback(p=>{if(!p||p==="")y(null);else{const w=Wn.search(p);y(w.map(k=>k.url))}},[]),_=[...u];(h.filter(p=>!p.group).length>0||h.length===0)&&_.push(void 0);let g,b;if(c.plugins){const p={context:c};b=n.jsx(n.Fragment,{children:c.plugins.filter(w=>w.homePage?.includeSection).map((w,k)=>{const v=w.homePage.includeSection(p);return n.jsx(Et,{group:v.title,children:v.children},`plugin_section_${w.name}`)})}),g=n.jsx("div",{className:"flex flex-col gap-2",children:c.plugins.filter(w=>w.homePage?.additionalChildrenStart).map((w,k)=>n.jsx("div",{children:w.homePage.additionalChildrenStart},`plugin_children_start_${k}`))})}return n.jsx("div",{id:"home_page",ref:a,className:"py-2 overflow-auto h-full w-full",children:n.jsxs(Ot,{maxWidth:"6xl",children:[n.jsx("div",{className:"sticky py-4 transition-all duration-400 ease-in-out top-0 z-10",style:{top:s==="down"?-84:0},children:n.jsx(Qt,{onTextSearch:I,placeholder:"Search collections",large:!1,className:"w-full"})}),n.jsx(Z3,{hidden:!!A}),e,g,_.map((p,w)=>{const k=[],v={group:p,context:c};c.plugins&&c.plugins.forEach(m=>{m.homePage?.AdditionalCards&&k.push(...Yo(m.homePage?.AdditionalCards))});const K=h.filter(m=>m.group===p||!m.group&&p===void 0);return K.length===0&&k.length===0?null:n.jsx(Et,{group:p,children:n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[K.map(m=>n.jsx("div",{className:"col-span-1",children:n.jsx(ca,{...m,onClick:()=>{const C=m.type==="collection"?"home_navigate_to_collection":m.type==="view"?"home_navigate_to_view":"unmapped_event";c.onAnalyticsEvent?.(C,{path:m.path})}})},`nav_${m.group}_${m.name}`)),k&&k.map((m,C)=>n.jsx("div",{children:n.jsx(m,{...v})},`nav_${p}_add_${C}`))]})},`plugin_section_${p}`)}),b,t]})})}function x3({fieldConfig:e}){const t="h-8 w-8 p-1 rounded-full shadow text-white";return n.jsx("div",{className:t,style:{background:e?.color??"#888"},children:rt(e,"medium")})}function R3({children:e,title:t,path:c}){const i=Dr();return f.useEffect(()=>{i.set({breadcrumbs:[{title:t,url:c}]})},[c,t]),n.jsx(n.Fragment,{children:e})}function aa(){return n.jsx("div",{className:"flex w-full h-full",children:n.jsxs("div",{className:"m-auto flex items-center flex-col",children:[n.jsx(j,{variant:"h4",align:"center",gutterBottom:!0,children:"Page not found"}),n.jsx(j,{align:"center",gutterBottom:!0,children:"This page does not exist or you may not have access to it"}),n.jsx(te,{variant:"text",component:be.Link,to:"/",children:"Back to home"})]})})}function eH({open:e,onAccept:t,onCancel:c,title:i,loading:a,body:l}){return n.jsxs(Jo,{open:e,onOpenChange:s=>s?void 0:c(),children:[n.jsxs(Zo,{children:[n.jsx(j,{variant:"h6",className:"mb-2",children:i}),l]}),n.jsxs(kn,{children:[n.jsx(te,{variant:"text",onClick:c,autoFocus:!0,children:"Cancel"}),n.jsx(Ia,{color:"primary",type:"submit",loading:a,onClick:t,children:"Ok"})]})]})}function la({width:e,height:t,className:c,style:i}){return n.jsxs("svg",{width:e??"100%",height:t??"100%",viewBox:"0 0 599 599",version:"1.1",style:i,className:c,xmlns:"http://www.w3.org/2000/svg",children:[n.jsxs("defs",{children:[n.jsxs("radialGradient",{cx:"28.6213569%",cy:"43.1133328%",fx:"28.6213569%",fy:"43.1133328%",r:"71.5003456%",gradientTransform:"translate(0.286214,0.431133),rotate(3.343450),scale(1.000000,0.996175),translate(-0.286214,-0.431133)",id:"radialGradient-1",children:[n.jsx("stop",{stopColor:"#FF5B79",offset:"0%"}),n.jsx("stop",{stopColor:"#FA5574",offset:"28.0930803%"}),n.jsx("stop",{stopColor:"#EC4C51",offset:"44.7242531%"}),n.jsx("stop",{stopColor:"#9543C1",offset:"71.4578165%"}),n.jsx("stop",{stopColor:"#3857B3",offset:"100%"})]}),n.jsxs("radialGradient",{cx:"53.6205516%",cy:"47.2473036%",fx:"53.6205516%",fy:"47.2473036%",r:"50.8229649%",gradientTransform:"translate(0.536206,0.472473),rotate(90.000000),scale(1.000000,1.206631),translate(-0.536206,-0.472473)",id:"radialGradient-2",children:[n.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),n.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"75.3503173%"}),n.jsx("stop",{stopColor:"#0D060B",stopOpacity:"0.437431709",offset:"100%"})]}),n.jsxs("radialGradient",{cx:"53.8605015%",cy:"48.1990423%",fx:"53.8605015%",fy:"48.1990423%",r:"59.9151549%",gradientTransform:"translate(0.538605,0.481990),rotate(180.000000),scale(1.000000,0.925027),translate(-0.538605,-0.481990)",id:"radialGradient-3",children:[n.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),n.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"84.0867343%"}),n.jsx("stop",{stopColor:"#FF0000",stopOpacity:"0.567324765",offset:"100%"})]})]}),n.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:n.jsxs("g",{id:"firecms_logo",children:[n.jsx("circle",{fill:"url(#radialGradient-1)",cx:"299.5",cy:"299.5",r:"299.5"}),n.jsx("circle",{fill:"url(#radialGradient-2)",cx:"299.5",cy:"299.5",r:"299.5"}),n.jsx("circle",{fill:"url(#radialGradient-3)",cx:"299.5",cy:"299.5",r:"299.5"})]})})]})}const nH={info:"bg-sky-200 dark:bg-teal-900",warn:"bg-orange-200 dark:bg-yellow-950"};function oH({children:e,mode:t="info"}){return n.jsx("div",{className:E("my-3 py-2 px-4 rounded",nH[t]),children:e})}const sa=function({title:t,endAdornment:c,startAdornment:i,drawerOpen:a,dropDownActions:l,includeDrawer:s,className:d,style:u,user:A}){const y=fe(),h=In(),{mode:I,toggleMode:_}=Pr(),g=ze(),b=A??h.user;let p;if(b&&b.photoURL)p=n.jsx(Mt,{src:b.photoURL});else if(b===void 0||h.initialLoading)p=n.jsx("div",{className:"p-1 flex justify-center",children:n.jsx(Ve,{className:"w-10 h-10 rounded-full"})});else{const w=b?.displayName?b.displayName[0].toUpperCase():b?.email?b.email[0].toUpperCase():"A";p=n.jsx(Mt,{children:w})}return n.jsx("div",{style:u,className:E("pr-2",{"ml-[17rem]":a&&g,"ml-16":s&&!(a&&g)&&!i,"h-16":!0,"z-10":g,"transition-all":!0,"ease-in":!0,"duration-75":!0,"w-full":!s,"w-[calc(100%-64px)]":s&&!(a&&g),"w-[calc(100%-17rem)]":s&&a&&g,"duration-150":a&&g,fixed:!0},d),children:n.jsxs("div",{className:"flex flex-row gap-2 px-4 h-full items-center",children:[i,y&&n.jsx("div",{className:"mr-8 hidden lg:block",children:n.jsx(be.Link,{className:"visited:text-inherit visited:dark:text-inherit",to:y?.basePath??"/",children:n.jsx(j,{variant:"subtitle1",noWrap:!0,className:"ml-2 !font-medium",children:t})})}),n.jsx("div",{className:"flex-grow"}),c&&n.jsx(ie,{children:c}),n.jsx(R,{color:"inherit","aria-label":"Open drawer",onClick:_,size:"large",children:I==="dark"?n.jsx(dc,{}):n.jsx(mc,{})}),n.jsxs(Qn,{trigger:p,children:[l,!l&&n.jsxs(me,{onClick:h.signOut,children:[n.jsx(Sc,{}),"Log Out"]})]})]})})},rH=e=>e&&Array.isArray(e)&&e.length>0?e.map((t,c)=>t?{[ir(t)+c]:Ao()}:{}).reduce((t,c)=>({...t,...c}),{}):{};function Pt({droppableId:e,addLabel:t,value:c,disabled:i=!1,buildEntry:a,size:l,onInternalIdAdded:s,includeAddButton:d,newDefaultEntry:u,onValueChange:A}){const y=c&&Array.isArray(c)&&c.length>0,h=f.useRef(rH(c)),[I,_]=f.useState(y?Object.values(h.current):[]);f.useEffect(()=>{if(y&&c&&c.length!==I.length){const k=c.map((v,K)=>{const m=ir(v)+K;if(m in h.current)return h.current[m];{const C=Ao();return h.current[m]=C,C}});_(k)}},[y,I.length,c]);const g=k=>{if(k.preventDefault(),i)return;const v=Ao(),K=[...I,v];s&&s(v),_(K),A([...c??[],u])},b=k=>{const v=[...I];v.splice(k,1),_(v),A(c.filter((K,m)=>m!==k))},p=k=>{const v=Ao(),K=c[k],m=[...I.splice(0,k+1),v,...I.splice(k+1,I.length-k-1)];s&&s(v),_(m),A([...c.slice(0,k+1),K,...c.slice(k+1)])},w=k=>{if(!k.destination)return;const v=k.source.index,K=k.destination.index,m=[...I],C=m[v];m[v]=m[K],m[K]=C,_(m),A(tH(c,v,K))};return n.jsx(Kn.DragDropContext,{onDragEnd:w,children:n.jsx(Kn.Droppable,{droppableId:e,renderClone:(k,v,K)=>{const m=K.source.index,C=I[m];return n.jsx(Dt,{provided:k,internalId:C,index:m,size:l,disabled:i,buildEntry:a,remove:b,copy:p,isDragging:v.isDragging})},children:(k,v)=>n.jsxs("div",{...k.droppableProps,ref:k.innerRef,children:[y&&I.map((K,m)=>n.jsx(Kn.Draggable,{draggableId:`array_field_${K}`,isDragDisabled:i,index:m,children:(C,B)=>n.jsx(Dt,{provided:C,internalId:K,index:m,size:l,disabled:i,buildEntry:a,remove:b,copy:p,isDragging:B.isDragging})},`array_field_${K}`)),k.placeholder,d&&n.jsx("div",{className:"p-4 justify-center text-left",children:n.jsx(te,{variant:l==="small"?"text":"outlined",size:l==="small"?"small":"medium",color:"primary",disabled:i,startIcon:n.jsx(gn,{}),onClick:g,children:t??"Add"})})]})})})}function Dt({provided:e,index:t,internalId:c,size:i,disabled:a,buildEntry:l,remove:s,copy:d,isDragging:u}){const[A,y]=er(),h=i!=="small"&&y.height===0,I=i!=="small"&&y.height<100,[_,g]=f.useState(!1),b=f.useCallback(()=>g(!0),[]),p=f.useCallback(()=>g(!1),[]);return n.jsx("div",{onMouseEnter:b,onMouseMove:b,onMouseLeave:p,ref:e.innerRef,...e.draggableProps,style:e.draggableProps.style,className:`${u||_?We:""} mb-1 rounded-md opacity-100`,children:n.jsxs("div",{className:"flex items-start",children:[n.jsx("div",{ref:A,className:"flex-grow w-[calc(100%-48px)] text-text-primary dark:text-text-primary-dark",children:l(t,c)}),n.jsx(da,{direction:i==="small"?"row":"column",disabled:a,remove:s,index:t,provided:e,measuring:h,contentOverflow:I,copy:d})]})})}function da({direction:e,disabled:t,remove:c,index:i,provided:a,copy:l,contentOverflow:s,measuring:d}){return n.jsxs("div",{className:`p-1 flex ${e==="row"?"flex-row-reverse":"flex-col"} items-center`,...a.dragHandleProps,children:[n.jsx(_e,{side:e==="column"?"left":void 0,title:"Move",children:n.jsx(R,{size:"small",disabled:t,className:`cursor-${t?"inherit":"grab"}`,children:n.jsx("svg",{focusable:"false",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 24 24",children:n.jsx("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})})})}),!d&&!s&&n.jsxs(n.Fragment,{children:[n.jsx(_e,{title:"Remove",side:e==="column"?"left":void 0,children:n.jsx(R,{size:"small","aria-label":"remove",disabled:t,onClick:()=>c(i),children:n.jsx(to,{size:"small"})})}),n.jsx(_e,{side:e==="column"?"left":void 0,title:"Copy in this position",children:n.jsx(R,{size:"small","aria-label":"copy",disabled:t,onClick:()=>l(i),children:n.jsx(no,{size:"small"})})})]}),!d&&s&&n.jsx(n.Fragment,{children:n.jsxs(Qn,{trigger:n.jsx(R,{size:"small",children:n.jsx(kr,{size:"small"})}),children:[n.jsxs(me,{dense:!0,onClick:()=>c(i),children:[n.jsx(to,{size:"small"}),"Remove"]}),n.jsxs(me,{dense:!0,onClick:()=>l(i),children:[n.jsx(no,{size:"small"}),"Copy"]})]})})]})}function tH(e,t,c){const i=Array.from(e),[a]=i.splice(t,1);return i.splice(c,0,a),i}function Ao(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}const cH="100vw",iH="55vw",ua="768px",$o="main_##Q$SC^#S6";function aH({path:e,entityId:t,selectedSubPath:c,copy:i,collection:a,onValuesAreModified:l,formWidth:s,onUpdate:d,onClose:u}){a.customId&&a.formAutoSave&&console.warn(`The collection ${a.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);const[A,y]=f.useState(!1),[h,I]=f.useState(void 0);Oo(h,()=>{h&&Y({entityId:L?.id,collection:a,path:e,values:h,closeAfterSave:!1})},!1,2e3);const _=Qe(),g=Uo(),b=Sn(),p=an(),w=ne(),k=In(),[v,K]=f.useState(void 0),[m,C]=f.useState(i?"copy":t?"existing":"new"),B=f.useRef(void 0),P=B.current,F=(a.subcollections??[]).filter(M=>!M.hideFromNavigation),D=F?.length??0,S=a.entityViews,T=S?.length??0,N=a.formAutoSave&&!a.customId,q=T>0||D>0,z=c??nt(a?a.defaultSelectedView:void 0,{status:m,entityId:t}),V=f.useRef(z??$o),oe=V.current===$o,{entity:O,dataLoading:H,dataLoadingError:Z}=Er({path:e,entityId:t,collection:a,useCache:!1}),[L,W]=f.useState(O),[Q,X]=f.useState(void 0);f.useEffect(()=>{O&&W(O)},[O]),f.useEffect(()=>{if(m==="new")X(!1);else{const M=L?ct(a,k,Ze(e),L??null):!1;L&&X(!M)}},[k,L,m]);const ee=f.useCallback(M=>{y(!1),p.open({type:"error",message:"Error before saving: "+M?.message}),console.error(M)},[p]),U=f.useCallback(M=>{y(!1),p.open({type:"error",message:"Error after saving (entity is saved): "+M?.message}),console.error(M)},[p]),re=(M,le)=>{y(!1),N||p.open({type:"success",message:`${a.singularName??a.name}: Saved correctly`}),W(M),C("existing"),l(!1),d&&d({entity:M}),le?(g.setBlocked(!1),g.close(!0),u?.()):m!=="existing"&&b.replace({path:e,entityId:M.id,selectedSubPath:V.current,updateUrl:!0,collection:a})},J=f.useCallback(M=>{y(!1),p.open({type:"error",message:"Error saving: "+M?.message}),console.error("Error saving entity",e,t),console.error(M)},[t,e,p]),Y=({values:M,previousValues:le,closeAfterSave:Ie,entityId:Oe,collection:vn,path:$})=>{y(!0),Fr({path:$,entityId:Oe,values:M,previousValues:le,collection:vn,status:m,dataSource:_,context:w,onSaveSuccess:se=>re(se,Ie),onSaveFailure:J,onPreSaveHookError:ee,onSaveSuccessHookError:U}).then()},x=async({collection:M,path:le,entityId:Ie,values:Oe,previousValues:vn,closeAfterSave:$,autoSave:se})=>{m&&(se?I(Oe):Y({collection:M,path:le,entityId:Ie,values:Oe,previousValues:vn,closeAfterSave:$}))},ge=S?S.map(M=>At(M,w.entityViews)).filter(Boolean):[],He=S&&ge.map((M,le)=>{if(!M||V.current!==M.key)return null;const Ie=M.Builder;return Ie?n.jsx("div",{className:E(ue,"relative flex-grow w-full h-full overflow-auto "),role:"tabpanel",children:n.jsx(ie,{children:v&&n.jsx(Ie,{collection:a,entity:L,modifiedValues:P??L?.values,formContext:v})})},`custom_view_${M.key}`):(console.error("customView.Builder is not defined"),null)}).filter(Boolean),ve=H&&!L||(!L||Q===void 0)&&(m==="existing"||m==="copy"),fn=ve||A,An=F&&F.map((M,le)=>{const Ie=M.alias??M.path,Oe=L?`${e}/${L?.id}/${pe(Ie)}`:void 0;return V.current!==Ie?null:n.jsxs("div",{className:"relative flex-grow h-full overflow-auto w-full",role:"tabpanel",children:[fn&&n.jsx(fo,{}),!ve&&(L&&Oe?n.jsx(St,{fullPath:Oe,parentPathSegments:Ze(e),isSubCollection:!0,...M}):n.jsx("div",{className:"flex items-center justify-center w-full h-full p-3",children:n.jsx(j,{variant:"label",children:"You need to save your entity before adding additional collections"})}))]},`subcol_${Ie}`)}).filter(Boolean),zn=f.useCallback(()=>{l(!1)},[]),_o=M=>{V.current=M,b.replace({path:e,entityId:t,selectedSubPath:M===$o?void 0:M,updateUrl:!0,collection:a})},mn=f.useCallback(M=>{B.current=M},[]),Hn=f.useCallback(M=>{p.open({type:"error",message:"Error updating id, check the console"})},[]),_n=f.useCallback(M=>{W(le=>le?{...le,id:M}:void 0)},[]),Un=M=>{N||l(M)};function yo(){const M=w.plugins;let le=n.jsx(Si,{status:m,path:e,collection:a,onEntitySaveRequested:x,onDiscard:zn,onValuesChanged:mn,onModified:Un,entity:L,onIdChange:_n,onFormContextChange:K,hideId:a.hideIdFromForm,autoSave:N,onIdUpdateError:Hn});return M&&M.forEach(Ie=>{Ie.form?.provider&&(le=n.jsx(Ie.form.provider.Component,{status:m,path:e,collection:a,onDiscard:zn,onValuesChanged:mn,onModified:Un,entity:L,context:w,formContext:v,...Ie.form.provider.props,children:le}))}),n.jsx(ie,{children:le})}const G=Q===void 0?n.jsx(n.Fragment,{}):Q?n.jsxs(n.Fragment,{children:[n.jsx(j,{className:"mt-16 mb-8 mx-8",variant:"h4",children:a.singularName??a.name}),n.jsx(yt,{className:"px-12",entity:L,path:e,collection:a})]}):yo(),Ae=F&&F.map(M=>n.jsx(Xo,{className:"text-sm min-w-[140px]",value:M.path,children:M.name},`entity_detail_collection_tab_${M.name}`)),ae=ge.map(M=>n.jsx(Xo,{className:"text-sm min-w-[140px]",value:M.key,children:M.name},`entity_detail_collection_tab_${M.name}`));return n.jsx("div",{className:"flex flex-col h-full w-full transition-width duration-250 ease-in-out",children:n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:E(ue,"no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),children:[n.jsx("div",{className:"pb-1 self-center",children:n.jsx(R,{onClick:()=>(u?.(),g.close(!1)),size:"large",children:n.jsx(Ir,{})})}),n.jsx("div",{className:"flex-grow"}),ve&&n.jsx("div",{className:"self-center",children:n.jsx(Gn,{size:"small"})}),n.jsxs(ba,{value:V.current,onValueChange:M=>{_o(M)},className:"pl-4 pr-4 pt-0",children:[n.jsx(Xo,{disabled:!q,value:$o,className:`${q?"":"hidden"} text-sm min-w-[140px]`,children:a.singularName??a.name}),ae,Ae]})]}),n.jsxs("div",{className:"flex-grow h-full flex overflow-auto flex-row w-full ",style:{},children:[n.jsx("div",{role:"tabpanel",hidden:!oe,id:`form_${e}`,className:" w-full",children:ve?n.jsx(fo,{}):G}),He,An]})]})})}function lH(e){const{blocked:t,setBlocked:c,setBlockedNavigationMessage:i}=Uo(),a=fe(),l=f.useMemo(()=>{if(!e)return;let d=e.collection;if(!d&&(d=a.getCollection(e.path,e.entityId),!d))throw console.error("ERROR: No collection found in path `",e.path,"`. Entity id: ",e.entityId),Error("ERROR: No collection found in path `"+e.path+"`. Make sure you have defined a collection for this path in the root navigation.");return d},[a,e]);f.useEffect(()=>{function d(u){t&&l&&(u.preventDefault(),u.returnValue=`You have unsaved changes in this ${l.name}. Are you sure you want to leave this page?`)}return typeof window<"u"&&window.addEventListener("beforeunload",d),()=>{typeof window<"u"&&window.removeEventListener("beforeunload",d)}},[t,l]);const s=f.useCallback(d=>{c(d),i(d?n.jsxs(n.Fragment,{children:[" You have unsaved changes in this ",n.jsx("b",{children:l?.singularName??l?.name}),"."]}):void 0)},[l?.name,c,i]);return!e||!l?n.jsx("div",{className:"w-full"}):n.jsx(n.Fragment,{children:n.jsx(ie,{children:n.jsx(aH,{...e,formWidth:e.width,collection:l,onValuesAreModified:s})})})}const fa="new";function sH(e,t){if(t)return cH;const c=!e.selectedSubPath,i=typeof e.width=="number"?`${e.width}px`:e.width;return c?i??ua:`calc(${iH} + ${i??ua})`}const dH=(e,t)=>{const c=be.useLocation(),i=f.useRef(!1),a=!ze();f.useEffect(()=>{if(!e.loading&&!i.current){if(e.isUrlCollectionPath(c.pathname)){const u=c.hash===`#${fa}`,A=e.urlPathToDataPath(c.pathname),y=uH(A,e.collections,u);t.replace(y.map(h=>Nt(h,e,a)))}i.current=!0}},[c,e,t,a]);const l=f.useCallback(()=>{t.close()},[t]),s=f.useCallback(u=>{if(u.copy&&!u.entityId)throw Error("If you want to copy an entity you need to provide an entityId");const A=nt(u.collection?u.collection.defaultSelectedView:void 0,{status:u.copy?"copy":u.entityId?"existing":"new",entityId:u.entityId});t.open(Nt({selectedSubPath:A,...u},e,a))},[t,e,a]),d=f.useCallback(u=>{if(u.copy&&!u.entityId)throw Error("If you want to copy an entity you need to provide an entityId");t.replace(Nt(u,e,a))},[e,t,a]);return{close:l,open:s,replace:d}};function uH(e,t,c){const i=_t({path:e,collections:t}),a=[];let l="";for(let s=0;s<i.length;s++){const d=i[s];if(d.type==="collection"&&(l=d.path),s>0){const u=i[s-1];if(d.type==="entity")a.push({path:d.path,entityId:d.entityId,copy:!1});else if(d.type==="custom_view"){if(u.type==="entity"){const A=a[a.length-1];A&&(A.selectedSubPath=d.view.key)}}else if(d.type==="collection"&&u.type==="entity"){const A=a[a.length-1];A&&(A.selectedSubPath=d.collection.alias??d.collection.path)}}}return c&&a.push({path:l,copy:!1}),a}const Nt=(e,t,c)=>{const i=pe(e.path),a=e.entityId?t.buildUrlCollectionPath(`${i}/${e.entityId}/${e.selectedSubPath||""}`):t.buildUrlCollectionPath(`${i}#${fa}`);return{key:`${e.path}/${e.entityId}`,component:n.jsx(lH,{...e}),urlPath:a,parentUrlPath:t.buildUrlCollectionPath(i),width:sH(e,c),onClose:e.onClose}};function Aa(e){const{path:t,collections:c=[],currentFullPath:i}=e,a=pe(t).split("/"),l=bo(a),s=[];for(let d=0;d<l.length;d++){const u=l[d],A=c&&c.find(y=>y.alias===u||y.path===u);if(A){const y=A.alias??A.path,h=i&&i.length>0?i+"/"+y:y,I=pe(pe(t).replace(u,"")),_=I.length>0?I.split("/"):[];if(_.length>0){const g=_[0],b=h+"/"+g;if(s.push(new je(g,h)),_.length>1){const p=_.slice(1).join("/");if(!A)throw Error("collection not found resolving path: "+A);A.subcollections&&s.push(...Aa({path:p,collections:A.subcollections,currentFullPath:b}))}}break}}return s}function fH({basePath:e,baseCollectionPath:t,authController:c,collections:i,views:a,userConfigPersistence:l,plugins:s,dataSource:d}){const u=be.useLocation(),[A,y]=f.useState(),[h,I]=f.useState(),[_,g]=f.useState(!1),[b,p]=f.useState(void 0),[w,k]=f.useState(!0),[v,K]=f.useState(void 0),m=pe(e),C=pe(t),B=m?`/${m}`:"/",P=m?`/${m}/${C}`:`/${C}`,F=f.useCallback(W=>m?`/${m}/${jo(W)}`:`/${jo(W)}`,[m]),D=f.useCallback(W=>`${pe(t)}/${jo(W)}`,[t]),S=f.useCallback((W,Q)=>{const X=[...(W??[]).map(U=>U.hideFromNavigation?void 0:{url:D(U.alias??U.path),type:"collection",name:U.name.trim(),path:U.alias??U.path,collection:U,description:U.description?.trim(),group:U.group?.trim()}).filter(Boolean),...(Q??[]).map(U=>U.hideFromNavigation?void 0:{url:F(Array.isArray(U.path)?U.path[0]:U.path),name:U.name.trim(),type:"view",view:U,description:U.description?.trim(),group:U.group?.trim()}).filter(Boolean)],ee=Object.values(X).map(U=>U.group).filter(Boolean).filter((U,re,J)=>J.indexOf(U)===re);return{navigationEntries:X,groups:ee}},[F,D]),T=f.useCallback(async()=>{if(!c.initialLoading){try{const[W=[],Q=[]]=await Promise.all([AH(i,c,d,s),_H(a,c,d)]);y(W),I(Q),p(S(W??[],Q))}catch(W){console.error(W),K(W)}k(!1),g(!0)}},[i,c.user,c.initialLoading,d,s,a,S]);f.useEffect(()=>{T()},[T]);const N=f.useCallback((W,Q,X=!1)=>{if(!A)return;const ee=Io(pe(W),A),U=X?l?.getCollectionConfig(W):void 0,re=ee?qe(ee,U):void 0;let J=re;if(re){const Y=re.subcollections,x=re.callbacks,ge=re.permissions;J={...J,subcollections:J?.subcollections??Y,callbacks:J?.callbacks??x,permissions:J?.permissions??ge}}if(J)return{...re,...J}},[e,t,A]),q=f.useCallback(W=>{let Q=A;if(!Q)throw Error("Collections have not been initialised yet");for(let X=0;X<W.length;X++){const ee=W[X],U=Q.find(re=>re.alias===ee||re.path===ee);if(!U)return;if(Q=U.subcollections,X===W.length-1)return U}},[A]),z=f.useCallback(W=>pe(W+"/").startsWith(pe(P)+"/"),[P]),V=f.useCallback(W=>{if(W.startsWith(P))return W.replace(P,"");throw Error("Expected path starting with "+P)},[P]),oe=f.useCallback(({path:W})=>`s/edit/${jo(W)}`,[]),O=f.useCallback(W=>{if(!A)throw Error("Collections have not been initialised yet");return rr(W,A)},[A]),H=u.state,Z=H&&H.base_location?H.base_location:u,L=f.useCallback(W=>Aa({path:W,collections:A}),[A]);return f.useMemo(()=>({collections:A??[],views:h??[],loading:!_||w,navigationLoadingError:v,homeUrl:B,basePath:e,baseCollectionPath:t,initialised:_,getCollection:N,getCollectionFromPaths:q,isUrlCollectionPath:z,urlPathToDataPath:V,buildUrlCollectionPath:D,buildUrlEditCollectionPath:oe,buildCMSUrlPath:F,resolveAliasesFrom:O,topLevelNavigation:b,baseLocation:Z,refreshNavigation:T,getParentReferencesFromPath:L}),[t,Z,e,F,D,oe,A,L,N,q,B,_,z,w,v,T,O,b,V,h])}function jo(e){return encodeURIComponent(pe(e)).replaceAll("%2F","/").replaceAll("%23","#")}function _a(e,t){return e.filter(c=>c.permissions?uo(c,t,[c.path],null).read!==!1:!0).map(c=>c.subcollections?{...c,subcollections:_a(c.subcollections,t)}:c)}async function AH(e,t,c,i){let a=[];return typeof e=="function"?a=await e({user:t.user,authController:t,dataSource:c}):Array.isArray(e)&&(a=e),a=_a(a,t),i&&i.forEach(l=>{l.collections?.injectCollections&&(a=l.collections?.injectCollections(a??[]))}),a}async function _H(e,t,c){let i=[];return typeof e=="function"?i=await e({user:t.user,authController:t,dataSource:c}):Array.isArray(e)&&(i=e),i}function yH(){const e=be.useLocation(),t=be.useNavigate(),[c,i]=f.useState([]),a=f.useRef(c),l=f.useRef({}),s=f.useRef(0),d=h=>{a.current=h,i(h)};f.useEffect(()=>{const _=(e.state?.panels??[]).map(g=>l.current[g]).filter(g=>!!g);de(a.current.map(g=>g.key),_.map(g=>g.key))||d(_)},[e]);const u=f.useCallback(()=>{if(c.length===0)return;const h=c[c.length-1],I=[...c.slice(0,-1)];if(d(I),s.current>0)h.urlPath&&t(-1),s.current--;else if(h.parentUrlPath){const _=e.state?.base_location??e;t(h.parentUrlPath,{replace:!0,state:{base_location:_,panels:I.map(g=>g.key)}})}},[c,t,e]),A=f.useCallback(h=>{const I=Array.isArray(h)?h:[h];I.forEach(b=>{l.current[b.key]=b}),s.current=s.current+I.length;const _=e.state?.base_location??e,g=[...c,...I];d(g),I.forEach(b=>{b.urlPath&&t(b.urlPath,{state:{base_location:_,panels:g.map(p=>p.key)}})})},[e,t,c]),y=f.useCallback(h=>{const I=Array.isArray(h)?h:[h];I.forEach(b=>{l.current[b.key]=b});const _=e.state?.base_location??e,g=[...c.slice(0,-I.length),...I];d(g),I.forEach(b=>{b.urlPath&&t(b.urlPath,{replace:!0,state:{base_location:_,panels:g.map(p=>p.key)}})})},[e,t,c]);return{sidePanels:c,close:u,open:A,replace:y}}function hH(e){f.useEffect(()=>{if(!e)return;const t=Ut[e];t&&(xo.registerLocale(e,t),xo.setDefaultLocale(e))},[e])}const gH="/",IH="/c";function bH(e){const t=Pr(),{children:c,collections:i,views:a,entityLinkBuilder:l,userConfigPersistence:s,dateTimeFormat:d,locale:u,authController:A,storageSource:y,dataSource:h,basePath:I=gH,baseCollectionPath:_=IH,plugins:g,onAnalyticsEvent:b,fields:p,entityViews:w}=e;hH(u);const k=fH({basePath:I,baseCollectionPath:_,authController:A,collections:i,views:a,userConfigPersistence:s,dataSource:h,plugins:g}),v=yH(),K=dH(k,v),m=A.initialLoading||k.loading||(g?.some(B=>B.loading)??!1),C=f.useMemo(()=>({entityLinkBuilder:l,dateTimeFormat:d,locale:u,plugins:g,onAnalyticsEvent:b,entityViews:w??[],fields:p??{}}),[d,u,g,w,p]);return k.navigationLoadingError?n.jsx(Lt,{maxWidth:"md",fullScreen:!0,children:n.jsx(we,{title:"Error loading navigation",error:k.navigationLoadingError})}):A.authError?n.jsx(Lt,{maxWidth:"md",fullScreen:!0,children:n.jsx(we,{title:"Error loading auth",error:A.authError})}):n.jsx(or.Provider,{value:t,children:n.jsx(Sr.Provider,{value:C,children:n.jsx(Wc.Provider,{value:s,children:n.jsx(Vc.Provider,{value:y,children:n.jsx(Mc.Provider,{value:h,children:n.jsx(Cr.Provider,{value:A,children:n.jsx(Lc.Provider,{value:v,children:n.jsx(Qc.Provider,{value:K,children:n.jsx(Oc.Provider,{value:k,children:n.jsx(Ga,{children:n.jsx(pH,{loading:m,children:c})})})})})})})})})})})}function pH({loading:e,children:t}){const c=ne();let i=t({context:c,loading:e});const a=c.plugins;return!e&&a&&a.forEach(l=>{l.provider&&(i=n.jsx(l.provider.Component,{...l.provider.props,context:c,children:i}))}),n.jsx(n.Fragment,{children:i})}function ya({hovered:e,drawerOpen:t,closeDrawer:c}){const i=ne(),a=fe(),l=e&&!t,s=ze();if(!a.topLevelNavigation)throw Error("Navigation not ready in Drawer");const{navigationEntries:d,groups:u}=a.topLevelNavigation,A=Object.values(d).filter(I=>!I.group),y=f.useCallback(I=>t?n.jsx("div",{className:"pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",children:n.jsx(j,{variant:"caption",color:"secondary",className:"font-medium flex-grow",children:I?I.toUpperCase():"Views".toUpperCase()})}):n.jsx("div",{className:"h-4"}),[t]),h=I=>{const _=I.type==="collection"?"drawer_navigate_to_collection":I.type==="view"?"drawer_navigate_to_view":"unmapped_event";i.onAnalyticsEvent?.(_,{url:I.url}),s||c()};return n.jsxs("div",{className:"flex-grow overflow-scroll no-scrollbar",children:[u.map(I=>n.jsxs(f.Fragment,{children:[y(I),Object.values(d).filter(_=>_.group===I).map((_,g)=>n.jsx(Tt,{icon:Vo(_.collection??_.view),tooltipsOpen:l,drawerOpen:t,onClick:()=>h(_),url:_.url,name:_.name},`navigation_${g}`))]},`drawer_group_${I}`)),A.length>0&&y(),A.map((I,_)=>n.jsx(Tt,{icon:Vo(I.collection??I.view),tooltipsOpen:l,onClick:()=>h(I),drawerOpen:t,url:I.url,name:I.name},`navigation_${_}`))]})}function Tt({name:e,icon:t,drawerOpen:c,tooltipsOpen:i,url:a,onClick:l}){const s=n.jsx("div",{className:"text-gray-600 dark:text-gray-500",children:t}),d=n.jsxs(be.NavLink,{onClick:l,className:({isActive:u})=>E("rounded-r-xl truncate","hover:bg-gray-200 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-gray-100","flex flex-row items-center w-full mr-8",c?"pl-8 h-12":"pl-6 h-11","font-medium text-sm",u?"bg-gray-100 dark:bg-gray-800":""),to:a,children:[s,n.jsx("div",{className:E(c?"opacity-100":"opacity-0 hidden","ml-4 font-inherit text-inherit"),children:e.toUpperCase()})]});return c?d:n.jsx(_e,{open:i,side:"right",title:e,children:d})}const wH=280,kH=f.memo(function(t){const{children:c,name:i,logo:a,includeDrawer:l=!0,autoOpenDrawer:s,Drawer:d=ya,drawerProps:u,FireCMSAppBarComponent:A=sa,fireCMSAppBarComponentProps:y}=t,h=ze(),I=fe(),[_,g]=f.useState(!1),[b,p]=f.useState(!1),w=f.useCallback(()=>p(!0),[]),k=f.useCallback(()=>p(!1),[]),v=f.useCallback(()=>{g(!1)},[]),K=_||!!(h&&s&&b);return n.jsxs("div",{className:"flex h-screen w-screen bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-white overflow-hidden",style:{paddingTop:"env(safe-area-inset-top)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)",paddingBottom:"env(safe-area-inset-bottom)",height:"100dvh"},children:[n.jsx(A,{title:i,includeDrawer:l,drawerOpen:K,...y}),n.jsx(vH,{displayed:l,onMouseEnter:w,onMouseMove:w,onMouseLeave:k,open:K,logo:a,hovered:b,setDrawerOpen:g,children:l&&(I.loading?n.jsx(fo,{}):n.jsx(d,{hovered:b,drawerOpen:K,closeDrawer:v,...u}))}),n.jsxs("main",{className:"flex flex-col flex-grow overflow-auto",children:[n.jsx(mH,{}),n.jsx("div",{className:E(ue,"flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1"),children:n.jsx(ie,{children:c})})]})]})},de),mH=()=>n.jsx("div",{className:"flex flex-col min-h-[68px]"});function vH(e){const t=fe(),c=e.displayed?e.open?wH:72:0,i=n.jsxs("div",{className:"relative h-full no-scrollbar overflow-y-auto overflow-x-hidden",style:{width:c,transition:"left 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[!e.open&&e.displayed&&n.jsx(_e,{title:"Open menu",side:"right",sideOffset:12,className:"fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit",children:n.jsx(R,{color:"inherit","aria-label":"Open menu",className:"sticky top-2 left-3 ",onClick:()=>e.setDrawerOpen(!0),size:"large",children:n.jsx(wr,{})})}),n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsx("div",{style:{transition:"padding 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",padding:e.open?"32px 96px 0px 24px":"72px 16px 0px"},className:E("cursor-pointer"),children:n.jsx(_e,{title:"Home",sideOffset:20,side:"right",children:n.jsx(be.Link,{to:t.basePath,children:e.logo?n.jsx("img",{src:e.logo,alt:"Logo",className:E("max-w-full max-h-full",e.open??"w-[160px] h-[160px]")}):n.jsx(la,{})})})}),e.children]})]});return ze()?n.jsxs("div",{className:"relative",onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseLeave:e.onMouseLeave,style:{width:c,transition:"left 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 150ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[i,n.jsx("div",{className:`absolute right-0 top-4 ${e.open?"opacity-100":"opacity-0 invisible"} transition-opacity duration-1000 ease-in-out`,children:n.jsx(R,{"aria-label":"Close drawer",onClick:()=>e.setDrawerOpen(!1),children:n.jsx(sc,{})})})]}):e.displayed?n.jsxs(n.Fragment,{children:[n.jsx(R,{color:"inherit","aria-label":"Open drawer",onClick:()=>e.setDrawerOpen(!0),size:"large",className:"absolute top-2 left-6",children:n.jsx(wr,{})}),n.jsx(Vt,{side:"left",transparent:!0,open:e.open,onOpenChange:e.setDrawerOpen,children:i})]}):null}const KH=f.memo(function({HomePage:t=ia,customRoutes:c}){const i=be.useLocation(),a=fe();if(!a)return n.jsx(n.Fragment,{});const l=i.state,s=l&&l.base_location?l.base_location:i,d=[];a.views&&a.views.forEach(I=>{Array.isArray(I.path)?d.push(...I.path.map(_=>ha(_,I))):d.push(ha(I.path,I))});const A=[...a.collections??[]].sort((I,_)=>_.path.length-I.path.length).map(I=>{const _=a.buildUrlCollectionPath(I.alias??I.path);return n.jsx(be.Route,{path:_+"/*",element:n.jsx(qo,{path:_,title:I.name,type:"collection",children:n.jsx(St,{isSubCollection:!1,parentPathSegments:[],fullPath:I.alias??I.path,...I,Actions:Yo(I.Actions)},`collection_view_${I.alias??I.path}`)})},`navigation_${I.alias??I.path}`)}),y=n.jsx(be.Route,{path:"/",element:n.jsx(qo,{path:a.homeUrl,title:"Home",type:"home",children:n.jsx(t,{})},"navigation_home")}),h=n.jsx(be.Route,{path:"*",element:n.jsx(aa,{})});return n.jsxs(be.Routes,{location:s,children:[A,d,y,h,c]})}),ha=(e,t)=>n.jsx(be.Route,{path:e,element:n.jsx(qo,{path:e,title:t.name,type:"view",children:t.view},`navigation_${e}`)},"navigation_view_"+e),qo=f.memo(function({children:t,title:c,path:i,type:a}){const l=Dr();return f.useEffect(()=>{l.set({breadcrumbs:[{title:c,url:i}]})},[i,c]),n.jsx(n.Fragment,{children:t})},de);function CH(e){return e}function SH(e){return e}function BH(e){return e}function EH(e){return e}function FH(e){return e}function PH(e){return e}function DH(e){return e}function NH(e){return e}function TH(e){return e}function MH(){const e=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)"),c=(localStorage.getItem("prefers-dark-mode")!=null?localStorage.getItem("prefers-dark-mode")==="true":null)??e,[i,a]=f.useState(c?"dark":"light");f.useEffect(()=>{a(c?"dark":"light"),d(c?"dark":"light")},[c]);const l=f.useCallback(()=>{a("dark"),d("dark")},[e]),s=f.useCallback(()=>{a("light"),d("light")},[]),d=A=>{document.body.style.setProperty("color-scheme",A),document.documentElement.dataset.theme=A},u=f.useCallback(()=>{i==="light"?(e?localStorage.removeItem("prefers-dark-mode"):localStorage.setItem("prefers-dark-mode","true"),l()):(e?localStorage.setItem("prefers-dark-mode","false"):localStorage.removeItem("prefers-dark-mode"),s())},[i,e]);return{mode:i,setMode:a,toggleMode:u}}function OH(){const[e,t]=f.useState({}),c=f.useCallback(g=>{const b=localStorage.getItem(g);return b?JSON.parse(b):{}},[]),i=f.useCallback(g=>{const b=`collection_config::${ot(g)}`;return e[b]?e[b]:c(b)},[e,c]),a=f.useCallback((g,b)=>{const p=`collection_config::${ot(g)}`;localStorage.setItem(p,JSON.stringify(b)),t(w=>{const k=w[p],v=qe(k??c(g),b);return qe(w,v)})},[c]),[l,s]=f.useState([]),[d,u]=f.useState([]),[A,y]=f.useState([]);f.useEffect(()=>{s(localStorage.getItem("recently_visited_paths")?JSON.parse(localStorage.getItem("recently_visited_paths")):[]),u(localStorage.getItem("favourite_paths")?JSON.parse(localStorage.getItem("favourite_paths")):[]),y(localStorage.getItem("collapsed_groups")?JSON.parse(localStorage.getItem("collapsed_groups")):[])},[]);const h=f.useCallback(g=>{localStorage.setItem("recently_visited_paths",JSON.stringify(g)),s(g)},[]),I=f.useCallback(g=>{localStorage.setItem("favourite_paths",JSON.stringify(g)),u(g)},[]),_=f.useCallback(g=>{localStorage.setItem("collapsed_groups",JSON.stringify(g)),y(g)},[]);return{onCollectionModified:a,getCollectionConfig:i,recentlyVisitedPaths:l,setRecentlyVisitedPaths:h,favouritePaths:d,setFavouritePaths:I,collapsedGroups:A,setCollapsedGroups:_}}const LH=({children:e})=>n.jsx(Gt.SnackbarProvider,{maxSnack:3,autoHideDuration:3500,children:e}),QH=({ref:e})=>{const[t,c]=f.useState(!1),[i,a]=f.useState(!1);return f.useEffect(()=>{e.current&&(e.current.onfocus=()=>{c(!0),a(!0)},e.current.onblur=()=>{a(!1)})},[e]),{inputFocused:i,autoCompleteOpen:t,setAutoCompleteOpen:c}};function VH({children:e,open:t,setOpen:c}){const i=f.useRef(null);return Do(i,()=>c(!1)),n.jsx(To,{in:t,duration:50,className:E("absolute top-full left-0 right-0 overflow-visible",t?"shadow":"","my-2","z-20","w-full"),children:n.jsx("div",{ref:i,className:E(t?Ge:"","bg-gray-50 dark:bg-gray-900 py-2"),children:e})})}function WH({children:e,onClick:t}){return n.jsx("div",{className:"flex w-full items-center pr-6 pl-14 h-[48px] cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800",onClick:t,children:e})}const GH=e=>{switch(e){case"error":return"bg-red-50 dark:bg-red-800 dark:text-red-100 text-red-900";case"warning":return"bg-amber-50 dark:bg-amber-800 dark:text-amber-100 text-amber-900";case"info":return"bg-blue-50 dark:bg-blue-800 dark:text-blue-100 text-blue-900";case"success":return"bg-emerald-50 dark:bg-emerald-800 dark:text-emerald-100 text-emerald-900";default:return"bg-blue-50 dark:bg-blue-800 dark:text-blue-100 text-blue-900"}},zH=({children:e,onDismiss:t,color:c="info",action:i,className:a,style:l})=>{const s=GH(c);return n.jsxs("div",{style:l,className:E("px-4 py-2 rounded-md flex items-center gap-2",s,a),children:[n.jsx("span",{className:"flex-grow",children:e}),t&&n.jsx("button",{className:"text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-400",onClick:t,children:"×"}),i]})},HH=({src:e,alt:t,children:c,className:i,...a},l)=>n.jsx("button",{ref:l,...a,className:E("rounded-full flex items-center justify-center overflow-hidden",he,"p-1 hover:bg-gray-200 hover:dark:bg-gray-700",i),children:e?n.jsx("img",{className:"object-cover rounded-full w-10 h-10 bg-gray-100 dark:bg-gray-800",src:e,alt:t}):n.jsx("span",{className:"py-1.5 text-lg font-medium text-gray-900 dark:text-white rounded-full w-10 h-10 bg-gray-100 dark:bg-gray-800",children:c})}),Mt=f.forwardRef(HH);function ga({children:e,style:t,onClick:c,className:i}){const a=f.useCallback(l=>{(l.key==="Enter"||l.key===" ")&&c?.()},[c]);return n.jsx("div",{onKeyPress:a,role:c?"button":void 0,tabIndex:c?0:void 0,onClick:c,className:E(Rt,c&&he,c&&ec,i),style:t,children:e})}const UH={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},YH=({children:e,className:t,style:c,maxWidth:i="7xl"},a)=>{const l=i?UH[i]:"";return n.jsx("div",{ref:a,className:E("mx-auto px-3 md:px-4 lg-px-6",l,t),style:c,children:e})},Ot=f.forwardRef(YH);function Lt({children:e,maxWidth:t,fullScreen:c=!1,className:i}){return n.jsx("div",{className:"flex flex-col flex-grow h-full",children:n.jsx(Ot,{className:E("m-auto",i),maxWidth:t,children:e})})}function Gn({size:e="medium",className:t}){let c="";e==="small"?c="w-4 h-4 m-1":e==="medium"?c="w-8 h-8 m-1":c="w-10 h-10 m-1";let i="";return e==="small"?i="border-[3px]":e==="medium"?i="border-4":i="border-[6px]",n.jsx("div",{className:E(c,i,"inline-block animate-spin rounded-full border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]","text-blue-600 dark:text-blue-400",t),role:"status",children:n.jsx("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}const $H={xs:"max-w-xs min-w-xs w-xs",sm:"max-w-sm min-w-sm w-sm",md:"max-w-md min-w-md w-md",lg:"max-w-lg min-w-lg w-lg",xl:"max-w-xl min-w-xl w-xl","2xl":"max-w-2xl min-w-2xl w-2xl","3xl":"max-w-3xl min-w-3xl w-3xl","4xl":"max-w-4xl min-w-4xl w-4xl","5xl":"max-w-5xl min-w-5xl w-5xl","6xl":"max-w-6xl min-w-6xl w-6xl","7xl":"max-w-7xl min-w-7xl w-7xl",full:"max-w-full min-w-full w-full"},Jo=({open:e,onOpenChange:t,children:c,className:i,fullWidth:a=!0,fullHeight:l,fullScreen:s,scrollable:d=!0,maxWidth:u="lg"})=>{const[A,y]=f.useState(!1);return f.useEffect(()=>{if(e)return y(!0),()=>{};{const h=setTimeout(()=>{y(!1)},250);return()=>clearTimeout(h)}},[e]),n.jsx(Ye.Root,{open:A||e,onOpenChange:t,children:n.jsx(Ye.Portal,{children:n.jsxs("div",{className:"fixed inset-0 z-40",children:[n.jsx(Ye.Overlay,{className:E("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 bg-black bg-opacity-50 dark:bg-opacity-60 backdrop-blur-sm ",A&&e?"opacity-100":"opacity-0","z-20 fixed top-0 left-0 w-full h-full flex justify-center items-center"),style:{pointerEvents:A?"auto":"none"}}),n.jsx(Ye.Content,{className:E("h-full outline-none flex justify-center items-center z-50 opacity-100 transition-all duration-200 ease-in-out"),children:n.jsx("div",{className:E(Ge,"z-30","relative","outline-none focus:outline-none",a&&!s?"w-11/12":void 0,l&&!s?"h-full":void 0,"text-gray-900 dark:text-white","justify-center items-center",s?"h-screen w-screen":"max-h-[90vh] shadow-xl","ease-in-out duration-200",d&&"overflow-y-auto",A&&e?"opacity-100":"opacity-0",u&&!s?$H[u]:void 0,i),children:c})})]})})})};function kn({children:e,position:t="sticky",translucent:c=!0,className:i}){return n.jsx("div",{className:E(ue,"py-3 px-4 border-t flex flex-row items-center justify-end bottom-0 right-0 left-0 text-right z-2 gap-2",t,"bg-white bg-opacity-60 dark:bg-gray-900 dark:bg-opacity-60",c?"backdrop-blur-sm":"",i),children:e})}function Zo({children:e,className:t,fullHeight:c}){return c?n.jsx("div",{className:"flex-grow flex flex-col h-full relative",children:e}):n.jsx("div",{className:E("py-6 px-6 h-full flex-grow",t),children:e})}function jH({accept:e,onFilesAdded:t,onFilesRejected:c,maxSize:i,disabled:a,maxFiles:l,title:s,uploadDescription:d="Drag and drop a file here or click",children:u,preventDropOnDocument:A=!0,size:y}){const{getRootProps:h,getInputProps:I,isDragActive:_,isDragAccept:g,isDragReject:b}=Ro.useDropzone({accept:e,noDragEventsBubbling:!0,maxSize:i,onDrop:t,onDropRejected:c,disabled:a,maxFiles:l,preventDropOnDocument:A});return n.jsxs("div",{...h(),className:E(Je,We,he,"flex gap-2","p-4 box-border relative items-center border-2 border-solid border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",{"h-44":y==="medium","h-28":y==="small","cursor-pointer":!a,"hover:bg-field-hover dark:hover:bg-field-hover-dark":!_,"transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-red-500":b,"transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-green-500":g}),children:[n.jsx(j,{variant:"caption",color:"secondary",className:"absolute top-2 left-3.5 cursor-inherit",children:s}),n.jsx("input",{...I()}),u,n.jsx("div",{className:"flex-grow h-28 box-border flex flex-col items-center justify-center text-center",children:n.jsx(j,{align:"center",variant:"label",children:d})})]})}function Ia({children:e,loading:t,disabled:c,onClick:i,startIcon:a,...l}){return n.jsxs(te,{disabled:t||c,onClick:i,component:l.component,...l,children:[t&&n.jsx(Gn,{size:"small"}),!t&&a,e]})}function qH({children:e,style:t,className:c}){return n.jsx("div",{className:E(Ge,c),style:t,children:e})}function Xe({inputRef:e,open:t,name:c,id:i,onOpenChange:a,value:l,onChange:s,onValueChange:d,onMultiValueChange:u,className:A,inputClassName:y,placeholder:h,renderValue:I,renderValues:_,label:g,size:b="medium",includeFocusOutline:p=!0,error:w,disabled:k,padding:v=!0,position:K="item-aligned",endAdornment:m,multiple:C,invisible:B,children:P,...F}){const[D,S]=f.useState(!1);f.useEffect(()=>{S(t??!1)},[t]);const T=f.useCallback(N=>{C?Array.isArray(l)&&l.includes(N)?u?.(l.filter(q=>q!==N)):u?.([...l??[],N]):d?.(N),!C&&s&&s({target:{name:c,value:N}})},[C,s,l,u,d]);return n.jsxs($e.Root,{name:c,value:Array.isArray(l)?void 0:l,defaultOpen:t,open:D,disabled:k,onValueChange:T,onOpenChange:N=>{a?.(N),S(N)},...F,children:[typeof g=="string"?n.jsx(ii,{error:w,children:g}):g,n.jsxs("div",{className:E(b==="small"?"min-h-[42px]":"min-h-[64px]","select-none rounded-md text-sm",B?Ar:Je,k?Re:We,"relative flex items-center",A),children:[n.jsxs($e.Trigger,{ref:e,id:i,className:E("w-full h-full",b==="small"?"h-[42px]":"h-[64px]",v?"px-4 ":"","outlin e-none focus:outline-none","select-none rounded-md text-sm",w?"text-red-500 dark:text-red-600":"focus:text-text-primary dark:focus:text-text-primary-dark",w?"border border-red-500 dark:border-red-600":"",k?"text-gray-600 dark:text-gray-400":"text-gray-800 dark:text-gray-200","relative flex items-center",p?he:"",y),children:[n.jsx($e.Value,{asChild:!0,children:n.jsxs("div",{className:E("flex-grow w-full max-w-full flex flex-row gap-2 items-center","overflow-visible",b==="small"?"h-[42px]":"h-[64px]"),children:[I&&(l&&Array.isArray(l)?l.map((N,q)=>n.jsx("div",{className:"flex items-center gap-1 max-w-full",children:I?I(N,q):N},N)):typeof l=="string"?I?I(l,0):l:h),_&&(!l||Array.isArray(l))?_(l??[]):null,!I&&!_&&l]})}),n.jsx($e.Icon,{className:E("px-2 h-full flex items-center"),children:n.jsx(oo,{size:"small",className:E("transition",t?"rotate-180":"")})})]}),m&&n.jsx("div",{className:E("absolute h-full flex items-center",b==="small"?"right-10":"right-14"),onClick:N=>N.stopPropagation(),children:m})]}),n.jsx($e.Portal,{children:n.jsx($e.Content,{position:K,className:"z-50 overflow-hidden relative border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-800 p-2 rounded-lg shadow-lg",children:n.jsx($e.Viewport,{children:P})})})]})}function xe({value:e,children:t,disabled:c,className:i}){return n.jsxs($e.Item,{value:e,disabled:c,onClick:a=>{a.preventDefault(),a.stopPropagation()},className:E("w-full","relative relative flex items-center p-2 rounded-md text-sm text-gray-700 dark:text-gray-300",he,"focus:z-10","data-[state=checked]:bg-gray-100 data-[state=checked]:dark:bg-gray-900 focus:bg-gray-100 dark:focus:bg-gray-950","data-[state=checked]:focus:bg-gray-200 data-[state=checked]:dark:focus:bg-gray-950",c?"opacity-50 cursor-not-allowed":"cursor-pointer","[&>*]:w-full","overflow-visible",i),children:[n.jsx($e.ItemText,{children:t}),n.jsx("div",{className:"absolute left-1 data-[state=checked]:block hidden",children:n.jsx(lc,{size:16})})]},e)}function JH({label:e,children:t,className:c}){return n.jsxs(n.Fragment,{children:[n.jsx($e.Group,{className:E("text-xs text-gray-900 dark:text-gray-100 uppercase tracking-wider font-bold mt-6 first:mt-2","px-2 py-2",c),children:e}),t]})}function Qt({onTextSearch:e,placeholder:t="Search",expandable:c=!1,large:i=!1,className:a,autoFocus:l}){const[s,d]=f.useState(""),[u,A]=f.useState(!1),y=f.useDeferredValue(s);f.useEffect(()=>{e(y||void 0)},[y]);const h=f.useCallback(()=>{d(""),e(void 0)},[]);return n.jsxs("div",{className:E("relative",i?"h-14":"h-[42px]","bg-gray-50 dark:bg-gray-800 transition duration-150 ease-in-out border",ue,"rounded"),children:[n.jsx("div",{className:"absolute p-0 px-4 h-full absolute pointer-events-none flex items-center justify-center top-0",children:n.jsx(rc,{className:"text-gray-500"})}),n.jsx("input",{placeholder:t,value:s,onChange:I=>{d(I.target.value)},autoFocus:l,onFocus:()=>A(!0),onBlur:()=>A(!1),className:E("relative flex items-center rounded transition-all bg-transparent outline-none appearance-none border-none","pl-12 h-full text-current ",c?u?"w-[220px]":"w-[180px]":"",he,a)}),s?n.jsx(R,{className:`${i?"mr-2 top-1":"mr-1 top-0"} absolute right-0 z-10`,onClick:h,children:n.jsx(cn,{size:"small"})}):n.jsx("div",{style:{width:26}})]})}const Vt=({children:e,side:t="right",open:c,onOpenChange:i,transparent:a,...l})=>{const[s,d]=f.useState(!1);f.useEffect(()=>{if(c)return d(!0),()=>{};{const A=setTimeout(()=>{d(!1)},250);return()=>clearTimeout(A)}},[c]);const u={top:"-translate-y-full",bottom:"translate-y-full",left:"-translate-x-full",right:"translate-x-full"};return n.jsx(Ye.Root,{open:s||c,onOpenChange:i,children:n.jsxs(Ye.Portal,{children:[n.jsx(Ye.Overlay,{className:E("fixed inset-0 transition-opacity z-20 ease-in-out duration-200 backdrop-blur-sm",a?"bg-white bg-opacity-80":"bg-black bg-opacity-50","dark:bg-black dark:bg-opacity-60",s&&c?"opacity-100":"opacity-0"),style:{pointerEvents:s?"auto":"none"}}),n.jsx(Ye.Content,{...l,className:E("text-gray-900 dark:text-white","fixed transform z-20 transition-all duration-[240ms] ease-in-out","outline-none focus:outline-none",a?"":"shadow-md",t==="top"||t==="bottom"?"w-full":"h-full",t==="left"||t==="top"?"left-0 top-0":"right-0 bottom-0",s&&c?"opacity-100":"opacity-0",!s||!c?u[t]:""),children:e})]})})};function ZH(){return n.jsxs("div",{role:"status",children:[n.jsxs("svg",{"aria-hidden":"true",className:"w-8 h-8 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-primary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),n.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),n.jsx("span",{className:"sr-only",children:"Loading..."})]})}function un({value:e,onChange:t,label:c,type:i="text",multiline:a=!1,invisible:l,rows:s,disabled:d,error:u,endAdornment:A,autoFocus:y,placeholder:h,size:I="medium",className:_,style:g,inputClassName:b,inputStyle:p,inputRef:w,...k}){const v=w??f.useRef(null),[K,m]=f.useState(document.activeElement===v.current),C=e!=null&&e!=="",B=f.useCallback(F=>{F.target.blur(),F.stopPropagation(),setTimeout(()=>{F.target.focus()},0)},[]),P=a?n.jsx(gt,{...k,ref:v,placeholder:h,autoFocus:y,rows:s,value:e??"",onChange:t,style:p,className:E(l?ur:he,"rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-[28px]",d&&"border border-transparent outline-none opacity-50 text-gray-600 dark:text-gray-500")}):n.jsx("input",{...k,ref:v,onWheel:i==="number"?B:void 0,disabled:d,style:p,className:E("w-full outline-none bg-transparent leading-normal px-3","rounded-md",l?ur:he,d?Re:We,I==="small"?"min-h-[48px]":"min-h-[64px]",c?I==="medium"?"pt-[28px] pb-2":"pt-4 pb-2":"py-2",K?"text-text-primary dark:text-text-primary-dark":"",A?"pr-10":"pr-3",b,d&&"border border-transparent outline-none opacity-50 dark:opacity-50 text-gray-800 dark:text-gray-200"),placeholder:h,autoFocus:y,onFocus:()=>m(!0),onBlur:()=>m(!1),type:i,value:Number.isNaN(e)?"":e??"",onChange:t});return n.jsxs("div",{className:E("rounded-md relative max-w-full",l?Ar:Je,d?Re:We,u?"border border-red-500 dark:border-red-600":"",{"min-h-[48px]":!l&&I==="small","min-h-[64px]":!l&&I==="medium"},_),style:g,children:[c&&n.jsx(mt,{className:E("pointer-events-none absolute",I==="medium"?"top-1":"-top-1",u?"text-red-500 dark:text-red-600":K?"text-primary":"text-text-secondary dark:text-text-secondary-dark",d?"opacity-50":""),shrink:C||K,children:c}),P,A&&n.jsx("div",{className:"flex absolute right-0 top-3 mr-3 ",children:A})]})}function ba({value:e,onValueChange:t,className:c,children:i}){return n.jsx(nr.Root,{value:e,onValueChange:t,children:n.jsx(nr.List,{className:E("flex text-sm font-medium text-center text-gray-800 dark:text-gray-200",c),children:i})})}function Xo({value:e,className:t,children:c,disabled:i}){return n.jsx(nr.Trigger,{value:e,disabled:i,className:E(he,"border-b-2 border-transparent","data-[state=active]:border-secondary",i?"text-gray-400 dark:text-gray-500":E("text-gray-700 dark:text-gray-300","data-[state=active]:text-gray-900 data-[state=active]:dark:text-gray-100","hover:text-gray-800 dark:hover:text-gray-200"),t),children:n.jsx("div",{className:E("uppercase inline-block p-2 px-4 m-2 rounded","hover:bg-gray-100 dark:hover:bg-gray-800"),children:c})})}const XH=({children:e,className:t,style:c})=>n.jsx("table",{className:E("w-full text-left text-gray-800 dark:text-gray-200 rounded-md overflow-x-auto",t),style:c,children:e}),xH=({children:e,className:t})=>n.jsx("tbody",{className:E("bg-white text-sm dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700",t),children:e}),RH=({children:e,className:t})=>n.jsx("thead",{children:n.jsx("tr",{className:E(ue,"text-sm font-medium text-gray-700 dark:text-gray-300","bg-gray-50 border-b dark:bg-gray-900",t),children:e})}),eU=({children:e,className:t,onClick:c,style:i})=>n.jsx("tr",{onClick:c,style:i,className:E("divide-gray-100 dark:divide-gray-800","bg-white dark:bg-gray-950",c?"hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer":"",t),children:e}),nU=({children:e,header:t=!1,scope:c="",align:i,className:a,style:l,colspan:s})=>{const d=f.useRef(null),u=t||oU(d.current)==="TableHeader"?"th":"td";return n.jsx(u,{scope:c,colSpan:s,ref:d,style:l,className:E("px-4 py-3 text-clip ",i==="center"?"text-center":i==="right"?"text-right":"text-left",a),children:e})};function oU(e){if(e){const t=Object.keys(e).find(l=>l.startsWith("__reactFiber$")||l.startsWith("__reactInternalInstance$")),c=e[t],i=l=>{let s=l.return;for(;typeof s.type=="string";)s=s.return;return s};let a=i(c);return a=i(a),a?.elementType?.name}}o.AbcIcon=ls,o.AcUnitIcon=ss,o.AccessAlarmIcon=ds,o.AccessAlarmsIcon=us,o.AccessTimeFilledIcon=As,o.AccessTimeIcon=fs,o.AccessibilityIcon=_s,o.AccessibilityNewIcon=ys,o.AccessibleForwardIcon=gs,o.AccessibleIcon=hs,o.AccountBalanceIcon=Is,o.AccountBalanceWalletIcon=bs,o.AccountBoxIcon=ps,o.AccountCircleIcon=ws,o.AccountTreeIcon=ks,o.AdUnitsIcon=ms,o.AdbIcon=vs,o.AddAPhotoIcon=Ks,o.AddAlarmIcon=Cs,o.AddAlertIcon=Ss,o.AddBoxIcon=Bs,o.AddBusinessIcon=Es,o.AddCardIcon=Fs,o.AddChartIcon=Ps,o.AddCircleIcon=Ds,o.AddCircleOutlineIcon=Ns,o.AddCommentIcon=Ts,o.AddHomeIcon=Ms,o.AddHomeWorkIcon=Os,o.AddIcCallIcon=Ls,o.AddIcon=gn,o.AddLinkIcon=tc,o.AddLocationAltIcon=Vs,o.AddLocationIcon=Qs,o.AddModeratorIcon=Ws,o.AddPhotoAlternateIcon=Gs,o.AddReactionIcon=zs,o.AddRoadIcon=Hs,o.AddShoppingCartIcon=Us,o.AddTaskIcon=Ys,o.AddToDriveIcon=$s,o.AddToHomeScreenIcon=js,o.AddToPhotosIcon=qs,o.AddToQueueIcon=Js,o.AdfScannerIcon=Zs,o.AdjustIcon=Xs,o.AdminPanelSettingsIcon=xs,o.AdsClickIcon=Rs,o.AgricultureIcon=ed,o.AirIcon=nd,o.AirlineSeatFlatAngledIcon=rd,o.AirlineSeatFlatIcon=od,o.AirlineSeatIndividualSuiteIcon=td,o.AirlineSeatLegroomExtraIcon=cd,o.AirlineSeatLegroomNormalIcon=id,o.AirlineSeatLegroomReducedIcon=ad,o.AirlineSeatReclineExtraIcon=ld,o.AirlineSeatReclineNormalIcon=sd,o.AirlineStopsIcon=dd,o.AirlinesIcon=ud,o.AirplaneTicketIcon=fd,o.AirplanemodeActiveIcon=Ad,o.AirplanemodeInactiveIcon=_d,o.AirplayIcon=yd,o.AirportShuttleIcon=hd,o.AlarmAddIcon=Id,o.AlarmIcon=gd,o.AlarmOffIcon=bd,o.AlarmOnIcon=pd,o.AlbumIcon=wd,o.Alert=zH,o.AlignHorizontalCenterIcon=kd,o.AlignHorizontalLeftIcon=md,o.AlignHorizontalRightIcon=vd,o.AlignVerticalBottomIcon=Kd,o.AlignVerticalCenterIcon=Cd,o.AlignVerticalTopIcon=Sd,o.AllInboxIcon=Bd,o.AllInclusiveIcon=Ed,o.AllOutIcon=Fd,o.AltRouteIcon=Pd,o.AlternateEmailIcon=Dd,o.AnalyticsIcon=Nd,o.AnchorIcon=Td,o.AndroidIcon=Md,o.AnimationIcon=Od,o.AnnouncementIcon=Ld,o.AodIcon=Qd,o.ApartmentIcon=Vd,o.ApiIcon=Wd,o.AppBlockingIcon=Gd,o.AppRegistrationIcon=zd,o.AppSettingsAltIcon=Hd,o.AppShortcutIcon=Ud,o.ApprovalIcon=Yd,o.AppsIcon=$d,o.AppsOutageIcon=jd,o.ArchitectureIcon=qd,o.ArchiveIcon=Jd,o.AreaChartIcon=Zd,o.ArrayContainer=Pt,o.ArrayContainerItem=Dt,o.ArrayCustomShapedFieldBinding=vi,o.ArrayEnumPreview=Qr,o.ArrayItemOptions=da,o.ArrayOfMapsPreview=Jc,o.ArrayOfReferencesFieldBinding=li,o.ArrayOfReferencesPreview=Xc,o.ArrayOfStorageComponentsPreview=xc,o.ArrayOfStringsPreview=Rc,o.ArrayOneOfPreview=ei,o.ArrayPropertyEnumPreview=Vr,o.ArrayPropertyPreview=Lr,o.ArrowBackIcon=Xd,o.ArrowBackIosIcon=xd,o.ArrowBackIosNewIcon=Rd,o.ArrowCircleDownIcon=eu,o.ArrowCircleLeftIcon=nu,o.ArrowCircleRightIcon=ou,o.ArrowCircleUpIcon=ru,o.ArrowDownwardIcon=tu,o.ArrowDropDownCircleIcon=cu,o.ArrowDropDownIcon=yr,o.ArrowDropUpIcon=iu,o.ArrowForwardIcon=cc,o.ArrowForwardIosIcon=au,o.ArrowLeftIcon=lu,o.ArrowOutwardIcon=su,o.ArrowRightAltIcon=uu,o.ArrowRightIcon=du,o.ArrowUpwardIcon=So,o.ArtTrackIcon=fu,o.ArticleIcon=Au,o.AspectRatioIcon=_u,o.AssessmentIcon=yu,o.AssignmentIcon=ic,o.AssignmentIndIcon=hu,o.AssignmentLateIcon=gu,o.AssignmentReturnIcon=Iu,o.AssignmentReturnedIcon=bu,o.AssignmentTurnedInIcon=pu,o.AssistWalkerIcon=wu,o.AssistantDirectionIcon=mu,o.AssistantIcon=ku,o.AssistantPhotoIcon=vu,o.AssuredWorkloadIcon=Ku,o.AsyncPreviewComponent=$G,o.AtmIcon=Cu,o.AttachEmailIcon=Su,o.AttachFileIcon=Bu,o.AttachMoneyIcon=Eu,o.AttachmentIcon=Fu,o.AttractionsIcon=Pu,o.AttributionIcon=Du,o.AudioFileIcon=Nu,o.AudiotrackIcon=Tu,o.AuthControllerContext=Cr,o.AutoAwesomeIcon=Mu,o.AutoAwesomeMosaicIcon=Ou,o.AutoAwesomeMotionIcon=Lu,o.AutoDeleteIcon=Qu,o.AutoFixHighIcon=Vu,o.AutoFixNormalIcon=Wu,o.AutoFixOffIcon=Gu,o.AutoGraphIcon=zu,o.AutoModeIcon=Hu,o.AutoStoriesIcon=Uu,o.Autocomplete=VH,o.AutocompleteItem=WH,o.AutofpsSelectIcon=Yu,o.AutorenewIcon=$u,o.AvTimerIcon=ju,o.Avatar=Mt,o.BabyChangingStationIcon=qu,o.BackHandIcon=Ju,o.BackpackIcon=Zu,o.BackspaceIcon=Xu,o.BackupIcon=xu,o.BackupTableIcon=Ru,o.BadgeIcon=ef,o.BakeryDiningIcon=nf,o.BalanceIcon=of,o.BalconyIcon=rf,o.BallotIcon=hr,o.BarChartIcon=tf,o.BatchPredictionIcon=cf,o.BathroomIcon=af,o.BathtubIcon=lf,o.Battery0BarIcon=sf,o.Battery1BarIcon=df,o.Battery2BarIcon=uf,o.Battery3BarIcon=ff,o.Battery4BarIcon=Af,o.Battery5BarIcon=_f,o.Battery6BarIcon=yf,o.BatteryAlertIcon=hf,o.BatteryChargingFullIcon=gf,o.BatteryFullIcon=If,o.BatterySaverIcon=bf,o.BatteryStdIcon=pf,o.BatteryUnknownIcon=wf,o.BeachAccessIcon=kf,o.BedIcon=mf,o.BedroomBabyIcon=vf,o.BedroomChildIcon=Kf,o.BedroomParentIcon=Cf,o.BedtimeIcon=Sf,o.BedtimeOffIcon=Bf,o.BeenhereIcon=Ef,o.BentoIcon=Ff,o.BikeScooterIcon=Pf,o.BiotechIcon=Df,o.BlenderIcon=Nf,o.BlindIcon=Tf,o.BlindsClosedIcon=Of,o.BlindsIcon=Mf,o.BlockFieldBinding=ki,o.BlockIcon=Lf,o.BloodtypeIcon=Qf,o.BluetoothAudioIcon=Wf,o.BluetoothConnectedIcon=Gf,o.BluetoothDisabledIcon=zf,o.BluetoothDriveIcon=Hf,o.BluetoothIcon=Vf,o.BluetoothSearchingIcon=Uf,o.BlurCircularIcon=Yf,o.BlurLinearIcon=$f,o.BlurOffIcon=jf,o.BlurOnIcon=qf,o.BoltIcon=Jf,o.BookIcon=Zf,o.BookOnlineIcon=Xf,o.BookmarkAddIcon=Rf,o.BookmarkAddedIcon=eA,o.BookmarkBorderIcon=nA,o.BookmarkIcon=xf,o.BookmarkRemoveIcon=oA,o.BookmarksIcon=rA,o.BooleanPreview=ti,o.BooleanSwitch=Zr,o.BooleanSwitchWithLabel=On,o.BorderAllIcon=tA,o.BorderBottomIcon=cA,o.BorderClearIcon=iA,o.BorderColorIcon=aA,o.BorderHorizontalIcon=lA,o.BorderInnerIcon=sA,o.BorderLeftIcon=dA,o.BorderOuterIcon=uA,o.BorderRightIcon=fA,o.BorderStyleIcon=AA,o.BorderTopIcon=_A,o.BorderVerticalIcon=yA,o.BoyIcon=hA,o.BrandingWatermarkIcon=gA,o.BreadcrumbUpdater=R3,o.BreakfastDiningIcon=IA,o.Brightness1Icon=bA,o.Brightness2Icon=pA,o.Brightness3Icon=wA,o.Brightness4Icon=kA,o.Brightness5Icon=mA,o.Brightness6Icon=vA,o.Brightness7Icon=KA,o.BrightnessAutoIcon=CA,o.BrightnessHighIcon=SA,o.BrightnessLowIcon=BA,o.BrightnessMediumIcon=EA,o.BroadcastOnHomeIcon=FA,o.BroadcastOnPersonalIcon=PA,o.BrokenImageIcon=DA,o.BrowseGalleryIcon=NA,o.BrowserNotSupportedIcon=TA,o.BrowserUpdatedIcon=MA,o.BrunchDiningIcon=OA,o.BrushIcon=LA,o.BubbleChartIcon=QA,o.BugReportIcon=VA,o.BuildCircleIcon=GA,o.BuildIcon=WA,o.BungalowIcon=zA,o.BurstModeIcon=HA,o.BusAlertIcon=UA,o.BusinessCenterIcon=$A,o.BusinessIcon=YA,o.Button=te,o.COLLECTION_PATH_SEPARATOR=Ei,o.CabinIcon=jA,o.CableIcon=qA,o.CachedIcon=JA,o.CakeIcon=ZA,o.CalculateIcon=XA,o.CalendarMonthIcon=ac,o.CalendarTodayIcon=xA,o.CalendarViewDayIcon=RA,o.CalendarViewMonthIcon=e_,o.CalendarViewWeekIcon=n_,o.CallEndIcon=r_,o.CallIcon=o_,o.CallMadeIcon=t_,o.CallMergeIcon=c_,o.CallMissedIcon=i_,o.CallMissedOutgoingIcon=a_,o.CallReceivedIcon=l_,o.CallSplitIcon=s_,o.CallToActionIcon=d_,o.CameraAltIcon=f_,o.CameraEnhanceIcon=A_,o.CameraFrontIcon=__,o.CameraIcon=u_,o.CameraIndoorIcon=y_,o.CameraOutdoorIcon=h_,o.CameraRearIcon=g_,o.CameraRollIcon=I_,o.CameraswitchIcon=b_,o.CampaignIcon=p_,o.CancelIcon=w_,o.CancelPresentationIcon=k_,o.CancelScheduleSendIcon=m_,o.CandlestickChartIcon=v_,o.CarCrashIcon=K_,o.CarRentalIcon=C_,o.CarRepairIcon=S_,o.Card=ga,o.CardGiftcardIcon=B_,o.CardMembershipIcon=E_,o.CardTravelIcon=F_,o.CarpenterIcon=P_,o.CasesIcon=D_,o.CasinoIcon=N_,o.CastConnectedIcon=M_,o.CastForEducationIcon=O_,o.CastIcon=T_,o.CastleIcon=L_,o.CatchingPokemonIcon=Q_,o.CategoryIcon=V_,o.CelebrationIcon=W_,o.CellTowerIcon=G_,o.CellWifiIcon=z_,o.CenterFocusStrongIcon=H_,o.CenterFocusWeakIcon=U_,o.CenteredView=Lt,o.ChairAltIcon=$_,o.ChairIcon=Y_,o.ChaletIcon=j_,o.ChangeCircleIcon=q_,o.ChangeHistoryIcon=J_,o.ChargingStationIcon=Z_,o.ChatBubbleIcon=x_,o.ChatBubbleOutlineIcon=R_,o.ChatIcon=X_,o.CheckBoxIcon=ey,o.CheckBoxOutlineBlankIcon=ny,o.CheckCircleIcon=oy,o.CheckCircleOutlineIcon=ry,o.CheckIcon=lc,o.Checkbox=Gr,o.ChecklistIcon=ty,o.ChecklistRtlIcon=cy,o.CheckroomIcon=iy,o.ChevronLeftIcon=sc,o.ChevronRightIcon=ay,o.ChildCareIcon=ly,o.ChildFriendlyIcon=sy,o.Chip=Fo,o.ChromeReaderModeIcon=dy,o.ChurchIcon=uy,o.CircleIcon=gr,o.CircleNotificationsIcon=fy,o.CircularProgress=Gn,o.CircularProgressCenter=fo,o.ClassIcon=Ay,o.CleanHandsIcon=_y,o.CleaningServicesIcon=yy,o.ClearAllIcon=hy,o.ClearIcon=cn,o.CloseFullscreenIcon=gy,o.CloseIcon=Ir,o.ClosedCaptionDisabledIcon=by,o.ClosedCaptionIcon=Iy,o.ClosedCaptionOffIcon=py,o.CloudCircleIcon=ky,o.CloudDoneIcon=my,o.CloudDownloadIcon=vy,o.CloudIcon=wy,o.CloudOffIcon=Ky,o.CloudQueueIcon=Cy,o.CloudSyncIcon=Sy,o.CloudUploadIcon=By,o.Co2Icon=Ey,o.CoPresentIcon=Fy,o.CodeIcon=Py,o.CodeOffIcon=Dy,o.CoffeeIcon=Ny,o.CoffeeMakerIcon=Ty,o.Collapse=To,o.CollectionsBookmarkIcon=Oy,o.CollectionsIcon=My,o.ColorLensIcon=Ly,o.ColorizeIcon=Qy,o.CommentBankIcon=Wy,o.CommentIcon=Vy,o.CommentsDisabledIcon=Gy,o.CommitIcon=zy,o.CommuteIcon=Hy,o.CompareArrowsIcon=Yy,o.CompareIcon=Uy,o.CompassCalibrationIcon=$y,o.CompostIcon=jy,o.CompressIcon=qy,o.ComputerIcon=Jy,o.ConfirmationNumberIcon=Zy,o.ConnectWithoutContactIcon=Xy,o.ConnectedTvIcon=xy,o.ConnectingAirportsIcon=Ry,o.ConstructionIcon=eh,o.ContactEmergencyIcon=nh,o.ContactMailIcon=oh,o.ContactPageIcon=rh,o.ContactPhoneIcon=th,o.ContactSupportIcon=ch,o.ContactlessIcon=ih,o.ContactsIcon=ah,o.Container=Ot,o.ContentCopyIcon=no,o.ContentCutIcon=lh,o.ContentPasteGoIcon=dh,o.ContentPasteIcon=sh,o.ContentPasteOffIcon=uh,o.ContentPasteSearchIcon=fh,o.ContrastIcon=Ah,o.ControlCameraIcon=_h,o.ControlPointDuplicateIcon=hh,o.ControlPointIcon=yh,o.CookieIcon=gh,o.CopyAllIcon=Ih,o.CopyrightIcon=bh,o.CoronavirusIcon=ph,o.CorporateFareIcon=wh,o.CottageIcon=kh,o.CountertopsIcon=mh,o.CreateIcon=vh,o.CreateNewFolderIcon=Kh,o.CreditCardIcon=Ch,o.CreditCardOffIcon=Sh,o.CreditScoreIcon=Bh,o.CribIcon=Eh,o.CrisisAlertIcon=Fh,o.Crop169Icon=Dh,o.Crop32Icon=Nh,o.Crop54Icon=Th,o.Crop75Icon=Mh,o.CropDinIcon=Oh,o.CropFreeIcon=Lh,o.CropIcon=Ph,o.CropLandscapeIcon=Qh,o.CropOriginalIcon=Vh,o.CropPortraitIcon=Wh,o.CropRotateIcon=Gh,o.CropSquareIcon=zh,o.CrueltyFreeIcon=Hh,o.CssIcon=Uh,o.CurrencyBitcoinIcon=Yh,o.CurrencyExchangeIcon=$h,o.CurrencyFrancIcon=jh,o.CurrencyLiraIcon=qh,o.CurrencyPoundIcon=Jh,o.CurrencyRubleIcon=Zh,o.CurrencyRupeeIcon=Xh,o.CurrencyYenIcon=xh,o.CurrencyYuanIcon=Rh,o.CurtainsClosedIcon=ng,o.CurtainsIcon=eg,o.CycloneIcon=og,o.DEFAULT_FIELD_CONFIGS=lt,o.DangerousIcon=rg,o.DarkModeIcon=dc,o.DashboardCustomizeIcon=cg,o.DashboardIcon=tg,o.DataArrayIcon=ig,o.DataExplorationIcon=ag,o.DataObjectIcon=lg,o.DataSaverOffIcon=sg,o.DataSaverOnIcon=dg,o.DataThresholdingIcon=ug,o.DataUsageIcon=fg,o.DatasetIcon=Ag,o.DatasetLinkedIcon=_g,o.DatePreview=ri,o.DateRangeIcon=yg,o.DateTimeField=Vn,o.DateTimeFieldBinding=gi,o.DeblurIcon=hg,o.DebouncedTextField=nl,o.DeckIcon=gg,o.DefaultHomePage=ia,o.DehazeIcon=Ig,o.DeleteConfirmationDialog=eH,o.DeleteForeverIcon=bg,o.DeleteIcon=Bo,o.DeleteOutlineIcon=pg,o.DeleteSweepIcon=wg,o.DeliveryDiningIcon=kg,o.DensityLargeIcon=mg,o.DensityMediumIcon=vg,o.DensitySmallIcon=Kg,o.DepartureBoardIcon=Cg,o.DescriptionIcon=uc,o.DeselectIcon=Sg,o.DesignServicesIcon=Bg,o.DeskIcon=Eg,o.DesktopAccessDisabledIcon=Fg,o.DesktopMacIcon=Pg,o.DesktopWindowsIcon=Dg,o.DetailsIcon=Ng,o.DeveloperBoardIcon=Tg,o.DeveloperBoardOffIcon=Mg,o.DeveloperModeIcon=Og,o.DeviceHubIcon=Lg,o.DeviceThermostatIcon=Qg,o.DeviceUnknownIcon=Vg,o.DevicesFoldIcon=Gg,o.DevicesIcon=Wg,o.DevicesOtherIcon=zg,o.DialerSipIcon=Hg,o.Dialog=Jo,o.DialogActions=kn,o.DialogContent=Zo,o.DialpadIcon=Ug,o.DiamondIcon=Yg,o.DifferenceIcon=$g,o.DiningIcon=jg,o.DinnerDiningIcon=qg,o.DirectionsBikeIcon=Zg,o.DirectionsBoatFilledIcon=xg,o.DirectionsBoatIcon=Xg,o.DirectionsBusFilledIcon=eI,o.DirectionsBusIcon=Rg,o.DirectionsCarFilledIcon=oI,o.DirectionsCarIcon=nI,o.DirectionsIcon=Jg,o.DirectionsOffIcon=rI,o.DirectionsRailwayFilledIcon=cI,o.DirectionsRailwayIcon=tI,o.DirectionsRunIcon=iI,o.DirectionsSubwayFilledIcon=lI,o.DirectionsSubwayIcon=aI,o.DirectionsTransitFilledIcon=dI,o.DirectionsTransitIcon=sI,o.DirectionsWalkIcon=uI,o.DirtyLensIcon=fI,o.DisabledByDefaultIcon=AI,o.DisabledVisibleIcon=_I,o.DiscFullIcon=yI,o.DiscountIcon=hI,o.DisplaySettingsIcon=gI,o.Diversity1Icon=II,o.Diversity2Icon=bI,o.Diversity3Icon=pI,o.DnsIcon=wI,o.DoDisturbAltIcon=mI,o.DoDisturbIcon=kI,o.DoDisturbOffIcon=vI,o.DoDisturbOnIcon=KI,o.DoNotDisturbAltIcon=SI,o.DoNotDisturbIcon=CI,o.DoNotDisturbOffIcon=BI,o.DoNotDisturbOnIcon=EI,o.DoNotDisturbOnTotalSilenceIcon=FI,o.DoNotStepIcon=PI,o.DoNotTouchIcon=DI,o.DockIcon=NI,o.DocumentScannerIcon=TI,o.DomainAddIcon=OI,o.DomainDisabledIcon=LI,o.DomainIcon=MI,o.DomainVerificationIcon=QI,o.DoneAllIcon=WI,o.DoneIcon=VI,o.DoneOutlineIcon=GI,o.DonutLargeIcon=zI,o.DonutSmallIcon=HI,o.DoorBackIcon=UI,o.DoorFrontIcon=YI,o.DoorSlidingIcon=$I,o.DoorbellIcon=jI,o.DoubleArrowIcon=qI,o.DownhillSkiingIcon=JI,o.DownloadDoneIcon=XI,o.DownloadForOfflineIcon=xI,o.DownloadIcon=ZI,o.DownloadingIcon=RI,o.DraftsIcon=eb,o.DragHandleIcon=nb,o.DragIndicatorIcon=ob,o.DrawIcon=rb,o.Drawer=ya,o.DrawerNavigationItem=Tt,o.DriveEtaIcon=tb,o.DriveFileMoveIcon=cb,o.DriveFileMoveRtlIcon=ib,o.DriveFileRenameOutlineIcon=ab,o.DriveFolderUploadIcon=fc,o.DryCleaningIcon=sb,o.DryIcon=lb,o.DuoIcon=db,o.DvrIcon=ub,o.DynamicFeedIcon=fb,o.DynamicFormIcon=Ab,o.EMobiledataIcon=_b,o.EarbudsBatteryIcon=hb,o.EarbudsIcon=yb,o.EastIcon=gb,o.EdgesensorHighIcon=Ib,o.EdgesensorLowIcon=bb,o.EditAttributesIcon=pb,o.EditCalendarIcon=wb,o.EditIcon=Ac,o.EditLocationAltIcon=mb,o.EditLocationIcon=kb,o.EditNoteIcon=vb,o.EditNotificationsIcon=Kb,o.EditOffIcon=Cb,o.EditRoadIcon=Sb,o.EggAltIcon=Eb,o.EggIcon=Bb,o.EjectIcon=Fb,o.ElderlyIcon=Pb,o.ElderlyWomanIcon=Db,o.ElectricBikeIcon=Nb,o.ElectricBoltIcon=Tb,o.ElectricCarIcon=Mb,o.ElectricMeterIcon=Ob,o.ElectricMopedIcon=Lb,o.ElectricRickshawIcon=Qb,o.ElectricScooterIcon=Vb,o.ElectricalServicesIcon=Wb,o.ElevatorIcon=Gb,o.EmailIcon=_c,o.EmergencyIcon=zb,o.EmergencyRecordingIcon=Hb,o.EmergencyShareIcon=Ub,o.EmojiEmotionsIcon=Yb,o.EmojiEventsIcon=$b,o.EmojiFoodBeverageIcon=jb,o.EmojiNatureIcon=qb,o.EmojiObjectsIcon=Jb,o.EmojiPeopleIcon=Zb,o.EmojiSymbolsIcon=Xb,o.EmojiTransportationIcon=xb,o.EmptyValue=Fn,o.EnergySavingsLeafIcon=Rb,o.EngineeringIcon=ep,o.EnhancedEncryptionIcon=np,o.EntityCollectionTable=Kt,o.EntityCollectionView=St,o.EntityForm=Si,o.EntityPreview=yt,o.EntityReference=je,o.EnumValuesChip=Ee,o.EqualizerIcon=op,o.ErrorBoundary=ie,o.ErrorIcon=br,o.ErrorOutlineIcon=yc,o.ErrorView=we,o.EscalatorIcon=rp,o.EscalatorWarningIcon=tp,o.EuroIcon=cp,o.EuroSymbolIcon=ip,o.EvStationIcon=ap,o.EventAvailableIcon=sp,o.EventBusyIcon=dp,o.EventIcon=lp,o.EventNoteIcon=up,o.EventRepeatIcon=fp,o.EventSeatIcon=Ap,o.ExitToAppIcon=_p,o.ExpandCircleDownIcon=hp,o.ExpandIcon=yp,o.ExpandLessIcon=gp,o.ExpandMoreIcon=oo,o.ExpandablePanel=dn,o.ExplicitIcon=Ip,o.ExploreIcon=bp,o.ExploreOffIcon=pp,o.ExposureIcon=wp,o.ExposureNeg1Icon=kp,o.ExposureNeg2Icon=mp,o.ExposurePlus1Icon=vp,o.ExposurePlus2Icon=Kp,o.ExposureZeroIcon=Cp,o.ExtensionIcon=Sp,o.ExtensionOffIcon=Bp,o.Face2Icon=Fp,o.Face3Icon=Pp,o.Face4Icon=Dp,o.Face5Icon=Np,o.Face6Icon=Tp,o.FaceIcon=Ep,o.FaceRetouchingNaturalIcon=Mp,o.FaceRetouchingOffIcon=Op,o.FactCheckIcon=Lp,o.FactoryIcon=Qp,o.FamilyRestroomIcon=Vp,o.FastForwardIcon=Wp,o.FastRewindIcon=Gp,o.FastfoodIcon=zp,o.FavoriteBorderIcon=Up,o.FavoriteIcon=Hp,o.FaxIcon=Yp,o.FeaturedPlayListIcon=$p,o.FeaturedVideoIcon=jp,o.FeedIcon=qp,o.FeedbackIcon=Jp,o.FemaleIcon=Zp,o.FenceIcon=Xp,o.FestivalIcon=xp,o.FiberDvrIcon=Rp,o.FiberManualRecordIcon=ew,o.FiberNewIcon=nw,o.FiberPinIcon=ow,o.FiberSmartRecordIcon=rw,o.FieldConfigBadge=x3,o.FieldHelperText=Se,o.FileCopyIcon=hc,o.FileDownloadDoneIcon=cw,o.FileDownloadIcon=tw,o.FileDownloadOffIcon=iw,o.FileOpenIcon=aw,o.FilePresentIcon=lw,o.FileUpload=jH,o.FileUploadIcon=sw,o.Filter1Icon=uw,o.Filter2Icon=fw,o.Filter3Icon=Aw,o.Filter4Icon=_w,o.Filter5Icon=yw,o.Filter6Icon=hw,o.Filter7Icon=gw,o.Filter8Icon=Iw,o.Filter9Icon=bw,o.Filter9PlusIcon=pw,o.FilterAltIcon=ww,o.FilterAltOffIcon=kw,o.FilterBAndWIcon=mw,o.FilterCenterFocusIcon=vw,o.FilterDramaIcon=Kw,o.FilterFramesIcon=Cw,o.FilterHdrIcon=Sw,o.FilterIcon=dw,o.FilterListIcon=Bw,o.FilterListOffIcon=gc,o.FilterNoneIcon=Ew,o.FilterTiltShiftIcon=Fw,o.FilterVintageIcon=Pw,o.FindInPageIcon=Dw,o.FindReplaceIcon=Nw,o.FingerprintIcon=Tw,o.FireCMS=bH,o.FireCMSAppBar=sa,o.FireCMSContextInstance=Sr,o.FireCMSLogo=la,o.FireExtinguisherIcon=Mw,o.FireHydrantAltIcon=Ow,o.FireTruckIcon=Lw,o.FireplaceIcon=Qw,o.FirstPageIcon=Vw,o.FitScreenIcon=Ww,o.FitbitIcon=Gw,o.FitnessCenterIcon=zw,o.FlagCircleIcon=Hw,o.FlagIcon=Ic,o.FlakyIcon=Uw,o.FlareIcon=Yw,o.FlashAutoIcon=$w,o.FlashOffIcon=jw,o.FlashOnIcon=qw,o.FlashlightOffIcon=Jw,o.FlashlightOnIcon=Zw,o.FlatwareIcon=Xw,o.FlightClassIcon=Rw,o.FlightIcon=xw,o.FlightLandIcon=ek,o.FlightTakeoffIcon=nk,o.FlipCameraAndroidIcon=rk,o.FlipCameraIosIcon=tk,o.FlipIcon=ok,o.FlipToBackIcon=ck,o.FlipToFrontIcon=ik,o.FloodIcon=ak,o.FluorescentIcon=lk,o.FlutterDashIcon=sk,o.FmdBadIcon=dk,o.FmdGoodIcon=uk,o.FolderCopyIcon=Ak,o.FolderDeleteIcon=_k,o.FolderIcon=fk,o.FolderOffIcon=yk,o.FolderOpenIcon=hk,o.FolderSharedIcon=gk,o.FolderSpecialIcon=Ik,o.FolderZipIcon=bk,o.FollowTheSignsIcon=pk,o.FontDownloadIcon=wk,o.FontDownloadOffIcon=kk,o.FoodBankIcon=mk,o.ForestIcon=vk,o.ForkLeftIcon=Kk,o.ForkRightIcon=Ck,o.FormatAlignCenterIcon=Sk,o.FormatAlignJustifyIcon=Bk,o.FormatAlignLeftIcon=Ek,o.FormatAlignRightIcon=Fk,o.FormatBoldIcon=Pk,o.FormatClearIcon=Dk,o.FormatColorFillIcon=Nk,o.FormatColorResetIcon=Tk,o.FormatColorTextIcon=Mk,o.FormatIndentDecreaseIcon=Ok,o.FormatIndentIncreaseIcon=Lk,o.FormatItalicIcon=Qk,o.FormatLineSpacingIcon=Vk,o.FormatListBulletedIcon=Wk,o.FormatListNumberedIcon=pr,o.FormatListNumberedRtlIcon=Gk,o.FormatOverlineIcon=zk,o.FormatPaintIcon=Hk,o.FormatQuoteIcon=bc,o.FormatShapesIcon=Uk,o.FormatSizeIcon=Yk,o.FormatStrikethroughIcon=$k,o.FormatTextdirectionLToRIcon=jk,o.FormatTextdirectionRToLIcon=qk,o.FormatUnderlinedIcon=Jk,o.FormikArrayContainer=Co,o.FortIcon=Zk,o.ForumIcon=Xk,o.Forward10Icon=Rk,o.Forward30Icon=em,o.Forward5Icon=nm,o.ForwardIcon=xk,o.ForwardToInboxIcon=om,o.FoundationIcon=rm,o.FreeBreakfastIcon=tm,o.FreeCancellationIcon=cm,o.FrontHandIcon=im,o.FullscreenExitIcon=lm,o.FullscreenIcon=am,o.FunctionsIcon=pc,o.GMobiledataIcon=sm,o.GTranslateIcon=dm,o.GamepadIcon=um,o.GamesIcon=fm,o.GarageIcon=Am,o.GasMeterIcon=_m,o.GavelIcon=ym,o.GeneratingTokensIcon=hm,o.GeoPoint=tr,o.GestureIcon=gm,o.GetAppIcon=Im,o.GifBoxIcon=pm,o.GifIcon=bm,o.GirlIcon=wm,o.GitHubIcon=tl,o.GiteIcon=km,o.GolfCourseIcon=mm,o.GppBadIcon=vm,o.GppGoodIcon=Km,o.GppMaybeIcon=Cm,o.GpsFixedIcon=Sm,o.GpsNotFixedIcon=Bm,o.GpsOffIcon=Em,o.GradeIcon=Fm,o.GradientIcon=Pm,o.GradingIcon=Dm,o.GrainIcon=Nm,o.GraphicEqIcon=Tm,o.GrassIcon=Mm,o.Grid3x3Icon=Om,o.Grid4x4Icon=Lm,o.GridGoldenratioIcon=Qm,o.GridOffIcon=Vm,o.GridOnIcon=Wm,o.GridViewIcon=Gm,o.GroupAddIcon=Hm,o.GroupIcon=zm,o.GroupOffIcon=Um,o.GroupRemoveIcon=Ym,o.GroupWorkIcon=$m,o.Groups2Icon=qm,o.Groups3Icon=Jm,o.GroupsIcon=jm,o.HMobiledataIcon=Zm,o.HPlusMobiledataIcon=Xm,o.HailIcon=xm,o.HandshakeIcon=Rm,o.HandymanIcon=ev,o.HardwareIcon=nv,o.HdIcon=ov,o.HdrAutoIcon=rv,o.HdrAutoSelectIcon=tv,o.HdrEnhancedSelectIcon=cv,o.HdrOffIcon=iv,o.HdrOffSelectIcon=av,o.HdrOnIcon=lv,o.HdrOnSelectIcon=sv,o.HdrPlusIcon=dv,o.HdrStrongIcon=uv,o.HdrWeakIcon=fv,o.HeadphonesBatteryIcon=_v,o.HeadphonesIcon=Av,o.HeadsetIcon=yv,o.HeadsetMicIcon=hv,o.HeadsetOffIcon=gv,o.HealingIcon=Iv,o.HealthAndSafetyIcon=bv,o.HearingDisabledIcon=wv,o.HearingIcon=pv,o.HeartBrokenIcon=kv,o.HeatPumpIcon=mv,o.HeightIcon=vv,o.HelpCenterIcon=Cv,o.HelpIcon=Kv,o.HelpOutlineIcon=Sv,o.HevcIcon=Bv,o.HexagonIcon=Ev,o.HideImageIcon=Fv,o.HideSourceIcon=Pv,o.HighQualityIcon=Dv,o.HighlightAltIcon=Tv,o.HighlightIcon=Nv,o.HighlightOffIcon=Mv,o.HikingIcon=Ov,o.HistoryEduIcon=Qv,o.HistoryIcon=Lv,o.HistoryToggleOffIcon=Vv,o.HiveIcon=Wv,o.HlsIcon=Gv,o.HlsOffIcon=zv,o.HolidayVillageIcon=Hv,o.HomeIcon=Uv,o.HomeMaxIcon=Yv,o.HomeMiniIcon=$v,o.HomeRepairServiceIcon=jv,o.HomeWorkIcon=qv,o.HorizontalDistributeIcon=Jv,o.HorizontalRuleIcon=Zv,o.HorizontalSplitIcon=Xv,o.HotTubIcon=xv,o.HotelClassIcon=e0,o.HotelIcon=Rv,o.HourglassBottomIcon=n0,o.HourglassDisabledIcon=o0,o.HourglassEmptyIcon=r0,o.HourglassFullIcon=t0,o.HourglassTopIcon=c0,o.HouseIcon=i0,o.HouseSidingIcon=a0,o.HouseboatIcon=l0,o.HowToRegIcon=s0,o.HowToVoteIcon=d0,o.HtmlIcon=u0,o.HttpIcon=wc,o.HttpsIcon=f0,o.HubIcon=A0,o.HvacIcon=_0,o.IceSkatingIcon=y0,o.IcecreamIcon=h0,o.Icon=r,o.IconButton=R,o.ImageAspectRatioIcon=I0,o.ImageIcon=g0,o.ImageNotSupportedIcon=b0,o.ImagePreview=Yc,o.ImageSearchIcon=p0,o.ImagesearchRollerIcon=w0,o.ImportContactsIcon=k0,o.ImportExportIcon=m0,o.ImportantDevicesIcon=v0,o.InboxIcon=K0,o.IncompleteCircleIcon=C0,o.IndeterminateCheckBoxIcon=S0,o.InfoIcon=kc,o.InfoLabel=oH,o.InputIcon=B0,o.InputLabel=mt,o.InsertChartIcon=E0,o.InsertChartOutlinedIcon=F0,o.InsertCommentIcon=P0,o.InsertDriveFileIcon=D0,o.InsertEmoticonIcon=N0,o.InsertInvitationIcon=T0,o.InsertLinkIcon=M0,o.InsertPageBreakIcon=O0,o.InsertPhotoIcon=L0,o.InsightsIcon=Q0,o.InstallDesktopIcon=V0,o.InstallMobileIcon=W0,o.IntegrationInstructionsIcon=G0,o.InterestsIcon=z0,o.InterpreterModeIcon=H0,o.Inventory2Icon=Y0,o.InventoryIcon=U0,o.InvertColorsIcon=$0,o.InvertColorsOffIcon=j0,o.IosShareIcon=q0,o.IronIcon=J0,o.IsoIcon=Z0,o.JavascriptIcon=X0,o.JoinFullIcon=x0,o.JoinInnerIcon=R0,o.JoinLeftIcon=eK,o.JoinRightIcon=nK,o.KayakingIcon=oK,o.KebabDiningIcon=rK,o.KeyIcon=tK,o.KeyOffIcon=cK,o.KeyValueFieldBinding=pi,o.KeyValuePreview=Wr,o.KeyboardAltIcon=aK,o.KeyboardArrowDownIcon=lK,o.KeyboardArrowLeftIcon=sK,o.KeyboardArrowRightIcon=dK,o.KeyboardArrowUpIcon=uK,o.KeyboardBackspaceIcon=fK,o.KeyboardCapslockIcon=AK,o.KeyboardCommandKeyIcon=_K,o.KeyboardControlKeyIcon=yK,o.KeyboardDoubleArrowDownIcon=hK,o.KeyboardDoubleArrowLeftIcon=gK,o.KeyboardDoubleArrowRightIcon=IK,o.KeyboardDoubleArrowUpIcon=bK,o.KeyboardHideIcon=pK,o.KeyboardIcon=iK,o.KeyboardOptionKeyIcon=wK,o.KeyboardReturnIcon=kK,o.KeyboardTabIcon=Eo,o.KeyboardVoiceIcon=mK,o.KingBedIcon=vK,o.KitchenIcon=KK,o.KitesurfingIcon=CK,o.LabelIcon=SK,o.LabelImportantIcon=BK,o.LabelOffIcon=EK,o.LabelWithIcon=Ce,o.LanIcon=FK,o.LandscapeIcon=PK,o.LandslideIcon=DK,o.LanguageIcon=NK,o.LaptopChromebookIcon=MK,o.LaptopIcon=TK,o.LaptopMacIcon=OK,o.LaptopWindowsIcon=LK,o.LastPageIcon=QK,o.LaunchIcon=VK,o.LayersClearIcon=GK,o.LayersIcon=WK,o.LeaderboardIcon=zK,o.LeakAddIcon=HK,o.LeakRemoveIcon=UK,o.LegendToggleIcon=YK,o.LensBlurIcon=jK,o.LensIcon=$K,o.LibraryAddCheckIcon=JK,o.LibraryAddIcon=qK,o.LibraryBooksIcon=ZK,o.LibraryMusicIcon=XK,o.LightIcon=xK,o.LightModeIcon=mc,o.LightbulbCircleIcon=eC,o.LightbulbIcon=RK,o.LineAxisIcon=nC,o.LineStyleIcon=oC,o.LineWeightIcon=rC,o.LinearScaleIcon=tC,o.LinkIcon=vc,o.LinkOffIcon=cC,o.LinkedCameraIcon=iC,o.LiquorIcon=aC,o.ListAltIcon=Cc,o.ListIcon=Kc,o.LiveHelpIcon=lC,o.LiveTvIcon=sC,o.LivingIcon=dC,o.LoadingButton=Ia,o.LocalActivityIcon=uC,o.LocalAirportIcon=fC,o.LocalAtmIcon=AC,o.LocalBarIcon=_C,o.LocalCafeIcon=yC,o.LocalCarWashIcon=hC,o.LocalConvenienceStoreIcon=gC,o.LocalDiningIcon=IC,o.LocalDrinkIcon=bC,o.LocalFireDepartmentIcon=pC,o.LocalFloristIcon=wC,o.LocalGasStationIcon=kC,o.LocalGroceryStoreIcon=mC,o.LocalHospitalIcon=vC,o.LocalHotelIcon=KC,o.LocalLaundryServiceIcon=CC,o.LocalLibraryIcon=SC,o.LocalMallIcon=BC,o.LocalMoviesIcon=EC,o.LocalOfferIcon=FC,o.LocalParkingIcon=PC,o.LocalPharmacyIcon=DC,o.LocalPhoneIcon=NC,o.LocalPizzaIcon=TC,o.LocalPlayIcon=MC,o.LocalPoliceIcon=OC,o.LocalPostOfficeIcon=LC,o.LocalPrintshopIcon=QC,o.LocalSeeIcon=VC,o.LocalShippingIcon=WC,o.LocalTaxiIcon=GC,o.LocationCityIcon=zC,o.LocationDisabledIcon=HC,o.LocationOffIcon=UC,o.LocationOnIcon=YC,o.LocationSearchingIcon=$C,o.LockClockIcon=qC,o.LockIcon=jC,o.LockOpenIcon=JC,o.LockPersonIcon=ZC,o.LockResetIcon=XC,o.LoginIcon=xC,o.LogoDevIcon=RC,o.LogoutIcon=Sc,o.Looks3Icon=nS,o.Looks4Icon=oS,o.Looks5Icon=rS,o.Looks6Icon=tS,o.LooksIcon=eS,o.LooksOneIcon=cS,o.LooksTwoIcon=iS,o.LoopIcon=aS,o.LoupeIcon=lS,o.LowPriorityIcon=sS,o.LoyaltyIcon=dS,o.LteMobiledataIcon=uS,o.LtePlusMobiledataIcon=fS,o.LuggageIcon=AS,o.LunchDiningIcon=_S,o.LyricsIcon=yS,o.MacroOffIcon=hS,o.MailIcon=gS,o.MailLockIcon=IS,o.MailOutlineIcon=bS,o.MaleIcon=pS,o.Man2Icon=kS,o.Man3Icon=mS,o.Man4Icon=vS,o.ManIcon=wS,o.ManageAccountsIcon=KS,o.ManageHistoryIcon=CS,o.ManageSearchIcon=SS,o.MapFieldBinding=bi,o.MapIcon=BS,o.MapPropertyPreview=ni,o.MapsHomeWorkIcon=ES,o.MapsUgcIcon=FS,o.MarginIcon=PS,o.MarkAsUnreadIcon=DS,o.MarkChatReadIcon=NS,o.MarkChatUnreadIcon=TS,o.MarkEmailReadIcon=MS,o.MarkEmailUnreadIcon=OS,o.MarkUnreadChatAltIcon=LS,o.Markdown=lo,o.MarkdownFieldBinding=mi,o.MarkunreadIcon=QS,o.MarkunreadMailboxIcon=VS,o.MasksIcon=WS,o.MaximizeIcon=GS,o.MediaBluetoothOffIcon=zS,o.MediaBluetoothOnIcon=HS,o.MediationIcon=US,o.MedicalInformationIcon=YS,o.MedicalServicesIcon=$S,o.MedicationIcon=jS,o.MedicationLiquidIcon=qS,o.MeetingRoomIcon=JS,o.MemoryIcon=ZS,o.Menu=Qn,o.MenuBookIcon=XS,o.MenuIcon=wr,o.MenuItem=me,o.MenuOpenIcon=xS,o.MergeIcon=RS,o.MergeTypeIcon=eB,o.MessageIcon=nB,o.MicExternalOffIcon=rB,o.MicExternalOnIcon=tB,o.MicIcon=oB,o.MicNoneIcon=cB,o.MicOffIcon=iB,o.MicrowaveIcon=aB,o.MilitaryTechIcon=lB,o.MinimizeIcon=sB,o.MinorCrashIcon=dB,o.MiscellaneousServicesIcon=uB,o.MissedVideoCallIcon=fB,o.MmsIcon=AB,o.MobileFriendlyIcon=_B,o.MobileOffIcon=yB,o.MobileScreenShareIcon=hB,o.MobiledataOffIcon=gB,o.ModeCommentIcon=bB,o.ModeControllerProvider=Ha,o.ModeEditIcon=pB,o.ModeEditOutlineIcon=wB,o.ModeFanOffIcon=kB,o.ModeIcon=IB,o.ModeNightIcon=mB,o.ModeOfTravelIcon=vB,o.ModeStandbyIcon=KB,o.ModelTrainingIcon=CB,o.MonetizationOnIcon=SB,o.MoneyIcon=BB,o.MoneyOffCsredIcon=FB,o.MoneyOffIcon=EB,o.MonitorHeartIcon=DB,o.MonitorIcon=PB,o.MonitorWeightIcon=NB,o.MonochromePhotosIcon=TB,o.MoodBadIcon=OB,o.MoodIcon=MB,o.MopedIcon=LB,o.MoreHorizIcon=VB,o.MoreIcon=QB,o.MoreTimeIcon=WB,o.MoreVertIcon=kr,o.MosqueIcon=GB,o.MotionPhotosAutoIcon=zB,o.MotionPhotosOffIcon=HB,o.MotionPhotosOnIcon=UB,o.MotionPhotosPauseIcon=YB,o.MotionPhotosPausedIcon=$B,o.MouseIcon=jB,o.MoveDownIcon=qB,o.MoveToInboxIcon=JB,o.MoveUpIcon=ZB,o.MovieCreationIcon=xB,o.MovieFilterIcon=RB,o.MovieIcon=XB,o.MovingIcon=eE,o.MpIcon=nE,o.MultiSelect=Ur,o.MultiSelectBinding=$r,o.MultiSelectContext=Hr,o.MultiSelectItem=Yr,o.MultilineChartIcon=oE,o.MultipleStopIcon=rE,o.MuseumIcon=tE,o.MusicNoteIcon=cE,o.MusicOffIcon=iE,o.MusicVideoIcon=aE,o.MyLocationIcon=lE,o.NatIcon=sE,o.NatureIcon=dE,o.NaturePeopleIcon=uE,o.NavigateBeforeIcon=fE,o.NavigateNextIcon=AE,o.NavigationCollectionCard=ca,o.NavigationGroup=Et,o.NavigationIcon=_E,o.NavigationRoutes=KH,o.NearMeDisabledIcon=hE,o.NearMeIcon=yE,o.NearbyErrorIcon=gE,o.NearbyOffIcon=IE,o.NestCamWiredStandIcon=bE,o.NetworkCellIcon=pE,o.NetworkCheckIcon=wE,o.NetworkLockedIcon=kE,o.NetworkPingIcon=mE,o.NetworkWifi1BarIcon=KE,o.NetworkWifi2BarIcon=CE,o.NetworkWifi3BarIcon=SE,o.NetworkWifiIcon=vE,o.NewLabelIcon=BE,o.NewReleasesIcon=EE,o.NewspaperIcon=FE,o.NextPlanIcon=PE,o.NextWeekIcon=DE,o.NfcIcon=NE,o.NightShelterIcon=TE,o.NightlifeIcon=ME,o.NightlightIcon=OE,o.NightlightRoundIcon=LE,o.NightsStayIcon=QE,o.NoAccountsIcon=VE,o.NoAdultContentIcon=WE,o.NoBackpackIcon=GE,o.NoCellIcon=zE,o.NoCrashIcon=HE,o.NoDrinksIcon=UE,o.NoEncryptionGmailerrorredIcon=$E,o.NoEncryptionIcon=YE,o.NoFlashIcon=jE,o.NoFoodIcon=qE,o.NoLuggageIcon=JE,o.NoMealsIcon=ZE,o.NoMeetingRoomIcon=XE,o.NoPhotographyIcon=xE,o.NoSimIcon=RE,o.NoStrollerIcon=eF,o.NoTransferIcon=nF,o.NoiseAwareIcon=oF,o.NoiseControlOffIcon=rF,o.NordicWalkingIcon=tF,o.NorthEastIcon=iF,o.NorthIcon=cF,o.NorthWestIcon=aF,o.NotAccessibleIcon=lF,o.NotFoundPage=aa,o.NotInterestedIcon=sF,o.NotListedLocationIcon=dF,o.NotStartedIcon=uF,o.NoteAddIcon=AF,o.NoteAltIcon=_F,o.NoteIcon=fF,o.NotesIcon=yF,o.NotificationAddIcon=hF,o.NotificationImportantIcon=gF,o.NotificationsActiveIcon=bF,o.NotificationsIcon=IF,o.NotificationsNoneIcon=pF,o.NotificationsOffIcon=wF,o.NotificationsPausedIcon=kF,o.NumberPropertyPreview=ci,o.NumbersIcon=Bc,o.OfflineBoltIcon=mF,o.OfflinePinIcon=vF,o.OfflineShareIcon=KF,o.OilBarrelIcon=CF,o.OnDeviceTrainingIcon=SF,o.OndemandVideoIcon=BF,o.OnlinePredictionIcon=EF,o.OpacityIcon=FF,o.OpenInBrowserIcon=PF,o.OpenInFullIcon=DF,o.OpenInNewIcon=ro,o.OpenInNewOffIcon=NF,o.OpenWithIcon=TF,o.OtherHousesIcon=MF,o.OutboundIcon=OF,o.OutboxIcon=LF,o.OutdoorGrillIcon=QF,o.OutletIcon=VF,o.OutlinedFlagIcon=WF,o.OutputIcon=GF,o.PaddingIcon=zF,o.PagesIcon=HF,o.PageviewIcon=UF,o.PaidIcon=YF,o.PaletteIcon=$F,o.PanToolAltIcon=qF,o.PanToolIcon=jF,o.PanoramaFishEyeIcon=ZF,o.PanoramaHorizontalIcon=XF,o.PanoramaHorizontalSelectIcon=xF,o.PanoramaIcon=JF,o.PanoramaPhotosphereIcon=RF,o.PanoramaPhotosphereSelectIcon=eP,o.PanoramaVerticalIcon=nP,o.PanoramaVerticalSelectIcon=oP,o.PanoramaWideAngleIcon=rP,o.PanoramaWideAngleSelectIcon=tP,o.Paper=qH,o.ParaglidingIcon=cP,o.ParkIcon=iP,o.PartyModeIcon=aP,o.PasswordIcon=lP,o.PatternIcon=sP,o.PauseCircleFilledIcon=fP,o.PauseCircleIcon=uP,o.PauseCircleOutlineIcon=AP,o.PauseIcon=dP,o.PausePresentationIcon=_P,o.PaymentIcon=yP,o.PaymentsIcon=hP,o.PedalBikeIcon=gP,o.PendingActionsIcon=bP,o.PendingIcon=IP,o.PentagonIcon=pP,o.PeopleAltIcon=kP,o.PeopleIcon=wP,o.PeopleOutlineIcon=mP,o.PercentIcon=vP,o.PermCameraMicIcon=KP,o.PermContactCalendarIcon=CP,o.PermDataSettingIcon=SP,o.PermDeviceInformationIcon=BP,o.PermIdentityIcon=EP,o.PermMediaIcon=FP,o.PermPhoneMsgIcon=PP,o.PermScanWifiIcon=DP,o.Person2Icon=TP,o.Person3Icon=MP,o.Person4Icon=OP,o.PersonAddAlt1Icon=VP,o.PersonAddAltIcon=QP,o.PersonAddDisabledIcon=WP,o.PersonAddIcon=LP,o.PersonIcon=NP,o.PersonOffIcon=GP,o.PersonOutlineIcon=zP,o.PersonPinCircleIcon=UP,o.PersonPinIcon=HP,o.PersonRemoveAlt1Icon=$P,o.PersonRemoveIcon=YP,o.PersonSearchIcon=jP,o.PersonalInjuryIcon=qP,o.PersonalVideoIcon=JP,o.PestControlIcon=ZP,o.PestControlRodentIcon=XP,o.PetsIcon=xP,o.PhishingIcon=RP,o.PhoneAndroidIcon=n1,o.PhoneBluetoothSpeakerIcon=o1,o.PhoneCallbackIcon=r1,o.PhoneDisabledIcon=t1,o.PhoneEnabledIcon=c1,o.PhoneForwardedIcon=i1,o.PhoneIcon=e1,o.PhoneIphoneIcon=a1,o.PhoneLockedIcon=l1,o.PhoneMissedIcon=s1,o.PhonePausedIcon=d1,o.PhonelinkEraseIcon=f1,o.PhonelinkIcon=u1,o.PhonelinkLockIcon=A1,o.PhonelinkOffIcon=_1,o.PhonelinkRingIcon=y1,o.PhonelinkSetupIcon=h1,o.PhotoAlbumIcon=I1,o.PhotoCameraBackIcon=p1,o.PhotoCameraFrontIcon=w1,o.PhotoCameraIcon=b1,o.PhotoFilterIcon=k1,o.PhotoIcon=g1,o.PhotoLibraryIcon=m1,o.PhotoSizeSelectActualIcon=v1,o.PhotoSizeSelectLargeIcon=K1,o.PhotoSizeSelectSmallIcon=C1,o.PhpIcon=S1,o.PianoIcon=B1,o.PianoOffIcon=E1,o.PictureAsPdfIcon=F1,o.PictureInPictureAltIcon=D1,o.PictureInPictureIcon=P1,o.PieChartIcon=N1,o.PieChartOutlineIcon=T1,o.PinDropIcon=O1,o.PinEndIcon=L1,o.PinIcon=M1,o.PinInvokeIcon=Q1,o.PinchIcon=V1,o.PivotTableChartIcon=W1,o.PixIcon=G1,o.PlaceIcon=z1,o.PlagiarismIcon=H1,o.PlayArrowIcon=U1,o.PlayCircleFilledIcon=$1,o.PlayCircleIcon=Y1,o.PlayCircleOutlineIcon=j1,o.PlayDisabledIcon=q1,o.PlayForWorkIcon=J1,o.PlayLessonIcon=Z1,o.PlaylistAddCheckCircleIcon=R1,o.PlaylistAddCheckIcon=x1,o.PlaylistAddCircleIcon=eD,o.PlaylistAddIcon=X1,o.PlaylistPlayIcon=nD,o.PlaylistRemoveIcon=oD,o.PlumbingIcon=rD,o.PlusOneIcon=tD,o.PodcastsIcon=cD,o.PointOfSaleIcon=iD,o.PolicyIcon=aD,o.PollIcon=lD,o.PolylineIcon=sD,o.PolymerIcon=dD,o.PoolIcon=uD,o.PortableWifiOffIcon=fD,o.PortraitIcon=AD,o.PostAddIcon=_D,o.PowerIcon=yD,o.PowerInputIcon=hD,o.PowerOffIcon=gD,o.PowerSettingsNewIcon=ID,o.PrecisionManufacturingIcon=bD,o.PregnantWomanIcon=pD,o.PresentToAllIcon=wD,o.PreviewIcon=kD,o.PriceChangeIcon=mD,o.PriceCheckIcon=vD,o.PrintDisabledIcon=CD,o.PrintIcon=KD,o.PriorityHighIcon=SD,o.PrivacyTipIcon=BD,o.PrivateConnectivityIcon=ED,o.ProductionQuantityLimitsIcon=FD,o.PropaneIcon=PD,o.PropaneTankIcon=DD,o.PropertyFieldBinding=pn,o.PropertyPreview=Be,o.PsychologyAltIcon=TD,o.PsychologyIcon=ND,o.PublicIcon=MD,o.PublicOffIcon=OD,o.PublishIcon=LD,o.PublishedWithChangesIcon=QD,o.PunchClockIcon=VD,o.PushPinIcon=WD,o.QrCode2Icon=zD,o.QrCodeIcon=GD,o.QrCodeScannerIcon=HD,o.QueryBuilderIcon=UD,o.QueryStatsIcon=YD,o.QuestionAnswerIcon=$D,o.QuestionMarkIcon=jD,o.QueueIcon=qD,o.QueueMusicIcon=JD,o.QueuePlayNextIcon=ZD,o.QuickreplyIcon=XD,o.QuizIcon=xD,o.RMobiledataIcon=RD,o.RadarIcon=eN,o.RadioButtonCheckedIcon=oN,o.RadioButtonUncheckedIcon=rN,o.RadioIcon=nN,o.RailwayAlertIcon=tN,o.RamenDiningIcon=cN,o.RampLeftIcon=iN,o.RampRightIcon=aN,o.RateReviewIcon=lN,o.RawOffIcon=sN,o.RawOnIcon=dN,o.ReadMoreIcon=uN,o.ReadOnlyFieldBinding=Xr,o.RealEstateAgentIcon=fN,o.ReceiptIcon=AN,o.ReceiptLongIcon=_N,o.RecentActorsIcon=yN,o.RecommendIcon=hN,o.RecordVoiceOverIcon=gN,o.RectangleIcon=IN,o.RecyclingIcon=bN,o.RedeemIcon=pN,o.RedoIcon=wN,o.ReduceCapacityIcon=kN,o.ReferenceFieldBinding=Ii,o.ReferencePreview=nn,o.ReferencePreviewContainer=Po,o.ReferenceSelectionInner=ta,o.RefreshIcon=mN,o.RememberMeIcon=vN,o.RemoveCircleIcon=Ec,o.RemoveCircleOutlineIcon=KN,o.RemoveDoneIcon=CN,o.RemoveFromQueueIcon=SN,o.RemoveIcon=to,o.RemoveModeratorIcon=BN,o.RemoveRedEyeIcon=EN,o.RemoveRoadIcon=FN,o.RemoveShoppingCartIcon=PN,o.ReorderIcon=DN,o.RepartitionIcon=NN,o.RepeatFieldBinding=wi,o.RepeatIcon=mr,o.RepeatOnIcon=TN,o.RepeatOneIcon=MN,o.RepeatOneOnIcon=ON,o.Replay10Icon=QN,o.Replay30Icon=VN,o.Replay5Icon=WN,o.ReplayCircleFilledIcon=GN,o.ReplayIcon=LN,o.ReplyAllIcon=HN,o.ReplyIcon=zN,o.ReportGmailerrorredIcon=YN,o.ReportIcon=UN,o.ReportOffIcon=$N,o.ReportProblemIcon=jN,o.RequestPageIcon=qN,o.RequestQuoteIcon=JN,o.ResetTvIcon=ZN,o.RestartAltIcon=XN,o.RestaurantIcon=xN,o.RestaurantMenuIcon=RN,o.RestoreFromTrashIcon=nT,o.RestoreIcon=eT,o.RestorePageIcon=oT,o.ReviewsIcon=rT,o.RiceBowlIcon=tT,o.RingVolumeIcon=cT,o.RocketIcon=iT,o.RocketLaunchIcon=aT,o.RollerShadesClosedIcon=sT,o.RollerShadesIcon=lT,o.RollerSkatingIcon=dT,o.RoofingIcon=uT,o.RoomIcon=fT,o.RoomPreferencesIcon=AT,o.RoomServiceIcon=_T,o.Rotate90DegreesCcwIcon=yT,o.Rotate90DegreesCwIcon=hT,o.RotateLeftIcon=gT,o.RotateRightIcon=IT,o.RoundaboutLeftIcon=bT,o.RoundaboutRightIcon=pT,o.RoundedCornerIcon=wT,o.RouteIcon=kT,o.RouteWrapper=qo,o.RouterIcon=mT,o.RowingIcon=vT,o.RssFeedIcon=KT,o.RsvpIcon=CT,o.RttIcon=ST,o.RuleFolderIcon=ET,o.RuleIcon=BT,o.RunCircleIcon=FT,o.RunningWithErrorsIcon=PT,o.RvHookupIcon=DT,o.SafetyCheckIcon=NT,o.SafetyDividerIcon=TT,o.SailingIcon=MT,o.SanitizerIcon=OT,o.SatelliteAltIcon=QT,o.SatelliteIcon=LT,o.SaveAltIcon=WT,o.SaveAsIcon=GT,o.SaveIcon=VT,o.SavedSearchIcon=zT,o.SavingsIcon=HT,o.Scaffold=kH,o.ScaleIcon=UT,o.ScannerIcon=YT,o.ScatterPlotIcon=$T,o.ScheduleIcon=Fc,o.ScheduleSendIcon=jT,o.SchemaIcon=qT,o.SchoolIcon=JT,o.ScienceIcon=ZT,o.ScoreIcon=XT,o.ScoreboardIcon=xT,o.ScreenLockLandscapeIcon=RT,o.ScreenLockPortraitIcon=eM,o.ScreenLockRotationIcon=nM,o.ScreenRotationAltIcon=rM,o.ScreenRotationIcon=oM,o.ScreenSearchDesktopIcon=tM,o.ScreenShareIcon=cM,o.ScreenshotIcon=iM,o.ScreenshotMonitorIcon=aM,o.ScubaDivingIcon=lM,o.SdCardAlertIcon=uM,o.SdCardIcon=dM,o.SdIcon=sM,o.SdStorageIcon=fM,o.SearchBar=Qt,o.SearchIcon=rc,o.SearchOffIcon=AM,o.SecurityIcon=_M,o.SecurityUpdateGoodIcon=hM,o.SecurityUpdateIcon=yM,o.SecurityUpdateWarningIcon=gM,o.SegmentIcon=IM,o.Select=Xe,o.SelectAllIcon=bM,o.SelectFieldBinding=zr,o.SelectGroup=JH,o.SelectItem=xe,o.SelfImprovementIcon=pM,o.SellIcon=wM,o.SendAndArchiveIcon=mM,o.SendIcon=kM,o.SendTimeExtensionIcon=vM,o.SendToMobileIcon=KM,o.SensorDoorIcon=CM,o.SensorOccupiedIcon=SM,o.SensorWindowIcon=BM,o.SensorsIcon=EM,o.SensorsOffIcon=FM,o.SentimentDissatisfiedIcon=PM,o.SentimentNeutralIcon=DM,o.SentimentSatisfiedAltIcon=TM,o.SentimentSatisfiedIcon=NM,o.SentimentVeryDissatisfiedIcon=MM,o.SentimentVerySatisfiedIcon=OM,o.SetMealIcon=LM,o.SettingsAccessibilityIcon=VM,o.SettingsApplicationsIcon=WM,o.SettingsBackupRestoreIcon=GM,o.SettingsBluetoothIcon=zM,o.SettingsBrightnessIcon=HM,o.SettingsCellIcon=UM,o.SettingsEthernetIcon=YM,o.SettingsIcon=QM,o.SettingsInputAntennaIcon=$M,o.SettingsInputComponentIcon=jM,o.SettingsInputCompositeIcon=qM,o.SettingsInputHdmiIcon=JM,o.SettingsInputSvideoIcon=ZM,o.SettingsOverscanIcon=XM,o.SettingsPhoneIcon=xM,o.SettingsPowerIcon=RM,o.SettingsRemoteIcon=e2,o.SettingsSuggestIcon=n2,o.SettingsSystemDaydreamIcon=o2,o.SettingsVoiceIcon=r2,o.SevereColdIcon=t2,o.ShapeLineIcon=c2,o.ShareIcon=i2,o.ShareLocationIcon=a2,o.Sheet=Vt,o.ShieldIcon=l2,o.ShieldMoonIcon=s2,o.Shop2Icon=u2,o.ShopIcon=d2,o.ShopTwoIcon=f2,o.ShoppingBagIcon=A2,o.ShoppingBasketIcon=_2,o.ShoppingCartCheckoutIcon=h2,o.ShoppingCartIcon=y2,o.ShortTextIcon=Pc,o.ShortcutIcon=g2,o.ShowChartIcon=I2,o.ShowerIcon=b2,o.ShuffleIcon=p2,o.ShuffleOnIcon=w2,o.ShutterSpeedIcon=k2,o.SickIcon=m2,o.SideDialogs=L3,o.SignLanguageIcon=v2,o.SignalCellular0BarIcon=K2,o.SignalCellular4BarIcon=C2,o.SignalCellularAlt1BarIcon=B2,o.SignalCellularAlt2BarIcon=E2,o.SignalCellularAltIcon=S2,o.SignalCellularConnectedNoInternet0BarIcon=F2,o.SignalCellularConnectedNoInternet4BarIcon=P2,o.SignalCellularNoSimIcon=D2,o.SignalCellularNodataIcon=N2,o.SignalCellularNullIcon=T2,o.SignalCellularOffIcon=M2,o.SignalWifi0BarIcon=O2,o.SignalWifi4BarIcon=L2,o.SignalWifi4BarLockIcon=Q2,o.SignalWifiBadIcon=V2,o.SignalWifiConnectedNoInternet4Icon=W2,o.SignalWifiOffIcon=G2,o.SignalWifiStatusbar4BarIcon=z2,o.SignalWifiStatusbarConnectedNoInternet4Icon=H2,o.SignalWifiStatusbarNullIcon=U2,o.SignpostIcon=Y2,o.SimCardAlertIcon=j2,o.SimCardDownloadIcon=q2,o.SimCardIcon=$2,o.SingleBedIcon=J2,o.SipIcon=Z2,o.SkateboardingIcon=X2,o.SkeletonPropertyComponent=Nn,o.SkipNextIcon=x2,o.SkipPreviousIcon=R2,o.SleddingIcon=eO,o.SlideshowIcon=nO,o.SlowMotionVideoIcon=oO,o.SmartButtonIcon=rO,o.SmartDisplayIcon=tO,o.SmartScreenIcon=cO,o.SmartToyIcon=iO,o.SmartphoneIcon=aO,o.SmokeFreeIcon=lO,o.SmokingRoomsIcon=sO,o.SmsFailedIcon=uO,o.SmsIcon=dO,o.SnackbarProvider=LH,o.SnippetFolderIcon=fO,o.SnoozeIcon=AO,o.SnowboardingIcon=_O,o.SnowmobileIcon=yO,o.SnowshoeingIcon=hO,o.SoapIcon=gO,o.SocialDistanceIcon=IO,o.SolarPowerIcon=bO,o.SortByAlphaIcon=wO,o.SortIcon=pO,o.SosIcon=kO,o.SoupKitchenIcon=mO,o.SourceIcon=vO,o.SouthAmericaIcon=CO,o.SouthEastIcon=SO,o.SouthIcon=KO,o.SouthWestIcon=BO,o.SpaIcon=EO,o.SpaceBarIcon=FO,o.SpaceDashboardIcon=PO,o.SpatialAudioIcon=DO,o.SpatialAudioOffIcon=NO,o.SpatialTrackingIcon=TO,o.SpeakerGroupIcon=OO,o.SpeakerIcon=MO,o.SpeakerNotesIcon=LO,o.SpeakerNotesOffIcon=QO,o.SpeakerPhoneIcon=VO,o.SpeedIcon=WO,o.SpellcheckIcon=GO,o.Spinner=ZH,o.SplitscreenIcon=zO,o.SpokeIcon=HO,o.SportsBarIcon=YO,o.SportsBaseballIcon=$O,o.SportsBasketballIcon=jO,o.SportsCricketIcon=qO,o.SportsEsportsIcon=JO,o.SportsFootballIcon=ZO,o.SportsGolfIcon=XO,o.SportsGymnasticsIcon=xO,o.SportsHandballIcon=RO,o.SportsHockeyIcon=eL,o.SportsIcon=UO,o.SportsKabaddiIcon=nL,o.SportsMartialArtsIcon=oL,o.SportsMmaIcon=rL,o.SportsMotorsportsIcon=tL,o.SportsRugbyIcon=cL,o.SportsScoreIcon=iL,o.SportsSoccerIcon=aL,o.SportsTennisIcon=lL,o.SportsVolleyballIcon=sL,o.SquareFootIcon=uL,o.SquareIcon=dL,o.SsidChartIcon=fL,o.StackedBarChartIcon=AL,o.StackedLineChartIcon=_L,o.StadiumIcon=yL,o.StairsIcon=hL,o.StarBorderIcon=Kr,o.StarBorderPurple500Icon=gL,o.StarHalfIcon=IL,o.StarIcon=vr,o.StarOutlineIcon=bL,o.StarPurple500Icon=pL,o.StarRateIcon=wL,o.StarsIcon=kL,o.StartIcon=mL,o.StayCurrentLandscapeIcon=vL,o.StayCurrentPortraitIcon=KL,o.StayPrimaryLandscapeIcon=CL,o.StayPrimaryPortraitIcon=SL,o.StickyNote2Icon=BL,o.StopCircleIcon=FL,o.StopIcon=EL,o.StopScreenShareIcon=PL,o.StorageIcon=DL,o.StorageThumbnail=$c,o.StorageThumbnailInternal=qc,o.StorageUploadFieldBinding=Jr,o.StoreIcon=NL,o.StoreMallDirectoryIcon=TL,o.StorefrontIcon=ML,o.StormIcon=OL,o.StraightIcon=LL,o.StraightenIcon=QL,o.StreamIcon=VL,o.StreetviewIcon=WL,o.StrikethroughSIcon=GL,o.StringPropertyPreview=Or,o.StrollerIcon=zL,o.StyleIcon=HL,o.SubdirectoryArrowLeftIcon=UL,o.SubdirectoryArrowRightIcon=YL,o.SubjectIcon=Dc,o.SubscriptIcon=$L,o.SubscriptionsIcon=jL,o.SubtitlesIcon=qL,o.SubtitlesOffIcon=JL,o.SubwayIcon=ZL,o.SummarizeIcon=XL,o.SuperscriptIcon=xL,o.SupervisedUserCircleIcon=RL,o.SupervisorAccountIcon=e4,o.SupportAgentIcon=o4,o.SupportIcon=n4,o.SurfingIcon=r4,o.SurroundSoundIcon=t4,o.SwapCallsIcon=c4,o.SwapHorizIcon=i4,o.SwapHorizontalCircleIcon=a4,o.SwapVertIcon=l4,o.SwapVerticalCircleIcon=s4,o.SwipeDownAltIcon=f4,o.SwipeDownIcon=u4,o.SwipeIcon=d4,o.SwipeLeftAltIcon=_4,o.SwipeLeftIcon=A4,o.SwipeRightAltIcon=h4,o.SwipeRightIcon=y4,o.SwipeUpAltIcon=I4,o.SwipeUpIcon=g4,o.SwipeVerticalIcon=b4,o.SwitchAccessShortcutAddIcon=w4,o.SwitchAccessShortcutIcon=p4,o.SwitchAccountIcon=k4,o.SwitchCameraIcon=m4,o.SwitchControl=ol,o.SwitchFieldBinding=hi,o.SwitchLeftIcon=v4,o.SwitchRightIcon=K4,o.SwitchVideoIcon=C4,o.SynagogueIcon=S4,o.SyncAltIcon=E4,o.SyncDisabledIcon=F4,o.SyncIcon=B4,o.SyncLockIcon=P4,o.SyncProblemIcon=D4,o.SystemSecurityUpdateGoodIcon=T4,o.SystemSecurityUpdateIcon=N4,o.SystemSecurityUpdateWarningIcon=M4,o.SystemUpdateAltIcon=L4,o.SystemUpdateIcon=O4,o.Tab=Xo,o.TabIcon=Q4,o.TabUnselectedIcon=V4,o.Table=XH,o.TableBarIcon=W4,o.TableBody=xH,o.TableCell=nU,o.TableChartIcon=G4,o.TableHeader=RH,o.TableRestaurantIcon=z4,o.TableRow=eU,o.TableRowsIcon=H4,o.TableViewIcon=U4,o.TabletAndroidIcon=$4,o.TabletIcon=Y4,o.TabletMacIcon=j4,o.Tabs=ba,o.TagFacesIcon=J4,o.TagIcon=q4,o.TakeoutDiningIcon=Z4,o.TapAndPlayIcon=X4,o.TapasIcon=x4,o.TaskAltIcon=eQ,o.TaskIcon=R4,o.TaxiAlertIcon=nQ,o.TempleBuddhistIcon=oQ,o.TempleHinduIcon=rQ,o.TerminalIcon=tQ,o.TerrainIcon=cQ,o.TextDecreaseIcon=iQ,o.TextField=un,o.TextFieldBinding=Mn,o.TextFieldsIcon=aQ,o.TextFormatIcon=lQ,o.TextIncreaseIcon=sQ,o.TextRotateUpIcon=dQ,o.TextRotateVerticalIcon=uQ,o.TextRotationAngledownIcon=fQ,o.TextRotationAngleupIcon=AQ,o.TextRotationDownIcon=_Q,o.TextRotationNoneIcon=yQ,o.TextSnippetIcon=hQ,o.TextareaAutosize=gt,o.TextsmsIcon=gQ,o.TextureIcon=IQ,o.TheaterComedyIcon=bQ,o.TheatersIcon=pQ,o.ThermostatAutoIcon=kQ,o.ThermostatIcon=wQ,o.ThumbDownAltIcon=vQ,o.ThumbDownIcon=mQ,o.ThumbDownOffAltIcon=KQ,o.ThumbUpAltIcon=SQ,o.ThumbUpIcon=CQ,o.ThumbUpOffAltIcon=BQ,o.ThumbsUpDownIcon=EQ,o.ThunderstormIcon=FQ,o.TimeToLeaveIcon=PQ,o.TimelapseIcon=DQ,o.TimelineIcon=NQ,o.Timer10Icon=MQ,o.Timer10SelectIcon=OQ,o.Timer3Icon=LQ,o.Timer3SelectIcon=QQ,o.TimerIcon=TQ,o.TimerOffIcon=VQ,o.TipsAndUpdatesIcon=WQ,o.TireRepairIcon=GQ,o.TitleIcon=zQ,o.TocIcon=HQ,o.TodayIcon=UQ,o.ToggleOffIcon=YQ,o.ToggleOnIcon=$Q,o.TokenIcon=jQ,o.TollIcon=qQ,o.TonalityIcon=JQ,o.Tooltip=_e,o.TopicIcon=ZQ,o.TornadoIcon=XQ,o.TouchAppIcon=xQ,o.TourIcon=RQ,o.ToysIcon=eV,o.TrackChangesIcon=nV,o.TrafficIcon=oV,o.TrainIcon=rV,o.TramIcon=tV,o.TranscribeIcon=cV,o.TransferWithinAStationIcon=iV,o.TransformIcon=aV,o.TransgenderIcon=lV,o.TransitEnterexitIcon=sV,o.TranslateIcon=dV,o.TravelExploreIcon=uV,o.TrendingDownIcon=fV,o.TrendingFlatIcon=AV,o.TrendingUpIcon=_V,o.TripOriginIcon=yV,o.TroubleshootIcon=hV,o.TryIcon=gV,o.TsunamiIcon=IV,o.TtyIcon=bV,o.TuneIcon=pV,o.TungstenIcon=wV,o.TurnLeftIcon=kV,o.TurnRightIcon=mV,o.TurnSharpLeftIcon=vV,o.TurnSharpRightIcon=KV,o.TurnSlightLeftIcon=CV,o.TurnSlightRightIcon=SV,o.TurnedInIcon=BV,o.TurnedInNotIcon=EV,o.TvIcon=FV,o.TvOffIcon=PV,o.TwoWheelerIcon=DV,o.TypeSpecimenIcon=NV,o.Typography=j,o.UTurnLeftIcon=TV,o.UTurnRightIcon=MV,o.UmbrellaIcon=OV,o.UnarchiveIcon=LV,o.UndoIcon=QV,o.UnfoldLessDoubleIcon=WV,o.UnfoldLessIcon=VV,o.UnfoldMoreDoubleIcon=zV,o.UnfoldMoreIcon=GV,o.UnpublishedIcon=HV,o.UnsubscribeIcon=UV,o.UpcomingIcon=YV,o.UpdateDisabledIcon=jV,o.UpdateIcon=$V,o.UpgradeIcon=qV,o.UploadFileIcon=Nc,o.UploadIcon=JV,o.UrlComponentPreview=ao,o.UsbIcon=ZV,o.UsbOffIcon=XV,o.VaccinesIcon=xV,o.VapeFreeIcon=RV,o.VapingRoomsIcon=e5,o.VerifiedIcon=n5,o.VerifiedUserIcon=o5,o.VerticalAlignBottomIcon=r5,o.VerticalAlignCenterIcon=t5,o.VerticalAlignTopIcon=c5,o.VerticalDistributeIcon=i5,o.VerticalShadesClosedIcon=l5,o.VerticalShadesIcon=a5,o.VerticalSplitIcon=s5,o.VibrationIcon=d5,o.VideoCallIcon=u5,o.VideoCameraBackIcon=f5,o.VideoCameraFrontIcon=A5,o.VideoChatIcon=_5,o.VideoFileIcon=y5,o.VideoLabelIcon=h5,o.VideoLibraryIcon=g5,o.VideoSettingsIcon=I5,o.VideoStableIcon=b5,o.VideocamIcon=p5,o.VideocamOffIcon=w5,o.VideogameAssetIcon=k5,o.VideogameAssetOffIcon=m5,o.ViewAgendaIcon=v5,o.ViewArrayIcon=K5,o.ViewCarouselIcon=C5,o.ViewColumnIcon=S5,o.ViewComfyAltIcon=E5,o.ViewComfyIcon=B5,o.ViewCompactAltIcon=P5,o.ViewCompactIcon=F5,o.ViewCozyIcon=D5,o.ViewDayIcon=N5,o.ViewHeadlineIcon=T5,o.ViewInArIcon=M5,o.ViewKanbanIcon=O5,o.ViewListIcon=L5,o.ViewModuleIcon=Q5,o.ViewQuiltIcon=V5,o.ViewSidebarIcon=W5,o.ViewStreamIcon=Tc,o.ViewTimelineIcon=G5,o.ViewWeekIcon=z5,o.VignetteIcon=H5,o.VillaIcon=U5,o.VirtualTable=$i,o.VisibilityIcon=Y5,o.VisibilityOffIcon=$5,o.VoiceChatIcon=j5,o.VoiceOverOffIcon=q5,o.VoicemailIcon=J5,o.VolcanoIcon=Z5,o.VolumeDownIcon=X5,o.VolumeMuteIcon=x5,o.VolumeOffIcon=R5,o.VolumeUpIcon=eW,o.VolunteerActivismIcon=nW,o.VpnKeyIcon=oW,o.VpnKeyOffIcon=rW,o.VpnLockIcon=tW,o.VrpanoIcon=cW,o.WalletIcon=iW,o.WallpaperIcon=aW,o.WarehouseIcon=lW,o.WarningAmberIcon=dW,o.WarningIcon=sW,o.WashIcon=uW,o.WatchIcon=fW,o.WatchLaterIcon=AW,o.WatchOffIcon=_W,o.WaterDamageIcon=hW,o.WaterDropIcon=gW,o.WaterIcon=yW,o.WaterfallChartIcon=IW,o.WavesIcon=bW,o.WavingHandIcon=pW,o.WbAutoIcon=wW,o.WbCloudyIcon=kW,o.WbIncandescentIcon=mW,o.WbIridescentIcon=vW,o.WbShadeIcon=KW,o.WbSunnyIcon=CW,o.WbTwilightIcon=SW,o.WcIcon=BW,o.WebAssetIcon=FW,o.WebAssetOffIcon=PW,o.WebIcon=EW,o.WebStoriesIcon=DW,o.WebhookIcon=NW,o.WeekendIcon=TW,o.WestIcon=MW,o.WhatshotIcon=OW,o.WheelchairPickupIcon=LW,o.WhereToVoteIcon=QW,o.WidgetsIcon=VW,o.WidthFullIcon=WW,o.WidthNormalIcon=GW,o.WidthWideIcon=zW,o.Wifi1BarIcon=UW,o.Wifi2BarIcon=YW,o.WifiCalling3Icon=jW,o.WifiCallingIcon=$W,o.WifiChannelIcon=qW,o.WifiFindIcon=JW,o.WifiIcon=HW,o.WifiLockIcon=ZW,o.WifiOffIcon=XW,o.WifiPasswordIcon=xW,o.WifiProtectedSetupIcon=RW,o.WifiTetheringErrorIcon=nG,o.WifiTetheringIcon=eG,o.WifiTetheringOffIcon=oG,o.WindPowerIcon=rG,o.WindowIcon=tG,o.WineBarIcon=cG,o.Woman2Icon=aG,o.WomanIcon=iG,o.WorkHistoryIcon=sG,o.WorkIcon=lG,o.WorkOffIcon=dG,o.WorkOutlineIcon=uG,o.WorkspacePremiumIcon=fG,o.WorkspacesIcon=AG,o.WrapTextIcon=_G,o.WrongLocationIcon=yG,o.WysiwygIcon=hG,o.YardIcon=gG,o.YoutubeSearchedForIcon=IG,o.ZoomInIcon=bG,o.ZoomInMapIcon=pG,o.ZoomOutIcon=wG,o.ZoomOutMapIcon=kG,o._10kIcon=al,o._10mpIcon=ll,o._11mpIcon=sl,o._123Icon=cl,o._12mpIcon=dl,o._13mpIcon=ul,o._14mpIcon=fl,o._15mpIcon=Al,o._16mpIcon=_l,o._17mpIcon=yl,o._18UpRatingIcon=hl,o._18mpIcon=gl,o._19mpIcon=Il,o._1kIcon=bl,o._1kPlusIcon=pl,o._1xMobiledataIcon=wl,o._20mpIcon=kl,o._21mpIcon=ml,o._22mpIcon=vl,o._23mpIcon=Kl,o._24mpIcon=Cl,o._2kIcon=Sl,o._2kPlusIcon=Bl,o._2mpIcon=El,o._30fpsIcon=Fl,o._30fpsSelectIcon=Pl,o._360Icon=il,o._3dRotationIcon=Dl,o._3gMobiledataIcon=Nl,o._3kIcon=Tl,o._3kPlusIcon=Ml,o._3mpIcon=Ol,o._3pIcon=Ll,o._4gMobiledataIcon=Ql,o._4gPlusMobiledataIcon=Vl,o._4kIcon=Wl,o._4kPlusIcon=Gl,o._4mpIcon=zl,o._5gIcon=Hl,o._5kIcon=Ul,o._5kPlusIcon=Yl,o._5mpIcon=$l,o._60fpsIcon=jl,o._60fpsSelectIcon=ql,o._6FtApartIcon=Jl,o._6kIcon=Zl,o._6kPlusIcon=Xl,o._6mpIcon=xl,o._7kIcon=Rl,o._7kPlusIcon=es,o._7mpIcon=ns,o._8kIcon=os,o._8kPlusIcon=rs,o._8mpIcon=ts,o._9kIcon=cs,o._9kPlusIcon=is,o._9mpIcon=as,o.addInitialSlash=Ya,o.buildAdditionalFieldDelegate=NH,o.buildCollection=CH,o.buildEntityCallbacks=DH,o.buildEnumLabel=xt,o.buildEnumValueConfig=PH,o.buildEnumValues=FH,o.buildFieldConfig=TH,o.buildProperties=BH,o.buildPropertiesOrBuilder=EH,o.buildProperty=SH,o.canCreateEntity=Qo,o.canDeleteEntity=it,o.canEditEntity=ct,o.cardClickableMixin=ec,o.cardMixin=Rt,o.cardSelectedMixin=xa,o.cn=E,o.coolIconKeys=_r,o.debounce=Oi,o.defaultBorderMixin=ue,o.defaultDateFormat=oi,o.deleteEntityWithCallbacks=zc,o.enumToObjectEntries=tn,o.fieldBackgroundDisabledMixin=Re,o.fieldBackgroundHoverMixin=We,o.fieldBackgroundInvisibleMixin=Ar,o.fieldBackgroundMixin=Je,o.flattenObject=at,o.focusedClasses=fr,o.focusedInvisibleMixin=ur,o.focusedMixin=he,o.fullPathToCollectionSegments=Ze,o.getArrayValuesCount=Li,o.getBracketNotation=Qz,o.getCollectionByPathOrAlias=Io,o.getCollectionPathsCombinations=bo,o.getColorForProperty=Lz,o.getColorScheme=Xt,o.getDefaultFieldId=st,o.getDefaultValueFor=ko,o.getDefaultValueForDataType=sr,o.getDefaultValuesFor=eo,o.getFieldConfig=Go,o.getFieldId=dt,o.getHashValue=ir,o.getIcon=Ti,o.getIconForProperty=ke,o.getIconForView=Vo,o.getIconForWidget=rt,o.getIdIcon=Oz,o.getLabelOrConfigFrom=Ko,o.getLastSegment=$a,o.getPropertiesWithPropertiesOrder=Ni,o.getPropertyInPath=wn,o.getRandomId=Ao,o.getReferenceFrom=hn,o.getReferencePreviewKeys=Mi,o.getResolvedPropertyInPath=tt,o.getValueInPath=rn,o.hydrateRegExp=Pi,o.iconKeys=oc,o.isDefaultFieldConfigId=Qi,o.isEmptyObject=lr,o.isEnumValueDisabled=Xa,o.isHidden=Rn,o.isObject=po,o.isPropertyBuilder=Le,o.isReadOnly=Cn,o.isReferenceProperty=Di,o.isValidRegExp=Tz,o.mergeDeep=qe,o.paperMixin=Ge,o.pick=qt,o.plural=Vz,o.randomColor=xG,o.randomString=Tn,o.removeFunctions=cr,o.removeInPath=ja,o.removeInitialAndTrailingSlashes=pe,o.removeInitialSlash=$t,o.removeTrailingSlash=jt,o.removeUndefined=ar,o.renderSkeletonCaptionText=QG,o.renderSkeletonIcon=Mr,o.renderSkeletonImageThumbnail=Tr,o.renderSkeletonText=en,o.resolveArrayProperty=sn,o.resolveCollection=Me,o.resolveCollectionPathAliases=rr,o.resolveDefaultSelectedView=nt,o.resolveEntityView=At,o.resolveEnumValues=Gz,o.resolveNavigationFrom=Hc,o.resolvePermissions=uo,o.resolveProperties=ut,o.resolveProperty=Ne,o.resolvePropertyEnum=ft,o.sanitizeData=Ja,o.saveEntityWithCallbacks=Fr,o.segmentsToStrippedPath=Fi,o.serializeRegExp=Nz,o.singular=Wz,o.slugify=No,o.sortProperties=Bi,o.stripCollectionPath=ot,o.toKebabCase=JG,o.toSnakeCase=XG,o.traverseValueProperty=mo,o.traverseValuesProperties=dr,o.unslugify=Ua,o.updateDateAutoValues=qa,o.useAuthController=In,o.useAutoComplete=QH,o.useBreadcrumbsContext=Dr,o.useBrowserTitleAndIcon=CG,o.useBuildLocalConfigurationPersistence=OH,o.useBuildModeController=MH,o.useClearRestoreValue=Te,o.useClipboard=Uc,o.useCollectionFetch=Gc,o.useDataSource=Qe,o.useDebounce=Oo,o.useDebounceValue=Mz,o.useEntityCollectionTableController=Ct,o.useEntityFetch=Er,o.useFireCMSContext=ne,o.useLargeLayout=ze,o.useModeController=Pr,o.useNavigationContext=fe,o.useOutsideAlerter=Do,o.useReferenceDialog=io,o.useResolvedNavigationFrom=mG,o.useSelectionController=Bt,o.useSideDialogContext=Uo,o.useSideDialogsController=co,o.useSideEntityController=Sn,o.useSnackbarController=an,o.useStorageSource=Bn,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
1611
1611
  //# sourceMappingURL=index.umd.js.map