Socket
Socket
Sign inDemoInstall

vee-validate

Package Overview
Dependencies
Maintainers
1
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vee-validate - npm Package Compare versions

Comparing version 2.0.0-beta.19 to 2.0.0-beta.20

4

dist/vee-validate.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VeeValidate=t()}(this,function(){"use strict";function e(e){return e&&e.__esModule?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}var r=function(e){return/^[a-zA-Z]*$/.test(e)},i=function(e){return/^[a-zA-Z0-9_-]*$/.test(e)},n=function(e){return/^[a-zA-Z0-9]*$/.test(e)},o=function(e){return/^[a-zA-Z\s]*$/.test(e)},a=function(e,t){var r=t[0],i=t[1];return Number(r)<=e&&Number(i)>=e},s=function(e,t,r){var i=t[0],n=i?document.querySelector("input[name='"+i+"']"):document.querySelector("input[name='"+r+"_confirmation']");return!(!n||String(e)!==n.value)},u=t(function(e,t){function r(e){if("string"!=typeof e)throw new TypeError("This library (validator.js) validates strings only")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default}),l=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){(0,o.default)(e);var t=e.replace(/[^0-9]+/g,"");if(!a.test(t))return!1;for(var r=0,i=void 0,n=void 0,s=void 0,u=t.length-1;u>=0;u--)i=t.substring(u,u+1),n=parseInt(i,10),s?(n*=2,r+=n>=10?n%10+1:n):r+=n,s=!s;return!(r%10!==0||!t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=u,o=r(n),a=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{14}$/;e.exports=t.default}),c=e(l),f=function(e){return c(String(e))},d=function(e,t){var r=Array.isArray(t)?t[0]||"*":"*";if(Array.isArray(e))return!1;if(null===e||void 0===e||""===e)return!0;if(0===Number(r))return/^-?\d*$/.test(e);var i="*"===r?"+":"{1,"+r+"}",n=new RegExp("^-?\\d*(\\.\\d"+i+")?$");if(!n.test(e))return!1;var o=parseFloat(e);return o===o},h=function(e,t){var r=t[0],i=String(e);return/^[0-9]*$/.test(i)&&i.length===Number(r)},p=function(e,t,r){var i=window.URL||window.webkitURL;return new Promise(function(n){var o=new Image;o.onerror=function(){return n({valid:!1})},o.onload=function(){return n({valid:o.width===Number(t)&&o.height===Number(r)})},o.src=i.createObjectURL(e)})},v=function(e,t){for(var r=t[0],i=t[1],n=[],o=0;o<e.length;o++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e[o].name))return!1;n.push(e[o])}return Promise.all(n.map(function(e){return p(e,r,i)}))},m=t(function(e,t){function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var r in t)"undefined"==typeof e[r]&&(e[r]=t[r]);return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default}),_=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){(0,a.default)(e);var r=void 0,i=void 0;"object"===("undefined"==typeof t?"undefined":n(t))?(r=t.min||0,i=t.max):(r=arguments[1],i=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=r&&("undefined"==typeof i||o<=i)}Object.defineProperty(t,"__esModule",{value:!0});var n="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};t.default=i;var o=u,a=r(o);e.exports=t.default}),g=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){(0,o.default)(e),t=(0,s.default)(t,l),t.allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var r=e.split(".");if(t.require_tld){var i=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(i))return!1}for(var n,a=0;a<r.length;a++){if(n=r[a],t.allow_underscores&&(n=n.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(n))return!1;if(/[\uff01-\uff5e]/.test(n))return!1;if("-"===n[0]||"-"===n[n.length-1])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=u,o=r(n),a=m,s=r(a),l={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};e.exports=t.default}),y=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if((0,o.default)(e),t=(0,s.default)(t,h),t.allow_display_name){var r=e.match(p);r&&(e=r[1])}var i=e.split("@"),n=i.pop(),a=i.join("@"),u=n.toLowerCase();if("gmail.com"!==u&&"googlemail.com"!==u||(a=a.replace(/\./g,"").toLowerCase()),!(0,c.default)(a,{max:64})||!(0,c.default)(n,{max:256}))return!1;if(!(0,d.default)(n,{require_tld:t.require_tld}))return!1;if('"'===a[0])return a=a.slice(1,a.length-1),t.allow_utf8_local_part?x.test(a):y.test(a);for(var l=t.allow_utf8_local_part?b:v,f=a.split("."),m=0;m<f.length;m++)if(!l.test(f[m]))return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=u,o=r(n),a=m,s=r(a),l=_,c=r(l),f=g,d=r(f),h={allow_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},p=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,v=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,y=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,b=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,x=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default}),b=e(y),x=function(e){return b(String(e))},F=function(e,t){var r=new RegExp(".("+t.join("|")+")$","i");return e.every(function(e){return r.test(e.name)})},$=function(e){return e.every(function(e){return/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e.name)})},w=function(e,t){return!!t.filter(function(t){return t==e}).length},E=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,o.default)(e),t=String(t),!t)return i(e,4)||i(e,6);if("4"===t){if(!a.test(e))return!1;var r=e.split(".").sort(function(e,t){return e-t});return r[3]<=255}if("6"===t){var n=e.split(":"),u=!1,l=i(n[n.length-1],4),c=l?7:8;if(n.length>c)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(n.shift(),n.shift(),u=!0):"::"===e.substr(e.length-2)&&(n.pop(),n.pop(),u=!0);for(var f=0;f<n.length;++f)if(""===n[f]&&f>0&&f<n.length-1){if(u)return!1;u=!0}else if(l&&f===n.length-1);else if(!s.test(n[f]))return!1;return u?n.length>=1:n.length===c}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=u,o=r(n),a=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,s=/^[0-9A-F]{1,4}$/i;e.exports=t.default}),j=e(E),A=function(e,t){void 0===t&&(t=[4]);var r=t[0];return j(e,r)},O=function(e,t){var r=t[0];return void 0===e||null===e?r>=0:String(e).length<=r},S=function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)<=r},L=function(e,t){var r=new RegExp(t.join("|").replace("*",".+")+"$","i");return e.every(function(e){return r.test(e.type)})},T=function(e,t){var r=t[0];return void 0!==e&&null!==e&&String(e).length>=r},k=function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)>=r},M=function(e,t){return!t.filter(function(t){return t==e}).length},D=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,o.default)(e),a.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=u,o=r(n),a=/^[-+]?[0-9]+$/;e.exports=t.default}),N=e(D),q=function(e){return N(String(e))},B=function(e,t){var r=t[0],i=t.slice(1);return r instanceof RegExp?r.test(e):new RegExp(r,i).test(String(e))},R=function(e){return Array.isArray(e)?!!e.length:void 0!==e&&null!==e&&!!String(e).trim().length},V=function(e,t){var r=t[0];if(isNaN(r))return!1;for(var i=1024*Number(r),n=0;n<e.length;n++)if(e[n].size>i)return!1;return!0},z=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(e===n||i(n)&&n.test(e))return!0}return!1}function o(e,t){if((0,s.default)(e),!e||e.length>=2083||/\s/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,p.default)(t,v);var r=void 0,i=void 0,o=void 0,a=void 0,u=void 0,l=void 0,f=void 0,h=void 0;if(f=e.split("#"),e=f.shift(),f=e.split("?"),e=f.shift(),f=e.split("://"),f.length>1){if(r=f.shift(),t.require_valid_protocol&&t.protocols.indexOf(r)===-1)return!1}else{if(t.require_protocol)return!1;t.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(f[0]=e.substr(2))}if(e=f.join("://"),f=e.split("/"),e=f.shift(),""===e&&!t.require_host)return!0;if(f=e.split("@"),f.length>1&&(i=f.shift(),i.indexOf(":")>=0&&i.split(":").length>2))return!1;a=f.join("@"),l=h=null;var m=a.match(_);return m?(o="",h=m[1],l=m[2]||null):(f=a.split(":"),o=f.shift(),f.length&&(l=f.join(":"))),!(null!==l&&(u=parseInt(l,10),!/^[0-9]+$/.test(l)||u<=0||u>65535))&&(!!((0,d.default)(o)||(0,c.default)(o,t)||h&&(0,d.default)(h,6)||"localhost"===o)&&(o=o||h,!(t.host_whitelist&&!n(o,t.host_whitelist))&&(!t.host_blacklist||!n(o,t.host_blacklist))))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=u,s=r(a),l=g,c=r(l),f=E,d=r(f),h=m,p=r(h),v={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},_=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default}),P=e(z),C=function(e,t){void 0===t&&(t=[!0]);var r=t[0];return P(e,{require_protocol:!!r})},U={alpha_dash:i,alpha_num:n,alpha_spaces:o,alpha:r,between:a,confirmed:s,credit_card:f,decimal:d,digits:h,dimensions:v,email:x,ext:F,image:$,in:w,ip:A,max:O,max_value:S,mimes:L,min:T,min_value:k,not_in:M,numeric:q,regex:B,required:R,size:V,url:C},G=function(){this.errors=[]};G.prototype.add=function(e,t,r,i){void 0===i&&(i="__global__"),this.errors.push({field:e,msg:t,rule:r,scope:i})},G.prototype.all=function(e){return e||(e="__global__"),this.errors.filter(function(t){return t.scope===e}).map(function(e){return e.msg})},G.prototype.any=function(e){return e||(e="__global__"),!!this.errors.filter(function(t){return t.scope===e}).length},G.prototype.clear=function(e){e||(e="__global__"),this.errors=this.errors.filter(function(t){return t.scope!==e})},G.prototype.collect=function(e,t,r){if(void 0===r&&(r=!0),!e){var i={};return this.errors.forEach(function(e){i[e.field]||(i[e.field]=[]),i[e.field].push(r?e.msg:e)}),i}return t?this.errors.filter(function(r){return r.field===e&&r.scope===t}).map(function(e){return r?e.msg:e}):this.errors.filter(function(t){return t.field===e&&"__global__"===t.scope}).map(function(e){return r?e.msg:e})},G.prototype.count=function(){return this.errors.length},G.prototype.first=function(e,t){var r=this;void 0===t&&(t="__global__");var i=this._selector(e),n=this._scope(e);if(n)return this.first(n.name,n.scope);if(i)return this.firstByRule(i.name,i.rule,t);for(var o=0;o<this.errors.length;o++)if(r.errors[o].field===e&&r.errors[o].scope===t)return r.errors[o].msg;return null},G.prototype.has=function(e,t){return void 0===t&&(t="__global__"),!!this.first(e,t)},G.prototype.firstByRule=function(e,t,r){var i=this.collect(e,r,!1).filter(function(e){return e.rule===t})[0];return i&&i.msg||null},G.prototype.remove=function(e,t){return t?void(this.errors=this.errors.filter(function(r){return r.field!==e||r.scope!==t})):void(this.errors=this.errors.filter(function(t){return t.field!==e&&"__global__"===t.scope}))},G.prototype._selector=function(e){if(e.indexOf(":")>-1){var t=e.split(":"),r=t[0],i=t[1];return{name:r,rule:i}}return null},G.prototype._scope=function(e){if(e.indexOf(".")>-1){var t=e.split("."),r=t[0],i=t[1];return{name:i,scope:r}}return null};var I=function(){function e(e){this.msg="[vee-validate]: "+e}return e.prototype.toString=function(){return this.msg},e}(),Z=arguments,Y=function(e,t){return e.getAttribute("data-vv-"+t)},J=function(e){var t=Y(e,"scope");return!t&&e.form&&(t=Y(e.form,"scope")),t},K=function(e,t,r){var i=null,n=null,o=function(){return e.apply(r,n)};return function(){n=Z,clearTimeout(i),i=setTimeout(o,t)}},H=function(e){console&&console.warn("[vee-validate]: "+e)},Q=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)},W=function(e){return"function"==typeof e},X=function(e){void 0===e&&(e={}),this.dictionary={},this.merge(e)};X.prototype.hasLocale=function(e){return!!this.dictionary[e]},X.prototype.getMessage=function(e,t,r){return void 0===r&&(r=""),this.hasMessage(e,t)?this.dictionary[e].messages[t]:r},X.prototype.getAttribute=function(e,t,r){return void 0===r&&(r=""),this.hasAttribute(e,t)?this.dictionary[e].attributes[t]:r},X.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].messages&&this.dictionary[e].messages[t])},X.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].attributes&&this.dictionary[e].attributes[t])},X.prototype.merge=function(e){this._merge(this.dictionary,e)},X.prototype.setMessage=function(e,t,r){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].messages[t]=r},X.prototype.setAttribute=function(e,t,r){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].attributes[t]=r},X.prototype._merge=function(e,t){var r=this;return Q(e)&&Q(t)?(Object.keys(t).forEach(function(i){if(Q(t[i])){if(!e[i]){Object.assign(e,(n={},n[i]={},n));var n}return void r._merge(e[i],t[i])}Object.assign(e,(o={},o[i]=t[i],o));var o}),e):e};var ee={alpha_dash:function(e){return"The "+e+" field may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(e){return"The "+e+" field may only contain alpha-numeric characters."},alpha_spaces:function(e){return"The "+e+" field may only contain alphabetic characters as well as spaces."},alpha:function(e){return"The "+e+" field may only contain alphabetic characters."},between:function(e,t){var r=t[0],i=t[1];return"The "+e+" field must be between "+r+" and "+i+"."},confirmed:function(e){return"The "+e+" confirmation does not match."},credit_card:function(e){return"The "+e+" field is invalid."},decimal:function(e,t){void 0===t&&(t=["*"]);var r=t[0];return"The "+e+" field must be numeric and may contain "+("*"===r?"":r)+" decimal points."},digits:function(e,t){var r=t[0];return"The "+e+" field must be numeric and exactly contain "+r+" digits."},dimensions:function(e,t){var r=t[0],i=t[1];return"The "+e+" field must be "+r+" pixels by "+i+" pixels."},email:function(e){return"The "+e+" field must be a valid email."},ext:function(e){return"The "+e+" field must be a valid file."},image:function(e){return"The "+e+" field must be an image."},in:function(e){return"The "+e+" field must be a valid value."},ip:function(e){return"The "+e+" field must be a valid ip address."},max:function(e,t){var r=t[0];return"The "+e+" field may not be greater than "+r+" characters."},max_value:function(e,t){var r=t[0];return"The "+e+" field must be "+r+" or less."},mimes:function(e){return"The "+e+" field must have a valid file type."},min:function(e,t){var r=t[0];return"The "+e+" field must be at least "+r+" characters."},min_value:function(e,t){var r=t[0];return"The "+e+" field must be "+r+" or more."},not_in:function(e){return"The "+e+" field must be a valid value."},numeric:function(e){return"The "+e+" field may only contain numeric characters."},regex:function(e){return"The "+e+" field format is invalid."},required:function(e){return"The "+e+" field is required."},size:function(e,t){var r=t[0];return"The "+e+" field must be less than "+r+" KB."},url:function(e){return"The "+e+" field is not a valid URL."}},te=function(e){return function(t,r){var i=r[0],n=r[1],o=e(t,n,!0),a=document.querySelector("input[name='"+i+"']");if(!o.isValid()||!a)return!1;var s=e(a.value,n,!0);return!!s.isValid()&&o.isAfter(s)}},re=function(e){return function(t,r){var i=r[0],n=r[1],o=e(t,n,!0),a=document.querySelector("input[name='"+i+"']");if(!o.isValid()||!a)return!1;var s=e(a.value,n,!0);return!!s.isValid()&&o.isBefore(s)}},ie=function(e){return function(t,r){var i=r[0];return e(t,i,!0).isValid()}},ne=function(e){return function(t,r){var i=r[0],n=r[1],o=r[2],a=e(i,o,!0),s=e(n,o,!0),u=e(t,o,!0);return!!(a.isValid()&&s.isValid()&&u.isValid())&&u.isBetween(a,s)}},oe={after:function(e,t){var r=t[0];return"The "+e+" must be after "+r+"."},before:function(e,t){var r=t[0];return"The "+e+" must be before "+r+"."},date_between:function(e,t){var r=t[0],i=t[1];return"The "+e+" must be between "+r+" and "+i+"."},date_format:function(e,t){var r=t[0];return"The "+e+" must be in the format "+r+"."}},ae={make:function(e){return{date_format:ie(e),after:te(e),before:re(e),date_between:ne(e)}},messages:oe,installed:!1},se=function(){this.fields={}};se.prototype._add=function(e){this.fields[e]={},this._setFlags(e,{dirty:!1,valid:!1},!0)},se.prototype._remove=function(e){delete this.fields[e]},se.prototype.reset=function(e){var t=this;return e?void this._setFlags(e,{dirty:!1,valid:!1},!0):void Object.keys(this.fields).forEach(function(e){t._setFlags(e,{dirty:!1,valid:!1},!0)})},se.prototype._setFlags=function(e,t,r){var i=this;return void 0===r&&(r=!1),Object.keys(t).every(function(n){return i._setFlag(e,n,t[n],r)})},se.prototype._setFlag=function(e,t,r,i){void 0===i&&(i=!1);var n="set"+t.charAt(0).toUpperCase()+t.slice(1);return"function"==typeof this[n]&&(this[n](e,r,i),!0)},se.prototype.setDirty=function(e,t,r){void 0===r&&(r=!1),this.fields[e].dirty=t,this.fields[e].clean=r||!t,this.fields[e].passed=this.fields[e].valid&&t,this.fields[e].failed=!this.fields[e].valid&&t},se.prototype.setValid=function(e,t){this.fields[e].valid=t,this.fields[e].passed=this.fields[e].dirty&&t,this.fields[e].failed=this.fields[e].dirty&&!t},se.prototype._getFieldFlag=function(e,t){return!!this.fields[e]&&this.fields[e][t]},se.prototype.dirty=function(e){var t=this;return e?this._getFieldFlag(e,"dirty"):Object.keys(this.fields).some(function(e){return t.fields[e].dirty})},se.prototype.valid=function(e){var t=this;return e?this._getFieldFlag(e,"valid"):Object.keys(this.fields).every(function(e){return t.fields[e].valid})},se.prototype.passed=function(e){var t=this;return e?this._getFieldFlag(e,"passed"):Object.keys(this.fields).every(function(e){return t.fields[e].passed})},se.prototype.failed=function(e){var t=this;return e?this._getFieldFlag(e,"failed"):Object.keys(this.fields).some(function(e){return t.fields[e].failed})},se.prototype.clean=function(e){return e?this._getFieldFlag(e,"clean"):!this.dirty()};var ue="en",le=!0,ce=new X({en:{messages:ee,attributes:{}}}),fe=function(e,t,r){void 0===r&&(r={init:!0}),this.strictMode=le,this.$scopes={__global__:{}},this.fieldBag=new se,this._createFields(e),this.errorBag=new G,this.$vm=t,this.$deferred=[],this.$ready=!1,"function"==typeof moment&&this.installDateTimeValidators(moment),r.init&&this.init()};fe._merge=function(e,t){return W(t)?(U[e]=t,void ce.setMessage("en",e,function(e){return"The "+e+" value is not valid."})):(U[e]=t.validate,t.getMessage&&W(t.getMessage)&&ce.setMessage("en",e,t.getMessage),void(t.messages&&ce.merge(Object.keys(t.messages).reduce(function(r,i){var n=r;n[i]={messages:(o={},o[e]=t.messages[i],o)};var o;return n},{}))))},fe._guardExtend=function(e,t){if(U[e])throw new I("Extension Error: There is an existing validator with the same name '"+e+"'.");if(!W(t)){if(!W(t.validate))throw new I("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.");if(!W(t.getMessage)&&!Q(t.messages))throw new I("Extension Error: The validator '"+e+"' must have a 'getMessage' method or have a 'messages' object.")}},fe.create=function(e,t,r){return new fe(e,t,r)},fe.extend=function(e,t){fe._guardExtend(e,t),fe._merge(e,t)},fe.installDateTimeValidators=function(e){if("function"!=typeof e)return H("To use the date-time validators you must provide moment reference."),!1;if(ae.installed)return!0;var t=ae.make(e);return Object.keys(t).forEach(function(e){fe.extend(e,t[e])}),fe.updateDictionary({en:{messages:ae.messages}}),ae.installed=!0,!0},fe.remove=function(e){delete U[e]},fe.setLocale=function(e){void 0===e&&(e="en"),ce.hasLocale(e)||H("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),ue=e},fe.setStrictMode=function(e){void 0===e&&(e=!0),le=e},fe.updateDictionary=function(e){ce.merge(e)},fe.prototype._resolveScope=function(e){if("string"==typeof e)return e;if(W(e)){var t=e();return"string"==typeof t?t:"__global__"}return"__global__"},fe.prototype._resolveValuesFromGetters=function(e){var t=this;if(void 0===e&&(e="__global__"),!this.$scopes[e])return{};var r={};return Object.keys(this.$scopes[e]).forEach(function(i){var n=t.$scopes[e][i],o=n.getter,a=n.context,s=t._resolveScope(n.scope);o&&a&&("__global__"===e||s===e)&&(r[i]={value:o(a()),scope:s})}),r},fe.prototype._createFields=function(e){var t=this;e&&Object.keys(e).forEach(function(r){t._createField(r,e[r])})},fe.prototype._createField=function(e,t,r){void 0===r&&(r="__global__"),r=this._resolveScope(r),this.$scopes[r]||(this.$scopes[r]={}),this.$scopes[r][e]||(this.$scopes[r][e]={});var i=this.$scopes[r][e];this.fieldBag._add(e),i.validations=this._normalizeRules(e,t,r),i.required=this._isRequired(i)},fe.prototype._normalizeRules=function(e,t,r){return t?"string"==typeof t?this._normalizeString(t):Q(t)?this._normalizeObject(t):(H("Your checks for '"+r+"."+e+"' must be either a string or an object."),{}):{}},fe.prototype._isRequired=function(e){return e.validations&&e.validations.required},fe.prototype._normalizeObject=function(e){var t=this,r={};return Object.keys(e).forEach(function(i){var n=[];n=e[i]===!0?[]:Array.isArray(e[i])?e[i]:[e[i]],r[i]=n,ae.installed&&t._isADateRule(i)&&r[i].push(t._getDateFormat(r))}),r},fe.prototype._getDateFormat=function(e){return e.date_format&&Array.isArray(e.date_format)?e.date_format[0]:null},fe.prototype._isADateRule=function(e){return!!~["after","before","date_between"].indexOf(e)},fe.prototype._normalizeString=function(e){var t=this,r={};return e.split("|").forEach(function(e){var i=t._parseRule(e);i.name&&("required"===i.name&&(r.required=!0),r[i.name]=i.params,ae.installed&&t._isADateRule(i.name)&&r[i.name].push(t._getDateFormat(r)))}),r},fe.prototype._parseRule=function(e){var t=[],r=e.split(":")[0];return~e.indexOf(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:r,params:t}},fe.prototype._formatErrorMessage=function(e,t,r,i){void 0===r&&(r={}),void 0===i&&(i="__global__");var n=this._getFieldDisplayName(e,i),o=this._getLocalizedParams(t);return ce.hasLocale(ue)&&"function"==typeof ce.getMessage(ue,t.name)?ce.getMessage(ue,t.name)(n,o,r):ce.getMessage("en",t.name)(n,o,r)},fe.prototype._getLocalizedParams=function(e){return~["after","before","confirmed"].indexOf(e.name)&&e.params&&e.params[0]?[ce.getAttribute(ue,e.params[0],e.params[0])]:e.params},fe.prototype._getFieldDisplayName=function(e,t){return void 0===t&&(t="__global__"),this.$scopes[t][e].name||ce.getAttribute(ue,e,e)},fe.prototype._test=function(e,t,r,i){var n=this;void 0===i&&(i="__global__");var o=U[r.name];if(!o||"function"!=typeof o)throw new I("No such validator '"+r.name+"' exists.");var a=o(t,r.params,e);return W(a.then)?a.then(function(t){var o=!0,a={};return Array.isArray(t)?o=t.every(function(e){return e.valid}):(o=t.valid,a=t.data),o||n.errorBag.add(e,n._formatErrorMessage(e,r,a,i),r.name,i),o}):(Q(a)||(a={valid:a,data:{}}),a.valid||this.errorBag.add(e,this._formatErrorMessage(e,r,a.data,i),r.name,i),a.valid)},fe.prototype.attach=function e(t,r,i){var n=this;void 0===i&&(i={});var e=function(){i.scope=n._resolveScope(i.scope),n.updateField(t,r,i);var e=n.$scopes[i.scope][t];e.scope=i.scope,e.name=i.prettyName,e.getter=i.getter,e.context=i.context,e.listeners=i.listeners||{detach:function(){}}},o=W(i.scope)?i.scope():i.scope;return o||this.$ready?void e():void this.$deferred.push(e)},fe.prototype.init=function(){return this.$ready=!0,this.$deferred.forEach(function(e){e()}),this.$deferred=[],this},fe.prototype.append=function(e,t,r){void 0===r&&(r={}),r.scope=this._resolveScope(r.scope),this.$scopes[r.scope]&&this.$scopes[r.scope][e]||this.attach(e,t,r);var i=this.$scopes[r.scope][e],n=this._normalizeRules(e,t,r.scope);Object.keys(n).forEach(function(e){i.validations[e]=n[e]})},fe.prototype.updateField=function(e,t,r){void 0===r&&(r={}),this.errorBag.remove(e,r.scope),this._createField(e,t,r.scope)},fe.prototype.detach=function(e,t){void 0===t&&(t="__global__"),this.$scopes[t]&&this.$scopes[t][e]&&(this.$scopes[t][e].listeners.detach(),this.errorBag.remove(e,t),this.fieldBag._remove(e),delete this.$scopes[t][e])},fe.prototype.extend=function(e,t){fe.extend(e,t)},fe.prototype.getErrors=function(){return this.errorBag},fe.prototype.getLocale=function(){return ue},fe.prototype.installDateTimeValidators=function(e){fe.installDateTimeValidators(e)},fe.prototype.remove=function(e){fe.remove(e)},fe.prototype.setLocale=function(e){ce.hasLocale(e)||H("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),ue=e},fe.prototype.setStrictMode=function(e){void 0===e&&(e=!0),this.strictMode=e},fe.prototype.updateDictionary=function(e){fe.updateDictionary(e)},fe.prototype.addScope=function(e){e&&!this.$scopes[e]&&(this.$scopes[e]={})},fe.prototype.validate=function(e,t,r){var i=this;if(void 0===r&&(r="__global__"),e&&e.indexOf(".")>-1){var n;n=e.split("."),r=n[0],e=n[1]}if(r||(r="__global__"),!this.$scopes[r]||!this.$scopes[r][e]){if(!this.strictMode)return!0;var o="__global__"===r?e:r+"."+e;return H('Validating a non-existant field: "'+o+'". Use "attach()" first.'),!1}var a=this.$scopes[r][e];if(this.errorBag.remove(e,r),!a.required&&~[null,void 0,""].indexOf(t))return this.fieldBag._setFlags(e,{valid:!0,dirty:!0}),!0;var s=!0,u=[];return Object.keys(a.validations).forEach(function(n){var o=i._test(e,t,{name:n,params:a.validations[n]},r);return W(o.then)?void u.push(o):void(s=s&&o)}),u.length?Promise.all(u).then(function(t){var r=t.every(function(e){return e})&&s;return i.fieldBag._setFlags(e,{valid:r,dirty:!0}),r}):(this.fieldBag._setFlags(e,{valid:s,dirty:!0}),s)},fe.prototype.validateAll=function(e){var t,r=this;e&&"string"!=typeof e?(t={},Object.keys(e).forEach(function(r){t[r]={value:e[r]}})):(this.errorBag.clear(e),t=this._resolveValuesFromGetters(e));var i=!0,n=[];return Object.keys(t).forEach(function(e){var o=r.validate(e,t[e].value,t[e].scope);return W(o.then)?void n.push(o):void(i=i&&o)}),Promise.all(n).then(function(e){var t=e.every(function(e){return e})&&i;if(!t)throw new I("Validation Failed");return t})},fe.prototype.validateScopes=function(){var e=this;return Promise.all(Object.keys(this.$scopes).map(function(t){return e.validateAll(t)}))};var de=[],he=function(e){for(var t=0;t<de.length;t++)if(de[t].$vm===e)return de[t].$validator},pe=function(e){var t=he(e);return t||(t=fe.create(void 0,e,{init:!1}),de.push({$vm:e,$validator:t})),t},ve=function(e){for(var t=0;t<de.length;t++)if(de[t].$vm===e)return de.splice(t,1),!0;return!1},me=function(e){return{data:function(){return t={},t[e.errorBagName]=this.$validator.errorBag,t;var t},computed:(t={},t[e.fieldsBagName]={get:function(){return this.$validator.fieldBag}},t),mounted:function(){this.$validator.init()},destroyed:function(){ve(this)}};var t},_e=function(e,t,r,i){this.unwatch=void 0,this.callbacks=[],this.el=e,this.scope=Q(t.value)?t.value.scope:J(e),this.binding=t,this.vm=r.context,this.component=r.child,this.options=i,this.fieldName=this._resolveFieldName()};_e.prototype._resolveFieldName=function(){return this.component?Y(this.el,"name")||this.component.name:this.el.name||Y(this.el,"name")},_e.prototype._hasFieldDependency=function(e){var t=this,r=!1;return!!e&&(Q(e)?(Object.keys(e).forEach(function(t){if(/confirmed|after|before/.test(t))return r=e[t],!1}),r):(e.split("|").every(function(e){return/\b(confirmed|after|before):/.test(e)?(r=e.split(":")[1],!1):!/\b(confirmed)/.test(e)||(r=t.fieldName+"_confirmation",!1)}),r))},_e.prototype._inputListener=function(){this._validate(this.el.value)},_e.prototype._fileListener=function(){var e=this._validate([].concat(this.el.files));!e&&this.binding.modifiers.reject&&(this.el.value="")},_e.prototype._radioListener=function(){var e=document.querySelector('input[name="'+this.el.name+'"]:checked');this._validate(e?e.value:null)},_e.prototype._checkboxListener=function(){var e=this,t=document.querySelectorAll('input[name="'+this.el.name+'"]:checked');return t&&t.length?void[].concat(t).forEach(function(t){e._validate(t.value)}):void this._validate(null)},_e.prototype._validate=function(e){return this.vm.$validator.validate(this.fieldName,e,this.scope||J(this.el))},_e.prototype._getScopedListener=function(e){var t=this;return function(r){(!r||r===t.scope||r instanceof Event)&&e()}},_e.prototype._getRules=function(){return this.binding.expression?Q(this.binding.value)?this.binding.value.rules:this.binding.value:Y(this.el,"rules")},_e.prototype._attachValidatorEvent=function(){var e=this,t=this._getScopedListener(this._getSuitableListener().listener.bind(this)),r=this._hasFieldDependency(this._getRules());r&&this.vm.$nextTick(function(){var i=document.querySelector("input[name='"+r+"']");return i?(i.addEventListener("input",t),void e.callbacks.push({name:"input",listener:t,el:i})):void H("Cannot find target field, no additional listeners were attached.")})},_e.prototype._getSuitableListener=function(){var e;if("SELECT"===this.el.tagName)return{names:["change","blur"],listener:this._inputListener};switch(this.el.type){case"file":e={names:["change"],listener:this._fileListener};break;case"radio":e={names:["change"],listener:this._radioListener};break;case"checkbox":e={names:["change"],listener:this._checkboxListener};break;default:e={names:["input","blur"],listener:this._inputListener}}var t=Y(this.el,"validate-on");return t&&(e.names=t.split("|")),e},_e.prototype._attachComponentListeners=function(){var e=this;this.componentListener=K(function(t){e.vm.$validator.validate(e.fieldName,t)},Y(this.el,"delay")||this.options.delay,this),this.component.$on("input",this.componentListener)},_e.prototype._attachFieldListeners=function(){var e=this;if(this.component)return void this._attachComponentListeners();var t=this._getSuitableListener(),r=K(t.listener.bind(this),Y(this.el,"delay")||this.options.delay);return~["radio","checkbox"].indexOf(this.el.type)?void this.vm.$nextTick(function(){var i=document.querySelectorAll('input[name="'+e.el.name+'"]');Array.from(i).forEach(function(i){t.names.forEach(function(t){i.addEventListener(t,r),e.callbacks.push({name:t,listener:r,el:i})})})}):void t.names.forEach(function(t){e.el.addEventListener(t,r),e.callbacks.push({name:t,listener:r,el:e.el})})},_e.prototype._resolveValueGetter=function(){var e=this;if(this.component)return{context:function(){return e.component},getter:function(e){return e[Y(e.$el,"value-path")]||e.value}};switch(this.el.type){case"checkbox":return{context:function(){return document.querySelectorAll('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.length?[].concat(e).map(function(e){return e.value}):null}};case"radio":return{context:function(){return document.querySelector('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.value}};case"file":return{context:function(){return e.el},getter:function(e){return[].concat(e.files)}};default:return{context:function(){return e.el},getter:function(e){return e.value}}}},_e.prototype._getArg=function(){return this.binding.arg?this.binding.arg:Q(this.binding.value)?this.binding.value.arg:null},_e.prototype.attach=function(){var e=this,t=this._resolveValueGetter(),r=t.context,i=t.getter;this.vm.$validator.attach(this.fieldName,this._getRules(),{scope:function(){return e.scope||J(e.el)},prettyName:Y(this.el,"as"),
context:r,getter:i,listeners:this}),this._attachValidatorEvent();var n=this._getArg();return n?void(this.unwatch=this.vm.$watch(n,function(t){e.vm.$validator.validate(e.fieldName,t,e.scope||J(e.el))})):void this._attachFieldListeners()},_e.prototype.detach=function(){this.component&&this.component.$off("input",this.componentListener),this.unwatch&&this.unwatch(),this.callbacks.forEach(function(e){e.el.removeEventListener(e.name,e.listener)})};var ge=[],ye=function(e){return{bind:function(t,r,i){var n=new _e(t,r,i,e);n.attach(),ge.push({vm:i.context,el:t,instance:n})},update:function(e,t,r){var i=t.expression,n=t.value,o=t.oldValue,a=r.context;if(i&&JSON.stringify(n)!==JSON.stringify(o)){var s=ge.filter(function(t){return t.vm===a&&t.el===e})[0],u=Q(n)?n.scope||J(e):J(e);a.$validator.updateField(s.instance.fieldName,Q(n)?n.rules:n,{scope:u})}},unbind:function(e,t,r){var i=t.value,n=r.context,o=ge.filter(function(t){return t.vm===n&&t.el===e})[0];if("undefined"!=typeof o){var a=Q(i)?i.scope:J(e);n.$validator.detach(o.instance.fieldName,a),ge.splice(ge.indexOf(o),1)}}}},be=function(e,t){void 0===t&&(t={});var r=t.locale;void 0===r&&(r="en");var i=t.delay;void 0===i&&(i=0);var n=t.errorBagName;void 0===n&&(n="errors");var o=t.dictionary;void 0===o&&(o=null);var a=t.strict;void 0===a&&(a=!0);var s=t.fieldsBagName;void 0===s&&(s="fields"),o&&fe.updateDictionary(o),fe.setLocale(r),fe.setStrictMode(a);var u={locale:r,delay:i,dictionary:o,errorBagName:n,fieldsBagName:s};Object.defineProperties(e.prototype,{$validator:{get:function(){return pe(this)}}}),e.mixin(me(u)),e.directive("validate",ye(u))},xe={install:be,Validator:fe,ErrorBag:G,version:"2.0.0-beta.19"};return xe});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VeeValidate=t()}(this,function(){"use strict";function e(e){return e&&e.__esModule?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}var r=function(e){return/^[a-zA-Z]*$/.test(e)},i=function(e){return/^[a-zA-Z0-9_-]*$/.test(e)},n=function(e){return/^[a-zA-Z0-9]*$/.test(e)},o=function(e){return/^[a-zA-Z\s]*$/.test(e)},a=function(e,t){var r=t[0],i=t[1];return Number(r)<=e&&Number(i)>=e},s=function(e,t,r){var i=t[0],n=i?document.querySelector("input[name='"+i+"']"):document.querySelector("input[name='"+r+"_confirmation']");return!(!n||String(e)!==n.value)},u=t(function(e,t){function r(e){if("string"!=typeof e)throw new TypeError("This library (validator.js) validates strings only")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default}),l=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){(0,o.default)(e);var t=e.replace(/[^0-9]+/g,"");if(!a.test(t))return!1;for(var r=0,i=void 0,n=void 0,s=void 0,u=t.length-1;u>=0;u--)i=t.substring(u,u+1),n=parseInt(i,10),s?(n*=2,r+=n>=10?n%10+1:n):r+=n,s=!s;return!(r%10!==0||!t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=u,o=r(n),a=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{14}$/;e.exports=t.default}),c=e(l),f=function(e){return c(String(e))},d=function(e,t){var r=Array.isArray(t)?t[0]||"*":"*";if(Array.isArray(e))return!1;if(null===e||void 0===e||""===e)return!0;if(0===Number(r))return/^-?\d*$/.test(e);var i="*"===r?"+":"{1,"+r+"}",n=new RegExp("^-?\\d*(\\.\\d"+i+")?$");if(!n.test(e))return!1;var o=parseFloat(e);return o===o},h=function(e,t){var r=t[0],i=String(e);return/^[0-9]*$/.test(i)&&i.length===Number(r)},p=function(e,t,r){var i=window.URL||window.webkitURL;return new Promise(function(n){var o=new Image;o.onerror=function(){return n({valid:!1})},o.onload=function(){return n({valid:o.width===Number(t)&&o.height===Number(r)})},o.src=i.createObjectURL(e)})},v=function(e,t){for(var r=t[0],i=t[1],n=[],o=0;o<e.length;o++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e[o].name))return!1;n.push(e[o])}return Promise.all(n.map(function(e){return p(e,r,i)}))},m=t(function(e,t){function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var r in t)"undefined"==typeof e[r]&&(e[r]=t[r]);return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default}),_=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){(0,a.default)(e);var r=void 0,i=void 0;"object"===("undefined"==typeof t?"undefined":n(t))?(r=t.min||0,i=t.max):(r=arguments[1],i=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=r&&("undefined"==typeof i||o<=i)}Object.defineProperty(t,"__esModule",{value:!0});var n="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};t.default=i;var o=u,a=r(o);e.exports=t.default}),g=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){(0,o.default)(e),t=(0,s.default)(t,l),t.allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var r=e.split(".");if(t.require_tld){var i=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(i))return!1}for(var n,a=0;a<r.length;a++){if(n=r[a],t.allow_underscores&&(n=n.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(n))return!1;if(/[\uff01-\uff5e]/.test(n))return!1;if("-"===n[0]||"-"===n[n.length-1])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=u,o=r(n),a=m,s=r(a),l={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};e.exports=t.default}),y=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if((0,o.default)(e),t=(0,s.default)(t,h),t.allow_display_name){var r=e.match(p);r&&(e=r[1])}var i=e.split("@"),n=i.pop(),a=i.join("@"),u=n.toLowerCase();if("gmail.com"!==u&&"googlemail.com"!==u||(a=a.replace(/\./g,"").toLowerCase()),!(0,c.default)(a,{max:64})||!(0,c.default)(n,{max:256}))return!1;if(!(0,d.default)(n,{require_tld:t.require_tld}))return!1;if('"'===a[0])return a=a.slice(1,a.length-1),t.allow_utf8_local_part?x.test(a):y.test(a);for(var l=t.allow_utf8_local_part?b:v,f=a.split("."),m=0;m<f.length;m++)if(!l.test(f[m]))return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=u,o=r(n),a=m,s=r(a),l=_,c=r(l),f=g,d=r(f),h={allow_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},p=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,v=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,y=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,b=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,x=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default}),b=e(y),x=function(e){return b(String(e))},F=function(e,t){var r=new RegExp(".("+t.join("|")+")$","i");return e.every(function(e){return r.test(e.name)})},$=function(e){return e.every(function(e){return/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e.name)})},w=function(e,t){return!!t.filter(function(t){return t==e}).length},E=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,o.default)(e),t=String(t),!t)return i(e,4)||i(e,6);if("4"===t){if(!a.test(e))return!1;var r=e.split(".").sort(function(e,t){return e-t});return r[3]<=255}if("6"===t){var n=e.split(":"),u=!1,l=i(n[n.length-1],4),c=l?7:8;if(n.length>c)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(n.shift(),n.shift(),u=!0):"::"===e.substr(e.length-2)&&(n.pop(),n.pop(),u=!0);for(var f=0;f<n.length;++f)if(""===n[f]&&f>0&&f<n.length-1){if(u)return!1;u=!0}else if(l&&f===n.length-1);else if(!s.test(n[f]))return!1;return u?n.length>=1:n.length===c}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=u,o=r(n),a=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,s=/^[0-9A-F]{1,4}$/i;e.exports=t.default}),j=e(E),A=function(e,t){void 0===t&&(t=[4]);var r=t[0];return j(e,r)},O=function(e,t){var r=t[0];return void 0===e||null===e?r>=0:String(e).length<=r},S=function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)<=r},L=function(e,t){var r=new RegExp(t.join("|").replace("*",".+")+"$","i");return e.every(function(e){return r.test(e.type)})},T=function(e,t){var r=t[0];return void 0!==e&&null!==e&&String(e).length>=r},k=function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)>=r},M=function(e,t){return!t.filter(function(t){return t==e}).length},D=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,o.default)(e),a.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=u,o=r(n),a=/^[-+]?[0-9]+$/;e.exports=t.default}),N=e(D),q=function(e){return N(String(e))},B=function(e,t){var r=t[0],i=t.slice(1);return r instanceof RegExp?r.test(e):new RegExp(r,i).test(String(e))},R=function(e){return Array.isArray(e)?!!e.length:void 0!==e&&null!==e&&!!String(e).trim().length},V=function(e,t){var r=t[0];if(isNaN(r))return!1;for(var i=1024*Number(r),n=0;n<e.length;n++)if(e[n].size>i)return!1;return!0},z=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(e===n||i(n)&&n.test(e))return!0}return!1}function o(e,t){if((0,s.default)(e),!e||e.length>=2083||/\s/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,p.default)(t,v);var r=void 0,i=void 0,o=void 0,a=void 0,u=void 0,l=void 0,f=void 0,h=void 0;if(f=e.split("#"),e=f.shift(),f=e.split("?"),e=f.shift(),f=e.split("://"),f.length>1){if(r=f.shift(),t.require_valid_protocol&&t.protocols.indexOf(r)===-1)return!1}else{if(t.require_protocol)return!1;t.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(f[0]=e.substr(2))}if(e=f.join("://"),f=e.split("/"),e=f.shift(),""===e&&!t.require_host)return!0;if(f=e.split("@"),f.length>1&&(i=f.shift(),i.indexOf(":")>=0&&i.split(":").length>2))return!1;a=f.join("@"),l=h=null;var m=a.match(_);return m?(o="",h=m[1],l=m[2]||null):(f=a.split(":"),o=f.shift(),f.length&&(l=f.join(":"))),!(null!==l&&(u=parseInt(l,10),!/^[0-9]+$/.test(l)||u<=0||u>65535))&&(!!((0,d.default)(o)||(0,c.default)(o,t)||h&&(0,d.default)(h,6)||"localhost"===o)&&(o=o||h,!(t.host_whitelist&&!n(o,t.host_whitelist))&&(!t.host_blacklist||!n(o,t.host_blacklist))))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=u,s=r(a),l=g,c=r(l),f=E,d=r(f),h=m,p=r(h),v={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},_=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default}),P=e(z),C=function(e,t){void 0===t&&(t=[!0]);var r=t[0];return P(e,{require_protocol:!!r})},U={alpha_dash:i,alpha_num:n,alpha_spaces:o,alpha:r,between:a,confirmed:s,credit_card:f,decimal:d,digits:h,dimensions:v,email:x,ext:F,image:$,in:w,ip:A,max:O,max_value:S,mimes:L,min:T,min_value:k,not_in:M,numeric:q,regex:B,required:R,size:V,url:C},G=function(){this.errors=[]};G.prototype.add=function(e,t,r,i){void 0===i&&(i="__global__"),this.errors.push({field:e,msg:t,rule:r,scope:i})},G.prototype.all=function(e){return e||(e="__global__"),this.errors.filter(function(t){return t.scope===e}).map(function(e){return e.msg})},G.prototype.any=function(e){return e||(e="__global__"),!!this.errors.filter(function(t){return t.scope===e}).length},G.prototype.clear=function(e){e||(e="__global__"),this.errors=this.errors.filter(function(t){return t.scope!==e})},G.prototype.collect=function(e,t,r){if(void 0===r&&(r=!0),!e){var i={};return this.errors.forEach(function(e){i[e.field]||(i[e.field]=[]),i[e.field].push(r?e.msg:e)}),i}return t?this.errors.filter(function(r){return r.field===e&&r.scope===t}).map(function(e){return r?e.msg:e}):this.errors.filter(function(t){return t.field===e&&"__global__"===t.scope}).map(function(e){return r?e.msg:e})},G.prototype.count=function(){return this.errors.length},G.prototype.first=function(e,t){var r=this;void 0===t&&(t="__global__");var i=this._selector(e),n=this._scope(e);if(n)return this.first(n.name,n.scope);if(i)return this.firstByRule(i.name,i.rule,t);for(var o=0;o<this.errors.length;o++)if(r.errors[o].field===e&&r.errors[o].scope===t)return r.errors[o].msg;return null},G.prototype.has=function(e,t){return void 0===t&&(t="__global__"),!!this.first(e,t)},G.prototype.firstByRule=function(e,t,r){var i=this.collect(e,r,!1).filter(function(e){return e.rule===t})[0];return i&&i.msg||null},G.prototype.remove=function(e,t){return t?void(this.errors=this.errors.filter(function(r){return r.field!==e||r.scope!==t})):void(this.errors=this.errors.filter(function(t){return t.field!==e&&"__global__"===t.scope}))},G.prototype._selector=function(e){if(e.indexOf(":")>-1){var t=e.split(":"),r=t[0],i=t[1];return{name:r,rule:i}}return null},G.prototype._scope=function(e){if(e.indexOf(".")>-1){var t=e.split("."),r=t[0],i=t[1];return{name:i,scope:r}}return null};var I=function(){function e(e){this.msg="[vee-validate]: "+e}return e.prototype.toString=function(){return this.msg},e}(),Z=function(e,t){return e.getAttribute("data-vv-"+t)},Y=function(e){var t=Z(e,"scope");return!t&&e.form&&(t=Z(e.form,"scope")),t},J=function(e,t,r){void 0===t&&(t=0);var i;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];var a=function(){i=null,r||e.apply(void 0,n)},s=r&&!i;clearTimeout(i),i=setTimeout(a,t),s&&e(n)}},K=function(e){console&&console.warn("[vee-validate]: "+e)},H=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)},Q=function(e){return"function"==typeof e},W=function(e){void 0===e&&(e={}),this.dictionary={},this.merge(e)};W.prototype.hasLocale=function(e){return!!this.dictionary[e]},W.prototype.getMessage=function(e,t,r){return void 0===r&&(r=""),this.hasMessage(e,t)?this.dictionary[e].messages[t]:r},W.prototype.getAttribute=function(e,t,r){return void 0===r&&(r=""),this.hasAttribute(e,t)?this.dictionary[e].attributes[t]:r},W.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].messages&&this.dictionary[e].messages[t])},W.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].attributes&&this.dictionary[e].attributes[t])},W.prototype.merge=function(e){this._merge(this.dictionary,e)},W.prototype.setMessage=function(e,t,r){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].messages[t]=r},W.prototype.setAttribute=function(e,t,r){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].attributes[t]=r},W.prototype._merge=function(e,t){var r=this;return H(e)&&H(t)?(Object.keys(t).forEach(function(i){if(H(t[i])){if(!e[i]){Object.assign(e,(n={},n[i]={},n));var n}return void r._merge(e[i],t[i])}Object.assign(e,(o={},o[i]=t[i],o));var o}),e):e};var X={alpha_dash:function(e){return"The "+e+" field may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(e){return"The "+e+" field may only contain alpha-numeric characters."},alpha_spaces:function(e){return"The "+e+" field may only contain alphabetic characters as well as spaces."},alpha:function(e){return"The "+e+" field may only contain alphabetic characters."},between:function(e,t){var r=t[0],i=t[1];return"The "+e+" field must be between "+r+" and "+i+"."},confirmed:function(e){return"The "+e+" confirmation does not match."},credit_card:function(e){return"The "+e+" field is invalid."},decimal:function(e,t){void 0===t&&(t=["*"]);var r=t[0];return"The "+e+" field must be numeric and may contain "+("*"===r?"":r)+" decimal points."},digits:function(e,t){var r=t[0];return"The "+e+" field must be numeric and exactly contain "+r+" digits."},dimensions:function(e,t){var r=t[0],i=t[1];return"The "+e+" field must be "+r+" pixels by "+i+" pixels."},email:function(e){return"The "+e+" field must be a valid email."},ext:function(e){return"The "+e+" field must be a valid file."},image:function(e){return"The "+e+" field must be an image."},in:function(e){return"The "+e+" field must be a valid value."},ip:function(e){return"The "+e+" field must be a valid ip address."},max:function(e,t){var r=t[0];return"The "+e+" field may not be greater than "+r+" characters."},max_value:function(e,t){var r=t[0];return"The "+e+" field must be "+r+" or less."},mimes:function(e){return"The "+e+" field must have a valid file type."},min:function(e,t){var r=t[0];return"The "+e+" field must be at least "+r+" characters."},min_value:function(e,t){var r=t[0];return"The "+e+" field must be "+r+" or more."},not_in:function(e){return"The "+e+" field must be a valid value."},numeric:function(e){return"The "+e+" field may only contain numeric characters."},regex:function(e){return"The "+e+" field format is invalid."},required:function(e){return"The "+e+" field is required."},size:function(e,t){var r=t[0];return"The "+e+" field must be less than "+r+" KB."},url:function(e){return"The "+e+" field is not a valid URL."}},ee=function(e){return function(t,r){var i=r[0],n=r[1],o=e(t,n,!0),a=document.querySelector("input[name='"+i+"']");if(!o.isValid()||!a)return!1;var s=e(a.value,n,!0);return!!s.isValid()&&o.isAfter(s)}},te=function(e){return function(t,r){var i=r[0],n=r[1],o=e(t,n,!0),a=document.querySelector("input[name='"+i+"']");if(!o.isValid()||!a)return!1;var s=e(a.value,n,!0);return!!s.isValid()&&o.isBefore(s)}},re=function(e){return function(t,r){var i=r[0];return e(t,i,!0).isValid()}},ie=function(e){return function(t,r){var i=r[0],n=r[1],o=r[2],a=e(i,o,!0),s=e(n,o,!0),u=e(t,o,!0);return!!(a.isValid()&&s.isValid()&&u.isValid())&&u.isBetween(a,s)}},ne={after:function(e,t){var r=t[0];return"The "+e+" must be after "+r+"."},before:function(e,t){var r=t[0];return"The "+e+" must be before "+r+"."},date_between:function(e,t){var r=t[0],i=t[1];return"The "+e+" must be between "+r+" and "+i+"."},date_format:function(e,t){var r=t[0];return"The "+e+" must be in the format "+r+"."}},oe={make:function(e){return{date_format:re(e),after:ee(e),before:te(e),date_between:ie(e)}},messages:ne,installed:!1},ae=function(){this.fields={}};ae.prototype._add=function(e){this.fields[e]={},this._setFlags(e,{dirty:!1,valid:!1},!0)},ae.prototype._remove=function(e){delete this.fields[e]},ae.prototype.reset=function(e){var t=this;return e?void this._setFlags(e,{dirty:!1,valid:!1},!0):void Object.keys(this.fields).forEach(function(e){t._setFlags(e,{dirty:!1,valid:!1},!0)})},ae.prototype._setFlags=function(e,t,r){var i=this;return void 0===r&&(r=!1),Object.keys(t).every(function(n){return i._setFlag(e,n,t[n],r)})},ae.prototype._setFlag=function(e,t,r,i){void 0===i&&(i=!1);var n="set"+t.charAt(0).toUpperCase()+t.slice(1);return"function"==typeof this[n]&&(this[n](e,r,i),!0)},ae.prototype.setDirty=function(e,t,r){void 0===r&&(r=!1),this.fields[e].dirty=t,this.fields[e].clean=r||!t,this.fields[e].passed=this.fields[e].valid&&t,this.fields[e].failed=!this.fields[e].valid&&t},ae.prototype.setValid=function(e,t){this.fields[e].valid=t,this.fields[e].passed=this.fields[e].dirty&&t,this.fields[e].failed=this.fields[e].dirty&&!t},ae.prototype._getFieldFlag=function(e,t){return!!this.fields[e]&&this.fields[e][t]},ae.prototype.dirty=function(e){var t=this;return e?this._getFieldFlag(e,"dirty"):Object.keys(this.fields).some(function(e){return t.fields[e].dirty})},ae.prototype.valid=function(e){var t=this;return e?this._getFieldFlag(e,"valid"):Object.keys(this.fields).every(function(e){return t.fields[e].valid})},ae.prototype.passed=function(e){var t=this;return e?this._getFieldFlag(e,"passed"):Object.keys(this.fields).every(function(e){return t.fields[e].passed})},ae.prototype.failed=function(e){var t=this;return e?this._getFieldFlag(e,"failed"):Object.keys(this.fields).some(function(e){return t.fields[e].failed})},ae.prototype.clean=function(e){return e?this._getFieldFlag(e,"clean"):!this.dirty()};var se="en",ue=!0,le=new W({en:{messages:X,attributes:{}}}),ce=function(e,t,r){void 0===r&&(r={init:!0}),this.strictMode=ue,this.$scopes={__global__:{}},this.fieldBag=new ae,this._createFields(e),this.errorBag=new G,this.$vm=t,this.$deferred=[],this.$ready=!1,"function"==typeof moment&&this.installDateTimeValidators(moment),r.init&&this.init()};ce._merge=function(e,t){return Q(t)?(U[e]=t,void le.setMessage("en",e,function(e){return"The "+e+" value is not valid."})):(U[e]=t.validate,t.getMessage&&Q(t.getMessage)&&le.setMessage("en",e,t.getMessage),void(t.messages&&le.merge(Object.keys(t.messages).reduce(function(r,i){var n=r;n[i]={messages:(o={},o[e]=t.messages[i],o)};var o;return n},{}))))},ce._guardExtend=function(e,t){if(U[e])throw new I("Extension Error: There is an existing validator with the same name '"+e+"'.");if(!Q(t)){if(!Q(t.validate))throw new I("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.");if(!Q(t.getMessage)&&!H(t.messages))throw new I("Extension Error: The validator '"+e+"' must have a 'getMessage' method or have a 'messages' object.")}},ce.create=function(e,t,r){return new ce(e,t,r)},ce.extend=function(e,t){ce._guardExtend(e,t),ce._merge(e,t)},ce.installDateTimeValidators=function(e){if("function"!=typeof e)return K("To use the date-time validators you must provide moment reference."),!1;if(oe.installed)return!0;var t=oe.make(e);return Object.keys(t).forEach(function(e){ce.extend(e,t[e])}),ce.updateDictionary({en:{messages:oe.messages}}),oe.installed=!0,!0},ce.remove=function(e){delete U[e]},ce.setLocale=function(e){void 0===e&&(e="en"),le.hasLocale(e)||K("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),se=e},ce.setStrictMode=function(e){void 0===e&&(e=!0),ue=e},ce.updateDictionary=function(e){le.merge(e)},ce.prototype._resolveScope=function(e){if("string"==typeof e)return e;if(Q(e)){var t=e();return"string"==typeof t?t:"__global__"}return"__global__"},ce.prototype._resolveValuesFromGetters=function(e){var t=this;if(void 0===e&&(e="__global__"),!this.$scopes[e])return{};var r={};return Object.keys(this.$scopes[e]).forEach(function(i){var n=t.$scopes[e][i],o=n.getter,a=n.context,s=t._resolveScope(n.scope);o&&a&&("__global__"===e||s===e)&&(r[i]={value:o(a()),scope:s})}),r},ce.prototype._createFields=function(e){var t=this;e&&Object.keys(e).forEach(function(r){t._createField(r,e[r])})},ce.prototype._createField=function(e,t,r){void 0===r&&(r="__global__"),r=this._resolveScope(r),this.$scopes[r]||(this.$scopes[r]={}),this.$scopes[r][e]||(this.$scopes[r][e]={});var i=this.$scopes[r][e];this.fieldBag._add(e),i.validations=this._normalizeRules(e,t,r),i.required=this._isRequired(i)},ce.prototype._normalizeRules=function(e,t,r){return t?"string"==typeof t?this._normalizeString(t):H(t)?this._normalizeObject(t):(K("Your checks for '"+r+"."+e+"' must be either a string or an object."),{}):{}},ce.prototype._isRequired=function(e){return e.validations&&e.validations.required},ce.prototype._normalizeObject=function(e){var t=this,r={};return Object.keys(e).forEach(function(i){var n=[];n=e[i]===!0?[]:Array.isArray(e[i])?e[i]:[e[i]],r[i]=n,oe.installed&&t._isADateRule(i)&&r[i].push(t._getDateFormat(r))}),r},ce.prototype._getDateFormat=function(e){return e.date_format&&Array.isArray(e.date_format)?e.date_format[0]:null},ce.prototype._isADateRule=function(e){return!!~["after","before","date_between"].indexOf(e)},ce.prototype._normalizeString=function(e){var t=this,r={};return e.split("|").forEach(function(e){var i=t._parseRule(e);i.name&&("required"===i.name&&(r.required=!0),r[i.name]=i.params,oe.installed&&t._isADateRule(i.name)&&r[i.name].push(t._getDateFormat(r)))}),r},ce.prototype._parseRule=function(e){var t=[],r=e.split(":")[0];return~e.indexOf(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:r,params:t}},ce.prototype._formatErrorMessage=function(e,t,r,i){void 0===r&&(r={}),void 0===i&&(i="__global__");var n=this._getFieldDisplayName(e,i),o=this._getLocalizedParams(t);return le.hasLocale(se)&&"function"==typeof le.getMessage(se,t.name)?le.getMessage(se,t.name)(n,o,r):le.getMessage("en",t.name)(n,o,r)},ce.prototype._getLocalizedParams=function(e){return~["after","before","confirmed"].indexOf(e.name)&&e.params&&e.params[0]?[le.getAttribute(se,e.params[0],e.params[0])]:e.params},ce.prototype._getFieldDisplayName=function(e,t){return void 0===t&&(t="__global__"),this.$scopes[t][e].name||le.getAttribute(se,e,e)},ce.prototype._test=function(e,t,r,i){var n=this;void 0===i&&(i="__global__");var o=U[r.name];if(!o||"function"!=typeof o)throw new I("No such validator '"+r.name+"' exists.");var a=o(t,r.params,e);return Q(a.then)?a.then(function(t){var o=!0,a={};return Array.isArray(t)?o=t.every(function(e){return e.valid}):(o=t.valid,a=t.data),o||n.errorBag.add(e,n._formatErrorMessage(e,r,a,i),r.name,i),o}):(H(a)||(a={valid:a,data:{}}),a.valid||this.errorBag.add(e,this._formatErrorMessage(e,r,a.data,i),r.name,i),a.valid)},ce.prototype.attach=function e(t,r,i){var n=this;void 0===i&&(i={});var e=function(){i.scope=n._resolveScope(i.scope),n.updateField(t,r,i);var e=n.$scopes[i.scope][t];e.scope=i.scope,e.name=i.prettyName,e.getter=i.getter,e.context=i.context,e.listeners=i.listeners||{detach:function(){}}},o=Q(i.scope)?i.scope():i.scope;return o||this.$ready?void e():void this.$deferred.push(e)},ce.prototype.init=function(){return this.$ready=!0,this.$deferred.forEach(function(e){e()}),this.$deferred=[],this},ce.prototype.append=function(e,t,r){void 0===r&&(r={}),r.scope=this._resolveScope(r.scope),this.$scopes[r.scope]&&this.$scopes[r.scope][e]||this.attach(e,t,r);var i=this.$scopes[r.scope][e],n=this._normalizeRules(e,t,r.scope);Object.keys(n).forEach(function(e){i.validations[e]=n[e]})},ce.prototype.updateField=function(e,t,r){void 0===r&&(r={}),this.errorBag.remove(e,r.scope),this._createField(e,t,r.scope)},ce.prototype.detach=function(e,t){void 0===t&&(t="__global__"),this.$scopes[t]&&this.$scopes[t][e]&&(this.$scopes[t][e].listeners.detach(),this.errorBag.remove(e,t),this.fieldBag._remove(e),delete this.$scopes[t][e])},ce.prototype.extend=function(e,t){ce.extend(e,t)},ce.prototype.getErrors=function(){return this.errorBag},ce.prototype.getLocale=function(){return se},ce.prototype.installDateTimeValidators=function(e){ce.installDateTimeValidators(e)},ce.prototype.remove=function(e){ce.remove(e)},ce.prototype.setLocale=function(e){le.hasLocale(e)||K("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),se=e},ce.prototype.setStrictMode=function(e){void 0===e&&(e=!0),this.strictMode=e},ce.prototype.updateDictionary=function(e){ce.updateDictionary(e)},ce.prototype.addScope=function(e){e&&!this.$scopes[e]&&(this.$scopes[e]={})},ce.prototype.validate=function(e,t,r){var i=this;if(void 0===r&&(r="__global__"),e&&e.indexOf(".")>-1){var n;n=e.split("."),r=n[0],e=n[1]}if(r||(r="__global__"),!this.$scopes[r]||!this.$scopes[r][e]){if(!this.strictMode)return!0;var o="__global__"===r?e:r+"."+e;return K('Validating a non-existant field: "'+o+'". Use "attach()" first.'),!1}var a=this.$scopes[r][e];if(this.errorBag.remove(e,r),!a.required&&~[null,void 0,""].indexOf(t))return this.fieldBag._setFlags(e,{valid:!0,dirty:!0}),!0;var s=!0,u=[];return Object.keys(a.validations).forEach(function(n){var o=i._test(e,t,{name:n,params:a.validations[n]},r);return Q(o.then)?void u.push(o):void(s=s&&o)}),u.length?Promise.all(u).then(function(t){var r=t.every(function(e){return e})&&s;return i.fieldBag._setFlags(e,{valid:r,dirty:!0}),r}):(this.fieldBag._setFlags(e,{valid:s,dirty:!0}),s)},ce.prototype.validateAll=function(e){var t,r=this;e&&"string"!=typeof e?(t={},Object.keys(e).forEach(function(r){t[r]={value:e[r]}})):(this.errorBag.clear(e),t=this._resolveValuesFromGetters(e));var i=!0,n=[];return Object.keys(t).forEach(function(e){var o=r.validate(e,t[e].value,t[e].scope);return Q(o.then)?void n.push(o):void(i=i&&o)}),Promise.all(n).then(function(e){var t=e.every(function(e){return e})&&i;if(!t)throw new I("Validation Failed");return t})},ce.prototype.validateScopes=function(){var e=this;return Promise.all(Object.keys(this.$scopes).map(function(t){return e.validateAll(t)}))};var fe=[],de=function(e){for(var t=0;t<fe.length;t++)if(fe[t].$vm===e)return fe[t].$validator},he=function(e){var t=de(e);return t||(t=ce.create(void 0,e,{init:!1}),fe.push({$vm:e,$validator:t})),t},pe=function(e){for(var t=0;t<fe.length;t++)if(fe[t].$vm===e)return fe.splice(t,1),!0;return!1},ve=function(e){return{data:function(){return t={},t[e.errorBagName]=this.$validator.errorBag,t;var t},computed:(t={},t[e.fieldsBagName]={get:function(){return this.$validator.fieldBag}},t),mounted:function(){this.$validator.init()},destroyed:function(){pe(this)}};var t},me=function(e,t,r,i){this.unwatch=void 0,this.callbacks=[],this.el=e,this.scope=H(t.value)?t.value.scope:Y(e),this.binding=t,this.vm=r.context,this.component=r.child,this.options=i,this.fieldName=this._resolveFieldName()};me.prototype._resolveFieldName=function(){return this.component?Z(this.el,"name")||this.component.name:this.el.name||Z(this.el,"name")},me.prototype._hasFieldDependency=function(e){var t=this,r=!1;return!!e&&(H(e)?(Object.keys(e).forEach(function(t){if(/confirmed|after|before/.test(t))return r=e[t],!1}),r):(e.split("|").every(function(e){return/\b(confirmed|after|before):/.test(e)?(r=e.split(":")[1],!1):!/\b(confirmed)/.test(e)||(r=t.fieldName+"_confirmation",!1)}),r))},me.prototype._inputListener=function(){this._validate(this.el.value)},me.prototype._fileListener=function(){var e=this._validate([].concat(this.el.files));!e&&this.binding.modifiers.reject&&(this.el.value="")},me.prototype._radioListener=function(){var e=document.querySelector('input[name="'+this.el.name+'"]:checked');this._validate(e?e.value:null)},me.prototype._checkboxListener=function(){var e=this,t=document.querySelectorAll('input[name="'+this.el.name+'"]:checked');return t&&t.length?void[].concat(t).forEach(function(t){e._validate(t.value)}):void this._validate(null)},me.prototype._validate=function(e){return this.vm.$validator.validate(this.fieldName,e,this.scope||Y(this.el))},me.prototype._getScopedListener=function(e){var t=this;return function(r){(!r||r===t.scope||r instanceof Event)&&e()}},me.prototype._getRules=function(){return this.binding.expression?H(this.binding.value)?this.binding.value.rules:this.binding.value:Z(this.el,"rules")},me.prototype._attachValidatorEvent=function(){var e=this,t=this._getScopedListener(this._getSuitableListener().listener.bind(this)),r=this._hasFieldDependency(this._getRules());r&&this.vm.$nextTick(function(){var i=document.querySelector("input[name='"+r+"']");return i?(i.addEventListener("input",t),void e.callbacks.push({name:"input",listener:t,el:i})):void K("Cannot find target field, no additional listeners were attached.")})},me.prototype._getSuitableListener=function(){var e;if("SELECT"===this.el.tagName)return{names:["change","blur"],listener:this._inputListener};switch(this.el.type){case"file":e={names:["change"],listener:this._fileListener};break;case"radio":e={names:["change"],listener:this._radioListener};break;case"checkbox":e={names:["change"],listener:this._checkboxListener};break;default:e={names:["input","blur"],listener:this._inputListener}}var t=Z(this.el,"validate-on");return t&&(e.names=t.split("|")),e},me.prototype._attachComponentListeners=function(){var e=this;this.componentListener=J(function(t){e._validate(t)},Z(this.el,"delay")||this.options.delay),this.component.$on("input",this.componentListener)},me.prototype._attachFieldListeners=function(){var e=this;if(this.component)return void this._attachComponentListeners();var t=this._getSuitableListener(),r=J(t.listener.bind(this),Z(this.el,"delay")||this.options.delay);return~["radio","checkbox"].indexOf(this.el.type)?void this.vm.$nextTick(function(){var i=document.querySelectorAll('input[name="'+e.el.name+'"]');Array.from(i).forEach(function(i){t.names.forEach(function(t){i.addEventListener(t,r),e.callbacks.push({name:t,listener:r,el:i})})})}):void t.names.forEach(function(t){e.el.addEventListener(t,r),e.callbacks.push({name:t,listener:r,el:e.el})})},me.prototype._resolveValueGetter=function(){var e=this;if(this.component)return{context:function(){return e.component},getter:function(e){return e[Z(e.$el,"value-path")]||e.value}};switch(this.el.type){case"checkbox":return{context:function(){return document.querySelectorAll('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.length?[].concat(e).map(function(e){return e.value}):null}};case"radio":return{context:function(){return document.querySelector('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.value}};case"file":return{context:function(){return e.el},getter:function(e){return[].concat(e.files)}};default:return{context:function(){return e.el},getter:function(e){return e.value}}}},me.prototype._getArg=function(){return this.binding.arg?this.binding.arg:H(this.binding.value)?this.binding.value.arg:null},me.prototype.attach=function(){var e=this,t=this._resolveValueGetter(),r=t.context,i=t.getter;this.vm.$validator.attach(this.fieldName,this._getRules(),{scope:function(){
return e.scope||Y(e.el)},prettyName:Z(this.el,"as"),context:r,getter:i,listeners:this}),this._attachValidatorEvent();var n=this._getArg();return n?void(this.unwatch=this.vm.$watch(n,function(t){e.vm.$validator.validate(e.fieldName,t,e.scope||Y(e.el))})):void this._attachFieldListeners()},me.prototype.detach=function(){this.component&&this.component.$off("input",this.componentListener),this.unwatch&&this.unwatch(),this.callbacks.forEach(function(e){e.el.removeEventListener(e.name,e.listener)})};var _e=[],ge=function(e){return{bind:function(t,r,i){var n=new me(t,r,i,e);n.attach(),_e.push({vm:i.context,el:t,instance:n})},update:function(e,t,r){var i=t.expression,n=t.value,o=t.oldValue,a=r.context;if(i&&JSON.stringify(n)!==JSON.stringify(o)){var s=_e.filter(function(t){return t.vm===a&&t.el===e})[0],u=H(n)?n.scope||Y(e):Y(e);a.$validator.updateField(s.instance.fieldName,H(n)?n.rules:n,{scope:u})}},unbind:function(e,t,r){var i=t.value,n=r.context,o=_e.filter(function(t){return t.vm===n&&t.el===e})[0];if("undefined"!=typeof o){var a=H(i)?i.scope:Y(e);n.$validator.detach(o.instance.fieldName,a),_e.splice(_e.indexOf(o),1)}}}},ye=function(e,t){void 0===t&&(t={});var r=t.locale;void 0===r&&(r="en");var i=t.delay;void 0===i&&(i=0);var n=t.errorBagName;void 0===n&&(n="errors");var o=t.dictionary;void 0===o&&(o=null);var a=t.strict;void 0===a&&(a=!0);var s=t.fieldsBagName;void 0===s&&(s="fields"),o&&ce.updateDictionary(o),ce.setLocale(r),ce.setStrictMode(a);var u={locale:r,delay:i,dictionary:o,errorBagName:n,fieldsBagName:s};Object.defineProperties(e.prototype,{$validator:{get:function(){return he(this)}}}),e.mixin(ve(u)),e.directive("validate",ge(u))},be={install:ye,Validator:ce,ErrorBag:G,version:"2.0.0-beta.20"};return be});
{
"name": "vee-validate",
"version": "2.0.0-beta.19",
"version": "2.0.0-beta.20",
"description": "Simple Vue.js input validation plugin",

@@ -5,0 +5,0 @@ "main": "dist/vee-validate.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc