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

@abtasty/interstitiel

Package Overview
Dependencies
Maintainers
14
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtasty/interstitiel - npm Package Compare versions

Comparing version 2.0.6-1 to 2.0.6-2

2

dist/main.js

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

!function(){"use strict";var t;!function(t,e){if("undefined"==typeof document)return e;t=t||"";var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",a.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}(".abtasty-modal{display:none;z-index:1000000}.abtasty-modal,.abtasty-modal .abtasty-modal__underlay{position:fixed;top:0;left:0;width:100%;height:100%;overflow-y:auto}.abtasty-modal .abtasty-modal__underlay{background-color:rgba(0,0,0,.8);cursor:pointer}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia{width:100%;height:100%;margin:0 auto!important;max-height:100%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__content{height:100%;padding:0}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__image,.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__media{height:100%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__image div{width:100%;height:100%;background-repeat:no-repeat;background-size:contain;background-position:50% 50%}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__video{height:100%;overflow:hidden}.abtasty-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__video iframe{overflow:auto;margin:auto;position:absolute;top:0;left:0;bottom:0;right:0}.abtasty-modal .abtasty-modal__area{width:600px;margin:150px auto!important;top:0;left:0;right:0;max-height:100%;z-index:100;position:relative}@media (max-width:740px){.abtasty-modal .abtasty-modal__area{width:100%;overflow:auto;margin:0 auto!important}}.abtasty-modal .abtasty-modal__area .abtasty-modal__close{width:27px;height:27px;position:fixed;top:40px;right:40px;background-color:#fff;border-radius:50%;cursor:pointer}.abtasty-modal .abtasty-modal__area .abtasty-modal__close svg{stroke:#000;stroke-width:4;height:27px}@media (max-width:740px){.abtasty-modal .abtasty-modal__area .abtasty-modal__close{top:10px;right:10px}}.abtasty-modal .abtasty-modal__area .abtasty-modal__content{text-align:center;padding:20px;font-family:Lato!important;color:#000}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__title{font-weight:500;line-height:1.1;margin-bottom:10px;margin-top:30px;font-family:Lato!important;color:#c49641;text-shadow:0 2px 4px rgba(0,0,0,.5);font-size:48px;font-weight:700}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__image{cursor:pointer}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__text{margin:0 0 40px!important;font-weight:300;font-size:30px;line-height:30px;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.5)}.abtasty-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__cta{margin:0 0 10px!important;font-size:25px;font-weight:300;min-width:100px;height:80px;padding:20px}",void 0);var e=function(t){var e=Object.prototype.hasOwnProperty;function a(t,o){return Array.isArray(t)?function(t,e){for(var o,i="",r="",n=Array.isArray(e),l=0;l<t.length;l++)(o=a(t[l]))&&(n&&e[l]&&(o=d(o)),i=i+r+o,r=" ");return i}(t,o):t&&"object"==typeof t?function(t){var a="",o="";for(var i in t)i&&t[i]&&e.call(t,i)&&(a=a+o+i,o=" ");return a}(t):t||""}function o(t){if(!t)return"";if("object"==typeof t){var a="";for(var o in t)e.call(t,o)&&(a=a+o+":"+t[o]+";");return a}return";"!==(t+="")[t.length-1]?t+";":t}function i(t,e,a,o){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(o?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),a||-1===e.indexOf('"'))?(a&&(e=d(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"&#39;")+"'"):""}t.merge=function t(e,a){if(1===arguments.length){for(var i=e[0],r=1;r<e.length;r++)i=t(i,e[r]);return i}for(var d in a)if("class"===d){var n=e[d]||[];e[d]=(Array.isArray(n)?n:[n]).concat(a[d]||[])}else if("style"===d){var n=o(e[d]),l=o(a[d]);e[d]=n+l}else e[d]=a[d];return e},t.classes=a,t.style=o,t.attr=i,t.attrs=function(t,r){var d="";for(var n in t)if(e.call(t,n)){var l=t[n];if("class"===n){l=a(l),d=i(n,l,!1,r)+d;continue}"style"===n&&(l=o(l)),d+=i(n,l,!1,r)}return d};var r=/["&<>]/;function d(t){var e=""+t,a=r.exec(e);if(!a)return t;var o,i,d,n="";for(o=a.index,i=0;o<e.length;o++){switch(e.charCodeAt(o)){case 34:d="&quot;";break;case 38:d="&amp;";break;case 60:d="&lt;";break;case 62:d="&gt;";break;default:continue}i!==o&&(n+=e.substring(i,o)),i=o+1,n+=d}return i!==o?n+e.substring(i,o):n}return t.escape=d,t.rethrow=function t(e,a,o,i){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&a||i))throw e.message+=" on line "+o,e;try{i=i||require("fs").readFileSync(a,"utf8")}catch(a){t(e,null,o)}var r=3,d=i.split("\n"),n=Math.max(o-r,0),l=Math.min(d.length,o+r);var r=d.slice(n,l).map(function(t,e){var a=e+n+1;return(a==o?" > ":" ")+a+"| "+t}).join("\n");e.path=a;e.message=(a||"Pug")+":"+o+"\n"+r+"\n\n"+e.message;throw e},t}({}),a=function(t){var a,o="",i={};try{var r={},d=t||{};(function(t,r,d,n,l,s,c,m,y,u,f,b,v,p,_,h,g,x){i.image=a=function(){o+='<div class="abtasty-modal__image">',o="fullscreenMedia"===c&&d?(o=o+"<a"+e.attr("href",b,!0,!0)+' target="_blank">')+"<div"+e.attr("style",e.style({"background-image":"url("+s+")"}),!0,!0)+"></div></a>":"fullscreenMedia"===c?o+"<div"+e.attr("style",e.style({"background-image":"url("+s+")"}),!0,!0)+"></div>":"centeredMedia"===c&&d?(o=o+"<a"+e.attr("href",b,!0,!0)+' target="_blank">')+"<img"+(e.attr("src",s,!0,!0)+e.attr("style",e.style({"border-radius":y+"px",border:u+"px solid "+m}),!0,!0))+"></a>":o+"<img"+(e.attr("src",s,!0,!0)+e.attr("style",e.style({"border-radius":y+"px",border:u+"px solid "+m}),!0,!0))+">",o+="</div>"},i.video=a=function(){var t="fullscreenMedia"===c?"":{"border-radius":y+"px",border:u+"px solid "+m};o=(o+='<div class="abtasty-modal__video">')+"<iframe"+(e.attr("id",g,!0,!0)+e.attr("src",x,!0,!0))+" allowfullscreen"+e.attr("style",e.style(t),!0,!0)+"></iframe></div>"},o=(o+='<div class="abtasty-modal__underlay"></div>')+"<div"+e.attr("class",e.classes(["abtasty-modal__area","abtasty-modal__"+c],[!1,!0]),!1,!0)+">",o+='<div class="abtasty-modal__close">',o+=" ",o+='<svg viewbox="0 0 40 40">',o+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>',o+='<div class="abtasty-modal__content">',"textOnly"!=c&&(o+='<div class="abtasty-modal__media">',"image"===f&&i.image(),"video"===f&&"textOnly"!==c&&i.video(),o+="</div>"),"textOnly"!=c&&"mediaAndText"!=c||(o=(o=(o=(o=o+'<h2 class="abtasty-modal__title"'+e.attr("style",e.style({color:h}),!0,!0)+">")+e.escape(null==(a=_)?"":a)+"</h2>")+'<p class="abtasty-modal__text"'+e.attr("style",e.style({color:p}),!0,!0)+">")+e.escape(null==(a=v)?"":a)+"</p>",d&&(o=(o=o+'<a class="abtasty-modal__cta"'+e.attr("href",b,!0,!0)+' target="_blank"'+e.attr("style",e.style({"border-radius":r+"px",color:l,"background-color":t}),!0,!0)+">")+(null==(a=n)?"":a)+"</a>")),o+="</div></div>"}).call(this,"ctaBackgroundColor"in d?d.ctaBackgroundColor:"undefined"!=typeof ctaBackgroundColor?ctaBackgroundColor:void 0,"ctaBorderRadius"in d?d.ctaBorderRadius:"undefined"!=typeof ctaBorderRadius?ctaBorderRadius:void 0,"ctaEnabled"in d?d.ctaEnabled:"undefined"!=typeof ctaEnabled?ctaEnabled:void 0,"ctaLabel"in d?d.ctaLabel:"undefined"!=typeof ctaLabel?ctaLabel:void 0,"ctaTextColor"in d?d.ctaTextColor:"undefined"!=typeof ctaTextColor?ctaTextColor:void 0,"image"in d?d.image:"undefined"!=typeof image?image:void 0,"layout"in d?d.layout:"undefined"!=typeof layout?layout:void 0,"mediaBorderColor"in d?d.mediaBorderColor:"undefined"!=typeof mediaBorderColor?mediaBorderColor:void 0,"mediaBorderRadius"in d?d.mediaBorderRadius:"undefined"!=typeof mediaBorderRadius?mediaBorderRadius:void 0,"mediaBorderThickness"in d?d.mediaBorderThickness:"undefined"!=typeof mediaBorderThickness?mediaBorderThickness:void 0,"mediaType"in d?d.mediaType:"undefined"!=typeof mediaType?mediaType:void 0,"redirectionUrl"in d?d.redirectionUrl:"undefined"!=typeof redirectionUrl?redirectionUrl:void 0,"text"in d?d.text:"undefined"!=typeof text?text:void 0,"textTextColor"in d?d.textTextColor:"undefined"!=typeof textTextColor?textTextColor:void 0,"title"in d?d.title:"undefined"!=typeof title?title:void 0,"titleTextColor"in d?d.titleTextColor:"undefined"!=typeof titleTextColor?titleTextColor:void 0,"videoID"in d?d.videoID:"undefined"!=typeof videoID?videoID:void 0,"videoUrl"in d?d.videoUrl:"undefined"!=typeof videoUrl?videoUrl:void 0)}catch(t){e.rethrow(t,void 0,void 0,r[void 0])}return o},o="AB Tasty Advertising modal "+TEST_ID,i=void 0!==window.ABTastyEditor,r=!!sessionStorage.getItem("ABTastyPreview"),d=Date.now();function n(t){var e=t.layout,a=void 0,o=void 0,i=window.innerWidth<window.innerHeight;if("fullscreenMedia"===e)!i?a=(o=window.innerHeight)/9*16:o=(a=window.innerWidth)/16*9;else{o=(a=window.innerWidth>=600?560:window.innerWidth-40)/16*9}return{height:Math.round(o),width:Math.round(a)}}var l,s,c,m=function(){var e="abtasty-widget-video-"+Date.now(),o=document.createElement("abtasty-modal"),i=function(){return o.querySelector(".abtasty-modal__underlay")},r=function(){return o.querySelector(".abtasty-modal__close")},d=function(){return o.querySelector("#"+e)};function l(e){var a=e.mediaType;o.style.display="none","video"===a&&(o.innerHTML=""),t&&(document.querySelector("body").style.overflowY=t)}function s(t){i().addEventListener("click",function(){return l(t)}),r().addEventListener("click",function(){return l(t)})}return{hide:l,show:function(t){o.style.display="block",s(t)},append:function(t){o.className="abtasty-modal",o.dataset.testId=TEST_ID;var i=Object.assign(t,{videoID:e,videoUrl:(r=t.video,s=t.autoPlay,c=r.indexOf("youtu")>-1,m=r.indexOf("vimeo")>-1,y=void 0,c?(y="//www.youtube.com/embed/"+r.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2]+"?rel=0",s&&(y+="&autoplay=1")):m&&(y="//player.vimeo.com/video/"+r.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2]),y)});var r,s,c,m,y;if(o.innerHTML=a(i),document.body.appendChild(o),d()){var u=n(t),f=u.width,b=u.height;d().style.width=f+"px",d().style.height=b+"px",d().frameBorder=0,window.addEventListener("resize",function(){var e=n(t);d().style.width=e.width+"px",d().style.height=e.height+"px"})}0!==t.timer&&setTimeout(function(){return l(t)},1e3*t.timer)},handleClose:s}}();function y(e,a){var n,l,s,c;l=e.recurrence,s=Number(l),(!(c=localStorage.getItem(o))||-1===s||i||r||(0===s?!sessionStorage.getItem(o):c<d-24*s*60*60*1e3))&&(m.append(e),m.show(e),e.actionTrackingEvent&&ABTastyEvent(e.actionTrackingName,null,a),n=document.querySelector("body"),t=window.getComputedStyle(n).overflowY,n.style.overflowY="hidden",i||(localStorage.setItem(o,d),sessionStorage.setItem(o,d)))}"exitIntent"===DATA.triggerEvent?(l=function(){return y(DATA,TEST_ID)},c=0,document.addEventListener("mousemove",function(t){c=t.clientY}),document.body.addEventListener("mouseleave",function t(e){e.clientY<=50&&(c=0,clearInterval(s),s=setTimeout(function(){0===c&&(l(),document.removeEventListener("mouseleave",t))},0))},!1)):y(DATA,TEST_ID)}();
!function(){"use strict";var t;!function(t,e){if("undefined"==typeof document)return e;t=t||"";var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",a.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}(".abtasty-interstitiel-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000000;overflow-y:auto}.abtasty-interstitiel-modal .abtasty-modal__underlay{width:100%;height:100%;position:fixed;top:0;left:0;background-color:rgba(0,0,0,.8);cursor:pointer;overflow-y:auto}.abtasty-interstitiel-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia{width:100%;height:100%;margin:0 auto!important;max-height:100%}.abtasty-interstitiel-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__content{height:100%;padding:0}.abtasty-interstitiel-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__image,.abtasty-interstitiel-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__media{height:100%}.abtasty-interstitiel-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__image div{width:100%;height:100%;background-repeat:no-repeat;background-size:contain;background-position:50% 50%}.abtasty-interstitiel-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__video{height:100%;overflow:hidden}.abtasty-interstitiel-modal .abtasty-modal__area.abtasty-modal__fullscreenMedia .abtasty-modal__video iframe{overflow:auto;margin:auto;position:absolute;top:0;left:0;bottom:0;right:0}.abtasty-interstitiel-modal .abtasty-modal__area{width:600px;margin:150px auto!important;top:0;left:0;right:0;max-height:100%;z-index:100;position:relative}@media (max-width:740px){.abtasty-interstitiel-modal .abtasty-modal__area{width:100%;overflow:auto;margin:0 auto!important}}.abtasty-interstitiel-modal .abtasty-modal__area .abtasty-modal__close{width:27px;height:27px;position:fixed;top:40px;right:40px;background-color:#fff;border-radius:50%;cursor:pointer}.abtasty-interstitiel-modal .abtasty-modal__area .abtasty-modal__close svg{stroke:#000;stroke-width:4;height:27px}@media (max-width:740px){.abtasty-interstitiel-modal .abtasty-modal__area .abtasty-modal__close{top:10px;right:10px}}.abtasty-interstitiel-modal .abtasty-modal__area .abtasty-modal__content{text-align:center;padding:20px;font-family:Lato!important;color:#000}.abtasty-interstitiel-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__title{font-weight:500;line-height:1.1;margin-bottom:10px;margin-top:30px;font-family:Lato!important;color:#c49641;text-shadow:0 2px 4px rgba(0,0,0,.5);font-size:48px;font-weight:700}.abtasty-interstitiel-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__image{cursor:pointer}.abtasty-interstitiel-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__text{margin:0 0 40px!important;font-weight:300;font-size:30px;line-height:30px;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.5)}.abtasty-interstitiel-modal .abtasty-modal__area .abtasty-modal__content .abtasty-modal__cta{margin:0 0 10px!important;font-size:25px;font-weight:300;min-width:100px;height:80px;padding:20px}",void 0);var e=function(t){var e=Object.prototype.hasOwnProperty;function a(t,i){return Array.isArray(t)?function(t,e){for(var i,o="",r="",d=Array.isArray(e),l=0;l<t.length;l++)(i=a(t[l]))&&(d&&e[l]&&(i=n(i)),o=o+r+i,r=" ");return o}(t,i):t&&"object"==typeof t?function(t){var a="",i="";for(var o in t)o&&t[o]&&e.call(t,o)&&(a=a+i+o,i=" ");return a}(t):t||""}function i(t){if(!t)return"";if("object"==typeof t){var a="";for(var i in t)e.call(t,i)&&(a=a+i+":"+t[i]+";");return a}return";"!==(t+="")[t.length-1]?t+";":t}function o(t,e,a,i){return!1!==e&&null!=e&&(e||"class"!==t&&"style"!==t)?!0===e?" "+(i?t:t+'="'+t+'"'):("function"==typeof e.toJSON&&(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),a||-1===e.indexOf('"'))?(a&&(e=n(e))," "+t+'="'+e+'"'):" "+t+"='"+e.replace(/'/g,"&#39;")+"'"):""}t.merge=function t(e,a){if(1===arguments.length){for(var o=e[0],r=1;r<e.length;r++)o=t(o,e[r]);return o}for(var n in a)if("class"===n){var d=e[n]||[];e[n]=(Array.isArray(d)?d:[d]).concat(a[n]||[])}else if("style"===n){var d=i(e[n]),l=i(a[n]);e[n]=d+l}else e[n]=a[n];return e},t.classes=a,t.style=i,t.attr=o,t.attrs=function(t,r){var n="";for(var d in t)if(e.call(t,d)){var l=t[d];if("class"===d){l=a(l),n=o(d,l,!1,r)+n;continue}"style"===d&&(l=i(l)),n+=o(d,l,!1,r)}return n};var r=/["&<>]/;function n(t){var e=""+t,a=r.exec(e);if(!a)return t;var i,o,n,d="";for(i=a.index,o=0;i<e.length;i++){switch(e.charCodeAt(i)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}o!==i&&(d+=e.substring(o,i)),o=i+1,d+=n}return o!==i?d+e.substring(o,i):d}return t.escape=n,t.rethrow=function t(e,a,i,o){if(!(e instanceof Error))throw e;if(!("undefined"==typeof window&&a||o))throw e.message+=" on line "+i,e;try{o=o||require("fs").readFileSync(a,"utf8")}catch(a){t(e,null,i)}var r=3,n=o.split("\n"),d=Math.max(i-r,0),l=Math.min(n.length,i+r);var r=n.slice(d,l).map(function(t,e){var a=e+d+1;return(a==i?" > ":" ")+a+"| "+t}).join("\n");e.path=a;e.message=(a||"Pug")+":"+i+"\n"+r+"\n\n"+e.message;throw e},t}({}),a=function(t){var a,i="",o={};try{var r={},n=t||{};(function(t,r,n,d,l,s,c,m,u,y,f,v,b,p,_,h,g,x){o.image=a=function(){i+='<div class="abtasty-modal__image">',i="fullscreenMedia"===c&&n?(i=i+"<a"+e.attr("href",v,!0,!0)+' target="_blank">')+"<div"+e.attr("style",e.style({"background-image":"url("+s+")"}),!0,!0)+"></div></a>":"fullscreenMedia"===c?i+"<div"+e.attr("style",e.style({"background-image":"url("+s+")"}),!0,!0)+"></div>":"centeredMedia"===c&&n?(i=i+"<a"+e.attr("href",v,!0,!0)+' target="_blank">')+"<img"+(e.attr("src",s,!0,!0)+e.attr("style",e.style({"border-radius":u+"px",border:y+"px solid "+m}),!0,!0))+"></a>":i+"<img"+(e.attr("src",s,!0,!0)+e.attr("style",e.style({"border-radius":u+"px",border:y+"px solid "+m}),!0,!0))+">",i+="</div>"},o.video=a=function(){var t="fullscreenMedia"===c?"":{"border-radius":u+"px",border:y+"px solid "+m};i=(i+='<div class="abtasty-modal__video">')+"<iframe"+(e.attr("id",g,!0,!0)+e.attr("src",x,!0,!0))+" allowfullscreen"+e.attr("style",e.style(t),!0,!0)+"></iframe></div>"},i=(i+='<div class="abtasty-modal__underlay"></div>')+"<div"+e.attr("class",e.classes(["abtasty-modal__area","abtasty-modal__"+c],[!1,!0]),!1,!0)+">",i+='<div class="abtasty-modal__close">',i+=" ",i+='<svg viewbox="0 0 40 40">',i+='<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30"></path></svg></div>',i+='<div class="abtasty-modal__content">',"textOnly"!=c&&(i+='<div class="abtasty-modal__media">',"image"===f&&o.image(),"video"===f&&"textOnly"!==c&&o.video(),i+="</div>"),"textOnly"!=c&&"mediaAndText"!=c||(i=(i=(i=(i=i+'<h2 class="abtasty-modal__title"'+e.attr("style",e.style({color:h}),!0,!0)+">")+e.escape(null==(a=_)?"":a)+"</h2>")+'<p class="abtasty-modal__text"'+e.attr("style",e.style({color:p}),!0,!0)+">")+e.escape(null==(a=b)?"":a)+"</p>",n&&(i=(i=i+'<a class="abtasty-modal__cta"'+e.attr("href",v,!0,!0)+' target="_blank"'+e.attr("style",e.style({"border-radius":r+"px",color:l,"background-color":t}),!0,!0)+">")+(null==(a=d)?"":a)+"</a>")),i+="</div></div>"}).call(this,"ctaBackgroundColor"in n?n.ctaBackgroundColor:"undefined"!=typeof ctaBackgroundColor?ctaBackgroundColor:void 0,"ctaBorderRadius"in n?n.ctaBorderRadius:"undefined"!=typeof ctaBorderRadius?ctaBorderRadius:void 0,"ctaEnabled"in n?n.ctaEnabled:"undefined"!=typeof ctaEnabled?ctaEnabled:void 0,"ctaLabel"in n?n.ctaLabel:"undefined"!=typeof ctaLabel?ctaLabel:void 0,"ctaTextColor"in n?n.ctaTextColor:"undefined"!=typeof ctaTextColor?ctaTextColor:void 0,"image"in n?n.image:"undefined"!=typeof image?image:void 0,"layout"in n?n.layout:"undefined"!=typeof layout?layout:void 0,"mediaBorderColor"in n?n.mediaBorderColor:"undefined"!=typeof mediaBorderColor?mediaBorderColor:void 0,"mediaBorderRadius"in n?n.mediaBorderRadius:"undefined"!=typeof mediaBorderRadius?mediaBorderRadius:void 0,"mediaBorderThickness"in n?n.mediaBorderThickness:"undefined"!=typeof mediaBorderThickness?mediaBorderThickness:void 0,"mediaType"in n?n.mediaType:"undefined"!=typeof mediaType?mediaType:void 0,"redirectionUrl"in n?n.redirectionUrl:"undefined"!=typeof redirectionUrl?redirectionUrl:void 0,"text"in n?n.text:"undefined"!=typeof text?text:void 0,"textTextColor"in n?n.textTextColor:"undefined"!=typeof textTextColor?textTextColor:void 0,"title"in n?n.title:"undefined"!=typeof title?title:void 0,"titleTextColor"in n?n.titleTextColor:"undefined"!=typeof titleTextColor?titleTextColor:void 0,"videoID"in n?n.videoID:"undefined"!=typeof videoID?videoID:void 0,"videoUrl"in n?n.videoUrl:"undefined"!=typeof videoUrl?videoUrl:void 0)}catch(t){e.rethrow(t,void 0,void 0,r[void 0])}return i},i="AB Tasty Advertising modal "+TEST_ID,o=void 0!==window.ABTastyEditor,r=!!sessionStorage.getItem("ABTastyPreview"),n=Date.now();function d(t){var e=t.layout,a=void 0,i=void 0,o=window.innerWidth<window.innerHeight;if("fullscreenMedia"===e)!o?a=(i=window.innerHeight)/9*16:i=(a=window.innerWidth)/16*9;else{i=(a=window.innerWidth>=600?560:window.innerWidth-40)/16*9}return{height:Math.round(i),width:Math.round(a)}}var l,s,c,m=function(){var e="abtasty-widget-video-"+Date.now(),i=document.createElement("abtasty-interstitiel-modal"),o=function(){return i.querySelector(".abtasty-modal__underlay")},r=function(){return i.querySelector(".abtasty-modal__close")},n=function(){return i.querySelector("#"+e)};function l(e){var a=e.mediaType;i.style.display="none","video"===a&&(i.innerHTML=""),t&&(document.querySelector("body").style.overflowY=t)}function s(t){o().addEventListener("click",function(){return l(t)}),r().addEventListener("click",function(){return l(t)})}return{hide:l,show:function(t){i.style.display="block",s(t)},append:function(t){i.className="abtasty-interstitiel-modal",i.dataset.testId=TEST_ID;var o=Object.assign(t,{videoID:e,videoUrl:(r=t.video,s=t.autoPlay,c=r.indexOf("youtu")>-1,m=r.indexOf("vimeo")>-1,u=void 0,c?(u="//www.youtube.com/embed/"+r.match(/^.*(youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/)[2]+"?rel=0",s&&(u+="&autoplay=1")):m&&(u="//player.vimeo.com/video/"+r.match(/.*(www\.)?vimeo.com\/(\d+)($|\/)/)[2]),u)});var r,s,c,m,u;if(i.innerHTML=a(o),document.body.appendChild(i),n()){var y=d(t),f=y.width,v=y.height;n().style.width=f+"px",n().style.height=v+"px",n().frameBorder=0,window.addEventListener("resize",function(){var e=d(t);n().style.width=e.width+"px",n().style.height=e.height+"px"})}0!==t.timer&&setTimeout(function(){return l(t)},1e3*t.timer)},handleClose:s}}();function u(e,a){var d,l,s,c;l=e.recurrence,s=Number(l),(!(c=localStorage.getItem(i))||-1===s||o||r||(0===s?!sessionStorage.getItem(i):c<n-24*s*60*60*1e3))&&(m.append(e),m.show(e),e.actionTrackingEvent&&ABTastyEvent(e.actionTrackingName,null,a),d=document.querySelector("body"),t=window.getComputedStyle(d).overflowY,d.style.overflowY="hidden",o||(localStorage.setItem(i,n),sessionStorage.setItem(i,n)))}"exitIntent"===DATA.triggerEvent?(l=function(){return u(DATA,TEST_ID)},c=0,document.addEventListener("mousemove",function(t){c=t.clientY}),document.body.addEventListener("mouseleave",function t(e){e.clientY<=50&&(c=0,clearInterval(s),s=setTimeout(function(){0===c&&(l(),document.removeEventListener("mouseleave",t))},0))},!1)):u(DATA,TEST_ID)}();
{
"name": "@abtasty/interstitiel",
"description": "A simple widget",
"version": "2.0.6-1",
"version": "2.0.6-2",
"main": "dist/main.js",

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc