finform-react-builder 1.8.19 → 1.8.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.es.js CHANGED
@@ -12888,7 +12888,7 @@ const Hh = (e) => {
12888
12888
  showSubmitButton: l = !0,
12889
12889
  buttons: p,
12890
12890
  buttonGroup: c,
12891
- formCardWrap: d = !0,
12891
+ formCardWrap: d,
12892
12892
  formCardSx: f,
12893
12893
  formCardProps: y,
12894
12894
  // API configuration
@@ -13193,7 +13193,7 @@ const Hh = (e) => {
13193
13193
  he()
13194
13194
  ]
13195
13195
  }
13196
- ), q = d !== !1 ? /* @__PURE__ */ g(
13196
+ ), q = d ? /* @__PURE__ */ g(
13197
13197
  Ft,
13198
13198
  {
13199
13199
  sx: {
package/dist/index.js CHANGED
@@ -176,7 +176,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
176
176
  `)):null),classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),b.string]),disabled:b.bool,disableFocusRipple:b.bool,disableRipple:b.bool,edge:b.oneOf(["end","start",!1]),id:b.string,loading:b.bool,loadingIndicator:b.node,size:b.oneOfType([b.oneOf(["small","medium","large"]),b.string]),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])});const os=St(h.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),ss=St(h.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),am=St(h.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),La=St(h.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),ni=St(h.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),om=St(h.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),G={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},ls=e=>{const t=e.replace("#",""),r=parseInt(t.length===3?t.split("").map(n=>n+n).join(""):t,16);return{r:r>>16&255,g:r>>8&255,b:r&255}},sm=(e,t,r)=>"#"+[e,t,r].map(n=>{const i=Math.round(Math.min(255,Math.max(0,n))).toString(16);return i.length===1?"0"+i:i}).join(""),zt=(e,t,r)=>{const n=ls(e),i=ls(t);return sm(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},qa=e=>{const t="#FFFFFF",r="#000000";return{50:zt(t,e,.08),100:zt(t,e,.16),200:zt(t,e,.28),300:zt(t,e,.4),400:zt(t,e,.55),500:e,600:zt(e,r,.1),700:zt(e,r,.2),800:zt(e,r,.3),900:zt(e,r,.42)}},lm=qa(G.primary.main),cm=qa(G.secondary.main),nt=qa(G.text.primary),um={primary:G.primary.main,secondary:G.secondary.main,textPrimary:G.text.primary,textSecondary:G.text.secondary,divider:G.divider,background:G.background},sa=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:o="#E6E8EC",endorsementColor:s="#111827",endorsementRadius:l="6px",endorsementHeight:p=28,endorsementPaddingX:u="8px",...d})=>{var c,w;const f=!!r,g=a?h.jsx(C.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:p,paddingLeft:u,paddingRight:u,borderRadius:l,backgroundColor:o,color:s,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,S={...d.InputProps,endAdornment:g||i?h.jsxs(C.InputAdornment,{sx:{mr:-1},position:"end",children:[g||i,(c=d.InputProps)==null?void 0:c.endAdornment]}):(w=d.InputProps)==null?void 0:w.endAdornment};return h.jsxs(C.Box,{children:[f&&h.jsx(C.Typography,{variant:n,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:r}),h.jsx(C.TextField,{fullWidth:!0,size:"small",...d,InputProps:S,label:f?void 0:d.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:G.background.paper,borderRadius:"8px","& fieldset":{borderColor:G.divider},"&:hover fieldset":{borderColor:nt[300]},"&.Mui-focused fieldset":{borderColor:nt[400]},"&.Mui-error fieldset":{borderColor:G.error.main}},"& .MuiInputBase-input":{color:G.text.primary},"& .MuiFormLabel-root":{color:G.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:G.text.primary},"& .MuiFormHelperText-root":{color:e?G.error.main:G.text.secondary},...t}})]})},Dl=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:o="subtitle2",placeholder:s,value:l,sx:p,...u})=>{const d=D.useId(),f=l==null||l===""||Array.isArray(l)&&l.length===0,g=S=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...S,children:h.jsx("path",{d:"M6 9l6 6 6-6",stroke:G.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return h.jsxs(C.FormControl,{fullWidth:!0,size:a,error:!!u.error,variant:"outlined",children:[e&&h.jsx(C.Typography,{variant:o,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:e}),t&&h.jsx(C.InputLabel,{id:d,shrink:!f||!!s,sx:{color:G.text.secondary,"&.Mui-focused":{color:G.text.primary},"&.Mui-error":{color:G.error.main}},children:t}),h.jsx(C.Select,{...u,value:l,labelId:t?d:void 0,label:t,displayEmpty:!0,input:h.jsx(C.OutlinedInput,{label:t}),IconComponent:g,renderValue:S=>{const c=S;if(f)return h.jsx("span",{style:{color:G.text.secondary},children:s??""});const w=r.find(x=>x.value===c);return(w==null?void 0:w.label)??String(c)},endAdornment:n?h.jsx(C.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${G.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:G.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:G.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:G.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:nt[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:nt[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:G.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...p},children:n?h.jsx(C.MenuItem,{disabled:!0,children:h.jsx(C.CircularProgress,{size:16})}):r.map(S=>h.jsx(C.MenuItem,{value:S.value,sx:{backgroundColor:G.background.paper,color:G.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:nt[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:nt[50],borderRadius:"4px"}},children:S.label},S.value))}),i&&h.jsx(C.FormHelperText,{children:i})]})},pm=e=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:h.jsx("path",{d:"M6 9l6 6 6-6",stroke:G.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Pl=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:o,onChange:s,labelVariant:l="subtitle2",disabled:p,loading:u,error:d,helperText:f,onOpen:g,noOptionsText:S,sx:c})=>h.jsxs(C.Box,{children:[a&&h.jsx(C.Typography,{variant:l,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:a}),h.jsx(C.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:h.jsx(pm,{}),disabled:p,loading:u,onOpen:g,noOptionsText:S,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${G.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:G.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:G.divider},"&:hover fieldset":{borderColor:nt[300]},"&.Mui-focused fieldset":{borderColor:nt[400]},"&.Mui-error fieldset":{borderColor:G.error.main}},"& .MuiInputBase-input":{color:G.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:G.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...c},getOptionLabel:w=>typeof w=="string"?w:(w==null?void 0:w.label)??"",isOptionEqualToValue:(w,x)=>((w==null?void 0:w.value)??w)===((x==null?void 0:x.value)??x),renderOption:(w,x,{selected:O})=>h.jsxs(C.Box,{component:"li",...w,sx:{backgroundColor:G.background.paper,color:G.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:nt[50]},"&.Mui-focused":{backgroundColor:nt[50]},...O?{backgroundColor:nt[50]}:{}},children:[n&&h.jsx(C.Checkbox,{checked:O}),h.jsx(C.Typography,{variant:"body2",sx:{color:G.text.primary,fontSize:14},children:typeof x=="string"?x:x.label})]}),renderInput:w=>h.jsx(C.TextField,{...w,label:i,placeholder:o,size:"small",error:d,helperText:f,InputLabelProps:{shrink:!!r||!!o,sx:{color:G.text.secondary,"&.Mui-focused":{color:G.text.primary},"&.Mui-error":{color:G.error.main}}},InputProps:{...w.InputProps,endAdornment:h.jsxs(h.Fragment,{children:[u?h.jsx(C.CircularProgress,{size:20}):null,w.InputProps.endAdornment]})}}),onChange:(w,x)=>s(x)})]}),la=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>h.jsx(C.FormControlLabel,{control:h.jsx(C.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,o)=>n(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ca=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>h.jsx(C.FormControlLabel,{control:h.jsx(C.Switch,{checked:t,disabled:r,onChange:(a,o)=>n(o)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ua=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:o="top",labelVariant:s="subtitle2",helperText:l,error:p,groupPadding:u=1.5,itemGap:d=1})=>h.jsxs(C.FormControl,{error:p,sx:f=>{var g;return{display:"flex",flexDirection:"column",px:f.spacing(u),borderRadius:((g=f.shape)==null?void 0:g.borderRadius)||8,mx:-2.5,backgroundColor:f.palette.background.paper}},children:[o==="top"&&e&&h.jsx(C.Typography,{variant:s,sx:f=>({color:f.palette.text.primary,mb:.5,fontSize:f.typography.fontSize,fontWeight:500}),children:e}),t&&h.jsx(C.FormLabel,{sx:f=>({color:f.palette.text.secondary,mb:.5,mx:1,fontSize:f.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:f.palette.text.primary},"&.Mui-error":{color:f.palette.error.main}}),children:t}),h.jsx(C.RadioGroup,{row:i,value:r,onChange:f=>a(f.target.value),sx:f=>({display:"flex",flexDirection:i?"row":"column",gap:f.spacing(d),alignItems:i?"center":"flex-start",mt:-1}),children:n.map(f=>h.jsx(C.FormControlLabel,{value:f.value,control:h.jsx(C.Radio,{size:"small",sx:g=>({color:g.palette.text.secondary,"&.Mui-checked":{color:g.palette.primary.main}})}),label:f.label,sx:g=>({m:0,"& .MuiFormControlLabel-label":{color:g.palette.text.primary,fontSize:14}})},String(f.value)))}),l&&h.jsx(C.FormHelperText,{sx:{mt:.5},children:l})]}),Il=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>h.jsxs(C.Box,{children:[e==="top"&&r&&h.jsx(C.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),h.jsx(C.TextField,{fullWidth:!0,type:"date",size:"small",label:e==="inner"?r:void 0,InputLabelProps:{shrink:!0},...i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...n}})]}),Ml=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const o=!!e;return h.jsxs(C.Box,{children:[o&&h.jsx(C.Typography,{variant:t,sx:{color:G.text.primary,mb:.5,fontWeight:500},children:e}),h.jsx(C.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:o?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:G.background.paper,borderRadius:"8px","& fieldset":{borderColor:G.divider},"&:hover fieldset":{borderColor:nt[300]},"&.Mui-focused fieldset":{borderColor:nt[400]},"&.Mui-error fieldset":{borderColor:G.error.main}},"& .MuiInputBase-input":{color:G.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:G.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:G.text.primary},"& .MuiFormHelperText-root":{color:r?G.error.main:G.text.secondary},...n}})]})},zl=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>h.jsxs(C.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[h.jsxs(C.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&h.jsx(C.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&h.jsx(C.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&h.jsx(C.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),dm=()=>h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:h.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),h.jsx("defs",{children:h.jsx("clipPath",{id:"clip0_5814_24904",children:h.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function fm({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:o,showIndex:s=!0,showLeftIcon:l=!0,renderItem:p,chipText:u,helperText:d}){const[f,g]=D.useState(null),[S,c]=D.useState(null),w=E=>v=>{if(!i){g(E),v.dataTransfer.effectAllowed="move";try{v.dataTransfer.setData("text/plain",String(t(e[E])))}catch{}}},x=E=>v=>{i||(v.preventDefault(),c(E),v.dataTransfer.dropEffect="move")},O=E=>v=>{if(i)return;if(v.preventDefault(),f===null||f===E){g(null),c(null);return}const M=[...e],[$]=M.splice(f,1);M.splice(E,0,$),g(null),c(null),r(M)},_=()=>{g(null),c(null)};return h.jsxs(C.Box,{role:"list",sx:E=>({display:"flex",flexDirection:"column",gap:E.spacing(1),...a}),children:[n,h.jsx(C.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),e.map((E,v)=>{const M=f===v,$=S===v&&f!==null&&f!==v;return h.jsx(C.Box,{role:"listitem",draggable:!i,onDragStart:w(v),onDragOver:x(v),onDrop:O(v),onDragEnd:_,sx:K=>{var U;return{userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${$?K.palette.primary.main:"#EBEBEB"}`,borderRadius:((U=K.shape)==null?void 0:U.borderRadius)||"8px",padding:K.spacing(1),opacity:M?.6:1,boxShadow:$?`0 0 0 2px ${K.palette.primary.main}33`:"none"}},children:p?p(E,M):h.jsxs(C.Box,{sx:K=>({display:"flex",alignItems:"center",gap:K.spacing(1),minWidth:0}),children:[l&&h.jsx(dm,{}),s&&h.jsxs(C.Typography,{variant:"body2",sx:K=>({fontWeight:600,fontSize:14,color:`${K.palette.text.primary}`,flex:"0 0 auto"}),children:[v+1,"."]}),(()=>{const K=typeof u=="function"?u(E,v):u;return K?h.jsx(C.Chip,{label:K,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),h.jsx(C.Typography,{variant:"body2",sx:K=>({fontSize:12,fontWeight:500,color:`${K.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:o?o(E):""})]})},String(t(E)))}),d?typeof d=="string"?h.jsx(C.Typography,{variant:"caption",sx:E=>({color:`${E.palette.text.primary}60`}),children:d}):d:null]})}const mm=lt(C.StepConnector)(()=>({[`&.${C.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${C.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:"#E8E8E8",transition:"border-color 0.3s ease"},[`&.${C.stepConnectorClasses.completed} .${C.stepConnectorClasses.line}`]:{borderColor:G.primary.main}})),hm=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=a=>{const{active:o,completed:s,icon:l}=a;return s?h.jsx(C.Box,{sx:{width:24,height:24,border:`1.2px solid ${G.primary.main}`,borderRadius:"50%",backgroundColor:G.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:h.jsx(La,{sx:{fontSize:16,fontWeight:600}})}):o?h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${G.primary.main}`,backgroundColor:$t(G.primary.main,.2),color:G.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l}):h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:G.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l})};return h.jsx(C.Stepper,{orientation:"vertical",activeStep:t,connector:h.jsx(mm,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:G.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((a,o)=>h.jsxs(C.Step,{onClick:()=>r==null?void 0:r(o),completed:o<t,children:[h.jsx(C.StepLabel,{StepIconComponent:i,children:h.jsx(C.Typography,{sx:{fontSize:12,fontWeight:500,color:o===t?G.primary.main:G.text.primary},children:a.label})}),o!==e.length-1&&h.jsx(C.Divider,{sx:{ml:4.2,borderColor:G.divider}})]},o))})},Vl=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...o})=>h.jsx(C.Chip,{...o,sx:s=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${$t(t||s.palette.text.primary,.5)}`,backgroundColor:$t(t||s.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||s.palette.text.primary,fontSize:10,fontWeight:500},...a})}),ym=lt(C.StepConnector)(()=>({[`&.${C.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${C.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${C.stepConnectorClasses.completed} .${C.stepConnectorClasses.line}`]:{borderColor:G.primary.main}})),gm=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=D.useState(null),o=s=>{const{active:l,completed:p,icon:u}=s;return p?h.jsx(C.Box,{sx:{width:24,height:24,border:`1.2px solid ${G.primary.main}`,borderRadius:"50%",backgroundColor:G.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:h.jsx(La,{sx:{fontSize:16,fontWeight:600}})}):l?h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${G.primary.main}`,backgroundColor:$t(G.primary.main,.2),color:G.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:u}):h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:G.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:u})};return h.jsx(C.Stepper,{orientation:"vertical",activeStep:t,connector:h.jsx(ym,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:G.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((s,l)=>h.jsxs(C.Step,{onMouseEnter:()=>a(l),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(l),completed:l<t,children:[h.jsxs(C.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[h.jsxs(C.StepLabel,{StepIconComponent:o,children:[h.jsxs(C.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[h.jsx(C.Typography,{sx:{fontSize:14,fontWeight:500,color:l===t?G.primary.main:G.text.primary},children:s.label}),h.jsx(Vl,{size:"small",colorHex:l<t?G.success.main:l===t?"#973B00":G.text.primary,label:l<t?"Completed":l===t?"In progress":"Not started"})]}),h.jsx(C.Typography,{sx:{fontSize:12,fontWeight:400,color:`${G.text.primary}60`,mt:.5,width:"80%"},children:s.description})]}),i===l&&h.jsx(C.Button,{sx:{display:l>t?"none":"block"},variant:l<t?"outlined":"contained",size:"small",color:"primary",children:l<t?"Edit":l===t?"Complete":""})]}),l!==e.length-1&&h.jsx(C.Divider,{sx:{ml:4.2,borderColor:G.divider}})]},l))})},xm=St(h.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),vm=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:o,sx:s})=>{const l=o||G.info.main,p=$t(l,.08),u=$t(l,.08),d=a??h.jsx(xm,{sx:{color:l,fontSize:18}});return e==="inlineInfo"?h.jsxs(C.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${u}`,boxShadow:"none",...s},children:[h.jsx(C.Box,{sx:{display:"flex",alignItems:"center"},children:d}),h.jsx(C.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})]}):e==="inline"?h.jsx(C.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${u}`,boxShadow:"none",...s},children:h.jsx(C.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})}):e==="listWithHeader"?h.jsxs(C.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:p,border:`1px solid ${u}`,...s},children:[h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[d,h.jsx(C.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:l,fontSize:14,lineHeight:1.3},children:t})]}),r&&h.jsx(C.Typography,{variant:"body2",sx:{mt:.5,color:l,fontSize:10,lineHeight:1.3},children:r}),h.jsx(C.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:l,my:-.5}},children:i.map((f,g)=>h.jsx(C.ListItem,{sx:{py:0},children:h.jsx(C.ListItemText,{primary:f})},g))})]}):h.jsx(C.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:p,border:`0.5px solid ${u}`,boxShadow:"none",...s},children:h.jsx(C.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:l,my:-.5}},children:i.map((f,g)=>h.jsx(C.ListItem,{sx:{py:0},children:h.jsx(C.ListItemText,{primary:f})},g))})})},Bl=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>h.jsxs(C.Box,{children:[h.jsx(C.Tabs,{value:e,onChange:(o,s)=>t(s),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((o,s)=>{const l=typeof o.value=="string"||typeof o.value=="number"?o.value:s;return h.jsx(C.Tab,{value:l,disabled:o.disabled,label:h.jsx(C.Typography,{variant:"body2",children:o.label}),sx:p=>({px:2,textTransform:"none",color:p.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:p.palette.action.hover},"&.Mui-selected":{color:p.palette.common.white,borderColor:p.palette.primary.main,backgroundColor:p.palette.primary.main,fontWeight:600},...a})},String(l))})}),r.map((o,s)=>{const l=typeof o.value=="string"||typeof o.value=="number"?o.value:s,p=o.content??(typeof o.value=="object"?o.value:null);return p&&e===l?h.jsx(C.Box,{sx:{mt:1},children:p},`panel-${l}`):null})]});async function Nl(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:o="value",labelField:s="label",headers:l={},params:p={},body:u,transform:d,passThroughFields:f}=e;let g=i;if(t&&!i.startsWith("http")&&(g=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const E=/\{([^}]+)\}/g;g=g.replace(E,(v,M)=>{const $=n[M];return $!=null?encodeURIComponent(String($)):""}),g=g.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const S=new URLSearchParams;Object.entries(p).forEach(([E,v])=>{v!=null&&S.append(E,String(v))}),S.toString()&&(g+=`${g.includes("?")?"&":"?"}${S.toString()}`);try{const E=/^https?:\/\//i.test(g),v=new URL(g,E?void 0:"http://local.placeholder"),M=Array.from(v.searchParams.entries());for(const[$,K]of M)(K===""||K==="undefined"||K==="null")&&v.searchParams.delete($);E?g=v.toString():g=v.pathname+(v.search?v.search:""),g=g.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const c={"Content-Type":"application/json",...r,...l},w={method:a,headers:c};(a==="POST"||a==="PUT")&&u&&(w.body=JSON.stringify(u));const x=await fetch(g,w);if(!x.ok)throw new Error(`API request failed: ${x.status} ${x.statusText}`);const O=await x.json();if(d)return d(Array.isArray(O)?O:O.data||O);const _=Array.isArray(O)?O:O.data||O;if(!Array.isArray(_))throw new Error("API response is not an array");return _.map(E=>{const v={label:E[s]||E.name||E.title||String(E[o]||""),value:E[o]||E.id||E.value||""},M=Array.isArray(f)?f:void 0;if(Array.isArray(M))for(const $ of M)E[$]!==void 0&&(v[$]=E[$]);return v})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function Ll(e,t,r,n,i=!1){const a=D.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const s=n[e.dependsOn];return s!==void 0?s:null},[e==null?void 0:e.dependsOn,n]),o=D.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return Tu({queryKey:o,queryFn:()=>{if(!e)throw new Error("API config is required");return Nl(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:s=>Math.min(1e3*2**s,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function ur(e){return!!(e.apiConfig||e.api_endpoint)}function Ua(e){return e.apiConfig?e.apiConfig:e.api_endpoint?{endpoint:e.api_endpoint,method:e.api_method||"GET",valueField:e.value_field||"value",labelField:e.label_field||"label",dependsOn:e.depends_on,conditional:e.conditional}:null}function bm(e,t){const r=Ua(e);if(!(r!=null&&r.conditional)&&!e.conditional)return!0;if(r!=null&&r.dependsOn||e.depends_on){const n=(r==null?void 0:r.dependsOn)||e.depends_on;if(n){const i=t[n];return i!=null&&i!==""}}return!0}const Wa=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:o})=>{const s=r[e.name],l=!!s,[p,u]=D.useState(!1),d=D.useRef(!1),[f,g]=D.useState(!1),[S,c]=D.useState(!1),[w,x]=D.useState(!1),O=D.useRef(null),_=D.useRef(null),E=()=>{var N;return e.required!==void 0?e.required:((N=e.validation)==null?void 0:N.required)!==void 0?e.validation.required:!1},v=N=>E()?`${N} *`:N,M=()=>e.value!==void 0?e.value:e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:"",$=D.useMemo(()=>{const N=Ua(e);return N&&Array.isArray(e.passThroughFields)&&(N.passThroughFields=e.passThroughFields),N},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),K=D.useRef(null),U=$!=null&&$.dependsOn?a==null?void 0:a[$.dependsOn]:null,m=D.useMemo(()=>{if(!($!=null&&$.dependsOn))return!1;const N=U,J=K.current,ie=N!==J;return ie&&(K.current=N),ie},[$==null?void 0:$.dependsOn,U]),I=D.useMemo(()=>{const N=e.showWhen;if(typeof N=="function")try{return!!N(a||{})}catch{return!0}if(N&&typeof N=="object"){const J=N.field,ie=N.equals,ue=N.in,he=J?(a||{})[J]:void 0;if(J&&typeof ie<"u")return he===ie;if(J&&Array.isArray(ue))return ue.includes(he)}return!0},[e.showWhen,a]),z=D.useCallback(()=>{const N=e.dynamicEndorsement;if(typeof N=="function")try{return N(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),q=D.useCallback(()=>{const N=e.endAdornment;if(typeof N=="function")try{return N(a||{})}catch{return}return N},[e,a]),B=D.useMemo(()=>p&&ur(e)&&(!($!=null&&$.dependsOn)||U),[p,e,$==null?void 0:$.dependsOn,U]),Q=D.useMemo(()=>{const N={};if(!a)return N;const J=($==null?void 0:$.endpoint)||(e==null?void 0:e.api_endpoint);if(J&&typeof J=="string"){const ie=J.match(/\{([^}]+)\}/g)||[];for(const ue of ie){const he=ue.slice(1,-1),fe=a[he];fe!==void 0&&(N[he]=fe)}}if($!=null&&$.dependsOn){const ie=$.dependsOn,ue=a[ie];ue!==void 0&&(N[ie]=ue)}return N},[$==null?void 0:$.endpoint,e==null?void 0:e.api_endpoint,$==null?void 0:$.dependsOn,a]),{data:ae=[],isLoading:me,error:le}=Ll($,n,i,Q,B),oe=D.useCallback(()=>{ur(e)&&!d.current&&(d.current=!0,u(!0))},[e]),V=D.useCallback(()=>{ur(e)&&!d.current&&(d.current=!0,u(!0))},[e]);D.useEffect(()=>{if(ur(e)&&!d.current){const N=a==null?void 0:a[e.name];N!=null&&N!==""&&(d.current=!0,u(!0))}},[e,a]),D.useEffect(()=>{ur(e)&&($!=null&&$.dependsOn)&&m&&d.current&&(d.current=!1,u(!1))},[m,$==null?void 0:$.dependsOn]);const L=D.useCallback(()=>ur(e)?ae:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,ae]),pe=()=>{var N,J,ie,ue,he,fe;switch(e.type){case"title":return h.jsx(C.Typography,{variant:e.variant||"h4",component:"h1",color:e.color,align:e.align||"left",sx:{mb:3,fontWeight:600,...e.sx},children:e.label});case"section":return h.jsx(C.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left",sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const ke=e.actionName,W=e.actionComponent,$e=e.actionLabel,Le=Z=>h.jsx(zl,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:Z??e.actions}),H=Z=>{if(e.cardWrap){const j={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return h.jsx(C.Card,{sx:j,...e.cardProps,children:Z})}return Z};return H(ke&&W?h.jsx(ct,{name:ke,control:t,defaultValue:e.value??!1,render:({field:Z})=>Le(W==="switch"?h.jsx(ca,{label:$e,checked:!!Z.value,onChange:Z.onChange}):h.jsx(la,{label:$e||"",checked:!!Z.value,onChange:Z.onChange}))}):Le());case"tabs":return h.jsx(ct,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((J=(N=e.items)==null?void 0:N[0])==null?void 0:J.value)=="string"||typeof((ue=(ie=e.items)==null?void 0:ie[0])==null?void 0:ue.value)=="number"?(fe=(he=e.items)==null?void 0:he[0])==null?void 0:fe.value:0),render:({field:Z})=>{const y=e.items||[],j=y.map((A,R)=>({label:A.label,value:typeof A.value=="string"||typeof A.value=="number"?A.value:R,content:A.content,disabled:A.disabled})),T=Z.value,Y=(()=>{if(typeof T=="string"||typeof T=="number"){const A=y.findIndex((R,te)=>typeof R.value=="string"||typeof R.value=="number"?R.value===T:te===T);return A>=0?A:0}return Number(T)||0})(),F=y[Y]||{};return h.jsxs(C.Box,{children:[h.jsx(Bl,{value:Z.value,onChange:Z.onChange,items:j,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(F.fields)&&F.fields.length>0&&h.jsx(C.Box,{sx:{mt:1,display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2},children:F.fields.map(A=>{const R=Math.min(Math.max(A.col??12,1),12);return h.jsx(C.Box,{sx:{gridColumn:`span ${R}`},children:h.jsx(Wa,{field:A,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:o})},A.name)})})]})}});case"text":case"email":case"password":case"tel":case"textarea":return h.jsx(ct,{name:e.name,control:t,defaultValue:M(),render:({field:Z})=>e.type==="textarea"?h.jsx(Ml,{...Z,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(s==null?void 0:s.message)||e.helperText}):h.jsx(sa,{...Z,id:e.id,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,endorsementText:z(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?f?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(s==null?void 0:s.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:h.jsx(jl,{position:"end",children:h.jsx(Ln,{"aria-label":"toggle password visibility",onClick:()=>g(y=>!y),edge:"end",children:f?h.jsx(ss,{}):h.jsx(os,{})})})}:void 0})});case"number":return h.jsx(ct,{name:e.name,control:t,defaultValue:M(),render:({field:Z})=>h.jsx(sa,{...Z,id:e.id,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,endAdornment:q(),endorsementText:z(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(s==null?void 0:s.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const ge=L();return h.jsx(ct,{name:e.name,control:t,defaultValue:M(),render:({field:Z})=>h.jsx(Dl,{labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?v(e.label):void 0,labelVariant:e.labelVariant,value:Z.value,onChange:Z.onChange,options:ge,disabled:e.disabled||me,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?v(e.label):void 0):e.placeholder,loading:me,error:l||!!le,helperText:(s==null?void 0:s.message)||(le==null?void 0:le.message)||e.helperText,onOpen:oe})});case"checkbox":return h.jsx(ct,{name:e.name,control:t,defaultValue:M(),render:({field:Z})=>h.jsx(la,{label:v(e.label),checked:!!Z.value,disabled:e.disabled,onChange:Z.onChange})});case"toggle":return h.jsx(ct,{name:e.name,control:t,defaultValue:M(),render:({field:Z})=>h.jsx(ua,{label:v(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Z.value,options:e.options||[],row:!0,onChange:Z.onChange})});case"radio":return h.jsx(ct,{name:e.name,control:t,defaultValue:M(),render:({field:Z})=>h.jsx(ua,{label:v(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Z.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:Z.onChange})});case"switch":return h.jsx(ct,{name:e.name,control:t,defaultValue:M(),render:({field:Z})=>h.jsx(ca,{label:v(e.label),checked:!!Z.value,disabled:e.disabled,onChange:Z.onChange})});case"autocomplete":const ee=L(),xe=!!(e.disabled||me||$!=null&&$.dependsOn&&!U);return h.jsx(ct,{name:e.name,control:t,defaultValue:M(),render:({field:Z})=>{const y=Z.value,j=e.multiple===!0,T=($==null?void 0:$.valueField)||e.value_field||"value",Y=($==null?void 0:$.labelField)||e.label_field||"label",F=R=>{if(R!=null){if(typeof R=="string"||typeof R=="number")return R;if(typeof R=="object"){if(R[T]!==void 0)return R[T];if(R.value!==void 0)return R.value;if(R.id!==void 0)return R.id}}},A=(()=>{if(j)return(Array.isArray(y)?y:[]).map(te=>{const ce=ee.find(je=>{const _e=F(je);return _e!==void 0&&_e===te});return ce||{[T]:te,[Y]:`Selected: ${te}`,value:te,label:`Selected: ${te}`}});{if(y==null||y==="")return null;const R=ee.find(te=>{const ce=F(te);return ce!==void 0&&ce===y});return R||{[T]:y,[Y]:`Selected: ${y}`,value:y,label:`Selected: ${y}`}}})();return h.jsx(Pl,{id:e.id,options:ee,value:A,multiple:j,labelText:e.labelPosition==="top"?v(e.label):void 0,label:e.labelPosition!=="top"?v(e.label):void 0,placeholder:xe&&($!=null&&$.dependsOn)&&!U?`Please select ${$.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:xe,loading:me,error:l||!!le,helperText:(s==null?void 0:s.message)||(le==null?void 0:le.message)||e.helperText||"",onOpen:V,noOptionsText:xe&&($!=null&&$.dependsOn)&&!U?`Please select ${$.dependsOn.replace(/_/g," ")} first`:me?"Fetching data...":p&&!me&&ee.length===0?"No options available":"Click to load options",onChange:R=>{const te=($==null?void 0:$.valueField)||e.value_field||"value";if(j){const je=(Array.isArray(R)?R:[]).map(_e=>typeof _e=="object"&&(_e[te]||_e.value||_e.id)||_e);Z.onChange(je)}else{let ce;R&&typeof R=="object"?ce=R[te]||R.value||R.id||R:ce=R,Z.onChange(ce);const je=e.selectedAssignments;if(je&&R&&typeof R=="object")for(const[_e,He]of Object.entries(je)){const Ct=R[He];if(Ct!==void 0&&typeof o=="function")try{o(_e,Ct,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return h.jsx(ct,{name:e.name,control:t,defaultValue:M(),render:({field:Z})=>h.jsx(Il,{...Z,id:e.name,label:v(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:l,helperText:s==null?void 0:s.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return h.jsx(ct,{name:e.name,control:t,defaultValue:M(),render:({field:Z})=>{const y=Z.value||e.defaultValue||e.src;if(y){const R=e.imageUploaded||{},te=R.previewText||"Preview",ce=R.removeText||"Remove",je=R.saveText||"Save logo",_e=R.showSave!==void 0?R.showSave:!!(e.onSave||R.saveText),He=()=>{if(x(!0),typeof e.onPreview=="function")try{e.onPreview(y)}catch{}},Ct=()=>{Z.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},Dt=()=>{typeof e.onSave=="function"&&e.onSave({url:y,file:_.current||void 0})},Et=ht=>{const yt=ht.target.files&&ht.target.files[0];if(yt){if(typeof e.onFileSelected=="function")try{e.onFileSelected(yt)}catch{}try{const lr=URL.createObjectURL(yt);Z.onChange(lr)}catch{}_.current=yt,x(!1)}};return h.jsxs(C.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...R.cardSx},children:[h.jsx("input",{type:"file",ref:O,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Et}),h.jsxs(C.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[h.jsx(C.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...R.thumbnailSx},children:h.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),h.jsxs(C.Box,{sx:{flexGrow:1},children:[h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:500,...R.fileNameSx},children:typeof y=="string"?y.split("/").pop():"Selected image"}),h.jsx(C.Typography,{sx:{fontSize:"10px",...R.fileMetaSx},children:"Image selected"})]}),h.jsxs(C.Box,{sx:{display:"flex",gap:1},children:[h.jsx(C.Button,{type:"button",sx:{...R.previewButtonSx},variant:"outlined",onClick:He,startIcon:h.jsx(os,{}),children:te}),h.jsx(C.Button,{variant:"outlined",color:"error",onClick:Ct,sx:{...R.removeButtonSx},startIcon:h.jsx(ss,{}),children:ce}),_e&&h.jsx(C.Button,{variant:"contained",onClick:Dt,sx:{...R.saveButtonSx},children:je})]})]}),h.jsxs(C.Dialog,{open:w,onClose:()=>x(!1),maxWidth:"md",fullWidth:!0,children:[h.jsx(C.DialogTitle,{children:R.previewTitle||"Image preview"}),h.jsx(C.DialogContent,{children:h.jsx(C.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:h.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),h.jsxs(C.DialogActions,{children:[h.jsx(C.Button,{type:"button",variant:"outlined",onClick:()=>{var ht;return(ht=O.current)==null?void 0:ht.click()},children:R.replaceText||"Replace logo"}),h.jsx(C.Button,{type:"button",variant:"contained",onClick:()=>x(!1),children:R.closeText||"Close"})]})]})]})}const j=e.imagePlaceholder||{},T=j.icon||"upload",Y=O,F=()=>{var R;try{(R=Y.current)==null||R.click()}catch{}},A=R=>{const te=R.target.files&&R.target.files[0];if(te){typeof e.onFileSelected=="function"&&e.onFileSelected(te);try{const ce=URL.createObjectURL(te);Z.onChange(ce)}catch{}_.current=te}};return h.jsxs(C.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...j.sx},children:[h.jsx("input",{type:"file",ref:Y,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:A}),h.jsx(Ln,{sx:{borderRadius:"8px",...j.iconSx},children:T==="image"?h.jsx(om,{sx:{width:36,height:36,color:"primary.main"}}):h.jsx(ni,{sx:{width:36,height:36,color:"primary.main"}})}),h.jsx(C.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...j.titleSx},children:j.title||"Drag & Drop the image here"}),h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...j.subtitleSx},children:j.subtitle||""}),h.jsx(C.Button,{onClick:F,sx:{my:2,...j.buttonSx},startIcon:h.jsx(ni,{}),variant:"contained",disabled:e.disabled,children:j.buttonText||"Upload File"}),h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:400,...j.helperTextSx},children:j.helperText||e.helperText||""})]})}});case"component":return h.jsx(C.Box,{children:e.render?e.render():e.content});default:return null}},de=D.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),se=D.useCallback(async()=>{try{const N=a?a[e.name]:void 0;let J="";N==null?J="":Array.isArray(N)?J=N.join(", "):typeof N=="object"?J=JSON.stringify(N):J=String(N),await navigator.clipboard.writeText(J),c(!0),window.setTimeout(()=>c(!1),1200)}catch{}},[a,e.name]);return h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[h.jsx(C.Box,{sx:{flexGrow:1},children:I?pe():null}),de&&h.jsx(Ln,{"aria-label":`copy ${e.label||e.name}`,onClick:se,size:"small",children:S?h.jsx(La,{fontSize:"small"}):h.jsx(am,{fontSize:"small"})})]})};var $i,cs;function wm(){if(cs)return $i;cs=1;function e(x){this._maxSize=x,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(x){return this._values[x]},e.prototype.set=function(x,O){return this._size>=this._maxSize&&this.clear(),x in this._values||this._size++,this._values[x]=O};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,s=new e(o),l=new e(o),p=new e(o);$i={Cache:e,split:d,normalizePath:u,setter:function(x){var O=u(x);return l.get(x)||l.set(x,function(E,v){for(var M=0,$=O.length,K=E;M<$-1;){var U=O[M];if(U==="__proto__"||U==="constructor"||U==="prototype")return E;K=K[O[M++]]}K[O[M]]=v})},getter:function(x,O){var _=u(x);return p.get(x)||p.set(x,function(v){for(var M=0,$=_.length;M<$;)if(v!=null||!O)v=v[_[M++]];else return;return v})},join:function(x){return x.reduce(function(O,_){return O+(g(_)||r.test(_)?"["+_+"]":(O?".":"")+_)},"")},forEach:function(x,O,_){f(Array.isArray(x)?x:d(x),O,_)}};function u(x){return s.get(x)||s.set(x,d(x).map(function(O){return O.replace(a,"$2")}))}function d(x){return x.match(t)||[""]}function f(x,O,_){var E=x.length,v,M,$,K;for(M=0;M<E;M++)v=x[M],v&&(w(v)&&(v='"'+v+'"'),K=g(v),$=!K&&/^\d+$/.test(v),O.call(_,v,K,$,M,x))}function g(x){return typeof x=="string"&&x&&["'",'"'].indexOf(x.charAt(0))!==-1}function S(x){return x.match(n)&&!x.match(r)}function c(x){return i.test(x)}function w(x){return!g(x)&&(S(x)||c(x))}return $i}var Cr=wm(),Di,us;function Sm(){if(us)return Di;us=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=u=>u.match(e)||[],r=u=>u[0].toUpperCase()+u.slice(1),n=(u,d)=>t(u).join(d).toLowerCase(),i=u=>t(u).reduce((d,f)=>`${d}${d?f[0].toUpperCase()+f.slice(1).toLowerCase():f.toLowerCase()}`,"");return Di={words:t,upperFirst:r,camelCase:i,pascalCase:u=>r(i(u)),snakeCase:u=>n(u,"_"),kebabCase:u=>n(u,"-"),sentenceCase:u=>r(n(u," ")),titleCase:u=>t(u).map(r).join(" ")},Di}var Pi=Sm(),Pn={exports:{}},ps;function Cm(){if(ps)return Pn.exports;ps=1,Pn.exports=function(i){return e(t(i),i)},Pn.exports.array=e;function e(i,a){var o=i.length,s=new Array(o),l={},p=o,u=r(a),d=n(i);for(a.forEach(function(g){if(!d.has(g[0])||!d.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});p--;)l[p]||f(i[p],p,new Set);return s;function f(g,S,c){if(c.has(g)){var w;try{w=", node was:"+JSON.stringify(g)}catch{w=""}throw new Error("Cyclic dependency"+w)}if(!d.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!l[S]){l[S]=!0;var x=u.get(g)||new Set;if(x=Array.from(x),S=x.length){c.add(g);do{var O=x[--S];f(O,d.get(O),c)}while(S);c.delete(g)}s[--o]=g}}}function t(i){for(var a=new Set,o=0,s=i.length;o<s;o++){var l=i[o];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,o=0,s=i.length;o<s;o++){var l=i[o];a.has(l[0])||a.set(l[0],new Set),a.has(l[1])||a.set(l[1],new Set),a.get(l[0]).add(l[1])}return a}function n(i){for(var a=new Map,o=0,s=i.length;o<s;o++)a.set(i[o],o);return a}return Pn.exports}var Em=Cm();const km=Fa(Em),Tm=Object.prototype.toString,Om=Error.prototype.toString,jm=RegExp.prototype.toString,Fm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Am=/^Symbol\((.*)\)(.*)$/;function _m(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function ds(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return _m(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Fm.call(e).replace(Am,"Symbol($1)");const n=Tm.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Om.call(e)+"]":n==="RegExp"?jm.call(e):null}function nr(e,t){let r=ds(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=ds(this[n],t);return a!==null?a:i},2)}function ql(e){return e==null?[]:[].concat(e)}let Ul,Wl,Hl,Rm=/\$\{\s*(\w+)\s*\}/g;Ul=Symbol.toStringTag;class fs{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Ul]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],ql(t).forEach(a=>{if(rt.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Wl=Symbol.hasInstance;Hl=Symbol.toStringTag;class rt extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(Rm,(i,a)=>nr(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const o=new fs(t,r,n,i);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Hl]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,rt)}static[Wl](t){return fs[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Ot={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${nr(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${nr(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${nr(r,!0)}\``+i}},Xe={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Wt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},pa={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},da={isValue:"${path} field must be ${value}"},qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},$m={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Dm={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${nr(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${nr(r,!0)}\``}return rt.formatError(Ot.notType,e)}};Object.assign(Object.create(null),{mixed:Ot,string:Xe,number:Wt,date:pa,object:qn,array:$m,boolean:da,tuple:Dm});const Ha=e=>e&&e.__isYupSchema__;class ii{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new ii(t,(s,l)=>{var p;let u=o(...s)?i:a;return(p=u==null?void 0:u(l))!=null?p:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(a=>a.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!Ha(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const In={context:"$",value:"."};class Fr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===In.context,this.isValue=this.key[0]===In.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?In.context:this.isValue?In.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Cr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Fr.prototype.__isYupRef=!0;const wt=e=>e==null;function zr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:o},s,l){const{name:p,test:u,params:d,message:f,skipAbsent:g}=e;let{parent:S,context:c,abortEarly:w=o.spec.abortEarly,disableStackTrace:x=o.spec.disableStackTrace}=i;function O(I){return Fr.isRef(I)?I.getValue(r,S,c):I}function _(I={}){const z=Object.assign({value:r,originalValue:a,label:o.spec.label,path:I.path||n,spec:o.spec,disableStackTrace:I.disableStackTrace||x},d,I.params);for(const B of Object.keys(z))z[B]=O(z[B]);const q=new rt(rt.formatError(I.message||f,z),r,z.path,I.type||p,z.disableStackTrace);return q.params=z,q}const E=w?s:l;let v={path:n,parent:S,type:p,from:i.from,createError:_,resolve:O,options:i,originalValue:a,schema:o};const M=I=>{rt.isError(I)?E(I):I?l(null):E(_())},$=I=>{rt.isError(I)?E(I):s(I)};if(g&&wt(r))return M(!0);let U;try{var m;if(U=u.call(v,r,v),typeof((m=U)==null?void 0:m.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${v.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(U).then(M,$)}}catch(I){$(I);return}M(U)}return t.OPTIONS=e,t}function Pm(e,t,r,n=r){let i,a,o;return t?(Cr.forEach(t,(s,l,p)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:i,value:r});let d=e.type==="tuple",f=p?parseInt(u,10):0;if(e.innerType||d){if(d&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&f>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[f],e=d?e.spec.types[f]:e.innerType}if(!p){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=r,r=r&&r[u],e=e.fields[u]}a=u,o=l?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class ai extends Set{describe(){const t=[];for(const r of this.values())t.push(Fr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new ai(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Vr(e,t=new Map){if(Ha(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Vr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,Vr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Vr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Vr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class st{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new ai,this._blacklist=new ai,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ot.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Vr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&wt(a))return a;let o=nr(t),s=nr(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
177
177
 
178
178
  attempted value: ${o}
179
- `+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let p=[];for(let u of Object.values(this.internalTests))u&&p.push(u);this.runTests({path:a,value:l,originalValue:o,options:r,tests:p},n,u=>{if(u.length)return i(u,l);this.runTests({path:a,value:l,originalValue:o,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:o,originalValue:s,path:l,options:p}=t,u=c=>{i||(i=!0,r(c,o))},d=c=>{i||(i=!0,n(c,o))},f=a.length,g=[];if(!f)return d([]);let S={value:o,originalValue:s,path:l,options:p,schema:this};for(let c=0;c<a.length;c++){const w=a[c];w(S,u,function(O){O&&(Array.isArray(O)?g.push(...O):g.push(O)),--f<=0&&d(g)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:o}){const s=t??r;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof s=="number";let p=n[s];const u=Object.assign({},o,{strict:!0,parent:n,value:p,originalValue:a[s],key:void 0,[l?"index":"key"]:s,path:l||s.includes(".")?`${i||""}[${l?s:`"${s}"`}]`:(i?`${i}.`:"")+t});return(d,f,g)=>this.resolve(u)._validate(p,u,f,g)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,r,(l,p)=>{rt.isError(l)&&(l.value=p),s(l)},(l,p)=>{l.length?s(new rt(l,p,void 0,void 0,a)):o(p)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw rt.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new rt(s,t,void 0,void 0,o);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(rt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(rt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Vr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=zr({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=zr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Ot.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ot.notNull){return this.nullability(!1,t)}required(t=Ot.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Ot.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=zr(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=ql(t).map(a=>new Fr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new ii(i,r):ii.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=zr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Ot.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=zr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),n}notOneOf(t,r=Ot.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=zr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:o}=r.spec;return{meta:i,label:n,optional:a,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,p,u)=>u.findIndex(d=>d.name===l.name)===p)}}}st.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])st.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:o}=Pm(this,t,r,n.context);return o[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])st.prototype[e]=st.prototype.oneOf;for(const e of["not","nope"])st.prototype[e]=st.prototype.notOneOf;const Im=()=>!0;function Kl(e){return new Ql(e)}class Ql extends st{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Im},t))}}Kl.prototype=Ql.prototype;function Yl(){return new Gl}class Gl extends st{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=da.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return wt(r)||r===!0}})}isFalse(t=da.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return wt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Yl.prototype=Gl.prototype;const Mm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function zm(e){const t=fa(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function fa(e){var t,r;const n=Mm.exec(e);return n?{year:Vt(n[1]),month:Vt(n[2],1)-1,day:Vt(n[3],1),hour:Vt(n[4]),minute:Vt(n[5]),second:Vt(n[6]),millisecond:n[7]?Vt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Vt(n[10]),minuteOffset:Vt(n[11])}:null}function Vt(e,t=0){return Number(e)||t}let Vm=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Bm=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Nm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Lm="^\\d{4}-\\d{2}-\\d{2}",qm="\\d{2}:\\d{2}:\\d{2}",Um="(([+-]\\d{2}(:?\\d{2})?)|Z)",Wm=new RegExp(`${Lm}T${qm}(\\.\\d+)?${Um}$`),Hm=e=>wt(e)||e===e.trim(),Km={}.toString();function un(){return new Zl}class Zl extends st{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===Km?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Ot.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=Xe.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=Xe.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=Xe.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||Xe.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=Xe.email){return this.matches(Vm,{name:"email",message:t,excludeEmptyString:!0})}url(t=Xe.url){return this.matches(Bm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Xe.uuid){return this.matches(Nm,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(Wm,{name:"datetime",message:r||Xe.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Xe.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const o=fa(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:r||Xe.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=fa(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Xe.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Hm})}lowercase(t=Xe.lowercase){return this.transform(r=>wt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>wt(r)||r===r.toLowerCase()})}uppercase(t=Xe.uppercase){return this.transform(r=>wt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>wt(r)||r===r.toUpperCase()})}}un.prototype=Zl.prototype;let Qm=e=>e!=+e;function Xl(){return new Jl}class Jl extends st{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Qm(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return n.isType(i)||i===null?i:parseFloat(i)})})}min(t,r=Wt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Wt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Wt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Wt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Wt.positive){return this.moreThan(0,t)}negative(t=Wt.negative){return this.lessThan(0,t)}integer(t=Wt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>wt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>wt(i)?i:Math[t](i))}}Xl.prototype=Jl.prototype;let ec=new Date(""),Ym=e=>Object.prototype.toString.call(e)==="[object Date]";function Ka(){return new On}class On extends st{constructor(){super({type:"date",check(t){return Ym(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=zm(t),isNaN(t)?On.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Fr.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=pa.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=pa.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}On.INVALID_DATE=ec;Ka.prototype=On.prototype;Ka.INVALID_DATE=ec;function Gm(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let l=Cr.split(o)[0];n.add(l),i.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),Fr.isRef(s)&&s.isSibling?a(s.path,o):Ha(s)&&"deps"in s&&s.deps.forEach(l=>a(l,o))}return km.array(Array.from(n),r).reverse()}function ms(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function tc(e){return(t,r)=>ms(e,t)-ms(e,r)}const Zm=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Un(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Un(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Un(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Un)}):"optional"in e?e.optional():e}const Xm=(e,t)=>{const r=[...Cr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Cr.getter(Cr.join(r),!0)(e);return!!(i&&n in i)};let hs=e=>Object.prototype.toString.call(e)==="[object Object]";function ys(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Jm=tc([]);function rc(e){return new nc(e)}class nc extends st{constructor(t){super({type:"object",check(r){return hs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Jm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(d=>!this._nodes.includes(d))),l={},p=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),u=!1;for(const d of s){let f=a[d],g=d in i;if(f){let S,c=i[d];p.path=(r.path?`${r.path}.`:"")+d,f=f.resolve({value:c,context:r.context,parent:l});let w=f instanceof st?f.spec:void 0,x=w==null?void 0:w.strict;if(w!=null&&w.strip){u=u||d in i;continue}S=!r.__validating||!x?f.cast(i[d],p):i[d],S!==void 0&&(l[d]=S)}else g&&!o&&(l[d]=i[d]);(g!==d in l||l[d]!==i[d])&&(u=!0)}return u?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...a],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,p)=>{if(!s||!hs(p)){i(l,p);return}o=o||p;let u=[];for(let d of this._nodes){let f=this.fields[d];!f||Fr.isRef(f)||u.push(f.asNestedTest({options:r,key:d,parent:p,parentPath:r.path,originalParent:o}))}this.runTests({tests:u,value:p,originalValue:o,options:r},n,d=>{i(d.sort(this._sortErrors).concat(l),p)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const o=n[i];n[i]=o===void 0?a:o}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Gm(t,r),n._sortErrors=tc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Un(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=Cr.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return Xm(a,t)&&(o=Object.assign({},a),n||delete o[t],o[r]=i(a)),o})}json(){return this.transform(Zm)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||qn.exact,test(r){if(r==null)return!0;const n=ys(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=qn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=ys(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=qn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(Pi.camelCase)}snakeCase(){return this.transformKeys(Pi.snakeCase)}constantCase(){return this.transformKeys(t=>Pi.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,o]of Object.entries(r.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),n.fields[a]=o.describe(s)}return n}}rc.prototype=nc.prototype;const ic=e=>{const t={};return e.forEach(r=>{var a,o,s;let n;switch(r.type){case"text":case"textarea":case"tel":n=un(),r.validation?n=cr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"email":n=un().email(((a=r.validation)==null?void 0:a.message)||`${r.label} must be a valid email address`),r.validation&&(n=cr(n,r,"string"));break;case"password":n=un(),r.validation?n=cr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"number":n=Xl().typeError(`${r.label} must be a number`),r.validation?n=cr(n,r,"number"):(r.min!==void 0&&(n=n.min(r.min,`${r.label} must be at least ${r.min}`)),r.max!==void 0&&(n=n.max(r.max,`${r.label} must be at most ${r.max}`)));break;case"select":n=un(),r.validation&&(n=cr(n,r,"string"));break;case"checkbox":n=Yl(),r.validation&&(n=cr(n,r,"boolean"));break;case"date":n=Ka().typeError(`${r.label} must be a valid date`),r.validation?n=cr(n,r,"date"):(r.minDate&&(n=n.min(new Date(r.minDate),`${r.label} must be after ${r.minDate}`)),r.maxDate&&(n=n.max(new Date(r.maxDate),`${r.label} must be before ${r.maxDate}`)));break;default:n=Kl()}if(((o=r.validation)==null?void 0:o.required)!==void 0?r.validation.required:r.required){const l=((s=r.validation)==null?void 0:s.message)||`${r.label} is required`;n=n.required(l)}t[r.name]=n}),rc().shape(t)},cr=(e,t,r)=>{const n=t.validation;if(!n)return e;if(r==="string"){if(n.minLength!==void 0){const i=n.message||`${t.label} must be at least ${n.minLength} characters`;e=e.min(n.minLength,i)}if(n.maxLength!==void 0){const i=n.message||`${t.label} must be at most ${n.maxLength} characters`;e=e.max(n.maxLength,i)}}if(r==="number"){if(n.min!==void 0){const i=n.message||`${t.label} must be at least ${n.min}`;e=e.min(n.min,i)}if(n.max!==void 0){const i=n.message||`${t.label} must be at most ${n.max}`;e=e.max(n.max,i)}}if(n.pattern){const i=typeof n.pattern=="string"?new RegExp(n.pattern):n.pattern,a=n.message||`${t.label} format is invalid`;e=e.test("pattern",a,o=>o?i.test(o):!0)}return n.custom&&(e=e.test("custom",n.message||`${t.label} is invalid`,i=>{const a=n.custom(i);return typeof a=="boolean"?a:!1})),e},ac=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const o=D.useMemo(()=>Array.from({length:t},(u,d)=>d+1),[t]),s=D.useMemo(()=>Math.round(e/t*100),[e,t]),l=u=>n[u-1]||`Step ${u}`,p=u=>u===e||a.includes(u)||u===e+1&&a.includes(e);return h.jsxs(C.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[h.jsx(C.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:o.map((u,d)=>{const f=u===e,g=u<e||a.includes(u),S=f||g?"primary.main":"#8F97A4";return h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center"},children:[h.jsxs(C.Box,{onClick:()=>p(u)&&r(u),sx:{display:"flex",alignItems:"center",cursor:p(u)?"pointer":"default"},children:[h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",border:f||g?"2px solid":"1px solid",borderColor:f||g?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:c=>f||g?$t(c.palette.primary.main,.2):"transparent",mr:.5,color:S,fontWeight:f||g?600:500,fontSize:"12px"},children:u}),i&&h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:600,color:S},children:l(u)})]}),d<o.length-1&&h.jsx(C.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:u<e?"primary.main":"#DFE3E8"}})]},u)})}),h.jsx(C.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${s}% complete`})]}),h.jsx(C.LinearProgress,{variant:"determinate",value:s,sx:{height:4,borderRadius:"50px",backgroundColor:u=>u.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},oc=({buttons:e,disabled:t=!1})=>{const r=s=>{s.onClick&&s.onClick()},n=e.filter(s=>s.position==="left"||!s.position),i=e.filter(s=>s.position==="center"),a=e.filter(s=>s.position==="right"),o=(s,l)=>{const p=(s.text||"").toLowerCase(),u=s.type==="submit"||p.includes("submit")||p.includes("save")||p.includes("next"),d=s.position==="left"||p.includes("cancel")||p.includes("back")||p.includes("draft"),f=s.type?s.type:u?"submit":"button",g=d?"outlined":"contained",S=s.disabled||t,c=w=>w&&["primary","secondary","error","info","success","warning"].includes(w)?w:"primary";return h.jsxs(C.Button,{type:f,variant:g,color:c(s.color),size:s.size||"large",disabled:S,onClick:s.onClick?()=>r(s):void 0,sx:s.sx,children:[s.loading&&h.jsx(C.CircularProgress,{size:20,sx:{mr:1}}),s.text]},`${s.text}-${l}`)};return h.jsxs(C.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsx(C.Box,{sx:{display:"flex",gap:2},children:n.map((s,l)=>o(s,l))}),h.jsx(C.Box,{sx:{display:"flex",gap:2},children:i.map((s,l)=>o(s,l))}),h.jsx(C.Box,{sx:{display:"flex",gap:2},children:a.map((s,l)=>o(s,l))})]})},eh=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:o})=>{const{buttons:s,position:l="right",layout:p="horizontal",spacing:u=2,sx:d}=e,f=x=>{let O="button",_="contained";return x.type?O=x.type:x.text.toLowerCase().includes("submit")||x.text.toLowerCase().includes("save")||x.text.toLowerCase().includes("next")?O="submit":(x.text.toLowerCase().includes("reset")||x.text.toLowerCase().includes("clear"))&&(O="reset"),(x.text.toLowerCase().includes("cancel")||x.text.toLowerCase().includes("back")||x.text.toLowerCase().includes("draft"))&&(_="outlined"),{buttonType:O,buttonVariant:_}},g=x=>["primary","secondary","error","warning","info","success"].includes(x||"")?x:"primary",S=x=>{const{buttonType:O}=f(x);x.onClick?x.onClick():O==="submit"&&t?t(o):a&&r&&(x.text.toLowerCase().includes("next")?r(n+1,i):(x.text.toLowerCase().includes("back")||x.text.toLowerCase().includes("previous"))&&r(n-1,i))},c=(x,O)=>{const{buttonType:_,buttonVariant:E}=f(x),v=g(x.color);return h.jsx(C.Button,{type:_,variant:E,color:v,size:x.size||"medium",disabled:x.disabled,onClick:()=>S(x),sx:x.sx,children:x.text},O)},w=()=>{const x={display:"flex",gap:u,...d};switch(l){case"left":return{...x,justifyContent:"flex-start"};case"center":return{...x,justifyContent:"center"};case"right":return{...x,justifyContent:"flex-end"};case"space-between":return{...x,justifyContent:"space-between"};default:return{...x,justifyContent:"flex-end"}}};return p==="vertical"?h.jsx(C.Box,{sx:w(),children:s.map((x,O)=>h.jsx(C.Box,{sx:{width:"100%"},children:c(x,O)},O))}):h.jsx(C.Box,{sx:w(),children:h.jsx(C.ButtonGroup,{variant:"outlined",size:"medium",children:s.map((x,O)=>c(x,O))})})},th=new cu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),rh=e=>h.jsx(mu,{client:th,children:h.jsx(nh,{...e})}),nh=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:o,defaultValues:s,showSubmitButton:l=!0,buttons:p,buttonGroup:u,formCardWrap:d=!0,formCardSx:f,formCardProps:g,baseUrl:S,apiHeaders:c,stepNavigationProps:w})=>{var $e,Le;const x=[...new Set(r.map(H=>H.step).filter(H=>H!=null&&H>0))].sort((H,ge)=>(H||0)-(ge||0)),O=x.length>1,_=x.length||1,[E,v]=D.useState(1),M=O?r.filter(H=>H.step===E):r,$=D.useMemo(()=>ic(M),[M]),{control:K,handleSubmit:U,formState:{errors:m},watch:I,setValue:z,resetField:q,trigger:B}=Lc({resolver:Wc($),mode:"onChange",defaultValues:s}),Q=I(),ae=D.useRef({});D.useEffect(()=>{const H=[];for(const ge of r){const ee=ge.depends_on;ee&&typeof ge.name=="string"&&H.push({dependentField:ge.name,dependencyName:ee})}if(H.length!==0)for(const{dependentField:ge,dependencyName:ee}of H){const xe=ae.current[ee],Z=Q==null?void 0:Q[ee];if(xe!==Z)try{q(ge)}catch{}ae.current[ee]=Z}},[r,Q,q]);const me=D.useRef(i);D.useEffect(()=>{me.current=i},[i]);const le=D.useMemo(()=>{try{return JSON.stringify(Q)}catch{return String(Date.now())}},[Q]),oe=D.useRef(null);D.useEffect(()=>{me.current&&oe.current!==le&&(oe.current=le,me.current(Q))},[le]);const V=async()=>{if(!O)return!0;const H=r.filter(ee=>ee.step===E);for(const ee of H)if(ee.required){const xe=Q[ee.name];let Z=!0;if(ee.type==="checkbox"?Z=xe===!0:Array.isArray(xe)?Z=xe.length>0:Z=xe!=null&&xe!=="",!Z)return!1}return await B()?!0:Object.keys(m).filter(xe=>H.some(Z=>Z.name===xe)).map(xe=>{const Z=m[xe];return typeof(Z==null?void 0:Z.message)=="string"?Z.message:`${xe} is invalid`}).length===0},L=D.useMemo(()=>{if(!O)return!0;const H=r.filter(ee=>ee.step===E);for(const ee of H)if(ee.required){const xe=Q[ee.name];let Z=!0;if(ee.type==="checkbox"?Z=xe===!0:Array.isArray(xe)?Z=xe.length>0:Z=xe!=null&&xe!=="",!Z)return!1}return Object.keys(m).filter(ee=>H.some(xe=>xe.name===ee)).length===0},[O,E,r,Q,m]),pe=D.useMemo(()=>{if(O)return L;for(const H of r)if(H.required){const ge=Q[H.name];let ee=!0;if(H.type==="checkbox"?ee=ge===!0:ee=ge!=null&&ge!==""&&!(Array.isArray(ge)&&ge.length===0),!ee)return!1}return Object.keys(m).length===0},[O,L,r,Q,m]),de=async H=>{H<1||H>_||H>E&&O&&!await V()||v(H)},se=async H=>{if(O&&E<_){console.warn("Form submission attempted on non-final step");return}o&&o(H),n(H)},N=async H=>{H&&(H.preventDefault(),H.stopPropagation()),O&&E<_&&await V()&&de(E+1)},J=H=>{H&&(H.preventDefault(),H.stopPropagation()),O&&E>1&&de(E-1)},ie=H=>H.col?H.col:(H.xs||H.sm||H.md||H.lg||H.xl)&&(H.xs||H.sm||H.md||H.lg||H.xl)||12,ue=t?C.createTheme({palette:{primary:{main:t.primaryColor||"#1976d2"},secondary:{main:t.secondaryColor||"#dc004e"},background:{default:t.backgroundColor||"#ffffff"},text:{primary:t.textColor||"#000000"}},shape:{borderRadius:t.borderRadius||4},spacing:t.spacing||8,typography:{fontFamily:(($e=t.typography)==null?void 0:$e.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((Le=t.typography)==null?void 0:Le.fontSize)=="number"?t.typography.fontSize:14}}):void 0,he=()=>{if(u&&u.buttons&&u.buttons.length>0){const H={...u,buttons:u.buttons.map(ge=>{const ee=(ge.text||"").toLowerCase(),xe=ge.type==="submit"||ee.includes("submit")||ee.includes("save")||ee.includes("finish")||ee.includes("complete"),Z=ee.includes("next");let y=!1;return O?(xe||Z)&&(y=!L):xe&&(y=!pe),{...ge,disabled:ge.disabled||y}})};return h.jsx(C.Box,{sx:{mt:3},children:h.jsx(eh,{config:H,onSubmit:se,onStepChange:de,currentStep:E,totalSteps:_,isMultiStep:O,formData:Q})})}if(p&&p.length>0){const H=p.map(ge=>{const ee=(ge.text||"").toLowerCase(),xe=ge.type==="submit"||ee.includes("submit")||ee.includes("save")||ee.includes("finish")||ee.includes("complete"),Z=ee.includes("next");let y=!1;return O?(xe||Z)&&(y=!L):xe&&(y=!pe),{...ge,disabled:ge.disabled||y}});return h.jsx(oc,{buttons:H})}return l?h.jsx(C.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:h.jsxs(C.Box,{sx:{display:"flex",gap:2},children:[O&&E>1&&h.jsx(C.Button,{type:"button",variant:"outlined",onClick:J,children:"Previous"}),O?E<_?h.jsx(C.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!L,onClick:N,children:"Next"}):h.jsx(C.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!L,children:a}):h.jsx(C.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!pe,children:a})]})}):null},fe=D.useMemo(()=>{const H=[];let ge=[];for(const ee of M)ee.type==="section"&&ge.length>0?(H.push(ge),ge=[ee]):ge.push(ee);return ge.length>0&&H.push(ge),H},[M]),ke=h.jsxs(C.Box,{component:"form",onSubmit:H=>{if(O&&E<_){H.preventDefault(),H.stopPropagation(),L&&N();return}U(se)(H)},id:e,onKeyDown:H=>{H.key==="Enter"&&O&&E<_&&(H.preventDefault(),L&&N())},children:[O&&h.jsx(ac,{currentStep:E,totalSteps:_,onStepChange:de,stepTitles:w==null?void 0:w.stepTitles,showStepTitles:(w==null?void 0:w.showStepTitles)!==!1}),fe.map((H,ge)=>{const ee=H.find(T=>T.type==="section"),xe=(ee==null?void 0:ee.cardWrap)!==!1,Z={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},y={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},j=h.jsx(h.Fragment,{children:H.map(T=>{const Y=ie(T);return h.jsx(C.Box,{sx:{gridColumn:`span ${Y}`},children:h.jsx(Wa,{field:T,control:K,errors:m,baseUrl:S,apiHeaders:c,formData:Q,setValue:z})},T.name)})});return xe?h.jsx(C.Card,{sx:{...Z,...(ee==null?void 0:ee.cardSx)||{}},...(ee==null?void 0:ee.cardProps)||{},children:j},`group-${ge}`):h.jsx(C.Box,{sx:y,children:j},`group-${ge}`)}),he()]}),W=d!==!1?h.jsx(C.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...f},...g,children:ke}):ke;return ue?h.jsx(C.ThemeProvider,{theme:ue,children:W}):W},ih=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:o})=>h.jsx(C.Box,{sx:{textAlign:"center"},children:h.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:o?"pointer":"default",...i},className:a,onClick:o,onError:s=>{s.currentTarget.src="/placeholder-image.png"}})});function Ar(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(u){try{p(n.next(u))}catch(d){o(d)}}function l(u){try{p(n.throw(u))}catch(d){o(d)}}function p(u){u.done?a(u.value):i(u.value).then(s,l)}p((n=n.apply(e,t||[])).next())})}const ah=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function en(e,t,r){const n=oh(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&gs(n,"path",a),gs(n,"relativePath",a),n}function oh(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=ah.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function gs(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const sh=[".DS_Store","Thumbs.db"];function lh(e){return Ar(this,void 0,void 0,function*(){return oi(e)&&ch(e.dataTransfer)?fh(e.dataTransfer,e.type):uh(e)?ph(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?dh(e):[]})}function ch(e){return oi(e)}function uh(e){return oi(e)&&oi(e.target)}function oi(e){return typeof e=="object"&&e!==null}function ph(e){return ma(e.target.files).map(t=>en(t))}function dh(e){return Ar(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>en(r))})}function fh(e,t){return Ar(this,void 0,void 0,function*(){if(e.items){const r=ma(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(mh));return xs(sc(n))}return xs(ma(e.files).map(r=>en(r)))})}function xs(e){return e.filter(t=>sh.indexOf(t.name)===-1)}function ma(e){if(e===null)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function mh(e){if(typeof e.webkitGetAsEntry!="function")return vs(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?lc(t):vs(e,t)}function sc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?sc(r):[r]],[])}function vs(e,t){return Ar(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const o=yield a.getFile();return o.handle=a,en(o)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return en(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function hh(e){return Ar(this,void 0,void 0,function*(){return e.isDirectory?lc(e):yh(e)})}function lc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(o=>Ar(this,void 0,void 0,function*(){if(o.length){const s=Promise.all(o.map(hh));i.push(s),a()}else try{const s=yield Promise.all(i);r(s)}catch(s){n(s)}}),o=>{n(o)})}a()})}function yh(e){return Ar(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=en(n,e.fullPath);t(i)},n=>{r(n)})})})}var Mn={},bs;function gh(){return bs||(bs=1,Mn.__esModule=!0,Mn.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}),Mn}var xh=gh();const Ii=Fa(xh);function ws(e){return wh(e)||bh(e)||uc(e)||vh()}function vh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
179
+ `+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let p=[];for(let u of Object.values(this.internalTests))u&&p.push(u);this.runTests({path:a,value:l,originalValue:o,options:r,tests:p},n,u=>{if(u.length)return i(u,l);this.runTests({path:a,value:l,originalValue:o,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:o,originalValue:s,path:l,options:p}=t,u=c=>{i||(i=!0,r(c,o))},d=c=>{i||(i=!0,n(c,o))},f=a.length,g=[];if(!f)return d([]);let S={value:o,originalValue:s,path:l,options:p,schema:this};for(let c=0;c<a.length;c++){const w=a[c];w(S,u,function(O){O&&(Array.isArray(O)?g.push(...O):g.push(O)),--f<=0&&d(g)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:o}){const s=t??r;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof s=="number";let p=n[s];const u=Object.assign({},o,{strict:!0,parent:n,value:p,originalValue:a[s],key:void 0,[l?"index":"key"]:s,path:l||s.includes(".")?`${i||""}[${l?s:`"${s}"`}]`:(i?`${i}.`:"")+t});return(d,f,g)=>this.resolve(u)._validate(p,u,f,g)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,r,(l,p)=>{rt.isError(l)&&(l.value=p),s(l)},(l,p)=>{l.length?s(new rt(l,p,void 0,void 0,a)):o(p)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw rt.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new rt(s,t,void 0,void 0,o);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(rt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(rt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Vr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=zr({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=zr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Ot.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ot.notNull){return this.nullability(!1,t)}required(t=Ot.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Ot.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=zr(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=ql(t).map(a=>new Fr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new ii(i,r):ii.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=zr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Ot.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=zr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),n}notOneOf(t,r=Ot.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=zr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:o}=r.spec;return{meta:i,label:n,optional:a,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,p,u)=>u.findIndex(d=>d.name===l.name)===p)}}}st.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])st.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:o}=Pm(this,t,r,n.context);return o[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])st.prototype[e]=st.prototype.oneOf;for(const e of["not","nope"])st.prototype[e]=st.prototype.notOneOf;const Im=()=>!0;function Kl(e){return new Ql(e)}class Ql extends st{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Im},t))}}Kl.prototype=Ql.prototype;function Yl(){return new Gl}class Gl extends st{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=da.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return wt(r)||r===!0}})}isFalse(t=da.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return wt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Yl.prototype=Gl.prototype;const Mm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function zm(e){const t=fa(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function fa(e){var t,r;const n=Mm.exec(e);return n?{year:Vt(n[1]),month:Vt(n[2],1)-1,day:Vt(n[3],1),hour:Vt(n[4]),minute:Vt(n[5]),second:Vt(n[6]),millisecond:n[7]?Vt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Vt(n[10]),minuteOffset:Vt(n[11])}:null}function Vt(e,t=0){return Number(e)||t}let Vm=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Bm=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Nm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Lm="^\\d{4}-\\d{2}-\\d{2}",qm="\\d{2}:\\d{2}:\\d{2}",Um="(([+-]\\d{2}(:?\\d{2})?)|Z)",Wm=new RegExp(`${Lm}T${qm}(\\.\\d+)?${Um}$`),Hm=e=>wt(e)||e===e.trim(),Km={}.toString();function un(){return new Zl}class Zl extends st{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===Km?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Ot.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=Xe.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=Xe.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=Xe.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||Xe.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=Xe.email){return this.matches(Vm,{name:"email",message:t,excludeEmptyString:!0})}url(t=Xe.url){return this.matches(Bm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Xe.uuid){return this.matches(Nm,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(Wm,{name:"datetime",message:r||Xe.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Xe.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const o=fa(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:r||Xe.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=fa(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Xe.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Hm})}lowercase(t=Xe.lowercase){return this.transform(r=>wt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>wt(r)||r===r.toLowerCase()})}uppercase(t=Xe.uppercase){return this.transform(r=>wt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>wt(r)||r===r.toUpperCase()})}}un.prototype=Zl.prototype;let Qm=e=>e!=+e;function Xl(){return new Jl}class Jl extends st{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Qm(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return n.isType(i)||i===null?i:parseFloat(i)})})}min(t,r=Wt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Wt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Wt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Wt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Wt.positive){return this.moreThan(0,t)}negative(t=Wt.negative){return this.lessThan(0,t)}integer(t=Wt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>wt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>wt(i)?i:Math[t](i))}}Xl.prototype=Jl.prototype;let ec=new Date(""),Ym=e=>Object.prototype.toString.call(e)==="[object Date]";function Ka(){return new On}class On extends st{constructor(){super({type:"date",check(t){return Ym(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=zm(t),isNaN(t)?On.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Fr.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=pa.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=pa.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}On.INVALID_DATE=ec;Ka.prototype=On.prototype;Ka.INVALID_DATE=ec;function Gm(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let l=Cr.split(o)[0];n.add(l),i.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),Fr.isRef(s)&&s.isSibling?a(s.path,o):Ha(s)&&"deps"in s&&s.deps.forEach(l=>a(l,o))}return km.array(Array.from(n),r).reverse()}function ms(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function tc(e){return(t,r)=>ms(e,t)-ms(e,r)}const Zm=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Un(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Un(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Un(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Un)}):"optional"in e?e.optional():e}const Xm=(e,t)=>{const r=[...Cr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Cr.getter(Cr.join(r),!0)(e);return!!(i&&n in i)};let hs=e=>Object.prototype.toString.call(e)==="[object Object]";function ys(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Jm=tc([]);function rc(e){return new nc(e)}class nc extends st{constructor(t){super({type:"object",check(r){return hs(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Jm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(d=>!this._nodes.includes(d))),l={},p=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),u=!1;for(const d of s){let f=a[d],g=d in i;if(f){let S,c=i[d];p.path=(r.path?`${r.path}.`:"")+d,f=f.resolve({value:c,context:r.context,parent:l});let w=f instanceof st?f.spec:void 0,x=w==null?void 0:w.strict;if(w!=null&&w.strip){u=u||d in i;continue}S=!r.__validating||!x?f.cast(i[d],p):i[d],S!==void 0&&(l[d]=S)}else g&&!o&&(l[d]=i[d]);(g!==d in l||l[d]!==i[d])&&(u=!0)}return u?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...a],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,p)=>{if(!s||!hs(p)){i(l,p);return}o=o||p;let u=[];for(let d of this._nodes){let f=this.fields[d];!f||Fr.isRef(f)||u.push(f.asNestedTest({options:r,key:d,parent:p,parentPath:r.path,originalParent:o}))}this.runTests({tests:u,value:p,originalValue:o,options:r},n,d=>{i(d.sort(this._sortErrors).concat(l),p)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const o=n[i];n[i]=o===void 0?a:o}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Gm(t,r),n._sortErrors=tc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Un(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=Cr.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return Xm(a,t)&&(o=Object.assign({},a),n||delete o[t],o[r]=i(a)),o})}json(){return this.transform(Zm)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||qn.exact,test(r){if(r==null)return!0;const n=ys(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=qn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=ys(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=qn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(Pi.camelCase)}snakeCase(){return this.transformKeys(Pi.snakeCase)}constantCase(){return this.transformKeys(t=>Pi.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,o]of Object.entries(r.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),n.fields[a]=o.describe(s)}return n}}rc.prototype=nc.prototype;const ic=e=>{const t={};return e.forEach(r=>{var a,o,s;let n;switch(r.type){case"text":case"textarea":case"tel":n=un(),r.validation?n=cr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"email":n=un().email(((a=r.validation)==null?void 0:a.message)||`${r.label} must be a valid email address`),r.validation&&(n=cr(n,r,"string"));break;case"password":n=un(),r.validation?n=cr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"number":n=Xl().typeError(`${r.label} must be a number`),r.validation?n=cr(n,r,"number"):(r.min!==void 0&&(n=n.min(r.min,`${r.label} must be at least ${r.min}`)),r.max!==void 0&&(n=n.max(r.max,`${r.label} must be at most ${r.max}`)));break;case"select":n=un(),r.validation&&(n=cr(n,r,"string"));break;case"checkbox":n=Yl(),r.validation&&(n=cr(n,r,"boolean"));break;case"date":n=Ka().typeError(`${r.label} must be a valid date`),r.validation?n=cr(n,r,"date"):(r.minDate&&(n=n.min(new Date(r.minDate),`${r.label} must be after ${r.minDate}`)),r.maxDate&&(n=n.max(new Date(r.maxDate),`${r.label} must be before ${r.maxDate}`)));break;default:n=Kl()}if(((o=r.validation)==null?void 0:o.required)!==void 0?r.validation.required:r.required){const l=((s=r.validation)==null?void 0:s.message)||`${r.label} is required`;n=n.required(l)}t[r.name]=n}),rc().shape(t)},cr=(e,t,r)=>{const n=t.validation;if(!n)return e;if(r==="string"){if(n.minLength!==void 0){const i=n.message||`${t.label} must be at least ${n.minLength} characters`;e=e.min(n.minLength,i)}if(n.maxLength!==void 0){const i=n.message||`${t.label} must be at most ${n.maxLength} characters`;e=e.max(n.maxLength,i)}}if(r==="number"){if(n.min!==void 0){const i=n.message||`${t.label} must be at least ${n.min}`;e=e.min(n.min,i)}if(n.max!==void 0){const i=n.message||`${t.label} must be at most ${n.max}`;e=e.max(n.max,i)}}if(n.pattern){const i=typeof n.pattern=="string"?new RegExp(n.pattern):n.pattern,a=n.message||`${t.label} format is invalid`;e=e.test("pattern",a,o=>o?i.test(o):!0)}return n.custom&&(e=e.test("custom",n.message||`${t.label} is invalid`,i=>{const a=n.custom(i);return typeof a=="boolean"?a:!1})),e},ac=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const o=D.useMemo(()=>Array.from({length:t},(u,d)=>d+1),[t]),s=D.useMemo(()=>Math.round(e/t*100),[e,t]),l=u=>n[u-1]||`Step ${u}`,p=u=>u===e||a.includes(u)||u===e+1&&a.includes(e);return h.jsxs(C.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[h.jsx(C.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:o.map((u,d)=>{const f=u===e,g=u<e||a.includes(u),S=f||g?"primary.main":"#8F97A4";return h.jsxs(C.Box,{sx:{display:"flex",alignItems:"center"},children:[h.jsxs(C.Box,{onClick:()=>p(u)&&r(u),sx:{display:"flex",alignItems:"center",cursor:p(u)?"pointer":"default"},children:[h.jsx(C.Box,{sx:{width:24,height:24,borderRadius:"50%",border:f||g?"2px solid":"1px solid",borderColor:f||g?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:c=>f||g?$t(c.palette.primary.main,.2):"transparent",mr:.5,color:S,fontWeight:f||g?600:500,fontSize:"12px"},children:u}),i&&h.jsx(C.Typography,{sx:{fontSize:"12px",fontWeight:600,color:S},children:l(u)})]}),d<o.length-1&&h.jsx(C.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:u<e?"primary.main":"#DFE3E8"}})]},u)})}),h.jsx(C.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${s}% complete`})]}),h.jsx(C.LinearProgress,{variant:"determinate",value:s,sx:{height:4,borderRadius:"50px",backgroundColor:u=>u.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},oc=({buttons:e,disabled:t=!1})=>{const r=s=>{s.onClick&&s.onClick()},n=e.filter(s=>s.position==="left"||!s.position),i=e.filter(s=>s.position==="center"),a=e.filter(s=>s.position==="right"),o=(s,l)=>{const p=(s.text||"").toLowerCase(),u=s.type==="submit"||p.includes("submit")||p.includes("save")||p.includes("next"),d=s.position==="left"||p.includes("cancel")||p.includes("back")||p.includes("draft"),f=s.type?s.type:u?"submit":"button",g=d?"outlined":"contained",S=s.disabled||t,c=w=>w&&["primary","secondary","error","info","success","warning"].includes(w)?w:"primary";return h.jsxs(C.Button,{type:f,variant:g,color:c(s.color),size:s.size||"large",disabled:S,onClick:s.onClick?()=>r(s):void 0,sx:s.sx,children:[s.loading&&h.jsx(C.CircularProgress,{size:20,sx:{mr:1}}),s.text]},`${s.text}-${l}`)};return h.jsxs(C.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsx(C.Box,{sx:{display:"flex",gap:2},children:n.map((s,l)=>o(s,l))}),h.jsx(C.Box,{sx:{display:"flex",gap:2},children:i.map((s,l)=>o(s,l))}),h.jsx(C.Box,{sx:{display:"flex",gap:2},children:a.map((s,l)=>o(s,l))})]})},eh=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:o})=>{const{buttons:s,position:l="right",layout:p="horizontal",spacing:u=2,sx:d}=e,f=x=>{let O="button",_="contained";return x.type?O=x.type:x.text.toLowerCase().includes("submit")||x.text.toLowerCase().includes("save")||x.text.toLowerCase().includes("next")?O="submit":(x.text.toLowerCase().includes("reset")||x.text.toLowerCase().includes("clear"))&&(O="reset"),(x.text.toLowerCase().includes("cancel")||x.text.toLowerCase().includes("back")||x.text.toLowerCase().includes("draft"))&&(_="outlined"),{buttonType:O,buttonVariant:_}},g=x=>["primary","secondary","error","warning","info","success"].includes(x||"")?x:"primary",S=x=>{const{buttonType:O}=f(x);x.onClick?x.onClick():O==="submit"&&t?t(o):a&&r&&(x.text.toLowerCase().includes("next")?r(n+1,i):(x.text.toLowerCase().includes("back")||x.text.toLowerCase().includes("previous"))&&r(n-1,i))},c=(x,O)=>{const{buttonType:_,buttonVariant:E}=f(x),v=g(x.color);return h.jsx(C.Button,{type:_,variant:E,color:v,size:x.size||"medium",disabled:x.disabled,onClick:()=>S(x),sx:x.sx,children:x.text},O)},w=()=>{const x={display:"flex",gap:u,...d};switch(l){case"left":return{...x,justifyContent:"flex-start"};case"center":return{...x,justifyContent:"center"};case"right":return{...x,justifyContent:"flex-end"};case"space-between":return{...x,justifyContent:"space-between"};default:return{...x,justifyContent:"flex-end"}}};return p==="vertical"?h.jsx(C.Box,{sx:w(),children:s.map((x,O)=>h.jsx(C.Box,{sx:{width:"100%"},children:c(x,O)},O))}):h.jsx(C.Box,{sx:w(),children:h.jsx(C.ButtonGroup,{variant:"outlined",size:"medium",children:s.map((x,O)=>c(x,O))})})},th=new cu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),rh=e=>h.jsx(mu,{client:th,children:h.jsx(nh,{...e})}),nh=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:o,defaultValues:s,showSubmitButton:l=!0,buttons:p,buttonGroup:u,formCardWrap:d,formCardSx:f,formCardProps:g,baseUrl:S,apiHeaders:c,stepNavigationProps:w})=>{var $e,Le;const x=[...new Set(r.map(H=>H.step).filter(H=>H!=null&&H>0))].sort((H,ge)=>(H||0)-(ge||0)),O=x.length>1,_=x.length||1,[E,v]=D.useState(1),M=O?r.filter(H=>H.step===E):r,$=D.useMemo(()=>ic(M),[M]),{control:K,handleSubmit:U,formState:{errors:m},watch:I,setValue:z,resetField:q,trigger:B}=Lc({resolver:Wc($),mode:"onChange",defaultValues:s}),Q=I(),ae=D.useRef({});D.useEffect(()=>{const H=[];for(const ge of r){const ee=ge.depends_on;ee&&typeof ge.name=="string"&&H.push({dependentField:ge.name,dependencyName:ee})}if(H.length!==0)for(const{dependentField:ge,dependencyName:ee}of H){const xe=ae.current[ee],Z=Q==null?void 0:Q[ee];if(xe!==Z)try{q(ge)}catch{}ae.current[ee]=Z}},[r,Q,q]);const me=D.useRef(i);D.useEffect(()=>{me.current=i},[i]);const le=D.useMemo(()=>{try{return JSON.stringify(Q)}catch{return String(Date.now())}},[Q]),oe=D.useRef(null);D.useEffect(()=>{me.current&&oe.current!==le&&(oe.current=le,me.current(Q))},[le]);const V=async()=>{if(!O)return!0;const H=r.filter(ee=>ee.step===E);for(const ee of H)if(ee.required){const xe=Q[ee.name];let Z=!0;if(ee.type==="checkbox"?Z=xe===!0:Array.isArray(xe)?Z=xe.length>0:Z=xe!=null&&xe!=="",!Z)return!1}return await B()?!0:Object.keys(m).filter(xe=>H.some(Z=>Z.name===xe)).map(xe=>{const Z=m[xe];return typeof(Z==null?void 0:Z.message)=="string"?Z.message:`${xe} is invalid`}).length===0},L=D.useMemo(()=>{if(!O)return!0;const H=r.filter(ee=>ee.step===E);for(const ee of H)if(ee.required){const xe=Q[ee.name];let Z=!0;if(ee.type==="checkbox"?Z=xe===!0:Array.isArray(xe)?Z=xe.length>0:Z=xe!=null&&xe!=="",!Z)return!1}return Object.keys(m).filter(ee=>H.some(xe=>xe.name===ee)).length===0},[O,E,r,Q,m]),pe=D.useMemo(()=>{if(O)return L;for(const H of r)if(H.required){const ge=Q[H.name];let ee=!0;if(H.type==="checkbox"?ee=ge===!0:ee=ge!=null&&ge!==""&&!(Array.isArray(ge)&&ge.length===0),!ee)return!1}return Object.keys(m).length===0},[O,L,r,Q,m]),de=async H=>{H<1||H>_||H>E&&O&&!await V()||v(H)},se=async H=>{if(O&&E<_){console.warn("Form submission attempted on non-final step");return}o&&o(H),n(H)},N=async H=>{H&&(H.preventDefault(),H.stopPropagation()),O&&E<_&&await V()&&de(E+1)},J=H=>{H&&(H.preventDefault(),H.stopPropagation()),O&&E>1&&de(E-1)},ie=H=>H.col?H.col:(H.xs||H.sm||H.md||H.lg||H.xl)&&(H.xs||H.sm||H.md||H.lg||H.xl)||12,ue=t?C.createTheme({palette:{primary:{main:t.primaryColor||"#1976d2"},secondary:{main:t.secondaryColor||"#dc004e"},background:{default:t.backgroundColor||"#ffffff"},text:{primary:t.textColor||"#000000"}},shape:{borderRadius:t.borderRadius||4},spacing:t.spacing||8,typography:{fontFamily:(($e=t.typography)==null?void 0:$e.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((Le=t.typography)==null?void 0:Le.fontSize)=="number"?t.typography.fontSize:14}}):void 0,he=()=>{if(u&&u.buttons&&u.buttons.length>0){const H={...u,buttons:u.buttons.map(ge=>{const ee=(ge.text||"").toLowerCase(),xe=ge.type==="submit"||ee.includes("submit")||ee.includes("save")||ee.includes("finish")||ee.includes("complete"),Z=ee.includes("next");let y=!1;return O?(xe||Z)&&(y=!L):xe&&(y=!pe),{...ge,disabled:ge.disabled||y}})};return h.jsx(C.Box,{sx:{mt:3},children:h.jsx(eh,{config:H,onSubmit:se,onStepChange:de,currentStep:E,totalSteps:_,isMultiStep:O,formData:Q})})}if(p&&p.length>0){const H=p.map(ge=>{const ee=(ge.text||"").toLowerCase(),xe=ge.type==="submit"||ee.includes("submit")||ee.includes("save")||ee.includes("finish")||ee.includes("complete"),Z=ee.includes("next");let y=!1;return O?(xe||Z)&&(y=!L):xe&&(y=!pe),{...ge,disabled:ge.disabled||y}});return h.jsx(oc,{buttons:H})}return l?h.jsx(C.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:h.jsxs(C.Box,{sx:{display:"flex",gap:2},children:[O&&E>1&&h.jsx(C.Button,{type:"button",variant:"outlined",onClick:J,children:"Previous"}),O?E<_?h.jsx(C.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!L,onClick:N,children:"Next"}):h.jsx(C.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!L,children:a}):h.jsx(C.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!pe,children:a})]})}):null},fe=D.useMemo(()=>{const H=[];let ge=[];for(const ee of M)ee.type==="section"&&ge.length>0?(H.push(ge),ge=[ee]):ge.push(ee);return ge.length>0&&H.push(ge),H},[M]),ke=h.jsxs(C.Box,{component:"form",onSubmit:H=>{if(O&&E<_){H.preventDefault(),H.stopPropagation(),L&&N();return}U(se)(H)},id:e,onKeyDown:H=>{H.key==="Enter"&&O&&E<_&&(H.preventDefault(),L&&N())},children:[O&&h.jsx(ac,{currentStep:E,totalSteps:_,onStepChange:de,stepTitles:w==null?void 0:w.stepTitles,showStepTitles:(w==null?void 0:w.showStepTitles)!==!1}),fe.map((H,ge)=>{const ee=H.find(T=>T.type==="section"),xe=(ee==null?void 0:ee.cardWrap)!==!1,Z={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},y={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},j=h.jsx(h.Fragment,{children:H.map(T=>{const Y=ie(T);return h.jsx(C.Box,{sx:{gridColumn:`span ${Y}`},children:h.jsx(Wa,{field:T,control:K,errors:m,baseUrl:S,apiHeaders:c,formData:Q,setValue:z})},T.name)})});return xe?h.jsx(C.Card,{sx:{...Z,...(ee==null?void 0:ee.cardSx)||{}},...(ee==null?void 0:ee.cardProps)||{},children:j},`group-${ge}`):h.jsx(C.Box,{sx:y,children:j},`group-${ge}`)}),he()]}),W=d?h.jsx(C.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...f},...g,children:ke}):ke;return ue?h.jsx(C.ThemeProvider,{theme:ue,children:W}):W},ih=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:o})=>h.jsx(C.Box,{sx:{textAlign:"center"},children:h.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:o?"pointer":"default",...i},className:a,onClick:o,onError:s=>{s.currentTarget.src="/placeholder-image.png"}})});function Ar(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(u){try{p(n.next(u))}catch(d){o(d)}}function l(u){try{p(n.throw(u))}catch(d){o(d)}}function p(u){u.done?a(u.value):i(u.value).then(s,l)}p((n=n.apply(e,t||[])).next())})}const ah=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function en(e,t,r){const n=oh(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&gs(n,"path",a),gs(n,"relativePath",a),n}function oh(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=ah.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function gs(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const sh=[".DS_Store","Thumbs.db"];function lh(e){return Ar(this,void 0,void 0,function*(){return oi(e)&&ch(e.dataTransfer)?fh(e.dataTransfer,e.type):uh(e)?ph(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?dh(e):[]})}function ch(e){return oi(e)}function uh(e){return oi(e)&&oi(e.target)}function oi(e){return typeof e=="object"&&e!==null}function ph(e){return ma(e.target.files).map(t=>en(t))}function dh(e){return Ar(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>en(r))})}function fh(e,t){return Ar(this,void 0,void 0,function*(){if(e.items){const r=ma(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(mh));return xs(sc(n))}return xs(ma(e.files).map(r=>en(r)))})}function xs(e){return e.filter(t=>sh.indexOf(t.name)===-1)}function ma(e){if(e===null)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function mh(e){if(typeof e.webkitGetAsEntry!="function")return vs(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?lc(t):vs(e,t)}function sc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?sc(r):[r]],[])}function vs(e,t){return Ar(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const o=yield a.getFile();return o.handle=a,en(o)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return en(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function hh(e){return Ar(this,void 0,void 0,function*(){return e.isDirectory?lc(e):yh(e)})}function lc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(o=>Ar(this,void 0,void 0,function*(){if(o.length){const s=Promise.all(o.map(hh));i.push(s),a()}else try{const s=yield Promise.all(i);r(s)}catch(s){n(s)}}),o=>{n(o)})}a()})}function yh(e){return Ar(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=en(n,e.fullPath);t(i)},n=>{r(n)})})})}var Mn={},bs;function gh(){return bs||(bs=1,Mn.__esModule=!0,Mn.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0}),Mn}var xh=gh();const Ii=Fa(xh);function ws(e){return wh(e)||bh(e)||uc(e)||vh()}function vh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
180
180
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wh(e){if(Array.isArray(e))return ha(e)}function Ss(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ss(Object(r),!0).forEach(function(n){cc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ss(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gn(e,t){return Eh(e)||Ch(e,t)||uc(e,t)||Sh()}function Sh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
181
181
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uc(e,t){if(e){if(typeof e=="string")return ha(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ha(e,t)}}function ha(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ch(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,o,s;try{for(r=r.call(e);!(i=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,s=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}return n}}function Eh(e){if(Array.isArray(e))return e}var kh=typeof Ii=="function"?Ii:Ii.default,Th="file-invalid-type",Oh="file-too-large",jh="file-too-small",Fh="too-many-files",Ah=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=t.split(","),n=r.length>1?"one of ".concat(r.join(", ")):r[0];return{code:Th,message:"File type must be ".concat(n)}},Es=function(t){return{code:Oh,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ks=function(t){return{code:jh,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},_h={code:Fh,message:"Too many files"};function pc(e,t){var r=e.type==="application/x-moz-file"||kh(e,t);return[r,r?null:Ah(t)]}function dc(e,t,r){if(pr(e.size))if(pr(t)&&pr(r)){if(e.size>r)return[!1,Es(r)];if(e.size<t)return[!1,ks(t)]}else{if(pr(t)&&e.size<t)return[!1,ks(t)];if(pr(r)&&e.size>r)return[!1,Es(r)]}return[!0,null]}function pr(e){return e!=null}function Rh(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(l){var p=pc(l,r),u=gn(p,1),d=u[0],f=dc(l,n,i),g=gn(f,1),S=g[0],c=s?s(l):null;return d&&S&&!c})}function si(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function zn(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ts(e){e.preventDefault()}function $h(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Dh(e){return e.indexOf("Edge/")!==-1}function Ph(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return $h(e)||Dh(e)}function Tt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!si(n)&&s&&s.apply(void 0,[n].concat(a)),si(n)})}}function Ih(){return"showOpenFilePicker"in window}function Mh(e){if(pr(e)){var t=Object.entries(e).filter(function(r){var n=gn(r,2),i=n[0],a=n[1],o=!0;return fc(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(mc))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(r,n){var i=gn(n,2),a=i[0],o=i[1];return Cs(Cs({},r),{},cc({},a,o))},{});return[{description:"Files",accept:t}]}return e}function zh(e){if(pr(e))return Object.entries(e).reduce(function(t,r){var n=gn(r,2),i=n[0],a=n[1];return[].concat(ws(t),[i],ws(a))},[]).filter(function(t){return fc(t)||mc(t)}).join(",")}function Vh(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Bh(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function fc(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function mc(e){return/^.*\.[\w]+$/.test(e)}var Nh=["children"],Lh=["open"],qh=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Uh=["refKey","onChange","onClick"];function Wh(e){return Qh(e)||Kh(e)||hc(e)||Hh()}function Hh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
182
182
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kh(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qh(e){if(Array.isArray(e))return ya(e)}function Mi(e,t){return Zh(e)||Gh(e,t)||hc(e,t)||Yh()}function Yh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "finform-react-builder",
3
- "version": "1.8.19",
3
+ "version": "1.8.20",
4
4
  "description": "A powerful, flexible React form builder with dynamic field rendering, custom validation, multi-step forms, Material-UI integration, image component support, toggle/radio buttons, switches, autocomplete, and advanced button positioning",
5
5
  "keywords": [
6
6
  "react",