Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

smartstepper

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartstepper - npm Package Compare versions

Comparing version 1.0.83 to 1.9.0

2

index.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),le=require("react/jsx-runtime");var fe=e=>e.type==="checkbox",ue=e=>e instanceof Date,N=e=>e==null;const nt=e=>typeof e=="object";var L=e=>!N(e)&&!Array.isArray(e)&&nt(e)&&!ue(e),ut=e=>L(e)&&e.target?fe(e.target)?e.target.checked:e.target.value:e,Et=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,lt=(e,i)=>e.has(Et(i)),kt=e=>{const i=e.constructor&&e.constructor.prototype;return L(i)&&i.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function K(e){let i;const r=Array.isArray(e);if(e instanceof Date)i=new Date(e);else if(e instanceof Set)i=new Set(e);else if(!(Re&&(e instanceof Blob||e instanceof FileList))&&(r||L(e)))if(i=r?[]:{},!r&&!kt(e))i=e;else for(const s in e)e.hasOwnProperty(s)&&(i[s]=K(e[s]));else return e;return i}var de=e=>Array.isArray(e)?e.filter(Boolean):[],T=e=>e===void 0,d=(e,i,r)=>{if(!i||!L(e))return r;const s=de(i.split(/[,[\].]+?/)).reduce((n,a)=>N(n)?n:n[a],e);return T(s)||s===e?T(e[i])?r:e[i]:s},z=e=>typeof e=="boolean";const Ve={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},G={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},X={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ct=b.createContext(null),Le=()=>b.useContext(Ct);var at=(e,i,r,s=!0)=>{const n={defaultValues:i._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const c=a;return i._proxyFormState[c]!==G.all&&(i._proxyFormState[c]=!s||G.all),r&&(r[c]=!0),e[c]}});return n},W=e=>L(e)&&!Object.keys(e).length,ot=(e,i,r,s)=>{r(e);const{name:n,...a}=e;return W(a)||Object.keys(a).length>=Object.keys(i).length||Object.keys(a).find(c=>i[c]===(!s||G.all))},ge=e=>Array.isArray(e)?e:[e],ct=(e,i,r)=>!e||!i||e===i||ge(e).some(s=>s&&(r?s===i:s.startsWith(i)||i.startsWith(s)));function Ue(e){const i=b.useRef(e);i.current=e,b.useEffect(()=>{const r=!e.disabled&&i.current.subject&&i.current.subject.subscribe({next:i.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function Tt(e){const i=Le(),{control:r=i.control,disabled:s,name:n,exact:a}=e||{},[c,V]=b.useState(r._formState),_=b.useRef(!0),F=b.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),w=b.useRef(n);return w.current=n,Ue({disabled:s,next:x=>_.current&&ct(w.current,x.name,a)&&ot(x,F.current,r._updateFormState)&&V({...r._formState,...x}),subject:r._subjects.state}),b.useEffect(()=>(_.current=!0,F.current.isValid&&r._updateValid(!0),()=>{_.current=!1}),[r]),at(c,r,F.current,!1)}var J=e=>typeof e=="string",ft=(e,i,r,s,n)=>J(e)?(s&&i.watch.add(e),d(r,e,n)):Array.isArray(e)?e.map(a=>(s&&i.watch.add(a),d(r,a))):(s&&(i.watchAll=!0),r);function Ot(e){const i=Le(),{control:r=i.control,name:s,defaultValue:n,disabled:a,exact:c}=e||{},V=b.useRef(s);V.current=s,Ue({disabled:a,subject:r._subjects.values,next:w=>{ct(V.current,w.name,c)&&F(K(ft(V.current,r._names,w.values||r._formValues,!1,n)))}});const[_,F]=b.useState(r._getWatch(s,n));return b.useEffect(()=>r._removeUnmounted()),_}var Me=e=>/^\w*$/.test(e),dt=e=>de(e.replace(/["|']|\]/g,"").split(/\.|\[/));function E(e,i,r){let s=-1;const n=Me(i)?[i]:dt(i),a=n.length,c=a-1;for(;++s<a;){const V=n[s];let _=r;if(s!==c){const F=e[V];_=L(F)||Array.isArray(F)?F:isNaN(+n[s+1])?{}:[]}e[V]=_,e=e[V]}return e}function Pe(e){const i=Le(),{name:r,disabled:s,control:n=i.control,shouldUnregister:a}=e,c=lt(n._names.array,r),V=Ot({control:n,name:r,defaultValue:d(n._formValues,r,d(n._defaultValues,r,e.defaultValue)),exact:!0}),_=Tt({control:n,name:r}),F=b.useRef(n.register(r,{...e.rules,value:V}));return F.current=n.register(r,e.rules),b.useEffect(()=>{const w=n._options.shouldUnregister||a,x=(g,B)=>{const C=d(n._fields,g);C&&(C._f.mount=B)};if(x(r,!0),w){const g=K(d(n._options.defaultValues,r));E(n._defaultValues,r,g),T(d(n._formValues,r))&&E(n._formValues,r,g)}return()=>{(c?w&&!n._state.action:w)?n.unregister(r):x(r,!1)}},[r,n,c,a]),b.useEffect(()=>{d(n._fields,r)&&n._updateDisabledField({disabled:s,fields:n._fields,name:r,value:d(n._fields,r)._f.value})},[s,r,n]),{field:{name:r,value:V,...z(s)||z(_.disabled)?{disabled:_.disabled||s}:{},onChange:b.useCallback(w=>F.current.onChange({target:{value:ut(w),name:r},type:Ve.CHANGE}),[r]),onBlur:b.useCallback(()=>F.current.onBlur({target:{value:d(n._formValues,r),name:r},type:Ve.BLUR}),[r,n]),ref:w=>{const x=d(n._fields,r);x&&w&&(x._f.ref={focus:()=>w.focus(),select:()=>w.select(),setCustomValidity:g=>w.setCustomValidity(g),reportValidity:()=>w.reportValidity()})}},formState:_,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!d(_.errors,r)},isDirty:{enumerable:!0,get:()=>!!d(_.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!d(_.touchedFields,r)},error:{enumerable:!0,get:()=>d(_.errors,r)}})}}const Rt=e=>e.render(Pe(e));var Lt=(e,i,r,s,n)=>i?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:n||!0}}:{},Xe=e=>({isOnSubmit:!e||e===G.onSubmit,isOnBlur:e===G.onBlur,isOnChange:e===G.onChange,isOnAll:e===G.all,isOnTouch:e===G.onTouched}),Ye=(e,i,r)=>!r&&(i.watchAll||i.watch.has(e)||[...i.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const ve=(e,i,r,s)=>{for(const n of r||Object.keys(e)){const a=d(e,n);if(a){const{_f:c,...V}=a;if(c){if(c.refs&&c.refs[0]&&i(c.refs[0],n)&&!s)break;if(c.ref&&i(c.ref,c.name)&&!s)break}else L(V)&&ve(V,i)}}};var Ut=(e,i,r)=>{const s=de(d(e,r));return E(s,"root",i[r]),E(e,r,s),e},Be=e=>e.type==="file",te=e=>typeof e=="function",be=e=>{if(!Re)return!1;const i=e?e.ownerDocument:0;return e instanceof(i&&i.defaultView?i.defaultView.HTMLElement:HTMLElement)},_e=e=>J(e),Ne=e=>e.type==="radio",Se=e=>e instanceof RegExp;const Ze={value:!1,isValid:!1},et={value:!0,isValid:!0};var yt=e=>{if(Array.isArray(e)){if(e.length>1){const i=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:i,isValid:!!i.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!T(e[0].attributes.value)?T(e[0].value)||e[0].value===""?et:{value:e[0].value,isValid:!0}:et:Ze}return Ze};const tt={isValid:!1,value:null};var ht=e=>Array.isArray(e)?e.reduce((i,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:i,tt):tt;function rt(e,i,r="validate"){if(_e(e)||Array.isArray(e)&&e.every(_e)||z(e)&&!e)return{type:r,message:_e(e)?e:"",ref:i}}var ne=e=>L(e)&&!Se(e)?e:{value:e,message:""},st=async(e,i,r,s,n)=>{const{ref:a,refs:c,required:V,maxLength:_,minLength:F,min:w,max:x,pattern:g,validate:B,name:C,valueAsNumber:Y,mount:Z,disabled:se}=e._f,S=d(i,C);if(!Z||se)return{};const U=c?c[0]:a,I=m=>{s&&U.reportValidity&&(U.setCustomValidity(z(m)?"":m||""),U.reportValidity())},O={},j=Ne(a),ee=fe(a),ae=j||ee,q=(Y||Be(a))&&T(a.value)&&T(S)||be(a)&&a.value===""||S===""||Array.isArray(S)&&!S.length,Q=Lt.bind(null,C,r,O),H=(m,h,p,A=X.maxLength,k=X.minLength)=>{const P=m?h:p;O[C]={type:m?A:k,message:P,ref:a,...Q(m?A:k,P)}};if(n?!Array.isArray(S)||!S.length:V&&(!ae&&(q||N(S))||z(S)&&!S||ee&&!yt(c).isValid||j&&!ht(c).isValid)){const{value:m,message:h}=_e(V)?{value:!!V,message:V}:ne(V);if(m&&(O[C]={type:X.required,message:h,ref:U,...Q(X.required,h)},!r))return I(h),O}if(!q&&(!N(w)||!N(x))){let m,h;const p=ne(x),A=ne(w);if(!N(S)&&!isNaN(S)){const k=a.valueAsNumber||S&&+S;N(p.value)||(m=k>p.value),N(A.value)||(h=k<A.value)}else{const k=a.valueAsDate||new Date(S),P=ye=>new Date(new Date().toDateString()+" "+ye),$=a.type=="time",oe=a.type=="week";J(p.value)&&S&&(m=$?P(S)>P(p.value):oe?S>p.value:k>new Date(p.value)),J(A.value)&&S&&(h=$?P(S)<P(A.value):oe?S<A.value:k<new Date(A.value))}if((m||h)&&(H(!!m,p.message,A.message,X.max,X.min),!r))return I(O[C].message),O}if((_||F)&&!q&&(J(S)||n&&Array.isArray(S))){const m=ne(_),h=ne(F),p=!N(m.value)&&S.length>+m.value,A=!N(h.value)&&S.length<+h.value;if((p||A)&&(H(p,m.message,h.message),!r))return I(O[C].message),O}if(g&&!q&&J(S)){const{value:m,message:h}=ne(g);if(Se(m)&&!S.match(m)&&(O[C]={type:X.pattern,message:h,ref:a,...Q(X.pattern,h)},!r))return I(h),O}if(B){if(te(B)){const m=await B(S,i),h=rt(m,U);if(h&&(O[C]={...h,...Q(X.validate,h.message)},!r))return I(h.message),O}else if(L(B)){let m={};for(const h in B){if(!W(m)&&!r)break;const p=rt(await B[h](S,i),U,h);p&&(m={...p,...Q(h,p.message)},I(p.message),r&&(O[C]=m))}if(!W(m)&&(O[C]={ref:U,...m},!r))return O}}return I(!0),O};function Mt(e,i){const r=i.slice(0,-1).length;let s=0;for(;s<r;)e=T(e)?s++:e[i[s++]];return e}function Pt(e){for(const i in e)if(e.hasOwnProperty(i)&&!T(e[i]))return!1;return!0}function M(e,i){const r=Array.isArray(i)?i:Me(i)?[i]:dt(i),s=r.length===1?e:Mt(e,r),n=r.length-1,a=r[n];return s&&delete s[a],n!==0&&(L(s)&&W(s)||Array.isArray(s)&&Pt(s))&&M(e,r.slice(0,-1)),e}function Ee(){let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}}var pe=e=>N(e)||!nt(e);function re(e,i){if(pe(e)||pe(i))return e===i;if(ue(e)&&ue(i))return e.getTime()===i.getTime();const r=Object.keys(e),s=Object.keys(i);if(r.length!==s.length)return!1;for(const n of r){const a=e[n];if(!s.includes(n))return!1;if(n!=="ref"){const c=i[n];if(ue(a)&&ue(c)||L(a)&&L(c)||Array.isArray(a)&&Array.isArray(c)?!re(a,c):a!==c)return!1}}return!0}var gt=e=>e.type==="select-multiple",Bt=e=>Ne(e)||fe(e),ke=e=>be(e)&&e.isConnected,vt=e=>{for(const i in e)if(te(e[i]))return!0;return!1};function me(e,i={}){const r=Array.isArray(e);if(L(e)||r)for(const s in e)Array.isArray(e[s])||L(e[s])&&!vt(e[s])?(i[s]=Array.isArray(e[s])?[]:{},me(e[s],i[s])):N(e[s])||(i[s]=!0);return i}function _t(e,i,r){const s=Array.isArray(e);if(L(e)||s)for(const n in e)Array.isArray(e[n])||L(e[n])&&!vt(e[n])?T(i)||pe(r[n])?r[n]=Array.isArray(e[n])?me(e[n],[]):{...me(e[n])}:_t(e[n],N(i)?{}:i[n],r[n]):r[n]=!re(e[n],i[n]);return r}var Ce=(e,i)=>_t(e,i,me(i)),Vt=(e,{valueAsNumber:i,valueAsDate:r,setValueAs:s})=>T(e)?e:i?e===""?NaN:e&&+e:r&&J(e)?new Date(e):s?s(e):e;function Te(e){const i=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):i.disabled))return Be(i)?i.files:Ne(i)?ht(e.refs).value:gt(i)?[...i.selectedOptions].map(({value:r})=>r):fe(i)?yt(e.refs).value:Vt(T(i.value)?e.ref.value:i.value,e)}var Nt=(e,i,r,s)=>{const n={};for(const a of e){const c=d(i,a);c&&E(n,a,c._f)}return{criteriaMode:r,names:[...e],fields:n,shouldUseNativeValidation:s}},ce=e=>T(e)?e:Se(e)?e.source:L(e)?Se(e.value)?e.value.source:e.value:e,It=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function it(e,i,r){const s=d(e,r);if(s||Me(r))return{error:s,name:r};const n=r.split(".");for(;n.length;){const a=n.join("."),c=d(i,a),V=d(e,a);if(c&&!Array.isArray(c)&&r!==a)return{name:r};if(V&&V.type)return{name:a,error:V};n.pop()}return{name:r}}var jt=(e,i,r,s,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(i||e):(r?s.isOnBlur:n.isOnBlur)?!e:(r?s.isOnChange:n.isOnChange)?e:!0,qt=(e,i)=>!de(d(e,i)).length&&M(e,i);const Wt={mode:G.onSubmit,reValidateMode:G.onChange,shouldFocusError:!0};function Ht(e={},i){let r={...Wt,...e},s={submitCount:0,isDirty:!1,isLoading:te(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},n={},a=L(r.defaultValues)||L(r.values)?K(r.defaultValues||r.values)||{}:{},c=r.shouldUnregister?{}:K(a),V={action:!1,mount:!1,watch:!1},_={mount:new Set,unMount:new Set,array:new Set,watch:new Set},F,w=0;const x={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={values:Ee(),array:Ee(),state:Ee()},B=e.resetOptions&&e.resetOptions.keepDirtyValues,C=Xe(r.mode),Y=Xe(r.reValidateMode),Z=r.criteriaMode===G.all,se=t=>u=>{clearTimeout(w),w=setTimeout(t,u)},S=async t=>{if(x.isValid||t){const u=r.resolver?W((await q()).errors):await H(n,!0);u!==s.isValid&&g.state.next({isValid:u})}},U=t=>x.isValidating&&g.state.next({isValidating:t}),I=(t,u=[],l,y,f=!0,o=!0)=>{if(y&&l){if(V.action=!0,o&&Array.isArray(d(n,t))){const v=l(d(n,t),y.argA,y.argB);f&&E(n,t,v)}if(o&&Array.isArray(d(s.errors,t))){const v=l(d(s.errors,t),y.argA,y.argB);f&&E(s.errors,t,v),qt(s.errors,t)}if(x.touchedFields&&o&&Array.isArray(d(s.touchedFields,t))){const v=l(d(s.touchedFields,t),y.argA,y.argB);f&&E(s.touchedFields,t,v)}x.dirtyFields&&(s.dirtyFields=Ce(a,c)),g.state.next({name:t,isDirty:h(t,u),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else E(c,t,u)},O=(t,u)=>{E(s.errors,t,u),g.state.next({errors:s.errors})},j=(t,u,l,y)=>{const f=d(n,t);if(f){const o=d(c,t,T(l)?d(a,t):l);T(o)||y&&y.defaultChecked||u?E(c,t,u?o:Te(f._f)):k(t,o),V.mount&&S()}},ee=(t,u,l,y,f)=>{let o=!1,v=!1;const D={name:t};if(!l||y){x.isDirty&&(v=s.isDirty,s.isDirty=D.isDirty=h(),o=v!==D.isDirty);const R=re(d(a,t),u);v=d(s.dirtyFields,t),R?M(s.dirtyFields,t):E(s.dirtyFields,t,!0),D.dirtyFields=s.dirtyFields,o=o||x.dirtyFields&&v!==!R}if(l){const R=d(s.touchedFields,t);R||(E(s.touchedFields,t,l),D.touchedFields=s.touchedFields,o=o||x.touchedFields&&R!==l)}return o&&f&&g.state.next(D),o?D:{}},ae=(t,u,l,y)=>{const f=d(s.errors,t),o=x.isValid&&z(u)&&s.isValid!==u;if(e.delayError&&l?(F=se(()=>O(t,l)),F(e.delayError)):(clearTimeout(w),F=null,l?E(s.errors,t,l):M(s.errors,t)),(l?!re(f,l):f)||!W(y)||o){const v={...y,...o&&z(u)?{isValid:u}:{},errors:s.errors,name:t};s={...s,...v},g.state.next(v)}U(!1)},q=async t=>r.resolver(c,r.context,Nt(t||_.mount,n,r.criteriaMode,r.shouldUseNativeValidation)),Q=async t=>{const{errors:u}=await q(t);if(t)for(const l of t){const y=d(u,l);y?E(s.errors,l,y):M(s.errors,l)}else s.errors=u;return u},H=async(t,u,l={valid:!0})=>{for(const y in t){const f=t[y];if(f){const{_f:o,...v}=f;if(o){const D=_.array.has(o.name),R=await st(f,c,Z,r.shouldUseNativeValidation&&!u,D);if(R[o.name]&&(l.valid=!1,u))break;!u&&(d(R,o.name)?D?Ut(s.errors,R,o.name):E(s.errors,o.name,R[o.name]):M(s.errors,o.name))}v&&await H(v,u,l)}}return l.valid},m=()=>{for(const t of _.unMount){const u=d(n,t);u&&(u._f.refs?u._f.refs.every(l=>!ke(l)):!ke(u._f.ref))&&Fe(t)}_.unMount=new Set},h=(t,u)=>(t&&u&&E(c,t,u),!re(je(),a)),p=(t,u,l)=>ft(t,_,{...V.mount?c:T(u)?a:J(t)?{[t]:u}:u},l,u),A=t=>de(d(V.mount?c:a,t,e.shouldUnregister?d(a,t,[]):[])),k=(t,u,l={})=>{const y=d(n,t);let f=u;if(y){const o=y._f;o&&(!o.disabled&&E(c,t,Vt(u,o)),f=be(o.ref)&&N(u)?"":u,gt(o.ref)?[...o.ref.options].forEach(v=>v.selected=f.includes(v.value)):o.refs?fe(o.ref)?o.refs.length>1?o.refs.forEach(v=>(!v.defaultChecked||!v.disabled)&&(v.checked=Array.isArray(f)?!!f.find(D=>D===v.value):f===v.value)):o.refs[0]&&(o.refs[0].checked=!!f):o.refs.forEach(v=>v.checked=v.value===f):Be(o.ref)?o.ref.value="":(o.ref.value=f,o.ref.type||g.values.next({name:t,values:{...c}})))}(l.shouldDirty||l.shouldTouch)&&ee(t,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&xe(t)},P=(t,u,l)=>{for(const y in u){const f=u[y],o=`${t}.${y}`,v=d(n,o);(_.array.has(t)||!pe(f)||v&&!v._f)&&!ue(f)?P(o,f,l):k(o,f,l)}},$=(t,u,l={})=>{const y=d(n,t),f=_.array.has(t),o=K(u);E(c,t,o),f?(g.array.next({name:t,values:{...c}}),(x.isDirty||x.dirtyFields)&&l.shouldDirty&&g.state.next({name:t,dirtyFields:Ce(a,c),isDirty:h(t,o)})):y&&!y._f&&!N(o)?P(t,o,l):k(t,o,l),Ye(t,_)&&g.state.next({...s}),g.values.next({name:t,values:{...c}}),!V.mount&&i()},oe=async t=>{const u=t.target;let l=u.name,y=!0;const f=d(n,l),o=()=>u.type?Te(f._f):ut(t),v=D=>{y=Number.isNaN(D)||D===d(c,l,D)};if(f){let D,R;const he=o(),ie=t.type===Ve.BLUR||t.type===Ve.FOCUS_OUT,At=!It(f._f)&&!r.resolver&&!d(s.errors,l)&&!f._f.deps||jt(ie,d(s.touchedFields,l),s.isSubmitted,Y,C),we=Ye(l,_,ie);E(c,l,he),ie?(f._f.onBlur&&f._f.onBlur(t),F&&F(0)):f._f.onChange&&f._f.onChange(t);const De=ee(l,he,ie,!1),wt=!W(De)||we;if(!ie&&g.values.next({name:l,type:t.type,values:{...c}}),At)return x.isValid&&S(),wt&&g.state.next({name:l,...we?{}:De});if(!ie&&we&&g.state.next({...s}),U(!0),r.resolver){const{errors:Je}=await q([l]);if(v(he),y){const Dt=it(s.errors,n,l),Qe=it(Je,n,Dt.name||l);D=Qe.error,l=Qe.name,R=W(Je)}}else D=(await st(f,c,Z,r.shouldUseNativeValidation))[l],v(he),y&&(D?R=!1:x.isValid&&(R=await H(n,!0)));y&&(f._f.deps&&xe(f._f.deps),ae(l,R,D,De))}},ye=(t,u)=>{if(d(s.errors,u)&&t.focus)return t.focus(),1},xe=async(t,u={})=>{let l,y;const f=ge(t);if(U(!0),r.resolver){const o=await Q(T(t)?t:f);l=W(o),y=t?!f.some(v=>d(o,v)):l}else t?(y=(await Promise.all(f.map(async o=>{const v=d(n,o);return await H(v&&v._f?{[o]:v}:v)}))).every(Boolean),!(!y&&!s.isValid)&&S()):y=l=await H(n);return g.state.next({...!J(t)||x.isValid&&l!==s.isValid?{}:{name:t},...r.resolver||!t?{isValid:l}:{},errors:s.errors,isValidating:!1}),u.shouldFocus&&!y&&ve(n,ye,t?f:_.mount),y},je=t=>{const u={...a,...V.mount?c:{}};return T(t)?u:J(t)?d(u,t):t.map(l=>d(u,l))},qe=(t,u)=>({invalid:!!d((u||s).errors,t),isDirty:!!d((u||s).dirtyFields,t),isTouched:!!d((u||s).touchedFields,t),error:d((u||s).errors,t)}),pt=t=>{t&&ge(t).forEach(u=>M(s.errors,u)),g.state.next({errors:t?s.errors:{}})},We=(t,u,l)=>{const y=(d(n,t,{_f:{}})._f||{}).ref;E(s.errors,t,{...u,ref:y}),g.state.next({name:t,errors:s.errors,isValid:!1}),l&&l.shouldFocus&&y&&y.focus&&y.focus()},mt=(t,u)=>te(t)?g.values.subscribe({next:l=>t(p(void 0,u),l)}):p(t,u,!0),Fe=(t,u={})=>{for(const l of t?ge(t):_.mount)_.mount.delete(l),_.array.delete(l),u.keepValue||(M(n,l),M(c,l)),!u.keepError&&M(s.errors,l),!u.keepDirty&&M(s.dirtyFields,l),!u.keepTouched&&M(s.touchedFields,l),!r.shouldUnregister&&!u.keepDefaultValue&&M(a,l);g.values.next({values:{...c}}),g.state.next({...s,...u.keepDirty?{isDirty:h()}:{}}),!u.keepIsValid&&S()},He=({disabled:t,name:u,field:l,fields:y,value:f})=>{if(z(t)){const o=t?void 0:T(f)?Te(l?l._f:d(y,u)._f):f;E(c,u,o),ee(u,o,!1,!1,!0)}},Ae=(t,u={})=>{let l=d(n,t);const y=z(u.disabled);return E(n,t,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:t}},name:t,mount:!0,...u}}),_.mount.add(t),l?He({field:l,disabled:u.disabled,name:t}):j(t,!0,u.value),{...y?{disabled:u.disabled}:{},...r.progressive?{required:!!u.required,min:ce(u.min),max:ce(u.max),minLength:ce(u.minLength),maxLength:ce(u.maxLength),pattern:ce(u.pattern)}:{},name:t,onChange:oe,onBlur:oe,ref:f=>{if(f){Ae(t,u),l=d(n,t);const o=T(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,v=Bt(o),D=l._f.refs||[];if(v?D.find(R=>R===o):o===l._f.ref)return;E(n,t,{_f:{...l._f,...v?{refs:[...D.filter(ke),o,...Array.isArray(d(a,t))?[{}]:[]],ref:{type:o.type,name:t}}:{ref:o}}}),j(t,!1,void 0,o)}else l=d(n,t,{}),l._f&&(l._f.mount=!1),(r.shouldUnregister||u.shouldUnregister)&&!(lt(_.array,t)&&V.action)&&_.unMount.add(t)}}},$e=()=>r.shouldFocusError&&ve(n,ye,_.mount),xt=t=>{z(t)&&(g.state.next({disabled:t}),ve(n,u=>{u.disabled=t},0,!1))},Ke=(t,u)=>async l=>{l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let y=K(c);if(g.state.next({isSubmitting:!0}),r.resolver){const{errors:f,values:o}=await q();s.errors=f,y=o}else await H(n);M(s.errors,"root"),W(s.errors)?(g.state.next({errors:{}}),await t(y,l)):(u&&await u({...s.errors},l),$e(),setTimeout($e)),g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:W(s.errors),submitCount:s.submitCount+1,errors:s.errors})},Ft=(t,u={})=>{d(n,t)&&(T(u.defaultValue)?$(t,d(a,t)):($(t,u.defaultValue),E(a,t,u.defaultValue)),u.keepTouched||M(s.touchedFields,t),u.keepDirty||(M(s.dirtyFields,t),s.isDirty=u.defaultValue?h(t,d(a,t)):h()),u.keepError||(M(s.errors,t),x.isValid&&S()),g.state.next({...s}))},Ge=(t,u={})=>{const l=t?K(t):a,y=K(l),f=t&&!W(t)?y:a;if(u.keepDefaultValues||(a=l),!u.keepValues){if(u.keepDirtyValues||B)for(const o of _.mount)d(s.dirtyFields,o)?E(f,o,d(c,o)):$(o,d(f,o));else{if(Re&&T(t))for(const o of _.mount){const v=d(n,o);if(v&&v._f){const D=Array.isArray(v._f.refs)?v._f.refs[0]:v._f.ref;if(be(D)){const R=D.closest("form");if(R){R.reset();break}}}}n={}}c=e.shouldUnregister?u.keepDefaultValues?K(a):{}:K(f),g.array.next({values:{...f}}),g.values.next({values:{...f}})}_={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!V.mount&&i(),V.mount=!x.isValid||!!u.keepIsValid,V.watch=!!e.shouldUnregister,g.state.next({submitCount:u.keepSubmitCount?s.submitCount:0,isDirty:u.keepDirty?s.isDirty:!!(u.keepDefaultValues&&!re(t,a)),isSubmitted:u.keepIsSubmitted?s.isSubmitted:!1,dirtyFields:u.keepDirtyValues?s.dirtyFields:u.keepDefaultValues&&t?Ce(a,t):{},touchedFields:u.keepTouched?s.touchedFields:{},errors:u.keepErrors?s.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?s.isSubmitSuccessful:!1,isSubmitting:!1})},ze=(t,u)=>Ge(te(t)?t(c):t,u);return{control:{register:Ae,unregister:Fe,getFieldState:qe,handleSubmit:Ke,setError:We,_executeSchema:q,_getWatch:p,_getDirty:h,_updateValid:S,_removeUnmounted:m,_updateFieldArray:I,_updateDisabledField:He,_getFieldArray:A,_reset:Ge,_resetDefaultValues:()=>te(r.defaultValues)&&r.defaultValues().then(t=>{ze(t,r.resetOptions),g.state.next({isLoading:!1})}),_updateFormState:t=>{s={...s,...t}},_disableForm:xt,_subjects:g,_proxyFormState:x,get _fields(){return n},get _formValues(){return c},get _state(){return V},set _state(t){V=t},get _defaultValues(){return a},get _names(){return _},set _names(t){_=t},get _formState(){return s},set _formState(t){s=t},get _options(){return r},set _options(t){r={...r,...t}}},trigger:xe,register:Ae,handleSubmit:Ke,watch:mt,setValue:$,getValues:je,reset:ze,resetField:Ft,clearErrors:pt,unregister:Fe,setError:We,setFocus:(t,u={})=>{const l=d(n,t),y=l&&l._f;if(y){const f=y.refs?y.refs[0]:y.ref;f.focus&&(f.focus(),u.shouldSelect&&f.select())}},getFieldState:qe}}function $t(e={}){const i=b.useRef(),r=b.useRef(),[s,n]=b.useState({isDirty:!1,isValidating:!1,isLoading:te(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:te(e.defaultValues)?void 0:e.defaultValues});i.current||(i.current={...Ht(e,()=>n(c=>({...c}))),formState:s});const a=i.current.control;return a._options=e,Ue({subject:a._subjects.state,next:c=>{ot(c,a._proxyFormState,a._updateFormState,!0)&&n({...a._formState})}}),b.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),b.useEffect(()=>{if(a._proxyFormState.isDirty){const c=a._getDirty();c!==s.isDirty&&a._subjects.state.next({isDirty:c})}},[a,s.isDirty]),b.useEffect(()=>{e.values&&!re(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values):a._resetDefaultValues()},[e.values,a]),b.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),i.current.formState=at(s,a),i.current}function bt(){const e=b.useRef(null);return{scrollRef:e,handleScrollOnElement:(s={behavior:"smooth",block:"center"})=>{var n;(n=e.current)==null||n.scrollIntoView(s)},handleScrollToTopOfPage:()=>{window.scrollTo({top:0,behavior:"smooth"})}}}const St=b.createContext({}),Ie=()=>b.useContext(St),Kt=e=>{const{control:i}=Ie();return Pe({control:i,...e})},Gt=({onSubmit:e,children:i,resolver:r,changeStepScrollMode:s="step",...n})=>{const{trigger:a,getValues:c,setValue:V,register:_,unregister:F,control:w,reset:x}=$t({resolver:r,mode:"onBlur"}),[g,B]=b.useState(0),[C,Y]=b.useState([]),{scrollRef:Z,handleScrollOnElement:se,handleScrollToTopOfPage:S}=bt();b.useEffect(()=>{const h=setTimeout(()=>{Z&&s==="step"?se():S()},100);return()=>clearTimeout(h)},[g,se,Z,S,s]);const U=b.useMemo(()=>{if(b.Children.toArray(i).some(p=>!b.isValidElement(p)||p.type!==Oe))throw new Error("SmartStepper only accepts Step components as children.");return b.Children.toArray(i)},[i]),I=(h,p=[])=>h.length<1?[]:(h.forEach(A=>{b.isValidElement(A)&&A.type===Oe&&(p.push(A.props.stepName),I(b.Children.toArray(A.props.children),p))}),p),O=b.useMemo(()=>I(U),[U]),j=b.useMemo(()=>{var h;return((h=U[g])==null?void 0:h.props.fieldsForValidation)||[]},[g,U]),ee=async h=>{h.preventDefault(),await a(j)&&e&&e(c())},ae=async(h,p)=>{h?(p&&F(j),B(O.indexOf(h)),Y(A=>A.some(k=>k===g)?A:[...A,g])):await a(j)&&(Y(k=>k.some(P=>P===g)?k:[...k,g]),B(k=>k===b.Children.count(i)-1?k:k+1))},q=()=>{if(C.length!==0){const h=C[C.length-1];F(j),B(h)}Y(h=>h.slice(0,h.length-1))},Q=h=>{const p=O.indexOf(h);if(p<0)throw new Error("There is not step with the name of targetStep");if(g<p)throw new Error("Target step should not be after the current step");{B(p);const A=C.indexOf(p);C.filter((P,$)=>P!==p&&$>A).forEach(P=>{const $=U[P].props.fieldsForValidation||[];F($)}),F(j),Y(C.slice(0,A+1))}},H=async()=>await a(j),m=()=>b.Children.toArray(i)[g];return le.jsx(St.Provider,{value:{navigateToNextStep:ae,navigateToPreviousStep:q,navigateToPreviousStepWithTargetStep:Q,registerStepperFields:_,getStepperFieldValues:c,setStepperFieldValues:V,stepperFieldResetter:x,canNavigateToNextStep:H,control:w},children:le.jsx("div",{ref:Z,children:le.jsx("form",{onSubmit:ee,...n,children:m()})})})},Oe=({children:e})=>le.jsx(le.Fragment,{children:e}),zt=e=>{const{control:i}=Ie();return le.jsx(Rt,{control:i,...e})},Jt=Object.assign(Gt,{Step:Oe,Controller:zt});exports.SmartStepper=Jt;exports.useController=Pe;exports.useScroll=bt;exports.useSmartStepper=Ie;exports.useSmartStepperController=Kt;
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),le=require("react/jsx-runtime");var fe=e=>e.type==="checkbox",ue=e=>e instanceof Date,N=e=>e==null;const nt=e=>typeof e=="object";var L=e=>!N(e)&&!Array.isArray(e)&&nt(e)&&!ue(e),ut=e=>L(e)&&e.target?fe(e.target)?e.target.checked:e.target.value:e,Et=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,lt=(e,i)=>e.has(Et(i)),kt=e=>{const i=e.constructor&&e.constructor.prototype;return L(i)&&i.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function K(e){let i;const r=Array.isArray(e);if(e instanceof Date)i=new Date(e);else if(e instanceof Set)i=new Set(e);else if(!(Re&&(e instanceof Blob||e instanceof FileList))&&(r||L(e)))if(i=r?[]:{},!r&&!kt(e))i=e;else for(const s in e)e.hasOwnProperty(s)&&(i[s]=K(e[s]));else return e;return i}var de=e=>Array.isArray(e)?e.filter(Boolean):[],T=e=>e===void 0,d=(e,i,r)=>{if(!i||!L(e))return r;const s=de(i.split(/[,[\].]+?/)).reduce((n,a)=>N(n)?n:n[a],e);return T(s)||s===e?T(e[i])?r:e[i]:s},z=e=>typeof e=="boolean";const Ve={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},G={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},X={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ct=b.createContext(null),Le=()=>b.useContext(Ct);var at=(e,i,r,s=!0)=>{const n={defaultValues:i._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const c=a;return i._proxyFormState[c]!==G.all&&(i._proxyFormState[c]=!s||G.all),r&&(r[c]=!0),e[c]}});return n},W=e=>L(e)&&!Object.keys(e).length,ot=(e,i,r,s)=>{r(e);const{name:n,...a}=e;return W(a)||Object.keys(a).length>=Object.keys(i).length||Object.keys(a).find(c=>i[c]===(!s||G.all))},ge=e=>Array.isArray(e)?e:[e],ct=(e,i,r)=>!e||!i||e===i||ge(e).some(s=>s&&(r?s===i:s.startsWith(i)||i.startsWith(s)));function Ue(e){const i=b.useRef(e);i.current=e,b.useEffect(()=>{const r=!e.disabled&&i.current.subject&&i.current.subject.subscribe({next:i.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function Tt(e){const i=Le(),{control:r=i.control,disabled:s,name:n,exact:a}=e||{},[c,V]=b.useState(r._formState),_=b.useRef(!0),F=b.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),w=b.useRef(n);return w.current=n,Ue({disabled:s,next:x=>_.current&&ct(w.current,x.name,a)&&ot(x,F.current,r._updateFormState)&&V({...r._formState,...x}),subject:r._subjects.state}),b.useEffect(()=>(_.current=!0,F.current.isValid&&r._updateValid(!0),()=>{_.current=!1}),[r]),at(c,r,F.current,!1)}var J=e=>typeof e=="string",ft=(e,i,r,s,n)=>J(e)?(s&&i.watch.add(e),d(r,e,n)):Array.isArray(e)?e.map(a=>(s&&i.watch.add(a),d(r,a))):(s&&(i.watchAll=!0),r);function Ot(e){const i=Le(),{control:r=i.control,name:s,defaultValue:n,disabled:a,exact:c}=e||{},V=b.useRef(s);V.current=s,Ue({disabled:a,subject:r._subjects.values,next:w=>{ct(V.current,w.name,c)&&F(K(ft(V.current,r._names,w.values||r._formValues,!1,n)))}});const[_,F]=b.useState(r._getWatch(s,n));return b.useEffect(()=>r._removeUnmounted()),_}var Me=e=>/^\w*$/.test(e),dt=e=>de(e.replace(/["|']|\]/g,"").split(/\.|\[/));function E(e,i,r){let s=-1;const n=Me(i)?[i]:dt(i),a=n.length,c=a-1;for(;++s<a;){const V=n[s];let _=r;if(s!==c){const F=e[V];_=L(F)||Array.isArray(F)?F:isNaN(+n[s+1])?{}:[]}e[V]=_,e=e[V]}return e}function Pe(e){const i=Le(),{name:r,disabled:s,control:n=i.control,shouldUnregister:a}=e,c=lt(n._names.array,r),V=Ot({control:n,name:r,defaultValue:d(n._formValues,r,d(n._defaultValues,r,e.defaultValue)),exact:!0}),_=Tt({control:n,name:r}),F=b.useRef(n.register(r,{...e.rules,value:V}));return F.current=n.register(r,e.rules),b.useEffect(()=>{const w=n._options.shouldUnregister||a,x=(g,B)=>{const C=d(n._fields,g);C&&(C._f.mount=B)};if(x(r,!0),w){const g=K(d(n._options.defaultValues,r));E(n._defaultValues,r,g),T(d(n._formValues,r))&&E(n._formValues,r,g)}return()=>{(c?w&&!n._state.action:w)?n.unregister(r):x(r,!1)}},[r,n,c,a]),b.useEffect(()=>{d(n._fields,r)&&n._updateDisabledField({disabled:s,fields:n._fields,name:r,value:d(n._fields,r)._f.value})},[s,r,n]),{field:{name:r,value:V,...z(s)||z(_.disabled)?{disabled:_.disabled||s}:{},onChange:b.useCallback(w=>F.current.onChange({target:{value:ut(w),name:r},type:Ve.CHANGE}),[r]),onBlur:b.useCallback(()=>F.current.onBlur({target:{value:d(n._formValues,r),name:r},type:Ve.BLUR}),[r,n]),ref:w=>{const x=d(n._fields,r);x&&w&&(x._f.ref={focus:()=>w.focus(),select:()=>w.select(),setCustomValidity:g=>w.setCustomValidity(g),reportValidity:()=>w.reportValidity()})}},formState:_,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!d(_.errors,r)},isDirty:{enumerable:!0,get:()=>!!d(_.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!d(_.touchedFields,r)},error:{enumerable:!0,get:()=>d(_.errors,r)}})}}const Rt=e=>e.render(Pe(e));var Lt=(e,i,r,s,n)=>i?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:n||!0}}:{},Xe=e=>({isOnSubmit:!e||e===G.onSubmit,isOnBlur:e===G.onBlur,isOnChange:e===G.onChange,isOnAll:e===G.all,isOnTouch:e===G.onTouched}),Ye=(e,i,r)=>!r&&(i.watchAll||i.watch.has(e)||[...i.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const ve=(e,i,r,s)=>{for(const n of r||Object.keys(e)){const a=d(e,n);if(a){const{_f:c,...V}=a;if(c){if(c.refs&&c.refs[0]&&i(c.refs[0],n)&&!s)break;if(c.ref&&i(c.ref,c.name)&&!s)break}else L(V)&&ve(V,i)}}};var Ut=(e,i,r)=>{const s=de(d(e,r));return E(s,"root",i[r]),E(e,r,s),e},Be=e=>e.type==="file",te=e=>typeof e=="function",be=e=>{if(!Re)return!1;const i=e?e.ownerDocument:0;return e instanceof(i&&i.defaultView?i.defaultView.HTMLElement:HTMLElement)},_e=e=>J(e),Ne=e=>e.type==="radio",Se=e=>e instanceof RegExp;const Ze={value:!1,isValid:!1},et={value:!0,isValid:!0};var yt=e=>{if(Array.isArray(e)){if(e.length>1){const i=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:i,isValid:!!i.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!T(e[0].attributes.value)?T(e[0].value)||e[0].value===""?et:{value:e[0].value,isValid:!0}:et:Ze}return Ze};const tt={isValid:!1,value:null};var ht=e=>Array.isArray(e)?e.reduce((i,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:i,tt):tt;function rt(e,i,r="validate"){if(_e(e)||Array.isArray(e)&&e.every(_e)||z(e)&&!e)return{type:r,message:_e(e)?e:"",ref:i}}var ne=e=>L(e)&&!Se(e)?e:{value:e,message:""},st=async(e,i,r,s,n)=>{const{ref:a,refs:c,required:V,maxLength:_,minLength:F,min:w,max:x,pattern:g,validate:B,name:C,valueAsNumber:Y,mount:Z,disabled:se}=e._f,S=d(i,C);if(!Z||se)return{};const U=c?c[0]:a,I=m=>{s&&U.reportValidity&&(U.setCustomValidity(z(m)?"":m||""),U.reportValidity())},O={},j=Ne(a),ee=fe(a),ae=j||ee,q=(Y||Be(a))&&T(a.value)&&T(S)||be(a)&&a.value===""||S===""||Array.isArray(S)&&!S.length,Q=Lt.bind(null,C,r,O),H=(m,h,p,A=X.maxLength,k=X.minLength)=>{const P=m?h:p;O[C]={type:m?A:k,message:P,ref:a,...Q(m?A:k,P)}};if(n?!Array.isArray(S)||!S.length:V&&(!ae&&(q||N(S))||z(S)&&!S||ee&&!yt(c).isValid||j&&!ht(c).isValid)){const{value:m,message:h}=_e(V)?{value:!!V,message:V}:ne(V);if(m&&(O[C]={type:X.required,message:h,ref:U,...Q(X.required,h)},!r))return I(h),O}if(!q&&(!N(w)||!N(x))){let m,h;const p=ne(x),A=ne(w);if(!N(S)&&!isNaN(S)){const k=a.valueAsNumber||S&&+S;N(p.value)||(m=k>p.value),N(A.value)||(h=k<A.value)}else{const k=a.valueAsDate||new Date(S),P=ye=>new Date(new Date().toDateString()+" "+ye),$=a.type=="time",oe=a.type=="week";J(p.value)&&S&&(m=$?P(S)>P(p.value):oe?S>p.value:k>new Date(p.value)),J(A.value)&&S&&(h=$?P(S)<P(A.value):oe?S<A.value:k<new Date(A.value))}if((m||h)&&(H(!!m,p.message,A.message,X.max,X.min),!r))return I(O[C].message),O}if((_||F)&&!q&&(J(S)||n&&Array.isArray(S))){const m=ne(_),h=ne(F),p=!N(m.value)&&S.length>+m.value,A=!N(h.value)&&S.length<+h.value;if((p||A)&&(H(p,m.message,h.message),!r))return I(O[C].message),O}if(g&&!q&&J(S)){const{value:m,message:h}=ne(g);if(Se(m)&&!S.match(m)&&(O[C]={type:X.pattern,message:h,ref:a,...Q(X.pattern,h)},!r))return I(h),O}if(B){if(te(B)){const m=await B(S,i),h=rt(m,U);if(h&&(O[C]={...h,...Q(X.validate,h.message)},!r))return I(h.message),O}else if(L(B)){let m={};for(const h in B){if(!W(m)&&!r)break;const p=rt(await B[h](S,i),U,h);p&&(m={...p,...Q(h,p.message)},I(p.message),r&&(O[C]=m))}if(!W(m)&&(O[C]={ref:U,...m},!r))return O}}return I(!0),O};function Mt(e,i){const r=i.slice(0,-1).length;let s=0;for(;s<r;)e=T(e)?s++:e[i[s++]];return e}function Pt(e){for(const i in e)if(e.hasOwnProperty(i)&&!T(e[i]))return!1;return!0}function M(e,i){const r=Array.isArray(i)?i:Me(i)?[i]:dt(i),s=r.length===1?e:Mt(e,r),n=r.length-1,a=r[n];return s&&delete s[a],n!==0&&(L(s)&&W(s)||Array.isArray(s)&&Pt(s))&&M(e,r.slice(0,-1)),e}function Ee(){let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}}var pe=e=>N(e)||!nt(e);function re(e,i){if(pe(e)||pe(i))return e===i;if(ue(e)&&ue(i))return e.getTime()===i.getTime();const r=Object.keys(e),s=Object.keys(i);if(r.length!==s.length)return!1;for(const n of r){const a=e[n];if(!s.includes(n))return!1;if(n!=="ref"){const c=i[n];if(ue(a)&&ue(c)||L(a)&&L(c)||Array.isArray(a)&&Array.isArray(c)?!re(a,c):a!==c)return!1}}return!0}var gt=e=>e.type==="select-multiple",Bt=e=>Ne(e)||fe(e),ke=e=>be(e)&&e.isConnected,vt=e=>{for(const i in e)if(te(e[i]))return!0;return!1};function me(e,i={}){const r=Array.isArray(e);if(L(e)||r)for(const s in e)Array.isArray(e[s])||L(e[s])&&!vt(e[s])?(i[s]=Array.isArray(e[s])?[]:{},me(e[s],i[s])):N(e[s])||(i[s]=!0);return i}function _t(e,i,r){const s=Array.isArray(e);if(L(e)||s)for(const n in e)Array.isArray(e[n])||L(e[n])&&!vt(e[n])?T(i)||pe(r[n])?r[n]=Array.isArray(e[n])?me(e[n],[]):{...me(e[n])}:_t(e[n],N(i)?{}:i[n],r[n]):r[n]=!re(e[n],i[n]);return r}var Ce=(e,i)=>_t(e,i,me(i)),Vt=(e,{valueAsNumber:i,valueAsDate:r,setValueAs:s})=>T(e)?e:i?e===""?NaN:e&&+e:r&&J(e)?new Date(e):s?s(e):e;function Te(e){const i=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):i.disabled))return Be(i)?i.files:Ne(i)?ht(e.refs).value:gt(i)?[...i.selectedOptions].map(({value:r})=>r):fe(i)?yt(e.refs).value:Vt(T(i.value)?e.ref.value:i.value,e)}var Nt=(e,i,r,s)=>{const n={};for(const a of e){const c=d(i,a);c&&E(n,a,c._f)}return{criteriaMode:r,names:[...e],fields:n,shouldUseNativeValidation:s}},ce=e=>T(e)?e:Se(e)?e.source:L(e)?Se(e.value)?e.value.source:e.value:e,It=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function it(e,i,r){const s=d(e,r);if(s||Me(r))return{error:s,name:r};const n=r.split(".");for(;n.length;){const a=n.join("."),c=d(i,a),V=d(e,a);if(c&&!Array.isArray(c)&&r!==a)return{name:r};if(V&&V.type)return{name:a,error:V};n.pop()}return{name:r}}var jt=(e,i,r,s,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(i||e):(r?s.isOnBlur:n.isOnBlur)?!e:(r?s.isOnChange:n.isOnChange)?e:!0,qt=(e,i)=>!de(d(e,i)).length&&M(e,i);const Wt={mode:G.onSubmit,reValidateMode:G.onChange,shouldFocusError:!0};function Ht(e={},i){let r={...Wt,...e},s={submitCount:0,isDirty:!1,isLoading:te(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},n={},a=L(r.defaultValues)||L(r.values)?K(r.defaultValues||r.values)||{}:{},c=r.shouldUnregister?{}:K(a),V={action:!1,mount:!1,watch:!1},_={mount:new Set,unMount:new Set,array:new Set,watch:new Set},F,w=0;const x={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={values:Ee(),array:Ee(),state:Ee()},B=e.resetOptions&&e.resetOptions.keepDirtyValues,C=Xe(r.mode),Y=Xe(r.reValidateMode),Z=r.criteriaMode===G.all,se=t=>u=>{clearTimeout(w),w=setTimeout(t,u)},S=async t=>{if(x.isValid||t){const u=r.resolver?W((await q()).errors):await H(n,!0);u!==s.isValid&&g.state.next({isValid:u})}},U=t=>x.isValidating&&g.state.next({isValidating:t}),I=(t,u=[],l,y,f=!0,o=!0)=>{if(y&&l){if(V.action=!0,o&&Array.isArray(d(n,t))){const v=l(d(n,t),y.argA,y.argB);f&&E(n,t,v)}if(o&&Array.isArray(d(s.errors,t))){const v=l(d(s.errors,t),y.argA,y.argB);f&&E(s.errors,t,v),qt(s.errors,t)}if(x.touchedFields&&o&&Array.isArray(d(s.touchedFields,t))){const v=l(d(s.touchedFields,t),y.argA,y.argB);f&&E(s.touchedFields,t,v)}x.dirtyFields&&(s.dirtyFields=Ce(a,c)),g.state.next({name:t,isDirty:h(t,u),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else E(c,t,u)},O=(t,u)=>{E(s.errors,t,u),g.state.next({errors:s.errors})},j=(t,u,l,y)=>{const f=d(n,t);if(f){const o=d(c,t,T(l)?d(a,t):l);T(o)||y&&y.defaultChecked||u?E(c,t,u?o:Te(f._f)):k(t,o),V.mount&&S()}},ee=(t,u,l,y,f)=>{let o=!1,v=!1;const D={name:t};if(!l||y){x.isDirty&&(v=s.isDirty,s.isDirty=D.isDirty=h(),o=v!==D.isDirty);const R=re(d(a,t),u);v=d(s.dirtyFields,t),R?M(s.dirtyFields,t):E(s.dirtyFields,t,!0),D.dirtyFields=s.dirtyFields,o=o||x.dirtyFields&&v!==!R}if(l){const R=d(s.touchedFields,t);R||(E(s.touchedFields,t,l),D.touchedFields=s.touchedFields,o=o||x.touchedFields&&R!==l)}return o&&f&&g.state.next(D),o?D:{}},ae=(t,u,l,y)=>{const f=d(s.errors,t),o=x.isValid&&z(u)&&s.isValid!==u;if(e.delayError&&l?(F=se(()=>O(t,l)),F(e.delayError)):(clearTimeout(w),F=null,l?E(s.errors,t,l):M(s.errors,t)),(l?!re(f,l):f)||!W(y)||o){const v={...y,...o&&z(u)?{isValid:u}:{},errors:s.errors,name:t};s={...s,...v},g.state.next(v)}U(!1)},q=async t=>r.resolver(c,r.context,Nt(t||_.mount,n,r.criteriaMode,r.shouldUseNativeValidation)),Q=async t=>{const{errors:u}=await q(t);if(t)for(const l of t){const y=d(u,l);y?E(s.errors,l,y):M(s.errors,l)}else s.errors=u;return u},H=async(t,u,l={valid:!0})=>{for(const y in t){const f=t[y];if(f){const{_f:o,...v}=f;if(o){const D=_.array.has(o.name),R=await st(f,c,Z,r.shouldUseNativeValidation&&!u,D);if(R[o.name]&&(l.valid=!1,u))break;!u&&(d(R,o.name)?D?Ut(s.errors,R,o.name):E(s.errors,o.name,R[o.name]):M(s.errors,o.name))}v&&await H(v,u,l)}}return l.valid},m=()=>{for(const t of _.unMount){const u=d(n,t);u&&(u._f.refs?u._f.refs.every(l=>!ke(l)):!ke(u._f.ref))&&Fe(t)}_.unMount=new Set},h=(t,u)=>(t&&u&&E(c,t,u),!re(je(),a)),p=(t,u,l)=>ft(t,_,{...V.mount?c:T(u)?a:J(t)?{[t]:u}:u},l,u),A=t=>de(d(V.mount?c:a,t,e.shouldUnregister?d(a,t,[]):[])),k=(t,u,l={})=>{const y=d(n,t);let f=u;if(y){const o=y._f;o&&(!o.disabled&&E(c,t,Vt(u,o)),f=be(o.ref)&&N(u)?"":u,gt(o.ref)?[...o.ref.options].forEach(v=>v.selected=f.includes(v.value)):o.refs?fe(o.ref)?o.refs.length>1?o.refs.forEach(v=>(!v.defaultChecked||!v.disabled)&&(v.checked=Array.isArray(f)?!!f.find(D=>D===v.value):f===v.value)):o.refs[0]&&(o.refs[0].checked=!!f):o.refs.forEach(v=>v.checked=v.value===f):Be(o.ref)?o.ref.value="":(o.ref.value=f,o.ref.type||g.values.next({name:t,values:{...c}})))}(l.shouldDirty||l.shouldTouch)&&ee(t,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&xe(t)},P=(t,u,l)=>{for(const y in u){const f=u[y],o=`${t}.${y}`,v=d(n,o);(_.array.has(t)||!pe(f)||v&&!v._f)&&!ue(f)?P(o,f,l):k(o,f,l)}},$=(t,u,l={})=>{const y=d(n,t),f=_.array.has(t),o=K(u);E(c,t,o),f?(g.array.next({name:t,values:{...c}}),(x.isDirty||x.dirtyFields)&&l.shouldDirty&&g.state.next({name:t,dirtyFields:Ce(a,c),isDirty:h(t,o)})):y&&!y._f&&!N(o)?P(t,o,l):k(t,o,l),Ye(t,_)&&g.state.next({...s}),g.values.next({name:t,values:{...c}}),!V.mount&&i()},oe=async t=>{const u=t.target;let l=u.name,y=!0;const f=d(n,l),o=()=>u.type?Te(f._f):ut(t),v=D=>{y=Number.isNaN(D)||D===d(c,l,D)};if(f){let D,R;const he=o(),ie=t.type===Ve.BLUR||t.type===Ve.FOCUS_OUT,At=!It(f._f)&&!r.resolver&&!d(s.errors,l)&&!f._f.deps||jt(ie,d(s.touchedFields,l),s.isSubmitted,Y,C),we=Ye(l,_,ie);E(c,l,he),ie?(f._f.onBlur&&f._f.onBlur(t),F&&F(0)):f._f.onChange&&f._f.onChange(t);const De=ee(l,he,ie,!1),wt=!W(De)||we;if(!ie&&g.values.next({name:l,type:t.type,values:{...c}}),At)return x.isValid&&S(),wt&&g.state.next({name:l,...we?{}:De});if(!ie&&we&&g.state.next({...s}),U(!0),r.resolver){const{errors:Je}=await q([l]);if(v(he),y){const Dt=it(s.errors,n,l),Qe=it(Je,n,Dt.name||l);D=Qe.error,l=Qe.name,R=W(Je)}}else D=(await st(f,c,Z,r.shouldUseNativeValidation))[l],v(he),y&&(D?R=!1:x.isValid&&(R=await H(n,!0)));y&&(f._f.deps&&xe(f._f.deps),ae(l,R,D,De))}},ye=(t,u)=>{if(d(s.errors,u)&&t.focus)return t.focus(),1},xe=async(t,u={})=>{let l,y;const f=ge(t);if(U(!0),r.resolver){const o=await Q(T(t)?t:f);l=W(o),y=t?!f.some(v=>d(o,v)):l}else t?(y=(await Promise.all(f.map(async o=>{const v=d(n,o);return await H(v&&v._f?{[o]:v}:v)}))).every(Boolean),!(!y&&!s.isValid)&&S()):y=l=await H(n);return g.state.next({...!J(t)||x.isValid&&l!==s.isValid?{}:{name:t},...r.resolver||!t?{isValid:l}:{},errors:s.errors,isValidating:!1}),u.shouldFocus&&!y&&ve(n,ye,t?f:_.mount),y},je=t=>{const u={...a,...V.mount?c:{}};return T(t)?u:J(t)?d(u,t):t.map(l=>d(u,l))},qe=(t,u)=>({invalid:!!d((u||s).errors,t),isDirty:!!d((u||s).dirtyFields,t),isTouched:!!d((u||s).touchedFields,t),error:d((u||s).errors,t)}),pt=t=>{t&&ge(t).forEach(u=>M(s.errors,u)),g.state.next({errors:t?s.errors:{}})},We=(t,u,l)=>{const y=(d(n,t,{_f:{}})._f||{}).ref;E(s.errors,t,{...u,ref:y}),g.state.next({name:t,errors:s.errors,isValid:!1}),l&&l.shouldFocus&&y&&y.focus&&y.focus()},mt=(t,u)=>te(t)?g.values.subscribe({next:l=>t(p(void 0,u),l)}):p(t,u,!0),Fe=(t,u={})=>{for(const l of t?ge(t):_.mount)_.mount.delete(l),_.array.delete(l),u.keepValue||(M(n,l),M(c,l)),!u.keepError&&M(s.errors,l),!u.keepDirty&&M(s.dirtyFields,l),!u.keepTouched&&M(s.touchedFields,l),!r.shouldUnregister&&!u.keepDefaultValue&&M(a,l);g.values.next({values:{...c}}),g.state.next({...s,...u.keepDirty?{isDirty:h()}:{}}),!u.keepIsValid&&S()},He=({disabled:t,name:u,field:l,fields:y,value:f})=>{if(z(t)){const o=t?void 0:T(f)?Te(l?l._f:d(y,u)._f):f;E(c,u,o),ee(u,o,!1,!1,!0)}},Ae=(t,u={})=>{let l=d(n,t);const y=z(u.disabled);return E(n,t,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:t}},name:t,mount:!0,...u}}),_.mount.add(t),l?He({field:l,disabled:u.disabled,name:t}):j(t,!0,u.value),{...y?{disabled:u.disabled}:{},...r.progressive?{required:!!u.required,min:ce(u.min),max:ce(u.max),minLength:ce(u.minLength),maxLength:ce(u.maxLength),pattern:ce(u.pattern)}:{},name:t,onChange:oe,onBlur:oe,ref:f=>{if(f){Ae(t,u),l=d(n,t);const o=T(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,v=Bt(o),D=l._f.refs||[];if(v?D.find(R=>R===o):o===l._f.ref)return;E(n,t,{_f:{...l._f,...v?{refs:[...D.filter(ke),o,...Array.isArray(d(a,t))?[{}]:[]],ref:{type:o.type,name:t}}:{ref:o}}}),j(t,!1,void 0,o)}else l=d(n,t,{}),l._f&&(l._f.mount=!1),(r.shouldUnregister||u.shouldUnregister)&&!(lt(_.array,t)&&V.action)&&_.unMount.add(t)}}},$e=()=>r.shouldFocusError&&ve(n,ye,_.mount),xt=t=>{z(t)&&(g.state.next({disabled:t}),ve(n,u=>{u.disabled=t},0,!1))},Ke=(t,u)=>async l=>{l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let y=K(c);if(g.state.next({isSubmitting:!0}),r.resolver){const{errors:f,values:o}=await q();s.errors=f,y=o}else await H(n);M(s.errors,"root"),W(s.errors)?(g.state.next({errors:{}}),await t(y,l)):(u&&await u({...s.errors},l),$e(),setTimeout($e)),g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:W(s.errors),submitCount:s.submitCount+1,errors:s.errors})},Ft=(t,u={})=>{d(n,t)&&(T(u.defaultValue)?$(t,d(a,t)):($(t,u.defaultValue),E(a,t,u.defaultValue)),u.keepTouched||M(s.touchedFields,t),u.keepDirty||(M(s.dirtyFields,t),s.isDirty=u.defaultValue?h(t,d(a,t)):h()),u.keepError||(M(s.errors,t),x.isValid&&S()),g.state.next({...s}))},Ge=(t,u={})=>{const l=t?K(t):a,y=K(l),f=t&&!W(t)?y:a;if(u.keepDefaultValues||(a=l),!u.keepValues){if(u.keepDirtyValues||B)for(const o of _.mount)d(s.dirtyFields,o)?E(f,o,d(c,o)):$(o,d(f,o));else{if(Re&&T(t))for(const o of _.mount){const v=d(n,o);if(v&&v._f){const D=Array.isArray(v._f.refs)?v._f.refs[0]:v._f.ref;if(be(D)){const R=D.closest("form");if(R){R.reset();break}}}}n={}}c=e.shouldUnregister?u.keepDefaultValues?K(a):{}:K(f),g.array.next({values:{...f}}),g.values.next({values:{...f}})}_={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!V.mount&&i(),V.mount=!x.isValid||!!u.keepIsValid,V.watch=!!e.shouldUnregister,g.state.next({submitCount:u.keepSubmitCount?s.submitCount:0,isDirty:u.keepDirty?s.isDirty:!!(u.keepDefaultValues&&!re(t,a)),isSubmitted:u.keepIsSubmitted?s.isSubmitted:!1,dirtyFields:u.keepDirtyValues?s.dirtyFields:u.keepDefaultValues&&t?Ce(a,t):{},touchedFields:u.keepTouched?s.touchedFields:{},errors:u.keepErrors?s.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?s.isSubmitSuccessful:!1,isSubmitting:!1})},ze=(t,u)=>Ge(te(t)?t(c):t,u);return{control:{register:Ae,unregister:Fe,getFieldState:qe,handleSubmit:Ke,setError:We,_executeSchema:q,_getWatch:p,_getDirty:h,_updateValid:S,_removeUnmounted:m,_updateFieldArray:I,_updateDisabledField:He,_getFieldArray:A,_reset:Ge,_resetDefaultValues:()=>te(r.defaultValues)&&r.defaultValues().then(t=>{ze(t,r.resetOptions),g.state.next({isLoading:!1})}),_updateFormState:t=>{s={...s,...t}},_disableForm:xt,_subjects:g,_proxyFormState:x,get _fields(){return n},get _formValues(){return c},get _state(){return V},set _state(t){V=t},get _defaultValues(){return a},get _names(){return _},set _names(t){_=t},get _formState(){return s},set _formState(t){s=t},get _options(){return r},set _options(t){r={...r,...t}}},trigger:xe,register:Ae,handleSubmit:Ke,watch:mt,setValue:$,getValues:je,reset:ze,resetField:Ft,clearErrors:pt,unregister:Fe,setError:We,setFocus:(t,u={})=>{const l=d(n,t),y=l&&l._f;if(y){const f=y.refs?y.refs[0]:y.ref;f.focus&&(f.focus(),u.shouldSelect&&f.select())}},getFieldState:qe}}function $t(e={}){const i=b.useRef(),r=b.useRef(),[s,n]=b.useState({isDirty:!1,isValidating:!1,isLoading:te(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:te(e.defaultValues)?void 0:e.defaultValues});i.current||(i.current={...Ht(e,()=>n(c=>({...c}))),formState:s});const a=i.current.control;return a._options=e,Ue({subject:a._subjects.state,next:c=>{ot(c,a._proxyFormState,a._updateFormState,!0)&&n({...a._formState})}}),b.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),b.useEffect(()=>{if(a._proxyFormState.isDirty){const c=a._getDirty();c!==s.isDirty&&a._subjects.state.next({isDirty:c})}},[a,s.isDirty]),b.useEffect(()=>{e.values&&!re(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values):a._resetDefaultValues()},[e.values,a]),b.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),i.current.formState=at(s,a),i.current}function bt(){const e=b.useRef(null);return{scrollRef:e,handleScrollOnElement:(s={behavior:"smooth",block:"center"})=>{var n;(n=e.current)==null||n.scrollIntoView(s)},handleScrollToTopOfPage:()=>{window.scrollTo({top:0,behavior:"smooth"})}}}const St=b.createContext({}),Ie=()=>b.useContext(St),Kt=e=>{const{control:i}=Ie();return Pe({control:i,...e})},Gt=({onSubmit:e,children:i,resolver:r,changeStepScrollMode:s="step",...n})=>{const{trigger:a,getValues:c,setValue:V,register:_,unregister:F,control:w,reset:x}=$t({resolver:r,mode:"onBlur"}),[g,B]=b.useState(0),[C,Y]=b.useState([]),{scrollRef:Z,handleScrollOnElement:se,handleScrollToTopOfPage:S}=bt();b.useEffect(()=>{const h=setTimeout(()=>{Z&&s==="step"?se():S()},100);return()=>clearTimeout(h)},[g,se,Z,S,s]);const U=b.useMemo(()=>{if(b.Children.toArray(i).some(p=>!b.isValidElement(p)||p.type!==Oe))throw new Error("SmartStepper only accepts Step components as children.");return b.Children.toArray(i)},[i]),I=(h,p=[])=>h.length<1?[]:(h.forEach(A=>{b.isValidElement(A)&&A.type===Oe&&(p.push(A.props.stepName),I(b.Children.toArray(A.props.children),p))}),p),O=b.useMemo(()=>I(U),[U]),j=b.useMemo(()=>{var h;return((h=U[g])==null?void 0:h.props.fieldsForValidation)||[]},[g,U]),ee=async h=>{h.preventDefault(),await a(j)&&e&&e(c())},ae=async(h,p)=>{h?(p&&F(j),B(O.indexOf(h)),Y(A=>A.some(k=>k===g)?A:[...A,g])):await a(j)&&(Y(k=>k.some(P=>P===g)?k:[...k,g]),B(k=>k===b.Children.count(i)-1?k:k+1))},q=()=>{if(C.length!==0){const h=C[C.length-1];F(j),B(h)}Y(h=>h.slice(0,h.length-1))},Q=h=>{const p=O.indexOf(h);if(p<0)throw new Error("There is not step with the name of targetStep");if(g<p)throw new Error("Target step should not be after the current step");{B(p);const A=C.indexOf(p);C.filter((P,$)=>P!==p&&$>A).forEach(P=>{const $=U[P].props.fieldsForValidation||[];F($)}),F(j),Y(C.slice(0,A))}},H=async()=>await a(j),m=()=>b.Children.toArray(i)[g];return le.jsx(St.Provider,{value:{navigateToNextStep:ae,navigateToPreviousStep:q,navigateToPreviousStepWithTargetStep:Q,registerStepperFields:_,getStepperFieldValues:c,setStepperFieldValues:V,stepperFieldResetter:x,canNavigateToNextStep:H,control:w},children:le.jsx("div",{ref:Z,children:le.jsx("form",{onSubmit:ee,...n,children:m()})})})},Oe=({children:e})=>le.jsx(le.Fragment,{children:e}),zt=e=>{const{control:i}=Ie();return le.jsx(Rt,{control:i,...e})},Jt=Object.assign(Gt,{Step:Oe,Controller:zt});exports.SmartStepper=Jt;exports.useController=Pe;exports.useScroll=bt;exports.useSmartStepper=Ie;exports.useSmartStepperController=Kt;
{
"name": "smartstepper",
"description": "SmartStepper is a powerful React component that simplifies the creation of multi-step forms with state management, validation, and a flexible UI approach. It utilizes a state machine concept to manage step transitions, ensuring a smooth and controlled user experience",
"version": "1.0.83",
"version": "1.9.0",
"main": "./index.js",

@@ -6,0 +6,0 @@ "types": "./index.d.ts",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc