@goodhood-web/nebenan-core 3.0.0-development.71 → 3.0.0-development.72
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/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -69,4 +69,4 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
69
69
|
* LICENSE file in the root directory of this source tree.
|
|
70
70
|
*/var xf;function gT(){return xf||(xf=1,process.env.NODE_ENV!=="production"&&function(){var n=typeof Symbol=="function"&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,h=n?Symbol.for("react.provider"):60109,_=n?Symbol.for("react.context"):60110,T=n?Symbol.for("react.async_mode"):60111,y=n?Symbol.for("react.concurrent_mode"):60111,R=n?Symbol.for("react.forward_ref"):60112,V=n?Symbol.for("react.suspense"):60113,U=n?Symbol.for("react.suspense_list"):60120,se=n?Symbol.for("react.memo"):60115,Ee=n?Symbol.for("react.lazy"):60116,Be=n?Symbol.for("react.block"):60121,me=n?Symbol.for("react.fundamental"):60117,oe=n?Symbol.for("react.responder"):60118,Te=n?Symbol.for("react.scope"):60119;function j(G){return typeof G=="string"||typeof G=="function"||G===s||G===y||G===c||G===u||G===V||G===U||typeof G=="object"&&G!==null&&(G.$$typeof===Ee||G.$$typeof===se||G.$$typeof===h||G.$$typeof===_||G.$$typeof===R||G.$$typeof===me||G.$$typeof===oe||G.$$typeof===Te||G.$$typeof===Be)}function D(G){if(typeof G=="object"&&G!==null){var tn=G.$$typeof;switch(tn){case r:var Qe=G.type;switch(Qe){case T:case y:case s:case c:case u:case V:return Qe;default:var vt=Qe&&Qe.$$typeof;switch(vt){case _:case R:case Ee:case se:case h:return vt;default:return tn}}case i:return tn}}}var A=T,X=y,L=_,ae=h,at=r,It=R,hn=s,pn=Ee,Me=se,Xe=i,pt=c,_n=u,Pt=V,B=!1;function Ae(G){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),qe(G)||D(G)===T}function qe(G){return D(G)===y}function je(G){return D(G)===_}function _t(G){return D(G)===h}function Jt(G){return typeof G=="object"&&G!==null&&G.$$typeof===r}function Xt(G){return D(G)===R}function st(G){return D(G)===s}function $t(G){return D(G)===Ee}function Qt(G){return D(G)===se}function gt(G){return D(G)===i}function wt(G){return D(G)===c}function en(G){return D(G)===u}function Ut(G){return D(G)===V}$e.AsyncMode=A,$e.ConcurrentMode=X,$e.ContextConsumer=L,$e.ContextProvider=ae,$e.Element=at,$e.ForwardRef=It,$e.Fragment=hn,$e.Lazy=pn,$e.Memo=Me,$e.Portal=Xe,$e.Profiler=pt,$e.StrictMode=_n,$e.Suspense=Pt,$e.isAsyncMode=Ae,$e.isConcurrentMode=qe,$e.isContextConsumer=je,$e.isContextProvider=_t,$e.isElement=Jt,$e.isForwardRef=Xt,$e.isFragment=st,$e.isLazy=$t,$e.isMemo=Qt,$e.isPortal=gt,$e.isProfiler=wt,$e.isStrictMode=en,$e.isSuspense=Ut,$e.isValidElementType=j,$e.typeOf=D}()),$e}process.env.NODE_ENV==="production"?eu.exports=_T():eu.exports=gT();var vT=eu.exports,id=vT,mT={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},yT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ad={};ad[id.ForwardRef]=mT;ad[id.Memo]=yT;function it(){return it=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},it.apply(this,arguments)}function sd(n,r){if(n==null)return{};var i={},s=Object.keys(n),u,c;for(c=0;c<s.length;c++)u=s[c],!(r.indexOf(u)>=0)&&(i[u]=n[u]);return i}var _s=N.createContext(void 0);_s.displayName="FormikContext";_s.Provider;_s.Consumer;function xT(){var n=N.useContext(_s);return n||(process.env.NODE_ENV!=="production"?ti(!1,"Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component."):ti()),n}var un=function(r){return typeof r=="function"},gs=function(r){return r!==null&&typeof r=="object"},bT=function(r){return String(Math.floor(Number(r)))===r},Bo=function(r){return Object.prototype.toString.call(r)==="[object String]"},Uo=function(r){return gs(r)&&un(r.then)};function TT(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Dt(n,r,i,s){s===void 0&&(s=0);for(var u=rd(r);n&&s<u.length;)n=n[u[s++]];return s!==u.length&&!n||n===void 0?i:n}function Cr(n,r,i){for(var s=gf(n),u=s,c=0,h=rd(r);c<h.length-1;c++){var _=h[c],T=Dt(n,h.slice(0,c+1));if(T&&(gs(T)||Array.isArray(T)))u=u[_]=gf(T);else{var y=h[c+1];u=u[_]=bT(y)&&Number(y)>=0?[]:{}}}return(c===0?n:u)[h[c]]===i?n:(i===void 0?delete u[h[c]]:u[h[c]]=i,c===0&&i===void 0&&delete s[h[c]],s)}function od(n,r,i,s){i===void 0&&(i=new WeakMap),s===void 0&&(s={});for(var u=0,c=Object.keys(n);u<c.length;u++){var h=c[u],_=n[h];gs(_)?i.get(_)||(i.set(_,!0),s[h]=Array.isArray(_)?[]:{},od(_,r,i,s[h])):s[h]=r}return s}function wT(n,r){switch(r.type){case"SET_VALUES":return it({},n,{values:r.payload});case"SET_TOUCHED":return it({},n,{touched:r.payload});case"SET_ERRORS":return Er(n.errors,r.payload)?n:it({},n,{errors:r.payload});case"SET_STATUS":return it({},n,{status:r.payload});case"SET_ISSUBMITTING":return it({},n,{isSubmitting:r.payload});case"SET_ISVALIDATING":return it({},n,{isValidating:r.payload});case"SET_FIELD_VALUE":return it({},n,{values:Cr(n.values,r.payload.field,r.payload.value)});case"SET_FIELD_TOUCHED":return it({},n,{touched:Cr(n.touched,r.payload.field,r.payload.value)});case"SET_FIELD_ERROR":return it({},n,{errors:Cr(n.errors,r.payload.field,r.payload.value)});case"RESET_FORM":return it({},n,r.payload);case"SET_FORMIK_STATE":return r.payload(n);case"SUBMIT_ATTEMPT":return it({},n,{touched:od(n.values,!0),isSubmitting:!0,submitCount:n.submitCount+1});case"SUBMIT_FAILURE":return it({},n,{isSubmitting:!1});case"SUBMIT_SUCCESS":return it({},n,{isSubmitting:!1});default:return n}}var Sr={},Ja={};function ST(n){var r=n.validateOnChange,i=r===void 0?!0:r,s=n.validateOnBlur,u=s===void 0?!0:s,c=n.validateOnMount,h=c===void 0?!1:c,_=n.isInitialValid,T=n.enableReinitialize,y=T===void 0?!1:T,R=n.onSubmit,V=sd(n,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),U=it({validateOnChange:i,validateOnBlur:u,validateOnMount:h,onSubmit:R},V),se=N.useRef(U.initialValues),Ee=N.useRef(U.initialErrors||Sr),Be=N.useRef(U.initialTouched||Ja),me=N.useRef(U.initialStatus),oe=N.useRef(!1),Te=N.useRef({});process.env.NODE_ENV!=="production"&&N.useEffect(function(){typeof _>"u"||(process.env.NODE_ENV!=="production"?ti(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):ti())},[]),N.useEffect(function(){return oe.current=!0,function(){oe.current=!1}},[]);var j=N.useState(0),D=j[1],A=N.useRef({values:Ka(U.initialValues),errors:Ka(U.initialErrors)||Sr,touched:Ka(U.initialTouched)||Ja,status:Ka(U.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),X=A.current,L=N.useCallback(function(w){var F=A.current;A.current=wT(F,w),F!==A.current&&D(function(Y){return Y+1})},[]),ae=N.useCallback(function(w,F){return new Promise(function(Y,q){var ce=U.validate(w,F);ce==null?Y(Sr):Uo(ce)?ce.then(function(he){Y(he||Sr)},function(he){process.env.NODE_ENV!=="production"&&console.warn("Warning: An unhandled error was caught during validation in <Formik validate />",he),q(he)}):Y(ce)})},[U.validate]),at=N.useCallback(function(w,F){var Y=U.validationSchema,q=un(Y)?Y(F):Y,ce=F&&q.validateAt?q.validateAt(F,w):CT(w,q);return new Promise(function(he,Le){ce.then(function(){he(Sr)},function(ot){ot.name==="ValidationError"?he(ET(ot)):(process.env.NODE_ENV!=="production"&&console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />",ot),Le(ot))})})},[U.validationSchema]),It=N.useCallback(function(w,F){return new Promise(function(Y){return Y(Te.current[w].validate(F))})},[]),hn=N.useCallback(function(w){var F=Object.keys(Te.current).filter(function(q){return un(Te.current[q].validate)}),Y=F.length>0?F.map(function(q){return It(q,Dt(w,q))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Y).then(function(q){return q.reduce(function(ce,he,Le){return he==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||he&&(ce=Cr(ce,F[Le],he)),ce},{})})},[It]),pn=N.useCallback(function(w){return Promise.all([hn(w),U.validationSchema?at(w):{},U.validate?ae(w):{}]).then(function(F){var Y=F[0],q=F[1],ce=F[2],he=Yo.all([Y,q,ce],{arrayMerge:AT});return he})},[U.validate,U.validationSchema,hn,ae,at]),Me=Kt(function(w){return w===void 0&&(w=X.values),L({type:"SET_ISVALIDATING",payload:!0}),pn(w).then(function(F){return oe.current&&(L({type:"SET_ISVALIDATING",payload:!1}),L({type:"SET_ERRORS",payload:F})),F})});N.useEffect(function(){h&&oe.current===!0&&Er(se.current,U.initialValues)&&Me(se.current)},[h,Me]);var Xe=N.useCallback(function(w){var F=w&&w.values?w.values:se.current,Y=w&&w.errors?w.errors:Ee.current?Ee.current:U.initialErrors||{},q=w&&w.touched?w.touched:Be.current?Be.current:U.initialTouched||{},ce=w&&w.status?w.status:me.current?me.current:U.initialStatus;se.current=F,Ee.current=Y,Be.current=q,me.current=ce;var he=function(){L({type:"RESET_FORM",payload:{isSubmitting:!!w&&!!w.isSubmitting,errors:Y,touched:q,status:ce,values:F,isValidating:!!w&&!!w.isValidating,submitCount:w&&w.submitCount&&typeof w.submitCount=="number"?w.submitCount:0}})};if(U.onReset){var Le=U.onReset(X.values,tn);Uo(Le)?Le.then(he):he()}else he()},[U.initialErrors,U.initialStatus,U.initialTouched,U.onReset]);N.useEffect(function(){oe.current===!0&&!Er(se.current,U.initialValues)&&y&&(se.current=U.initialValues,Xe(),h&&Me(se.current))},[y,U.initialValues,Xe,h,Me]),N.useEffect(function(){y&&oe.current===!0&&!Er(Ee.current,U.initialErrors)&&(Ee.current=U.initialErrors||Sr,L({type:"SET_ERRORS",payload:U.initialErrors||Sr}))},[y,U.initialErrors]),N.useEffect(function(){y&&oe.current===!0&&!Er(Be.current,U.initialTouched)&&(Be.current=U.initialTouched||Ja,L({type:"SET_TOUCHED",payload:U.initialTouched||Ja}))},[y,U.initialTouched]),N.useEffect(function(){y&&oe.current===!0&&!Er(me.current,U.initialStatus)&&(me.current=U.initialStatus,L({type:"SET_STATUS",payload:U.initialStatus}))},[y,U.initialStatus,U.initialTouched]);var pt=Kt(function(w){if(Te.current[w]&&un(Te.current[w].validate)){var F=Dt(X.values,w),Y=Te.current[w].validate(F);return Uo(Y)?(L({type:"SET_ISVALIDATING",payload:!0}),Y.then(function(q){return q}).then(function(q){L({type:"SET_FIELD_ERROR",payload:{field:w,value:q}}),L({type:"SET_ISVALIDATING",payload:!1})})):(L({type:"SET_FIELD_ERROR",payload:{field:w,value:Y}}),Promise.resolve(Y))}else if(U.validationSchema)return L({type:"SET_ISVALIDATING",payload:!0}),at(X.values,w).then(function(q){return q}).then(function(q){L({type:"SET_FIELD_ERROR",payload:{field:w,value:Dt(q,w)}}),L({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),_n=N.useCallback(function(w,F){var Y=F.validate;Te.current[w]={validate:Y}},[]),Pt=N.useCallback(function(w){delete Te.current[w]},[]),B=Kt(function(w,F){L({type:"SET_TOUCHED",payload:w});var Y=F===void 0?u:F;return Y?Me(X.values):Promise.resolve()}),Ae=N.useCallback(function(w){L({type:"SET_ERRORS",payload:w})},[]),qe=Kt(function(w,F){var Y=un(w)?w(X.values):w;L({type:"SET_VALUES",payload:Y});var q=F===void 0?i:F;return q?Me(Y):Promise.resolve()}),je=N.useCallback(function(w,F){L({type:"SET_FIELD_ERROR",payload:{field:w,value:F}})},[]),_t=Kt(function(w,F,Y){L({type:"SET_FIELD_VALUE",payload:{field:w,value:F}});var q=Y===void 0?i:Y;return q?Me(Cr(X.values,w,F)):Promise.resolve()}),Jt=N.useCallback(function(w,F){var Y=F,q=w,ce;if(!Bo(w)){w.persist&&w.persist();var he=w.target?w.target:w.currentTarget,Le=he.type,ot=he.name,vn=he.id,Rn=he.value,dr=he.checked,hr=he.outerHTML,zn=he.options,pr=he.multiple;Y=F||ot||vn,!Y&&process.env.NODE_ENV!=="production"&&bf({htmlContent:hr,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),q=/number|range/.test(Le)?(ce=parseFloat(Rn),isNaN(ce)?"":ce):/checkbox/.test(Le)?RT(Dt(X.values,Y),dr,Rn):zn&&pr?OT(zn):Rn}Y&&_t(Y,q)},[_t,X.values]),Xt=Kt(function(w){if(Bo(w))return function(F){return Jt(F,w)};Jt(w)}),st=Kt(function(w,F,Y){F===void 0&&(F=!0),L({type:"SET_FIELD_TOUCHED",payload:{field:w,value:F}});var q=Y===void 0?u:Y;return q?Me(X.values):Promise.resolve()}),$t=N.useCallback(function(w,F){w.persist&&w.persist();var Y=w.target,q=Y.name,ce=Y.id,he=Y.outerHTML,Le=F||q||ce;!Le&&process.env.NODE_ENV!=="production"&&bf({htmlContent:he,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),st(Le,!0)},[st]),Qt=Kt(function(w){if(Bo(w))return function(F){return $t(F,w)};$t(w)}),gt=N.useCallback(function(w){un(w)?L({type:"SET_FORMIK_STATE",payload:w}):L({type:"SET_FORMIK_STATE",payload:function(){return w}})},[]),wt=N.useCallback(function(w){L({type:"SET_STATUS",payload:w})},[]),en=N.useCallback(function(w){L({type:"SET_ISSUBMITTING",payload:w})},[]),Ut=Kt(function(){return L({type:"SUBMIT_ATTEMPT"}),Me().then(function(w){var F=w instanceof Error,Y=!F&&Object.keys(w).length===0;if(Y){var q;try{if(q=Qe(),q===void 0)return}catch(ce){throw ce}return Promise.resolve(q).then(function(ce){return oe.current&&L({type:"SUBMIT_SUCCESS"}),ce}).catch(function(ce){if(oe.current)throw L({type:"SUBMIT_FAILURE"}),ce})}else if(oe.current&&(L({type:"SUBMIT_FAILURE"}),F))throw w})}),G=Kt(function(w){if(w&&w.preventDefault&&un(w.preventDefault)&&w.preventDefault(),w&&w.stopPropagation&&un(w.stopPropagation)&&w.stopPropagation(),process.env.NODE_ENV!=="production"&&typeof document<"u"){var F=TT();F!==null&&F instanceof HTMLButtonElement&&(F.attributes&&F.attributes.getNamedItem("type")||(process.env.NODE_ENV!=="production"?ti(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):ti()))}Ut().catch(function(Y){console.warn("Warning: An unhandled error was caught from submitForm()",Y)})}),tn={resetForm:Xe,validateForm:Me,validateField:pt,setErrors:Ae,setFieldError:je,setFieldTouched:st,setFieldValue:_t,setStatus:wt,setSubmitting:en,setTouched:B,setValues:qe,setFormikState:gt,submitForm:Ut},Qe=Kt(function(){return R(X.values,tn)}),vt=Kt(function(w){w&&w.preventDefault&&un(w.preventDefault)&&w.preventDefault(),w&&w.stopPropagation&&un(w.stopPropagation)&&w.stopPropagation(),Xe()}),An=N.useCallback(function(w){return{value:Dt(X.values,w),error:Dt(X.errors,w),touched:!!Dt(X.touched,w),initialValue:Dt(se.current,w),initialTouched:!!Dt(Be.current,w),initialError:Dt(Ee.current,w)}},[X.errors,X.touched,X.values]),St=N.useCallback(function(w){return{setValue:function(Y,q){return _t(w,Y,q)},setTouched:function(Y,q){return st(w,Y,q)},setError:function(Y){return je(w,Y)}}},[_t,st,je]),fr=N.useCallback(function(w){var F=gs(w),Y=F?w.name:w,q=Dt(X.values,Y),ce={name:Y,value:q,onChange:Xt,onBlur:Qt};if(F){var he=w.type,Le=w.value,ot=w.as,vn=w.multiple;he==="checkbox"?Le===void 0?ce.checked=!!q:(ce.checked=!!(Array.isArray(q)&&~q.indexOf(Le)),ce.value=Le):he==="radio"?(ce.checked=q===Le,ce.value=Le):ot==="select"&&vn&&(ce.value=ce.value||[],ce.multiple=!0)}return ce},[Qt,Xt,X.values]),gn=N.useMemo(function(){return!Er(se.current,X.values)},[se.current,X.values]),On=N.useMemo(function(){return typeof _<"u"?gn?X.errors&&Object.keys(X.errors).length===0:_!==!1&&un(_)?_(U):_:X.errors&&Object.keys(X.errors).length===0},[_,gn,X.errors,U]),mt=it({},X,{initialValues:se.current,initialErrors:Ee.current,initialTouched:Be.current,initialStatus:me.current,handleBlur:Qt,handleChange:Xt,handleReset:vt,handleSubmit:G,resetForm:Xe,setErrors:Ae,setFormikState:gt,setFieldTouched:st,setFieldValue:_t,setFieldError:je,setStatus:wt,setSubmitting:en,setTouched:B,setValues:qe,submitForm:Ut,validateForm:Me,validateField:pt,isValid:On,dirty:gn,unregisterField:Pt,registerField:_n,getFieldProps:fr,getFieldMeta:An,getFieldHelpers:St,validateOnBlur:u,validateOnChange:i,validateOnMount:h});return mt}function bf(n){var r=n.htmlContent,i=n.documentationAnchorLink,s=n.handlerName;console.warn("Warning: Formik called `"+s+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+r+`
|
|
71
71
|
Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#`+i+`
|
|
72
|
-
`)}function ET(n){var r={};if(n.inner){if(n.inner.length===0)return Cr(r,n.path,n.message);for(var u=n.inner,i=Array.isArray(u),s=0,u=i?u:u[Symbol.iterator]();;){var c;if(i){if(s>=u.length)break;c=u[s++]}else{if(s=u.next(),s.done)break;c=s.value}var h=c;Dt(r,h.path)||(r=Cr(r,h.path,h.message))}}return r}function CT(n,r,i,s){i===void 0&&(i=!1);var u=tu(n);return r[i?"validateSync":"validate"](u,{abortEarly:!1,context:u})}function tu(n){var r=Array.isArray(n)?[]:{};for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var s=String(i);Array.isArray(n[s])===!0?r[s]=n[s].map(function(u){return Array.isArray(u)===!0||zl(u)?tu(u):u!==""?u:void 0}):zl(n[s])?r[s]=tu(n[s]):r[s]=n[s]!==""?n[s]:void 0}return r}function AT(n,r,i){var s=n.slice();return r.forEach(function(c,h){if(typeof s[h]>"u"){var _=i.clone!==!1,T=_&&i.isMergeableObject(c);s[h]=T?Yo(Array.isArray(c)?[]:{},c,i):c}else i.isMergeableObject(c)?s[h]=Yo(n[h],c,i):n.indexOf(c)===-1&&s.push(c)}),s}function OT(n){return Array.from(n).filter(function(r){return r.selected}).map(function(r){return r.value})}function RT(n,r,i){if(typeof n=="boolean")return!!r;var s=[],u=!1,c=-1;if(Array.isArray(n))s=n,c=n.indexOf(i),u=c>=0;else if(!i||i=="true"||i=="false")return!!r;return r&&i&&!u?s.concat(i):u?s.slice(0,c).concat(s.slice(c+1)):s}var IT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?N.useLayoutEffect:N.useEffect;function Kt(n){var r=N.useRef(n);return IT(function(){r.current=n}),N.useCallback(function(){for(var i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return r.current.apply(void 0,s)},[])}var PT=N.forwardRef(function(n,r){var i=n.action,s=sd(n,["action"]),u=i??"#",c=xT(),h=c.handleReset,_=c.handleSubmit;return N.createElement("form",it({onSubmit:_,ref:r,onReset:h,action:u},s))});PT.displayName="Form";var Se;(function(n){n.assertEqual=u=>u;function r(u){}n.assertIs=r;function i(u){throw new Error}n.assertNever=i,n.arrayToEnum=u=>{const c={};for(const h of u)c[h]=h;return c},n.getValidEnumValues=u=>{const c=n.objectKeys(u).filter(_=>typeof u[u[_]]!="number"),h={};for(const _ of c)h[_]=u[_];return n.objectValues(h)},n.objectValues=u=>n.objectKeys(u).map(function(c){return u[c]}),n.objectKeys=typeof Object.keys=="function"?u=>Object.keys(u):u=>{const c=[];for(const h in u)Object.prototype.hasOwnProperty.call(u,h)&&c.push(h);return c},n.find=(u,c)=>{for(const h of u)if(c(h))return h},n.isInteger=typeof Number.isInteger=="function"?u=>Number.isInteger(u):u=>typeof u=="number"&&isFinite(u)&&Math.floor(u)===u;function s(u,c=" | "){return u.map(h=>typeof h=="string"?`'${h}'`:h).join(c)}n.joinValues=s,n.jsonStringifyReplacer=(u,c)=>typeof c=="bigint"?c.toString():c})(Se||(Se={}));var nu;(function(n){n.mergeShapes=(r,i)=>({...r,...i})})(nu||(nu={}));const W=Se.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Zn=n=>{switch(typeof n){case"undefined":return W.undefined;case"string":return W.string;case"number":return isNaN(n)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":return Array.isArray(n)?W.array:n===null?W.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?W.promise:typeof Map<"u"&&n instanceof Map?W.map:typeof Set<"u"&&n instanceof Set?W.set:typeof Date<"u"&&n instanceof Date?W.date:W.object;default:return W.unknown}},$=Se.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$T=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");class Bt extends Error{get errors(){return this.issues}constructor(r){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=r}format(r){const i=r||function(c){return c.message},s={_errors:[]},u=c=>{for(const h of c.issues)if(h.code==="invalid_union")h.unionErrors.map(u);else if(h.code==="invalid_return_type")u(h.returnTypeError);else if(h.code==="invalid_arguments")u(h.argumentsError);else if(h.path.length===0)s._errors.push(i(h));else{let _=s,T=0;for(;T<h.path.length;){const y=h.path[T];T===h.path.length-1?(_[y]=_[y]||{_errors:[]},_[y]._errors.push(i(h))):_[y]=_[y]||{_errors:[]},_=_[y],T++}}};return u(this),s}static assert(r){if(!(r instanceof Bt))throw new Error(`Not a ZodError: ${r}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Se.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(r=i=>i.message){const i={},s=[];for(const u of this.issues)u.path.length>0?(i[u.path[0]]=i[u.path[0]]||[],i[u.path[0]].push(r(u))):s.push(r(u));return{formErrors:s,fieldErrors:i}}get formErrors(){return this.flatten()}}Bt.create=n=>new Bt(n);const ai=(n,r)=>{let i;switch(n.code){case $.invalid_type:n.received===W.undefined?i="Required":i=`Expected ${n.expected}, received ${n.received}`;break;case $.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(n.expected,Se.jsonStringifyReplacer)}`;break;case $.unrecognized_keys:i=`Unrecognized key(s) in object: ${Se.joinValues(n.keys,", ")}`;break;case $.invalid_union:i="Invalid input";break;case $.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${Se.joinValues(n.options)}`;break;case $.invalid_enum_value:i=`Invalid enum value. Expected ${Se.joinValues(n.options)}, received '${n.received}'`;break;case $.invalid_arguments:i="Invalid function arguments";break;case $.invalid_return_type:i="Invalid function return type";break;case $.invalid_date:i="Invalid date";break;case $.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(i=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?i=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?i=`Invalid input: must end with "${n.validation.endsWith}"`:Se.assertNever(n.validation):n.validation!=="regex"?i=`Invalid ${n.validation}`:i="Invalid";break;case $.too_small:n.type==="array"?i=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?i=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?i=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?i=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:i="Invalid input";break;case $.too_big:n.type==="array"?i=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?i=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?i=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?i=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?i=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:i="Invalid input";break;case $.custom:i="Invalid input";break;case $.invalid_intersection_types:i="Intersection results could not be merged";break;case $.not_multiple_of:i=`Number must be a multiple of ${n.multipleOf}`;break;case $.not_finite:i="Number must be finite";break;default:i=r.defaultError,Se.assertNever(n)}return{message:i}};let ud=ai;function jT(n){ud=n}function as(){return ud}const ss=n=>{const{data:r,path:i,errorMaps:s,issueData:u}=n,c=[...i,...u.path||[]],h={...u,path:c};if(u.message!==void 0)return{...u,path:c,message:u.message};let _="";const T=s.filter(y=>!!y).slice().reverse();for(const y of T)_=y(h,{data:r,defaultError:_}).message;return{...u,path:c,message:_}},NT=[];function k(n,r){const i=as(),s=ss({issueData:r,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,i,i===ai?void 0:ai].filter(u=>!!u)});n.common.issues.push(s)}class ht{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(r,i){const s=[];for(const u of i){if(u.status==="aborted")return ie;u.status==="dirty"&&r.dirty(),s.push(u.value)}return{status:r.value,value:s}}static async mergeObjectAsync(r,i){const s=[];for(const u of i){const c=await u.key,h=await u.value;s.push({key:c,value:h})}return ht.mergeObjectSync(r,s)}static mergeObjectSync(r,i){const s={};for(const u of i){const{key:c,value:h}=u;if(c.status==="aborted"||h.status==="aborted")return ie;c.status==="dirty"&&r.dirty(),h.status==="dirty"&&r.dirty(),c.value!=="__proto__"&&(typeof h.value<"u"||u.alwaysSet)&&(s[c.value]=h.value)}return{status:r.value,value:s}}}const ie=Object.freeze({status:"aborted"}),ni=n=>({status:"dirty",value:n}),Tt=n=>({status:"valid",value:n}),ru=n=>n.status==="aborted",iu=n=>n.status==="dirty",Ir=n=>n.status==="valid",Bi=n=>typeof Promise<"u"&&n instanceof Promise;function os(n,r,i,s){if(typeof r=="function"?n!==r||!0:!r.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r.get(n)}function cd(n,r,i,s,u){if(typeof r=="function"?n!==r||!0:!r.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r.set(n,i),i}var J;(function(n){n.errToObj=r=>typeof r=="string"?{message:r}:r||{},n.toString=r=>typeof r=="string"?r:r==null?void 0:r.message})(J||(J={}));var ji,Ni;class Sn{constructor(r,i,s,u){this._cachedPath=[],this.parent=r,this.data=i,this._path=s,this._key=u}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Tf=(n,r)=>{if(Ir(r))return{success:!0,data:r.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new Bt(n.common.issues);return this._error=i,this._error}}};function fe(n){if(!n)return{};const{errorMap:r,invalid_type_error:i,required_error:s,description:u}=n;if(r&&(i||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return r?{errorMap:r,description:u}:{errorMap:(h,_)=>{var T,y;const{message:R}=n;return h.code==="invalid_enum_value"?{message:R??_.defaultError}:typeof _.data>"u"?{message:(T=R??s)!==null&&T!==void 0?T:_.defaultError}:h.code!=="invalid_type"?{message:_.defaultError}:{message:(y=R??i)!==null&&y!==void 0?y:_.defaultError}},description:u}}class _e{get description(){return this._def.description}_getType(r){return Zn(r.data)}_getOrReturnCtx(r,i){return i||{common:r.parent.common,data:r.data,parsedType:Zn(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}_processInputParams(r){return{status:new ht,ctx:{common:r.parent.common,data:r.data,parsedType:Zn(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}}_parseSync(r){const i=this._parse(r);if(Bi(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(r){const i=this._parse(r);return Promise.resolve(i)}parse(r,i){const s=this.safeParse(r,i);if(s.success)return s.data;throw s.error}safeParse(r,i){var s;const u={common:{issues:[],async:(s=i==null?void 0:i.async)!==null&&s!==void 0?s:!1,contextualErrorMap:i==null?void 0:i.errorMap},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:Zn(r)},c=this._parseSync({data:r,path:u.path,parent:u});return Tf(u,c)}"~validate"(r){var i,s;const u={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:Zn(r)};if(!this["~standard"].async)try{const c=this._parseSync({data:r,path:[],parent:u});return Ir(c)?{value:c.value}:{issues:u.common.issues}}catch(c){!((s=(i=c==null?void 0:c.message)===null||i===void 0?void 0:i.toLowerCase())===null||s===void 0)&&s.includes("encountered")&&(this["~standard"].async=!0),u.common={issues:[],async:!0}}return this._parseAsync({data:r,path:[],parent:u}).then(c=>Ir(c)?{value:c.value}:{issues:u.common.issues})}async parseAsync(r,i){const s=await this.safeParseAsync(r,i);if(s.success)return s.data;throw s.error}async safeParseAsync(r,i){const s={common:{issues:[],contextualErrorMap:i==null?void 0:i.errorMap,async:!0},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:Zn(r)},u=this._parse({data:r,path:s.path,parent:s}),c=await(Bi(u)?u:Promise.resolve(u));return Tf(s,c)}refine(r,i){const s=u=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(u):i;return this._refinement((u,c)=>{const h=r(u),_=()=>c.addIssue({code:$.custom,...s(u)});return typeof Promise<"u"&&h instanceof Promise?h.then(T=>T?!0:(_(),!1)):h?!0:(_(),!1)})}refinement(r,i){return this._refinement((s,u)=>r(s)?!0:(u.addIssue(typeof i=="function"?i(s,u):i),!1))}_refinement(r){return new dn({schema:this,typeName:ne.ZodEffects,effect:{type:"refinement",refinement:r}})}superRefine(r){return this._refinement(r)}constructor(r){this.spa=this.safeParseAsync,this._def=r,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:i=>this["~validate"](i)}}optional(){return Tn.create(this,this._def)}nullable(){return cr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fn.create(this)}promise(){return oi.create(this,this._def)}or(r){return Vi.create([this,r],this._def)}and(r){return zi.create(this,r,this._def)}transform(r){return new dn({...fe(this._def),schema:this,typeName:ne.ZodEffects,effect:{type:"transform",transform:r}})}default(r){const i=typeof r=="function"?r:()=>r;return new Ki({...fe(this._def),innerType:this,defaultValue:i,typeName:ne.ZodDefault})}brand(){return new _u({typeName:ne.ZodBranded,type:this,...fe(this._def)})}catch(r){const i=typeof r=="function"?r:()=>r;return new Ji({...fe(this._def),innerType:this,catchValue:i,typeName:ne.ZodCatch})}describe(r){const i=this.constructor;return new i({...this._def,description:r})}pipe(r){return na.create(this,r)}readonly(){return Xi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const LT=/^c[^\s-]{8,}$/i,FT=/^[0-9a-z]+$/,MT=/^[0-9A-HJKMNP-TV-Z]{26}$/i,kT=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,DT=/^[a-z0-9_-]{21}$/i,BT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,UT=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ZT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,WT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Zo;const VT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,HT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,GT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,YT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,qT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ld="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",KT=new RegExp(`^${ld}$`);function fd(n){let r="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?r=`${r}\\.\\d{${n.precision}}`:n.precision==null&&(r=`${r}(\\.\\d+)?`),r}function JT(n){return new RegExp(`^${fd(n)}$`)}function dd(n){let r=`${ld}T${fd(n)}`;const i=[];return i.push(n.local?"Z?":"Z"),n.offset&&i.push("([+-]\\d{2}:?\\d{2})"),r=`${r}(${i.join("|")})`,new RegExp(`^${r}$`)}function XT(n,r){return!!((r==="v4"||!r)&&VT.test(n)||(r==="v6"||!r)&&HT.test(n))}function QT(n,r){if(!BT.test(n))return!1;try{const[i]=n.split("."),s=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(i.length+(4-i.length%4)%4,"="),u=JSON.parse(atob(s));return!(typeof u!="object"||u===null||!u.typ||!u.alg||r&&u.alg!==r)}catch{return!1}}function ew(n,r){return!!((r==="v4"||!r)&&zT.test(n)||(r==="v6"||!r)&>.test(n))}class ln extends _e{_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==W.string){const c=this._getOrReturnCtx(r);return k(c,{code:$.invalid_type,expected:W.string,received:c.parsedType}),ie}const s=new ht;let u;for(const c of this._def.checks)if(c.kind==="min")r.data.length<c.value&&(u=this._getOrReturnCtx(r,u),k(u,{code:$.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),s.dirty());else if(c.kind==="max")r.data.length>c.value&&(u=this._getOrReturnCtx(r,u),k(u,{code:$.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),s.dirty());else if(c.kind==="length"){const h=r.data.length>c.value,_=r.data.length<c.value;(h||_)&&(u=this._getOrReturnCtx(r,u),h?k(u,{code:$.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):_&&k(u,{code:$.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),s.dirty())}else if(c.kind==="email")ZT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"email",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="emoji")Zo||(Zo=new RegExp(WT,"u")),Zo.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"emoji",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="uuid")kT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"uuid",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="nanoid")DT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"nanoid",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="cuid")LT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"cuid",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="cuid2")FT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"cuid2",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="ulid")MT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"ulid",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="url")try{new URL(r.data)}catch{u=this._getOrReturnCtx(r,u),k(u,{validation:"url",code:$.invalid_string,message:c.message}),s.dirty()}else c.kind==="regex"?(c.regex.lastIndex=0,c.regex.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"regex",code:$.invalid_string,message:c.message}),s.dirty())):c.kind==="trim"?r.data=r.data.trim():c.kind==="includes"?r.data.includes(c.value,c.position)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),s.dirty()):c.kind==="toLowerCase"?r.data=r.data.toLowerCase():c.kind==="toUpperCase"?r.data=r.data.toUpperCase():c.kind==="startsWith"?r.data.startsWith(c.value)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:{startsWith:c.value},message:c.message}),s.dirty()):c.kind==="endsWith"?r.data.endsWith(c.value)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:{endsWith:c.value},message:c.message}),s.dirty()):c.kind==="datetime"?dd(c).test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:"datetime",message:c.message}),s.dirty()):c.kind==="date"?KT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:"date",message:c.message}),s.dirty()):c.kind==="time"?JT(c).test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:"time",message:c.message}),s.dirty()):c.kind==="duration"?UT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"duration",code:$.invalid_string,message:c.message}),s.dirty()):c.kind==="ip"?XT(r.data,c.version)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"ip",code:$.invalid_string,message:c.message}),s.dirty()):c.kind==="jwt"?QT(r.data,c.alg)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"jwt",code:$.invalid_string,message:c.message}),s.dirty()):c.kind==="cidr"?ew(r.data,c.version)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"cidr",code:$.invalid_string,message:c.message}),s.dirty()):c.kind==="base64"?YT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"base64",code:$.invalid_string,message:c.message}),s.dirty()):c.kind==="base64url"?qT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"base64url",code:$.invalid_string,message:c.message}),s.dirty()):Se.assertNever(c);return{status:s.value,value:r.data}}_regex(r,i,s){return this.refinement(u=>r.test(u),{validation:i,code:$.invalid_string,...J.errToObj(s)})}_addCheck(r){return new ln({...this._def,checks:[...this._def.checks,r]})}email(r){return this._addCheck({kind:"email",...J.errToObj(r)})}url(r){return this._addCheck({kind:"url",...J.errToObj(r)})}emoji(r){return this._addCheck({kind:"emoji",...J.errToObj(r)})}uuid(r){return this._addCheck({kind:"uuid",...J.errToObj(r)})}nanoid(r){return this._addCheck({kind:"nanoid",...J.errToObj(r)})}cuid(r){return this._addCheck({kind:"cuid",...J.errToObj(r)})}cuid2(r){return this._addCheck({kind:"cuid2",...J.errToObj(r)})}ulid(r){return this._addCheck({kind:"ulid",...J.errToObj(r)})}base64(r){return this._addCheck({kind:"base64",...J.errToObj(r)})}base64url(r){return this._addCheck({kind:"base64url",...J.errToObj(r)})}jwt(r){return this._addCheck({kind:"jwt",...J.errToObj(r)})}ip(r){return this._addCheck({kind:"ip",...J.errToObj(r)})}cidr(r){return this._addCheck({kind:"cidr",...J.errToObj(r)})}datetime(r){var i,s;return typeof r=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:r}):this._addCheck({kind:"datetime",precision:typeof(r==null?void 0:r.precision)>"u"?null:r==null?void 0:r.precision,offset:(i=r==null?void 0:r.offset)!==null&&i!==void 0?i:!1,local:(s=r==null?void 0:r.local)!==null&&s!==void 0?s:!1,...J.errToObj(r==null?void 0:r.message)})}date(r){return this._addCheck({kind:"date",message:r})}time(r){return typeof r=="string"?this._addCheck({kind:"time",precision:null,message:r}):this._addCheck({kind:"time",precision:typeof(r==null?void 0:r.precision)>"u"?null:r==null?void 0:r.precision,...J.errToObj(r==null?void 0:r.message)})}duration(r){return this._addCheck({kind:"duration",...J.errToObj(r)})}regex(r,i){return this._addCheck({kind:"regex",regex:r,...J.errToObj(i)})}includes(r,i){return this._addCheck({kind:"includes",value:r,position:i==null?void 0:i.position,...J.errToObj(i==null?void 0:i.message)})}startsWith(r,i){return this._addCheck({kind:"startsWith",value:r,...J.errToObj(i)})}endsWith(r,i){return this._addCheck({kind:"endsWith",value:r,...J.errToObj(i)})}min(r,i){return this._addCheck({kind:"min",value:r,...J.errToObj(i)})}max(r,i){return this._addCheck({kind:"max",value:r,...J.errToObj(i)})}length(r,i){return this._addCheck({kind:"length",value:r,...J.errToObj(i)})}nonempty(r){return this.min(1,J.errToObj(r))}trim(){return new ln({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ln({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ln({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(r=>r.kind==="datetime")}get isDate(){return!!this._def.checks.find(r=>r.kind==="date")}get isTime(){return!!this._def.checks.find(r=>r.kind==="time")}get isDuration(){return!!this._def.checks.find(r=>r.kind==="duration")}get isEmail(){return!!this._def.checks.find(r=>r.kind==="email")}get isURL(){return!!this._def.checks.find(r=>r.kind==="url")}get isEmoji(){return!!this._def.checks.find(r=>r.kind==="emoji")}get isUUID(){return!!this._def.checks.find(r=>r.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(r=>r.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(r=>r.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(r=>r.kind==="cuid2")}get isULID(){return!!this._def.checks.find(r=>r.kind==="ulid")}get isIP(){return!!this._def.checks.find(r=>r.kind==="ip")}get isCIDR(){return!!this._def.checks.find(r=>r.kind==="cidr")}get isBase64(){return!!this._def.checks.find(r=>r.kind==="base64")}get isBase64url(){return!!this._def.checks.find(r=>r.kind==="base64url")}get minLength(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxLength(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}}ln.create=n=>{var r;return new ln({checks:[],typeName:ne.ZodString,coerce:(r=n==null?void 0:n.coerce)!==null&&r!==void 0?r:!1,...fe(n)})};function tw(n,r){const i=(n.toString().split(".")[1]||"").length,s=(r.toString().split(".")[1]||"").length,u=i>s?i:s,c=parseInt(n.toFixed(u).replace(".","")),h=parseInt(r.toFixed(u).replace(".",""));return c%h/Math.pow(10,u)}class sr extends _e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(r){if(this._def.coerce&&(r.data=Number(r.data)),this._getType(r)!==W.number){const c=this._getOrReturnCtx(r);return k(c,{code:$.invalid_type,expected:W.number,received:c.parsedType}),ie}let s;const u=new ht;for(const c of this._def.checks)c.kind==="int"?Se.isInteger(r.data)||(s=this._getOrReturnCtx(r,s),k(s,{code:$.invalid_type,expected:"integer",received:"float",message:c.message}),u.dirty()):c.kind==="min"?(c.inclusive?r.data<c.value:r.data<=c.value)&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.too_small,minimum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),u.dirty()):c.kind==="max"?(c.inclusive?r.data>c.value:r.data>=c.value)&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),u.dirty()):c.kind==="multipleOf"?tw(r.data,c.value)!==0&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.not_multiple_of,multipleOf:c.value,message:c.message}),u.dirty()):c.kind==="finite"?Number.isFinite(r.data)||(s=this._getOrReturnCtx(r,s),k(s,{code:$.not_finite,message:c.message}),u.dirty()):Se.assertNever(c);return{status:u.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,J.toString(i))}gt(r,i){return this.setLimit("min",r,!1,J.toString(i))}lte(r,i){return this.setLimit("max",r,!0,J.toString(i))}lt(r,i){return this.setLimit("max",r,!1,J.toString(i))}setLimit(r,i,s,u){return new sr({...this._def,checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:J.toString(u)}]})}_addCheck(r){return new sr({...this._def,checks:[...this._def.checks,r]})}int(r){return this._addCheck({kind:"int",message:J.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:J.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:J.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:J.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:J.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:J.toString(i)})}finite(r){return this._addCheck({kind:"finite",message:J.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:J.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:J.toString(r)})}get minValue(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}get isInt(){return!!this._def.checks.find(r=>r.kind==="int"||r.kind==="multipleOf"&&Se.isInteger(r.value))}get isFinite(){let r=null,i=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(i===null||s.value>i)&&(i=s.value):s.kind==="max"&&(r===null||s.value<r)&&(r=s.value)}return Number.isFinite(i)&&Number.isFinite(r)}}sr.create=n=>new sr({checks:[],typeName:ne.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...fe(n)});class or extends _e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(r){if(this._def.coerce)try{r.data=BigInt(r.data)}catch{return this._getInvalidInput(r)}if(this._getType(r)!==W.bigint)return this._getInvalidInput(r);let s;const u=new ht;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?r.data<c.value:r.data<=c.value)&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),u.dirty()):c.kind==="max"?(c.inclusive?r.data>c.value:r.data>=c.value)&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),u.dirty()):c.kind==="multipleOf"?r.data%c.value!==BigInt(0)&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.not_multiple_of,multipleOf:c.value,message:c.message}),u.dirty()):Se.assertNever(c);return{status:u.value,value:r.data}}_getInvalidInput(r){const i=this._getOrReturnCtx(r);return k(i,{code:$.invalid_type,expected:W.bigint,received:i.parsedType}),ie}gte(r,i){return this.setLimit("min",r,!0,J.toString(i))}gt(r,i){return this.setLimit("min",r,!1,J.toString(i))}lte(r,i){return this.setLimit("max",r,!0,J.toString(i))}lt(r,i){return this.setLimit("max",r,!1,J.toString(i))}setLimit(r,i,s,u){return new or({...this._def,checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:J.toString(u)}]})}_addCheck(r){return new or({...this._def,checks:[...this._def.checks,r]})}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:J.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:J.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:J.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:J.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:J.toString(i)})}get minValue(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}}or.create=n=>{var r;return new or({checks:[],typeName:ne.ZodBigInt,coerce:(r=n==null?void 0:n.coerce)!==null&&r!==void 0?r:!1,...fe(n)})};class Ui extends _e{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==W.boolean){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.boolean,received:s.parsedType}),ie}return Tt(r.data)}}Ui.create=n=>new Ui({typeName:ne.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...fe(n)});class Pr extends _e{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==W.date){const c=this._getOrReturnCtx(r);return k(c,{code:$.invalid_type,expected:W.date,received:c.parsedType}),ie}if(isNaN(r.data.getTime())){const c=this._getOrReturnCtx(r);return k(c,{code:$.invalid_date}),ie}const s=new ht;let u;for(const c of this._def.checks)c.kind==="min"?r.data.getTime()<c.value&&(u=this._getOrReturnCtx(r,u),k(u,{code:$.too_small,message:c.message,inclusive:!0,exact:!1,minimum:c.value,type:"date"}),s.dirty()):c.kind==="max"?r.data.getTime()>c.value&&(u=this._getOrReturnCtx(r,u),k(u,{code:$.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),s.dirty()):Se.assertNever(c);return{status:s.value,value:new Date(r.data.getTime())}}_addCheck(r){return new Pr({...this._def,checks:[...this._def.checks,r]})}min(r,i){return this._addCheck({kind:"min",value:r.getTime(),message:J.toString(i)})}max(r,i){return this._addCheck({kind:"max",value:r.getTime(),message:J.toString(i)})}get minDate(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r!=null?new Date(r):null}get maxDate(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r!=null?new Date(r):null}}Pr.create=n=>new Pr({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:ne.ZodDate,...fe(n)});class us extends _e{_parse(r){if(this._getType(r)!==W.symbol){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.symbol,received:s.parsedType}),ie}return Tt(r.data)}}us.create=n=>new us({typeName:ne.ZodSymbol,...fe(n)});class Zi extends _e{_parse(r){if(this._getType(r)!==W.undefined){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.undefined,received:s.parsedType}),ie}return Tt(r.data)}}Zi.create=n=>new Zi({typeName:ne.ZodUndefined,...fe(n)});class Wi extends _e{_parse(r){if(this._getType(r)!==W.null){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.null,received:s.parsedType}),ie}return Tt(r.data)}}Wi.create=n=>new Wi({typeName:ne.ZodNull,...fe(n)});class si extends _e{constructor(){super(...arguments),this._any=!0}_parse(r){return Tt(r.data)}}si.create=n=>new si({typeName:ne.ZodAny,...fe(n)});class Ar extends _e{constructor(){super(...arguments),this._unknown=!0}_parse(r){return Tt(r.data)}}Ar.create=n=>new Ar({typeName:ne.ZodUnknown,...fe(n)});class Wn extends _e{_parse(r){const i=this._getOrReturnCtx(r);return k(i,{code:$.invalid_type,expected:W.never,received:i.parsedType}),ie}}Wn.create=n=>new Wn({typeName:ne.ZodNever,...fe(n)});class cs extends _e{_parse(r){if(this._getType(r)!==W.undefined){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.void,received:s.parsedType}),ie}return Tt(r.data)}}cs.create=n=>new cs({typeName:ne.ZodVoid,...fe(n)});class fn extends _e{_parse(r){const{ctx:i,status:s}=this._processInputParams(r),u=this._def;if(i.parsedType!==W.array)return k(i,{code:$.invalid_type,expected:W.array,received:i.parsedType}),ie;if(u.exactLength!==null){const h=i.data.length>u.exactLength.value,_=i.data.length<u.exactLength.value;(h||_)&&(k(i,{code:h?$.too_big:$.too_small,minimum:_?u.exactLength.value:void 0,maximum:h?u.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:u.exactLength.message}),s.dirty())}if(u.minLength!==null&&i.data.length<u.minLength.value&&(k(i,{code:$.too_small,minimum:u.minLength.value,type:"array",inclusive:!0,exact:!1,message:u.minLength.message}),s.dirty()),u.maxLength!==null&&i.data.length>u.maxLength.value&&(k(i,{code:$.too_big,maximum:u.maxLength.value,type:"array",inclusive:!0,exact:!1,message:u.maxLength.message}),s.dirty()),i.common.async)return Promise.all([...i.data].map((h,_)=>u.type._parseAsync(new Sn(i,h,i.path,_)))).then(h=>ht.mergeArray(s,h));const c=[...i.data].map((h,_)=>u.type._parseSync(new Sn(i,h,i.path,_)));return ht.mergeArray(s,c)}get element(){return this._def.type}min(r,i){return new fn({...this._def,minLength:{value:r,message:J.toString(i)}})}max(r,i){return new fn({...this._def,maxLength:{value:r,message:J.toString(i)}})}length(r,i){return new fn({...this._def,exactLength:{value:r,message:J.toString(i)}})}nonempty(r){return this.min(1,r)}}fn.create=(n,r)=>new fn({type:n,minLength:null,maxLength:null,exactLength:null,typeName:ne.ZodArray,...fe(r)});function ei(n){if(n instanceof He){const r={};for(const i in n.shape){const s=n.shape[i];r[i]=Tn.create(ei(s))}return new He({...n._def,shape:()=>r})}else return n instanceof fn?new fn({...n._def,type:ei(n.element)}):n instanceof Tn?Tn.create(ei(n.unwrap())):n instanceof cr?cr.create(ei(n.unwrap())):n instanceof En?En.create(n.items.map(r=>ei(r))):n}class He extends _e{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const r=this._def.shape(),i=Se.objectKeys(r);return this._cached={shape:r,keys:i}}_parse(r){if(this._getType(r)!==W.object){const y=this._getOrReturnCtx(r);return k(y,{code:$.invalid_type,expected:W.object,received:y.parsedType}),ie}const{status:s,ctx:u}=this._processInputParams(r),{shape:c,keys:h}=this._getCached(),_=[];if(!(this._def.catchall instanceof Wn&&this._def.unknownKeys==="strip"))for(const y in u.data)h.includes(y)||_.push(y);const T=[];for(const y of h){const R=c[y],V=u.data[y];T.push({key:{status:"valid",value:y},value:R._parse(new Sn(u,V,u.path,y)),alwaysSet:y in u.data})}if(this._def.catchall instanceof Wn){const y=this._def.unknownKeys;if(y==="passthrough")for(const R of _)T.push({key:{status:"valid",value:R},value:{status:"valid",value:u.data[R]}});else if(y==="strict")_.length>0&&(k(u,{code:$.unrecognized_keys,keys:_}),s.dirty());else if(y!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const y=this._def.catchall;for(const R of _){const V=u.data[R];T.push({key:{status:"valid",value:R},value:y._parse(new Sn(u,V,u.path,R)),alwaysSet:R in u.data})}}return u.common.async?Promise.resolve().then(async()=>{const y=[];for(const R of T){const V=await R.key,U=await R.value;y.push({key:V,value:U,alwaysSet:R.alwaysSet})}return y}).then(y=>ht.mergeObjectSync(s,y)):ht.mergeObjectSync(s,T)}get shape(){return this._def.shape()}strict(r){return J.errToObj,new He({...this._def,unknownKeys:"strict",...r!==void 0?{errorMap:(i,s)=>{var u,c,h,_;const T=(h=(c=(u=this._def).errorMap)===null||c===void 0?void 0:c.call(u,i,s).message)!==null&&h!==void 0?h:s.defaultError;return i.code==="unrecognized_keys"?{message:(_=J.errToObj(r).message)!==null&&_!==void 0?_:T}:{message:T}}}:{}})}strip(){return new He({...this._def,unknownKeys:"strip"})}passthrough(){return new He({...this._def,unknownKeys:"passthrough"})}extend(r){return new He({...this._def,shape:()=>({...this._def.shape(),...r})})}merge(r){return new He({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>({...this._def.shape(),...r._def.shape()}),typeName:ne.ZodObject})}setKey(r,i){return this.augment({[r]:i})}catchall(r){return new He({...this._def,catchall:r})}pick(r){const i={};return Se.objectKeys(r).forEach(s=>{r[s]&&this.shape[s]&&(i[s]=this.shape[s])}),new He({...this._def,shape:()=>i})}omit(r){const i={};return Se.objectKeys(this.shape).forEach(s=>{r[s]||(i[s]=this.shape[s])}),new He({...this._def,shape:()=>i})}deepPartial(){return ei(this)}partial(r){const i={};return Se.objectKeys(this.shape).forEach(s=>{const u=this.shape[s];r&&!r[s]?i[s]=u:i[s]=u.optional()}),new He({...this._def,shape:()=>i})}required(r){const i={};return Se.objectKeys(this.shape).forEach(s=>{if(r&&!r[s])i[s]=this.shape[s];else{let c=this.shape[s];for(;c instanceof Tn;)c=c._def.innerType;i[s]=c}}),new He({...this._def,shape:()=>i})}keyof(){return hd(Se.objectKeys(this.shape))}}He.create=(n,r)=>new He({shape:()=>n,unknownKeys:"strip",catchall:Wn.create(),typeName:ne.ZodObject,...fe(r)});He.strictCreate=(n,r)=>new He({shape:()=>n,unknownKeys:"strict",catchall:Wn.create(),typeName:ne.ZodObject,...fe(r)});He.lazycreate=(n,r)=>new He({shape:n,unknownKeys:"strip",catchall:Wn.create(),typeName:ne.ZodObject,...fe(r)});class Vi extends _e{_parse(r){const{ctx:i}=this._processInputParams(r),s=this._def.options;function u(c){for(const _ of c)if(_.result.status==="valid")return _.result;for(const _ of c)if(_.result.status==="dirty")return i.common.issues.push(..._.ctx.common.issues),_.result;const h=c.map(_=>new Bt(_.ctx.common.issues));return k(i,{code:$.invalid_union,unionErrors:h}),ie}if(i.common.async)return Promise.all(s.map(async c=>{const h={...i,common:{...i.common,issues:[]},parent:null};return{result:await c._parseAsync({data:i.data,path:i.path,parent:h}),ctx:h}})).then(u);{let c;const h=[];for(const T of s){const y={...i,common:{...i.common,issues:[]},parent:null},R=T._parseSync({data:i.data,path:i.path,parent:y});if(R.status==="valid")return R;R.status==="dirty"&&!c&&(c={result:R,ctx:y}),y.common.issues.length&&h.push(y.common.issues)}if(c)return i.common.issues.push(...c.ctx.common.issues),c.result;const _=h.map(T=>new Bt(T));return k(i,{code:$.invalid_union,unionErrors:_}),ie}}get options(){return this._def.options}}Vi.create=(n,r)=>new Vi({options:n,typeName:ne.ZodUnion,...fe(r)});const Bn=n=>n instanceof Gi?Bn(n.schema):n instanceof dn?Bn(n.innerType()):n instanceof Yi?[n.value]:n instanceof ur?n.options:n instanceof qi?Se.objectValues(n.enum):n instanceof Ki?Bn(n._def.innerType):n instanceof Zi?[void 0]:n instanceof Wi?[null]:n instanceof Tn?[void 0,...Bn(n.unwrap())]:n instanceof cr?[null,...Bn(n.unwrap())]:n instanceof _u||n instanceof Xi?Bn(n.unwrap()):n instanceof Ji?Bn(n._def.innerType):[];class vs extends _e{_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==W.object)return k(i,{code:$.invalid_type,expected:W.object,received:i.parsedType}),ie;const s=this.discriminator,u=i.data[s],c=this.optionsMap.get(u);return c?i.common.async?c._parseAsync({data:i.data,path:i.path,parent:i}):c._parseSync({data:i.data,path:i.path,parent:i}):(k(i,{code:$.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(r,i,s){const u=new Map;for(const c of i){const h=Bn(c.shape[r]);if(!h.length)throw new Error(`A discriminator value for key \`${r}\` could not be extracted from all schema options`);for(const _ of h){if(u.has(_))throw new Error(`Discriminator property ${String(r)} has duplicate value ${String(_)}`);u.set(_,c)}}return new vs({typeName:ne.ZodDiscriminatedUnion,discriminator:r,options:i,optionsMap:u,...fe(s)})}}function au(n,r){const i=Zn(n),s=Zn(r);if(n===r)return{valid:!0,data:n};if(i===W.object&&s===W.object){const u=Se.objectKeys(r),c=Se.objectKeys(n).filter(_=>u.indexOf(_)!==-1),h={...n,...r};for(const _ of c){const T=au(n[_],r[_]);if(!T.valid)return{valid:!1};h[_]=T.data}return{valid:!0,data:h}}else if(i===W.array&&s===W.array){if(n.length!==r.length)return{valid:!1};const u=[];for(let c=0;c<n.length;c++){const h=n[c],_=r[c],T=au(h,_);if(!T.valid)return{valid:!1};u.push(T.data)}return{valid:!0,data:u}}else return i===W.date&&s===W.date&&+n==+r?{valid:!0,data:n}:{valid:!1}}class zi extends _e{_parse(r){const{status:i,ctx:s}=this._processInputParams(r),u=(c,h)=>{if(ru(c)||ru(h))return ie;const _=au(c.value,h.value);return _.valid?((iu(c)||iu(h))&&i.dirty(),{status:i.value,value:_.data}):(k(s,{code:$.invalid_intersection_types}),ie)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([c,h])=>u(c,h)):u(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}zi.create=(n,r,i)=>new zi({left:n,right:r,typeName:ne.ZodIntersection,...fe(i)});class En extends _e{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.array)return k(s,{code:$.invalid_type,expected:W.array,received:s.parsedType}),ie;if(s.data.length<this._def.items.length)return k(s,{code:$.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ie;!this._def.rest&&s.data.length>this._def.items.length&&(k(s,{code:$.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const c=[...s.data].map((h,_)=>{const T=this._def.items[_]||this._def.rest;return T?T._parse(new Sn(s,h,s.path,_)):null}).filter(h=>!!h);return s.common.async?Promise.all(c).then(h=>ht.mergeArray(i,h)):ht.mergeArray(i,c)}get items(){return this._def.items}rest(r){return new En({...this._def,rest:r})}}En.create=(n,r)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new En({items:n,typeName:ne.ZodTuple,rest:null,...fe(r)})};class Hi extends _e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.object)return k(s,{code:$.invalid_type,expected:W.object,received:s.parsedType}),ie;const u=[],c=this._def.keyType,h=this._def.valueType;for(const _ in s.data)u.push({key:c._parse(new Sn(s,_,s.path,_)),value:h._parse(new Sn(s,s.data[_],s.path,_)),alwaysSet:_ in s.data});return s.common.async?ht.mergeObjectAsync(i,u):ht.mergeObjectSync(i,u)}get element(){return this._def.valueType}static create(r,i,s){return i instanceof _e?new Hi({keyType:r,valueType:i,typeName:ne.ZodRecord,...fe(s)}):new Hi({keyType:ln.create(),valueType:r,typeName:ne.ZodRecord,...fe(i)})}}class ls extends _e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.map)return k(s,{code:$.invalid_type,expected:W.map,received:s.parsedType}),ie;const u=this._def.keyType,c=this._def.valueType,h=[...s.data.entries()].map(([_,T],y)=>({key:u._parse(new Sn(s,_,s.path,[y,"key"])),value:c._parse(new Sn(s,T,s.path,[y,"value"]))}));if(s.common.async){const _=new Map;return Promise.resolve().then(async()=>{for(const T of h){const y=await T.key,R=await T.value;if(y.status==="aborted"||R.status==="aborted")return ie;(y.status==="dirty"||R.status==="dirty")&&i.dirty(),_.set(y.value,R.value)}return{status:i.value,value:_}})}else{const _=new Map;for(const T of h){const y=T.key,R=T.value;if(y.status==="aborted"||R.status==="aborted")return ie;(y.status==="dirty"||R.status==="dirty")&&i.dirty(),_.set(y.value,R.value)}return{status:i.value,value:_}}}}ls.create=(n,r,i)=>new ls({valueType:r,keyType:n,typeName:ne.ZodMap,...fe(i)});class $r extends _e{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.set)return k(s,{code:$.invalid_type,expected:W.set,received:s.parsedType}),ie;const u=this._def;u.minSize!==null&&s.data.size<u.minSize.value&&(k(s,{code:$.too_small,minimum:u.minSize.value,type:"set",inclusive:!0,exact:!1,message:u.minSize.message}),i.dirty()),u.maxSize!==null&&s.data.size>u.maxSize.value&&(k(s,{code:$.too_big,maximum:u.maxSize.value,type:"set",inclusive:!0,exact:!1,message:u.maxSize.message}),i.dirty());const c=this._def.valueType;function h(T){const y=new Set;for(const R of T){if(R.status==="aborted")return ie;R.status==="dirty"&&i.dirty(),y.add(R.value)}return{status:i.value,value:y}}const _=[...s.data.values()].map((T,y)=>c._parse(new Sn(s,T,s.path,y)));return s.common.async?Promise.all(_).then(T=>h(T)):h(_)}min(r,i){return new $r({...this._def,minSize:{value:r,message:J.toString(i)}})}max(r,i){return new $r({...this._def,maxSize:{value:r,message:J.toString(i)}})}size(r,i){return this.min(r,i).max(r,i)}nonempty(r){return this.min(1,r)}}$r.create=(n,r)=>new $r({valueType:n,minSize:null,maxSize:null,typeName:ne.ZodSet,...fe(r)});class ri extends _e{constructor(){super(...arguments),this.validate=this.implement}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==W.function)return k(i,{code:$.invalid_type,expected:W.function,received:i.parsedType}),ie;function s(_,T){return ss({data:_,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,as(),ai].filter(y=>!!y),issueData:{code:$.invalid_arguments,argumentsError:T}})}function u(_,T){return ss({data:_,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,as(),ai].filter(y=>!!y),issueData:{code:$.invalid_return_type,returnTypeError:T}})}const c={errorMap:i.common.contextualErrorMap},h=i.data;if(this._def.returns instanceof oi){const _=this;return Tt(async function(...T){const y=new Bt([]),R=await _._def.args.parseAsync(T,c).catch(se=>{throw y.addIssue(s(T,se)),y}),V=await Reflect.apply(h,this,R);return await _._def.returns._def.type.parseAsync(V,c).catch(se=>{throw y.addIssue(u(V,se)),y})})}else{const _=this;return Tt(function(...T){const y=_._def.args.safeParse(T,c);if(!y.success)throw new Bt([s(T,y.error)]);const R=Reflect.apply(h,this,y.data),V=_._def.returns.safeParse(R,c);if(!V.success)throw new Bt([u(R,V.error)]);return V.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...r){return new ri({...this._def,args:En.create(r).rest(Ar.create())})}returns(r){return new ri({...this._def,returns:r})}implement(r){return this.parse(r)}strictImplement(r){return this.parse(r)}static create(r,i,s){return new ri({args:r||En.create([]).rest(Ar.create()),returns:i||Ar.create(),typeName:ne.ZodFunction,...fe(s)})}}class Gi extends _e{get schema(){return this._def.getter()}_parse(r){const{ctx:i}=this._processInputParams(r);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}Gi.create=(n,r)=>new Gi({getter:n,typeName:ne.ZodLazy,...fe(r)});class Yi extends _e{_parse(r){if(r.data!==this._def.value){const i=this._getOrReturnCtx(r);return k(i,{received:i.data,code:$.invalid_literal,expected:this._def.value}),ie}return{status:"valid",value:r.data}}get value(){return this._def.value}}Yi.create=(n,r)=>new Yi({value:n,typeName:ne.ZodLiteral,...fe(r)});function hd(n,r){return new ur({values:n,typeName:ne.ZodEnum,...fe(r)})}class ur extends _e{constructor(){super(...arguments),ji.set(this,void 0)}_parse(r){if(typeof r.data!="string"){const i=this._getOrReturnCtx(r),s=this._def.values;return k(i,{expected:Se.joinValues(s),received:i.parsedType,code:$.invalid_type}),ie}if(os(this,ji)||cd(this,ji,new Set(this._def.values)),!os(this,ji).has(r.data)){const i=this._getOrReturnCtx(r),s=this._def.values;return k(i,{received:i.data,code:$.invalid_enum_value,options:s}),ie}return Tt(r.data)}get options(){return this._def.values}get enum(){const r={};for(const i of this._def.values)r[i]=i;return r}get Values(){const r={};for(const i of this._def.values)r[i]=i;return r}get Enum(){const r={};for(const i of this._def.values)r[i]=i;return r}extract(r,i=this._def){return ur.create(r,{...this._def,...i})}exclude(r,i=this._def){return ur.create(this.options.filter(s=>!r.includes(s)),{...this._def,...i})}}ji=new WeakMap;ur.create=hd;class qi extends _e{constructor(){super(...arguments),Ni.set(this,void 0)}_parse(r){const i=Se.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(r);if(s.parsedType!==W.string&&s.parsedType!==W.number){const u=Se.objectValues(i);return k(s,{expected:Se.joinValues(u),received:s.parsedType,code:$.invalid_type}),ie}if(os(this,Ni)||cd(this,Ni,new Set(Se.getValidEnumValues(this._def.values))),!os(this,Ni).has(r.data)){const u=Se.objectValues(i);return k(s,{received:s.data,code:$.invalid_enum_value,options:u}),ie}return Tt(r.data)}get enum(){return this._def.values}}Ni=new WeakMap;qi.create=(n,r)=>new qi({values:n,typeName:ne.ZodNativeEnum,...fe(r)});class oi extends _e{unwrap(){return this._def.type}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==W.promise&&i.common.async===!1)return k(i,{code:$.invalid_type,expected:W.promise,received:i.parsedType}),ie;const s=i.parsedType===W.promise?i.data:Promise.resolve(i.data);return Tt(s.then(u=>this._def.type.parseAsync(u,{path:i.path,errorMap:i.common.contextualErrorMap})))}}oi.create=(n,r)=>new oi({type:n,typeName:ne.ZodPromise,...fe(r)});class dn extends _e{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){const{status:i,ctx:s}=this._processInputParams(r),u=this._def.effect||null,c={addIssue:h=>{k(s,h),h.fatal?i.abort():i.dirty()},get path(){return s.path}};if(c.addIssue=c.addIssue.bind(c),u.type==="preprocess"){const h=u.transform(s.data,c);if(s.common.async)return Promise.resolve(h).then(async _=>{if(i.value==="aborted")return ie;const T=await this._def.schema._parseAsync({data:_,path:s.path,parent:s});return T.status==="aborted"?ie:T.status==="dirty"||i.value==="dirty"?ni(T.value):T});{if(i.value==="aborted")return ie;const _=this._def.schema._parseSync({data:h,path:s.path,parent:s});return _.status==="aborted"?ie:_.status==="dirty"||i.value==="dirty"?ni(_.value):_}}if(u.type==="refinement"){const h=_=>{const T=u.refinement(_,c);if(s.common.async)return Promise.resolve(T);if(T instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return _};if(s.common.async===!1){const _=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return _.status==="aborted"?ie:(_.status==="dirty"&&i.dirty(),h(_.value),{status:i.value,value:_.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(_=>_.status==="aborted"?ie:(_.status==="dirty"&&i.dirty(),h(_.value).then(()=>({status:i.value,value:_.value}))))}if(u.type==="transform")if(s.common.async===!1){const h=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Ir(h))return h;const _=u.transform(h.value,c);if(_ instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:_}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(h=>Ir(h)?Promise.resolve(u.transform(h.value,c)).then(_=>({status:i.value,value:_})):h);Se.assertNever(u)}}dn.create=(n,r,i)=>new dn({schema:n,typeName:ne.ZodEffects,effect:r,...fe(i)});dn.createWithPreprocess=(n,r,i)=>new dn({schema:r,effect:{type:"preprocess",transform:n},typeName:ne.ZodEffects,...fe(i)});class Tn extends _e{_parse(r){return this._getType(r)===W.undefined?Tt(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}Tn.create=(n,r)=>new Tn({innerType:n,typeName:ne.ZodOptional,...fe(r)});class cr extends _e{_parse(r){return this._getType(r)===W.null?Tt(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}cr.create=(n,r)=>new cr({innerType:n,typeName:ne.ZodNullable,...fe(r)});class Ki extends _e{_parse(r){const{ctx:i}=this._processInputParams(r);let s=i.data;return i.parsedType===W.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}Ki.create=(n,r)=>new Ki({innerType:n,typeName:ne.ZodDefault,defaultValue:typeof r.default=="function"?r.default:()=>r.default,...fe(r)});class Ji extends _e{_parse(r){const{ctx:i}=this._processInputParams(r),s={...i,common:{...i.common,issues:[]}},u=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Bi(u)?u.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Bt(s.common.issues)},input:s.data})})):{status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new Bt(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Ji.create=(n,r)=>new Ji({innerType:n,typeName:ne.ZodCatch,catchValue:typeof r.catch=="function"?r.catch:()=>r.catch,...fe(r)});class fs extends _e{_parse(r){if(this._getType(r)!==W.nan){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.nan,received:s.parsedType}),ie}return{status:"valid",value:r.data}}}fs.create=n=>new fs({typeName:ne.ZodNaN,...fe(n)});const nw=Symbol("zod_brand");class _u extends _e{_parse(r){const{ctx:i}=this._processInputParams(r),s=i.data;return this._def.type._parse({data:s,path:i.path,parent:i})}unwrap(){return this._def.type}}class na extends _e{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return c.status==="aborted"?ie:c.status==="dirty"?(i.dirty(),ni(c.value)):this._def.out._parseAsync({data:c.value,path:s.path,parent:s})})();{const u=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return u.status==="aborted"?ie:u.status==="dirty"?(i.dirty(),{status:"dirty",value:u.value}):this._def.out._parseSync({data:u.value,path:s.path,parent:s})}}static create(r,i){return new na({in:r,out:i,typeName:ne.ZodPipeline})}}class Xi extends _e{_parse(r){const i=this._def.innerType._parse(r),s=u=>(Ir(u)&&(u.value=Object.freeze(u.value)),u);return Bi(i)?i.then(u=>s(u)):s(i)}unwrap(){return this._def.innerType}}Xi.create=(n,r)=>new Xi({innerType:n,typeName:ne.ZodReadonly,...fe(r)});function pd(n,r={},i){return n?si.create().superRefine((s,u)=>{var c,h;if(!n(s)){const _=typeof r=="function"?r(s):typeof r=="string"?{message:r}:r,T=(h=(c=_.fatal)!==null&&c!==void 0?c:i)!==null&&h!==void 0?h:!0,y=typeof _=="string"?{message:_}:_;u.addIssue({code:"custom",...y,fatal:T})}}):si.create()}const rw={object:He.lazycreate};var ne;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(ne||(ne={}));const iw=(n,r={message:`Input not instance of ${n.name}`})=>pd(i=>i instanceof n,r),_d=ln.create,gd=sr.create,aw=fs.create,sw=or.create,vd=Ui.create,ow=Pr.create,uw=us.create,cw=Zi.create,lw=Wi.create,fw=si.create,dw=Ar.create,hw=Wn.create,pw=cs.create,_w=fn.create,gw=He.create,vw=He.strictCreate,mw=Vi.create,yw=vs.create,xw=zi.create,bw=En.create,Tw=Hi.create,ww=ls.create,Sw=$r.create,Ew=ri.create,Cw=Gi.create,Aw=Yi.create,Ow=ur.create,Rw=qi.create,Iw=oi.create,wf=dn.create,Pw=Tn.create,$w=cr.create,jw=dn.createWithPreprocess,Nw=na.create,Lw=()=>_d().optional(),Fw=()=>gd().optional(),Mw=()=>vd().optional(),kw={string:n=>ln.create({...n,coerce:!0}),number:n=>sr.create({...n,coerce:!0}),boolean:n=>Ui.create({...n,coerce:!0}),bigint:n=>or.create({...n,coerce:!0}),date:n=>Pr.create({...n,coerce:!0})},Dw=ie;var Wo=Object.freeze({__proto__:null,defaultErrorMap:ai,setErrorMap:jT,getErrorMap:as,makeIssue:ss,EMPTY_PATH:NT,addIssueToContext:k,ParseStatus:ht,INVALID:ie,DIRTY:ni,OK:Tt,isAborted:ru,isDirty:iu,isValid:Ir,isAsync:Bi,get util(){return Se},get objectUtil(){return nu},ZodParsedType:W,getParsedType:Zn,ZodType:_e,datetimeRegex:dd,ZodString:ln,ZodNumber:sr,ZodBigInt:or,ZodBoolean:Ui,ZodDate:Pr,ZodSymbol:us,ZodUndefined:Zi,ZodNull:Wi,ZodAny:si,ZodUnknown:Ar,ZodNever:Wn,ZodVoid:cs,ZodArray:fn,ZodObject:He,ZodUnion:Vi,ZodDiscriminatedUnion:vs,ZodIntersection:zi,ZodTuple:En,ZodRecord:Hi,ZodMap:ls,ZodSet:$r,ZodFunction:ri,ZodLazy:Gi,ZodLiteral:Yi,ZodEnum:ur,ZodNativeEnum:qi,ZodPromise:oi,ZodEffects:dn,ZodTransformer:dn,ZodOptional:Tn,ZodNullable:cr,ZodDefault:Ki,ZodCatch:Ji,ZodNaN:fs,BRAND:nw,ZodBranded:_u,ZodPipeline:na,ZodReadonly:Xi,custom:pd,Schema:_e,ZodSchema:_e,late:rw,get ZodFirstPartyTypeKind(){return ne},coerce:kw,any:fw,array:_w,bigint:sw,boolean:vd,date:ow,discriminatedUnion:yw,effect:wf,enum:Ow,function:Ew,instanceof:iw,intersection:xw,lazy:Cw,literal:Aw,map:ww,nan:aw,nativeEnum:Rw,never:hw,null:lw,nullable:$w,number:gd,object:gw,oboolean:Mw,onumber:Fw,optional:Pw,ostring:Lw,pipeline:Nw,preprocess:jw,promise:Iw,record:Tw,set:Sw,strictObject:vw,string:_d,symbol:uw,transformer:wf,tuple:bw,undefined:cw,union:mw,unknown:dw,void:pw,NEVER:Dw,ZodIssueCode:$,quotelessJson:$T,ZodError:Bt}),Or={},Bw=cn&&cn.__extends||function(){var n=function(r,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(s[c]=u[c])},n(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(r,i);function s(){this.constructor=r}r.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}}(),md=cn&&cn.__awaiter||function(n,r,i,s){function u(c){return c instanceof i?c:new i(function(h){h(c)})}return new(i||(i=Promise))(function(c,h){function _(R){try{y(s.next(R))}catch(V){h(V)}}function T(R){try{y(s.throw(R))}catch(V){h(V)}}function y(R){R.done?c(R.value):u(R.value).then(_,T)}y((s=s.apply(n,r||[])).next())})},yd=cn&&cn.__generator||function(n,r){var i={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},s,u,c,h;return h={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function _(y){return function(R){return T([y,R])}}function T(y){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,u&&(c=y[0]&2?u.return:y[0]?u.throw||((c=u.return)&&c.call(u),0):u.next)&&!(c=c.call(u,y[1])).done)return c;switch(u=0,c&&(y=[y[0]&2,c.value]),y[0]){case 0:case 1:c=y;break;case 4:return i.label++,{value:y[1],done:!1};case 5:i.label++,u=y[1],y=[0];continue;case 7:y=i.ops.pop(),i.trys.pop();continue;default:if(c=i.trys,!(c=c.length>0&&c[c.length-1])&&(y[0]===6||y[0]===2)){i=0;continue}if(y[0]===3&&(!c||y[1]>c[0]&&y[1]<c[3])){i.label=y[1];break}if(y[0]===6&&i.label<c[1]){i.label=c[1],c=y;break}if(c&&i.label<c[2]){i.label=c[2],i.ops.push(y);break}c[2]&&i.ops.pop(),i.trys.pop();continue}y=r.call(n,i)}catch(R){y=[6,R],u=0}finally{s=c=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}};Object.defineProperty(Or,"__esModule",{value:!0});Or.toFormikValidate=bd=Or.toFormikValidationSchema=Or.ValidationError=void 0;var xd=function(n){Bw(r,n);function r(i){var s=n.call(this,i)||this;return s.name="ValidationError",s.inner=[],s}return r}(Error);Or.ValidationError=xd;function Uw(n){var r=new xd(n.message);return r.inner=n.errors.map(function(i){return{message:i.message,path:i.path.join(".")}}),r}function Zw(n,r){return{validate:function(i){return md(this,void 0,void 0,function(){var s;return yd(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,n.parseAsync(i,r)];case 1:return u.sent(),[3,3];case 2:throw s=u.sent(),Uw(s);case 3:return[2]}})})}}}var bd=Or.toFormikValidationSchema=Zw;function Ww(n){for(var r={},i=0,s=n.errors;i<s.length;i++){var u=s[i];r[u.path.filter(Boolean).join(".")]=u.message}return r}function Vw(n,r){var i=this;return function(s){return md(i,void 0,void 0,function(){var u;return yd(this,function(c){switch(c.label){case 0:return[4,n.safeParseAsync(s,r)];case 1:return u=c.sent(),u.success?[2]:[2,Ww(u.error)]}})})}}Or.toFormikValidate=Vw;const zw="_root__body_a79gv_120",Hw="_root__form_a79gv_123",Gw="_root__stickyButton_a79gv_138",Vo={root__body:zw,root__form:Hw,root__stickyButton:Gw},bn={amountPicker:"amountPicker",cta:"cta",headline:"headline",legalCheckbox:"legalCheckbox",paymentMethods:"paymentMethods",priceDescription:"priceDescription",selectablePills:"selectablePills",submitButton:"submitButton",switcherToggle:"switcherToggle"};var gu=(n=>(n.FULL_PAGE="full_page",n.IN_APP="in_app",n))(gu||{});const Yw="_root_1x2jr_120",qw={root:Yw},Kw=({errorMessage:n,id:r,onChange:i,value:s})=>b.jsx(H.Fieldset,{className:qw.root,name:r,children:b.jsx(H.InputFieldSpecial,{id:r,onChange:i,value:s,errorMessage:n})}),Jw="_root_sxwv4_120",Xw="_root__button_sxwv4_126",Sf={root:Jw,root__button:Xw},Qw=({data:{label:n,url:r}})=>b.jsx(H.Fieldset,{className:Sf.root,children:b.jsx(H.TextButton,{className:Sf.root__button,href:r,size:"link",text:n,color:"deepPurple",target:"_blank"})}),eS="_root_c1agt_120",tS="_root__blockHeader_c1agt_125",nS="_root__block_c1agt_125",rS="_root__markdown_c1agt_138",Xa={root:eS,root__blockHeader:tS,root__block:nS,root__markdown:rS},iS=({data:{buttonText:n,content:r,date:i,headline:s,version:u},onClose:c,open:h})=>{const _=()=>{c&&c(!h)};return b.jsx(H.Modal,{headerTitle:s,onClose:_,open:h,modalFooter:b.jsx(b.Fragment,{children:b.jsx(H.TextButton,{onClick:_,color:"blue",size:"large",text:n})}),modalBody:b.jsx(H.Card,{children:b.jsx(H.CardBody,{className:Xa.root,children:b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:Xa.root__blockHeader,children:[b.jsx(H.Typography,{type:"body-regular",children:u}),b.jsx(H.Typography,{type:"body-regular",children:i})]}),b.jsx(H.Divider,{}),typeof r=="string"?b.jsx(Qi.MarkdownRichText,{text:r,className:Xa.root__markdown}):r.map((T,y)=>b.jsxs(N.Fragment,{children:[b.jsx("div",{className:Xa.root__block,children:T}),y!==r.length-1&&b.jsx(H.Divider,{})]},`rich_text_el_${y}`))]})})})})},aS="_headline_1x4kr_120",sS={headline:aS},oS=({data:{headline:n,subheadline:r}})=>b.jsxs(H.Fieldset,{className:sS.headline,children:[b.jsx(H.Typography,{type:"h1",children:n}),b.jsx(H.Typography,{type:"body-regular",children:r})]}),uS="_root_1o02i_120",cS="_root__img_1o02i_127",Ef={root:uS,root__img:cS},lS=({data:{alt:n,src:r}})=>b.jsx("div",{className:Ef.root,"data-testid":"hero-block",children:b.jsx("img",{className:Ef.root__img,alt:n,src:r})}),fS="_root_kozox_120",dS="_root__checkbox_kozox_128",hS="_root__text_kozox_134",pS="_root__error_kozox_140",_S="_root__link_kozox_150",rr={root:fS,root__checkbox:dS,root__text:hS,root__error:pS,"root--error":"_root--error_kozox_147",root__link:_S,"root--stickyButton":"_root--stickyButton_kozox_159"},gS=({data:{buttonLabel:n,label:r,layout:i},error:s,onChange:u,onClick:c,stickyButton:h})=>{const _=()=>{c&&c(!0)};return b.jsxs(H.Fieldset,{className:wn(rr.root,{[rr["root--stickyButton"]]:h}),children:[i?b.jsx(H.CheckboxInput,{onChange:u,id:"legal_checkbox",className:wn(rr.root__checkbox,{[rr["root--error"]]:s}),children:b.jsxs(H.Typography,{type:s?"detail-regular":"detail-medium",as:"p",children:[r," ",b.jsx(H.TextButton,{className:rr.root__link,onClick:_,size:"small",text:n,color:"deepPurple"})]})}):b.jsxs(H.Typography,{className:rr.root__text,type:s?"detail-regular":"detail-medium",as:"p",children:[r," ",b.jsx(H.TextButton,{className:rr.root__link,onClick:_,size:"small",text:n,color:"deepPurple"})]}),s&&b.jsx(H.Typography,{className:rr.root__error,type:"detail-bold",as:"p",children:s})]})},vS="_root_xdjsl_120",mS="_root__item_xdjsl_126",yS="_root__img_xdjsl_131",zo={root:vS,root__item:mS,root__img:yS},xS=({methods:n})=>b.jsx(H.Fieldset,{children:b.jsx("ul",{className:zo.root,children:n.map(({alt:r,id:i,src:s},u)=>b.jsx("li",{className:zo.root__item,children:b.jsx("img",{className:zo.root__img,src:s,alt:r})},`payments_${i}_${u}`))})}),bS="_root_esw59_120",TS={root:bS},wS=({label:n})=>b.jsx(H.Fieldset,{className:TS.root,children:b.jsx(H.Typography,{type:"body-regular",children:n})}),SS="_root_1mamo_120",ES={root:SS},CS=({onChange:n,selectablePills:r,selectedPills:i})=>b.jsx(H.Fieldset,{children:b.jsx(H.SelectablePillGroup,{className:ES.root,selectedItems:i,items:r,multiselect:!1,onChange:n})}),AS="_root_1ksq3_120",OS="_root__button_1ksq3_126",RS="_root__security_1ksq3_129",Qa={root:AS,root__button:OS,root__security:RS,"root--stickyButton":"_root--stickyButton_1ksq3_140"},IS=({data:{label:n,securityText:r},onSubmit:i,stickyButton:s})=>b.jsxs(H.Fieldset,{className:wn(Qa.root,{[Qa["root--stickyButton"]]:s}),children:[b.jsx(H.ButtonPrimary,{className:Qa.root__button,fullWidth:!0,size:"large",text:n,onClick:i}),b.jsxs(H.Typography,{type:"detail-medium",as:"p",className:wn(Qa.root__security),children:[b.jsx(H.Icon,{name:"privacy_lock_closed",size:"24"}),r]})]}),PS="_root_1mfs1_120",$S={root:PS},jS=({onChange:n,switcherToggle:r,value:i})=>b.jsx(H.SwitcherToggle,{className:$S.root,items:r,onChange:n,value:i}),ir=()=>Math.floor(Math.random()*65536).toString(16).padStart(4,"0"),NS=()=>`${ir()}${ir()}-${ir()}-${ir()}-${ir()}-${ir()}${ir()}${ir()}`,LS={monthly:"supporter_monthly",yearly:"supporter_yearly"},FS={monthly:2,yearly:3},MS=({amount:n,frequency:r,items:i})=>{const s=$y.useTrack(),u=_=>_.map(T=>({item_name:T.id,price:Number(T.value)})),c=N.useMemo(()=>({currency:"EUR",item_list_name:LS[r],items:u(i)}),[r]);N.useEffect(()=>{s("view_item_list",{ecommerce:{...c,value:n}})},[s,c]);const h=N.useCallback((_,T)=>{const y={...c,value:T};return _==="purchase"&&(y.transaction_id=NS()),{ecommerce:y}},[c]);return N.useCallback((_,T)=>{s(_,h(_,T))},[h,s])},kS=(n,r)=>{const i=FS[r]||"2",s=parseInt(n,10)*100;return`volunteer-${i}-${s}`},DS=({error:n,errorLegal:r,minValue:i})=>Wo.object({amount:Wo.number().min(i,{message:n}).int(),legalCheckbox:Wo.boolean().refine(s=>s===!0,{message:r})}),Td=({blocks:n,defaultSelectedToggle:r,fieldDescription:i,fieldErrors:s,guidelinesModalData:u,hero:c,layout:h,onError:_,onSubmit:T,scrollYTop:y=!1,stickyButton:R=!1})=>{const[V,U]=N.useState(r),[se,Ee]=N.useState(0),Be=DS(s[V]),me=Py.useOpenCheckout(),oe=(B=r)=>{const Ae=n.selectablePills[B].find(qe=>qe.isSelected);return Ae?[{id:Ae.id,value:Ae.value}]:[]},Te=()=>{const B=oe()[0];return B?i[B.id]:n.priceDescription.label},j=()=>{const B=oe()[0];return B?Number(B.value):0},D=MS({amount:se||j(),frequency:V,items:n.selectablePills[V]}),A=N.useCallback((B,Ae)=>{B==="thankyou_screen"&&D("purchase",Ae)},[D]),X=B=>{D("add_to_cart",B)},L=B=>{T(B)},ae=ST({initialValues:{amount:j(),fieldDescription:Te(),legalCheckbox:!n.legalCheckbox.layout,legalModalOpen:!1,selectedPills:oe(),selectedPillsTouched:!1,toggle:r},onSubmit:B=>{var qe;D("begin_checkout",B.amount);const Ae=((qe=B==null?void 0:B.selectedPills[0])==null?void 0:qe.id)||kS(`${B.amount}`,B.toggle);me({getHostedPage:async()=>await ns.postChargebeeCreate(Ae),layout:gu.IN_APP,onError:_,onLoaded:()=>X(B.amount),onStep:je=>A(je,B.amount),onSuccess:()=>L(B)})},validateOnBlur:!0,validateOnChange:!0,validationSchema:bd(Be)}),at=()=>{y&&R&&window.scrollTo({behavior:"smooth",top:0})},It=async(B,Ae,qe)=>{const je=B||n.selectablePills[Ae].filter(Xt=>Xt.value===qe)[0],_t=je?i[je.id]:n.priceDescription.label,Jt=je?[{id:je.id,value:je.value}]:[];await ae.setValues({...ae.values,amount:Number(qe),fieldDescription:_t,selectedPills:Jt},!0)},hn=B=>B[ae.values.toggle],pn=B=>{(async()=>(await It(B[0],ae.values.toggle,B[0].value),await ae.setTouched({selectedPillsTouched:!0},!0),D("view_item_list",Number(B[0].value))))()},Me=B=>{(async()=>(await It(null,ae.values.toggle,`${B}`),await ae.setTouched({amount:!0},!0),Ee(B)))()},Xe=B=>{(async()=>{U(B);const Ae=oe(B);if(!ae.touched.amount&&!ae.touched.selectedPillsTouched&&Ae.length){await It(Ae[0],B,Ae[0].value),await ae.setFieldValue("toggle",B,!0);return}await It(null,B,`${ae.values.amount}`),await ae.setFieldValue("toggle",B,!0)})()},pt=B=>{(async()=>await ae.setFieldValue("legalModalOpen",B))()},_n=B=>{(async()=>(!ae.touched.legalCheckbox&&await ae.setFieldTouched("legalCheckbox"),await ae.setFieldValue("legalCheckbox",B.target.checked,!0)))()},Pt=()=>{(async()=>(await ae.submitForm(),window.scrollY!==0&&at()))()};return b.jsxs("div",{className:wn({[Vo.root__stickyButton]:R}),children:[b.jsx(lS,{data:c}),b.jsxs("div",{className:Vo.root__body,children:[b.jsx(H.Form,{className:wn(Vo.root__form),children:h.map(B=>{const Ae=n[B];switch(B){case bn.headline:return b.jsx(N.Fragment,{children:b.jsx(oS,{data:Ae})},B);case bn.switcherToggle:return b.jsx(N.Fragment,{children:b.jsx(jS,{switcherToggle:Ae,onChange:Xe,value:ae.values.toggle})},B);case bn.selectablePills:return b.jsx(N.Fragment,{children:b.jsx(CS,{onChange:pn,selectablePills:hn(Ae),selectedPills:ae.values.selectedPills})},B);case bn.priceDescription:return b.jsx(N.Fragment,{children:b.jsx(wS,{label:ae.values.fieldDescription})},B);case bn.amountPicker:return b.jsx(N.Fragment,{children:b.jsx(Kw,{id:"amount",onChange:Me,value:ae.values.amount,errorMessage:ae.touched.amount&&ae.errors.amount||""})},B);case bn.legalCheckbox:return b.jsx(N.Fragment,{children:b.jsx(gS,{stickyButton:R,data:Ae,error:ae.touched.legalCheckbox?ae.errors.legalCheckbox:"",onClick:pt,onChange:_n})},B);case bn.submitButton:return b.jsx(N.Fragment,{children:b.jsx(IS,{stickyButton:R,data:Ae,onSubmit:Pt})},B);case bn.paymentMethods:return b.jsx(N.Fragment,{children:b.jsx(xS,{methods:Ae})},B);case bn.cta:return b.jsx(N.Fragment,{children:b.jsx(Qw,{data:Ae})},B);default:return null}})}),ae.values.legalModalOpen&&b.jsx(iS,{data:u,onClose:pt,open:ae.values.legalModalOpen})]})]})},BS=({block:n,isDesktop:r,onError:i,onSubmit:s})=>{const u=()=>{var j;return((j=n==null?void 0:n.layout)==null?void 0:j.map(D=>D==null?void 0:D.name))||[]},c=()=>{var j,D,A;return{alt:((j=n==null?void 0:n.heroImage)==null?void 0:j.alternativeText)||"",src:(D=n==null?void 0:n.heroImage)!=null&&D.url?`${ts.API.getBaseUrl()}${(A=n==null?void 0:n.heroImage)==null?void 0:A.url}`:""}},h=()=>{var j,D;return{headline:((j=n.headline)==null?void 0:j.headline)||"",subheadline:((D=n.headline)==null?void 0:D.subheadline)||""}},_=()=>{var j,D;return{label:((j=n.cta)==null?void 0:j.label)||"",url:((D=n.cta)==null?void 0:D.url)||""}},T=()=>n!=null&&n.paymentMethodLogos?n==null?void 0:n.paymentMethodLogos.map(j=>{var D;return{alt:(j==null?void 0:j.alternativeText)||"",id:((D=j==null?void 0:j.id)==null?void 0:D.toString())||"",src:`${ts.API.getBaseUrl()}${j==null?void 0:j.url}`}}):[],y=()=>({label:n.submitLabel||"",securityText:n.submitSecurityText||""}),R=()=>{var j,D,A;return{buttonLabel:((j=n.legalCheckbox)==null?void 0:j.legalButtonLabel)||"",label:((D=n.legalCheckbox)==null?void 0:D.label)||"",layout:(A=n.legalCheckbox)==null?void 0:A.layout}},V=()=>({label:n.priceDescription||""}),U=()=>{var D;const j={};return(D=n==null?void 0:n.switcherToggle)==null||D.map(A=>{var L;const X=`${A==null?void 0:A.identifier}`;X in j||(j[X]={error:(A==null?void 0:A.errorText)||"",errorLegal:((L=n.legalCheckbox)==null?void 0:L.errorText)||"",minValue:Number(A==null?void 0:A.minValue)||0})}),j},se=()=>{var j;return n!=null&&n.switcherToggle?(j=n==null?void 0:n.switcherToggle)==null?void 0:j.map(D=>({id:(D==null?void 0:D.identifier)||"",label:(D==null?void 0:D.label)||""})):[]},Ee=()=>{var D,A,X;const j=(D=n==null?void 0:n.switcherToggle)==null?void 0:D.find(L=>L==null?void 0:L.defaultSelected);return!j&&(n!=null&&n.switcherToggle)&&((A=n.switcherToggle[0])!=null&&A.identifier)?((X=n.switcherToggle[0])==null?void 0:X.identifier)||"":(j==null?void 0:j.identifier)||""},Be=()=>{var D;const j={};return(D=n==null?void 0:n.switcherToggle)==null||D.map(A=>{var X;(X=A==null?void 0:A.selectablePills)==null||X.map(L=>{const ae=`${L==null?void 0:L.chargebeeId}`;ae in j||(j[ae]=(L==null?void 0:L.description)||"")})}),j},me=()=>{var D;const j={};return(D=n==null?void 0:n.switcherToggle)==null||D.map(A=>{const X=`${A==null?void 0:A.identifier}`;X in j||(j[X]=((A==null?void 0:A.selectablePills)||[]).map(L=>({id:L==null?void 0:L.chargebeeId,isSelected:L==null?void 0:L.defaultSelected,label:(L==null?void 0:L.label)||"",popular:(L==null?void 0:L.popular)||"",style:"filled",value:(L==null?void 0:L.value)||"",variant:"large"})))}),j},oe=()=>{var at;const j=(at=n==null?void 0:n.legalCheckbox)==null?void 0:at.guidelinesModal,D=j==null?void 0:j.text;if(!D)return{buttonText:"",content:[[]],date:"",headline:"",version:""};const A=(j==null?void 0:j.closeModalButtonText)||"",X=(j==null?void 0:j.headline)||"",L=(j==null?void 0:j.data)||"",ae=(j==null?void 0:j.version)||"";return{buttonText:A,content:D,date:L,headline:X,version:ae}},Te=()=>({cta:_(),headline:h(),legalCheckbox:R(),paymentMethods:T(),priceDescription:V(),selectablePills:me(),submitButton:y(),switcherToggle:se()});return b.jsx(Td,{scrollYTop:n==null?void 0:n.scrollToTop,stickyButton:(n==null?void 0:n.stickyButton)&&!r,onError:i,onSubmit:s,layout:u(),hero:c(),defaultSelectedToggle:Ee(),blocks:Te(),fieldDescription:Be(),fieldErrors:U(),guidelinesModalData:oe()})},wd=n=>({body:(n==null?void 0:n.body)??"",cta:(n==null?void 0:n.cta)??""}),US="_root_yd0nb_120",Cf={root:US},ZS="https://hilfe.nebenan.de/hc/de",Sd=({body:n,cta:r})=>b.jsxs("div",{className:Cf.root,children:[b.jsx(H.Typography,{type:"body-regular",className:Cf.body,children:n}),b.jsx(H.TextButton,{href:ZS,text:r,color:"blue",size:"medium"})]}),WS="_root_e2sao_120",VS="_metadata_e2sao_127",zS="_markdown_e2sao_132",Ho={root:WS,metadata:VS,markdown:zS},Ed=({body:n,contactFooter:r,updateDate:i,version:s})=>{const u=s||i;return b.jsx("div",{children:b.jsxs("div",{className:Ho.root,children:[u&&b.jsxs("div",{className:Ho.metadata,children:[b.jsxs(H.Typography,{type:"body-regular",as:"span",children:["Version: ",s]}),b.jsx(H.Typography,{type:"body-regular",as:"span",children:i&&`${i}`})]}),u&&b.jsx(H.Divider,{}),b.jsx(Qi.MarkdownRichText,{text:n,className:Ho.markdown}),r&&r.body&&b.jsxs("div",{children:[b.jsx(H.Divider,{}),b.jsx(Sd,{body:r.body,cta:r.cta})]})]})})},HS=({block:n})=>{const r=(n==null?void 0:n.body)??"",i=(n==null?void 0:n.version)??"",s=(n==null?void 0:n.updateDate)??"",u=wd(n==null?void 0:n.contactFooter);return b.jsx(Ed,{body:r,contactFooter:u,version:i,updateDate:s})},GS="_root_nd1ee_120",YS="_staticHtml_nd1ee_124",Af={root:GS,staticHtml:YS},qS="_root_1w6ux_120",KS="_button_1w6ux_127",JS="_textButton_1w6ux_128",XS="_success_1w6ux_133",es={root:qS,button:KS,textButton:JS,success:XS},QS=N.createContext({pageMapping:[],pathName:"/",snowplowConfig:{collectorUrl:"",trackerConfiguration:{},version:""}});QS.Provider;const eE=(n,r,i)=>{const s=new Date;s.setTime(s.getTime()+i*24*60*60*1e3),document.cookie=`${n}=${r};expires=${s.toUTCString()};path=/`},tE=n=>{var s;const i=`; ${document.cookie}`.split(`; ${n}=`);if(i.length===2)return(s=i.pop())==null?void 0:s.split(";").shift()},nE=n=>{document.cookie=`${n}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`},rE=()=>{const n=N.useCallback(()=>!!tE("_sp_optout"),[]),r=N.useCallback(()=>{nE("_sp_optout")},[]),i=N.useCallback(()=>{eE("_sp_optout","1",724)},[]);return{isOptedOut:n,optIn:r,optOut:i}},iE="_root_6f9m3_120",aE={root:iE},sE=()=>{const[n,r]=N.useState(null),[i,s]=N.useState(!1),{isOptedOut:u,optIn:c,optOut:h}=rE();N.useEffect(()=>{ns.getProfile().then(y=>{r(y),s(y.allow_analytics)}).catch(y=>{console.error(y)})},[]);const _=()=>{ns.updateProfile({allow_analytics:!(n!=null&&n.allow_analytics)}).then(()=>{s(!i)}).catch(y=>{console.error(y)})},T=y=>{y.target.checked?c():h()};return b.jsxs("div",{className:aE.root,children:[b.jsx(H.Typography,{type:"h4",children:"Profil-Tracking deaktivieren"}),b.jsxs("div",{children:[b.jsx(H.Typography,{type:"body-regular",children:"Möchtest du das Profil-Tracking deaktivieren?"}),b.jsx(H.ToggleInput,{onChange:_,label:"Profil-Tracking",checked:i})]}),b.jsxs("div",{children:[b.jsx(H.Typography,{type:"body-regular",children:"Sie können der Verarbeitung Ihrer personenbezogenen Daten durch Snowplow Analytics jederzeit mittels des nachfolgenden Toggles widersprechen:"}),b.jsx(H.ToggleInput,{onChange:T,label:"Profil-Tracking",defaultChecked:!u()})]})]})},oE=({cta:n,portabilityBody:r,portabilityCta:i,portabilityTitle:s,title:u})=>{const{showConsentManager:c}=jy.useConsent(),[h,_]=N.useState(!1),T=()=>{ns.exportArchivedData().then(()=>{_(!0)}).catch(y=>{console.error(y)})};return b.jsxs("div",{className:es.root,children:[b.jsx(H.Typography,{type:"h2",children:u}),b.jsx(H.Divider,{}),b.jsx(H.ButtonPrimary,{text:n,className:es.button,onClick:c}),b.jsx(H.Divider,{}),b.jsx(sE,{}),b.jsx(H.Divider,{}),b.jsx(H.Typography,{type:"h4",children:s}),b.jsx(H.Typography,{type:"body-regular",children:r}),h?b.jsx(H.Typography,{type:"body-semibold",className:es.success,children:"Du erhältst in Kürze eine E-Mail mit dem Link zu deinem Archiv."}):b.jsx(H.TextButton,{onClick:T,className:es.textButton,color:"blue",size:"medium",text:i})]})},uE="_root_1h8ey_120",cE="_markdown_1h8ey_124",Of={root:uE,markdown:cE},lE=({body:n,title:r})=>b.jsxs("div",{className:Of.root,children:[b.jsx(H.Typography,{type:"h2",children:r}),b.jsx(Qi.MarkdownRichText,{className:Of.markdown,text:n})]}),Cd=({body:n,contactFooter:r,privacyOptions:i,protection:s})=>{const[u,c]=N.useState("");return N.useEffect(()=>{c(n)},[n]),b.jsxs("div",{className:Af.root,children:[b.jsx(Qi.HtmlContent,{className:Af.staticHtml,html:u}),b.jsx(H.Divider,{}),b.jsx(lE,{body:s.body,title:s.title}),b.jsx(H.Divider,{}),b.jsx(oE,{cta:i.cta,portabilityBody:i.portabilityBody,portabilityCta:i.portabilityCta,portabilityTitle:i.portabilityTitle,title:i.title}),b.jsx(H.Divider,{}),b.jsx(Sd,{body:r.body,cta:r.cta})]})},fE=({block:n})=>{const r=()=>{var _,T,y,R,V;return{cta:((_=n.privacyOptions)==null?void 0:_.cta)??"",portabilityBody:((T=n.privacyOptions)==null?void 0:T.portabilityBody)??"",portabilityCta:((y=n.privacyOptions)==null?void 0:y.portabilityCta)??"",portabilityTitle:((R=n.privacyOptions)==null?void 0:R.portabilityTitle)??"",title:((V=n.privacyOptions)==null?void 0:V.title)??""}},i=()=>{var _,T;return{body:((_=n.protection)==null?void 0:_.body)??"",title:((T=n.protection)==null?void 0:T.title)??""}},s=(n==null?void 0:n.body)??"",u=wd(n==null?void 0:n.contactFooter),c=r(),h=i();return b.jsx(Cd,{body:s,contactFooter:u,privacyOptions:c,protection:h})},dE="_root_iby5v_120",hE={root:dE},Rf=({title:n})=>n?b.jsxs(b.Fragment,{children:[b.jsx(H.CardHeader,{className:hE.root,as:"h2",headline:n}),b.jsx(H.Divider,{})]}):null,pE="_root_13vwj_120",_E={root:pE},gE=({dynamicContent:n,onError:r,onSubmit:i})=>{var u;const s=Dy(800);return b.jsxs(H.Card,{borderRadius:s,withoutPadding:!0,allowedElement:Rf,className:_E.root,children:[b.jsx(Rf,{title:(u=n==null?void 0:n.cardHeader)==null?void 0:u.title}),b.jsx(H.CardBody,{withoutPadding:!0,children:n&&n.blocks.map((c,h)=>{switch(c.__component){case"core-components.sponsor-card":return b.jsx(BS,{block:c,isDesktop:s,onError:r??(()=>console.log("Error in SponsorCardForm")),onSubmit:i??(()=>console.log("Submit in SponsorCardForm"))},`${c.__component}_${h}`);case"core-components.persuasion-image-set":return b.jsx(d0,{block:c},`${c.__component}_${h}`);case"core-components.persuasion-content":return b.jsx(a0,{block:c},`${c.__component}_${h}`);case"core-components.legal":return b.jsx(HS,{block:c},`${c.__component}_${h}`);case"core-components.privacy":return b.jsx(fE,{block:c},`${c.__component}_${h}`)}})})]})};exports.DynamicRenderer=gE;exports.LAYOUT_BLOCK=bn;exports.Layout=gu;exports.Legal=Ed;exports.Privacy=Cd;exports.SponsorCardForm=Td;
|
|
72
|
+
`)}function ET(n){var r={};if(n.inner){if(n.inner.length===0)return Cr(r,n.path,n.message);for(var u=n.inner,i=Array.isArray(u),s=0,u=i?u:u[Symbol.iterator]();;){var c;if(i){if(s>=u.length)break;c=u[s++]}else{if(s=u.next(),s.done)break;c=s.value}var h=c;Dt(r,h.path)||(r=Cr(r,h.path,h.message))}}return r}function CT(n,r,i,s){i===void 0&&(i=!1);var u=tu(n);return r[i?"validateSync":"validate"](u,{abortEarly:!1,context:u})}function tu(n){var r=Array.isArray(n)?[]:{};for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var s=String(i);Array.isArray(n[s])===!0?r[s]=n[s].map(function(u){return Array.isArray(u)===!0||zl(u)?tu(u):u!==""?u:void 0}):zl(n[s])?r[s]=tu(n[s]):r[s]=n[s]!==""?n[s]:void 0}return r}function AT(n,r,i){var s=n.slice();return r.forEach(function(c,h){if(typeof s[h]>"u"){var _=i.clone!==!1,T=_&&i.isMergeableObject(c);s[h]=T?Yo(Array.isArray(c)?[]:{},c,i):c}else i.isMergeableObject(c)?s[h]=Yo(n[h],c,i):n.indexOf(c)===-1&&s.push(c)}),s}function OT(n){return Array.from(n).filter(function(r){return r.selected}).map(function(r){return r.value})}function RT(n,r,i){if(typeof n=="boolean")return!!r;var s=[],u=!1,c=-1;if(Array.isArray(n))s=n,c=n.indexOf(i),u=c>=0;else if(!i||i=="true"||i=="false")return!!r;return r&&i&&!u?s.concat(i):u?s.slice(0,c).concat(s.slice(c+1)):s}var IT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?N.useLayoutEffect:N.useEffect;function Kt(n){var r=N.useRef(n);return IT(function(){r.current=n}),N.useCallback(function(){for(var i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return r.current.apply(void 0,s)},[])}var PT=N.forwardRef(function(n,r){var i=n.action,s=sd(n,["action"]),u=i??"#",c=xT(),h=c.handleReset,_=c.handleSubmit;return N.createElement("form",it({onSubmit:_,ref:r,onReset:h,action:u},s))});PT.displayName="Form";var Se;(function(n){n.assertEqual=u=>u;function r(u){}n.assertIs=r;function i(u){throw new Error}n.assertNever=i,n.arrayToEnum=u=>{const c={};for(const h of u)c[h]=h;return c},n.getValidEnumValues=u=>{const c=n.objectKeys(u).filter(_=>typeof u[u[_]]!="number"),h={};for(const _ of c)h[_]=u[_];return n.objectValues(h)},n.objectValues=u=>n.objectKeys(u).map(function(c){return u[c]}),n.objectKeys=typeof Object.keys=="function"?u=>Object.keys(u):u=>{const c=[];for(const h in u)Object.prototype.hasOwnProperty.call(u,h)&&c.push(h);return c},n.find=(u,c)=>{for(const h of u)if(c(h))return h},n.isInteger=typeof Number.isInteger=="function"?u=>Number.isInteger(u):u=>typeof u=="number"&&isFinite(u)&&Math.floor(u)===u;function s(u,c=" | "){return u.map(h=>typeof h=="string"?`'${h}'`:h).join(c)}n.joinValues=s,n.jsonStringifyReplacer=(u,c)=>typeof c=="bigint"?c.toString():c})(Se||(Se={}));var nu;(function(n){n.mergeShapes=(r,i)=>({...r,...i})})(nu||(nu={}));const W=Se.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Zn=n=>{switch(typeof n){case"undefined":return W.undefined;case"string":return W.string;case"number":return isNaN(n)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":return Array.isArray(n)?W.array:n===null?W.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?W.promise:typeof Map<"u"&&n instanceof Map?W.map:typeof Set<"u"&&n instanceof Set?W.set:typeof Date<"u"&&n instanceof Date?W.date:W.object;default:return W.unknown}},$=Se.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$T=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");class Bt extends Error{get errors(){return this.issues}constructor(r){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=r}format(r){const i=r||function(c){return c.message},s={_errors:[]},u=c=>{for(const h of c.issues)if(h.code==="invalid_union")h.unionErrors.map(u);else if(h.code==="invalid_return_type")u(h.returnTypeError);else if(h.code==="invalid_arguments")u(h.argumentsError);else if(h.path.length===0)s._errors.push(i(h));else{let _=s,T=0;for(;T<h.path.length;){const y=h.path[T];T===h.path.length-1?(_[y]=_[y]||{_errors:[]},_[y]._errors.push(i(h))):_[y]=_[y]||{_errors:[]},_=_[y],T++}}};return u(this),s}static assert(r){if(!(r instanceof Bt))throw new Error(`Not a ZodError: ${r}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Se.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(r=i=>i.message){const i={},s=[];for(const u of this.issues)u.path.length>0?(i[u.path[0]]=i[u.path[0]]||[],i[u.path[0]].push(r(u))):s.push(r(u));return{formErrors:s,fieldErrors:i}}get formErrors(){return this.flatten()}}Bt.create=n=>new Bt(n);const ai=(n,r)=>{let i;switch(n.code){case $.invalid_type:n.received===W.undefined?i="Required":i=`Expected ${n.expected}, received ${n.received}`;break;case $.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(n.expected,Se.jsonStringifyReplacer)}`;break;case $.unrecognized_keys:i=`Unrecognized key(s) in object: ${Se.joinValues(n.keys,", ")}`;break;case $.invalid_union:i="Invalid input";break;case $.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${Se.joinValues(n.options)}`;break;case $.invalid_enum_value:i=`Invalid enum value. Expected ${Se.joinValues(n.options)}, received '${n.received}'`;break;case $.invalid_arguments:i="Invalid function arguments";break;case $.invalid_return_type:i="Invalid function return type";break;case $.invalid_date:i="Invalid date";break;case $.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(i=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?i=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?i=`Invalid input: must end with "${n.validation.endsWith}"`:Se.assertNever(n.validation):n.validation!=="regex"?i=`Invalid ${n.validation}`:i="Invalid";break;case $.too_small:n.type==="array"?i=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?i=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?i=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?i=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:i="Invalid input";break;case $.too_big:n.type==="array"?i=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?i=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?i=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?i=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?i=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:i="Invalid input";break;case $.custom:i="Invalid input";break;case $.invalid_intersection_types:i="Intersection results could not be merged";break;case $.not_multiple_of:i=`Number must be a multiple of ${n.multipleOf}`;break;case $.not_finite:i="Number must be finite";break;default:i=r.defaultError,Se.assertNever(n)}return{message:i}};let ud=ai;function jT(n){ud=n}function as(){return ud}const ss=n=>{const{data:r,path:i,errorMaps:s,issueData:u}=n,c=[...i,...u.path||[]],h={...u,path:c};if(u.message!==void 0)return{...u,path:c,message:u.message};let _="";const T=s.filter(y=>!!y).slice().reverse();for(const y of T)_=y(h,{data:r,defaultError:_}).message;return{...u,path:c,message:_}},NT=[];function k(n,r){const i=as(),s=ss({issueData:r,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,i,i===ai?void 0:ai].filter(u=>!!u)});n.common.issues.push(s)}class ht{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(r,i){const s=[];for(const u of i){if(u.status==="aborted")return ie;u.status==="dirty"&&r.dirty(),s.push(u.value)}return{status:r.value,value:s}}static async mergeObjectAsync(r,i){const s=[];for(const u of i){const c=await u.key,h=await u.value;s.push({key:c,value:h})}return ht.mergeObjectSync(r,s)}static mergeObjectSync(r,i){const s={};for(const u of i){const{key:c,value:h}=u;if(c.status==="aborted"||h.status==="aborted")return ie;c.status==="dirty"&&r.dirty(),h.status==="dirty"&&r.dirty(),c.value!=="__proto__"&&(typeof h.value<"u"||u.alwaysSet)&&(s[c.value]=h.value)}return{status:r.value,value:s}}}const ie=Object.freeze({status:"aborted"}),ni=n=>({status:"dirty",value:n}),Tt=n=>({status:"valid",value:n}),ru=n=>n.status==="aborted",iu=n=>n.status==="dirty",Ir=n=>n.status==="valid",Bi=n=>typeof Promise<"u"&&n instanceof Promise;function os(n,r,i,s){if(typeof r=="function"?n!==r||!0:!r.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r.get(n)}function cd(n,r,i,s,u){if(typeof r=="function"?n!==r||!0:!r.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r.set(n,i),i}var J;(function(n){n.errToObj=r=>typeof r=="string"?{message:r}:r||{},n.toString=r=>typeof r=="string"?r:r==null?void 0:r.message})(J||(J={}));var ji,Ni;class Sn{constructor(r,i,s,u){this._cachedPath=[],this.parent=r,this.data=i,this._path=s,this._key=u}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Tf=(n,r)=>{if(Ir(r))return{success:!0,data:r.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new Bt(n.common.issues);return this._error=i,this._error}}};function fe(n){if(!n)return{};const{errorMap:r,invalid_type_error:i,required_error:s,description:u}=n;if(r&&(i||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return r?{errorMap:r,description:u}:{errorMap:(h,_)=>{var T,y;const{message:R}=n;return h.code==="invalid_enum_value"?{message:R??_.defaultError}:typeof _.data>"u"?{message:(T=R??s)!==null&&T!==void 0?T:_.defaultError}:h.code!=="invalid_type"?{message:_.defaultError}:{message:(y=R??i)!==null&&y!==void 0?y:_.defaultError}},description:u}}class _e{get description(){return this._def.description}_getType(r){return Zn(r.data)}_getOrReturnCtx(r,i){return i||{common:r.parent.common,data:r.data,parsedType:Zn(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}_processInputParams(r){return{status:new ht,ctx:{common:r.parent.common,data:r.data,parsedType:Zn(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}}_parseSync(r){const i=this._parse(r);if(Bi(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(r){const i=this._parse(r);return Promise.resolve(i)}parse(r,i){const s=this.safeParse(r,i);if(s.success)return s.data;throw s.error}safeParse(r,i){var s;const u={common:{issues:[],async:(s=i==null?void 0:i.async)!==null&&s!==void 0?s:!1,contextualErrorMap:i==null?void 0:i.errorMap},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:Zn(r)},c=this._parseSync({data:r,path:u.path,parent:u});return Tf(u,c)}"~validate"(r){var i,s;const u={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:Zn(r)};if(!this["~standard"].async)try{const c=this._parseSync({data:r,path:[],parent:u});return Ir(c)?{value:c.value}:{issues:u.common.issues}}catch(c){!((s=(i=c==null?void 0:c.message)===null||i===void 0?void 0:i.toLowerCase())===null||s===void 0)&&s.includes("encountered")&&(this["~standard"].async=!0),u.common={issues:[],async:!0}}return this._parseAsync({data:r,path:[],parent:u}).then(c=>Ir(c)?{value:c.value}:{issues:u.common.issues})}async parseAsync(r,i){const s=await this.safeParseAsync(r,i);if(s.success)return s.data;throw s.error}async safeParseAsync(r,i){const s={common:{issues:[],contextualErrorMap:i==null?void 0:i.errorMap,async:!0},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:Zn(r)},u=this._parse({data:r,path:s.path,parent:s}),c=await(Bi(u)?u:Promise.resolve(u));return Tf(s,c)}refine(r,i){const s=u=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(u):i;return this._refinement((u,c)=>{const h=r(u),_=()=>c.addIssue({code:$.custom,...s(u)});return typeof Promise<"u"&&h instanceof Promise?h.then(T=>T?!0:(_(),!1)):h?!0:(_(),!1)})}refinement(r,i){return this._refinement((s,u)=>r(s)?!0:(u.addIssue(typeof i=="function"?i(s,u):i),!1))}_refinement(r){return new dn({schema:this,typeName:ne.ZodEffects,effect:{type:"refinement",refinement:r}})}superRefine(r){return this._refinement(r)}constructor(r){this.spa=this.safeParseAsync,this._def=r,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:i=>this["~validate"](i)}}optional(){return Tn.create(this,this._def)}nullable(){return cr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fn.create(this)}promise(){return oi.create(this,this._def)}or(r){return Vi.create([this,r],this._def)}and(r){return zi.create(this,r,this._def)}transform(r){return new dn({...fe(this._def),schema:this,typeName:ne.ZodEffects,effect:{type:"transform",transform:r}})}default(r){const i=typeof r=="function"?r:()=>r;return new Ki({...fe(this._def),innerType:this,defaultValue:i,typeName:ne.ZodDefault})}brand(){return new _u({typeName:ne.ZodBranded,type:this,...fe(this._def)})}catch(r){const i=typeof r=="function"?r:()=>r;return new Ji({...fe(this._def),innerType:this,catchValue:i,typeName:ne.ZodCatch})}describe(r){const i=this.constructor;return new i({...this._def,description:r})}pipe(r){return na.create(this,r)}readonly(){return Xi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const LT=/^c[^\s-]{8,}$/i,FT=/^[0-9a-z]+$/,MT=/^[0-9A-HJKMNP-TV-Z]{26}$/i,kT=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,DT=/^[a-z0-9_-]{21}$/i,BT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,UT=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ZT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,WT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Zo;const VT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,HT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,GT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,YT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,qT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ld="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",KT=new RegExp(`^${ld}$`);function fd(n){let r="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?r=`${r}\\.\\d{${n.precision}}`:n.precision==null&&(r=`${r}(\\.\\d+)?`),r}function JT(n){return new RegExp(`^${fd(n)}$`)}function dd(n){let r=`${ld}T${fd(n)}`;const i=[];return i.push(n.local?"Z?":"Z"),n.offset&&i.push("([+-]\\d{2}:?\\d{2})"),r=`${r}(${i.join("|")})`,new RegExp(`^${r}$`)}function XT(n,r){return!!((r==="v4"||!r)&&VT.test(n)||(r==="v6"||!r)&&HT.test(n))}function QT(n,r){if(!BT.test(n))return!1;try{const[i]=n.split("."),s=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(i.length+(4-i.length%4)%4,"="),u=JSON.parse(atob(s));return!(typeof u!="object"||u===null||!u.typ||!u.alg||r&&u.alg!==r)}catch{return!1}}function ew(n,r){return!!((r==="v4"||!r)&&zT.test(n)||(r==="v6"||!r)&>.test(n))}class ln extends _e{_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==W.string){const c=this._getOrReturnCtx(r);return k(c,{code:$.invalid_type,expected:W.string,received:c.parsedType}),ie}const s=new ht;let u;for(const c of this._def.checks)if(c.kind==="min")r.data.length<c.value&&(u=this._getOrReturnCtx(r,u),k(u,{code:$.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),s.dirty());else if(c.kind==="max")r.data.length>c.value&&(u=this._getOrReturnCtx(r,u),k(u,{code:$.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),s.dirty());else if(c.kind==="length"){const h=r.data.length>c.value,_=r.data.length<c.value;(h||_)&&(u=this._getOrReturnCtx(r,u),h?k(u,{code:$.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):_&&k(u,{code:$.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),s.dirty())}else if(c.kind==="email")ZT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"email",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="emoji")Zo||(Zo=new RegExp(WT,"u")),Zo.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"emoji",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="uuid")kT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"uuid",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="nanoid")DT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"nanoid",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="cuid")LT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"cuid",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="cuid2")FT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"cuid2",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="ulid")MT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"ulid",code:$.invalid_string,message:c.message}),s.dirty());else if(c.kind==="url")try{new URL(r.data)}catch{u=this._getOrReturnCtx(r,u),k(u,{validation:"url",code:$.invalid_string,message:c.message}),s.dirty()}else c.kind==="regex"?(c.regex.lastIndex=0,c.regex.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"regex",code:$.invalid_string,message:c.message}),s.dirty())):c.kind==="trim"?r.data=r.data.trim():c.kind==="includes"?r.data.includes(c.value,c.position)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),s.dirty()):c.kind==="toLowerCase"?r.data=r.data.toLowerCase():c.kind==="toUpperCase"?r.data=r.data.toUpperCase():c.kind==="startsWith"?r.data.startsWith(c.value)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:{startsWith:c.value},message:c.message}),s.dirty()):c.kind==="endsWith"?r.data.endsWith(c.value)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:{endsWith:c.value},message:c.message}),s.dirty()):c.kind==="datetime"?dd(c).test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:"datetime",message:c.message}),s.dirty()):c.kind==="date"?KT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:"date",message:c.message}),s.dirty()):c.kind==="time"?JT(c).test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{code:$.invalid_string,validation:"time",message:c.message}),s.dirty()):c.kind==="duration"?UT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"duration",code:$.invalid_string,message:c.message}),s.dirty()):c.kind==="ip"?XT(r.data,c.version)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"ip",code:$.invalid_string,message:c.message}),s.dirty()):c.kind==="jwt"?QT(r.data,c.alg)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"jwt",code:$.invalid_string,message:c.message}),s.dirty()):c.kind==="cidr"?ew(r.data,c.version)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"cidr",code:$.invalid_string,message:c.message}),s.dirty()):c.kind==="base64"?YT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"base64",code:$.invalid_string,message:c.message}),s.dirty()):c.kind==="base64url"?qT.test(r.data)||(u=this._getOrReturnCtx(r,u),k(u,{validation:"base64url",code:$.invalid_string,message:c.message}),s.dirty()):Se.assertNever(c);return{status:s.value,value:r.data}}_regex(r,i,s){return this.refinement(u=>r.test(u),{validation:i,code:$.invalid_string,...J.errToObj(s)})}_addCheck(r){return new ln({...this._def,checks:[...this._def.checks,r]})}email(r){return this._addCheck({kind:"email",...J.errToObj(r)})}url(r){return this._addCheck({kind:"url",...J.errToObj(r)})}emoji(r){return this._addCheck({kind:"emoji",...J.errToObj(r)})}uuid(r){return this._addCheck({kind:"uuid",...J.errToObj(r)})}nanoid(r){return this._addCheck({kind:"nanoid",...J.errToObj(r)})}cuid(r){return this._addCheck({kind:"cuid",...J.errToObj(r)})}cuid2(r){return this._addCheck({kind:"cuid2",...J.errToObj(r)})}ulid(r){return this._addCheck({kind:"ulid",...J.errToObj(r)})}base64(r){return this._addCheck({kind:"base64",...J.errToObj(r)})}base64url(r){return this._addCheck({kind:"base64url",...J.errToObj(r)})}jwt(r){return this._addCheck({kind:"jwt",...J.errToObj(r)})}ip(r){return this._addCheck({kind:"ip",...J.errToObj(r)})}cidr(r){return this._addCheck({kind:"cidr",...J.errToObj(r)})}datetime(r){var i,s;return typeof r=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:r}):this._addCheck({kind:"datetime",precision:typeof(r==null?void 0:r.precision)>"u"?null:r==null?void 0:r.precision,offset:(i=r==null?void 0:r.offset)!==null&&i!==void 0?i:!1,local:(s=r==null?void 0:r.local)!==null&&s!==void 0?s:!1,...J.errToObj(r==null?void 0:r.message)})}date(r){return this._addCheck({kind:"date",message:r})}time(r){return typeof r=="string"?this._addCheck({kind:"time",precision:null,message:r}):this._addCheck({kind:"time",precision:typeof(r==null?void 0:r.precision)>"u"?null:r==null?void 0:r.precision,...J.errToObj(r==null?void 0:r.message)})}duration(r){return this._addCheck({kind:"duration",...J.errToObj(r)})}regex(r,i){return this._addCheck({kind:"regex",regex:r,...J.errToObj(i)})}includes(r,i){return this._addCheck({kind:"includes",value:r,position:i==null?void 0:i.position,...J.errToObj(i==null?void 0:i.message)})}startsWith(r,i){return this._addCheck({kind:"startsWith",value:r,...J.errToObj(i)})}endsWith(r,i){return this._addCheck({kind:"endsWith",value:r,...J.errToObj(i)})}min(r,i){return this._addCheck({kind:"min",value:r,...J.errToObj(i)})}max(r,i){return this._addCheck({kind:"max",value:r,...J.errToObj(i)})}length(r,i){return this._addCheck({kind:"length",value:r,...J.errToObj(i)})}nonempty(r){return this.min(1,J.errToObj(r))}trim(){return new ln({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ln({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ln({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(r=>r.kind==="datetime")}get isDate(){return!!this._def.checks.find(r=>r.kind==="date")}get isTime(){return!!this._def.checks.find(r=>r.kind==="time")}get isDuration(){return!!this._def.checks.find(r=>r.kind==="duration")}get isEmail(){return!!this._def.checks.find(r=>r.kind==="email")}get isURL(){return!!this._def.checks.find(r=>r.kind==="url")}get isEmoji(){return!!this._def.checks.find(r=>r.kind==="emoji")}get isUUID(){return!!this._def.checks.find(r=>r.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(r=>r.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(r=>r.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(r=>r.kind==="cuid2")}get isULID(){return!!this._def.checks.find(r=>r.kind==="ulid")}get isIP(){return!!this._def.checks.find(r=>r.kind==="ip")}get isCIDR(){return!!this._def.checks.find(r=>r.kind==="cidr")}get isBase64(){return!!this._def.checks.find(r=>r.kind==="base64")}get isBase64url(){return!!this._def.checks.find(r=>r.kind==="base64url")}get minLength(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxLength(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}}ln.create=n=>{var r;return new ln({checks:[],typeName:ne.ZodString,coerce:(r=n==null?void 0:n.coerce)!==null&&r!==void 0?r:!1,...fe(n)})};function tw(n,r){const i=(n.toString().split(".")[1]||"").length,s=(r.toString().split(".")[1]||"").length,u=i>s?i:s,c=parseInt(n.toFixed(u).replace(".","")),h=parseInt(r.toFixed(u).replace(".",""));return c%h/Math.pow(10,u)}class sr extends _e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(r){if(this._def.coerce&&(r.data=Number(r.data)),this._getType(r)!==W.number){const c=this._getOrReturnCtx(r);return k(c,{code:$.invalid_type,expected:W.number,received:c.parsedType}),ie}let s;const u=new ht;for(const c of this._def.checks)c.kind==="int"?Se.isInteger(r.data)||(s=this._getOrReturnCtx(r,s),k(s,{code:$.invalid_type,expected:"integer",received:"float",message:c.message}),u.dirty()):c.kind==="min"?(c.inclusive?r.data<c.value:r.data<=c.value)&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.too_small,minimum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),u.dirty()):c.kind==="max"?(c.inclusive?r.data>c.value:r.data>=c.value)&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),u.dirty()):c.kind==="multipleOf"?tw(r.data,c.value)!==0&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.not_multiple_of,multipleOf:c.value,message:c.message}),u.dirty()):c.kind==="finite"?Number.isFinite(r.data)||(s=this._getOrReturnCtx(r,s),k(s,{code:$.not_finite,message:c.message}),u.dirty()):Se.assertNever(c);return{status:u.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,J.toString(i))}gt(r,i){return this.setLimit("min",r,!1,J.toString(i))}lte(r,i){return this.setLimit("max",r,!0,J.toString(i))}lt(r,i){return this.setLimit("max",r,!1,J.toString(i))}setLimit(r,i,s,u){return new sr({...this._def,checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:J.toString(u)}]})}_addCheck(r){return new sr({...this._def,checks:[...this._def.checks,r]})}int(r){return this._addCheck({kind:"int",message:J.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:J.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:J.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:J.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:J.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:J.toString(i)})}finite(r){return this._addCheck({kind:"finite",message:J.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:J.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:J.toString(r)})}get minValue(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}get isInt(){return!!this._def.checks.find(r=>r.kind==="int"||r.kind==="multipleOf"&&Se.isInteger(r.value))}get isFinite(){let r=null,i=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(i===null||s.value>i)&&(i=s.value):s.kind==="max"&&(r===null||s.value<r)&&(r=s.value)}return Number.isFinite(i)&&Number.isFinite(r)}}sr.create=n=>new sr({checks:[],typeName:ne.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...fe(n)});class or extends _e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(r){if(this._def.coerce)try{r.data=BigInt(r.data)}catch{return this._getInvalidInput(r)}if(this._getType(r)!==W.bigint)return this._getInvalidInput(r);let s;const u=new ht;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?r.data<c.value:r.data<=c.value)&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),u.dirty()):c.kind==="max"?(c.inclusive?r.data>c.value:r.data>=c.value)&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),u.dirty()):c.kind==="multipleOf"?r.data%c.value!==BigInt(0)&&(s=this._getOrReturnCtx(r,s),k(s,{code:$.not_multiple_of,multipleOf:c.value,message:c.message}),u.dirty()):Se.assertNever(c);return{status:u.value,value:r.data}}_getInvalidInput(r){const i=this._getOrReturnCtx(r);return k(i,{code:$.invalid_type,expected:W.bigint,received:i.parsedType}),ie}gte(r,i){return this.setLimit("min",r,!0,J.toString(i))}gt(r,i){return this.setLimit("min",r,!1,J.toString(i))}lte(r,i){return this.setLimit("max",r,!0,J.toString(i))}lt(r,i){return this.setLimit("max",r,!1,J.toString(i))}setLimit(r,i,s,u){return new or({...this._def,checks:[...this._def.checks,{kind:r,value:i,inclusive:s,message:J.toString(u)}]})}_addCheck(r){return new or({...this._def,checks:[...this._def.checks,r]})}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:J.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:J.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:J.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:J.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:J.toString(i)})}get minValue(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}}or.create=n=>{var r;return new or({checks:[],typeName:ne.ZodBigInt,coerce:(r=n==null?void 0:n.coerce)!==null&&r!==void 0?r:!1,...fe(n)})};class Ui extends _e{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==W.boolean){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.boolean,received:s.parsedType}),ie}return Tt(r.data)}}Ui.create=n=>new Ui({typeName:ne.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...fe(n)});class Pr extends _e{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==W.date){const c=this._getOrReturnCtx(r);return k(c,{code:$.invalid_type,expected:W.date,received:c.parsedType}),ie}if(isNaN(r.data.getTime())){const c=this._getOrReturnCtx(r);return k(c,{code:$.invalid_date}),ie}const s=new ht;let u;for(const c of this._def.checks)c.kind==="min"?r.data.getTime()<c.value&&(u=this._getOrReturnCtx(r,u),k(u,{code:$.too_small,message:c.message,inclusive:!0,exact:!1,minimum:c.value,type:"date"}),s.dirty()):c.kind==="max"?r.data.getTime()>c.value&&(u=this._getOrReturnCtx(r,u),k(u,{code:$.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),s.dirty()):Se.assertNever(c);return{status:s.value,value:new Date(r.data.getTime())}}_addCheck(r){return new Pr({...this._def,checks:[...this._def.checks,r]})}min(r,i){return this._addCheck({kind:"min",value:r.getTime(),message:J.toString(i)})}max(r,i){return this._addCheck({kind:"max",value:r.getTime(),message:J.toString(i)})}get minDate(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r!=null?new Date(r):null}get maxDate(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r!=null?new Date(r):null}}Pr.create=n=>new Pr({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:ne.ZodDate,...fe(n)});class us extends _e{_parse(r){if(this._getType(r)!==W.symbol){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.symbol,received:s.parsedType}),ie}return Tt(r.data)}}us.create=n=>new us({typeName:ne.ZodSymbol,...fe(n)});class Zi extends _e{_parse(r){if(this._getType(r)!==W.undefined){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.undefined,received:s.parsedType}),ie}return Tt(r.data)}}Zi.create=n=>new Zi({typeName:ne.ZodUndefined,...fe(n)});class Wi extends _e{_parse(r){if(this._getType(r)!==W.null){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.null,received:s.parsedType}),ie}return Tt(r.data)}}Wi.create=n=>new Wi({typeName:ne.ZodNull,...fe(n)});class si extends _e{constructor(){super(...arguments),this._any=!0}_parse(r){return Tt(r.data)}}si.create=n=>new si({typeName:ne.ZodAny,...fe(n)});class Ar extends _e{constructor(){super(...arguments),this._unknown=!0}_parse(r){return Tt(r.data)}}Ar.create=n=>new Ar({typeName:ne.ZodUnknown,...fe(n)});class Wn extends _e{_parse(r){const i=this._getOrReturnCtx(r);return k(i,{code:$.invalid_type,expected:W.never,received:i.parsedType}),ie}}Wn.create=n=>new Wn({typeName:ne.ZodNever,...fe(n)});class cs extends _e{_parse(r){if(this._getType(r)!==W.undefined){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.void,received:s.parsedType}),ie}return Tt(r.data)}}cs.create=n=>new cs({typeName:ne.ZodVoid,...fe(n)});class fn extends _e{_parse(r){const{ctx:i,status:s}=this._processInputParams(r),u=this._def;if(i.parsedType!==W.array)return k(i,{code:$.invalid_type,expected:W.array,received:i.parsedType}),ie;if(u.exactLength!==null){const h=i.data.length>u.exactLength.value,_=i.data.length<u.exactLength.value;(h||_)&&(k(i,{code:h?$.too_big:$.too_small,minimum:_?u.exactLength.value:void 0,maximum:h?u.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:u.exactLength.message}),s.dirty())}if(u.minLength!==null&&i.data.length<u.minLength.value&&(k(i,{code:$.too_small,minimum:u.minLength.value,type:"array",inclusive:!0,exact:!1,message:u.minLength.message}),s.dirty()),u.maxLength!==null&&i.data.length>u.maxLength.value&&(k(i,{code:$.too_big,maximum:u.maxLength.value,type:"array",inclusive:!0,exact:!1,message:u.maxLength.message}),s.dirty()),i.common.async)return Promise.all([...i.data].map((h,_)=>u.type._parseAsync(new Sn(i,h,i.path,_)))).then(h=>ht.mergeArray(s,h));const c=[...i.data].map((h,_)=>u.type._parseSync(new Sn(i,h,i.path,_)));return ht.mergeArray(s,c)}get element(){return this._def.type}min(r,i){return new fn({...this._def,minLength:{value:r,message:J.toString(i)}})}max(r,i){return new fn({...this._def,maxLength:{value:r,message:J.toString(i)}})}length(r,i){return new fn({...this._def,exactLength:{value:r,message:J.toString(i)}})}nonempty(r){return this.min(1,r)}}fn.create=(n,r)=>new fn({type:n,minLength:null,maxLength:null,exactLength:null,typeName:ne.ZodArray,...fe(r)});function ei(n){if(n instanceof He){const r={};for(const i in n.shape){const s=n.shape[i];r[i]=Tn.create(ei(s))}return new He({...n._def,shape:()=>r})}else return n instanceof fn?new fn({...n._def,type:ei(n.element)}):n instanceof Tn?Tn.create(ei(n.unwrap())):n instanceof cr?cr.create(ei(n.unwrap())):n instanceof En?En.create(n.items.map(r=>ei(r))):n}class He extends _e{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const r=this._def.shape(),i=Se.objectKeys(r);return this._cached={shape:r,keys:i}}_parse(r){if(this._getType(r)!==W.object){const y=this._getOrReturnCtx(r);return k(y,{code:$.invalid_type,expected:W.object,received:y.parsedType}),ie}const{status:s,ctx:u}=this._processInputParams(r),{shape:c,keys:h}=this._getCached(),_=[];if(!(this._def.catchall instanceof Wn&&this._def.unknownKeys==="strip"))for(const y in u.data)h.includes(y)||_.push(y);const T=[];for(const y of h){const R=c[y],V=u.data[y];T.push({key:{status:"valid",value:y},value:R._parse(new Sn(u,V,u.path,y)),alwaysSet:y in u.data})}if(this._def.catchall instanceof Wn){const y=this._def.unknownKeys;if(y==="passthrough")for(const R of _)T.push({key:{status:"valid",value:R},value:{status:"valid",value:u.data[R]}});else if(y==="strict")_.length>0&&(k(u,{code:$.unrecognized_keys,keys:_}),s.dirty());else if(y!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const y=this._def.catchall;for(const R of _){const V=u.data[R];T.push({key:{status:"valid",value:R},value:y._parse(new Sn(u,V,u.path,R)),alwaysSet:R in u.data})}}return u.common.async?Promise.resolve().then(async()=>{const y=[];for(const R of T){const V=await R.key,U=await R.value;y.push({key:V,value:U,alwaysSet:R.alwaysSet})}return y}).then(y=>ht.mergeObjectSync(s,y)):ht.mergeObjectSync(s,T)}get shape(){return this._def.shape()}strict(r){return J.errToObj,new He({...this._def,unknownKeys:"strict",...r!==void 0?{errorMap:(i,s)=>{var u,c,h,_;const T=(h=(c=(u=this._def).errorMap)===null||c===void 0?void 0:c.call(u,i,s).message)!==null&&h!==void 0?h:s.defaultError;return i.code==="unrecognized_keys"?{message:(_=J.errToObj(r).message)!==null&&_!==void 0?_:T}:{message:T}}}:{}})}strip(){return new He({...this._def,unknownKeys:"strip"})}passthrough(){return new He({...this._def,unknownKeys:"passthrough"})}extend(r){return new He({...this._def,shape:()=>({...this._def.shape(),...r})})}merge(r){return new He({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>({...this._def.shape(),...r._def.shape()}),typeName:ne.ZodObject})}setKey(r,i){return this.augment({[r]:i})}catchall(r){return new He({...this._def,catchall:r})}pick(r){const i={};return Se.objectKeys(r).forEach(s=>{r[s]&&this.shape[s]&&(i[s]=this.shape[s])}),new He({...this._def,shape:()=>i})}omit(r){const i={};return Se.objectKeys(this.shape).forEach(s=>{r[s]||(i[s]=this.shape[s])}),new He({...this._def,shape:()=>i})}deepPartial(){return ei(this)}partial(r){const i={};return Se.objectKeys(this.shape).forEach(s=>{const u=this.shape[s];r&&!r[s]?i[s]=u:i[s]=u.optional()}),new He({...this._def,shape:()=>i})}required(r){const i={};return Se.objectKeys(this.shape).forEach(s=>{if(r&&!r[s])i[s]=this.shape[s];else{let c=this.shape[s];for(;c instanceof Tn;)c=c._def.innerType;i[s]=c}}),new He({...this._def,shape:()=>i})}keyof(){return hd(Se.objectKeys(this.shape))}}He.create=(n,r)=>new He({shape:()=>n,unknownKeys:"strip",catchall:Wn.create(),typeName:ne.ZodObject,...fe(r)});He.strictCreate=(n,r)=>new He({shape:()=>n,unknownKeys:"strict",catchall:Wn.create(),typeName:ne.ZodObject,...fe(r)});He.lazycreate=(n,r)=>new He({shape:n,unknownKeys:"strip",catchall:Wn.create(),typeName:ne.ZodObject,...fe(r)});class Vi extends _e{_parse(r){const{ctx:i}=this._processInputParams(r),s=this._def.options;function u(c){for(const _ of c)if(_.result.status==="valid")return _.result;for(const _ of c)if(_.result.status==="dirty")return i.common.issues.push(..._.ctx.common.issues),_.result;const h=c.map(_=>new Bt(_.ctx.common.issues));return k(i,{code:$.invalid_union,unionErrors:h}),ie}if(i.common.async)return Promise.all(s.map(async c=>{const h={...i,common:{...i.common,issues:[]},parent:null};return{result:await c._parseAsync({data:i.data,path:i.path,parent:h}),ctx:h}})).then(u);{let c;const h=[];for(const T of s){const y={...i,common:{...i.common,issues:[]},parent:null},R=T._parseSync({data:i.data,path:i.path,parent:y});if(R.status==="valid")return R;R.status==="dirty"&&!c&&(c={result:R,ctx:y}),y.common.issues.length&&h.push(y.common.issues)}if(c)return i.common.issues.push(...c.ctx.common.issues),c.result;const _=h.map(T=>new Bt(T));return k(i,{code:$.invalid_union,unionErrors:_}),ie}}get options(){return this._def.options}}Vi.create=(n,r)=>new Vi({options:n,typeName:ne.ZodUnion,...fe(r)});const Bn=n=>n instanceof Gi?Bn(n.schema):n instanceof dn?Bn(n.innerType()):n instanceof Yi?[n.value]:n instanceof ur?n.options:n instanceof qi?Se.objectValues(n.enum):n instanceof Ki?Bn(n._def.innerType):n instanceof Zi?[void 0]:n instanceof Wi?[null]:n instanceof Tn?[void 0,...Bn(n.unwrap())]:n instanceof cr?[null,...Bn(n.unwrap())]:n instanceof _u||n instanceof Xi?Bn(n.unwrap()):n instanceof Ji?Bn(n._def.innerType):[];class vs extends _e{_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==W.object)return k(i,{code:$.invalid_type,expected:W.object,received:i.parsedType}),ie;const s=this.discriminator,u=i.data[s],c=this.optionsMap.get(u);return c?i.common.async?c._parseAsync({data:i.data,path:i.path,parent:i}):c._parseSync({data:i.data,path:i.path,parent:i}):(k(i,{code:$.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(r,i,s){const u=new Map;for(const c of i){const h=Bn(c.shape[r]);if(!h.length)throw new Error(`A discriminator value for key \`${r}\` could not be extracted from all schema options`);for(const _ of h){if(u.has(_))throw new Error(`Discriminator property ${String(r)} has duplicate value ${String(_)}`);u.set(_,c)}}return new vs({typeName:ne.ZodDiscriminatedUnion,discriminator:r,options:i,optionsMap:u,...fe(s)})}}function au(n,r){const i=Zn(n),s=Zn(r);if(n===r)return{valid:!0,data:n};if(i===W.object&&s===W.object){const u=Se.objectKeys(r),c=Se.objectKeys(n).filter(_=>u.indexOf(_)!==-1),h={...n,...r};for(const _ of c){const T=au(n[_],r[_]);if(!T.valid)return{valid:!1};h[_]=T.data}return{valid:!0,data:h}}else if(i===W.array&&s===W.array){if(n.length!==r.length)return{valid:!1};const u=[];for(let c=0;c<n.length;c++){const h=n[c],_=r[c],T=au(h,_);if(!T.valid)return{valid:!1};u.push(T.data)}return{valid:!0,data:u}}else return i===W.date&&s===W.date&&+n==+r?{valid:!0,data:n}:{valid:!1}}class zi extends _e{_parse(r){const{status:i,ctx:s}=this._processInputParams(r),u=(c,h)=>{if(ru(c)||ru(h))return ie;const _=au(c.value,h.value);return _.valid?((iu(c)||iu(h))&&i.dirty(),{status:i.value,value:_.data}):(k(s,{code:$.invalid_intersection_types}),ie)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([c,h])=>u(c,h)):u(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}zi.create=(n,r,i)=>new zi({left:n,right:r,typeName:ne.ZodIntersection,...fe(i)});class En extends _e{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.array)return k(s,{code:$.invalid_type,expected:W.array,received:s.parsedType}),ie;if(s.data.length<this._def.items.length)return k(s,{code:$.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ie;!this._def.rest&&s.data.length>this._def.items.length&&(k(s,{code:$.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const c=[...s.data].map((h,_)=>{const T=this._def.items[_]||this._def.rest;return T?T._parse(new Sn(s,h,s.path,_)):null}).filter(h=>!!h);return s.common.async?Promise.all(c).then(h=>ht.mergeArray(i,h)):ht.mergeArray(i,c)}get items(){return this._def.items}rest(r){return new En({...this._def,rest:r})}}En.create=(n,r)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new En({items:n,typeName:ne.ZodTuple,rest:null,...fe(r)})};class Hi extends _e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.object)return k(s,{code:$.invalid_type,expected:W.object,received:s.parsedType}),ie;const u=[],c=this._def.keyType,h=this._def.valueType;for(const _ in s.data)u.push({key:c._parse(new Sn(s,_,s.path,_)),value:h._parse(new Sn(s,s.data[_],s.path,_)),alwaysSet:_ in s.data});return s.common.async?ht.mergeObjectAsync(i,u):ht.mergeObjectSync(i,u)}get element(){return this._def.valueType}static create(r,i,s){return i instanceof _e?new Hi({keyType:r,valueType:i,typeName:ne.ZodRecord,...fe(s)}):new Hi({keyType:ln.create(),valueType:r,typeName:ne.ZodRecord,...fe(i)})}}class ls extends _e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.map)return k(s,{code:$.invalid_type,expected:W.map,received:s.parsedType}),ie;const u=this._def.keyType,c=this._def.valueType,h=[...s.data.entries()].map(([_,T],y)=>({key:u._parse(new Sn(s,_,s.path,[y,"key"])),value:c._parse(new Sn(s,T,s.path,[y,"value"]))}));if(s.common.async){const _=new Map;return Promise.resolve().then(async()=>{for(const T of h){const y=await T.key,R=await T.value;if(y.status==="aborted"||R.status==="aborted")return ie;(y.status==="dirty"||R.status==="dirty")&&i.dirty(),_.set(y.value,R.value)}return{status:i.value,value:_}})}else{const _=new Map;for(const T of h){const y=T.key,R=T.value;if(y.status==="aborted"||R.status==="aborted")return ie;(y.status==="dirty"||R.status==="dirty")&&i.dirty(),_.set(y.value,R.value)}return{status:i.value,value:_}}}}ls.create=(n,r,i)=>new ls({valueType:r,keyType:n,typeName:ne.ZodMap,...fe(i)});class $r extends _e{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.parsedType!==W.set)return k(s,{code:$.invalid_type,expected:W.set,received:s.parsedType}),ie;const u=this._def;u.minSize!==null&&s.data.size<u.minSize.value&&(k(s,{code:$.too_small,minimum:u.minSize.value,type:"set",inclusive:!0,exact:!1,message:u.minSize.message}),i.dirty()),u.maxSize!==null&&s.data.size>u.maxSize.value&&(k(s,{code:$.too_big,maximum:u.maxSize.value,type:"set",inclusive:!0,exact:!1,message:u.maxSize.message}),i.dirty());const c=this._def.valueType;function h(T){const y=new Set;for(const R of T){if(R.status==="aborted")return ie;R.status==="dirty"&&i.dirty(),y.add(R.value)}return{status:i.value,value:y}}const _=[...s.data.values()].map((T,y)=>c._parse(new Sn(s,T,s.path,y)));return s.common.async?Promise.all(_).then(T=>h(T)):h(_)}min(r,i){return new $r({...this._def,minSize:{value:r,message:J.toString(i)}})}max(r,i){return new $r({...this._def,maxSize:{value:r,message:J.toString(i)}})}size(r,i){return this.min(r,i).max(r,i)}nonempty(r){return this.min(1,r)}}$r.create=(n,r)=>new $r({valueType:n,minSize:null,maxSize:null,typeName:ne.ZodSet,...fe(r)});class ri extends _e{constructor(){super(...arguments),this.validate=this.implement}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==W.function)return k(i,{code:$.invalid_type,expected:W.function,received:i.parsedType}),ie;function s(_,T){return ss({data:_,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,as(),ai].filter(y=>!!y),issueData:{code:$.invalid_arguments,argumentsError:T}})}function u(_,T){return ss({data:_,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,as(),ai].filter(y=>!!y),issueData:{code:$.invalid_return_type,returnTypeError:T}})}const c={errorMap:i.common.contextualErrorMap},h=i.data;if(this._def.returns instanceof oi){const _=this;return Tt(async function(...T){const y=new Bt([]),R=await _._def.args.parseAsync(T,c).catch(se=>{throw y.addIssue(s(T,se)),y}),V=await Reflect.apply(h,this,R);return await _._def.returns._def.type.parseAsync(V,c).catch(se=>{throw y.addIssue(u(V,se)),y})})}else{const _=this;return Tt(function(...T){const y=_._def.args.safeParse(T,c);if(!y.success)throw new Bt([s(T,y.error)]);const R=Reflect.apply(h,this,y.data),V=_._def.returns.safeParse(R,c);if(!V.success)throw new Bt([u(R,V.error)]);return V.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...r){return new ri({...this._def,args:En.create(r).rest(Ar.create())})}returns(r){return new ri({...this._def,returns:r})}implement(r){return this.parse(r)}strictImplement(r){return this.parse(r)}static create(r,i,s){return new ri({args:r||En.create([]).rest(Ar.create()),returns:i||Ar.create(),typeName:ne.ZodFunction,...fe(s)})}}class Gi extends _e{get schema(){return this._def.getter()}_parse(r){const{ctx:i}=this._processInputParams(r);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}Gi.create=(n,r)=>new Gi({getter:n,typeName:ne.ZodLazy,...fe(r)});class Yi extends _e{_parse(r){if(r.data!==this._def.value){const i=this._getOrReturnCtx(r);return k(i,{received:i.data,code:$.invalid_literal,expected:this._def.value}),ie}return{status:"valid",value:r.data}}get value(){return this._def.value}}Yi.create=(n,r)=>new Yi({value:n,typeName:ne.ZodLiteral,...fe(r)});function hd(n,r){return new ur({values:n,typeName:ne.ZodEnum,...fe(r)})}class ur extends _e{constructor(){super(...arguments),ji.set(this,void 0)}_parse(r){if(typeof r.data!="string"){const i=this._getOrReturnCtx(r),s=this._def.values;return k(i,{expected:Se.joinValues(s),received:i.parsedType,code:$.invalid_type}),ie}if(os(this,ji)||cd(this,ji,new Set(this._def.values)),!os(this,ji).has(r.data)){const i=this._getOrReturnCtx(r),s=this._def.values;return k(i,{received:i.data,code:$.invalid_enum_value,options:s}),ie}return Tt(r.data)}get options(){return this._def.values}get enum(){const r={};for(const i of this._def.values)r[i]=i;return r}get Values(){const r={};for(const i of this._def.values)r[i]=i;return r}get Enum(){const r={};for(const i of this._def.values)r[i]=i;return r}extract(r,i=this._def){return ur.create(r,{...this._def,...i})}exclude(r,i=this._def){return ur.create(this.options.filter(s=>!r.includes(s)),{...this._def,...i})}}ji=new WeakMap;ur.create=hd;class qi extends _e{constructor(){super(...arguments),Ni.set(this,void 0)}_parse(r){const i=Se.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(r);if(s.parsedType!==W.string&&s.parsedType!==W.number){const u=Se.objectValues(i);return k(s,{expected:Se.joinValues(u),received:s.parsedType,code:$.invalid_type}),ie}if(os(this,Ni)||cd(this,Ni,new Set(Se.getValidEnumValues(this._def.values))),!os(this,Ni).has(r.data)){const u=Se.objectValues(i);return k(s,{received:s.data,code:$.invalid_enum_value,options:u}),ie}return Tt(r.data)}get enum(){return this._def.values}}Ni=new WeakMap;qi.create=(n,r)=>new qi({values:n,typeName:ne.ZodNativeEnum,...fe(r)});class oi extends _e{unwrap(){return this._def.type}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==W.promise&&i.common.async===!1)return k(i,{code:$.invalid_type,expected:W.promise,received:i.parsedType}),ie;const s=i.parsedType===W.promise?i.data:Promise.resolve(i.data);return Tt(s.then(u=>this._def.type.parseAsync(u,{path:i.path,errorMap:i.common.contextualErrorMap})))}}oi.create=(n,r)=>new oi({type:n,typeName:ne.ZodPromise,...fe(r)});class dn extends _e{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){const{status:i,ctx:s}=this._processInputParams(r),u=this._def.effect||null,c={addIssue:h=>{k(s,h),h.fatal?i.abort():i.dirty()},get path(){return s.path}};if(c.addIssue=c.addIssue.bind(c),u.type==="preprocess"){const h=u.transform(s.data,c);if(s.common.async)return Promise.resolve(h).then(async _=>{if(i.value==="aborted")return ie;const T=await this._def.schema._parseAsync({data:_,path:s.path,parent:s});return T.status==="aborted"?ie:T.status==="dirty"||i.value==="dirty"?ni(T.value):T});{if(i.value==="aborted")return ie;const _=this._def.schema._parseSync({data:h,path:s.path,parent:s});return _.status==="aborted"?ie:_.status==="dirty"||i.value==="dirty"?ni(_.value):_}}if(u.type==="refinement"){const h=_=>{const T=u.refinement(_,c);if(s.common.async)return Promise.resolve(T);if(T instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return _};if(s.common.async===!1){const _=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return _.status==="aborted"?ie:(_.status==="dirty"&&i.dirty(),h(_.value),{status:i.value,value:_.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(_=>_.status==="aborted"?ie:(_.status==="dirty"&&i.dirty(),h(_.value).then(()=>({status:i.value,value:_.value}))))}if(u.type==="transform")if(s.common.async===!1){const h=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Ir(h))return h;const _=u.transform(h.value,c);if(_ instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:_}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(h=>Ir(h)?Promise.resolve(u.transform(h.value,c)).then(_=>({status:i.value,value:_})):h);Se.assertNever(u)}}dn.create=(n,r,i)=>new dn({schema:n,typeName:ne.ZodEffects,effect:r,...fe(i)});dn.createWithPreprocess=(n,r,i)=>new dn({schema:r,effect:{type:"preprocess",transform:n},typeName:ne.ZodEffects,...fe(i)});class Tn extends _e{_parse(r){return this._getType(r)===W.undefined?Tt(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}Tn.create=(n,r)=>new Tn({innerType:n,typeName:ne.ZodOptional,...fe(r)});class cr extends _e{_parse(r){return this._getType(r)===W.null?Tt(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}cr.create=(n,r)=>new cr({innerType:n,typeName:ne.ZodNullable,...fe(r)});class Ki extends _e{_parse(r){const{ctx:i}=this._processInputParams(r);let s=i.data;return i.parsedType===W.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}Ki.create=(n,r)=>new Ki({innerType:n,typeName:ne.ZodDefault,defaultValue:typeof r.default=="function"?r.default:()=>r.default,...fe(r)});class Ji extends _e{_parse(r){const{ctx:i}=this._processInputParams(r),s={...i,common:{...i.common,issues:[]}},u=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Bi(u)?u.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Bt(s.common.issues)},input:s.data})})):{status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new Bt(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Ji.create=(n,r)=>new Ji({innerType:n,typeName:ne.ZodCatch,catchValue:typeof r.catch=="function"?r.catch:()=>r.catch,...fe(r)});class fs extends _e{_parse(r){if(this._getType(r)!==W.nan){const s=this._getOrReturnCtx(r);return k(s,{code:$.invalid_type,expected:W.nan,received:s.parsedType}),ie}return{status:"valid",value:r.data}}}fs.create=n=>new fs({typeName:ne.ZodNaN,...fe(n)});const nw=Symbol("zod_brand");class _u extends _e{_parse(r){const{ctx:i}=this._processInputParams(r),s=i.data;return this._def.type._parse({data:s,path:i.path,parent:i})}unwrap(){return this._def.type}}class na extends _e{_parse(r){const{status:i,ctx:s}=this._processInputParams(r);if(s.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return c.status==="aborted"?ie:c.status==="dirty"?(i.dirty(),ni(c.value)):this._def.out._parseAsync({data:c.value,path:s.path,parent:s})})();{const u=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return u.status==="aborted"?ie:u.status==="dirty"?(i.dirty(),{status:"dirty",value:u.value}):this._def.out._parseSync({data:u.value,path:s.path,parent:s})}}static create(r,i){return new na({in:r,out:i,typeName:ne.ZodPipeline})}}class Xi extends _e{_parse(r){const i=this._def.innerType._parse(r),s=u=>(Ir(u)&&(u.value=Object.freeze(u.value)),u);return Bi(i)?i.then(u=>s(u)):s(i)}unwrap(){return this._def.innerType}}Xi.create=(n,r)=>new Xi({innerType:n,typeName:ne.ZodReadonly,...fe(r)});function pd(n,r={},i){return n?si.create().superRefine((s,u)=>{var c,h;if(!n(s)){const _=typeof r=="function"?r(s):typeof r=="string"?{message:r}:r,T=(h=(c=_.fatal)!==null&&c!==void 0?c:i)!==null&&h!==void 0?h:!0,y=typeof _=="string"?{message:_}:_;u.addIssue({code:"custom",...y,fatal:T})}}):si.create()}const rw={object:He.lazycreate};var ne;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(ne||(ne={}));const iw=(n,r={message:`Input not instance of ${n.name}`})=>pd(i=>i instanceof n,r),_d=ln.create,gd=sr.create,aw=fs.create,sw=or.create,vd=Ui.create,ow=Pr.create,uw=us.create,cw=Zi.create,lw=Wi.create,fw=si.create,dw=Ar.create,hw=Wn.create,pw=cs.create,_w=fn.create,gw=He.create,vw=He.strictCreate,mw=Vi.create,yw=vs.create,xw=zi.create,bw=En.create,Tw=Hi.create,ww=ls.create,Sw=$r.create,Ew=ri.create,Cw=Gi.create,Aw=Yi.create,Ow=ur.create,Rw=qi.create,Iw=oi.create,wf=dn.create,Pw=Tn.create,$w=cr.create,jw=dn.createWithPreprocess,Nw=na.create,Lw=()=>_d().optional(),Fw=()=>gd().optional(),Mw=()=>vd().optional(),kw={string:n=>ln.create({...n,coerce:!0}),number:n=>sr.create({...n,coerce:!0}),boolean:n=>Ui.create({...n,coerce:!0}),bigint:n=>or.create({...n,coerce:!0}),date:n=>Pr.create({...n,coerce:!0})},Dw=ie;var Wo=Object.freeze({__proto__:null,defaultErrorMap:ai,setErrorMap:jT,getErrorMap:as,makeIssue:ss,EMPTY_PATH:NT,addIssueToContext:k,ParseStatus:ht,INVALID:ie,DIRTY:ni,OK:Tt,isAborted:ru,isDirty:iu,isValid:Ir,isAsync:Bi,get util(){return Se},get objectUtil(){return nu},ZodParsedType:W,getParsedType:Zn,ZodType:_e,datetimeRegex:dd,ZodString:ln,ZodNumber:sr,ZodBigInt:or,ZodBoolean:Ui,ZodDate:Pr,ZodSymbol:us,ZodUndefined:Zi,ZodNull:Wi,ZodAny:si,ZodUnknown:Ar,ZodNever:Wn,ZodVoid:cs,ZodArray:fn,ZodObject:He,ZodUnion:Vi,ZodDiscriminatedUnion:vs,ZodIntersection:zi,ZodTuple:En,ZodRecord:Hi,ZodMap:ls,ZodSet:$r,ZodFunction:ri,ZodLazy:Gi,ZodLiteral:Yi,ZodEnum:ur,ZodNativeEnum:qi,ZodPromise:oi,ZodEffects:dn,ZodTransformer:dn,ZodOptional:Tn,ZodNullable:cr,ZodDefault:Ki,ZodCatch:Ji,ZodNaN:fs,BRAND:nw,ZodBranded:_u,ZodPipeline:na,ZodReadonly:Xi,custom:pd,Schema:_e,ZodSchema:_e,late:rw,get ZodFirstPartyTypeKind(){return ne},coerce:kw,any:fw,array:_w,bigint:sw,boolean:vd,date:ow,discriminatedUnion:yw,effect:wf,enum:Ow,function:Ew,instanceof:iw,intersection:xw,lazy:Cw,literal:Aw,map:ww,nan:aw,nativeEnum:Rw,never:hw,null:lw,nullable:$w,number:gd,object:gw,oboolean:Mw,onumber:Fw,optional:Pw,ostring:Lw,pipeline:Nw,preprocess:jw,promise:Iw,record:Tw,set:Sw,strictObject:vw,string:_d,symbol:uw,transformer:wf,tuple:bw,undefined:cw,union:mw,unknown:dw,void:pw,NEVER:Dw,ZodIssueCode:$,quotelessJson:$T,ZodError:Bt}),Or={},Bw=cn&&cn.__extends||function(){var n=function(r,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(s[c]=u[c])},n(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(r,i);function s(){this.constructor=r}r.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}}(),md=cn&&cn.__awaiter||function(n,r,i,s){function u(c){return c instanceof i?c:new i(function(h){h(c)})}return new(i||(i=Promise))(function(c,h){function _(R){try{y(s.next(R))}catch(V){h(V)}}function T(R){try{y(s.throw(R))}catch(V){h(V)}}function y(R){R.done?c(R.value):u(R.value).then(_,T)}y((s=s.apply(n,r||[])).next())})},yd=cn&&cn.__generator||function(n,r){var i={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},s,u,c,h;return h={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function _(y){return function(R){return T([y,R])}}function T(y){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,u&&(c=y[0]&2?u.return:y[0]?u.throw||((c=u.return)&&c.call(u),0):u.next)&&!(c=c.call(u,y[1])).done)return c;switch(u=0,c&&(y=[y[0]&2,c.value]),y[0]){case 0:case 1:c=y;break;case 4:return i.label++,{value:y[1],done:!1};case 5:i.label++,u=y[1],y=[0];continue;case 7:y=i.ops.pop(),i.trys.pop();continue;default:if(c=i.trys,!(c=c.length>0&&c[c.length-1])&&(y[0]===6||y[0]===2)){i=0;continue}if(y[0]===3&&(!c||y[1]>c[0]&&y[1]<c[3])){i.label=y[1];break}if(y[0]===6&&i.label<c[1]){i.label=c[1],c=y;break}if(c&&i.label<c[2]){i.label=c[2],i.ops.push(y);break}c[2]&&i.ops.pop(),i.trys.pop();continue}y=r.call(n,i)}catch(R){y=[6,R],u=0}finally{s=c=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}};Object.defineProperty(Or,"__esModule",{value:!0});Or.toFormikValidate=bd=Or.toFormikValidationSchema=Or.ValidationError=void 0;var xd=function(n){Bw(r,n);function r(i){var s=n.call(this,i)||this;return s.name="ValidationError",s.inner=[],s}return r}(Error);Or.ValidationError=xd;function Uw(n){var r=new xd(n.message);return r.inner=n.errors.map(function(i){return{message:i.message,path:i.path.join(".")}}),r}function Zw(n,r){return{validate:function(i){return md(this,void 0,void 0,function(){var s;return yd(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,n.parseAsync(i,r)];case 1:return u.sent(),[3,3];case 2:throw s=u.sent(),Uw(s);case 3:return[2]}})})}}}var bd=Or.toFormikValidationSchema=Zw;function Ww(n){for(var r={},i=0,s=n.errors;i<s.length;i++){var u=s[i];r[u.path.filter(Boolean).join(".")]=u.message}return r}function Vw(n,r){var i=this;return function(s){return md(i,void 0,void 0,function(){var u;return yd(this,function(c){switch(c.label){case 0:return[4,n.safeParseAsync(s,r)];case 1:return u=c.sent(),u.success?[2]:[2,Ww(u.error)]}})})}}Or.toFormikValidate=Vw;const zw="_root__body_a79gv_120",Hw="_root__form_a79gv_123",Gw="_root__stickyButton_a79gv_138",Vo={root__body:zw,root__form:Hw,root__stickyButton:Gw},bn={amountPicker:"amountPicker",cta:"cta",headline:"headline",legalCheckbox:"legalCheckbox",paymentMethods:"paymentMethods",priceDescription:"priceDescription",selectablePills:"selectablePills",submitButton:"submitButton",switcherToggle:"switcherToggle"};var gu=(n=>(n.FULL_PAGE="full_page",n.IN_APP="in_app",n))(gu||{});const Yw="_root_1x2jr_120",qw={root:Yw},Kw=({errorMessage:n,id:r,onChange:i,value:s})=>b.jsx(H.Fieldset,{className:qw.root,name:r,children:b.jsx(H.InputFieldSpecial,{id:r,onChange:i,value:s,errorMessage:n})}),Jw="_root_sxwv4_120",Xw="_root__button_sxwv4_126",Sf={root:Jw,root__button:Xw},Qw=({data:{label:n,url:r}})=>b.jsx(H.Fieldset,{className:Sf.root,children:b.jsx(H.TextButton,{className:Sf.root__button,href:r,size:"link",text:n,color:"deepPurple",target:"_blank"})}),eS="_root_c1agt_120",tS="_root__blockHeader_c1agt_125",nS="_root__block_c1agt_125",rS="_root__markdown_c1agt_138",Xa={root:eS,root__blockHeader:tS,root__block:nS,root__markdown:rS},iS=({data:{buttonText:n,content:r,date:i,headline:s,version:u},onClose:c,open:h})=>{const _=()=>{c&&c(!h)};return b.jsx(H.Modal,{headerTitle:s,onClose:_,open:h,modalFooter:b.jsx(b.Fragment,{children:b.jsx(H.TextButton,{onClick:_,color:"blue",size:"large",text:n})}),modalBody:b.jsx(H.Card,{children:b.jsx(H.CardBody,{className:Xa.root,children:b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:Xa.root__blockHeader,children:[b.jsx(H.Typography,{type:"body-regular",children:u}),b.jsx(H.Typography,{type:"body-regular",children:i})]}),b.jsx(H.Divider,{}),typeof r=="string"?b.jsx(Qi.MarkdownRichText,{text:r,className:Xa.root__markdown}):r.map((T,y)=>b.jsxs(N.Fragment,{children:[b.jsx("div",{className:Xa.root__block,children:T}),y!==r.length-1&&b.jsx(H.Divider,{})]},`rich_text_el_${y}`))]})})})})},aS="_headline_1x4kr_120",sS={headline:aS},oS=({data:{headline:n,subheadline:r}})=>b.jsxs(H.Fieldset,{className:sS.headline,children:[b.jsx(H.Typography,{type:"h1",children:n}),b.jsx(H.Typography,{type:"body-regular",children:r})]}),uS="_root_1o02i_120",cS="_root__img_1o02i_127",Ef={root:uS,root__img:cS},lS=({data:{alt:n,src:r}})=>b.jsx("div",{className:Ef.root,"data-testid":"hero-block",children:b.jsx("img",{className:Ef.root__img,alt:n,src:r})}),fS="_root_kozox_120",dS="_root__checkbox_kozox_128",hS="_root__text_kozox_134",pS="_root__error_kozox_140",_S="_root__link_kozox_150",rr={root:fS,root__checkbox:dS,root__text:hS,root__error:pS,"root--error":"_root--error_kozox_147",root__link:_S,"root--stickyButton":"_root--stickyButton_kozox_159"},gS=({data:{buttonLabel:n,label:r,layout:i},error:s,onChange:u,onClick:c,stickyButton:h})=>{const _=()=>{c&&c(!0)};return b.jsxs(H.Fieldset,{className:wn(rr.root,{[rr["root--stickyButton"]]:h}),children:[i?b.jsx(H.CheckboxInput,{onChange:u,id:"legal_checkbox",className:wn(rr.root__checkbox,{[rr["root--error"]]:s}),children:b.jsxs(H.Typography,{type:s?"detail-regular":"detail-medium",as:"p",children:[r," ",b.jsx(H.TextButton,{className:rr.root__link,onClick:_,size:"small",text:n,color:"deepPurple"})]})}):b.jsxs(H.Typography,{className:rr.root__text,type:s?"detail-regular":"detail-medium",as:"p",children:[r," ",b.jsx(H.TextButton,{className:rr.root__link,onClick:_,size:"small",text:n,color:"deepPurple"})]}),s&&b.jsx(H.Typography,{className:rr.root__error,type:"detail-bold",as:"p",children:s})]})},vS="_root_xdjsl_120",mS="_root__item_xdjsl_126",yS="_root__img_xdjsl_131",zo={root:vS,root__item:mS,root__img:yS},xS=({methods:n})=>b.jsx(H.Fieldset,{children:b.jsx("ul",{className:zo.root,children:n.map(({alt:r,id:i,src:s},u)=>b.jsx("li",{className:zo.root__item,children:b.jsx("img",{className:zo.root__img,src:s,alt:r})},`payments_${i}_${u}`))})}),bS="_root_esw59_120",TS={root:bS},wS=({label:n})=>b.jsx(H.Fieldset,{className:TS.root,children:b.jsx(H.Typography,{type:"body-regular",children:n})}),SS="_root_1mamo_120",ES={root:SS},CS=({onChange:n,selectablePills:r,selectedPills:i})=>b.jsx(H.Fieldset,{children:b.jsx(H.SelectablePillGroup,{className:ES.root,selectedItems:i,items:r,multiselect:!1,onChange:n})}),AS="_root_1ksq3_120",OS="_root__button_1ksq3_126",RS="_root__security_1ksq3_129",Qa={root:AS,root__button:OS,root__security:RS,"root--stickyButton":"_root--stickyButton_1ksq3_140"},IS=({data:{label:n,securityText:r},onSubmit:i,stickyButton:s})=>b.jsxs(H.Fieldset,{className:wn(Qa.root,{[Qa["root--stickyButton"]]:s}),children:[b.jsx(H.ButtonPrimary,{className:Qa.root__button,fullWidth:!0,size:"medium",text:n,onClick:i}),b.jsxs(H.Typography,{type:"detail-medium",as:"p",className:wn(Qa.root__security),children:[b.jsx(H.Icon,{name:"privacy_lock_closed",size:"24"}),r]})]}),PS="_root_1mfs1_120",$S={root:PS},jS=({onChange:n,switcherToggle:r,value:i})=>b.jsx(H.SwitcherToggle,{className:$S.root,items:r,onChange:n,value:i}),ir=()=>Math.floor(Math.random()*65536).toString(16).padStart(4,"0"),NS=()=>`${ir()}${ir()}-${ir()}-${ir()}-${ir()}-${ir()}${ir()}${ir()}`,LS={monthly:"supporter_monthly",yearly:"supporter_yearly"},FS={monthly:2,yearly:3},MS=({amount:n,frequency:r,items:i})=>{const s=$y.useTrack(),u=_=>_.map(T=>({item_name:T.id,price:Number(T.value)})),c=N.useMemo(()=>({currency:"EUR",item_list_name:LS[r],items:u(i)}),[r]);N.useEffect(()=>{s("view_item_list",{ecommerce:{...c,value:n}})},[s,c]);const h=N.useCallback((_,T)=>{const y={...c,value:T};return _==="purchase"&&(y.transaction_id=NS()),{ecommerce:y}},[c]);return N.useCallback((_,T)=>{s(_,h(_,T))},[h,s])},kS=(n,r)=>{const i=FS[r]||"2",s=parseInt(n,10)*100;return`volunteer-${i}-${s}`},DS=({error:n,errorLegal:r,minValue:i})=>Wo.object({amount:Wo.number().min(i,{message:n}).int(),legalCheckbox:Wo.boolean().refine(s=>s===!0,{message:r})}),Td=({blocks:n,defaultSelectedToggle:r,fieldDescription:i,fieldErrors:s,guidelinesModalData:u,hero:c,layout:h,onError:_,onSubmit:T,scrollYTop:y=!1,stickyButton:R=!1})=>{const[V,U]=N.useState(r),[se,Ee]=N.useState(0),Be=DS(s[V]),me=Py.useOpenCheckout(),oe=(B=r)=>{const Ae=n.selectablePills[B].find(qe=>qe.isSelected);return Ae?[{id:Ae.id,value:Ae.value}]:[]},Te=()=>{const B=oe()[0];return B?i[B.id]:n.priceDescription.label},j=()=>{const B=oe()[0];return B?Number(B.value):0},D=MS({amount:se||j(),frequency:V,items:n.selectablePills[V]}),A=N.useCallback((B,Ae)=>{B==="thankyou_screen"&&D("purchase",Ae)},[D]),X=B=>{D("add_to_cart",B)},L=B=>{T(B)},ae=ST({initialValues:{amount:j(),fieldDescription:Te(),legalCheckbox:!n.legalCheckbox.layout,legalModalOpen:!1,selectedPills:oe(),selectedPillsTouched:!1,toggle:r},onSubmit:B=>{var qe;D("begin_checkout",B.amount);const Ae=((qe=B==null?void 0:B.selectedPills[0])==null?void 0:qe.id)||kS(`${B.amount}`,B.toggle);me({getHostedPage:async()=>await ns.postChargebeeCreate(Ae),layout:gu.IN_APP,onError:_,onLoaded:()=>X(B.amount),onStep:je=>A(je,B.amount),onSuccess:()=>L(B)})},validateOnBlur:!0,validateOnChange:!0,validationSchema:bd(Be)}),at=()=>{y&&R&&window.scrollTo({behavior:"smooth",top:0})},It=async(B,Ae,qe)=>{const je=B||n.selectablePills[Ae].filter(Xt=>Xt.value===qe)[0],_t=je?i[je.id]:n.priceDescription.label,Jt=je?[{id:je.id,value:je.value}]:[];await ae.setValues({...ae.values,amount:Number(qe),fieldDescription:_t,selectedPills:Jt},!0)},hn=B=>B[ae.values.toggle],pn=B=>{(async()=>(await It(B[0],ae.values.toggle,B[0].value),await ae.setTouched({selectedPillsTouched:!0},!0),D("view_item_list",Number(B[0].value))))()},Me=B=>{(async()=>(await It(null,ae.values.toggle,`${B}`),await ae.setTouched({amount:!0},!0),Ee(B)))()},Xe=B=>{(async()=>{U(B);const Ae=oe(B);if(!ae.touched.amount&&!ae.touched.selectedPillsTouched&&Ae.length){await It(Ae[0],B,Ae[0].value),await ae.setFieldValue("toggle",B,!0);return}await It(null,B,`${ae.values.amount}`),await ae.setFieldValue("toggle",B,!0)})()},pt=B=>{(async()=>await ae.setFieldValue("legalModalOpen",B))()},_n=B=>{(async()=>(!ae.touched.legalCheckbox&&await ae.setFieldTouched("legalCheckbox"),await ae.setFieldValue("legalCheckbox",B.target.checked,!0)))()},Pt=()=>{(async()=>(await ae.submitForm(),window.scrollY!==0&&at()))()};return b.jsxs("div",{className:wn({[Vo.root__stickyButton]:R}),children:[b.jsx(lS,{data:c}),b.jsxs("div",{className:Vo.root__body,children:[b.jsx(H.Form,{className:wn(Vo.root__form),children:h.map(B=>{const Ae=n[B];switch(B){case bn.headline:return b.jsx(N.Fragment,{children:b.jsx(oS,{data:Ae})},B);case bn.switcherToggle:return b.jsx(N.Fragment,{children:b.jsx(jS,{switcherToggle:Ae,onChange:Xe,value:ae.values.toggle})},B);case bn.selectablePills:return b.jsx(N.Fragment,{children:b.jsx(CS,{onChange:pn,selectablePills:hn(Ae),selectedPills:ae.values.selectedPills})},B);case bn.priceDescription:return b.jsx(N.Fragment,{children:b.jsx(wS,{label:ae.values.fieldDescription})},B);case bn.amountPicker:return b.jsx(N.Fragment,{children:b.jsx(Kw,{id:"amount",onChange:Me,value:ae.values.amount,errorMessage:ae.touched.amount&&ae.errors.amount||""})},B);case bn.legalCheckbox:return b.jsx(N.Fragment,{children:b.jsx(gS,{stickyButton:R,data:Ae,error:ae.touched.legalCheckbox?ae.errors.legalCheckbox:"",onClick:pt,onChange:_n})},B);case bn.submitButton:return b.jsx(N.Fragment,{children:b.jsx(IS,{stickyButton:R,data:Ae,onSubmit:Pt})},B);case bn.paymentMethods:return b.jsx(N.Fragment,{children:b.jsx(xS,{methods:Ae})},B);case bn.cta:return b.jsx(N.Fragment,{children:b.jsx(Qw,{data:Ae})},B);default:return null}})}),ae.values.legalModalOpen&&b.jsx(iS,{data:u,onClose:pt,open:ae.values.legalModalOpen})]})]})},BS=({block:n,isDesktop:r,onError:i,onSubmit:s})=>{const u=()=>{var j;return((j=n==null?void 0:n.layout)==null?void 0:j.map(D=>D==null?void 0:D.name))||[]},c=()=>{var j,D,A;return{alt:((j=n==null?void 0:n.heroImage)==null?void 0:j.alternativeText)||"",src:(D=n==null?void 0:n.heroImage)!=null&&D.url?`${ts.API.getBaseUrl()}${(A=n==null?void 0:n.heroImage)==null?void 0:A.url}`:""}},h=()=>{var j,D;return{headline:((j=n.headline)==null?void 0:j.headline)||"",subheadline:((D=n.headline)==null?void 0:D.subheadline)||""}},_=()=>{var j,D;return{label:((j=n.cta)==null?void 0:j.label)||"",url:((D=n.cta)==null?void 0:D.url)||""}},T=()=>n!=null&&n.paymentMethodLogos?n==null?void 0:n.paymentMethodLogos.map(j=>{var D;return{alt:(j==null?void 0:j.alternativeText)||"",id:((D=j==null?void 0:j.id)==null?void 0:D.toString())||"",src:`${ts.API.getBaseUrl()}${j==null?void 0:j.url}`}}):[],y=()=>({label:n.submitLabel||"",securityText:n.submitSecurityText||""}),R=()=>{var j,D,A;return{buttonLabel:((j=n.legalCheckbox)==null?void 0:j.legalButtonLabel)||"",label:((D=n.legalCheckbox)==null?void 0:D.label)||"",layout:(A=n.legalCheckbox)==null?void 0:A.layout}},V=()=>({label:n.priceDescription||""}),U=()=>{var D;const j={};return(D=n==null?void 0:n.switcherToggle)==null||D.map(A=>{var L;const X=`${A==null?void 0:A.identifier}`;X in j||(j[X]={error:(A==null?void 0:A.errorText)||"",errorLegal:((L=n.legalCheckbox)==null?void 0:L.errorText)||"",minValue:Number(A==null?void 0:A.minValue)||0})}),j},se=()=>{var j;return n!=null&&n.switcherToggle?(j=n==null?void 0:n.switcherToggle)==null?void 0:j.map(D=>({id:(D==null?void 0:D.identifier)||"",label:(D==null?void 0:D.label)||""})):[]},Ee=()=>{var D,A,X;const j=(D=n==null?void 0:n.switcherToggle)==null?void 0:D.find(L=>L==null?void 0:L.defaultSelected);return!j&&(n!=null&&n.switcherToggle)&&((A=n.switcherToggle[0])!=null&&A.identifier)?((X=n.switcherToggle[0])==null?void 0:X.identifier)||"":(j==null?void 0:j.identifier)||""},Be=()=>{var D;const j={};return(D=n==null?void 0:n.switcherToggle)==null||D.map(A=>{var X;(X=A==null?void 0:A.selectablePills)==null||X.map(L=>{const ae=`${L==null?void 0:L.chargebeeId}`;ae in j||(j[ae]=(L==null?void 0:L.description)||"")})}),j},me=()=>{var D;const j={};return(D=n==null?void 0:n.switcherToggle)==null||D.map(A=>{const X=`${A==null?void 0:A.identifier}`;X in j||(j[X]=((A==null?void 0:A.selectablePills)||[]).map(L=>({id:L==null?void 0:L.chargebeeId,isSelected:L==null?void 0:L.defaultSelected,label:(L==null?void 0:L.label)||"",popular:(L==null?void 0:L.popular)||"",style:"filled",value:(L==null?void 0:L.value)||"",variant:"large"})))}),j},oe=()=>{var at;const j=(at=n==null?void 0:n.legalCheckbox)==null?void 0:at.guidelinesModal,D=j==null?void 0:j.text;if(!D)return{buttonText:"",content:[[]],date:"",headline:"",version:""};const A=(j==null?void 0:j.closeModalButtonText)||"",X=(j==null?void 0:j.headline)||"",L=(j==null?void 0:j.data)||"",ae=(j==null?void 0:j.version)||"";return{buttonText:A,content:D,date:L,headline:X,version:ae}},Te=()=>({cta:_(),headline:h(),legalCheckbox:R(),paymentMethods:T(),priceDescription:V(),selectablePills:me(),submitButton:y(),switcherToggle:se()});return b.jsx(Td,{scrollYTop:n==null?void 0:n.scrollToTop,stickyButton:(n==null?void 0:n.stickyButton)&&!r,onError:i,onSubmit:s,layout:u(),hero:c(),defaultSelectedToggle:Ee(),blocks:Te(),fieldDescription:Be(),fieldErrors:U(),guidelinesModalData:oe()})},wd=n=>({body:(n==null?void 0:n.body)??"",cta:(n==null?void 0:n.cta)??""}),US="_root_yd0nb_120",Cf={root:US},ZS="https://hilfe.nebenan.de/hc/de",Sd=({body:n,cta:r})=>b.jsxs("div",{className:Cf.root,children:[b.jsx(H.Typography,{type:"body-regular",className:Cf.body,children:n}),b.jsx(H.TextButton,{href:ZS,text:r,color:"blue",size:"medium"})]}),WS="_root_e2sao_120",VS="_metadata_e2sao_127",zS="_markdown_e2sao_132",Ho={root:WS,metadata:VS,markdown:zS},Ed=({body:n,contactFooter:r,updateDate:i,version:s})=>{const u=s||i;return b.jsx("div",{children:b.jsxs("div",{className:Ho.root,children:[u&&b.jsxs("div",{className:Ho.metadata,children:[b.jsxs(H.Typography,{type:"body-regular",as:"span",children:["Version: ",s]}),b.jsx(H.Typography,{type:"body-regular",as:"span",children:i&&`${i}`})]}),u&&b.jsx(H.Divider,{}),b.jsx(Qi.MarkdownRichText,{text:n,className:Ho.markdown}),r&&r.body&&b.jsxs("div",{children:[b.jsx(H.Divider,{}),b.jsx(Sd,{body:r.body,cta:r.cta})]})]})})},HS=({block:n})=>{const r=(n==null?void 0:n.body)??"",i=(n==null?void 0:n.version)??"",s=(n==null?void 0:n.updateDate)??"",u=wd(n==null?void 0:n.contactFooter);return b.jsx(Ed,{body:r,contactFooter:u,version:i,updateDate:s})},GS="_root_nd1ee_120",YS="_staticHtml_nd1ee_124",Af={root:GS,staticHtml:YS},qS="_root_1w6ux_120",KS="_button_1w6ux_127",JS="_textButton_1w6ux_128",XS="_success_1w6ux_133",es={root:qS,button:KS,textButton:JS,success:XS},QS=N.createContext({pageMapping:[],pathName:"/",snowplowConfig:{collectorUrl:"",trackerConfiguration:{},version:""}});QS.Provider;const eE=(n,r,i)=>{const s=new Date;s.setTime(s.getTime()+i*24*60*60*1e3),document.cookie=`${n}=${r};expires=${s.toUTCString()};path=/`},tE=n=>{var s;const i=`; ${document.cookie}`.split(`; ${n}=`);if(i.length===2)return(s=i.pop())==null?void 0:s.split(";").shift()},nE=n=>{document.cookie=`${n}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`},rE=()=>{const n=N.useCallback(()=>!!tE("_sp_optout"),[]),r=N.useCallback(()=>{nE("_sp_optout")},[]),i=N.useCallback(()=>{eE("_sp_optout","1",724)},[]);return{isOptedOut:n,optIn:r,optOut:i}},iE="_root_6f9m3_120",aE={root:iE},sE=()=>{const[n,r]=N.useState(null),[i,s]=N.useState(!1),{isOptedOut:u,optIn:c,optOut:h}=rE();N.useEffect(()=>{ns.getProfile().then(y=>{r(y),s(y.allow_analytics)}).catch(y=>{console.error(y)})},[]);const _=()=>{ns.updateProfile({allow_analytics:!(n!=null&&n.allow_analytics)}).then(()=>{s(!i)}).catch(y=>{console.error(y)})},T=y=>{y.target.checked?c():h()};return b.jsxs("div",{className:aE.root,children:[b.jsx(H.Typography,{type:"h4",children:"Profil-Tracking deaktivieren"}),b.jsxs("div",{children:[b.jsx(H.Typography,{type:"body-regular",children:"Möchtest du das Profil-Tracking deaktivieren?"}),b.jsx(H.ToggleInput,{onChange:_,label:"Profil-Tracking",checked:i})]}),b.jsxs("div",{children:[b.jsx(H.Typography,{type:"body-regular",children:"Sie können der Verarbeitung Ihrer personenbezogenen Daten durch Snowplow Analytics jederzeit mittels des nachfolgenden Toggles widersprechen:"}),b.jsx(H.ToggleInput,{onChange:T,label:"Profil-Tracking",defaultChecked:!u()})]})]})},oE=({cta:n,portabilityBody:r,portabilityCta:i,portabilityTitle:s,title:u})=>{const{showConsentManager:c}=jy.useConsent(),[h,_]=N.useState(!1),T=()=>{ns.exportArchivedData().then(()=>{_(!0)}).catch(y=>{console.error(y)})};return b.jsxs("div",{className:es.root,children:[b.jsx(H.Typography,{type:"h2",children:u}),b.jsx(H.Divider,{}),b.jsx(H.ButtonPrimary,{text:n,className:es.button,onClick:c}),b.jsx(H.Divider,{}),b.jsx(sE,{}),b.jsx(H.Divider,{}),b.jsx(H.Typography,{type:"h4",children:s}),b.jsx(H.Typography,{type:"body-regular",children:r}),h?b.jsx(H.Typography,{type:"body-semibold",className:es.success,children:"Du erhältst in Kürze eine E-Mail mit dem Link zu deinem Archiv."}):b.jsx(H.TextButton,{onClick:T,className:es.textButton,color:"blue",size:"medium",text:i})]})},uE="_root_1h8ey_120",cE="_markdown_1h8ey_124",Of={root:uE,markdown:cE},lE=({body:n,title:r})=>b.jsxs("div",{className:Of.root,children:[b.jsx(H.Typography,{type:"h2",children:r}),b.jsx(Qi.MarkdownRichText,{className:Of.markdown,text:n})]}),Cd=({body:n,contactFooter:r,privacyOptions:i,protection:s})=>{const[u,c]=N.useState("");return N.useEffect(()=>{c(n)},[n]),b.jsxs("div",{className:Af.root,children:[b.jsx(Qi.HtmlContent,{className:Af.staticHtml,html:u}),b.jsx(H.Divider,{}),b.jsx(lE,{body:s.body,title:s.title}),b.jsx(H.Divider,{}),b.jsx(oE,{cta:i.cta,portabilityBody:i.portabilityBody,portabilityCta:i.portabilityCta,portabilityTitle:i.portabilityTitle,title:i.title}),b.jsx(H.Divider,{}),b.jsx(Sd,{body:r.body,cta:r.cta})]})},fE=({block:n})=>{const r=()=>{var _,T,y,R,V;return{cta:((_=n.privacyOptions)==null?void 0:_.cta)??"",portabilityBody:((T=n.privacyOptions)==null?void 0:T.portabilityBody)??"",portabilityCta:((y=n.privacyOptions)==null?void 0:y.portabilityCta)??"",portabilityTitle:((R=n.privacyOptions)==null?void 0:R.portabilityTitle)??"",title:((V=n.privacyOptions)==null?void 0:V.title)??""}},i=()=>{var _,T;return{body:((_=n.protection)==null?void 0:_.body)??"",title:((T=n.protection)==null?void 0:T.title)??""}},s=(n==null?void 0:n.body)??"",u=wd(n==null?void 0:n.contactFooter),c=r(),h=i();return b.jsx(Cd,{body:s,contactFooter:u,privacyOptions:c,protection:h})},dE="_root_iby5v_120",hE={root:dE},Rf=({title:n})=>n?b.jsxs(b.Fragment,{children:[b.jsx(H.CardHeader,{className:hE.root,as:"h2",headline:n}),b.jsx(H.Divider,{})]}):null,pE="_root_13vwj_120",_E={root:pE},gE=({dynamicContent:n,onError:r,onSubmit:i})=>{var u;const s=Dy(800);return b.jsxs(H.Card,{borderRadius:s,withoutPadding:!0,allowedElement:Rf,className:_E.root,children:[b.jsx(Rf,{title:(u=n==null?void 0:n.cardHeader)==null?void 0:u.title}),b.jsx(H.CardBody,{withoutPadding:!0,children:n&&n.blocks.map((c,h)=>{switch(c.__component){case"core-components.sponsor-card":return b.jsx(BS,{block:c,isDesktop:s,onError:r??(()=>console.log("Error in SponsorCardForm")),onSubmit:i??(()=>console.log("Submit in SponsorCardForm"))},`${c.__component}_${h}`);case"core-components.persuasion-image-set":return b.jsx(d0,{block:c},`${c.__component}_${h}`);case"core-components.persuasion-content":return b.jsx(a0,{block:c},`${c.__component}_${h}`);case"core-components.legal":return b.jsx(HS,{block:c},`${c.__component}_${h}`);case"core-components.privacy":return b.jsx(fE,{block:c},`${c.__component}_${h}`)}})})]})};exports.DynamicRenderer=gE;exports.LAYOUT_BLOCK=bn;exports.Layout=gu;exports.Legal=Ed;exports.Privacy=Cd;exports.SponsorCardForm=Td;
|
package/index.mjs
CHANGED