@abtasty/modal
Advanced tools
Comparing version 2.12.2-1 to 2.12.2
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).widgetForm=t()}(this,(function(){"use strict";var e=function(e){if(Array.isArray(e)){for(var t=0,o=new Array(e.length);t<e.length;t++)o[t]=e[t];return o}};var t=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var o=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var r=function(r){return e(r)||t(r)||o()},n={backgroundGroup:{propName:"backgroundGroup",category:"style",type:"group",label:{en:"Background",fr:"Fond",es:"Fondo",de:"Hintergrund"},collapsible:!0,children:[{propName:"backgroundColor",type:"colorpicker",category:"style",label:{en:"Background color",fr:"Couleur d'arrière-plan"},value:"rgba(247, 247, 247, 1)",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"backgroundImage-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",propName:"backgroundImageButton",type:"switch",value:!1,label:"widget_common_style_toggler_label_backgroundImage",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"backgroundImage",type:"mediaupload",category:"style",label:{en:"Background image",fr:"Image d'arrière-plan"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}},{field:"backgroundImageButton"}],optional:!1},{category:"style",type:"short-separator",propName:"overlay-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"overlayOpacity",type:"slider",category:"style",label:{en:"Overlay opacity",fr:"Opacité de l'overlay",es:"Opacidad de la capa",de:"Overlay Opacity"},value:"50",unit:"%"}]},borderGroup:{propName:"borderGroup",category:"style",type:"group",label:{en:"Border",fr:"Bordure"},collapsible:!0,children:[{propName:"borderWidth",category:"style",type:"slider",unit:"px",value:0,min:0,max:10,label:{en:"Border Thickness",fr:"Largeur de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadius-style-separator"},{propName:"borderRadius",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Border radius",fr:"Angle de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadiusImage-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"borderRadiusImage",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Image Border radius",fr:"Angle de la bordure de l'image"},conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"borderColor-style-separator"},{propName:"borderColor",category:"style",type:"colorpicker",label:{en:"Border color",fr:"Couleur de la bordure"},value:"rgba(0, 0, 0, 1)"}]},closeButtonGroup:{propName:"closeButtonGroup",category:"style",type:"group",label:{en:"Close button",fr:"Bouton de fermeture",es:"Botón cerrar",de:"Schließen-Button"},collapsible:!0,children:[{propName:"closeButtonPosition",category:"style",type:"radio",label:{en:"Close button position",fr:"Position du bouton de fermeture",es:"Posición del botón",de:"Button-Position"},value:"inside",options:[{label:{en:"Inside",fr:"À l'intérieur",es:"Dentro",de:"Innen"},value:"inside"},{label:{en:"Outside",fr:"À l'extérieur",es:"Fuera",de:"Außen"},value:"outside"}]},{category:"style",type:"short-separator",propName:"closeButtonColor-style-separator"},{propName:"closeButtonColor",type:"colorpicker",category:"style",label:{en:"Close button color",fr:"Couleur du bouton de fermeture",es:"Color del botón cerrar",de:"Button-Farbe"},value:"rgba(92, 92, 92, 1)"},{category:"style",type:"short-separator",propName:"closeBackgroundButtonColor-style-separator",conditions:[{field:"closeButtonPosition",value:"outside"}]},{propName:"backgroundCloseButtonColor",type:"colorpicker",category:"style",label:{en:"Background close button color",fr:"Couleur du fond du bouton de fermeture",es:"Background close button color",de:"Background close button color"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"closeButtonPosition",value:"outside"}]}]},dimensions:[{propName:"widthImageWithText",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"medium",options:[{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"},{label:{en:"Custom",fr:"Sur mesure"},value:"custom"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"widthImageOnly",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"fit",options:[{label:{en:"Fit to size",fr:"S'adapte à la taille",es:"Ajustar",de:"Angepasst"},value:"fit"},{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"===e}}]},{propName:"customWidth",type:"number",category:"style",label:{en:"Custom width (%)",fr:"Largeur sur mesure (%)"},value:50,conditions:[{field:"widthImageWithText",value:"custom"}]}],animations:[{category:"style",type:"separator",propName:"animation-separator"},{propName:"animation",type:"radio",category:"style",label:{en:"Animation",fr:"Animation",es:"Animación",de:"Animation"},value:"none",options:[{label:{en:"None",fr:"Aucune",es:"Ninguna",de:"Keine"},value:"none"},{label:{en:"Slide In",fr:"Slide In",es:"Deslizar",de:"Slide In"},value:"slideIn"},{label:{en:"Fade In",fr:"Fade In",es:"Disolver",de:"Fade In"},value:"fadeIn"}]}]};const a="conditions",i="slider",l="group",u={category:a,type:i,min:1},c=[{...u,propName:"day",label:"widget_common_conditions_recurrence_ifOptionVariable_labelDays",value:5,max:395},{...u,propName:"week",label:"widget_common_conditions_recurrence_ifOptionVariable_labelWeeks",value:2,max:56},{...u,propName:"month",label:"widget_common_conditions_recurrence_ifOptionVariable_labelMonths",value:1,max:13}],d={category:a,type:"select",options:[{label:"widget_common_conditions_recurrence_option_everyTime",value:"everytime"},{label:"widget_common_conditions_recurrence_option_everySession",value:"session"},{label:"widget_common_conditions_recurrence_option_everyXDays",value:"day"},{label:"widget_common_conditions_recurrence_option_everyXWeeks",value:"week"},{label:"widget_common_conditions_recurrence_option_everyXMonths",value:"month"},{label:"widget_common_conditions_recurrence_option_once",value:"once"}],value:"everytime"},p={...d,label:"widget_common_conditions_recurrence_label_widgetDisplayed",propName:"displayRecurrence"},s=c.map(e=>({...e,propName:`${p.propName}_${e.propName}`,conditions:[{field:p.propName,value:e.propName}]})),g={...d,label:"widget_common_conditions_recurrence_label_widgetDisplayedAfterClosure",propName:"closingRecurrence"},m=c.map(e=>({...e,propName:`${g.propName}_${e.propName}`,conditions:[{field:g.propName,value:e.propName}]})),y={...d,label:"widget_common_conditions_recurrence_label_widgetDisplayedAfterSubmission",propName:"validationRecurrence"},b=c.map(e=>({...e,propName:`${y.propName}_${e.propName}`,conditions:[{field:y.propName,value:e.propName}]}));g.condition=({closeButton:e,layout:t,overlayClickable:o})=>!("popin"===t&&!1===e&&!1===o||void 0!==t&&"popin"!==t&&!1===e);const f={category:a,type:l,label:"widget_common_conditions_recurrence_blockTitle",collapsible:!0,children:[p,...s,g,...m,y,...b]},v={category:a,type:i,propName:"triggerEventDelay",label:"widget_common_conditions_triggering_delay_label",min:0,max:60,value:0},_={...v,propName:"triggerEventReengageDelay",value:10,max:180},N={category:a,type:"selectelement",propName:"triggerEventClick",value:"body"},h={...N,propName:"triggerEventElementVisible"},w={category:a,type:"textarea",label:"widget_common_conditions_triggering_option_customTrigger",propName:"triggerEventCustomScript",value:"/* In this example snippet, the widget will be triggered as soon as any scroll is detected.\nCreate your own by resolving resolve() with true (which does trigger) or false (which doesn't trigger) */\n\nfunction launchIfScroll() {\n\treturn new Promise(resolve => {\n\t\tdocument.addEventListener('scroll', () => resolve(true), {once: true});\n\t});\n}\n\nconst result = await launchIfScroll();\nreturn resolve(result);",rows:15},B={pageLoad:{label:"widget_common_conditions_triggering_option_pageload",value:"pageLoad"},direct:{label:"widget_common_conditions_triggering_option_asap",value:"direct"},exitIntent:{label:"widget_common_conditions_triggering_option_exitIntent",value:"exitIntent"},reengage:{label:"widget_common_conditions_triggering_option_afterXSecondsOfInactivity",value:"reengage"},click:{label:"widget_common_conditions_triggering_option_click",value:"click"},elementVisible:{label:"widget_common_conditions_triggering_option_elementVisible",value:"elementVisible"},customScript:{label:"widget_common_conditions_triggering_option_customTrigger",value:"script"}},k={category:a,type:"switch",propName:"isOncePerPageTrigger",value:!0,label:"widget_common_conditions_triggering_label_triggerOnlyOnce"},x={category:a,type:"select",label:"widget_common_conditions_triggering_label",options:Object.keys(B).map(e=>B[e]),propName:"triggerEvent",value:"pageLoad"};N.conditions=[{field:"triggerEvent",value:"click"}],_.conditions=[{field:"triggerEvent",value:"reengage"}],h.conditions=[{field:"triggerEvent",value:"elementVisible"}],w.conditions=[{field:"triggerEvent",value:"script"}],v.conditions=[{field:"triggerEvent",value:e=>"reengage"!==e}],k.conditions=[{field:"triggerEvent",value:e=>"click"===e||"script"===e}];const C={category:a,type:l,label:"widget_common_conditions_triggering_blockTitle",collapsible:!0,children:[x,...[N,h,w,k,_,v]]};var I=f.children.find((function(e){return"validationRecurrence"===e.propName}));I.label={en:"Recurrence after redirection",fr:"Récurrence après redirection",es:"Recurrencia después de la redirección",de:"Wiederholung nach Weiterleitung"},I.conditions=[{field:"button",value:!0}],C.collapsed=!1;var O=[C,f],A={title:{propName:"title",type:"wysiwyg",category:"content",label:{en:"Title",fr:"Titre"},placeholder:{en:"Some title",fr:"Mon titre"},value:{en:"Title",fr:"Titre"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},buttonSettings:[{category:"content",type:"separator",propName:"button-separator"},{propName:"button",category:"content",type:"switch",value:!1,label:{en:"Add a button",fr:"Ajouter un bouton",es:"Añadir un botón",de:"Button hinzufügen"}},{propName:"buttonText",type:"text",category:"content",label:{en:"Button text",fr:"Texte du bouton",es:"Texto del botón",de:"Button-Text"},value:{en:"Accept",fr:"Valider"},placeholder:{en:"Submit",fr:"Valider"},conditions:[{field:"button"}]},{propName:"buttonLink",type:"url",category:"content",label:{en:"Button link",fr:"Lien du bouton",es:"Enlace del botón",de:"Button-Link"},value:location.origin,conditions:[{field:"button"}]},{propName:"buttonTextColor",category:"content",type:"colorpicker",label:{en:"Button text color",fr:"Couleur du texte du bouton",es:"Color del texto del botón",de:"Button-Textfarbe"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"button"}]},{propName:"buttonBackgroundColor",category:"content",type:"colorpicker",label:{en:"Button background color",fr:"Couleur de fond du bouton",es:"Color del botón",de:"Button-Hintergrundfarbe"},value:"rgba(0, 156, 178, 1)",conditions:[{field:"button"}]}]},S="https://widgets-images.abtasty.com/modal/",T="".concat(S,"image/"),L="".concat(S,"simple/"),G="".concat(S,"video/"),E=[{propName:"type",value:"image",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"imageOnly",type:"radioImage",options:[{label:{en:"Image only",fr:"Image seule",es:"Solo imagen",de:"Nur Bild"},value:"imageOnly",src:"".concat(T,"image-only.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(T,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(T,"right.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(T,"top.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(T,"bottom.png")}]},{propName:"image",type:"mediaupload",category:"content",label:{en:"Image",fr:"Image",es:"Imagen",de:"Bild"}},{category:"content",type:"separator",propName:"title-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},A.title,{category:"content",type:"separator",propName:"wysiwyg-content-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]}].concat(r(A.buttonSettings),r(n.dimensions),[{type:"separator",category:"style"},n.backgroundGroup,{type:"separator",category:"style"},n.borderGroup,{type:"separator",category:"style"},n.closeButtonGroup],r(n.animations),r(O)),q=[{propName:"type",value:"simple",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"center",type:"radioImage",options:[{label:{en:"Center",fr:"Centre"},value:"center",src:"".concat(L,"center.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(L,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(L,"right.png")}]},A.title,{category:"content",type:"separator",propName:"title-content-separator"},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}].concat(r(A.buttonSettings),r(n.dimensions),[{type:"separator",category:"style"},n.backgroundGroup,{type:"separator",category:"style"},n.borderGroup,{type:"separator",category:"style"},n.closeButtonGroup],r(n.animations),r(O)),R=[{propName:"type",value:"video",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"no-title",type:"radioImage",options:[{label:{en:"No title",fr:"Sans titre",es:"Sin título",de:"Kein Titel"},value:"no-title",src:"".concat(G,"video-only.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(G,"bottom.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(G,"top.png")}]},A.title,{propName:"videoLink",type:"url",category:"content",label:{en:"URL (Youtube or Vimeo)",fr:"URL (Youtube ou Vimeo)"},value:"https://www.youtube.com/watch?v=btb3bKfxims"}].concat(r(A.buttonSettings),r(n.dimensions),[{type:"separator",category:"style",conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},n.backgroundGroup,{type:"separator",category:"style"},n.borderGroup,{type:"separator",category:"style"},n.closeButtonGroup],r(n.animations),r(O),[{category:"content",type:"separator",propName:"autoPlay-separator"},{propName:"autoPlay",category:"conditions",type:"switch",value:!1,label:{en:["Auto play (Youtube only).","Warning: on Chrome auto play is only allowed when the media doesn't include sound."],fr:["Lecture automatique (Youtube uniquement).","Attention : sur Chrome, la lecture automatique n'est autorisée que lorsque le support n'inclut pas le son."],es:["Reproducción automática (solo para vídeos de YouTube).","Aviso : En Chrome solo se permite la reproducción automática de videos sin sonido."],de:["Autoplay (nur für YouTube).","Achtung : Chrome erlaubt Autoplay nur, wenn das Medium keinen Ton hat."]}}]),P=E,D=document.getElementById("abtasty-widget-react-form__widget");if(D){var M=D.getAttribute("data-plugin-id");"d5f5d126-4f25-413a-976e-6ca5f4a4734d"===M||9===Number(M)?P=q:"b5bb5334-ad3c-48bc-b9e0-4fc5fcce38e2"!==M&&64!==Number(M)||(P=R)}return P})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).widgetForm=t()}(this,(function(){"use strict";var e=function(e){if(Array.isArray(e)){for(var t=0,o=new Array(e.length);t<e.length;t++)o[t]=e[t];return o}};var t=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)};var o=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var a=function(a){return e(a)||t(a)||o()},r={backgroundGroup:{propName:"backgroundGroup",category:"style",type:"group",label:{en:"Background",fr:"Fond",es:"Fondo",de:"Hintergrund"},collapsible:!0,children:[{propName:"backgroundColor",type:"colorpicker",category:"style",label:{en:"Background color",fr:"Couleur d'arrière-plan"},value:"rgba(247, 247, 247, 1)",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"backgroundImage-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{category:"style",propName:"backgroundImageButton",type:"switch",value:!1,label:"widget_common_style_toggler_label_backgroundImage",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"backgroundImage",type:"mediaupload",category:"style",label:{en:"Background image",fr:"Image d'arrière-plan"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}},{field:"backgroundImageButton"}],optional:!1},{category:"style",type:"short-separator",propName:"overlay-style-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},{propName:"overlayOpacity",type:"slider",category:"style",label:{en:"Overlay opacity",fr:"Opacité de l'overlay",es:"Opacidad de la capa",de:"Overlay Opacity"},value:"50",unit:"%"}]},borderGroup:{propName:"borderGroup",category:"style",type:"group",label:{en:"Border",fr:"Bordure"},collapsible:!0,children:[{propName:"borderWidth",category:"style",type:"slider",unit:"px",value:0,min:0,max:10,label:{en:"Border Thickness",fr:"Largeur de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadius-style-separator"},{propName:"borderRadius",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Border radius",fr:"Angle de la bordure"}},{category:"style",type:"short-separator",propName:"borderRadiusImage-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"borderRadiusImage",category:"style",type:"slider",unit:"px",value:10,min:0,max:20,label:{en:"Image Border radius",fr:"Angle de la bordure de l'image"},conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{category:"style",type:"short-separator",propName:"borderColor-style-separator"},{propName:"borderColor",category:"style",type:"colorpicker",label:{en:"Border color",fr:"Couleur de la bordure"},value:"rgba(0, 0, 0, 1)"}]},closeButtonGroup:{propName:"closeButtonGroup",category:"style",type:"group",label:{en:"Close button",fr:"Bouton de fermeture",es:"Botón cerrar",de:"Schließen-Button"},collapsible:!0,children:[{propName:"closeButtonPosition",category:"style",type:"radio",label:{en:"Close button position",fr:"Position du bouton de fermeture",es:"Posición del botón",de:"Button-Position"},value:"inside",options:[{label:{en:"Inside",fr:"À l'intérieur",es:"Dentro",de:"Innen"},value:"inside"},{label:{en:"Outside",fr:"À l'extérieur",es:"Fuera",de:"Außen"},value:"outside"}]},{category:"style",type:"short-separator",propName:"closeButtonColor-style-separator"},{propName:"closeButtonColor",type:"colorpicker",category:"style",label:{en:"Close button color",fr:"Couleur du bouton de fermeture",es:"Color del botón cerrar",de:"Button-Farbe"},value:"rgba(92, 92, 92, 1)"},{category:"style",type:"short-separator",propName:"closeBackgroundButtonColor-style-separator",conditions:[{field:"closeButtonPosition",value:"outside"}]},{propName:"backgroundCloseButtonColor",type:"colorpicker",category:"style",label:{en:"Background close button color",fr:"Couleur du fond du bouton de fermeture",es:"Background close button color",de:"Background close button color"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"closeButtonPosition",value:"outside"}]}]},dimensions:[{propName:"widthImageWithText",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"medium",options:[{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"},{label:{en:"Custom",fr:"Sur mesure"},value:"custom"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"widthImageOnly",type:"radio",category:"style",label:{en:"Width",fr:"Largeur"},value:"fit",options:[{label:{en:"Fit to size",fr:"S'adapte à la taille",es:"Ajustar",de:"Angepasst"},value:"fit"},{label:{en:"Small",fr:"Petite",es:"Pequeño",de:"Klein"},value:"small"},{label:{en:"Medium",fr:"Moyenne",es:"Mediano",de:"Medium"},value:"medium"},{label:{en:"Large",fr:"Large",es:"Grande",de:"Groß"},value:"large"}],conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"===e}}]},{propName:"customWidth",type:"number",category:"style",label:{en:"Custom width (%)",fr:"Largeur sur mesure (%)"},value:50,conditions:[{field:"widthImageWithText",value:"custom"}]}],animations:[{category:"style",type:"separator",propName:"animation-separator"},{propName:"animation",type:"radio",category:"style",label:{en:"Animation",fr:"Animation",es:"Animación",de:"Animation"},value:"none",options:[{label:{en:"None",fr:"Aucune",es:"Ninguna",de:"Keine"},value:"none"},{label:{en:"Slide In",fr:"Slide In",es:"Deslizar",de:"Slide In"},value:"slideIn"},{label:{en:"Fade In",fr:"Fade In",es:"Disolver",de:"Fade In"},value:"fadeIn"}]}]};const n={en:"Recurrence",fr:"Récurrence",es:"Recurrencia",de:"Wiederholung"},l={en:`${n.en} of the display`,fr:`${n.fr} de l'affichage`,es:`${n.es} de visualización`,de:`${n.de} der Anzeige`},i={en:`${n.en} after closure`,fr:`${n.fr} après fermeture`,es:`${n.es} tras el cierre`,de:`${n.de} nach Schließung`},u={en:`${n.en} after validation`,fr:`${n.fr} après validation`,es:`${n.es} tras la validación`,de:`${n.de} nach der Validierung`},c={en:"Trigger",fr:"Déclencheur",es:"Activador",de:"Trigger"},s={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"},d={...s,label:i,propName:"closingRecurrence"},p={category:"conditions",type:"group",label:n,collapsible:!0,children:[{...s,label:l,propName:"displayRecurrence"},d,{...s,label:u,propName:"validationRecurrence"}]},y={category:"conditions",type:"group",label:c,collapsible:!0,children:[{category:"conditions",type:"select",label:{en:"Triggers on",fr:"Se déclenche",es:"¿ Cuándo se activa? ",de:"Triggert bei"},options:[{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"}],propName:"triggerEvent",value:"pageLoad"},{category:"conditions",type:"selectelement",propName:"triggerEventClick",label:c,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"}]},{category:"conditions",type:"number",propName:"triggerEventExitDelay",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"}]},{category:"conditions",type:"number",propName:"triggerEventReengageDelay",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"}]},{category:"conditions",type:"number",propName:"triggerEventDelay",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"}]}]};var g=p.children[p.children.length-1];g.label={en:"Recurrence after redirection",fr:"Récurrence après redirection",es:"Recurrencia después de la redirección",de:"Wiederholung nach Weiterleitung"},g.conditions=[{field:"button",value:!0}];var m=[p,y],b={title:{propName:"title",type:"wysiwyg",category:"content",label:{en:"Title",fr:"Titre"},placeholder:{en:"Some title",fr:"Mon titre"},value:{en:"Title",fr:"Titre"},conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},buttonSettings:[{category:"content",type:"separator",propName:"button-separator"},{propName:"button",category:"content",type:"switch",value:!1,label:{en:"Add a button",fr:"Ajouter un bouton",es:"Añadir un botón",de:"Button hinzufügen"}},{propName:"buttonText",type:"text",category:"content",label:{en:"Button text",fr:"Texte du bouton",es:"Texto del botón",de:"Button-Text"},value:{en:"Accept",fr:"Valider"},placeholder:{en:"Submit",fr:"Valider"},conditions:[{field:"button"}]},{propName:"buttonLink",type:"url",category:"content",label:{en:"Button link",fr:"Lien du bouton",es:"Enlace del botón",de:"Button-Link"},value:location.origin,conditions:[{field:"button"}]},{propName:"buttonTextColor",category:"content",type:"colorpicker",label:{en:"Button text color",fr:"Couleur du texte du bouton",es:"Color del texto del botón",de:"Button-Textfarbe"},value:"rgba(255, 255, 255, 1)",conditions:[{field:"button"}]},{propName:"buttonBackgroundColor",category:"content",type:"colorpicker",label:{en:"Button background color",fr:"Couleur de fond du bouton",es:"Color del botón",de:"Button-Hintergrundfarbe"},value:"rgba(0, 156, 178, 1)",conditions:[{field:"button"}]}]},f="https://widgets-images.abtasty.com/modal/",v="".concat(f,"image/"),h="".concat(f,"simple/"),N="".concat(f,"video/"),B=[{propName:"type",value:"image",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"imageOnly",type:"radioImage",options:[{label:{en:"Image only",fr:"Image seule",es:"Solo imagen",de:"Nur Bild"},value:"imageOnly",src:"".concat(v,"image-only.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(v,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(v,"right.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(v,"top.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(v,"bottom.png")}]},{propName:"image",type:"mediaupload",category:"content",label:{en:"Image",fr:"Image",es:"Imagen",de:"Bild"}},{category:"content",type:"separator",propName:"title-separator",conditions:[{field:"layout",value:function(e){return"no-title"!==e&&"imageOnly"!==e}}]},b.title,{category:"content",type:"separator",propName:"wysiwyg-content-separator",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",conditions:[{field:"layout",value:function(e){return"imageOnly"!==e}}]}].concat(a(b.buttonSettings),a(r.dimensions),[{type:"separator",category:"style"},r.backgroundGroup,{type:"separator",category:"style"},r.borderGroup,{type:"separator",category:"style"},r.closeButtonGroup],a(r.animations),a(m)),C=[{propName:"type",value:"simple",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"center",type:"radioImage",options:[{label:{en:"Center",fr:"Centre"},value:"center",src:"".concat(h,"center.png")},{label:{en:"Left",fr:"Gauche"},value:"left",src:"".concat(h,"left.png")},{label:{en:"Right",fr:"Droite"},value:"right",src:"".concat(h,"right.png")}]},b.title,{category:"content",type:"separator",propName:"title-content-separator"},{propName:"content",type:"wysiwyg",category:"content",label:{en:"Content",fr:"Contenu"},value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."}].concat(a(b.buttonSettings),a(r.dimensions),[{type:"separator",category:"style"},r.backgroundGroup,{type:"separator",category:"style"},r.borderGroup,{type:"separator",category:"style"},r.closeButtonGroup],a(r.animations),a(m)),k=[{propName:"type",value:"video",type:"hidden",category:"layout"},{propName:"layout",category:"layout",value:"no-title",type:"radioImage",options:[{label:{en:"No title",fr:"Sans titre",es:"Sin tÃtulo",de:"Kein Titel"},value:"no-title",src:"".concat(N,"video-only.png")},{label:{en:"Top",fr:"Haut"},value:"top",src:"".concat(N,"bottom.png")},{label:{en:"Bottom",fr:"Bas"},value:"bottom",src:"".concat(N,"top.png")}]},b.title,{propName:"videoLink",type:"url",category:"content",label:{en:"URL (Youtube or Vimeo)",fr:"URL (Youtube ou Vimeo)"},value:"https://www.youtube.com/watch?v=btb3bKfxims"}].concat(a(b.buttonSettings),a(r.dimensions),[{type:"separator",category:"style",conditions:[{field:"type",value:function(e){return"video"!==e}},{field:"layout",value:function(e){return"imageOnly"!==e}}]},r.backgroundGroup,{type:"separator",category:"style"},r.borderGroup,{type:"separator",category:"style"},r.closeButtonGroup],a(r.animations),a(m),[{category:"content",type:"separator",propName:"autoPlay-separator"},{propName:"autoPlay",category:"conditions",type:"switch",value:!1,label:{en:["Auto play (Youtube only).","Warning: on Chrome auto play is only allowed when the media doesn't include sound."],fr:["Lecture automatique (Youtube uniquement).","Attention : sur Chrome, la lecture automatique n'est autorisée que lorsque le support n'inclut pas le son."],es:["Reproducción automática (solo para vÃdeos de YouTube).","Aviso : En Chrome solo se permite la reproducción automática de videos sin sonido."],de:["Autoplay (nur für YouTube).","Achtung : Chrome erlaubt Autoplay nur, wenn das Medium keinen Ton hat."]}}]),A=B,x=document.getElementById("abtasty-widget-react-form__widget");if(x){var I=x.getAttribute("data-plugin-id");"d5f5d126-4f25-413a-976e-6ca5f4a4734d"===I||9===Number(I)?A=C:"b5bb5334-ad3c-48bc-b9e0-4fc5fcce38e2"!==I&&64!==Number(I)||(A=k)}return A})); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var t=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function s(t,e,r,n){var a=e&&e.prototype instanceof d?e:d,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return T()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=v(i,r);if(s){if(s===c)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var d=l(t,e,r);if("normal"===d.type){if(n=r.done?"completed":"suspendedYield",d.arg===c)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(n="completed",r.method="throw",r.arg=d.arg)}}}(t,r,i),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var c={};function d(){}function u(){}function m(){}var h={};h[a]=function(){return this};var p=Object.getPrototypeOf,y=p&&p(p(k([])));y&&y!==e&&r.call(y,a)&&(h=y);var g=m.prototype=d.prototype=Object.create(h);function b(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function f(t){var e;this._invoke=function(n,a){function o(){return new Promise((function(e,o){!function e(n,a,o,i){var s=l(t[n],t,a);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&r.call(d,"__await")?Promise.resolve(d.__await).then((function(t){e("next",t,o,i)}),(function(t){e("throw",t,o,i)})):Promise.resolve(d).then((function(t){c.value=t,o(c)}),(function(t){return e("throw",t,o,i)}))}i(s.arg)}(n,a,e,o)}))}return e=e?e.then(o,o):o()}}function v(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,v(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function k(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return u.prototype=g.constructor=m,m.constructor=u,m[i]=u.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,i in t||(t[i]="GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(f.prototype),f.prototype[o]=function(){return this},t.AsyncIterator=f,t.async=function(e,r,n,a){var o=new f(s(e,r,n,a));return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},b(g),g[i]="Generator",g[a]=function(){return this},g.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;w(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}));function e(t,e,r,n,a,o,i){try{var s=t[o](i),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,a)}var r=function(t){return function(){var r=this,n=arguments;return new Promise((function(a,o){var i=t.apply(r,n);function s(t){e(i,a,o,s,l,"next",t)}function l(t){e(i,a,o,s,l,"throw",t)}s(void 0)}))}};var n=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}};var a=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var o=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var i=function(t){return n(t)||a(t)||o()};const s=()=>Object.prototype.hasOwnProperty.call(window,"ABTastyEditor");const l=()=>{let t;return window.ABTasty||window.ABTASTY_S?(window.ABTASTY_S&&window.ABTASTY_S.USER&&window.ABTASTY_S.USER.accountIdentifier&&window.ABTASTY_S.USER.accountIdentifier.length?t=window.ABTASTY_S.USER.accountIdentifier:window.ABTasty&&window.ABTasty.getAccountSettings&&"function"==typeof window.ABTasty.getAccountSettings?t=window.ABTasty.getAccountSettings().identifier:window.ABTasty&&window.ABTasty.accountSettings&&(t=window.ABTasty.accountSettings.identifier),t):t},c=()=>{const t=!!document.getElementById("ABTastyPreviewBar"),e=location.href.includes("ab_project=preview");return t||e},d=()=>c()||!!window.ABTasty.getTestsOnPage()[TEST_ID],u=()=>{if(s()||c())return!1;const t=ABTasty.getTestsOnPage()[TEST_ID];return!!t&&Object.keys(t.targetings.qaParameters).length>0},m="conditions",h="https://social-proof-api.abtasty.com/clients/",p=()=>{const{type:t}=DATA;return`${PACKAGE.replace("@abtasty/","")}${t?`_${t}`:""}`},y=()=>`${PLUGIN_ID.split("-")[0]}_${TEST_ID}`,g=()=>{const{displayRecurrence:t,closingRecurrence:e,validationRecurrence:r}=DATA;if(s()||!t&&!e&&!r)return!1;const n={everytime:()=>-1,session:()=>0,once:()=>395,day:t=>DATA[`${t}_day`],week:t=>7*DATA[`${t}_week`],month:t=>30.5*DATA[`${t}_month`]},a={};return t&&(a.displayRecurrence=n[t]("displayRecurrence")),e&&(a.closingRecurrence=n[e]("closingRecurrence")),r&&(a.validationRecurrence=n[r]("validationRecurrence")),a},b=()=>{let{triggerEvent:t}=DATA;const{triggerEventClick:e,triggerEventReengageDelay:r,socialProofContentType:n,triggerEventElementVisible:a,triggerEventDelay:o}=DATA;if(s()||!t&&!n)return!1;const i={click:()=>e,elementVisible:()=>a},l=Object.prototype.hasOwnProperty.call(i,t)?i[t]():"body",c="reengage"===t?r:o;return n&&(t=1===n?"socialProofPurchases":"socialProofPageViews"),{triggerEvent:t,triggerSelector:l,triggerDelay:c}},f=(...t)=>{t.unshift(`[AB Tasty Widget] ${PACKAGE}:`),console.log(...t)},v=t=>{if(u()){const e=(()=>{const t=p();return`${t.charAt(0).toUpperCase()}${t.slice(1)}`.split("-").join(" ")})();window.console.log(`%c${e} - QA Mode for campaign ${TEST_ID}\n${t}`,"background-color: rgba(0, 127, 145, 1); color: rgba(247, 247, 247, 1)")}},_=t=>{const e={promise:null,resolve:null,reject:null,name:t};return e.promise=new Promise((t,r)=>{e.resolve=t,e.reject=r}),e},w=(t,e,r)=>{let n=0,a=0;try{document.querySelector(t)}catch(e){const n=`Selector «${t}» not valid.`;return f(n),"function"==typeof r&&r(n)}function o(){clearInterval(a),clearTimeout(n)}return n=setTimeout(()=>{o();const e=`Can't find element «${t}».`;return f(e),"function"==typeof r&&r(e)},1e4),a=setInterval(()=>{const r=document.querySelector(t);return null!==r?(o(),"function"==typeof e&&e(r)):r},200),{clear:o}};async function x(t){let e;switch(t){case"IntersectionObserver":e=await("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||function(t){return new Promise((e,r)=>{const n=window.document.getElementsByTagName("script")[0],a=window.document.createElement("script");a.src=t,n.parentNode.insertBefore(a,n),a.onload=e,a.onerror=r})}("https://polyfill.io/v3/polyfill.min.js?flags=gated&features=IntersectionObserver"));break;default:e=!0}return e}class k{constructor({displayRecurrence:t,closingRecurrence:e,validationRecurrence:r},n){this.displayRecurrence=parseFloat(t),this.closingRecurrence=parseFloat(e),this.validationRecurrence=parseFloat(r),this.onSetCallback=n,this.widgetName=p(),this.uniqueId=y(),this.recurrenceKey=`${this.widgetName}_${this.uniqueId}`,this.isListeningStorageEvent=this.listenStorageEvent()}onStorage({key:t}){const e=localStorage.getItem("ABTastyWidgetsTemporary"),r=sessionStorage.getItem("ABTastyWidgets");"ABTastyData"===t&&!e&&r&&localStorage.setItem("ABTastyWidgetsTemporary",r)}listenStorageEvent(){return this.isListeningStorageEvent||window.addEventListener("storage",this.onStorage.bind(this)),!0}getGivenRecurrenceStorageParsed(t){try{const e=t.getItem("ABTastyWidgets");return JSON.parse(e)}catch(e){return t.removeItem("ABTastyWidgets"),!1}}getSessionRecurrenceStorageParsed(){return this.getGivenRecurrenceStorageParsed(window.sessionStorage)}getLocalRecurrenceStorageParsed(){return this.getGivenRecurrenceStorageParsed(window.localStorage)}removeGivenStorage(t,e){const{[this.recurrenceKey]:r,...n}=e;return Object.entries(n).length?(t.setItem("ABTastyWidgets",JSON.stringify(n)),n):(t.removeItem("ABTastyWidgets"),!1)}removeSessionRecurrenceStorage(){const t=this.getSessionRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.sessionStorage,t)}removeLocalRecurrenceStorage(){const t=this.getLocalRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.localStorage,t)}getSessionRecurrence(){const t=this.getSessionRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}getLocalRecurrence(){const t=this.getLocalRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}getCurrentRecurrence(){const t=this.getSessionRecurrence(),e=this.getLocalRecurrence();return t||e||{type:!1}}isOver(){const t=localStorage.getItem("ABTastyWidgetsTemporary"),e=!(!t||!t.includes(this.recurrenceKey))||this.getSessionRecurrence();t&&(sessionStorage.setItem("ABTastyWidgets",t),localStorage.removeItem("ABTastyWidgetsTemporary"));const r=this.getLocalRecurrence(),n=(r?parseFloat(r.stamp):0)<(new Date).getTime();return n&&this.removeLocalRecurrenceStorage(),n&&!this.getLocalRecurrence()&&!e}setRecurrence(t,e){0!==t&&(window.removeEventListener("storage",this.onStorage.bind(this)),this.isListeningStorageEvent=!1);const r=this.getTypeOfStorage(t);if(c()||!r&&"object"!=typeof r)return!1;const{storageString:n,storageMethod:a}=r,o=this.getStamp(t),i={type:e,stamp:o},{type:s}=this.getCurrentRecurrence(),l=()=>{const t=this.getSessionRecurrence(),e=this.getLocalRecurrence();let r;"session"===n?t?r=this.removeSessionRecurrenceStorage():(this.removeLocalRecurrenceStorage(),r=this.getSessionRecurrenceStorageParsed()):"local"===n&&(e?r=this.removeLocalRecurrenceStorage():(this.removeSessionRecurrenceStorage(),r=this.getLocalRecurrenceStorageParsed()));const o=r?{[this.recurrenceKey]:i,...r}:{[this.recurrenceKey]:i};a.setItem("ABTastyWidgets",JSON.stringify(o)),this.onSetCallback&&"function"==typeof this.onSetCallback&&this.onSetCallback()};if(!a)return!1;if(s&&"validation"!==e)if("closing"===e&&"validation"!==s)l();else{if("display"!==e||"validation"===s||"closing"===s)return!1;l()}else l();return o}setDisplayRecurrence(){this.setRecurrence(this.displayRecurrence,"display")}setClosingRecurrence(){this.setRecurrence(this.closingRecurrence,"closing")}setValidationRecurrence(){this.setRecurrence(this.validationRecurrence,"validation")}getStamp(t){return(new Date).getTime()+864e5*t}getTypeOfStorage(t){return!(isNaN(t)||t<0||0!==t&&!t)&&(t>0?{storageString:"local",storageMethod:window.localStorage}:0===t&&{storageString:"session",storageMethod:window.sessionStorage})}}class T{constructor(){this.targets=[],this.existingTargets=[],this.inViewportTargets=[],this.visibilityObserver=this.startVisibilityObserver(),this.mutationObserver=this.startMutationObserver(),this.mouseOverEvent=this.mouseOverHandler()}intersectionHandler(t){t.forEach(t=>{t.isIntersecting?(this.existingTargets.forEach(e=>{e.element.isSameNode(t.target)&&(this.inViewportTargets.push(e),this.mouseOverEvent.start())}),this.checkElements()):this.inViewportTargets=this.inViewportTargets.filter(e=>!e.element.isSameNode(t.target)||(this.mouseOverEvent.clear(),!1))})}startVisibilityObserver(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:0})}startMutationObserver(){const t=this.mutationObserver||new MutationObserver(this.checkElements.bind(this));return document.body&&t.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),t}onMouseOver({target:t,path:e}){const r=this.inViewportTargets.find(({element:r,selector:n})=>{if(r.isSameNode(t))return!0;const a=[...t.querySelectorAll(n)];if(a.length&&a.includes(r))return!0;if(e.includes(r))return!0;const o=[...t.parentElement.children],i=o.findIndex(e=>e.isSameNode(t)),s=o.filter((t,e)=>e>i);if(s.length){if(s.includes(r))return!0;if(s.some(t=>[...t.querySelectorAll(n)].includes(r)))return!0}return!1});if(r&&this.isElementVisible(r.element)){const{selector:t,element:e,uniqueId:n}=r,a=this.targets.find(e=>e.selector===t&&e.uniqueId===n);a&&a.resolve(e),this.clear(t,n)}}mouseOverHandler(){const t=["mouseover",t=>setTimeout(()=>this.onMouseOver(t),50),!0];return{start:()=>document.addEventListener(...t),clear:()=>document.removeEventListener(...t)}}isElementVisible(t){return this.isElementTopmost(t)&&this.isElementOpaque(t)}isElementOpaque(t){return"HTML"===function t(e,r){return r(e)||!e.parentElement?e:t(e.parentElement,r)}(t,t=>"0"===window.getComputedStyle(t).opacity).nodeName}isElementTopmost(t){const e=t.getBoundingClientRect(),r=[[e.left,e.top],[e.right,e.top],[e.left,e.bottom],[e.right,e.bottom],[e.left+e.width/2,e.top],[e.left+e.width/2,e.bottom],[e.left,e.height/2],[e.right,e.height/2],[e.left+e.left/2,e.height/2]];let n=!1,a=0;for(;!n&&a<r.length;){const e=document.elementFromPoint(...r[a]);n=t===e||t.contains(e),a+=1}return n}checkElements(){this.targets.forEach(({selector:t,uniqueId:e})=>{const r=document.querySelector(t);r&&!this.existingTargets.find(r=>r.element.matches(t)&&r.uniqueId===e)&&(this.existingTargets.push({element:r,selector:t,uniqueId:e}),this.visibilityObserver.observe(r))}),this.existingTargets=this.existingTargets.filter(({selector:t,element:e})=>!!document.querySelector(t)||(this.visibilityObserver.unobserve(e),!1)),this.inViewportTargets=this.inViewportTargets.filter(({selector:t,element:e,uniqueId:r})=>{if(e.matches(t)&&this.isElementVisible(e)){const n=this.targets.find(e=>e.selector===t&&e.uniqueId===r);return n&&n.resolve(e),this.clear(t,r),!1}return!0})}watch(t,e,r){this.targets.push({selector:t,resolve:e,uniqueId:r});const n=()=>{this.startMutationObserver(),this.checkElements()};document.body?n():w("body",n)}clear(t,e){[this.targets,this.existingTargets,this.inViewportTargets]=[this.targets,this.existingTargets,this.inViewportTargets].map(r=>r.filter(({selector:r,uniqueId:n})=>r!==t&&n!==e)),this.visibilityObserver.unobserve(document.querySelector(t)),0===this.targets.length&&this.mutationObserver.disconnect(),0===this.inViewportTargets.length&&this.mouseOverEvent.clear()}}class S{constructor({triggerEvent:t,triggerSelector:e,triggerDelay:r}){this.event=t,this.selector=e&&e.length?e:"body",this.delay=1e3*r,this.elementsSelectors=[],this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[],this.visibilityObservers=[],this.elementsWaiters=[]}async onElementVisible({promise:t,resolve:e}){const r=_(`${this.event}DomReady`);this.promises.push(r);const n=await this.onPageLoad(r),a=await x("IntersectionObserver"),o=function(t,e){return ABTasty.widgetUtils||(ABTasty.widgetUtils={}),ABTasty.widgetUtils[t]||Object.assign(ABTasty.widgetUtils,{[t]:new e}),ABTasty.widgetUtils[t]}("VisibilityObserver",T);if(this.visibilityObservers.push(o),a&&n){const t=y();o.watch(this.selector,e,t)}return t}onPageLoad({promise:t,resolve:e}){const r=()=>"complete"===document.readyState;if(!r()){const n=["readystatechange",()=>r()&&e(!0),{passive:!0}];return this.eventsListeners.push(n),document.addEventListener(...n),t}return e(!0),t}onClick({promise:t,resolve:e}){const r=document.createElement("style");r.type="text/css",r.id=`Click_${y()}`,r.innerHTML=`${this.selector} {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}`,document.head.appendChild(r),this.elementsSelectors.push(`#${r.id}`);const n=t=>[...document.querySelectorAll(this.selector)].some(e=>e.isSameNode(t)||!!t.closest(this.selector)),a=["click",({target:t})=>n(t)&&e(!0),{passive:!0,capture:!0}];return this.eventsListeners.push(a),document.addEventListener(...a),t}onExitIntent({promise:t,resolve:e}){const r=["mouseleave",async({clientY:t})=>{t<=0&&e(!0)},{passive:!0}],n=w("body",t=>{t.addEventListener(...r),this.eventsListeners.push([t,...r]),this.elementsWaiters=this.elementsWaiters.filter(t=>t!==n)});return this.elementsWaiters.push(n),t}onReengage({promise:t,resolve:e}){const r=this.delay;let n=r;const a=[()=>(n=r,n),{passive:!0}];["click","mousemove","scroll","keypress"].forEach(t=>{document.addEventListener(t,...a),this.eventsListeners.push([t,...a])});const o=setInterval(()=>{n<=0?e(!0):n-=100},100);return this.intervals.push(o),t}onCustomTrigger({promise:t,resolve:e}){const{triggerEventCustomScript:r}=DATA;return new Function(`return new Promise(async resolve => {${r}})`)().then(t=>t&&e(!0)),t}getSocialProofPurchases({promise:t,resolve:e}){const r=window.ABTastyProductKey,n=l(),{viewInterval:a,triggerSocialProofMinPurchases:o,spNoTrim:i}=DATA;return r||(v("Not able to find ABTastyProductKey, impossible to call the API."),e(!1)),r&&n?fetch(`${h}${n}/metrics/i?key=${r}${i?"&noTrim=true":""}`).then(t=>t.ok&&t.json()).then(t=>(t=>{if(void 0===a||void 0===o)return!1;const e=t[a]&&t[a]>=o;return e||v(`Widget will not be shown, product has been purchased ${t[a]} times while ${o} are required`),e})(t)&&e(t[a])).catch(()=>v("Failed to fetch datas from server.")):e(!1),t}getSocialProofPageViews({promise:t,resolve:e}){const r=encodeURIComponent(`${window.location.pathname}`),n=l(),{viewInterval:a,triggerSocialProofMinPageViews:o}=DATA;return r&&n?fetch(`${h}${n}/metrics/pv?key=${r}`).then(t=>t.ok&&t.json()).then(t=>(t=>{if(void 0===a||void 0===o)return!1;const e=t[a]&&t[a]>=o;return e||v(`Widget will not be shown, page has been seen ${t[a]} times while ${o} are required`),e})(t)&&e(t[a])).catch(()=>v("Failed to fetch datas from server.")):e(!1),t}clear(){if(this.elementsSelectors.length&&(this.elementsSelectors.forEach(t=>{document.querySelector(t)&&document.querySelector(t).remove()}),this.elementsSelectors=[]),this.eventsListeners.length&&(this.eventsListeners.forEach(t=>{const[e,...r]="string"==typeof t[0]?[document,...t]:t;e&&r.length>1&&e.removeEventListener(...r)}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(t=>clearInterval(t)),this.intervals=[]),this.observers.length&&(this.observers.forEach(t=>t.disconnect()),this.observers=[]),this.visibilityObservers.length){const t=y();this.visibilityObservers.forEach(e=>e.clear(this.selector,t)),this.visibilityObservers=[]}return this.promises.length&&(this.promises.forEach(t=>t.resolve(!1)),this.promises=[]),this.elementsWaiters.length&&(this.elementsWaiters.forEach(t=>t.clear()),this.elementsWaiters=[]),this}async isTriggered(){this.clear();const t=_(this.event);this.promises.push(t);const e={direct:()=>!0,pageLoad:()=>this.onPageLoad(t),click:()=>this.onClick(t),exitIntent:()=>this.onExitIntent(t),reengage:()=>this.onReengage(t),elementVisible:()=>this.onElementVisible(t),script:()=>this.onCustomTrigger(t),socialProofPurchases:()=>this.getSocialProofPurchases(t),socialProofPageViews:()=>this.getSocialProofPageViews(t)},r=!Object.prototype.hasOwnProperty.call(e,this.event)||await e[this.event]();return this.clear(),"reengage"!==this.event&&this.delay?r&&await(async()=>{const t=_(`${this.event}Delay`);return this.promises.push(t),setTimeout(()=>{t.resolve(!0),this.clear()},this.delay),t.promise})():r}}class E{constructor(t,e,r){this.recurrence=t,this.isWidgetApplied=e,this.callback=r,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.eventListenerParams=["abtasty_resetActionTracking",this.eventHandler.bind(this),{passive:!0}],this.elementsWaiters=[]}recurrenceIsDone(){return!this.recurrence||this.recurrence.isOver()}decisionHandler(t){const e=d(),{type:r}=this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1},n=()=>t&&"display"===r||this.recurrenceIsDone();return!this.isWidgetApplied()&&e&&n()?(this.clearWatcher(),this.callback("rebuild",t)):(!this.isWidgetApplied()||e&&n())&&(this.isWidgetApplied()||e)||(this.clearWatcher(),this.callback("remove",t),this.watch()),this}eventHandler(){let t=d();return[250,500].forEach(e=>setTimeout(()=>500===e&&d()===t?this:(t=d(),this.decisionHandler(!1)),e)),this}observerHandler(t){const e=t.some(({removedNodes:t})=>t&&t.length),r=t.some(({addedNodes:t})=>t&&t.length);return e||r?(this.decisionHandler(!0),this):this}watch(){if(s())return this;this.clearWatcher(),document.addEventListener(...this.eventListenerParams);const t=w("body",e=>{const r=[e,{childList:!0,subtree:!0}];this.observer.observe(...r),this.elementsWaiters=this.elementsWaiters.filter(e=>e!==t)});return this.elementsWaiters.push(t),this}clearWatcher(){return document.removeEventListener(...this.eventListenerParams),this.elementsWaiters.length&&(this.elementsWaiters.forEach(t=>t.clear()),this.elementsWaiters=[]),this.observer.disconnect(),this}}const O={category:m,type:"slider",min:1},A=[{...O,propName:"day",label:"widget_common_conditions_recurrence_ifOptionVariable_labelDays",value:5,max:395},{...O,propName:"week",label:"widget_common_conditions_recurrence_ifOptionVariable_labelWeeks",value:2,max:56},{...O,propName:"month",label:"widget_common_conditions_recurrence_ifOptionVariable_labelMonths",value:1,max:13}],I={category:m,type:"select",options:[{label:"widget_common_conditions_recurrence_option_everyTime",value:"everytime"},{label:"widget_common_conditions_recurrence_option_everySession",value:"session"},{label:"widget_common_conditions_recurrence_option_everyXDays",value:"day"},{label:"widget_common_conditions_recurrence_option_everyXWeeks",value:"week"},{label:"widget_common_conditions_recurrence_option_everyXMonths",value:"month"},{label:"widget_common_conditions_recurrence_option_once",value:"once"}],value:"everytime"},L={...I,label:"widget_common_conditions_recurrence_label_widgetDisplayed",propName:"displayRecurrence"},R=(A.map(t=>({...t,propName:`${L.propName}_${t.propName}`,conditions:[{field:L.propName,value:t.propName}]})),{...I,label:"widget_common_conditions_recurrence_label_widgetDisplayedAfterClosure",propName:"closingRecurrence"}),B=(A.map(t=>({...t,propName:`${R.propName}_${t.propName}`,conditions:[{field:R.propName,value:t.propName}]})),{...I,label:"widget_common_conditions_recurrence_label_widgetDisplayedAfterSubmission",propName:"validationRecurrence"});A.map(t=>({...t,propName:`${B.propName}_${t.propName}`,conditions:[{field:B.propName,value:t.propName}]}));R.condition=({closeButton:t,layout:e,overlayClickable:r})=>!("popin"===e&&!1===t&&!1===r||void 0!==e&&"popin"!==e&&!1===t);const C={pageLoad:{label:"widget_common_conditions_triggering_option_pageload",value:"pageLoad"},direct:{label:"widget_common_conditions_triggering_option_asap",value:"direct"},exitIntent:{label:"widget_common_conditions_triggering_option_exitIntent",value:"exitIntent"},reengage:{label:"widget_common_conditions_triggering_option_afterXSecondsOfInactivity",value:"reengage"},click:{label:"widget_common_conditions_triggering_option_click",value:"click"},elementVisible:{label:"widget_common_conditions_triggering_option_elementVisible",value:"elementVisible"},customScript:{label:"widget_common_conditions_triggering_option_customTrigger",value:"script"}};Object.keys(C).map(t=>C[t]);!function(t,e){void 0===e&&(e={});var r=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===r&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}("abtasty-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483145}abtasty-modal:not(.abtasty-modal--video){overflow-y:auto}abtasty-modal__underlay{width:100%;height:100%;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.5);cursor:pointer}.abtasty-modal__area{top:0;left:0;right:0;width:auto;margin:10px!important;z-index:100;position:relative;float:none}.abtasty-modal__area-layout--imageOnly{max-width:80%}.abtasty-modal__area-layout--imageOnly img{border-style:solid;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;opacity:1}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__content{padding:5px;border-radius:0!important;border-width:0!important;background-color:transparent!important;background-image:none!important}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__content{padding:25px 20px 20px}.abtasty-modal .abtasty-modal__content{border-color:#f6f6f6;border-style:solid;padding:20px}.abtasty-modal__area-type--image,.abtasty-modal__area-type--no-title,.abtasty-modal__area-type--simple,.abtasty-modal__area-type--video{margin:0 auto 20px!important;top:10vh;border:none;background:none}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__close--inside{top:2px}.abtasty-modal__area-type--video.abtasty-modal__area-layout--top .abtasty-modal__close--inside{right:15px;top:20px}.abtasty-modal__area-type--image .abtasty-modal__close,.abtasty-modal__area-type--simple .abtasty-modal__close{right:10px;top:15px}.abtasty-modal__close{position:absolute;right:5px;top:0;font-size:20px;font-weight:300;background:transparent;border:0;color:#222;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;line-height:24px!important;margin-right:5px;cursor:pointer;width:20px;height:20px;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__close>*{pointer-events:none}.abtasty-modal__close svg{display:block}.abtasty-modal__close svg .close-x{stroke:#5c5c5c;fill:transparent;stroke-linecap:round;stroke-width:3}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__close--inside{top:-6px;right:-15px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__area-type--image .abtasty-modal__close--outside,.abtasty-modal__area-type--simple .abtasty-modal__close--outside,.abtasty-modal__close .abtasty-modal__close--outside{top:-25px;right:0;width:20px;height:20px}.abtasty-modal__close--outside{top:-25px;right:-25px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__media,.abtasty-modal__media-link{max-width:100%;display:block}.abtasty-modal__text{padding:20px;font-family:Open Sans,sans-serif!important;color:#000;overflow:auto}.abtasty-modal__title{width:auto;font-size:20px!important;font-weight:500;line-height:1.1;margin-bottom:10px}.abtasty-modal__text p{margin:0 0 10px!important;font-size:15px;font-weight:300;word-wrap:break-word}.abtasty-modal__button{width:100%;text-align:center;margin-top:20px}.abtasty-modal__button a{padding:10px 20px;border-radius:10px;display:inline-block;font-weight:700}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__title{text-align:center}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__innertext{text-align:center;white-space:pre-wrap}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--image .abtasty-modal__image img{max-height:400px;max-width:100%;display:inline;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image img{max-height:300px;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--video{text-align:center;width:100%}.abtasty-modal__area-type--video iframe{width:100%}@media (min-width:630px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--medium{width:600px;margin:0 auto 20px!important}.abtasty-modal--video{width:50%;left:25%}}@media (min-width:330px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--small{width:300px;margin:0 auto 20px!important}}@media (min-width:930px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--large{width:900px;margin:0 auto 20px!important}}.abtasty-animation-fadeIn{-webkit-animation-name:abTastyfadeIn;animation-name:abTastyfadeIn}.abtasty-animation-fadeIn,.abtasty-animation-fadeOut{-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-fadeOut{-webkit-animation-name:abTastyfadeOut;animation-name:abTastyfadeOut}.abtasty-animation-slideIn{-webkit-animation-name:abTastyslideInDown;animation-name:abTastyslideInDown;-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-slideOut{-webkit-animation-name:abTastyslideOutUp;animation-name:abTastyslideOutUp;-webkit-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes abTastyfadeIn{0%{opacity:0}to{opacity:1}}@keyframes abTastyfadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes abTastyfadeOut{0%{opacity:1}to{opacity:0}}@keyframes abTastyfadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes abTastyslideInDown{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes abTastyslideInDown{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes abTastyslideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes abTastyslideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}");var P=function(t){var e=Object.prototype.hasOwnProperty;function r(t,n){return Array.isArray(t)?function(t,e){for(var n,a="",o="",s=Array.isArray(e),l=0;l<t.length;l++)(n=r(t[l]))&&(s&&e[l]&&(n=i(n)),a=a+o+n,o=" ");return a}(t,n):t&&"object"==typeof t?function(t){var r="",n="";for(var a in t)a&&t[a]&&e.call(t,a)&&(r=r+n+a,n=" ");return r}(t):t||""}function n(t){if(!t)return"";if("object"==typeof t){var r="";for(var n in t)e.call(t,n)&&(r=r+n+":"+t[n]+";");return r}return t+""}function a(t,e,r,n){if(!1===e||null==e||!e&&("class"===t||"style"===t))return"";if(!0===e)return" "+(n?t:t+'="'+t+'"');var a=typeof e;return"object"!==a&&"function"!==a||"function"!=typeof e.toJSON||(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),r||-1===e.indexOf('"'))?(r&&(e=i(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"'")+"'"}t.merge=function t(e,r){if(1===arguments.length){for(var a=e[0],o=1;o<e.length;o++)a=t(a,e[o]);return a}for(var i in r)if("class"===i){var s=e[i]||[];e[i]=(Array.isArray(s)?s:[s]).concat(r[i]||[])}else if("style"===i){s=(s=n(e[i]))&&";"!==s[s.length-1]?s+";":s;var l=n(r[i]);l=l&&";"!==l[l.length-1]?l+";":l,e[i]=s+l}else e[i]=r[i];return e},t.classes=r,t.style=n,t.attr=a,t.attrs=function(t,o){var i="";for(var s in t)if(e.call(t,s)){var l=t[s];if("class"===s){l=r(l),i=a(s,l,!1,o)+i;continue}"style"===s&&(l=n(l)),i+=a(s,l,!1,o)}return i};var o=/["&<>]/;function i(t){var e=""+t,r=o.exec(e);if(!r)return t;var n,a,i,s="";for(n=r.index,a=0;n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=""";break;case 38:i="&";break;case 60:i="<";break;case 62:i=">";break;default:continue}a!==n&&(s+=e.substring(a,n)),a=n+1,s+=i}return a!==n?s+e.substring(a,n):s}return t.escape=i,t.rethrow=function t(e,r,n,a){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&r||a))throw e.message+=" on line "+n,e;try{a=a||require("fs").readFileSync(r,"utf8")}catch(r){t(e,null,n)}var o=3,i=a.split("\n"),s=Math.max(n-o,0),l=Math.min(i.length,n+o);o=i.slice(s,l).map((function(t,e){var r=e+s+1;return(r==n?" > ":" ")+r+"| "+t})).join("\n");throw e.path=r,e.message=(r||"Pug")+":"+n+"\n"+o+"\n\n"+e.message,e},t}({});function W(t){var e,r="",n={};try{var a={},o=t||{};(function(t,a,o,i,s,l,c,d,u,m,h,p,y,g,b,f,v,_,w,x,k,T,S){n.button=e=function(){this&&this.block,this&&this.attributes;r=(r=(r+='<div class="abtasty-modal__button">')+"<a"+P.attr("href",p,!0,!0)+' target="_self"'+P.attr("style",P.style({"background-color":h+"!important",color:g+"!important"}),!0,!0)+">")+P.escape(null==(e=y)?"":e)+"</a></div>"},n.title=e=function(){this&&this.block,this&&this.attributes;r=(r+='<h2 class="abtasty-modal__title" style="text-align:center;">')+(null==(e=k)?"":e)+"</h2>"},n.imageOnly=e=function(){this&&this.block,this&&this.attributes;r=r+"<img"+(P.attr("src",v,!0,!0)+P.attr("style",P.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":l+"!important"}),!0,!0))+">"},n.imageWithText=e=function(){this&&this.block,this&&this.attributes;r+='<div class="abtasty-modal__image">',v&&(r=r+"<img"+(P.attr("src",v,!0,!0)+P.attr("style",P.style({"border-radius":d+"px!important"}),!0,!0))+">"),r+="</div>"},n.content=e=function(){this&&this.block,this&&this.attributes;r+='<div class="abtasty-modal__innertext">',r=(r+="<p>")+(null==(e=w)?"":e)+"</p></div>"},n.closeButton=e=function(){this&&this.block,this&&this.attributes;r=r+"<div"+P.attr("class",P.classes(["abtasty-modal__close",b?"abtasty-modal__close--"+b:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+P.attr("style",P.style("outside"===b?{"background-color":a}:""),!0,!0)+">",r+='<svg viewbox="0 0 40 40">',r+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>'},n.contentWrapper=e=function(){var t=this&&this.block;this&&this.attributes;r=r+'<div class="abtasty-modal__content"'+P.attr("style",P.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":l+"!important","background-color":o+"!important","background-image":s&&i?'url("'+i+'")!important':"none"}),!0,!0)+">",t&&t&&t(),r+="</div>"},n.modalWrapper=e=function(){var e=this&&this.block;this&&this.attributes;r=(r=r+"<abtasty-modal__underlay"+P.attr("style",P.style({"background-color":"rgba(0, 0, 0, "+x/100+")"}),!0,!0)+" data-abtasty-actionnable></abtasty-modal__underlay>")+"<div"+(P.attr("class",P.classes(["abtasty-animation-"+t+" abtasty-modal__area abtasty-modal__area-width--"+S+" abtasty-modal__area-type--"+T+" abtasty-modal__area-layout--"+_],[!0]),!1,!0)+P.attr("style",P.style({width:"custom"===S&&f+"%","margin-left":"custom"===S&&(100-f)/2+"% !important"}),!0,!0))+">",e&&e&&e(),r+="</div>"},n.modalWrapper.call({block:function(){n.closeButton(),"image"===T&&"imageOnly"===_?(n.imageOnly(),m&&n.button()):n.contentWrapper.call({block:function(){"simple"===T?(r+='<div class="abtasty-modal__text">',"center"===_||"left"===_?(n.title(),n.content(),r+='<div style="clear:both;"></div>'):(n.content(),n.title(),r+='<div style="clear:both;"></div>'),r+="</div>",m&&n.button()):"image"===T?("top"!==_&&"left"!==_||n.imageWithText(),r+='<div class="abtasty-modal__text">',n.title(),n.content(),m&&n.button(),r+="</div>","right"!==_&&"bottom"!==_||n.imageWithText(),r+='<div style="clear:both;"></div>'):"video"===T&&("top"===_&&n.title(),r+=null==(e=w)?"":e,"bottom"===_&&n.title(),m&&n.button())}})}})}).call(this,"animation"in o?o.animation:"undefined"!=typeof animation?animation:void 0,"backgroundCloseButtonColor"in o?o.backgroundCloseButtonColor:"undefined"!=typeof backgroundCloseButtonColor?backgroundCloseButtonColor:void 0,"backgroundColor"in o?o.backgroundColor:"undefined"!=typeof backgroundColor?backgroundColor:void 0,"backgroundImage"in o?o.backgroundImage:"undefined"!=typeof backgroundImage?backgroundImage:void 0,"backgroundImageButton"in o?o.backgroundImageButton:"undefined"!=typeof backgroundImageButton?backgroundImageButton:void 0,"borderColor"in o?o.borderColor:"undefined"!=typeof borderColor?borderColor:void 0,"borderRadius"in o?o.borderRadius:"undefined"!=typeof borderRadius?borderRadius:void 0,"borderRadiusImage"in o?o.borderRadiusImage:"undefined"!=typeof borderRadiusImage?borderRadiusImage:void 0,"borderWidth"in o?o.borderWidth:"undefined"!=typeof borderWidth?borderWidth:void 0,"button"in o?o.button:"undefined"!=typeof button?button:void 0,"buttonBackgroundColor"in o?o.buttonBackgroundColor:"undefined"!=typeof buttonBackgroundColor?buttonBackgroundColor:void 0,"buttonLink"in o?o.buttonLink:"undefined"!=typeof buttonLink?buttonLink:void 0,"buttonText"in o?o.buttonText:"undefined"!=typeof buttonText?buttonText:void 0,"buttonTextColor"in o?o.buttonTextColor:"undefined"!=typeof buttonTextColor?buttonTextColor:void 0,"closeButtonPosition"in o?o.closeButtonPosition:"undefined"!=typeof closeButtonPosition?closeButtonPosition:void 0,"customWidth"in o?o.customWidth:"undefined"!=typeof customWidth?customWidth:void 0,"image"in o?o.image:"undefined"!=typeof image?image:void 0,"layout"in o?o.layout:"undefined"!=typeof layout?layout:void 0,"modalContent"in o?o.modalContent:"undefined"!=typeof modalContent?modalContent:void 0,"overlayOpacity"in o?o.overlayOpacity:"undefined"!=typeof overlayOpacity?overlayOpacity:void 0,"title"in o?o.title:"undefined"!=typeof title?title:void 0,"type"in o?o.type:"undefined"!=typeof type?type:void 0,"width"in o?o.width:"undefined"!=typeof width?width:void 0)}catch(t){P.rethrow(t,void 0,void 0,a[void 0])}return r}var N,D,$,V,j,q=DATA,M=q.type,Y=q.animation,H=q.backgroundColor,G=q.overlayOpacity,U=q.backgroundImage,F=q.backgroundImageButton,z=q.borderRadius,K=q.borderRadiusImage,J=q.borderWidth,X=q.borderColor,Q=q.button,Z=q.buttonBackgroundColor,tt=q.buttonLink,et=q.buttonText,rt=q.buttonTextColor,nt=q.backgroundCloseButtonColor,at=q.closeButtonColor,ot=q.closeButtonPosition,it=q.content,st=q.customWidth,lt=q.title,ct=q.layout,dt=q.videoLink,ut=q.widthImageWithText,mt=q.widthImageOnly,ht=q.autoPlay,pt=q.triggerEvent,yt=0,gt=0,bt=["pageLoad","delay","reengage"].some((function(t){return t===pt})),ft=M.replace(/^\w/,(function(t){return t.toUpperCase()})),vt="imageOnly"===ct?mt:ut,_t=DATA.image||"https://widgets-images.abtasty.com/image-placeholder.png",wt=".abtasty-modal__close";function xt(){return N&&N.closest("html")}function kt(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];gt=1,xt()&&("video"===M&&t&&(N.innerHTML=""),N.style.display="none"),ABTastyEvent("".concat(ft," modal closed"),null,TEST_ID),!s()&&j.clearWatcher(),setTimeout((function(){xt()&&N.remove(),setTimeout((function(){return bt?Rt():Wt()}),100)}),100)}function Tt(t,e,r,n){var a,o=[t,function(t){var a=t.target,s=a.matches(e)||a.closest(e);return s&&r(),s&&n&&function(t){var e;return(e=document).removeEventListener.apply(e,i(t))}(o)},!s()];(a=document).addEventListener.apply(a,o)}function St(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={layout:ct,type:M,borderRadius:z,borderRadiusImage:K,borderWidth:J,borderColor:X,button:Q,buttonBackgroundColor:Z,buttonLink:tt,buttonText:et,buttonTextColor:rt,backgroundColor:"imageOnly"!==ct?H:"initial",overlayOpacity:G,backgroundImage:U,backgroundImageButton:F,image:_t,width:vt,videoLink:dt,customWidth:st,animation:Y,title:lt,closeButtonPosition:ot,backgroundCloseButtonColor:nt,modalContent:it||t.outerHTML};if(N.className="abtasty-modal abtasty-modal--".concat(M),N.dataset.testId=TEST_ID,N.innerHTML=W(e),document.body.appendChild(N),D=N.querySelector(".abtasty-modal__area"),at){var r=N.querySelector("".concat(wt," .close-x"));r.style.stroke=at}return new Promise((function(t){t(!0)}))}function Et(t){var e,r=t.indexOf("youtu")>-1,n=t.indexOf("vimeo")>-1;if(r){var a=t.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2];e="//www.youtube.com/embed/".concat(a,"?rel=0"),ht&&(e+="&autoplay=1")}else if(n){var o=t.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2];e="//player.vimeo.com/video/".concat(o)}return e}function Ot(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function At(){return It.apply(this,arguments)}function It(){return(It=r(t.mark((function e(){var r,n,a,o,i,s;return t.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Date.now(),n="abtasty-widget-video-".concat(r),(a=document.createElement("iframe")).setAttribute("id",n),o=Et(dt),i=Ot(),a.style.height="".concat(i,"px"),"no-title"===ct&&(a.style.border="".concat(J,"px solid ").concat(X,"!important"),a.style.borderRadius="".concat(z,"px!important")),a.src=o,a.frameBorder=0,a.allowfullscreen=!0,t.next=13,St(a);case 13:return s=t.sent,D.style.height="".concat(i,"px"),window.addEventListener("resize",(function(){var t=document.querySelector("abtasty-modal iframe"),e=Ot();t.style.height="".concat(e,"px"),D.style.height="".concat(e,"px")})),t.abrupt("return",s&&new Promise((function(t){t(!0)})));case 17:case"end":return t.stop()}}),e)})))).apply(this,arguments)}function Lt(t,e){switch(e||(yt=0),t){case"remove":xt()?(N.style.display="none",N.remove()):(V&&V.clear(),Rt());break;case"rebuild":yt?gt?Rt():Ct():Wt()}}function Rt(){s()||(j=j||new E($,xt,Lt)).watch()}function Bt(){gt=0,N.style.display="block",Tt("click","".concat("abtasty-modal__underlay",", ").concat(wt),(function(){kt(),!s()&&$.setClosingRecurrence()}),!0),s()||(yt||ABTastyEvent("".concat(ft," modal displayed"),null,TEST_ID),Q&&tt.length&&Tt("click",".abtasty-modal__button",(function(){kt(!1),!s()&&$.setValidationRecurrence()}),!0),Rt(),yt=1,$.setDisplayRecurrence())}function Ct(){return Pt.apply(this,arguments)}function Pt(){return(Pt=r(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N=N||document.createElement("abtasty-modal"),"video"!==M){e.next=8;break}return e.next=4,At();case 4:e.sent&&Bt(),e.next=19;break;case 8:if("image"!==M||"fit"!==vt){e.next=15;break}(n=new Image).src=_t,n.className="abtasty-modal__media",n.onload=function(){var e=r(t.mark((function e(){return t.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,St(this);case 2:t.sent&&Bt(),D.style.width="".concat(this.width,"px"),D.style.height="".concat(this.height,"px");case 6:case"end":return t.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),e.next=19;break;case 15:return e.next=17,St();case 17:e.sent&&Bt();case 19:return e.abrupt("return",N);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wt(){return Nt.apply(this,arguments)}function Nt(){return(Nt=r(t.mark((function e(){var r;return t.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s()||d()){t.next=2;break}return t.abrupt("return",!1);case 2:if(!V||!V.promises.length){t.next=4;break}return t.abrupt("return",!1);case 4:if($=$||new k(g()),$.isOver()){t.next=9;break}return Rt(),t.abrupt("return",!1);case 9:return Rt(),V=V||new S(b()),t.next=13,V.isTriggered();case 13:return(r=t.sent)&&Ct(),t.abrupt("return",r);case 16:case"end":return t.stop()}}),e)})))).apply(this,arguments)}s()?Ct():Wt()}(); | ||
!function(){"use strict";var t=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},n=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",o=a.toStringTag||"@@toStringTag";function s(t,e,r,a){var n=e&&e.prototype instanceof d?e:d,i=Object.create(n.prototype),o=new x(a||[]);return i._invoke=function(t,e,r){var a="suspendedStart";return function(n,i){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===n)throw i;return T()}for(r.method=n,r.arg=i;;){var o=r.delegate;if(o){var s=v(o,r);if(s){if(s===c)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===a)throw a="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a="executing";var d=l(t,e,r);if("normal"===d.type){if(a=r.done?"completed":"suspendedYield",d.arg===c)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(a="completed",r.method="throw",r.arg=d.arg)}}}(t,r,o),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var c={};function d(){}function u(){}function h(){}var m={};m[n]=function(){return this};var y=Object.getPrototypeOf,p=y&&y(y(k([])));p&&p!==e&&r.call(p,n)&&(m=p);var b=h.prototype=d.prototype=Object.create(m);function g(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function f(t){var e;this._invoke=function(a,n){function i(){return new Promise((function(e,i){!function e(a,n,i,o){var s=l(t[a],t,n);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&r.call(d,"__await")?Promise.resolve(d.__await).then((function(t){e("next",t,i,o)}),(function(t){e("throw",t,i,o)})):Promise.resolve(d).then((function(t){c.value=t,i(c)}),(function(t){return e("throw",t,i,o)}))}o(s.arg)}(a,n,e,i)}))}return e=e?e.then(i,i):i()}}function v(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,v(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var a=l(r,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,c;var n=a.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function k(t){if(t){var e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function e(){for(;++a<t.length;)if(r.call(t,a))return e.value=t[a],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return u.prototype=b.constructor=h,h.constructor=u,h[o]=u.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,o in t||(t[o]="GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},g(f.prototype),f.prototype[i]=function(){return this},t.AsyncIterator=f,t.async=function(e,r,a,n){var i=new f(s(e,r,a,n));return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(b),b[o]="Generator",b[n]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var a=e.pop();if(a in t)return r.value=a,r.done=!1,r}return r.done=!0,r}},t.values=k,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function a(r,a){return o.type="throw",o.arg=t,e.next=r,a&&(e.method="next",e.arg=void 0),!!a}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var a=r.completion;if("throw"===a.type){var n=a.arg;w(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}));function e(t,e,r,a,n,i,o){try{var s=t[i](o),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(a,n)}var r=function(t){return function(){var r=this,a=arguments;return new Promise((function(n,i){var o=t.apply(r,a);function s(t){e(o,n,i,s,l,"next",t)}function l(t){e(o,n,i,s,l,"throw",t)}s(void 0)}))}};var a=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}};var n=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var i=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var o=function(t){return a(t)||n(t)||i()};const s=()=>!!window.ABTasty.getTestsOnPage()[TEST_ID],l=()=>Object.prototype.hasOwnProperty.call(window,"ABTastyEditor");const c=()=>`${PLUGIN_ID.split("-")[0]}_${TEST_ID}`,d=()=>{const{displayRecurrence:t,closingRecurrence:e,validationRecurrence:r}=DATA;return!(l()||!(t||e||r))&&{displayRecurrence:t,closingRecurrence:e,validationRecurrence:r}},u=()=>{const{triggerEvent:t,triggerEventClick:e,triggerEventExitDelay:r,triggerEventDelay:a,triggerEventReengageDelay:n}=DATA;if(l()||!t)return!1;const i=e;let o;switch(t){case"exitIntent":o=r;break;case"delay":o=a;break;case"reengage":o=n;break;default:o=0}return{triggerEvent:t,triggerSelector:i,triggerDelay:o}},h=(...t)=>{t.unshift(`[AB Tasty Widget] ${PACKAGE}:`),console.log(...t)},m=(t,e,r)=>{let a=0,n=0;try{document.querySelector(t)}catch(e){const a=`Selector «${t}» not valid.`;return h(a),"function"==typeof r&&r(a)}function i(){clearInterval(n),clearTimeout(a)}return a=setTimeout(()=>{i();const e=`Can't find element «${t}».`;return h(e),"function"==typeof r&&r(e)},1e4),n=setInterval(()=>{const r=document.querySelector(t);return null!==r?(i(),"function"==typeof e&&e(r)):r},200),{clear:i}};async function y(t){let e;switch(t){case"IntersectionObserver":e=await("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||function(t){return new Promise((e,r)=>{const a=window.document.getElementsByTagName("script")[0],n=window.document.createElement("script");n.src=t,a.parentNode.insertBefore(n,a),n.onload=e,n.onerror=r})}(""));break;default:e=!0}return e}class p{constructor({displayRecurrence:t,closingRecurrence:e,validationRecurrence:r},a){this.displayRecurrence=parseFloat(t),this.closingRecurrence=parseFloat(e),this.validationRecurrence=parseFloat(r),this.onSetCallback=a,this.widgetName=(()=>{const{type:t}=DATA;return`${PACKAGE.replace("@abtasty/","")}${t?`_${t}`:""}`})(),this.uniqueId=c(),this.recurrenceKey=`${this.widgetName}_${this.uniqueId}`}getGivenRecurrenceStorageParsed(t){try{const e=t.getItem("ABTastyWidgets");return JSON.parse(e)}catch(e){return t.removeItem("ABTastyWidgets"),!1}}getSessionRecurrenceStorageParsed(){return this.getGivenRecurrenceStorageParsed(window.sessionStorage)}getLocalRecurrenceStorageParsed(){return this.getGivenRecurrenceStorageParsed(window.localStorage)}removeGivenStorage(t,e){const{[this.recurrenceKey]:r,...a}=e;return Object.entries(a).length?(t.setItem("ABTastyWidgets",JSON.stringify(a)),a):(t.removeItem("ABTastyWidgets"),!1)}removeSessionRecurrenceStorage(){const t=this.getSessionRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.sessionStorage,t)}removeLocalRecurrenceStorage(){const t=this.getLocalRecurrenceStorageParsed();return!!t&&this.removeGivenStorage(window.localStorage,t)}getSessionRecurrence(){const t=this.getSessionRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}getLocalRecurrence(){const t=this.getLocalRecurrenceStorageParsed();return!!t&&t[this.recurrenceKey]}getCurrentRecurrence(){const t=this.getSessionRecurrence(),e=this.getLocalRecurrence();return t||e||{type:!1}}isOver(){const t=this.getLocalRecurrence(),e=(t?parseFloat(t.stamp):0)<(new Date).getTime();return e&&this.removeLocalRecurrenceStorage(),e&&!this.getLocalRecurrence()&&!this.getSessionRecurrence()}setRecurrence(t,e){const r=this.getTypeOfStorage(t);if(!r&&"object"!=typeof r)return!1;const{storageString:a,storageMethod:n}=this.getTypeOfStorage(t),i=this.getStamp(t),o={type:e,stamp:i},{type:s}=this.getCurrentRecurrence(),l=()=>{const t=this.getSessionRecurrence(),e=this.getLocalRecurrence();let r;"session"===a?t?r=this.removeSessionRecurrenceStorage():(this.removeLocalRecurrenceStorage(),r=this.getSessionRecurrenceStorageParsed()):"local"===a&&(e?r=this.removeLocalRecurrenceStorage():(this.removeSessionRecurrenceStorage(),r=this.getLocalRecurrenceStorageParsed()));const i=r?{[this.recurrenceKey]:o,...r}:{[this.recurrenceKey]:o};n.setItem("ABTastyWidgets",JSON.stringify(i)),this.onSetCallback&&"function"==typeof this.onSetCallback&&this.onSetCallback()};if(!n)return!1;if(s&&"validation"!==e)if("closing"===e&&"validation"!==s)l();else{if("display"!==e||"validation"===s||"closing"===s)return!1;l()}else l();return i}setDisplayRecurrence(){this.setRecurrence(this.displayRecurrence,"display")}setClosingRecurrence(){this.setRecurrence(this.closingRecurrence,"closing")}setValidationRecurrence(){this.setRecurrence(this.validationRecurrence,"validation")}getStamp(t){return(new Date).getTime()+864e5*t}getTypeOfStorage(t){return!(isNaN(t)||t<0||0!==t&&!t)&&(t>0?{storageString:"local",storageMethod:window.localStorage}:0===t&&{storageString:"session",storageMethod:window.sessionStorage})}}class b{constructor(){this.targets=[],this.existingTargets=[],this.inViewPortTargets=[],this.visibilityobserver=this.startVisibilityObserver(),this.mutationobserver=this.startMutationObserver()}intersectionHandler(t){t.forEach(t=>{t.isIntersecting?(this.existingTargets=this.existingTargets.filter(e=>e.element!==t.target||(this.inViewPortTargets.push(e),!1)),this.checkElements()):this.inViewPortTargets=this.inViewPortTargets.filter(e=>e.element!==t.target||(this.existingTargets.push(e),!1))})}startVisibilityObserver(){return new IntersectionObserver(this.intersectionHandler.bind(this),{root:null,rootMargin:"0px",threshold:0})}startMutationObserver(){const t=new MutationObserver(this.checkElements.bind(this));return t.observe(document,{attributes:!0,childList:!0,subtree:!0}),t}isElementVisible(t){return this.isElementTopmost(t)&&this.isElementOpaque(t)}isElementOpaque(t){return"HTML"===function t(e,r){return r(e)||!e.parentElement?e:t(e.parentElement,r)}(t,t=>"0"===window.getComputedStyle(t).opacity).nodeName}isElementTopmost(t){const e=t.getBoundingClientRect(),r=[[e.left,e.top],[e.right,e.top],[e.left,e.bottom],[e.right,e.bottom],[e.left+e.width/2,e.top],[e.left+e.width/2,e.bottom],[e.left,e.height/2],[e.right,e.height/2],[e.left+e.left/2,e.height/2]];let a=!1,n=0;for(;!a&&n<r.length;){const e=document.elementFromPoint(...r[n]);a=t===e||t.contains(e),n+=1}return a}checkElements(){this.targets=this.targets.filter(t=>{const e=document.querySelector(t.selector);return!e||(this.existingTargets.push(Object.assign(t,{element:e})),this.visibilityobserver.observe(e),!1)}),this.existingTargets=this.existingTargets.filter(t=>!!document.querySelector(t.selector)||(this.visibilityobserver.unobserve(t.element),this.targets.push(t),!1)),this.inViewPortTargets=this.inViewPortTargets.filter(({element:t,resolve:e})=>!this.isElementVisible(t)||(this.visibilityobserver.unobserve(t),e(t),!1))}watch(t,e){this.targets.push({selector:t,resolve:e})}clear(t){const e=this.targets.filter(e=>e.selector!==t);0===e.length&&(this.existingTargets=[],this.inViewPortTargets=[],this.mutationobserver.disconnect(),this.visibilityobserver.unobserve(t)),this.targets.length>e&&(this.targets=e,this.visibilityobserver.unobserve(t))}}class g{constructor({triggerEvent:t,triggerSelector:e,triggerDelay:r}){this.event=t,this.selector=e&&e.length?e:"body",this.delay=r,this.elementsSelectors=[],this.eventsListeners=[],this.timeouts=[],this.intervals=[],this.observers=[],this.promises=[],this.visibilityObservers=[],this.elementsWaiters=[]}static promiseDeferrer(t){const e={promise:null,resolve:null,reject:null,name:t};return e.promise=new Promise((t,r)=>{e.resolve=t,e.reject=r}),e}async onElementVisible(){const t=g.promiseDeferrer("onElementVisible");this.promises.push(t);const e=await this.onPageLoad(),r=await y("IntersectionObserver"),a=function(t,e){return ABTasty.widgetUtils||(ABTasty.widgetUtils={}),ABTasty.widgetUtils[t]||Object.assign(ABTasty.widgetUtils,{[t]:new e}),ABTasty.widgetUtils[t]}("VisibilityObserver",b);return this.visibilityObservers.push(a),r&&e&&a.watch(this.selector,t.resolve),t.promise}onPageLoad(){const t=g.promiseDeferrer("onPageLoad");this.promises.push(t);const e=()=>"complete"===document.readyState;if(e())t.resolve(!0);else{const r=()=>e()&&!clearTimeout(a)&&!t.resolve(!0),a=setTimeout(()=>t.resolve(!1),2e4),n=["readystatechange",r,{passive:!0}];this.timeouts.push(a),this.eventsListeners.push(n),document.addEventListener(...n)}return t.promise}onClick(){const t=document.createElement("style");t.type="text/css",t.id=`Click_${c()}`,t.innerHTML=`${this.selector} {\n\t\t\tcursor: pointer !important;\n\t\t\tpointer-events: all !important;\n\t\t}`,document.head.appendChild(t),this.elementsSelectors.push(`#${t.id}`);const e=g.promiseDeferrer("onClick");this.promises.push(e);const r=()=>[...document.querySelectorAll(this.selector)],a=t=>r().some(e=>e.isSameNode(t)||!!t.closest(this.selector)),n=["click",({target:t})=>!!a(t)&&(e.resolve(!0),this.clear()),{passive:!0,capture:!0}];return this.eventsListeners.push(n),document.addEventListener(...n),e.promise}onExitIntent(){const t=g.promiseDeferrer("onExitIntent");this.promises.push(t);const e=["mouseleave",async({clientY:e})=>{if(!(e>0))if(this.delay){const e=1e3*this.delay,r=setTimeout(()=>{t.resolve(!0)},e);this.timeouts.push(r)}else t.resolve(!0)},{passive:!0}],r=m("body",t=>{t.addEventListener(...e),this.eventsListeners.push([t,...e]),this.elementsWaiters=this.elementsWaiters.filter(t=>t!==r)});return this.elementsWaiters.push(r),t.promise}onDelay(){const t=g.promiseDeferrer("onDelay");this.promises.push(t);const e=1e3*this.delay,r=setTimeout(()=>{t.resolve(!0)},e);return this.timeouts.push(r),t.promise}onReengage(){const t=g.promiseDeferrer("onReengage");this.promises.push(t);const e=1e3*this.delay;let r=e;const a=[()=>(r=e,r),{passive:!0}];["click","mousemove","scroll","keypress"].forEach(t=>{document.addEventListener(t,...a),this.eventsListeners.push([t,...a])});const n=setInterval(()=>{r<=0?t.resolve(!0):r-=100},100);return this.intervals.push(n),t.promise}clear(){return this.elementsSelectors.length&&(this.elementsSelectors.forEach(t=>{document.querySelector(t)&&document.querySelector(t).remove()}),this.elementsSelectors=[]),this.eventsListeners.length&&(this.eventsListeners.forEach(t=>{const[e,...r]="string"==typeof t[0]?[document,...t]:t;e&&r.length>1&&e.removeEventListener(...r)}),this.eventsListeners=[]),this.timeouts.length&&(this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts=[]),this.intervals.length&&(this.intervals.forEach(t=>clearInterval(t)),this.intervals=[]),this.observers.length&&(this.observers.forEach(t=>t.disconnect()),this.observers=[]),this.visibilityObservers.length&&(this.visibilityObservers.forEach(t=>t.clear(this.selector)),this.visibilityObservers=[]),this.promises.length&&(this.promises.forEach(t=>t.resolve(!1)),this.promises=[]),this.elementsWaiters.length&&(this.elementsWaiters.forEach(t=>t.clear()),this.elementsWaiters=[]),this}async isTriggered(){let t;switch(this.clear(),this.event){case"pageLoad":t=await this.onPageLoad(),this.clear();break;case"click":t=await this.onClick(),this.clear();break;case"exitIntent":t=await this.onExitIntent(),this.clear();break;case"delay":t=await this.onDelay(),this.clear();break;case"reengage":t=await this.onReengage(),this.clear();break;case"elementVisible":t=await this.onElementVisible(),this.clear();break;default:t=!1}return t}}class f{constructor(t,e,r){this.recurrence=t,this.isWidgetApplied=e,this.callback=r,this.observer=new MutationObserver(this.observerHandler.bind(this)),this.eventListenerParams=["abtasty_resetActionTracking",this.eventHandler.bind(this),{passive:!0}],this.elementsWaiters=[]}recurrenceIsDone(){return!this.recurrence||this.recurrence.isOver()}decisionHandler(t){const e=s(),{type:r}=this.recurrence?this.recurrence.getCurrentRecurrence():{type:!1},a=()=>t&&"display"===r||this.recurrenceIsDone();return!this.isWidgetApplied()&&e&&a()?(this.clearWatcher(),this.callback("rebuild",t)):(!this.isWidgetApplied()||e&&a())&&(this.isWidgetApplied()||e)||(this.clearWatcher(),this.callback("remove",t),this.watch()),this}eventHandler(){let t=s();return[250,500].forEach(e=>setTimeout(()=>500===e&&s()===t?this:(t=s(),this.decisionHandler(!1)),e)),this}observerHandler(t){const e=t.some(({removedNodes:t})=>t&&t.length),r=t.some(({addedNodes:t})=>t&&t.length);return e||r?(this.decisionHandler(!0),this):this}watch(){if(l())return this;this.clearWatcher(),document.addEventListener(...this.eventListenerParams);const t=m("body",e=>{const r=[e,{childList:!0,subtree:!0}];this.observer.observe(...r),this.elementsWaiters=this.elementsWaiters.filter(e=>e!==t)});return this.elementsWaiters.push(t),this}clearWatcher(){return document.removeEventListener(...this.eventListenerParams),this.elementsWaiters.length&&(this.elementsWaiters.forEach(t=>t.clear()),this.elementsWaiters=[]),this.observer.disconnect(),this}}!function(t,e){void 0===e&&(e={});var r=e.insertAt;if(t&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===r&&a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}}("abtasty-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483145}abtasty-modal:not(.abtasty-modal--video){overflow-y:auto}abtasty-modal__underlay{width:100%;height:100%;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.5);cursor:pointer}.abtasty-modal__area{top:0;left:0;right:0;width:auto;margin:10px!important;z-index:100;position:relative;float:none}.abtasty-modal__area-layout--imageOnly{max-width:80%}.abtasty-modal__area-layout--imageOnly img{border-style:solid;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;opacity:1}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__content{padding:5px;border-radius:0!important;border-width:0!important;background-color:transparent!important;background-image:none!important}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__content{padding:25px 20px 20px}.abtasty-modal .abtasty-modal__content{border-color:#f6f6f6;border-style:solid;padding:20px}.abtasty-modal__area-type--image,.abtasty-modal__area-type--no-title,.abtasty-modal__area-type--simple,.abtasty-modal__area-type--video{margin:0 auto 20px!important;top:10vh;border:none;background:none}.abtasty-modal__area-type--video.abtasty-modal__area-layout--bottom .abtasty-modal__close--inside{top:2px}.abtasty-modal__area-type--video.abtasty-modal__area-layout--top .abtasty-modal__close--inside{right:15px;top:20px}.abtasty-modal__area-type--image .abtasty-modal__close,.abtasty-modal__area-type--simple .abtasty-modal__close{right:10px;top:15px}.abtasty-modal__close{position:absolute;right:5px;top:0;font-size:20px;font-weight:300;background:transparent;border:0;color:#222;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;line-height:24px!important;margin-right:5px;cursor:pointer;width:20px;height:20px;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__close>*{pointer-events:none}.abtasty-modal__close svg{display:block}.abtasty-modal__close svg .close-x{stroke:#5c5c5c;fill:transparent;stroke-linecap:round;stroke-width:3}.abtasty-modal__area-type--video.abtasty-modal__area-layout--no-title .abtasty-modal__close--inside{top:-6px;right:-15px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__area-type--image .abtasty-modal__close--outside,.abtasty-modal__area-type--simple .abtasty-modal__close--outside,.abtasty-modal__close .abtasty-modal__close--outside{top:-25px;right:0;width:20px;height:20px}.abtasty-modal__close--outside{top:-25px;right:-25px;background:#fff;border-radius:20px;width:20px;height:20px}.abtasty-modal__media,.abtasty-modal__media-link{max-width:100%;display:block}.abtasty-modal__text{padding:20px;font-family:Open Sans,sans-serif!important;color:#000;overflow:auto}.abtasty-modal__title{width:auto;font-size:20px!important;font-weight:500;line-height:1.1;margin-bottom:10px}.abtasty-modal__text p{margin:0 0 10px!important;font-size:15px;font-weight:300;word-wrap:break-word}.abtasty-modal__button{width:100%;text-align:center;margin-top:20px}.abtasty-modal__button a{padding:10px 20px;border-radius:10px;display:inline-block;font-weight:700}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__title{text-align:center}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--center .abtasty-modal__innertext{text-align:center;white-space:pre-wrap}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--left .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__title{width:50%;float:left;text-align:center;vertical-align:middle}.abtasty-modal__area-type--simple.abtasty-modal__area-layout--right .abtasty-modal__innertext{width:50%;float:left}.abtasty-modal__area-type--image .abtasty-modal__image img{max-height:400px;max-width:100%;display:inline;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--left .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__image{width:50%;display:inline-block;height:auto;vertical-align:middle;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--right .abtasty-modal__text{text-align:left;width:50%;display:inline-block;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--image.abtasty-modal__area-layout--top .abtasty-modal__image img{max-height:300px;opacity:1}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__image{width:100%;text-align:center}.abtasty-modal__area-type--image.abtasty-modal__area-layout--bottom .abtasty-modal__text{width:100%;padding:20px 0}.abtasty-modal__area-type--video{text-align:center;width:100%}.abtasty-modal__area-type--video iframe{width:100%}@media (min-width:630px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--medium{width:600px;margin:0 auto 20px!important}.abtasty-modal--video{width:50%;left:25%}}@media (min-width:330px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--small{width:300px;margin:0 auto 20px!important}}@media (min-width:930px){abtasty-modal:not(.abtasty-modal--video) .abtasty-modal__area-width--large{width:900px;margin:0 auto 20px!important}}.abtasty-animation-fadeIn{-webkit-animation-name:abTastyfadeIn;animation-name:abTastyfadeIn}.abtasty-animation-fadeIn,.abtasty-animation-fadeOut{-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-fadeOut{-webkit-animation-name:abTastyfadeOut;animation-name:abTastyfadeOut}.abtasty-animation-slideIn{-webkit-animation-name:abTastyslideInDown;animation-name:abTastyslideInDown;-webkit-animation-duration:.5s;animation-duration:.5s}.abtasty-animation-slideOut{-webkit-animation-name:abTastyslideOutUp;animation-name:abTastyslideOutUp;-webkit-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes abTastyfadeIn{0%{opacity:0}to{opacity:1}}@keyframes abTastyfadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes abTastyfadeOut{0%{opacity:1}to{opacity:0}}@keyframes abTastyfadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes abTastyslideInDown{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes abTastyslideInDown{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes abTastyslideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes abTastyslideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}");var v=function(t){var e=Object.prototype.hasOwnProperty;function r(t,a){return Array.isArray(t)?function(t,e){for(var a,n="",i="",s=Array.isArray(e),l=0;l<t.length;l++)(a=r(t[l]))&&(s&&e[l]&&(a=o(a)),n=n+i+a,i=" ");return n}(t,a):t&&"object"==typeof t?function(t){var r="",a="";for(var n in t)n&&t[n]&&e.call(t,n)&&(r=r+a+n,a=" ");return r}(t):t||""}function a(t){if(!t)return"";if("object"==typeof t){var r="";for(var a in t)e.call(t,a)&&(r=r+a+":"+t[a]+";");return r}return t+""}function n(t,e,r,a){if(!1===e||null==e||!e&&("class"===t||"style"===t))return"";if(!0===e)return" "+(a?t:t+'="'+t+'"');var n=typeof e;return"object"!==n&&"function"!==n||"function"!=typeof e.toJSON||(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),r||-1===e.indexOf('"'))?(r&&(e=o(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"'")+"'"}t.merge=function t(e,r){if(1===arguments.length){for(var n=e[0],i=1;i<e.length;i++)n=t(n,e[i]);return n}for(var o in r)if("class"===o){var s=e[o]||[];e[o]=(Array.isArray(s)?s:[s]).concat(r[o]||[])}else if("style"===o){s=(s=a(e[o]))&&";"!==s[s.length-1]?s+";":s;var l=a(r[o]);l=l&&";"!==l[l.length-1]?l+";":l,e[o]=s+l}else e[o]=r[o];return e},t.classes=r,t.style=a,t.attr=n,t.attrs=function(t,i){var o="";for(var s in t)if(e.call(t,s)){var l=t[s];if("class"===s){l=r(l),o=n(s,l,!1,i)+o;continue}"style"===s&&(l=a(l)),o+=n(s,l,!1,i)}return o};var i=/["&<>]/;function o(t){var e=""+t,r=i.exec(e);if(!r)return t;var a,n,o,s="";for(a=r.index,n=0;a<e.length;a++){switch(e.charCodeAt(a)){case 34:o=""";break;case 38:o="&";break;case 60:o="<";break;case 62:o=">";break;default:continue}n!==a&&(s+=e.substring(n,a)),n=a+1,s+=o}return n!==a?s+e.substring(n,a):s}return t.escape=o,t.rethrow=function t(e,r,a,n){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&r||n))throw e.message+=" on line "+a,e;try{n=n||require("fs").readFileSync(r,"utf8")}catch(r){t(e,null,a)}var i=3,o=n.split("\n"),s=Math.max(a-i,0),l=Math.min(o.length,a+i);i=o.slice(s,l).map((function(t,e){var r=e+s+1;return(r==a?" > ":" ")+r+"| "+t})).join("\n");throw e.path=r,e.message=(r||"Pug")+":"+a+"\n"+i+"\n\n"+e.message,e},t}({});function _(t){var e,r="",a={};try{var n={},i=t||{};(function(t,n,i,o,s,l,c,d,u,h,m,y,p,b,g,f,_,w,x,k,T,S,E){a.button=e=function(){this&&this.block,this&&this.attributes;r=(r=(r+='<div class="abtasty-modal__button">')+"<a"+v.attr("href",y,!0,!0)+' target="_self"'+v.attr("style",v.style({"background-color":m+"!important",color:b+"!important"}),!0,!0)+">")+v.escape(null==(e=p)?"":e)+"</a></div>"},a.title=e=function(){this&&this.block,this&&this.attributes;r=(r+='<h2 class="abtasty-modal__title" style="text-align:center;">')+(null==(e=T)?"":e)+"</h2>"},a.imageOnly=e=function(){this&&this.block,this&&this.attributes;r=r+"<img"+(v.attr("src",_,!0,!0)+v.attr("style",v.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":l+"!important"}),!0,!0))+">"},a.imageWithText=e=function(){this&&this.block,this&&this.attributes;r+='<div class="abtasty-modal__image">',_&&(r=r+"<img"+(v.attr("src",_,!0,!0)+v.attr("style",v.style({"border-radius":d+"px!important"}),!0,!0))+">"),r+="</div>"},a.content=e=function(){this&&this.block,this&&this.attributes;r+='<div class="abtasty-modal__innertext">',r=(r+="<p>")+(null==(e=x)?"":e)+"</p></div>"},a.closeButton=e=function(){this&&this.block,this&&this.attributes;r=r+"<div"+v.attr("class",v.classes(["abtasty-modal__close",g?"abtasty-modal__close--"+g:""],[!1,!0]),!1,!0)+" data-abtasty-actionnable"+v.attr("style",v.style("outside"===g?{"background-color":n}:""),!0,!0)+">",r+='<svg viewbox="0 0 40 40">',r+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>'},a.contentWrapper=e=function(){var t=this&&this.block;this&&this.attributes;r=r+'<div class="abtasty-modal__content"'+v.attr("style",v.style({"border-radius":c+"px!important","border-width":u+"px!important","border-color":l+"!important","background-color":i+"!important","background-image":s&&o?'url("'+o+'")!important':"none"}),!0,!0)+">",t&&t&&t(),r+="</div>"},a.modalWrapper=e=function(){var e=this&&this.block;this&&this.attributes;r=(r=r+"<abtasty-modal__underlay"+v.attr("style",v.style({"background-color":"rgba(0, 0, 0, "+k/100+")"}),!0,!0)+" data-abtasty-actionnable></abtasty-modal__underlay>")+"<div"+(v.attr("class",v.classes(["abtasty-animation-"+t+" abtasty-modal__area abtasty-modal__area-width--"+E+" abtasty-modal__area-type--"+S+" abtasty-modal__area-layout--"+w],[!0]),!1,!0)+v.attr("style",v.style({width:"custom"===E&&f+"%","margin-left":"custom"===E&&(100-f)/2+"% !important"}),!0,!0))+">",e&&e&&e(),r+="</div>"},a.modalWrapper.call({block:function(){a.closeButton(),"image"===S&&"imageOnly"===w?(a.imageOnly(),h&&a.button()):a.contentWrapper.call({block:function(){"simple"===S?(r+='<div class="abtasty-modal__text">',"center"===w||"left"===w?(a.title(),a.content(),r+='<div style="clear:both;"></div>'):(a.content(),a.title(),r+='<div style="clear:both;"></div>'),r+="</div>",h&&a.button()):"image"===S?("top"!==w&&"left"!==w||a.imageWithText(),r+='<div class="abtasty-modal__text">',a.title(),a.content(),h&&a.button(),r+="</div>","right"!==w&&"bottom"!==w||a.imageWithText(),r+='<div style="clear:both;"></div>'):"video"===S&&("top"===w&&a.title(),r+=null==(e=x)?"":e,"bottom"===w&&a.title(),h&&a.button())}})}})}).call(this,"animation"in i?i.animation:"undefined"!=typeof animation?animation:void 0,"backgroundCloseButtonColor"in i?i.backgroundCloseButtonColor:"undefined"!=typeof backgroundCloseButtonColor?backgroundCloseButtonColor:void 0,"backgroundColor"in i?i.backgroundColor:"undefined"!=typeof backgroundColor?backgroundColor:void 0,"backgroundImage"in i?i.backgroundImage:"undefined"!=typeof backgroundImage?backgroundImage:void 0,"backgroundImageButton"in i?i.backgroundImageButton:"undefined"!=typeof backgroundImageButton?backgroundImageButton:void 0,"borderColor"in i?i.borderColor:"undefined"!=typeof borderColor?borderColor:void 0,"borderRadius"in i?i.borderRadius:"undefined"!=typeof borderRadius?borderRadius:void 0,"borderRadiusImage"in i?i.borderRadiusImage:"undefined"!=typeof borderRadiusImage?borderRadiusImage:void 0,"borderWidth"in i?i.borderWidth:"undefined"!=typeof borderWidth?borderWidth:void 0,"button"in i?i.button:"undefined"!=typeof button?button:void 0,"buttonBackgroundColor"in i?i.buttonBackgroundColor:"undefined"!=typeof buttonBackgroundColor?buttonBackgroundColor:void 0,"buttonLink"in i?i.buttonLink:"undefined"!=typeof buttonLink?buttonLink:void 0,"buttonText"in i?i.buttonText:"undefined"!=typeof buttonText?buttonText:void 0,"buttonTextColor"in i?i.buttonTextColor:"undefined"!=typeof buttonTextColor?buttonTextColor:void 0,"closeButtonPosition"in i?i.closeButtonPosition:"undefined"!=typeof closeButtonPosition?closeButtonPosition:void 0,"customWidth"in i?i.customWidth:"undefined"!=typeof customWidth?customWidth:void 0,"image"in i?i.image:"undefined"!=typeof image?image:void 0,"layout"in i?i.layout:"undefined"!=typeof layout?layout:void 0,"modalContent"in i?i.modalContent:"undefined"!=typeof modalContent?modalContent:void 0,"overlayOpacity"in i?i.overlayOpacity:"undefined"!=typeof overlayOpacity?overlayOpacity:void 0,"title"in i?i.title:"undefined"!=typeof title?title:void 0,"type"in i?i.type:"undefined"!=typeof type?type:void 0,"width"in i?i.width:"undefined"!=typeof width?width:void 0)}catch(t){v.rethrow(t,void 0,void 0,n[void 0])}return r}var w,x,k,T,S,E=DATA,L=E.type,O=E.animation,R=E.backgroundColor,I=E.overlayOpacity,C=E.backgroundImage,P=E.backgroundImageButton,A=E.borderRadius,W=E.borderRadiusImage,B=E.borderWidth,D=E.borderColor,N=E.button,j=E.buttonBackgroundColor,Y=E.buttonLink,M=E.buttonText,V=E.buttonTextColor,G=E.backgroundCloseButtonColor,q=E.closeButtonColor,H=E.closeButtonPosition,z=E.content,$=E.customWidth,F=E.title,U=E.layout,K=E.videoLink,J=E.widthImageWithText,Q=E.widthImageOnly,X=E.autoPlay,Z=E.triggerEvent,tt=0,et=0,rt=["pageLoad","delay","reengage"].some((function(t){return t===Z})),at=L.replace(/^\w/,(function(t){return t.toUpperCase()})),nt="imageOnly"===U?Q:J,it=DATA.image||"https://widgets-images.abtasty.com/image-placeholder.png",ot=".abtasty-modal__close";function st(){return w&&w.closest("html")}function lt(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];et=1,st()&&("video"===L&&t&&(w.innerHTML=""),w.style.display="none"),ABTastyEvent("".concat(at," modal closed"),null,TEST_ID),!l()&&S.clearWatcher(),setTimeout((function(){st()&&w.remove(),setTimeout((function(){return rt?bt():_t()}),100)}),100)}function ct(t,e,r,a){var n,i=[t,function(t){var n=t.target,s=n.matches(e)||n.closest(e);return s&&r(),s&&a&&function(t){var e;return(e=document).removeEventListener.apply(e,o(t))}(i)},!l()];(n=document).addEventListener.apply(n,i)}function dt(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={layout:U,type:L,borderRadius:A,borderRadiusImage:W,borderWidth:B,borderColor:D,button:N,buttonBackgroundColor:j,buttonLink:Y,buttonText:M,buttonTextColor:V,backgroundColor:"imageOnly"!==U?R:"initial",overlayOpacity:I,backgroundImage:C,backgroundImageButton:P,image:it,width:nt,videoLink:K,customWidth:$,animation:O,title:F,closeButtonPosition:H,backgroundCloseButtonColor:G,modalContent:z||t.outerHTML};if(w.className="abtasty-modal abtasty-modal--".concat(L),w.dataset.testId=TEST_ID,w.innerHTML=_(e),document.body.appendChild(w),x=w.querySelector(".abtasty-modal__area"),q){var r=w.querySelector("".concat(ot," .close-x"));r.style.stroke=q}return new Promise((function(t){t(!0)}))}function ut(t){var e,r=t.indexOf("youtu")>-1,a=t.indexOf("vimeo")>-1;if(r){var n=t.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2];e="//www.youtube.com/embed/".concat(n,"?rel=0"),X&&(e+="&autoplay=1")}else if(a){var i=t.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2];e="//player.vimeo.com/video/".concat(i)}return e}function ht(){var t=(window.innerWidth>630?.5*window.innerWidth:window.innerWidth-40)/16*9;return Math.round(t)}function mt(){return yt.apply(this,arguments)}function yt(){return(yt=r(t.mark((function e(){var r,a,n,i,o,s;return t.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Date.now(),a="abtasty-widget-video-".concat(r),(n=document.createElement("iframe")).setAttribute("id",a),i=ut(K),o=ht(),n.style.height="".concat(o,"px"),"no-title"===U&&(n.style.border="".concat(B,"px solid ").concat(D,"!important"),n.style.borderRadius="".concat(A,"px!important")),n.src=i,n.frameBorder=0,n.allowfullscreen=!0,t.next=13,dt(n);case 13:return s=t.sent,x.style.height="".concat(o,"px"),window.addEventListener("resize",(function(){var t=document.querySelector("abtasty-modal iframe"),e=ht();t.style.height="".concat(e,"px"),x.style.height="".concat(e,"px")})),t.abrupt("return",s&&new Promise((function(t){t(!0)})));case 17:case"end":return t.stop()}}),e)})))).apply(this,arguments)}function pt(t,e){switch(e||(tt=0),t){case"remove":st()?(w.style.display="none",w.remove()):(T&&T.clear(),bt());break;case"rebuild":tt?et?bt():ft():_t()}}function bt(){l()||(S=S||new f(k,st,pt)).watch()}function gt(){et=0,w.style.display="block",ct("click","".concat("abtasty-modal__underlay",", ").concat(ot),(function(){lt(),!l()&&k.setClosingRecurrence()}),!0),l()||(tt||ABTastyEvent("".concat(at," modal displayed"),null,TEST_ID),N&&Y.length&&ct("click",".abtasty-modal__button",(function(){lt(!1),!l()&&k.setValidationRecurrence()}),!0),bt(),tt=1,k.setDisplayRecurrence())}function ft(){return vt.apply(this,arguments)}function vt(){return(vt=r(t.mark((function e(){var a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w=w||document.createElement("abtasty-modal"),"video"!==L){e.next=8;break}return e.next=4,mt();case 4:e.sent&>(),e.next=19;break;case 8:if("image"!==L||"fit"!==nt){e.next=15;break}(a=new Image).src=it,a.className="abtasty-modal__media",a.onload=function(){var e=r(t.mark((function e(){return t.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,dt(this);case 2:t.sent&>(),x.style.width="".concat(this.width,"px"),x.style.height="".concat(this.height,"px");case 6:case"end":return t.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),e.next=19;break;case 15:return e.next=17,dt();case 17:e.sent&>();case 19:return e.abrupt("return",w);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _t(){return wt.apply(this,arguments)}function wt(){return(wt=r(t.mark((function e(){var r;return t.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l()||s()){t.next=2;break}return t.abrupt("return",!1);case 2:if(!T||!T.promises.length){t.next=4;break}return t.abrupt("return",!1);case 4:if(k=k||new p(d()),k.isOver()){t.next=9;break}return bt(),t.abrupt("return",!1);case 9:return bt(),T=T||new g(u()),t.next=13,T.isTriggered();case 13:return(r=t.sent)&&ft(),t.abrupt("return",r);case 16:case"end":return t.stop()}}),e)})))).apply(this,arguments)}l()?ft():_t()}(); |
{ | ||
"name": "@abtasty/modal", | ||
"description": "Widget for AB Tasty", | ||
"version": "2.12.2-1", | ||
"version": "2.12.2", | ||
"form": "dist/form.js", | ||
@@ -41,3 +41,3 @@ "main": "dist/main.js", | ||
"dependencies": { | ||
"@abtasty/widget-utils": "1.16.11", | ||
"@abtasty/widget-utils": "1.14.0", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.8.3", | ||
@@ -49,2 +49,2 @@ "@rollup/plugin-commonjs": "^11.0.1", | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2
3
58545
3
0
2
0
+ Added@abtasty/widget-utils@1.14.0(transitive)
- Removed@abtasty/widget-utils@1.16.11(transitive)
Updated@abtasty/widget-utils@1.14.0