finform-react-builder 1.12.3 → 1.12.4
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 +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -9607,8 +9607,8 @@ const el = yt(/* @__PURE__ */ p("path", {
|
|
|
9607
9607
|
}),
|
|
9608
9608
|
children: [
|
|
9609
9609
|
/* @__PURE__ */ te(K, { sx: { display: "flex", flexDirection: "column", minWidth: 0, flex: 1, textAlign: n }, children: [
|
|
9610
|
-
e && /* @__PURE__ */ p(he, { variant: "h6", sx: (a) => ({ color: a.palette.text.primary, fontSize:
|
|
9611
|
-
t && /* @__PURE__ */ p(he, { variant: "body2", sx: (a) => ({ color: a.palette.text.secondary, mt: e ? 0.5 : 0, fontSize: 12, fontWeight:
|
|
9610
|
+
e && /* @__PURE__ */ p(he, { variant: "h6", sx: (a) => ({ color: a.palette.text.primary, fontSize: 16, fontWeight: 500, lineHeight: 1.3 }), children: e }),
|
|
9611
|
+
t && /* @__PURE__ */ p(he, { variant: "body2", sx: (a) => ({ color: a.palette.text.secondary, mt: e ? 0.5 : 0, fontSize: 12, fontWeight: 500 }), children: t })
|
|
9612
9612
|
] }),
|
|
9613
9613
|
r && /* @__PURE__ */ p(K, { sx: { display: "flex", alignItems: "center", gap: 1, flexWrap: "wrap" }, children: r })
|
|
9614
9614
|
]
|
package/dist/index.js
CHANGED
|
@@ -173,7 +173,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
173
173
|
`:null,Fh=typeof Ra!="string"?fr.css`
|
|
174
174
|
animation: ${Ra} 1.4s ease-in-out infinite;
|
|
175
175
|
`:null,Ah=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${De(n)}`],svg:["svg"],circle:["circle",`circle${De(r)}`,i&&"circleDisableShrink"]};return un(a,Th,t)},Oh=yt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${De(r.color)}`]]}})(Pr(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:jh||{animation:`${_a} 1.4s linear infinite`}},...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),_h=yt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),Rh=yt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${De(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(Pr(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:Fh||{animation:`${Ra} 1.4s ease-in-out infinite`}}]}))),ac=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:s=!1,size:o=40,style:c,thickness:p=3.6,value:d=0,variant:f="indeterminate",...u}=n,x={...n,color:a,disableShrink:s,size:o,thickness:p,value:d,variant:f},E=Ah(x),m={},S={},v={};if(f==="determinate"){const j=2*Math.PI*((Qt-p)/2);m.strokeDasharray=j.toFixed(3),v["aria-valuenow"]=Math.round(d),m.strokeDashoffset=`${((100-d)/100*j).toFixed(3)}px`,S.transform="rotate(-90deg)"}return l.jsx(Oh,{className:it(E.root,i),style:{width:o,height:o,...S,...c},ownerState:x,ref:r,role:"progressbar",...v,...u,children:l.jsx(_h,{className:E.svg,ownerState:x,viewBox:`${Qt/2} ${Qt/2} ${Qt} ${Qt}`,children:l.jsx(Rh,{className:E.circle,style:m,ownerState:x,cx:Qt,cy:Qt,r:(Qt-p)/2,fill:"none",strokeWidth:p})})})});process.env.NODE_ENV!=="production"&&(ac.propTypes={classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","primary","secondary","error","info","success","warning"]),k.string]),disableShrink:is(k.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:k.oneOfType([k.number,k.string]),style:k.object,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),thickness:k.number,value:k.number,variant:k.oneOf(["determinate","indeterminate"])});function $h(e){return mr("MuiIconButton",e)}const Fo=Dr("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Ph=e=>{const{classes:t,disabled:r,color:n,edge:i,size:a,loading:s}=e,o={root:["root",s&&"loading",r&&"disabled",n!=="default"&&`color${De(n)}`,i&&`edge${De(i)}`,`size${De(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return un(o,$h,t)},Dh=yt(ic,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${De(r.color)}`],r.edge&&t[`edge${De(r.edge)}`],t[`size${De(r.size)}`]]}})(Pr(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Et(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Pr(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(li()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Et((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Fo.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Fo.loading}`]:{color:"transparent"}}))),Ih=yt("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Gn=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:s,color:o="default",disabled:c=!1,disableFocusRipple:p=!1,size:d="medium",id:f,loading:u=null,loadingIndicator:x,...E}=n,m=Xf(f),S=x??l.jsx(ac,{"aria-labelledby":m,color:"inherit",size:16}),v={...n,edge:i,color:o,disabled:c,disableFocusRipple:p,loading:u,loadingIndicator:S,size:d},j=Ph(v);return l.jsxs(Dh,{id:u?m:f,className:it(j.root,s),centerRipple:!0,focusRipple:!p,disabled:c||u,ref:r,...E,ownerState:v,children:[typeof u=="boolean"&&l.jsx("span",{className:j.loadingWrapper,style:{display:"contents"},children:l.jsx(Ih,{className:j.loadingIndicator,ownerState:v,children:u&&S})}),a]})});process.env.NODE_ENV!=="production"&&(Gn.propTypes={children:is(k.node,e=>ae.Children.toArray(e.children).some(r=>ae.isValidElement(r)&&r.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
176
|
-
`)):null),classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),k.string]),disabled:k.bool,disableFocusRipple:k.bool,disableRipple:k.bool,edge:k.oneOf(["end","start",!1]),id:k.string,loading:k.bool,loadingIndicator:k.node,size:k.oneOfType([k.oneOf(["small","medium","large"]),k.string]),sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object])});const Ao=pt(l.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"),Oo=pt(l.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"),Mh=pt(l.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"),ls=pt(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),pi=pt(l.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"),zh=pt(l.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"),ee={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"},_o=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}},Bh=(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(""),Lt=(e,t,r)=>{const n=_o(e),i=_o(t);return Bh(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},cs=e=>{const t="#FFFFFF",r="#000000";return{50:Lt(t,e,.08),100:Lt(t,e,.16),200:Lt(t,e,.28),300:Lt(t,e,.4),400:Lt(t,e,.55),500:e,600:Lt(e,r,.1),700:Lt(e,r,.2),800:Lt(e,r,.3),900:Lt(e,r,.42)}},Vh=cs(ee.primary.main),Nh=cs(ee.secondary.main),Ze=cs(ee.text.primary),Lh={primary:ee.primary.main,secondary:ee.secondary.main,textPrimary:ee.text.primary,textSecondary:ee.text.secondary,divider:ee.divider,background:ee.background},vt=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:c="6px",endorsementHeight:p=28,endorsementPaddingX:d="8px",...f})=>{var m,S;const u=!!r,x=a?l.jsx(g.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:p,paddingLeft:d,paddingRight:d,borderRadius:c,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,E={...f.InputProps,endAdornment:x||i?l.jsxs(g.InputAdornment,{sx:{mr:-1},position:"end",children:[x||i,(m=f.InputProps)==null?void 0:m.endAdornment]}):(S=f.InputProps)==null?void 0:S.endAdornment};return l.jsxs(g.Box,{children:[u&&l.jsx(g.Typography,{variant:n,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:r}),l.jsx(g.TextField,{fullWidth:!0,size:"small",...f,InputProps:E,label:u?void 0:f.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:ee.background.paper,borderRadius:"8px","& fieldset":{borderColor:ee.divider},"&:hover fieldset":{borderColor:Ze[300]},"&.Mui-focused fieldset":{borderColor:Ze[400]},"&.Mui-error fieldset":{borderColor:ee.error.main}},"& .MuiInputBase-input":{color:ee.text.primary},"& .MuiFormLabel-root":{color:ee.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:ee.text.primary},"& .MuiFormHelperText-root":{color:e?ee.error.main:ee.text.secondary},...t}})]})},$i=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:c,sx:p,...d})=>{const f=$.useId(),u=c==null||c===""||Array.isArray(c)&&c.length===0,x=E=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...E,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:ee.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(g.FormControl,{fullWidth:!0,size:a,error:!!d.error,variant:"outlined",children:[e&&l.jsx(g.Typography,{variant:s,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(g.InputLabel,{id:f,shrink:!u||!!o,sx:{color:ee.text.secondary,"&.Mui-focused":{color:ee.text.primary},"&.Mui-error":{color:ee.error.main}},children:t}),l.jsx(g.Select,{...d,value:c,labelId:t?f:void 0,label:t,displayEmpty:!0,input:l.jsx(g.OutlinedInput,{label:t}),IconComponent:x,renderValue:E=>{const m=E;if(u)return l.jsx("span",{style:{color:ee.text.secondary},children:o??""});const S=r.find(v=>v.value===m);return(S==null?void 0:S.label)??String(m)},endAdornment:n?l.jsx(g.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${ee.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:ee.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:ee.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:ee.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:Ze[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:Ze[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:ee.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...p},children:n?l.jsx(g.MenuItem,{disabled:!0,children:l.jsx(g.CircularProgress,{size:16})}):r.map(E=>l.jsx(g.MenuItem,{value:E.value,sx:{backgroundColor:ee.background.paper,color:ee.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:Ze[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:Ze[50],borderRadius:"4px"}},children:E.label},E.value))}),i&&l.jsx(g.FormHelperText,{children:i})]})},qh=e=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:ee.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),sc=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:c="subtitle2",disabled:p,loading:d,error:f,helperText:u,onOpen:x,noOptionsText:E,sx:m})=>l.jsxs(g.Box,{children:[a&&l.jsx(g.Typography,{variant:c,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:a}),l.jsx(g.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:l.jsx(qh,{}),disabled:p,loading:d,onOpen:x,noOptionsText:E,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${ee.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:ee.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:ee.divider},"&:hover fieldset":{borderColor:Ze[300]},"&.Mui-focused fieldset":{borderColor:Ze[400]},"&.Mui-error fieldset":{borderColor:ee.error.main}},"& .MuiInputBase-input":{color:ee.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:ee.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...m},getOptionLabel:S=>typeof S=="string"?S:(S==null?void 0:S.label)??"",isOptionEqualToValue:(S,v)=>((S==null?void 0:S.value)??S)===((v==null?void 0:v.value)??v),renderOption:(S,v,{selected:j})=>{const{key:D,...F}=S;return l.jsxs(g.Box,{component:"li",...F,sx:{backgroundColor:ee.background.paper,color:ee.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:Ze[50]},"&.Mui-focused":{backgroundColor:Ze[50]},...j?{backgroundColor:Ze[50]}:{}},children:[n&&l.jsx(g.Checkbox,{checked:j}),l.jsx(g.Typography,{variant:"body2",sx:{color:ee.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]},D)},renderInput:S=>l.jsx(g.TextField,{...S,label:i,placeholder:s,size:"small",error:f,helperText:u,InputLabelProps:{shrink:!!r||!!s,sx:{color:ee.text.secondary,"&.Mui-focused":{color:ee.text.primary},"&.Mui-error":{color:ee.error.main}}},InputProps:{...S.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[d?l.jsx(g.CircularProgress,{size:20}):null,S.InputProps.endAdornment]})}}),onChange:(S,v)=>o(v)})]}),Ht=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),oc=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:p,groupPadding:d=1.5,itemGap:f=1,disabled:u=!1})=>{const x=typeof i=="number"&&i>0,E=x?i:12,m=i===!0,S=i===!1&&!x,v=(j,D)=>{const F=Array.isArray(r)?[...r]:[];D?F.includes(j)||a([...F,j]):a(F.filter(C=>C!==j))};return l.jsxs(g.FormControl,{error:p,disabled:u,sx:j=>{var D;return{display:"flex",flexDirection:"column",px:j.spacing(d),borderRadius:((D=j.shape)==null?void 0:D.borderRadius)||8,mx:-2.5,backgroundColor:j.palette.background.paper}},children:[s==="top"&&e&&l.jsx(g.Typography,{variant:o,sx:j=>({color:j.palette.text.primary,mb:.5,fontSize:j.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(g.FormLabel,{sx:j=>({color:j.palette.text.secondary,mb:.5,mx:1,fontSize:j.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:j.palette.text.primary},"&.Mui-error":{color:j.palette.error.main}}),children:t}),x&&l.jsx(g.Box,{sx:j=>({display:"grid",gridTemplateColumns:`repeat(${E}, 1fr)`,gap:j.spacing(f),mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),m&&l.jsx(g.Box,{sx:j=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:j.spacing(f),alignItems:"center",mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),S&&l.jsx(g.Box,{sx:j=>({display:"flex",flexDirection:"column",gap:j.spacing(f),alignItems:"flex-start",mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),c&&l.jsx(g.FormHelperText,{sx:{mt:.5},children:c})]})},di=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(g.FormControlLabel,{control:l.jsx(g.Switch,{checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),Sr=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:p,groupPadding:d=1.5,itemGap:f=1})=>l.jsxs(g.FormControl,{error:p,sx:u=>{var x;return{display:"flex",flexDirection:"column",px:u.spacing(d),borderRadius:((x=u.shape)==null?void 0:x.borderRadius)||8,mx:-2.5,backgroundColor:u.palette.background.paper}},children:[s==="top"&&e&&l.jsx(g.Typography,{variant:o,sx:u=>({color:u.palette.text.primary,mb:.5,fontSize:u.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(g.FormLabel,{sx:u=>({color:u.palette.text.secondary,mb:.5,mx:1,fontSize:u.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:u.palette.text.primary},"&.Mui-error":{color:u.palette.error.main}}),children:t}),l.jsx(g.RadioGroup,{row:i,value:r,onChange:u=>a(u.target.value),sx:u=>({display:"flex",flexDirection:i?"row":"column",gap:u.spacing(f),alignItems:i?"center":"flex-start"}),children:n.map(u=>l.jsx(g.FormControlLabel,{value:u.value,control:l.jsx(g.Radio,{size:"small",sx:x=>({color:x.palette.text.secondary,"&.Mui-checked":{color:x.palette.primary.main}})}),label:l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(g.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:u.label}),u.description&&l.jsx(g.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:u.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(u.value)))}),c&&l.jsx(g.FormHelperText,{sx:{mt:.5},children:c})]}),us=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>l.jsxs(g.Box,{children:[e==="top"&&r&&l.jsx(g.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),l.jsx(g.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}})]}),lc=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return l.jsxs(g.Box,{children:[s&&l.jsx(g.Typography,{variant:t,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:e}),l.jsx(g.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:ee.background.paper,borderRadius:"8px","& fieldset":{borderColor:ee.divider},"&:hover fieldset":{borderColor:Ze[300]},"&.Mui-focused fieldset":{borderColor:Ze[400]},"&.Mui-error fieldset":{borderColor:ee.error.main}},"& .MuiInputBase-input":{color:ee.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:ee.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:ee.text.primary},"& .MuiFormHelperText-root":{color:r?ee.error.main:ee.text.secondary},...n}})]})},cc=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>l.jsxs(g.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&l.jsx(g.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&l.jsx(g.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),xn=pt(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),uc=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:l.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"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_5814_24904",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function pc({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:c=!0,renderItem:p,chipText:d,helperText:f,emptyStateText:u,emptyStateButtonText:x="Add Phase",onEmptyStateButtonClick:E,emptyStateSx:m}){const[S,v]=$.useState(null),[j,D]=$.useState(null),F=h=>B=>{if(!i){v(h),B.dataTransfer.effectAllowed="move";try{B.dataTransfer.setData("text/plain",String(t(e[h])))}catch{}}},C=h=>B=>{i||(B.preventDefault(),D(h),B.dataTransfer.dropEffect="move")},_=h=>B=>{if(i)return;if(B.preventDefault(),S===null||S===h){v(null),D(null);return}const q=[...e],[Z]=q.splice(S,1);q.splice(h,0,Z),v(null),D(null),r(q)},I=()=>{v(null),D(null)},R=e.length===0,Y=R&&(u||E!==void 0);return l.jsxs(g.Box,{role:"list",sx:h=>({display:"flex",flexDirection:"column",gap:h.spacing(1),...a}),children:[n,!R&&l.jsx(g.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),Y?l.jsxs(g.Box,{sx:h=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:h.spacing(4),backgroundColor:h.palette.mode==="dark"?"#000000":ee.background.paper,border:`2px dashed ${h.palette.mode==="dark"?"#FFFFFF":ee.divider}`,borderRadius:"8px",textAlign:"center",...m}),children:[u&&l.jsx(g.Typography,{variant:"body1",sx:h=>({color:h.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:E?2:0,maxWidth:"400px"}),children:u}),E&&l.jsx(g.Button,{variant:"outlined",startIcon:l.jsx(xn,{}),onClick:E,disabled:i,sx:h=>({mt:u?0:2,backgroundColor:h.palette.mode==="dark"?`${h.palette.primary.main}1A`:`${h.palette.primary.main}0D`,borderColor:h.palette.primary.main,color:h.palette.primary.main,"&:hover":{backgroundColor:h.palette.mode==="dark"?`${h.palette.primary.main}33`:`${h.palette.primary.main}1A`,borderColor:h.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:x})]}):e.map((h,B)=>{const q=S===B,Z=j===B&&S!==null&&S!==B;return l.jsx(g.Box,{role:"listitem",draggable:!i,onDragStart:F(B),onDragOver:C(B),onDrop:_(B),onDragEnd:I,sx:L=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${Z?L.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:L.spacing(1),opacity:q?.6:1,boxShadow:Z?`0 0 0 2px ${L.palette.primary.main}33`:"none"}),children:p?p(h,q):l.jsxs(g.Box,{sx:L=>({display:"flex",alignItems:"center",gap:L.spacing(1),minWidth:0}),children:[c&&l.jsx(uc,{}),o&&l.jsxs(g.Typography,{variant:"body2",sx:L=>({fontWeight:600,fontSize:14,color:`${L.palette.text.primary}`,flex:"0 0 auto"}),children:[B+1,"."]}),(()=>{const L=typeof d=="function"?d(h,B):d;return L?l.jsx(g.Chip,{label:L,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(g.Typography,{variant:"body2",sx:L=>({fontSize:12,fontWeight:500,color:`${L.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(h):""})]})},String(t(h)))}),!R&&f?typeof f=="string"?l.jsx(g.Typography,{variant:"caption",sx:h=>({color:`${h.palette.text.primary}60`}),children:f}):f:null]})}const Wh=yt(g.StepConnector)(({theme:e})=>{const t=e.palette.divider||"#E8E8E8",r=e.palette.primary.main;return{[`&.${g.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${g.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:t,transition:"border-color 0.3s ease"},[`&.${g.stepConnectorClasses.completed} .${g.stepConnectorClasses.line}`]:{borderColor:r}}}),Uh=({items:e,activeIndex:t=1,onStepClick:r,sx:n,completedSteps:i})=>{const a=_f(),s=a.palette.primary.main,o=a.palette.text.primary,c=a.palette.divider,p=a.palette.action&&a.palette.action.disabledBackground||"#E8E8E8",d=f=>{const{active:u,completed:x,icon:E}=f;return x?l.jsx(g.Box,{sx:{width:24,height:24,border:`1.2px solid ${s}`,borderRadius:"50%",backgroundColor:s,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(ls,{sx:{fontSize:16,fontWeight:600}})}):u?l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${s}`,backgroundColor:Et(s,.2),color:s,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:E}):l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:p,color:o,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:E})};return l.jsx(g.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Wh,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:o,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((f,u)=>{const x=Array.isArray(i)&&i.length>0?i.includes(u):u<t;return l.jsxs(g.Step,{onClick:()=>r==null?void 0:r(u),completed:x,children:[l.jsx(g.StepLabel,{StepIconComponent:d,children:l.jsx(g.Typography,{sx:{fontSize:12,fontWeight:500,color:u===t?s:o},children:f.label})}),u!==e.length-1&&l.jsx(g.Divider,{sx:{ml:4.2,borderColor:c}})]},u)})})},ps=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>l.jsx(g.Chip,{...s,sx:o=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${Et(t||o.palette.text.primary,.5)}`,backgroundColor:Et(t||o.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||o.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Hh=yt(g.StepConnector)(()=>({[`&.${g.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${g.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${g.stepConnectorClasses.completed} .${g.stepConnectorClasses.line}`]:{borderColor:ee.primary.main}})),Kh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=$.useState(null),s=o=>{const{active:c,completed:p,icon:d}=o;return p?l.jsx(g.Box,{sx:{width:24,height:24,border:`1.2px solid ${ee.primary.main}`,borderRadius:"50%",backgroundColor:ee.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(ls,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${ee.primary.main}`,backgroundColor:Et(ee.primary.main,.2),color:ee.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:d}):l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:ee.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:d})};return l.jsx(g.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Hh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:ee.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,c)=>l.jsxs(g.Step,{onMouseEnter:()=>a(c),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(c),completed:c<t,children:[l.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(g.StepLabel,{StepIconComponent:s,children:[l.jsxs(g.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(g.Typography,{sx:{fontSize:14,fontWeight:500,color:c===t?ee.primary.main:ee.text.primary},children:o.label}),l.jsx(ps,{size:"small",colorHex:c<t?ee.success.main:c===t?"#973B00":ee.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(g.Typography,{sx:{fontSize:12,fontWeight:400,color:`${ee.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===c&&l.jsx(g.Button,{sx:{display:c>t?"none":"block"},variant:c<t?"outlined":"contained",size:"small",color:"primary",children:c<t?"Edit":c===t?"Complete":""})]}),c!==e.length-1&&l.jsx(g.Divider,{sx:{ml:4.2,borderColor:ee.divider}})]},c))})},Yh=pt(l.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"),Gh=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const c=s||ee.info.main,p=Et(c,.08),d=Et(c,.08),f=a??l.jsx(Yh,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(g.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${d}`,boxShadow:"none",...o},children:[l.jsx(g.Box,{sx:{display:"flex",alignItems:"center"},children:f}),l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})]}):e==="inline"?l.jsx(g.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${d}`,boxShadow:"none",...o},children:l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})}):e==="listWithHeader"?l.jsxs(g.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:p,border:`1px solid ${d}`,...o},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[f,l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),r&&l.jsx(g.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:r}),l.jsx(g.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:c,my:-.5}},children:i.map((u,x)=>l.jsx(g.ListItem,{sx:{py:0},children:l.jsx(g.ListItemText,{primary:u})},x))})]}):l.jsx(g.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:p,border:`0.5px solid ${d}`,boxShadow:"none",...o},children:l.jsx(g.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:c,my:-.5}},children:i.map((u,x)=>l.jsx(g.ListItem,{sx:{py:0},children:l.jsx(g.ListItemText,{primary:u})},x))})})},dc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>l.jsxs(g.Box,{children:[l.jsx(g.Tabs,{value:e,onChange:(s,o)=>t(o),"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((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return l.jsx(g.Tab,{value:c,disabled:s.disabled,label:l.jsx(g.Typography,{variant:"body2",children:s.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(c))})}),r.map((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o,p=s.content??(typeof s.value=="object"?s.value:null);return p&&e===c?l.jsx(g.Box,{sx:{mt:1},children:p},`panel-${c}`):null})]}),Qh=pt(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),fc=({name:e,columns:t,initialRow:r,addLabel:n,maxRows:i,hideAddWhenMax:a,disableAddWhenMax:s=!0,showEmptyState:o=!0,rowDeletable:c=!0,control:p,sx:d,addActions:f,emptyTitle:u="No items configured",emptySubtitle:x="Click 'Add' to get started.",emptyCardSx:E,setValue:m,rowSelectionMode:S,rowSelectionKey:v})=>{const{fields:j,append:D,remove:F}=gu({control:p,name:e}),_=!(typeof i=="number"?j.length>=i:!1),I=$.useMemo(()=>{if(v)return v;const H=t.find(G=>G.type==="rowSelect");return H==null?void 0:H.key},[t,v]),R=hl({control:p,name:e})||[],Y=$.useMemo(()=>{if(!I)return{};const H={};return R.forEach((G,ne)=>{H[ne]=!!(G!=null&&G[I])}),H},[R,I]),h=$.useCallback(H=>Y[H]===!0,[Y]),B=$.useCallback((H,G)=>{if(!m||!I)return;const ne=`${e}.${H}.${I}`;S==="single"&&G&&R.forEach((ue,P)=>{if(P!==H){const U=`${e}.${P}.${I}`;m(U,!1,{shouldDirty:!0})}}),m(ne,G,{shouldDirty:!0})},[e,I,S,m,R]),q=H=>{const G={...H||r};t.forEach(ne=>{ne.value!==void 0&&G[ne.key]===void 0&&(G[ne.key]=typeof ne.value=="function"?ne.value(G,j.length):ne.value)}),D(G)};$.useEffect(()=>{!o&&j.length===0&&_&&q()},[o,j.length,_]);const Z=$.useMemo(()=>t.reduce((G,ne)=>{if(ne.width==="auto"||ne.width===void 0)return G+120;const ue=typeof ne.width=="number"?ne.width:typeof ne.width=="string"&&parseInt(ne.width)||160;return G+ue},0)+(c?100:0),[t,c]),L=H=>H.width==="auto"||H.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof H.width=="number"?{width:`${H.width}px`,minWidth:`${H.width}px`,maxWidth:`${H.width}px`}:typeof H.width=="string"?{width:H.width,minWidth:H.width}:{width:"160px",minWidth:"160px"};return l.jsx(g.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"visible",...d},children:j.length===0&&o?l.jsxs(g.Box,{sx:H=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:Et(H.palette.primary.main,.4),backgroundColor:Et(H.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...E}),children:[l.jsx(g.Typography,{variant:"subtitle1",sx:H=>({color:H.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:u}),l.jsx(g.Typography,{variant:"body2",sx:H=>({color:H.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:x}),Array.isArray(f)&&f.length>0?f.map((H,G)=>l.jsx(g.Button,{variant:"outlined",size:"small",startIcon:l.jsx(xn,{}),sx:{mr:1,mt:1},onClick:()=>q(H.template),disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:H.label},`empty-add-${G}`)):n&&l.jsx(g.Button,{variant:"outlined",size:"small",startIcon:l.jsx(xn,{}),onClick:()=>q(),disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:n})]}):l.jsxs(l.Fragment,{children:[l.jsx(g.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(f)&&f.length>0?f.map((H,G)=>l.jsx(g.Button,{variant:G===0?"contained":"outlined",size:"small",startIcon:l.jsx(xn,{}),onClick:()=>q(H.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:G===0?"#04502d":void 0}},disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:H.label},`add-${G}`)):n&&l.jsx(g.Button,{variant:"contained",size:"small",startIcon:l.jsx(xn,{}),onClick:()=>q(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:n})}),l.jsx(g.Box,{sx:{width:"100%",overflowX:"auto",overflowY:"auto",maxHeight:"600px","&::-webkit-scrollbar":{height:"8px",width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px","&:hover":{backgroundColor:"#555"}}},children:l.jsx(g.TableContainer,{sx:{width:"100%",minWidth:"100%"},children:l.jsxs(g.Table,{stickyHeader:!0,sx:{minWidth:`${Z||650}px`},children:[l.jsx(g.TableHead,{children:l.jsxs(g.TableRow,{children:[t.map(H=>l.jsx(g.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,...L(H)},children:H.header},H.key)),c&&l.jsx(g.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,width:100,textAlign:"center"},children:"Actions"})]})}),l.jsx(g.TableBody,{children:j.map((H,G)=>{const ne=h(G),ue=S&&!ne;return l.jsxs(g.TableRow,{children:[t.map(P=>{var de;const U=`${e}.${G}.${P.key}`,X=P.type==="rowSelect"||P.key===I,pe=X?!1:ue?!0:typeof P.disabled=="function"?P.disabled(H,G):!!P.disabled;if(P.type==="index"){const re=P.indexFormat?P.indexFormat(G):`#${G+1}`;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((de=P.cellSx)==null?void 0:de.textAlign)||"center",...L(P),...P.cellSx},children:re},P.key)}if(P.value!==void 0&&P.editable===!1){const re=typeof P.value=="function"?P.value(H,G):P.value;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...L(P),...P.cellSx},children:re},P.key)}const he=P.endorsementText?typeof P.endorsementText=="function"?P.endorsementText(H,G):P.endorsementText:void 0;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...L(P),...P.cellSx},children:P.type==="rowSelect"||X&&P.type==="checkbox"?l.jsx(Re,{name:U,control:p,defaultValue:!1,render:({field:re})=>l.jsx(Ht,{label:"",checked:!!re.value,disabled:!1,onChange:W=>{re.onChange(W),B(G,W)},sx:P.sx})}):P.type==="checkbox"?l.jsx(Re,{name:U,control:p,render:({field:re})=>l.jsx(Ht,{label:"",checked:!!re.value,disabled:pe,onChange:re.onChange,sx:P.sx})}):P.type==="select"?l.jsx(Re,{name:U,control:p,render:({field:re})=>l.jsx($i,{...re,fullWidth:!0,disabled:pe,options:P.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...P.sx},helperText:P.helperText,required:P.required})}):P.type==="date"?l.jsx(Re,{name:U,control:p,defaultValue:P.value!==void 0?typeof P.value=="function"?P.value(H,G):P.value:void 0,render:({field:re})=>($.useEffect(()=>{if(m&&(re.value===void 0||re.value===null||re.value==="")&&P.value!==void 0){const W=typeof P.value=="function"?P.value(H,G):P.value;m(U,W,{shouldValidate:!1})}},[U,re.value,P.value,H,G,m]),l.jsx(us,{...re,fullWidth:!0,disabled:pe,size:"small",placeholder:P.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...P.sx},helperText:P.helperText,required:P.required}))}):l.jsx(Re,{name:U,control:p,defaultValue:P.value!==void 0?typeof P.value=="function"?P.value(H,G):P.value:void 0,render:({field:re})=>($.useEffect(()=>{if(m&&(re.value===void 0||re.value===null||re.value==="")&&P.value!==void 0){const W=typeof P.value=="function"?P.value(H,G):P.value;m(U,W,{shouldValidate:!1})}},[U,re.value,P.value,H,G,m]),l.jsx(vt,{...re,fullWidth:!0,type:P.type==="number"?"number":"text",placeholder:P.placeholder,disabled:pe,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...P.sx},helperText:P.helperText,required:P.required,endorsementText:he,endorsementBg:P.endorsementBg,endorsementColor:P.endorsementColor,endorsementRadius:P.endorsementRadius,endorsementHeight:P.endorsementHeight,endorsementPaddingX:P.endorsementPaddingX,inputProps:{...P.type==="number"?{min:P.min,max:P.max,step:P.step}:{minLength:P.minLength,maxLength:P.maxLength,pattern:P.pattern}}}))})},P.key)}),c&&l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(g.IconButton,{size:"small",color:"error",onClick:()=>F(G),sx:{width:"20px",height:"20px"},children:l.jsx(Qh,{sx:{fontSize:"20px"}})})})]},H.id)})})]})})})]})})},hc=({name:e,control:t,items:r,sx:n,cardSx:i})=>l.jsx(g.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,c=!!(a.header||a.chipText),p=a.leftAction,d=a.rightAction;return l.jsxs(g.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[s&&p&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Re,{name:p.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(Ht,{label:p.label||"",checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),c&&l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&l.jsx(g.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.jsx(g.Box,{sx:{bgcolor:"rgba(26,26,26,0.1)",px:1.5,py:.375,borderRadius:"4px",fontSize:"12px",color:"rgba(26,26,26,0.8)"},children:a.chipText})]}),o&&d&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Re,{name:d.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(di,{label:d.label,checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),!s&&!o&&!c&&l.jsx(g.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),mc=pt(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),ta=pt(l.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.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 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),Zh=[{label:"Interest-only",value:"interest-only"},{label:"Principal moratorium",value:"principal-moratorium"},{label:"EMI",value:"emi"},{label:"Equal-principal",value:"equal-principal"},{label:"Balloon",value:"balloon"},{label:"Bullet",value:"bullet"},{label:"Step-up/Down",value:"step-up-down"},{label:"Seasonal skips",value:"seasonal-skips"},{label:"Custom fixed installment",value:"custom-fixed"},{label:"Full payment holiday (no billing)",value:"payment-holiday"}],ra=[{label:"Accrue & capitalize at end of phase",value:"accrue-capitalize"},{label:"Accrue & bill in first period after phase",value:"accrue-bill-next"},{label:"Accrue & forgive at phase end",value:"accrue-forgive"}],Xh=({phase:e,index:t,onUpdate:r,onDelete:n,months:i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],disabled:a=!1,sx:s})=>{const[o,c]=$.useState(e.seasonalMonths||[]),p=u=>{const x=o.includes(u)?o.filter(E=>E!==u):[...o,u];c(x),r(e.id,{seasonalMonths:x})},d=(()=>{const u=e.min||0;return u<0?"Min cannot be negative.":Number.isInteger(u)?null:"Use whole periods."})(),f=(()=>{const u=e.min||0,x=e.max||0;return Number.isInteger(x)?x<u?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(g.Card,{sx:{border:"2px solid",borderColor:ee.divider,position:"relative",...s},children:l.jsxs(g.CardContent,{sx:{p:2},children:[l.jsxs(g.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(g.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(g.Box,{children:l.jsx(uc,{})}),l.jsx(ps,{label:t+1,size:"small"})]}),l.jsx(g.IconButton,{onClick:()=>n(e.id),disabled:a,sx:{color:ee.error.main,"&:hover":{bgcolor:Ze[50]}},size:"small",children:l.jsx(mc,{fontSize:"small"})})]}),l.jsx(g.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(g.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(g.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(g.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx($i,{labelText:"Phase type",value:e.type,onChange:u=>r(e.id,{type:u.target.value}),options:Zh,disabled:a})}),l.jsxs(g.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(g.Typography,{variant:"caption",sx:{fontSize:"12px",color:ee.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(vt,{type:"number",value:e.priority||5,onChange:u=>{const x=parseInt(u.target.value)||5;r(e.id,{priority:Math.min(9,Math.max(1,x))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(g.Box,{sx:{display:"grid",gap:1},children:l.jsx(vt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:u=>{const x=parseInt(u.target.value)||0;r(e.id,{min:x,...e.lockLength?{max:x}:{}})},inputProps:{min:0},disabled:a,error:!!d,helperText:d||void 0})}),l.jsx(g.Box,{sx:{display:"grid",gap:1},children:l.jsx(vt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:u=>r(e.id,{max:parseInt(u.target.value)||0}),inputProps:{min:0},disabled:a||e.lockLength,error:!!f&&!e.lockLength,helperText:e.lockLength?"Locked to Min":f||void 0,sx:e.lockLength?{opacity:.5}:{}})})]}),l.jsxs(g.Box,{sx:{display:"flex",gap:3},children:[l.jsx(Ht,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:u=>r(e.id,{lockLength:u,...u?{max:e.min}:{}}),disabled:a}),l.jsx(Ht,{label:"Residual fill",checked:e.residualFill||!1,onChange:u=>r(e.id,{residualFill:u}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:ee.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(Sr,{value:e.balloonType||"percent",onChange:u=>r(e.id,{balloonType:u}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(vt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:u=>r(e.id,{balloonAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(vt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:u=>r(e.id,{balloonPercent:parseFloat(u.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(vt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:u=>r(e.id,{stepPercent:parseFloat(u.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(vt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:u=>r(e.id,{stepEveryN:parseInt(u.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(g.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(u=>l.jsx(g.Chip,{label:u,size:"small",onClick:()=>!a&&p(u),sx:{cursor:a?"default":"pointer",bgcolor:o.includes(u)?ee.primary.main:"transparent",color:o.includes(u)?ee.primary.contrastText:ee.text.primary,border:`1px solid ${ee.divider}`,"&:hover":{bgcolor:o.includes(u)?Ze[600]:Ze[50]}}},u))})]}),l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:ee.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(vt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:u=>r(e.id,{customAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:ee.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:u=>r(e.id,{holidayInterestTreatment:u}),options:ra,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};async function gc(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:c={},params:p={},body:d,transform:f,passThroughFields:u}=e;let x=i;if(t&&!i.startsWith("http")&&(x=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const F=/\{([^}]+)\}/g;x=x.replace(F,(C,_)=>{const I=n[_];return I!=null?encodeURIComponent(String(I)):""}),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const E=new URLSearchParams;Object.entries(p).forEach(([F,C])=>{C!=null&&E.append(F,String(C))}),E.toString()&&(x+=`${x.includes("?")?"&":"?"}${E.toString()}`);try{const F=/^https?:\/\//i.test(x),C=new URL(x,F?void 0:"http://local.placeholder"),_=Array.from(C.searchParams.entries());for(const[I,R]of _)(R===""||R==="undefined"||R==="null")&&C.searchParams.delete(I);F?x=C.toString():x=C.pathname+(C.search?C.search:""),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const m={"Content-Type":"application/json",...r,...c},S={method:a,headers:m};(a==="POST"||a==="PUT")&&d&&(S.body=JSON.stringify(d));const v=await fetch(x,S);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const j=await v.json();if(f)return f(Array.isArray(j)?j:j.data||j);const D=Array.isArray(j)?j:j.data||j;if(!Array.isArray(D))throw new Error("API response is not an array");return D.map(F=>{const C={label:F[o]||F.name||F.title||String(F[s]||""),value:F[s]||F.id||F.value||""},_=Array.isArray(u)?u:void 0;if(Array.isArray(_))for(const I of _)F[I]!==void 0&&(C[I]=F[I]);return C})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function yc(e,t,r,n,i=!1){const a=$.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const o=n[e.dependsOn];return o!==void 0?o:null},[e==null?void 0:e.dependsOn,n]),s=$.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 tp({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return gc(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:o=>Math.min(1e3*2**o,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function xr(e){return!!(e.apiConfig||e.api_endpoint)}function ds(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 Jh(e,t){const r=ds(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 fs=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],c=!!o,[p,d]=$.useState(!1),f=$.useRef(!1),[u,x]=$.useState(!1),[E,m]=$.useState(!1),[S,v]=$.useState(!1),j=$.useRef(null),D=$.useRef(null),F=()=>{var se;const W=e.required;if(typeof W=="function")try{return!!W(a||{})}catch{return!1}if(W!==void 0)return!!W;const Q=(se=e.validation)==null?void 0:se.required;if(typeof Q=="function")try{return!!Q(a||{})}catch{return!1}return Q!==void 0?!!Q:!1},C=W=>F()?`${W} *`:W,_=()=>{if(e.value!==void 0){if(typeof e.value=="function")try{return e.value(a||{})}catch{return""}return e.value}return e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:""},I=$.useRef(void 0);$.useEffect(()=>{const W=e.value;if(typeof W!="function"||!s)return;let Q;try{Q=W(a||{})}catch{return}const se=a?a[e.name]:void 0;if(I.current===void 0&&(I.current=Q),se===void 0||se===I.current)try{s(e.name,Q,{shouldValidate:!0,shouldDirty:!1}),I.current=Q}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((W,Q)=>({...W,[Q]:a[Q]}),{}):a||{}),e.name]);const R=$.useMemo(()=>{const W=ds(e);return W&&Array.isArray(e.passThroughFields)&&(W.passThroughFields=e.passThroughFields),W},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),Y=$.useRef(null),h=R!=null&&R.dependsOn?a==null?void 0:a[R.dependsOn]:null;$.useEffect(()=>{R!=null&&R.dependsOn&&(Y.current=h)},[R==null?void 0:R.dependsOn,h]);const B=$.useMemo(()=>{const W=e.showWhen;if(typeof W=="function")try{return!!W(a||{})}catch{return!0}if(W&&typeof W=="object"){const Q=W.field,se=W.equals,le=W.in,ce=Q?(a||{})[Q]:void 0;if(Q&&typeof se<"u")return ce===se;if(Q&&Array.isArray(le))return le.includes(ce)}return!0},[e.showWhen,a]),q=$.useCallback(()=>{const W=e.dynamicEndorsement;if(typeof W=="function")try{return W(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),Z=$.useCallback(()=>{const W=e.endAdornment,Q=e.endAdornmentSwitch,se=e.endAdornmentCheckbox;if(Q)return l.jsx(Re,{name:Q,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:le})=>l.jsx(g.Switch,{checked:le.value||!1,onChange:ce=>{le.onChange(ce.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(ce.target.checked,a,s)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(se)return l.jsx(Re,{name:se,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:le})=>l.jsx(Ht,{label:"",checked:le.value||!1,onChange:le.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof W=="function")try{return W(a||{},{control:t,setValue:s})}catch{return}return W},[e,a,t,s]),L=$.useMemo(()=>p&&xr(e)&&(!(R!=null&&R.dependsOn)||h),[p,e,R==null?void 0:R.dependsOn,h]),H=$.useMemo(()=>{const W={};if(!a)return W;const Q=(R==null?void 0:R.endpoint)||(e==null?void 0:e.api_endpoint);if(Q&&typeof Q=="string"){const se=Q.match(/\{([^}]+)\}/g)||[];for(const le of se){const ce=le.slice(1,-1),be=a[ce];be!==void 0&&(W[ce]=be)}}if(R!=null&&R.dependsOn){const se=R.dependsOn,le=a[se];le!==void 0&&(W[se]=le)}return W},[R==null?void 0:R.endpoint,e==null?void 0:e.api_endpoint,R==null?void 0:R.dependsOn,a]),{data:G=[],isLoading:ne,error:ue}=yc(R,n,i,H,L),P=$.useCallback(()=>{xr(e)&&!f.current&&(f.current=!0,d(!0))},[e]),U=$.useCallback(()=>{xr(e)&&!f.current&&(f.current=!0,d(!0))},[e]);$.useEffect(()=>{if(xr(e)&&!f.current){const W=a==null?void 0:a[e.name];W!=null&&W!==""&&(f.current=!0,d(!0))}},[e,a]),$.useEffect(()=>{xr(e)&&(R!=null&&R.dependsOn)&&(h!=null&&`${h}`!=""?(f.current=!0,d(!0)):(f.current=!1,d(!1)))},[R==null?void 0:R.dependsOn,h]);const X=$.useCallback(W=>{if(typeof W=="function")try{const Q=W(a||{});return X(Q)}catch{return[]}return W?Array.isArray(W)?W.map(Q=>{if(Q&&typeof Q=="object"){const se=Q.value??Q.id??Q.key??void 0,le=Q.label??Q.name??Q.title??(se!==void 0?String(se):"");return{label:String(le??""),value:String(se??le??"")}}return{label:String(Q),value:String(Q)}}):typeof W=="object"?Object.keys(W).map(Q=>({value:String(Q),label:String(W[Q])})):[]:[]},[a]),pe=$.useCallback(()=>xr(e)?Array.isArray(G)?G:[]:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?X(e.options):[],[e,G,X]),he=()=>{var W,Q,se,le,ce,be;switch(e.type){case"title":return l.jsx(g.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 l.jsx(g.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 J=e.actionName,Ie=e.actionComponent,Ke=e.actionLabel,Xe=T=>l.jsx(cc,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:T??e.actions}),Tt=T=>{if(e.cardWrap){const M={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(g.Card,{sx:M,...e.cardProps,children:T})}return T};return Tt(J&&Ie?l.jsx(Re,{name:J,control:t,defaultValue:e.value??!1,render:({field:T})=>Xe(Ie==="switch"?l.jsx(di,{label:Ke,checked:!!T.value,onChange:T.onChange}):l.jsx(Ht,{label:Ke||"",checked:!!T.value,onChange:T.onChange}))}):Xe());case"tabs":return l.jsx(Re,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((Q=(W=e.items)==null?void 0:W[0])==null?void 0:Q.value)=="string"||typeof((le=(se=e.items)==null?void 0:se[0])==null?void 0:le.value)=="number"?(be=(ce=e.items)==null?void 0:ce[0])==null?void 0:be.value:0),render:({field:T})=>{const y=e.items||[],M=y.map((z,K)=>({label:z.label,value:typeof z.value=="string"||typeof z.value=="number"?z.value:K,content:z.content,disabled:z.disabled})),b=T.value,A=(()=>{if(typeof b=="string"||typeof b=="number"){const z=y.findIndex((K,fe)=>typeof K.value=="string"||typeof K.value=="number"?K.value===b:fe===b);return z>=0?z:0}return Number(b)||0})(),V=y[A]||{};return l.jsxs(g.Box,{children:[l.jsx(dc,{value:T.value,onChange:T.onChange,items:M,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(V.fields)&&V.fields.length>0&&(()=>{const z=V.fields,K=[];let fe=[];for(const ge of z)ge.type==="section"&&fe.length>0?(K.push(fe),fe=[ge]):fe.push(ge);fe.length>0&&K.push(fe);const ye={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1};return l.jsx(g.Box,{sx:{mt:1},children:K.map((ge,Ne)=>{const Oe=ge.find(Me=>Me.type==="section"),at=(Oe==null?void 0:Oe.cardWrap)!==!1,dt=l.jsx(l.Fragment,{children:ge.map(Me=>{const ie=Me.showWhen;if(ie)try{if(typeof ie=="function"){if(!ie(a||{}))return null}else if(typeof ie=="object"){const Yt=ie.field,ys=ie.equals,xs=ie.in,vs=Yt?(a||{})[Yt]:void 0;if(Yt&&typeof ys<"u"&&vs!==ys||Yt&&Array.isArray(xs)&&!xs.includes(vs))return null}}catch{}const Ge=Math.min(Math.max(Me.col??12,1),12);return l.jsx(g.Box,{sx:{gridColumn:`span ${Ge}`},children:l.jsx(fs,{field:Me,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},Me.name)})});return at?l.jsx(g.Card,{sx:{...ye,...(Oe==null?void 0:Oe.cardSx)||{}},...(Oe==null?void 0:Oe.cardProps)||{},children:dt},`tab-group-${Ne}`):l.jsx(g.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:dt},`tab-group-${Ne}`)})})})()]})}});case"grid":const Ye=e.defaultRows||[];return l.jsx(g.Box,{children:l.jsx(Re,{name:e.name,control:t,defaultValue:Ye.length>0?Ye:_()||[],render:()=>l.jsx(fc,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,showEmptyState:e.showEmptyState,maxRows:e.maxRows,hideAddWhenMax:e.hideAddWhenMax,disableAddWhenMax:e.disableAddWhenMax,rowDeletable:e.rowDeletable!==!1,control:t,setValue:s,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey})})});case"listcards":return l.jsx(hc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Re,{name:e.name,control:t,defaultValue:e.items||[],render:({field:T})=>{const y=e,M=T.value||y.items||[],b=typeof y.getId=="function"?y.getId:typeof y.getId=="string"?z=>z[y.getId]:z=>z.id??z._id??z.key??String(z),A=typeof y.getText=="function"?y.getText:typeof y.getText=="string"?z=>z[y.getText]??String(z):z=>z.text??z.label??z.name??z.title??String(z),V=(()=>{if(typeof y.chipText=="function")return y.chipText;if(typeof y.chipText=="string")return M.length>0&&M[0]&&y.chipText in M[0]?(z,K)=>z[y.chipText]??void 0:y.chipText})();return l.jsx(pc,{items:M,getId:b,onReorder:z=>{T.onChange(z)},header:y.header,disabled:e.disabled,sx:y.sx,chipText:V,helperText:y.helperText||(c?o==null?void 0:o.message:void 0),getText:A,showIndex:y.showIndex!==!1,showLeftIcon:y.showLeftIcon!==!1,renderItem:y.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>e.type==="textarea"?l.jsx(lc,{...T,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText}):l.jsx(vt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:Z(),endorsementText:q(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?u?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(ec,{position:"end",children:l.jsx(Gn,{"aria-label":"toggle password visibility",onClick:()=>x(y=>!y),edge:"end",children:u?l.jsx(Oo,{}):l.jsx(Ao,{})})})}:void 0})});case"number":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(vt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:Z(),endorsementText:q(),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:c,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const We=pe();return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const y=typeof e.disabled=="function"?!!e.disabled(a||{}):!!e.disabled,M=e.disableWhenEmptyOptions===!0&&Array.isArray(We)&&We.length===0,b=y||M||ne,A=T.value,V=(()=>{if(Array.isArray(We)&&We.length>0){const z=We.find(K=>String(K==null?void 0:K.value)===String(A));return z?z.value:A}return A})();return l.jsx($i,{labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?C(e.label):void 0,labelVariant:e.labelVariant,value:V,onChange:T.onChange,options:We,disabled:b,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?C(e.label):void 0):e.placeholder,loading:ne,error:c||!!ue,helperText:(o==null?void 0:o.message)||(ue==null?void 0:ue.message)||e.helperText,onOpen:P})}});case"checkbox":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Ht,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"toggle":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Sr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:!0,onChange:T.onChange})});case"radio":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Sr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange})});case"checkboxGroup":return l.jsx(Re,{name:e.name,control:t,defaultValue:_()||[],render:({field:T})=>l.jsx(oc,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(T.value)?T.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange,disabled:e.disabled})});case"switch":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(di,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"autocomplete":const Ue=pe(),w=!!((typeof e.disabled=="function"?e.disabled(a||{},{options:Ue,isLoading:ne,error:ue}):e.disabled)||e.disableWhenEmptyOptions===!0&&Array.isArray(Ue)&&Ue.length===0||ne||R!=null&&R.dependsOn&&!h);return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const y=T.value,M=e.multiple===!0,b=(R==null?void 0:R.valueField)||e.value_field||"value",A=z=>{if(z!=null){if(typeof z=="string"||typeof z=="number")return z;if(typeof z=="object"){if(z[b]!==void 0)return z[b];if(z.value!==void 0)return z.value;if(z.id!==void 0)return z.id}}},V=(()=>{if(M)return(Array.isArray(y)?y:[]).map(K=>{const fe=String(typeof K=="object"?A(K):K);return Ue.find(ge=>{const Ne=A(ge);return Ne!==void 0&&String(Ne)===fe})||null}).filter(Boolean);{if(y==null||y==="")return null;const z=String(typeof y=="object"?A(y):y),K=Ue.find(fe=>{const ye=A(fe);return ye!==void 0&&String(ye)===z});return K||null}})();return l.jsx(sc,{id:e.id,options:Ue,value:V,multiple:M,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,placeholder:w&&(R!=null&&R.dependsOn)&&!h?`Please select ${R.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:w,loading:ne,error:c||!!ue,helperText:(o==null?void 0:o.message)||(ue==null?void 0:ue.message)||e.helperText||"",onOpen:U,noOptionsText:w&&(R!=null&&R.dependsOn)&&!h?`Please select ${R.dependsOn.replace(/_/g," ")} first`:ne?"Fetching data...":p&&!ne&&Ue.length===0?"No options available":"Click to load options",onChange:z=>{const K=(R==null?void 0:R.valueField)||e.value_field||"value";if(M){const ye=(Array.isArray(z)?z:[]).map(ge=>typeof ge=="object"&&(ge[K]||ge.value||ge.id)||ge);T.onChange(ye)}else{let fe;z&&typeof z=="object"?fe=z[K]||z.value||z.id||z:fe=z,T.onChange(fe);const ye=e.selectedAssignments;if(ye&&z&&typeof z=="object")for(const[ge,Ne]of Object.entries(ye)){const Oe=z[Ne];if(Oe!==void 0&&typeof s=="function")try{s(ge,Oe,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(us,{...T,id:e.name,label:C(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:c,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const y=T.value||e.defaultValue||e.src;if(y){const K=e.imageUploaded||{},fe=K.previewText||"Preview",ye=K.removeText||"Remove",ge=K.saveText||"Save logo",Ne=K.showSave!==void 0?K.showSave:!!(e.onSave||K.saveText),Oe=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(y)}catch{}},at=()=>{T.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},dt=()=>{typeof e.onSave=="function"&&e.onSave({url:y,file:D.current||void 0})},Me=ie=>{const Ge=ie.target.files&&ie.target.files[0];if(Ge){if(typeof e.onFileSelected=="function")try{e.onFileSelected(Ge)}catch{}try{const Yt=URL.createObjectURL(Ge);T.onChange(Yt)}catch{}D.current=Ge,v(!1)}};return l.jsxs(g.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...K.cardSx},children:[l.jsx("input",{type:"file",ref:j,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Me}),l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(g.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...K.thumbnailSx},children:l.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(g.Box,{sx:{flexGrow:1},children:[l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:500,...K.fileNameSx},children:typeof y=="string"?y.split("/").pop():"Selected image"}),l.jsx(g.Typography,{sx:{fontSize:"10px",...K.fileMetaSx},children:"Image selected"})]}),l.jsxs(g.Box,{sx:{display:"flex",gap:1},children:[l.jsx(g.Button,{type:"button",sx:{...K.previewButtonSx},variant:"outlined",onClick:Oe,startIcon:l.jsx(Ao,{}),children:fe}),l.jsx(g.Button,{variant:"outlined",color:"error",onClick:at,sx:{...K.removeButtonSx},startIcon:l.jsx(Oo,{}),children:ye}),Ne&&l.jsx(g.Button,{variant:"contained",onClick:dt,sx:{...K.saveButtonSx},children:ge})]})]}),l.jsxs(g.Dialog,{open:S,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(g.DialogTitle,{children:K.previewTitle||"Image preview"}),l.jsx(g.DialogContent,{children:l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:l.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(g.DialogActions,{children:[l.jsx(g.Button,{type:"button",variant:"outlined",onClick:()=>{var ie;return(ie=j.current)==null?void 0:ie.click()},children:K.replaceText||"Replace logo"}),l.jsx(g.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:K.closeText||"Close"})]})]})]})}const M=e.imagePlaceholder||{},b=M.icon||"upload",A=j,V=()=>{var K;try{(K=A.current)==null||K.click()}catch{}},z=K=>{const fe=K.target.files&&K.target.files[0];if(fe){typeof e.onFileSelected=="function"&&e.onFileSelected(fe);try{const ye=URL.createObjectURL(fe);T.onChange(ye)}catch{}D.current=fe}};return l.jsxs(g.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...M.sx},children:[l.jsx("input",{type:"file",ref:A,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:z}),l.jsx(Gn,{sx:{borderRadius:"8px",...M.iconSx},children:b==="image"?l.jsx(zh,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(g.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...M.titleSx},children:M.title||"Drag & Drop the image here"}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...M.subtitleSx},children:M.subtitle||""}),l.jsx(g.Button,{onClick:V,sx:{my:2,...M.buttonSx},startIcon:l.jsx(pi,{}),variant:"contained",disabled:e.disabled,children:M.buttonText||"Upload File"}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,...M.helperTextSx},children:M.helperText||e.helperText||""})]})}});case"component":return l.jsx(g.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:s})}catch{try{return e.render({control:t,formData:a,setValue:s})}catch{return e.render()}}})():e.render:e.content});default:return null}},de=$.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),re=$.useCallback(async()=>{try{const W=a?a[e.name]:void 0;let Q="";W==null?Q="":Array.isArray(W)?Q=W.join(", "):typeof W=="object"?Q=JSON.stringify(W):Q=String(W),await navigator.clipboard.writeText(Q),m(!0),window.setTimeout(()=>m(!1),1200)}catch{}},[a,e.name]);return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(g.Box,{sx:{flexGrow:1},children:B?he():null}),de&&l.jsx(Gn,{"aria-label":`copy ${e.label||e.name}`,onClick:re,size:"small",children:E?l.jsx(ls,{fontSize:"small"}):l.jsx(Mh,{fontSize:"small"})})]})};var na,Ro;function em(){if(Ro)return na;Ro=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,j){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=j};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),c=new e(s),p=new e(s);na={Cache:e,split:f,normalizePath:d,setter:function(v){var j=d(v);return c.get(v)||c.set(v,function(F,C){for(var _=0,I=j.length,R=F;_<I-1;){var Y=j[_];if(Y==="__proto__"||Y==="constructor"||Y==="prototype")return F;R=R[j[_++]]}R[j[_]]=C})},getter:function(v,j){var D=d(v);return p.get(v)||p.set(v,function(C){for(var _=0,I=D.length;_<I;)if(C!=null||!j)C=C[D[_++]];else return;return C})},join:function(v){return v.reduce(function(j,D){return j+(x(D)||r.test(D)?"["+D+"]":(j?".":"")+D)},"")},forEach:function(v,j,D){u(Array.isArray(v)?v:f(v),j,D)}};function d(v){return o.get(v)||o.set(v,f(v).map(function(j){return j.replace(a,"$2")}))}function f(v){return v.match(t)||[""]}function u(v,j,D){var F=v.length,C,_,I,R;for(_=0;_<F;_++)C=v[_],C&&(S(C)&&(C='"'+C+'"'),R=x(C),I=!R&&/^\d+$/.test(C),j.call(D,C,R,I,_,v))}function x(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function E(v){return v.match(n)&&!v.match(r)}function m(v){return i.test(v)}function S(v){return!x(v)&&(E(v)||m(v))}return na}var Rr=em(),ia,$o;function tm(){if($o)return ia;$o=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=d=>d.match(e)||[],r=d=>d[0].toUpperCase()+d.slice(1),n=(d,f)=>t(d).join(f).toLowerCase(),i=d=>t(d).reduce((f,u)=>`${f}${f?u[0].toUpperCase()+u.slice(1).toLowerCase():u.toLowerCase()}`,"");return ia={words:t,upperFirst:r,camelCase:i,pascalCase:d=>r(i(d)),snakeCase:d=>n(d,"_"),kebabCase:d=>n(d,"-"),sentenceCase:d=>r(n(d," ")),titleCase:d=>t(d).map(r).join(" ")},ia}var aa=tm(),Ln={exports:{}},Po;function rm(){if(Po)return Ln.exports;Po=1,Ln.exports=function(i){return e(t(i),i)},Ln.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),c={},p=s,d=r(a),f=n(i);for(a.forEach(function(x){if(!f.has(x[0])||!f.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});p--;)c[p]||u(i[p],p,new Set);return o;function u(x,E,m){if(m.has(x)){var S;try{S=", node was:"+JSON.stringify(x)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!f.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!c[E]){c[E]=!0;var v=d.get(x)||new Set;if(v=Array.from(v),E=v.length){m.add(x);do{var j=v[--E];u(j,f.get(j),m)}while(E);m.delete(x)}o[--s]=x}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var c=i[s];a.add(c[0]),a.add(c[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var c=i[s];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[1])}return a}function n(i){for(var a=new Map,s=0,o=i.length;s<o;s++)a.set(i[s],s);return a}return Ln.exports}var nm=rm();const im=Ya(nm),am=Object.prototype.toString,sm=Error.prototype.toString,om=RegExp.prototype.toString,lm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",cm=/^Symbol\((.*)\)(.*)$/;function um(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Do(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return um(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return lm.call(e).replace(cm,"Symbol($1)");const n=am.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+sm.call(e)+"]":n==="RegExp"?om.call(e):null}function ur(e,t){let r=Do(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=Do(this[n],t);return a!==null?a:i},2)}function xc(e){return e==null?[]:[].concat(e)}let vc,bc,wc,pm=/\$\{\s*(\w+)\s*\}/g;vc=Symbol.toStringTag;class Io{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[vc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],xc(t).forEach(a=>{if(ct.isError(a)){this.errors.push(...a.errors);const s=a.inner.length?a.inner:[a];this.inner.push(...s)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}bc=Symbol.hasInstance;wc=Symbol.toStringTag;class ct 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(pm,(i,a)=>ur(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const s=new Io(t,r,n,i);if(a)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[wc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ct)}static[bc](t){return Io[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let $t={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 \`${ur(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ur(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ur(r,!0)}\``+i}},st={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"},Xt={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"},$a={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Pa={isValue:"${path} field must be ${value}"},Qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},dm={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"},fm={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: \`${ur(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: \`${ur(r,!0)}\``}return ct.formatError($t.notType,e)}};Object.assign(Object.create(null),{mixed:$t,string:st,number:Xt,date:$a,object:Qn,array:dm,boolean:Pa,tuple:fm});const hs=e=>e&&e.__isYupSchema__;class fi{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,s=typeof n=="function"?n:(...o)=>o.every(c=>c===n);return new fi(t,(o,c)=>{var p;let d=s(...o)?i:a;return(p=d==null?void 0:d(c))!=null?p:c})}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(!hs(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const qn={context:"$",value:"."};function hi(e,t){return new gr(e,t)}class gr{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]===qn.context,this.isValue=this.key[0]===qn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?qn.context:this.isValue?qn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Rr.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}}gr.prototype.__isYupRef=!0;const Ot=e=>e==null;function Wr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,c){const{name:p,test:d,params:f,message:u,skipAbsent:x}=e;let{parent:E,context:m,abortEarly:S=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function j(B){return gr.isRef(B)?B.getValue(r,E,m):B}function D(B={}){const q=Object.assign({value:r,originalValue:a,label:s.spec.label,path:B.path||n,spec:s.spec,disableStackTrace:B.disableStackTrace||v},f,B.params);for(const L of Object.keys(q))q[L]=j(q[L]);const Z=new ct(ct.formatError(B.message||u,q),r,q.path,B.type||p,q.disableStackTrace);return Z.params=q,Z}const F=S?o:c;let C={path:n,parent:E,type:p,from:i.from,createError:D,resolve:j,options:i,originalValue:a,schema:s};const _=B=>{ct.isError(B)?F(B):B?c(null):F(D())},I=B=>{ct.isError(B)?F(B):o(B)};if(x&&Ot(r))return _(!0);let Y;try{var h;if(Y=d.call(C,r,C),typeof((h=Y)==null?void 0:h.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Y).then(_,I)}}catch(B){I(B);return}_(Y)}return t.OPTIONS=e,t}function hm(e,t,r,n=r){let i,a,s;return t?(Rr.forEach(t,(o,c,p)=>{let d=c?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",u=p?parseInt(d,10):0;if(e.innerType||f){if(f&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&u>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[u],e=f?e.spec.types[u]:e.innerType}if(!p){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);i=r,r=r&&r[d],e=e.fields[d]}a=d,s=c?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class mi extends Set{describe(){const t=[];for(const r of this.values())t.push(gr.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 mi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Hr(e,t=new Map){if(hs(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]=Hr(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,Hr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Hr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Hr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class gt{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 mi,this._blacklist=new mi,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($t.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=Hr(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(s=>{a.test(s.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&&Ot(a))return a;let s=ur(t),o=ur(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
176
|
+
`)):null),classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),k.string]),disabled:k.bool,disableFocusRipple:k.bool,disableRipple:k.bool,edge:k.oneOf(["end","start",!1]),id:k.string,loading:k.bool,loadingIndicator:k.node,size:k.oneOfType([k.oneOf(["small","medium","large"]),k.string]),sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object])});const Ao=pt(l.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"),Oo=pt(l.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"),Mh=pt(l.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"),ls=pt(l.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),pi=pt(l.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"),zh=pt(l.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"),ee={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"},_o=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}},Bh=(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(""),Lt=(e,t,r)=>{const n=_o(e),i=_o(t);return Bh(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},cs=e=>{const t="#FFFFFF",r="#000000";return{50:Lt(t,e,.08),100:Lt(t,e,.16),200:Lt(t,e,.28),300:Lt(t,e,.4),400:Lt(t,e,.55),500:e,600:Lt(e,r,.1),700:Lt(e,r,.2),800:Lt(e,r,.3),900:Lt(e,r,.42)}},Vh=cs(ee.primary.main),Nh=cs(ee.secondary.main),Ze=cs(ee.text.primary),Lh={primary:ee.primary.main,secondary:ee.secondary.main,textPrimary:ee.text.primary,textSecondary:ee.text.secondary,divider:ee.divider,background:ee.background},vt=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:c="6px",endorsementHeight:p=28,endorsementPaddingX:d="8px",...f})=>{var m,S;const u=!!r,x=a?l.jsx(g.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:p,paddingLeft:d,paddingRight:d,borderRadius:c,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,E={...f.InputProps,endAdornment:x||i?l.jsxs(g.InputAdornment,{sx:{mr:-1},position:"end",children:[x||i,(m=f.InputProps)==null?void 0:m.endAdornment]}):(S=f.InputProps)==null?void 0:S.endAdornment};return l.jsxs(g.Box,{children:[u&&l.jsx(g.Typography,{variant:n,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:r}),l.jsx(g.TextField,{fullWidth:!0,size:"small",...f,InputProps:E,label:u?void 0:f.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:ee.background.paper,borderRadius:"8px","& fieldset":{borderColor:ee.divider},"&:hover fieldset":{borderColor:Ze[300]},"&.Mui-focused fieldset":{borderColor:Ze[400]},"&.Mui-error fieldset":{borderColor:ee.error.main}},"& .MuiInputBase-input":{color:ee.text.primary},"& .MuiFormLabel-root":{color:ee.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:ee.text.primary},"& .MuiFormHelperText-root":{color:e?ee.error.main:ee.text.secondary},...t}})]})},$i=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:c,sx:p,...d})=>{const f=$.useId(),u=c==null||c===""||Array.isArray(c)&&c.length===0,x=E=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...E,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:ee.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return l.jsxs(g.FormControl,{fullWidth:!0,size:a,error:!!d.error,variant:"outlined",children:[e&&l.jsx(g.Typography,{variant:s,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:e}),t&&l.jsx(g.InputLabel,{id:f,shrink:!u||!!o,sx:{color:ee.text.secondary,"&.Mui-focused":{color:ee.text.primary},"&.Mui-error":{color:ee.error.main}},children:t}),l.jsx(g.Select,{...d,value:c,labelId:t?f:void 0,label:t,displayEmpty:!0,input:l.jsx(g.OutlinedInput,{label:t}),IconComponent:x,renderValue:E=>{const m=E;if(u)return l.jsx("span",{style:{color:ee.text.secondary},children:o??""});const S=r.find(v=>v.value===m);return(S==null?void 0:S.label)??String(m)},endAdornment:n?l.jsx(g.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${ee.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:ee.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:ee.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:ee.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:Ze[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:Ze[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:ee.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...p},children:n?l.jsx(g.MenuItem,{disabled:!0,children:l.jsx(g.CircularProgress,{size:16})}):r.map(E=>l.jsx(g.MenuItem,{value:E.value,sx:{backgroundColor:ee.background.paper,color:ee.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:Ze[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:Ze[50],borderRadius:"4px"}},children:E.label},E.value))}),i&&l.jsx(g.FormHelperText,{children:i})]})},qh=e=>l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:l.jsx("path",{d:"M6 9l6 6 6-6",stroke:ee.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),sc=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:c="subtitle2",disabled:p,loading:d,error:f,helperText:u,onOpen:x,noOptionsText:E,sx:m})=>l.jsxs(g.Box,{children:[a&&l.jsx(g.Typography,{variant:c,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:a}),l.jsx(g.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:l.jsx(qh,{}),disabled:p,loading:d,onOpen:x,noOptionsText:E,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${ee.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:ee.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:ee.divider},"&:hover fieldset":{borderColor:Ze[300]},"&.Mui-focused fieldset":{borderColor:Ze[400]},"&.Mui-error fieldset":{borderColor:ee.error.main}},"& .MuiInputBase-input":{color:ee.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:ee.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...m},getOptionLabel:S=>typeof S=="string"?S:(S==null?void 0:S.label)??"",isOptionEqualToValue:(S,v)=>((S==null?void 0:S.value)??S)===((v==null?void 0:v.value)??v),renderOption:(S,v,{selected:j})=>{const{key:D,...F}=S;return l.jsxs(g.Box,{component:"li",...F,sx:{backgroundColor:ee.background.paper,color:ee.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:Ze[50]},"&.Mui-focused":{backgroundColor:Ze[50]},...j?{backgroundColor:Ze[50]}:{}},children:[n&&l.jsx(g.Checkbox,{checked:j}),l.jsx(g.Typography,{variant:"body2",sx:{color:ee.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]},D)},renderInput:S=>l.jsx(g.TextField,{...S,label:i,placeholder:s,size:"small",error:f,helperText:u,InputLabelProps:{shrink:!!r||!!s,sx:{color:ee.text.secondary,"&.Mui-focused":{color:ee.text.primary},"&.Mui-error":{color:ee.error.main}}},InputProps:{...S.InputProps,endAdornment:l.jsxs(l.Fragment,{children:[d?l.jsx(g.CircularProgress,{size:20}):null,S.InputProps.endAdornment]})}}),onChange:(S,v)=>o(v)})]}),Ht=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),oc=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:p,groupPadding:d=1.5,itemGap:f=1,disabled:u=!1})=>{const x=typeof i=="number"&&i>0,E=x?i:12,m=i===!0,S=i===!1&&!x,v=(j,D)=>{const F=Array.isArray(r)?[...r]:[];D?F.includes(j)||a([...F,j]):a(F.filter(C=>C!==j))};return l.jsxs(g.FormControl,{error:p,disabled:u,sx:j=>{var D;return{display:"flex",flexDirection:"column",px:j.spacing(d),borderRadius:((D=j.shape)==null?void 0:D.borderRadius)||8,mx:-2.5,backgroundColor:j.palette.background.paper}},children:[s==="top"&&e&&l.jsx(g.Typography,{variant:o,sx:j=>({color:j.palette.text.primary,mb:.5,fontSize:j.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(g.FormLabel,{sx:j=>({color:j.palette.text.secondary,mb:.5,mx:1,fontSize:j.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:j.palette.text.primary},"&.Mui-error":{color:j.palette.error.main}}),children:t}),x&&l.jsx(g.Box,{sx:j=>({display:"grid",gridTemplateColumns:`repeat(${E}, 1fr)`,gap:j.spacing(f),mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),m&&l.jsx(g.Box,{sx:j=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:j.spacing(f),alignItems:"center",mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),S&&l.jsx(g.Box,{sx:j=>({display:"flex",flexDirection:"column",gap:j.spacing(f),alignItems:"flex-start",mt:0}),children:n.map(j=>{const D=Array.isArray(r)&&r.includes(j.value);return l.jsx(g.FormControlLabel,{control:l.jsx(g.Checkbox,{size:"small",checked:D,onChange:F=>v(j.value,F.target.checked),disabled:u,sx:F=>({color:F.palette.text.secondary,"&.Mui-checked":{color:F.palette.primary.main}})}),label:j.label,sx:F=>({m:0,"& .MuiFormControlLabel-label":{color:F.palette.text.primary,fontSize:12}})},String(j.value))})}),c&&l.jsx(g.FormHelperText,{sx:{mt:.5},children:c})]})},di=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>l.jsx(g.FormControlLabel,{control:l.jsx(g.Switch,{checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),Sr=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:c,error:p,groupPadding:d=1.5,itemGap:f=1})=>l.jsxs(g.FormControl,{error:p,sx:u=>{var x;return{display:"flex",flexDirection:"column",px:u.spacing(d),borderRadius:((x=u.shape)==null?void 0:x.borderRadius)||8,mx:-2.5,backgroundColor:u.palette.background.paper}},children:[s==="top"&&e&&l.jsx(g.Typography,{variant:o,sx:u=>({color:u.palette.text.primary,mb:.5,fontSize:u.typography.fontSize,fontWeight:500}),children:e}),t&&l.jsx(g.FormLabel,{sx:u=>({color:u.palette.text.secondary,mb:.5,mx:1,fontSize:u.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:u.palette.text.primary},"&.Mui-error":{color:u.palette.error.main}}),children:t}),l.jsx(g.RadioGroup,{row:i,value:r,onChange:u=>a(u.target.value),sx:u=>({display:"flex",flexDirection:i?"row":"column",gap:u.spacing(f),alignItems:i?"center":"flex-start"}),children:n.map(u=>l.jsx(g.FormControlLabel,{value:u.value,control:l.jsx(g.Radio,{size:"small",sx:x=>({color:x.palette.text.secondary,"&.Mui-checked":{color:x.palette.primary.main}})}),label:l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[l.jsx(g.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:u.label}),u.description&&l.jsx(g.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:u.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(u.value)))}),c&&l.jsx(g.FormHelperText,{sx:{mt:.5},children:c})]}),us=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>l.jsxs(g.Box,{children:[e==="top"&&r&&l.jsx(g.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),l.jsx(g.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}})]}),lc=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return l.jsxs(g.Box,{children:[s&&l.jsx(g.Typography,{variant:t,sx:{color:ee.text.primary,mb:.5,fontWeight:500},children:e}),l.jsx(g.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:ee.background.paper,borderRadius:"8px","& fieldset":{borderColor:ee.divider},"&:hover fieldset":{borderColor:Ze[300]},"&.Mui-focused fieldset":{borderColor:Ze[400]},"&.Mui-error fieldset":{borderColor:ee.error.main}},"& .MuiInputBase-input":{color:ee.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:ee.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:ee.text.primary},"& .MuiFormHelperText-root":{color:r?ee.error.main:ee.text.secondary},...n}})]})},cc=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>l.jsxs(g.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&l.jsx(g.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:16,fontWeight:500,lineHeight:1.3}),children:e}),t&&l.jsx(g.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:500}),children:t})]}),r&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),xn=pt(l.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),uc=()=>l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:l.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"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_5814_24904",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function pc({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:c=!0,renderItem:p,chipText:d,helperText:f,emptyStateText:u,emptyStateButtonText:x="Add Phase",onEmptyStateButtonClick:E,emptyStateSx:m}){const[S,v]=$.useState(null),[j,D]=$.useState(null),F=h=>B=>{if(!i){v(h),B.dataTransfer.effectAllowed="move";try{B.dataTransfer.setData("text/plain",String(t(e[h])))}catch{}}},C=h=>B=>{i||(B.preventDefault(),D(h),B.dataTransfer.dropEffect="move")},_=h=>B=>{if(i)return;if(B.preventDefault(),S===null||S===h){v(null),D(null);return}const q=[...e],[Z]=q.splice(S,1);q.splice(h,0,Z),v(null),D(null),r(q)},I=()=>{v(null),D(null)},R=e.length===0,Y=R&&(u||E!==void 0);return l.jsxs(g.Box,{role:"list",sx:h=>({display:"flex",flexDirection:"column",gap:h.spacing(1),...a}),children:[n,!R&&l.jsx(g.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),Y?l.jsxs(g.Box,{sx:h=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:h.spacing(4),backgroundColor:h.palette.mode==="dark"?"#000000":ee.background.paper,border:`2px dashed ${h.palette.mode==="dark"?"#FFFFFF":ee.divider}`,borderRadius:"8px",textAlign:"center",...m}),children:[u&&l.jsx(g.Typography,{variant:"body1",sx:h=>({color:h.palette.text.secondary,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:E?2:0,maxWidth:"400px"}),children:u}),E&&l.jsx(g.Button,{variant:"outlined",startIcon:l.jsx(xn,{}),onClick:E,disabled:i,sx:h=>({mt:u?0:2,backgroundColor:h.palette.mode==="dark"?`${h.palette.primary.main}1A`:`${h.palette.primary.main}0D`,borderColor:h.palette.primary.main,color:h.palette.primary.main,"&:hover":{backgroundColor:h.palette.mode==="dark"?`${h.palette.primary.main}33`:`${h.palette.primary.main}1A`,borderColor:h.palette.primary.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1}),children:x})]}):e.map((h,B)=>{const q=S===B,Z=j===B&&S!==null&&S!==B;return l.jsx(g.Box,{role:"listitem",draggable:!i,onDragStart:F(B),onDragOver:C(B),onDrop:_(B),onDragEnd:I,sx:L=>({userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${Z?L.palette.primary.main:"#EBEBEB"}`,borderRadius:"8px",padding:L.spacing(1),opacity:q?.6:1,boxShadow:Z?`0 0 0 2px ${L.palette.primary.main}33`:"none"}),children:p?p(h,q):l.jsxs(g.Box,{sx:L=>({display:"flex",alignItems:"center",gap:L.spacing(1),minWidth:0}),children:[c&&l.jsx(uc,{}),o&&l.jsxs(g.Typography,{variant:"body2",sx:L=>({fontWeight:600,fontSize:14,color:`${L.palette.text.primary}`,flex:"0 0 auto"}),children:[B+1,"."]}),(()=>{const L=typeof d=="function"?d(h,B):d;return L?l.jsx(g.Chip,{label:L,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),l.jsx(g.Typography,{variant:"body2",sx:L=>({fontSize:12,fontWeight:500,color:`${L.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(h):""})]})},String(t(h)))}),!R&&f?typeof f=="string"?l.jsx(g.Typography,{variant:"caption",sx:h=>({color:`${h.palette.text.primary}60`}),children:f}):f:null]})}const Wh=yt(g.StepConnector)(({theme:e})=>{const t=e.palette.divider||"#E8E8E8",r=e.palette.primary.main;return{[`&.${g.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${g.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:t,transition:"border-color 0.3s ease"},[`&.${g.stepConnectorClasses.completed} .${g.stepConnectorClasses.line}`]:{borderColor:r}}}),Uh=({items:e,activeIndex:t=1,onStepClick:r,sx:n,completedSteps:i})=>{const a=_f(),s=a.palette.primary.main,o=a.palette.text.primary,c=a.palette.divider,p=a.palette.action&&a.palette.action.disabledBackground||"#E8E8E8",d=f=>{const{active:u,completed:x,icon:E}=f;return x?l.jsx(g.Box,{sx:{width:24,height:24,border:`1.2px solid ${s}`,borderRadius:"50%",backgroundColor:s,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(ls,{sx:{fontSize:16,fontWeight:600}})}):u?l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${s}`,backgroundColor:Et(s,.2),color:s,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:E}):l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:p,color:o,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:E})};return l.jsx(g.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Wh,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:o,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((f,u)=>{const x=Array.isArray(i)&&i.length>0?i.includes(u):u<t;return l.jsxs(g.Step,{onClick:()=>r==null?void 0:r(u),completed:x,children:[l.jsx(g.StepLabel,{StepIconComponent:d,children:l.jsx(g.Typography,{sx:{fontSize:12,fontWeight:500,color:u===t?s:o},children:f.label})}),u!==e.length-1&&l.jsx(g.Divider,{sx:{ml:4.2,borderColor:c}})]},u)})})},ps=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>l.jsx(g.Chip,{...s,sx:o=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${Et(t||o.palette.text.primary,.5)}`,backgroundColor:Et(t||o.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||o.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Hh=yt(g.StepConnector)(()=>({[`&.${g.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${g.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${g.stepConnectorClasses.completed} .${g.stepConnectorClasses.line}`]:{borderColor:ee.primary.main}})),Kh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=$.useState(null),s=o=>{const{active:c,completed:p,icon:d}=o;return p?l.jsx(g.Box,{sx:{width:24,height:24,border:`1.2px solid ${ee.primary.main}`,borderRadius:"50%",backgroundColor:ee.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:l.jsx(ls,{sx:{fontSize:16,fontWeight:600}})}):c?l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${ee.primary.main}`,backgroundColor:Et(ee.primary.main,.2),color:ee.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:d}):l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:ee.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:d})};return l.jsx(g.Stepper,{orientation:"vertical",activeStep:t,connector:l.jsx(Hh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:ee.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,c)=>l.jsxs(g.Step,{onMouseEnter:()=>a(c),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(c),completed:c<t,children:[l.jsxs(g.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[l.jsxs(g.StepLabel,{StepIconComponent:s,children:[l.jsxs(g.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[l.jsx(g.Typography,{sx:{fontSize:14,fontWeight:500,color:c===t?ee.primary.main:ee.text.primary},children:o.label}),l.jsx(ps,{size:"small",colorHex:c<t?ee.success.main:c===t?"#973B00":ee.text.primary,label:c<t?"Completed":c===t?"In progress":"Not started"})]}),l.jsx(g.Typography,{sx:{fontSize:12,fontWeight:400,color:`${ee.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===c&&l.jsx(g.Button,{sx:{display:c>t?"none":"block"},variant:c<t?"outlined":"contained",size:"small",color:"primary",children:c<t?"Edit":c===t?"Complete":""})]}),c!==e.length-1&&l.jsx(g.Divider,{sx:{ml:4.2,borderColor:ee.divider}})]},c))})},Yh=pt(l.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"),Gh=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const c=s||ee.info.main,p=Et(c,.08),d=Et(c,.08),f=a??l.jsx(Yh,{sx:{color:c,fontSize:18}});return e==="inlineInfo"?l.jsxs(g.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${d}`,boxShadow:"none",...o},children:[l.jsx(g.Box,{sx:{display:"flex",alignItems:"center"},children:f}),l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})]}):e==="inline"?l.jsx(g.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:p,border:`1px solid ${d}`,boxShadow:"none",...o},children:l.jsx(g.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:c},children:n})}):e==="listWithHeader"?l.jsxs(g.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:p,border:`1px solid ${d}`,...o},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[f,l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:c,fontSize:14,lineHeight:1.3},children:t})]}),r&&l.jsx(g.Typography,{variant:"body2",sx:{mt:.5,color:c,fontSize:10,lineHeight:1.3},children:r}),l.jsx(g.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:c,my:-.5}},children:i.map((u,x)=>l.jsx(g.ListItem,{sx:{py:0},children:l.jsx(g.ListItemText,{primary:u})},x))})]}):l.jsx(g.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:p,border:`0.5px solid ${d}`,boxShadow:"none",...o},children:l.jsx(g.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:c},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:c,my:-.5}},children:i.map((u,x)=>l.jsx(g.ListItem,{sx:{py:0},children:l.jsx(g.ListItemText,{primary:u})},x))})})},dc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>l.jsxs(g.Box,{children:[l.jsx(g.Tabs,{value:e,onChange:(s,o)=>t(o),"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((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return l.jsx(g.Tab,{value:c,disabled:s.disabled,label:l.jsx(g.Typography,{variant:"body2",children:s.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(c))})}),r.map((s,o)=>{const c=typeof s.value=="string"||typeof s.value=="number"?s.value:o,p=s.content??(typeof s.value=="object"?s.value:null);return p&&e===c?l.jsx(g.Box,{sx:{mt:1},children:p},`panel-${c}`):null})]}),Qh=pt(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),fc=({name:e,columns:t,initialRow:r,addLabel:n,maxRows:i,hideAddWhenMax:a,disableAddWhenMax:s=!0,showEmptyState:o=!0,rowDeletable:c=!0,control:p,sx:d,addActions:f,emptyTitle:u="No items configured",emptySubtitle:x="Click 'Add' to get started.",emptyCardSx:E,setValue:m,rowSelectionMode:S,rowSelectionKey:v})=>{const{fields:j,append:D,remove:F}=gu({control:p,name:e}),_=!(typeof i=="number"?j.length>=i:!1),I=$.useMemo(()=>{if(v)return v;const H=t.find(G=>G.type==="rowSelect");return H==null?void 0:H.key},[t,v]),R=hl({control:p,name:e})||[],Y=$.useMemo(()=>{if(!I)return{};const H={};return R.forEach((G,ne)=>{H[ne]=!!(G!=null&&G[I])}),H},[R,I]),h=$.useCallback(H=>Y[H]===!0,[Y]),B=$.useCallback((H,G)=>{if(!m||!I)return;const ne=`${e}.${H}.${I}`;S==="single"&&G&&R.forEach((ue,P)=>{if(P!==H){const U=`${e}.${P}.${I}`;m(U,!1,{shouldDirty:!0})}}),m(ne,G,{shouldDirty:!0})},[e,I,S,m,R]),q=H=>{const G={...H||r};t.forEach(ne=>{ne.value!==void 0&&G[ne.key]===void 0&&(G[ne.key]=typeof ne.value=="function"?ne.value(G,j.length):ne.value)}),D(G)};$.useEffect(()=>{!o&&j.length===0&&_&&q()},[o,j.length,_]);const Z=$.useMemo(()=>t.reduce((G,ne)=>{if(ne.width==="auto"||ne.width===void 0)return G+120;const ue=typeof ne.width=="number"?ne.width:typeof ne.width=="string"&&parseInt(ne.width)||160;return G+ue},0)+(c?100:0),[t,c]),L=H=>H.width==="auto"||H.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof H.width=="number"?{width:`${H.width}px`,minWidth:`${H.width}px`,maxWidth:`${H.width}px`}:typeof H.width=="string"?{width:H.width,minWidth:H.width}:{width:"160px",minWidth:"160px"};return l.jsx(g.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"visible",...d},children:j.length===0&&o?l.jsxs(g.Box,{sx:H=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:Et(H.palette.primary.main,.4),backgroundColor:Et(H.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...E}),children:[l.jsx(g.Typography,{variant:"subtitle1",sx:H=>({color:H.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:u}),l.jsx(g.Typography,{variant:"body2",sx:H=>({color:H.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:x}),Array.isArray(f)&&f.length>0?f.map((H,G)=>l.jsx(g.Button,{variant:"outlined",size:"small",startIcon:l.jsx(xn,{}),sx:{mr:1,mt:1},onClick:()=>q(H.template),disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:H.label},`empty-add-${G}`)):n&&l.jsx(g.Button,{variant:"outlined",size:"small",startIcon:l.jsx(xn,{}),onClick:()=>q(),disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:n})]}):l.jsxs(l.Fragment,{children:[l.jsx(g.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(f)&&f.length>0?f.map((H,G)=>l.jsx(g.Button,{variant:G===0?"contained":"outlined",size:"small",startIcon:l.jsx(xn,{}),onClick:()=>q(H.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:G===0?"#04502d":void 0}},disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:H.label},`add-${G}`)):n&&l.jsx(g.Button,{variant:"contained",size:"small",startIcon:l.jsx(xn,{}),onClick:()=>q(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},disabled:!_&&s,style:{display:!_&&a?"none":void 0},children:n})}),l.jsx(g.Box,{sx:{width:"100%",overflowX:"auto",overflowY:"auto",maxHeight:"600px","&::-webkit-scrollbar":{height:"8px",width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px","&:hover":{backgroundColor:"#555"}}},children:l.jsx(g.TableContainer,{sx:{width:"100%",minWidth:"100%"},children:l.jsxs(g.Table,{stickyHeader:!0,sx:{minWidth:`${Z||650}px`},children:[l.jsx(g.TableHead,{children:l.jsxs(g.TableRow,{children:[t.map(H=>l.jsx(g.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,...L(H)},children:H.header},H.key)),c&&l.jsx(g.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,width:100,textAlign:"center"},children:"Actions"})]})}),l.jsx(g.TableBody,{children:j.map((H,G)=>{const ne=h(G),ue=S&&!ne;return l.jsxs(g.TableRow,{children:[t.map(P=>{var de;const U=`${e}.${G}.${P.key}`,X=P.type==="rowSelect"||P.key===I,pe=X?!1:ue?!0:typeof P.disabled=="function"?P.disabled(H,G):!!P.disabled;if(P.type==="index"){const re=P.indexFormat?P.indexFormat(G):`#${G+1}`;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((de=P.cellSx)==null?void 0:de.textAlign)||"center",...L(P),...P.cellSx},children:re},P.key)}if(P.value!==void 0&&P.editable===!1){const re=typeof P.value=="function"?P.value(H,G):P.value;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...L(P),...P.cellSx},children:re},P.key)}const he=P.endorsementText?typeof P.endorsementText=="function"?P.endorsementText(H,G):P.endorsementText:void 0;return l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...L(P),...P.cellSx},children:P.type==="rowSelect"||X&&P.type==="checkbox"?l.jsx(Re,{name:U,control:p,defaultValue:!1,render:({field:re})=>l.jsx(Ht,{label:"",checked:!!re.value,disabled:!1,onChange:W=>{re.onChange(W),B(G,W)},sx:P.sx})}):P.type==="checkbox"?l.jsx(Re,{name:U,control:p,render:({field:re})=>l.jsx(Ht,{label:"",checked:!!re.value,disabled:pe,onChange:re.onChange,sx:P.sx})}):P.type==="select"?l.jsx(Re,{name:U,control:p,render:({field:re})=>l.jsx($i,{...re,fullWidth:!0,disabled:pe,options:P.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...P.sx},helperText:P.helperText,required:P.required})}):P.type==="date"?l.jsx(Re,{name:U,control:p,defaultValue:P.value!==void 0?typeof P.value=="function"?P.value(H,G):P.value:void 0,render:({field:re})=>($.useEffect(()=>{if(m&&(re.value===void 0||re.value===null||re.value==="")&&P.value!==void 0){const W=typeof P.value=="function"?P.value(H,G):P.value;m(U,W,{shouldValidate:!1})}},[U,re.value,P.value,H,G,m]),l.jsx(us,{...re,fullWidth:!0,disabled:pe,size:"small",placeholder:P.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...P.sx},helperText:P.helperText,required:P.required}))}):l.jsx(Re,{name:U,control:p,defaultValue:P.value!==void 0?typeof P.value=="function"?P.value(H,G):P.value:void 0,render:({field:re})=>($.useEffect(()=>{if(m&&(re.value===void 0||re.value===null||re.value==="")&&P.value!==void 0){const W=typeof P.value=="function"?P.value(H,G):P.value;m(U,W,{shouldValidate:!1})}},[U,re.value,P.value,H,G,m]),l.jsx(vt,{...re,fullWidth:!0,type:P.type==="number"?"number":"text",placeholder:P.placeholder,disabled:pe,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...P.sx},helperText:P.helperText,required:P.required,endorsementText:he,endorsementBg:P.endorsementBg,endorsementColor:P.endorsementColor,endorsementRadius:P.endorsementRadius,endorsementHeight:P.endorsementHeight,endorsementPaddingX:P.endorsementPaddingX,inputProps:{...P.type==="number"?{min:P.min,max:P.max,step:P.step}:{minLength:P.minLength,maxLength:P.maxLength,pattern:P.pattern}}}))})},P.key)}),c&&l.jsx(g.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:l.jsx(g.IconButton,{size:"small",color:"error",onClick:()=>F(G),sx:{width:"20px",height:"20px"},children:l.jsx(Qh,{sx:{fontSize:"20px"}})})})]},H.id)})})]})})})]})})},hc=({name:e,control:t,items:r,sx:n,cardSx:i})=>l.jsx(g.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,c=!!(a.header||a.chipText),p=a.leftAction,d=a.rightAction;return l.jsxs(g.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[s&&p&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:l.jsx(Re,{name:p.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(Ht,{label:p.label||"",checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),c&&l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&l.jsx(g.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&l.jsx(g.Box,{sx:{bgcolor:"rgba(26,26,26,0.1)",px:1.5,py:.375,borderRadius:"4px",fontSize:"12px",color:"rgba(26,26,26,0.8)"},children:a.chipText})]}),o&&d&&l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:l.jsx(Re,{name:d.name,control:t,defaultValue:!1,render:({field:f})=>l.jsx(di,{label:d.label,checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),!s&&!o&&!c&&l.jsx(g.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),mc=pt(l.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),ta=pt(l.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.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 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),Zh=[{label:"Interest-only",value:"interest-only"},{label:"Principal moratorium",value:"principal-moratorium"},{label:"EMI",value:"emi"},{label:"Equal-principal",value:"equal-principal"},{label:"Balloon",value:"balloon"},{label:"Bullet",value:"bullet"},{label:"Step-up/Down",value:"step-up-down"},{label:"Seasonal skips",value:"seasonal-skips"},{label:"Custom fixed installment",value:"custom-fixed"},{label:"Full payment holiday (no billing)",value:"payment-holiday"}],ra=[{label:"Accrue & capitalize at end of phase",value:"accrue-capitalize"},{label:"Accrue & bill in first period after phase",value:"accrue-bill-next"},{label:"Accrue & forgive at phase end",value:"accrue-forgive"}],Xh=({phase:e,index:t,onUpdate:r,onDelete:n,months:i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],disabled:a=!1,sx:s})=>{const[o,c]=$.useState(e.seasonalMonths||[]),p=u=>{const x=o.includes(u)?o.filter(E=>E!==u):[...o,u];c(x),r(e.id,{seasonalMonths:x})},d=(()=>{const u=e.min||0;return u<0?"Min cannot be negative.":Number.isInteger(u)?null:"Use whole periods."})(),f=(()=>{const u=e.min||0,x=e.max||0;return Number.isInteger(x)?x<u?"Max must be ≥ Min.":null:"Use whole periods."})();return l.jsx(g.Card,{sx:{border:"2px solid",borderColor:ee.divider,position:"relative",...s},children:l.jsxs(g.CardContent,{sx:{p:2},children:[l.jsxs(g.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs(g.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[l.jsx(g.Box,{children:l.jsx(uc,{})}),l.jsx(ps,{label:t+1,size:"small"})]}),l.jsx(g.IconButton,{onClick:()=>n(e.id),disabled:a,sx:{color:ee.error.main,"&:hover":{bgcolor:Ze[50]}},size:"small",children:l.jsx(mc,{fontSize:"small"})})]}),l.jsx(g.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:l.jsxs(g.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[l.jsxs(g.Box,{sx:{display:"flex",gap:2,mb:.5},children:[l.jsx(g.Box,{sx:{flex:.5,display:"grid",gap:1},children:l.jsx($i,{labelText:"Phase type",value:e.type,onChange:u=>r(e.id,{type:u.target.value}),options:Zh,disabled:a})}),l.jsxs(g.Box,{sx:{display:"grid",gap:1,flex:.5},children:[l.jsx(g.Typography,{variant:"caption",sx:{fontSize:"12px",color:ee.text.secondary},children:"Allocation priority (1–9)"}),l.jsx(vt,{type:"number",value:e.priority||5,onChange:u=>{const x=parseInt(u.target.value)||5;r(e.id,{priority:Math.min(9,Math.max(1,x))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),l.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(g.Box,{sx:{display:"grid",gap:1},children:l.jsx(vt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:u=>{const x=parseInt(u.target.value)||0;r(e.id,{min:x,...e.lockLength?{max:x}:{}})},inputProps:{min:0},disabled:a,error:!!d,helperText:d||void 0})}),l.jsx(g.Box,{sx:{display:"grid",gap:1},children:l.jsx(vt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:u=>r(e.id,{max:parseInt(u.target.value)||0}),inputProps:{min:0},disabled:a||e.lockLength,error:!!f&&!e.lockLength,helperText:e.lockLength?"Locked to Min":f||void 0,sx:e.lockLength?{opacity:.5}:{}})})]}),l.jsxs(g.Box,{sx:{display:"flex",gap:3},children:[l.jsx(Ht,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:u=>r(e.id,{lockLength:u,...u?{max:e.min}:{}}),disabled:a}),l.jsx(Ht,{label:"Residual fill",checked:e.residualFill||!1,onChange:u=>r(e.id,{residualFill:u}),disabled:a})]}),e.type==="principal-moratorium"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:ee.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1.5},children:[l.jsx(Sr,{value:e.balloonType||"percent",onChange:u=>r(e.id,{balloonType:u}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&l.jsx(vt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:u=>r(e.id,{balloonAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&l.jsx(vt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:u=>r(e.id,{balloonPercent:parseFloat(u.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&l.jsxs(g.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[l.jsx(vt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:u=>r(e.id,{stepPercent:parseFloat(u.target.value)||0}),placeholder:"e.g., 10",disabled:a}),l.jsx(vt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:u=>r(e.id,{stepEveryN:parseInt(u.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1.5},children:[l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),l.jsx(g.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(u=>l.jsx(g.Chip,{label:u,size:"small",onClick:()=>!a&&p(u),sx:{cursor:a?"default":"pointer",bgcolor:o.includes(u)?ee.primary.main:"transparent",color:o.includes(u)?ee.primary.contrastText:ee.text.primary,border:`1px solid ${ee.divider}`,"&:hover":{bgcolor:o.includes(u)?Ze[600]:Ze[50]}}},u))})]}),l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:ee.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ra,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&l.jsx(vt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:u=>r(e.id,{customAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&l.jsxs(g.Box,{sx:{display:"grid",gap:1},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(g.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),l.jsx(g.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:l.jsx(ta,{sx:{fontSize:14,color:ee.text.secondary,cursor:"help"}})})]}),l.jsx(Sr,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:u=>r(e.id,{holidayInterestTreatment:u}),options:ra,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&l.jsx(g.Typography,{variant:"caption",sx:{color:ee.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};async function gc(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:c={},params:p={},body:d,transform:f,passThroughFields:u}=e;let x=i;if(t&&!i.startsWith("http")&&(x=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const F=/\{([^}]+)\}/g;x=x.replace(F,(C,_)=>{const I=n[_];return I!=null?encodeURIComponent(String(I)):""}),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const E=new URLSearchParams;Object.entries(p).forEach(([F,C])=>{C!=null&&E.append(F,String(C))}),E.toString()&&(x+=`${x.includes("?")?"&":"?"}${E.toString()}`);try{const F=/^https?:\/\//i.test(x),C=new URL(x,F?void 0:"http://local.placeholder"),_=Array.from(C.searchParams.entries());for(const[I,R]of _)(R===""||R==="undefined"||R==="null")&&C.searchParams.delete(I);F?x=C.toString():x=C.pathname+(C.search?C.search:""),x=x.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const m={"Content-Type":"application/json",...r,...c},S={method:a,headers:m};(a==="POST"||a==="PUT")&&d&&(S.body=JSON.stringify(d));const v=await fetch(x,S);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const j=await v.json();if(f)return f(Array.isArray(j)?j:j.data||j);const D=Array.isArray(j)?j:j.data||j;if(!Array.isArray(D))throw new Error("API response is not an array");return D.map(F=>{const C={label:F[o]||F.name||F.title||String(F[s]||""),value:F[s]||F.id||F.value||""},_=Array.isArray(u)?u:void 0;if(Array.isArray(_))for(const I of _)F[I]!==void 0&&(C[I]=F[I]);return C})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function yc(e,t,r,n,i=!1){const a=$.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const o=n[e.dependsOn];return o!==void 0?o:null},[e==null?void 0:e.dependsOn,n]),s=$.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 tp({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return gc(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:o=>Math.min(1e3*2**o,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function xr(e){return!!(e.apiConfig||e.api_endpoint)}function ds(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 Jh(e,t){const r=ds(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 fs=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],c=!!o,[p,d]=$.useState(!1),f=$.useRef(!1),[u,x]=$.useState(!1),[E,m]=$.useState(!1),[S,v]=$.useState(!1),j=$.useRef(null),D=$.useRef(null),F=()=>{var se;const W=e.required;if(typeof W=="function")try{return!!W(a||{})}catch{return!1}if(W!==void 0)return!!W;const Q=(se=e.validation)==null?void 0:se.required;if(typeof Q=="function")try{return!!Q(a||{})}catch{return!1}return Q!==void 0?!!Q:!1},C=W=>F()?`${W} *`:W,_=()=>{if(e.value!==void 0){if(typeof e.value=="function")try{return e.value(a||{})}catch{return""}return e.value}return e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:""},I=$.useRef(void 0);$.useEffect(()=>{const W=e.value;if(typeof W!="function"||!s)return;let Q;try{Q=W(a||{})}catch{return}const se=a?a[e.name]:void 0;if(I.current===void 0&&(I.current=Q),se===void 0||se===I.current)try{s(e.name,Q,{shouldValidate:!0,shouldDirty:!1}),I.current=Q}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((W,Q)=>({...W,[Q]:a[Q]}),{}):a||{}),e.name]);const R=$.useMemo(()=>{const W=ds(e);return W&&Array.isArray(e.passThroughFields)&&(W.passThroughFields=e.passThroughFields),W},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),Y=$.useRef(null),h=R!=null&&R.dependsOn?a==null?void 0:a[R.dependsOn]:null;$.useEffect(()=>{R!=null&&R.dependsOn&&(Y.current=h)},[R==null?void 0:R.dependsOn,h]);const B=$.useMemo(()=>{const W=e.showWhen;if(typeof W=="function")try{return!!W(a||{})}catch{return!0}if(W&&typeof W=="object"){const Q=W.field,se=W.equals,le=W.in,ce=Q?(a||{})[Q]:void 0;if(Q&&typeof se<"u")return ce===se;if(Q&&Array.isArray(le))return le.includes(ce)}return!0},[e.showWhen,a]),q=$.useCallback(()=>{const W=e.dynamicEndorsement;if(typeof W=="function")try{return W(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),Z=$.useCallback(()=>{const W=e.endAdornment,Q=e.endAdornmentSwitch,se=e.endAdornmentCheckbox;if(Q)return l.jsx(Re,{name:Q,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:le})=>l.jsx(g.Switch,{checked:le.value||!1,onChange:ce=>{le.onChange(ce.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(ce.target.checked,a,s)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(se)return l.jsx(Re,{name:se,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:le})=>l.jsx(Ht,{label:"",checked:le.value||!1,onChange:le.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof W=="function")try{return W(a||{},{control:t,setValue:s})}catch{return}return W},[e,a,t,s]),L=$.useMemo(()=>p&&xr(e)&&(!(R!=null&&R.dependsOn)||h),[p,e,R==null?void 0:R.dependsOn,h]),H=$.useMemo(()=>{const W={};if(!a)return W;const Q=(R==null?void 0:R.endpoint)||(e==null?void 0:e.api_endpoint);if(Q&&typeof Q=="string"){const se=Q.match(/\{([^}]+)\}/g)||[];for(const le of se){const ce=le.slice(1,-1),be=a[ce];be!==void 0&&(W[ce]=be)}}if(R!=null&&R.dependsOn){const se=R.dependsOn,le=a[se];le!==void 0&&(W[se]=le)}return W},[R==null?void 0:R.endpoint,e==null?void 0:e.api_endpoint,R==null?void 0:R.dependsOn,a]),{data:G=[],isLoading:ne,error:ue}=yc(R,n,i,H,L),P=$.useCallback(()=>{xr(e)&&!f.current&&(f.current=!0,d(!0))},[e]),U=$.useCallback(()=>{xr(e)&&!f.current&&(f.current=!0,d(!0))},[e]);$.useEffect(()=>{if(xr(e)&&!f.current){const W=a==null?void 0:a[e.name];W!=null&&W!==""&&(f.current=!0,d(!0))}},[e,a]),$.useEffect(()=>{xr(e)&&(R!=null&&R.dependsOn)&&(h!=null&&`${h}`!=""?(f.current=!0,d(!0)):(f.current=!1,d(!1)))},[R==null?void 0:R.dependsOn,h]);const X=$.useCallback(W=>{if(typeof W=="function")try{const Q=W(a||{});return X(Q)}catch{return[]}return W?Array.isArray(W)?W.map(Q=>{if(Q&&typeof Q=="object"){const se=Q.value??Q.id??Q.key??void 0,le=Q.label??Q.name??Q.title??(se!==void 0?String(se):"");return{label:String(le??""),value:String(se??le??"")}}return{label:String(Q),value:String(Q)}}):typeof W=="object"?Object.keys(W).map(Q=>({value:String(Q),label:String(W[Q])})):[]:[]},[a]),pe=$.useCallback(()=>xr(e)?Array.isArray(G)?G:[]:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?X(e.options):[],[e,G,X]),he=()=>{var W,Q,se,le,ce,be;switch(e.type){case"title":return l.jsx(g.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 l.jsx(g.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 J=e.actionName,Ie=e.actionComponent,Ke=e.actionLabel,Xe=T=>l.jsx(cc,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:T??e.actions}),Tt=T=>{if(e.cardWrap){const M={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return l.jsx(g.Card,{sx:M,...e.cardProps,children:T})}return T};return Tt(J&&Ie?l.jsx(Re,{name:J,control:t,defaultValue:e.value??!1,render:({field:T})=>Xe(Ie==="switch"?l.jsx(di,{label:Ke,checked:!!T.value,onChange:T.onChange}):l.jsx(Ht,{label:Ke||"",checked:!!T.value,onChange:T.onChange}))}):Xe());case"tabs":return l.jsx(Re,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((Q=(W=e.items)==null?void 0:W[0])==null?void 0:Q.value)=="string"||typeof((le=(se=e.items)==null?void 0:se[0])==null?void 0:le.value)=="number"?(be=(ce=e.items)==null?void 0:ce[0])==null?void 0:be.value:0),render:({field:T})=>{const y=e.items||[],M=y.map((z,K)=>({label:z.label,value:typeof z.value=="string"||typeof z.value=="number"?z.value:K,content:z.content,disabled:z.disabled})),b=T.value,A=(()=>{if(typeof b=="string"||typeof b=="number"){const z=y.findIndex((K,fe)=>typeof K.value=="string"||typeof K.value=="number"?K.value===b:fe===b);return z>=0?z:0}return Number(b)||0})(),V=y[A]||{};return l.jsxs(g.Box,{children:[l.jsx(dc,{value:T.value,onChange:T.onChange,items:M,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(V.fields)&&V.fields.length>0&&(()=>{const z=V.fields,K=[];let fe=[];for(const ge of z)ge.type==="section"&&fe.length>0?(K.push(fe),fe=[ge]):fe.push(ge);fe.length>0&&K.push(fe);const ye={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1};return l.jsx(g.Box,{sx:{mt:1},children:K.map((ge,Ne)=>{const Oe=ge.find(Me=>Me.type==="section"),at=(Oe==null?void 0:Oe.cardWrap)!==!1,dt=l.jsx(l.Fragment,{children:ge.map(Me=>{const ie=Me.showWhen;if(ie)try{if(typeof ie=="function"){if(!ie(a||{}))return null}else if(typeof ie=="object"){const Yt=ie.field,ys=ie.equals,xs=ie.in,vs=Yt?(a||{})[Yt]:void 0;if(Yt&&typeof ys<"u"&&vs!==ys||Yt&&Array.isArray(xs)&&!xs.includes(vs))return null}}catch{}const Ge=Math.min(Math.max(Me.col??12,1),12);return l.jsx(g.Box,{sx:{gridColumn:`span ${Ge}`},children:l.jsx(fs,{field:Me,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},Me.name)})});return at?l.jsx(g.Card,{sx:{...ye,...(Oe==null?void 0:Oe.cardSx)||{}},...(Oe==null?void 0:Oe.cardProps)||{},children:dt},`tab-group-${Ne}`):l.jsx(g.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:dt},`tab-group-${Ne}`)})})})()]})}});case"grid":const Ye=e.defaultRows||[];return l.jsx(g.Box,{children:l.jsx(Re,{name:e.name,control:t,defaultValue:Ye.length>0?Ye:_()||[],render:()=>l.jsx(fc,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,showEmptyState:e.showEmptyState,maxRows:e.maxRows,hideAddWhenMax:e.hideAddWhenMax,disableAddWhenMax:e.disableAddWhenMax,rowDeletable:e.rowDeletable!==!1,control:t,setValue:s,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey})})});case"listcards":return l.jsx(hc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return l.jsx(Re,{name:e.name,control:t,defaultValue:e.items||[],render:({field:T})=>{const y=e,M=T.value||y.items||[],b=typeof y.getId=="function"?y.getId:typeof y.getId=="string"?z=>z[y.getId]:z=>z.id??z._id??z.key??String(z),A=typeof y.getText=="function"?y.getText:typeof y.getText=="string"?z=>z[y.getText]??String(z):z=>z.text??z.label??z.name??z.title??String(z),V=(()=>{if(typeof y.chipText=="function")return y.chipText;if(typeof y.chipText=="string")return M.length>0&&M[0]&&y.chipText in M[0]?(z,K)=>z[y.chipText]??void 0:y.chipText})();return l.jsx(pc,{items:M,getId:b,onReorder:z=>{T.onChange(z)},header:y.header,disabled:e.disabled,sx:y.sx,chipText:V,helperText:y.helperText||(c?o==null?void 0:o.message:void 0),getText:A,showIndex:y.showIndex!==!1,showLeftIcon:y.showLeftIcon!==!1,renderItem:y.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>e.type==="textarea"?l.jsx(lc,{...T,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText}):l.jsx(vt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:Z(),endorsementText:q(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?u?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:c,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:l.jsx(ec,{position:"end",children:l.jsx(Gn,{"aria-label":"toggle password visibility",onClick:()=>x(y=>!y),edge:"end",children:u?l.jsx(Oo,{}):l.jsx(Ao,{})})})}:void 0})});case"number":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(vt,{...T,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:Z(),endorsementText:q(),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:c,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const We=pe();return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const y=typeof e.disabled=="function"?!!e.disabled(a||{}):!!e.disabled,M=e.disableWhenEmptyOptions===!0&&Array.isArray(We)&&We.length===0,b=y||M||ne,A=T.value,V=(()=>{if(Array.isArray(We)&&We.length>0){const z=We.find(K=>String(K==null?void 0:K.value)===String(A));return z?z.value:A}return A})();return l.jsx($i,{labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?C(e.label):void 0,labelVariant:e.labelVariant,value:V,onChange:T.onChange,options:We,disabled:b,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?C(e.label):void 0):e.placeholder,loading:ne,error:c||!!ue,helperText:(o==null?void 0:o.message)||(ue==null?void 0:ue.message)||e.helperText,onOpen:P})}});case"checkbox":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Ht,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"toggle":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Sr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:!0,onChange:T.onChange})});case"radio":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(Sr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:T.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange})});case"checkboxGroup":return l.jsx(Re,{name:e.name,control:t,defaultValue:_()||[],render:({field:T})=>l.jsx(oc,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(T.value)?T.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:T.onChange,disabled:e.disabled})});case"switch":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(di,{label:C(e.label),checked:!!T.value,disabled:e.disabled,onChange:T.onChange})});case"autocomplete":const Ue=pe(),w=!!((typeof e.disabled=="function"?e.disabled(a||{},{options:Ue,isLoading:ne,error:ue}):e.disabled)||e.disableWhenEmptyOptions===!0&&Array.isArray(Ue)&&Ue.length===0||ne||R!=null&&R.dependsOn&&!h);return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const y=T.value,M=e.multiple===!0,b=(R==null?void 0:R.valueField)||e.value_field||"value",A=z=>{if(z!=null){if(typeof z=="string"||typeof z=="number")return z;if(typeof z=="object"){if(z[b]!==void 0)return z[b];if(z.value!==void 0)return z.value;if(z.id!==void 0)return z.id}}},V=(()=>{if(M)return(Array.isArray(y)?y:[]).map(K=>{const fe=String(typeof K=="object"?A(K):K);return Ue.find(ge=>{const Ne=A(ge);return Ne!==void 0&&String(Ne)===fe})||null}).filter(Boolean);{if(y==null||y==="")return null;const z=String(typeof y=="object"?A(y):y),K=Ue.find(fe=>{const ye=A(fe);return ye!==void 0&&String(ye)===z});return K||null}})();return l.jsx(sc,{id:e.id,options:Ue,value:V,multiple:M,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,placeholder:w&&(R!=null&&R.dependsOn)&&!h?`Please select ${R.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:w,loading:ne,error:c||!!ue,helperText:(o==null?void 0:o.message)||(ue==null?void 0:ue.message)||e.helperText||"",onOpen:U,noOptionsText:w&&(R!=null&&R.dependsOn)&&!h?`Please select ${R.dependsOn.replace(/_/g," ")} first`:ne?"Fetching data...":p&&!ne&&Ue.length===0?"No options available":"Click to load options",onChange:z=>{const K=(R==null?void 0:R.valueField)||e.value_field||"value";if(M){const ye=(Array.isArray(z)?z:[]).map(ge=>typeof ge=="object"&&(ge[K]||ge.value||ge.id)||ge);T.onChange(ye)}else{let fe;z&&typeof z=="object"?fe=z[K]||z.value||z.id||z:fe=z,T.onChange(fe);const ye=e.selectedAssignments;if(ye&&z&&typeof z=="object")for(const[ge,Ne]of Object.entries(ye)){const Oe=z[Ne];if(Oe!==void 0&&typeof s=="function")try{s(ge,Oe,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>l.jsx(us,{...T,id:e.name,label:C(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:c,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return l.jsx(Re,{name:e.name,control:t,defaultValue:_(),render:({field:T})=>{const y=T.value||e.defaultValue||e.src;if(y){const K=e.imageUploaded||{},fe=K.previewText||"Preview",ye=K.removeText||"Remove",ge=K.saveText||"Save logo",Ne=K.showSave!==void 0?K.showSave:!!(e.onSave||K.saveText),Oe=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(y)}catch{}},at=()=>{T.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},dt=()=>{typeof e.onSave=="function"&&e.onSave({url:y,file:D.current||void 0})},Me=ie=>{const Ge=ie.target.files&&ie.target.files[0];if(Ge){if(typeof e.onFileSelected=="function")try{e.onFileSelected(Ge)}catch{}try{const Yt=URL.createObjectURL(Ge);T.onChange(Yt)}catch{}D.current=Ge,v(!1)}};return l.jsxs(g.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...K.cardSx},children:[l.jsx("input",{type:"file",ref:j,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:Me}),l.jsxs(g.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[l.jsx(g.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...K.thumbnailSx},children:l.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),l.jsxs(g.Box,{sx:{flexGrow:1},children:[l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:500,...K.fileNameSx},children:typeof y=="string"?y.split("/").pop():"Selected image"}),l.jsx(g.Typography,{sx:{fontSize:"10px",...K.fileMetaSx},children:"Image selected"})]}),l.jsxs(g.Box,{sx:{display:"flex",gap:1},children:[l.jsx(g.Button,{type:"button",sx:{...K.previewButtonSx},variant:"outlined",onClick:Oe,startIcon:l.jsx(Ao,{}),children:fe}),l.jsx(g.Button,{variant:"outlined",color:"error",onClick:at,sx:{...K.removeButtonSx},startIcon:l.jsx(Oo,{}),children:ye}),Ne&&l.jsx(g.Button,{variant:"contained",onClick:dt,sx:{...K.saveButtonSx},children:ge})]})]}),l.jsxs(g.Dialog,{open:S,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[l.jsx(g.DialogTitle,{children:K.previewTitle||"Image preview"}),l.jsx(g.DialogContent,{children:l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:l.jsx("img",{src:y,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),l.jsxs(g.DialogActions,{children:[l.jsx(g.Button,{type:"button",variant:"outlined",onClick:()=>{var ie;return(ie=j.current)==null?void 0:ie.click()},children:K.replaceText||"Replace logo"}),l.jsx(g.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:K.closeText||"Close"})]})]})]})}const M=e.imagePlaceholder||{},b=M.icon||"upload",A=j,V=()=>{var K;try{(K=A.current)==null||K.click()}catch{}},z=K=>{const fe=K.target.files&&K.target.files[0];if(fe){typeof e.onFileSelected=="function"&&e.onFileSelected(fe);try{const ye=URL.createObjectURL(fe);T.onChange(ye)}catch{}D.current=fe}};return l.jsxs(g.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...M.sx},children:[l.jsx("input",{type:"file",ref:A,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:z}),l.jsx(Gn,{sx:{borderRadius:"8px",...M.iconSx},children:b==="image"?l.jsx(zh,{sx:{width:36,height:36,color:"primary.main"}}):l.jsx(pi,{sx:{width:36,height:36,color:"primary.main"}})}),l.jsx(g.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...M.titleSx},children:M.title||"Drag & Drop the image here"}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...M.subtitleSx},children:M.subtitle||""}),l.jsx(g.Button,{onClick:V,sx:{my:2,...M.buttonSx},startIcon:l.jsx(pi,{}),variant:"contained",disabled:e.disabled,children:M.buttonText||"Upload File"}),l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:400,...M.helperTextSx},children:M.helperText||e.helperText||""})]})}});case"component":return l.jsx(g.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:s})}catch{try{return e.render({control:t,formData:a,setValue:s})}catch{return e.render()}}})():e.render:e.content});default:return null}},de=$.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),re=$.useCallback(async()=>{try{const W=a?a[e.name]:void 0;let Q="";W==null?Q="":Array.isArray(W)?Q=W.join(", "):typeof W=="object"?Q=JSON.stringify(W):Q=String(W),await navigator.clipboard.writeText(Q),m(!0),window.setTimeout(()=>m(!1),1200)}catch{}},[a,e.name]);return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[l.jsx(g.Box,{sx:{flexGrow:1},children:B?he():null}),de&&l.jsx(Gn,{"aria-label":`copy ${e.label||e.name}`,onClick:re,size:"small",children:E?l.jsx(ls,{fontSize:"small"}):l.jsx(Mh,{fontSize:"small"})})]})};var na,Ro;function em(){if(Ro)return na;Ro=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,j){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=j};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),c=new e(s),p=new e(s);na={Cache:e,split:f,normalizePath:d,setter:function(v){var j=d(v);return c.get(v)||c.set(v,function(F,C){for(var _=0,I=j.length,R=F;_<I-1;){var Y=j[_];if(Y==="__proto__"||Y==="constructor"||Y==="prototype")return F;R=R[j[_++]]}R[j[_]]=C})},getter:function(v,j){var D=d(v);return p.get(v)||p.set(v,function(C){for(var _=0,I=D.length;_<I;)if(C!=null||!j)C=C[D[_++]];else return;return C})},join:function(v){return v.reduce(function(j,D){return j+(x(D)||r.test(D)?"["+D+"]":(j?".":"")+D)},"")},forEach:function(v,j,D){u(Array.isArray(v)?v:f(v),j,D)}};function d(v){return o.get(v)||o.set(v,f(v).map(function(j){return j.replace(a,"$2")}))}function f(v){return v.match(t)||[""]}function u(v,j,D){var F=v.length,C,_,I,R;for(_=0;_<F;_++)C=v[_],C&&(S(C)&&(C='"'+C+'"'),R=x(C),I=!R&&/^\d+$/.test(C),j.call(D,C,R,I,_,v))}function x(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function E(v){return v.match(n)&&!v.match(r)}function m(v){return i.test(v)}function S(v){return!x(v)&&(E(v)||m(v))}return na}var Rr=em(),ia,$o;function tm(){if($o)return ia;$o=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=d=>d.match(e)||[],r=d=>d[0].toUpperCase()+d.slice(1),n=(d,f)=>t(d).join(f).toLowerCase(),i=d=>t(d).reduce((f,u)=>`${f}${f?u[0].toUpperCase()+u.slice(1).toLowerCase():u.toLowerCase()}`,"");return ia={words:t,upperFirst:r,camelCase:i,pascalCase:d=>r(i(d)),snakeCase:d=>n(d,"_"),kebabCase:d=>n(d,"-"),sentenceCase:d=>r(n(d," ")),titleCase:d=>t(d).map(r).join(" ")},ia}var aa=tm(),Ln={exports:{}},Po;function rm(){if(Po)return Ln.exports;Po=1,Ln.exports=function(i){return e(t(i),i)},Ln.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),c={},p=s,d=r(a),f=n(i);for(a.forEach(function(x){if(!f.has(x[0])||!f.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});p--;)c[p]||u(i[p],p,new Set);return o;function u(x,E,m){if(m.has(x)){var S;try{S=", node was:"+JSON.stringify(x)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!f.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!c[E]){c[E]=!0;var v=d.get(x)||new Set;if(v=Array.from(v),E=v.length){m.add(x);do{var j=v[--E];u(j,f.get(j),m)}while(E);m.delete(x)}o[--s]=x}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var c=i[s];a.add(c[0]),a.add(c[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var c=i[s];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[1])}return a}function n(i){for(var a=new Map,s=0,o=i.length;s<o;s++)a.set(i[s],s);return a}return Ln.exports}var nm=rm();const im=Ya(nm),am=Object.prototype.toString,sm=Error.prototype.toString,om=RegExp.prototype.toString,lm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",cm=/^Symbol\((.*)\)(.*)$/;function um(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Do(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return um(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return lm.call(e).replace(cm,"Symbol($1)");const n=am.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+sm.call(e)+"]":n==="RegExp"?om.call(e):null}function ur(e,t){let r=Do(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=Do(this[n],t);return a!==null?a:i},2)}function xc(e){return e==null?[]:[].concat(e)}let vc,bc,wc,pm=/\$\{\s*(\w+)\s*\}/g;vc=Symbol.toStringTag;class Io{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[vc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],xc(t).forEach(a=>{if(ct.isError(a)){this.errors.push(...a.errors);const s=a.inner.length?a.inner:[a];this.inner.push(...s)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}bc=Symbol.hasInstance;wc=Symbol.toStringTag;class ct 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(pm,(i,a)=>ur(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const s=new Io(t,r,n,i);if(a)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[wc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ct)}static[bc](t){return Io[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let $t={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 \`${ur(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ur(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ur(r,!0)}\``+i}},st={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"},Xt={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"},$a={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Pa={isValue:"${path} field must be ${value}"},Qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},dm={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"},fm={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: \`${ur(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: \`${ur(r,!0)}\``}return ct.formatError($t.notType,e)}};Object.assign(Object.create(null),{mixed:$t,string:st,number:Xt,date:$a,object:Qn,array:dm,boolean:Pa,tuple:fm});const hs=e=>e&&e.__isYupSchema__;class fi{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,s=typeof n=="function"?n:(...o)=>o.every(c=>c===n);return new fi(t,(o,c)=>{var p;let d=s(...o)?i:a;return(p=d==null?void 0:d(c))!=null?p:c})}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(!hs(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const qn={context:"$",value:"."};function hi(e,t){return new gr(e,t)}class gr{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]===qn.context,this.isValue=this.key[0]===qn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?qn.context:this.isValue?qn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Rr.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}}gr.prototype.__isYupRef=!0;const Ot=e=>e==null;function Wr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,c){const{name:p,test:d,params:f,message:u,skipAbsent:x}=e;let{parent:E,context:m,abortEarly:S=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function j(B){return gr.isRef(B)?B.getValue(r,E,m):B}function D(B={}){const q=Object.assign({value:r,originalValue:a,label:s.spec.label,path:B.path||n,spec:s.spec,disableStackTrace:B.disableStackTrace||v},f,B.params);for(const L of Object.keys(q))q[L]=j(q[L]);const Z=new ct(ct.formatError(B.message||u,q),r,q.path,B.type||p,q.disableStackTrace);return Z.params=q,Z}const F=S?o:c;let C={path:n,parent:E,type:p,from:i.from,createError:D,resolve:j,options:i,originalValue:a,schema:s};const _=B=>{ct.isError(B)?F(B):B?c(null):F(D())},I=B=>{ct.isError(B)?F(B):o(B)};if(x&&Ot(r))return _(!0);let Y;try{var h;if(Y=d.call(C,r,C),typeof((h=Y)==null?void 0:h.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Y).then(_,I)}}catch(B){I(B);return}_(Y)}return t.OPTIONS=e,t}function hm(e,t,r,n=r){let i,a,s;return t?(Rr.forEach(t,(o,c,p)=>{let d=c?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",u=p?parseInt(d,10):0;if(e.innerType||f){if(f&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&u>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[u],e=f?e.spec.types[u]:e.innerType}if(!p){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);i=r,r=r&&r[d],e=e.fields[d]}a=d,s=c?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class mi extends Set{describe(){const t=[];for(const r of this.values())t.push(gr.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 mi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Hr(e,t=new Map){if(hs(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]=Hr(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,Hr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Hr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Hr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class gt{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 mi,this._blacklist=new mi,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($t.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=Hr(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(s=>{a.test(s.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&&Ot(a))return a;let s=ur(t),o=ur(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: ${s}
|
|
179
179
|
`+(o!==s?`result of cast: ${o}`:""))}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:s=t,strict:o=this.spec.strict}=r,c=t;o||(c=this._cast(c,Object.assign({assert:!1},r)));let p=[];for(let d of Object.values(this.internalTests))d&&p.push(d);this.runTests({path:a,value:c,originalValue:s,options:r,tests:p},n,d=>{if(d.length)return i(d,c);this.runTests({path:a,value:c,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:c,options:p}=t,d=m=>{i||(i=!0,r(m,s))},f=m=>{i||(i=!0,n(m,s))},u=a.length,x=[];if(!u)return f([]);let E={value:s,originalValue:o,path:c,options:p,schema:this};for(let m=0;m<a.length;m++){const S=a[m];S(E,d,function(j){j&&(Array.isArray(j)?x.push(...j):x.push(j)),--u<=0&&f(x)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:s}){const o=t??r;if(o==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof o=="number";let p=n[o];const d=Object.assign({},s,{strict:!0,parent:n,value:p,originalValue:a[o],key:void 0,[c?"index":"key"]:o,path:c||o.includes(".")?`${i||""}[${c?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(f,u,x)=>this.resolve(d)._validate(p,d,u,x)}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((s,o)=>i._validate(t,r,(c,p)=>{ct.isError(c)&&(c.value=p),o(c)},(c,p)=>{c.length?o(new ct(c,p,void 0,void 0,a)):s(p)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(o,c)=>{throw ct.isError(o)&&(o.value=c),o},(o,c)=>{if(o.length)throw new ct(o,t,void 0,void 0,s);a=c}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(ct.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(ct.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Hr(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=Wr({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=Wr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=$t.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=$t.notNull){return this.nullability(!1,t)}required(t=$t.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=$t.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Wr(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(s=>!(s.OPTIONS.name===r.name&&(a||s.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=xc(t).map(a=>new gr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new fi(i,r):fi.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Wr({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=$t.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=Wr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,s=a.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:s}})}}),n}notOneOf(t,r=$t.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=Wr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,s=a.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:s}}):!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:s}=r.spec;return{meta:i,label:n,optional:a,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,p,d)=>d.findIndex(f=>f.name===c.name)===p)}}}gt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])gt.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=hm(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])gt.prototype[e]=gt.prototype.oneOf;for(const e of["not","nope"])gt.prototype[e]=gt.prototype.notOneOf;const mm=()=>!0;function Sc(e){return new Cc(e)}class Cc extends gt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:mm},t))}}Sc.prototype=Cc.prototype;function Ec(){return new kc}class kc extends gt{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=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Ot(r)||r===!0}})}isFalse(t=Pa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Ot(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)}}Ec.prototype=kc.prototype;const gm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ym(e){const t=Da(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 Da(e){var t,r;const n=gm.exec(e);return n?{year:qt(n[1]),month:qt(n[2],1)-1,day:qt(n[3],1),hour:qt(n[4]),minute:qt(n[5]),second:qt(n[6]),millisecond:n[7]?qt(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:qt(n[10]),minuteOffset:qt(n[11])}:null}function qt(e,t=0){return Number(e)||t}let xm=/^[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])?)*$/,vm=/^((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,bm=/^(?:[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,wm="^\\d{4}-\\d{2}-\\d{2}",Sm="\\d{2}:\\d{2}:\\d{2}",Cm="(([+-]\\d{2}(:?\\d{2})?)|Z)",Em=new RegExp(`${wm}T${Sm}(\\.\\d+)?${Cm}$`),km=e=>Ot(e)||e===e.trim(),Tm={}.toString();function vn(){return new Tc}class Tc extends gt{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===Tm?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||$t.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=st.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=st.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=st.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||st.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=st.email){return this.matches(xm,{name:"email",message:t,excludeEmptyString:!0})}url(t=st.url){return this.matches(vm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=st.uuid){return this.matches(bm,{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(Em,{name:"datetime",message:r||st.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||st.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Da(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||st.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Da(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=st.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:km})}lowercase(t=st.lowercase){return this.transform(r=>Ot(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toLowerCase()})}uppercase(t=st.uppercase){return this.transform(r=>Ot(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toUpperCase()})}}vn.prototype=Tc.prototype;let jm=e=>e!=+e;function jc(){return new Fc}class Fc extends gt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!jm(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=Xt.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=Xt.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=Xt.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=Xt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Xt.positive){return this.moreThan(0,t)}negative(t=Xt.negative){return this.lessThan(0,t)}integer(t=Xt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Ot(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=>Ot(i)?i:Math[t](i))}}jc.prototype=Fc.prototype;let Ac=new Date(""),Fm=e=>Object.prototype.toString.call(e)==="[object Date]";function ms(){return new Pn}class Pn extends gt{constructor(){super({type:"date",check(t){return Fm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=ym(t),isNaN(t)?Pn.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(gr.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=$a.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=$a.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)}})}}Pn.INVALID_DATE=Ac;ms.prototype=Pn.prototype;ms.INVALID_DATE=Ac;function Am(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let c=Rr.split(s)[0];n.add(c),i.has(`${o}-${c}`)||r.push([o,c])}for(const s of Object.keys(e)){let o=e[s];n.add(s),gr.isRef(o)&&o.isSibling?a(o.path,s):hs(o)&&"deps"in o&&o.deps.forEach(c=>a(c,s))}return im.array(Array.from(n),r).reverse()}function Mo(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 Oc(e){return(t,r)=>Mo(e,t)-Mo(e,r)}const Om=(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 Zn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Zn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Zn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Zn)}):"optional"in e?e.optional():e}const _m=(e,t)=>{const r=[...Rr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Rr.getter(Rr.join(r),!0)(e);return!!(i&&n in i)};let zo=e=>Object.prototype.toString.call(e)==="[object Object]";function Bo(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Rm=Oc([]);function _c(e){return new Rc(e)}class Rc extends gt{constructor(t){super({type:"object",check(r){return zo(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Rm,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,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(f=>!this._nodes.includes(f))),c={},p=Object.assign({},r,{parent:c,__validating:r.__validating||!1}),d=!1;for(const f of o){let u=a[f],x=f in i;if(u){let E,m=i[f];p.path=(r.path?`${r.path}.`:"")+f,u=u.resolve({value:m,context:r.context,parent:c});let S=u instanceof gt?u.spec:void 0,v=S==null?void 0:S.strict;if(S!=null&&S.strip){d=d||f in i;continue}E=!r.__validating||!v?u.cast(i[f],p):i[f],E!==void 0&&(c[f]=E)}else x&&!s&&(c[f]=i[f]);(x!==f in c||c[f]!==i[f])&&(d=!0)}return d?c:i}_validate(t,r={},n,i){let{from:a=[],originalValue:s=t,recursive:o=this.spec.recursive}=r;r.from=[{schema:this,value:s},...a],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(c,p)=>{if(!o||!zo(p)){i(c,p);return}s=s||p;let d=[];for(let f of this._nodes){let u=this.fields[f];!u||gr.isRef(u)||d.push(u.asNestedTest({options:r,key:f,parent:p,parentPath:r.path,originalParent:s}))}this.runTests({tests:d,value:p,originalValue:s,options:r},n,f=>{i(f.sort(this._sortErrors).concat(c),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 s=n[i];n[i]=s===void 0?a:s}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 s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Am(t,r),n._sortErrors=Oc(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 Zn(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=Rr.getter(t,!0);return this.transform(a=>{if(!a)return a;let s=a;return _m(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(Om)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Qn.exact,test(r){if(r==null)return!0;const n=Bo(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=Bo(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(aa.camelCase)}snakeCase(){return this.transformKeys(aa.snakeCase)}constantCase(){return this.transformKeys(t=>aa.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,s]of Object.entries(r.fields)){var i;let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),n.fields[a]=s.describe(o)}return n}}_c.prototype=Rc.prototype;const $c=e=>{const t={};return e.forEach(r=>{var s,o,c;let n;switch(r.type){case"text":case"textarea":case"tel":n=vn(),r.validation?n=yr(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`,p=>p?new RegExp(r.pattern).test(p):!0)));break;case"email":n=vn().email(((s=r.validation)==null?void 0:s.message)||`${r.label} must be a valid email address`),r.validation&&(n=yr(n,r,"string"));break;case"password":n=vn(),r.validation?n=yr(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`,p=>p?new RegExp(r.pattern).test(p):!0)));break;case"number":if(n=jc().transform((p,d)=>d===""||d===null?void 0:p).nullable().typeError(`${r.label} must be a number`),r.validation)n=yr(n,r,"number");else{if(r.min!==void 0){const p=typeof r.min=="object"&&r.min!==null&&"field"in r.min,d=p?hi(r.min.field):r.min,f=p&&r.min.message?r.min.message:`${r.label} must be at least ${p?"the minimum value":r.min}`;n=n.min(d,f)}if(r.max!==void 0){const p=typeof r.max=="object"&&r.max!==null&&"field"in r.max,d=p?hi(r.max.field):r.max,f=p&&r.max.message?r.max.message:`${r.label} must be at most ${p?"the maximum value":r.max}`;n=n.max(d,f)}}break;case"select":n=vn(),r.validation&&(n=yr(n,r,"string"));break;case"checkbox":n=Ec(),r.validation&&(n=yr(n,r,"boolean"));break;case"date":n=ms().typeError(`${r.label} must be a valid date`),r.validation?n=yr(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=Sc()}const i=((o=r.validation)==null?void 0:o.required)!==void 0?r.validation.required:r.required;if(typeof i=="function"?!1:!!i){const p=((c=r.validation)==null?void 0:c.message)||`${r.label} is required`;n=n.required(p)}t[r.name]=n}),_c().shape(t)},yr=(e,t,r,n)=>{const i=t.validation;if(!i)return e;if(r==="string"){if(i.minLength!==void 0){const a=i.message||`${t.label} must be at least ${i.minLength} characters`;e=e.min(i.minLength,a)}if(i.maxLength!==void 0){const a=i.message||`${t.label} must be at most ${i.maxLength} characters`;e=e.max(i.maxLength,a)}}if(r==="number"){if(i.min!==void 0)if(typeof i.min=="object"&&"field"in i.min){const a=hi(i.min.field),s=i.min.message||i.message||`${t.label} must be at least the value of ${i.min.field}`;e=e.min(a,s)}else{const a=i.message||`${t.label} must be at least ${i.min}`;e=e.min(i.min,a)}if(i.max!==void 0)if(typeof i.max=="object"&&"field"in i.max){const a=hi(i.max.field),s=i.max.message||i.message||`${t.label} must be at most the value of ${i.max.field}`;e=e.max(a,s)}else{const a=i.message||`${t.label} must be at most ${i.max}`;e=e.max(i.max,a)}}if(i.pattern){const a=typeof i.pattern=="string"?new RegExp(i.pattern):i.pattern,s=i.message||`${t.label} format is invalid`;e=e.test("pattern",s,o=>o?a.test(o):!0)}return i.custom&&(e=e.test("custom",i.message||`${t.label} is invalid`,function(a){const s=this.parent||{},o=i.custom(a,s);return typeof o=="boolean"?o:!1})),e},Pc=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=$.useMemo(()=>Array.from({length:t},(d,f)=>f+1),[t]),o=$.useMemo(()=>Math.round(e/t*100),[e,t]),c=d=>n[d-1]||`Step ${d}`,p=d=>d===e||a.includes(d)||d===e+1&&a.includes(e);return l.jsxs(g.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[l.jsx(g.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:s.map((d,f)=>{const u=d===e,x=d<e||a.includes(d),E=u||x?"primary.main":"#8F97A4";return l.jsxs(g.Box,{sx:{display:"flex",alignItems:"center"},children:[l.jsxs(g.Box,{onClick:()=>p(d)&&r(d),sx:{display:"flex",alignItems:"center",cursor:p(d)?"pointer":"default"},children:[l.jsx(g.Box,{sx:{width:24,height:24,borderRadius:"50%",border:u||x?"2px solid":"1px solid",borderColor:u||x?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:m=>u||x?Et(m.palette.primary.main,.2):"transparent",mr:.5,color:E,fontWeight:u||x?600:500,fontSize:"12px"},children:d}),i&&l.jsx(g.Typography,{sx:{fontSize:"12px",fontWeight:600,color:E},children:c(d)})]}),f<s.length-1&&l.jsx(g.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:d<e?"primary.main":"#DFE3E8"}})]},d)})}),l.jsx(g.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${o}% complete`})]}),l.jsx(g.LinearProgress,{variant:"determinate",value:o,sx:{height:4,borderRadius:"50px",backgroundColor:d=>d.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Dc=({buttons:e,disabled:t=!1})=>{const r=o=>{o.onClick&&o.onClick()},n=e.filter(o=>o.position==="left"||!o.position),i=e.filter(o=>o.position==="center"),a=e.filter(o=>o.position==="right"),s=(o,c)=>{const p=(o.text||"").toLowerCase(),d=o.type==="submit"||p.includes("submit")||p.includes("save")||p.includes("next"),f=o.position==="left"||p.includes("cancel")||p.includes("back")||p.includes("draft"),u=o.type?o.type:d?"submit":"button",x=f?"outlined":"contained",E=o.disabled||t,m=S=>S&&["primary","secondary","error","info","success","warning"].includes(S)?S:"primary";return l.jsxs(g.Button,{type:u,variant:x,color:m(o.color),size:o.size||"large",disabled:E,onClick:o.onClick?()=>r(o):void 0,sx:o.sx,children:[o.loading&&l.jsx(g.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${c}`)};return l.jsxs(g.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(g.Box,{sx:{display:"flex",gap:2},children:n.map((o,c)=>s(o,c))}),l.jsx(g.Box,{sx:{display:"flex",gap:2},children:i.map((o,c)=>s(o,c))}),l.jsx(g.Box,{sx:{display:"flex",gap:2},children:a.map((o,c)=>s(o,c))})]})},$m=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:c="right",layout:p="horizontal",spacing:d=2,sx:f}=e,u=v=>{let j="button",D="contained";return v.type?j=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?j="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(j="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&(D="outlined"),{buttonType:j,buttonVariant:D}},x=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",E=v=>{const{buttonType:j}=u(v);v.onClick?v.onClick():j==="submit"&&t?t(s):a&&r&&(v.text.toLowerCase().includes("next")?r(n+1,i):(v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("previous"))&&r(n-1,i))},m=(v,j)=>{const{buttonType:D,buttonVariant:F}=u(v),C=x(v.color);return l.jsx(g.Button,{type:D,variant:F,color:C,size:v.size||"medium",disabled:v.disabled,onClick:()=>E(v),sx:v.sx,children:v.text},j)},S=()=>{const v={display:"flex",gap:d,...f};switch(c){case"left":return{...v,justifyContent:"flex-start"};case"center":return{...v,justifyContent:"center"};case"right":return{...v,justifyContent:"flex-end"};case"space-between":return{...v,justifyContent:"space-between"};default:return{...v,justifyContent:"flex-end"}}};return p==="vertical"?l.jsx(g.Box,{sx:S(),children:o.map((v,j)=>l.jsx(g.Box,{sx:{width:"100%"},children:m(v,j)},j))}):l.jsx(g.Box,{sx:S(),children:l.jsx(g.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,j)=>m(v,j))})})},Ic=(e,t)=>{const r=e==null?void 0:e.showWhen;if(r){if(typeof r=="function")try{return!!r(t||{})}catch{return!0}if(r&&typeof r=="object"){const n=r.field,i=r.equals,a=r.in,s=n?(t||{})[n]:void 0;if(n&&typeof i<"u")return s===i;if(n&&Array.isArray(a))return a.includes(s)}}return!0},Xn=(e,t)=>{const r=[];for(const n of e)if(Ic(n,t)&&(r.push(n),n.type==="tabs"&&n.items)){const i=n.items||[],a=(t||{})[n.name],s=(()=>{if(typeof a=="string"||typeof a=="number"){const c=i.findIndex((p,d)=>typeof p.value=="string"||typeof p.value=="number"?p.value===a:d===a);return c>=0?c:0}return Number(a)||0})(),o=i[s]||{};Array.isArray(o.fields)&&r.push(...Xn(o.fields,t))}return r},Pm=new zu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Dm=e=>l.jsx(qu,{client:Pm,children:l.jsx(Im,{...e})}),Im=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:c=!0,buttons:p,buttonGroup:d,stickyButtons:f,stickyButtonsSx:u,fixedButtons:x,fixedButtonsSx:E,formCardWrap:m,formCardSx:S,formCardProps:v,baseUrl:j,apiHeaders:D,stepNavigationProps:F})=>{var w,T;const C=[...new Set(r.map(y=>y.step).filter(y=>y!=null&&y>0))].sort((y,M)=>(y||0)-(M||0)),_=C.length>1,I=C.length||1,[R,Y]=$.useState(1),h=_?r.filter(y=>y.step===R):r,B=$.useCallback(y=>{const M=[];for(const b of y)if(M.push(b),b.type==="tabs"&&b.items)for(const A of b.items||[])Array.isArray(A.fields)&&M.push(...B(A.fields));return M},[]),{control:q,handleSubmit:Z,formState:{errors:L},watch:H,setValue:G,resetField:ne,trigger:ue}=yu({resolver:$.useCallback((y,M,b)=>{const V=Xn(_?h:r,y),z=$c(V);return bu(z)(y,M,b)},[_,h,r]),mode:"onChange",defaultValues:o}),P=H(),U=$.useRef({});$.useEffect(()=>{const y=[];for(const M of r){const b=M.depends_on;b&&typeof M.name=="string"&&y.push({dependentField:M.name,dependencyName:b})}if(y.length!==0)for(const{dependentField:M,dependencyName:b}of y){const A=U.current[b],V=P==null?void 0:P[b];if(A!==V)try{ne(M)}catch{}U.current[b]=V}},[r,P,ne]);const X=$.useRef(i);$.useEffect(()=>{X.current=i},[i]);const pe=$.useMemo(()=>{try{return JSON.stringify(P)}catch{return String(Date.now())}},[P]),he=$.useRef(null);$.useEffect(()=>{X.current&&he.current!==pe&&(he.current=pe,X.current(P))},[pe]);const de=async()=>{if(!_)return!0;const y=r.filter(b=>b.step===R);for(const b of y)if(typeof b.required=="function"?!!b.required(P):!!b.required){const V=P[b.name];let z=!0;if(b.type==="checkbox"?z=V===!0:Array.isArray(V)?z=V.length>0:z=V!=null&&V!=="",!z)return!1}return await ue()?!0:Object.keys(L).filter(A=>y.some(V=>V.name===A)).map(A=>{const V=L[A];return typeof(V==null?void 0:V.message)=="string"?V.message:`${A} is invalid`}).length===0},re=$.useMemo(()=>{if(!_)return!0;const y=r.filter(b=>b.step===R);for(const b of y)if(typeof b.required=="function"?!!b.required(P):!!b.required){const V=P[b.name];let z=!0;if(b.type==="checkbox"?z=V===!0:Array.isArray(V)?z=V.length>0:z=V!=null&&V!=="",!z)return!1}return Object.keys(L).filter(b=>y.some(A=>A.name===b)).length===0},[_,R,r,P,L]),W=$.useCallback((y,M)=>Ic(y,M),[]),Q=$.useCallback(y=>{const M=[];for(const b of y)if(M.push(b),b.type==="tabs"&&b.items)for(const A of b.items||[])Array.isArray(A.fields)&&M.push(...Q(A.fields));return M},[]),se=$.useCallback((y,M)=>Xn(y,M),[]),le=$.useMemo(()=>{if(_)return re;const y=Xn(r,P);for(const A of y){if(!W(A,P))continue;if(typeof A.required=="function"?!!A.required(P):!!A.required){const z=P[A.name];let K=!0;if(A.type==="checkbox"?K=z===!0:K=z!=null&&z!==""&&!(Array.isArray(z)&&z.length===0),!K)return!1}}const M=new Set(y.map(A=>A.name));return Object.keys(L).filter(A=>M.has(A)).length===0},[_,re,r,P,L,se,W]),ce=async y=>{y<1||y>I||y>R&&_&&!await de()||Y(y)},be=async y=>{if(_&&R<I){console.warn("Form submission attempted on non-final step");return}const b=(A=>{const V={...A||{}},z=Q(r);for(const K of z){if(!K||!K.name)continue;const fe=V[K.name];if(K.type==="dragdroplist"&&Array.isArray(fe)){const ye=K,ge=ye.serialize;if(!ge)continue;const Ne=fe,Oe=typeof ye.getId=="function"?ye.getId:typeof ye.getId=="string"?ie=>ie==null?void 0:ie[ye.getId]:ie=>(ie==null?void 0:ie.id)??(ie==null?void 0:ie._id)??(ie==null?void 0:ie.key)??String(ie),at=typeof ye.getText=="function"?ye.getText:typeof ye.getText=="string"?ie=>(ie==null?void 0:ie[ye.getText])??String(ie):ie=>(ie==null?void 0:ie.text)??(ie==null?void 0:ie.label)??(ie==null?void 0:ie.name)??(ie==null?void 0:ie.title)??String(ie),dt=(()=>{if(typeof ye.chipText=="function")return ye.chipText;if(typeof ye.chipText=="string")return(ie,Ge)=>ie==null?void 0:ie[ye.chipText]})();let Me=fe;typeof ge=="function"?Me=Ne.map((ie,Ge)=>ge(ie,Ge)):ge==="ids"?Me=Ne.map(ie=>Oe(ie)):ge==="text"?Me=Ne.map(ie=>at(ie)):ge==="chips"?Me=Ne.map((ie,Ge)=>(typeof dt=="function"?dt(ie,Ge):void 0)??""):ge&&typeof ge=="object"&&"field"in ge&&(Me=Ne.map(ie=>ie==null?void 0:ie[ge.field])),V[K.name]=Me}}return V})(y);s&&s(b),n(b)},J=async y=>{y&&(y.preventDefault(),y.stopPropagation()),_&&R<I&&await de()&&ce(R+1)},Ie=y=>{y&&(y.preventDefault(),y.stopPropagation()),_&&R>1&&ce(R-1)},Ke=y=>y.col?y.col:(y.xs||y.sm||y.md||y.lg||y.xl)&&(y.xs||y.sm||y.md||y.lg||y.xl)||12,Xe=t?g.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:((w=t.typography)==null?void 0:w.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((T=t.typography)==null?void 0:T.fontSize)=="number"?t.typography.fontSize:14}}):void 0,Tt=()=>{const y=x?{position:"fixed",left:0,right:0,bottom:0,background:"#FFFFFF",pt:2,px:2,pb:2,zIndex:1300,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.08)",...E}:f?{position:"sticky",bottom:0,background:"#FFFFFF",pt:2,pb:2,zIndex:1200,borderTop:"1px solid rgba(0,0,0,0.08)",boxShadow:"0 -2px 8px rgba(0,0,0,0.04)",...u}:void 0;if(d&&d.buttons&&d.buttons.length>0){const M={...d,buttons:d.buttons.map(b=>{const A=(b.text||"").toLowerCase(),V=b.type==="submit"||A.includes("submit")||A.includes("save")||A.includes("finish")||A.includes("complete"),z=A.includes("next");let K=!1;return _?(V||z)&&(K=!re):V&&(K=!le),{...b,disabled:b.disabled||K}})};return l.jsx(g.Box,{sx:{mt:3,...y||{}},children:l.jsx($m,{config:M,onSubmit:be,onStepChange:ce,currentStep:R,totalSteps:I,isMultiStep:_,formData:P})})}if(p&&p.length>0){const M=p.map(b=>{const A=(b.text||"").toLowerCase(),V=b.type==="submit"||A.includes("submit")||A.includes("save")||A.includes("finish")||A.includes("complete"),z=A.includes("next");let K=!1;return _?(V||z)&&(K=!re):V&&(K=!le),{...b,disabled:b.disabled||K}});return l.jsx(g.Box,{sx:y,children:l.jsx(Dc,{buttons:M})})}return c?l.jsx(g.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end",...y||{}},children:l.jsxs(g.Box,{sx:{display:"flex",gap:2},children:[_&&R>1&&l.jsx(g.Button,{type:"button",variant:"outlined",onClick:Ie,children:"Previous"}),_?R<I?l.jsx(g.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!re,onClick:J,children:"Next"}):l.jsx(g.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!re,children:a}):l.jsx(g.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!le,children:a})]})}):null},Ye=$.useMemo(()=>{const y=[];let M=[];for(const b of h)b.type==="section"&&M.length>0?(y.push(M),M=[b]):M.push(b);return M.length>0&&y.push(M),y},[h]),We=l.jsxs(g.Box,{component:"form",onSubmit:y=>{if(_&&R<I){y.preventDefault(),y.stopPropagation(),re&&J();return}Z(be)(y)},id:e,onKeyDown:y=>{y.key==="Enter"&&_&&R<I&&(y.preventDefault(),re&&J())},sx:{pb:x?10:void 0},children:[_&&l.jsx(Pc,{currentStep:R,totalSteps:I,onStepChange:ce,stepTitles:F==null?void 0:F.stepTitles,showStepTitles:(F==null?void 0:F.showStepTitles)!==!1}),Ye.map((y,M)=>{const b=y.find(fe=>fe.type==="section");if(b&&!W(b,P))return null;const A=(b==null?void 0:b.cardWrap)!==!1,V={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},z={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},K=l.jsx(l.Fragment,{children:y.map(fe=>{if(!W(fe,P))return null;const ye=Ke(fe);return l.jsx(g.Box,{sx:{gridColumn:`span ${ye}`},children:l.jsx(fs,{field:fe,control:q,errors:L,baseUrl:j,apiHeaders:D,formData:P,setValue:G})},fe.name)})});return A?l.jsx(g.Card,{sx:{...V,...(b==null?void 0:b.cardSx)||{}},...(b==null?void 0:b.cardProps)||{},children:K},`group-${M}`):l.jsx(g.Box,{sx:z,children:K},`group-${M}`)}),Tt()]}),Ue=m?l.jsx(g.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...S},...v,children:We}):We;return Xe?l.jsx(g.ThemeProvider,{theme:Xe,children:Ue}):Ue},Mm=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>l.jsx(g.Box,{sx:{textAlign:"center"},children:l.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:s?"pointer":"default",...i},className:a,onClick:s,onError:o=>{o.currentTarget.src="/placeholder-image.png"}})});function Mr(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(d){try{p(n.next(d))}catch(f){s(f)}}function c(d){try{p(n.throw(d))}catch(f){s(f)}}function p(d){d.done?a(d.value):i(d.value).then(o,c)}p((n=n.apply(e,t||[])).next())})}const zm=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 cn(e,t,r){const n=Bm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&Vo(n,"path",a),Vo(n,"relativePath",a),n}function Bm(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=zm.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function Vo(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Vm=[".DS_Store","Thumbs.db"];function Nm(e){return Mr(this,void 0,void 0,function*(){return gi(e)&&Lm(e.dataTransfer)?Hm(e.dataTransfer,e.type):qm(e)?Wm(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Um(e):[]})}function Lm(e){return gi(e)}function qm(e){return gi(e)&&gi(e.target)}function gi(e){return typeof e=="object"&&e!==null}function Wm(e){return Ia(e.target.files).map(t=>cn(t))}function Um(e){return Mr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>cn(r))})}function Hm(e,t){return Mr(this,void 0,void 0,function*(){if(e.items){const r=Ia(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(Km));return No(Mc(n))}return No(Ia(e.files).map(r=>cn(r)))})}function No(e){return e.filter(t=>Vm.indexOf(t.name)===-1)}function Ia(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 Km(e){if(typeof e.webkitGetAsEntry!="function")return Lo(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?zc(t):Lo(e,t)}function Mc(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Mc(r):[r]],[])}function Lo(e,t){return Mr(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 s=yield a.getFile();return s.handle=a,cn(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return cn(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Ym(e){return Mr(this,void 0,void 0,function*(){return e.isDirectory?zc(e):Gm(e)})}function zc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(s=>Mr(this,void 0,void 0,function*(){if(s.length){const o=Promise.all(s.map(Ym));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function Gm(e){return Mr(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=cn(n,e.fullPath);t(i)},n=>{r(n)})})})}var Wn={},qo;function Qm(){return qo||(qo=1,Wn.__esModule=!0,Wn.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(s){var o=s.trim().toLowerCase();return o.charAt(0)==="."?n.toLowerCase().endsWith(o):o.endsWith("/*")?a===o.replace(/\/.*$/,""):i===o})}return!0}),Wn}var Zm=Qm();const sa=Ya(Zm);function Wo(e){return eg(e)||Jm(e)||Vc(e)||Xm()}function Xm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "finform-react-builder",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.4",
|
|
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",
|