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

@abtasty/nps

Package Overview
Dependencies
Maintainers
17
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtasty/nps - npm Package Compare versions

Comparing version 0.3.6 to 0.3.7

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,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var t=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var n=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var r=function(r){return e(r)||t(r)||n()};var o=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};var a=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var i=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var l=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var s=function(e){return a(e)||i(e)||l()};var c=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e};function p(e,t){return e(t={exports:{}},t.exports),t.exports}var f=p(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 n(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=n=function(e){return t(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(r)}e.exports=n});var h=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var m=function(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?h(e):t},y=p(function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}),g=p(function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t});var b=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&&g(e,t)},v=p(function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),i=new B(r||[]);return a._invoke=function(e,t,n){var r=u;return function(o,a){if(r===p)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw a;return O()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=N(i,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===u)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=c(e,t,n);if("normal"===s.type){if(r=n.done?f:d,s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=f,n.method="throw",n.arg=s.arg)}}}(e,n,i),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var u="suspendedStart",d="suspendedYield",p="executing",f="completed",h={};function m(){}function y(){}function g(){}var b={};b[a]=function(){return this};var v=Object.getPrototypeOf,C=v&&v(v(T([])));C&&C!==n&&r.call(C,a)&&(b=C);var k=g.prototype=m.prototype=Object.create(b);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function w(e){var t;this._invoke=function(n,o){function a(){return new Promise(function(t,a){!function t(n,o,a,i){var l=c(e[n],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(u).then(function(e){s.value=e,a(s)},function(e){return t("throw",e,a,i)})}i(l.arg)}(n,o,t,a)})}return t=t?t.then(a,a):a()}}function N(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=c(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function x(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function T(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}return{next:O}}function O(){return{value:t,done:!0}}return y.prototype=k.constructor=g,g.constructor=y,g[l]=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,g):(e.__proto__=g,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(w.prototype),w.prototype[i]=function(){return this},e.AsyncIterator=w,e.async=function(t,n,r,o){var a=new w(s(t,n,r,o));return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},S(k),k[l]="Generator",k[a]=function(){return this},k.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=T,B.prototype={constructor:B,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(E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=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 n=this;function o(r,o){return l.type="throw",l.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}});function C(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}var k=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){C(a,r,o,i,l,"next",e)}function l(e){C(a,r,o,i,l,"throw",e)}i(void 0)})}},S={en:"Recurrence",fr:"Récurrence",es:"Recurrencia",de:"Wiederholung"},w={en:"".concat(S.en," of the display"),fr:"".concat(S.fr," de l'affichage"),es:"".concat(S.es," de la pantalla"),de:"".concat(S.de," der Anzeige")},N={en:"".concat(S.en," after closure"),fr:"".concat(S.fr," après fermeture"),es:"".concat(S.es," después del cierre"),de:"".concat(S.de," nach Schließung")},x={en:"".concat(S.en," after validation"),fr:"".concat(S.fr," après validation"),es:"".concat(S.es," después de la validación"),de:"".concat(S.de," nach der Validierung")},E={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},B={en:"Position in relation to the element",fr:"Position par rapport à l'élément",es:"Posición respecto al elemento",de:"Position relativ zum Element"},T="style",O="content",_="slider",P="https://widgets-images.abtasty.com/";function A(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(n,!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var I={category:"conditions",type:"select",options:[{label:{en:"Every time",fr:"Tout le temps",es:"Cada vez",de:"Jedes Mal"},value:"-1"},{label:{en:"Every session",fr:"Chaque session",es:"En 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"},j=L({},I,{label:N,propName:"closingRecurrence"}),R={category:"conditions",type:"group",label:S,collapsible:!0,children:[L({},I,{label:w,propName:"displayRecurrence"}),j,L({},I,{label:x,propName:"validationRecurrence"})]},z=[{label:{en:"Page load",fr:"Au chargement de la page",es:"Al carga de página",de:"Beim Laden der Seite"},value:"pageLoad"},{label:{en:"Click",fr:"Au clic",es:"Clic",de:"Klick"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet",es:"Al intentar salir ",de:"Exit Intent"},value:"exitIntent"},{label:{en:"Delay",fr:"Après un délai",es:"Después de un tiempo",de:"Verzögert"},value:"delay"},{label:{en:"Reengage (after inactivity)",fr:"Au réengagement (après inactivité)",es:"Despues de inactividad",de:"Nach Inaktivität"},value:"reengage"}],D={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:E,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"}]},F={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"}]},M={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:"",de:"Verzögerung vor dem Posten"},value:10,conditions:[{field:"triggerEvent",value:"delay"}]},W={category:"conditions",type:"group",label:E,collapsible:!0,children:[{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"Se activa al",de:"Triggert bei"},options:z,propName:"triggerEvent",value:"pageLoad"}].concat(s([D,F,M,q]))},H=function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")},V={category:T,type:"colorpicker",label:{en:"Background color",fr:"Couleur de fond",es:"Color de fondo",de:"Hintergrundfarbe"},propName:"backgroundColor",value:"rgba(255, 255, 255, 1)"},K={category:T,type:_,label:{en:"Background opacity",fr:"Opacité du fond",es:"Opacidad de fondo",de:"Hintergrundopazität"},propName:"backgroundOpacity",value:75,unit:"%"},G={category:T,type:"colorpicker",label:{en:"Border color",fr:"Couleur du contour",es:"Color del borde",de:"Farbe der Kontur"},propName:"borderColor",value:"rgba(255, 255, 255, 1)"},Q={category:T,type:_,label:{en:"Border radius",fr:"Arrondi du contour",es:"Radio del borde",de:"Rundung der Kontur"},propName:"borderRadius",value:0,unit:"px"},J={category:T,type:_,label:{en:"Border thickness",fr:"Épaisseur du contour",es:"Grosor del borde",de:"Konturendicke"},propName:"borderWidth",value:0,unit:"px"},U=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"000000",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";c(this,e),this.uniqueId=t,this.widgetContainer=n,this.basicClassName="ab_widget_container_".concat(n),this.widgetContainerId="".concat(this.basicClassName,"_").concat(t),this.contentClassName="".concat(this.basicClassName,"_content"),this.overlayClassName="".concat(this.basicClassName,"_overlay"),this.closeButtonClassName="".concat(this.basicClassName,"_close_button"),this.hideClassName="ab_hide_".concat(t),this.domElement=this.getDom()}return d(e,[{key:"insert",value:function(){var e=this;return Z("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),Z("body",function(t){return t.appendChild(e.domElement)},function(e){return console.error(e)}),this}},{key:"remove",value:function(){return this.domElement.remove(),this.styleElement.remove(),this}},{key:"show",value:function(){return this.domElement.classList.remove(this.hideClassName),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){return this.insert(),this.addCloseEvent(),this}},{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")),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return r.push.apply(r,s(t)),r.forEach(function(t){t.addEventListener("click",function(){e.hide()},!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(H()?"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",H()&&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}(),Y=(function(e){function t(e,n){var r;return c(this,t),(r=m(this,y(t).call(this,e,n))).stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}b(t,U),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\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,n,r){var o;return c(this,t),(o=m(this,y(t).call(this,e,n))).position=r,o.stringStyles=o.getStyles(),o.styleElement=o.getStyleTag(o.stringStyles),o}b(t,U),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\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,n,r,o){var a;return c(this,t),(a=m(this,y(t).call(this,e,n))).position=r,a.referrerElement=o,a.stringStyles=a.getStyles(),a.styleElement=a.getStyleTag(a.stringStyles),a}b(t,U),d(t,[{key:"insert",value:function(){var e=this;return Z("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),Z(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\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(){function e(t){var n=t.displayRecurrence,r=t.closingRecurrence,o=t.validationRecurrence,a=t.widgetName,i=t.uniqueId;c(this,e),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(o),this.storageName="Rec_".concat(a,"_").concat(i),this.currentRecurrence=this.getCurrentRecurrence()}d(e,[{key:"getCurrentRecurrence",value:function(){var e={type:!1},t=sessionStorage.getItem(this.storageName)||localStorage.getItem(this.storageName);try{return JSON.parse(t)||e}catch(t){return e}}},{key:"isOver",value:function(){var e=sessionStorage.getItem(this.storageName),t=localStorage.getItem(this.storageName),n=(t?parseFloat(t):0)<(new Date).getTime();return n&&localStorage.removeItem(this.storageName),n&&!t&&!e}},{key:"setRecurrence",value:function(e,t){var n=this,r=this.getTypeOfStorage(e),o=this.getStamp(e),a={type:t,stamp:o},i=this.currentRecurrence.type,l=function(){sessionStorage.getItem(n.storageName)&&sessionStorage.removeItem(n.storageName),localStorage.getItem(n.storageName)&&localStorage.removeItem(n.storageName),r.setItem(n.storageName,JSON.stringify(a))};if(!r)return!1;if(i&&"validation"!==t)if("closing"===t&&"validation"!==i)l();else{if("display"!==t||"validation"===i||"closing"===i)return!1;l()}else l();return o}},{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?window.localStorage:0===e&&window.sessionStorage)}}])}(),function(){function e(t){var n=t.triggerEvent,r=t.triggerSelector,o=t.triggerDelay;c(this,e),this.event=n,this.selector=r&&r.length?r:"body",this.delay=o}d(e,[{key:"onPageLoad",value:function(){return new Promise(function(e,t){if("complete"!==document.readyState){var n,r=["DOMContentLoaded",function(){return e(!0)},{passive:!0,once:!0}];(n=window).addEventListener.apply(n,r),setTimeout(function(){var e;return(e=window).removeEventListener.apply(e,r),t(!1)},15e3)}return e(!0)})}},{key:"onClick",value:function(){var e=this,t=document.createElement("style");return t.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(t),new Promise(function(n){var r,o=function(t){return s(document.querySelectorAll(e.selector)).some(function(n){return n.isSameNode(t)||!!t.closest(e.selector)})},a=["click",function(e){return!!o(e.target)&&(document.head.removeChild(t),n(!0))},{passive:!0,once:!0,capture:!0}];(r=document).addEventListener.apply(r,a)})}},{key:"onExitIntent",value:function(){var e,t=this;return new Promise((e=k(v.mark(function e(n){var r;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=["mouseleave",function(){if(t.delay){var e=1e3*t.delay;setTimeout(function(){return n(!0)},e)}return n(!0)},{passive:!0,once:!0}],e.next=4,t.onPageLoad();case 4:e.sent&&Z("body",function(e){return e.addEventListener.apply(e,r)});case 6:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},{key:"onDelay",value:function(){var e,t=this;return new Promise((e=k(v.mark(function e(n){var r;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=1e3*t.delay,e.next=3,t.onPageLoad();case 3:e.sent&&setTimeout(function(){return n(!0)},r);case 5:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},{key:"onReengage",value:function(){var e=this;return new Promise(function(t){var n=1e3*e.delay,r=n,o=["click","mousemove","scroll","keypress"],a=[function(){return r=n},{passive:!0}];o.forEach(function(e){var t;return(t=document).addEventListener.apply(t,[e].concat(a))});var i=setInterval(function(){r<=0?(t(!0),clearInterval(i),o.forEach(function(e){var t;return(t=document).removeEventListener.apply(t,[e].concat(a))})):r-=100},100)})}},{key:"isTriggered",value:function(){var e=k(v.mark(function e(){var t;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.event,e.next="pageLoad"===e.t0?3:"click"===e.t0?7:"exitIntent"===e.t0?11:"delay"===e.t0?15:"reengage"===e.t0?19:23;break;case 3:return e.next=5,this.onPageLoad();case 5:return t=e.sent,e.abrupt("break",24);case 7:return e.next=9,this.onClick();case 9:return t=e.sent,e.abrupt("break",24);case 11:return e.next=13,this.onExitIntent();case 13:return t=e.sent,e.abrupt("break",24);case 15:return e.next=17,this.onDelay();case 17:return t=e.sent,e.abrupt("break",24);case 19:return e.next=21,this.onReengage();case 21:return t=e.sent,e.abrupt("break",24);case 23:t=!1;case 24:return e.abrupt("return",t);case 25:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}])}(),function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(e=console).log.apply(e,n)}),Z=function(e,t,n){var r,o=0;try{document.querySelector(e)}catch(t){var a="Selector «".concat(e,"» not valid.");return Y(a),"function"==typeof n&&n(a)}r=setTimeout(function(){clearInterval(o);var t="Can't find element «".concat(e,"».");return Y(t),"function"==typeof n&&n(t)},1e4),o=setInterval(function(){var n=document.querySelector(e);if(null!==n)return clearTimeout(r),clearInterval(o),"function"==typeof t&&t(n)},200)},X='<a href="https://app2.abtasty.com/insights/nps" target="_blank">',$={en:"".concat(X,"Access the NPS© results").concat("</a>"),fr:"".concat(X,"Accéder aux résultats du NPS©").concat("</a>"),es:"".concat(X,"Acceder a los resultados del NPS©").concat("</a>"),de:"".concat(X,"Zugang zu den NPS-Ergebnissen").concat("</a>")},ee={en:"Open-ended question",fr:"Question ouverte",es:"Pregunta abierta",de:"Offene Frage"},te="\ndiv.nps_container\n\tp.nps_container_question\n\tdiv.nps_container_notes\n\t\tbutton.nps_container_notes_button[data-note]\n\t\t\tspan\n\n\tp.nps_container_question_feedback\n\tform.nps_container_question_feedback_form\n\t\tinput.nps_container_question_feedback_input\n\t\tbutton.nps_container_question_feedback_button\n\t\n\tp.nps_container_thanks",ne={en:"The variation CSS can be used to customize\nthe NPS widget.\n\nWe recommend using your browser’s development tools\nto test any changes.\n\nThe Document Object Model (DOM) of the NPS widget\nis as follows:\n".concat(te),fr:"Vous pouvez utiliser l'ajout CSS de la variation\npour personnaliser le Widget NPS.\n\nNous vous recommandons d’utiliser les outils de\ndéveloppement de votre navigateur pour tester vos modifications.\n\nLe Document Object Model (DOM) du widget NPS est le suivant:\n".concat(te),es:"Puedes utilizar el CSS de la variación\npara personalizar el Widget NPS.\n\nTe recomendamos que utilices las herramientas de desarrollo\nde tu navegador para probar las modificaciones.\n\nEl Document Object Model (DOM) del widget NPS es el siguiente:",de:"Sie können die 'CSS hinzufügen'-Funktion der\nVariation wählen, um den Style des NPS nach\nIhren Wünschen anzupassen.\n\nWir empfehlen Ihre Browser Developer Tools zu verwenden,\num Ihre Änderungen zu testen.\n\nHier ist die DOM-Struktur des NPS:"},re=[{field:"isFeedBackQuestion",value:!0}],oe=[{category:O,type:"hidden",propName:"__npsCampaignId",value:!1},{category:O,type:"paragraph",propName:"linkToNPSCampaignsList",text:$},{category:O,type:"textarea",propName:"question",label:{en:"Question",fr:"Question",es:"Pregunta",de:"Frage"},value:{en:"How likely are you to recommend us to a friend or family member ?",fr:"Quelle est la probabilité que vous nous recommandiez à un proche ?",es:"¿ Con qué probabilidad nos recomendarías a un amigo ?",de:"Wie wahrscheinlich ist es, dass Sie uns einem Freund weiterempfehlen ?"}},{category:O,type:"checkbox",propName:"isFeedBackQuestion",label:{en:"Ask an open-ended question",fr:"Poser une question ouverte",es:"Hacer una pregunta abierta",de:"Eine offene Frage stellen"},value:!1},{category:O,type:"textarea",propName:"feedbackQuestion",label:ee,value:{en:"Would you like to leave a comment ?",fr:"Souhaitez-vous laisser un commentaire ?",es:"¿ Tienes algún comentario ?",de:"Wollen Sie uns etwas mitteilen ?"},conditions:re},{category:O,type:"text",propName:"buttonText",label:{en:"Button text",fr:"Texte du bouton",es:"Texto del botón",de:"Button-Text"},value:{en:"Send",fr:"Envoyer",es:"Enviar",de:"Abschicken"},conditions:re},{category:O,type:"checkbox",propName:"isThankYouMessage",label:{en:"Display a thank you message",fr:"Afficher un message de remerciement",es:"Mostrar un mensaje de agradecimiento",de:"Den Besuchern eine Danke-Nachricht anzeigen"},value:!1},{category:O,type:"textarea",propName:"thankYouMessage",label:{en:"Thank you message",fr:"Message de remerciement",es:"Mensaje de agradecimiento",de:"Danke-Botschaft"},value:{en:"Thank you for your reply.",fr:"Merci d'avoir répondu",es:"Gracias por tus respuestas.",de:"Vielen Dank für Ihr Feedback"},conditions:[{field:"isThankYouMessage",value:!0}]},{category:O,type:"checkbox",propName:"isLegend",label:{en:"Display key",fr:"Afficher un légende",es:"Mostrar una leyenda",de:"Legende anzeigen"},value:!1},{category:O,type:"text",propName:"zeroLegend",label:{en:"Key of the lowest rating",fr:"Légende de la note minimale",es:"Leyenda de la nota mínima",de:"Legende neben 0"},value:{en:"Not really",fr:"Très faible",es:"Muy baja",de:"Unwahrscheinlich"},conditions:[{field:"isLegend",value:!0}]},{category:O,type:"text",propName:"tenLegend",label:{en:"Key of the highest rating",fr:"Légende de la note maximale",es:"Leyenda de la nota máxima",de:"Legende neben 10"},value:{en:"Really Really !",fr:"Très élevée",es:"Muy alta",de:"Sehr wahrscheinlich"},conditions:[{field:"isLegend",value:!0}]}],ae=[{category:"layout",type:"radioImage",propName:"layout",label:{en:"Select a layout",fr:"Sélectionnez une mise en page",es:"Seleccione un diseño",de:"Wählen Sie ein Layout"},value:"popin",options:[{label:{en:"Modal",fr:"Pop-in",es:"Pop-up",de:"Pop-in"},value:"popin",src:"".concat(P,"layout/popin.svg")},{label:{en:"Banner",fr:"Bannière",es:"Banner",de:"Banner"},value:"banner",src:"".concat(P,"banner/bottom.png")},{label:{en:"Free placement",fr:"Placement libre",es:"Integrado",de:"Freie Platzierung "},value:"free",src:"".concat(P,"layout/free.svg")}]},{category:"layout",type:"radioImage",propName:"bannerPosition",label:{en:"Adjust the layout",fr:"Ajuster le placement",es:"Ajustar la posición",de:"Position einstellen"},value:"bottom",conditions:[{field:"layout",value:"banner"}],options:[{label:{en:"At the bottom",fr:"En bas",es:"Abajo",de:"Unten"},value:"bottom",src:"".concat(P,"banner/bottom.png")},{label:{en:"At the top",fr:"En haut",es:"Arriba",de:"Oben"},value:"top",src:"".concat(P,"banner/top.png")}]},{category:"layout",type:"selectelement",propName:"npsElementReferrer",label:B,value:"body",conditions:[{field:"layout",value:"free"}]},{category:"layout",type:"select",propName:"npsReferrerInsertType",value:"beforeend",conditions:[{field:"layout",value:"free"}],label:B,options:[{label:{en:"Before",fr:"Avant",es:"Antes",de:"Vor"},value:"beforebegin"},{label:{en:"At the start",fr:"Au début",es:"Al principio",de:"Am Anfang"},value:"afterbegin"},{label:{en:"Before end",fr:"À la fin",es:"Al final",de:"Am ende"},value:"beforeend"},{label:{en:"After",fr:"Après",es:"Después",de:"Hinter"},value:"afterend"}]},{category:"layout",type:"radio",propName:"contentDirection",value:"column",label:{en:"Text position",fr:"Positionnement du contenu",es:"Posición del texto",de:"Ausrichtung des Inhalts"},options:[{label:{en:"Above",fr:"Au-dessus",es:"Por encima",de:"Spalte"},value:"column"},{label:{en:"At the left",fr:"À gauche",es:"A la izquierda",de:"Reihe"},value:"row"}]}],ie=[R,W,{category:"conditions",type:"checkbox",propName:"autoHide",value:!0,label:{en:"Auto hide after user validation",fr:"Masquer automatiquement après la validation",es:"",de:"Nach der Freigabe automatisch ausblenden"}},{category:"conditions",type:"number",propName:"timeHide",value:2,label:{en:"Hide after x seconds",fr:"Masquer après x secondes",es:"",de:"Nach X Sekunden ausblenden"},conditions:[{field:"autoHide",value:!0}]}];var le=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};function se(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(n,!0).forEach(function(t){le(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ue="rgba(255, 255, 255, 1)",de="rgba(16, 121, 255, 1)",pe=[{field:"themeType",value:"theme"}],fe=[{field:"buttonsContrast",value:"full"}],he=[{field:"buttonsContrast",value:"empty"}],me={borderWidth:2,borderRadius:10,borderColor:de,backgroundColor:ue,overlayColor:"rgba(0, 0, 0, 1)",overlayOpacity:50,textColor:de,questionMargin:15,horizontalPaddingContainer:20,verticalPaddingContainer:15,horizontalMarginContainer:0,verticalMarginContainer:0,dropShadow:!1,shadowOpacity:0,buttonsHorizontalMargin:5,buttonsContrast:"full",buttonsShape:"roundsquare",buttonsBorderRadius:8,buttonsBackgroundColor_full:de,buttonsBackgroundColor_empty:ue,buttonsTextColor_full:ue,buttonsTextColor_empty:de,buttonsBorderColor_full:de,buttonsBorderColor_empty:de,buttonsBorderWidth_full:0,buttonsBorderWidth_empty:2,inputBackgroundColor:ue,inputBorderColor:de,inputBorderWidth:2,inputBorderRadius:8,inputTextColor:de,inputMarginWithButton:10,feedbackButtonBackgroundColor:ue,feedbackButtonBorderColor:de,feedbackButtonBorderWidth:2,feedbackButtonBorderRadius:8,feedbackButtonTextColor:de},ye=[{themeValue:"lightTheme",defaultValues:ce({},me)},{themeValue:"darkTheme",defaultValues:ce({},me,{borderColor:de,backgroundColor:de,overlayOpacity:75,textColor:ue,buttonsContrast:"empty",buttonsBackgroundColor_full:ue,buttonsBackgroundColor_empty:de,buttonsTextColor_full:de,buttonsTextColor_empty:ue,buttonsBorderColor_full:ue,buttonsBorderColor_empty:ue,buttonsBorderWidth_full:2,buttonsBorderWidth_empty:2,inputBackgroundColor:de,inputBorderColor:ue,inputTextColor:ue,feedbackButtonBackgroundColor:de,feedbackButtonBorderColor:ue,feedbackButtonTextColor:ue})}],ge={category:T,type:"group",collapsible:!0,conditions:pe},be={category:T,type:"colorpicker",label:{en:"Buttons background color",fr:"Couleur de fond des boutons",es:"Color de fondo de los botones",de:"Hintergrundfarbe der Tasten"},propName:"buttonsBackgroundColor",value:ue},ve={category:T,type:"colorpicker",label:{en:"Buttons text color",fr:"Couleur de texte des boutons",es:"Color del texto de los botones",de:"Textfarbe der Schaltflächen"},propName:"buttonsTextColor",value:de},Ce={category:T,type:"colorpicker",label:{en:"Buttons border color",fr:"Couleur du contour des boutons",es:"Color del contorno de los botones",de:"Farbe der Schaltflächenkontur"},propName:"buttonsBorderColor",value:de},ke={category:T,type:_,label:{en:"Buttons border thickness",fr:"Épaisseur du contour des boutons",es:"Grosor del contorno de los botones",de:"Stärke des Umrisses der Schaltflächen"},propName:"buttonsBorderWidth",value:2,unit:"px"},Se={category:T,type:"radio",propName:"stepToShow",value:"displayNoteStep",label:{en:"Section to be personalized",fr:"Partie à personnaliser",es:"Parte personalizable",de:"Schritt zur Bearbeitung"},options:[{label:{en:"Notes",fr:"Notes",es:"Notas",de:"Notiz"},value:"displayNoteStep"},{label:ee,value:"displayFeedbackStep"},{label:{en:"Thanks",fr:"Remerciement",es:"Gracias",de:"Dank"},value:"displayThanksStep"}]},we=ce({},V,{propName:"overlayColor",label:{en:"Overlay color",fr:"Couleur de l'arrière-plan",es:"Color del segundo plano",de:"Overlay-Farbe"}}),Ne=ce({},K,{propName:"overlayOpacity",label:{en:"Overlay opacity",fr:"Opacité de l'overlay",es:"Opacidad superpuesta",de:"Deckkraft überlagern"}}),xe={category:T,type:"radioImage",propName:"themeType",label:{en:"Type of personalization",fr:"Type de personnalisation",es:"Tipo de personalización",de:"Typ auswählen"},value:"theme",options:[{label:{en:"Theme",fr:"Thème",es:"Tema",de:"Typ"},value:"theme",src:"".concat(P,"style/theme.svg")},{label:{en:"Custom CSS",fr:"CSS Personnalisé",es:"CSS personalizado",de:"Custom CSS"},value:"customCss",src:"".concat(P,"style/custom.svg")}]},Ee={category:T,type:"paragraph",propName:"customCssDetails",text:ne,conditions:[{field:"themeType",value:"customCss"}]},Be={category:T,type:"radio",propName:"theme",label:{en:"Select an appearance",fr:"Sélectionner une apparence",es:"Seleccionar una apariencia",de:"Thema auswählen"},value:"lightTheme",conditions:pe,options:[{label:ce({},{en:"Light",fr:"Clair",es:"Claro",de:"Hell"},{fr:"Claire"}),value:"lightTheme"},{label:{en:"Dark",fr:"Sombre",es:"Oscuro",de:"Dunkel"},value:"darkTheme"}]},Te=[ce({},ge,{label:{en:"Border",fr:"Contour",es:"Borde",de:"Kontur"},conditions:pe,children:[J,Q,G]}),ce({},ge,{label:{en:"Background",fr:"Fond",es:"Fondo",de:"Hintergrund"},conditions:pe,children:[V,we,Ne]}),ce({},ge,{label:{en:"Container",fr:"Conteneur",es:"Container",de:"Container"},children:[{category:T,type:"colorpicker",label:{en:"Text color",fr:"Couleur du texte",es:"Color del texto",de:"Textfarbe"},propName:"textColor",value:de},{category:T,type:_,label:{en:"Question / Reply spacing",fr:"Espacement Question / Réponse",es:"Espaciado entre la pregunta y la respuesta",de:"Margin Frage/Antwort"},propName:"questionMargin",value:15,unit:"px"},{category:T,type:_,label:{en:"Horizontal padding",fr:"Padding horizontal",es:"Relleno horizontal",de:"Horizontale Polsterung"},propName:"horizontalPaddingContainer",value:0,unit:"px"},{category:T,type:_,label:{en:"Vertical padding",fr:"Padding vertical",es:"Acolchado vertical",de:"Vertikale Polsterung"},propName:"verticalPaddingContainer",value:0,unit:"px"},{category:T,type:_,label:{en:"Horizontal margin",fr:"Marges horizontales",es:"Margen horizontal",de:"Horizontaler Rand"},propName:"horizontalMarginContainer",value:0,unit:"px"},{category:T,type:_,label:{en:"Vertical margin",fr:"Marges verticales",es:"Margen vertical",de:"Vertikaler Rand"},propName:"verticalMarginContainer",value:0,unit:"px"},{category:T,type:"switch",label:{en:"Drop shadow",fr:"Ombre portée",es:"Sombra",de:"Schatten"},propName:"dropShadow",value:!1},{category:T,type:_,label:{en:"Shadow opacity",fr:"Opacité de l'ombre",es:"Opacidad de las sombras",de:"Schattenopazität"},propName:"shadowOpacity",value:0,unit:"%",conditions:[{field:"dropShadow",value:!0}]}]}),ce({},ge,{label:{en:"Buttons style",fr:"Style des boutons",es:"Estilo de botón",de:"Schaltflächenstil"},conditions:[{field:"themeType",value:"theme"},{field:"stepToShow",value:"displayNoteStep"}],children:[{category:T,type:_,label:{en:"Margin between buttons",fr:"Espace entre les boutons",es:"",de:"Abstand zwischen den Buttons"},propName:"buttonsHorizontalMargin",value:5,unit:"px"},{category:T,type:"radioImage",label:{en:"Buttons contrast",fr:"Contraste des boutons",es:"Contraste de los botones",de:"Kontrast der Tasten"},propName:"buttonsContrast",value:"full",options:[{value:"full",src:"".concat(P,"nps/button-contrast-1.svg")},{value:"empty",src:"".concat(P,"nps/button-contrast-2.svg")}]},{category:T,type:"radioImage",label:{en:"Buttons shape",fr:"Forme des boutons",es:"Forma de boton",de:"Knopfform"},propName:"buttonsShape",value:"roundsquare",options:[{value:"square",src:"".concat(P,"nps/button-shape-1.svg")},{value:"roundsquare",src:"".concat(P,"nps/button-shape-2.svg")},{value:"round",src:"".concat(P,"nps/button-shape-3.svg")}]},{category:T,type:_,label:{en:"Buttons border radius",fr:"Arrondi de la bordure des boutons",es:"Contorno del borde de los botones",de:"Konturradius der Buttons"},propName:"buttonsBorderRadius",value:8,unit:"px",min:1,conditions:[{field:"buttonsShape",value:"roundsquare"}]},ce({},be,{conditions:fe,propName:"".concat(be.propName,"_full")}),ce({},be,{conditions:he,propName:"".concat(be.propName,"_empty")}),ce({},ve,{conditions:fe,propName:"".concat(ve.propName,"_full")}),ce({},ve,{conditions:he,propName:"".concat(ve.propName,"_empty")}),ce({},Ce,{conditions:fe,propName:"".concat(Ce.propName,"_full")}),ce({},Ce,{conditions:he,propName:"".concat(Ce.propName,"_empty")}),ce({},ke,{conditions:fe,propName:"".concat(ke.propName,"_full")}),ce({},ke,{conditions:he,propName:"".concat(ke.propName,"_empty")})]}),ce({},ge,{label:{en:"Field style",fr:"Style du champ",es:"Estilo del campo",de:"Input-Styles"},conditions:[{field:"themeType",value:"theme"},{field:"stepToShow",value:"displayFeedbackStep"}],children:[{category:T,type:"colorpicker",label:{en:"Comment field background color",fr:"Couleur de fond du champ commentaire",es:"Color de fondo del campo Comentarios",de:"Hintergrundfarbe Feedback Input"},propName:"inputBackgroundColor",value:ue},{category:T,type:"colorpicker",label:{en:"Comment field border color",fr:"Couleur de la bordure du champ commentaire",es:"Color del borde del campo Comentarios",de:"Konturfarbe Feedback Input"},propName:"inputBorderColor",value:de},{category:T,type:_,label:{en:"Comment field border thickness",fr:"Épaisseur de la bordure du champ commentaire",es:"Grosor del borde del campo Comentarios",de:"Konturbreite Feedback Input"},propName:"inputBorderWidth",value:1,unit:"px"},{category:T,type:_,label:{en:"Comment field border radius",fr:"Arrondi de la bordure du champ commentaire",es:"Contorno del borde del campo Comentarios",de:"Konturradius Feedback Input"},propName:"inputBorderRadius",value:8,unit:"px"},{category:T,type:"colorpicker",label:{en:"Comment field text color",fr:"Couleur du texte du champ commentaire",es:"Color del texto del campo Comentarios",de:"Textfarbe Feedback Input"},propName:"inputTextColor",value:de},{category:T,type:_,label:{en:"Spacing between the field and the send button",fr:"Espace entre le champ et le bouton d’envoi",es:"Espacio entre el campo y el botón de envío",de:"Abstand mit Button"},propName:"inputMarginWithButton",value:10,unit:"px"}]}),ce({},ge,{label:{en:"Send button style",fr:"Style du bouton d'envoi",es:"Estilo del botón de envío",de:"Style Abschicken-Button"},conditions:[{field:"themeType",value:"theme"},{field:"stepToShow",value:"displayFeedbackStep"}],children:[{category:T,type:"colorpicker",label:{en:"Send button background color",fr:"Couleur de fond du bouton d’envoi",es:"Color de fondo del botón de envío",de:"Hintergrundfarbe Abschicken-Button"},propName:"feedbackButtonBackgroundColor",value:ue},{category:T,type:"colorpicker",label:{en:"Send button border color",fr:"Couleur de la bordure du bouton d’envoi",es:"Color del borde del botón de envío",de:"Konturfarbe Feedback Button"},propName:"feedbackButtonBorderColor",value:de},{category:T,type:_,label:{en:"Send button border thickness",fr:"Épaisseur de la bordure du bouton d’envoi",es:"Grosor del borde del botón de envío",de:"Konturbreite Feedback Button"},propName:"feedbackButtonBorderWidth",value:1,unit:"px"},{category:T,type:_,label:{en:"Send button border radius",fr:"Arrondi de la bordure du bouton d'envoi",es:"Contorno del borde del botón de envío",de:"Konturradius Feedback Button"},propName:"feedbackButtonBorderRadius",value:8,unit:"px"},{category:T,type:"colorpicker",label:{en:"Send button text color",fr:"Couleur du texte du bouton d’envoi",es:"Color del texto del botón de envío",de:"Textfarbe Feedback Button"},propName:"feedbackButtonTextColor",value:de}]})];function Oe(e,t,n){return e.map(function(e){var o=e.propName,a=e.conditions,i=t[o],l="".concat(n,"_").concat(o),s=function(e,t){return e&&e.length>0&&e.reduce(function(e,n){var o=n.field,a=n.value;return[].concat(r(e),[{field:"".concat(t,"_").concat(o),value:a}])},[])}(a,n),c=ce({},e,{value:i,propName:l});return s&&s.length&&(c.conditions=s),c})}var _e=ye.map(function(e){var t=e.themeValue,n=e.defaultValues;return function(e,t,n){return e.map(function(e){var o=e.conditions,a=e.children;return ce({},e,{conditions:[].concat(r(o),[{field:"theme",value:t}]),children:Oe(a,n,t)})})}([].concat(Te),t,n)}).flat(),Pe=[Se,xe,Ee,Be].concat(r(_e));return[].concat(r(ie),r(oe),r(ae),r(Pe))});
!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,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var t=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var n=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var r=function(r){return e(r)||t(r)||n()};var o=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};var a=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}};var i=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var l=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var s=function(e){return a(e)||i(e)||l()};var c=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e};function p(e,t){return e(t={exports:{}},t.exports),t.exports}var f=p(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 n(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=n=function(e){return t(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(r)}e.exports=n});var h=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var m=function(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?h(e):t},y=p(function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}),g=p(function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t});var b=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&&g(e,t)},v=p(function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),i=new B(r||[]);return a._invoke=function(e,t,n){var r=u;return function(o,a){if(r===p)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw a;return O()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=N(i,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===u)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=c(e,t,n);if("normal"===s.type){if(r=n.done?f:d,s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=f,n.method="throw",n.arg=s.arg)}}}(e,n,i),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var u="suspendedStart",d="suspendedYield",p="executing",f="completed",h={};function m(){}function y(){}function g(){}var b={};b[a]=function(){return this};var v=Object.getPrototypeOf,C=v&&v(v(T([])));C&&C!==n&&r.call(C,a)&&(b=C);var k=g.prototype=m.prototype=Object.create(b);function S(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function w(e){var t;this._invoke=function(n,o){function a(){return new Promise(function(t,a){!function t(n,o,a,i){var l=c(e[n],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,a,i)},function(e){t("throw",e,a,i)}):Promise.resolve(u).then(function(e){s.value=e,a(s)},function(e){return t("throw",e,a,i)})}i(l.arg)}(n,o,t,a)})}return t=t?t.then(a,a):a()}}function N(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=c(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function x(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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function T(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}return{next:O}}function O(){return{value:t,done:!0}}return y.prototype=k.constructor=g,g.constructor=y,g[l]=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,g):(e.__proto__=g,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(w.prototype),w.prototype[i]=function(){return this},e.AsyncIterator=w,e.async=function(t,n,r,o){var a=new w(s(t,n,r,o));return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},S(k),k[l]="Generator",k[a]=function(){return this},k.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=T,B.prototype={constructor:B,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(E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=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 n=this;function o(r,o){return l.type="throw",l.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},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),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}});function C(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}var k=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){C(a,r,o,i,l,"next",e)}function l(e){C(a,r,o,i,l,"throw",e)}i(void 0)})}},S={en:"Recurrence",fr:"Récurrence",es:"Recurrencia",de:"Wiederholung"},w={en:"".concat(S.en," of the display"),fr:"".concat(S.fr," de l'affichage"),es:"".concat(S.es," de la pantalla"),de:"".concat(S.de," der Anzeige")},N={en:"".concat(S.en," after closure"),fr:"".concat(S.fr," après fermeture"),es:"".concat(S.es," después del cierre"),de:"".concat(S.de," nach Schließung")},x={en:"".concat(S.en," after validation"),fr:"".concat(S.fr," après validation"),es:"".concat(S.es," después de la validación"),de:"".concat(S.de," nach der Validierung")},E={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},B={en:"Position in relation to the element",fr:"Position par rapport à l'élément",es:"Posición respecto al elemento",de:"Position relativ zum Element"},T="style",O="content",_="slider",P="https://widgets-images.abtasty.com/";function A(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(n,!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var I={category:"conditions",type:"select",options:[{label:{en:"Every time",fr:"Tout le temps",es:"Cada vez",de:"Jedes Mal"},value:"-1"},{label:{en:"Every session",fr:"Chaque session",es:"En 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"},j=L({},I,{label:N,propName:"closingRecurrence"}),R={category:"conditions",type:"group",label:S,collapsible:!0,children:[L({},I,{label:w,propName:"displayRecurrence"}),j,L({},I,{label:x,propName:"validationRecurrence"})]},z=[{label:{en:"Page load",fr:"Au chargement de la page",es:"Al carga de página",de:"Beim Laden der Seite"},value:"pageLoad"},{label:{en:"Click",fr:"Au clic",es:"Clic",de:"Klick"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet",es:"Al intentar salir ",de:"Exit Intent"},value:"exitIntent"},{label:{en:"Delay",fr:"Après un délai",es:"Después de un tiempo",de:"Verzögert"},value:"delay"},{label:{en:"Reengage (after inactivity)",fr:"Au réengagement (après inactivité)",es:"Despues de inactividad",de:"Nach Inaktivität"},value:"reengage"}],D={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:E,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"}]},F={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"}]},M={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"}]},W={category:"conditions",type:"group",label:E,collapsible:!0,children:[{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"Se activa al",de:"Triggert bei"},options:z,propName:"triggerEvent",value:"pageLoad"}].concat(s([D,F,M,q]))},H=function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")},V={category:T,type:"colorpicker",label:{en:"Background color",fr:"Couleur de fond",es:"Color de fondo",de:"Hintergrundfarbe"},propName:"backgroundColor",value:"rgba(255, 255, 255, 1)"},K={category:T,type:_,label:{en:"Background opacity",fr:"Opacité du fond",es:"Opacidad de fondo",de:"Hintergrundopazität"},propName:"backgroundOpacity",value:75,unit:"%"},G={category:T,type:"colorpicker",label:{en:"Border color",fr:"Couleur du contour",es:"Color del borde",de:"Farbe der Kontur"},propName:"borderColor",value:"rgba(255, 255, 255, 1)"},Q={category:T,type:_,label:{en:"Border radius",fr:"Arrondi du contour",es:"Radio del borde",de:"Rundung der Kontur"},propName:"borderRadius",value:0,unit:"px"},J={category:T,type:_,label:{en:"Border thickness",fr:"Épaisseur du contour",es:"Grosor del borde",de:"Konturendicke"},propName:"borderWidth",value:0,unit:"px"},U=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"000000",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";c(this,e),this.uniqueId=t,this.widgetContainer=n,this.basicClassName="ab_widget_container_".concat(n),this.widgetContainerId="".concat(this.basicClassName,"_").concat(t),this.contentClassName="".concat(this.basicClassName,"_content"),this.overlayClassName="".concat(this.basicClassName,"_overlay"),this.closeButtonClassName="".concat(this.basicClassName,"_close_button"),this.hideClassName="ab_hide_".concat(t),this.domElement=this.getDom()}return d(e,[{key:"insert",value:function(){var e=this;return Z("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),Z("body",function(t){return t.appendChild(e.domElement)},function(e){return console.error(e)}),this}},{key:"remove",value:function(){return this.domElement.remove(),this.styleElement.remove(),this}},{key:"show",value:function(){return this.domElement.classList.remove(this.hideClassName),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){return this.insert(),this.addCloseEvent(),this}},{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")),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return r.push.apply(r,s(t)),r.forEach(function(t){t.addEventListener("click",function(){e.hide()},!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(H()?"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",H()&&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}(),Y=(function(e){function t(e,n){var r;return c(this,t),(r=m(this,y(t).call(this,e,n))).stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}b(t,U),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\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,n,r){var o;return c(this,t),(o=m(this,y(t).call(this,e,n))).position=r,o.stringStyles=o.getStyles(),o.styleElement=o.getStyleTag(o.stringStyles),o}b(t,U),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\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,n,r,o){var a;return c(this,t),(a=m(this,y(t).call(this,e,n))).position=r,a.referrerElement=o,a.stringStyles=a.getStyles(),a.styleElement=a.getStyleTag(a.stringStyles),a}b(t,U),d(t,[{key:"insert",value:function(){var e=this;return Z("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),Z(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\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(){function e(t){var n=t.displayRecurrence,r=t.closingRecurrence,o=t.validationRecurrence,a=t.widgetName,i=t.uniqueId;c(this,e),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(o),this.storageName="Rec_".concat(a,"_").concat(i),this.currentRecurrence=this.getCurrentRecurrence()}d(e,[{key:"getCurrentRecurrence",value:function(){var e={type:!1},t=sessionStorage.getItem(this.storageName)||localStorage.getItem(this.storageName);try{return JSON.parse(t)||e}catch(t){return e}}},{key:"isOver",value:function(){var e=sessionStorage.getItem(this.storageName),t=localStorage.getItem(this.storageName),n=(t?parseFloat(t):0)<(new Date).getTime();return n&&localStorage.removeItem(this.storageName),n&&!t&&!e}},{key:"setRecurrence",value:function(e,t){var n=this,r=this.getTypeOfStorage(e),o=this.getStamp(e),a={type:t,stamp:o},i=this.currentRecurrence.type,l=function(){sessionStorage.getItem(n.storageName)&&sessionStorage.removeItem(n.storageName),localStorage.getItem(n.storageName)&&localStorage.removeItem(n.storageName),r.setItem(n.storageName,JSON.stringify(a))};if(!r)return!1;if(i&&"validation"!==t)if("closing"===t&&"validation"!==i)l();else{if("display"!==t||"validation"===i||"closing"===i)return!1;l()}else l();return o}},{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?window.localStorage:0===e&&window.sessionStorage)}}])}(),function(){function e(t){var n=t.triggerEvent,r=t.triggerSelector,o=t.triggerDelay;c(this,e),this.event=n,this.selector=r&&r.length?r:"body",this.delay=o}d(e,[{key:"onPageLoad",value:function(){return new Promise(function(e,t){if("complete"!==document.readyState){var n,r=["DOMContentLoaded",function(){return e(!0)},{passive:!0,once:!0}];(n=window).addEventListener.apply(n,r),setTimeout(function(){var e;return(e=window).removeEventListener.apply(e,r),t(!1)},15e3)}return e(!0)})}},{key:"onClick",value:function(){var e=this,t=document.createElement("style");return t.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(t),new Promise(function(n){var r,o=function(t){return s(document.querySelectorAll(e.selector)).some(function(n){return n.isSameNode(t)||!!t.closest(e.selector)})},a=["click",function(e){return!!o(e.target)&&(document.head.removeChild(t),n(!0))},{passive:!0,once:!0,capture:!0}];(r=document).addEventListener.apply(r,a)})}},{key:"onExitIntent",value:function(){var e,t=this;return new Promise((e=k(v.mark(function e(n){var r;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=["mouseleave",function(){if(t.delay){var e=1e3*t.delay;setTimeout(function(){return n(!0)},e)}return n(!0)},{passive:!0,once:!0}],e.next=4,t.onPageLoad();case 4:e.sent&&Z("body",function(e){return e.addEventListener.apply(e,r)});case 6:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},{key:"onDelay",value:function(){var e,t=this;return new Promise((e=k(v.mark(function e(n){var r;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=1e3*t.delay,e.next=3,t.onPageLoad();case 3:e.sent&&setTimeout(function(){return n(!0)},r);case 5:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},{key:"onReengage",value:function(){var e=this;return new Promise(function(t){var n=1e3*e.delay,r=n,o=["click","mousemove","scroll","keypress"],a=[function(){return r=n},{passive:!0}];o.forEach(function(e){var t;return(t=document).addEventListener.apply(t,[e].concat(a))});var i=setInterval(function(){r<=0?(t(!0),clearInterval(i),o.forEach(function(e){var t;return(t=document).removeEventListener.apply(t,[e].concat(a))})):r-=100},100)})}},{key:"isTriggered",value:function(){var e=k(v.mark(function e(){var t;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this.event,e.next="pageLoad"===e.t0?3:"click"===e.t0?7:"exitIntent"===e.t0?11:"delay"===e.t0?15:"reengage"===e.t0?19:23;break;case 3:return e.next=5,this.onPageLoad();case 5:return t=e.sent,e.abrupt("break",24);case 7:return e.next=9,this.onClick();case 9:return t=e.sent,e.abrupt("break",24);case 11:return e.next=13,this.onExitIntent();case 13:return t=e.sent,e.abrupt("break",24);case 15:return e.next=17,this.onDelay();case 17:return t=e.sent,e.abrupt("break",24);case 19:return e.next=21,this.onReengage();case 21:return t=e.sent,e.abrupt("break",24);case 23:t=!1;case 24:return e.abrupt("return",t);case 25:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}])}(),function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.unshift("[AB Tasty Widget] ".concat(PACKAGE,":")),(e=console).log.apply(e,n)}),Z=function(e,t,n){var r,o=0;try{document.querySelector(e)}catch(t){var a="Selector «".concat(e,"» not valid.");return Y(a),"function"==typeof n&&n(a)}r=setTimeout(function(){clearInterval(o);var t="Can't find element «".concat(e,"».");return Y(t),"function"==typeof n&&n(t)},1e4),o=setInterval(function(){var n=document.querySelector(e);if(null!==n)return clearTimeout(r),clearInterval(o),"function"==typeof t&&t(n)},200)},X='<a href="https://app2.abtasty.com/insights/nps" target="_blank">',$={en:"".concat(X,"Access the NPS© results").concat("</a>"),fr:"".concat(X,"Accéder aux résultats du NPS©").concat("</a>"),es:"".concat(X,"Acceder a los resultados del NPS©").concat("</a>"),de:"".concat(X,"Zugang zu den NPS-Ergebnissen").concat("</a>")},ee={en:"Open-ended question",fr:"Question ouverte",es:"Pregunta abierta",de:"Offene Frage"},te="\ndiv.nps_container\n\tp.nps_container_question\n\tdiv.nps_container_notes\n\t\tbutton.nps_container_notes_button[data-note]\n\t\t\tspan\n\n\tp.nps_container_question_feedback\n\tform.nps_container_question_feedback_form\n\t\tinput.nps_container_question_feedback_input\n\t\tbutton.nps_container_question_feedback_button\n\t\n\tp.nps_container_thanks",ne={en:"The variation CSS can be used to customize\nthe NPS widget.\n\nWe recommend using your browser’s development tools\nto test any changes.\n\nThe Document Object Model (DOM) of the NPS widget\nis as follows:\n".concat(te),fr:"Vous pouvez utiliser l'ajout CSS de la variation\npour personnaliser le Widget NPS.\n\nNous vous recommandons d’utiliser les outils de\ndéveloppement de votre navigateur pour tester vos modifications.\n\nLe Document Object Model (DOM) du widget NPS est le suivant:\n".concat(te),es:"Puedes utilizar el CSS de la variación\npara personalizar el Widget NPS.\n\nTe recomendamos que utilices las herramientas de desarrollo\nde tu navegador para probar las modificaciones.\n\nEl Document Object Model (DOM) del widget NPS es el siguiente:",de:"Sie können die 'CSS hinzufügen'-Funktion der\nVariation wählen, um den Style des NPS nach\nIhren Wünschen anzupassen.\n\nWir empfehlen Ihre Browser Developer Tools zu verwenden,\num Ihre Änderungen zu testen.\n\nHier ist die DOM-Struktur des NPS:"},re=[{field:"isFeedBackQuestion",value:!0}],oe=[{category:O,type:"hidden",propName:"__npsCampaignId",value:!1},{category:O,type:"paragraph",propName:"linkToNPSCampaignsList",text:$},{category:O,type:"textarea",propName:"question",label:{en:"Question",fr:"Question",es:"Pregunta",de:"Frage"},value:{en:"How likely are you to recommend us to a friend or family member ?",fr:"Quelle est la probabilité que vous nous recommandiez à un proche ?",es:"¿ Con qué probabilidad nos recomendarías a un amigo ?",de:"Wie wahrscheinlich ist es, dass Sie uns einem Freund weiterempfehlen ?"}},{category:O,type:"checkbox",propName:"isFeedBackQuestion",label:{en:"Ask an open-ended question",fr:"Poser une question ouverte",es:"Hacer una pregunta abierta",de:"Eine offene Frage stellen"},value:!1},{category:O,type:"textarea",propName:"feedbackQuestion",label:ee,value:{en:"Would you like to leave a comment ?",fr:"Souhaitez-vous laisser un commentaire ?",es:"¿ Tienes algún comentario ?",de:"Wollen Sie uns etwas mitteilen ?"},conditions:re},{category:O,type:"text",propName:"buttonText",label:{en:"Button text",fr:"Texte du bouton",es:"Texto del botón",de:"Button-Text"},value:{en:"Send",fr:"Envoyer",es:"Enviar",de:"Abschicken"},conditions:re},{category:O,type:"checkbox",propName:"isThankYouMessage",label:{en:"Display a thank you message",fr:"Afficher un message de remerciement",es:"Mostrar un mensaje de agradecimiento",de:"Den Besuchern eine Danke-Nachricht anzeigen"},value:!1},{category:O,type:"textarea",propName:"thankYouMessage",label:{en:"Thank you message",fr:"Message de remerciement",es:"Mensaje de agradecimiento",de:"Danke-Botschaft"},value:{en:"Thank you for your reply.",fr:"Merci d'avoir répondu",es:"Gracias por tus respuestas.",de:"Vielen Dank für Ihr Feedback"},conditions:[{field:"isThankYouMessage",value:!0}]},{category:O,type:"checkbox",propName:"isLegend",label:{en:"Display key",fr:"Afficher un légende",es:"Mostrar una leyenda",de:"Legende anzeigen"},value:!1},{category:O,type:"text",propName:"zeroLegend",label:{en:"Key of the lowest rating",fr:"Légende de la note minimale",es:"Leyenda de la nota mínima",de:"Legende neben 0"},value:{en:"Not really",fr:"Très faible",es:"Muy baja",de:"Unwahrscheinlich"},conditions:[{field:"isLegend",value:!0}]},{category:O,type:"text",propName:"tenLegend",label:{en:"Key of the highest rating",fr:"Légende de la note maximale",es:"Leyenda de la nota máxima",de:"Legende neben 10"},value:{en:"Really Really !",fr:"Très élevée",es:"Muy alta",de:"Sehr wahrscheinlich"},conditions:[{field:"isLegend",value:!0}]}],ae=[{category:"layout",type:"radioImage",propName:"layout",label:{en:"Select a layout",fr:"Sélectionnez une mise en page",es:"Seleccione un diseño",de:"Wählen Sie ein Layout"},value:"popin",options:[{label:{en:"Modal",fr:"Pop-in",es:"Pop-up",de:"Pop-in"},value:"popin",src:"".concat(P,"layout/popin.svg")},{label:{en:"Banner",fr:"Bannière",es:"Banner",de:"Banner"},value:"banner",src:"".concat(P,"banner/bottom.png")},{label:{en:"Free placement",fr:"Placement libre",es:"Integrado",de:"Freie Platzierung "},value:"free",src:"".concat(P,"layout/free.svg")}]},{category:"layout",type:"radioImage",propName:"bannerPosition",label:{en:"Adjust the layout",fr:"Ajuster le placement",es:"Ajustar la posición",de:"Position einstellen"},value:"bottom",conditions:[{field:"layout",value:"banner"}],options:[{label:{en:"At the bottom",fr:"En bas",es:"Abajo",de:"Unten"},value:"bottom",src:"".concat(P,"banner/bottom.png")},{label:{en:"At the top",fr:"En haut",es:"Arriba",de:"Oben"},value:"top",src:"".concat(P,"banner/top.png")}]},{category:"layout",type:"selectelement",propName:"npsElementReferrer",label:B,value:"body",conditions:[{field:"layout",value:"free"}]},{category:"layout",type:"select",propName:"npsReferrerInsertType",value:"beforeend",conditions:[{field:"layout",value:"free"}],label:B,options:[{label:{en:"Before",fr:"Avant",es:"Antes",de:"Vor"},value:"beforebegin"},{label:{en:"At the start",fr:"Au début",es:"Al principio",de:"Am Anfang"},value:"afterbegin"},{label:{en:"Before end",fr:"À la fin",es:"Al final",de:"Am ende"},value:"beforeend"},{label:{en:"After",fr:"Après",es:"Después",de:"Hinter"},value:"afterend"}]},{category:"layout",type:"radio",propName:"contentDirection",value:"column",label:{en:"Text position",fr:"Positionnement du contenu",es:"Posición del texto",de:"Ausrichtung des Inhalts"},options:[{label:{en:"Above",fr:"Au-dessus",es:"Por encima",de:"Spalte"},value:"column"},{label:{en:"At the left",fr:"À gauche",es:"A la izquierda",de:"Reihe"},value:"row"}]}],ie=[R,W,{category:"conditions",type:"checkbox",propName:"autoHide",value:!0,label:{en:"Auto hide after user validation",fr:"Masquer automatiquement après la validation",es:"",de:"Nach der Freigabe automatisch ausblenden"}},{category:"conditions",type:"number",propName:"timeHide",value:2,label:{en:"Hide after x seconds",fr:"Masquer après x secondes",es:"",de:"Nach X Sekunden ausblenden"},conditions:[{field:"autoHide",value:!0}]}];var le=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};function se(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(n,!0).forEach(function(t){le(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ue="rgba(255, 255, 255, 1)",de="rgba(16, 121, 255, 1)",pe=[{field:"themeType",value:"theme"}],fe=[{field:"buttonsContrast",value:"full"}],he=[{field:"buttonsContrast",value:"empty"}],me={borderWidth:2,borderRadius:10,borderColor:de,backgroundColor:ue,overlayColor:"rgba(0, 0, 0, 1)",overlayOpacity:50,textColor:de,questionMargin:15,horizontalPaddingContainer:20,verticalPaddingContainer:15,horizontalMarginContainer:0,verticalMarginContainer:0,dropShadow:!1,shadowOpacity:0,buttonsHorizontalMargin:5,buttonsContrast:"full",buttonsShape:"roundsquare",buttonsBorderRadius:8,buttonsBackgroundColor_full:de,buttonsBackgroundColor_empty:ue,buttonsTextColor_full:ue,buttonsTextColor_empty:de,buttonsBorderColor_full:de,buttonsBorderColor_empty:de,buttonsBorderWidth_full:0,buttonsBorderWidth_empty:2,inputBackgroundColor:ue,inputBorderColor:de,inputBorderWidth:2,inputBorderRadius:8,inputTextColor:de,inputMarginWithButton:10,feedbackButtonBackgroundColor:ue,feedbackButtonBorderColor:de,feedbackButtonBorderWidth:2,feedbackButtonBorderRadius:8,feedbackButtonTextColor:de},ye=[{themeValue:"lightTheme",defaultValues:ce({},me)},{themeValue:"darkTheme",defaultValues:ce({},me,{borderColor:de,backgroundColor:de,overlayOpacity:75,textColor:ue,buttonsContrast:"empty",buttonsBackgroundColor_full:ue,buttonsBackgroundColor_empty:de,buttonsTextColor_full:de,buttonsTextColor_empty:ue,buttonsBorderColor_full:ue,buttonsBorderColor_empty:ue,buttonsBorderWidth_full:2,buttonsBorderWidth_empty:2,inputBackgroundColor:de,inputBorderColor:ue,inputTextColor:ue,feedbackButtonBackgroundColor:de,feedbackButtonBorderColor:ue,feedbackButtonTextColor:ue})}],ge={category:T,type:"group",collapsible:!0,conditions:pe},be={category:T,type:"colorpicker",label:{en:"Buttons background color",fr:"Couleur de fond des boutons",es:"Color de fondo de los botones",de:"Hintergrundfarbe der Tasten"},propName:"buttonsBackgroundColor",value:ue},ve={category:T,type:"colorpicker",label:{en:"Buttons text color",fr:"Couleur de texte des boutons",es:"Color del texto de los botones",de:"Textfarbe der Schaltflächen"},propName:"buttonsTextColor",value:de},Ce={category:T,type:"colorpicker",label:{en:"Buttons border color",fr:"Couleur du contour des boutons",es:"Color del contorno de los botones",de:"Farbe der Schaltflächenkontur"},propName:"buttonsBorderColor",value:de},ke={category:T,type:_,label:{en:"Buttons border thickness",fr:"Épaisseur du contour des boutons",es:"Grosor del contorno de los botones",de:"Stärke des Umrisses der Schaltflächen"},propName:"buttonsBorderWidth",value:2,unit:"px"},Se={category:T,type:"radio",propName:"stepToShow",value:"displayNoteStep",label:{en:"Section to be personalized",fr:"Partie à personnaliser",es:"Parte personalizable",de:"Schritt zur Bearbeitung"},options:[{label:{en:"Notes",fr:"Notes",es:"Notas",de:"Notiz"},value:"displayNoteStep"},{label:ee,value:"displayFeedbackStep"},{label:{en:"Thanks",fr:"Remerciement",es:"Gracias",de:"Dank"},value:"displayThanksStep"}]},we=ce({},V,{propName:"overlayColor",label:{en:"Overlay color",fr:"Couleur de l'arrière-plan",es:"Color del segundo plano",de:"Overlay-Farbe"}}),Ne=ce({},K,{propName:"overlayOpacity",label:{en:"Overlay opacity",fr:"Opacité de l'overlay",es:"Opacidad superpuesta",de:"Deckkraft überlagern"}}),xe={category:T,type:"radioImage",propName:"themeType",label:{en:"Type of personalization",fr:"Type de personnalisation",es:"Tipo de personalización",de:"Typ auswählen"},value:"theme",options:[{label:{en:"Theme",fr:"Thème",es:"Tema",de:"Typ"},value:"theme",src:"".concat(P,"style/theme.svg")},{label:{en:"Custom CSS",fr:"CSS Personnalisé",es:"CSS personalizado",de:"Custom CSS"},value:"customCss",src:"".concat(P,"style/custom.svg")}]},Ee={category:T,type:"paragraph",propName:"customCssDetails",text:ne,conditions:[{field:"themeType",value:"customCss"}]},Be={category:T,type:"radio",propName:"theme",label:{en:"Select an appearance",fr:"Sélectionner une apparence",es:"Seleccionar una apariencia",de:"Thema auswählen"},value:"lightTheme",conditions:pe,options:[{label:ce({},{en:"Light",fr:"Clair",es:"Claro",de:"Hell"},{fr:"Claire"}),value:"lightTheme"},{label:{en:"Dark",fr:"Sombre",es:"Oscuro",de:"Dunkel"},value:"darkTheme"}]},Te=[ce({},ge,{label:{en:"Border",fr:"Contour",es:"Borde",de:"Kontur"},conditions:pe,children:[J,Q,G]}),ce({},ge,{label:{en:"Background",fr:"Fond",es:"Fondo",de:"Hintergrund"},conditions:pe,children:[V,we,Ne]}),ce({},ge,{label:{en:"Container",fr:"Conteneur",es:"Container",de:"Container"},children:[{category:T,type:"colorpicker",label:{en:"Text color",fr:"Couleur du texte",es:"Color del texto",de:"Textfarbe"},propName:"textColor",value:de},{category:T,type:_,label:{en:"Question / Reply spacing",fr:"Espacement Question / Réponse",es:"Espaciado entre la pregunta y la respuesta",de:"Margin Frage/Antwort"},propName:"questionMargin",value:15,unit:"px"},{category:T,type:_,label:{en:"Horizontal padding",fr:"Padding horizontal",es:"Relleno horizontal",de:"Horizontale Polsterung"},propName:"horizontalPaddingContainer",value:0,unit:"px"},{category:T,type:_,label:{en:"Vertical padding",fr:"Padding vertical",es:"Acolchado vertical",de:"Vertikale Polsterung"},propName:"verticalPaddingContainer",value:0,unit:"px"},{category:T,type:_,label:{en:"Horizontal margin",fr:"Marges horizontales",es:"Margen horizontal",de:"Horizontaler Rand"},propName:"horizontalMarginContainer",value:0,unit:"px"},{category:T,type:_,label:{en:"Vertical margin",fr:"Marges verticales",es:"Margen vertical",de:"Vertikaler Rand"},propName:"verticalMarginContainer",value:0,unit:"px"},{category:T,type:"switch",label:{en:"Drop shadow",fr:"Ombre portée",es:"Sombra",de:"Schatten"},propName:"dropShadow",value:!1},{category:T,type:_,label:{en:"Shadow opacity",fr:"Opacité de l'ombre",es:"Opacidad de las sombras",de:"Schattenopazität"},propName:"shadowOpacity",value:0,unit:"%",conditions:[{field:"dropShadow",value:!0}]}]}),ce({},ge,{label:{en:"Buttons style",fr:"Style des boutons",es:"Estilo de botón",de:"Schaltflächenstil"},conditions:[{field:"themeType",value:"theme"},{field:"stepToShow",value:"displayNoteStep"}],children:[{category:T,type:_,label:{en:"Margin between buttons",fr:"Espace entre les boutons",es:"",de:"Abstand zwischen den Buttons"},propName:"buttonsHorizontalMargin",value:5,unit:"px"},{category:T,type:"radioImage",label:{en:"Buttons contrast",fr:"Contraste des boutons",es:"Contraste de los botones",de:"Kontrast der Tasten"},propName:"buttonsContrast",value:"full",options:[{value:"full",src:"".concat(P,"nps/button-contrast-1.svg")},{value:"empty",src:"".concat(P,"nps/button-contrast-2.svg")}]},{category:T,type:"radioImage",label:{en:"Buttons shape",fr:"Forme des boutons",es:"Forma de boton",de:"Knopfform"},propName:"buttonsShape",value:"roundsquare",options:[{value:"square",src:"".concat(P,"nps/button-shape-1.svg")},{value:"roundsquare",src:"".concat(P,"nps/button-shape-2.svg")},{value:"round",src:"".concat(P,"nps/button-shape-3.svg")}]},{category:T,type:_,label:{en:"Buttons border radius",fr:"Arrondi de la bordure des boutons",es:"Contorno del borde de los botones",de:"Konturradius der Buttons"},propName:"buttonsBorderRadius",value:8,unit:"px",min:1,conditions:[{field:"buttonsShape",value:"roundsquare"}]},ce({},be,{conditions:fe,propName:"".concat(be.propName,"_full")}),ce({},be,{conditions:he,propName:"".concat(be.propName,"_empty")}),ce({},ve,{conditions:fe,propName:"".concat(ve.propName,"_full")}),ce({},ve,{conditions:he,propName:"".concat(ve.propName,"_empty")}),ce({},Ce,{conditions:fe,propName:"".concat(Ce.propName,"_full")}),ce({},Ce,{conditions:he,propName:"".concat(Ce.propName,"_empty")}),ce({},ke,{conditions:fe,propName:"".concat(ke.propName,"_full")}),ce({},ke,{conditions:he,propName:"".concat(ke.propName,"_empty")})]}),ce({},ge,{label:{en:"Field style",fr:"Style du champ",es:"Estilo del campo",de:"Input-Styles"},conditions:[{field:"themeType",value:"theme"},{field:"stepToShow",value:"displayFeedbackStep"}],children:[{category:T,type:"colorpicker",label:{en:"Comment field background color",fr:"Couleur de fond du champ commentaire",es:"Color de fondo del campo Comentarios",de:"Hintergrundfarbe Feedback Input"},propName:"inputBackgroundColor",value:ue},{category:T,type:"colorpicker",label:{en:"Comment field border color",fr:"Couleur de la bordure du champ commentaire",es:"Color del borde del campo Comentarios",de:"Konturfarbe Feedback Input"},propName:"inputBorderColor",value:de},{category:T,type:_,label:{en:"Comment field border thickness",fr:"Épaisseur de la bordure du champ commentaire",es:"Grosor del borde del campo Comentarios",de:"Konturbreite Feedback Input"},propName:"inputBorderWidth",value:1,unit:"px"},{category:T,type:_,label:{en:"Comment field border radius",fr:"Arrondi de la bordure du champ commentaire",es:"Contorno del borde del campo Comentarios",de:"Konturradius Feedback Input"},propName:"inputBorderRadius",value:8,unit:"px"},{category:T,type:"colorpicker",label:{en:"Comment field text color",fr:"Couleur du texte du champ commentaire",es:"Color del texto del campo Comentarios",de:"Textfarbe Feedback Input"},propName:"inputTextColor",value:de},{category:T,type:_,label:{en:"Spacing between the field and the send button",fr:"Espace entre le champ et le bouton d’envoi",es:"Espacio entre el campo y el botón de envío",de:"Abstand mit Button"},propName:"inputMarginWithButton",value:10,unit:"px"}]}),ce({},ge,{label:{en:"Send button style",fr:"Style du bouton d'envoi",es:"Estilo del botón de envío",de:"Style Abschicken-Button"},conditions:[{field:"themeType",value:"theme"},{field:"stepToShow",value:"displayFeedbackStep"}],children:[{category:T,type:"colorpicker",label:{en:"Send button background color",fr:"Couleur de fond du bouton d’envoi",es:"Color de fondo del botón de envío",de:"Hintergrundfarbe Abschicken-Button"},propName:"feedbackButtonBackgroundColor",value:ue},{category:T,type:"colorpicker",label:{en:"Send button border color",fr:"Couleur de la bordure du bouton d’envoi",es:"Color del borde del botón de envío",de:"Konturfarbe Feedback Button"},propName:"feedbackButtonBorderColor",value:de},{category:T,type:_,label:{en:"Send button border thickness",fr:"Épaisseur de la bordure du bouton d’envoi",es:"Grosor del borde del botón de envío",de:"Konturbreite Feedback Button"},propName:"feedbackButtonBorderWidth",value:1,unit:"px"},{category:T,type:_,label:{en:"Send button border radius",fr:"Arrondi de la bordure du bouton d'envoi",es:"Contorno del borde del botón de envío",de:"Konturradius Feedback Button"},propName:"feedbackButtonBorderRadius",value:8,unit:"px"},{category:T,type:"colorpicker",label:{en:"Send button text color",fr:"Couleur du texte du bouton d’envoi",es:"Color del texto del botón de envío",de:"Textfarbe Feedback Button"},propName:"feedbackButtonTextColor",value:de}]})];function Oe(e,t,n){return e.map(function(e){var o=e.propName,a=e.conditions,i=t[o],l="".concat(n,"_").concat(o),s=function(e,t){return e&&e.length>0&&e.reduce(function(e,n){var o=n.field,a=n.value;return[].concat(r(e),[{field:"".concat(t,"_").concat(o),value:a}])},[])}(a,n),c=ce({},e,{value:i,propName:l});return s&&s.length&&(c.conditions=s),c})}var _e=ye.map(function(e){var t=e.themeValue,n=e.defaultValues;return function(e,t,n){return e.map(function(e){var o=e.conditions,a=e.children;return ce({},e,{conditions:[].concat(r(o),[{field:"theme",value:t}]),children:Oe(a,n,t)})})}([].concat(Te),t,n)}).flat(),Pe=[Se,xe,Ee,Be].concat(r(_e));return[].concat(r(ie),r(oe),r(ae),r(Pe))});

@@ -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:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,e,n,r){var a=e&&e.prototype instanceof m?e:m,o=Object.create(a.prototype),i=new T(r||[]);return o._invoke=function(t,e,n){var r=l;return function(a,o){if(r===d)throw new Error("Generator is already running");if(r===f){if("throw"===a)throw o;return _()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=u(t,e,n);if("normal"===s.type){if(r=n.done?f:h,s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=f,n.method="throw",n.arg=s.arg)}}}(t,n,i),o}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",h="suspendedYield",d="executing",f="completed",p={};function m(){}function g(){}function y(){}var v={};v[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(L([])));w&&w!==n&&r.call(w,o)&&(v=w);var C=y.prototype=m.prototype=Object.create(v);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function N(t){var e;this._invoke=function(n,a){function o(){return new Promise(function(e,o){!function e(n,a,o,i){var c=u(t[n],t,a);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,o,i)},function(t){e("throw",t,o,i)}):Promise.resolve(l).then(function(t){s.value=t,o(s)},function(t){return e("throw",t,o,i)})}i(c.arg)}(n,a,e,o)})}return e=e?e.then(o,o):o()}}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 p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var a=u(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,p;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function L(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=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 i.next=i}}return{next:_}}function _(){return{value:e,done:!0}}return g.prototype=C.constructor=y,y.constructor=g,y[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(C),t},t.awrap=function(t){return{__await:t}},k(N.prototype),N.prototype[i]=function(){return this},t.AsyncIterator=N,t.async=function(e,n,r,a){var o=new N(s(e,n,r,a));return t.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(C),C[c]="Generator",C[o]=function(){return this},C.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=L,T.prototype={constructor:T,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(x),!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 c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.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 o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),p}},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;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});var n=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var r=function(t){if(Array.isArray(t))return t};var a=function(t,e){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){a=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n};var o=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var i=function(t,e){return r(t)||a(t,e)||o()};function c(t,e,n,r,a,o,i){try{var c=t[o](i),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,a)}var s=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function i(t){c(o,r,a,i,s,"next",t)}function s(t){c(o,r,a,i,s,"throw",t)}i(void 0)})}};var u=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var l=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}};var h=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var d=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var f=function(t){return l(t)||h(t)||d()};var p=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function m(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 g=function(t,e,n){return e&&m(t.prototype,e),n&&m(t,n),t},y=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});var v=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var b=function(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?v(t):e},w=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}),C=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});var k=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&&C(t,e)},N=t(function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,e,n,r){var a=e&&e.prototype instanceof m?e:m,o=Object.create(a.prototype),i=new T(r||[]);return o._invoke=function(t,e,n){var r=l;return function(a,o){if(r===d)throw new Error("Generator is already running");if(r===f){if("throw"===a)throw o;return _()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=u(t,e,n);if("normal"===s.type){if(r=n.done?f:h,s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=f,n.method="throw",n.arg=s.arg)}}}(t,n,i),o}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",h="suspendedYield",d="executing",f="completed",p={};function m(){}function g(){}function y(){}var v={};v[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(L([])));w&&w!==n&&r.call(w,o)&&(v=w);var C=y.prototype=m.prototype=Object.create(v);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function N(t){var e;this._invoke=function(n,a){function o(){return new Promise(function(e,o){!function e(n,a,o,i){var c=u(t[n],t,a);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,o,i)},function(t){e("throw",t,o,i)}):Promise.resolve(l).then(function(t){s.value=t,o(s)},function(t){return e("throw",t,o,i)})}i(c.arg)}(n,a,e,o)})}return e=e?e.then(o,o):o()}}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 p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var a=u(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,p;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function L(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=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 i.next=i}}return{next:_}}function _(){return{value:e,done:!0}}return g.prototype=C.constructor=y,y.constructor=g,y[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(C),t},t.awrap=function(t){return{__await:t}},k(N.prototype),N.prototype[i]=function(){return this},t.AsyncIterator=N,t.async=function(e,n,r,a){var o=new N(s(e,n,r,a));return t.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(C),C[c]="Generator",C[o]=function(){return this},C.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=L,T.prototype={constructor:T,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(x),!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 c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.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 o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),p}},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;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});function E(t,e,n,r,a,o,i){try{var c=t[o](i),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,a)}var S=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function i(t){E(o,r,a,i,c,"next",t)}function c(t){E(o,r,a,i,c,"throw",t)}i(void 0)})}},x="Recurrence",T="Récurrence",L="Recurrencia",_="Wiederholung",O={en:"".concat(x," of the display"),fr:"".concat(T," de l'affichage"),es:"".concat(L," de la pantalla"),de:"".concat(_," der Anzeige")},A={en:"".concat(x," after closure"),fr:"".concat(T," après fermeture"),es:"".concat(L," después del cierre"),de:"".concat(_," nach Schließung")},I={en:"".concat(x," after validation"),fr:"".concat(T," après validation"),es:"".concat(L," después de la validación"),de:"".concat(_," nach der Validierung")},P={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"};function j(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 B(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(n,!0).forEach(function(e){u(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var R={category:"conditions",type:"select",options:[{label:{en:"Every time",fr:"Tout le temps",es:"Cada vez",de:"Jedes Mal"},value:"-1"},{label:{en:"Every session",fr:"Chaque session",es:"En 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"},D=(B({},R,{label:A,propName:"closingRecurrence"}),B({},R,{label:O,propName:"displayRecurrence"}),B({},R,{label:I,propName:"validationRecurrence"}),[{label:{en:"Page load",fr:"Au chargement de la page",es:"Al carga de página",de:"Beim Laden der Seite"},value:"pageLoad"},{label:{en:"Click",fr:"Au clic",es:"Clic",de:"Klick"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet",es:"Al intentar salir ",de:"Exit Intent"},value:"exitIntent"},{label:{en:"Delay",fr:"Après un délai",es:"Después de un tiempo",de:"Verzögert"},value:"delay"},{label:{en:"Reengage (after inactivity)",fr:"Au réengagement (après inactivité)",es:"Despues de inactividad",de:"Nach Inaktivität"},value:"reengage"}]),Y={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:P,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"}]},F={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"}]},q={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"}]},G={category:"conditions",type:"number",propName:"".concat("triggerEvent","Delay"),label:{en:"Trigger event delay (in seconds)",fr:"Délai avant l'affichage (en secondes)",es:"",de:"Verzögerung vor dem Posten"},value:10,conditions:[{field:"triggerEvent",value:"delay"}]},M=([{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"Se activa al",de:"Triggert bei"},options:D,propName:"triggerEvent",value:"pageLoad"}].concat(f([Y,F,q,G])),function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")});function z(t,e){return new Promise(function(n,r){var a=new XMLHttpRequest;a.open(t,e,!0),a.onload=function(){this.status>=200&&this.status<300?n(a.response):r({status:this.status,statusText:a.statusText})},a.onerror=function(){r({status:this.status,statusText:a.statusText})},a.send()})}var Q=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"000000",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";p(this,t),this.uniqueId=e,this.widgetContainer=n,this.basicClassName="ab_widget_container_".concat(n),this.widgetContainerId="".concat(this.basicClassName,"_").concat(e),this.contentClassName="".concat(this.basicClassName,"_content"),this.overlayClassName="".concat(this.basicClassName,"_overlay"),this.closeButtonClassName="".concat(this.basicClassName,"_close_button"),this.hideClassName="ab_hide_".concat(e),this.domElement=this.getDom()}return g(t,[{key:"insert",value:function(){var t=this;return X("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),X("body",function(e){return e.appendChild(t.domElement)},function(t){return console.error(t)}),this}},{key:"remove",value:function(){return this.domElement.remove(),this.styleElement.remove(),this}},{key:"show",value:function(){return this.domElement.classList.remove(this.hideClassName),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){return this.insert(),this.addCloseEvent(),this}},{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,f(e)),r.forEach(function(e){e.addEventListener("click",function(){t.hide()},!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(M()?"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",M()&&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}(),U=function(t){function e(t,n){var r;return p(this,e),(r=b(this,w(e).call(this,t,n))).stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}return k(e,Q),g(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tposition: absolute;\n\t\t\tz-index: -1;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground-color: black;\n\t\t\topacity: 0.6;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.contentClassName," {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}]),e}(),W=function(t){function e(t,n,r){var a;return p(this,e),(a=b(this,w(e).call(this,t,n))).position=r,a.stringStyles=a.getStyles(),a.styleElement=a.getStyleTag(a.stringStyles),a}return k(e,Q),g(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\t").concat(this.position,": 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}]),e}(),H=function(t){function e(t,n,r,a){var o;return p(this,e),(o=b(this,w(e).call(this,t,n))).position=r,o.referrerElement=a,o.stringStyles=o.getStyles(),o.styleElement=o.getStyleTag(o.stringStyles),o}return k(e,Q),g(e,[{key:"insert",value:function(){var t=this;return X("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),X(this.referrerElement,function(e){return e.insertAdjacentElement(t.position,t.domElement)},function(t){return console.error(t)}),this}},{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tposition: relative;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}]),e}(),V=function(){function t(e){var n=e.displayRecurrence,r=e.closingRecurrence,a=e.validationRecurrence,o=e.widgetName,i=e.uniqueId;p(this,t),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(a),this.storageName="Rec_".concat(o,"_").concat(i),this.currentRecurrence=this.getCurrentRecurrence()}return g(t,[{key:"getCurrentRecurrence",value:function(){var t={type:!1},e=sessionStorage.getItem(this.storageName)||localStorage.getItem(this.storageName);try{return JSON.parse(e)||t}catch(e){return t}}},{key:"isOver",value:function(){var t=sessionStorage.getItem(this.storageName),e=localStorage.getItem(this.storageName),n=(e?parseFloat(e):0)<(new Date).getTime();return n&&localStorage.removeItem(this.storageName),n&&!e&&!t}},{key:"setRecurrence",value:function(t,e){var n=this,r=this.getTypeOfStorage(t),a=this.getStamp(t),o={type:e,stamp:a},i=this.currentRecurrence.type,c=function(){sessionStorage.getItem(n.storageName)&&sessionStorage.removeItem(n.storageName),localStorage.getItem(n.storageName)&&localStorage.removeItem(n.storageName),r.setItem(n.storageName,JSON.stringify(o))};if(!r)return!1;if(i&&"validation"!==e)if("closing"===e&&"validation"!==i)c();else{if("display"!==e||"validation"===i||"closing"===i)return!1;c()}else c();return a}},{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?window.localStorage:0===t&&window.sessionStorage)}}]),t}(),J=function(){function t(e){var n=e.triggerEvent,r=e.triggerSelector,a=e.triggerDelay;p(this,t),this.event=n,this.selector=r&&r.length?r:"body",this.delay=a}return g(t,[{key:"onPageLoad",value:function(){return new Promise(function(t,e){if("complete"!==document.readyState){var n,r=["DOMContentLoaded",function(){return t(!0)},{passive:!0,once:!0}];(n=window).addEventListener.apply(n,r),setTimeout(function(){var t;return(t=window).removeEventListener.apply(t,r),e(!1)},15e3)}return t(!0)})}},{key:"onClick",value:function(){var t=this,e=document.createElement("style");return e.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(e),new Promise(function(n){var r,a=function(e){return f(document.querySelectorAll(t.selector)).some(function(n){return n.isSameNode(e)||!!e.closest(t.selector)})},o=["click",function(t){return!!a(t.target)&&(document.head.removeChild(e),n(!0))},{passive:!0,once:!0,capture:!0}];(r=document).addEventListener.apply(r,o)})}},{key:"onExitIntent",value:function(){var t,e=this;return new Promise((t=S(N.mark(function t(n){var r;return N.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=["mouseleave",function(){if(e.delay){var t=1e3*e.delay;setTimeout(function(){return n(!0)},t)}return n(!0)},{passive:!0,once:!0}],t.next=4,e.onPageLoad();case 4:t.sent&&X("body",function(t){return t.addEventListener.apply(t,r)});case 6:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}))}},{key:"onDelay",value:function(){var t,e=this;return new Promise((t=S(N.mark(function t(n){var r;return N.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=1e3*e.delay,t.next=3,e.onPageLoad();case 3:t.sent&&setTimeout(function(){return n(!0)},r);case 5:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}))}},{key:"onReengage",value:function(){var t=this;return new Promise(function(e){var n=1e3*t.delay,r=n,a=["click","mousemove","scroll","keypress"],o=[function(){return r=n},{passive:!0}];a.forEach(function(t){var e;return(e=document).addEventListener.apply(e,[t].concat(o))});var i=setInterval(function(){r<=0?(e(!0),clearInterval(i),a.forEach(function(t){var e;return(e=document).removeEventListener.apply(e,[t].concat(o))})):r-=100},100)})}},{key:"isTriggered",value:function(){var t=S(N.mark(function t(){var e;return N.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=this.event,t.next="pageLoad"===t.t0?3:"click"===t.t0?7:"exitIntent"===t.t0?11:"delay"===t.t0?15:"reengage"===t.t0?19:23;break;case 3:return t.next=5,this.onPageLoad();case 5:return e=t.sent,t.abrupt("break",24);case 7:return t.next=9,this.onClick();case 9:return e=t.sent,t.abrupt("break",24);case 11:return t.next=13,this.onExitIntent();case 13:return e=t.sent,t.abrupt("break",24);case 15:return t.next=17,this.onDelay();case 17:return e=t.sent,t.abrupt("break",24);case 19:return t.next=21,this.onReengage();case 21:return e=t.sent,t.abrupt("break",24);case 23:e=!1;case 24:return t.abrupt("return",e);case 25:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}(),K=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)},X=function(t,e,n){var r,a=0;try{document.querySelector(t)}catch(e){var o="Selector «".concat(t,"» not valid.");return K(o),"function"==typeof n&&n(o)}r=setTimeout(function(){clearInterval(a);var e="Can't find element «".concat(t,"».");return K(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)};var Z=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function $(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 tt=function(t,e,n){return e&&$(t.prototype,e),n&&$(t,n),t},et="https://nps.abtasty.com/api/",nt=DATA.isFeedBackQuestion,rt=function(t,e){var n,r,a,o,i,c,s=e.question,u=e.__npsCampaignId,l=e.userFeedback,h=e.feedbackQuestion,d=window.ABTASTY_S?(n=ABTASTY_S.STORE,r=n.masterTest,a=n.test,o=n.currentVariation,i=n.tunnelParent,c=ABTASTY_S.EDITOR.getAtTestId,i?c()>i?"".concat(r.name," - ").concat(a.name):c()===i?"".concat(r.name," - ").concat(a.name," - ").concat(o.name):"":"".concat(r.name," - ").concat(o.name)):"",f=function(t,e,n){return nt?"editor"===t?n:"client"===t?e:"":""}(t,l,h);return{abtastyIdentifier:"abtastyidentifier=".concat(window.ABTasty.accountSettings?window.ABTasty.accountSettings.identifier:window.ABTasty.getAccountSettings&&"function"==typeof window.ABTasty.getAccountSettings?window.ABTasty.getAccountSettings().identifier:void 0),accessToken:"access_token=".concat(window.ABTASTY_S?ABTASTY_S.SERVER.token:""),testId:"testId=".concat(TEST_ID),variationId:"variationId=".concat(window.ABTASTY_S?ABTASTY_S.STORE.currentVariation.id:""),name:"name=".concat(d),nps:"nps=".concat(s),feedback:"feedback=".concat(f),id:"id=".concat(u),abtastyuserid:"abtastyuserid=".concat(window.ABTasty.visitor.id)}},at=function(t){if(t.__npsCampaignId)return!1;var e,n,r,a,o,i,c,s,u=rt("editor",t);return z("GET",(n=(e=u).abtastyIdentifier,r=e.accessToken,a=e.testId,o=e.variationId,i=e.name,c=e.nps,s=e.feedback,"".concat(et,"setNPS.php?").concat(n,"&").concat(r,"&").concat(a,"&").concat(o,"&").concat(i,"&").concat(c,"&").concat(s)))},ot=function(t){var e=t.detail;if(!e.__npsCampaignId)return!1;var n,r,a,o,i,c,s,u,l,h=rt("editor",e);return z("GET",(r=(n=h).id,a=n.abtastyIdentifier,o=n.accessToken,i=n.testId,c=n.variationId,s=n.name,u=n.nps,l=n.feedback,"".concat(et,"setNPS.php?").concat(r,"&").concat(a,"&").concat(o,"&").concat(i,"&").concat(c,"&").concat(s,"&").concat(u,"&").concat(l)))},it=function(t,e){var n,r,a,o=DATA,i=o.question,c=o.__npsCampaignId,s=function(t,e){var n=e.feedback,r=e.id,a=e.abtastyIdentifier,o=e.abtastyuserid,i="score=".concat(t);return"".concat(et,"collect.php?").concat(i,"&").concat(n,"&nps").concat(r,"&").concat(a,"&").concat(o)}(t,rt("client",{question:i,__npsCampaignId:c,userFeedback:e}));return n="GET",r=s,(a=new XMLHttpRequest).open(n,r,!1),a.send(null),a};function ct(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}var st=DATA,ut=st.themeType,lt=st.layout,ht=st.isFeedBackQuestion,dt=st.isThankYouMessage,ft=st.isLegend,pt=st.timeHide,mt=st.stepToShow,gt=function(){function t(e){var n=e.uniqueId,r=e.question,a=e.feedbackQuestion,o=e.userStyles,i=e.parentContainer,c=e.buttonText,s=e.thankYouMessage,u=e.zeroLegend,l=e.tenLegend,h=e.recurrence;Z(this,t),this.uniqueId=n,this.question=r,this.feedbackQuestion=a,this.userStyles=o,this.parentContainer=i,this.buttonText=c,this.thankYouMessage=s,this.legend={zeroLegend:u,tenLegend:l},this.recurrence=h,this.baseClassName="nps_container",this.npsClassName="".concat(this.baseClassName,"_").concat(this.uniqueId),this.questionClassName="".concat(this.baseClassName,"_question"),this.notesClassName="".concat(this.baseClassName,"_notes"),this.feedbackQuestionClassName="".concat(this.questionClassName,"_feedback"),this.feedbackFormClassName="".concat(this.questionClassName,"_feedback_form"),this.notesButtonsClassName="".concat(this.notesClassName,"_button"),this.thankYouClassName="".concat(this.baseClassName,"_thanks"),this.hideClassName="nps_".concat(this.uniqueId,"_display_none"),this.currentNote=NaN,this.userFeedback="",this.npsContainer=this.getContainer(),this.questionElement=this.getQuestionElement(),this.notesContainer=this.getNotesElement(),this.feedbackElements=this.getFeedBackElements(),this.thankYouElement=this.getThankYouElement(),this.npsElement=this.getNPSElement(),this.styleElement=this.getStyleElement()}return tt(t,[{key:"sendNote",value:function(){if(top.console.log("".concat(this.currentNote)),!M()&&!isNaN(this.currentNote)){it(this.currentNote,this.userFeedback);try{window.abtasty.send("nps",{ns:this.currentNote,nf:this.userFeedback})}catch(t){}this.recurrence.setValidationRecurrence()}return this}},{key:"setExternalEvents",value:function(){var t=this,e={passive:!0,once:!0};return[this.parentContainer.overlayClassName,this.parentContainer.closeButtonClassName].forEach(function(n){t.parentContainer.domElement.querySelector(".".concat(n)).addEventListener("mouseup",function(){return t.recurrence.setClosingRecurrence()},e)}),this}},{key:"insert",value:function(t,e){return document.head.insertAdjacentElement("beforeend",this.styleElement),t.insertAdjacentElement(e,this.npsElement),this.setExternalEvents(),this}},{key:"remove",value:function(){return this.npsElement&&this.npsElement.remove(),this.styleElement&&this.styleElement.remove(),this}},{key:"complete",value:function(){var t=this;this.sendNote(),setTimeout(function(){t.parentContainer.hide(),setTimeout(function(){t.remove(),t.parentContainer.remove()},1e3)},1e3*pt)}},{key:"onClickNote",value:function(t){top.console.log(t),this.currentNote=t.target.dataset.note,ht&&this.feedbackQuestion&&this.feedbackQuestion.length?this.showFeedBack():dt&&this.thankYouMessage&&this.thankYouMessage.length?this.showThankYouMessage():this.complete()}},{key:"onFeedbackSend",value:function(){dt&&this.thankYouMessage&&this.thankYouMessage.length?this.showThankYouMessage():this.complete()}},{key:"showFeedBack",value:function(){var t=this;return this.npsContainer.childNodes.forEach(function(e){return e.classList.add(t.hideClassName)}),Object.values(this.feedbackElements).forEach(function(e){return e.classList.remove(t.hideClassName)}),this}},{key:"showThankYouMessage",value:function(){var t=this;return this.npsContainer.childNodes.forEach(function(e){return e.classList.add(t.hideClassName)}),this.thankYouElement.classList.remove(this.hideClassName),this.complete(),this}},{key:"getThankYouElement",value:function(){var t=document.createElement("p");return t.className="".concat(this.thankYouClassName," ").concat(this.hideClassName),t.innerHTML=this.thankYouMessage,M()&&"displayThanksStep"===mt&&t.classList.remove(this.hideClassName),t}},{key:"getFeedBackElements",value:function(){var t=this,e=document.createElement("p");e.className="".concat(this.feedbackQuestionClassName," ").concat(this.hideClassName),e.innerHTML=this.feedbackQuestion;var n=document.createElement("form");n.className="".concat(this.feedbackFormClassName," ").concat(this.hideClassName);var r=document.createElement("input");r.className="".concat(this.feedbackQuestionClassName,"_input"),r.type="text";var a=document.createElement("button");return a.className="".concat(this.feedbackQuestionClassName,"_button"),a.innerHTML=this.buttonText,a.addEventListener("click",function(){return t.onFeedbackSend()},{passive:!0}),M()&&"displayFeedbackStep"===mt&&[e,n].forEach(function(e){return e.classList.remove(t.hideClassName)}),n.appendChild(r),n.appendChild(a),{feedbackQuestionElement:e,feedbackFormElement:n}}},{key:"getNotesElement",value:function(){var t=this,e=document.createElement("div");e.className=this.notesClassName,M()&&"displayNoteStep"!==mt&&e.classList.add(this.hideClassName);for(var n=10;n>=0;){var r=document.createElement("button");r.className=this.notesButtonsClassName,r.dataset.note=n,M()&&r.setAttribute("data-abtasty-actionnable",""),r.innerHTML+="<span>".concat(n,"</span>"),r.addEventListener("click",function(e){return t.onClickNote(e)},{passive:!0}),e.insertAdjacentElement("afterbegin",r),n-=1}return ft&&(e.insertAdjacentHTML("afterbegin","<legend>".concat(this.legend.zeroLegend,"</legend>")),e.insertAdjacentHTML("beforeend","<legend>".concat(this.legend.tenLegend,"</legend>"))),e}},{key:"getQuestionElement",value:function(){var t=document.createElement("p");return t.className=this.questionClassName,t.innerHTML=this.question,M()&&"displayNoteStep"!==mt&&t.classList.add(this.hideClassName),t}},{key:"getContainer",value:function(){var t=document.createElement("div");return t.className="".concat(this.baseClassName," ").concat(this.npsClassName),t}},{key:"getNPSElement",value:function(){var t=this;return this.npsContainer.appendChild(this.questionElement),this.npsContainer.appendChild(this.notesContainer),ht&&Object.values(this.feedbackElements).forEach(function(e){t.npsContainer.appendChild(e)}),dt&&this.npsContainer.appendChild(this.thankYouElement),this.npsContainer}},{key:"getDefaultStyles",value:function(){var t="\n\t\t\t#".concat(this.parentContainer.widgetContainerId," .").concat(this.baseClassName,",\n\t\t\t#").concat(this.parentContainer.widgetContainerId," .").concat(this.baseClassName," *");return"\n\t\t@media (orientation: landscape) {\n\t\t\t".concat(t," {\n\t\t\t\tfont-size: .55vmax;\n\t\t\t}\n\t\t}\n\t\t@media (orientation: landscape) and (max-width: 1280px) {\n\t\t\t").concat(t," {\n\t\t\t\tfont-size: .7vmax;\n\t\t\t}\n\t\t}\n\t\t@media (orientation: landscape) and (max-width: 800px) {\n\t\t\t").concat(t," {\n\t\t\t\tfont-size: 1vmax;\n\t\t\t}\n\t\t}\n\t\t@media (orientation: portrait) {\n\t\t\t").concat(t," {\n\t\t\t\tfont-size: 1vmin;\n\t\t\t}\n\t\t}\n\t\t#").concat(this.parentContainer.widgetContainerId," .").concat(this.hideClassName," {\n\t\t\tdisplay: none !important;\n\t\t}\n\t\t").concat(t," {\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tmin-width: inherit;\n\t\t\tmin-height: inherit;\n\t\t\tmax-width: inherit;\n\t\t\tmax-height: inherit;\n\t\t\tline-height: 1;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: none;\n\t\t}\n\t\t#").concat(this.parentContainer.widgetContainerId," .").concat(this.baseClassName," .").concat(this.notesButtonsClassName," span {\n\t\t\tpointer-events: none;\n\t\t}")}},{key:"getThemeDefaultStyles",value:function(){var t="popin"===lt?"75em":"auto",e="#".concat(this.parentContainer.widgetContainerId," .").concat(this.npsClassName);return"\n\t\t".concat(e,",\n\t\t").concat(e," * {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: nowrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t").concat(e," {\n\t\t\twidth: ").concat(t,";\n\t\t\talign-items: center;\n\t\t}\n\t\t").concat(e," .").concat(this.questionClassName,",\n\t\t").concat(e," .").concat(this.feedbackQuestionClassName,",\n\t\t").concat(e," .").concat(this.thankYouClassName," {\n\t\t\tfont-size: 2em;\n\t\t}\n\t\t").concat(e," .").concat(this.notesClassName," {\n\t\t\tflex-direction: row;\n\t\t}\n\t\t").concat(e," .").concat(this.notesClassName," legend {\n\t\t\talign-self: center;\n\t\t\tfont-size: 1.5em;\n\t\t}\n\t\t").concat(e," .").concat(this.notesClassName," legend:first-of-type {\n\t\t\tmargin-right: 1em;\n\t\t}\n\t\t").concat(e," .").concat(this.notesClassName," legend:last-of-type {\n\t\t\tmargin-left: 1em;\n\t\t}\n\t\t").concat(e," .").concat(this.notesButtonsClassName," {\n\t\t\twidth: 3.5em;\n\t\t\theight: 3.5em;\n\t\t}\n\t\t").concat(e," .").concat(this.notesButtonsClassName," span {\n\t\t\tfont-size: 2em;\n\t\t}\n\t\t").concat(e," .").concat(this.feedbackFormClassName," {\n\t\t\tflex-direction: row;\n\t\t}\n\t\t").concat(e," .").concat(this.feedbackFormClassName," input {\n\t\t\twidth: 45em;\n\t\t\theight: 4em;\n\t\t}\n\t\t").concat(e," .").concat(this.feedbackFormClassName," button {\n\t\t\twidth: 10em;\n\t\t\tfont-size: 1.4em;\n\t\t}")}},{key:"getUserStyles",value:function(){var t,e=this.userStyles,r=e.backgroundColor,a=e.borderColor,o=e.borderRadius,c=e.borderWidth,s=e.dropShadow,u=e.textColor,l=e.horizontalPaddingContainer,h=e.verticalPaddingContainer,d=e.horizontalMarginContainer,f=e.verticalMarginContainer,p=e.overlayColor,m=e.overlayOpacity,g=e.shadowOpacity,y=e.buttonsContrast,v=e.buttonsBorderRadius,b=e.buttonsShape,w=e.contentDirection,C=e.questionMargin,k=e.buttonsHorizontalMargin,N=e.inputBackgroundColor,E=e.inputBorderColor,S=e.inputBorderWidth,x=e.inputBorderRadius,T=e.inputTextColor,L=e.inputMarginWithButton,_=e.feedbackButtonBackgroundColor,O=e.feedbackButtonBorderColor,A=e.feedbackButtonBorderWidth,I=e.feedbackButtonBorderRadius,P=e.feedbackButtonTextColor,j=Object.entries(this.userStyles).filter(function(t){return i(t,1)[0].includes(y)}).reduce(function(t,e){var r=i(e,2),a=r[0],o=r[1],c=a.split("_".concat(y))[0],s=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ct(r,!0).forEach(function(e){n(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ct(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},t);return s[c]=o,s},{}),B=j.buttonsBackgroundColor,R=j.buttonsTextColor,D=j.buttonsBorderColor,Y=j.buttonsBorderWidth;switch(b){case"roundsquare":t="border-radius: ".concat(v,"px;");break;case"round":t="border-radius: 50%;";break;default:t=""}var F=s?"box-shadow: 0px 5px 10px 2px rgba(0, 0, 0, ".concat(g/100,");"):"",q="#".concat(this.parentContainer.widgetContainerId," .").concat(this.npsClassName),G="\n\t\t\t".concat(q," .").concat(this.notesButtonsClassName," {\n\t\t\t\tmargin-left: ").concat(k,"px;\n\t\t\t\tmargin-right: ").concat(k,"px;\n\t\t\t\tbackground-color: ").concat(B,";\n\t\t\t\tborder: ").concat(Y,"px solid ").concat(D,";\n\t\t\t\t").concat(t,"\n\t\t\t}\n\t\t\t").concat(q," .").concat(this.notesButtonsClassName," span {\n\t\t\t\tcolor: ").concat(R,";\n\t\t\t}");return"\n\t\t\tbody ".concat(q," {\n\t\t\t\tflex-direction: ").concat(w,";\n\t\t\t\tbackground-color: ").concat(r,";\n\t\t\t\tborder: ").concat(c,"px solid ").concat(a,";\n\t\t\t\tborder-radius: ").concat(o,"px;\n\t\t\t\tpadding: ").concat(h,"px ").concat(l,"px;\n\t\t\t\t").concat(F,"\n\t\t\t}\n\t\t\t").concat(q," .").concat(this.questionClassName,",\n\t\t\t").concat(q," .").concat(this.feedbackQuestionClassName," ,\n\t\t\t").concat(q," .").concat(this.thankYouClassName," {\n\t\t\t\tcolor: ").concat(u,";\n\t\t\t\tmargin-").concat("row"===w?"right":"bottom"," : ").concat(C,"px;\n\t\t\t}\n\t\t\t").concat(q," .").concat(this.thankYouClassName," {\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\t\t\t").concat(q," .").concat(this.notesClassName," legend {\n\t\t\t\tcolor: ").concat(u,";\n\t\t\t}\n\t\t\t").concat(G,"\n\t\t\t").concat(q," .").concat(this.feedbackFormClassName," input {\n\t\t\t\tbackground-color: ").concat(N,";\n\t\t\t\tborder: ").concat(S,"px solid ").concat(E,";\n\t\t\t\tborder-radius: ").concat(x,"px;\n\t\t\t\tcolor: ").concat(T,";\n\t\t\t\tmargin-right: ").concat(L,"px;\n\t\t\t}\n\t\t\t").concat(q," .").concat(this.feedbackFormClassName," button {\n\t\t\t\tbackground-color: ").concat(_,";\n\t\t\t\tborder: ").concat(A,"px solid ").concat(O,";\n\t\t\t\tborder-radius: ").concat(I,"px;\n\t\t\t\tcolor: ").concat(P,";\n\t\t\t}\n\t\t\tbody #").concat(this.parentContainer.widgetContainerId," {\n\t\t\t\tmargin: ").concat(f,"px ").concat(d,"px;\n\t\t\t}\n\t\t\tbody #").concat(this.parentContainer.widgetContainerId," .").concat(this.parentContainer.overlayClassName," {\n\t\t\t\tbackground-color: ").concat(p,";\n\t\t\t\topacity: ").concat(m/100,";\n\t\t\t}")}},{key:"getStyleElement",value:function(){var t="theme"===ut,e=this.getDefaultStyles(),n=t?this.getThemeDefaultStyles():"",r=t?this.getUserStyles():"",a=document.createElement("style");return M()&&a.setAttribute("abtasty-script-added","true"),a.textContent="".concat(e," ").concat(n," ").concat(r),a}}]),t}();function yt(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 vt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(r,!0).forEach(function(e){n(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var bt="NPS",wt=DATA,Ct=wt.layout,kt=wt.bannerPosition,Nt=wt.npsElementReferrer,Et=wt.npsReferrerInsertType,St=wt.contentDirection,xt=wt.__npsCampaignId,Tt=wt.question,Lt=wt.feedbackQuestion,_t=wt.buttonText,Ot=wt.thankYouMessage,At=wt.zeroLegend,It=wt.tenLegend,Pt=wt.themeType,jt=wt.theme,Bt=wt.triggerEvent,Rt=wt.triggerEventClick,Dt=wt.triggerEventDelay,Yt=wt.triggerEventExitDelay,Ft=wt.triggerEventReengageDelay,qt=wt.displayRecurrence,Gt=wt.closingRecurrence,Mt=wt.validationRecurrence,zt="".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID);function Qt(t){return Ut.apply(this,arguments)}function Ut(){return(Ut=s(e.mark(function t(n){var r,a,o,i;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.detail,t.next=3,at(r);case 3:if(a=t.sent){t.next=6;break}return t.abrupt("return",!1);case 6:return o=vt({},r,{__npsCampaignId:JSON.parse(a).id}),i=new CustomEvent("asyncWidgetDataObtained",{detail:o}),top.dispatchEvent(i),t.abrupt("return",!0);case 10:case"end":return t.stop()}},t)}))).apply(this,arguments)}function Wt(t,e){var n;switch(Ct){case"popin":n=new U(zt,bt);break;case"banner":n=new W(zt,bt,kt);break;default:n=new H(zt,bt,Et,Nt)}n.init();var r=n.domElement.querySelector(".".concat(n.contentClassName)),a=new gt({uniqueId:zt,question:Tt,feedbackQuestion:Lt,userStyles:t,parentContainer:n,buttonText:_t,thankYouMessage:Ot,zeroLegend:At,tenLegend:It,recurrence:e});return a.insert(r,"beforeend"),n.show(),M()?ABTASTY_S.PLUGINS.NPS_Container_Class=n:e.setDisplayRecurrence(),{parentContainer:n,NPS:a}}function Ht(){return"customCss"!==Pt&&vt({},Object.entries(DATA).filter(function(t){return i(t,1)[0].includes(jt)}).reduce(function(t,e){var n=i(e,2),r=n[0],a=n[1],o=r.split("".concat(jt,"_"))[1],c=vt({},t);return c[o]=a,c},{}),{contentDirection:St})}function Vt(){return(Vt=s(e.mark(function t(){var n,r,a,o,i;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(xt){t.next=3;break}return top.console.error("\n\t\tThe NPS is not linked to any NPS campaign following a test duplicate.\n\t\tPlease go to ABTasty editor (https://app2.abtasty.com/edit/test/".concat(TEST_ID,"/editor) to generate a new NPS campaign.\n\t\t")),t.abrupt("return",!1);case 3:if((n=new V({displayRecurrence:qt,closingRecurrence:Gt,validationRecurrence:Mt,widgetName:bt,uniqueId:zt})).isOver()){t.next=7;break}return t.abrupt("return",!1);case 7:r=Rt,t.t0=Bt,t.next="exitIntent"===t.t0?11:"delay"===t.t0?13:"reengage"===t.t0?15:17;break;case 11:return a=Yt,t.abrupt("break",19);case 13:return a=Dt,t.abrupt("break",19);case 15:return a=Ft,t.abrupt("break",19);case 17:return a=0,t.abrupt("break",19);case 19:return o=new J({triggerEvent:Bt,triggerSelector:r,triggerDelay:a}),t.next=23,o.isTriggered();case 23:return(i=t.sent)&&Wt(Ht(),n),t.abrupt("return",i);case 26:case"end":return t.stop()}},t)}))).apply(this,arguments)}M()&&(!function(){if("onFirstWidgetSave"in ABTASTY_S.PLUGINS==0&&(ABTASTY_S.PLUGINS.onFirstWidgetSave=Qt),"editNPSCampaign"in ABTASTY_S.PLUGINS==0&&(ABTASTY_S.PLUGINS.editNPSCampaign=ot),"string"!=typeof xt||xt.length||top.console.log("Duplication case"),xt||ABTASTY_S.PLUGINS.currentWidgetNeedAsyncSave){if(xt&&!ABTASTY_S.PLUGINS.currentWidgetNeedAsyncSave){var t,e,n=["widgetsave",ABTASTY_S.PLUGINS.editNPSCampaign,{once:!0}];(t=top).removeEventListener.apply(t,n),(e=top).addEventListener.apply(e,n)}}else{var r,a,o=["widgetsave",ABTASTY_S.PLUGINS.onFirstWidgetSave,{once:!0}];(r=top).removeEventListener.apply(r,o),ABTASTY_S.PLUGINS.currentWidgetNeedAsyncSave=!0,(a=top).addEventListener.apply(a,o)}}(),ABTASTY_S.PLUGINS.NPS_Container_Class&&ABTASTY_S.PLUGINS.NPS_Container_Class.remove(),Wt(Ht())),M()||function(){Vt.apply(this,arguments)}()}();
!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:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,e,n,r){var a=e&&e.prototype instanceof m?e:m,o=Object.create(a.prototype),i=new T(r||[]);return o._invoke=function(t,e,n){var r=l;return function(a,o){if(r===d)throw new Error("Generator is already running");if(r===f){if("throw"===a)throw o;return _()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=u(t,e,n);if("normal"===s.type){if(r=n.done?f:h,s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=f,n.method="throw",n.arg=s.arg)}}}(t,n,i),o}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",h="suspendedYield",d="executing",f="completed",p={};function m(){}function g(){}function y(){}var v={};v[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(L([])));w&&w!==n&&r.call(w,o)&&(v=w);var C=y.prototype=m.prototype=Object.create(v);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function N(t){var e;this._invoke=function(n,a){function o(){return new Promise(function(e,o){!function e(n,a,o,i){var c=u(t[n],t,a);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,o,i)},function(t){e("throw",t,o,i)}):Promise.resolve(l).then(function(t){s.value=t,o(s)},function(t){return e("throw",t,o,i)})}i(c.arg)}(n,a,e,o)})}return e=e?e.then(o,o):o()}}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 p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var a=u(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,p;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function L(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=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 i.next=i}}return{next:_}}function _(){return{value:e,done:!0}}return g.prototype=C.constructor=y,y.constructor=g,y[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(C),t},t.awrap=function(t){return{__await:t}},k(N.prototype),N.prototype[i]=function(){return this},t.AsyncIterator=N,t.async=function(e,n,r,a){var o=new N(s(e,n,r,a));return t.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(C),C[c]="Generator",C[o]=function(){return this},C.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=L,T.prototype={constructor:T,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(x),!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 c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.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 o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),p}},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;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});var n=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var r=function(t){if(Array.isArray(t))return t};var a=function(t,e){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){a=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n};var o=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var i=function(t,e){return r(t)||a(t,e)||o()};function c(t,e,n,r,a,o,i){try{var c=t[o](i),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,a)}var s=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function i(t){c(o,r,a,i,s,"next",t)}function s(t){c(o,r,a,i,s,"throw",t)}i(void 0)})}};var u=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var l=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}};var h=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var d=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var f=function(t){return l(t)||h(t)||d()};var p=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function m(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 g=function(t,e,n){return e&&m(t.prototype,e),n&&m(t,n),t},y=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});var v=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var b=function(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?v(t):e},w=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}),C=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});var k=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&&C(t,e)},N=t(function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,e,n,r){var a=e&&e.prototype instanceof m?e:m,o=Object.create(a.prototype),i=new T(r||[]);return o._invoke=function(t,e,n){var r=l;return function(a,o){if(r===d)throw new Error("Generator is already running");if(r===f){if("throw"===a)throw o;return _()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var c=E(i,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=u(t,e,n);if("normal"===s.type){if(r=n.done?f:h,s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=f,n.method="throw",n.arg=s.arg)}}}(t,n,i),o}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",h="suspendedYield",d="executing",f="completed",p={};function m(){}function g(){}function y(){}var v={};v[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(L([])));w&&w!==n&&r.call(w,o)&&(v=w);var C=y.prototype=m.prototype=Object.create(v);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function N(t){var e;this._invoke=function(n,a){function o(){return new Promise(function(e,o){!function e(n,a,o,i){var c=u(t[n],t,a);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,o,i)},function(t){e("throw",t,o,i)}):Promise.resolve(l).then(function(t){s.value=t,o(s)},function(t){return e("throw",t,o,i)})}i(c.arg)}(n,a,e,o)})}return e=e?e.then(o,o):o()}}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 p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var a=u(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,p;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function L(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=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 i.next=i}}return{next:_}}function _(){return{value:e,done:!0}}return g.prototype=C.constructor=y,y.constructor=g,y[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(C),t},t.awrap=function(t){return{__await:t}},k(N.prototype),N.prototype[i]=function(){return this},t.AsyncIterator=N,t.async=function(e,n,r,a){var o=new N(s(e,n,r,a));return t.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(C),C[c]="Generator",C[o]=function(){return this},C.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=L,T.prototype={constructor:T,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(x),!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 c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.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 o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),p}},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;x(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});function E(t,e,n,r,a,o,i){try{var c=t[o](i),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,a)}var S=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,a){var o=t.apply(e,n);function i(t){E(o,r,a,i,c,"next",t)}function c(t){E(o,r,a,i,c,"throw",t)}i(void 0)})}},x="Recurrence",T="Récurrence",L="Recurrencia",_="Wiederholung",A={en:"".concat(x," of the display"),fr:"".concat(T," de l'affichage"),es:"".concat(L," de la pantalla"),de:"".concat(_," der Anzeige")},O={en:"".concat(x," after closure"),fr:"".concat(T," après fermeture"),es:"".concat(L," después del cierre"),de:"".concat(_," nach Schließung")},I={en:"".concat(x," after validation"),fr:"".concat(T," après validation"),es:"".concat(L," después de la validación"),de:"".concat(_," nach der Validierung")},P={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"};function j(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 B(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(n,!0).forEach(function(e){u(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var R={category:"conditions",type:"select",options:[{label:{en:"Every time",fr:"Tout le temps",es:"Cada vez",de:"Jedes Mal"},value:"-1"},{label:{en:"Every session",fr:"Chaque session",es:"En 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"},D=(B({},R,{label:O,propName:"closingRecurrence"}),B({},R,{label:A,propName:"displayRecurrence"}),B({},R,{label:I,propName:"validationRecurrence"}),[{label:{en:"Page load",fr:"Au chargement de la page",es:"Al carga de página",de:"Beim Laden der Seite"},value:"pageLoad"},{label:{en:"Click",fr:"Au clic",es:"Clic",de:"Klick"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet",es:"Al intentar salir ",de:"Exit Intent"},value:"exitIntent"},{label:{en:"Delay",fr:"Après un délai",es:"Después de un tiempo",de:"Verzögert"},value:"delay"},{label:{en:"Reengage (after inactivity)",fr:"Au réengagement (après inactivité)",es:"Despues de inactividad",de:"Nach Inaktivität"},value:"reengage"}]),Y={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:P,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"}]},F={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"}]},q={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"}]},G={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"}]},M=([{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"Se activa al",de:"Triggert bei"},options:D,propName:"triggerEvent",value:"pageLoad"}].concat(f([Y,F,q,G])),function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")});function z(t,e){return new Promise(function(n,r){var a=new XMLHttpRequest;a.open(t,e,!0),a.onload=function(){this.status>=200&&this.status<300?n(a.response):r({status:this.status,statusText:a.statusText})},a.onerror=function(){r({status:this.status,statusText:a.statusText})},a.send()})}var Q=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"000000",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";p(this,t),this.uniqueId=e,this.widgetContainer=n,this.basicClassName="ab_widget_container_".concat(n),this.widgetContainerId="".concat(this.basicClassName,"_").concat(e),this.contentClassName="".concat(this.basicClassName,"_content"),this.overlayClassName="".concat(this.basicClassName,"_overlay"),this.closeButtonClassName="".concat(this.basicClassName,"_close_button"),this.hideClassName="ab_hide_".concat(e),this.domElement=this.getDom()}return g(t,[{key:"insert",value:function(){var t=this;return X("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),X("body",function(e){return e.appendChild(t.domElement)},function(t){return console.error(t)}),this}},{key:"remove",value:function(){return this.domElement.remove(),this.styleElement.remove(),this}},{key:"show",value:function(){return this.domElement.classList.remove(this.hideClassName),this}},{key:"hide",value:function(){return this.domElement.classList.add(this.hideClassName),this}},{key:"init",value:function(){return this.insert(),this.addCloseEvent(),this}},{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,f(e)),r.forEach(function(e){e.addEventListener("click",function(){t.hide()},!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(M()?"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",M()&&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}(),U=function(t){function e(t,n){var r;return p(this,e),(r=b(this,w(e).call(this,t,n))).stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}return k(e,Q),g(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tposition: absolute;\n\t\t\tz-index: -1;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground-color: black;\n\t\t\topacity: 0.6;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.contentClassName," {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}]),e}(),W=function(t){function e(t,n,r){var a;return p(this,e),(a=b(this,w(e).call(this,t,n))).position=r,a.stringStyles=a.getStyles(),a.styleElement=a.getStyleTag(a.stringStyles),a}return k(e,Q),g(e,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\t").concat(this.position,": 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}]),e}(),H=function(t){function e(t,n,r,a){var o;return p(this,e),(o=b(this,w(e).call(this,t,n))).position=r,o.referrerElement=a,o.stringStyles=o.getStyles(),o.styleElement=o.getStyleTag(o.stringStyles),o}return k(e,Q),g(e,[{key:"insert",value:function(){var t=this;return X("head",function(e){return e.appendChild(t.styleElement)},function(t){return console.error(t)}),X(this.referrerElement,function(e){return e.insertAdjacentElement(t.position,t.domElement)},function(t){return console.error(t)}),this}},{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tposition: relative;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}")}}]),e}(),V=function(){function t(e){var n=e.displayRecurrence,r=e.closingRecurrence,a=e.validationRecurrence,o=e.widgetName,i=e.uniqueId;p(this,t),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(a),this.storageName="Rec_".concat(o,"_").concat(i),this.currentRecurrence=this.getCurrentRecurrence()}return g(t,[{key:"getCurrentRecurrence",value:function(){var t={type:!1},e=sessionStorage.getItem(this.storageName)||localStorage.getItem(this.storageName);try{return JSON.parse(e)||t}catch(e){return t}}},{key:"isOver",value:function(){var t=sessionStorage.getItem(this.storageName),e=localStorage.getItem(this.storageName),n=(e?parseFloat(e):0)<(new Date).getTime();return n&&localStorage.removeItem(this.storageName),n&&!e&&!t}},{key:"setRecurrence",value:function(t,e){var n=this,r=this.getTypeOfStorage(t),a=this.getStamp(t),o={type:e,stamp:a},i=this.currentRecurrence.type,c=function(){sessionStorage.getItem(n.storageName)&&sessionStorage.removeItem(n.storageName),localStorage.getItem(n.storageName)&&localStorage.removeItem(n.storageName),r.setItem(n.storageName,JSON.stringify(o))};if(!r)return!1;if(i&&"validation"!==e)if("closing"===e&&"validation"!==i)c();else{if("display"!==e||"validation"===i||"closing"===i)return!1;c()}else c();return a}},{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?window.localStorage:0===t&&window.sessionStorage)}}]),t}(),J=function(){function t(e){var n=e.triggerEvent,r=e.triggerSelector,a=e.triggerDelay;p(this,t),this.event=n,this.selector=r&&r.length?r:"body",this.delay=a}return g(t,[{key:"onPageLoad",value:function(){return new Promise(function(t,e){if("complete"!==document.readyState){var n,r=["DOMContentLoaded",function(){return t(!0)},{passive:!0,once:!0}];(n=window).addEventListener.apply(n,r),setTimeout(function(){var t;return(t=window).removeEventListener.apply(t,r),e(!1)},15e3)}return t(!0)})}},{key:"onClick",value:function(){var t=this,e=document.createElement("style");return e.innerHTML="".concat(this.selector," {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}"),document.head.appendChild(e),new Promise(function(n){var r,a=function(e){return f(document.querySelectorAll(t.selector)).some(function(n){return n.isSameNode(e)||!!e.closest(t.selector)})},o=["click",function(t){return!!a(t.target)&&(document.head.removeChild(e),n(!0))},{passive:!0,once:!0,capture:!0}];(r=document).addEventListener.apply(r,o)})}},{key:"onExitIntent",value:function(){var t,e=this;return new Promise((t=S(N.mark(function t(n){var r;return N.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=["mouseleave",function(){if(e.delay){var t=1e3*e.delay;setTimeout(function(){return n(!0)},t)}return n(!0)},{passive:!0,once:!0}],t.next=4,e.onPageLoad();case 4:t.sent&&X("body",function(t){return t.addEventListener.apply(t,r)});case 6:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}))}},{key:"onDelay",value:function(){var t,e=this;return new Promise((t=S(N.mark(function t(n){var r;return N.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=1e3*e.delay,t.next=3,e.onPageLoad();case 3:t.sent&&setTimeout(function(){return n(!0)},r);case 5:case"end":return t.stop()}},t)})),function(e){return t.apply(this,arguments)}))}},{key:"onReengage",value:function(){var t=this;return new Promise(function(e){var n=1e3*t.delay,r=n,a=["click","mousemove","scroll","keypress"],o=[function(){return r=n},{passive:!0}];a.forEach(function(t){var e;return(e=document).addEventListener.apply(e,[t].concat(o))});var i=setInterval(function(){r<=0?(e(!0),clearInterval(i),a.forEach(function(t){var e;return(e=document).removeEventListener.apply(e,[t].concat(o))})):r-=100},100)})}},{key:"isTriggered",value:function(){var t=S(N.mark(function t(){var e;return N.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=this.event,t.next="pageLoad"===t.t0?3:"click"===t.t0?7:"exitIntent"===t.t0?11:"delay"===t.t0?15:"reengage"===t.t0?19:23;break;case 3:return t.next=5,this.onPageLoad();case 5:return e=t.sent,t.abrupt("break",24);case 7:return t.next=9,this.onClick();case 9:return e=t.sent,t.abrupt("break",24);case 11:return t.next=13,this.onExitIntent();case 13:return e=t.sent,t.abrupt("break",24);case 15:return t.next=17,this.onDelay();case 17:return e=t.sent,t.abrupt("break",24);case 19:return t.next=21,this.onReengage();case 21:return e=t.sent,t.abrupt("break",24);case 23:e=!1;case 24:return t.abrupt("return",e);case 25:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}]),t}(),K=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)},X=function(t,e,n){var r,a=0;try{document.querySelector(t)}catch(e){var o="Selector «".concat(t,"» not valid.");return K(o),"function"==typeof n&&n(o)}r=setTimeout(function(){clearInterval(a);var e="Can't find element «".concat(t,"».");return K(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)};var Z=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function $(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 tt=function(t,e,n){return e&&$(t.prototype,e),n&&$(t,n),t},et="https://nps.abtasty.com/api/",nt=DATA.isFeedBackQuestion,rt=function(t,e){var n,r,a,o,i,c,s=e.question,u=e.__npsCampaignId,l=e.userFeedback,h=e.feedbackQuestion,d=window.ABTASTY_S?(n=ABTASTY_S.STORE,r=n.masterTest,a=n.test,o=n.currentVariation,i=n.tunnelParent,c=ABTASTY_S.EDITOR.getAtTestId,i?c()>i?"".concat(r.name," - ").concat(a.name):c()===i?"".concat(r.name," - ").concat(a.name," - ").concat(o.name):"":"".concat(r.name," - ").concat(o.name)):"",f=function(t,e,n){return nt?"editor"===t?n:"client"===t?e:"":""}(t,l,h);return{abtastyIdentifier:"abtastyidentifier=".concat(function(){if(window.ABTasty)return window.ABTasty.accountSettings?window.ABTasty.accountSettings.identifier:window.ABTasty.getAccountSettings&&"function"==typeof window.ABTasty.getAccountSettings?window.ABTasty.getAccountSettings().identifier:void 0}()),accessToken:"access_token=".concat(window.ABTASTY_S?ABTASTY_S.SERVER.token:""),testId:"testId=".concat(TEST_ID),variationId:"variationId=".concat(window.ABTASTY_S?ABTASTY_S.STORE.currentVariation.id:""),name:"name=".concat(d),nps:"nps=".concat(s),feedback:"feedback=".concat(f),id:"id=".concat(u),abtastyuserid:"abtastyuserid=".concat(window.ABTasty&&window.ABTasty.visitor?window.ABTasty.visitor.id:void 0)}},at=function(t){if(t.__npsCampaignId)return!1;var e,n,r,a,o,i,c,s,u=rt("editor",t);return z("GET",(n=(e=u).abtastyIdentifier,r=e.accessToken,a=e.testId,o=e.variationId,i=e.name,c=e.nps,s=e.feedback,"".concat(et,"setNPS.php?").concat(n,"&").concat(r,"&").concat(a,"&").concat(o,"&").concat(i,"&").concat(c,"&").concat(s)))},ot=function(t){var e=t.detail;if(!e.__npsCampaignId)return!1;var n,r,a,o,i,c,s,u,l,h=rt("editor",e);return z("GET",(r=(n=h).id,a=n.abtastyIdentifier,o=n.accessToken,i=n.testId,c=n.variationId,s=n.name,u=n.nps,l=n.feedback,"".concat(et,"setNPS.php?").concat(r,"&").concat(a,"&").concat(o,"&").concat(i,"&").concat(c,"&").concat(s,"&").concat(u,"&").concat(l)))},it=function(t,e){var n,r,a,o=DATA,i=o.question,c=o.__npsCampaignId,s=function(t,e){var n=e.feedback,r=e.id,a=e.abtastyIdentifier,o=e.abtastyuserid,i="score=".concat(t);return"".concat(et,"collect.php?").concat(i,"&").concat(n,"&nps").concat(r,"&").concat(a,"&").concat(o)}(t,rt("client",{question:i,__npsCampaignId:c,userFeedback:e}));return n="GET",r=s,(a=new XMLHttpRequest).open(n,r,!1),a.send(null),a};function ct(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}var st=DATA,ut=st.themeType,lt=st.layout,ht=st.isFeedBackQuestion,dt=st.isThankYouMessage,ft=st.isLegend,pt=st.timeHide,mt=st.stepToShow,gt=function(){function t(e){var n=e.uniqueId,r=e.question,a=e.feedbackQuestion,o=e.userStyles,i=e.parentContainer,c=e.buttonText,s=e.thankYouMessage,u=e.zeroLegend,l=e.tenLegend,h=e.recurrence;Z(this,t),this.uniqueId=n,this.question=r,this.feedbackQuestion=a,this.userStyles=o,this.parentContainer=i,this.buttonText=c,this.thankYouMessage=s,this.legend={zeroLegend:u,tenLegend:l},this.recurrence=h,this.baseClassName="nps_container",this.npsClassName="".concat(this.baseClassName,"_").concat(this.uniqueId),this.questionClassName="".concat(this.baseClassName,"_question"),this.notesClassName="".concat(this.baseClassName,"_notes"),this.feedbackQuestionClassName="".concat(this.questionClassName,"_feedback"),this.feedbackFormClassName="".concat(this.questionClassName,"_feedback_form"),this.notesButtonsClassName="".concat(this.notesClassName,"_button"),this.thankYouClassName="".concat(this.baseClassName,"_thanks"),this.hideClassName="nps_".concat(this.uniqueId,"_display_none"),this.currentNote=NaN,this.userFeedback="",this.npsContainer=this.getContainer(),this.questionElement=this.getQuestionElement(),this.notesContainer=this.getNotesElement(),this.feedbackElements=this.getFeedBackElements(),this.thankYouElement=this.getThankYouElement(),this.npsElement=this.getNPSElement(),this.styleElement=this.getStyleElement()}return tt(t,[{key:"sendNote",value:function(){if(top.console.log("".concat(this.currentNote)),!M()&&!isNaN(this.currentNote)){it(this.currentNote,this.userFeedback);try{window.abtasty.send("nps",{ns:this.currentNote,nf:this.userFeedback})}catch(t){}this.recurrence.setValidationRecurrence()}return this}},{key:"setExternalEvents",value:function(){var t=this,e={passive:!0,once:!0};return[this.parentContainer.overlayClassName,this.parentContainer.closeButtonClassName].forEach(function(n){t.parentContainer.domElement.querySelector(".".concat(n)).addEventListener("mouseup",function(){return t.recurrence.setClosingRecurrence()},e)}),this}},{key:"insert",value:function(t,e){return document.head.insertAdjacentElement("beforeend",this.styleElement),t.insertAdjacentElement(e,this.npsElement),this.setExternalEvents(),this}},{key:"remove",value:function(){return this.npsElement&&this.npsElement.remove(),this.styleElement&&this.styleElement.remove(),this}},{key:"complete",value:function(){var t=this;this.sendNote(),setTimeout(function(){t.parentContainer.hide(),setTimeout(function(){t.remove(),t.parentContainer.remove()},1e3)},1e3*pt)}},{key:"onClickNote",value:function(t){top.console.log(t),this.currentNote=t.target.dataset.note,ht&&this.feedbackQuestion&&this.feedbackQuestion.length?this.showFeedBack():dt&&this.thankYouMessage&&this.thankYouMessage.length?this.showThankYouMessage():this.complete()}},{key:"onFeedbackSend",value:function(){dt&&this.thankYouMessage&&this.thankYouMessage.length?this.showThankYouMessage():this.complete()}},{key:"showFeedBack",value:function(){var t=this;return this.npsContainer.childNodes.forEach(function(e){return e.classList.add(t.hideClassName)}),Object.values(this.feedbackElements).forEach(function(e){return e.classList.remove(t.hideClassName)}),this}},{key:"showThankYouMessage",value:function(){var t=this;return this.npsContainer.childNodes.forEach(function(e){return e.classList.add(t.hideClassName)}),this.thankYouElement.classList.remove(this.hideClassName),this.complete(),this}},{key:"getThankYouElement",value:function(){var t=document.createElement("p");return t.className="".concat(this.thankYouClassName," ").concat(this.hideClassName),t.innerHTML=this.thankYouMessage,M()&&"displayThanksStep"===mt&&t.classList.remove(this.hideClassName),t}},{key:"getFeedBackElements",value:function(){var t=this,e=document.createElement("p");e.className="".concat(this.feedbackQuestionClassName," ").concat(this.hideClassName),e.innerHTML=this.feedbackQuestion;var n=document.createElement("form");n.className="".concat(this.feedbackFormClassName," ").concat(this.hideClassName);var r=document.createElement("input");r.className="".concat(this.feedbackQuestionClassName,"_input"),r.type="text";var a=document.createElement("button");return a.className="".concat(this.feedbackQuestionClassName,"_button"),a.innerHTML=this.buttonText,a.addEventListener("click",function(){return t.onFeedbackSend()},{passive:!0}),M()&&"displayFeedbackStep"===mt&&[e,n].forEach(function(e){return e.classList.remove(t.hideClassName)}),n.appendChild(r),n.appendChild(a),{feedbackQuestionElement:e,feedbackFormElement:n}}},{key:"getNotesElement",value:function(){var t=this,e=document.createElement("div");e.className=this.notesClassName,M()&&"displayNoteStep"!==mt&&e.classList.add(this.hideClassName);for(var n=10;n>=0;){var r=document.createElement("button");r.className=this.notesButtonsClassName,r.dataset.note=n,M()&&r.setAttribute("data-abtasty-actionnable",""),r.innerHTML+="<span>".concat(n,"</span>"),r.addEventListener("click",function(e){return t.onClickNote(e)},{passive:!0}),e.insertAdjacentElement("afterbegin",r),n-=1}return ft&&(e.insertAdjacentHTML("afterbegin","<legend>".concat(this.legend.zeroLegend,"</legend>")),e.insertAdjacentHTML("beforeend","<legend>".concat(this.legend.tenLegend,"</legend>"))),e}},{key:"getQuestionElement",value:function(){var t=document.createElement("p");return t.className=this.questionClassName,t.innerHTML=this.question,M()&&"displayNoteStep"!==mt&&t.classList.add(this.hideClassName),t}},{key:"getContainer",value:function(){var t=document.createElement("div");return t.className="".concat(this.baseClassName," ").concat(this.npsClassName),t}},{key:"getNPSElement",value:function(){var t=this;return this.npsContainer.appendChild(this.questionElement),this.npsContainer.appendChild(this.notesContainer),ht&&Object.values(this.feedbackElements).forEach(function(e){t.npsContainer.appendChild(e)}),dt&&this.npsContainer.appendChild(this.thankYouElement),this.npsContainer}},{key:"getDefaultStyles",value:function(){var t="\n\t\t\t#".concat(this.parentContainer.widgetContainerId," .").concat(this.baseClassName,",\n\t\t\t#").concat(this.parentContainer.widgetContainerId," .").concat(this.baseClassName," *");return"\n\t\t@media (orientation: landscape) {\n\t\t\t".concat(t," {\n\t\t\t\tfont-size: .55vmax;\n\t\t\t}\n\t\t}\n\t\t@media (orientation: landscape) and (max-width: 1280px) {\n\t\t\t").concat(t," {\n\t\t\t\tfont-size: .7vmax;\n\t\t\t}\n\t\t}\n\t\t@media (orientation: landscape) and (max-width: 800px) {\n\t\t\t").concat(t," {\n\t\t\t\tfont-size: 1vmax;\n\t\t\t}\n\t\t}\n\t\t@media (orientation: portrait) {\n\t\t\t").concat(t," {\n\t\t\t\tfont-size: 1vmin;\n\t\t\t}\n\t\t}\n\t\t#").concat(this.parentContainer.widgetContainerId," .").concat(this.hideClassName," {\n\t\t\tdisplay: none !important;\n\t\t}\n\t\t").concat(t," {\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tmin-width: inherit;\n\t\t\tmin-height: inherit;\n\t\t\tmax-width: inherit;\n\t\t\tmax-height: inherit;\n\t\t\tline-height: 1;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tborder: none;\n\t\t}\n\t\t#").concat(this.parentContainer.widgetContainerId," .").concat(this.baseClassName," .").concat(this.notesButtonsClassName," span {\n\t\t\tpointer-events: none;\n\t\t}")}},{key:"getThemeDefaultStyles",value:function(){var t="popin"===lt?"75em":"auto",e="#".concat(this.parentContainer.widgetContainerId," .").concat(this.npsClassName);return"\n\t\t".concat(e,",\n\t\t").concat(e," * {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: nowrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t").concat(e," {\n\t\t\twidth: ").concat(t,";\n\t\t\talign-items: center;\n\t\t}\n\t\t").concat(e," .").concat(this.questionClassName,",\n\t\t").concat(e," .").concat(this.feedbackQuestionClassName,",\n\t\t").concat(e," .").concat(this.thankYouClassName," {\n\t\t\tfont-size: 2em;\n\t\t}\n\t\t").concat(e," .").concat(this.notesClassName," {\n\t\t\tflex-direction: row;\n\t\t}\n\t\t").concat(e," .").concat(this.notesClassName," legend {\n\t\t\talign-self: center;\n\t\t\tfont-size: 1.5em;\n\t\t}\n\t\t").concat(e," .").concat(this.notesClassName," legend:first-of-type {\n\t\t\tmargin-right: 1em;\n\t\t}\n\t\t").concat(e," .").concat(this.notesClassName," legend:last-of-type {\n\t\t\tmargin-left: 1em;\n\t\t}\n\t\t").concat(e," .").concat(this.notesButtonsClassName," {\n\t\t\twidth: 3.5em;\n\t\t\theight: 3.5em;\n\t\t}\n\t\t").concat(e," .").concat(this.notesButtonsClassName," span {\n\t\t\tfont-size: 2em;\n\t\t}\n\t\t").concat(e," .").concat(this.feedbackFormClassName," {\n\t\t\tflex-direction: row;\n\t\t}\n\t\t").concat(e," .").concat(this.feedbackFormClassName," input {\n\t\t\twidth: 45em;\n\t\t\theight: 4em;\n\t\t}\n\t\t").concat(e," .").concat(this.feedbackFormClassName," button {\n\t\t\twidth: 10em;\n\t\t\tfont-size: 1.4em;\n\t\t}")}},{key:"getUserStyles",value:function(){var t,e=this.userStyles,r=e.backgroundColor,a=e.borderColor,o=e.borderRadius,c=e.borderWidth,s=e.dropShadow,u=e.textColor,l=e.horizontalPaddingContainer,h=e.verticalPaddingContainer,d=e.horizontalMarginContainer,f=e.verticalMarginContainer,p=e.overlayColor,m=e.overlayOpacity,g=e.shadowOpacity,y=e.buttonsContrast,v=e.buttonsBorderRadius,b=e.buttonsShape,w=e.contentDirection,C=e.questionMargin,k=e.buttonsHorizontalMargin,N=e.inputBackgroundColor,E=e.inputBorderColor,S=e.inputBorderWidth,x=e.inputBorderRadius,T=e.inputTextColor,L=e.inputMarginWithButton,_=e.feedbackButtonBackgroundColor,A=e.feedbackButtonBorderColor,O=e.feedbackButtonBorderWidth,I=e.feedbackButtonBorderRadius,P=e.feedbackButtonTextColor,j=Object.entries(this.userStyles).filter(function(t){return i(t,1)[0].includes(y)}).reduce(function(t,e){var r=i(e,2),a=r[0],o=r[1],c=a.split("_".concat(y))[0],s=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ct(r,!0).forEach(function(e){n(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ct(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},t);return s[c]=o,s},{}),B=j.buttonsBackgroundColor,R=j.buttonsTextColor,D=j.buttonsBorderColor,Y=j.buttonsBorderWidth;switch(b){case"roundsquare":t="border-radius: ".concat(v,"px;");break;case"round":t="border-radius: 50%;";break;default:t=""}var F=s?"box-shadow: 0px 5px 10px 2px rgba(0, 0, 0, ".concat(g/100,");"):"",q="#".concat(this.parentContainer.widgetContainerId," .").concat(this.npsClassName),G="\n\t\t\t".concat(q," .").concat(this.notesButtonsClassName," {\n\t\t\t\tmargin-left: ").concat(k,"px;\n\t\t\t\tmargin-right: ").concat(k,"px;\n\t\t\t\tbackground-color: ").concat(B,";\n\t\t\t\tborder: ").concat(Y,"px solid ").concat(D,";\n\t\t\t\t").concat(t,"\n\t\t\t}\n\t\t\t").concat(q," .").concat(this.notesButtonsClassName," span {\n\t\t\t\tcolor: ").concat(R,";\n\t\t\t}");return"\n\t\t\tbody ".concat(q," {\n\t\t\t\tflex-direction: ").concat(w,";\n\t\t\t\tbackground-color: ").concat(r,";\n\t\t\t\tborder: ").concat(c,"px solid ").concat(a,";\n\t\t\t\tborder-radius: ").concat(o,"px;\n\t\t\t\tpadding: ").concat(h,"px ").concat(l,"px;\n\t\t\t\t").concat(F,"\n\t\t\t}\n\t\t\t").concat(q," .").concat(this.questionClassName,",\n\t\t\t").concat(q," .").concat(this.feedbackQuestionClassName," ,\n\t\t\t").concat(q," .").concat(this.thankYouClassName," {\n\t\t\t\tcolor: ").concat(u,";\n\t\t\t\tmargin-").concat("row"===w?"right":"bottom"," : ").concat(C,"px;\n\t\t\t}\n\t\t\t").concat(q," .").concat(this.thankYouClassName," {\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\t\t\t").concat(q," .").concat(this.notesClassName," legend {\n\t\t\t\tcolor: ").concat(u,";\n\t\t\t}\n\t\t\t").concat(G,"\n\t\t\t").concat(q," .").concat(this.feedbackFormClassName," input {\n\t\t\t\tbackground-color: ").concat(N,";\n\t\t\t\tborder: ").concat(S,"px solid ").concat(E,";\n\t\t\t\tborder-radius: ").concat(x,"px;\n\t\t\t\tcolor: ").concat(T,";\n\t\t\t\tmargin-right: ").concat(L,"px;\n\t\t\t}\n\t\t\t").concat(q," .").concat(this.feedbackFormClassName," button {\n\t\t\t\tbackground-color: ").concat(_,";\n\t\t\t\tborder: ").concat(O,"px solid ").concat(A,";\n\t\t\t\tborder-radius: ").concat(I,"px;\n\t\t\t\tcolor: ").concat(P,";\n\t\t\t}\n\t\t\tbody #").concat(this.parentContainer.widgetContainerId," {\n\t\t\t\tmargin: ").concat(f,"px ").concat(d,"px;\n\t\t\t}\n\t\t\tbody #").concat(this.parentContainer.widgetContainerId," .").concat(this.parentContainer.overlayClassName," {\n\t\t\t\tbackground-color: ").concat(p,";\n\t\t\t\topacity: ").concat(m/100,";\n\t\t\t}")}},{key:"getStyleElement",value:function(){var t="theme"===ut,e=this.getDefaultStyles(),n=t?this.getThemeDefaultStyles():"",r=t?this.getUserStyles():"",a=document.createElement("style");return M()&&a.setAttribute("abtasty-script-added","true"),a.textContent="".concat(e," ").concat(n," ").concat(r),a}}]),t}();function yt(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 vt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(r,!0).forEach(function(e){n(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var bt="NPS",wt=DATA,Ct=wt.layout,kt=wt.bannerPosition,Nt=wt.npsElementReferrer,Et=wt.npsReferrerInsertType,St=wt.contentDirection,xt=wt.__npsCampaignId,Tt=wt.question,Lt=wt.feedbackQuestion,_t=wt.buttonText,At=wt.thankYouMessage,Ot=wt.zeroLegend,It=wt.tenLegend,Pt=wt.themeType,jt=wt.theme,Bt=wt.triggerEvent,Rt=wt.triggerEventClick,Dt=wt.triggerEventDelay,Yt=wt.triggerEventExitDelay,Ft=wt.triggerEventReengageDelay,qt=wt.displayRecurrence,Gt=wt.closingRecurrence,Mt=wt.validationRecurrence,zt="".concat(PLUGIN_ID.split("-")[0],"_").concat(TEST_ID);function Qt(t){return Ut.apply(this,arguments)}function Ut(){return(Ut=s(e.mark(function t(n){var r,a,o,i;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.detail,t.next=3,at(r);case 3:if(a=t.sent){t.next=6;break}return t.abrupt("return",!1);case 6:return o=vt({},r,{__npsCampaignId:JSON.parse(a).id}),i=new CustomEvent("asyncWidgetDataObtained",{detail:o}),top.dispatchEvent(i),t.abrupt("return",!0);case 10:case"end":return t.stop()}},t)}))).apply(this,arguments)}function Wt(t,e){var n;switch(Ct){case"popin":n=new U(zt,bt);break;case"banner":n=new W(zt,bt,kt);break;default:n=new H(zt,bt,Et,Nt)}n.init();var r=n.domElement.querySelector(".".concat(n.contentClassName)),a=new gt({uniqueId:zt,question:Tt,feedbackQuestion:Lt,userStyles:t,parentContainer:n,buttonText:_t,thankYouMessage:At,zeroLegend:Ot,tenLegend:It,recurrence:e});return a.insert(r,"beforeend"),n.show(),M()?ABTASTY_S.PLUGINS.NPS_Container_Class=n:e.setDisplayRecurrence(),{parentContainer:n,NPS:a}}function Ht(){return"customCss"!==Pt&&vt({},Object.entries(DATA).filter(function(t){return i(t,1)[0].includes(jt)}).reduce(function(t,e){var n=i(e,2),r=n[0],a=n[1],o=r.split("".concat(jt,"_"))[1],c=vt({},t);return c[o]=a,c},{}),{contentDirection:St})}function Vt(){return(Vt=s(e.mark(function t(){var n,r,a,o,i;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(xt){t.next=3;break}return top.console.error("\n\t\tThe NPS is not linked to any NPS campaign following a test duplicate.\n\t\tPlease go to ABTasty editor (https://app2.abtasty.com/edit/test/".concat(TEST_ID,"/editor) to generate a new NPS campaign.\n\t\t")),t.abrupt("return",!1);case 3:if((n=new V({displayRecurrence:qt,closingRecurrence:Gt,validationRecurrence:Mt,widgetName:bt,uniqueId:zt})).isOver()){t.next=7;break}return t.abrupt("return",!1);case 7:r=Rt,t.t0=Bt,t.next="exitIntent"===t.t0?11:"delay"===t.t0?13:"reengage"===t.t0?15:17;break;case 11:return a=Yt,t.abrupt("break",19);case 13:return a=Dt,t.abrupt("break",19);case 15:return a=Ft,t.abrupt("break",19);case 17:return a=0,t.abrupt("break",19);case 19:return o=new J({triggerEvent:Bt,triggerSelector:r,triggerDelay:a}),t.next=23,o.isTriggered();case 23:return(i=t.sent)&&Wt(Ht(),n),t.abrupt("return",i);case 26:case"end":return t.stop()}},t)}))).apply(this,arguments)}M()&&(!function(){if("onFirstWidgetSave"in ABTASTY_S.PLUGINS==0&&(ABTASTY_S.PLUGINS.onFirstWidgetSave=Qt),"editNPSCampaign"in ABTASTY_S.PLUGINS==0&&(ABTASTY_S.PLUGINS.editNPSCampaign=ot),"string"!=typeof xt||xt.length||top.console.log("Duplication case"),xt||ABTASTY_S.PLUGINS.currentWidgetNeedAsyncSave){if(xt&&!ABTASTY_S.PLUGINS.currentWidgetNeedAsyncSave){var t,e,n=["widgetsave",ABTASTY_S.PLUGINS.editNPSCampaign,{once:!0}];(t=top).removeEventListener.apply(t,n),(e=top).addEventListener.apply(e,n)}}else{var r,a,o=["widgetsave",ABTASTY_S.PLUGINS.onFirstWidgetSave,{once:!0}];(r=top).removeEventListener.apply(r,o),ABTASTY_S.PLUGINS.currentWidgetNeedAsyncSave=!0,(a=top).addEventListener.apply(a,o)}}(),ABTASTY_S.PLUGINS.NPS_Container_Class&&ABTASTY_S.PLUGINS.NPS_Container_Class.remove(),Wt(Ht())),M()||function(){Vt.apply(this,arguments)}()}();
{
"name": "@abtasty/nps",
"description": "Allow you to add a custom NPS on your website",
"version": "0.3.6",
"version": "0.3.7",
"main": "dist/main.js",

@@ -46,5 +46,5 @@ "form": "dist/form.js",

"dependencies": {
"@abtasty/widget-utils": "1.12.3-25",
"@abtasty/widget-utils": "1.12.3-27",
"@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