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

verifalia-widget

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verifalia-widget - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

4

dist/verifalia-widget.js
// (c) Verifalia - email verification service - https://verifalia.com
var VerifaliaWidget=function(){"use strict";var e,t="verifalia-cached-configuration";function n(e,t){var i=function(e){return e&&"object"==typeof e};return i(e)&&i(t)?(Object.keys(t).forEach((function(r){var a=e[r],o=t[r];Array.isArray(a)&&Array.isArray(o)?e[r]=a.concat(o):i(a)&&i(o)?e[r]=n(Object.assign({},a),o):e[r]=o})),e):t}!function(e){e.throttled="throttled",e.invalid="invalid",e.exception="exception"}(e||(e={}));var i,r=function(){function e(e){this._globalConfiguration=e}return e.prototype.getConfiguration=function(e){return e?(e[t]||(e[t]=this.readConfiguration(e)),e[t]):this.readConfiguration()},e.prototype.shouldPreventFormSubmissionOn=function(e,t){if(e.inputBindings){var n=e.inputBindings.preventSubmission||"",i=void 0;return i=Array.isArray(n)?n.map((function(e){return e.trim().toUpperCase()})):n.split(",").map((function(e){return e.trim().toUpperCase()})),e.inputBindings.preventSubmission,i.indexOf(t.toUpperCase())>0}return!1},e.prototype.readConfiguration=function(e){var t=this,i=n(n({},{inputBindings:{autoWireup:!0,preventSubmission:"invalid, throttled",appendHiddenFields:!0,events:"input",debounceTime:500,classNames:{base:"verifalia-field",processing:"verifalia-field-processing",valid:"verifalia-field-valid",invalid:"verifalia-field-invalid",throttled:"verifalia-field-throttled",exception:"verifalia-field-exception"}},emailValidations:{allow:"deliverable, risky, unknown",block:"@disposable",messages:{processing:"Please hold on for a second, until we verify this email address...",invalid:"Please enter a valid email address.",throttled:"Too many attempts, please try again later.",exception:"An error has occurred while verifying this email address. Please try again later."}}}),this._globalConfiguration||{});return this._globalConfiguration,e&&(this.applyConfigurationItem(e,"appKey",(function(e){return i.appKey=e})),this.applyConfigurationItem(e,"inputBindings-autoWireup",(function(e){return i.inputBindings.autoWireup=t.toBoolean(e)})),this.applyConfigurationItem(e,"inputBindings-appendHiddenFields",(function(e){return i.inputBindings.appendHiddenFields=t.toBoolean(e)})),this.applyConfigurationItem(e,"inputBindings-debounceTime",(function(e){return i.inputBindings.debounceTime=parseInt(e)}))),i},e.prototype.toBoolean=function(e){return"true"===e},e.prototype.applyConfigurationItem=function(e,t,n){var i=this.readConfigurationItemRecursive(e,t);void 0!==i&&n(i)},e.prototype.readConfigurationItemRecursive=function(e,t){var n="data-verifalia-"+t,i=e.getAttribute(n);if(i)return i;var r=e.parentElement;return r?this.readConfigurationItemRecursive(r,t):void 0},e}();!function(e){e.Initializing="verifalia-widget:initializing",e.Initialized="verifalia-widget:initialized",e.FieldValidationStarted="verifalia-widget:field-validation-started",e.FieldValidationCompleted="verifalia-widget:field-validation-completed"}(i||(i={}));
var VerifaliaWidget=function(){"use strict";var e,t="verifalia-cached-configuration";function n(e,t){var i=function(e){return e&&"object"==typeof e};return i(e)&&i(t)?(Object.keys(t).forEach((function(r){var a=e[r],o=t[r];Array.isArray(a)&&Array.isArray(o)?e[r]=a.concat(o):i(a)&&i(o)?e[r]=n(Object.assign({},a),o):e[r]=o})),e):t}!function(e){e.throttled="throttled",e.invalid="invalid",e.exception="exception"}(e||(e={}));var i,r=function(){function e(e){this._globalConfiguration=e}return e.prototype.getConfiguration=function(e){return e?(e[t]||(e[t]=this.readConfiguration(e)),e[t]):this.readConfiguration()},e.prototype.shouldPreventFormSubmissionOn=function(e,t){if(e.inputBindings){var n=e.inputBindings.preventSubmission||"",i=void 0;return i=Array.isArray(n)?n.map((function(e){return e.trim().toUpperCase()})):n.split(",").map((function(e){return e.trim().toUpperCase()})),e.inputBindings.preventSubmission,i.indexOf(t.toUpperCase())>0}return!1},e.prototype.readConfiguration=function(e){var t=n(n({},{inputBindings:{autoWireup:!0,preventSubmission:"invalid, throttled",appendHiddenFields:!0,events:"input",debounceTime:500,classNames:{base:"verifalia-field",processing:"verifalia-field-processing",valid:"verifalia-field-valid",invalid:"verifalia-field-invalid",throttled:"verifalia-field-throttled",exception:"verifalia-field-exception"},squiggles:!0},emailValidations:{allow:"deliverable, risky, unknown",block:"@disposable",messages:{processing:"Please hold on for a second, until we verify this email address...",invalid:"Please enter a valid email address.",throttled:"Too many attempts, please try again later.",exception:"An error has occurred while verifying this email address. Please try again later."}}}),this._globalConfiguration||{});return this._globalConfiguration,e&&(this.applyConfigurationItem(e,"appKey",(function(e){return t.appKey=e})),t.inputBindings=t.inputBindings||{},t.inputBindings.classNames=t.inputBindings.classNames||{},t.emailValidations=t.emailValidations||{},t.emailValidations.messages=t.emailValidations.messages||{},this.applyElementConfiguration(t,e)),t},e.prototype.applyElementConfiguration=function(e,t){var n=this,i=function(r,a){Object.keys(r).forEach((function(o){var s=a?a+"."+o:o,l=typeof r[o];"object"===l?i(r[o],s):n.applyConfigurationItem(t,s.replace(".","-"),(function(t){var n=e;s.split(".").forEach((function(e,i,r){if(i===r.length-1)switch(l){case"boolean":n[e]=function(e){return"true"===e}(t);break;case"number":n[e]=parseInt(t)||0;break;default:n[e]=t}n=n[e]}))}))}))};i(e)},e.prototype.applyConfigurationItem=function(e,t,n){var i=function(e,t){var n="data-verifalia-"+t,r=e.getAttribute(n);if(r)return r;var a=e.parentElement;return a?i(a,t):void 0},r=i(e,t);void 0!==r&&n(r)},e}();!function(e){e.Initializing="verifalia-widget:initializing",e.Initialized="verifalia-widget:initialized",e.FieldValidationStarted="verifalia-widget:field-validation-started",e.FieldValidationCompleted="verifalia-widget:field-validation-completed"}(i||(i={}));
/*! *****************************************************************************

@@ -17,2 +17,2 @@ Copyright (c) Microsoft Corporation. All rights reserved.

***************************************************************************** */
var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return(s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function u(e,t,n,i){return new(n||(n=Promise))((function(r,a){function o(e){try{u(i.next(e))}catch(e){a(e)}}function s(e){try{u(i.throw(e))}catch(e){a(e)}}function u(e){e.done?r(e.value):new n((function(t){t(e.value)})).then(o,s)}u((i=i.apply(e,t||[])).next())}))}function l(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function c(e){return this instanceof c?(this.v=e,this):new c(e)}function d(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(e,t||[]),a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise((function(n,i){a.push([e,t,n,i])>1||s(e,t)}))})}function s(e,t){try{(n=r[e](t)).value instanceof c?Promise.resolve(n.value.v).then(u,l):d(a[0][2],n)}catch(e){d(a[0][3],e)}var n}function u(e){s("next",e)}function l(e){s("throw",e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}var f=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}},p=Object.prototype.toString;function h(e){return"[object Array]"===p.call(e)}function A(e){return void 0===e}function m(e){return null!==e&&"object"==typeof e}function v(e){return"[object Function]"===p.call(e)}function g(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),h(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}var y={isArray:h,isArrayBuffer:function(e){return"[object ArrayBuffer]"===p.call(e)},isBuffer:function(e){return null!==e&&!A(e)&&null!==e.constructor&&!A(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:m,isUndefined:A,isDate:function(e){return"[object Date]"===p.call(e)},isFile:function(e){return"[object File]"===p.call(e)},isBlob:function(e){return"[object Blob]"===p.call(e)},isFunction:v,isStream:function(e){return m(e)&&v(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:g,merge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]=n}for(var i=0,r=arguments.length;i<r;i++)g(arguments[i],n);return t},deepMerge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]="object"==typeof n?e({},n):n}for(var i=0,r=arguments.length;i<r;i++)g(arguments[i],n);return t},extend:function(e,t,n){return g(t,(function(t,i){e[i]=n&&"function"==typeof t?f(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}};function w(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var E=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(y.isURLSearchParams(t))i=t.toString();else{var r=[];y.forEach(t,(function(e,t){null!=e&&(y.isArray(e)?t+="[]":e=[e],y.forEach(e,(function(e){y.isDate(e)?e=e.toISOString():y.isObject(e)&&(e=JSON.stringify(e)),r.push(w(t)+"="+w(e))})))})),i=r.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e};function b(){this.handlers=[]}b.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},b.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},b.prototype.forEach=function(e){y.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var C=b,S=function(e,t,n){return y.forEach(n,(function(n){e=n(e,t)})),e},B=function(e){return!(!e||!e.__CANCEL__)},x=function(e,t){y.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))},F=function(e,t,n,i,r){return function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}(new Error(e),t,n,i,r)},I=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],T=y.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=y.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},_=y.isStandardBrowserEnv()?{write:function(e,t,n,i,r,a){var o=[];o.push(e+"="+encodeURIComponent(t)),y.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),y.isString(i)&&o.push("path="+i),y.isString(r)&&o.push("domain="+r),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},R={"Content-Type":"application/x-www-form-urlencoded"};function V(e,t){!y.isUndefined(e)&&y.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var U,k={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(U=function(e){return new Promise((function(t,n){var i=e.data,r=e.headers;y.isFormData(i)&&delete r["Content-Type"];var a=new XMLHttpRequest;if(e.auth){var o=e.auth.username||"",s=e.auth.password||"";r.Authorization="Basic "+btoa(o+":"+s)}var u,l,c=(u=e.baseURL,l=e.url,u&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(l)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(u,l):l);if(a.open(e.method.toUpperCase(),E(c,e.params,e.paramsSerializer),!0),a.timeout=e.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var i,r,o,s,u,l="getAllResponseHeaders"in a?(i=a.getAllResponseHeaders(),u={},i?(y.forEach(i.split("\n"),(function(e){if(s=e.indexOf(":"),r=y.trim(e.substr(0,s)).toLowerCase(),o=y.trim(e.substr(s+1)),r){if(u[r]&&I.indexOf(r)>=0)return;u[r]="set-cookie"===r?(u[r]?u[r]:[]).concat([o]):u[r]?u[r]+", "+o:o}})),u):u):null,c={data:e.responseType&&"text"!==e.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:l,config:e,request:a};!function(e,t,n){var i=n.config.validateStatus;!i||i(n.status)?e(n):t(F("Request failed with status code "+n.status,n.config,null,n.request,n))}(t,n,c),a=null}},a.onabort=function(){a&&(n(F("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(F("Network Error",e,null,a)),a=null},a.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(F(t,e,"ECONNABORTED",a)),a=null},y.isStandardBrowserEnv()){var d=_,f=(e.withCredentials||T(c))&&e.xsrfCookieName?d.read(e.xsrfCookieName):void 0;f&&(r[e.xsrfHeaderName]=f)}if("setRequestHeader"in a&&y.forEach(r,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete r[t]:a.setRequestHeader(t,e)})),y.isUndefined(e.withCredentials)||(a.withCredentials=!!e.withCredentials),e.responseType)try{a.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&a.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){a&&(a.abort(),n(e),a=null)})),void 0===i&&(i=null),a.send(i)}))}),U),transformRequest:[function(e,t){return x(t,"Accept"),x(t,"Content-Type"),y.isFormData(e)||y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)?e:y.isArrayBufferView(e)?e.buffer:y.isURLSearchParams(e)?(V(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):y.isObject(e)?(V(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};y.forEach(["delete","get","head"],(function(e){k.headers[e]={}})),y.forEach(["post","put","patch"],(function(e){k.headers[e]=y.merge(R)}));var P=k;function D(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var O=function(e){return D(e),e.headers=e.headers||{},e.data=S(e.data,e.headers,e.transformRequest),e.headers=y.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),y.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||P.adapter)(e).then((function(t){return D(e),t.data=S(t.data,t.headers,e.transformResponse),t}),(function(t){return B(t)||(D(e),t&&t.response&&(t.response.data=S(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Q=function(e,t){t=t||{};var n={},i=["url","method","params","data"],r=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];y.forEach(i,(function(e){void 0!==t[e]&&(n[e]=t[e])})),y.forEach(r,(function(i){y.isObject(t[i])?n[i]=y.deepMerge(e[i],t[i]):void 0!==t[i]?n[i]=t[i]:y.isObject(e[i])?n[i]=y.deepMerge(e[i]):void 0!==e[i]&&(n[i]=e[i])})),y.forEach(a,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])}));var o=i.concat(r).concat(a),s=Object.keys(t).filter((function(e){return-1===o.indexOf(e)}));return y.forEach(s,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])})),n};function N(e){this.defaults=e,this.interceptors={request:new C,response:new C}}N.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=Q(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[O,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},N.prototype.getUri=function(e){return e=Q(this.defaults,e),E(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},y.forEach(["delete","get","head","options"],(function(e){N.prototype[e]=function(t,n){return this.request(y.merge(n||{},{method:e,url:t}))}})),y.forEach(["post","put","patch"],(function(e){N.prototype[e]=function(t,n,i){return this.request(y.merge(i||{},{method:e,url:t,data:n}))}}));var L=N;function M(e){this.message=e}M.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},M.prototype.__CANCEL__=!0;var j=M;function q(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new j(e),t(n.reason))}))}q.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},q.source=function(){var e;return{token:new q((function(t){e=t})),cancel:e}};var H=q;function K(e){var t=new L(e),n=f(L.prototype.request,t);return y.extend(n,L.prototype,t),y.extend(n,t),n}var z=K(P);z.Axios=L,z.create=function(e){return K(Q(z.defaults,e))},z.Cancel=j,z.CancelToken=H,z.isCancel=B,z.all=function(e){return Promise.all(e)},z.spread=function(e){return function(t){return e.apply(null,t)}};var Y=z,G=z;Y.default=G;var J,W,X=Y,Z=function(){function e(){}return e.prototype.build=function(e){return{log:function(){}}},e}(),ee=function(){function e(e,t){if(!e&&0===e.length)throw Error("username is null or empty: please visit https://verifalia.com/client-area to set up a new user, if you don't have one.");this._username=e,this._password=t}return e.prototype.addAuthentication=function(e){return s(s({},e),{auth:{username:this._username,password:this._password}})},e}(),te=function(e){var t=this;this.toString=function(){return t.message||"[Error]"},this.message=e},ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),ie=(new Z).build("verifalia"),re=function(){function e(e,t){void 0===t&&(t=null),this.isCancellationRequested=!1,this.waitForCompletion=e,this.progress=t}return e.prototype.waitForNextPoll=function(e){return u(this,void 0,void 0,(function(){var t,n,i,r,a;return l(this,(function(o){if(this.isCancellationRequested)throw new ne;return t=Math.max(.5,Math.min(30,Math.pow(2,Math.log10(e.noOfEntries)-1))),e.progress&&e.progress.estimatedTimeRemaining&&(n=e.progress.estimatedTimeRemaining.match(/^(?:(\d*?)\.)?(\d{2})\:(\d{2})\:(\d{2})(?:\.(\d*?))?$/))&&(i=parseInt(n[2]),r=parseInt(n[3]),a=parseInt(n[4]),t=a,t+=60*r,t+=3600*i,t=Math.max(.5,Math.min(30,t))),ie.log("waitForNextPoll delay (seconds)",t),[2,new Promise((function(e){return setTimeout(e,1e3*t)}))]}))}))},e.prototype.cancel=function(){this.isCancellationRequested=!0},e}();!function(e){e[e.Unknown=0]="Unknown",e.InProgress="InProgress",e.Completed="Completed",e.Deleted="Deleted",e.Expired="Expired"}(J||(J={})),function(e){e[e.Forward=0]="Forward",e[e.Backward=1]="Backward"}(W||(W={}));var ae,oe,se,ue,le,ce=function(){function e(e){this._restClientFactory=e}return e.prototype.submit=function(e,t){return u(this,void 0,void 0,(function(){var n,i,r,a,o;return l(this,(function(s){switch(s.label){case 0:if(n=this._restClientFactory.build(),"string"==typeof e)i={entries:[{inputData:e}]};else if(Array.isArray(e)&&e.every((function(e){return"string"==typeof e})))r=e.map((function(e){return{inputData:e}})),i={entries:r};else if(e.inputData)i={entries:[e]};else if(Array.isArray(e)&&e.every((function(e){return e.inputData})))i={entries:e};else{if(!e.entries)throw new Error("data type is unsupportd.");i=e}return"boolean"==typeof t&&(t=new re(t)),[4,n.invoke("POST","/email-validations",void 0,i)];case 1:if(200===(a=s.sent()).status||202===a.status)return o=a.data,t&&t.waitForCompletion&&o.overview.status!=J.Completed?[2,this.waitValidationForCompletion(o.overview,t)]:[2,this.retrieveValidationFromPartialValidation(o)];if(404===a.status||410===a.status)return[2,null];throw new te("Unexpected HTTP response: "+a.status+" "+a.statusText)}}))}))},e.prototype.get=function(e,t){return u(this,void 0,void 0,(function(){var n,i;return l(this,(function(r){switch(r.label){case 0:return[4,this._restClientFactory.build().invoke("GET","/email-validations/"+e)];case 1:if(200===(n=r.sent()).status||202===n.status)return i=n.data,"boolean"==typeof t&&(t=new re(t)),t&&t.waitForCompletion&&i.overview.status!=J.Completed?[2,this.waitValidationForCompletion(i.overview,t)]:[2,this.retrieveValidationFromPartialValidation(i)];if(404===n.status||410===n.status)return[2,null];throw new te("Unexpected HTTP response: "+n.status+" "+n.statusText)}}))}))},e.prototype.delete=function(e){return u(this,void 0,void 0,(function(){var t;return l(this,(function(n){switch(n.label){case 0:return[4,this._restClientFactory.build().invoke("DELETE","/email-validations/"+e)];case 1:if(200===(t=n.sent()).status||410===t.status)return[2];throw new te("Unexpected HTTP response: "+t.status+" "+t.statusText)}}))}))},e.prototype.retrieveValidationFromPartialValidation=function(e){return u(this,void 0,void 0,(function(){var t,n;return l(this,(function(i){switch(i.label){case 0:t=[],n=e.entries,i.label=1;case 1:return n&&n.data?(t.push.apply(t,n.data),n.meta.isTruncated?[4,this.listEntriesSegmentedAsync(e.overview.id,{cursor:n.meta.cursor})]:[3,3]):[3,3];case 2:return n=i.sent(),[3,1];case 3:return[2,{overview:e.overview,entries:t}]}}))}))},e.prototype.listEntriesSegmentedAsync=function(e,t){return u(this,void 0,void 0,(function(){var n,i,r,a,o;return l(this,(function(s){switch(s.label){case 0:if(!e)throw new Error("validationId is null");if(!t)throw new Error("cursor is null");return n=this._restClientFactory.build(),i=t.direction===W.Backward?"cursor:prev":"cursor",(o={})[i]=t.cursor,r=o,t.limit>0&&(r.limit=t.limit.toString()),[4,n.invoke("GET","/email-validations/"+e+"/entries",r)];case 1:if(200===(a=s.sent()).status)return[2,a.data];throw new te("Unexpected HTTP response: "+a.status+" "+a.statusText)}}))}))},e.prototype.waitValidationForCompletion=function(e,t){return u(this,void 0,void 0,(function(){var n,i;return l(this,(function(r){switch(r.label){case 0:if(!e)throw new Error("validationOverview is null");if(!t)throw new Error("waitingStrategy is null");n=e,r.label=1;case 1:return t.progress&&t.progress(n),[4,t.waitForNextPoll(n)];case 2:return r.sent(),[4,this.get(e.id)];case 3:if(!(i=r.sent()))return[2,null];if((n=i.overview).status===J.Completed)return[2,i];r.label=4;case 4:return[3,1];case 5:return[2]}}))}))},e}(),de=function(e){function t(t){var n=e.call(this,"All the base URIs are unreachable: "+t.map((function(e){return e})).join(", "))||this;return n.innerErrors=t,n}return o(t,e),t}(te),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),he=function(){function e(){}return e.applicationJson="application/json",e}(),Ae=function(e){function t(){return e.call(this,"The current request has been throttled; please try again later.")||this}return o(t,e),t}(te),me=(new Z).build("verifalia"),ve=function(){function e(e,t,n){if(void 0===n&&(n=void 0),!e)throw new Error("authenticator is null");if(!t||!t.length)throw new Error("baseUris is null or empty");this._authenticator=e,this._userAgent=n,this._baseUris=t}return e.prototype.invoke=function(e,t,n,i,r){return u(this,void 0,void 0,(function(){var a,o,u,c,d,f,p;return l(this,(function(l){switch(l.label){case 0:a=[],o=0,l.label=1;case 1:if(!(o<this._baseUris.length))return[3,7];u=this._baseUris[o],c={method:e,url:""+u+t,params:n,data:i,validateStatus:function(){return!0},maxRedirects:0,headers:{Accept:he.applicationJson}},this._userAgent&&(c.headers["User-Agent"]=this._userAgent),"POST"!==e&&"PUT"!==e||(c=s(s({},c),{headers:s(s({},c.headers),{"Content-Type":he.applicationJson})})),c=s(s({},c),r),d=this._authenticator.addAuthentication(c),me.log("Axios config",d),f=void 0,l.label=2;case 2:return l.trys.push([2,4,,5]),[4,X.request(d)];case 3:return f=l.sent(),[3,5];case 4:return p=l.sent(),a.push(p),[3,6];case 5:if(f.status>=500&&f.status<=599)return a.push(new fe("Endpoint "+u+" returned an HTTP "+f.status+" status code.")),[3,6];if(401===f.status||403===f.status)throw new pe(f.statusText);if(429===f.status)throw new Ae;return[2,f];case 6:return o++,[3,1];case 7:throw new de(a)}}))}))},e}(),ge=function(){function e(e){this._restClientFactory=e}return e.prototype.getBalance=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this._restClientFactory.build().invoke("GET","/credits/balance")];case 1:return[2,e.sent().data]}}))}))},e.prototype.listDailyUsages=function(e){return d(this,arguments,(function(){var t,n,i,r,a,o,s,u,d,f;return l(this,(function(l){switch(l.label){case 0:t=this._restClientFactory.build(),n=null,l.label=1;case 1:if(i={},n&&n.meta&&n.meta.cursor)r=e.direction===W.Backward?"cursor:prev":"cursor",i[r]=n.meta.cursor;else if(e.dateFilter)for(a=0,o=e.dateFilter.serialize("date");a<o.length;a++)s=o[a],i[s.key]=s.value;return[4,c(t.invoke("GET","/credits/daily-usage",i))];case 2:u=l.sent(),n=u.data,d=0,f=n.data,l.label=3;case 3:return d<f.length?[4,c(f[d])]:[3,7];case 4:return[4,l.sent()];case 5:l.sent(),l.label=6;case 6:return d++,[3,3];case 7:if((n.meta||{}).isTruncated)return[3,1];l.label=8;case 8:return[2]}}))}))},e}(),ye=function(){function e(e){if(this.apiVersion="v2.1",this.credits=new ge(this),this.emailValidations=new ce(this),this._baseUris=["https://api-1.verifalia.com","https://api-2.verifalia.com","https://api-3.verifalia.com"],!e)throw new Error("config is null");if(!e.username)throw new Error("username is null");this._authenticator=new ee(e.username,e.password)}return e.prototype.build=function(){var e,t=this;if(!this._cachedRestClient){for(var n=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,r++)i[r]=a[o];return i}(this._baseUris),i=n.length-1;i>0;i--){var r=Math.floor(Math.random()*(i+1));e=[n[r],n[i]],n[i]=e[0],n[r]=e[1]}this._cachedRestClient=new ve(this._authenticator,n.map((function(e){return e+"/"+t.apiVersion})),this.getUserAgent())}return this._cachedRestClient},e.prototype.getUserAgent=function(){if("undefined"!=typeof process&&process.versions&&process.versions.node)return"verifalia-rest-client/js/2.4.0/node/"+process.platform+"/"+process.version},e}(),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}((function(){}));function Ee(e){var t=""+(e.getMonth()+1),n=""+e.getDate();return[e.getFullYear(),t.length<2?"0"+t:t,n.length<2?"0"+n:n].join("-")}(function(e){function t(t){var n=e.call(this)||this;return n.date=t,n}o(t,e),t.prototype.serialize=function(e){return[{key:e,value:""+Ee(this.date)}]}})(we),function(e){function t(t,n){var i=e.call(this)||this;return i.since=t,i.until=n,i}o(t,e),t.prototype.serialize=function(e){var t=[];return this.since&&t.push({key:e+":since",value:Ee(this.since)}),this.until&&t.push({key:e+":until",value:Ee(this.until)}),t}}(we),function(e){e.Off="Off",e.Safe="Safe",e.Relaxed="Relaxed"}(ae||(ae={})),function(e){e.Standard="Standard",e.High="High",e.Extreme="Extreme"}(oe||(oe={})),function(e){e[e.Lowest=0]="Lowest",e[e.Normal=127]="Normal",e[e.Highest=255]="Highest"}(se||(se={})),function(e){e.Deliverable="Deliverable",e.Risky="Risky",e.Undeliverable="Undeliverable",e.Unknown="Unknown"}(ue||(ue={})),function(e){e.Success="Success",e.UnmatchedQuotedPair="UnmatchedQuotedPair",e.UnexpectedQuotedPairSequence="UnexpectedQuotedPairSequence",e.InvalidWordBoundaryStart="InvalidWordBoundaryStart",e.InvalidCharacterInSequence="InvalidCharacterInSequence",e.UnbalancedCommentParenthesis="UnbalancedCommentParenthesis",e.DoubleDotSequence="DoubleDotSequence",e.InvalidLocalPartLength="InvalidLocalPartLength",e.InvalidFoldingWhiteSpaceSequence="InvalidFoldingWhiteSpaceSequence",e.AtSignNotFound="AtSignNotFound",e.InvalidEmptyQuotedWord="InvalidEmptyQuotedWord",e.InvalidAddressLength="InvalidAddressLength",e.DomainPartCompliancyFailure="DomainPartCompliancyFailure",e.IspSpecificSyntaxFailure="IspSpecificSyntaxFailure",e.LocalPartIsWellKnownRoleAccount="LocalPartIsWellKnownRoleAccount,",e.DnsQueryTimeout="DnsQueryTimeout",e.DnsConnectionFailure="DnsConnectionFailure",e.DomainDoesNotExist="DomainDoesNotExist",e.DomainIsMisconfigured="DomainIsMisconfigured",e.DomainHasNullMx="DomainHasNullMx",e.DomainIsWellKnownDea="DomainIsWellKnownDea",e.MailExchangerIsWellKnownDea="MailExchangerIsWellKnownDea",e.MailboxIsDea="MailboxIsDea",e.SmtpConnectionTimeout="SmtpConnectionTimeout",e.SmtpConnectionFailure="SmtpConnectionFailure",e.MailboxDoesNotExist="MailboxDoesNotExist",e.MailboxConnectionFailure="MailboxConnectionFailure",e.LocalSenderAddressRejected="LocalSenderAddressRejected",e.MailboxValidationTimeout="MailboxValidationTimeout",e.MailboxTemporarilyUnavailable="MailboxTemporarilyUnavailable",e.ServerDoesNotSupportInternationalMailboxes="ServerDoesNotSupportInternationalMailboxes",e.CatchAllValidationTimeout="CatchAllValidationTimeout",e.ServerIsCatchAll="ServerIsCatchAll",e.CatchAllConnectionFailure="CatchAllConnectionFailure",e.ServerTemporaryUnavailable="ServerTemporaryUnavailable",e.SmtpDialogError="SmtpDialogError",e.LocalEndPointRejected="LocalEndPointRejected",e.UnhandledException="UnhandledException",e.MailExchangerIsHoneypot="MailExchangerIsHoneypot",e.UnacceptableDomainLiteral="UnacceptableDomainLiteral",e.Duplicate="Duplicate"}(le||(le={}));var be,Ce=(new Z).build("verifalia");X.interceptors.request.use((function(e){return Ce.log("invoking URL",e.url),Ce.log("params",e.params),Ce.log("data",e.data),Ce.log("headers",e.headers),e}),(function(e){return Promise.reject(e)})),function(e){e[e.allowed=0]="allowed",e[e.notAllowed=1]="notAllowed",e[e.throttled=2]="throttled",e[e.exception=3]="exception",e[e.cancelled=4]="cancelled"}(be||(be={}));var Se,Be=function(){function e(){this._strategyElementKey="Verifalia-Strategy",this._resultElementKey="Verifalia-Result"}return e.prototype.getElementCacheItem=function(e,t){return e[t]},e.prototype.setElementCacheItem=function(e,t,n){n?e[t]=n:delete e[t]},e.prototype.getValidationResult=function(e){return this.getElementCacheItem(e,this._resultElementKey)},e.prototype.clearValidationResult=function(e){this.setElementCacheItem(e,this._resultElementKey,void 0)},e.prototype.isValidationPending=function(e){return!!this.getElementCacheItem(e,this._strategyElementKey)},e.prototype.cancelPendingValidation=function(e){var t=this.getElementCacheItem(e,this._strategyElementKey);return!!t&&(t.cancel(),this.setElementCacheItem(e,this._strategyElementKey,void 0),!0)},e.prototype.validate=function(e,t){return u(this,void 0,void 0,(function(){var n,r,a,o,s,u;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,3,4]),this.cancelPendingValidation(e),this.setElementCacheItem(e,this._resultElementKey,void 0),n=new ye({username:t.appKey,password:""}),r=e.value,e.dispatchEvent(new CustomEvent(i.FieldValidationStarted)),a=new re(!0,null),this.setElementCacheItem(e,this._strategyElementKey,a),[4,n.emailValidations.submit(r,a)];case 1:return o=l.sent(),u={validation:o,status:this.isValidationResultAllowed(o.entries[0],t)?be.allowed:be.notAllowed},e.dispatchEvent(new CustomEvent(i.FieldValidationCompleted,{detail:u})),this.setElementCacheItem(e,this._resultElementKey,u),[2,u];case 2:return s=l.sent(),u={},s instanceof Ae?u.status=be.throttled:s instanceof ne?u.status=be.cancelled:(s instanceof pe&&console.error("The configured Verifalia appkey appears to be invalid: please check your configuration.",s),u.status=be.exception),this.setElementCacheItem(e,this._resultElementKey,u),[2,u];case 3:return this.setElementCacheItem(e,this._strategyElementKey,void 0),e.dispatchEvent(new CustomEvent(i.FieldValidationCompleted)),[7];case 4:return[2]}}))}))},e.prototype.isValidationResultAllowed=function(e,t){var n,i=t.emailValidations.allow||"";n=Array.isArray(i)?i:i.split(",").map((function(e){return e.trim().toUpperCase()}));var r,a=t.emailValidations.block||"";r=Array.isArray(a)?a:a.split(",").map((function(e){return e.trim().toUpperCase()}));var o=!1;return n.indexOf(e.classification.toUpperCase())>-1&&(o=o||!0),n.indexOf(("status:"+e.status).toUpperCase())>-1&&(o=o||!0),e.isFreeEmailAddress&&n.indexOf("@FREE")>-1&&(o=o||!0),e.isDisposableEmailAddress&&n.indexOf("@DISPOSABLE")>-1&&(o=o||!0),e.isRoleAccount&&n.indexOf("@ROLE")>-1&&(o=o||!0),!(!o||r.indexOf(e.classification.toUpperCase())>-1||r.indexOf(("status:"+e.status).toUpperCase())>-1||e.isFreeEmailAddress&&r.indexOf("@FREE")>-1||e.isDisposableEmailAddress&&r.indexOf("@DISPOSABLE")>-1||e.isRoleAccount&&r.indexOf("@ROLE")>-1)},e}();!function(e){e[e.NotSet=0]="NotSet",e[e.Validating=1]="Validating",e[e.ResultValid=2]="ResultValid",e[e.ResultInvalid=3]="ResultInvalid",e[e.ResultThrottled=4]="ResultThrottled",e[e.ResultException=5]="ResultException"}(Se||(Se={}));var xe=function(){function t(e,t,n,i){this._status=Se.NotSet,this._form=e,this._element=t,this._configurationManager=n,this._configuration=n.getConfiguration(t),this._validator=i}return t.prototype.getStatus=function(){return this._status},t.prototype.setStatus=function(e){this.applyTransition(this._status,e),this._status=e},t.prototype.wireup=function(){var e,t,n,i=this;this._element;var r=0;this._configuration.inputBindings&&this._configuration.inputBindings.debounceTime&&(r=this._configuration.inputBindings.debounceTime);var a,o,s,u=(a=function(){i._element,i.onElementOrFormEvent(i._element)},void 0===(o=r)&&(o=0),function(){clearTimeout(s),s=setTimeout((function(){return a()}),o)}),l=(null===(t=null===(e=this._configuration)||void 0===e?void 0:e.inputBindings)||void 0===t?void 0:t.events)||"";if((Array.isArray(l)?l:l.split(",").map((function(e){return e.trim()})).filter((function(e){return e.length>0}))).forEach((function(e){i._element.addEventListener(e,(function(e){i._element,i.resetValidationResult(i._element),i.setValidityPending(i._element,!1),u()}))})),null===(n=this._configuration.inputBindings)||void 0===n?void 0:n.preventSubmission){var c=this._element.closest("FORM");c&&c.addEventListener("submit",(function(e){return i.onElementOrFormEvent(i._element,c,e)}))}this.setStatus(Se.NotSet),this._configuration.inputBindings&&this._configuration.inputBindings.classNames&&this._configuration.inputBindings.classNames.base&&this._element.classList.add(this._configuration.inputBindings.classNames.base)},t.prototype.resetValidationResult=function(e){this._validator.clearValidationResult(e),e.name&&(this.removeElementById(e.name+"-verifalia-id"),this.removeElementById(e.name+"-verifalia-classification"),this.removeElementById(e.name+"-verifalia-status"))},t.prototype.removeElementById=function(e){var t=document.getElementById(e);t&&t.parentElement&&t.parentElement.removeChild(t)},t.prototype.onElementOrFormEvent=function(t,n,r){return u(this,void 0,void 0,(function(){var a,o,s,u=this;return l(this,(function(l){switch(l.label){case 0:return this._resetTransientValidityTimeout&&clearTimeout(this._resetTransientValidityTimeout),(a=this._validator.getValidationResult(t))?a.status===be.allowed||a.status===be.throttled&&!this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.throttled)||a.status===be.exception&&!this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.exception)?(t.setCustomValidity(""),[2]):[3,4]:[3,1];case 1:return n&&r&&(this.setValidityPending(t,!0),n.reportValidity(),r.preventDefault()),t.addEventListener(i.FieldValidationCompleted,(function(e){return u.onFieldValidationCompleted(e)})),this.setStatus(Se.Validating),this._validator.isValidationPending(t)?[3,3]:[4,this._validator.validate(t,this._configuration)];case 2:switch((o=l.sent()).status){case be.throttled:this.setStatus(Se.ResultThrottled),this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.throttled)?(t.setCustomValidity(this._configuration.emailValidations.messages.throttled),this._resetTransientValidityTimeout=setTimeout((function(){u.setStatus(Se.NotSet),t.setCustomValidity(""),u._validator.clearValidationResult(t),delete u._resetTransientValidityTimeout}),1e4)):t.setCustomValidity("");break;case be.cancelled:this.setStatus(Se.NotSet);break;case be.exception:this.setStatus(Se.ResultException),this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.exception)?(t.setCustomValidity(this._configuration.emailValidations.messages.exception),this._resetTransientValidityTimeout=setTimeout((function(){u.setStatus(Se.NotSet),t.setCustomValidity(""),u._validator.clearValidationResult(t),delete u._resetTransientValidityTimeout}),5e3)):t.setCustomValidity("");break;case be.allowed:case be.notAllowed:this._configuration.inputBindings&&this._configuration.inputBindings.appendHiddenFields&&t.name&&(this.appendOrReplaceHiddenField(t.name+"-verifalia-id",o.validation.overview.id,t),s=o.validation.entries[0],this.appendOrReplaceHiddenField(t.name+"-verifalia-classification",""+s.classification,t),this.appendOrReplaceHiddenField(t.name+"-verifalia-status",""+s.status,t)),o.status===be.allowed?(t.setCustomValidity(""),this.setStatus(Se.ResultValid)):(t.setCustomValidity(this._configuration.emailValidations.messages.invalid),this.setStatus(Se.ResultInvalid))}return[3,4];case 3:l.label=4;case 4:return n&&r&&(n.reportValidity(),r.preventDefault()),t.focus(),[2]}}))}))},t.prototype.setValidityPending=function(e,t){e.setCustomValidity(this._configuration.emailValidations.messages.processing),t&&this._form.reportValidity(),e.focus()},t.prototype.onFieldValidationCompleted=function(e){var t=this,n=e.target;e.detail,n.removeEventListener(i.FieldValidationCompleted,(function(e){return t.onFieldValidationCompleted(e)})),this._form.reportValidity()},t.prototype.appendOrReplaceHiddenField=function(e,t,n){var i=document.getElementById(e);i||((i=document.createElement("input")).type="hidden",i.id=e,i.name=e,n.insertAdjacentElement("afterend",i)),i.value=t},t.prototype.applyTransition=function(e,t){if(this._configuration.inputBindings&&this._configuration.inputBindings.classNames){var n=this._element.classList;switch(n.remove(this._configuration.inputBindings.classNames.processing,this._configuration.inputBindings.classNames.valid,this._configuration.inputBindings.classNames.invalid,this._configuration.inputBindings.classNames.exception,this._configuration.inputBindings.classNames.throttled),t){case Se.Validating:n.add(this._configuration.inputBindings.classNames.processing);break;case Se.ResultValid:n.add(this._configuration.inputBindings.classNames.valid);break;case Se.ResultInvalid:n.add(this._configuration.inputBindings.classNames.invalid);break;case Se.ResultException:n.add(this._configuration.inputBindings.classNames.exception);break;case Se.ResultThrottled:n.add(this._configuration.inputBindings.classNames.throttled)}}},t}(),Fe=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return o(t,e),t.prototype.wireup=function(){this._element},t}(xe);Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});var Ie=function(e){var t=this;this.toString=function(){return t.message||"[Error]"},this.message=e},Te=function(){function e(e,t){this.configurationManager=e,this.validator=t,this.fields=[]}return e.prototype.wireupFields=function(){for(var e=document.evaluate('//*/input[@type="email"] | //*/input[contains(@name, "email")] | //*/input[@*[starts-with(name(), "data-verifalia")]]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),t=0;t<e.snapshotLength;t++){var n=e.snapshotItem(t);this.wireupField(n)}},e.prototype.wireupField=function(e){if("INPUT"!==e.tagName.toUpperCase()&&"TEXTAREA"!==e.tagName.toUpperCase())throw new Ie("unsupported element "+e.tagName);var t=this.configurationManager.getConfiguration(e);if(t.appKey){t.appKey;var n=e.closest("FORM");if(!n)return;var i=this.buildField(n,e,this.configurationManager);i.wireup(),this.fields.push(i)}else console.error("An appkey couldn't be found while loading Verifalia: please check your configuration.")},e.prototype.buildField=function(e,t,n){return new xe(e,t,n,this.validator)},e}(),_e=function(t){function n(n,i){var r=t.call(this,n,i)||this;if("undefined"!=typeof $&&$.validator&&$.validator.methods&&$.validator.methods.email){var a=r.validator,o=r.configurationManager;$.validator.methods.email=function(t,n,i,r){var s=this;if(this.optional(n))return"dependency-mismatch";var u,l=this.previousValue(n,"email");if(this.settings.messages[n.name]||(this.settings.messages[n.name]={}),l.originalMessage=l.originalMessage||this.settings.messages[n.name].email,this.settings.messages[n.name].email=l.message,i="string"==typeof i&&{url:i}||i,u=$.param($.extend({data:t},i.data)),l.old===u)return l.valid;l.old=u,this.startRequest(n),{}[n.name]=t;var c=o.getConfiguration(n);return a.validate(n,c).then((function(i){s.settings.messages[n.name].email=l.originalMessage;var r=i&&i.status===be.allowed;if(r=(r=r||i.status===be.throttled&&!o.shouldPreventFormSubmissionOn(c,e.throttled))||i.status===be.exception&&!o.shouldPreventFormSubmissionOn(c,e.exception)){var a=s.formSubmitted;s.resetInternals(),s.toHide=s.errorsFor(n),s.formSubmitted=a,s.successList.push(n),s.invalid[n.name]=!1,s.showErrors(),l.valid=!0,s.stopRequest(n,!0)}else{var u={},d=void 0;switch(i.status){case be.throttled:d=c.emailValidations.messages.throttled;break;case be.exception:d=c.emailValidations.messages.exception;break;default:d=s.defaultMessage(n,{method:"email",parameters:t})}u[n.name]=l.message=d,s.invalid[n.name]=!0,s.showErrors(u),l.valid=!1,s.stopRequest(n,!1),i.status!==be.throttled&&i.status!==be.exception||setTimeout((function(){l.old=void 0}),5e3)}})),"pending"}}return r}return o(n,t),n.prototype.buildField=function(e,t,n){return new Fe(e,t,n,this.validator)},n}(Te),Re=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return o(t,e),t.prototype.wireup=function(){this._element,$(this._element).parsley().addConstraint("verifalia-email")},t}(xe),Ve=function(t){function n(n,i){var r=t.call(this,n,i)||this;if("undefined"!=typeof $){var a=window.Parsley;$.Deferred&&a&&a.addValidator&&a.addValidator("verifalia-email",{validateString:function(t,r,a){var o=a.element,s=n.getConfiguration(o),u=new $.Deferred;return i.validate(o,s).then((function(t){switch(t.status){case be.exception:n.shouldPreventFormSubmissionOn(s,e.exception)?u.reject(s.emailValidations.messages.exception):u.resolve();break;case be.cancelled:u.reject();break;case be.allowed:u.resolve();break;case be.notAllowed:u.reject(s.emailValidations.messages.invalid);break;case be.throttled:n.shouldPreventFormSubmissionOn(s,e.throttled)?u.reject(s.emailValidations.messages.throttled):u.resolve()}})),u.promise()}})}return r}return o(n,t),n.prototype.buildField=function(e,t,n){return new Re(e,t,n,this.validator)},n}(Te),Ue=function(){function e(){}return e.prototype.buildHost=function(e,t){if("undefined"!=typeof $){if($,window.Parsley)return window.Parsley,new Ve(e,t);if($.validator&&$.validator.methods&&$.validator.methods.email)return $.validator,new _e(e,t)}return new Te(e,t)},e}();return function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".verifalia-field::-ms-clear{display:none}.verifalia-field.verifalia-field-processing{background-image:url(\"data:image/gif;base64,R0lGODlhEwAFAPUDAPz+5Pz+3Pz+/Nz+lOT+rPz+7Nz+nOT+tPz+9Pz+vPz+zPz+xHSSLHSWNOzy5JS2VJS6VKzGdKzKfKTCbPT27LTadPT67MTijMzilLzadIyqVPz69JSuZOzu3JSuXIymVMTilJSqXOz25P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBgADACwAAAAAEwAFAAACFBRyM4aifGJaDbyKYd5TWspdkXgUACH5BAUGAAIALAAAAAARAAUAAAQaEKmkkLgggIs1pZ0XfqDgaSM5bqYmUVbItREAIfkEBQYAAgAsAAAAABIABQAABB0QHUOKuALgLcj4BBaM3EWByAWMQemdYrmalBXLEQAh+QQFBgADACwAAAAAEgAFAAAGJEALJgOyDI6DAHI5GFaISwATSawKjsrpEVS9IKVZppBo/GoBQQAh+QQFBgACACwAAAAAEwAFAAAFHyAlPZEjnGiaRiSpvijUPsgJwPGMBrg9ljbA7YVAhAAAIfkEBQYAAQAsAAAAABMABQAABiFAB6cR6gSOyGTSw2g0lVCks8nYRKFM5+cKFRKRAi5AEAQAIfkEBQYAAQAsBwAAAAgABQAABA4QqaRQuDTjTDfHEmVdEQAh+QQFBgACACwHAAAACgAFAAADEVhkVPIgrMFgADRbmclWjGMlACH5BAUGAAIALAUAAAANAAUAAAUYoCBYV3ZZYpqW5qWKaNVW8MvKaaDDLPqGACH5BAUGAAIALAUAAAANAAUAAAYfQIFAFIFERMJksvhoKoUbQXMKfTKNUEAgAJU0kcltEAAh+QQFBgABACwBAAAADgAFAAAFGmAgjo7XeM6oihrjaqvqzvHYviLQap19pqIQACH5BAUGAAAALA4AAAAFAAUAAAQJEKmkJL14YVsjACH5BAUGAAAALA4AAAAFAAUAAAMJWGSn84vB6VoCACH5BAUGAAAALAUAAAAOAAUAAAYcQIBwOLRcMhgLcXmsOJVLoROZiQ6bTqvQiLQEAQAh+QQFBgAAACwEAAAADwAFAAAFHyAgjqQTQRFFrsD0vBKjsttrayPTMKMLjx3OyoSihAAAIfkEBQYAAAAsBAAAAA8ABQAABR4gII5kpzWcQ67AxzSMx2ys+N7fCDc6PjqalQnlCAEAIfkEBQYAAAAsAAAAABIABQAABR0gJT2RA5xoikYkqb4n1D4ITDXrjDINY48lmEoTAgAh+QQFBgAAACwAAAAAEgAFAAAGJkALJgOyAI7IJHJYIR4/SiVxKtg0GA2kBYsFTS9PbhQgJBrJ42cQACH5BAUGAAAALAAAAAASAAUAAAUkIHIYRAGcaIoSQ0ucmqqSLiIwOLrhOEvDvFQDJyKZAA4ZShMCACH5BAUGAAAALAAAAAASAAUAAAUdIKIkCgKcaIqO5KK+Z9vCKkuiDdOkOiPOJw+NEwIAIfkEBQYAAwAsAAAAAAUABQAAAgYUcqnIrQUAIfkEBQYAAAAsBwAAAAwABQAABh5AUQQSEQGOoYYHMHw4j1Ck8xmVTqENhlJINCKVgCAAIfkEBQYAAAAsBwAAAAsABQAABRqghVWYBZxfw10kiTZwJssnYzPs/MIiab6AEAAh+QQFBgAAACwHAAAACwAFAAAEFLAQQwq4eA6KM+VA430d00iU1QERACH5BAUGAAAALAcAAAALAAUAAAQTEKmkELiYapx14te0YQ0jURYYAQAh+QQFBgADACwHAAAABQAFAAACBhRyiausBQAh+QQFBgAAACwNAAAABgAFAAAFESDgRFBEAeTzSIjqom4kplQIACH5BAUGAAAALA0AAAAGAAUAAAUQIGBdGWYBZKUKZYuqqoitIQAh+QQFBgAAACwOAAAABQAFAAAEC7AQc9Ckd2CtJUURACH5BAUGAAAALA4AAAAFAAUAAAQJEKmkJL14YVsjADs=\");background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat}.verifalia-field.verifalia-field-valid{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E\")}.verifalia-field.verifalia-field-invalid,.verifalia-field.verifalia-field-valid{background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.verifalia-field.verifalia-field-invalid{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E\")}"),new function(){this.version="1.3.0";var e=new Be,t=window.VerifaliaWidgetConfig,n=new r(t);if(document.dispatchEvent(new CustomEvent(i.Initializing,{cancelable:!0}))){var a=(new Ue).buildHost(n,e),o=n.getConfiguration(document.body);o.inputBindings&&o.inputBindings.autoWireup&&a.wireupFields(),document.dispatchEvent(new CustomEvent(i.Initialized))}}}();
var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return(s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function l(e,t,n,i){return new(n||(n=Promise))((function(r,a){function o(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){e.done?r(e.value):new n((function(t){t(e.value)})).then(o,s)}l((i=i.apply(e,t||[])).next())}))}function u(e,t){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function c(e){return this instanceof c?(this.v=e,this):new c(e)}function d(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(e,t||[]),a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise((function(n,i){a.push([e,t,n,i])>1||s(e,t)}))})}function s(e,t){try{(n=r[e](t)).value instanceof c?Promise.resolve(n.value.v).then(l,u):d(a[0][2],n)}catch(e){d(a[0][3],e)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}var f=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}},p=Object.prototype.toString;function h(e){return"[object Array]"===p.call(e)}function A(e){return void 0===e}function m(e){return null!==e&&"object"==typeof e}function v(e){return"[object Function]"===p.call(e)}function g(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),h(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}var y={isArray:h,isArrayBuffer:function(e){return"[object ArrayBuffer]"===p.call(e)},isBuffer:function(e){return null!==e&&!A(e)&&null!==e.constructor&&!A(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:m,isUndefined:A,isDate:function(e){return"[object Date]"===p.call(e)},isFile:function(e){return"[object File]"===p.call(e)},isBlob:function(e){return"[object Blob]"===p.call(e)},isFunction:v,isStream:function(e){return m(e)&&v(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:g,merge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]=n}for(var i=0,r=arguments.length;i<r;i++)g(arguments[i],n);return t},deepMerge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]="object"==typeof n?e({},n):n}for(var i=0,r=arguments.length;i<r;i++)g(arguments[i],n);return t},extend:function(e,t,n){return g(t,(function(t,i){e[i]=n&&"function"==typeof t?f(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}};function w(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var b=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(y.isURLSearchParams(t))i=t.toString();else{var r=[];y.forEach(t,(function(e,t){null!=e&&(y.isArray(e)?t+="[]":e=[e],y.forEach(e,(function(e){y.isDate(e)?e=e.toISOString():y.isObject(e)&&(e=JSON.stringify(e)),r.push(w(t)+"="+w(e))})))})),i=r.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e};function E(){this.handlers=[]}E.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},E.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},E.prototype.forEach=function(e){y.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var C=E,S=function(e,t,n){return y.forEach(n,(function(n){e=n(e,t)})),e},x=function(e){return!(!e||!e.__CANCEL__)},B=function(e,t){y.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))},F=function(e,t,n,i,r){return function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}(new Error(e),t,n,i,r)},_=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],I=y.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=y.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},T=y.isStandardBrowserEnv()?{write:function(e,t,n,i,r,a){var o=[];o.push(e+"="+encodeURIComponent(t)),y.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),y.isString(i)&&o.push("path="+i),y.isString(r)&&o.push("domain="+r),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},R={"Content-Type":"application/x-www-form-urlencoded"};function V(e,t){!y.isUndefined(e)&&y.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var k,U={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(k=function(e){return new Promise((function(t,n){var i=e.data,r=e.headers;y.isFormData(i)&&delete r["Content-Type"];var a=new XMLHttpRequest;if(e.auth){var o=e.auth.username||"",s=e.auth.password||"";r.Authorization="Basic "+btoa(o+":"+s)}var l,u,c=(l=e.baseURL,u=e.url,l&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(u)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(l,u):u);if(a.open(e.method.toUpperCase(),b(c,e.params,e.paramsSerializer),!0),a.timeout=e.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var i,r,o,s,l,u="getAllResponseHeaders"in a?(i=a.getAllResponseHeaders(),l={},i?(y.forEach(i.split("\n"),(function(e){if(s=e.indexOf(":"),r=y.trim(e.substr(0,s)).toLowerCase(),o=y.trim(e.substr(s+1)),r){if(l[r]&&_.indexOf(r)>=0)return;l[r]="set-cookie"===r?(l[r]?l[r]:[]).concat([o]):l[r]?l[r]+", "+o:o}})),l):l):null,c={data:e.responseType&&"text"!==e.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:u,config:e,request:a};!function(e,t,n){var i=n.config.validateStatus;!i||i(n.status)?e(n):t(F("Request failed with status code "+n.status,n.config,null,n.request,n))}(t,n,c),a=null}},a.onabort=function(){a&&(n(F("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(F("Network Error",e,null,a)),a=null},a.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(F(t,e,"ECONNABORTED",a)),a=null},y.isStandardBrowserEnv()){var d=T,f=(e.withCredentials||I(c))&&e.xsrfCookieName?d.read(e.xsrfCookieName):void 0;f&&(r[e.xsrfHeaderName]=f)}if("setRequestHeader"in a&&y.forEach(r,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete r[t]:a.setRequestHeader(t,e)})),y.isUndefined(e.withCredentials)||(a.withCredentials=!!e.withCredentials),e.responseType)try{a.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&a.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){a&&(a.abort(),n(e),a=null)})),void 0===i&&(i=null),a.send(i)}))}),k),transformRequest:[function(e,t){return B(t,"Accept"),B(t,"Content-Type"),y.isFormData(e)||y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)?e:y.isArrayBufferView(e)?e.buffer:y.isURLSearchParams(e)?(V(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):y.isObject(e)?(V(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};y.forEach(["delete","get","head"],(function(e){U.headers[e]={}})),y.forEach(["post","put","patch"],(function(e){U.headers[e]=y.merge(R)}));var D=U;function P(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var O=function(e){return P(e),e.headers=e.headers||{},e.data=S(e.data,e.headers,e.transformRequest),e.headers=y.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),y.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||D.adapter)(e).then((function(t){return P(e),t.data=S(t.data,t.headers,e.transformResponse),t}),(function(t){return x(t)||(P(e),t&&t.response&&(t.response.data=S(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},N=function(e,t){t=t||{};var n={},i=["url","method","params","data"],r=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];y.forEach(i,(function(e){void 0!==t[e]&&(n[e]=t[e])})),y.forEach(r,(function(i){y.isObject(t[i])?n[i]=y.deepMerge(e[i],t[i]):void 0!==t[i]?n[i]=t[i]:y.isObject(e[i])?n[i]=y.deepMerge(e[i]):void 0!==e[i]&&(n[i]=e[i])})),y.forEach(a,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])}));var o=i.concat(r).concat(a),s=Object.keys(t).filter((function(e){return-1===o.indexOf(e)}));return y.forEach(s,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])})),n};function Q(e){this.defaults=e,this.interceptors={request:new C,response:new C}}Q.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=N(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[O,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},Q.prototype.getUri=function(e){return e=N(this.defaults,e),b(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},y.forEach(["delete","get","head","options"],(function(e){Q.prototype[e]=function(t,n){return this.request(y.merge(n||{},{method:e,url:t}))}})),y.forEach(["post","put","patch"],(function(e){Q.prototype[e]=function(t,n,i){return this.request(y.merge(i||{},{method:e,url:t,data:n}))}}));var L=Q;function M(e){this.message=e}M.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},M.prototype.__CANCEL__=!0;var j=M;function q(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new j(e),t(n.reason))}))}q.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},q.source=function(){var e;return{token:new q((function(t){e=t})),cancel:e}};var H=q;function K(e){var t=new L(e),n=f(L.prototype.request,t);return y.extend(n,L.prototype,t),y.extend(n,t),n}var z=K(D);z.Axios=L,z.create=function(e){return K(N(z.defaults,e))},z.Cancel=j,z.CancelToken=H,z.isCancel=x,z.all=function(e){return Promise.all(e)},z.spread=function(e){return function(t){return e.apply(null,t)}};var Y=z,G=z;Y.default=G;var J,W,X=Y,Z=function(){function e(){}return e.prototype.build=function(e){return{log:function(){}}},e}(),ee=function(){function e(e,t){if(!e&&0===e.length)throw Error("username is null or empty: please visit https://verifalia.com/client-area to set up a new user, if you don't have one.");this._username=e,this._password=t}return e.prototype.addAuthentication=function(e){return s(s({},e),{auth:{username:this._username,password:this._password}})},e}(),te=function(e){var t=this;this.toString=function(){return t.message||"[Error]"},this.message=e},ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),ie=(new Z).build("verifalia"),re=function(){function e(e,t){void 0===t&&(t=null),this.isCancellationRequested=!1,this.waitForCompletion=e,this.progress=t}return e.prototype.waitForNextPoll=function(e){return l(this,void 0,void 0,(function(){var t,n,i,r,a;return u(this,(function(o){if(this.isCancellationRequested)throw new ne;return t=Math.max(.5,Math.min(30,Math.pow(2,Math.log10(e.noOfEntries)-1))),e.progress&&e.progress.estimatedTimeRemaining&&(n=e.progress.estimatedTimeRemaining.match(/^(?:(\d*?)\.)?(\d{2})\:(\d{2})\:(\d{2})(?:\.(\d*?))?$/))&&(i=parseInt(n[2]),r=parseInt(n[3]),a=parseInt(n[4]),t=a,t+=60*r,t+=3600*i,t=Math.max(.5,Math.min(30,t))),ie.log("waitForNextPoll delay (seconds)",t),[2,new Promise((function(e){return setTimeout(e,1e3*t)}))]}))}))},e.prototype.cancel=function(){this.isCancellationRequested=!0},e}();!function(e){e[e.Unknown=0]="Unknown",e.InProgress="InProgress",e.Completed="Completed",e.Deleted="Deleted",e.Expired="Expired"}(J||(J={})),function(e){e[e.Forward=0]="Forward",e[e.Backward=1]="Backward"}(W||(W={}));var ae,oe,se,le,ue,ce=function(){function e(e){this._restClientFactory=e}return e.prototype.submit=function(e,t){return l(this,void 0,void 0,(function(){var n,i,r,a,o;return u(this,(function(s){switch(s.label){case 0:if(n=this._restClientFactory.build(),"string"==typeof e)i={entries:[{inputData:e}]};else if(Array.isArray(e)&&e.every((function(e){return"string"==typeof e})))r=e.map((function(e){return{inputData:e}})),i={entries:r};else if(e.inputData)i={entries:[e]};else if(Array.isArray(e)&&e.every((function(e){return e.inputData})))i={entries:e};else{if(!e.entries)throw new Error("data type is unsupportd.");i=e}return"boolean"==typeof t&&(t=new re(t)),[4,n.invoke("POST","/email-validations",void 0,i)];case 1:if(200===(a=s.sent()).status||202===a.status)return o=a.data,t&&t.waitForCompletion&&o.overview.status!=J.Completed?[2,this.waitValidationForCompletion(o.overview,t)]:[2,this.retrieveValidationFromPartialValidation(o)];if(404===a.status||410===a.status)return[2,null];throw new te("Unexpected HTTP response: "+a.status+" "+a.statusText)}}))}))},e.prototype.get=function(e,t){return l(this,void 0,void 0,(function(){var n,i;return u(this,(function(r){switch(r.label){case 0:return[4,this._restClientFactory.build().invoke("GET","/email-validations/"+e)];case 1:if(200===(n=r.sent()).status||202===n.status)return i=n.data,"boolean"==typeof t&&(t=new re(t)),t&&t.waitForCompletion&&i.overview.status!=J.Completed?[2,this.waitValidationForCompletion(i.overview,t)]:[2,this.retrieveValidationFromPartialValidation(i)];if(404===n.status||410===n.status)return[2,null];throw new te("Unexpected HTTP response: "+n.status+" "+n.statusText)}}))}))},e.prototype.delete=function(e){return l(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return[4,this._restClientFactory.build().invoke("DELETE","/email-validations/"+e)];case 1:if(200===(t=n.sent()).status||410===t.status)return[2];throw new te("Unexpected HTTP response: "+t.status+" "+t.statusText)}}))}))},e.prototype.retrieveValidationFromPartialValidation=function(e){return l(this,void 0,void 0,(function(){var t,n;return u(this,(function(i){switch(i.label){case 0:t=[],n=e.entries,i.label=1;case 1:return n&&n.data?(t.push.apply(t,n.data),n.meta.isTruncated?[4,this.listEntriesSegmentedAsync(e.overview.id,{cursor:n.meta.cursor})]:[3,3]):[3,3];case 2:return n=i.sent(),[3,1];case 3:return[2,{overview:e.overview,entries:t}]}}))}))},e.prototype.listEntriesSegmentedAsync=function(e,t){return l(this,void 0,void 0,(function(){var n,i,r,a,o;return u(this,(function(s){switch(s.label){case 0:if(!e)throw new Error("validationId is null");if(!t)throw new Error("cursor is null");return n=this._restClientFactory.build(),i=t.direction===W.Backward?"cursor:prev":"cursor",(o={})[i]=t.cursor,r=o,t.limit>0&&(r.limit=t.limit.toString()),[4,n.invoke("GET","/email-validations/"+e+"/entries",r)];case 1:if(200===(a=s.sent()).status)return[2,a.data];throw new te("Unexpected HTTP response: "+a.status+" "+a.statusText)}}))}))},e.prototype.waitValidationForCompletion=function(e,t){return l(this,void 0,void 0,(function(){var n,i;return u(this,(function(r){switch(r.label){case 0:if(!e)throw new Error("validationOverview is null");if(!t)throw new Error("waitingStrategy is null");n=e,r.label=1;case 1:return t.progress&&t.progress(n),[4,t.waitForNextPoll(n)];case 2:return r.sent(),[4,this.get(e.id)];case 3:if(!(i=r.sent()))return[2,null];if((n=i.overview).status===J.Completed)return[2,i];r.label=4;case 4:return[3,1];case 5:return[2]}}))}))},e}(),de=function(e){function t(t){var n=e.call(this,"All the base URIs are unreachable: "+t.map((function(e){return e})).join(", "))||this;return n.innerErrors=t,n}return o(t,e),t}(te),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(te),he=function(){function e(){}return e.applicationJson="application/json",e}(),Ae=function(e){function t(){return e.call(this,"The current request has been throttled; please try again later.")||this}return o(t,e),t}(te),me=(new Z).build("verifalia"),ve=function(){function e(e,t,n){if(void 0===n&&(n=void 0),!e)throw new Error("authenticator is null");if(!t||!t.length)throw new Error("baseUris is null or empty");this._authenticator=e,this._userAgent=n,this._baseUris=t}return e.prototype.invoke=function(e,t,n,i,r){return l(this,void 0,void 0,(function(){var a,o,l,c,d,f,p;return u(this,(function(u){switch(u.label){case 0:a=[],o=0,u.label=1;case 1:if(!(o<this._baseUris.length))return[3,7];l=this._baseUris[o],c={method:e,url:""+l+t,params:n,data:i,validateStatus:function(){return!0},maxRedirects:0,headers:{Accept:he.applicationJson}},this._userAgent&&(c.headers["User-Agent"]=this._userAgent),"POST"!==e&&"PUT"!==e||(c=s(s({},c),{headers:s(s({},c.headers),{"Content-Type":he.applicationJson})})),c=s(s({},c),r),d=this._authenticator.addAuthentication(c),me.log("Axios config",d),f=void 0,u.label=2;case 2:return u.trys.push([2,4,,5]),[4,X.request(d)];case 3:return f=u.sent(),[3,5];case 4:return p=u.sent(),a.push(p),[3,6];case 5:if(f.status>=500&&f.status<=599)return a.push(new fe("Endpoint "+l+" returned an HTTP "+f.status+" status code.")),[3,6];if(401===f.status||403===f.status)throw new pe(f.statusText);if(429===f.status)throw new Ae;return[2,f];case 6:return o++,[3,1];case 7:throw new de(a)}}))}))},e}(),ge=function(){function e(e){this._restClientFactory=e}return e.prototype.getBalance=function(){return l(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this._restClientFactory.build().invoke("GET","/credits/balance")];case 1:return[2,e.sent().data]}}))}))},e.prototype.listDailyUsages=function(e){return d(this,arguments,(function(){var t,n,i,r,a,o,s,l,d,f;return u(this,(function(u){switch(u.label){case 0:t=this._restClientFactory.build(),n=null,u.label=1;case 1:if(i={},n&&n.meta&&n.meta.cursor)r=e.direction===W.Backward?"cursor:prev":"cursor",i[r]=n.meta.cursor;else if(e.dateFilter)for(a=0,o=e.dateFilter.serialize("date");a<o.length;a++)s=o[a],i[s.key]=s.value;return[4,c(t.invoke("GET","/credits/daily-usage",i))];case 2:l=u.sent(),n=l.data,d=0,f=n.data,u.label=3;case 3:return d<f.length?[4,c(f[d])]:[3,7];case 4:return[4,u.sent()];case 5:u.sent(),u.label=6;case 6:return d++,[3,3];case 7:if((n.meta||{}).isTruncated)return[3,1];u.label=8;case 8:return[2]}}))}))},e}(),ye=function(){function e(e){if(this.apiVersion="v2.1",this.credits=new ge(this),this.emailValidations=new ce(this),this._baseUris=["https://api-1.verifalia.com","https://api-2.verifalia.com","https://api-3.verifalia.com"],!e)throw new Error("config is null");if(!e.username)throw new Error("username is null");this._authenticator=new ee(e.username,e.password)}return e.prototype.build=function(){var e,t=this;if(!this._cachedRestClient){for(var n=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,r++)i[r]=a[o];return i}(this._baseUris),i=n.length-1;i>0;i--){var r=Math.floor(Math.random()*(i+1));e=[n[r],n[i]],n[i]=e[0],n[r]=e[1]}this._cachedRestClient=new ve(this._authenticator,n.map((function(e){return e+"/"+t.apiVersion})),this.getUserAgent())}return this._cachedRestClient},e.prototype.getUserAgent=function(){if("undefined"!=typeof process&&process.versions&&process.versions.node)return"verifalia-rest-client/js/2.4.0/node/"+process.platform+"/"+process.version},e}(),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}((function(){}));function be(e){var t=""+(e.getMonth()+1),n=""+e.getDate();return[e.getFullYear(),t.length<2?"0"+t:t,n.length<2?"0"+n:n].join("-")}(function(e){function t(t){var n=e.call(this)||this;return n.date=t,n}o(t,e),t.prototype.serialize=function(e){return[{key:e,value:""+be(this.date)}]}})(we),function(e){function t(t,n){var i=e.call(this)||this;return i.since=t,i.until=n,i}o(t,e),t.prototype.serialize=function(e){var t=[];return this.since&&t.push({key:e+":since",value:be(this.since)}),this.until&&t.push({key:e+":until",value:be(this.until)}),t}}(we),function(e){e.Off="Off",e.Safe="Safe",e.Relaxed="Relaxed"}(ae||(ae={})),function(e){e.Standard="Standard",e.High="High",e.Extreme="Extreme"}(oe||(oe={})),function(e){e[e.Lowest=0]="Lowest",e[e.Normal=127]="Normal",e[e.Highest=255]="Highest"}(se||(se={})),function(e){e.Deliverable="Deliverable",e.Risky="Risky",e.Undeliverable="Undeliverable",e.Unknown="Unknown"}(le||(le={})),function(e){e.Success="Success",e.UnmatchedQuotedPair="UnmatchedQuotedPair",e.UnexpectedQuotedPairSequence="UnexpectedQuotedPairSequence",e.InvalidWordBoundaryStart="InvalidWordBoundaryStart",e.InvalidCharacterInSequence="InvalidCharacterInSequence",e.UnbalancedCommentParenthesis="UnbalancedCommentParenthesis",e.DoubleDotSequence="DoubleDotSequence",e.InvalidLocalPartLength="InvalidLocalPartLength",e.InvalidFoldingWhiteSpaceSequence="InvalidFoldingWhiteSpaceSequence",e.AtSignNotFound="AtSignNotFound",e.InvalidEmptyQuotedWord="InvalidEmptyQuotedWord",e.InvalidAddressLength="InvalidAddressLength",e.DomainPartCompliancyFailure="DomainPartCompliancyFailure",e.IspSpecificSyntaxFailure="IspSpecificSyntaxFailure",e.LocalPartIsWellKnownRoleAccount="LocalPartIsWellKnownRoleAccount,",e.DnsQueryTimeout="DnsQueryTimeout",e.DnsConnectionFailure="DnsConnectionFailure",e.DomainDoesNotExist="DomainDoesNotExist",e.DomainIsMisconfigured="DomainIsMisconfigured",e.DomainHasNullMx="DomainHasNullMx",e.DomainIsWellKnownDea="DomainIsWellKnownDea",e.MailExchangerIsWellKnownDea="MailExchangerIsWellKnownDea",e.MailboxIsDea="MailboxIsDea",e.SmtpConnectionTimeout="SmtpConnectionTimeout",e.SmtpConnectionFailure="SmtpConnectionFailure",e.MailboxDoesNotExist="MailboxDoesNotExist",e.MailboxConnectionFailure="MailboxConnectionFailure",e.LocalSenderAddressRejected="LocalSenderAddressRejected",e.MailboxValidationTimeout="MailboxValidationTimeout",e.MailboxTemporarilyUnavailable="MailboxTemporarilyUnavailable",e.ServerDoesNotSupportInternationalMailboxes="ServerDoesNotSupportInternationalMailboxes",e.CatchAllValidationTimeout="CatchAllValidationTimeout",e.ServerIsCatchAll="ServerIsCatchAll",e.CatchAllConnectionFailure="CatchAllConnectionFailure",e.ServerTemporaryUnavailable="ServerTemporaryUnavailable",e.SmtpDialogError="SmtpDialogError",e.LocalEndPointRejected="LocalEndPointRejected",e.UnhandledException="UnhandledException",e.MailExchangerIsHoneypot="MailExchangerIsHoneypot",e.UnacceptableDomainLiteral="UnacceptableDomainLiteral",e.Duplicate="Duplicate"}(ue||(ue={}));var Ee,Ce=(new Z).build("verifalia");X.interceptors.request.use((function(e){return Ce.log("invoking URL",e.url),Ce.log("params",e.params),Ce.log("data",e.data),Ce.log("headers",e.headers),e}),(function(e){return Promise.reject(e)})),function(e){e.allowed="Allowed",e.notAllowed="NotAllowed",e.throttled="Throttled",e.exception="Exception",e.cancelled="Cancelled"}(Ee||(Ee={}));var Se,xe,Be=function(){function e(){this._strategyElementKey="Verifalia-Strategy",this._resultElementKey="Verifalia-Result"}return e.prototype.getElementCacheItem=function(e,t){return e[t]},e.prototype.setElementCacheItem=function(e,t,n){n?e[t]=n:delete e[t]},e.prototype.getValidationResult=function(e){return this.getElementCacheItem(e,this._resultElementKey)},e.prototype.clearValidationResult=function(e){this.setElementCacheItem(e,this._resultElementKey,void 0)},e.prototype.isValidationPending=function(e){return!!this.getElementCacheItem(e,this._strategyElementKey)},e.prototype.cancelPendingValidation=function(e){var t=this.getElementCacheItem(e,this._strategyElementKey);return!!t&&(t.cancel(),this.setElementCacheItem(e,this._strategyElementKey,void 0),!0)},e.prototype.validate=function(e,t){return l(this,void 0,void 0,(function(){var n,r,a,o,s,l;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,3,4]),this.cancelPendingValidation(e),this.setElementCacheItem(e,this._resultElementKey,void 0),n=new ye({username:t.appKey,password:""}),r=e.value,e.dispatchEvent(new CustomEvent(i.FieldValidationStarted,{bubbles:!0})),a=new re(!0,null),this.setElementCacheItem(e,this._strategyElementKey,a),[4,n.emailValidations.submit(r,a)];case 1:return o=u.sent(),l={validation:o,status:this.isValidationResultAllowed(o.entries[0],t)?Ee.allowed:Ee.notAllowed},e.dispatchEvent(new CustomEvent(i.FieldValidationCompleted,{bubbles:!0,detail:l})),this.setElementCacheItem(e,this._resultElementKey,l),[2,l];case 2:return s=u.sent(),l={},s instanceof Ae?l.status=Ee.throttled:s instanceof ne?l.status=Ee.cancelled:(s instanceof pe&&console.error("The configured Verifalia appkey appears to be invalid: please check your configuration.",s),l.status=Ee.exception),e.dispatchEvent(new CustomEvent(i.FieldValidationCompleted,{bubbles:!0,detail:l})),this.setElementCacheItem(e,this._resultElementKey,l),[2,l];case 3:return this.setElementCacheItem(e,this._strategyElementKey,void 0),[7];case 4:return[2]}}))}))},e.prototype.isValidationResultAllowed=function(e,t){var n,i=t.emailValidations.allow||"";n=Array.isArray(i)?i:i.split(",").map((function(e){return e.trim().toUpperCase()}));var r,a=t.emailValidations.block||"";r=Array.isArray(a)?a:a.split(",").map((function(e){return e.trim().toUpperCase()}));var o=!1;return n.indexOf(e.classification.toUpperCase())>-1&&(o=o||!0),n.indexOf(("status:"+e.status).toUpperCase())>-1&&(o=o||!0),e.isFreeEmailAddress&&n.indexOf("@FREE")>-1&&(o=o||!0),e.isDisposableEmailAddress&&n.indexOf("@DISPOSABLE")>-1&&(o=o||!0),e.isRoleAccount&&n.indexOf("@ROLE")>-1&&(o=o||!0),!(!o||r.indexOf(e.classification.toUpperCase())>-1||r.indexOf(("status:"+e.status).toUpperCase())>-1||e.isFreeEmailAddress&&r.indexOf("@FREE")>-1||e.isDisposableEmailAddress&&r.indexOf("@DISPOSABLE")>-1||e.isRoleAccount&&r.indexOf("@ROLE")>-1)},e}();function Fe(){if(!xe){var e=document.createElement("canvas");e.style.display="none",xe=e.getContext("2d")}}function _e(){return Fe(),!!xe}function Ie(e,t){return Fe(),_e()?(xe.font=t.fontStyle+" "+t.fontVariant+" "+t.fontWeight+" "+t.fontSize+"/"+t.lineHeight+" "+t.fontFamily,xe.measureText(e)):null}!function(e){e[e.NotSet=0]="NotSet",e[e.Validating=1]="Validating",e[e.ResultValid=2]="ResultValid",e[e.ResultInvalid=3]="ResultInvalid",e[e.ResultThrottled=4]="ResultThrottled",e[e.ResultException=5]="ResultException"}(Se||(Se={}));var Te=function(){function t(e,t,n,i){this._status=Se.NotSet,this._form=e,this._element=t,this._configurationManager=n,this._configuration=n.getConfiguration(t),this._validator=i}return t.prototype.getStatus=function(){return this._status},t.prototype.setStatus=function(e){this.applyTransition(this._status,e),this._status=e},t.prototype.wireup=function(){var e,t,n,i,r,a=this;this._element,this._element.spellcheck=!1;var o=0;this._configuration.inputBindings&&this._configuration.inputBindings.debounceTime&&(o=this._configuration.inputBindings.debounceTime);var s,l,u,c=(s=function(){a._element,a.onElementOrFormEvent(a._element)},void 0===(l=o)&&(l=0),function(){clearTimeout(u),u=setTimeout((function(){return s()}),l)});this._element,this._element.addEventListener("input",(function(e){a._element,a._validator.cancelPendingValidation(a._element),a.resetValidationResult(a._element),a.resetValidity(a._element),a.setStatus(Se.NotSet)}));var d=(null===(t=null===(e=this._configuration)||void 0===e?void 0:e.inputBindings)||void 0===t?void 0:t.events)||"";if((Array.isArray(d)?d:d.split(",").map((function(e){return e.trim()})).filter((function(e){return e.length>0}))).forEach((function(e){a._element.addEventListener(e,(function(e){a._element,c()}))})),null===(n=this._configuration.inputBindings)||void 0===n?void 0:n.preventSubmission){var f=this._element.closest("FORM");f&&f.addEventListener("submit",(function(e){return a.onElementOrFormEvent(a._element,f,e)}))}this.setStatus(Se.NotSet),(null===(r=null===(i=this._configuration.inputBindings)||void 0===i?void 0:i.classNames)||void 0===r?void 0:r.base)&&this._element.classList.add(this._configuration.inputBindings.classNames.base)},t.prototype.resetValidationResult=function(e){this._validator.clearValidationResult(e),e.name&&(this.removeElementById(e.name+"-verifalia-id"),this.removeElementById(e.name+"-verifalia-classification"),this.removeElementById(e.name+"-verifalia-status"))},t.prototype.removeElementById=function(e){var t=document.getElementById(e);t&&t.parentElement&&t.parentElement.removeChild(t)},t.prototype.onElementOrFormEvent=function(t,n,r){return l(this,void 0,void 0,(function(){var a,o,s,l=this;return u(this,(function(u){switch(u.label){case 0:return this._resetTransientValidityTimeout&&clearTimeout(this._resetTransientValidityTimeout),(a=this._validator.getValidationResult(t))?a.status===Ee.allowed||a.status===Ee.throttled&&!this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.throttled)||a.status===Ee.exception&&!this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.exception)?(this.resetValidity(t),[2]):[3,4]:[3,1];case 1:return n&&r?(this.setValidityPending(t),n.reportValidity(),r.preventDefault()):this.setValidityPending(t),t.addEventListener(i.FieldValidationCompleted,(function(e){return l.onFieldValidationCompleted(e)})),this.setStatus(Se.Validating),this._validator.isValidationPending(t)?[3,3]:[4,this._validator.validate(t,this._configuration)];case 2:switch((o=u.sent()).status){case Ee.throttled:this.setStatus(Se.ResultThrottled),this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.throttled)?(t.setCustomValidity(this._configuration.emailValidations.messages.throttled),this._resetTransientValidityTimeout=setTimeout((function(){l.setStatus(Se.NotSet),t.setCustomValidity(""),l._validator.clearValidationResult(t),delete l._resetTransientValidityTimeout}),1e4)):this.resetValidity(t);break;case Ee.cancelled:this.setStatus(Se.NotSet);break;case Ee.exception:this.setStatus(Se.ResultException),this._configurationManager.shouldPreventFormSubmissionOn(this._configuration,e.exception)?(t.setCustomValidity(this._configuration.emailValidations.messages.exception),this._resetTransientValidityTimeout=setTimeout((function(){l.setStatus(Se.NotSet),t.setCustomValidity(""),l._validator.clearValidationResult(t),delete l._resetTransientValidityTimeout}),5e3)):this.resetValidity(t);break;case Ee.allowed:case Ee.notAllowed:this._configuration.inputBindings&&this._configuration.inputBindings.appendHiddenFields&&t.name&&(this.appendOrReplaceHiddenField(t.name+"-verifalia-id",o.validation.overview.id,t),s=o.validation.entries[0],this.appendOrReplaceHiddenField(t.name+"-verifalia-classification",""+s.classification,t),this.appendOrReplaceHiddenField(t.name+"-verifalia-status",""+s.status,t)),o.status===Ee.allowed?(this.resetValidity(t),this.setStatus(Se.ResultValid)):(t.setCustomValidity(this._configuration.emailValidations.messages.invalid),this.setStatus(Se.ResultInvalid))}return[3,4];case 3:u.label=4;case 4:return n&&r&&(n.reportValidity(),r.preventDefault()),[2]}}))}))},t.prototype.resetValidity=function(e){e.setCustomValidity("")},t.prototype.setValidityPending=function(e){e.setCustomValidity(this._configuration.emailValidations.messages.processing)},t.prototype.onFieldValidationCompleted=function(e){var t=this;e.target.removeEventListener(i.FieldValidationCompleted,(function(e){return t.onFieldValidationCompleted(e)}))},t.prototype.appendOrReplaceHiddenField=function(e,t,n){var i=document.getElementById(e);i||((i=document.createElement("input")).type="hidden",i.id=e,i.name=e,n.insertAdjacentElement("afterend",i)),i.value=t},t.prototype.applyTransition=function(e,t){var n;if(this._configuration.inputBindings&&this._configuration.inputBindings.classNames){var i=this._element.classList;switch(this._element,i.remove(this._configuration.inputBindings.classNames.processing,this._configuration.inputBindings.classNames.valid,this._configuration.inputBindings.classNames.invalid,this._configuration.inputBindings.classNames.exception,this._configuration.inputBindings.classNames.throttled),this._element.removeAttribute("style"),t){case Se.Validating:i.add(this._configuration.inputBindings.classNames.processing);break;case Se.ResultValid:i.add(this._configuration.inputBindings.classNames.valid);break;case Se.ResultInvalid:if(i.add(this._configuration.inputBindings.classNames.invalid),this._configuration.inputBindings.squiggles){var r=this._validator.getValidationResult(this._element),a=null===(n=null==r?void 0:r.validation)||void 0===n?void 0:n.entries[0];if(a){var o=0,s=0;if(a.syntaxFailureIndex?(o=a.syntaxFailureIndex,s=a.inputData.length-a.syntaxFailureIndex):a.status===ue.DomainDoesNotExist||a.status===ue.DomainHasNullMx||a.status===ue.DomainIsMisconfigured||a.status===ue.DomainPartCompliancyFailure||a.status===ue.UnacceptableDomainLiteral?a.emailAddressDomainPart&&(o=a.inputData.length-a.emailAddressDomainPart.length,s=a.emailAddressDomainPart.length):a.status!==ue.InvalidLocalPartLength&&a.status!==ue.MailboxDoesNotExist&&a.status!==ue.ServerDoesNotSupportInternationalMailboxes||a.emailAddressLocalPart&&(s=a.emailAddressLocalPart.length),s&&_e()){var l=getComputedStyle(this._element,null),u=0;o&&(u=Ie(a.inputData.substr(0,o),l).width);var c=Ie(a.inputData.substr(o,s),l).width,d=this.buildWavvySvg(u,c),f=function(e,t){return e?t+", "+e:t};this._element.style.backgroundImage=f(l.backgroundImage,"url(data:image/svg+xml;base64,"+btoa(d)+")"),this._element.style.backgroundRepeat=f(l.backgroundRepeat,"repeat-x"),this._element.style.backgroundAttachment=f(l.backgroundAttachment,"scroll"),this._element.style.backgroundPosition=f(l.backgroundPosition,"left 0 bottom 0"),this._element.style.backgroundSize=f(l.backgroundSize,"100% 4px"),this._element.style.backgroundOrigin=f(l.backgroundOrigin,"content-box"),this._element.style.backgroundClip=f(l.backgroundClip,"content-box")}}}break;case Se.ResultException:i.add(this._configuration.inputBindings.classNames.exception);break;case Se.ResultThrottled:i.add(this._configuration.inputBindings.classNames.throttled)}}},t.prototype.buildWavvySvg=function(e,t){return'<svg xmlns="http://www.w3.org/2000/svg" height="4"><defs><pattern id="w" x="0" y="0" width="6" height="4" patternUnits="userSpaceOnUse"><polyline points="0,0 3,4 6,0" style="fill:none; stroke: #ff3c0d; stroke-width: 1; stroke-linecap: round;"></polyline></pattern></defs><rect x="'+e+'" y="0" width="'+t+'" height="4" fill="url(#w)"></rect></svg>'},t}(),Re=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return o(t,e),t.prototype.wireup=function(){this._element},t}(Te);Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});var Ve,ke=function(e){var t=this;this.toString=function(){return t.message||"[Error]"},this.message=e},Ue=function(){function e(e,t){this.configurationManager=e,this.validator=t,this.fields=[]}return e.prototype.wireupFields=function(){for(var e=document.evaluate('//*/input[@type="email"] | //*/input[contains(@name, "email")] | //*/input[@*[starts-with(name(), "data-verifalia")]]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),t=0;t<e.snapshotLength;t++){var n=e.snapshotItem(t);this.wireupField(n)}},e.prototype.wireupField=function(e){if("INPUT"!==e.tagName.toUpperCase()&&"TEXTAREA"!==e.tagName.toUpperCase())throw new ke("unsupported element "+e.tagName);var t=this.configurationManager.getConfiguration(e);if(t.appKey){t.appKey;var n=e.closest("FORM");if(!n)return;var i=this.buildField(n,e,this.configurationManager);i.wireup(),this.fields.push(i)}else console.error("An appkey couldn't be found while loading Verifalia: please check your configuration.")},e.prototype.buildField=function(e,t,n){return new Te(e,t,n,this.validator)},e}(),De=function(t){function n(n,i){var r=t.call(this,n,i)||this;if("undefined"!=typeof $&&$.validator&&$.validator.methods&&$.validator.methods.email){var a=r.validator,o=r.configurationManager;$.validator.methods.email=function(t,n,i,r){var s=this;if(this.optional(n))return"dependency-mismatch";var l,u=this.previousValue(n,"email");if(this.settings.messages[n.name]||(this.settings.messages[n.name]={}),u.originalMessage=u.originalMessage||this.settings.messages[n.name].email,this.settings.messages[n.name].email=u.message,i="string"==typeof i&&{url:i}||i,l=$.param($.extend({data:t},i.data)),u.old===l)return u.valid;u.old=l,this.startRequest(n),{}[n.name]=t;var c=o.getConfiguration(n);return a.validate(n,c).then((function(i){s.settings.messages[n.name].email=u.originalMessage;var r=i&&i.status===Ee.allowed;if(r=(r=r||i.status===Ee.throttled&&!o.shouldPreventFormSubmissionOn(c,e.throttled))||i.status===Ee.exception&&!o.shouldPreventFormSubmissionOn(c,e.exception)){var a=s.formSubmitted;s.resetInternals(),s.toHide=s.errorsFor(n),s.formSubmitted=a,s.successList.push(n),s.invalid[n.name]=!1,s.showErrors(),u.valid=!0,s.stopRequest(n,!0)}else{var l={},d=void 0;switch(i.status){case Ee.throttled:d=c.emailValidations.messages.throttled;break;case Ee.exception:d=c.emailValidations.messages.exception;break;default:d=s.defaultMessage(n,{method:"email",parameters:t})}l[n.name]=u.message=d,s.invalid[n.name]=!0,s.showErrors(l),u.valid=!1,s.stopRequest(n,!1),i.status!==Ee.throttled&&i.status!==Ee.exception||setTimeout((function(){u.old=void 0}),5e3)}})),"pending"}}return r}return o(n,t),n.prototype.buildField=function(e,t,n){return new Re(e,t,n,this.validator)},n}(Ue),Pe=function(e){function t(t,n,i,r){return e.call(this,t,n,i,r)||this}return o(t,e),t.prototype.wireup=function(){this._element,$(this._element).parsley().addConstraint("verifalia-email")},t}(Te),Oe=function(t){function n(n,i){var r=t.call(this,n,i)||this;if("undefined"!=typeof $){var a=window.Parsley;$.Deferred&&a&&a.addValidator&&a.addValidator("verifalia-email",{validateString:function(t,r,a){var o=a.element,s=n.getConfiguration(o),l=new $.Deferred;return i.validate(o,s).then((function(t){switch(t.status){case Ee.exception:n.shouldPreventFormSubmissionOn(s,e.exception)?l.reject(s.emailValidations.messages.exception):l.resolve();break;case Ee.cancelled:l.reject();break;case Ee.allowed:l.resolve();break;case Ee.notAllowed:l.reject(s.emailValidations.messages.invalid);break;case Ee.throttled:n.shouldPreventFormSubmissionOn(s,e.throttled)?l.reject(s.emailValidations.messages.throttled):l.resolve()}})),l.promise()}})}return r}return o(n,t),n.prototype.buildField=function(e,t,n){return new Pe(e,t,n,this.validator)},n}(Ue),Ne=function(){function e(){}return e.prototype.buildHost=function(e,t){if("undefined"!=typeof $){if($,window.Parsley)return window.Parsley,new Oe(e,t);if($.validator&&$.validator.methods&&$.validator.methods.email)return $.validator,new De(e,t)}return new Ue(e,t)},e}();return function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".verifalia-field::-ms-clear{display:none}.verifalia-field.verifalia-field-processing{background-image:url(\"data:image/gif;base64,R0lGODlhEwAFAPUDAPz+5Pz+3Pz+/Nz+lOT+rPz+7Nz+nOT+tPz+9Pz+vPz+zPz+xHSSLHSWNOzy5JS2VJS6VKzGdKzKfKTCbPT27LTadPT67MTijMzilLzadIyqVPz69JSuZOzu3JSuXIymVMTilJSqXOz25P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBgADACwAAAAAEwAFAAACFBRyM4aifGJaDbyKYd5TWspdkXgUACH5BAUGAAIALAAAAAARAAUAAAQaEKmkkLgggIs1pZ0XfqDgaSM5bqYmUVbItREAIfkEBQYAAgAsAAAAABIABQAABB0QHUOKuALgLcj4BBaM3EWByAWMQemdYrmalBXLEQAh+QQFBgADACwAAAAAEgAFAAAGJEALJgOyDI6DAHI5GFaISwATSawKjsrpEVS9IKVZppBo/GoBQQAh+QQFBgACACwAAAAAEwAFAAAFHyAlPZEjnGiaRiSpvijUPsgJwPGMBrg9ljbA7YVAhAAAIfkEBQYAAQAsAAAAABMABQAABiFAB6cR6gSOyGTSw2g0lVCks8nYRKFM5+cKFRKRAi5AEAQAIfkEBQYAAQAsBwAAAAgABQAABA4QqaRQuDTjTDfHEmVdEQAh+QQFBgACACwHAAAACgAFAAADEVhkVPIgrMFgADRbmclWjGMlACH5BAUGAAIALAUAAAANAAUAAAUYoCBYV3ZZYpqW5qWKaNVW8MvKaaDDLPqGACH5BAUGAAIALAUAAAANAAUAAAYfQIFAFIFERMJksvhoKoUbQXMKfTKNUEAgAJU0kcltEAAh+QQFBgABACwBAAAADgAFAAAFGmAgjo7XeM6oihrjaqvqzvHYviLQap19pqIQACH5BAUGAAAALA4AAAAFAAUAAAQJEKmkJL14YVsjACH5BAUGAAAALA4AAAAFAAUAAAMJWGSn84vB6VoCACH5BAUGAAAALAUAAAAOAAUAAAYcQIBwOLRcMhgLcXmsOJVLoROZiQ6bTqvQiLQEAQAh+QQFBgAAACwEAAAADwAFAAAFHyAgjqQTQRFFrsD0vBKjsttrayPTMKMLjx3OyoSihAAAIfkEBQYAAAAsBAAAAA8ABQAABR4gII5kpzWcQ67AxzSMx2ys+N7fCDc6PjqalQnlCAEAIfkEBQYAAAAsAAAAABIABQAABR0gJT2RA5xoikYkqb4n1D4ITDXrjDINY48lmEoTAgAh+QQFBgAAACwAAAAAEgAFAAAGJkALJgOyAI7IJHJYIR4/SiVxKtg0GA2kBYsFTS9PbhQgJBrJ42cQACH5BAUGAAAALAAAAAASAAUAAAUkIHIYRAGcaIoSQ0ucmqqSLiIwOLrhOEvDvFQDJyKZAA4ZShMCACH5BAUGAAAALAAAAAASAAUAAAUdIKIkCgKcaIqO5KK+Z9vCKkuiDdOkOiPOJw+NEwIAIfkEBQYAAwAsAAAAAAUABQAAAgYUcqnIrQUAIfkEBQYAAAAsBwAAAAwABQAABh5AUQQSEQGOoYYHMHw4j1Ck8xmVTqENhlJINCKVgCAAIfkEBQYAAAAsBwAAAAsABQAABRqghVWYBZxfw10kiTZwJssnYzPs/MIiab6AEAAh+QQFBgAAACwHAAAACwAFAAAEFLAQQwq4eA6KM+VA430d00iU1QERACH5BAUGAAAALAcAAAALAAUAAAQTEKmkELiYapx14te0YQ0jURYYAQAh+QQFBgADACwHAAAABQAFAAACBhRyiausBQAh+QQFBgAAACwNAAAABgAFAAAFESDgRFBEAeTzSIjqom4kplQIACH5BAUGAAAALA0AAAAGAAUAAAUQIGBdGWYBZKUKZYuqqoitIQAh+QQFBgAAACwOAAAABQAFAAAEC7AQc9Ckd2CtJUURACH5BAUGAAAALA4AAAAFAAUAAAQJEKmkJL14YVsjADs=\");background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat}.verifalia-field.verifalia-field-valid{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E\")}.verifalia-field.verifalia-field-invalid,.verifalia-field.verifalia-field-valid{background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.verifalia-field.verifalia-field-invalid{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23dc3545' viewBox='-2 -2 7 7'%3E%3Cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E\")}"),new function(){this.version="1.4.0";var e=new Be,t=window.VerifaliaWidgetConfig,n=new r(t);if(document.dispatchEvent(new CustomEvent(i.Initializing,{bubbles:!0,cancelable:!0}))){Ve=(new Ne).buildHost(n,e);var a=n.getConfiguration(document.body);a.inputBindings&&a.inputBindings.autoWireup&&Ve.wireupFields(),document.dispatchEvent(new CustomEvent(i.Initialized,{bubbles:!0}))}}}();
{
"name": "verifalia-widget",
"version": "1.3.0",
"description": "",
"version": "1.4.0",
"description": "A powerful and super-fast widget to validate email addresses in real-time and check whether they are deliverable or not, through the Verifalia email verification service.",
"main": "dist/verifalia-widget.js",

@@ -40,5 +40,5 @@ "scripts": {

"dts-bundle-generator": "^3.3.1",
"genversion": "^2.2.0",
"genversion": "^2.2.1",
"mdn-polyfills": "^5.20.0",
"node-sass": "^4.13.1",
"node-sass": "^4.14.1",
"postcss-cssnext": "^3.1.0",

@@ -66,4 +66,5 @@ "replace-in-file": "^4.3.1",

"files": [
"dist/**/*"
"dist/**/*",
"docs/**/*"
]
}
Verifalia widget - Add real-time email verification to your page, with no coding required
=========================================================================================
[Verifalia](https://verifalia.com) provides a powerful and super-fast service to validate email addresses in real-time and check whether they are deliverable or not; once included in a web page, this Javascript widget automatically binds to every `input` field of type `email` (or those with the `email` word in their names or IDs) it finds and prevents its containing form to be submitted, unless the field contains a valid email address pointing to an active and real mailbox. The widget comes as a lightweight (14KB gzipped) single Javascript file, with zero dependencies.
[Verifalia](https://verifalia.com) provides a powerful and super-fast service to validate email addresses in real-time and check whether they are deliverable or not; once included in a web page, this Javascript widget automatically binds to every `input` field of type `email` (or those with the `email` word in their names or IDs) it finds and prevents its containing form to be submitted, unless the field contains a valid email address pointing to an active and real mailbox. The widget comes as a lightweight (15KB gzipped) single Javascript file, with zero dependencies!
![Verifalia email verification widget](./docs/assets/intro.gif)
By default, the widget automatically blocks both invalid / unreachable email addresses as well as disposable and throw-away addresses but you can configure it very easily to exclude other ones (for example, those provided by free email service providers like Gmail or Yahoo).

@@ -17,3 +19,3 @@

To install the Verifalia widget on your page just add a `script` tag before the closing `</body>` tag and point it at the `verifalia-widget.js`, which can be grabbed from one of the CDNs which serve projects hosted on npm:
To install the Verifalia widget on your page just copy the following HTML block before the closing `</body>` tag and point the script source to the `verifalia-widget.js` file, which can be grabbed from one of the CDNs which serve projects hosted on npm:

@@ -24,6 +26,8 @@ ```html

<script defer
src="https://unpkg.com/verifalia-widget@1.3.0/dist/verifalia-widget.js"
integrity="sha512-GjFzFkgiZ5jou44x3UHFhTw5VwR9JqUyveSms0hkHmeyO6chhCxNNwM2Ftfw6AzNYXOZ/8v5/UkaXjvC4Z9wZg=="
src="https://unpkg.com/verifalia-widget@1.4.0/dist/verifalia-widget.js"
integrity="sha512-/mIweqm8++K6IdIkVnt2esg6PoBdcFx7Sea2FildQK1ZwLnPUmAPB2F5Ei+JQP+J6OHyFMwpZhun8ipBTuTH7g=="
crossorigin="anonymous"></script>
</body>
<div style="display: none">Powered by Verifalia <a href="https://verifalia.com/">email verification</a></div>
</body>
</html>

@@ -38,6 +42,8 @@ ```

<script defer
src="https://cdn.jsdelivr.net/npm/verifalia-widget@1.3.0/dist/verifalia-widget.js"
integrity="sha512-GjFzFkgiZ5jou44x3UHFhTw5VwR9JqUyveSms0hkHmeyO6chhCxNNwM2Ftfw6AzNYXOZ/8v5/UkaXjvC4Z9wZg=="
src="https://cdn.jsdelivr.net/npm/verifalia-widget@1.4.0/dist/verifalia-widget.js"
integrity="sha512-/mIweqm8++K6IdIkVnt2esg6PoBdcFx7Sea2FildQK1ZwLnPUmAPB2F5Ei+JQP+J6OHyFMwpZhun8ipBTuTH7g=="
crossorigin="anonymous"></script>
</body>
<div style="display: none">Powered by Verifalia <a href="https://verifalia.com/">email verification</a></div>
</body>
</html>

@@ -117,2 +123,9 @@ ```

For a better user experience, the widget also shows error squiggles upon completing an email verification, to call attention to a typo or other
kinds of error:
![Error squiggles](./docs/assets/squiggles.gif)
Error squiggles can be turned off by way of the [squiggles](#squiggles) setting mentioned below.
### Parsley ###

@@ -136,3 +149,3 @@

You can configure how the widget binds to the `input` fields through the `inputBindings` property. Here is the object structure and a type definition of the available properties:
You can configure how the widget binds to the `input` fields through the `inputBindings` property. Here is the object structure and a type definition of the available properties, with each item being optional and coming with a default value as mentioned in the next sections:

@@ -154,2 +167,3 @@ ```javascript

preventSubmission: string,
squiggles: boolean
}

@@ -164,2 +178,5 @@ ```

As an alternative to the configuration script, it is also possible to adjust this setting by way of the `data-verifalia-inputBindings-appendHiddenFields`
attribute (see [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes)).
#### autoWireup ####

@@ -169,2 +186,5 @@

As an alternative to the configuration script, it is also possible to adjust this setting by way of the `data-verifalia-inputBindings-autoWireup`
attribute (see [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes)).
#### classNames ####

@@ -181,2 +201,5 @@

As an alternative to the configuration script, it is also possible to set the CSS class names by way of the `data-verifalia-inputBindings-classNames-base`,
`data-verifalia-inputBindings-classNames-processing`, `data-verifalia-inputBindings-classNames-valid`, `data-verifalia-inputBindings-classNames-invalid`, `data-verifalia-inputBindings-classNames-throttled` and `data-verifalia-inputBindings-classNames-exception` attributes, respectively. See [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes).
#### debounceTime ####

@@ -186,6 +209,14 @@

As an alternative to the configuration script, it is also possible to adjust this setting by way of the `data-verifalia-inputBindings-debounceTime`
attribute (see [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes)).
#### events ####
Zero or more input field events the widget binds to and triggers the email verification for, separated by a comma (`,`). Defaults to `input`.
Zero or more input field events the widget binds to and triggers the email verification for, separated by a comma (`,`). Defaults to `input`, meaning
the widget will start verifying email addresses on any change made in the input field text content. When no events are set (such as when the configured
value is an empty string), the widget starts verifying email addresses only upon submitting the parent form.
As an alternative to the configuration script, it is also possible to adjust this setting by way of the `data-verifalia-inputBindings-events`
attribute (see [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes)).
#### preventSubmission ####

@@ -201,5 +232,18 @@

As an alternative to the configuration script, it is also possible to adjust this setting by way of the `data-verifalia-inputBindings-preventSubmission`
attribute (see [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes)).
#### squiggles ####
If `true` displays squiggles within the `input` field upon completing an email validation, in the event the widget detects typos or in other cases where an additional error indicator could make sense for the user. Defaults to `true`.
As an alternative to the configuration script, it is also possible to adjust this setting by way of the `data-verifalia-inputBindings-squiggles`
attribute (see [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes)).
![Error squiggles](./docs/assets/squiggles.gif)
### emailValidations ###
Defines the email validation logic and preferences for the Verifalia widget. Here is the object structure and a type definition of the available properties:
Defines the email validation logic and preferences for the Verifalia widget. Here is the object structure and a type definition of the available properties,
with each item being optional and coming with a default value as mentioned in the next sections:

@@ -211,6 +255,6 @@ ```javascript

messages: {
invalid: string,
processing: string,
invalid: string,
throttled: string
},
}
};

@@ -233,2 +277,5 @@ ```

As an alternative to the configuration script, it is also possible to adjust this setting by way of the `data-verifalia-emailValidations-allow`
attribute (see [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes)).
#### block ####

@@ -246,2 +293,5 @@

As an alternative to the configuration script, it is also possible to adjust this setting by way of the `data-verifalia-emailValidations-block`
attribute (see [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes)).
#### messages ####

@@ -251,4 +301,127 @@

- `invalid` defaults to `Please enter a valid email address.`;
- `processing` defaults to `Please hold on for a second, until we verify this email address...`;
- `invalid` defaults to `Please enter a valid email address.`;
- `throttled` defaults to `Too many attempts, please try again later.`;
As an alternative to the configuration script, it is also possible to set each message text by way of the `data-verifalia-emailValidations-messages-invalid`,
`data-verifalia-emailValidations-messages-processing` and `data-verifalia-emailValidations-messages-throttled` attributes, respectively. See [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes).
## Widget events ##
During its lifecycle, the widget triggers some synthetic events which allow listeners to be notified of notable activities and eventually react accordingly;
all these events are named with the `verifalia-widget:` prefix, to ease their handling.
### verifalia-widget:initializing event ###
The `verifalia-widget:initializing` event is fired exactly one time, upon initializing the widget script, from the `document` object. It is cancellable, allowing
listeners to abort the widget initialization by way of the `preventDefault()` method if desired.
```javascript
<script>
document.addEventListener('verifalia-widget:initializing', function (event) {
console.log('The Verifalia widget is initializing, drum roll...');
// Uncomment the line below to abort the widget initialization
// event.preventDefault();
});
</script>
```
### verifalia-widget:initialized event ###
The `verifalia-widget:initialized` event is fired exactly one time, as soon as the widget finishes initializing: the event is triggered from the `document` object and bubbles up.
```javascript
<script>
document.addEventListener('verifalia-widget:initialized', function (event) {
console.log('The Verifalia widget is initialized: enjoy!');
});
</script>
```
### verifalia-widget:field-validation-started ###
The `verifalia-widget:field-validation-started` event is fired whenever the widget starts verifying an input field; it is triggered from the target field's element object and bubbles up the DOM hierarchy.
```javascript
<script>
document.addEventListener('verifalia-widget:field-validation-started', function (event) {
console.log('Email verification started for field', event.target);
});
</script>
```
### verifalia-widget:field-validation-completed ###
The `verifalia-widget:field-validation-completed` event is fired whenever the verification process for an input field ends; it is triggered from the target field's element object and bubbles up the DOM hierarchy. Its `detail` field contains important details about the verification process, which include a `status`
field with the overall process status and an optional `validation` object with the actual email validation data, where available.
The `status` field contains one of the following values:
- `Allowed` whenever the email verification passes the [allow](#allow)/[block](#block) settings (default to allowing Deliverable, Risky and Unknown emails and blocking disposable mails);
- `NotAllowed` - the opposite of the value above - means the email verification does not pass the [allow](#allow)/[block](#block) settings;
- `Throttled` if the request exceeded the maximum limit, as configured in the Verifalia clients area;
- `Exception` in the event of an unhandled exception;
- `Cancelled` whenever the verification is cancelled (for example, if the field value is changed in the middle of an existing email verification).
The `validation` field is present only when the `status` field is `Allowed` or `NotAllowed` and contains an object with the full [job snapshot structure](https://verifalia.com/developers#email-validations-job-snapshot) returned by the Verifalia API, which includes every possible result detail about the email verification.
```javascript
<script>
document.addEventListener('verifalia-widget:field-validation-completed', function (event) {
console.log('Email verification completed for field', event.target);
console.log('Status', event.detail.status);
console.log('Validation', event.detail.validation);
});
</script>
```
## Changelog / What's new ##
### v1.4 ###
Released on May 7<sup>th</sup>, 2020
- Added support for [squiggles](#squiggles).
- Fixed an issue which caused the widget to automatically focus on an invalid field on blur.
- Improved README.
### v1.3.1 ###
Released on April 11<sup>th</sup>, 2020
- Improved README with additional documentation.
### v1.3 ###
Released on April 9<sup>th</sup>, 2020
- Added support for [widget events](#widget-events).
### v1.2 ###
Released on February 27<sup>th</sup>, 2020
- Aligned the Verifalia widget to the Verifalia API v2.1.
- Updated README with more exaustive documentation.
### v1.1 ###
Released on October 3<sup>rd</sup>, 2019
- Added support for IE11 and Edge.
- Added support for ES5.
- Added a console message in the event the widget configuration contains errors.
### v1.0.1 ###
Released on September 27<sup>th</sup>, 2019
- Fixed the default export of the script, for improved compatibility.
- Updated README with turn-key snippets for including the Verifalia widget from a CDN.
### v1.0 ###
Released on September 26<sup>th</sup>, 2019
- First public release of the Verifalia widget, aligned to the Verifalia API v2.0.

Sorry, the diff of this file is not supported yet

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