@splitty-test/validation 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FieldValidation.vue.d.ts +12 -5
- package/dist/FieldValidator.d.ts +50 -0
- package/dist/FieldValidatorGroup.d.ts +18 -0
- package/dist/FormValidator.d.ts +32 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.mjs +1512 -1155
- package/dist/index.umd.js +1 -1
- package/dist/rules/email.d.ts +1 -0
- package/dist/rules/index.d.ts +10 -2
- package/dist/rules/match.d.ts +1 -1
- package/dist/rules/matchRegExp.d.ts +1 -0
- package/dist/rules/maxLength.d.ts +1 -0
- package/dist/rules/maxValue.d.ts +1 -0
- package/dist/rules/minLength.d.ts +1 -0
- package/dist/rules/minValue.d.ts +1 -0
- package/dist/rules/notNil.d.ts +1 -0
- package/dist/rules/required.d.ts +6 -0
- package/dist/utils/zodValidation.d.ts +4 -0
- package/package.json +3 -2
- package/dist/FieldValidatorClass.d.ts +0 -22
- package/dist/ValidatorClass.d.ts +0 -24
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(I,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],$):(I=typeof globalThis<"u"?globalThis:I||self,$(I.Validation={},I.Vue))})(this,(function(I,$){"use strict";var Yr=typeof global=="object"&&global&&global.Object===Object&&global,mi=typeof self=="object"&&self&&self.Object===Object&&self,M=Yr||mi||Function("return this")(),U=M.Symbol,Xr=Object.prototype,_i=Xr.hasOwnProperty,Oi=Xr.toString,Z=U?U.toStringTag:void 0;function Ti(e){var r=_i.call(e,Z),t=e[Z];try{e[Z]=void 0;var n=!0}catch{}var i=Oi.call(e);return n&&(r?e[Z]=t:delete e[Z]),i}var wi=Object.prototype,Si=wi.toString;function Ei(e){return Si.call(e)}var Pi="[object Null]",qi="[object Undefined]",Zr=U?U.toStringTag:void 0;function H(e){return e==null?e===void 0?qi:Pi:Zr&&Zr in Object(e)?Ti(e):Ei(e)}function Y(e){return e!=null&&typeof e=="object"}var Ii="[object Symbol]";function pe(e){return typeof e=="symbol"||Y(e)&&H(e)==Ii}function Ri(e,r){for(var t=-1,n=e==null?0:e.length,i=Array(n);++t<n;)i[t]=r(e[t],t,e);return i}var F=Array.isArray,Jr=U?U.prototype:void 0,et=Jr?Jr.toString:void 0;function rt(e){if(typeof e=="string")return e;if(F(e))return Ri(e,rt)+"";if(pe(e))return et?et.call(e):"";var r=e+"";return r=="0"&&1/e==-1/0?"-0":r}function ae(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function tt(e){return e}var Ai="[object AsyncFunction]",ji="[object Function]",Ci="[object GeneratorFunction]",$i="[object Proxy]";function nt(e){if(!ae(e))return!1;var r=H(e);return r==ji||r==Ci||r==Ai||r==$i}var ye=M["__core-js_shared__"],it=(function(){var e=/[^.]+$/.exec(ye&&ye.keys&&ye.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Di(e){return!!it&&it in e}var Mi=Function.prototype,Fi=Mi.toString;function V(e){if(e!=null){try{return Fi.call(e)}catch{}try{return e+""}catch{}}return""}var Ni=/[\\^$.*+?()[\]{}|]/g,Li=/^\[object .+?Constructor\]$/,xi=Function.prototype,Bi=Object.prototype,Ui=xi.toString,Gi=Bi.hasOwnProperty,ki=RegExp("^"+Ui.call(Gi).replace(Ni,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vi(e){if(!ae(e)||Di(e))return!1;var r=nt(e)?ki:Li;return r.test(V(e))}function zi(e,r){return e?.[r]}function X(e,r){var t=zi(e,r);return Vi(t)?t:void 0}var ge=X(M,"WeakMap"),Wi=9007199254740991,Qi=/^(?:0|[1-9]\d*)$/;function be(e,r){var t=typeof e;return r=r??Wi,!!r&&(t=="number"||t!="symbol"&&Qi.test(e))&&e>-1&&e%1==0&&e<r}function at(e,r){return e===r||e!==e&&r!==r}var Ki=9007199254740991;function me(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ki}function ot(e){return e!=null&&me(e.length)&&!nt(e)}var Hi=Object.prototype;function ut(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||Hi;return e===t}function Yi(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Xi="[object Arguments]";function st(e){return Y(e)&&H(e)==Xi}var lt=Object.prototype,Zi=lt.hasOwnProperty,Ji=lt.propertyIsEnumerable,ct=st((function(){return arguments})())?st:function(e){return Y(e)&&Zi.call(e,"callee")&&!Ji.call(e,"callee")};function ea(){return!1}var ft=typeof I=="object"&&I&&!I.nodeType&&I,dt=ft&&typeof module=="object"&&module&&!module.nodeType&&module,ra=dt&&dt.exports===ft,vt=ra?M.Buffer:void 0,ta=vt?vt.isBuffer:void 0,_e=ta||ea,na="[object Arguments]",ia="[object Array]",aa="[object Boolean]",oa="[object Date]",ua="[object Error]",sa="[object Function]",la="[object Map]",ca="[object Number]",fa="[object Object]",da="[object RegExp]",va="[object Set]",ha="[object String]",pa="[object WeakMap]",ya="[object ArrayBuffer]",ga="[object DataView]",ba="[object Float32Array]",ma="[object Float64Array]",_a="[object Int8Array]",Oa="[object Int16Array]",Ta="[object Int32Array]",wa="[object Uint8Array]",Sa="[object Uint8ClampedArray]",Ea="[object Uint16Array]",Pa="[object Uint32Array]",_={};_[ba]=_[ma]=_[_a]=_[Oa]=_[Ta]=_[wa]=_[Sa]=_[Ea]=_[Pa]=!0,_[na]=_[ia]=_[ya]=_[aa]=_[ga]=_[oa]=_[ua]=_[sa]=_[la]=_[ca]=_[fa]=_[da]=_[va]=_[ha]=_[pa]=!1;function qa(e){return Y(e)&&me(e.length)&&!!_[H(e)]}function Ia(e){return function(r){return e(r)}}var ht=typeof I=="object"&&I&&!I.nodeType&&I,J=ht&&typeof module=="object"&&module&&!module.nodeType&&module,Ra=J&&J.exports===ht,Oe=Ra&&Yr.process,pt=(function(){try{var e=J&&J.require&&J.require("util").types;return e||Oe&&Oe.binding&&Oe.binding("util")}catch{}})(),yt=pt&&pt.isTypedArray,gt=yt?Ia(yt):qa,Aa=Object.prototype,ja=Aa.hasOwnProperty;function bt(e,r){var t=F(e),n=!t&&ct(e),i=!t&&!n&&_e(e),a=!t&&!n&&!i&>(e),o=t||n||i||a,u=o?Yi(e.length,String):[],l=u.length;for(var s in e)(r||ja.call(e,s))&&!(o&&(s=="length"||i&&(s=="offset"||s=="parent")||a&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||be(s,l)))&&u.push(s);return u}function Ca(e,r){return function(t){return e(r(t))}}var $a=Ca(Object.keys,Object),Da=Object.prototype,Ma=Da.hasOwnProperty;function Fa(e){if(!ut(e))return $a(e);var r=[];for(var t in Object(e))Ma.call(e,t)&&t!="constructor"&&r.push(t);return r}function mt(e){return ot(e)?bt(e):Fa(e)}function Na(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var La=Object.prototype,xa=La.hasOwnProperty;function Ba(e){if(!ae(e))return Na(e);var r=ut(e),t=[];for(var n in e)n=="constructor"&&(r||!xa.call(e,n))||t.push(n);return t}function Ua(e){return ot(e)?bt(e,!0):Ba(e)}var Ga=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ka=/^\w*$/;function Te(e,r){if(F(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||pe(e)?!0:ka.test(e)||!Ga.test(e)||r!=null&&e in Object(r)}var ee=X(Object,"create");function Va(){this.__data__=ee?ee(null):{},this.size=0}function za(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var Wa="__lodash_hash_undefined__",Qa=Object.prototype,Ka=Qa.hasOwnProperty;function Ha(e){var r=this.__data__;if(ee){var t=r[e];return t===Wa?void 0:t}return Ka.call(r,e)?r[e]:void 0}var Ya=Object.prototype,Xa=Ya.hasOwnProperty;function Za(e){var r=this.__data__;return ee?r[e]!==void 0:Xa.call(r,e)}var Ja="__lodash_hash_undefined__";function eo(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ee&&r===void 0?Ja:r,this}function z(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}z.prototype.clear=Va,z.prototype.delete=za,z.prototype.get=Ha,z.prototype.has=Za,z.prototype.set=eo;function ro(){this.__data__=[],this.size=0}function oe(e,r){for(var t=e.length;t--;)if(at(e[t][0],r))return t;return-1}var to=Array.prototype,no=to.splice;function io(e){var r=this.__data__,t=oe(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():no.call(r,t,1),--this.size,!0}function ao(e){var r=this.__data__,t=oe(r,e);return t<0?void 0:r[t][1]}function oo(e){return oe(this.__data__,e)>-1}function uo(e,r){var t=this.__data__,n=oe(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}function N(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}N.prototype.clear=ro,N.prototype.delete=io,N.prototype.get=ao,N.prototype.has=oo,N.prototype.set=uo;var re=X(M,"Map");function so(){this.size=0,this.__data__={hash:new z,map:new(re||N),string:new z}}function lo(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function ue(e,r){var t=e.__data__;return lo(r)?t[typeof r=="string"?"string":"hash"]:t.map}function co(e){var r=ue(this,e).delete(e);return this.size-=r?1:0,r}function fo(e){return ue(this,e).get(e)}function vo(e){return ue(this,e).has(e)}function ho(e,r){var t=ue(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}function L(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}L.prototype.clear=so,L.prototype.delete=co,L.prototype.get=fo,L.prototype.has=vo,L.prototype.set=ho;var po="Expected a function";function we(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(po);var t=function(){var n=arguments,i=r?r.apply(this,n):n[0],a=t.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return t.cache=a.set(i,o)||a,o};return t.cache=new(we.Cache||L),t}we.Cache=L;var yo=500;function go(e){var r=we(e,function(n){return t.size===yo&&t.clear(),n}),t=r.cache;return r}var bo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mo=/\\(\\)?/g,_o=go(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(bo,function(t,n,i,a){r.push(i?a.replace(mo,"$1"):n||t)}),r});function Oo(e){return e==null?"":rt(e)}function Se(e,r){return F(e)?e:Te(e,r)?[e]:_o(Oo(e))}function te(e){if(typeof e=="string"||pe(e))return e;var r=e+"";return r=="0"&&1/e==-1/0?"-0":r}function Ee(e,r){r=Se(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[te(r[t++])];return t&&t==n?e:void 0}function To(e,r,t){var n=e==null?void 0:Ee(e,r);return n===void 0?t:n}function wo(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}function So(e,r,t){var n=-1,i=e.length;r<0&&(r=-r>i?0:i+r),t=t>i?i:t,t<0&&(t+=i),i=r>t?0:t-r>>>0,r>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+r];return a}function Eo(){this.__data__=new N,this.size=0}function Po(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}function qo(e){return this.__data__.get(e)}function Io(e){return this.__data__.has(e)}var Ro=200;function Ao(e,r){var t=this.__data__;if(t instanceof N){var n=t.__data__;if(!re||n.length<Ro-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new L(n)}return t.set(e,r),this.size=t.size,this}function x(e){var r=this.__data__=new N(e);this.size=r.size}x.prototype.clear=Eo,x.prototype.delete=Po,x.prototype.get=qo,x.prototype.has=Io,x.prototype.set=Ao;function jo(e,r){for(var t=-1,n=e==null?0:e.length,i=0,a=[];++t<n;){var o=e[t];r(o,t,e)&&(a[i++]=o)}return a}function Co(){return[]}var $o=Object.prototype,Do=$o.propertyIsEnumerable,_t=Object.getOwnPropertySymbols,Mo=_t?function(e){return e==null?[]:(e=Object(e),jo(_t(e),function(r){return Do.call(e,r)}))}:Co;function Fo(e,r,t){var n=r(e);return F(e)?n:wo(n,t(e))}function Ot(e){return Fo(e,mt,Mo)}var Pe=X(M,"DataView"),qe=X(M,"Promise"),Ie=X(M,"Set"),Tt="[object Map]",No="[object Object]",wt="[object Promise]",St="[object Set]",Et="[object WeakMap]",Pt="[object DataView]",Lo=V(Pe),xo=V(re),Bo=V(qe),Uo=V(Ie),Go=V(ge),G=H;(Pe&&G(new Pe(new ArrayBuffer(1)))!=Pt||re&&G(new re)!=Tt||qe&&G(qe.resolve())!=wt||Ie&&G(new Ie)!=St||ge&&G(new ge)!=Et)&&(G=function(e){var r=H(e),t=r==No?e.constructor:void 0,n=t?V(t):"";if(n)switch(n){case Lo:return Pt;case xo:return Tt;case Bo:return wt;case Uo:return St;case Go:return Et}return r});var qt=M.Uint8Array,ko="__lodash_hash_undefined__";function Vo(e){return this.__data__.set(e,ko),this}function zo(e){return this.__data__.has(e)}function se(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new L;++r<t;)this.add(e[r])}se.prototype.add=se.prototype.push=Vo,se.prototype.has=zo;function Wo(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}function Qo(e,r){return e.has(r)}var Ko=1,Ho=2;function It(e,r,t,n,i,a){var o=t&Ko,u=e.length,l=r.length;if(u!=l&&!(o&&l>u))return!1;var s=a.get(e),h=a.get(r);if(s&&h)return s==r&&h==e;var c=-1,d=!0,v=t&Ho?new se:void 0;for(a.set(e,r),a.set(r,e);++c<u;){var f=e[c],y=r[c];if(n)var T=o?n(y,f,c,r,e,a):n(f,y,c,e,r,a);if(T!==void 0){if(T)continue;d=!1;break}if(v){if(!Wo(r,function(S,R){if(!Qo(v,R)&&(f===S||i(f,S,t,n,a)))return v.push(R)})){d=!1;break}}else if(!(f===y||i(f,y,t,n,a))){d=!1;break}}return a.delete(e),a.delete(r),d}function Yo(e){var r=-1,t=Array(e.size);return e.forEach(function(n,i){t[++r]=[i,n]}),t}function Xo(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var Zo=1,Jo=2,eu="[object Boolean]",ru="[object Date]",tu="[object Error]",nu="[object Map]",iu="[object Number]",au="[object RegExp]",ou="[object Set]",uu="[object String]",su="[object Symbol]",lu="[object ArrayBuffer]",cu="[object DataView]",Rt=U?U.prototype:void 0,Re=Rt?Rt.valueOf:void 0;function fu(e,r,t,n,i,a,o){switch(t){case cu:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case lu:return!(e.byteLength!=r.byteLength||!a(new qt(e),new qt(r)));case eu:case ru:case iu:return at(+e,+r);case tu:return e.name==r.name&&e.message==r.message;case au:case uu:return e==r+"";case nu:var u=Yo;case ou:var l=n&Zo;if(u||(u=Xo),e.size!=r.size&&!l)return!1;var s=o.get(e);if(s)return s==r;n|=Jo,o.set(e,r);var h=It(u(e),u(r),n,i,a,o);return o.delete(e),h;case su:if(Re)return Re.call(e)==Re.call(r)}return!1}var du=1,vu=Object.prototype,hu=vu.hasOwnProperty;function pu(e,r,t,n,i,a){var o=t&du,u=Ot(e),l=u.length,s=Ot(r),h=s.length;if(l!=h&&!o)return!1;for(var c=l;c--;){var d=u[c];if(!(o?d in r:hu.call(r,d)))return!1}var v=a.get(e),f=a.get(r);if(v&&f)return v==r&&f==e;var y=!0;a.set(e,r),a.set(r,e);for(var T=o;++c<l;){d=u[c];var S=e[d],R=r[d];if(n)var q=o?n(R,S,d,r,e,a):n(S,R,d,e,r,a);if(!(q===void 0?S===R||i(S,R,t,n,a):q)){y=!1;break}T||(T=d=="constructor")}if(y&&!T){var m=e.constructor,E=r.constructor;m!=E&&"constructor"in e&&"constructor"in r&&!(typeof m=="function"&&m instanceof m&&typeof E=="function"&&E instanceof E)&&(y=!1)}return a.delete(e),a.delete(r),y}var yu=1,At="[object Arguments]",jt="[object Array]",le="[object Object]",gu=Object.prototype,Ct=gu.hasOwnProperty;function bu(e,r,t,n,i,a){var o=F(e),u=F(r),l=o?jt:G(e),s=u?jt:G(r);l=l==At?le:l,s=s==At?le:s;var h=l==le,c=s==le,d=l==s;if(d&&_e(e)){if(!_e(r))return!1;o=!0,h=!1}if(d&&!h)return a||(a=new x),o||gt(e)?It(e,r,t,n,i,a):fu(e,r,l,t,n,i,a);if(!(t&yu)){var v=h&&Ct.call(e,"__wrapped__"),f=c&&Ct.call(r,"__wrapped__");if(v||f){var y=v?e.value():e,T=f?r.value():r;return a||(a=new x),i(y,T,t,n,a)}}return d?(a||(a=new x),pu(e,r,t,n,i,a)):!1}function ce(e,r,t,n,i){return e===r?!0:e==null||r==null||!Y(e)&&!Y(r)?e!==e&&r!==r:bu(e,r,t,n,ce,i)}var mu=1,_u=2;function Ou(e,r,t,n){var i=t.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var o=t[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){o=t[i];var u=o[0],l=e[u],s=o[1];if(o[2]){if(l===void 0&&!(u in e))return!1}else{var h=new x,c;if(!(c===void 0?ce(s,l,mu|_u,n,h):c))return!1}}return!0}function $t(e){return e===e&&!ae(e)}function Tu(e){for(var r=mt(e),t=r.length;t--;){var n=r[t],i=e[n];r[t]=[n,i,$t(i)]}return r}function Dt(e,r){return function(t){return t==null?!1:t[e]===r&&(r!==void 0||e in Object(t))}}function wu(e){var r=Tu(e);return r.length==1&&r[0][2]?Dt(r[0][0],r[0][1]):function(t){return t===e||Ou(t,e,r)}}function Su(e,r){return e!=null&&r in Object(e)}function Eu(e,r,t){r=Se(r,e);for(var n=-1,i=r.length,a=!1;++n<i;){var o=te(r[n]);if(!(a=e!=null&&t(e,o)))break;e=e[o]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&me(i)&&be(o,i)&&(F(e)||ct(e)))}function Pu(e,r){return e!=null&&Eu(e,r,Su)}var qu=1,Iu=2;function Ru(e,r){return Te(e)&&$t(r)?Dt(te(e),r):function(t){var n=To(t,e);return n===void 0&&n===r?Pu(t,e):ce(r,n,qu|Iu)}}function Au(e){return function(r){return r?.[e]}}function ju(e){return function(r){return Ee(r,e)}}function Cu(e){return Te(e)?Au(te(e)):ju(e)}function $u(e){return typeof e=="function"?e:e==null?tt:typeof e=="object"?F(e)?Ru(e[0],e[1]):wu(e):Cu(e)}function Du(e){return function(r,t,n){for(var i=-1,a=Object(r),o=n(r),u=o.length;u--;){var l=o[++i];if(t(a[l],l,a)===!1)break}return r}}var Mu=Du();function Fu(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}function Nu(e){return typeof e=="function"?e:tt}function Ae(e,r){return e==null?e:Mu(e,Nu(r),Ua)}function Lu(e,r){return r.length<2?e:Ee(e,So(r,0,-1))}function xu(e,r){return ce(e,r)}function Bu(e,r){return r=Se(r,e),e=Lu(e,r),e==null||delete e[te(Fu(r))]}var Uu=Array.prototype,Gu=Uu.splice;function ku(e,r){for(var t=e?r.length:0,n=t-1;t--;){var i=r[t];if(t==n||i!==a){var a=i;be(i)?Gu.call(e,i,1):Bu(e,i)}}return e}function Vu(e,r){var t=[];if(!(e&&e.length))return t;var n=-1,i=[],a=e.length;for(r=$u(r);++n<a;){var o=e[n];r(o,n,e)&&(t.push(o),i.push(n))}return ku(e,i),t}async function*zu(e){for await(const r of e)yield r}var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ft(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var je,Nt;function Wu(){if(Nt)return je;Nt=1,je=r;class e extends Error{}e.prototype.name="AssertionError";function r(t,n){if(!t){var i=new e(n);throw Error.captureStackTrace&&Error.captureStackTrace(i,r),i}}return je}var Qu=Wu();const w=Ft(Qu);function Lt(e){return w(typeof e=="function","fct must be a function"),async function(){return e(...arguments)}}class xt extends Error{constructor(r){super(r),this.name=this.constructor.name}}class Ku{constructor(){this._promise=new Promise((r,t)=>{this._resolve=r,this._reject=t})}get promise(){return this._promise}get resolve(){return this._resolve}get reject(){return this._reject}}var ne,Bt;function C(){if(Bt)return ne;Bt=1;var e=function(r){return r&&r.Math===Math&&r};return ne=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof Mt=="object"&&Mt)||e(typeof ne=="object"&&ne)||(function(){return this})()||Function("return this")(),ne}var Ce,Ut;function B(){return Ut||(Ut=1,Ce=function(e){try{return!!e()}catch{return!0}}),Ce}var $e,Gt;function fe(){if(Gt)return $e;Gt=1;var e=B();return $e=!e(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),$e}var De,kt;function Vt(){if(kt)return De;kt=1;var e=fe(),r=Function.prototype,t=r.apply,n=r.call;return De=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(t):function(){return n.apply(t,arguments)}),De}var Me,zt;function W(){if(zt)return Me;zt=1;var e=fe(),r=Function.prototype,t=r.call,n=e&&r.bind.bind(t,t);return Me=e?n:function(i){return function(){return t.apply(i,arguments)}},Me}var Fe,Wt;function Ne(){if(Wt)return Fe;Wt=1;var e=W(),r=e({}.toString),t=e("".slice);return Fe=function(n){return t(r(n),8,-1)},Fe}var Le,Qt;function Kt(){if(Qt)return Le;Qt=1;var e=Ne(),r=W();return Le=function(t){if(e(t)==="Function")return r(t)},Le}var xe,Ht;function k(){if(Ht)return xe;Ht=1;var e=typeof document=="object"&&document.all;return xe=typeof e>"u"&&e!==void 0?function(r){return typeof r=="function"||r===e}:function(r){return typeof r=="function"},xe}var Be={},Ue,Yt;function Q(){if(Yt)return Ue;Yt=1;var e=B();return Ue=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Ue}var Ge,Xt;function ke(){if(Xt)return Ge;Xt=1;var e=fe(),r=Function.prototype.call;return Ge=e?r.bind(r):function(){return r.apply(r,arguments)},Ge}var Ve={},Zt;function Hu(){if(Zt)return Ve;Zt=1;var e={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,t=r&&!e.call({1:2},1);return Ve.f=t?function(i){var a=r(this,i);return!!a&&a.enumerable}:e,Ve}var ze,Jt;function en(){return Jt||(Jt=1,ze=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}),ze}var We,rn;function Yu(){if(rn)return We;rn=1;var e=W(),r=B(),t=Ne(),n=Object,i=e("".split);return We=r(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return t(a)==="String"?i(a,""):n(a)}:n,We}var Qe,tn;function nn(){return tn||(tn=1,Qe=function(e){return e==null}),Qe}var Ke,an;function on(){if(an)return Ke;an=1;var e=nn(),r=TypeError;return Ke=function(t){if(e(t))throw new r("Can't call method on "+t);return t},Ke}var He,un;function Xu(){if(un)return He;un=1;var e=Yu(),r=on();return He=function(t){return e(r(t))},He}var Ye,sn;function de(){if(sn)return Ye;sn=1;var e=k();return Ye=function(r){return typeof r=="object"?r!==null:e(r)},Ye}var Xe,ln;function Ze(){return ln||(ln=1,Xe={}),Xe}var Je,cn;function fn(){if(cn)return Je;cn=1;var e=Ze(),r=C(),t=k(),n=function(i){return t(i)?i:void 0};return Je=function(i,a){return arguments.length<2?n(e[i])||n(r[i]):e[i]&&e[i][a]||r[i]&&r[i][a]},Je}var er,dn;function Zu(){if(dn)return er;dn=1;var e=W();return er=e({}.isPrototypeOf),er}var rr,vn;function ie(){if(vn)return rr;vn=1;var e=C(),r=e.navigator,t=r&&r.userAgent;return rr=t?String(t):"",rr}var tr,hn;function Ju(){if(hn)return tr;hn=1;var e=C(),r=ie(),t=e.process,n=e.Deno,i=t&&t.versions||n&&n.version,a=i&&i.v8,o,u;return a&&(o=a.split("."),u=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!u&&r&&(o=r.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=r.match(/Chrome\/(\d+)/),o&&(u=+o[1]))),tr=u,tr}var nr,pn;function yn(){if(pn)return nr;pn=1;var e=Ju(),r=B(),t=C(),n=t.String;return nr=!!Object.getOwnPropertySymbols&&!r(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),nr}var ir,gn;function bn(){if(gn)return ir;gn=1;var e=yn();return ir=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ir}var ar,mn;function _n(){if(mn)return ar;mn=1;var e=fn(),r=k(),t=Zu(),n=bn(),i=Object;return ar=n?function(a){return typeof a=="symbol"}:function(a){var o=e("Symbol");return r(o)&&t(o.prototype,i(a))},ar}var or,On;function es(){if(On)return or;On=1;var e=String;return or=function(r){try{return e(r)}catch{return"Object"}},or}var ur,Tn;function sr(){if(Tn)return ur;Tn=1;var e=k(),r=es(),t=TypeError;return ur=function(n){if(e(n))return n;throw new t(r(n)+" is not a function")},ur}var lr,wn;function rs(){if(wn)return lr;wn=1;var e=sr(),r=nn();return lr=function(t,n){var i=t[n];return r(i)?void 0:e(i)},lr}var cr,Sn;function ts(){if(Sn)return cr;Sn=1;var e=ke(),r=k(),t=de(),n=TypeError;return cr=function(i,a){var o,u;if(a==="string"&&r(o=i.toString)&&!t(u=e(o,i))||r(o=i.valueOf)&&!t(u=e(o,i))||a!=="string"&&r(o=i.toString)&&!t(u=e(o,i)))return u;throw new n("Can't convert object to primitive value")},cr}var fr={exports:{}},dr,En;function ns(){return En||(En=1,dr=!0),dr}var vr,Pn;function is(){if(Pn)return vr;Pn=1;var e=C(),r=Object.defineProperty;return vr=function(t,n){try{r(e,t,{value:n,configurable:!0,writable:!0})}catch{e[t]=n}return n},vr}var qn;function as(){if(qn)return fr.exports;qn=1;var e=ns(),r=C(),t=is(),n="__core-js_shared__",i=fr.exports=r[n]||t(n,{});return(i.versions||(i.versions=[])).push({version:"3.45.1",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),fr.exports}var hr,In;function os(){if(In)return hr;In=1;var e=as();return hr=function(r,t){return e[r]||(e[r]=t||{})},hr}var pr,Rn;function us(){if(Rn)return pr;Rn=1;var e=on(),r=Object;return pr=function(t){return r(e(t))},pr}var yr,An;function ve(){if(An)return yr;An=1;var e=W(),r=us(),t=e({}.hasOwnProperty);return yr=Object.hasOwn||function(i,a){return t(r(i),a)},yr}var gr,jn;function ss(){if(jn)return gr;jn=1;var e=W(),r=0,t=Math.random(),n=e(1.1.toString);return gr=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++r+t,36)},gr}var br,Cn;function ls(){if(Cn)return br;Cn=1;var e=C(),r=os(),t=ve(),n=ss(),i=yn(),a=bn(),o=e.Symbol,u=r("wks"),l=a?o.for||o:o&&o.withoutSetter||n;return br=function(s){return t(u,s)||(u[s]=i&&t(o,s)?o[s]:l("Symbol."+s)),u[s]},br}var mr,$n;function cs(){if($n)return mr;$n=1;var e=ke(),r=de(),t=_n(),n=rs(),i=ts(),a=ls(),o=TypeError,u=a("toPrimitive");return mr=function(l,s){if(!r(l)||t(l))return l;var h=n(l,u),c;if(h){if(s===void 0&&(s="default"),c=e(h,l,s),!r(c)||t(c))return c;throw new o("Can't convert object to primitive value")}return s===void 0&&(s="number"),i(l,s)},mr}var _r,Dn;function Mn(){if(Dn)return _r;Dn=1;var e=cs(),r=_n();return _r=function(t){var n=e(t,"string");return r(n)?n:n+""},_r}var Or,Fn;function Nn(){if(Fn)return Or;Fn=1;var e=C(),r=de(),t=e.document,n=r(t)&&r(t.createElement);return Or=function(i){return n?t.createElement(i):{}},Or}var Tr,Ln;function xn(){if(Ln)return Tr;Ln=1;var e=Q(),r=B(),t=Nn();return Tr=!e&&!r(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Tr}var Bn;function fs(){if(Bn)return Be;Bn=1;var e=Q(),r=ke(),t=Hu(),n=en(),i=Xu(),a=Mn(),o=ve(),u=xn(),l=Object.getOwnPropertyDescriptor;return Be.f=e?l:function(h,c){if(h=i(h),c=a(c),u)try{return l(h,c)}catch{}if(o(h,c))return n(!r(t.f,h,c),h[c])},Be}var wr,Un;function ds(){if(Un)return wr;Un=1;var e=B(),r=k(),t=/#|\.prototype\./,n=function(l,s){var h=a[i(l)];return h===u?!0:h===o?!1:r(s)?e(s):!!s},i=n.normalize=function(l){return String(l).replace(t,".").toLowerCase()},a=n.data={},o=n.NATIVE="N",u=n.POLYFILL="P";return wr=n,wr}var Sr,Gn;function Er(){if(Gn)return Sr;Gn=1;var e=Kt(),r=sr(),t=fe(),n=e(e.bind);return Sr=function(i,a){return r(i),a===void 0?i:t?n(i,a):function(){return i.apply(a,arguments)}},Sr}var Pr={},qr,kn;function vs(){if(kn)return qr;kn=1;var e=Q(),r=B();return qr=e&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),qr}var Ir,Vn;function hs(){if(Vn)return Ir;Vn=1;var e=de(),r=String,t=TypeError;return Ir=function(n){if(e(n))return n;throw new t(r(n)+" is not an object")},Ir}var zn;function ps(){if(zn)return Pr;zn=1;var e=Q(),r=xn(),t=vs(),n=hs(),i=Mn(),a=TypeError,o=Object.defineProperty,u=Object.getOwnPropertyDescriptor,l="enumerable",s="configurable",h="writable";return Pr.f=e?t?function(d,v,f){if(n(d),v=i(v),n(f),typeof d=="function"&&v==="prototype"&&"value"in f&&h in f&&!f[h]){var y=u(d,v);y&&y[h]&&(d[v]=f.value,f={configurable:s in f?f[s]:y[s],enumerable:l in f?f[l]:y[l],writable:!1})}return o(d,v,f)}:o:function(d,v,f){if(n(d),v=i(v),n(f),r)try{return o(d,v,f)}catch{}if("get"in f||"set"in f)throw new a("Accessors not supported");return"value"in f&&(d[v]=f.value),d},Pr}var Rr,Wn;function ys(){if(Wn)return Rr;Wn=1;var e=Q(),r=ps(),t=en();return Rr=e?function(n,i,a){return r.f(n,i,t(1,a))}:function(n,i,a){return n[i]=a,n},Rr}var Ar,Qn;function gs(){if(Qn)return Ar;Qn=1;var e=C(),r=Vt(),t=Kt(),n=k(),i=fs().f,a=ds(),o=Ze(),u=Er(),l=ys(),s=ve(),h=function(c){var d=function(v,f,y){if(this instanceof d){switch(arguments.length){case 0:return new c;case 1:return new c(v);case 2:return new c(v,f)}return new c(v,f,y)}return r(c,this,arguments)};return d.prototype=c.prototype,d};return Ar=function(c,d){var v=c.target,f=c.global,y=c.stat,T=c.proto,S=f?e:y?e[v]:e[v]&&e[v].prototype,R=f?o:o[v]||l(o,v,{})[v],q=R.prototype,m,E,j,O,A,p,g,b,D;for(O in d)m=a(f?O:v+(y?".":"#")+O,c.forced),E=!m&&S&&s(S,O),p=R[O],E&&(c.dontCallGetSet?(D=i(S,O),g=D&&D.value):g=S[O]),A=E&&g?g:d[O],!(!m&&!T&&typeof p==typeof A)&&(c.bind&&E?b=u(A,e):c.wrap&&E?b=h(A):T&&n(A)?b=t(A):b=A,(c.sham||A&&A.sham||p&&p.sham)&&l(b,"sham",!0),l(R,O,b),T&&(j=v+"Prototype",s(o,j)||l(o,j,{}),l(o[j],O,A),c.real&&q&&(m||!q[O])&&l(q,O,A)))},Ar}var jr,Kn;function bs(){if(Kn)return jr;Kn=1;var e=fn();return jr=e("document","documentElement"),jr}var Cr,Hn;function ms(){if(Hn)return Cr;Hn=1;var e=W();return Cr=e([].slice),Cr}var $r,Yn;function Xn(){if(Yn)return $r;Yn=1;var e=TypeError;return $r=function(r,t){if(r<t)throw new e("Not enough arguments");return r},$r}var Dr,Zn;function Jn(){if(Zn)return Dr;Zn=1;var e=ie();return Dr=/(?:ipad|iphone|ipod).*applewebkit/i.test(e),Dr}var Mr,ei;function _s(){if(ei)return Mr;ei=1;var e=C(),r=ie(),t=Ne(),n=function(i){return r.slice(0,i.length)===i};return Mr=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":t(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"})(),Mr}var Fr,ri;function ti(){if(ri)return Fr;ri=1;var e=_s();return Fr=e==="NODE",Fr}var Nr,ni;function Os(){if(ni)return Nr;ni=1;var e=C(),r=Vt(),t=Er(),n=k(),i=ve(),a=B(),o=bs(),u=ms(),l=Nn(),s=Xn(),h=Jn(),c=ti(),d=e.setImmediate,v=e.clearImmediate,f=e.process,y=e.Dispatch,T=e.Function,S=e.MessageChannel,R=e.String,q=0,m={},E="onreadystatechange",j,O,A,p;a(function(){j=e.location});var g=function(P){if(i(m,P)){var K=m[P];delete m[P],K()}},b=function(P){return function(){g(P)}},D=function(P){g(P.data)},he=function(P){e.postMessage(R(P),j.protocol+"//"+j.host)};return(!d||!v)&&(d=function(K){s(arguments.length,1);var Vs=n(K)?K:T(K),zs=u(arguments,1);return m[++q]=function(){r(Vs,void 0,zs)},O(q),q},v=function(K){delete m[K]},c?O=function(P){f.nextTick(b(P))}:y&&y.now?O=function(P){y.now(b(P))}:S&&!h?(A=new S,p=A.port2,A.port1.onmessage=D,O=t(p.postMessage,p)):e.addEventListener&&n(e.postMessage)&&!e.importScripts&&j&&j.protocol!=="file:"&&!a(he)?(O=he,e.addEventListener("message",D,!1)):E in l("script")?O=function(P){o.appendChild(l("script"))[E]=function(){o.removeChild(this),g(P)}}:O=function(P){setTimeout(b(P),0)}),Nr={set:d,clear:v},Nr}var ii={},Lr,ai;function Ts(){if(ai)return Lr;ai=1;var e=C(),r=Q(),t=Object.getOwnPropertyDescriptor;return Lr=function(n){if(!r)return e[n];var i=t(e,n);return i&&i.value},Lr}var xr,oi;function ws(){if(oi)return xr;oi=1;var e=function(){this.head=null,this.tail=null};return e.prototype={add:function(r){var t={item:r,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var r=this.head;if(r){var t=this.head=r.next;return t===null&&(this.tail=null),r.item}}},xr=e,xr}var Br,ui;function Ss(){if(ui)return Br;ui=1;var e=ie();return Br=/ipad|iphone|ipod/i.test(e)&&typeof Pebble<"u",Br}var Ur,si;function Es(){if(si)return Ur;si=1;var e=ie();return Ur=/web0s(?!.*chrome)/i.test(e),Ur}var Gr,li;function Ps(){if(li)return Gr;li=1;var e=C(),r=Ts(),t=Er(),n=Os().set,i=ws(),a=Jn(),o=Ss(),u=Es(),l=ti(),s=e.MutationObserver||e.WebKitMutationObserver,h=e.document,c=e.process,d=e.Promise,v=r("queueMicrotask"),f,y,T,S,R;if(!v){var q=new i,m=function(){var E,j;for(l&&(E=c.domain)&&E.exit();j=q.get();)try{j()}catch(O){throw q.head&&f(),O}E&&E.enter()};!a&&!l&&!u&&s&&h?(y=!0,T=h.createTextNode(""),new s(m).observe(T,{characterData:!0}),f=function(){T.data=y=!y}):!o&&d&&d.resolve?(S=d.resolve(void 0),S.constructor=d,R=t(S.then,S),f=function(){R(m)}):l?f=function(){c.nextTick(m)}:(n=t(n,e),f=function(){n(m)}),v=function(E){q.head||f(),q.add(E)}}return Gr=v,Gr}var ci;function qs(){if(ci)return ii;ci=1;var e=gs(),r=C(),t=Ps(),n=sr(),i=Xn(),a=B(),o=Q(),u=a(function(){return o&&Object.getOwnPropertyDescriptor(r,"queueMicrotask").value.length!==1});return e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:u},{queueMicrotask:function(s){i(arguments.length,1),t(n(s))}}),ii}var kr,fi;function Is(){if(fi)return kr;fi=1,qs();var e=Ze();return kr=e.queueMicrotask,kr}var Vr,di;function Rs(){if(di)return Vr;di=1;var e=Is();return Vr=e,Vr}var zr,vi;function As(){if(vi)return zr;vi=1;var e=Rs();return zr=e,zr}var Wr,hi;function js(){if(hi)return Wr;hi=1;var e=As();return Wr=e,Wr}var Qr,pi;function Cs(){return pi||(pi=1,Qr=js()),Qr}var $s=Cs();const Ds=Ft($s);function yi(e){Ds(e)}class Ms{constructor(r){w(Number.isInteger(r)||r===Number.POSITIVE_INFINITY,"concurrency must be an integer or positive infinity"),w(r>0,"concurrency must be greater than 0"),this._concurrency=r,this._iqueue=[],this._running=0,this._checkQueueScheduled=!1}get concurrency(){return this._concurrency}get running(){return this._running}get pending(){return this._iqueue.length-this.running}async exec(r,t=0){return this.execCancellable(r,t)[0]}execCancellable(r,t=0){w(typeof r=="function","fct must be a function"),w(typeof t=="number","priority must be a number");const n=new Ku;let i=this._iqueue.length;for(;i>=1&&!(this._iqueue[i-1].priority>=t);)i-=1;const a={asyncFct:Lt(r),deferred:n,priority:t,state:"pending"};return this._iqueue.splice(i,0,a),this._scheduleCheckQueue(),[n.promise,()=>{if(a.state!=="pending")return!1;{const o=this._iqueue.filter(u=>u!==a);return w(o.length<this._iqueue.length),this._iqueue=o,a.state="cancelled",n.reject(new xt),!0}}]}_scheduleCheckQueue(){this._checkQueueScheduled||(this._checkQueueScheduled=!0,yi(()=>{this._checkQueueScheduled=!1,this._checkQueue()}))}_checkQueue(){for(;;){if(w(this.running>=0,"invalid state"),w(this.running<=this.concurrency,"invalid state"),this.running===this.concurrency)return;const r=this._iqueue.find(t=>t.state==="pending");if(r===void 0)return;this._running+=1,r.state="running",yi(()=>{r.asyncFct().finally(()=>{this._running-=1,this._iqueue=this._iqueue.filter(t=>t!==r)}).then(r.deferred.resolve,r.deferred.reject).then(()=>{this._scheduleCheckQueue()})})}}cancelAllPending(){const r=this._iqueue.filter(t=>t.state==="pending");return this._iqueue=this._iqueue.filter(t=>t.state!=="pending"),r.forEach(t=>{t.deferred.reject(new xt)}),r.length}}function Fs(e){return typeof e=="number"?new Ms(e):e}async function Kr(e){try{return{status:"fulfilled",value:await e()}}catch(r){return{status:"rejected",reason:r}}}async function*Ns(e,r,t=1,n=!0){w(typeof r=="function","iteratee must be a function"),r=Lt(r);const i=zu(e),a=Fs(t);class o extends Error{}let u=-1,l=!1,s=!1,h=null,c=!1,d=!1,v=-1;const f=[];let y=0;const T=new Map,S=p=>{const g=y;y+=1;const b=(async()=>[g,await Kr(p)])();w(!T.has(g),"waitList contains identifier"),T.set(g,b)},R=async()=>{w(T.size>=1,"Can not race on empty list");const[p]=await Promise.race([...T.values()]),g=T.delete(p);w(g,"waitList does not contain identifier")};let q=0;const m=new Map,E=(p,g)=>{q+=1;const b={value:g,index:p,cancel:null,state:null};m.set(p,b),S(async()=>{const D=a.exec(async()=>{if(b.state==="cancelled")throw new o;w(b.state==="scheduled","invalid task state");const he=m.delete(p);w(he,"Couldn't find index in scheduledList for removal");const P=await Kr(()=>r(g,p,e));q-=1,A(p,g,P),P.status==="rejected"&&(d=!0,j(n?p:0))});return w(b.cancel===null,"task already has cancel"),b.cancel=()=>{w(b.state==="scheduled","task should be scheduled"),b.state="cancelled"},w(b.state===null,"task should have no state"),b.state="scheduled",D})},j=p=>{for(const g of[...m.keys()].filter(b=>b>=p)){const b=m.get(g);w(b.cancel,"task does not have cancel"),b.cancel();const D=m.delete(g);w(D,"Couldn't find index in scheduledList for removal")}},O=()=>{l=!0,S(async()=>{const p=await Kr(()=>i.next());if(l=!1,p.status==="fulfilled"){const{value:g,done:b}=p.value;b?c=!0:(u+=1,w(h===null,"fetchedValue should be null"),h=g,w(!s,"hasFetchedValue should be false"),s=!0)}else{c=!0,u+=1;const g=u;A(g,void 0,p),j(n?g:0)}})},A=(p,g,b)=>{n?(w(p-v-1>=0,"invalid index to insert"),w(f[p-v-1]===void 0,"already inserted result"),f[p-v-1]={index:p,value:g,snapshot:b}):f.push({index:p,value:g,snapshot:b})};for(O();;){for(await R();f.length>=1&&f[0]!==void 0;){const p=f.shift();if(v+=1,p.snapshot.status==="rejected")throw p.snapshot.reason;{let g=!1;try{yield p.snapshot.value,g=!0}finally{g||await i.return()}}}if(c&&u===v)return;s&&!d&&(E(u,h),s=!1,h=null),!l&&!c&&!d&&q<a.concurrency&&O()}}async function Hr(e,r,t=1){for await(const n of Ns(e,r,t));}class gi{controls;dirty;errors;group;rules;touched;validated;validator;value;constructor(r,t){this.controls=[],this.dirty=!1,this.errors=[],this.rules=r.rules,this.touched=!1,this.validated=!1,this.validator=t,this.value=r.value,r.group&&(this.group=r.group)}get isValid(){return this.errors.length===0}reset(){this.touched=!1,this.dirty=!1,this.validated=!1,this.errors=[]}async validate(){this.errors=[];let r=!1;return this.controls.length>0&&this.controls?.every(t=>!t.getAttribute("disabled"))&&(r=!0),r&&await Hr(this.rules,async t=>{const n=await t(this.value);n!==null&&this.errors.push(n)}),this.isValid}}class bi{dirty;errors;fields;groups;touched;validated;constructor(r={}){this.dirty=!1,this.errors=[],this.fields={},this.groups={},this.touched=!1,this.validated=!1,r.fields&&Ae(r.fields,(t,n)=>{this.addField(n,t)})}isValid(r){let t=Object.keys(this.fields);return r&&(t=Object.keys(this.groups[r].fields)),t.every(n=>this.fields[n].errors.length===0)}reset(r){this.validated=!1,this.errors=[],r?Ae(this.groups[r].fields,t=>{t.reset()}):Ae(this.fields,t=>{t.reset()})}addField(r,t){const n=new gi(t,this);this.fields[r]=n,t.group&&(this.groups[t.group]||(this.groups[t.group]={dirty:!1,fields:$.reactive({}),touched:!1,validated:!1}),this.groups[t.group].fields[r]=n)}removeField(r){this.fields[r].group&&delete this.groups[this.fields[r].group].fields[r],delete this.fields[r]}async validate(r){if(r&&this.groups[r]){const t=this.groups[r];await Hr(Object.keys(t.fields),async n=>{await t.fields[n].validate()}),this.groups[r].validated=!0}else await Hr(Object.keys(this.fields),async t=>{await this.fields[t].validate()}),this.validated=!0}}const Ls=$.defineComponent({name:"FieldValidation",props:{name:{type:String,required:!0},hideError:Boolean,modelValue:{type:null},modelModifiers:{default:()=>({})},rules:{type:Array,default(){return[]}},validator:{type:bi,required:!0}},data(){return{form_fields:[]}},computed:{field(){return this.validator.fields[this.name]},error(){return this.field&&this.field.errors.length?this.field.errors[0]:null}},watch:{modelValue:{async handler(e,r){xu(e,r)||(this.field&&(this.field.value=e,this.field.dirty=!0),this.validator.dirty=!0,this.field.group&&(this.validator.groups[this.field.group].dirty=!0),this.field.touched&&await this.field.validate())},deep:!0}},mounted(){if(!this.field){let e;Object.keys(this.modelModifiers).length===1&&(e=Object.keys(this.modelModifiers)[0]),this.validator.addField(this.name,{value:this.modelValue,rules:this.rules,group:e})}$.nextTick(()=>{const e=this.$refs.root,r=e.querySelectorAll("input, select, textarea");this.form_fields=Array.from(r),this.form_fields.forEach(t=>{t.getAttribute("has-validation")!=="true"&&(this.validator.fields[this.name]?.controls.push(t),t.addEventListener("blur",n=>{if(!e.contains(n.relatedTarget)){if(this.validator.touched=!0,this.validator.fields[this.name].group){const i=this.validator.fields[this.name].group;this.validator.groups[i].touched=!0}this.validator.fields[this.name].touched=!0,this.validator.fields[this.name].validate()}}),t.setAttribute("has-validation","true"))})})},beforeUnmount(){this.form_fields.forEach(e=>{Vu(this.validator.fields[this.name].controls,e)})}}),xs=(e,r)=>{const t=e.__vccOpts||e;for(const[n,i]of r)t[n]=i;return t};function Bs(e,r,t,n,i,a){return $.openBlock(),$.createElementBlock("div",{ref:"root",class:$.normalizeClass({invalid:e.error})},[$.renderSlot(e.$slots,"default",{invalid:!!e.error,error_message:e.error})],2)}const Us=xs(Ls,[["render",Bs]]);async function Gs(e,r){return function(t){return!e||t===e?null:r||"The value does not match"}}const ks=Object.freeze(Object.defineProperty({__proto__:null,match:Gs},Symbol.toStringTag,{value:"Module"}));I.FieldValidation=Us,I.FieldValidator=gi,I.Validator=bi,I.rules=ks,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(S,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],T):(S=typeof globalThis<"u"?globalThis:S||self,T(S.Validation={},S.Vue))})(this,(function(S,T){"use strict";var ct=typeof global=="object"&&global&&global.Object===Object&&global,Li=typeof self=="object"&&self&&self.Object===Object&&self,M=ct||Li||Function("return this")(),G=M.Symbol,dt=Object.prototype,xi=dt.hasOwnProperty,Bi=dt.toString,J=G?G.toStringTag:void 0;function Ui(e){var r=xi.call(e,J),t=e[J];try{e[J]=void 0;var n=!0}catch{}var i=Bi.call(e);return n&&(r?e[J]=t:delete e[J]),i}var Gi=Object.prototype,Vi=Gi.toString;function zi(e){return Vi.call(e)}var Wi="[object Null]",Hi="[object Undefined]",vt=G?G.toStringTag:void 0;function H(e){return e==null?e===void 0?Hi:Wi:vt&&vt in Object(e)?Ui(e):zi(e)}function V(e){return e!=null&&typeof e=="object"}var Qi="[object Symbol]";function Ee(e){return typeof e=="symbol"||V(e)&&H(e)==Qi}function Ki(e,r){for(var t=-1,n=e==null?0:e.length,i=Array(n);++t<n;)i[t]=r(e[t],t,e);return i}var D=Array.isArray,ht=G?G.prototype:void 0,pt=ht?ht.toString:void 0;function yt(e){if(typeof e=="string")return e;if(D(e))return Ki(e,yt)+"";if(Ee(e))return pt?pt.call(e):"";var r=e+"";return r=="0"&&1/e==-1/0?"-0":r}function z(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function le(e){return e}var ki="[object AsyncFunction]",Yi="[object Function]",Xi="[object GeneratorFunction]",Zi="[object Proxy]";function qe(e){if(!z(e))return!1;var r=H(e);return r==Yi||r==Xi||r==ki||r==Zi}var Ie=M["__core-js_shared__"],gt=(function(){var e=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Ji(e){return!!gt&> in e}var ea=Function.prototype,ra=ea.toString;function Q(e){if(e!=null){try{return ra.call(e)}catch{}try{return e+""}catch{}}return""}var ta=/[\\^$.*+?()[\]{}|]/g,na=/^\[object .+?Constructor\]$/,ia=Function.prototype,aa=Object.prototype,ua=ia.toString,oa=aa.hasOwnProperty,sa=RegExp("^"+ua.call(oa).replace(ta,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fa(e){if(!z(e)||Ji(e))return!1;var r=qe(e)?sa:na;return r.test(Q(e))}function la(e,r){return e?.[r]}function K(e,r){var t=la(e,r);return fa(t)?t:void 0}var Re=K(M,"WeakMap"),bt=Object.create,ca=(function(){function e(){}return function(r){if(!z(r))return{};if(bt)return bt(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}})();function da(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}function va(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var ha=800,pa=16,ya=Date.now;function ga(e){var r=0,t=0;return function(){var n=ya(),i=pa-(n-t);if(t=n,i>0){if(++r>=ha)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}function ba(e){return function(){return e}}var ce=(function(){try{var e=K(Object,"defineProperty");return e({},"",{}),e}catch{}})(),ma=ce?function(e,r){return ce(e,"toString",{configurable:!0,enumerable:!1,value:ba(r),writable:!0})}:le,_a=ga(ma),Oa=9007199254740991,Ta=/^(?:0|[1-9]\d*)$/;function de(e,r){var t=typeof e;return r=r??Oa,!!r&&(t=="number"||t!="symbol"&&Ta.test(e))&&e>-1&&e%1==0&&e<r}function Ae(e,r,t){r=="__proto__"&&ce?ce(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}function ee(e,r){return e===r||e!==e&&r!==r}var wa=Object.prototype,Pa=wa.hasOwnProperty;function Sa(e,r,t){var n=e[r];(!(Pa.call(e,r)&&ee(n,t))||t===void 0&&!(r in e))&&Ae(e,r,t)}function Ea(e,r,t,n){var i=!t;t||(t={});for(var a=-1,u=r.length;++a<u;){var o=r[a],s=void 0;s===void 0&&(s=e[o]),i?Ae(t,o,s):Sa(t,o,s)}return t}var mt=Math.max;function qa(e,r,t){return r=mt(r===void 0?e.length-1:r,0),function(){for(var n=arguments,i=-1,a=mt(n.length-r,0),u=Array(a);++i<a;)u[i]=n[r+i];i=-1;for(var o=Array(r+1);++i<r;)o[i]=n[i];return o[r]=t(u),da(e,this,o)}}function Ia(e,r){return _a(qa(e,r,le),e+"")}var Ra=9007199254740991;function $e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ra}function re(e){return e!=null&&$e(e.length)&&!qe(e)}function Aa(e,r,t){if(!z(t))return!1;var n=typeof r;return(n=="number"?re(t)&&de(r,t.length):n=="string"&&r in t)?ee(t[r],e):!1}function $a(e){return Ia(function(r,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,u=i>2?t[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,u&&Aa(t[0],t[1],u)&&(a=i<3?void 0:a,i=1),r=Object(r);++n<i;){var o=t[n];o&&e(r,o,n,a)}return r})}var Ca=Object.prototype;function ve(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||Ca;return e===t}function ja(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Da="[object Arguments]";function _t(e){return V(e)&&H(e)==Da}var Ot=Object.prototype,Ma=Ot.hasOwnProperty,Fa=Ot.propertyIsEnumerable,te=_t((function(){return arguments})())?_t:function(e){return V(e)&&Ma.call(e,"callee")&&!Fa.call(e,"callee")};function Na(){return!1}var Tt=typeof S=="object"&&S&&!S.nodeType&&S,wt=Tt&&typeof module=="object"&&module&&!module.nodeType&&module,La=wt&&wt.exports===Tt,Pt=La?M.Buffer:void 0,xa=Pt?Pt.isBuffer:void 0,ne=xa||Na,Ba="[object Arguments]",Ua="[object Array]",Ga="[object Boolean]",Va="[object Date]",za="[object Error]",Wa="[object Function]",Ha="[object Map]",Qa="[object Number]",Ka="[object Object]",ka="[object RegExp]",Ya="[object Set]",Xa="[object String]",Za="[object WeakMap]",Ja="[object ArrayBuffer]",eu="[object DataView]",ru="[object Float32Array]",tu="[object Float64Array]",nu="[object Int8Array]",iu="[object Int16Array]",au="[object Int32Array]",uu="[object Uint8Array]",ou="[object Uint8ClampedArray]",su="[object Uint16Array]",fu="[object Uint32Array]",E={};E[ru]=E[tu]=E[nu]=E[iu]=E[au]=E[uu]=E[ou]=E[su]=E[fu]=!0,E[Ba]=E[Ua]=E[Ja]=E[Ga]=E[eu]=E[Va]=E[za]=E[Wa]=E[Ha]=E[Qa]=E[Ka]=E[ka]=E[Ya]=E[Xa]=E[Za]=!1;function lu(e){return V(e)&&$e(e.length)&&!!E[H(e)]}function cu(e){return function(r){return e(r)}}var St=typeof S=="object"&&S&&!S.nodeType&&S,ie=St&&typeof module=="object"&&module&&!module.nodeType&&module,du=ie&&ie.exports===St,Ce=du&&ct.process,Et=(function(){try{var e=ie&&ie.require&&ie.require("util").types;return e||Ce&&Ce.binding&&Ce.binding("util")}catch{}})(),qt=Et&&Et.isTypedArray,he=qt?cu(qt):lu,vu=Object.prototype,hu=vu.hasOwnProperty;function It(e,r){var t=D(e),n=!t&&te(e),i=!t&&!n&&ne(e),a=!t&&!n&&!i&&he(e),u=t||n||i||a,o=u?ja(e.length,String):[],s=o.length;for(var l in e)(r||hu.call(e,l))&&!(u&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||de(l,s)))&&o.push(l);return o}function Rt(e,r){return function(t){return e(r(t))}}var pu=Rt(Object.keys,Object),yu=Object.prototype,gu=yu.hasOwnProperty;function At(e){if(!ve(e))return pu(e);var r=[];for(var t in Object(e))gu.call(e,t)&&t!="constructor"&&r.push(t);return r}function $t(e){return re(e)?It(e):At(e)}function bu(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var mu=Object.prototype,_u=mu.hasOwnProperty;function Ou(e){if(!z(e))return bu(e);var r=ve(e),t=[];for(var n in e)n=="constructor"&&(r||!_u.call(e,n))||t.push(n);return t}function je(e){return re(e)?It(e,!0):Ou(e)}var Tu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wu=/^\w*$/;function De(e,r){if(D(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||Ee(e)?!0:wu.test(e)||!Tu.test(e)||r!=null&&e in Object(r)}var ae=K(Object,"create");function Pu(){this.__data__=ae?ae(null):{},this.size=0}function Su(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var Eu="__lodash_hash_undefined__",qu=Object.prototype,Iu=qu.hasOwnProperty;function Ru(e){var r=this.__data__;if(ae){var t=r[e];return t===Eu?void 0:t}return Iu.call(r,e)?r[e]:void 0}var Au=Object.prototype,$u=Au.hasOwnProperty;function Cu(e){var r=this.__data__;return ae?r[e]!==void 0:$u.call(r,e)}var ju="__lodash_hash_undefined__";function Du(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ae&&r===void 0?ju:r,this}function k(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}k.prototype.clear=Pu,k.prototype.delete=Su,k.prototype.get=Ru,k.prototype.has=Cu,k.prototype.set=Du;function Mu(){this.__data__=[],this.size=0}function pe(e,r){for(var t=e.length;t--;)if(ee(e[t][0],r))return t;return-1}var Fu=Array.prototype,Nu=Fu.splice;function Lu(e){var r=this.__data__,t=pe(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():Nu.call(r,t,1),--this.size,!0}function xu(e){var r=this.__data__,t=pe(r,e);return t<0?void 0:r[t][1]}function Bu(e){return pe(this.__data__,e)>-1}function Uu(e,r){var t=this.__data__,n=pe(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}function L(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}L.prototype.clear=Mu,L.prototype.delete=Lu,L.prototype.get=xu,L.prototype.has=Bu,L.prototype.set=Uu;var ue=K(M,"Map");function Gu(){this.size=0,this.__data__={hash:new k,map:new(ue||L),string:new k}}function Vu(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function ye(e,r){var t=e.__data__;return Vu(r)?t[typeof r=="string"?"string":"hash"]:t.map}function zu(e){var r=ye(this,e).delete(e);return this.size-=r?1:0,r}function Wu(e){return ye(this,e).get(e)}function Hu(e){return ye(this,e).has(e)}function Qu(e,r){var t=ye(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}function x(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}x.prototype.clear=Gu,x.prototype.delete=zu,x.prototype.get=Wu,x.prototype.has=Hu,x.prototype.set=Qu;var Ku="Expected a function";function Me(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Ku);var t=function(){var n=arguments,i=r?r.apply(this,n):n[0],a=t.cache;if(a.has(i))return a.get(i);var u=e.apply(this,n);return t.cache=a.set(i,u)||a,u};return t.cache=new(Me.Cache||x),t}Me.Cache=x;var ku=500;function Yu(e){var r=Me(e,function(n){return t.size===ku&&t.clear(),n}),t=r.cache;return r}var Xu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zu=/\\(\\)?/g,Ju=Yu(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Xu,function(t,n,i,a){r.push(i?a.replace(Zu,"$1"):n||t)}),r});function eo(e){return e==null?"":yt(e)}function Fe(e,r){return D(e)?e:De(e,r)?[e]:Ju(eo(e))}function oe(e){if(typeof e=="string"||Ee(e))return e;var r=e+"";return r=="0"&&1/e==-1/0?"-0":r}function Ne(e,r){r=Fe(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[oe(r[t++])];return t&&t==n?e:void 0}function ro(e,r,t){var n=e==null?void 0:Ne(e,r);return n===void 0?t:n}function to(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}var Ct=Rt(Object.getPrototypeOf,Object),no="[object Object]",io=Function.prototype,ao=Object.prototype,jt=io.toString,uo=ao.hasOwnProperty,oo=jt.call(Object);function so(e){if(!V(e)||H(e)!=no)return!1;var r=Ct(e);if(r===null)return!0;var t=uo.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&jt.call(t)==oo}function fo(e,r,t){var n=-1,i=e.length;r<0&&(r=-r>i?0:i+r),t=t>i?i:t,t<0&&(t+=i),i=r>t?0:t-r>>>0,r>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+r];return a}function lo(){this.__data__=new L,this.size=0}function co(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}function vo(e){return this.__data__.get(e)}function ho(e){return this.__data__.has(e)}var po=200;function yo(e,r){var t=this.__data__;if(t instanceof L){var n=t.__data__;if(!ue||n.length<po-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new x(n)}return t.set(e,r),this.size=t.size,this}function F(e){var r=this.__data__=new L(e);this.size=r.size}F.prototype.clear=lo,F.prototype.delete=co,F.prototype.get=vo,F.prototype.has=ho,F.prototype.set=yo;var Dt=typeof S=="object"&&S&&!S.nodeType&&S,Mt=Dt&&typeof module=="object"&&module&&!module.nodeType&&module,go=Mt&&Mt.exports===Dt,Ft=go?M.Buffer:void 0;Ft&&Ft.allocUnsafe;function bo(e,r){return e.slice()}function mo(e,r){for(var t=-1,n=e==null?0:e.length,i=0,a=[];++t<n;){var u=e[t];r(u,t,e)&&(a[i++]=u)}return a}function _o(){return[]}var Oo=Object.prototype,To=Oo.propertyIsEnumerable,Nt=Object.getOwnPropertySymbols,wo=Nt?function(e){return e==null?[]:(e=Object(e),mo(Nt(e),function(r){return To.call(e,r)}))}:_o;function Po(e,r,t){var n=r(e);return D(e)?n:to(n,t(e))}function Lt(e){return Po(e,$t,wo)}var Le=K(M,"DataView"),xe=K(M,"Promise"),Be=K(M,"Set"),xt="[object Map]",So="[object Object]",Bt="[object Promise]",Ut="[object Set]",Gt="[object WeakMap]",Vt="[object DataView]",Eo=Q(Le),qo=Q(ue),Io=Q(xe),Ro=Q(Be),Ao=Q(Re),B=H;(Le&&B(new Le(new ArrayBuffer(1)))!=Vt||ue&&B(new ue)!=xt||xe&&B(xe.resolve())!=Bt||Be&&B(new Be)!=Ut||Re&&B(new Re)!=Gt)&&(B=function(e){var r=H(e),t=r==So?e.constructor:void 0,n=t?Q(t):"";if(n)switch(n){case Eo:return Vt;case qo:return xt;case Io:return Bt;case Ro:return Ut;case Ao:return Gt}return r});var ge=M.Uint8Array;function $o(e){var r=new e.constructor(e.byteLength);return new ge(r).set(new ge(e)),r}function Co(e,r){var t=$o(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}function jo(e){return typeof e.constructor=="function"&&!ve(e)?ca(Ct(e)):{}}var Do="__lodash_hash_undefined__";function Mo(e){return this.__data__.set(e,Do),this}function Fo(e){return this.__data__.has(e)}function be(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new x;++r<t;)this.add(e[r])}be.prototype.add=be.prototype.push=Mo,be.prototype.has=Fo;function No(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}function Lo(e,r){return e.has(r)}var xo=1,Bo=2;function zt(e,r,t,n,i,a){var u=t&xo,o=e.length,s=r.length;if(o!=s&&!(u&&s>o))return!1;var l=a.get(e),d=a.get(r);if(l&&d)return l==r&&d==e;var c=-1,v=!0,h=t&Bo?new be:void 0;for(a.set(e,r),a.set(r,e);++c<o;){var f=e[c],p=r[c];if(n)var b=u?n(p,f,c,r,e,a):n(f,p,c,e,r,a);if(b!==void 0){if(b)continue;v=!1;break}if(h){if(!No(r,function(m,P){if(!Lo(h,P)&&(f===m||i(f,m,t,n,a)))return h.push(P)})){v=!1;break}}else if(!(f===p||i(f,p,t,n,a))){v=!1;break}}return a.delete(e),a.delete(r),v}function Uo(e){var r=-1,t=Array(e.size);return e.forEach(function(n,i){t[++r]=[i,n]}),t}function Go(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var Vo=1,zo=2,Wo="[object Boolean]",Ho="[object Date]",Qo="[object Error]",Ko="[object Map]",ko="[object Number]",Yo="[object RegExp]",Xo="[object Set]",Zo="[object String]",Jo="[object Symbol]",es="[object ArrayBuffer]",rs="[object DataView]",Wt=G?G.prototype:void 0,Ue=Wt?Wt.valueOf:void 0;function ts(e,r,t,n,i,a,u){switch(t){case rs:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case es:return!(e.byteLength!=r.byteLength||!a(new ge(e),new ge(r)));case Wo:case Ho:case ko:return ee(+e,+r);case Qo:return e.name==r.name&&e.message==r.message;case Yo:case Zo:return e==r+"";case Ko:var o=Uo;case Xo:var s=n&Vo;if(o||(o=Go),e.size!=r.size&&!s)return!1;var l=u.get(e);if(l)return l==r;n|=zo,u.set(e,r);var d=zt(o(e),o(r),n,i,a,u);return u.delete(e),d;case Jo:if(Ue)return Ue.call(e)==Ue.call(r)}return!1}var ns=1,is=Object.prototype,as=is.hasOwnProperty;function us(e,r,t,n,i,a){var u=t&ns,o=Lt(e),s=o.length,l=Lt(r),d=l.length;if(s!=d&&!u)return!1;for(var c=s;c--;){var v=o[c];if(!(u?v in r:as.call(r,v)))return!1}var h=a.get(e),f=a.get(r);if(h&&f)return h==r&&f==e;var p=!0;a.set(e,r),a.set(r,e);for(var b=u;++c<s;){v=o[c];var m=e[v],P=r[v];if(n)var q=u?n(P,m,v,r,e,a):n(m,P,v,e,r,a);if(!(q===void 0?m===P||i(m,P,t,n,a):q)){p=!1;break}b||(b=v=="constructor")}if(p&&!b){var w=e.constructor,I=r.constructor;w!=I&&"constructor"in e&&"constructor"in r&&!(typeof w=="function"&&w instanceof w&&typeof I=="function"&&I instanceof I)&&(p=!1)}return a.delete(e),a.delete(r),p}var os=1,Ht="[object Arguments]",Qt="[object Array]",me="[object Object]",ss=Object.prototype,Kt=ss.hasOwnProperty;function fs(e,r,t,n,i,a){var u=D(e),o=D(r),s=u?Qt:B(e),l=o?Qt:B(r);s=s==Ht?me:s,l=l==Ht?me:l;var d=s==me,c=l==me,v=s==l;if(v&&ne(e)){if(!ne(r))return!1;u=!0,d=!1}if(v&&!d)return a||(a=new F),u||he(e)?zt(e,r,t,n,i,a):ts(e,r,s,t,n,i,a);if(!(t&os)){var h=d&&Kt.call(e,"__wrapped__"),f=c&&Kt.call(r,"__wrapped__");if(h||f){var p=h?e.value():e,b=f?r.value():r;return a||(a=new F),i(p,b,t,n,a)}}return v?(a||(a=new F),us(e,r,t,n,i,a)):!1}function Ge(e,r,t,n,i){return e===r?!0:e==null||r==null||!V(e)&&!V(r)?e!==e&&r!==r:fs(e,r,t,n,Ge,i)}var ls=1,cs=2;function ds(e,r,t,n){var i=t.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var u=t[i];if(u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){u=t[i];var o=u[0],s=e[o],l=u[1];if(u[2]){if(s===void 0&&!(o in e))return!1}else{var d=new F,c;if(!(c===void 0?Ge(l,s,ls|cs,n,d):c))return!1}}return!0}function kt(e){return e===e&&!z(e)}function vs(e){for(var r=$t(e),t=r.length;t--;){var n=r[t],i=e[n];r[t]=[n,i,kt(i)]}return r}function Yt(e,r){return function(t){return t==null?!1:t[e]===r&&(r!==void 0||e in Object(t))}}function hs(e){var r=vs(e);return r.length==1&&r[0][2]?Yt(r[0][0],r[0][1]):function(t){return t===e||ds(t,e,r)}}function ps(e,r){return e!=null&&r in Object(e)}function ys(e,r,t){r=Fe(r,e);for(var n=-1,i=r.length,a=!1;++n<i;){var u=oe(r[n]);if(!(a=e!=null&&t(e,u)))break;e=e[u]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&$e(i)&&de(u,i)&&(D(e)||te(e)))}function gs(e,r){return e!=null&&ys(e,r,ps)}var bs=1,ms=2;function _s(e,r){return De(e)&&kt(r)?Yt(oe(e),r):function(t){var n=ro(t,e);return n===void 0&&n===r?gs(t,e):Ge(r,n,bs|ms)}}function Os(e){return function(r){return r?.[e]}}function Ts(e){return function(r){return Ne(r,e)}}function ws(e){return De(e)?Os(oe(e)):Ts(e)}function Ps(e){return typeof e=="function"?e:e==null?le:typeof e=="object"?D(e)?_s(e[0],e[1]):hs(e):ws(e)}function Ss(e){return function(r,t,n){for(var i=-1,a=Object(r),u=n(r),o=u.length;o--;){var s=u[++i];if(t(a[s],s,a)===!1)break}return r}}var Xt=Ss();function Ve(e,r,t){(t!==void 0&&!ee(e[r],t)||t===void 0&&!(r in e))&&Ae(e,r,t)}function Es(e){return V(e)&&re(e)}function ze(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}function qs(e){return Ea(e,je(e))}function Is(e,r,t,n,i,a,u){var o=ze(e,t),s=ze(r,t),l=u.get(s);if(l){Ve(e,t,l);return}var d=a?a(o,s,t+"",e,r,u):void 0,c=d===void 0;if(c){var v=D(s),h=!v&&ne(s),f=!v&&!h&&he(s);d=s,v||h||f?D(o)?d=o:Es(o)?d=va(o):h?(c=!1,d=bo(s)):f?(c=!1,d=Co(s)):d=[]:so(s)||te(s)?(d=o,te(o)?d=qs(o):(!z(o)||qe(o))&&(d=jo(s))):c=!1}c&&(u.set(s,d),i(d,s,n,a,u),u.delete(s)),Ve(e,t,d)}function Zt(e,r,t,n,i){e!==r&&Xt(r,function(a,u){if(i||(i=new F),z(a))Is(e,r,u,t,Zt,n,i);else{var o=n?n(ze(e,u),a,u+"",e,r,i):void 0;o===void 0&&(o=a),Ve(e,u,o)}},je)}function Rs(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}function As(e){return typeof e=="function"?e:le}function We(e,r){return e==null?e:Xt(e,As(r),je)}function $s(e,r){return r.length<2?e:Ne(e,fo(r,0,-1))}var Cs="[object Map]",js="[object Set]",Ds=Object.prototype,Ms=Ds.hasOwnProperty;function Fs(e){if(e==null)return!0;if(re(e)&&(D(e)||typeof e=="string"||typeof e.splice=="function"||ne(e)||he(e)||te(e)))return!e.length;var r=B(e);if(r==Cs||r==js)return!e.size;if(ve(e))return!At(e).length;for(var t in e)if(Ms.call(e,t))return!1;return!0}function Ns(e){return e==null}function Jt(e){return e===null}function _e(e){return e===void 0}var Ls=$a(function(e,r,t){Zt(e,r,t)});function xs(e,r){return r=Fe(r,e),e=$s(e,r),e==null||delete e[oe(Rs(r))]}var Bs=Array.prototype,Us=Bs.splice;function Gs(e,r){for(var t=e?r.length:0,n=t-1;t--;){var i=r[t];if(t==n||i!==a){var a=i;de(i)?Us.call(e,i,1):xs(e,i)}}return e}function Vs(e,r){var t=[];if(!(e&&e.length))return t;var n=-1,i=[],a=e.length;for(r=Ps(r);++n<a;){var u=e[n];r(u,n,e)&&(t.push(u),i.push(n))}return Gs(e,i),t}async function*zs(e){for await(const r of e)yield r}var en=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var He,tn;function Ws(){if(tn)return He;tn=1,He=r;class e extends Error{}e.prototype.name="AssertionError";function r(t,n){if(!t){var i=new e(n);throw Error.captureStackTrace&&Error.captureStackTrace(i,r),i}}return He}var Hs=Ws();const R=rn(Hs);function nn(e){return R(typeof e=="function","fct must be a function"),async function(){return e(...arguments)}}class an extends Error{constructor(r){super(r),this.name=this.constructor.name}}class Qs{constructor(){this._promise=new Promise((r,t)=>{this._resolve=r,this._reject=t})}get promise(){return this._promise}get resolve(){return this._resolve}get reject(){return this._reject}}var se,un;function j(){if(un)return se;un=1;var e=function(r){return r&&r.Math===Math&&r};return se=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof en=="object"&&en)||e(typeof se=="object"&&se)||(function(){return this})()||Function("return this")(),se}var Qe,on;function U(){return on||(on=1,Qe=function(e){try{return!!e()}catch{return!0}}),Qe}var Ke,sn;function Oe(){if(sn)return Ke;sn=1;var e=U();return Ke=!e(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),Ke}var ke,fn;function ln(){if(fn)return ke;fn=1;var e=Oe(),r=Function.prototype,t=r.apply,n=r.call;return ke=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(t):function(){return n.apply(t,arguments)}),ke}var Ye,cn;function Y(){if(cn)return Ye;cn=1;var e=Oe(),r=Function.prototype,t=r.call,n=e&&r.bind.bind(t,t);return Ye=e?n:function(i){return function(){return t.apply(i,arguments)}},Ye}var Xe,dn;function Ze(){if(dn)return Xe;dn=1;var e=Y(),r=e({}.toString),t=e("".slice);return Xe=function(n){return t(r(n),8,-1)},Xe}var Je,vn;function hn(){if(vn)return Je;vn=1;var e=Ze(),r=Y();return Je=function(t){if(e(t)==="Function")return r(t)},Je}var er,pn;function W(){if(pn)return er;pn=1;var e=typeof document=="object"&&document.all;return er=typeof e>"u"&&e!==void 0?function(r){return typeof r=="function"||r===e}:function(r){return typeof r=="function"},er}var rr={},tr,yn;function X(){if(yn)return tr;yn=1;var e=U();return tr=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),tr}var nr,gn;function ir(){if(gn)return nr;gn=1;var e=Oe(),r=Function.prototype.call;return nr=e?r.bind(r):function(){return r.apply(r,arguments)},nr}var ar={},bn;function Ks(){if(bn)return ar;bn=1;var e={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,t=r&&!e.call({1:2},1);return ar.f=t?function(i){var a=r(this,i);return!!a&&a.enumerable}:e,ar}var ur,mn;function _n(){return mn||(mn=1,ur=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}),ur}var or,On;function ks(){if(On)return or;On=1;var e=Y(),r=U(),t=Ze(),n=Object,i=e("".split);return or=r(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return t(a)==="String"?i(a,""):n(a)}:n,or}var sr,Tn;function wn(){return Tn||(Tn=1,sr=function(e){return e==null}),sr}var fr,Pn;function Sn(){if(Pn)return fr;Pn=1;var e=wn(),r=TypeError;return fr=function(t){if(e(t))throw new r("Can't call method on "+t);return t},fr}var lr,En;function Ys(){if(En)return lr;En=1;var e=ks(),r=Sn();return lr=function(t){return e(r(t))},lr}var cr,qn;function Te(){if(qn)return cr;qn=1;var e=W();return cr=function(r){return typeof r=="object"?r!==null:e(r)},cr}var dr,In;function vr(){return In||(In=1,dr={}),dr}var hr,Rn;function An(){if(Rn)return hr;Rn=1;var e=vr(),r=j(),t=W(),n=function(i){return t(i)?i:void 0};return hr=function(i,a){return arguments.length<2?n(e[i])||n(r[i]):e[i]&&e[i][a]||r[i]&&r[i][a]},hr}var pr,$n;function Xs(){if($n)return pr;$n=1;var e=Y();return pr=e({}.isPrototypeOf),pr}var yr,Cn;function fe(){if(Cn)return yr;Cn=1;var e=j(),r=e.navigator,t=r&&r.userAgent;return yr=t?String(t):"",yr}var gr,jn;function Zs(){if(jn)return gr;jn=1;var e=j(),r=fe(),t=e.process,n=e.Deno,i=t&&t.versions||n&&n.version,a=i&&i.v8,u,o;return a&&(u=a.split("."),o=u[0]>0&&u[0]<4?1:+(u[0]+u[1])),!o&&r&&(u=r.match(/Edge\/(\d+)/),(!u||u[1]>=74)&&(u=r.match(/Chrome\/(\d+)/),u&&(o=+u[1]))),gr=o,gr}var br,Dn;function Mn(){if(Dn)return br;Dn=1;var e=Zs(),r=U(),t=j(),n=t.String;return br=!!Object.getOwnPropertySymbols&&!r(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),br}var mr,Fn;function Nn(){if(Fn)return mr;Fn=1;var e=Mn();return mr=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",mr}var _r,Ln;function xn(){if(Ln)return _r;Ln=1;var e=An(),r=W(),t=Xs(),n=Nn(),i=Object;return _r=n?function(a){return typeof a=="symbol"}:function(a){var u=e("Symbol");return r(u)&&t(u.prototype,i(a))},_r}var Or,Bn;function Js(){if(Bn)return Or;Bn=1;var e=String;return Or=function(r){try{return e(r)}catch{return"Object"}},Or}var Tr,Un;function wr(){if(Un)return Tr;Un=1;var e=W(),r=Js(),t=TypeError;return Tr=function(n){if(e(n))return n;throw new t(r(n)+" is not a function")},Tr}var Pr,Gn;function ef(){if(Gn)return Pr;Gn=1;var e=wr(),r=wn();return Pr=function(t,n){var i=t[n];return r(i)?void 0:e(i)},Pr}var Sr,Vn;function rf(){if(Vn)return Sr;Vn=1;var e=ir(),r=W(),t=Te(),n=TypeError;return Sr=function(i,a){var u,o;if(a==="string"&&r(u=i.toString)&&!t(o=e(u,i))||r(u=i.valueOf)&&!t(o=e(u,i))||a!=="string"&&r(u=i.toString)&&!t(o=e(u,i)))return o;throw new n("Can't convert object to primitive value")},Sr}var Er={exports:{}},qr,zn;function tf(){return zn||(zn=1,qr=!0),qr}var Ir,Wn;function nf(){if(Wn)return Ir;Wn=1;var e=j(),r=Object.defineProperty;return Ir=function(t,n){try{r(e,t,{value:n,configurable:!0,writable:!0})}catch{e[t]=n}return n},Ir}var Hn;function af(){if(Hn)return Er.exports;Hn=1;var e=tf(),r=j(),t=nf(),n="__core-js_shared__",i=Er.exports=r[n]||t(n,{});return(i.versions||(i.versions=[])).push({version:"3.45.1",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),Er.exports}var Rr,Qn;function uf(){if(Qn)return Rr;Qn=1;var e=af();return Rr=function(r,t){return e[r]||(e[r]=t||{})},Rr}var Ar,Kn;function of(){if(Kn)return Ar;Kn=1;var e=Sn(),r=Object;return Ar=function(t){return r(e(t))},Ar}var $r,kn;function we(){if(kn)return $r;kn=1;var e=Y(),r=of(),t=e({}.hasOwnProperty);return $r=Object.hasOwn||function(i,a){return t(r(i),a)},$r}var Cr,Yn;function sf(){if(Yn)return Cr;Yn=1;var e=Y(),r=0,t=Math.random(),n=e(1.1.toString);return Cr=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++r+t,36)},Cr}var jr,Xn;function ff(){if(Xn)return jr;Xn=1;var e=j(),r=uf(),t=we(),n=sf(),i=Mn(),a=Nn(),u=e.Symbol,o=r("wks"),s=a?u.for||u:u&&u.withoutSetter||n;return jr=function(l){return t(o,l)||(o[l]=i&&t(u,l)?u[l]:s("Symbol."+l)),o[l]},jr}var Dr,Zn;function lf(){if(Zn)return Dr;Zn=1;var e=ir(),r=Te(),t=xn(),n=ef(),i=rf(),a=ff(),u=TypeError,o=a("toPrimitive");return Dr=function(s,l){if(!r(s)||t(s))return s;var d=n(s,o),c;if(d){if(l===void 0&&(l="default"),c=e(d,s,l),!r(c)||t(c))return c;throw new u("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(s,l)},Dr}var Mr,Jn;function ei(){if(Jn)return Mr;Jn=1;var e=lf(),r=xn();return Mr=function(t){var n=e(t,"string");return r(n)?n:n+""},Mr}var Fr,ri;function ti(){if(ri)return Fr;ri=1;var e=j(),r=Te(),t=e.document,n=r(t)&&r(t.createElement);return Fr=function(i){return n?t.createElement(i):{}},Fr}var Nr,ni;function ii(){if(ni)return Nr;ni=1;var e=X(),r=U(),t=ti();return Nr=!e&&!r(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Nr}var ai;function cf(){if(ai)return rr;ai=1;var e=X(),r=ir(),t=Ks(),n=_n(),i=Ys(),a=ei(),u=we(),o=ii(),s=Object.getOwnPropertyDescriptor;return rr.f=e?s:function(d,c){if(d=i(d),c=a(c),o)try{return s(d,c)}catch{}if(u(d,c))return n(!r(t.f,d,c),d[c])},rr}var Lr,ui;function df(){if(ui)return Lr;ui=1;var e=U(),r=W(),t=/#|\.prototype\./,n=function(s,l){var d=a[i(s)];return d===o?!0:d===u?!1:r(l)?e(l):!!l},i=n.normalize=function(s){return String(s).replace(t,".").toLowerCase()},a=n.data={},u=n.NATIVE="N",o=n.POLYFILL="P";return Lr=n,Lr}var xr,oi;function Br(){if(oi)return xr;oi=1;var e=hn(),r=wr(),t=Oe(),n=e(e.bind);return xr=function(i,a){return r(i),a===void 0?i:t?n(i,a):function(){return i.apply(a,arguments)}},xr}var Ur={},Gr,si;function vf(){if(si)return Gr;si=1;var e=X(),r=U();return Gr=e&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Gr}var Vr,fi;function hf(){if(fi)return Vr;fi=1;var e=Te(),r=String,t=TypeError;return Vr=function(n){if(e(n))return n;throw new t(r(n)+" is not an object")},Vr}var li;function pf(){if(li)return Ur;li=1;var e=X(),r=ii(),t=vf(),n=hf(),i=ei(),a=TypeError,u=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s="enumerable",l="configurable",d="writable";return Ur.f=e?t?function(v,h,f){if(n(v),h=i(h),n(f),typeof v=="function"&&h==="prototype"&&"value"in f&&d in f&&!f[d]){var p=o(v,h);p&&p[d]&&(v[h]=f.value,f={configurable:l in f?f[l]:p[l],enumerable:s in f?f[s]:p[s],writable:!1})}return u(v,h,f)}:u:function(v,h,f){if(n(v),h=i(h),n(f),r)try{return u(v,h,f)}catch{}if("get"in f||"set"in f)throw new a("Accessors not supported");return"value"in f&&(v[h]=f.value),v},Ur}var zr,ci;function yf(){if(ci)return zr;ci=1;var e=X(),r=pf(),t=_n();return zr=e?function(n,i,a){return r.f(n,i,t(1,a))}:function(n,i,a){return n[i]=a,n},zr}var Wr,di;function gf(){if(di)return Wr;di=1;var e=j(),r=ln(),t=hn(),n=W(),i=cf().f,a=df(),u=vr(),o=Br(),s=yf(),l=we(),d=function(c){var v=function(h,f,p){if(this instanceof v){switch(arguments.length){case 0:return new c;case 1:return new c(h);case 2:return new c(h,f)}return new c(h,f,p)}return r(c,this,arguments)};return v.prototype=c.prototype,v};return Wr=function(c,v){var h=c.target,f=c.global,p=c.stat,b=c.proto,m=f?e:p?e[h]:e[h]&&e[h].prototype,P=f?u:u[h]||s(u,h,{})[h],q=P.prototype,w,I,C,y,A,g,_,O,N;for(y in v)w=a(f?y:h+(p?".":"#")+y,c.forced),I=!w&&m&&l(m,y),g=P[y],I&&(c.dontCallGetSet?(N=i(m,y),_=N&&N.value):_=m[y]),A=I&&_?_:v[y],!(!w&&!b&&typeof g==typeof A)&&(c.bind&&I?O=o(A,e):c.wrap&&I?O=d(A):b&&n(A)?O=t(A):O=A,(c.sham||A&&A.sham||g&&g.sham)&&s(O,"sham",!0),s(P,y,O),b&&(C=h+"Prototype",l(u,C)||s(u,C,{}),s(u[C],y,A),c.real&&q&&(w||!q[y])&&s(q,y,A)))},Wr}var Hr,vi;function bf(){if(vi)return Hr;vi=1;var e=An();return Hr=e("document","documentElement"),Hr}var Qr,hi;function mf(){if(hi)return Qr;hi=1;var e=Y();return Qr=e([].slice),Qr}var Kr,pi;function yi(){if(pi)return Kr;pi=1;var e=TypeError;return Kr=function(r,t){if(r<t)throw new e("Not enough arguments");return r},Kr}var kr,gi;function bi(){if(gi)return kr;gi=1;var e=fe();return kr=/(?:ipad|iphone|ipod).*applewebkit/i.test(e),kr}var Yr,mi;function _f(){if(mi)return Yr;mi=1;var e=j(),r=fe(),t=Ze(),n=function(i){return r.slice(0,i.length)===i};return Yr=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":t(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"})(),Yr}var Xr,_i;function Oi(){if(_i)return Xr;_i=1;var e=_f();return Xr=e==="NODE",Xr}var Zr,Ti;function Of(){if(Ti)return Zr;Ti=1;var e=j(),r=ln(),t=Br(),n=W(),i=we(),a=U(),u=bf(),o=mf(),s=ti(),l=yi(),d=bi(),c=Oi(),v=e.setImmediate,h=e.clearImmediate,f=e.process,p=e.Dispatch,b=e.Function,m=e.MessageChannel,P=e.String,q=0,w={},I="onreadystatechange",C,y,A,g;a(function(){C=e.location});var _=function($){if(i(w,$)){var Z=w[$];delete w[$],Z()}},O=function($){return function(){_($)}},N=function($){_($.data)},Se=function($){e.postMessage(P($),C.protocol+"//"+C.host)};return(!v||!h)&&(v=function(Z){l(arguments.length,1);var el=n(Z)?Z:b(Z),rl=o(arguments,1);return w[++q]=function(){r(el,void 0,rl)},y(q),q},h=function(Z){delete w[Z]},c?y=function($){f.nextTick(O($))}:p&&p.now?y=function($){p.now(O($))}:m&&!d?(A=new m,g=A.port2,A.port1.onmessage=N,y=t(g.postMessage,g)):e.addEventListener&&n(e.postMessage)&&!e.importScripts&&C&&C.protocol!=="file:"&&!a(Se)?(y=Se,e.addEventListener("message",N,!1)):I in s("script")?y=function($){u.appendChild(s("script"))[I]=function(){u.removeChild(this),_($)}}:y=function($){setTimeout(O($),0)}),Zr={set:v,clear:h},Zr}var wi={},Jr,Pi;function Tf(){if(Pi)return Jr;Pi=1;var e=j(),r=X(),t=Object.getOwnPropertyDescriptor;return Jr=function(n){if(!r)return e[n];var i=t(e,n);return i&&i.value},Jr}var et,Si;function wf(){if(Si)return et;Si=1;var e=function(){this.head=null,this.tail=null};return e.prototype={add:function(r){var t={item:r,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var r=this.head;if(r){var t=this.head=r.next;return t===null&&(this.tail=null),r.item}}},et=e,et}var rt,Ei;function Pf(){if(Ei)return rt;Ei=1;var e=fe();return rt=/ipad|iphone|ipod/i.test(e)&&typeof Pebble<"u",rt}var tt,qi;function Sf(){if(qi)return tt;qi=1;var e=fe();return tt=/web0s(?!.*chrome)/i.test(e),tt}var nt,Ii;function Ef(){if(Ii)return nt;Ii=1;var e=j(),r=Tf(),t=Br(),n=Of().set,i=wf(),a=bi(),u=Pf(),o=Sf(),s=Oi(),l=e.MutationObserver||e.WebKitMutationObserver,d=e.document,c=e.process,v=e.Promise,h=r("queueMicrotask"),f,p,b,m,P;if(!h){var q=new i,w=function(){var I,C;for(s&&(I=c.domain)&&I.exit();C=q.get();)try{C()}catch(y){throw q.head&&f(),y}I&&I.enter()};!a&&!s&&!o&&l&&d?(p=!0,b=d.createTextNode(""),new l(w).observe(b,{characterData:!0}),f=function(){b.data=p=!p}):!u&&v&&v.resolve?(m=v.resolve(void 0),m.constructor=v,P=t(m.then,m),f=function(){P(w)}):s?f=function(){c.nextTick(w)}:(n=t(n,e),f=function(){n(w)}),h=function(I){q.head||f(),q.add(I)}}return nt=h,nt}var Ri;function qf(){if(Ri)return wi;Ri=1;var e=gf(),r=j(),t=Ef(),n=wr(),i=yi(),a=U(),u=X(),o=a(function(){return u&&Object.getOwnPropertyDescriptor(r,"queueMicrotask").value.length!==1});return e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:o},{queueMicrotask:function(l){i(arguments.length,1),t(n(l))}}),wi}var it,Ai;function If(){if(Ai)return it;Ai=1,qf();var e=vr();return it=e.queueMicrotask,it}var at,$i;function Rf(){if($i)return at;$i=1;var e=If();return at=e,at}var ut,Ci;function Af(){if(Ci)return ut;Ci=1;var e=Rf();return ut=e,ut}var ot,ji;function $f(){if(ji)return ot;ji=1;var e=Af();return ot=e,ot}var st,Di;function Cf(){return Di||(Di=1,st=$f()),st}var jf=Cf();const Df=rn(jf);function Mi(e){Df(e)}class Mf{constructor(r){R(Number.isInteger(r)||r===Number.POSITIVE_INFINITY,"concurrency must be an integer or positive infinity"),R(r>0,"concurrency must be greater than 0"),this._concurrency=r,this._iqueue=[],this._running=0,this._checkQueueScheduled=!1}get concurrency(){return this._concurrency}get running(){return this._running}get pending(){return this._iqueue.length-this.running}async exec(r,t=0){return this.execCancellable(r,t)[0]}execCancellable(r,t=0){R(typeof r=="function","fct must be a function"),R(typeof t=="number","priority must be a number");const n=new Qs;let i=this._iqueue.length;for(;i>=1&&!(this._iqueue[i-1].priority>=t);)i-=1;const a={asyncFct:nn(r),deferred:n,priority:t,state:"pending"};return this._iqueue.splice(i,0,a),this._scheduleCheckQueue(),[n.promise,()=>{if(a.state!=="pending")return!1;{const u=this._iqueue.filter(o=>o!==a);return R(u.length<this._iqueue.length),this._iqueue=u,a.state="cancelled",n.reject(new an),!0}}]}_scheduleCheckQueue(){this._checkQueueScheduled||(this._checkQueueScheduled=!0,Mi(()=>{this._checkQueueScheduled=!1,this._checkQueue()}))}_checkQueue(){for(;;){if(R(this.running>=0,"invalid state"),R(this.running<=this.concurrency,"invalid state"),this.running===this.concurrency)return;const r=this._iqueue.find(t=>t.state==="pending");if(r===void 0)return;this._running+=1,r.state="running",Mi(()=>{r.asyncFct().finally(()=>{this._running-=1,this._iqueue=this._iqueue.filter(t=>t!==r)}).then(r.deferred.resolve,r.deferred.reject).then(()=>{this._scheduleCheckQueue()})})}}cancelAllPending(){const r=this._iqueue.filter(t=>t.state==="pending");return this._iqueue=this._iqueue.filter(t=>t.state!=="pending"),r.forEach(t=>{t.deferred.reject(new an)}),r.length}}function Ff(e){return typeof e=="number"?new Mf(e):e}async function ft(e){try{return{status:"fulfilled",value:await e()}}catch(r){return{status:"rejected",reason:r}}}async function*Nf(e,r,t=1,n=!0){R(typeof r=="function","iteratee must be a function"),r=nn(r);const i=zs(e),a=Ff(t);class u extends Error{}let o=-1,s=!1,l=!1,d=null,c=!1,v=!1,h=-1;const f=[];let p=0;const b=new Map,m=g=>{const _=p;p+=1;const O=(async()=>[_,await ft(g)])();R(!b.has(_),"waitList contains identifier"),b.set(_,O)},P=async()=>{R(b.size>=1,"Can not race on empty list");const[g]=await Promise.race([...b.values()]),_=b.delete(g);R(_,"waitList does not contain identifier")};let q=0;const w=new Map,I=(g,_)=>{q+=1;const O={value:_,index:g,cancel:null,state:null};w.set(g,O),m(async()=>{const N=a.exec(async()=>{if(O.state==="cancelled")throw new u;R(O.state==="scheduled","invalid task state");const Se=w.delete(g);R(Se,"Couldn't find index in scheduledList for removal");const $=await ft(()=>r(_,g,e));q-=1,A(g,_,$),$.status==="rejected"&&(v=!0,C(n?g:0))});return R(O.cancel===null,"task already has cancel"),O.cancel=()=>{R(O.state==="scheduled","task should be scheduled"),O.state="cancelled"},R(O.state===null,"task should have no state"),O.state="scheduled",N})},C=g=>{for(const _ of[...w.keys()].filter(O=>O>=g)){const O=w.get(_);R(O.cancel,"task does not have cancel"),O.cancel();const N=w.delete(_);R(N,"Couldn't find index in scheduledList for removal")}},y=()=>{s=!0,m(async()=>{const g=await ft(()=>i.next());if(s=!1,g.status==="fulfilled"){const{value:_,done:O}=g.value;O?c=!0:(o+=1,R(d===null,"fetchedValue should be null"),d=_,R(!l,"hasFetchedValue should be false"),l=!0)}else{c=!0,o+=1;const _=o;A(_,void 0,g),C(n?_:0)}})},A=(g,_,O)=>{n?(R(g-h-1>=0,"invalid index to insert"),R(f[g-h-1]===void 0,"already inserted result"),f[g-h-1]={index:g,value:_,snapshot:O}):f.push({index:g,value:_,snapshot:O})};for(y();;){for(await P();f.length>=1&&f[0]!==void 0;){const g=f.shift();if(h+=1,g.snapshot.status==="rejected")throw g.snapshot.reason;{let _=!1;try{yield g.snapshot.value,_=!0}finally{_||await i.return()}}}if(c&&o===h)return;l&&!v&&(I(o,d),l=!1,d=null),!s&&!c&&!v&&q<a.concurrency&&y()}}async function lt(e,r,t=1){for await(const n of Nf(e,r,t));}function Pe(){const e=T.ref(!1),r=T.reactive({}),t=T.ref(!1),n=T.ref(!1);function i(){t.value=!0}function a(){e.value=!1,t.value=!1,n.value=!1}return{dirty:e,touched:t,validated:n,fields:r,setTouched:i,reset:a}}function Fi(e,r,t,n,i){const a=T.ref(r),u=[],o=T.ref(!1),s=T.reactive([]),l=i?.group,d=T.reactive([]),c=T.ref(!1),v=T.ref(!1);t?.length>0&&(i?.replace_rules?f(t):p(t));function h(y){a.value=y,c.value&&P()}function f(y){d.splice(0,d.length,...y)}function p(y){d.push(...y)}function b(y){n.groups[y]||(n.groups[y]=Pe()),n.groups[y].fields[e]=C}function m(y){n.groups[y]&&delete n.groups[y].fields[e]}async function P(){s.splice(0,s.length);let y=!1;return u.length>0&&u?.every(A=>!A.getAttribute("disabled"))&&(y=!0),y&&await lt(d,async A=>{const g=await A(T.toValue(r));g!==null&&s.push(g)}),q()}function q(){return s.length>0}function w(){c.value=!0}function I(){o.value=!1,c.value=!1,v.value=!1,s.splice(0,s.length)}const C={form_value:a,controls:u,dirty:o,errors:s,group:l,rules:d,touched:c,validated:v,setValue:h,replaceRules:f,appendRules:p,addToGroup:b,removeFromGroup:m,validate:P,isValid:q,setTouched:w,reset:I};return C}function Lf(e){const r=T.ref(!1),t=T.reactive([]),n=T.reactive({}),i=T.reactive({}),a=T.ref(!1),u=T.ref(!1);function o(f,p,b,m){const P=n[f];if(P)b&&b.length>0&&(m?.replace_rules?P.replaceRules(b):P.appendRules(b)),m?.group&&(i[m?.group]||(i[m?.group]=Pe()),i[m?.group].fields[f]=P,P.group=m?.group);else if(!_e(p)){const q=Fi(f,p,b||[],h);n[f]=q,m?.group&&(i[m?.group]||(i[m?.group]=Pe()),i[m?.group].fields[f]=q)}}function s(f){n[f].group&&delete i[n[f].group].fields[f],delete n[f]}async function l(f){if(f&&i[f]){const p=i[f];await lt(Object.keys(p.fields),async b=>{await p.fields[b].validate()}),i[f].validated.value=!0}else await lt(Object.keys(n),async p=>{await n[p].validate()}),u.value=!0;return d()}function d(f){let p=Object.keys(n);return f&&(p=Object.keys(i[f].fields)),p.every(b=>n[b].errors.length===0)}function c(){a.value=!0}function v(f){r.value=!1,a.value=!1,u.value=!1,t.splice(0,t.length),f&&i[f]?(i[f].reset(),We(i[f].fields,p=>{p.reset()})):We(n,p=>{p.reset()})}const h={dirty:r,errors:t,fields:n,groups:i,touched:a,validated:u,addField:o,removeField:s,validate:l,isValid:d,setTouched:c,reset:v};return e&&We(e,(f,p)=>{o(p,f.value,f.rules,{group:f.group})}),h}const xf=T.defineComponent({name:"FieldValidation",props:{name:{type:String,required:!0},hideError:Boolean,modelValue:{type:null},modelModifiers:{default:()=>({})},replaceRules:{type:Boolean},rules:{type:Array,default(){return[]}},validator:{type:Object,required:!0}},data(){return{form_fields:[]}},computed:{field(){return this.validator.fields[this.name]},error(){return this.field&&this.field.errors.length?this.field.errors[0]:null}},watch:{modelValue:{async handler(e){this.field.setValue(e)},immediate:!0}},mounted(){let e;Object.keys(this.modelModifiers).length===1&&(e=Object.keys(this.modelModifiers)[0]),_e(this.modelValue)||this.validator.addField(this.name,T.ref(this.modelValue),this.rules||[],{replace_rules:this.replaceRules||!1,group:e}),T.nextTick(()=>{const r=this.$refs.root,t=r.querySelectorAll("input, select, textarea");this.form_fields=Array.from(t),this.form_fields.forEach(n=>{n.getAttribute("has-validation")!=="true"&&(this.validator.fields[this.name]?.controls.push(n),n.addEventListener("blur",i=>{if(!r.contains(i.relatedTarget)){if(this.validator.setTouched(),this.validator.fields[this.name].group){const a=this.validator.fields[this.name].group;this.validator.groups[a].setTouched()}this.validator.fields[this.name].setTouched(),this.validator.fields[this.name].validate()}}),n.setAttribute("has-validation","true"))})})},beforeUnmount(){this.form_fields.forEach(e=>{Vs(this.validator.fields[this.name].controls,e)})}}),Bf=(e,r)=>{const t=e.__vccOpts||e;for(const[n,i]of r)t[n]=i;return t};function Uf(e,r,t,n,i,a){return T.openBlock(),T.createElementBlock("div",{ref:"root",class:T.normalizeClass({invalid:e.error})},[T.renderSlot(e.$slots,"default",{invalid:!!e.error,error_message:e.error})],2)}const Gf=Bf(xf,[["render",Uf]]);function Vf(e){return function(r){return typeof r<"u"&&/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(r)?null:e||"Please enter a valid email address"}}function zf(e,r){return function(t){return!e||t===e?null:r||"The value does not match"}}function Wf(e,r){return function(t){const n=new RegExp(e);return typeof t<"u"&&n.test(t)?null:r||"Please enter a valid value"}}function Hf(e,r){return function(t){return typeof t<"u"&&t.trim().length<=e?null:r||`Value must not exceed ${e} characters`}}function Qf(e,r){return function(t){return typeof t<"u"&&t<=e?null:r||`Value must not exceed ${e}`}}function Kf(e,r){return function(t){return typeof t<"u"&&t.trim().length>=e?null:r||`Value must be at least ${e} characters`}}function kf(e,r){return function(t){return typeof t<"u"&&t>=e?null:r||`Value must be at least ${e}`}}function Yf(e){return function(r){return Ns(r)?e||"This field is required":null}}function Xf(e,r){return r=Ls({min:1,max:1/0},r),function(t){let n=!1;switch(typeof t){case"string":t.length>0&&(n=!0);break;case"number":t>=r.min&&t<=r.max&&(n=!0);break;case"boolean":r.allow_false?!_e(t)&&!Jt(t)&&(n=!0):t!==!1&&(n=!0);break;case"object":Array.isArray(t)?t.length>0&&(n=!0):Fs(t)||(n=!0);break;default:!_e(t)&&!Jt(t)&&(n=!0);break}return n?null:e||"This field is required"}}const Zf=Object.freeze(Object.defineProperty({__proto__:null,email:Vf,match:zf,matchRegExp:Wf,maxLength:Hf,maxValue:Qf,minLength:Kf,minValue:kf,notNil:Yf,required:Xf},Symbol.toStringTag,{value:"Module"}));function Ni(e){return[async r=>{try{const t=await e.safeParseAsync(r);return t.success?null:t.error.issues[0]?.message}catch(t){return t.message}}]}function Jf(e){const r={};return Object.keys(e.shape).forEach(n=>{r[n]={value:T.ref(null),rules:Ni(e.shape[n])}}),r}S.FieldValidation=Gf,S.rules=Zf,S.useFieldValidator=Fi,S.useFieldValidatorGroup=Pe,S.useFormValidator=Lf,S.zodRule=Ni,S.zodSchema=Jf,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (message: string): (value: string) => string | null;
|
package/dist/rules/index.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { default as email } from './email';
|
|
2
|
+
import { default as match } from './match';
|
|
3
|
+
import { default as matchRegExp } from './matchRegExp';
|
|
4
|
+
import { default as maxLength } from './maxLength';
|
|
5
|
+
import { default as maxValue } from './maxValue';
|
|
6
|
+
import { default as minLength } from './minLength';
|
|
7
|
+
import { default as minValue } from './minValue';
|
|
8
|
+
import { default as notNil } from './notNil';
|
|
9
|
+
import { default as required } from './required';
|
|
10
|
+
export { email, match, matchRegExp, maxLength, maxValue, minLength, minValue, notNil, required };
|
package/dist/rules/match.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export default function (match_value: any, message: string): (value: any) => string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (regex_pattern: RegExp, message: string): (value: any) => string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (max_length: number, message: string): (value: any) => string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (max_value: number, message: string): (value: any) => string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (min_length: number, message: string): (value: any) => string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (min_value: number, message: string): (value: any) => string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (message: string): (value: any) => string | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FieldValidatorConfig } from '../FieldValidator';
|
|
2
|
+
import { ZodObject, ZodAny } from 'zod';
|
|
3
|
+
export declare function zodRule(schema: ZodAny): ((value: any) => Promise<any>)[];
|
|
4
|
+
export declare function zodSchema(schema: ZodObject): Record<string, FieldValidatorConfig>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splitty-test/validation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"main": "dist/index.umd.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"lodash-es": "^4.17.21",
|
|
18
18
|
"modern-async": "^2.0.4",
|
|
19
|
-
"vue": "^3.5.21"
|
|
19
|
+
"vue": "^3.5.21",
|
|
20
|
+
"zod": "^4.1.9"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"@tsconfig/node22": "^22.0.2",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Validator } from './ValidatorClass';
|
|
2
|
-
export interface FieldValidatorConfig {
|
|
3
|
-
value: any;
|
|
4
|
-
rules: ValidationRule[];
|
|
5
|
-
group?: string;
|
|
6
|
-
}
|
|
7
|
-
export type ValidationRule = (value: any, ...args: any) => Promise<string | null> | (string | null);
|
|
8
|
-
export declare class FieldValidator {
|
|
9
|
-
controls: HTMLElement[];
|
|
10
|
-
dirty: boolean;
|
|
11
|
-
errors: string[];
|
|
12
|
-
group?: string;
|
|
13
|
-
rules: ValidationRule[];
|
|
14
|
-
touched: boolean;
|
|
15
|
-
validated: boolean;
|
|
16
|
-
validator: Validator;
|
|
17
|
-
value: any;
|
|
18
|
-
constructor(config: FieldValidatorConfig, validator: Validator);
|
|
19
|
-
get isValid(): boolean;
|
|
20
|
-
reset(): void;
|
|
21
|
-
validate(): Promise<boolean>;
|
|
22
|
-
}
|
package/dist/ValidatorClass.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { FieldValidator, FieldValidatorConfig } from './FieldValidatorClass';
|
|
2
|
-
export interface ValidatorConfig {
|
|
3
|
-
fields?: Record<string, FieldValidatorConfig>;
|
|
4
|
-
}
|
|
5
|
-
export interface ValidationGroup {
|
|
6
|
-
dirty: boolean;
|
|
7
|
-
fields: Record<string, FieldValidator>;
|
|
8
|
-
touched: boolean;
|
|
9
|
-
validated: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare class Validator {
|
|
12
|
-
dirty: boolean;
|
|
13
|
-
errors: string[];
|
|
14
|
-
fields: Record<string, FieldValidator>;
|
|
15
|
-
groups: Record<string, ValidationGroup>;
|
|
16
|
-
touched: boolean;
|
|
17
|
-
validated: boolean;
|
|
18
|
-
constructor(config?: ValidatorConfig);
|
|
19
|
-
isValid(group_name?: string): boolean;
|
|
20
|
-
reset(group_name?: string): void;
|
|
21
|
-
addField(field_name: string, field_config: FieldValidatorConfig): void;
|
|
22
|
-
removeField(field_name: string): void;
|
|
23
|
-
validate(group_name?: string): Promise<void>;
|
|
24
|
-
}
|