(function(m,s,u,t){"use strict";const p=u.default||u;function w(y,A,F={}){const{validateOption:R={},immediate:o=!0,manual:i=!1}=F,c=s.toRef(y),a=t.shallowRef(null),r=t.shallowRef(!0),l=t.ref(!o||i),d=t.computed(()=>{var e;return((e=a.value)==null?void 0:e.errors)||[]}),f=t.computed(()=>{var e;return((e=a.value)==null?void 0:e.fields)||{}}),v=t.computed(()=>new p(t.toValue(A))),h=async()=>{r.value=!1,l.value=!1;try{await v.value.validate(c.value,R),l.value=!0,a.value=null}catch(e){a.value=e}finally{r.value=!0}return{pass:l.value,errorInfo:a.value,errors:d.value,errorFields:f.value}};i||t.watch([c,v],()=>h(),{immediate:o,deep:!0});const V={isFinished:r,pass:l,errors:d,errorInfo:a,errorFields:f,execute:h};function U(){return new Promise((e,n)=>{s.until(r).toBe(!0).then(()=>e(V)).catch(I=>n(I))})}return{...V,then(e,n){return U().then(e,n)}}}m.useAsyncValidator=w})(this.VueUse=this.VueUse||{},VueUse,AsyncValidator,Vue);