LogoLogo

Schema Benchmarks

    • home
      Home

    • download_2
      Download
    • timer
      Initialization
    • check_circle
      Validation
    • output_circle
      Parsing

    • article
      Blog
Code styleCode style
Normal styleNormal style
System themeSystem theme
Light themeLight theme
Dark themeDark theme
Expand sidebarExpand sidebar
@vinejs/vine/Compiled (minified)Compiled (minified)
Code styleCode style
Normal styleNormal style
System themeSystem theme
Light themeLight theme
Dark themeDark theme
github
GitHubGitHub
schemas/libraries/@vinejs/vine/download_compiled/minified.js
import"node:module";var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=function(e,t,n,r,i){for(t=t.split?t.split(`.`):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}:typeof define==`function`&&define.amd?define(function(){return function(e,t,n,r,i){for(t=t.split?t.split(`.`):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}}):n.dlv=function(e,t,n,r,i){for(t=t.split?t.split(`.`):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}})(e)})),u=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),d=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;function n(e){if(e==null)throw TypeError(`Expected a string but received a ${e}`);if(e.constructor.name!==`String`)throw TypeError(`Expected a string but received a ${e.constructor.name}`)}t.exports=e.default,t.exports.default=e.default})),f=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=u;var n=r(d());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}var a=`(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])`,o=`(${a}[.]){3}${a}`,s=RegExp(`^${o}\$`),c=`(?:[0-9a-fA-F]{1,4})`,l=RegExp(`^((?:${c}:){7}(?:${c}|:)|(?:${c}:){6}(?:${o}|:${c}|:)|(?:${c}:){5}(?::${o}|(:${c}){1,2}|:)|(?:${c}:){4}(?:(:${c}){0,1}:${o}|(:${c}){1,3}|:)|(?:${c}:){3}(?:(:${c}){0,2}:${o}|(:${c}){1,4}|:)|(?:${c}:){2}(?:(:${c}){0,3}:${o}|(:${c}){1,5}|:)|(?:${c}:){1}(?:(:${c}){0,4}:${o}|(:${c}){1,6}|:)|(?::((?::${c}){0,5}:${o}|(?::${c}){1,7}|:)))(%[0-9a-zA-Z.]{1,})?\$`);function u(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(e);var r=(i(t)===`object`?t.version:arguments[1])||``;return r?r.toString()===`4`?s.test(e):r.toString()===`6`?l.test(e):!1:u(e,{version:4})||u(e,{version:6})}t.exports=e.default,t.exports.default=e.default})),p=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}t.exports=e.default,t.exports.default=e.default})),m=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=l;var n=i(d()),r=i(p());function i(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Za-z0-9+/]+={0,2}$/,o=/^[A-Za-z0-9+/]+$/,s=/^[A-Za-z0-9_-]+={0,2}$/,c=/^[A-Za-z0-9_-]+$/;function l(e,t){var i;if((0,n.default)(e),t=(0,r.default)(t,{urlSafe:!1,padding:!((i=t)!=null&&i.urlSafe)}),e===``)return!0;if(t.padding&&e.length%4!=0)return!1;var l=t.urlSafe?t.padding?s:c:t.padding?a:o;return(!t.padding||e.length%4==0)&&l.test(e)}t.exports=e.default,t.exports.default=e.default})),h=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=a;var n=i(d()),r=i(m());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){(0,n.default)(e);var t=e.split(`.`);return t.length===3?t.reduce(function(e,t){return e&&(0,r.default)(t,{urlSafe:!0})},!0):!1}t.exports=e.default,t.exports.default=e.default})),g=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;function n(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function r(e,t){for(var r=0;r<t.length;r++){var i=t[r];if(e===i||n(i)&&i.test(e))return!0}return!1}t.exports=e.default,t.exports.default=e.default})),_=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=function(e,t){return e.indexOf(t)!==-1},t.exports=e.default,t.exports.default=e.default})),v=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=o;var n=i(d()),r=i(p());function i(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function o(e,t){(0,n.default)(e),t=(0,r.default)(t,a),t.allow_trailing_dot&&e[e.length-1]===`.`&&(e=e.substring(0,e.length-1)),t.allow_wildcard===!0&&e.indexOf(`*.`)===0&&(e=e.substring(2));var i=e.split(`.`),o=i[i.length-1];return t.require_tld&&(i.length<2||!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(o)||/\s/.test(o))||!t.allow_numeric_tld&&/^\d+$/.test(o)?!1:i.every(function(e){return!(e.length>63&&!t.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)||/[\uff01-\uff5e]/.test(e)||/^-|-$/.test(e)||!t.allow_underscores&&/_/.test(e))})}t.exports=e.default,t.exports.default=e.default})),y=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=C;var n=c(d()),r=c(g()),i=c(_()),a=c(v()),o=c(f()),s=c(p());function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){return b(e)||y(e,t)||m(e,t)||u()}function u(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(e,t){if(e){if(typeof e==`string`)return h(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function h(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function b(e){if(Array.isArray(e))return e}var x={protocols:[`http`,`https`,`ftp`],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},S=/^\[([^\]]+)\](?::([0-9]+))?$/;function C(e,t){if((0,n.default)(e),!e||/[\s<>]/.test(e)||e.indexOf(`mailto:`)===0||(t=(0,s.default)(t,x),t.validate_length&&e.length>t.max_allowed_length)||!t.allow_fragments&&(0,i.default)(e,`#`)||!t.allow_query_components&&((0,i.default)(e,`?`)||(0,i.default)(e,`&`)))return!1;var c,u,d,f,p,m,h=e.split(`#`),g;e=h.shift(),h=e.split(`?`),e=h.shift();var _=e.match(/^([a-z][a-z0-9+\-.]*):/i),v=!1,y=function(n){return v=!0,c=n.toLowerCase(),t.require_valid_protocol&&t.protocols.indexOf(c)===-1?!1:e.substring(_[0].length)};if(_){var b=_[1],C=e.substring(_[0].length);if(C.slice(0,2)!==`//`){var w=C.indexOf(`/`),T=w===-1?C:C.substring(0,w),E=T.indexOf(`@`);if(E!==-1){var D=T.substring(0,E),O=/^[a-zA-Z0-9\-_.%:]*$/.test(D),k=/%[0-9a-fA-F]{2}/.test(D);if(O&&!k){if(t.require_protocol)return!1}else if(e=y(b),e===!1)return!1}else if(/^[0-9]/.test(C)){if(t.require_protocol)return!1}else if(e=y(b),e===!1)return!1}else if(e=y(b),e===!1)return!1}else if(t.require_protocol)return!1;if(e.slice(0,2)===`//`){if(!v&&!t.allow_protocol_relative_urls)return!1;e=e.slice(2)}if(e===``)return!1;if(h=e.split(`/`),e=h.shift(),e===``&&!t.require_host)return!0;if(h=e.split(`@`),h.length>1){if(t.disallow_auth||h[0]===``||(u=h.shift(),u.indexOf(`:`)>=0&&u.split(`:`).length>2))return!1;var ee=l(u.split(`:`),2),te=ee[0],ne=ee[1];if(te===``&&ne===``)return!1}f=h.join(`@`),m=null,g=null;var re=f.match(S);if(re?(d=``,g=re[1],m=re[2]||null):(h=f.split(`:`),d=h.shift(),h.length&&(m=h.join(`:`))),m!==null&&m.length>0){if(p=parseInt(m,10),!/^[0-9]+$/.test(m)||p<=0||p>65535)return!1}else if(t.require_port)return!1;return t.host_whitelist?(0,r.default)(d,t.host_whitelist):d===``&&!t.require_host?!0:!(!(0,o.default)(d)&&!(0,a.default)(d,t)&&(!g||!(0,o.default)(g,6))||(d||=g,t.host_blacklist&&(0,r.default)(d,t.host_blacklist)))}t.exports=e.default,t.exports.default=e.default})),b=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=a;var n=r(d());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),x=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0,e.default=function(e,t){return e.some(function(e){return t===e})},t.exports=e.default,t.exports.default=e.default})),S=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=c,e.locales=void 0;var t=r(d()),n=r(x());function r(e){return e&&e.__esModule?e:{default:e}}var i={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})\d{22}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function a(e){return!(e.filter(function(e){return!(e in i)}).length>0)}function o(e,t){var r=e.replace(/[\s\-]+/gi,``).toUpperCase(),o=r.slice(0,2).toUpperCase(),s=o in i;return t.whitelist&&(!a(t.whitelist)||!(0,n.default)(t.whitelist,o))||t.blacklist&&(0,n.default)(t.blacklist,o)?!1:s&&i[o].test(r)}function s(e){var t=e.replace(/[^A-Z0-9]+/gi,``).toUpperCase();return(t.slice(4)+t.slice(0,4)).replace(/[A-Z]/g,function(e){return e.charCodeAt(0)-55}).match(/\d{1,7}/g).reduce(function(e,t){return Number(e+t)%97},``)===1}function c(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,t.default)(e),o(e,n)&&s(e)}e.locales=Object.keys(i)})),C=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=a;var n=r(d());function r(e){return e&&e.__esModule?e:{default:e}}var i={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,loose:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};function a(e,t){return(0,n.default)(e),t??=`all`,t in i?i[t].test(e):!1}t.exports=e.default,t.exports.default=e.default})),w=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=a;var n=r(d());function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[\x00-\x7F]+$/;function a(e){return(0,n.default)(e),i.test(e)}t.exports=e.default,t.exports.default=e.default})),T=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=a;var n=r(d());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}function a(e,t){(0,n.default)(e);var r,a;i(t)===`object`?(r=t.min||0,a=t.max):(r=arguments[1],a=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=r&&(a===void 0||o<=a)}t.exports=e.default,t.exports.default=e.default})),E=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=C;var n=c(d()),r=c(g()),i=c(T()),a=c(v()),o=c(f()),s=c(p());function c(e){return e&&e.__esModule?e:{default:e}}var l={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:``,ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},u=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,m=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,h=/^[a-z\d]+$/,_=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,y=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,b=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,x=254;function S(e){var t=e.replace(/^"(.+)"$/,`$1`);return!(!t.trim()||/[\.";<>]/.test(t)&&(t===e||t.split(`"`).length!==t.split(`\\"`).length))}function C(e,t){if((0,n.default)(e),t=(0,s.default)(t,l),t.require_display_name||t.allow_display_name){var c=e.match(u);if(c){var d=c[1];if(e=e.replace(d,``).replace(/(^<|>$)/g,``),d.endsWith(` `)&&(d=d.slice(0,-1)),!S(d))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>x)return!1;var f=e.split(`@`),p=f.pop(),g=p.toLowerCase();if(t.host_blacklist.length>0&&(0,r.default)(g,t.host_blacklist)||t.host_whitelist.length>0&&!(0,r.default)(g,t.host_whitelist))return!1;var v=f.join(`@`);if(t.domain_specific_validation&&(g===`gmail.com`||g===`googlemail.com`)){v=v.toLowerCase();var C=v.split(`+`)[0];if(!(0,i.default)(C.replace(/\./g,``),{min:6,max:30}))return!1;for(var w=C.split(`.`),T=0;T<w.length;T++)if(!h.test(w[T]))return!1}if(t.ignore_max_length===!1&&(!(0,i.default)(v,{max:64})||!(0,i.default)(p,{max:254})))return!1;if(!(0,a.default)(p,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,o.default)(p)){if(!p.startsWith(`[`)||!p.endsWith(`]`))return!1;var E=p.slice(1,-1);if(E.length===0||!(0,o.default)(E))return!1}}if(t.blacklisted_chars&&v.search(RegExp(`[${t.blacklisted_chars}]+`,`g`))!==-1)return!1;if(v[0]===`"`&&v[v.length-1]===`"`)return v=v.slice(1,v.length-1),t.allow_utf8_local_part?b.test(v):_.test(v);for(var D=t.allow_utf8_local_part?y:m,O=v.split(`.`),k=0;k<O.length;k++)if(!D.test(O[k]))return!1;return!0}t.exports=e.default,t.exports.default=e.default})),D=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.farsiLocales=e.englishLocales=e.dotDecimal=e.decimal=e.commaDecimal=e.bengaliLocales=e.arabicLocales=e.alphanumeric=e.alpha=void 0;for(var t=e.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"kk-KZ":/^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ko-KR":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/,"ta-IN":/^[\u0B80-\u0BFF]+$/i,"te-IN":/^[\u0C00-\u0C7F]+$/i,"kn-IN":/^[\u0C80-\u0CFF]+$/i,"ml-IN":/^[\u0D00-\u0D7F]+$/i,"gu-IN":/^[\u0A80-\u0AFF]+$/i,"pa-IN":/^[\u0A00-\u0A7F]+$/i,"or-IN":/^[\u0B00-\u0B7F]+$/i},n=e.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"kk-KZ":/^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,"ko-KR":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/,"ta-IN":/^[0-9\u0B80-\u0BFF.]+$/i,"te-IN":/^[0-9\u0C00-\u0C7F.]+$/i,"kn-IN":/^[0-9\u0C80-\u0CFF.]+$/i,"ml-IN":/^[0-9\u0D00-\u0D7F.]+$/i,"gu-IN":/^[0-9\u0A80-\u0AFF.]+$/i,"pa-IN":/^[0-9\u0A00-\u0A7F.]+$/i,"or-IN":/^[0-9\u0B00-\u0B7F.]+$/i},r=e.decimal={"en-US":`.`,ar:`٫`},i=e.englishLocales=[`AU`,`GB`,`HK`,`IN`,`NZ`,`ZA`,`ZM`],a,o=0;o<i.length;o++)a=`en-${i[o]}`,t[a]=t[`en-US`],n[a]=n[`en-US`],r[a]=r[`en-US`];for(var s=e.arabicLocales=[`AE`,`BH`,`DZ`,`EG`,`IQ`,`JO`,`KW`,`LB`,`LY`,`MA`,`QM`,`QA`,`SA`,`SD`,`SY`,`TN`,`YE`],c,l=0;l<s.length;l++)c=`ar-${s[l]}`,t[c]=t.ar,n[c]=n.ar,r[c]=r.ar;for(var u=e.farsiLocales=[`IR`,`AF`],d,f=0;f<u.length;f++)d=`fa-${u[f]}`,n[d]=n.fa,r[d]=r.ar;for(var p=e.bengaliLocales=[`BD`,`IN`],m,h=0;h<p.length;h++)m=`bn-${p[h]}`,t[m]=t.bn,n[m]=n.bn,r[m]=r[`en-US`];for(var g=e.dotDecimal=[`ar-EG`,`ar-LB`,`ar-LY`],_=e.commaDecimal=`bg-BG.cs-CZ.da-DK.de-DE.el-GR.en-ZM.eo.es-ES.fr-CA.fr-FR.gu-IN.hi-IN.hu-HU.id-ID.it-IT.kk-KZ.kn-IN.ku-IQ.ml-IN.nb-NO.nl-NL.nn-NO.or-IN.pa-IN.pl-PL.pt-PT.ru-RU.si-LK.sl-SI.sr-RS.sr-RS@latin.sv-SE.ta-IN.te-IN.tr-TR.uk-UA.vi-VN`.split(`.`),v=0;v<g.length;v++)r[g[v]]=r[`en-US`];for(var y=0;y<_.length;y++)r[_[y]]=`,`;t[`fr-CA`]=t[`fr-FR`],n[`fr-CA`]=n[`fr-FR`],t[`pt-BR`]=t[`pt-PT`],n[`pt-BR`]=n[`pt-PT`],r[`pt-BR`]=r[`pt-PT`],t[`pl-Pl`]=t[`pl-PL`],n[`pl-Pl`]=n[`pl-PL`],r[`pl-Pl`]=r[`pl-PL`],t[`fa-AF`]=t.fa})),O=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i,e.locales=void 0;var t=r(d()),n=D();function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`en-US`,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,t.default)(e);var a=e,o=i.ignore;if(o)if(o instanceof RegExp)a=a.replace(o,``);else if(typeof o==`string`)a=a.replace(RegExp(`[${o.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,`\\$&`)}]`,`g`),``);else throw Error(`ignore should be instance of a String or RegExp`);if(r in n.alpha)return n.alpha[r].test(a);throw Error(`Invalid locale '${r}'`)}e.locales=Object.keys(n.alpha)})),k=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=f;var n=a(d()),r=a(p()),i=a(_());function a(e){return e&&e.__esModule?e:{default:e}}var o=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,s=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,c=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,l=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,u={checkDMS:!1};function f(e,t){if((0,n.default)(e),t=(0,r.default)(t,u),!(0,i.default)(e,`,`))return!1;var a=e.split(`,`);return a[0].startsWith(`(`)&&!a[1].endsWith(`)`)||a[1].endsWith(`)`)&&!a[0].startsWith(`(`)?!1:t.checkDMS?c.test(a[0])&&l.test(a[1]):o.test(a[0])&&s.test(a[1])}t.exports=e.default,t.exports.default=e.default})),ee=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=u;var n=o(p()),r=o(d()),i=o(x()),a=D();function o(e){return e&&e.__esModule?e:{default:e}}function s(e){return RegExp(`^[-+]?([0-9]+)?(\\${a.decimal[e.locale]}[0-9]{${e.decimal_digits}})${e.force_decimal?``:`?`}\$`)}var c={force_decimal:!1,decimal_digits:`1,`,locale:`en-US`},l=[``,`-`,`+`];function u(e,t){if((0,r.default)(e),t=(0,n.default)(t,c),t.locale in a.decimal)return!(0,i.default)(l,e.replace(/ /g,``))&&s(t).test(e);throw Error(`Invalid locale '${t.locale}'`)}t.exports=e.default,t.exports.default=e.default})),te=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=c;var n=i(d()),r=i(p());function i(e){return e&&e.__esModule?e:{default:e}}var a=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i,o=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i,s={require_hashtag:!1};function c(e,t){return(0,n.default)(e),t=(0,r.default)(t,s),(t.require_hashtag?o:a).test(e)}t.exports=e.default,t.exports.default=e.default})),ne=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i;var n=r(d());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){(0,n.default)(e);for(var t=e.replace(/[- ]+/g,``),r=0,i,a,o,s=t.length-1;s>=0;s--)i=t.substring(s,s+1),a=parseInt(i,10),o?(a*=2,a>=10?r+=a%10+1:r+=a):r+=a,o=!o;return!!(r%10==0&&t)}t.exports=e.default,t.exports.default=e.default})),re=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=s;var n=i(d()),r=i(ne());function i(e){return e&&e.__esModule?e:{default:e}}var a={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},o=function(){var e=[];for(var t in a)a.hasOwnProperty(t)&&e.push(a[t]);return e}();function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(e);var i=t.provider,s=e.replace(/[- ]+/g,``);if(i&&i.toLowerCase()in a){if(!a[i.toLowerCase()].test(s))return!1}else if(i&&!(i.toLowerCase()in a))throw Error(`${i} is not a valid credit card provider.`);else if(!o.some(function(e){return e.test(s)}))return!1;return(0,r.default)(e)}t.exports=e.default,t.exports.default=e.default})),ie=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isSameOrAfter=r()})(e,(function(){return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}))})),ae=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isSameOrBefore=r()})(e,(function(){return function(e,t){t.prototype.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)}}}))})),oe=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i,e.locales=void 0;var t=r(d()),n=D();function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`en-US`,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,t.default)(e);var a=e,o=i.ignore;if(o)if(o instanceof RegExp)a=a.replace(o,``);else if(typeof o==`string`)a=a.replace(RegExp(`[${o.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,`\\$&`)}]`,`g`),``);else throw Error(`ignore should be instance of a String or RegExp`);if(r in n.alphanumeric)return n.alphanumeric[r].test(a);throw Error(`Invalid locale '${r}'`)}e.locales=Object.keys(n.alphanumeric)})),se=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i,e.locales=void 0;var t=n(d());function n(e){return e&&e.__esModule?e:{default:e}}var r={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$|^[A-Z]\d{6}[A-Z]{2}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$|^[A-Z]\d{8}$/,ZA:/^[TAMD]\d{8}$/};e.locales=Object.keys(r);function i(e,n){(0,t.default)(e);var i=e.replace(/\s/g,``).toUpperCase();return n.toUpperCase()in r&&r[n].test(i)}})),ce=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.iso7064Check=t,e.luhnCheck=n,e.reverseMultiplyAndSum=r,e.verhoeffCheck=i;function t(e){for(var t=10,n=0;n<e.length-1;n++)t=(parseInt(e[n],10)+t)%10==0?20%11:(parseInt(e[n],10)+t)%10*2%11;return t=t===1?0:11-t,t===parseInt(e[10],10)}function n(e){for(var t=0,n=!1,r=e.length-1;r>=0;r--){if(n){var i=parseInt(e[r],10)*2;i>9?t+=i.toString().split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t){return e+t},0):t+=i}else t+=parseInt(e[r],10);n=!n}return t%10==0}function r(e,t){for(var n=0,r=0;r<e.length;r++)n+=e[r]*(t-r);return n}function i(e){for(var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],n=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],r=e.split(``).reverse().join(``),i=0,a=0;a<r.length;a++)i=t[i][n[a%8][parseInt(r[a],10)]];return i===0}})),le=o((e=>{function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}Object.defineProperty(e,`__esModule`,{value:!0}),e.default=s,e.vatMatchers=void 0;var n=a(d()),r=i(ce());function i(e,n){if(typeof WeakMap==`function`)var r=new WeakMap,a=new WeakMap;return(i=function(e,n){if(!n&&e&&e.__esModule)return e;var i,o,s={__proto__:null,default:e};if(e===null||t(e)!=`object`&&typeof e!=`function`)return s;if(i=n?a:r){if(i.has(e))return i.get(e);i.set(e,s)}for(var c in e)c!==`default`&&{}.hasOwnProperty.call(e,c)&&((o=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(o.get||o.set)?i(s,c,o):s[c]=e[c]);return s})(e,n)}function a(e){return e&&e.__esModule?e:{default:e}}var o=e.vatMatchers={AT:function(e){return/^(AT)?U\d{8}$/.test(e)},BE:function(e){return/^(BE)?\d{10}$/.test(e)},BG:function(e){return/^(BG)?\d{9,10}$/.test(e)},HR:function(e){return/^(HR)?\d{11}$/.test(e)},CY:function(e){return/^(CY)?\w{9}$/.test(e)},CZ:function(e){return/^(CZ)?\d{8,10}$/.test(e)},DK:function(e){return/^(DK)?\d{8}$/.test(e)},EE:function(e){return/^(EE)?\d{9}$/.test(e)},FI:function(e){return/^(FI)?\d{8}$/.test(e)},FR:function(e){return/^(FR)([A-Z0-9]{2}\d{9})$/.test(e)},DE:function(e){return/^(DE)?\d{9}$/.test(e)},EL:function(e){return/^(EL)?\d{9}$/.test(e)},HU:function(e){return/^(HU)?\d{8}$/.test(e)},IE:function(e){return/^(IE)?\d{7}\w{1}(W)?$/.test(e)},IT:function(e){return/^(IT)?\d{11}$/.test(e)},LV:function(e){return/^(LV)?\d{11}$/.test(e)},LT:function(e){return/^(LT)?\d{9,12}$/.test(e)},LU:function(e){return/^(LU)?\d{8}$/.test(e)},MT:function(e){return/^(MT)?\d{8}$/.test(e)},NL:function(e){return/^(NL)?\d{9}B\d{2}$/.test(e)},PL:function(e){return/^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(e)},PT:function(e){var t=e.match(/^(PT)?(\d{9})$/);if(!t)return!1;var n=t[2],i=11-r.reverseMultiplyAndSum(n.split(``).slice(0,8).map(function(e){return parseInt(e,10)}),9)%11;return i>9?parseInt(n[8],10)===0:i===parseInt(n[8],10)},RO:function(e){return/^(RO)?\d{2,10}$/.test(e)},SK:function(e){return/^(SK)?\d{10}$/.test(e)},SI:function(e){return/^(SI)?\d{8}$/.test(e)},ES:function(e){return/^(ES)?\w\d{7}[A-Z]$/.test(e)},SE:function(e){return/^(SE)?\d{12}$/.test(e)},AL:function(e){return/^(AL)?\w{9}[A-Z]$/.test(e)},MK:function(e){return/^(MK)?\d{13}$/.test(e)},AU:function(e){if(!e.match(/^(AU)?(\d{11})$/))return!1;var t=[10,1,3,5,7,9,11,13,15,17,19];e=e.replace(/^AU/,``);for(var n=(parseInt(e.slice(0,1),10)-1).toString()+e.slice(1),r=0,i=0;i<11;i++)r+=t[i]*n.charAt(i);return r!==0&&r%89==0},BY:function(e){return/^(УНП )?\d{9}$/.test(e)},CA:function(e){return/^(CA)?\d{9}$/.test(e)},IS:function(e){return/^(IS)?\d{5,6}$/.test(e)},IN:function(e){return/^(IN)?\d{15}$/.test(e)},ID:function(e){return/^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(e)},IL:function(e){return/^(IL)?\d{9}$/.test(e)},KZ:function(e){return/^(KZ)?\d{12}$/.test(e)},NZ:function(e){return/^(NZ)?\d{9}$/.test(e)},NG:function(e){return/^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(e)},NO:function(e){return/^(NO)?\d{9}MVA$/.test(e)},PH:function(e){return/^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(e)},RU:function(e){return/^(RU)?(\d{10}|\d{12})$/.test(e)},SM:function(e){return/^(SM)?\d{5}$/.test(e)},SA:function(e){return/^(SA)?\d{15}$/.test(e)},RS:function(e){return/^(RS)?\d{9}$/.test(e)},CH:function(e){return/^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(e)&&function(e){var t=e.pop(),n=[5,4,3,2,7,6,5,4];return t===(11-e.reduce(function(e,t,r){return e+t*n[r]},0)%11)%11}(e.match(/\d/g).map(function(e){return+e}))},TR:function(e){return/^(TR)?\d{10}$/.test(e)},UA:function(e){return/^(UA)?\d{12}$/.test(e)},GB:function(e){return/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(e)},UZ:function(e){return/^(UZ)?\d{9}$/.test(e)},AR:function(e){return/^(AR)?\d{11}$/.test(e)},BO:function(e){return/^(BO)?\d{7}$/.test(e)},BR:function(e){return/^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(e)},CL:function(e){return/^(CL)?\d{8}-\d{1}$/.test(e)},CO:function(e){return/^(CO)?\d{10}$/.test(e)},CR:function(e){return/^(CR)?\d{9,12}$/.test(e)},EC:function(e){return/^(EC)?\d{13}$/.test(e)},SV:function(e){return/^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(e)},GT:function(e){return/^(GT)?\d{7}-\d{1}$/.test(e)},HN:function(e){return/^(HN)?$/.test(e)},MX:function(e){return/^(MX)?\w{3,4}\d{6}\w{3}$/.test(e)},NI:function(e){return/^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(e)},PA:function(e){return/^(PA)?$/.test(e)},PY:function(e){return/^(PY)?\d{6,8}-\d{1}$/.test(e)},PE:function(e){return/^(PE)?\d{11}$/.test(e)},DO:function(e){return/^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(e)},UY:function(e){return/^(UY)?\d{12}$/.test(e)},VE:function(e){return/^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(e)}};function s(e,t){if((0,n.default)(e),(0,n.default)(t),t in o)return o[t](e);throw Error(`Invalid country code: '${t}'`)}})),ue=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal;if(this.day=e.match(/\d+/)[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,``)===e&&(this.day=n)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c<s;c+=1){var l=a[c],u=f[l],d=u&&u[0],p=u&&u[1];a[c]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var o=i.regex,c=i.parser,l=e.slice(r),u=o.exec(l)[0];c.call(t,u),e=e.replace(u,``)}}return function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if(typeof s==`string`){var c=!0===a[2],l=!0===a[3],u=c||l,d=a[2];l&&(d=a[2]),o=this.$locale(),!c&&d&&(o=n.Ls[d]),this.$d=function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),de=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=c,e.locales=void 0;var t=n(d());function n(e){return e&&e.__esModule?e:{default:e}}var r=/^\d{3}$/,i=/^\d{4}$/,a=/^\d{5}$/,o=/^\d{6}$/,s={AD:/^AD\d{3}$/,AT:i,AU:i,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BD:/^([1-8][0-9]{3}|9[0-4][0-9]{2})$/,BE:i,BG:i,BR:/^\d{5}-?\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:i,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CO:/^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\d{4})$/,CZ:/^\d{3}\s?\d{2}$/,DE:a,DK:i,DO:a,DZ:a,EE:a,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:a,FR:/^(?:(?:0[1-9]|[1-8]\d|9[0-5])\d{3}|97[1-46]\d{2})$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:i,ID:a,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:r,IT:a,JP:/^\d{3}\-\d{4}$/,KE:a,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:i,LV:/^LV\-\d{4}$/,LK:a,MG:r,MX:a,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:a,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:i,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:i,PK:a,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:o,RU:o,SA:a,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:o,SI:i,SK:/^\d{3}\s?\d{2}$/,TH:a,TN:i,TW:/^\d{3}(\d{2,3})?$/,UA:a,US:/^\d{5}(-\d{4})?$/,ZA:i,ZM:a};e.locales=Object.keys(s);function c(e,n){if((0,t.default)(e),n in s)return s[n].test(e);if(n===`any`){for(var r in s)if(s.hasOwnProperty(r)&&s[r].test(e))return!0;return!1}throw Error(`Invalid locale '${n}'`)}})),fe=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i,e.locales=void 0;var t=n(d());function n(e){return e&&e.__esModule?e:{default:e}}var r={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?([79][1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"ar-QA":/^(\+?974|0)?([3567]\d{7})$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|7|6|5|4)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7[1-9]\d{8}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?0[79][567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-GT":/^(\+?502)?[2|6|7]\d{7}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+996\s?)?(22[0-9]|50[0-9]|55[0-9]|70[0-9]|75[0-9]|77[0-9]|880|990|995|996|997|998)\s?\d{3}\s?\d{3}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+?244)?9\d{8}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[2-9]\d{7}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38)?0(50|6[36-8]|7[357]|9[1-9])\d{7}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/,"mk-MK":/^(\+?389|0)?((?:2[2-9]\d{6}|(?:3[1-4]|4[2-8])\d{6}|500\d{5}|5[2-9]\d{6}|7[0-9][2-9]\d{5}|8[1-9]\d{6}|800\d{5}|8009\d{4}))$/};r[`en-CA`]=r[`en-US`],r[`fr-CA`]=r[`en-CA`],r[`fr-BE`]=r[`nl-BE`],r[`zh-HK`]=r[`en-HK`],r[`zh-MO`]=r[`en-MO`],r[`ga-IE`]=r[`en-IE`],r[`fr-CH`]=r[`de-CH`],r[`it-CH`]=r[`fr-CH`];function i(e,n,i){if((0,t.default)(e),i&&i.strictMode&&!e.startsWith(`+`))return!1;if(Array.isArray(n))return n.some(function(t){return!!(r.hasOwnProperty(t)&&r[t].test(e))});if(n in r)return r[n].test(e);if(!n||n===`any`){for(var a in r)if(r.hasOwnProperty(a)&&r[a].test(e))return!0;return!1}throw Error(`Invalid locale '${n}'`)}e.locales=Object.keys(r)})),pe=c(l(),1),A=c(u(),1),me=c(f(),1),he=c(h(),1),ge=c(y(),1),_e=c(b(),1),ve=c(S(),1),ye=c(C(),1),be=c(w(),1),xe=c(E(),1),Se=c(O(),1),Ce=c(k(),1),we=c(ee(),1),Te=c(te(),1),Ee=c(re(),1),De=c(ie(),1),Oe=c(ae(),1),ke=c(oe(),1),Ae=c(se(),1),je=c(le(),1),Me=c(ue(),1),Ne=c(de(),1),Pe=c(fe(),1);const Fe=[`1`,1,`true`,!0,`on`],Ie=[`0`,0,`false`,!1],Le=[`YYYY-MM-DD`,`YYYY-MM-DD HH:mm:ss`],Re=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;A.default.extend(Me.default),A.default.extend(De.default),A.default.extend(Oe.default);const j={exists(e){return e!=null},isMissing(e){return!this.exists(e)},isTrue(e){return Fe.includes(e)},isFalse(e){return Ie.includes(e)},isString(e){return typeof e==`string`},isObject(e){return!!(e&&typeof e==`object`&&!Array.isArray(e))},hasKeys(e,t){for(let n of t)if(!(n in e))return!1;return!0},isArray(e){return Array.isArray(e)},isNumeric(e){return!Number.isNaN(Number(e))},asNumber(e){return e===null?NaN:Number(e)},asBoolean(e){return this.isTrue(e)?!0:this.isFalse(e)?!1:null},asDayJS(e,t){let n=!1,r=!1,i=t||Le;Array.isArray(i)?(i=[...i],n=i.includes(`x`),r=i.includes(`iso8601`)):typeof i!=`string`&&(i={...i},n=i.format===`x`,r=i.format===`iso`);let a=n?j.asNumber(e):e,o;return o=n&&!Number.isNaN(a)?(0,A.default)(a):(0,A.default)(e,i,!0),!o.isValid()&&r&&(o=(0,A.default)(e)),{dateTime:o,formats:i}},compareValues(e,t){let n=e;return typeof t==`boolean`?n=this.asBoolean(e):typeof t==`number`&&(n=this.asNumber(e)),{isEqual:n===t,casted:n}},isEmail:xe.default.default,isURL:ge.default.default,isAlpha:Se.default.default,isAlphaNumeric:ke.default.default,isIP:me.default.default,isUUID:ye.default.default,isAscii:be.default.default,isCreditCard:Ee.default.default,isIBAN:ve.default.default,isJWT:he.default.default,isLatLong:Ce.default.default,isMobilePhone:Pe.default.default,isPassportNumber:Ae.default.default,isVAT:je.default.default,isPostalCode:Ne.default.default,isSlug:_e.default.default,isDecimal:we.default.default,mobileLocales:Pe.locales,postalCountryCodes:Ne.locales,passportCountryCodes:`AM.AR.AT.AU.AZ.BE.BG.BR.BY.CA.CH.CY.CZ.DE.DK.DZ.ES.FI.FR.GB.GR.HR.HU.IE.IN.ID.IR.IS.IT.JM.JP.KR.KZ.LI.LT.LU.LV.LY.MT.MZ.MY.MX.NL.NZ.PH.PK.PL.PT.RO.RU.SE.SL.SK.TH.TR.UA.US`.split(`.`),isULID(e){return typeof e!=`string`||e[0]>`7`?!1:Re.test(e)},isHexColor:e=>e.startsWith(`#`)?Te.default.default(e):!1,isActiveURL:async e=>{let{resolve4:t,resolve6:n}=await import(`node:dns/promises`);try{let{hostname:r}=new URL(e);return(await n(r)).length?!0:(await t(r)).length>0}catch{return!1}},isDistinct:(e,t)=>{let n=new Set;if(!t){for(let t of e)if(j.exists(t)){if(n.has(t))return!1;n.add(t)}return!0}let r=Array.isArray(t)?t:[t];for(let t of e)if(j.isObject(t)&&j.hasKeys(t,r)){let e=r.map(e=>t[e]).join(`_`);if(n.has(e))return!1;n.add(e)}return!0},getNestedValue(e,t){return e.indexOf(`.`)>-1?(0,pe.default)(t.data,e):t.parent[e]},optional(e){let t={};for(let n of Object.keys(e)){let r=e[n].clone();`optional`in r&&typeof r.optional==`function`&&(r=r.optional()),t[n]=r}return t}};var ze=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t||{}}#n(e,t){return e.includes(`{{`)?e.replace(/(\\)?{{(.*?)}}/g,(e,n,r)=>{let i=r.trim().split(`.`),a=t;for(;i.length;){if(typeof a!=`object`||!a)return;let e=i.shift();a=Object.hasOwn(a,e)?a[e]:void 0}return a}):e}getMessage(e,t,n,r){let i=this.#t[n.name]||n.name,a=this.#e[`${n.getFieldPath()}.${t}`];if(a)return this.#n(a,{field:i,...r});let o=this.#e[`${n.wildCardPath}.${t}`];if(o)return this.#n(o,{field:i,...r});let s=this.#e[t];return s?this.#n(s,{field:i,...r}):this.#n(e,{field:i,...r})}toJSON(){return{messages:this.#e,fields:this.#t}}},Be=class extends Error{status=422;code=`E_VALIDATION_ERROR`;constructor(e,t){super(`Validation failure`,t),this.messages=e;let n=this.constructor;`captureStackTrace`in Error&&Error.captureStackTrace(this,n)}get[Symbol.toStringTag](){return this.constructor.name}toString(){return`${this.name} [${this.code}]: ${this.message}`}};const Ve=Be;var He=class{hasErrors=!1;errors=[];report(e,t,n,r){let i={message:e,rule:t,field:n.getFieldPath()};r&&(i.meta=r),n.isArrayMember&&(i.index=n.name),this.hasErrors=!0,this.errors.push(i)}createError(){return new Ve(this.errors)}};const M={required:`The {{ field }} field must be defined`,string:`The {{ field }} field must be a string`,email:`The {{ field }} field must be a valid email address`,mobile:`The {{ field }} field must be a valid mobile phone number`,creditCard:`The {{ field }} field must be a valid {{ providersList }} card number`,passport:`The {{ field }} field must be a valid passport number`,postalCode:`The {{ field }} field must be a valid postal code`,regex:`The {{ field }} field format is invalid`,ascii:`The {{ field }} field must only contain ASCII characters`,iban:`The {{ field }} field must be a valid IBAN number`,jwt:`The {{ field }} field must be a valid JWT token`,coordinates:`The {{ field }} field must contain latitude and longitude coordinates`,url:`The {{ field }} field must be a valid URL`,activeUrl:`The {{ field }} field must be a valid URL`,alpha:`The {{ field }} field must contain only letters`,alphaNumeric:`The {{ field }} field must contain only letters and numbers`,minLength:`The {{ field }} field must have at least {{ min }} characters`,maxLength:`The {{ field }} field must not be greater than {{ max }} characters`,fixedLength:`The {{ field }} field must be {{ size }} characters long`,confirmed:`The {{ originalField }} field and {{ otherField }} field must be the same`,endsWith:`The {{ field }} field must end with {{ substring }}`,startsWith:`The {{ field }} field must start with {{ substring }}`,sameAs:`The {{ field }} field and {{ otherField }} field must be the same`,notSameAs:`The {{ field }} field and {{ otherField }} field must be different`,in:`The selected {{ field }} is invalid`,notIn:`The selected {{ field }} is invalid`,ipAddress:`The {{ field }} field must be a valid IP address`,vat:`The {{ field }} field must be a valid VAT number`,uuid:`The {{ field }} field must be a valid UUID`,ulid:`The {{ field }} field must be a valid ULID`,hexCode:`The {{ field }} field must be a valid hex color code`,boolean:`The value must be a boolean`,number:`The {{ field }} field must be a number`,"number.in":`The selected {{ field }} is not in {{ values }}`,min:`The {{ field }} field must be at least {{ min }}`,max:`The {{ field }} field must not be greater than {{ max }}`,range:`The {{ field }} field must be between {{ min }} and {{ max }}`,positive:`The {{ field }} field must be positive`,negative:`The {{ field }} field must be negative`,nonNegative:`The {{ field }} field must be positive or zero`,nonPositive:`The {{ field }} field must be negative or zero`,decimal:`The {{ field }} field must have {{ digits }} decimal places`,withoutDecimals:`The {{ field }} field must be an integer`,accepted:`The {{ field }} field must be accepted`,enum:`The selected {{ field }} is invalid`,literal:`The {{ field }} field must be {{ expectedValue }}`,object:`The {{ field }} field must be an object`,array:`The {{ field }} field must be an array`,"array.minLength":`The {{ field }} field must have at least {{ min }} items`,"array.maxLength":`The {{ field }} field must not have more than {{ max }} items`,"array.fixedLength":`The {{ field }} field must contain {{ size }} items`,notEmpty:`The {{ field }} field must not be empty`,distinct:`The {{ field }} field has duplicate values`,record:`The {{ field }} field must be an object`,"record.minLength":`The {{ field }} field must have at least {{ min }} items`,"record.maxLength":`The {{ field }} field must not have more than {{ max }} items`,"record.fixedLength":`The {{ field }} field must contain {{ size }} items`,tuple:`The {{ field }} field must be an array`,union:`Invalid value provided for {{ field }} field`,unionGroup:`Invalid value provided for {{ field }} field`,unionOfTypes:`Invalid value provided for {{ field }} field`,date:`The {{ field }} field must be a datetime value`,"date.equals":`The {{ field }} field must be a date equal to {{ expectedValue }}`,"date.after":`The {{ field }} field must be a date after {{ expectedValue }}`,"date.before":`The {{ field }} field must be a date before {{ expectedValue }}`,"date.afterOrEqual":`The {{ field }} field must be a date after or equal to {{ expectedValue }}`,"date.beforeOrEqual":`The {{ field }} field must be a date before or equal to {{ expectedValue }}`,"date.sameAs":`The {{ field }} field and {{ otherField }} field must be the same`,"date.notSameAs":`The {{ field }} field and {{ otherField }} field must be different`,"date.afterField":`The {{ field }} field must be a date after {{ otherField }}`,"date.afterOrSameAs":`The {{ field }} field must be a date after or same as {{ otherField }}`,"date.beforeField":`The {{ field }} field must be a date before {{ otherField }}`,"date.beforeOrSameAs":`The {{ field }} field must be a date before or same as {{ otherField }}`,"date.weekend":`The {{ field }} field is not a weekend`,"date.weekday":`The {{ field }} field is not a weekday`,nativeFile:`The {{ field }} field must be a valid file`,"nativeFile.minSize":`The {{ field }} field must be at least {{ min }} bytes in size`,"nativeFile.maxSize":`The {{ field }} field must not exceed {{ max }} bytes in size`,"nativeFile.mimeTypes":`The {{ field }} mime type is invalid`},Ue={"":`data`},We={};var Ge=class{static instanceMacros=new Set;static macro(e,t){this.prototype[e]=t}static instanceProperty(e,t){let n=this;if(!n.hasOwnProperty(`instanceMacros`)){let e=n.instanceMacros;Object.defineProperty(n,`instanceMacros`,{value:new Set(e),configurable:!0,enumerable:!0,writable:!0})}n.instanceMacros.add({key:e,value:t})}static getter(e,t,n=!1){Object.defineProperty(this.prototype,e,{get(){let r=t.call(this);return n&&Object.defineProperty(this,e,{configurable:!1,enumerable:!1,value:r,writable:!1}),r},configurable:!0,enumerable:!1})}constructor(){let e=this;this.constructor.instanceMacros.forEach(({key:t,value:n})=>{e[t]=typeof n==`function`?n.bind(this):n})}};const Ke=/[\p{Lu}]/u,qe=/[\p{Ll}]/u,Je=/^[\p{Lu}](?![\p{Lu}])/u,N=/[_.\- ]+/,Ye=/([\p{Alpha}\p{N}_]|$)/u,Xe=RegExp(`^`+N.source),Ze=new RegExp(N.source+Ye.source,`gu`),Qe=new RegExp(String.raw`\d+`+Ye.source,`gu`),$e=(e,t,n,r)=>{let i=!1,a=!1,o=!1,s=!1;for(let c=0;c<e.length;c++){let l=e[c];s=c>2?e[c-3]===`-`:!0,i&&Ke.test(l)?(e=e.slice(0,c)+`-`+e.slice(c),i=!1,o=a,a=!0,c++):a&&o&&qe.test(l)&&(!s||r)?(e=e.slice(0,c-1)+`-`+e.slice(c-1),o=a,a=!1,i=!0):(i=t(l)===l&&n(l)!==l,o=a,a=n(l)===l&&t(l)!==l)}return e},et=(e,t)=>e.replace(Je,e=>t(e)),tt=(e,t,n)=>{let r=``,i=!1,a=!1,o=[...e];for(let e=0;e<o.length;e++){let s=o[e],c=Ke.test(s),l=e+1<o.length&&Ke.test(o[e+1]);i&&/[\p{Alpha}]/u.test(s)?(r+=s,i=!1,a=c):n&&c&&(a||l)?(r+=s,a=!0):/\d/.test(s)?(r+=s,i=!0,a=!1):N.test(s)?(r+=s,a=!1):(r+=t(s),i=!1,a=!1)}return r},nt=(e,t,{capitalizeAfterNumber:n})=>{let r=n?(e,n,r,i)=>{let a=i.charAt(r+e.length);return N.test(a)?e:n?e.slice(0,-n.length)+t(n):e}:e=>e;return e.replaceAll(Qe,r).replaceAll(Ze,(e,n)=>t(n))};function P(e,t){if(!(typeof e==`string`||Array.isArray(e)))throw TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,capitalizeAfterNumber:!0,...t},e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length>0).join(`-`):e.trim(),e.length===0)return``;let n=e.match(/^[_$]*/)[0];if(e=e.slice(n.length),e.length===0)return n;let r=t.locale===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),i=t.locale===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);return e.length===1?N.test(e)?n:n+(t.pascalCase?i(e):r(e)):(e!==r(e)&&(e=$e(e,r,i,t.preserveConsecutiveUppercase)),e=e.replace(Xe,``),e=t.capitalizeAfterNumber?t.preserveConsecutiveUppercase?et(e,r):r(e):tt(e,r,t.preserveConsecutiveUppercase),t.pascalCase&&e.length>0&&(e=i(e[0])+e.slice(1)),n+nt(e,i,t))}const rt=(e,t)=>t.some(t=>t instanceof RegExp?t.test(e):t===e),it=new Set([`https:`,`http:`,`file:`]),at=e=>{try{let{protocol:t}=new URL(e);return t.endsWith(`:`)&&!t.includes(`.`)&&!it.has(t)}catch{return!1}},ot=(e,{stripHash:t})=>{let n=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!n)throw Error(`Invalid URL: ${e}`);let{type:r,data:i,hash:a}=n.groups,o=r.split(`;`),s=o.at(-1)===`base64`;s&&o.pop();let c=o.shift()?.toLowerCase()??``,l=[...o.map(e=>{let[t,n=``]=e.split(`=`).map(e=>e.trim());return t===`charset`&&(n=n.toLowerCase(),n===`us-ascii`)?``:`${t}${n?`=${n}`:``}`}).filter(Boolean)];s&&l.push(`base64`),(l.length>0||c&&c!==`text/plain`)&&l.unshift(c);let u=t||!a?``:`#${a}`;return`data:${l.join(`;`)},${s?i.trim():i}${u}`};function st(e,t){if(t={defaultProtocol:`http`,normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,removePath:!1,transformPath:!1,...t},typeof t.defaultProtocol==`string`&&!t.defaultProtocol.endsWith(`:`)&&(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return ot(e,t);if(at(e))return e;let n=e.startsWith(`//`);!n&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));let r=new URL(e);if(t.forceHttp&&t.forceHttps)throw Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&r.protocol===`https:`&&(r.protocol=`http:`),t.forceHttps&&r.protocol===`http:`&&(r.protocol=`https:`),t.stripAuthentication&&(r.username=``,r.password=``),t.stripHash?r.hash=``:t.stripTextFragment&&(r.hash=r.hash.replace(/#?:~:text.*?$/i,``)),r.pathname){let e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,t=0,n=``;for(;;){let i=e.exec(r.pathname);if(!i)break;let a=i[0],o=i.index,s=r.pathname.slice(t,o);n+=s.replace(/\/{2,}/g,`/`),n+=a,t=o+a.length}let i=r.pathname.slice(t,r.pathname.length);n+=i.replace(/\/{2,}/g,`/`),r.pathname=n}if(r.pathname)try{r.pathname=decodeURI(r.pathname).replace(/\\/g,`%5C`)}catch{}if(t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=r.pathname.split(`/`).filter(Boolean),n=e.at(-1);n&&rt(n,t.removeDirectoryIndex)&&(e.pop(),r.pathname=e.length>0?`/${e.join(`/`)}/`:`/`)}if(t.removePath&&(r.pathname=`/`),t.transformPath&&typeof t.transformPath==`function`){let e=r.pathname.split(`/`).filter(Boolean),n=t.transformPath(e);r.pathname=n?.length>0?`/${n.join(`/`)}`:`/`}if(r.hostname&&(r.hostname=r.hostname.replace(/\.$/,``),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(r.hostname)&&(r.hostname=r.hostname.replace(/^www\./,``))),Array.isArray(t.removeQueryParameters))for(let e of[...r.searchParams.keys()])rt(e,t.removeQueryParameters)&&r.searchParams.delete(e);if(!Array.isArray(t.keepQueryParameters)&&t.removeQueryParameters===!0&&(r.search=``),Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0)for(let e of[...r.searchParams.keys()])rt(e,t.keepQueryParameters)||r.searchParams.delete(e);if(t.sortQueryParameters){let e=r.search;r.searchParams.sort();try{r.search=decodeURIComponent(r.search)}catch{}let t=e.slice(1).split(`&`).filter(e=>e&&!e.includes(`=`));for(let e of t){let t=decodeURIComponent(e);r.search=r.search.replace(`?${t}=`,`?${t}`).replace(`&${t}=`,`&${t}`)}}t.removeTrailingSlash&&(r.pathname=r.pathname.replace(/\/$/,``)),t.removeExplicitPort&&r.port&&(r.port=``);let i=e;return e=r.toString(),!t.removeSingleSlash&&r.pathname===`/`&&!i.endsWith(`/`)&&r.hash===``&&(e=e.replace(/\/$/,``)),(t.removeTrailingSlash||r.pathname===`/`)&&r.hash===``&&t.removeSingleSlash&&(e=e.replace(/\/$/,``)),n&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,`//`)),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,``)),e}var ct=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=i;var n=r(d());function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,n.default)(e),e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/\//g,`&#x2F;`).replace(/\\/g,`&#x5C;`).replace(/`/g,`&#96;`)}t.exports=e.default,t.exports.default=e.default})),lt=c(o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=u;var n=r(p());function r(e){return e&&e.__esModule?e:{default:e}}var i={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,yandex_convert_yandexru:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},a=[`icloud.com`,`me.com`],o=`hotmail.at,hotmail.be,hotmail.ca,hotmail.cl,hotmail.co.il,hotmail.co.nz,hotmail.co.th,hotmail.co.uk,hotmail.com,hotmail.com.ar,hotmail.com.au,hotmail.com.br,hotmail.com.gr,hotmail.com.mx,hotmail.com.pe,hotmail.com.tr,hotmail.com.vn,hotmail.cz,hotmail.de,hotmail.dk,hotmail.es,hotmail.fr,hotmail.hu,hotmail.id,hotmail.ie,hotmail.in,hotmail.it,hotmail.jp,hotmail.kr,hotmail.lv,hotmail.my,hotmail.ph,hotmail.pt,hotmail.sa,hotmail.sg,hotmail.sk,live.be,live.co.uk,live.com,live.com.ar,live.com.mx,live.de,live.es,live.eu,live.fr,live.it,live.nl,msn.com,outlook.at,outlook.be,outlook.cl,outlook.co.il,outlook.co.nz,outlook.co.th,outlook.com,outlook.com.ar,outlook.com.au,outlook.com.br,outlook.com.gr,outlook.com.pe,outlook.com.tr,outlook.com.vn,outlook.cz,outlook.de,outlook.dk,outlook.es,outlook.fr,outlook.hu,outlook.id,outlook.ie,outlook.in,outlook.it,outlook.jp,outlook.kr,outlook.lv,outlook.my,outlook.ph,outlook.pt,outlook.sa,outlook.sg,outlook.sk,passport.com`.split(`,`),s=[`rocketmail.com`,`yahoo.ca`,`yahoo.co.uk`,`yahoo.com`,`yahoo.de`,`yahoo.fr`,`yahoo.in`,`yahoo.it`,`ymail.com`],c=[`yandex.ru`,`yandex.ua`,`yandex.kz`,`yandex.com`,`yandex.by`,`ya.ru`];function l(e){return e.length>1?e:``}function u(e,t){t=(0,n.default)(t,i);var r=e.split(`@`),u=r.pop(),d=[r.join(`@`),u];if(d[1]=d[1].toLowerCase(),d[1]===`gmail.com`||d[1]===`googlemail.com`){if(t.gmail_remove_subaddress&&(d[0]=d[0].split(`+`)[0]),t.gmail_remove_dots&&(d[0]=d[0].replace(/\.+/g,l)),!d[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.gmail_convert_googlemaildotcom?`gmail.com`:d[1]}else if(a.indexOf(d[1])>=0){if(t.icloud_remove_subaddress&&(d[0]=d[0].split(`+`)[0]),!d[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(d[0]=d[0].toLowerCase())}else if(o.indexOf(d[1])>=0){if(t.outlookdotcom_remove_subaddress&&(d[0]=d[0].split(`+`)[0]),!d[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(d[0]=d[0].toLowerCase())}else if(s.indexOf(d[1])>=0){if(t.yahoo_remove_subaddress){var f=d[0].split(`-`);d[0]=f.length>1?f.slice(0,-1).join(`-`):f[0]}if(!d[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(d[0]=d[0].toLowerCase())}else c.indexOf(d[1])>=0?((t.all_lowercase||t.yandex_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.yandex_convert_yandexru?`yandex.ru`:d[1]):t.all_lowercase&&(d[0]=d[0].toLowerCase());return d.join(`@`)}t.exports=e.default,t.exports.default=e.default}))(),1),ut=c(ct(),1),dt=class e{#e=``;newLine=` `;writeStatement(e){this.#e=`${this.#e}${this.newLine}${e}`}child(){return new e}toString(){return this.#e}flush(){this.#e=``}};function ft({parseFnRefId:e,variableName:t,wildCardPath:n,isArrayMember:r,valueExpression:i,parentExpression:a,fieldNameExpression:o,parentValueExpression:s}){let c=e?`refs['${e}'](${i}, { data: root, meta: meta, parent: ${s} })`:i,l=``;return a===`root`||a===`root_item`?l=o:o!==`''`&&(l=`${a}.getFieldPath() + '.' + ${o}`),`const ${t} = defineValue(${c}, { data: root, meta: meta, name: ${o}, wildCardPath: '${n}', getFieldPath() { return ${l}; }, mutate: defineValue, report: report, isValid: true, isValidDataType: false, parent: ${s}, isArrayMember: ${r}, });`}function pt({variableName:e,validatorFnId:t}){let n=`refs['${t}']`;return`${e}.isValidDataType = ${`${n}.validator(${e}.value, ${n}.options, ${e});`}`}var F=class{#e;#t;field;constructor(e,t,n,r){this.#t=r,this.#e=e,this.#t?this.field=this.#t:(t.variablesCounter++,this.field=t.createFieldFor(e,n))}defineField(e){this.#t||e.writeStatement(ft({fieldNameExpression:this.field.fieldNameExpression,isArrayMember:this.field.isArrayMember,parentExpression:this.field.parentExpression,parentValueExpression:this.field.parentValueExpression,valueExpression:this.field.valueExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath,parseFnRefId:`parseFnId`in this.#e?this.#e.parseFnId:void 0}))}};function mt({variableName:e,guardedCodeSnippet:t}){return`if (${e}.isValidDataType) { ${t} }`}function ht({variableName:e,bail:t,guardedCodeSnippet:n}){return t?`if (${e}.isValid) { ${n} }`:n}function I({allowNull:e,conditional:t,variableName:n,outputExpression:r,transformFnRefId:i}){return e?`${t||`if`}(${n}.value === null) { ${r} = ${i?`refs['${i}'](null, ${n});`:`null;`} }`:``}function gt(e,t){let[n,r]=e;return n&&r?`if (${n} && ${r}) { ${t} }`:n?`if (${n}) { ${t} }`:r?`if (${r}) { ${t} }`:t}function _t({isAsync:e,implicit:t,ruleFnId:n},r,i,a,o){let s=`refs['${n}']`,c=`${s}.validator(${r}.value, ${s}.options, ${r});`;return o||=`${r}.isDefined`,gt([i?`${r}.isValid`:``,t||a?``:o],e?`await ${c}`:`${c}`)}function L({bail:e,validations:t,variableName:n,dropMissingCheck:r,existenceCheckExpression:i}){return`${t.map(t=>_t(t,n,e,r,i)).join(` `)}`}function vt({variableName:e,outputExpression:t,outputValueExpression:n}){return`const ${e}_out = ${n}; ${t} = ${e}_out;`}function R({allowNull:e,isOptional:t,variableName:n}){return t===!1?e===!1?`ensureExists(${n});`:`ensureIsDefined(${n});`:``}function yt({variableName:e}){return`${e}.isValidDataType = ensureIsArray(${e});`}var bt=class extends F{#e;#t;#n;constructor(e,t,n,r,i){super(e,n,r,i),this.#e=e,this.#t=t,this.#n=n}#r(){let e=this.#t.child(),t={type:`tuple`,fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#e.properties.forEach(n=>{this.#n.compileNode(n,e,t)}),e.toString()}compile(){this.defineField(this.#t),this.#t.writeStatement(R({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName})),this.#t.writeStatement(yt({variableName:this.field.variableName})),this.#t.writeStatement(L({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!1,existenceCheckExpression:`${this.field.variableName}.isValidDataType`}));let e=mt({variableName:this.field.variableName,guardedCodeSnippet:`${this.#t.newLine}${ht({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${vt({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:this.#e.allowUnknownProperties?`copyProperties(${this.field.variableName}.value)`:`[]`})}${this.#t.newLine}${this.#r()}`})}`});this.#t.writeStatement(`${e}${this.#t.newLine}${I({allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:`else if`})}`)}};function xt({variableName:e,loopCodeSnippet:t,startingIndex:n}){return n||=0,`const ${e}_items_size = ${e}.value.length; for (let ${e}_i = ${n}; ${e}_i < ${e}_items_size; ${e}_i++) { ${t} }`}var St=class extends F{#e;#t;#n;constructor(e,t,n,r,i){super(e,n,r,i),this.#e=e,this.#t=t,this.#n=n}#r(){let e=this.#t.child();this.#n.compileNode(this.#e.each,e,{type:`array`,fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath});let t=this.#t.child();return t.writeStatement(xt({variableName:this.field.variableName,startingIndex:0,loopCodeSnippet:e.toString()})),e.flush(),t.toString()}compile(){this.defineField(this.#t),this.#t.writeStatement(R({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName})),this.#t.writeStatement(yt({variableName:this.field.variableName})),this.#t.writeStatement(L({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!1,existenceCheckExpression:`${this.field.variableName}.isValidDataType`}));let e=mt({variableName:this.field.variableName,guardedCodeSnippet:`${this.#t.newLine}${ht({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${vt({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:`[]`})}${this.#t.newLine}${this.#r()}`})}`});this.#t.writeStatement(`${e}${this.#t.newLine}${I({allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:`else if`})}`)}};function Ct({parseFnRefId:e,variableName:t}){return e?`${t}.value = refs['${e}'](${t}.value);`:``}function wt({variableName:e,conditionalFnRefId:t}){return`else { refs['${t}'](${e}.value, ${e}); }`}function Tt({conditional:e,variableName:t,conditionalFnRefId:n,guardedCodeSnippet:r}){return`${e}(refs['${n}'](${t}.value, ${t})) { ${r} }`}var Et=class extends F{#e;#t;#n;#r;constructor(e,t,n,r,i){super(e,n,r,i),this.#t=e,this.#n=t,this.#r=r,this.#e=n}#i(){let e=this.#n.child();return this.#t.conditions.forEach((t,n)=>{let r=this.#n.child();`parseFnId`in t.schema&&r.writeStatement(Ct({parseFnRefId:t.schema.parseFnId,variableName:this.field.variableName})),this.#e.compileNode(t.schema,r,this.#r,this.field),e.writeStatement(Tt({conditional:n===0?`if`:`else if`,variableName:this.field.variableName,conditionalFnRefId:t.conditionalFnRefId,guardedCodeSnippet:r.toString()})),r.flush()}),this.#t.elseConditionalFnRefId&&this.#t.conditions.length&&e.writeStatement(wt({variableName:this.field.variableName,conditionalFnRefId:this.#t.elseConditionalFnRefId})),e.toString()}compile(){this.defineField(this.#n),this.#n.writeStatement(this.#i())}};function Dt({variableName:e,loopCodeSnippet:t}){return`const ${e}_keys = Object.keys(${e}.value); const ${e}_keys_size = ${e}_keys.length; for (let ${e}_key_i = 0; ${e}_key_i < ${e}_keys_size; ${e}_key_i++) { const ${e}_i = ${e}_keys[${e}_key_i]; ${t} }`}function Ot({variableName:e,guardedCodeSnippet:t}){return`if (${e}.isValidDataType) { ${t} }`}function kt({variableName:e,outputExpression:t,outputValueExpression:n}){return`const ${e}_out = ${n}; ${t} = ${e}_out;`}function At({variableName:e}){return`${e}.isValidDataType = ensureIsObject(${e});`}var jt=class extends F{#e;#t;#n;constructor(e,t,n,r,i){super(e,n,r,i),this.#e=e,this.#t=t,this.#n=n}#r(){let e=this.#t.child(),t=this.#t.child();return this.#n.compileNode(this.#e.each,t,{type:`record`,fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath}),e.writeStatement(Dt({variableName:this.field.variableName,loopCodeSnippet:t.toString()})),t.flush(),e.toString()}compile(){this.defineField(this.#t),this.#t.writeStatement(R({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName})),this.#t.writeStatement(At({variableName:this.field.variableName})),this.#t.writeStatement(L({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!1,existenceCheckExpression:`${this.field.variableName}.isValidDataType`}));let e=ht({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${kt({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:`{}`})}${this.#r()}`}),t=Ot({variableName:this.field.variableName,guardedCodeSnippet:`${this.#t.newLine}${e}`});this.#t.writeStatement(`${t}${this.#t.newLine}${I({allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:`else if`})}`)}};function Mt(e){return`[${e.map(e=>`"${e}"`).join(`, `)}]`}function Nt({variableName:e,fieldsToIgnore:t,allowUnknownProperties:n}){return n?`moveProperties(${e}.value, ${e}_out, ${Mt(t)});`:``}var Pt=class extends F{#e;#t;#n;constructor(e,t,n,r,i){super(e,n,r,i),this.#e=e,this.#t=t,this.#n=n}#r(e){let t=e.properties.map(e=>e.fieldName),n=e.groups.flatMap(e=>this.#i(e));return t.concat(n)}#i(e){return e.conditions.flatMap(e=>this.#r(e.schema))}#a(){let e=this.#t.child(),t={type:`object`,fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#e.properties.forEach(n=>this.#n.compileNode(n,e,t)),e.toString()}#o(){let e=this.#t.child(),t={type:`object`,fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#e.groups.forEach(n=>this.#s(n,e,t)),e.toString()}#s(e,t,n){e.conditions.forEach((e,r)=>{let i=t.child();e.schema.properties.forEach(e=>{this.#n.compileNode(e,i,n)}),e.schema.groups.forEach(e=>{this.#s(e,i,n)}),t.writeStatement(Tt({variableName:this.field.variableName,conditional:r===0?`if`:`else if`,conditionalFnRefId:e.conditionalFnRefId,guardedCodeSnippet:i.toString()}))}),e.elseConditionalFnRefId&&e.conditions.length&&t.writeStatement(wt({variableName:this.field.variableName,conditionalFnRefId:e.elseConditionalFnRefId}))}compile(){this.defineField(this.#t),this.#t.writeStatement(R({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName})),this.#t.writeStatement(At({variableName:this.field.variableName})),this.#t.writeStatement(L({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!1,existenceCheckExpression:`${this.field.variableName}.isValidDataType`}));let e=ht({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${kt({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:`{}`})}${this.#t.newLine}${this.#a()}${this.#t.newLine}${this.#o()}${this.#t.newLine}${Nt({variableName:this.field.variableName,allowUnknownProperties:this.#e.allowUnknownProperties,fieldsToIgnore:this.#e.allowUnknownProperties?this.#r(this.#e):[]})}`}),t=Ot({variableName:this.field.variableName,guardedCodeSnippet:`${e}`});this.#t.writeStatement(`${t}${this.#t.newLine}${I({variableName:this.field.variableName,allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,conditional:`else if`})}`)}};function Ft(e){return{parentExpression:e.variableName,parentValueExpression:e.variableName,fieldNameExpression:`''`,fieldPathExpression:`''`,wildCardPath:``,variableName:`${e.variableName}_item`,valueExpression:`root`,outputExpression:e.outputExpression,isArrayMember:!1}}function It({variableName:e,outputExpression:t,transformFnRefId:n}){return`if (${e}.isDefined && ${e}.isValid) { ${t} = ${n?`refs['${n}'](${e}.value, ${e})`:`${e}.value`}; }`}var Lt=class extends F{#e;#t;constructor(e,t,n,r,i){super(e,n,r,i),this.#e=e,this.#t=t}compile(){this.defineField(this.#t),this.#t.writeStatement(R({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName})),this.#e.dataTypeValidatorFnId&&this.#t.writeStatement(pt({variableName:this.field.variableName,validatorFnId:this.#e.dataTypeValidatorFnId})),this.#t.writeStatement(L({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,existenceCheckExpression:this.#e.dataTypeValidatorFnId?`${this.field.variableName}.isValidDataType`:void 0,dropMissingCheck:!1})),this.#t.writeStatement(`${It({variableName:this.field.variableName,outputExpression:this.field.outputExpression,transformFnRefId:this.#e.transformFnId})}${this.#t.newLine}${I({variableName:this.field.variableName,allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,transformFnRefId:this.#e.transformFnId,conditional:`else if`})}`)}};function Rt(e){let t=e.wildCardPath===``?`*`:`${e.wildCardPath}.*`;return{parentExpression:e.variableName,parentValueExpression:`${e.variableName}.value`,fieldNameExpression:`${e.variableName}_i`,fieldPathExpression:t,wildCardPath:t,variableName:`${e.variableName}_item`,valueExpression:`${e.variableName}.value[${e.variableName}_i]`,outputExpression:`${e.variableName}_out[${e.variableName}_i]`,isArrayMember:!0}}function zt(e,t){let n=t.wildCardPath===``?e.fieldName:`${t.wildCardPath}.${e.fieldName}`;return{parentExpression:t.variableName,parentValueExpression:`${t.variableName}.value`,fieldNameExpression:`${e.fieldName}`,fieldPathExpression:n,wildCardPath:n,variableName:`${t.variableName}_item_${e.fieldName}`,valueExpression:`${t.variableName}.value[${e.fieldName}]`,outputExpression:`${t.variableName}_out[${e.propertyName}]`,isArrayMember:!0}}function Bt(){return`if(errorReporter.hasErrors) { throw errorReporter.createError(); }`}const Vt=/\d/,Ht=/[A-Za-z0-9]+/;function Ut(e=``){if(!Vt.test(e))return e!==e.toLowerCase()}function Wt(e){return e?e[0].toUpperCase()+e.slice(1):``}function Gt(e){return e?e[0].toLowerCase()+e.slice(1):``}function Kt(e){let t=[];if(!e||typeof e!=`string`)return t;let n=``,r,i;for(let a of e){let e=!Ht.test(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=Ut(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function qt(e){let t=Kt(e).map(e=>Wt(e.toLowerCase())).join(``);return/^[0-9]+/.test(t)?`var_${t}`:Gt(t)}function Jt(e,t,n){let r=n.wildCardPath===``?e.fieldName:`${n.wildCardPath}.${e.fieldName}`;return{parentExpression:n.variableName,parentValueExpression:`${n.variableName}.value`,fieldNameExpression:`'${e.fieldName}'`,fieldPathExpression:r,wildCardPath:r,variableName:`${qt(e.propertyName)}_${t}`,valueExpression:`${n.variableName}.value['${e.fieldName}']`,outputExpression:`${n.variableName}_out['${e.propertyName}']`,isArrayMember:!1}}function Yt(e){let t=e.wildCardPath===``?`*`:`${e.wildCardPath}.*`;return{parentExpression:e.variableName,parentValueExpression:`${e.variableName}.value`,fieldNameExpression:`${e.variableName}_i`,fieldPathExpression:t,wildCardPath:t,variableName:`${e.variableName}_item`,valueExpression:`${e.variableName}.value[${e.variableName}_i]`,outputExpression:`${e.variableName}_out[${e.variableName}_i]`,isArrayMember:!1}}function Xt(e){return`function report(message, rule, field, args) { field.isValid = false; errorReporter.report(messagesProvider.getMessage(message, rule, field, args), rule, field, args); }; function defineValue(value, field) { ${e.convertEmptyStringsToNull?`if (typeof value === 'string' && value.trim() === '') { value = null; }`:``} field.value = value; field.isDefined = value !== undefined && value !== null; return field; }; function ensureExists(field) { if (field.value === undefined || field.value === null) { field.report(REQUIRED, 'required', field); return false; } return true; }; function ensureIsDefined(field) { if (field.value === undefined) { field.report(REQUIRED, 'required', field); return false; } return true; }; function ensureIsObject(field) { if (!field.isDefined) { return false; } if (typeof field.value == 'object' && !Array.isArray(field.value)) { return true; } field.report(NOT_AN_OBJECT, 'object', field); return false; }; function ensureIsArray(field) { if (!field.isDefined) { return false; } if (Array.isArray(field.value)) { return true; } field.report(NOT_AN_ARRAY, 'array', field); return false; }; function copyProperties(val) { let k, out, tmp; if (Array.isArray(val)) { out = Array((k = val.length)) while (k--) out[k] = (tmp = val[k]) && typeof tmp == 'object' ? copyProperties(tmp) : tmp return out } if (Object.prototype.toString.call(val) === '[object Object]') { out = {} // null for (k in val) { out[k] = (tmp = val[k]) && typeof tmp == 'object' ? copyProperties(tmp) : tmp } return out } return val }; function moveProperties(source, destination, ignoreKeys) { for (let key in source) { if (!ignoreKeys.includes(key)) { const value = source[key] destination[key] = copyProperties(value) } } };`}function Zt(e){return`const REQUIRED = '${e.required}'; const NOT_AN_OBJECT = '${e.object}'; const NOT_AN_ARRAY = '${e.array}';`}const Qt=Object.getPrototypeOf(async function(){}).constructor;var $t=class{variablesCounter=0;#e;#t;#n=new dt;constructor(e,t){this.#e=e,this.#t=t||{convertEmptyStringsToNull:!1}}#r(){this.#n.writeStatement(Zt({required:`value is required`,object:`value is not a valid object`,array:`value is not a valid array`,...this.#t.messages})),this.#n.writeStatement(Xt(this.#t)),this.#n.writeStatement(`let out;`)}#i(){this.#n.writeStatement(Bt()),this.#n.writeStatement(`return out;`)}#a(){this.compileNode(this.#e.schema,this.#n,{type:`root`,variableName:`root`,outputExpression:`out`,fieldPathExpression:`out`,wildCardPath:``})}#o(){return new Qt(`root`,`meta`,`refs`,`messagesProvider`,`errorReporter`,this.#n.toString())}createFieldFor(e,t){switch(t.type){case`array`:return Rt(t);case`root`:return Ft(t);case`object`:return Jt(e,this.variablesCounter,t);case`tuple`:return zt(e,t);case`record`:return Yt(t)}}compileNode(e,t,n,r){switch(e.type){case`literal`:return new Lt(e,t,this,n,r).compile();case`array`:return new St(e,t,this,n,r).compile();case`record`:return new jt(e,t,this,n,r).compile();case`object`:return new Pt(e,t,this,n,r).compile();case`tuple`:return new bt(e,t,this,n,r).compile();case`union`:return new Et(e,t,this,n,r).compile()}}compile(){this.#r(),this.#a(),this.#i();let e=this.#o();return this.variablesCounter=0,this.#n.flush(),e}};function en(){let e=0,t={};return{toJSON(){return t},track(n){e++;let r=`ref://${e}`;return t[r]=n,r},trackValidation(e){return this.track(e)},trackParser(e){return this.track(e)},trackTransformer(e){return this.track(e)},trackConditional(e){return this.track(e)}}}function z(e,t){let n={validator:e,name:t?.name??e.name,isAsync:t?.isAsync||e.constructor.name===`AsyncFunction`,implicit:t?.implicit??!1,toJSONSchema:t?.toJSONSchema};return function(...e){return{rule:n,options:e[0]}}}const B=Symbol.for(`schema_name`),V=Symbol.for(`is_of_type`),H=Symbol.for(`parse`),U=Symbol.for(`to_validation`),W=Symbol.for(`subtype`),G=z(function(e,t,n){let r=t(n);!n.isDefined&&r&&n.report(M.required,`required`,n)},{implicit:!0});var tn=class{requiredWhen(e,t,n){if(typeof e==`function`)return this.use(G(e));let r;switch(t){case`=`:r=e=>e===n;break;case`!=`:r=e=>e!==n;break;case`in`:r=e=>n.includes(e);break;case`notIn`:r=e=>!n.includes(e);break;case`>`:r=e=>e>n;break;case`<`:r=e=>e<n;break;case`>=`:r=e=>e>=n;break;case`<=`:r=e=>e<=n}return this.use(G(t=>{let n=j.getNestedValue(e,t);return r(n)}))}requiredIfExists(e){let t=Array.isArray(e)?e:[e];return this.use(G(e=>t.every(t=>j.exists(j.getNestedValue(t,e)))))}requiredIfAnyExists(e){return this.use(G(t=>e.some(e=>j.exists(j.getNestedValue(e,t)))))}requiredIfMissing(e){let t=Array.isArray(e)?e:[e];return this.use(G(e=>t.every(t=>j.isMissing(j.getNestedValue(t,e)))))}requiredIfAnyMissing(e){return this.use(G(t=>e.some(e=>j.isMissing(j.getNestedValue(e,t)))))}},K=class e{allowNull=!0;get isOptional(){return this.#e.isOptional}#e;constructor(e){this.#e=e}clone(){return new e(this.#e.clone())}optional(){return new J(this)}transform(e){return new Y(e,this)}meta(e){return new q(this,e)}toJSONSchema(){let e=this.#e.toJSONSchema?.()??{};return e.anyOf?(e.anyOf.push({type:`null`}),e):e.enum?{anyOf:[e,{type:`null`}]}:e.type===void 0?(e.type=`null`,e):typeof e.type==`string`?(e.type=[e.type,`null`],e):(Array.isArray(e.type)&&e.type.push(`null`),e)}[H](e,t,n){let r=this.#e[H](e,t,n);return r.allowNull=!0,r}},q=class e{get isOptional(){return this.#e.isOptional}get allowNull(){return this.#e.allowNull}#e;#t;constructor(e,t){this.#e=e,this.#t=t}optional(){return new J(this)}transform(e){return new Y(e,this)}nullable(){return new K(this)}clone(){return new e(this.#e.clone(),this.#t)}toJSONSchema(){return{...this.#e.toJSONSchema?.()??{},...this.#t}}[H](e,t,n){let r=this.#e[H](e,t,n);return r.allowNull=!0,r}},J=class e extends tn{isOptional=!0;get allowNull(){return this.#e.allowNull}#e;validations;constructor(e,t){super(),this.#e=e,this.validations=t||[]}cloneValidations(){return this.validations.map(e=>({options:e.options,rule:e.rule}))}compileValidations(e){return this.validations.map(t=>({ruleFnId:e.track({validator:t.rule.validator,options:t.options}),name:t.rule.name,implicit:t.rule.implicit,isAsync:t.rule.isAsync}))}nullable(){return new K(this)}transform(e){return new Y(e,this)}use(e){return this.validations.push(U in e?e[U]():e),this}clone(){return new e(this.#e.clone(),this.cloneValidations())}meta(e){return new q(this,e)}toJSONSchema(){return{...this.#e.toJSONSchema()}}[H](e,t,n){let r=this.#e[H](e,t,n);return r.isOptional=!0,r.validations=r.validations.concat(this.compileValidations(t)),r}},Y=class e{get isOptional(){return this.#e.isOptional}get allowNull(){return this.#e.allowNull}#e;#t;constructor(e,t){this.#t=e,this.#e=t}clone(){return new e(this.#t,this.#e.clone())}optional(){return new J(this)}nullable(){return new K(this)}meta(e){return new q(this,e)}toJSONSchema(){return this.#e.toJSONSchema()}[H](e,t,n){let r=this.#e[H](e,t,n);return r.transformFnId=t.trackTransformer(this.#t),r}},X=class extends Ge{dataTypeValidator;options;validations;constructor(e,t){super(),this.options={bail:!0,allowNull:!1,isOptional:!1,...e},this.validations=t||[]}cloneValidations(){return this.validations.map(e=>({options:e.options,rule:e.rule}))}cloneOptions(){return{...this.options}}compileValidation(e,t){return{ruleFnId:t.track({validator:e.rule.validator,options:e.options}),name:e.rule.name,implicit:e.rule.implicit,isAsync:e.rule.isAsync}}compileValidations(e){return this.validations.map(t=>this.compileValidation(t,e))}toJSONSchema(){let e={};this.dataTypeValidator?.rule.toJSONSchema&&this.dataTypeValidator.rule.toJSONSchema(e,this.dataTypeValidator.options);for(let t of this.validations)t.rule.toJSONSchema&&t.rule.toJSONSchema(e,t.options);return e}parse(e){return this.options.parse=e,this}use(e){return this.validations.push(U in e?e[U]():e),this}bail(e){return this.options.bail=e,this}optional(){return new J(this)}nullable(){return new K(this)}meta(e){return new q(this,e)}transform(e){return new Y(e,this)}[H](e,t,n){return{type:`literal`,subtype:this[W],fieldName:e,...this.dataTypeValidator?{dataTypeValidatorFnId:this.compileValidation(this.dataTypeValidator,t).ruleFnId}:{},propertyName:n.toCamelCase?P(e):e,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t)}}},nn=class e extends X{constructor(e,t){super(e,t)}[W]=`any`;clone(){return new e(this.cloneOptions(),this.cloneValidations())}toJSONSchema(){let e={anyOf:[{type:`string`},{type:`number`},{type:`boolean`},{type:`array`},{type:`object`}]};for(let t of this.validations)t.rule.toJSONSchema&&t.rule.toJSONSchema(e,t.options);return e}};const rn=z(function(e,t,n){let r=typeof t.choices==`function`?t.choices(n):t.choices;r.includes(e)||n.report(M.enum,`enum`,n,{choices:r})},{toJSONSchema:(e,t)=>{typeof t.choices!=`function`&&(e.enum=t.choices)}});var an=class e extends X{static rules={enum:rn};#e;[W]=`enum`;getChoices(){return this.#e}constructor(e,t,n){super(t,n||[rn({choices:e})]),this.#e=e}clone(){return new e(this.#e,this.cloneOptions(),this.cloneValidations())}};const on=z(function(e,t,n){if(!n.isDefined)return!1;if(typeof e!=`string`&&typeof e!=`number`)return n.report(M.date,`date`,n),!1;let{dateTime:r,formats:i}=j.asDayJS(e,t.formats);return r.isValid()?(n.$value=r,n.$formats=i,n.mutate(We.date?We.date(r.toDate()):r.toDate(),n),!0):(n.report(M.date,`date`,n),!1)}),sn=z(function(e,t,n){let r=t.compare||`day`,i=t.format||n.$formats,a=n.$value,o=typeof t.expectedValue==`function`?t.expectedValue(n):t.expectedValue,{dateTime:s}=j.asDayJS(o,i);if(!s.isValid())throw Error(`Invalid datetime value "${o}" provided to the equals rule`);a.isSame(s,r)||n.report(M[`date.equals`],`date.equals`,n,{expectedValue:o,compare:r})}),cn=z(function(e,t,n){let r=t.compare||`day`,i=t.format||n.$formats,a=n.$value,o=typeof t.expectedValue==`function`?t.expectedValue(n):t.expectedValue,s=o===`today`?(0,A.default)():o===`tomorrow`?(0,A.default)().add(1,`day`):j.asDayJS(o,i).dateTime;if(!s.isValid())throw Error(`Invalid datetime value "${o}" provided to the after rule`);a.isAfter(s,r)||n.report(M[`date.after`],`date.after`,n,{expectedValue:o,compare:r})}),ln=z(function(e,t,n){let r=t.compare||`day`,i=t.format||n.$formats,a=n.$value,o=typeof t.expectedValue==`function`?t.expectedValue(n):t.expectedValue,s=o===`today`?(0,A.default)():o===`tomorrow`?(0,A.default)().add(1,`day`):j.asDayJS(o,i).dateTime;if(!s.isValid())throw Error(`Invalid datetime value "${o}" provided to the afterOrEqual rule`);a.isSameOrAfter(s,r)||n.report(M[`date.afterOrEqual`],`date.afterOrEqual`,n,{expectedValue:o,compare:r})}),un=z(function(e,t,n){let r=t.compare||`day`,i=t.format||n.$formats,a=n.$value,o=typeof t.expectedValue==`function`?t.expectedValue(n):t.expectedValue,s=o===`today`?(0,A.default)():o===`yesterday`?(0,A.default)().subtract(1,`day`):j.asDayJS(o,i).dateTime;if(!s.isValid())throw Error(`Invalid datetime value "${o}" provided to the before rule`);a.isBefore(s,r)||n.report(M[`date.before`],`date.before`,n,{expectedValue:o,compare:r})}),dn=z(function(e,t,n){let r=t.compare||`day`,i=t.format||n.$formats,a=n.$value,o=typeof t.expectedValue==`function`?t.expectedValue(n):t.expectedValue,s=o===`today`?(0,A.default)():o===`yesterday`?(0,A.default)().subtract(1,`day`):j.asDayJS(o,i).dateTime;if(!s.isValid())throw Error(`Invalid datetime value "${o}" provided to the beforeOrEqual rule`);a.isSameOrBefore(s,r)||n.report(M[`date.beforeOrEqual`],`date.beforeOrEqual`,n,{expectedValue:o,compare:r})}),fn=z(function(e,t,n){let r=t.compare||`day`,i=n.$value,a=t.format||n.$formats,o=j.getNestedValue(t.otherField,n),s=j.asDayJS(o,a).dateTime;s.isValid()&&(i.isSame(s,r)||n.report(M[`date.sameAs`],`date.sameAs`,n,{otherField:t.otherField,expectedValue:o,compare:r}))}),pn=z(function(e,t,n){let r=t.compare||`day`,i=n.$value,a=t.format||n.$formats,o=j.getNestedValue(t.otherField,n),s=j.asDayJS(o,a).dateTime;s.isValid()&&i.isSame(s,r)&&n.report(M[`date.notSameAs`],`date.notSameAs`,n,{otherField:t.otherField,expectedValue:o,compare:r})}),mn=z(function(e,t,n){let r=t.compare||`day`,i=n.$value,a=t.format||n.$formats,o=j.getNestedValue(t.otherField,n),s=j.asDayJS(o,a).dateTime;s.isValid()&&(i.isAfter(s,r)||n.report(M[`date.afterField`],`date.afterField`,n,{otherField:t.otherField,expectedValue:o,compare:r}))}),hn=z(function(e,t,n){let r=t.compare||`day`,i=n.$value,a=t.format||n.$formats,o=j.getNestedValue(t.otherField,n),s=j.asDayJS(o,a).dateTime;s.isValid()&&(i.isSameOrAfter(s,r)||n.report(M[`date.afterOrSameAs`],`date.afterOrSameAs`,n,{otherField:t.otherField,expectedValue:o,compare:r}))}),gn=z(function(e,t,n){let r=t.compare||`day`,i=n.$value,a=t.format||n.$formats,o=j.getNestedValue(t.otherField,n),s=j.asDayJS(o,a).dateTime;s.isValid()&&(i.isBefore(s,r)||n.report(M[`date.beforeField`],`date.beforeField`,n,{otherField:t.otherField,expectedValue:o,compare:r}))}),_n=z(function(e,t,n){let r=t.compare||`day`,i=n.$value,a=t.format||n.$formats,o=j.getNestedValue(t.otherField,n),s=j.asDayJS(o,a).dateTime;s.isValid()&&(i.isSameOrBefore(s,r)||n.report(M[`date.beforeOrSameAs`],`date.beforeOrSameAs`,n,{otherField:t.otherField,expectedValue:o,compare:r}))}),vn=z(function(e,t,n){let r=n.$value.day();r!==0&&r!==6&&n.report(M[`date.weekend`],`date.weekend`,n)}),yn=z(function(e,t,n){let r=n.$value.day();(r===0||r===6)&&n.report(M[`date.weekday`],`date.weekday`,n)});var bn=class e extends X{static transform(e){We.date=e}static rules={equals:sn,after:cn,afterOrEqual:ln,before:un,beforeOrEqual:dn,sameAs:fn,notSameAs:pn,afterField:mn,afterOrSameAs:hn,beforeField:gn,beforeOrSameAs:_n,weekend:vn,weekday:yn};[B]=`vine.date`;[W]=`date`;[V]=e=>typeof e==`string`?j.asDayJS(e,this.options.formats).dateTime.isValid():!1;constructor(e,t){super(e,t||[]),this.dataTypeValidator=on(e||{})}equals(e,t){return this.use(sn({expectedValue:e,...t}))}after(e,t){return this.use(cn({expectedValue:e,...t}))}afterOrEqual(e,t){return this.use(ln({expectedValue:e,...t}))}before(e,t){return this.use(un({expectedValue:e,...t}))}beforeOrEqual(e,t){return this.use(dn({expectedValue:e,...t}))}sameAs(e,t){return this.use(fn({otherField:e,...t}))}notSameAs(e,t){return this.use(pn({otherField:e,...t}))}afterField(e,t){return this.use(mn({otherField:e,...t}))}afterOrSameAs(e,t){return this.use(hn({otherField:e,...t}))}beforeField(e,t){return this.use(gn({otherField:e,...t}))}beforeOrSameAs(e,t){return this.use(_n({otherField:e,...t}))}weekend(){return this.use(vn())}weekday(){return this.use(yn())}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},xn=class e{[W]=`null`;[B]=`vine.null`;[V]=e=>e===null;options;constructor(e){this.options={bail:!0,allowNull:!0,isOptional:!1,...e}}cloneOptions(){return{...this.options}}clone(){return new e(this.cloneOptions())}toJSONSchema(){return{type:`null`}}[H](e,t,n){return{type:`literal`,subtype:this[W],fieldName:e,propertyName:n.toCamelCase?P(e):e,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:[]}}},Sn=class{#e;#t;constructor(e,t){this.#e=t,this.#t=e}toJSONSchema(){return this.#e.toJSONSchema?.()}[H](e,t,n){return{conditionalFnRefId:t.trackConditional(this.#t),schema:this.#e[H](e,t,n)}}},Cn=class e extends tn{[W]=`optional`;[B]=`vine.optional`;[V]=e=>e==null;options;validations;constructor(e,t){super(),this.options={bail:!0,allowNull:!1,isOptional:!0,...e},this.validations=t||[]}cloneValidations(){return this.validations.map(e=>({options:e.options,rule:e.rule}))}cloneOptions(){return{...this.options}}compileValidations(e){return this.validations.map(t=>({ruleFnId:e.track({validator:t.rule.validator,options:t.options}),implicit:t.rule.implicit,isAsync:t.rule.isAsync}))}parse(e){return this.options.parse=e,this}use(e){return this.validations.push(U in e?e[U]():e),this}bail(e){return this.options.bail=e,this}clone(){return new e(this.cloneOptions(),this.cloneValidations())}nullable(){return new e({...this.options,allowNull:!0})}toJSONSchema(){return{}}[H](e,t,n){return{type:`literal`,subtype:this[W],fieldName:e,propertyName:n.toCamelCase?P(e):e,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t)}}},wn=class e{#e;#t=(e,t)=>{t.report(M.union,`union`,t)};constructor(e){this.#e=e}optional(){let t=new Cn;return new e([new Sn(t[V],t),...this.#e])}nullable(){let t=new xn;return new e([new Sn(t[V],t),...this.#e])}otherwise(e){return this.#t=e,this}toJSONSchema(){return{anyOf:this.#e.map(e=>e.toJSONSchema()).filter(Boolean)}}clone(){let t=new e(this.#e);return t.otherwise(this.#t),t}[H](e,t,n){return{type:`union`,fieldName:e,propertyName:n.toCamelCase?P(e):e,elseConditionalFnRefId:t.trackConditional(this.#t),conditions:this.#e.map(r=>r[H](e,t,n))}}};function Tn(e){return new wn(e)}Tn.if=function(e,t){return new Sn(e,t)},Tn.else=function(e){return new Sn(()=>!0,e)};var En=class e{allowNull=!0;get isOptional(){return this.#e.isOptional}#e;constructor(e){this.#e=e}optional(){return new On(this)}meta(e){return new Dn(this,e)}clone(){return new e(this.#e.clone())}toJSONSchema(){let e=this.#e.toJSONSchema?.();return e?e.anyOf?(e.anyOf.push({type:`null`}),e):e.type===void 0?(e.type=`null`,e):typeof e.type==`string`?(e.type=[e.type,`null`],e):(Array.isArray(e.type)&&e.type.push(`null`),e):{type:`null`}}[H](e,t,n){let r=this.#e[H](e,t,n);return r.type!==`union`&&(r.allowNull=!0),r}},Dn=class e{get allowNull(){return this.#e.allowNull}get isOptional(){return this.#e.isOptional}#e;#t;constructor(e,t){this.#e=e,this.#t=t}clone(){return new e(this.#e.clone(),this.#t)}toJSONSchema(){return{...this.#e.toJSONSchema?.()??{},...this.#t}}[H](e,t,n){return this.#e[H](e,t,n)}},On=class e extends tn{isOptional=!0;get allowNull(){return this.#e.allowNull}#e;validations;constructor(e,t){super(),this.#e=e,this.validations=t||[]}cloneValidations(){return this.validations.map(e=>({options:e.options,rule:e.rule}))}compileValidations(e){return this.validations.map(t=>({ruleFnId:e.track({validator:t.rule.validator,options:t.options}),name:t.rule.name,implicit:t.rule.implicit,isAsync:t.rule.isAsync}))}nullable(){return new En(this)}meta(e){return new Dn(this,e)}use(e){return this.validations.push(U in e?e[U]():e),this}clone(){return new e(this.#e.clone(),this.cloneValidations())}toJSONSchema(){return{...this.#e.toJSONSchema()}}[H](e,t,n){let r=this.#e[H](e,t,n);return r.type!==`union`&&(r.isOptional=!0,r.validations=r.validations.concat(this.compileValidations(t))),r}},Z=class extends Ge{toJSONSchema(){return{}}validations;options;constructor(e,t){super(),this.options=e||{bail:!0,allowNull:!1,isOptional:!1},this.validations=t||[]}cloneValidations(){return this.validations.map(e=>({options:e.options,rule:e.rule}))}cloneOptions(){return{...this.options}}compileValidations(e){return this.validations.map(t=>({ruleFnId:e.track({validator:t.rule.validator,options:t.options}),name:t.rule.name,implicit:t.rule.implicit,isAsync:t.rule.isAsync}))}parse(e){return this.options.parse=e,this}use(e){return this.validations.push(U in e?e[U]():e),this}bail(e){return this.options.bail=e,this}optional(){return new On(this)}nullable(){return new En(this)}meta(e){return new Dn(this,e)}},kn=class e extends Z{#e;#t=!1;[B]=`vine.array`;[V]=e=>Array.isArray(e);constructor(e,t,n){super(t,n),this.#e=e}allowUnknownProperties(){return this.#t=!0,this}clone(){let t=new e(this.#e.map(e=>e.clone()),this.cloneOptions(),this.cloneValidations());return this.#t&&t.allowUnknownProperties(),t}toJSONSchema(){let e=[];for(let t of this.#e)t.toJSONSchema&&e.push(t.toJSONSchema());let t={type:`array`,minItems:this.#e.length,maxItems:this.#e.length,additionalItems:!1,items:e};for(let e of this.validations)e.rule.toJSONSchema&&e.rule.toJSONSchema(t,e.options);return t}[H](e,t,n){return{type:`tuple`,fieldName:e,propertyName:n.toCamelCase?P(e):e,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,allowUnknownProperties:this.#t,parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t),properties:this.#e.map((e,r)=>e[H](String(r),t,n))}}};const An=z(function(e,t,n){e.length<t.min&&n.report(M[`array.minLength`],`array.minLength`,n,t)},{toJSONSchema:(e,t)=>{e.minItems=t.min}}),jn=z(function(e,t,n){e.length>t.max&&n.report(M[`array.maxLength`],`array.maxLength`,n,t)},{toJSONSchema:(e,t)=>{e.maxItems=t.max}}),Mn=z(function(e,t,n){e.length!==t.size&&n.report(M[`array.fixedLength`],`array.fixedLength`,n,t)},{toJSONSchema:(e,t)=>{e.minItems=t.size,e.maxItems=t.size}}),Nn=z(function(e,t,n){e.length<=0&&n.report(M.notEmpty,`notEmpty`,n)},{toJSONSchema:e=>{e.minItems=1}}),Pn=z(function(e,t,n){j.isDistinct(e,t.fields)||n.report(M.distinct,`distinct`,n,t)},{toJSONSchema:e=>{e.uniqueItems=!0}}),Fn=z(function(e,t,n){n.isValid&&n.mutate(e.filter(e=>j.exists(e)&&e!==``),n)});var In=class e extends Z{static rules={compact:Fn,notEmpty:Nn,distinct:Pn,minLength:An,maxLength:jn,fixedLength:Mn};#e;[B]=`vine.array`;[V]=e=>Array.isArray(e);constructor(e,t,n){super(t,n),this.#e=e}minLength(e){return this.use(An({min:e}))}maxLength(e){return this.use(jn({max:e}))}fixedLength(e){return this.use(Mn({size:e}))}notEmpty(){return this.use(Nn())}distinct(e){return this.use(Pn({fields:e}))}compact(){return this.use(Fn())}clone(){return new e(this.#e.clone(),this.cloneOptions(),this.cloneValidations())}toJSONSchema(){let e={type:`array`,items:this.#e.toJSONSchema?.()??{}};for(let t of this.validations)t.rule.toJSONSchema&&t.rule.toJSONSchema(e,t.options);return e}[H](e,t,n){return{type:`array`,fieldName:e,propertyName:n.toCamelCase?P(e):e,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#e[H](`*`,t,n),parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t)}}},Ln=class e extends Z{#e;[B]=`types.object`;[V]=e=>typeof e==`object`&&!!e&&!Array.isArray(e);constructor(e){super(),this.#e=e}clone(){return new e(this.#e.clone())}toJSONSchema(){return this.#e.toJSONSchema()}[H](e,t,n){return n.toCamelCase=!0,this.#e[H](e,t,n)}},Rn=class e extends Z{#e;#t=[];#n=!1;[B]=`vine.object`;[V]=e=>typeof e==`object`&&!!e&&!Array.isArray(e);constructor(e,t,n){if(!e)throw Error(`Missing properties for "vine.object". Use an empty object if you do not want to validate any specific fields`);super(t,n),this.#e=e}getProperties(){return Object.keys(this.#e).reduce((e,t)=>(e[t]=this.#e[t].clone(),e),{})}pick(e){let t={};for(let n of e)t[n]=this.#e[n].clone();return t}omit(e){let t={};for(let n of Object.keys(this.#e))e.includes(n)||(t[n]=this.#e[n].clone());return t}allowUnknownProperties(){return this.#n=!0,this}merge(e){return this.#t.push(e),this}clone(){let t=new e(this.getProperties(),this.cloneOptions(),this.cloneValidations());return this.#t.forEach(e=>t.merge(e)),this.#n&&t.allowUnknownProperties(),t}toCamelCase(){return new Ln(this)}toJSONSchema(){let e={},t=[];for(let[n,r]of Object.entries(this.getProperties()))r.toJSONSchema&&(e[n]=r.toJSONSchema(),r.isOptional!==!0&&r.allowNull!==!0&&t.push(n));let n={type:`object`,properties:e,required:t,additionalProperties:this.#n};for(let e of this.validations)e.rule.toJSONSchema&&e.rule.toJSONSchema(n,e.options);return this.#t.length>0?{anyOf:[...this.#t.map(e=>e.toJSONSchema()),n]}:n}partial(t){if(this.#t.length>0||this.#n)throw Error(`toOptional cannot be used on schemas that have groups or allowUnknownProperties enabled`);let n={};for(let e of Object.keys(this.#e)){let r=this.#e[e].clone();(!t||t.includes(e))&&`optional`in r&&typeof r.optional==`function`&&(r=r.optional()),n[e]=r}return new e(n,this.cloneOptions(),this.cloneValidations())}[H](e,t,n){return{type:`object`,fieldName:e,propertyName:n.toCamelCase?P(e):e,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,allowUnknownProperties:this.#n,validations:this.compileValidations(t),properties:Object.keys(this.#e).map(e=>this.#e[e][H](e,t,n)),groups:this.#t.map(e=>e[H](t,n))}}};const zn=z(function(e,t,n){Object.keys(e).length<t.min&&n.report(M[`record.minLength`],`record.minLength`,n,t)},{toJSONSchema:(e,t)=>{e.minProperties=t.min}}),Bn=z(function(e,t,n){Object.keys(e).length>t.max&&n.report(M[`record.maxLength`],`record.maxLength`,n,t)},{toJSONSchema:(e,t)=>{e.maxProperties=t.max}}),Vn=z(function(e,t,n){Object.keys(e).length!==t.size&&n.report(M[`record.fixedLength`],`record.fixedLength`,n,t)},{toJSONSchema:(e,t)=>{e.minProperties=t.size,e.maxProperties=t.size}}),Hn=z(function(e,t,n){t(Object.keys(e),n)});var Un=class e extends Z{static rules={maxLength:Bn,minLength:zn,fixedLength:Vn,validateKeys:Hn};#e;[B]=`vine.object`;[V]=e=>typeof e==`object`&&!!e&&!Array.isArray(e);constructor(e,t,n){super(t,n),this.#e=e}minLength(e){return this.use(zn({min:e}))}maxLength(e){return this.use(Bn({max:e}))}fixedLength(e){return this.use(Vn({size:e}))}validateKeys(...e){return this.use(Hn(...e))}clone(){return new e(this.#e.clone(),this.cloneOptions(),this.cloneValidations())}toJSONSchema(){let e={type:`object`,additionalProperties:{}};e.additionalProperties=this.#e.toJSONSchema?.()??{};for(let t of this.validations)t.rule.toJSONSchema&&t.rule.toJSONSchema(e,t.options);return e}[H](e,t,n){return{type:`record`,fieldName:e,propertyName:n.toCamelCase?P(e):e,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#e[H](`*`,t,n),parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t)}}};const Wn=z(function(e,t,n){return n.isDefined?typeof e==`string`?!0:(n.report(M.string,`string`,n),!1):!1},{toJSONSchema:e=>{e.type=`string`}}),Gn=z(function(e,t,n){j.isEmail(e,t)||n.report(M.email,`email`,n)},{toJSONSchema:e=>{e.format=`email`}}),Kn=z(function(e,t,n){let r=t&&typeof t==`function`?t(n):t,i=r?.locale||`any`;j.isMobilePhone(e,i,r)||n.report(M.mobile,`mobile`,n)}),qn=z(function(e,t,n){j.isIP(e,t?.version)||n.report(M.ipAddress,`ipAddress`,n)},{toJSONSchema:(e,t)=>{e.format=t?.version===6?`ipv6`:`ipv4`}}),Jn=z(function(e,t,n){t.test(e)||n.report(M.regex,`regex`,n)},{toJSONSchema:(e,t)=>{e.pattern=t.source}}),Yn=z(function(e,t,n){j.isHexColor(e)||n.report(M.hexCode,`hexCode`,n)},{toJSONSchema:e=>{e.pattern=`^#?([0-9a-f]{6}|[0-9a-f]{3}|[0-9a-f]{8})$`}}),Xn=z(function(e,t,n){j.isURL(e,t)||n.report(M.url,`url`,n)},{toJSONSchema:e=>{e.format=`uri`}}),Zn=z(async function(e,t,n){await j.isActiveURL(e)||n.report(M.activeUrl,`activeUrl`,n)}),Qn=z(function(e,t,n){let r=`a-zA-Z`;t&&(t.allowSpaces&&(r+=`\\s`),t.allowDashes&&(r+=`-`),t.allowUnderscores&&(r+=`_`)),RegExp(`^[${r}]+$`).test(e)||n.report(M.alpha,`alpha`,n)},{toJSONSchema:(e,t)=>{let n=`a-zA-Z`;t&&(t.allowSpaces&&(n+=`\\s`),t.allowDashes&&(n+=`-`),t.allowUnderscores&&(n+=`_`)),e.pattern=`^[${n}]+$`}}),$n=z(function(e,t,n){let r=`a-zA-Z0-9`;t&&(t.allowSpaces&&(r+=`\\s`),t.allowDashes&&(r+=`-`),t.allowUnderscores&&(r+=`_`)),RegExp(`^[${r}]+$`).test(e)||n.report(M.alphaNumeric,`alphaNumeric`,n)},{toJSONSchema:(e,t)=>{let n=`a-zA-Z0-9`;t&&(t.allowSpaces&&(n+=`\\s`),t.allowDashes&&(n+=`-`),t.allowUnderscores&&(n+=`_`)),e.pattern=`^[${n}]+$`}}),er=z(function(e,t,n){e.length<t.min&&n.report(M.minLength,`minLength`,n,t)},{toJSONSchema:(e,t)=>{e.minLength=t.min}}),tr=z(function(e,t,n){e.length>t.max&&n.report(M.maxLength,`maxLength`,n,t)},{toJSONSchema:(e,t)=>{e.maxLength=t.max}}),nr=z(function(e,t,n){e.length!==t.size&&n.report(M.fixedLength,`fixedLength`,n,t)},{toJSONSchema:(e,t)=>{e.minLength=t.size,e.maxLength=t.size}}),rr=z(function(e,t,n){e.endsWith(t.substring)||n.report(M.endsWith,`endsWith`,n,t)}),ir=z(function(e,t,n){e.startsWith(t.substring)||n.report(M.startsWith,`startsWith`,n,t)}),ar=z(function(e,t,n){if(j.getNestedValue(t.otherField,n)!==e){n.report(M.sameAs,`sameAs`,n,t);return}}),or=z(function(e,t,n){if(j.getNestedValue(t.otherField,n)===e){n.report(M.notSameAs,`notSameAs`,n,t);return}}),sr=z(function(e,t,n){let r=t??{},i=r.as??r.confirmationField??`${n.name}_confirmation`,a=n.parent[i];if(a!==e){n.report(M.confirmed,`confirmed`,{...n,name:i,wildCardPath:`${n.wildCardPath.replace(String(n.name),i)}`,isDefined:!0,isValid:!1,value:a,getFieldPath(){return`${n.getFieldPath().replace(String(n.name),i)}`}},{otherField:i,originalField:n.name});return}}),cr=z(function(e,t,n){if(!(typeof t.choices==`function`?t.choices(n):t.choices).includes(e)){n.report(M.in,`in`,n,t);return}}),lr=z(function(e,t,n){if((typeof t.list==`function`?t.list(n):t.list).includes(e)){n.report(M.notIn,`notIn`,n,t);return}}),ur=z(function(e,t,n){let r=t?typeof t==`function`?t(n)?.provider||[]:t.provider:[];r.length?r.find(t=>j.isCreditCard(e,{provider:t}))||n.report(M.creditCard,`creditCard`,n,{providers:r,providersList:r.join(`/`)}):j.isCreditCard(e)||n.report(M.creditCard,`creditCard`,n,{providersList:`credit`})}),dr=z(function(e,t,n){let r=typeof t==`function`?t(n).countryCode:t.countryCode;r.find(t=>j.isPassportNumber(e,t))||n.report(M.passport,`passport`,n,{countryCodes:r})}),fr=z(function(e,t,n){let r=typeof t==`function`?t(n).countryCode:t.countryCode;r.find(t=>j.isVAT(e,t))||n.report(M.vat,`vat`,n,{countryCodes:r})}),pr=z(function(e,t,n){let r=t?typeof t==`function`?t(n)?.countryCode||[]:t.countryCode:[];r.length?r.find(t=>j.isPostalCode(e,t))||n.report(M.postalCode,`postalCode`,n,{countryCodes:r}):j.isPostalCode(e,`any`)||n.report(M.postalCode,`postalCode`,n)}),mr=z(function(e,t,n){!t||!t.version?j.isUUID(e)||n.report(M.uuid,`uuid`,n):t.version.find(t=>j.isUUID(e,t))||n.report(M.uuid,`uuid`,n,t)},{toJSONSchema:e=>{e.format=`uuid`}}),hr=z(function(e,t,n){j.isULID(e)||n.report(M.ulid,`ulid`,n)},{toJSONSchema:e=>{e.pattern=`^[0-7][0-9A-HJKMNP-TV-Z]{25}$`}}),gr=z(function(e,t,n){j.isAscii(e)||n.report(M.ascii,`ascii`,n)}),_r=z(function(e,t,n){j.isIBAN(e)||n.report(M.iban,`iban`,n)}),vr=z(function(e,t,n){j.isJWT(e)||n.report(M.jwt,`jwt`,n)}),yr=z(function(e,t,n){j.isLatLong(e)||n.report(M.coordinates,`coordinates`,n)}),br=z(function(e,t,n){n.isValid&&n.mutate(e.trim(),n)}),xr=z(function(e,t,n){n.isValid&&n.mutate(lt.default.default(e,t),n)}),Sr=z(function(e,t,n){n.isValid&&n.mutate(e.toLocaleUpperCase(t),n)}),Cr=z(function(e,t,n){n.isValid&&n.mutate(e.toLocaleLowerCase(t),n)}),wr=z(function(e,t,n){n.isValid&&n.mutate(P(e),n)}),Tr=z(function(e,t,n){n.isValid&&n.mutate(ut.default.default(e),n)}),Er=z(function(e,t,n){n.isValid&&n.mutate(st(e,t),n)});var Dr=class e extends X{static rules={in:cr,jwt:vr,url:Xn,iban:_r,uuid:mr,ulid:hr,trim:br,email:Gn,alpha:Qn,ascii:gr,notIn:lr,regex:Jn,escape:Tr,sameAs:ar,mobile:Kn,string:Wn,hexCode:Yn,passport:dr,endsWith:rr,confirmed:sr,activeUrl:Zn,minLength:er,notSameAs:or,maxLength:tr,vat:fr,ipAddress:qn,creditCard:ur,postalCode:pr,startsWith:ir,toUpperCase:Sr,toLowerCase:Cr,toCamelCase:wr,fixedLength:nr,coordinates:yr,normalizeUrl:Er,alphaNumeric:$n,normalizeEmail:xr};[W]=`string`;[B]=`vine.string`;[V]=e=>typeof e==`string`;constructor(e,t){super(e,t||[]),this.dataTypeValidator=Wn()}url(...e){return this.use(Xn(...e))}activeUrl(){return this.use(Zn())}email(...e){return this.use(Gn(...e))}mobile(...e){return this.use(Kn(...e))}vat(...e){return this.use(fr(...e))}ipAddress(e){return this.use(qn(e?{version:e}:void 0))}hexCode(){return this.use(Yn())}regex(e){return this.use(Jn(e))}alpha(e){return this.use(Qn(e))}alphaNumeric(e){return this.use($n(e))}minLength(e){return this.use(er({min:e}))}maxLength(e){return this.use(tr({max:e}))}fixedLength(e){return this.use(nr({size:e}))}confirmed(e){return this.use(sr(e))}trim(){return this.use(br())}normalizeEmail(e){return this.use(xr(e))}toUpperCase(){return this.use(Sr())}toLowerCase(){return this.use(Cr())}toCamelCase(){return this.use(wr())}escape(){return this.use(Tr())}normalizeUrl(...e){return this.use(Er(...e))}startsWith(e){return this.use(ir({substring:e}))}endsWith(e){return this.use(rr({substring:e}))}sameAs(e){return this.use(ar({otherField:e}))}notSameAs(e){return this.use(or({otherField:e}))}in(e){return this.use(cr({choices:e}))}notIn(e){return this.use(lr({list:e}))}creditCard(...e){return this.use(ur(...e))}passport(...e){return this.use(dr(...e))}postalCode(...e){return this.use(pr(...e))}uuid(...e){return this.use(mr(...e))}ulid(){return this.use(hr())}ascii(){return this.use(gr())}iban(){return this.use(_r())}jwt(){return this.use(vr())}coordinates(){return this.use(yr())}clone(){return new e(this.cloneOptions(),this.cloneValidations())}};const Or=z(function(e,t,n){if(!n.isDefined)return!1;let r=t.strict?e:j.asNumber(e);return typeof r!=`number`||Number.isNaN(r)||r===1/0||r===-1/0?(n.report(M.number,`number`,n),!1):(n.mutate(r,n),!0)},{toJSONSchema:e=>{e.type=`number`}}),kr=z(function(e,t,n){e<t.min&&n.report(M.min,`min`,n,t)},{toJSONSchema:(e,t)=>{e.minimum=t.min}}),Ar=z(function(e,t,n){e>t.max&&n.report(M.max,`max`,n,t)},{toJSONSchema:(e,t)=>{e.maximum=t.max}}),jr=z(function(e,t,n){(e<t.min||e>t.max)&&n.report(M.range,`range`,n,t)},{toJSONSchema:(e,t)=>{e.minimum=t.min,e.maximum=t.max}}),Mr=z(function(e,t,n){e>0||n.report(M.positive,`positive`,n)},{toJSONSchema:e=>{e.minimum=0}}),Nr=z(function(e,t,n){e<0||n.report(M.negative,`negative`,n)},{toJSONSchema:e=>{e.exclusiveMaximum=0}}),Pr=z(function(e,t,n){e>=0||n.report(M.nonNegative,`nonNegative`,n)}),Fr=z(function(e,t,n){e<=0||n.report(M.nonPositive,`nonPositive`,n)}),Ir=z(function(e,t,n){j.isDecimal(String(e),{force_decimal:t.range[0]!==0,decimal_digits:t.range.join(`,`)})||n.report(M.decimal,`decimal`,n,{digits:t.range.join(`-`)})}),Lr=z(function(e,t,n){Number.isInteger(e)||n.report(M.withoutDecimals,`withoutDecimals`,n)},{toJSONSchema:e=>{e.type=`integer`}}),Rr=z(function(e,t,n){t.values.includes(e)||n.report(M[`number.in`],`in`,n,t)},{toJSONSchema:(e,t)=>{e.enum=t.values}});var zr=class e extends X{static rules={in:Rr,max:Ar,min:kr,range:jr,number:Or,decimal:Ir,negative:Nr,positive:Mr,nonNegativeRule:Pr,nonPositiveRule:Fr,withoutDecimals:Lr};[W]=`number`;[B]=`vine.number`;[V]=e=>{let t=j.asNumber(e);return!Number.isNaN(t)};constructor(e,t){super(e,t||[]),this.dataTypeValidator=Or(e||{})}min(e){return this.use(kr({min:e}))}max(e){return this.use(Ar({max:e}))}range(e){return this.use(jr({min:e[0],max:e[1]}))}positive(){return this.use(Mr())}negative(){return this.use(Nr())}nonNegative(){return this.use(Pr())}nonPositive(){return this.use(Fr())}decimal(e){return this.use(Ir({range:Array.isArray(e)?e:[e]}))}withoutDecimals(){return this.use(Lr())}clone(){return new e(this.cloneOptions(),this.cloneValidations())}in(e){return this.use(Rr({values:e}))}};const Br=z(function(e,t,n){let r=t.strict===!0?e:j.asBoolean(e);if(typeof r!=`boolean`){n.report(M.boolean,`boolean`,n);return}n.mutate(r,n)},{toJSONSchema:(e,{strict:t=!1})=>{t?e.type=`boolean`:e.enum=[...Fe,...Ie]}});var Vr=class e extends X{static rules={boolean:Br};[W]=`boolean`;[B]=`vine.boolean`;[V]=e=>typeof(this.options.strict===!0?e:j.asBoolean(e))==`boolean`;constructor(e,t){super(e,t||[Br(e||{})])}clone(){return new e(this.cloneOptions(),this.cloneValidations())}};const Hr=z(function(e,t,n){let r=j.compareValues(e,t.expectedValue);if(!r.isEqual){n.report(M.literal,`literal`,n,t);return}n.mutate(r.casted,n)});var Ur=class e extends X{static rules={equals:Hr};#e;[W]=`literal`;[V]=e=>j.compareValues(e,this.#e).isEqual;constructor(e,t,n){super(t,n||[Hr({expectedValue:e})]),this.#e=e,this[B]=`vine.literal.${this.#e}`}clone(){return new e(this.#e,this.cloneOptions(),this.cloneValidations())}toJSONSchema(){let e=super.toJSONSchema();return typeof this.#e==`string`&&(e.type=`string`,e.enum=[this.#e]),typeof this.#e==`boolean`&&(e.type=`boolean`,e.enum=[this.#e]),typeof this.#e==`number`&&(e.type=`number`,e.enum=[this.#e]),e}};const Wr=[`on`,`1`,`yes`,`true`,!0,1],Gr=z(function(e,t,n){Wr.includes(e)||n.report(M.accepted,`accepted`,n)});var Kr=class e extends X{static rules={accepted:Gr};[W]=`checkbox`;constructor(e,t){super(e,t||[Gr()])}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},qr=class e{#e;#t=(e,t)=>{t.report(M.unionGroup,`unionGroup`,t)};constructor(e){this.#e=e}toJSONSchema(){return{anyOf:this.#e.map(e=>e.toJSONSchema())}}clone(){let t=new e(this.#e);return t.otherwise(this.#t),t}otherwise(e){return this.#t=e,this}[H](e,t){return{type:`group`,elseConditionalFnRefId:e.trackConditional(this.#t),conditions:this.#e.map(n=>n[H](e,t))}}},Jr=class{#e;#t;constructor(e,t){this.#e=t,this.#t=e}toJSONSchema(){let e={},t=[];for(let[n,r]of Object.entries(this.#e))e[n]=r.toJSONSchema(),(!(`isOptional`in r)||r.isOptional!==!0)&&t.push(n);return{type:`object`,properties:e,required:t}}[H](e,t){return{schema:{type:`sub_object`,properties:Object.keys(this.#e).map(n=>this.#e[n][H](n,e,t)),groups:[]},conditionalFnRefId:e.trackConditional(this.#t)}}};function Yr(e){return new qr(e)}Yr.if=function(e,t){return new Jr(e,t)},Yr.else=function(e){return new Jr(()=>!0,e)};var Xr=class e extends X{static rules={enum:rn};#e;[W]=`enum`;constructor(e,t,n){super(t,n||[rn({choices:Object.values(e)})]),this.#e=e}clone(){return new e(this.#e,this.cloneOptions(),this.cloneValidations())}};const Zr=z(function(e,t,n){return n.isDefined?e instanceof File?!0:(n.report(M.nativeFile,`nativeFile`,n),!1):!1}),Qr=z(function(e,t,n){return e.size<t.min?(n.report(M[`nativeFile.minSize`],`nativeFile.minSize`,n,t),!1):!0}),$r=z(function(e,t,n){e.size>t.max&&n.report(M[`nativeFile.maxSize`],`nativeFile.maxSize`,n,t)}),ei=z((e,t,n)=>{let r=e.type;t.mimeTypes.includes(r)||n.report(M[`nativeFile.mimeTypes`],`nativeFile.mimeTypes`,n,t)});var ti=class e extends X{static rules={maxSize:$r,mimeTypes:ei,minSize:Qr};[W]=`nativeFile`;[B]=`vine.nativeFile`;[V]=e=>e instanceof File;constructor(e,t){super(e,t||[]),this.dataTypeValidator=Zr()}clone(){return new e(this.cloneOptions(),this.cloneValidations())}minSize(e){return this.use(Qr({min:e}))}maxSize(e){return this.use($r({max:e}))}mimeTypes(e){return this.use(ei({mimeTypes:e}))}},ni=class e{#e;#t=(e,t)=>{t.report(M.unionOfTypes,`unionOfTypes`,t)};constructor(e){this.#e=e}otherwise(e){return this.#t=e,this}clone(){let t=new e(this.#e.map(e=>e.clone()));return t.otherwise(this.#t),t}optional(){return new e([new Cn,...this.#e])}nullable(){return new e([new xn,...this.#e])}toJSONSchema(){return{anyOf:this.#e.map(e=>e.toJSONSchema?.()).filter(Boolean)}}[H](e,t,n){return{type:`union`,fieldName:e,propertyName:n.toCamelCase?P(e):e,elseConditionalFnRefId:t.trackConditional(this.#t),conditions:this.#e.map(r=>({conditionalFnRefId:t.trackConditional((e,t)=>r[V](e,t)),schema:r[H](e,t,n)}))}}},ri=class extends Ge{group=Yr;union=Tn;string(){return new Dr}boolean(e){return new Vr(e)}accepted(){return new Kr}number(e){return new zr(e)}date(e){return new bn(e)}literal(e){return new Ur(e)}optional(){return new Cn}null(){return new xn}object(e){return new Rn(e)}array(e){return new In(e)}tuple(e){return new kn(e)}record(e){return new Un(e)}enum(e){return Array.isArray(e)||typeof e==`function`?new an(e):new Xr(e)}any(){return new nn}unionOfTypes(e){let t=new Set;return e.forEach(e=>{if(!e[V]||!e[B])throw Error(`Cannot use "${e.constructor.name}". The schema type is not compatible for use with "vine.unionOfTypes"`);if(t.has(e[B]))throw Error(`Cannot use duplicate schema "${e[B]}". "vine.unionOfTypes" needs distinct schema types only`);t.add(e[B])}),t.clear(),new ni(e)}nativeFile(){return new ti}};const ii={required:M.required,array:M.array,object:M.object},ai={};var Q=class{#e;#t;messagesProvider;errorReporter;#n(e){let t=en();return{compilerNode:{type:`root`,schema:e[H](``,t,{toCamelCase:!1})},refs:t.toJSON()}}constructor(e,t){this.schema=e,this.options=t;let{compilerNode:n,refs:r}=this.#n(e);this.#e={schema:n,refs:r};let i=t.metaDataValidator,a=new $t(n,{convertEmptyStringsToNull:t.convertEmptyStringsToNull,messages:ii}).compile();this.errorReporter=t.errorReporter,this.messagesProvider=t.messagesProvider,i?this.validate=(e,t)=>{let n=t??ai,o=n.meta??{},s=n.errorReporter??this.errorReporter,c=n.messagesProvider??this.messagesProvider;return i(o),a(e,o,r,c,s())}:this.validate=(e,t)=>{let n=t??ai,i=n.meta??{},o=n.errorReporter??this.errorReporter;return a(e,i,r,n.messagesProvider??this.messagesProvider,o())}}async tryValidate(e,...[t]){try{return[null,await this.validate(e,t)]}catch(e){if(e instanceof Be)return[e,null];throw e}}toJSON(){let{schema:e,refs:t}=this.#e;return{schema:structuredClone(e),refs:t}}toJSONSchema(){return this.#t||=this.schema.toJSONSchema(),this.#t}"~standard"={version:1,vendor:`vinejs`,jsonSchema:{input:()=>this.toJSONSchema(),output:()=>{throw Error(`Vine.js does not support creating validators using JSON Schema.`)}},validate:async e=>{let[t,n]=await this.tryValidate(e,{});return n?{value:n}:{issues:t?.messages.map(e=>({...e,path:e.field}))}}}};const $=new class extends ri{messagesProvider=new ze(M,Ue);errorReporter=()=>new He;convertEmptyStringsToNull=!1;helpers=j;createRule=z;compile(e){return new Q(e,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter})}create(e){let t={convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter};return H in e?new Q(e,t):new Q(new Rn(e),t)}withMetaData(e){return{compile:t=>new Q(t,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter,metaDataValidator:e}),create:t=>{let n={convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter,metaDataValidator:e};return H in t?new Q(t,n):new Q(new Rn(t),n)}}}validate(e){return this.compile(e.schema).validate(e.data,e)}tryValidate(e){return this.compile(e.schema).tryValidate(e.data,e)}},oi=$.object({id:$.number(),created:$.date(),title:$.string().minLength(1).maxLength(100),type:$.enum([`jpg`,`png`]),size:$.number(),url:$.string().url()}),si=$.object({id:$.number(),stars:$.number().min(0).max(5),title:$.string().minLength(1).maxLength(100),text:$.string().minLength(1).maxLength(1e3),images:$.array(oi)}),ci=$.object({id:$.number(),created:$.date(),title:$.string().minLength(1).maxLength(100),brand:$.string().minLength(1).maxLength(30),description:$.string().minLength(1).maxLength(500),price:$.number().min(1).max(1e4),discount:$.number().min(1).max(100).nullable(),quantity:$.number().min(0).max(10),tags:$.array($.string().minLength(1).maxLength(30)),images:$.array(oi),ratings:$.array(si)});$.tryValidate({schema:ci,data:{}});
Created by eskimojo for Open Circle