Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@abtasty/modal

Package Overview
Dependencies
Maintainers
23
Versions
201
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtasty/modal - npm Package Compare versions

Comparing version 2.8.3-1 to 2.8.3-2

2

dist/main.js

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

!function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t(function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(t,e,n,r){var a=e&&e.prototype instanceof y?e:y,i=Object.create(a.prototype),o=new C(r||[]);return i._invoke=function(t,e,n){var r=u;return function(a,i){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===a)throw i;return L()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=E(o,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===u)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=l(t,e,n);if("normal"===c.type){if(r=n.done?p:d,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,o),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u="suspendedStart",d="suspendedYield",h="executing",p="completed",m={};function y(){}function f(){}function g(){}var b={};b[i]=function(){return this};var v=Object.getPrototypeOf,w=v&&v(v(T([])));w&&w!==n&&r.call(w,i)&&(b=w);var _=g.prototype=y.prototype=Object.create(b);function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(t){var e;this._invoke=function(n,a){function i(){return new Promise(function(e,i){!function e(n,a,i,o){var s=l(t[n],t,a);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,o)},function(t){e("throw",t,i,o)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,o)})}o(s.arg)}(n,a,e,i)})}return e=e?e.then(i,i):i()}}function E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=l(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:L}}function L(){return{value:e,done:!0}}return f.prototype=_.constructor=g,g.constructor=f,g[s]=f.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},x(k.prototype),k.prototype[o]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,a){var i=new k(c(e,n,r,a));return t.isGeneratorFunction(n)?i:i.next().then(function(t){return t.done?t.value:i.next()})},x(_),_[s]="Generator",_[i]=function(){return this},_.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return s.type="throw",s.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;O(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}),n=Object.freeze({default:e,__moduleExports:e}),r=n&&e||n;var a=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}},i=Object.freeze({default:a,__moduleExports:a});var o=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)},s=Object.freeze({default:o,__moduleExports:o});var c=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")},l=Object.freeze({default:c,__moduleExports:c}),u=i&&a||i,d=s&&o||s,h=l&&c||l;var p=function(t){return u(t)||d(t)||h()};var m=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};function y(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}var f=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,a){var i=t.apply(e,n);function o(t){y(i,r,a,o,s,"next",t)}function s(t){y(i,r,a,o,s,"throw",t)}o(void 0)})}};var g=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var v=function(t,e,n){return e&&b(t.prototype,e),n&&b(t,n),t},w=t(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(r){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(r)}t.exports=n}),_=Object.freeze({default:w,__moduleExports:w});var x=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},k=Object.freeze({default:x,__moduleExports:x}),E=_&&w||_,S=k&&x||k;var O=function(t,e){return!e||"object"!==E(e)&&"function"!=typeof e?S(t):e},C=t(function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e}),T=t(function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}),L=Object.freeze({default:T,__moduleExports:T}),P=L&&T||L;var R=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&P(t,e)};var I=function(t,e){if(null==t)return{};var n,r,a={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(a[n]=t[n]);return a},A=Object.freeze({default:I,__moduleExports:I}),j=A&&I||A;var N=function(t,e){if(null==t)return{};var n,r,a=j(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a};var B=function(t){if(Array.isArray(t))return t},W=Object.freeze({default:B,__moduleExports:B});var D=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")},z=Object.freeze({default:D,__moduleExports:D}),q=W&&B||W,M=z&&D||z;var V=function(t){return q(t)||d(t)||M()},G="Recurrence",Y="Récurrence",H="Recurrencia",F="Wiederholung",J={en:"".concat(G," of the display"),fr:"".concat(Y," de l'affichage"),es:"".concat(H," de visualización"),de:"".concat(F," der Anzeige")},K={en:"".concat(G," after closure"),fr:"".concat(Y," après fermeture"),es:"".concat(H," tras el cierre"),de:"".concat(F," nach Schließung")},U={en:"".concat(G," after validation"),fr:"".concat(Y," après validation"),es:"".concat(H," tras la validación"),de:"".concat(F," nach der Validierung")},Z={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},$="abtasty_resetActionTracking",Q="remove",X="rebuild";function tt(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n}function et(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tt(n,!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tt(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var nt,rt={category:"conditions",type:"select",options:[{label:{en:"Every time",fr:"Tout le temps",es:"Todo el tiempo",de:"Jedes Mal"},value:"-1"},{label:{en:"Every session",fr:"Chaque session",es:"A cada sesión",de:"Jede Session"},value:"0"},{label:{en:"Everyday",fr:"Chaque jour",es:"Cada día",de:"Jeden Tag"},value:"1"},{label:{en:"Every week",fr:"Chaque semaine",es:"Cada semana",de:"Jede Woche"},value:"7"},{label:{en:"Every month",fr:"Chaque mois",es:"Cada mes",de:"Jeden Monat"},value:"30"},{label:{en:"Once per user (no recurrence)",fr:"Une fois par visiteur (pas de récurrence)",es:"Una vez por usuario (sin recurrencia)",de:"Einmal pro User (keine Wiederholung)"},value:"365"}],value:"-1"},at=(et({},rt,{label:K,propName:"closingRecurrence"}),et({},rt,{label:J,propName:"displayRecurrence"}),et({},rt,{label:U,propName:"validationRecurrence"}),[{label:{en:"Page load",fr:"Au chargement de la page",es:"Al cargar la página",de:"Beim Laden der Seite"},value:"pageLoad"},{label:{en:"Click",fr:"Au clic",es:"Al hacer clic",de:"Klick"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet",es:"Antes de cerrar la pestaña",de:"Exit Intent"},value:"exitIntent"},{label:{en:"Delay",fr:"Après un délai",es:"Tras un retraso",de:"Verzögert"},value:"delay"},{label:{en:"Reengage (after inactivity)",fr:"Au réengagement (après inactivité)",es:"En la reactivación (tras un periodo de inactividad)",de:"Nach Inaktivität"},value:"reengage"}]),it={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:Z,placeholder:{en:"Select an element in the webpage",fr:"Sélectionner un élément dans la page",es:"Selecciona un elemento en la página web",de:"Wählen Sie ein Element auf der Webseite aus"},conditions:[{field:"triggerEvent",value:"click"}]},ot={category:"conditions",type:"number",propName:"".concat("triggerEvent","ExitDelay"),label:{en:"Delay after exit intent",fr:"Délai après intention de sortie",es:"Retraso después de la intención de salida",de:"Verzögerung nach Ausstiegsabsicht"},min:0,max:120,value:0,conditions:[{field:"triggerEvent",value:"exitIntent"}]},st={category:"conditions",type:"number",propName:"".concat("triggerEvent","ReengageDelay"),label:{en:"Idle timeout before posting",fr:"Délai d'inactivité avant l'affichage",es:"Tiempo de espera inactivo antes de publicar",de:"Zeitüberschreitung vor dem Posten"},min:1,max:120,value:10,conditions:[{field:"triggerEvent",value:"reengage"}]},ct={category:"conditions",type:"number",propName:"".concat("triggerEvent","Delay"),label:{en:"Trigger event delay (in seconds)",fr:"Délai avant l'affichage (en secondes)",es:"Retraso antes de publicar",de:"Verzögerung vor dem Posten"},value:10,conditions:[{field:"triggerEvent",value:"delay"}]},lt=([{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:at,propName:"triggerEvent",value:"pageLoad"}].concat(p([it,ot,st,ct])),function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")}),ut=((nt="undefined"!=typeof global?global:window).ABTasty||Object.assign(nt,{ABTasty:{widgetutils:{}}}),nt.ABTasty.widgetutils||Object.assign(nt.ABTasty,{widgetutils:{}}),nt).ABTasty.widgetutils;function dt(t,e){return ut.hasOwnProperty(t)||Object.assign(ut,m({},t,new e)),ut[t]}var ht=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},pt=function(){return"".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID)},mt=function(){if(lt())return!1;var t=DATA;return{displayRecurrence:t.displayRecurrence,closingRecurrence:t.closingRecurrence,validationRecurrence:t.validationRecurrence}},yt=function(){if(lt())return!1;var t,e=DATA,n=e.triggerEvent,r=e.triggerEventClick,a=e.triggerEventExitDelay,i=e.triggerEventDelay,o=e.triggerEventReengageDelay,s=r;switch(n){case"exitIntent":t=a;break;case"delay":t=i;break;case"reengage":t=o;break;default:t=0}return{triggerEvent:n,triggerSelector:s,triggerDelay:t}};function ft(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||(t="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=IntersectionObserver",new Promise(function(e,n){var r=window.document.getElementsByTagName("script")[0],a=window.document.createElement("script");a.src=t,r.parentNode.insertBefore(a,r),a.onload=e,a.onerror=n}));var t}function gt(t){return function(){return f(r.mark(function t(e){return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="IntersectionObserver"===t.t0?3:6;break;case 3:return t.next=5,ft();case 5:return t.abrupt("return",t.sent);case 6:return t.abrupt("return",!0);case 7:case"end":return t.stop()}},t)})).apply(this,arguments)}.apply(this,arguments)}var bt=function(){function t(){g(this,t),this.uniqueId=pt(),this.widgetName=ht(),this.recurrenceParams=mt(),this.triggerParams=yt(),this.recurrence=!!this.recurrenceParams&&new _t(this.recurrenceParams,this.clearGivenClearables.bind(this)),this.trigger=!!this.triggerParams&&new Et(this.triggerParams),this.pageWatcher=new St(this.recurrence,this.isWidgetApplied.bind(this),this.onPageChange.bind(this)),this.basicClassName="ab_widget_container_".concat(this.widgetName),this.widgetContainerId="".concat(this.basicClassName,"_").concat(this.uniqueId),this.contentClassName="".concat(this.basicClassName,"_content"),this.overlayClassName="".concat(this.basicClassName,"_overlay"),this.closeButtonClassName="".concat(this.basicClassName,"_close_button"),this.hideClassName="ab_hide_".concat(this.uniqueId),this.domElement=this.getDom(),this.hasBeenShown=!1,this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[]}return v(t,[{key:"clearGivenClearables",value:function(){this.eventsListeners.length&&(this.eventsListeners.forEach(function(t){var e;return(e=document).removeEventListener.apply(e,p(t))}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(function(t){return clearTimeout(t)}),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(function(t){return clearInterval(t)}),this.intervals=[]),this.observers.length&&(this.observers.forEach(function(t){return t.disconnect()}),this.observers=[]),this.promises.length&&(this.promises.forEach(function(t){return t.resolve(!1)}),this.promises=[])}},{key:"isWidgetApplied",value:function(){return this.domElement&&!!this.domElement.closest("body")}},{key:"insert",value:function(){var t=this;return Ct("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),Ct("body",function(e){return e.appendChild(t.domElement)},function(t){return console.error(t)}),this}},{key:"remove",value:function(){return this.domElement&&this.domElement.closest("html")&&this.domElement.remove(),this.styleElement&&this.styleElement.closest("html")&&this.styleElement.remove(),this}},{key:"show",value:function(){return this.domElement.classList.remove(this.hideClassName),this.recurrence&&this.recurrence.setDisplayRecurrence(),this.hasBeenShown=!0,lt()||this.pageWatcher.watch(),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var t=f(r.mark(function t(){var e;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.recurrence&&this.recurrence.isOver(),!this.recurrence||e){t.next=4;break}return this.pageWatcher.watch(),t.abrupt("return",!1);case 4:if(lt()||this.pageWatcher.watch(),t.t0=lt()||!this.trigger,t.t0){t.next=13;break}if(t.t1=this.trigger,!t.t1){t.next=12;break}return t.next=11,this.trigger.isTriggered();case 11:t.t1=t.sent;case 12:t.t0=t.t1;case 13:if(t.t0){t.next=16;break}return t.abrupt("return",!1);case 16:return this.insert(),this.addCloseEvent(),t.abrupt("return",this);case 19:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onPageChange",value:function(t){var e=this;switch(t){case Q:this.hasBeenShown?this.remove():this.trigger.clear()&&this.pageWatcher.watch();break;case X:this.hasBeenShown?this.insert().show():e.init().then(function(t){return t&&e.show()})}}},{key:"addCloseEvent",value:function(){for(var t=this,e=this.domElement.querySelectorAll("\n\t\t\t.".concat(this.overlayClassName,",\n\t\t\t.").concat(this.closeButtonClassName,"\n\t\t")),n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return r.push.apply(r,p(e)),r.forEach(function(e){e.addEventListener("click",function(){t.recurrence&&t.recurrence.setClosingRecurrence(),t.hide()},{passive:!0,once:!0})}),this}},{key:"getDom",value:function(){var t=document.createElement("div");return t.className="".concat(this.basicClassName," ").concat(this.hideClassName),t.id=this.widgetContainerId,t.innerHTML='\n\t\t\t<div class="'.concat(this.overlayClassName,'"></div>\n\t\t\t<div class="').concat(this.contentClassName,'">\n\t\t\t\t<button class="').concat(this.closeButtonClassName,'" ').concat(lt()?"data-abtasty-actionnable":"",">+</button>\n\t\t\t</div>"),t}},{key:"getStyleTag",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=document.createElement("style");return e.type="text/css",lt()&&e.setAttribute("abtasty-script-added","true"),e.textContent="\n\t\t\t.".concat(this.hideClassName," {opacity: 0 !important; pointer-events: none;}\n\t\t\t").concat(t),e}}]),t}();(function(t){function e(){var t;return g(this,e),(t=O(this,C(e).call(this))).stringStyles=t.getStyles(),t.styleElement=t.getStyleTag(t.stringStyles),t}R(e,bt),v(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tposition: absolute;\n\t\t\tz-index: -1;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground-color: black;\n\t\t\topacity: 0.6;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.contentClassName," {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}\n\t\t\n\t\t@media screen and (max-width: 550px) and (orientation: portrait) {\n\t\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\t\tfont-size: 6vmin;\n\t\t\t}\n\t\t}")}}])})(),function(t){function e(t){var n;return g(this,e),(n=O(this,C(e).call(this))).position=t,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}R(e,bt),v(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\t").concat(this.position,": 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}])}(),function(t){function e(t,n){var r;return g(this,e),(r=O(this,C(e).call(this))).position=t,r.referrerElement=n,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}R(e,bt),v(e,[{key:"insert",value:function(){var t=this;return Ct("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),Ct(this.referrerElement,function(e){return e.insertAdjacentElement(t.position,t.domElement)},function(t){return console.error(t)}),this}},{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tposition: relative;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}])}();function vt(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n}function wt(t){var e=function(t,e){if("object"!==w(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===w(e)?e:String(e)}var _t=function(){function t(e,n){var r=e.displayRecurrence,a=e.closingRecurrence,i=e.validationRecurrence;g(this,t),this.displayRecurrence=parseFloat(r),this.closingRecurrence=parseFloat(a),this.validationRecurrence=parseFloat(i),this.onSetCallback=n,this.widgetName=ht(),this.uniqueId=pt(),this.recurrenceKey="".concat(this.widgetName,"_").concat(this.uniqueId)}return v(t,[{key:"getGivenRecurrenceStorageParsed",value:function(t){try{var e=t.getItem("ABTastyWidgets");return JSON.parse(e)}catch(e){return t.removeItem("ABTastyWidgets"),!1}}},{key:"getSessionRecurrenceStorageParsed",value:function(){return this.getGivenRecurrenceStorageParsed(window.sessionStorage)}},{key:"getLocalRecurrenceStorageParsed",value:function(){return this.getGivenRecurrenceStorageParsed(window.localStorage)}},{key:"removeGivenStorage",value:function(t,e){var n=this.recurrenceKey,r=(e[n],N(e,[n].map(wt)));return Object.entries(r).length?(t.setItem("ABTastyWidgets",JSON.stringify(r)),r):(t.removeItem("ABTastyWidgets"),!1)}},{key:"removeSessionRecurrenceStorage",value:function(){var t=this.getSessionRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.sessionStorage,t)}},{key:"removeLocalRecurrenceStorage",value:function(){var t=this.getLocalRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.localStorage,t)}},{key:"getSessionRecurrence",value:function(){var t=this.getSessionRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}},{key:"getLocalRecurrence",value:function(){var t=this.getLocalRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}},{key:"getCurrentRecurrence",value:function(){var t=this.getSessionRecurrence(),e=this.getLocalRecurrence();return t||e||{type:!1}}},{key:"isOver",value:function(){var t=this.getLocalRecurrence(),e=(t?parseFloat(t.stamp):0)<(new Date).getTime();return e&&this.removeLocalRecurrenceStorage(),e&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(t,e){var n=this,r=this.getTypeOfStorage(t);if(!r&&"object"!==w(r))return!1;var a=this.getTypeOfStorage(t),i=a.storageString,o=a.storageMethod,s=this.getStamp(t),c={type:e,stamp:s},l=this.getCurrentRecurrence().type,u=function(){var t,e=n.getSessionRecurrence(),r=n.getLocalRecurrence();"session"===i?e?t=n.removeSessionRecurrenceStorage():(n.removeLocalRecurrenceStorage(),t=n.getSessionRecurrenceStorageParsed()):"local"===i&&(r?t=n.removeLocalRecurrenceStorage():(n.removeSessionRecurrenceStorage(),t=n.getLocalRecurrenceStorageParsed()));var a=t?function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vt(n,!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vt(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}(m({},n.recurrenceKey,c),t):m({},n.recurrenceKey,c);o.setItem("ABTastyWidgets",JSON.stringify(a)),n.onSetCallback&&"function"==typeof n.onSetCallback&&n.onSetCallback()};if(!o)return!1;if(l&&"validation"!==e)if("closing"===e&&"validation"!==l)u();else{if("display"!==e||"validation"===l||"closing"===l)return!1;u()}else u();return s}},{key:"setDisplayRecurrence",value:function(){this.setRecurrence(this.displayRecurrence,"display")}},{key:"setClosingRecurrence",value:function(){this.setRecurrence(this.closingRecurrence,"closing")}},{key:"setValidationRecurrence",value:function(){this.setRecurrence(this.validationRecurrence,"validation")}},{key:"getStamp",value:function(t){return(new Date).getTime()+864e5*t}},{key:"getTypeOfStorage",value:function(t){return!(isNaN(t)||t<0||0!==t&&!t)&&(t>0?{storageString:"local",storageMethod:window.localStorage}:0===t&&{storageString:"session",storageMethod:window.sessionStorage})}}]),t}(),xt=function(){function t(){g(this,t),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return v(t,[{key:"intersectionHandler",value:function(t){var e=this;t.forEach(function(t){t.isIntersecting?(e.existingTargets=e.existingTargets.filter(function(n){return n.element!==t.target||(e.inViewPortTargets.push(n),!1)}),e.checkElements()):e.inViewPortTargets=e.inViewPortTargets.filter(function(n){return n.element!==t.target||(e.existingTargets.push(n),!1)})})}},{key:"startVisibilityObserver",value:function(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:.5})}},{key:"startMutationObserver",value:function(){var t=new MutationObserver(this.checkElements.bind(this));return t.observe(document,{attributes:!0,childList:!0,subtree:!0}),t}},{key:"isElementVisible",value:function(t){return this.isElementTopmost(t)&&this.isElementOpaque(t)}},{key:"isElementOpaque",value:function(t){return"HTML"===function t(e,n){return n(e)||!e.parentElement?e:t(e.parentElement,n)}(t,function(t){return"0"===window.getComputedStyle(t).opacity}).nodeName}},{key:"isElementTopmost",value:function(t){for(var e=t.getBoundingClientRect(),n=[[e.left,e.top],[e.right,e.top],[e.left,e.bottom],[e.right,e.bottom]],r=!1,a=0;!r&&a<n.length;){var i,o=(i=document).elementFromPoint.apply(i,p(n[a]));r=t===o||t.contains(o),a++}return r}},{key:"checkElements",value:function(){var t=this;this.targets=this.targets.filter(function(e){var n=document.querySelector(e.selector);return!n||(t.existingTargets.push(Object.assign(e,{element:n})),t.visibilityobserver.observe(n),!1)}),this.existingTargets=this.existingTargets.filter(function(e){return!!document.querySelector(e.selector)||(t.visibilityobserver.unobserve(e.element),t.targets.push(e),!1)}),this.inViewPortTargets=this.inViewPortTargets.filter(function(e){var n=e.element,r=e.resolve;return!t.isElementVisible(n)||(t.visibilityobserver.unobserve(n),r(n),!1)})}},{key:"watch",value:function(t,e){this.targets.push({selector:t,resolve:e})}},{key:"clear",value:function(t){var e=this.targets.filter(function(e){return e.selector!==t});0===e.length&&(this.existingTargets=[],this.inViewPortTargets=[],this.mutationobserver.disconnect(),this.visibilityobserver.unobserve(t)),this.targets.length>e&&(this.targets=e,this.visibilityobserver.unobserve(t))}}]),t}(),kt=function(){var t={promise:null,resolve:null,reject:null};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t},Et=function(){function t(e){var n=e.triggerEvent,r=e.triggerSelector,a=e.triggerDelay;g(this,t),this.event=n,this.selector=r&&r.length?r:"body",this.delay=a,this.elementsSelectors=[],this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[],this.visibilityObservers=[]}return v(t,[{key:"onElementVisible",value:function(){var t=f(r.mark(function t(){var e,n,a,i;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=kt(),this.promises.push(e),t.next=4,this.onPageLoad();case 4:return n=t.sent,t.next=7,gt("IntersectionObserver");case 7:return a=t.sent,i=dt("VisibilityObserver",xt),this.visibilityObservers.push(i),a&&n&&i.watch(this.selector,e.resolve),t.abrupt("return",e.promise);case 12:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onPageLoad",value:function(){var t=this,e=kt();this.promises.push(e);var n=function(){return"complete"===document.readyState};if(n())e.resolve(!0);else{var r,a=setTimeout(function(){return t.clear()},15e3),i=["readystatechange",function(){return n()&&!clearTimeout(a)&&e.resolve(!0)},{passive:!0}];this.timeouts.push(a),this.eventsListeners.push(i),(r=document).addEventListener.apply(r,i)}return e.promise}},{key:"onClick",value:function(){var t,e=this,n=document.createElement("style");n.type="text/css",n.id="Click_".concat(pt()),n.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(n),this.elementsSelectors.push("#".concat(n.id));var r=kt();this.promises.push(r);var a=["click",function(t){return!!function(t){return p(document.querySelectorAll(e.selector)).some(function(n){return n.isSameNode(t)||!!t.closest(e.selector)})}(t.target)&&(r.resolve(!0),e.clear())},{passive:!0,capture:!0}];return this.eventsListeners.push(a),(t=document).addEventListener.apply(t,a),r.promise}},{key:"onExitIntent",value:function(){var t=f(r.mark(function t(){var e,n,a=this;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=kt(),this.promises.push(e),n=["mouseleave",function(){var t=f(r.mark(function t(){var n,i;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!a.delay){t.next=6;break}n=1e3*a.delay,i=setTimeout(function(){e.resolve(!0),a.clear()},n),a.timeouts.push(i),t.next=9;break;case 6:return e.resolve(!0),a.clear(),t.abrupt("return");case 9:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),{passive:!0,once:!0}],t.next=6,this.onPageLoad();case 6:return t.sent?Ct("body",function(t){t.addEventListener.apply(t,n),a.eventsListeners.push([t].concat(n))}):e.resolve(!1),t.abrupt("return",e.promise);case 9:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onDelay",value:function(){var t=f(r.mark(function t(){var e,n,a,i=this;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=kt(),this.promises.push(e),n=1e3*this.delay,t.next=5,this.onPageLoad();case 5:return t.sent&&(a=setTimeout(function(){e.resolve(!0),i.clear()},n),this.timeouts.push(a)),t.abrupt("return",e.promise);case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onReengage",value:function(){var t=this,e=kt();this.promises.push(e);var n=1e3*this.delay,r=n,a=[function(){return r=n},{passive:!0}];["click","mousemove","scroll","keypress"].forEach(function(e){var n;(n=document).addEventListener.apply(n,[e].concat(a)),t.eventsListeners.push([e].concat(a))});var i=setInterval(function(){r<=0?(e.resolve(!0),t.clear()):r-=100},100);return this.intervals.push(i),e.promise}},{key:"clear",value:function(){var t=this;return this.elementsSelectors.length&&(this.elementsSelectors.forEach(function(t){document.querySelector(t)&&document.querySelector(t).remove()}),this.elementsSelectors=[]),this.eventsListeners.length&&(this.eventsListeners.forEach(function(t){var e="string"==typeof t[0]?[document].concat(p(t)):t,n=V(e),r=n[0],a=n.slice(1);r&&a.length>1&&r.removeEventListener.apply(r,p(a))}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(function(t){return clearTimeout(t)}),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(function(t){return clearInterval(t)}),this.intervals=[]),this.observers.length&&(this.observers.forEach(function(t){return t.disconnect()}),this.observers=[]),this.visibilityObservers.length&&(this.visibilityObservers.forEach(function(e){return e.clear(t.selector)}),this.visibilityObservers=[]),this.promises.length&&(this.promises.forEach(function(t){return t.resolve(!1)}),this.promises=[]),this}},{key:"isTriggered",value:function(){var t=f(r.mark(function t(){var e;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.clear(),t.t0=this.event,t.next="pageLoad"===t.t0?4:"click"===t.t0?8:"exitIntent"===t.t0?12:"delay"===t.t0?16:"reengage"===t.t0?20:"elementVisible"===t.t0?24:28;break;case 4:return t.next=6,this.onPageLoad();case 6:return e=t.sent,t.abrupt("break",29);case 8:return t.next=10,this.onClick();case 10:return e=t.sent,t.abrupt("break",29);case 12:return t.next=14,this.onExitIntent();case 14:return e=t.sent,t.abrupt("break",29);case 16:return t.next=18,this.onDelay();case 18:return e=t.sent,t.abrupt("break",29);case 20:return t.next=22,this.onReengage();case 22:return e=t.sent,t.abrupt("break",29);case 24:return t.next=26,this.onElementVisible();case 26:return e=t.sent,t.abrupt("break",29);case 28:e=!1;case 29:return t.abrupt("return",e);case 30:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}();var St=function(){function t(e,n,r){g(this,t),this.recurrence=e,this.isWidgetApplied=n,this.callback=r,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.eventListenerParams=[$,this.eventHandler.bind(this),{passive:!0}]}return v(t,[{key:"recurrenceIsDone",value:function(){return!this.recurrence||this.recurrence.isOver()}},{key:"decisionHandler",value:function(t){var e=this,n=!!window.ABTasty.getTestsOnPage()[TEST_ID],r=(this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1}).type,a=function(){return t&&"display"===r||e.recurrenceIsDone()};return!this.isWidgetApplied()&&n&&a()?(this.clearWatcher(),this.callback(X)):(!this.isWidgetApplied()||n&&a())&&(this.isWidgetApplied()||n)||(this.clearWatcher(),this.callback(Q),this.watch()),this}},{key:"eventHandler",value:function(){var t=this;return setTimeout(function(){t.decisionHandler(!1)},250),this}},{key:"observerHandler",value:function(t){var e=t.some(function(t){var e=t.removedNodes;return e&&e.length}),n=t.some(function(t){var e=t.addedNodes;return e&&e.length});return e||n?(this.decisionHandler(!0),this):this}},{key:"watch",value:function(){var t,e=this;return this.clearWatcher(),(t=document).addEventListener.apply(t,p(this.eventListenerParams)),Ct("body",function(t){var n,r=[t,{childList:!0,subtree:!0}];(n=e.observer).observe.apply(n,r)}),this}},{key:"clearWatcher",value:function(){var t;return(t=document).removeEventListener.apply(t,p(this.eventListenerParams)),this.observer.disconnect(),this}}]),t}(),Ot=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(t=console).log.apply(t,n)},Ct=function(t,e,n){var r,a=0;try{document.querySelector(t)}catch(e){var i="Selector «".concat(t,"» not valid.");return Ot(i),"function"==typeof n&&n(i)}r=setTimeout(function(){clearInterval(a);var e="Can't find element «".concat(t,"».");return Ot(e),"function"==typeof n&&n(e)},1e4),a=setInterval(function(){var n=document.querySelector(t);if(null!==n)return clearTimeout(r),clearInterval(a),"function"==typeof e&&e(n)},200)};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}("abtasty-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483145}abtasty-modal:not(.abtasty-modal--video){overflow-y:auto}abtasty-modal__underlay{width:100%;height:100%;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.5);cursor:pointer}.abtasty-modal__area{top:0;left:0;right:0;width:auto;margin:10px!important;z-index:100;position:relative;float:none}.abtasty-modal__area-layout--imageOnly{max-width:80%}.abtasty-modal__area-layout--imageOnly img{border-style:solid;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;opacity:1}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__content{padding:5px;border-radius:0!important;border-width:0!important;background-color:transparent!important;background-image:none!important}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__content{padding:25px 20px 20px}.abtasty-modal .abtasty-modal__content{border-color:#f6f6f6;border-style:solid;padding:20px}.abtasty-modal__area-type--image,.abtasty-modal__area-type--no-title,.abtasty-modal__area-type--simple,.abtasty-modal__area-type--video{margin:0 auto 20px!important;top:10vh;border:none;background:none}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__close--inside{top:2px}.abtasty-modal__area-type--video.abtasty-modal__area-layout--top .abtasty-modal__close--inside{right:15px;top:20px}.abtasty-modal__area-type--image .abtasty-modal__close,.abtasty-modal__area-type--simple .abtasty-modal__close{right:10px;top:15px}.abtasty-modal__close{position:absolute;right:5px;top:0;font-size:20px;font-weight:300;background:transparent;border:0;color:#222;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;line-height:24px!important;margin-right:5px;cursor:pointer;width:20px;height:20px;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__close svg{display:block}.abtasty-modal__close svg .close-x{stroke:#5c5c5c;fill:transparent;stroke-linecap:round;stroke-width:3}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__close--inside{top:-6px;right:-15px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__area-type--image .abtasty-modal__close--outside,.abtasty-modal__area-type--simple .abtasty-modal__close--outside,.abtasty-modal__close .abtasty-modal__close--outside{top:-25px;right:0;width:20px;height:20px}.abtasty-modal__close--outside{top:-25px;right:-25px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__media,.abtasty-modal__media-link{max-width:100%;display:block}.abtasty-modal__text{padding:20px;font-family:Open Sans,sans-serif!important;color:#000;overflow:auto}.abtasty-modal__title{width:auto;font-size:20px!important;font-weight:500;line-height:1.1;margin-bottom:10px}.abtasty-modal__text p{margin:0 0 10px!important;font-size:15px;font-weight:300;word-wrap:break-word}.abtasty-modal__button{width:100%;text-align:center;margin-top:20px}.abtasty-modal__button a{padding:10px 20px;border-radius:10px;display:inline-block;font-weight:700}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__title{text-align:center}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__innertext{text-align:center;white-space:pre-wrap}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--image .abtasty-modal__image img{max-height:400px;max-width:100%;display:inline;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image img{max-height:300px;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--video{text-align:center;width:100%}.abtasty-modal__area-type--video iframe{width:100%}@media (min-width:630px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--medium{width:600px;margin:0 auto 20px!important}.abtasty-modal--video{width:50%;left:25%}}@media (min-width:330px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--small{width:300px;margin:0 auto 20px!important}}@media (min-width:930px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--large{width:900px;margin:0 auto 20px!important}}.abtasty-animation-fadeIn{-webkit-animation-name:a;animation-name:a}.abtasty-animation-fadeIn,.abtasty-animation-fadeOut{-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-fadeOut{-webkit-animation-name:b;animation-name:b}.abtasty-animation-slideIn{-webkit-animation-name:c;animation-name:c;-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-slideOut{-webkit-animation-name:d;animation-name:d;-webkit-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes a{0%{opacity:0}to{opacity:1}}@keyframes a{0%{opacity:0}to{opacity:1}}@-webkit-keyframes b{0%{opacity:1}to{opacity:0}}@keyframes b{0%{opacity:1}to{opacity:0}}@-webkit-keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}");var Tt=function(t){var e=Object.prototype.hasOwnProperty;function n(t,r){return Array.isArray(t)?function(t,e){for(var r,a="",i="",s=Array.isArray(e),c=0;c<t.length;c++)(r=n(t[c]))&&(s&&e[c]&&(r=o(r)),a=a+i+r,i=" ");return a}(t,r):t&&"object"==typeof t?function(t){var n="",r="";for(var a in t)a&&t[a]&&e.call(t,a)&&(n=n+r+a,r=" ");return n}(t):t||""}function r(t){if(!t)return"";if("object"==typeof t){var n="";for(var r in t)e.call(t,r)&&(n=n+r+":"+t[r]+";");return n}return";"!==(t+="")[t.length-1]?t+";":t}function a(t,e,n,r){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(r?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),n||-1===e.indexOf('"'))?(n&&(e=o(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"&#39;")+"'"):""}t.merge=function t(e,n){if(1===arguments.length){for(var a=e[0],i=1;i<e.length;i++)a=t(a,e[i]);return a}for(var o in n)if("class"===o){var s=e[o]||[];e[o]=(Array.isArray(s)?s:[s]).concat(n[o]||[])}else if("style"===o){var s=r(e[o]),c=r(n[o]);e[o]=s+c}else e[o]=n[o];return e},t.classes=n,t.style=r,t.attr=a,t.attrs=function(t,i){var o="";for(var s in t)if(e.call(t,s)){var c=t[s];if("class"===s){c=n(c),o=a(s,c,!1,i)+o;continue}"style"===s&&(c=r(c)),o+=a(s,c,!1,i)}return o};var i=/["&<>]/;function o(t){var e=""+t,n=i.exec(e);if(!n)return t;var r,a,o,s="";for(r=n.index,a=0;r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}a!==r&&(s+=e.substring(a,r)),a=r+1,s+=o}return a!==r?s+e.substring(a,r):s}return t.escape=o,t.rethrow=function t(e,n,r,a){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&n||a))throw e.message+=" on line "+r,e;try{a=a||require("fs").readFileSync(n,"utf8")}catch(n){t(e,null,r)}var i=3,o=a.split("\n"),s=Math.max(r-i,0),c=Math.min(o.length,r+i);var i=o.slice(s,c).map(function(t,e){var n=e+s+1;return(n==r?" > ":" ")+n+"| "+t}).join("\n");e.path=n;e.message=(n||"Pug")+":"+r+"\n"+i+"\n\n"+e.message;throw e},t}({});var Lt,Pt,Rt,It,At,jt=DATA,Nt=jt.type,Bt=jt.animation,Wt=jt.backgroundColor,Dt=jt.overlayOpacity,zt=jt.backgroundImage,qt=jt.borderRadius,Mt=jt.borderRadiusImage,Vt=jt.borderWidth,Gt=jt.borderColor,Yt=jt.button,Ht=jt.buttonBackgroundColor,Ft=jt.buttonLink,Jt=jt.buttonText,Kt=jt.buttonTextColor,Ut=jt.backgroundCloseButtonColor,Zt=jt.closeButtonColor,$t=jt.closeButtonPosition,Qt=jt.content,Xt=jt.customWidth,te=jt.title,ee=jt.layout,ne=jt.videoLink,re=jt.widthImageWithText,ae=jt.widthImageOnly,ie=jt.autoPlay,oe=0,se=Nt.replace(/^\w/,function(t){return t.toUpperCase()}),ce="imageOnly"===ee?ae:re,le=DATA.image||"https://widgets-images.abtasty.com/image-placeholder.png",ue="abtasty-modal__underlay",de=".abtasty-modal__close";function he(){return Lt&&Lt.closest("html")&&oe}function pe(){oe=0,Lt.style.display="none","video"===Nt&&(Lt.innerHTML=""),ABTastyEvent("".concat(se," modal closed"),null,TEST_ID)}function me(t,e,n,r){var a,i=[t,function(t){var a=t.target,o=p(document.querySelectorAll(e)).some(function(t){return t.isSameNode(a)||a.closest(e)});return o&&n(),o&&r&&function(t){var e;return(e=document).removeEventListener.apply(e,p(t))}(i)},!0];(a=document).addEventListener.apply(a,i)}function ye(){if(Rt.isOver())return"pageLoad"!==It.event?Ee():void _e()}function fe(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={layout:ee,type:Nt,borderRadius:qt,borderRadiusImage:Mt,borderWidth:Vt,borderColor:Gt,button:Yt,buttonBackgroundColor:Ht,buttonLink:Ft,buttonText:Jt,buttonTextColor:Kt,backgroundColor:"imageOnly"!==ee?Wt:"initial",overlayOpacity:Dt,backgroundImage:zt,image:le,width:ce,videoLink:ne,customWidth:Xt,animation:Bt,title:te,closeButtonPosition:$t,backgroundCloseButtonColor:Ut,modalContent:Qt||t.outerHTML};(Lt.className="abtasty-modal abtasty-modal--".concat(Nt),Lt.dataset.testId=TEST_ID,Lt.innerHTML=function(t){var e,n="",r={};try{var a={},i=t||{};(function(t,a,i,o,s,c,l,u,d,h,p,m,y,f,g,b,v,w,_,x,k,E){r.button=e=function(){this&&this.block,this&&this.attributes,n=(n=(n+='<div class="abtasty-modal__button">')+"<a"+Tt.attr("href",p,!0,!0)+' target="_self"'+Tt.attr("style",Tt.style({"background-color":h+"!important",color:y+"!important"}),!0,!0)+">")+Tt.escape(null==(e=m)?"":e)+"</a></div>"},r.title=e=function(){this&&this.block,this&&this.attributes,n=(n+='<h2 class="abtasty-modal__title" style="text-align:center;">')+(null==(e=x)?"":e)+"</h2>"},r.imageOnly=e=function(){this&&this.block,this&&this.attributes,n=n+"<img"+(Tt.attr("src",b,!0,!0)+Tt.attr("style",Tt.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":s+"!important"}),!0,!0))+">"},r.imageWithText=e=function(){this&&this.block,this&&this.attributes,n+='<div class="abtasty-modal__image">',b&&(n=n+"<img"+(Tt.attr("src",b,!0,!0)+Tt.attr("style",Tt.style({"border-radius":l+"px!important"}),!0,!0))+">"),n+="</div>"},r.content=e=function(){this&&this.block,this&&this.attributes,n+='<div class="abtasty-modal__innertext">',n=(n+="<p>")+(null==(e=w)?"":e)+"</p></div>"},r.closeButton=e=function(){this&&this.block,this&&this.attributes,n=n+"<div"+Tt.attr("class",Tt.classes(["abtasty-modal__close",f?"abtasty-modal__close--"+f:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+Tt.attr("style",Tt.style("outside"===f?{"background-color":a}:""),!0,!0)+">",n+='<svg viewbox="0 0 40 40">',n+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>'},r.contentWrapper=e=function(){var t=this&&this.block;this&&this.attributes,n=n+'<div class="abtasty-modal__content"'+Tt.attr("style",Tt.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":s+"!important","background-color":i+"!important","background-image":'url("'+o+'")!important'}),!0,!0)+">",t&&t&&t(),n+="</div>"},r.modalWrapper=e=function(){var e=this&&this.block;this&&this.attributes,n=(n=n+"<abtasty-modal__underlay"+Tt.attr("style",Tt.style({"background-color":"rgba(0, 0, 0, "+_/100+")"}),!0,!0)+"></abtasty-modal__underlay>")+"<div"+(Tt.attr("class",Tt.classes(["abtasty-animation-"+t+" abtasty-modal__area abtasty-modal__area-width--"+E+" abtasty-modal__area-type--"+k+" abtasty-modal__area-layout--"+v],[!0]),!1,!0)+Tt.attr("style",Tt.style({width:"custom"===E&&g+"%","margin-left":"custom"===E&&(100-g)/2+"% !important"}),!0,!0))+">",e&&e&&e(),n+="</div>"},r.modalWrapper.call({block:function(){r.closeButton(),"image"===k&&"imageOnly"===v?(r.imageOnly(),d&&r.button()):r.contentWrapper.call({block:function(){"simple"===k?(n+='<div class="abtasty-modal__text">',"center"===v||"left"===v?(r.title(),r.content(),n+='<div style="clear:both;"></div>'):(r.content(),r.title(),n+='<div style="clear:both;"></div>'),n+="</div>",d&&r.button()):"image"===k?("top"!==v&&"left"!==v||r.imageWithText(),n+='<div class="abtasty-modal__text">',r.title(),r.content(),d&&r.button(),n+="</div>","right"!==v&&"bottom"!==v||r.imageWithText(),n+='<div style="clear:both;"></div>'):"video"===k&&("top"===v&&r.title(),n+=null==(e=w)?"":e,"bottom"===v&&r.title(),d&&r.button())}})}})}).call(this,"animation"in i?i.animation:"undefined"!=typeof animation?animation:void 0,"backgroundCloseButtonColor"in i?i.backgroundCloseButtonColor:"undefined"!=typeof backgroundCloseButtonColor?backgroundCloseButtonColor:void 0,"backgroundColor"in i?i.backgroundColor:"undefined"!=typeof backgroundColor?backgroundColor:void 0,"backgroundImage"in i?i.backgroundImage:"undefined"!=typeof backgroundImage?backgroundImage:void 0,"borderColor"in i?i.borderColor:"undefined"!=typeof borderColor?borderColor:void 0,"borderRadius"in i?i.borderRadius:"undefined"!=typeof borderRadius?borderRadius:void 0,"borderRadiusImage"in i?i.borderRadiusImage:"undefined"!=typeof borderRadiusImage?borderRadiusImage:void 0,"borderWidth"in i?i.borderWidth:"undefined"!=typeof borderWidth?borderWidth:void 0,"button"in i?i.button:"undefined"!=typeof button?button:void 0,"buttonBackgroundColor"in i?i.buttonBackgroundColor:"undefined"!=typeof buttonBackgroundColor?buttonBackgroundColor:void 0,"buttonLink"in i?i.buttonLink:"undefined"!=typeof buttonLink?buttonLink:void 0,"buttonText"in i?i.buttonText:"undefined"!=typeof buttonText?buttonText:void 0,"buttonTextColor"in i?i.buttonTextColor:"undefined"!=typeof buttonTextColor?buttonTextColor:void 0,"closeButtonPosition"in i?i.closeButtonPosition:"undefined"!=typeof closeButtonPosition?closeButtonPosition:void 0,"customWidth"in i?i.customWidth:"undefined"!=typeof customWidth?customWidth:void 0,"image"in i?i.image:"undefined"!=typeof image?image:void 0,"layout"in i?i.layout:"undefined"!=typeof layout?layout:void 0,"modalContent"in i?i.modalContent:"undefined"!=typeof modalContent?modalContent:void 0,"overlayOpacity"in i?i.overlayOpacity:"undefined"!=typeof overlayOpacity?overlayOpacity:void 0,"title"in i?i.title:"undefined"!=typeof title?title:void 0,"type"in i?i.type:"undefined"!=typeof type?type:void 0,"width"in i?i.width:"undefined"!=typeof width?width:void 0)}catch(t){Tt.rethrow(t,void 0,void 0,a[void 0])}return n}(e),document.body.appendChild(Lt),Pt=Lt.querySelector(".abtasty-modal__area"),Zt)&&(Lt.querySelector("".concat(de," .close-x")).style.stroke=Zt);return new Promise(function(t){t(!0)})}function ge(t){var e,n=t.indexOf("youtu")>-1,r=t.indexOf("vimeo")>-1;if(n){var a=t.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2];e="//www.youtube.com/embed/".concat(a,"?rel=0"),ie&&(e+="&autoplay=1")}else if(r){var i=t.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2];e="//player.vimeo.com/video/".concat(i)}return e}function be(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function ve(){var t,e,n,a,i,o;return r.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t=Date.now(),e="abtasty-widget-video-".concat(t),(n=document.createElement("iframe")).setAttribute("id",e),a=ge(ne),i=be(),n.style.height="".concat(i,"px"),"no-title"===ee&&(n.style.border="".concat(Vt,"px solid ").concat(Gt,"!important"),n.style.borderRadius="".concat(qt,"px!important")),n.src=a,n.frameBorder=0,n.allowfullscreen=!0,s.next=13,r.awrap(fe(n));case 13:return o=s.sent,Pt.style.height="".concat(i,"px"),window.addEventListener("resize",function(){var t=document.querySelector("abtasty-modal iframe"),e=be();t.style.height="".concat(e,"px"),Pt.style.height="".concat(e,"px")}),s.abrupt("return",o&&new Promise(function(t){t(!0)}));case 17:case"end":return s.stop()}})}function we(t){switch(top.console.log("onChangeDetected",t),t){case Q:oe?Lt&&Lt.closest("html")&&(Lt.style.display="none",Lt.remove()):(It&&It.clear(),At&&At.watch());break;case X:oe?ke():Ee()}}function _e(){top.console.log("watchPageChanges"),(At=At||new St(Rt,he,we)).watch()}function xe(){Lt.style.display="block",me("click","".concat(ue,", ").concat(de),function(){pe(),Rt.setClosingRecurrence(),setTimeout(ye,250)},!0),Yt&&Ft.length&&me("mouseup",".abtasty-modal__button",function(){pe(),Rt.setValidationRecurrence(),setTimeout(ye,250)},!0),lt()||(_e(),oe=1,Rt.setDisplayRecurrence())}function ke(){var t;return r.async(function(e){for(;;)switch(e.prev=e.next){case 0:if(Lt=Lt||document.createElement("abtasty-modal"),"video"!==Nt){e.next=8;break}return e.next=4,r.awrap(ve());case 4:e.sent&&xe(),e.next=19;break;case 8:if("image"!==Nt||"fit"!==ce){e.next=15;break}(t=new Image).src=le,t.className="abtasty-modal__media",t.onload=function(){return r.async(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.awrap(fe(this));case 2:t.sent&&xe(),Pt.style.width="".concat(this.width,"px"),Pt.style.height="".concat(this.height,"px");case 6:case"end":return t.stop()}},null,this)},e.next=19;break;case 15:return e.next=17,r.awrap(fe());case 17:e.sent&&xe();case 19:case"end":return e.stop()}})}function Ee(){var t;return r.async(function(e){for(;;)switch(e.prev=e.next){case 0:if((Rt=Rt||new _t(mt())).isOver()){e.next=4;break}return _e(),e.abrupt("return",!1);case 4:return _e(),It=It||new Et(yt()),e.next=8,r.awrap(It.isTriggered());case 8:return(t=e.sent)&&ke(),e.abrupt("return",t);case 11:case"end":return e.stop()}})}lt()?ke():Ee()}();
!function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t(function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(t,e,n,r){var a=e&&e.prototype instanceof y?e:y,i=Object.create(a.prototype),o=new C(r||[]);return i._invoke=function(t,e,n){var r=u;return function(a,i){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===a)throw i;return L()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=E(o,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===u)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=l(t,e,n);if("normal"===c.type){if(r=n.done?p:d,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,o),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u="suspendedStart",d="suspendedYield",h="executing",p="completed",m={};function y(){}function f(){}function g(){}var b={};b[i]=function(){return this};var v=Object.getPrototypeOf,w=v&&v(v(T([])));w&&w!==n&&r.call(w,i)&&(b=w);var _=g.prototype=y.prototype=Object.create(b);function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(t){var e;this._invoke=function(n,a){function i(){return new Promise(function(e,i){!function e(n,a,i,o){var s=l(t[n],t,a);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,o)},function(t){e("throw",t,i,o)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,o)})}o(s.arg)}(n,a,e,i)})}return e=e?e.then(i,i):i()}}function E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=l(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:L}}function L(){return{value:e,done:!0}}return f.prototype=_.constructor=g,g.constructor=f,g[s]=f.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},x(k.prototype),k.prototype[o]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,a){var i=new k(c(e,n,r,a));return t.isGeneratorFunction(n)?i:i.next().then(function(t){return t.done?t.value:i.next()})},x(_),_[s]="Generator",_[i]=function(){return this},_.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return s.type="throw",s.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;O(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}),n=Object.freeze({default:e,__moduleExports:e}),r=n&&e||n;var a=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}},i=Object.freeze({default:a,__moduleExports:a});var o=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)},s=Object.freeze({default:o,__moduleExports:o});var c=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")},l=Object.freeze({default:c,__moduleExports:c}),u=i&&a||i,d=s&&o||s,h=l&&c||l;var p=function(t){return u(t)||d(t)||h()};var m=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};function y(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}var f=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,a){var i=t.apply(e,n);function o(t){y(i,r,a,o,s,"next",t)}function s(t){y(i,r,a,o,s,"throw",t)}o(void 0)})}};var g=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var v=function(t,e,n){return e&&b(t.prototype,e),n&&b(t,n),t},w=t(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(r){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(r)}t.exports=n}),_=Object.freeze({default:w,__moduleExports:w});var x=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},k=Object.freeze({default:x,__moduleExports:x}),E=_&&w||_,S=k&&x||k;var O=function(t,e){return!e||"object"!==E(e)&&"function"!=typeof e?S(t):e},C=t(function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e}),T=t(function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}),L=Object.freeze({default:T,__moduleExports:T}),P=L&&T||L;var R=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&P(t,e)};var I=function(t,e){if(null==t)return{};var n,r,a={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(a[n]=t[n]);return a},A=Object.freeze({default:I,__moduleExports:I}),j=A&&I||A;var N=function(t,e){if(null==t)return{};var n,r,a=j(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a};var B=function(t){if(Array.isArray(t))return t},W=Object.freeze({default:B,__moduleExports:B});var D=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")},z=Object.freeze({default:D,__moduleExports:D}),q=W&&B||W,M=z&&D||z;var V=function(t){return q(t)||d(t)||M()},G="Recurrence",Y="Récurrence",H="Recurrencia",F="Wiederholung",J={en:"".concat(G," of the display"),fr:"".concat(Y," de l'affichage"),es:"".concat(H," de visualización"),de:"".concat(F," der Anzeige")},K={en:"".concat(G," after closure"),fr:"".concat(Y," après fermeture"),es:"".concat(H," tras el cierre"),de:"".concat(F," nach Schließung")},U={en:"".concat(G," after validation"),fr:"".concat(Y," après validation"),es:"".concat(H," tras la validación"),de:"".concat(F," nach der Validierung")},Z={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},$="abtasty_resetActionTracking",Q="remove",X="rebuild";function tt(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n}function et(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tt(n,!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tt(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var nt,rt={category:"conditions",type:"select",options:[{label:{en:"Every time",fr:"Tout le temps",es:"Todo el tiempo",de:"Jedes Mal"},value:"-1"},{label:{en:"Every session",fr:"Chaque session",es:"A cada sesión",de:"Jede Session"},value:"0"},{label:{en:"Everyday",fr:"Chaque jour",es:"Cada día",de:"Jeden Tag"},value:"1"},{label:{en:"Every week",fr:"Chaque semaine",es:"Cada semana",de:"Jede Woche"},value:"7"},{label:{en:"Every month",fr:"Chaque mois",es:"Cada mes",de:"Jeden Monat"},value:"30"},{label:{en:"Once per user (no recurrence)",fr:"Une fois par visiteur (pas de récurrence)",es:"Una vez por usuario (sin recurrencia)",de:"Einmal pro User (keine Wiederholung)"},value:"365"}],value:"-1"},at=(et({},rt,{label:K,propName:"closingRecurrence"}),et({},rt,{label:J,propName:"displayRecurrence"}),et({},rt,{label:U,propName:"validationRecurrence"}),[{label:{en:"Page load",fr:"Au chargement de la page",es:"Al cargar la página",de:"Beim Laden der Seite"},value:"pageLoad"},{label:{en:"Click",fr:"Au clic",es:"Al hacer clic",de:"Klick"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet",es:"Antes de cerrar la pestaña",de:"Exit Intent"},value:"exitIntent"},{label:{en:"Delay",fr:"Après un délai",es:"Tras un retraso",de:"Verzögert"},value:"delay"},{label:{en:"Reengage (after inactivity)",fr:"Au réengagement (après inactivité)",es:"En la reactivación (tras un periodo de inactividad)",de:"Nach Inaktivität"},value:"reengage"}]),it={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:Z,placeholder:{en:"Select an element in the webpage",fr:"Sélectionner un élément dans la page",es:"Selecciona un elemento en la página web",de:"Wählen Sie ein Element auf der Webseite aus"},conditions:[{field:"triggerEvent",value:"click"}]},ot={category:"conditions",type:"number",propName:"".concat("triggerEvent","ExitDelay"),label:{en:"Delay after exit intent",fr:"Délai après intention de sortie",es:"Retraso después de la intención de salida",de:"Verzögerung nach Ausstiegsabsicht"},min:0,max:120,value:0,conditions:[{field:"triggerEvent",value:"exitIntent"}]},st={category:"conditions",type:"number",propName:"".concat("triggerEvent","ReengageDelay"),label:{en:"Idle timeout before posting",fr:"Délai d'inactivité avant l'affichage",es:"Tiempo de espera inactivo antes de publicar",de:"Zeitüberschreitung vor dem Posten"},min:1,max:120,value:10,conditions:[{field:"triggerEvent",value:"reengage"}]},ct={category:"conditions",type:"number",propName:"".concat("triggerEvent","Delay"),label:{en:"Trigger event delay (in seconds)",fr:"Délai avant l'affichage (en secondes)",es:"Retraso antes de publicar",de:"Verzögerung vor dem Posten"},value:10,conditions:[{field:"triggerEvent",value:"delay"}]},lt=([{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:at,propName:"triggerEvent",value:"pageLoad"}].concat(p([it,ot,st,ct])),function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")}),ut=((nt="undefined"!=typeof global?global:window).ABTasty||Object.assign(nt,{ABTasty:{widgetutils:{}}}),nt.ABTasty.widgetutils||Object.assign(nt.ABTasty,{widgetutils:{}}),nt).ABTasty.widgetutils;function dt(t,e){return ut.hasOwnProperty(t)||Object.assign(ut,m({},t,new e)),ut[t]}var ht=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},pt=function(){return"".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID)},mt=function(){if(lt())return!1;var t=DATA;return{displayRecurrence:t.displayRecurrence,closingRecurrence:t.closingRecurrence,validationRecurrence:t.validationRecurrence}},yt=function(){if(lt())return!1;var t,e=DATA,n=e.triggerEvent,r=e.triggerEventClick,a=e.triggerEventExitDelay,i=e.triggerEventDelay,o=e.triggerEventReengageDelay,s=r;switch(n){case"exitIntent":t=a;break;case"delay":t=i;break;case"reengage":t=o;break;default:t=0}return{triggerEvent:n,triggerSelector:s,triggerDelay:t}};function ft(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||(t="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=IntersectionObserver",new Promise(function(e,n){var r=window.document.getElementsByTagName("script")[0],a=window.document.createElement("script");a.src=t,r.parentNode.insertBefore(a,r),a.onload=e,a.onerror=n}));var t}function gt(t){return function(){return f(r.mark(function t(e){return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e,t.next="IntersectionObserver"===t.t0?3:6;break;case 3:return t.next=5,ft();case 5:return t.abrupt("return",t.sent);case 6:return t.abrupt("return",!0);case 7:case"end":return t.stop()}},t)})).apply(this,arguments)}.apply(this,arguments)}var bt=function(){function t(){g(this,t),this.uniqueId=pt(),this.widgetName=ht(),this.recurrenceParams=mt(),this.triggerParams=yt(),this.recurrence=!!this.recurrenceParams&&new _t(this.recurrenceParams,this.clearGivenClearables.bind(this)),this.trigger=!!this.triggerParams&&new Et(this.triggerParams),this.pageWatcher=new St(this.recurrence,this.isWidgetApplied.bind(this),this.onPageChange.bind(this)),this.basicClassName="ab_widget_container_".concat(this.widgetName),this.widgetContainerId="".concat(this.basicClassName,"_").concat(this.uniqueId),this.contentClassName="".concat(this.basicClassName,"_content"),this.overlayClassName="".concat(this.basicClassName,"_overlay"),this.closeButtonClassName="".concat(this.basicClassName,"_close_button"),this.hideClassName="ab_hide_".concat(this.uniqueId),this.domElement=this.getDom(),this.hasBeenShown=!1,this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[]}return v(t,[{key:"clearGivenClearables",value:function(){this.eventsListeners.length&&(this.eventsListeners.forEach(function(t){var e;return(e=document).removeEventListener.apply(e,p(t))}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(function(t){return clearTimeout(t)}),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(function(t){return clearInterval(t)}),this.intervals=[]),this.observers.length&&(this.observers.forEach(function(t){return t.disconnect()}),this.observers=[]),this.promises.length&&(this.promises.forEach(function(t){return t.resolve(!1)}),this.promises=[])}},{key:"isWidgetApplied",value:function(){return this.domElement&&!!this.domElement.closest("body")}},{key:"insert",value:function(){var t=this;return Ct("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),Ct("body",function(e){return e.appendChild(t.domElement)},function(t){return console.error(t)}),this}},{key:"remove",value:function(){return this.domElement&&this.domElement.closest("html")&&this.domElement.remove(),this.styleElement&&this.styleElement.closest("html")&&this.styleElement.remove(),this}},{key:"show",value:function(){return this.domElement.classList.remove(this.hideClassName),this.recurrence&&this.recurrence.setDisplayRecurrence(),this.hasBeenShown=!0,lt()||this.pageWatcher.watch(),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var t=f(r.mark(function t(){var e;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.recurrence&&this.recurrence.isOver(),!this.recurrence||e){t.next=4;break}return this.pageWatcher.watch(),t.abrupt("return",!1);case 4:if(lt()||this.pageWatcher.watch(),t.t0=lt()||!this.trigger,t.t0){t.next=13;break}if(t.t1=this.trigger,!t.t1){t.next=12;break}return t.next=11,this.trigger.isTriggered();case 11:t.t1=t.sent;case 12:t.t0=t.t1;case 13:if(t.t0){t.next=16;break}return t.abrupt("return",!1);case 16:return this.insert(),this.addCloseEvent(),t.abrupt("return",this);case 19:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onPageChange",value:function(t){var e=this;switch(t){case Q:this.hasBeenShown?this.remove():this.trigger.clear()&&this.pageWatcher.watch();break;case X:this.hasBeenShown?this.insert().show():e.init().then(function(t){return t&&e.show()})}}},{key:"addCloseEvent",value:function(){for(var t=this,e=this.domElement.querySelectorAll("\n\t\t\t.".concat(this.overlayClassName,",\n\t\t\t.").concat(this.closeButtonClassName,"\n\t\t")),n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return r.push.apply(r,p(e)),r.forEach(function(e){e.addEventListener("click",function(){t.recurrence&&t.recurrence.setClosingRecurrence(),t.hide()},{passive:!0,once:!0})}),this}},{key:"getDom",value:function(){var t=document.createElement("div");return t.className="".concat(this.basicClassName," ").concat(this.hideClassName),t.id=this.widgetContainerId,t.innerHTML='\n\t\t\t<div class="'.concat(this.overlayClassName,'"></div>\n\t\t\t<div class="').concat(this.contentClassName,'">\n\t\t\t\t<button class="').concat(this.closeButtonClassName,'" ').concat(lt()?"data-abtasty-actionnable":"",">+</button>\n\t\t\t</div>"),t}},{key:"getStyleTag",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=document.createElement("style");return e.type="text/css",lt()&&e.setAttribute("abtasty-script-added","true"),e.textContent="\n\t\t\t.".concat(this.hideClassName," {opacity: 0 !important; pointer-events: none;}\n\t\t\t").concat(t),e}}]),t}();(function(t){function e(){var t;return g(this,e),(t=O(this,C(e).call(this))).stringStyles=t.getStyles(),t.styleElement=t.getStyleTag(t.stringStyles),t}R(e,bt),v(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tposition: absolute;\n\t\t\tz-index: -1;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground-color: black;\n\t\t\topacity: 0.6;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.contentClassName," {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}\n\t\t\n\t\t@media screen and (max-width: 550px) and (orientation: portrait) {\n\t\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\t\tfont-size: 6vmin;\n\t\t\t}\n\t\t}")}}])})(),function(t){function e(t){var n;return g(this,e),(n=O(this,C(e).call(this))).position=t,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}R(e,bt),v(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\t").concat(this.position,": 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}])}(),function(t){function e(t,n){var r;return g(this,e),(r=O(this,C(e).call(this))).position=t,r.referrerElement=n,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}R(e,bt),v(e,[{key:"insert",value:function(){var t=this;return Ct("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),Ct(this.referrerElement,function(e){return e.insertAdjacentElement(t.position,t.domElement)},function(t){return console.error(t)}),this}},{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tposition: relative;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}])}();function vt(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n}function wt(t){var e=function(t,e){if("object"!==w(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===w(e)?e:String(e)}var _t=function(){function t(e,n){var r=e.displayRecurrence,a=e.closingRecurrence,i=e.validationRecurrence;g(this,t),this.displayRecurrence=parseFloat(r),this.closingRecurrence=parseFloat(a),this.validationRecurrence=parseFloat(i),this.onSetCallback=n,this.widgetName=ht(),this.uniqueId=pt(),this.recurrenceKey="".concat(this.widgetName,"_").concat(this.uniqueId)}return v(t,[{key:"getGivenRecurrenceStorageParsed",value:function(t){try{var e=t.getItem("ABTastyWidgets");return JSON.parse(e)}catch(e){return t.removeItem("ABTastyWidgets"),!1}}},{key:"getSessionRecurrenceStorageParsed",value:function(){return this.getGivenRecurrenceStorageParsed(window.sessionStorage)}},{key:"getLocalRecurrenceStorageParsed",value:function(){return this.getGivenRecurrenceStorageParsed(window.localStorage)}},{key:"removeGivenStorage",value:function(t,e){var n=this.recurrenceKey,r=(e[n],N(e,[n].map(wt)));return Object.entries(r).length?(t.setItem("ABTastyWidgets",JSON.stringify(r)),r):(t.removeItem("ABTastyWidgets"),!1)}},{key:"removeSessionRecurrenceStorage",value:function(){var t=this.getSessionRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.sessionStorage,t)}},{key:"removeLocalRecurrenceStorage",value:function(){var t=this.getLocalRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.localStorage,t)}},{key:"getSessionRecurrence",value:function(){var t=this.getSessionRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}},{key:"getLocalRecurrence",value:function(){var t=this.getLocalRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}},{key:"getCurrentRecurrence",value:function(){var t=this.getSessionRecurrence(),e=this.getLocalRecurrence();return t||e||{type:!1}}},{key:"isOver",value:function(){var t=this.getLocalRecurrence(),e=(t?parseFloat(t.stamp):0)<(new Date).getTime();return e&&this.removeLocalRecurrenceStorage(),e&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(t,e){var n=this,r=this.getTypeOfStorage(t);if(!r&&"object"!==w(r))return!1;var a=this.getTypeOfStorage(t),i=a.storageString,o=a.storageMethod,s=this.getStamp(t),c={type:e,stamp:s},l=this.getCurrentRecurrence().type,u=function(){var t,e=n.getSessionRecurrence(),r=n.getLocalRecurrence();"session"===i?e?t=n.removeSessionRecurrenceStorage():(n.removeLocalRecurrenceStorage(),t=n.getSessionRecurrenceStorageParsed()):"local"===i&&(r?t=n.removeLocalRecurrenceStorage():(n.removeSessionRecurrenceStorage(),t=n.getLocalRecurrenceStorageParsed()));var a=t?function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vt(n,!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vt(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}(m({},n.recurrenceKey,c),t):m({},n.recurrenceKey,c);o.setItem("ABTastyWidgets",JSON.stringify(a)),n.onSetCallback&&"function"==typeof n.onSetCallback&&n.onSetCallback()};if(!o)return!1;if(l&&"validation"!==e)if("closing"===e&&"validation"!==l)u();else{if("display"!==e||"validation"===l||"closing"===l)return!1;u()}else u();return s}},{key:"setDisplayRecurrence",value:function(){this.setRecurrence(this.displayRecurrence,"display")}},{key:"setClosingRecurrence",value:function(){this.setRecurrence(this.closingRecurrence,"closing")}},{key:"setValidationRecurrence",value:function(){this.setRecurrence(this.validationRecurrence,"validation")}},{key:"getStamp",value:function(t){return(new Date).getTime()+864e5*t}},{key:"getTypeOfStorage",value:function(t){return!(isNaN(t)||t<0||0!==t&&!t)&&(t>0?{storageString:"local",storageMethod:window.localStorage}:0===t&&{storageString:"session",storageMethod:window.sessionStorage})}}]),t}(),xt=function(){function t(){g(this,t),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return v(t,[{key:"intersectionHandler",value:function(t){var e=this;t.forEach(function(t){t.isIntersecting?(e.existingTargets=e.existingTargets.filter(function(n){return n.element!==t.target||(e.inViewPortTargets.push(n),!1)}),e.checkElements()):e.inViewPortTargets=e.inViewPortTargets.filter(function(n){return n.element!==t.target||(e.existingTargets.push(n),!1)})})}},{key:"startVisibilityObserver",value:function(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:.5})}},{key:"startMutationObserver",value:function(){var t=new MutationObserver(this.checkElements.bind(this));return t.observe(document,{attributes:!0,childList:!0,subtree:!0}),t}},{key:"isElementVisible",value:function(t){return this.isElementTopmost(t)&&this.isElementOpaque(t)}},{key:"isElementOpaque",value:function(t){return"HTML"===function t(e,n){return n(e)||!e.parentElement?e:t(e.parentElement,n)}(t,function(t){return"0"===window.getComputedStyle(t).opacity}).nodeName}},{key:"isElementTopmost",value:function(t){for(var e=t.getBoundingClientRect(),n=[[e.left,e.top],[e.right,e.top],[e.left,e.bottom],[e.right,e.bottom]],r=!1,a=0;!r&&a<n.length;){var i,o=(i=document).elementFromPoint.apply(i,p(n[a]));r=t===o||t.contains(o),a++}return r}},{key:"checkElements",value:function(){var t=this;this.targets=this.targets.filter(function(e){var n=document.querySelector(e.selector);return!n||(t.existingTargets.push(Object.assign(e,{element:n})),t.visibilityobserver.observe(n),!1)}),this.existingTargets=this.existingTargets.filter(function(e){return!!document.querySelector(e.selector)||(t.visibilityobserver.unobserve(e.element),t.targets.push(e),!1)}),this.inViewPortTargets=this.inViewPortTargets.filter(function(e){var n=e.element,r=e.resolve;return!t.isElementVisible(n)||(t.visibilityobserver.unobserve(n),r(n),!1)})}},{key:"watch",value:function(t,e){this.targets.push({selector:t,resolve:e})}},{key:"clear",value:function(t){var e=this.targets.filter(function(e){return e.selector!==t});0===e.length&&(this.existingTargets=[],this.inViewPortTargets=[],this.mutationobserver.disconnect(),this.visibilityobserver.unobserve(t)),this.targets.length>e&&(this.targets=e,this.visibilityobserver.unobserve(t))}}]),t}(),kt=function(){var t={promise:null,resolve:null,reject:null};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t},Et=function(){function t(e){var n=e.triggerEvent,r=e.triggerSelector,a=e.triggerDelay;g(this,t),this.event=n,this.selector=r&&r.length?r:"body",this.delay=a,this.elementsSelectors=[],this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[],this.visibilityObservers=[]}return v(t,[{key:"onElementVisible",value:function(){var t=f(r.mark(function t(){var e,n,a,i;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=kt(),this.promises.push(e),t.next=4,this.onPageLoad();case 4:return n=t.sent,t.next=7,gt("IntersectionObserver");case 7:return a=t.sent,i=dt("VisibilityObserver",xt),this.visibilityObservers.push(i),a&&n&&i.watch(this.selector,e.resolve),t.abrupt("return",e.promise);case 12:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onPageLoad",value:function(){var t=this,e=kt();this.promises.push(e);var n=function(){return"complete"===document.readyState};if(n())e.resolve(!0);else{var r,a=setTimeout(function(){return t.clear()},15e3),i=["readystatechange",function(){return n()&&!clearTimeout(a)&&e.resolve(!0)},{passive:!0}];this.timeouts.push(a),this.eventsListeners.push(i),(r=document).addEventListener.apply(r,i)}return e.promise}},{key:"onClick",value:function(){var t,e=this,n=document.createElement("style");n.type="text/css",n.id="Click_".concat(pt()),n.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(n),this.elementsSelectors.push("#".concat(n.id));var r=kt();this.promises.push(r);var a=["click",function(t){return!!function(t){return p(document.querySelectorAll(e.selector)).some(function(n){return n.isSameNode(t)||!!t.closest(e.selector)})}(t.target)&&(r.resolve(!0),e.clear())},{passive:!0,capture:!0}];return this.eventsListeners.push(a),(t=document).addEventListener.apply(t,a),r.promise}},{key:"onExitIntent",value:function(){var t=f(r.mark(function t(){var e,n,a=this;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=kt(),this.promises.push(e),n=["mouseleave",function(){var t=f(r.mark(function t(){var n,i;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!a.delay){t.next=6;break}n=1e3*a.delay,i=setTimeout(function(){e.resolve(!0),a.clear()},n),a.timeouts.push(i),t.next=9;break;case 6:return e.resolve(!0),a.clear(),t.abrupt("return");case 9:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),{passive:!0,once:!0}],t.next=6,this.onPageLoad();case 6:return t.sent?Ct("body",function(t){t.addEventListener.apply(t,n),a.eventsListeners.push([t].concat(n))}):e.resolve(!1),t.abrupt("return",e.promise);case 9:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onDelay",value:function(){var t=f(r.mark(function t(){var e,n,a,i=this;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=kt(),this.promises.push(e),n=1e3*this.delay,t.next=5,this.onPageLoad();case 5:return t.sent&&(a=setTimeout(function(){e.resolve(!0),i.clear()},n),this.timeouts.push(a)),t.abrupt("return",e.promise);case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onReengage",value:function(){var t=this,e=kt();this.promises.push(e);var n=1e3*this.delay,r=n,a=[function(){return r=n},{passive:!0}];["click","mousemove","scroll","keypress"].forEach(function(e){var n;(n=document).addEventListener.apply(n,[e].concat(a)),t.eventsListeners.push([e].concat(a))});var i=setInterval(function(){r<=0?(e.resolve(!0),t.clear()):r-=100},100);return this.intervals.push(i),e.promise}},{key:"clear",value:function(){var t=this;return this.elementsSelectors.length&&(this.elementsSelectors.forEach(function(t){document.querySelector(t)&&document.querySelector(t).remove()}),this.elementsSelectors=[]),this.eventsListeners.length&&(this.eventsListeners.forEach(function(t){var e="string"==typeof t[0]?[document].concat(p(t)):t,n=V(e),r=n[0],a=n.slice(1);r&&a.length>1&&r.removeEventListener.apply(r,p(a))}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(function(t){return clearTimeout(t)}),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(function(t){return clearInterval(t)}),this.intervals=[]),this.observers.length&&(this.observers.forEach(function(t){return t.disconnect()}),this.observers=[]),this.visibilityObservers.length&&(this.visibilityObservers.forEach(function(e){return e.clear(t.selector)}),this.visibilityObservers=[]),this.promises.length&&(this.promises.forEach(function(t){return t.resolve(!1)}),this.promises=[]),this}},{key:"isTriggered",value:function(){var t=f(r.mark(function t(){var e;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.clear(),t.t0=this.event,t.next="pageLoad"===t.t0?4:"click"===t.t0?8:"exitIntent"===t.t0?12:"delay"===t.t0?16:"reengage"===t.t0?20:"elementVisible"===t.t0?24:28;break;case 4:return t.next=6,this.onPageLoad();case 6:return e=t.sent,t.abrupt("break",29);case 8:return t.next=10,this.onClick();case 10:return e=t.sent,t.abrupt("break",29);case 12:return t.next=14,this.onExitIntent();case 14:return e=t.sent,t.abrupt("break",29);case 16:return t.next=18,this.onDelay();case 18:return e=t.sent,t.abrupt("break",29);case 20:return t.next=22,this.onReengage();case 22:return e=t.sent,t.abrupt("break",29);case 24:return t.next=26,this.onElementVisible();case 26:return e=t.sent,t.abrupt("break",29);case 28:e=!1;case 29:return t.abrupt("return",e);case 30:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}();var St=function(){function t(e,n,r){g(this,t),this.recurrence=e,this.isWidgetApplied=n,this.callback=r,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.eventListenerParams=[$,this.eventHandler.bind(this),{passive:!0}]}return v(t,[{key:"recurrenceIsDone",value:function(){return!this.recurrence||this.recurrence.isOver()}},{key:"decisionHandler",value:function(t){var e=this,n=!!window.ABTasty.getTestsOnPage()[TEST_ID],r=(this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1}).type,a=function(){return t&&"display"===r||e.recurrenceIsDone()};return!this.isWidgetApplied()&&n&&a()?(this.clearWatcher(),this.callback(X)):(!this.isWidgetApplied()||n&&a())&&(this.isWidgetApplied()||n)||(this.clearWatcher(),this.callback(Q),this.watch()),this}},{key:"eventHandler",value:function(){var t=this;return setTimeout(function(){t.decisionHandler(!1)},250),this}},{key:"observerHandler",value:function(t){var e=t.some(function(t){var e=t.removedNodes;return e&&e.length}),n=t.some(function(t){var e=t.addedNodes;return e&&e.length});return e||n?(this.decisionHandler(!0),this):this}},{key:"watch",value:function(){var t,e=this;return this.clearWatcher(),(t=document).addEventListener.apply(t,p(this.eventListenerParams)),Ct("body",function(t){var n,r=[t,{childList:!0,subtree:!0}];(n=e.observer).observe.apply(n,r)}),this}},{key:"clearWatcher",value:function(){var t;return(t=document).removeEventListener.apply(t,p(this.eventListenerParams)),this.observer.disconnect(),this}}]),t}(),Ot=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(t=console).log.apply(t,n)},Ct=function(t,e,n){var r,a=0;try{document.querySelector(t)}catch(e){var i="Selector «".concat(t,"» not valid.");return Ot(i),"function"==typeof n&&n(i)}r=setTimeout(function(){clearInterval(a);var e="Can't find element «".concat(t,"».");return Ot(e),"function"==typeof n&&n(e)},1e4),a=setInterval(function(){var n=document.querySelector(t);if(null!==n)return clearTimeout(r),clearInterval(a),"function"==typeof e&&e(n)},200)};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}("abtasty-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483145}abtasty-modal:not(.abtasty-modal--video){overflow-y:auto}abtasty-modal__underlay{width:100%;height:100%;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.5);cursor:pointer}.abtasty-modal__area{top:0;left:0;right:0;width:auto;margin:10px!important;z-index:100;position:relative;float:none}.abtasty-modal__area-layout--imageOnly{max-width:80%}.abtasty-modal__area-layout--imageOnly img{border-style:solid;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;opacity:1}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__content{padding:5px;border-radius:0!important;border-width:0!important;background-color:transparent!important;background-image:none!important}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__content{padding:25px 20px 20px}.abtasty-modal .abtasty-modal__content{border-color:#f6f6f6;border-style:solid;padding:20px}.abtasty-modal__area-type--image,.abtasty-modal__area-type--no-title,.abtasty-modal__area-type--simple,.abtasty-modal__area-type--video{margin:0 auto 20px!important;top:10vh;border:none;background:none}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__close--inside{top:2px}.abtasty-modal__area-type--video.abtasty-modal__area-layout--top .abtasty-modal__close--inside{right:15px;top:20px}.abtasty-modal__area-type--image .abtasty-modal__close,.abtasty-modal__area-type--simple .abtasty-modal__close{right:10px;top:15px}.abtasty-modal__close{position:absolute;right:5px;top:0;font-size:20px;font-weight:300;background:transparent;border:0;color:#222;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;line-height:24px!important;margin-right:5px;cursor:pointer;width:20px;height:20px;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__close svg{display:block}.abtasty-modal__close svg .close-x{stroke:#5c5c5c;fill:transparent;stroke-linecap:round;stroke-width:3}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__close--inside{top:-6px;right:-15px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__area-type--image .abtasty-modal__close--outside,.abtasty-modal__area-type--simple .abtasty-modal__close--outside,.abtasty-modal__close .abtasty-modal__close--outside{top:-25px;right:0;width:20px;height:20px}.abtasty-modal__close--outside{top:-25px;right:-25px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__media,.abtasty-modal__media-link{max-width:100%;display:block}.abtasty-modal__text{padding:20px;font-family:Open Sans,sans-serif!important;color:#000;overflow:auto}.abtasty-modal__title{width:auto;font-size:20px!important;font-weight:500;line-height:1.1;margin-bottom:10px}.abtasty-modal__text p{margin:0 0 10px!important;font-size:15px;font-weight:300;word-wrap:break-word}.abtasty-modal__button{width:100%;text-align:center;margin-top:20px}.abtasty-modal__button a{padding:10px 20px;border-radius:10px;display:inline-block;font-weight:700}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__title{text-align:center}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__innertext{text-align:center;white-space:pre-wrap}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--image .abtasty-modal__image img{max-height:400px;max-width:100%;display:inline;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image img{max-height:300px;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--video{text-align:center;width:100%}.abtasty-modal__area-type--video iframe{width:100%}@media (min-width:630px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--medium{width:600px;margin:0 auto 20px!important}.abtasty-modal--video{width:50%;left:25%}}@media (min-width:330px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--small{width:300px;margin:0 auto 20px!important}}@media (min-width:930px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--large{width:900px;margin:0 auto 20px!important}}.abtasty-animation-fadeIn{-webkit-animation-name:a;animation-name:a}.abtasty-animation-fadeIn,.abtasty-animation-fadeOut{-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-fadeOut{-webkit-animation-name:b;animation-name:b}.abtasty-animation-slideIn{-webkit-animation-name:c;animation-name:c;-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-slideOut{-webkit-animation-name:d;animation-name:d;-webkit-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes a{0%{opacity:0}to{opacity:1}}@keyframes a{0%{opacity:0}to{opacity:1}}@-webkit-keyframes b{0%{opacity:1}to{opacity:0}}@keyframes b{0%{opacity:1}to{opacity:0}}@-webkit-keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes c{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes d{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}");var Tt=function(t){var e=Object.prototype.hasOwnProperty;function n(t,r){return Array.isArray(t)?function(t,e){for(var r,a="",i="",s=Array.isArray(e),c=0;c<t.length;c++)(r=n(t[c]))&&(s&&e[c]&&(r=o(r)),a=a+i+r,i=" ");return a}(t,r):t&&"object"==typeof t?function(t){var n="",r="";for(var a in t)a&&t[a]&&e.call(t,a)&&(n=n+r+a,r=" ");return n}(t):t||""}function r(t){if(!t)return"";if("object"==typeof t){var n="";for(var r in t)e.call(t,r)&&(n=n+r+":"+t[r]+";");return n}return";"!==(t+="")[t.length-1]?t+";":t}function a(t,e,n,r){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(r?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),n||-1===e.indexOf('"'))?(n&&(e=o(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"&#39;")+"'"):""}t.merge=function t(e,n){if(1===arguments.length){for(var a=e[0],i=1;i<e.length;i++)a=t(a,e[i]);return a}for(var o in n)if("class"===o){var s=e[o]||[];e[o]=(Array.isArray(s)?s:[s]).concat(n[o]||[])}else if("style"===o){var s=r(e[o]),c=r(n[o]);e[o]=s+c}else e[o]=n[o];return e},t.classes=n,t.style=r,t.attr=a,t.attrs=function(t,i){var o="";for(var s in t)if(e.call(t,s)){var c=t[s];if("class"===s){c=n(c),o=a(s,c,!1,i)+o;continue}"style"===s&&(c=r(c)),o+=a(s,c,!1,i)}return o};var i=/["&<>]/;function o(t){var e=""+t,n=i.exec(e);if(!n)return t;var r,a,o,s="";for(r=n.index,a=0;r<e.length;r++){switch(e.charCodeAt(r)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}a!==r&&(s+=e.substring(a,r)),a=r+1,s+=o}return a!==r?s+e.substring(a,r):s}return t.escape=o,t.rethrow=function t(e,n,r,a){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&n||a))throw e.message+=" on line "+r,e;try{a=a||require("fs").readFileSync(n,"utf8")}catch(n){t(e,null,r)}var i=3,o=a.split("\n"),s=Math.max(r-i,0),c=Math.min(o.length,r+i);var i=o.slice(s,c).map(function(t,e){var n=e+s+1;return(n==r?" > ":" ")+n+"| "+t}).join("\n");e.path=n;e.message=(n||"Pug")+":"+r+"\n"+i+"\n\n"+e.message;throw e},t}({});var Lt,Pt,Rt,It,At,jt=DATA,Nt=jt.type,Bt=jt.animation,Wt=jt.backgroundColor,Dt=jt.overlayOpacity,zt=jt.backgroundImage,qt=jt.borderRadius,Mt=jt.borderRadiusImage,Vt=jt.borderWidth,Gt=jt.borderColor,Yt=jt.button,Ht=jt.buttonBackgroundColor,Ft=jt.buttonLink,Jt=jt.buttonText,Kt=jt.buttonTextColor,Ut=jt.backgroundCloseButtonColor,Zt=jt.closeButtonColor,$t=jt.closeButtonPosition,Qt=jt.content,Xt=jt.customWidth,te=jt.title,ee=jt.layout,ne=jt.videoLink,re=jt.widthImageWithText,ae=jt.widthImageOnly,ie=jt.autoPlay,oe=0,se=Nt.replace(/^\w/,function(t){return t.toUpperCase()}),ce="imageOnly"===ee?ae:re,le=DATA.image||"https://widgets-images.abtasty.com/image-placeholder.png",ue="abtasty-modal__underlay",de=".abtasty-modal__close";function he(){return Lt&&Lt.closest("html")&&oe}function pe(){oe=0,Lt.style.display="none","video"===Nt&&(Lt.innerHTML=""),ABTastyEvent("".concat(se," modal closed"),null,TEST_ID)}function me(t,e,n,r){var a,i=[t,function(t){var a=t.target,o=p(document.querySelectorAll(e)).some(function(t){return t.isSameNode(a)||a.closest(e)});return o&&n(),o&&r&&function(t){var e;return(e=document).removeEventListener.apply(e,p(t))}(i)},!0];(a=document).addEventListener.apply(a,i)}function ye(){if(Rt.isOver())return"pageLoad"!==It.event?Ee():void _e()}function fe(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={layout:ee,type:Nt,borderRadius:qt,borderRadiusImage:Mt,borderWidth:Vt,borderColor:Gt,button:Yt,buttonBackgroundColor:Ht,buttonLink:Ft,buttonText:Jt,buttonTextColor:Kt,backgroundColor:"imageOnly"!==ee?Wt:"initial",overlayOpacity:Dt,backgroundImage:zt,image:le,width:ce,videoLink:ne,customWidth:Xt,animation:Bt,title:te,closeButtonPosition:$t,backgroundCloseButtonColor:Ut,modalContent:Qt||t.outerHTML};(Lt.className="abtasty-modal abtasty-modal--".concat(Nt),Lt.dataset.testId=TEST_ID,Lt.innerHTML=function(t){var e,n="",r={};try{var a={},i=t||{};(function(t,a,i,o,s,c,l,u,d,h,p,m,y,f,g,b,v,w,_,x,k,E){r.button=e=function(){this&&this.block,this&&this.attributes,n=(n=(n+='<div class="abtasty-modal__button">')+"<a"+Tt.attr("href",p,!0,!0)+' target="_self"'+Tt.attr("style",Tt.style({"background-color":h+"!important",color:y+"!important"}),!0,!0)+">")+Tt.escape(null==(e=m)?"":e)+"</a></div>"},r.title=e=function(){this&&this.block,this&&this.attributes,n=(n+='<h2 class="abtasty-modal__title" style="text-align:center;">')+(null==(e=x)?"":e)+"</h2>"},r.imageOnly=e=function(){this&&this.block,this&&this.attributes,n=n+"<img"+(Tt.attr("src",b,!0,!0)+Tt.attr("style",Tt.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":s+"!important"}),!0,!0))+">"},r.imageWithText=e=function(){this&&this.block,this&&this.attributes,n+='<div class="abtasty-modal__image">',b&&(n=n+"<img"+(Tt.attr("src",b,!0,!0)+Tt.attr("style",Tt.style({"border-radius":l+"px!important"}),!0,!0))+">"),n+="</div>"},r.content=e=function(){this&&this.block,this&&this.attributes,n+='<div class="abtasty-modal__innertext">',n=(n+="<p>")+(null==(e=w)?"":e)+"</p></div>"},r.closeButton=e=function(){this&&this.block,this&&this.attributes,n=n+"<div"+Tt.attr("class",Tt.classes(["abtasty-modal__close",f?"abtasty-modal__close--"+f:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+Tt.attr("style",Tt.style("outside"===f?{"background-color":a}:""),!0,!0)+">",n+='<svg viewbox="0 0 40 40">',n+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>'},r.contentWrapper=e=function(){var t=this&&this.block;this&&this.attributes,n=n+'<div class="abtasty-modal__content"'+Tt.attr("style",Tt.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":s+"!important","background-color":i+"!important","background-image":'url("'+o+'")!important'}),!0,!0)+">",t&&t&&t(),n+="</div>"},r.modalWrapper=e=function(){var e=this&&this.block;this&&this.attributes,n=(n=n+"<abtasty-modal__underlay"+Tt.attr("style",Tt.style({"background-color":"rgba(0, 0, 0, "+_/100+")"}),!0,!0)+"></abtasty-modal__underlay>")+"<div"+(Tt.attr("class",Tt.classes(["abtasty-animation-"+t+" abtasty-modal__area abtasty-modal__area-width--"+E+" abtasty-modal__area-type--"+k+" abtasty-modal__area-layout--"+v],[!0]),!1,!0)+Tt.attr("style",Tt.style({width:"custom"===E&&g+"%","margin-left":"custom"===E&&(100-g)/2+"% !important"}),!0,!0))+">",e&&e&&e(),n+="</div>"},r.modalWrapper.call({block:function(){r.closeButton(),"image"===k&&"imageOnly"===v?(r.imageOnly(),d&&r.button()):r.contentWrapper.call({block:function(){"simple"===k?(n+='<div class="abtasty-modal__text">',"center"===v||"left"===v?(r.title(),r.content(),n+='<div style="clear:both;"></div>'):(r.content(),r.title(),n+='<div style="clear:both;"></div>'),n+="</div>",d&&r.button()):"image"===k?("top"!==v&&"left"!==v||r.imageWithText(),n+='<div class="abtasty-modal__text">',r.title(),r.content(),d&&r.button(),n+="</div>","right"!==v&&"bottom"!==v||r.imageWithText(),n+='<div style="clear:both;"></div>'):"video"===k&&("top"===v&&r.title(),n+=null==(e=w)?"":e,"bottom"===v&&r.title(),d&&r.button())}})}})}).call(this,"animation"in i?i.animation:"undefined"!=typeof animation?animation:void 0,"backgroundCloseButtonColor"in i?i.backgroundCloseButtonColor:"undefined"!=typeof backgroundCloseButtonColor?backgroundCloseButtonColor:void 0,"backgroundColor"in i?i.backgroundColor:"undefined"!=typeof backgroundColor?backgroundColor:void 0,"backgroundImage"in i?i.backgroundImage:"undefined"!=typeof backgroundImage?backgroundImage:void 0,"borderColor"in i?i.borderColor:"undefined"!=typeof borderColor?borderColor:void 0,"borderRadius"in i?i.borderRadius:"undefined"!=typeof borderRadius?borderRadius:void 0,"borderRadiusImage"in i?i.borderRadiusImage:"undefined"!=typeof borderRadiusImage?borderRadiusImage:void 0,"borderWidth"in i?i.borderWidth:"undefined"!=typeof borderWidth?borderWidth:void 0,"button"in i?i.button:"undefined"!=typeof button?button:void 0,"buttonBackgroundColor"in i?i.buttonBackgroundColor:"undefined"!=typeof buttonBackgroundColor?buttonBackgroundColor:void 0,"buttonLink"in i?i.buttonLink:"undefined"!=typeof buttonLink?buttonLink:void 0,"buttonText"in i?i.buttonText:"undefined"!=typeof buttonText?buttonText:void 0,"buttonTextColor"in i?i.buttonTextColor:"undefined"!=typeof buttonTextColor?buttonTextColor:void 0,"closeButtonPosition"in i?i.closeButtonPosition:"undefined"!=typeof closeButtonPosition?closeButtonPosition:void 0,"customWidth"in i?i.customWidth:"undefined"!=typeof customWidth?customWidth:void 0,"image"in i?i.image:"undefined"!=typeof image?image:void 0,"layout"in i?i.layout:"undefined"!=typeof layout?layout:void 0,"modalContent"in i?i.modalContent:"undefined"!=typeof modalContent?modalContent:void 0,"overlayOpacity"in i?i.overlayOpacity:"undefined"!=typeof overlayOpacity?overlayOpacity:void 0,"title"in i?i.title:"undefined"!=typeof title?title:void 0,"type"in i?i.type:"undefined"!=typeof type?type:void 0,"width"in i?i.width:"undefined"!=typeof width?width:void 0)}catch(t){Tt.rethrow(t,void 0,void 0,a[void 0])}return n}(e),document.body.appendChild(Lt),Pt=Lt.querySelector(".abtasty-modal__area"),Zt)&&(Lt.querySelector("".concat(de," .close-x")).style.stroke=Zt);return new Promise(function(t){t(!0)})}function ge(t){var e,n=t.indexOf("youtu")>-1,r=t.indexOf("vimeo")>-1;if(n){var a=t.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2];e="//www.youtube.com/embed/".concat(a,"?rel=0"),ie&&(e+="&autoplay=1")}else if(r){var i=t.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2];e="//player.vimeo.com/video/".concat(i)}return e}function be(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function ve(){var t,e,n,a,i,o;return r.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t=Date.now(),e="abtasty-widget-video-".concat(t),(n=document.createElement("iframe")).setAttribute("id",e),a=ge(ne),i=be(),n.style.height="".concat(i,"px"),"no-title"===ee&&(n.style.border="".concat(Vt,"px solid ").concat(Gt,"!important"),n.style.borderRadius="".concat(qt,"px!important")),n.src=a,n.frameBorder=0,n.allowfullscreen=!0,s.next=13,r.awrap(fe(n));case 13:return o=s.sent,Pt.style.height="".concat(i,"px"),window.addEventListener("resize",function(){var t=document.querySelector("abtasty-modal iframe"),e=be();t.style.height="".concat(e,"px"),Pt.style.height="".concat(e,"px")}),s.abrupt("return",o&&new Promise(function(t){t(!0)}));case 17:case"end":return s.stop()}})}function we(t){switch(t){case Q:oe?Lt&&Lt.closest("html")&&(Lt.style.display="none",Lt.remove()):(It&&It.clear(),At&&At.watch());break;case X:oe?ke():Ee()}}function _e(){(At=At||new St(Rt,he,we)).watch()}function xe(){Lt.style.display="block",me("click","".concat(ue,", ").concat(de),function(){pe(),Rt.setClosingRecurrence(),setTimeout(ye,250)},!0),Yt&&Ft.length&&me("mouseup",".abtasty-modal__button",function(){pe(),Rt.setValidationRecurrence(),setTimeout(ye,250)},!0),lt()||(_e(),oe=1,Rt.setDisplayRecurrence())}function ke(){var t;return r.async(function(e){for(;;)switch(e.prev=e.next){case 0:if(Lt=Lt||document.createElement("abtasty-modal"),"video"!==Nt){e.next=8;break}return e.next=4,r.awrap(ve());case 4:e.sent&&xe(),e.next=19;break;case 8:if("image"!==Nt||"fit"!==ce){e.next=15;break}(t=new Image).src=le,t.className="abtasty-modal__media",t.onload=function(){return r.async(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.awrap(fe(this));case 2:t.sent&&xe(),Pt.style.width="".concat(this.width,"px"),Pt.style.height="".concat(this.height,"px");case 6:case"end":return t.stop()}},null,this)},e.next=19;break;case 15:return e.next=17,r.awrap(fe());case 17:e.sent&&xe();case 19:case"end":return e.stop()}})}function Ee(){var t;return r.async(function(e){for(;;)switch(e.prev=e.next){case 0:if((Rt=Rt||new _t(mt())).isOver()){e.next=4;break}return _e(),e.abrupt("return",!1);case 4:return _e(),It=It||new Et(yt()),e.next=8,r.awrap(It.isTriggered());case 8:return(t=e.sent)&&ke(),e.abrupt("return",t);case 11:case"end":return e.stop()}})}lt()?ke():Ee()}();
{
"name": "@abtasty/modal",
"description": "Widget for AB Tasty",
"version": "2.8.3-1",
"version": "2.8.3-2",
"form": "dist/form.js",

@@ -6,0 +6,0 @@ "main": "dist/main.js",

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