PageSourceSearch

https://zaher.ai/assets/AgenciesV2-wdAycPub.js

js zaher.ai collected 2026-10-05 13:22:00 UTC 60,930 bytes, 2 lines download raw bytes

1import{u as _e,b as ct,Z as dt,n as ut,j as n,c as Ae,bi as Ve,bj as U,bk as Ms,L as ft,bl as mt,bm as ht,bn as gt,bo as yt,f as pt,a as xt,M as vt}from"./index-BgyAUjrd.js";import{R as k,r as de,a as bt}from"./react-vendor-DMqmElJU.js";import{z as ne}from"./index-mSkvzYyn.js";var Te=e=>e.type==="checkbox",We=e=>e.type==="file",be=e=>e instanceof Date,ee=e=>e==null;const ns=e=>typeof e=="object";var $=e=>!ee(e)&&!Array.isArray(e)&&ns(e)&&!be(e),Je=e=>$(e)&&e.target?Te(e.target)?e.target.checked:We(e.target)?e.target.files:e.target.value:e,Os=(e,t)=>t.split(".").some((s,a,l)=>!isNaN(Number(s))&&e.has(l.slice(0,a).join("."))),Ts=e=>{const t=e.constructor&&e.constructor.prototype;return $(t)&&t.hasOwnProperty("isPrototypeOf")},qe=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function L(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(qe&&(e instanceof Blob||t))return e;const s=Array.isArray(e);if(!s&&!($(e)&&Ts(e)))return e;const a=s?[]:Object.create(Object.getPrototypeOf(e));for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(a[l]=L(e[l]));return a}const ke={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},ge={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},he={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ls="root",is=["__proto__","constructor","prototype"],_t=/^\w*$/;var Fe=e=>_t.test(e),T=e=>e===void 0;const kt=/[.[\]'"]/;var Oe=e=>e.split(kt).filter(Boolean),h=(e,t,s)=>{if(!t||!$(e))return s;const a=Fe(t)?[t]:Oe(t);if(a.some(d=>is.includes(d)))return s;const l=a.reduce((d,i)=>ee(d)?void 0:d[i],e);return T(l)||l===e?T(e[t])?s:e[t]:l},ce=e=>typeof e=="boolean",ie=e=>typeof e=="function",D=(e,t,s)=>{let a=-1;const l=Fe(t)?[t]:Oe(t),d=l.length,i=d-1;for(;++a<d;){const m=l[a];let b=s;if(a!==i){const x=e[m];b=$(x)||Array.isArray(x)?x:isNaN(+l[a+1])?{}:[]}if(is.includes(m))return;e[m]=b,e=e[m]}};const Ps=k.createContext(null);Ps.displayName="HookFormControlContext";const as=()=>k.useContext(Ps);var Is=(e,t,s,a=!0)=>{const l={};for(const d in e)Object.defineProperty(l,d,{get:()=>{const i=d;return t._proxyFormState[i]!==ge.all&&(t._proxyFormState[i]=!a||ge.all),s&&(s[i]=!0),e[i]}});return l};const ls=qe?k.useLayoutEffect:k.useEffect;var es=e=>ee(e)||!ns(e);const _s=(e,t)=>t.length===0&&!Array.isArray(e)&&!Ts(e);function ae(e,t,s=new WeakMap){if(e===t)return!0;if(es(e)||es(t))return Object.is(e,t);if(be(e)&&be(t))return Object.is(e.getTime(),t.getTime());const a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;if(_s(e,a)||_s(t,l))return Object.is(e,t);if(!a.length&&Array.isArray(e)!==Array.isArray(t))return!1;const d=s.get(e);if(d&&d.has(t))return!0;if(d)d.add(t);else{const i=new WeakSet;i.add(t),s.set(e,i)}for(const i of a){const m=e[i];if(!(i in t))return!1;if(i!=="ref"){const b=t[i];if(be(m)&&be(b)||($(m)||Array.isArray(m))&&($(b)||Array.isArray(b))?!ae(m,b,s):!Object.is(m,b))return!1}}return!0}function os(){const e=k.useRef(!1),t=k.useRef(void 0),s=k.useCallback((l,d,i)=>{if(l&&e.current){const m=d();ae(t.current,m)||i(m)}e.current=!0},[]),a=k.useCallback((l,d)=>{l&&(t.current=L(d()))},[]);return{resyncIfNeeded:s,snapshot:a}}function jt(e){const t=as(),{control:s=t,disabled:a,name:l,exact:d}=e||{},[i,m]=k.useState(()=>({...s._formState,defaultValues:s._defaultValues})),b=k.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:x,snapshot:V}=os();return ls(()=>{const C=()=>({...s._formState,defaultValues:s._defaultValues});x(!a,C,m);const M=s._subscribe({name:l,formState:b.current,exact:d,callback:Q=>{!a&&m({...s._formState,...Q,defaultValues:s._defaultValues})}});return()=>{M(),V(!a,C)}},[l,a,d,x,V]),k.useEffect(()=>{b.current.isValid&&s._setValid(!0)},[s]),k.useMemo(()=>Is(i,s,b.current,!1),[i,s])}var te=e=>typeof e=="string",ss=(e,t,s,a,l)=>te(e)?(a&&t.watch.add(e),h(s,e,l)):Array.isArray(e)?e.map(d=>(a&&t.watch.add(d),h(s,d))):(a&&(t.watchAll=!0),s);function Vt(e){const t=as(),{control:s=t,name:a,defaultValue:l,disabled:d,exact:i,compute:m}=e||{},b=k.useRef(l),x=k.useRef(m),V=k.useRef(void 0),C=k.useRef(s),M=k.useRef(a);x.current=m;const[Q,w]=k.useState(()=>{const B=s._getWatch(a,b.current);
1return x.current?x.current(B):B}),z=k.useCallback(B=>{const q=ss(a,s._names,B||s._formValues,!1,b.current);return x.current?x.current(q):q},[s._formValues,s._names,a]),j=k.useCallback(B=>{if(!d){const q=ss(a,s._names,B||s._formValues,!1,b.current);if(x.current){const oe=x.current(q);ae(oe,V.current)||(w(oe),V.current=oe)}else w(q)}},[s._formValues,s._names,d,a]),{resyncIfNeeded:le,snapshot:S}=os(),X=k.useRef(j);X.current=j;const E=k.useRef(z);E.current=z,ls(()=>{C.current!==s||!ae(M.current,a)?(C.current=s,M.current=a,X.current()):le(!d,()=>E.current(),q=>{w(q),V.current=q});const B=s._subscribe({name:a,formState:{values:!0},exact:i,callback:q=>{X.current(q.values)}});return()=>{B(),S(!d,()=>E.current())}},[s,i,a,d,le,S]),k.useEffect(()=>s._removeUnmounted());const _=C.current!==s,W=M.current,ue=k.useMemo(()=>{if(d)return null;const B=!_&&!ae(W,a);return _||B?z():null},[d,_,a,W,z]);return ue!==null?ue:Q}function Nt(e){const t=as(),{name:s,disabled:a,control:l=t,shouldUnregister:d,defaultValue:i,exact:m=!0}=e,b=Os(l._names.array,s),x=k.useMemo(()=>h(l._formValues,s,h(l._defaultValues,s,i)),[l,s,i]),V=Vt({control:l,name:s,defaultValue:x,exact:m}),C=jt({control:l,name:s,exact:m}),M=k.useRef(e),Q=k.useRef(null),w=k.useRef(l.register(s,{...e.rules,value:V,...ce(e.disabled)?{disabled:e.disabled}:{}}));M.current=e;const z=k.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!h(C.errors,s)},isDirty:{enumerable:!0,get:()=>!!h(C.dirtyFields,s)},isTouched:{enumerable:!0,get:()=>!!h(C.touchedFields,s)},isValidating:{enumerable:!0,get:()=>!!h(C.validatingFields,s)},error:{enumerable:!0,get:()=>h(C.errors,s)}}),[C,s]),j=k.useCallback(E=>{const _=Je(E);return h(l._fields,s)||(w.current=l.register(s,{...M.current.rules,value:_})),w.current.onChange({target:{value:Je(E),name:s},type:ke.CHANGE})},[s,l]),le=k.useCallback(()=>w.current.onBlur({target:{value:h(l._formValues,s),name:s},type:ke.BLUR}),[s,l._formValues]),S=k.useCallback(E=>{E&&(Q.current={focus:()=>ie(E.focus)&&E.focus(),select:()=>ie(E.select)&&E.select(),setCustomValidity:W=>ie(E.setCustomValidity)&&E.setCustomValidity(W),reportValidity:()=>ie(E.reportValidity)&&E.reportValidity()});const _=h(l._fields,s);_&&_._f&&E&&(_._f.ref=Q.current)},[l._fields,s]),X=k.useMemo(()=>({name:s,value:V,...ce(a)||C.disabled?{disabled:C.disabled||a}:{},onChange:j,onBlur:le,ref:S}),[s,a,C.disabled,j,le,S,V]);return k.useEffect(()=>{const E=l._options.shouldUnregister||d;w.current=l.register(s,{...M.current.rules,...ce(M.current.disabled)?{disabled:M.current.disabled}:{}});const _=(W,ue)=>{const B=h(l._fields,W);B&&B._f&&(B._f.mount=ue)};if(_(s,!0),E){const W=L(h(d?l._defaultValues:l._options.values||l._defaultValues,s,h(l._options.defaultValues,s,M.current.defaultValue)));D(l._defaultValues,s,W),T(h(l._formValues,s))&&D(l._formValues,s,W)}if(!b&&l.register(s),Q.current){const W=h(l._fields,s);W&&W._f&&(W._f.ref=Q.current)}return()=>{(b?E&&!l._state.action:E)?l.unregister(s):_(s,!1)}},[s,l,b,d]),k.useEffect(()=>{l._setDisabledField({disabled:a,name:s})},[a,s,l]),k.useMemo(()=>({field:X,formState:C,fieldState:z}),[X,C,z])}const ks=e=>e.render(Nt(e));var Ie=e=>({isOnSubmit:!e||e===ge.onSubmit,isOnBlur:e===ge.onBlur,isOnChange:e===ge.onChange,isOnAll:e===ge.all,isOnTouch:e===ge.onTouched}),Qe=(e,t,s)=>{if(s)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const a of t.watch)if(e.startsWith(a)&&e.charAt(a.length)===".")return!0;return!1};const Me=(e,t,s,a)=>{for(const l of s||Object.keys(e)){if(l==="_f")continue;const d=s?h(e,l):e[l];if(d){const{_f:i}=d;if(i){if(i.refs&&i.refs[0]&&t(i.refs[0],l)&&!a)return!0;if(i.ref&&t(i.ref,i.name)&&!a)return!0;if(Me(d,t))break}else if(($(d)||Array.isArray(d))&&Me(d,t))break}}};var js=(e,t,s)=>{const a=h(e,s),l=Array.isArray(a)?a:[];return D(l,Ls,t[s]),D(e,s,l),e},se=e=>$(e)&&!Object.keys(e).length,Ue=e=>{if(!qe)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},cs=e=>e.type==="radio",Be=e=>e instanceof RegExp,$s=(e,t,s,a,l)=>t?{...s[e],types:{...s[e]&&s[e].types?s[e].types:{},[a]:l||!0}}:{};const Vs={value:!1,isValid:!1},Ns={value:!0,isValid:!0};var Us=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(s=>s&&s.checked&&!s.disabled).map(s=>s.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!T(e[0].attributes.value)?T(e[0].value)||e[0].value===""?Ns:{value:e[0].value,isValid:!0}:Ns:Vs}return Vs};const ws={isValid:!1,value:null};var Bs=e=>Array.isArray(e)?e.reduce((t,s)=>s&&s.checked&&!s.disabled?{isValid:!0,value:s.value}:t,ws):ws;function As(e,t,s="validate"){if(te(e)||Array.isArray(e)&&e.every(te)||ce(e)&&!e)return{type:s,message:te(e)?e:"",ref:t}}var Ne=e=>$(e)&&!Be(e)?e:{value:e,message:""},Fs=async(e,t,s,a,l,d)=>{const{ref:i,refs:m,required:b,maxLength:x,minLength:V,min:C,max:M,pattern:Q,val
1idate:w,name:z,valueAsNumber:j,mount:le}=e._f,S=h(s,z);if(!le||t.has(z))return{};const X=m?m[0]:i,E=A=>{if(l&&X.reportValidity){const R=ce(A)?"":A||"";m?m.forEach(P=>P.setCustomValidity(R)):X.setCustomValidity(R),X.reportValidity()}},_={},W=cs(i),ue=Te(i),B=W||ue,q=(j||We(i))&&T(i.value)&&T(S)||Ue(i)&&i.value===""||S===""||Array.isArray(S)&&!S.length,oe=$s.bind(null,z,a,_),pe=(A,R,P,H=he.maxLength,fe=he.minLength)=>{const Z=A?R:P;_[z]={type:A?H:fe,message:Z,ref:i,...oe(A?H:fe,Z)}};if(d?!Array.isArray(S)||!S.length:b&&(!B&&(q||ee(S))||ce(S)&&!S||ue&&!Us(m).isValid||W&&!Bs(m).isValid)){const{value:A,message:R}=te(b)?{value:!!b,message:b}:Ne(b);if(A&&(_[z]={type:he.required,message:R,ref:X,...oe(he.required,R)},!a))return E(R),_}if(!q&&(!ee(C)||!ee(M))){let A,R;const P=Ne(M),H=Ne(C);if(!ee(S)&&!be(S)&&!isNaN(S)){const fe=i.valueAsNumber||S&&+S;ee(P.value)||(A=fe>P.value),ee(H.value)||(R=fe<H.value)}else{const fe=i.valueAsDate||new Date(S),Z=J=>new Date(new Date().toDateString()+" "+J),I=i.type=="time",re=i.type=="week";te(P.value)&&S&&(A=I?Z(S)>Z(P.value):re?S>P.value:fe>new Date(P.value)),te(H.value)&&S&&(R=I?Z(S)<Z(H.value):re?S<H.value:fe<new Date(H.value))}if((A||R)&&(pe(!!A,P.message,H.message,he.max,he.min),!a))return E(_[z].message),_}if((x||V)&&!q&&(te(S)||d&&Array.isArray(S))){const A=Ne(x),R=Ne(V),P=!ee(A.value)&&S.length>+A.value,H=!ee(R.value)&&S.length<+R.value;if((P||H)&&(pe(P,A.message,R.message),!a))return E(_[z].message),_}if(Q&&!q&&te(S)){const{value:A,message:R}=Ne(Q);if(Be(A)&&!S.match(A)&&(_[z]={type:he.pattern,message:R,ref:i,...oe(he.pattern,R)},!a))return E(R),_}if(w){if(ie(w)){const A=await w(S,s),R=As(A,X);if(R&&(_[z]={...R,...oe(he.validate,R.message)},!a))return E(R.message),_}else if($(w)){let A={};for(const R in w){if(!se(A)&&!a)break;const P=As(await w[R](S,s),X,R);P&&(A={...P,...oe(R,P.message)},E(P.message),a&&(_[z]=A))}if(!se(A)&&(_[z]={ref:X,...A},!a))return _}}return E(!0),_},$e=e=>Array.isArray(e)?e:[e],Ws=e=>Array.isArray(e)?e.filter(Boolean):[];function wt(e,t){const s=t.length-1;let a=0;for(;a<s;){if(ee(e)){e=void 0;break}e=e[t[a]],a++}return e}function At(e){for(const t in e)if(e.hasOwnProperty(t)&&!T(e[t]))return!1;return!0}function G(e,t){if(te(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const s=Array.isArray(t)?t:Fe(t)?[t]:Oe(t);if(s.some(i=>is.includes(String(i))))return e;const a=s.length===1?e:wt(e,s),l=s.length-1,d=s[l];return a&&delete a[d],l!==0&&($(a)&&se(a)||Array.isArray(a)&&At(a))&&G(e,s.slice(0,-1)),e}const qs=e=>{const t={};for(const s of Object.keys(e))if(ns(e[s])&&e[s]!==null&&!be(e[s])){const a=qs(e[s]);for(const l of Object.keys(a))t[`${s}.${l}`]=a[l]}else t[s]=e[s];return t},Ft=k.createContext(null);Ft.displayName="HookFormContext";var Es=()=>{let e=[];return{get observers(){return e},next:l=>{for(const d of e)d.next&&d.next(l)},subscribe:l=>(e.push(l),{unsubscribe:()=>{e=e.filter(d=>d!==l)}}),unsubscribe:()=>{e=[]}}};function Hs(e,t){const s={};for(const a in e)if(e.hasOwnProperty(a)){const l=e[a],d=t[a];if(l&&$(l)&&d){const i=Hs(l,d);$(i)&&(s[a]=i)}else e[a]&&(s[a]=d)}return s}var Gs=e=>e.type==="select-multiple",Et=e=>cs(e)||Te(e),Xe=e=>Ue(e)&&e.isConnected;function zs(e){return Array.isArray(e)||$(e)}function Ks(e,t,s="",a=[]){for(const l in e){const d=s?`${s}.${l}`:l,i=e[l];zs(i)&&zs(h(t,d))?Ks(i,t,d,a):a.push(d)}return a}var zt=e=>{for(const t in e)if(ie(e[t]))return!0;return!1};function Ys(e){return Array.isArray(e)||$(e)&&!zt(e)}function Qs(e){return!!(e&&"_f"in e)}function Xs(e){return Array.isArray(e)?!e.some(t=>!T(t)):!Object.keys(e).length}function ts(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}function rs(e,t={},s){for(const a in e){const l=e[a],d=s&&s[a];Ys(l)&&(!Array.isArray(l)||!Qs(d))?(t[a]=Array.isArray(l)?[]:{},rs(l,t[a],d),Xs(t[a])&&ts(t,a)):T(l)||(t[a]=!0)}return t}function je(e,t,s,a){s||(s=rs(t,{},a));for(const l in e){const d=e[l],i=a&&a[l];Ys(d)&&(!Array.isArray(d)||!Qs(i))?(T(t)||es(s[l])?s[l]=rs(d,Array.isArray(d)?[]:{},i):je(d,ee(t)?{}:t[l],s[l],i),Xs(s[l])&&ts(s,l)):ae(d,t[l])?ts(s,l):s[l]=!0}return s}var Zs=(e,{valueAsNumber:t,valueAsDate:s,setValueAs:a})=>T(e)?e:t?e===""?NaN:e&&+e:s&&te(e)?new Date(e):a?a(e):e;function Ss(e){const t=e.ref;return We(t)?t.files:cs(t)?Bs(e.refs).value:Gs(t)?[...t.selectedOptions].map(({value:s})=>s):Te(t)?Us(e.refs).value:Zs(t.value,e)}var St=(e,t,s,a)=>{const l={};for(const d of e){const i=h(t,d);i&&D(l,d,i._f)}return{criteriaMode:s,names:[...e],fields:l,shouldUseNativeValidation:a}},Re=e=>T(e)?e:Be(e)?e.source:$(e)?Be(e.value)?e.value.source:e.value:e;const Cs="AsyncFunction";var Ct=e=>{if(!e||!e.validate)return!1;if(ie(e.validate))return e.validate.constructor.name===Cs;if($(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===Cs)return!0}return!1},Rt=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);
1function Rs(e,t,s){const a=h(e,s);if(a||Fe(s))return{error:a,name:s};const l=s.split(".");for(;l.length;){const d=l.join("."),i=h(t,d),m=h(e,d);if(i&&!Array.isArray(i)&&s!==d)return{name:s};if(m&&m.type)return{name:d,error:m};if(m&&m.root&&m.root.type)return{name:`${d}.root`,error:m.root};l.pop()}return{name:s}}var Dt=(e,t,s,a)=>{s(e);const l=Object.keys(e).filter(d=>d!=="name");return!l.length||a&&l.length>=Object.keys(t).length||l.find(d=>t[d]===(!a||ge.all))},Mt=(e,t,s)=>!e||!t||e===t||$e(e).some(a=>a&&(s?a===t||a.startsWith(t+"."):a.startsWith(t)||t.startsWith(a))),Ot=(e,t,s,a,l)=>l.isOnAll?!1:!s&&l.isOnTouch?!(t||e):(s?a.isOnBlur:l.isOnBlur)?!e:(s?a.isOnChange:l.isOnChange)?e:!0,Tt=(e,t)=>{const s=h(e,t);!Ws(s).length&&!(s!=null&&s.root)&&G(e,t)};const Lt={mode:ge.onSubmit,reValidateMode:ge.onChange,shouldFocusError:!0},Ze="form",Pt=(e,t)=>{for(const s in e)s in t||delete e[s];Object.assign(e,t)},Js={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function It(e={}){let t={...Lt,...e},s={...L(Js),isLoading:ie(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},a={},l=$(t.defaultValues)||$(t.values)?L(t.defaultValues||t.values)||{}:{},d=t.shouldUnregister?{}:L(l),i={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},m={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const b={},x={};let V=0,C=Ie(t.mode),M=Ie(t.reValidateMode);const Q={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},w={...Q};let z={...w};const j={array:Es(),state:Es()};let le=0;const S=t.criteriaMode===ge.all,X=(r,o)=>c=>{clearTimeout(x[r]),x[r]=setTimeout(o,c)},E=async r=>{if(!i.keepIsValid&&!t.disabled&&(w.isValid||z.isValid||r)){const o=++le;let c;t.resolver?(c=se((await H()).errors),o===le&&_()):c=await I({fields:a,onlyCheckValid:!0,eventType:ke.VALID}),o===le&&c!==s.isValid&&j.state.next({isValid:c})}},_=(r,o)=>{!t.disabled&&(w.isValidating||w.validatingFields||z.isValidating||z.validatingFields)&&((r||Array.from(m.mount)).forEach(c=>{c&&(o?D(s.validatingFields,c,o):G(s.validatingFields,c))}),j.state.next({validatingFields:s.validatingFields,isValidating:!se(s.validatingFields)}))},W=()=>{s.dirtyFields=je(l,d,void 0,a)},ue=(r,o=[],c,u,f=!0,p=!0)=>{if(u&&c&&!t.disabled){if(i.action=!0,!i.actionArrayLengths.has(r)){const g=h(a,r);i.actionArrayLengths.set(r,Array.isArray(g)?g.length:0)}if(p&&Array.isArray(h(a,r))){const g=c(h(a,r),u.argA,u.argB);f&&D(a,r,g)}if(p&&Array.isArray(h(s.errors,r))){const g=h(s.errors,r),y=g.root,v=c(g,u.argA,u.argB)||g;y&&(v.root=y),f&&D(s.errors,r,v),Tt(s.errors,r)}if((w.touchedFields||z.touchedFields)&&p&&Array.isArray(h(s.touchedFields,r))){const g=c(h(s.touchedFields,r),u.argA,u.argB);f&&D(s.touchedFields,r,g)}(w.dirtyFields||z.dirtyFields)&&W(),j.state.next({name:r,isDirty:J(r,o),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else D(d,r,o)},B=(r,o)=>{D(s.errors,r,o),s.errors={...s.errors},j.state.next({errors:s.errors})},q=r=>{s.errors=r,j.state.next({errors:s.errors,isValid:!1})},oe=r=>{const o=Fe(r)?[r]:Oe(r);let c=d,u=l;for(let f=0;f<o.length-1;f++){const p=o[f];if(c=ee(c)?c:c[p],u=ee(u)?u:u[p],c===null&&u!==null)return!0}return!1},pe=r=>{if(!i.actionArrayLengths.size)return!1;const o=Fe(r)?[r]:Oe(r);let c=d,u="",f=-1,p=0;for(let g=0;g<o.length;g++){if(ee(c))return!1;const y=o[g];if(u=u?`${u}.${y}`:y,Array.isArray(c)&&+y>=c.length)return f===-1?!1:g===f?+y<p:!0;i.actionArrayLengths.has(u)&&(f=g+1,p=i.actionArrayLengths.get(u)),c=c[y]}return!1},A=(r,o,c,u)=>{const f=h(a,r);if(f){if(oe(r)||pe(r))return;const p=T(h(d,r)),g=h(d,r,T(c)?h(l,r):c);T(g)||u&&u.defaultChecked||o?D(d,r,o?g:Ss(f._f)):O(r,g),i.mount&&!i.action&&(E(),p&&s.isDirty&&(w.isDirty||z.isDirty)&&(J()||(s.isDirty=!1,j.state.next({...s}))),e.shouldUnregister&&p&&!T(h(d,r))&&Qe(r,m)&&(i.watch=!0))}},R=(r,o,c,u,f)=>{let p=!1,g=!1;const y={name:r};if(!t.disabled||u===!0){if(!c||u){const v=ae(h(l,r),o);
1(w.isDirty||z.isDirty)&&(g=s.isDirty,s.isDirty=y.isDirty=!v||J(),p=g!==y.isDirty),g=!!h(s.dirtyFields,r),v!==s.isDirty?Pt(s.dirtyFields,je(l,d,void 0,a)):v?G(s.dirtyFields,r):D(s.dirtyFields,r,!0),y.dirtyFields=s.dirtyFields,p=p||(w.dirtyFields||z.dirtyFields)&&g!==!v}if(c){const v=h(s.touchedFields,r);v||(D(s.touchedFields,r,c),y.touchedFields=s.touchedFields,p=p||(w.touchedFields||z.touchedFields)&&v!==c)}p&&f&&j.state.next(y)}return p?y:{}},P=(r,o,c,u)=>{const f=h(s.errors,r),p=(w.isValid||z.isValid)&&ce(o)&&s.isValid!==o;if(t.delayError&&c?(b[r]=X(r,()=>B(r,c)),b[r](t.delayError)):(clearTimeout(x[r]),delete b[r],c?D(s.errors,r,c):G(s.errors,r),s.errors={...s.errors}),(c?!ae(f,c):f)||!se(u)||p){const g={...u,...p&&ce(o)?{isValid:o}:{},errors:s.errors,name:r};s={...s,...g},j.state.next(g)}},H=async r=>(_(r,!0),await t.resolver(d,t.context,St(r||m.mount,a,t.criteriaMode,t.shouldUseNativeValidation))),fe=async r=>{const{errors:o}=await H(r);if(_(r),r){for(const c of r){const u=h(o,c);u?m.array.has(c)&&$(u)&&!Object.keys(u).some(f=>!Number.isNaN(Number(f)))?js(s.errors,{[c]:u},c):D(s.errors,c,u):G(s.errors,c)}s.errors={...s.errors}}else s.errors=o;return o},Z=async({name:r,eventType:o})=>{if(e.validate){const c=await e.validate({formValues:d,formState:s,name:r,eventType:o});if($(c))for(const u in c){const f=c[u];f&&Pe(`${Ze}.${u}`,{message:te(f.message)?f.message:"",type:f.type||he.validate})}else te(c)||!c?Pe(Ze,{message:c||"",type:he.validate}):fs(Ze);return c}return!0},I=async({fields:r,onlyCheckValid:o,name:c,eventType:u,context:f={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(f.runRootValidation=!0,!await Z({name:c,eventType:u})&&(f.valid=!1,o)))return f.valid;for(const p in r){const g=r[p];if(g){const{_f:y,...v}=g;if(y){const F=m.array.has(y.name),Y=g._f&&Ct(g._f),me=w.validatingFields||w.isValidating||z.validatingFields||z.isValidating;Y&&me&&_([y.name],!0);const ve=await Fs(g,m.disabled,d,S,t.shouldUseNativeValidation&&!o,F);if(Y&&me&&_([y.name]),ve[y.name]&&(f.valid=!1,o)||(!o&&(h(ve,y.name)?F?js(s.errors,ve,y.name):D(s.errors,y.name,ve[y.name]):G(s.errors,y.name)),e.shouldUseNativeValidation&&ve[y.name]))break}!se(v)&&await I({context:f,onlyCheckValid:o,fields:v,name:p,eventType:u})}}return f.valid},re=()=>{for(const r of m.unMount){const o=h(a,r);o&&(o._f.refs?o._f.refs.every(c=>!Xe(c)):!Xe(o._f.ref))&&Ge(r)}m.unMount=new Set},J=(r,o)=>(r&&o&&D(d,r,o),!ae(i.mount?d:l,l)),Ee=(r,o,c)=>ss(r,m,{...i.mount?d:T(o)||te(r)?l:o},c,o),N=r=>Ws(h(i.mount?d:l,r,t.shouldUnregister?h(l,r,[]):[])),O=(r,o,c={},u=!1,f=!1,p=!1)=>{const g=h(a,r);let y=o;if(g){const v=g._f;v&&(!v.disabled&&D(d,r,Zs(o,v)),y=Ue(v.ref)&&ee(o)?"":o,Gs(v.ref)?[...v.ref.options].forEach(F=>F.selected=y.includes(F.value)):v.refs?Te(v.ref)?v.refs.forEach(F=>{(!F.defaultChecked||!F.disabled)&&(Array.isArray(y)?F.checked=!!y.find(Y=>Y===F.value):F.checked=y===F.value||!!y)}):v.refs.forEach(F=>F.checked=F.value===y):We(v.ref)?v.ref.value="":(v.ref.value=y,!v.ref.type&&!f&&!p&&j.state.next({name:r,values:u?d:L(d)})))}(c.shouldDirty||c.shouldTouch)&&R(r,y,c.shouldTouch,c.shouldDirty,!f),c.shouldValidate&&He(r,{delayError:c.delayError})},K=(r,o,c,u=!1,f=!1,p=!1)=>{m.array.has(r)&&j.array.next({name:r,values:u?d:L(d)});for(const g in o){if(!o.hasOwnProperty(g))return;const y=o[g],v=r+"."+g,F=h(a,v);(m.array.has(r)||$(y)||F&&!F._f)&&!be(y)?K(v,y,c,u,f,p):O(v,y,c,u,f,p)}},xe=(r,o,c,u,f=!1)=>{const p=h(a,r),g=m.array.has(r),y=u?o:L(o),v=h(d,r),F=ae(v,y);if(F||D(d,r,y),g)j.array.next({name:r,values:u?d:L(d)}),(w.isDirty||w.dirtyFields||z.isDirty||z.dirtyFields)&&c.shouldDirty&&(W(),f||j.state.next({name:r,dirtyFields:s.dirtyFields,isDirty:J(r,y)}));else{const Y=Array.isArray(y)&&!y.length||se(y),me=!F&&!f;!p||p._f||ee(y)||Y?O(r,y,c,u,f,me):K(r,y,c,u,f,me)}if(!F&&!f){const Y=Qe(r,m),me=u?d:L(d);j.state.next({...Y&&s,name:i.mount||Y?r:void 0,values:me})}},ye=(r,o,c={})=>xe(r,o,c,!1),ze=(r,o={})=>{const c=ie(r)?r(d):r;if(!ae(d,c)){d={...d,...c};const u=qs(c);for(const f of m.mount)f in u&&xe(f,u[f],o,!0,!0);j.state.next({...s,name:void 0,type:void 0,...V?{values:d}:{}}
1),o.shouldValidate&&E()}},Le=async r=>{i.mount=!0;const o=r.target;let c=o.name,u=!0;const f=h(a,c),p=g=>{u=Number.isNaN(g)||be(g)&&isNaN(g.getTime())||ae(g,h(d,c,g))};if(f){let g,y;const v=o.type?Ss(f._f):Je(r),F=r.type===ke.BLUR||r.type===ke.FOCUS_OUT,Y=!Rt(f._f)&&!e.validate&&!t.resolver&&!h(s.errors,c)&&!f._f.deps,me=Y||Ot(F,h(s.touchedFields,c),s.isSubmitted,M,C),ve=Qe(c,m,F);if(D(d,c,v),F){if(!o||!o.readOnly){f._f.onBlur&&f._f.onBlur(r);const Ce=b[c];Ce&&Ce(0)}}else f._f.onChange&&f._f.onChange(r);const Se=R(c,v,F),lt=!se(Se)||ve;if(!F&&j.state.next({name:c,type:r.type,...V?{values:L(d)}:{}}),me)return(!Y||!s.isValid)&&(w.isValid||z.isValid)&&(t.mode==="onBlur"?F&&E():F||E()),lt&&j.state.next({name:c,...ve?{}:Se});if(!t.resolver&&e.validate&&await Z({name:c,eventType:r.type}),!F&&ve&&j.state.next({...s}),t.resolver){const{errors:Ce}=await H([c]);if(_([c]),p(v),!u){!se(Se)&&j.state.next(Se);return}const ot=Rs(s.errors,a,c),bs=Rs(Ce,a,ot.name||c);g=bs.error,c=bs.name,y=se(Ce)}else _([c],!0),g=(await Fs(f,m.disabled,d,S,t.shouldUseNativeValidation))[c],_([c]),p(v),u&&(g?y=!1:(w.isValid||z.isValid)&&(y=await I({fields:a,onlyCheckValid:!0,name:c,eventType:r.type})));u&&(f._f.deps&&(!Array.isArray(f._f.deps)||f._f.deps.length>0)&&He(f._f.deps),P(c,y,g,Se))}},ds=(r,o)=>{if(h(s.errors,o)&&r.focus)return r.focus(),1},He=async(r,o={})=>{let c,u;const f=$e(r);if(t.resolver){const p=await fe(T(r)?r:f);c=se(p),u=r?!f.some(g=>h(p,g)):c}else r?(u=(await Promise.all(f.map(async p=>{const g=h(a,p);return await I({fields:g&&g._f?{[p]:g}:g,eventType:ke.TRIGGER})}))).every(Boolean),!(!u&&!s.isValid)&&E()):u=c=await I({fields:a,name:r,eventType:ke.TRIGGER});if(o.delayError&&t.delayError&&te(r)){const p=h(s.errors,r);p?(G(s.errors,r),b[r]=X(r,()=>B(r,p)),b[r](t.delayError)):(clearTimeout(x[r]),delete b[r])}return j.state.next({...!te(r)||(w.isValid||z.isValid)&&c!==s.isValid?{}:{name:r},...t.resolver||!r?{isValid:c}:{},errors:s.errors}),o.shouldFocus&&!u&&Me(a,ds,r?f:m.mount),u},st=(r,o)=>{let c={...i.mount?d:l};return o&&(c=Hs(o.dirtyFields?s.dirtyFields:s.touchedFields,c)),T(r)?c:te(r)?h(c,r):r.map(u=>h(c,u))},us=(r,o)=>({invalid:!!h((o||s).errors,r),isDirty:!!h((o||s).dirtyFields,r),error:h((o||s).errors,r),isValidating:!!h(s.validatingFields,r),isTouched:!!h((o||s).touchedFields,r)}),fs=r=>{const o=r?$e(r):void 0;o==null||o.forEach(c=>G(s.errors,c)),o?o.forEach(c=>{j.state.next({name:c,errors:s.errors})}):(s.errors={},j.state.next({errors:s.errors}))},Pe=(r,o,c)=>{const u=(h(a,r,{_f:{}})._f||{}).ref,f=h(s.errors,r)||{},{ref:p,message:g,type:y,...v}=f;D(s.errors,r,{...v,...o,ref:u}),j.state.next({name:r,errors:s.errors,isValid:!1}),c&&c.shouldFocus&&u&&u.focus&&u.focus()},tt=(r,o)=>{if(ie(r)){V++;const{unsubscribe:c}=j.state.subscribe({next:f=>"values"in f&&r(f.values||Ee(void 0,o),f)});let u=!1;return{unsubscribe:()=>{u||(u=!0,V--,c())}}}return Ee(r,o,!0)},ms=r=>{var o;const c=!!(!((o=r.formState)===null||o===void 0)&&o.values);c&&V++;const{unsubscribe:u}=j.state.subscribe({next:p=>{if(Mt(r.name,p.name,r.exact)&&Dt(p,r.formState||w,xs,r.reRenderRoot)){const g={...d};r.callback({values:g,...s,...p,defaultValues:l})}}});if(!c)return u;let f=!1;return()=>{f||(f=!0,V--,u())}},rt=r=>(i.mount=!0,z={...z,...r.formState},ms({...r,formState:{...Q,...r.formState}})),Ge=(r,o={})=>{for(const c of r?$e(r):m.mount)m.mount.delete(c),m.array.delete(c),o.keepValue||(G(a,c),G(d,c)),!o.keepError&&G(s.errors,c),!o.keepDirty&&G(s.dirtyFields,c),!o.keepTouched&&G(s.touchedFields,c),!o.keepIsValidating&&G(s.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&G(l,c);j.state.next({values:L(d)}),j.state.next({...s,...o.keepDirty?{isDirty:J()}:{}}),!o.keepIsValid&&E()},hs=({disabled:r,name:o})=>{if(ce(r)&&i.mount||r||m.disabled.has(o)){const f=m.disabled.has(o)!==!!r;r?m.disabled.add(o):m.disabled.delete(o),f&&i.mount&&!i.action&&E()}},Ke=(r,o={})=>{let c=h(a,r);const u=ce(o.disabled)||ce(t.disabled),f=!m.registerName.has(r)&&c&&c._f&&!c._f.mount;return D(a,r,{...c||{},_f:{...c&&c._f?c._f:{ref:{name:r}},name:r,mount:!0,...o}}),m.mount.add(r),c&&!f?hs({disabled:ce(o.disabled)?o.disabled:t.disabled,name:r}):A(r,!0,o.value),{...u?{disabled:o.disabled||t.disabled}:{},...t.progressive?{required:!!o.required,min:Re(o.min),max:Re(o.max),minLength:Re(o.minLength),maxLength:Re(o.maxLength),pattern:Re(o.pattern)}:{},name:r,onChange:Le,onBlur:Le,ref:p=>
1{if(p){m.registerName.add(r),Ke(r,o),m.registerName.delete(r),c=h(a,r);const g=T(p.value)&&p.querySelectorAll&&p.querySelectorAll("input,select,textarea")[0]||p,y=Et(g),v=c._f.refs||[];if(y?v.find(Y=>Y===g):g===c._f.ref)return;const F={...c._f};y?(F.refs=[...v.filter(Xe),g,...Array.isArray(h(l,r))?[{}]:[]],F.ref={type:g.type,name:r}):(F.ref=g,delete F.refs),D(a,r,{_f:F}),A(r,!1,void 0,g)}else c=h(a,r,{}),c._f&&(c._f.mount=!1),(t.shouldUnregister||o.shouldUnregister)&&!(Os(m.array,r)&&i.action)&&m.unMount.add(r)}}},Ye=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&Me(a,ds,m.mount),nt=r=>{ce(r)&&(j.state.next({disabled:r}),Me(a,(o,c)=>{const u=h(a,c);u&&(o.disabled=u._f.disabled||r,Array.isArray(u._f.refs)&&u._f.refs.forEach(f=>{f.disabled=u._f.disabled||r}))},0,!1))},gs=(r,o)=>async c=>{let u,f;c&&(c.preventDefault&&c.preventDefault(),c.persist&&c.persist());let p=L(d);if(j.state.next({isSubmitting:!0}),t.resolver){const{errors:g,values:y}=await H();_(),s.errors=g,p=L(y)}else await I({fields:a,eventType:ke.SUBMIT});if(m.disabled.size)for(const g of m.disabled)G(p,g);if(G(s.errors,Ls),se(s.errors)){j.state.next({errors:{}});try{u=await r(p,c)}catch(g){f=g}}else o&&await o({...s.errors},c),Ye(),setTimeout(Ye);if(j.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:se(s.errors)&&!f,submitCount:s.submitCount+1,errors:s.errors}),f)throw f;return u},it=(r,o={})=>{h(a,r)&&(T(o.defaultValue)?ye(r,L(h(l,r))):(ye(r,o.defaultValue),D(l,r,L(o.defaultValue))),o.keepTouched||G(s.touchedFields,r),o.keepDirty||(G(s.dirtyFields,r),s.isDirty=o.defaultValue?J(r,L(h(l,r))):J()),o.keepError||(G(s.errors,r),w.isValid&&E()),j.state.next({...s}))},ys=(r,o={})=>{const c=r?L(r):l,u=L(c),f=se(r),p=u,g=a;if(o.keepDefaultValues||(l=c),!o.keepValues){if(o.keepDirtyValues){const y=new Set([...m.mount,...Ks(je(l,d,void 0,g),s.dirtyFields)]);for(const v of Array.from(y)){const F=h(s.dirtyFields,v),Y=h(d,v),me=h(p,v);F&&!T(Y)?D(p,v,Y):!F&&!T(me)&&ye(v,me)}}else{if(qe&&T(r))for(const y of m.mount){const v=h(a,y);if(v&&v._f){const F=Array.isArray(v._f.refs)?v._f.refs[0]:v._f.ref;if(Ue(F)){const Y=F.closest("form");if(Y){Y.reset();break}}}}if(o.keepFieldsRef)for(const y of m.mount)ye(y,h(p,y));else a={}}if(t.shouldUnregister){if(d=o.keepDefaultValues?L(l):{},o.keepFieldsRef)for(const y of m.mount)D(d,y,h(p,y))}else d=L(p);j.array.next({values:{...p}}),j.state.next({name:void 0,type:void 0,values:{...p}})}m={mount:o.keepDirtyValues?m.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!w.isValid||!!o.keepIsValid||!!o.keepDirtyValues||!t.shouldUnregister&&!se(p),i.watch=!!t.shouldUnregister,i.keepIsValid=!!o.keepIsValid,i.action=!1,i.actionArrayLengths.clear(),o.keepErrors||(s.errors={}),j.state.next({submitCount:o.keepSubmitCount?s.submitCount:0,isDirty:f?!1:o.keepDirty?s.isDirty:o.keepValues?J():!!(o.keepDefaultValues&&!ae(r,l)),isSubmitted:o.keepIsSubmitted?s.isSubmitted:!1,dirtyFields:f?{}:o.keepDirtyValues?o.keepDefaultValues&&d?je(l,d,void 0,g):s.dirtyFields:o.keepDefaultValues&&r?je(l,r,void 0,g):o.keepDirty?s.dirtyFields:{},touchedFields:o.keepTouched?s.touchedFields:{},errors:o.keepErrors?s.errors:{},isSubmitSuccessful:o.keepIsSubmitSuccessful?s.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:l})},ps=(r,o)=>ys(ie(r)?r(d):r,{...t.resetOptions,...o}),at=(r,o={})=>{const c=h(a,r),u=c&&c._f;if(u){const f=u.refs?u.refs[0]:u.ref;f.focus&&setTimeout(()=>{f.focus(),o.shouldSelect&&ie(f.select)&&f.select()})}},xs=r=>{const{name:o,type:c,values:u,...f}=r;s={...s,...f}};j.state.subscribe({next:xs});const vs={control:{register:Ke,unregister:Ge,getFieldState:us,handleSubmit:gs,setError:Pe,_subscribe:ms,_runSchema:H,_updateIsValidating:_,_focusError:Ye,_getWatch:Ee,_getDirty:J,_setValid:E,_setFieldArray:ue,_setDisabledField:hs,_setErrors:q,_getFieldArray:N,_reset:ys,_resetDefaultValues:()=>ie(t.defaultValues)&&t.defaultValues().then(r=>{ps(r,t.resetOptions),j.state.next({isLoading:!1})}),_removeUnmounted:re,_disableForm:nt,_subjects:j,_proxyFormState:w,get _fields(){return a},get _formValues(){return d},get _state(){return i},set _state(r){i=r},get _defaultValues(){return l},get _names(){return m},set _names(r){m=r},get _formState(){return s},get _options(){return t},set _options(r){t={...t,...r},C=Ie(t.mode),M=Ie(t.reValidateMode)}},subscribe:rt,trigger:He,register:Ke,handleSubmit:gs,watch:tt,setValue:ye,setValues:ze,getValues:st,reset:ps,resetField:it,resetDefaultValues:(r,o={})=>
1{if(l=L(r),!o.keepDirty){const c=je(l,d,void 0,a);s.dirtyFields=c,s.isDirty=!se(c)}o.keepIsValid||E(),j.state.next({...s,defaultValues:l})},clearErrors:fs,unregister:Ge,setError:Pe,setFocus:at,getFieldState:us};return{...vs,formControl:vs}}function $t(e={}){const t=k.useRef(void 0),s=k.useRef(void 0),a=k.useRef(e.formControl),[l,d]=k.useState(()=>({...L(Js),isLoading:ie(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ie(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&a.current!==e.formControl)if(a.current=e.formControl,e.formControl)t.current={...e.formControl,formState:l},e.defaultValues&&!ie(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:x,...V}=It(e);t.current={...V,formState:l}}const i=t.current.control;i._options=e;const{resyncIfNeeded:m,snapshot:b}=os();return ls(()=>{const x=()=>({...i._formState,defaultValues:i._defaultValues});m(!0,x,d);const V=i._subscribe({formState:i._proxyFormState,callback:()=>d({...i._formState,defaultValues:i._defaultValues}),reRenderRoot:!0});return d(C=>({...C,isReady:!0})),i._formState.isReady=!0,()=>{V(),b(!0,x)}},[i,m,b]),k.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),k.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),k.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),k.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),k.useEffect(()=>{if(i._proxyFormState.isDirty){const x=i._getDirty();x!==l.isDirty&&i._subjects.state.next({isDirty:x})}},[i,l.isDirty]),k.useEffect(()=>{var x;e.values&&!ae(e.values,s.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((x=i._options.resetOptions)===null||x===void 0)&&x.keepIsValid||i._setValid(),s.current=e.values,d(V=>({...V}))):i._resetDefaultValues()},[i,e.values]),k.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=k.useMemo(()=>Is(l,i),[i,l]),t.current}const Ds=(e,t,s)=>{if(e&&"reportValidity"in e){const a=h(s,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},et=(e,t)=>{for(const s in t.fields){const a=t.fields[s];a&&a.ref&&"reportValidity"in a.ref?Ds(a.ref,s,e):a.refs&&a.refs.forEach(l=>Ds(l,s,e))}},Ut=(e,t)=>{t.shouldUseNativeValidation&&et(e,t);const s={};for(const a in e){const l=h(t.fields,a),d=Object.assign(e[a]||{},{ref:l&&l.ref});if(Bt(t.names||Object.keys(e),a)){const i=Object.assign({},h(s,a));D(i,"root",d),D(s,a,i)}else D(s,a,d)}return s},Bt=(e,t)=>
1e.some(s=>s.startsWith(t+"."));var Wt=function(e,t){for(var s={};e.length;){var a=e[0],l=a.code,d=a.message,i=a.path.join(".");if(!s[i])if("unionErrors"in a){var m=a.unionErrors[0].errors[0];s[i]={message:m.message,type:m.code}}else s[i]={message:d,type:l};if("unionErrors"in a&&a.unionErrors.forEach(function(V){return V.errors.forEach(function(C){return e.push(C)})}),t){var b=s[i].types,x=b&&b[a.code];s[i]=$s(i,t,s,l,x?[].concat(x,a.message):a.message)}e.shift()}return s},qt=function(e,t,s){return s===void 0&&(s={}),function(a,l,d){try{return Promise.resolve(function(i,m){try{var b=Promise.resolve(e[s.mode==="sync"?"parse":"parseAsync"](a,t)).then(function(x){return d.shouldUseNativeValidation&&et({},d),{errors:{},values:s.raw?a:x}})}catch(x){return m(x)}return b&&b.then?b.then(void 0,m):b}(0,function(i){if(function(m){return Array.isArray(m==null?void 0:m.errors)}(i))return{values:{},errors:Ut(Wt(i.errors,!d.shouldUseNativeValidation&&d.criteriaMode==="all"),d)};throw i}))}catch(i){return Promise.reject(i)}}};const Ht=ne.object({agencyName:ne.string().trim().min(1,"Required"),agencyWebsite:ne.string().trim().optional().default(""),country:ne.string().trim().min(1,"Required"),agencySize:ne.string().trim().optional().default(""),clientsManaged:ne.string().trim().min(1,"Required"),first90:ne.string().trim().optional().default(""),markets:ne.array(ne.string()).min(1),pocName:ne.string().trim().min(1,"Required"),pocRole:ne.string().trim().min(1,"Required"),pocEmail:ne.string().trim().email(),pocPhone:ne.string().trim().optional().default(""),interest:ne.array(ne.string()).optional().default([]),note:ne.string().trim().optional().default("")}),we=["agency","portfolio","poc","intent"],Gt={agency:["agencyName","country"],portfolio:["clientsManaged","markets"],poc:["pocName","pocRole","pocEmail"],intent:[]};function Kt(e,t){const s=[];return s.push("Agency partnership application",""),e.agencyWebsite&&s.push(`${t.agencyWebsite}: ${e.agencyWebsite}`),s.push(`${t.country}: ${e.country}`),e.agencySize&&s.push(`${t.agencySize}: ${e.agencySize}`),s.push(`${t.clientsManaged}: ${e.clientsManaged}`),e.first90&&s.push(`${t.first90}: ${e.first90}`),s.push(`${t.markets}: ${e.markets.join(", ")}`),s.push(""),s.push(`${t.pocRole}: ${e.pocRole}`),e.pocPhone&&s.push(`${t.pocPhone}: ${e.pocPhone}
1`),e.interest&&e.interest.length>0&&(s.push(""),s.push(`${t.interest}: ${e.interest.join(", ")}`)),e.note&&(s.push(""),s.push(`${t.note}:`),s.push(e.note)),s.join(`
2`)}function Yt({open:e,onClose:t,prefillInterest:s,showSuccess:a,onAuditCtaClick:l,onSubmitSuccess:d}){const{t:i}=_e("marketing"),{toast:m}=ct(),b=de.useRef(null),x=de.useRef(null),[V,C]=de.useState(0),M=we[V],Q=V===0,w=V===we.length-1,z=i("agencies.apply.options.interest",{returnObjects:!0})||[],j=i("agencies.apply.options.country",{returnObjects:!0})||[],le=i("agencies.apply.options.size",{returnObjects:!0})||[],S=i("agencies.apply.options.clients",{returnObjects:!0})||[],X=i("agencies.apply.options.first90",{returnObjects:!0})||[],E=i("agencies.apply.options.markets",{returnObjects:!0})||[],{register:_,handleSubmit:W,control:ue,reset:B,setValue:q,trigger:oe,formState:{isSubmitting:pe,errors:A}}=$t({resolver:qt(Ht),defaultValues:{agencyName:"",agencyWebsite:"",country:"",agencySize:"",clientsManaged:"",first90:"",markets:[],pocName:"",pocRole:"",pocEmail:"",pocPhone:"",interest:s?[s]:[],note:""}});if(de.useEffect(()=>{if(!e)return;b.current=document.activeElement,document.body.style.overflow="hidden";const N=window.setTimeout(()=>{var K;return(K=x.current)==null?void 0:K.focus()},120);s&&q("interest",[s]);const O=K=>{K.key==="Escape"&&t()};return document.addEventListener("keydown",O),()=>{var K,xe;document.removeEventListener("keydown",O),document.body.style.overflow="",window.clearTimeout(N),(xe=(K=b.current)==null?void 0:K.focus)==null||xe.call(K)}},[e,t,s,q]),de.useEffect(()=>{e||(B(),C(0))},[e,B]),!e)return null;const R=()=>C(N=>Math.max(N-1,0)),P=W(async N=>{try{const O=Kt(N,{agencyWebsite:i("agencies.apply.fields.agencyWebsite"),country:i("agencies.apply.fields.country"),agencySize:i("agencies.apply.fields.agencySize"),clientsManaged:i("agencies.apply.fields.clientsManaged"),first90:i("agencies.apply.fields.first90"),markets:i("agencies.apply.fields.markets"),pocRole:i("agencies.apply.fields.pocRole"),pocPhone:i("agencies.apply.fields.pocPhone"),interest:i("agencies.apply.fields.interest"),note:i("agencies.apply.fields.note")});await dt("POST","/api/contact",{name:N.pocName,email:ut(N.pocEmail),company:N.agencyName,inquiryType:"agency",message:O}),d()}catch{m({title:i("agencies.apply.errorToast"),variant:"destructive"})}}),H=async()=>{if(pe)return;if(w){await P();return}const N=Gt[M];(N.length===0?!0:await oe(N))&&C(K=>Math.min(K+1,we.length-1))},fe=N=>{N.preventDefault(),H()},Z=n.jsx("span",{className:"ms-0.5 font-semibold text-mk-green","aria-hidden":!0,children:i("agencies.apply.reqMark")}),I="block text-xs font-semibold text-mk-t1 mb-1.5",re="w-full h-10 rounded-lg border border-mk-border-2 bg-mk-bg-1 px-3 text-sm text-mk-t0 placeholder:text-mk-t3 focus:outline-none focus:ring-2 focus:ring-mk-green-ring focus:border-mk-green transition-colors",J="mt-1 text-[11px] text-mk-red",Ee=n.jsx("div",{className:"fixed inset-0 z-[1000] flex items-start justify-center overflow-y-auto bg-black/60 p-4 backdrop-blur-sm sm:items-center sm:p-6",role:"dialog","aria-modal":"true","aria-labelledby":"applyModalTitle","aria-describedby":"applyModalSub",onClick:N=>{N.target===N.currentTarget&&t()},children:n.jsxs("div",{className:"relative my-4 flex max-h-[calc(100vh-2rem)] w-full max-w-screen-sm flex-col rounded-2xl border border-mk-border bg-mk-bg-1 shadow-2xl sm:my-8 sm:max-h-[calc(100vh-4rem)]",children:[n.jsx("button",{type:"button","aria-label":"Close",onClick:t,className:"absolute end-3 top-3 z-10 inline-flex size-9 items-center justify-center rounded-full border border-mk-border-2 bg-mk-bg-2 text-mk-t2 transition-colors hover:border-mk-border-3 hover:text-mk-t0 sm:end-4 sm:top-4",children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),a?n.jsxs("div",{className:"p-8 text-center sm:p-12",children:[n.jsx("div",{className:"mx-auto mb-6 inline-flex size-16 items-center justify-center rounded-full bg-mk-green-dim ring-4 ring-mk-green-ring",children:n.jsx("svg",{className:"text-mk-green",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})}),n.jsx("h3",{className:"mb-2 text-2xl font-extrabold tracking-tight text-mk-t0",children:i("agencies.apply.success.title")}),n.jsx("p",{className:"mx-auto max-w-md text-sm leading-relaxed text-mk-t2",dangerouslySetInnerHTML:{__html:i("agencies.apply.success.body")}}),n.jsxs("div",{className:"mt-7 flex flex-col-reverse items-center justify-center gap-2 sm:flex-row",children:[n.jsx("button",{type:"button",onClick:t,className:"btn-outline",children:i("agencies.apply.success.close")}),n.jsx("button",{type:"button",onClick:l,className:"btn-primary",children:i("agencies.apply.success.ctaAudit")})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex-shrink-0 border-b border-mk-border p-6 pb-5 sm:p-8",children:[n.jsxs("span",{className:"inline-flex items-center gap-2 text-[11px] font-bold uppercase tracking-[.1em] text-mk-green",children:[n.jsx("span",{className:"size-1.5 rounded-full bg-mk-green ring-4 ring-mk-green-dim"}),i("agencies.apply.eyebrow")]}),n.jsx("h3",{id:"applyModalTitle",className:"mt-3 text-2xl font-extrabold tracking-tight text-mk-t0 sm:text-[26px]",children:i("agencies.apply.title")}),n.jsxs("p",{id:"applyModalSub",className:"mt-2 text-sm leading-relaxed text-mk-t2",children:[i("agencies.apply.sub")," ",Z,"."]}),n.jsxs("div",{className:"mt-5 flex items-center gap-3",children:[n.jsx("div",{className:"grid flex-1 grid-cols-4 gap-1.5",role:"progressbar","aria-valuenow":V+1,"aria-valuemin":1,"aria-valuemax":we.length,children:we.map((N,O)=>n.jsx("div",{className:Ae("h-1.5 rounded-full transition-colors duration-200",O<=V?"bg-mk-green":"bg-mk-bg-3")},O))}),n.jsx("span",{className:"whitespace-nowrap text-[11px] font-bold uppercase tabular-nums tracking-[.1em] text-mk-t3",children:i("agencies.apply.stepOf",{current:V+1,total:we.length})})]}),n.jsx("div",{className:"mt-2 text-[10px] font-bold uppercase tracking-[.12em] text-mk-green",children:i(`agencies.apply.sections.${M}`)}
2)]}),n.jsxs("form",{onSubmit:fe,noValidate:!0,className:"flex min-h-0 flex-1 flex-col",children:[n.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto p-6 pt-5 sm:p-8",children:[M==="agency"&&n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[n.jsxs("div",{children:[n.jsxs("label",{className:I,htmlFor:"f-agency-name",children:[i("agencies.apply.fields.agencyName")," ",Z]}),n.jsx("input",{id:"f-agency-name",autoComplete:"organization",className:re,..._("agencyName"),ref:N=>{_("agencyName").ref(N),x.current=N}}),A.agencyName&&n.jsx("p",{className:J,children:A.agencyName.message})]}),n.jsxs("div",{children:[n.jsx("label",{className:I,htmlFor:"f-agency-website",children:i("agencies.apply.fields.agencyWebsite")}),n.jsx("input",{id:"f-agency-website",type:"url",autoComplete:"url",placeholder:i("agencies.apply.placeholders.agencyWebsite"),className:re,..._("agencyWebsite")})]})]}),n.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[n.jsxs("div",{children:[n.jsxs("label",{className:I,htmlFor:"f-country",children:[i("agencies.apply.fields.country")," ",Z]}),n.jsxs("select",{id:"f-country",className:re,..._("country"),children:[n.jsx("option",{value:"",children:i("agencies.apply.fields.select")}),j.map(N=>n.jsx("option",{value:N,children:N},N))]}),A.country&&n.jsx("p",{className:J,children:A.country.message})]}),n.jsxs("div",{children:[n.jsx("label",{className:I,htmlFor:"f-size",children:i("agencies.apply.fields.agencySize")}),n.jsxs("select",{id:"f-size",className:re,..._("agencySize"),children:[n.jsx("option",{value:"",children:i("agencies.apply.fields.select")}),le.map(N=>n.jsx("option",{value:N,children:N},N))]})]})]})]}),M==="portfolio"&&n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[n.jsxs("div",{children:[n.jsxs("label",{className:I,htmlFor:"f-clients",children:[i("agencies.apply.fields.clientsManaged")," ",Z]}),n.jsxs("select",{id:"f-clients",className:re,..._("clientsManaged"),children:[n.jsx("option",{value:"",children:i("agencies.apply.fields.select")}),S.map(N=>n.jsx("option",{value:N,children:N},N))]}),A.clientsManaged&&n.jsx("p",{className:J,children:A.clientsManaged.message})]}),n.jsxs("div",{children:[n.jsx("label",{className:I,htmlFor:"f-onboard",children:i("agencies.apply.fields.first90")}),n.jsxs("select",{id:"f-onboard",className:re,..._("first90"),children:[n.jsx("option",{value:"",children:i("agencies.apply.fields.select")}),X.map(N=>n.jsx("option",{value:N,children:N},N))]})]})]}),n.jsxs("div",{children:[n.jsxs("span",{className:I,children:[i("agencies.apply.fields.markets")," ",Z]}),n.jsx(ks,{control:ue,name:"markets",render:({field:N})=>n.jsx("div",{className:"flex flex-wrap gap-2",children:E.map(O=>{const K=N.value.includes(O);return n.jsxs("label",{className:Ae("inline-flex h-9 cursor-pointer items-center gap-2 rounded-full border px-3.5 text-xs font-semibold transition-colors",K?"border-mk-green-ring bg-mk-green-dim text-mk-green":"border-mk-border-2 bg-mk-bg-2 text-mk-t1 hover:border-mk-border-3"),children:[n.jsx("input",{type:"checkbox",value:O,checked:K,onChange:xe=>{const ye=xe.target.checked?[...N.value,O]:N.value.filter(ze=>ze!==O);N.onChange(ye)},className:"sr-only"}),n.jsx("span",{children:O})]},O)})})}),A.markets&&n.jsx("p",{className:J,children:i("agencies.apply.marketsRequired")})]})]}),M==="poc"&&n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[n.jsxs("div",{children:[n.jsxs("label",{className:I,htmlFor:"f-poc-name",children:[i("agencies.apply.fields.pocName")," ",Z]}),n.jsx("input",{id:"f-poc-name",autoComplete:"name",className:re,..._("pocName")}),A.pocName&&n.jsx("p",{className:J,children:A.pocName.message})]}),n.jsxs("div",{children:[n.jsxs("label",{className:I,htmlFor:"f-poc-role",children:[i("agencies.apply.fields.pocRole")," ",Z]}),n.jsx("input",{id:"f-poc-role",autoComplete:"organization-title",placeholder:i("agencies.apply.placeholders.pocRole"),className:re,..._("pocRole")}),A.pocRole&&n.jsx("p",{className:J,children:A.pocRole.message})]})]}),n.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[n.jsxs("div",{children:[n.jsxs("label",{className:I,htmlFor:"f-poc-email",children:[i("agencies.apply.fields.pocEmail")," ",Z]}),n.jsx("input",{id:"f-poc-email",type:"email",autoComplete:"email",className:re,..._("pocEmail")}),A.pocEmail&&n.jsx("p",{className:J,children:A.pocEmail.message})]}),n.jsxs("div",{children:[n.jsx("label",{className:I,htmlFor:"f-poc-phone",children:i("agencies.apply.fields.pocPhone")}),n.jsx("input",{id:"f-poc-phone",type:"tel",autoComplete:"tel",placeholder:i("agencies.apply.placeholders.pocPhone"),className:re,..._("pocPhone")})]})]})]}),M==="intent"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("span",{className:I,children:i("agencies.apply.fields.interest")}),n.jsx(ks,{control:ue,name:"interest",render:({field:N})=>n.jsx("div",{className:"flex flex-wrap gap-2",children:z.map(O=>{const K=(N.value??[]).includes(O.value);return n.jsxs("label",{className:Ae("inline-flex h-9 cursor-pointer items-center gap-2 rounded-full border px-3.5 text-xs font-semibold transition-colors",K?"border-mk-green-ring bg-mk-green-dim text-mk-green":"border-mk-border-2 bg-mk-bg-2 text-mk-t1 hover:border-mk-border-3"),children:[n.jsx("input",{type:"checkbox",value:O.value,checked:K,onChange:xe=>{const ye=N.value??[],ze=xe.target.checked?[...ye,O.value]:ye.filter(Le=>Le!==O.value);N.onChange(ze)},className:"sr-only"}),n.jsx("span",{children:O.label})]},O.value)})})})]}),n.jsxs("div",{children:[n.jsxs("label",{className:I,htmlFor:"f-note",children:[i("agencies.apply.fields.note")," ",n.jsx("span",{className:"font-normal text-mk-t3",children:i("agencies.apply.fields.noteOptional")})]}),n.jsx("textarea",{id:"f-note",rows:4,placeholder:i("agencies.apply.placeholders.note"),className:Ae(re,"h-auto py-2.5 leading-relaxed"),..._("note")})]}),n.jsx("p",{className:"border-t border-mk-border pt-2 text-[11px] leading-relaxed text-mk-t3",children:i("agencies.apply.disclaimer")})]})]}),n.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between gap-3 rounded-b-2xl border-t border-mk-border bg-mk-bg-1 px-6 py-4 sm:px-8",children:[Q?n.jsx("button",{type:"button",onClick:t,className:"btn-outline",children:i("agencies.apply.cancel")}):n.jsxs("button",{type:"button",onClick:R,className:"btn-outline",children:[n.jsx("svg",{className:"rtl-flip",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"15 18 9 12 15 6"})}),i("agencies.apply.back")]}),n.jsxs("button",{type:"button",onClick:()=>void H(),disabled:pe,className:"btn-primary disabled:cursor-not-allowed disabled:opacity-60",children:[i(w?pe?"agencies.apply.submitting":"agencies.apply.submit":"agencies.apply.next"),!pe&&n.jsx("svg",{className:"rtl-flip",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:w?n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),n.jsx("polyline",{points:"12 5 19 12 12 19"})]}):n.jsx("polyline",{points:"9 18 15 12 9 6"})})]},w?"submit":"next")]})]})]})]})});return bt.createPortal(Ee,document.body)}function Qt({onApply:e}){const{t}=_e("marketing");return n.jsx(Ve,{variant:"close",className:"zv-closecard-sec",children:n.jsxs("div",{className:"zv-closecard",children:[n.jsx("span",{className:"zv-closecard__glow","aria-hidden":"true"}),n.jsxs(U,{index:0,className:"zv-closecard__copy",children:[n.jsx("p",{className:"zv-eyebrow zv-closecard__kicker",children:t("agenciesV2.close.kicker")}),n.jsx("h2",{className:"zv-h2 zv-h2--lg",children:t("agenciesV2.close.title")}),n.jsx("p",{className:"zv-closecard__body",children:t("agenciesV2.close.body")})]}),n.jsx(U,{index:1,className:"zv-closecard__actions",children:n.jsx("button",{type:"button",className:"zv-btn zv-btn--solid",onClick:e,children:t("agenciesV2.close.apply")})})]})})}const Xt=["t1","t2","t3"],Zt=["i1","i2","i3"];function Jt(){const{t:e}=_e("marketing"),t=Ms();return n.jsxs(Ve,{children:[n.jsxs(U,{index:0,className:"zv-agencyhead",children:[n.jsx("p",{className:"zv-eyebrow",children:e("agenciesV2.economics.kicker")}),n.jsx("h2",{className:"zv-h2",children:e("agenciesV2.economics.title")}),n.jsx("p",{className:"zv-agencyhead__body",children:e("agenciesV2.economics.lede")})]}),n.jsxs("div",{className:"zv-split zv-agencyeco zv-mt-8",children:[n.jsxs(U,{index:1,className:"zv-split__copy zv-agencyeco__copy",children:[n.jsx("h3",{className:"zv-h3",children:e("agenciesV2.economics.howTitle")}),n.jsx("p",{className:"zv-agencyeco__body",children:e("agenciesV2.economics.howBody")}),n.jsxs("div",{className:"zv-rules",children:[n.jsx("p",{className:"zv-eyebrow zv-rules__title",children:e("agenciesV2.economics.rulesTitle")}),n.jsx("ul",{children:Zt.map(s=>n.jsxs("li",{children:[n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("path",{d:"M4 12l5 5L20 6"})}),n.jsx("span",{children:e(`agenciesV2.economics.notes.${s}.text`)})]},s))})]})]}),n.jsx(U,{index:2,className:"zv-split__art",children:n.jsxs("table",{className:"zv-ladder",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{scope:"col",children:e("agenciesV2.economics.tableClients")}),n.jsx("th",{scope:"col",children:e("agenciesV2.economics.tableMargin")})]})}),n.jsxs("tbody",{children:[Xt.map(s=>n.jsxs("tr",{children:[n.jsx("td",{children:e(`agenciesV2.economics.tiers.${s}.clients`)}),n.jsx("td",{className:"zv-ladder__margin",children:e(`agenciesV2.economics.tiers.${s}.margin`)})]},s)),n.jsxs("tr",{className:"zv-ladder__life",children:[n.jsxs("td",{children:[n.jsx("strong",{children:e("agenciesV2.economics.lifetimeTitle")}),n.jsx("span",{children:e("agenciesV2.economics.lifetimeBody")})]}),n.jsx("td",{className:"zv-ladder__margin",children:e("agenciesV2.economics.lifetimeValue")})]})]})]})})]}),n.jsxs(U,{index:3,className:"zv-agencyplan zv-mt-8",children:[n.jsx("span",{className:"zv-agencyplan__glow","aria-hidden":"true"}),n.jsxs("p",{className:"zv-agencyplan__copy",children:[n.jsx("strong",{children:e("agenciesV2.economics.agencyPlanName")})," ",e("agenciesV2.economics.agencyPlan")]}),n.jsxs(ft,{className:"zv-agencyplan__cta",to:t("/contact"),children:[e("agenciesV2.economics.contactSales"),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("path",{d:"M5 12h14M13 5l7 7-7 7"})})]})]})]})}const er=["w1","w2"],sr=["i1","i2","i3","i4"];function tr(){const{t:e}=_e("marketing");return n.jsxs(Ve,{id:"enablement",children:[n.jsxs(U,{index:0,className:"zv-agencyhead",children:[n.jsx("p",{className:"zv-eyebrow",children:e("agenciesV2.enablement.kicker")}),n.jsx("h2",{className:"zv-h2",children:e("agenciesV2.enablement.title")}),n.jsx("p",{className:"zv-agencyhead__body",children:e("agenciesV2.enablement.lede")})]}),n.jsx("div",{className:"zv-grid zv-grid--2 zv-mt-8",children:er.map((t,s)=>n.jsx(U,{index:s+1,children:n.jsxs("div",{className:Ae("zv-workshop",t==="w2"&&"zv-workshop--dark"),children:[n.jsx("span",{className:"zv-mono zv-workshop__num",children:e(`agenciesV2.enablement.workshops.${t}.num`)}),n.jsx("h3",{className:"zv-h3 zv-workshop__name",children:e(`agenciesV2.enablement.workshops.${t}.name`)}),n.jsx("p",{className:"zv-workshop__intro",children:e(`agenciesV2.enablement.workshops.${t}.intro`)}),n.jsx("ul",{className:"zv-checks zv-workshop__items",children:sr.map(a=>n.jsxs("li",{children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("path",{d:"M4 12l5 5L20 6"})}),e(`agenciesV2.enablement.workshops.${t}.items.${a}`)]},a))})]})},t))})]})}const rr=["i1","i2","i3","i4","i5","i6","i7"];function nr(){const{t:e}=_e("marketing"),t=rr.map(s=>({q:e(`agenciesV2.faq.items.${s}.q`),a:e(`agenciesV2.faq.items.${s}.a`)}));return n.jsxs(Ve,{narrow:!0,children:[n.jsx(U,{index:0,children:n.jsx("h2",{className:"zv-h2",children:e("agenciesV2.faq.title")})}),n.jsx(U,{index:1,className:"zv-mt-8",children:n.jsx(mt,{items:t})})]})}function ir({onApply:e}){const{t}=_e("marketing");return n.jsx("section",{className:"zv-section zv-section--agencyhero",children:n.jsxs("div",{className:"zv-container zv-agencyhero",children:[n.jsx(U,{as:"p",onMount:!0,index:0,className:"zv-eyebrow",children:t("agenciesV2.hero.kicker")}),n.jsxs(U,{as:"h1",onMount:!0,index:1,className:"zv-h1 zv-h1--sm",children:[t("agenciesV2.hero.h1Before"),n.jsx("span",{className:"zv-grad",children:t("agenciesV2.hero.h1Highlight")}),t("agenciesV2.hero.h1After")]}),n.jsx(U,{as:"p",onMount:!0,index:2,className:"zv-lede",children:t("agenciesV2.hero.lede")}),n.jsxs(U,{onMount:!0,index:3,className:"zv-agencyhero__actions",children:[n.jsx("button",{type:"button",className:"zv-btn zv-btn--solid",onClick:e,children:t("agenciesV2.hero.apply")}),n.jsx("a",{className:"zv-btn zv-btn--outline",href:"#pilot",children:t("agenciesV2.hero.howItWorks")})]})]})})}const ar=["i1","i2","i3"];function lr({onApply:e}){const{t}=_e("marketing");return n.jsxs(Ve,{id:"pilot",variant:"tint",children:[n.jsx(U,{index:0,children:n.jsx("h2",{className:"zv-h2",children:t("agenciesV2.pilot.title")})}),n.jsx("ol",{className:"zv-grid zv-grid--3 zv-mt-8 zv-beats",children:ar.map((s,a)=>n.jsx(U,{as:"li",index:a+1,children:n.jsxs("div",{className:"zv-numcard",children:[n.jsx("span",{className:"zv-numcard__num zv-mono",children:t(`agenciesV2.pilot.beats.${s}.num`)}),n.jsx("h3",{className:"zv-h3",children:t(`agenciesV2.pilot.beats.${s}.name`)}),n.jsx("p",{className:"zv-body",children:t(`agenciesV2.pilot.beats.${s}.line`)})]})},s))}),n.jsx(U,{index:4,className:"zv-mt-8",children:n.jsx("button",{type:"button",className:"zv-btn zv-btn--solid",onClick:e,children:t("agenciesV2.hero.apply")})})]})}function or({onApply:e}){const{t}=_e("marketing");return n.jsxs(Ve,{children:[n.jsx(U,{index:0,className:"zv-agencyhead",children:n.jsx("p",{className:"zv-lede",children:t("agenciesV2.results.lede")})}),n.jsx("div",{className:"zv-grid zv-grid--2 zv-mt-8",children:ht.map((s,a)=>n.jsx(U,{index:a+1,children:n.jsx(gt,{entry:s,compact:!0})},s.key))}),n.jsx(U,{index:3,className:"zv-mt-8",children:n.jsx("button",{type:"button",className:"zv-btn zv-btn--solid",onClick:e,children:t("agenciesV2.hero.apply")})})]})}const cr="/assets/ai-readiness-PaGkm-9U.png",dr="/assets/content-writer-eeYERbRn.png",ur="/assets/fix-queue-CHXMd2Uw.png",De=[{key:"audit",img:cr,icon:"M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14zM21 21l-4.35-4.35"},{key:"plan",img:ur,icon:"M9 6h11M9 12h11M9 18h11M4 5l1.5 1.5L8 4M4 11l1.5 1.5L8 10M4 17l1.5 1.5L8 16"},{key:"content",img:dr,icon:"M4 20l4-1L20 7l-3-3L5 16l-1 4z"},{key:"track",img:yt,icon:"M4 19V5M4 19h16M7 15l3.5-3.5 3 2L21 7"}],fr=4500;function mr(){const{t:e}=_e("marketing"),[t,s]=de.useState(0),[a,l]=de.useState(!1),d=de.useRef([]),i=de.useId();de.useEffect(()=>{if(a||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const x=window.setTimeout(()=>s(V=>(V+1)%De.length),fr);return()=>window.clearTimeout(x)},[t,a]);const m=de.useCallback((x,V)=>{var w;const C=x.key==="ArrowRight"?1:x.key==="ArrowLeft"?-1:0;if(!C)return;x.preventDefault();const M=document.documentElement.dir==="rtl",Q=(V+(M?-C:C)+De.length)%De.length;s(Q),(w=d.current[Q])==null||w.focus()},[]),b=De[t];return n.jsxs(Ve,{children:[n.jsx(U,{index:0,children:n.jsx("h2",{className:"zv-h2",children:e("agenciesV2.workflow.title")})}),n.jsxs("div",{className:"zv-wf",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onFocusCapture:()=>l(!0),onBlurCapture:()=>l(!1),children:[n.jsx(U,{index:1,children:n.jsx("div",{className:"zv-wf__tabs",role:"tablist","aria-label":e("agenciesV2.workflow.title"),children:De.map((x,V)=>n.jsxs("button",{type:"button",ref:C=>{d.current[V]=C},id:`${i}-tab-${V}`,className:Ae("zv-wf__tab",V===t&&"zv-wf__tab--on"),role:"tab","aria-selected"
2:V===t,"aria-controls":`${i}-panel`,tabIndex:V===t?0:-1,onClick:()=>s(V),onKeyDown:C=>m(C,V),children:[n.jsx("span",{className:"zv-wf__fill","aria-hidden":"true"},t),n.jsxs("span",{className:"zv-wf__head",children:[n.jsx("span",{className:"zv-wf__icon","aria-hidden":"true",children:n.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"#ffffff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:x.icon})})}),n.jsx("span",{className:"zv-mono zv-wf__num",children:e(`agenciesV2.workflow.stages.${x.key}.num`)})]}),n.jsx("span",{className:"zv-wf__name",children:e(`agenciesV2.workflow.stages.${x.key}.name`)})]},x.key))})}),n.jsx(U,{index:2,children:n.jsxs("div",{id:`${i}-panel`,role:"tabpanel","aria-labelledby":`${i}-tab-${t}`,className:"zv-wf__panel",tabIndex:0,children:[n.jsxs("p",{className:"zv-mono zv-wf__lead",children:[e(`agenciesV2.workflow.stages.${b.key}.num`)," ·"," ",e(`agenciesV2.workflow.stages.${b.key}.name`)]}),n.jsx("p",{className:"zv-wf__desc",children:e(`agenciesV2.workflow.stages.${b.key}.desc`)}),n.jsxs("div",{className:"zv-wf__frame",children:[n.jsxs("div",{className:"zv-wf__chrome","aria-hidden":"true",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]}),n.jsx("img",{src:b.img,alt:e(`agenciesV2.workflow.stages.${b.key}.alt`),width:1456,height:900,loading:"lazy"},b.key)]})]})})]})]})}function vr(){const e=pt(),t=Ms();xt();const[s,a]=de.useState(!1),[l,d]=de.useState(!1),i=()=>a(!0);return n.jsxs(vt,{children:[n.jsxs("div",{className:"zv-page","data-testid":"agencies-v2",children:[n.jsx(ir,{onApply:i}),n.jsx(Jt,{}),n.jsx(mr,{}),n.jsx(or,{onApply:i}),n.jsx(lr,{onApply:i}),n.jsx(tr,{}),n.jsx(nr,{}),n.jsx(Qt,{onApply:i})]}),n.jsx(Yt,{open:s,onClose:()=>a(!1),showSuccess:l,onSubmitSuccess:()=>d(!0),onAuditCtaClick:()=>{a(!1),e(t("/"))}})]})}export{vr as default};

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