From 042694503a12133eb087cdbb68e4b115618093d9 Mon Sep 17 00:00:00 2001 From: oxcom Date: Wed, 9 Sep 2020 15:49:26 +0200 Subject: [PATCH] build --- dist/constraint-validator.cjs.js | 2 +- dist/constraint-validator.esm.js | 2 +- dist/constraint-validator.umd.js | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/constraint-validator.cjs.js b/dist/constraint-validator.cjs.js index 882252c..2c2b463 100644 --- a/dist/constraint-validator.cjs.js +++ b/dist/constraint-validator.cjs.js @@ -1 +1 @@ -"use strict";var e=require("luxon");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(require("ipaddr.js"));function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,a=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function g(e){return t=e,n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),("number"==typeof t||"string"==typeof t&&-1===n.indexOf(t.slice(-1)))&&""!==t&&!isNaN(t);var t,n}function y(e){return"[object Date]"===Object.prototype.toString.call(e)&&e instanceof Date}function A(e){return null===e}function E(e){return Array.isArray(e)}function T(e){return"function"==typeof e}function C(e){return!(+(t=e)!==t||isFinite(t)&&!(t%1));var t}function S(e){return(t=e)===+t&&isFinite(t)&&!(t%1);var t}function L(e){return"[object Array]"!==Object.prototype.toString.call(e)&&null!==e&&("object"===a(e)&&e===Object(e))}function M(e){return"string"==typeof e}function b(e){return"string"!=typeof e?e:function(e,t){var n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),a=0,i=0;for(e+="",t&&(n=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),a=e.length,i=0;i=0;i--)if(-1===n.indexOf(e.charAt(i))){e=e.substring(0,i+1);break}return-1===n.indexOf(e.charAt(0))?e:""}(e,[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," ","\0"].join(""))}function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!E(e))throw new Error('Functions list must be type of "array", "'.concat(a(e),'" given.'));return e=e.filter((function(e){return T(e)})),function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 0===e.length?n:e.reduce((function(e,n){return n(e,l(l({},t),a))}),n)}}var P=function(){function e(){i(this,e),this.parameters={}}return o(e,[{key:"setParameter",value:function(e,t){if("string"!=typeof e||0===e.length)throw new Error("Invalid parameter name was provided: "+JSON.stringify(e));switch(!0){case void 0===t:t="undefined";break;case L(t):case E(t):try{t=JSON.stringify(t)}catch(e){t=t.toString()}break;case isNaN(t)&&"string"!=typeof t:t="NaN";break;case T(t):t="function() {}";break;case A(t):t="null";break;default:t+=""}return this.parameters["{{ ".concat(e," }}")]=t.toString(),this}},{key:"build",value:function(e){var t=this;if("string"!=typeof e)throw new Error("Invalid error message was provided.");return Object.keys(this.parameters).forEach((function(n){e=e.replace(n,t.parameters[n])})),this.parameters={},Error(e)}}]),e}();var N=function(){function e(t){i(this,e),this.fallback=t||"en-US"}return o(e,[{key:"getUserLocales",value:function(){return e=this.fallback,t=[],"undefined"!=typeof window&&(window.navigator.languages&&(t=t.concat(window.navigator.languages)),window.navigator.language&&t.push(window.navigator.language),window.navigator.userLanguage&&t.push(window.navigator.userLanguage),window.navigator.browserLanguage&&t.push(window.navigator.browserLanguage),window.navigator.systemLanguage&&t.push(window.navigator.systemLanguage)),t.push(e),t.filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){if(!e||-1===e.indexOf("-")||e.toLowerCase()!==e)return e;var t=e.split("-");return"".concat(t[0],"-").concat(t[1].toUpperCase())}));var e,t}},{key:"getUserLocale",value:function(){return this.getUserLocales()[0]}}],[{key:"canonicalize",value:function(e){if("string"!=typeof e||0===e.length||"."===e.charAt(0))return"en-US";var t=e.match(/^([a-z]{2})[-_]([a-z]{2})(?:([a-z]{2})(?:[-_]([a-z]{2}))?)?(?:\..*)?$/i);if(null===t)return e;var n,a=[t[1].toLowerCase()];return void 0===t[3]?a.push(t[2].toUpperCase()):a.push((n=t[2].toLowerCase()+t[3].toLowerCase(),(n+="").charAt(0).toUpperCase()+n.substr(1))),void 0!==t[4]&&a.push(t[4].toUpperCase()),a.join("_")}},{key:"DEFAULT_LOCALE",get:function(){return"en-US"}}]),e}(),O=new N,B=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.options=l(l({},this.getDefaultOptions()),n),this.getRequiredOptions().forEach((function(e){if(void 0===t.options[e])throw new Error('No "'.concat(e,'" option is configured.'))})),this.locale_string=this.options.locale_string||O.getUserLocale(),this.locale_options=this.options.locale_options||{},this.violationBuilder=new P}return o(e,[{key:"getDefaultOptions",value:function(){return{}}},{key:"getRequiredOptions",value:function(){return[]}},{key:"getViolationBuilder",value:function(){return this.violationBuilder}},{key:"validate",value:function(e,t){throw new Error("The validate() method was not implemented")}},{key:"isEmptyValue",value:function(e){return"string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==a(e)&&"function"!=typeof e&&isNaN(e)||null==e}},{key:"formatDateValue",value:function(e){return new Intl.DateTimeFormat(this.locale_string,this.locale_options).format(e)}}]),e}(),I=function(e){c(n,B);var t=h(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),(e=t.call(this,a)).options.strict=!!e.options.strict,e}return o(n,[{key:"getDefaultOptions",value:function(){return{strict:!1,message_strict:"This values has different types. Given type is {{ value_type }}; Expected type is {{ compared_type }}."}}},{key:"getRequiredOptions",value:function(){return["value","strict"]}},{key:"compare",value:function(e,t){throw new Error("The compare() method was not implemented")}},{key:"validate",value:function(e){var t=this.options.value;return this.options.strict&&a(t)!==a(e)?this.getViolationBuilder().setParameter("value_type",y(e)?"Date object":a(e)).setParameter("compared_type",y(t)?"Date object":a(t)).build(this.options.message_strict):(y(t)&&(e="now"===e?new Date:new Date(e)),this.compare(e,t)?void 0:(e=y(e)?this.formatDateValue(e):e,t=y(t)?this.formatDateValue(t):t,this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",t).setParameter("compared_value_type",a(t)).build(this.options.message)))}}]),n}(),k=function(e){c(n,B);var t=h(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),(e=t.call(this,a)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message_min:"This value is too short. It should have {{ limit }} character(s) or more.",message_max:"This value is too long. It should have {{ limit }} character(s) or less.",message_exact:"This value should have exactly {{ limit }} character(s)."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),"string"==typeof e){var t=e.length;return null!==this.options.min&&this.options.min===this.options.max&&t!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&t>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&t0&&void 0!==arguments[0]?arguments[0]:{};i(this,n),e=t.call(this,a);var r=["simple_regexp","html5_regexp","html5_input"];if(!r.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:"html5_regexp",message:"This value is not valid email."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case"simple_regexp":if(!function(e){return/^.+@\S+\.\S+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5_regexp":if(!function(e){return/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5_input":if(!function(e){var t=document.createElement("input");return t.setAttribute("type","email"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_SIMPLE",get:function(){return"simple_regexp"}},{key:"MODE_HTML5",get:function(){return"html5_regexp"}},{key:"MODE_HTML5_INPUT",get:function(){return"html5_input"}}]),n}(),G=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be blank."}}},{key:"validate",value:function(e){if("string"==typeof e&&e.length>0||"string"!=typeof e&&"object"!==a(e)&&!isNaN(e)&&null!=e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),w=[{a2:"AF",a3:"AFG",n:"004"},{a2:"AX",a3:"ALA",n:"248"},{a2:"AL",a3:"ALB",n:"008"},{a2:"DZ",a3:"DZA",n:"012"},{a2:"AS",a3:"ASM",n:"016"},{a2:"AD",a3:"AND",n:"020"},{a2:"AO",a3:"AGO",n:"024"},{a2:"AI",a3:"AIA",n:"660"},{a2:"AQ",a3:"ATA",n:"010"},{a2:"AG",a3:"ATG",n:"028"},{a2:"AR",a3:"ARG",n:"032"},{a2:"AM",a3:"ARM",n:"051"},{a2:"AW",a3:"ABW",n:"533"},{a2:"AU",a3:"AUS",n:"036"},{a2:"AT",a3:"AUT",n:"040"},{a2:"AZ",a3:"AZE",n:"031"},{a2:"BS",a3:"BHS",n:"044"},{a2:"BH",a3:"BHR",n:"048"},{a2:"BD",a3:"BGD",n:"050"},{a2:"BB",a3:"BRB",n:"052"},{a2:"BY",a3:"BLR",n:"112"},{a2:"BE",a3:"BEL",n:"056"},{a2:"BZ",a3:"BLZ",n:"084"},{a2:"BJ",a3:"BEN",n:"204"},{a2:"BM",a3:"BMU",n:"060"},{a2:"BT",a3:"BTN",n:"064"},{a2:"BO",a3:"BOL",n:"068"},{a2:"BQ",a3:"BES",n:"535"},{a2:"BA",a3:"BIH",n:"070"},{a2:"BW",a3:"BWA",n:"072"},{a2:"BV",a3:"BVT",n:"074"},{a2:"BR",a3:"BRA",n:"076"},{a2:"IO",a3:"IOT",n:"086"},{a2:"BN",a3:"BRN",n:"096"},{a2:"BG",a3:"BGR",n:"100"},{a2:"BF",a3:"BFA",n:"854"},{a2:"BI",a3:"BDI",n:"108"},{a2:"CV",a3:"CPV",n:"132"},{a2:"KH",a3:"KHM",n:"116"},{a2:"CM",a3:"CMR",n:"120"},{a2:"CA",a3:"CAN",n:"124"},{a2:"KY",a3:"CYM",n:"136"},{a2:"CF",a3:"CAF",n:"140"},{a2:"TD",a3:"TCD",n:"148"},{a2:"CL",a3:"CHL",n:"152"},{a2:"CN",a3:"CHN",n:"156"},{a2:"CX",a3:"CXR",n:"162"},{a2:"CC",a3:"CCK",n:"166"},{a2:"CO",a3:"COL",n:"170"},{a2:"KM",a3:"COM",n:"174"},{a2:"CG",a3:"COG",n:"178"},{a2:"CD",a3:"COD",n:"180"},{a2:"CK",a3:"COK",n:"184"},{a2:"CR",a3:"CRI",n:"188"},{a2:"CI",a3:"CIV",n:"384"},{a2:"HR",a3:"HRV",n:"191"},{a2:"CU",a3:"CUB",n:"192"},{a2:"CW",a3:"CUW",n:"531"},{a2:"CY",a3:"CYP",n:"196"},{a2:"CZ",a3:"CZE",n:"203"},{a2:"DK",a3:"DNK",n:"208"},{a2:"DJ",a3:"DJI",n:"262"},{a2:"DM",a3:"DMA",n:"212"},{a2:"DO",a3:"DOM",n:"214"},{a2:"EC",a3:"ECU",n:"218"},{a2:"EG",a3:"EGY",n:"818"},{a2:"SV",a3:"SLV",n:"222"},{a2:"GQ",a3:"GNQ",n:"226"},{a2:"ER",a3:"ERI",n:"232"},{a2:"EE",a3:"EST",n:"233"},{a2:"SZ",a3:"SWZ",n:"748"},{a2:"ET",a3:"ETH",n:"231"},{a2:"FK",a3:"FLK",n:"238"},{a2:"FO",a3:"FRO",n:"234"},{a2:"FJ",a3:"FJI",n:"242"},{a2:"FI",a3:"FIN",n:"246"},{a2:"FR",a3:"FRA",n:"250"},{a2:"GF",a3:"GUF",n:"254"},{a2:"PF",a3:"PYF",n:"258"},{a2:"TF",a3:"ATF",n:"260"},{a2:"GA",a3:"GAB",n:"266"},{a2:"GM",a3:"GMB",n:"270"},{a2:"GE",a3:"GEO",n:"268"},{a2:"DE",a3:"DEU",n:"276"},{a2:"GH",a3:"GHA",n:"288"},{a2:"GI",a3:"GIB",n:"292"},{a2:"GR",a3:"GRC",n:"300"},{a2:"GL",a3:"GRL",n:"304"},{a2:"GD",a3:"GRD",n:"308"},{a2:"GP",a3:"GLP",n:"312"},{a2:"GU",a3:"GUM",n:"316"},{a2:"GT",a3:"GTM",n:"320"},{a2:"GG",a3:"GGY",n:"831"},{a2:"GN",a3:"GIN",n:"324"},{a2:"GW",a3:"GNB",n:"624"},{a2:"GY",a3:"GUY",n:"328"},{a2:"HT",a3:"HTI",n:"332"},{a2:"HM",a3:"HMD",n:"334"},{a2:"VA",a3:"VAT",n:"336"},{a2:"HN",a3:"HND",n:"340"},{a2:"HK",a3:"HKG",n:"344"},{a2:"HU",a3:"HUN",n:"348"},{a2:"IS",a3:"ISL",n:"352"},{a2:"IN",a3:"IND",n:"356"},{a2:"ID",a3:"IDN",n:"360"},{a2:"IR",a3:"IRN",n:"364"},{a2:"IQ",a3:"IRQ",n:"368"},{a2:"IE",a3:"IRL",n:"372"},{a2:"IM",a3:"IMN",n:"833"},{a2:"IL",a3:"ISR",n:"376"},{a2:"IT",a3:"ITA",n:"380"},{a2:"JM",a3:"JAM",n:"388"},{a2:"JP",a3:"JPN",n:"392"},{a2:"JE",a3:"JEY",n:"832"},{a2:"JO",a3:"JOR",n:"400"},{a2:"KZ",a3:"KAZ",n:"398"},{a2:"KE",a3:"KEN",n:"404"},{a2:"KI",a3:"KIR",n:"296"},{a2:"KP",a3:"PRK",n:"408"},{a2:"KR",a3:"KOR",n:"410"},{a2:"KW",a3:"KWT",n:"414"},{a2:"KG",a3:"KGZ",n:"417"},{a2:"LA",a3:"LAO",n:"418"},{a2:"LV",a3:"LVA",n:"428"},{a2:"LB",a3:"LBN",n:"422"},{a2:"LS",a3:"LSO",n:"426"},{a2:"LR",a3:"LBR",n:"430"},{a2:"LY",a3:"LBY",n:"434"},{a2:"LI",a3:"LIE",n:"438"},{a2:"LT",a3:"LTU",n:"440"},{a2:"LU",a3:"LUX",n:"442"},{a2:"MO",a3:"MAC",n:"446"},{a2:"MG",a3:"MDG",n:"450"},{a2:"MW",a3:"MWI",n:"454"},{a2:"MY",a3:"MYS",n:"458"},{a2:"MV",a3:"MDV",n:"462"},{a2:"ML",a3:"MLI",n:"466"},{a2:"MT",a3:"MLT",n:"470"},{a2:"MH",a3:"MHL",n:"584"},{a2:"MQ",a3:"MTQ",n:"474"},{a2:"MR",a3:"MRT",n:"478"},{a2:"MU",a3:"MUS",n:"480"},{a2:"YT",a3:"MYT",n:"175"},{a2:"MX",a3:"MEX",n:"484"},{a2:"FM",a3:"FSM",n:"583"},{a2:"MD",a3:"MDA",n:"498"},{a2:"MC",a3:"MCO",n:"492"},{a2:"MN",a3:"MNG",n:"496"},{a2:"ME",a3:"MNE",n:"499"},{a2:"MS",a3:"MSR",n:"500"},{a2:"MA",a3:"MAR",n:"504"},{a2:"MZ",a3:"MOZ",n:"508"},{a2:"MM",a3:"MMR",n:"104"},{a2:"NA",a3:"NAM",n:"516"},{a2:"NR",a3:"NRU",n:"520"},{a2:"NP",a3:"NPL",n:"524"},{a2:"NL",a3:"NLD",n:"528"},{a2:"NC",a3:"NCL",n:"540"},{a2:"NZ",a3:"NZL",n:"554"},{a2:"NI",a3:"NIC",n:"558"},{a2:"NE",a3:"NER",n:"562"},{a2:"NG",a3:"NGA",n:"566"},{a2:"NU",a3:"NIU",n:"570"},{a2:"NF",a3:"NFK",n:"574"},{a2:"MK",a3:"MKD",n:"807"},{a2:"MP",a3:"MNP",n:"580"},{a2:"NO",a3:"NOR",n:"578"},{a2:"OM",a3:"OMN",n:"512"},{a2:"PK",a3:"PAK",n:"586"},{a2:"PW",a3:"PLW",n:"585"},{a2:"PS",a3:"PSE",n:"275"},{a2:"PA",a3:"PAN",n:"591"},{a2:"PG",a3:"PNG",n:"598"},{a2:"PY",a3:"PRY",n:"600"},{a2:"PE",a3:"PER",n:"604"},{a2:"PH",a3:"PHL",n:"608"},{a2:"PN",a3:"PCN",n:"612"},{a2:"PL",a3:"POL",n:"616"},{a2:"PT",a3:"PRT",n:"620"},{a2:"PR",a3:"PRI",n:"630"},{a2:"QA",a3:"QAT",n:"634"},{a2:"RE",a3:"REU",n:"638"},{a2:"RO",a3:"ROU",n:"642"},{a2:"RU",a3:"RUS",n:"643"},{a2:"RW",a3:"RWA",n:"646"},{a2:"BL",a3:"BLM",n:"652"},{a2:"SH",a3:"SHN",n:"654"},{a2:"KN",a3:"KNA",n:"659"},{a2:"LC",a3:"LCA",n:"662"},{a2:"MF",a3:"MAF",n:"663"},{a2:"PM",a3:"SPM",n:"666"},{a2:"VC",a3:"VCT",n:"670"},{a2:"WS",a3:"WSM",n:"882"},{a2:"SM",a3:"SMR",n:"674"},{a2:"ST",a3:"STP",n:"678"},{a2:"SA",a3:"SAU",n:"682"},{a2:"SN",a3:"SEN",n:"686"},{a2:"RS",a3:"SRB",n:"688"},{a2:"SC",a3:"SYC",n:"690"},{a2:"SL",a3:"SLE",n:"694"},{a2:"SG",a3:"SGP",n:"702"},{a2:"SX",a3:"SXM",n:"534"},{a2:"SK",a3:"SVK",n:"703"},{a2:"SI",a3:"SVN",n:"705"},{a2:"SB",a3:"SLB",n:"090"},{a2:"SO",a3:"SOM",n:"706"},{a2:"ZA",a3:"ZAF",n:"710"},{a2:"GS",a3:"SGS",n:"239"},{a2:"SS",a3:"SSD",n:"728"},{a2:"ES",a3:"ESP",n:"724"},{a2:"LK",a3:"LKA",n:"144"},{a2:"SD",a3:"SDN",n:"729"},{a2:"SR",a3:"SUR",n:"740"},{a2:"SJ",a3:"SJM",n:"744"},{a2:"SE",a3:"SWE",n:"752"},{a2:"CH",a3:"CHE",n:"756"},{a2:"SY",a3:"SYR",n:"760"},{a2:"TW",a3:"TWN",n:"158"},{a2:"TJ",a3:"TJK",n:"762"},{a2:"TZ",a3:"TZA",n:"834"},{a2:"TH",a3:"THA",n:"764"},{a2:"TL",a3:"TLS",n:"626"},{a2:"TG",a3:"TGO",n:"768"},{a2:"TK",a3:"TKL",n:"772"},{a2:"TO",a3:"TON",n:"776"},{a2:"TT",a3:"TTO",n:"780"},{a2:"TN",a3:"TUN",n:"788"},{a2:"TR",a3:"TUR",n:"792"},{a2:"TM",a3:"TKM",n:"795"},{a2:"TC",a3:"TCA",n:"796"},{a2:"TV",a3:"TUV",n:"798"},{a2:"UG",a3:"UGA",n:"800"},{a2:"UA",a3:"UKR",n:"804"},{a2:"AE",a3:"ARE",n:"784"},{a2:"GB",a3:"GBR",n:"826"},{a2:"US",a3:"USA",n:"840"},{a2:"UM",a3:"UMI",n:"581"},{a2:"UY",a3:"URY",n:"858"},{a2:"UZ",a3:"UZB",n:"860"},{a2:"VU",a3:"VUT",n:"548"},{a2:"VE",a3:"VEN",n:"862"},{a2:"VN",a3:"VNM",n:"704"},{a2:"VG",a3:"VGB",n:"092"},{a2:"VI",a3:"VIR",n:"850"},{a2:"WF",a3:"WLF",n:"876"},{a2:"EH",a3:"ESH",n:"732"},{a2:"YE",a3:"YEM",n:"887"},{a2:"ZM",a3:"ZMB",n:"894"},{a2:"ZW",a3:"ZWE",n:"716"},{a2:"XK",a3:"XKX",n:"383"}];var U=function(e){c(n,B);var t=h(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,n),e=t.call(this,a);var r=["alpha2","alpha3","numeric"];if(!r.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid country.",mode:"alpha2"}}},{key:"validate",value:function(e){if(g(e)&&(e=String(e).padStart(3,"0")),this.options.trim&&(e=b(e)),!this.isEmptyValue(e))return"string"==typeof e&&(function(e,t){return"alpha2"===t&&void 0!==w.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return"alpha3"===t&&void 0!==w.find((function(t){return t.a3.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return"numeric"===t&&void 0!==w.find((function(t){return t.n.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode))?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}],[{key:"MODE_ALPHA2",get:function(){return"alpha2"}},{key:"MODE_ALPHA3",get:function(){return"alpha3"}},{key:"MODE_NUMERIC",get:function(){return"numeric"}}]),n}(),V=["ADP","AED","AFA","AFN","ALK","ALL","AMD","ANG","AOA","AOK","AON","AOR","ARA","ARL","ARM","ARP","ARS","ATS","AUD","AWG","AZM","AZN","BAD","BAM","BAN","BBD","BDT","BEC","BEF","BEL","BGL","BGM","BGN","BGO","BHD","BIF","BMD","BND","BOB","BOL","BOP","BOV","BRB","BRC","BRE","BRL","BRN","BRR","BRZ","BSD","BTN","BUK","BWP","BYB","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLE","CLF","CLP","CNH","CNX","CNY","COP","COU","CRC","CSD","CSK","CUC","CUP","CVE","CYP","CZK","DDM","DEM","DJF","DKK","DOP","DZD","ECS","ECV","EEK","EGP","ERN","ESA","ESB","ESP","ETB","EUR","FIM","FJD","FKP","FRF","GBP","GEK","GEL","GHC","GHS","GIP","GMD","GNF","GNS","GQE","GRD","GTQ","GWE","GWP","GYD","HKD","HNL","HRD","HRK","HTG","HUF","IDR","IEP","ILP","ILR","ILS","INR","IQD","IRR","ISJ","ISK","ITL","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRH","KRO","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LTT","LUC","LUF","LUL","LVL","LVR","LYD","MAD","MAF","MCF","MDC","MDL","MGA","MGF","MKD","MKN","MLF","MMK","MNT","MOP","MRO","MRU","MTL","MTP","MUR","MVP","MVR","MWK","MXN","MXP","MXV","MYR","MZE","MZM","MZN","NAD","NGN","NIC","NIO","NLG","NOK","NPR","NZD","OMR","PAB","PEI","PEN","PES","PGK","PHP","PKR","PLN","PLZ","PTE","PYG","QAR","RHD","ROL","RON","RSD","RUB","RUR","RWF","SAR","SBD","SCR","SDD","SDG","SDP","SEK","SGD","SHP","SIT","SKK","SLL","SOS","SRD","SRG","SSP","STD","STN","SUR","SVC","SYP","SZL","THB","TJR","TJS","TMM","TMT","TND","TOP","TPE","TRL","TRY","TTD","TWD","TZS","UAH","UAK","UGS","UGX","USD","USN","USS","UYI","UYP","UYU","UYW","UZS","VEB","VEF","VES","VND","VNN","VUV","WST","XAF","XCD","XEU","XFO","XFU","XOF","XPF","XRE","YDD","YER","YUD","YUM","YUN","YUR","ZAL","ZAR","ZMK","ZMW","ZRN","ZRZ","ZWD","ZWL","ZWR"],Z=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid currency."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e))return"string"==typeof e&&V.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),$=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be blank.",allow_null:!1}}},{key:"validate",value:function(e){if("string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==a(e)&&isNaN(e)||void 0===e||!this.options.allow_null&&null===e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}();var F=function(e){c(n,B);var t=h(n);function n(e){var a;if(i(this,n),a=t.call(this,e),!["regexp","url_api","html5"].includes(a.options.mode))throw new Error("Invalid validation mode provided: ".concat(a.options.mode));return a}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:"url_api",message:"This value is not a valid URL."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case"regexp":if(!function(e){return!(null===e.match(/^(https?:\/\/|ftps?:\/\/)?([a-z0-9%\-]+\.){1,}([a-z0-9\-]+)?(:(\d{1,5}))?(\/([a-z0-9\-._~:\/\?#\[\]@!$&'\(\)\*\+,;=%]+)?)?$/i))}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"url_api":if(!function(e){try{new URL(e)}catch(e){return!1}return!0}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5":if(!function(e){var t=document.createElement("input");return t.setAttribute("type","url"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_REGEXP",get:function(){return"regexp"}},{key:"MODE_URL_API",get:function(){return"url_api"}},{key:"MODE_HTML5",get:function(){return"html5"}}]),n}(),Y=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be false."}}},{key:"validate",value:function(e){if(!1!==e&&0!==e&&"0"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),K=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be true."}}},{key:"validate",value:function(e){if(!0!==e&&1!==e&&"1"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),H=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be valid JSON."}}},{key:"validate",value:function(e){try{JSON.parse(e)}catch(t){return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(),x=function(e){c(n,I);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return y(e)&&y(t)?e.getTime()===t.getTime():e==t}}]),n}(),W=function(e){c(n,I);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should not be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return y(e)&&y(t)?e.getTime()!==t.getTime():e!=t}}]),n}(),j=function(e){c(n,I);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return y(e)&&y(t)?e.getTime()>t.getTime():e>t}}]),n}(),J=function(e){c(n,I);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than or equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return y(e)&&y(t)?e.getTime()>=t.getTime():e>=t}}]),n}(),z=function(e){c(n,I);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be less than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return y(e)&&y(t)?e.getTime()0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),e.strict=!0,e.value=0,t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative."})}}]),n}(),Q=function(e){c(n,X);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),e.strict=!0,e.value=0,t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative or zero."})}}]),n}(),ee=function(e){c(n,j);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),e.strict=!0,e.value=0,t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive."})}}]),n}(),te=function(e){c(n,J);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),e.strict=!0,e.value=0,t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive or zero."})}}]),n}(),ne=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be null."}}},{key:"validate",value:function(e){if(!A(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),ae=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be null."}}},{key:"validate",value:function(e){if(A(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},re=function(e){return!("undefined"!=typeof process||!process.env||!process.env[e])&&process.env[e]},oe="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},se=function(e,t){var n=re,a="",i=[],r=0,o=function e(t){if(t instanceof RegExp)return new RegExp(t);if(t instanceof Date)return new Date(t);var n={};for(var a in t)"object"===oe(t[a])?n[a]=e(t[a]):n[a]=t[a];return n},s="undefined"!=typeof window?window:ie;s.$locutus=s.$locutus||{};var u=s.$locutus;if(u.php=u.php||{},u.php.locales&&u.php.locales.fr_CA&&u.php.locales.fr_CA.LC_TIME&&u.php.locales.fr_CA.LC_TIME.x||(u.php.locales={},u.php.locales.en={LC_COLLATE:function(e,t){return e===t?0:e>t?1:-1},LC_CTYPE:{an:/^[A-Za-z\d]+$/g,al:/^[A-Za-z]+$/g,ct:/^[\u0000-\u001F\u007F]+$/g,dg:/^[\d]+$/g,gr:/^[\u0021-\u007E]+$/g,lw:/^[a-z]+$/g,pr:/^[\u0020-\u007E]+$/g,pu:/^[\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]+$/g,sp:/^[\f\n\r\t\v ]+$/g,up:/^[A-Z]+$/g,xd:/^[A-Fa-f\d]+$/g,CODESET:"UTF-8",lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"},LC_TIME:{a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %r %Z",p:["AM","PM"],P:["am","pm"],r:"%I:%M:%S %p",x:"%m/%d/%Y",X:"%r",alt_digits:"",ERA:"",ERA_YEAR:"",ERA_D_T_FMT:"",ERA_D_FMT:"",ERA_T_FMT:""},LC_MONETARY:{int_curr_symbol:"USD",currency_symbol:"$",mon_decimal_point:".",mon_thousands_sep:",",mon_grouping:[3],positive_sign:"",negative_sign:"-",int_frac_digits:2,frac_digits:2,p_cs_precedes:1,p_sep_by_space:0,n_cs_precedes:1,n_sep_by_space:0,p_sign_posn:3,n_sign_posn:0},LC_NUMERIC:{decimal_point:".",thousands_sep:",",grouping:[3]},LC_MESSAGES:{YESEXPR:"^[yY].*",NOEXPR:"^[nN].*",YESSTR:"",NOSTR:""},nplurals:function(e){return 1!==e?1:0}},u.php.locales.en_US=o(u.php.locales.en),u.php.locales.en_US.LC_TIME.c="%a %d %b %Y %r %Z",u.php.locales.en_US.LC_TIME.x="%D",u.php.locales.en_US.LC_TIME.X="%r",u.php.locales.en_US.LC_MONETARY.int_curr_symbol="USD ",u.php.locales.en_US.LC_MONETARY.p_sign_posn=1,u.php.locales.en_US.LC_MONETARY.n_sign_posn=1,u.php.locales.en_US.LC_MONETARY.mon_grouping=[3,3],u.php.locales.en_US.LC_NUMERIC.thousands_sep="",u.php.locales.en_US.LC_NUMERIC.grouping=[],u.php.locales.en_GB=o(u.php.locales.en),u.php.locales.en_GB.LC_TIME.r="%l:%M:%S %P %Z",u.php.locales.en_AU=o(u.php.locales.en_GB),u.php.locales.C=o(u.php.locales.en),u.php.locales.C.LC_CTYPE.CODESET="ANSI_X3.4-1968",u.php.locales.C.LC_MONETARY={int_curr_symbol:"",currency_symbol:"",mon_decimal_point:"",mon_thousands_sep:"",mon_grouping:[],p_cs_precedes:127,p_sep_by_space:127,n_cs_precedes:127,n_sep_by_space:127,p_sign_posn:127,n_sign_posn:127,positive_sign:"",negative_sign:"",int_frac_digits:127,frac_digits:127},u.php.locales.C.LC_NUMERIC={decimal_point:".",thousands_sep:"",grouping:[]},u.php.locales.C.LC_TIME.c="%a %b %e %H:%M:%S %Y",u.php.locales.C.LC_TIME.x="%m/%d/%y",u.php.locales.C.LC_TIME.X="%H:%M:%S",u.php.locales.C.LC_MESSAGES.YESEXPR="^[yY]",u.php.locales.C.LC_MESSAGES.NOEXPR="^[nN]",u.php.locales.fr=o(u.php.locales.en),u.php.locales.fr.nplurals=function(e){return e>1?1:0},u.php.locales.fr.LC_TIME.a=["dim","lun","mar","mer","jeu","ven","sam"],u.php.locales.fr.LC_TIME.A=["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],u.php.locales.fr.LC_TIME.b=["jan","fév","mar","avr","mai","jun","jui","aoû","sep","oct","nov","déc"],u.php.locales.fr.LC_TIME.B=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],u.php.locales.fr.LC_TIME.c="%a %d %b %Y %T %Z",u.php.locales.fr.LC_TIME.p=["",""],u.php.locales.fr.LC_TIME.P=["",""],u.php.locales.fr.LC_TIME.x="%d.%m.%Y",u.php.locales.fr.LC_TIME.X="%T",u.php.locales.fr_CA=o(u.php.locales.fr),u.php.locales.fr_CA.LC_TIME.x="%Y-%m-%d"),!u.php.locale&&(u.php.locale="en_US","undefined"!=typeof window&&window.document)){var l=window.document,c="https://www.w3.org/1999/xhtml",p="https://www.w3.org/XML/1998/namespace";l.getElementsByTagNameNS&&l.getElementsByTagNameNS(c,"html")[0]?l.getElementsByTagNameNS(c,"html")[0].getAttributeNS&&l.getElementsByTagNameNS(c,"html")[0].getAttributeNS(p,"lang")?u.php.locale=l.getElementsByTagName(c,"html")[0].getAttributeNS(p,"lang"):l.getElementsByTagNameNS(c,"html")[0].lang&&(u.php.locale=l.getElementsByTagNameNS(c,"html")[0].lang):l.getElementsByTagName("html")[0]&&l.getElementsByTagName("html")[0].lang&&(u.php.locale=l.getElementsByTagName("html")[0].lang)}if(u.php.locale=u.php.locale.replace("-","_"),u.php.locale in u.php.locales||u.php.locale.replace(/_[a-zA-Z]+$/,"")in u.php.locales&&(u.php.locale=u.php.locale.replace(/_[a-zA-Z]+$/,"")),u.php.localeCategories||(u.php.localeCategories={LC_COLLATE:u.php.locale,LC_CTYPE:u.php.locale,LC_MONETARY:u.php.locale,LC_NUMERIC:u.php.locale,LC_TIME:u.php.locale,LC_MESSAGES:u.php.locale}),null===t||""===t)t=n(e)||n("LANG");else if("[object Array]"===Object.prototype.toString.call(t))for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,n),e=t.call(this,a);var r=["array","date","bool","boolean","function","float","integer","null","numeric","object","string","double","int","ctype_alnum","ctype_alpha","ctype_cntrl","ctype_digit","ctype_graph","ctype_lower","ctype_print","ctype_punct","ctype_space","ctype_upper","ctype_xdigit"];if(!r.includes(e.options.type))throw new Error("Invalid type provided: ".concat(e.options.type));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be of type {{ type }}."}}},{key:"getRequiredOptions",value:function(){return["type"]}},{key:"validate",value:function(e){var t,n=!1;switch(this.options.type){case"array":n=E(e);break;case"date":n=y(e);break;case"bool":case"boolean":n=!0===(t=e)||!1===t;break;case"function":n=T(e);break;case"float":case"double":n=C(e);break;case"int":case"integer":n=S(e);break;case"null":n=A(e);break;case"numeric":n=g(e);break;case"object":n=L(e);break;case"string":n=M(e);break;case"ctype_alnum":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.an)}(e);break;case"ctype_alpha":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.al)}(e);break;case"ctype_cntrl":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.ct)}(e);break;case"ctype_digit":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.dg)}(e);break;case"ctype_graph":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.gr)}(e);break;case"ctype_lower":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.lw)}(e);break;case"ctype_print":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pr)}(e);break;case"ctype_punct":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pu)}(e);break;case"ctype_space":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.sp)}(e);break;case"ctype_upper":n=ue(e);break;case"ctype_xdigit":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.xd)}(e)}if(!n)return this.getViolationBuilder().setParameter("value",e).setParameter("type",this.options.type).build(this.options.message)}}],[{key:"TYPE_ARRAY",get:function(){return"array"}},{key:"TYPE_DATE",get:function(){return"date"}},{key:"TYPE_BOOL",get:function(){return"bool"}},{key:"TYPE_BOOLEAN",get:function(){return"boolean"}},{key:"TYPE_FUNCTION",get:function(){return"function"}},{key:"TYPE_FLOAT",get:function(){return"float"}},{key:"TYPE_DOUBLE",get:function(){return"double"}},{key:"TYPE_INT",get:function(){return"int"}},{key:"TYPE_INTEGER",get:function(){return"integer"}},{key:"TYPE_NULL",get:function(){return"null"}},{key:"TYPE_NUMERIC",get:function(){return"numeric"}},{key:"TYPE_OBJECT",get:function(){return"object"}},{key:"TYPE_STRING",get:function(){return"string"}},{key:"CTYPE_ALNUM",get:function(){return"ctype_alnum"}},{key:"CTYPE_ALPHA",get:function(){return"ctype_alpha"}},{key:"CTYPE_CNTRL",get:function(){return"ctype_cntrl"}},{key:"CTYPE_DIGIT",get:function(){return"ctype_digit"}},{key:"CTYPE_GRAPH",get:function(){return"ctype_graph"}},{key:"CTYPE_LOWER",get:function(){return"ctype_lower"}},{key:"CTYPE_PRINT",get:function(){return"ctype_print"}},{key:"CTYPE_PUNCT",get:function(){return"ctype_punct"}},{key:"CTYPE_SPACE",get:function(){return"ctype_space"}},{key:"CTYPE_UPPER",get:function(){return"ctype_upper"}},{key:"CTYPE_XDIGIT",get:function(){return"ctype_xdigit"}}]),n}(),ce=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,n),!(e=t.call(this,r)).options.choices||!E(e.options.choices))throw new Error('Choices list should be type of "array", "'.concat(a(e.options.choices),'" given.'));return(e.options.min||e.options.max)&&(e.options.multiple=!0),e}return o(n,[{key:"getDefaultOptions",value:function(){return{multiple:!1,min:0,max:0,message:"The value you selected is not a valid choice.",message_min:"You must select at least {{ limit }} choices.",message_max:"You must select at most {{ limit }} choices.",message_multiple:"One or more of the given values is invalid."}}},{key:"getRequiredOptions",value:function(){return["choices"]}},{key:"validate",value:function(e){if(this.options.multiple&&!Array.isArray(e))return this.getViolationBuilder().build('Values list should be type of "array", "'.concat(a(e),'" given.'));if(!this.isEmptyValue(e))if(this.options.multiple){for(var t=0;t0&&e.length0&&e.length>this.options.max)return this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message_max)}else if(!this.options.choices.includes(e))return this.getViolationBuilder().setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message)}}]),n}(),pe='Provided value should be countable, "{{ type }}" given.',de=function(e){c(n,B);var t=h(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),(e=t.call(this,a)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return o(n,[{key:"getDefaultOptions",value:function(){return{message_min:"This collection should contain {{ limit }} elements or more.",message_max:"This collection should contain {{ limit }} elements or less.",message_exact:"This collection should contain exactly {{ limit }} elements."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(null==(t=e)||M(t)||!(E(t)||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Map||t instanceof Set||t instanceof WeakMap||t instanceof WeakSet||t instanceof ArrayBuffer))return this.getViolationBuilder().setParameter("type",a(e)).build(pe);var t,n;switch(!0){case e.hasOwnProperty("size")||e instanceof Map||e instanceof Set:n=e.size;break;case e instanceof ArrayBuffer:n=e.byteLength;break;default:n=e.length}return void 0===n?this.getViolationBuilder().setParameter("type",a(e)).build(pe):null!==this.options.min&&this.options.min===this.options.max&&n!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&n>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&n0&&void 0!==arguments[0]?arguments[0]:{};return i(this,a),n.call(this,e)}return o(a,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid timezone."}}},{key:"validate",value:function(t){if(this.options.trim&&(t=b(t)),!this.isEmptyValue(t))return"string"==typeof t&&e.DateTime.local().setZone(t).isValid?void 0:this.getViolationBuilder().setParameter("value",t).build(this.options.message)}}]),a}(),_e=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,n),!(e=t.call(this,r)).options.value||!g(e.options.value))throw new Error('Value should be type of "number", "'.concat(a(e.options.value),'" given.'));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be a multiple of {{ compared_value }}.",message_type:'This values has different types. Given type is "{{ current_type }}"; Expected type is "{{ expected_type }}".'}}},{key:"getRequiredOptions",value:function(){return["value"]}},{key:"validate",value:function(e){if(!this.isEmptyValue(e))return g(e)?e%this.options.value!=0?this.getViolationBuilder().setParameter("compared_value",this.options.value).setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",this.options.value).setParameter("current_type",a(e)).setParameter("expected_type","number").build(this.options.message_type)}}]),n}();function me(e,t){var a=n.default.parse(e);return"ipv4"===a.kind()&&!(("4_no_priv"===t||"all_no_priv"===t)&&"private"===a.range()||("4_no_res"===t||"all_no_res"===t)&&"reserved"===a.range()||("4_pub"===t||"all_pub"===t)&&("private"===a.range()||"reserved"===a.range()))}function ve(e,t){var a=n.default.parse(e);return"ipv6"===a.kind()&&!(("6_no_priv"===t||"all_no_priv"===t)&&"uniqueLocal"===a.range()||("6_no_res"===t||"all_no_res"===t)&&"reserved"===a.range()||("6_pub"===t||"all_pub"===t)&&("uniqueLocal"===a.range()||"reserved"===a.range()))}var ge=function(e){c(a,B);var t=h(a);function a(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,a),e=t.call(this,n);var r=["all","4","6","4_no_priv","6_no_priv","all_no_priv","4_no_res","6_no_res","all_no_res","4_pub","6_pub","all_pub"];if(!r.includes(e.options.version))throw new Error("Invalid validation version provided: ".concat(e.options.version));return e}return o(a,[{key:"getDefaultOptions",value:function(){return{trim:!0,version:"4",message:"This is not a valid IP address."}}},{key:"getRequiredOptions",value:function(){return["version"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!("string"==typeof e&&0===e.length||"string"!=typeof e&&isNaN(e)||null==e)){if(!n.default.isValid(e)||!n.default.IPv4.isValidFourPartDecimal(e)&&!n.default.IPv6.isValid(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);switch(this.options.version){case"4":case"4_no_priv":case"4_no_res":case"4_pub":if(!me(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"6":case"6_no_priv":case"6_no_res":case"6_pub":if(!ve(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"all_no_priv":case"all_no_res":case"all_pub":if(!me(e,this.options.version)&&!ve(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}}],[{key:"MODE_ALL",get:function(){return"all"}},{key:"MODE_V4",get:function(){return"4"}},{key:"MODE_V6",get:function(){return"6"}},{key:"MODE_V4_NO_PRIV",get:function(){return"4_no_priv"}},{key:"MODE_V6_NO_PRIV",get:function(){return"6_no_priv"}},{key:"MODE_ALL_NO_PRIV",get:function(){return"all_no_priv"}},{key:"MODE_V4_NO_RES",get:function(){return"4_no_res"}},{key:"MODE_V6_NO_RES",get:function(){return"6_no_res"}},{key:"MODE_ALL_NO_RES",get:function(){return"all_no_res"}},{key:"MODE_V4_PUB",get:function(){return"4_pub"}},{key:"MODE_V6_PUB",get:function(){return"6_pub"}},{key:"MODE_ALL_PUB",get:function(){return"all_pub"}}]),a}(),ye=["AB","AA","AF","AK","SQ","AM","AR","AN","HY","AS","AV","AE","AY","AZ","BM","BA","EU","BE","BN","BH","BI","BS","BR","BG","MY","CA","CH","CE","NY","ZH","ZH-HANS","ZH-HANT","CV","KW","CO","CR","HR","CS","DA","DV","NL","DZ","EN","EO","ET","EE","FO","FJ","FI","FR","FF","GL","GD","GV","KA","DE","EL","KL","GN","GU","HT","HA","HE","HZ","HI","HO","HU","IS","IO","IG","IN","IA","IE","IU","IK","GA","IT","JA","JV","KL","KN","KR","KS","KK","KM","KI","RW","RN","KY","KV","KG","KO","KU","KJ","LO","LA","LV","LI","LN","LT","LU","LG","LB","GV","MK","MG","MS","ML","MT","MI","MR","MH","MO","MN","NA","NV","NG","ND","NE","NO","NB","NN","II","OC","OJ","CU","OR","OM","OS","PI","PS","FA","PL","PT","PA","QU","RM","RO","RU","SE","SM","SG","SA","SR","SH","ST","TN","SN","II","SD","SI","SS","SK","SL","SO","NR","ES","SU","SW","SS","SV","TL","TY","TG","TA","TT","TE","TH","BO","TI","TO","TS","TR","TK","TW","UG","UK","UR","UZ","VE","VI","VO","WA","CY","WO","FY","XH","YI","YO","ZA","ZU"],Ae=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid language."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e))return"string"==typeof e&&ye.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),Ee=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,n),!T((e=t.call(this,r)).options.callback))throw new Error('Value should be type of "function", "'.concat(a(e.options.callback),'" given.'));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value is not a valid."}}},{key:"getRequiredOptions",value:function(){return["callback"]}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.options.callback(e,t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),Te=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,n),"string"!=typeof(e=t.call(this,r)).options.pattern&&!(e.options.pattern instanceof RegExp))throw new Error('Pattern should be type of "string", '.concat(a(e.options.pattern)," given."));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!1,match:!0,message:"This value is not valid."}}},{key:"getRequiredOptions",value:function(){return["pattern"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){if("string"!=typeof e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);var t=new RegExp(this.options.pattern);return this.options.match&&!t.test(e)||!this.options.match&&t.test(e)?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(),Ce=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,n);var o=!(void 0===(e=t.call(this,r)).options.min||null===e.options.min),s=!(void 0===e.options.max||null===e.options.max);if(o&&!g(e.options.min)&&!y(e.options.min))throw new Error('Min limit should be type of "number" or "Date", "'.concat(a(e.options.min),'" given.'));if(s&&!g(e.options.max)&&!y(e.options.max))throw new Error('Max limit should be type of "number" or "Date", "'.concat(a(e.options.max),'" given.'));if(o&&s){if(g(e.options.min)&&!g(e.options.max))throw new Error('Max limit should be type of "number", "'.concat(a(e.options.max),'" given.'));if(y(e.options.min)&&!y(e.options.max))throw new Error('Max limit should be type of "Date", "'.concat(a(e.options.max),'" given.'))}return e.options.min=g(e.options.min)?parseFloat(e.options.min):e.options.min,e.options.max=g(e.options.max)?parseFloat(e.options.max):e.options.max,e}return o(n,[{key:"getDefaultOptions",value:function(){return{message_min:"This value should be {{ limit }} or more.",message_max:"This value should be {{ limit }} or less.",message:"This value should be between {{ min }} and {{ max }}."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){(y(this.options.min)||y(this.options.max))&&(e="now"===e?new Date:new Date(e));var t=!(void 0===this.options.min||null===this.options.min),n=!(void 0===this.options.max||null===this.options.max);return this.isEmptyValue(e)||t&&n&&(ethis.options.max)||!y(this.options.min)&&!y(this.options.max)&&y(e)?this.getViolationBuilder().setParameter("min",y(this.options.min)?this.formatDateValue(this.options.min):this.options.min).setParameter("max",y(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",y(e)?this.formatDateValue(e):e).build(this.options.message):t&&ethis.options.max?this.getViolationBuilder().setParameter("limit",y(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",y(e)?this.formatDateValue(e):e).build(this.options.message_max):void 0}}]),n}(),Se=["af","af_NA","af_ZA","ak","ak_GH","am","am_ET","ar","ar_AE","ar_BH","ar_DJ","ar_DZ","ar_EG","ar_EH","ar_ER","ar_IL","ar_IQ","ar_JO","ar_KM","ar_KW","ar_LB","ar_LY","ar_MA","ar_MR","ar_OM","ar_PS","ar_QA","ar_SA","ar_SD","ar_SO","ar_SS","ar_SY","ar_TD","ar_TN","ar_YE","as","as_IN","az","az_AZ","az_Cyrl","az_Cyrl_AZ","az_Latn","az_Latn_AZ","be","be_BY","bg","bg_BG","bm","bm_ML","bn","bn_BD","bn_IN","bo","bo_CN","bo_IN","br","br_FR","bs","bs_BA","bs_Cyrl","bs_Cyrl_BA","bs_Latn","bs_Latn_BA","ca","ca_AD","ca_ES","ca_FR","ca_IT","ce","ce_RU","cs","cs_CZ","cy","cy_GB","da","da_DK","da_GL","de","de_AT","de_BE","de_CH","de_DE","de_IT","de_LI","de_LU","dz","dz_BT","ee","ee_GH","ee_TG","el","el_CY","el_GR","en","en_AE","en_AG","en_AI","en_AS","en_AT","en_AU","en_BB","en_BE","en_BI","en_BM","en_BS","en_BW","en_BZ","en_CA","en_CC","en_CH","en_CK","en_CM","en_CX","en_CY","en_DE","en_DK","en_DM","en_ER","en_FI","en_FJ","en_FK","en_FM","en_GB","en_GD","en_GG","en_GH","en_GI","en_GM","en_GU","en_GY","en_HK","en_IE","en_IL","en_IM","en_IN","en_IO","en_JE","en_JM","en_KE","en_KI","en_KN","en_KY","en_LC","en_LR","en_LS","en_MG","en_MH","en_MO","en_MP","en_MS","en_MT","en_MU","en_MW","en_MY","en_NA","en_NF","en_NG","en_NL","en_NR","en_NU","en_NZ","en_PG","en_PH","en_PK","en_PN","en_PR","en_PW","en_RW","en_SB","en_SC","en_SD","en_SE","en_SG","en_SH","en_SI","en_SL","en_SS","en_SX","en_SZ","en_TC","en_TK","en_TO","en_TT","en_TV","en_TZ","en_UG","en_UM","en_US","en_VC","en_VG","en_VI","en_VU","en_WS","en_ZA","en_ZM","en_ZW","eo","es","es_AR","es_BO","es_BR","es_BZ","es_CL","es_CO","es_CR","es_CU","es_DO","es_EC","es_ES","es_GQ","es_GT","es_HN","es_MX","es_NI","es_PA","es_PE","es_PH","es_PR","es_PY","es_SV","es_US","es_UY","es_VE","et","et_EE","eu","eu_ES","fa","fa_AF","fa_IR","ff","ff_CM","ff_GN","ff_Latn","ff_Latn_BF","ff_Latn_CM","ff_Latn_GH","ff_Latn_GM","ff_Latn_GN","ff_Latn_GW","ff_Latn_LR","ff_Latn_MR","ff_Latn_NE","ff_Latn_NG","ff_Latn_SL","ff_Latn_SN","ff_MR","ff_SN","fi","fi_FI","fo","fo_DK","fo_FO","fr","fr_BE","fr_BF","fr_BI","fr_BJ","fr_BL","fr_CA","fr_CD","fr_CF","fr_CG","fr_CH","fr_CI","fr_CM","fr_DJ","fr_DZ","fr_FR","fr_GA","fr_GF","fr_GN","fr_GP","fr_GQ","fr_HT","fr_KM","fr_LU","fr_MA","fr_MC","fr_MF","fr_MG","fr_ML","fr_MQ","fr_MR","fr_MU","fr_NC","fr_NE","fr_PF","fr_PM","fr_RE","fr_RW","fr_SC","fr_SN","fr_SY","fr_TD","fr_TG","fr_TN","fr_VU","fr_WF","fr_YT","fy","fy_NL","ga","ga_GB","ga_IE","gd","gd_GB","gl","gl_ES","gu","gu_IN","gv","gv_IM","ha","ha_GH","ha_NE","ha_NG","he","he_IL","hi","hi_IN","hr","hr_BA","hr_HR","hu","hu_HU","hy","hy_AM","ia","id","id_ID","ig","ig_NG","ii","ii_CN","is","is_IS","it","it_CH","it_IT","it_SM","it_VA","ja","ja_JP","jv","jv_ID","ka","ka_GE","ki","ki_KE","kk","kk_KZ","kl","kl_GL","km","km_KH","kn","kn_IN","ko","ko_KP","ko_KR","ks","ks_IN","ku","ku_TR","kw","kw_GB","ky","ky_KG","lb","lb_LU","lg","lg_UG","ln","ln_AO","ln_CD","ln_CF","ln_CG","lo","lo_LA","lt","lt_LT","lu","lu_CD","lv","lv_LV","mg","mg_MG","mi","mi_NZ","mk","mk_MK","ml","ml_IN","mn","mn_MN","mr","mr_IN","ms","ms_BN","ms_MY","ms_SG","mt","mt_MT","my","my_MM","nb","nb_NO","nb_SJ","nd","nd_ZW","ne","ne_IN","ne_NP","nl","nl_AW","nl_BE","nl_BQ","nl_CW","nl_NL","nl_SR","nl_SX","nn","nn_NO","no","no_NO","om","om_ET","om_KE","or","or_IN","os","os_GE","os_RU","pa","pa_Arab","pa_Arab_PK","pa_Guru","pa_Guru_IN","pa_IN","pa_PK","pl","pl_PL","ps","ps_AF","ps_PK","pt","pt_AO","pt_BR","pt_CH","pt_CV","pt_GQ","pt_GW","pt_LU","pt_MO","pt_MZ","pt_PT","pt_ST","pt_TL","qu","qu_BO","qu_EC","qu_PE","rm","rm_CH","rn","rn_BI","ro","ro_MD","ro_RO","ru","ru_BY","ru_KG","ru_KZ","ru_MD","ru_RU","ru_UA","rw","rw_RW","sd","sd_PK","se","se_FI","se_NO","se_SE","sg","sg_CF","sh","sh_BA","si","si_LK","sk","sk_SK","sl","sl_SI","sn","sn_ZW","so","so_DJ","so_ET","so_KE","so_SO","sq","sq_AL","sq_MK","sr","sr_BA","sr_Cyrl","sr_Cyrl_BA","sr_Cyrl_ME","sr_Cyrl_RS","sr_Latn","sr_Latn_BA","sr_Latn_ME","sr_Latn_RS","sr_ME","sr_RS","sv","sv_AX","sv_FI","sv_SE","sw","sw_CD","sw_KE","sw_TZ","sw_UG","ta","ta_IN","ta_LK","ta_MY","ta_SG","te","te_IN","tg","tg_TJ","th","th_TH","ti","ti_ER","ti_ET","tk","tk_TM","tl","tl_PH","to","to_TO","tr","tr_CY","tr_TR","tt","tt_RU","ug","ug_CN","uk","uk_UA","ur","ur_IN","ur_PK","uz","uz_AF","uz_Arab","uz_Arab_AF","uz_Cyrl","uz_Cyrl_UZ","uz_Latn","uz_Latn_UZ","uz_UZ","vi","vi_VN","wo","wo_SN","xh","xh_ZA","yi","yo","yo_BJ","yo_NG","zh","zh_CN","zh_HK","zh_Hans","zh_Hans_CN","zh_Hans_HK","zh_Hans_MO","zh_Hans_SG","zh_Hant","zh_Hant_HK","zh_Hant_MO","zh_Hant_TW","zh_MO","zh_SG","zh_TW","zu","zu_ZA"],Le=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid locale."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){var t=N.canonicalize(e);return"string"==typeof t&&Se.includes(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}();function Me(e){if(!/^[\d|X]+$/.test(e)||10!==e.length)return!1;for(var t=0,n=0;n<10;n++){t+=("X"===e.charAt(n)?10:parseInt(e.charAt(n)))*(10-n)}return t%11==0}function be(e){if(!g(e)||13!==e.length)return!1;for(var t=0,n=0;n<13;n+=2)t+=parseInt(e.charAt(n));for(var a=1;a<12;a+=2)t+=3*parseInt(e.charAt(a));return t%10==0}var Re,Pe=function(e){c(n,B);var t=h(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,n);var r=[null,"isbn10","isbn13"],o=null===(e=t.call(this,a)).options.mode?null:e.options.mode.toLowerCase();if(!r.includes(o))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:null,message:"This value is neither a valid ISBN-10 nor a valid ISBN-13.",message_isbn10:"This value is not a valid ISBN-10.",message_isbn13:"This value is not a valid ISBN-13."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/-/g,"",e).toUpperCase();return"isbn10"===this.options.mode?Me(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn10):"isbn13"!==this.options.mode||be(t)?Me(t)||be(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message):this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn13)}}}],[{key:"MODE_ALL",get:function(){return null}},{key:"MODE_ISBN_10",get:function(){return"isbn10"}},{key:"MODE_ISBN_13",get:function(){return"isbn13"}}]),n}(),Ne=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!1,case_sensitive:!1,hyphen:!1,message:"This value is not a valid ISSN."}}},{key:"validate",value:function(e){if("string"==typeof e&&!this.isEmptyValue(e)){var t=e=this.options.trim?b(e):e;if(t.length>4&&"-"===t.charAt(4))t=t.replace(/-/g,"");else if(this.options.hyphen)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(8!==t.length||this.options.case_sensitive&&!/^\d{7}[X|0-9]$/.test(t)||!this.options.case_sensitive&&!/^\d{7}[xX|0-9]$/.test(t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var n="x"===t.charAt(7)||"X"===t.charAt(7)?10:parseInt(t.charAt(7)),a=0;a<7;++a)n+=(8-a)*parseInt(t.charAt(a));return n%11!=0?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(),Oe=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Invalid card number."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){if(/[^0-9-\s]+/.test(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var t=e.toString().replace(/\D/g,""),n=0,a=t.length-1;a>=0;a-=2)n+=parseInt(t.charAt(a));for(var i=t.length-2;i>=0;i-=2)n+=(2*parseInt(t.charAt(i))).toString().split("").reduce((function(e,t){return parseInt(e)+parseInt(t)}),0);return 0===n||0!=n%10?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(),Be=(s(Re={},"AMEX",[/^3[47][0-9]{13}$/]),s(Re,"CHINA_UNIONPAY",[/^62[0-9]{14,17}$/]),s(Re,"DINERS",[/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/]),s(Re,"DISCOVER",[/^6011[0-9]{12}$/,/^64[4-9][0-9]{13}$/,/^65[0-9]{14}$/,/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/]),s(Re,"INSTAPAYMENT",[/^63[7-9][0-9]{13}$/]),s(Re,"JCB",[/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/]),s(Re,"LASER",[/^(6304|670[69]|6771)[0-9]{12,15}$/]),s(Re,"MAESTRO",[/^(6759[0-9]{2})[0-9]{6,13}$/,/^(50[0-9]{4})[0-9]{6,13}$/,/^5[6-9][0-9]{10,17}$/,/^6[0-9]{11,18}$/]),s(Re,"MASTERCARD",[/^5[1-5][0-9]{14}$/,/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/]),s(Re,"MIR",[/^220[0-4][0-9]{12}$/]),s(Re,"UATP",[/^1[0-9]{14}$/]),s(Re,"VISA",[/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/]),Re),Ie=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,n),(e=t.call(this,r)).options.schemas=M(e.options.schemas)?[e.options.schemas]:e.options.schemas,!E(e.options.schemas))throw new Error('Value should be type of "array" or "string", "'.concat(a(e.options.schemas),'" given.'));if(0===e.options.schemas.length)throw new Error("The schemas list cannot be empty.");var o=Object.keys(Be),s=e.options.schemas.filter((function(e){return o.includes(e.toUpperCase())}));if(s.length!==e.options.schemas.length)throw new Error("The schemas list contains one or more unsupported elements.");return e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Unsupported card type or invalid card number."}}},{key:"getRequiredOptions",value:function(){return["schemas"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){if(g(e)){var t,n=v(this.options.schemas);try{for(n.s();!(t=n.n()).done;){var a,i=t.value,r=v(Be[i]);try{for(r.s();!(a=r.n()).done;){if(a.value.test(e))return}}catch(e){r.e(e)}finally{r.f()}}}catch(e){n.e(e)}finally{n.f()}}return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"SCHEMA_AMEX",get:function(){return"AMEX"}},{key:"SCHEMA_CHINA_UNIONPAY",get:function(){return"CHINA_UNIONPAY"}},{key:"SCHEMA_DINERS",get:function(){return"DINERS"}},{key:"SCHEMA_DISCOVER",get:function(){return"DISCOVER"}},{key:"SCHEMA_INSTAPAYMENT",get:function(){return"INSTAPAYMENT"}},{key:"SCHEMA_JCB",get:function(){return"JCB"}},{key:"SCHEMA_LASER",get:function(){return"LASER"}},{key:"SCHEMA_MAESTRO",get:function(){return"MAESTRO"}},{key:"SCHEMA_MASTERCARD",get:function(){return"MASTERCARD"}},{key:"SCHEMA_MIR",get:function(){return"MIR"}},{key:"SCHEMA_UATP",get:function(){return"UATP"}},{key:"SCHEMA_VISA",get:function(){return"VISA"}}]),n}(),ke={AD:/^AD\d{2}\d{4}\d{4}[\dA-Z]{12}$/,AE:/^AE\d{2}\d{3}\d{16}$/,AL:/^AL\d{2}\d{8}[\dA-Z]{16}$/,AO:/^AO\d{2}\d{21}$/,AT:/^AT\d{2}\d{5}\d{11}$/,AX:/^FI\d{2}\d{6}\d{7}\d{1}$/,AZ:/^AZ\d{2}[A-Z]{4}[\dA-Z]{20}$/,BA:/^BA\d{2}\d{3}\d{3}\d{8}\d{2}$/,BE:/^BE\d{2}\d{3}\d{7}\d{2}$/,BF:/^BF\d{2}\d{23}$/,BG:/^BG\d{2}[A-Z]{4}\d{4}\d{2}[\dA-Z]{8}$/,BH:/^BH\d{2}[A-Z]{4}[\dA-Z]{14}$/,BI:/^BI\d{2}\d{12}$/,BJ:/^BJ\d{2}[A-Z]{1}\d{23}$/,BY:/^BY\d{2}[\dA-Z]{4}\d{4}[\dA-Z]{16}$/,BL:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,BR:/^BR\d{2}\d{8}\d{5}\d{10}[A-Z][\dA-Z]$/,CG:/^CG\d{2}\d{23}$/,CH:/^CH\d{2}\d{5}[\dA-Z]{12}$/,CI:/^CI\d{2}[A-Z]{1}\d{23}$/,CM:/^CM\d{2}\d{23}$/,CR:/^CR\d{2}0\d{3}\d{14}$/,CV:/^CV\d{2}\d{21}$/,CY:/^CY\d{2}\d{3}\d{5}[\dA-Z]{16}$/,CZ:/^CZ\d{2}\d{20}$/,DE:/^DE\d{2}\d{8}\d{10}$/,DO:/^DO\d{2}[\dA-Z]{4}\d{20}$/,DK:/^DK\d{2}\d{4}\d{10}$/,DZ:/^DZ\d{2}\d{20}$/,EE:/^EE\d{2}\d{2}\d{2}\d{11}\d{1}$/,ES:/^ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}$/,FI:/^FI\d{2}\d{6}\d{7}\d{1}$/,FO:/^FO\d{2}\d{4}\d{9}\d{1}$/,FR:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GB:/^GB\d{2}[A-Z]{4}\d{6}\d{8}$/,GE:/^GE\d{2}[A-Z]{2}\d{16}$/,GI:/^GI\d{2}[A-Z]{4}[\dA-Z]{15}$/,GL:/^GL\d{2}\d{4}\d{9}\d{1}$/,GP:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GR:/^GR\d{2}\d{3}\d{4}[\dA-Z]{16}$/,GT:/^GT\d{2}[\dA-Z]{4}[\dA-Z]{20}$/,HR:/^HR\d{2}\d{7}\d{10}$/,HU:/^HU\d{2}\d{3}\d{4}\d{1}\d{15}\d{1}$/,IE:/^IE\d{2}[A-Z]{4}\d{6}\d{8}$/,IL:/^IL\d{2}\d{3}\d{3}\d{13}$/,IR:/^IR\d{2}\d{22}$/,IS:/^IS\d{2}\d{4}\d{2}\d{6}\d{10}$/,IT:/^IT\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,JO:/^JO\d{2}[A-Z]{4}\d{4}[\dA-Z]{18}$/,KW:/^KW\d{2}[A-Z]{4}\d{22}$/,KZ:/^KZ\d{2}\d{3}[\dA-Z]{13}$/,LB:/^LB\d{2}\d{4}[\dA-Z]{20}$/,LI:/^LI\d{2}\d{5}[\dA-Z]{12}$/,LT:/^LT\d{2}\d{5}\d{11}$/,LU:/^LU\d{2}\d{3}[\dA-Z]{13}$/,LV:/^LV\d{2}[A-Z]{4}[\dA-Z]{13}$/,MC:/^MC\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MD:/^MD\d{2}[\dA-Z]{2}[\dA-Z]{18}$/,ME:/^ME\d{2}\d{3}\d{13}\d{2}$/,MF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MG:/^MG\d{2}\d{23}$/,MK:/^MK\d{2}\d{3}[\dA-Z]{10}\d{2}$/,ML:/^ML\d{2}[A-Z]{1}\d{23}$/,MQ:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MR:/^MR13\d{5}\d{5}\d{11}\d{2}$/,MT:/^MT\d{2}[A-Z]{4}\d{5}[\dA-Z]{18}$/,MU:/^MU\d{2}[A-Z]{4}\d{2}\d{2}\d{12}\d{3}[A-Z]{3}$/,MZ:/^MZ\d{2}\d{21}$/,NC:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,NL:/^NL\d{2}[A-Z]{4}\d{10}$/,NO:/^NO\d{2}\d{4}\d{6}\d{1}$/,PF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PK:/^PK\d{2}[A-Z]{4}[\dA-Z]{16}$/,PL:/^PL\d{2}\d{8}\d{16}$/,PM:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PS:/^PS\d{2}[A-Z]{4}[\dA-Z]{21}$/,PT:/^PT\d{2}\d{4}\d{4}\d{11}\d{2}$/,QA:/^QA\d{2}[A-Z]{4}[\dA-Z]{21}$/,RE:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,RO:/^RO\d{2}[A-Z]{4}[\dA-Z]{16}$/,RS:/^RS\d{2}\d{3}\d{13}\d{2}$/,SA:/^SA\d{2}\d{2}[\dA-Z]{18}$/,SE:/^SE\d{2}\d{3}\d{16}\d{1}$/,SI:/^SI\d{2}\d{5}\d{8}\d{2}$/,SK:/^SK\d{2}\d{4}\d{6}\d{10}$/,SM:/^SM\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,SN:/^SN\d{2}[A-Z]{1}\d{23}$/,TF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,TL:/^TL\d{2}\d{3}\d{14}\d{2}$/,TN:/^TN59\d{2}\d{3}\d{13}\d{2}$/,TR:/^TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}$/,UA:/^UA\d{2}\d{6}[\dA-Z]{19}$/,VA:/^VA\d{2}\d{3}\d{15}$/,VG:/^VG\d{2}[A-Z]{4}\d{16}$/,WF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,XK:/^XK\d{2}\d{4}\d{10}\d{2}$/,YT:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/};var De=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid International Bank Account Number (IBAN)."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/ /g,"",e.toUpperCase()),n=t.substring(0,2);return/^[A-Z0-9]+$/.test(t)&&function(e){return void 0!==w.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(n)&&void 0!==ke[n]&&ke[n].test(t)?1!==function(e){var t=0;return function(e,t){if(null===t&&(t=1),null===e||t<1)return!1;for(var n=[],a=0,i=(e+="").length;a=55296&&n<=56319){var a=n;return 1===t.length?n:1024*(a-55296)+(t.charCodeAt(1)-56320)+65536}return n}(e)-55:t+=e})),t}(t.substring(4)+t.substring(0,4)))?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(),Ge={GF:"FR",PF:"FR",TF:"FR",GP:"FR",MQ:"FR",YT:"FR",NC:"FR",RE:"FR",PM:"FR",WF:"FR",JE:"GB",IM:"GB",GG:"GB",VG:"GB"};function we(e){return void 0!==w.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}var Ue=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid Business Identifier Code (BIC).",message_iban:"This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.",iban_path:null}}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{form:{}};if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var n=e.replace(/ /g,"",e);if(!([8,11].includes(n.length)&&/^[A-Z0-9]+$/.test(n)&&/^[A-Z]{4}/.test(n)&&we(n.substring(4,6))))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(null!==this.options.iban_path&&M(this.options.iban_path)){var a=t.form[this.options.iban_path];if(this.isEmptyValue(a))return;var i=a.substring(0,2),r=n.substring(4,6);if(i===r||i===Ge[r])return;return this.getViolationBuilder().setParameter("value",e).setParameter("iban",a).build(this.options.message_iban)}}}}]),n}(),Ve=function(){function e(){i(this,e)}return o(e,[{key:"validate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[];return E(t)?(t.forEach((function(t){if(!(t instanceof B))return!1;var i=t.validate(e,n);void 0!==i&&a.push(i)})),a):a}}]),e}(),Ze=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,e),s(this,"constraints",[]),s(this,"options",{}),s(this,"transformers",[]),s(this,"reversTransformers",[]),this.constraints=t,this.options=n}return o(e,[{key:"getConstraints",value:function(){return this.constraints}},{key:"getOptions",value:function(){return this.options}},{key:"getTransformers",value:function(){return this.transformers}},{key:"getReverseTransformers",value:function(){return this.reversTransformers}},{key:"addTransformer",value:function(e){if(!T(e))throw new Error('Transformer must be type of "function", '.concat(a(e)," given."));return this.transformers.push(e),this}},{key:"addReverseTransformer",value:function(e){if(!T(e))throw new Error('Transformer must be type of "function", '.concat(a(e)," given."));return this.reversTransformers.push(e),this}},{key:"resetTransformers",value:function(){return this.transformers=[],this}},{key:"resetReverseTransformers",value:function(){return this.reversTransformers=[],this}}]),e}(),$e=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),s(this,"validator",void 0),s(this,"violationBuilder",void 0),s(this,"fields",{}),s(this,"data",{}),s(this,"errors",{}),s(this,"transformers",[]),s(this,"reversTransformers",[]),this.options=l(l({},{extra_fields:!1,extra_fields_message:"This form should not contain extra fields."}),t),this.validator=new Ve,this.violationBuilder=new P}return o(e,[{key:"add",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof e)throw new Error('The field should be type of "string", "'.concat(a(e),'" given.'));if(0===e.length)throw new Error("The field name is too short.");if(void 0!==t&&!E(t))throw new Error('The constants should be type of "array", "'.concat(a(t),'" given.'));if(void 0!==this.fields[e])throw new Error("The field ".concat(e," already exists in this form."));return this.fields[e]=new Ze(E(t)?t:[],l(l({},{}),n)),this}},{key:"validate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.errors={},this.data=t,this.options.extra_fields||this.checkExtraFields(),Object.keys(this.errors).length>0||(this.data=R(this.transformers)(this.data,n),Object.keys(this.fields).forEach((function(t){var a=e.fields[t],i=l(l({},n),{field:a.getOptions(),form:e});e.data[t]=R(a.getTransformers())(e.data[t],i);var r=e.validator.validate(e.data[t],a.getConstraints(),i);r.length>0&&e.addValidationErrors(t,r),e.data[t]=R(a.getReverseTransformers())(e.data[t],i)})),this.data=R(this.reversTransformers)(this.data,n)),this.errors}},{key:"addValidationErrors",value:function(e,t){return E(this.errors[e])||(this.errors[e]=[]),E(t)?this.errors[e]=this.errors[e].concat(t):this.errors[e].push(t),this}},{key:"checkExtraFields",value:function(){for(var e=0,t=Object.keys(this.data);ee.length)&&(t=e.length);for(var n=0,a=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function g(e){return t=e,n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),("number"==typeof t||"string"==typeof t&&-1===n.indexOf(t.slice(-1)))&&""!==t&&!isNaN(t);var t,n}function y(e){return"[object Date]"===Object.prototype.toString.call(e)&&e instanceof Date}function A(e){return null===e}function E(e){return Array.isArray(e)}function T(e){return"function"==typeof e}function C(e){return!(+(t=e)!==t||isFinite(t)&&!(t%1));var t}function S(e){return(t=e)===+t&&isFinite(t)&&!(t%1);var t}function M(e){return"[object Array]"!==Object.prototype.toString.call(e)&&null!==e&&("object"===a(e)&&e===Object(e))}function L(e){return"string"==typeof e}function b(e){return"string"!=typeof e?e:function(e,t){var n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),a=0,i=0;for(e+="",t&&(n=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),a=e.length,i=0;i=0;i--)if(-1===n.indexOf(e.charAt(i))){e=e.substring(0,i+1);break}return-1===n.indexOf(e.charAt(0))?e:""}(e,[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," ","\0"].join(""))}function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!E(e))throw new Error('Functions list must be type of "array", "'.concat(a(e),'" given.'));return e=e.filter((function(e){return T(e)})),function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 0===e.length?n:e.reduce((function(e,n){return n(e,l(l({},t),a))}),n)}}var P=function(){function e(){i(this,e),this.parameters={}}return o(e,[{key:"setParameter",value:function(e,t){if("string"!=typeof e||0===e.length)throw new Error("Invalid parameter name was provided: "+JSON.stringify(e));switch(!0){case void 0===t:t="undefined";break;case M(t):case E(t):try{t=JSON.stringify(t)}catch(e){t=t.toString()}break;case isNaN(t)&&"string"!=typeof t:t="NaN";break;case T(t):t="function() {}";break;case A(t):t="null";break;default:t+=""}return this.parameters["{{ ".concat(e," }}")]=t.toString(),this}},{key:"build",value:function(e){var t=this;if("string"!=typeof e)throw new Error("Invalid error message was provided.");return Object.keys(this.parameters).forEach((function(n){e=e.replace(n,t.parameters[n])})),this.parameters={},Error(e)}}]),e}();var N=function(){function e(t){i(this,e),this.fallback=t||"en-US"}return o(e,[{key:"getUserLocales",value:function(){return e=this.fallback,t=[],"undefined"!=typeof window&&(window.navigator.languages&&(t=t.concat(window.navigator.languages)),window.navigator.language&&t.push(window.navigator.language),window.navigator.userLanguage&&t.push(window.navigator.userLanguage),window.navigator.browserLanguage&&t.push(window.navigator.browserLanguage),window.navigator.systemLanguage&&t.push(window.navigator.systemLanguage)),t.push(e),t.filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){if(!e||-1===e.indexOf("-")||e.toLowerCase()!==e)return e;var t=e.split("-");return"".concat(t[0],"-").concat(t[1].toUpperCase())}));var e,t}},{key:"getUserLocale",value:function(){return this.getUserLocales()[0]}}],[{key:"canonicalize",value:function(e){if("string"!=typeof e||0===e.length||"."===e.charAt(0))return"en-US";var t=e.match(/^([a-z]{2})[-_]([a-z]{2})(?:([a-z]{2})(?:[-_]([a-z]{2}))?)?(?:\..*)?$/i);if(null===t)return e;var n,a=[t[1].toLowerCase()];return void 0===t[3]?a.push(t[2].toUpperCase()):a.push((n=t[2].toLowerCase()+t[3].toLowerCase(),(n+="").charAt(0).toUpperCase()+n.substr(1))),void 0!==t[4]&&a.push(t[4].toUpperCase()),a.join("_")}},{key:"DEFAULT_LOCALE",get:function(){return"en-US"}}]),e}(),O=new N,B=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.options=l(l({},this.getDefaultOptions()),n),this.getRequiredOptions().forEach((function(e){if(void 0===t.options[e])throw new Error('No "'.concat(e,'" option is configured.'))})),this.locale_string=this.options.locale_string||O.getUserLocale(),this.locale_options=this.options.locale_options||{},this.violationBuilder=new P}return o(e,[{key:"getDefaultOptions",value:function(){return{}}},{key:"getRequiredOptions",value:function(){return[]}},{key:"getViolationBuilder",value:function(){return this.violationBuilder}},{key:"validate",value:function(e,t){throw new Error("The validate() method was not implemented")}},{key:"isEmptyValue",value:function(e){return"string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==a(e)&&"function"!=typeof e&&isNaN(e)||null==e}},{key:"formatDateValue",value:function(e){return new Intl.DateTimeFormat(this.locale_string,this.locale_options).format(e)}}]),e}(),I=function(e){c(n,B);var t=h(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),(e=t.call(this,a)).options.strict=!!e.options.strict,e}return o(n,[{key:"getDefaultOptions",value:function(){return{strict:!1,message_strict:"This values has different types. Given type is {{ value_type }}; Expected type is {{ compared_type }}."}}},{key:"getRequiredOptions",value:function(){return["value","strict"]}},{key:"compare",value:function(e,t){throw new Error("The compare() method was not implemented")}},{key:"validate",value:function(e){var t=this.options.value;return this.options.strict&&a(t)!==a(e)?this.getViolationBuilder().setParameter("value_type",y(e)?"Date object":a(e)).setParameter("compared_type",y(t)?"Date object":a(t)).build(this.options.message_strict):(y(t)&&(e="now"===e?new Date:new Date(e)),this.compare(e,t)?void 0:(e=y(e)?this.formatDateValue(e):e,t=y(t)?this.formatDateValue(t):t,this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",t).setParameter("compared_value_type",a(t)).build(this.options.message)))}}]),n}(),k=function(e){c(n,B);var t=h(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),(e=t.call(this,a)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message_min:"This value is too short. It should have {{ limit }} character(s) or more.",message_max:"This value is too long. It should have {{ limit }} character(s) or less.",message_exact:"This value should have exactly {{ limit }} character(s)."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),"string"==typeof e){var t=e.length;return null!==this.options.min&&this.options.min===this.options.max&&t!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&t>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&t0&&void 0!==arguments[0]?arguments[0]:{};i(this,n),e=t.call(this,a);var r=["simple_regexp","html5_regexp","html5_input"];if(!r.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:"html5_regexp",message:"This value is not valid email."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case"simple_regexp":if(!function(e){return/^.+@\S+\.\S+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5_regexp":if(!function(e){return/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5_input":if(!function(e){var t=document.createElement("input");return t.setAttribute("type","email"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_SIMPLE",get:function(){return"simple_regexp"}},{key:"MODE_HTML5",get:function(){return"html5_regexp"}},{key:"MODE_HTML5_INPUT",get:function(){return"html5_input"}}]),n}(),G=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be blank."}}},{key:"validate",value:function(e){if("string"==typeof e&&e.length>0||"string"!=typeof e&&"object"!==a(e)&&!isNaN(e)&&null!=e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),w=[{a2:"AF",a3:"AFG",n:"004"},{a2:"AX",a3:"ALA",n:"248"},{a2:"AL",a3:"ALB",n:"008"},{a2:"DZ",a3:"DZA",n:"012"},{a2:"AS",a3:"ASM",n:"016"},{a2:"AD",a3:"AND",n:"020"},{a2:"AO",a3:"AGO",n:"024"},{a2:"AI",a3:"AIA",n:"660"},{a2:"AQ",a3:"ATA",n:"010"},{a2:"AG",a3:"ATG",n:"028"},{a2:"AR",a3:"ARG",n:"032"},{a2:"AM",a3:"ARM",n:"051"},{a2:"AW",a3:"ABW",n:"533"},{a2:"AU",a3:"AUS",n:"036"},{a2:"AT",a3:"AUT",n:"040"},{a2:"AZ",a3:"AZE",n:"031"},{a2:"BS",a3:"BHS",n:"044"},{a2:"BH",a3:"BHR",n:"048"},{a2:"BD",a3:"BGD",n:"050"},{a2:"BB",a3:"BRB",n:"052"},{a2:"BY",a3:"BLR",n:"112"},{a2:"BE",a3:"BEL",n:"056"},{a2:"BZ",a3:"BLZ",n:"084"},{a2:"BJ",a3:"BEN",n:"204"},{a2:"BM",a3:"BMU",n:"060"},{a2:"BT",a3:"BTN",n:"064"},{a2:"BO",a3:"BOL",n:"068"},{a2:"BQ",a3:"BES",n:"535"},{a2:"BA",a3:"BIH",n:"070"},{a2:"BW",a3:"BWA",n:"072"},{a2:"BV",a3:"BVT",n:"074"},{a2:"BR",a3:"BRA",n:"076"},{a2:"IO",a3:"IOT",n:"086"},{a2:"BN",a3:"BRN",n:"096"},{a2:"BG",a3:"BGR",n:"100"},{a2:"BF",a3:"BFA",n:"854"},{a2:"BI",a3:"BDI",n:"108"},{a2:"CV",a3:"CPV",n:"132"},{a2:"KH",a3:"KHM",n:"116"},{a2:"CM",a3:"CMR",n:"120"},{a2:"CA",a3:"CAN",n:"124"},{a2:"KY",a3:"CYM",n:"136"},{a2:"CF",a3:"CAF",n:"140"},{a2:"TD",a3:"TCD",n:"148"},{a2:"CL",a3:"CHL",n:"152"},{a2:"CN",a3:"CHN",n:"156"},{a2:"CX",a3:"CXR",n:"162"},{a2:"CC",a3:"CCK",n:"166"},{a2:"CO",a3:"COL",n:"170"},{a2:"KM",a3:"COM",n:"174"},{a2:"CG",a3:"COG",n:"178"},{a2:"CD",a3:"COD",n:"180"},{a2:"CK",a3:"COK",n:"184"},{a2:"CR",a3:"CRI",n:"188"},{a2:"CI",a3:"CIV",n:"384"},{a2:"HR",a3:"HRV",n:"191"},{a2:"CU",a3:"CUB",n:"192"},{a2:"CW",a3:"CUW",n:"531"},{a2:"CY",a3:"CYP",n:"196"},{a2:"CZ",a3:"CZE",n:"203"},{a2:"DK",a3:"DNK",n:"208"},{a2:"DJ",a3:"DJI",n:"262"},{a2:"DM",a3:"DMA",n:"212"},{a2:"DO",a3:"DOM",n:"214"},{a2:"EC",a3:"ECU",n:"218"},{a2:"EG",a3:"EGY",n:"818"},{a2:"SV",a3:"SLV",n:"222"},{a2:"GQ",a3:"GNQ",n:"226"},{a2:"ER",a3:"ERI",n:"232"},{a2:"EE",a3:"EST",n:"233"},{a2:"SZ",a3:"SWZ",n:"748"},{a2:"ET",a3:"ETH",n:"231"},{a2:"FK",a3:"FLK",n:"238"},{a2:"FO",a3:"FRO",n:"234"},{a2:"FJ",a3:"FJI",n:"242"},{a2:"FI",a3:"FIN",n:"246"},{a2:"FR",a3:"FRA",n:"250"},{a2:"GF",a3:"GUF",n:"254"},{a2:"PF",a3:"PYF",n:"258"},{a2:"TF",a3:"ATF",n:"260"},{a2:"GA",a3:"GAB",n:"266"},{a2:"GM",a3:"GMB",n:"270"},{a2:"GE",a3:"GEO",n:"268"},{a2:"DE",a3:"DEU",n:"276"},{a2:"GH",a3:"GHA",n:"288"},{a2:"GI",a3:"GIB",n:"292"},{a2:"GR",a3:"GRC",n:"300"},{a2:"GL",a3:"GRL",n:"304"},{a2:"GD",a3:"GRD",n:"308"},{a2:"GP",a3:"GLP",n:"312"},{a2:"GU",a3:"GUM",n:"316"},{a2:"GT",a3:"GTM",n:"320"},{a2:"GG",a3:"GGY",n:"831"},{a2:"GN",a3:"GIN",n:"324"},{a2:"GW",a3:"GNB",n:"624"},{a2:"GY",a3:"GUY",n:"328"},{a2:"HT",a3:"HTI",n:"332"},{a2:"HM",a3:"HMD",n:"334"},{a2:"VA",a3:"VAT",n:"336"},{a2:"HN",a3:"HND",n:"340"},{a2:"HK",a3:"HKG",n:"344"},{a2:"HU",a3:"HUN",n:"348"},{a2:"IS",a3:"ISL",n:"352"},{a2:"IN",a3:"IND",n:"356"},{a2:"ID",a3:"IDN",n:"360"},{a2:"IR",a3:"IRN",n:"364"},{a2:"IQ",a3:"IRQ",n:"368"},{a2:"IE",a3:"IRL",n:"372"},{a2:"IM",a3:"IMN",n:"833"},{a2:"IL",a3:"ISR",n:"376"},{a2:"IT",a3:"ITA",n:"380"},{a2:"JM",a3:"JAM",n:"388"},{a2:"JP",a3:"JPN",n:"392"},{a2:"JE",a3:"JEY",n:"832"},{a2:"JO",a3:"JOR",n:"400"},{a2:"KZ",a3:"KAZ",n:"398"},{a2:"KE",a3:"KEN",n:"404"},{a2:"KI",a3:"KIR",n:"296"},{a2:"KP",a3:"PRK",n:"408"},{a2:"KR",a3:"KOR",n:"410"},{a2:"KW",a3:"KWT",n:"414"},{a2:"KG",a3:"KGZ",n:"417"},{a2:"LA",a3:"LAO",n:"418"},{a2:"LV",a3:"LVA",n:"428"},{a2:"LB",a3:"LBN",n:"422"},{a2:"LS",a3:"LSO",n:"426"},{a2:"LR",a3:"LBR",n:"430"},{a2:"LY",a3:"LBY",n:"434"},{a2:"LI",a3:"LIE",n:"438"},{a2:"LT",a3:"LTU",n:"440"},{a2:"LU",a3:"LUX",n:"442"},{a2:"MO",a3:"MAC",n:"446"},{a2:"MG",a3:"MDG",n:"450"},{a2:"MW",a3:"MWI",n:"454"},{a2:"MY",a3:"MYS",n:"458"},{a2:"MV",a3:"MDV",n:"462"},{a2:"ML",a3:"MLI",n:"466"},{a2:"MT",a3:"MLT",n:"470"},{a2:"MH",a3:"MHL",n:"584"},{a2:"MQ",a3:"MTQ",n:"474"},{a2:"MR",a3:"MRT",n:"478"},{a2:"MU",a3:"MUS",n:"480"},{a2:"YT",a3:"MYT",n:"175"},{a2:"MX",a3:"MEX",n:"484"},{a2:"FM",a3:"FSM",n:"583"},{a2:"MD",a3:"MDA",n:"498"},{a2:"MC",a3:"MCO",n:"492"},{a2:"MN",a3:"MNG",n:"496"},{a2:"ME",a3:"MNE",n:"499"},{a2:"MS",a3:"MSR",n:"500"},{a2:"MA",a3:"MAR",n:"504"},{a2:"MZ",a3:"MOZ",n:"508"},{a2:"MM",a3:"MMR",n:"104"},{a2:"NA",a3:"NAM",n:"516"},{a2:"NR",a3:"NRU",n:"520"},{a2:"NP",a3:"NPL",n:"524"},{a2:"NL",a3:"NLD",n:"528"},{a2:"NC",a3:"NCL",n:"540"},{a2:"NZ",a3:"NZL",n:"554"},{a2:"NI",a3:"NIC",n:"558"},{a2:"NE",a3:"NER",n:"562"},{a2:"NG",a3:"NGA",n:"566"},{a2:"NU",a3:"NIU",n:"570"},{a2:"NF",a3:"NFK",n:"574"},{a2:"MK",a3:"MKD",n:"807"},{a2:"MP",a3:"MNP",n:"580"},{a2:"NO",a3:"NOR",n:"578"},{a2:"OM",a3:"OMN",n:"512"},{a2:"PK",a3:"PAK",n:"586"},{a2:"PW",a3:"PLW",n:"585"},{a2:"PS",a3:"PSE",n:"275"},{a2:"PA",a3:"PAN",n:"591"},{a2:"PG",a3:"PNG",n:"598"},{a2:"PY",a3:"PRY",n:"600"},{a2:"PE",a3:"PER",n:"604"},{a2:"PH",a3:"PHL",n:"608"},{a2:"PN",a3:"PCN",n:"612"},{a2:"PL",a3:"POL",n:"616"},{a2:"PT",a3:"PRT",n:"620"},{a2:"PR",a3:"PRI",n:"630"},{a2:"QA",a3:"QAT",n:"634"},{a2:"RE",a3:"REU",n:"638"},{a2:"RO",a3:"ROU",n:"642"},{a2:"RU",a3:"RUS",n:"643"},{a2:"RW",a3:"RWA",n:"646"},{a2:"BL",a3:"BLM",n:"652"},{a2:"SH",a3:"SHN",n:"654"},{a2:"KN",a3:"KNA",n:"659"},{a2:"LC",a3:"LCA",n:"662"},{a2:"MF",a3:"MAF",n:"663"},{a2:"PM",a3:"SPM",n:"666"},{a2:"VC",a3:"VCT",n:"670"},{a2:"WS",a3:"WSM",n:"882"},{a2:"SM",a3:"SMR",n:"674"},{a2:"ST",a3:"STP",n:"678"},{a2:"SA",a3:"SAU",n:"682"},{a2:"SN",a3:"SEN",n:"686"},{a2:"RS",a3:"SRB",n:"688"},{a2:"SC",a3:"SYC",n:"690"},{a2:"SL",a3:"SLE",n:"694"},{a2:"SG",a3:"SGP",n:"702"},{a2:"SX",a3:"SXM",n:"534"},{a2:"SK",a3:"SVK",n:"703"},{a2:"SI",a3:"SVN",n:"705"},{a2:"SB",a3:"SLB",n:"090"},{a2:"SO",a3:"SOM",n:"706"},{a2:"ZA",a3:"ZAF",n:"710"},{a2:"GS",a3:"SGS",n:"239"},{a2:"SS",a3:"SSD",n:"728"},{a2:"ES",a3:"ESP",n:"724"},{a2:"LK",a3:"LKA",n:"144"},{a2:"SD",a3:"SDN",n:"729"},{a2:"SR",a3:"SUR",n:"740"},{a2:"SJ",a3:"SJM",n:"744"},{a2:"SE",a3:"SWE",n:"752"},{a2:"CH",a3:"CHE",n:"756"},{a2:"SY",a3:"SYR",n:"760"},{a2:"TW",a3:"TWN",n:"158"},{a2:"TJ",a3:"TJK",n:"762"},{a2:"TZ",a3:"TZA",n:"834"},{a2:"TH",a3:"THA",n:"764"},{a2:"TL",a3:"TLS",n:"626"},{a2:"TG",a3:"TGO",n:"768"},{a2:"TK",a3:"TKL",n:"772"},{a2:"TO",a3:"TON",n:"776"},{a2:"TT",a3:"TTO",n:"780"},{a2:"TN",a3:"TUN",n:"788"},{a2:"TR",a3:"TUR",n:"792"},{a2:"TM",a3:"TKM",n:"795"},{a2:"TC",a3:"TCA",n:"796"},{a2:"TV",a3:"TUV",n:"798"},{a2:"UG",a3:"UGA",n:"800"},{a2:"UA",a3:"UKR",n:"804"},{a2:"AE",a3:"ARE",n:"784"},{a2:"GB",a3:"GBR",n:"826"},{a2:"US",a3:"USA",n:"840"},{a2:"UM",a3:"UMI",n:"581"},{a2:"UY",a3:"URY",n:"858"},{a2:"UZ",a3:"UZB",n:"860"},{a2:"VU",a3:"VUT",n:"548"},{a2:"VE",a3:"VEN",n:"862"},{a2:"VN",a3:"VNM",n:"704"},{a2:"VG",a3:"VGB",n:"092"},{a2:"VI",a3:"VIR",n:"850"},{a2:"WF",a3:"WLF",n:"876"},{a2:"EH",a3:"ESH",n:"732"},{a2:"YE",a3:"YEM",n:"887"},{a2:"ZM",a3:"ZMB",n:"894"},{a2:"ZW",a3:"ZWE",n:"716"},{a2:"XK",a3:"XKX",n:"383"}];var U=function(e){c(n,B);var t=h(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,n),e=t.call(this,a);var r=["alpha2","alpha3","numeric"];if(!r.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid country.",mode:"alpha2"}}},{key:"validate",value:function(e){if(g(e)&&(e=String(e).padStart(3,"0")),this.options.trim&&(e=b(e)),!this.isEmptyValue(e))return"string"==typeof e&&(function(e,t){return"alpha2"===t&&void 0!==w.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return"alpha3"===t&&void 0!==w.find((function(t){return t.a3.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return"numeric"===t&&void 0!==w.find((function(t){return t.n.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode))?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}],[{key:"MODE_ALPHA2",get:function(){return"alpha2"}},{key:"MODE_ALPHA3",get:function(){return"alpha3"}},{key:"MODE_NUMERIC",get:function(){return"numeric"}}]),n}(),V=["ADP","AED","AFA","AFN","ALK","ALL","AMD","ANG","AOA","AOK","AON","AOR","ARA","ARL","ARM","ARP","ARS","ATS","AUD","AWG","AZM","AZN","BAD","BAM","BAN","BBD","BDT","BEC","BEF","BEL","BGL","BGM","BGN","BGO","BHD","BIF","BMD","BND","BOB","BOL","BOP","BOV","BRB","BRC","BRE","BRL","BRN","BRR","BRZ","BSD","BTN","BUK","BWP","BYB","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLE","CLF","CLP","CNH","CNX","CNY","COP","COU","CRC","CSD","CSK","CUC","CUP","CVE","CYP","CZK","DDM","DEM","DJF","DKK","DOP","DZD","ECS","ECV","EEK","EGP","ERN","ESA","ESB","ESP","ETB","EUR","FIM","FJD","FKP","FRF","GBP","GEK","GEL","GHC","GHS","GIP","GMD","GNF","GNS","GQE","GRD","GTQ","GWE","GWP","GYD","HKD","HNL","HRD","HRK","HTG","HUF","IDR","IEP","ILP","ILR","ILS","INR","IQD","IRR","ISJ","ISK","ITL","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRH","KRO","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LTT","LUC","LUF","LUL","LVL","LVR","LYD","MAD","MAF","MCF","MDC","MDL","MGA","MGF","MKD","MKN","MLF","MMK","MNT","MOP","MRO","MRU","MTL","MTP","MUR","MVP","MVR","MWK","MXN","MXP","MXV","MYR","MZE","MZM","MZN","NAD","NGN","NIC","NIO","NLG","NOK","NPR","NZD","OMR","PAB","PEI","PEN","PES","PGK","PHP","PKR","PLN","PLZ","PTE","PYG","QAR","RHD","ROL","RON","RSD","RUB","RUR","RWF","SAR","SBD","SCR","SDD","SDG","SDP","SEK","SGD","SHP","SIT","SKK","SLL","SOS","SRD","SRG","SSP","STD","STN","SUR","SVC","SYP","SZL","THB","TJR","TJS","TMM","TMT","TND","TOP","TPE","TRL","TRY","TTD","TWD","TZS","UAH","UAK","UGS","UGX","USD","USN","USS","UYI","UYP","UYU","UYW","UZS","VEB","VEF","VES","VND","VNN","VUV","WST","XAF","XCD","XEU","XFO","XFU","XOF","XPF","XRE","YDD","YER","YUD","YUM","YUN","YUR","ZAL","ZAR","ZMK","ZMW","ZRN","ZRZ","ZWD","ZWL","ZWR"],Z=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid currency."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e))return"string"==typeof e&&V.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),$=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be blank.",allow_null:!1}}},{key:"validate",value:function(e){if("string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==a(e)&&isNaN(e)||void 0===e||!this.options.allow_null&&null===e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}();var F=function(e){c(n,B);var t=h(n);function n(e){var a;if(i(this,n),a=t.call(this,e),!["regexp","url_api","html5"].includes(a.options.mode))throw new Error("Invalid validation mode provided: ".concat(a.options.mode));return a}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:"url_api",message:"This value is not a valid URL."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case"regexp":if(!function(e){return!(null===e.match(/^(https?:\/\/|ftps?:\/\/)?([a-z0-9%\-]+\.){1,}([a-z0-9\-]+)?(:(\d{1,5}))?(\/([a-z0-9\-._~:\/\?#\[\]@!$&'\(\)\*\+,;=%]+)?)?$/i))}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"url_api":if(!function(e){try{new URL(e)}catch(e){return!1}return!0}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5":if(!function(e){var t=document.createElement("input");return t.setAttribute("type","url"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_REGEXP",get:function(){return"regexp"}},{key:"MODE_URL_API",get:function(){return"url_api"}},{key:"MODE_HTML5",get:function(){return"html5"}}]),n}(),Y=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be false."}}},{key:"validate",value:function(e){if(!1!==e&&0!==e&&"0"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),K=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be true."}}},{key:"validate",value:function(e){if(!0!==e&&1!==e&&"1"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),H=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be valid JSON."}}},{key:"validate",value:function(e){try{JSON.parse(e)}catch(t){return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(),x=function(e){c(n,I);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return y(e)&&y(t)?e.getTime()===t.getTime():e==t}}]),n}(),W=function(e){c(n,I);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should not be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return y(e)&&y(t)?e.getTime()!==t.getTime():e!=t}}]),n}(),j=function(e){c(n,I);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return y(e)&&y(t)?e.getTime()>t.getTime():e>t}}]),n}(),J=function(e){c(n,I);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than or equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return y(e)&&y(t)?e.getTime()>=t.getTime():e>=t}}]),n}(),z=function(e){c(n,I);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be less than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return y(e)&&y(t)?e.getTime()0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),e.strict=!0,e.value=0,t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative."})}}]),n}(),Q=function(e){c(n,X);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),e.strict=!0,e.value=0,t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative or zero."})}}]),n}(),ee=function(e){c(n,j);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),e.strict=!0,e.value=0,t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive."})}}]),n}(),te=function(e){c(n,J);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),e.strict=!0,e.value=0,t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return l(l({},_(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive or zero."})}}]),n}(),ne=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be null."}}},{key:"validate",value:function(e){if(!A(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),ae=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be null."}}},{key:"validate",value:function(e){if(A(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},re=function(e){return!("undefined"!=typeof process||!process.env||!process.env[e])&&process.env[e]},oe="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},se=function(e,t){var n=re,a="",i=[],r=0,o=function e(t){if(t instanceof RegExp)return new RegExp(t);if(t instanceof Date)return new Date(t);var n={};for(var a in t)"object"===oe(t[a])?n[a]=e(t[a]):n[a]=t[a];return n},s="undefined"!=typeof window?window:ie;s.$locutus=s.$locutus||{};var u=s.$locutus;if(u.php=u.php||{},u.php.locales&&u.php.locales.fr_CA&&u.php.locales.fr_CA.LC_TIME&&u.php.locales.fr_CA.LC_TIME.x||(u.php.locales={},u.php.locales.en={LC_COLLATE:function(e,t){return e===t?0:e>t?1:-1},LC_CTYPE:{an:/^[A-Za-z\d]+$/g,al:/^[A-Za-z]+$/g,ct:/^[\u0000-\u001F\u007F]+$/g,dg:/^[\d]+$/g,gr:/^[\u0021-\u007E]+$/g,lw:/^[a-z]+$/g,pr:/^[\u0020-\u007E]+$/g,pu:/^[\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]+$/g,sp:/^[\f\n\r\t\v ]+$/g,up:/^[A-Z]+$/g,xd:/^[A-Fa-f\d]+$/g,CODESET:"UTF-8",lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"},LC_TIME:{a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %r %Z",p:["AM","PM"],P:["am","pm"],r:"%I:%M:%S %p",x:"%m/%d/%Y",X:"%r",alt_digits:"",ERA:"",ERA_YEAR:"",ERA_D_T_FMT:"",ERA_D_FMT:"",ERA_T_FMT:""},LC_MONETARY:{int_curr_symbol:"USD",currency_symbol:"$",mon_decimal_point:".",mon_thousands_sep:",",mon_grouping:[3],positive_sign:"",negative_sign:"-",int_frac_digits:2,frac_digits:2,p_cs_precedes:1,p_sep_by_space:0,n_cs_precedes:1,n_sep_by_space:0,p_sign_posn:3,n_sign_posn:0},LC_NUMERIC:{decimal_point:".",thousands_sep:",",grouping:[3]},LC_MESSAGES:{YESEXPR:"^[yY].*",NOEXPR:"^[nN].*",YESSTR:"",NOSTR:""},nplurals:function(e){return 1!==e?1:0}},u.php.locales.en_US=o(u.php.locales.en),u.php.locales.en_US.LC_TIME.c="%a %d %b %Y %r %Z",u.php.locales.en_US.LC_TIME.x="%D",u.php.locales.en_US.LC_TIME.X="%r",u.php.locales.en_US.LC_MONETARY.int_curr_symbol="USD ",u.php.locales.en_US.LC_MONETARY.p_sign_posn=1,u.php.locales.en_US.LC_MONETARY.n_sign_posn=1,u.php.locales.en_US.LC_MONETARY.mon_grouping=[3,3],u.php.locales.en_US.LC_NUMERIC.thousands_sep="",u.php.locales.en_US.LC_NUMERIC.grouping=[],u.php.locales.en_GB=o(u.php.locales.en),u.php.locales.en_GB.LC_TIME.r="%l:%M:%S %P %Z",u.php.locales.en_AU=o(u.php.locales.en_GB),u.php.locales.C=o(u.php.locales.en),u.php.locales.C.LC_CTYPE.CODESET="ANSI_X3.4-1968",u.php.locales.C.LC_MONETARY={int_curr_symbol:"",currency_symbol:"",mon_decimal_point:"",mon_thousands_sep:"",mon_grouping:[],p_cs_precedes:127,p_sep_by_space:127,n_cs_precedes:127,n_sep_by_space:127,p_sign_posn:127,n_sign_posn:127,positive_sign:"",negative_sign:"",int_frac_digits:127,frac_digits:127},u.php.locales.C.LC_NUMERIC={decimal_point:".",thousands_sep:"",grouping:[]},u.php.locales.C.LC_TIME.c="%a %b %e %H:%M:%S %Y",u.php.locales.C.LC_TIME.x="%m/%d/%y",u.php.locales.C.LC_TIME.X="%H:%M:%S",u.php.locales.C.LC_MESSAGES.YESEXPR="^[yY]",u.php.locales.C.LC_MESSAGES.NOEXPR="^[nN]",u.php.locales.fr=o(u.php.locales.en),u.php.locales.fr.nplurals=function(e){return e>1?1:0},u.php.locales.fr.LC_TIME.a=["dim","lun","mar","mer","jeu","ven","sam"],u.php.locales.fr.LC_TIME.A=["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],u.php.locales.fr.LC_TIME.b=["jan","fév","mar","avr","mai","jun","jui","aoû","sep","oct","nov","déc"],u.php.locales.fr.LC_TIME.B=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],u.php.locales.fr.LC_TIME.c="%a %d %b %Y %T %Z",u.php.locales.fr.LC_TIME.p=["",""],u.php.locales.fr.LC_TIME.P=["",""],u.php.locales.fr.LC_TIME.x="%d.%m.%Y",u.php.locales.fr.LC_TIME.X="%T",u.php.locales.fr_CA=o(u.php.locales.fr),u.php.locales.fr_CA.LC_TIME.x="%Y-%m-%d"),!u.php.locale&&(u.php.locale="en_US","undefined"!=typeof window&&window.document)){var l=window.document,c="https://www.w3.org/1999/xhtml",p="https://www.w3.org/XML/1998/namespace";l.getElementsByTagNameNS&&l.getElementsByTagNameNS(c,"html")[0]?l.getElementsByTagNameNS(c,"html")[0].getAttributeNS&&l.getElementsByTagNameNS(c,"html")[0].getAttributeNS(p,"lang")?u.php.locale=l.getElementsByTagName(c,"html")[0].getAttributeNS(p,"lang"):l.getElementsByTagNameNS(c,"html")[0].lang&&(u.php.locale=l.getElementsByTagNameNS(c,"html")[0].lang):l.getElementsByTagName("html")[0]&&l.getElementsByTagName("html")[0].lang&&(u.php.locale=l.getElementsByTagName("html")[0].lang)}if(u.php.locale=u.php.locale.replace("-","_"),u.php.locale in u.php.locales||u.php.locale.replace(/_[a-zA-Z]+$/,"")in u.php.locales&&(u.php.locale=u.php.locale.replace(/_[a-zA-Z]+$/,"")),u.php.localeCategories||(u.php.localeCategories={LC_COLLATE:u.php.locale,LC_CTYPE:u.php.locale,LC_MONETARY:u.php.locale,LC_NUMERIC:u.php.locale,LC_TIME:u.php.locale,LC_MESSAGES:u.php.locale}),null===t||""===t)t=n(e)||n("LANG");else if("[object Array]"===Object.prototype.toString.call(t))for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,n),e=t.call(this,a);var r=["array","date","bool","boolean","function","float","integer","null","numeric","object","string","double","int","ctype_alnum","ctype_alpha","ctype_cntrl","ctype_digit","ctype_graph","ctype_lower","ctype_print","ctype_punct","ctype_space","ctype_upper","ctype_xdigit"];if(!r.includes(e.options.type))throw new Error("Invalid type provided: ".concat(e.options.type));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be of type {{ type }}."}}},{key:"getRequiredOptions",value:function(){return["type"]}},{key:"validate",value:function(e){var t,n=!1;switch(this.options.type){case"array":n=E(e);break;case"date":n=y(e);break;case"bool":case"boolean":n=!0===(t=e)||!1===t;break;case"function":n=T(e);break;case"float":case"double":n=C(e);break;case"int":case"integer":n=S(e);break;case"null":n=A(e);break;case"numeric":n=g(e);break;case"object":n=M(e);break;case"string":n=L(e);break;case"ctype_alnum":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.an)}(e);break;case"ctype_alpha":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.al)}(e);break;case"ctype_cntrl":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.ct)}(e);break;case"ctype_digit":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.dg)}(e);break;case"ctype_graph":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.gr)}(e);break;case"ctype_lower":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.lw)}(e);break;case"ctype_print":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pr)}(e);break;case"ctype_punct":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pu)}(e);break;case"ctype_space":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.sp)}(e);break;case"ctype_upper":n=ue(e);break;case"ctype_xdigit":n=function(e){if("string"!=typeof e)return!1;se("LC_ALL",0);var t="undefined"!=typeof window?window:ie;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.xd)}(e)}if(!n)return this.getViolationBuilder().setParameter("value",e).setParameter("type",this.options.type).build(this.options.message)}}],[{key:"TYPE_ARRAY",get:function(){return"array"}},{key:"TYPE_DATE",get:function(){return"date"}},{key:"TYPE_BOOL",get:function(){return"bool"}},{key:"TYPE_BOOLEAN",get:function(){return"boolean"}},{key:"TYPE_FUNCTION",get:function(){return"function"}},{key:"TYPE_FLOAT",get:function(){return"float"}},{key:"TYPE_DOUBLE",get:function(){return"double"}},{key:"TYPE_INT",get:function(){return"int"}},{key:"TYPE_INTEGER",get:function(){return"integer"}},{key:"TYPE_NULL",get:function(){return"null"}},{key:"TYPE_NUMERIC",get:function(){return"numeric"}},{key:"TYPE_OBJECT",get:function(){return"object"}},{key:"TYPE_STRING",get:function(){return"string"}},{key:"CTYPE_ALNUM",get:function(){return"ctype_alnum"}},{key:"CTYPE_ALPHA",get:function(){return"ctype_alpha"}},{key:"CTYPE_CNTRL",get:function(){return"ctype_cntrl"}},{key:"CTYPE_DIGIT",get:function(){return"ctype_digit"}},{key:"CTYPE_GRAPH",get:function(){return"ctype_graph"}},{key:"CTYPE_LOWER",get:function(){return"ctype_lower"}},{key:"CTYPE_PRINT",get:function(){return"ctype_print"}},{key:"CTYPE_PUNCT",get:function(){return"ctype_punct"}},{key:"CTYPE_SPACE",get:function(){return"ctype_space"}},{key:"CTYPE_UPPER",get:function(){return"ctype_upper"}},{key:"CTYPE_XDIGIT",get:function(){return"ctype_xdigit"}}]),n}(),ce=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,n),!(e=t.call(this,r)).options.choices||!E(e.options.choices))throw new Error('Choices list should be type of "array", "'.concat(a(e.options.choices),'" given.'));return(e.options.min||e.options.max)&&(e.options.multiple=!0),e}return o(n,[{key:"getDefaultOptions",value:function(){return{multiple:!1,min:0,max:0,message:"The value you selected is not a valid choice.",message_min:"You must select at least {{ limit }} choices.",message_max:"You must select at most {{ limit }} choices.",message_multiple:"One or more of the given values is invalid."}}},{key:"getRequiredOptions",value:function(){return["choices"]}},{key:"validate",value:function(e){if(this.options.multiple&&!Array.isArray(e))return this.getViolationBuilder().build('Values list should be type of "array", "'.concat(a(e),'" given.'));if(!this.isEmptyValue(e))if(this.options.multiple){for(var t=0;t0&&e.length0&&e.length>this.options.max)return this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message_max)}else if(!this.options.choices.includes(e))return this.getViolationBuilder().setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message)}}]),n}(),pe='Provided value should be countable, "{{ type }}" given.',de=function(e){c(n,B);var t=h(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),(e=t.call(this,a)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return o(n,[{key:"getDefaultOptions",value:function(){return{message_min:"This collection should contain {{ limit }} elements or more.",message_max:"This collection should contain {{ limit }} elements or less.",message_exact:"This collection should contain exactly {{ limit }} elements."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(null==(t=e)||L(t)||!(E(t)||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Map||t instanceof Set||t instanceof WeakMap||t instanceof WeakSet||t instanceof ArrayBuffer))return this.getViolationBuilder().setParameter("type",a(e)).build(pe);var t,n;switch(!0){case e.hasOwnProperty("size")||e instanceof Map||e instanceof Set:n=e.size;break;case e instanceof ArrayBuffer:n=e.byteLength;break;default:n=e.length}return void 0===n?this.getViolationBuilder().setParameter("type",a(e)).build(pe):null!==this.options.min&&this.options.min===this.options.max&&n!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&n>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&n0&&void 0!==arguments[0]?arguments[0]:{};return i(this,a),n.call(this,e)}return o(a,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid timezone."}}},{key:"validate",value:function(t){if(this.options.trim&&(t=b(t)),!this.isEmptyValue(t))return"string"==typeof t&&e.DateTime.local().setZone(t).isValid?void 0:this.getViolationBuilder().setParameter("value",t).build(this.options.message)}}]),a}(),_e=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,n),!(e=t.call(this,r)).options.value||!g(e.options.value))throw new Error('Value should be type of "number", "'.concat(a(e.options.value),'" given.'));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be a multiple of {{ compared_value }}.",message_type:'This values has different types. Given type is "{{ current_type }}"; Expected type is "{{ expected_type }}".'}}},{key:"getRequiredOptions",value:function(){return["value"]}},{key:"validate",value:function(e){if(!this.isEmptyValue(e))return g(e)?e%this.options.value!=0?this.getViolationBuilder().setParameter("compared_value",this.options.value).setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",this.options.value).setParameter("current_type",a(e)).setParameter("expected_type","number").build(this.options.message_type)}}]),n}();function me(e,t){var a=n.default.parse(e);return"ipv4"===a.kind()&&!(("4_no_priv"===t||"all_no_priv"===t)&&"private"===a.range()||("4_no_res"===t||"all_no_res"===t)&&"reserved"===a.range()||("4_pub"===t||"all_pub"===t)&&("private"===a.range()||"reserved"===a.range()))}function ve(e,t){var a=n.default.parse(e);return"ipv6"===a.kind()&&!(("6_no_priv"===t||"all_no_priv"===t)&&"uniqueLocal"===a.range()||("6_no_res"===t||"all_no_res"===t)&&"reserved"===a.range()||("6_pub"===t||"all_pub"===t)&&("uniqueLocal"===a.range()||"reserved"===a.range()))}var ge=function(e){c(a,B);var t=h(a);function a(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,a),e=t.call(this,n);var r=["all","4","6","4_no_priv","6_no_priv","all_no_priv","4_no_res","6_no_res","all_no_res","4_pub","6_pub","all_pub"];if(!r.includes(e.options.version))throw new Error("Invalid validation version provided: ".concat(e.options.version));return e}return o(a,[{key:"getDefaultOptions",value:function(){return{trim:!0,version:"4",message:"This is not a valid IP address."}}},{key:"getRequiredOptions",value:function(){return["version"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!("string"==typeof e&&0===e.length||"string"!=typeof e&&isNaN(e)||null==e)){if(!n.default.isValid(e)||!n.default.IPv4.isValidFourPartDecimal(e)&&!n.default.IPv6.isValid(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);switch(this.options.version){case"4":case"4_no_priv":case"4_no_res":case"4_pub":if(!me(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"6":case"6_no_priv":case"6_no_res":case"6_pub":if(!ve(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"all_no_priv":case"all_no_res":case"all_pub":if(!me(e,this.options.version)&&!ve(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}}],[{key:"MODE_ALL",get:function(){return"all"}},{key:"MODE_V4",get:function(){return"4"}},{key:"MODE_V6",get:function(){return"6"}},{key:"MODE_V4_NO_PRIV",get:function(){return"4_no_priv"}},{key:"MODE_V6_NO_PRIV",get:function(){return"6_no_priv"}},{key:"MODE_ALL_NO_PRIV",get:function(){return"all_no_priv"}},{key:"MODE_V4_NO_RES",get:function(){return"4_no_res"}},{key:"MODE_V6_NO_RES",get:function(){return"6_no_res"}},{key:"MODE_ALL_NO_RES",get:function(){return"all_no_res"}},{key:"MODE_V4_PUB",get:function(){return"4_pub"}},{key:"MODE_V6_PUB",get:function(){return"6_pub"}},{key:"MODE_ALL_PUB",get:function(){return"all_pub"}}]),a}(),ye=["AB","AA","AF","AK","SQ","AM","AR","AN","HY","AS","AV","AE","AY","AZ","BM","BA","EU","BE","BN","BH","BI","BS","BR","BG","MY","CA","CH","CE","NY","ZH","ZH-HANS","ZH-HANT","CV","KW","CO","CR","HR","CS","DA","DV","NL","DZ","EN","EO","ET","EE","FO","FJ","FI","FR","FF","GL","GD","GV","KA","DE","EL","KL","GN","GU","HT","HA","HE","HZ","HI","HO","HU","IS","IO","IG","IN","IA","IE","IU","IK","GA","IT","JA","JV","KL","KN","KR","KS","KK","KM","KI","RW","RN","KY","KV","KG","KO","KU","KJ","LO","LA","LV","LI","LN","LT","LU","LG","LB","GV","MK","MG","MS","ML","MT","MI","MR","MH","MO","MN","NA","NV","NG","ND","NE","NO","NB","NN","II","OC","OJ","CU","OR","OM","OS","PI","PS","FA","PL","PT","PA","QU","RM","RO","RU","SE","SM","SG","SA","SR","SH","ST","TN","SN","II","SD","SI","SS","SK","SL","SO","NR","ES","SU","SW","SS","SV","TL","TY","TG","TA","TT","TE","TH","BO","TI","TO","TS","TR","TK","TW","UG","UK","UR","UZ","VE","VI","VO","WA","CY","WO","FY","XH","YI","YO","ZA","ZU"],Ae=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid language."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e))return"string"==typeof e&&ye.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),Ee=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,n),!T((e=t.call(this,r)).options.callback))throw new Error('Value should be type of "function", "'.concat(a(e.options.callback),'" given.'));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{message:"This value is not a valid."}}},{key:"getRequiredOptions",value:function(){return["callback"]}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.options.callback(e,t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),Te=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,n),"string"!=typeof(e=t.call(this,r)).options.pattern&&!(e.options.pattern instanceof RegExp))throw new Error('Pattern should be type of "string", '.concat(a(e.options.pattern)," given."));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!1,match:!0,message:"This value is not valid."}}},{key:"getRequiredOptions",value:function(){return["pattern"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){if("string"!=typeof e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);var t=new RegExp(this.options.pattern);return this.options.match&&!t.test(e)||!this.options.match&&t.test(e)?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(),Ce=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,n);var o=!(void 0===(e=t.call(this,r)).options.min||null===e.options.min),s=!(void 0===e.options.max||null===e.options.max);if(o&&!g(e.options.min)&&!y(e.options.min))throw new Error('Min limit should be type of "number" or "Date", "'.concat(a(e.options.min),'" given.'));if(s&&!g(e.options.max)&&!y(e.options.max))throw new Error('Max limit should be type of "number" or "Date", "'.concat(a(e.options.max),'" given.'));if(o&&s){if(g(e.options.min)&&!g(e.options.max))throw new Error('Max limit should be type of "number", "'.concat(a(e.options.max),'" given.'));if(y(e.options.min)&&!y(e.options.max))throw new Error('Max limit should be type of "Date", "'.concat(a(e.options.max),'" given.'))}return e.options.min=g(e.options.min)?parseFloat(e.options.min):e.options.min,e.options.max=g(e.options.max)?parseFloat(e.options.max):e.options.max,e}return o(n,[{key:"getDefaultOptions",value:function(){return{message_min:"This value should be {{ limit }} or more.",message_max:"This value should be {{ limit }} or less.",message:"This value should be between {{ min }} and {{ max }}."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){(y(this.options.min)||y(this.options.max))&&(e="now"===e?new Date:new Date(e));var t=!(void 0===this.options.min||null===this.options.min),n=!(void 0===this.options.max||null===this.options.max);return this.isEmptyValue(e)||t&&n&&(ethis.options.max)||!y(this.options.min)&&!y(this.options.max)&&y(e)?this.getViolationBuilder().setParameter("min",y(this.options.min)?this.formatDateValue(this.options.min):this.options.min).setParameter("max",y(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",y(e)?this.formatDateValue(e):e).build(this.options.message):t&&ethis.options.max?this.getViolationBuilder().setParameter("limit",y(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",y(e)?this.formatDateValue(e):e).build(this.options.message_max):void 0}}]),n}(),Se=["af","af_NA","af_ZA","ak","ak_GH","am","am_ET","ar","ar_AE","ar_BH","ar_DJ","ar_DZ","ar_EG","ar_EH","ar_ER","ar_IL","ar_IQ","ar_JO","ar_KM","ar_KW","ar_LB","ar_LY","ar_MA","ar_MR","ar_OM","ar_PS","ar_QA","ar_SA","ar_SD","ar_SO","ar_SS","ar_SY","ar_TD","ar_TN","ar_YE","as","as_IN","az","az_AZ","az_Cyrl","az_Cyrl_AZ","az_Latn","az_Latn_AZ","be","be_BY","bg","bg_BG","bm","bm_ML","bn","bn_BD","bn_IN","bo","bo_CN","bo_IN","br","br_FR","bs","bs_BA","bs_Cyrl","bs_Cyrl_BA","bs_Latn","bs_Latn_BA","ca","ca_AD","ca_ES","ca_FR","ca_IT","ce","ce_RU","cs","cs_CZ","cy","cy_GB","da","da_DK","da_GL","de","de_AT","de_BE","de_CH","de_DE","de_IT","de_LI","de_LU","dz","dz_BT","ee","ee_GH","ee_TG","el","el_CY","el_GR","en","en_AE","en_AG","en_AI","en_AS","en_AT","en_AU","en_BB","en_BE","en_BI","en_BM","en_BS","en_BW","en_BZ","en_CA","en_CC","en_CH","en_CK","en_CM","en_CX","en_CY","en_DE","en_DK","en_DM","en_ER","en_FI","en_FJ","en_FK","en_FM","en_GB","en_GD","en_GG","en_GH","en_GI","en_GM","en_GU","en_GY","en_HK","en_IE","en_IL","en_IM","en_IN","en_IO","en_JE","en_JM","en_KE","en_KI","en_KN","en_KY","en_LC","en_LR","en_LS","en_MG","en_MH","en_MO","en_MP","en_MS","en_MT","en_MU","en_MW","en_MY","en_NA","en_NF","en_NG","en_NL","en_NR","en_NU","en_NZ","en_PG","en_PH","en_PK","en_PN","en_PR","en_PW","en_RW","en_SB","en_SC","en_SD","en_SE","en_SG","en_SH","en_SI","en_SL","en_SS","en_SX","en_SZ","en_TC","en_TK","en_TO","en_TT","en_TV","en_TZ","en_UG","en_UM","en_US","en_VC","en_VG","en_VI","en_VU","en_WS","en_ZA","en_ZM","en_ZW","eo","es","es_AR","es_BO","es_BR","es_BZ","es_CL","es_CO","es_CR","es_CU","es_DO","es_EC","es_ES","es_GQ","es_GT","es_HN","es_MX","es_NI","es_PA","es_PE","es_PH","es_PR","es_PY","es_SV","es_US","es_UY","es_VE","et","et_EE","eu","eu_ES","fa","fa_AF","fa_IR","ff","ff_CM","ff_GN","ff_Latn","ff_Latn_BF","ff_Latn_CM","ff_Latn_GH","ff_Latn_GM","ff_Latn_GN","ff_Latn_GW","ff_Latn_LR","ff_Latn_MR","ff_Latn_NE","ff_Latn_NG","ff_Latn_SL","ff_Latn_SN","ff_MR","ff_SN","fi","fi_FI","fo","fo_DK","fo_FO","fr","fr_BE","fr_BF","fr_BI","fr_BJ","fr_BL","fr_CA","fr_CD","fr_CF","fr_CG","fr_CH","fr_CI","fr_CM","fr_DJ","fr_DZ","fr_FR","fr_GA","fr_GF","fr_GN","fr_GP","fr_GQ","fr_HT","fr_KM","fr_LU","fr_MA","fr_MC","fr_MF","fr_MG","fr_ML","fr_MQ","fr_MR","fr_MU","fr_NC","fr_NE","fr_PF","fr_PM","fr_RE","fr_RW","fr_SC","fr_SN","fr_SY","fr_TD","fr_TG","fr_TN","fr_VU","fr_WF","fr_YT","fy","fy_NL","ga","ga_GB","ga_IE","gd","gd_GB","gl","gl_ES","gu","gu_IN","gv","gv_IM","ha","ha_GH","ha_NE","ha_NG","he","he_IL","hi","hi_IN","hr","hr_BA","hr_HR","hu","hu_HU","hy","hy_AM","ia","id","id_ID","ig","ig_NG","ii","ii_CN","is","is_IS","it","it_CH","it_IT","it_SM","it_VA","ja","ja_JP","jv","jv_ID","ka","ka_GE","ki","ki_KE","kk","kk_KZ","kl","kl_GL","km","km_KH","kn","kn_IN","ko","ko_KP","ko_KR","ks","ks_IN","ku","ku_TR","kw","kw_GB","ky","ky_KG","lb","lb_LU","lg","lg_UG","ln","ln_AO","ln_CD","ln_CF","ln_CG","lo","lo_LA","lt","lt_LT","lu","lu_CD","lv","lv_LV","mg","mg_MG","mi","mi_NZ","mk","mk_MK","ml","ml_IN","mn","mn_MN","mr","mr_IN","ms","ms_BN","ms_MY","ms_SG","mt","mt_MT","my","my_MM","nb","nb_NO","nb_SJ","nd","nd_ZW","ne","ne_IN","ne_NP","nl","nl_AW","nl_BE","nl_BQ","nl_CW","nl_NL","nl_SR","nl_SX","nn","nn_NO","no","no_NO","om","om_ET","om_KE","or","or_IN","os","os_GE","os_RU","pa","pa_Arab","pa_Arab_PK","pa_Guru","pa_Guru_IN","pa_IN","pa_PK","pl","pl_PL","ps","ps_AF","ps_PK","pt","pt_AO","pt_BR","pt_CH","pt_CV","pt_GQ","pt_GW","pt_LU","pt_MO","pt_MZ","pt_PT","pt_ST","pt_TL","qu","qu_BO","qu_EC","qu_PE","rm","rm_CH","rn","rn_BI","ro","ro_MD","ro_RO","ru","ru_BY","ru_KG","ru_KZ","ru_MD","ru_RU","ru_UA","rw","rw_RW","sd","sd_PK","se","se_FI","se_NO","se_SE","sg","sg_CF","sh","sh_BA","si","si_LK","sk","sk_SK","sl","sl_SI","sn","sn_ZW","so","so_DJ","so_ET","so_KE","so_SO","sq","sq_AL","sq_MK","sr","sr_BA","sr_Cyrl","sr_Cyrl_BA","sr_Cyrl_ME","sr_Cyrl_RS","sr_Latn","sr_Latn_BA","sr_Latn_ME","sr_Latn_RS","sr_ME","sr_RS","sv","sv_AX","sv_FI","sv_SE","sw","sw_CD","sw_KE","sw_TZ","sw_UG","ta","ta_IN","ta_LK","ta_MY","ta_SG","te","te_IN","tg","tg_TJ","th","th_TH","ti","ti_ER","ti_ET","tk","tk_TM","tl","tl_PH","to","to_TO","tr","tr_CY","tr_TR","tt","tt_RU","ug","ug_CN","uk","uk_UA","ur","ur_IN","ur_PK","uz","uz_AF","uz_Arab","uz_Arab_AF","uz_Cyrl","uz_Cyrl_UZ","uz_Latn","uz_Latn_UZ","uz_UZ","vi","vi_VN","wo","wo_SN","xh","xh_ZA","yi","yo","yo_BJ","yo_NG","zh","zh_CN","zh_HK","zh_Hans","zh_Hans_CN","zh_Hans_HK","zh_Hans_MO","zh_Hans_SG","zh_Hant","zh_Hant_HK","zh_Hant_MO","zh_Hant_TW","zh_MO","zh_SG","zh_TW","zu","zu_ZA"],Me=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid locale."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){var t=N.canonicalize(e);return"string"==typeof t&&Se.includes(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}();function Le(e){if(!/^[\d|X]+$/.test(e)||10!==e.length)return!1;for(var t=0,n=0;n<10;n++){t+=("X"===e.charAt(n)?10:parseInt(e.charAt(n)))*(10-n)}return t%11==0}function be(e){if(!g(e)||13!==e.length)return!1;for(var t=0,n=0;n<13;n+=2)t+=parseInt(e.charAt(n));for(var a=1;a<12;a+=2)t+=3*parseInt(e.charAt(a));return t%10==0}var Re,Pe=function(e){c(n,B);var t=h(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,n);var r=[null,"isbn10","isbn13"],o=null===(e=t.call(this,a)).options.mode?null:e.options.mode.toLowerCase();if(!r.includes(o))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:null,message:"This value is neither a valid ISBN-10 nor a valid ISBN-13.",message_isbn10:"This value is not a valid ISBN-10.",message_isbn13:"This value is not a valid ISBN-13."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/-/g,"",e).toUpperCase();return"isbn10"===this.options.mode?Le(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn10):"isbn13"!==this.options.mode||be(t)?Le(t)||be(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message):this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn13)}}}],[{key:"MODE_ALL",get:function(){return null}},{key:"MODE_ISBN_10",get:function(){return"isbn10"}},{key:"MODE_ISBN_13",get:function(){return"isbn13"}}]),n}(),Ne=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!1,case_sensitive:!1,hyphen:!1,message:"This value is not a valid ISSN."}}},{key:"validate",value:function(e){if("string"==typeof e&&!this.isEmptyValue(e)){var t=e=this.options.trim?b(e):e;if(t.length>4&&"-"===t.charAt(4))t=t.replace(/-/g,"");else if(this.options.hyphen)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(8!==t.length||this.options.case_sensitive&&!/^\d{7}[X|0-9]$/.test(t)||!this.options.case_sensitive&&!/^\d{7}[xX|0-9]$/.test(t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var n="x"===t.charAt(7)||"X"===t.charAt(7)?10:parseInt(t.charAt(7)),a=0;a<7;++a)n+=(8-a)*parseInt(t.charAt(a));return n%11!=0?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(),Oe=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Invalid card number."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){if(/[^0-9-\s]+/.test(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var t=e.toString().replace(/\D/g,""),n=0,a=t.length-1;a>=0;a-=2)n+=parseInt(t.charAt(a));for(var i=t.length-2;i>=0;i-=2)n+=(2*parseInt(t.charAt(i))).toString().split("").reduce((function(e,t){return parseInt(e)+parseInt(t)}),0);return 0===n||0!=n%10?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(),Be=(s(Re={},"AMEX",[/^3[47][0-9]{13}$/]),s(Re,"CHINA_UNIONPAY",[/^62[0-9]{14,17}$/]),s(Re,"DINERS",[/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/]),s(Re,"DISCOVER",[/^6011[0-9]{12}$/,/^64[4-9][0-9]{13}$/,/^65[0-9]{14}$/,/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/]),s(Re,"INSTAPAYMENT",[/^63[7-9][0-9]{13}$/]),s(Re,"JCB",[/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/]),s(Re,"LASER",[/^(6304|670[69]|6771)[0-9]{12,15}$/]),s(Re,"MAESTRO",[/^(6759[0-9]{2})[0-9]{6,13}$/,/^(50[0-9]{4})[0-9]{6,13}$/,/^5[6-9][0-9]{10,17}$/,/^6[0-9]{11,18}$/]),s(Re,"MASTERCARD",[/^5[1-5][0-9]{14}$/,/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/]),s(Re,"MIR",[/^220[0-4][0-9]{12}$/]),s(Re,"UATP",[/^1[0-9]{14}$/]),s(Re,"VISA",[/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/]),Re),Ie=function(e){c(n,B);var t=h(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,n),(e=t.call(this,r)).options.schemas=L(e.options.schemas)?[e.options.schemas]:e.options.schemas,!E(e.options.schemas))throw new Error('Value should be type of "array" or "string", "'.concat(a(e.options.schemas),'" given.'));if(0===e.options.schemas.length)throw new Error("The schemas list cannot be empty.");var o=Object.keys(Be),s=e.options.schemas.filter((function(e){return o.includes(e.toUpperCase())}));if(s.length!==e.options.schemas.length)throw new Error("The schemas list contains one or more unsupported elements.");return e}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Unsupported card type or invalid card number."}}},{key:"getRequiredOptions",value:function(){return["schemas"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){if(g(e)){var t,n=v(this.options.schemas);try{for(n.s();!(t=n.n()).done;){var a,i=t.value,r=v(Be[i]);try{for(r.s();!(a=r.n()).done;){if(a.value.test(e))return}}catch(e){r.e(e)}finally{r.f()}}}catch(e){n.e(e)}finally{n.f()}}return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"SCHEMA_AMEX",get:function(){return"AMEX"}},{key:"SCHEMA_CHINA_UNIONPAY",get:function(){return"CHINA_UNIONPAY"}},{key:"SCHEMA_DINERS",get:function(){return"DINERS"}},{key:"SCHEMA_DISCOVER",get:function(){return"DISCOVER"}},{key:"SCHEMA_INSTAPAYMENT",get:function(){return"INSTAPAYMENT"}},{key:"SCHEMA_JCB",get:function(){return"JCB"}},{key:"SCHEMA_LASER",get:function(){return"LASER"}},{key:"SCHEMA_MAESTRO",get:function(){return"MAESTRO"}},{key:"SCHEMA_MASTERCARD",get:function(){return"MASTERCARD"}},{key:"SCHEMA_MIR",get:function(){return"MIR"}},{key:"SCHEMA_UATP",get:function(){return"UATP"}},{key:"SCHEMA_VISA",get:function(){return"VISA"}}]),n}(),ke={AD:/^AD\d{2}\d{4}\d{4}[\dA-Z]{12}$/,AE:/^AE\d{2}\d{3}\d{16}$/,AL:/^AL\d{2}\d{8}[\dA-Z]{16}$/,AO:/^AO\d{2}\d{21}$/,AT:/^AT\d{2}\d{5}\d{11}$/,AX:/^FI\d{2}\d{6}\d{7}\d{1}$/,AZ:/^AZ\d{2}[A-Z]{4}[\dA-Z]{20}$/,BA:/^BA\d{2}\d{3}\d{3}\d{8}\d{2}$/,BE:/^BE\d{2}\d{3}\d{7}\d{2}$/,BF:/^BF\d{2}\d{23}$/,BG:/^BG\d{2}[A-Z]{4}\d{4}\d{2}[\dA-Z]{8}$/,BH:/^BH\d{2}[A-Z]{4}[\dA-Z]{14}$/,BI:/^BI\d{2}\d{12}$/,BJ:/^BJ\d{2}[A-Z]{1}\d{23}$/,BY:/^BY\d{2}[\dA-Z]{4}\d{4}[\dA-Z]{16}$/,BL:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,BR:/^BR\d{2}\d{8}\d{5}\d{10}[A-Z][\dA-Z]$/,CG:/^CG\d{2}\d{23}$/,CH:/^CH\d{2}\d{5}[\dA-Z]{12}$/,CI:/^CI\d{2}[A-Z]{1}\d{23}$/,CM:/^CM\d{2}\d{23}$/,CR:/^CR\d{2}0\d{3}\d{14}$/,CV:/^CV\d{2}\d{21}$/,CY:/^CY\d{2}\d{3}\d{5}[\dA-Z]{16}$/,CZ:/^CZ\d{2}\d{20}$/,DE:/^DE\d{2}\d{8}\d{10}$/,DO:/^DO\d{2}[\dA-Z]{4}\d{20}$/,DK:/^DK\d{2}\d{4}\d{10}$/,DZ:/^DZ\d{2}\d{20}$/,EE:/^EE\d{2}\d{2}\d{2}\d{11}\d{1}$/,ES:/^ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}$/,FI:/^FI\d{2}\d{6}\d{7}\d{1}$/,FO:/^FO\d{2}\d{4}\d{9}\d{1}$/,FR:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GB:/^GB\d{2}[A-Z]{4}\d{6}\d{8}$/,GE:/^GE\d{2}[A-Z]{2}\d{16}$/,GI:/^GI\d{2}[A-Z]{4}[\dA-Z]{15}$/,GL:/^GL\d{2}\d{4}\d{9}\d{1}$/,GP:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GR:/^GR\d{2}\d{3}\d{4}[\dA-Z]{16}$/,GT:/^GT\d{2}[\dA-Z]{4}[\dA-Z]{20}$/,HR:/^HR\d{2}\d{7}\d{10}$/,HU:/^HU\d{2}\d{3}\d{4}\d{1}\d{15}\d{1}$/,IE:/^IE\d{2}[A-Z]{4}\d{6}\d{8}$/,IL:/^IL\d{2}\d{3}\d{3}\d{13}$/,IR:/^IR\d{2}\d{22}$/,IS:/^IS\d{2}\d{4}\d{2}\d{6}\d{10}$/,IT:/^IT\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,JO:/^JO\d{2}[A-Z]{4}\d{4}[\dA-Z]{18}$/,KW:/^KW\d{2}[A-Z]{4}\d{22}$/,KZ:/^KZ\d{2}\d{3}[\dA-Z]{13}$/,LB:/^LB\d{2}\d{4}[\dA-Z]{20}$/,LI:/^LI\d{2}\d{5}[\dA-Z]{12}$/,LT:/^LT\d{2}\d{5}\d{11}$/,LU:/^LU\d{2}\d{3}[\dA-Z]{13}$/,LV:/^LV\d{2}[A-Z]{4}[\dA-Z]{13}$/,MC:/^MC\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MD:/^MD\d{2}[\dA-Z]{2}[\dA-Z]{18}$/,ME:/^ME\d{2}\d{3}\d{13}\d{2}$/,MF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MG:/^MG\d{2}\d{23}$/,MK:/^MK\d{2}\d{3}[\dA-Z]{10}\d{2}$/,ML:/^ML\d{2}[A-Z]{1}\d{23}$/,MQ:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MR:/^MR13\d{5}\d{5}\d{11}\d{2}$/,MT:/^MT\d{2}[A-Z]{4}\d{5}[\dA-Z]{18}$/,MU:/^MU\d{2}[A-Z]{4}\d{2}\d{2}\d{12}\d{3}[A-Z]{3}$/,MZ:/^MZ\d{2}\d{21}$/,NC:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,NL:/^NL\d{2}[A-Z]{4}\d{10}$/,NO:/^NO\d{2}\d{4}\d{6}\d{1}$/,PF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PK:/^PK\d{2}[A-Z]{4}[\dA-Z]{16}$/,PL:/^PL\d{2}\d{8}\d{16}$/,PM:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PS:/^PS\d{2}[A-Z]{4}[\dA-Z]{21}$/,PT:/^PT\d{2}\d{4}\d{4}\d{11}\d{2}$/,QA:/^QA\d{2}[A-Z]{4}[\dA-Z]{21}$/,RE:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,RO:/^RO\d{2}[A-Z]{4}[\dA-Z]{16}$/,RS:/^RS\d{2}\d{3}\d{13}\d{2}$/,SA:/^SA\d{2}\d{2}[\dA-Z]{18}$/,SE:/^SE\d{2}\d{3}\d{16}\d{1}$/,SI:/^SI\d{2}\d{5}\d{8}\d{2}$/,SK:/^SK\d{2}\d{4}\d{6}\d{10}$/,SM:/^SM\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,SN:/^SN\d{2}[A-Z]{1}\d{23}$/,TF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,TL:/^TL\d{2}\d{3}\d{14}\d{2}$/,TN:/^TN59\d{2}\d{3}\d{13}\d{2}$/,TR:/^TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}$/,UA:/^UA\d{2}\d{6}[\dA-Z]{19}$/,VA:/^VA\d{2}\d{3}\d{15}$/,VG:/^VG\d{2}[A-Z]{4}\d{16}$/,WF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,XK:/^XK\d{2}\d{4}\d{10}\d{2}$/,YT:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/};var De=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid International Bank Account Number (IBAN)."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/ /g,"",e.toUpperCase()),n=t.substring(0,2);return/^[A-Z0-9]+$/.test(t)&&function(e){return void 0!==w.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(n)&&void 0!==ke[n]&&ke[n].test(t)?1!==function(e){var t=0;return function(e,t){if(null===t&&(t=1),null===e||t<1)return!1;for(var n=[],a=0,i=(e+="").length;a=55296&&n<=56319){var a=n;return 1===t.length?n:1024*(a-55296)+(t.charCodeAt(1)-56320)+65536}return n}(e)-55:t+=e})),t}(t.substring(4)+t.substring(0,4)))?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(),Ge={GF:"FR",PF:"FR",TF:"FR",GP:"FR",MQ:"FR",YT:"FR",NC:"FR",RE:"FR",PM:"FR",WF:"FR",JE:"GB",IM:"GB",GG:"GB",VG:"GB"};function we(e){return void 0!==w.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}var Ue=function(e){c(n,B);var t=h(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,n),t.call(this,e)}return o(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid Business Identifier Code (BIC).",message_iban:"This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.",iban_path:null}}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{form:{}};if(this.options.trim&&(e=b(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var n=e.replace(/ /g,"",e);if(!([8,11].includes(n.length)&&/^[A-Z0-9]+$/.test(n)&&/^[A-Z]{4}/.test(n)&&we(n.substring(4,6))))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(null!==this.options.iban_path&&L(this.options.iban_path)){var a=t.form[this.options.iban_path];if(this.isEmptyValue(a))return;var i=a.substring(0,2),r=n.substring(4,6);if(i===r||i===Ge[r])return;return this.getViolationBuilder().setParameter("value",e).setParameter("iban",a).build(this.options.message_iban)}}}}]),n}(),Ve=function(){function e(){i(this,e)}return o(e,[{key:"validate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[];return E(t)?(t.forEach((function(t){if(!(t instanceof B))return!1;var i=t.validate(e,n);void 0!==i&&a.push(i)})),a):a}}]),e}(),Ze=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,e),s(this,"constraints",[]),s(this,"options",{}),s(this,"transformers",[]),s(this,"reversTransformers",[]),this.constraints=t,this.options=n}return o(e,[{key:"getMappedFieldName",value:function(e){return"string"==typeof this.options.map_name&&this.options.map_name.length>0?this.options.map_name:e}},{key:"getConstraints",value:function(){return this.constraints}},{key:"getOptions",value:function(){return this.options}},{key:"getTransformers",value:function(){return this.transformers}},{key:"getReverseTransformers",value:function(){return this.reversTransformers}},{key:"addTransformer",value:function(e){if(!T(e))throw new Error('Transformer must be type of "function", '.concat(a(e)," given."));return this.transformers.push(e),this}},{key:"addReverseTransformer",value:function(e){if(!T(e))throw new Error('Transformer must be type of "function", '.concat(a(e)," given."));return this.reversTransformers.push(e),this}},{key:"resetTransformers",value:function(){return this.transformers=[],this}},{key:"resetReverseTransformers",value:function(){return this.reversTransformers=[],this}}]),e}(),$e=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),s(this,"validator",void 0),s(this,"violationBuilder",void 0),s(this,"fields",{}),s(this,"data",{}),s(this,"errors",{}),s(this,"transformers",[]),s(this,"reversTransformers",[]),this.options=l(l({},{extra_fields:!1,extra_fields_message:"This form should not contain extra fields."}),t),this.validator=new Ve,this.violationBuilder=new P}return o(e,[{key:"add",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof e)throw new Error('The field should be type of "string", "'.concat(a(e),'" given.'));if(0===e.length)throw new Error("The field name is too short.");if(void 0!==t&&!E(t))throw new Error('The constants should be type of "array", "'.concat(a(t),'" given.'));if(void 0!==this.fields[e])throw new Error("The field ".concat(e," already exists in this form."));return this.fields[e]=new Ze(E(t)?t:[],l(l({},{}),n)),this}},{key:"validate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.errors={},this.data=t,this.options.extra_fields||this.checkExtraFields(),Object.keys(this.errors).length>0||(this.data=R(this.transformers)(this.data,n),Object.keys(this.fields).forEach((function(t){var a=e.fields[t],i=l(l({},n),{field:a.getOptions(),form:e});e.data[t]=R(a.getTransformers())(e.data[t],i);var r=e.validator.validate(e.data[t],a.getConstraints(),i);r.length>0&&e.addValidationErrors(a.getMappedFieldName(t),r),e.data[t]=R(a.getReverseTransformers())(e.data[t],i)})),this.data=R(this.reversTransformers)(this.data,n)),this.errors}},{key:"addValidationErrors",value:function(e,t){return E(this.errors[e])||(this.errors[e]=[]),E(t)?this.errors[e]=this.errors[e].concat(t):this.errors[e].push(t),this}},{key:"checkExtraFields",value:function(){for(var e=0,t=Object.keys(this.data);ee.length)&&(t=e.length);for(var n=0,a=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function v(e){return t=e,n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),("number"==typeof t||"string"==typeof t&&-1===n.indexOf(t.slice(-1)))&&""!==t&&!isNaN(t);var t,n}function g(e){return"[object Date]"===Object.prototype.toString.call(e)&&e instanceof Date}function y(e){return null===e}function A(e){return Array.isArray(e)}function E(e){return"function"==typeof e}function T(e){return!(+(t=e)!==t||isFinite(t)&&!(t%1));var t}function C(e){return(t=e)===+t&&isFinite(t)&&!(t%1);var t}function S(e){return"[object Array]"!==Object.prototype.toString.call(e)&&null!==e&&("object"===n(e)&&e===Object(e))}function L(e){return"string"==typeof e}function M(e){return"string"!=typeof e?e:function(e,t){var n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),a=0,i=0;for(e+="",t&&(n=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),a=e.length,i=0;i=0;i--)if(-1===n.indexOf(e.charAt(i))){e=e.substring(0,i+1);break}return-1===n.indexOf(e.charAt(0))?e:""}(e,[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," ","\0"].join(""))}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!A(e))throw new Error('Functions list must be type of "array", "'.concat(n(e),'" given.'));return e=e.filter((function(e){return E(e)})),function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 0===e.length?n:e.reduce((function(e,n){return n(e,u(u({},t),a))}),n)}}var R=function(){function e(){a(this,e),this.parameters={}}return r(e,[{key:"setParameter",value:function(e,t){if("string"!=typeof e||0===e.length)throw new Error("Invalid parameter name was provided: "+JSON.stringify(e));switch(!0){case void 0===t:t="undefined";break;case S(t):case A(t):try{t=JSON.stringify(t)}catch(e){t=t.toString()}break;case isNaN(t)&&"string"!=typeof t:t="NaN";break;case E(t):t="function() {}";break;case y(t):t="null";break;default:t+=""}return this.parameters["{{ ".concat(e," }}")]=t.toString(),this}},{key:"build",value:function(e){var t=this;if("string"!=typeof e)throw new Error("Invalid error message was provided.");return Object.keys(this.parameters).forEach((function(n){e=e.replace(n,t.parameters[n])})),this.parameters={},Error(e)}}]),e}();var P=function(){function e(t){a(this,e),this.fallback=t||"en-US"}return r(e,[{key:"getUserLocales",value:function(){return e=this.fallback,t=[],"undefined"!=typeof window&&(window.navigator.languages&&(t=t.concat(window.navigator.languages)),window.navigator.language&&t.push(window.navigator.language),window.navigator.userLanguage&&t.push(window.navigator.userLanguage),window.navigator.browserLanguage&&t.push(window.navigator.browserLanguage),window.navigator.systemLanguage&&t.push(window.navigator.systemLanguage)),t.push(e),t.filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){if(!e||-1===e.indexOf("-")||e.toLowerCase()!==e)return e;var t=e.split("-");return"".concat(t[0],"-").concat(t[1].toUpperCase())}));var e,t}},{key:"getUserLocale",value:function(){return this.getUserLocales()[0]}}],[{key:"canonicalize",value:function(e){if("string"!=typeof e||0===e.length||"."===e.charAt(0))return"en-US";var t=e.match(/^([a-z]{2})[-_]([a-z]{2})(?:([a-z]{2})(?:[-_]([a-z]{2}))?)?(?:\..*)?$/i);if(null===t)return e;var n,a=[t[1].toLowerCase()];return void 0===t[3]?a.push(t[2].toUpperCase()):a.push((n=t[2].toLowerCase()+t[3].toLowerCase(),(n+="").charAt(0).toUpperCase()+n.substr(1))),void 0!==t[4]&&a.push(t[4].toUpperCase()),a.join("_")}},{key:"DEFAULT_LOCALE",get:function(){return"en-US"}}]),e}(),N=new P,O=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.options=u(u({},this.getDefaultOptions()),n),this.getRequiredOptions().forEach((function(e){if(void 0===t.options[e])throw new Error('No "'.concat(e,'" option is configured.'))})),this.locale_string=this.options.locale_string||N.getUserLocale(),this.locale_options=this.options.locale_options||{},this.violationBuilder=new R}return r(e,[{key:"getDefaultOptions",value:function(){return{}}},{key:"getRequiredOptions",value:function(){return[]}},{key:"getViolationBuilder",value:function(){return this.violationBuilder}},{key:"validate",value:function(e,t){throw new Error("The validate() method was not implemented")}},{key:"isEmptyValue",value:function(e){return"string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==n(e)&&"function"!=typeof e&&isNaN(e)||null==e}},{key:"formatDateValue",value:function(e){return new Intl.DateTimeFormat(this.locale_string,this.locale_options).format(e)}}]),e}(),B=function(e){l(i,O);var t=f(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,i),(e=t.call(this,n)).options.strict=!!e.options.strict,e}return r(i,[{key:"getDefaultOptions",value:function(){return{strict:!1,message_strict:"This values has different types. Given type is {{ value_type }}; Expected type is {{ compared_type }}."}}},{key:"getRequiredOptions",value:function(){return["value","strict"]}},{key:"compare",value:function(e,t){throw new Error("The compare() method was not implemented")}},{key:"validate",value:function(e){var t=this.options.value;return this.options.strict&&n(t)!==n(e)?this.getViolationBuilder().setParameter("value_type",g(e)?"Date object":n(e)).setParameter("compared_type",g(t)?"Date object":n(t)).build(this.options.message_strict):(g(t)&&(e="now"===e?new Date:new Date(e)),this.compare(e,t)?void 0:(e=g(e)?this.formatDateValue(e):e,t=g(t)?this.formatDateValue(t):t,this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",t).setParameter("compared_value_type",n(t)).build(this.options.message)))}}]),i}(),I=function(e){l(n,O);var t=f(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),(e=t.call(this,i)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message_min:"This value is too short. It should have {{ limit }} character(s) or more.",message_max:"This value is too long. It should have {{ limit }} character(s) or less.",message_exact:"This value should have exactly {{ limit }} character(s)."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),"string"==typeof e){var t=e.length;return null!==this.options.min&&this.options.min===this.options.max&&t!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&t>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&t0&&void 0!==arguments[0]?arguments[0]:{};a(this,n),e=t.call(this,i);var r=["simple_regexp","html5_regexp","html5_input"];if(!r.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:"html5_regexp",message:"This value is not valid email."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case"simple_regexp":if(!function(e){return/^.+@\S+\.\S+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5_regexp":if(!function(e){return/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5_input":if(!function(e){var t=document.createElement("input");return t.setAttribute("type","email"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_SIMPLE",get:function(){return"simple_regexp"}},{key:"MODE_HTML5",get:function(){return"html5_regexp"}},{key:"MODE_HTML5_INPUT",get:function(){return"html5_input"}}]),n}(),D=function(e){l(i,O);var t=f(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,i),t.call(this,e)}return r(i,[{key:"getDefaultOptions",value:function(){return{message:"This value should be blank."}}},{key:"validate",value:function(e){if("string"==typeof e&&e.length>0||"string"!=typeof e&&"object"!==n(e)&&!isNaN(e)&&null!=e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),i}(),G=[{a2:"AF",a3:"AFG",n:"004"},{a2:"AX",a3:"ALA",n:"248"},{a2:"AL",a3:"ALB",n:"008"},{a2:"DZ",a3:"DZA",n:"012"},{a2:"AS",a3:"ASM",n:"016"},{a2:"AD",a3:"AND",n:"020"},{a2:"AO",a3:"AGO",n:"024"},{a2:"AI",a3:"AIA",n:"660"},{a2:"AQ",a3:"ATA",n:"010"},{a2:"AG",a3:"ATG",n:"028"},{a2:"AR",a3:"ARG",n:"032"},{a2:"AM",a3:"ARM",n:"051"},{a2:"AW",a3:"ABW",n:"533"},{a2:"AU",a3:"AUS",n:"036"},{a2:"AT",a3:"AUT",n:"040"},{a2:"AZ",a3:"AZE",n:"031"},{a2:"BS",a3:"BHS",n:"044"},{a2:"BH",a3:"BHR",n:"048"},{a2:"BD",a3:"BGD",n:"050"},{a2:"BB",a3:"BRB",n:"052"},{a2:"BY",a3:"BLR",n:"112"},{a2:"BE",a3:"BEL",n:"056"},{a2:"BZ",a3:"BLZ",n:"084"},{a2:"BJ",a3:"BEN",n:"204"},{a2:"BM",a3:"BMU",n:"060"},{a2:"BT",a3:"BTN",n:"064"},{a2:"BO",a3:"BOL",n:"068"},{a2:"BQ",a3:"BES",n:"535"},{a2:"BA",a3:"BIH",n:"070"},{a2:"BW",a3:"BWA",n:"072"},{a2:"BV",a3:"BVT",n:"074"},{a2:"BR",a3:"BRA",n:"076"},{a2:"IO",a3:"IOT",n:"086"},{a2:"BN",a3:"BRN",n:"096"},{a2:"BG",a3:"BGR",n:"100"},{a2:"BF",a3:"BFA",n:"854"},{a2:"BI",a3:"BDI",n:"108"},{a2:"CV",a3:"CPV",n:"132"},{a2:"KH",a3:"KHM",n:"116"},{a2:"CM",a3:"CMR",n:"120"},{a2:"CA",a3:"CAN",n:"124"},{a2:"KY",a3:"CYM",n:"136"},{a2:"CF",a3:"CAF",n:"140"},{a2:"TD",a3:"TCD",n:"148"},{a2:"CL",a3:"CHL",n:"152"},{a2:"CN",a3:"CHN",n:"156"},{a2:"CX",a3:"CXR",n:"162"},{a2:"CC",a3:"CCK",n:"166"},{a2:"CO",a3:"COL",n:"170"},{a2:"KM",a3:"COM",n:"174"},{a2:"CG",a3:"COG",n:"178"},{a2:"CD",a3:"COD",n:"180"},{a2:"CK",a3:"COK",n:"184"},{a2:"CR",a3:"CRI",n:"188"},{a2:"CI",a3:"CIV",n:"384"},{a2:"HR",a3:"HRV",n:"191"},{a2:"CU",a3:"CUB",n:"192"},{a2:"CW",a3:"CUW",n:"531"},{a2:"CY",a3:"CYP",n:"196"},{a2:"CZ",a3:"CZE",n:"203"},{a2:"DK",a3:"DNK",n:"208"},{a2:"DJ",a3:"DJI",n:"262"},{a2:"DM",a3:"DMA",n:"212"},{a2:"DO",a3:"DOM",n:"214"},{a2:"EC",a3:"ECU",n:"218"},{a2:"EG",a3:"EGY",n:"818"},{a2:"SV",a3:"SLV",n:"222"},{a2:"GQ",a3:"GNQ",n:"226"},{a2:"ER",a3:"ERI",n:"232"},{a2:"EE",a3:"EST",n:"233"},{a2:"SZ",a3:"SWZ",n:"748"},{a2:"ET",a3:"ETH",n:"231"},{a2:"FK",a3:"FLK",n:"238"},{a2:"FO",a3:"FRO",n:"234"},{a2:"FJ",a3:"FJI",n:"242"},{a2:"FI",a3:"FIN",n:"246"},{a2:"FR",a3:"FRA",n:"250"},{a2:"GF",a3:"GUF",n:"254"},{a2:"PF",a3:"PYF",n:"258"},{a2:"TF",a3:"ATF",n:"260"},{a2:"GA",a3:"GAB",n:"266"},{a2:"GM",a3:"GMB",n:"270"},{a2:"GE",a3:"GEO",n:"268"},{a2:"DE",a3:"DEU",n:"276"},{a2:"GH",a3:"GHA",n:"288"},{a2:"GI",a3:"GIB",n:"292"},{a2:"GR",a3:"GRC",n:"300"},{a2:"GL",a3:"GRL",n:"304"},{a2:"GD",a3:"GRD",n:"308"},{a2:"GP",a3:"GLP",n:"312"},{a2:"GU",a3:"GUM",n:"316"},{a2:"GT",a3:"GTM",n:"320"},{a2:"GG",a3:"GGY",n:"831"},{a2:"GN",a3:"GIN",n:"324"},{a2:"GW",a3:"GNB",n:"624"},{a2:"GY",a3:"GUY",n:"328"},{a2:"HT",a3:"HTI",n:"332"},{a2:"HM",a3:"HMD",n:"334"},{a2:"VA",a3:"VAT",n:"336"},{a2:"HN",a3:"HND",n:"340"},{a2:"HK",a3:"HKG",n:"344"},{a2:"HU",a3:"HUN",n:"348"},{a2:"IS",a3:"ISL",n:"352"},{a2:"IN",a3:"IND",n:"356"},{a2:"ID",a3:"IDN",n:"360"},{a2:"IR",a3:"IRN",n:"364"},{a2:"IQ",a3:"IRQ",n:"368"},{a2:"IE",a3:"IRL",n:"372"},{a2:"IM",a3:"IMN",n:"833"},{a2:"IL",a3:"ISR",n:"376"},{a2:"IT",a3:"ITA",n:"380"},{a2:"JM",a3:"JAM",n:"388"},{a2:"JP",a3:"JPN",n:"392"},{a2:"JE",a3:"JEY",n:"832"},{a2:"JO",a3:"JOR",n:"400"},{a2:"KZ",a3:"KAZ",n:"398"},{a2:"KE",a3:"KEN",n:"404"},{a2:"KI",a3:"KIR",n:"296"},{a2:"KP",a3:"PRK",n:"408"},{a2:"KR",a3:"KOR",n:"410"},{a2:"KW",a3:"KWT",n:"414"},{a2:"KG",a3:"KGZ",n:"417"},{a2:"LA",a3:"LAO",n:"418"},{a2:"LV",a3:"LVA",n:"428"},{a2:"LB",a3:"LBN",n:"422"},{a2:"LS",a3:"LSO",n:"426"},{a2:"LR",a3:"LBR",n:"430"},{a2:"LY",a3:"LBY",n:"434"},{a2:"LI",a3:"LIE",n:"438"},{a2:"LT",a3:"LTU",n:"440"},{a2:"LU",a3:"LUX",n:"442"},{a2:"MO",a3:"MAC",n:"446"},{a2:"MG",a3:"MDG",n:"450"},{a2:"MW",a3:"MWI",n:"454"},{a2:"MY",a3:"MYS",n:"458"},{a2:"MV",a3:"MDV",n:"462"},{a2:"ML",a3:"MLI",n:"466"},{a2:"MT",a3:"MLT",n:"470"},{a2:"MH",a3:"MHL",n:"584"},{a2:"MQ",a3:"MTQ",n:"474"},{a2:"MR",a3:"MRT",n:"478"},{a2:"MU",a3:"MUS",n:"480"},{a2:"YT",a3:"MYT",n:"175"},{a2:"MX",a3:"MEX",n:"484"},{a2:"FM",a3:"FSM",n:"583"},{a2:"MD",a3:"MDA",n:"498"},{a2:"MC",a3:"MCO",n:"492"},{a2:"MN",a3:"MNG",n:"496"},{a2:"ME",a3:"MNE",n:"499"},{a2:"MS",a3:"MSR",n:"500"},{a2:"MA",a3:"MAR",n:"504"},{a2:"MZ",a3:"MOZ",n:"508"},{a2:"MM",a3:"MMR",n:"104"},{a2:"NA",a3:"NAM",n:"516"},{a2:"NR",a3:"NRU",n:"520"},{a2:"NP",a3:"NPL",n:"524"},{a2:"NL",a3:"NLD",n:"528"},{a2:"NC",a3:"NCL",n:"540"},{a2:"NZ",a3:"NZL",n:"554"},{a2:"NI",a3:"NIC",n:"558"},{a2:"NE",a3:"NER",n:"562"},{a2:"NG",a3:"NGA",n:"566"},{a2:"NU",a3:"NIU",n:"570"},{a2:"NF",a3:"NFK",n:"574"},{a2:"MK",a3:"MKD",n:"807"},{a2:"MP",a3:"MNP",n:"580"},{a2:"NO",a3:"NOR",n:"578"},{a2:"OM",a3:"OMN",n:"512"},{a2:"PK",a3:"PAK",n:"586"},{a2:"PW",a3:"PLW",n:"585"},{a2:"PS",a3:"PSE",n:"275"},{a2:"PA",a3:"PAN",n:"591"},{a2:"PG",a3:"PNG",n:"598"},{a2:"PY",a3:"PRY",n:"600"},{a2:"PE",a3:"PER",n:"604"},{a2:"PH",a3:"PHL",n:"608"},{a2:"PN",a3:"PCN",n:"612"},{a2:"PL",a3:"POL",n:"616"},{a2:"PT",a3:"PRT",n:"620"},{a2:"PR",a3:"PRI",n:"630"},{a2:"QA",a3:"QAT",n:"634"},{a2:"RE",a3:"REU",n:"638"},{a2:"RO",a3:"ROU",n:"642"},{a2:"RU",a3:"RUS",n:"643"},{a2:"RW",a3:"RWA",n:"646"},{a2:"BL",a3:"BLM",n:"652"},{a2:"SH",a3:"SHN",n:"654"},{a2:"KN",a3:"KNA",n:"659"},{a2:"LC",a3:"LCA",n:"662"},{a2:"MF",a3:"MAF",n:"663"},{a2:"PM",a3:"SPM",n:"666"},{a2:"VC",a3:"VCT",n:"670"},{a2:"WS",a3:"WSM",n:"882"},{a2:"SM",a3:"SMR",n:"674"},{a2:"ST",a3:"STP",n:"678"},{a2:"SA",a3:"SAU",n:"682"},{a2:"SN",a3:"SEN",n:"686"},{a2:"RS",a3:"SRB",n:"688"},{a2:"SC",a3:"SYC",n:"690"},{a2:"SL",a3:"SLE",n:"694"},{a2:"SG",a3:"SGP",n:"702"},{a2:"SX",a3:"SXM",n:"534"},{a2:"SK",a3:"SVK",n:"703"},{a2:"SI",a3:"SVN",n:"705"},{a2:"SB",a3:"SLB",n:"090"},{a2:"SO",a3:"SOM",n:"706"},{a2:"ZA",a3:"ZAF",n:"710"},{a2:"GS",a3:"SGS",n:"239"},{a2:"SS",a3:"SSD",n:"728"},{a2:"ES",a3:"ESP",n:"724"},{a2:"LK",a3:"LKA",n:"144"},{a2:"SD",a3:"SDN",n:"729"},{a2:"SR",a3:"SUR",n:"740"},{a2:"SJ",a3:"SJM",n:"744"},{a2:"SE",a3:"SWE",n:"752"},{a2:"CH",a3:"CHE",n:"756"},{a2:"SY",a3:"SYR",n:"760"},{a2:"TW",a3:"TWN",n:"158"},{a2:"TJ",a3:"TJK",n:"762"},{a2:"TZ",a3:"TZA",n:"834"},{a2:"TH",a3:"THA",n:"764"},{a2:"TL",a3:"TLS",n:"626"},{a2:"TG",a3:"TGO",n:"768"},{a2:"TK",a3:"TKL",n:"772"},{a2:"TO",a3:"TON",n:"776"},{a2:"TT",a3:"TTO",n:"780"},{a2:"TN",a3:"TUN",n:"788"},{a2:"TR",a3:"TUR",n:"792"},{a2:"TM",a3:"TKM",n:"795"},{a2:"TC",a3:"TCA",n:"796"},{a2:"TV",a3:"TUV",n:"798"},{a2:"UG",a3:"UGA",n:"800"},{a2:"UA",a3:"UKR",n:"804"},{a2:"AE",a3:"ARE",n:"784"},{a2:"GB",a3:"GBR",n:"826"},{a2:"US",a3:"USA",n:"840"},{a2:"UM",a3:"UMI",n:"581"},{a2:"UY",a3:"URY",n:"858"},{a2:"UZ",a3:"UZB",n:"860"},{a2:"VU",a3:"VUT",n:"548"},{a2:"VE",a3:"VEN",n:"862"},{a2:"VN",a3:"VNM",n:"704"},{a2:"VG",a3:"VGB",n:"092"},{a2:"VI",a3:"VIR",n:"850"},{a2:"WF",a3:"WLF",n:"876"},{a2:"EH",a3:"ESH",n:"732"},{a2:"YE",a3:"YEM",n:"887"},{a2:"ZM",a3:"ZMB",n:"894"},{a2:"ZW",a3:"ZWE",n:"716"},{a2:"XK",a3:"XKX",n:"383"}];var w=function(e){l(n,O);var t=f(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,n),e=t.call(this,i);var r=["alpha2","alpha3","numeric"];if(!r.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid country.",mode:"alpha2"}}},{key:"validate",value:function(e){if(v(e)&&(e=String(e).padStart(3,"0")),this.options.trim&&(e=M(e)),!this.isEmptyValue(e))return"string"==typeof e&&(function(e,t){return"alpha2"===t&&void 0!==G.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return"alpha3"===t&&void 0!==G.find((function(t){return t.a3.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return"numeric"===t&&void 0!==G.find((function(t){return t.n.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode))?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}],[{key:"MODE_ALPHA2",get:function(){return"alpha2"}},{key:"MODE_ALPHA3",get:function(){return"alpha3"}},{key:"MODE_NUMERIC",get:function(){return"numeric"}}]),n}(),U=["ADP","AED","AFA","AFN","ALK","ALL","AMD","ANG","AOA","AOK","AON","AOR","ARA","ARL","ARM","ARP","ARS","ATS","AUD","AWG","AZM","AZN","BAD","BAM","BAN","BBD","BDT","BEC","BEF","BEL","BGL","BGM","BGN","BGO","BHD","BIF","BMD","BND","BOB","BOL","BOP","BOV","BRB","BRC","BRE","BRL","BRN","BRR","BRZ","BSD","BTN","BUK","BWP","BYB","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLE","CLF","CLP","CNH","CNX","CNY","COP","COU","CRC","CSD","CSK","CUC","CUP","CVE","CYP","CZK","DDM","DEM","DJF","DKK","DOP","DZD","ECS","ECV","EEK","EGP","ERN","ESA","ESB","ESP","ETB","EUR","FIM","FJD","FKP","FRF","GBP","GEK","GEL","GHC","GHS","GIP","GMD","GNF","GNS","GQE","GRD","GTQ","GWE","GWP","GYD","HKD","HNL","HRD","HRK","HTG","HUF","IDR","IEP","ILP","ILR","ILS","INR","IQD","IRR","ISJ","ISK","ITL","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRH","KRO","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LTT","LUC","LUF","LUL","LVL","LVR","LYD","MAD","MAF","MCF","MDC","MDL","MGA","MGF","MKD","MKN","MLF","MMK","MNT","MOP","MRO","MRU","MTL","MTP","MUR","MVP","MVR","MWK","MXN","MXP","MXV","MYR","MZE","MZM","MZN","NAD","NGN","NIC","NIO","NLG","NOK","NPR","NZD","OMR","PAB","PEI","PEN","PES","PGK","PHP","PKR","PLN","PLZ","PTE","PYG","QAR","RHD","ROL","RON","RSD","RUB","RUR","RWF","SAR","SBD","SCR","SDD","SDG","SDP","SEK","SGD","SHP","SIT","SKK","SLL","SOS","SRD","SRG","SSP","STD","STN","SUR","SVC","SYP","SZL","THB","TJR","TJS","TMM","TMT","TND","TOP","TPE","TRL","TRY","TTD","TWD","TZS","UAH","UAK","UGS","UGX","USD","USN","USS","UYI","UYP","UYU","UYW","UZS","VEB","VEF","VES","VND","VNN","VUV","WST","XAF","XCD","XEU","XFO","XFU","XOF","XPF","XRE","YDD","YER","YUD","YUM","YUN","YUR","ZAL","ZAR","ZMK","ZMW","ZRN","ZRZ","ZWD","ZWL","ZWR"],V=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid currency."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),!this.isEmptyValue(e))return"string"==typeof e&&U.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),Z=function(e){l(i,O);var t=f(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,i),t.call(this,e)}return r(i,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be blank.",allow_null:!1}}},{key:"validate",value:function(e){if("string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==n(e)&&isNaN(e)||void 0===e||!this.options.allow_null&&null===e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),i}();var $=function(e){l(n,O);var t=f(n);function n(e){var i;if(a(this,n),i=t.call(this,e),!["regexp","url_api","html5"].includes(i.options.mode))throw new Error("Invalid validation mode provided: ".concat(i.options.mode));return i}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:"url_api",message:"This value is not a valid URL."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case"regexp":if(!function(e){return!(null===e.match(/^(https?:\/\/|ftps?:\/\/)?([a-z0-9%\-]+\.){1,}([a-z0-9\-]+)?(:(\d{1,5}))?(\/([a-z0-9\-._~:\/\?#\[\]@!$&'\(\)\*\+,;=%]+)?)?$/i))}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"url_api":if(!function(e){try{new URL(e)}catch(e){return!1}return!0}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5":if(!function(e){var t=document.createElement("input");return t.setAttribute("type","url"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_REGEXP",get:function(){return"regexp"}},{key:"MODE_URL_API",get:function(){return"url_api"}},{key:"MODE_HTML5",get:function(){return"html5"}}]),n}(),F=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be false."}}},{key:"validate",value:function(e){if(!1!==e&&0!==e&&"0"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),Y=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be true."}}},{key:"validate",value:function(e){if(!0!==e&&1!==e&&"1"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),K=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be valid JSON."}}},{key:"validate",value:function(e){try{JSON.parse(e)}catch(t){return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(),H=function(e){l(n,B);var t=f(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return g(e)&&g(t)?e.getTime()===t.getTime():e==t}}]),n}(),x=function(e){l(n,B);var t=f(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should not be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return g(e)&&g(t)?e.getTime()!==t.getTime():e!=t}}]),n}(),W=function(e){l(n,B);var t=f(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return g(e)&&g(t)?e.getTime()>t.getTime():e>t}}]),n}(),j=function(e){l(n,B);var t=f(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than or equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return g(e)&&g(t)?e.getTime()>=t.getTime():e>=t}}]),n}(),J=function(e){l(n,B);var t=f(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be less than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return g(e)&&g(t)?e.getTime()0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),e.strict=!0,e.value=0,t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative."})}}]),n}(),q=function(e){l(n,z);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),e.strict=!0,e.value=0,t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative or zero."})}}]),n}(),Q=function(e){l(n,W);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),e.strict=!0,e.value=0,t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive."})}}]),n}(),ee=function(e){l(n,j);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),e.strict=!0,e.value=0,t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive or zero."})}}]),n}(),te=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be null."}}},{key:"validate",value:function(e){if(!y(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),ne=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be null."}}},{key:"validate",value:function(e){if(y(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),ae="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ie=function(e){return!("undefined"!=typeof process||!process.env||!process.env[e])&&process.env[e]},re="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},oe=function(e,t){var n=ie,a="",i=[],r=0,o=function e(t){if(t instanceof RegExp)return new RegExp(t);if(t instanceof Date)return new Date(t);var n={};for(var a in t)"object"===re(t[a])?n[a]=e(t[a]):n[a]=t[a];return n},s="undefined"!=typeof window?window:ae;s.$locutus=s.$locutus||{};var u=s.$locutus;if(u.php=u.php||{},u.php.locales&&u.php.locales.fr_CA&&u.php.locales.fr_CA.LC_TIME&&u.php.locales.fr_CA.LC_TIME.x||(u.php.locales={},u.php.locales.en={LC_COLLATE:function(e,t){return e===t?0:e>t?1:-1},LC_CTYPE:{an:/^[A-Za-z\d]+$/g,al:/^[A-Za-z]+$/g,ct:/^[\u0000-\u001F\u007F]+$/g,dg:/^[\d]+$/g,gr:/^[\u0021-\u007E]+$/g,lw:/^[a-z]+$/g,pr:/^[\u0020-\u007E]+$/g,pu:/^[\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]+$/g,sp:/^[\f\n\r\t\v ]+$/g,up:/^[A-Z]+$/g,xd:/^[A-Fa-f\d]+$/g,CODESET:"UTF-8",lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"},LC_TIME:{a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %r %Z",p:["AM","PM"],P:["am","pm"],r:"%I:%M:%S %p",x:"%m/%d/%Y",X:"%r",alt_digits:"",ERA:"",ERA_YEAR:"",ERA_D_T_FMT:"",ERA_D_FMT:"",ERA_T_FMT:""},LC_MONETARY:{int_curr_symbol:"USD",currency_symbol:"$",mon_decimal_point:".",mon_thousands_sep:",",mon_grouping:[3],positive_sign:"",negative_sign:"-",int_frac_digits:2,frac_digits:2,p_cs_precedes:1,p_sep_by_space:0,n_cs_precedes:1,n_sep_by_space:0,p_sign_posn:3,n_sign_posn:0},LC_NUMERIC:{decimal_point:".",thousands_sep:",",grouping:[3]},LC_MESSAGES:{YESEXPR:"^[yY].*",NOEXPR:"^[nN].*",YESSTR:"",NOSTR:""},nplurals:function(e){return 1!==e?1:0}},u.php.locales.en_US=o(u.php.locales.en),u.php.locales.en_US.LC_TIME.c="%a %d %b %Y %r %Z",u.php.locales.en_US.LC_TIME.x="%D",u.php.locales.en_US.LC_TIME.X="%r",u.php.locales.en_US.LC_MONETARY.int_curr_symbol="USD ",u.php.locales.en_US.LC_MONETARY.p_sign_posn=1,u.php.locales.en_US.LC_MONETARY.n_sign_posn=1,u.php.locales.en_US.LC_MONETARY.mon_grouping=[3,3],u.php.locales.en_US.LC_NUMERIC.thousands_sep="",u.php.locales.en_US.LC_NUMERIC.grouping=[],u.php.locales.en_GB=o(u.php.locales.en),u.php.locales.en_GB.LC_TIME.r="%l:%M:%S %P %Z",u.php.locales.en_AU=o(u.php.locales.en_GB),u.php.locales.C=o(u.php.locales.en),u.php.locales.C.LC_CTYPE.CODESET="ANSI_X3.4-1968",u.php.locales.C.LC_MONETARY={int_curr_symbol:"",currency_symbol:"",mon_decimal_point:"",mon_thousands_sep:"",mon_grouping:[],p_cs_precedes:127,p_sep_by_space:127,n_cs_precedes:127,n_sep_by_space:127,p_sign_posn:127,n_sign_posn:127,positive_sign:"",negative_sign:"",int_frac_digits:127,frac_digits:127},u.php.locales.C.LC_NUMERIC={decimal_point:".",thousands_sep:"",grouping:[]},u.php.locales.C.LC_TIME.c="%a %b %e %H:%M:%S %Y",u.php.locales.C.LC_TIME.x="%m/%d/%y",u.php.locales.C.LC_TIME.X="%H:%M:%S",u.php.locales.C.LC_MESSAGES.YESEXPR="^[yY]",u.php.locales.C.LC_MESSAGES.NOEXPR="^[nN]",u.php.locales.fr=o(u.php.locales.en),u.php.locales.fr.nplurals=function(e){return e>1?1:0},u.php.locales.fr.LC_TIME.a=["dim","lun","mar","mer","jeu","ven","sam"],u.php.locales.fr.LC_TIME.A=["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],u.php.locales.fr.LC_TIME.b=["jan","fév","mar","avr","mai","jun","jui","aoû","sep","oct","nov","déc"],u.php.locales.fr.LC_TIME.B=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],u.php.locales.fr.LC_TIME.c="%a %d %b %Y %T %Z",u.php.locales.fr.LC_TIME.p=["",""],u.php.locales.fr.LC_TIME.P=["",""],u.php.locales.fr.LC_TIME.x="%d.%m.%Y",u.php.locales.fr.LC_TIME.X="%T",u.php.locales.fr_CA=o(u.php.locales.fr),u.php.locales.fr_CA.LC_TIME.x="%Y-%m-%d"),!u.php.locale&&(u.php.locale="en_US","undefined"!=typeof window&&window.document)){var l=window.document,c="https://www.w3.org/1999/xhtml",p="https://www.w3.org/XML/1998/namespace";l.getElementsByTagNameNS&&l.getElementsByTagNameNS(c,"html")[0]?l.getElementsByTagNameNS(c,"html")[0].getAttributeNS&&l.getElementsByTagNameNS(c,"html")[0].getAttributeNS(p,"lang")?u.php.locale=l.getElementsByTagName(c,"html")[0].getAttributeNS(p,"lang"):l.getElementsByTagNameNS(c,"html")[0].lang&&(u.php.locale=l.getElementsByTagNameNS(c,"html")[0].lang):l.getElementsByTagName("html")[0]&&l.getElementsByTagName("html")[0].lang&&(u.php.locale=l.getElementsByTagName("html")[0].lang)}if(u.php.locale=u.php.locale.replace("-","_"),u.php.locale in u.php.locales||u.php.locale.replace(/_[a-zA-Z]+$/,"")in u.php.locales&&(u.php.locale=u.php.locale.replace(/_[a-zA-Z]+$/,"")),u.php.localeCategories||(u.php.localeCategories={LC_COLLATE:u.php.locale,LC_CTYPE:u.php.locale,LC_MONETARY:u.php.locale,LC_NUMERIC:u.php.locale,LC_TIME:u.php.locale,LC_MESSAGES:u.php.locale}),null===t||""===t)t=n(e)||n("LANG");else if("[object Array]"===Object.prototype.toString.call(t))for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{};a(this,n),e=t.call(this,i);var r=["array","date","bool","boolean","function","float","integer","null","numeric","object","string","double","int","ctype_alnum","ctype_alpha","ctype_cntrl","ctype_digit","ctype_graph","ctype_lower","ctype_print","ctype_punct","ctype_space","ctype_upper","ctype_xdigit"];if(!r.includes(e.options.type))throw new Error("Invalid type provided: ".concat(e.options.type));return e}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be of type {{ type }}."}}},{key:"getRequiredOptions",value:function(){return["type"]}},{key:"validate",value:function(e){var t,n=!1;switch(this.options.type){case"array":n=A(e);break;case"date":n=g(e);break;case"bool":case"boolean":n=!0===(t=e)||!1===t;break;case"function":n=E(e);break;case"float":case"double":n=T(e);break;case"int":case"integer":n=C(e);break;case"null":n=y(e);break;case"numeric":n=v(e);break;case"object":n=S(e);break;case"string":n=L(e);break;case"ctype_alnum":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.an)}(e);break;case"ctype_alpha":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.al)}(e);break;case"ctype_cntrl":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.ct)}(e);break;case"ctype_digit":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.dg)}(e);break;case"ctype_graph":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.gr)}(e);break;case"ctype_lower":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.lw)}(e);break;case"ctype_print":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pr)}(e);break;case"ctype_punct":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pu)}(e);break;case"ctype_space":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.sp)}(e);break;case"ctype_upper":n=se(e);break;case"ctype_xdigit":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.xd)}(e)}if(!n)return this.getViolationBuilder().setParameter("value",e).setParameter("type",this.options.type).build(this.options.message)}}],[{key:"TYPE_ARRAY",get:function(){return"array"}},{key:"TYPE_DATE",get:function(){return"date"}},{key:"TYPE_BOOL",get:function(){return"bool"}},{key:"TYPE_BOOLEAN",get:function(){return"boolean"}},{key:"TYPE_FUNCTION",get:function(){return"function"}},{key:"TYPE_FLOAT",get:function(){return"float"}},{key:"TYPE_DOUBLE",get:function(){return"double"}},{key:"TYPE_INT",get:function(){return"int"}},{key:"TYPE_INTEGER",get:function(){return"integer"}},{key:"TYPE_NULL",get:function(){return"null"}},{key:"TYPE_NUMERIC",get:function(){return"numeric"}},{key:"TYPE_OBJECT",get:function(){return"object"}},{key:"TYPE_STRING",get:function(){return"string"}},{key:"CTYPE_ALNUM",get:function(){return"ctype_alnum"}},{key:"CTYPE_ALPHA",get:function(){return"ctype_alpha"}},{key:"CTYPE_CNTRL",get:function(){return"ctype_cntrl"}},{key:"CTYPE_DIGIT",get:function(){return"ctype_digit"}},{key:"CTYPE_GRAPH",get:function(){return"ctype_graph"}},{key:"CTYPE_LOWER",get:function(){return"ctype_lower"}},{key:"CTYPE_PRINT",get:function(){return"ctype_print"}},{key:"CTYPE_PUNCT",get:function(){return"ctype_punct"}},{key:"CTYPE_SPACE",get:function(){return"ctype_space"}},{key:"CTYPE_UPPER",get:function(){return"ctype_upper"}},{key:"CTYPE_XDIGIT",get:function(){return"ctype_xdigit"}}]),n}(),le=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,i),!(e=t.call(this,r)).options.choices||!A(e.options.choices))throw new Error('Choices list should be type of "array", "'.concat(n(e.options.choices),'" given.'));return(e.options.min||e.options.max)&&(e.options.multiple=!0),e}return r(i,[{key:"getDefaultOptions",value:function(){return{multiple:!1,min:0,max:0,message:"The value you selected is not a valid choice.",message_min:"You must select at least {{ limit }} choices.",message_max:"You must select at most {{ limit }} choices.",message_multiple:"One or more of the given values is invalid."}}},{key:"getRequiredOptions",value:function(){return["choices"]}},{key:"validate",value:function(e){if(this.options.multiple&&!Array.isArray(e))return this.getViolationBuilder().build('Values list should be type of "array", "'.concat(n(e),'" given.'));if(!this.isEmptyValue(e))if(this.options.multiple){for(var t=0;t0&&e.length0&&e.length>this.options.max)return this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message_max)}else if(!this.options.choices.includes(e))return this.getViolationBuilder().setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message)}}]),i}(),ce='Provided value should be countable, "{{ type }}" given.',pe=function(e){l(i,O);var t=f(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,i),(e=t.call(this,n)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return r(i,[{key:"getDefaultOptions",value:function(){return{message_min:"This collection should contain {{ limit }} elements or more.",message_max:"This collection should contain {{ limit }} elements or less.",message_exact:"This collection should contain exactly {{ limit }} elements."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(null==(t=e)||L(t)||!(A(t)||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Map||t instanceof Set||t instanceof WeakMap||t instanceof WeakSet||t instanceof ArrayBuffer))return this.getViolationBuilder().setParameter("type",n(e)).build(ce);var t,a;switch(!0){case e.hasOwnProperty("size")||e instanceof Map||e instanceof Set:a=e.size;break;case e instanceof ArrayBuffer:a=e.byteLength;break;default:a=e.length}return void 0===a?this.getViolationBuilder().setParameter("type",n(e)).build(ce):null!==this.options.min&&this.options.min===this.options.max&&a!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&a>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&a0&&void 0!==arguments[0]?arguments[0]:{};return a(this,i),n.call(this,e)}return r(i,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid timezone."}}},{key:"validate",value:function(t){if(this.options.trim&&(t=M(t)),!this.isEmptyValue(t))return"string"==typeof t&&e.local().setZone(t).isValid?void 0:this.getViolationBuilder().setParameter("value",t).build(this.options.message)}}]),i}(),he=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,i),!(e=t.call(this,r)).options.value||!v(e.options.value))throw new Error('Value should be type of "number", "'.concat(n(e.options.value),'" given.'));return e}return r(i,[{key:"getDefaultOptions",value:function(){return{message:"This value should be a multiple of {{ compared_value }}.",message_type:'This values has different types. Given type is "{{ current_type }}"; Expected type is "{{ expected_type }}".'}}},{key:"getRequiredOptions",value:function(){return["value"]}},{key:"validate",value:function(e){if(!this.isEmptyValue(e))return v(e)?e%this.options.value!=0?this.getViolationBuilder().setParameter("compared_value",this.options.value).setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",this.options.value).setParameter("current_type",n(e)).setParameter("expected_type","number").build(this.options.message_type)}}]),i}();function _e(e,n){var a=t.parse(e);return"ipv4"===a.kind()&&!(("4_no_priv"===n||"all_no_priv"===n)&&"private"===a.range()||("4_no_res"===n||"all_no_res"===n)&&"reserved"===a.range()||("4_pub"===n||"all_pub"===n)&&("private"===a.range()||"reserved"===a.range()))}function me(e,n){var a=t.parse(e);return"ipv6"===a.kind()&&!(("6_no_priv"===n||"all_no_priv"===n)&&"uniqueLocal"===a.range()||("6_no_res"===n||"all_no_res"===n)&&"reserved"===a.range()||("6_pub"===n||"all_pub"===n)&&("uniqueLocal"===a.range()||"reserved"===a.range()))}var ve=function(e){l(i,O);var n=f(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,i),e=n.call(this,t);var r=["all","4","6","4_no_priv","6_no_priv","all_no_priv","4_no_res","6_no_res","all_no_res","4_pub","6_pub","all_pub"];if(!r.includes(e.options.version))throw new Error("Invalid validation version provided: ".concat(e.options.version));return e}return r(i,[{key:"getDefaultOptions",value:function(){return{trim:!0,version:"4",message:"This is not a valid IP address."}}},{key:"getRequiredOptions",value:function(){return["version"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),!("string"==typeof e&&0===e.length||"string"!=typeof e&&isNaN(e)||null==e)){if(!t.isValid(e)||!t.IPv4.isValidFourPartDecimal(e)&&!t.IPv6.isValid(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);switch(this.options.version){case"4":case"4_no_priv":case"4_no_res":case"4_pub":if(!_e(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"6":case"6_no_priv":case"6_no_res":case"6_pub":if(!me(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"all_no_priv":case"all_no_res":case"all_pub":if(!_e(e,this.options.version)&&!me(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}}],[{key:"MODE_ALL",get:function(){return"all"}},{key:"MODE_V4",get:function(){return"4"}},{key:"MODE_V6",get:function(){return"6"}},{key:"MODE_V4_NO_PRIV",get:function(){return"4_no_priv"}},{key:"MODE_V6_NO_PRIV",get:function(){return"6_no_priv"}},{key:"MODE_ALL_NO_PRIV",get:function(){return"all_no_priv"}},{key:"MODE_V4_NO_RES",get:function(){return"4_no_res"}},{key:"MODE_V6_NO_RES",get:function(){return"6_no_res"}},{key:"MODE_ALL_NO_RES",get:function(){return"all_no_res"}},{key:"MODE_V4_PUB",get:function(){return"4_pub"}},{key:"MODE_V6_PUB",get:function(){return"6_pub"}},{key:"MODE_ALL_PUB",get:function(){return"all_pub"}}]),i}(),ge=["AB","AA","AF","AK","SQ","AM","AR","AN","HY","AS","AV","AE","AY","AZ","BM","BA","EU","BE","BN","BH","BI","BS","BR","BG","MY","CA","CH","CE","NY","ZH","ZH-HANS","ZH-HANT","CV","KW","CO","CR","HR","CS","DA","DV","NL","DZ","EN","EO","ET","EE","FO","FJ","FI","FR","FF","GL","GD","GV","KA","DE","EL","KL","GN","GU","HT","HA","HE","HZ","HI","HO","HU","IS","IO","IG","IN","IA","IE","IU","IK","GA","IT","JA","JV","KL","KN","KR","KS","KK","KM","KI","RW","RN","KY","KV","KG","KO","KU","KJ","LO","LA","LV","LI","LN","LT","LU","LG","LB","GV","MK","MG","MS","ML","MT","MI","MR","MH","MO","MN","NA","NV","NG","ND","NE","NO","NB","NN","II","OC","OJ","CU","OR","OM","OS","PI","PS","FA","PL","PT","PA","QU","RM","RO","RU","SE","SM","SG","SA","SR","SH","ST","TN","SN","II","SD","SI","SS","SK","SL","SO","NR","ES","SU","SW","SS","SV","TL","TY","TG","TA","TT","TE","TH","BO","TI","TO","TS","TR","TK","TW","UG","UK","UR","UZ","VE","VI","VO","WA","CY","WO","FY","XH","YI","YO","ZA","ZU"],ye=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid language."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),!this.isEmptyValue(e))return"string"==typeof e&&ge.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),Ae=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,i),!E((e=t.call(this,r)).options.callback))throw new Error('Value should be type of "function", "'.concat(n(e.options.callback),'" given.'));return e}return r(i,[{key:"getDefaultOptions",value:function(){return{message:"This value is not a valid."}}},{key:"getRequiredOptions",value:function(){return["callback"]}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.options.callback(e,t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),i}(),Ee=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,i),"string"!=typeof(e=t.call(this,r)).options.pattern&&!(e.options.pattern instanceof RegExp))throw new Error('Pattern should be type of "string", '.concat(n(e.options.pattern)," given."));return e}return r(i,[{key:"getDefaultOptions",value:function(){return{trim:!1,match:!0,message:"This value is not valid."}}},{key:"getRequiredOptions",value:function(){return["pattern"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),!this.isEmptyValue(e)){if("string"!=typeof e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);var t=new RegExp(this.options.pattern);return this.options.match&&!t.test(e)||!this.options.match&&t.test(e)?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),i}(),Te=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,i);var o=!(void 0===(e=t.call(this,r)).options.min||null===e.options.min),s=!(void 0===e.options.max||null===e.options.max);if(o&&!v(e.options.min)&&!g(e.options.min))throw new Error('Min limit should be type of "number" or "Date", "'.concat(n(e.options.min),'" given.'));if(s&&!v(e.options.max)&&!g(e.options.max))throw new Error('Max limit should be type of "number" or "Date", "'.concat(n(e.options.max),'" given.'));if(o&&s){if(v(e.options.min)&&!v(e.options.max))throw new Error('Max limit should be type of "number", "'.concat(n(e.options.max),'" given.'));if(g(e.options.min)&&!g(e.options.max))throw new Error('Max limit should be type of "Date", "'.concat(n(e.options.max),'" given.'))}return e.options.min=v(e.options.min)?parseFloat(e.options.min):e.options.min,e.options.max=v(e.options.max)?parseFloat(e.options.max):e.options.max,e}return r(i,[{key:"getDefaultOptions",value:function(){return{message_min:"This value should be {{ limit }} or more.",message_max:"This value should be {{ limit }} or less.",message:"This value should be between {{ min }} and {{ max }}."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){(g(this.options.min)||g(this.options.max))&&(e="now"===e?new Date:new Date(e));var t=!(void 0===this.options.min||null===this.options.min),n=!(void 0===this.options.max||null===this.options.max);return this.isEmptyValue(e)||t&&n&&(ethis.options.max)||!g(this.options.min)&&!g(this.options.max)&&g(e)?this.getViolationBuilder().setParameter("min",g(this.options.min)?this.formatDateValue(this.options.min):this.options.min).setParameter("max",g(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",g(e)?this.formatDateValue(e):e).build(this.options.message):t&&ethis.options.max?this.getViolationBuilder().setParameter("limit",g(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",g(e)?this.formatDateValue(e):e).build(this.options.message_max):void 0}}]),i}(),Ce=["af","af_NA","af_ZA","ak","ak_GH","am","am_ET","ar","ar_AE","ar_BH","ar_DJ","ar_DZ","ar_EG","ar_EH","ar_ER","ar_IL","ar_IQ","ar_JO","ar_KM","ar_KW","ar_LB","ar_LY","ar_MA","ar_MR","ar_OM","ar_PS","ar_QA","ar_SA","ar_SD","ar_SO","ar_SS","ar_SY","ar_TD","ar_TN","ar_YE","as","as_IN","az","az_AZ","az_Cyrl","az_Cyrl_AZ","az_Latn","az_Latn_AZ","be","be_BY","bg","bg_BG","bm","bm_ML","bn","bn_BD","bn_IN","bo","bo_CN","bo_IN","br","br_FR","bs","bs_BA","bs_Cyrl","bs_Cyrl_BA","bs_Latn","bs_Latn_BA","ca","ca_AD","ca_ES","ca_FR","ca_IT","ce","ce_RU","cs","cs_CZ","cy","cy_GB","da","da_DK","da_GL","de","de_AT","de_BE","de_CH","de_DE","de_IT","de_LI","de_LU","dz","dz_BT","ee","ee_GH","ee_TG","el","el_CY","el_GR","en","en_AE","en_AG","en_AI","en_AS","en_AT","en_AU","en_BB","en_BE","en_BI","en_BM","en_BS","en_BW","en_BZ","en_CA","en_CC","en_CH","en_CK","en_CM","en_CX","en_CY","en_DE","en_DK","en_DM","en_ER","en_FI","en_FJ","en_FK","en_FM","en_GB","en_GD","en_GG","en_GH","en_GI","en_GM","en_GU","en_GY","en_HK","en_IE","en_IL","en_IM","en_IN","en_IO","en_JE","en_JM","en_KE","en_KI","en_KN","en_KY","en_LC","en_LR","en_LS","en_MG","en_MH","en_MO","en_MP","en_MS","en_MT","en_MU","en_MW","en_MY","en_NA","en_NF","en_NG","en_NL","en_NR","en_NU","en_NZ","en_PG","en_PH","en_PK","en_PN","en_PR","en_PW","en_RW","en_SB","en_SC","en_SD","en_SE","en_SG","en_SH","en_SI","en_SL","en_SS","en_SX","en_SZ","en_TC","en_TK","en_TO","en_TT","en_TV","en_TZ","en_UG","en_UM","en_US","en_VC","en_VG","en_VI","en_VU","en_WS","en_ZA","en_ZM","en_ZW","eo","es","es_AR","es_BO","es_BR","es_BZ","es_CL","es_CO","es_CR","es_CU","es_DO","es_EC","es_ES","es_GQ","es_GT","es_HN","es_MX","es_NI","es_PA","es_PE","es_PH","es_PR","es_PY","es_SV","es_US","es_UY","es_VE","et","et_EE","eu","eu_ES","fa","fa_AF","fa_IR","ff","ff_CM","ff_GN","ff_Latn","ff_Latn_BF","ff_Latn_CM","ff_Latn_GH","ff_Latn_GM","ff_Latn_GN","ff_Latn_GW","ff_Latn_LR","ff_Latn_MR","ff_Latn_NE","ff_Latn_NG","ff_Latn_SL","ff_Latn_SN","ff_MR","ff_SN","fi","fi_FI","fo","fo_DK","fo_FO","fr","fr_BE","fr_BF","fr_BI","fr_BJ","fr_BL","fr_CA","fr_CD","fr_CF","fr_CG","fr_CH","fr_CI","fr_CM","fr_DJ","fr_DZ","fr_FR","fr_GA","fr_GF","fr_GN","fr_GP","fr_GQ","fr_HT","fr_KM","fr_LU","fr_MA","fr_MC","fr_MF","fr_MG","fr_ML","fr_MQ","fr_MR","fr_MU","fr_NC","fr_NE","fr_PF","fr_PM","fr_RE","fr_RW","fr_SC","fr_SN","fr_SY","fr_TD","fr_TG","fr_TN","fr_VU","fr_WF","fr_YT","fy","fy_NL","ga","ga_GB","ga_IE","gd","gd_GB","gl","gl_ES","gu","gu_IN","gv","gv_IM","ha","ha_GH","ha_NE","ha_NG","he","he_IL","hi","hi_IN","hr","hr_BA","hr_HR","hu","hu_HU","hy","hy_AM","ia","id","id_ID","ig","ig_NG","ii","ii_CN","is","is_IS","it","it_CH","it_IT","it_SM","it_VA","ja","ja_JP","jv","jv_ID","ka","ka_GE","ki","ki_KE","kk","kk_KZ","kl","kl_GL","km","km_KH","kn","kn_IN","ko","ko_KP","ko_KR","ks","ks_IN","ku","ku_TR","kw","kw_GB","ky","ky_KG","lb","lb_LU","lg","lg_UG","ln","ln_AO","ln_CD","ln_CF","ln_CG","lo","lo_LA","lt","lt_LT","lu","lu_CD","lv","lv_LV","mg","mg_MG","mi","mi_NZ","mk","mk_MK","ml","ml_IN","mn","mn_MN","mr","mr_IN","ms","ms_BN","ms_MY","ms_SG","mt","mt_MT","my","my_MM","nb","nb_NO","nb_SJ","nd","nd_ZW","ne","ne_IN","ne_NP","nl","nl_AW","nl_BE","nl_BQ","nl_CW","nl_NL","nl_SR","nl_SX","nn","nn_NO","no","no_NO","om","om_ET","om_KE","or","or_IN","os","os_GE","os_RU","pa","pa_Arab","pa_Arab_PK","pa_Guru","pa_Guru_IN","pa_IN","pa_PK","pl","pl_PL","ps","ps_AF","ps_PK","pt","pt_AO","pt_BR","pt_CH","pt_CV","pt_GQ","pt_GW","pt_LU","pt_MO","pt_MZ","pt_PT","pt_ST","pt_TL","qu","qu_BO","qu_EC","qu_PE","rm","rm_CH","rn","rn_BI","ro","ro_MD","ro_RO","ru","ru_BY","ru_KG","ru_KZ","ru_MD","ru_RU","ru_UA","rw","rw_RW","sd","sd_PK","se","se_FI","se_NO","se_SE","sg","sg_CF","sh","sh_BA","si","si_LK","sk","sk_SK","sl","sl_SI","sn","sn_ZW","so","so_DJ","so_ET","so_KE","so_SO","sq","sq_AL","sq_MK","sr","sr_BA","sr_Cyrl","sr_Cyrl_BA","sr_Cyrl_ME","sr_Cyrl_RS","sr_Latn","sr_Latn_BA","sr_Latn_ME","sr_Latn_RS","sr_ME","sr_RS","sv","sv_AX","sv_FI","sv_SE","sw","sw_CD","sw_KE","sw_TZ","sw_UG","ta","ta_IN","ta_LK","ta_MY","ta_SG","te","te_IN","tg","tg_TJ","th","th_TH","ti","ti_ER","ti_ET","tk","tk_TM","tl","tl_PH","to","to_TO","tr","tr_CY","tr_TR","tt","tt_RU","ug","ug_CN","uk","uk_UA","ur","ur_IN","ur_PK","uz","uz_AF","uz_Arab","uz_Arab_AF","uz_Cyrl","uz_Cyrl_UZ","uz_Latn","uz_Latn_UZ","uz_UZ","vi","vi_VN","wo","wo_SN","xh","xh_ZA","yi","yo","yo_BJ","yo_NG","zh","zh_CN","zh_HK","zh_Hans","zh_Hans_CN","zh_Hans_HK","zh_Hans_MO","zh_Hans_SG","zh_Hant","zh_Hant_HK","zh_Hant_MO","zh_Hant_TW","zh_MO","zh_SG","zh_TW","zu","zu_ZA"],Se=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid locale."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),!this.isEmptyValue(e)){var t=P.canonicalize(e);return"string"==typeof t&&Ce.includes(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}();function Le(e){if(!/^[\d|X]+$/.test(e)||10!==e.length)return!1;for(var t=0,n=0;n<10;n++){t+=("X"===e.charAt(n)?10:parseInt(e.charAt(n)))*(10-n)}return t%11==0}function Me(e){if(!v(e)||13!==e.length)return!1;for(var t=0,n=0;n<13;n+=2)t+=parseInt(e.charAt(n));for(var a=1;a<12;a+=2)t+=3*parseInt(e.charAt(a));return t%10==0}var be,Re=function(e){l(n,O);var t=f(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,n);var r=[null,"isbn10","isbn13"],o=null===(e=t.call(this,i)).options.mode?null:e.options.mode.toLowerCase();if(!r.includes(o))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:null,message:"This value is neither a valid ISBN-10 nor a valid ISBN-13.",message_isbn10:"This value is not a valid ISBN-10.",message_isbn13:"This value is not a valid ISBN-13."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/-/g,"",e).toUpperCase();return"isbn10"===this.options.mode?Le(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn10):"isbn13"!==this.options.mode||Me(t)?Le(t)||Me(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message):this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn13)}}}],[{key:"MODE_ALL",get:function(){return null}},{key:"MODE_ISBN_10",get:function(){return"isbn10"}},{key:"MODE_ISBN_13",get:function(){return"isbn13"}}]),n}(),Pe=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!1,case_sensitive:!1,hyphen:!1,message:"This value is not a valid ISSN."}}},{key:"validate",value:function(e){if("string"==typeof e&&!this.isEmptyValue(e)){var t=e=this.options.trim?M(e):e;if(t.length>4&&"-"===t.charAt(4))t=t.replace(/-/g,"");else if(this.options.hyphen)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(8!==t.length||this.options.case_sensitive&&!/^\d{7}[X|0-9]$/.test(t)||!this.options.case_sensitive&&!/^\d{7}[xX|0-9]$/.test(t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var n="x"===t.charAt(7)||"X"===t.charAt(7)?10:parseInt(t.charAt(7)),a=0;a<7;++a)n+=(8-a)*parseInt(t.charAt(a));return n%11!=0?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(),Ne=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Invalid card number."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),!this.isEmptyValue(e)){if(/[^0-9-\s]+/.test(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var t=e.toString().replace(/\D/g,""),n=0,a=t.length-1;a>=0;a-=2)n+=parseInt(t.charAt(a));for(var i=t.length-2;i>=0;i-=2)n+=(2*parseInt(t.charAt(i))).toString().split("").reduce((function(e,t){return parseInt(e)+parseInt(t)}),0);return 0===n||0!=n%10?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(),Oe=(o(be={},"AMEX",[/^3[47][0-9]{13}$/]),o(be,"CHINA_UNIONPAY",[/^62[0-9]{14,17}$/]),o(be,"DINERS",[/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/]),o(be,"DISCOVER",[/^6011[0-9]{12}$/,/^64[4-9][0-9]{13}$/,/^65[0-9]{14}$/,/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/]),o(be,"INSTAPAYMENT",[/^63[7-9][0-9]{13}$/]),o(be,"JCB",[/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/]),o(be,"LASER",[/^(6304|670[69]|6771)[0-9]{12,15}$/]),o(be,"MAESTRO",[/^(6759[0-9]{2})[0-9]{6,13}$/,/^(50[0-9]{4})[0-9]{6,13}$/,/^5[6-9][0-9]{10,17}$/,/^6[0-9]{11,18}$/]),o(be,"MASTERCARD",[/^5[1-5][0-9]{14}$/,/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/]),o(be,"MIR",[/^220[0-4][0-9]{12}$/]),o(be,"UATP",[/^1[0-9]{14}$/]),o(be,"VISA",[/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/]),be),Be=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,i),(e=t.call(this,r)).options.schemas=L(e.options.schemas)?[e.options.schemas]:e.options.schemas,!A(e.options.schemas))throw new Error('Value should be type of "array" or "string", "'.concat(n(e.options.schemas),'" given.'));if(0===e.options.schemas.length)throw new Error("The schemas list cannot be empty.");var o=Object.keys(Oe),s=e.options.schemas.filter((function(e){return o.includes(e.toUpperCase())}));if(s.length!==e.options.schemas.length)throw new Error("The schemas list contains one or more unsupported elements.");return e}return r(i,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Unsupported card type or invalid card number."}}},{key:"getRequiredOptions",value:function(){return["schemas"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),!this.isEmptyValue(e)){if(v(e)){var t,n=m(this.options.schemas);try{for(n.s();!(t=n.n()).done;){var a,i=t.value,r=m(Oe[i]);try{for(r.s();!(a=r.n()).done;){if(a.value.test(e))return}}catch(e){r.e(e)}finally{r.f()}}}catch(e){n.e(e)}finally{n.f()}}return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"SCHEMA_AMEX",get:function(){return"AMEX"}},{key:"SCHEMA_CHINA_UNIONPAY",get:function(){return"CHINA_UNIONPAY"}},{key:"SCHEMA_DINERS",get:function(){return"DINERS"}},{key:"SCHEMA_DISCOVER",get:function(){return"DISCOVER"}},{key:"SCHEMA_INSTAPAYMENT",get:function(){return"INSTAPAYMENT"}},{key:"SCHEMA_JCB",get:function(){return"JCB"}},{key:"SCHEMA_LASER",get:function(){return"LASER"}},{key:"SCHEMA_MAESTRO",get:function(){return"MAESTRO"}},{key:"SCHEMA_MASTERCARD",get:function(){return"MASTERCARD"}},{key:"SCHEMA_MIR",get:function(){return"MIR"}},{key:"SCHEMA_UATP",get:function(){return"UATP"}},{key:"SCHEMA_VISA",get:function(){return"VISA"}}]),i}(),Ie={AD:/^AD\d{2}\d{4}\d{4}[\dA-Z]{12}$/,AE:/^AE\d{2}\d{3}\d{16}$/,AL:/^AL\d{2}\d{8}[\dA-Z]{16}$/,AO:/^AO\d{2}\d{21}$/,AT:/^AT\d{2}\d{5}\d{11}$/,AX:/^FI\d{2}\d{6}\d{7}\d{1}$/,AZ:/^AZ\d{2}[A-Z]{4}[\dA-Z]{20}$/,BA:/^BA\d{2}\d{3}\d{3}\d{8}\d{2}$/,BE:/^BE\d{2}\d{3}\d{7}\d{2}$/,BF:/^BF\d{2}\d{23}$/,BG:/^BG\d{2}[A-Z]{4}\d{4}\d{2}[\dA-Z]{8}$/,BH:/^BH\d{2}[A-Z]{4}[\dA-Z]{14}$/,BI:/^BI\d{2}\d{12}$/,BJ:/^BJ\d{2}[A-Z]{1}\d{23}$/,BY:/^BY\d{2}[\dA-Z]{4}\d{4}[\dA-Z]{16}$/,BL:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,BR:/^BR\d{2}\d{8}\d{5}\d{10}[A-Z][\dA-Z]$/,CG:/^CG\d{2}\d{23}$/,CH:/^CH\d{2}\d{5}[\dA-Z]{12}$/,CI:/^CI\d{2}[A-Z]{1}\d{23}$/,CM:/^CM\d{2}\d{23}$/,CR:/^CR\d{2}0\d{3}\d{14}$/,CV:/^CV\d{2}\d{21}$/,CY:/^CY\d{2}\d{3}\d{5}[\dA-Z]{16}$/,CZ:/^CZ\d{2}\d{20}$/,DE:/^DE\d{2}\d{8}\d{10}$/,DO:/^DO\d{2}[\dA-Z]{4}\d{20}$/,DK:/^DK\d{2}\d{4}\d{10}$/,DZ:/^DZ\d{2}\d{20}$/,EE:/^EE\d{2}\d{2}\d{2}\d{11}\d{1}$/,ES:/^ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}$/,FI:/^FI\d{2}\d{6}\d{7}\d{1}$/,FO:/^FO\d{2}\d{4}\d{9}\d{1}$/,FR:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GB:/^GB\d{2}[A-Z]{4}\d{6}\d{8}$/,GE:/^GE\d{2}[A-Z]{2}\d{16}$/,GI:/^GI\d{2}[A-Z]{4}[\dA-Z]{15}$/,GL:/^GL\d{2}\d{4}\d{9}\d{1}$/,GP:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GR:/^GR\d{2}\d{3}\d{4}[\dA-Z]{16}$/,GT:/^GT\d{2}[\dA-Z]{4}[\dA-Z]{20}$/,HR:/^HR\d{2}\d{7}\d{10}$/,HU:/^HU\d{2}\d{3}\d{4}\d{1}\d{15}\d{1}$/,IE:/^IE\d{2}[A-Z]{4}\d{6}\d{8}$/,IL:/^IL\d{2}\d{3}\d{3}\d{13}$/,IR:/^IR\d{2}\d{22}$/,IS:/^IS\d{2}\d{4}\d{2}\d{6}\d{10}$/,IT:/^IT\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,JO:/^JO\d{2}[A-Z]{4}\d{4}[\dA-Z]{18}$/,KW:/^KW\d{2}[A-Z]{4}\d{22}$/,KZ:/^KZ\d{2}\d{3}[\dA-Z]{13}$/,LB:/^LB\d{2}\d{4}[\dA-Z]{20}$/,LI:/^LI\d{2}\d{5}[\dA-Z]{12}$/,LT:/^LT\d{2}\d{5}\d{11}$/,LU:/^LU\d{2}\d{3}[\dA-Z]{13}$/,LV:/^LV\d{2}[A-Z]{4}[\dA-Z]{13}$/,MC:/^MC\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MD:/^MD\d{2}[\dA-Z]{2}[\dA-Z]{18}$/,ME:/^ME\d{2}\d{3}\d{13}\d{2}$/,MF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MG:/^MG\d{2}\d{23}$/,MK:/^MK\d{2}\d{3}[\dA-Z]{10}\d{2}$/,ML:/^ML\d{2}[A-Z]{1}\d{23}$/,MQ:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MR:/^MR13\d{5}\d{5}\d{11}\d{2}$/,MT:/^MT\d{2}[A-Z]{4}\d{5}[\dA-Z]{18}$/,MU:/^MU\d{2}[A-Z]{4}\d{2}\d{2}\d{12}\d{3}[A-Z]{3}$/,MZ:/^MZ\d{2}\d{21}$/,NC:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,NL:/^NL\d{2}[A-Z]{4}\d{10}$/,NO:/^NO\d{2}\d{4}\d{6}\d{1}$/,PF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PK:/^PK\d{2}[A-Z]{4}[\dA-Z]{16}$/,PL:/^PL\d{2}\d{8}\d{16}$/,PM:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PS:/^PS\d{2}[A-Z]{4}[\dA-Z]{21}$/,PT:/^PT\d{2}\d{4}\d{4}\d{11}\d{2}$/,QA:/^QA\d{2}[A-Z]{4}[\dA-Z]{21}$/,RE:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,RO:/^RO\d{2}[A-Z]{4}[\dA-Z]{16}$/,RS:/^RS\d{2}\d{3}\d{13}\d{2}$/,SA:/^SA\d{2}\d{2}[\dA-Z]{18}$/,SE:/^SE\d{2}\d{3}\d{16}\d{1}$/,SI:/^SI\d{2}\d{5}\d{8}\d{2}$/,SK:/^SK\d{2}\d{4}\d{6}\d{10}$/,SM:/^SM\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,SN:/^SN\d{2}[A-Z]{1}\d{23}$/,TF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,TL:/^TL\d{2}\d{3}\d{14}\d{2}$/,TN:/^TN59\d{2}\d{3}\d{13}\d{2}$/,TR:/^TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}$/,UA:/^UA\d{2}\d{6}[\dA-Z]{19}$/,VA:/^VA\d{2}\d{3}\d{15}$/,VG:/^VG\d{2}[A-Z]{4}\d{16}$/,WF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,XK:/^XK\d{2}\d{4}\d{10}\d{2}$/,YT:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/};var ke=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid International Bank Account Number (IBAN)."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=M(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/ /g,"",e.toUpperCase()),n=t.substring(0,2);return/^[A-Z0-9]+$/.test(t)&&function(e){return void 0!==G.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(n)&&void 0!==Ie[n]&&Ie[n].test(t)?1!==function(e){var t=0;return function(e,t){if(null===t&&(t=1),null===e||t<1)return!1;for(var n=[],a=0,i=(e+="").length;a=55296&&n<=56319){var a=n;return 1===t.length?n:1024*(a-55296)+(t.charCodeAt(1)-56320)+65536}return n}(e)-55:t+=e})),t}(t.substring(4)+t.substring(0,4)))?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(),De={GF:"FR",PF:"FR",TF:"FR",GP:"FR",MQ:"FR",YT:"FR",NC:"FR",RE:"FR",PM:"FR",WF:"FR",JE:"GB",IM:"GB",GG:"GB",VG:"GB"};function Ge(e){return void 0!==G.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}var we=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid Business Identifier Code (BIC).",message_iban:"This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.",iban_path:null}}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{form:{}};if(this.options.trim&&(e=M(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var n=e.replace(/ /g,"",e);if(!([8,11].includes(n.length)&&/^[A-Z0-9]+$/.test(n)&&/^[A-Z]{4}/.test(n)&&Ge(n.substring(4,6))))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(null!==this.options.iban_path&&L(this.options.iban_path)){var a=t.form[this.options.iban_path];if(this.isEmptyValue(a))return;var i=a.substring(0,2),r=n.substring(4,6);if(i===r||i===De[r])return;return this.getViolationBuilder().setParameter("value",e).setParameter("iban",a).build(this.options.message_iban)}}}}]),n}(),Ue=function(){function e(){a(this,e)}return r(e,[{key:"validate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[];return A(t)?(t.forEach((function(t){if(!(t instanceof O))return!1;var i=t.validate(e,n);void 0!==i&&a.push(i)})),a):a}}]),e}(),Ve=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),o(this,"constraints",[]),o(this,"options",{}),o(this,"transformers",[]),o(this,"reversTransformers",[]),this.constraints=t,this.options=n}return r(e,[{key:"getConstraints",value:function(){return this.constraints}},{key:"getOptions",value:function(){return this.options}},{key:"getTransformers",value:function(){return this.transformers}},{key:"getReverseTransformers",value:function(){return this.reversTransformers}},{key:"addTransformer",value:function(e){if(!E(e))throw new Error('Transformer must be type of "function", '.concat(n(e)," given."));return this.transformers.push(e),this}},{key:"addReverseTransformer",value:function(e){if(!E(e))throw new Error('Transformer must be type of "function", '.concat(n(e)," given."));return this.reversTransformers.push(e),this}},{key:"resetTransformers",value:function(){return this.transformers=[],this}},{key:"resetReverseTransformers",value:function(){return this.reversTransformers=[],this}}]),e}(),Ze=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),o(this,"validator",void 0),o(this,"violationBuilder",void 0),o(this,"fields",{}),o(this,"data",{}),o(this,"errors",{}),o(this,"transformers",[]),o(this,"reversTransformers",[]),this.options=u(u({},{extra_fields:!1,extra_fields_message:"This form should not contain extra fields."}),t),this.validator=new Ue,this.violationBuilder=new R}return r(e,[{key:"add",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof e)throw new Error('The field should be type of "string", "'.concat(n(e),'" given.'));if(0===e.length)throw new Error("The field name is too short.");if(void 0!==t&&!A(t))throw new Error('The constants should be type of "array", "'.concat(n(t),'" given.'));if(void 0!==this.fields[e])throw new Error("The field ".concat(e," already exists in this form."));return this.fields[e]=new Ve(A(t)?t:[],u(u({},{}),a)),this}},{key:"validate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.errors={},this.data=t,this.options.extra_fields||this.checkExtraFields(),Object.keys(this.errors).length>0||(this.data=b(this.transformers)(this.data,n),Object.keys(this.fields).forEach((function(t){var a=e.fields[t],i=u(u({},n),{field:a.getOptions(),form:e});e.data[t]=b(a.getTransformers())(e.data[t],i);var r=e.validator.validate(e.data[t],a.getConstraints(),i);r.length>0&&e.addValidationErrors(t,r),e.data[t]=b(a.getReverseTransformers())(e.data[t],i)})),this.data=b(this.reversTransformers)(this.data,n)),this.errors}},{key:"addValidationErrors",value:function(e,t){return A(this.errors[e])||(this.errors[e]=[]),A(t)?this.errors[e]=this.errors[e].concat(t):this.errors[e].push(t),this}},{key:"checkExtraFields",value:function(){for(var e=0,t=Object.keys(this.data);ee.length)&&(t=e.length);for(var n=0,a=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function v(e){return t=e,n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),("number"==typeof t||"string"==typeof t&&-1===n.indexOf(t.slice(-1)))&&""!==t&&!isNaN(t);var t,n}function g(e){return"[object Date]"===Object.prototype.toString.call(e)&&e instanceof Date}function y(e){return null===e}function A(e){return Array.isArray(e)}function E(e){return"function"==typeof e}function T(e){return!(+(t=e)!==t||isFinite(t)&&!(t%1));var t}function C(e){return(t=e)===+t&&isFinite(t)&&!(t%1);var t}function S(e){return"[object Array]"!==Object.prototype.toString.call(e)&&null!==e&&("object"===n(e)&&e===Object(e))}function M(e){return"string"==typeof e}function L(e){return"string"!=typeof e?e:function(e,t){var n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),a=0,i=0;for(e+="",t&&(n=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),a=e.length,i=0;i=0;i--)if(-1===n.indexOf(e.charAt(i))){e=e.substring(0,i+1);break}return-1===n.indexOf(e.charAt(0))?e:""}(e,[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," ","\0"].join(""))}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!A(e))throw new Error('Functions list must be type of "array", "'.concat(n(e),'" given.'));return e=e.filter((function(e){return E(e)})),function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 0===e.length?n:e.reduce((function(e,n){return n(e,u(u({},t),a))}),n)}}var R=function(){function e(){a(this,e),this.parameters={}}return r(e,[{key:"setParameter",value:function(e,t){if("string"!=typeof e||0===e.length)throw new Error("Invalid parameter name was provided: "+JSON.stringify(e));switch(!0){case void 0===t:t="undefined";break;case S(t):case A(t):try{t=JSON.stringify(t)}catch(e){t=t.toString()}break;case isNaN(t)&&"string"!=typeof t:t="NaN";break;case E(t):t="function() {}";break;case y(t):t="null";break;default:t+=""}return this.parameters["{{ ".concat(e," }}")]=t.toString(),this}},{key:"build",value:function(e){var t=this;if("string"!=typeof e)throw new Error("Invalid error message was provided.");return Object.keys(this.parameters).forEach((function(n){e=e.replace(n,t.parameters[n])})),this.parameters={},Error(e)}}]),e}();var P=function(){function e(t){a(this,e),this.fallback=t||"en-US"}return r(e,[{key:"getUserLocales",value:function(){return e=this.fallback,t=[],"undefined"!=typeof window&&(window.navigator.languages&&(t=t.concat(window.navigator.languages)),window.navigator.language&&t.push(window.navigator.language),window.navigator.userLanguage&&t.push(window.navigator.userLanguage),window.navigator.browserLanguage&&t.push(window.navigator.browserLanguage),window.navigator.systemLanguage&&t.push(window.navigator.systemLanguage)),t.push(e),t.filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){if(!e||-1===e.indexOf("-")||e.toLowerCase()!==e)return e;var t=e.split("-");return"".concat(t[0],"-").concat(t[1].toUpperCase())}));var e,t}},{key:"getUserLocale",value:function(){return this.getUserLocales()[0]}}],[{key:"canonicalize",value:function(e){if("string"!=typeof e||0===e.length||"."===e.charAt(0))return"en-US";var t=e.match(/^([a-z]{2})[-_]([a-z]{2})(?:([a-z]{2})(?:[-_]([a-z]{2}))?)?(?:\..*)?$/i);if(null===t)return e;var n,a=[t[1].toLowerCase()];return void 0===t[3]?a.push(t[2].toUpperCase()):a.push((n=t[2].toLowerCase()+t[3].toLowerCase(),(n+="").charAt(0).toUpperCase()+n.substr(1))),void 0!==t[4]&&a.push(t[4].toUpperCase()),a.join("_")}},{key:"DEFAULT_LOCALE",get:function(){return"en-US"}}]),e}(),N=new P,O=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.options=u(u({},this.getDefaultOptions()),n),this.getRequiredOptions().forEach((function(e){if(void 0===t.options[e])throw new Error('No "'.concat(e,'" option is configured.'))})),this.locale_string=this.options.locale_string||N.getUserLocale(),this.locale_options=this.options.locale_options||{},this.violationBuilder=new R}return r(e,[{key:"getDefaultOptions",value:function(){return{}}},{key:"getRequiredOptions",value:function(){return[]}},{key:"getViolationBuilder",value:function(){return this.violationBuilder}},{key:"validate",value:function(e,t){throw new Error("The validate() method was not implemented")}},{key:"isEmptyValue",value:function(e){return"string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==n(e)&&"function"!=typeof e&&isNaN(e)||null==e}},{key:"formatDateValue",value:function(e){return new Intl.DateTimeFormat(this.locale_string,this.locale_options).format(e)}}]),e}(),B=function(e){l(i,O);var t=f(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,i),(e=t.call(this,n)).options.strict=!!e.options.strict,e}return r(i,[{key:"getDefaultOptions",value:function(){return{strict:!1,message_strict:"This values has different types. Given type is {{ value_type }}; Expected type is {{ compared_type }}."}}},{key:"getRequiredOptions",value:function(){return["value","strict"]}},{key:"compare",value:function(e,t){throw new Error("The compare() method was not implemented")}},{key:"validate",value:function(e){var t=this.options.value;return this.options.strict&&n(t)!==n(e)?this.getViolationBuilder().setParameter("value_type",g(e)?"Date object":n(e)).setParameter("compared_type",g(t)?"Date object":n(t)).build(this.options.message_strict):(g(t)&&(e="now"===e?new Date:new Date(e)),this.compare(e,t)?void 0:(e=g(e)?this.formatDateValue(e):e,t=g(t)?this.formatDateValue(t):t,this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",t).setParameter("compared_value_type",n(t)).build(this.options.message)))}}]),i}(),I=function(e){l(n,O);var t=f(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),(e=t.call(this,i)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message_min:"This value is too short. It should have {{ limit }} character(s) or more.",message_max:"This value is too long. It should have {{ limit }} character(s) or less.",message_exact:"This value should have exactly {{ limit }} character(s)."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),"string"==typeof e){var t=e.length;return null!==this.options.min&&this.options.min===this.options.max&&t!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&t>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&t0&&void 0!==arguments[0]?arguments[0]:{};a(this,n),e=t.call(this,i);var r=["simple_regexp","html5_regexp","html5_input"];if(!r.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:"html5_regexp",message:"This value is not valid email."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case"simple_regexp":if(!function(e){return/^.+@\S+\.\S+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5_regexp":if(!function(e){return/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5_input":if(!function(e){var t=document.createElement("input");return t.setAttribute("type","email"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_SIMPLE",get:function(){return"simple_regexp"}},{key:"MODE_HTML5",get:function(){return"html5_regexp"}},{key:"MODE_HTML5_INPUT",get:function(){return"html5_input"}}]),n}(),D=function(e){l(i,O);var t=f(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,i),t.call(this,e)}return r(i,[{key:"getDefaultOptions",value:function(){return{message:"This value should be blank."}}},{key:"validate",value:function(e){if("string"==typeof e&&e.length>0||"string"!=typeof e&&"object"!==n(e)&&!isNaN(e)&&null!=e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),i}(),G=[{a2:"AF",a3:"AFG",n:"004"},{a2:"AX",a3:"ALA",n:"248"},{a2:"AL",a3:"ALB",n:"008"},{a2:"DZ",a3:"DZA",n:"012"},{a2:"AS",a3:"ASM",n:"016"},{a2:"AD",a3:"AND",n:"020"},{a2:"AO",a3:"AGO",n:"024"},{a2:"AI",a3:"AIA",n:"660"},{a2:"AQ",a3:"ATA",n:"010"},{a2:"AG",a3:"ATG",n:"028"},{a2:"AR",a3:"ARG",n:"032"},{a2:"AM",a3:"ARM",n:"051"},{a2:"AW",a3:"ABW",n:"533"},{a2:"AU",a3:"AUS",n:"036"},{a2:"AT",a3:"AUT",n:"040"},{a2:"AZ",a3:"AZE",n:"031"},{a2:"BS",a3:"BHS",n:"044"},{a2:"BH",a3:"BHR",n:"048"},{a2:"BD",a3:"BGD",n:"050"},{a2:"BB",a3:"BRB",n:"052"},{a2:"BY",a3:"BLR",n:"112"},{a2:"BE",a3:"BEL",n:"056"},{a2:"BZ",a3:"BLZ",n:"084"},{a2:"BJ",a3:"BEN",n:"204"},{a2:"BM",a3:"BMU",n:"060"},{a2:"BT",a3:"BTN",n:"064"},{a2:"BO",a3:"BOL",n:"068"},{a2:"BQ",a3:"BES",n:"535"},{a2:"BA",a3:"BIH",n:"070"},{a2:"BW",a3:"BWA",n:"072"},{a2:"BV",a3:"BVT",n:"074"},{a2:"BR",a3:"BRA",n:"076"},{a2:"IO",a3:"IOT",n:"086"},{a2:"BN",a3:"BRN",n:"096"},{a2:"BG",a3:"BGR",n:"100"},{a2:"BF",a3:"BFA",n:"854"},{a2:"BI",a3:"BDI",n:"108"},{a2:"CV",a3:"CPV",n:"132"},{a2:"KH",a3:"KHM",n:"116"},{a2:"CM",a3:"CMR",n:"120"},{a2:"CA",a3:"CAN",n:"124"},{a2:"KY",a3:"CYM",n:"136"},{a2:"CF",a3:"CAF",n:"140"},{a2:"TD",a3:"TCD",n:"148"},{a2:"CL",a3:"CHL",n:"152"},{a2:"CN",a3:"CHN",n:"156"},{a2:"CX",a3:"CXR",n:"162"},{a2:"CC",a3:"CCK",n:"166"},{a2:"CO",a3:"COL",n:"170"},{a2:"KM",a3:"COM",n:"174"},{a2:"CG",a3:"COG",n:"178"},{a2:"CD",a3:"COD",n:"180"},{a2:"CK",a3:"COK",n:"184"},{a2:"CR",a3:"CRI",n:"188"},{a2:"CI",a3:"CIV",n:"384"},{a2:"HR",a3:"HRV",n:"191"},{a2:"CU",a3:"CUB",n:"192"},{a2:"CW",a3:"CUW",n:"531"},{a2:"CY",a3:"CYP",n:"196"},{a2:"CZ",a3:"CZE",n:"203"},{a2:"DK",a3:"DNK",n:"208"},{a2:"DJ",a3:"DJI",n:"262"},{a2:"DM",a3:"DMA",n:"212"},{a2:"DO",a3:"DOM",n:"214"},{a2:"EC",a3:"ECU",n:"218"},{a2:"EG",a3:"EGY",n:"818"},{a2:"SV",a3:"SLV",n:"222"},{a2:"GQ",a3:"GNQ",n:"226"},{a2:"ER",a3:"ERI",n:"232"},{a2:"EE",a3:"EST",n:"233"},{a2:"SZ",a3:"SWZ",n:"748"},{a2:"ET",a3:"ETH",n:"231"},{a2:"FK",a3:"FLK",n:"238"},{a2:"FO",a3:"FRO",n:"234"},{a2:"FJ",a3:"FJI",n:"242"},{a2:"FI",a3:"FIN",n:"246"},{a2:"FR",a3:"FRA",n:"250"},{a2:"GF",a3:"GUF",n:"254"},{a2:"PF",a3:"PYF",n:"258"},{a2:"TF",a3:"ATF",n:"260"},{a2:"GA",a3:"GAB",n:"266"},{a2:"GM",a3:"GMB",n:"270"},{a2:"GE",a3:"GEO",n:"268"},{a2:"DE",a3:"DEU",n:"276"},{a2:"GH",a3:"GHA",n:"288"},{a2:"GI",a3:"GIB",n:"292"},{a2:"GR",a3:"GRC",n:"300"},{a2:"GL",a3:"GRL",n:"304"},{a2:"GD",a3:"GRD",n:"308"},{a2:"GP",a3:"GLP",n:"312"},{a2:"GU",a3:"GUM",n:"316"},{a2:"GT",a3:"GTM",n:"320"},{a2:"GG",a3:"GGY",n:"831"},{a2:"GN",a3:"GIN",n:"324"},{a2:"GW",a3:"GNB",n:"624"},{a2:"GY",a3:"GUY",n:"328"},{a2:"HT",a3:"HTI",n:"332"},{a2:"HM",a3:"HMD",n:"334"},{a2:"VA",a3:"VAT",n:"336"},{a2:"HN",a3:"HND",n:"340"},{a2:"HK",a3:"HKG",n:"344"},{a2:"HU",a3:"HUN",n:"348"},{a2:"IS",a3:"ISL",n:"352"},{a2:"IN",a3:"IND",n:"356"},{a2:"ID",a3:"IDN",n:"360"},{a2:"IR",a3:"IRN",n:"364"},{a2:"IQ",a3:"IRQ",n:"368"},{a2:"IE",a3:"IRL",n:"372"},{a2:"IM",a3:"IMN",n:"833"},{a2:"IL",a3:"ISR",n:"376"},{a2:"IT",a3:"ITA",n:"380"},{a2:"JM",a3:"JAM",n:"388"},{a2:"JP",a3:"JPN",n:"392"},{a2:"JE",a3:"JEY",n:"832"},{a2:"JO",a3:"JOR",n:"400"},{a2:"KZ",a3:"KAZ",n:"398"},{a2:"KE",a3:"KEN",n:"404"},{a2:"KI",a3:"KIR",n:"296"},{a2:"KP",a3:"PRK",n:"408"},{a2:"KR",a3:"KOR",n:"410"},{a2:"KW",a3:"KWT",n:"414"},{a2:"KG",a3:"KGZ",n:"417"},{a2:"LA",a3:"LAO",n:"418"},{a2:"LV",a3:"LVA",n:"428"},{a2:"LB",a3:"LBN",n:"422"},{a2:"LS",a3:"LSO",n:"426"},{a2:"LR",a3:"LBR",n:"430"},{a2:"LY",a3:"LBY",n:"434"},{a2:"LI",a3:"LIE",n:"438"},{a2:"LT",a3:"LTU",n:"440"},{a2:"LU",a3:"LUX",n:"442"},{a2:"MO",a3:"MAC",n:"446"},{a2:"MG",a3:"MDG",n:"450"},{a2:"MW",a3:"MWI",n:"454"},{a2:"MY",a3:"MYS",n:"458"},{a2:"MV",a3:"MDV",n:"462"},{a2:"ML",a3:"MLI",n:"466"},{a2:"MT",a3:"MLT",n:"470"},{a2:"MH",a3:"MHL",n:"584"},{a2:"MQ",a3:"MTQ",n:"474"},{a2:"MR",a3:"MRT",n:"478"},{a2:"MU",a3:"MUS",n:"480"},{a2:"YT",a3:"MYT",n:"175"},{a2:"MX",a3:"MEX",n:"484"},{a2:"FM",a3:"FSM",n:"583"},{a2:"MD",a3:"MDA",n:"498"},{a2:"MC",a3:"MCO",n:"492"},{a2:"MN",a3:"MNG",n:"496"},{a2:"ME",a3:"MNE",n:"499"},{a2:"MS",a3:"MSR",n:"500"},{a2:"MA",a3:"MAR",n:"504"},{a2:"MZ",a3:"MOZ",n:"508"},{a2:"MM",a3:"MMR",n:"104"},{a2:"NA",a3:"NAM",n:"516"},{a2:"NR",a3:"NRU",n:"520"},{a2:"NP",a3:"NPL",n:"524"},{a2:"NL",a3:"NLD",n:"528"},{a2:"NC",a3:"NCL",n:"540"},{a2:"NZ",a3:"NZL",n:"554"},{a2:"NI",a3:"NIC",n:"558"},{a2:"NE",a3:"NER",n:"562"},{a2:"NG",a3:"NGA",n:"566"},{a2:"NU",a3:"NIU",n:"570"},{a2:"NF",a3:"NFK",n:"574"},{a2:"MK",a3:"MKD",n:"807"},{a2:"MP",a3:"MNP",n:"580"},{a2:"NO",a3:"NOR",n:"578"},{a2:"OM",a3:"OMN",n:"512"},{a2:"PK",a3:"PAK",n:"586"},{a2:"PW",a3:"PLW",n:"585"},{a2:"PS",a3:"PSE",n:"275"},{a2:"PA",a3:"PAN",n:"591"},{a2:"PG",a3:"PNG",n:"598"},{a2:"PY",a3:"PRY",n:"600"},{a2:"PE",a3:"PER",n:"604"},{a2:"PH",a3:"PHL",n:"608"},{a2:"PN",a3:"PCN",n:"612"},{a2:"PL",a3:"POL",n:"616"},{a2:"PT",a3:"PRT",n:"620"},{a2:"PR",a3:"PRI",n:"630"},{a2:"QA",a3:"QAT",n:"634"},{a2:"RE",a3:"REU",n:"638"},{a2:"RO",a3:"ROU",n:"642"},{a2:"RU",a3:"RUS",n:"643"},{a2:"RW",a3:"RWA",n:"646"},{a2:"BL",a3:"BLM",n:"652"},{a2:"SH",a3:"SHN",n:"654"},{a2:"KN",a3:"KNA",n:"659"},{a2:"LC",a3:"LCA",n:"662"},{a2:"MF",a3:"MAF",n:"663"},{a2:"PM",a3:"SPM",n:"666"},{a2:"VC",a3:"VCT",n:"670"},{a2:"WS",a3:"WSM",n:"882"},{a2:"SM",a3:"SMR",n:"674"},{a2:"ST",a3:"STP",n:"678"},{a2:"SA",a3:"SAU",n:"682"},{a2:"SN",a3:"SEN",n:"686"},{a2:"RS",a3:"SRB",n:"688"},{a2:"SC",a3:"SYC",n:"690"},{a2:"SL",a3:"SLE",n:"694"},{a2:"SG",a3:"SGP",n:"702"},{a2:"SX",a3:"SXM",n:"534"},{a2:"SK",a3:"SVK",n:"703"},{a2:"SI",a3:"SVN",n:"705"},{a2:"SB",a3:"SLB",n:"090"},{a2:"SO",a3:"SOM",n:"706"},{a2:"ZA",a3:"ZAF",n:"710"},{a2:"GS",a3:"SGS",n:"239"},{a2:"SS",a3:"SSD",n:"728"},{a2:"ES",a3:"ESP",n:"724"},{a2:"LK",a3:"LKA",n:"144"},{a2:"SD",a3:"SDN",n:"729"},{a2:"SR",a3:"SUR",n:"740"},{a2:"SJ",a3:"SJM",n:"744"},{a2:"SE",a3:"SWE",n:"752"},{a2:"CH",a3:"CHE",n:"756"},{a2:"SY",a3:"SYR",n:"760"},{a2:"TW",a3:"TWN",n:"158"},{a2:"TJ",a3:"TJK",n:"762"},{a2:"TZ",a3:"TZA",n:"834"},{a2:"TH",a3:"THA",n:"764"},{a2:"TL",a3:"TLS",n:"626"},{a2:"TG",a3:"TGO",n:"768"},{a2:"TK",a3:"TKL",n:"772"},{a2:"TO",a3:"TON",n:"776"},{a2:"TT",a3:"TTO",n:"780"},{a2:"TN",a3:"TUN",n:"788"},{a2:"TR",a3:"TUR",n:"792"},{a2:"TM",a3:"TKM",n:"795"},{a2:"TC",a3:"TCA",n:"796"},{a2:"TV",a3:"TUV",n:"798"},{a2:"UG",a3:"UGA",n:"800"},{a2:"UA",a3:"UKR",n:"804"},{a2:"AE",a3:"ARE",n:"784"},{a2:"GB",a3:"GBR",n:"826"},{a2:"US",a3:"USA",n:"840"},{a2:"UM",a3:"UMI",n:"581"},{a2:"UY",a3:"URY",n:"858"},{a2:"UZ",a3:"UZB",n:"860"},{a2:"VU",a3:"VUT",n:"548"},{a2:"VE",a3:"VEN",n:"862"},{a2:"VN",a3:"VNM",n:"704"},{a2:"VG",a3:"VGB",n:"092"},{a2:"VI",a3:"VIR",n:"850"},{a2:"WF",a3:"WLF",n:"876"},{a2:"EH",a3:"ESH",n:"732"},{a2:"YE",a3:"YEM",n:"887"},{a2:"ZM",a3:"ZMB",n:"894"},{a2:"ZW",a3:"ZWE",n:"716"},{a2:"XK",a3:"XKX",n:"383"}];var w=function(e){l(n,O);var t=f(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,n),e=t.call(this,i);var r=["alpha2","alpha3","numeric"];if(!r.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid country.",mode:"alpha2"}}},{key:"validate",value:function(e){if(v(e)&&(e=String(e).padStart(3,"0")),this.options.trim&&(e=L(e)),!this.isEmptyValue(e))return"string"==typeof e&&(function(e,t){return"alpha2"===t&&void 0!==G.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return"alpha3"===t&&void 0!==G.find((function(t){return t.a3.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return"numeric"===t&&void 0!==G.find((function(t){return t.n.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode))?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}],[{key:"MODE_ALPHA2",get:function(){return"alpha2"}},{key:"MODE_ALPHA3",get:function(){return"alpha3"}},{key:"MODE_NUMERIC",get:function(){return"numeric"}}]),n}(),U=["ADP","AED","AFA","AFN","ALK","ALL","AMD","ANG","AOA","AOK","AON","AOR","ARA","ARL","ARM","ARP","ARS","ATS","AUD","AWG","AZM","AZN","BAD","BAM","BAN","BBD","BDT","BEC","BEF","BEL","BGL","BGM","BGN","BGO","BHD","BIF","BMD","BND","BOB","BOL","BOP","BOV","BRB","BRC","BRE","BRL","BRN","BRR","BRZ","BSD","BTN","BUK","BWP","BYB","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLE","CLF","CLP","CNH","CNX","CNY","COP","COU","CRC","CSD","CSK","CUC","CUP","CVE","CYP","CZK","DDM","DEM","DJF","DKK","DOP","DZD","ECS","ECV","EEK","EGP","ERN","ESA","ESB","ESP","ETB","EUR","FIM","FJD","FKP","FRF","GBP","GEK","GEL","GHC","GHS","GIP","GMD","GNF","GNS","GQE","GRD","GTQ","GWE","GWP","GYD","HKD","HNL","HRD","HRK","HTG","HUF","IDR","IEP","ILP","ILR","ILS","INR","IQD","IRR","ISJ","ISK","ITL","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRH","KRO","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LTT","LUC","LUF","LUL","LVL","LVR","LYD","MAD","MAF","MCF","MDC","MDL","MGA","MGF","MKD","MKN","MLF","MMK","MNT","MOP","MRO","MRU","MTL","MTP","MUR","MVP","MVR","MWK","MXN","MXP","MXV","MYR","MZE","MZM","MZN","NAD","NGN","NIC","NIO","NLG","NOK","NPR","NZD","OMR","PAB","PEI","PEN","PES","PGK","PHP","PKR","PLN","PLZ","PTE","PYG","QAR","RHD","ROL","RON","RSD","RUB","RUR","RWF","SAR","SBD","SCR","SDD","SDG","SDP","SEK","SGD","SHP","SIT","SKK","SLL","SOS","SRD","SRG","SSP","STD","STN","SUR","SVC","SYP","SZL","THB","TJR","TJS","TMM","TMT","TND","TOP","TPE","TRL","TRY","TTD","TWD","TZS","UAH","UAK","UGS","UGX","USD","USN","USS","UYI","UYP","UYU","UYW","UZS","VEB","VEF","VES","VND","VNN","VUV","WST","XAF","XCD","XEU","XFO","XFU","XOF","XPF","XRE","YDD","YER","YUD","YUM","YUN","YUR","ZAL","ZAR","ZMK","ZMW","ZRN","ZRZ","ZWD","ZWL","ZWR"],V=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid currency."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),!this.isEmptyValue(e))return"string"==typeof e&&U.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),Z=function(e){l(i,O);var t=f(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,i),t.call(this,e)}return r(i,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be blank.",allow_null:!1}}},{key:"validate",value:function(e){if("string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==n(e)&&isNaN(e)||void 0===e||!this.options.allow_null&&null===e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),i}();var $=function(e){l(n,O);var t=f(n);function n(e){var i;if(a(this,n),i=t.call(this,e),!["regexp","url_api","html5"].includes(i.options.mode))throw new Error("Invalid validation mode provided: ".concat(i.options.mode));return i}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:"url_api",message:"This value is not a valid URL."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case"regexp":if(!function(e){return!(null===e.match(/^(https?:\/\/|ftps?:\/\/)?([a-z0-9%\-]+\.){1,}([a-z0-9\-]+)?(:(\d{1,5}))?(\/([a-z0-9\-._~:\/\?#\[\]@!$&'\(\)\*\+,;=%]+)?)?$/i))}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"url_api":if(!function(e){try{new URL(e)}catch(e){return!1}return!0}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"html5":if(!function(e){var t=document.createElement("input");return t.setAttribute("type","url"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_REGEXP",get:function(){return"regexp"}},{key:"MODE_URL_API",get:function(){return"url_api"}},{key:"MODE_HTML5",get:function(){return"html5"}}]),n}(),F=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be false."}}},{key:"validate",value:function(e){if(!1!==e&&0!==e&&"0"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),Y=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be true."}}},{key:"validate",value:function(e){if(!0!==e&&1!==e&&"1"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),K=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be valid JSON."}}},{key:"validate",value:function(e){try{JSON.parse(e)}catch(t){return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(),H=function(e){l(n,B);var t=f(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return g(e)&&g(t)?e.getTime()===t.getTime():e==t}}]),n}(),x=function(e){l(n,B);var t=f(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should not be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return g(e)&&g(t)?e.getTime()!==t.getTime():e!=t}}]),n}(),W=function(e){l(n,B);var t=f(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return g(e)&&g(t)?e.getTime()>t.getTime():e>t}}]),n}(),j=function(e){l(n,B);var t=f(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than or equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return g(e)&&g(t)?e.getTime()>=t.getTime():e>=t}}]),n}(),J=function(e){l(n,B);var t=f(n);function n(){return a(this,n),t.apply(this,arguments)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be less than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return g(e)&&g(t)?e.getTime()0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),e.strict=!0,e.value=0,t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative."})}}]),n}(),q=function(e){l(n,z);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),e.strict=!0,e.value=0,t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative or zero."})}}]),n}(),Q=function(e){l(n,W);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),e.strict=!0,e.value=0,t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive."})}}]),n}(),ee=function(e){l(n,j);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),e.strict=!0,e.value=0,t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return u(u({},h(c(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive or zero."})}}]),n}(),te=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be null."}}},{key:"validate",value:function(e){if(!y(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),ne=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be null."}}},{key:"validate",value:function(e){if(y(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),ae="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ie=function(e){return!("undefined"!=typeof process||!process.env||!process.env[e])&&process.env[e]},re="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},oe=function(e,t){var n=ie,a="",i=[],r=0,o=function e(t){if(t instanceof RegExp)return new RegExp(t);if(t instanceof Date)return new Date(t);var n={};for(var a in t)"object"===re(t[a])?n[a]=e(t[a]):n[a]=t[a];return n},s="undefined"!=typeof window?window:ae;s.$locutus=s.$locutus||{};var u=s.$locutus;if(u.php=u.php||{},u.php.locales&&u.php.locales.fr_CA&&u.php.locales.fr_CA.LC_TIME&&u.php.locales.fr_CA.LC_TIME.x||(u.php.locales={},u.php.locales.en={LC_COLLATE:function(e,t){return e===t?0:e>t?1:-1},LC_CTYPE:{an:/^[A-Za-z\d]+$/g,al:/^[A-Za-z]+$/g,ct:/^[\u0000-\u001F\u007F]+$/g,dg:/^[\d]+$/g,gr:/^[\u0021-\u007E]+$/g,lw:/^[a-z]+$/g,pr:/^[\u0020-\u007E]+$/g,pu:/^[\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]+$/g,sp:/^[\f\n\r\t\v ]+$/g,up:/^[A-Z]+$/g,xd:/^[A-Fa-f\d]+$/g,CODESET:"UTF-8",lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"},LC_TIME:{a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %r %Z",p:["AM","PM"],P:["am","pm"],r:"%I:%M:%S %p",x:"%m/%d/%Y",X:"%r",alt_digits:"",ERA:"",ERA_YEAR:"",ERA_D_T_FMT:"",ERA_D_FMT:"",ERA_T_FMT:""},LC_MONETARY:{int_curr_symbol:"USD",currency_symbol:"$",mon_decimal_point:".",mon_thousands_sep:",",mon_grouping:[3],positive_sign:"",negative_sign:"-",int_frac_digits:2,frac_digits:2,p_cs_precedes:1,p_sep_by_space:0,n_cs_precedes:1,n_sep_by_space:0,p_sign_posn:3,n_sign_posn:0},LC_NUMERIC:{decimal_point:".",thousands_sep:",",grouping:[3]},LC_MESSAGES:{YESEXPR:"^[yY].*",NOEXPR:"^[nN].*",YESSTR:"",NOSTR:""},nplurals:function(e){return 1!==e?1:0}},u.php.locales.en_US=o(u.php.locales.en),u.php.locales.en_US.LC_TIME.c="%a %d %b %Y %r %Z",u.php.locales.en_US.LC_TIME.x="%D",u.php.locales.en_US.LC_TIME.X="%r",u.php.locales.en_US.LC_MONETARY.int_curr_symbol="USD ",u.php.locales.en_US.LC_MONETARY.p_sign_posn=1,u.php.locales.en_US.LC_MONETARY.n_sign_posn=1,u.php.locales.en_US.LC_MONETARY.mon_grouping=[3,3],u.php.locales.en_US.LC_NUMERIC.thousands_sep="",u.php.locales.en_US.LC_NUMERIC.grouping=[],u.php.locales.en_GB=o(u.php.locales.en),u.php.locales.en_GB.LC_TIME.r="%l:%M:%S %P %Z",u.php.locales.en_AU=o(u.php.locales.en_GB),u.php.locales.C=o(u.php.locales.en),u.php.locales.C.LC_CTYPE.CODESET="ANSI_X3.4-1968",u.php.locales.C.LC_MONETARY={int_curr_symbol:"",currency_symbol:"",mon_decimal_point:"",mon_thousands_sep:"",mon_grouping:[],p_cs_precedes:127,p_sep_by_space:127,n_cs_precedes:127,n_sep_by_space:127,p_sign_posn:127,n_sign_posn:127,positive_sign:"",negative_sign:"",int_frac_digits:127,frac_digits:127},u.php.locales.C.LC_NUMERIC={decimal_point:".",thousands_sep:"",grouping:[]},u.php.locales.C.LC_TIME.c="%a %b %e %H:%M:%S %Y",u.php.locales.C.LC_TIME.x="%m/%d/%y",u.php.locales.C.LC_TIME.X="%H:%M:%S",u.php.locales.C.LC_MESSAGES.YESEXPR="^[yY]",u.php.locales.C.LC_MESSAGES.NOEXPR="^[nN]",u.php.locales.fr=o(u.php.locales.en),u.php.locales.fr.nplurals=function(e){return e>1?1:0},u.php.locales.fr.LC_TIME.a=["dim","lun","mar","mer","jeu","ven","sam"],u.php.locales.fr.LC_TIME.A=["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],u.php.locales.fr.LC_TIME.b=["jan","fév","mar","avr","mai","jun","jui","aoû","sep","oct","nov","déc"],u.php.locales.fr.LC_TIME.B=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],u.php.locales.fr.LC_TIME.c="%a %d %b %Y %T %Z",u.php.locales.fr.LC_TIME.p=["",""],u.php.locales.fr.LC_TIME.P=["",""],u.php.locales.fr.LC_TIME.x="%d.%m.%Y",u.php.locales.fr.LC_TIME.X="%T",u.php.locales.fr_CA=o(u.php.locales.fr),u.php.locales.fr_CA.LC_TIME.x="%Y-%m-%d"),!u.php.locale&&(u.php.locale="en_US","undefined"!=typeof window&&window.document)){var l=window.document,c="https://www.w3.org/1999/xhtml",p="https://www.w3.org/XML/1998/namespace";l.getElementsByTagNameNS&&l.getElementsByTagNameNS(c,"html")[0]?l.getElementsByTagNameNS(c,"html")[0].getAttributeNS&&l.getElementsByTagNameNS(c,"html")[0].getAttributeNS(p,"lang")?u.php.locale=l.getElementsByTagName(c,"html")[0].getAttributeNS(p,"lang"):l.getElementsByTagNameNS(c,"html")[0].lang&&(u.php.locale=l.getElementsByTagNameNS(c,"html")[0].lang):l.getElementsByTagName("html")[0]&&l.getElementsByTagName("html")[0].lang&&(u.php.locale=l.getElementsByTagName("html")[0].lang)}if(u.php.locale=u.php.locale.replace("-","_"),u.php.locale in u.php.locales||u.php.locale.replace(/_[a-zA-Z]+$/,"")in u.php.locales&&(u.php.locale=u.php.locale.replace(/_[a-zA-Z]+$/,"")),u.php.localeCategories||(u.php.localeCategories={LC_COLLATE:u.php.locale,LC_CTYPE:u.php.locale,LC_MONETARY:u.php.locale,LC_NUMERIC:u.php.locale,LC_TIME:u.php.locale,LC_MESSAGES:u.php.locale}),null===t||""===t)t=n(e)||n("LANG");else if("[object Array]"===Object.prototype.toString.call(t))for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{};a(this,n),e=t.call(this,i);var r=["array","date","bool","boolean","function","float","integer","null","numeric","object","string","double","int","ctype_alnum","ctype_alpha","ctype_cntrl","ctype_digit","ctype_graph","ctype_lower","ctype_print","ctype_punct","ctype_space","ctype_upper","ctype_xdigit"];if(!r.includes(e.options.type))throw new Error("Invalid type provided: ".concat(e.options.type));return e}return r(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be of type {{ type }}."}}},{key:"getRequiredOptions",value:function(){return["type"]}},{key:"validate",value:function(e){var t,n=!1;switch(this.options.type){case"array":n=A(e);break;case"date":n=g(e);break;case"bool":case"boolean":n=!0===(t=e)||!1===t;break;case"function":n=E(e);break;case"float":case"double":n=T(e);break;case"int":case"integer":n=C(e);break;case"null":n=y(e);break;case"numeric":n=v(e);break;case"object":n=S(e);break;case"string":n=M(e);break;case"ctype_alnum":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.an)}(e);break;case"ctype_alpha":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.al)}(e);break;case"ctype_cntrl":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.ct)}(e);break;case"ctype_digit":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.dg)}(e);break;case"ctype_graph":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.gr)}(e);break;case"ctype_lower":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.lw)}(e);break;case"ctype_print":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pr)}(e);break;case"ctype_punct":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pu)}(e);break;case"ctype_space":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.sp)}(e);break;case"ctype_upper":n=se(e);break;case"ctype_xdigit":n=function(e){if("string"!=typeof e)return!1;oe("LC_ALL",0);var t="undefined"!=typeof window?window:ae;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.xd)}(e)}if(!n)return this.getViolationBuilder().setParameter("value",e).setParameter("type",this.options.type).build(this.options.message)}}],[{key:"TYPE_ARRAY",get:function(){return"array"}},{key:"TYPE_DATE",get:function(){return"date"}},{key:"TYPE_BOOL",get:function(){return"bool"}},{key:"TYPE_BOOLEAN",get:function(){return"boolean"}},{key:"TYPE_FUNCTION",get:function(){return"function"}},{key:"TYPE_FLOAT",get:function(){return"float"}},{key:"TYPE_DOUBLE",get:function(){return"double"}},{key:"TYPE_INT",get:function(){return"int"}},{key:"TYPE_INTEGER",get:function(){return"integer"}},{key:"TYPE_NULL",get:function(){return"null"}},{key:"TYPE_NUMERIC",get:function(){return"numeric"}},{key:"TYPE_OBJECT",get:function(){return"object"}},{key:"TYPE_STRING",get:function(){return"string"}},{key:"CTYPE_ALNUM",get:function(){return"ctype_alnum"}},{key:"CTYPE_ALPHA",get:function(){return"ctype_alpha"}},{key:"CTYPE_CNTRL",get:function(){return"ctype_cntrl"}},{key:"CTYPE_DIGIT",get:function(){return"ctype_digit"}},{key:"CTYPE_GRAPH",get:function(){return"ctype_graph"}},{key:"CTYPE_LOWER",get:function(){return"ctype_lower"}},{key:"CTYPE_PRINT",get:function(){return"ctype_print"}},{key:"CTYPE_PUNCT",get:function(){return"ctype_punct"}},{key:"CTYPE_SPACE",get:function(){return"ctype_space"}},{key:"CTYPE_UPPER",get:function(){return"ctype_upper"}},{key:"CTYPE_XDIGIT",get:function(){return"ctype_xdigit"}}]),n}(),le=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,i),!(e=t.call(this,r)).options.choices||!A(e.options.choices))throw new Error('Choices list should be type of "array", "'.concat(n(e.options.choices),'" given.'));return(e.options.min||e.options.max)&&(e.options.multiple=!0),e}return r(i,[{key:"getDefaultOptions",value:function(){return{multiple:!1,min:0,max:0,message:"The value you selected is not a valid choice.",message_min:"You must select at least {{ limit }} choices.",message_max:"You must select at most {{ limit }} choices.",message_multiple:"One or more of the given values is invalid."}}},{key:"getRequiredOptions",value:function(){return["choices"]}},{key:"validate",value:function(e){if(this.options.multiple&&!Array.isArray(e))return this.getViolationBuilder().build('Values list should be type of "array", "'.concat(n(e),'" given.'));if(!this.isEmptyValue(e))if(this.options.multiple){for(var t=0;t0&&e.length0&&e.length>this.options.max)return this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message_max)}else if(!this.options.choices.includes(e))return this.getViolationBuilder().setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message)}}]),i}(),ce='Provided value should be countable, "{{ type }}" given.',pe=function(e){l(i,O);var t=f(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,i),(e=t.call(this,n)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return r(i,[{key:"getDefaultOptions",value:function(){return{message_min:"This collection should contain {{ limit }} elements or more.",message_max:"This collection should contain {{ limit }} elements or less.",message_exact:"This collection should contain exactly {{ limit }} elements."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(null==(t=e)||M(t)||!(A(t)||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Map||t instanceof Set||t instanceof WeakMap||t instanceof WeakSet||t instanceof ArrayBuffer))return this.getViolationBuilder().setParameter("type",n(e)).build(ce);var t,a;switch(!0){case e.hasOwnProperty("size")||e instanceof Map||e instanceof Set:a=e.size;break;case e instanceof ArrayBuffer:a=e.byteLength;break;default:a=e.length}return void 0===a?this.getViolationBuilder().setParameter("type",n(e)).build(ce):null!==this.options.min&&this.options.min===this.options.max&&a!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&a>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&a0&&void 0!==arguments[0]?arguments[0]:{};return a(this,i),n.call(this,e)}return r(i,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid timezone."}}},{key:"validate",value:function(t){if(this.options.trim&&(t=L(t)),!this.isEmptyValue(t))return"string"==typeof t&&e.local().setZone(t).isValid?void 0:this.getViolationBuilder().setParameter("value",t).build(this.options.message)}}]),i}(),he=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,i),!(e=t.call(this,r)).options.value||!v(e.options.value))throw new Error('Value should be type of "number", "'.concat(n(e.options.value),'" given.'));return e}return r(i,[{key:"getDefaultOptions",value:function(){return{message:"This value should be a multiple of {{ compared_value }}.",message_type:'This values has different types. Given type is "{{ current_type }}"; Expected type is "{{ expected_type }}".'}}},{key:"getRequiredOptions",value:function(){return["value"]}},{key:"validate",value:function(e){if(!this.isEmptyValue(e))return v(e)?e%this.options.value!=0?this.getViolationBuilder().setParameter("compared_value",this.options.value).setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",this.options.value).setParameter("current_type",n(e)).setParameter("expected_type","number").build(this.options.message_type)}}]),i}();function _e(e,n){var a=t.parse(e);return"ipv4"===a.kind()&&!(("4_no_priv"===n||"all_no_priv"===n)&&"private"===a.range()||("4_no_res"===n||"all_no_res"===n)&&"reserved"===a.range()||("4_pub"===n||"all_pub"===n)&&("private"===a.range()||"reserved"===a.range()))}function me(e,n){var a=t.parse(e);return"ipv6"===a.kind()&&!(("6_no_priv"===n||"all_no_priv"===n)&&"uniqueLocal"===a.range()||("6_no_res"===n||"all_no_res"===n)&&"reserved"===a.range()||("6_pub"===n||"all_pub"===n)&&("uniqueLocal"===a.range()||"reserved"===a.range()))}var ve=function(e){l(i,O);var n=f(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,i),e=n.call(this,t);var r=["all","4","6","4_no_priv","6_no_priv","all_no_priv","4_no_res","6_no_res","all_no_res","4_pub","6_pub","all_pub"];if(!r.includes(e.options.version))throw new Error("Invalid validation version provided: ".concat(e.options.version));return e}return r(i,[{key:"getDefaultOptions",value:function(){return{trim:!0,version:"4",message:"This is not a valid IP address."}}},{key:"getRequiredOptions",value:function(){return["version"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),!("string"==typeof e&&0===e.length||"string"!=typeof e&&isNaN(e)||null==e)){if(!t.isValid(e)||!t.IPv4.isValidFourPartDecimal(e)&&!t.IPv6.isValid(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);switch(this.options.version){case"4":case"4_no_priv":case"4_no_res":case"4_pub":if(!_e(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"6":case"6_no_priv":case"6_no_res":case"6_pub":if(!me(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case"all_no_priv":case"all_no_res":case"all_pub":if(!_e(e,this.options.version)&&!me(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}}],[{key:"MODE_ALL",get:function(){return"all"}},{key:"MODE_V4",get:function(){return"4"}},{key:"MODE_V6",get:function(){return"6"}},{key:"MODE_V4_NO_PRIV",get:function(){return"4_no_priv"}},{key:"MODE_V6_NO_PRIV",get:function(){return"6_no_priv"}},{key:"MODE_ALL_NO_PRIV",get:function(){return"all_no_priv"}},{key:"MODE_V4_NO_RES",get:function(){return"4_no_res"}},{key:"MODE_V6_NO_RES",get:function(){return"6_no_res"}},{key:"MODE_ALL_NO_RES",get:function(){return"all_no_res"}},{key:"MODE_V4_PUB",get:function(){return"4_pub"}},{key:"MODE_V6_PUB",get:function(){return"6_pub"}},{key:"MODE_ALL_PUB",get:function(){return"all_pub"}}]),i}(),ge=["AB","AA","AF","AK","SQ","AM","AR","AN","HY","AS","AV","AE","AY","AZ","BM","BA","EU","BE","BN","BH","BI","BS","BR","BG","MY","CA","CH","CE","NY","ZH","ZH-HANS","ZH-HANT","CV","KW","CO","CR","HR","CS","DA","DV","NL","DZ","EN","EO","ET","EE","FO","FJ","FI","FR","FF","GL","GD","GV","KA","DE","EL","KL","GN","GU","HT","HA","HE","HZ","HI","HO","HU","IS","IO","IG","IN","IA","IE","IU","IK","GA","IT","JA","JV","KL","KN","KR","KS","KK","KM","KI","RW","RN","KY","KV","KG","KO","KU","KJ","LO","LA","LV","LI","LN","LT","LU","LG","LB","GV","MK","MG","MS","ML","MT","MI","MR","MH","MO","MN","NA","NV","NG","ND","NE","NO","NB","NN","II","OC","OJ","CU","OR","OM","OS","PI","PS","FA","PL","PT","PA","QU","RM","RO","RU","SE","SM","SG","SA","SR","SH","ST","TN","SN","II","SD","SI","SS","SK","SL","SO","NR","ES","SU","SW","SS","SV","TL","TY","TG","TA","TT","TE","TH","BO","TI","TO","TS","TR","TK","TW","UG","UK","UR","UZ","VE","VI","VO","WA","CY","WO","FY","XH","YI","YO","ZA","ZU"],ye=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid language."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),!this.isEmptyValue(e))return"string"==typeof e&&ge.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(),Ae=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,i),!E((e=t.call(this,r)).options.callback))throw new Error('Value should be type of "function", "'.concat(n(e.options.callback),'" given.'));return e}return r(i,[{key:"getDefaultOptions",value:function(){return{message:"This value is not a valid."}}},{key:"getRequiredOptions",value:function(){return["callback"]}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.options.callback(e,t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),i}(),Ee=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,i),"string"!=typeof(e=t.call(this,r)).options.pattern&&!(e.options.pattern instanceof RegExp))throw new Error('Pattern should be type of "string", '.concat(n(e.options.pattern)," given."));return e}return r(i,[{key:"getDefaultOptions",value:function(){return{trim:!1,match:!0,message:"This value is not valid."}}},{key:"getRequiredOptions",value:function(){return["pattern"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),!this.isEmptyValue(e)){if("string"!=typeof e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);var t=new RegExp(this.options.pattern);return this.options.match&&!t.test(e)||!this.options.match&&t.test(e)?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),i}(),Te=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,i);var o=!(void 0===(e=t.call(this,r)).options.min||null===e.options.min),s=!(void 0===e.options.max||null===e.options.max);if(o&&!v(e.options.min)&&!g(e.options.min))throw new Error('Min limit should be type of "number" or "Date", "'.concat(n(e.options.min),'" given.'));if(s&&!v(e.options.max)&&!g(e.options.max))throw new Error('Max limit should be type of "number" or "Date", "'.concat(n(e.options.max),'" given.'));if(o&&s){if(v(e.options.min)&&!v(e.options.max))throw new Error('Max limit should be type of "number", "'.concat(n(e.options.max),'" given.'));if(g(e.options.min)&&!g(e.options.max))throw new Error('Max limit should be type of "Date", "'.concat(n(e.options.max),'" given.'))}return e.options.min=v(e.options.min)?parseFloat(e.options.min):e.options.min,e.options.max=v(e.options.max)?parseFloat(e.options.max):e.options.max,e}return r(i,[{key:"getDefaultOptions",value:function(){return{message_min:"This value should be {{ limit }} or more.",message_max:"This value should be {{ limit }} or less.",message:"This value should be between {{ min }} and {{ max }}."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){(g(this.options.min)||g(this.options.max))&&(e="now"===e?new Date:new Date(e));var t=!(void 0===this.options.min||null===this.options.min),n=!(void 0===this.options.max||null===this.options.max);return this.isEmptyValue(e)||t&&n&&(ethis.options.max)||!g(this.options.min)&&!g(this.options.max)&&g(e)?this.getViolationBuilder().setParameter("min",g(this.options.min)?this.formatDateValue(this.options.min):this.options.min).setParameter("max",g(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",g(e)?this.formatDateValue(e):e).build(this.options.message):t&&ethis.options.max?this.getViolationBuilder().setParameter("limit",g(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",g(e)?this.formatDateValue(e):e).build(this.options.message_max):void 0}}]),i}(),Ce=["af","af_NA","af_ZA","ak","ak_GH","am","am_ET","ar","ar_AE","ar_BH","ar_DJ","ar_DZ","ar_EG","ar_EH","ar_ER","ar_IL","ar_IQ","ar_JO","ar_KM","ar_KW","ar_LB","ar_LY","ar_MA","ar_MR","ar_OM","ar_PS","ar_QA","ar_SA","ar_SD","ar_SO","ar_SS","ar_SY","ar_TD","ar_TN","ar_YE","as","as_IN","az","az_AZ","az_Cyrl","az_Cyrl_AZ","az_Latn","az_Latn_AZ","be","be_BY","bg","bg_BG","bm","bm_ML","bn","bn_BD","bn_IN","bo","bo_CN","bo_IN","br","br_FR","bs","bs_BA","bs_Cyrl","bs_Cyrl_BA","bs_Latn","bs_Latn_BA","ca","ca_AD","ca_ES","ca_FR","ca_IT","ce","ce_RU","cs","cs_CZ","cy","cy_GB","da","da_DK","da_GL","de","de_AT","de_BE","de_CH","de_DE","de_IT","de_LI","de_LU","dz","dz_BT","ee","ee_GH","ee_TG","el","el_CY","el_GR","en","en_AE","en_AG","en_AI","en_AS","en_AT","en_AU","en_BB","en_BE","en_BI","en_BM","en_BS","en_BW","en_BZ","en_CA","en_CC","en_CH","en_CK","en_CM","en_CX","en_CY","en_DE","en_DK","en_DM","en_ER","en_FI","en_FJ","en_FK","en_FM","en_GB","en_GD","en_GG","en_GH","en_GI","en_GM","en_GU","en_GY","en_HK","en_IE","en_IL","en_IM","en_IN","en_IO","en_JE","en_JM","en_KE","en_KI","en_KN","en_KY","en_LC","en_LR","en_LS","en_MG","en_MH","en_MO","en_MP","en_MS","en_MT","en_MU","en_MW","en_MY","en_NA","en_NF","en_NG","en_NL","en_NR","en_NU","en_NZ","en_PG","en_PH","en_PK","en_PN","en_PR","en_PW","en_RW","en_SB","en_SC","en_SD","en_SE","en_SG","en_SH","en_SI","en_SL","en_SS","en_SX","en_SZ","en_TC","en_TK","en_TO","en_TT","en_TV","en_TZ","en_UG","en_UM","en_US","en_VC","en_VG","en_VI","en_VU","en_WS","en_ZA","en_ZM","en_ZW","eo","es","es_AR","es_BO","es_BR","es_BZ","es_CL","es_CO","es_CR","es_CU","es_DO","es_EC","es_ES","es_GQ","es_GT","es_HN","es_MX","es_NI","es_PA","es_PE","es_PH","es_PR","es_PY","es_SV","es_US","es_UY","es_VE","et","et_EE","eu","eu_ES","fa","fa_AF","fa_IR","ff","ff_CM","ff_GN","ff_Latn","ff_Latn_BF","ff_Latn_CM","ff_Latn_GH","ff_Latn_GM","ff_Latn_GN","ff_Latn_GW","ff_Latn_LR","ff_Latn_MR","ff_Latn_NE","ff_Latn_NG","ff_Latn_SL","ff_Latn_SN","ff_MR","ff_SN","fi","fi_FI","fo","fo_DK","fo_FO","fr","fr_BE","fr_BF","fr_BI","fr_BJ","fr_BL","fr_CA","fr_CD","fr_CF","fr_CG","fr_CH","fr_CI","fr_CM","fr_DJ","fr_DZ","fr_FR","fr_GA","fr_GF","fr_GN","fr_GP","fr_GQ","fr_HT","fr_KM","fr_LU","fr_MA","fr_MC","fr_MF","fr_MG","fr_ML","fr_MQ","fr_MR","fr_MU","fr_NC","fr_NE","fr_PF","fr_PM","fr_RE","fr_RW","fr_SC","fr_SN","fr_SY","fr_TD","fr_TG","fr_TN","fr_VU","fr_WF","fr_YT","fy","fy_NL","ga","ga_GB","ga_IE","gd","gd_GB","gl","gl_ES","gu","gu_IN","gv","gv_IM","ha","ha_GH","ha_NE","ha_NG","he","he_IL","hi","hi_IN","hr","hr_BA","hr_HR","hu","hu_HU","hy","hy_AM","ia","id","id_ID","ig","ig_NG","ii","ii_CN","is","is_IS","it","it_CH","it_IT","it_SM","it_VA","ja","ja_JP","jv","jv_ID","ka","ka_GE","ki","ki_KE","kk","kk_KZ","kl","kl_GL","km","km_KH","kn","kn_IN","ko","ko_KP","ko_KR","ks","ks_IN","ku","ku_TR","kw","kw_GB","ky","ky_KG","lb","lb_LU","lg","lg_UG","ln","ln_AO","ln_CD","ln_CF","ln_CG","lo","lo_LA","lt","lt_LT","lu","lu_CD","lv","lv_LV","mg","mg_MG","mi","mi_NZ","mk","mk_MK","ml","ml_IN","mn","mn_MN","mr","mr_IN","ms","ms_BN","ms_MY","ms_SG","mt","mt_MT","my","my_MM","nb","nb_NO","nb_SJ","nd","nd_ZW","ne","ne_IN","ne_NP","nl","nl_AW","nl_BE","nl_BQ","nl_CW","nl_NL","nl_SR","nl_SX","nn","nn_NO","no","no_NO","om","om_ET","om_KE","or","or_IN","os","os_GE","os_RU","pa","pa_Arab","pa_Arab_PK","pa_Guru","pa_Guru_IN","pa_IN","pa_PK","pl","pl_PL","ps","ps_AF","ps_PK","pt","pt_AO","pt_BR","pt_CH","pt_CV","pt_GQ","pt_GW","pt_LU","pt_MO","pt_MZ","pt_PT","pt_ST","pt_TL","qu","qu_BO","qu_EC","qu_PE","rm","rm_CH","rn","rn_BI","ro","ro_MD","ro_RO","ru","ru_BY","ru_KG","ru_KZ","ru_MD","ru_RU","ru_UA","rw","rw_RW","sd","sd_PK","se","se_FI","se_NO","se_SE","sg","sg_CF","sh","sh_BA","si","si_LK","sk","sk_SK","sl","sl_SI","sn","sn_ZW","so","so_DJ","so_ET","so_KE","so_SO","sq","sq_AL","sq_MK","sr","sr_BA","sr_Cyrl","sr_Cyrl_BA","sr_Cyrl_ME","sr_Cyrl_RS","sr_Latn","sr_Latn_BA","sr_Latn_ME","sr_Latn_RS","sr_ME","sr_RS","sv","sv_AX","sv_FI","sv_SE","sw","sw_CD","sw_KE","sw_TZ","sw_UG","ta","ta_IN","ta_LK","ta_MY","ta_SG","te","te_IN","tg","tg_TJ","th","th_TH","ti","ti_ER","ti_ET","tk","tk_TM","tl","tl_PH","to","to_TO","tr","tr_CY","tr_TR","tt","tt_RU","ug","ug_CN","uk","uk_UA","ur","ur_IN","ur_PK","uz","uz_AF","uz_Arab","uz_Arab_AF","uz_Cyrl","uz_Cyrl_UZ","uz_Latn","uz_Latn_UZ","uz_UZ","vi","vi_VN","wo","wo_SN","xh","xh_ZA","yi","yo","yo_BJ","yo_NG","zh","zh_CN","zh_HK","zh_Hans","zh_Hans_CN","zh_Hans_HK","zh_Hans_MO","zh_Hans_SG","zh_Hant","zh_Hant_HK","zh_Hant_MO","zh_Hant_TW","zh_MO","zh_SG","zh_TW","zu","zu_ZA"],Se=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid locale."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),!this.isEmptyValue(e)){var t=P.canonicalize(e);return"string"==typeof t&&Ce.includes(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}();function Me(e){if(!/^[\d|X]+$/.test(e)||10!==e.length)return!1;for(var t=0,n=0;n<10;n++){t+=("X"===e.charAt(n)?10:parseInt(e.charAt(n)))*(10-n)}return t%11==0}function Le(e){if(!v(e)||13!==e.length)return!1;for(var t=0,n=0;n<13;n+=2)t+=parseInt(e.charAt(n));for(var a=1;a<12;a+=2)t+=3*parseInt(e.charAt(a));return t%10==0}var be,Re=function(e){l(n,O);var t=f(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,n);var r=[null,"isbn10","isbn13"],o=null===(e=t.call(this,i)).options.mode?null:e.options.mode.toLowerCase();if(!r.includes(o))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:null,message:"This value is neither a valid ISBN-10 nor a valid ISBN-13.",message_isbn10:"This value is not a valid ISBN-10.",message_isbn13:"This value is not a valid ISBN-13."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/-/g,"",e).toUpperCase();return"isbn10"===this.options.mode?Me(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn10):"isbn13"!==this.options.mode||Le(t)?Me(t)||Le(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message):this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn13)}}}],[{key:"MODE_ALL",get:function(){return null}},{key:"MODE_ISBN_10",get:function(){return"isbn10"}},{key:"MODE_ISBN_13",get:function(){return"isbn13"}}]),n}(),Pe=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!1,case_sensitive:!1,hyphen:!1,message:"This value is not a valid ISSN."}}},{key:"validate",value:function(e){if("string"==typeof e&&!this.isEmptyValue(e)){var t=e=this.options.trim?L(e):e;if(t.length>4&&"-"===t.charAt(4))t=t.replace(/-/g,"");else if(this.options.hyphen)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(8!==t.length||this.options.case_sensitive&&!/^\d{7}[X|0-9]$/.test(t)||!this.options.case_sensitive&&!/^\d{7}[xX|0-9]$/.test(t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var n="x"===t.charAt(7)||"X"===t.charAt(7)?10:parseInt(t.charAt(7)),a=0;a<7;++a)n+=(8-a)*parseInt(t.charAt(a));return n%11!=0?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(),Ne=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Invalid card number."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),!this.isEmptyValue(e)){if(/[^0-9-\s]+/.test(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var t=e.toString().replace(/\D/g,""),n=0,a=t.length-1;a>=0;a-=2)n+=parseInt(t.charAt(a));for(var i=t.length-2;i>=0;i-=2)n+=(2*parseInt(t.charAt(i))).toString().split("").reduce((function(e,t){return parseInt(e)+parseInt(t)}),0);return 0===n||0!=n%10?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(),Oe=(o(be={},"AMEX",[/^3[47][0-9]{13}$/]),o(be,"CHINA_UNIONPAY",[/^62[0-9]{14,17}$/]),o(be,"DINERS",[/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/]),o(be,"DISCOVER",[/^6011[0-9]{12}$/,/^64[4-9][0-9]{13}$/,/^65[0-9]{14}$/,/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/]),o(be,"INSTAPAYMENT",[/^63[7-9][0-9]{13}$/]),o(be,"JCB",[/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/]),o(be,"LASER",[/^(6304|670[69]|6771)[0-9]{12,15}$/]),o(be,"MAESTRO",[/^(6759[0-9]{2})[0-9]{6,13}$/,/^(50[0-9]{4})[0-9]{6,13}$/,/^5[6-9][0-9]{10,17}$/,/^6[0-9]{11,18}$/]),o(be,"MASTERCARD",[/^5[1-5][0-9]{14}$/,/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/]),o(be,"MIR",[/^220[0-4][0-9]{12}$/]),o(be,"UATP",[/^1[0-9]{14}$/]),o(be,"VISA",[/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/]),be),Be=function(e){l(i,O);var t=f(i);function i(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(a(this,i),(e=t.call(this,r)).options.schemas=M(e.options.schemas)?[e.options.schemas]:e.options.schemas,!A(e.options.schemas))throw new Error('Value should be type of "array" or "string", "'.concat(n(e.options.schemas),'" given.'));if(0===e.options.schemas.length)throw new Error("The schemas list cannot be empty.");var o=Object.keys(Oe),s=e.options.schemas.filter((function(e){return o.includes(e.toUpperCase())}));if(s.length!==e.options.schemas.length)throw new Error("The schemas list contains one or more unsupported elements.");return e}return r(i,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Unsupported card type or invalid card number."}}},{key:"getRequiredOptions",value:function(){return["schemas"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),!this.isEmptyValue(e)){if(v(e)){var t,n=m(this.options.schemas);try{for(n.s();!(t=n.n()).done;){var a,i=t.value,r=m(Oe[i]);try{for(r.s();!(a=r.n()).done;){if(a.value.test(e))return}}catch(e){r.e(e)}finally{r.f()}}}catch(e){n.e(e)}finally{n.f()}}return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"SCHEMA_AMEX",get:function(){return"AMEX"}},{key:"SCHEMA_CHINA_UNIONPAY",get:function(){return"CHINA_UNIONPAY"}},{key:"SCHEMA_DINERS",get:function(){return"DINERS"}},{key:"SCHEMA_DISCOVER",get:function(){return"DISCOVER"}},{key:"SCHEMA_INSTAPAYMENT",get:function(){return"INSTAPAYMENT"}},{key:"SCHEMA_JCB",get:function(){return"JCB"}},{key:"SCHEMA_LASER",get:function(){return"LASER"}},{key:"SCHEMA_MAESTRO",get:function(){return"MAESTRO"}},{key:"SCHEMA_MASTERCARD",get:function(){return"MASTERCARD"}},{key:"SCHEMA_MIR",get:function(){return"MIR"}},{key:"SCHEMA_UATP",get:function(){return"UATP"}},{key:"SCHEMA_VISA",get:function(){return"VISA"}}]),i}(),Ie={AD:/^AD\d{2}\d{4}\d{4}[\dA-Z]{12}$/,AE:/^AE\d{2}\d{3}\d{16}$/,AL:/^AL\d{2}\d{8}[\dA-Z]{16}$/,AO:/^AO\d{2}\d{21}$/,AT:/^AT\d{2}\d{5}\d{11}$/,AX:/^FI\d{2}\d{6}\d{7}\d{1}$/,AZ:/^AZ\d{2}[A-Z]{4}[\dA-Z]{20}$/,BA:/^BA\d{2}\d{3}\d{3}\d{8}\d{2}$/,BE:/^BE\d{2}\d{3}\d{7}\d{2}$/,BF:/^BF\d{2}\d{23}$/,BG:/^BG\d{2}[A-Z]{4}\d{4}\d{2}[\dA-Z]{8}$/,BH:/^BH\d{2}[A-Z]{4}[\dA-Z]{14}$/,BI:/^BI\d{2}\d{12}$/,BJ:/^BJ\d{2}[A-Z]{1}\d{23}$/,BY:/^BY\d{2}[\dA-Z]{4}\d{4}[\dA-Z]{16}$/,BL:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,BR:/^BR\d{2}\d{8}\d{5}\d{10}[A-Z][\dA-Z]$/,CG:/^CG\d{2}\d{23}$/,CH:/^CH\d{2}\d{5}[\dA-Z]{12}$/,CI:/^CI\d{2}[A-Z]{1}\d{23}$/,CM:/^CM\d{2}\d{23}$/,CR:/^CR\d{2}0\d{3}\d{14}$/,CV:/^CV\d{2}\d{21}$/,CY:/^CY\d{2}\d{3}\d{5}[\dA-Z]{16}$/,CZ:/^CZ\d{2}\d{20}$/,DE:/^DE\d{2}\d{8}\d{10}$/,DO:/^DO\d{2}[\dA-Z]{4}\d{20}$/,DK:/^DK\d{2}\d{4}\d{10}$/,DZ:/^DZ\d{2}\d{20}$/,EE:/^EE\d{2}\d{2}\d{2}\d{11}\d{1}$/,ES:/^ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}$/,FI:/^FI\d{2}\d{6}\d{7}\d{1}$/,FO:/^FO\d{2}\d{4}\d{9}\d{1}$/,FR:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GB:/^GB\d{2}[A-Z]{4}\d{6}\d{8}$/,GE:/^GE\d{2}[A-Z]{2}\d{16}$/,GI:/^GI\d{2}[A-Z]{4}[\dA-Z]{15}$/,GL:/^GL\d{2}\d{4}\d{9}\d{1}$/,GP:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GR:/^GR\d{2}\d{3}\d{4}[\dA-Z]{16}$/,GT:/^GT\d{2}[\dA-Z]{4}[\dA-Z]{20}$/,HR:/^HR\d{2}\d{7}\d{10}$/,HU:/^HU\d{2}\d{3}\d{4}\d{1}\d{15}\d{1}$/,IE:/^IE\d{2}[A-Z]{4}\d{6}\d{8}$/,IL:/^IL\d{2}\d{3}\d{3}\d{13}$/,IR:/^IR\d{2}\d{22}$/,IS:/^IS\d{2}\d{4}\d{2}\d{6}\d{10}$/,IT:/^IT\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,JO:/^JO\d{2}[A-Z]{4}\d{4}[\dA-Z]{18}$/,KW:/^KW\d{2}[A-Z]{4}\d{22}$/,KZ:/^KZ\d{2}\d{3}[\dA-Z]{13}$/,LB:/^LB\d{2}\d{4}[\dA-Z]{20}$/,LI:/^LI\d{2}\d{5}[\dA-Z]{12}$/,LT:/^LT\d{2}\d{5}\d{11}$/,LU:/^LU\d{2}\d{3}[\dA-Z]{13}$/,LV:/^LV\d{2}[A-Z]{4}[\dA-Z]{13}$/,MC:/^MC\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MD:/^MD\d{2}[\dA-Z]{2}[\dA-Z]{18}$/,ME:/^ME\d{2}\d{3}\d{13}\d{2}$/,MF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MG:/^MG\d{2}\d{23}$/,MK:/^MK\d{2}\d{3}[\dA-Z]{10}\d{2}$/,ML:/^ML\d{2}[A-Z]{1}\d{23}$/,MQ:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MR:/^MR13\d{5}\d{5}\d{11}\d{2}$/,MT:/^MT\d{2}[A-Z]{4}\d{5}[\dA-Z]{18}$/,MU:/^MU\d{2}[A-Z]{4}\d{2}\d{2}\d{12}\d{3}[A-Z]{3}$/,MZ:/^MZ\d{2}\d{21}$/,NC:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,NL:/^NL\d{2}[A-Z]{4}\d{10}$/,NO:/^NO\d{2}\d{4}\d{6}\d{1}$/,PF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PK:/^PK\d{2}[A-Z]{4}[\dA-Z]{16}$/,PL:/^PL\d{2}\d{8}\d{16}$/,PM:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PS:/^PS\d{2}[A-Z]{4}[\dA-Z]{21}$/,PT:/^PT\d{2}\d{4}\d{4}\d{11}\d{2}$/,QA:/^QA\d{2}[A-Z]{4}[\dA-Z]{21}$/,RE:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,RO:/^RO\d{2}[A-Z]{4}[\dA-Z]{16}$/,RS:/^RS\d{2}\d{3}\d{13}\d{2}$/,SA:/^SA\d{2}\d{2}[\dA-Z]{18}$/,SE:/^SE\d{2}\d{3}\d{16}\d{1}$/,SI:/^SI\d{2}\d{5}\d{8}\d{2}$/,SK:/^SK\d{2}\d{4}\d{6}\d{10}$/,SM:/^SM\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,SN:/^SN\d{2}[A-Z]{1}\d{23}$/,TF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,TL:/^TL\d{2}\d{3}\d{14}\d{2}$/,TN:/^TN59\d{2}\d{3}\d{13}\d{2}$/,TR:/^TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}$/,UA:/^UA\d{2}\d{6}[\dA-Z]{19}$/,VA:/^VA\d{2}\d{3}\d{15}$/,VG:/^VG\d{2}[A-Z]{4}\d{16}$/,WF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,XK:/^XK\d{2}\d{4}\d{10}\d{2}$/,YT:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/};var ke=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid International Bank Account Number (IBAN)."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=L(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/ /g,"",e.toUpperCase()),n=t.substring(0,2);return/^[A-Z0-9]+$/.test(t)&&function(e){return void 0!==G.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(n)&&void 0!==Ie[n]&&Ie[n].test(t)?1!==function(e){var t=0;return function(e,t){if(null===t&&(t=1),null===e||t<1)return!1;for(var n=[],a=0,i=(e+="").length;a=55296&&n<=56319){var a=n;return 1===t.length?n:1024*(a-55296)+(t.charCodeAt(1)-56320)+65536}return n}(e)-55:t+=e})),t}(t.substring(4)+t.substring(0,4)))?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(),De={GF:"FR",PF:"FR",TF:"FR",GP:"FR",MQ:"FR",YT:"FR",NC:"FR",RE:"FR",PM:"FR",WF:"FR",JE:"GB",IM:"GB",GG:"GB",VG:"GB"};function Ge(e){return void 0!==G.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}var we=function(e){l(n,O);var t=f(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(this,n),t.call(this,e)}return r(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid Business Identifier Code (BIC).",message_iban:"This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.",iban_path:null}}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{form:{}};if(this.options.trim&&(e=L(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var n=e.replace(/ /g,"",e);if(!([8,11].includes(n.length)&&/^[A-Z0-9]+$/.test(n)&&/^[A-Z]{4}/.test(n)&&Ge(n.substring(4,6))))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(null!==this.options.iban_path&&M(this.options.iban_path)){var a=t.form[this.options.iban_path];if(this.isEmptyValue(a))return;var i=a.substring(0,2),r=n.substring(4,6);if(i===r||i===De[r])return;return this.getViolationBuilder().setParameter("value",e).setParameter("iban",a).build(this.options.message_iban)}}}}]),n}(),Ue=function(){function e(){a(this,e)}return r(e,[{key:"validate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[];return A(t)?(t.forEach((function(t){if(!(t instanceof O))return!1;var i=t.validate(e,n);void 0!==i&&a.push(i)})),a):a}}]),e}(),Ve=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),o(this,"constraints",[]),o(this,"options",{}),o(this,"transformers",[]),o(this,"reversTransformers",[]),this.constraints=t,this.options=n}return r(e,[{key:"getMappedFieldName",value:function(e){return"string"==typeof this.options.map_name&&this.options.map_name.length>0?this.options.map_name:e}},{key:"getConstraints",value:function(){return this.constraints}},{key:"getOptions",value:function(){return this.options}},{key:"getTransformers",value:function(){return this.transformers}},{key:"getReverseTransformers",value:function(){return this.reversTransformers}},{key:"addTransformer",value:function(e){if(!E(e))throw new Error('Transformer must be type of "function", '.concat(n(e)," given."));return this.transformers.push(e),this}},{key:"addReverseTransformer",value:function(e){if(!E(e))throw new Error('Transformer must be type of "function", '.concat(n(e)," given."));return this.reversTransformers.push(e),this}},{key:"resetTransformers",value:function(){return this.transformers=[],this}},{key:"resetReverseTransformers",value:function(){return this.reversTransformers=[],this}}]),e}(),Ze=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),o(this,"validator",void 0),o(this,"violationBuilder",void 0),o(this,"fields",{}),o(this,"data",{}),o(this,"errors",{}),o(this,"transformers",[]),o(this,"reversTransformers",[]),this.options=u(u({},{extra_fields:!1,extra_fields_message:"This form should not contain extra fields."}),t),this.validator=new Ue,this.violationBuilder=new R}return r(e,[{key:"add",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof e)throw new Error('The field should be type of "string", "'.concat(n(e),'" given.'));if(0===e.length)throw new Error("The field name is too short.");if(void 0!==t&&!A(t))throw new Error('The constants should be type of "array", "'.concat(n(t),'" given.'));if(void 0!==this.fields[e])throw new Error("The field ".concat(e," already exists in this form."));return this.fields[e]=new Ve(A(t)?t:[],u(u({},{}),a)),this}},{key:"validate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.errors={},this.data=t,this.options.extra_fields||this.checkExtraFields(),Object.keys(this.errors).length>0||(this.data=b(this.transformers)(this.data,n),Object.keys(this.fields).forEach((function(t){var a=e.fields[t],i=u(u({},n),{field:a.getOptions(),form:e});e.data[t]=b(a.getTransformers())(e.data[t],i);var r=e.validator.validate(e.data[t],a.getConstraints(),i);r.length>0&&e.addValidationErrors(a.getMappedFieldName(t),r),e.data[t]=b(a.getReverseTransformers())(e.data[t],i)})),this.data=b(this.reversTransformers)(this.data,n)),this.errors}},{key:"addValidationErrors",value:function(e,t){return A(this.errors[e])||(this.errors[e]=[]),A(t)?this.errors[e]=this.errors[e].concat(t):this.errors[e].push(t),this}},{key:"checkExtraFields",value:function(){for(var e=0,t=Object.keys(this.data);ee.length)&&(t=e.length);for(var n=0,a=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function y(e){return t=e,n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),("number"==typeof t||"string"==typeof t&&-1===n.indexOf(t.slice(-1)))&&""!==t&&!isNaN(t);var t,n}function A(e){return"[object Date]"===Object.prototype.toString.call(e)&&e instanceof Date}function E(e){return null===e}function T(e){return Array.isArray(e)}function C(e){return"function"==typeof e}function L(e){return!(+(t=e)!==t||isFinite(t)&&!(t%1));var t}function M(e){return(t=e)===+t&&isFinite(t)&&!(t%1);var t}function S(e){return"[object Array]"!==Object.prototype.toString.call(e)&&null!==e&&("object"===i(e)&&e===Object(e))}function b(e){return"string"==typeof e}function R(e){return"string"!=typeof e?e:function(e,t){var n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),a=0,i=0;for(e+="",t&&(n=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),a=e.length,i=0;i=0;i--)if(-1===n.indexOf(e.charAt(i))){e=e.substring(0,i+1);break}return-1===n.indexOf(e.charAt(0))?e:""}(e,[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," ","\0"].join(""))}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!T(e))throw new Error('Functions list must be type of "array", "'.concat(i(e),'" given.'));return e=e.filter((function(e){return C(e)})),function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 0===e.length?n:e.reduce((function(e,n){return n(e,c(c({},t),a))}),n)}}var N=function(){function e(){r(this,e),this.parameters={}}return s(e,[{key:"setParameter",value:function(e,t){if("string"!=typeof e||0===e.length)throw new Error("Invalid parameter name was provided: "+JSON.stringify(e));switch(!0){case void 0===t:t="undefined";break;case S(t):case T(t):try{t=JSON.stringify(t)}catch(e){t=t.toString()}break;case isNaN(t)&&"string"!=typeof t:t="NaN";break;case C(t):t="function() {}";break;case E(t):t="null";break;default:t+=""}return this.parameters["{{ ".concat(e," }}")]=t.toString(),this}},{key:"build",value:function(e){var t=this;if("string"!=typeof e)throw new Error("Invalid error message was provided.");return Object.keys(this.parameters).forEach((function(n){e=e.replace(n,t.parameters[n])})),this.parameters={},Error(e)}}]),e}(),O="en-US";var B=function(){function e(t){r(this,e),this.fallback=t||O}return s(e,[{key:"getUserLocales",value:function(){return e=this.fallback,t=[],"undefined"!=typeof window&&(window.navigator.languages&&(t=t.concat(window.navigator.languages)),window.navigator.language&&t.push(window.navigator.language),window.navigator.userLanguage&&t.push(window.navigator.userLanguage),window.navigator.browserLanguage&&t.push(window.navigator.browserLanguage),window.navigator.systemLanguage&&t.push(window.navigator.systemLanguage)),t.push(e),t.filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){if(!e||-1===e.indexOf("-")||e.toLowerCase()!==e)return e;var t=e.split("-");return"".concat(t[0],"-").concat(t[1].toUpperCase())}));var e,t}},{key:"getUserLocale",value:function(){return this.getUserLocales()[0]}}],[{key:"canonicalize",value:function(e){if("string"!=typeof e||0===e.length||"."===e.charAt(0))return O;var t=e.match(/^([a-z]{2})[-_]([a-z]{2})(?:([a-z]{2})(?:[-_]([a-z]{2}))?)?(?:\..*)?$/i);if(null===t)return e;var n,a=[t[1].toLowerCase()];return void 0===t[3]?a.push(t[2].toUpperCase()):a.push((n=t[2].toLowerCase()+t[3].toLowerCase(),(n+="").charAt(0).toUpperCase()+n.substr(1))),void 0!==t[4]&&a.push(t[4].toUpperCase()),a.join("_")}},{key:"DEFAULT_LOCALE",get:function(){return O}}]),e}(),k=new B,I=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.options=c(c({},this.getDefaultOptions()),n),this.getRequiredOptions().forEach((function(e){if(void 0===t.options[e])throw new Error('No "'.concat(e,'" option is configured.'))})),this.locale_string=this.options.locale_string||k.getUserLocale(),this.locale_options=this.options.locale_options||{},this.violationBuilder=new N}return s(e,[{key:"getDefaultOptions",value:function(){return{}}},{key:"getRequiredOptions",value:function(){return[]}},{key:"getViolationBuilder",value:function(){return this.violationBuilder}},{key:"validate",value:function(e,t){throw new Error("The validate() method was not implemented")}},{key:"isEmptyValue",value:function(e){return"string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==i(e)&&"function"!=typeof e&&isNaN(e)||null==e}},{key:"formatDateValue",value:function(e){return new Intl.DateTimeFormat(this.locale_string,this.locale_options).format(e)}}]),e}(),D=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),(e=t.call(this,a)).options.strict=!!e.options.strict,e}return s(n,[{key:"getDefaultOptions",value:function(){return{strict:!1,message_strict:"This values has different types. Given type is {{ value_type }}; Expected type is {{ compared_type }}."}}},{key:"getRequiredOptions",value:function(){return["value","strict"]}},{key:"compare",value:function(e,t){throw new Error("The compare() method was not implemented")}},{key:"validate",value:function(e){var t=this.options.value;return this.options.strict&&i(t)!==i(e)?this.getViolationBuilder().setParameter("value_type",A(e)?"Date object":i(e)).setParameter("compared_type",A(t)?"Date object":i(t)).build(this.options.message_strict):(A(t)&&(e="now"===e?new Date:new Date(e)),this.compare(e,t)?void 0:(e=A(e)?this.formatDateValue(e):e,t=A(t)?this.formatDateValue(t):t,this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",t).setParameter("compared_value_type",i(t)).build(this.options.message)))}}]),n}(I),G=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),(e=t.call(this,a)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message_min:"This value is too short. It should have {{ limit }} character(s) or more.",message_max:"This value is too long. It should have {{ limit }} character(s) or less.",message_exact:"This value should have exactly {{ limit }} character(s)."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),"string"==typeof e){var t=e.length;return null!==this.options.min&&this.options.min===this.options.max&&t!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&t>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&t0&&void 0!==arguments[0]?arguments[0]:{};r(this,n),e=t.call(this,a);var i=[w,U,V];if(!i.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:U,message:"This value is not valid email."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case w:if(!function(e){return/^.+@\S+\.\S+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case U:if(!function(e){return/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case V:if(!function(e){var t=document.createElement("input");return t.setAttribute("type","email"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_SIMPLE",get:function(){return w}},{key:"MODE_HTML5",get:function(){return U}},{key:"MODE_HTML5_INPUT",get:function(){return V}}]),n}(I),$=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be blank."}}},{key:"validate",value:function(e){if("string"==typeof e&&e.length>0||"string"!=typeof e&&"object"!==i(e)&&!isNaN(e)&&null!=e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),F=[{a2:"AF",a3:"AFG",n:"004"},{a2:"AX",a3:"ALA",n:"248"},{a2:"AL",a3:"ALB",n:"008"},{a2:"DZ",a3:"DZA",n:"012"},{a2:"AS",a3:"ASM",n:"016"},{a2:"AD",a3:"AND",n:"020"},{a2:"AO",a3:"AGO",n:"024"},{a2:"AI",a3:"AIA",n:"660"},{a2:"AQ",a3:"ATA",n:"010"},{a2:"AG",a3:"ATG",n:"028"},{a2:"AR",a3:"ARG",n:"032"},{a2:"AM",a3:"ARM",n:"051"},{a2:"AW",a3:"ABW",n:"533"},{a2:"AU",a3:"AUS",n:"036"},{a2:"AT",a3:"AUT",n:"040"},{a2:"AZ",a3:"AZE",n:"031"},{a2:"BS",a3:"BHS",n:"044"},{a2:"BH",a3:"BHR",n:"048"},{a2:"BD",a3:"BGD",n:"050"},{a2:"BB",a3:"BRB",n:"052"},{a2:"BY",a3:"BLR",n:"112"},{a2:"BE",a3:"BEL",n:"056"},{a2:"BZ",a3:"BLZ",n:"084"},{a2:"BJ",a3:"BEN",n:"204"},{a2:"BM",a3:"BMU",n:"060"},{a2:"BT",a3:"BTN",n:"064"},{a2:"BO",a3:"BOL",n:"068"},{a2:"BQ",a3:"BES",n:"535"},{a2:"BA",a3:"BIH",n:"070"},{a2:"BW",a3:"BWA",n:"072"},{a2:"BV",a3:"BVT",n:"074"},{a2:"BR",a3:"BRA",n:"076"},{a2:"IO",a3:"IOT",n:"086"},{a2:"BN",a3:"BRN",n:"096"},{a2:"BG",a3:"BGR",n:"100"},{a2:"BF",a3:"BFA",n:"854"},{a2:"BI",a3:"BDI",n:"108"},{a2:"CV",a3:"CPV",n:"132"},{a2:"KH",a3:"KHM",n:"116"},{a2:"CM",a3:"CMR",n:"120"},{a2:"CA",a3:"CAN",n:"124"},{a2:"KY",a3:"CYM",n:"136"},{a2:"CF",a3:"CAF",n:"140"},{a2:"TD",a3:"TCD",n:"148"},{a2:"CL",a3:"CHL",n:"152"},{a2:"CN",a3:"CHN",n:"156"},{a2:"CX",a3:"CXR",n:"162"},{a2:"CC",a3:"CCK",n:"166"},{a2:"CO",a3:"COL",n:"170"},{a2:"KM",a3:"COM",n:"174"},{a2:"CG",a3:"COG",n:"178"},{a2:"CD",a3:"COD",n:"180"},{a2:"CK",a3:"COK",n:"184"},{a2:"CR",a3:"CRI",n:"188"},{a2:"CI",a3:"CIV",n:"384"},{a2:"HR",a3:"HRV",n:"191"},{a2:"CU",a3:"CUB",n:"192"},{a2:"CW",a3:"CUW",n:"531"},{a2:"CY",a3:"CYP",n:"196"},{a2:"CZ",a3:"CZE",n:"203"},{a2:"DK",a3:"DNK",n:"208"},{a2:"DJ",a3:"DJI",n:"262"},{a2:"DM",a3:"DMA",n:"212"},{a2:"DO",a3:"DOM",n:"214"},{a2:"EC",a3:"ECU",n:"218"},{a2:"EG",a3:"EGY",n:"818"},{a2:"SV",a3:"SLV",n:"222"},{a2:"GQ",a3:"GNQ",n:"226"},{a2:"ER",a3:"ERI",n:"232"},{a2:"EE",a3:"EST",n:"233"},{a2:"SZ",a3:"SWZ",n:"748"},{a2:"ET",a3:"ETH",n:"231"},{a2:"FK",a3:"FLK",n:"238"},{a2:"FO",a3:"FRO",n:"234"},{a2:"FJ",a3:"FJI",n:"242"},{a2:"FI",a3:"FIN",n:"246"},{a2:"FR",a3:"FRA",n:"250"},{a2:"GF",a3:"GUF",n:"254"},{a2:"PF",a3:"PYF",n:"258"},{a2:"TF",a3:"ATF",n:"260"},{a2:"GA",a3:"GAB",n:"266"},{a2:"GM",a3:"GMB",n:"270"},{a2:"GE",a3:"GEO",n:"268"},{a2:"DE",a3:"DEU",n:"276"},{a2:"GH",a3:"GHA",n:"288"},{a2:"GI",a3:"GIB",n:"292"},{a2:"GR",a3:"GRC",n:"300"},{a2:"GL",a3:"GRL",n:"304"},{a2:"GD",a3:"GRD",n:"308"},{a2:"GP",a3:"GLP",n:"312"},{a2:"GU",a3:"GUM",n:"316"},{a2:"GT",a3:"GTM",n:"320"},{a2:"GG",a3:"GGY",n:"831"},{a2:"GN",a3:"GIN",n:"324"},{a2:"GW",a3:"GNB",n:"624"},{a2:"GY",a3:"GUY",n:"328"},{a2:"HT",a3:"HTI",n:"332"},{a2:"HM",a3:"HMD",n:"334"},{a2:"VA",a3:"VAT",n:"336"},{a2:"HN",a3:"HND",n:"340"},{a2:"HK",a3:"HKG",n:"344"},{a2:"HU",a3:"HUN",n:"348"},{a2:"IS",a3:"ISL",n:"352"},{a2:"IN",a3:"IND",n:"356"},{a2:"ID",a3:"IDN",n:"360"},{a2:"IR",a3:"IRN",n:"364"},{a2:"IQ",a3:"IRQ",n:"368"},{a2:"IE",a3:"IRL",n:"372"},{a2:"IM",a3:"IMN",n:"833"},{a2:"IL",a3:"ISR",n:"376"},{a2:"IT",a3:"ITA",n:"380"},{a2:"JM",a3:"JAM",n:"388"},{a2:"JP",a3:"JPN",n:"392"},{a2:"JE",a3:"JEY",n:"832"},{a2:"JO",a3:"JOR",n:"400"},{a2:"KZ",a3:"KAZ",n:"398"},{a2:"KE",a3:"KEN",n:"404"},{a2:"KI",a3:"KIR",n:"296"},{a2:"KP",a3:"PRK",n:"408"},{a2:"KR",a3:"KOR",n:"410"},{a2:"KW",a3:"KWT",n:"414"},{a2:"KG",a3:"KGZ",n:"417"},{a2:"LA",a3:"LAO",n:"418"},{a2:"LV",a3:"LVA",n:"428"},{a2:"LB",a3:"LBN",n:"422"},{a2:"LS",a3:"LSO",n:"426"},{a2:"LR",a3:"LBR",n:"430"},{a2:"LY",a3:"LBY",n:"434"},{a2:"LI",a3:"LIE",n:"438"},{a2:"LT",a3:"LTU",n:"440"},{a2:"LU",a3:"LUX",n:"442"},{a2:"MO",a3:"MAC",n:"446"},{a2:"MG",a3:"MDG",n:"450"},{a2:"MW",a3:"MWI",n:"454"},{a2:"MY",a3:"MYS",n:"458"},{a2:"MV",a3:"MDV",n:"462"},{a2:"ML",a3:"MLI",n:"466"},{a2:"MT",a3:"MLT",n:"470"},{a2:"MH",a3:"MHL",n:"584"},{a2:"MQ",a3:"MTQ",n:"474"},{a2:"MR",a3:"MRT",n:"478"},{a2:"MU",a3:"MUS",n:"480"},{a2:"YT",a3:"MYT",n:"175"},{a2:"MX",a3:"MEX",n:"484"},{a2:"FM",a3:"FSM",n:"583"},{a2:"MD",a3:"MDA",n:"498"},{a2:"MC",a3:"MCO",n:"492"},{a2:"MN",a3:"MNG",n:"496"},{a2:"ME",a3:"MNE",n:"499"},{a2:"MS",a3:"MSR",n:"500"},{a2:"MA",a3:"MAR",n:"504"},{a2:"MZ",a3:"MOZ",n:"508"},{a2:"MM",a3:"MMR",n:"104"},{a2:"NA",a3:"NAM",n:"516"},{a2:"NR",a3:"NRU",n:"520"},{a2:"NP",a3:"NPL",n:"524"},{a2:"NL",a3:"NLD",n:"528"},{a2:"NC",a3:"NCL",n:"540"},{a2:"NZ",a3:"NZL",n:"554"},{a2:"NI",a3:"NIC",n:"558"},{a2:"NE",a3:"NER",n:"562"},{a2:"NG",a3:"NGA",n:"566"},{a2:"NU",a3:"NIU",n:"570"},{a2:"NF",a3:"NFK",n:"574"},{a2:"MK",a3:"MKD",n:"807"},{a2:"MP",a3:"MNP",n:"580"},{a2:"NO",a3:"NOR",n:"578"},{a2:"OM",a3:"OMN",n:"512"},{a2:"PK",a3:"PAK",n:"586"},{a2:"PW",a3:"PLW",n:"585"},{a2:"PS",a3:"PSE",n:"275"},{a2:"PA",a3:"PAN",n:"591"},{a2:"PG",a3:"PNG",n:"598"},{a2:"PY",a3:"PRY",n:"600"},{a2:"PE",a3:"PER",n:"604"},{a2:"PH",a3:"PHL",n:"608"},{a2:"PN",a3:"PCN",n:"612"},{a2:"PL",a3:"POL",n:"616"},{a2:"PT",a3:"PRT",n:"620"},{a2:"PR",a3:"PRI",n:"630"},{a2:"QA",a3:"QAT",n:"634"},{a2:"RE",a3:"REU",n:"638"},{a2:"RO",a3:"ROU",n:"642"},{a2:"RU",a3:"RUS",n:"643"},{a2:"RW",a3:"RWA",n:"646"},{a2:"BL",a3:"BLM",n:"652"},{a2:"SH",a3:"SHN",n:"654"},{a2:"KN",a3:"KNA",n:"659"},{a2:"LC",a3:"LCA",n:"662"},{a2:"MF",a3:"MAF",n:"663"},{a2:"PM",a3:"SPM",n:"666"},{a2:"VC",a3:"VCT",n:"670"},{a2:"WS",a3:"WSM",n:"882"},{a2:"SM",a3:"SMR",n:"674"},{a2:"ST",a3:"STP",n:"678"},{a2:"SA",a3:"SAU",n:"682"},{a2:"SN",a3:"SEN",n:"686"},{a2:"RS",a3:"SRB",n:"688"},{a2:"SC",a3:"SYC",n:"690"},{a2:"SL",a3:"SLE",n:"694"},{a2:"SG",a3:"SGP",n:"702"},{a2:"SX",a3:"SXM",n:"534"},{a2:"SK",a3:"SVK",n:"703"},{a2:"SI",a3:"SVN",n:"705"},{a2:"SB",a3:"SLB",n:"090"},{a2:"SO",a3:"SOM",n:"706"},{a2:"ZA",a3:"ZAF",n:"710"},{a2:"GS",a3:"SGS",n:"239"},{a2:"SS",a3:"SSD",n:"728"},{a2:"ES",a3:"ESP",n:"724"},{a2:"LK",a3:"LKA",n:"144"},{a2:"SD",a3:"SDN",n:"729"},{a2:"SR",a3:"SUR",n:"740"},{a2:"SJ",a3:"SJM",n:"744"},{a2:"SE",a3:"SWE",n:"752"},{a2:"CH",a3:"CHE",n:"756"},{a2:"SY",a3:"SYR",n:"760"},{a2:"TW",a3:"TWN",n:"158"},{a2:"TJ",a3:"TJK",n:"762"},{a2:"TZ",a3:"TZA",n:"834"},{a2:"TH",a3:"THA",n:"764"},{a2:"TL",a3:"TLS",n:"626"},{a2:"TG",a3:"TGO",n:"768"},{a2:"TK",a3:"TKL",n:"772"},{a2:"TO",a3:"TON",n:"776"},{a2:"TT",a3:"TTO",n:"780"},{a2:"TN",a3:"TUN",n:"788"},{a2:"TR",a3:"TUR",n:"792"},{a2:"TM",a3:"TKM",n:"795"},{a2:"TC",a3:"TCA",n:"796"},{a2:"TV",a3:"TUV",n:"798"},{a2:"UG",a3:"UGA",n:"800"},{a2:"UA",a3:"UKR",n:"804"},{a2:"AE",a3:"ARE",n:"784"},{a2:"GB",a3:"GBR",n:"826"},{a2:"US",a3:"USA",n:"840"},{a2:"UM",a3:"UMI",n:"581"},{a2:"UY",a3:"URY",n:"858"},{a2:"UZ",a3:"UZB",n:"860"},{a2:"VU",a3:"VUT",n:"548"},{a2:"VE",a3:"VEN",n:"862"},{a2:"VN",a3:"VNM",n:"704"},{a2:"VG",a3:"VGB",n:"092"},{a2:"VI",a3:"VIR",n:"850"},{a2:"WF",a3:"WLF",n:"876"},{a2:"EH",a3:"ESH",n:"732"},{a2:"YE",a3:"YEM",n:"887"},{a2:"ZM",a3:"ZMB",n:"894"},{a2:"ZW",a3:"ZWE",n:"716"},{a2:"XK",a3:"XKX",n:"383"}],K="alpha2",Y="alpha3",H="numeric";var x=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,n),e=t.call(this,a);var i=[K,Y,H];if(!i.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid country.",mode:K}}},{key:"validate",value:function(e){if(y(e)&&(e=String(e).padStart(3,"0")),this.options.trim&&(e=R(e)),!this.isEmptyValue(e))return"string"==typeof e&&(function(e,t){return t===K&&void 0!==F.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return t===Y&&void 0!==F.find((function(t){return t.a3.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return t===H&&void 0!==F.find((function(t){return t.n.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode))?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}],[{key:"MODE_ALPHA2",get:function(){return K}},{key:"MODE_ALPHA3",get:function(){return Y}},{key:"MODE_NUMERIC",get:function(){return H}}]),n}(I),W=["ADP","AED","AFA","AFN","ALK","ALL","AMD","ANG","AOA","AOK","AON","AOR","ARA","ARL","ARM","ARP","ARS","ATS","AUD","AWG","AZM","AZN","BAD","BAM","BAN","BBD","BDT","BEC","BEF","BEL","BGL","BGM","BGN","BGO","BHD","BIF","BMD","BND","BOB","BOL","BOP","BOV","BRB","BRC","BRE","BRL","BRN","BRR","BRZ","BSD","BTN","BUK","BWP","BYB","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLE","CLF","CLP","CNH","CNX","CNY","COP","COU","CRC","CSD","CSK","CUC","CUP","CVE","CYP","CZK","DDM","DEM","DJF","DKK","DOP","DZD","ECS","ECV","EEK","EGP","ERN","ESA","ESB","ESP","ETB","EUR","FIM","FJD","FKP","FRF","GBP","GEK","GEL","GHC","GHS","GIP","GMD","GNF","GNS","GQE","GRD","GTQ","GWE","GWP","GYD","HKD","HNL","HRD","HRK","HTG","HUF","IDR","IEP","ILP","ILR","ILS","INR","IQD","IRR","ISJ","ISK","ITL","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRH","KRO","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LTT","LUC","LUF","LUL","LVL","LVR","LYD","MAD","MAF","MCF","MDC","MDL","MGA","MGF","MKD","MKN","MLF","MMK","MNT","MOP","MRO","MRU","MTL","MTP","MUR","MVP","MVR","MWK","MXN","MXP","MXV","MYR","MZE","MZM","MZN","NAD","NGN","NIC","NIO","NLG","NOK","NPR","NZD","OMR","PAB","PEI","PEN","PES","PGK","PHP","PKR","PLN","PLZ","PTE","PYG","QAR","RHD","ROL","RON","RSD","RUB","RUR","RWF","SAR","SBD","SCR","SDD","SDG","SDP","SEK","SGD","SHP","SIT","SKK","SLL","SOS","SRD","SRG","SSP","STD","STN","SUR","SVC","SYP","SZL","THB","TJR","TJS","TMM","TMT","TND","TOP","TPE","TRL","TRY","TTD","TWD","TZS","UAH","UAK","UGS","UGX","USD","USN","USS","UYI","UYP","UYU","UYW","UZS","VEB","VEF","VES","VND","VNN","VUV","WST","XAF","XCD","XEU","XFO","XFU","XOF","XPF","XRE","YDD","YER","YUD","YUM","YUN","YUR","ZAL","ZAR","ZMK","ZMW","ZRN","ZRZ","ZWD","ZWL","ZWR"],j=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid currency."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e))return"string"==typeof e&&W.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),J=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be blank.",allow_null:!1}}},{key:"validate",value:function(e){if("string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==i(e)&&isNaN(e)||void 0===e||!this.options.allow_null&&null===e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),z="regexp",X="url_api",q="html5";var Q=function(e){d(n,e);var t=_(n);function n(e){var a;if(r(this,n),a=t.call(this,e),![z,X,q].includes(a.options.mode))throw new Error("Invalid validation mode provided: ".concat(a.options.mode));return a}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:X,message:"This value is not a valid URL."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case z:if(!function(e){return!(null===e.match(/^(https?:\/\/|ftps?:\/\/)?([a-z0-9%\-]+\.){1,}([a-z0-9\-]+)?(:(\d{1,5}))?(\/([a-z0-9\-._~:\/\?#\[\]@!$&'\(\)\*\+,;=%]+)?)?$/i))}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case X:if(!function(e){try{new URL(e)}catch(e){return!1}return!0}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case q:if(!function(e){var t=document.createElement("input");return t.setAttribute("type","url"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_REGEXP",get:function(){return z}},{key:"MODE_URL_API",get:function(){return X}},{key:"MODE_HTML5",get:function(){return q}}]),n}(I),ee=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be false."}}},{key:"validate",value:function(e){if(!1!==e&&0!==e&&"0"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),te=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be true."}}},{key:"validate",value:function(e){if(!0!==e&&1!==e&&"1"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),ne=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be valid JSON."}}},{key:"validate",value:function(e){try{JSON.parse(e)}catch(t){return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(I),ae=function(e){d(n,e);var t=_(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return A(e)&&A(t)?e.getTime()===t.getTime():e==t}}]),n}(D),ie=function(e){d(n,e);var t=_(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should not be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return A(e)&&A(t)?e.getTime()!==t.getTime():e!=t}}]),n}(D),re=function(e){d(n,e);var t=_(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return A(e)&&A(t)?e.getTime()>t.getTime():e>t}}]),n}(D),oe=function(e){d(n,e);var t=_(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than or equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return A(e)&&A(t)?e.getTime()>=t.getTime():e>=t}}]),n}(D),se=function(e){d(n,e);var t=_(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be less than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return A(e)&&A(t)?e.getTime()0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),e.strict=!0,e.value=0,t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative."})}}]),n}(se),ce=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),e.strict=!0,e.value=0,t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative or zero."})}}]),n}(ue),de=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),e.strict=!0,e.value=0,t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive."})}}]),n}(re),pe=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),e.strict=!0,e.value=0,t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive or zero."})}}]),n}(oe),fe=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be null."}}},{key:"validate",value:function(e){if(!E(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),he=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be null."}}},{key:"validate",value:function(e){if(E(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),_e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},me=function(e){return!("undefined"!=typeof process||!process.env||!process.env[e])&&process.env[e]},ve="function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?function(e){return i(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":i(e)},ge=function(e,t){var n=me,a="",i=[],r=0,o=function e(t){if(t instanceof RegExp)return new RegExp(t);if(t instanceof Date)return new Date(t);var n={};for(var a in t)"object"===ve(t[a])?n[a]=e(t[a]):n[a]=t[a];return n},s="undefined"!=typeof window?window:_e;s.$locutus=s.$locutus||{};var u=s.$locutus;if(u.php=u.php||{},u.php.locales&&u.php.locales.fr_CA&&u.php.locales.fr_CA.LC_TIME&&u.php.locales.fr_CA.LC_TIME.x||(u.php.locales={},u.php.locales.en={LC_COLLATE:function(e,t){return e===t?0:e>t?1:-1},LC_CTYPE:{an:/^[A-Za-z\d]+$/g,al:/^[A-Za-z]+$/g,ct:/^[\u0000-\u001F\u007F]+$/g,dg:/^[\d]+$/g,gr:/^[\u0021-\u007E]+$/g,lw:/^[a-z]+$/g,pr:/^[\u0020-\u007E]+$/g,pu:/^[\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]+$/g,sp:/^[\f\n\r\t\v ]+$/g,up:/^[A-Z]+$/g,xd:/^[A-Fa-f\d]+$/g,CODESET:"UTF-8",lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"},LC_TIME:{a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %r %Z",p:["AM","PM"],P:["am","pm"],r:"%I:%M:%S %p",x:"%m/%d/%Y",X:"%r",alt_digits:"",ERA:"",ERA_YEAR:"",ERA_D_T_FMT:"",ERA_D_FMT:"",ERA_T_FMT:""},LC_MONETARY:{int_curr_symbol:"USD",currency_symbol:"$",mon_decimal_point:".",mon_thousands_sep:",",mon_grouping:[3],positive_sign:"",negative_sign:"-",int_frac_digits:2,frac_digits:2,p_cs_precedes:1,p_sep_by_space:0,n_cs_precedes:1,n_sep_by_space:0,p_sign_posn:3,n_sign_posn:0},LC_NUMERIC:{decimal_point:".",thousands_sep:",",grouping:[3]},LC_MESSAGES:{YESEXPR:"^[yY].*",NOEXPR:"^[nN].*",YESSTR:"",NOSTR:""},nplurals:function(e){return 1!==e?1:0}},u.php.locales.en_US=o(u.php.locales.en),u.php.locales.en_US.LC_TIME.c="%a %d %b %Y %r %Z",u.php.locales.en_US.LC_TIME.x="%D",u.php.locales.en_US.LC_TIME.X="%r",u.php.locales.en_US.LC_MONETARY.int_curr_symbol="USD ",u.php.locales.en_US.LC_MONETARY.p_sign_posn=1,u.php.locales.en_US.LC_MONETARY.n_sign_posn=1,u.php.locales.en_US.LC_MONETARY.mon_grouping=[3,3],u.php.locales.en_US.LC_NUMERIC.thousands_sep="",u.php.locales.en_US.LC_NUMERIC.grouping=[],u.php.locales.en_GB=o(u.php.locales.en),u.php.locales.en_GB.LC_TIME.r="%l:%M:%S %P %Z",u.php.locales.en_AU=o(u.php.locales.en_GB),u.php.locales.C=o(u.php.locales.en),u.php.locales.C.LC_CTYPE.CODESET="ANSI_X3.4-1968",u.php.locales.C.LC_MONETARY={int_curr_symbol:"",currency_symbol:"",mon_decimal_point:"",mon_thousands_sep:"",mon_grouping:[],p_cs_precedes:127,p_sep_by_space:127,n_cs_precedes:127,n_sep_by_space:127,p_sign_posn:127,n_sign_posn:127,positive_sign:"",negative_sign:"",int_frac_digits:127,frac_digits:127},u.php.locales.C.LC_NUMERIC={decimal_point:".",thousands_sep:"",grouping:[]},u.php.locales.C.LC_TIME.c="%a %b %e %H:%M:%S %Y",u.php.locales.C.LC_TIME.x="%m/%d/%y",u.php.locales.C.LC_TIME.X="%H:%M:%S",u.php.locales.C.LC_MESSAGES.YESEXPR="^[yY]",u.php.locales.C.LC_MESSAGES.NOEXPR="^[nN]",u.php.locales.fr=o(u.php.locales.en),u.php.locales.fr.nplurals=function(e){return e>1?1:0},u.php.locales.fr.LC_TIME.a=["dim","lun","mar","mer","jeu","ven","sam"],u.php.locales.fr.LC_TIME.A=["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],u.php.locales.fr.LC_TIME.b=["jan","fév","mar","avr","mai","jun","jui","aoû","sep","oct","nov","déc"],u.php.locales.fr.LC_TIME.B=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],u.php.locales.fr.LC_TIME.c="%a %d %b %Y %T %Z",u.php.locales.fr.LC_TIME.p=["",""],u.php.locales.fr.LC_TIME.P=["",""],u.php.locales.fr.LC_TIME.x="%d.%m.%Y",u.php.locales.fr.LC_TIME.X="%T",u.php.locales.fr_CA=o(u.php.locales.fr),u.php.locales.fr_CA.LC_TIME.x="%Y-%m-%d"),!u.php.locale&&(u.php.locale="en_US","undefined"!=typeof window&&window.document)){var l=window.document,c="https://www.w3.org/1999/xhtml",d="https://www.w3.org/XML/1998/namespace";l.getElementsByTagNameNS&&l.getElementsByTagNameNS(c,"html")[0]?l.getElementsByTagNameNS(c,"html")[0].getAttributeNS&&l.getElementsByTagNameNS(c,"html")[0].getAttributeNS(d,"lang")?u.php.locale=l.getElementsByTagName(c,"html")[0].getAttributeNS(d,"lang"):l.getElementsByTagNameNS(c,"html")[0].lang&&(u.php.locale=l.getElementsByTagNameNS(c,"html")[0].lang):l.getElementsByTagName("html")[0]&&l.getElementsByTagName("html")[0].lang&&(u.php.locale=l.getElementsByTagName("html")[0].lang)}if(u.php.locale=u.php.locale.replace("-","_"),u.php.locale in u.php.locales||u.php.locale.replace(/_[a-zA-Z]+$/,"")in u.php.locales&&(u.php.locale=u.php.locale.replace(/_[a-zA-Z]+$/,"")),u.php.localeCategories||(u.php.localeCategories={LC_COLLATE:u.php.locale,LC_CTYPE:u.php.locale,LC_MONETARY:u.php.locale,LC_NUMERIC:u.php.locale,LC_TIME:u.php.locale,LC_MESSAGES:u.php.locale}),null===t||""===t)t=n(e)||n("LANG");else if("[object Array]"===Object.prototype.toString.call(t))for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{};r(this,n),e=t.call(this,a);var i=[Ae,Ee,Te,Ce,Le,Me,Re,Pe,Ne,Oe,Be,Se,be,ke,Ie,De,Ge,we,Ue,Ve,Ze,$e,Fe,Ke];if(!i.includes(e.options.type))throw new Error("Invalid type provided: ".concat(e.options.type));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be of type {{ type }}."}}},{key:"getRequiredOptions",value:function(){return["type"]}},{key:"validate",value:function(e){var t,n=!1;switch(this.options.type){case Ae:n=T(e);break;case Ee:n=A(e);break;case Te:case Ce:n=!0===(t=e)||!1===t;break;case Le:n=C(e);break;case Me:case Se:n=L(e);break;case be:case Re:n=M(e);break;case Pe:n=E(e);break;case Ne:n=y(e);break;case Oe:n=S(e);break;case Be:n=b(e);break;case ke:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.an)}(e);break;case Ie:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.al)}(e);break;case De:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.ct)}(e);break;case Ge:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.dg)}(e);break;case we:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.gr)}(e);break;case Ue:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.lw)}(e);break;case Ve:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pr)}(e);break;case Ze:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pu)}(e);break;case $e:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.sp)}(e);break;case Fe:n=ye(e);break;case Ke:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.xd)}(e)}if(!n)return this.getViolationBuilder().setParameter("value",e).setParameter("type",this.options.type).build(this.options.message)}}],[{key:"TYPE_ARRAY",get:function(){return Ae}},{key:"TYPE_DATE",get:function(){return Ee}},{key:"TYPE_BOOL",get:function(){return Te}},{key:"TYPE_BOOLEAN",get:function(){return Ce}},{key:"TYPE_FUNCTION",get:function(){return Le}},{key:"TYPE_FLOAT",get:function(){return Me}},{key:"TYPE_DOUBLE",get:function(){return Se}},{key:"TYPE_INT",get:function(){return be}},{key:"TYPE_INTEGER",get:function(){return Re}},{key:"TYPE_NULL",get:function(){return Pe}},{key:"TYPE_NUMERIC",get:function(){return Ne}},{key:"TYPE_OBJECT",get:function(){return Oe}},{key:"TYPE_STRING",get:function(){return Be}},{key:"CTYPE_ALNUM",get:function(){return ke}},{key:"CTYPE_ALPHA",get:function(){return Ie}},{key:"CTYPE_CNTRL",get:function(){return De}},{key:"CTYPE_DIGIT",get:function(){return Ge}},{key:"CTYPE_GRAPH",get:function(){return we}},{key:"CTYPE_LOWER",get:function(){return Ue}},{key:"CTYPE_PRINT",get:function(){return Ve}},{key:"CTYPE_PUNCT",get:function(){return Ze}},{key:"CTYPE_SPACE",get:function(){return $e}},{key:"CTYPE_UPPER",get:function(){return Fe}},{key:"CTYPE_XDIGIT",get:function(){return Ke}}]),n}(I),He=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r(this,n),!(e=t.call(this,a)).options.choices||!T(e.options.choices))throw new Error('Choices list should be type of "array", "'.concat(i(e.options.choices),'" given.'));return(e.options.min||e.options.max)&&(e.options.multiple=!0),e}return s(n,[{key:"getDefaultOptions",value:function(){return{multiple:!1,min:0,max:0,message:"The value you selected is not a valid choice.",message_min:"You must select at least {{ limit }} choices.",message_max:"You must select at most {{ limit }} choices.",message_multiple:"One or more of the given values is invalid."}}},{key:"getRequiredOptions",value:function(){return["choices"]}},{key:"validate",value:function(e){if(this.options.multiple&&!Array.isArray(e))return this.getViolationBuilder().build('Values list should be type of "array", "'.concat(i(e),'" given.'));if(!this.isEmptyValue(e))if(this.options.multiple){for(var t=0;t0&&e.length0&&e.length>this.options.max)return this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message_max)}else if(!this.options.choices.includes(e))return this.getViolationBuilder().setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message)}}]),n}(I),xe='Provided value should be countable, "{{ type }}" given.',We=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),(e=t.call(this,a)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return s(n,[{key:"getDefaultOptions",value:function(){return{message_min:"This collection should contain {{ limit }} elements or more.",message_max:"This collection should contain {{ limit }} elements or less.",message_exact:"This collection should contain exactly {{ limit }} elements."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(null==(t=e)||b(t)||!(T(t)||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Map||t instanceof Set||t instanceof WeakMap||t instanceof WeakSet||t instanceof ArrayBuffer))return this.getViolationBuilder().setParameter("type",i(e)).build(xe);var t,n;switch(!0){case e.hasOwnProperty("size")||e instanceof Map||e instanceof Set:n=e.size;break;case e instanceof ArrayBuffer:n=e.byteLength;break;default:n=e.length}return void 0===n?this.getViolationBuilder().setParameter("type",i(e)).build(xe):null!==this.options.min&&this.options.min===this.options.max&&n!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&n>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&n0&&void 0!==arguments[0]?arguments[0]:{};return r(this,a),n.call(this,e)}return s(a,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid timezone."}}},{key:"validate",value:function(t){if(this.options.trim&&(t=R(t)),!this.isEmptyValue(t))return"string"==typeof t&&e.DateTime.local().setZone(t).isValid?void 0:this.getViolationBuilder().setParameter("value",t).build(this.options.message)}}]),a}(I),ze=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r(this,n),!(e=t.call(this,a)).options.value||!y(e.options.value))throw new Error('Value should be type of "number", "'.concat(i(e.options.value),'" given.'));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be a multiple of {{ compared_value }}.",message_type:'This values has different types. Given type is "{{ current_type }}"; Expected type is "{{ expected_type }}".'}}},{key:"getRequiredOptions",value:function(){return["value"]}},{key:"validate",value:function(e){if(!this.isEmptyValue(e))return y(e)?e%this.options.value!=0?this.getViolationBuilder().setParameter("compared_value",this.options.value).setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",this.options.value).setParameter("current_type",i(e)).setParameter("expected_type","number").build(this.options.message_type)}}]),n}(I),Xe="all",qe="4",Qe="6",et="4_no_priv",tt="6_no_priv",nt="all_no_priv",at="4_no_res",it="6_no_res",rt="all_no_res",ot="4_pub",st="6_pub",ut="all_pub";function lt(e,t){var n=a.default.parse(e);return"ipv4"===n.kind()&&!((t===et||t===nt)&&"private"===n.range()||(t===at||t===rt)&&"reserved"===n.range()||(t===ot||t===ut)&&("private"===n.range()||"reserved"===n.range()))}function ct(e,t){var n=a.default.parse(e);return"ipv6"===n.kind()&&!((t===tt||t===nt)&&"uniqueLocal"===n.range()||(t===it||t===rt)&&"reserved"===n.range()||(t===st||t===ut)&&("uniqueLocal"===n.range()||"reserved"===n.range()))}var dt=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,n),e=t.call(this,a);var i=[Xe,qe,Qe,et,tt,nt,at,it,rt,ot,st,ut];if(!i.includes(e.options.version))throw new Error("Invalid validation version provided: ".concat(e.options.version));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,version:qe,message:"This is not a valid IP address."}}},{key:"getRequiredOptions",value:function(){return["version"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!("string"==typeof e&&0===e.length||"string"!=typeof e&&isNaN(e)||null==e)){if(!a.default.isValid(e)||!a.default.IPv4.isValidFourPartDecimal(e)&&!a.default.IPv6.isValid(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);switch(this.options.version){case qe:case et:case at:case ot:if(!lt(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case Qe:case tt:case it:case st:if(!ct(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case nt:case rt:case ut:if(!lt(e,this.options.version)&&!ct(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}}],[{key:"MODE_ALL",get:function(){return Xe}},{key:"MODE_V4",get:function(){return qe}},{key:"MODE_V6",get:function(){return Qe}},{key:"MODE_V4_NO_PRIV",get:function(){return et}},{key:"MODE_V6_NO_PRIV",get:function(){return tt}},{key:"MODE_ALL_NO_PRIV",get:function(){return nt}},{key:"MODE_V4_NO_RES",get:function(){return at}},{key:"MODE_V6_NO_RES",get:function(){return it}},{key:"MODE_ALL_NO_RES",get:function(){return rt}},{key:"MODE_V4_PUB",get:function(){return ot}},{key:"MODE_V6_PUB",get:function(){return st}},{key:"MODE_ALL_PUB",get:function(){return ut}}]),n}(I),pt=["AB","AA","AF","AK","SQ","AM","AR","AN","HY","AS","AV","AE","AY","AZ","BM","BA","EU","BE","BN","BH","BI","BS","BR","BG","MY","CA","CH","CE","NY","ZH","ZH-HANS","ZH-HANT","CV","KW","CO","CR","HR","CS","DA","DV","NL","DZ","EN","EO","ET","EE","FO","FJ","FI","FR","FF","GL","GD","GV","KA","DE","EL","KL","GN","GU","HT","HA","HE","HZ","HI","HO","HU","IS","IO","IG","IN","IA","IE","IU","IK","GA","IT","JA","JV","KL","KN","KR","KS","KK","KM","KI","RW","RN","KY","KV","KG","KO","KU","KJ","LO","LA","LV","LI","LN","LT","LU","LG","LB","GV","MK","MG","MS","ML","MT","MI","MR","MH","MO","MN","NA","NV","NG","ND","NE","NO","NB","NN","II","OC","OJ","CU","OR","OM","OS","PI","PS","FA","PL","PT","PA","QU","RM","RO","RU","SE","SM","SG","SA","SR","SH","ST","TN","SN","II","SD","SI","SS","SK","SL","SO","NR","ES","SU","SW","SS","SV","TL","TY","TG","TA","TT","TE","TH","BO","TI","TO","TS","TR","TK","TW","UG","UK","UR","UZ","VE","VI","VO","WA","CY","WO","FY","XH","YI","YO","ZA","ZU"],ft=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid language."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e))return"string"==typeof e&&pt.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),ht=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r(this,n),!C((e=t.call(this,a)).options.callback))throw new Error('Value should be type of "function", "'.concat(i(e.options.callback),'" given.'));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value is not a valid."}}},{key:"getRequiredOptions",value:function(){return["callback"]}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.options.callback(e,t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),_t=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r(this,n),"string"!=typeof(e=t.call(this,a)).options.pattern&&!(e.options.pattern instanceof RegExp))throw new Error('Pattern should be type of "string", '.concat(i(e.options.pattern)," given."));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!1,match:!0,message:"This value is not valid."}}},{key:"getRequiredOptions",value:function(){return["pattern"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){if("string"!=typeof e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);var t=new RegExp(this.options.pattern);return this.options.match&&!t.test(e)||!this.options.match&&t.test(e)?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(I),mt=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,n);var o=!(void 0===(e=t.call(this,a)).options.min||null===e.options.min),s=!(void 0===e.options.max||null===e.options.max);if(o&&!y(e.options.min)&&!A(e.options.min))throw new Error('Min limit should be type of "number" or "Date", "'.concat(i(e.options.min),'" given.'));if(s&&!y(e.options.max)&&!A(e.options.max))throw new Error('Max limit should be type of "number" or "Date", "'.concat(i(e.options.max),'" given.'));if(o&&s){if(y(e.options.min)&&!y(e.options.max))throw new Error('Max limit should be type of "number", "'.concat(i(e.options.max),'" given.'));if(A(e.options.min)&&!A(e.options.max))throw new Error('Max limit should be type of "Date", "'.concat(i(e.options.max),'" given.'))}return e.options.min=y(e.options.min)?parseFloat(e.options.min):e.options.min,e.options.max=y(e.options.max)?parseFloat(e.options.max):e.options.max,e}return s(n,[{key:"getDefaultOptions",value:function(){return{message_min:"This value should be {{ limit }} or more.",message_max:"This value should be {{ limit }} or less.",message:"This value should be between {{ min }} and {{ max }}."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){(A(this.options.min)||A(this.options.max))&&(e="now"===e?new Date:new Date(e));var t=!(void 0===this.options.min||null===this.options.min),n=!(void 0===this.options.max||null===this.options.max);return this.isEmptyValue(e)||t&&n&&(ethis.options.max)||!A(this.options.min)&&!A(this.options.max)&&A(e)?this.getViolationBuilder().setParameter("min",A(this.options.min)?this.formatDateValue(this.options.min):this.options.min).setParameter("max",A(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",A(e)?this.formatDateValue(e):e).build(this.options.message):t&&ethis.options.max?this.getViolationBuilder().setParameter("limit",A(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",A(e)?this.formatDateValue(e):e).build(this.options.message_max):void 0}}]),n}(I),vt=["af","af_NA","af_ZA","ak","ak_GH","am","am_ET","ar","ar_AE","ar_BH","ar_DJ","ar_DZ","ar_EG","ar_EH","ar_ER","ar_IL","ar_IQ","ar_JO","ar_KM","ar_KW","ar_LB","ar_LY","ar_MA","ar_MR","ar_OM","ar_PS","ar_QA","ar_SA","ar_SD","ar_SO","ar_SS","ar_SY","ar_TD","ar_TN","ar_YE","as","as_IN","az","az_AZ","az_Cyrl","az_Cyrl_AZ","az_Latn","az_Latn_AZ","be","be_BY","bg","bg_BG","bm","bm_ML","bn","bn_BD","bn_IN","bo","bo_CN","bo_IN","br","br_FR","bs","bs_BA","bs_Cyrl","bs_Cyrl_BA","bs_Latn","bs_Latn_BA","ca","ca_AD","ca_ES","ca_FR","ca_IT","ce","ce_RU","cs","cs_CZ","cy","cy_GB","da","da_DK","da_GL","de","de_AT","de_BE","de_CH","de_DE","de_IT","de_LI","de_LU","dz","dz_BT","ee","ee_GH","ee_TG","el","el_CY","el_GR","en","en_AE","en_AG","en_AI","en_AS","en_AT","en_AU","en_BB","en_BE","en_BI","en_BM","en_BS","en_BW","en_BZ","en_CA","en_CC","en_CH","en_CK","en_CM","en_CX","en_CY","en_DE","en_DK","en_DM","en_ER","en_FI","en_FJ","en_FK","en_FM","en_GB","en_GD","en_GG","en_GH","en_GI","en_GM","en_GU","en_GY","en_HK","en_IE","en_IL","en_IM","en_IN","en_IO","en_JE","en_JM","en_KE","en_KI","en_KN","en_KY","en_LC","en_LR","en_LS","en_MG","en_MH","en_MO","en_MP","en_MS","en_MT","en_MU","en_MW","en_MY","en_NA","en_NF","en_NG","en_NL","en_NR","en_NU","en_NZ","en_PG","en_PH","en_PK","en_PN","en_PR","en_PW","en_RW","en_SB","en_SC","en_SD","en_SE","en_SG","en_SH","en_SI","en_SL","en_SS","en_SX","en_SZ","en_TC","en_TK","en_TO","en_TT","en_TV","en_TZ","en_UG","en_UM","en_US","en_VC","en_VG","en_VI","en_VU","en_WS","en_ZA","en_ZM","en_ZW","eo","es","es_AR","es_BO","es_BR","es_BZ","es_CL","es_CO","es_CR","es_CU","es_DO","es_EC","es_ES","es_GQ","es_GT","es_HN","es_MX","es_NI","es_PA","es_PE","es_PH","es_PR","es_PY","es_SV","es_US","es_UY","es_VE","et","et_EE","eu","eu_ES","fa","fa_AF","fa_IR","ff","ff_CM","ff_GN","ff_Latn","ff_Latn_BF","ff_Latn_CM","ff_Latn_GH","ff_Latn_GM","ff_Latn_GN","ff_Latn_GW","ff_Latn_LR","ff_Latn_MR","ff_Latn_NE","ff_Latn_NG","ff_Latn_SL","ff_Latn_SN","ff_MR","ff_SN","fi","fi_FI","fo","fo_DK","fo_FO","fr","fr_BE","fr_BF","fr_BI","fr_BJ","fr_BL","fr_CA","fr_CD","fr_CF","fr_CG","fr_CH","fr_CI","fr_CM","fr_DJ","fr_DZ","fr_FR","fr_GA","fr_GF","fr_GN","fr_GP","fr_GQ","fr_HT","fr_KM","fr_LU","fr_MA","fr_MC","fr_MF","fr_MG","fr_ML","fr_MQ","fr_MR","fr_MU","fr_NC","fr_NE","fr_PF","fr_PM","fr_RE","fr_RW","fr_SC","fr_SN","fr_SY","fr_TD","fr_TG","fr_TN","fr_VU","fr_WF","fr_YT","fy","fy_NL","ga","ga_GB","ga_IE","gd","gd_GB","gl","gl_ES","gu","gu_IN","gv","gv_IM","ha","ha_GH","ha_NE","ha_NG","he","he_IL","hi","hi_IN","hr","hr_BA","hr_HR","hu","hu_HU","hy","hy_AM","ia","id","id_ID","ig","ig_NG","ii","ii_CN","is","is_IS","it","it_CH","it_IT","it_SM","it_VA","ja","ja_JP","jv","jv_ID","ka","ka_GE","ki","ki_KE","kk","kk_KZ","kl","kl_GL","km","km_KH","kn","kn_IN","ko","ko_KP","ko_KR","ks","ks_IN","ku","ku_TR","kw","kw_GB","ky","ky_KG","lb","lb_LU","lg","lg_UG","ln","ln_AO","ln_CD","ln_CF","ln_CG","lo","lo_LA","lt","lt_LT","lu","lu_CD","lv","lv_LV","mg","mg_MG","mi","mi_NZ","mk","mk_MK","ml","ml_IN","mn","mn_MN","mr","mr_IN","ms","ms_BN","ms_MY","ms_SG","mt","mt_MT","my","my_MM","nb","nb_NO","nb_SJ","nd","nd_ZW","ne","ne_IN","ne_NP","nl","nl_AW","nl_BE","nl_BQ","nl_CW","nl_NL","nl_SR","nl_SX","nn","nn_NO","no","no_NO","om","om_ET","om_KE","or","or_IN","os","os_GE","os_RU","pa","pa_Arab","pa_Arab_PK","pa_Guru","pa_Guru_IN","pa_IN","pa_PK","pl","pl_PL","ps","ps_AF","ps_PK","pt","pt_AO","pt_BR","pt_CH","pt_CV","pt_GQ","pt_GW","pt_LU","pt_MO","pt_MZ","pt_PT","pt_ST","pt_TL","qu","qu_BO","qu_EC","qu_PE","rm","rm_CH","rn","rn_BI","ro","ro_MD","ro_RO","ru","ru_BY","ru_KG","ru_KZ","ru_MD","ru_RU","ru_UA","rw","rw_RW","sd","sd_PK","se","se_FI","se_NO","se_SE","sg","sg_CF","sh","sh_BA","si","si_LK","sk","sk_SK","sl","sl_SI","sn","sn_ZW","so","so_DJ","so_ET","so_KE","so_SO","sq","sq_AL","sq_MK","sr","sr_BA","sr_Cyrl","sr_Cyrl_BA","sr_Cyrl_ME","sr_Cyrl_RS","sr_Latn","sr_Latn_BA","sr_Latn_ME","sr_Latn_RS","sr_ME","sr_RS","sv","sv_AX","sv_FI","sv_SE","sw","sw_CD","sw_KE","sw_TZ","sw_UG","ta","ta_IN","ta_LK","ta_MY","ta_SG","te","te_IN","tg","tg_TJ","th","th_TH","ti","ti_ER","ti_ET","tk","tk_TM","tl","tl_PH","to","to_TO","tr","tr_CY","tr_TR","tt","tt_RU","ug","ug_CN","uk","uk_UA","ur","ur_IN","ur_PK","uz","uz_AF","uz_Arab","uz_Arab_AF","uz_Cyrl","uz_Cyrl_UZ","uz_Latn","uz_Latn_UZ","uz_UZ","vi","vi_VN","wo","wo_SN","xh","xh_ZA","yi","yo","yo_BJ","yo_NG","zh","zh_CN","zh_HK","zh_Hans","zh_Hans_CN","zh_Hans_HK","zh_Hans_MO","zh_Hans_SG","zh_Hant","zh_Hant_HK","zh_Hant_MO","zh_Hant_TW","zh_MO","zh_SG","zh_TW","zu","zu_ZA"],gt=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid locale."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){var t=B.canonicalize(e);return"string"==typeof t&&vt.includes(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(I),yt=null,At="isbn10",Et="isbn13";function Tt(e){if(!/^[\d|X]+$/.test(e)||10!==e.length)return!1;for(var t=0,n=0;n<10;n++){t+=("X"===e.charAt(n)?10:parseInt(e.charAt(n)))*(10-n)}return t%11==0}function Ct(e){if(!y(e)||13!==e.length)return!1;for(var t=0,n=0;n<13;n+=2)t+=parseInt(e.charAt(n));for(var a=1;a<12;a+=2)t+=3*parseInt(e.charAt(a));return t%10==0}var Lt,Mt=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,n),e=t.call(this,a);var i=[yt,At,Et],o=null===e.options.mode?null:e.options.mode.toLowerCase();if(!i.includes(o))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:yt,message:"This value is neither a valid ISBN-10 nor a valid ISBN-13.",message_isbn10:"This value is not a valid ISBN-10.",message_isbn13:"This value is not a valid ISBN-13."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/-/g,"",e).toUpperCase();return this.options.mode===At?Tt(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn10):this.options.mode!==Et||Ct(t)?Tt(t)||Ct(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message):this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn13)}}}],[{key:"MODE_ALL",get:function(){return yt}},{key:"MODE_ISBN_10",get:function(){return At}},{key:"MODE_ISBN_13",get:function(){return Et}}]),n}(I),St=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!1,case_sensitive:!1,hyphen:!1,message:"This value is not a valid ISSN."}}},{key:"validate",value:function(e){if("string"==typeof e&&!this.isEmptyValue(e)){var t=e=this.options.trim?R(e):e;if(t.length>4&&"-"===t.charAt(4))t=t.replace(/-/g,"");else if(this.options.hyphen)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(8!==t.length||this.options.case_sensitive&&!/^\d{7}[X|0-9]$/.test(t)||!this.options.case_sensitive&&!/^\d{7}[xX|0-9]$/.test(t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var n="x"===t.charAt(7)||"X"===t.charAt(7)?10:parseInt(t.charAt(7)),a=0;a<7;++a)n+=(8-a)*parseInt(t.charAt(a));return n%11!=0?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(I),bt=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Invalid card number."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){if(/[^0-9-\s]+/.test(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var t=e.toString().replace(/\D/g,""),n=0,a=t.length-1;a>=0;a-=2)n+=parseInt(t.charAt(a));for(var i=t.length-2;i>=0;i-=2)n+=(2*parseInt(t.charAt(i))).toString().split("").reduce((function(e,t){return parseInt(e)+parseInt(t)}),0);return 0===n||0!=n%10?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(I),Rt="AMEX",Pt="CHINA_UNIONPAY",Nt="DINERS",Ot="DISCOVER",Bt="INSTAPAYMENT",kt="LASER",It="MAESTRO",Dt="MASTERCARD",Gt="UATP",wt="VISA",Ut=(u(Lt={},Rt,[/^3[47][0-9]{13}$/]),u(Lt,Pt,[/^62[0-9]{14,17}$/]),u(Lt,Nt,[/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/]),u(Lt,Ot,[/^6011[0-9]{12}$/,/^64[4-9][0-9]{13}$/,/^65[0-9]{14}$/,/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/]),u(Lt,Bt,[/^63[7-9][0-9]{13}$/]),u(Lt,"JCB",[/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/]),u(Lt,kt,[/^(6304|670[69]|6771)[0-9]{12,15}$/]),u(Lt,It,[/^(6759[0-9]{2})[0-9]{6,13}$/,/^(50[0-9]{4})[0-9]{6,13}$/,/^5[6-9][0-9]{10,17}$/,/^6[0-9]{11,18}$/]),u(Lt,Dt,[/^5[1-5][0-9]{14}$/,/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/]),u(Lt,"MIR",[/^220[0-4][0-9]{12}$/]),u(Lt,Gt,[/^1[0-9]{14}$/]),u(Lt,wt,[/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/]),Lt),Vt=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r(this,n),(e=t.call(this,a)).options.schemas=b(e.options.schemas)?[e.options.schemas]:e.options.schemas,!T(e.options.schemas))throw new Error('Value should be type of "array" or "string", "'.concat(i(e.options.schemas),'" given.'));if(0===e.options.schemas.length)throw new Error("The schemas list cannot be empty.");var o=Object.keys(Ut),s=e.options.schemas.filter((function(e){return o.includes(e.toUpperCase())}));if(s.length!==e.options.schemas.length)throw new Error("The schemas list contains one or more unsupported elements.");return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Unsupported card type or invalid card number."}}},{key:"getRequiredOptions",value:function(){return["schemas"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){if(y(e)){var t,n=g(this.options.schemas);try{for(n.s();!(t=n.n()).done;){var a,i=t.value,r=g(Ut[i]);try{for(r.s();!(a=r.n()).done;){if(a.value.test(e))return}}catch(e){r.e(e)}finally{r.f()}}}catch(e){n.e(e)}finally{n.f()}}return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"SCHEMA_AMEX",get:function(){return Rt}},{key:"SCHEMA_CHINA_UNIONPAY",get:function(){return Pt}},{key:"SCHEMA_DINERS",get:function(){return Nt}},{key:"SCHEMA_DISCOVER",get:function(){return Ot}},{key:"SCHEMA_INSTAPAYMENT",get:function(){return Bt}},{key:"SCHEMA_JCB",get:function(){return"JCB"}},{key:"SCHEMA_LASER",get:function(){return kt}},{key:"SCHEMA_MAESTRO",get:function(){return It}},{key:"SCHEMA_MASTERCARD",get:function(){return Dt}},{key:"SCHEMA_MIR",get:function(){return"MIR"}},{key:"SCHEMA_UATP",get:function(){return Gt}},{key:"SCHEMA_VISA",get:function(){return wt}}]),n}(I),Zt={AD:/^AD\d{2}\d{4}\d{4}[\dA-Z]{12}$/,AE:/^AE\d{2}\d{3}\d{16}$/,AL:/^AL\d{2}\d{8}[\dA-Z]{16}$/,AO:/^AO\d{2}\d{21}$/,AT:/^AT\d{2}\d{5}\d{11}$/,AX:/^FI\d{2}\d{6}\d{7}\d{1}$/,AZ:/^AZ\d{2}[A-Z]{4}[\dA-Z]{20}$/,BA:/^BA\d{2}\d{3}\d{3}\d{8}\d{2}$/,BE:/^BE\d{2}\d{3}\d{7}\d{2}$/,BF:/^BF\d{2}\d{23}$/,BG:/^BG\d{2}[A-Z]{4}\d{4}\d{2}[\dA-Z]{8}$/,BH:/^BH\d{2}[A-Z]{4}[\dA-Z]{14}$/,BI:/^BI\d{2}\d{12}$/,BJ:/^BJ\d{2}[A-Z]{1}\d{23}$/,BY:/^BY\d{2}[\dA-Z]{4}\d{4}[\dA-Z]{16}$/,BL:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,BR:/^BR\d{2}\d{8}\d{5}\d{10}[A-Z][\dA-Z]$/,CG:/^CG\d{2}\d{23}$/,CH:/^CH\d{2}\d{5}[\dA-Z]{12}$/,CI:/^CI\d{2}[A-Z]{1}\d{23}$/,CM:/^CM\d{2}\d{23}$/,CR:/^CR\d{2}0\d{3}\d{14}$/,CV:/^CV\d{2}\d{21}$/,CY:/^CY\d{2}\d{3}\d{5}[\dA-Z]{16}$/,CZ:/^CZ\d{2}\d{20}$/,DE:/^DE\d{2}\d{8}\d{10}$/,DO:/^DO\d{2}[\dA-Z]{4}\d{20}$/,DK:/^DK\d{2}\d{4}\d{10}$/,DZ:/^DZ\d{2}\d{20}$/,EE:/^EE\d{2}\d{2}\d{2}\d{11}\d{1}$/,ES:/^ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}$/,FI:/^FI\d{2}\d{6}\d{7}\d{1}$/,FO:/^FO\d{2}\d{4}\d{9}\d{1}$/,FR:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GB:/^GB\d{2}[A-Z]{4}\d{6}\d{8}$/,GE:/^GE\d{2}[A-Z]{2}\d{16}$/,GI:/^GI\d{2}[A-Z]{4}[\dA-Z]{15}$/,GL:/^GL\d{2}\d{4}\d{9}\d{1}$/,GP:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GR:/^GR\d{2}\d{3}\d{4}[\dA-Z]{16}$/,GT:/^GT\d{2}[\dA-Z]{4}[\dA-Z]{20}$/,HR:/^HR\d{2}\d{7}\d{10}$/,HU:/^HU\d{2}\d{3}\d{4}\d{1}\d{15}\d{1}$/,IE:/^IE\d{2}[A-Z]{4}\d{6}\d{8}$/,IL:/^IL\d{2}\d{3}\d{3}\d{13}$/,IR:/^IR\d{2}\d{22}$/,IS:/^IS\d{2}\d{4}\d{2}\d{6}\d{10}$/,IT:/^IT\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,JO:/^JO\d{2}[A-Z]{4}\d{4}[\dA-Z]{18}$/,KW:/^KW\d{2}[A-Z]{4}\d{22}$/,KZ:/^KZ\d{2}\d{3}[\dA-Z]{13}$/,LB:/^LB\d{2}\d{4}[\dA-Z]{20}$/,LI:/^LI\d{2}\d{5}[\dA-Z]{12}$/,LT:/^LT\d{2}\d{5}\d{11}$/,LU:/^LU\d{2}\d{3}[\dA-Z]{13}$/,LV:/^LV\d{2}[A-Z]{4}[\dA-Z]{13}$/,MC:/^MC\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MD:/^MD\d{2}[\dA-Z]{2}[\dA-Z]{18}$/,ME:/^ME\d{2}\d{3}\d{13}\d{2}$/,MF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MG:/^MG\d{2}\d{23}$/,MK:/^MK\d{2}\d{3}[\dA-Z]{10}\d{2}$/,ML:/^ML\d{2}[A-Z]{1}\d{23}$/,MQ:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MR:/^MR13\d{5}\d{5}\d{11}\d{2}$/,MT:/^MT\d{2}[A-Z]{4}\d{5}[\dA-Z]{18}$/,MU:/^MU\d{2}[A-Z]{4}\d{2}\d{2}\d{12}\d{3}[A-Z]{3}$/,MZ:/^MZ\d{2}\d{21}$/,NC:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,NL:/^NL\d{2}[A-Z]{4}\d{10}$/,NO:/^NO\d{2}\d{4}\d{6}\d{1}$/,PF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PK:/^PK\d{2}[A-Z]{4}[\dA-Z]{16}$/,PL:/^PL\d{2}\d{8}\d{16}$/,PM:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PS:/^PS\d{2}[A-Z]{4}[\dA-Z]{21}$/,PT:/^PT\d{2}\d{4}\d{4}\d{11}\d{2}$/,QA:/^QA\d{2}[A-Z]{4}[\dA-Z]{21}$/,RE:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,RO:/^RO\d{2}[A-Z]{4}[\dA-Z]{16}$/,RS:/^RS\d{2}\d{3}\d{13}\d{2}$/,SA:/^SA\d{2}\d{2}[\dA-Z]{18}$/,SE:/^SE\d{2}\d{3}\d{16}\d{1}$/,SI:/^SI\d{2}\d{5}\d{8}\d{2}$/,SK:/^SK\d{2}\d{4}\d{6}\d{10}$/,SM:/^SM\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,SN:/^SN\d{2}[A-Z]{1}\d{23}$/,TF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,TL:/^TL\d{2}\d{3}\d{14}\d{2}$/,TN:/^TN59\d{2}\d{3}\d{13}\d{2}$/,TR:/^TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}$/,UA:/^UA\d{2}\d{6}[\dA-Z]{19}$/,VA:/^VA\d{2}\d{3}\d{15}$/,VG:/^VG\d{2}[A-Z]{4}\d{16}$/,WF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,XK:/^XK\d{2}\d{4}\d{10}\d{2}$/,YT:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/};var $t=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid International Bank Account Number (IBAN)."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/ /g,"",e.toUpperCase()),n=t.substring(0,2);return/^[A-Z0-9]+$/.test(t)&&function(e){return void 0!==F.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(n)&&void 0!==Zt[n]&&Zt[n].test(t)?1!==function(e){var t=0;return function(e,t){if(null===t&&(t=1),null===e||t<1)return!1;for(var n=[],a=0,i=(e+="").length;a=55296&&n<=56319){var a=n;return 1===t.length?n:1024*(a-55296)+(t.charCodeAt(1)-56320)+65536}return n}(e)-55:t+=e})),t}(t.substring(4)+t.substring(0,4)))?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(I),Ft={GF:"FR",PF:"FR",TF:"FR",GP:"FR",MQ:"FR",YT:"FR",NC:"FR",RE:"FR",PM:"FR",WF:"FR",JE:"GB",IM:"GB",GG:"GB",VG:"GB"};function Kt(e){return void 0!==F.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}var Yt=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid Business Identifier Code (BIC).",message_iban:"This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.",iban_path:null}}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{form:{}};if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var n=e.replace(/ /g,"",e);if(!([8,11].includes(n.length)&&/^[A-Z0-9]+$/.test(n)&&/^[A-Z]{4}/.test(n)&&Kt(n.substring(4,6))))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(null!==this.options.iban_path&&b(this.options.iban_path)){var a=t.form[this.options.iban_path];if(this.isEmptyValue(a))return;var i=a.substring(0,2),r=n.substring(4,6);if(i===r||i===Ft[r])return;return this.getViolationBuilder().setParameter("value",e).setParameter("iban",a).build(this.options.message_iban)}}}}]),n}(I),Ht=function(){function e(){r(this,e)}return s(e,[{key:"validate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[];return T(t)?(t.forEach((function(t){if(!(t instanceof I))return!1;var i=t.validate(e,n);void 0!==i&&a.push(i)})),a):a}}]),e}(),xt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,e),u(this,"constraints",[]),u(this,"options",{}),u(this,"transformers",[]),u(this,"reversTransformers",[]),this.constraints=t,this.options=n}return s(e,[{key:"getConstraints",value:function(){return this.constraints}},{key:"getOptions",value:function(){return this.options}},{key:"getTransformers",value:function(){return this.transformers}},{key:"getReverseTransformers",value:function(){return this.reversTransformers}},{key:"addTransformer",value:function(e){if(!C(e))throw new Error('Transformer must be type of "function", '.concat(i(e)," given."));return this.transformers.push(e),this}},{key:"addReverseTransformer",value:function(e){if(!C(e))throw new Error('Transformer must be type of "function", '.concat(i(e)," given."));return this.reversTransformers.push(e),this}},{key:"resetTransformers",value:function(){return this.transformers=[],this}},{key:"resetReverseTransformers",value:function(){return this.reversTransformers=[],this}}]),e}(),Wt="This form should not contain extra fields.",jt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),u(this,"validator",void 0),u(this,"violationBuilder",void 0),u(this,"fields",{}),u(this,"data",{}),u(this,"errors",{}),u(this,"transformers",[]),u(this,"reversTransformers",[]),this.options=c(c({},{extra_fields:!1,extra_fields_message:Wt}),t),this.validator=new Ht,this.violationBuilder=new N}return s(e,[{key:"add",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof e)throw new Error('The field should be type of "string", "'.concat(i(e),'" given.'));if(0===e.length)throw new Error("The field name is too short.");if(void 0!==t&&!T(t))throw new Error('The constants should be type of "array", "'.concat(i(t),'" given.'));if(void 0!==this.fields[e])throw new Error("The field ".concat(e," already exists in this form."));return this.fields[e]=new xt(T(t)?t:[],c(c({},{}),n)),this}},{key:"validate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.errors={},this.data=t,this.options.extra_fields||this.checkExtraFields(),Object.keys(this.errors).length>0||(this.data=P(this.transformers)(this.data,n),Object.keys(this.fields).forEach((function(t){var a=e.fields[t],i=c(c({},n),{field:a.getOptions(),form:e});e.data[t]=P(a.getTransformers())(e.data[t],i);var r=e.validator.validate(e.data[t],a.getConstraints(),i);r.length>0&&e.addValidationErrors(t,r),e.data[t]=P(a.getReverseTransformers())(e.data[t],i)})),this.data=P(this.reversTransformers)(this.data,n)),this.errors}},{key:"addValidationErrors",value:function(e,t){return T(this.errors[e])||(this.errors[e]=[]),T(t)?this.errors[e]=this.errors[e].concat(t):this.errors[e].push(t),this}},{key:"checkExtraFields",value:function(){for(var e=0,t=Object.keys(this.data);ee.length)&&(t=e.length);for(var n=0,a=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function y(e){return t=e,n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),("number"==typeof t||"string"==typeof t&&-1===n.indexOf(t.slice(-1)))&&""!==t&&!isNaN(t);var t,n}function A(e){return"[object Date]"===Object.prototype.toString.call(e)&&e instanceof Date}function E(e){return null===e}function T(e){return Array.isArray(e)}function C(e){return"function"==typeof e}function L(e){return!(+(t=e)!==t||isFinite(t)&&!(t%1));var t}function M(e){return(t=e)===+t&&isFinite(t)&&!(t%1);var t}function S(e){return"[object Array]"!==Object.prototype.toString.call(e)&&null!==e&&("object"===i(e)&&e===Object(e))}function b(e){return"string"==typeof e}function R(e){return"string"!=typeof e?e:function(e,t){var n=[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," "].join(""),a=0,i=0;for(e+="",t&&(n=(t+"").replace(/([[\]().?/*{}+$^:])/g,"$1")),a=e.length,i=0;i=0;i--)if(-1===n.indexOf(e.charAt(i))){e=e.substring(0,i+1);break}return-1===n.indexOf(e.charAt(0))?e:""}(e,[" ","\n","\r","\t","\f","\v"," "," "," "," "," "," "," "," "," "," "," "," ","​","\u2028","\u2029"," ","\0"].join(""))}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!T(e))throw new Error('Functions list must be type of "array", "'.concat(i(e),'" given.'));return e=e.filter((function(e){return C(e)})),function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 0===e.length?n:e.reduce((function(e,n){return n(e,c(c({},t),a))}),n)}}var N=function(){function e(){r(this,e),this.parameters={}}return s(e,[{key:"setParameter",value:function(e,t){if("string"!=typeof e||0===e.length)throw new Error("Invalid parameter name was provided: "+JSON.stringify(e));switch(!0){case void 0===t:t="undefined";break;case S(t):case T(t):try{t=JSON.stringify(t)}catch(e){t=t.toString()}break;case isNaN(t)&&"string"!=typeof t:t="NaN";break;case C(t):t="function() {}";break;case E(t):t="null";break;default:t+=""}return this.parameters["{{ ".concat(e," }}")]=t.toString(),this}},{key:"build",value:function(e){var t=this;if("string"!=typeof e)throw new Error("Invalid error message was provided.");return Object.keys(this.parameters).forEach((function(n){e=e.replace(n,t.parameters[n])})),this.parameters={},Error(e)}}]),e}(),O="en-US";var B=function(){function e(t){r(this,e),this.fallback=t||O}return s(e,[{key:"getUserLocales",value:function(){return e=this.fallback,t=[],"undefined"!=typeof window&&(window.navigator.languages&&(t=t.concat(window.navigator.languages)),window.navigator.language&&t.push(window.navigator.language),window.navigator.userLanguage&&t.push(window.navigator.userLanguage),window.navigator.browserLanguage&&t.push(window.navigator.browserLanguage),window.navigator.systemLanguage&&t.push(window.navigator.systemLanguage)),t.push(e),t.filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){if(!e||-1===e.indexOf("-")||e.toLowerCase()!==e)return e;var t=e.split("-");return"".concat(t[0],"-").concat(t[1].toUpperCase())}));var e,t}},{key:"getUserLocale",value:function(){return this.getUserLocales()[0]}}],[{key:"canonicalize",value:function(e){if("string"!=typeof e||0===e.length||"."===e.charAt(0))return O;var t=e.match(/^([a-z]{2})[-_]([a-z]{2})(?:([a-z]{2})(?:[-_]([a-z]{2}))?)?(?:\..*)?$/i);if(null===t)return e;var n,a=[t[1].toLowerCase()];return void 0===t[3]?a.push(t[2].toUpperCase()):a.push((n=t[2].toLowerCase()+t[3].toLowerCase(),(n+="").charAt(0).toUpperCase()+n.substr(1))),void 0!==t[4]&&a.push(t[4].toUpperCase()),a.join("_")}},{key:"DEFAULT_LOCALE",get:function(){return O}}]),e}(),k=new B,I=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.options=c(c({},this.getDefaultOptions()),n),this.getRequiredOptions().forEach((function(e){if(void 0===t.options[e])throw new Error('No "'.concat(e,'" option is configured.'))})),this.locale_string=this.options.locale_string||k.getUserLocale(),this.locale_options=this.options.locale_options||{},this.violationBuilder=new N}return s(e,[{key:"getDefaultOptions",value:function(){return{}}},{key:"getRequiredOptions",value:function(){return[]}},{key:"getViolationBuilder",value:function(){return this.violationBuilder}},{key:"validate",value:function(e,t){throw new Error("The validate() method was not implemented")}},{key:"isEmptyValue",value:function(e){return"string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==i(e)&&"function"!=typeof e&&isNaN(e)||null==e}},{key:"formatDateValue",value:function(e){return new Intl.DateTimeFormat(this.locale_string,this.locale_options).format(e)}}]),e}(),D=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),(e=t.call(this,a)).options.strict=!!e.options.strict,e}return s(n,[{key:"getDefaultOptions",value:function(){return{strict:!1,message_strict:"This values has different types. Given type is {{ value_type }}; Expected type is {{ compared_type }}."}}},{key:"getRequiredOptions",value:function(){return["value","strict"]}},{key:"compare",value:function(e,t){throw new Error("The compare() method was not implemented")}},{key:"validate",value:function(e){var t=this.options.value;return this.options.strict&&i(t)!==i(e)?this.getViolationBuilder().setParameter("value_type",A(e)?"Date object":i(e)).setParameter("compared_type",A(t)?"Date object":i(t)).build(this.options.message_strict):(A(t)&&(e="now"===e?new Date:new Date(e)),this.compare(e,t)?void 0:(e=A(e)?this.formatDateValue(e):e,t=A(t)?this.formatDateValue(t):t,this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",t).setParameter("compared_value_type",i(t)).build(this.options.message)))}}]),n}(I),G=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),(e=t.call(this,a)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message_min:"This value is too short. It should have {{ limit }} character(s) or more.",message_max:"This value is too long. It should have {{ limit }} character(s) or less.",message_exact:"This value should have exactly {{ limit }} character(s)."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),"string"==typeof e){var t=e.length;return null!==this.options.min&&this.options.min===this.options.max&&t!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&t>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&t0&&void 0!==arguments[0]?arguments[0]:{};r(this,n),e=t.call(this,a);var i=[w,U,V];if(!i.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:U,message:"This value is not valid email."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case w:if(!function(e){return/^.+@\S+\.\S+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case U:if(!function(e){return/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/.test(e)}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case V:if(!function(e){var t=document.createElement("input");return t.setAttribute("type","email"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_SIMPLE",get:function(){return w}},{key:"MODE_HTML5",get:function(){return U}},{key:"MODE_HTML5_INPUT",get:function(){return V}}]),n}(I),$=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be blank."}}},{key:"validate",value:function(e){if("string"==typeof e&&e.length>0||"string"!=typeof e&&"object"!==i(e)&&!isNaN(e)&&null!=e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),F=[{a2:"AF",a3:"AFG",n:"004"},{a2:"AX",a3:"ALA",n:"248"},{a2:"AL",a3:"ALB",n:"008"},{a2:"DZ",a3:"DZA",n:"012"},{a2:"AS",a3:"ASM",n:"016"},{a2:"AD",a3:"AND",n:"020"},{a2:"AO",a3:"AGO",n:"024"},{a2:"AI",a3:"AIA",n:"660"},{a2:"AQ",a3:"ATA",n:"010"},{a2:"AG",a3:"ATG",n:"028"},{a2:"AR",a3:"ARG",n:"032"},{a2:"AM",a3:"ARM",n:"051"},{a2:"AW",a3:"ABW",n:"533"},{a2:"AU",a3:"AUS",n:"036"},{a2:"AT",a3:"AUT",n:"040"},{a2:"AZ",a3:"AZE",n:"031"},{a2:"BS",a3:"BHS",n:"044"},{a2:"BH",a3:"BHR",n:"048"},{a2:"BD",a3:"BGD",n:"050"},{a2:"BB",a3:"BRB",n:"052"},{a2:"BY",a3:"BLR",n:"112"},{a2:"BE",a3:"BEL",n:"056"},{a2:"BZ",a3:"BLZ",n:"084"},{a2:"BJ",a3:"BEN",n:"204"},{a2:"BM",a3:"BMU",n:"060"},{a2:"BT",a3:"BTN",n:"064"},{a2:"BO",a3:"BOL",n:"068"},{a2:"BQ",a3:"BES",n:"535"},{a2:"BA",a3:"BIH",n:"070"},{a2:"BW",a3:"BWA",n:"072"},{a2:"BV",a3:"BVT",n:"074"},{a2:"BR",a3:"BRA",n:"076"},{a2:"IO",a3:"IOT",n:"086"},{a2:"BN",a3:"BRN",n:"096"},{a2:"BG",a3:"BGR",n:"100"},{a2:"BF",a3:"BFA",n:"854"},{a2:"BI",a3:"BDI",n:"108"},{a2:"CV",a3:"CPV",n:"132"},{a2:"KH",a3:"KHM",n:"116"},{a2:"CM",a3:"CMR",n:"120"},{a2:"CA",a3:"CAN",n:"124"},{a2:"KY",a3:"CYM",n:"136"},{a2:"CF",a3:"CAF",n:"140"},{a2:"TD",a3:"TCD",n:"148"},{a2:"CL",a3:"CHL",n:"152"},{a2:"CN",a3:"CHN",n:"156"},{a2:"CX",a3:"CXR",n:"162"},{a2:"CC",a3:"CCK",n:"166"},{a2:"CO",a3:"COL",n:"170"},{a2:"KM",a3:"COM",n:"174"},{a2:"CG",a3:"COG",n:"178"},{a2:"CD",a3:"COD",n:"180"},{a2:"CK",a3:"COK",n:"184"},{a2:"CR",a3:"CRI",n:"188"},{a2:"CI",a3:"CIV",n:"384"},{a2:"HR",a3:"HRV",n:"191"},{a2:"CU",a3:"CUB",n:"192"},{a2:"CW",a3:"CUW",n:"531"},{a2:"CY",a3:"CYP",n:"196"},{a2:"CZ",a3:"CZE",n:"203"},{a2:"DK",a3:"DNK",n:"208"},{a2:"DJ",a3:"DJI",n:"262"},{a2:"DM",a3:"DMA",n:"212"},{a2:"DO",a3:"DOM",n:"214"},{a2:"EC",a3:"ECU",n:"218"},{a2:"EG",a3:"EGY",n:"818"},{a2:"SV",a3:"SLV",n:"222"},{a2:"GQ",a3:"GNQ",n:"226"},{a2:"ER",a3:"ERI",n:"232"},{a2:"EE",a3:"EST",n:"233"},{a2:"SZ",a3:"SWZ",n:"748"},{a2:"ET",a3:"ETH",n:"231"},{a2:"FK",a3:"FLK",n:"238"},{a2:"FO",a3:"FRO",n:"234"},{a2:"FJ",a3:"FJI",n:"242"},{a2:"FI",a3:"FIN",n:"246"},{a2:"FR",a3:"FRA",n:"250"},{a2:"GF",a3:"GUF",n:"254"},{a2:"PF",a3:"PYF",n:"258"},{a2:"TF",a3:"ATF",n:"260"},{a2:"GA",a3:"GAB",n:"266"},{a2:"GM",a3:"GMB",n:"270"},{a2:"GE",a3:"GEO",n:"268"},{a2:"DE",a3:"DEU",n:"276"},{a2:"GH",a3:"GHA",n:"288"},{a2:"GI",a3:"GIB",n:"292"},{a2:"GR",a3:"GRC",n:"300"},{a2:"GL",a3:"GRL",n:"304"},{a2:"GD",a3:"GRD",n:"308"},{a2:"GP",a3:"GLP",n:"312"},{a2:"GU",a3:"GUM",n:"316"},{a2:"GT",a3:"GTM",n:"320"},{a2:"GG",a3:"GGY",n:"831"},{a2:"GN",a3:"GIN",n:"324"},{a2:"GW",a3:"GNB",n:"624"},{a2:"GY",a3:"GUY",n:"328"},{a2:"HT",a3:"HTI",n:"332"},{a2:"HM",a3:"HMD",n:"334"},{a2:"VA",a3:"VAT",n:"336"},{a2:"HN",a3:"HND",n:"340"},{a2:"HK",a3:"HKG",n:"344"},{a2:"HU",a3:"HUN",n:"348"},{a2:"IS",a3:"ISL",n:"352"},{a2:"IN",a3:"IND",n:"356"},{a2:"ID",a3:"IDN",n:"360"},{a2:"IR",a3:"IRN",n:"364"},{a2:"IQ",a3:"IRQ",n:"368"},{a2:"IE",a3:"IRL",n:"372"},{a2:"IM",a3:"IMN",n:"833"},{a2:"IL",a3:"ISR",n:"376"},{a2:"IT",a3:"ITA",n:"380"},{a2:"JM",a3:"JAM",n:"388"},{a2:"JP",a3:"JPN",n:"392"},{a2:"JE",a3:"JEY",n:"832"},{a2:"JO",a3:"JOR",n:"400"},{a2:"KZ",a3:"KAZ",n:"398"},{a2:"KE",a3:"KEN",n:"404"},{a2:"KI",a3:"KIR",n:"296"},{a2:"KP",a3:"PRK",n:"408"},{a2:"KR",a3:"KOR",n:"410"},{a2:"KW",a3:"KWT",n:"414"},{a2:"KG",a3:"KGZ",n:"417"},{a2:"LA",a3:"LAO",n:"418"},{a2:"LV",a3:"LVA",n:"428"},{a2:"LB",a3:"LBN",n:"422"},{a2:"LS",a3:"LSO",n:"426"},{a2:"LR",a3:"LBR",n:"430"},{a2:"LY",a3:"LBY",n:"434"},{a2:"LI",a3:"LIE",n:"438"},{a2:"LT",a3:"LTU",n:"440"},{a2:"LU",a3:"LUX",n:"442"},{a2:"MO",a3:"MAC",n:"446"},{a2:"MG",a3:"MDG",n:"450"},{a2:"MW",a3:"MWI",n:"454"},{a2:"MY",a3:"MYS",n:"458"},{a2:"MV",a3:"MDV",n:"462"},{a2:"ML",a3:"MLI",n:"466"},{a2:"MT",a3:"MLT",n:"470"},{a2:"MH",a3:"MHL",n:"584"},{a2:"MQ",a3:"MTQ",n:"474"},{a2:"MR",a3:"MRT",n:"478"},{a2:"MU",a3:"MUS",n:"480"},{a2:"YT",a3:"MYT",n:"175"},{a2:"MX",a3:"MEX",n:"484"},{a2:"FM",a3:"FSM",n:"583"},{a2:"MD",a3:"MDA",n:"498"},{a2:"MC",a3:"MCO",n:"492"},{a2:"MN",a3:"MNG",n:"496"},{a2:"ME",a3:"MNE",n:"499"},{a2:"MS",a3:"MSR",n:"500"},{a2:"MA",a3:"MAR",n:"504"},{a2:"MZ",a3:"MOZ",n:"508"},{a2:"MM",a3:"MMR",n:"104"},{a2:"NA",a3:"NAM",n:"516"},{a2:"NR",a3:"NRU",n:"520"},{a2:"NP",a3:"NPL",n:"524"},{a2:"NL",a3:"NLD",n:"528"},{a2:"NC",a3:"NCL",n:"540"},{a2:"NZ",a3:"NZL",n:"554"},{a2:"NI",a3:"NIC",n:"558"},{a2:"NE",a3:"NER",n:"562"},{a2:"NG",a3:"NGA",n:"566"},{a2:"NU",a3:"NIU",n:"570"},{a2:"NF",a3:"NFK",n:"574"},{a2:"MK",a3:"MKD",n:"807"},{a2:"MP",a3:"MNP",n:"580"},{a2:"NO",a3:"NOR",n:"578"},{a2:"OM",a3:"OMN",n:"512"},{a2:"PK",a3:"PAK",n:"586"},{a2:"PW",a3:"PLW",n:"585"},{a2:"PS",a3:"PSE",n:"275"},{a2:"PA",a3:"PAN",n:"591"},{a2:"PG",a3:"PNG",n:"598"},{a2:"PY",a3:"PRY",n:"600"},{a2:"PE",a3:"PER",n:"604"},{a2:"PH",a3:"PHL",n:"608"},{a2:"PN",a3:"PCN",n:"612"},{a2:"PL",a3:"POL",n:"616"},{a2:"PT",a3:"PRT",n:"620"},{a2:"PR",a3:"PRI",n:"630"},{a2:"QA",a3:"QAT",n:"634"},{a2:"RE",a3:"REU",n:"638"},{a2:"RO",a3:"ROU",n:"642"},{a2:"RU",a3:"RUS",n:"643"},{a2:"RW",a3:"RWA",n:"646"},{a2:"BL",a3:"BLM",n:"652"},{a2:"SH",a3:"SHN",n:"654"},{a2:"KN",a3:"KNA",n:"659"},{a2:"LC",a3:"LCA",n:"662"},{a2:"MF",a3:"MAF",n:"663"},{a2:"PM",a3:"SPM",n:"666"},{a2:"VC",a3:"VCT",n:"670"},{a2:"WS",a3:"WSM",n:"882"},{a2:"SM",a3:"SMR",n:"674"},{a2:"ST",a3:"STP",n:"678"},{a2:"SA",a3:"SAU",n:"682"},{a2:"SN",a3:"SEN",n:"686"},{a2:"RS",a3:"SRB",n:"688"},{a2:"SC",a3:"SYC",n:"690"},{a2:"SL",a3:"SLE",n:"694"},{a2:"SG",a3:"SGP",n:"702"},{a2:"SX",a3:"SXM",n:"534"},{a2:"SK",a3:"SVK",n:"703"},{a2:"SI",a3:"SVN",n:"705"},{a2:"SB",a3:"SLB",n:"090"},{a2:"SO",a3:"SOM",n:"706"},{a2:"ZA",a3:"ZAF",n:"710"},{a2:"GS",a3:"SGS",n:"239"},{a2:"SS",a3:"SSD",n:"728"},{a2:"ES",a3:"ESP",n:"724"},{a2:"LK",a3:"LKA",n:"144"},{a2:"SD",a3:"SDN",n:"729"},{a2:"SR",a3:"SUR",n:"740"},{a2:"SJ",a3:"SJM",n:"744"},{a2:"SE",a3:"SWE",n:"752"},{a2:"CH",a3:"CHE",n:"756"},{a2:"SY",a3:"SYR",n:"760"},{a2:"TW",a3:"TWN",n:"158"},{a2:"TJ",a3:"TJK",n:"762"},{a2:"TZ",a3:"TZA",n:"834"},{a2:"TH",a3:"THA",n:"764"},{a2:"TL",a3:"TLS",n:"626"},{a2:"TG",a3:"TGO",n:"768"},{a2:"TK",a3:"TKL",n:"772"},{a2:"TO",a3:"TON",n:"776"},{a2:"TT",a3:"TTO",n:"780"},{a2:"TN",a3:"TUN",n:"788"},{a2:"TR",a3:"TUR",n:"792"},{a2:"TM",a3:"TKM",n:"795"},{a2:"TC",a3:"TCA",n:"796"},{a2:"TV",a3:"TUV",n:"798"},{a2:"UG",a3:"UGA",n:"800"},{a2:"UA",a3:"UKR",n:"804"},{a2:"AE",a3:"ARE",n:"784"},{a2:"GB",a3:"GBR",n:"826"},{a2:"US",a3:"USA",n:"840"},{a2:"UM",a3:"UMI",n:"581"},{a2:"UY",a3:"URY",n:"858"},{a2:"UZ",a3:"UZB",n:"860"},{a2:"VU",a3:"VUT",n:"548"},{a2:"VE",a3:"VEN",n:"862"},{a2:"VN",a3:"VNM",n:"704"},{a2:"VG",a3:"VGB",n:"092"},{a2:"VI",a3:"VIR",n:"850"},{a2:"WF",a3:"WLF",n:"876"},{a2:"EH",a3:"ESH",n:"732"},{a2:"YE",a3:"YEM",n:"887"},{a2:"ZM",a3:"ZMB",n:"894"},{a2:"ZW",a3:"ZWE",n:"716"},{a2:"XK",a3:"XKX",n:"383"}],K="alpha2",Y="alpha3",H="numeric";var x=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,n),e=t.call(this,a);var i=[K,Y,H];if(!i.includes(e.options.mode))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid country.",mode:K}}},{key:"validate",value:function(e){if(y(e)&&(e=String(e).padStart(3,"0")),this.options.trim&&(e=R(e)),!this.isEmptyValue(e))return"string"==typeof e&&(function(e,t){return t===K&&void 0!==F.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return t===Y&&void 0!==F.find((function(t){return t.a3.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode)||function(e,t){return t===H&&void 0!==F.find((function(t){return t.n.toUpperCase()===e.toUpperCase()}))}(e,this.options.mode))?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}],[{key:"MODE_ALPHA2",get:function(){return K}},{key:"MODE_ALPHA3",get:function(){return Y}},{key:"MODE_NUMERIC",get:function(){return H}}]),n}(I),W=["ADP","AED","AFA","AFN","ALK","ALL","AMD","ANG","AOA","AOK","AON","AOR","ARA","ARL","ARM","ARP","ARS","ATS","AUD","AWG","AZM","AZN","BAD","BAM","BAN","BBD","BDT","BEC","BEF","BEL","BGL","BGM","BGN","BGO","BHD","BIF","BMD","BND","BOB","BOL","BOP","BOV","BRB","BRC","BRE","BRL","BRN","BRR","BRZ","BSD","BTN","BUK","BWP","BYB","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLE","CLF","CLP","CNH","CNX","CNY","COP","COU","CRC","CSD","CSK","CUC","CUP","CVE","CYP","CZK","DDM","DEM","DJF","DKK","DOP","DZD","ECS","ECV","EEK","EGP","ERN","ESA","ESB","ESP","ETB","EUR","FIM","FJD","FKP","FRF","GBP","GEK","GEL","GHC","GHS","GIP","GMD","GNF","GNS","GQE","GRD","GTQ","GWE","GWP","GYD","HKD","HNL","HRD","HRK","HTG","HUF","IDR","IEP","ILP","ILR","ILS","INR","IQD","IRR","ISJ","ISK","ITL","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRH","KRO","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LTT","LUC","LUF","LUL","LVL","LVR","LYD","MAD","MAF","MCF","MDC","MDL","MGA","MGF","MKD","MKN","MLF","MMK","MNT","MOP","MRO","MRU","MTL","MTP","MUR","MVP","MVR","MWK","MXN","MXP","MXV","MYR","MZE","MZM","MZN","NAD","NGN","NIC","NIO","NLG","NOK","NPR","NZD","OMR","PAB","PEI","PEN","PES","PGK","PHP","PKR","PLN","PLZ","PTE","PYG","QAR","RHD","ROL","RON","RSD","RUB","RUR","RWF","SAR","SBD","SCR","SDD","SDG","SDP","SEK","SGD","SHP","SIT","SKK","SLL","SOS","SRD","SRG","SSP","STD","STN","SUR","SVC","SYP","SZL","THB","TJR","TJS","TMM","TMT","TND","TOP","TPE","TRL","TRY","TTD","TWD","TZS","UAH","UAK","UGS","UGX","USD","USN","USS","UYI","UYP","UYU","UYW","UZS","VEB","VEF","VES","VND","VNN","VUV","WST","XAF","XCD","XEU","XFO","XFU","XOF","XPF","XRE","YDD","YER","YUD","YUM","YUN","YUR","ZAL","ZAR","ZMK","ZMW","ZRN","ZRZ","ZWD","ZWL","ZWR"],j=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid currency."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e))return"string"==typeof e&&W.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),J=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be blank.",allow_null:!1}}},{key:"validate",value:function(e){if("string"==typeof e&&0===e.length||"string"!=typeof e&&"object"!==i(e)&&isNaN(e)||void 0===e||!this.options.allow_null&&null===e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),z="regexp",X="url_api",q="html5";var Q=function(e){d(n,e);var t=_(n);function n(e){var a;if(r(this,n),a=t.call(this,e),![z,X,q].includes(a.options.mode))throw new Error("Invalid validation mode provided: ".concat(a.options.mode));return a}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:X,message:"This value is not a valid URL."}}},{key:"getRequiredOptions",value:function(){return["mode"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),"string"==typeof e&&!this.isEmptyValue(e))switch(this.options.mode){case z:if(!function(e){return!(null===e.match(/^(https?:\/\/|ftps?:\/\/)?([a-z0-9%\-]+\.){1,}([a-z0-9\-]+)?(:(\d{1,5}))?(\/([a-z0-9\-._~:\/\?#\[\]@!$&'\(\)\*\+,;=%]+)?)?$/i))}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case X:if(!function(e){try{new URL(e)}catch(e){return!1}return!0}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case q:if(!function(e){var t=document.createElement("input");return t.setAttribute("type","url"),t.setAttribute("value",e),t.checkValidity()}(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"MODE_REGEXP",get:function(){return z}},{key:"MODE_URL_API",get:function(){return X}},{key:"MODE_HTML5",get:function(){return q}}]),n}(I),ee=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be false."}}},{key:"validate",value:function(e){if(!1!==e&&0!==e&&"0"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),te=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be true."}}},{key:"validate",value:function(e){if(!0!==e&&1!==e&&"1"!==e&&null!==e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),ne=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be valid JSON."}}},{key:"validate",value:function(e){try{JSON.parse(e)}catch(t){return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(I),ae=function(e){d(n,e);var t=_(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return A(e)&&A(t)?e.getTime()===t.getTime():e==t}}]),n}(D),ie=function(e){d(n,e);var t=_(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should not be equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return A(e)&&A(t)?e.getTime()!==t.getTime():e!=t}}]),n}(D),re=function(e){d(n,e);var t=_(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return A(e)&&A(t)?e.getTime()>t.getTime():e>t}}]),n}(D),oe=function(e){d(n,e);var t=_(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be greater than or equal to {{ compared_value }}."})}},{key:"compare",value:function(e,t){return A(e)&&A(t)?e.getTime()>=t.getTime():e>=t}}]),n}(D),se=function(e){d(n,e);var t=_(n);function n(){return r(this,n),t.apply(this,arguments)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be less than {{ compared_value }}."})}},{key:"compare",value:function(e,t){return A(e)&&A(t)?e.getTime()0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),e.strict=!0,e.value=0,t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative."})}}]),n}(se),ce=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),e.strict=!0,e.value=0,t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be negative or zero."})}}]),n}(ue),de=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),e.strict=!0,e.value=0,t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive."})}}]),n}(re),pe=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),e.strict=!0,e.value=0,t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return c(c({},m(p(n.prototype),"getDefaultOptions",this).call(this)),{message:"This value should be positive or zero."})}}]),n}(oe),fe=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be null."}}},{key:"validate",value:function(e){if(!E(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),he=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should not be null."}}},{key:"validate",value:function(e){if(E(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),_e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},me=function(e){return!("undefined"!=typeof process||!process.env||!process.env[e])&&process.env[e]},ve="function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?function(e){return i(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":i(e)},ge=function(e,t){var n=me,a="",i=[],r=0,o=function e(t){if(t instanceof RegExp)return new RegExp(t);if(t instanceof Date)return new Date(t);var n={};for(var a in t)"object"===ve(t[a])?n[a]=e(t[a]):n[a]=t[a];return n},s="undefined"!=typeof window?window:_e;s.$locutus=s.$locutus||{};var u=s.$locutus;if(u.php=u.php||{},u.php.locales&&u.php.locales.fr_CA&&u.php.locales.fr_CA.LC_TIME&&u.php.locales.fr_CA.LC_TIME.x||(u.php.locales={},u.php.locales.en={LC_COLLATE:function(e,t){return e===t?0:e>t?1:-1},LC_CTYPE:{an:/^[A-Za-z\d]+$/g,al:/^[A-Za-z]+$/g,ct:/^[\u0000-\u001F\u007F]+$/g,dg:/^[\d]+$/g,gr:/^[\u0021-\u007E]+$/g,lw:/^[a-z]+$/g,pr:/^[\u0020-\u007E]+$/g,pu:/^[\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]+$/g,sp:/^[\f\n\r\t\v ]+$/g,up:/^[A-Z]+$/g,xd:/^[A-Fa-f\d]+$/g,CODESET:"UTF-8",lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"},LC_TIME:{a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %r %Z",p:["AM","PM"],P:["am","pm"],r:"%I:%M:%S %p",x:"%m/%d/%Y",X:"%r",alt_digits:"",ERA:"",ERA_YEAR:"",ERA_D_T_FMT:"",ERA_D_FMT:"",ERA_T_FMT:""},LC_MONETARY:{int_curr_symbol:"USD",currency_symbol:"$",mon_decimal_point:".",mon_thousands_sep:",",mon_grouping:[3],positive_sign:"",negative_sign:"-",int_frac_digits:2,frac_digits:2,p_cs_precedes:1,p_sep_by_space:0,n_cs_precedes:1,n_sep_by_space:0,p_sign_posn:3,n_sign_posn:0},LC_NUMERIC:{decimal_point:".",thousands_sep:",",grouping:[3]},LC_MESSAGES:{YESEXPR:"^[yY].*",NOEXPR:"^[nN].*",YESSTR:"",NOSTR:""},nplurals:function(e){return 1!==e?1:0}},u.php.locales.en_US=o(u.php.locales.en),u.php.locales.en_US.LC_TIME.c="%a %d %b %Y %r %Z",u.php.locales.en_US.LC_TIME.x="%D",u.php.locales.en_US.LC_TIME.X="%r",u.php.locales.en_US.LC_MONETARY.int_curr_symbol="USD ",u.php.locales.en_US.LC_MONETARY.p_sign_posn=1,u.php.locales.en_US.LC_MONETARY.n_sign_posn=1,u.php.locales.en_US.LC_MONETARY.mon_grouping=[3,3],u.php.locales.en_US.LC_NUMERIC.thousands_sep="",u.php.locales.en_US.LC_NUMERIC.grouping=[],u.php.locales.en_GB=o(u.php.locales.en),u.php.locales.en_GB.LC_TIME.r="%l:%M:%S %P %Z",u.php.locales.en_AU=o(u.php.locales.en_GB),u.php.locales.C=o(u.php.locales.en),u.php.locales.C.LC_CTYPE.CODESET="ANSI_X3.4-1968",u.php.locales.C.LC_MONETARY={int_curr_symbol:"",currency_symbol:"",mon_decimal_point:"",mon_thousands_sep:"",mon_grouping:[],p_cs_precedes:127,p_sep_by_space:127,n_cs_precedes:127,n_sep_by_space:127,p_sign_posn:127,n_sign_posn:127,positive_sign:"",negative_sign:"",int_frac_digits:127,frac_digits:127},u.php.locales.C.LC_NUMERIC={decimal_point:".",thousands_sep:"",grouping:[]},u.php.locales.C.LC_TIME.c="%a %b %e %H:%M:%S %Y",u.php.locales.C.LC_TIME.x="%m/%d/%y",u.php.locales.C.LC_TIME.X="%H:%M:%S",u.php.locales.C.LC_MESSAGES.YESEXPR="^[yY]",u.php.locales.C.LC_MESSAGES.NOEXPR="^[nN]",u.php.locales.fr=o(u.php.locales.en),u.php.locales.fr.nplurals=function(e){return e>1?1:0},u.php.locales.fr.LC_TIME.a=["dim","lun","mar","mer","jeu","ven","sam"],u.php.locales.fr.LC_TIME.A=["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],u.php.locales.fr.LC_TIME.b=["jan","fév","mar","avr","mai","jun","jui","aoû","sep","oct","nov","déc"],u.php.locales.fr.LC_TIME.B=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],u.php.locales.fr.LC_TIME.c="%a %d %b %Y %T %Z",u.php.locales.fr.LC_TIME.p=["",""],u.php.locales.fr.LC_TIME.P=["",""],u.php.locales.fr.LC_TIME.x="%d.%m.%Y",u.php.locales.fr.LC_TIME.X="%T",u.php.locales.fr_CA=o(u.php.locales.fr),u.php.locales.fr_CA.LC_TIME.x="%Y-%m-%d"),!u.php.locale&&(u.php.locale="en_US","undefined"!=typeof window&&window.document)){var l=window.document,c="https://www.w3.org/1999/xhtml",d="https://www.w3.org/XML/1998/namespace";l.getElementsByTagNameNS&&l.getElementsByTagNameNS(c,"html")[0]?l.getElementsByTagNameNS(c,"html")[0].getAttributeNS&&l.getElementsByTagNameNS(c,"html")[0].getAttributeNS(d,"lang")?u.php.locale=l.getElementsByTagName(c,"html")[0].getAttributeNS(d,"lang"):l.getElementsByTagNameNS(c,"html")[0].lang&&(u.php.locale=l.getElementsByTagNameNS(c,"html")[0].lang):l.getElementsByTagName("html")[0]&&l.getElementsByTagName("html")[0].lang&&(u.php.locale=l.getElementsByTagName("html")[0].lang)}if(u.php.locale=u.php.locale.replace("-","_"),u.php.locale in u.php.locales||u.php.locale.replace(/_[a-zA-Z]+$/,"")in u.php.locales&&(u.php.locale=u.php.locale.replace(/_[a-zA-Z]+$/,"")),u.php.localeCategories||(u.php.localeCategories={LC_COLLATE:u.php.locale,LC_CTYPE:u.php.locale,LC_MONETARY:u.php.locale,LC_NUMERIC:u.php.locale,LC_TIME:u.php.locale,LC_MESSAGES:u.php.locale}),null===t||""===t)t=n(e)||n("LANG");else if("[object Array]"===Object.prototype.toString.call(t))for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{};r(this,n),e=t.call(this,a);var i=[Ae,Ee,Te,Ce,Le,Me,Re,Pe,Ne,Oe,Be,Se,be,ke,Ie,De,Ge,we,Ue,Ve,Ze,$e,Fe,Ke];if(!i.includes(e.options.type))throw new Error("Invalid type provided: ".concat(e.options.type));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be of type {{ type }}."}}},{key:"getRequiredOptions",value:function(){return["type"]}},{key:"validate",value:function(e){var t,n=!1;switch(this.options.type){case Ae:n=T(e);break;case Ee:n=A(e);break;case Te:case Ce:n=!0===(t=e)||!1===t;break;case Le:n=C(e);break;case Me:case Se:n=L(e);break;case be:case Re:n=M(e);break;case Pe:n=E(e);break;case Ne:n=y(e);break;case Oe:n=S(e);break;case Be:n=b(e);break;case ke:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.an)}(e);break;case Ie:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.al)}(e);break;case De:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.ct)}(e);break;case Ge:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.dg)}(e);break;case we:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.gr)}(e);break;case Ue:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.lw)}(e);break;case Ve:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pr)}(e);break;case Ze:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.pu)}(e);break;case $e:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.sp)}(e);break;case Fe:n=ye(e);break;case Ke:n=function(e){if("string"!=typeof e)return!1;ge("LC_ALL",0);var t="undefined"!=typeof window?window:_e;t.$locutus=t.$locutus||{};var n=t.$locutus.php;return-1!==e.search(n.locales[n.localeCategories.LC_CTYPE].LC_CTYPE.xd)}(e)}if(!n)return this.getViolationBuilder().setParameter("value",e).setParameter("type",this.options.type).build(this.options.message)}}],[{key:"TYPE_ARRAY",get:function(){return Ae}},{key:"TYPE_DATE",get:function(){return Ee}},{key:"TYPE_BOOL",get:function(){return Te}},{key:"TYPE_BOOLEAN",get:function(){return Ce}},{key:"TYPE_FUNCTION",get:function(){return Le}},{key:"TYPE_FLOAT",get:function(){return Me}},{key:"TYPE_DOUBLE",get:function(){return Se}},{key:"TYPE_INT",get:function(){return be}},{key:"TYPE_INTEGER",get:function(){return Re}},{key:"TYPE_NULL",get:function(){return Pe}},{key:"TYPE_NUMERIC",get:function(){return Ne}},{key:"TYPE_OBJECT",get:function(){return Oe}},{key:"TYPE_STRING",get:function(){return Be}},{key:"CTYPE_ALNUM",get:function(){return ke}},{key:"CTYPE_ALPHA",get:function(){return Ie}},{key:"CTYPE_CNTRL",get:function(){return De}},{key:"CTYPE_DIGIT",get:function(){return Ge}},{key:"CTYPE_GRAPH",get:function(){return we}},{key:"CTYPE_LOWER",get:function(){return Ue}},{key:"CTYPE_PRINT",get:function(){return Ve}},{key:"CTYPE_PUNCT",get:function(){return Ze}},{key:"CTYPE_SPACE",get:function(){return $e}},{key:"CTYPE_UPPER",get:function(){return Fe}},{key:"CTYPE_XDIGIT",get:function(){return Ke}}]),n}(I),He=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r(this,n),!(e=t.call(this,a)).options.choices||!T(e.options.choices))throw new Error('Choices list should be type of "array", "'.concat(i(e.options.choices),'" given.'));return(e.options.min||e.options.max)&&(e.options.multiple=!0),e}return s(n,[{key:"getDefaultOptions",value:function(){return{multiple:!1,min:0,max:0,message:"The value you selected is not a valid choice.",message_min:"You must select at least {{ limit }} choices.",message_max:"You must select at most {{ limit }} choices.",message_multiple:"One or more of the given values is invalid."}}},{key:"getRequiredOptions",value:function(){return["choices"]}},{key:"validate",value:function(e){if(this.options.multiple&&!Array.isArray(e))return this.getViolationBuilder().build('Values list should be type of "array", "'.concat(i(e),'" given.'));if(!this.isEmptyValue(e))if(this.options.multiple){for(var t=0;t0&&e.length0&&e.length>this.options.max)return this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message_max)}else if(!this.options.choices.includes(e))return this.getViolationBuilder().setParameter("value",e).setParameter("choices",this.options.choices.join(", ")).build(this.options.message)}}]),n}(I),xe='Provided value should be countable, "{{ type }}" given.',We=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),(e=t.call(this,a)).options.min=parseInt(e.options.min,10),e.options.max=parseInt(e.options.max,10),e}return s(n,[{key:"getDefaultOptions",value:function(){return{message_min:"This collection should contain {{ limit }} elements or more.",message_max:"This collection should contain {{ limit }} elements or less.",message_exact:"This collection should contain exactly {{ limit }} elements."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){if(null==(t=e)||b(t)||!(T(t)||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Map||t instanceof Set||t instanceof WeakMap||t instanceof WeakSet||t instanceof ArrayBuffer))return this.getViolationBuilder().setParameter("type",i(e)).build(xe);var t,n;switch(!0){case e.hasOwnProperty("size")||e instanceof Map||e instanceof Set:n=e.size;break;case e instanceof ArrayBuffer:n=e.byteLength;break;default:n=e.length}return void 0===n?this.getViolationBuilder().setParameter("type",i(e)).build(xe):null!==this.options.min&&this.options.min===this.options.max&&n!==this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_exact):null!==this.options.max&&n>this.options.max?this.getViolationBuilder().setParameter("limit",this.options.max).setParameter("value",e).build(this.options.message_max):null!==this.options.min&&n0&&void 0!==arguments[0]?arguments[0]:{};return r(this,a),n.call(this,e)}return s(a,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid timezone."}}},{key:"validate",value:function(t){if(this.options.trim&&(t=R(t)),!this.isEmptyValue(t))return"string"==typeof t&&e.DateTime.local().setZone(t).isValid?void 0:this.getViolationBuilder().setParameter("value",t).build(this.options.message)}}]),a}(I),ze=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r(this,n),!(e=t.call(this,a)).options.value||!y(e.options.value))throw new Error('Value should be type of "number", "'.concat(i(e.options.value),'" given.'));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value should be a multiple of {{ compared_value }}.",message_type:'This values has different types. Given type is "{{ current_type }}"; Expected type is "{{ expected_type }}".'}}},{key:"getRequiredOptions",value:function(){return["value"]}},{key:"validate",value:function(e){if(!this.isEmptyValue(e))return y(e)?e%this.options.value!=0?this.getViolationBuilder().setParameter("compared_value",this.options.value).setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).setParameter("compared_value",this.options.value).setParameter("current_type",i(e)).setParameter("expected_type","number").build(this.options.message_type)}}]),n}(I),Xe="all",qe="4",Qe="6",et="4_no_priv",tt="6_no_priv",nt="all_no_priv",at="4_no_res",it="6_no_res",rt="all_no_res",ot="4_pub",st="6_pub",ut="all_pub";function lt(e,t){var n=a.default.parse(e);return"ipv4"===n.kind()&&!((t===et||t===nt)&&"private"===n.range()||(t===at||t===rt)&&"reserved"===n.range()||(t===ot||t===ut)&&("private"===n.range()||"reserved"===n.range()))}function ct(e,t){var n=a.default.parse(e);return"ipv6"===n.kind()&&!((t===tt||t===nt)&&"uniqueLocal"===n.range()||(t===it||t===rt)&&"reserved"===n.range()||(t===st||t===ut)&&("uniqueLocal"===n.range()||"reserved"===n.range()))}var dt=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,n),e=t.call(this,a);var i=[Xe,qe,Qe,et,tt,nt,at,it,rt,ot,st,ut];if(!i.includes(e.options.version))throw new Error("Invalid validation version provided: ".concat(e.options.version));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,version:qe,message:"This is not a valid IP address."}}},{key:"getRequiredOptions",value:function(){return["version"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!("string"==typeof e&&0===e.length||"string"!=typeof e&&isNaN(e)||null==e)){if(!a.default.isValid(e)||!a.default.IPv4.isValidFourPartDecimal(e)&&!a.default.IPv6.isValid(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);switch(this.options.version){case qe:case et:case at:case ot:if(!lt(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case Qe:case tt:case it:case st:if(!ct(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);break;case nt:case rt:case ut:if(!lt(e,this.options.version)&&!ct(e,this.options.version))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}}],[{key:"MODE_ALL",get:function(){return Xe}},{key:"MODE_V4",get:function(){return qe}},{key:"MODE_V6",get:function(){return Qe}},{key:"MODE_V4_NO_PRIV",get:function(){return et}},{key:"MODE_V6_NO_PRIV",get:function(){return tt}},{key:"MODE_ALL_NO_PRIV",get:function(){return nt}},{key:"MODE_V4_NO_RES",get:function(){return at}},{key:"MODE_V6_NO_RES",get:function(){return it}},{key:"MODE_ALL_NO_RES",get:function(){return rt}},{key:"MODE_V4_PUB",get:function(){return ot}},{key:"MODE_V6_PUB",get:function(){return st}},{key:"MODE_ALL_PUB",get:function(){return ut}}]),n}(I),pt=["AB","AA","AF","AK","SQ","AM","AR","AN","HY","AS","AV","AE","AY","AZ","BM","BA","EU","BE","BN","BH","BI","BS","BR","BG","MY","CA","CH","CE","NY","ZH","ZH-HANS","ZH-HANT","CV","KW","CO","CR","HR","CS","DA","DV","NL","DZ","EN","EO","ET","EE","FO","FJ","FI","FR","FF","GL","GD","GV","KA","DE","EL","KL","GN","GU","HT","HA","HE","HZ","HI","HO","HU","IS","IO","IG","IN","IA","IE","IU","IK","GA","IT","JA","JV","KL","KN","KR","KS","KK","KM","KI","RW","RN","KY","KV","KG","KO","KU","KJ","LO","LA","LV","LI","LN","LT","LU","LG","LB","GV","MK","MG","MS","ML","MT","MI","MR","MH","MO","MN","NA","NV","NG","ND","NE","NO","NB","NN","II","OC","OJ","CU","OR","OM","OS","PI","PS","FA","PL","PT","PA","QU","RM","RO","RU","SE","SM","SG","SA","SR","SH","ST","TN","SN","II","SD","SI","SS","SK","SL","SO","NR","ES","SU","SW","SS","SV","TL","TY","TG","TA","TT","TE","TH","BO","TI","TO","TS","TR","TK","TW","UG","UK","UR","UZ","VE","VI","VO","WA","CY","WO","FY","XH","YI","YO","ZA","ZU"],ft=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid language."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e))return"string"==typeof e&&pt.includes(e.toUpperCase())?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),ht=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r(this,n),!C((e=t.call(this,a)).options.callback))throw new Error('Value should be type of "function", "'.concat(i(e.options.callback),'" given.'));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{message:"This value is not a valid."}}},{key:"getRequiredOptions",value:function(){return["callback"]}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.options.callback(e,t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}]),n}(I),_t=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r(this,n),"string"!=typeof(e=t.call(this,a)).options.pattern&&!(e.options.pattern instanceof RegExp))throw new Error('Pattern should be type of "string", '.concat(i(e.options.pattern)," given."));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!1,match:!0,message:"This value is not valid."}}},{key:"getRequiredOptions",value:function(){return["pattern"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){if("string"!=typeof e)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);var t=new RegExp(this.options.pattern);return this.options.match&&!t.test(e)||!this.options.match&&t.test(e)?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(I),mt=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,n);var o=!(void 0===(e=t.call(this,a)).options.min||null===e.options.min),s=!(void 0===e.options.max||null===e.options.max);if(o&&!y(e.options.min)&&!A(e.options.min))throw new Error('Min limit should be type of "number" or "Date", "'.concat(i(e.options.min),'" given.'));if(s&&!y(e.options.max)&&!A(e.options.max))throw new Error('Max limit should be type of "number" or "Date", "'.concat(i(e.options.max),'" given.'));if(o&&s){if(y(e.options.min)&&!y(e.options.max))throw new Error('Max limit should be type of "number", "'.concat(i(e.options.max),'" given.'));if(A(e.options.min)&&!A(e.options.max))throw new Error('Max limit should be type of "Date", "'.concat(i(e.options.max),'" given.'))}return e.options.min=y(e.options.min)?parseFloat(e.options.min):e.options.min,e.options.max=y(e.options.max)?parseFloat(e.options.max):e.options.max,e}return s(n,[{key:"getDefaultOptions",value:function(){return{message_min:"This value should be {{ limit }} or more.",message_max:"This value should be {{ limit }} or less.",message:"This value should be between {{ min }} and {{ max }}."}}},{key:"getRequiredOptions",value:function(){var e=void 0===this.options.min||null===this.options.min,t=void 0===this.options.max||null===this.options.max;return e&&t?["min","max"]:[]}},{key:"validate",value:function(e){(A(this.options.min)||A(this.options.max))&&(e="now"===e?new Date:new Date(e));var t=!(void 0===this.options.min||null===this.options.min),n=!(void 0===this.options.max||null===this.options.max);return this.isEmptyValue(e)||t&&n&&(ethis.options.max)||!A(this.options.min)&&!A(this.options.max)&&A(e)?this.getViolationBuilder().setParameter("min",A(this.options.min)?this.formatDateValue(this.options.min):this.options.min).setParameter("max",A(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",A(e)?this.formatDateValue(e):e).build(this.options.message):t&&ethis.options.max?this.getViolationBuilder().setParameter("limit",A(this.options.max)?this.formatDateValue(this.options.max):this.options.max).setParameter("value",A(e)?this.formatDateValue(e):e).build(this.options.message_max):void 0}}]),n}(I),vt=["af","af_NA","af_ZA","ak","ak_GH","am","am_ET","ar","ar_AE","ar_BH","ar_DJ","ar_DZ","ar_EG","ar_EH","ar_ER","ar_IL","ar_IQ","ar_JO","ar_KM","ar_KW","ar_LB","ar_LY","ar_MA","ar_MR","ar_OM","ar_PS","ar_QA","ar_SA","ar_SD","ar_SO","ar_SS","ar_SY","ar_TD","ar_TN","ar_YE","as","as_IN","az","az_AZ","az_Cyrl","az_Cyrl_AZ","az_Latn","az_Latn_AZ","be","be_BY","bg","bg_BG","bm","bm_ML","bn","bn_BD","bn_IN","bo","bo_CN","bo_IN","br","br_FR","bs","bs_BA","bs_Cyrl","bs_Cyrl_BA","bs_Latn","bs_Latn_BA","ca","ca_AD","ca_ES","ca_FR","ca_IT","ce","ce_RU","cs","cs_CZ","cy","cy_GB","da","da_DK","da_GL","de","de_AT","de_BE","de_CH","de_DE","de_IT","de_LI","de_LU","dz","dz_BT","ee","ee_GH","ee_TG","el","el_CY","el_GR","en","en_AE","en_AG","en_AI","en_AS","en_AT","en_AU","en_BB","en_BE","en_BI","en_BM","en_BS","en_BW","en_BZ","en_CA","en_CC","en_CH","en_CK","en_CM","en_CX","en_CY","en_DE","en_DK","en_DM","en_ER","en_FI","en_FJ","en_FK","en_FM","en_GB","en_GD","en_GG","en_GH","en_GI","en_GM","en_GU","en_GY","en_HK","en_IE","en_IL","en_IM","en_IN","en_IO","en_JE","en_JM","en_KE","en_KI","en_KN","en_KY","en_LC","en_LR","en_LS","en_MG","en_MH","en_MO","en_MP","en_MS","en_MT","en_MU","en_MW","en_MY","en_NA","en_NF","en_NG","en_NL","en_NR","en_NU","en_NZ","en_PG","en_PH","en_PK","en_PN","en_PR","en_PW","en_RW","en_SB","en_SC","en_SD","en_SE","en_SG","en_SH","en_SI","en_SL","en_SS","en_SX","en_SZ","en_TC","en_TK","en_TO","en_TT","en_TV","en_TZ","en_UG","en_UM","en_US","en_VC","en_VG","en_VI","en_VU","en_WS","en_ZA","en_ZM","en_ZW","eo","es","es_AR","es_BO","es_BR","es_BZ","es_CL","es_CO","es_CR","es_CU","es_DO","es_EC","es_ES","es_GQ","es_GT","es_HN","es_MX","es_NI","es_PA","es_PE","es_PH","es_PR","es_PY","es_SV","es_US","es_UY","es_VE","et","et_EE","eu","eu_ES","fa","fa_AF","fa_IR","ff","ff_CM","ff_GN","ff_Latn","ff_Latn_BF","ff_Latn_CM","ff_Latn_GH","ff_Latn_GM","ff_Latn_GN","ff_Latn_GW","ff_Latn_LR","ff_Latn_MR","ff_Latn_NE","ff_Latn_NG","ff_Latn_SL","ff_Latn_SN","ff_MR","ff_SN","fi","fi_FI","fo","fo_DK","fo_FO","fr","fr_BE","fr_BF","fr_BI","fr_BJ","fr_BL","fr_CA","fr_CD","fr_CF","fr_CG","fr_CH","fr_CI","fr_CM","fr_DJ","fr_DZ","fr_FR","fr_GA","fr_GF","fr_GN","fr_GP","fr_GQ","fr_HT","fr_KM","fr_LU","fr_MA","fr_MC","fr_MF","fr_MG","fr_ML","fr_MQ","fr_MR","fr_MU","fr_NC","fr_NE","fr_PF","fr_PM","fr_RE","fr_RW","fr_SC","fr_SN","fr_SY","fr_TD","fr_TG","fr_TN","fr_VU","fr_WF","fr_YT","fy","fy_NL","ga","ga_GB","ga_IE","gd","gd_GB","gl","gl_ES","gu","gu_IN","gv","gv_IM","ha","ha_GH","ha_NE","ha_NG","he","he_IL","hi","hi_IN","hr","hr_BA","hr_HR","hu","hu_HU","hy","hy_AM","ia","id","id_ID","ig","ig_NG","ii","ii_CN","is","is_IS","it","it_CH","it_IT","it_SM","it_VA","ja","ja_JP","jv","jv_ID","ka","ka_GE","ki","ki_KE","kk","kk_KZ","kl","kl_GL","km","km_KH","kn","kn_IN","ko","ko_KP","ko_KR","ks","ks_IN","ku","ku_TR","kw","kw_GB","ky","ky_KG","lb","lb_LU","lg","lg_UG","ln","ln_AO","ln_CD","ln_CF","ln_CG","lo","lo_LA","lt","lt_LT","lu","lu_CD","lv","lv_LV","mg","mg_MG","mi","mi_NZ","mk","mk_MK","ml","ml_IN","mn","mn_MN","mr","mr_IN","ms","ms_BN","ms_MY","ms_SG","mt","mt_MT","my","my_MM","nb","nb_NO","nb_SJ","nd","nd_ZW","ne","ne_IN","ne_NP","nl","nl_AW","nl_BE","nl_BQ","nl_CW","nl_NL","nl_SR","nl_SX","nn","nn_NO","no","no_NO","om","om_ET","om_KE","or","or_IN","os","os_GE","os_RU","pa","pa_Arab","pa_Arab_PK","pa_Guru","pa_Guru_IN","pa_IN","pa_PK","pl","pl_PL","ps","ps_AF","ps_PK","pt","pt_AO","pt_BR","pt_CH","pt_CV","pt_GQ","pt_GW","pt_LU","pt_MO","pt_MZ","pt_PT","pt_ST","pt_TL","qu","qu_BO","qu_EC","qu_PE","rm","rm_CH","rn","rn_BI","ro","ro_MD","ro_RO","ru","ru_BY","ru_KG","ru_KZ","ru_MD","ru_RU","ru_UA","rw","rw_RW","sd","sd_PK","se","se_FI","se_NO","se_SE","sg","sg_CF","sh","sh_BA","si","si_LK","sk","sk_SK","sl","sl_SI","sn","sn_ZW","so","so_DJ","so_ET","so_KE","so_SO","sq","sq_AL","sq_MK","sr","sr_BA","sr_Cyrl","sr_Cyrl_BA","sr_Cyrl_ME","sr_Cyrl_RS","sr_Latn","sr_Latn_BA","sr_Latn_ME","sr_Latn_RS","sr_ME","sr_RS","sv","sv_AX","sv_FI","sv_SE","sw","sw_CD","sw_KE","sw_TZ","sw_UG","ta","ta_IN","ta_LK","ta_MY","ta_SG","te","te_IN","tg","tg_TJ","th","th_TH","ti","ti_ER","ti_ET","tk","tk_TM","tl","tl_PH","to","to_TO","tr","tr_CY","tr_TR","tt","tt_RU","ug","ug_CN","uk","uk_UA","ur","ur_IN","ur_PK","uz","uz_AF","uz_Arab","uz_Arab_AF","uz_Cyrl","uz_Cyrl_UZ","uz_Latn","uz_Latn_UZ","uz_UZ","vi","vi_VN","wo","wo_SN","xh","xh_ZA","yi","yo","yo_BJ","yo_NG","zh","zh_CN","zh_HK","zh_Hans","zh_Hans_CN","zh_Hans_HK","zh_Hans_MO","zh_Hans_SG","zh_Hant","zh_Hant_HK","zh_Hant_MO","zh_Hant_TW","zh_MO","zh_SG","zh_TW","zu","zu_ZA"],gt=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This value is not a valid locale."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){var t=B.canonicalize(e);return"string"==typeof t&&vt.includes(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(I),yt=null,At="isbn10",Et="isbn13";function Tt(e){if(!/^[\d|X]+$/.test(e)||10!==e.length)return!1;for(var t=0,n=0;n<10;n++){t+=("X"===e.charAt(n)?10:parseInt(e.charAt(n)))*(10-n)}return t%11==0}function Ct(e){if(!y(e)||13!==e.length)return!1;for(var t=0,n=0;n<13;n+=2)t+=parseInt(e.charAt(n));for(var a=1;a<12;a+=2)t+=3*parseInt(e.charAt(a));return t%10==0}var Lt,Mt=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,n),e=t.call(this,a);var i=[yt,At,Et],o=null===e.options.mode?null:e.options.mode.toLowerCase();if(!i.includes(o))throw new Error("Invalid validation mode provided: ".concat(e.options.mode));return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,mode:yt,message:"This value is neither a valid ISBN-10 nor a valid ISBN-13.",message_isbn10:"This value is not a valid ISBN-10.",message_isbn13:"This value is not a valid ISBN-13."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/-/g,"",e).toUpperCase();return this.options.mode===At?Tt(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn10):this.options.mode!==Et||Ct(t)?Tt(t)||Ct(t)?void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message):this.getViolationBuilder().setParameter("value",e).build(this.options.message_isbn13)}}}],[{key:"MODE_ALL",get:function(){return yt}},{key:"MODE_ISBN_10",get:function(){return At}},{key:"MODE_ISBN_13",get:function(){return Et}}]),n}(I),St=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!1,case_sensitive:!1,hyphen:!1,message:"This value is not a valid ISSN."}}},{key:"validate",value:function(e){if("string"==typeof e&&!this.isEmptyValue(e)){var t=e=this.options.trim?R(e):e;if(t.length>4&&"-"===t.charAt(4))t=t.replace(/-/g,"");else if(this.options.hyphen)return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(8!==t.length||this.options.case_sensitive&&!/^\d{7}[X|0-9]$/.test(t)||!this.options.case_sensitive&&!/^\d{7}[xX|0-9]$/.test(t))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var n="x"===t.charAt(7)||"X"===t.charAt(7)?10:parseInt(t.charAt(7)),a=0;a<7;++a)n+=(8-a)*parseInt(t.charAt(a));return n%11!=0?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(I),bt=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Invalid card number."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){if(/[^0-9-\s]+/.test(e))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);for(var t=e.toString().replace(/\D/g,""),n=0,a=t.length-1;a>=0;a-=2)n+=parseInt(t.charAt(a));for(var i=t.length-2;i>=0;i-=2)n+=(2*parseInt(t.charAt(i))).toString().split("").reduce((function(e,t){return parseInt(e)+parseInt(t)}),0);return 0===n||0!=n%10?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0}}}]),n}(I),Rt="AMEX",Pt="CHINA_UNIONPAY",Nt="DINERS",Ot="DISCOVER",Bt="INSTAPAYMENT",kt="LASER",It="MAESTRO",Dt="MASTERCARD",Gt="UATP",wt="VISA",Ut=(u(Lt={},Rt,[/^3[47][0-9]{13}$/]),u(Lt,Pt,[/^62[0-9]{14,17}$/]),u(Lt,Nt,[/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/]),u(Lt,Ot,[/^6011[0-9]{12}$/,/^64[4-9][0-9]{13}$/,/^65[0-9]{14}$/,/^622(12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|91[0-9]|92[0-5])[0-9]{10}$/]),u(Lt,Bt,[/^63[7-9][0-9]{13}$/]),u(Lt,"JCB",[/^(?:2131|1800|35[0-9]{3})[0-9]{11}$/]),u(Lt,kt,[/^(6304|670[69]|6771)[0-9]{12,15}$/]),u(Lt,It,[/^(6759[0-9]{2})[0-9]{6,13}$/,/^(50[0-9]{4})[0-9]{6,13}$/,/^5[6-9][0-9]{10,17}$/,/^6[0-9]{11,18}$/]),u(Lt,Dt,[/^5[1-5][0-9]{14}$/,/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/]),u(Lt,"MIR",[/^220[0-4][0-9]{12}$/]),u(Lt,Gt,[/^1[0-9]{14}$/]),u(Lt,wt,[/^4([0-9]{12}|[0-9]{15}|[0-9]{18})$/]),Lt),Vt=function(e){d(n,e);var t=_(n);function n(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r(this,n),(e=t.call(this,a)).options.schemas=b(e.options.schemas)?[e.options.schemas]:e.options.schemas,!T(e.options.schemas))throw new Error('Value should be type of "array" or "string", "'.concat(i(e.options.schemas),'" given.'));if(0===e.options.schemas.length)throw new Error("The schemas list cannot be empty.");var o=Object.keys(Ut),s=e.options.schemas.filter((function(e){return o.includes(e.toUpperCase())}));if(s.length!==e.options.schemas.length)throw new Error("The schemas list contains one or more unsupported elements.");return e}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"Unsupported card type or invalid card number."}}},{key:"getRequiredOptions",value:function(){return["schemas"]}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){if(y(e)){var t,n=g(this.options.schemas);try{for(n.s();!(t=n.n()).done;){var a,i=t.value,r=g(Ut[i]);try{for(r.s();!(a=r.n()).done;){if(a.value.test(e))return}}catch(e){r.e(e)}finally{r.f()}}}catch(e){n.e(e)}finally{n.f()}}return this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}],[{key:"SCHEMA_AMEX",get:function(){return Rt}},{key:"SCHEMA_CHINA_UNIONPAY",get:function(){return Pt}},{key:"SCHEMA_DINERS",get:function(){return Nt}},{key:"SCHEMA_DISCOVER",get:function(){return Ot}},{key:"SCHEMA_INSTAPAYMENT",get:function(){return Bt}},{key:"SCHEMA_JCB",get:function(){return"JCB"}},{key:"SCHEMA_LASER",get:function(){return kt}},{key:"SCHEMA_MAESTRO",get:function(){return It}},{key:"SCHEMA_MASTERCARD",get:function(){return Dt}},{key:"SCHEMA_MIR",get:function(){return"MIR"}},{key:"SCHEMA_UATP",get:function(){return Gt}},{key:"SCHEMA_VISA",get:function(){return wt}}]),n}(I),Zt={AD:/^AD\d{2}\d{4}\d{4}[\dA-Z]{12}$/,AE:/^AE\d{2}\d{3}\d{16}$/,AL:/^AL\d{2}\d{8}[\dA-Z]{16}$/,AO:/^AO\d{2}\d{21}$/,AT:/^AT\d{2}\d{5}\d{11}$/,AX:/^FI\d{2}\d{6}\d{7}\d{1}$/,AZ:/^AZ\d{2}[A-Z]{4}[\dA-Z]{20}$/,BA:/^BA\d{2}\d{3}\d{3}\d{8}\d{2}$/,BE:/^BE\d{2}\d{3}\d{7}\d{2}$/,BF:/^BF\d{2}\d{23}$/,BG:/^BG\d{2}[A-Z]{4}\d{4}\d{2}[\dA-Z]{8}$/,BH:/^BH\d{2}[A-Z]{4}[\dA-Z]{14}$/,BI:/^BI\d{2}\d{12}$/,BJ:/^BJ\d{2}[A-Z]{1}\d{23}$/,BY:/^BY\d{2}[\dA-Z]{4}\d{4}[\dA-Z]{16}$/,BL:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,BR:/^BR\d{2}\d{8}\d{5}\d{10}[A-Z][\dA-Z]$/,CG:/^CG\d{2}\d{23}$/,CH:/^CH\d{2}\d{5}[\dA-Z]{12}$/,CI:/^CI\d{2}[A-Z]{1}\d{23}$/,CM:/^CM\d{2}\d{23}$/,CR:/^CR\d{2}0\d{3}\d{14}$/,CV:/^CV\d{2}\d{21}$/,CY:/^CY\d{2}\d{3}\d{5}[\dA-Z]{16}$/,CZ:/^CZ\d{2}\d{20}$/,DE:/^DE\d{2}\d{8}\d{10}$/,DO:/^DO\d{2}[\dA-Z]{4}\d{20}$/,DK:/^DK\d{2}\d{4}\d{10}$/,DZ:/^DZ\d{2}\d{20}$/,EE:/^EE\d{2}\d{2}\d{2}\d{11}\d{1}$/,ES:/^ES\d{2}\d{4}\d{4}\d{1}\d{1}\d{10}$/,FI:/^FI\d{2}\d{6}\d{7}\d{1}$/,FO:/^FO\d{2}\d{4}\d{9}\d{1}$/,FR:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GB:/^GB\d{2}[A-Z]{4}\d{6}\d{8}$/,GE:/^GE\d{2}[A-Z]{2}\d{16}$/,GI:/^GI\d{2}[A-Z]{4}[\dA-Z]{15}$/,GL:/^GL\d{2}\d{4}\d{9}\d{1}$/,GP:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,GR:/^GR\d{2}\d{3}\d{4}[\dA-Z]{16}$/,GT:/^GT\d{2}[\dA-Z]{4}[\dA-Z]{20}$/,HR:/^HR\d{2}\d{7}\d{10}$/,HU:/^HU\d{2}\d{3}\d{4}\d{1}\d{15}\d{1}$/,IE:/^IE\d{2}[A-Z]{4}\d{6}\d{8}$/,IL:/^IL\d{2}\d{3}\d{3}\d{13}$/,IR:/^IR\d{2}\d{22}$/,IS:/^IS\d{2}\d{4}\d{2}\d{6}\d{10}$/,IT:/^IT\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,JO:/^JO\d{2}[A-Z]{4}\d{4}[\dA-Z]{18}$/,KW:/^KW\d{2}[A-Z]{4}\d{22}$/,KZ:/^KZ\d{2}\d{3}[\dA-Z]{13}$/,LB:/^LB\d{2}\d{4}[\dA-Z]{20}$/,LI:/^LI\d{2}\d{5}[\dA-Z]{12}$/,LT:/^LT\d{2}\d{5}\d{11}$/,LU:/^LU\d{2}\d{3}[\dA-Z]{13}$/,LV:/^LV\d{2}[A-Z]{4}[\dA-Z]{13}$/,MC:/^MC\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MD:/^MD\d{2}[\dA-Z]{2}[\dA-Z]{18}$/,ME:/^ME\d{2}\d{3}\d{13}\d{2}$/,MF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MG:/^MG\d{2}\d{23}$/,MK:/^MK\d{2}\d{3}[\dA-Z]{10}\d{2}$/,ML:/^ML\d{2}[A-Z]{1}\d{23}$/,MQ:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,MR:/^MR13\d{5}\d{5}\d{11}\d{2}$/,MT:/^MT\d{2}[A-Z]{4}\d{5}[\dA-Z]{18}$/,MU:/^MU\d{2}[A-Z]{4}\d{2}\d{2}\d{12}\d{3}[A-Z]{3}$/,MZ:/^MZ\d{2}\d{21}$/,NC:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,NL:/^NL\d{2}[A-Z]{4}\d{10}$/,NO:/^NO\d{2}\d{4}\d{6}\d{1}$/,PF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PK:/^PK\d{2}[A-Z]{4}[\dA-Z]{16}$/,PL:/^PL\d{2}\d{8}\d{16}$/,PM:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,PS:/^PS\d{2}[A-Z]{4}[\dA-Z]{21}$/,PT:/^PT\d{2}\d{4}\d{4}\d{11}\d{2}$/,QA:/^QA\d{2}[A-Z]{4}[\dA-Z]{21}$/,RE:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,RO:/^RO\d{2}[A-Z]{4}[\dA-Z]{16}$/,RS:/^RS\d{2}\d{3}\d{13}\d{2}$/,SA:/^SA\d{2}\d{2}[\dA-Z]{18}$/,SE:/^SE\d{2}\d{3}\d{16}\d{1}$/,SI:/^SI\d{2}\d{5}\d{8}\d{2}$/,SK:/^SK\d{2}\d{4}\d{6}\d{10}$/,SM:/^SM\d{2}[A-Z]{1}\d{5}\d{5}[\dA-Z]{12}$/,SN:/^SN\d{2}[A-Z]{1}\d{23}$/,TF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,TL:/^TL\d{2}\d{3}\d{14}\d{2}$/,TN:/^TN59\d{2}\d{3}\d{13}\d{2}$/,TR:/^TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}$/,UA:/^UA\d{2}\d{6}[\dA-Z]{19}$/,VA:/^VA\d{2}\d{3}\d{15}$/,VG:/^VG\d{2}[A-Z]{4}\d{16}$/,WF:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/,XK:/^XK\d{2}\d{4}\d{10}\d{2}$/,YT:/^FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}$/};var $t=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid International Bank Account Number (IBAN)."}}},{key:"validate",value:function(e){if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var t=e.replace(/ /g,"",e.toUpperCase()),n=t.substring(0,2);return/^[A-Z0-9]+$/.test(t)&&function(e){return void 0!==F.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}(n)&&void 0!==Zt[n]&&Zt[n].test(t)?1!==function(e){var t=0;return function(e,t){if(null===t&&(t=1),null===e||t<1)return!1;for(var n=[],a=0,i=(e+="").length;a=55296&&n<=56319){var a=n;return 1===t.length?n:1024*(a-55296)+(t.charCodeAt(1)-56320)+65536}return n}(e)-55:t+=e})),t}(t.substring(4)+t.substring(0,4)))?this.getViolationBuilder().setParameter("value",e).build(this.options.message):void 0:this.getViolationBuilder().setParameter("value",e).build(this.options.message)}}}]),n}(I),Ft={GF:"FR",PF:"FR",TF:"FR",GP:"FR",MQ:"FR",YT:"FR",NC:"FR",RE:"FR",PM:"FR",WF:"FR",JE:"GB",IM:"GB",GG:"GB",VG:"GB"};function Kt(e){return void 0!==F.find((function(t){return t.a2.toUpperCase()===e.toUpperCase()}))}var Yt=function(e){d(n,e);var t=_(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),t.call(this,e)}return s(n,[{key:"getDefaultOptions",value:function(){return{trim:!0,message:"This is not a valid Business Identifier Code (BIC).",message_iban:"This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.",iban_path:null}}},{key:"validate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{form:{}};if(this.options.trim&&(e=R(e)),!this.isEmptyValue(e)){"string"!=typeof e&&(e+="");var n=e.replace(/ /g,"",e);if(!([8,11].includes(n.length)&&/^[A-Z0-9]+$/.test(n)&&/^[A-Z]{4}/.test(n)&&Kt(n.substring(4,6))))return this.getViolationBuilder().setParameter("value",e).build(this.options.message);if(null!==this.options.iban_path&&b(this.options.iban_path)){var a=t.form[this.options.iban_path];if(this.isEmptyValue(a))return;var i=a.substring(0,2),r=n.substring(4,6);if(i===r||i===Ft[r])return;return this.getViolationBuilder().setParameter("value",e).setParameter("iban",a).build(this.options.message_iban)}}}}]),n}(I),Ht=function(){function e(){r(this,e)}return s(e,[{key:"validate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[];return T(t)?(t.forEach((function(t){if(!(t instanceof I))return!1;var i=t.validate(e,n);void 0!==i&&a.push(i)})),a):a}}]),e}(),xt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,e),u(this,"constraints",[]),u(this,"options",{}),u(this,"transformers",[]),u(this,"reversTransformers",[]),this.constraints=t,this.options=n}return s(e,[{key:"getMappedFieldName",value:function(e){return"string"==typeof this.options.map_name&&this.options.map_name.length>0?this.options.map_name:e}},{key:"getConstraints",value:function(){return this.constraints}},{key:"getOptions",value:function(){return this.options}},{key:"getTransformers",value:function(){return this.transformers}},{key:"getReverseTransformers",value:function(){return this.reversTransformers}},{key:"addTransformer",value:function(e){if(!C(e))throw new Error('Transformer must be type of "function", '.concat(i(e)," given."));return this.transformers.push(e),this}},{key:"addReverseTransformer",value:function(e){if(!C(e))throw new Error('Transformer must be type of "function", '.concat(i(e)," given."));return this.reversTransformers.push(e),this}},{key:"resetTransformers",value:function(){return this.transformers=[],this}},{key:"resetReverseTransformers",value:function(){return this.reversTransformers=[],this}}]),e}(),Wt="This form should not contain extra fields.",jt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),u(this,"validator",void 0),u(this,"violationBuilder",void 0),u(this,"fields",{}),u(this,"data",{}),u(this,"errors",{}),u(this,"transformers",[]),u(this,"reversTransformers",[]),this.options=c(c({},{extra_fields:!1,extra_fields_message:Wt}),t),this.validator=new Ht,this.violationBuilder=new N}return s(e,[{key:"add",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof e)throw new Error('The field should be type of "string", "'.concat(i(e),'" given.'));if(0===e.length)throw new Error("The field name is too short.");if(void 0!==t&&!T(t))throw new Error('The constants should be type of "array", "'.concat(i(t),'" given.'));if(void 0!==this.fields[e])throw new Error("The field ".concat(e," already exists in this form."));return this.fields[e]=new xt(T(t)?t:[],c(c({},{}),n)),this}},{key:"validate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.errors={},this.data=t,this.options.extra_fields||this.checkExtraFields(),Object.keys(this.errors).length>0||(this.data=P(this.transformers)(this.data,n),Object.keys(this.fields).forEach((function(t){var a=e.fields[t],i=c(c({},n),{field:a.getOptions(),form:e});e.data[t]=P(a.getTransformers())(e.data[t],i);var r=e.validator.validate(e.data[t],a.getConstraints(),i);r.length>0&&e.addValidationErrors(a.getMappedFieldName(t),r),e.data[t]=P(a.getReverseTransformers())(e.data[t],i)})),this.data=P(this.reversTransformers)(this.data,n)),this.errors}},{key:"addValidationErrors",value:function(e,t){return T(this.errors[e])||(this.errors[e]=[]),T(t)?this.errors[e]=this.errors[e].concat(t):this.errors[e].push(t),this}},{key:"checkExtraFields",value:function(){for(var e=0,t=Object.keys(this.data);e