import{j as e,Q as t,U as a,W as s,X as r,Y as n,Z as i,_ as o,$ as d,a0 as l,a1 as c,a2 as u,a3 as m,a4 as h,a5 as f,a6 as p,a7 as y,a8 as g,a9 as v,aa as x,ab as _,a as b,u as k,P as w,f as N,d as j,t as C,v as A,q as S,r as O,b as T,s as F,I as R}from"./ui-vendor-Dyu0xMC9.js";import{r as V,R as E,L as Z}from"./react-vendor-BiKEbLqf.js";import{B as P}from"./button-F0c2zgfO.js";import{L as D,I,s as L,a as M}from"./client-Ccea0ZZ8.js";import{d as z,c as $,X as q,D as U,n as B,o as W,E as K,F as G,t as H,G as J,u as X}from"./index-D2mkZfe8.js";import{b as Y,a as Q,C as ee}from"./chevron-right-9d459eh4.js";
/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const te=z("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),ae=z("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),se=z("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),re=z("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),ne=z("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]),ie=z("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),oe=z("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),de=z("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),le=z("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),ce=z("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),ue=z("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]),me=z("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),he=z("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]),fe=z("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),pe=i,ye=o,ge=d,ve=V.forwardRef(({className:a,...s},r)=>e.jsx(t,{className:$("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...s,ref:r}));
/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */ve.displayName=t.displayName;const xe=U("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),_e=V.forwardRef(({side:t="right",className:r,children:n,...i},o)=>e.jsxs(ge,{children:[e.jsx(ve,{}),e.jsxs(a,{ref:o,className:$(xe({side:t}),r),...i,children:[n,e.jsxs(s,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[e.jsx(q,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_e.displayName=a.displayName;V.forwardRef(({className:t,...a},s)=>e.jsx(r,{ref:s,className:$("text-lg font-semibold text-foreground",t),...a})).displayName=r.displayName;V.forwardRef(({className:t,...a},s)=>e.jsx(n,{ref:s,className:$("text-sm text-muted-foreground",t),...a})).displayName=n.displayName;const be=x,ke=_;V.forwardRef(({className:t,inset:a,children:s,...r},n)=>e.jsxs(l,{ref:n,className:$("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",a&&"pl-8",t),...r,children:[s,e.jsx(Y,{className:"ml-auto h-4 w-4"})]})).displayName=l.displayName;V.forwardRef(({className:t,...a},s)=>e.jsx(c,{ref:s,className:$("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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),...a})).displayName=c.displayName;const we=V.forwardRef(({className:t,sideOffset:a=4,...s},r)=>e.jsx(u,{children:e.jsx(m,{ref:r,sideOffset:a,className:$("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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),...s})}));we.displayName=m.displayName;const Ne=V.forwardRef(({className:t,inset:a,...s},r)=>e.jsx(h,{ref:r,className:$("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",a&&"pl-8",t),...s}));Ne.displayName=h.displayName;V.forwardRef(({className:t,children:a,checked:s,...r},n)=>e.jsxs(f,{ref:n,className:$("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),checked:s,...r,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(p,{children:e.jsx(te,{className:"h-4 w-4"})})}),a]})).displayName=f.displayName;V.forwardRef(({className:t,children:a,...s},r)=>e.jsxs(y,{ref:r,className:$("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(p,{children:e.jsx(se,{className:"h-2 w-2 fill-current"})})}),a]})).displayName=y.displayName;V.forwardRef(({className:t,inset:a,...s},r)=>e.jsx(g,{ref:r,className:$("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",t),...s})).displayName=g.displayName;V.forwardRef(({className:t,...a},s)=>e.jsx(v,{ref:s,className:$("-mx-1 my-1 h-px bg-muted",t),...a})).displayName=v.displayName;var je=e=>"checkbox"===e.type,Ce=e=>e instanceof Date,Ae=e=>null==e;const Se=e=>"object"==typeof e;var Oe=e=>!Ae(e)&&!Array.isArray(e)&&Se(e)&&!Ce(e),Te="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Fe(e){let t;const a=Array.isArray(e),s="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else{if(Te&&(e instanceof Blob||s)||!a&&!Oe(e))return e;if(t=a?[]:{},a||(e=>{const t=e.constructor&&e.constructor.prototype;return Oe(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const a in e)e.hasOwnProperty(a)&&(t[a]=Fe(e[a]));else t=e}return t}var Re=e=>/^\w*$/.test(e),Ve=e=>void 0===e,Ee=e=>Array.isArray(e)?e.filter(Boolean):[],Ze=e=>Ee(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Pe=(e,t,a)=>{if(!t||!Oe(e))return a;const s=(Re(t)?[t]:Ze(t)).reduce((e,t)=>Ae(e)?e:e[t],e);return Ve(s)||s===e?Ve(e[t])?a:e[t]:s},De=e=>"boolean"==typeof e,Ie=(e,t,a)=>{let s=-1;const r=Re(t)?[t]:Ze(t),n=r.length,i=n-1;for(;++s<n;){const t=r[s];let n=a;if(s!==i){const a=e[t];n=Oe(a)||Array.isArray(a)?a:isNaN(+r[s+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=n,e=e[t]}};const Le="blur",Me="focusout",ze="onBlur",$e="onChange",qe="onSubmit",Ue="onTouched",Be="all",We="max",Ke="min",Ge="maxLength",He="minLength",Je="pattern",Xe="required",Ye="validate";E.createContext(null).displayName="HookFormContext";const Qe="undefined"!=typeof window?E.useLayoutEffect:E.useEffect;var et=e=>"string"==typeof e,tt=e=>Ae(e)||!Se(e);function at(e,t,a=new WeakSet){if(tt(e)||tt(t))return e===t;if(Ce(e)&&Ce(t))return e.getTime()===t.getTime();const s=Object.keys(e),r=Object.keys(t);if(s.length!==r.length)return!1;if(a.has(e)||a.has(t))return!0;a.add(e),a.add(t);for(const n of s){const s=e[n];if(!r.includes(n))return!1;if("ref"!==n){const e=t[n];if(Ce(s)&&Ce(e)||Oe(s)&&Oe(e)||Array.isArray(s)&&Array.isArray(e)?!at(s,e,a):s!==e)return!1}}return!0}var st=(e,t,a,s,r)=>t?{...a[e],types:{...a[e]&&a[e].types?a[e].types:{},[s]:r||!0}}:{},rt=e=>Array.isArray(e)?e:[e],nt=()=>{let e=[];return{get observers(){return e},next:t=>{for(const a of e)a.next&&a.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},it=e=>Oe(e)&&!Object.keys(e).length,ot=e=>"file"===e.type,dt=e=>"function"==typeof e,lt=e=>{if(!Te)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ct=e=>"select-multiple"===e.type,ut=e=>"radio"===e.type,mt=e=>lt(e)&&e.isConnected;function ht(e,t){const a=Array.isArray(t)?t:Re(t)?[t]:Ze(t),s=1===a.length?e:function(e,t){const a=t.slice(0,-1).length;let s=0;for(;s<a;)e=Ve(e)?s++:e[t[s++]];return e}(e,a),r=a.length-1,n=a[r];return s&&delete s[n],0!==r&&(Oe(s)&&it(s)||Array.isArray(s)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ve(e[t]))return!1;return!0}(s))&&ht(e,a.slice(0,-1)),e}var ft=e=>{for(const t in e)if(dt(e[t]))return!0;return!1};function pt(e,t={}){const a=Array.isArray(e);if(Oe(e)||a)for(const s in e)Array.isArray(e[s])||Oe(e[s])&&!ft(e[s])?(t[s]=Array.isArray(e[s])?[]:{},pt(e[s],t[s])):Ae(e[s])||(t[s]=!0);return t}function yt(e,t,a){const s=Array.isArray(e);if(Oe(e)||s)for(const r in e)Array.isArray(e[r])||Oe(e[r])&&!ft(e[r])?Ve(t)||tt(a[r])?a[r]=Array.isArray(e[r])?pt(e[r],[]):{...pt(e[r])}:yt(e[r],Ae(t)?{}:t[r],a[r]):a[r]=!at(e[r],t[r]);return a}var gt=(e,t)=>yt(e,t,pt(t));const vt={value:!1,isValid:!1},xt={value:!0,isValid:!0};var _t=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ve(e[0].attributes.value)?Ve(e[0].value)||""===e[0].value?xt:{value:e[0].value,isValid:!0}:xt:vt}return vt},bt=(e,{valueAsNumber:t,valueAsDate:a,setValueAs:s})=>Ve(e)?e:t?""===e?NaN:e?+e:e:a&&et(e)?new Date(e):s?s(e):e;const kt={isValid:!1,value:null};var wt=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,kt):kt;function Nt(e){const t=e.ref;return ot(t)?t.files:ut(t)?wt(e.refs).value:ct(t)?[...t.selectedOptions].map(({value:e})=>e):je(t)?_t(e.refs).value:bt(Ve(t.value)?e.ref.value:t.value,e)}var jt=e=>e instanceof RegExp,Ct=e=>Ve(e)?e:jt(e)?e.source:Oe(e)?jt(e.value)?e.value.source:e.value:e,At=e=>({isOnSubmit:!e||e===qe,isOnBlur:e===ze,isOnChange:e===$e,isOnAll:e===Be,isOnTouch:e===Ue});const St="AsyncFunction";var Ot=e=>!!e&&!!e.validate&&!!(dt(e.validate)&&e.validate.constructor.name===St||Oe(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===St)),Tt=(e,t,a)=>!a&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const Ft=(e,t,a,s)=>{for(const r of a||Object.keys(e)){const a=Pe(e,r);if(a){const{_f:e,...n}=a;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],r)&&!s)return!0;if(e.ref&&t(e.ref,e.name)&&!s)return!0;if(Ft(n,t))break}else if(Oe(n)&&Ft(n,t))break}}};function Rt(e,t,a){const s=Pe(e,a);if(s||Re(a))return{error:s,name:a};const r=a.split(".");for(;r.length;){const s=r.join("."),n=Pe(t,s),i=Pe(e,s);if(n&&!Array.isArray(n)&&a!==s)return{name:a};if(i&&i.type)return{name:s,error:i};if(i&&i.root&&i.root.type)return{name:`${s}.root`,error:i.root};r.pop()}return{name:a}}var Vt=(e,t,a)=>{const s=rt(Pe(e,a));return Ie(s,"root",t[a]),Ie(e,a,s),e},Et=e=>et(e);function Zt(e,t,a="validate"){if(Et(e)||Array.isArray(e)&&e.every(Et)||De(e)&&!e)return{type:a,message:Et(e)?e:"",ref:t}}var Pt=e=>Oe(e)&&!jt(e)?e:{value:e,message:""},Dt=async(e,t,a,s,r,n)=>{const{ref:i,refs:o,required:d,maxLength:l,minLength:c,min:u,max:m,pattern:h,validate:f,name:p,valueAsNumber:y,mount:g}=e._f,v=Pe(a,p);if(!g||t.has(p))return{};const x=o?o[0]:i,_=e=>{r&&x.reportValidity&&(x.setCustomValidity(De(e)?"":e||""),x.reportValidity())},b={},k=ut(i),w=je(i),N=k||w,j=(y||ot(i))&&Ve(i.value)&&Ve(v)||lt(i)&&""===i.value||""===v||Array.isArray(v)&&!v.length,C=st.bind(null,p,s,b),A=(e,t,a,s=Ge,r=He)=>{const n=e?t:a;b[p]={type:e?s:r,message:n,ref:i,...C(e?s:r,n)}};if(n?!Array.isArray(v)||!v.length:d&&(!N&&(j||Ae(v))||De(v)&&!v||w&&!_t(o).isValid||k&&!wt(o).isValid)){const{value:e,message:t}=Et(d)?{value:!!d,message:d}:Pt(d);if(e&&(b[p]={type:Xe,message:t,ref:x,...C(Xe,t)},!s))return _(t),b}if(!(j||Ae(u)&&Ae(m))){let e,t;const a=Pt(m),r=Pt(u);if(Ae(v)||isNaN(v)){const s=i.valueAsDate||new Date(v),n=e=>new Date((new Date).toDateString()+" "+e),o="time"==i.type,d="week"==i.type;et(a.value)&&v&&(e=o?n(v)>n(a.value):d?v>a.value:s>new Date(a.value)),et(r.value)&&v&&(t=o?n(v)<n(r.value):d?v<r.value:s<new Date(r.value))}else{const s=i.valueAsNumber||(v?+v:v);Ae(a.value)||(e=s>a.value),Ae(r.value)||(t=s<r.value)}if((e||t)&&(A(!!e,a.message,r.message,We,Ke),!s))return _(b[p].message),b}if((l||c)&&!j&&(et(v)||n&&Array.isArray(v))){const e=Pt(l),t=Pt(c),a=!Ae(e.value)&&v.length>+e.value,r=!Ae(t.value)&&v.length<+t.value;if((a||r)&&(A(a,e.message,t.message),!s))return _(b[p].message),b}if(h&&!j&&et(v)){const{value:e,message:t}=Pt(h);if(jt(e)&&!v.match(e)&&(b[p]={type:Je,message:t,ref:i,...C(Je,t)},!s))return _(t),b}if(f)if(dt(f)){const e=Zt(await f(v,a),x);if(e&&(b[p]={...e,...C(Ye,e.message)},!s))return _(e.message),b}else if(Oe(f)){let e={};for(const t in f){if(!it(e)&&!s)break;const r=Zt(await f[t](v,a),x,t);r&&(e={...r,...C(t,r.message)},_(r.message),s&&(b[p]=e))}if(!it(e)&&(b[p]={ref:x,...e},!s))return b}return _(!0),b};const It={mode:qe,reValidateMode:$e,shouldFocusError:!0};function Lt(e={}){let t,a={...It,...e},s={submitCount:0,isDirty:!1,isReady:!1,isLoading:dt(a.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:a.errors||{},disabled:a.disabled||!1},r={},n=(Oe(a.defaultValues)||Oe(a.values))&&Fe(a.defaultValues||a.values)||{},i=a.shouldUnregister?{}:Fe(n),o={action:!1,mount:!1,watch:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let u={...c};const m={array:nt(),state:nt()},h=a.criteriaMode===Be,f=async e=>{if(!a.disabled&&(c.isValid||u.isValid||e)){const e=a.resolver?it((await x()).errors):await _(r,!0);e!==s.isValid&&m.state.next({isValid:e})}},p=(e,t)=>{!a.disabled&&(c.isValidating||c.validatingFields||u.isValidating||u.validatingFields)&&((e||Array.from(d.mount)).forEach(e=>{e&&(t?Ie(s.validatingFields,e,t):ht(s.validatingFields,e))}),m.state.next({validatingFields:s.validatingFields,isValidating:!it(s.validatingFields)}))},y=(e,t,a,s)=>{const d=Pe(r,e);if(d){const r=Pe(i,e,Ve(a)?Pe(n,e):a);Ve(r)||s&&s.defaultChecked||t?Ie(i,e,t?r:Nt(d._f)):w(e,r),o.mount&&f()}},g=(e,t,r,i,o)=>{let d=!1,l=!1;const h={name:e};if(!a.disabled){if(!r||i){(c.isDirty||u.isDirty)&&(l=s.isDirty,s.isDirty=h.isDirty=b(),d=l!==h.isDirty);const a=at(Pe(n,e),t);l=!!Pe(s.dirtyFields,e),a?ht(s.dirtyFields,e):Ie(s.dirtyFields,e,!0),h.dirtyFields=s.dirtyFields,d=d||(c.dirtyFields||u.dirtyFields)&&l!==!a}if(r){const t=Pe(s.touchedFields,e);t||(Ie(s.touchedFields,e,r),h.touchedFields=s.touchedFields,d=d||(c.touchedFields||u.touchedFields)&&t!==r)}d&&o&&m.state.next(h)}return d?h:{}},v=(e,r,n,i)=>{const o=Pe(s.errors,e),d=(c.isValid||u.isValid)&&De(r)&&s.isValid!==r;var h;if(a.delayError&&n?(h=()=>((e,t)=>{Ie(s.errors,e,t),m.state.next({errors:s.errors})})(e,n),t=e=>{clearTimeout(l),l=setTimeout(h,e)},t(a.delayError)):(clearTimeout(l),t=null,n?Ie(s.errors,e,n):ht(s.errors,e)),(n?!at(o,n):o)||!it(i)||d){const t={...i,...d&&De(r)?{isValid:r}:{},errors:s.errors,name:e};s={...s,...t},m.state.next(t)}},x=async e=>{p(e,!0);const t=await a.resolver(i,a.context,((e,t,a,s)=>{const r={};for(const n of e){const e=Pe(t,n);e&&Ie(r,n,e._f)}return{criteriaMode:a,names:[...e],fields:r,shouldUseNativeValidation:s}})(e||d.mount,r,a.criteriaMode,a.shouldUseNativeValidation));return p(e),t},_=async(e,t,r={valid:!0})=>{for(const n in e){const o=e[n];if(o){const{_f:e,...l}=o;if(e){const l=d.array.has(e.name),u=o._f&&Ot(o._f);u&&c.validatingFields&&p([n],!0);const m=await Dt(o,d.disabled,i,h,a.shouldUseNativeValidation&&!t,l);if(u&&c.validatingFields&&p([n]),m[e.name]&&(r.valid=!1,t))break;!t&&(Pe(m,e.name)?l?Vt(s.errors,m,e.name):Ie(s.errors,e.name,m[e.name]):ht(s.errors,e.name))}!it(l)&&await _(l,t,r)}}return r.valid},b=(e,t)=>!a.disabled&&(e&&t&&Ie(i,e,t),!at(O(),n)),k=(e,t,a)=>((e,t,a,s,r)=>et(e)?(s&&t.watch.add(e),Pe(a,e,r)):Array.isArray(e)?e.map(e=>(s&&t.watch.add(e),Pe(a,e))):(s&&(t.watchAll=!0),a))(e,d,{...o.mount?i:Ve(t)?n:et(e)?{[e]:t}:t},a,t),w=(e,t,a={})=>{const s=Pe(r,e);let n=t;if(s){const a=s._f;a&&(!a.disabled&&Ie(i,e,bt(t,a)),n=lt(a.ref)&&Ae(t)?"":t,ct(a.ref)?[...a.ref.options].forEach(e=>e.selected=n.includes(e.value)):a.refs?je(a.ref)?a.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(n)?e.checked=!!n.find(t=>t===e.value):e.checked=n===e.value||!!n)}):a.refs.forEach(e=>e.checked=e.value===n):ot(a.ref)?a.ref.value="":(a.ref.value=n,a.ref.type||m.state.next({name:e,values:Fe(i)})))}(a.shouldDirty||a.shouldTouch)&&g(e,n,a.shouldTouch,a.shouldDirty,!0),a.shouldValidate&&S(e)},N=(e,t,a)=>{for(const s in t){if(!t.hasOwnProperty(s))return;const n=t[s],i=e+"."+s,o=Pe(r,i);(d.array.has(e)||Oe(n)||o&&!o._f)&&!Ce(n)?N(i,n,a):w(i,n,a)}},j=(e,t,a={})=>{const l=Pe(r,e),h=d.array.has(e),f=Fe(t);Ie(i,e,f),h?(m.array.next({name:e,values:Fe(i)}),(c.isDirty||c.dirtyFields||u.isDirty||u.dirtyFields)&&a.shouldDirty&&m.state.next({name:e,dirtyFields:gt(n,i),isDirty:b(e,f)})):!l||l._f||Ae(f)?w(e,f,a):N(e,f,a),Tt(e,d)&&m.state.next({...s,name:e}),m.state.next({name:o.mount?e:void 0,values:Fe(i)})},C=async e=>{o.mount=!0;const n=e.target;let l=n.name,y=!0;const b=Pe(r,l),k=e=>{y=Number.isNaN(e)||Ce(e)&&isNaN(e.getTime())||at(e,Pe(i,l,e))},w=At(a.mode),N=At(a.reValidateMode);if(b){let o,C;const A=n.type?Nt(b._f):(e=>Oe(e)&&e.target?je(e.target)?e.target.checked:e.target.value:e)(e),O=e.type===Le||e.type===Me,T=!((j=b._f).mount&&(j.required||j.min||j.max||j.maxLength||j.minLength||j.pattern||j.validate)||a.resolver||Pe(s.errors,l)||b._f.deps)||((e,t,a,s,r)=>!r.isOnAll&&(!a&&r.isOnTouch?!(t||e):(a?s.isOnBlur:r.isOnBlur)?!e:!(a?s.isOnChange:r.isOnChange)||e))(O,Pe(s.touchedFields,l),s.isSubmitted,N,w),F=Tt(l,d,O);Ie(i,l,A),O?(b._f.onBlur&&b._f.onBlur(e),t&&t(0)):b._f.onChange&&b._f.onChange(e);const R=g(l,A,O),V=!it(R)||F;if(!O&&m.state.next({name:l,type:e.type,values:Fe(i)}),T)return(c.isValid||u.isValid)&&("onBlur"===a.mode?O&&f():O||f()),V&&m.state.next({name:l,...F?{}:R});if(!O&&F&&m.state.next({...s}),a.resolver){const{errors:e}=await x([l]);if(k(A),y){const t=Rt(s.errors,r,l),a=Rt(e,r,t.name||l);o=a.error,l=a.name,C=it(e)}}else p([l],!0),o=(await Dt(b,d.disabled,i,h,a.shouldUseNativeValidation))[l],p([l]),k(A),y&&(o?C=!1:(c.isValid||u.isValid)&&(C=await _(r,!0)));y&&(b._f.deps&&S(b._f.deps),v(l,C,o,R))}var j},A=(e,t)=>{if(Pe(s.errors,t)&&e.focus)return e.focus(),1},S=async(e,t={})=>{let n,i;const o=rt(e);if(a.resolver){const t=await(async e=>{const{errors:t}=await x(e);if(e)for(const a of e){const e=Pe(t,a);e?Ie(s.errors,a,e):ht(s.errors,a)}else s.errors=t;return t})(Ve(e)?e:o);n=it(t),i=e?!o.some(e=>Pe(t,e)):n}else e?(i=(await Promise.all(o.map(async e=>{const t=Pe(r,e);return await _(t&&t._f?{[e]:t}:t)}))).every(Boolean),(i||s.isValid)&&f()):i=n=await _(r);return m.state.next({...!et(e)||(c.isValid||u.isValid)&&n!==s.isValid?{}:{name:e},...a.resolver||!e?{isValid:n}:{},errors:s.errors}),t.shouldFocus&&!i&&Ft(r,A,e?o:d.mount),i},O=e=>{const t={...o.mount?i:n};return Ve(e)?t:et(e)?Pe(t,e):e.map(e=>Pe(t,e))},T=(e,t)=>({invalid:!!Pe((t||s).errors,e),isDirty:!!Pe((t||s).dirtyFields,e),error:Pe((t||s).errors,e),isValidating:!!Pe(s.validatingFields,e),isTouched:!!Pe((t||s).touchedFields,e)}),F=(e,t,a)=>{const n=(Pe(r,e,{_f:{}})._f||{}).ref,i=Pe(s.errors,e)||{},{ref:o,message:d,type:l,...c}=i;Ie(s.errors,e,{...c,...t,ref:n}),m.state.next({name:e,errors:s.errors,isValid:!1}),a&&a.shouldFocus&&n&&n.focus&&n.focus()},R=e=>m.state.subscribe({next:t=>{var a,r,o;a=e.name,r=t.name,o=e.exact,a&&r&&a!==r&&!rt(a).some(e=>e&&(o?e===r:e.startsWith(r)||r.startsWith(e)))||!((e,t,a,s)=>{a(e);const{name:r,...n}=e;return it(n)||Object.keys(n).length>=Object.keys(t).length||Object.keys(n).find(e=>t[e]===(!s||Be))})(t,e.formState||c,M,e.reRenderRoot)||e.callback({values:{...i},...s,...t,defaultValues:n})}}).unsubscribe,V=(e,t={})=>{for(const o of e?rt(e):d.mount)d.mount.delete(o),d.array.delete(o),t.keepValue||(ht(r,o),ht(i,o)),!t.keepError&&ht(s.errors,o),!t.keepDirty&&ht(s.dirtyFields,o),!t.keepTouched&&ht(s.touchedFields,o),!t.keepIsValidating&&ht(s.validatingFields,o),!a.shouldUnregister&&!t.keepDefaultValue&&ht(n,o);m.state.next({values:Fe(i)}),m.state.next({...s,...t.keepDirty?{isDirty:b()}:{}}),!t.keepIsValid&&f()},E=({disabled:e,name:t})=>{(De(e)&&o.mount||e||d.disabled.has(t))&&(e?d.disabled.add(t):d.disabled.delete(t))},Z=(e,t={})=>{let s=Pe(r,e);const i=De(t.disabled)||De(a.disabled);return Ie(r,e,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:e}},name:e,mount:!0,...t}}),d.mount.add(e),s?E({disabled:De(t.disabled)?t.disabled:a.disabled,name:e}):y(e,!0,t.value),{...i?{disabled:t.disabled||a.disabled}:{},...a.progressive?{required:!!t.required,min:Ct(t.min),max:Ct(t.max),minLength:Ct(t.minLength),maxLength:Ct(t.maxLength),pattern:Ct(t.pattern)}:{},name:e,onChange:C,onBlur:C,ref:i=>{if(i){Z(e,t),s=Pe(r,e);const a=Ve(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,o=(e=>ut(e)||je(e))(a),d=s._f.refs||[];if(o?d.find(e=>e===a):a===s._f.ref)return;Ie(r,e,{_f:{...s._f,...o?{refs:[...d.filter(mt),a,...Array.isArray(Pe(n,e))?[{}]:[]],ref:{type:a.type,name:e}}:{ref:a}}}),y(e,!1,void 0,a)}else s=Pe(r,e,{}),s._f&&(s._f.mount=!1),(a.shouldUnregister||t.shouldUnregister)&&(!((e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)))(d.array,e)||!o.action)&&d.unMount.add(e)}}},P=()=>a.shouldFocusError&&Ft(r,A,d.mount),D=(e,t)=>async n=>{let o;n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let l=Fe(i);if(m.state.next({isSubmitting:!0}),a.resolver){const{errors:e,values:t}=await x();s.errors=e,l=Fe(t)}else await _(r);if(d.disabled.size)for(const e of d.disabled)ht(l,e);if(ht(s.errors,"root"),it(s.errors)){m.state.next({errors:{}});try{await e(l,n)}catch(c){o=c}}else t&&await t({...s.errors},n),P(),setTimeout(P);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:it(s.errors)&&!o,submitCount:s.submitCount+1,errors:s.errors}),o)throw o},I=(e,t={})=>{const l=e?Fe(e):n,u=Fe(l),h=it(e),f=h?n:u;if(t.keepDefaultValues||(n=l),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...d.mount,...Object.keys(gt(n,i))]);for(const t of Array.from(e))Pe(s.dirtyFields,t)?Ie(f,t,Pe(i,t)):j(t,Pe(f,t))}else{if(Te&&Ve(e))for(const e of d.mount){const t=Pe(r,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(lt(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of d.mount)j(e,Pe(f,e));else r={}}i=a.shouldUnregister?t.keepDefaultValues?Fe(n):{}:Fe(f),m.array.next({values:{...f}}),m.state.next({values:{...f}})}d={mount:t.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!c.isValid||!!t.keepIsValid||!!t.keepDirtyValues,o.watch=!!a.shouldUnregister,m.state.next({submitCount:t.keepSubmitCount?s.submitCount:0,isDirty:!h&&(t.keepDirty?s.isDirty:!(!t.keepDefaultValues||at(e,n))),isSubmitted:!!t.keepIsSubmitted&&s.isSubmitted,dirtyFields:h?{}:t.keepDirtyValues?t.keepDefaultValues&&i?gt(n,i):s.dirtyFields:t.keepDefaultValues&&e?gt(n,e):t.keepDirty?s.dirtyFields:{},touchedFields:t.keepTouched?s.touchedFields:{},errors:t.keepErrors?s.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&s.isSubmitSuccessful,isSubmitting:!1})},L=(e,t)=>I(dt(e)?e(i):e,t),M=e=>{s={...s,...e}},z={control:{register:Z,unregister:V,getFieldState:T,handleSubmit:D,setError:F,_subscribe:R,_runSchema:x,_focusError:P,_getWatch:k,_getDirty:b,_setValid:f,_setFieldArray:(e,t=[],d,l,h=!0,f=!0)=>{if(l&&d&&!a.disabled){if(o.action=!0,f&&Array.isArray(Pe(r,e))){const t=d(Pe(r,e),l.argA,l.argB);h&&Ie(r,e,t)}if(f&&Array.isArray(Pe(s.errors,e))){const t=d(Pe(s.errors,e),l.argA,l.argB);h&&Ie(s.errors,e,t),((e,t)=>{!Ee(Pe(e,t)).length&&ht(e,t)})(s.errors,e)}if((c.touchedFields||u.touchedFields)&&f&&Array.isArray(Pe(s.touchedFields,e))){const t=d(Pe(s.touchedFields,e),l.argA,l.argB);h&&Ie(s.touchedFields,e,t)}(c.dirtyFields||u.dirtyFields)&&(s.dirtyFields=gt(n,i)),m.state.next({name:e,isDirty:b(e,t),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else Ie(i,e,t)},_setDisabledField:E,_setErrors:e=>{s.errors=e,m.state.next({errors:s.errors,isValid:!1})},_getFieldArray:e=>Ee(Pe(o.mount?i:n,e,a.shouldUnregister?Pe(n,e,[]):[])),_reset:I,_resetDefaultValues:()=>dt(a.defaultValues)&&a.defaultValues().then(e=>{L(e,a.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of d.unMount){const t=Pe(r,e);t&&(t._f.refs?t._f.refs.every(e=>!mt(e)):!mt(t._f.ref))&&V(e)}d.unMount=new Set},_disableForm:e=>{De(e)&&(m.state.next({disabled:e}),Ft(r,(t,a)=>{const s=Pe(r,a);s&&(t.disabled=s._f.disabled||e,Array.isArray(s._f.refs)&&s._f.refs.forEach(t=>{t.disabled=s._f.disabled||e}))},0,!1))},_subjects:m,_proxyFormState:c,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(e){o=e},get _defaultValues(){return n},get _names(){return d},set _names(e){d=e},get _formState(){return s},get _options(){return a},set _options(e){a={...a,...e}}},subscribe:e=>(o.mount=!0,u={...u,...e.formState},R({...e,formState:u})),trigger:S,register:Z,handleSubmit:D,watch:(e,t)=>dt(e)?m.state.subscribe({next:a=>"values"in a&&e(k(void 0,t),a)}):k(e,t,!0),setValue:j,getValues:O,reset:L,resetField:(e,t={})=>{Pe(r,e)&&(Ve(t.defaultValue)?j(e,Fe(Pe(n,e))):(j(e,t.defaultValue),Ie(n,e,Fe(t.defaultValue))),t.keepTouched||ht(s.touchedFields,e),t.keepDirty||(ht(s.dirtyFields,e),s.isDirty=t.defaultValue?b(e,Fe(Pe(n,e))):b()),t.keepError||(ht(s.errors,e),c.isValid&&f()),m.state.next({...s}))},clearErrors:e=>{e&&rt(e).forEach(e=>ht(s.errors,e)),m.state.next({errors:e?s.errors:{}})},unregister:V,setError:F,setFocus:(e,t={})=>{const a=Pe(r,e),s=a&&a._f;if(s){const e=s.refs?s.refs[0]:s.ref;e.focus&&(e.focus(),t.shouldSelect&&dt(e.select)&&e.select())}},getFieldState:T};return{...z,formControl:z}}function Mt(e={}){const t=E.useRef(void 0),a=E.useRef(void 0),[s,r]=E.useState({isDirty:!1,isValidating:!1,isLoading:dt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:dt(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:s},e.defaultValues&&!dt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...r}=Lt(e);t.current={...r,formState:s}}const n=t.current.control;return n._options=e,Qe(()=>{const e=n._subscribe({formState:n._proxyFormState,callback:()=>r({...n._formState}),reRenderRoot:!0});return r(e=>({...e,isReady:!0})),n._formState.isReady=!0,e},[n]),E.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),E.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),E.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),E.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),E.useEffect(()=>{if(n._proxyFormState.isDirty){const e=n._getDirty();e!==s.isDirty&&n._subjects.state.next({isDirty:e})}},[n,s.isDirty]),E.useEffect(()=>{e.values&&!at(e.values,a.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),a.current=e.values,r(e=>({...e}))):n._resetDefaultValues()},[n,e.values]),E.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),t.current.formState=((e,t,a,s=!0)=>{const r={defaultValues:t._defaultValues};for(const n in e)Object.defineProperty(r,n,{get:()=>{const a=n;return t._proxyFormState[a]!==Be&&(t._proxyFormState[a]=!s||Be),e[a]}});return r})(s,n),t.current}const zt=(e,t,a)=>{if(e&&"reportValidity"in e){const s=Pe(a,t);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},$t=(e,t)=>{for(const a in t.fields){const s=t.fields[a];s&&s.ref&&"reportValidity"in s.ref?zt(s.ref,a,e):s.refs&&s.refs.forEach(t=>zt(t,a,e))}},qt=(e,t)=>{t.shouldUseNativeValidation&&$t(e,t);const a={};for(const s in e){const r=Pe(t.fields,s),n=Object.assign(e[s]||{},{ref:r&&r.ref});if(Ut(t.names||Object.keys(e),s)){const e=Object.assign({},Pe(a,s));Ie(e,"root",n),Ie(a,s,e)}else Ie(a,s,n)}return a},Ut=(e,t)=>e.some(e=>e.startsWith(t+"."));var Bt,Wt,Kt,Gt=function(e,t){for(var a={};e.length;){var s=e[0],r=s.code,n=s.message,i=s.path.join(".");if(!a[i])if("unionErrors"in s){var o=s.unionErrors[0].errors[0];a[i]={message:o.message,type:o.code}}else a[i]={message:n,type:r};if("unionErrors"in s&&s.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var d=a[i].types,l=d&&d[s.code];a[i]=st(i,t,a,r,l?[].concat(l,s.message):s.message)}e.shift()}return a},Ht=function(e,t,a){return void 0===a&&(a={}),function(s,r,n){try{return Promise.resolve(function(r,i){try{var o=Promise.resolve(e["sync"===a.mode?"parse":"parseAsync"](s,t)).then(function(e){return n.shouldUseNativeValidation&&$t({},n),{errors:{},values:a.raw?s:e}})}catch(d){return i(d)}return o&&o.then?o.then(void 0,i):o}(0,function(e){if(t=e,Array.isArray(null==t?void 0:t.errors))return{values:{},errors:qt(Gt(e.errors,!n.shouldUseNativeValidation&&"all"===n.criteriaMode),n)};var t;throw e}))}catch(i){return Promise.reject(i)}}};(Wt=Bt||(Bt={})).assertEqual=e=>{},Wt.assertIs=function(e){},Wt.assertNever=function(e){throw new Error},Wt.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},Wt.getValidEnumValues=e=>{const t=Wt.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),a={};for(const s of t)a[s]=e[s];return Wt.objectValues(a)},Wt.objectValues=e=>Wt.objectKeys(e).map(function(t){return e[t]}),Wt.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},Wt.find=(e,t)=>{for(const a of e)if(t(a))return a},Wt.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,Wt.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},Wt.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(Kt||(Kt={})).mergeShapes=(e,t)=>({...e,...t});const Jt=Bt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xt=e=>{switch(typeof e){case"undefined":return Jt.undefined;case"string":return Jt.string;case"number":return Number.isNaN(e)?Jt.nan:Jt.number;case"boolean":return Jt.boolean;case"function":return Jt.function;case"bigint":return Jt.bigint;case"symbol":return Jt.symbol;case"object":return Array.isArray(e)?Jt.array:null===e?Jt.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Jt.promise:"undefined"!=typeof Map&&e instanceof Map?Jt.map:"undefined"!=typeof Set&&e instanceof Set?Jt.set:"undefined"!=typeof Date&&e instanceof Date?Jt.date:Jt.object;default:return Jt.unknown}},Yt=Bt.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 Qt extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};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(e){return e.message},a={_errors:[]},s=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(s);else if("invalid_return_type"===r.code)s(r.returnTypeError);else if("invalid_arguments"===r.code)s(r.argumentsError);else if(0===r.path.length)a._errors.push(t(r));else{let e=a,s=0;for(;s<r.path.length;){const a=r.path[s];s===r.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(r))):e[a]=e[a]||{_errors:[]},e=e[a],s++}}};return s(this),a}static assert(e){if(!(e instanceof Qt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Bt.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},a=[];for(const s of this.issues)if(s.path.length>0){const a=s.path[0];t[a]=t[a]||[],t[a].push(e(s))}else a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}Qt.create=e=>new Qt(e);const ea=(e,t)=>{let a;switch(e.code){case Yt.invalid_type:a=e.received===Jt.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Yt.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,Bt.jsonStringifyReplacer)}`;break;case Yt.unrecognized_keys:a=`Unrecognized key(s) in object: ${Bt.joinValues(e.keys,", ")}`;break;case Yt.invalid_union:a="Invalid input";break;case Yt.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${Bt.joinValues(e.options)}`;break;case Yt.invalid_enum_value:a=`Invalid enum value. Expected ${Bt.joinValues(e.options)}, received '${e.received}'`;break;case Yt.invalid_arguments:a="Invalid function arguments";break;case Yt.invalid_return_type:a="Invalid function return type";break;case Yt.invalid_date:a="Invalid date";break;case Yt.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:Bt.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Yt.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Yt.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Yt.custom:a="Invalid input";break;case Yt.invalid_intersection_types:a="Intersection results could not be merged";break;case Yt.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case Yt.not_finite:a="Number must be finite";break;default:a=t.defaultError,Bt.assertNever(e)}return{message:a}};let ta=ea;function aa(e,t){const a=ta,s=(e=>{const{data:t,path:a,errorMaps:s,issueData:r}=e,n=[...a,...r.path||[]],i={...r,path:n};if(void 0!==r.message)return{...r,path:n,message:r.message};let o="";const d=s.filter(e=>!!e).slice().reverse();for(const l of d)o=l(i,{data:t,defaultError:o}).message;return{...r,path:n,message:o}})({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,a,a===ea?void 0:ea].filter(e=>!!e)});e.common.issues.push(s)}class sa{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const s of t){if("aborted"===s.status)return ra;"dirty"===s.status&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const s of t){const e=await s.key,t=await s.value;a.push({key:e,value:t})}return sa.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const s of t){const{key:t,value:r}=s;if("aborted"===t.status)return ra;if("aborted"===r.status)return ra;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!s.alwaysSet||(a[t.value]=r.value)}return{status:e.value,value:a}}}const ra=Object.freeze({status:"aborted"}),na=e=>({status:"dirty",value:e}),ia=e=>({status:"valid",value:e}),oa=e=>"aborted"===e.status,da=e=>"dirty"===e.status,la=e=>"valid"===e.status,ca=e=>"undefined"!=typeof Promise&&e instanceof Promise;var ua,ma;(ma=ua||(ua={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},ma.toString=e=>"string"==typeof e?e:e?.message;class ha{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}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 fa=(e,t)=>{if(la(t))return{success:!0,data:t.value};if(!e.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 Qt(e.common.issues);return this._error=t,this._error}}};function pa(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:s,description:r}=e;if(t&&(a||s))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(t,r)=>{const{message:n}=e;return"invalid_enum_value"===t.code?{message:n??r.defaultError}:void 0===r.data?{message:n??s??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:n??a??r.defaultError}},description:r}}class ya{get description(){return this._def.description}_getType(e){return Xt(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Xt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new sa,ctx:{common:e.parent.common,data:e.data,parsedType:Xt(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(ca(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 a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xt(e)},s=this._parseSync({data:e,path:a.path,parent:a});return fa(a,s)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xt(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return la(a)?{value:a.value}:{issues:t.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>la(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xt(e)},s=this._parse({data:e,path:a.path,parent:a}),r=await(ca(s)?s:Promise.resolve(s));return fa(a,r)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,s)=>{const r=e(t),n=()=>s.addIssue({code:Yt.custom,...a(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then(e=>!!e||(n(),!1)):!!r||(n(),!1)})}refinement(e,t){return this._refinement((a,s)=>!!e(a)||(s.addIssue("function"==typeof t?t(a,s):t),!1))}_refinement(e){return new ps({schema:this,typeName:Ns.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:e=>this["~validate"](e)}}optional(){return ys.create(this,this._def)}nullable(){return gs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Qa.create(this)}promise(){return fs.create(this,this._def)}or(e){return as.create([this,e],this._def)}and(e){return rs.create(this,e,this._def)}transform(e){return new ps({...pa(this._def),schema:this,typeName:Ns.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new vs({...pa(this._def),innerType:this,defaultValue:t,typeName:Ns.ZodDefault})}brand(){return new bs({typeName:Ns.ZodBranded,type:this,...pa(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new xs({...pa(this._def),innerType:this,catchValue:t,typeName:Ns.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ks.create(this,e)}readonly(){return ws.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ga=/^c[^\s-]{8,}$/i,va=/^[0-9a-z]+$/,xa=/^[0-9A-HJKMNP-TV-Z]{26}$/i,_a=/^[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,ka=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,wa=/^[-+]?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)?)??$/,Na=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let ja;const Ca=/^(?:(?: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])$/,Aa=/^(?:(?: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])$/,Sa=/^(([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]))$/,Oa=/^(([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])$/,Ta=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fa=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ra="((\\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])))",Va=new RegExp(`^${Ra}$`);function Ea(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function Za(e){return new RegExp(`^${Ea(e)}$`)}function Pa(e){let t=`${Ra}T${Ea(e)}`;const a=[];return a.push(e.local?"Z?":"Z"),e.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${a.join("|")})`,new RegExp(`^${t}$`)}function Da(e,t){return!("v4"!==t&&t||!Ca.test(e))||!("v6"!==t&&t||!Sa.test(e))}function Ia(e,t){if(!ka.test(e))return!1;try{const[a]=e.split(".");if(!a)return!1;const s=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),r=JSON.parse(atob(s));return"object"==typeof r&&null!==r&&((!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||r.alg===t)))}catch{return!1}}function La(e,t){return!("v4"!==t&&t||!Aa.test(e))||!("v6"!==t&&t||!Oa.test(e))}class Ma extends ya{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==Jt.string){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.string,received:t.parsedType}),ra}const t=new sa;let a;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),aa(a,{code:Yt.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(a=this._getOrReturnCtx(e,a),aa(a,{code:Yt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const r=e.data.length>s.value,n=e.data.length<s.value;(r||n)&&(a=this._getOrReturnCtx(e,a),r?aa(a,{code:Yt.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):n&&aa(a,{code:Yt.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)Na.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"email",code:Yt.invalid_string,message:s.message}),t.dirty());else if("emoji"===s.kind)ja||(ja=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ja.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"emoji",code:Yt.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)_a.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"uuid",code:Yt.invalid_string,message:s.message}),t.dirty());else if("nanoid"===s.kind)ba.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"nanoid",code:Yt.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)ga.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"cuid",code:Yt.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)va.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"cuid2",code:Yt.invalid_string,message:s.message}),t.dirty());else if("ulid"===s.kind)xa.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"ulid",code:Yt.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),aa(a,{validation:"url",code:Yt.invalid_string,message:s.message}),t.dirty()}else if("regex"===s.kind){s.regex.lastIndex=0;s.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"regex",code:Yt.invalid_string,message:s.message}),t.dirty())}else if("trim"===s.kind)e.data=e.data.trim();else if("includes"===s.kind)e.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(e,a),aa(a,{code:Yt.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty());else if("toLowerCase"===s.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===s.kind)e.data=e.data.toUpperCase();else if("startsWith"===s.kind)e.data.startsWith(s.value)||(a=this._getOrReturnCtx(e,a),aa(a,{code:Yt.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty());else if("endsWith"===s.kind)e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),aa(a,{code:Yt.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty());else if("datetime"===s.kind){Pa(s).test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{code:Yt.invalid_string,validation:"datetime",message:s.message}),t.dirty())}else if("date"===s.kind){Va.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{code:Yt.invalid_string,validation:"date",message:s.message}),t.dirty())}else if("time"===s.kind){Za(s).test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{code:Yt.invalid_string,validation:"time",message:s.message}),t.dirty())}else"duration"===s.kind?wa.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"duration",code:Yt.invalid_string,message:s.message}),t.dirty()):"ip"===s.kind?Da(e.data,s.version)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"ip",code:Yt.invalid_string,message:s.message}),t.dirty()):"jwt"===s.kind?Ia(e.data,s.alg)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"jwt",code:Yt.invalid_string,message:s.message}),t.dirty()):"cidr"===s.kind?La(e.data,s.version)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"cidr",code:Yt.invalid_string,message:s.message}),t.dirty()):"base64"===s.kind?Ta.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"base64",code:Yt.invalid_string,message:s.message}),t.dirty()):"base64url"===s.kind?Fa.test(e.data)||(a=this._getOrReturnCtx(e,a),aa(a,{validation:"base64url",code:Yt.invalid_string,message:s.message}),t.dirty()):Bt.assertNever(s);return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement(t=>e.test(t),{validation:t,code:Yt.invalid_string,...ua.errToObj(a)})}_addCheck(e){return new Ma({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ua.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ua.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ua.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ua.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ua.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ua.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ua.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ua.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ua.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ua.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ua.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ua.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ua.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...ua.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...ua.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ua.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...ua.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...ua.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...ua.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...ua.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...ua.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...ua.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...ua.errToObj(t)})}nonempty(e){return this.min(1,ua.errToObj(e))}trim(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function za(e,t){const a=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,r=a>s?a:s;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}Ma.create=e=>new Ma({checks:[],typeName:Ns.ZodString,coerce:e?.coerce??!1,...pa(e)});class $a extends ya{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==Jt.number){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.number,received:t.parsedType}),ra}let t;const a=new sa;for(const s of this._def.checks)if("int"===s.kind)Bt.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),aa(t,{code:Yt.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty());else if("min"===s.kind){(s.inclusive?e.data<s.value:e.data<=s.value)&&(t=this._getOrReturnCtx(e,t),aa(t,{code:Yt.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty())}else if("max"===s.kind){(s.inclusive?e.data>s.value:e.data>=s.value)&&(t=this._getOrReturnCtx(e,t),aa(t,{code:Yt.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty())}else"multipleOf"===s.kind?0!==za(e.data,s.value)&&(t=this._getOrReturnCtx(e,t),aa(t,{code:Yt.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):"finite"===s.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),aa(t,{code:Yt.not_finite,message:s.message}),a.dirty()):Bt.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,ua.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ua.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ua.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ua.toString(t))}setLimit(e,t,a,s){return new $a({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:ua.toString(s)}]})}_addCheck(e){return new $a({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ua.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ua.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ua.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ua.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ua.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ua.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:ua.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ua.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ua.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&Bt.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}$a.create=e=>new $a({checks:[],typeName:Ns.ZodNumber,coerce:e?.coerce||!1,...pa(e)});class qa extends ya{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)!==Jt.bigint)return this._getInvalidInput(e);let t;const a=new sa;for(const s of this._def.checks)if("min"===s.kind){(s.inclusive?e.data<s.value:e.data<=s.value)&&(t=this._getOrReturnCtx(e,t),aa(t,{code:Yt.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty())}else if("max"===s.kind){(s.inclusive?e.data>s.value:e.data>=s.value)&&(t=this._getOrReturnCtx(e,t),aa(t,{code:Yt.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty())}else"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),aa(t,{code:Yt.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):Bt.assertNever(s);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.bigint,received:t.parsedType}),ra}gte(e,t){return this.setLimit("min",e,!0,ua.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ua.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ua.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ua.toString(t))}setLimit(e,t,a,s){return new qa({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:ua.toString(s)}]})}_addCheck(e){return new qa({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ua.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ua.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ua.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ua.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ua.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}qa.create=e=>new qa({checks:[],typeName:Ns.ZodBigInt,coerce:e?.coerce??!1,...pa(e)});class Ua extends ya{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==Jt.boolean){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.boolean,received:t.parsedType}),ra}return ia(e.data)}}Ua.create=e=>new Ua({typeName:Ns.ZodBoolean,coerce:e?.coerce||!1,...pa(e)});class Ba extends ya{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==Jt.date){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.date,received:t.parsedType}),ra}if(Number.isNaN(e.data.getTime())){return aa(this._getOrReturnCtx(e),{code:Yt.invalid_date}),ra}const t=new sa;let a;for(const s of this._def.checks)"min"===s.kind?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),aa(a,{code:Yt.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),t.dirty()):"max"===s.kind?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),aa(a,{code:Yt.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),t.dirty()):Bt.assertNever(s);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ba({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ua.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ua.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Ba.create=e=>new Ba({checks:[],coerce:e?.coerce||!1,typeName:Ns.ZodDate,...pa(e)});class Wa extends ya{_parse(e){if(this._getType(e)!==Jt.symbol){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.symbol,received:t.parsedType}),ra}return ia(e.data)}}Wa.create=e=>new Wa({typeName:Ns.ZodSymbol,...pa(e)});class Ka extends ya{_parse(e){if(this._getType(e)!==Jt.undefined){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.undefined,received:t.parsedType}),ra}return ia(e.data)}}Ka.create=e=>new Ka({typeName:Ns.ZodUndefined,...pa(e)});class Ga extends ya{_parse(e){if(this._getType(e)!==Jt.null){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.null,received:t.parsedType}),ra}return ia(e.data)}}Ga.create=e=>new Ga({typeName:Ns.ZodNull,...pa(e)});class Ha extends ya{constructor(){super(...arguments),this._any=!0}_parse(e){return ia(e.data)}}Ha.create=e=>new Ha({typeName:Ns.ZodAny,...pa(e)});class Ja extends ya{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ia(e.data)}}Ja.create=e=>new Ja({typeName:Ns.ZodUnknown,...pa(e)});class Xa extends ya{_parse(e){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.never,received:t.parsedType}),ra}}Xa.create=e=>new Xa({typeName:Ns.ZodNever,...pa(e)});class Ya extends ya{_parse(e){if(this._getType(e)!==Jt.undefined){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.void,received:t.parsedType}),ra}return ia(e.data)}}Ya.create=e=>new Ya({typeName:Ns.ZodVoid,...pa(e)});class Qa extends ya{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),s=this._def;if(t.parsedType!==Jt.array)return aa(t,{code:Yt.invalid_type,expected:Jt.array,received:t.parsedType}),ra;if(null!==s.exactLength){const e=t.data.length>s.exactLength.value,r=t.data.length<s.exactLength.value;(e||r)&&(aa(t,{code:e?Yt.too_big:Yt.too_small,minimum:r?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(aa(t,{code:Yt.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(aa(t,{code:Yt.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((e,a)=>s.type._parseAsync(new ha(t,e,t.path,a)))).then(e=>sa.mergeArray(a,e));const r=[...t.data].map((e,a)=>s.type._parseSync(new ha(t,e,t.path,a)));return sa.mergeArray(a,r)}get element(){return this._def.type}min(e,t){return new Qa({...this._def,minLength:{value:e,message:ua.toString(t)}})}max(e,t){return new Qa({...this._def,maxLength:{value:e,message:ua.toString(t)}})}length(e,t){return new Qa({...this._def,exactLength:{value:e,message:ua.toString(t)}})}nonempty(e){return this.min(1,e)}}function es(e){if(e instanceof ts){const t={};for(const a in e.shape){const s=e.shape[a];t[a]=ys.create(es(s))}return new ts({...e._def,shape:()=>t})}return e instanceof Qa?new Qa({...e._def,type:es(e.element)}):e instanceof ys?ys.create(es(e.unwrap())):e instanceof gs?gs.create(es(e.unwrap())):e instanceof ns?ns.create(e.items.map(e=>es(e))):e}Qa.create=(e,t)=>new Qa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ns.ZodArray,...pa(t)});class ts extends ya{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=Bt.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==Jt.object){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.object,received:t.parsedType}),ra}const{status:t,ctx:a}=this._processInputParams(e),{shape:s,keys:r}=this._getCached(),n=[];if(!(this._def.catchall instanceof Xa&&"strip"===this._def.unknownKeys))for(const o in a.data)r.includes(o)||n.push(o);const i=[];for(const o of r){const e=s[o],t=a.data[o];i.push({key:{status:"valid",value:o},value:e._parse(new ha(a,t,a.path,o)),alwaysSet:o in a.data})}if(this._def.catchall instanceof Xa){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of n)i.push({key:{status:"valid",value:t},value:{status:"valid",value:a.data[t]}});else if("strict"===e)n.length>0&&(aa(a,{code:Yt.unrecognized_keys,keys:n}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of n){const s=a.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new ha(a,s,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of i){const a=await t.key,s=await t.value;e.push({key:a,value:s,alwaysSet:t.alwaysSet})}return e}).then(e=>sa.mergeObjectSync(t,e)):sa.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return ua.errToObj,new ts({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{const s=this._def.errorMap?.(t,a).message??a.defaultError;return"unrecognized_keys"===t.code?{message:ua.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new ts({...this._def,unknownKeys:"strip"})}passthrough(){return new ts({...this._def,unknownKeys:"passthrough"})}extend(e){return new ts({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ts({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ns.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ts({...this._def,catchall:e})}pick(e){const t={};for(const a of Bt.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new ts({...this._def,shape:()=>t})}omit(e){const t={};for(const a of Bt.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new ts({...this._def,shape:()=>t})}deepPartial(){return es(this)}partial(e){const t={};for(const a of Bt.objectKeys(this.shape)){const s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()}return new ts({...this._def,shape:()=>t})}required(e){const t={};for(const a of Bt.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof ys;)e=e._def.innerType;t[a]=e}return new ts({...this._def,shape:()=>t})}keyof(){return us(Bt.objectKeys(this.shape))}}ts.create=(e,t)=>new ts({shape:()=>e,unknownKeys:"strip",catchall:Xa.create(),typeName:Ns.ZodObject,...pa(t)}),ts.strictCreate=(e,t)=>new ts({shape:()=>e,unknownKeys:"strict",catchall:Xa.create(),typeName:Ns.ZodObject,...pa(t)}),ts.lazycreate=(e,t)=>new ts({shape:e,unknownKeys:"strip",catchall:Xa.create(),typeName:Ns.ZodObject,...pa(t)});class as extends ya{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map(async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const s of e)if("dirty"===s.result.status)return t.common.issues.push(...s.ctx.common.issues),s.result;const a=e.map(e=>new Qt(e.ctx.common.issues));return aa(t,{code:Yt.invalid_union,unionErrors:a}),ra});{let e;const s=[];for(const n of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=n._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&s.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=s.map(e=>new Qt(e));return aa(t,{code:Yt.invalid_union,unionErrors:r}),ra}}get options(){return this._def.options}}function ss(e,t){const a=Xt(e),s=Xt(t);if(e===t)return{valid:!0,data:e};if(a===Jt.object&&s===Jt.object){const a=Bt.objectKeys(t),s=Bt.objectKeys(e).filter(e=>-1!==a.indexOf(e)),r={...e,...t};for(const n of s){const a=ss(e[n],t[n]);if(!a.valid)return{valid:!1};r[n]=a.data}return{valid:!0,data:r}}if(a===Jt.array&&s===Jt.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const r=ss(e[s],t[s]);if(!r.valid)return{valid:!1};a.push(r.data)}return{valid:!0,data:a}}return a===Jt.date&&s===Jt.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}as.create=(e,t)=>new as({options:e,typeName:Ns.ZodUnion,...pa(t)});class rs extends ya{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=(e,s)=>{if(oa(e)||oa(s))return ra;const r=ss(e.value,s.value);return r.valid?((da(e)||da(s))&&t.dirty(),{status:t.value,value:r.data}):(aa(a,{code:Yt.invalid_intersection_types}),ra)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([e,t])=>s(e,t)):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}rs.create=(e,t,a)=>new rs({left:e,right:t,typeName:Ns.ZodIntersection,...pa(a)});class ns extends ya{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==Jt.array)return aa(a,{code:Yt.invalid_type,expected:Jt.array,received:a.parsedType}),ra;if(a.data.length<this._def.items.length)return aa(a,{code:Yt.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ra;!this._def.rest&&a.data.length>this._def.items.length&&(aa(a,{code:Yt.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...a.data].map((e,t)=>{const s=this._def.items[t]||this._def.rest;return s?s._parse(new ha(a,e,a.path,t)):null}).filter(e=>!!e);return a.common.async?Promise.all(s).then(e=>sa.mergeArray(t,e)):sa.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new ns({...this._def,rest:e})}}ns.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ns({items:e,typeName:Ns.ZodTuple,rest:null,...pa(t)})};class is extends ya{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==Jt.object)return aa(a,{code:Yt.invalid_type,expected:Jt.object,received:a.parsedType}),ra;const s=[],r=this._def.keyType,n=this._def.valueType;for(const i in a.data)s.push({key:r._parse(new ha(a,i,a.path,i)),value:n._parse(new ha(a,a.data[i],a.path,i)),alwaysSet:i in a.data});return a.common.async?sa.mergeObjectAsync(t,s):sa.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,a){return new is(t instanceof ya?{keyType:e,valueType:t,typeName:Ns.ZodRecord,...pa(a)}:{keyType:Ma.create(),valueType:e,typeName:Ns.ZodRecord,...pa(t)})}}class os extends ya{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==Jt.map)return aa(a,{code:Yt.invalid_type,expected:Jt.map,received:a.parsedType}),ra;const s=this._def.keyType,r=this._def.valueType,n=[...a.data.entries()].map(([e,t],n)=>({key:s._parse(new ha(a,e,a.path,[n,"key"])),value:r._parse(new ha(a,t,a.path,[n,"value"]))}));if(a.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const a of n){const s=await a.key,r=await a.value;if("aborted"===s.status||"aborted"===r.status)return ra;"dirty"!==s.status&&"dirty"!==r.status||t.dirty(),e.set(s.value,r.value)}return{status:t.value,value:e}})}{const e=new Map;for(const a of n){const s=a.key,r=a.value;if("aborted"===s.status||"aborted"===r.status)return ra;"dirty"!==s.status&&"dirty"!==r.status||t.dirty(),e.set(s.value,r.value)}return{status:t.value,value:e}}}}os.create=(e,t,a)=>new os({valueType:t,keyType:e,typeName:Ns.ZodMap,...pa(a)});class ds extends ya{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==Jt.set)return aa(a,{code:Yt.invalid_type,expected:Jt.set,received:a.parsedType}),ra;const s=this._def;null!==s.minSize&&a.data.size<s.minSize.value&&(aa(a,{code:Yt.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&a.data.size>s.maxSize.value&&(aa(a,{code:Yt.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const r=this._def.valueType;function n(e){const a=new Set;for(const s of e){if("aborted"===s.status)return ra;"dirty"===s.status&&t.dirty(),a.add(s.value)}return{status:t.value,value:a}}const i=[...a.data.values()].map((e,t)=>r._parse(new ha(a,e,a.path,t)));return a.common.async?Promise.all(i).then(e=>n(e)):n(i)}min(e,t){return new ds({...this._def,minSize:{value:e,message:ua.toString(t)}})}max(e,t){return new ds({...this._def,maxSize:{value:e,message:ua.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ds.create=(e,t)=>new ds({valueType:e,minSize:null,maxSize:null,typeName:Ns.ZodSet,...pa(t)});class ls extends ya{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})}}ls.create=(e,t)=>new ls({getter:e,typeName:Ns.ZodLazy,...pa(t)});class cs extends ya{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return aa(t,{received:t.data,code:Yt.invalid_literal,expected:this._def.value}),ra}return{status:"valid",value:e.data}}get value(){return this._def.value}}function us(e,t){return new ms({values:e,typeName:Ns.ZodEnum,...pa(t)})}cs.create=(e,t)=>new cs({value:e,typeName:Ns.ZodLiteral,...pa(t)});class ms extends ya{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return aa(t,{expected:Bt.joinValues(a),received:t.parsedType,code:Yt.invalid_type}),ra}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return aa(t,{received:t.data,code:Yt.invalid_enum_value,options:a}),ra}return ia(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 ms.create(e,{...this._def,...t})}exclude(e,t=this._def){return ms.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ms.create=us;class hs extends ya{_parse(e){const t=Bt.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==Jt.string&&a.parsedType!==Jt.number){const e=Bt.objectValues(t);return aa(a,{expected:Bt.joinValues(e),received:a.parsedType,code:Yt.invalid_type}),ra}if(this._cache||(this._cache=new Set(Bt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=Bt.objectValues(t);return aa(a,{received:a.data,code:Yt.invalid_enum_value,options:e}),ra}return ia(e.data)}get enum(){return this._def.values}}hs.create=(e,t)=>new hs({values:e,typeName:Ns.ZodNativeEnum,...pa(t)});class fs extends ya{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Jt.promise&&!1===t.common.async)return aa(t,{code:Yt.invalid_type,expected:Jt.promise,received:t.parsedType}),ra;const a=t.parsedType===Jt.promise?t.data:Promise.resolve(t.data);return ia(a.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}fs.create=(e,t)=>new fs({type:e,typeName:Ns.ZodPromise,...pa(t)});class ps extends ya{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ns.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=this._def.effect||null,r={addIssue:e=>{aa(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===s.type){const e=s.transform(a.data,r);if(a.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return ra;const s=await this._def.schema._parseAsync({data:e,path:a.path,parent:a});return"aborted"===s.status?ra:"dirty"===s.status||"dirty"===t.value?na(s.value):s});{if("aborted"===t.value)return ra;const s=this._def.schema._parseSync({data:e,path:a.path,parent:a});return"aborted"===s.status?ra:"dirty"===s.status||"dirty"===t.value?na(s.value):s}}if("refinement"===s.type){const e=e=>{const t=s.refinement(e,r);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===s.status?ra:("dirty"===s.status&&t.dirty(),e(s.value),{status:t.value,value:s.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(a=>"aborted"===a.status?ra:("dirty"===a.status&&t.dirty(),e(a.value).then(()=>({status:t.value,value:a.value}))))}if("transform"===s.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!la(e))return ra;const n=s.transform(e.value,r);if(n instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(e=>la(e)?Promise.resolve(s.transform(e.value,r)).then(e=>({status:t.value,value:e})):ra)}Bt.assertNever(s)}}ps.create=(e,t,a)=>new ps({schema:e,typeName:Ns.ZodEffects,effect:t,...pa(a)}),ps.createWithPreprocess=(e,t,a)=>new ps({schema:t,effect:{type:"preprocess",transform:e},typeName:Ns.ZodEffects,...pa(a)});class ys extends ya{_parse(e){return this._getType(e)===Jt.undefined?ia(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ys.create=(e,t)=>new ys({innerType:e,typeName:Ns.ZodOptional,...pa(t)});class gs extends ya{_parse(e){return this._getType(e)===Jt.null?ia(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}gs.create=(e,t)=>new gs({innerType:e,typeName:Ns.ZodNullable,...pa(t)});class vs extends ya{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===Jt.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}vs.create=(e,t)=>new vs({innerType:e,typeName:Ns.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...pa(t)});class xs extends ya{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return ca(s)?s.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Qt(a.common.issues)},input:a.data})})):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new Qt(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}xs.create=(e,t)=>new xs({innerType:e,typeName:Ns.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...pa(t)});class _s extends ya{_parse(e){if(this._getType(e)!==Jt.nan){const t=this._getOrReturnCtx(e);return aa(t,{code:Yt.invalid_type,expected:Jt.nan,received:t.parsedType}),ra}return{status:"valid",value:e.data}}}_s.create=e=>new _s({typeName:Ns.ZodNaN,...pa(e)});class bs extends ya{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class ks extends ya{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?ra:"dirty"===e.status?(t.dirty(),na(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?ra:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new ks({in:e,out:t,typeName:Ns.ZodPipeline})}}class ws extends ya{_parse(e){const t=this._def.innerType._parse(e),a=e=>(la(e)&&(e.value=Object.freeze(e.value)),e);return ca(t)?t.then(e=>a(e)):a(t)}unwrap(){return this._def.innerType}}var Ns,js;ws.create=(e,t)=>new ws({innerType:e,typeName:Ns.ZodReadonly,...pa(t)}),ts.lazycreate,(js=Ns||(Ns={})).ZodString="ZodString",js.ZodNumber="ZodNumber",js.ZodNaN="ZodNaN",js.ZodBigInt="ZodBigInt",js.ZodBoolean="ZodBoolean",js.ZodDate="ZodDate",js.ZodSymbol="ZodSymbol",js.ZodUndefined="ZodUndefined",js.ZodNull="ZodNull",js.ZodAny="ZodAny",js.ZodUnknown="ZodUnknown",js.ZodNever="ZodNever",js.ZodVoid="ZodVoid",js.ZodArray="ZodArray",js.ZodObject="ZodObject",js.ZodUnion="ZodUnion",js.ZodDiscriminatedUnion="ZodDiscriminatedUnion",js.ZodIntersection="ZodIntersection",js.ZodTuple="ZodTuple",js.ZodRecord="ZodRecord",js.ZodMap="ZodMap",js.ZodSet="ZodSet",js.ZodFunction="ZodFunction",js.ZodLazy="ZodLazy",js.ZodLiteral="ZodLiteral",js.ZodEnum="ZodEnum",js.ZodEffects="ZodEffects",js.ZodNativeEnum="ZodNativeEnum",js.ZodOptional="ZodOptional",js.ZodNullable="ZodNullable",js.ZodDefault="ZodDefault",js.ZodCatch="ZodCatch",js.ZodPromise="ZodPromise",js.ZodBranded="ZodBranded",js.ZodPipeline="ZodPipeline",js.ZodReadonly="ZodReadonly";const Cs=Ma.create,As=$a.create;_s.create,qa.create;const Ss=Ua.create;Ba.create,Wa.create,Ka.create,Ga.create,Ha.create,Ja.create,Xa.create,Ya.create;const Os=Qa.create,Ts=ts.create;ts.strictCreate;const Fs=as.create;rs.create,ns.create;const Rs=is.create;os.create,ds.create,ls.create;const Vs=cs.create,Es=ms.create;hs.create,fs.create,ps.create,ys.create,gs.create,ps.createWithPreprocess;const Zs=i,Ps=o,Ds=d,Is=V.forwardRef(({className:a,...s},r)=>e.jsx(t,{ref:r,className:$("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...s}));Is.displayName=t.displayName;const Ls=V.forwardRef(({className:t,children:r,...n},i)=>e.jsxs(Ds,{children:[e.jsx(Is,{}),e.jsxs(a,{ref:i,className:$("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...n,children:[r,e.jsxs(s,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[e.jsx(q,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ls.displayName=a.displayName;const Ms=({className:t,...a})=>e.jsx("div",{className:$("flex flex-col space-y-1.5 text-center sm:text-left",t),...a});Ms.displayName="DialogHeader";const zs=V.forwardRef(({className:t,...a},s)=>e.jsx(r,{ref:s,className:$("text-lg font-semibold leading-none tracking-tight",t),...a}));zs.displayName=r.displayName;const $s=V.forwardRef(({className:t,...a},s)=>e.jsx(n,{ref:s,className:$("text-sm text-muted-foreground",t),...a}));$s.displayName=n.displayName;const qs=V.forwardRef(({className:t,...a},s)=>e.jsx("textarea",{className:$("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:s,...a}));qs.displayName="Textarea";var Us="Radio",[Bs,Ws]=b(Us),[Ks,Gs]=Bs(Us),Hs=V.forwardRef((t,a)=>{const{__scopeRadio:s,name:r,checked:n=!1,required:i,disabled:o,value:d="on",onCheck:l,form:c,...u}=t,[m,h]=V.useState(null),f=k(a,e=>h(e)),p=V.useRef(!1),y=!m||(c||!!m.closest("form"));return e.jsxs(Ks,{scope:s,checked:n,disabled:o,children:[e.jsx(w.button,{type:"button",role:"radio","aria-checked":n,"data-state":Qs(n),"data-disabled":o?"":void 0,disabled:o,value:d,...u,ref:f,onClick:N(t.onClick,e=>{n||l?.(),y&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())})}),y&&e.jsx(Ys,{control:m,bubbles:!p.current,name:r,value:d,checked:n,required:i,disabled:o,form:c,style:{transform:"translateX(-100%)"}})]})});Hs.displayName=Us;var Js="RadioIndicator",Xs=V.forwardRef((t,a)=>{const{__scopeRadio:s,forceMount:r,...n}=t,i=Gs(Js,s);return e.jsx(j,{present:r||i.checked,children:e.jsx(w.span,{"data-state":Qs(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:a})})});Xs.displayName=Js;var Ys=V.forwardRef(({__scopeRadio:t,control:a,checked:s,bubbles:r=!0,...n},i)=>{const o=V.useRef(null),d=k(o,i),l=C(s),c=A(a);return V.useEffect(()=>{const e=o.current;if(!e)return;const t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==s&&a){const t=new Event("click",{bubbles:r});a.call(e,s),e.dispatchEvent(t)}},[l,s,r]),e.jsx(w.input,{type:"radio","aria-hidden":!0,defaultChecked:s,...n,tabIndex:-1,ref:d,style:{...n.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function Qs(e){return e?"checked":"unchecked"}Ys.displayName="RadioBubbleInput";var er=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tr="RadioGroup",[ar,sr]=b(tr,[S,Ws]),rr=S(),nr=Ws(),[ir,or]=ar(tr),dr=V.forwardRef((t,a)=>{const{__scopeRadioGroup:s,name:r,defaultValue:n,value:i,required:o=!1,disabled:d=!1,orientation:l,dir:c,loop:u=!0,onValueChange:m,...h}=t,f=rr(s),p=O(c),[y,g]=T({prop:i,defaultProp:n??null,onChange:m,caller:tr});return e.jsx(ir,{scope:s,name:r,required:o,disabled:d,value:y,onValueChange:g,children:e.jsx(F,{asChild:!0,...f,orientation:l,dir:p,loop:u,children:e.jsx(w.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":d?"":void 0,dir:p,...h,ref:a})})})});dr.displayName=tr;var lr="RadioGroupItem",cr=V.forwardRef((t,a)=>{const{__scopeRadioGroup:s,disabled:r,...n}=t,i=or(lr,s),o=i.disabled||r,d=rr(s),l=nr(s),c=V.useRef(null),u=k(a,c),m=i.value===n.value,h=V.useRef(!1);return V.useEffect(()=>{const e=e=>{er.includes(e.key)&&(h.current=!0)},t=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),e.jsx(R,{asChild:!0,...d,focusable:!o,active:m,children:e.jsx(Hs,{disabled:o,required:i.required,checked:m,...l,...n,name:i.name,ref:u,onCheck:()=>i.onValueChange(n.value),onKeyDown:N(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:N(n.onFocus,()=>{h.current&&c.current?.click()})})})});cr.displayName=lr;var ur=V.forwardRef((t,a)=>{const{__scopeRadioGroup:s,...r}=t,n=nr(s);return e.jsx(Xs,{...n,...r,ref:a})});ur.displayName="RadioGroupIndicator";var mr=dr,hr=cr,fr=ur;const pr=V.forwardRef(({className:t,...a},s)=>e.jsx(mr,{className:$("grid gap-2",t),...a,ref:s}));pr.displayName=mr.displayName;const yr=V.forwardRef(({className:t,...a},s)=>e.jsx(hr,{ref:s,className:$("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:e.jsx(fr,{className:"flex items-center justify-center",children:e.jsx(se,{className:"h-2.5 w-2.5 fill-current text-current"})})}));yr.displayName=hr.displayName;const gr="/assets/amex-logo-NMAdbQ7R.png",vr="/assets/bmc-logo-2jzedfbA.png",xr="/assets/ge-logo-vy1X7H0d.png",_r="/assets/novell-logo--1Ty88up.png",br=Ts({name:Cs().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").regex(/^[a-zA-Z\s\-'.]+$/,"Name contains invalid characters"),email:Cs().email("Please enter a valid business email").max(255,"Email must be less than 255 characters").refine(e=>{const t=e.split("@")[1]?.toLowerCase();return!["gmail.com","yahoo.com","hotmail.com","outlook.com","aol.com","icloud.com"].includes(t)},{message:"Please use your business email address"}),company:Cs().min(2,"Company name is required").max(200,"Company name must be less than 200 characters"),phone:Cs().max(50,"Phone number is too long").optional().or(Vs("")),message:Cs().max(1e3,"Message must be less than 1000 characters").optional().or(Vs("")),intent:Es(["demo","architect","inquiry"],{required_error:"Please select what you're looking for"})}),kr={demo:{label:"Request a Demo",description:"See our platform capabilities in action",icon:Q},architect:{label:"Talk to an Architect",description:"Discuss your technical requirements",icon:fe},inquiry:{label:"General Inquiry",description:"Ask a question or explore options",icon:ce}},wr=[{src:xr,alt:"GE logo",width:48},{src:gr,alt:"American Express logo",width:56},{src:vr,alt:"BMC Software logo",width:48},{src:_r,alt:"Novell logo",width:52}];function Nr({open:t,onOpenChange:a,defaultIntent:s="demo",context:r={}}){const{toast:n}=B(),[i,o]=V.useState(!1),[d,l]=V.useState(!1),{register:c,handleSubmit:u,reset:m,setValue:h,watch:f,formState:{errors:p}}=Mt({resolver:Ht(br),defaultValues:{intent:s}}),y=f("intent");V.useEffect(()=>{h("intent",s)},[s,h]),V.useEffect(()=>{t&&W("demo_modal_open",{intent:s,source_page:r.sourcePage||window.location.pathname,source_button:r.sourceButton||"unknown",service_context:r.serviceContext,product_context:r.productContext,industry_context:r.industryContext})},[t,s,r]);const g=()=>{a(!1),setTimeout(()=>{m({intent:s}),l(!1)},300)};return d?e.jsx(Zs,{open:t,onOpenChange:g,children:e.jsx(Ls,{className:"sm:max-w-md",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx("div",{className:"rounded-full bg-green-100 p-3 mb-4",children:e.jsx(ae,{className:"h-8 w-8 text-green-600"})}),e.jsx(zs,{className:"text-xl mb-2",children:"Request Received"}),e.jsx($s,{className:"text-base",children:"Thank you for your interest. A member of our team will reach out within 1 business day."})]})})}):e.jsx(Zs,{open:t,onOpenChange:g,children:e.jsxs(Ls,{className:"sm:max-w-xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(Ms,{children:[e.jsx(zs,{className:"text-xl",children:"Let's Start a Conversation"}),e.jsx($s,{children:"Tell us about your needs and we'll connect you with the right team."})]}),e.jsxs("form",{onSubmit:u(async e=>{o(!0);try{const t=K(),a={name:e.name.trim(),email:e.email.trim().toLowerCase(),company:e.company.trim(),phone:e.phone?.trim()||null,message:e.message?.trim()||null,intent:e.intent,intentLabel:kr[e.intent].label,sourcePage:r.sourcePage||window.location.pathname,sourceButton:r.sourceButton||"unknown",serviceContext:r.serviceContext||null,productContext:r.productContext||null,industryContext:r.industryContext||null,resourceContext:r.resourceContext||null,utmSource:t.utm_source||null,utmMedium:t.utm_medium||null,utmCampaign:t.utm_campaign||null,userAgent:navigator.userAgent,referrer:document.referrer||null},{error:s}=await L.functions.invoke("demo-request",{body:a});if(s)throw s;W("demo_form_submit",{intent:e.intent,intent_label:kr[e.intent].label,source_page:r.sourcePage||window.location.pathname,source_button:r.sourceButton||"unknown",service_context:r.serviceContext,product_context:r.productContext,industry_context:r.industryContext,has_phone:!!e.phone,has_message:!!e.message,status:"success"}),l(!0),n({title:"Request received",description:"We'll be in touch within 1 business day."}),setTimeout(()=>{g()},2500)}catch(t){W("demo_form_submit",{intent:e.intent,source_page:r.sourcePage||window.location.pathname,status:"error",error_message:t instanceof Error?t.message:"Unknown error"}),n({title:"Request failed",description:"Please try again or email sales@allerin.com directly.",variant:"destructive"})}finally{o(!1)}}),className:"space-y-5 mt-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs(D,{className:"text-sm font-medium",children:["What are you looking for? ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(pr,{value:y,onValueChange:e=>h("intent",e),className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:Object.keys(kr).map(t=>{const a=kr[t],s=a.icon,r=y===t;return e.jsxs("label",{className:`\n                      relative flex flex-col items-center p-4 rounded-lg border-2 cursor-pointer transition-all\n                      ${r?"border-primary bg-primary/5":"border-border hover:border-primary/50 hover:bg-muted/50"}\n                    `,children:[e.jsx(yr,{value:t,id:`intent-${t}`,className:"sr-only"}),e.jsx(s,{className:"h-6 w-6 mb-2 "+(r?"text-primary":"text-muted-foreground")}),e.jsx("span",{className:"text-sm font-medium text-center "+(r?"text-primary":""),children:a.label}),e.jsx("span",{className:"text-xs text-muted-foreground text-center mt-1 hidden sm:block",children:a.description})]},t)})}),p.intent&&e.jsx("p",{className:"text-sm text-destructive",children:p.intent.message})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(D,{htmlFor:"demo-name",children:["Full Name ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(I,{id:"demo-name",placeholder:"Jane Smith",autoComplete:"name",...c("name"),className:p.name?"border-destructive":""}),p.name&&e.jsx("p",{className:"text-sm text-destructive",children:p.name.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(D,{htmlFor:"demo-email",children:["Business Email ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(I,{id:"demo-email",type:"email",placeholder:"jane@company.com",autoComplete:"email",...c("email"),className:p.email?"border-destructive":""}),p.email&&e.jsx("p",{className:"text-sm text-destructive",children:p.email.message})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(D,{htmlFor:"demo-company",children:["Company ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(I,{id:"demo-company",placeholder:"Acme Corporation",autoComplete:"organization",...c("company"),className:p.company?"border-destructive":""}),p.company&&e.jsx("p",{className:"text-sm text-destructive",children:p.company.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"demo-phone",children:"Phone (Optional)"}),e.jsx(I,{id:"demo-phone",type:"tel",placeholder:"+1 (555) 123-4567",autoComplete:"tel",...c("phone")})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(D,{htmlFor:"demo-message",children:"Tell us about your project (Optional)"}),e.jsx(qs,{id:"demo-message",placeholder:"What challenges are you looking to solve? Any specific timeline or requirements?",rows:3,...c("message"),className:"resize-none"})]}),e.jsxs("div",{className:"pt-2 border-t border-border",children:[e.jsx("p",{className:"text-xs text-muted-foreground text-center mb-3",children:"Trusted by engineering leaders at Fortune 500 companies"}),e.jsx("div",{className:"flex items-center justify-center gap-6 opacity-60",children:wr.map(t=>e.jsx("img",{src:t.src,alt:t.alt,width:t.width,height:24,className:"h-6 w-auto object-contain grayscale",loading:"lazy",style:{aspectRatio:`${t.width}/24`}},t.alt))})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx(P,{type:"button",variant:"outline",onClick:g,children:"Cancel"}),e.jsx(P,{type:"submit",disabled:i,children:i?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"mr-2 h-4 w-4 animate-spin"}),"Submitting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"mr-2 h-4 w-4"}),"Submit Request"]})})]}),e.jsxs("p",{className:"text-xs text-muted-foreground text-center",children:["By submitting, you agree to our"," ",e.jsx("a",{href:"/privacy-policy",className:"underline hover:no-underline",children:"Privacy Policy"}),". We'll never share your information."]})]})]})})}const jr=[{name:"Products & Solutions",href:"/products",hasDropdown:!0,items:[{name:"Products",href:"/products"},{name:"Solutions",href:"/solutions"}]},{name:"Services",href:"/services",hasDropdown:!0,items:[{name:"Services",href:"/services"},{name:"GCC-as-a-Service",href:"/gcc-as-a-service"}]},{name:"Industries",href:"/industries"},{name:"Resources",href:"/resources"},{name:"Blog",href:"https://www.allerin.com/blog",isExternal:!0},{name:"Company",href:"#company",hasDropdown:!0,items:[{name:"About",href:"/company"},{name:"Methodology",href:"/about/methodology"},{name:"Trust Center",href:"/trust"}]},{name:"ROI Calculator",href:"/roi-calculator",isPill:!0}],Cr=()=>{const[t,a]=V.useState(!1),[s,r]=V.useState(!1),n=e=>{G(e)},i=()=>{H({source:"header"}),r(!0)};return e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"#main",className:"sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 focus:z-50 focus:px-4 focus:py-2 focus:bg-primary focus:text-primary-foreground focus:rounded-md focus:outline-none focus:ring-2 focus:ring-ring",children:"Skip to content"}),e.jsx("header",{className:"sticky top-0 z-50 backdrop-blur-md border-b border-outline/20",style:{background:"var(--gradient-surface)",boxShadow:"var(--shadow-soft)"},children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"flex items-center justify-between h-16",children:[e.jsx("div",{className:"flex items-center",children:e.jsx(Z,{to:"/",onClick:()=>n("logo"),children:e.jsx("img",{src:M,alt:"Allerin, go to homepage",className:"h-8 w-auto",width:120,height:32,fetchPriority:"high"})})}),e.jsx("nav",{className:"hidden lg:flex items-center space-x-6",children:jr.map(t=>t.isPill?e.jsxs(be,{children:[e.jsxs(ke,{className:"px-4 py-2 rounded-full border border-data-teal/30 text-sm font-medium text-foreground hover:border-data-teal/50 hover:bg-data-teal/5 transition-all inline-flex items-center gap-1 focus:outline-none focus:ring-2 focus:ring-ring",children:[t.name,e.jsx(ee,{className:"h-3 w-3"})]}),e.jsxs(we,{align:"end",children:[e.jsx(Ne,{asChild:!0,children:e.jsx(Z,{to:"/roi-calculator",className:"cursor-pointer",onClick:()=>n("roi_quick"),children:"Quick Estimate"})}),e.jsx(Ne,{asChild:!0,children:e.jsx(Z,{to:"/outcomes",className:"cursor-pointer",onClick:()=>n("roi_discovery"),children:"Outcome Discovery Engine"})})]})]},t.name):t.hasDropdown&&t.items?e.jsxs(be,{children:[e.jsxs(ke,{className:"text-foreground hover:text-data-teal transition-colors font-medium data-accent focus:outline-none focus:ring-2 focus:ring-ring rounded px-2 py-2 min-h-[44px] inline-flex items-center gap-1",children:[t.name,e.jsx(ee,{className:"h-3 w-3"})]}),e.jsx(we,{align:"start",children:t.items.map(t=>e.jsx(Ne,{asChild:!0,children:e.jsx(Z,{to:t.href,className:"cursor-pointer",onClick:()=>n(t.name.toLowerCase()),children:t.name})},t.name))})]},t.name):"isExternal"in t&&t.isExternal?e.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",onClick:()=>n(t.name.toLowerCase()),className:"text-foreground hover:text-data-teal transition-colors font-medium data-accent focus:outline-none focus:ring-2 focus:ring-ring rounded px-2 py-2 min-h-[44px] inline-flex items-center",children:t.name},t.name):t.href.startsWith("#")?e.jsx("a",{href:t.href,onClick:()=>n(t.name.toLowerCase().replace(" & ","_").replace(" ","_")),className:"text-foreground hover:text-data-teal transition-colors font-medium data-accent focus:outline-none focus:ring-2 focus:ring-ring rounded px-2 py-2 min-h-[44px] inline-flex items-center",children:t.name},t.name):e.jsx(Z,{to:t.href,onClick:()=>n(t.name.toLowerCase().replace(" & ","_").replace(" ","_")),className:"text-foreground hover:text-data-teal transition-colors font-medium data-accent focus:outline-none focus:ring-2 focus:ring-ring rounded px-2 py-2 min-h-[44px] inline-flex items-center",children:t.name},t.name))}),e.jsxs("div",{className:"hidden lg:flex items-center gap-3",children:[e.jsx(P,{variant:"outline",className:"clean-card border-data-teal/30 hover:border-data-teal/50 hover:bg-data-teal/5 focus:outline-none focus:ring-2 focus:ring-ring min-h-[44px] min-w-[44px]",asChild:!0,children:e.jsx(Z,{to:"/contact",children:"Contact"})}),e.jsx(P,{onClick:i,"aria-label":"Request a demo",className:"data-accent bg-gradient-to-r from-data-orange to-data-teal hover:from-data-teal hover:to-data-blue focus:outline-none focus:ring-2 focus:ring-ring min-h-[44px] min-w-[44px]",children:"Request Demo"})]}),e.jsxs(pe,{open:t,onOpenChange:a,children:[e.jsx(ye,{asChild:!0,className:"lg:hidden",children:e.jsx(P,{variant:"ghost",size:"sm",className:"focus:outline-none focus:ring-2 focus:ring-ring",children:t?e.jsx(q,{className:"h-6 w-6"}):e.jsx(le,{className:"h-6 w-6"})})}),e.jsxs(_e,{side:"right",className:"w-[300px] sm:w-[400px] flex flex-col",children:[e.jsxs("nav",{className:"flex-1 space-y-4 pt-6",children:[jr.map(t=>t.hasDropdown&&t.items?e.jsxs("div",{children:[e.jsx("div",{className:"block text-foreground font-semibold py-2 px-4",children:t.name}),t.items.map(t=>e.jsx(Z,{to:t.href,className:"block text-muted-foreground hover:text-data-teal transition-colors py-2 px-6 rounded hover:bg-surface/50",onClick:()=>{n(t.name.toLowerCase()),a(!1)},children:t.name},t.name))]},t.name):t.href.startsWith("#")?e.jsx("a",{href:t.href,className:"block text-foreground hover:text-data-teal transition-colors font-medium py-2 px-4 rounded hover:bg-surface/50",onClick:()=>{n(t.name.toLowerCase().replace(" & ","_").replace(" ","_")),a(!1)},children:t.name},t.name):e.jsx(Z,{to:t.href,className:"block text-foreground hover:text-data-teal transition-colors font-medium py-2 px-4 rounded hover:bg-surface/50",onClick:()=>{n(t.name.toLowerCase().replace(" & ","_").replace(" ","_")),a(!1)},children:t.name},t.name)),e.jsx("div",{className:"pt-4 px-4",children:e.jsx(P,{variant:"outline",className:"w-full mb-3 clean-card border-data-teal/30",asChild:!0,children:e.jsx(Z,{to:"/contact",onClick:()=>a(!1),children:"Contact"})})})]}),e.jsx("div",{className:"border-t border-outline/20 pt-4",children:e.jsx(P,{onClick:()=>{i(),a(!1)},className:"w-full data-accent bg-gradient-to-r from-data-orange to-data-teal h-12 text-base font-semibold",children:"Request Demo"})})]})]})]})})}),e.jsx(Nr,{open:s,onOpenChange:r,defaultIntent:"demo",context:{sourcePage:window.location.pathname,sourceButton:"header_request_demo"}})]})};var Ar="horizontal",Sr=["horizontal","vertical"],Or=V.forwardRef((t,a)=>{const{decorative:s,orientation:r=Ar,...n}=t,i=function(e){return Sr.includes(e)}(r)?r:Ar,o=s?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return e.jsx(w.div,{"data-orientation":i,...o,...n,ref:a})});Or.displayName="Separator";var Tr=Or;const Fr=V.forwardRef(({className:t,orientation:a="horizontal",decorative:s=!0,...r},n)=>e.jsx(Tr,{ref:n,decorative:s,orientation:a,className:$("shrink-0 bg-border","horizontal"===a?"h-[1px] w-full":"h-full w-[1px]",t),...r}));Fr.displayName=Tr.displayName;const Rr=[{title:"Products & Solutions",links:[{label:"VISTA",href:"/solutions/vista"},{label:"SENTRA",href:"/solutions/sentra"},{label:"iPAM",href:"/solutions/ipam"},{label:"NeuroSight",href:"/solutions/neurosight"},{label:"SkyAide",href:"/products/skyaide"}]},{title:"Services",links:[{label:"Agentic AI",href:"/services/agentic-ai"},{label:"GenAI Accelerator",href:"/services/genai-accelerator"},{label:"CV FastTrack",href:"/services/cv-fasttrack"},{label:"Platform Modernization",href:"/services/platform-modernization"},{label:"MLOps",href:"/services/mlops"},{label:"Security & Compliance",href:"/services/security-compliance"}]},{title:"Industries",links:[{label:"Manufacturing",href:"/industries/manufacturing"},{label:"Warehousing & Logistics",href:"/industries/warehousing-logistics"},{label:"Retail",href:"/industries/retail"},{label:"Insurance & Government",href:"/industries/insurance-government"},{label:"View all",href:"/industries"}]},{title:"Resources",links:[{label:"ROI Calculator",href:"/roi-calculator"},{label:"How we measure",href:"/how-we-measure"},{label:"Customers",href:"/customers"},{label:"Resources",href:"/resources"},{label:"Blog",href:"https://blog.allerin.com"}]},{title:"Company",links:[{label:"About",href:"/about"},{label:"Careers",href:"/careers"},{label:"Trust Center",href:"/trust"},{label:"Component Library",href:"/component-library"},{label:"Contact",href:"mailto:analytics@allerin.com"}]}],Vr=[{icon:e.jsx(ue,{className:"h-4 w-4"}),label:"+1-512-200-2416",href:"tel:+15122002416"},{icon:e.jsx(oe,{className:"h-4 w-4"}),label:"analytics@allerin.com",href:"mailto:analytics@allerin.com"},{icon:e.jsx(de,{className:"h-4 w-4"}),label:"2921 Prado Street, Unit A, Austin, TX 78702",href:"https://maps.google.com/?q=2921+Prado+Street+Unit+A+Austin+TX+78702"}],Er=[{icon:e.jsx(he,{className:"h-5 w-5","aria-hidden":"true"}),href:"https://x.com/allerint",label:"Allerin on Twitter",external:!0},{icon:e.jsx(ne,{className:"h-5 w-5","aria-hidden":"true"}),href:"https://www.linkedin.com/company/allerin/",label:"Allerin on LinkedIn",external:!0},{icon:e.jsx(re,{className:"h-5 w-5","aria-hidden":"true"}),href:"https://github.com/allerin",label:"Allerin on GitHub",external:!0}],Zr=()=>{const[t,a]=V.useState(""),[s,r]=V.useState(!1);return e.jsx("footer",{className:"relative mt-section-y",children:e.jsxs("div",{className:"bg-background",children:[e.jsx("div",{className:"container py-4xl",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-7 gap-3xl",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("div",{className:"flex items-center mb-4",children:e.jsx("img",{src:M,alt:"Allerin",className:"h-10 w-auto",width:160,height:40,loading:"lazy",decoding:"async"})}),e.jsx("p",{className:"text-muted-foreground mb-xl leading-relaxed",children:"Allerin builds production-grade AI: agentic systems, computer vision, and analytics, shipped with KPI gates, reversible rollouts, and measurable outcomes."}),e.jsx("div",{className:"space-y-sm mb-xl",children:Vr.map((t,a)=>e.jsxs("a",{href:t.href,className:"flex items-center text-muted-foreground hover:text-data-teal transition-colors group",children:[e.jsx("span",{className:"mr-sm text-data-orange group-hover:text-data-teal transition-colors",children:t.icon}),t.label]},a))}),e.jsx("div",{className:"flex gap-sm",children:Er.map((t,a)=>e.jsx(P,{variant:"ghost",size:"sm",className:"data-accent clean-card hover:bg-data-teal/10 hover:text-data-teal transition-all",asChild:!0,children:e.jsx("a",{href:t.href,"aria-label":t.label,rel:"me noopener",target:"_blank",onClick:()=>{t.label},children:t.icon})},a))})]}),Rr.map(t=>e.jsxs("div",{children:[e.jsx("span",{className:"font-semibold text-foreground mb-lg data-accent block",children:t.title}),e.jsx("ul",{className:"space-y-sm",children:t.links.map(a=>{const s=a.href.startsWith("http")||a.href.startsWith("mailto:");return e.jsx("li",{children:s?e.jsx("a",{href:a.href,onClick:()=>(t.title,void a.label),className:"text-muted-foreground hover:text-data-teal transition-colors text-sm",target:a.href.startsWith("http")?"_blank":void 0,rel:a.href.startsWith("http")?"noopener noreferrer":void 0,children:a.label}):e.jsx(Z,{to:a.href,onClick:()=>(t.title,void a.label),className:"text-muted-foreground hover:text-data-teal transition-colors text-sm",children:a.label})},a.label)})})]},t.title))]})}),e.jsx(Fr,{className:"opacity-20"}),e.jsxs("div",{className:"container py-2xl",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2xl mb-xl",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-semibold text-foreground mb-sm block",children:"Stay Updated"}),e.jsxs("form",{onSubmit:async e=>{if(e.preventDefault(),t){r(!0);try{const{data:e,error:s}=await L.functions.invoke("newsletter-subscribe",{body:{email:t,source:"footer"}});if(s)throw s;X.success(e.message||"Thanks for subscribing!"),a("")}catch(s){X.error("Failed to subscribe. Please try again.")}finally{r(!1)}}else X.error("Please enter your email")},className:"flex gap-xs mb-xs",children:[e.jsx(I,{type:"email",placeholder:"Enter your email",value:t,onChange:e=>a(e.target.value),required:!0,disabled:s,className:"clean-card border-data-teal/30 focus:border-data-teal bg-background"}),e.jsx(P,{type:"submit",disabled:s,className:"bg-gradient-to-r from-data-orange to-data-teal whitespace-nowrap",children:s?"...":"Subscribe"})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["By subscribing, you agree to our"," ",e.jsx(Z,{to:"/privacy-policy",className:"underline hover:text-data-teal",onClick:()=>{},children:"Privacy Policy"}),". We respect your privacy and use double opt-in."]})]}),e.jsx("div",{className:"flex flex-col justify-end",children:e.jsxs("div",{className:"flex flex-wrap gap-lg text-sm text-muted-foreground justify-start md:justify-end",children:[e.jsx(Z,{to:"/privacy-policy",onClick:()=>{},className:"hover:text-data-teal transition-colors",children:"Privacy Policy"}),e.jsx(Z,{to:"/terms-of-service",onClick:()=>{},className:"hover:text-data-teal transition-colors",children:"Terms of Service"}),e.jsx(Z,{to:"/cookies-policy",onClick:()=>{},className:"hover:text-data-teal transition-colors",children:"Cookies Policy"}),e.jsx("button",{onClick:()=>{J()},className:"hover:text-data-teal transition-colors text-left",children:"Cookie Preferences"}),e.jsx(Z,{to:"/disclaimer",onClick:()=>{},className:"hover:text-data-teal transition-colors",children:"Disclaimer"}),e.jsx(Z,{to:"/dei",onClick:()=>{},className:"hover:text-data-teal transition-colors",children:"DEI Policy"})]})})]}),e.jsx(Fr,{className:"opacity-20 mb-xl"}),e.jsx("div",{className:"text-center text-sm text-muted-foreground",children:e.jsxs("p",{children:["© ",(new Date).getFullYear()," Allerin. All rights reserved."]})})]})]})})};export{Rs as A,Fs as B,te as C,Nr as D,Os as E,Zr as F,re as G,Cr as H,ne as L,oe as M,ue as P,pr as R,me as S,he as T,fe as U,se as a,ae as b,ie as c,de as d,le as e,ce as f,Ss as g,Zs as h,Ls as i,Ms as j,zs as k,$s as l,Ps as m,gr as n,Ts as o,vr as p,xr as q,_r as r,Cs as s,Ht as t,Mt as u,qs as v,Fr as w,yr as x,As as y,Es as z};