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.5.0 to 1.6.0

17

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=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={}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
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 g(e){return"[object Function]"===p.call(e)}function v(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:g,isStream:function(e){return m(e)&&g(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:v,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++)v(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++)v(arguments[i],n);return t},extend:function(e,t,n){return v(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])}))},_=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)},F=["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(){}},k={"Content-Type":"application/x-www-form-urlencoded"};function R(e,t){!y.isUndefined(e)&&y.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var V,U={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(V=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]&&F.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(_("Request failed with status code "+n.status,n.config,null,n.request,n))}(t,n,c),a=null}},a.onabort=function(){a&&(n(_("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(_("Network Error",e,null,a)),a=null},a.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(_(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)}))}),V),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)?(R(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):y.isObject(e)?(R(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(k)}));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 L(e){this.defaults=e,this.interceptors={request:new C,response:new C}}L.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},L.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){L.prototype[e]=function(t,n){return this.request(y.merge(n||{},{method:e,url:t}))}})),y.forEach(["post","put","patch"],(function(e){L.prototype[e]=function(t,n,i){return this.request(y.merge(i||{},{method:e,url:t,data:n}))}}));var Q=L;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 Q(e),n=f(Q.prototype.request,t);return y.extend(n,Q.prototype,t),y.extend(n,t),n}var z=K(D);z.Axios=Q,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"),ge=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}(),ve=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 ve(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 ge(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 _e(){if(!xe){var e=document.createElement("canvas");e.style.display="none",xe=e.getContext("2d")}}function Fe(){return _e(),!!xe}function Ie(e,t){return _e(),Fe()?(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.updateElementLogicalDirAttribute=function(){this._element.setAttribute("verifalia-field-dir",getComputedStyle(this._element,null).direction)},t.prototype.wireup=function(){var e,t,n,i,r,a=this;this._element,this._element.spellcheck=!1,this.updateElementLogicalDirAttribute();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),a.updateElementLogicalDirAttribute()}));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,i;if(this._configuration.inputBindings&&this._configuration.inputBindings.classNames){var r=this._element.classList;switch(this._element,r.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:r.add(this._configuration.inputBindings.classNames.processing);break;case Se.ResultValid:r.add(this._configuration.inputBindings.classNames.valid);break;case Se.ResultInvalid:if(r.add(this._configuration.inputBindings.classNames.invalid),this._configuration.inputBindings.squiggles){var a=this._validator.getValidationResult(this._element),o=null===(n=null==a?void 0:a.validation)||void 0===n?void 0:n.entries[0];if(o){var s=0,l=0;if(o.syntaxFailureIndex?(s=o.syntaxFailureIndex,l=o.inputData.length-o.syntaxFailureIndex):o.status===ue.DomainDoesNotExist||o.status===ue.DomainHasNullMx||o.status===ue.DomainIsMisconfigured||o.status===ue.DomainPartCompliancyFailure||o.status===ue.UnacceptableDomainLiteral?o.emailAddressDomainPart&&(s=o.inputData.length-o.emailAddressDomainPart.length,l=o.emailAddressDomainPart.length):o.status!==ue.InvalidLocalPartLength&&o.status!==ue.MailboxDoesNotExist&&o.status!==ue.ServerDoesNotSupportInternationalMailboxes||o.emailAddressLocalPart&&(l=o.emailAddressLocalPart.length),l&&Fe()){var u=getComputedStyle(this._element,null),c=0;s&&(c=Ie(o.inputData.substr(0,s),u).width);var d=Ie(o.inputData.substr(s,l),u).width,f="rtl"===(null===(i=getComputedStyle(this._element,null).direction)||void 0===i?void 0:i.toLowerCase()),p=this.buildWavvySvg(c,d,f),h=function(e,t){return e?t+", "+e:t};this._element.style.backgroundImage=h(u.backgroundImage,"url(data:image/svg+xml;base64,"+btoa(p)+")"),this._element.style.backgroundRepeat=h(u.backgroundRepeat,"repeat-x"),this._element.style.backgroundAttachment=h(u.backgroundAttachment,"scroll"),this._element.style.backgroundSize=h(u.backgroundSize,"100% 4px"),this._element.style.backgroundOrigin=h(u.backgroundOrigin,"content-box"),this._element.style.backgroundClip=h(u.backgroundClip,"content-box"),this._element.style.backgroundPosition=h(u.backgroundPosition,f?"right 0 bottom 0":"left 0 bottom 0")}}}break;case Se.ResultException:r.add(this._configuration.inputBindings.classNames.exception);break;case Se.ResultThrottled:r.add(this._configuration.inputBindings.classNames.throttled)}}},t.prototype.buildWavvySvg=function(e,t,n){return'<svg xmlns="http://www.w3.org/2000/svg" height="4"'+(n?' style="transform: scale(-1, 1)"':"")+'><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}(),ke=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 Re,Ve=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 Ve("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 ke(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,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\");background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat}.verifalia-field.verifalia-field-processing[verifalia-field-dir=rtl]{background-position:top 50% left calc(.375em + .1875rem)}.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\");background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.verifalia-field.verifalia-field-valid[verifalia-field-dir=rtl]{background-position:top 50% left calc(.375em + .1875rem)}.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\");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[verifalia-field-dir=rtl]{background-position:top 50% left calc(.375em + .1875rem)}"),new function(){this.version="1.5.0";var e=new Be,t=window.VerifaliaWidgetConfig,n=new r(t);if(document.dispatchEvent(new CustomEvent(i.Initializing,{bubbles:!0,cancelable:!0}))){Re=(new Ne).buildHost(n,e);var a=n.getConfiguration(document.body);a.inputBindings&&a.inputBindings.autoWireup&&Re.wireupFields(),document.dispatchEvent(new CustomEvent(i.Initialized,{bubbles:!0}))}}}();
var VerifaliaWidget=function(){"use strict";const t=Symbol();function e(t,i){const s=t=>t&&"object"==typeof t;return s(t)&&s(i)?(Object.keys(i).forEach((n=>{const o=t[n],r=i[n];Array.isArray(o)&&Array.isArray(r)?t[n]=o.concat(r):s(o)&&s(r)?t[n]=e(Object.assign({},o),r):t[n]=r})),t):i}class i{constructor(t,e){this.t=t,this.i=e}o(e){return e?(e[t]||(e[t]=this.A(e)),e[t]):this.A()}l(t,e){if(t.inputBindings){const i=t.inputBindings.preventSubmission||"";let s;return s=Array.isArray(i)?i.map((t=>t.trim().toUpperCase())):i.split(",").map((t=>t.trim().toUpperCase())),t.inputBindings.preventSubmission,s.indexOf(e.toUpperCase())>0}return!1}A(t){const i=e(e({},{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",memoize:!0,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.t||{});return this.t,this.i&&(this.h(i,this.i),this.i),t&&this.h(i,t),i}h(t,e){const i=(s,n)=>{Object.keys(s).forEach((o=>{const r=n?`${n}.${o}`:o,A=typeof s[o];"object"===A?i(s[o],r):this.u(e,r.replace(".","-"),(e=>{let i=t;r.split(".").forEach(((t,s,n)=>{if(s===n.length-1)switch(A){case"boolean":i[t]=(t=>"true"===t)(e);break;case"number":i[t]=parseInt(e)||0;break;default:i[t]=e}i=i[t]}))}))}))};this.u(e,"appKey",(e=>t.appKey=e)),t.inputBindings=t.inputBindings||{},t.inputBindings.classNames=t.inputBindings.classNames||{},t.emailValidations=t.emailValidations||{},t.emailValidations.messages=t.emailValidations.messages||{},i(t)}u(t,e,i){const s=(t,e)=>{const i="data-verifalia-"+e,n=t.getAttribute(i);if(null!==n)return n;const o=t.parentElement;return o?s(o,e):void 0},n=s(t,e);void 0!==n&&i(n)}}function s(t,e,i,s){return new(i||(i=Promise))((function(n,o){function r(t){try{a(s.next(t))}catch(t){o(t)}}function A(t){try{a(s.throw(t))}catch(t){o(t)}}function a(t){t.done?n(t.value):new i((function(e){e(t.value)})).then(r,A)}a((s=s.apply(t,e||[])).next())}))}let n;function o(){if(!n){let t=document.createElement("canvas");t.style.display="none",n=t.getContext("2d")}}function r(){return o(),!!n}function A(t,e){return o(),r()?(n.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}/${e.lineHeight} ${e.fontFamily}`,n.measureText(t)):null}const a="Completed";class l{constructor(t,e,i,s){this.v=0,this.p=t,this.m=e,this.g=i,this.B=i.o(e),this.C=s,this.k=t=>this.I(t)}T(){return this.v}F(t){this.U(this.v,t),this.v=t}S(){this.m.setAttribute("verifalia-field-dir",getComputedStyle(this.m,null).direction)}wireup(){var t,e,i,s,n;this.m,this.m.spellcheck=!1,this.S();let o=0;this.B.inputBindings&&this.B.inputBindings.debounceTime&&(o=this.B.inputBindings.debounceTime);const r=function(t,e=0){let i;return()=>{clearTimeout(i),i=setTimeout((()=>t()),e)}}((()=>{this.m,this.onElementOrFormEvent(this.m)}),o);this.m,this.m.addEventListener("input",(t=>{this.m,this.C.P(this.m),this.$(this.m),this.O(this.m),this.F(0),this.S()}));const A=(null===(e=null===(t=this.B)||void 0===t?void 0:t.inputBindings)||void 0===e?void 0:e.events)||"";let a;if(a=Array.isArray(A)?A:A.split(",").map((t=>t.trim())).filter((t=>t.length>0)),a.forEach((t=>{this.m.addEventListener(t,(t=>{this.m,r()}))})),null===(i=this.B.inputBindings)||void 0===i?void 0:i.preventSubmission){const t=this.m.form;t&&t.addEventListener("submit",(e=>this.onElementOrFormEvent(this.m,t,e)))}this.F(0),(null===(n=null===(s=this.B.inputBindings)||void 0===s?void 0:s.classNames)||void 0===n?void 0:n.base)&&this.m.classList.add(this.B.inputBindings.classNames.base)}$(t){this.C.D(t),t.name&&(this.L(t.name+"-verifalia-id"),this.L(t.name+"-verifalia-classification"),this.L(t.name+"-verifalia-status"))}L(t){const e=document.getElementById(t);e&&e.parentElement&&e.parentElement.removeChild(e)}onElementOrFormEvent(t,e,i){return s(this,void 0,void 0,(function*(){this.M&&clearTimeout(this.M);const s=this.C.R(t);if(s){let e="Allowed"===s.status;if(e=e||"Throttled"===s.status&&!this.g.l(this.B,"throttled"),e=e||"Exception"===s.status&&!this.g.l(this.B,"exception"),e)return void this.O(t)}else if(e&&i?(this.V(t),e.reportValidity(),i.preventDefault(),i.stopImmediatePropagation()):this.V(t),t.addEventListener("verifalia-widget:field-validation-completed",this.k),!this.C.Y(t)){this.F(1);const e=yield this.C.j(t,this.B);switch(this.B.emailValidations.messages,e.status){case"Throttled":this.F(4),this.g.l(this.B,"throttled")?(t.setCustomValidity(this.B.emailValidations.messages.throttled),this.M=setTimeout((()=>{this.F(0),t.setCustomValidity(""),this.C.D(t),delete this.M}),1e4)):this.O(t);break;case"Canceled":this.F(0);break;case"Exception":this.F(5),this.g.l(this.B,"exception")?(t.setCustomValidity(this.B.emailValidations.messages.exception),this.M=setTimeout((()=>{this.F(0),t.setCustomValidity(""),this.C.D(t),delete this.M}),5e3)):this.O(t);break;case"Allowed":case"NotAllowed":if(this.B.inputBindings&&this.B.inputBindings.appendHiddenFields&&t.name){this.H(t.name+"-verifalia-id",e.validation.overview.id,t);const i=e.validation.entries[0];this.H(t.name+"-verifalia-classification",""+i.classification,t),this.H(t.name+"-verifalia-status",""+i.status,t)}"Allowed"===e.status?(this.O(t),this.F(2)):(t.setCustomValidity(this.B.emailValidations.messages.invalid),this.F(3))}}e&&i&&(e.reportValidity(),i.preventDefault(),i.stopImmediatePropagation())}))}O(t){t.setCustomValidity("")}V(t){t.setCustomValidity(this.B.emailValidations.messages.processing)}I(t){t.target.removeEventListener("verifalia-widget:field-validation-completed",this.k)}H(t,e,i){let s=document.getElementById(t);s||(s=document.createElement("input"),s.type="hidden",s.id=t,s.name=t,i.insertAdjacentElement("afterend",s)),s.value=e}U(t,e){var i,s;if(this.B.inputBindings&&this.B.inputBindings.classNames){const t=this.m.classList;this.m;const n=this.B.inputBindings.classNames;switch(t.remove(n.processing,n.valid,n.invalid,n.exception,n.throttled),this.m.removeAttribute("style"),e){case 1:t.add(n.processing);break;case 2:t.add(n.valid);break;case 3:if(t.add(n.invalid),this.B.inputBindings.squiggles){const t=this.C.R(this.m),e=null===(i=null==t?void 0:t.validation)||void 0===i?void 0:i.entries[0];if(e){let t=0,i=0;if(e.syntaxFailureIndex?(t=e.syntaxFailureIndex,i=e.inputData.length-e.syntaxFailureIndex):"DomainDoesNotExist"===e.status||"DomainHasNullMx"===e.status||"DomainIsMisconfigured"===e.status||"DomainPartCompliancyFailure"===e.status||"UnacceptableDomainLiteral"===e.status?e.emailAddressDomainPart&&(t=e.inputData.length-e.emailAddressDomainPart.length,i=e.emailAddressDomainPart.length):"InvalidLocalPartLength"!==e.status&&"MailboxDoesNotExist"!==e.status&&"ServerDoesNotSupportInternationalMailboxes"!==e.status||e.emailAddressLocalPart&&(i=e.emailAddressLocalPart.length),i&&r()){const n=getComputedStyle(this.m,null);let o=0;t&&(o=A(e.inputData.substr(0,t),n).width);const r=A(e.inputData.substr(t,i),n).width,a="rtl"===(null===(s=getComputedStyle(this.m,null).direction)||void 0===s?void 0:s.toLowerCase()),l=this.K(o,r,a),c=(t,e)=>t?`${e}, ${t}`:e,d=this.m.style;d.backgroundImage=c(n.backgroundImage,`url(data:image/svg+xml;base64,${btoa(l)})`),d.backgroundRepeat=c(n.backgroundRepeat,"repeat-x"),d.backgroundAttachment=c(n.backgroundAttachment,"scroll"),d.backgroundSize=c(n.backgroundSize,"100% 4px"),d.backgroundOrigin=c(n.backgroundOrigin,"content-box"),d.backgroundClip=c(n.backgroundClip,"content-box"),d.backgroundPosition=c(n.backgroundPosition,a?"right 0 bottom 0":"left 0 bottom 0")}}}break;case 5:t.add(n.exception);break;case 4:t.add(n.throttled)}}}K(t,e,i){return`<svg xmlns="http://www.w3.org/2000/svg" height="4"${i?' style="transform: scale(-1, 1)"':""}><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="${t}" y="0" width="${e}" height="4" fill="url(#w)"></rect></svg>`}}class c extends l{constructor(t,e,i,s){super(t,e,i,s)}wireup(){this.m}}class d{constructor(t){this.toString=()=>this.message||"[Error]",this.message=t}}class h{constructor(t,e){this.configurationManager=t,this.validator=e,this.fields=[]}wireupFields(){const t=document.evaluate('//*/input[@type="email"] | //*/input[@type!="hidden"][contains(@name, "email")] | //*/input[@*[starts-with(name(), "data-verifalia")]]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(let e=0;e<t.snapshotLength;e++){const i=t.snapshotItem(e);this.wireupField(i)}}wireupField(t){if("INPUT"!==t.tagName.toUpperCase()&&"TEXTAREA"!==t.tagName.toUpperCase())throw new d("unsupported element "+t.tagName);const e=this.configurationManager.o(t);if(e.appKey){e.appKey;const i=t.form;if(!i)return;const s=this.G(i,t,this.configurationManager);s.wireup(),this.fields.push(s)}else console.error("An appkey couldn't be found while loading Verifalia: please check your configuration.")}G(t,e,i){return new l(t,e,i,this.validator)}}class u extends h{constructor(t,e){if(super(t,e),"undefined"!=typeof $&&$.validator&&$.validator.methods&&$.validator.methods.email){const t=this.validator,e=this.configurationManager;$.validator.methods.email=function(i,s,n,o){if(this.optional(s))return"dependency-mismatch";o="email";const r=this.previousValue(s,o);let A,a=this.settings.messages[s.name];if(a||(a={}),r.originalMessage=r.originalMessage||a.email||a,a.hasOwnProperty(o)?a.email=r.message:a=r.message,n="string"==typeof n&&{url:n}||n,A=$.param($.extend({data:i},n.data)),r.old===A)return r.valid;r.old=A,this.startRequest(s);const l=e.o(s);return t.j(s,l).then((t=>{a.hasOwnProperty(o)?a.email=r.originalMessage:a=r.originalMessage;let n=t&&"Allowed"===t.status;if(n=n||"Throttled"===t.status&&!e.l(l,"throttled"),n=n||"Exception"===t.status&&!e.l(l,"exception"),n){const t=this.formSubmitted;this.resetInternals(),this.toHide=this.errorsFor(s),this.formSubmitted=t,this.successList.push(s),this.invalid[s.name]=!1,this.showErrors(),r.valid=!0,this.stopRequest(s,!0)}else{const e={};let n;switch(t.status){case"Throttled":n=l.emailValidations.messages.throttled;break;case"Exception":n=l.emailValidations.messages.exception;break;default:n=this.defaultMessage(s,{method:o,parameters:i})}e[s.name]=r.message=n,this.invalid[s.name]=!0,this.showErrors(e),r.valid=!1,this.stopRequest(s,!1),"Throttled"!==t.status&&"Exception"!==t.status||setTimeout((()=>{r.old=void 0}),5e3)}})),"pending"}}}G(t,e,i){return new c(t,e,i,this.validator)}}const f="verifalia-email";class v extends l{constructor(t,e,i,s){super(t,e,i,s)}wireup(){this.m,$(this.m).parsley().addConstraint(f)}}class w extends h{constructor(t,e){if(super(t,e),"undefined"!=typeof $){const i=window.Parsley;$.Deferred&&i&&i.addValidator&&i.addValidator(f,{validateString(i,s,n){const o=n.element,r=t.o(o),A=new $.Deferred;return e.j(o,r).then((e=>{const i=r.emailValidations.messages;switch(e.status){case"Exception":t.l(r,"exception")?A.reject(i.exception):A.resolve();break;case"Canceled":A.reject();break;case"Allowed":A.resolve();break;case"NotAllowed":A.reject(i.invalid);break;case"Throttled":t.l(r,"throttled")?A.reject(i.throttled):A.resolve()}})),A.promise()}})}}G(t,e,i){return new v(t,e,i,this.validator)}}class p extends l{constructor(t,e,i,s){super(t,e,i,s)}wireup(){this.m}}function m(t,e,i,s){return new(i||(i=Promise))((function(n,o){function r(t){try{a(s.next(t))}catch(t){o(t)}}function A(t){try{a(s.throw(t))}catch(t){o(t)}}function a(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(r,A)}a((s=s.apply(t,e||[])).next())}))}class g{constructor(t){this.toString=()=>this.message||"[Error]",this.message=t}}class b extends g{constructor(){super("The operation was canceled")}}class y{constructor(t,e=null){this.waitForCompletion=t,this.progress=e}waitForNextPoll(t,e){return m(this,void 0,void 0,(function*(){e&&e.throwIfCancellationRequested();let i=Math.max(.5,Math.min(30,Math.pow(2,Math.log10(t.noOfEntries)-1)));if(t.progress&&t.progress.estimatedTimeRemaining){const e=t.progress.estimatedTimeRemaining.match(/^(?:(\d*?)\.)?(\d{2})\:(\d{2})\:(\d{2})(?:\.(\d*?))?$/);if(e){const t=parseInt(e[2]),s=parseInt(e[3]),n=parseInt(e[4]);i=n,i+=60*s,i+=3600*t,i=Math.max(.5,Math.min(30,i))}}return new Promise(((t,s)=>{let n;const o=()=>{clearTimeout(n),s(new b)};n=setTimeout((()=>{e&&e.unregister(o),t()}),1e3*i),e&&e.register(o)}))}))}}function E(t,e,i,s){return m(this,void 0,void 0,(function*(){const n=t.build(),o=yield n.invoke("GET","/email-validations/"+e,void 0,void 0,void 0,s);if(200===o.status||202===o.status){const e=yield o.deserialize();return"boolean"==typeof i&&(i=new y(i)),i&&i.waitForCompletion&&e.overview.status!=a?C(t,e.overview,i,s):B(t,e,s)}if(404===o.status||410===o.status)return null;throw new g(`Unexpected HTTP response: ${o.status} ${o.statusText}`)}))}function B(t,e,i){return m(this,void 0,void 0,(function*(){const s=[];let n=e.entries;for(;n&&n.data&&(s.push(...n.data),n.meta.isTruncated);)n=yield Q(t,e.overview.id,{cursor:n.meta.cursor},i);return{overview:e.overview,entries:s}}))}function Q(t,e,i,s){return m(this,void 0,void 0,(function*(){if(!e)throw new Error("validationId is null");if(!i)throw new Error("cursor is null");const n=t.build(),o={[i.isBackward?"cursor:prev":"cursor"]:i.cursor};i.limit>0&&(o.limit=i.limit.toString());const r=yield n.invoke("GET",`/email-validations/${e}/entries`,o,void 0,void 0,s);if(200===r.status)return yield r.deserialize();throw new g(`Unexpected HTTP response: ${r.status} ${r.statusText}`)}))}function C(t,e,i,s){return m(this,void 0,void 0,(function*(){if(!e)throw new Error("validationOverview is null");if(!i)throw new Error("waitingStrategy is null");let n=e;for(;;){i.progress&&i.progress(n),yield i.waitForNextPoll(n,s);const o=yield E(t,e.id);if(!o)return null;if(n=o.overview,n.status===a)return o}}))}class k extends g{constructor(t){super("All the base URIs are unreachable: "+t.map((t=>t)).join(", ")),this.innerErrors=t}}class I extends g{}class T extends g{}class x extends g{constructor(){super("The current request has been throttled; please try again later.")}}class F extends g{constructor(){super("The credit of the requesting account is too low to complete the operation.")}}const U="application/json";class S{constructor(t,e,i){if(!t)throw new Error("authenticator is null");if(!e||!e.length)throw new Error("baseUris is null or empty");this._=t,this.q=i,this.J=e}invoke(t,e,i,s,n,o){return m(this,void 0,void 0,(function*(){const r=[],A=new AbortController,a=()=>A.abort();o&&o.register(a);try{for(let a=0;a<this.J.length;a++){const l=this.J[a];let c={method:t,body:s&&s instanceof FormData?s:JSON.stringify(s),redirect:"manual",headers:{Accept:U}};o&&(c.signal=A.signal),this.q&&(c.headers=Object.assign(Object.assign({},c.headers),{"User-Agent":this.q})),"POST"!==t&&"PUT"!==t||(c.headers=Object.assign(Object.assign({},c.headers),{"Content-Type":U})),c=Object.assign(Object.assign({},c),n),yield this._.decorateRequest(this,c);const d=i?Object.entries(i).map((([t])=>`${t}=${encodeURIComponent(i[t])}`)).join("&"):null,h=`${l}${e}${d?"?"+d:""}`;let u;try{u=yield fetch(h,c)}catch(t){if("AbortError"===t.name)throw new b;r.push(t);continue}if(!(u.status>=500&&u.status<=599)){if(401===u.status||403===u.status)throw new T(u.statusText+(yield u.text())+" "+h);if(402===u.status)throw new F;if(429===u.status)throw new x;return{status:u.status,statusText:u.statusText,body:u.body,deserialize:()=>m(this,void 0,void 0,(function*(){return yield u.json()}))}}r.push(new I(`Endpoint ${l} returned an HTTP ${u.status} status code.`))}throw new k(r)}finally{o&&o.unregister(a)}}))}}class P{constructor(t){if(this.apiVersion="v2.2",this.J=["https://api-1.verifalia.com","https://api-2.verifalia.com","https://api-3.verifalia.com"],!t)throw new Error("authenticator is null");this._=t}build(){if(!this.N){let t=[...this.J];for(let e=t.length-1;e>0;e--){const i=Math.floor(Math.random()*(e+1));[t[e],t[i]]=[t[i],t[e]]}this.N=new S(this._,t.map((t=>`${t}/${this.apiVersion}`)),this.getUserAgent())}return this.N}getUserAgent(){var t;if("undefined"!=typeof process&&(null===(t=process.versions)||void 0===t?void 0:t.node))return`verifalia-rest-client/js/3.0.0/node/${process.platform+"/"+process.version},target:browser,format:es`}}class O{constructor(t,e){if(!t&&0===t.length)throw Error("username is null or empty: please visit https://verifalia.com/client-area to set up a new user or a new browser app, if you don't have one.");this.W=t,this.Z=e}decorateRequest(t,e){return e.headers=Object.assign(Object.assign({},e.headers),{Authorization:"Basic "+btoa(this.W+":"+this.Z)}),Promise.resolve()}}class D{constructor(){this.X=!1,this.tt=[]}isCanceled(){return this.X}register(t){this.X?t():this.tt.push(t)}unregister(t){const e=this.tt.indexOf(t);e>=0&&this.tt.splice(e,1)}cancel(){this.X=!0;for(const t of this.tt)t();this.tt=[]}throwIfCancellationRequested(){if(this.isCanceled())throw new b}}class L extends h{constructor(t,e){super(t,e);const i=window.validate.validators.email.message;window.validate.validators.email=function(i,s,n,o){const r=t.o(document.body);return new window.validate.Promise((function(n,o){return e.et(r,i,new D).then((e=>{var i,A;switch(e.status){case"Exception":t.l(r,"exception")?o(r.emailValidations.messages.exception):n();break;case"Canceled":o();break;case"Allowed":n();break;case"NotAllowed":n(null!==(A=null!==(i=null==s?void 0:s.message)&&void 0!==i?i:window.validate.validators.email.message)&&void 0!==A?A:r.emailValidations.messages.invalid);break;case"Throttled":t.l(r,"throttled")?o(r.emailValidations.messages.throttled):n()}}),(t=>o(t)))}))},window.validate.validators.email.message=i}G(t,e,i){return new p(t,e,i,this.validator)}}class M{buildHost(t,e){var i,s,n;if("undefined"!=typeof $){if($,window.Parsley)return window.Parsley,new w(t,e);if(null===(s=null===(i=$.validator)||void 0===i?void 0:i.methods)||void 0===s?void 0:s.email)return $.validator,new u(t,e)}return(null===(n=window.validate)||void 0===n?void 0:n.validators)?(window.validate,new L(t,e)):new h(t,e)}}class R{constructor(){this.it=Symbol(),this.st=Symbol(),this.nt={}}ot(t,e){return t[e]}rt(t,e,i){i?t[e]=i:delete t[e]}R(t){return this.ot(t,this.st)}D(t){this.rt(t,this.st,void 0)}At(t,e){this.rt(t,this.it,e)}Y(t){return!!this.ot(t,this.it)}P(t){let e=this.ot(t,this.it);return!!e&&(e.cancel(),this.At(t,void 0),!0)}j(t,e){return s(this,void 0,void 0,(function*(){try{const i=t.value;this.P(t),this.rt(t,this.st,void 0),t.dispatchEvent(new CustomEvent("verifalia-widget:field-validation-started",{bubbles:!0}));const s=new D;this.At(t,s);const n=yield this.et(e,i,s);return t.dispatchEvent(new CustomEvent("verifalia-widget:field-validation-completed",{bubbles:!0,detail:n})),this.rt(t,this.st,n),n}catch(e){let i={},s=!1;return e instanceof x?i.status="Throttled":e instanceof b?(i.status="Canceled",s=!0):(e instanceof T&&console.error("The configured Verifalia appkey appears to be invalid: please check your configuration.",e),i.status="Exception"),t.dispatchEvent(new CustomEvent("verifalia-widget:field-validation-completed",{bubbles:!0,detail:i})),s||this.rt(t,this.st,i),i}finally{this.rt(t,this.it,void 0)}}))}et(t,e,i){return this.at(t,e,i).then((e=>({validation:e,status:this.lt(e.entries[0],t)?"Allowed":"NotAllowed"})))}at(t,e,i){var s,n,o;const r=`${t.appKey}:${e}`,A=this.nt[r];if((null===(s=t.emailValidations)||void 0===s?void 0:s.memoize)&&A){let e=60;if("number"==typeof(null===(n=t.emailValidations)||void 0===n?void 0:n.memoize)&&(e=null===(o=t.emailValidations)||void 0===o?void 0:o.memoize),(new Date).getTime()-A.createdOn<=1e3*e)return A.promise;delete this.nt[r]}const l=new O(t.appKey,""),c=function(t,e,i,s){return m(this,void 0,void 0,(function*(){const n=t.build();let o;if("string"==typeof e)o={entries:[{inputData:e}]};else if(Array.isArray(e)&&e.every((t=>"string"==typeof t)))o={entries:e.map((t=>({inputData:t})))};else if(e.inputData)o={entries:[e]};else if(Array.isArray(e)&&e.every((t=>t.inputData)))o={entries:e};else{if(!e.entries)throw new Error("data type is unsupported.");o=e}const r=yield n.invoke("POST","/email-validations",void 0,o,void 0,s);return function(t,e,i,s){return m(this,void 0,void 0,(function*(){if("boolean"==typeof i&&(i=new y(i)),200===e.status||202===e.status){const n=yield e.deserialize();return i&&i.waitForCompletion&&n.overview.status!=a?C(t,n.overview,i,s):B(t,n,s)}if(404===e.status||410===e.status)return null;throw new g(`Unexpected HTTP response: ${e.status} ${e.statusText}`)}))}(t,r,i,s)}))}(new P(l),e,new y(!0),i);return this.nt[r]={createdOn:(new Date).getTime(),promise:c},c.catch((t=>{throw delete this.nt[r],t}))}lt(t,e){const i=e.emailValidations.allow||"";let s;s=Array.isArray(i)?i:i.split(",").map((t=>t.trim().toUpperCase()));const n=e.emailValidations.block||"";let o;o=Array.isArray(n)?n:n.split(",").map((t=>t.trim().toUpperCase()));let r=!1;return s.indexOf(t.classification.toUpperCase())>-1&&(r=r||!0),s.indexOf(("status:"+t.status).toUpperCase())>-1&&(r=r||!0),t.isFreeEmailAddress&&s.indexOf("@FREE")>-1&&(r=r||!0),t.isDisposableEmailAddress&&s.indexOf("@DISPOSABLE")>-1&&(r=r||!0),t.isRoleAccount&&s.indexOf("@ROLE")>-1&&(r=r||!0),!(!r||o.indexOf(t.classification.toUpperCase())>-1||o.indexOf(("status:"+t.status).toUpperCase())>-1||t.isFreeEmailAddress&&o.indexOf("@FREE")>-1||t.isDisposableEmailAddress&&o.indexOf("@DISPOSABLE")>-1||t.isRoleAccount&&o.indexOf("@ROLE")>-1)}}return function(t,e){void 0===e&&(e={});var i=e.insertAt;if("undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}}(".verifalia-field::-ms-clear{display:none}.verifalia-field.verifalia-field-processing{background-image:url(\"data:image/gif;base64,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\");background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat}.verifalia-field.verifalia-field-processing[verifalia-field-dir=rtl]{background-position:top 50% left calc(.375em + .1875rem)}.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\");background-position:top 50% right calc(.375em + .1875rem);background-repeat:no-repeat;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.verifalia-field.verifalia-field-valid[verifalia-field-dir=rtl]{background-position:top 50% left calc(.375em + .1875rem)}.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\");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[verifalia-field-dir=rtl]{background-position:top 50% left calc(.375em + .1875rem)}"),new(function(){let t;return class{constructor(){this.version="1.6.0";const e=new R,s=new i(window.VerifaliaWidgetConfig,document.currentScript);if(!document.dispatchEvent(new CustomEvent("verifalia-widget:initializing",{bubbles:!0,cancelable:!0})))return;t=(new M).buildHost(s,e);const n=s.o(document.body);n.inputBindings&&n.inputBindings.autoWireup&&t.wireupFields(),document.dispatchEvent(new CustomEvent("verifalia-widget:initialized",{bubbles:!0}))}}}())}();

45

package.json
{
"name": "verifalia-widget",
"version": "1.5.0",
"version": "1.6.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. Allows to easily integrate with any web form and automatically get rid of invalid, undeliverable email addresses, as well as disposable / throw-away, spam trap and free emails.",

@@ -33,18 +33,27 @@ "main": "dist/verifalia-widget.js",

"author": "Verifalia <support@verifalia.com> (https://verifalia.com)",
"contributors": [
{
"name": "Verifalia",
"email": "support@verifalia.com",
"url": "https://verifalia.com"
},
{
"name": "Efran Cobisi"
}
],
"bugs": "https://verifalia.com/support/contact-us",
"dependencies": {},
"license": "MIT",
"devDependencies": {
"@types/debug": "^4.1.5",
"@types/jquery": "^3.3.34",
"@types/node": "^12.12.35",
"cross-env": "^5.2.0",
"@types/jquery": "^3.3.38",
"@types/node": "^14.0.5",
"cross-env": "^7.0.2",
"cssnano": "^4.1.10",
"dts-bundle-generator": "^3.3.1",
"dts-bundle-generator": "^4.3.0",
"genversion": "^2.2.1",
"mdn-polyfills": "^5.20.0",
"node-sass": "^4.14.1",
"node-sass": "^5.0.0",
"postcss-cssnext": "^3.1.0",
"replace-in-file": "^4.3.1",
"rollup": "^1.32.1",
"replace-in-file": "^6.0.0",
"rollup": "^2.32.1",
"rollup-plugin-banner": "^0.2.1",

@@ -56,13 +65,13 @@ "rollup-plugin-commonjs": "^10.0.2",

"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-postcss": "^2.5.0",
"rollup-plugin-postcss": "^3.1.1",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-terser": "^5.3.0",
"rollup-plugin-typescript2": "^0.26.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.27.3",
"rollup-plugin-uglify": "^6.0.4",
"rollup-plugin-visualizer": "^2.7.2",
"ssri": "^7.1.0",
"ts-loader": "^6.2.2",
"tslint": "^5.20.1",
"typescript": "^3.8.3",
"verifalia": "^2.4.0"
"rollup-plugin-visualizer": "^4.0.4",
"ssri": "^8.0.0",
"ts-loader": "^7.0.5",
"tslint": "^6.1.2",
"typescript": "^3.9.3",
"verifalia": "^3.0.0"
},

@@ -69,0 +78,0 @@ "files": [

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 (15KB 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 (9KB gzipped) single Javascript file, with zero dependencies!
![Verifalia email verification widget](https://unpkg.com/verifalia-widget@1.5.0/docs/assets/intro.gif)
![Verifalia email verification widget](https://unpkg.com/verifalia-widget@1.6.0/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).
While this widget is suitable for many integration scenarios, it only runs in the browser and its features are limited: check out the [Verifalia SDK library for Javascript](https://www.npmjs.com/package/verifalia) for a much more advanced solution with support for both Node (in addition to the browser), as well as a vastly extended set of features.
While this widget is suitable for many integration scenarios, it only runs in the browser and its features are limited: check out the [Verifalia SDK library for Javascript](https://www.npmjs.com/package/verifalia) for a much more advanced solution with support for Node.js (in addition to the browser!), as well as a vastly extended set of features.
The Verifalia widget provides out-of-the-box support for:
- standard HTML5 forms (including mobile ones);
- [jQuery Validation Plugin](https://jqueryvalidation.org/);
- [Parsley](https://parsleyjs.org/) form validation library;
- [jQuery Validation Plugin](https://jqueryvalidation.org/).
- [Validate.js](https://validatejs.org/).

@@ -25,4 +26,4 @@ ## Installing the widget on your page ##

<script defer
src="https://unpkg.com/verifalia-widget@1.5.0/dist/verifalia-widget.js"
integrity="sha512-pYURYBmLIvK1JyrbNPEP3m3i3l8HTMC/NZDTLOaQwgksVo7KKdtEcpb/qLAizCfBZqCMK03GtIZCQwMN0cIx6g=="
src="https://unpkg.com/verifalia-widget@1.6.0/dist/verifalia-widget.js"
integrity="sha512-MgY2Yt2ir/yWWOAQegwZkTHqJQnCra1YwLw7/GUfNCxcvqPuSbez4QQUkEJUhPIWPJ3mtoueYzxoHkOw95rfjA=="
crossorigin="anonymous"></script>

@@ -41,4 +42,4 @@ <div style="display: none">Powered by Verifalia <a href="https://verifalia.com/">email verification</a></div>

<script defer
src="https://cdn.jsdelivr.net/npm/verifalia-widget@1.5.0/dist/verifalia-widget.js"
integrity="sha512-pYURYBmLIvK1JyrbNPEP3m3i3l8HTMC/NZDTLOaQwgksVo7KKdtEcpb/qLAizCfBZqCMK03GtIZCQwMN0cIx6g=="
src="https://cdn.jsdelivr.net/npm/verifalia-widget@1.6.0/dist/verifalia-widget.js"
integrity="sha512-MgY2Yt2ir/yWWOAQegwZkTHqJQnCra1YwLw7/GUfNCxcvqPuSbez4QQUkEJUhPIWPJ3mtoueYzxoHkOw95rfjA=="
crossorigin="anonymous"></script>

@@ -83,3 +84,3 @@ <div style="display: none">Powered by Verifalia <a href="https://verifalia.com/">email verification</a></div>

Alternatively, you can configure your widget by way of certain attributes whose names begin with `data-verifalia-`, which you can apply to the specific `input` field you wish the widget to bind to or to any of its ascendant elements, including the parent `form` or the document `body` (recommended option).
Alternatively, you can configure your widget by way of certain attributes whose names begin with `data-verifalia-`, which you can apply to the specific `input` field you wish the widget to bind to or to any of its ascendant elements, including the parent `form` and the document `body`. As a final fall-back element, the widget also looks for any `data-verifalia-*` attribute in the `script` element which loaded it.

@@ -97,3 +98,3 @@ Here is, for example, how to set your browser app key at the `body` level:

While it does not have any dependency at all, the widget offers out-of-the-box support for standard HTML5 forms, [Parsley](https://parsleyjs.org/) form validation library and [jQuery Validation Plugin](https://jqueryvalidation.org/). It eventually adapts its behavior depending on the presence of one of the mentioned Javascript libraries, in order to play nicely with the existing validation of the page.
While it does not have any dependency at all, the widget offers out-of-the-box support for standard HTML5 forms, [jQuery Validation Plugin](https://jqueryvalidation.org/), [Parsley](https://parsleyjs.org/) and [Validate.js](https://validatejs.org/). It eventually adapts its behavior depending on the presence of one of the mentioned Javascript libraries, in order to play nicely with the existing validation logic and styles of the page.

@@ -129,3 +130,3 @@ ### HTML5 forms ###

![Error squiggles](https://unpkg.com/verifalia-widget@1.5.0/docs/assets/squiggles.gif)
![Error squiggles](https://unpkg.com/verifalia-widget@1.6.0/docs/assets/squiggles.gif)

@@ -148,3 +149,3 @@ Error squiggles can be turned off by way of the [squiggles](#squiggles) setting mentioned below.

![Right to left directionality](https://unpkg.com/verifalia-widget@1.5.0/docs/assets/right-to-left.png)
![Right to left directionality](https://unpkg.com/verifalia-widget@1.6.0/docs/assets/right-to-left.png)

@@ -163,3 +164,3 @@ It is also possible to instruct the Verifalia widget to handle directionality for content whose direction is not known in advance, like in the event an `input` field must accept both left to right and right to left email addresses. For this, it is necessary to explicitly specify a `dir` attribute at the `input` field level, with a value of `auto`, as shown in the example below:

![Automatic directionality handling](https://unpkg.com/verifalia-widget@1.5.0/docs/assets/dir-auto.gif)
![Automatic directionality handling](https://unpkg.com/verifalia-widget@1.6.0/docs/assets/dir-auto.gif)

@@ -176,2 +177,8 @@ For further advanced customization, the widget also adds an attribute named `verifalia-field-dir` to the attached `input` element with a value which reflects the computed directionality (which can be any of `ltr` or `rtl`) of that element, so that it is possible to customize the CSS rules for its [visual feedback](visual-feedback) according to that value.

### jQuery Validation Plugin ###
The widget supports [jQuery Validation Plugin](https://jqueryvalidation.org/) out of the box. If it detects jQuery Validation Plugin is loaded on the page, it automatically overrides the default `email` validation logic. Also no additional binding is done for `input` fields, in order to comply with the existing jQuery Validation Plugin configuration.
Under this mode, the widget does not add any CSS class to the fields, in order to play nicely with the existing jQuery Validation Plugin visual feedback.
### Parsley ###

@@ -183,8 +190,6 @@

### jQuery Validation Plugin ###
### Validate.js ###
The widget supports [jQuery Validation Plugin](https://jqueryvalidation.org/) out of the box. If it detects jQuery Validation Plugin is loaded on the page, it automatically overrides the default `email` validation logic. Also no additional binding is done for `input` fields, in order to comply with the existing jQuery Validation Plugin configuration.
This widget supports the [Validate.js](https://validatejs.org/) library out of the box. If it detects Validate.js is loaded on the page, it automatically overrides the default `email` validation logic. Also no additional binding is done for `input` fields and no additional CSS classes are added to them, in order to play nicely with any existing Validate.js configuration.
Under this mode, the widget does not add any CSS class to the fields, in order to play nicely with the existing jQuery Validation Plugin visual feedback.
## Advanced settings ##

@@ -283,3 +288,3 @@

![Error squiggles](https://unpkg.com/verifalia-widget@1.5.0/docs/assets/squiggles.gif)
![Error squiggles](https://unpkg.com/verifalia-widget@1.6.0/docs/assets/squiggles.gif)

@@ -291,6 +296,7 @@ ### emailValidations ###

```javascript
```ts
emailValidations: {
allow: string,
block: string,
memoize: boolean | number,
messages: {

@@ -336,2 +342,9 @@ invalid: string,

#### memoize ####
A value which allows to configure the [memoization](https://en.wikipedia.org/wiki/Memoization) of email validation results, improving the widget response time in certain cases. If `true`, the widget automatically memoize email validation results for 60 seconds, when possible. If `false`, the widget does not memoize any validation result. It is also possible to pass a number to `memoize`: in this case, the value is considered as the number of memoization seconds the widget must apply. Defaults to `true`.
As an alternative to the configuration script, it is also possible to adjust this setting by way of the `data-verifalia-emailValidations-memoize`
attribute (see [Using data-verifalia-* attributes](#using-data-verifalia-*-attributes)).
#### messages ####

@@ -355,3 +368,3 @@

The `verifalia-widget:initializing` event is fired exactly one time, upon initializing the widget script, from the `document` object. It is cancellable, allowing
The `verifalia-widget:initializing` event is fired exactly one time, upon initializing the widget script, from the `document` object. It is cancelable, allowing
listeners to abort the widget initialization by way of the `preventDefault()` method if desired.

@@ -405,3 +418,3 @@

- `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).
- `Canceled` whenever the verification is canceled (for example, if the field value is changed in the middle of an existing email verification).

@@ -420,4 +433,20 @@ 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.

## Known limitations ##
No scripts can run on sites hosted at [Google Sites](https://sites.google.com/), including the Verifalia widget: even if their web page wizard allows to embed custom html, they place every embedded code block in a distinct sandboxed `iframe`, which can't access other sections of the page for security reasons. Thus if one embeds the widget, it won't be able to access the email fields in a form defined in another `iframe`.
## Changelog / What's new ##
### v1.6 ###
Released on November 12<sup>th</sup>, 2020
- Added support for the [Validate.js](https://validatejs.org/) validation library.
- Added the ability to configure the widget through `data-verifalia-*` attributes specified in the importing `script` element.
- Added configurable support for [results memoization](#memoize) (a technique which allows to get validation results faster, in certain cases).
- Aligned the Verifalia widget to the Verifalia API v2.2.
- Improved the overall widget performance: the script now weights only 9KB (gzipped).
- Fixed a compatibility bug with the jQuery Validation plugin.
- Fixed a memory leak in the internal [events](#events) manager.
### v1.5 ###

@@ -424,0 +453,0 @@

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