New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

abolish

Package Overview
Dependencies
Maintainers
1
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abolish - npm Package Compare versions

Comparing version 6.5.3 to 6.6.0

2

browser.min.js

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

"use strict";var AbolishBrowser=(()=>{var Oo=Object.create;var se=Object.defineProperty;var Vo=Object.getOwnPropertyDescriptor;var wo=Object.getOwnPropertyNames,lt=Object.getOwnPropertySymbols,So=Object.getPrototypeOf,dt=Object.prototype.hasOwnProperty,Co=Object.prototype.propertyIsEnumerable;var ut=(e,t,r)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,V=(e,t)=>{for(var r in t||(t={}))dt.call(t,r)&&ut(e,r,t[r]);if(lt)for(var r of lt(t))Co.call(t,r)&&ut(e,r,t[r]);return e};var i=(e,t)=>()=>(e&&(t=e(e=0)),t);var ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pt=(e,t)=>{for(var r in t)se(e,r,{get:t[r],enumerable:!0})},mt=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of wo(t))!dt.call(e,o)&&o!==r&&se(e,o,{get:()=>t[o],enumerable:!(a=Vo(t,o))||a.enumerable});return e};var K=(e,t,r)=>(r=e!=null?Oo(So(e)):{},mt(t||!e||!e.__esModule?se(r,"default",{value:e,enumerable:!0}):r,e)),ct=e=>mt(se({},"__esModule",{value:!0}),e);var S=(e,t,r)=>new Promise((a,o)=>{var s=n=>{try{l(r.next(n))}catch(u){o(u)}},f=n=>{try{l(r.throw(n))}catch(u){o(u)}},l=n=>n.done?a(n.value):Promise.resolve(n.value).then(s,f);l((r=r.apply(e,t)).next())});var De=ne((uf,ht)=>{"use strict";var jo=new RegExp(/([!a-zA-Z_*0-9]+)/g),_o=new RegExp(/([a-zA-Z_*0-9]+:[a-zA-Z_0-9]+)/g),To=new RegExp(/([a-zA-Z_*0-9]+:"[^"]+")/g),$o=new RegExp(/([a-zA-Z_*0-9]+:'[^']+')/g),Eo=new RegExp(/([a-zA-Z_*0-9]+:`[^`]+`)/g),Io=e=>{let t=e.split("|"),r={};for(let a=0;a<t.length;a++){let o=t[a];if(o.match($o)||o.match(To)||o.match(Eo)){let[s,...f]=o.split(":"),l=f.join(":");l=l.substring(1),l=l.substring(0,f.length-1),r[s]=l}else if(o.match(_o)){let[s,f]=o.split(":");isNaN(f)||(f=Number(f)),r[s]=f}else if(o.match(jo)){let s=o,f=!0;s.substring(0,1)==="!"&&(s=s.substring(1),f=!1),r[s]=f}}return r};ht.exports=Io});function fe(e,t,r="Options"){if(!Me(e,t))throw new TypeError(`${r} must be typeof [${t}], but [${typeof e}] was given.`);return!0}function Me(e,t){if(typeof t=="string")return t==="array"&&Array.isArray(e)?!0:typeof e===t;{let r=t.includes("array");return!r&&t.includes(typeof e)?!0:r&&(t.includes(typeof e)||Array.isArray(e))}}var ze=i(()=>{"use strict"});var bt=ne((xt,yt)=>{"use strict";ze();var C={default:{name:"default",description:"Set default value if original value is undefined or null",validator(e,t,{modifier:r}){return e==null&&r.setThis(t),!0}},required:{name:"required",description:"Value is required",error:":param is required.",validator:(e,t)=>t?typeof e=="undefined"||e===null?!1:typeof e=="string"||Array.isArray(e)?e.length>0:!0:!0},typeof:{name:"typeof",description:"Value is typeof :option",error:":param is not typeof :option",validator:function(t,r){return r===!1?!0:(typeof r=="string"&&r.includes(",")&&(r=r.split(",")),Me(t,r))}},exact:{name:"exact",error:":param failed exact validator",description:"Value is === :option",validator:(e,t)=>e===t},min:{name:"min",error:":param is too small. (Min. :option)",description:"Number: Value is >= :option",validator:(e,t,r)=>{let a=isNaN(e);return typeof e=="string"&&a||Array.isArray(e)?C.minLength.validator(e,t,r):a?!1:Number(e)>=Number(t)}},max:{name:"max",error:":param is too big. (Max. :option)",description:"Number: Value is <= :option",validator:(e,t,r)=>{let a=isNaN(e);return typeof e=="string"&&a||Array.isArray(e)?C.maxLength.validator(e,t,r):a?!1:Number(e)<=Number(t)}},minLength:{name:"minLength",error:":param is too short. (Min. :option characters)",description:"Value length is >= :option",validator:(e,t,{error:r,modifier:a})=>{var o;return e=(o=a.getThis())!=null?o:e,typeof e=="string"?e.trim().length>=Number(t):Array.isArray(e)?e.length>=Number(t)?!0:r(`:param length is too short. (Min: ${t})`):!1}},maxLength:{name:"maxLength",error:":param is too long. (Max. :option characters)",description:"Value length is <= :option",validator:(e,t,{error:r,modifier:a})=>{var o;return e=(o=a.getThis())!=null?o:e,typeof e=="string"?e.trim().length<=Number(t):Array.isArray(e)?e.length<=Number(t)?!0:r(`:param length is too long. (Max: ${t})`):!1}},size:{name:"size",error:":param must be of size: [:option]",description:"Check the size of a String, Array, or Object",validator:(e,t,{error:r})=>{let a;if(typeof e=="string"||Array.isArray(e))a=e.length;else if(typeof e=="object")try{a=Object.keys(e).length}catch(o){return r(o.message)}return a===void 0?!1:Array.isArray(t)?t.includes(a):a===Number(t)}},object:{name:"object",validator:(e,t,{error:r,modifier:a,abolish:o})=>{if(!e||typeof e!="object")return r(":param must be an object.");let[s,f]=o.validate(e,t);if(s)return r(s.message,s);a.setThis(f)},description:["Object: Value is an object"]},objectAsync:{name:"objectAsync",isAsync:!0,validator:(s,f,l)=>S(xt,[s,f,l],function*(e,t,{error:r,modifier:a,abolish:o}){if(!e||typeof e!="object")return r(":param must be an object.");let[n,u]=yield o.validateAsync(e,t);if(n)return r(n.message,n);a.setThis(u)})},$inline:{name:"$inline",error:":param failed inline validation.",validator:(e,t,r)=>t(e,r),description:"Register a custom validation function inline."},$inlineAsync:{name:"$inlineAsync",isAsync:!0,error:":param failed inline validation.",validator:(e,t,r)=>t(e,r),description:"Register a custom async validation function inline."}};C.type=Object.assign({},C.typeof);C.type.name="type";C.type.error=":param is not of type :option";C.type.description="Alias: typeof";for(let e of Object.keys(C)){let t=C[e];Object.defineProperty(t.validator,"name",{value:t.name})}yt.exports=C});var ko,gt,Rt=i(()=>{ko=typeof global=="object"&&global&&global.Object===Object&&global,gt=ko});var Po,No,q,ge=i(()=>{Rt();Po=typeof self=="object"&&self&&self.Object===Object&&self,No=gt||Po||Function("return this")(),q=No});var Fo,$,Re=i(()=>{ge();Fo=q.Symbol,$=Fo});function zo(e){var t=Do.call(e,le),r=e[le];try{e[le]=void 0;var a=!0}catch(s){}var o=Mo.call(e);return a&&(t?e[le]=r:delete e[le]),o}var At,Do,Mo,le,vt,Ot=i(()=>{Re();At=Object.prototype,Do=At.hasOwnProperty,Mo=At.toString,le=$?$.toStringTag:void 0;vt=zo});function Go(e){return Wo.call(e)}var Lo,Wo,Vt,wt=i(()=>{Lo=Object.prototype,Wo=Lo.toString;Vt=Go});function Bo(e){return e==null?e===void 0?Ho:Uo:St&&St in Object(e)?vt(e):Vt(e)}var Uo,Ho,St,Z,Ae=i(()=>{Re();Ot();wt();Uo="[object Null]",Ho="[object Undefined]",St=$?$.toStringTag:void 0;Z=Bo});function Ko(e){return e!=null&&typeof e=="object"}var J,ve=i(()=>{J=Ko});function Zo(e){return typeof e=="symbol"||J(e)&&Z(e)==qo}var qo,Y,Oe=i(()=>{Ae();ve();qo="[object Symbol]";Y=Zo});function Jo(e,t){for(var r=-1,a=e==null?0:e.length,o=Array(a);++r<a;)o[r]=t(e[r],r,e);return o}var Ct,jt=i(()=>{Ct=Jo});var Yo,k,ue=i(()=>{Yo=Array.isArray,k=Yo});function $t(e){if(typeof e=="string")return e;if(k(e))return Ct(e,$t)+"";if(Y(e))return Tt?Tt.call(e):"";var t=e+"";return t=="0"&&1/e==-Xo?"-0":t}var Xo,_t,Tt,Et,It=i(()=>{Re();jt();ue();Oe();Xo=1/0,_t=$?$.prototype:void 0,Tt=_t?_t.toString:void 0;Et=$t});function Qo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var W,Ve=i(()=>{W=Qo});function oi(e){if(!W(e))return!1;var t=Z(e);return t==ti||t==ri||t==ei||t==ai}var ei,ti,ri,ai,kt,Pt=i(()=>{Ae();Ve();ei="[object AsyncFunction]",ti="[object Function]",ri="[object GeneratorFunction]",ai="[object Proxy]";kt=oi});var ii,we,Nt=i(()=>{ge();ii=q["__core-js_shared__"],we=ii});function si(e){return!!Ft&&Ft in e}var Ft,Dt,Mt=i(()=>{Nt();Ft=function(){var e=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();Dt=si});function li(e){if(e!=null){try{return fi.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var ni,fi,zt,Lt=i(()=>{ni=Function.prototype,fi=ni.toString;zt=li});function yi(e){if(!W(e)||Dt(e))return!1;var t=kt(e)?xi:di;return t.test(zt(e))}var ui,di,pi,mi,ci,hi,xi,Wt,Gt=i(()=>{Pt();Mt();Ve();Lt();ui=/[\\^$.*+?()[\]{}|]/g,di=/^\[object .+?Constructor\]$/,pi=Function.prototype,mi=Object.prototype,ci=pi.toString,hi=mi.hasOwnProperty,xi=RegExp("^"+ci.call(hi).replace(ui,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Wt=yi});function bi(e,t){return e==null?void 0:e[t]}var Ut,Ht=i(()=>{Ut=bi});function gi(e,t){var r=Ut(e,t);return Wt(r)?r:void 0}var X,Se=i(()=>{Gt();Ht();X=gi});var Ri,Le,Bt=i(()=>{Se();Ri=function(){try{var e=X(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Le=Ri});function Oi(e,t){var r=typeof e;return t=t==null?Ai:t,!!t&&(r=="number"||r!="symbol"&&vi.test(e))&&e>-1&&e%1==0&&e<t}var Ai,vi,Ce,We=i(()=>{Ai=9007199254740991,vi=/^(?:0|[1-9]\d*)$/;Ce=Oi});function Vi(e,t,r){t=="__proto__"&&Le?Le(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Kt,qt=i(()=>{Bt();Kt=Vi});function wi(e,t){return e===t||e!==e&&t!==t}var je,Ge=i(()=>{je=wi});function ji(e,t,r){var a=e[t];(!(Ci.call(e,t)&&je(a,r))||r===void 0&&!(t in e))&&Kt(e,t,r)}var Si,Ci,Zt,Jt=i(()=>{qt();Ge();Si=Object.prototype,Ci=Si.hasOwnProperty;Zt=ji});function Ti(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=_i}var _i,Yt,Xt=i(()=>{_i=9007199254740991;Yt=Ti});function Ei(e){return J(e)&&Z(e)==$i}var $i,Ue,Qt=i(()=>{Ae();ve();$i="[object Arguments]";Ue=Ei});var er,Ii,ki,Pi,tr,rr=i(()=>{Qt();ve();er=Object.prototype,Ii=er.hasOwnProperty,ki=er.propertyIsEnumerable,Pi=Ue(function(){return arguments}())?Ue:function(e){return J(e)&&Ii.call(e,"callee")&&!ki.call(e,"callee")},tr=Pi});function Di(e,t){if(k(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Y(e)?!0:Fi.test(e)||!Ni.test(e)||t!=null&&e in Object(t)}var Ni,Fi,ar,or=i(()=>{ue();Oe();Ni=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fi=/^\w*$/;ar=Di});var Mi,E,de=i(()=>{Se();Mi=X(Object,"create"),E=Mi});function zi(){this.__data__=E?E(null):{},this.size=0}var ir,sr=i(()=>{de();ir=zi});function Li(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nr,fr=i(()=>{nr=Li});function Hi(e){var t=this.__data__;if(E){var r=t[e];return r===Wi?void 0:r}return Ui.call(t,e)?t[e]:void 0}var Wi,Gi,Ui,lr,ur=i(()=>{de();Wi="__lodash_hash_undefined__",Gi=Object.prototype,Ui=Gi.hasOwnProperty;lr=Hi});function qi(e){var t=this.__data__;return E?t[e]!==void 0:Ki.call(t,e)}var Bi,Ki,dr,pr=i(()=>{de();Bi=Object.prototype,Ki=Bi.hasOwnProperty;dr=qi});function Ji(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=E&&t===void 0?Zi:t,this}var Zi,mr,cr=i(()=>{de();Zi="__lodash_hash_undefined__";mr=Ji});function Q(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var He,hr=i(()=>{sr();fr();ur();pr();cr();Q.prototype.clear=ir;Q.prototype.delete=nr;Q.prototype.get=lr;Q.prototype.has=dr;Q.prototype.set=mr;He=Q});function Yi(){this.__data__=[],this.size=0}var xr,yr=i(()=>{xr=Yi});function Xi(e,t){for(var r=e.length;r--;)if(je(e[r][0],t))return r;return-1}var P,pe=i(()=>{Ge();P=Xi});function ts(e){var t=this.__data__,r=P(t,e);if(r<0)return!1;var a=t.length-1;return r==a?t.pop():es.call(t,r,1),--this.size,!0}var Qi,es,br,gr=i(()=>{pe();Qi=Array.prototype,es=Qi.splice;br=ts});function rs(e){var t=this.__data__,r=P(t,e);return r<0?void 0:t[r][1]}var Rr,Ar=i(()=>{pe();Rr=rs});function as(e){return P(this.__data__,e)>-1}var vr,Or=i(()=>{pe();vr=as});function os(e,t){var r=this.__data__,a=P(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var Vr,wr=i(()=>{pe();Vr=os});function ee(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var Sr,Cr=i(()=>{yr();gr();Ar();Or();wr();ee.prototype.clear=xr;ee.prototype.delete=br;ee.prototype.get=Rr;ee.prototype.has=vr;ee.prototype.set=Vr;Sr=ee});var is,jr,_r=i(()=>{Se();ge();is=X(q,"Map"),jr=is});function ss(){this.size=0,this.__data__={hash:new He,map:new(jr||Sr),string:new He}}var Tr,$r=i(()=>{hr();Cr();_r();Tr=ss});function ns(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Er,Ir=i(()=>{Er=ns});function fs(e,t){var r=e.__data__;return Er(t)?r[typeof t=="string"?"string":"hash"]:r.map}var N,me=i(()=>{Ir();N=fs});function ls(e){var t=N(this,e).delete(e);return this.size-=t?1:0,t}var kr,Pr=i(()=>{me();kr=ls});function us(e){return N(this,e).get(e)}var Nr,Fr=i(()=>{me();Nr=us});function ds(e){return N(this,e).has(e)}var Dr,Mr=i(()=>{me();Dr=ds});function ps(e,t){var r=N(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}var zr,Lr=i(()=>{me();zr=ps});function te(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var Be,Wr=i(()=>{$r();Pr();Fr();Mr();Lr();te.prototype.clear=Tr;te.prototype.delete=kr;te.prototype.get=Nr;te.prototype.has=Dr;te.prototype.set=zr;Be=te});function Ke(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ms);var r=function(){var a=arguments,o=t?t.apply(this,a):a[0],s=r.cache;if(s.has(o))return s.get(o);var f=e.apply(this,a);return r.cache=s.set(o,f)||s,f};return r.cache=new(Ke.Cache||Be),r}var ms,Gr,Ur=i(()=>{Wr();ms="Expected a function";Ke.Cache=Be;Gr=Ke});function hs(e){var t=Gr(e,function(a){return r.size===cs&&r.clear(),a}),r=t.cache;return t}var cs,Hr,Br=i(()=>{Ur();cs=500;Hr=hs});var xs,ys,bs,Kr,qr=i(()=>{Br();xs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ys=/\\(\\)?/g,bs=Hr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(xs,function(r,a,o,s){t.push(o?s.replace(ys,"$1"):a||r)}),t}),Kr=bs});function gs(e){return e==null?"":Et(e)}var F,ce=i(()=>{It();F=gs});function Rs(e,t){return k(e)?e:ar(e,t)?[e]:Kr(F(e))}var D,he=i(()=>{ue();or();qr();ce();D=Rs});function vs(e){if(typeof e=="string"||Y(e))return e;var t=e+"";return t=="0"&&1/e==-As?"-0":t}var As,M,xe=i(()=>{Oe();As=1/0;M=vs});function Os(e,t){t=D(t,e);for(var r=0,a=t.length;e!=null&&r<a;)e=e[M(t[r++])];return r&&r==a?e:void 0}var _e,qe=i(()=>{he();xe();_e=Os});function Vs(e,t,r){var a=e==null?void 0:_e(e,t);return a===void 0?r:a}var Ze,Zr=i(()=>{qe();Ze=Vs});function ws(e,t,r){var a=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(o);++a<o;)s[a]=e[a+t];return s}var Te,Je=i(()=>{Te=ws});function Ss(e,t,r){var a=e.length;return r=r===void 0?a:r,!t&&r>=a?e:Te(e,t,r)}var Jr,Yr=i(()=>{Je();Jr=Ss});function Ps(e){return ks.test(e)}var Cs,js,_s,Ts,$s,Es,Is,ks,$e,Ye=i(()=>{Cs="\\ud800-\\udfff",js="\\u0300-\\u036f",_s="\\ufe20-\\ufe2f",Ts="\\u20d0-\\u20ff",$s=js+_s+Ts,Es="\\ufe0e\\ufe0f",Is="\\u200d",ks=RegExp("["+Is+Cs+$s+Es+"]");$e=Ps});function Ns(e){return e.split("")}var Xr,Qr=i(()=>{Xr=Ns});function Zs(e){return e.match(qs)||[]}var ea,Fs,Ds,Ms,zs,Ls,Ws,Xe,Qe,Gs,ta,ra,aa,Us,oa,ia,Hs,Bs,Ks,qs,sa,na=i(()=>{ea="\\ud800-\\udfff",Fs="\\u0300-\\u036f",Ds="\\ufe20-\\ufe2f",Ms="\\u20d0-\\u20ff",zs=Fs+Ds+Ms,Ls="\\ufe0e\\ufe0f",Ws="["+ea+"]",Xe="["+zs+"]",Qe="\\ud83c[\\udffb-\\udfff]",Gs="(?:"+Xe+"|"+Qe+")",ta="[^"+ea+"]",ra="(?:\\ud83c[\\udde6-\\uddff]){2}",aa="[\\ud800-\\udbff][\\udc00-\\udfff]",Us="\\u200d",oa=Gs+"?",ia="["+Ls+"]?",Hs="(?:"+Us+"(?:"+[ta,ra,aa].join("|")+")"+ia+oa+")*",Bs=ia+oa+Hs,Ks="(?:"+[ta+Xe+"?",Xe,ra,aa,Ws].join("|")+")",qs=RegExp(Qe+"(?="+Qe+")|"+Ks+Bs,"g");sa=Zs});function Js(e){return $e(e)?sa(e):Xr(e)}var fa,la=i(()=>{Qr();Ye();na();fa=Js});function Ys(e){return function(t){t=F(t);var r=$e(t)?fa(t):void 0,a=r?r[0]:t.charAt(0),o=r?Jr(r,1).join(""):t.slice(1);return a[e]()+o}}var ua,da=i(()=>{Yr();Ye();la();ce();ua=Ys});var Xs,pa,ma=i(()=>{da();Xs=ua("toUpperCase"),pa=Xs});function Qs(e,t,r,a){var o=-1,s=e==null?0:e.length;for(a&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}var ca,ha=i(()=>{ca=Qs});function en(e){return function(t){return e==null?void 0:e[t]}}var xa,ya=i(()=>{xa=en});var tn,rn,ba,ga=i(()=>{ya();tn={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},rn=xa(tn),ba=rn});function dn(e){return e=F(e),e&&e.replace(an,ba).replace(un,"")}var an,on,sn,nn,fn,ln,un,Ra,Aa=i(()=>{ga();ce();an=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,on="\\u0300-\\u036f",sn="\\ufe20-\\ufe2f",nn="\\u20d0-\\u20ff",fn=on+sn+nn,ln="["+fn+"]",un=RegExp(ln,"g");Ra=dn});function mn(e){return e.match(pn)||[]}var pn,va,Oa=i(()=>{pn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;va=mn});function hn(e){return cn.test(e)}var cn,Va,wa=i(()=>{cn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;Va=hn});function Dn(e){return e.match(Fn)||[]}var Ta,xn,yn,bn,gn,$a,Ea,Rn,An,vn,On,Ia,Vn,ka,Pa,Sa,wn,Na,Sn,Fa,Da,Cn,jn,_n,Ma,za,re,Tn,Ca,$n,ja,_a,La,Wa,En,In,kn,Pn,Nn,Fn,Ga,Ua=i(()=>{Ta="\\ud800-\\udfff",xn="\\u0300-\\u036f",yn="\\ufe20-\\ufe2f",bn="\\u20d0-\\u20ff",gn=xn+yn+bn,$a="\\u2700-\\u27bf",Ea="a-z\\xdf-\\xf6\\xf8-\\xff",Rn="\\xac\\xb1\\xd7\\xf7",An="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vn="\\u2000-\\u206f",On=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ia="A-Z\\xc0-\\xd6\\xd8-\\xde",Vn="\\ufe0e\\ufe0f",ka=Rn+An+vn+On,Pa="['\u2019]",Sa="["+ka+"]",wn="["+gn+"]",Na="\\d+",Sn="["+$a+"]",Fa="["+Ea+"]",Da="[^"+Ta+ka+Na+$a+Ea+Ia+"]",Cn="\\ud83c[\\udffb-\\udfff]",jn="(?:"+wn+"|"+Cn+")",_n="[^"+Ta+"]",Ma="(?:\\ud83c[\\udde6-\\uddff]){2}",za="[\\ud800-\\udbff][\\udc00-\\udfff]",re="["+Ia+"]",Tn="\\u200d",Ca="(?:"+Fa+"|"+Da+")",$n="(?:"+re+"|"+Da+")",ja="(?:"+Pa+"(?:d|ll|m|re|s|t|ve))?",_a="(?:"+Pa+"(?:D|LL|M|RE|S|T|VE))?",La=jn+"?",Wa="["+Vn+"]?",En="(?:"+Tn+"(?:"+[_n,Ma,za].join("|")+")"+Wa+La+")*",In="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pn=Wa+La+En,Nn="(?:"+[Sn,Ma,za].join("|")+")"+Pn,Fn=RegExp([re+"?"+Fa+"+"+ja+"(?="+[Sa,re,"$"].join("|")+")",$n+"+"+_a+"(?="+[Sa,re+Ca,"$"].join("|")+")",re+"?"+Ca+"+"+ja,re+"+"+_a,kn,In,Na,Nn].join("|"),"g");Ga=Dn});function Mn(e,t,r){return e=F(e),t=r?void 0:t,t===void 0?Va(e)?Ga(e):va(e):e.match(t)||[]}var Ha,Ba=i(()=>{Oa();wa();ce();Ua();Ha=Mn});function Wn(e){return function(t){return ca(Ha(Ra(t).replace(Ln,"")),e,"")}}var zn,Ln,Ka,qa=i(()=>{ha();Aa();Ba();zn="['\u2019]",Ln=RegExp(zn,"g");Ka=Wn});function Gn(e,t,r){t=D(t,e);for(var a=-1,o=t.length,s=!1;++a<o;){var f=M(t[a]);if(!(s=e!=null&&r(e,f)))break;e=e[f]}return s||++a!=o?s:(o=e==null?0:e.length,!!o&&Yt(o)&&Ce(f,o)&&(k(e)||tr(e)))}var Za,Ja=i(()=>{he();rr();ue();We();Xt();xe();Za=Gn});function Un(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Ya,Xa=i(()=>{Ya=Un});function Kn(e,t){return e!=null&&Bn.call(e,t)}var Hn,Bn,Qa,eo=i(()=>{Hn=Object.prototype,Bn=Hn.hasOwnProperty;Qa=Kn});function qn(e,t){return e!=null&&Za(e,t,Qa)}var et,to=i(()=>{eo();Ja();et=qn});function Zn(e,t){return t.length<2?e:_e(e,Te(t,0,-1))}var ro,ao=i(()=>{qe();Je();ro=Zn});function Jn(e,t){return t=D(t,e),e=ro(e,t),e==null||delete e[M(Ya(t))]}var oo,io=i(()=>{he();Xa();ao();xe();oo=Jn});function Yn(e,t,r,a){if(!W(e))return e;t=D(t,e);for(var o=-1,s=t.length,f=s-1,l=e;l!=null&&++o<s;){var n=M(t[o]),u=r;if(n==="__proto__"||n==="constructor"||n==="prototype")return e;if(o!=f){var d=l[n];u=a?a(d,n,l):void 0,u===void 0&&(u=W(d)?d:Ce(t[o+1])?[]:{})}Zt(l,n,u),l=l[n]}return e}var so,no=i(()=>{Jt();he();We();Ve();xe();so=Yn});function Xn(e,t,r){return e==null?e:so(e,t,r)}var tt,fo=i(()=>{no();tt=Xn});var Qn,Ee,lo=i(()=>{qa();ma();Qn=Ka(function(e,t,r){return e+(r?" ":"")+pa(t)}),Ee=Qn});function ef(e,t){return e==null?!0:oo(e,t)}var Ie,uo=i(()=>{io();Ie=ef});var rt=i(()=>{Zr();to();fo();lo();uo();});function ae(e,t){return t?t.config.useStartCaseInErrors?Ee(e):e:Ee(e)}function oe(e,t,r){let a={};if(r===void 0?t.some(G):r)for(let s of t)a[s]=I(e,s);else for(let s of t)a[s]=e[s];return a}function po(e,t){let r={};for(let a in e)t.includes(a)||(r[a]=e[a]);return r}function at(e,t,r,a){return a===void 0&&G(t)?tt(e,t,r):(e[t]=r,e)}function I(e,t,r){return r===void 0&&G(t)?Ze(e,t):e[t]}function G(e){return e.indexOf(".")!==-1}function j(e,t){return typeof t=="object"&&t instanceof e}var ke=i(()=>{"use strict";rt()});var mo={};pt(mo,{Rule:()=>U,RuleTyped:()=>tf,Schema:()=>Pe,SchemaTyped:()=>rf});function U(e){Array.isArray(e)||(e=[e]);let t={};for(let r of e)typeof r=="string"&&(r=(0,ot.default)(r)),t=V(V({},t),r);return t}function tf(e){return U(e)}function Pe(e){let t={};for(let r of Object.keys(e)){let a=e[r];r==="$include"||(typeof a=="string"?a=(0,ot.default)(a):Array.isArray(a)&&(a=U(a))),t[r]=a}return t}function rf(e){return Pe(e)}var ot,it=i(()=>{"use strict";ot=K(De())});var nt=ne((cp,co)=>{"use strict";var st=class{constructor(t,r){this.code="default";return this.message=t,r&&(this.data=r),this}setCode(t){return this.code=t,this}setData(t){return this.data=t,this}setMessage(t){return this.message=t,this}};co.exports=st});var xo=ne((yp,ho)=>{"use strict";ke();rt();var ft=class{constructor(t,r,a=!1){return this.data=t,this.path=r,this.name=a,this.pathHasDotNotation=G(r),this}setData(t){return this.data=t,this}get(t){return I(this.data,t)}getThis(){return this.get(this.path)}has(t){return et(this.data,t)}set(t,r){return at(this.data,t,r)}setThis(t){return at(this.data,this.path,t,this.pathHasDotNotation)}unset(t){return Ie(this.data,t)}unsetThis(){return Ie(this.data,this.path)}getName(){return this.name||ae(this.path)}getNameRaw(){return this.name||this.path}};ho.exports=ft});function yo(e,t,r,a,o){let s=a.error,f=null,l="default",n=!1;return a.customError?a.errorFn&&(n=!0,s=a.errorFn({code:l,data:f,validator:a.name,value:t})):j(Ne.default,r)&&(r=r,n=!0,s=r.message,f=r.data,l=r.code),n&&(s.includes(":param")&&(s=s.replace(":param",o||e)),a.optionString&&s.includes(":option")&&(s=s.replace(":option",a.optionString))),[{code:l,key:e,type:"validator",validator:a.name,message:s,data:f},{}]}var Ne,_,bo=i(()=>{"use strict";Ne=K(nt());ke();_=class{constructor(t){this.data={};this.fields=[];this.includedFields=[];this.fieldsHasDotNotation=!1;this.isObject=!0;this.async=!1;Object.defineProperty(this,"input",{value:t,enumerable:!1,writable:!0})}validateObject(t){if(!this.isObject)throw new Error("Variable compiled input cannot be used to validate an object, use object compiled input!");if(this.async)throw new Error("Rules contains an async validator, use validateObjectAsync instead!");let r=V({},t),a=this.fields;for(let s in this.data){let f=this.data[s],l=I(r,s,this.fieldsHasDotNotation);if(f.$skip){let n=f.$skip;if(typeof n=="function"&&(n=n(l,r)),n){this.includedFields.includes(s)||(a=a.filter(u=>u!==s));continue}}for(let n in f.validators){let u=f.validators[n],d=!1;try{d=u.func(l,r)}catch(x){return[{code:"default",key:s,type:"internal",validator:n,message:x.message,data:x.stack},{}]}if(typeof d!==void 0&&(d===!1||j(Ne.default,d)))return yo(s,l,d,u,f.$name)}}let o;if(a.length===1){let s=a[0];o={[s]:r[s]}}else a.length>1?o=oe(r,a,this.fieldsHasDotNotation):o={};return[void 0,o]}validateObjectAsync(t){return S(this,null,function*(){if(!this.isObject)throw new Error("Variable compiled input cannot be used to validate an object, use object compiled input!");let r=V({},t),a=this.fields;for(let s in this.data){let f=this.data[s],l=I(r,s,this.fieldsHasDotNotation);if(f.$skip){let n=f.$skip;if(typeof n=="function"&&(n=n(l,r)),n){this.includedFields.includes(s)||(a=a.filter(u=>u!==s));continue}}for(let n in f.validators){let u=f.validators[n],d=!1;try{u.async?d=yield u.func(l,r):d=u.func(l,r)}catch(x){return[{code:"default",key:s,type:"internal",validator:u.name,message:x.message,data:x.stack},{}]}if(typeof d!==void 0&&(d===!1||j(Ne.default,d)))return yo(s,l,d,u,f.$name)}}let o;if(a.length===1){let s=a[0];o={[s]:r[s]}}else a.length>1?o=oe(r,a,this.fieldsHasDotNotation):o={};return[void 0,o]})}validateVariable(t){if(this.isObject)throw new Error("Object compiled cannot be used to validate a variable, use regular compiled input!");this.isObject=!0;let r=this.validateObject({variable:t});return this.isObject=!1,r[1]=r[1].variable,r}validateVariableAsync(t){return S(this,null,function*(){if(this.isObject)throw new Error("Object compiled cannot be used to validate a variable, use regular compiled input!");this.isObject=!0;let r=yield this.validateObjectAsync({variable:t});return this.isObject=!1,r[1]=r[1].variable,r})}validate(t){return this.isObject?this.validateObject(t):this.validateVariable(t)}validateAsync(t){return S(this,null,function*(){return this.isObject?this.validateObjectAsync(t):this.validateVariableAsync(t)})}getInputRule(){return this.input}getInputSchema(){return this.input}setValidatorOption(t,r,a){if(a){if(a&&!this.isObject)throw new Error("Field name is not allowed when using variable compiled input!")}else{if(this.isObject)throw new Error("Field name is required when using object compiled input!");a="variable"}return this.data[a]&&this.data[a].validators[t]&&(this.data[a].validators[t].option=r),this}copy(){let t=new _(this.input);t.fields=this.fields,t.includedFields=this.includedFields,t.fieldsHasDotNotation=this.fieldsHasDotNotation,t.isObject=this.isObject,t.async=this.async,t.data={};for(let r in this.data){let a={};for(let o in this.data[r].validators)a[o]=V({},this.data[r].validators[o]);t.data[r]={$name:this.data[r].$name,$skip:this.data[r].$skip,validators:a}}return t}}});var Ro={};pt(Ro,{AttemptError:()=>be,SuperKeys:()=>H,default:()=>of,isAbolishClass:()=>af,isAbolishInstance:()=>go});function af(e){return typeof e=="function"&&typeof e.addGlobalValidator=="function"}function go(e){return typeof e=="object"&&(e instanceof B||typeof e.addValidator=="function")}var ye,ie,z,Fe,be,H,B,of,Ao=i(()=>{"use strict";ye=K(De()),ie=K(bt());ke();it();z=K(nt()),Fe=K(xo());bo();ze();be=class extends Error{constructor(r){super(r.message);this.name="AttemptError",this.error=r}static instanceOf(r){return j(this,r)}},H=Object.freeze({Wildcards:new Set(["*","$"]),Fields:new Set(["*","$","$include"]),Rules:new Set(["$name","$skip","$error","$errors"])}),B=class{constructor(){this.validators={};this.config={useStartCaseInErrors:!0}}static getGlobalValidators(){return ie.default}static getGlobalValidatorsList(){return Object.keys(this.getGlobalValidators())}static addGlobalValidator(t){if(typeof t=="object"&&!Array.isArray(t))t.error||(t.error=`:param failed {${t.name}} validation.`),ie.default[t.name]=t,Object.defineProperty(t.validator,"name",{value:t.name});else throw new TypeError("addGlobalValidator argument must be an object.");return this}static addGlobalValidators(t){if(typeof t=="object"&&(t=Object.values(t)),Array.isArray(t))for(let r of t)B.addGlobalValidator(r);else throw new TypeError("addGlobalValidators argument must be an array or an object");return this}useStartCaseInErrors(t=!0){return this.config.useStartCaseInErrors=t,this}addValidator(t){if(typeof t=="object"&&!Array.isArray(t))t.error||(t.error=`:param failed {${t.name}} validation.`),this.validators[t.name]=t;else throw new TypeError("addValidator argument must be an object.");return this}addValidators(t){if(typeof t=="object"&&(t=Object.values(t)),Array.isArray(t))for(let r of t)this.addValidator(r);else throw new TypeError("addValidators argument must be an array or an object");return this}static validate(t,r){return new this().validate(t,r)}static validateAsync(t,r){return new this().validateAsync(t,r)}validate(t,r,a=!1){if(r instanceof _)return r.validateObject(t);let o={validated:{},jobs:[],keysToBeValidated:[],includeKeys:[]},s={};(r.hasOwnProperty("*")||r.hasOwnProperty("$"))&&(s=r["*"]||r.$,typeof s=="string"&&(s=(0,ye.default)(s)));let f=V({},t),l=[];if(r.hasOwnProperty("$include")&&(l=r.$include,!Array.isArray(l)))throw new Error("$include has to be an array!");let n=Object.keys(r);n=n.filter(u=>!H.Fields.has(u));for(let u of n){let d=r[u];typeof d=="string"?d=(0,ye.default)(d):Array.isArray(d)&&(d=U(d));let x=!1;if(d.hasOwnProperty("$skip")&&(x=d.$skip,typeof x=="function"&&(x=x(f[u],f)),typeof x!="boolean"))throw new Error(`$skip value or resolved function value must be a BOOLEAN in RuleFor: (${u})`);if(x)n=n.filter(R=>R!==u);else{let R=!1;if(d.hasOwnProperty("$name")&&(R=d.$name,typeof R!="string"))throw new Error(`$name must be a string in RuleFor: (${u})`);let y;if(d.hasOwnProperty("$error")&&(y=d.$error,!y||typeof y!="string"&&typeof y!="function"))throw new Error(`$error value must be a STRING or FUNCTION in RuleFor: (${u})`);let c;if(d.hasOwnProperty("$errors")&&(c=d.$errors,!c||typeof c!="object"))throw new Error(`$errors value must be an OBJECT in RuleFor: (${u})`);d=V(V({},s),po(d,[...H.Rules]));for(let p of Object.keys(d)){if(!this.validators.hasOwnProperty(p)&&!ie.default.hasOwnProperty(p))throw new Error(`Validator: {${p}} does not exists but defined in rules`);let b=this.validators[p]||ie.default[p];if(!a&&b.isAsync)throw new Error(`Validator: {${p}} is async, use async method instead.`);let w=d[p],A=I(f,u);if(a)o.jobs.push({$name:R,rule:u,validator:b,validatorName:p,validatorOption:w,$error:y,$errors:c});else{let m=!1;try{m=b.validator(A,w,{error:(h,g)=>new z.default(h,g),modifier:new Fe.default(f,u,R),abolish:this})}catch(h){return[{code:"default",key:u,type:"internal",validator:p,message:h.message,data:h.stack},{}]}if(m===!1||j(z.default,m)){let h,g=null,v="default";if(j(z.default,m)&&(h=m.message,g=m.data,v=m.code),y&&(typeof y=="function"?h=y({code:v,validator:p,data:g,value:A}):h=y),c&&c[p]){let L=c[p];typeof L=="function"?h=L({code:v,data:g,validator:p,value:A}):h=L}let O=typeof w=="string"||typeof w=="number"||Array.isArray(w);return h=(h||b.error).replace(":param",R||ae(u,this)),O&&(h=h.replace(":option",String(w))),[{code:v,key:u,type:"validator",validator:p,message:h,data:g},{}]}}}}}return a?(o.validated=f,o.keysToBeValidated=n,o.includeKeys=l,o):(f=oe(f,n.concat(l)),[void 0,f])}validateAsync(t,r){if(r instanceof _)return r.validateObjectAsync(t);let a=this.validate(t,r,!0),{validated:o,jobs:s,keysToBeValidated:f,includeKeys:l}=a;return new Promise(n=>S(this,null,function*(){for(let u of s){let{$name:d,rule:x,validator:R,validatorName:y,validatorOption:c,$error:p,$errors:b}=u,w=I(o,x),A=!1;try{A=yield R.validator(w,c,{error:(m,h)=>new z.default(m,h),modifier:new Fe.default(o,x,d),abolish:this})}catch(m){return n([{code:"default",key:x,type:"internal",validator:y,message:m.message,data:m.stack},{}])}if(A===!1||j(z.default,A)){let m,h=null,g="default";if(j(z.default,A)&&(m=A.message,h=A.data,g=A.code),p&&(typeof p=="function"?m=p({code:g,validator:y,data:h,value:w}):m=p),b&&b[y]){let O=b[y];typeof O=="function"?m=O({code:g,data:h,validator:y,value:w}):m=O}return m=(m||R.error).replace(":param",d||ae(x,this)),(typeof c=="string"||typeof c=="number")&&(m=m.replace(":option",String(c))),n([{code:g,key:x,type:"validator",validator:y,message:m,data:h},{}])}}return n([void 0,oe(o,f.concat(l))])}))}check(t,r){if(r instanceof _)return r.validateVariable(t);let[a,o]=this.validate({variable:t},{variable:r,$include:["variable"]});return[a,o==null?void 0:o.variable]}static check(t,r){return new this().check(t,r)}checkAsync(t,r){return S(this,null,function*(){if(r instanceof _)return r.validateVariableAsync(t);let[a,o]=yield this.validateAsync({variable:t},{variable:r,$include:["variable"]});return[a,o==null?void 0:o.variable]})}static checkAsync(t,r){return new this().checkAsync(t,r)}attempt(t,r){let a=this.check(t,r);if(a[0])throw new be(a[0]);return a[1]}static attempt(t,r,a){return new this().attempt(t,r)}attemptAsync(t,r){return S(this,null,function*(){let a=yield this.checkAsync(t,r);if(a[0])throw new be(a[0]);return a[1]})}static attemptAsync(t,r){return S(this,null,function*(){return new this().attemptAsync(t,r)})}test(t,r){return!this.check(t,r)[0]}static test(t,r){return new this().test(t,r)}testAsync(t,r){return S(this,null,function*(){return!(yield this.checkAsync(t,r))[0]})}static testAsync(t,r){return new this().testAsync(t,r)}static compileObject(t,r){let a=r?go(r)?r:new r:new B,o=new _(Pe(t)),s,f=[];for(let[l,n]of Object.entries(t))H.Wildcards.has(l)?(s=n,typeof s=="string"&&(s=(0,ye.default)(s))):l==="$include"&&(f=n);for(let[l,n]of Object.entries(t)){if(H.Fields.has(l))continue;let u={validators:{}},d=n;typeof n=="string"?d=(0,ye.default)(n):Array.isArray(n)&&(d=U(n)),s&&(d=V(V({},s),d));let x,R={};for(let[c,p]of Object.entries(d))H.Rules.has(c)&&(c==="$name"?(fe(p,["string"],"$name"),u.$name=p):c==="$skip"?(fe(p,["boolean","function"],"$skip"),u.$skip=p):c==="$error"?(fe(p,["string","function"],"$error"),x=p):c==="$errors"&&(fe(p,["object"],"$errors"),R=p));!u.$name&&a.config.useStartCaseInErrors&&(u.$name=ae(l));let y=new Fe.default({},l);for(let[c,p]of Object.entries(d)){if(H.Rules.has(c))continue;let b=a.validators[c]||ie.default[c];if(!b)throw new Error(`Validator ${c} not found`);b.isAsync&&(o.async=!0);let w=typeof p=="string"||typeof p=="number"||typeof p=="boolean"||Array.isArray(p),A={abolish:a,modifier:y,error:(O,L)=>new z.default(O,L)};b.error||(b.error=`:param failed {${b.name}} validation.`);let m=b.error,h,g;if(x&&(typeof x=="string"?(m=x,g=!0):typeof x=="function"&&(h=x,g=!0)),R&&R[c]){let O=R[c];typeof O=="string"?(m=O,g=!0):typeof O=="function"&&(h=O,g=!0)}m.includes(":param")&&(m=m.replace(/:param/g,u.$name||l));let v={name:c,option:p,error:m,async:b.isAsync===!0,func(O,L){return A.modifier.setData(L),b.validator(O,this.option,A)}};g&&(v.customError=!0),h&&(v.errorFn=h),w&&(v.optionString=String(p),v.error=v.error.replace(/:option/g,v.optionString)),Object.defineProperty(v.func,"name",{value:`Wrapped(${c})`}),u.validators[c]=v}o.data[l]=u}return Object.keys(o.data).forEach(l=>{o.fields.includes(l)||o.fields.push(l)}),f.forEach(l=>{o.fields.includes(l)||o.fields.push(l)}),o.includedFields=f,o.fieldsHasDotNotation=o.fields.some(G),o}static compile(t,r){t=U(t);let a=this.compileObject({variable:t,$include:["variable"]},r);return a.input=t,a.isObject=!1,a}};of=B});var ff=ne(T=>{var sf=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(T,"__esModule",{value:!0});T.Schema=T.Rule=T.Abolish=void 0;var nf=sf((Ao(),ct(Ro)));T.Abolish=nf.default;var vo=(it(),ct(mo));Object.defineProperty(T,"Rule",{enumerable:!0,get:function(){return vo.Rule}});Object.defineProperty(T,"Schema",{enumerable:!0,get:function(){return vo.Schema}})});return ff();})();
"use strict";var AbolishBrowser=(()=>{var Vo=Object.create;var se=Object.defineProperty;var So=Object.getOwnPropertyDescriptor;var jo=Object.getOwnPropertyNames,dt=Object.getOwnPropertySymbols,Co=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty,$o=Object.prototype.propertyIsEnumerable;var pt=(e,t,r)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))mt.call(t,r)&&pt(e,r,t[r]);if(dt)for(var r of dt(t))$o.call(t,r)&&pt(e,r,t[r]);return e};var i=(e,t)=>()=>(e&&(t=e(e=0)),t);var ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ct=(e,t)=>{for(var r in t)se(e,r,{get:t[r],enumerable:!0})},ht=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of jo(t))!mt.call(e,o)&&o!==r&&se(e,o,{get:()=>t[o],enumerable:!(a=So(t,o))||a.enumerable});return e};var B=(e,t,r)=>(r=e!=null?Vo(Co(e)):{},ht(t||!e||!e.__esModule?se(r,"default",{value:e,enumerable:!0}):r,e)),xt=e=>ht(se({},"__esModule",{value:!0}),e);var j=(e,t,r)=>new Promise((a,o)=>{var s=f=>{try{u(r.next(f))}catch(l){o(l)}},n=f=>{try{u(r.throw(f))}catch(l){o(l)}},u=f=>f.done?a(f.value):Promise.resolve(f.value).then(s,n);u((r=r.apply(e,t)).next())});var ze=ne((pf,yt)=>{"use strict";var _o=new RegExp(/([!a-zA-Z_*0-9]+)/g),To=new RegExp(/([a-zA-Z_*0-9]+:[a-zA-Z_0-9]+)/g),ko=new RegExp(/([a-zA-Z_*0-9]+:"[^"]+")/g),Eo=new RegExp(/([a-zA-Z_*0-9]+:'[^']+')/g),Io=new RegExp(/([a-zA-Z_*0-9]+:`[^`]+`)/g),Po=e=>{let t=e.split("|"),r={};for(let a=0;a<t.length;a++){let o=t[a];if(o.match(Eo)||o.match(ko)||o.match(Io)){let[s,...n]=o.split(":"),u=n.join(":");u=u.substring(1),u=u.substring(0,n.length-1),r[s]=u}else if(o.match(To)){let[s,n]=o.split(":");isNaN(n)||(n=Number(n)),r[s]=n}else if(o.match(_o)){let s=o,n=!0;s.substring(0,1)==="!"&&(s=s.substring(1),n=!1),r[s]=n}}return r};yt.exports=Po});function fe(e,t,r="Options"){if(!Le(e,t))throw new TypeError(`${r} must be typeof [${t}], but [${typeof e}] was given.`);return!0}function Le(e,t){if(typeof t=="string")return t==="array"&&Array.isArray(e)?!0:typeof e===t;{let r=t.includes("array");return!r&&t.includes(typeof e)?!0:r&&(t.includes(typeof e)||Array.isArray(e))}}var We=i(()=>{"use strict"});var Rt=ne((bt,gt)=>{"use strict";We();var $={default:{name:"default",description:"Set default value if original value is undefined or null",validator(e,t,{modifier:r}){return e==null&&r.setThis(t),!0}},required:{name:"required",description:"Value is required",error:":param is required.",validator:(e,t)=>t?typeof e=="undefined"||e===null?!1:typeof e=="string"||Array.isArray(e)?e.length>0:!0:!0},typeof:{name:"typeof",description:"Value is typeof :option",error:":param is not typeof :option",validator:function(t,r){return r===!1?!0:(typeof r=="string"&&r.includes(",")&&(r=r.split(",")),Le(t,r))}},exact:{name:"exact",error:":param failed exact validator",description:"Value is === :option",validator:(e,t)=>e===t},min:{name:"min",error:":param is too small. (Min. :option)",description:"Number: Value is >= :option",validator:(e,t,r)=>{let a=isNaN(e);return typeof e=="string"&&a||Array.isArray(e)?$.minLength.validator(e,t,r):a?!1:Number(e)>=Number(t)}},max:{name:"max",error:":param is too big. (Max. :option)",description:"Number: Value is <= :option",validator:(e,t,r)=>{let a=isNaN(e);return typeof e=="string"&&a||Array.isArray(e)?$.maxLength.validator(e,t,r):a?!1:Number(e)<=Number(t)}},minLength:{name:"minLength",error:":param is too short. (Min. :option characters)",description:"Value length is >= :option",validator:(e,t,{error:r,modifier:a})=>{var o;return e=(o=a.getThis())!=null?o:e,typeof e=="string"?e.trim().length>=Number(t):Array.isArray(e)?e.length>=Number(t)?!0:r(`:param length is too short. (Min: ${t})`):!1}},maxLength:{name:"maxLength",error:":param is too long. (Max. :option characters)",description:"Value length is <= :option",validator:(e,t,{error:r,modifier:a})=>{var o;return e=(o=a.getThis())!=null?o:e,typeof e=="string"?e.trim().length<=Number(t):Array.isArray(e)?e.length<=Number(t)?!0:r(`:param length is too long. (Max: ${t})`):!1}},size:{name:"size",error:":param must be of size: [:option]",description:"Check the size of a String, Array, or Object",validator:(e,t,{error:r})=>{let a;if(typeof e=="string"||Array.isArray(e))a=e.length;else if(typeof e=="object")try{a=Object.keys(e).length}catch(o){return r(o.message)}return a===void 0?!1:Array.isArray(t)?t.includes(a):a===Number(t)}},object:{name:"object",validator:(e,t,{error:r,modifier:a,abolish:o})=>{if(!e||typeof e!="object")return r(":param must be an object.");let[s,n]=o.validate(e,t);if(s)return r(s.message,s);a.setThis(n)},description:["Object: Value is an object"]},objectAsync:{name:"objectAsync",isAsync:!0,validator:(s,n,u)=>j(bt,[s,n,u],function*(e,t,{error:r,modifier:a,abolish:o}){if(!e||typeof e!="object")return r(":param must be an object.");let[f,l]=yield o.validateAsync(e,t);if(f)return r(f.message,f);a.setThis(l)})},$inline:{name:"$inline",error:":param failed inline validation.",validator:(e,t,r)=>t(e,r),description:"Register a custom validation function inline."},$inlineAsync:{name:"$inlineAsync",isAsync:!0,error:":param failed inline validation.",validator:(e,t,r)=>t(e,r),description:"Register a custom async validation function inline."}};$.type=Object.assign({},$.typeof);$.type.name="type";$.type.error=":param is not of type :option";$.type.description="Alias: typeof";for(let e of Object.keys($)){let t=$[e];Object.defineProperty(t.validator,"name",{value:t.name})}gt.exports=$});var No,At,vt=i(()=>{No=typeof global=="object"&&global&&global.Object===Object&&global,At=No});var Fo,Do,q,ge=i(()=>{vt();Fo=typeof self=="object"&&self&&self.Object===Object&&self,Do=At||Fo||Function("return this")(),q=Do});var Mo,k,Re=i(()=>{ge();Mo=q.Symbol,k=Mo});function Wo(e){var t=zo.call(e,le),r=e[le];try{e[le]=void 0;var a=!0}catch(s){}var o=Lo.call(e);return a&&(t?e[le]=r:delete e[le]),o}var Ot,zo,Lo,le,wt,Vt=i(()=>{Re();Ot=Object.prototype,zo=Ot.hasOwnProperty,Lo=Ot.toString,le=k?k.toStringTag:void 0;wt=Wo});function Ho(e){return Uo.call(e)}var Go,Uo,St,jt=i(()=>{Go=Object.prototype,Uo=Go.toString;St=Ho});function qo(e){return e==null?e===void 0?Bo:Ko:Ct&&Ct in Object(e)?wt(e):St(e)}var Ko,Bo,Ct,Z,Ae=i(()=>{Re();Vt();jt();Ko="[object Null]",Bo="[object Undefined]",Ct=k?k.toStringTag:void 0;Z=qo});function Zo(e){return e!=null&&typeof e=="object"}var J,ve=i(()=>{J=Zo});function Yo(e){return typeof e=="symbol"||J(e)&&Z(e)==Jo}var Jo,Y,Oe=i(()=>{Ae();ve();Jo="[object Symbol]";Y=Yo});function Xo(e,t){for(var r=-1,a=e==null?0:e.length,o=Array(a);++r<a;)o[r]=t(e[r],r,e);return o}var $t,_t=i(()=>{$t=Xo});var Qo,P,ue=i(()=>{Qo=Array.isArray,P=Qo});function Et(e){if(typeof e=="string")return e;if(P(e))return $t(e,Et)+"";if(Y(e))return kt?kt.call(e):"";var t=e+"";return t=="0"&&1/e==-ei?"-0":t}var ei,Tt,kt,It,Pt=i(()=>{Re();_t();ue();Oe();ei=1/0,Tt=k?k.prototype:void 0,kt=Tt?Tt.toString:void 0;It=Et});function ti(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var U,we=i(()=>{U=ti});function si(e){if(!U(e))return!1;var t=Z(e);return t==ai||t==oi||t==ri||t==ii}var ri,ai,oi,ii,Nt,Ft=i(()=>{Ae();we();ri="[object AsyncFunction]",ai="[object Function]",oi="[object GeneratorFunction]",ii="[object Proxy]";Nt=si});var ni,Ve,Dt=i(()=>{ge();ni=q["__core-js_shared__"],Ve=ni});function fi(e){return!!Mt&&Mt in e}var Mt,zt,Lt=i(()=>{Dt();Mt=function(){var e=/[^.]+$/.exec(Ve&&Ve.keys&&Ve.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();zt=fi});function di(e){if(e!=null){try{return ui.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var li,ui,Wt,Gt=i(()=>{li=Function.prototype,ui=li.toString;Wt=di});function gi(e){if(!U(e)||zt(e))return!1;var t=Nt(e)?bi:mi;return t.test(Wt(e))}var pi,mi,ci,hi,xi,yi,bi,Ut,Ht=i(()=>{Ft();Lt();we();Gt();pi=/[\\^$.*+?()[\]{}|]/g,mi=/^\[object .+?Constructor\]$/,ci=Function.prototype,hi=Object.prototype,xi=ci.toString,yi=hi.hasOwnProperty,bi=RegExp("^"+xi.call(yi).replace(pi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Ut=gi});function Ri(e,t){return e==null?void 0:e[t]}var Kt,Bt=i(()=>{Kt=Ri});function Ai(e,t){var r=Kt(e,t);return Ut(r)?r:void 0}var X,Se=i(()=>{Ht();Bt();X=Ai});var vi,Ge,qt=i(()=>{Se();vi=function(){try{var e=X(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ge=vi});function Vi(e,t){var r=typeof e;return t=t==null?Oi:t,!!t&&(r=="number"||r!="symbol"&&wi.test(e))&&e>-1&&e%1==0&&e<t}var Oi,wi,je,Ue=i(()=>{Oi=9007199254740991,wi=/^(?:0|[1-9]\d*)$/;je=Vi});function Si(e,t,r){t=="__proto__"&&Ge?Ge(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Zt,Jt=i(()=>{qt();Zt=Si});function ji(e,t){return e===t||e!==e&&t!==t}var Ce,He=i(()=>{Ce=ji});function _i(e,t,r){var a=e[t];(!($i.call(e,t)&&Ce(a,r))||r===void 0&&!(t in e))&&Zt(e,t,r)}var Ci,$i,Yt,Xt=i(()=>{Jt();He();Ci=Object.prototype,$i=Ci.hasOwnProperty;Yt=_i});function ki(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ti}var Ti,Qt,er=i(()=>{Ti=9007199254740991;Qt=ki});function Ii(e){return J(e)&&Z(e)==Ei}var Ei,Ke,tr=i(()=>{Ae();ve();Ei="[object Arguments]";Ke=Ii});var rr,Pi,Ni,Fi,ar,or=i(()=>{tr();ve();rr=Object.prototype,Pi=rr.hasOwnProperty,Ni=rr.propertyIsEnumerable,Fi=Ke(function(){return arguments}())?Ke:function(e){return J(e)&&Pi.call(e,"callee")&&!Ni.call(e,"callee")},ar=Fi});function zi(e,t){if(P(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Y(e)?!0:Mi.test(e)||!Di.test(e)||t!=null&&e in Object(t)}var Di,Mi,ir,sr=i(()=>{ue();Oe();Di=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mi=/^\w*$/;ir=zi});var Li,E,de=i(()=>{Se();Li=X(Object,"create"),E=Li});function Wi(){this.__data__=E?E(null):{},this.size=0}var nr,fr=i(()=>{de();nr=Wi});function Gi(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var lr,ur=i(()=>{lr=Gi});function Bi(e){var t=this.__data__;if(E){var r=t[e];return r===Ui?void 0:r}return Ki.call(t,e)?t[e]:void 0}var Ui,Hi,Ki,dr,pr=i(()=>{de();Ui="__lodash_hash_undefined__",Hi=Object.prototype,Ki=Hi.hasOwnProperty;dr=Bi});function Ji(e){var t=this.__data__;return E?t[e]!==void 0:Zi.call(t,e)}var qi,Zi,mr,cr=i(()=>{de();qi=Object.prototype,Zi=qi.hasOwnProperty;mr=Ji});function Xi(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=E&&t===void 0?Yi:t,this}var Yi,hr,xr=i(()=>{de();Yi="__lodash_hash_undefined__";hr=Xi});function Q(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var Be,yr=i(()=>{fr();ur();pr();cr();xr();Q.prototype.clear=nr;Q.prototype.delete=lr;Q.prototype.get=dr;Q.prototype.has=mr;Q.prototype.set=hr;Be=Q});function Qi(){this.__data__=[],this.size=0}var br,gr=i(()=>{br=Qi});function es(e,t){for(var r=e.length;r--;)if(Ce(e[r][0],t))return r;return-1}var N,pe=i(()=>{He();N=es});function as(e){var t=this.__data__,r=N(t,e);if(r<0)return!1;var a=t.length-1;return r==a?t.pop():rs.call(t,r,1),--this.size,!0}var ts,rs,Rr,Ar=i(()=>{pe();ts=Array.prototype,rs=ts.splice;Rr=as});function os(e){var t=this.__data__,r=N(t,e);return r<0?void 0:t[r][1]}var vr,Or=i(()=>{pe();vr=os});function is(e){return N(this.__data__,e)>-1}var wr,Vr=i(()=>{pe();wr=is});function ss(e,t){var r=this.__data__,a=N(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var Sr,jr=i(()=>{pe();Sr=ss});function ee(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var Cr,$r=i(()=>{gr();Ar();Or();Vr();jr();ee.prototype.clear=br;ee.prototype.delete=Rr;ee.prototype.get=vr;ee.prototype.has=wr;ee.prototype.set=Sr;Cr=ee});var ns,_r,Tr=i(()=>{Se();ge();ns=X(q,"Map"),_r=ns});function fs(){this.size=0,this.__data__={hash:new Be,map:new(_r||Cr),string:new Be}}var kr,Er=i(()=>{yr();$r();Tr();kr=fs});function ls(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Ir,Pr=i(()=>{Ir=ls});function us(e,t){var r=e.__data__;return Ir(t)?r[typeof t=="string"?"string":"hash"]:r.map}var F,me=i(()=>{Pr();F=us});function ds(e){var t=F(this,e).delete(e);return this.size-=t?1:0,t}var Nr,Fr=i(()=>{me();Nr=ds});function ps(e){return F(this,e).get(e)}var Dr,Mr=i(()=>{me();Dr=ps});function ms(e){return F(this,e).has(e)}var zr,Lr=i(()=>{me();zr=ms});function cs(e,t){var r=F(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}var Wr,Gr=i(()=>{me();Wr=cs});function te(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var qe,Ur=i(()=>{Er();Fr();Mr();Lr();Gr();te.prototype.clear=kr;te.prototype.delete=Nr;te.prototype.get=Dr;te.prototype.has=zr;te.prototype.set=Wr;qe=te});function Ze(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hs);var r=function(){var a=arguments,o=t?t.apply(this,a):a[0],s=r.cache;if(s.has(o))return s.get(o);var n=e.apply(this,a);return r.cache=s.set(o,n)||s,n};return r.cache=new(Ze.Cache||qe),r}var hs,Hr,Kr=i(()=>{Ur();hs="Expected a function";Ze.Cache=qe;Hr=Ze});function ys(e){var t=Hr(e,function(a){return r.size===xs&&r.clear(),a}),r=t.cache;return t}var xs,Br,qr=i(()=>{Kr();xs=500;Br=ys});var bs,gs,Rs,Zr,Jr=i(()=>{qr();bs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gs=/\\(\\)?/g,Rs=Br(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(bs,function(r,a,o,s){t.push(o?s.replace(gs,"$1"):a||r)}),t}),Zr=Rs});function As(e){return e==null?"":It(e)}var D,ce=i(()=>{Pt();D=As});function vs(e,t){return P(e)?e:ir(e,t)?[e]:Zr(D(e))}var M,he=i(()=>{ue();sr();Jr();ce();M=vs});function ws(e){if(typeof e=="string"||Y(e))return e;var t=e+"";return t=="0"&&1/e==-Os?"-0":t}var Os,z,xe=i(()=>{Oe();Os=1/0;z=ws});function Vs(e,t){t=M(t,e);for(var r=0,a=t.length;e!=null&&r<a;)e=e[z(t[r++])];return r&&r==a?e:void 0}var $e,Je=i(()=>{he();xe();$e=Vs});function Ss(e,t,r){var a=e==null?void 0:$e(e,t);return a===void 0?r:a}var Ye,Yr=i(()=>{Je();Ye=Ss});function js(e,t,r){var a=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(o);++a<o;)s[a]=e[a+t];return s}var _e,Xe=i(()=>{_e=js});function Cs(e,t,r){var a=e.length;return r=r===void 0?a:r,!t&&r>=a?e:_e(e,t,r)}var Xr,Qr=i(()=>{Xe();Xr=Cs});function Fs(e){return Ns.test(e)}var $s,_s,Ts,ks,Es,Is,Ps,Ns,Te,Qe=i(()=>{$s="\\ud800-\\udfff",_s="\\u0300-\\u036f",Ts="\\ufe20-\\ufe2f",ks="\\u20d0-\\u20ff",Es=_s+Ts+ks,Is="\\ufe0e\\ufe0f",Ps="\\u200d",Ns=RegExp("["+Ps+$s+Es+Is+"]");Te=Fs});function Ds(e){return e.split("")}var ea,ta=i(()=>{ea=Ds});function Ys(e){return e.match(Js)||[]}var ra,Ms,zs,Ls,Ws,Gs,Us,et,tt,Hs,aa,oa,ia,Ks,sa,na,Bs,qs,Zs,Js,fa,la=i(()=>{ra="\\ud800-\\udfff",Ms="\\u0300-\\u036f",zs="\\ufe20-\\ufe2f",Ls="\\u20d0-\\u20ff",Ws=Ms+zs+Ls,Gs="\\ufe0e\\ufe0f",Us="["+ra+"]",et="["+Ws+"]",tt="\\ud83c[\\udffb-\\udfff]",Hs="(?:"+et+"|"+tt+")",aa="[^"+ra+"]",oa="(?:\\ud83c[\\udde6-\\uddff]){2}",ia="[\\ud800-\\udbff][\\udc00-\\udfff]",Ks="\\u200d",sa=Hs+"?",na="["+Gs+"]?",Bs="(?:"+Ks+"(?:"+[aa,oa,ia].join("|")+")"+na+sa+")*",qs=na+sa+Bs,Zs="(?:"+[aa+et+"?",et,oa,ia,Us].join("|")+")",Js=RegExp(tt+"(?="+tt+")|"+Zs+qs,"g");fa=Ys});function Xs(e){return Te(e)?fa(e):ea(e)}var ua,da=i(()=>{ta();Qe();la();ua=Xs});function Qs(e){return function(t){t=D(t);var r=Te(t)?ua(t):void 0,a=r?r[0]:t.charAt(0),o=r?Xr(r,1).join(""):t.slice(1);return a[e]()+o}}var pa,ma=i(()=>{Qr();Qe();da();ce();pa=Qs});var en,ca,ha=i(()=>{ma();en=pa("toUpperCase"),ca=en});function tn(e,t,r,a){var o=-1,s=e==null?0:e.length;for(a&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}var xa,ya=i(()=>{xa=tn});function rn(e){return function(t){return e==null?void 0:e[t]}}var ba,ga=i(()=>{ba=rn});var an,on,Ra,Aa=i(()=>{ga();an={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},on=ba(an),Ra=on});function mn(e){return e=D(e),e&&e.replace(sn,Ra).replace(pn,"")}var sn,nn,fn,ln,un,dn,pn,va,Oa=i(()=>{Aa();ce();sn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nn="\\u0300-\\u036f",fn="\\ufe20-\\ufe2f",ln="\\u20d0-\\u20ff",un=nn+fn+ln,dn="["+un+"]",pn=RegExp(dn,"g");va=mn});function hn(e){return e.match(cn)||[]}var cn,wa,Va=i(()=>{cn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;wa=hn});function yn(e){return xn.test(e)}var xn,Sa,ja=i(()=>{xn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;Sa=yn});function zn(e){return e.match(Mn)||[]}var ka,bn,gn,Rn,An,Ea,Ia,vn,On,wn,Vn,Pa,Sn,Na,Fa,Ca,jn,Da,Cn,Ma,za,$n,_n,Tn,La,Wa,re,kn,$a,En,_a,Ta,Ga,Ua,In,Pn,Nn,Fn,Dn,Mn,Ha,Ka=i(()=>{ka="\\ud800-\\udfff",bn="\\u0300-\\u036f",gn="\\ufe20-\\ufe2f",Rn="\\u20d0-\\u20ff",An=bn+gn+Rn,Ea="\\u2700-\\u27bf",Ia="a-z\\xdf-\\xf6\\xf8-\\xff",vn="\\xac\\xb1\\xd7\\xf7",On="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wn="\\u2000-\\u206f",Vn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pa="A-Z\\xc0-\\xd6\\xd8-\\xde",Sn="\\ufe0e\\ufe0f",Na=vn+On+wn+Vn,Fa="['\u2019]",Ca="["+Na+"]",jn="["+An+"]",Da="\\d+",Cn="["+Ea+"]",Ma="["+Ia+"]",za="[^"+ka+Na+Da+Ea+Ia+Pa+"]",$n="\\ud83c[\\udffb-\\udfff]",_n="(?:"+jn+"|"+$n+")",Tn="[^"+ka+"]",La="(?:\\ud83c[\\udde6-\\uddff]){2}",Wa="[\\ud800-\\udbff][\\udc00-\\udfff]",re="["+Pa+"]",kn="\\u200d",$a="(?:"+Ma+"|"+za+")",En="(?:"+re+"|"+za+")",_a="(?:"+Fa+"(?:d|ll|m|re|s|t|ve))?",Ta="(?:"+Fa+"(?:D|LL|M|RE|S|T|VE))?",Ga=_n+"?",Ua="["+Sn+"]?",In="(?:"+kn+"(?:"+[Tn,La,Wa].join("|")+")"+Ua+Ga+")*",Pn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fn=Ua+Ga+In,Dn="(?:"+[Cn,La,Wa].join("|")+")"+Fn,Mn=RegExp([re+"?"+Ma+"+"+_a+"(?="+[Ca,re,"$"].join("|")+")",En+"+"+Ta+"(?="+[Ca,re+$a,"$"].join("|")+")",re+"?"+$a+"+"+_a,re+"+"+Ta,Nn,Pn,Da,Dn].join("|"),"g");Ha=zn});function Ln(e,t,r){return e=D(e),t=r?void 0:t,t===void 0?Sa(e)?Ha(e):wa(e):e.match(t)||[]}var Ba,qa=i(()=>{Va();ja();ce();Ka();Ba=Ln});function Un(e){return function(t){return xa(Ba(va(t).replace(Gn,"")),e,"")}}var Wn,Gn,Za,Ja=i(()=>{ya();Oa();qa();Wn="['\u2019]",Gn=RegExp(Wn,"g");Za=Un});function Hn(e,t,r){t=M(t,e);for(var a=-1,o=t.length,s=!1;++a<o;){var n=z(t[a]);if(!(s=e!=null&&r(e,n)))break;e=e[n]}return s||++a!=o?s:(o=e==null?0:e.length,!!o&&Qt(o)&&je(n,o)&&(P(e)||ar(e)))}var Ya,Xa=i(()=>{he();or();ue();Ue();er();xe();Ya=Hn});function Kn(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Qa,eo=i(()=>{Qa=Kn});function Zn(e,t){return e!=null&&qn.call(e,t)}var Bn,qn,to,ro=i(()=>{Bn=Object.prototype,qn=Bn.hasOwnProperty;to=Zn});function Jn(e,t){return e!=null&&Ya(e,t,to)}var rt,ao=i(()=>{ro();Xa();rt=Jn});function Yn(e,t){return t.length<2?e:$e(e,_e(t,0,-1))}var oo,io=i(()=>{Je();Xe();oo=Yn});function Xn(e,t){return t=M(t,e),e=oo(e,t),e==null||delete e[z(Qa(t))]}var so,no=i(()=>{he();eo();io();xe();so=Xn});function Qn(e,t,r,a){if(!U(e))return e;t=M(t,e);for(var o=-1,s=t.length,n=s-1,u=e;u!=null&&++o<s;){var f=z(t[o]),l=r;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(o!=n){var d=u[f];l=a?a(d,f,u):void 0,l===void 0&&(l=U(d)?d:je(t[o+1])?[]:{})}Yt(u,f,l),u=u[f]}return e}var fo,lo=i(()=>{Xt();he();Ue();we();xe();fo=Qn});function ef(e,t,r){return e==null?e:fo(e,t,r)}var at,uo=i(()=>{lo();at=ef});var tf,ke,po=i(()=>{Ja();ha();tf=Za(function(e,t,r){return e+(r?" ":"")+ca(t)}),ke=tf});function rf(e,t){return e==null?!0:so(e,t)}var Ee,mo=i(()=>{no();Ee=rf});var ot=i(()=>{Yr();ao();uo();po();mo();});function ae(e,t){return t?t.config.useStartCaseInErrors?ke(e):e:ke(e)}function oe(e,t,r){let a={};if(r===void 0?t.some(H):r)for(let s of t)a[s]=I(e,s);else for(let s of t)a[s]=e[s];return a}function co(e,t){let r={};for(let a in e)t.includes(a)||(r[a]=e[a]);return r}function it(e,t,r,a){return a===void 0&&H(t)?at(e,t,r):(e[t]=r,e)}function I(e,t,r){return r===void 0&&H(t)?Ye(e,t):e[t]}function H(e){return e.indexOf(".")!==-1}function _(e,t){return typeof t=="object"&&t instanceof e}var Ie=i(()=>{"use strict";ot()});var ho={};ct(ho,{Rule:()=>K,RuleTyped:()=>af,Schema:()=>Pe,SchemaTyped:()=>of});function K(e){Array.isArray(e)||(e=[e]);let t={};for(let r of e)typeof r=="string"&&(r=(0,st.default)(r)),t=w(w({},t),r);return t}function af(e){return K(e)}function Pe(e){let t={};for(let r of Object.keys(e)){let a=e[r];r==="$include"||(typeof a=="string"?a=(0,st.default)(a):Array.isArray(a)&&(a=K(a))),t[r]=a}return t}function of(e){return Pe(e)}var st,nt=i(()=>{"use strict";st=B(ze())});var lt=ne((xp,xo)=>{"use strict";var ft=class{constructor(t,r){this.code="default";return this.message=t,r&&(this.data=r),this}setCode(t){return this.code=t,this}setData(t){return this.data=t,this}setMessage(t){return this.message=t,this}};xo.exports=ft});var bo=ne((gp,yo)=>{"use strict";Ie();ot();var ut=class{constructor(t,r,a=!1){return this.data=t,this.path=r,this.name=a,this.pathHasDotNotation=H(r),this}setData(t){return this.data=t,this}get(t){return I(this.data,t)}getThis(){return this.get(this.path)}has(t){return rt(this.data,t)}set(t,r){return it(this.data,t,r)}setThis(t){return it(this.data,this.path,t,this.pathHasDotNotation)}unset(t){return Ee(this.data,t)}unsetThis(){return Ee(this.data,this.path)}getName(){return this.name||ae(this.path)}getNameRaw(){return this.name||this.path}};yo.exports=ut});function go(e,t,r,a,o){let s=a.error,n=null,u="default",f=!1;return a.customError?a.errorFn&&(f=!0,s=a.errorFn({code:u,data:n,validator:a.name,value:t})):_(Ne.default,r)&&(r=r,f=!0,s=r.message,n=r.data,u=r.code),f&&(s.includes(":param")&&(s=s.replace(":param",o||e)),a.optionString&&s.includes(":option")&&(s=s.replace(":option",a.optionString))),[{code:u,key:e,type:"validator",validator:a.name,message:s,data:n},{}]}var Ne,L,Ro=i(()=>{"use strict";Ne=B(lt());Ie();L=class e{constructor(t){this.data={};this.fields=[];this.fieldsHasDotNotation=!1;this.isObject=!0;this.async=!1;Object.defineProperty(this,"input",{value:t,enumerable:!1,writable:!0})}validateObject(t){if(!this.isObject)throw new Error("Variable compiled input cannot be used to validate an object, use object compiled input!");if(this.async)throw new Error("Rules contains an async validator, use validateObjectAsync instead!");let r=w({},t);if(this.allowedFields){let n=Object.keys(r).filter(u=>!this.allowedFields.includes(u));if(n.length)return[{code:"object.unknown",type:"internal",key:"$strict",validator:"$strict",message:"Data contains unknown fields!",data:{unknown:n}},{}]}let a=this.fields;for(let s in this.data){let n=this.data[s],u=I(r,s,this.fieldsHasDotNotation);if(n.$skip){let f=n.$skip;if(typeof f=="function"&&(f=f(u,r)),f){this.includedFields&&!this.includedFields.includes(s)&&(a=a.filter(l=>l!==s));continue}}for(let f in n.validators){let l=n.validators[f],d=!1;try{d=l.func(u,r)}catch(p){return[{code:"default",key:s,type:"internal",validator:f,message:p.message,data:p.stack},{}]}if(typeof d!==void 0&&(d===!1||_(Ne.default,d)))return go(s,u,d,l,n.$name)}}let o;if(a.length===1){let s=a[0];o={[s]:r[s]}}else a.length>1?o=oe(r,a,this.fieldsHasDotNotation):o={};return[void 0,o]}validateObjectAsync(t){return j(this,null,function*(){if(!this.isObject)throw new Error("Variable compiled input cannot be used to validate an object, use object compiled input!");let r=w({},t);if(this.allowedFields){let n=Object.keys(r).filter(u=>!this.allowedFields.includes(u));if(n.length)return[{code:"object.unknown",type:"internal",key:"$strict",validator:"$strict",message:"Data contains unknown fields!",data:{unknown:n}},{}]}let a=this.fields;for(let s in this.data){let n=this.data[s],u=I(r,s,this.fieldsHasDotNotation);if(n.$skip){let f=n.$skip;if(typeof f=="function"&&(f=f(u,r)),f){this.includedFields&&!this.includedFields.includes(s)&&(a=a.filter(l=>l!==s));continue}}for(let f in n.validators){let l=n.validators[f],d=!1;try{l.async?d=yield l.func(u,r):d=l.func(u,r)}catch(p){return[{code:"default",key:s,type:"internal",validator:l.name,message:p.message,data:p.stack},{}]}if(typeof d!==void 0&&(d===!1||_(Ne.default,d)))return go(s,u,d,l,n.$name)}}let o;if(a.length===1){let s=a[0];o={[s]:r[s]}}else a.length>1?o=oe(r,a,this.fieldsHasDotNotation):o={};return[void 0,o]})}validateVariable(t){if(this.isObject)throw new Error("Object compiled cannot be used to validate a variable, use regular compiled input!");this.isObject=!0;let r=this.validateObject({variable:t});return this.isObject=!1,r[1]=r[1].variable,r}validateVariableAsync(t){return j(this,null,function*(){if(this.isObject)throw new Error("Object compiled cannot be used to validate a variable, use regular compiled input!");this.isObject=!0;let r=yield this.validateObjectAsync({variable:t});return this.isObject=!1,r[1]=r[1].variable,r})}validate(t){return this.isObject?this.validateObject(t):this.validateVariable(t)}validateAsync(t){return j(this,null,function*(){return this.isObject?this.validateObjectAsync(t):this.validateVariableAsync(t)})}getInputRule(){return this.input}getInputSchema(){return this.input}setValidatorOption(t,r,a){if(a){if(a&&!this.isObject)throw new Error("Field name is not allowed when using variable compiled input!")}else{if(this.isObject)throw new Error("Field name is required when using object compiled input!");a="variable"}return this.data[a]&&this.data[a].validators[t]&&(this.data[a].validators[t].option=r),this}copy(){let t=new e(this.input);t.fields=this.fields,t.includedFields=this.includedFields,t.fieldsHasDotNotation=this.fieldsHasDotNotation,t.isObject=this.isObject,t.async=this.async,t.data={};for(let r in this.data){let a={};for(let o in this.data[r].validators)a[o]=w({},this.data[r].validators[o]);t.data[r]={$name:this.data[r].$name,$skip:this.data[r].$skip,validators:a}}return t}}});var vo={};ct(vo,{AttemptError:()=>be,SuperKeys:()=>G,default:()=>nf,isAbolishClass:()=>sf,isAbolishInstance:()=>Ao});function sf(e){return typeof e=="function"&&typeof e.addGlobalValidator=="function"}function Ao(e){return typeof e=="object"&&(e instanceof De||typeof e.addValidator=="function")}var ye,ie,W,Fe,be,G,De,nf,Oo=i(()=>{"use strict";ye=B(ze()),ie=B(Rt());Ie();nt();W=B(lt()),Fe=B(bo());Ro();We();be=class extends Error{constructor(t){super(t.message),this.name="AttemptError",this.error=t}static instanceOf(t){return _(this,t)}},G=Object.freeze({Wildcards:new Set(["*","$"]),Fields:new Set(["*","$","$include","$strict"]),Rules:new Set(["$name","$skip","$error","$errors"])}),De=class e{constructor(){this.validators={};this.config={useStartCaseInErrors:!0}}static getGlobalValidators(){return ie.default}static getGlobalValidatorsList(){return Object.keys(this.getGlobalValidators())}static addGlobalValidator(t){if(typeof t=="object"&&!Array.isArray(t))t.error||(t.error=`:param failed {${t.name}} validation.`),ie.default[t.name]=t,Object.defineProperty(t.validator,"name",{value:t.name});else throw new TypeError("addGlobalValidator argument must be an object.");return this}static addGlobalValidators(t){if(typeof t=="object"&&(t=Object.values(t)),Array.isArray(t))for(let r of t)e.addGlobalValidator(r);else throw new TypeError("addGlobalValidators argument must be an array or an object");return this}useStartCaseInErrors(t=!0){return this.config.useStartCaseInErrors=t,this}addValidator(t){if(typeof t=="object"&&!Array.isArray(t))t.error||(t.error=`:param failed {${t.name}} validation.`),this.validators[t.name]=t;else throw new TypeError("addValidator argument must be an object.");return this}addValidators(t){if(typeof t=="object"&&(t=Object.values(t)),Array.isArray(t))for(let r of t)this.addValidator(r);else throw new TypeError("addValidators argument must be an array or an object");return this}static validate(t,r){return new this().validate(t,r)}static validateAsync(t,r){return new this().validateAsync(t,r)}validate(t,r,a=!1){if(r instanceof L)return r.validateObject(t);let o={validated:{},jobs:[],keysToBeValidated:[],includeKeys:[]},s={};(r.hasOwnProperty("*")||r.hasOwnProperty("$"))&&(s=r["*"]||r.$,typeof s=="string"&&(s=(0,ye.default)(s)));let n=w({},t),u=[];if(r.hasOwnProperty("$include")&&(u=r.$include,!Array.isArray(u)))throw new Error("$include has to be an array!");let f=Object.keys(r).filter(d=>!G.Fields.has(d)),l;if(r.hasOwnProperty("$strict")){if(r.$strict===!0)l=f;else if(Array.isArray(r.$strict)){l=r.$strict;for(let b of f)l.includes(b)||l.push(b)}else throw new Error("$strict must be a boolean or an array of allowed keys.");l=l.concat(u);let p=Object.keys(n).filter(b=>!l.includes(b));if(p.length>0)return[{code:"object.unknown",type:"internal",key:"$strict",validator:"$strict",message:"Data contains unknown fields!",data:{unknown:p}},{}]}for(let d of f){let p=r[d];typeof p=="string"?p=(0,ye.default)(p):Array.isArray(p)&&(p=K(p));let b=!1;if(p.hasOwnProperty("$skip")&&(b=p.$skip,typeof b=="function"&&(b=b(n[d],n)),typeof b!="boolean"))throw new Error(`$skip value or resolved function value must be a BOOLEAN in RuleFor: (${d})`);if(b)f=f.filter(y=>y!==d);else{let y=!1;if(p.hasOwnProperty("$name")&&(y=p.$name,typeof y!="string"))throw new Error(`$name must be a string in RuleFor: (${d})`);let R;if(p.hasOwnProperty("$error")&&(R=p.$error,!R||typeof R!="string"&&typeof R!="function"))throw new Error(`$error value must be a STRING or FUNCTION in RuleFor: (${d})`);let v;if(p.hasOwnProperty("$errors")&&(v=p.$errors,!v||typeof v!="object"))throw new Error(`$errors value must be an OBJECT in RuleFor: (${d})`);p=w(w({},s),co(p,[...G.Rules]));for(let m of Object.keys(p)){if(!this.validators.hasOwnProperty(m)&&!ie.default.hasOwnProperty(m))throw new Error(`Validator: {${m}} does not exists but defined in rules`);let h=this.validators[m]||ie.default[m];if(!a&&h.isAsync)throw new Error(`Validator: {${m}} is async, use async method instead.`);let x=p[m],g=I(n,d);if(a)o.jobs.push({$name:y,rule:d,validator:h,validatorName:m,validatorOption:x,$error:R,$errors:v});else{let A=!1;try{A=h.validator(g,x,{error:(c,V)=>new W.default(c,V),modifier:new Fe.default(n,d,y),abolish:this})}catch(c){return[{code:"default",key:d,type:"internal",validator:m,message:c.message,data:c.stack},{}]}if(A===!1||_(W.default,A)){let c,V=null,O="default";if(_(W.default,A)&&(c=A.message,V=A.data,O=A.code),R&&(typeof R=="function"?c=R({code:O,validator:m,data:V,value:g}):c=R),v&&v[m]){let S=v[m];typeof S=="function"?c=S({code:O,data:V,validator:m,value:g}):c=S}let C=typeof x=="string"||typeof x=="number"||Array.isArray(x);return c=(c||h.error).replace(":param",y||ae(d,this)),C&&(c=c.replace(":option",String(x))),[{code:O,key:d,type:"validator",validator:m,message:c,data:V},{}]}}}}}return a?(o.validated=n,o.keysToBeValidated=f,o.includeKeys=u,o):(n=oe(n,f.concat(u)),[void 0,n])}validateAsync(t,r){if(r instanceof L)return r.validateObjectAsync(t);let a=this.validate(t,r,!0),{validated:o,jobs:s,keysToBeValidated:n,includeKeys:u}=a;return new Promise(f=>j(this,null,function*(){for(let l of s){let{$name:d,rule:p,validator:b,validatorName:y,validatorOption:R,$error:v,$errors:m}=l,h=I(o,p),x=!1;try{x=yield b.validator(h,R,{error:(g,A)=>new W.default(g,A),modifier:new Fe.default(o,p,d),abolish:this})}catch(g){return f([{code:"default",key:p,type:"internal",validator:y,message:g.message,data:g.stack},{}])}if(x===!1||_(W.default,x)){let g,A=null,c="default";if(_(W.default,x)&&(g=x.message,A=x.data,c=x.code),v&&(typeof v=="function"?g=v({code:c,validator:y,data:A,value:h}):g=v),m&&m[y]){let O=m[y];typeof O=="function"?g=O({code:c,data:A,validator:y,value:h}):g=O}return g=(g||b.error).replace(":param",d||ae(p,this)),(typeof R=="string"||typeof R=="number")&&(g=g.replace(":option",String(R))),f([{code:c,key:p,type:"validator",validator:y,message:g,data:A},{}])}}return f([void 0,oe(o,n.concat(u))])}))}check(t,r){if(r instanceof L)return r.validateVariable(t);let[a,o]=this.validate({variable:t},{variable:r,$include:["variable"]});return[a,o==null?void 0:o.variable]}static check(t,r){return new this().check(t,r)}checkAsync(t,r){return j(this,null,function*(){if(r instanceof L)return r.validateVariableAsync(t);let[a,o]=yield this.validateAsync({variable:t},{variable:r,$include:["variable"]});return[a,o==null?void 0:o.variable]})}static checkAsync(t,r){return new this().checkAsync(t,r)}attempt(t,r){let a=this.check(t,r);if(a[0])throw new be(a[0]);return a[1]}static attempt(t,r,a){return new this().attempt(t,r)}attemptAsync(t,r){return j(this,null,function*(){let a=yield this.checkAsync(t,r);if(a[0])throw new be(a[0]);return a[1]})}static attemptAsync(t,r){return j(this,null,function*(){return new this().attemptAsync(t,r)})}test(t,r){return!this.check(t,r)[0]}static test(t,r){return new this().test(t,r)}testAsync(t,r){return j(this,null,function*(){return!(yield this.checkAsync(t,r))[0]})}static testAsync(t,r){return new this().testAsync(t,r)}static compileObject(t,r){let a=r?Ao(r)?r:new r:new e,o=new L(Pe(t)),s,n=[],u,f=Object.entries(t);for(let[l,d]of f)if(G.Wildcards.has(l)&&(s=d,typeof s=="string"&&(s=(0,ye.default)(s))),l==="$include"&&(n=d),l==="$strict")if(d===!0)u=Object.keys(t);else if(Array.isArray(d))u=d;else throw new Error("$strict must be a boolean or an array of allowed keys.");for(let[l,d]of f){if(G.Fields.has(l))continue;let p={validators:{}},b=d;typeof d=="string"?b=(0,ye.default)(d):Array.isArray(d)&&(b=K(d)),s&&(b=w(w({},s),b));let y,R={};for(let[m,h]of Object.entries(b))G.Rules.has(m)&&(m==="$name"?(fe(h,["string"],"$name"),p.$name=h):m==="$skip"?(fe(h,["boolean","function"],"$skip"),p.$skip=h):m==="$error"?(fe(h,["string","function"],"$error"),y=h):m==="$errors"&&(fe(h,["object"],"$errors"),R=h));!p.$name&&a.config.useStartCaseInErrors&&(p.$name=ae(l));let v=new Fe.default({},l);for(let[m,h]of Object.entries(b)){if(G.Rules.has(m))continue;let x=a.validators[m]||ie.default[m];if(!x)throw new Error(`Validator ${m} not found`);x.isAsync&&(o.async=!0);let g=typeof h=="string"||typeof h=="number"||typeof h=="boolean"||Array.isArray(h),A={abolish:a,modifier:v,error:(S,Me)=>new W.default(S,Me)};x.error||(x.error=`:param failed {${x.name}} validation.`);let c=x.error,V,O;if(y&&(typeof y=="string"?(c=y,O=!0):typeof y=="function"&&(V=y,O=!0)),R&&R[m]){let S=R[m];typeof S=="string"?(c=S,O=!0):typeof S=="function"&&(V=S,O=!0)}c.includes(":param")&&(c=c.replace(/:param/g,p.$name||l));let C={name:m,option:h,error:c,async:x.isAsync===!0,func(S,Me){return A.modifier.setData(Me),x.validator(S,this.option,A)}};O&&(C.customError=!0),V&&(C.errorFn=V),g&&(C.optionString=String(h),C.error=C.error.replace(/:option/g,C.optionString)),Object.defineProperty(C.func,"name",{value:`Wrapped(${m})`}),p.validators[m]=C}o.data[l]=p}return Object.keys(o.data).forEach(l=>{o.fields.includes(l)||o.fields.push(l)}),n.forEach(l=>{o.fields.includes(l)||o.fields.push(l)}),o.includedFields=n,o.fieldsHasDotNotation=o.fields.some(H),u&&(u=o.fields.concat(n).concat(u),u=u.filter(l=>!G.Fields.has(l)),o.allowedFields=u),o}static compile(t,r){t=K(t);let a=this.compileObject({variable:t,$include:["variable"]},r);return a.input=t,a.isObject=!1,a}};nf=De});var uf=ne(T=>{var ff=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(T,"__esModule",{value:!0});T.Schema=T.Rule=T.Abolish=void 0;var lf=ff((Oo(),xt(vo)));T.Abolish=lf.default;var wo=(nt(),xt(ho));Object.defineProperty(T,"Rule",{enumerable:!0,get:function(){return wo.Rule}});Object.defineProperty(T,"Schema",{enumerable:!0,get:function(){return wo.Schema}})});return uf();})();

@@ -5,8 +5,23 @@ "use strict";

const ValidatorHelpers_1 = require("../src/ValidatorHelpers");
// import { skipIfNotDefined } from "../src/helpers";
(0, ValidatorHelpers_1.registerAllValidators)(index_1.Abolish);
const abolish = new index_1.Abolish();
async function Main() {
const v = index_1.Abolish.compileObject({ email: "string:toLowerCase|email" });
console.log(v.validate({ email: "JOHNDOE@gmail.com" }));
const v = index_1.Abolish.compileObject({ $strict: ["password"], email: "required|typeof:string" });
console.log(v);
console.dir(v.validate({ email: "mail@example.com", password: "12345" }), { depth: null });
// console.dir(
// Abolish.validate(
// {
// email: "JOHNDOE@gmail.com",
// password: "password"
// },
// {
// $strict: true,
// email: "string:toLowerCase|email"
// }
// ),
// { depth: null }
// );
}
Main().catch(console.error);

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

var yo=Object.create;var xe=Object.defineProperty;var bo=Object.getOwnPropertyDescriptor;var go=Object.getOwnPropertyNames;var Ro=Object.getPrototypeOf,Ao=Object.prototype.hasOwnProperty;var i=(e,t)=>()=>(e&&(t=e(e=0)),t);var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nt=(e,t)=>{for(var r in t)xe(e,r,{get:t[r],enumerable:!0})},ft=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of go(t))!Ao.call(e,o)&&o!==r&&xe(e,o,{get:()=>t[o],enumerable:!(a=bo(t,o))||a.enumerable});return e};var H=(e,t,r)=>(r=e!=null?yo(Ro(e)):{},ft(t||!e||!e.__esModule?xe(r,"default",{value:e,enumerable:!0}):r,e)),lt=e=>ft(xe({},"__esModule",{value:!0}),e);var Ne=oe((af,ut)=>{"use strict";var vo=new RegExp(/([!a-zA-Z_*0-9]+)/g),Oo=new RegExp(/([a-zA-Z_*0-9]+:[a-zA-Z_0-9]+)/g),Vo=new RegExp(/([a-zA-Z_*0-9]+:"[^"]+")/g),wo=new RegExp(/([a-zA-Z_*0-9]+:'[^']+')/g),So=new RegExp(/([a-zA-Z_*0-9]+:`[^`]+`)/g),Co=e=>{let t=e.split("|"),r={};for(let a=0;a<t.length;a++){let o=t[a];if(o.match(wo)||o.match(Vo)||o.match(So)){let[s,...n]=o.split(":"),f=n.join(":");f=f.substring(1),f=f.substring(0,n.length-1),r[s]=f}else if(o.match(Oo)){let[s,n]=o.split(":");isNaN(n)||(n=Number(n)),r[s]=n}else if(o.match(vo)){let s=o,n=!0;s.substring(0,1)==="!"&&(s=s.substring(1),n=!1),r[s]=n}}return r};ut.exports=Co});function ie(e,t,r="Options"){if(!Fe(e,t))throw new TypeError(`${r} must be typeof [${t}], but [${typeof e}] was given.`);return!0}function Fe(e,t){if(typeof t=="string")return t==="array"&&Array.isArray(e)?!0:typeof e===t;{let r=t.includes("array");return!r&&t.includes(typeof e)?!0:r&&(t.includes(typeof e)||Array.isArray(e))}}var De=i(()=>{"use strict"});var pt=oe((nf,dt)=>{"use strict";De();var w={default:{name:"default",description:"Set default value if original value is undefined or null",validator(e,t,{modifier:r}){return e==null&&r.setThis(t),!0}},required:{name:"required",description:"Value is required",error:":param is required.",validator:(e,t)=>t?typeof e>"u"||e===null?!1:typeof e=="string"||Array.isArray(e)?e.length>0:!0:!0},typeof:{name:"typeof",description:"Value is typeof :option",error:":param is not typeof :option",validator:function(t,r){return r===!1?!0:(typeof r=="string"&&r.includes(",")&&(r=r.split(",")),Fe(t,r))}},exact:{name:"exact",error:":param failed exact validator",description:"Value is === :option",validator:(e,t)=>e===t},min:{name:"min",error:":param is too small. (Min. :option)",description:"Number: Value is >= :option",validator:(e,t,r)=>{let a=isNaN(e);return typeof e=="string"&&a||Array.isArray(e)?w.minLength.validator(e,t,r):a?!1:Number(e)>=Number(t)}},max:{name:"max",error:":param is too big. (Max. :option)",description:"Number: Value is <= :option",validator:(e,t,r)=>{let a=isNaN(e);return typeof e=="string"&&a||Array.isArray(e)?w.maxLength.validator(e,t,r):a?!1:Number(e)<=Number(t)}},minLength:{name:"minLength",error:":param is too short. (Min. :option characters)",description:"Value length is >= :option",validator:(e,t,{error:r,modifier:a})=>(e=a.getThis()??e,typeof e=="string"?e.trim().length>=Number(t):Array.isArray(e)?e.length>=Number(t)?!0:r(`:param length is too short. (Min: ${t})`):!1)},maxLength:{name:"maxLength",error:":param is too long. (Max. :option characters)",description:"Value length is <= :option",validator:(e,t,{error:r,modifier:a})=>(e=a.getThis()??e,typeof e=="string"?e.trim().length<=Number(t):Array.isArray(e)?e.length<=Number(t)?!0:r(`:param length is too long. (Max: ${t})`):!1)},size:{name:"size",error:":param must be of size: [:option]",description:"Check the size of a String, Array, or Object",validator:(e,t,{error:r})=>{let a;if(typeof e=="string"||Array.isArray(e))a=e.length;else if(typeof e=="object")try{a=Object.keys(e).length}catch(o){return r(o.message)}return a===void 0?!1:Array.isArray(t)?t.includes(a):a===Number(t)}},object:{name:"object",validator:(e,t,{error:r,modifier:a,abolish:o})=>{if(!e||typeof e!="object")return r(":param must be an object.");let[s,n]=o.validate(e,t);if(s)return r(s.message,s);a.setThis(n)},description:["Object: Value is an object"]},objectAsync:{name:"objectAsync",isAsync:!0,validator:async(e,t,{error:r,modifier:a,abolish:o})=>{if(!e||typeof e!="object")return r(":param must be an object.");let[s,n]=await o.validateAsync(e,t);if(s)return r(s.message,s);a.setThis(n)}},$inline:{name:"$inline",error:":param failed inline validation.",validator:(e,t,r)=>t(e,r),description:"Register a custom validation function inline."},$inlineAsync:{name:"$inlineAsync",isAsync:!0,error:":param failed inline validation.",validator:(e,t,r)=>t(e,r),description:"Register a custom async validation function inline."}};w.type=Object.assign({},w.typeof);w.type.name="type";w.type.error=":param is not of type :option";w.type.description="Alias: typeof";for(let e of Object.keys(w)){let t=w[e];Object.defineProperty(t.validator,"name",{value:t.name})}dt.exports=w});var jo,mt,ct=i(()=>{jo=typeof global=="object"&&global&&global.Object===Object&&global,mt=jo});var _o,To,B,ye=i(()=>{ct();_o=typeof self=="object"&&self&&self.Object===Object&&self,To=mt||_o||Function("return this")(),B=To});var $o,_,be=i(()=>{ye();$o=B.Symbol,_=$o});function ko(e){var t=Eo.call(e,se),r=e[se];try{e[se]=void 0;var a=!0}catch{}var o=Io.call(e);return a&&(t?e[se]=r:delete e[se]),o}var ht,Eo,Io,se,xt,yt=i(()=>{be();ht=Object.prototype,Eo=ht.hasOwnProperty,Io=ht.toString,se=_?_.toStringTag:void 0;xt=ko});function Fo(e){return No.call(e)}var Po,No,bt,gt=i(()=>{Po=Object.prototype,No=Po.toString;bt=Fo});function zo(e){return e==null?e===void 0?Mo:Do:Rt&&Rt in Object(e)?xt(e):bt(e)}var Do,Mo,Rt,K,ge=i(()=>{be();yt();gt();Do="[object Null]",Mo="[object Undefined]",Rt=_?_.toStringTag:void 0;K=zo});function Lo(e){return e!=null&&typeof e=="object"}var q,Re=i(()=>{q=Lo});function Go(e){return typeof e=="symbol"||q(e)&&K(e)==Wo}var Wo,Z,Ae=i(()=>{ge();Re();Wo="[object Symbol]";Z=Go});function Uo(e,t){for(var r=-1,a=e==null?0:e.length,o=Array(a);++r<a;)o[r]=t(e[r],r,e);return o}var At,vt=i(()=>{At=Uo});var Ho,E,ne=i(()=>{Ho=Array.isArray,E=Ho});function wt(e){if(typeof e=="string")return e;if(E(e))return At(e,wt)+"";if(Z(e))return Vt?Vt.call(e):"";var t=e+"";return t=="0"&&1/e==-Bo?"-0":t}var Bo,Ot,Vt,St,Ct=i(()=>{be();vt();ne();Ae();Bo=1/0,Ot=_?_.prototype:void 0,Vt=Ot?Ot.toString:void 0;St=wt});function Ko(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var z,ve=i(()=>{z=Ko});function Xo(e){if(!z(e))return!1;var t=K(e);return t==Zo||t==Jo||t==qo||t==Yo}var qo,Zo,Jo,Yo,jt,_t=i(()=>{ge();ve();qo="[object AsyncFunction]",Zo="[object Function]",Jo="[object GeneratorFunction]",Yo="[object Proxy]";jt=Xo});var Qo,Oe,Tt=i(()=>{ye();Qo=B["__core-js_shared__"],Oe=Qo});function ei(e){return!!$t&&$t in e}var $t,Et,It=i(()=>{Tt();$t=function(){var e=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();Et=ei});function ai(e){if(e!=null){try{return ri.call(e)}catch{}try{return e+""}catch{}}return""}var ti,ri,kt,Pt=i(()=>{ti=Function.prototype,ri=ti.toString;kt=ai});function di(e){if(!z(e)||Et(e))return!1;var t=jt(e)?ui:ii;return t.test(kt(e))}var oi,ii,si,ni,fi,li,ui,Nt,Ft=i(()=>{_t();It();ve();Pt();oi=/[\\^$.*+?()[\]{}|]/g,ii=/^\[object .+?Constructor\]$/,si=Function.prototype,ni=Object.prototype,fi=si.toString,li=ni.hasOwnProperty,ui=RegExp("^"+fi.call(li).replace(oi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Nt=di});function pi(e,t){return e?.[t]}var Dt,Mt=i(()=>{Dt=pi});function mi(e,t){var r=Dt(e,t);return Nt(r)?r:void 0}var J,Ve=i(()=>{Ft();Mt();J=mi});var ci,Me,zt=i(()=>{Ve();ci=function(){try{var e=J(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Me=ci});function yi(e,t){var r=typeof e;return t=t??hi,!!t&&(r=="number"||r!="symbol"&&xi.test(e))&&e>-1&&e%1==0&&e<t}var hi,xi,we,ze=i(()=>{hi=9007199254740991,xi=/^(?:0|[1-9]\d*)$/;we=yi});function bi(e,t,r){t=="__proto__"&&Me?Me(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Lt,Wt=i(()=>{zt();Lt=bi});function gi(e,t){return e===t||e!==e&&t!==t}var Se,Le=i(()=>{Se=gi});function vi(e,t,r){var a=e[t];(!(Ai.call(e,t)&&Se(a,r))||r===void 0&&!(t in e))&&Lt(e,t,r)}var Ri,Ai,Gt,Ut=i(()=>{Wt();Le();Ri=Object.prototype,Ai=Ri.hasOwnProperty;Gt=vi});function Vi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Oi}var Oi,Ht,Bt=i(()=>{Oi=9007199254740991;Ht=Vi});function Si(e){return q(e)&&K(e)==wi}var wi,We,Kt=i(()=>{ge();Re();wi="[object Arguments]";We=Si});var qt,Ci,ji,_i,Zt,Jt=i(()=>{Kt();Re();qt=Object.prototype,Ci=qt.hasOwnProperty,ji=qt.propertyIsEnumerable,_i=We(function(){return arguments}())?We:function(e){return q(e)&&Ci.call(e,"callee")&&!ji.call(e,"callee")},Zt=_i});function Ei(e,t){if(E(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Z(e)?!0:$i.test(e)||!Ti.test(e)||t!=null&&e in Object(t)}var Ti,$i,Yt,Xt=i(()=>{ne();Ae();Ti=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$i=/^\w*$/;Yt=Ei});var Ii,T,fe=i(()=>{Ve();Ii=J(Object,"create"),T=Ii});function ki(){this.__data__=T?T(null):{},this.size=0}var Qt,er=i(()=>{fe();Qt=ki});function Pi(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tr,rr=i(()=>{tr=Pi});function Mi(e){var t=this.__data__;if(T){var r=t[e];return r===Ni?void 0:r}return Di.call(t,e)?t[e]:void 0}var Ni,Fi,Di,ar,or=i(()=>{fe();Ni="__lodash_hash_undefined__",Fi=Object.prototype,Di=Fi.hasOwnProperty;ar=Mi});function Wi(e){var t=this.__data__;return T?t[e]!==void 0:Li.call(t,e)}var zi,Li,ir,sr=i(()=>{fe();zi=Object.prototype,Li=zi.hasOwnProperty;ir=Wi});function Ui(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=T&&t===void 0?Gi:t,this}var Gi,nr,fr=i(()=>{fe();Gi="__lodash_hash_undefined__";nr=Ui});function Y(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var Ge,lr=i(()=>{er();rr();or();sr();fr();Y.prototype.clear=Qt;Y.prototype.delete=tr;Y.prototype.get=ar;Y.prototype.has=ir;Y.prototype.set=nr;Ge=Y});function Hi(){this.__data__=[],this.size=0}var ur,dr=i(()=>{ur=Hi});function Bi(e,t){for(var r=e.length;r--;)if(Se(e[r][0],t))return r;return-1}var I,le=i(()=>{Le();I=Bi});function Zi(e){var t=this.__data__,r=I(t,e);if(r<0)return!1;var a=t.length-1;return r==a?t.pop():qi.call(t,r,1),--this.size,!0}var Ki,qi,pr,mr=i(()=>{le();Ki=Array.prototype,qi=Ki.splice;pr=Zi});function Ji(e){var t=this.__data__,r=I(t,e);return r<0?void 0:t[r][1]}var cr,hr=i(()=>{le();cr=Ji});function Yi(e){return I(this.__data__,e)>-1}var xr,yr=i(()=>{le();xr=Yi});function Xi(e,t){var r=this.__data__,a=I(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var br,gr=i(()=>{le();br=Xi});function X(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var Rr,Ar=i(()=>{dr();mr();hr();yr();gr();X.prototype.clear=ur;X.prototype.delete=pr;X.prototype.get=cr;X.prototype.has=xr;X.prototype.set=br;Rr=X});var Qi,vr,Or=i(()=>{Ve();ye();Qi=J(B,"Map"),vr=Qi});function es(){this.size=0,this.__data__={hash:new Ge,map:new(vr||Rr),string:new Ge}}var Vr,wr=i(()=>{lr();Ar();Or();Vr=es});function ts(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Sr,Cr=i(()=>{Sr=ts});function rs(e,t){var r=e.__data__;return Sr(t)?r[typeof t=="string"?"string":"hash"]:r.map}var k,ue=i(()=>{Cr();k=rs});function as(e){var t=k(this,e).delete(e);return this.size-=t?1:0,t}var jr,_r=i(()=>{ue();jr=as});function os(e){return k(this,e).get(e)}var Tr,$r=i(()=>{ue();Tr=os});function is(e){return k(this,e).has(e)}var Er,Ir=i(()=>{ue();Er=is});function ss(e,t){var r=k(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}var kr,Pr=i(()=>{ue();kr=ss});function Q(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var Ue,Nr=i(()=>{wr();_r();$r();Ir();Pr();Q.prototype.clear=Vr;Q.prototype.delete=jr;Q.prototype.get=Tr;Q.prototype.has=Er;Q.prototype.set=kr;Ue=Q});function He(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ns);var r=function(){var a=arguments,o=t?t.apply(this,a):a[0],s=r.cache;if(s.has(o))return s.get(o);var n=e.apply(this,a);return r.cache=s.set(o,n)||s,n};return r.cache=new(He.Cache||Ue),r}var ns,Fr,Dr=i(()=>{Nr();ns="Expected a function";He.Cache=Ue;Fr=He});function ls(e){var t=Fr(e,function(a){return r.size===fs&&r.clear(),a}),r=t.cache;return t}var fs,Mr,zr=i(()=>{Dr();fs=500;Mr=ls});var us,ds,ps,Lr,Wr=i(()=>{zr();us=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ds=/\\(\\)?/g,ps=Mr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(us,function(r,a,o,s){t.push(o?s.replace(ds,"$1"):a||r)}),t}),Lr=ps});function ms(e){return e==null?"":St(e)}var P,de=i(()=>{Ct();P=ms});function cs(e,t){return E(e)?e:Yt(e,t)?[e]:Lr(P(e))}var N,pe=i(()=>{ne();Xt();Wr();de();N=cs});function xs(e){if(typeof e=="string"||Z(e))return e;var t=e+"";return t=="0"&&1/e==-hs?"-0":t}var hs,F,me=i(()=>{Ae();hs=1/0;F=xs});function ys(e,t){t=N(t,e);for(var r=0,a=t.length;e!=null&&r<a;)e=e[F(t[r++])];return r&&r==a?e:void 0}var Ce,Be=i(()=>{pe();me();Ce=ys});function bs(e,t,r){var a=e==null?void 0:Ce(e,t);return a===void 0?r:a}var Ke,Gr=i(()=>{Be();Ke=bs});function gs(e,t,r){var a=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(o);++a<o;)s[a]=e[a+t];return s}var je,qe=i(()=>{je=gs});function Rs(e,t,r){var a=e.length;return r=r===void 0?a:r,!t&&r>=a?e:je(e,t,r)}var Ur,Hr=i(()=>{qe();Ur=Rs});function _s(e){return js.test(e)}var As,vs,Os,Vs,ws,Ss,Cs,js,_e,Ze=i(()=>{As="\\ud800-\\udfff",vs="\\u0300-\\u036f",Os="\\ufe20-\\ufe2f",Vs="\\u20d0-\\u20ff",ws=vs+Os+Vs,Ss="\\ufe0e\\ufe0f",Cs="\\u200d",js=RegExp("["+Cs+As+ws+Ss+"]");_e=_s});function Ts(e){return e.split("")}var Br,Kr=i(()=>{Br=Ts});function Gs(e){return e.match(Ws)||[]}var qr,$s,Es,Is,ks,Ps,Ns,Je,Ye,Fs,Zr,Jr,Yr,Ds,Xr,Qr,Ms,zs,Ls,Ws,ea,ta=i(()=>{qr="\\ud800-\\udfff",$s="\\u0300-\\u036f",Es="\\ufe20-\\ufe2f",Is="\\u20d0-\\u20ff",ks=$s+Es+Is,Ps="\\ufe0e\\ufe0f",Ns="["+qr+"]",Je="["+ks+"]",Ye="\\ud83c[\\udffb-\\udfff]",Fs="(?:"+Je+"|"+Ye+")",Zr="[^"+qr+"]",Jr="(?:\\ud83c[\\udde6-\\uddff]){2}",Yr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ds="\\u200d",Xr=Fs+"?",Qr="["+Ps+"]?",Ms="(?:"+Ds+"(?:"+[Zr,Jr,Yr].join("|")+")"+Qr+Xr+")*",zs=Qr+Xr+Ms,Ls="(?:"+[Zr+Je+"?",Je,Jr,Yr,Ns].join("|")+")",Ws=RegExp(Ye+"(?="+Ye+")|"+Ls+zs,"g");ea=Gs});function Us(e){return _e(e)?ea(e):Br(e)}var ra,aa=i(()=>{Kr();Ze();ta();ra=Us});function Hs(e){return function(t){t=P(t);var r=_e(t)?ra(t):void 0,a=r?r[0]:t.charAt(0),o=r?Ur(r,1).join(""):t.slice(1);return a[e]()+o}}var oa,ia=i(()=>{Hr();Ze();aa();de();oa=Hs});var Bs,sa,na=i(()=>{ia();Bs=oa("toUpperCase"),sa=Bs});function Ks(e,t,r,a){var o=-1,s=e==null?0:e.length;for(a&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}var fa,la=i(()=>{fa=Ks});function qs(e){return function(t){return e?.[t]}}var ua,da=i(()=>{ua=qs});var Zs,Js,pa,ma=i(()=>{da();Zs={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Js=ua(Zs),pa=Js});function on(e){return e=P(e),e&&e.replace(Ys,pa).replace(an,"")}var Ys,Xs,Qs,en,tn,rn,an,ca,ha=i(()=>{ma();de();Ys=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xs="\\u0300-\\u036f",Qs="\\ufe20-\\ufe2f",en="\\u20d0-\\u20ff",tn=Xs+Qs+en,rn="["+tn+"]",an=RegExp(rn,"g");ca=on});function nn(e){return e.match(sn)||[]}var sn,xa,ya=i(()=>{sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;xa=nn});function ln(e){return fn.test(e)}var fn,ba,ga=i(()=>{fn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;ba=ln});function En(e){return e.match($n)||[]}var Va,un,dn,pn,mn,wa,Sa,cn,hn,xn,yn,Ca,bn,ja,_a,Ra,gn,Ta,Rn,$a,Ea,An,vn,On,Ia,ka,ee,Vn,Aa,wn,va,Oa,Pa,Na,Sn,Cn,jn,_n,Tn,$n,Fa,Da=i(()=>{Va="\\ud800-\\udfff",un="\\u0300-\\u036f",dn="\\ufe20-\\ufe2f",pn="\\u20d0-\\u20ff",mn=un+dn+pn,wa="\\u2700-\\u27bf",Sa="a-z\\xdf-\\xf6\\xf8-\\xff",cn="\\xac\\xb1\\xd7\\xf7",hn="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xn="\\u2000-\\u206f",yn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ca="A-Z\\xc0-\\xd6\\xd8-\\xde",bn="\\ufe0e\\ufe0f",ja=cn+hn+xn+yn,_a="['\u2019]",Ra="["+ja+"]",gn="["+mn+"]",Ta="\\d+",Rn="["+wa+"]",$a="["+Sa+"]",Ea="[^"+Va+ja+Ta+wa+Sa+Ca+"]",An="\\ud83c[\\udffb-\\udfff]",vn="(?:"+gn+"|"+An+")",On="[^"+Va+"]",Ia="(?:\\ud83c[\\udde6-\\uddff]){2}",ka="[\\ud800-\\udbff][\\udc00-\\udfff]",ee="["+Ca+"]",Vn="\\u200d",Aa="(?:"+$a+"|"+Ea+")",wn="(?:"+ee+"|"+Ea+")",va="(?:"+_a+"(?:d|ll|m|re|s|t|ve))?",Oa="(?:"+_a+"(?:D|LL|M|RE|S|T|VE))?",Pa=vn+"?",Na="["+bn+"]?",Sn="(?:"+Vn+"(?:"+[On,Ia,ka].join("|")+")"+Na+Pa+")*",Cn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",_n=Na+Pa+Sn,Tn="(?:"+[Rn,Ia,ka].join("|")+")"+_n,$n=RegExp([ee+"?"+$a+"+"+va+"(?="+[Ra,ee,"$"].join("|")+")",wn+"+"+Oa+"(?="+[Ra,ee+Aa,"$"].join("|")+")",ee+"?"+Aa+"+"+va,ee+"+"+Oa,jn,Cn,Ta,Tn].join("|"),"g");Fa=En});function In(e,t,r){return e=P(e),t=r?void 0:t,t===void 0?ba(e)?Fa(e):xa(e):e.match(t)||[]}var Ma,za=i(()=>{ya();ga();de();Da();Ma=In});function Nn(e){return function(t){return fa(Ma(ca(t).replace(Pn,"")),e,"")}}var kn,Pn,La,Wa=i(()=>{la();ha();za();kn="['\u2019]",Pn=RegExp(kn,"g");La=Nn});function Fn(e,t,r){t=N(t,e);for(var a=-1,o=t.length,s=!1;++a<o;){var n=F(t[a]);if(!(s=e!=null&&r(e,n)))break;e=e[n]}return s||++a!=o?s:(o=e==null?0:e.length,!!o&&Ht(o)&&we(n,o)&&(E(e)||Zt(e)))}var Ga,Ua=i(()=>{pe();Jt();ne();ze();Bt();me();Ga=Fn});function Dn(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Ha,Ba=i(()=>{Ha=Dn});function Ln(e,t){return e!=null&&zn.call(e,t)}var Mn,zn,Ka,qa=i(()=>{Mn=Object.prototype,zn=Mn.hasOwnProperty;Ka=Ln});function Wn(e,t){return e!=null&&Ga(e,t,Ka)}var Xe,Za=i(()=>{qa();Ua();Xe=Wn});function Gn(e,t){return t.length<2?e:Ce(e,je(t,0,-1))}var Ja,Ya=i(()=>{Be();qe();Ja=Gn});function Un(e,t){return t=N(t,e),e=Ja(e,t),e==null||delete e[F(Ha(t))]}var Xa,Qa=i(()=>{pe();Ba();Ya();me();Xa=Un});function Hn(e,t,r,a){if(!z(e))return e;t=N(t,e);for(var o=-1,s=t.length,n=s-1,f=e;f!=null&&++o<s;){var l=F(t[o]),d=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(o!=n){var u=f[l];d=a?a(u,l,f):void 0,d===void 0&&(d=z(u)?u:we(t[o+1])?[]:{})}Gt(f,l,d),f=f[l]}return e}var eo,to=i(()=>{Ut();pe();ze();ve();me();eo=Hn});function Bn(e,t,r){return e==null?e:eo(e,t,r)}var Qe,ro=i(()=>{to();Qe=Bn});var Kn,Te,ao=i(()=>{Wa();na();Kn=La(function(e,t,r){return e+(r?" ":"")+sa(t)}),Te=Kn});function qn(e,t){return e==null?!0:Xa(e,t)}var $e,oo=i(()=>{Qa();$e=qn});var et=i(()=>{Gr();Za();ro();ao();oo();});function te(e,t){return t?t.config.useStartCaseInErrors?Te(e):e:Te(e)}function re(e,t,r){let a={};if(r===void 0?t.some(L):r)for(let s of t)a[s]=$(e,s);else for(let s of t)a[s]=e[s];return a}function io(e,t){let r={};for(let a in e)t.includes(a)||(r[a]=e[a]);return r}function tt(e,t,r,a){return a===void 0&&L(t)?Qe(e,t,r):(e[t]=r,e)}function $(e,t,r){return r===void 0&&L(t)?Ke(e,t):e[t]}function L(e){return e.indexOf(".")!==-1}function S(e,t){return typeof t=="object"&&t instanceof e}var Ee=i(()=>{"use strict";et()});var so={};nt(so,{Rule:()=>W,RuleTyped:()=>Zn,Schema:()=>Ie,SchemaTyped:()=>Jn});function W(e){Array.isArray(e)||(e=[e]);let t={};for(let r of e)typeof r=="string"&&(r=(0,rt.default)(r)),t={...t,...r};return t}function Zn(e){return W(e)}function Ie(e){let t={};for(let r of Object.keys(e)){let a=e[r];r==="$include"||(typeof a=="string"?a=(0,rt.default)(a):Array.isArray(a)&&(a=W(a))),t[r]=a}return t}function Jn(e){return Ie(e)}var rt,at=i(()=>{"use strict";rt=H(Ne())});var it=oe((np,no)=>{"use strict";var ot=class{constructor(t,r){this.code="default";return this.message=t,r&&(this.data=r),this}setCode(t){return this.code=t,this}setData(t){return this.data=t,this}setMessage(t){return this.message=t,this}};no.exports=ot});var lo=oe((up,fo)=>{"use strict";Ee();et();var st=class{constructor(t,r,a=!1){return this.data=t,this.path=r,this.name=a,this.pathHasDotNotation=L(r),this}setData(t){return this.data=t,this}get(t){return $(this.data,t)}getThis(){return this.get(this.path)}has(t){return Xe(this.data,t)}set(t,r){return tt(this.data,t,r)}setThis(t){return tt(this.data,this.path,t,this.pathHasDotNotation)}unset(t){return $e(this.data,t)}unsetThis(){return $e(this.data,this.path)}getName(){return this.name||te(this.path)}getNameRaw(){return this.name||this.path}};fo.exports=st});function uo(e,t,r,a,o){let s=a.error,n=null,f="default",l=!1;return a.customError?a.errorFn&&(l=!0,s=a.errorFn({code:f,data:n,validator:a.name,value:t})):S(ke.default,r)&&(r=r,l=!0,s=r.message,n=r.data,f=r.code),l&&(s.includes(":param")&&(s=s.replace(":param",o||e)),a.optionString&&s.includes(":option")&&(s=s.replace(":option",a.optionString))),[{code:f,key:e,type:"validator",validator:a.name,message:s,data:n},{}]}var ke,C,po=i(()=>{"use strict";ke=H(it());Ee();C=class{constructor(t){this.data={};this.fields=[];this.includedFields=[];this.fieldsHasDotNotation=!1;this.isObject=!0;this.async=!1;Object.defineProperty(this,"input",{value:t,enumerable:!1,writable:!0})}validateObject(t){if(!this.isObject)throw new Error("Variable compiled input cannot be used to validate an object, use object compiled input!");if(this.async)throw new Error("Rules contains an async validator, use validateObjectAsync instead!");let r={...t},a=this.fields;for(let s in this.data){let n=this.data[s],f=$(r,s,this.fieldsHasDotNotation);if(n.$skip){let l=n.$skip;if(typeof l=="function"&&(l=l(f,r)),l){this.includedFields.includes(s)||(a=a.filter(d=>d!==s));continue}}for(let l in n.validators){let d=n.validators[l],u=!1;try{u=d.func(f,r)}catch(x){return[{code:"default",key:s,type:"internal",validator:l,message:x.message,data:x.stack},{}]}if(typeof u!==void 0&&(u===!1||S(ke.default,u)))return uo(s,f,u,d,n.$name)}}let o;if(a.length===1){let s=a[0];o={[s]:r[s]}}else a.length>1?o=re(r,a,this.fieldsHasDotNotation):o={};return[void 0,o]}async validateObjectAsync(t){if(!this.isObject)throw new Error("Variable compiled input cannot be used to validate an object, use object compiled input!");let r={...t},a=this.fields;for(let s in this.data){let n=this.data[s],f=$(r,s,this.fieldsHasDotNotation);if(n.$skip){let l=n.$skip;if(typeof l=="function"&&(l=l(f,r)),l){this.includedFields.includes(s)||(a=a.filter(d=>d!==s));continue}}for(let l in n.validators){let d=n.validators[l],u=!1;try{d.async?u=await d.func(f,r):u=d.func(f,r)}catch(x){return[{code:"default",key:s,type:"internal",validator:d.name,message:x.message,data:x.stack},{}]}if(typeof u!==void 0&&(u===!1||S(ke.default,u)))return uo(s,f,u,d,n.$name)}}let o;if(a.length===1){let s=a[0];o={[s]:r[s]}}else a.length>1?o=re(r,a,this.fieldsHasDotNotation):o={};return[void 0,o]}validateVariable(t){if(this.isObject)throw new Error("Object compiled cannot be used to validate a variable, use regular compiled input!");this.isObject=!0;let r=this.validateObject({variable:t});return this.isObject=!1,r[1]=r[1].variable,r}async validateVariableAsync(t){if(this.isObject)throw new Error("Object compiled cannot be used to validate a variable, use regular compiled input!");this.isObject=!0;let r=await this.validateObjectAsync({variable:t});return this.isObject=!1,r[1]=r[1].variable,r}validate(t){return this.isObject?this.validateObject(t):this.validateVariable(t)}async validateAsync(t){return this.isObject?this.validateObjectAsync(t):this.validateVariableAsync(t)}getInputRule(){return this.input}getInputSchema(){return this.input}setValidatorOption(t,r,a){if(a){if(a&&!this.isObject)throw new Error("Field name is not allowed when using variable compiled input!")}else{if(this.isObject)throw new Error("Field name is required when using object compiled input!");a="variable"}return this.data[a]&&this.data[a].validators[t]&&(this.data[a].validators[t].option=r),this}copy(){let t=new C(this.input);t.fields=this.fields,t.includedFields=this.includedFields,t.fieldsHasDotNotation=this.fieldsHasDotNotation,t.isObject=this.isObject,t.async=this.async,t.data={};for(let r in this.data){let a={};for(let o in this.data[r].validators)a[o]={...this.data[r].validators[o]};t.data[r]={$name:this.data[r].$name,$skip:this.data[r].$skip,validators:a}}return t}}});var co={};nt(co,{AttemptError:()=>he,SuperKeys:()=>G,default:()=>Xn,isAbolishClass:()=>Yn,isAbolishInstance:()=>mo});function Yn(e){return typeof e=="function"&&typeof e.addGlobalValidator=="function"}function mo(e){return typeof e=="object"&&(e instanceof U||typeof e.addValidator=="function")}var ce,ae,D,Pe,he,G,U,Xn,ho=i(()=>{"use strict";ce=H(Ne()),ae=H(pt());Ee();at();D=H(it()),Pe=H(lo());po();De();he=class extends Error{constructor(r){super(r.message);this.name="AttemptError",this.error=r}static instanceOf(r){return S(this,r)}},G=Object.freeze({Wildcards:new Set(["*","$"]),Fields:new Set(["*","$","$include"]),Rules:new Set(["$name","$skip","$error","$errors"])}),U=class{constructor(){this.validators={};this.config={useStartCaseInErrors:!0}}static getGlobalValidators(){return ae.default}static getGlobalValidatorsList(){return Object.keys(this.getGlobalValidators())}static addGlobalValidator(t){if(typeof t=="object"&&!Array.isArray(t))t.error||(t.error=`:param failed {${t.name}} validation.`),ae.default[t.name]=t,Object.defineProperty(t.validator,"name",{value:t.name});else throw new TypeError("addGlobalValidator argument must be an object.");return this}static addGlobalValidators(t){if(typeof t=="object"&&(t=Object.values(t)),Array.isArray(t))for(let r of t)U.addGlobalValidator(r);else throw new TypeError("addGlobalValidators argument must be an array or an object");return this}useStartCaseInErrors(t=!0){return this.config.useStartCaseInErrors=t,this}addValidator(t){if(typeof t=="object"&&!Array.isArray(t))t.error||(t.error=`:param failed {${t.name}} validation.`),this.validators[t.name]=t;else throw new TypeError("addValidator argument must be an object.");return this}addValidators(t){if(typeof t=="object"&&(t=Object.values(t)),Array.isArray(t))for(let r of t)this.addValidator(r);else throw new TypeError("addValidators argument must be an array or an object");return this}static validate(t,r){return new this().validate(t,r)}static validateAsync(t,r){return new this().validateAsync(t,r)}validate(t,r,a=!1){if(r instanceof C)return r.validateObject(t);let o={validated:{},jobs:[],keysToBeValidated:[],includeKeys:[]},s={};(r.hasOwnProperty("*")||r.hasOwnProperty("$"))&&(s=r["*"]||r.$,typeof s=="string"&&(s=(0,ce.default)(s)));let n={...t},f=[];if(r.hasOwnProperty("$include")&&(f=r.$include,!Array.isArray(f)))throw new Error("$include has to be an array!");let l=Object.keys(r);l=l.filter(d=>!G.Fields.has(d));for(let d of l){let u=r[d];typeof u=="string"?u=(0,ce.default)(u):Array.isArray(u)&&(u=W(u));let x=!1;if(u.hasOwnProperty("$skip")&&(x=u.$skip,typeof x=="function"&&(x=x(n[d],n)),typeof x!="boolean"))throw new Error(`$skip value or resolved function value must be a BOOLEAN in RuleFor: (${d})`);if(x)l=l.filter(R=>R!==d);else{let R=!1;if(u.hasOwnProperty("$name")&&(R=u.$name,typeof R!="string"))throw new Error(`$name must be a string in RuleFor: (${d})`);let y;if(u.hasOwnProperty("$error")&&(y=u.$error,!y||typeof y!="string"&&typeof y!="function"))throw new Error(`$error value must be a STRING or FUNCTION in RuleFor: (${d})`);let c;if(u.hasOwnProperty("$errors")&&(c=u.$errors,!c||typeof c!="object"))throw new Error(`$errors value must be an OBJECT in RuleFor: (${d})`);u={...s,...io(u,[...G.Rules])};for(let p of Object.keys(u)){if(!this.validators.hasOwnProperty(p)&&!ae.default.hasOwnProperty(p))throw new Error(`Validator: {${p}} does not exists but defined in rules`);let b=this.validators[p]||ae.default[p];if(!a&&b.isAsync)throw new Error(`Validator: {${p}} is async, use async method instead.`);let V=u[p],A=$(n,d);if(a)o.jobs.push({$name:R,rule:d,validator:b,validatorName:p,validatorOption:V,$error:y,$errors:c});else{let m=!1;try{m=b.validator(A,V,{error:(h,g)=>new D.default(h,g),modifier:new Pe.default(n,d,R),abolish:this})}catch(h){return[{code:"default",key:d,type:"internal",validator:p,message:h.message,data:h.stack},{}]}if(m===!1||S(D.default,m)){let h,g=null,v="default";if(S(D.default,m)&&(h=m.message,g=m.data,v=m.code),y&&(typeof y=="function"?h=y({code:v,validator:p,data:g,value:A}):h=y),c&&c[p]){let M=c[p];typeof M=="function"?h=M({code:v,data:g,validator:p,value:A}):h=M}let O=typeof V=="string"||typeof V=="number"||Array.isArray(V);return h=(h||b.error).replace(":param",R||te(d,this)),O&&(h=h.replace(":option",String(V))),[{code:v,key:d,type:"validator",validator:p,message:h,data:g},{}]}}}}}return a?(o.validated=n,o.keysToBeValidated=l,o.includeKeys=f,o):(n=re(n,l.concat(f)),[void 0,n])}validateAsync(t,r){if(r instanceof C)return r.validateObjectAsync(t);let a=this.validate(t,r,!0),{validated:o,jobs:s,keysToBeValidated:n,includeKeys:f}=a;return new Promise(async l=>{for(let d of s){let{$name:u,rule:x,validator:R,validatorName:y,validatorOption:c,$error:p,$errors:b}=d,V=$(o,x),A=!1;try{A=await R.validator(V,c,{error:(m,h)=>new D.default(m,h),modifier:new Pe.default(o,x,u),abolish:this})}catch(m){return l([{code:"default",key:x,type:"internal",validator:y,message:m.message,data:m.stack},{}])}if(A===!1||S(D.default,A)){let m,h=null,g="default";if(S(D.default,A)&&(m=A.message,h=A.data,g=A.code),p&&(typeof p=="function"?m=p({code:g,validator:y,data:h,value:V}):m=p),b&&b[y]){let O=b[y];typeof O=="function"?m=O({code:g,data:h,validator:y,value:V}):m=O}return m=(m||R.error).replace(":param",u||te(x,this)),(typeof c=="string"||typeof c=="number")&&(m=m.replace(":option",String(c))),l([{code:g,key:x,type:"validator",validator:y,message:m,data:h},{}])}}return l([void 0,re(o,n.concat(f))])})}check(t,r){if(r instanceof C)return r.validateVariable(t);let[a,o]=this.validate({variable:t},{variable:r,$include:["variable"]});return[a,o?.variable]}static check(t,r){return new this().check(t,r)}async checkAsync(t,r){if(r instanceof C)return r.validateVariableAsync(t);let[a,o]=await this.validateAsync({variable:t},{variable:r,$include:["variable"]});return[a,o?.variable]}static checkAsync(t,r){return new this().checkAsync(t,r)}attempt(t,r){let a=this.check(t,r);if(a[0])throw new he(a[0]);return a[1]}static attempt(t,r,a){return new this().attempt(t,r)}async attemptAsync(t,r){let a=await this.checkAsync(t,r);if(a[0])throw new he(a[0]);return a[1]}static async attemptAsync(t,r){return new this().attemptAsync(t,r)}test(t,r){return!this.check(t,r)[0]}static test(t,r){return new this().test(t,r)}async testAsync(t,r){return!(await this.checkAsync(t,r))[0]}static testAsync(t,r){return new this().testAsync(t,r)}static compileObject(t,r){let a=r?mo(r)?r:new r:new U,o=new C(Ie(t)),s,n=[];for(let[f,l]of Object.entries(t))G.Wildcards.has(f)?(s=l,typeof s=="string"&&(s=(0,ce.default)(s))):f==="$include"&&(n=l);for(let[f,l]of Object.entries(t)){if(G.Fields.has(f))continue;let d={validators:{}},u=l;typeof l=="string"?u=(0,ce.default)(l):Array.isArray(l)&&(u=W(l)),s&&(u={...s,...u});let x,R={};for(let[c,p]of Object.entries(u))G.Rules.has(c)&&(c==="$name"?(ie(p,["string"],"$name"),d.$name=p):c==="$skip"?(ie(p,["boolean","function"],"$skip"),d.$skip=p):c==="$error"?(ie(p,["string","function"],"$error"),x=p):c==="$errors"&&(ie(p,["object"],"$errors"),R=p));!d.$name&&a.config.useStartCaseInErrors&&(d.$name=te(f));let y=new Pe.default({},f);for(let[c,p]of Object.entries(u)){if(G.Rules.has(c))continue;let b=a.validators[c]||ae.default[c];if(!b)throw new Error(`Validator ${c} not found`);b.isAsync&&(o.async=!0);let V=typeof p=="string"||typeof p=="number"||typeof p=="boolean"||Array.isArray(p),A={abolish:a,modifier:y,error:(O,M)=>new D.default(O,M)};b.error||(b.error=`:param failed {${b.name}} validation.`);let m=b.error,h,g;if(x&&(typeof x=="string"?(m=x,g=!0):typeof x=="function"&&(h=x,g=!0)),R&&R[c]){let O=R[c];typeof O=="string"?(m=O,g=!0):typeof O=="function"&&(h=O,g=!0)}m.includes(":param")&&(m=m.replace(/:param/g,d.$name||f));let v={name:c,option:p,error:m,async:b.isAsync===!0,func(O,M){return A.modifier.setData(M),b.validator(O,this.option,A)}};g&&(v.customError=!0),h&&(v.errorFn=h),V&&(v.optionString=String(p),v.error=v.error.replace(/:option/g,v.optionString)),Object.defineProperty(v.func,"name",{value:`Wrapped(${c})`}),d.validators[c]=v}o.data[f]=d}return Object.keys(o.data).forEach(f=>{o.fields.includes(f)||o.fields.push(f)}),n.forEach(f=>{o.fields.includes(f)||o.fields.push(f)}),o.includedFields=n,o.fieldsHasDotNotation=o.fields.some(L),o}static compile(t,r){t=W(t);let a=this.compileObject({variable:t,$include:["variable"]},r);return a.input=t,a.isObject=!1,a}};Xn=U});var tf=oe(j=>{var Qn=j&&j.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(j,"__esModule",{value:!0});j.Schema=j.Rule=j.Abolish=void 0;var ef=Qn((ho(),lt(co)));j.Abolish=ef.default;var xo=(at(),lt(so));Object.defineProperty(j,"Rule",{enumerable:!0,get:function(){return xo.Rule}});Object.defineProperty(j,"Schema",{enumerable:!0,get:function(){return xo.Schema}})});export default tf();
var go=Object.create;var xe=Object.defineProperty;var Ro=Object.getOwnPropertyDescriptor;var Ao=Object.getOwnPropertyNames;var vo=Object.getPrototypeOf,Oo=Object.prototype.hasOwnProperty;var i=(e,t)=>()=>(e&&(t=e(e=0)),t);var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lt=(e,t)=>{for(var r in t)xe(e,r,{get:t[r],enumerable:!0})},ut=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ao(t))!Oo.call(e,o)&&o!==r&&xe(e,o,{get:()=>t[o],enumerable:!(a=Ro(t,o))||a.enumerable});return e};var H=(e,t,r)=>(r=e!=null?go(vo(e)):{},ut(t||!e||!e.__esModule?xe(r,"default",{value:e,enumerable:!0}):r,e)),dt=e=>ut(xe({},"__esModule",{value:!0}),e);var De=oe((sf,pt)=>{"use strict";var wo=new RegExp(/([!a-zA-Z_*0-9]+)/g),Vo=new RegExp(/([a-zA-Z_*0-9]+:[a-zA-Z_0-9]+)/g),So=new RegExp(/([a-zA-Z_*0-9]+:"[^"]+")/g),jo=new RegExp(/([a-zA-Z_*0-9]+:'[^']+')/g),Co=new RegExp(/([a-zA-Z_*0-9]+:`[^`]+`)/g),$o=e=>{let t=e.split("|"),r={};for(let a=0;a<t.length;a++){let o=t[a];if(o.match(jo)||o.match(So)||o.match(Co)){let[s,...n]=o.split(":"),l=n.join(":");l=l.substring(1),l=l.substring(0,n.length-1),r[s]=l}else if(o.match(Vo)){let[s,n]=o.split(":");isNaN(n)||(n=Number(n)),r[s]=n}else if(o.match(wo)){let s=o,n=!0;s.substring(0,1)==="!"&&(s=s.substring(1),n=!1),r[s]=n}}return r};pt.exports=$o});function ie(e,t,r="Options"){if(!Me(e,t))throw new TypeError(`${r} must be typeof [${t}], but [${typeof e}] was given.`);return!0}function Me(e,t){if(typeof t=="string")return t==="array"&&Array.isArray(e)?!0:typeof e===t;{let r=t.includes("array");return!r&&t.includes(typeof e)?!0:r&&(t.includes(typeof e)||Array.isArray(e))}}var ze=i(()=>{"use strict"});var ct=oe((lf,mt)=>{"use strict";ze();var j={default:{name:"default",description:"Set default value if original value is undefined or null",validator(e,t,{modifier:r}){return e==null&&r.setThis(t),!0}},required:{name:"required",description:"Value is required",error:":param is required.",validator:(e,t)=>t?typeof e>"u"||e===null?!1:typeof e=="string"||Array.isArray(e)?e.length>0:!0:!0},typeof:{name:"typeof",description:"Value is typeof :option",error:":param is not typeof :option",validator:function(t,r){return r===!1?!0:(typeof r=="string"&&r.includes(",")&&(r=r.split(",")),Me(t,r))}},exact:{name:"exact",error:":param failed exact validator",description:"Value is === :option",validator:(e,t)=>e===t},min:{name:"min",error:":param is too small. (Min. :option)",description:"Number: Value is >= :option",validator:(e,t,r)=>{let a=isNaN(e);return typeof e=="string"&&a||Array.isArray(e)?j.minLength.validator(e,t,r):a?!1:Number(e)>=Number(t)}},max:{name:"max",error:":param is too big. (Max. :option)",description:"Number: Value is <= :option",validator:(e,t,r)=>{let a=isNaN(e);return typeof e=="string"&&a||Array.isArray(e)?j.maxLength.validator(e,t,r):a?!1:Number(e)<=Number(t)}},minLength:{name:"minLength",error:":param is too short. (Min. :option characters)",description:"Value length is >= :option",validator:(e,t,{error:r,modifier:a})=>(e=a.getThis()??e,typeof e=="string"?e.trim().length>=Number(t):Array.isArray(e)?e.length>=Number(t)?!0:r(`:param length is too short. (Min: ${t})`):!1)},maxLength:{name:"maxLength",error:":param is too long. (Max. :option characters)",description:"Value length is <= :option",validator:(e,t,{error:r,modifier:a})=>(e=a.getThis()??e,typeof e=="string"?e.trim().length<=Number(t):Array.isArray(e)?e.length<=Number(t)?!0:r(`:param length is too long. (Max: ${t})`):!1)},size:{name:"size",error:":param must be of size: [:option]",description:"Check the size of a String, Array, or Object",validator:(e,t,{error:r})=>{let a;if(typeof e=="string"||Array.isArray(e))a=e.length;else if(typeof e=="object")try{a=Object.keys(e).length}catch(o){return r(o.message)}return a===void 0?!1:Array.isArray(t)?t.includes(a):a===Number(t)}},object:{name:"object",validator:(e,t,{error:r,modifier:a,abolish:o})=>{if(!e||typeof e!="object")return r(":param must be an object.");let[s,n]=o.validate(e,t);if(s)return r(s.message,s);a.setThis(n)},description:["Object: Value is an object"]},objectAsync:{name:"objectAsync",isAsync:!0,validator:async(e,t,{error:r,modifier:a,abolish:o})=>{if(!e||typeof e!="object")return r(":param must be an object.");let[s,n]=await o.validateAsync(e,t);if(s)return r(s.message,s);a.setThis(n)}},$inline:{name:"$inline",error:":param failed inline validation.",validator:(e,t,r)=>t(e,r),description:"Register a custom validation function inline."},$inlineAsync:{name:"$inlineAsync",isAsync:!0,error:":param failed inline validation.",validator:(e,t,r)=>t(e,r),description:"Register a custom async validation function inline."}};j.type=Object.assign({},j.typeof);j.type.name="type";j.type.error=":param is not of type :option";j.type.description="Alias: typeof";for(let e of Object.keys(j)){let t=j[e];Object.defineProperty(t.validator,"name",{value:t.name})}mt.exports=j});var _o,ht,xt=i(()=>{_o=typeof global=="object"&&global&&global.Object===Object&&global,ht=_o});var To,ko,K,ye=i(()=>{xt();To=typeof self=="object"&&self&&self.Object===Object&&self,ko=ht||To||Function("return this")(),K=ko});var Eo,_,be=i(()=>{ye();Eo=K.Symbol,_=Eo});function No(e){var t=Io.call(e,se),r=e[se];try{e[se]=void 0;var a=!0}catch{}var o=Po.call(e);return a&&(t?e[se]=r:delete e[se]),o}var yt,Io,Po,se,bt,gt=i(()=>{be();yt=Object.prototype,Io=yt.hasOwnProperty,Po=yt.toString,se=_?_.toStringTag:void 0;bt=No});function Mo(e){return Do.call(e)}var Fo,Do,Rt,At=i(()=>{Fo=Object.prototype,Do=Fo.toString;Rt=Mo});function Wo(e){return e==null?e===void 0?Lo:zo:vt&&vt in Object(e)?bt(e):Rt(e)}var zo,Lo,vt,B,ge=i(()=>{be();gt();At();zo="[object Null]",Lo="[object Undefined]",vt=_?_.toStringTag:void 0;B=Wo});function Go(e){return e!=null&&typeof e=="object"}var q,Re=i(()=>{q=Go});function Ho(e){return typeof e=="symbol"||q(e)&&B(e)==Uo}var Uo,Z,Ae=i(()=>{ge();Re();Uo="[object Symbol]";Z=Ho});function Ko(e,t){for(var r=-1,a=e==null?0:e.length,o=Array(a);++r<a;)o[r]=t(e[r],r,e);return o}var Ot,wt=i(()=>{Ot=Ko});var Bo,E,ne=i(()=>{Bo=Array.isArray,E=Bo});function jt(e){if(typeof e=="string")return e;if(E(e))return Ot(e,jt)+"";if(Z(e))return St?St.call(e):"";var t=e+"";return t=="0"&&1/e==-qo?"-0":t}var qo,Vt,St,Ct,$t=i(()=>{be();wt();ne();Ae();qo=1/0,Vt=_?_.prototype:void 0,St=Vt?Vt.toString:void 0;Ct=jt});function Zo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var W,ve=i(()=>{W=Zo});function ei(e){if(!W(e))return!1;var t=B(e);return t==Yo||t==Xo||t==Jo||t==Qo}var Jo,Yo,Xo,Qo,_t,Tt=i(()=>{ge();ve();Jo="[object AsyncFunction]",Yo="[object Function]",Xo="[object GeneratorFunction]",Qo="[object Proxy]";_t=ei});var ti,Oe,kt=i(()=>{ye();ti=K["__core-js_shared__"],Oe=ti});function ri(e){return!!Et&&Et in e}var Et,It,Pt=i(()=>{kt();Et=function(){var e=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();It=ri});function ii(e){if(e!=null){try{return oi.call(e)}catch{}try{return e+""}catch{}}return""}var ai,oi,Nt,Ft=i(()=>{ai=Function.prototype,oi=ai.toString;Nt=ii});function mi(e){if(!W(e)||It(e))return!1;var t=_t(e)?pi:ni;return t.test(Nt(e))}var si,ni,fi,li,ui,di,pi,Dt,Mt=i(()=>{Tt();Pt();ve();Ft();si=/[\\^$.*+?()[\]{}|]/g,ni=/^\[object .+?Constructor\]$/,fi=Function.prototype,li=Object.prototype,ui=fi.toString,di=li.hasOwnProperty,pi=RegExp("^"+ui.call(di).replace(si,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Dt=mi});function ci(e,t){return e?.[t]}var zt,Lt=i(()=>{zt=ci});function hi(e,t){var r=zt(e,t);return Dt(r)?r:void 0}var J,we=i(()=>{Mt();Lt();J=hi});var xi,Le,Wt=i(()=>{we();xi=function(){try{var e=J(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Le=xi});function gi(e,t){var r=typeof e;return t=t??yi,!!t&&(r=="number"||r!="symbol"&&bi.test(e))&&e>-1&&e%1==0&&e<t}var yi,bi,Ve,We=i(()=>{yi=9007199254740991,bi=/^(?:0|[1-9]\d*)$/;Ve=gi});function Ri(e,t,r){t=="__proto__"&&Le?Le(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Gt,Ut=i(()=>{Wt();Gt=Ri});function Ai(e,t){return e===t||e!==e&&t!==t}var Se,Ge=i(()=>{Se=Ai});function wi(e,t,r){var a=e[t];(!(Oi.call(e,t)&&Se(a,r))||r===void 0&&!(t in e))&&Gt(e,t,r)}var vi,Oi,Ht,Kt=i(()=>{Ut();Ge();vi=Object.prototype,Oi=vi.hasOwnProperty;Ht=wi});function Si(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Vi}var Vi,Bt,qt=i(()=>{Vi=9007199254740991;Bt=Si});function Ci(e){return q(e)&&B(e)==ji}var ji,Ue,Zt=i(()=>{ge();Re();ji="[object Arguments]";Ue=Ci});var Jt,$i,_i,Ti,Yt,Xt=i(()=>{Zt();Re();Jt=Object.prototype,$i=Jt.hasOwnProperty,_i=Jt.propertyIsEnumerable,Ti=Ue(function(){return arguments}())?Ue:function(e){return q(e)&&$i.call(e,"callee")&&!_i.call(e,"callee")},Yt=Ti});function Ii(e,t){if(E(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Z(e)?!0:Ei.test(e)||!ki.test(e)||t!=null&&e in Object(t)}var ki,Ei,Qt,er=i(()=>{ne();Ae();ki=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ei=/^\w*$/;Qt=Ii});var Pi,T,fe=i(()=>{we();Pi=J(Object,"create"),T=Pi});function Ni(){this.__data__=T?T(null):{},this.size=0}var tr,rr=i(()=>{fe();tr=Ni});function Fi(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ar,or=i(()=>{ar=Fi});function Li(e){var t=this.__data__;if(T){var r=t[e];return r===Di?void 0:r}return zi.call(t,e)?t[e]:void 0}var Di,Mi,zi,ir,sr=i(()=>{fe();Di="__lodash_hash_undefined__",Mi=Object.prototype,zi=Mi.hasOwnProperty;ir=Li});function Ui(e){var t=this.__data__;return T?t[e]!==void 0:Gi.call(t,e)}var Wi,Gi,nr,fr=i(()=>{fe();Wi=Object.prototype,Gi=Wi.hasOwnProperty;nr=Ui});function Ki(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=T&&t===void 0?Hi:t,this}var Hi,lr,ur=i(()=>{fe();Hi="__lodash_hash_undefined__";lr=Ki});function Y(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var He,dr=i(()=>{rr();or();sr();fr();ur();Y.prototype.clear=tr;Y.prototype.delete=ar;Y.prototype.get=ir;Y.prototype.has=nr;Y.prototype.set=lr;He=Y});function Bi(){this.__data__=[],this.size=0}var pr,mr=i(()=>{pr=Bi});function qi(e,t){for(var r=e.length;r--;)if(Se(e[r][0],t))return r;return-1}var I,le=i(()=>{Ge();I=qi});function Yi(e){var t=this.__data__,r=I(t,e);if(r<0)return!1;var a=t.length-1;return r==a?t.pop():Ji.call(t,r,1),--this.size,!0}var Zi,Ji,cr,hr=i(()=>{le();Zi=Array.prototype,Ji=Zi.splice;cr=Yi});function Xi(e){var t=this.__data__,r=I(t,e);return r<0?void 0:t[r][1]}var xr,yr=i(()=>{le();xr=Xi});function Qi(e){return I(this.__data__,e)>-1}var br,gr=i(()=>{le();br=Qi});function es(e,t){var r=this.__data__,a=I(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var Rr,Ar=i(()=>{le();Rr=es});function X(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var vr,Or=i(()=>{mr();hr();yr();gr();Ar();X.prototype.clear=pr;X.prototype.delete=cr;X.prototype.get=xr;X.prototype.has=br;X.prototype.set=Rr;vr=X});var ts,wr,Vr=i(()=>{we();ye();ts=J(K,"Map"),wr=ts});function rs(){this.size=0,this.__data__={hash:new He,map:new(wr||vr),string:new He}}var Sr,jr=i(()=>{dr();Or();Vr();Sr=rs});function as(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Cr,$r=i(()=>{Cr=as});function os(e,t){var r=e.__data__;return Cr(t)?r[typeof t=="string"?"string":"hash"]:r.map}var P,ue=i(()=>{$r();P=os});function is(e){var t=P(this,e).delete(e);return this.size-=t?1:0,t}var _r,Tr=i(()=>{ue();_r=is});function ss(e){return P(this,e).get(e)}var kr,Er=i(()=>{ue();kr=ss});function ns(e){return P(this,e).has(e)}var Ir,Pr=i(()=>{ue();Ir=ns});function fs(e,t){var r=P(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}var Nr,Fr=i(()=>{ue();Nr=fs});function Q(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}var Ke,Dr=i(()=>{jr();Tr();Er();Pr();Fr();Q.prototype.clear=Sr;Q.prototype.delete=_r;Q.prototype.get=kr;Q.prototype.has=Ir;Q.prototype.set=Nr;Ke=Q});function Be(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ls);var r=function(){var a=arguments,o=t?t.apply(this,a):a[0],s=r.cache;if(s.has(o))return s.get(o);var n=e.apply(this,a);return r.cache=s.set(o,n)||s,n};return r.cache=new(Be.Cache||Ke),r}var ls,Mr,zr=i(()=>{Dr();ls="Expected a function";Be.Cache=Ke;Mr=Be});function ds(e){var t=Mr(e,function(a){return r.size===us&&r.clear(),a}),r=t.cache;return t}var us,Lr,Wr=i(()=>{zr();us=500;Lr=ds});var ps,ms,cs,Gr,Ur=i(()=>{Wr();ps=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ms=/\\(\\)?/g,cs=Lr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ps,function(r,a,o,s){t.push(o?s.replace(ms,"$1"):a||r)}),t}),Gr=cs});function hs(e){return e==null?"":Ct(e)}var N,de=i(()=>{$t();N=hs});function xs(e,t){return E(e)?e:Qt(e,t)?[e]:Gr(N(e))}var F,pe=i(()=>{ne();er();Ur();de();F=xs});function bs(e){if(typeof e=="string"||Z(e))return e;var t=e+"";return t=="0"&&1/e==-ys?"-0":t}var ys,D,me=i(()=>{Ae();ys=1/0;D=bs});function gs(e,t){t=F(t,e);for(var r=0,a=t.length;e!=null&&r<a;)e=e[D(t[r++])];return r&&r==a?e:void 0}var je,qe=i(()=>{pe();me();je=gs});function Rs(e,t,r){var a=e==null?void 0:je(e,t);return a===void 0?r:a}var Ze,Hr=i(()=>{qe();Ze=Rs});function As(e,t,r){var a=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(o);++a<o;)s[a]=e[a+t];return s}var Ce,Je=i(()=>{Ce=As});function vs(e,t,r){var a=e.length;return r=r===void 0?a:r,!t&&r>=a?e:Ce(e,t,r)}var Kr,Br=i(()=>{Je();Kr=vs});function Ts(e){return _s.test(e)}var Os,ws,Vs,Ss,js,Cs,$s,_s,$e,Ye=i(()=>{Os="\\ud800-\\udfff",ws="\\u0300-\\u036f",Vs="\\ufe20-\\ufe2f",Ss="\\u20d0-\\u20ff",js=ws+Vs+Ss,Cs="\\ufe0e\\ufe0f",$s="\\u200d",_s=RegExp("["+$s+Os+js+Cs+"]");$e=Ts});function ks(e){return e.split("")}var qr,Zr=i(()=>{qr=ks});function Hs(e){return e.match(Us)||[]}var Jr,Es,Is,Ps,Ns,Fs,Ds,Xe,Qe,Ms,Yr,Xr,Qr,zs,ea,ta,Ls,Ws,Gs,Us,ra,aa=i(()=>{Jr="\\ud800-\\udfff",Es="\\u0300-\\u036f",Is="\\ufe20-\\ufe2f",Ps="\\u20d0-\\u20ff",Ns=Es+Is+Ps,Fs="\\ufe0e\\ufe0f",Ds="["+Jr+"]",Xe="["+Ns+"]",Qe="\\ud83c[\\udffb-\\udfff]",Ms="(?:"+Xe+"|"+Qe+")",Yr="[^"+Jr+"]",Xr="(?:\\ud83c[\\udde6-\\uddff]){2}",Qr="[\\ud800-\\udbff][\\udc00-\\udfff]",zs="\\u200d",ea=Ms+"?",ta="["+Fs+"]?",Ls="(?:"+zs+"(?:"+[Yr,Xr,Qr].join("|")+")"+ta+ea+")*",Ws=ta+ea+Ls,Gs="(?:"+[Yr+Xe+"?",Xe,Xr,Qr,Ds].join("|")+")",Us=RegExp(Qe+"(?="+Qe+")|"+Gs+Ws,"g");ra=Hs});function Ks(e){return $e(e)?ra(e):qr(e)}var oa,ia=i(()=>{Zr();Ye();aa();oa=Ks});function Bs(e){return function(t){t=N(t);var r=$e(t)?oa(t):void 0,a=r?r[0]:t.charAt(0),o=r?Kr(r,1).join(""):t.slice(1);return a[e]()+o}}var sa,na=i(()=>{Br();Ye();ia();de();sa=Bs});var qs,fa,la=i(()=>{na();qs=sa("toUpperCase"),fa=qs});function Zs(e,t,r,a){var o=-1,s=e==null?0:e.length;for(a&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}var ua,da=i(()=>{ua=Zs});function Js(e){return function(t){return e?.[t]}}var pa,ma=i(()=>{pa=Js});var Ys,Xs,ca,ha=i(()=>{ma();Ys={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Xs=pa(Ys),ca=Xs});function nn(e){return e=N(e),e&&e.replace(Qs,ca).replace(sn,"")}var Qs,en,tn,rn,an,on,sn,xa,ya=i(()=>{ha();de();Qs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,en="\\u0300-\\u036f",tn="\\ufe20-\\ufe2f",rn="\\u20d0-\\u20ff",an=en+tn+rn,on="["+an+"]",sn=RegExp(on,"g");xa=nn});function ln(e){return e.match(fn)||[]}var fn,ba,ga=i(()=>{fn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;ba=ln});function dn(e){return un.test(e)}var un,Ra,Aa=i(()=>{un=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;Ra=dn});function In(e){return e.match(En)||[]}var Sa,pn,mn,cn,hn,ja,Ca,xn,yn,bn,gn,$a,Rn,_a,Ta,va,An,ka,vn,Ea,Ia,On,wn,Vn,Pa,Na,ee,Sn,Oa,jn,wa,Va,Fa,Da,Cn,$n,_n,Tn,kn,En,Ma,za=i(()=>{Sa="\\ud800-\\udfff",pn="\\u0300-\\u036f",mn="\\ufe20-\\ufe2f",cn="\\u20d0-\\u20ff",hn=pn+mn+cn,ja="\\u2700-\\u27bf",Ca="a-z\\xdf-\\xf6\\xf8-\\xff",xn="\\xac\\xb1\\xd7\\xf7",yn="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bn="\\u2000-\\u206f",gn=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$a="A-Z\\xc0-\\xd6\\xd8-\\xde",Rn="\\ufe0e\\ufe0f",_a=xn+yn+bn+gn,Ta="['\u2019]",va="["+_a+"]",An="["+hn+"]",ka="\\d+",vn="["+ja+"]",Ea="["+Ca+"]",Ia="[^"+Sa+_a+ka+ja+Ca+$a+"]",On="\\ud83c[\\udffb-\\udfff]",wn="(?:"+An+"|"+On+")",Vn="[^"+Sa+"]",Pa="(?:\\ud83c[\\udde6-\\uddff]){2}",Na="[\\ud800-\\udbff][\\udc00-\\udfff]",ee="["+$a+"]",Sn="\\u200d",Oa="(?:"+Ea+"|"+Ia+")",jn="(?:"+ee+"|"+Ia+")",wa="(?:"+Ta+"(?:d|ll|m|re|s|t|ve))?",Va="(?:"+Ta+"(?:D|LL|M|RE|S|T|VE))?",Fa=wn+"?",Da="["+Rn+"]?",Cn="(?:"+Sn+"(?:"+[Vn,Pa,Na].join("|")+")"+Da+Fa+")*",$n="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_n="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Tn=Da+Fa+Cn,kn="(?:"+[vn,Pa,Na].join("|")+")"+Tn,En=RegExp([ee+"?"+Ea+"+"+wa+"(?="+[va,ee,"$"].join("|")+")",jn+"+"+Va+"(?="+[va,ee+Oa,"$"].join("|")+")",ee+"?"+Oa+"+"+wa,ee+"+"+Va,_n,$n,ka,kn].join("|"),"g");Ma=In});function Pn(e,t,r){return e=N(e),t=r?void 0:t,t===void 0?Ra(e)?Ma(e):ba(e):e.match(t)||[]}var La,Wa=i(()=>{ga();Aa();de();za();La=Pn});function Dn(e){return function(t){return ua(La(xa(t).replace(Fn,"")),e,"")}}var Nn,Fn,Ga,Ua=i(()=>{da();ya();Wa();Nn="['\u2019]",Fn=RegExp(Nn,"g");Ga=Dn});function Mn(e,t,r){t=F(t,e);for(var a=-1,o=t.length,s=!1;++a<o;){var n=D(t[a]);if(!(s=e!=null&&r(e,n)))break;e=e[n]}return s||++a!=o?s:(o=e==null?0:e.length,!!o&&Bt(o)&&Ve(n,o)&&(E(e)||Yt(e)))}var Ha,Ka=i(()=>{pe();Xt();ne();We();qt();me();Ha=Mn});function zn(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Ba,qa=i(()=>{Ba=zn});function Gn(e,t){return e!=null&&Wn.call(e,t)}var Ln,Wn,Za,Ja=i(()=>{Ln=Object.prototype,Wn=Ln.hasOwnProperty;Za=Gn});function Un(e,t){return e!=null&&Ha(e,t,Za)}var et,Ya=i(()=>{Ja();Ka();et=Un});function Hn(e,t){return t.length<2?e:je(e,Ce(t,0,-1))}var Xa,Qa=i(()=>{qe();Je();Xa=Hn});function Kn(e,t){return t=F(t,e),e=Xa(e,t),e==null||delete e[D(Ba(t))]}var eo,to=i(()=>{pe();qa();Qa();me();eo=Kn});function Bn(e,t,r,a){if(!W(e))return e;t=F(t,e);for(var o=-1,s=t.length,n=s-1,l=e;l!=null&&++o<s;){var d=D(t[o]),u=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(o!=n){var f=l[d];u=a?a(f,d,l):void 0,u===void 0&&(u=W(f)?f:Ve(t[o+1])?[]:{})}Ht(l,d,u),l=l[d]}return e}var ro,ao=i(()=>{Kt();pe();We();ve();me();ro=Bn});function qn(e,t,r){return e==null?e:ro(e,t,r)}var tt,oo=i(()=>{ao();tt=qn});var Zn,_e,io=i(()=>{Ua();la();Zn=Ga(function(e,t,r){return e+(r?" ":"")+fa(t)}),_e=Zn});function Jn(e,t){return e==null?!0:eo(e,t)}var Te,so=i(()=>{to();Te=Jn});var rt=i(()=>{Hr();Ya();oo();io();so();});function te(e,t){return t?t.config.useStartCaseInErrors?_e(e):e:_e(e)}function re(e,t,r){let a={};if(r===void 0?t.some(G):r)for(let s of t)a[s]=k(e,s);else for(let s of t)a[s]=e[s];return a}function no(e,t){let r={};for(let a in e)t.includes(a)||(r[a]=e[a]);return r}function at(e,t,r,a){return a===void 0&&G(t)?tt(e,t,r):(e[t]=r,e)}function k(e,t,r){return r===void 0&&G(t)?Ze(e,t):e[t]}function G(e){return e.indexOf(".")!==-1}function C(e,t){return typeof t=="object"&&t instanceof e}var ke=i(()=>{"use strict";rt()});var fo={};lt(fo,{Rule:()=>U,RuleTyped:()=>Yn,Schema:()=>Ee,SchemaTyped:()=>Xn});function U(e){Array.isArray(e)||(e=[e]);let t={};for(let r of e)typeof r=="string"&&(r=(0,ot.default)(r)),t={...t,...r};return t}function Yn(e){return U(e)}function Ee(e){let t={};for(let r of Object.keys(e)){let a=e[r];r==="$include"||(typeof a=="string"?a=(0,ot.default)(a):Array.isArray(a)&&(a=U(a))),t[r]=a}return t}function Xn(e){return Ee(e)}var ot,it=i(()=>{"use strict";ot=H(De())});var nt=oe((lp,lo)=>{"use strict";var st=class{constructor(t,r){this.code="default";return this.message=t,r&&(this.data=r),this}setCode(t){return this.code=t,this}setData(t){return this.data=t,this}setMessage(t){return this.message=t,this}};lo.exports=st});var po=oe((pp,uo)=>{"use strict";ke();rt();var ft=class{constructor(t,r,a=!1){return this.data=t,this.path=r,this.name=a,this.pathHasDotNotation=G(r),this}setData(t){return this.data=t,this}get(t){return k(this.data,t)}getThis(){return this.get(this.path)}has(t){return et(this.data,t)}set(t,r){return at(this.data,t,r)}setThis(t){return at(this.data,this.path,t,this.pathHasDotNotation)}unset(t){return Te(this.data,t)}unsetThis(){return Te(this.data,this.path)}getName(){return this.name||te(this.path)}getNameRaw(){return this.name||this.path}};uo.exports=ft});function mo(e,t,r,a,o){let s=a.error,n=null,l="default",d=!1;return a.customError?a.errorFn&&(d=!0,s=a.errorFn({code:l,data:n,validator:a.name,value:t})):C(Ie.default,r)&&(r=r,d=!0,s=r.message,n=r.data,l=r.code),d&&(s.includes(":param")&&(s=s.replace(":param",o||e)),a.optionString&&s.includes(":option")&&(s=s.replace(":option",a.optionString))),[{code:l,key:e,type:"validator",validator:a.name,message:s,data:n},{}]}var Ie,M,co=i(()=>{"use strict";Ie=H(nt());ke();M=class e{constructor(t){this.data={};this.fields=[];this.fieldsHasDotNotation=!1;this.isObject=!0;this.async=!1;Object.defineProperty(this,"input",{value:t,enumerable:!1,writable:!0})}validateObject(t){if(!this.isObject)throw new Error("Variable compiled input cannot be used to validate an object, use object compiled input!");if(this.async)throw new Error("Rules contains an async validator, use validateObjectAsync instead!");let r={...t};if(this.allowedFields){let n=Object.keys(r).filter(l=>!this.allowedFields.includes(l));if(n.length)return[{code:"object.unknown",type:"internal",key:"$strict",validator:"$strict",message:"Data contains unknown fields!",data:{unknown:n}},{}]}let a=this.fields;for(let s in this.data){let n=this.data[s],l=k(r,s,this.fieldsHasDotNotation);if(n.$skip){let d=n.$skip;if(typeof d=="function"&&(d=d(l,r)),d){this.includedFields&&!this.includedFields.includes(s)&&(a=a.filter(u=>u!==s));continue}}for(let d in n.validators){let u=n.validators[d],f=!1;try{f=u.func(l,r)}catch(p){return[{code:"default",key:s,type:"internal",validator:d,message:p.message,data:p.stack},{}]}if(typeof f!==void 0&&(f===!1||C(Ie.default,f)))return mo(s,l,f,u,n.$name)}}let o;if(a.length===1){let s=a[0];o={[s]:r[s]}}else a.length>1?o=re(r,a,this.fieldsHasDotNotation):o={};return[void 0,o]}async validateObjectAsync(t){if(!this.isObject)throw new Error("Variable compiled input cannot be used to validate an object, use object compiled input!");let r={...t};if(this.allowedFields){let n=Object.keys(r).filter(l=>!this.allowedFields.includes(l));if(n.length)return[{code:"object.unknown",type:"internal",key:"$strict",validator:"$strict",message:"Data contains unknown fields!",data:{unknown:n}},{}]}let a=this.fields;for(let s in this.data){let n=this.data[s],l=k(r,s,this.fieldsHasDotNotation);if(n.$skip){let d=n.$skip;if(typeof d=="function"&&(d=d(l,r)),d){this.includedFields&&!this.includedFields.includes(s)&&(a=a.filter(u=>u!==s));continue}}for(let d in n.validators){let u=n.validators[d],f=!1;try{u.async?f=await u.func(l,r):f=u.func(l,r)}catch(p){return[{code:"default",key:s,type:"internal",validator:u.name,message:p.message,data:p.stack},{}]}if(typeof f!==void 0&&(f===!1||C(Ie.default,f)))return mo(s,l,f,u,n.$name)}}let o;if(a.length===1){let s=a[0];o={[s]:r[s]}}else a.length>1?o=re(r,a,this.fieldsHasDotNotation):o={};return[void 0,o]}validateVariable(t){if(this.isObject)throw new Error("Object compiled cannot be used to validate a variable, use regular compiled input!");this.isObject=!0;let r=this.validateObject({variable:t});return this.isObject=!1,r[1]=r[1].variable,r}async validateVariableAsync(t){if(this.isObject)throw new Error("Object compiled cannot be used to validate a variable, use regular compiled input!");this.isObject=!0;let r=await this.validateObjectAsync({variable:t});return this.isObject=!1,r[1]=r[1].variable,r}validate(t){return this.isObject?this.validateObject(t):this.validateVariable(t)}async validateAsync(t){return this.isObject?this.validateObjectAsync(t):this.validateVariableAsync(t)}getInputRule(){return this.input}getInputSchema(){return this.input}setValidatorOption(t,r,a){if(a){if(a&&!this.isObject)throw new Error("Field name is not allowed when using variable compiled input!")}else{if(this.isObject)throw new Error("Field name is required when using object compiled input!");a="variable"}return this.data[a]&&this.data[a].validators[t]&&(this.data[a].validators[t].option=r),this}copy(){let t=new e(this.input);t.fields=this.fields,t.includedFields=this.includedFields,t.fieldsHasDotNotation=this.fieldsHasDotNotation,t.isObject=this.isObject,t.async=this.async,t.data={};for(let r in this.data){let a={};for(let o in this.data[r].validators)a[o]={...this.data[r].validators[o]};t.data[r]={$name:this.data[r].$name,$skip:this.data[r].$skip,validators:a}}return t}}});var xo={};lt(xo,{AttemptError:()=>he,SuperKeys:()=>L,default:()=>ef,isAbolishClass:()=>Qn,isAbolishInstance:()=>ho});function Qn(e){return typeof e=="function"&&typeof e.addGlobalValidator=="function"}function ho(e){return typeof e=="object"&&(e instanceof Ne||typeof e.addValidator=="function")}var ce,ae,z,Pe,he,L,Ne,ef,yo=i(()=>{"use strict";ce=H(De()),ae=H(ct());ke();it();z=H(nt()),Pe=H(po());co();ze();he=class extends Error{constructor(t){super(t.message),this.name="AttemptError",this.error=t}static instanceOf(t){return C(this,t)}},L=Object.freeze({Wildcards:new Set(["*","$"]),Fields:new Set(["*","$","$include","$strict"]),Rules:new Set(["$name","$skip","$error","$errors"])}),Ne=class e{constructor(){this.validators={};this.config={useStartCaseInErrors:!0}}static getGlobalValidators(){return ae.default}static getGlobalValidatorsList(){return Object.keys(this.getGlobalValidators())}static addGlobalValidator(t){if(typeof t=="object"&&!Array.isArray(t))t.error||(t.error=`:param failed {${t.name}} validation.`),ae.default[t.name]=t,Object.defineProperty(t.validator,"name",{value:t.name});else throw new TypeError("addGlobalValidator argument must be an object.");return this}static addGlobalValidators(t){if(typeof t=="object"&&(t=Object.values(t)),Array.isArray(t))for(let r of t)e.addGlobalValidator(r);else throw new TypeError("addGlobalValidators argument must be an array or an object");return this}useStartCaseInErrors(t=!0){return this.config.useStartCaseInErrors=t,this}addValidator(t){if(typeof t=="object"&&!Array.isArray(t))t.error||(t.error=`:param failed {${t.name}} validation.`),this.validators[t.name]=t;else throw new TypeError("addValidator argument must be an object.");return this}addValidators(t){if(typeof t=="object"&&(t=Object.values(t)),Array.isArray(t))for(let r of t)this.addValidator(r);else throw new TypeError("addValidators argument must be an array or an object");return this}static validate(t,r){return new this().validate(t,r)}static validateAsync(t,r){return new this().validateAsync(t,r)}validate(t,r,a=!1){if(r instanceof M)return r.validateObject(t);let o={validated:{},jobs:[],keysToBeValidated:[],includeKeys:[]},s={};(r.hasOwnProperty("*")||r.hasOwnProperty("$"))&&(s=r["*"]||r.$,typeof s=="string"&&(s=(0,ce.default)(s)));let n={...t},l=[];if(r.hasOwnProperty("$include")&&(l=r.$include,!Array.isArray(l)))throw new Error("$include has to be an array!");let d=Object.keys(r).filter(f=>!L.Fields.has(f)),u;if(r.hasOwnProperty("$strict")){if(r.$strict===!0)u=d;else if(Array.isArray(r.$strict)){u=r.$strict;for(let b of d)u.includes(b)||u.push(b)}else throw new Error("$strict must be a boolean or an array of allowed keys.");u=u.concat(l);let p=Object.keys(n).filter(b=>!u.includes(b));if(p.length>0)return[{code:"object.unknown",type:"internal",key:"$strict",validator:"$strict",message:"Data contains unknown fields!",data:{unknown:p}},{}]}for(let f of d){let p=r[f];typeof p=="string"?p=(0,ce.default)(p):Array.isArray(p)&&(p=U(p));let b=!1;if(p.hasOwnProperty("$skip")&&(b=p.$skip,typeof b=="function"&&(b=b(n[f],n)),typeof b!="boolean"))throw new Error(`$skip value or resolved function value must be a BOOLEAN in RuleFor: (${f})`);if(b)d=d.filter(y=>y!==f);else{let y=!1;if(p.hasOwnProperty("$name")&&(y=p.$name,typeof y!="string"))throw new Error(`$name must be a string in RuleFor: (${f})`);let R;if(p.hasOwnProperty("$error")&&(R=p.$error,!R||typeof R!="string"&&typeof R!="function"))throw new Error(`$error value must be a STRING or FUNCTION in RuleFor: (${f})`);let v;if(p.hasOwnProperty("$errors")&&(v=p.$errors,!v||typeof v!="object"))throw new Error(`$errors value must be an OBJECT in RuleFor: (${f})`);p={...s,...no(p,[...L.Rules])};for(let m of Object.keys(p)){if(!this.validators.hasOwnProperty(m)&&!ae.default.hasOwnProperty(m))throw new Error(`Validator: {${m}} does not exists but defined in rules`);let h=this.validators[m]||ae.default[m];if(!a&&h.isAsync)throw new Error(`Validator: {${m}} is async, use async method instead.`);let x=p[m],g=k(n,f);if(a)o.jobs.push({$name:y,rule:f,validator:h,validatorName:m,validatorOption:x,$error:R,$errors:v});else{let A=!1;try{A=h.validator(g,x,{error:(c,w)=>new z.default(c,w),modifier:new Pe.default(n,f,y),abolish:this})}catch(c){return[{code:"default",key:f,type:"internal",validator:m,message:c.message,data:c.stack},{}]}if(A===!1||C(z.default,A)){let c,w=null,O="default";if(C(z.default,A)&&(c=A.message,w=A.data,O=A.code),R&&(typeof R=="function"?c=R({code:O,validator:m,data:w,value:g}):c=R),v&&v[m]){let V=v[m];typeof V=="function"?c=V({code:O,data:w,validator:m,value:g}):c=V}let S=typeof x=="string"||typeof x=="number"||Array.isArray(x);return c=(c||h.error).replace(":param",y||te(f,this)),S&&(c=c.replace(":option",String(x))),[{code:O,key:f,type:"validator",validator:m,message:c,data:w},{}]}}}}}return a?(o.validated=n,o.keysToBeValidated=d,o.includeKeys=l,o):(n=re(n,d.concat(l)),[void 0,n])}validateAsync(t,r){if(r instanceof M)return r.validateObjectAsync(t);let a=this.validate(t,r,!0),{validated:o,jobs:s,keysToBeValidated:n,includeKeys:l}=a;return new Promise(async d=>{for(let u of s){let{$name:f,rule:p,validator:b,validatorName:y,validatorOption:R,$error:v,$errors:m}=u,h=k(o,p),x=!1;try{x=await b.validator(h,R,{error:(g,A)=>new z.default(g,A),modifier:new Pe.default(o,p,f),abolish:this})}catch(g){return d([{code:"default",key:p,type:"internal",validator:y,message:g.message,data:g.stack},{}])}if(x===!1||C(z.default,x)){let g,A=null,c="default";if(C(z.default,x)&&(g=x.message,A=x.data,c=x.code),v&&(typeof v=="function"?g=v({code:c,validator:y,data:A,value:h}):g=v),m&&m[y]){let O=m[y];typeof O=="function"?g=O({code:c,data:A,validator:y,value:h}):g=O}return g=(g||b.error).replace(":param",f||te(p,this)),(typeof R=="string"||typeof R=="number")&&(g=g.replace(":option",String(R))),d([{code:c,key:p,type:"validator",validator:y,message:g,data:A},{}])}}return d([void 0,re(o,n.concat(l))])})}check(t,r){if(r instanceof M)return r.validateVariable(t);let[a,o]=this.validate({variable:t},{variable:r,$include:["variable"]});return[a,o?.variable]}static check(t,r){return new this().check(t,r)}async checkAsync(t,r){if(r instanceof M)return r.validateVariableAsync(t);let[a,o]=await this.validateAsync({variable:t},{variable:r,$include:["variable"]});return[a,o?.variable]}static checkAsync(t,r){return new this().checkAsync(t,r)}attempt(t,r){let a=this.check(t,r);if(a[0])throw new he(a[0]);return a[1]}static attempt(t,r,a){return new this().attempt(t,r)}async attemptAsync(t,r){let a=await this.checkAsync(t,r);if(a[0])throw new he(a[0]);return a[1]}static async attemptAsync(t,r){return new this().attemptAsync(t,r)}test(t,r){return!this.check(t,r)[0]}static test(t,r){return new this().test(t,r)}async testAsync(t,r){return!(await this.checkAsync(t,r))[0]}static testAsync(t,r){return new this().testAsync(t,r)}static compileObject(t,r){let a=r?ho(r)?r:new r:new e,o=new M(Ee(t)),s,n=[],l,d=Object.entries(t);for(let[u,f]of d)if(L.Wildcards.has(u)&&(s=f,typeof s=="string"&&(s=(0,ce.default)(s))),u==="$include"&&(n=f),u==="$strict")if(f===!0)l=Object.keys(t);else if(Array.isArray(f))l=f;else throw new Error("$strict must be a boolean or an array of allowed keys.");for(let[u,f]of d){if(L.Fields.has(u))continue;let p={validators:{}},b=f;typeof f=="string"?b=(0,ce.default)(f):Array.isArray(f)&&(b=U(f)),s&&(b={...s,...b});let y,R={};for(let[m,h]of Object.entries(b))L.Rules.has(m)&&(m==="$name"?(ie(h,["string"],"$name"),p.$name=h):m==="$skip"?(ie(h,["boolean","function"],"$skip"),p.$skip=h):m==="$error"?(ie(h,["string","function"],"$error"),y=h):m==="$errors"&&(ie(h,["object"],"$errors"),R=h));!p.$name&&a.config.useStartCaseInErrors&&(p.$name=te(u));let v=new Pe.default({},u);for(let[m,h]of Object.entries(b)){if(L.Rules.has(m))continue;let x=a.validators[m]||ae.default[m];if(!x)throw new Error(`Validator ${m} not found`);x.isAsync&&(o.async=!0);let g=typeof h=="string"||typeof h=="number"||typeof h=="boolean"||Array.isArray(h),A={abolish:a,modifier:v,error:(V,Fe)=>new z.default(V,Fe)};x.error||(x.error=`:param failed {${x.name}} validation.`);let c=x.error,w,O;if(y&&(typeof y=="string"?(c=y,O=!0):typeof y=="function"&&(w=y,O=!0)),R&&R[m]){let V=R[m];typeof V=="string"?(c=V,O=!0):typeof V=="function"&&(w=V,O=!0)}c.includes(":param")&&(c=c.replace(/:param/g,p.$name||u));let S={name:m,option:h,error:c,async:x.isAsync===!0,func(V,Fe){return A.modifier.setData(Fe),x.validator(V,this.option,A)}};O&&(S.customError=!0),w&&(S.errorFn=w),g&&(S.optionString=String(h),S.error=S.error.replace(/:option/g,S.optionString)),Object.defineProperty(S.func,"name",{value:`Wrapped(${m})`}),p.validators[m]=S}o.data[u]=p}return Object.keys(o.data).forEach(u=>{o.fields.includes(u)||o.fields.push(u)}),n.forEach(u=>{o.fields.includes(u)||o.fields.push(u)}),o.includedFields=n,o.fieldsHasDotNotation=o.fields.some(G),l&&(l=o.fields.concat(n).concat(l),l=l.filter(u=>!L.Fields.has(u)),o.allowedFields=l),o}static compile(t,r){t=U(t);let a=this.compileObject({variable:t,$include:["variable"]},r);return a.input=t,a.isObject=!1,a}};ef=Ne});var af=oe($=>{var tf=$&&$.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($,"__esModule",{value:!0});$.Schema=$.Rule=$.Abolish=void 0;var rf=tf((yo(),dt(xo)));$.Abolish=rf.default;var bo=(it(),dt(fo));Object.defineProperty($,"Rule",{enumerable:!0,get:function(){return bo.Rule}});Object.defineProperty($,"Schema",{enumerable:!0,get:function(){return bo.Schema}})});export default af();

@@ -7,3 +7,3 @@ import * as Joi from "joi";

*/
export declare const $joi: (schema: Joi.Schema<any> | ((joi: Joi.Root) => Joi.Schema)) => {
export declare const $joi: (schema: Joi.Schema | ((joi: Joi.Root) => Joi.Schema)) => {
$joi: Joi.Schema<any>;

@@ -18,3 +18,3 @@ };

declare module "../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -21,0 +21,0 @@ $joi: Joi.Schema | ((joi: Joi.Root) => Joi.Schema);

import * as Yup from "yup";
import type { TypeOfAbolishOrInstance } from "../src/Abolish";
import type { ValidateOptions } from "yup/es/types";
export type YupSchemaOption<T extends Yup.BaseSchema> = {
import type { ValidateOptions } from "yup";
export type YupSchemaOption<T extends Yup.AnySchema> = {
schema: T;

@@ -10,6 +10,6 @@ options?: ValidateOptions;

declare module "../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {
$yup: Yup.BaseSchema | YupSchemaOption<any>;
$yupAsync: Yup.BaseSchema | YupSchemaOption<any>;
$yup: Yup.AnySchema | YupSchemaOption<any>;
$yupAsync: Yup.AnySchema | YupSchemaOption<any>;
}

@@ -21,10 +21,10 @@ }

*/
export declare function $yup<T extends Yup.BaseSchema>(schema: YupHelper<T>, options?: ValidateOptions): Record<"$yup", YupSchemaOption<T>>;
export declare function $yup<T extends Yup.BaseSchema>(schema: T, options?: ValidateOptions): Record<"$yup", YupSchemaOption<T>>;
export declare function $yup<T extends Yup.AnySchema>(schema: YupHelper<T>, options?: ValidateOptions): Record<"$yup", YupSchemaOption<T>>;
export declare function $yup<T extends Yup.AnySchema>(schema: T, options?: ValidateOptions): Record<"$yup", YupSchemaOption<T>>;
/**
* $yup Async Helper
*/
export declare function $yupAsync<T extends Yup.BaseSchema>(schema: YupHelper<T>, options?: ValidateOptions): Record<"$yupAsync", YupSchemaOption<T>>;
export declare function $yupAsync<T extends Yup.BaseSchema>(schema: T, options?: ValidateOptions): Record<"$yupAsync", YupSchemaOption<T>>;
export declare function $yupAsync<T extends Yup.AnySchema>(schema: YupHelper<T>, options?: ValidateOptions): Record<"$yupAsync", YupSchemaOption<T>>;
export declare function $yupAsync<T extends Yup.AnySchema>(schema: T, options?: ValidateOptions): Record<"$yupAsync", YupSchemaOption<T>>;
export declare function useYup(abolish: TypeOfAbolishOrInstance): void;
export {};
{
"name": "abolish",
"version": "6.5.3",
"version": "6.6.0",
"description": "A javascript object validator.",

@@ -23,3 +23,3 @@ "main": "index.js",

"watch": "npx tsc --watch",
"play": "npx ts-node-dev --respawn dev/play.ts",
"play": "npx tsx watch dev/play.ts",
"play:dev": "npx nodemon dev/play.js",

@@ -32,17 +32,18 @@ "test-browser": "npx vite --host",

"dependencies": {
"lodash": "^4.17.21"
"lodash": "^4.17.21",
"tsx": "^4.15.5"
},
"devDependencies": {
"@trapcode/benchmark": "^0.1.3",
"@types/lodash": "^4.14.191",
"@types/node": "^18.11.18",
"esbuild": "^0.17.2",
"@types/lodash": "^4.17.5",
"@types/node": "^20.14.2",
"esbuild": "^0.21.5",
"japa": "^4.0.0",
"joi": "^17.7.0",
"joi": "^17.13.1",
"lodash-es": "^4.17.21",
"prettier": "^2.8.3",
"ts-node": "^10.9.1",
"prettier": "^3.3.2",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"typescript": "^4.9.4",
"yup": "^0.32.11"
"typescript": "^5.4.5",
"yup": "^1.4.0"
},

@@ -49,0 +50,0 @@ "keywords": [

@@ -32,3 +32,3 @@ "use strict";

Wildcards: new Set(["*", "$"]),
Fields: new Set(["*", "$", "$include"]),
Fields: new Set(["*", "$", "$include", "$strict"]),
Rules: new Set(["$name", "$skip", "$error", "$errors"])

@@ -193,5 +193,39 @@ });

}
let keysToBeValidated = Object.keys(rules);
// remove SUPER_RULES from keysToBeValidated
keysToBeValidated = keysToBeValidated.filter((key) => !exports.SuperKeys.Fields.has(key));
let keysToBeValidated = Object.keys(rules).filter((key) => !exports.SuperKeys.Fields.has(key));
let allowedKeys = undefined;
if (rules.hasOwnProperty("$strict")) {
if (rules["$strict"] === true) {
allowedKeys = keysToBeValidated;
}
else if (Array.isArray(rules["$strict"])) {
// if strict is an array, then append it to allowedKeys
allowedKeys = rules["$strict"];
for (const key of keysToBeValidated) {
if (!allowedKeys.includes(key))
allowedKeys.push(key);
}
}
else {
throw new Error(`$strict must be a boolean or an array of allowed keys.`);
}
// add $include keys to allowedKeys
allowedKeys = allowedKeys.concat(includeKeys);
// check if all keys in object are allowed
const objectKeys = Object.keys(validated);
const unknownKeys = objectKeys.filter((key) => !allowedKeys.includes(key));
if (unknownKeys.length > 0) {
return [
{
code: "object.unknown",
type: "internal",
key: "$strict",
validator: "$strict",
message: "Data contains unknown fields!",
data: { unknown: unknownKeys }
},
{}
];
}
}
// Loop through defined rules

@@ -693,3 +727,5 @@ for (const rule of keysToBeValidated) {

let includeFields = [];
for (const [field, rules] of Object.entries(schema)) {
let allowedKeys = undefined;
let schemaEntries = Object.entries(schema);
for (const [field, rules] of schemaEntries) {
/**

@@ -707,5 +743,16 @@ * Check for wildcard rules (*, $)

}
else if (field === "$include") {
if (field === "$include") {
includeFields = rules;
}
if (field === "$strict") {
if (rules === true) {
allowedKeys = Object.keys(schema);
}
else if (Array.isArray(rules)) {
allowedKeys = rules;
}
else {
throw new Error(`$strict must be a boolean or an array of allowed keys.`);
}
}
}

@@ -715,3 +762,3 @@ /**

*/
for (const [field, rules] of Object.entries(schema)) {
for (const [field, rules] of schemaEntries) {
if (exports.SuperKeys.Fields.has(field))

@@ -877,2 +924,10 @@ continue;

compiled.fieldsHasDotNotation = compiled.fields.some(inbuilt_fn_1.hasDotNotation);
// add allowedKeys
if (allowedKeys) {
// add $include keys to allowedKeys
allowedKeys = compiled.fields.concat(includeFields).concat(allowedKeys);
// remove SUPER_RULES from allowedKeys
allowedKeys = allowedKeys.filter((key) => !exports.SuperKeys.Fields.has(key));
compiled.allowedFields = allowedKeys;
}
return compiled;

@@ -879,0 +934,0 @@ }

@@ -43,4 +43,8 @@ import type { $skipRule, AbolishRule, AbolishSchema, AbolishValidatorFunctionResult, ValidationError, ValidationResult } from "./types";

*/
includedFields: string[];
includedFields?: string[];
/**
* Allowed Fields when $strict rule is used
*/
allowedFields?: string[];
/**
* If fields has any dot notation set to true

@@ -90,3 +94,3 @@ */

*/
getInputSchema(): AbolishSchema<Record<string, any>>;
getInputSchema(): AbolishSchema;
/**

@@ -93,0 +97,0 @@ * Change a fields validator option

@@ -24,6 +24,2 @@ "use strict";

/**
* Fields included
*/
this.includedFields = [];
/**
* If fields has any dot notation set to true

@@ -67,2 +63,19 @@ */

const validated = { ...data };
if (this.allowedFields) {
const objKeys = Object.keys(validated);
const unknownKeys = objKeys.filter((key) => !this.allowedFields.includes(key));
if (unknownKeys.length) {
return [
{
code: "object.unknown",
type: "internal",
key: "$strict",
validator: "$strict",
message: "Data contains unknown fields!",
data: { unknown: unknownKeys }
},
{}
];
}
}
/**

@@ -89,3 +102,3 @@ * Hold current fields

// if field is not in included fields, remove it from fields
if (!this.includedFields.includes(field)) {
if (this.includedFields && !this.includedFields.includes(field)) {
fields = fields.filter((f) => f !== field);

@@ -148,2 +161,19 @@ }

const validated = { ...data };
if (this.allowedFields) {
const objKeys = Object.keys(validated);
const unknownKeys = objKeys.filter((key) => !this.allowedFields.includes(key));
if (unknownKeys.length) {
return [
{
code: "object.unknown",
type: "internal",
key: "$strict",
validator: "$strict",
message: "Data contains unknown fields!",
data: { unknown: unknownKeys }
},
{}
];
}
}
/**

@@ -170,3 +200,3 @@ * Hold current fields

// if field is not in included fields, remove it from fields
if (!this.includedFields.includes(field)) {
if (this.includedFields && !this.includedFields.includes(field)) {
fields = fields.filter((f) => f !== field);

@@ -173,0 +203,0 @@ }

@@ -27,3 +27,3 @@ import type { AbolishRule, AbolishSchema } from "./types";

*/
export declare function Schema(rules: AbolishSchema): AbolishSchema<Record<string, any>>;
export declare function Schema(rules: AbolishSchema): AbolishSchema;
/**

@@ -30,0 +30,0 @@ * Parse object value as rule

@@ -52,2 +52,2 @@ import type Abolish from "./Abolish";

export type AbolishRule = string | string[] | Record<string, any> | AbolishRule[];
export type AbolishSchema<Keys extends Record<string, any> = Record<string, any>> = Record<keyof Keys | string, AbolishRule>;
export type AbolishSchema<Keys extends Record<string, any> = Record<string, any>> = Record<keyof Keys | string, AbolishRule | boolean>;

@@ -5,3 +5,3 @@ /**

import type { $errorRule, $errorsRule, $skipRule, AbolishInlineValidator, AbolishRule } from "./types";
export declare module AvailableValidators {
export declare namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ $name: string;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ array: boolean | string | string[];

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ arraySize: number | number[];

@@ -6,3 +6,3 @@ import type { AbolishRule, AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -9,0 +9,0 @@ arrayValues: AbolishRule | AbolishCompiled;

@@ -6,3 +6,3 @@ import type { AbolishAsyncValidator, AbolishRule } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -9,0 +9,0 @@ arrayValuesAsync: AbolishRule | AbolishCompiled;

@@ -6,3 +6,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -9,0 +9,0 @@ inArray: inArrayOption;

@@ -6,3 +6,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -9,0 +9,0 @@ notInArray: notInArrayOption;

@@ -6,3 +6,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -9,0 +9,0 @@ age: AgeString;

@@ -6,3 +6,3 @@ import type { AbolishRule, AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -9,0 +9,0 @@ objectValues: AbolishRule | AbolishCompiled;

@@ -6,3 +6,3 @@ import type { AbolishAsyncValidator, AbolishRule } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -9,0 +9,0 @@ objectValuesAsync: AbolishRule | AbolishCompiled;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ objectValuesType: string | string[];

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ alphaNumeric: boolean;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ boolean: boolean;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ date: "cast" | {

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ email: "lowercase" | boolean;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ ipAddress: true;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ json: true;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ jsonDecode: true;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ jsonEncode: true;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ md5: true;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ number: true;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ regex: string | RegExp;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ string: true | string;

@@ -13,3 +13,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -16,0 +16,0 @@ url: UrlOption;

@@ -5,3 +5,3 @@ import type { AbolishValidator } from "../../src/types";

declare module "../../src/validator" {
module AvailableValidators {
namespace AvailableValidators {
interface Options {

@@ -8,0 +8,0 @@ same: string;

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