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

@abtasty/modal

Package Overview
Dependencies
Maintainers
22
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 to 2.8.4-0

2

dist/form.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.widgetForm=t()}(this,function(){"use strict";var e=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}};var t=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var r=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var n=function(n){return e(n)||t(n)||r()},o={backgroundGroup:{propName:"backgroundGroup",category:"style",type:"group",label:{en:"Background",fr:"Fond",es:"Fondo",de:"Hintergrund"},collapsible:!0,children:[{propName:"backgroundColor",type:"colorpicker",category:"style",label:{en:"Background color",fr:"Couleur d'arrière-plan"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"backgroundImage-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"backgroundImage",type:"mediaupload",category:"style",label:{en:"Background image",fr:"Image d'arrière-plan"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"overlay-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"overlayOpacity",type:"slider",category:"style",label:{en:"Overlay opacity",fr:"Opacité de l'overlay",es:"Opacidad de la capa",de:"Overlay Opacity"},value:"50",unit:"%"}]},borderGroup:{propName:"borderGroup",category:"style",type:"group",label:{en:"Border",fr:"Bordure"},collapsible:!0,children:[{propName:"borderWidth",category:"style",type:"slider",unit:"px",value:0,min:0,max:10,label:{en:"Border Thickness",fr:"Largeur de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadius-style-separator"},{propName:"borderRadius",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Border radius",fr:"Angle de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadiusImage-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"borderRadiusImage",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Image Border radius",fr:"Angle de la bordure de l'image"},conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"borderColor-style-separator"},{propName:"borderColor",category:"style",type:"colorpicker",label:{en:"Border color",fr:"Couleur de la bordure"},value:"rgba(0, 0, 0, 1)"}]},closeButtonGroup:{propName:"closeButtonGroup",category:"style",type:"group",label:{en:"Close button",fr:"Bouton de fermeture",es:"Botón cerrar",de:"Schließen-Button"},collapsible:!0,children:[{propName:"closeButtonPosition",category:"style",type:"radio",label:{en:"Close button position",fr:"Position du bouton de fermeture",es:"Posición del botón",de:"Button-Position"},value:"inside",options:[{label:{en:"Inside",fr:"À l'intérieur",es:"Dentro",de:"Innen"},value:"inside"},{label:{en:"Outside",fr:"À l'extérieur",es:"Fuera",de:"Außen"},value:"outside"}]},{category:"style",type:"short-separator",propName:"closeButtonColor-style-separator"},{propName:"closeButtonColor",type:"colorpicker",category:"style",label:{en:"Close button color",fr:"Couleur du bouton de fermeture",es:"Color del botón cerrar",de:"Button-Farbe"},value:"rgba(92, 92, 92, 1)"},{category:"style",type:"short-separator",propName:"closeBackgroundButtonColor-style-separator",conditions:[{field:"closeButtonPosition",value:"outside"}]},{propName:"backgroundCloseButtonColor",type:"colorpicker",category:"style",label:{en:"Background close button color",fr:"Couleur du fond du bouton de fermeture",es:"Background close button color",de:"Background close button color"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"closeButtonPosition",value:"outside"}]}]},dimensions:[{propName:"widthImageWithText",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"medium",options:[{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"},{label:{en:"Custom",fr:"Sur mesure"},value:"custom"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"widthImageOnly",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"fit",options:[{label:{en:"Fit to size",fr:"S'adapte à la taille",es:"Ajustar",de:"Angepasst"},value:"fit"},{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"===e}}]},{propName:"customWidth",type:"number",category:"style",label:{en:"Custom width (%)",fr:"Largeur sur mesure (%)"},value:50,conditions:[{field:"widthImageWithText",value:"custom"}]}],animations:[{category:"style",type:"separator",propName:"animation-separator"},{propName:"animation",type:"radio",category:"style",label:{en:"Animation",fr:"Animation",es:"Animación",de:"Animation"},value:"none",options:[{label:{en:"None",fr:"Aucune",es:"Ninguna",de:"Keine"},value:"none"},{label:{en:"Slide In",fr:"Slide In",es:"Deslizar",de:"Slide In"},value:"slideIn"},{label:{en:"Fade In",fr:"Fade In",es:"Disolver",de:"Fade In"},value:"fadeIn"}]}]};var i=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};function a(e,t){return e(t={exports:{}},t.exports),t.exports}var s=a(function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new C(n||[]);return i._invoke=function(e,t,r){var n=l;return function(o,i){if(n===d)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=u(e,t,r);if("normal"===c.type){if(n=r.done?h:p,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l="suspendedStart",p="suspendedYield",d="executing",h="completed",g={};function f(){}function y(){}function v(){}var m={};m[i]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==r&&n.call(w,i)&&(m=w);var k=v.prototype=f.prototype=Object.create(m);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function E(e){var t;this._invoke=function(r,o){function i(){return new Promise(function(t,i){!function t(r,o,i,a){var s=u(e[r],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(l).then(function(e){c.value=e,i(c)},function(e){return t("throw",e,i,a)})}a(s.arg)}(r,o,t,i)})}return t=t?t.then(i,i):i()}}function x(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=u(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function T(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:L}}function L(){return{value:t,done:!0}}return y.prototype=k.constructor=v,v.constructor=y,v[s]=y.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(E.prototype),E.prototype[a]=function(){return this},e.AsyncIterator=E,e.async=function(t,r,n,o){var i=new E(c(t,r,n,o));return e.isGeneratorFunction(r)?i:i.next().then(function(e){return e.done?e.value:i.next()})},S(k),k[s]="Generator",k[i]=function(){return this},k.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}});function c(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}var u=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,s,"next",e)}function s(e){c(i,n,o,a,s,"throw",e)}a(void 0)})}};var l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var d=function(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),e},h=a(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(n){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=r=function(e){return t(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},r(n)}e.exports=r});var g=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var f=function(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?g(e):t},y=a(function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(r)}e.exports=t}),v=a(function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(r,n)}e.exports=t});var m=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)};var b=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o};var w=function(e,t){if(null==e)return{};var r,n,o=b(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o};var k=function(e){if(Array.isArray(e))return e};var S=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var E=function(e){return k(e)||t(e)||S()},x={en:"Recurrence",fr:"Récurrence",es:"Recurrencia",de:"Wiederholung"},O={en:"".concat(x.en," of the display"),fr:"".concat(x.fr," de l'affichage"),es:"".concat(x.es," de visualización"),de:"".concat(x.de," der Anzeige")},N={en:"".concat(x.en," after closure"),fr:"".concat(x.fr," après fermeture"),es:"".concat(x.es," tras el cierre"),de:"".concat(x.de," nach Schließung")},C={en:"".concat(x.en," after validation"),fr:"".concat(x.fr," après validation"),es:"".concat(x.es," tras la validación"),de:"".concat(x.de," nach der Validierung")},T={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},L="abtasty_resetActionTracking";function P(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(r,!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var R,A={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"},B=I({},A,{label:N,propName:"closingRecurrence"}),j={category:"conditions",type:"group",label:x,collapsible:!0,children:[I({},A,{label:O,propName:"displayRecurrence"}),B,I({},A,{label:C,propName:"validationRecurrence"})]},D=[{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"}],_={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:T,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"}]},G={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"}]},W={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"}]},q={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"}]},V={category:"conditions",type:"group",label:T,collapsible:!0,children:[{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:D,propName:"triggerEvent",value:"pageLoad"}].concat(n([_,G,W,q]))},M=function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")},F=((R="undefined"!=typeof global?global:window).ABTasty||Object.assign(R,{ABTasty:{widgetutils:{}}}),R.ABTasty.widgetutils||Object.assign(R.ABTasty,{widgetutils:{}}),R).ABTasty.widgetutils;function z(e,t){return F.hasOwnProperty(e)||Object.assign(F,i({},e,new t)),F[e]}var H=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},K=function(){return"".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID)},U=function(){if(M())return!1;var e=DATA;return{displayRecurrence:e.displayRecurrence,closingRecurrence:e.closingRecurrence,validationRecurrence:e.validationRecurrence}},J=function(){if(M())return!1;var e,t=DATA,r=t.triggerEvent,n=t.triggerEventClick,o=t.triggerEventExitDelay,i=t.triggerEventDelay,a=t.triggerEventReengageDelay,s=n;switch(r){case"exitIntent":e=o;break;case"delay":e=i;break;case"reengage":e=a;break;default:e=0}return{triggerEvent:r,triggerSelector:s,triggerDelay:e}};function Y(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||(e="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=IntersectionObserver",new Promise(function(t,r){var n=window.document.getElementsByTagName("script")[0],o=window.document.createElement("script");o.src=e,n.parentNode.insertBefore(o,n),o.onload=t,o.onerror=r}));var e}function Z(e){return function(){return u(s.mark(function e(t){return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="IntersectionObserver"===e.t0?3:6;break;case 3:return e.next=5,Y();case 5:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",!0);case 7:case"end":return e.stop()}},e)})).apply(this,arguments)}.apply(this,arguments)}var Q=["pageLoad","delay","reengage"],X=function(){function e(){var t=this;l(this,e),this.uniqueId=K(),this.widgetName=H(),this.recurrenceParams=U(),this.triggerParams=J(),this.recurrence=!!this.recurrenceParams&&new te(this.recurrenceParams,this.clearGivenClearables.bind(this)),this.trigger=!!this.triggerParams&&new oe(this.triggerParams),this.pageWatcher=new ie(this.recurrence,this.isWidgetApplied.bind(this),this.onPageChange.bind(this)),this.hasOncePerPageTrigger=!!this.trigger&&Q.some(function(e){return e===t.trigger.event}),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.closedByUser=!1,this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[]}return d(e,[{key:"clearGivenClearables",value:function(){this.eventsListeners.length&&(this.eventsListeners.forEach(function(e){var t;return(t=document).removeEventListener.apply(t,n(e))}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(function(e){return clearTimeout(e)}),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(function(e){return clearInterval(e)}),this.intervals=[]),this.observers.length&&(this.observers.forEach(function(e){return e.disconnect()}),this.observers=[]),this.promises.length&&(this.promises.forEach(function(e){return e.resolve(!1)}),this.promises=[])}},{key:"isWidgetApplied",value:function(){return this.domElement&&!!this.domElement.closest("html")}},{key:"insert",value:function(){var e=this;return se("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),se("body",function(t){return t.appendChild(e.domElement)},function(e){return console.error(e)}),this}},{key:"remove",value:function(){var e=this;return this.pageWatcher.clearWatcher(),this.domElement&&this.domElement.closest("html")&&this.domElement.remove(),this.styleElement&&this.styleElement.closest("html")&&this.styleElement.remove(),this.hasOncePerPageTrigger?this.pageWatcher.watch():this.init().then(function(t){return t&&e.show()}),this}},{key:"show",value:function(){return this.closedByUser=!1,this.domElement.classList.remove(this.hideClassName),this.recurrence&&this.recurrence.setDisplayRecurrence(),this.hasBeenShown=!0,M()||this.pageWatcher.watch(),this}},{key:"hide",value:function(){return this.closedByUser=!0,this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var e=u(s.mark(function e(){var t;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.recurrence&&this.recurrence.isOver(),!this.recurrence||t){e.next=4;break}return this.pageWatcher.watch(),e.abrupt("return",!1);case 4:if(M()||this.pageWatcher.watch(),e.t0=M()||!this.trigger,e.t0){e.next=13;break}if(e.t1=this.trigger,!e.t1){e.next=12;break}return e.next=11,this.trigger.isTriggered();case 11:e.t1=e.sent;case 12:e.t0=e.t1;case 13:if(e.t0){e.next=16;break}return e.abrupt("return",!1);case 16:return this.insert(),this.addCloseEvent(),e.abrupt("return",this);case 19:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onPageChange",value:function(e,t){var r=this;switch(t||(this.hasBeenShown=!1),e){case"remove":this.isWidgetApplied()?this.remove():this.trigger.clear()&&this.pageWatcher.watch();break;case"rebuild":this.hasBeenShown?this.closedByUser?this.pageWatcher.watch():this.insert().show():r.init().then(function(e){return e&&r.show()})}}},{key:"addCloseEvent",value:function(){for(var e=this,t=this.domElement.querySelectorAll("\n\t\t\t.".concat(this.overlayClassName,",\n\t\t\t.").concat(this.closeButtonClassName,"\n\t\t")),r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.push.apply(o,n(t)),o.forEach(function(t){t.addEventListener("click",function(){e.recurrence&&e.recurrence.setClosingRecurrence(),e.hide(),setTimeout(function(){return e.remove()},1e3)},{passive:!0,once:!0})}),this}},{key:"getDom",value:function(){var e=document.createElement("div");return e.className="".concat(this.basicClassName," ").concat(this.hideClassName),e.id=this.widgetContainerId,e.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(M()?"data-abtasty-actionnable":"",">+</button>\n\t\t\t</div>"),e}},{key:"getStyleTag",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("style");return t.type="text/css",M()&&t.setAttribute("abtasty-script-added","true"),t.textContent="\n\t\t\t.".concat(this.hideClassName," {opacity: 0 !important; pointer-events: none;}\n\t\t\t").concat(e),t}}]),e}();(function(e){function t(){var e;return l(this,t),(e=f(this,y(t).call(this))).stringStyles=e.getStyles(),e.styleElement=e.getStyleTag(e.stringStyles),e}m(t,X),d(t,[{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\twidth: auto;\n\t\t\theight: auto;\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(e){function t(e){var r;return l(this,t),(r=f(this,y(t).call(this))).position=e,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}m(t,X),d(t,[{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\twidth: auto;\n\t\t\theight: auto;\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(e){function t(e,r){var n;return l(this,t),(n=f(this,y(t).call(this))).position=e,n.referrerElement=r,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}m(t,X),d(t,[{key:"insert",value:function(){var e=this;return se("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),se(this.referrerElement,function(t){return t.insertAdjacentElement(e.position,e.domElement)},function(e){return console.error(e)}),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\twidth: auto;\n\t\t\theight: auto;\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 $(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r}function ee(e){var t=function(e,t){if("object"!==h(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===h(t)?t:String(t)}var te=function(){function e(t,r){var n=t.displayRecurrence,o=t.closingRecurrence,i=t.validationRecurrence;l(this,e),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(o),this.validationRecurrence=parseFloat(i),this.onSetCallback=r,this.widgetName=H(),this.uniqueId=K(),this.recurrenceKey="".concat(this.widgetName,"_").concat(this.uniqueId)}return d(e,[{key:"getGivenRecurrenceStorageParsed",value:function(e){try{var t=e.getItem("ABTastyWidgets");return JSON.parse(t)}catch(t){return e.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(e,t){var r=this.recurrenceKey,n=(t[r],w(t,[r].map(ee)));return Object.entries(n).length?(e.setItem("ABTastyWidgets",JSON.stringify(n)),n):(e.removeItem("ABTastyWidgets"),!1)}},{key:"removeSessionRecurrenceStorage",value:function(){var e=this.getSessionRecurrenceStorageParsed();return!!e&&this.removeGivenStorage(window.sessionStorage,e)}},{key:"removeLocalRecurrenceStorage",value:function(){var e=this.getLocalRecurrenceStorageParsed();return!!e&&this.removeGivenStorage(window.localStorage,e)}},{key:"getSessionRecurrence",value:function(){var e=this.getSessionRecurrenceStorageParsed();return!!e&&e[this.recurrenceKey]}},{key:"getLocalRecurrence",value:function(){var e=this.getLocalRecurrenceStorageParsed();return!!e&&e[this.recurrenceKey]}},{key:"getCurrentRecurrence",value:function(){var e=this.getSessionRecurrence(),t=this.getLocalRecurrence();return e||t||{type:!1}}},{key:"isOver",value:function(){var e=this.getLocalRecurrence(),t=(e?parseFloat(e.stamp):0)<(new Date).getTime();return t&&this.removeLocalRecurrenceStorage(),t&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(e,t){var r=this,n=this.getTypeOfStorage(e);if(!n&&"object"!==h(n))return!1;var o=this.getTypeOfStorage(e),a=o.storageString,s=o.storageMethod,c=this.getStamp(e),u={type:t,stamp:c},l=this.getCurrentRecurrence().type,p=function(){var e,t=r.getSessionRecurrence(),n=r.getLocalRecurrence();"session"===a?t?e=r.removeSessionRecurrenceStorage():(r.removeLocalRecurrenceStorage(),e=r.getSessionRecurrenceStorageParsed()):"local"===a&&(n?e=r.removeLocalRecurrenceStorage():(r.removeSessionRecurrenceStorage(),e=r.getLocalRecurrenceStorageParsed()));var o=e?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(r,!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}(i({},r.recurrenceKey,u),e):i({},r.recurrenceKey,u);s.setItem("ABTastyWidgets",JSON.stringify(o)),r.onSetCallback&&"function"==typeof r.onSetCallback&&r.onSetCallback()};if(!s)return!1;if(l&&"validation"!==t)if("closing"===t&&"validation"!==l)p();else{if("display"!==t||"validation"===l||"closing"===l)return!1;p()}else p();return c}},{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(e){return(new Date).getTime()+864e5*e}},{key:"getTypeOfStorage",value:function(e){return!(isNaN(e)||e<0||0!==e&&!e)&&(e>0?{storageString:"local",storageMethod:window.localStorage}:0===e&&{storageString:"session",storageMethod:window.sessionStorage})}}]),e}(),re=function(){function e(){l(this,e),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return d(e,[{key:"intersectionHandler",value:function(e){var t=this;e.forEach(function(e){e.isIntersecting?(t.existingTargets=t.existingTargets.filter(function(r){return r.element!==e.target||(t.inViewPortTargets.push(r),!1)}),t.checkElements()):t.inViewPortTargets=t.inViewPortTargets.filter(function(r){return r.element!==e.target||(t.existingTargets.push(r),!1)})})}},{key:"startVisibilityObserver",value:function(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:.5})}},{key:"startMutationObserver",value:function(){var e=new MutationObserver(this.checkElements.bind(this));return e.observe(document,{attributes:!0,childList:!0,subtree:!0}),e}},{key:"isElementVisible",value:function(e){return this.isElementTopmost(e)&&this.isElementOpaque(e)}},{key:"isElementOpaque",value:function(e){return"HTML"===function e(t,r){return r(t)||!t.parentElement?t:e(t.parentElement,r)}(e,function(e){return"0"===window.getComputedStyle(e).opacity}).nodeName}},{key:"isElementTopmost",value:function(e){for(var t=e.getBoundingClientRect(),r=[[t.left,t.top],[t.right,t.top],[t.left,t.bottom],[t.right,t.bottom]],o=!1,i=0;!o&&i<r.length;){var a,s=(a=document).elementFromPoint.apply(a,n(r[i]));o=e===s||e.contains(s),i++}return o}},{key:"checkElements",value:function(){var e=this;this.targets=this.targets.filter(function(t){var r=document.querySelector(t.selector);return!r||(e.existingTargets.push(Object.assign(t,{element:r})),e.visibilityobserver.observe(r),!1)}),this.existingTargets=this.existingTargets.filter(function(t){return!!document.querySelector(t.selector)||(e.visibilityobserver.unobserve(t.element),e.targets.push(t),!1)}),this.inViewPortTargets=this.inViewPortTargets.filter(function(t){var r=t.element,n=t.resolve;return!e.isElementVisible(r)||(e.visibilityobserver.unobserve(r),n(r),!1)})}},{key:"watch",value:function(e,t){this.targets.push({selector:e,resolve:t})}},{key:"clear",value:function(e){var t=this.targets.filter(function(t){return t.selector!==e});0===t.length&&(this.existingTargets=[],this.inViewPortTargets=[],this.mutationobserver.disconnect(),this.visibilityobserver.unobserve(e)),this.targets.length>t&&(this.targets=t,this.visibilityobserver.unobserve(e))}}]),e}(),ne=function(){var e={promise:null,resolve:null,reject:null};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e},oe=function(){function e(t){var r=t.triggerEvent,n=t.triggerSelector,o=t.triggerDelay;l(this,e),this.event=r,this.selector=n&&n.length?n:"body",this.delay=o,this.elementsSelectors=[],this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[],this.visibilityObservers=[]}return d(e,[{key:"onElementVisible",value:function(){var e=u(s.mark(function e(){var t,r,n,o;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=ne(),this.promises.push(t),e.next=4,this.onPageLoad();case 4:return r=e.sent,e.next=7,Z("IntersectionObserver");case 7:return n=e.sent,o=z("VisibilityObserver",re),this.visibilityObservers.push(o),n&&r&&o.watch(this.selector,t.resolve),e.abrupt("return",t.promise);case 12:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onPageLoad",value:function(){var e=this,t=ne();this.promises.push(t);var r=function(){return"complete"===document.readyState};if(r())t.resolve(!0);else{var n,o=setTimeout(function(){return e.clear()},15e3),i=["readystatechange",function(){return r()&&!clearTimeout(o)&&t.resolve(!0)},{passive:!0}];this.timeouts.push(o),this.eventsListeners.push(i),(n=document).addEventListener.apply(n,i)}return t.promise}},{key:"onClick",value:function(){var e,t=this,r=document.createElement("style");r.type="text/css",r.id="Click_".concat(K()),r.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(r),this.elementsSelectors.push("#".concat(r.id));var o=ne();this.promises.push(o);var i=["click",function(e){return!!function(e){return n(document.querySelectorAll(t.selector)).some(function(r){return r.isSameNode(e)||!!e.closest(t.selector)})}(e.target)&&(o.resolve(!0),t.clear())},{passive:!0,capture:!0}];return this.eventsListeners.push(i),(e=document).addEventListener.apply(e,i),o.promise}},{key:"onExitIntent",value:function(){var e=u(s.mark(function e(){var t,r,n=this;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=ne(),this.promises.push(t),r=["mouseleave",function(){var e=u(s.mark(function e(){var r,o;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.delay){e.next=6;break}r=1e3*n.delay,o=setTimeout(function(){t.resolve(!0),n.clear()},r),n.timeouts.push(o),e.next=9;break;case 6:return t.resolve(!0),n.clear(),e.abrupt("return");case 9:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),{passive:!0,once:!0}],e.next=6,this.onPageLoad();case 6:return e.sent?se("body",function(e){e.addEventListener.apply(e,r),n.eventsListeners.push([e].concat(r))}):t.resolve(!1),e.abrupt("return",t.promise);case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onDelay",value:function(){var e=u(s.mark(function e(){var t,r,n,o=this;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=ne(),this.promises.push(t),r=1e3*this.delay,e.next=5,this.onPageLoad();case 5:return e.sent&&(n=setTimeout(function(){t.resolve(!0),o.clear()},r),this.timeouts.push(n)),e.abrupt("return",t.promise);case 8:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onReengage",value:function(){var e=this,t=ne();this.promises.push(t);var r=1e3*this.delay,n=r,o=[function(){return n=r},{passive:!0}];["click","mousemove","scroll","keypress"].forEach(function(t){var r;(r=document).addEventListener.apply(r,[t].concat(o)),e.eventsListeners.push([t].concat(o))});var i=setInterval(function(){n<=0?(t.resolve(!0),e.clear()):n-=100},100);return this.intervals.push(i),t.promise}},{key:"clear",value:function(){var e=this;return this.elementsSelectors.length&&(this.elementsSelectors.forEach(function(e){document.querySelector(e)&&document.querySelector(e).remove()}),this.elementsSelectors=[]),this.eventsListeners.length&&(this.eventsListeners.forEach(function(e){var t="string"==typeof e[0]?[document].concat(n(e)):e,r=E(t),o=r[0],i=r.slice(1);o&&i.length>1&&o.removeEventListener.apply(o,n(i))}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(function(e){return clearTimeout(e)}),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(function(e){return clearInterval(e)}),this.intervals=[]),this.observers.length&&(this.observers.forEach(function(e){return e.disconnect()}),this.observers=[]),this.visibilityObservers.length&&(this.visibilityObservers.forEach(function(t){return t.clear(e.selector)}),this.visibilityObservers=[]),this.promises.length&&(this.promises.forEach(function(e){return e.resolve(!1)}),this.promises=[]),this}},{key:"isTriggered",value:function(){var e=u(s.mark(function e(){var t;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.clear(),e.t0=this.event,e.next="pageLoad"===e.t0?4:"click"===e.t0?8:"exitIntent"===e.t0?12:"delay"===e.t0?16:"reengage"===e.t0?20:"elementVisible"===e.t0?24:28;break;case 4:return e.next=6,this.onPageLoad();case 6:return t=e.sent,e.abrupt("break",29);case 8:return e.next=10,this.onClick();case 10:return t=e.sent,e.abrupt("break",29);case 12:return e.next=14,this.onExitIntent();case 14:return t=e.sent,e.abrupt("break",29);case 16:return e.next=18,this.onDelay();case 18:return t=e.sent,e.abrupt("break",29);case 20:return e.next=22,this.onReengage();case 22:return t=e.sent,e.abrupt("break",29);case 24:return e.next=26,this.onElementVisible();case 26:return t=e.sent,e.abrupt("break",29);case 28:t=!1;case 29:return e.abrupt("return",t);case 30:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}]),e}();var ie=function(){function e(t,r,n){l(this,e),this.recurrence=t,this.isWidgetApplied=r,this.callback=n,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.eventListenerParams=[L,this.eventHandler.bind(this),{passive:!0}]}return d(e,[{key:"recurrenceIsDone",value:function(){return!this.recurrence||this.recurrence.isOver()}},{key:"decisionHandler",value:function(e){var t=this,r=!!window.ABTasty.getTestsOnPage()[TEST_ID],n=(this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1}).type,o=function(){return e&&"display"===n||t.recurrenceIsDone()};return!this.isWidgetApplied()&&r&&o()?(this.clearWatcher(),this.callback("rebuild",e)):(!this.isWidgetApplied()||r&&o())&&(this.isWidgetApplied()||r)||(this.clearWatcher(),this.callback("remove",e),this.watch()),this}},{key:"eventHandler",value:function(){var e=this;return setTimeout(function(){e.decisionHandler(!1)},250),this}},{key:"observerHandler",value:function(e){var t=e.some(function(e){var t=e.removedNodes;return t&&t.length}),r=e.some(function(e){var t=e.addedNodes;return t&&t.length});return t||r?(this.decisionHandler(!0),this):this}},{key:"watch",value:function(){var e,t=this;return this.clearWatcher(),(e=document).addEventListener.apply(e,n(this.eventListenerParams)),se("body",function(e){var r,n=[e,{childList:!0,subtree:!0}];(r=t.observer).observe.apply(r,n)}),this}},{key:"clearWatcher",value:function(){var e;return(e=document).removeEventListener.apply(e,n(this.eventListenerParams)),this.observer.disconnect(),this}}]),e}(),ae=function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];r.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(e=console).log.apply(e,r)},se=function(e,t,r){var n,o=0;try{document.querySelector(e)}catch(t){var i="Selector «".concat(e,"» not valid.");return ae(i),"function"==typeof r&&r(i)}n=setTimeout(function(){clearInterval(o);var t="Can't find element «".concat(e,"».");return ae(t),"function"==typeof r&&r(t)},1e4),o=setInterval(function(){var r=document.querySelector(e);if(null!==r)return clearTimeout(n),clearInterval(o),"function"==typeof t&&t(r)},200)};j.children[j.children.length-1].label={en:"Recurrence after redirection",fr:"Récurrence après redirection",es:"Recurrencia después de la redirección",de:"Wiederholung nach Weiterleitung"};var ce,ue=[j,V],le={title:{propName:"title",type:"wysiwyg",category:"content",label:{en:"Title",fr:"Titre"},placeholder:{en:"Some title",fr:"Mon titre"},value:{en:"Title",fr:"Titre"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},buttonSettings:[{category:"content",type:"separator",propName:"button-separator"},{propName:"button",category:"content",type:"switch",value:!1,label:{en:"Add a button",fr:"Ajouter un bouton",es:"Añadir un botón",de:"Button hinzufügen"}},{propName:"buttonText",type:"text",category:"content",label:{en:"Button text",fr:"Texte du bouton",es:"Texto del botón",de:"Button-Text"},value:{en:"Accept",fr:"Valider"},placeholder:{en:"Submit",fr:"Valider"},conditions:[{field:"button"}]},{propName:"buttonLink",type:"text",category:"content",label:{en:"Button link",fr:"Lien du bouton",es:"Enlace del botón",de:"Button-Link"},value:location.origin,conditions:[{field:"button"}]},{propName:"buttonTextColor",category:"content",type:"colorpicker",label:{en:"Button text color",fr:"Couleur du texte du bouton",es:"Color del texto del botón",de:"Button-Textfarbe"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"button"}]},{propName:"buttonBackgroundColor",category:"content",type:"colorpicker",label:{en:"Button background color",fr:"Couleur de fond du bouton",es:"Color del botón",de:"Button-Hintergrundfarbe"},value:"rgba(0, 156, 178, 1)",conditions:[{field:"button"}]}]},pe="https://widgets-images.abtasty.com/modal/",de="".concat(pe,"image/"),he="".concat(pe,"simple/"),ge="".concat(pe,"video/"),fe=[{propName:"type",value:"image",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"imageOnly",type:"radioImage",options:[{label:{en:"Image only",fr:"Image seule",es:"Solo imagen",de:"Nur Bild"},value:"imageOnly",src:"".concat(de,"image-only.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(de,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(de,"right.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(de,"top.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(de,"bottom.png")}]},{propName:"image",type:"mediaupload",category:"content",label:{en:"Image",fr:"Image",es:"Imagen",de:"Bild"}},{category:"content",type:"separator",propName:"title-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},le.title,{category:"content",type:"separator",propName:"wysiwyg-content-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]}].concat(n(le.buttonSettings),n(o.dimensions),[{type:"separator",category:"style"},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],n(o.animations),n(ue)),ye=[{propName:"type",value:"simple",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"center",type:"radioImage",options:[{label:{en:"Center",fr:"Centre"},value:"center",src:"".concat(he,"center.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(he,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(he,"right.png")}]},le.title,{category:"content",type:"separator",propName:"title-content-separator"},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}].concat(n(le.buttonSettings),n(o.dimensions),[{type:"separator",category:"style"},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],n(o.animations),n(ue)),ve=[{propName:"type",value:"video",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"no-title",type:"radioImage",options:[{label:{en:"No title",fr:"Sans titre",es:"Sin título",de:"Kein Titel"},value:"no-title",src:"".concat(ge,"video-only.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(ge,"bottom.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(ge,"top.png")}]},le.title,{propName:"videoLink",type:"text",category:"content",label:{en:"URL (Youtube or Vimeo)",fr:"URL (Youtube ou Vimeo)"},value:"https://www.youtube.com/watch?v=btb3bKfxims"}].concat(n(le.buttonSettings),n(o.dimensions),[{type:"separator",category:"style",conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],n(o.animations),n(ue),[{category:"content",type:"separator",propName:"autoPlay-separator"},{propName:"autoPlay",category:"conditions",type:"switch",value:!1,label:{en:["Auto play (Youtube only).","Warning: on Chrome auto play is only allowed when the media doesn't include sound."],fr:["Lecture automatique (Youtube uniquement).","Attention : sur Chrome, la lecture automatique n'est autorisée que lorsque le support n'inclut pas le son."],es:["Reproducción automática (solo para vídeos de YouTube).","Aviso : En Chrome solo se permite la reproducción automática de videos sin sonido."],de:["Autoplay (nur für YouTube).","Achtung : Chrome erlaubt Autoplay nur, wenn das Medium keinen Ton hat."]}}]),me=document.getElementById("abtasty-widget-react-form__widget");if(me){var be=me.getAttribute("data-plugin-id");ce="d5f5d126-4f25-413a-976e-6ca5f4a4734d"===be||9===Number(be)?ye:"b5bb5334-ad3c-48bc-b9e0-4fc5fcce38e2"===be||64===Number(be)?ve:fe}else ce=fe;return ce});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.widgetForm=t()}(this,function(){"use strict";var e=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}};var t=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var r=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var n=function(n){return e(n)||t(n)||r()},o={backgroundGroup:{propName:"backgroundGroup",category:"style",type:"group",label:{en:"Background",fr:"Fond",es:"Fondo",de:"Hintergrund"},collapsible:!0,children:[{propName:"backgroundColor",type:"colorpicker",category:"style",label:{en:"Background color",fr:"Couleur d'arrière-plan"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"backgroundImage-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"backgroundImage",type:"mediaupload",category:"style",label:{en:"Background image",fr:"Image d'arrière-plan"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"overlay-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"overlayOpacity",type:"slider",category:"style",label:{en:"Overlay opacity",fr:"Opacité de l'overlay",es:"Opacidad de la capa",de:"Overlay Opacity"},value:"50",unit:"%"}]},borderGroup:{propName:"borderGroup",category:"style",type:"group",label:{en:"Border",fr:"Bordure"},collapsible:!0,children:[{propName:"borderWidth",category:"style",type:"slider",unit:"px",value:0,min:0,max:10,label:{en:"Border Thickness",fr:"Largeur de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadius-style-separator"},{propName:"borderRadius",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Border radius",fr:"Angle de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadiusImage-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"borderRadiusImage",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Image Border radius",fr:"Angle de la bordure de l'image"},conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"borderColor-style-separator"},{propName:"borderColor",category:"style",type:"colorpicker",label:{en:"Border color",fr:"Couleur de la bordure"},value:"rgba(0, 0, 0, 1)"}]},closeButtonGroup:{propName:"closeButtonGroup",category:"style",type:"group",label:{en:"Close button",fr:"Bouton de fermeture",es:"Botón cerrar",de:"Schließen-Button"},collapsible:!0,children:[{propName:"closeButtonPosition",category:"style",type:"radio",label:{en:"Close button position",fr:"Position du bouton de fermeture",es:"Posición del botón",de:"Button-Position"},value:"inside",options:[{label:{en:"Inside",fr:"À l'intérieur",es:"Dentro",de:"Innen"},value:"inside"},{label:{en:"Outside",fr:"À l'extérieur",es:"Fuera",de:"Außen"},value:"outside"}]},{category:"style",type:"short-separator",propName:"closeButtonColor-style-separator"},{propName:"closeButtonColor",type:"colorpicker",category:"style",label:{en:"Close button color",fr:"Couleur du bouton de fermeture",es:"Color del botón cerrar",de:"Button-Farbe"},value:"rgba(92, 92, 92, 1)"},{category:"style",type:"short-separator",propName:"closeBackgroundButtonColor-style-separator",conditions:[{field:"closeButtonPosition",value:"outside"}]},{propName:"backgroundCloseButtonColor",type:"colorpicker",category:"style",label:{en:"Background close button color",fr:"Couleur du fond du bouton de fermeture",es:"Background close button color",de:"Background close button color"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"closeButtonPosition",value:"outside"}]}]},dimensions:[{propName:"widthImageWithText",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"medium",options:[{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"},{label:{en:"Custom",fr:"Sur mesure"},value:"custom"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"widthImageOnly",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"fit",options:[{label:{en:"Fit to size",fr:"S'adapte à la taille",es:"Ajustar",de:"Angepasst"},value:"fit"},{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"===e}}]},{propName:"customWidth",type:"number",category:"style",label:{en:"Custom width (%)",fr:"Largeur sur mesure (%)"},value:50,conditions:[{field:"widthImageWithText",value:"custom"}]}],animations:[{category:"style",type:"separator",propName:"animation-separator"},{propName:"animation",type:"radio",category:"style",label:{en:"Animation",fr:"Animation",es:"Animación",de:"Animation"},value:"none",options:[{label:{en:"None",fr:"Aucune",es:"Ninguna",de:"Keine"},value:"none"},{label:{en:"Slide In",fr:"Slide In",es:"Deslizar",de:"Slide In"},value:"slideIn"},{label:{en:"Fade In",fr:"Fade In",es:"Disolver",de:"Fade In"},value:"fadeIn"}]}]};var i=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};function a(e,t){return e(t={exports:{}},t.exports),t.exports}var s=a(function(e){var t=function(e){var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(e,t,r){var n=u;return function(o,i){if(n===d)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=x(a,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===u)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=l(e,t,r);if("normal"===c.type){if(n=r.done?h:p,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u="suspendedStart",p="suspendedYield",d="executing",h="completed",g={};function f(){}function y(){}function v(){}var m={};m[i]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==r&&n.call(w,i)&&(m=w);var k=v.prototype=f.prototype=Object.create(m);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function E(e){var t;this._invoke=function(r,o){function i(){return new Promise(function(t,i){!function t(r,o,i,a){var s=l(e[r],e,o);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&n.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(u).then(function(e){c.value=e,i(c)},function(e){return t("throw",e,i,a)})}a(s.arg)}(r,o,t,i)})}return t=t?t.then(i,i):i()}}function x(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=l(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function T(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:L}}function L(){return{value:t,done:!0}}return y.prototype=k.constructor=v,v.constructor=y,v[s]=y.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(E.prototype),E.prototype[a]=function(){return this},e.AsyncIterator=E,e.async=function(t,r,n,o){var i=new E(c(t,r,n,o));return e.isGeneratorFunction(r)?i:i.next().then(function(e){return e.done?e.value:i.next()})},S(k),k[s]="Generator",k[i]=function(){return this},k.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}});function c(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}var l=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,s,"next",e)}function s(e){c(i,n,o,a,s,"throw",e)}a(void 0)})}};var u=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var d=function(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),e},h=a(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(n){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=r=function(e){return t(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},r(n)}e.exports=r});var g=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var f=function(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?g(e):t},y=a(function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(r)}e.exports=t}),v=a(function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(r,n)}e.exports=t});var m=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)};var b=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o};var w=function(e,t){if(null==e)return{};var r,n,o=b(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o};var k=function(e){if(Array.isArray(e))return e};var S=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var E=function(e){return k(e)||t(e)||S()},x={en:"Recurrence",fr:"Récurrence",es:"Recurrencia",de:"Wiederholung"},O={en:"".concat(x.en," of the display"),fr:"".concat(x.fr," de l'affichage"),es:"".concat(x.es," de visualización"),de:"".concat(x.de," der Anzeige")},C={en:"".concat(x.en," after closure"),fr:"".concat(x.fr," après fermeture"),es:"".concat(x.es," tras el cierre"),de:"".concat(x.de," nach Schließung")},N={en:"".concat(x.en," after validation"),fr:"".concat(x.fr," après validation"),es:"".concat(x.es," tras la validación"),de:"".concat(x.de," nach der Validierung")},T={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},L="abtasty_resetActionTracking";function P(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(r,!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var R,A={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"},B=I({},A,{label:C,propName:"closingRecurrence"}),j={category:"conditions",type:"group",label:x,collapsible:!0,children:[I({},A,{label:O,propName:"displayRecurrence"}),B,I({},A,{label:N,propName:"validationRecurrence"})]},D=[{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"}],_={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:T,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"}]},G={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"}]},W={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"}]},q={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"}]},V={category:"conditions",type:"group",label:T,collapsible:!0,children:[{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:D,propName:"triggerEvent",value:"pageLoad"}].concat(n([_,G,W,q]))},M=function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")},F=((R="undefined"!=typeof global?global:window).ABTasty||Object.assign(R,{ABTasty:{widgetutils:{}}}),R.ABTasty.widgetutils||Object.assign(R.ABTasty,{widgetutils:{}}),R).ABTasty.widgetutils;function z(e,t){return F.hasOwnProperty(e)||Object.assign(F,i({},e,new t)),F[e]}var H=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},K=function(){return"".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID)},U=function(){if(M())return!1;var e=DATA;return{displayRecurrence:e.displayRecurrence,closingRecurrence:e.closingRecurrence,validationRecurrence:e.validationRecurrence}},J=function(){if(M())return!1;var e,t=DATA,r=t.triggerEvent,n=t.triggerEventClick,o=t.triggerEventExitDelay,i=t.triggerEventDelay,a=t.triggerEventReengageDelay,s=n;switch(r){case"exitIntent":e=o;break;case"delay":e=i;break;case"reengage":e=a;break;default:e=0}return{triggerEvent:r,triggerSelector:s,triggerDelay:e}};function Y(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||(e="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=IntersectionObserver",new Promise(function(t,r){var n=window.document.getElementsByTagName("script")[0],o=window.document.createElement("script");o.src=e,n.parentNode.insertBefore(o,n),o.onload=t,o.onerror=r}));var e}function Z(e){return function(){return l(s.mark(function e(t){return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="IntersectionObserver"===e.t0?3:6;break;case 3:return e.next=5,Y();case 5:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",!0);case 7:case"end":return e.stop()}},e)})).apply(this,arguments)}.apply(this,arguments)}var Q=["pageLoad","delay","reengage"],X=function(){function e(){var t=this;u(this,e),this.uniqueId=K(),this.widgetName=H(),this.recurrenceParams=U(),this.triggerParams=J(),this.recurrence=!!this.recurrenceParams&&new te(this.recurrenceParams,this.clearGivenClearables.bind(this)),this.trigger=!!this.triggerParams&&new ne(this.triggerParams),this.pageWatcher=new oe(this.recurrence,this.isWidgetApplied.bind(this),this.onPageChange.bind(this)),this.hasOncePerPageTrigger=!!this.trigger&&Q.some(function(e){return e===t.trigger.event}),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.closedByUser=!1,this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[]}return d(e,[{key:"clearGivenClearables",value:function(){this.eventsListeners.length&&(this.eventsListeners.forEach(function(e){var t;return(t=document).removeEventListener.apply(t,n(e))}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(function(e){return clearTimeout(e)}),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(function(e){return clearInterval(e)}),this.intervals=[]),this.observers.length&&(this.observers.forEach(function(e){return e.disconnect()}),this.observers=[]),this.promises.length&&(this.promises.forEach(function(e){return e.resolve(!1)}),this.promises=[])}},{key:"isWidgetApplied",value:function(){return this.domElement&&!!this.domElement.closest("html")}},{key:"insert",value:function(){var e=this;return ae("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),ae("body",function(t){return t.appendChild(e.domElement)},function(e){return console.error(e)}),this}},{key:"remove",value:function(){var e=this;return this.pageWatcher.clearWatcher(),this.domElement&&this.domElement.closest("html")&&this.domElement.remove(),this.styleElement&&this.styleElement.closest("html")&&this.styleElement.remove(),this.hasOncePerPageTrigger?this.pageWatcher.watch():this.init().then(function(t){return t&&e.show()}),this}},{key:"show",value:function(){return this.closedByUser=!1,this.domElement.classList.remove(this.hideClassName),this.recurrence&&this.recurrence.setDisplayRecurrence(),this.hasBeenShown=!0,M()||this.pageWatcher.watch(),this}},{key:"hide",value:function(){return this.closedByUser=!0,this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var e=l(s.mark(function e(){var t;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.trigger||!this.trigger.promises.length){e.next=2;break}return e.abrupt("return",!1);case 2:if(t=this.recurrence&&this.recurrence.isOver(),!this.recurrence||t){e.next=6;break}return this.pageWatcher.watch(),e.abrupt("return",!1);case 6:if(M()||this.pageWatcher.watch(),e.t0=M()||!this.trigger,e.t0){e.next=15;break}if(e.t1=this.trigger,!e.t1){e.next=14;break}return e.next=13,this.trigger.isTriggered();case 13:e.t1=e.sent;case 14:e.t0=e.t1;case 15:if(e.t0){e.next=18;break}return e.abrupt("return",!1);case 18:return this.insert(),this.addCloseEvent(),e.abrupt("return",this);case 21:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onPageChange",value:function(e,t){var r=this;switch(t||(this.hasBeenShown=!1),e){case"remove":this.isWidgetApplied()?this.remove():this.trigger.clear()&&this.pageWatcher.watch();break;case"rebuild":this.hasBeenShown?this.closedByUser?this.pageWatcher.watch():this.insert().show():r.init().then(function(e){return e&&r.show()})}}},{key:"addCloseEvent",value:function(){for(var e=this,t=this.domElement.querySelectorAll("\n\t\t\t.".concat(this.overlayClassName,",\n\t\t\t.").concat(this.closeButtonClassName,"\n\t\t")),r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.push.apply(o,n(t)),o.forEach(function(t){t.addEventListener("click",function(){e.recurrence&&e.recurrence.setClosingRecurrence(),e.hide(),setTimeout(function(){return e.remove()},1e3)},{passive:!0,once:!0})}),this}},{key:"getDom",value:function(){var e=document.createElement("div");return e.className="".concat(this.basicClassName," ").concat(this.hideClassName),e.id=this.widgetContainerId,e.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(M()?"data-abtasty-actionnable":"",">+</button>\n\t\t\t</div>"),e}},{key:"getStyleTag",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("style");return t.type="text/css",M()&&t.setAttribute("abtasty-script-added","true"),t.textContent="\n\t\t\t.".concat(this.hideClassName," {opacity: 0 !important; pointer-events: none;}\n\t\t\t").concat(e),t}}]),e}();(function(e){function t(){var e;return u(this,t),(e=f(this,y(t).call(this))).stringStyles=e.getStyles(),e.styleElement=e.getStyleTag(e.stringStyles),e}m(t,X),d(t,[{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\twidth: auto;\n\t\t\theight: auto;\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(e){function t(e){var r;return u(this,t),(r=f(this,y(t).call(this))).position=e,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}m(t,X),d(t,[{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\twidth: auto;\n\t\t\theight: auto;\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(e){function t(e,r){var n;return u(this,t),(n=f(this,y(t).call(this))).position=e,n.referrerElement=r,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}m(t,X),d(t,[{key:"insert",value:function(){var e=this;return ae("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),ae(this.referrerElement,function(t){return t.insertAdjacentElement(e.position,e.domElement)},function(e){return console.error(e)}),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\twidth: auto;\n\t\t\theight: auto;\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 $(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r}function ee(e){var t=function(e,t){if("object"!==h(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===h(t)?t:String(t)}var te=function(){function e(t,r){var n=t.displayRecurrence,o=t.closingRecurrence,i=t.validationRecurrence;u(this,e),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(o),this.validationRecurrence=parseFloat(i),this.onSetCallback=r,this.widgetName=H(),this.uniqueId=K(),this.recurrenceKey="".concat(this.widgetName,"_").concat(this.uniqueId)}return d(e,[{key:"getGivenRecurrenceStorageParsed",value:function(e){try{var t=e.getItem("ABTastyWidgets");return JSON.parse(t)}catch(t){return e.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(e,t){var r=this.recurrenceKey,n=(t[r],w(t,[r].map(ee)));return Object.entries(n).length?(e.setItem("ABTastyWidgets",JSON.stringify(n)),n):(e.removeItem("ABTastyWidgets"),!1)}},{key:"removeSessionRecurrenceStorage",value:function(){var e=this.getSessionRecurrenceStorageParsed();return!!e&&this.removeGivenStorage(window.sessionStorage,e)}},{key:"removeLocalRecurrenceStorage",value:function(){var e=this.getLocalRecurrenceStorageParsed();return!!e&&this.removeGivenStorage(window.localStorage,e)}},{key:"getSessionRecurrence",value:function(){var e=this.getSessionRecurrenceStorageParsed();return!!e&&e[this.recurrenceKey]}},{key:"getLocalRecurrence",value:function(){var e=this.getLocalRecurrenceStorageParsed();return!!e&&e[this.recurrenceKey]}},{key:"getCurrentRecurrence",value:function(){var e=this.getSessionRecurrence(),t=this.getLocalRecurrence();return e||t||{type:!1}}},{key:"isOver",value:function(){var e=this.getLocalRecurrence(),t=(e?parseFloat(e.stamp):0)<(new Date).getTime();return t&&this.removeLocalRecurrenceStorage(),t&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(e,t){var r=this,n=this.getTypeOfStorage(e);if(!n&&"object"!==h(n))return!1;var o=this.getTypeOfStorage(e),a=o.storageString,s=o.storageMethod,c=this.getStamp(e),l={type:t,stamp:c},u=this.getCurrentRecurrence().type,p=function(){var e,t=r.getSessionRecurrence(),n=r.getLocalRecurrence();"session"===a?t?e=r.removeSessionRecurrenceStorage():(r.removeLocalRecurrenceStorage(),e=r.getSessionRecurrenceStorageParsed()):"local"===a&&(n?e=r.removeLocalRecurrenceStorage():(r.removeSessionRecurrenceStorage(),e=r.getLocalRecurrenceStorageParsed()));var o=e?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(r,!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}(i({},r.recurrenceKey,l),e):i({},r.recurrenceKey,l);s.setItem("ABTastyWidgets",JSON.stringify(o)),r.onSetCallback&&"function"==typeof r.onSetCallback&&r.onSetCallback()};if(!s)return!1;if(u&&"validation"!==t)if("closing"===t&&"validation"!==u)p();else{if("display"!==t||"validation"===u||"closing"===u)return!1;p()}else p();return c}},{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(e){return(new Date).getTime()+864e5*e}},{key:"getTypeOfStorage",value:function(e){return!(isNaN(e)||e<0||0!==e&&!e)&&(e>0?{storageString:"local",storageMethod:window.localStorage}:0===e&&{storageString:"session",storageMethod:window.sessionStorage})}}]),e}(),re=function(){function e(){u(this,e),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return d(e,[{key:"intersectionHandler",value:function(e){var t=this;e.forEach(function(e){e.isIntersecting?(t.existingTargets=t.existingTargets.filter(function(r){return r.element!==e.target||(t.inViewPortTargets.push(r),!1)}),t.checkElements()):t.inViewPortTargets=t.inViewPortTargets.filter(function(r){return r.element!==e.target||(t.existingTargets.push(r),!1)})})}},{key:"startVisibilityObserver",value:function(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:.5})}},{key:"startMutationObserver",value:function(){var e=new MutationObserver(this.checkElements.bind(this));return e.observe(document,{attributes:!0,childList:!0,subtree:!0}),e}},{key:"isElementVisible",value:function(e){return this.isElementTopmost(e)&&this.isElementOpaque(e)}},{key:"isElementOpaque",value:function(e){return"HTML"===function e(t,r){return r(t)||!t.parentElement?t:e(t.parentElement,r)}(e,function(e){return"0"===window.getComputedStyle(e).opacity}).nodeName}},{key:"isElementTopmost",value:function(e){for(var t=e.getBoundingClientRect(),r=[[t.left,t.top],[t.right,t.top],[t.left,t.bottom],[t.right,t.bottom]],o=!1,i=0;!o&&i<r.length;){var a,s=(a=document).elementFromPoint.apply(a,n(r[i]));o=e===s||e.contains(s),i++}return o}},{key:"checkElements",value:function(){var e=this;this.targets=this.targets.filter(function(t){var r=document.querySelector(t.selector);return!r||(e.existingTargets.push(Object.assign(t,{element:r})),e.visibilityobserver.observe(r),!1)}),this.existingTargets=this.existingTargets.filter(function(t){return!!document.querySelector(t.selector)||(e.visibilityobserver.unobserve(t.element),e.targets.push(t),!1)}),this.inViewPortTargets=this.inViewPortTargets.filter(function(t){var r=t.element,n=t.resolve;return!e.isElementVisible(r)||(e.visibilityobserver.unobserve(r),n(r),!1)})}},{key:"watch",value:function(e,t){this.targets.push({selector:e,resolve:t})}},{key:"clear",value:function(e){var t=this.targets.filter(function(t){return t.selector!==e});0===t.length&&(this.existingTargets=[],this.inViewPortTargets=[],this.mutationobserver.disconnect(),this.visibilityobserver.unobserve(e)),this.targets.length>t&&(this.targets=t,this.visibilityobserver.unobserve(e))}}]),e}(),ne=function(){function e(t){var r=t.triggerEvent,n=t.triggerSelector,o=t.triggerDelay;u(this,e),this.event=r,this.selector=n&&n.length?n:"body",this.delay=o,this.elementsSelectors=[],this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[],this.visibilityObservers=[]}return d(e,[{key:"onElementVisible",value:(t=l(s.mark(function t(){var r,n,o,i;return s.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.promiseDeferrer("onElementVisible"),this.promises.push(r),t.next=4,this.onPageLoad();case 4:return n=t.sent,t.next=7,Z("IntersectionObserver");case 7:return o=t.sent,i=z("VisibilityObserver",re),this.visibilityObservers.push(i),o&&n&&i.watch(this.selector,r.resolve),t.abrupt("return",r.promise);case 12:case"end":return t.stop()}},t,this)})),function(){return t.apply(this,arguments)})},{key:"onPageLoad",value:function(){var t=e.promiseDeferrer("onPageLoad");this.promises.push(t);var r=function(){return"complete"===document.readyState};if(r())t.resolve(!0);else{var n,o=setTimeout(function(){return t.resolve(!1)},2e4),i=["readystatechange",function(){return r()&&!clearTimeout(o)&&!t.resolve(!0)},{passive:!0}];this.timeouts.push(o),this.eventsListeners.push(i),(n=document).addEventListener.apply(n,i)}return t.promise}},{key:"onClick",value:function(){var t,r=this,o=document.createElement("style");o.type="text/css",o.id="Click_".concat(K()),o.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(o),this.elementsSelectors.push("#".concat(o.id));var i=e.promiseDeferrer("onClick");this.promises.push(i);var a=["click",function(e){return!!function(e){return n(document.querySelectorAll(r.selector)).some(function(t){return t.isSameNode(e)||!!e.closest(r.selector)})}(e.target)&&(i.resolve(!0),r.clear())},{passive:!0,capture:!0}];return this.eventsListeners.push(a),(t=document).addEventListener.apply(t,a),i.promise}},{key:"onExitIntent",value:function(){var t=this,r=e.promiseDeferrer("onExitIntent");this.promises.push(r);var n=["mouseleave",function(){var e=l(s.mark(function e(){var n,o;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.delay){e.next=6;break}n=1e3*t.delay,o=setTimeout(function(){r.resolve(!0)},n),t.timeouts.push(o),e.next=8;break;case 6:return r.resolve(!0),e.abrupt("return");case 8:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),{passive:!0,once:!0}];return ae("body",function(e){e.addEventListener.apply(e,n),t.eventsListeners.push([e].concat(n))}),r.promise}},{key:"onDelay",value:function(){var t=e.promiseDeferrer("onDelay");this.promises.push(t);var r=1e3*this.delay,n=setTimeout(function(){t.resolve(!0)},r);return this.timeouts.push(n),t.promise}},{key:"onReengage",value:function(){var t=this,r=e.promiseDeferrer("onReengage");this.promises.push(r);var n=1e3*this.delay,o=n,i=[function(){return o=n},{passive:!0}];["click","mousemove","scroll","keypress"].forEach(function(e){var r;(r=document).addEventListener.apply(r,[e].concat(i)),t.eventsListeners.push([e].concat(i))});var a=setInterval(function(){o<=0?r.resolve(!0):o-=100},100);return this.intervals.push(a),r.promise}},{key:"clear",value:function(){var e=this;return this.elementsSelectors.length&&(this.elementsSelectors.forEach(function(e){document.querySelector(e)&&document.querySelector(e).remove()}),this.elementsSelectors=[]),this.eventsListeners.length&&(this.eventsListeners.forEach(function(e){var t="string"==typeof e[0]?[document].concat(n(e)):e,r=E(t),o=r[0],i=r.slice(1);o&&i.length>1&&o.removeEventListener.apply(o,n(i))}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(function(e){return clearTimeout(e)}),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(function(e){return clearInterval(e)}),this.intervals=[]),this.observers.length&&(this.observers.forEach(function(e){return e.disconnect()}),this.observers=[]),this.visibilityObservers.length&&(this.visibilityObservers.forEach(function(t){return t.clear(e.selector)}),this.visibilityObservers=[]),this.promises.length&&(this.promises.forEach(function(e){return e.resolve(!1)}),this.promises=[]),this}},{key:"isTriggered",value:function(){var e=l(s.mark(function e(){var t;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.clear(),e.t0=this.event,e.next="pageLoad"===e.t0?4:"click"===e.t0?9:"exitIntent"===e.t0?14:"delay"===e.t0?19:"reengage"===e.t0?24:"elementVisible"===e.t0?29:34;break;case 4:return e.next=6,this.onPageLoad();case 6:return t=e.sent,this.clear(),e.abrupt("break",35);case 9:return e.next=11,this.onClick();case 11:return t=e.sent,this.clear(),e.abrupt("break",35);case 14:return e.next=16,this.onExitIntent();case 16:return t=e.sent,this.clear(),e.abrupt("break",35);case 19:return e.next=21,this.onDelay();case 21:return t=e.sent,this.clear(),e.abrupt("break",35);case 24:return e.next=26,this.onReengage();case 26:return t=e.sent,this.clear(),e.abrupt("break",35);case 29:return e.next=31,this.onElementVisible();case 31:return t=e.sent,this.clear(),e.abrupt("break",35);case 34:t=!1;case 35:return e.abrupt("return",t);case 36:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}],[{key:"promiseDeferrer",value:function(e){var t={promise:null,resolve:null,reject:null,name:e};return t.promise=new Promise(function(e,r){t.resolve=e,t.reject=r}),t}}]),e;var t}();var oe=function(){function e(t,r,n){u(this,e),this.recurrence=t,this.isWidgetApplied=r,this.callback=n,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.eventListenerParams=[L,this.eventHandler.bind(this),{passive:!0}]}return d(e,[{key:"recurrenceIsDone",value:function(){return!this.recurrence||this.recurrence.isOver()}},{key:"decisionHandler",value:function(e){var t=this,r=!!window.ABTasty.getTestsOnPage()[TEST_ID],n=(this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1}).type,o=function(){return e&&"display"===n||t.recurrenceIsDone()};return!this.isWidgetApplied()&&r&&o()?(this.clearWatcher(),this.callback("rebuild",e)):(!this.isWidgetApplied()||r&&o())&&(this.isWidgetApplied()||r)||(this.clearWatcher(),this.callback("remove",e),this.watch()),this}},{key:"eventHandler",value:function(){var e=this;return setTimeout(function(){e.decisionHandler(!1)},250),this}},{key:"observerHandler",value:function(e){var t=e.some(function(e){var t=e.removedNodes;return t&&t.length}),r=e.some(function(e){var t=e.addedNodes;return t&&t.length});return t||r?(this.decisionHandler(!0),this):this}},{key:"watch",value:function(){var e,t=this;return this.clearWatcher(),(e=document).addEventListener.apply(e,n(this.eventListenerParams)),ae("body",function(e){var r,n=[e,{childList:!0,subtree:!0}];(r=t.observer).observe.apply(r,n)}),this}},{key:"clearWatcher",value:function(){var e;return(e=document).removeEventListener.apply(e,n(this.eventListenerParams)),this.observer.disconnect(),this}}]),e}(),ie=function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];r.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(e=console).log.apply(e,r)},ae=function(e,t,r){var n,o=0;try{document.querySelector(e)}catch(t){var i="Selector «".concat(e,"» not valid.");return ie(i),"function"==typeof r&&r(i)}n=setTimeout(function(){clearInterval(o);var t="Can't find element «".concat(e,"».");return ie(t),"function"==typeof r&&r(t)},1e4),o=setInterval(function(){var r=document.querySelector(e);if(null!==r)return clearTimeout(n),clearInterval(o),"function"==typeof t&&t(r)},200)};j.children[j.children.length-1].label={en:"Recurrence after redirection",fr:"Récurrence après redirection",es:"Recurrencia después de la redirección",de:"Wiederholung nach Weiterleitung"};var se,ce=[j,V],le={title:{propName:"title",type:"wysiwyg",category:"content",label:{en:"Title",fr:"Titre"},placeholder:{en:"Some title",fr:"Mon titre"},value:{en:"Title",fr:"Titre"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},buttonSettings:[{category:"content",type:"separator",propName:"button-separator"},{propName:"button",category:"content",type:"switch",value:!1,label:{en:"Add a button",fr:"Ajouter un bouton",es:"Añadir un botón",de:"Button hinzufügen"}},{propName:"buttonText",type:"text",category:"content",label:{en:"Button text",fr:"Texte du bouton",es:"Texto del botón",de:"Button-Text"},value:{en:"Accept",fr:"Valider"},placeholder:{en:"Submit",fr:"Valider"},conditions:[{field:"button"}]},{propName:"buttonLink",type:"text",category:"content",label:{en:"Button link",fr:"Lien du bouton",es:"Enlace del botón",de:"Button-Link"},value:location.origin,conditions:[{field:"button"}]},{propName:"buttonTextColor",category:"content",type:"colorpicker",label:{en:"Button text color",fr:"Couleur du texte du bouton",es:"Color del texto del botón",de:"Button-Textfarbe"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"button"}]},{propName:"buttonBackgroundColor",category:"content",type:"colorpicker",label:{en:"Button background color",fr:"Couleur de fond du bouton",es:"Color del botón",de:"Button-Hintergrundfarbe"},value:"rgba(0, 156, 178, 1)",conditions:[{field:"button"}]}]},ue="https://widgets-images.abtasty.com/modal/",pe="".concat(ue,"image/"),de="".concat(ue,"simple/"),he="".concat(ue,"video/"),ge=[{propName:"type",value:"image",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"imageOnly",type:"radioImage",options:[{label:{en:"Image only",fr:"Image seule",es:"Solo imagen",de:"Nur Bild"},value:"imageOnly",src:"".concat(pe,"image-only.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(pe,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(pe,"right.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(pe,"top.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(pe,"bottom.png")}]},{propName:"image",type:"mediaupload",category:"content",label:{en:"Image",fr:"Image",es:"Imagen",de:"Bild"}},{category:"content",type:"separator",propName:"title-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},le.title,{category:"content",type:"separator",propName:"wysiwyg-content-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]}].concat(n(le.buttonSettings),n(o.dimensions),[{type:"separator",category:"style"},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],n(o.animations),n(ce)),fe=[{propName:"type",value:"simple",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"center",type:"radioImage",options:[{label:{en:"Center",fr:"Centre"},value:"center",src:"".concat(de,"center.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(de,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(de,"right.png")}]},le.title,{category:"content",type:"separator",propName:"title-content-separator"},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}].concat(n(le.buttonSettings),n(o.dimensions),[{type:"separator",category:"style"},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],n(o.animations),n(ce)),ye=[{propName:"type",value:"video",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"no-title",type:"radioImage",options:[{label:{en:"No title",fr:"Sans titre",es:"Sin título",de:"Kein Titel"},value:"no-title",src:"".concat(he,"video-only.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(he,"bottom.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(he,"top.png")}]},le.title,{propName:"videoLink",type:"text",category:"content",label:{en:"URL (Youtube or Vimeo)",fr:"URL (Youtube ou Vimeo)"},value:"https://www.youtube.com/watch?v=btb3bKfxims"}].concat(n(le.buttonSettings),n(o.dimensions),[{type:"separator",category:"style",conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},o.backgroundGroup,{type:"separator",category:"style"},o.borderGroup,{type:"separator",category:"style"},o.closeButtonGroup],n(o.animations),n(ce),[{category:"content",type:"separator",propName:"autoPlay-separator"},{propName:"autoPlay",category:"conditions",type:"switch",value:!1,label:{en:["Auto play (Youtube only).","Warning: on Chrome auto play is only allowed when the media doesn't include sound."],fr:["Lecture automatique (Youtube uniquement).","Attention : sur Chrome, la lecture automatique n'est autorisée que lorsque le support n'inclut pas le son."],es:["Reproducción automática (solo para vídeos de YouTube).","Aviso : En Chrome solo se permite la reproducción automática de videos sin sonido."],de:["Autoplay (nur für YouTube).","Achtung : Chrome erlaubt Autoplay nur, wenn das Medium keinen Ton hat."]}}]),ve=document.getElementById("abtasty-widget-react-form__widget");if(ve){var me=ve.getAttribute("data-plugin-id");se="d5f5d126-4f25-413a-976e-6ca5f4a4734d"===me||9===Number(me)?fe:"b5bb5334-ad3c-48bc-b9e0-4fc5fcce38e2"===me||64===Number(me)?ye:ge}else se=ge;return se});

@@ -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=["pageLoad","delay","reengage"],vt=function(){function t(){var e=this;g(this,t),this.uniqueId=pt(),this.widgetName=ht(),this.recurrenceParams=mt(),this.triggerParams=yt(),this.recurrence=!!this.recurrenceParams&&new xt(this.recurrenceParams,this.clearGivenClearables.bind(this)),this.trigger=!!this.triggerParams&&new St(this.triggerParams),this.pageWatcher=new Ot(this.recurrence,this.isWidgetApplied.bind(this),this.onPageChange.bind(this)),this.hasOncePerPageTrigger=!!this.trigger&&bt.some(function(t){return t===e.trigger.event}),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.closedByUser=!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("html")}},{key:"insert",value:function(){var t=this;return Tt("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),Tt("body",function(e){return e.appendChild(t.domElement)},function(t){return console.error(t)}),this}},{key:"remove",value:function(){var t=this;return this.pageWatcher.clearWatcher(),this.domElement&&this.domElement.closest("html")&&this.domElement.remove(),this.styleElement&&this.styleElement.closest("html")&&this.styleElement.remove(),this.hasOncePerPageTrigger?this.pageWatcher.watch():this.init().then(function(e){return e&&t.show()}),this}},{key:"show",value:function(){return this.closedByUser=!1,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.closedByUser=!0,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,e){var n=this;switch(e||(this.hasBeenShown=!1),t){case Q:this.isWidgetApplied()?this.remove():this.trigger.clear()&&this.pageWatcher.watch();break;case X:this.hasBeenShown?this.closedByUser?this.pageWatcher.watch():this.insert().show():n.init().then(function(t){return t&&n.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(),setTimeout(function(){return t.remove()},1e3)},{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,vt),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\twidth: auto;\n\t\t\theight: auto;\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,vt),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\twidth: auto;\n\t\t\theight: auto;\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,vt),v(e,[{key:"insert",value:function(){var t=this;return Tt("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),Tt(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\twidth: auto;\n\t\t\theight: auto;\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 wt(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 _t(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 xt=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(_t)));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?wt(n,!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wt(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}(),kt=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}(),Et=function(){var t={promise:null,resolve:null,reject:null};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t},St=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=Et(),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",kt),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=Et();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=Et();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=Et(),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?Tt("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=Et(),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=Et();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 Ot=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,t)):(!this.isWidgetApplied()||n&&a())&&(this.isWidgetApplied()||n)||(this.clearWatcher(),this.callback(Q,t),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)),Tt("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}(),Ct=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)},Tt=function(t,e,n){var r,a=0;try{document.querySelector(t)}catch(e){var i="Selector «".concat(t,"» not valid.");return Ct(i),"function"==typeof n&&n(i)}r=setTimeout(function(){clearInterval(a);var e="Can't find element «".concat(t,"».");return Ct(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 Lt=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 Pt,Rt,It,At,jt,Nt=DATA,Bt=Nt.type,Wt=Nt.animation,Dt=Nt.backgroundColor,zt=Nt.overlayOpacity,qt=Nt.backgroundImage,Mt=Nt.borderRadius,Vt=Nt.borderRadiusImage,Gt=Nt.borderWidth,Yt=Nt.borderColor,Ht=Nt.button,Ft=Nt.buttonBackgroundColor,Jt=Nt.buttonLink,Kt=Nt.buttonText,Ut=Nt.buttonTextColor,Zt=Nt.backgroundCloseButtonColor,$t=Nt.closeButtonColor,Qt=Nt.closeButtonPosition,Xt=Nt.content,te=Nt.customWidth,ee=Nt.title,ne=Nt.layout,re=Nt.videoLink,ae=Nt.widthImageWithText,ie=Nt.widthImageOnly,oe=Nt.autoPlay,se=Nt.triggerEvent,ce=0,le=0,ue=["pageLoad","delay","reengage"].some(function(t){return t===se}),de=Bt.replace(/^\w/,function(t){return t.toUpperCase()}),he="imageOnly"===ne?ie:ae,pe=DATA.image||"https://widgets-images.abtasty.com/image-placeholder.png",me="abtasty-modal__underlay",ye=".abtasty-modal__close";function fe(){return Pt&&Pt.closest("html")}function ge(){le=1,Pt&&Pt.closest("html")&&(Pt.style.display="none"),"video"===Bt&&Pt&&Pt.closest("html")&&(Pt.innerHTML=""),ABTastyEvent("".concat(de," modal closed"),null,TEST_ID),jt.clearWatcher(),setTimeout(function(){Pt&&Pt.closest("html")&&Pt.remove(),setTimeout(function(){return ue?Ee():Ce()},100)},100)}function be(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 ve(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={layout:ne,type:Bt,borderRadius:Mt,borderRadiusImage:Vt,borderWidth:Gt,borderColor:Yt,button:Ht,buttonBackgroundColor:Ft,buttonLink:Jt,buttonText:Kt,buttonTextColor:Ut,backgroundColor:"imageOnly"!==ne?Dt:"initial",overlayOpacity:zt,backgroundImage:qt,image:pe,width:he,videoLink:re,customWidth:te,animation:Wt,title:ee,closeButtonPosition:Qt,backgroundCloseButtonColor:Zt,modalContent:Xt||t.outerHTML};(Pt.className="abtasty-modal abtasty-modal--".concat(Bt),Pt.dataset.testId=TEST_ID,Pt.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"+Lt.attr("href",p,!0,!0)+' target="_self"'+Lt.attr("style",Lt.style({"background-color":h+"!important",color:y+"!important"}),!0,!0)+">")+Lt.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"+(Lt.attr("src",b,!0,!0)+Lt.attr("style",Lt.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"+(Lt.attr("src",b,!0,!0)+Lt.attr("style",Lt.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"+Lt.attr("class",Lt.classes(["abtasty-modal__close",f?"abtasty-modal__close--"+f:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+Lt.attr("style",Lt.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"'+Lt.attr("style",Lt.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"+Lt.attr("style",Lt.style({"background-color":"rgba(0, 0, 0, "+_/100+")"}),!0,!0)+"></abtasty-modal__underlay>")+"<div"+(Lt.attr("class",Lt.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)+Lt.attr("style",Lt.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){Lt.rethrow(t,void 0,void 0,a[void 0])}return n}(e),document.body.appendChild(Pt),Rt=Pt.querySelector(".abtasty-modal__area"),$t)&&(Pt.querySelector("".concat(ye," .close-x")).style.stroke=$t);return new Promise(function(t){t(!0)})}function we(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"),oe&&(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 _e(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function xe(){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=we(re),i=_e(),n.style.height="".concat(i,"px"),"no-title"===ne&&(n.style.border="".concat(Gt,"px solid ").concat(Yt,"!important"),n.style.borderRadius="".concat(Mt,"px!important")),n.src=a,n.frameBorder=0,n.allowfullscreen=!0,s.next=13,r.awrap(ve(n));case 13:return o=s.sent,Rt.style.height="".concat(i,"px"),window.addEventListener("resize",function(){var t=document.querySelector("abtasty-modal iframe"),e=_e();t.style.height="".concat(e,"px"),Rt.style.height="".concat(e,"px")}),s.abrupt("return",o&&new Promise(function(t){t(!0)}));case 17:case"end":return s.stop()}})}function ke(t,e){switch(e||(ce=0),t){case Q:fe()?(Pt.style.display="none",Pt.remove()):(At&&At.clear(),Ee());break;case X:ce?le?Ee():Oe():Ce()}}function Ee(){lt()||(jt=jt||new Ot(It,fe,ke)).watch()}function Se(){le=0,Pt.style.display="block",be("click","".concat(me,", ").concat(ye),function(){ge(),It.setClosingRecurrence()},!0),Ht&&Jt.length&&be("mouseup",".abtasty-modal__button",function(){ge(),It.setValidationRecurrence()},!0),lt()||(Ee(),ce=1,It.setDisplayRecurrence())}function Oe(){var t;return r.async(function(e){for(;;)switch(e.prev=e.next){case 0:if(Pt=Pt||document.createElement("abtasty-modal"),"video"!==Bt){e.next=8;break}return e.next=4,r.awrap(xe());case 4:e.sent&&Se(),e.next=19;break;case 8:if("image"!==Bt||"fit"!==he){e.next=15;break}(t=new Image).src=pe,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(ve(this));case 2:t.sent&&Se(),Rt.style.width="".concat(this.width,"px"),Rt.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(ve());case 17:e.sent&&Se();case 19:return e.abrupt("return",Pt);case 20:case"end":return e.stop()}})}function Ce(){var t;return r.async(function(e){for(;;)switch(e.prev=e.next){case 0:return It=It||new xt(mt()),Ee(),At=At||new St(yt()),e.next=5,r.awrap(At.isTriggered());case 5:return(t=e.sent)&&Oe(),e.abrupt("return",t);case 8:case"end":return e.stop()}})}lt()?Oe():Ce()}();
!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,r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(t,e,r,n){var a=e&&e.prototype instanceof y?e:y,i=Object.create(a.prototype),o=new C(n||[]);return i._invoke=function(t,e,r){var n=u;return function(a,i){if(n===h)throw new Error("Generator is already running");if(n===m){if("throw"===a)throw i;return L()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=E(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===u)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var c=l(t,e,r);if("normal"===c.type){if(n=r.done?m:d,c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=m,r.method="throw",r.arg=c.arg)}}}(t,r,o),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u="suspendedStart",d="suspendedYield",h="executing",m="completed",p={};function y(){}function f(){}function g(){}var b={};b[i]=function(){return this};var v=Object.getPrototypeOf,w=v&&v(v(T([])));w&&w!==r&&n.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(r,a){function i(){return new Promise(function(e,i){!function e(r,a,i,o){var s=l(t[r],t,a);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&n.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)}(r,a,e,i)})}return e=e?e.then(i,i):i()}}function E(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var a=l(n,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,p;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}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 r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};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,r,n,a){var i=new k(c(e,r,n,a));return t.isGeneratorFunction(r)?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 r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},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 r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function a(n,a){return s.type="throw",s.arg=t,r.next=n,a&&(r.method="next",r.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=n.call(o,"catchLoc"),l=n.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 r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.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,p):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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}),r=Object.freeze({default:e,__moduleExports:e}),n=r&&e||r;var a=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}},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 m=function(t){return u(t)||d(t)||h()};var p=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};function y(t,e,r,n,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,a)}var f=function(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(t){y(i,n,a,o,s,"next",t)}function s(t){y(i,n,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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var v=function(t,e,r){return e&&b(t.prototype,e),r&&b(t,r),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 r(n){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=r=function(t){return e(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},r(n)}t.exports=r}),_=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(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(r)}t.exports=e}),T=t(function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(r,n)}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 r,n,a={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(a[r]=t[r]);return a},A=Object.freeze({default:I,__moduleExports:I}),j=A&&I||A;var N=function(t,e){if(null==t)return{};var r,n,a=j(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a};var B=function(t){if(Array.isArray(t))return t},D=Object.freeze({default:B,__moduleExports:B});var W=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")},z=Object.freeze({default:W,__moduleExports:W}),q=D&&B||D,V=z&&W||z;var M=function(t){return q(t)||d(t)||V()},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 r=Object.keys(t);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(t)),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r}function et(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tt(r,!0).forEach(function(e){p(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tt(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var rt,nt={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({},nt,{label:K,propName:"closingRecurrence"}),et({},nt,{label:J,propName:"displayRecurrence"}),et({},nt,{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(m([it,ot,st,ct])),function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")}),ut=((rt="undefined"!=typeof global?global:window).ABTasty||Object.assign(rt,{ABTasty:{widgetutils:{}}}),rt.ABTasty.widgetutils||Object.assign(rt.ABTasty,{widgetutils:{}}),rt).ABTasty.widgetutils;function dt(t,e){return ut.hasOwnProperty(t)||Object.assign(ut,p({},t,new e)),ut[t]}var ht=function(){return"".concat(PACKAGE.replace("@abtasty/","")).concat(DATA&&DATA.type?"_".concat(DATA.type):"")},mt=function(){return"".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID)},pt=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,r=e.triggerEvent,n=e.triggerEventClick,a=e.triggerEventExitDelay,i=e.triggerEventDelay,o=e.triggerEventReengageDelay,s=n;switch(r){case"exitIntent":t=a;break;case"delay":t=i;break;case"reengage":t=o;break;default:t=0}return{triggerEvent:r,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,r){var n=window.document.getElementsByTagName("script")[0],a=window.document.createElement("script");a.src=t,n.parentNode.insertBefore(a,n),a.onload=e,a.onerror=r}));var t}function gt(t){return function(){return f(n.mark(function t(e){return n.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=["pageLoad","delay","reengage"],vt=function(){function t(){var e=this;g(this,t),this.uniqueId=mt(),this.widgetName=ht(),this.recurrenceParams=pt(),this.triggerParams=yt(),this.recurrence=!!this.recurrenceParams&&new xt(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.hasOncePerPageTrigger=!!this.trigger&&bt.some(function(t){return t===e.trigger.event}),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.closedByUser=!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,m(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("html")}},{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(){var t=this;return this.pageWatcher.clearWatcher(),this.domElement&&this.domElement.closest("html")&&this.domElement.remove(),this.styleElement&&this.styleElement.closest("html")&&this.styleElement.remove(),this.hasOncePerPageTrigger?this.pageWatcher.watch():this.init().then(function(e){return e&&t.show()}),this}},{key:"show",value:function(){return this.closedByUser=!1,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.closedByUser=!0,this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){var t=f(n.mark(function t(){var e;return n.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.trigger||!this.trigger.promises.length){t.next=2;break}return t.abrupt("return",!1);case 2:if(e=this.recurrence&&this.recurrence.isOver(),!this.recurrence||e){t.next=6;break}return this.pageWatcher.watch(),t.abrupt("return",!1);case 6:if(lt()||this.pageWatcher.watch(),t.t0=lt()||!this.trigger,t.t0){t.next=15;break}if(t.t1=this.trigger,!t.t1){t.next=14;break}return t.next=13,this.trigger.isTriggered();case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:if(t.t0){t.next=18;break}return t.abrupt("return",!1);case 18:return this.insert(),this.addCloseEvent(),t.abrupt("return",this);case 21:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onPageChange",value:function(t,e){var r=this;switch(e||(this.hasBeenShown=!1),t){case Q:this.isWidgetApplied()?this.remove():this.trigger.clear()&&this.pageWatcher.watch();break;case X:this.hasBeenShown?this.closedByUser?this.pageWatcher.watch():this.insert().show():r.init().then(function(t){return t&&r.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")),r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return n.push.apply(n,m(e)),n.forEach(function(e){e.addEventListener("click",function(){t.recurrence&&t.recurrence.setClosingRecurrence(),t.hide(),setTimeout(function(){return t.remove()},1e3)},{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,vt),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\twidth: auto;\n\t\t\theight: auto;\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 r;return g(this,e),(r=O(this,C(e).call(this))).position=t,r.stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}R(e,vt),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\twidth: auto;\n\t\t\theight: auto;\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,r){var n;return g(this,e),(n=O(this,C(e).call(this))).position=t,n.referrerElement=r,n.stringStyles=n.getStyles(),n.styleElement=n.getStyleTag(n.stringStyles),n}R(e,vt),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\twidth: auto;\n\t\t\theight: auto;\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 wt(t,e){var r=Object.keys(t);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(t)),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r}function _t(t){var e=function(t,e){if("object"!==w(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==w(n))return n;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 xt=function(){function t(e,r){var n=e.displayRecurrence,a=e.closingRecurrence,i=e.validationRecurrence;g(this,t),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(a),this.validationRecurrence=parseFloat(i),this.onSetCallback=r,this.widgetName=ht(),this.uniqueId=mt(),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 r=this.recurrenceKey,n=(e[r],N(e,[r].map(_t)));return Object.entries(n).length?(t.setItem("ABTastyWidgets",JSON.stringify(n)),n):(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 r=this,n=this.getTypeOfStorage(t);if(!n&&"object"!==w(n))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=r.getSessionRecurrence(),n=r.getLocalRecurrence();"session"===i?e?t=r.removeSessionRecurrenceStorage():(r.removeLocalRecurrenceStorage(),t=r.getSessionRecurrenceStorageParsed()):"local"===i&&(n?t=r.removeLocalRecurrenceStorage():(r.removeSessionRecurrenceStorage(),t=r.getLocalRecurrenceStorageParsed()));var a=t?function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wt(r,!0).forEach(function(e){p(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wt(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}(p({},r.recurrenceKey,c),t):p({},r.recurrenceKey,c);o.setItem("ABTastyWidgets",JSON.stringify(a)),r.onSetCallback&&"function"==typeof r.onSetCallback&&r.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}(),kt=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(r){return r.element!==t.target||(e.inViewPortTargets.push(r),!1)}),e.checkElements()):e.inViewPortTargets=e.inViewPortTargets.filter(function(r){return r.element!==t.target||(e.existingTargets.push(r),!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,r){return r(e)||!e.parentElement?e:t(e.parentElement,r)}(t,function(t){return"0"===window.getComputedStyle(t).opacity}).nodeName}},{key:"isElementTopmost",value:function(t){for(var e=t.getBoundingClientRect(),r=[[e.left,e.top],[e.right,e.top],[e.left,e.bottom],[e.right,e.bottom]],n=!1,a=0;!n&&a<r.length;){var i,o=(i=document).elementFromPoint.apply(i,m(r[a]));n=t===o||t.contains(o),a++}return n}},{key:"checkElements",value:function(){var t=this;this.targets=this.targets.filter(function(e){var r=document.querySelector(e.selector);return!r||(t.existingTargets.push(Object.assign(e,{element:r})),t.visibilityobserver.observe(r),!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 r=e.element,n=e.resolve;return!t.isElementVisible(r)||(t.visibilityobserver.unobserve(r),n(r),!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}(),Et=function(){function t(e){var r=e.triggerEvent,n=e.triggerSelector,a=e.triggerDelay;g(this,t),this.event=r,this.selector=n&&n.length?n:"body",this.delay=a,this.elementsSelectors=[],this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[],this.visibilityObservers=[]}return v(t,[{key:"onElementVisible",value:(e=f(n.mark(function e(){var r,a,i,o;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.promiseDeferrer("onElementVisible"),this.promises.push(r),e.next=4,this.onPageLoad();case 4:return a=e.sent,e.next=7,gt("IntersectionObserver");case 7:return i=e.sent,o=dt("VisibilityObserver",kt),this.visibilityObservers.push(o),i&&a&&o.watch(this.selector,r.resolve),e.abrupt("return",r.promise);case 12:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"onPageLoad",value:function(){var e=t.promiseDeferrer("onPageLoad");this.promises.push(e);var r=function(){return"complete"===document.readyState};if(r())e.resolve(!0);else{var n,a=setTimeout(function(){return e.resolve(!1)},2e4),i=["readystatechange",function(){return r()&&!clearTimeout(a)&&!e.resolve(!0)},{passive:!0}];this.timeouts.push(a),this.eventsListeners.push(i),(n=document).addEventListener.apply(n,i)}return e.promise}},{key:"onClick",value:function(){var e,r=this,n=document.createElement("style");n.type="text/css",n.id="Click_".concat(mt()),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 a=t.promiseDeferrer("onClick");this.promises.push(a);var i=["click",function(t){return!!function(t){return m(document.querySelectorAll(r.selector)).some(function(e){return e.isSameNode(t)||!!t.closest(r.selector)})}(t.target)&&(a.resolve(!0),r.clear())},{passive:!0,capture:!0}];return this.eventsListeners.push(i),(e=document).addEventListener.apply(e,i),a.promise}},{key:"onExitIntent",value:function(){var e=this,r=t.promiseDeferrer("onExitIntent");this.promises.push(r);var a=["mouseleave",function(){var t=f(n.mark(function t(){var a,i;return n.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.delay){t.next=6;break}a=1e3*e.delay,i=setTimeout(function(){r.resolve(!0)},a),e.timeouts.push(i),t.next=8;break;case 6:return r.resolve(!0),t.abrupt("return");case 8:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),{passive:!0,once:!0}];return Ct("body",function(t){t.addEventListener.apply(t,a),e.eventsListeners.push([t].concat(a))}),r.promise}},{key:"onDelay",value:function(){var e=t.promiseDeferrer("onDelay");this.promises.push(e);var r=1e3*this.delay,n=setTimeout(function(){e.resolve(!0)},r);return this.timeouts.push(n),e.promise}},{key:"onReengage",value:function(){var e=this,r=t.promiseDeferrer("onReengage");this.promises.push(r);var n=1e3*this.delay,a=n,i=[function(){return a=n},{passive:!0}];["click","mousemove","scroll","keypress"].forEach(function(t){var r;(r=document).addEventListener.apply(r,[t].concat(i)),e.eventsListeners.push([t].concat(i))});var o=setInterval(function(){a<=0?r.resolve(!0):a-=100},100);return this.intervals.push(o),r.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(m(t)):t,r=M(e),n=r[0],a=r.slice(1);n&&a.length>1&&n.removeEventListener.apply(n,m(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(n.mark(function t(){var e;return n.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?9:"exitIntent"===t.t0?14:"delay"===t.t0?19:"reengage"===t.t0?24:"elementVisible"===t.t0?29:34;break;case 4:return t.next=6,this.onPageLoad();case 6:return e=t.sent,this.clear(),t.abrupt("break",35);case 9:return t.next=11,this.onClick();case 11:return e=t.sent,this.clear(),t.abrupt("break",35);case 14:return t.next=16,this.onExitIntent();case 16:return e=t.sent,this.clear(),t.abrupt("break",35);case 19:return t.next=21,this.onDelay();case 21:return e=t.sent,this.clear(),t.abrupt("break",35);case 24:return t.next=26,this.onReengage();case 26:return e=t.sent,this.clear(),t.abrupt("break",35);case 29:return t.next=31,this.onElementVisible();case 31:return e=t.sent,this.clear(),t.abrupt("break",35);case 34:e=!1;case 35:return t.abrupt("return",e);case 36:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}],[{key:"promiseDeferrer",value:function(t){var e={promise:null,resolve:null,reject:null,name:t};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e}}]),t;var e}();var St=function(){function t(e,r,n){g(this,t),this.recurrence=e,this.isWidgetApplied=r,this.callback=n,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,r=!!window.ABTasty.getTestsOnPage()[TEST_ID],n=(this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1}).type,a=function(){return t&&"display"===n||e.recurrenceIsDone()};return!this.isWidgetApplied()&&r&&a()?(this.clearWatcher(),this.callback(X,t)):(!this.isWidgetApplied()||r&&a())&&(this.isWidgetApplied()||r)||(this.clearWatcher(),this.callback(Q,t),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}),r=t.some(function(t){var e=t.addedNodes;return e&&e.length});return e||r?(this.decisionHandler(!0),this):this}},{key:"watch",value:function(){var t,e=this;return this.clearWatcher(),(t=document).addEventListener.apply(t,m(this.eventListenerParams)),Ct("body",function(t){var r,n=[t,{childList:!0,subtree:!0}];(r=e.observer).observe.apply(r,n)}),this}},{key:"clearWatcher",value:function(){var t;return(t=document).removeEventListener.apply(t,m(this.eventListenerParams)),this.observer.disconnect(),this}}]),t}(),Ot=function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];r.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(t=console).log.apply(t,r)},Ct=function(t,e,r){var n,a=0;try{document.querySelector(t)}catch(e){var i="Selector «".concat(t,"» not valid.");return Ot(i),"function"==typeof r&&r(i)}n=setTimeout(function(){clearInterval(a);var e="Can't find element «".concat(t,"».");return Ot(e),"function"==typeof r&&r(e)},1e4),a=setInterval(function(){var r=document.querySelector(t);if(null!==r)return clearTimeout(n),clearInterval(a),"function"==typeof e&&e(r)},200)};!function(t,e){void 0===e&&(e={});var r=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===r&&n.firstChild?n.insertBefore(a,n.firstChild):n.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 r(t,n){return Array.isArray(t)?function(t,e){for(var n,a="",i="",s=Array.isArray(e),c=0;c<t.length;c++)(n=r(t[c]))&&(s&&e[c]&&(n=o(n)),a=a+i+n,i=" ");return a}(t,n):t&&"object"==typeof t?function(t){var r="",n="";for(var a in t)a&&t[a]&&e.call(t,a)&&(r=r+n+a,n=" ");return r}(t):t||""}function n(t){if(!t)return"";if("object"==typeof t){var r="";for(var n in t)e.call(t,n)&&(r=r+n+":"+t[n]+";");return r}return";"!==(t+="")[t.length-1]?t+";":t}function a(t,e,r,n){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(n?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),r||-1===e.indexOf('"'))?(r&&(e=o(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"&#39;")+"'"):""}t.merge=function t(e,r){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 r)if("class"===o){var s=e[o]||[];e[o]=(Array.isArray(s)?s:[s]).concat(r[o]||[])}else if("style"===o){var s=n(e[o]),c=n(r[o]);e[o]=s+c}else e[o]=r[o];return e},t.classes=r,t.style=n,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=r(c),o=a(s,c,!1,i)+o;continue}"style"===s&&(c=n(c)),o+=a(s,c,!1,i)}return o};var i=/["&<>]/;function o(t){var e=""+t,r=i.exec(e);if(!r)return t;var n,a,o,s="";for(n=r.index,a=0;n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}a!==n&&(s+=e.substring(a,n)),a=n+1,s+=o}return a!==n?s+e.substring(a,n):s}return t.escape=o,t.rethrow=function t(e,r,n,a){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&r||a))throw e.message+=" on line "+n,e;try{a=a||require("fs").readFileSync(r,"utf8")}catch(r){t(e,null,n)}var i=3,o=a.split("\n"),s=Math.max(n-i,0),c=Math.min(o.length,n+i);var i=o.slice(s,c).map(function(t,e){var r=e+s+1;return(r==n?" > ":" ")+r+"| "+t}).join("\n");e.path=r;e.message=(r||"Pug")+":"+n+"\n"+i+"\n\n"+e.message;throw e},t}({});var Lt,Pt,Rt,It,At,jt=DATA,Nt=jt.type,Bt=jt.animation,Dt=jt.backgroundColor,Wt=jt.overlayOpacity,zt=jt.backgroundImage,qt=jt.borderRadius,Vt=jt.borderRadiusImage,Mt=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,re=jt.videoLink,ne=jt.widthImageWithText,ae=jt.widthImageOnly,ie=jt.autoPlay,oe=jt.triggerEvent,se=0,ce=0,le=["pageLoad","delay","reengage"].some(function(t){return t===oe}),ue=Nt.replace(/^\w/,function(t){return t.toUpperCase()}),de="imageOnly"===ee?ae:ne,he=DATA.image||"https://widgets-images.abtasty.com/image-placeholder.png",me="abtasty-modal__underlay",pe=".abtasty-modal__close";function ye(){return Lt&&Lt.closest("html")}function fe(){ce=1,Lt&&Lt.closest("html")&&(Lt.style.display="none"),"video"===Nt&&Lt&&Lt.closest("html")&&(Lt.innerHTML=""),ABTastyEvent("".concat(ue," modal closed"),null,TEST_ID),At.clearWatcher(),setTimeout(function(){Lt&&Lt.closest("html")&&Lt.remove(),setTimeout(function(){return le?ke():Oe()},100)},100)}function ge(t,e,r,n){var a,i=[t,function(t){var a=t.target,o=m(document.querySelectorAll(e)).some(function(t){return t.isSameNode(a)||a.closest(e)});return o&&r(),o&&n&&function(t){var e;return(e=document).removeEventListener.apply(e,m(t))}(i)},!0];(a=document).addEventListener.apply(a,i)}function be(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={layout:ee,type:Nt,borderRadius:qt,borderRadiusImage:Vt,borderWidth:Mt,borderColor:Gt,button:Yt,buttonBackgroundColor:Ht,buttonLink:Ft,buttonText:Jt,buttonTextColor:Kt,backgroundColor:"imageOnly"!==ee?Dt:"initial",overlayOpacity:Wt,backgroundImage:zt,image:he,width:de,videoLink:re,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,r="",n={};try{var a={},i=t||{};(function(t,a,i,o,s,c,l,u,d,h,m,p,y,f,g,b,v,w,_,x,k,E){n.button=e=function(){this&&this.block,this&&this.attributes,r=(r=(r+='<div class="abtasty-modal__button">')+"<a"+Tt.attr("href",m,!0,!0)+' target="_self"'+Tt.attr("style",Tt.style({"background-color":h+"!important",color:y+"!important"}),!0,!0)+">")+Tt.escape(null==(e=p)?"":e)+"</a></div>"},n.title=e=function(){this&&this.block,this&&this.attributes,r=(r+='<h2 class="abtasty-modal__title" style="text-align:center;">')+(null==(e=x)?"":e)+"</h2>"},n.imageOnly=e=function(){this&&this.block,this&&this.attributes,r=r+"<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))+">"},n.imageWithText=e=function(){this&&this.block,this&&this.attributes,r+='<div class="abtasty-modal__image">',b&&(r=r+"<img"+(Tt.attr("src",b,!0,!0)+Tt.attr("style",Tt.style({"border-radius":l+"px!important"}),!0,!0))+">"),r+="</div>"},n.content=e=function(){this&&this.block,this&&this.attributes,r+='<div class="abtasty-modal__innertext">',r=(r+="<p>")+(null==(e=w)?"":e)+"</p></div>"},n.closeButton=e=function(){this&&this.block,this&&this.attributes,r=r+"<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)+">",r+='<svg viewbox="0 0 40 40">',r+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>'},n.contentWrapper=e=function(){var t=this&&this.block;this&&this.attributes,r=r+'<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(),r+="</div>"},n.modalWrapper=e=function(){var e=this&&this.block;this&&this.attributes,r=(r=r+"<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(),r+="</div>"},n.modalWrapper.call({block:function(){n.closeButton(),"image"===k&&"imageOnly"===v?(n.imageOnly(),d&&n.button()):n.contentWrapper.call({block:function(){"simple"===k?(r+='<div class="abtasty-modal__text">',"center"===v||"left"===v?(n.title(),n.content(),r+='<div style="clear:both;"></div>'):(n.content(),n.title(),r+='<div style="clear:both;"></div>'),r+="</div>",d&&n.button()):"image"===k?("top"!==v&&"left"!==v||n.imageWithText(),r+='<div class="abtasty-modal__text">',n.title(),n.content(),d&&n.button(),r+="</div>","right"!==v&&"bottom"!==v||n.imageWithText(),r+='<div style="clear:both;"></div>'):"video"===k&&("top"===v&&n.title(),r+=null==(e=w)?"":e,"bottom"===v&&n.title(),d&&n.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 r}(e),document.body.appendChild(Lt),Pt=Lt.querySelector(".abtasty-modal__area"),Zt)&&(Lt.querySelector("".concat(pe," .close-x")).style.stroke=Zt);return new Promise(function(t){t(!0)})}function ve(t){var e,r=t.indexOf("youtu")>-1,n=t.indexOf("vimeo")>-1;if(r){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(n){var i=t.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2];e="//player.vimeo.com/video/".concat(i)}return e}function we(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function _e(){var t,e,r,a,i,o;return n.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t=Date.now(),e="abtasty-widget-video-".concat(t),(r=document.createElement("iframe")).setAttribute("id",e),a=ve(re),i=we(),r.style.height="".concat(i,"px"),"no-title"===ee&&(r.style.border="".concat(Mt,"px solid ").concat(Gt,"!important"),r.style.borderRadius="".concat(qt,"px!important")),r.src=a,r.frameBorder=0,r.allowfullscreen=!0,s.next=13,n.awrap(be(r));case 13:return o=s.sent,Pt.style.height="".concat(i,"px"),window.addEventListener("resize",function(){var t=document.querySelector("abtasty-modal iframe"),e=we();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 xe(t,e){switch(e||(se=0),t){case Q:ye()?(Lt.style.display="none",Lt.remove()):(It&&It.clear(),ke());break;case X:se?ce?ke():Se():Oe()}}function ke(){lt()||(At=At||new St(Rt,ye,xe)).watch()}function Ee(){ce=0,Lt.style.display="block",ge("click","".concat(me,", ").concat(pe),function(){fe(),Rt.setClosingRecurrence()},!0),Yt&&Ft.length&&ge("mouseup",".abtasty-modal__button",function(){fe(),Rt.setValidationRecurrence()},!0),lt()||(ABTastyEvent("".concat(ue," modal displayed"),null,TEST_ID),ke(),se=1,Rt.setDisplayRecurrence())}function Se(){var t;return n.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,n.awrap(_e());case 4:e.sent&&Ee(),e.next=19;break;case 8:if("image"!==Nt||"fit"!==de){e.next=15;break}(t=new Image).src=he,t.className="abtasty-modal__media",t.onload=function(){return n.async(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.awrap(be(this));case 2:t.sent&&Ee(),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,n.awrap(be());case 17:e.sent&&Ee();case 19:return e.abrupt("return",Lt);case 20:case"end":return e.stop()}})}function Oe(){var t;return n.async(function(e){for(;;)switch(e.prev=e.next){case 0:if(!It||!It.promises.length){e.next=2;break}return e.abrupt("return",!1);case 2:return Rt=Rt||new xt(pt()),ke(),It=It||new Et(yt()),e.next=7,n.awrap(It.isTriggered());case 7:return(t=e.sent)&&Se(),e.abrupt("return",t);case 10:case"end":return e.stop()}})}lt()?Se():Oe()}();
{
"name": "@abtasty/modal",
"description": "Widget for AB Tasty",
"version": "2.8.3",
"version": "2.8.4-0",
"form": "dist/form.js",

@@ -44,5 +44,5 @@ "main": "dist/main.js",

"dependencies": {
"@abtasty/widget-utils": "1.12.8-11",
"@abtasty/widget-utils": "1.12.8-13",
"@babel/runtime": "^7.4.2"
}
}
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