import{ao as x,e2 as F,c8 as O,aJ as j,co as u,e3 as I}from"./app-k0jcl5PQ.js";function v(t){if(!t)return{};const e=u.deepClone(t);function n(a){Object.keys(e).forEach(i=>{e.hasOwnProperty(i)&&(u.isObject(a[i])?n(a[i]):e[i]===null&&delete e[i])})}return n(e),e}C.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0};function C(t){const{castInitialValues:e,castValuesOnSubmit:n,initialValues:a,onSubmit:i,...o}=t,s=e&&t.validationSchema?t.validationSchema.cast(v(a)):a,c=(l,{setSubmitting:f,resetForm:d,setFieldError:b})=>{const h=n&&t.validationSchema?t.validationSchema.cast(l):l;i(h,(r={})=>{if(r.reset&&d(),r.errors)for(const[S,V]of Object.entries(r.errors))b(S,V);f(!1)})},m={allowInitialSubmit:t.allowInitialSubmit};return x.jsx(F,{enableReinitialize:!0,...o,initialValues:s,onSubmit:c,initialStatus:m,children:O.isFunction(t.children)?l=>t.children(l):j.Children.count(t.children)?t.children:null})}function E(){return I()}export{C as F,E as u};
//# sourceMappingURL=C3DvQ1wU.chunk.js.map
