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

@abtasty/nps

Package Overview
Dependencies
Maintainers
0
Versions
175
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.4.9 to 0.4.10

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 s=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var c=function(e){return a(e)||i(e)||s()};var l=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(n){"@babel/helpers - typeof";return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t});var h=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var g=function(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?h(e):t},m=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}),y=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&&y(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",s=o.toStringTag||"@@toStringTag";function c(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),i=new T(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 B()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=N(i,n);if(s){if(s===h)continue;return s}}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 c=l(e,t,n);if("normal"===c.type){if(r=n.done?f:d,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=f,n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u="suspendedStart",d="suspendedYield",p="executing",f="completed",h={};function g(){}function m(){}function y(){}var b={};b[a]=function(){return this};var v=Object.getPrototypeOf,k=v&&v(v(O([])));k&&k!==n&&r.call(k,a)&&(b=k);var w=y.prototype=g.prototype=Object.create(b);function C(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function S(e,t){var n;this._invoke=function(o,a){function i(){return new t(function(n,i){!function n(o,a,i,s){var c=l(e[o],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,i,s)},function(e){n("throw",e,i,s)}):t.resolve(d).then(function(e){u.value=e,i(u)},function(e){return n("throw",e,i,s)})}s(c.arg)}(o,a,n,i)})}return n=n?n.then(i,i):i()}}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=l(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 T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function O(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:B}}function B(){return{value:t,done:!0}}return m.prototype=w.constructor=y,y.constructor=m,y[s]=m.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},C(S.prototype),S.prototype[i]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new S(c(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then(function(e){return e.done?e.value:i.next()})},C(w),w[s]="Generator",w[a]=function(){return this},w.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=O,T.prototype={constructor:T,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 s.type="throw",s.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],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)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:O(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 k(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}var w=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){k(a,r,o,i,s,"next",e)}function s(e){k(a,r,o,i,s,"throw",e)}i(void 0)})}},C={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"},S={en:"Recurrence",fr:"Récurrence",es:"Recurrencia",de:"Wiederholung"},N={en:"".concat(S.en," of the display"),fr:"".concat(S.fr," de l'affichage"),es:"".concat(S.es," de visualización"),de:"".concat(S.de," der Anzeige")},x={en:"".concat(S.en," after closure"),fr:"".concat(S.fr," après fermeture"),es:"".concat(S.es," tras el cierre"),de:"".concat(S.de," nach Schließung")},E={en:"".concat(S.en," after validation"),fr:"".concat(S.fr," après validation"),es:"".concat(S.es," tras la validación"),de:"".concat(S.de," nach der Validierung")},T={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},O="style",B="content",P="slider",_="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 R,j={category:"conditions",type:"select",options:[{label:{en:"Every time",fr:"Tout le temps",es:"Todo el tiempo",de:"Jedes Mal"},value:"-1"},{label:{en:"Every session",fr:"Chaque session",es:"A cada sesión",de:"Jede Session"},value:"0"},{label:{en:"Everyday",fr:"Chaque jour",es:"Cada día",de:"Jeden Tag"},value:"1"},{label:{en:"Every week",fr:"Chaque semaine",es:"Cada semana",de:"Jede Woche"},value:"7"},{label:{en:"Every month",fr:"Chaque mois",es:"Cada mes",de:"Jeden Monat"},value:"30"},{label:{en:"Once per user (no recurrence)",fr:"Une fois par visiteur (pas de récurrence)",es:"Una vez por usuario (sin recurrencia)",de:"Einmal pro User (keine Wiederholung)"},value:"365"}],value:"-1"},I=L({},j,{label:x,propName:"closingRecurrence"}),z={category:"conditions",type:"group",label:S,collapsible:!0,children:[L({},j,{label:N,propName:"displayRecurrence"}),I,L({},j,{label:E,propName:"validationRecurrence"})]},D=[{label:{en:"Page load",fr:"Au chargement de la page",es:"Al cargar la página",de:"Beim Laden der Seite"},value:"pageLoad"},{label:{en:"Click",fr:"Au clic",es:"Al hacer clic",de:"Klick"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet",es:"Antes de cerrar la pestaña",de:"Exit Intent"},value:"exitIntent"},{label:{en:"Delay",fr:"Après un délai",es:"Tras un retraso",de:"Verzögert"},value:"delay"},{label:{en:"Reengage (after inactivity)",fr:"Au réengagement (après inactivité)",es:"En la reactivación (tras un periodo de inactividad)",de:"Nach Inaktivität"},value:"reengage"}],M={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:T,placeholder:{en:"Select an element in the webpage",fr:"Sélectionner un élément dans la page",es:"Selecciona un elemento en la página web",de:"Wählen Sie ein Element auf der Webseite aus"},conditions:[{field:"triggerEvent",value:"click"}]},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"}]},V={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:T,collapsible:!0,children:[{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:D,propName:"triggerEvent",value:"pageLoad"}].concat(c([M,F,q,V]))},H=function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")},K=((R="undefined"!=typeof global?global:window).ABTasty||Object.assign(R,{ABTasty:{widgetutils:{}}}),R.ABTasty.widgetutils||Object.assign(R.ABTasty,{widgetutils:{}}),R).ABTasty.widgetutils;function G(e,t){return K.hasOwnProperty(e)||Object.assign(K,o({},e,new t)),K[e]}var Q={category:O,type:"colorpicker",label:{en:"Background color",fr:"Couleur de fond",es:"Color de fondo",de:"Hintergrundfarbe"},propName:"backgroundColor",value:"rgba(255, 255, 255, 1)"},J={category:O,type:P,label:{en:"Background opacity",fr:"Opacité du fond",es:"Opacidad de fondo",de:"Hintergrundopazität"},propName:"backgroundOpacity",value:75,unit:"%"},U={category:O,type:"colorpicker",label:{en:"Border color",fr:"Couleur du contour",es:"Color del contorno",de:"Farbe der Kontur"},propName:"borderColor",value:"rgba(255, 255, 255, 1)"},Y={category:O,type:P,label:{en:"Border radius",fr:"Arrondi du contour",es:"Redondeo del contorno",de:"Rundung der Kontur"},propName:"borderRadius",value:0,unit:"px"},Z={category:O,type:P,label:{en:"Border thickness",fr:"Épaisseur du contour",es:"Grosor del contorno",de:"Konturendicke"},propName:"borderWidth",value:0,unit:"px"},X=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]:"";l(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 re("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),re("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,c(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}();(function(e){function t(e,n){var r;return l(this,t),(r=g(this,m(t).call(this,e,n))).stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}b(t,X),d(t,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tposition: absolute;\n\t\t\tz-index: -1;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground-color: black;\n\t\t\topacity: 0.6;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.contentClassName," {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}\n\t\t\n\t\t@media screen and (max-width: 550px) and (orientation: portrait) {\n\t\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\t\tfont-size: 6vmin;\n\t\t\t}\n\t\t}")}}])})(),function(e){function t(e,n,r){var o;return l(this,t),(o=g(this,m(t).call(this,e,n))).position=r,o.stringStyles=o.getStyles(),o.styleElement=o.getStyleTag(o.stringStyles),o}b(t,X),d(t,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\t").concat(this.position,": 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\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 l(this,t),(a=g(this,m(t).call(this,e,n))).position=r,a.referrerElement=o,a.stringStyles=a.getStyles(),a.styleElement=a.getStyleTag(a.stringStyles),a}b(t,X),d(t,[{key:"insert",value:function(){var e=this;return re("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),re(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;l(this,e),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(o),this.storageName="Rec_".concat(a,"_").concat(i)}d(e,[{key:"getSessionRecurrenceStorage",value:function(){return sessionStorage.getItem(this.storageName)}},{key:"getLocalRecurrenceStorage",value:function(){return localStorage.getItem(this.storageName)}},{key:"removeSessionRecurrenceStorage",value:function(){return sessionStorage.removeItem(this.storageName)}},{key:"removeLocalRecurrenceStorage",value:function(){return localStorage.removeItem(this.storageName)}},{key:"getSessionRecurrence",value:function(){var e=this.getSessionRecurrenceStorage();try{return JSON.parse(e)}catch(e){return console.error("Cannot parse recurrence from storage, format is wrong, more details : ".concat(e)),!1}}},{key:"getLocalRecurrence",value:function(){var e=this.getLocalRecurrenceStorage();try{return JSON.parse(e)}catch(e){return console.error("Cannot parse recurrence from storage, format is wrong, more details : ".concat(e)),!1}}},{key:"getCurrentRecurrence",value:function(){return this.getSessionRecurrenceStorage()?this.getSessionRecurrence():this.getLocalRecurrenceStorage()?this.getLocalRecurrence():{type:!1}}},{key:"isOver",value:function(){var e=this.getLocalRecurrence(),t=(e?parseFloat(e.stamp):0)<(new Date).getTime();return t&&localStorage.removeItem(this.storageName),t&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(e,t){var n=this,r=this.getTypeOfStorage(e),o=this.getStamp(e),a={type:t,stamp:o},i=this.getCurrentRecurrence().type,s=function(){n.getSessionRecurrenceStorage()&&n.removeSessionRecurrenceStorage(),n.getLocalRecurrenceStorage()&&n.removeLocalRecurrenceStorage(),r.setItem(n.storageName,JSON.stringify(a))};if(!r)return!1;if(i&&"validation"!==t)if("closing"===t&&"validation"!==i)s();else{if("display"!==t||"validation"===i||"closing"===i)return!1;s()}else s();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 $(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||(e="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=IntersectionObserver",new Promise(function(t,n){var r=window.document.getElementsByTagName("script")[0],o=window.document.createElement("script");o.src=e,r.parentNode.insertBefore(o,r),o.onload=t,o.onerror=n}));var e}function ee(e){return function(){return w(v.mark(function e(t){return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="IntersectionObserver"===e.t0?3:6;break;case 3:return e.next=5,$();case 5:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",!0);case 7:case"end":return e.stop()}},e)})).apply(this,arguments)}.apply(this,arguments)}var te=function(){function e(){l(this,e),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return d(e,[{key:"intersectionHandler",value:function(e){var t=this;e.forEach(function(e){e.isIntersecting?(t.existingTargets=t.existingTargets.filter(function(n){return n.element!==e.target||(t.inViewPortTargets.push(n),!1)}),t.checkElements()):t.inViewPortTargets=t.inViewPortTargets.filter(function(n){return n.element!==e.target||(t.existingTargets.push(n),!1)})})}},{key:"startVisibilityObserver",value:function(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:.5})}},{key:"startMutationObserver",value:function(){var e=new MutationObserver(this.checkElements.bind(this));return e.observe(document,{attributes:!0,childList:!0,subtree:!0}),e}},{key:"isElementVisible",value:function(e){return this.isElementTopmost(e)&&this.isElementOpaque(e)}},{key:"isElementOpaque",value:function(e){return"HTML"===function e(t,n){return n(t)||!t.parentElement?t:e(t.parentElement,n)}(e,function(e){return"0"===window.getComputedStyle(e).opacity}).nodeName}},{key:"isElementTopmost",value:function(e){for(var t=e.getBoundingClientRect(),n=[[t.left,t.top],[t.right,t.top],[t.left,t.bottom],[t.right,t.bottom]],r=!1,o=0;!r&&o<n.length;){var a,i=(a=document).elementFromPoint.apply(a,c(n[o]));r=e===i||e.contains(i),o++}return r}},{key:"checkElements",value:function(){var e=this;this.targets=this.targets.filter(function(t){var n=document.querySelector(t.selector);return!n||(e.existingTargets.push(Object.assign(t,{element:n})),e.visibilityobserver.observe(n),!1)}),this.existingTargets=this.existingTargets.filter(function(t){return!!document.querySelector(t.selector)||(e.visibilityobserver.unobserve(t.element),e.targets.push(t),!1)}),this.inViewPortTargets=this.inViewPortTargets.filter(function(t){var n=t.element,r=t.resolve;return!e.isElementVisible(n)||(e.visibilityobserver.unobserve(n),r(n),!1)})}},{key:"watch",value:function(e,t){this.targets.push({selector:e,resolve:t})}}]),e}(),ne=(function(){function e(t){var n=t.triggerEvent,r=t.triggerSelector,o=t.triggerDelay;l(this,e),this.event=n,this.selector=r&&r.length?r:"body",this.delay=o}d(e,[{key:"onElementVisible",value:function(){var e,t=this;return new Promise((e=w(v.mark(function e(n){var r,o,a;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.onPageLoad();case 2:return r=e.sent,e.next=5,ee();case 5:o=e.sent,a=G("VisibilityObserver",te),o&&r&&a.watch(t.selector,n);case 8:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},{key:"onPageLoad",value:function(){return new Promise(function(e,t){if("complete"===document.readyState)return e(!0);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)})}},{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 c(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=w(v.mark(function e(n){var r;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=["mouseleave",function(){var e=w(v.mark(function e(){var r;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.delay){e.next=5;break}r=1e3*t.delay,setTimeout(function(){return n(!0)},r),e.next=6;break;case 5:return e.abrupt("return",n(!0));case 6:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),{passive:!0,once:!0}],e.next=4,t.onPageLoad();case 4:e.sent&&re("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=w(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=w(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:"elementVisible"===e.t0?23:27;break;case 3:return e.next=5,this.onPageLoad();case 5:return t=e.sent,e.abrupt("break",28);case 7:return e.next=9,this.onClick();case 9:return t=e.sent,e.abrupt("break",28);case 11:return e.next=13,this.onExitIntent();case 13:return t=e.sent,e.abrupt("break",28);case 15:return e.next=17,this.onDelay();case 17:return t=e.sent,e.abrupt("break",28);case 19:return e.next=21,this.onReengage();case 21:return t=e.sent,e.abrupt("break",28);case 23:return e.next=25,this.onElementVisible();case 25:return t=e.sent,e.abrupt("break",28);case 27:t=!1;case 28:return e.abrupt("return",t);case 29: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)}),re=function(e,t,n){var r,o=0;try{document.querySelector(e)}catch(t){var a="Selector «".concat(e,"» not valid.");return ne(a),"function"==typeof n&&n(a)}r=setTimeout(function(){clearInterval(o);var t="Can't find element «".concat(e,"».");return ne(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)},oe='<a href="https://app2.abtasty.com/insights/nps" target="_blank">',ae={en:"".concat(oe,"Access the NPS© results").concat("</a>"),fr:"".concat(oe,"Accéder aux résultats du NPS©").concat("</a>"),es:"".concat(oe,"Acceder a los resultados del NPS©").concat("</a>"),de:"".concat(oe,"Zugang zu den NPS-Ergebnissen").concat("</a>")},ie={en:"Open-ended question",fr:"Question ouverte",es:"Pregunta abierta",de:"Offene Frage"},se="\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",ce={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(se),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(se),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:"},le=[{field:"isFeedBackQuestion",value:!0}],ue=[{category:B,type:"hidden",propName:"__npsCampaignId",value:!1},{category:B,type:"paragraph",propName:"linkToNPSCampaignsList",text:ae},{category:B,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:"¿ Cuál es la probabilidad de que nos recomiendes a alguien ?",de:"Wie hoch ist die Wahrscheinlichkeit, dass Sie uns weiterempfehlen?"}},{category:B,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:B,type:"textarea",propName:"feedbackQuestion",label:ie,value:{en:"Would you like to leave a comment ?",fr:"Souhaitez-vous laisser un commentaire ?",es:"¿ Quieres dejar un comentario ?",de:"Möchten Sie einen Kommentar eingeben ?"},conditions:le},{category:B,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:"Senden"},conditions:le},{category:B,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:B,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:B,type:"checkbox",propName:"isLegend",label:{en:"Display key",fr:"Afficher un légende",es:"Mostrar una leyenda",de:"Legende anzeigen"},value:!1},{category:B,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:"Very unlikely",fr:"Très faible",es:"Muy baja",de:"Sehr gering"},conditions:[{field:"isLegend",value:!0}]},{category:B,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:"Very likely",fr:"Très élevée",es:"Muy alta",de:"Sehr hoch"},conditions:[{field:"isLegend",value:!0}]}],de=[{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-in",de:"Pop-in"},value:"popin",src:"".concat(_,"layout/popin.svg")},{label:{en:"Banner",fr:"Bannière",es:"Banner",de:"Banner"},value:"banner",src:"".concat(_,"banner/bottom.png")},{label:{en:"Free placement",fr:"Placement libre",es:"Integrado",de:"Freie Platzierung "},value:"free",src:"".concat(_,"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(_,"banner/bottom.png")},{label:{en:"At the top",fr:"En haut",es:"Arriba",de:"Oben"},value:"top",src:"".concat(_,"banner/top.png")}]},{category:"layout",type:"selectelement",propName:"npsElementReferrer",label:C,value:"body",conditions:[{field:"layout",value:"free"}]},{category:"layout",type:"select",propName:"npsReferrerInsertType",value:"beforeend",conditions:[{field:"layout",value:"free"}],label:C,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:"Arriba",de:"Spalte"},value:"column"},{label:{en:"At the left",fr:"À gauche",es:"A la izquierda",de:"Reihe"},value:"row"}]}],pe=[z,W,{category:"conditions",type:"checkbox",propName:"autoHide",value:!0,label:{en:"Auto hide after user validation",fr:"Masquer automatiquement après la validation",es:"Ocultar automáticamente tras la validación",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:"Ocultar tras x segundos",de:"Nach X Sekunden ausblenden"},conditions:[{field:"autoHide",value:!0}]}];var fe=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 he(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 ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(n,!0).forEach(function(t){fe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var me="rgba(255, 255, 255, 1)",ye="rgb(33, 121, 129, 1)",be=[{field:"themeType",value:"theme"}],ve=[{field:"buttonsContrast",value:"full"}],ke=[{field:"buttonsContrast",value:"empty"}],we={borderWidth:2,borderRadius:10,borderColor:ye,backgroundColor:me,overlayColor:"rgba(0, 0, 0, 1)",overlayOpacity:50,textColor:ye,questionMargin:15,horizontalPaddingContainer:20,verticalPaddingContainer:15,horizontalMarginContainer:0,verticalMarginContainer:0,dropShadow:!1,shadowOpacity:0,buttonsHorizontalMargin:5,buttonsContrast:"full",buttonsShape:"roundsquare",buttonsBorderRadius:8,buttonsBackgroundColor_full:ye,buttonsBackgroundColor_empty:me,buttonsTextColor_full:me,buttonsTextColor_empty:ye,buttonsBorderColor_full:ye,buttonsBorderColor_empty:ye,buttonsBorderWidth_full:0,buttonsBorderWidth_empty:2,inputBackgroundColor:me,inputBorderColor:ye,inputBorderWidth:2,inputBorderRadius:8,inputTextColor:ye,inputMarginWithButton:10,feedbackButtonBackgroundColor:me,feedbackButtonBorderColor:ye,feedbackButtonBorderWidth:2,feedbackButtonBorderRadius:8,feedbackButtonTextColor:ye},Ce=[{themeValue:"lightTheme",defaultValues:ge({},we)},{themeValue:"darkTheme",defaultValues:ge({},we,{borderColor:ye,backgroundColor:ye,overlayOpacity:75,textColor:me,buttonsContrast:"empty",buttonsBackgroundColor_full:me,buttonsBackgroundColor_empty:ye,buttonsTextColor_full:ye,buttonsTextColor_empty:me,buttonsBorderColor_full:me,buttonsBorderColor_empty:me,buttonsBorderWidth_full:2,buttonsBorderWidth_empty:2,inputBackgroundColor:ye,inputBorderColor:me,inputTextColor:me,feedbackButtonBackgroundColor:ye,feedbackButtonBorderColor:me,feedbackButtonTextColor:me})}],Se={category:O,type:"group",collapsible:!0,conditions:be},Ne={category:O,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:me},xe={category:O,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:ye},Ee={category:O,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:ye},Te={category:O,type:P,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"},Oe={category:O,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:ie,value:"displayFeedbackStep"},{label:{en:"Thanks",fr:"Remerciement",es:"Gracias",de:"Dank"},value:"displayThanksStep"}]},Be=ge({},Q,{propName:"overlayColor",label:{en:"Overlay color",fr:"Couleur de l'arrière-plan",es:"Color del segundo plano",de:"Overlay-Farbe"}}),Pe=ge({},J,{propName:"overlayOpacity",label:{en:"Overlay opacity",fr:"Opacité de l'overlay",es:"Opacidad superpuesta",de:"Deckkraft überlagern"}}),_e={category:O,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(_,"style/theme.svg")},{label:{en:"Custom CSS",fr:"CSS Personnalisé",es:"CSS personalizado",de:"Custom CSS"},value:"customCss",src:"".concat(_,"style/custom.svg")}]},Ae={category:O,type:"paragraph",propName:"customCssDetails",text:ce,conditions:[{field:"themeType",value:"customCss"}]},Le={category:O,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:be,options:[{label:ge({},{en:"Light",fr:"Clair",es:"Claro",de:"Hell"},{fr:"Claire"}),value:"lightTheme"},{label:{en:"Dark",fr:"Sombre",es:"Oscuro",de:"Dunkel"},value:"darkTheme"}]},Re=[ge({},Se,{label:{en:"Border",fr:"Contour",es:"Contorno",de:"Kontur"},conditions:be,children:[Z,Y,U]}),ge({},Se,{label:{en:"Background",fr:"Fond",es:"Fondo",de:"Hintergrund"},conditions:be,children:[Q,Be,Pe]}),ge({},Se,{label:{en:"Container",fr:"Conteneur",es:"Caja",de:"Container"},children:[{category:O,type:"colorpicker",label:{en:"Text color",fr:"Couleur du texte",es:"Color del texto",de:"Textfarbe"},propName:"textColor",value:ye},{category:O,type:P,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:O,type:P,label:{en:"Horizontal padding",fr:"Padding horizontal",es:"Relleno horizontal",de:"Horizontale Polsterung"},propName:"horizontalPaddingContainer",value:0,unit:"px"},{category:O,type:P,label:{en:"Vertical padding",fr:"Padding vertical",es:"Acolchado vertical",de:"Vertikale Polsterung"},propName:"verticalPaddingContainer",value:0,unit:"px"},{category:O,type:P,label:{en:"Horizontal margin",fr:"Marges horizontales",es:"Margen horizontal",de:"Horizontaler Rand"},propName:"horizontalMarginContainer",value:0,unit:"px"},{category:O,type:P,label:{en:"Vertical margin",fr:"Marges verticales",es:"Margen vertical",de:"Vertikaler Rand"},propName:"verticalMarginContainer",value:0,unit:"px"},{category:O,type:"switch",label:{en:"Drop shadow",fr:"Ombre portée",es:"Sombra",de:"Schatten"},propName:"dropShadow",value:!1},{category:O,type:P,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}]}]}),ge({},Se,{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:O,type:P,label:{en:"Margin between buttons",fr:"Espace entre les boutons",es:"Espacio entre los botones",de:"Abstand zwischen den Buttons"},propName:"buttonsHorizontalMargin",value:5,unit:"px"},{category:O,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(_,"nps/button-contrast-1.svg")},{value:"empty",src:"".concat(_,"nps/button-contrast-2.svg")}]},{category:O,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(_,"nps/button-shape-1.svg")},{value:"roundsquare",src:"".concat(_,"nps/button-shape-2.svg")},{value:"round",src:"".concat(_,"nps/button-shape-3.svg")}]},{category:O,type:P,label:{en:"Buttons border radius",fr:"Arrondi de la bordure des boutons",es:"Redondeo del borde de los botones",de:"Konturradius der Buttons"},propName:"buttonsBorderRadius",value:8,unit:"px",min:1,conditions:[{field:"buttonsShape",value:"roundsquare"}]},ge({},Ne,{conditions:ve,propName:"".concat(Ne.propName,"_full")}),ge({},Ne,{conditions:ke,propName:"".concat(Ne.propName,"_empty")}),ge({},xe,{conditions:ve,propName:"".concat(xe.propName,"_full")}),ge({},xe,{conditions:ke,propName:"".concat(xe.propName,"_empty")}),ge({},Ee,{conditions:ve,propName:"".concat(Ee.propName,"_full")}),ge({},Ee,{conditions:ke,propName:"".concat(Ee.propName,"_empty")}),ge({},Te,{conditions:ve,propName:"".concat(Te.propName,"_full")}),ge({},Te,{conditions:ke,propName:"".concat(Te.propName,"_empty")})]}),ge({},Se,{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:O,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:me},{category:O,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:ye},{category:O,type:P,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:O,type:P,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:O,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:ye},{category:O,type:P,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"}]}),ge({},Se,{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:O,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:me},{category:O,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:ye},{category:O,type:P,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:O,type:P,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:O,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:ye}]})];function je(e,t,n){return e.map(function(e){var o=e.propName,a=e.conditions,i=t[o],s="".concat(n,"_").concat(o),c=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),l=ge({},e,{value:i,propName:s});return c&&c.length&&(l.conditions=c),l})}var Ie=Ce.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 ge({},e,{conditions:[].concat(r(o),[{field:"theme",value:t}]),children:je(a,n,t)})})}([].concat(Re),t,n)}).flat(),ze=[Oe,_e,Ae,Le].concat(r(Ie));return[].concat(r(pe),r(ue),r(de),r(ze))});
!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 s=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var c=function(e){return a(e)||i(e)||s()};var l=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(n){"@babel/helpers - typeof";return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t});var h=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var g=function(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?h(e):t},m=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}),y=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&&y(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",s=o.toStringTag||"@@toStringTag";function c(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),i=new T(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 B()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=N(i,n);if(s){if(s===h)continue;return s}}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 c=l(e,t,n);if("normal"===c.type){if(r=n.done?f:d,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=f,n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u="suspendedStart",d="suspendedYield",p="executing",f="completed",h={};function g(){}function m(){}function y(){}var b={};b[a]=function(){return this};var v=Object.getPrototypeOf,k=v&&v(v(O([])));k&&k!==n&&r.call(k,a)&&(b=k);var w=y.prototype=g.prototype=Object.create(b);function C(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function S(e,t){var n;this._invoke=function(o,a){function i(){return new t(function(n,i){!function n(o,a,i,s){var c=l(e[o],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,i,s)},function(e){n("throw",e,i,s)}):t.resolve(d).then(function(e){u.value=e,i(u)},function(e){return n("throw",e,i,s)})}s(c.arg)}(o,a,n,i)})}return n=n?n.then(i,i):i()}}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=l(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 T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function O(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:B}}function B(){return{value:t,done:!0}}return m.prototype=w.constructor=y,y.constructor=m,y[s]=m.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},C(S.prototype),S.prototype[i]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new S(c(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then(function(e){return e.done?e.value:i.next()})},C(w),w[s]="Generator",w[a]=function(){return this},w.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=O,T.prototype={constructor:T,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 s.type="throw",s.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],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)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:O(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 k(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}var w=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){k(a,r,o,i,s,"next",e)}function s(e){k(a,r,o,i,s,"throw",e)}i(void 0)})}},C={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"},S={en:"Recurrence",fr:"Récurrence",es:"Recurrencia",de:"Wiederholung"},N={en:"".concat(S.en," of the display"),fr:"".concat(S.fr," de l'affichage"),es:"".concat(S.es," de visualización"),de:"".concat(S.de," der Anzeige")},x={en:"".concat(S.en," after closure"),fr:"".concat(S.fr," après fermeture"),es:"".concat(S.es," tras el cierre"),de:"".concat(S.de," nach Schließung")},E={en:"".concat(S.en," after validation"),fr:"".concat(S.fr," après validation"),es:"".concat(S.es," tras la validación"),de:"".concat(S.de," nach der Validierung")},T={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},O="style",B="content",P="slider",_="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 R,j={category:"conditions",type:"select",options:[{label:{en:"Every time",fr:"Tout le temps",es:"Todo el tiempo",de:"Jedes Mal"},value:"-1"},{label:{en:"Every session",fr:"Chaque session",es:"A cada sesión",de:"Jede Session"},value:"0"},{label:{en:"Everyday",fr:"Chaque jour",es:"Cada día",de:"Jeden Tag"},value:"1"},{label:{en:"Every week",fr:"Chaque semaine",es:"Cada semana",de:"Jede Woche"},value:"7"},{label:{en:"Every month",fr:"Chaque mois",es:"Cada mes",de:"Jeden Monat"},value:"30"},{label:{en:"Once per user (no recurrence)",fr:"Une fois par visiteur (pas de récurrence)",es:"Una vez por usuario (sin recurrencia)",de:"Einmal pro User (keine Wiederholung)"},value:"365"}],value:"-1"},I=L({},j,{label:x,propName:"closingRecurrence"}),z={category:"conditions",type:"group",label:S,collapsible:!0,children:[L({},j,{label:N,propName:"displayRecurrence"}),I,L({},j,{label:E,propName:"validationRecurrence"})]},D=[{label:{en:"Page load",fr:"Au chargement de la page",es:"Al cargar la página",de:"Beim Laden der Seite"},value:"pageLoad"},{label:{en:"Click",fr:"Au clic",es:"Al hacer clic",de:"Klick"},value:"click"},{label:{en:"Exit intent",fr:"Avant fermeture de l'onglet",es:"Antes de cerrar la pestaña",de:"Exit Intent"},value:"exitIntent"},{label:{en:"Delay",fr:"Après un délai",es:"Tras un retraso",de:"Verzögert"},value:"delay"},{label:{en:"Reengage (after inactivity)",fr:"Au réengagement (après inactivité)",es:"En la reactivación (tras un periodo de inactividad)",de:"Nach Inaktivität"},value:"reengage"}],M={category:"conditions",type:"selectelement",propName:"".concat("triggerEvent","Click"),label:T,placeholder:{en:"Select an element in the webpage",fr:"Sélectionner un élément dans la page",es:"Selecciona un elemento en la página web",de:"Wählen Sie ein Element auf der Webseite aus"},conditions:[{field:"triggerEvent",value:"click"}]},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"}]},V={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:T,collapsible:!0,children:[{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:D,propName:"triggerEvent",value:"pageLoad"}].concat(c([M,F,q,V]))},H=function(){return Object.prototype.hasOwnProperty.call(window,"ABTastyEditor")},K=((R="undefined"!=typeof global?global:window).ABTasty||Object.assign(R,{ABTasty:{widgetutils:{}}}),R.ABTasty.widgetutils||Object.assign(R.ABTasty,{widgetutils:{}}),R).ABTasty.widgetutils;function G(e,t){return K.hasOwnProperty(e)||Object.assign(K,o({},e,new t)),K[e]}var Q={category:O,type:"colorpicker",label:{en:"Background color",fr:"Couleur de fond",es:"Color de fondo",de:"Hintergrundfarbe"},propName:"backgroundColor",value:"rgba(255, 255, 255, 1)"},J={category:O,type:P,label:{en:"Background opacity",fr:"Opacité du fond",es:"Opacidad de fondo",de:"Hintergrundopazität"},propName:"backgroundOpacity",value:75,unit:"%"},U={category:O,type:"colorpicker",label:{en:"Border color",fr:"Couleur du contour",es:"Color del contorno",de:"Farbe der Kontur"},propName:"borderColor",value:"rgba(255, 255, 255, 1)"},Y={category:O,type:P,label:{en:"Border radius",fr:"Arrondi du contour",es:"Redondeo del contorno",de:"Rundung der Kontur"},propName:"borderRadius",value:0,unit:"px"},Z={category:O,type:P,label:{en:"Border thickness",fr:"Épaisseur du contour",es:"Grosor del contorno",de:"Konturendicke"},propName:"borderWidth",value:0,unit:"px"},X=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]:"";l(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 re("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),re("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,c(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}();(function(e){function t(e,n){var r;return l(this,t),(r=g(this,m(t).call(this,e,n))).stringStyles=r.getStyles(),r.styleElement=r.getStyleTag(r.stringStyles),r}b(t,X),d(t,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tposition: absolute;\n\t\t\tz-index: -1;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tbackground-color: black;\n\t\t\topacity: 0.6;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.contentClassName," {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\tcolor: black;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\ttransform: rotate(45deg);\n\t\t\tcursor: pointer;\n\t\t\toutline: none;\n\t\t\tfont-size: 1.8em;\n\t\t}\n\t\t\n\t\t@media screen and (max-width: 550px) and (orientation: portrait) {\n\t\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\t\tfont-size: 6vmin;\n\t\t\t}\n\t\t}")}}])})(),function(e){function t(e,n,r){var o;return l(this,t),(o=g(this,m(t).call(this,e,n))).position=r,o.stringStyles=o.getStyles(),o.styleElement=o.getStyleTag(o.stringStyles),o}b(t,X),d(t,[{key:"getStyles",value:function(){return"\n\t\t#".concat(this.widgetContainerId," {\n\t\t\tposition: fixed;\n\t\t\t").concat(this.position,": 0;\n\t\t\tleft: 0;\n\t\t\twidth: 100%;\n\t\t\theight: auto;\n\t\t\tz-index: 9999;\n\t\t\topacity: 1;\n\t\t\ttransition: opacity 0.25s ease;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.overlayClassName," {\n\t\t\tdisplay: none;\n\t\t}\n\t\t#").concat(this.widgetContainerId," .").concat(this.closeButtonClassName," {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 0;\n\t\t\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 l(this,t),(a=g(this,m(t).call(this,e,n))).position=r,a.referrerElement=o,a.stringStyles=a.getStyles(),a.styleElement=a.getStyleTag(a.stringStyles),a}b(t,X),d(t,[{key:"insert",value:function(){var e=this;return re("head",function(t){return t.appendChild(e.styleElement)},function(e){return console.error(e)}),re(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;l(this,e),this.displayRecurrence=parseFloat(n),this.closingRecurrence=parseFloat(r),this.validationRecurrence=parseFloat(o),this.storageName="Rec_".concat(a,"_").concat(i)}d(e,[{key:"getSessionRecurrenceStorage",value:function(){return sessionStorage.getItem(this.storageName)}},{key:"getLocalRecurrenceStorage",value:function(){return localStorage.getItem(this.storageName)}},{key:"removeSessionRecurrenceStorage",value:function(){return sessionStorage.removeItem(this.storageName)}},{key:"removeLocalRecurrenceStorage",value:function(){return localStorage.removeItem(this.storageName)}},{key:"getSessionRecurrence",value:function(){var e=this.getSessionRecurrenceStorage();try{return JSON.parse(e)}catch(e){return console.error("Cannot parse recurrence from storage, format is wrong, more details : ".concat(e)),!1}}},{key:"getLocalRecurrence",value:function(){var e=this.getLocalRecurrenceStorage();try{return JSON.parse(e)}catch(e){return console.error("Cannot parse recurrence from storage, format is wrong, more details : ".concat(e)),!1}}},{key:"getCurrentRecurrence",value:function(){return this.getSessionRecurrenceStorage()?this.getSessionRecurrence():this.getLocalRecurrenceStorage()?this.getLocalRecurrence():{type:!1}}},{key:"isOver",value:function(){var e=this.getLocalRecurrence(),t=(e?parseFloat(e.stamp):0)<(new Date).getTime();return t&&localStorage.removeItem(this.storageName),t&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}},{key:"setRecurrence",value:function(e,t){var n=this,r=this.getTypeOfStorage(e),o=this.getStamp(e),a={type:t,stamp:o},i=this.getCurrentRecurrence().type,s=function(){n.getSessionRecurrenceStorage()&&n.removeSessionRecurrenceStorage(),n.getLocalRecurrenceStorage()&&n.removeLocalRecurrenceStorage(),r.setItem(n.storageName,JSON.stringify(a))};if(!r)return!1;if(i&&"validation"!==t)if("closing"===t&&"validation"!==i)s();else{if("display"!==t||"validation"===i||"closing"===i)return!1;s()}else s();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 $(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||(e="",new Promise(function(t,n){var r=window.document.getElementsByTagName("script")[0],o=window.document.createElement("script");o.src=e,r.parentNode.insertBefore(o,r),o.onload=t,o.onerror=n}));var e}function ee(e){return function(){return w(v.mark(function e(t){return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next="IntersectionObserver"===e.t0?3:6;break;case 3:return e.next=5,$();case 5:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",!0);case 7:case"end":return e.stop()}},e)})).apply(this,arguments)}.apply(this,arguments)}var te=function(){function e(){l(this,e),this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}return d(e,[{key:"intersectionHandler",value:function(e){var t=this;e.forEach(function(e){e.isIntersecting?(t.existingTargets=t.existingTargets.filter(function(n){return n.element!==e.target||(t.inViewPortTargets.push(n),!1)}),t.checkElements()):t.inViewPortTargets=t.inViewPortTargets.filter(function(n){return n.element!==e.target||(t.existingTargets.push(n),!1)})})}},{key:"startVisibilityObserver",value:function(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:.5})}},{key:"startMutationObserver",value:function(){var e=new MutationObserver(this.checkElements.bind(this));return e.observe(document,{attributes:!0,childList:!0,subtree:!0}),e}},{key:"isElementVisible",value:function(e){return this.isElementTopmost(e)&&this.isElementOpaque(e)}},{key:"isElementOpaque",value:function(e){return"HTML"===function e(t,n){return n(t)||!t.parentElement?t:e(t.parentElement,n)}(e,function(e){return"0"===window.getComputedStyle(e).opacity}).nodeName}},{key:"isElementTopmost",value:function(e){for(var t=e.getBoundingClientRect(),n=[[t.left,t.top],[t.right,t.top],[t.left,t.bottom],[t.right,t.bottom]],r=!1,o=0;!r&&o<n.length;){var a,i=(a=document).elementFromPoint.apply(a,c(n[o]));r=e===i||e.contains(i),o++}return r}},{key:"checkElements",value:function(){var e=this;this.targets=this.targets.filter(function(t){var n=document.querySelector(t.selector);return!n||(e.existingTargets.push(Object.assign(t,{element:n})),e.visibilityobserver.observe(n),!1)}),this.existingTargets=this.existingTargets.filter(function(t){return!!document.querySelector(t.selector)||(e.visibilityobserver.unobserve(t.element),e.targets.push(t),!1)}),this.inViewPortTargets=this.inViewPortTargets.filter(function(t){var n=t.element,r=t.resolve;return!e.isElementVisible(n)||(e.visibilityobserver.unobserve(n),r(n),!1)})}},{key:"watch",value:function(e,t){this.targets.push({selector:e,resolve:t})}}]),e}(),ne=(function(){function e(t){var n=t.triggerEvent,r=t.triggerSelector,o=t.triggerDelay;l(this,e),this.event=n,this.selector=r&&r.length?r:"body",this.delay=o}d(e,[{key:"onElementVisible",value:function(){var e,t=this;return new Promise((e=w(v.mark(function e(n){var r,o,a;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.onPageLoad();case 2:return r=e.sent,e.next=5,ee();case 5:o=e.sent,a=G("VisibilityObserver",te),o&&r&&a.watch(t.selector,n);case 8:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)}))}},{key:"onPageLoad",value:function(){return new Promise(function(e,t){if("complete"===document.readyState)return e(!0);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)})}},{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 c(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=w(v.mark(function e(n){var r;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=["mouseleave",function(){var e=w(v.mark(function e(){var r;return v.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.delay){e.next=5;break}r=1e3*t.delay,setTimeout(function(){return n(!0)},r),e.next=6;break;case 5:return e.abrupt("return",n(!0));case 6:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),{passive:!0,once:!0}],e.next=4,t.onPageLoad();case 4:e.sent&&re("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=w(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=w(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:"elementVisible"===e.t0?23:27;break;case 3:return e.next=5,this.onPageLoad();case 5:return t=e.sent,e.abrupt("break",28);case 7:return e.next=9,this.onClick();case 9:return t=e.sent,e.abrupt("break",28);case 11:return e.next=13,this.onExitIntent();case 13:return t=e.sent,e.abrupt("break",28);case 15:return e.next=17,this.onDelay();case 17:return t=e.sent,e.abrupt("break",28);case 19:return e.next=21,this.onReengage();case 21:return t=e.sent,e.abrupt("break",28);case 23:return e.next=25,this.onElementVisible();case 25:return t=e.sent,e.abrupt("break",28);case 27:t=!1;case 28:return e.abrupt("return",t);case 29: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)}),re=function(e,t,n){var r,o=0;try{document.querySelector(e)}catch(t){var a="Selector «".concat(e,"» not valid.");return ne(a),"function"==typeof n&&n(a)}r=setTimeout(function(){clearInterval(o);var t="Can't find element «".concat(e,"».");return ne(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)},oe='<a href="https://app2.abtasty.com/insights/nps" target="_blank">',ae={en:"".concat(oe,"Access the NPS© results").concat("</a>"),fr:"".concat(oe,"Accéder aux résultats du NPS©").concat("</a>"),es:"".concat(oe,"Acceder a los resultados del NPS©").concat("</a>"),de:"".concat(oe,"Zugang zu den NPS-Ergebnissen").concat("</a>")},ie={en:"Open-ended question",fr:"Question ouverte",es:"Pregunta abierta",de:"Offene Frage"},se="\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",ce={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(se),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(se),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:"},le=[{field:"isFeedBackQuestion",value:!0}],ue=[{category:B,type:"hidden",propName:"__npsCampaignId",value:!1},{category:B,type:"paragraph",propName:"linkToNPSCampaignsList",text:ae},{category:B,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:"¿ Cuál es la probabilidad de que nos recomiendes a alguien ?",de:"Wie hoch ist die Wahrscheinlichkeit, dass Sie uns weiterempfehlen?"}},{category:B,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:B,type:"textarea",propName:"feedbackQuestion",label:ie,value:{en:"Would you like to leave a comment ?",fr:"Souhaitez-vous laisser un commentaire ?",es:"¿ Quieres dejar un comentario ?",de:"Möchten Sie einen Kommentar eingeben ?"},conditions:le},{category:B,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:"Senden"},conditions:le},{category:B,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:B,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:B,type:"checkbox",propName:"isLegend",label:{en:"Display key",fr:"Afficher un légende",es:"Mostrar una leyenda",de:"Legende anzeigen"},value:!1},{category:B,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:"Very unlikely",fr:"Très faible",es:"Muy baja",de:"Sehr gering"},conditions:[{field:"isLegend",value:!0}]},{category:B,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:"Very likely",fr:"Très élevée",es:"Muy alta",de:"Sehr hoch"},conditions:[{field:"isLegend",value:!0}]}],de=[{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-in",de:"Pop-in"},value:"popin",src:"".concat(_,"layout/popin.svg")},{label:{en:"Banner",fr:"Bannière",es:"Banner",de:"Banner"},value:"banner",src:"".concat(_,"banner/bottom.png")},{label:{en:"Free placement",fr:"Placement libre",es:"Integrado",de:"Freie Platzierung "},value:"free",src:"".concat(_,"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(_,"banner/bottom.png")},{label:{en:"At the top",fr:"En haut",es:"Arriba",de:"Oben"},value:"top",src:"".concat(_,"banner/top.png")}]},{category:"layout",type:"selectelement",propName:"npsElementReferrer",label:C,value:"body",conditions:[{field:"layout",value:"free"}]},{category:"layout",type:"select",propName:"npsReferrerInsertType",value:"beforeend",conditions:[{field:"layout",value:"free"}],label:C,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:"Arriba",de:"Spalte"},value:"column"},{label:{en:"At the left",fr:"À gauche",es:"A la izquierda",de:"Reihe"},value:"row"}]}],pe=[z,W,{category:"conditions",type:"checkbox",propName:"autoHide",value:!0,label:{en:"Auto hide after user validation",fr:"Masquer automatiquement après la validation",es:"Ocultar automáticamente tras la validación",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:"Ocultar tras x segundos",de:"Nach X Sekunden ausblenden"},conditions:[{field:"autoHide",value:!0}]}];var fe=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 he(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 ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(n,!0).forEach(function(t){fe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var me="rgba(255, 255, 255, 1)",ye="rgb(33, 121, 129, 1)",be=[{field:"themeType",value:"theme"}],ve=[{field:"buttonsContrast",value:"full"}],ke=[{field:"buttonsContrast",value:"empty"}],we={borderWidth:2,borderRadius:10,borderColor:ye,backgroundColor:me,overlayColor:"rgba(0, 0, 0, 1)",overlayOpacity:50,textColor:ye,questionMargin:15,horizontalPaddingContainer:20,verticalPaddingContainer:15,horizontalMarginContainer:0,verticalMarginContainer:0,dropShadow:!1,shadowOpacity:0,buttonsHorizontalMargin:5,buttonsContrast:"full",buttonsShape:"roundsquare",buttonsBorderRadius:8,buttonsBackgroundColor_full:ye,buttonsBackgroundColor_empty:me,buttonsTextColor_full:me,buttonsTextColor_empty:ye,buttonsBorderColor_full:ye,buttonsBorderColor_empty:ye,buttonsBorderWidth_full:0,buttonsBorderWidth_empty:2,inputBackgroundColor:me,inputBorderColor:ye,inputBorderWidth:2,inputBorderRadius:8,inputTextColor:ye,inputMarginWithButton:10,feedbackButtonBackgroundColor:me,feedbackButtonBorderColor:ye,feedbackButtonBorderWidth:2,feedbackButtonBorderRadius:8,feedbackButtonTextColor:ye},Ce=[{themeValue:"lightTheme",defaultValues:ge({},we)},{themeValue:"darkTheme",defaultValues:ge({},we,{borderColor:ye,backgroundColor:ye,overlayOpacity:75,textColor:me,buttonsContrast:"empty",buttonsBackgroundColor_full:me,buttonsBackgroundColor_empty:ye,buttonsTextColor_full:ye,buttonsTextColor_empty:me,buttonsBorderColor_full:me,buttonsBorderColor_empty:me,buttonsBorderWidth_full:2,buttonsBorderWidth_empty:2,inputBackgroundColor:ye,inputBorderColor:me,inputTextColor:me,feedbackButtonBackgroundColor:ye,feedbackButtonBorderColor:me,feedbackButtonTextColor:me})}],Se={category:O,type:"group",collapsible:!0,conditions:be},Ne={category:O,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:me},xe={category:O,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:ye},Ee={category:O,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:ye},Te={category:O,type:P,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"},Oe={category:O,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:ie,value:"displayFeedbackStep"},{label:{en:"Thanks",fr:"Remerciement",es:"Gracias",de:"Dank"},value:"displayThanksStep"}]},Be=ge({},Q,{propName:"overlayColor",label:{en:"Overlay color",fr:"Couleur de l'arrière-plan",es:"Color del segundo plano",de:"Overlay-Farbe"}}),Pe=ge({},J,{propName:"overlayOpacity",label:{en:"Overlay opacity",fr:"Opacité de l'overlay",es:"Opacidad superpuesta",de:"Deckkraft überlagern"}}),_e={category:O,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(_,"style/theme.svg")},{label:{en:"Custom CSS",fr:"CSS Personnalisé",es:"CSS personalizado",de:"Custom CSS"},value:"customCss",src:"".concat(_,"style/custom.svg")}]},Ae={category:O,type:"paragraph",propName:"customCssDetails",text:ce,conditions:[{field:"themeType",value:"customCss"}]},Le={category:O,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:be,options:[{label:ge({},{en:"Light",fr:"Clair",es:"Claro",de:"Hell"},{fr:"Claire"}),value:"lightTheme"},{label:{en:"Dark",fr:"Sombre",es:"Oscuro",de:"Dunkel"},value:"darkTheme"}]},Re=[ge({},Se,{label:{en:"Border",fr:"Contour",es:"Contorno",de:"Kontur"},conditions:be,children:[Z,Y,U]}),ge({},Se,{label:{en:"Background",fr:"Fond",es:"Fondo",de:"Hintergrund"},conditions:be,children:[Q,Be,Pe]}),ge({},Se,{label:{en:"Container",fr:"Conteneur",es:"Caja",de:"Container"},children:[{category:O,type:"colorpicker",label:{en:"Text color",fr:"Couleur du texte",es:"Color del texto",de:"Textfarbe"},propName:"textColor",value:ye},{category:O,type:P,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:O,type:P,label:{en:"Horizontal padding",fr:"Padding horizontal",es:"Relleno horizontal",de:"Horizontale Polsterung"},propName:"horizontalPaddingContainer",value:0,unit:"px"},{category:O,type:P,label:{en:"Vertical padding",fr:"Padding vertical",es:"Acolchado vertical",de:"Vertikale Polsterung"},propName:"verticalPaddingContainer",value:0,unit:"px"},{category:O,type:P,label:{en:"Horizontal margin",fr:"Marges horizontales",es:"Margen horizontal",de:"Horizontaler Rand"},propName:"horizontalMarginContainer",value:0,unit:"px"},{category:O,type:P,label:{en:"Vertical margin",fr:"Marges verticales",es:"Margen vertical",de:"Vertikaler Rand"},propName:"verticalMarginContainer",value:0,unit:"px"},{category:O,type:"switch",label:{en:"Drop shadow",fr:"Ombre portée",es:"Sombra",de:"Schatten"},propName:"dropShadow",value:!1},{category:O,type:P,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}]}]}),ge({},Se,{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:O,type:P,label:{en:"Margin between buttons",fr:"Espace entre les boutons",es:"Espacio entre los botones",de:"Abstand zwischen den Buttons"},propName:"buttonsHorizontalMargin",value:5,unit:"px"},{category:O,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(_,"nps/button-contrast-1.svg")},{value:"empty",src:"".concat(_,"nps/button-contrast-2.svg")}]},{category:O,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(_,"nps/button-shape-1.svg")},{value:"roundsquare",src:"".concat(_,"nps/button-shape-2.svg")},{value:"round",src:"".concat(_,"nps/button-shape-3.svg")}]},{category:O,type:P,label:{en:"Buttons border radius",fr:"Arrondi de la bordure des boutons",es:"Redondeo del borde de los botones",de:"Konturradius der Buttons"},propName:"buttonsBorderRadius",value:8,unit:"px",min:1,conditions:[{field:"buttonsShape",value:"roundsquare"}]},ge({},Ne,{conditions:ve,propName:"".concat(Ne.propName,"_full")}),ge({},Ne,{conditions:ke,propName:"".concat(Ne.propName,"_empty")}),ge({},xe,{conditions:ve,propName:"".concat(xe.propName,"_full")}),ge({},xe,{conditions:ke,propName:"".concat(xe.propName,"_empty")}),ge({},Ee,{conditions:ve,propName:"".concat(Ee.propName,"_full")}),ge({},Ee,{conditions:ke,propName:"".concat(Ee.propName,"_empty")}),ge({},Te,{conditions:ve,propName:"".concat(Te.propName,"_full")}),ge({},Te,{conditions:ke,propName:"".concat(Te.propName,"_empty")})]}),ge({},Se,{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:O,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:me},{category:O,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:ye},{category:O,type:P,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:O,type:P,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:O,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:ye},{category:O,type:P,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"}]}),ge({},Se,{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:O,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:me},{category:O,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:ye},{category:O,type:P,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:O,type:P,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:O,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:ye}]})];function je(e,t,n){return e.map(function(e){var o=e.propName,a=e.conditions,i=t[o],s="".concat(n,"_").concat(o),c=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),l=ge({},e,{value:i,propName:s});return c&&c.length&&(l.conditions=c),l})}var Ie=Ce.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 ge({},e,{conditions:[].concat(r(o),[{field:"theme",value:t}]),children:je(a,n,t)})})}([].concat(Re),t,n)}).flat(),ze=[Oe,_e,Ae,Le].concat(r(Ie));return[].concat(r(pe),r(ue),r(de),r(ze))});
{
"name": "@abtasty/nps",
"description": "Allow you to add a custom NPS on your website",
"version": "0.4.9",
"version": "0.4.10",
"main": "dist/main.js",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc