var File=function(i,l)
{
File.list=Array.isArray(File.list)?File.list:[],File.progress=File.progress||0,this.progress=0,this.object=l,this.url=i
};
File.indexOf=function(i)
{
for(var l in File.list)
{
var e=File.list[l];
if(e.equals(i)||e.url===i||e.object===i)return l
}
return-1
}
,File.find=function(i)
{
var l=File.indexOf(i);
return~l&&File.list[l]
}
,File.prototype.equals=function(i)
{
return i instanceof File&&this.url===i.url&&this.object===i.object
}
,File.prototype.save=function(i)
{
if(i=void 0===i||i,Array.isArray(File.list))
{
var l=File.indexOf(this);
~l&&i?(File.list[l]=this,console.warn("File `%s` has been loaded before and updated now for: %O.",this.url,this)):File.list.push(this),console.log(File.list)
}
else File.list=[this];
return this
};
"Linux x86_64"==navigator.platform&&(YETT_BLACKLIST=[/klaviyo/,/orange/,/stamped/,/extensions/,/apps/,/boomerang/,/storefront/,/browser/,/modern/,/appsolve/,/google/,/ordersales/,/facebook/,/socialshopwave/,/vitals/],function(t,e)
{
"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.yett=
{
}
)
}
(this,function(t)
{
"use strict";
var e=
{
blacklist:window.YETT_BLACKLIST,whitelist:window.YETT_WHITELIST
}
,r=
{
blacklisted:[]
}
,i=function(t,r)
{
return t&&(!r||"javascript/blocked"!==r)&&(!e.blacklist||e.blacklist.some(function(e)
{
return e.test(t)
}
))&&(!e.whitelist||e.whitelist.every(function(e)
{
return!e.test(t)
}
))
}
,n=function(t)
{
var r=t.getAttribute("src");
return e.blacklist&&e.blacklist.every(function(t)
{
return!t.test(r)
}
)||e.whitelist&&e.whitelist.some(function(t)
{
return t.test(r)
}
)
}
,c=new MutationObserver(function(t)
{
t.forEach(function(t)
{
for(var e=t.addedNodes,n=0;
n<e.length;
n++)!function(t)
{
var n,c=e[t];
if(1===c.nodeType&&"SCRIPT"===c.tagName)
{
i(c.src,c.type)&&(r.blacklisted.push(c.cloneNode()),c.type="javascript/blocked",c.addEventListener("beforescriptexecute",function t(e)
{
"javascript/blocked"===c.getAttribute("type")&&e.preventDefault(),c.removeEventListener("beforescriptexecute",t)
}
),c.parentElement.removeChild(c))
}
}
(n)
}
)
}
);
c.observe(document.documentElement,
{
childList:!0,subtree:!0
}
);
var l=document.createElement;
document.createElement=function()
{
for(var t=arguments.length,e=Array(t),r=0;
r<t;
r++)e[r]=arguments[r];
if("script"!==e[0].toLowerCase())return l.bind(document).apply(void 0,e);
var n=l.bind(document).apply(void 0,e),c=n.setAttribute.bind(n);
return Object.defineProperties(n,
{
src:
{
get:function()
{
return n.getAttribute("src")
}
,set:function(t)
{
return i(t,n.type)&&c("type","javascript/blocked"),c("src",t),!0
}
}
,type:
{
set:function(t)
{
return c("type",i(n.src,n.type)?"javascript/blocked":t),!0
}
}
}
),n.setAttribute=function(t,e)
{
"type"===t||"src"===t?n[t]=e:HTMLScriptElement.prototype.setAttribute.call(n,t,e)
}
,n
};
var s=function(t)
{
if(Array.isArray(t))
{
for(var e=0,r=Array(t.length);
e<t.length;
e++)r[e]=t[e];
return r
}
return Array.from(t)
}
,o=RegExp("[|\\
{
}
()[\\]^$+?.]","g");
t.unblock=function()
{
for(var t=arguments.length,i=Array(t),l=0;
l<t;
l++)i[l]=arguments[l];
i.length<1?(e.blacklist=[],e.whitelist=[]):(e.blacklist&&(e.blacklist=e.blacklist.filter(function(t)
{
return i.every(function(e)
{
return!t.test(e)
}
)
}
)),e.whitelist&&(e.whitelist=[].concat(s(e.whitelist),s(i.map(function(t)
{
var r=+t.replace(o,"\\$&")+".*";
return e.whitelist.find(function(t)
{
return t.toString()===r.toString()
}
)?null:RegExp(r)
}
).filter(Boolean)))));
for(var a=document.querySelectorAll('script[type="javascript/blocked"]'),u=0;
u<a.length;
u++)
{
var p=a[u];
n(p)&&(p.type="application/javascript",r.blacklisted.push(p),p.parentElement.removeChild(p))
}
var f=0;
[].concat(s(r.blacklisted)).forEach(function(t,e)
{
if(n(t))
{
var i=document.createElement("script");
i.setAttribute("src",t.src),i.setAttribute("type","application/javascript"),document.head.appendChild(i),r.blacklisted.splice(e-f,1),f++
}
}
),e.blacklist&&e.blacklist.length<1&&c.disconnect()
}
,Object.defineProperty(t,"__esModule",
{
value:!0
}
)
}
));
© 2023 Quttera Ltd. All rights reserved.