PageSourceSearch

https://zarling.de/assets/karriere._slug.bewerben-BBnAgfBF.js

js zarling.de collected 2026-10-04 14:30:35 UTC 90,446 bytes, 1 lines download raw bytes

1import{c as qs,z as te,r as Ve,j as h,A as Hs,s as Gs,C as Js,a as Xs,D as Ys,u as Ks,d as zt,B as Wt,L as Qs}from"./index-C6YLMTId.js";import{c as er,u as tr}from"./createServerFn-DrfpnV3T.js";import{P as sr,S as rr}from"./Section-C8T5Sl2S.js";import{I as je}from"./input-OVuS9gmf.js";import{C as qt,T as ar}from"./checkbox-C7ZHBqSw.js";import{L as nr}from"./loader-circle-BcXNzjPv.js";import"./index-Cn_6cv76.js";const ir=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],or=qs("x",ir);var Xe=t=>t.type==="checkbox",Oe=t=>t instanceof Date,ne=t=>t==null;const ks=t=>typeof t=="object";var U=t=>!ne(t)&&!Array.isArray(t)&&ks(t)&&!Oe(t),lr=t=>U(t)&&t.target?Xe(t.target)?t.target.checked:t.target.value:t,dr=(t,e)=>e.split(".").some((s,r,a)=>!isNaN(Number(s))&&t.has(a.slice(0,r).join("."))),ur=t=>{const e=t.constructor&&t.constructor.prototype;return U(e)&&e.hasOwnProperty("isPrototypeOf")},St=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function G(t){if(t instanceof Date)return new Date(t);const e=typeof FileList<"u"&&t instanceof FileList;if(St&&(t instanceof Blob||e))return t;const s=Array.isArray(t);if(!s&&!(U(t)&&ur(t)))return t;const r=s?[]:Object.create(Object.getPrototypeOf(t));for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=G(t[a]));return r}var ot=t=>/^\w*$/.test(t),P=t=>t===void 0,Ct=t=>Array.isArray(t)?t.filter(Boolean):[],Tt=t=>Ct(t.replace(/["|']|\]/g,"").split(/\.|\[/)),x=(t,e,s)=>{if(!e||!U(t))return s;const a=(ot(e)?[e]:Tt(e)).reduce((n,o)=>ne(n)?void 0:n[o],t);return P(a)||a===t?P(t[e])?s:t[e]:a},_e=t=>typeof t=="boolean",ge=t=>typeof t=="function",M=(t,e,s)=>{let r=-1;const a=ot(e)?[e]:Tt(e),n=a.length,o=n-1;for(;++r<n;){const l=a[r];let g=s;if(r!==o){const v=t[l];g=U(v)||Array.isArray(v)?v:isNaN(+a[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;t[l]=g,t=t[l]}};const Re={BLUR:"blur",FOCUS_OUT:"focusout",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},pe={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},he={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},gt="form",ws="root",cr=te.createContext(null);cr.displayName="HookFormControlContext";var fr=(t,e,s,r=!0)=>{const a={defaultValues:e._defaultValues};for(const n in t)Object.defineProperty(a,n,{get:()=>{const o=n;return e._proxyFormState[o]!==pe.all&&(e._proxyFormState[o]=!r||pe.all),t[o]}});return a};const hr=typeof window<"u"?te.useLayoutEffect:te.useEffect;var Q=t=>typeof t=="string",mr=(t,e,s,r,a)=>Q(t)?(r&&e.watch.add(t),x(s,t,a)):Array.isArray(t)?t.map(n=>(r&&e.watch.add(n),x(s,n))):(r&&(e.watchAll=!0),s),vt=t=>ne(t)||!ks(t);function be(t,e,s=new WeakSet){if(t===e)return!0;if(vt(t)||vt(e))return Object.is(t,e);if(Oe(t)&&Oe(e))return Object.is(t.getTime(),e.getTime());const r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;if(s.has(t)||s.has(e))return!0;s.add(t),s.add(e);for(const n of r){const o=t[n];if(!(n in e))return!1;if(n!=="ref"){const l=e[n];if(Oe(o)&&Oe(l)||(U(o)||Array.isArray(o))&&(U(l)||Array.isArray(l))?!be(o,l,s):!Object.is(o,l))return!1}}return!0}const gr=te.createContext(null);gr.displayName="HookFormContext";var pr=(t,e,s,r,a)=>e?{...s[t],types:{...s[t]&&s[t].types?s[t].types:{},[r]:a||!0}}:{},qe=t=>Array.isArray(t)?t:[t],Ht=()=>{let t=[];return{get observers(){return t},next:a=>{for(const n of t)n.next&&n.next(a)},subscribe:a=>(t.push(a),{unsubscribe:()=>{t=t.filter(n=>n!==a)}}),unsubscribe:()=>{t=[]}}};function As(t,e){const s={};for(const r in t)if(t.hasOwnProperty(r)){const a=t[r],n=e[r];if(a&&U(a)&&n){const o=As(a,n);U(o)&&(s[r]=o)}else t[r]&&(s[r]=n)}return s}var K=t=>U(t)&&!Object.keys(t).length,Vt=t=>t.type==="file",et=t=>{if(!St)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Ns=t=>t.type==="select-multiple",Ot=t=>t.type==="radio",yr=t=>Ot(t)||Xe(t),pt=t=>et(t)&&t.isConnected;function vr(t,e){const s=e.slice(0,-1).length;let r=0;for(;r<s;)t=P(t)?r++:t[e[r++]];return t}function _r(t){for(const e in t)if(t.hasOwnProperty(e)&&!P(t[e]))return!1;return!0}function W(t,e){if(Q(e)&&Object.prototype.hasOwnProperty.call(t,e))return delete t[e],t;const s=Array.isArray(e)?e:ot(e)?[e]:Tt(e),r=s.length===1?t:vr(t,s),a=s.length-1,n=s[a];return r&&delete r[n],a!==0&&(U(r)&&K(r)||Array.isArray(r)&&_r(r))&&W(t,s.slice(0,-1)),t}var xr=t=>{for(const e in t)if(ge(t[e]))return!0;return!1};function Ss(t){return Array.isArray(t)||U(t)&&!xr(t)}function _t(t,e={}){for(const s in t){const r=t[s];Ss(r)?(e[s]=Array.isArray(r)?[]:{}
1,_t(r,e[s])):P(r)||(e[s]=!0)}return e}function ze(t,e,s){s||(s=_t(e));for(const r in t){const a=t[r];if(Ss(a))P(e)||vt(s[r])?s[r]=_t(a,Array.isArray(a)?[]:{}):ze(a,ne(e)?{}:e[r],s[r]);else{const n=e[r];s[r]=!be(a,n)}}return s}const Gt={value:!1,isValid:!1},Jt={value:!0,isValid:!0};var Cs=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(s=>s&&s.checked&&!s.disabled).map(s=>s.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!P(t[0].attributes.value)?P(t[0].value)||t[0].value===""?Jt:{value:t[0].value,isValid:!0}:Jt:Gt}return Gt},Ts=(t,{valueAsNumber:e,valueAsDate:s,setValueAs:r})=>P(t)?t:e?t===""?NaN:t&&+t:s&&Q(t)?new Date(t):r?r(t):t;const Xt={isValid:!1,value:null};var Vs=t=>Array.isArray(t)?t.reduce((e,s)=>s&&s.checked&&!s.disabled?{isValid:!0,value:s.value}:e,Xt):Xt;function Yt(t){const e=t.ref;return Vt(e)?e.files:Ot(e)?Vs(t.refs).value:Ns(e)?[...e.selectedOptions].map(({value:s})=>s):Xe(e)?Cs(t.refs).value:Ts(P(e.value)?t.ref.value:e.value,t)}var br=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,kr=(t,e,s,r)=>{const a={};for(const n of t){const o=x(e,n);o&&M(a,n,o._f)}return{criteriaMode:s,names:[...t],fields:a,shouldUseNativeValidation:r}},tt=t=>t instanceof RegExp,Be=t=>P(t)?t:tt(t)?t.source:U(t)?tt(t.value)?t.value.source:t.value:t,Kt=t=>({isOnSubmit:!t||t===pe.onSubmit,isOnBlur:t===pe.onBlur,isOnChange:t===pe.onChange,isOnAll:t===pe.all,isOnTouch:t===pe.onTouched});const Qt="AsyncFunction";var wr=t=>!!t&&!!t.validate&&!!(ge(t.validate)&&t.validate.constructor.name===Qt||U(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===Qt)),Ar=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),es=(t,e,s)=>!s&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const He=(t,e,s,r)=>{for(const a of s||Object.keys(t)){const n=x(t,a);if(n){const{_f:o,...l}=n;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],a)&&!r)return!0;if(o.ref&&e(o.ref,o.name)&&!r)return!0;if(He(l,e))break}else if(U(l)&&He(l,e))break}}};function ts(t,e,s){const r=x(t,s);if(r||ot(s))return{error:r,name:s};const a=s.split(".");for(;a.length;){const n=a.join("."),o=x(e,n),l=x(t,n);if(o&&!Array.isArray(o)&&s!==n)return{name:s};if(l&&l.type)return{name:n,error:l};if(l&&l.root&&l.root.type)return{name:`${n}.root`,error:l.root};a.pop()}return{name:s}}var Nr=(t,e,s,r)=>{s(t);const{name:a,...n}=t;return K(n)||Object.keys(n).length>=Object.keys(e).length||Object.keys(n).find(o=>e[o]===(!r||pe.all))},Sr=(t,e,s)=>!t||!e||t===e||qe(t).some(r=>r&&(s?r===e:r.startsWith(e)||e.startsWith(r))),Cr=(t,e,s,r,a)=>a.isOnAll?!1:!s&&a.isOnTouch?!(e||t):(s?r.isOnBlur:a.isOnBlur)?!t:(s?r.isOnChange:a.isOnChange)?t:!0,Tr=(t,e)=>!Ct(x(t,e)).length&&W(t,e),Vr=(t,e,s)=>{const r=qe(x(t,s));return M(r,ws,e[s]),M(t,s,r),t};function ss(t,e,s="validate"){if(Q(t)||Array.isArray(t)&&t.every(Q)||_e(t)&&!t)return{type:s,message:Q(t)?t:"",ref:e}}var Fe=t=>U(t)&&!tt(t)?t:{value:t,message:""},rs=async(t,e,s,r,a,n)=>{const{ref:o,refs:l,required:g,maxLength:v,minLength:A,min:D,max:$,pattern:T,validate:de,name:R,valueAsNumber:se,mount:re}=t._f,E=x(s,R);if(!re||e.has(R))return{};const ue=l?l[0]:o,oe=O=>{a&&ue.reportValidity&&(ue.setCustomValidity(_e(O)?"":O||""),ue.reportValidity())},z={},w=Ot(o),J=Xe(o),H=w||J,B=(se||Vt(o))&&P(o.value)&&P(E)||et(o)&&o.value===""||E===""||Array.isArray(E)&&!E.length,X=pr.bind(null,R,r,z),ce=(O,Z,L,Y=he.maxLength,ye=he.minLength)=>{const fe=O?Z:L;z[R]={type:O?Y:ye,message:fe,ref:o,...X(O?Y:ye,fe)}};if(n?!Array.isArray(E)||!E.length:g&&(!H&&(B||ne(E))||_e(E)&&!E||J&&!Cs(l).isValid||w&&!Vs(l).isValid)){const{value:O,message:Z}=Q(g)?{value:!!g,message:g}:Fe(g);if(O&&(z[R]={type:he.required,message:Z,ref:ue,...X(he.required,Z)},!r))return oe(Z),z}if(!B&&(!ne(D)||!ne($))){let O,Z;const L=Fe($),Y=Fe(D);if(!ne(E)&&!isNaN(E)){const ye=o.valueAsNumber||E&&+E;ne(L.value)||(O=ye>L.value),ne(Y.value)||(Z=ye<Y.value)}else{const ye=o.valueAsDate||new Date(E),fe=Ye=>new Date(new Date().toDateString()+" "+Ye),$e=o.type=="time",we=o.type=="week";Q(L.value)&&E&&(O=$e?fe(E)>fe(L.value):we?E>L.value:ye>new Date(L.value)),Q(Y.value)&&E&&(Z=$e?fe(E)<fe(Y.value):we?E<Y.value:ye<new Date(Y.value))}if((O||Z)&&(ce(!!O,L.message,Y.message,he.max,he.min),!r))return oe(z[R
1].message),z}if((v||A)&&!B&&(Q(E)||n&&Array.isArray(E))){const O=Fe(v),Z=Fe(A),L=!ne(O.value)&&E.length>+O.value,Y=!ne(Z.value)&&E.length<+Z.value;if((L||Y)&&(ce(L,O.message,Z.message),!r))return oe(z[R].message),z}if(T&&!B&&Q(E)){const{value:O,message:Z}=Fe(T);if(tt(O)&&!E.match(O)&&(z[R]={type:he.pattern,message:Z,ref:o,...X(he.pattern,Z)},!r))return oe(Z),z}if(de){if(ge(de)){const O=await de(E,s),Z=ss(O,ue);if(Z&&(z[R]={...Z,...X(he.validate,Z.message)},!r))return oe(Z.message),z}else if(U(de)){let O={};for(const Z in de){if(!K(O)&&!r)break;const L=ss(await de[Z](E,s),ue,Z);L&&(O={...L,...X(Z,L.message)},oe(L.message),r&&(z[R]=O))}if(!K(O)&&(z[R]={ref:ue,...O},!r))return z}}return oe(!0),z};const Or={mode:pe.onSubmit,reValidateMode:pe.onChange,shouldFocusError:!0};function Er(t={}){let e={...Or,...t},s={submitCount:0,isDirty:!1,isReady:!1,isLoading:ge(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},a=U(e.defaultValues)||U(e.values)?G(e.defaultValues||e.values)||{}:{},n=e.shouldUnregister?{}:G(a),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},g,v=0;const A={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},D={...A};let $={...D};const T={array:Ht(),state:Ht()},de=e.criteriaMode===pe.all,R=i=>d=>{clearTimeout(v),v=setTimeout(i,d)},se=async i=>{if(!o.keepIsValid&&!e.disabled&&(D.isValid||$.isValid||i)){let d;e.resolver?(d=K((await B()).errors),re()):d=await O({fields:r,onlyCheckValid:!0,eventType:Re.VALID}),d!==s.isValid&&T.state.next({isValid:d})}},re=(i,d)=>{!e.disabled&&(D.isValidating||D.validatingFields||$.isValidating||$.validatingFields)&&((i||Array.from(l.mount)).forEach(u=>{u&&(d?M(s.validatingFields,u,d):W(s.validatingFields,u))}),T.state.next({validatingFields:s.validatingFields,isValidating:!K(s.validatingFields)}))},E=i=>{const d=ze(a,n),u=br(i);M(s.dirtyFields,u,x(d,u))},ue=(i,d=[],u,p,m=!0,f=!0)=>
1{if(p&&u&&!e.disabled){if(o.action=!0,f&&Array.isArray(x(r,i))){const _=u(x(r,i),p.argA,p.argB);m&&M(r,i,_)}if(f&&Array.isArray(x(s.errors,i))){const _=u(x(s.errors,i),p.argA,p.argB);m&&M(s.errors,i,_),Tr(s.errors,i)}if((D.touchedFields||$.touchedFields)&&f&&Array.isArray(x(s.touchedFields,i))){const _=u(x(s.touchedFields,i),p.argA,p.argB);m&&M(s.touchedFields,i,_)}(D.dirtyFields||$.dirtyFields)&&E(i),T.state.next({name:i,isDirty:L(i,d),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else M(n,i,d)},oe=(i,d)=>{M(s.errors,i,d),T.state.next({errors:s.errors})},z=i=>{s.errors=i,T.state.next({errors:s.errors,isValid:!1})},w=(i,d,u,p)=>{const m=x(r,i);if(m){const f=x(n,i,P(u)?x(a,i):u);P(f)||p&&p.defaultChecked||d?M(n,i,d?f:Yt(m._f)):fe(i,f),o.mount&&!o.action&&se()}},J=(i,d,u,p,m)=>{let f=!1,_=!1;const C={name:i};if(!e.disabled){if(!u||p){(D.isDirty||$.isDirty)&&(_=s.isDirty,s.isDirty=C.isDirty=L(),f=_!==C.isDirty);const F=be(x(a,i),d);_=!!x(s.dirtyFields,i),F?W(s.dirtyFields,i):M(s.dirtyFields,i,!0),C.dirtyFields=s.dirtyFields,f=f||(D.dirtyFields||$.dirtyFields)&&_!==!F}if(u){const F=x(s.touchedFields,i);F||(M(s.touchedFields,i,u),C.touchedFields=s.touchedFields,f=f||(D.touchedFields||$.touchedFields)&&F!==u)}f&&m&&T.state.next(C)}return f?C:{}},H=(i,d,u,p)=>{const m=x(s.errors,i),f=(D.isValid||$.isValid)&&_e(d)&&s.isValid!==d;if(e.delayError&&u?(g=R(()=>oe(i,u)),g(e.delayError)):(clearTimeout(v),g=null,u?M(s.errors,i,u):W(s.errors,i)),(u?!be(m,u):m)||!K(p)||f){const _={...p,...f&&_e(d)?{isValid:d}:{},errors:s.errors,name:i};s={...s,..._},T.state.next(_)}},B=async i=>(re(i,!0),await e.resolver(n,e.context,kr(i||l.mount,r,e.criteriaMode,e.shouldUseNativeValidation))),X=async i=>{const{errors:d}=await B(i);if(re(i),i)for(const u of i){const p=x(d,u);p?M(s.errors,u,p):W(s.errors,u)}else s.errors=d;return d},ce=async({name:i,eventType:d})=>{if(t.validate){const u=await t.validate({formValues:n,formState:s,name:i,eventType:d});if(U(u))for(const p in u)u[p]&&Ke(`${gt}.${p}`,{message:Q(u.message)?u.message:"",type:he.validate});else Q(u)||!u?Ke(gt,{message:u||"",type:he.validate}):It(gt);return u}return!0},O=async({fields:i,onlyCheckValid:d,name:u,eventType:p,context:m={valid:!0,runRootValidation:!1}})=>{if(t.validate&&(m.runRootValidation=!0,!await ce({name:u,eventType:p})&&(m.valid=!1,d)))return m.valid;for(const f in i){const _=i[f];if(_){const{_f:C,...F}=_;if(C){const ee=l.array.has(C.name),ve=_._f&&wr(_._f);ve&&D.validatingFields&&re([C.name],!0);const ae=await rs(_,l.disabled,n,de,e.shouldUseNativeValidation&&!d,ee);if(ve&&D.validatingFields&&re([C.name]),ae[C.name]&&(m.valid=!1,d)||(!d&&(x(ae,C.name)?ee?Vr(s.errors,ae,C.name):M(s.errors,C.name,ae[C.name]):W(s.errors,C.name)),t.shouldUseNativeValidation&&ae[C.name]))break}!K(F)&&await O({context:m,onlyCheckValid:d,fields:F,name:f,eventType:p})}}return m.valid},Z=()=>{for(const i of l.unMount){const d=x(r,i);d&&(d._f.refs?d._f.refs.every(u=>!pt(u)):!pt(d._f.ref))&&ut(i)}l.unMount=new Set},L=(i,d)=>!e.disabled&&(i&&d&&M(n,i,d),!be(Rt(),a)),Y=(i,d,u)=>mr(i,l,{...o.mount?n:P(d)?a:Q(i)?{[i]:d}:d},u,d),ye=i=>Ct(x(o.mount?n:a,i,e.shouldUnregister?x(a,i,[]):[])),fe=(i,d,u={})=>{const p=x(r,i);let m=d;if(p){const f=p._f;f&&(!f.disabled&&M(n,i,Ts(d,f)),m=et(f.ref)&&ne(d)?"":d,Ns(f.ref)?[...f.ref.options].forEach(_=>_.selected=m.includes(_.value)):f.refs?Xe(f.ref)?f.refs.forEach(_=>{(!_.defaultChecked||!_.disabled)&&(Array.isArray(m)?_.checked=!!m.find(C=>C===_.value):_.checked=m===_.value||!!m)}):f.refs.forEach(_=>_.checked=_.value===m):Vt(f.ref)?f.ref.value="":(f.ref.value=m,f.ref.type||T.state.next({name:i,values:G(n)})))}(u.shouldDirty||u.shouldTouch)&&J(i,m,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&dt(i)},$e=(i,d,u)=>{for(const p in d){if(!d.hasOwnProperty(p))return;const m=d[p],f=i+"."+p,_=x(r,f);(l.array.has(i)||U(m)||_&&!_._f)&&!Oe(m)?$e(f,m,u):fe(f,m,u)}},we=(i,d,u={})=>{const p=x(r,i),m=l.array.has(i),f=G(d),_=x(n,i),C=be(_,f);if(M(n,i,f),m)T.array.next({name:i,values:G(n)}),u.shouldDirty&&(E(i),T.state.next({name:i,dirtyFields:s.dirtyFields,isDirty:L(i,f)}));else{const F=Array.isArray(f)&&!f.length||K(f);
1!p||p._f||ne(f)||F?fe(i,f,u):$e(i,f,u)}C||(es(i,l)?T.state.next({...s,name:i,values:G(n)}):T.state.next({name:o.mount?i:void 0,values:G(n)}))},Ye=async i=>{o.mount=!0;const d=i.target;let u=d.name,p=!0;const m=x(r,u),f=F=>{p=Number.isNaN(F)||Oe(F)&&isNaN(F.getTime())||be(F,x(n,u,F))},_=Kt(e.mode),C=Kt(e.reValidateMode);if(m){let F,ee;const ve=d.type?Yt(m._f):lr(i),ae=i.type===Re.BLUR||i.type===Re.FOCUS_OUT,Us=!Ar(m._f)&&!t.validate&&!e.resolver&&!x(s.errors,u)&&!m._f.deps||Cr(ae,x(s.touchedFields,u),s.isSubmitted,C,_),ht=es(u,l,ae);M(n,u,ve),ae?(!d||!d.readOnly)&&(m._f.onBlur&&m._f.onBlur(i),g&&g(0)):m._f.onChange&&m._f.onChange(i);const mt=J(u,ve,ae),zs=!K(mt)||ht;if(!ae&&T.state.next({name:u,type:i.type,values:G(n)}),Us)return(D.isValid||$.isValid)&&(e.mode==="onBlur"?ae&&se():ae||se()),zs&&T.state.next({name:u,...ht?{}:mt});if(!e.resolver&&t.validate&&await ce({name:u,eventType:i.type}),!ae&&ht&&T.state.next({...s}),e.resolver){const{errors:Bt}=await B([u]);if(re([u]),f(ve),p){const Ws=ts(s.errors,r,u),Ut=ts(Bt,r,Ws.name||u);F=Ut.error,u=Ut.name,ee=K(Bt)}}else re([u],!0),F=(await rs(m,l.disabled,n,de,e.shouldUseNativeValidation))[u],re([u]),f(ve),p&&(F?ee=!1:(D.isValid||$.isValid)&&(ee=await O({fields:r,onlyCheckValid:!0,name:u,eventType:i.type})));p&&(m._f.deps&&(!Array.isArray(m._f.deps)||m._f.deps.length>0)&&dt(m._f.deps),H(u,ee,F,mt))}},jt=(i,d)=>{if(x(s.errors,d)&&i.focus)return i.focus(),1},dt=async(i,d={})=>{let u,p;const m=qe(i);if(e.resolver){const f=await X(P(i)?i:m);u=K(f),p=i?!m.some(_=>x(f,_)):u}else i?(p=(await Promise.all(m.map(async f=>{const _=x(r,f);return await O({fields:_&&_._f?{[f]:_}:_,eventType:Re.TRIGGER})}))).every(Boolean),!(!p&&!s.isValid)&&se()):p=u=await O({fields:r,name:i,eventType:Re.TRIGGER});return T.state.next({...!Q(i)||(D.isValid||$.isValid)&&u!==s.isValid?{}:{name:i},...e.resolver||!i?{isValid:u}:{},errors:s.errors}),d.shouldFocus&&!p&&He(r,jt,i?m:l.mount),p},Rt=(i,d)=>{let u={...o.mount?n:a};return d&&(u=As(d.dirtyFields?s.dirtyFields:s.touchedFields,u)),P(i)?u:Q(i)?x(u,i):i.map(p=>x(u,p))},Ft=(i,d)=>({invalid:!!x((d||s).errors,i),isDirty:!!x((d||s).dirtyFields,i),error:x((d||s).errors,i),isValidating:!!x(s.validatingFields,i),isTouched:!!x((d||s).touchedFields,i)}),It=i=>{const d=i?qe(i):void 0;d?.forEach(u=>W(s.errors,u)),d?d.forEach(u=>{T.state.next({name:u,errors:s.errors})}):T.state.next({errors:{}})},Ke=(i,d,u)=>{const p=(x(r,i,{_f:{}})._f||{}).ref,m=x(s.errors,i)||{},{ref:f,message:_,type:C,...F}=m;M(s.errors,i,{...F,...d,ref:p}),T.state.next({name:i,errors:s.errors,isValid:!1}),u&&u.shouldFocus&&p&&p.focus&&p.focus()},Zs=(i,d)=>ge(i)?T.state.subscribe({next:u=>"values"in u&&i(u.values||Y(void 0,d),u)}):Y(i,d,!0),Dt=i=>T.state.subscribe({next:d=>{if(Sr(i.name,d.name,i.exact)&&Nr(d,i.formState||D,Bs,i.reRenderRoot)){const u={...n};i.callback({values:u,...s,...d,defaultValues:a})}}}).unsubscribe,Ls=i=>(o.mount=!0,$={...$,...i.formState},Dt({...i,formState:{...A,...i.formState}})),ut=(i,d={})=>{for(const u of i?qe(i):l.mount)l.mount.delete(u),l.array.delete(u),d.keepValue||(W(r,u),W(n,u)),!d.keepError&&W(s.errors,u),!d.keepDirty&&W(s.dirtyFields,u),!d.keepTouched&&W(s.touchedFields,u),!d.keepIsValidating&&W(s.validatingFields,u),!e.shouldUnregister&&!d.keepDefaultValue&&W(a,u);T.state.next({values:G(n)}),T.state.next({...s,...d.keepDirty?{isDirty:L()}:{}}),!d.keepIsValid&&se()},Zt=({disabled:i,name:d})=>{if(_e(i)&&o.mount||i||l.disabled.has(d)){const m=l.disabled.has(d)!==!!i;i?l.disabled.add(d):l.disabled.delete(d),m&&o.mount&&!o.action&&se()}},ct=(i,d={})=>{let u=x(r,i);const p=_e(d.disabled)||_e(e.disabled),m=!l.registerName.has(i)&&u&&u._f&&!u._f.mount;return M(r,i,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:i}},name:i,mount:!0,...d}}),l.mount.add(i),u&&!m?Zt({disabled:_e(d.disabled)?d.disabled:e.disabled,name:i}):w(i,!0,d.value),{...p?{disabled:d.disabled||e.disabled}:{},...e.progressive?{required:!!d.required,min:Be(d.min),max:Be(d.max),minLength:Be(d.minLength),maxLength:Be(d.maxLength),pattern:Be(d.pattern)}:{},name:i,onChange:Ye,onBlur:Ye,ref:f=>{if(f){l.registerName.add(i),ct(i,d),l.registerName.delete(i),u=x(r,i);const _=P(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,C=yr(_),F=u._f.refs||[];if(C?F.find(ee=>ee===_):_===u._f.ref)return;M(r,i,{_f:{...u._f,...C?{refs:[...F.filter(pt),_,...Array.isArray(x(a,i))?[{}]:[]],ref:{type:_.type,name:i}}:{ref:_}}}),w(i,!1,void 0,_)}else u=x(r,i,{}),u._f&&(u._f.mount=!1),(e.shouldUnregister||d.shouldUnregister)&&!(dr(l.array,i)&&o.action)&&l.unMount.add(i)}}},ft=()=>e.shouldFocusError&&He(r,jt,l.mount),Ms=i=>{_e(i)&&(T.state.next({disabled:i}),He(r,(d,u)=>{const p=x(r,u);p&&(d.disabled=p._f.disabled||i,Array.isArray(p._f.refs)&&p._f.refs.forEac
vendor: 4,300 bytes, line 1
1h(m=>{m.disabled=p._f.disabled||i}))},0,!1))},Lt=(i,d)=>async u=>{let p;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let m=G(n);if(T.state.next({isSubmitting:!0}),e.resolver){const{errors:f,values:_}=await B();re(),s.errors=f,m=G(_)}else await O({fields:r,eventType:Re.SUBMIT});if(l.disabled.size)for(const f of l.disabled)W(m,f);if(W(s.errors,ws),K(s.errors)){T.state.next({errors:{}});try{await i(m,u)}catch(f){p=f}}else d&&await d({...s.errors},u),ft(),setTimeout(ft);if(T.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:K(s.errors)&&!p,submitCount:s.submitCount+1,errors:s.errors}),p)throw p},Ps=(i,d={})=>{x(r,i)&&(P(d.defaultValue)?we(i,G(x(a,i))):(we(i,d.defaultValue),M(a,i,G(d.defaultValue))),d.keepTouched||W(s.touchedFields,i),d.keepDirty||(W(s.dirtyFields,i),s.isDirty=d.defaultValue?L(i,G(x(a,i))):L()),d.keepError||(W(s.errors,i),D.isValid&&se()),T.state.next({...s}))},Mt=(i,d={})=>{const u=i?G(i):a,p=G(u),m=K(i),f=m?a:p;if(d.keepDefaultValues||(a=u),!d.keepValues){if(d.keepDirtyValues){const _=new Set([...l.mount,...Object.keys(ze(a,n))]);for(const C of Array.from(_)){const F=x(s.dirtyFields,C),ee=x(n,C),ve=x(f,C);F&&!P(ee)?M(f,C,ee):!F&&!P(ve)&&we(C,ve)}}else{if(St&&P(i))for(const _ of l.mount){const C=x(r,_);if(C&&C._f){const F=Array.isArray(C._f.refs)?C._f.refs[0]:C._f.ref;if(et(F)){const ee=F.closest("form");if(ee){ee.reset();break}}}}if(d.keepFieldsRef)for(const _ of l.mount)we(_,x(f,_));else r={}}n=e.shouldUnregister?d.keepDefaultValues?G(a):{}:G(f),T.array.next({values:{...f}}),T.state.next({values:{...f}})}l={mount:d.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!D.isValid||!!d.keepIsValid||!!d.keepDirtyValues||!e.shouldUnregister&&!K(f),o.watch=!!e.shouldUnregister,o.keepIsValid=!!d.keepIsValid,o.action=!1,d.keepErrors||(s.errors={}),T.state.next({submitCount:d.keepSubmitCount?s.submitCount:0,isDirty:m?!1:d.keepDirty?s.isDirty:!!(d.keepDefaultValues&&!be(i,a)),isSubmitted:d.keepIsSubmitted?s.isSubmitted:!1,dirtyFields:m?{}:d.keepDirtyValues?d.keepDefaultValues&&n?ze(a,n):s.dirtyFields:d.keepDefaultValues&&i?ze(a,i):d.keepDirty?s.dirtyFields:{},touchedFields:d.keepTouched?s.touchedFields:{},errors:d.keepErrors?s.errors:{},isSubmitSuccessful:d.keepIsSubmitSuccessful?s.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Pt=(i,d)=>Mt(ge(i)?i(n):i,{...e.resetOptions,...d}),$s=(i,d={})=>{const u=x(r,i),p=u&&u._f;if(p){const m=p.refs?p.refs[0]:p.ref;m.focus&&setTimeout(()=>{m.focus(),d.shouldSelect&&ge(m.select)&&m.select()})}},Bs=i=>{s={...s,...i}},$t={control:{register:ct,unregister:ut,getFieldState:Ft,handleSubmit:Lt,setError:Ke,_subscribe:Dt,_runSchema:B,_updateIsValidating:re,_focusError:ft,_getWatch:Y,_getDirty:L,_setValid:se,_setFieldArray:ue,_setDisabledField:Zt,_setErrors:z,_getFieldArray:ye,_reset:Mt,_resetDefaultValues:()=>ge(e.defaultValues)&&e.defaultValues().then(i=>{Pt(i,e.resetOptions),T.state.next({isLoading:!1})}),_removeUnmounted:Z,_disableForm:Ms,_subjects:T,_proxyFormState:D,get _fields(){return r},get _formValues(){return n},get _state(){return o},set _state(i){o=i},get _defaultValues(){return a},get _names(){return l},set _names(i){l=i},get _formState(){return s},get _options(){return e},set _options(i){e={...e,...i}}},subscribe:Ls,trigger:dt,register:ct,handleSubmit:Lt,watch:Zs,setValue:we,getValues:Rt,reset:Pt,resetField:Ps,clearErrors:It,unregister:ut,setError:Ke,setFocus:$s,getFieldState:Ft};return{...$t,formControl:$t}}function jr(t={}){const e=te.useRef(void 0),s=te.useRef(void 0),[r,a]=te.useState({isDirty:!1,isValidating:!1,isLoading:ge(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:ge(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!ge(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:o,...l}=Er(t);e.current={...l,formState:r}}const n=e.current.control;return n._options=t,hr(()=>{const o=n._subscribe({formState:n._proxyFormState,callback:()=>a({...n._formState}
1),reRenderRoot:!0});return a(l=>({...l,isReady:!0})),n._formState.isReady=!0,o},[n]),te.useEffect(()=>n._disableForm(t.disabled),[n,t.disabled]),te.useEffect(()=>{t.mode&&(n._options.mode=t.mode),t.reValidateMode&&(n._options.reValidateMode=t.reValidateMode)},[n,t.mode,t.reValidateMode]),te.useEffect(()=>{t.errors&&(n._setErrors(t.errors),n._focusError())},[n,t.errors]),te.useEffect(()=>{t.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,t.shouldUnregister]),te.useEffect(()=>{if(n._proxyFormState.isDirty){const o=n._getDirty();o!==r.isDirty&&n._subjects.state.next({isDirty:o})}},[n,r.isDirty]),te.useEffect(()=>{var o;t.values&&!be(t.values,s.current)?(n._reset(t.values,{keepFieldsRef:!0,...n._options.resetOptions}),!((o=n._options.resetOptions)===null||o===void 0)&&o.keepIsValid||n._setValid(),s.current=t.values,a(l=>({...l}))):n._resetDefaultValues()},[n,t.values]),te.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),e.current.formState=te.useMemo(()=>fr(r,n),[n,r]),e.current}var Rr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fr=Rr.reduce((t,e)=>{const s=Hs(`Primitive.${e}`),r=Ve.forwardRef((a,n)=>{const{asChild:o,...l}=a,g=o?s:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(g,{...l,ref:n})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),Ir="Label",Os=Ve.forwardRef((t,e)=>h.jsx(Fr.label,{...t,ref:e,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(t.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));Os.displayName=Ir;var Es=Os;const Dr=Js("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),lt=Ve.forwardRef(({className:t,...e},s)=>h.jsx(Es,{ref:s,className:Gs(Dr(),t),...e}));lt.displayName=Es.displayName;var I;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function s(a){throw new Error}t.assertNever=s,t.arrayToEnum=a=>{const n={};for(const o of a)n[o]=o;return n},t.getValidEnumValues=a=>{const n=t.objectKeys(a).filter(l=>typeof a[a[l]]!="number"),o={};for(const l of n)o[l]=a[l];return t.objectValues(o)},t.objectValues=a=>t.objectKeys(a).map(function(n){return a[n]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&n.push(o);return n},t.find=(a,n)=>{for(const o of a)if(n(o))return o},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(I||(I={}));var as;(function(t){t.mergeShapes=(e,s)=>({...e,...s})})(as||(as={}));const b=I.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ae=t=>{switch(typeof t){case"undefined":return b.undefined;case"string":return b.string;case"number":return Number.isNaN(t)?b.nan:b.number;case"boolean":return b.boolean;case"function":return b.function;case"bigint":return b.bigint;case"symbol":return b.symbol;case"object":return Array.isArray(t)?b.array:t===null?b.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?b.promise:typeof Map<"u"&&t instanceof Map?b.map:typeof Set<"u"&&t instanceof Set?b.set:typeof Date<"u"&&t instanceof Date?b.date:b.object;default:return b.unknown}}
vendor: 15,965 bytes, line 1
1,c=I.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"]);class ke extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=e}format(e){const s=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const o of n.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)r._errors.push(s(o));else{let l=r,g=0;for(;g<o.path.length;){const v=o.path[g];g===o.path.length-1?(l[v]=l[v]||{_errors:[]},l[v]._errors.push(s(o))):l[v]=l[v]||{_errors:[]},l=l[v],g++}}};return a(this),r}static assert(e){if(!(e instanceof ke))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,I.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=s=>s.message){const s={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];s[n]=s[n]||[],s[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:s}}get formErrors(){return this.flatten()}}ke.create=t=>new ke(t);const xt=(t,e)=>{let s;switch(t.code){case c.invalid_type:t.received===b.undefined?s="Required":s=`Expected ${t.expected}, received ${t.received}`;break;case c.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(t.expected,I.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:s=`Unrecognized key(s) in object: ${I.joinValues(t.keys,", ")}`;break;case c.invalid_union:s="Invalid input";break;case c.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${I.joinValues(t.options)}`;break;case c.invalid_enum_value:s=`Invalid enum value. Expected ${I.joinValues(t.options)}, received '${t.received}'`;break;case c.invalid_arguments:s="Invalid function arguments";break;case c.invalid_return_type:s="Invalid function return type";break;case c.invalid_date:s="Invalid date";break;case c.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(s=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?s=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?s=`Invalid input: must end with "${t.validation.endsWith}"`:I.assertNever(t.validation):t.validation!=="regex"?s=`Invalid ${t.validation}`:s="Invalid";break;case c.too_small:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?s=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:s="Invalid input";break;case c.too_big:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?s=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:s="Invalid input";break;case c.custom:s="Invalid input";break;case c.invalid_intersection_types:s="Intersection results could not be merged";break;case c.not_multiple_of:s=`Number must be a multiple of ${t.multipleOf}`;break;case c.not_finite:s="Number must be finite";break;default:s=e.defaultError,I.assertNever(t)}return{message:s}};let Zr=xt;function Lr(){return Zr}const Mr=t=>{const{data:e,path:s,errorMaps:r,issueData:a}=t,n=[...s,...a.path||[]],o={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let l="";const g=r.filter(v=>!!v).slice().reverse();for(const v of g)l=v(o,{data:e,defaultError:l}).message;return{...a,path:n,message:l}};function y(t,e){const s=Lr(),r=Mr({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,s,s===xt?void 0:xt].filter(a=>!!a)});t.common.issues.push(r)}class ie{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,s){const r=[];for(const a of s){if(a.status==="aborted")return N;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,s){const r=[];for(const a of s){const n=await a.key,o=await a.value;r.push({key:n,value:o})}return ie.mergeObjectSync(e,r)}static mergeObjectSync(e,s){const r={};for(const a of s){const{key:n,value:o}=a;if(n.status==="aborted"||o.status==="aborted")return N;n.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(r[n.value]=o.value)}return{status:e.value,value:r}}}const N=Object.freeze({status:"aborted"}),We=t=>({status:"dirty",value:t}),le=t=>({status:"valid",value:t}),ns=t=>t.status==="aborted",is=t=>t.status==="dirty",De=t=>t.status==="valid",st=t=>typeof Promise<"u"&&t instanceof Promise;var k;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(k||(k={}));class Ce{constructor(e,s,r,a){this._cachedPath=[],this.parent=e,this.data=s,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const os=(t,e)=>{if(De(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new ke(t.common.issues);return this._error=s,this._error}}};function V(t){if(!t)return{};const{errorMap:e,invalid_type_error:s,required_error:r,description:a}=t;if(e&&(s||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,l)=>{const{message:g}=t;return o.code==="invalid_enum_value"?{message:g??l.defaultError}:typeof l.data>"u"?{message:g??r??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:g??s??l.defaultError}},description:a}}class j{get description(){return this._def.description}_getType(e){return Ae(e.data)}_getOrReturnCtx(e,s){return s||{common:e.parent.common,data:e.data,parsedType:Ae(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ie,ctx:{common:e.parent.common,data:e.data,parsedType:Ae(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const s=this._parse(e);if(st(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(e){const s=this._parse(e);return Promise.resolve(s)}parse(e,s){const r=this.safeParse(e,s);if(r.success)return r.data;throw r.error}safeParse(e,s){const r={common:{issues:[],async:s?.async??!1,contextualErrorMap:s?.errorMap},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ae(e)},a=this._parseSync({data:e,path:r.path,parent:r});return os(r,a)}"~validate"(e){const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ae(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:s});return De(r)?{value:r.value}:{issues:s.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:s}).then(r=>De(r)?{value:r.value}:{issues:s.common.issues})}async parseAsync(e,s){const r=await this.safeParseAsync(e,s);if(r.success)return r.data;throw r.error}async safeParseAsync(e,s){const r={common:{issues:[],contextualErrorMap:s?.errorMap,async:!0},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ae(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(st(a)?a:Promise.resolve(a));return os(r,n)}refine(e,s){const r=a=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(a):s;return this._refinement((a,n)=>{const o=e(a),l=()=>n.addIssue({code:c.custom,...r(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(g=>g?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(e,s){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof s=="function"?s(r,a):s),!1))}_refinement(e){return new Me({schema:this,typeName:S.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:s=>this["~validate"](s)}}optional(){return Se.create(this,this._def)}nullable(){return Pe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xe.create(this)}promise(){return it.create(this,this._def)}or(e){return at.create([this,e],this._def)}and(e){return nt.create(this,e,this._def)}transform(e){return new Me({...V(this._def),schema:this,typeName:S.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const s=typeof e=="function"?e:()=>e;return new wt({...V(this._def),innerType:this,defaultValue:s,typeName:S.ZodDefault})}brand(){return new la({typeName:S.ZodBranded,type:this,...V(this._def)})}catch(e){const s=typeof e=="function"?e:()=>e;return new At({...V(this._def),innerType:this,catchValue:s,typeName:S.ZodCatch})}describe(e){const s=this.constructor;return new s({...this._def,description:e})}pipe(e){return Et.create(this,e)}readonly(){return Nt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Pr=/^c[^\s-]{8,}$/i,$r=/^[0-9a-z]+$/,Br=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ur=/^[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,zr=/^[a-z0-9_-]{21}$/i,Wr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,qr=/^[-+]?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)?)??$/,Hr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Gr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let yt;const Jr=/^(?:(?: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])$/,Xr=/^(?:(?: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])$/,Yr=/^(([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]))$/,Kr=/^(([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])$/,Qr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ea=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,js="((\\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])))",ta=new RegExp(`^${js}$`);function Rs(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const s=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${s}`}function sa(t){return new RegExp(`^${Rs(t)}$`)}function ra(t){let e=`${js}T${Rs(t)}`;const s=[];return s.push(t.local?"Z?":"Z"),t.offset&&s.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${s.join("|")})`,new RegExp(`^${e}$`)}function aa(t,e){return!!((e==="v4"||!e)&&Jr.test(t)||(e==="v6"||!e)&&Yr.test(t))}function na(t,e){if(!Wr.test(t))return!1;try{const[s]=t.split(".");if(!s)return!1;const r=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function ia(t,e){return!!((e==="v4"||!e)&&Xr.test(t)||(e==="v6"||!e)&&Kr.test(t))}class Ne extends j{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==b.string){const n=this._getOrReturnCtx(e);return y(n,{code:c.invalid_type,expected:b.string,received:n.parsedType}),N}const r=new ie;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),y(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),y(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const o=e.data.length>n.value,l=e.data.length<n.value;
vendor: 5,288 bytes, line 1
1(o||l)&&(a=this._getOrReturnCtx(e,a),o?y(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):l&&y(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),r.dirty())}else if(n.kind==="email")Hr.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"email",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="emoji")yt||(yt=new RegExp(Gr,"u")),yt.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"emoji",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="uuid")Ur.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"uuid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="nanoid")zr.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"nanoid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid")Pr.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"cuid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid2")$r.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"cuid2",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="ulid")Br.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"ulid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),y(a,{validation:"url",code:c.invalid_string,message:n.message}),r.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"regex",code:c.invalid_string,message:n.message}),r.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),y(a,{code:c.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),y(a,{code:c.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),y(a,{code:c.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()):n.kind==="datetime"?ra(n).test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{code:c.invalid_string,validation:"datetime",message:n.message}),r.dirty()):n.kind==="date"?ta.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{code:c.invalid_string,validation:"date",message:n.message}),r.dirty()):n.kind==="time"?sa(n).test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{code:c.invalid_string,validation:"time",message:n.message}),r.dirty()):n.kind==="duration"?qr.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"duration",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="ip"?aa(e.data,n.version)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"ip",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="jwt"?na(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"jwt",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="cidr"?ia(e.data,n.version)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"cidr",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="base64"?Qr.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"base64",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="base64url"?ea.test(e.data)||(a=this._getOrReturnCtx(e,a),y(a,{validation:"base64url",code:c.invalid_string,message:n.message}),r.dirty()):I.assertNever(n);return{status:r.value,value:e.data}}_regex(e,s,r){return this.refinement(a=>e.test(a),{validation:s,code:c.invalid_string,...k.errToObj(r)})}_addCheck(e){return new Ne({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...k.errToObj(e)})}url(e){return this._addCheck({kind:"url",...k.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...k.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...k.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...k.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...k.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...k.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...k.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...k.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...k.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...k.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...k.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...k.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...k.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...k.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...k.errToObj(e)})}regex(e,s){return this._addCheck({kind:"regex",regex:e,...k.errToObj(s)})}
vendor: 17,892 bytes, line 1
1includes(e,s){return this._addCheck({kind:"includes",value:e,position:s?.position,...k.errToObj(s?.message)})}startsWith(e,s){return this._addCheck({kind:"startsWith",value:e,...k.errToObj(s)})}endsWith(e,s){return this._addCheck({kind:"endsWith",value:e,...k.errToObj(s)})}min(e,s){return this._addCheck({kind:"min",value:e,...k.errToObj(s)})}max(e,s){return this._addCheck({kind:"max",value:e,...k.errToObj(s)})}length(e,s){return this._addCheck({kind:"length",value:e,...k.errToObj(s)})}nonempty(e){return this.min(1,k.errToObj(e))}trim(){return new Ne({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ne({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ne({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxLength(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}}Ne.create=t=>new Ne({checks:[],typeName:S.ZodString,coerce:t?.coerce??!1,...V(t)});function oa(t,e){const s=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=s>r?s:r,n=Number.parseInt(t.toFixed(a).replace(".","")),o=Number.parseInt(e.toFixed(a).replace(".",""));return n%o/10**a}class Ze extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==b.number){const n=this._getOrReturnCtx(e);return y(n,{code:c.invalid_type,expected:b.number,received:n.parsedType}),N}let r;const a=new ie;for(const n of this._def.checks)n.kind==="int"?I.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),y(r,{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),y(r,{code:c.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),y(r,{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?oa(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),y(r,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),y(r,{code:c.not_finite,message:n.message}),a.dirty()):I.assertNever(n);return{status:a.value,value:e.data}}gte(e,s){return this.setLimit("min",e,!0,k.toString(s))}gt(e,s){return this.setLimit("min",e,!1,k.toString(s))}lte(e,s){return this.setLimit("max",e,!0,k.toString(s))}lt(e,s){return this.setLimit("max",e,!1,k.toString(s))}setLimit(e,s,r,a){return new Ze({...this._def,checks:[...this._def.checks,{kind:e,value:s,inclusive:r,message:k.toString(a)}]})}_addCheck(e){return new Ze({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:k.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:k.toString(e)})}multipleOf(e,s){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(s)})}finite(e){return this._addCheck({kind:"finite",message:k.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:k.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:k.toString(e)})}get minValue(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxValue(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&I.isInteger(e.value))}get isFinite(){let e=null,s=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(s===null||r.value>s)&&(s=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(s)&&Number.isFinite(e)}}Ze.create=t=>new Ze({checks:[],typeName:S.ZodNumber,coerce:t?.coerce||!1,...V(t)});class Ge extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==b.bigint)return this._getInvalidInput(e);let r;const a=new ie;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),y(r,{code:c.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),y(r,{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),y(r,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):I.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const s=this._getOrReturnCtx(e);return y(s,{code:c.invalid_type,expected:b.bigint,received:s.parsedType}),N}gte(e,s){return this.setLimit("min",e,!0,k.toString(s))}gt(e,s){return this.setLimit("min",e,!1,k.toString(s))}lte(e,s){return this.setLimit("max",e,!0,k.toString(s))}lt(e,s){return this.setLimit("max",e,!1,k.toString(s))}setLimit(e,s,r,a){return new Ge({...this._def,checks:[...this._def.checks,{kind:e,value:s,inclusive:r,message:k.toString(a)}]})}_addCheck(e){return new Ge({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:k.toString(e)})}multipleOf(e,s){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(s)})}get minValue(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxValue(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}}Ge.create=t=>new Ge({checks:[],typeName:S.ZodBigInt,coerce:t?.coerce??!1,...V(t)});class ls extends j{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==b.boolean){const r=this._getOrReturnCtx(e);return y(r,{code:c.invalid_type,expected:b.boolean,received:r.parsedType}),N}return le(e.data)}}ls.create=t=>new ls({typeName:S.ZodBoolean,coerce:t?.coerce||!1,...V(t)});class rt extends j{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==b.date){const n=this._getOrReturnCtx(e);return y(n,{code:c.invalid_type,expected:b.date,received:n.parsedType}),N}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return y(n,{code:c.invalid_date}),N}const r=new ie;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),y(a,{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),y(a,{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):I.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new rt({...this._def,checks:[...this._def.checks,e]})}min(e,s){return this._addCheck({kind:"min",value:e.getTime(),message:k.toString(s)})}max(e,s){return this._addCheck({kind:"max",value:e.getTime(),message:k.toString(s)})}get minDate(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e!=null?new Date(e):null}}rt.create=t=>new rt({checks:[],coerce:t?.coerce||!1,typeName:S.ZodDate,...V(t)});class ds extends j{_parse(e){if(this._getType(e)!==b.symbol){const r=this._getOrReturnCtx(e);return y(r,{code:c.invalid_type,expected:b.symbol,received:r.parsedType}),N}return le(e.data)}}ds.create=t=>new ds({typeName:S.ZodSymbol,...V(t)});class us extends j{_parse(e){if(this._getType(e)!==b.undefined){const r=this._getOrReturnCtx(e);return y(r,{code:c.invalid_type,expected:b.undefined,received:r.parsedType}),N}return le(e.data)}}us.create=t=>new us({typeName:S.ZodUndefined,...V(t)});class cs extends j{_parse(e){if(this._getType(e)!==b.null){const r=this._getOrReturnCtx(e);return y(r,{code:c.invalid_type,expected:b.null,received:r.parsedType}),N}return le(e.data)}}cs.create=t=>new cs({typeName:S.ZodNull,...V(t)});class fs extends j{constructor(){super(...arguments),this._any=!0}_parse(e){return le(e.data)}}fs.create=t=>new fs({typeName:S.ZodAny,...V(t)});class hs extends j{constructor(){super(...arguments),this._unknown=!0}_parse(e){return le(e.data)}}hs.create=t=>new hs({typeName:S.ZodUnknown,...V(t)});class Te extends j{_parse(e){const s=this._getOrReturnCtx(e);return y(s,{code:c.invalid_type,expected:b.never,received:s.parsedType}),N}}Te.create=t=>new Te({typeName:S.ZodNever,...V(t)});class ms extends j{_parse(e){if(this._getType(e)!==b.undefined){const r=this._getOrReturnCtx(e);return y(r,{code:c.invalid_type,expected:b.void,received:r.parsedType}),N}return le(e.data)}}ms.create=t=>new ms({typeName:S.ZodVoid,...V(t)});class xe extends j{_parse(e){const{ctx:s,status:r}=this._processInputParams(e),a=this._def;if(s.parsedType!==b.array)return y(s,{code:c.invalid_type,expected:b.array,received:s.parsedType}),N;if(a.exactLength!==null){const o=s.data.length>a.exactLength.value,l=s.data.length<a.exactLength.value;(o||l)&&(y(s,{code:o?c.too_big:c.too_small,minimum:l?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&s.data.length<a.minLength.value&&(y(s,{code:c.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&s.data.length>a.maxLength.value&&(y(s,{code:c.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),s.common.async)return Promise.all([...s.data].map((o,l)=>a.type._parseAsync(new Ce(s,o,s.path,l)))).then(o=>ie.mergeArray(r,o));const n=[...s.data].map((o,l)=>a.type._parseSync(new Ce(s,o,s.path,l)));return ie.mergeArray(r,n)}get element(){return this._def.type}min(e,s){return new xe({...this._def,minLength:{value:e,message:k.toString(s)}})}max(e,s){return new xe({...this._def,maxLength:{value:e,message:k.toString(s)}})}length(e,s){return new xe({...this._def,exactLength:{value:e,message:k.toString(s)}})}nonempty(e){return this.min(1,e)}}xe.create=(t,e)=>new xe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:S.ZodArray,...V(e)});function Ie(t){if(t instanceof q){const e={};for(const s in t.shape){const r=t.shape[s];e[s]=Se.create(Ie(r))}return new q({...t._def,shape:()=>e})}else return t instanceof xe?new xe({...t._def,type:Ie(t.element)}):t instanceof Se?Se.create(Ie(t.unwrap())):t instanceof Pe?Pe.create(Ie(t.unwrap())):t instanceof Ee?Ee.create(t.items.map(e=>Ie(e))):t}class q extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),s=I.objectKeys(e);return this._cached={shape:e,keys:s},this._cached}_parse(e){if(this._getType(e)!==b.object){const v=this._getOrReturnCtx(e);return y(v,{code:c.invalid_type,expected:b.object,received:v.parsedType}),N}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Te&&this._def.unknownKeys==="strip"))for(const v in a.data)o.includes(v)||l.push(v);const g=[];for(const v of o){const A=n[v],D=a.data[v];g.push({key:{status:"valid",value:v},value:A._parse(new Ce(a,D,a.path,v)),alwaysSet:v in a.data})}if(this._def.catchall instanceof Te){const v=this._def.unknownKeys;if(v==="passthrough")for(const A of l)g.push({key:{status:"valid",value:A},value:{status:"valid",value:a.data[A]}});else if(v==="strict")l.length>0&&(y(a,{code:c.unrecognized_keys,keys:l}),r.dirty());else if(v!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const v=this._def.catchall;for(const A of l){const D=a.data[A];g.push({key:{status:"valid",value:A},value:v._parse(new Ce(a,D,a.path,A)),alwaysSet:A in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const v=[];for(const A of g){const D=await A.key,$=await A.value;v.push({key:D,value:$,alwaysSet:A.alwaysSet})}return v}).then(v=>ie.mergeObjectSync(r,v)):ie.mergeObjectSync(r,g)}get shape(){return this._def.shape()}strict(e){return k.errToObj,new q({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(s,r)=>{const a=this._def.errorMap?.(s,r).message??r.defaultError;return s.code==="unrecognized_keys"?{message:k.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new q({...this._def,unknownKeys:"strip"})}passthrough(){return new q({...this._def,unknownKeys:"passthrough"})}extend(e){return new q({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new q({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:S.ZodObject})}setKey(e,s){return this.augment({[e]:s})}catchall(e){return new q({...this._def,catchall:e})}pick(e){const s={};for(const r of I.objectKeys(e))e[r]&&this.shape[r]&&(s[r]=this.shape[r]);return new q({...this._def,shape:()=>s})}omit(e){const s={};for(const r of I.objectKeys(this.shape))e[r]||(s[r]=this.shape[r]);return new q({...this._def,shape:()=>s})}deepPartial(){return Ie(this)}partial(e){const s={};for(const r of I.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?s[r]=a:s[r]=a.optional()}return new q({...this._def,shape:()=>s})}required(e){const s={};for(const r of I.objectKeys(this.shape))if(e&&!e[r])s[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof Se;)n=n._def.innerType;s[r]=n}return new q({...this._def,shape:()=>s})}keyof(){return Fs(I.objectKeys(this.shape))}}q.create=(t,e)=>new q({shape:()=>t,unknownKeys:"strip",catchall:Te.create(),typeName:S.ZodObject,...V(e)});q.strictCreate=(t,e)=>new q({shape:()=>t,unknownKeys:"strict",catchall:Te.create(),typeName:S.ZodObject,...V(e)});q.lazycreate=(t,e)=>new q({shape:t,unknownKeys:"strip",catchall:Te.create(),typeName:S.ZodObject,...V(e)});class at extends j{_parse(e){const{ctx:s}=this._processInputParams(e),r=this._def.options;function a(n){for(const l of n)if(l.result.status==="valid")return l.result;for(const l of n)if(l.result.status==="dirty")return s.common.issues.push(...l.ctx.common.issues),l.result;const o=n.map(l=>new ke(l.ctx.common.issues));return y(s,{code:c.invalid_union,unionErrors:o}),N}if(s.common.async)return Promise.all(r.map(async n=>{const o={...s,common:{...s.common,issues:[]},parent:null};return{result:await n._parseAsync({data:s.data,path:s.path,parent:o}),ctx:o}})).then(a);{let n;const o=[];for(const g of r){const v={...s,common:{...s.common,issues:[]},parent:null},A=g._parseSync({data:s.data,path:s.path,parent:v});if(A.status==="valid")return A;A.status==="dirty"&&!n&&(n={result:A,ctx:v}),v.common.issues.length&&o.push(v.common.issues)}if(n)return s.common.issues.push(...n.ctx.common.issues),n.result;const l=o.map(g=>new ke(g));return y(s,{code:c.invalid_union,unionErrors:l}),N}}get options(){return this._def.options}}at.create=(t,e)=>new at({options:t,typeName:S.ZodUnion,...V(e)});function bt(t,e){const s=Ae(t),r=Ae(e);if(t===e)return{valid:!0,data:t};if(s===b.object&&r===b.object){const a=I.objectKeys(e),n=I.objectKeys(t).filter(l=>a.indexOf(l)!==-1),o={...t,...e};for(const l of n){const g=bt(t[l],e[l]);if(!g.valid)return{valid:!1};o[l]=g.data}return{valid:!0,data:o}}else if(s===b.array&&r===b.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<t.length;n++){const o=t[n],l=e[n],g=bt(o,l);if(!g.valid)return{valid:!1};a.push(g.data)}return{valid:!0,data:a}}else return s===b.date&&r===b.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class nt extends j{_parse(e){const{status:s,ctx:r}=this._processInputParams(e),a=(n,o)=>
vendor: 4,130 bytes, line 1
1{if(ns(n)||ns(o))return N;const l=bt(n.value,o.value);return l.valid?((is(n)||is(o))&&s.dirty(),{status:s.value,value:l.data}):(y(r,{code:c.invalid_intersection_types}),N)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,o])=>a(n,o)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}nt.create=(t,e,s)=>new nt({left:t,right:e,typeName:S.ZodIntersection,...V(s)});class Ee extends j{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==b.array)return y(r,{code:c.invalid_type,expected:b.array,received:r.parsedType}),N;if(r.data.length<this._def.items.length)return y(r,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),N;!this._def.rest&&r.data.length>this._def.items.length&&(y(r,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const n=[...r.data].map((o,l)=>{const g=this._def.items[l]||this._def.rest;return g?g._parse(new Ce(r,o,r.path,l)):null}).filter(o=>!!o);return r.common.async?Promise.all(n).then(o=>ie.mergeArray(s,o)):ie.mergeArray(s,n)}get items(){return this._def.items}rest(e){return new Ee({...this._def,rest:e})}}Ee.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ee({items:t,typeName:S.ZodTuple,rest:null,...V(e)})};class gs extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==b.map)return y(r,{code:c.invalid_type,expected:b.map,received:r.parsedType}),N;const a=this._def.keyType,n=this._def.valueType,o=[...r.data.entries()].map(([l,g],v)=>({key:a._parse(new Ce(r,l,r.path,[v,"key"])),value:n._parse(new Ce(r,g,r.path,[v,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const g of o){const v=await g.key,A=await g.value;if(v.status==="aborted"||A.status==="aborted")return N;(v.status==="dirty"||A.status==="dirty")&&s.dirty(),l.set(v.value,A.value)}return{status:s.value,value:l}})}else{const l=new Map;for(const g of o){const v=g.key,A=g.value;if(v.status==="aborted"||A.status==="aborted")return N;(v.status==="dirty"||A.status==="dirty")&&s.dirty(),l.set(v.value,A.value)}return{status:s.value,value:l}}}}gs.create=(t,e,s)=>new gs({valueType:e,keyType:t,typeName:S.ZodMap,...V(s)});class Je extends j{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==b.set)return y(r,{code:c.invalid_type,expected:b.set,received:r.parsedType}),N;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(y(r,{code:c.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),s.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(y(r,{code:c.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),s.dirty());const n=this._def.valueType;function o(g){const v=new Set;for(const A of g){if(A.status==="aborted")return N;A.status==="dirty"&&s.dirty(),v.add(A.value)}return{status:s.value,value:v}}const l=[...r.data.values()].map((g,v)=>n._parse(new Ce(r,g,r.path,v)));return r.common.async?Promise.all(l).then(g=>o(g)):o(l)}min(e,s){return new Je({...this._def,minSize:{value:e,message:k.toString(s)}})}max(e,s){return new Je({...this._def,maxSize:{value:e,message:k.toString(s)}})}size(e,s){return this.min(e,s).max(e,s)}nonempty(e){return this.min(1,e)}}Je.create=(t,e)=>new Je({valueType:t,minSize:null,maxSize:null,typeName:S.ZodSet,...V(e)});class ps extends j{get schema(){return this._def.getter()}_parse(e){const{ctx:s}=this._processInputParams(e);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}ps.create=(t,e)=>new ps({getter:t,typeName:S.ZodLazy,...V(e)});class kt extends j{_parse(e){if(e.data!==this._def.value){const s=this._getOrReturnCtx(e);return y(s,{received:s.data,code:c.invalid_literal,expected:this._def.value}),N}
vendor: 5,319 bytes, line 1
1return{status:"valid",value:e.data}}get value(){return this._def.value}}kt.create=(t,e)=>new kt({value:t,typeName:S.ZodLiteral,...V(e)});function Fs(t,e){return new Le({values:t,typeName:S.ZodEnum,...V(e)})}class Le extends j{_parse(e){if(typeof e.data!="string"){const s=this._getOrReturnCtx(e),r=this._def.values;return y(s,{expected:I.joinValues(r),received:s.parsedType,code:c.invalid_type}),N}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const s=this._getOrReturnCtx(e),r=this._def.values;return y(s,{received:s.data,code:c.invalid_enum_value,options:r}),N}return le(e.data)}get options(){return this._def.values}get enum(){const e={};for(const s of this._def.values)e[s]=s;return e}get Values(){const e={};for(const s of this._def.values)e[s]=s;return e}get Enum(){const e={};for(const s of this._def.values)e[s]=s;return e}extract(e,s=this._def){return Le.create(e,{...this._def,...s})}exclude(e,s=this._def){return Le.create(this.options.filter(r=>!e.includes(r)),{...this._def,...s})}}Le.create=Fs;class ys extends j{_parse(e){const s=I.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==b.string&&r.parsedType!==b.number){const a=I.objectValues(s);return y(r,{expected:I.joinValues(a),received:r.parsedType,code:c.invalid_type}),N}if(this._cache||(this._cache=new Set(I.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=I.objectValues(s);return y(r,{received:r.data,code:c.invalid_enum_value,options:a}),N}return le(e.data)}get enum(){return this._def.values}}ys.create=(t,e)=>new ys({values:t,typeName:S.ZodNativeEnum,...V(e)});class it extends j{unwrap(){return this._def.type}_parse(e){const{ctx:s}=this._processInputParams(e);if(s.parsedType!==b.promise&&s.common.async===!1)return y(s,{code:c.invalid_type,expected:b.promise,received:s.parsedType}),N;const r=s.parsedType===b.promise?s.data:Promise.resolve(s.data);return le(r.then(a=>this._def.type.parseAsync(a,{path:s.path,errorMap:s.common.contextualErrorMap})))}}it.create=(t,e)=>new it({type:t,typeName:S.ZodPromise,...V(e)});class Me extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===S.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:s,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:o=>{y(r,o),o.fatal?s.abort():s.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const o=a.transform(r.data,n);if(r.common.async)return Promise.resolve(o).then(async l=>{if(s.value==="aborted")return N;const g=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return g.status==="aborted"?N:g.status==="dirty"||s.value==="dirty"?We(g.value):g});{if(s.value==="aborted")return N;const l=this._def.schema._parseSync({data:o,path:r.path,parent:r});return l.status==="aborted"?N:l.status==="dirty"||s.value==="dirty"?We(l.value):l}}if(a.type==="refinement"){const o=l=>{const g=a.refinement(l,n);if(r.common.async)return Promise.resolve(g);if(g instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?N:(l.status==="dirty"&&s.dirty(),o(l.value),{status:s.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?N:(l.status==="dirty"&&s.dirty(),o(l.value).then(()=>({status:s.value,value:l.value}))))}if(a.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!De(o))return N;const l=a.transform(o.value,n);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>De(o)?Promise.resolve(a.transform(o.value,n)).then(l=>({status:s.value,value:l})):N);I.assertNever(a)}}Me.create=(t,e,s)=>new Me({schema:t,typeName:S.ZodEffects,effect:e,...V(s)});Me.createWithPreprocess=(t,e,s)=>new Me({schema:e,effect:{type:"preprocess",transform:t},typeName:S.ZodEffects,...V(s)});class Se extends j{_parse(e){return this._getType(e)===b.undefined?le(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Se.create=(t,e)=>new Se({innerType:t,typeName:S.ZodOptional,...V(e)});class Pe extends j{_parse(e){return this._getType(e)===b.null?le(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pe.create=(t,e)=>new Pe({innerType:t,typeName:S.ZodNullable,...V(e)});class wt extends j{_parse(e){const{ctx:s}=this._processInputParams(e);let r=s.data;return s.parsedType===b.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}wt.create=(t,e)=>new wt({innerType:t,typeName:S.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...V(e)});class At extends j{_parse(e){const{ctx:s}=this._processInputParams(e),r={...s,common:{...s.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return st(a)?a.then(n=>
1({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new ke(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new ke(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}At.create=(t,e)=>new At({innerType:t,typeName:S.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...V(e)});class vs extends j{_parse(e){if(this._getType(e)!==b.nan){const r=this._getOrReturnCtx(e);return y(r,{code:c.invalid_type,expected:b.nan,received:r.parsedType}),N}return{status:"valid",value:e.data}}}vs.create=t=>new vs({typeName:S.ZodNaN,...V(t)});class la extends j{_parse(e){const{ctx:s}=this._processInputParams(e),r=s.data;return this._def.type._parse({data:r,path:s.path,parent:s})}unwrap(){return this._def.type}}class Et extends j{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?N:n.status==="dirty"?(s.dirty(),We(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?N:a.status==="dirty"?(s.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,s){return new Et({in:e,out:s,typeName:S.ZodPipeline})}}class Nt extends j{_parse(e){const s=this._def.innerType._parse(e),r=a=>(De(a)&&(a.value=Object.freeze(a.value)),a);return st(s)?s.then(a=>r(a)):r(s)}unwrap(){return this._def.innerType}}Nt.create=(t,e)=>new Nt({innerType:t,typeName:S.ZodReadonly,...V(e)});var S;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(S||(S={}));const me=Ne.create,da=Ze.create;Te.create;const _s=xe.create,Is=q.create;at.create;nt.create;Ee.create;const Qe=kt.create,ua=Le.create;it.create;Se.create;Pe.create;const Ds=["Werkstudium","Praktikum","Teilzeit","Vollzeit","Werkvertrag","Minijob"],ca=Is({dateiname:me().trim().min(1).max(260),typ:me().trim().max(200),inhaltBase64:me().min(1)}),fa=me().trim().max(4e3).optional().or(Qe("")).refine(t=>!t||t.length>=15,"Bitte mindestens 15 Zeichen.");Is({name:me().trim().min(2,"Bitte Namen angeben").max(120),email:me().trim().email("Bitte gültige E-Mail-Adresse angeben").max(254),stelle:me().trim().min(1).max(120),verfuegbarAb:me().trim().min(2,"Bitte angeben, ab wann").max(80),gewuenschterUmfang:_s(ua(Ds)).min(1,"Bitte mindestens einen Umfang wählen"),stundenProWoche:da().int().min(1).max(48).optional(),f5:me().trim().min(15,"Bitte mindestens 15 Zeichen.").max(4e3),f6:fa,f7:me().trim().max(300).optional().or(Qe("")),einwilligung:Qe(!0),webseite:me().max(0).optional().or(Qe("")),anhaenge:_s(ca).max(5).default([])});const ha=er({method:"POST"}).handler(Xs("c5629d15c970de86b614a34b4e2aaccd0d908b34a0e0e006e073cd4a2b4d8f2e")),ma=["application/pdf","image/png","image/jpeg","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/plain"],xs=5,ga=8*1024*1024;function pa(t){return new Promise((e,s)=>{const r=new FileReader;r.onerror=()=>s(new Error("Datei konnte nicht gelesen werden.")),r.onload=()=>{const a=String(r.result??"");e(a.includes(",")?a.slice(a.indexOf(",")+1):a)}
1,r.readAsDataURL(t)})}function ya(t){return t>=1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${Math.max(1,Math.round(t/1024))} KB`}function Sa(){const{stelle:t}=Ys.useLoaderData(),e=Ks(),s=tr(ha),[r,a]=Ve.useState([]),[n,o]=Ve.useState(""),[l,g]=Ve.useState(!1),v=Ve.useRef(null),{register:A,handleSubmit:D,setValue:$,watch:T,setError:de,formState:{errors:R}}=jr({defaultValues:{name:"",email:"",gewuenschterUmfang:[],verfuegbarAb:"",stundenProWoche:"",f5:"",f6:"",f7:"",einwilligung:!1,webseite:""}}),se=T("gewuenschterUmfang"),re=T("einwilligung"),E=Ds.filter(w=>t.umfang.includes(w)),ue=w=>{if(!w)return;const J=Array.from(w),H=[],B=[];for(const ce of J){if(!ma.includes(ce.type)){H.push(`${ce.name}: Dateiformat nicht erlaubt (PDF, PNG, JPEG, DOC, DOCX, TXT).`);continue}if(ce.size>ga){H.push(`${ce.name}: größer als 8 MB.`);continue}B.push(ce)}const X=[...r,...B];X.length>xs&&H.push("Höchstens 5 Dateien."),a(X.slice(0,xs)),o(H.join(" ")),v.current&&(v.current.value="")},oe=()=>{if(typeof document>"u")return;const w=document.querySelector("[data-fehler='true']");w?.scrollIntoView({behavior:"smooth",block:"center"}),w?.focus?.()},z=D(async w=>{if(w.webseite){e({to:"/karriere/danke"});return}g(!0);try{const J=await Promise.all(r.map(async X=>({dateiname:X.name,typ:X.type,inhaltBase64:await pa(X)}))),H=w.stundenProWoche.trim(),B=await s({data:{name:w.name,email:w.email,stelle:t.slug,verfuegbarAb:w.verfuegbarAb,gewuenschterUmfang:w.gewuenschterUmfang,...H?{stundenProWoche:Number(H)}:{},f5:w.f5,f6:w.f6,f7:w.f7,einwilligung:!0,webseite:"",anhaenge:J}});B.gespraech?e({href:`/karriere/gespraech/${encodeURIComponent(B.gespraech)}`}):e({to:"/karriere/danke"})}catch(J){const H=J?.maengel;if(Array.isArray(H)&&H.length>0){for(const B of H)de(B.feld,{type:"server",message:B.grund});setTimeout(oe,0),zt.error("Bitte prüfen Sie die markierten Felder.")}else zt.error(J instanceof Error?J.message:"Ihre Bewerbung konnte gerade nicht übermittelt werden.")}finally{g(!1)}},oe);return h.jsxs(h.Fragment,{children:[h.jsx(sr,{eyebrow:t.rolle,title:`Bewerbung: ${t.titel}`,lead:"Zwei Minuten. Pflichtfelder sind gekennzeichnet."}),h.jsxs(rr,{children:[h.jsx("div",{className:"max-w-2xl",children:h.jsxs("p",{className:"rounded-md border border-border p-5 text-base leading-7 text-foreground/85",children:[h.jsx("strong",{className:"font-bold text-foreground",children:"Zwei Minuten, dann sprechen wir."})," ","Hier brauchen wir nur das Nötigste. Die eigentlichen Fragen stellt Ihnen danach ein KI-System im Browser: vier Fragen, fünf bis acht Minuten. Wer nicht sprechen möchte, beantwortet dieselben Fragen schriftlich; das ist gleichwertig."]})}),h.jsxs("form",{onSubmit:z,className:"mt-10 max-w-2xl space-y-12",noValidate:!0,children:[h.jsxs("fieldset",{className:"space-y-5",children:[h.jsx("legend",{className:"text-xl font-bold text-foreground",children:"Kontakt"}),h.jsx(Ue,{label:"Name",pflicht:!0,fehler:R.name?.message,children:h.jsx(je,{...A("name",{required:"Bitte Namen angeben."}),"data-fehler":R.name?"true":void 0,maxLength:120,autoComplete:"name"})}),h.jsx(Ue,{label:"E-Mail",pflicht:!0,fehler:R.email?.message,children:h.jsx(je,{type:"email",...A("email",{required:"Bitte E-Mail angeben.",pattern:{value:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,message:"Bitte gültige E-Mail-Adresse angeben."}}),"data-fehler":R.email?"true":void 0,maxLength:254,autoComplete:"email"})})]}),h.jsxs("fieldset",{className:"space-y-5",children:[h.jsx("legend",{className:"text-xl font-bold text-foreground",children:"Umfang"}),h.jsxs("div",{"data-fehler":R.gewuenschterUmfang?"true":void 0,children:[h.jsxs("p",{className:"mb-2 text-sm font-semibold text-foreground",children:["Welchen Umfang suchen Sie? ",h.jsx("span",{className:"text-accent",children:"*"})]}),h.jsx("div",{className:"flex flex-wrap gap-4",children:E.map(w=>{const J=se.includes(w);return h.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[h.jsx(qt,{checked:J,onCheckedChange:H=>{const B=H?[...se,w]:se.filter(X=>X!==w);$("gewuenschterUmfang",B,{shouldValidate:!0})}}),w]},w)})}
1),h.jsx("input",{type:"hidden",...A("gewuenschterUmfang",{validate:w=>w.length>0||"Bitte mindestens einen Umfang wählen."})}),R.gewuenschterUmfang?.message?h.jsx("p",{className:"mt-1 text-xs text-destructive",children:R.gewuenschterUmfang.message}):null]}),h.jsx(Ue,{label:"Ab wann?",pflicht:!0,fehler:R.verfuegbarAb?.message,children:h.jsx(je,{...A("verfuegbarAb",{required:"Bitte angeben, ab wann."}),"data-fehler":R.verfuegbarAb?"true":void 0,maxLength:80,placeholder:"z. B. ab Oktober, nach dem Semester"})}),h.jsx(Ue,{label:"Wie viele Stunden in der Woche?",fehler:R.stundenProWoche?.message,children:h.jsx(je,{type:"number",min:1,max:48,...A("stundenProWoche",{validate:w=>!w||Number(w)>=1&&Number(w)<=48||"Bitte 1 bis 48 Stunden angeben."}),"data-fehler":R.stundenProWoche?"true":void 0})})]}),h.jsxs("fieldset",{className:"space-y-6",children:[h.jsx("legend",{className:"text-xl font-bold text-foreground",children:"Fragen"}),h.jsx(bs,{label:"Wie gehen Sie vor, wenn Ihnen niemand sagt, was heute zu tun ist?",pflicht:!0,fehler:R.f5?.message,reg:A("f5",{required:"Bitte beantworten.",minLength:{value:15,message:"Bitte mindestens 15 Zeichen."}})}),h.jsx(bs,{label:"Womit arbeiten Sie bei KI heute konkret?",fehler:R.f6?.message,reg:A("f6",{validate:w=>!w||w.trim().length>=15||"Bitte mindestens 15 Zeichen."})}),h.jsx(Ue,{label:"Gehaltsvorstellung",fehler:R.f7?.message,children:h.jsx(je,{...A("f7",{maxLength:{value:300,message:"Höchstens 300 Zeichen."}}),"data-fehler":R.f7?"true":void 0,maxLength:300})})]}),h.jsxs("fieldset",{className:"space-y-5",children:[h.jsx("legend",{className:"text-xl font-bold text-foreground",children:"Unterlagen und Einwilligung"}),h.jsxs("div",{children:[h.jsx(lt,{htmlFor:"anhaenge",className:"text-sm font-semibold",children:"Unterlagen (PDF, PNG, JPEG, DOC, DOCX, TXT, höchstens 5 Dateien, je 8 MB)"}),h.jsx(je,{id:"anhaenge",ref:v,type:"file",multiple:!0,accept:".pdf,.png,.jpg,.jpeg,.doc,.docx,.txt",className:"mt-1",onChange:w=>ue(w.target.files)}),n?h.jsx("p",{className:"mt-1 text-xs text-destructive",children:n}):null,r.length>0?h.jsx("ul",{className:"mt-3 space-y-2",children:r.map((w,J)=>h.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border px-3 py-2 text-sm",children:[h.jsxs("span",{className:"truncate",children:[w.name," ",h.jsxs("span",{className:"text-muted-foreground",children:["(",ya(w.size),")"]})]}),h.jsx("button",{type:"button","aria-label":`${w.name} entfernen`,className:"text-muted-foreground hover:text-destructive",onClick:()=>a(H=>H.filter((B,X)=>X!==J)),children:h.jsx(or,{size:16})})]},`${w.name}-${J}`))}):null]}),h.jsxs("div",{"data-fehler":R.einwilligung?"true":void 0,children:[h.jsxs("label",{className:"flex items-start gap-3 text-sm leading-6",children:[h.jsx(qt,{className:"mt-1",checked:re,onCheckedChange:w=>$("einwilligung",w===!0,{shouldValidate:!0})}),h.jsxs("span",{children:["Ich habe die"," ",h.jsx("a",{href:"/karriere/datenschutz",target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-primary underline underline-offset-4",children:"Datenschutzhinweise für Bewerber"})," ","gelesen und bin mit der Verarbeitung meiner Daten für dieses Bewerbungsverfahren einverstanden. ",h.jsx("span",{className:"text-accent",children:"*"})]})]}),h.jsx("input",{type:"hidden",...A("einwilligung",{validate:w=>w===!0||"Bitte stimmen Sie der Verarbeitung zu."})}),R.einwilligung?.message?h.jsx("p",{className:"mt-1 text-xs text-destructive",children:R.einwilligung.message}):null]}),h.jsx("input",{type:"text",tabIndex:-1,"aria-hidden":"true",autoComplete:"off",...A("webseite"),style:{position:"absolute",left:"-10000px",top:"auto",width:"1px",height:"1px",overflow:"hidden",opacity:0}})]}),h.jsxs("div",{className:"rounded-md border border-border p-5 text-base leading-7 text-foreground/85",children:[h.jsx("strong",{className:"font-bold text-foreground",children:"Was als Nächstes passiert:"})," Sie bekommen einen Link zu einem kurzen Gespräch: fünf bis acht Minuten, vier Fragen. Auf der anderen Seite ist ein KI-System, kein Mensch. Sie können jederzeit abbrechen, und wer lieber schreibt, beantwortet dieselben Fragen schriftlich; das ist kein Nachteil."," ",h.jsx("strong",{className:"font-bold text-primary",children:"Über Einladung und Absage entscheidet Lukas Zarling, nicht das System."})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[h.jsxs(Wt,{type:"submit",disabled:l,children:[l?h.jsx(nr,{size:16,className:"mr-2 animate-spin"}):null,"Bewerbung absenden"]}),h.jsx(Wt,{asChild:!0,variant:"outline",children:h.jsx(Qs,{to:"/karriere/$slug",params:{slug:t.slug},children:"Zurück zur Stelle"})}),l?h.jsx("p",{className:"text-sm text-muted-foreground",children:"Wird übermittelt. Bitte nicht neu laden."}):null]})]})]})]})}function Ue({label:t,pflicht:e,fehler:s,children:r}){return h.jsxs("div",{children:[h.jsxs(lt,{className:"text-sm font-semibold",children:[t,e?h.jsx("span",{className:"text-accent",children:" *"}):null]}),h.jsx("div",{className:"mt-1",children:r}),s?h.jsx("p",{className:"mt-1 text-xs text-destructive",children:s}):null]})}function bs({label:t,pflicht:e,hinweis:s,fehler:r,reg:a}){return h.jsxs("div",{children:[h.jsxs(lt,{className:"text-sm font-semibold",children:[t,e?h.jsx("span",{className:"text-accent",children:" *"}):null]}),h.jsx(ar,{rows:4,maxLength:4e3,className:"mt-1","data-fehler":r?"true":void 0,...a}),s?h.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:s}):null,r?h.jsx("p",{className:"mt-1 text-xs text-destructive",children:r}):null]})}export{Sa as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.