vendor: 17,277 bytes, lines 1-6
1import{j as o}from"./vendor-ui-DyjPKyDp.js";import{R as L,r as g,a as ds,L as kt,i as vn}from"./vendor-react-HuFjj316.js";import{f as xn,o as Ae,a8 as _n,g as bn,h as wn,a9 as us,u as De,aa as kn,P as je,l as ue,ab as Ye,ac as Sn,ad as Cn,m as vr,ae as jn,af as Nn,ag as Tn,k as An,ah as En,ai as In,i as Rn,j as Ir,aj as On,ak as fs,al as Vn,am as Fn,an as Pn,b as Ft,N as Dn,O as _t,ao as Mn,ap as Ln,aq as Zn,ar as Bn,R as $n,H as Ot,F as Vt,S as Un,as as zn}from"./index-CzvEgD_y.js";import{B as Wn}from"./badge-JYrpq1vG.js";import{a as Hn}from"./wpCareers-oNnbe4q6.js";import{w as qn,g as Kn}from"./wpCache-CnU0UEiY.js";import{I as Le}from"./input-7kPvCXk-.js";import{T as Jn}from"./textarea-C9opSMQu.js";import{C as Yn}from"./checkbox-DXGVXzVh.js";import{L as Gn}from"./label-BybWA9hq.js";import{h as Xn,u as Qn,R as ea,F as ta}from"./Combination-_xXwDrkE.js";import{C as ra}from"./check-Bvwhiz7V.js";import{F as sa}from"./file-text-DaE8bhXW.js";import{p as na}from"./wpShortcodes-CCnEiWxA.js";import{B as aa,a as ia,b as tr,c as Rr,d as Or,e as oa}from"./breadcrumb-CRZyHCZi.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const la=xn("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);var It=r=>r.type==="checkbox",nt=r=>r instanceof Date,pe=r=>r==null;const hs=r=>typeof r=="object";var ae=r=>!pe(r)&&!Array.isArray(r)&&hs(r)&&!nt(r),ms=r=>ae(r)&&r.target?It(r.target)?r.target.checked:r.target.value:r,ca=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,ps=(r,e)=>r.has(ca(e)),da=r=>{const e=r.constructor&&r.constructor.prototype;return ae(e)&&e.hasOwnProperty("isPrototypeOf")},xr=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ce(r){let e;const t=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)e=new Date(r);else if(!(xr&&(r instanceof Blob||s))&&(t||ae(r)))if(e=t?[]:{},!t&&!da(r))e=r;else for(const n in r)r.hasOwnProperty(n)&&(e[n]=ce(r[n]));else return r;return e}var qt=r=>/^\w*$/.test(r),ne=r=>r===void 0,_r=r=>Array.isArray(r)?r.filter(Boolean):[],br=r=>_r(r.replace(/["|']|\]/g,"").split(/\.|\[/)),w=(r,e,t)=>{if(!e||!ae(r))return t;const s=(qt(e)?[e]:br(e)).reduce((n,a)=>pe(n)?n:n[a],r);return ne(s)||s===r?ne(r[e])?t:r[e]:s},Se=r=>typeof r=="boolean",K=(r,e,t)=>{let s=-1;const n=qt(e)?[e]:br(e),a=n.length,i=a-1;for(;++s<a;){const l=n[s];let d=t;if(s!==i){const f=r[l];d=ae(f)||Array.isArray(f)?f:isNaN(+n[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=d,r=r[l]}};const Dt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Re={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ze={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},wr=L.createContext(null);wr.displayName="HookFormContext";const Kt=()=>L.useContext(wr),ua=r=>{const{children:e,...t}=r;return L.createElement(wr.Provider,{value:t},e)};var gs=(r,e,t,s=!0)=>{const n={defaultValues:e._defaultValues};for(const a in r)Object.defineProperty(n,a,{get:()=>{const i=a;return e._proxyFormState[i]!==Re.all&&(e._proxyFormState[i]=!s||Re.all),t&&(t[i]=!0),r[i]}});return n};const kr=typeof window<"u"?L.useLayoutEffect:L.useEffect;function fa(r){const e=Kt(),{control:t=e.control,disabled:s,name:n,exact:a}=r||{},[i,l]=L.useState(t._formState),d=L.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return kr(()=>t._subscribe({name:n,formState:d.current,exact:a,callback:f=>{!s&&l({...t._formState,...f})}}),[n,s,a]),L.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),L.useMemo(()=>gs(i,t,d.current,!1),[i,t])}var Fe=r=>typeof r=="string",ys=(r,e,t,s,n)=>Fe(r)?(s&&e.watch.add(r),w(t,r,n)):Array.isArray(r)?r.map(a=>(s&&e.watch.add(a),w(t,a))):(s&&(e.watchAll=!0),t),nr=r=>pe(r)||!hs(r);function $e(r,e,t=new WeakSet){if(nr(r)||nr(e))return r===e;if(nt(r)&&nt(e))return r.getTime()===e.getTime();const s=Object.keys(r),n=Object.keys(e);if(s.length!==n.length)return!1;if(t.has(r)||t.has(e))return!0;t.add(r),t.add(e);for(const a of s){const i=r[a];if(!n.includes(a))return!1;if(a!=="ref"){const l=e[a];if(nt(i)&&nt(l)||ae(i)&&ae(l)||Array.isArray(i)&&Array.isArray(l)?!$e(i,l,t):i!==l)return!1}}return!0}function ha(r){const e=Kt(),{control:t=e.control,name:s,defaultValue:n,disabled:a,exact:i,compute:l}=r||{},d=L.useRef(n),f=L.useRef(l),h=L.useRef(void 0);f.current=l;const k=L.useMemo(()=>t._getWatch(s,d.current),[t,s]),[j,F]=L.useState(f.current?f.current(k):k);return kr(()=>t._subscribe({name:s,formState:{values:!0},exact:i,callback:p=>{if(!a){const v=ys(s,t._names,p.values||t._formValues,!1,d.current);if(f.current){const A=f.current(v);$e(A,h.current)||(F(A),h.current=A)}else F(v)}}}),[t,a,s,i]),L.useEffect(()=>t._removeUnmounted()),j}function ma(r){const e=Kt(),{name:t,disabled:s,control:n=e.control,shouldUnregister:a,defaultValue:i}=r,l=ps(n._names.array,t),d=L.useMemo(()=>w(n._formValues,t,w(n._defaultValues,t,i)),[n,t,i]),f=ha({control:n,name:t,defaultValue:d,exact:!0}),h=fa({control:n,name:t,exact:!0}),k=L.useRef(r),j=L.useRef(n.register(t,{...r.rules,value:f,...Se(r.disabled)?{disabled:r.disabled}:{}}));k.current=r;const F=L.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!w(h.errors,t)},isDirty:{enumerable:!0,get:()=>!!w(h.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!w(h.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!w(h.validatingFields,t)},error:{enumerable:!0,get:()=>w(h.errors,t)}}),[h,t]),p=L.useCallback(y=>j.current.onChange({target:{value:ms(y),name:t},type:Dt.CHANGE}),[t]),v=L.useCallback(()=>j.current.onBlur({target:{value:w(n._formValues,t),name:t},type:Dt.BLUR}),[t,n._formValues]),A=L.useCallback(y=>{const E=w(n._fields,t);E&&y&&(E._f.ref={focus:()=>y.focus&&y.focus(),select:()=>y.select&&y.select(),setCustomValidity:W=>y.setCustomValidity(W),reportValidity:()=>y.reportValidity()})},[n._fields,t]),Z=L.useMemo(()=>({name:t,value:f,...Se(s)||h.disabled?{disabled:h.disabled||s}:{},onChange:p,onBlur:v,ref:A}),[t,s,h.disabled,p,v,A,f]);return L.useEffect(()=>{const y=n._options.shouldUnregister||a;n.register(t,{...k.current.rules,...Se(k.current.disabled)?{disabled:k.current.disabled}:{}});const E=(W,B)=>{const ge=w(n._fields,W);ge&&ge._f&&(ge._f.mount=B)};if(E(t,!0),y){const W=ce(w(n._options.defaultValues,t));K(n._defaultValues,t,W),ne(w(n._formValues,t))&&K(n._formValues,t,W)}return!l&&n.register(t),()=>{(l?y&&!n._state.action:y)?n.unregister(t):E(t,!1)}},[t,n,l,a]),L.useEffect(()=>{n._setDisabledField({disabled:s,name:t})},[s,t,n]),L.useMemo(()=>({field:Z,formState:h,fieldState:F}),[Z,h,F])}const pa=r=>r.render(ma(r));var vs=(r,e,t,s,n)=>e?{...t[r],types:{...t[r]&&t[r].types?t[r].types:{},[s]:n||!0}}:{},jt=r=>Array.isArray(r)?r:[r],Vr=()=>{let r=[];return{get observers(){return r},next:n=>{for(const a of r)a.next&&a.next(n)},subscribe:n=>(r.push(n),{unsubscribe:()=>{r=r.filter(a=>a!==n)}}),unsubscribe:()=>{r=[]}}},we=r=>ae(r)&&!Object.keys(r).length,Sr=r=>r.type==="file",Oe=r=>typeof r=="function",Mt=r=>{if(!xr)return!1;const e=r?r.ownerDocument:0;return r instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},xs=r=>r.type==="select-multiple",Cr=r=>r.type==="radio",ga=r=>Cr(r)||It(r),rr=r=>Mt(r)&&r.isConnected;function ya(r,e){const t=e.slice(0,-1).length;let s=0;for(;s<t;)r=ne(r)?s++:r[e[s++]];return r}function va(r){for(const e in r)if(r.hasOwnProperty(e)&&!ne(r[e]))return!1;return!0}function le(r,e){const t=Array.isArray(e)?e:qt(e)?[e]:br(e),s=t.length===1?r:ya(r,t),n=t.length-1,a=t[n];return s&&delete s[a],n!==0&&(ae(s)&&we(s)||Array.isArray(s)&&va(s))&&le(r,t.slice(0,-1)),r}var _s=r=>{for(const e in r)if(Oe(r[e]))return!0;return!1};function Lt(r,e={}){const t=Array.isArray(r);if(ae(r)||t)for(const s in r)Array.isArray(r[s])||ae(r[s])&&!_s(r[s])?(e[s]=Array.isArray(r[s])?[]:{},Lt(r[s],e[s])):pe(r[s])||(e[s]=!0);return e}function bs(r,e,t){const s=Array.isArray(r);if(ae(r)||s)for(const n in r)Array.isArray(r[n])||ae(r[n])&&!_s(r[n])?ne(e)||nr(t[n])?t[n]=Array.isArray(r[n])?Lt(r[n],[]):{...Lt(r[n])}:bs(r[n],pe(e)?{}:e[n],t[n]):t[n]=!$e(r[n],e[n]);return t}var bt=(r,e)=>bs(r,e,Lt(e));const Fr={value:!1,isValid:!1},Pr={value:!0,isValid:!0};var ws=r=>{if(Array.isArray(r)){if(r.length>1){const e=r.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:e,isValid:!!e.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!ne(r[0].attributes.value)?ne(r[0].value)||r[0].value===""?Pr:{value:r[0].value,isValid:!0}:Pr:Fr}return Fr},ks=(r,{valueAsNumber:e,valueAsDate:t,setValueAs:s})=>ne(r)?r:e?r===""?NaN:r&&+r:t&&Fe(r)?new Date(r):s?s(r):r;const Dr={isValid:!1,value:null};var Ss=r=>Array.isArray(r)?r.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Dr):Dr;function Mr(r){const e=r.ref;return Sr(e)?e.files:Cr(e)?Ss(r.refs).value:xs(e)?[...e.selectedOptions].map(({value:t})=>t):It(e)?ws(r.refs).value:ks(ne(e.value)?r.ref.value:e.value,r)}var xa=(r,e,t,s)=>{const n={};for(const a of r){const i=w(e,a);i&&K(n,a,i._f)}return{criteriaMode:t,names:[...r],fields:n,shouldUseNativeValidation:s}},Zt=r=>r instanceof RegExp,wt=r=>ne(r)?r:Zt(r)?r.source:ae(r)?Zt(r.value)?r.value.source:r.value:r,Lr=r=>({isOnSubmit:!r||r===Re.onSubmit,isOnBlur:r===Re.onBlur,isOnChange:r===Re.onChange,isOnAll:r===Re.all,isOnTouch:r===Re.onTouched});const Zr="AsyncFunction";var _a=r=>!!r&&!!r.validate&&!!(Oe(r.validate)&&r.validate.constructor.name===Zr||ae(r.validate)&&Object.values(r.validate).find(e=>e.constructor.name===Zr)),ba=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),Br=(r,e,t)=>!t&&(e.watchAll||e.watch.has(r)||[...e.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const Nt=(r,e,t,s)=>{for(const n of t||Object.keys(r)){const a=w(r,n);if(a){const{_f:i,...l}=a;if(i){if(i.refs&&i.refs[0]&&e(i.refs[0],n)&&!s)return!0;if(i.ref&&e(i.ref,i.name)&&!s)return!0;if(Nt(l,e))break}else if(ae(l)&&Nt(l,e))break}}};function $r(r,e,t){const s=w(r,t);if(s||qt(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),i=w(e,a),l=w(r,a);if(i&&!Array.isArray(i)&&t!==a)return{name:t};if(l&&l.type)return{name:a,error:l};if(l&&l.root&&l.root.type)return{name:`${a}.root`,error:l.root};n.pop()}return{name:t}}var wa=(r,e,t,s)=>{t(r);const{name:n,...a}=r;return we(a)||Object.keys(a).length>=Object.keys(e).length||Object.keys(a).find(i=>e[i]===(!s||Re.all))},ka=(r,e,t)=>!r||!e||r===e||jt(r).some(s=>s&&(t?s===e:s.startsWith(e)||e.startsWith(s))),Sa=(r,e,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(e||r):(t?s.isOnBlur:n.isOnBlur)?!r:(t?s.isOnChange:n.isOnChange)?r:!0,Ca=(r,e)=>!_r(w(r,e)).length&&le(r,e),ja=(r,e,t)=>{const s=jt(w(r,t));return K(s,"root",e[t]),K(r,t,s),r},Pt=r=>Fe(r);function Ur(r,e,t="validate"){if(Pt(r)||Array.isArray(r)&&r.every(Pt)||Se(r)&&!r)return{type:t,message:Pt(r)?r:"",ref:e}}var dt=r=>ae(r)&&!Zt(r)?r:{value:r,message:""},zr=async(r,e,t,s,n,a)=>{const{ref:i,refs:l,required:d,maxLength:f,minLength:h,min:k,max:j,pattern:F,validate:p,name:v,valueAsNumber:A,mount:Z}=r._f,y=w(t,v);if(!Z||e.has(v))return{};const E=l?l[0]:i,W=P=>{n&&E.reportValidity&&(E.setCustomValidity(Se(P)?"":P||""),E.reportValidity())},B={},ge=Cr(i),te=It(i),ye=ge||te,ie=(A||Sr(i))&&ne(i.value)&&ne(y)||Mt(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length,fe=vs.bind(null,v,s,B),oe=(P,M,z,Q=Ze.maxLength,H=Ze.minLength)=>{const se=P?M:z;B[v]={type:P?Q:H,message:se,ref:i,...fe(P?Q:H,se)}};if(a?!Array.isArray(y)||!y.length:d&&(!ye&&(ie||pe(y))||Se(y)&&!y||te&&!ws(l).isValid||ge&&!Ss(l).isValid)){const{value:P,message:M}=Pt(d)?{value:!!d,message:d}:dt(d);if(P&&(B[v]={type:Ze.required,message:M,ref:E,...fe(Ze.required,M)},!s))return W(M),B}if(!ie&&(!pe(k)||!pe(j))){let P,M;const z=dt(j),Q=dt(k);if(!pe(y)&&!isNaN(y)){const H=i.valueAsNumber||y&&+y;pe(z.value)||(P=H>z.value),pe(Q.value)||(M=H<Q.value)}else{const H=i.valueAsDate||new Date(y),se=ze=>new Date(new Date().toDateString()+" "+ze),he=i.type=="time",me=i.type=="week";Fe(z.value)&&y&&(P=he?se(y)>se(z.value):me?y>z.value:H>new Date(z.value)),Fe(Q.value)&&y&&(M=he?se(y)<se(Q.value):me?y<Q.value:H<new Date(Q.value))}if((P||M)&&(oe(!!P,z.message,Q.message,Ze.max,Ze.min),!s))return W(B[v].message),B}if((f||h)&&!ie&&(Fe(y)||a&&Array.isArray(y))){const P=dt(f),M=dt(h),z=!pe(P.value)&&y.length>+P.value,Q=!pe(M.value)&&y.length<+M.value;if((z||Q)&&(oe(z,P.message,M.message),!s))return W(B[v].message),B}if(F&&!ie&&Fe(y)){const{value:P,message:M}=dt(F);if(Zt(P)&&!y.match(P)&&(B[v]={type:Ze.pattern,message:M,ref:i,...fe(Ze.pattern,M)},!s))return W(M),B}if(p){if(Oe(p)){const P=await p(y,t),M=Ur(P,E);if(M&&(B[v]={...M,...fe(Ze.validate,M.message)},!s))return W(M.message),B}else if(ae(p)){let P={};for(const M in p){if(!we(P)&&!s)break;const z=Ur(await p[M](y,t),E,M);z&&(P={...z,...fe(M,z.message)},W(z.message),s&&(B[v]=P))}if(!we(P)&&(B[v]={ref:E,...P},!s))return B}}return W(!0),B};const Na={mode:Re.onSubmit,reValidateMode:Re.onChange,shouldFocusError:!0};function Ta(r={}){let e={...Na,...r},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:Oe(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},s={},n=ae(e.defaultValues)||ae(e.values)?ce(e.defaultValues||e.values)||{}:{},a=e.shouldUnregister?{}:ce(n),i={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let k={...h};const j={array:Vr(),state:Vr()},F=e.criteriaMode===Re.all,p=c=>u=>{clearTimeout(f),f=setTimeout(c,u)},v=async c=>{if(!e.disabled&&(h.isValid||k.isValid||c)){const u=e.resolver?we((await te()).errors):await ie(s,!0);u!==t.isValid&&j.state.next({isValid:u})}},A=(c,u)=>{!e.disabled&&(h.isValidating||h.validatingFields||k.isValidating||k.validatingFields)&&((c||Array.from(l.mount)).forEach(m=>{m&&(u?K(t.validatingFields,m,u):le(t.validatingFields,m))}),j.state.next({validatingFields:t.validatingFields,isValidating:!we(t.validatingFields)}))},Z=(c,u=[],m,C,b=!0,_=!0)=>{if(C&&m&&!e.disabled){if(i.action=!0,_&&Array.isArray(w(s,c))){const I=m(w(s,c),C.argA,C.argB);b&&K(s,c,I)}if(_&&Array.isArray(w(t.errors,c))){const I=m(w(t.errors,c),C.argA,C.argB);b&&K(t.errors,c,I),Ca(t.errors,c)}if((h.touchedFields||k.touchedFields)&&_&&Array.isArray(w(t.touchedFields,c))){const I=m(w(t.touchedFields,c),C.argA,C.argB);b&&K(t.touchedFields,c,I)}(h.dirtyFields||k.dirtyFields)&&(t.dirtyFields=bt(n,a)),j.state.next({name:c,isDirty:oe(c,u),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else K(a,c,u)},y=(c,u)=>{K(t.errors,c,u),j.state.next({errors:t.errors})},E=c=>{t.errors=c,j.state.next({errors:t.errors,isValid:!1})},W=(c,u,m,C)=>{const b=w(s,c);if(b){const _=w(a,c,ne(m)?w(n,c):m);ne(_)||C&&C.defaultChecked||u?K(a,c,u?_:Mr(b._f)):z(c,_),i.mount&&v()}},B=(c,u,m,C,b)=>{let _=!1,I=!1;const q={name:c};if(!e.disabled){if(!m||C){(h.isDirty||k.isDirty)&&(I=t.isDirty,t.isDirty=q.isDirty=oe(),_=I!==q.isDirty);const X=$e(w(n,c),u);I=!!w(t.dirtyFields,c),X?le(t.dirtyFields,c):K(t.dirtyFields,c,!0),q.dirtyFields=t.dirtyFields,_=_||(h.dirtyFields||k.dirtyFields)&&I!==!X}if(m){const X=w(t.touchedFields,c);X||(K(t.touchedFields,c,m),q.touchedFields=t.touchedFields,_=_||(h.touchedFields||k.touchedFields)&&X!==m)}_&&b&&j.state.next(q)}return _?q:{}},ge=(c,u,m,C)=>{const b=w(t.errors,c),_=(h.isValid||k.isValid)&&Se(u)&&t.isValid!==u;if(e.delayError&&m?(d=p(()=>y(c,m)),d(e.delayError)):(clearTimeout(f),d=null,m?K(t.errors,c,m):le(t.errors,c)),(m?!$e(b,m):b)||!we(C)||_){const I={...C,..._&&Se(u)?{isValid:u}:{},errors:t.errors,name:c};t={...t,...I},j.state.next(I)}},te=async c=>{A(c,!0);const u=await e.resolver(a,e.context,xa(c||l.mount,s,e.criteriaMode,e.shouldUseNativeValidation));return A(c),u},ye=async c=>{const{errors:u}=await te(c);if(c)for(const m of c){const C=w(u,m);C?K(t.errors,m,C):le(t.errors,m)}else t.errors=u;return u},ie=async(c,u,m={valid:!0})=>{for(const C in c){const b=c[C];if(b){const{_f:_,...I}=b;if(_){const q=l.array.has(_.name),X=b._f&&_a(b._f);X&&h.validatingFields&&A([C],!0);const Ne=await zr(b,l.disabled,a,F,e.shouldUseNativeValidation&&!u,q);if(X&&h.validatingFields&&A([C]),Ne[_.name]&&(m.valid=!1,u))break;!u&&(w(Ne,_.name)?q?ja(t.errors,Ne,_.name):K(t.errors,_.name,Ne[_.name]):le(t.errors,_.name))}!we(I)&&await ie(I,u,m)}}return m.valid},fe=()=>{for(const c of l.unMount){const u=w(s,c);u&&(u._f.refs?u._f.refs.every(m=>!rr(m)):!rr(u._f.ref))&&R(c)}l.unMount=new Set},oe=(c,u)=>!e.disabled&&(c&&u&&K(a,c,u),!$e(ze(),n)),P=(c,u,m)=>ys(c,l,{...i.mount?a:ne(u)?n:Fe(c)?{[c]:u}:u},m,u),M=c=>_r(w(i.mount?a:n,c,e.shouldUnregister?w(n,c,[]):[])),z=(c,u,m={})=>{const C=w(s,c);let b=u;if(C){const _=C._f;_&&(!_.disabled&&K(a,c,ks(u,_)),b=Mt(_.ref)&&pe(u)?"":u,xs(_.ref)?[..._.ref.options].forEac
vendor: 4,962 bytes, line 6
6h(I=>I.selected=b.includes(I.value)):_.refs?It(_.ref)?_.refs.forEach(I=>{(!I.defaultChecked||!I.disabled)&&(Array.isArray(b)?I.checked=!!b.find(q=>q===I.value):I.checked=b===I.value||!!b)}):_.refs.forEach(I=>I.checked=I.value===b):Sr(_.ref)?_.ref.value="":(_.ref.value=b,_.ref.type||j.state.next({name:c,values:ce(a)})))}(m.shouldDirty||m.shouldTouch)&&B(c,b,m.shouldTouch,m.shouldDirty,!0),m.shouldValidate&&me(c)},Q=(c,u,m)=>{for(const C in u){if(!u.hasOwnProperty(C))return;const b=u[C],_=c+"."+C,I=w(s,_);(l.array.has(c)||ae(b)||I&&!I._f)&&!nt(b)?Q(_,b,m):z(_,b,m)}},H=(c,u,m={})=>{const C=w(s,c),b=l.array.has(c),_=ce(u);K(a,c,_),b?(j.array.next({name:c,values:ce(a)}),(h.isDirty||h.dirtyFields||k.isDirty||k.dirtyFields)&&m.shouldDirty&&j.state.next({name:c,dirtyFields:bt(n,a),isDirty:oe(c,_)})):C&&!C._f&&!pe(_)?Q(c,_,m):z(c,_,m),Br(c,l)&&j.state.next({...t,name:c}),j.state.next({name:i.mount?c:void 0,values:ce(a)})},se=async c=>{i.mount=!0;const u=c.target;let m=u.name,C=!0;const b=w(s,m),_=X=>{C=Number.isNaN(X)||nt(X)&&isNaN(X.getTime())||$e(X,w(a,m,X))},I=Lr(e.mode),q=Lr(e.reValidateMode);if(b){let X,Ne;const Rt=u.type?Mr(b._f):ms(c),He=c.type===Dt.BLUR||c.type===Dt.FOCUS_OUT,pn=!ba(b._f)&&!e.resolver&&!w(t.errors,m)&&!b._f.deps||Sa(He,w(t.touchedFields,m),t.isSubmitted,q,I),Qt=Br(m,l,He);K(a,m,Rt),He?(b._f.onBlur&&b._f.onBlur(c),d&&d(0)):b._f.onChange&&b._f.onChange(c);const er=B(m,Rt,He),gn=!we(er)||Qt;if(!He&&j.state.next({name:m,type:c.type,values:ce(a)}),pn)return(h.isValid||k.isValid)&&(e.mode==="onBlur"?He&&v():He||v()),gn&&j.state.next({name:m,...Qt?{}:er});if(!He&&Qt&&j.state.next({...t}),e.resolver){const{errors:Ar}=await te([m]);if(_(Rt),C){const yn=$r(t.errors,s,m),Er=$r(Ar,s,yn.name||m);X=Er.error,m=Er.name,Ne=we(Ar)}}else A([m],!0),X=(await zr(b,l.disabled,a,F,e.shouldUseNativeValidation))[m],A([m]),_(Rt),C&&(X?Ne=!1:(h.isValid||k.isValid)&&(Ne=await ie(s,!0)));C&&(b._f.deps&&me(b._f.deps),ge(m,Ne,X,er))}},he=(c,u)=>{if(w(t.errors,u)&&c.focus)return c.focus(),1},me=async(c,u={})=>{let m,C;const b=jt(c);if(e.resolver){const _=await ye(ne(c)?c:b);m=we(_),C=c?!b.some(I=>w(_,I)):m}else c?(C=(await Promise.all(b.map(async _=>{const I=w(s,_);return await ie(I&&I._f?{[_]:I}:I)}))).every(Boolean),!(!C&&!t.isValid)&&v()):C=m=await ie(s);return j.state.next({...!Fe(c)||(h.isValid||k.isValid)&&m!==t.isValid?{}:{name:c},...e.resolver||!c?{isValid:m}:{},errors:t.errors}),u.shouldFocus&&!C&&Nt(s,he,c?b:l.mount),C},ze=c=>{const u={...i.mount?a:n};return ne(c)?u:Fe(c)?w(u,c):c.map(m=>w(u,m))},tt=(c,u)=>({invalid:!!w((u||t).errors,c),isDirty:!!w((u||t).dirtyFields,c),error:w((u||t).errors,c),isValidating:!!w(t.validatingFields,c),isTouched:!!w((u||t).touchedFields,c)}),yt=c=>{c&&jt(c).forEach(u=>le(t.errors,u)),j.state.next({errors:c?t.errors:{}})},lt=(c,u,m)=>{const C=(w(s,c,{_f:{}})._f||{}).ref,b=w(t.errors,c)||{},{ref:_,message:I,type:q,...X}=b;K(t.errors,c,{...X,...u,ref:C}),j.state.next({name:c,errors:t.errors,isValid:!1}),m&&m.shouldFocus&&C&&C.focus&&C.focus()},We=(c,u)=>Oe(c)?j.state.subscribe({next:m=>"values"in m&&c(P(void 0,u),m)}):P(c,u,!0),rt=c=>j.state.subscribe({next:u=>{ka(c.name,u.name,c.exact)&&wa(u,c.formState||h,xt,c.reRenderRoot)&&c.callback({values:{...a},...t,...u,defaultValues:n})}}).unsubscribe,st=c=>(i.mount=!0,k={...k,...c.formState},rt({...c,formState:k})),R=(c,u={})=>{for(const m of c?jt(c):l.mount)l.mount.delete(m),l.array.delete(m),u.keepValue||(le(s,m),le(a,m)),!u.keepError&&le(t.errors,m),!u.keepDirty&&le(t.dirtyFields,m),!u.keepTouched&&le(t.touchedFields,m),!u.keepIsValidating&&le(t.validatingFields,m),!e.shouldUnregister&&!u.keepDefaultValue&&le(n,m);j.state.next({values:ce(a)}),j.state.next({...t,...u.keepDirty?{isDirty:oe()}:{}}),!u.keepIsValid&&v()},ee=({disabled:c,name:u})=>{(Se(c)&&i.mount||c||l.disabled.has(u))&&(c?l.disabled.add(u):l.disabled.delete(u))},de=(c,u={})=>{let m=w(s,c);const C=Se(u.disabled)||Se(e.disabled);return K(s,c,{...m||{},_f:{...m&&m._f?m._f:{ref:{name:c}},name:c,mount:!0,...u}}),l.mount.add(c),m?ee({disabled:Se(u.disabled)?u.disabled:e.disabled,name:c}):W(c,!0,u.value),{...C?{disabled:u.disabled||e.disabled}:{},...e.progressive?{required:!!u.required,min:wt(u.min),max:wt(u.max),minLength:wt(u.minLength),maxLength:wt(u.maxLength),pattern:wt(u.pattern)}:{},name:c,onChange:se,onBlur:se,ref:b=>{if(b){de(c,u),m=w(s,c);const _=ne(b.value)&&b.querySelectorAll&&b.querySelectorAll("input,select,textarea")[0]||b,I=ga(_),q=m._f.refs||[];if(I?q.find(X=>X===_):_===m._f.ref)return;K(s,c,{_f:{...m._f,...I?{refs:[...q.filter(rr),_,...Array.isArray(w(n,c))?[{}]:[]],ref:{type:_.type,name:c}}:{ref:_}}}),W(c,!1,void 0,_)}else m=w(s,c,{}),m._f&&(m._f.mount=!1),(e.shouldUnregister||u.shouldUnregister)&&!(ps(l.array,c)&&i.action)&&l.unMount.add(c)}}},Y=()=>e.shouldFocusError&&Nt(s,he,l.mount),G=c=>{Se(c)&&(j.state.next({disabled:c}),Nt(s,(u,m)=>{const C=w(s,m);C&&(u.disabled=C._f.disabled||c,Array.isArray(C._f.refs)&&C._f.refs.forEac
6h(b=>{b.disabled=C._f.disabled||c}))},0,!1))},J=(c,u)=>async m=>{let C;m&&(m.preventDefault&&m.preventDefault(),m.persist&&m.persist());let b=ce(a);if(j.state.next({isSubmitting:!0}),e.resolver){const{errors:_,values:I}=await te();t.errors=_,b=ce(I)}else await ie(s);if(l.disabled.size)for(const _ of l.disabled)le(b,_);if(le(t.errors,"root"),we(t.errors)){j.state.next({errors:{}});try{await c(b,m)}catch(_){C=_}}else u&&await u({...t.errors},m),Y(),setTimeout(Y);if(j.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:we(t.errors)&&!C,submitCount:t.submitCount+1,errors:t.errors}),C)throw C},Me=(c,u={})=>{w(s,c)&&(ne(u.defaultValue)?H(c,ce(w(n,c))):(H(c,u.defaultValue),K(n,c,ce(u.defaultValue))),u.keepTouched||le(t.touchedFields,c),u.keepDirty||(le(t.dirtyFields,c),t.isDirty=u.defaultValue?oe(c,ce(w(n,c))):oe()),u.keepError||(le(t.errors,c),h.isValid&&v()),j.state.next({...t}))},Ve=(c,u={})=>{const m=c?ce(c):n,C=ce(m),b=we(c),_=b?n:C;if(u.keepDefaultValues||(n=m),!u.keepValues){if(u.keepDirtyValues){const I=new Set([...l.mount,...Object.keys(bt(n,a))]);for(const q of Array.from(I))w(t.dirtyFields,q)?K(_,q,w(a,q)):H(q,w(_,q))}else{if(xr&&ne(c))for(const I of l.mount){const q=w(s,I);if(q&&q._f){const X=Array.isArray(q._f.refs)?q._f.refs[0]:q._f.ref;if(Mt(X)){const Ne=X.closest("form");if(Ne){Ne.reset();break}}}}if(u.keepFieldsRef)for(const I of l.mount)H(I,w(_,I));else s={}}a=e.shouldUnregister?u.keepDefaultValues?ce(n):{}:ce(_),j.array.next({values:{..._}}),j.state.next({values:{..._}})}l={mount:u.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!h.isValid||!!u.keepIsValid||!!u.keepDirtyValues,i.watch=!!e.shouldUnregister,j.state.next({submitCount:u.keepSubmitCount?t.submitCount:0,isDirty:b?!1:u.keepDirty?t.isDirty:!!(u.keepDefaultValues&&!$e(c,n)),isSubmitted:u.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:b?{}:u.keepDirtyValues?u.keepDefaultValues&&a?bt(n,a):t.dirtyFields:u.keepDefaultValues&&c?bt(n,c):u.keepDirty?t.dirtyFields:{},touchedFields:u.keepTouched?t.touchedFields:{},errors:u.keepErrors?t.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},ct=(c,u)=>Ve(Oe(c)?c(a):c,u),vt=(c,u={})=>{const m=w(s,c),C=m&&m._f;if(C){const b=C.refs?C.refs[0]:C.ref;b.focus&&(b.focus(),u.shouldSelect&&Oe(b.select)&&b.select())}},xt=c=>{t={...t,...c}},Tr={control:{register:de,unregister:R,getFieldState:tt,handleSubmit:J,setError:lt,_subscribe:rt,_runSchema:te,_focusError:Y,_getWatch:P,_getDirty:oe,_setValid:v,_setFieldArray:Z,_setDisabledField:ee,_setErrors:E,_getFieldArray:M,_reset:Ve,_resetDefaultValues:()=>Oe(e.defaultValues)&&e.defaultValues().then(c=>{ct(c,e.resetOptions),j.state.next({isLoading:!1})}),_removeUnmounted:fe,_disableForm:G,_subjects:j,_proxyFormState:h,get _fields(){return s},get _formValues(){return a},get _state(){return i},set _state(c){i=c},get _defaultValues(){return n},get _names(){return l},set _names(c){l=c},get _formState(){return t},get _options(){return e},set _options(c){e={...e,...c}}},subscribe:st,trigger:me,register:de,handleSubmit:J,watch:We,setValue:H,getValues:ze,reset:ct,resetField:Me,clearErrors:yt,unregister:R,setError:lt,setFocus:vt,getFieldState:tt};return{...Tr,formControl:Tr}}function Aa(r={}){const e=L.useRef(void 0),t=L.useRef(void 0),[s,n]=L.useState({isDirty:!1,isValidating:!1,isLoading:Oe(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,isReady:!1,defaultValues:Oe(r.defaultValues)?void 0:r.defaultValues});if(!e.current)if(r.formControl)e.current={...r.formControl,formState:s},r.defaultValues&&!Oe(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions);else{const{formControl:i,...l}=Ta(r);e.current={...l,formState:s}}const a=e.current.control;return a._options=r,kr(()=>{const i=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(l=>({...l,isReady:!0})),a._formState.isReady=!0,i},[a]),L.useEffect(()=>a._disableForm(r.disabled),[a,r.disabled]),L.useEffect(()=>{r.mode&&(a._options.mode=r.mode),r.reValidateMode&&(a._options.reValidateMode=r.reValidateMode)},[a,r.mode,r.reValidateMode]),L.useEffect(()=>{r.errors&&(a._setErrors(r.errors),a._focusError())},[a,r.errors]),L.useEffect(()=>{r.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,r.shouldUnregister]),L.useEffect(()=>{if(a._proxyFormState.isDirty){const i=a._getDirty();i!==s.isDirty&&a._subjects.state.next({isDirty:i}
vendor: 3,683 bytes, line 6
6)}},[a,s.isDirty]),L.useEffect(()=>{r.values&&!$e(r.values,t.current)?(a._reset(r.values,{keepFieldsRef:!0,...a._options.resetOptions}),t.current=r.values,n(i=>({...i}))):a._resetDefaultValues()},[a,r.values]),L.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),e.current.formState=gs(s,a),e.current}const Wr=(r,e,t)=>{if(r&&"reportValidity"in r){const s=w(t,e);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},Cs=(r,e)=>{for(const t in e.fields){const s=e.fields[t];s&&s.ref&&"reportValidity"in s.ref?Wr(s.ref,t,r):s.refs&&s.refs.forEach(n=>Wr(n,t,r))}},Ea=(r,e)=>{e.shouldUseNativeValidation&&Cs(r,e);const t={};for(const s in r){const n=w(e.fields,s),a=Object.assign(r[s]||{},{ref:n&&n.ref});if(Ia(e.names||Object.keys(r),s)){const i=Object.assign({},w(t,s));K(i,"root",a),K(t,s,i)}else K(t,s,a)}return t},Ia=(r,e)=>r.some(t=>t.startsWith(e+"."));var Ra=function(r,e){for(var t={};r.length;){var s=r[0],n=s.code,a=s.message,i=s.path.join(".");if(!t[i])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];t[i]={message:l.message,type:l.code}}else t[i]={message:a,type:n};if("unionErrors"in s&&s.unionErrors.forEach(function(h){return h.errors.forEach(function(k){return r.push(k)})}),e){var d=t[i].types,f=d&&d[s.code];t[i]=vs(i,e,t,n,f?[].concat(f,s.message):s.message)}r.shift()}return t},Oa=function(r,e,t){return t===void 0&&(t={}),function(s,n,a){try{return Promise.resolve(function(i,l){try{var d=Promise.resolve(r[t.mode==="sync"?"parse":"parseAsync"](s,e)).then(function(f){return a.shouldUseNativeValidation&&Cs({},a),{errors:{},values:t.raw?s:f}})}catch(f){return l(f)}return d&&d.then?d.then(void 0,l):d}(0,function(i){if(function(l){return Array.isArray(l==null?void 0:l.errors)}(i))return{values:{},errors:Ea(Ra(i.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}}},U;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(l=>typeof n[n[l]]!="number"),i={};for(const l of a)i[l]=n[l];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(U||(U={}));var Hr;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Hr||(Hr={}));const N=U.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qe=r=>{switch(typeof r){case"undefined":return N.undefined;case"string":return N.string;case"number":return Number.isNaN(r)?N.nan:N.number;case"boolean":return N.boolean;case"function":return N.function;case"bigint":return N.bigint;case"symbol":return N.symbol;case"object":return Array.isArray(r)?N.array:r===null?N.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?N.promise:typeof Map<"u"&&r instanceof Map?N.map:typeof Set<"u"&&r instanceof Set?N.set:typeof Date<"u"&&r instanceof Date?N.date:N.object;default:return N.unknown}}
vendor: 6,003 bytes, line 6
6,x=U.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 Ue extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let l=s,d=0;for(;d<i.path.length;){const f=i.path[d];d===i.path.length-1?(l[f]=l[f]||{_errors:[]},l[f]._errors.push(t(i))):l[f]=l[f]||{_errors:[]},l=l[f],d++}}};return n(this),s}static assert(e){if(!(e instanceof Ue))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,U.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)if(n.path.length>0){const a=n.path[0];t[a]=t[a]||[],t[a].push(e(n))}else s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}Ue.create=r=>new Ue(r);const ar=(r,e)=>{let t;switch(r.code){case x.invalid_type:r.received===N.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case x.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,U.jsonStringifyReplacer)}`;break;case x.unrecognized_keys:t=`Unrecognized key(s) in object: ${U.joinValues(r.keys,", ")}`;break;case x.invalid_union:t="Invalid input";break;case x.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${U.joinValues(r.options)}`;break;case x.invalid_enum_value:t=`Invalid enum value. Expected ${U.joinValues(r.options)}, received '${r.received}'`;break;case x.invalid_arguments:t="Invalid function arguments";break;case x.invalid_return_type:t="Invalid function return type";break;case x.invalid_date:t="Invalid date";break;case x.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:U.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case x.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case x.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case x.custom:t="Invalid input";break;case x.invalid_intersection_types:t="Intersection results could not be merged";break;case x.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case x.not_finite:t="Number must be finite";break;default:t=e.defaultError,U.assertNever(r)}return{message:t}};let Va=ar;function Fa(){return Va}const Pa=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let l="";const d=s.filter(f=>!!f).slice().reverse();for(const f of d)l=f(i,{data:e,defaultError:l}).message;return{...n,path:a,message:l}};function S(r,e){const t=Fa(),s=Pa({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===ar?void 0:ar].filter(n=>!!n)});r.common.issues.push(s)}class Ce{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return O;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t){const a=await n.key,i=await n.value;s.push({key:a,value:i})}return Ce.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return O;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const O=Object.freeze({status:"aborted"}),St=r=>({status:"dirty",value:r}),Ee=r=>
vendor: 27,678 bytes, line 6
6({status:"valid",value:r}),qr=r=>r.status==="aborted",Kr=r=>r.status==="dirty",ft=r=>r.status==="valid",Bt=r=>typeof Promise<"u"&&r instanceof Promise;var T;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(T||(T={}));class Ge{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}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 Jr=(r,e)=>{if(ft(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Ue(r.common.issues);return this._error=t,this._error}}};function D(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,l)=>{const{message:d}=r;return i.code==="invalid_enum_value"?{message:d??l.defaultError}:typeof l.data>"u"?{message:d??s??l.defaultError}:i.code!=="invalid_type"?{message:l.defaultError}:{message:d??t??l.defaultError}},description:n}}class ${get description(){return this._def.description}_getType(e){return qe(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:qe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ce,ctx:{common:e.parent.common,data:e.data,parsedType:qe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Bt(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){const s={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qe(e)},n=this._parseSync({data:e,path:s.path,parent:s});return Jr(s,n)}"~validate"(e){var s,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qe(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return ft(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(s=a==null?void 0:a.message)==null?void 0:s.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>ft(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qe(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(Bt(n)?n:Promise.resolve(n));return Jr(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),l=()=>a.addIssue({code:x.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(d=>d?!0:(l(),!1)):i?!0:(l(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new mt({schema:this,typeName:V.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:t=>this["~validate"](t)}}optional(){return Je.create(this,this._def)}nullable(){return pt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pe.create(this)}promise(){return Wt.create(this,this._def)}or(e){return Ut.create([this,e],this._def)}and(e){return zt.create(this,e,this._def)}transform(e){return new mt({...D(this._def),schema:this,typeName:V.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new lr({...D(this._def),innerType:this,defaultValue:t,typeName:V.ZodDefault})}brand(){return new ai({typeName:V.ZodBranded,type:this,...D(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new cr({...D(this._def),innerType:this,catchValue:t,typeName:V.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return jr.create(this,e)}readonly(){return dr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Da=/^c[^\s-]{8,}$/i,Ma=/^[0-9a-z]+$/,La=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Za=/^[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,Ba=/^[a-z0-9_-]{21}$/i,$a=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ua=/^[-+]?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)?)??$/,za=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Wa="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let sr;const Ha=/^(?:(?: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])$/,qa=/^(?:(?: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])$/,Ka=/^(([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]))$/,Ja=/^(([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])$/,Ya=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ga=/^([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])))",Xa=new RegExp(`^${js}$`);function Ns(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Qa(r){return new RegExp(`^${Ns(r)}$`)}function ei(r){let e=`${js}T${Ns(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ti(r,e){return!!((e==="v4"||!e)&&Ha.test(r)||(e==="v6"||!e)&&Ka.test(r))}function ri(r,e){if(!$a.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function si(r,e){return!!((e==="v4"||!e)&&qa.test(r)||(e==="v6"||!e)&&Ja.test(r))}class Ke extends ${_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==N.string){const a=this._getOrReturnCtx(e);return S(a,{code:x.invalid_type,expected:N.string,received:a.parsedType}),O}const s=new Ce;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),S(n,{code:x.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),S(n,{code:x.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,l=e.data.length<a.value;(i||l)&&(n=this._getOrReturnCtx(e,n),i?S(n,{code:x.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&S(n,{code:x.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")za.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"email",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")sr||(sr=new RegExp(Wa,"u")),sr.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"emoji",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Za.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"uuid",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")Ba.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"nanoid",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")Da.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"cuid",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")Ma.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"cuid2",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")La.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"ulid",code:x.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),S(n,{validation:"url",code:x.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"regex",code:x.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),S(n,{code:x.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),S(n,{code:x.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),S(n,{code:x.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?ei(a).test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{code:x.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?Xa.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{code:x.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?Qa(a).test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{code:x.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?Ua.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"duration",code:x.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?ti(e.data,a.version)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"ip",code:x.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?ri(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"jwt",code:x.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?si(e.data,a.version)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"cidr",code:x.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?Ya.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"base64",code:x.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?Ga.test(e.data)||(n=this._getOrReturnCtx(e,n),S(n,{validation:"base64url",code:x.invalid_string,message:a.message}),s.dirty()):U.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:x.invalid_string,...T.errToObj(s)})}_addCheck(e){return new Ke({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...T.errToObj(e)})}url(e){return this._addCheck({kind:"url",...T.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...T.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...T.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...T.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...T.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...T.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...T.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...T.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...T.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...T.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...T.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...T.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==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...T.errToObj(e==null?void 0: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==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...T.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...T.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...T.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...T.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...T.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...T.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...T.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...T.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...T.errToObj(t)})}nonempty(e){return this.min(1,T.errToObj(e))}trim(){return new Ke({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ke({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ke({...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 t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Ke.create=r=>new Ke({checks:[],typeName:V.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...D(r)});function ni(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=Number.parseInt(r.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class Tt extends ${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)!==N.number){const a=this._getOrReturnCtx(e);return S(a,{code:x.invalid_type,expected:N.number,received:a.parsedType}),O}let s;const n=new Ce;for(const a of this._def.checks)a.kind==="int"?U.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),S(s,{code:x.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),S(s,{code:x.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),S(s,{code:x.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?ni(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),S(s,{code:x.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),S(s,{code:x.not_finite,message:a.message}),n.dirty()):U.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,T.toString(t))}gt(e,t){return this.setLimit("min",e,!1,T.toString(t))}lte(e,t){return this.setLimit("max",e,!0,T.toString(t))}lt(e,t){return this.setLimit("max",e,!1,T.toString(t))}setLimit(e,t,s,n){return new Tt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:T.toString(n)}]})}_addCheck(e){return new Tt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:T.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:T.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:T.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:T.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:T.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:T.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:T.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:T.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:T.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&U.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Tt.create=r=>new Tt({checks:[],typeName:V.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...D(r)});class At extends ${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)!==N.bigint)return this._getInvalidInput(e);let s;const n=new Ce;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),S(s,{code:x.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),S(s,{code:x.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),S(s,{code:x.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):U.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return S(t,{code:x.invalid_type,expected:N.bigint,received:t.parsedType}),O}gte(e,t){return this.setLimit("min",e,!0,T.toString(t))}gt(e,t){return this.setLimit("min",e,!1,T.toString(t))}lte(e,t){return this.setLimit("max",e,!0,T.toString(t))}lt(e,t){return this.setLimit("max",e,!1,T.toString(t))}setLimit(e,t,s,n){return new At({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:T.toString(n)}]})}_addCheck(e){return new At({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:T.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:T.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:T.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:T.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:T.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}At.create=r=>new At({checks:[],typeName:V.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...D(r)});class ir extends ${_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==N.boolean){const s=this._getOrReturnCtx(e);return S(s,{code:x.invalid_type,expected:N.boolean,received:s.parsedType}),O}return Ee(e.data)}}ir.create=r=>new ir({typeName:V.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...D(r)});class $t extends ${_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==N.date){const a=this._getOrReturnCtx(e);return S(a,{code:x.invalid_type,expected:N.date,received:a.parsedType}),O}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return S(a,{code:x.invalid_date}),O}const s=new Ce;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),S(n,{code:x.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),S(n,{code:x.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):U.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $t({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:T.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:T.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}$t.create=r=>new $t({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:V.ZodDate,...D(r)});class Yr extends ${_parse(e){if(this._getType(e)!==N.symbol){const s=this._getOrReturnCtx(e);return S(s,{code:x.invalid_type,expected:N.symbol,received:s.parsedType}),O}return Ee(e.data)}}Yr.create=r=>new Yr({typeName:V.ZodSymbol,...D(r)});class Gr extends ${_parse(e){if(this._getType(e)!==N.undefined){const s=this._getOrReturnCtx(e);return S(s,{code:x.invalid_type,expected:N.undefined,received:s.parsedType}),O}return Ee(e.data)}}Gr.create=r=>new Gr({typeName:V.ZodUndefined,...D(r)});class Xr extends ${_parse(e){if(this._getType(e)!==N.null){const s=this._getOrReturnCtx(e);return S(s,{code:x.invalid_type,expected:N.null,received:s.parsedType}),O}return Ee(e.data)}}Xr.create=r=>new Xr({typeName:V.ZodNull,...D(r)});class Qr extends ${constructor(){super(...arguments),this._any=!0}_parse(e){return Ee(e.data)}}Qr.create=r=>new Qr({typeName:V.ZodAny,...D(r)});class es extends ${constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ee(e.data)}}es.create=r=>new es({typeName:V.ZodUnknown,...D(r)});class Xe extends ${_parse(e){const t=this._getOrReturnCtx(e);return S(t,{code:x.invalid_type,expected:N.never,received:t.parsedType}),O}}Xe.create=r=>new Xe({typeName:V.ZodNever,...D(r)});class ts extends ${_parse(e){if(this._getType(e)!==N.undefined){const s=this._getOrReturnCtx(e);return S(s,{code:x.invalid_type,expected:N.void,received:s.parsedType}),O}return Ee(e.data)}}ts.create=r=>new ts({typeName:V.ZodVoid,...D(r)});class Pe extends ${_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==N.array)return S(t,{code:x.invalid_type,expected:N.array,received:t.parsedType}),O;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,l=t.data.length<n.exactLength.value;(i||l)&&(S(t,{code:i?x.too_big:x.too_small,minimum:l?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(S(t,{code:x.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(S(t,{code:x.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,l)=>n.type._parseAsync(new Ge(t,i,t.path,l)))).then(i=>Ce.mergeArray(s,i));const a=[...t.data].map((i,l)=>n.type._parseSync(new Ge(t,i,t.path,l)));return Ce.mergeArray(s,a)}
vendor: 4,425 bytes, line 6
6get element(){return this._def.type}min(e,t){return new Pe({...this._def,minLength:{value:e,message:T.toString(t)}})}max(e,t){return new Pe({...this._def,maxLength:{value:e,message:T.toString(t)}})}length(e,t){return new Pe({...this._def,exactLength:{value:e,message:T.toString(t)}})}nonempty(e){return this.min(1,e)}}Pe.create=(r,e)=>new Pe({type:r,minLength:null,maxLength:null,exactLength:null,typeName:V.ZodArray,...D(e)});function ut(r){if(r instanceof re){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=Je.create(ut(s))}return new re({...r._def,shape:()=>e})}else return r instanceof Pe?new Pe({...r._def,type:ut(r.element)}):r instanceof Je?Je.create(ut(r.unwrap())):r instanceof pt?pt.create(ut(r.unwrap())):r instanceof at?at.create(r.items.map(e=>ut(e))):r}class re extends ${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(),t=U.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==N.object){const f=this._getOrReturnCtx(e);return S(f,{code:x.invalid_type,expected:N.object,received:f.parsedType}),O}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),l=[];if(!(this._def.catchall instanceof Xe&&this._def.unknownKeys==="strip"))for(const f in n.data)i.includes(f)||l.push(f);const d=[];for(const f of i){const h=a[f],k=n.data[f];d.push({key:{status:"valid",value:f},value:h._parse(new Ge(n,k,n.path,f)),alwaysSet:f in n.data})}if(this._def.catchall instanceof Xe){const f=this._def.unknownKeys;if(f==="passthrough")for(const h of l)d.push({key:{status:"valid",value:h},value:{status:"valid",value:n.data[h]}});else if(f==="strict")l.length>0&&(S(n,{code:x.unrecognized_keys,keys:l}),s.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const h of l){const k=n.data[h];d.push({key:{status:"valid",value:h},value:f._parse(new Ge(n,k,n.path,h)),alwaysSet:h in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const f=[];for(const h of d){const k=await h.key,j=await h.value;f.push({key:k,value:j,alwaysSet:h.alwaysSet})}return f}).then(f=>Ce.mergeObjectSync(s,f)):Ce.mergeObjectSync(s,d)}get shape(){return this._def.shape()}strict(e){return T.errToObj,new re({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,s).message)??s.defaultError;return t.code==="unrecognized_keys"?{message:T.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new re({...this._def,unknownKeys:"strip"})}passthrough(){return new re({...this._def,unknownKeys:"passthrough"})}extend(e){return new re({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new re({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:V.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new re({...this._def,catchall:e})}pick(e){const t={};for(const s of U.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new re({...this._def,shape:()=>t})}omit(e){const t={};for(const s of U.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new re({...this._def,shape:()=>t})}deepPartial(){return ut(this)}partial(e){const t={};for(const s of U.objectKeys(this.shape)){const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}return new re({...this._def,shape:()=>t})}required(e){const t={};for(const s of U.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof Je;)a=a._def.innerType;t[s]=a}return new re({...this._def,shape:()=>t})}keyof(){return Ts(U.objectKeys(this.shape))}}re.create=(r,e)=>new re({shape:()=>r,unknownKeys:"strip",catchall:Xe.create(),typeName:V.ZodObject,...D(e)});re.strictCreate=(r,e)=>new re({shape:()=>r,unknownKeys:"strict",catchall:Xe.create(),typeName:V.ZodObject,...D(e)});re.lazycreate=(r,e)=>new re({shape:r,unknownKeys:"strip",catchall:Xe.create(),typeName:V.ZodObject,...D(e)});class Ut extends ${_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return t.common.issues.push(...l.ctx.common.issues),l.result;
vendor: 5,440 bytes, line 6
6const i=a.map(l=>new Ue(l.ctx.common.issues));return S(t,{code:x.invalid_union,unionErrors:i}),O}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const d of s){const f={...t,common:{...t.common,issues:[]},parent:null},h=d._parseSync({data:t.data,path:t.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!a&&(a={result:h,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const l=i.map(d=>new Ue(d));return S(t,{code:x.invalid_union,unionErrors:l}),O}}get options(){return this._def.options}}Ut.create=(r,e)=>new Ut({options:r,typeName:V.ZodUnion,...D(e)});function or(r,e){const t=qe(r),s=qe(e);if(r===e)return{valid:!0,data:r};if(t===N.object&&s===N.object){const n=U.objectKeys(e),a=U.objectKeys(r).filter(l=>n.indexOf(l)!==-1),i={...r,...e};for(const l of a){const d=or(r[l],e[l]);if(!d.valid)return{valid:!1};i[l]=d.data}return{valid:!0,data:i}}else if(t===N.array&&s===N.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],l=e[a],d=or(i,l);if(!d.valid)return{valid:!1};n.push(d.data)}return{valid:!0,data:n}}else return t===N.date&&s===N.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class zt extends ${_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(qr(a)||qr(i))return O;const l=or(a.value,i.value);return l.valid?((Kr(a)||Kr(i))&&t.dirty(),{status:t.value,value:l.data}):(S(s,{code:x.invalid_intersection_types}),O)};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(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}zt.create=(r,e,t)=>new zt({left:r,right:e,typeName:V.ZodIntersection,...D(t)});class at extends ${_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==N.array)return S(s,{code:x.invalid_type,expected:N.array,received:s.parsedType}),O;if(s.data.length<this._def.items.length)return S(s,{code:x.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),O;!this._def.rest&&s.data.length>this._def.items.length&&(S(s,{code:x.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,l)=>{const d=this._def.items[l]||this._def.rest;return d?d._parse(new Ge(s,i,s.path,l)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>Ce.mergeArray(t,i)):Ce.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new at({...this._def,rest:e})}}at.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new at({items:r,typeName:V.ZodTuple,rest:null,...D(e)})};class rs extends ${get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==N.map)return S(s,{code:x.invalid_type,expected:N.map,received:s.parsedType}),O;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([l,d],f)=>({key:n._parse(new Ge(s,l,s.path,[f,"key"])),value:a._parse(new Ge(s,d,s.path,[f,"value"]))}));if(s.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const d of i){const f=await d.key,h=await d.value;if(f.status==="aborted"||h.status==="aborted")return O;(f.status==="dirty"||h.status==="dirty")&&t.dirty(),l.set(f.value,h.value)}return{status:t.value,value:l}})}else{const l=new Map;for(const d of i){const f=d.key,h=d.value;if(f.status==="aborted"||h.status==="aborted")return O;(f.status==="dirty"||h.status==="dirty")&&t.dirty(),l.set(f.value,h.value)}return{status:t.value,value:l}}}}rs.create=(r,e,t)=>new rs({valueType:e,keyType:r,typeName:V.ZodMap,...D(t)});class Et extends ${_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==N.set)return S(s,{code:x.invalid_type,expected:N.set,received:s.parsedType}),O;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(S(s,{code:x.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(S(s,{code:x.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(d){const f=new Set;for(const h of d){if(h.status==="aborted")return O;h.status==="dirty"&&t.dirty(),f.add(h.value)}return{status:t.value,value:f}}const l=[...s.data.values()].map((d,f)=>a._parse(new Ge(s,d,s.path,f)));return s.common.async?Promise.all(l).then(d=>i(d)):i(l)}min(e,t){return new Et({...this._def,minSize:{value:e,message:T.toString(t)}})}max(e,t){return new Et({...this._def,maxSize:{value:e,message:T.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Et.create=(r,e)=>new Et({valueType:r,minSize:null,maxSize:null,typeName:V.ZodSet,...D(e)});class ss extends ${get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ss.create=(r,e)=>new ss({getter:r,typeName:V.ZodLazy,...D(e)});
vendor: 5,489 bytes, line 6
6class ns extends ${_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return S(t,{received:t.data,code:x.invalid_literal,expected:this._def.value}),O}return{status:"valid",value:e.data}}get value(){return this._def.value}}ns.create=(r,e)=>new ns({value:r,typeName:V.ZodLiteral,...D(e)});function Ts(r,e){return new ht({values:r,typeName:V.ZodEnum,...D(e)})}class ht extends ${_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return S(t,{expected:U.joinValues(s),received:t.parsedType,code:x.invalid_type}),O}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return S(t,{received:t.data,code:x.invalid_enum_value,options:s}),O}return Ee(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ht.create(e,{...this._def,...t})}exclude(e,t=this._def){return ht.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}ht.create=Ts;class as extends ${_parse(e){const t=U.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==N.string&&s.parsedType!==N.number){const n=U.objectValues(t);return S(s,{expected:U.joinValues(n),received:s.parsedType,code:x.invalid_type}),O}if(this._cache||(this._cache=new Set(U.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=U.objectValues(t);return S(s,{received:s.data,code:x.invalid_enum_value,options:n}),O}return Ee(e.data)}get enum(){return this._def.values}}as.create=(r,e)=>new as({values:r,typeName:V.ZodNativeEnum,...D(e)});class Wt extends ${unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==N.promise&&t.common.async===!1)return S(t,{code:x.invalid_type,expected:N.promise,received:t.parsedType}),O;const s=t.parsedType===N.promise?t.data:Promise.resolve(t.data);return Ee(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Wt.create=(r,e)=>new Wt({type:r,typeName:V.ZodPromise,...D(e)});class mt extends ${innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===V.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{S(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async l=>{if(t.value==="aborted")return O;const d=await this._def.schema._parseAsync({data:l,path:s.path,parent:s});return d.status==="aborted"?O:d.status==="dirty"||t.value==="dirty"?St(d.value):d});{if(t.value==="aborted")return O;const l=this._def.schema._parseSync({data:i,path:s.path,parent:s});return l.status==="aborted"?O:l.status==="dirty"||t.value==="dirty"?St(l.value):l}}if(n.type==="refinement"){const i=l=>{const d=n.refinement(l,a);if(s.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(s.common.async===!1){const l=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?O:(l.status==="dirty"&&t.dirty(),i(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(l=>l.status==="aborted"?O:(l.status==="dirty"&&t.dirty(),i(l.value).then(()=>({status:t.value,value:l.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!ft(i))return O;const l=n.transform(i.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:l}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>ft(i)?Promise.resolve(n.transform(i.value,a)).then(l=>({status:t.value,value:l})):O);U.assertNever(n)}}mt.create=(r,e,t)=>new mt({schema:r,typeName:V.ZodEffects,effect:e,...D(t)});mt.createWithPreprocess=(r,e,t)=>new mt({schema:e,effect:{type:"preprocess",transform:r},typeName:V.ZodEffects,...D(t)});class Je extends ${_parse(e){return this._getType(e)===N.undefined?Ee(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Je.create=(r,e)=>new Je({innerType:r,typeName:V.ZodOptional,...D(e)});class pt extends ${_parse(e){return this._getType(e)===N.null?Ee(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}pt.create=(r,e)=>new pt({innerType:r,typeName:V.ZodNullable,...D(e)});class lr extends ${_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===N.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}lr.create=(r,e)=>new lr({innerType:r,typeName:V.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...D(e)});class cr extends ${_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Bt(n)?n.then(a=>
6({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ue(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Ue(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}cr.create=(r,e)=>new cr({innerType:r,typeName:V.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...D(e)});class is extends ${_parse(e){if(this._getType(e)!==N.nan){const s=this._getOrReturnCtx(e);return S(s,{code:x.invalid_type,expected:N.nan,received:s.parsedType}),O}return{status:"valid",value:e.data}}}is.create=r=>new is({typeName:V.ZodNaN,...D(r)});class ai extends ${_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class jr extends ${_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?O:a.status==="dirty"?(t.dirty(),St(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?O:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new jr({in:e,out:t,typeName:V.ZodPipeline})}}class dr extends ${_parse(e){const t=this._def.innerType._parse(e),s=n=>(ft(n)&&(n.value=Object.freeze(n.value)),n);return Bt(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}}dr.create=(r,e)=>new dr({innerType:r,typeName:V.ZodReadonly,...D(e)});re.lazycreate;var V;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(V||(V={}));const Te=Ke.create,ii=ir.create;Xe.create;Pe.create;const oi=re.create;re.strictCreate;Ut.create;zt.create;at.create;ht.create;Wt.create;Je.create;pt.create;const li=ua,As=g.createContext({}),ke=({...r})=>o.jsx(As.Provider,{value:{name:r.name},children:o.jsx(pa,{...r})}),Jt=()=>{const r=g.useContext(As),e=g.useContext(Es),{getFieldState:t,formState:s}=Kt(),n=t(r.name,s);if(!r)throw new Error("useFormField should be used within <FormField>");const{id:a}=e;return{id:a,name:r.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...n}},Es=g.createContext({}),ve=g.forwardRef(({className:r,...e},t)=>{const s=g.useId();return o.jsx(Es.Provider,{value:{id:s},children:o.jsx("div",{ref:t,className:Ae("space-y-2",r),...e})})});ve.displayName="FormItem";const xe=g.forwardRef(({className:r,...e},t)=>{const{error:s,formItemId:n}=Jt();return o.jsx(Gn,{ref:t,className:Ae(s&&"text-destructive",r),htmlFor:n,...e})});xe.displayName="FormLabel";const _e=g.forwardRef(({...r},e)=>{const{error:t,formItemId:s,formDescriptionId:n,formMessageId:a}=Jt();return o.jsx(_n,{ref:e,id:s,"aria-describedby":t?`${n} ${a}`:`${n}`,"aria-invalid":!!t,...r})});_e.displayName="FormControl";const ci=g.forwardRef(({className:r,...e},t)=>{const{formDescriptionId:s}=Jt();return o.jsx("p",{ref:t,id:s,className:Ae("text-sm text-muted-foreground",r),...e})});ci.displayName="FormDescription";const be=g.forwardRef(({className:r,children:e,...t},s)=>{const{error:n,formMessageId:a}=Jt(),i=n?String(n==null?void 0:n.message):e;return i?o.jsx("p",{ref:s,id:a,className:Ae("text-sm font-medium text-destructive",r),...t,children:i}):null});be.displayName="FormMessage";function os(r,[e,t]){return Math.min(t,Math.max(e,r))}var di=[" ","Enter","ArrowUp","ArrowDown"],ui=[" ","Enter"],it="Select",[Yt,Gt,fi]=bn(it),[gt,oo]=wn(it,[fi,us]),Xt=us(),[hi,Qe]=gt(it),[mi,pi]=gt(it),Is=r=>{const{__scopeSelect:e,children:t,open:s,defaultOpen:n,onOpenChange:a,value:i,defaultValue:l,onValueChange:d,dir:f,name:h,autoComplete:k,disabled:j,required:F,form:p}=r,v=Xt(e),[A,Z]=g.useState(null),[y,E]=g.useState(null),[W,B]=g.useState(!1),ge=Rn(f),[te,ye]=Ir({prop:s,defaultProp:n??!1,onChange:a,caller:it}),[ie,fe]=Ir({prop:i,defaultProp:l,onChange:d,caller:it}),oe=g.useRef(null),P=A?p||!!A.closest("form"):!0,[M,z]=g.useState(new Set),Q=Array.from(M).map(H=>H.props.value).join(";");return o.jsx(On,{...v,children:o.jsxs(hi,{required:F,scope:e,trigger:A,onTriggerChange:Z,valueNode:y,onValueNodeChange:E,valueNodeHasChildren:W,onValueNodeHasChildrenChange:B,contentId:vr(),value:ie,onValueChange:fe,open:te,onOpenChange:ye,dir:ge,triggerPointerDownPosRef:oe,disabled:j,children:[o.jsx(Yt.Provider,{scope:e,children:o.jsx(mi,{scope:r.__scopeSelect,onNativeOptionAdd:g.useCallback(H=>{z(se=>new Set(se).add(H))},[]),onNativeOptionRemove:g.useCallback(H=>{z(se=>{const he=new Set(se);return he.delete(H),he})},[]),children:t})}),P?o.jsxs(tn,{"aria-hidden":!0,required:F,tabIndex:-1,name:h,autoComplete:k,value:ie,onChange:H=>fe(H.target.value),disabled:j,form:p,children:[ie===void 0?o.jsx("option",{value:""}):null,Array.from(M)]},Q):null]})})};Is.displayName=it;var Rs="SelectTrigger",Os=g.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:s=!1,...n}=r,a=Xt(t),i=Qe(Rs,t),l=i.disabled||s,d=De(e,i.onTriggerChange),f=Gt(t),h=g.useRef("touch"),[k,j,F]=sn(v=>{const A=f().filter(E=>
6!E.disabled),Z=A.find(E=>E.value===i.value),y=nn(A,v,Z);y!==void 0&&i.onValueChange(y.value)}),p=v=>{l||(i.onOpenChange(!0),F()),v&&(i.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return o.jsx(kn,{asChild:!0,...a,children:o.jsx(je.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":rn(i.value)?"":void 0,...n,ref:d,onClick:ue(n.onClick,v=>{v.currentTarget.focus(),h.current!=="mouse"&&p(v)}),onPointerDown:ue(n.onPointerDown,v=>{h.current=v.pointerType;const A=v.target;A.hasPointerCapture(v.pointerId)&&A.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(p(v),v.preventDefault())}),onKeyDown:ue(n.onKeyDown,v=>{const A=k.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&j(v.key),!(A&&v.key===" ")&&di.includes(v.key)&&(p(),v.preventDefault())})})})});Os.displayName=Rs;var Vs="SelectValue",Fs=g.forwardRef((r,e)=>{const{__scopeSelect:t,className:s,style:n,children:a,placeholder:i="",...l}=r,d=Qe(Vs,t),{onValueNodeHasChildrenChange:f}=d,h=a!==void 0,k=De(e,d.onValueNodeChange);return Ye(()=>{f(h)},[f,h]),o.jsx(je.span,{...l,ref:k,style:{pointerEvents:"none"},children:rn(d.value)?o.jsx(o.Fragment,{children:i}):a})});Fs.displayName=Vs;var gi="SelectIcon",Ps=g.forwardRef((r,e)=>{const{__scopeSelect:t,children:s,...n}=r;return o.jsx(je.span,{"aria-hidden":!0,...n,ref:e,children:s||"â¼"})});Ps.displayName=gi;var yi="SelectPortal",Ds=r=>o.jsx(En,{asChild:!0,...r});Ds.displayName=yi;var ot="SelectContent",Ms=g.forwardRef((r,e)=>{const t=Qe(ot,r.__scopeSelect),[s,n]=g.useState();if(Ye(()=>{n(new DocumentFragment)},[]),!t.open){const a=s;return a?ds.createPortal(o.jsx(Ls,{scope:r.__scopeSelect,children:o.jsx(Yt.Slot,{scope:r.__scopeSelect,children:o.jsx("div",{children:r.children})})}),a):null}return o.jsx(Zs,{...r,ref:e})});Ms.displayName=ot;var Ie=10,[Ls,et]=gt(ot),vi="SelectContentImpl",xi=In("SelectContent.RemoveScroll"),Zs=g.forwardRef((r,e)=>{const{__scopeSelect:t,position:s="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:d,align:f,alignOffset:h,arrowPadding:k,collisionBoundary:j,collisionPadding:F,sticky:p,hideWhenDetached:v,avoidCollisions:A,...Z}=r,y=Qe(ot,t),[E,W]=g.useState(null),[B,ge]=g.useState(null),te=De(e,R=>W(R)),[ye,ie]=g.useState(null),[fe,oe]=g.useState(null),P=Gt(t),[M,z]=g.useState(!1),Q=g.useRef(!1);g.useEffect(()=>{if(E)return Xn(E)},[E]),Qn();const H=g.useCallback(R=>{const[ee,...de]=P().map(J=>J.ref.current),[Y]=de.slice(-1),G=document.activeElement;for(const J of R)if(J===G||(J==null||J.scrollIntoView({block:"nearest"}),J===ee&&B&&(B.scrollTop=0),J===Y&&B&&(B.scrollTop=B.scrollHeight),J==null||J.focus(),document.activeElement!==G))return},[P,B]),se=g.useCallback(()=>H([ye,E]),[H,ye,E]);g.useEffect(()=>{M&&se()},[M,se]);const{onOpenChange:he,triggerPointerDownPosRef:me}=y;g.useEffect(()=>{if(E){let R={x:0,y:0};const ee=Y=>{var G,J;R={x:Math.abs(Math.round(Y.pageX)-(((G=me.current)==null?void 0:G.x)??0)),y:Math.abs(Math.round(Y.pageY)-(((J=me.current)==null?void 0:J.y)??0))}},de=Y=>{R.x<=10&&R.y<=10?Y.preventDefault():E.contains(Y.target)||he(!1),document.removeEventListener("pointermove",ee),me.current=null};return me.current!==null&&(document.addEventListener("pointermove",ee),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",de,{capture:!0})}}},[E,he,me]),g.useEffect(()=>{const R=()=>he(!1);return window.addEventListener("blur",R),window.addEventListener("resize",R),()=>{window.removeEventListener("blur",R),window.removeEventListener("resize",R)}},[he]);const[ze,tt]=sn(R=>{const ee=P().filter(G=>!G.disabled),de=ee.find(G=>G.ref.current===document.activeElement),Y=nn(ee,R,de);Y&&setTimeout(()=>Y.ref.current.focus())}),yt=g.useCallback((R,ee,de)=>{const Y=!Q.current&&!de;(y.value!==void 0&&y.value===ee||Y)&&(ie(R),Y&&(Q.current=!0))},[y.value]),lt=g.useCallback(()=>E==null?void 0:E.focus(),[E]),We=g.useCallback((R,ee,de)=>{const Y=!Q.current&&!de;(y.value!==void 0&&y.value===ee||Y)&&oe(R)},[y.value]),rt=s==="popper"?ur:Bs,st=rt===ur?{side:l,sideOffset:d,align:f,alignOffset:h,arrowPadding:k,collisionBoundary:j,collisionPadding:F,sticky:p,hideWhenDetached:v,avoidCollisions:A}:{};return o.jsx(Ls,{scope:t,content:E,viewport:B,onViewportChange:ge,itemRefCallback:yt,selectedItem:ye,onItemLeave:lt,itemTextRefCallback:We,focusSelectedItem:se,selectedItemText:fe,position:s,isPositioned:M,searchRef:ze,children:o.jsx(ea,{as:xi,allowPinchZoom:!0,children:o.jsx(ta,{asChild:!0,trapped:y.open,onMountAutoFocus:R=>{R.preventDefault()},onUnmountAutoFocus:ue(n,R=>{var ee;(ee=y.trigger)==null||ee.focus({preventScroll:!0}),R.preventDefault()}),children:o.jsx(Sn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:R=>R.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:o.jsx(rt,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:R=>R.preventDefault(),...Z,...st,onPlaced:()=>z(!0),ref:te,style:{display:"flex",flexDirection:"column",outline:"none",...Z.style},onKeyDown:ue(Z.onKeyDown,R=>{const ee=R.ctrlKey||R.altKey||R.metaKey;if(R.key==="Tab"&&R.preventDefault(),!ee&&R.key.length===1&&tt(R.key),["ArrowUp","ArrowDown","Home","End"].includes(R.key)){let Y=P
6().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes(R.key)&&(Y=Y.slice().reverse()),["ArrowUp","ArrowDown"].includes(R.key)){const G=R.target,J=Y.indexOf(G);Y=Y.slice(J+1)}setTimeout(()=>H(Y)),R.preventDefault()}})})})})})})});Zs.displayName=vi;var _i="SelectItemAlignedPosition",Bs=g.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:s,...n}=r,a=Qe(ot,t),i=et(ot,t),[l,d]=g.useState(null),[f,h]=g.useState(null),k=De(e,te=>h(te)),j=Gt(t),F=g.useRef(!1),p=g.useRef(!0),{viewport:v,selectedItem:A,selectedItemText:Z,focusSelectedItem:y}=i,E=g.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&f&&v&&A&&Z){const te=a.trigger.getBoundingClientRect(),ye=f.getBoundingClientRect(),ie=a.valueNode.getBoundingClientRect(),fe=Z.getBoundingClientRect();if(a.dir!=="rtl"){const G=fe.left-ye.left,J=ie.left-G,Me=te.left-J,Ve=te.width+Me,ct=Math.max(Ve,ye.width),vt=window.innerWidth-Ie,xt=os(J,[Ie,Math.max(Ie,vt-ct)]);l.style.minWidth=Ve+"px",l.style.left=xt+"px"}else{const G=ye.right-fe.right,J=window.innerWidth-ie.right-G,Me=window.innerWidth-te.right-J,Ve=te.width+Me,ct=Math.max(Ve,ye.width),vt=window.innerWidth-Ie,xt=os(J,[Ie,Math.max(Ie,vt-ct)]);l.style.minWidth=Ve+"px",l.style.right=xt+"px"}const oe=j(),P=window.innerHeight-Ie*2,M=v.scrollHeight,z=window.getComputedStyle(f),Q=parseInt(z.borderTopWidth,10),H=parseInt(z.paddingTop,10),se=parseInt(z.borderBottomWidth,10),he=parseInt(z.paddingBottom,10),me=Q+H+M+he+se,ze=Math.min(A.offsetHeight*5,me),tt=window.getComputedStyle(v),yt=parseInt(tt.paddingTop,10),lt=parseInt(tt.paddingBottom,10),We=te.top+te.height/2-Ie,rt=P-We,st=A.offsetHeight/2,R=A.offsetTop+st,ee=Q+H+R,de=me-ee;if(ee<=We){const G=oe.length>0&&A===oe[oe.length-1].ref.current;l.style.bottom="0px";const J=f.clientHeight-v.offsetTop-v.offsetHeight,Me=Math.max(rt,st+(G?lt:0)+J+se),Ve=ee+Me;l.style.height=Ve+"px"}else{const G=oe.length>0&&A===oe[0].ref.current;l.style.top="0px";const Me=Math.max(We,Q+v.offsetTop+(G?yt:0)+st)+de;l.style.height=Me+"px",v.scrollTop=ee-We+v.offsetTop}l.style.margin=`${Ie}px 0`,l.style.minHeight=ze+"px",l.style.maxHeight=P+"px",s==null||s(),requestAnimationFrame(()=>F.current=!0)}},[j,a.trigger,a.valueNode,l,f,v,A,Z,a.dir,s]);Ye(()=>E(),[E]);const[W,B]=g.useState();Ye(()=>{f&&B(window.getComputedStyle(f).zIndex)},[f]);const ge=g.useCallback(te=>{te&&p.current===!0&&(E(),y==null||y(),p.current=!1)},[E,y]);return o.jsx(wi,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:F,onScrollButtonChange:ge,children:o.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:W},children:o.jsx(je.div,{...n,ref:k,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Bs.displayName=_i;var bi="SelectPopperPosition",ur=g.forwardRef((r,e)=>{const{__scopeSelect:t,align:s="start",collisionPadding:n=Ie,...a}=r,i=Xt(t);return o.jsx(Cn,{...i,...a,ref:e,align:s,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ur.displayName=bi;var[wi,Nr]=gt(ot,{}),fr="SelectViewport",$s=g.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:s,...n}=r,a=et(fr,t),i=Nr(fr,t),l=De(e,a.onViewportChange),d=g.useRef(0);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),o.jsx(Yt.Slot,{scope:t,children:o.jsx(je.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:ue(n.onScroll,f=>{const h=f.currentTarget,{contentWrapper:k,shouldExpandOnScrollRef:j}=i;if(j!=null&&j.current&&k){const F=Math.abs(d.current-h.scrollTop);if(F>0){const p=window.innerHeight-Ie*2,v=parseFloat(k.style.minHeight),A=parseFloat(k.style.height),Z=Math.max(v,A);if(Z<p){const y=Z+F,E=Math.min(p,y),W=y-E;k.style.height=E+"px",k.style.bottom==="0px"&&(h.scrollTop=W>0?W:0,k.style.justifyContent="flex-end")}}}d.current=h.scrollTop})})})]})});$s.displayName=fr;var Us="SelectGroup",[ki,Si]=gt(Us),Ci=g.forwardRef((r,e)=>{const{__scopeSelect:t,...s}=r,n=vr();return o.jsx(ki,{scope:t,id:n,children:o.jsx(je.div,{role:"group","aria-labelledby":n,...s,ref:e})})});Ci.displayName=Us;var zs="SelectLabel",Ws=g.forwardRef((r,e)=>{const{__scopeSelect:t,...s}=r,n=Si(zs,t);return o.jsx(je.div,{id:n.id,...s,ref:e})});Ws.displayName=zs;var Ht="SelectItem",[ji,Hs]=gt(Ht),qs=g.forwardRef((r,e)=>{const{__scopeSelect:t,value:s,disabled:n=!1,textValue:a,...i}=r,l=Qe(Ht,t),d=et(Ht,t),f=l.value===s,[h,k]=g.useState(a??""),[j,F]=g.useState(!1),p=De(e,y=>{var E;
6return(E=d.itemRefCallback)==null?void 0:E.call(d,y,s,n)}),v=vr(),A=g.useRef("touch"),Z=()=>{n||(l.onValueChange(s),l.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return o.jsx(ji,{scope:t,value:s,disabled:n,textId:v,isSelected:f,onItemTextChange:g.useCallback(y=>{k(E=>E||((y==null?void 0:y.textContent)??"").trim())},[]),children:o.jsx(Yt.ItemSlot,{scope:t,value:s,disabled:n,textValue:h,children:o.jsx(je.div,{role:"option","aria-labelledby":v,"data-highlighted":j?"":void 0,"aria-selected":f&&j,"data-state":f?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...i,ref:p,onFocus:ue(i.onFocus,()=>F(!0)),onBlur:ue(i.onBlur,()=>F(!1)),onClick:ue(i.onClick,()=>{A.current!=="mouse"&&Z()}),onPointerUp:ue(i.onPointerUp,()=>{A.current==="mouse"&&Z()}),onPointerDown:ue(i.onPointerDown,y=>{A.current=y.pointerType}),onPointerMove:ue(i.onPointerMove,y=>{var E;A.current=y.pointerType,n?(E=d.onItemLeave)==null||E.call(d):A.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,y=>{var E;y.currentTarget===document.activeElement&&((E=d.onItemLeave)==null||E.call(d))}),onKeyDown:ue(i.onKeyDown,y=>{var W;((W=d.searchRef)==null?void 0:W.current)!==""&&y.key===" "||(ui.includes(y.key)&&Z(),y.key===" "&&y.preventDefault())})})})})});qs.displayName=Ht;var Ct="SelectItemText",Ks=g.forwardRef((r,e)=>{const{__scopeSelect:t,className:s,style:n,...a}=r,i=Qe(Ct,t),l=et(Ct,t),d=Hs(Ct,t),f=pi(Ct,t),[h,k]=g.useState(null),j=De(e,Z=>k(Z),d.onItemTextChange,Z=>{var y;return(y=l.itemTextRefCallback)==null?void 0:y.call(l,Z,d.value,d.disabled)}),F=h==null?void 0:h.textContent,p=g.useMemo(()=>o.jsx("option",{value:d.value,disabled:d.disabled,children:F},d.value),[d.disabled,d.value,F]),{onNativeOptionAdd:v,onNativeOptionRemove:A}=f;return Ye(()=>(v(p),()=>A(p)),[v,A,p]),o.jsxs(o.Fragment,{children:[o.jsx(je.span,{id:d.textId,...a,ref:j}),d.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ds.createPortal(a.children,i.valueNode):null]})});Ks.displayName=Ct;var Js="SelectItemIndicator",Ys=g.forwardRef((r,e)=>{const{__scopeSelect:t,...s}=r;return Hs(Js,t).isSelected?o.jsx(je.span,{"aria-hidden":!0,...s,ref:e}):null});Ys.displayName=Js;var hr="SelectScrollUpButton",Gs=g.forwardRef((r,e)=>{const t=et(hr,r.__scopeSelect),s=Nr(hr,r.__scopeSelect),[n,a]=g.useState(!1),i=De(e,s.onScrollButtonChange);return Ye(()=>{if(t.viewport&&t.isPositioned){let l=function(){const f=d.scrollTop>0;a(f)};const d=t.viewport;return l(),d.addEventListener("scroll",l),()=>d.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?o.jsx(Qs,{...r,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:d}=t;l&&d&&(l.scrollTop=l.scrollTop-d.offsetHeight)}}):null});Gs.displayName=hr;var mr="SelectScrollDownButton",Xs=g.forwardRef((r,e)=>{const t=et(mr,r.__scopeSelect),s=Nr(mr,r.__scopeSelect),[n,a]=g.useState(!1),i=De(e,s.onScrollButtonChange);return Ye(()=>{if(t.viewport&&t.isPositioned){let l=function(){const f=d.scrollHeight-d.clientHeight,h=Math.ceil(d.scrollTop)<f;a(h)};const d=t.viewport;return l(),d.addEventListener("scroll",l),()=>d.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?o.jsx(Qs,{...r,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:d}=t;l&&d&&(l.scrollTop=l.scrollTop+d.offsetHeight)}}):null});Xs.displayName=mr;var Qs=g.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:s,...n}=r,a=et("SelectScrollButton",t),i=g.useRef(null),l=Gt(t),d=g.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return g.useEffect(()=>()=>d(),[d]),Ye(()=>{var h;const f=l().find(k=>k.ref.current===document.activeElement);(h=f==null?void 0:f.ref.current)==null||h.scrollIntoView({block:"nearest"})},[l]),o.jsx(je.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:ue(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(s,50))}),onPointerMove:ue(n.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),i.current===null&&(i.current=window.setInterval(s,50))}),onPointerLeave:ue(n.onPointerLeave,()=>{d()})})}),Ni="SelectSeparator",en=g.forwardRef((r,e)=>{const{__scopeSelect:t,...s}=r;return o.jsx(je.div,{"aria-hidden":!0,...s,ref:e})});en.displayName=Ni;var pr="SelectArrow",Ti=g.forwardRef((r,e)=>{const{__scopeSelect:t,...s}=r,n=Xt(t),a=Qe(pr,t),i=et(pr,t);return a.open&&i.position==="popper"?o.jsx(jn,{...n,...s,ref:e}):null});Ti.displayName=pr;var Ai="SelectBubbleInput",tn=g.forwardRef(({__scopeSelect:r,value:e,...t},s)=>{const n=g.useRef(null),a=De(s,n),i=Nn(e);return g.useEffect(()=>{const l=n.current;if(!l)return;const d=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(d,"value").set;if(i!==e&&h){const k=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(k)}},[i,e]),o.jsx(je.select,{...t,style:{...Tn,...t.style},ref:a,defaultValue:e})});tn.displayName=Ai;function rn(r){return r===""||r===void 0}function sn(r){const e=An(r),t=g.useRef(""),s=g.useRef(0),n=g.useCallback(i=>{const l=t.current+i;e(l),function d(f){t.current=f,window.clearTimeout(s.current),f!==""&&(s.current=window.setTimeout(()=>d(""),1e3))}(l)},[e]),a=g.useCallback(()=>{t.current="",window.clearTimeout(s.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(s.current),[]),[t,n,a]}function nn(r,e,t){const n=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,a=t?r.indexOf(t):-1;let i=Ei(r,Math.max(a,0));n.length===1&&(i=i.filter(f=>f!==t));const d=i.find(f=>f.textValue.toLowerCase().startsWith(n.toLowerCase()));return d!==t?d:void 0}function Ei(r,e){return r.map((t,s)=>r[(e+s)%r.length])}var Ii=Is,an=Os,Ri=Fs,Oi=Ps,Vi=Ds,on=Ms,Fi=$s,ln=Ws,cn=qs,Pi=Ks,Di=Ys,dn=Gs,un=Xs,fn=en;const ls=Ii,cs=Ri,gr=g.forwardRef(({className:r,children:e,...t},s)=>o.jsxs(an,{ref:s,className:Ae("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
6ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r),...t,children:[e,o.jsx(Oi,{asChild:!0,children:o.jsx(fs,{className:"h-4 w-4 opacity-50"})})]}));gr.displayName=an.displayName;const hn=g.forwardRef(({className:r,...e},t)=>o.jsx(dn,{ref:t,className:Ae("flex cursor-default items-center justify-center py-1",r),...e,children:o.jsx(Vn,{className:"h-4 w-4"})}));hn.displayName=dn.displayName;const mn=g.forwardRef(({className:r,...e},t)=>o.jsx(un,{ref:t,className:Ae("flex cursor-default items-center justify-center py-1",r),...e,children:o.jsx(fs,{className:"h-4 w-4"})}));mn.displayName=un.displayName;const yr=g.forwardRef(({className:r,children:e,position:t="popper",...s},n)=>o.jsx(Vi,{children:o.jsxs(on,{ref:n,className:Ae("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:t,...s,children:[o.jsx(hn,{}),o.jsx(Fi,{className:Ae("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),o.jsx(mn,{})]})}));yr.displayName=on.displayName;const Mi=g.forwardRef(({className:r,...e},t)=>o.jsx(ln,{ref:t,className:Ae("py-1.5 pl-8 pr-2 text-sm font-semibold",r),...e}));Mi.displayName=ln.displayName;const Be=g.forwardRef(({className:r,children:e,...t},s)=>o.jsxs(cn,{ref:s,className:Ae("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",r),...t,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(Di,{children:o.jsx(ra,{className:"h-4 w-4"})})}),o.jsx(Pi,{children:e})]}));Be.displayName=cn.displayName;const Li=g.forwardRef(({className:r,...e},t)=>o.jsx(fn,{ref:t,className:Ae("-mx-1 my-1 h-px bg-muted",r),...e}));Li.displayName=fn.displayName;const Zi=2*1024*1024,Bi=oi({name:Te().min(1,"Name is required").max(100),email:Te().email("Invalid email address").max(255),birthDate:Te().optional(),phoneNumber:Te().optional(),genre:Te().optional(),countryOfResidence:Te().optional(),cityOfResidence:Te().optional(),yearsOfExperience:Te().optional(),linkedin:Te().optional(),knowAnyone:Te().optional(),techCode:Te().optional(),message:Te().optional(),consent:ii().refine(r=>r===!0,{message:"You must accept the Privacy Policy"})}),$i=({jobTitle:r})=>{const[e,t]=g.useState(null),[s,n]=g.useState(null),[a,i]=g.useState(!1),[l,d]=g.useState(""),f=g.useRef(null);g.useEffect(()=>{Fn()},[]);const h=Aa({resolver:Oa(Bi),defaultValues:{name:"",email:"",birthDate:"",phoneNumber:"",genre:"",countryOfResidence:"",cityOfResidence:"",yearsOfExperience:"",linkedin:"",knowAnyone:"",techCode:"",message:"",consent:!1}}),k=p=>{var A;const v=(A=p.target.files)==null?void 0:A[0];if(n(null),!v){t(null);return}if(v.type!=="application/pdf"){n("Only PDF files are accepted"),t(null);return}if(v.size>Zi){n("Maximum file size is 2MB"),t(null);return}t(v)},j=()=>{t(null),n(null),f.current&&(f.current.value="")},F=async p=>{if(l){_t.success("Application submitted successfully!",{description:"We'll review your application and get back to you soon."});return}if(!e){n("Please upload your CV");return}i(!0);const v=await Mn({fullName:p.name,email:p.email,birthDate:p.birthDate,phone:p.phoneNumber,genre:p.genre,country:p.countryOfResidence,city:p.cityOfResidence,yearsOfExperience:p.yearsOfExperience,linkedin:p.linkedin,referralContact:p.knowAnyone,techCode:p.techCode,message:p.message,position:r,file:e});let A=!1,Z=null;if(!v.ok){try{await Ln({name:p.name,email:p.email,phone:p.phoneNumber,linkedin:
6p.linkedin,birthDate:p.birthDate,nationality:p.countryOfResidence,position:r,message:p.message,cv:e,genre:p.genre,countryOfResidence:p.countryOfResidence,cityOfResidence:p.cityOfResidence,yearsOfExperience:p.yearsOfExperience,knowAnyone:p.knowAnyone,techCode:p.techCode}),A=!0}catch(y){Z=y}Zn({form:"Careers job application form",endpoint:Bn,status:v.status,attempts:v.attempts,errorMessage:`${v.error||"Unknown error"} | Email fallback: ${A?"delivered to [email protected]":"ALSO FAILED, application data may be lost"}`,applicantName:p.name,applicantEmail:p.email,position:r,pageUrl:typeof window<"u"?window.location.href:"",siteHost:typeof window<"u"?window.location.host:""})}if(i(!1),v.ok||A){_t.success("Application submitted successfully!",{description:"We'll review your application and get back to you soon."}),h.reset(),t(null),f.current&&(f.current.value="");return}Z instanceof $n&&Z.status<500?_t.error(Z.message):v.status===429?_t.error("Too many requests. Please try again in a moment."):_t.error("Failed to submit application. Please try again.")};return o.jsxs("div",{className:"bg-card/50 backdrop-blur-sm border border-border/50 rounded-2xl p-8 md:p-10",children:[o.jsx("h3",{className:"text-2xl font-bold mb-8 tracking-tight",children:"Apply for this job opening"}),o.jsx("p",{className:"text-muted-foreground mb-8",children:"If you think you're the one we are looking for, please send us your application."}),o.jsx(li,{...h,children:o.jsxs("form",{onSubmit:h.handleSubmit(F),className:"space-y-6",children:[o.jsxs("div",{"aria-hidden":"true",style:{position:"absolute",left:"-9999px",opacity:0,height:0,width:0,overflow:"hidden"},children:[o.jsx("label",{htmlFor:"hp-website",children:"Website"}),o.jsx("input",{type:"text",id:"hp-website",name:"website",value:l,onChange:p=>d(p.target.value),tabIndex:-1,autoComplete:"off"})]}),o.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[o.jsx(ke,{control:h.control,name:"name",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"Name *"}),o.jsx(_e,{children:o.jsx(Le,{placeholder:"Your full name",...p,className:"bg-background/50"})}),o.jsx(be,{})]})}),o.jsx(ke,{control:h.control,name:"email",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"Email *"}),o.jsx(_e,{children:o.jsx(Le,{type:"email",inputMode:"email",autoComplete:"email",placeholder:"[email protected]",...p,className:"bg-background/50"})}),o.jsx(be,{})]})}),o.jsx(ke,{control:h.control,name:"birthDate",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"Birth Date"}),o.jsx(_e,{children:o.jsx(Le,{type:"date",...p,className:"bg-background/50"})}),o.jsx(be,{})]})}),o.jsx(ke,{control:h.control,name:"phoneNumber",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"Phone Number"}),o.jsx(_e,{children:o.jsx(Le,{type:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"+351 000 000 000",...p,className:"bg-background/50"})}),o.jsx(be,{})]})}),o.jsx(ke,{control:h.control,name:"genre",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"Genre"}),o.jsxs(ls,{onValueChange:p.onChange,value:p.value,children:[o.jsx(_e,{children:o.jsx(gr,{className:"bg-background/50",children:o.jsx(cs,{placeholder:"Please choose an option"})})}),o.jsxs(yr,{children:[o.jsx(Be,{value:"male",children:"Male"}),o.jsx(Be,{value:"female",children:"Female"}),o.jsx(Be,{value:"prefer-not-to-say",children:"Prefer not to say"})]})]}),o.jsx(be,{})]})}),o.jsx(ke,{control:h.control,name:"countryOfResidence",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"Country of Residence"}),o.jsx(_e,{children:o.jsx(Le,{placeholder:"Portugal",...p,className:"bg-background/50"})}),o.jsx(be,{})]})}),o.jsx(ke,{control:h.control,name:"cityOfResidence",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"City of Residence"}),o.jsx(_e,{children:o.jsx(Le,{placeholder:"Porto",...p,className:"bg-background/50"})}),o.jsx(be,{})]})}),o.jsx(ke,{control:h.control,name:"yearsOfExperience",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"Years of Experience"}),o.jsxs(ls,{onValueChange:p.onChange,value:p.value,children:[o.jsx(_e,{children:o.jsx(gr,{className:"bg-background/50",children:o.jsx(cs,{placeholder:"Please choose an option"})})}),o.jsxs(yr,{children:[o.jsx(Be,{value:"internship",children:"Just an internship"}),o.jsx(Be,{value:"less-than-1",children:"Less than a year"}),o.jsx(Be,{value:"1-3",children:"Between 1 and 3 years"}),o.jsx(Be,{value:"4-6",children:"Between 4 and 6 years"}),o.jsx(Be,{value:"7+",children:"More than 7 years"})]})]}),o.jsx(be,{})]})}),o.jsx(ke,{control:h.control,name:"linkedin",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"LinkedIn"}),o.jsx(_e,{children:o.jsx(Le,{type:"url",inputMode:"url",placeholder:"https://linkedin.com/in/yourprofile",...p,className:"bg-background/50"})}),o.jsx(be,{})]})}),o.jsx(ke,{control:h.control,name:"knowAnyone",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"Do you know anyone who works at Devscope?"}),o.jsx(_e,{children:o.jsx(Le,{placeholder:"Name (optional)",...p,className:"bg-background/50"})}),o.jsx(be,{})]})}),o.jsx(ke,{control:h.control,name:"techCode",render:({field:p})=>o.jsxs(ve,{className:"md:col-span-2",children:[o.jsx(xe,{children:"Tech Code"}),o.jsx(_e,{children:o.jsx(Le,{placeholder:"If you have a referral code",...p,className:"bg-background/50"})}),o.jsx(be,{})]})})]}),o.jsx(ke,{control:h.control,name:"message",render:({field:p})=>o.jsxs(ve,{children:[o.jsx(xe,{children:"Message"}),o.jsx(_e,{children:o.jsx(Jn,{placeholder:"Tell us a bit about yourself and why you're interested in this position...",className:"bg-background/50 min-h-[120px]",...p})}),o.jsx(be,{})]})}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Upload CV *"}),o.jsx("div",{className:`border-2 border-dashed rounded-lg p-6 text-center transition-colors ${s?"border-destructive":e?"border-primary/50 bg-primary/5":"border-border hover:border-primary/30"}`,children:e?o.jsxs("div",{className:"flex items-center justify-center gap-3",children:[o.jsx(sa,{className:"w-5 h-5 text-primary"}),o.jsx("span",{className:"text-sm",children:e.name}),o.jsx("button",{type:"button",onClick:j,className:"p-1 hover:bg-destructive/10 rounded-full transition-colors",children:o.jsx(Pn,{className:"w-4 h-4 text-destructive"})})]}):o.jsxs("label",{className:"cursor-pointer block",children:[o.jsx(la,{className:"w-8 h-8 mx-auto mb-2 text-muted-foreground"}),o.jsx("span",{className:"text-sm text-muted-foreground",children:"Click to upload or drag and drop"}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Maximum file size: 2MB, accepted files: .pdf"}),o.jsx("input",{ref:f,type:"file",accept:"application/pdf,.pdf",onChange:k,className:"hidden","aria-describedby":"
6cv-upload-help"})]})}),s&&o.jsx("p",{className:"text-sm font-medium text-destructive",role:"alert","aria-live":"polite",children:s})]}),o.jsx(ke,{control:h.control,name:"consent",render:({field:p})=>o.jsxs(ve,{className:"flex flex-row items-start space-x-3 space-y-0",children:[o.jsx(_e,{children:o.jsx(Yn,{checked:p.value,onCheckedChange:p.onChange})}),o.jsxs("div",{className:"space-y-1 leading-none",children:[o.jsxs(xe,{className:"text-sm font-normal text-muted-foreground",children:["I have read and accept the"," ",o.jsx(kt,{to:"/privacy",className:"text-primary hover:underline",children:"Privacy Policy"})," ","concerning the treatment of personal information. Your data will be preserved for 3 years."]}),o.jsx(be,{})]})]})}),o.jsx(Ft,{type:"submit",size:"lg",className:"w-full md:w-auto min-h-[44px] btn-glow",disabled:a,children:a?o.jsxs(o.Fragment,{children:[o.jsx(Dn,{className:"mr-2 h-4 w-4 animate-spin"}),"Submitting..."]}):"Submit Application"})]})})]})},Ui=60*60*1e3,zi="devscope_wp_careers_v2",lo=()=>{const{slug:r}=vn(),[e,t]=g.useState(null),[s,n]=g.useState(!0),[a,i]=g.useState(!1),[l,d]=g.useState(!1),[f,h]=g.useState(0);return g.useEffect(()=>{if(!r)return;let k=!1;return(async()=>{n(!0),d(!1),i(!1),await qn(`devscope_wp_career_v1_${r}`,async()=>{const F=await Hn(r);return F||(k||i(!0),null)},F=>{!k&&F&&t(F)},()=>{var v;if(k)return;const F=Kn(zi),p=(v=F==null?void 0:F.jobs)==null?void 0:v.find(A=>A.slug===r);p?t(p):d(!0)},Ui),k||n(!1)})(),()=>{k=!0}},[r,f]),s?o.jsxs("div",{className:"min-h-screen bg-background",children:[o.jsx(Ot,{}),o.jsx("main",{className:"pt-32 pb-24",children:o.jsx("div",{className:"container mx-auto px-6 max-w-3xl",children:o.jsxs("div",{className:"animate-pulse space-y-6",children:[o.jsx("div",{className:"h-4 bg-muted rounded w-1/4"}),o.jsx("div",{className:"h-6 bg-muted rounded w-1/6"}),o.jsx("div",{className:"h-10 bg-muted rounded w-3/4"}),o.jsxs("div",{className:"space-y-3 mt-8",children:[o.jsx("div",{className:"h-4 bg-muted rounded w-full"}),o.jsx("div",{className:"h-4 bg-muted rounded w-5/6"}),o.jsx("div",{className:"h-4 bg-muted rounded w-4/6"})]})]})})}),o.jsx(Vt,{})]}):l&&!e?o.jsxs("div",{className:"min-h-screen bg-background",children:[o.jsx(Ot,{}),o.jsx("main",{className:"pt-32 pb-24",children:o.jsxs("div",{className:"container mx-auto px-6 text-center max-w-xl",children:[o.jsx("h1",{className:"mb-4",children:"We couldn't load this position"}),o.jsx("p",{className:"text-muted-foreground mb-8",children:"There was a temporary problem reaching our job listings. Please try again in a moment."}),o.jsxs("div",{className:"flex flex-wrap gap-3 justify-center",children:[o.jsx(Ft,{onClick:()=>h(k=>k+1),children:"Try again"}),o.jsx(Ft,{asChild:!0,variant:"outline",children:o.jsx(kt,{to:"/careers",children:"Back to Careers"})})]})]})}),o.jsx(Vt,{})]}):a||!e?o.jsxs("div",{className:"min-h-screen bg-background",children:[o.jsx(Ot,{}),o.jsx("main",{className:"pt-32 pb-24",children:o.jsxs("div",{className:"container mx-auto px-6 text-center",children:[o.jsx("h1",{className:"mb-6",children:"Position Not Found"}),o.jsx(Ft,{asChild:!0,children:o.jsx(kt,{to:"/careers",children:"Back to Careers"})})]})}),o.jsx(Vt,{})]}):o.jsxs("div",{className:"min-h-screen bg-background",children:[o.jsx(Un,{title:`${e.title} - Careers`,description:e.excerpt,canonical:`https://devscope.net/careers/${e.slug}`}),o.jsx(zn,{title:e.title,description:e.excerpt||e.title,datePosted:e.date,employmentType:"FULL_TIME",location:{city:"Porto",country:"PT"}}),o.jsx(Ot,{}),o.jsxs("main",{id:"main-content",className:"pt-20",children:[o.jsx("section",{className:"pt-8 md:pt-12 pb-8",children:o.jsxs("div",{className:"container mx-auto px-6 max-w-3xl",children:[o.jsx(aa,{className:"mb-6",children:o.jsxs(ia,{children:[o.jsx(tr,{children:o.jsx(Rr,{asChild:!0,children:o.jsx(kt,{to:"/",children:"Home"})})}),o.jsx(Or,{}),o.jsx(tr,{children:o.jsx(Rr,{asChild:!0,children:o.jsx(kt,{to:"/careers",children:"Careers"})})}),o.jsx(Or,{}),o.jsx(tr,{children:o.jsx(oa,{className:"line-clamp-1",children:e.title})})]})}),o.jsx(Wn,{variant:"outline",className:"mb-4 border-primary/30 text-primary",children:"Job Opening"}),o.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-4 text-foreground
6/90 leading-tight",children:e.title})]})}),o.jsx("section",{className:"py-8 md:py-12",children:o.jsx("div",{className:"container mx-auto px-6 max-w-3xl",children:o.jsx("article",{className:`prose prose-invert prose-base md:prose-lg 7 prose-headings:font-bold prose-headings:text-foreground 8 [&_h2]:text-xl [&_h2]:md:text-2xl [&_h2]:mt-14 [&_h2]:mb-5 [&_h2]:font-bold 9 [&_h3]:text-lg [&_h3]:md:text-xl [&_h3]:mt-10 [&_h3]:mb-4 [&_h3]:font-bold 10 [&_h4]:text-base [&_h4]:md:text-lg [&_h4]:mt-8 [&_h4]:mb-3 [&_h4]:font-semibold 11 [&_p]:text-foreground/90 [&_p]:leading-[1.85] [&_p]:mb-6 12 prose-a:text-primary prose-a:no-underline hover:prose-a:underline 13 prose-strong:text-foreground prose-strong:font-semibold 14 [&_ul]:list-disc [&_ul]:pl-6 [&_ul]:my-6 [&_ul]:space-y-2 15 [&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:my-6 [&_ol]:space-y-2 16 [&_li]:text-foreground/90 [&_li]:leading-[1.8] 17 prose-blockquote:border-l-4 prose-blockquote:border-primary prose-blockquote:bg-card/50 prose-blockquote:p-4 prose-blockquote:rounded-r-lg 18 prose-img:rounded-xl prose-img:border prose-img:border-border/10 prose-img:shadow-lg prose-img:my-8 prose-img:w-full 19 [&_br]:block [&_br]:mt-4 [&_div]:mb-6 20 max-w-none`,dangerouslySetInnerHTML:{__html:na.sanitize(e.contentHtml,{ALLOWED_TAGS:["p","br","strong","em","a","ul","ol","li","h2","h3","h4","h5","h6","span","div","blockquote"],ALLOWED_ATTR:["href","target","rel","class"]})}})})}),o.jsx("section",{className:"py-12 border-t border-border",children:o.jsx("div",{className:"container mx-auto px-6 max-w-3xl",children:o.jsx($i,{jobTitle:e.title})})})]}),o.jsx(Vt,{})]})};export{lo as default};
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.