PageSourceSearch

https://www.tabacariatrevo.com.br/_next/static/chunks/536-37a98e844490de36.js

js tabacariatrevo.com.br collected 2026-09-29 01:31:14 UTC 25,382 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[536],{87536:function(e,t,r){r.d(t,{Dq:function(){return we},Gc:function(){return E},KN:function(){return H},Qr:function(){return $},RV:function(){return O},U2:function(){return m},bc:function(){return W},cI:function(){return Ie},qo:function(){return P},t8:function(){return Q}});var s=r(67294),a=e=>"checkbox"===e.type,n=e=>e instanceof Date,i=e=>null==e;const o=e=>"object"===typeof e;var u=e=>!i(e)&&!Array.isArray(e)&&o(e)&&!n(e),l=e=>u(e)&&e.target?a(e.target)?e.target.checked:e.target.value:e,c=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),d=e=>Array.isArray(e)?e.filter(Boolean):[],f=e=>void 0===e,m=(e,t,r)=>{if(!t||!u(e))return r;const s=d(t.split(/[,[\].]+?/)).reduce(((e,t)=>i(e)?e:e[t]),e);return f(s)||s===e?f(e[t])?r:e[t]:s};const y="blur",g="focusout",h="change",p="onBlur",_="onChange",v="onSubmit",b="onTouched",A="all",V="max",x="min",F="maxLength",w="minLength",S="pattern",k="required",D="validate",C=s.createContext(null),E=()=>s.useContext(C),O=e=>{const{children:t,...r}=e;return s.createElement(C.Provider,{value:r},t)};var j=(e,t,r,s=!0)=>{const a={defaultValues:t._defaultValues};for(const n in e)Object.defineProperty(a,n,{get:()=>{const a=n;return t._proxyFormState[a]!==A&&(t._proxyFormState[a]=!s||A),r&&(r[a]=!0),e[a]}});return a},U=e=>u(e)&&!Object.keys(e).length,N=(e,t,r,s)=>{r(e);const{name:a,...n}=e;return U(n)||Object.keys(n).length>=Object.keys(t).length||Object.keys(n).find((e=>t[e]===(!s||A)))},B=e=>Array.isArray(e)?e:[e],L=(e,t,r)=>r&&t?e===t:!e||!t||e===t||B(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function T(e){const t=s.useRef(e);t.current=e,s.useEffect((()=>{const r=!e.disabled&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}}),[e.disabled])}var M=e=>"string"===typeof e,R=(e,t,r,s,a)=>M(e)?(s&&t.watch.add(e),m(r,e,a)):Array.isArray(e)?e.map((e=>(s&&t.watch.add(e),m(r,e)))):(s&&(t.watchAll=!0),r),q="undefined"!==typeof window&&"undefined"!==typeof window.HTMLElement&&"undefined"!==typeof document;function I(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(q&&(e instanceof Blob||e instanceof FileList)||!r&&!u(e))return e;if(t=r?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return u(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const r in e)t[r]=I(e[r]);else t=e}return t}function P(e){const t=E(),{control:r=t.control,name:a,defaultValue:n,disabled:i,exact:o}=e||{},u=s.useRef(a);u.current=a,T({disabled:i,subject:r._subjects.watch,next:e=>{L(u.current,e.name,o)&&c(I(R(u.current,r._names,e.values||r._formValues,!1,n)))}});const[l,c]=s.useState(r._getWatch(a,n));return s.useEffect((()=>r._removeUnmounted())),l}function W(e){const t=E(),{name:r,control:a=t.control,shouldUnregister:n}=e,i=c(a._names.array,r),o=P({control:a,name:r,defaultValue:m(a._formValues,r,m(a._defaultValues,r,e.defaultValue)),exact:!0}),u=function(e){const t=E(),{control:r=t.control,disabled:a,name:n,exact:i}=e||{},[o,u]=s.useState(r._formState),l=s.useRef(!0),c=s.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=s.useRef(n);return d.current=n,T({disabled:a,next:e=>l.current&&L(d.current,e.name,i)&&N(e,c.current,r._updateFormState)&&u({...r._formState,...e}),subject:r._subjects.state}),s.useEffect((()=>{l.current=!0;const e=r._proxyFormState.isDirty&&r._getDirty();return e!==r._formState.isDirty&&r._subjects.state.next({isDirty:e}),c.current.isValid&&r._updateValid(!0),()=>{l.current=!1}}),[r]),j(o,r,c.current,!1)}({control:a,name:r}),d=s.useRef(a.register(r,{...e.rules,value:o}));return s.useEffect((()=>{const e=(e,t)=>{const r=m(a._fields,e);r&&(r._f.mount=t)};return e(r,!0),()=>{const t=a._options.shouldUnregister||n;(i?t&&!a._stateFlags.action:t)?a.unregister(r):e(r,!1)}}),[r,a,i,n]),{field:{name:r,value:o,onChange:s.useCallback((e=>d.current.onChange({target:{value:l(e),name:r},type:h})),[r]),onBlur:s.useCallback((()=>d.current.onBlur({target:{value:m(a._formValues,r),name:r},type:y})),[r,a]),ref:e=>{const t=m(a._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!m(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!m(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!m(u.touchedFields,r)},error:{enumerable:!0,get:()=>m(u.errors,r)}})}}const $=e=>e.render(W(e));var H=(e,t,r,s,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:a||!0}}:{},G=e=>/^\w*$/.test(e),K=e=>d(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Q(e,t,r){let s=-1;const a=G(t)?[t]:K(t),n=a.length,i=n-1;for(;++s<n;){const t=a[s];let n=r;if(s!==i){const r=e[t];n=u(r)||Array.isArray(r)?r:isNaN(+a[s+1])?{}:[]}e[t]=n,e=e[t]}return e}const z=(e,t,r)=>{for(const s of r||Object.keys(e)){const r=m(e,s);if(r){const{_f:e,...s}=r;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else u(s)&&z(s,t)}}};var J=()=>{const e="undefined"===typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const r=(16*Math.random()+e)%16|0;return("x"==t?r:3&r|8).toString(16)}))},X=(e,t,r={})=>
vendor: 8,670 bytes, line 1
1r.shouldFocus||f(r.shouldFocus)?r.focusName||`${e}.${f(r.focusIndex)?t:r.focusIndex}.`:"",Y=e=>({isOnSubmit:!e||e===v,isOnBlur:e===p,isOnChange:e===_,isOnAll:e===A,isOnTouch:e===b}),Z=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),ee=(e,t,r)=>{const s=d(m(e,r));return Q(s,"root",t[r]),Q(e,r,s),e},te=e=>"boolean"===typeof e,re=e=>"file"===e.type,se=e=>"function"===typeof e,ae=e=>{if(!q)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ne=e=>M(e)||s.isValidElement(e),ie=e=>"radio"===e.type,oe=e=>e instanceof RegExp;const ue={value:!1,isValid:!1},le={value:!0,isValid:!0};var ce=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&&!f(e[0].attributes.value)?f(e[0].value)||""===e[0].value?le:{value:e[0].value,isValid:!0}:le:ue}return ue};const de={isValid:!1,value:null};var fe=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),de):de;function me(e,t,r="validate"){if(ne(e)||Array.isArray(e)&&e.every(ne)||te(e)&&!e)return{type:r,message:ne(e)?e:"",ref:t}}var ye=e=>u(e)&&!oe(e)?e:{value:e,message:""},ge=async(e,t,r,s,n)=>{const{ref:o,refs:l,required:c,maxLength:d,minLength:y,min:g,max:h,pattern:p,validate:_,name:v,valueAsNumber:b,mount:A,disabled:C}=e._f,E=m(t,v);if(!A||C)return{};const O=l?l[0]:o,j=e=>{s&&O.reportValidity&&(O.setCustomValidity(te(e)?"":e||""),O.reportValidity())},N={},B=ie(o),L=a(o),T=B||L,R=(b||re(o))&&f(o.value)&&f(E)||ae(o)&&""===o.value||""===E||Array.isArray(E)&&!E.length,q=H.bind(null,v,r,N),I=(e,t,r,s=F,a=w)=>{const n=e?t:r;N[v]={type:e?s:a,message:n,ref:o,...q(e?s:a,n)}};if(n?!Array.isArray(E)||!E.length:c&&(!T&&(R||i(E))||te(E)&&!E||L&&!ce(l).isValid||B&&!fe(l).isValid)){const{value:e,message:t}=ne(c)?{value:!!c,message:c}:ye(c);if(e&&(N[v]={type:k,message:t,ref:O,...q(k,t)},!r))return j(t),N}if(!R&&(!i(g)||!i(h))){let e,t;const s=ye(h),a=ye(g);if(i(E)||isNaN(E)){const r=o.valueAsDate||new Date(E),n=e=>new Date((new Date).toDateString()+" "+e),i="time"==o.type,u="week"==o.type;M(s.value)&&E&&(e=i?n(E)>n(s.value):u?E>s.value:r>new Date(s.value)),M(a.value)&&E&&(t=i?n(E)<n(a.value):u?E<a.value:r<new Date(a.value))}else{const r=o.valueAsNumber||(E?+E:E);i(s.value)||(e=r>s.value),i(a.value)||(t=r<a.value)}if((e||t)&&(I(!!e,s.message,a.message,V,x),!r))return j(N[v].message),N}if((d||y)&&!R&&(M(E)||n&&Array.isArray(E))){const e=ye(d),t=ye(y),s=!i(e.value)&&E.length>e.value,a=!i(t.value)&&E.length<t.value;if((s||a)&&(I(s,e.message,t.message),!r))return j(N[v].message),N}if(p&&!R&&M(E)){const{value:e,message:t}=ye(p);if(oe(e)&&!E.match(e)&&(N[v]={type:S,message:t,ref:o,...q(S,t)},!r))return j(t),N}if(_)if(se(_)){const e=me(await _(E,t),O);if(e&&(N[v]={...e,...q(D,e.message)},!r))return j(e.message),N}else if(u(_)){let e={};for(const s in _){if(!U(e)&&!r)break;const a=me(await _[s](E,t),O,s);a&&(e={...a,...q(s,a.message)},j(a.message),r&&(N[v]=e))}if(!U(e)&&(N[v]={ref:O,...e},!r))return N}return j(!0),N};function he(e,t){return[...e,...B(t)]}var pe=e=>Array.isArray(e)?e.map((()=>{})):void 0;function _e(e,t,r){return[...e.slice(0,t),...B(r),...e.slice(t)]}var ve=(e,t,r)=>Array.isArray(e)?(f(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[];function be(e,t){return[...B(t),...B(e)]}var Ae=(e,t)=>f(t)?[]:function(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return d(s).length?s:[]}(e,B(t).sort(((e,t)=>e-t))),Ve=(e,t,r)=>{e[t]=[e[r],e[r]=e[t]][0]};function xe(e,t){const r=Array.isArray(t)?t:G(t)?[t]:K(t),s=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;)e=f(e)?s++:e[t[s++]];return e}(e,r),a=r.length-1,n=r[a];return s&&delete s[n],0!==a&&(u(s)&&U(s)||Array.isArray(s)&&function(e){for(const t in e)if(!f(e[t]))return!1;return!0}(s))&&xe(e,r.slice(0,-1)),e}var Fe=(e,t,r)=>(e[t]=r,e);function we(e){const t=E(),{control:r=t.control,name:a,keyName:n="id",shouldUnregister:i}=e,[o,u]=s.useState(r._getFieldArray(a)),l=s.useRef(r._getFieldArray(a).map(J)),c=s.useRef(o),d=s.useRef(a),f=s.useRef(!1);d.current=a,c.current=o,r._names.array.add(a),e.rules&&r.register(a,e.rules),T({next:({values:e,name:t})=>{if(t===d.current||!t){const t=m(e,d.current);Array.isArray(t)&&(u(t),l.current=t.map(J))}},subject:r._subjects.array});const y=s.useCallback((e=>{f.current=!0,r._updateFieldArray(a,e)}),[r,a]);return s.useEffect((()=>{if(r._stateFlags.action=!1,Z(a,r._names)&&r._subjects.state.next({}),f.current&&(!Y(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([a]).then((e=>{const t=m(e.errors,a),s=m(r._formState.errors,a);(s?!t&&s.type:t&&t.type)&&(t?Q(r._formState.errors,a,t):xe(r._formState.errors,a),r._subjects.state.next({errors:r._formState.errors}))}));else{const e=m(r._fields,a);e&&e._f&&ge(e,r._formValues,r._options.criteriaMode===A,r._options.shouldUseNativeValidation,!0).then((e=>!U(e)&&r._subjects.state.next({errors:ee(r._formState.errors,e,a)})))}r._subjects.watch.next({name:a,values:r._formValues}),r._names.focus&&z(r._fields,(e=>!!e&&e.startsWith(r._names.focus||""))),r._names.focus="",r._updateValid()}),[o,a,r]),s.useEffect((()=>(!m(r._formValues,a)&&r._updateFieldArray(a),()=>{(r._options.shouldUnregister||i)&&r.unregister(a)})),[a,r,n,i]),{swap:s.useCallback(((e,t)=>{const s=r._getFieldArray(a);Ve(s,e,t),Ve(l.current,e,t),y(s),u(s),r._updateFieldArray(a,s,Ve,{argA:e,argB:t},!1)}),[y,a,r]),move:s.useCallback(((e,t)=>{const s=r._getFieldArray(a);ve(s,e,t),ve(l.current,e,t),y(s),u(s),r._updateFieldArray(a,s,ve,{argA:e,argB:t},!1)}),[y,a,r]),prepend:s.useCallback(((e,t)=>{const s=B(I(e)),n=be(r._getFieldArray(a),s);r._names.focus=X(a,0,t),l.current=be(l.current,s.map(J)),y(n),u(n),r._updateFieldArray(a,n,be,{argA:pe(e)})}),[y,a,r]),append:s.useCallback(((e,t)=>{const s=B(I(e)),n=he(r._getFieldArray(a),s);r._names.focus=X(a,n.length-1,t),l.current=he(l.current,s.map(J)),y(n),u(n),r._updateFieldArray(a,n,he,{argA:pe(e)})}),[y,a,r]),remove:s.useCallback((e=>{const t=Ae(r._getFieldArray(a),e);l.current=Ae(l.current,e),y(t),u(t),r._updateFieldArray(a,t,Ae,{argA:e})}),[y,a,r]),insert:s.useCallback(((e,t,s)=>{const n=B(I(t)),i=_e(r._getFieldArray(a),e,n);r._names.focus=X(a,e,s),l.current=_e(l.current,e,n.map(J)),y(i),u(i),r._updateFieldArray(a,i,_e,{argA:e,argB:pe(t)})}),[y,a,r]),update:s.useCallback(((e,t)=>{const s=I(t),n=Fe(r._getFieldArray(a),e,s);l.current=[...n].map(((t,r)=>t&&r!==e?l.current[r]:J())),y(n),u([...n]),r._updateFieldArray(a,n,Fe,{argA:e,argB:s},!0,!1)}),[y,a,r]),replace:s.useCallback((e=>{const t=B(I(e));l.current=t.map(J),y([...t]),u([...t]),r._updateFieldArray(a,[...t],(e=>e),{},!0,!1)}),[y,a,r]),fields:s.useMemo((()=>o.map(((e,t)=>({...e,[n]:l.current[t]||J()})))),[o,n])}}function Se(){let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var ke=e=>i(e)||!o(e);function De(e,t){if(ke(e)||ke(t))return e===t;if(n(e)&&n(t))return e.getTime()===t.getTime();const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(const a of r){const r=e[a];if(!s.includes(a))return!1;if("ref"!==a){const e=t[a];if(n(r)&&n(e)||u(r)&&u(e)||Array.isArray(r)&&Array.isArray(e)?!De(r,e):r!==e)return!1}}return!0}var Ce=e=>"select-multiple"===e.type,Ee=e=>ae(e)&&e.isConnected,Oe=e=>{for(const t in e)if(se(e[t]))return!0;return!1};function je(e,t={}){const r=Array.isArray(e);if(u(e)||r)for(const s in e)Array.isArray(e[s])||u(e[s])&&!Oe(e[s])?(t[s]=Array.isArray(e[s])?[]:{},je(e[s],t[s])):i(e[s])||(t[s]=!0);return t}function Ue(e,t,r){const s=Array.isArray(e);if(u(e)||s)for(const a in e)Array.isArray(e[a])||u(e[a])&&!Oe(e[a])?f(t)||ke(r[a])?r[a]=Array.isArray(e[a])?je(e[a],[]):{...je(e[a])}:Ue(e[a],i(t)?{}:t[a],r[a]):De(e[a],t[a])?delete r[a]:r[a]=!0;return r}var Ne=(e,t)=>Ue(e,t,je(t)),Be=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:s})=>f(e)?e:t?""===e?NaN:e?+e:e:r&&M(e)?new Date(e):s?s(e):e;function Le(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return re(t)?t.files:ie(t)?fe(e.refs).value:Ce(t)?[...t.selectedOptions].map((({value:e})=>e)):a(t)?ce(e.refs).value:Be(f(t.value)?e.ref.value:t.value,e)}var Te=e=>f(e)?e:oe(e)?e.source:u(e)?oe(e.value)?e.value.source:e.value:e;function Me(e,t,r){const s=m(e,r);if(s||G(r))return{error:s,name:r};const a=r.split(".");for(;a.length;){const s=a.join("."),n=m(t,s),i=m(e,s);if(n&&!Array.isArray(n)&&r!==s)return{name:r};
1if(i&&i.type)return{name:s,error:i};a.pop()}return{name:r}}const Re={mode:v,reValidateMode:_,shouldFocusError:!0};function qe(e={},t){let r={...Re,...e};const s=e.resetOptions&&e.resetOptions.keepDirtyValues;let o,h={submitCount:0,isDirty:!1,isLoading:!0,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},p={},_=u(r.defaultValues)&&I(r.defaultValues)||{},v=r.shouldUnregister?{}:I(_),b={action:!1,mount:!1,watch:!1},V={mount:new Set,unMount:new Set,array:new Set,watch:new Set},x=0;const F={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},w={watch:Se(),array:Se(),state:Se()},S=Y(r.mode),k=Y(r.reValidateMode),D=r.criteriaMode===A,C=async e=>{if(F.isValid||e){const e=r.resolver?U((await L()).errors):await T(p,!0);e!==h.isValid&&(h.isValid=e,w.state.next({isValid:e}))}},E=e=>F.isValidating&&w.state.next({isValidating:e}),O=(e,t,r,s)=>{const a=m(p,e);if(a){const n=m(v,e,f(r)?m(_,e):r);f(n)||s&&s.defaultChecked||t?Q(v,e,t?n:Le(a._f)):$(e,n),b.mount&&C()}},j=(e,t,r,s,a)=>{let n=!1,i=!1;const o={name:e};if(!r||s){F.isDirty&&(i=h.isDirty,h.isDirty=o.isDirty=P(),n=i!==o.isDirty);const r=De(m(_,e),t);i=m(h.dirtyFields,e),r?xe(h.dirtyFields,e):Q(h.dirtyFields,e,!0),o.dirtyFields=h.dirtyFields,n=n||F.dirtyFields&&i!==!r}if(r){const t=m(h.touchedFields,e);t||(Q(h.touchedFields,e,r),o.touchedFields=h.touchedFields,n=n||F.touchedFields&&t!==r)}return n&&a&&w.state.next(o),n?o:{}},N=(t,r,s,a)=>{const n=m(h.errors,t),i=F.isValid&&te(r)&&h.isValid!==r;var u;if(e.delayError&&s?(u=()=>((e,t)=>{Q(h.errors,e,t),w.state.next({errors:h.errors})})(t,s),o=e=>{clearTimeout(x),x=window.setTimeout(u,e)},o(e.delayError)):(clearTimeout(x),o=null,s?Q(h.errors,t,s):xe(h.errors,t)),(s?!De(n,s):n)||!U(a)||i){const e={...a,...i&&te(r)?{isValid:r}:{},errors:h.errors,name:t};h={...h,...e},w.state.next(e)}E(!1)},L=async e=>await r.resolver(v,r.context,((e,t,r,s)=>{const a={};for(const n of e){const e=m(t,n);e&&Q(a,n,e._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:s}})(e||V.mount,p,r.criteriaMode,r.shouldUseNativeValidation)),T=async(e,t,s={valid:!0})=>{for(const a in e){const n=e[a];if(n){const{_f:e,...a}=n;if(e){const a=V.array.has(e.name),i=await ge(n,v,D,r.shouldUseNativeValidation,a);if(i[e.name]&&(s.valid=!1,t))break;!t&&(m(i,e.name)?a?ee(h.errors,i,e.name):Q(h.errors,e.name,i[e.name]):xe(h.errors,e.name))}a&&await T(a,t,s)}}return s.valid},P=(e,t)=>(e&&t&&Q(v,e,t),!De(X(),_)),W=(e,t,r)=>R(e,V,{...b.mount?v:f(t)?_:M(e)?{[e]:t}:t},r,t),$=(e,t,r={})=>{const s=m(p,e);let n=t;if(s){const r=s._f;r&&(!r.disabled&&Q(v,e,Be(t,r)),n=ae(r.ref)&&i(t)?"":t,Ce(r.ref)?[...r.ref.options].forEach((e=>e.selected=n.includes(e.value))):r.refs?a(r.ref)?r.refs.length>1?r.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(n)?!!n.find((t=>t===e.value)):n===e.value))):r.refs[0]&&(r.refs[0].checked=!!n):r.refs.forEach((e=>e.checked=e.value===n)):re(r.ref)?r.ref.value="":(r.ref.value=n,r.ref.type||w.watch.next({name:e})))}(r.shouldDirty||r.shouldTouch)&&j(e,n,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&J(e)},H=(e,t,r)=>{for(const s in t){const a=t[s],i=`${e}.${s}`,o=m(p,i);!V.array.has(e)&&ke(a)&&(!o||o._f)||n(a)?$(i,a,r):H(i,a,r)}},G=(e,r,s={})=>{const a=m(p,e),n=V.array.has(e),o=I(r);Q(v,e,o),n?(w.array.next({name:e,values:v}),(F.isDirty||F.dirtyFields)&&s.shouldDirty&&(h.dirtyFields=Ne(_,v),w.state.next({name:e,dirtyFields:h.dirtyFields,isDirty:P(e,o)}))):!a||a._f||i(o)?$(e,o,s):H(e,o,s),Z(e,V)&&w.state.next({}),w.watch.next({name:e}),!b.mount&&t()},K=async e=>{const t=e.target;let s=t.name;const a=m(p,s);if(a){let i,u;const c=t.type?Le(a._f):l(e),d=e.type===y||e.type===g,f=!((n=a._f).mount&&(n.required||n.min||n.max||n.maxLength||n.minLength||n.pattern||n.validate))&&!r.resolver&&!m(h.errors,s)&&!a._f.deps||((e,t,r,s,a)=>!a.isOnAll&&(!r&&a.isOnTouch?!(t||e):(r?s.isOnBlur:a.isOnBlur)?!e:!(r?s.isOnChange:a.isOnChange)||e))(d,m(h.touchedFields,s),h.isSubmitted,k,S),_=Z(s,V,d);Q(v,s,c),d?(a._f.onBlur&&a._f.onBlur(e),o&&o(0)):a._f.onChange&&a._f.onChange(e);const b=j(s,c,d,!1),A=!U(b)||_;if(!d&&w.watch.next({name:s,type:e.type}),f)return F.isValid&&C(),A&&w.state.next({name:s,..._?{}:b});if(!d&&_&&w.state.next({}),E(!0),r.resolver){const{errors:e}=await L([s]),t=Me(h.errors,p,s),r=Me(e,p,t.name||s);i=r.error,s=r.name,u=U(e)}else i=(await ge(a,v,D,r.shouldUseNativeValidation))[s],i?u=!1:F.isValid&&
vendor: 4,686 bytes, line 1
1(u=await T(p,!0));a._f.deps&&J(a._f.deps),N(s,u,i,b)}var n},J=async(e,t={})=>{let s,a;const n=B(e);if(E(!0),r.resolver){const t=await(async e=>{const{errors:t}=await L();if(e)for(const r of e){const e=m(t,r);e?Q(h.errors,r,e):xe(h.errors,r)}else h.errors=t;return t})(f(e)?e:n);s=U(t),a=e?!n.some((e=>m(t,e))):s}else e?(a=(await Promise.all(n.map((async e=>{const t=m(p,e);return await T(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||h.isValid)&&C()):a=s=await T(p);return w.state.next({...!M(e)||F.isValid&&s!==h.isValid?{}:{name:e},...r.resolver||!e?{isValid:s}:{},errors:h.errors,isValidating:!1}),t.shouldFocus&&!a&&z(p,(e=>e&&m(h.errors,e)),e?n:V.mount),a},X=e=>{const t={..._,...b.mount?v:{}};return f(e)?t:M(e)?m(t,e):e.map((e=>m(t,e)))},ne=(e,t)=>({invalid:!!m((t||h).errors,e),isDirty:!!m((t||h).dirtyFields,e),isTouched:!!m((t||h).touchedFields,e),error:m((t||h).errors,e)}),oe=(e,t={})=>{for(const s of e?B(e):V.mount)V.mount.delete(s),V.array.delete(s),m(p,s)&&(t.keepValue||(xe(p,s),xe(v,s)),!t.keepError&&xe(h.errors,s),!t.keepDirty&&xe(h.dirtyFields,s),!t.keepTouched&&xe(h.touchedFields,s),!r.shouldUnregister&&!t.keepDefaultValue&&xe(_,s));w.watch.next({}),w.state.next({...h,...t.keepDirty?{isDirty:P()}:{}}),!t.keepIsValid&&C()},ue=(e,t={})=>{let s=m(p,e);const n=te(t.disabled);return Q(p,e,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:e}},name:e,mount:!0,...t}}),V.mount.add(e),s?n&&Q(v,e,t.disabled?void 0:m(v,e,Le(s._f))):O(e,!0,t.value),{...n?{disabled:t.disabled}:{},...r.shouldUseNativeValidation?{required:!!t.required,min:Te(t.min),max:Te(t.max),minLength:Te(t.minLength),maxLength:Te(t.maxLength),pattern:Te(t.pattern)}:{},name:e,onChange:K,onBlur:K,ref:n=>{if(n){ue(e,t),s=m(p,e);const r=f(n.value)&&n.querySelectorAll&&n.querySelectorAll("input,select,textarea")[0]||n,i=(e=>ie(e)||a(e))(r),o=s._f.refs||[];if(i?o.find((e=>e===r)):r===s._f.ref)return;Q(p,e,{_f:{...s._f,...i?{refs:[...o.filter(Ee),r,...Array.isArray(m(_,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),O(e,!1,void 0,r)}else s=m(p,e,{}),s._f&&(s._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!c(V.array,e)||!b.action)&&V.unMount.add(e)}}},le=()=>r.shouldFocusError&&z(p,(e=>e&&m(h.errors,e)),V.mount),ce=(r,a={})=>{const n=r||_,i=I(n),o=r&&!U(r)?i:_;if(a.keepDefaultValues||(_=n),!a.keepValues){if(a.keepDirtyValues||s)for(const e of V.mount)m(h.dirtyFields,e)?Q(o,e,m(v,e)):G(e,m(o,e));else{if(q&&f(r))for(const e of V.mount){const t=m(p,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(ae(e)){const t=e.closest("form");if(t){t.reset();break}}}}p={}}v=e.shouldUnregister?a.keepDefaultValues?I(_):{}:i,w.array.next({values:o}),w.watch.next({values:o})}V={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!b.mount&&t(),b.mount=!F.isValid||!!a.keepIsValid,b.watch=!!e.shouldUnregister,w.state.next({submitCount:a.keepSubmitCount?h.submitCount:0,isDirty:a.keepDirty||a.keepDirtyValues?h.isDirty:!(!a.keepDefaultValues||De(r,_)),isSubmitted:!!a.keepIsSubmitted&&h.isSubmitted,dirtyFields:a.keepDirty||a.keepDirtyValues?h.dirtyFields:a.keepDefaultValues&&r?Ne(_,r):{},touchedFields:a.keepTouched?h.touchedFields:{},errors:a.keepErrors?h.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},de=(e,t)=>ce(se(e)?e(v):e,t);return se(r.defaultValues)&&r.defaultValues().then((e=>{de(e,r.resetOptions),w.state.next({isLoading:!1})})),{control:{register:ue,unregister:oe,getFieldState:ne,_executeSchema:L,_focusError:le,_getWatch:W,_getDirty:P,_updateValid:C,_removeUnmounted:()=>{for(const e of V.unMount){const t=m(p,e);t&&(t._f.refs?t._f.refs.every((e=>!Ee(e))):!Ee(t._f.ref))&&oe(e)}V.unMount=new Set},_updateFieldArray:(e,t=[],r,s,a=!0,n=!0)=>{if(s&&r){if(b.action=!0,n&&Array.isArray(m(p,e))){const t=r(m(p,e),s.argA,s.argB);a&&Q(p,e,t)}if(n&&Array.isArray(m(h.errors,e))){const t=r(m(h.errors,e),s.argA,s.argB);a&&Q(h.errors,e,t),((e,t)=>{!d(m(e,t)).length&&xe(e,t)})(h.errors,e)}if(F.touchedFields&&n&&Array.isArray(m(h.touchedFields,e))){const t=r(m(h.touchedFields,e),s.argA,s.argB);a&&Q(h.touchedFields,e,t)}F.dirtyFields&&(h.dirtyFields=Ne(_,v)),w.state.next({name:e,isDirty:P(e,t),dirtyFields:h.dirtyFields,errors:h.errors,isValid:h.isValid})}else Q(v,e,t)},_getFieldArray:t=>d(m(b.mount?v:_,t,e.shouldUnregister?m(_,t,[]):[])),_reset:ce,_updateFormState:e=>{h={...h,...e}},_subjects:w,_proxyFormState:F,get _fields(){return p},get _formValues(){return v},get _stateFlags(){return b},set _stateFlags(e){b=e},get _defaultValues(){return _},get _names(){return V},set _names(e){V=e},get _formState(){return h},set _formState(e){h=e},get _options(){return r},set _options(e){r={...r,...e}}},trigger:J,register:ue,handleSubmit:(e,t)=>
1async s=>{s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let a=I(v);if(w.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await L();h.errors=e,a=t}else await T(p);U(h.errors)?(w.state.next({errors:{}}),await e(a,s)):(t&&await t({...h.errors},s),le()),w.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:U(h.errors),submitCount:h.submitCount+1,errors:h.errors})},watch:(e,t)=>se(e)?w.watch.subscribe({next:r=>e(W(void 0,t),r)}):W(e,t,!0),setValue:G,getValues:X,reset:de,resetField:(e,t={})=>{m(p,e)&&(f(t.defaultValue)?G(e,m(_,e)):(G(e,t.defaultValue),Q(_,e,t.defaultValue)),t.keepTouched||xe(h.touchedFields,e),t.keepDirty||(xe(h.dirtyFields,e),h.isDirty=t.defaultValue?P(e,m(_,e)):P()),t.keepError||(xe(h.errors,e),F.isValid&&C()),w.state.next({...h}))},clearErrors:e=>{e?B(e).forEach((e=>xe(h.errors,e))):h.errors={},w.state.next({errors:h.errors})},unregister:oe,setError:(e,t,r)=>{const s=(m(p,e,{_f:{}})._f||{}).ref;Q(h.errors,e,{...t,ref:s}),w.state.next({name:e,errors:h.errors,isValid:!1}),r&&r.shouldFocus&&s&&s.focus&&s.focus()},setFocus:(e,t={})=>{const r=m(p,e),s=r&&r._f;if(s){const e=s.refs?s.refs[0]:s.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:ne}}function Ie(e={}){const t=s.useRef(),[r,a]=s.useState({isDirty:!1,isValidating:!1,isLoading:!0,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:se(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...qe(e,(()=>a((e=>({...e}))))),formState:r});const n=t.current.control;return n._options=e,T({subject:n._subjects.state,next:e=>{N(e,n._proxyFormState,n._updateFormState,!0)&&a({...n._formState})}}),s.useEffect((()=>{n._stateFlags.mount||(n._updateValid(),n._stateFlags.mount=!0),n._stateFlags.watch&&(n._stateFlags.watch=!1,n._subjects.state.next({})),n._removeUnmounted()})),s.useEffect((()=>{e.values&&!De(e.values,n._defaultValues)&&n._reset(e.values,n._options.resetOptions)}),[e.values,n]),s.useEffect((()=>{r.submitCount&&n._focusError()}),[n,r.submitCount]),t.current.formState=j(r,n),t.current}}}]);

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.