vendor: 2,526 bytes, line 1
1(()=>{var sn=Object.create;var zt=Object.defineProperty;var on=Object.getOwnPropertyDescriptor;var an=Object.getOwnPropertyNames;var ln=Object.getPrototypeOf,cn=Object.prototype.hasOwnProperty;var un=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var dn=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of an(e))!cn.call(r,n)&&n!==t&&zt(r,n,{get:()=>e[n],enumerable:!(i=on(e,n))||i.enumerable});return r};var pn=(r,e,t)=>(t=r!=null?sn(ln(r)):{},dn(e||!r||!r.__esModule?zt(t,"default",{value:r,enumerable:!0}):t,r));var Vi=un((Te,me)=>{var Ns=200,Si="__lodash_hash_undefined__",js=800,Hs=16,Ei=9007199254740991,ki="[object Arguments]",Vs="[object Array]",qs="[object AsyncFunction]",Ws="[object Boolean]",Gs="[object Date]",zs="[object Error]",Ci="[object Function]",Ys="[object GeneratorFunction]",Ks="[object Map]",Js="[object Number]",Qs="[object Null]",xi="[object Object]",Zs="[object Proxy]",Xs="[object RegExp]",eo="[object Set]",to="[object String]",ro="[object Undefined]",io="[object WeakMap]",no="[object ArrayBuffer]",so="[object DataView]",oo="[object Float32Array]",ao="[object Float64Array]",lo="[object Int8Array]",co="[object Int16Array]",uo="[object Int32Array]",po="[object Uint8Array]",fo="[object Uint8ClampedArray]",mo="[object Uint16Array]",ho="[object Uint32Array]",go=/[\\^$.*+?()[\]{}|]/g,bo=/^\[object .+?Constructor\]$/,yo=/^(?:0|[1-9]\d*)$/,E={};E[oo]=E[ao]=E[lo]=E[co]=E[uo]=E[po]=E[fo]=E[mo]=E[ho]=!0;E[ki]=E[Vs]=E[no]=E[Ws]=E[so]=E[Gs]=E[zs]=E[Ci]=E[Ks]=E[Js]=E[xi]=E[Xs]=E[eo]=E[to]=E[io]=!1;var Pi=typeof global=="object"&&global&&global.Object===Object&&global,_o=typeof self=="object"&&self&&self.Object===Object&&self,Me=Pi||_o||Function("return this")(),Ii=typeof Te=="object"&&Te&&!Te.nodeType&&Te,Oe=Ii&&typeof me=="object"&&me&&!me.nodeType&&me,Li=Oe&&Oe.exports===Ii,At=Li&&Pi.process,fi=function(){try{var r=Oe&&Oe.require&&Oe.require("util").types;return r||At&&At.binding&&At.binding("util")}catch{}}(),mi=fi&&fi.isTypedArray;function Ai(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function vo(r,e){for(var t=-1,i=Array(r);++t<r;)i[t]=e(t);return i}function wo(r){return function(e){return r(e)}}function So(r,e){return r?.[e]}function Eo(r,e){return function(t){return r(e(t))}}var ko=Array.prototype,Co=Function.prototype,ot=Object.prototype,Tt=Me["__core-js_shared__"],at=Co.toString,Z=ot.hasOwnProperty,hi=function(){var r=
vendor: 6,405 bytes, line 1
1/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Ti=ot.toString,xo=at.call(Object),Po=RegExp("^"+at.call(Z).replace(go,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nt=Li?Me.Buffer:void 0,gi=Me.Symbol,bi=Me.Uint8Array,yi=nt?nt.allocUnsafe:void 0,Oi=Eo(Object.getPrototypeOf,Object),_i=Object.create,Io=ot.propertyIsEnumerable,Lo=ko.splice,oe=gi?gi.toStringTag:void 0,st=function(){try{var r=Ft(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Ao=nt?nt.isBuffer:void 0,vi=Math.max,To=Date.now,Ri=Ft(Me,"Map"),Re=Ft(Object,"create"),Oo=function(){function r(){}return function(e){if(!Q(e))return{};if(_i)return _i(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();function ae(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}function Ro(){this.__data__=Re?Re(null):{},this.size=0}function Mo(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}function $o(r){var e=this.__data__;if(Re){var t=e[r];return t===Si?void 0:t}return Z.call(e,r)?e[r]:void 0}function Uo(r){var e=this.__data__;return Re?e[r]!==void 0:Z.call(e,r)}function Do(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Re&&e===void 0?Si:e,this}ae.prototype.clear=Ro;ae.prototype.delete=Mo;ae.prototype.get=$o;ae.prototype.has=Uo;ae.prototype.set=Do;function X(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}function Fo(){this.__data__=[],this.size=0}function Bo(r){var e=this.__data__,t=lt(e,r);if(t<0)return!1;var i=e.length-1;return t==i?e.pop():Lo.call(e,t,1),--this.size,!0}function No(r){var e=this.__data__,t=lt(e,r);return t<0?void 0:e[t][1]}function jo(r){return lt(this.__data__,r)>-1}function Ho(r,e){var t=this.__data__,i=lt(t,r);return i<0?(++this.size,t.push([r,e])):t[i][1]=e,this}X.prototype.clear=Fo;X.prototype.delete=Bo;X.prototype.get=No;X.prototype.has=jo;X.prototype.set=Ho;function he(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var i=r[e];this.set(i[0],i[1])}}function Vo(){this.size=0,this.__data__={hash:new ae,map:new(Ri||X),string:new ae}}function qo(r){var e=ut(this,r).delete(r);return this.size-=e?1:0,e}function Wo(r){return ut(this,r).get(r)}function Go(r){return ut(this,r).has(r)}function zo(r,e){var t=ut(this,r),i=t.size;return t.set(r,e),this.size+=t.size==i?0:1,this}he.prototype.clear=Vo;he.prototype.delete=qo;he.prototype.get=Wo;he.prototype.has=Go;he.prototype.set=zo;function ge(r){var e=this.__data__=new X(r);this.size=e.size}function Yo(){this.__data__=new X,this.size=0}function Ko(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}function Jo(r){return this.__data__.get(r)}function Qo(r){return this.__data__.has(r)}function Zo(r,e){var t=this.__data__;if(t instanceof X){var i=t.__data__;if(!Ri||i.length<Ns-1)return i.push([r,e]),this.size=++t.size,this;t=this.__data__=new he(i)}return t.set(r,e),this.size=t.size,this}ge.prototype.clear=Yo;ge.prototype.delete=Ko;ge.prototype.get=Jo;ge.prototype.has=Qo;ge.prototype.set=Zo;function Xo(r,e){var t=$t(r),i=!t&&Mt(r),n=!t&&!i&&Fi(r),o=!t&&!i&&!n&&Ni(r),s=t||i||n||o,a=s?vo(r.length,String):[],l=a.length;for(var c in r)(e||Z.call(r,c))&&!(s&&(c=="length"||n&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ui(c,l)))&&a.push(c);return a}function Ot(r,e,t){(t!==void 0&&!dt(r[e],t)||t===void 0&&!(e in r))&&Ut(r,e,t)}function ea(r,e,t){var i=r[e];(!(Z.call(r,e)&&dt(i,t))||t===void 0&&!(e in r))&&Ut(r,e,t)}function lt(r,e){for(var t=r.length;t--;)if(dt(r[t][0],e))return t;return-1}function Ut(r,e,t){e=="__proto__"&&st?st(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var ta=fa();function ct(r){return r==null?r===void 0?ro:Qs:oe&&oe in Object(r)?ma(r):va(r)}function wi(r){return $e(r)&&ct(r)==ki}function ra(r){if(!Q(r)||ya(r))return!1;var e=Nt(r)?Po:bo;return e.test(ka(r))}function ia(r){return $e(r)&&Bi(r.length)&&!!E[ct(r)]}function na(r){if(!Q(r))return _a(r);var e=Di(r),t=[];for(var i in r)i=="constructor"&&(e||!Z.call(r,i))||t.push(i);return t}function Dt(r,e,t,i,n){r!==e&&ta(e,function(o,s){if(n||(n=new ge),Q(o))sa(r,e,s,t,Dt,i,n);else{var a=i?i(Rt(r,s),o,s+"",r,e,n):void 0;a===void 0&&(a=o),Ot(r,s,a)}},ji)}function sa(r,e,t,i,n,o,s){var a=Rt(r,t),l=Rt(e,t),c=s.get(l);if(c){Ot(r,t,c);return}var u=o?o(a,l,t+"",r,e,s):void 0,p=u===void 0;if(p){var m=$t(l),h=!m&&Fi(l),g=!m&&!h&&Ni(l);u=l,m||h||g?$t(a)?u=a:Ca(a)?u=ua(a):h?(p=!1,u=aa(l,!0)):g?(p=!1,u=ca(l,!0)):u=[]:xa(l)||Mt(l)?(u=a,Mt(a)?u=Pa(a):(!Q(a)||Nt(a))&&(u=ha(l))):p=!1}p&&(s.set(l,u),n(u,l,i,o,s),s.delete(l)),Ot(r,t,u)}function Mi(r,e){return Sa(wa(r,e,Hi),r+"")}var oa=st?function(r,e){return st(r,"toString",{configurable:!0,enumerable:!1,value:Aa(e),writable:!0})}:Hi;function aa(r,e){if(e)return r.slice();var t=r.length,i=yi?yi(t):new r.constructor(t);return r.copy(i),i}function la(r){var e=new r.constructor(r.byteLength);return new bi(e).set(new bi(r)),e}function ca(r,e){var t=e?la(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}function ua(r,e){var t=-1,i=r.length;for(e||(e=Array(i));++t<i;)e[t]=r[t];return e}function da(r,e,t,i){var n=!t;t||(t={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=i?i(t[a],r[a],a,t,r):void 0;l===void 0&&(l=r[a]),n?Ut(t,a,l):ea(t,a,l)}return t}function pa(r){return Mi(function(e,t){var i=-1,n=t.length,o=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(o=r.length>3&&typeof o=="function"?(n--,o):void 0,s&&ga(t[0],t[1],s)&&(o=n<3?void 0:o,n=1),e=Object(e);++i<n;){var a=t[i];a&&r(e,a,i,o)}return e})}function fa(r){return function(e,t,i){for(var n=-1,o=Object(e),s=i(e),a=s.length;a--;){var l=s[r?a:++n];if(t(o[l],l,o)===!1)break}return e}}function $i(r,e,t,i,n,o){return Q(r)&&Q(e)&&(o.set(e,r),Dt(r,e,void 0,$i,o),o.delete(e)),r}function ut(r,e){var t=r.__data__;return ba(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Ft(r,e){var t=So(r,e);return ra(t)?t:void 0}function ma(r){var e=Z.call(r,oe),t=r[oe];try{r[oe]=void 0;var i=!0}catch{}var n=Ti.call(r);return i&&(e?r[oe]=t:delete r[oe]),n}function ha(r){return typeof r.constructor=="function"&&!Di(r)?Oo(Oi(r)):{}}function Ui(r,e){var t=typeof r;return e=e??Ei,!!e&&(t=="number"||t!="symbol"&&yo.test(r))&&r>-1&&r%1==0&&r<e}function ga(r,e,t){if(!Q(t))return!1;var i=typeof e;return(i=="number"?Bt(t)&&Ui(e,t.length):i=="string"&&e in t)?dt(t[e],r):!1}
1function ba(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function ya(r){return!!hi&&hi in r}function Di(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||ot;return r===t}function _a(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}function va(r){return Ti.call(r)}function wa(r,e,t){return e=vi(e===void 0?r.length-1:e,0),function(){for(var i=arguments,n=-1,o=vi(i.length-e,0),s=Array(o);++n<o;)s[n]=i[e+n];n=-1;for(var a=Array(e+1);++n<e;)a[n]=i[n];return a[e]=t(s),Ai(r,this,a)}}function Rt(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}var Sa=Ea(oa);function Ea(r){var e=0,t=0;return function(){var i=To(),n=Hs-(i-t);if(t=i,n>0){if(++e>=js)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function ka(r){if(r!=null){try{return at.call(r)}catch{}try{return r+""}catch{}}return""}function dt(r,e){return r===e||r!==r&&e!==e}var Mt=wi(function(){return arguments}())?wi:function(r){return $e(r)&&Z.call(r,"callee")&&!Io.call(r,"callee")},$t=Array.isArray;function Bt(r){return r!=null&&Bi(r.length)&&!Nt(r)}function Ca(r){return $e(r)&&Bt(r)}var Fi=Ao||Ta;function Nt(r){if(!Q(r))return!1;var e=ct(r);return e==Ci||e==Ys||e==qs||e==Zs}function Bi(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Ei}function Q(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function $e(r){return r!=null&&typeof r=="object"}function xa(r){if(!$e(r)||ct(r)!=xi)return!1;var e=Oi(r);if(e===null)return!0;var t=Z.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&at.call(t)==xo}var Ni=mi?wo(mi):ia;function Pa(r){return da(r,ji(r))}var Ia=Mi(function(r){return r.push(void 0,$i),Ai(La,void 0,r)});function ji(r){return Bt(r)?Xo(r,!0):na(r)}var La=pa(function(r,e,t,i){Dt(r,e,t,i)});function Aa(r){return function(){return r}}function Hi(r){return r}function Ta(){return!1}me.exports=Ia});var Fe=(r,e,t="default")=>{let i=document.createElement("li");if(i.classList.add("sl-popup-item"),i.setAttribute("data-type",t),t!="default"){let l=document.createElement("div");l.classList.add("sl-popup-icon"),l.classList.add(`sl-popup-${t}-icon`),i.appendChild(l)}let n=document.createElement("div");n.classList.add("sl-popup-close"),i.appendChild(n),n.addEventListener("click",()=>i.remove());let o=document.createElement("div");o.classList.add("sl-popup-text-container");let s=document.createElement("h3");s.innerText=r,o.appendChild(s);let a=document.createElement("p");if(a.innerHTML=e,o.appendChild(a),i.appendChild(o),document.getElementById("sl-popup-container"))document.getElementById("sl-popup-container").appendChild(i);else{let l=document.createElement("ul");l.id="sl-popup-container",l.appendChild(i),document.getElementsByTagName("body")[0].appendChild(l)}},be=(r,e)=>{Fe(r,e,"success")},ye=(r,e)=>{Fe(r,e,"warning")},mt=(r,e)=>{Fe(r,e,"error")},q=(r,e)=>{Fe(r,e)};function Ne(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)r[i]=t[i]}return r}var fn={read:function(r){return r[0]==='"'&&(r=r.slice(1,-1)),r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(r){return encodeURIComponent(r).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ht(r,e){function t(n,o,s){if(!(typeof document>"u")){s=Ne({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in s)!s[l]||(a+="; "+l,s[l]!==!0&&(a+="="+s[l].split(";")[0]));return document.cookie=n+"="+r.write(o,n)+a}}function i(n){if(!(typeof document>"u"||arguments.length&&!n)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var l=o[a].split("="),c=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(s[u]=r.read(c,u),n===u)break}catch{}}return n?s[n]:s}}return Object.create({set:t,get:i,remove:function(n,o){t(n,"",Ne({},o,{expires:-1}))},withAttributes:function(n){return ht(this.converter,Ne({},this.attributes,n))},withConverter:function(n){return ht(Ne({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(r)}})}var mn=ht(fn,{path:"/"}),U=mn;var rr="thumbmark",ir="https://api.thumbmarkjs.com",qe={exclude:[],include:[],stabilize:["private","iframe"],logging:!0,timeout:5e3,cache_api_call:!0,cache_lifetime_in_ms:0,performance:!1,experimental:!1,property_name_factory:r=>`${rr}_${r}`},Fa={...qe};var hn={private:[{exclude:["canvas"],browsers:["firefox","safari>=17","brave"]},{exclude:["audio"],browsers:["samsungbrowser","safari"]},{exclude:["fonts"],browsers:["firefox"]},{exclude:["audio.sampleHash","hardware.deviceMemory","header.acceptLanguage.q","system.hardwareConcurrency","plugins"],browsers:["brave"]},{exclude:["tls.extensions"],browsers:["firefox","chrome","safari"]},{exclude:["header.acceptLanguage"],browsers:["edge","chrome"]}
1],iframe:[{exclude:["system.applePayVersion","system.cookieEnabled"],browsers:["safari"]},{exclude:["permissions"]}],vpn:[{exclude:["ip"]}]};function gn(r){let e=0;for(let t=0;t<r.length;++t)e+=Math.abs(r[t]);return e}function Yt(r,e,t){let i=[];for(let o=0;o<r[0].data.length;o++){let s=[];for(let a=0;a<r.length;a++)s.push(r[a].data[o]);i.push(bn(s))}let n=new Uint8ClampedArray(i);return new ImageData(n,e,t)}function bn(r){if(r.length===0)return 0;let e={};for(let i of r)e[i]=(e[i]||0)+1;let t=r[0];for(let i in e)e[i]>e[t]&&(t=parseInt(i,10));return t}function je(r){return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),(r^=r>>>16)>>>0}var P=new Uint32Array([597399067,2869860233,951274213,2716044179]);function D(r,e){return r<<e|r>>>32-e}function F(r,e=0){var t;if(e=e?0|e:0,typeof r=="string"&&(t=r,r=new TextEncoder().encode(t).buffer),!(r instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");let i=new Uint32Array([e,e,e,e]);(function(o,s){let a=o.byteLength/16|0,l=new Uint32Array(o,0,4*a);for(let c=0;c<a;c++){let u=l.subarray(4*c,4*(c+1));u[0]=Math.imul(u[0],P[0]),u[0]=D(u[0],15),u[0]=Math.imul(u[0],P[1]),s[0]=s[0]^u[0],s[0]=D(s[0],19),s[0]=s[0]+s[1],s[0]=Math.imul(s[0],5)+1444728091,u[1]=Math.imul(u[1],P[1]),u[1]=D(u[1],16),u[1]=Math.imul(u[1],P[2]),s[1]=s[1]^u[1],s[1]=D(s[1],17),s[1]=s[1]+s[2],s[1]=Math.imul(s[1],5)+197830471,u[2]=Math.imul(u[2],P[2]),u[2]=D(u[2],17),u[2]=Math.imul(u[2],P[3]),s[2]=s[2]^u[2],s[2]=D(s[2],15),s[2]=s[2]+s[3],s[2]=Math.imul(s[2],5)+2530024501,u[3]=Math.imul(u[3],P[3]),u[3]=D(u[3],18),u[3]=Math.imul(u[3],P[0]),s[3]=s[3]^u[3],s[3]=D(s[3],13),s[3]=s[3]+s[0],s[3]=Math.imul(s[3],5)+850148119}})(r,i),function(o,s){let a=o.byteLength/16|0,l=o.byteLength%16,c=new Uint32Array(4),u=new Uint8Array(o,16*a,l);switch(l){case 15:c[3]=c[3]^u[14]<<16;case 14:c[3]=c[3]^u[13]<<8;case 13:c[3]=c[3]^u[12],c[3]=Math.imul(c[3],P[3]),c[3]=D(c[3],18),c[3]=Math.imul(c[3],P[0]),s[3]=s[3]^c[3];case 12:c[2]=c[2]^u[11]<<24;case 11:c[2]=c[2]^u[10]<<16;case 10:c[2]=c[2]^u[9]<<8;case 9:c[2]=c[2]^u[8],c[2]=Math.imul(c[2],P[2]),c[2]=D(c[2],17),c[2]=Math.imul(c[2],P[3]),s[2]=s[2]^c[2];case 8:c[1]=c[1]^u[7]<<24;case 7:c[1]=c[1]^u[6]<<16;case 6:c[1]=c[1]^u[5]<<8;
1case 5:c[1]=c[1]^u[4],c[1]=Math.imul(c[1],P[1]),c[1]=D(c[1],16),c[1]=Math.imul(c[1],P[2]),s[1]=s[1]^c[1];case 4:c[0]=c[0]^u[3]<<24;case 3:c[0]=c[0]^u[2]<<16;case 2:c[0]=c[0]^u[1]<<8;case 1:c[0]=c[0]^u[0],c[0]=Math.imul(c[0],P[0]),c[0]=D(c[0],15),c[0]=Math.imul(c[0],P[1]),s[0]=s[0]^c[0]}}(r,i),function(o,s){s[0]=s[0]^o.byteLength,s[1]=s[1]^o.byteLength,s[2]=s[2]^o.byteLength,s[3]=s[3]^o.byteLength,s[0]=s[0]+s[1]|0,s[0]=s[0]+s[2]|0,s[0]=s[0]+s[3]|0,s[1]=s[1]+s[0]|0,s[2]=s[2]+s[0]|0,s[3]=s[3]+s[0]|0,s[0]=je(s[0]),s[1]=je(s[1]),s[2]=je(s[2]),s[3]=je(s[3]),s[0]=s[0]+s[1]|0,s[0]=s[0]+s[2]|0,s[0]=s[0]+s[3]|0,s[1]=s[1]+s[0]|0,s[2]=s[2]+s[0]|0,s[3]=s[3]+s[0]|0}(r,i);let n=new Uint8Array(i.buffer);return Array.from(n).map(o=>o.toString(16).padStart(2,"0")).join("")}var Kt=280;async function nr(r){for(var e;!document.body;)await yn(50);let t=document.createElement("iframe");t.setAttribute("frameBorder","0");let i=t.style;i.setProperty("position","fixed"),i.setProperty("display","block","important"),i.setProperty("visibility","visible"),i.setProperty("border","0"),i.setProperty("opacity","0"),t.src="about:blank",document.body.appendChild(t);let n=t.contentDocument||((e=t.contentWindow)===null||e===void 0?void 0:e.document);if(!n)throw new Error("Iframe document is not accessible");r({iframe:n}),setTimeout(()=>{document.body.removeChild(t)},0)}function yn(r,e){return new Promise(t=>setTimeout(t,r,e))}var _n=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],vn=["monospace","sans-serif","serif"];function Jt(r,e){if(!r)throw new Error("Canvas context not supported");return r.font=`72px ${e}`,r.measureText("WwMmLli0Oo").width}function wn(){var r;let e=document.createElement("canvas"),t=(r=e.getContext("webgl"))!==null&&r!==void 0?r:e.getContext("experimental-webgl");if(t&&"getParameter"in t)try{let i=(t.getParameter(t.VENDOR)||"").toString(),n=(t.getParameter(t.RENDERER)||"").toString(),o={vendor:i,renderer:n,version:(t.getParameter(t.VERSION)||"").toString(),shadingLanguageVersion:(t.getParameter(t.SHADING_LANGUAGE_VERSION)||"").toString()};if(!n.length||!i.length){let s=t.getExtension("WEBGL_debug_renderer_info");if(s){let a=(t.getParameter(s.UNMASKED_VENDOR_WEBGL)||"").toString(),l=(t.getParameter(s.UNMASKED_RENDERER_WEBGL)||"").toString();a&&(o.vendorUnmasked=a),l&&(o.rendererUnmasked=l)}}return o}catch{}return"undefined"}function Sn(){let r=new Float32Array(1),e=new Uint8Array(r.buffer);return r[0]=1/0,r[0]=r[0]-r[0],e[3]}var He=(r,e,t,i)=>{let n=(t-e)/i,o=0;for(let s=0;s<i;s++)o+=r(e+(s+.5)*n);return o*n};function En(r,e){let t={};return e.forEach(i=>{let n=function(o){if(o.length===0)return null;let s={};o.forEach(c=>{let u=String(c);s[u]=(s[u]||0)+1});let a=o[0],l=1;return Object.keys(s).forEach(c=>{s[c]>l&&(a=c,l=s[c])}),a}(r.map(o=>i in o?o[i]:void 0).filter(o=>o!==void 0));n&&(t[i]=n)}),t}var kn=["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"];function bt(){var r,e,t,i,n,o;if(typeof navigator>"u")return{name:"unknown",version:"unknown"};let s=navigator.userAgent,a=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>EdgA|EdgiOS|Edg)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>OPR|OPX)\/(?<version>\d+(?:\.\d+)+)/,/Opera[\s\/](?<version>\d+(?:\.\d+)+)/,/Opera Mini\/(?<version>\d+(?:\.\d+)+)/,/Opera Mobi\/(?<version>\d+(?:\.\d+)+)/,/(?<name>Vivaldi)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>Brave)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>CriOS)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>FxiOS)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>Chrome|Chromium)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>Firefox|Waterfox|Iceweasel|IceCat)\/(?<version>\d+(?:\.\d+)+)/,/Version\/(?<version1>[\d.]+).*Safari\/[\d.]+|(?<name>Safari)\/(?<version2>[\d.]+)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)+)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)+)/],l={edg:"Edge",edga:"Edge",edgios:"Edge",opr:"Opera",opx:"Opera",crios:"Chrome",fxios:"Firefox",samsung:"SamsungBrowser",vivaldi:"Vivaldi",brave:"Brave"};for(let c of a){let u=s.match(c);if(u){let p=(r=u.groups)===null||r===void 0?void 0:r.name,m=((e=u.groups)===null||e===void 0?void 0:e.version)||((t=u.groups)===null||t===void 0?void 0:t.ver
1sion1)||((i=u.groups)===null||i===void 0?void 0:i.version2);if(p||!(!((n=u.groups)===null||n===void 0)&&n.version1)&&!(!((o=u.groups)===null||o===void 0)&&o.version2)||(p="Safari"),!p&&c.source.includes("Opera Mini")&&(p="Opera Mini"),!p&&c.source.includes("Opera Mobi")&&(p="Opera Mobi"),!p&&c.source.includes("Opera")&&(p="Opera"),!p&&u[1]&&(p=u[1]),!m&&u[2]&&(m=u[2]),p)return{name:l[p.toLowerCase()]||p,version:m||"unknown"}}}return{name:"unknown",version:"unknown"}}function Qt(){if(typeof navigator>"u"||!navigator.userAgent)return!1;let r=navigator.userAgent;return/Mobi|Android|iPhone|iPod|IEMobile|Opera Mini|Opera Mobi|webOS|BlackBerry|Windows Phone/i.test(r)&&!/iPad/i.test(r)}function Cn(){let r=[],e={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(e).forEach(t=>{e[t].forEach(i=>{matchMedia(`(${t}: ${i})`).matches&&r.push(`${t}: ${i}`)})}),r}function xn(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{let r=window.ApplePaySession.supportsVersion;for(let e=15;e>0;e--)if(r(e))return e}catch{return 0}return 0}var Pn=bt().name!=="SamsungBrowser"?1:3,I,b=null;function H(r){let e=[];return function t(i){if(i&&i.toJSON&&typeof i.toJSON=="function"&&(i=i.toJSON()),i===void 0)return;if(typeof i=="number")return isFinite(i)?""+i:"null";if(typeof i!="object")return JSON.stringify(i);let n,o;if(Array.isArray(i)){for(o="[",n=0;n<i.length;n++)n&&(o+=","),o+=t(i[n])||"null";return o+"]"}if(i===null)return"null";if(e.indexOf(i)!==-1)throw new TypeError("Converting circular structure to JSON");let s=e.push(i)-1,a=Object.keys(i).sort();for(o="",n=0;n<a.length;n++){let l=a[n],c=t(i[l]);c&&(o&&(o+=","),o+=JSON.stringify(l)+":"+c)}return e.splice(s,1),"{"+o+"}"}(r)||""}var sr=["\u{1D504}","\u{1D505}","\u212D","\u{1D507}","\u{1D508}","\u{1D509}","\u{1D538}","\u{1D539}","\u2102","\u{1D53B}","\u{1D53C}","\u{1D53D}"],or=["\u03B2","\u03C8","\u03BB","\u03B5","\u03B6","\u03B1","\u03BE","\u03BC","\u03C1","\u03C6","\u03BA","\u03C4","\u03B7","\u03C3","\u03B9","\u03C9","\u03B3","\u03BD","\u03C7","\u03B4","\u03B8","\u03C0","\u03C5","\u03BF"];function _e(r,e){return`<math><mrow>${e}</mrow></math>`}function In(){let r="<mo>\u220F</mo>";return sr.forEach((e,t)=>{let i=2*t,n=or.slice(i,i+2);n.length===2&&(r+=`<mmultiscripts><mi>${e}</mi><none/><mi>${n[1]}</mi><mprescripts></mprescripts><mi>${n[0]}</mi><none/></mmultiscripts>`)}),_e(0,`<munderover><mmultiscripts>${r}</mmultiscripts></munderover>`)}function Ln(){let r=[];return sr.forEach((e,t)=>{let i=2*t,n=or.slice(i,i+2);n.length===2&&r.push(_e(0,`<mmultiscripts><mi>${e}</mi><none/><mi>${n[1]}</mi><mprescripts></mprescripts><mi>${n[0]}</mi><none/></mmultiscripts>`))}),r}var An={audio:async function(){return async function(){return new Promise((r,e)=>{try{let n=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),o=n.createBufferSource(),s=n.createOscillator();s.frequency.value=1e3;let a=n.createDynamicsCompressor(),l;a.threshold.value=-50,a.knee.value=40,a.ratio.value=12,a.attack.value=0,a.release.value=.2,s.connect(a),a.connect(n.destination),s.start(),n.oncomplete=c=>{l=c.renderedBuffer.getChannelData(0),r({sampleHash:gn(l),maxChannels:n.destination.maxChannelCount,channelCountMode:o.channelCountMode})},n.startRendering()}catch(t){console.error("Error creating audio fingerprint:",t),e(t)}})}()},canvas:async function(){return new Promise(r=>{let e=Array.from({length:3},()=>function(){let t=document.createElement("canvas"),i=t.getContext("2d");if(!i)return new ImageData(1,1);t.width=Kt,t.height=20;let n=i.createLinearGradient(0,0,t.width,t.height);n.addColorStop(0,"red"),n.addColorStop(.16666666666666666,"orange"),n.addColorStop(.3333333333333333,"yellow"),n.addColorStop(.5,"green"),n.addColorStop(.6666666666666666,"blue"),n.addColorStop(.8333333333333334,"indigo"),n.addColorStop(1,"violet"),i.fillStyle=n,i.fillRect(0,0,t.width,t.height);let o="Random Text WMwmil10Oo";
1return i.font="23.123px Arial",i.fillStyle="black",i.fillText(o,-5,15),i.fillStyle="rgba(0, 0, 255, 0.5)",i.fillText(o,-3.3,17.7),i.beginPath(),i.moveTo(0,0),i.lineTo(2*t.width/7,t.height),i.strokeStyle="white",i.lineWidth=2,i.stroke(),i.getImageData(0,0,t.width,t.height)}());r({commonPixelsHash:F(Yt(e,Kt,20).data.toString()).toString()})})},fonts:async function(r){return new Promise((e,t)=>{try{nr(async({iframe:i})=>{let n=i.createElement("canvas").getContext("2d"),o=vn.map(a=>Jt(n,a)),s={};_n.forEach(a=>{let l=Jt(n,a);o.includes(l)||(s[a]=l)}),e(s)})}catch{t({error:"unsupported"})}})},hardware:function(){return new Promise((r,e)=>{let t=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,i=window.performance&&window.performance.memory?window.performance.memory:0;r({videocard:wn(),architecture:Sn(),deviceMemory:t.toString()||"undefined",jsHeapSizeLimit:i.jsHeapSizeLimit||0})})},locales:function(){return new Promise(r=>{r({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})},math:function(){return new Promise(r=>{r({acos:Math.acos(.5),asin:He(Math.asin,-1,1,97),cos:He(Math.cos,0,Math.PI,97),largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),sin:He(Math.sin,-Math.PI,Math.PI,97),tan:He(Math.tan,0,2*Math.PI,97)})})},permissions:async function(r){let e=r?.permissions_to_check||kn;return En(await Promise.all(Array.from({length:3},()=>async function(t){let i={};for(let n of t)try{let o=await navigator.permissions.query({name:n});i[n]=o.state.toString()}catch{}return i}(e))),e)},plugins:async function(){let r=[];if(navigator.plugins)for(let e=0;e<navigator.plugins.length;e++){let t=navigator.plugins[e];r.push([t.name,t.filename,t.description].join("|"))}return new Promise(e=>{e({plugins:r})})},screen:function(){return new Promise(r=>{let e={is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:Cn()};Qt()&&navigator.maxTouchPoints>0&&(e.resolution=function(){let t=window.screen.width,i=window.screen.height,n=Math.max(t,i).toString(),o=Math.min(t,i).toString();return`${n}x${o}`}()),r(e)})},system:function(){return new Promise(r=>{let e=bt();r({platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:e.name,version:e.version},mobile:Qt(),applePayVersion:xn(),cookieEnabled:window.navigator.cookieEnabled})})},webgl:async function(){typeof document<"u"&&(I=document.createElement("canvas"),I.width=200,I.height=100,b=I.getContext("webgl"));try{if(!b)throw new Error("WebGL not supported");let r=Array.from({length:Pn},()=>function(){try{if(!b)throw new Error("WebGL not supported");let e=` 2 attribute vec2 position; 3 void main() { 4 gl_Position = vec4(position, 0.0, 1.0); 5 } 6 `,t=` 7 precision mediump float; 8 void main() { 9 gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color 10 } 11 `,i=b.createShader(b.VERTEX_SHADER),n=b.createShader(b.FRAGMENT_SHADER);if(!i||!n)throw new Error("Failed to create shaders");if(b.shaderSource(i,e),b.shaderSource(n,t),b.compileShader(i),!b.getShaderParameter(i,b.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+b.getShaderInfoLog(i));if(b.compileShader(n),!b.getShaderParameter(n,b.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+b.getShaderInfoLog(n));let o=b.createProgram();if(!o)throw new Error("Failed to create shader program");if(b.attachShader(o,i),b.attachShader(o,n),b.linkProgram(o),!b.getProgramParameter(o,b.LINK_STATUS))throw new Error("Shader program linking failed: "+b.getProgramInfoLog(o));b.useProgram(o);let s=137,a=new Float32Array(4*s),l=2*Math.PI/s;for(let m=0;m<s;m++){let h=m*l;a[4*m]=0,a[4*m+1]=0,a[4*m+2]=Math.cos(h)*(I.width/2),a[4*m+3]=Math.sin(h)*(I.height/2)}let c=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,c),b.bufferData(b.ARRAY_BUFFER,a,b.STATIC_DRAW);let u=b.getAttribLocation(o,"position");b.enableVertexAttribArray(u),b.vertexAttribPointer(u,2,b.FLOAT,!1,0,0),b.viewport(0,0,I.width,I.height),b.clearColor(0,0,0,1),b.clear(b.COLOR_BUFFER_BIT),b.drawArrays(b.LINES,0,2*s);let p=new Uint8ClampedArray(I.width*I.height*4);return b.readPixels(0,0,I.width,I.height,b.RGBA,b.UNSIGNED_BYTE,p),new ImageData(p,I.width,I.height)}catch{return new ImageData(1,1)}finally{b&&(b.bindBuffer(b.ARRAY_BUFFER,null),b.useProgram(null),b.viewport(0,0,b.drawingBufferWidth,b.drawingBufferHeight),b.clearColor(0,0,0,0))}}());return{commonPixelsHash:F(Yt(r,I.width,I.height).data.toString()).toString()}}catch{return{webgl:"unsupported"}}}},Tn={webrtc:async function(){return new Promise(r=>{try{let e=window.RTCPeerConnection||window.webkitRTCPeerConnection||window.mozRTCPeerConnection;if(!e)return void r({supported:!1,error:"WebRTC not supported"});let t=new e({iceCandidatePoolSize:1,iceServers:[]});
11t.createDataChannel(""),(async()=>{try{let i={offerToReceiveAudio:!0,offerToReceiveVideo:!0},n=await t.createOffer(i);await t.setLocalDescription(n);let o=n.sdp||"",s=[...new Set((o.match(/extmap:\d+ [^\n\r]+/g)||[]).map(h=>h.replace(/extmap:\d+ /,"")))].sort(),a=h=>{let g=o.match(new RegExp(`m=${h} [^\\s]+ [^\\s]+ ([^\\n\\r]+)`));return g?g[1].split(" "):[]},l=(h,g)=>g.map(y=>{let S=new RegExp(`(rtpmap|fmtp|rtcp-fb):${y} (.+)`,"g"),v=[...o.matchAll(S)];if(!v.length)return null;let x={};return v.forEach(B=>{let[ee,j,T]=B,$=T.split("/");j==="rtpmap"?(x.mimeType=`${h}/${$[0]}`,x.clockRate=+$[1],h==="audio"&&(x.channels=+$[2]||1)):j==="rtcp-fb"?(x.feedbackSupport=x.feedbackSupport||[],x.feedbackSupport.push(T)):j==="fmtp"&&(x.sdpFmtpLine=T)}),x}).filter(Boolean),c=l("audio",a("audio")),u=l("video",a("video")),p={audio:{count:c.length,hash:F(H(c))},video:{count:u.length,hash:F(H(u))},extensionsHash:F(H(s))},m=await new Promise(h=>{let g=setTimeout(()=>{t.removeEventListener("icecandidate",y),t.close(),h({supported:!0,...p,timeout:!0})},3e3),y=S=>{let v=S.candidate;v&&v.candidate&&(clearTimeout(g),t.removeEventListener("icecandidate",y),t.close(),h({supported:!0,...p,candidateType:v.type||""}))};t.addEventListener("icecandidate",y)});r({details:m,hash:F(H(m))})}catch(i){t.close(),r({supported:!0,error:`WebRTC offer failed: ${i.message}`})}})()}catch(e){r({supported:!1,error:`WebRTC error: ${e.message}`})}})},mathml:async function(){return new Promise(r=>{try{nr(async({iframe:e})=>{try{if(!function(s){try{let a=s.createElement("math");a.innerHTML="<mrow><mi>x</mi></mrow>",a.style.position="absolute",a.style.visibility="hidden",s.body.appendChild(a);let l=a.getBoundingClientRect();return s.body.removeChild(a),l.width>0&&l.height>0}catch{return!1}}(e))return void r({supported:!1,error:"MathML not supported"});let t=[_e("integral","<msubsup><mo>\u222B</mo><mi>a</mi><mi>b</mi></msubsup><mfrac><mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mrow><mi>g</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mfrac><mi>dx</mi>"),_e("fraction","<mfrac><mrow><mi>\u03C0</mi><mo>\xD7</mo><msup><mi>r</mi><mn>2</mn></msup></mrow><mrow><mn>2</mn><mi>\u03C3</mi></mrow></mfrac>"),_e("matrix","<mo>[</mo><mtable><mtr><mtd><mi>\u03B1</mi></mtd><mtd><mi>\u03B2</mi></mtd></mtr><mtr><mtd><mi>\u03B3</mi></mtd><mtd><mi>\u03B4</mi></mtd></mtr></mtable><mo>]</mo>"),In(),...Ln()],i=[],n="";t.forEach((s,a)=>{let l=function(c,u){try{let p=u.createElement("math");p.innerHTML=c.replace(/<\/?math>/g,""),p.style.whiteSpace="nowrap",p.style.position="absolute",p.style.visibility="hidden",p.style.top="-9999px",u.body.appendChild(p);let m=p.getBoundingClientRect(),h=(u.defaultView||window).getComputedStyle(p),g={dimensions:{width:m.width,height:m.height},fontInfo:{fontFamily:h.fontFamily,fontSize:h.fontSize,fontWeight:h.fontWeight,fontStyle:h.fontStyle,lineHeight:h.lineHeight,fontVariant:h.fontVariant||"normal",fontStretch:h.fontStretch||"normal",fontSizeAdjust:h.fontSizeAdjust||"none",textRendering:h.textRendering||"auto",fontFeatureSettings:h.fontFeatureSettings||"normal",fontVariantNumeric:h.fontVariantNumeric||"normal",fontKerning:h.fontKerning||"auto"}};return u.body.removeChild(p),g}catch(p){return{error:p.message}}}(s,e);i.push({width:l.dimensions.width,height:l.dimensions.height}),a===0&&l.fontInfo&&(n=F(H(l.fontInfo)))});let o={fontStyleHash:n,dimensions:i};r({details:o,hash:F(H(o))})}catch(t){r({supported:!1,error:`MathML error: ${t.message}`})}})}catch(e){r({supported:!1,error:`MathML error: ${e.message}`})}})},speech:async function(){return new Promise(r=>{try{if(typeof window>"u"||!window.speechSynthesis||typeof window.speechSynthesis.getVoices!="function")return void r({supported:!1,error:"Speech Synthesis API not supported"});let e=!1,t=null,i=s=>{if(!e){e=!0,t&&clearTimeout(t);try{let a=s.map(c=>{let u=p=>p.replace(/\\/g,"\\\\").replace(/,/g,"\\,");return[u(c.voiceURI||""),u(c.name||""),u(c.lang||""),c.localService?"1":"0",c.default?"1":"0"].join(",")});a.sort();let l={voiceCount:s.length,voicesHash:F(H(a))};r({details:l,hash:F(H(l))})}catch(a){r({supported:!0,error:`Voice processing failed: ${a.message}`})}}},n=window.speechSynthesis.getVoices();if(n.length>0)return void i(n);t=setTimeout(()=>{let s=window.speechSynthesis.getVoices();i(s)},800);let o=()=>{window.speechSynthesis.removeEventListener("voiceschanged",o);let s=window.speechSynthesis.getVoices();i(s)};window.speechSynthesis.addEventListener("voiceschanged",o)}catch(e){r({supported:!1,error:`Speech Synthesis error: ${e.message}`})}})}},ar={},On={timeout:"true"},Rn=(r,e,t)=>{ar[r]=e};function lr(r,e){var t;let i=bt();if(i.name==="unknown"&&r.system&&typeof r.system=="object"&&!Array.isArray(r.system)){let u=r.system.browser;if(u&&typeof u=="object"&&!Array.isArray(u)){let p=u;i={name:p.name||"unknown",version:p.version||"unknown"}}}let n=i.name.toLowerCase(),o=i.version.split(".")[0]||"0",s=parseInt(o,10),a=[...e?.exclude||[]],l=e?.stabilize||[],c=e?.include||[];for(let u of l){let p=hn[u];if(p)for(let m of p){let h=!("browsers"in m),g=!h&&((t=m.browsers)===null||t===void 0?void 0:t.some(y=>{let S=y.match(/(.+?)(>=)(\d+)/);if(S){let[,v,,x]=S,B=parseInt(x,10);return n===v&&s>=B}return n===y}));(h||g)&&a.push(...m.exclude)}}return function u(p,m=""){let h={};for(let[g,y]of Object.entries(p)){let S=m?`${m}.${g}`:g;if(typeof y!="object"||Array.isArray(y)||y===null){let v=a.some(B=>S.startsWith(B)),x=c.some(B=>S.startsWith(B));v&&!x||(h[g]=y)}else{let v=u(y,S);Object.keys(v).length>0&&(h[g]=v)}}return h}(r)}var cr="visitor_id";function ur(r){return r.storage_property_name?r.storage_property_name:r.property_name_factory(cr)}var Zt=`${rr}_${cr}`;function Xt(r,e){try{localStorage.setItem(ur(e),r)}catch{}}var dr="cache";function er(r){try{let e=localStorage.getItem(r.property_name_factory(dr));return JSON.parse(e)||{}}catch{}return{}}function Mn(r){return r.cache_lifetime_in_ms>2592e5?Date.now()+2592e5:Date.now()+r.cache_lifetime_in_ms}var le=null,gt=null,$n=(r,e)=>{if(r.cache_api_call){if(gt)return Promise.resolve(gt);let l=function(c){let u=er(c);if(u&&u.apiResponse&&u.apiResponseExpiry&&Date.now()<=u.apiResponseExpiry)return u.apiResponse}(r);if(l)return Promise.resolve(l)}if(le)return le;let t=`${r.api_endpoint||ir}/thumbmark`,i=function(l){try{let c=ur(l),u=localStorage.getItem(c);return u||c===Zt||(u=localStorage.getItem(Zt),u&&Xt(u,l)),u}catch{return null}}(r),n={components:e,options:r,clientHash:F(H(e)),version:"1.6.0"};i&&(n.visitorId=i);let o=fetch(t,{method:"POST",headers:{"x-api-key":r.api_key,Authorization:"custom-authorized","Content-Type":"application/json"},body:JSON.stringify(n)}).then(l=>{if(!l.ok)throw l.status===403?new Error("INVALID_API_KEY"):new Error(`HTTP error! status: ${l.status}`);return l.json()}).then(l=>(l.visitorId&&l.visitorId!==i&&Xt(l.visitorId,r),gt=l,function(c,u){!c.cache_api_call||!c.cache_lifetime_in_ms||function(p,m){let h={...er(p),...m};try{localStorage.setItem(p.property_name_factory(dr),JSON.stringify(h))}catch{}}(c,{apiResponseExpiry:Mn(c),apiResponse:u})}(r,l),le=null,l)).catch(l=>{if(console.error("Error fetching pro data",l),le=null,l.message==="INVALID_API_KEY")throw l;return null}),s=r.timeout||5e3,a=new Promise(l=>{setTimeout(()=>{l({info:{timed_out:!0},version:"1.6.0"})},s)});return le=Promise.race([o,a]),le};async function Un(r){var e;let t={...qe,...r},i=t.logging&&!sessionStorage.getItem("_tmjs_l")&&Math.random()<1e-4,n={...An,...ar},{elapsed:o,resolvedComponents:s}=await tr(n,t),a={},l={};if(i||t.experimental){let{elapsed:v,resolvedComponents:x}=await tr(Tn,t);a=x,l=v}let c=t.api_key?$n(t,s):null,u=null;if(c)try{u=await c}catch(v){if(v instanceof Error&&v.message==="INVALID_API_KEY")return{error:"Invalid API key or quota exceeded",components:{},info:{},version:"1.6.0",thumbmark:""};throw v}let p={...o,...l},m=t.performance?{elapsed:p}:{},h=lr(u?.components||{},t),g={...s,...h},y=u?.info||{uniqueness:{score:"api only"}};console.log(u);let S=(e=u?.thumbmark)!==null&&e!==void 0?e:F(H(g));return i&&async function(v,x,B,ee={}){var j;let T=`${ir}/log`,$={thumbmark:v,components:x,experimental:ee,version:"1.6.0",options:B,path:(j=window?.location)===null||j===void 0?void 0:j.pathname};sessionStorage.setItem("_tmjs_l","1");try{await fetch(T,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})}catch{}}(S,g,t,a).catch(()=>{}),{...u?.visitorId&&{visitorId:u.visitorId},thumbmark:S,components:g,info:y,version:"1.6.0",...m,...Object.keys(a).length>0&&t.experimental&&{experimental:a}}}async function tr(r,e){let t={...qe,...e},i=Object.entries(r).filter(([u])=>{var p;return!(!((p=t?.exclude)===null||p===void 0)&&p.includes(u))}).filter(([u])=>{var p,m,h,g;return!((p=t?.include)===null||p===void 0)&&p.some(y=>y.includes("."))?(m=t?.include)===null||m===void 0?void 0:m.some(y=>y.startsWith(u)):((h=t?.include)===null||h===void 0?void 0:h.length)===0||((g=t?.include)===null||g===void 0?void 0:g.includes(u))}),n=i.map(([u])=>u),o=i.map(([u,p])=>p(e)),s=await function(u,p,m){return Promise.all(u.map(h=>{let g=performance.now();return Promise.race([h.then(v=>({value:v,elapsed:performance.now()-g})),(y=p,S=m,new Promise(v=>{setTimeout(()=>v(S),y)})).then(v=>({value:v,elapsed:performance.now()-g}))]);var y,S}))}(o,t?.timeout||5e3,On),a={},l={};
11s.forEach((u,p)=>{var m;u.value!=null&&(l[n[p]]=u.value,a[n[p]]=(m=u.elapsed)!==null&&m!==void 0?m:0)});let c=lr(l,t);return{elapsed:a,resolvedComponents:c}}var Ve=class{constructor(e){this.options={...qe,...e}}async get(e){return Un({...this.options,...e})}getVersion(){return"1.6.0"}includeComponent(e,t){Rn(e,t)}};var w=r=>new URLSearchParams(window.location.search).get(r),We=()=>(window.location.origin+window.location.pathname).replace(/\/$/,""),Ge=r=>new RegExp("^"+r.split(/\*+/).map(Dn).join(".*")+"$"),Dn=r=>r.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");var O=r=>{let e=new Event(`sl:${r}`);document.dispatchEvent(e)},W=()=>!!w("SLVerifyInstall"),ze=()=>w("rh_ref")||w("rh_partner"),ve=()=>W()&&w("SLVerifyInstall").includes("MF"),ce=()=>W()&&w("SLVerifyInstall").includes("upscribe"),Ye=()=>W()&&w("SLVerifyInstall").includes("partner_program"),R=()=>window.SL.config.test_mode||w("test_mode")=="true",A=()=>w("debug")=="true",ne=()=>w("partner_mode")=="true",Fn=()=>window.location.hostname==="referralhub.page",k=()=>window.SL.config||{},_=(r={})=>{let e=window.SL.visitor||{};return Object.keys(r).length&&(e=Object.assign(e,r)),window.SL.visitor=e,window.SL.visitor},G=({experiment:r}={})=>{let e=_();return{experiment:r,utm_source:e.utm_source,utm_campaign:e.utm_campaign,session_uuid:e.sessionUuid,fingerprint:e.fingerprint,npm_version:"none"}},L=(r=null)=>{let e=_();return r&&Object.keys(e).length&&(e.subscriber=r,O("subscriber-updated")),e.subscriber},Bn=()=>W()?w("rh_ref"):_().referrer,we=(r=null)=>{let e=k().widgets.upscribes;return r?e.find(i=>i.uuid==r):e[0]},Se=()=>{let r=_();return{uuid:k().uuid,referrer_code:Bn(),campaign_id:r.campaign,utm_source:r.utm_source,utm_campaign:r.utm_campaign,origin:r.origin,email:r.email}},Nn=/^[\w+\-']+(\.[\w+\-']+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+$/i,Ke=r=>typeof r=="string"&&Nn.test(r.trim()),yt=()=>w("flash_messages")=="true",pr=()=>{R()&&yt()&&q("TEST MODE ENABLED","You're currently in test mode. No data will be stored while in test mode")},fr=()=>window.SLConfig.plan!="lite_v3"||R()||Fn(),z=(r,e,t=30)=>{if(W()||R())return!1;let i=window.location.hostname.replace("www.","");e&&(U.set(r,e,{expires:t,domain:`.${i}`}),console.log(`${r} tracked`))},mr=async()=>new Ve({timeout:2500}).get(),hr=()=>{document.documentElement.style.setProperty("--sl-widgets-font-family","-apple-system, system-ui"),document.documentElement.style.setProperty("--sl-widgets-base-unit","16px")},gr=(r,e)=>{let t=`sparkloop-${r}-custom-css`;document.getElementById(t)&&document.getElementById(t).remove();var i=document.createElement("style");i.type="text/css",i.id=t,i.textContent=e,document.head.appendChild(i)},Ee=r=>{let e=`sparkloop-${r}-style`;if(document.querySelector(`link#${e}`))return;let t=document.createElement("link");t.id=e,t.setAttribute("rel","stylesheet"),t.setAttribute("href",`${window.SLConfig.app_url}/styles/${r}.css`),document.head.appendChild(t)},_t=r=>{let e=document.createElement("link");e.setAttribute("rel","preload"),e.setAttribute("as","image"),e.setAttribute("href",r),document.head.appendChild(e)},br=(r,e,t)=>{let i;if(document.body.createTextRange){let n=document.body.createTextRange();n.moveToElementText(r),n.select()}else if(window.getSelection&&document.createRange){r.readOnly=!1;let n=document.createRange();n.selectNodeContents(r);let o=window.getSelection();o.removeAllRanges(),o.addRange(n),(r.nodeName=="TEXTAREA"||r.nodeName=="INPUT")&&r.select(),r.setSelectionRange&&navigator.userAgent.match(/ipad|ipod|iphone/i)&&(r.setSelectionRange(0,999999),r.readOnly=!0)}try{i=document.execCommand("copy")}catch{i=!1}if(i){let n=e.textContent,o=t;e.textContent=o,setTimeout(()=>e.textContent=n,500),console.log("Referral link copied to clipboard.")}},Je=r=>r.querySelector(`input[type*="email"], 12 input[type*="Email"], 13 input[type*="EMAIL"], 14 input[name*="EMAIL"], 15 input[name*="email"], 16 input[name*="Email"], 17 input[for*="email"], 18 input[for*="Email"], 19 input[for*="EMAIL"]`),yr=r=>r.querySelector(`input[type*="submit"],
20 input[type*="image"], 21 button[type*="submit"], 22 button:not([type])`),_r=r=>{let e=!1,t=!1;return r.forEach(i=>{i.querySelector(".gform_body")&&(e=!0),Je(i)&&(t=!0)}),e&&!t},vt=r=>r.hasAttribute("data-sv-form"),Qe=r=>r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),d=({type:r="div",id:e="",classes:t="",text:i="",html:n="",parent:o,attributes:s={}}={})=>{let a=document.createElement(r);e&&(a.id=e),t&&(a.className=t),i&&(a.innerText=i),n&&(a.innerHTML=n),o&&o.appendChild(a);for(let l in s)a.setAttribute(l,s[l]);return a},te=r=>{let e;return r.tagName==="FORM"?e=r:(e=d({type:"form",parent:r,classes:"sf-hp",attributes:{"aria-hidden":"true"}}),e.addEventListener("submit",t=>t.preventDefault())),d({type:"input",parent:e,classes:"sf-hp",attributes:{type:"text",name:"sl-hp",autocomplete:"off",tabindex:"-1","aria-hidden":"true"}})};var vr=()=>{let r=()=>d({html:"<!-- Sparkloop: this plan doesn't support widgets -->"}),e={get:function(){return r}};return new Proxy({},e)};function wr(){if(document.currentScript)return document.currentScript;if(document.querySelector("script[data-sparkloop]"))return document.querySelector("script[data-sparkloop]");if(document.querySelector('script[src^="https://js.sparkloop.app/"]'))return document.querySelector('script[src^="https://js.sparkloop.app/"]');if(document.querySelector('script[src^="https://dash.sparkloop.app/widget/"]'))return document.querySelector('script[src^="https://dash.sparkloop.app/widget/"]')}var Sr=()=>{let r=wr(),e=new URL(r.src),t=null;if(e.searchParams.get("publication_id"))t=e.searchParams.get("publication_id");else if(e.pathname.includes("/widget/")&&e.pathname.includes("/embed.js")){let i=e.pathname.match(/\/widget\/([^\/]+)\/embed\.js/);i&&(t=i[1])}else if(e.pathname.includes("/team_")&&e.pathname.endsWith(".js")){let i=e.pathname.match(/\/team_([^\.]+)\.js/);i&&(t=`team_${i[1]}`)}return t},Er=()=>{let e=wr().src,t=e.substring(0,e.lastIndexOf("/"));return t.includes("sparkloop.app")?"https://js.sparkloop.app":t.includes("/widget/")?"https://js.sparkloop.localhost":t},kr=()=>{let r=Date.now(),e=new Uint8Array(10);crypto.getRandomValues(e),e[0]=e[0]&15|112,e[2]=e[2]&63|128;let t=r.toString(16).padStart(12,"0"),i=Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("");return t.slice(0,8)+"-"+t.slice(8,12)+"-"+i.slice(0,4)+"-"+i.slice(4,8)+"-"+i.slice(8)};var M=async(r,e,t="POST",i={})=>{let n=k(),o=`${n.script_url}/${n.uuid}`,s={method:t,headers:{"Content-Type":"application/json"},keepalive:!0,...i};return t!=="GET"&&e&&(s={...s,body:JSON.stringify(e)}),await(await fetch(o+r,s)).json()},Cr=r=>M("/add_subscriber",r).then(e=>e),xr=r=>M(`/campaigns/${r.campaign_id}/verify_script`,r).then(e=>e),Pr=r=>M(`/campaigns/${r.campaign_id}/test_referral`,r).then(e=>e),Ir=r=>M(`/upscribes/${r}/verify_script`).then(e=>e),Lr=r=>M(`/partner_programs/${r}/verify_script`).then(e=>e),Ar=r=>M(`/upscribes/${r}/test_widget`).then(e=>e),Tr=r=>M(`/partner_programs/${r}/test_referral`).then(e=>e),Or=r=>M(`/partner_campaigns/${r}/partner_test`).then(e=>e),Rr=r=>M("/check_referral_code",r).then(e=>e),Mr=r=>M("/check_partner_code",r).then(e=>e),$r=(r,e)=>M("/get_subscriber",{subscriber:r,...e}).then(t=>t.response==="error"?Promise.reject(t.message):Promise.resolve(t.subscriber)),Ur=(r,e)=>M("/upsert_subscriber",{subscriber:r,...e}).then(t=>t.response==="error"?Promise.reject(t.message):Promise.resolve(t.subscriber)),Dr=r=>M(`/campaigns/${r.campaign_id}/send_email_invite`,r).then(e=>Promise.resolve(e)).catch(()=>Promise.reject()),Fr=(r,e)=>{let t=`${r}/${e}/settings`;return fetch(t,{method:"GET"}).then(i=>i.json())};var se="__sl",Br=`${se}-campaign`,Nr=`${se}-utm_campaign`,jr=`${se}-utm_source`,Hr=`${se}-origin`,Vr=`${se}-fingerprint`,qr=`${se}-referrer`,Va=`${se}-session_uuid`,de=class{constructor(){this.config=k(),this.visitor={}}storeInfoCookies(){this.visitor.campaign&&z(`${Br}-${this.config.uuid}`,this.visitor.campaign),this.visitor.utm_source&&z(`${jr}-${this.config.uuid}`,this.visitor.utm_source),this.visitor.utm_campaign&&z(`${Nr}-${this.config.uuid}`,this.visitor.utm_campaign),this.visitor.origin&&z(`${Hr}-${this.config.uuid}`,this.visitor.origin)}fetchCampaign(){let e=U.get(`${qr}-${this.config.uuid}`)?U.get(`${Br}-${this.config.uuid}`):w("sl_campaign");this.visitor.campaign=this.config.campaign||e||w("sl_campaign")}fetchUTMCampaign(){this.visitor.utm_campaign=this.config.utm_campaign||w("utm_campaign")||U.get(`${Nr}-${this.config.uuid}`)}fetchUTMSource(){let e=w("utm_source")||w("ref")||w("source"),t=U.get(`${jr}-${this.config.uuid}`),i=document.referrer&&new URL(document.referrer).hostname!=window.location.hostname?new URL(document.referrer).hostname.replace(/^www\./,""):null;this.visitor.utm_source=this.config.utm_source||e||i||t}fetchOrigin(){this.visitor.origin=this.config.origin||U.get(`${Hr}-${this.config.uuid}`)}async fetchAndVerifyReferrer(){let e=`${qr}-${this.config.uuid}`,t=U.get(e);t&&(this.storeInfoCookies(),this.visitor.referrer=t);let i=ze();if(i){let n={uuid:this.config.uuid,referrer_code:i,campaign_id:this.visitor.campaign,utm_source:this.visitor.utm_source,utm_campaign:this.visitor.utm_campaign,fingerprint:this.visitor.fingerprint},o;try{w("rh_partner")?(o=await Mr(n),console.log(`Partner Campaign Referral Code ${i} verified successfully`)):(o=await Rr(n),console.log("REQ:",o),console.log(`Subscriber Referral code ${i} verified successfully`)),o.response=="ok"?(O("referrer-tracked"),z(e,i),this.visitor.referrer=i,this.storeInfoCookies()):console.warn(o.message)}catch(s){console.error(s)}}}async fetchFingerprint(){let e=U.get(Vr);if(e)this.visitor.fingerprint=e;else try{let t=await mr();z(Vr,t.thumbmark),this.visitor.fingerprint=t.thumbmark}catch(t){console.error(t)}}setSessionUuid(){let e=kr();this.visitor.sessionUuid=e}async profile(){this.setSessionUuid(),this.fetchCampaign(),this.fetchUTMSource(),this.fetchUTMCampaign(),this.fetchOrigin(),await this.fetchFingerprint(),await this.fetchAndVerifyReferrer(),_(this.visitor)}};var jn="__sl",Wr=`${jn}-subscriber`,K=class{constructor(){this.config=k()}subscriberId(){return U.get(`${Wr}-${this.config.uuid}`)||w("subscriber_id")}async fetch({subscriberId:e=null,campaign:t=null}={}){let i=R()?"fake_subscriber":e||this.subscriberId();if(!i)return Promise.reject("Subscriber ID or email not present");let n=Se();t&&(n.campaign_id=t);try{let o=await $r(i,n);return this.store(o),Promise.resolve(o)}catch(o){return Promise.reject(o)}}async upsert({subscriber:e=null,campaign:t=null}={}){let i=R()?"fake_subscriber":e;if(!i)return Promise.reject();let n=Se();t&&(n.campaign_id=t);try{let o=await Ur(i,n);return this.store(o),Promise.resolve(o)}catch(o){return Promise.reject(o)}}store(e){L(e),z(`${Wr}-${this.config.uuid}`,e.id),O("subscriber-loaded"),console.log("Subscriber set",{subscriber:e})}};var Hn=1500,ke="upscribe_spotlight",zr={id:"spotlight",progressAs:"recommendations",label:"Discover",icon:"compass",enabled(){return!0},async fetch(r,e){let i=(await r.fetchOffers()).spotlight;return i?Math.random()>=.5?[]:(e.experiment="spotlight",await Promise.all([Gr(i.spotlight_desktop_image_url),Gr(i.spotlight_mobile_image_url)]),[i]):[]}
22,mount(r,e){let t=e.data[0];e.setFooter({hidden:!0}),e.setScreenHead({}),e.api.trackPageImpression(e.config.uuid,ke).catch(()=>{}),e.api.trackOfferEvent("impression",t.uuid,{page:ke}).catch(()=>{}),te(r),Vn(r,e,t)}};function Gr(r){return new Promise(e=>{let t=new Image;t.onload=e,t.onerror=e,t.src=r})}function Vn(r,e,t){let i=d({type:"article",classes:"sf-spotlight",parent:r,attributes:{"data-sf-spotlight":"","data-offer-uuid":t.uuid}}),n=d({classes:"sf-spotlight-media",parent:i});t.spotlight_badge_text&&d({type:"p",classes:"sf-spotlight-badge",text:t.spotlight_badge_text,parent:n}),qn(n,t);let o=d({classes:"sf-spotlight-copy",parent:i}),s=e.config.branding.name;d({type:"p",classes:"sf-spotlight-eyebrow",text:t.spotlight_eyebrow_text||`Hand-picked for new ${s} subscribers`,parent:o}),d({type:"h2",classes:"sf-spotlight-headline",text:t.spotlight_headline||"",parent:o}),t.spotlight_body_html&&d({type:"div",classes:"sf-spotlight-body",html:t.spotlight_body_html,parent:o});let a=d({type:"button",classes:"sf-spotlight-claim",parent:o,attributes:{type:"button",disabled:"","data-sf-spotlight-claim":""}});a.appendChild(document.createTextNode(`${t.spotlight_call_to_action||"Claim offer"} `)),d({type:"span",html:e.icons.arrow,parent:a});let l=d({type:"button",classes:"sf-spotlight-skip",text:t.spotlight_skip_label,parent:o,attributes:{type:"button",disabled:"","data-sf-spotlight-skip":""}});setTimeout(()=>{a.disabled=!1,l.disabled=!1},Hn),a.addEventListener("click",()=>Wn(a,l,e,t)),l.addEventListener("click",()=>Gn(a,l,e))}function qn(r,e){d({type:"img",classes:"sf-spotlight-img sf-spotlight-img--desktop",parent:r,attributes:{src:e.spotlight_desktop_image_url,alt:"",loading:"eager",decoding:"sync",fetchpriority:"high"}}),d({type:"img",classes:"sf-spotlight-img sf-spotlight-img--mobile",parent:r,attributes:{src:e.spotlight_mobile_image_url,alt:"",loading:"eager",decoding:"sync"}})}function Wn(r,e,t,i){if(t.host.querySelector("input.sf-hp")?.value){t.complete();return}r.disabled=!0,e.disabled=!0,t.events.spotlightClaimed(i),t.api.submitOffer(i,{page:ke}).catch(n=>{console.error("SignupFlow: spotlight claim failed",n)}),t.api.trackOfferEvent("subscription",i.uuid,{page:ke}).catch(()=>{}),t.api.trackPageSubscription(t.config.uuid,{page:ke,shown:[i.uuid],subscribed:[i.uuid]}).catch(()=>{}),t.store.spotlight.outcome="claimed",t.setNotice(`You're all set \u2014 look out for ${i.recommended_publication_name}`),t.advance()}function Gn(r,e,t){if(t.host.querySelector("input.sf-hp")?.value){t.complete();return}r.disabled=!0,e.disabled=!0,t.store.spotlight.outcome="skipped",t.advance()}var Kr={id:"recommendations",label:"Discover",icon:"compass",enabled(r){return r.stages.recommendations.enabled!==!1},fetch(r,e){return r.fetchRecommendations(e.uuid)},mount(r,e){let t=e.data,i=e.config.stages.recommendations;e.setScreenHead({title:i[`header_spotlight_${e.store.spotlight.outcome}`]||i.header,subtitle:i.subheader}),e.store.recommendations.selected=[],e.store.recommendations.recs=t;let n=new Set,o={hadInteraction:!1,renderTime:Date.now()},s=new AbortController;e.api.trackPageImpression(e.config.uuid,"upscribe_recommendations").catch(()=>{});let a=te(r);e.mode==="verify"&&d({type:"p",classes:"sf-verify-notice",parent:r,html:"To complete the verification, click on the submit button.<br/>Don't worry: no data will be recorded."});let l=zn(r,e,t,o);Jn(r,e,t,n),Qn(r,l,o,s.signal),Zn(e,t,n,o,a,s,i)}};function zn(r,e,t,i){let n=d({classes:"sf-rec-grid",parent:r,attributes:{"data-count":String(t.length)}});for(let o of t)Yn(n,e,o,i);return n}function Yn(r,e,t,i){let n=d({classes:"sf-rec-card",parent:r,attributes:{"data-rec-uuid":t.uuid,"data-rec-ref-code":t.ref_code||"",role:"button",tabindex:"0","aria-pressed":"false","aria-label":t.publication_name||""}});n.addEventListener("click",a=>{i.hadInteraction=!0,Kn(e,a.currentTarget)});let o=d({classes:"sf-rec-card-head",parent:n});d({type:"img",classes:"sf-rec-avatar",parent:o,attributes:{src:t.publication_logo||"",alt:"",loading:"lazy"}});let s=d({classes:"sf-rec-meta",parent:o});d({type:"p",classes:"sf-rec-name",text:t.publication_name||"",parent:s}),d({classes:"sf-rec-check",html:e.icons.checkSm,parent:o}),d({type:"p",classes:"sf-rec-desc",text:t.description||"",parent:n,attributes:t.editable?{"data-sl-editable":"description","data-sl-rec-uuid":t.uuid}:{}})}
22function Kn(r,e){let t=e.dataset.recUuid,i=r.store.recommendations.selected,n=i.indexOf(t);n===-1?i.push(t):i.splice(n,1);let o=i.includes(t);e.classList.toggle("selected",o),e.setAttribute("aria-pressed",String(o)),r.setFooter({continueEnabled:i.length>0})}function Jn(r,e,t,i){if(typeof IntersectionObserver!="function"){t.forEach(s=>{s.ref_code&&i.add(s.ref_code),s.uuid&&(e.api.trackRecommendationImpression(e.config.uuid,s.uuid).catch(()=>{}),Yr(r,e,s.uuid))});return}let n=new Map(t.map(s=>[s.uuid,s])),o=new IntersectionObserver((s,a)=>{for(let l of s){if(!l.isIntersecting)continue;let c=l.target,u=c.dataset.recUuid,p=n.get(u);p?.ref_code&&i.add(p.ref_code),u&&(e.api.trackRecommendationImpression(e.config.uuid,u).catch(()=>{}),Yr(r,e,u)),a.unobserve(c)}},{root:r.closest(".sf-content"),threshold:.5});r.querySelectorAll(".sf-rec-card").forEach(s=>o.observe(s))}function Yr(r,e,t){let i=e.store.recommendations.selected;if(i.includes(t))return;i.push(t);let n=r.querySelector(`.sf-rec-card[data-rec-uuid="${t}"]`);n&&(n.classList.add("selected"),n.setAttribute("aria-pressed","true")),e.setFooter({continueEnabled:i.length>0})}function Qn(r,e,t,i){let n=r.closest(".sf-content");if(!n)return;let o=()=>{if(t.hadInteraction)return;let s=e.getBoundingClientRect(),a=n.getBoundingClientRect();s.bottom<=a.bottom+10&&(t.hadInteraction=!0)};n.addEventListener("scroll",o,{passive:!0,signal:i})}function Zn(r,e,t,i,n,o,s){r.setFooter({continueEnabled:!1,primaryLabel:s.cta_label,skipLabel:s.skip_link,onSkip:()=>{o.abort(),r.events.recommendationsSkipped(),r.skip()},onContinue:async()=>{if(n.value){o.abort(),r.complete();return}let{selected:a}=r.store.recommendations,l=e.filter(c=>a.includes(c.uuid)).map(c=>
22c.ref_code).filter(Boolean);if(l.length>=1){r.events.recommendationsSubmitted({recs:e,shownRefCodes:t,subscribedRefCodes:l});try{await r.api.submitRecommendations(r.config.uuid,{shown:Array.from(t),subscribed:l,hadInteraction:i.hadInteraction,renderTime:i.renderTime}),r.api.trackPageSubscription(r.config.uuid,{page:"upscribe_recommendations",shown:Array.from(t),subscribed:l}).catch(()=>{})}catch(c){console.error("SignupFlow: submitRecommendations failed",c)}}o.abort(),r.advance()}})}var Jr={id:"survey",label:"Profile",icon:"user",enabled(r){return r.stages.survey.enabled===!0},fetch(r,e){return r.fetchSurvey(e.uuid).then(t=>(Object.assign(e.stages.survey,t),t.items||t.questions||[]))},mount(r,e){let t=e.config.stages.survey,i=Xn(e);if(!i.length){e.setFooter({hidden:!0}),e.advance();return}e.setScreenHead({title:t.header,subtitle:t.subheader}),e.api.trackPageImpression(e.config.uuid,"upscribe_survey").catch(()=>{});let n=te(r);ts(r,e,i),fs(r,e),t.custom_terms?.enabled&&t.custom_terms.text&&us(e.footerLeading,t.custom_terms),e.setFooter({skipLabel:t.skip_link,primaryLabel:t.cta_label,continueEnabled:!0,onSkip:()=>{e.events.surveySkipped(),e.skip()},onContinue:async()=>{if(n.value){e.complete();return}let o=Ze(i);if(!ds(r,e,o))return;let s=e.store.survey.answers;Xe(e,o);let a=o.map(c=>{if(!Ce(c,o,s))return{question_id:c.id,value:c.input_type==="multi_select"?"[]":""};let u=s[c.id];return c.input_type==="multi_select"?{question_id:c.id,value:JSON.stringify(Array.isArray(u)?u:[])}:{question_id:c.id,value:u??""}}),l=es(r,i);l.forEach(c=>{c.kind==="offer"?e.store.offers.claimed.push(c.recommendable_uuid):c.kind==="recommendation"&&e.store.recommendations.selected.push(c.recommendable_uuid)}),e.events.surveySubmitted({questions:o,rawAnswers:s});try{await e.api.submitSurvey(e.config.uuid,a,l.map(c=>c.uuid)),e.api.trackPageSubscription(e.config.uuid,{page:"upscribe_survey"}).catch(()=>{})}catch(c){console.error("SignupFlow: submitSurvey failed",c)}e.advance()}})}};function Xn(r){let e=new Set(r.store.recommendations.selected),t=new Set(r.store.offers.claimed);return r.data.filter(i=>i.type!=="promotion"?!0:!(e.has(i.recommendable_uuid)||t.has(i.recommendable_uuid)))}function Ze(r){return r.filter(e=>e.type!=="promotion")}function Qr(r){return r.filter(e=>e.type==="promotion")}function es(r,e){return Qr(e).filter(t=>r.querySelector(`input[data-promote-input="${t.uuid}"]`)?.checked===!0)}function ts(r,e,t){let i=d({classes:"sf-survey-body",parent:r});t.forEach(n=>{n.type==="promotion"?is(i,n):rs(r,i,e,n)}),St(r,e.store.survey.answers),wt(r,e,t)}function rs(r,e,t,i){let n=d({classes:"sf-survey-card",parent:e,attributes:{"data-question-card":String(i.id)}}),o=d({classes:"sf-survey-section",parent:n,attributes:{"data-question-id":String(i.id)}});if(i.input_type==="checkbox"){ns(r,o,t,i);return}let s=d({type:"p",classes:"sf-survey-q",parent:o});d({type:"span",text:i.label||"",parent:s}),i.required&&d({type:"span",classes:"sf-required",text:"*",parent:s}),i.input_type==="multi_select"&&i.max_selections&&d({type:"span",classes:"sf-survey-hint",text:`Select up to ${i.max_selections}`,parent:s}),i.input_type==="text_input"?ss(r,o,t,i):(i.input_type==="single_select"||i.input_type==="multi_select")&&os(r,o,t,i)}function is(r,e){let t=e.kind==="offer",i=e.title||"",n=t?{overline:"Exclusive welcome perk",title:i,action:"Yes, I want it",helper:"Check your inbox for access in ~5min"}:{overline:"Our readers also love",title:i,action:"Claim free access"},o=d({type:"label",classes:"sf-survey-card sf-promote",parent:r,attributes:{"data-promote-uuid":e.uuid,"data-kind":e.kind||"","data-recommendable-uuid":e.recommendable_uuid||""}});d({type:"span",classes:"sf-promote-overline",text:n.overline,parent:o});let s=d({classes:"sf-promote-head",parent:o});e.logo_url&&d({type:"img",classes:"sf-promote-logo",parent:s,attributes:{src:e.logo_url,alt:"",loading:"lazy"}}),d({type:"p",classes:"sf-promote-title",text:n.title,parent:s}),e.description&&d({type:"p",classes:"sf-promote-desc",text:e.description,parent:o});let a=d({classes:"sf-survey-checkbox",parent:o});
22d({type:"input",parent:a,attributes:{type:"checkbox","data-promote-input":e.uuid}}),d({type:"span",classes:"sf-survey-checkbox-box",parent:a});let l=d({classes:"sf-promote-copy",parent:a});d({type:"span",classes:"sf-survey-checkbox-label",text:n.action,parent:l}),n.helper&&d({type:"span",classes:"sf-promote-helper",text:n.helper,parent:l})}function ns(r,e,t,i){let n=d({type:"label",classes:"sf-survey-checkbox",parent:e}),o=d({type:"input",parent:n,attributes:{type:"checkbox","data-checkbox-question":String(i.id)}});d({type:"span",classes:"sf-survey-checkbox-box",parent:n}),d({type:"span",classes:"sf-survey-checkbox-label",text:i.label||"",parent:n}),o.addEventListener("change",()=>{t.store.survey.answers[i.id]=o.checked?"Yes":"",wt(r,t,t.data)})}function ss(r,e,t,i){let n={type:i.html_type||"text","data-text-question":String(i.id),placeholder:"Your answer\u2026"};i.autocomplete&&(n.autocomplete=i.autocomplete);let o=d({type:"input",classes:"sf-text-input",parent:e,attributes:n});o.addEventListener("input",()=>{t.store.survey.answers[i.id]=o.value,Xe(t,Ze(t.data)),e.classList.remove("sf-survey-section--error")})}function os(r,e,t,i){let n=i.input_type==="multi_select",o=d({classes:"sf-opt-pills",parent:e});for(let s of i.options||[]){let a=d({type:"button",classes:"sf-opt",parent:o,attributes:{type:"button","data-opt-question":String(i.id),"data-opt-value":s,...n?{"data-opt-multi":"1"}:{}}});d({type:"span",text:s,parent:a}),a.addEventListener("click",()=>as(r,e,t,i.id,s,n))}}function as(r,e,t,i,n,o){let s=t.store.survey.answers,a=t.data,l=Ze(a);if(o){Array.isArray(s[i])||(s[i]=[]);let c=s[i],u=c.indexOf(n);if(u===-1){let p=l.find(m=>m.id===i||String(m.id)===String(i));if(p?.max_selections&&c.length>=p.max_selections)return;c.push(n)}else c.splice(u,1)}else s[i]=n;e.classList.remove("sf-survey-section--error"),Xe(t,l),St(r,s),wt(r,t,a)}function wt(r,e,t){if(!r)return;let i=e.store.survey.answers||{},n=Ze(t);n.forEach(o=>{let s=Ce(o,n,i),a=r.querySelector(`[data-question-card="${o.id}"]`);a&&(a.hidden=!s),!s&&i[o.id]!=null&&i[o.id]!==""&&(delete i[o.id],ls(r,o))}),Qr(t).forEach(o=>
22{let s=Ce(o,n,i),a=r.querySelector(`[data-promote-uuid="${o.uuid}"]`);if(a&&(a.hidden=!s),!s){let l=a?.querySelector("input[data-promote-input]");l&&(l.checked=!1)}}),St(r,i),Xe(e,n)}function ls(r,e){let t=r.querySelector(`.sf-survey-section[data-question-id="${e.id}"]`);if(!!t){if(e.input_type==="text_input"){let i=t.querySelector(`input[data-text-question="${e.id}"]`);i&&(i.value="")}else if(e.input_type==="checkbox"){let i=t.querySelector(`input[data-checkbox-question="${e.id}"]`);i&&(i.checked=!1)}else t.querySelectorAll(".sf-opt.selected").forEach(i=>i.classList.remove("selected"));t.classList.remove("sf-survey-section--error")}}function Ce(r,e,t,i=new Set){if(!r.condition||r.condition.question_id==null)return!0;let n=r.uuid??r.id,o=r.condition.question_id;if(i.has(n))return!1;i.add(n);let s=e.find(a=>a.id===o||String(a.id)===String(o));return!s||!Ce(s,e,t,i)?!1:cs(r.condition,s,t)}function cs(r,e,t){let i=t[e.id]??t[String(e.id)];return e.input_type==="checkbox"?i==="Yes":e.input_type==="multi_select"?(Array.isArray(i)?i:[]).includes(r.value):i===r.value}function Xe(r,e){let t=r.store.survey.answers||{},i=o=>{let s=e.find(a=>a.system_question_identifier===o);return String(s&&t[s.id]||"").trim()},n=i("full_name")||[i("first_name"),i("last_name")].filter(Boolean).join(" ");r.store.survey.profile={name:n||null,company:i("company_name")||null}}function St(r,e){!r||r.querySelectorAll("[data-opt-question]").forEach(t=>{let i=t.dataset.optQuestion,n=t.dataset.optValue,o=t.dataset.optMulti==="1",s=e[i]??e[Number(i)],a=o?Array.isArray(s)&&s.includes(n):s===n;t.classList.toggle("selected",a)})}function us(r,e){if(!r)return;let t=d({type:"p",classes:"sf-survey-disclosure",parent:r});e.url?d({type:"a",text:e.text,parent:t,attributes:{href:`https://${e.url}`,target:"_blank",rel:"noopener noreferrer"}}):t.textContent=e.text}function ds(r,e,t){if(!r)return!0;r.querySelectorAll(".sf-survey-section--error").forEach(o=>o.classList.remove("sf-survey-section--error"));let i=e.store.survey.answers||{},n=[];return t.filter(o=>o.required&&Ce(o,t,i)).forEach(o=>{let s=r.querySelector(`.sf-survey-section[data-question-id="${o.id}"]`);if(!s)return;let a=ps(s,o);(a==null||a===""||Array.isArray(a)&&a.length===0)&&(s.classList.add("sf-survey-section--error","sf-survey-shake"),s.addEventListener("animationend",()=>s.classList.remove("sf-survey-shake"),{once:!0}),n.push(s))}),n.length===0?!0:(n[0].scrollIntoView({behavior:"smooth",block:"nearest"}),!1)}function ps(r,e){if(e.input_type==="text_input"){let t=r.querySelector(`input[data-text-question="${e.id}"]`);return t?t.value.trim():""}if(e.input_type==="single_select"){let t=r.querySelector(".sf-opt.selected");return t?t.dataset.optValue:""}return e.input_type==="multi_select"?Array.from(r.querySelectorAll(".sf-opt.selected")).map(t=>t.dataset.optValue):""}function fs(r,e){let t=r.querySelectorAll(".sf-promote"),i=o=>{let s=o.dataset.recommendableUuid,a=o.dataset.kind;!s||(a==="offer"?e.api.trackOfferEvent("impression",s,{page:"upscribe_survey"}).catch(()=>{}):a==="recommendation"&&e.api.trackRecommendationImpression(e.config.uuid,s,"upscribe_survey").catch(()=>{}))};if(typeof IntersectionObserver!="function"){t.forEach(o=>{o.hidden||i(o)});return}let n=new IntersectionObserver((o,s)=>{for(let a of o)!a.isIntersecting||(i(a.target),s.unobserve(a.target))},{threshold:.5,rootMargin:"0px 0px -10% 0px"});t.forEach(o=>n.observe(o))}var Xr={id:"offers",label:"Welcome offers",icon:"gift",enabled(r){return r.stages.offers.enabled!==!1},async fetch(r){return(await r.fetchOffers()).offer_recommendations||[]},mount(r,e){let t=e.config.stages.offers;e.setFooter({hidden:!0}),e.setScreenHead({title:t.header,subtitle:t.subheader});let i=new Set(e.store.offers.claimed),n=e.data.filter(s=>!i.has(s.uuid));if(!n.length){e.setFooter({hidden:!0}),e.advance();return}let o={channelSubscriptionTracked:!1};e.api.trackPageImpression(e.config.uuid,"upscribe_offers").catch(()=>{}),te(r),ms(r,e,n,o),ws(r,e),Cs(r,e,t),Ps(r,e)}};function ms(r,e,t,i){let n=d({classes:"sf-offer-grid",parent:r,attributes:{"data-count":String(t.length)}});for(let o of t)hs(n,e,o,i)}function hs(r,e,t,i){let n=d({type:"article",classes:"sf-offer-card",parent:r,attributes:{"data-offer-uuid":t.uuid||""}});gs(n,t);let o=d({classes:"sf-offer-body",parent:n});bs(o,t),d({type:"h3",classes:"sf-offer-headline",text:t.headline||"",parent:o}),ys(o,t),t.conversion_type==="lead"&&_s(o,e,t),vs(o,e,t,i)}function gs(r,e){let t=d({classes:"sf-offer-hero",parent:r});if(d({type:"img",classes:"sf-offer-hero-img sf-offer-hero-img--landscape",parent:t,attributes:{src:e.image_url,alt:"",loading:"lazy"}}),d({type:"img",classes:"sf-offer-hero-img sf-offer-hero-img--portrait",parent:t,attributes:{src:e.portrait_image_url||e.image_url,alt:"",loading:"lazy"}}),e.callout){let i=d({classes:"sf-offer-callout",parent:t});d({type:"span",classes:"sf-offer-callout-label",text:e.callout,parent:i}),d({classes:"sf-offer-callout-triangle",parent:i})}}function bs(r,e){let t=d({classes:"sf-offer-brand",parent:r}
22),i=ei(e);if(e.logo_url){let n=d({type:"span",classes:"sf-offer-brand-from",text:"from ",parent:t});d({type:"img",classes:"sf-offer-brand-logo",parent:n,attributes:{src:e.logo_url,alt:"",loading:"lazy"}}),d({type:"span",classes:"sf-brand-name",text:i,parent:n})}else d({type:"span",classes:"sf-brand-name",text:i,parent:t})}function ys(r,e){d({type:"p",classes:"sf-offer-desc",text:e.description||"",parent:r})}function _s(r,e,t){let i=d({classes:"sf-offer-disclaimer",parent:r});d({type:"span",classes:"sf-offer-disclaimer-icon",html:e.icons.info,parent:i});let n=d({type:"p",classes:"sf-offer-disclaimer-text",text:`You'll receive an email from our partner ${ei(t)} to redeem the offer. `,parent:i});d({type:"a",text:"T&Cs apply",parent:n,attributes:{href:"https://sparkloop.app/policies/terms",target:"_blank",rel:"noopener noreferrer"}})}function vs(r,e,t,i){let n=d({classes:"sf-offer-cta",parent:r}),o=d({type:"button",classes:"sf-claim-btn",parent:n,attributes:{"data-offer-uuid":t.uuid||""}});o.appendChild(document.createTextNode(`${t.call_to_action||"Claim offer"} `)),d({type:"span",html:e.icons.external,parent:o}),o.addEventListener("click",()=>xs(o,e,t,i))}function ws(r,e){if(!e.config.stages.offers.sponsor_cta_enabled)return;let t=e.config.branding.name,i=d({classes:"sf-offer-sponsor-cta",parent:r}),n=d({type:"button",classes:"sf-offer-sniper",parent:i,attributes:{type:"button","aria-expanded":"false"}});d({type:"span",classes:"sf-offer-sniper-copy",text:`Reach our ${t} audience with your own offer`,parent:n});let o=d({type:"span",classes:"sf-offer-sniper-arrow",html:e.icons.arrow,parent:n}),s=Ss(i,e),a=l=>{n.setAttribute("aria-expanded",String(l)),s.hidden=!l,o.classList.toggle("is-expanded",l),l&&s.querySelector("input")?.focus()};n.addEventListener("click",()=>{n.disabled||a(n.getAttribute("aria-expanded")!=="true")}),s.querySelector("#sf-brand-inquiry-cancel").addEventListener("click",()=>a(!1)),s.addEventListener("submit",l=>Es(l,s,n,e))}function Ss(r,e){let t=e.config.branding.name,i=e.visitor(),n=e.store.survey.profile||{},o=d({type:"form",classes:"sf-brand-inquiry",parent:r,attributes:{hidden:""}}),s=d({classes:"sf-brand-inquiry-intro",parent:o});d({type:"h3",text:"Reach our readers",parent:s}),d({type:"p",text:`Surprise and delight your target customers in ${t}'s audience with a welcome offer for your brand. Up to 20x more effective than a traditional newsletter ad.`,parent:s});let a=d({classes:"sf-brand-inquiry-fields",parent:o});Et(a,"full_name","Full Name",n.name||"","name"),Et(a,"company_website","Company Website","","url","text",!1,{placeholder:"yourcompany.com",pattern:"\\s*(https?://)?[a-zA-Z0-9]+([\\-.][a-zA-Z0-9]+)*\\.[a-zA-Z]{2,63}(:[0-9]{1,5})?(/[^\\s?]*)?(\\?[^\\s#]*)?(#[^\\s#]*)?\\s*",title:"Enter a website like yourcompany.com"}),Et(a,"email","Work Email",i.email||"","email","email",!0);let l=d({type:"fieldset",classes:"sf-brand-inquiry-credit",parent:o});d({type:"legend",classes:"sf-survey-q",text:"Claim your subscriber-only welcome bonus:",parent:l});let c=d({classes:"sf-brand-inquiry-choices",parent:l});Zr(c,"true","Claim a free, $200 credit",`to promote my brand offer to readers of ${t} and other, relevant newsletters`,!0),Zr(c,"false","No thanks",`I just want to add a free offer for ${t} readers`),d({type:"p",classes:"sf-brand-inquiry-error",parent:o,attributes:{role:"alert",hidden:""}});let u=d({classes:"sf-brand-inquiry-actions",parent:o});return d({type:"button",classes:"sf-ghost-btn",text:"Cancel",parent:u,attributes:{type:"button",id:"sf-brand-inquiry-cancel"}}),d({type:"button",classes:"sf-primary-btn",text:"Submit Inquiry \u2192",parent:u,attributes:{type:"submit"}}),o}async function Es(r,e,t,i){if(r.preventDefault(),i.host.querySelector("input.sf-hp")?.value){i.complete();return}if(!e.reportValidity())return;let n=e.querySelector("button[type='submit']"),o=e.querySelector(".sf-brand-inquiry-error");n.disabled=!0,n.textContent="Sending\u2026",o.hidden=!0;let s=new FormData(e);try{await i.api.submitBrandInquiry({full_name:s.get("full_name"),company_website:s.get("company_website"),email:s.get("email"),credit_requested:s.get("credit_requested")==="true"}
22),ks(t,e,i)}catch{n.disabled=!1,n.textContent="Submit Inquiry \u2192",o.textContent="We couldn't save your details. Please try again.",o.hidden=!1}}function Et(r,e,t,i,n,o="text",s=!1,a={}){let l=d({type:"label",classes:s?"sf-brand-inquiry-field sf-brand-inquiry-field--wide":"sf-brand-inquiry-field",parent:r});d({type:"span",classes:"sf-survey-q",text:t,parent:l}),d({type:"input",classes:"sf-text-input",parent:l,attributes:{name:e,type:o,value:i,autocomplete:n,required:"",...a}})}function Zr(r,e,t,i,n=!1){let o=d({type:"label",classes:"sf-brand-inquiry-choice",parent:r}),s={type:"radio",name:"credit_requested",value:e};n&&(s.checked=""),d({type:"input",parent:o,attributes:s});let a=d({type:"span",parent:o});d({type:"strong",text:t,parent:a}),d({type:"small",text:i,parent:a})}function ks(r,e,t){e.hidden=!0,r.disabled=!0,r.setAttribute("aria-expanded","false"),r.classList.add("is-submitted"),r.replaceChildren(),d({type:"span",html:t.icons.check,parent:r}),d({type:"span",classes:"sf-offer-sniper-copy",text:"Inquiry submitted",parent:r})}function Cs(r,e,t){let i=d({classes:"sf-stage-actions",parent:r}),n=d({classes:"sf-stage-actions-inner",parent:i}),o=d({classes:"sf-stage-actions-buttons",parent:n});d({type:"button",classes:"sf-stage-continue-btn sf-continue-btn sf-primary-btn",text:t.cta_label,parent:o,attributes:{type:"button","data-sl-editable":"cta_label"}}).addEventListener("click",()=>{if(e.host.querySelector("input.sf-hp")?.value){e.complete();return}e.advance()})}async function xs(r,e,t,i){if(e.host.querySelector("input.sf-hp")?.value){e.complete();return}e.events.offerClicked(t),r.disabled=!0,r.classList.add("sf-pulse"),setTimeout(()=>r.classList.remove("sf-pulse"),600);try{await e.api.submitOffer(t,{page:"upscribe_offers"}),r.textContent="Offer claimed successfully!",t.uuid&&e.api.trackOfferEvent("subscription",t.uuid).catch(()=>{}),i.channelSubscriptionTracked||(i.channelSubscriptionTracked=!0,e.api.trackPageSubscription(e.config.uuid,{page:"upscribe_offers",shown:e.data.map(n=>n.uuid).filter(Boolean),subscribed:[t.uuid]}).catch(()=>{}))}catch(n){console.error("SignupFlow: submitOffer failed",n),r.disabled=!1}}function Ps(r,e){let t=r.querySelectorAll(".sf-offer-card");if(typeof IntersectionObserver!="function"){t.forEach(n=>{let o=n.dataset.offerUuid;o&&e.api.trackOfferEvent("impression",o).catch(()=>{})});return}let i=new IntersectionObserver((n,o)=>{for(let s of n){if(!s.isIntersecting)continue;let a=s.target.dataset.offerUuid;a&&e.api.trackOfferEvent("impression",a).catch(()=>{}),o.unobserve(s.target)}},{threshold:.5,rootMargin:"0px 0px -10% 0px"});t.forEach(n=>i.observe(n))}function ei(r){return r.recommended_publication_name}var N={SHOW_THANK_YOU:"show_thank_you",REDIRECT:"redirect",CLOSE:"close"},ti=5e3;function Ct(r={}){let e=r.behaviour;if(e==="redirect")return kt(r.default_redirect_url);if(e==="hide_widget")return{type:N.CLOSE};if(e==="show_thank_you")return{type:N.SHOW_THANK_YOU};if(e==="custom_behaviour"){let t=We(),n=(r.custom_behaviour_rules||[]).find(o=>Ge(o.current_url).test(t));return n?n.behaviour==="redirect"?kt(n.redirect_url):n.behaviour==="show_thank_you"?{type:N.SHOW_THANK_YOU}:{type:N.CLOSE}:kt(r.default_redirect_url)}return{type:N.CLOSE}}function ri(r){if(!r)return null;let e=new URL(r),t=_();t.email&&e.searchParams.append("email",t.email);let i=k().widgets?.upscribe_ref;return i&&e.searchParams.append("ref",i),new URLSearchParams(window.location.search).forEach((n,o)=>{e.searchParams.append(o,n)}),e.toString()}function kt(r){return r?{type:N.REDIRECT,url:r}:{type:N.SHOW_THANK_YOU}}var ii={id:"thankyou",label:"ThankYou",icon:"check",ending:!0,enabled(){return!0},mount(r,e){let t=e.config.stages?.thankyou||{},i=window.SL?.visitor?.mailClient,n=d({classes:"sf-thankyou",parent:r});if(d({classes:"sf-thankyou-check",html:e.icons.checkHero,parent:n}),d({type:"h1",text:t.header,parent:n,attributes:{"data-sl-editable":"header"}}),d({type:"p",text:t.subheader,parent:n,attributes:{"data-sl-editable":"subheader"}}),i){let s=d({type:"a",classes:"sf-inbox-btn",parent:n,attributes:{href:i.url,target:"_blank",rel:"noopener noreferrer"}});d({type:"span",html:e.icons.mail,parent:s}),d({type:"span",text:`Open ${i.brand} to confirm your subscription`,parent:s}),d({type:"span",html:e.icons.arrow,parent:s})}let o=e.mode==="verify"&&e.verificationRedirectUrl;if(e.setFooter({hidden:!0}),!e.framed&&o){setTimeout(()=>{window.location.href=e.verificationRedirectUrl},ti);return}}};var Is={redirect:{heading:"Your Signup Flow ends with a redirect",body:"Subscribers are sent to {url} after the last step."},close:{heading:"Your Signup Flow ends by closing",body:"The widget closes and subscribers stay on the page they signed up from."}},ni={id:"preview_end",ending:!0,mount(r,e){let{url:t}=e.completionAction,i=Is[t?"redirect":"close"],n=d({classes:"sf-flow-end",parent:r});d({type:"h1",text:i.heading,parent:n});let[o,s]=i.body.split("{url}"),a=d({type:"p",text:o,parent:n});s!==void 0&&(d({type:"a",text:t.replace(/^https?:\/\//,""),parent:a,attributes:{href:t,target:"_blank",rel:"noopener noreferrer"}}),a.append(s)),e.setFooter({hidden:!0})}};var xt=[zr,Kr,Jr,Xr],et=ii,si=ni;var Ls=5e3;function oi(r){return`${k().script_url}/${r.publication_uuid}`}async function V(r,e){return(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify(e)})).json()}async function pe(r){let e=new AbortController,t=setTimeout(()=>e.abort(),Ls);try{return(await fetch(r,{method:"GET",signal:e.signal})).json()}finally{clearTimeout(t)}}function tt(r){let e=oi(r),t=()=>G({experiment:r.experiment}),i=null;return{async fetchRecommendations(n){return(await pe(`${e}/upscribes/${n}/recommendations`))?.recommendations||[]},async submitRecommendations(n,{shown:o,subscribed:s,hadInteraction:a,renderTime:l}){let c=Number.isFinite(l)?l:Date.now();await V(`${e}/upscribes/${n}/add_log`,{...t(),subscriber_email:_().email,partner_campaigns:s.join(","),shown_re
22commendations:o.join(","),ref_code:_().referrer,time_to_submission:Math.floor((Date.now()-c)/1e3),had_widget_interaction:!!a,page:"upscribe_recommendations"})},async fetchOffers(){return i||(i=pe(`${e}/recommended_offers`).then(n=>n||{})),i},async fetchSurvey(n){return pe(`${e}/upscribes/${n}/survey`)},async submitBrandInquiry(n){await V(`${e}/brand_inquiry`,{...t(),brand_inquiry:n})},async submitOffer(n,{page:o}={}){let s={...t(),subscriber_email:_().email};if(n.conversion_type==="click"||n.conversion_type==="action"){let a=new URL(n.redirect_url);for(let[l,c]of Object.entries(s))c&&a.searchParams.set(l,c);o&&a.searchParams.set("source_page",o),window.open(a.toString(),"_blank","noopener,noreferrer");return}o&&(s.page=o),await V(`${e}/recommended_offers/${n.uuid}/offer_submissions`,s)},async submitSurvey(n,o,s=[]){await V(`${e}/upscribes/${n}/survey_submissions`,{...t(),answers:o,promotion_uuids:s,subscriber_email:_().email})},async trackVisit(n){await V(`${e}/upscribes/${n}/track_visit_event`,t())},async trackPageImpression(n,o){await V(`${e}/upscribes/${n}/track_impression_event`,{...t(),page:o,subscriber_email:_().email})},async trackPageSubscription(n,{page:o,shown:s,subscribed:a}){await V(`${e}/upscribes/${n}/track_subscription_event`,{...t(),page:o,shown_recommendations:(s||[]).join(","),subscribed_recommendations:(a||[]).join(",")})},async trackRecommendationImpression(n,o,s="upscribe_recommendations"){await V(`${e}/upscribes/${n}/track_recommendation_impression_event`,{...t(),recommendation_uuid:o,page:s})},async trackOfferEvent(n,o,{page:s}={}){let a={...t(),type:n,recommendable_type:"OfferRecommendation",recommendable_uuid:o};s&&(a.page=s),await V(`${e}/recommendation_events`,a)},async exchangeChallenge(n){return V(`${e}/signup_flow_challenge`,{...t(),cf_token:n})}}}function rt(r){let e=oi(r),t=null;return{async fetchRecommendations(i){return(await pe(`${e}/upscribes/${i}/recommendations?test_mode=1`))?.recommendations||[]},async submitRecommendations(){},async fetchOffers(){return t||(t=pe(`${e}/recommended_offers?test_mode=1`).then(i=>i||{})),t},async fetchSurvey(i){return pe(`${e}/upscribes/${i}/survey?test_mode=1`)},async submitOffer(){},async submitBrandInquiry(){},async submitSurvey(){},async trackVisit(){},async trackPageImpression(){},async trackPageSubscription(){},async trackRecommendationImpression(){},async trackOfferEvent(){},async exchangeChallenge(){}}}function As(r){return{id:r.uuid,publicationName:r.publication_name||""}}function ai(r,e){let t=new Set(Array.isArray(e)?e:Array.from(e));return r.filter(i=>i.ref_code&&t.has(i.ref_code)).map(As)}function re(r,e){document.dispatchEvent(new CustomEvent(`sl:${r}`,{detail:e}))}function li(r){let e={signupFlowId:r.uuid,publicationId:r.publication_uuid},t=i=>({...e,stage:i});return{flowOpened(i){re("signup-flow-opened",{...e,stages:i})},flowClosed(){re("signup-flow-closed",e)},recommendationsSubmitted({recs:i,shownRefCodes:n,subscribedRefCodes:o}){re("signup-flow-recommendations-submitted",{...t("recommendations"),shown:ai(i,n),subscribed:ai(i,o)})},recommendationsSkipped(){re("signup-flow-recommendations-skipped",t("recommendations"))},surveySubmitted({questions:i,rawAnswers:n}){let o=i.map(s=>{let a=n[s.id],l;return s.input_type==="multi_select"?l=JSON.stringify(Array.isArray(a)?a:[]):l=a??"",{label:s.label||"",inputType:s.input_type,value:l}});re("signup-flow-survey-submitted",{...t("survey"),answers:o})},surveySkipped(){re("signup-flow-survey-skipped",t("survey"))},offerClicked(i){re("signup-flow-offer-clicked",{...t("offers"),offer:{id:i.uuid,headline:i.headline||"",conversionType:i.conversion_type,brand:i.recommended_publication_name||""}})},spotlightClaimed(i){re("signup-flow-spotlight-claimed",{...t("recommendations"),offer:{id:i.uuid,headline:i.spotlight_headline||"",brand:i.recommended_publication_name||""}})}}}var Ts="sl-challenge",Os=6e4,Rs=15e3;function Ms(r,e){r.classList.add("sf-challenge-card--interactive"),r.style.visibility="hidden";let t=Math.max(0,Math.floor(e.clientWidth||0));return r.classList.remove("sf-challenge-card--interactive"),r.style.visibility="",t>0&&t<300?"compact":"normal"}function ci({api:r,publicationUuid:e,appUrl:t,mount:i,onInteractive:n}){let o=new URL(t).origin,s,a=!1,l=null,c=null,u=d({classes:"sf-challenge-card",parent:i}),p=d({classes:"sf-challenge-card-inner",parent:u}),m=d({classes:"sf-challenge-chrome",parent:p});d({classes:"sf-challenge-icon",html:'<svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3 4 6v6c0 5 3.5 8.5 8 9 4.5-.5 8-4 8-9V6l-8-3z"/>
22<path d="m9 12 2 2 4-4"/></svg>',parent:m}),d({type:"h2",classes:"sf-challenge-title",text:"Quick verification",parent:m}),d({type:"p",classes:"sf-challenge-copy",text:"Confirm you're human to continue. This one-time check keeps recommendations fair for everyone.",parent:m});let h=d({classes:"sf-challenge-widget",parent:p}),g=Ms(u,h),y=new URLSearchParams({cdata:e,size:g}),S=d({type:"iframe",classes:"sf-challenge-frame",parent:h,attributes:{src:`${t}/turnstile?${y.toString()}`,title:"Verification",scrolling:"no","data-sl-challenge-frame":"","data-size":g,"aria-hidden":"true",tabindex:"-1"}}),v=()=>{l!=null&&(clearTimeout(l),l=null)},x=()=>{c!=null&&(clearTimeout(c),c=null)},B=()=>{v(),n(),u.classList.add("sf-challenge-card--interactive"),S.setAttribute("aria-hidden","false"),S.removeAttribute("tabindex")},ee=T=>{a||(a=!0,v(),x(),window.removeEventListener("message",j),u.remove(),s(T))};l=setTimeout(()=>ee(!1),Os);let j=T=>{if(T.origin!==o||T.source!==S.contentWindow)return;let $=T.data;!$||$.type!==Ts||($.interactive&&B(),$.token&&(v(),x(),c=setTimeout(()=>ee(!1),Rs),r.exchangeChallenge($.token).then(Gt=>ee(Gt?.response==="ok")).catch(()=>ee(!1))),$.terminal&&ee(!1))};return window.addEventListener("message",j),new Promise(T=>{s=T})}var ui=[{hosts:["gmail.com","googlemail.com","google.com"],brand:"Gmail",url:"https://mail.google.com"},{hosts:["outlook.com","hotmail.com","live.com","msn.com"],brand:"Outlook",url:"https://outlook.live.com"},{hosts:["yahoo.com","ymail.com","rocketmail.com","yahoo.co.uk","yahoo.fr","yahoo.de"],brand:"Yahoo Mail",url:"https://mail.yahoo.com"},{hosts:["icloud.com","me.com","mac.com"],brand:"iCloud Mail",url:"https://www.icloud.com/mail"},{hosts:["proton.me","protonmail.com","pm.me"],brand:"Proton Mail",url:"https://mail.proton.me"},{hosts:["aol.com"],brand:"AOL Mail",url:"https://mail.aol.com"},{hosts:["gmx.com","gmx.us","gmx.net","gmx.de","gmx.at","gmx.fr"],brand:"GMX Mail",url:"https://www.gmx.com"},{hosts:["mail.com"],brand:"Mail.com",url:"https://www.mail.com"},{hosts:["zoho.com"],brand:"Zoho Mail",url:"https://mail.zoho.com"},{hosts:["fastmail.com","fastmail.fm"],brand:"Fastmail",url:"https://app.fastmail.com"},{hosts:["hey.com"],brand:"HEY",url:"https://app.hey.com"}];async function di(r){let e=r?.split("@")[1]?.toLowerCase();if(!e)return null;let t=ui.find(i=>i.hosts.includes(e));if(t)return{brand:t.brand,url:t.url};try{let i=await fetch(`https://cloudflare-dns.com/dns-query?name=${encodeURIComponent(e)}&type=MX`,{headers:{accept:"application/dns-json"},signal:AbortSignal.timeout(2e3)});if(!i.ok)return null;let n=((await i.json()).Answer||[]).filter(o=>o.type===15).map(o=>o.data.toLowerCase().split(" ").pop().replace(/\.$/,""));for(let o of ui)if(o.hosts.some(s=>n.some(a=>a===s||a.endsWith(`.${s}`))))return{brand:o.brand,url:o.url};return null}catch{return null}}function Pt(r,e={}){Object.entries({primary_color:"--sl-flow-primary",bg_color:"--sl-flow-bg",accent_color:"--sl-flow-accent",heading_color:"--sl-flow-heading",ink_color:"--sl-flow-ink",header_font_family:"--sl-flow-header-font",body_font_family:"--sl-flow-body-font"}).forEach(([i,n])=>{e[i]!=null&&r.style.setProperty(n,e[i])}),e.border_radius&&e.border_radius!=="medium"?r.dataset.borderRadius=e.border_radius:delete r.dataset.borderRadius}var xe={compass:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><polygon points="15.5 8.5 13 13 8.5 15.5 11 11" fill="currentColor" fill-opacity=".25"/></svg>',user:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="4"/><path d="M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8"/></svg>',gift:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="13" rx="1.5"/><path d="M3 12h18M12 8v13M12 8c-1.5-3-6-3-6 0M12 8c1.5-3 6-3 6 0"/></svg>
22',check:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>',checkSm:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>',checkHero:'<svg width="42" height="42" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>',arrow:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M13 6l6 6-6 6"/></svg>',mail:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 7 9-7"/></svg>
22',external:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 4h6v6M20 4l-9 9M19 14v5a1 1 0 01-1 1H5a1 1 0 01-1-1V6a1 1 0 011-1h5"/></svg>',info:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 8h.01M11 12h1v4h1"/></svg>',sparkloop:'<svg width="10" height="12" viewBox="0 0 10 12" fill="currentColor" aria-hidden="true"><path d="M6 0 0 7h3l-1 5 6-7H5l1-5z"/></svg>'};var $s=[...xt,et],it=class{constructor(e,t,i={}){this.cfg=e,this.mode=t,this.options=i,this._resetStore(),this.api=t==="live"?tt(e):rt(e),this.events=li(e),this._stage=null,this._stageIdx=0,this._host=null,this._contentEl=null,this._footerEl=null,this._footerState={},this._resolve=null,this._stages=[],this._stageData={},this._completionAction=null,this._closed=!1,this._container=null,this._stageWhitelist=null,this._pageScrollLock=null,this._pendingNotice=null,this._noticeEl=null}run(e,t){return new Promise(i=>{this._resolve=i,this._framed=e!=null,this._container=e,this._stageWhitelist=t,this._buildStages(t),this._mount(e),this._renderLoading();let n=this._coordinatedPrefetch(),o=Promise.resolve(!0);this.mode==="live"&&this.cfg.challenge===!0&&(o=ci({api:this.api,publicationUuid:this.cfg.publication_uuid,appUrl:k().app_url,mount:this._host.querySelector(".sf-content"),onInteractive:()=>this._enterChallengeInteractive()})),Promise.all([n,o]).then(([,s])=>{if(!this._closed)return this._exitChallengeInteractive(),s?(this.api.trackVisit(this.cfg.uuid).catch(()=>{}),this.events.flowOpened(this._stages.map(a=>a.id)),this.options.initialStage?this.gotoStage(this.options.initialStage):this._stages.length?this._runStage(0):this._executeCompletionAction()):this._executeCompletionAction()})})}teardown(){this._closed||(this._closed=!0,this.events.flowClosed()),this._destroyDom(),this._resolve&&this._resolve()}_destroyDom(){this._clearNotice();let e=this._host||document.querySelector("sparkloop-signup-flow");e&&e.remove();let t=document.getElementById("sl-signup-flow-custom-css");t&&t.remove(),this._unlockPageScroll(),this._host=null}_lockPageScroll(){if(this._pageScrollLock)return;let e=document.documentElement,t=document.body;this._pageScrollLock={htmlOverflow:e.style.overflow,bodyOverflow:t.style.overflow,htmlOverscrollBehavior:e.style.overscrollBehavior,bodyOverscrollBehavior:t.style.overscrollBehavior},e.style.overflow="hidden",t.style.overflow="hidden",e.style.overscrollBehavior="none",t.style.overscrollBehavior="none"}_unlockPageScroll(){if(!this._pageScrollLock)return;let e=document.documentElement,t=document.body;e.style.overflow=this._pageScrollLock.htmlOverflow,t.style.overflow=this._pageScrollLock.bodyOverflow,e.style.overscrollBehavior=this._pageScrollLock.htmlOverscrollBehavior,t.style.overscrollBehavior=this._pageScrollLock.bodyOverscrollBehavior,this._pageScrollLock=null}_buildStages(e){this._stages=xt.filter(t=>e&&e.length&&!e.includes(t.id)?!1:t.enabled(this.cfg))}async _coordinatedPrefetch(){let e=await Promise.all(this._stages.filter(t=>typeof t.fetch=="function").map(t=>this._fetchStage(t)));this._stageData={};for(let{stage:t,data:i}of e)this._stageData[t.id]=i;if(this._stages=this._stages.filter(t=>this._stageData[t.id]===void 0||this._stageData[t.id].length>0),this._completionAction=Ct(this.cfg.completion),this._completionAction.type===N.SHOW_THANK_YOU)this._stages.push(et);else if(this.mode==="preview"){let t=this.cfg.completion?.behaviour==="custom_behaviour";this._stages.push(t?et:si)}this.mode==="verify"&&(this._stages=this._stages.filter(t=>t.id==="recommendations")),this.mode==="live"&&di(window.SL?.visitor?.email).then(t=>{_({mailClient:t})})}async _fetchStage(e){let t=[];try{let i=await e.fetch(this.api,this.cfg);t=this._limitCount(i)}catch(i){console.error(`SignupFlow: fetch failed for ${e.id}`,i)}return{stage:e,data:t}}_limitCount(e){if(!Array.isArray(e))return[];let t=this.options.forceCount;return Number.isFinite(t)?e.slice(0,t):e}_mount(e){let t=document.body;
22e!=null&&(t=typeof e=="string"?document.querySelector(e):e);let i=document.createElement("sparkloop-signup-flow");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),this._framed&&i.classList.add("sf-framed"),Pt(i,this.cfg.branding),this.mode==="verify"&&(i.style.zIndex="2147483646"),this._framed||this._lockPageScroll();let n=d({classes:"sf-flow",parent:i,attributes:{"data-mode":this.mode}});this._headerEl=this._buildHeader(n),this._contentEl=this._buildContent(n),this._footerEl=this._buildFooter(n),this.cfg.branding.powered_by_enabled!==!1&&this._buildWatermark(n);let o=this.cfg.branding.custom_css;if(o){let s=document.createElement("style");s.id="sl-signup-flow-custom-css",s.textContent=o,document.head.appendChild(s)}t.appendChild(i),this._host=i}_buildHeader(e){let t=d({type:"header",classes:"sf-header",parent:e,attributes:{"aria-label":"Signup progress"}}),i=d({classes:"sf-header-inner",parent:t}),n=d({classes:"sf-pub-logo",parent:i,attributes:{"aria-hidden":"true"}});d({type:"img",classes:"sf-pub-mark",parent:n,attributes:{src:this.cfg.branding.logo_url,alt:""}}),d({type:"span",text:this.cfg.branding.name,parent:n}),this._progressEl=d({type:"nav",classes:"sf-progress",parent:i,attributes:{"aria-label":"Steps"}});let o=d({classes:"sf-progress-step",parent:this._progressEl,attributes:{"aria-hidden":"true",style:"visibility: hidden;"}});d({classes:"sf-progress-circle",parent:o}),d({classes:"sf-progress-label",text:"\xA0",parent:o});let s=d({classes:"sf-header-meta",parent:i});return d({type:"div",text:"Signed up as",parent:s}),this._headerEmailEl=d({type:"div",classes:"sf-header-email",parent:s}),this._writeHeaderEmail(),t}_buildScreenHead(e){let t=d({classes:"sf-screen-head",parent:e,attributes:{"data-screen-head":"",hidden:"hidden"}});return d({type:"h1",parent:t,attributes:{"data-sl-editable":"header"}}),d({type:"p",parent:t,attributes:{"data-sl-editable":"subheader"}}),t}_buildContent(e){let t=d({type:"main",classes:"sf-content",parent:e,attributes:{tabindex:"-1"}});this._screenHeadEl=this._buildScreenHead(t);let i=d({classes:"sf-content-inner",parent:t});return d({classes:"sf-stage-body",parent:i,attributes:{"data-stage-content":""}})}_buildFooter(e){let t=d({type:"footer",classes:"sf-footer",parent:e,attributes:{"aria-label":"Navigation"}}),i=d({classes:"sf-footer-inner",parent:t});this._footerLeadingEl=d({classes:"sf-footer-leading",parent:i});let n=d({classes:"sf-footer-actions",parent:i});d({type:"button",classes:"sf-skip-btn sf-ghost-btn",parent:n,attributes:{type:"button",hidden:"hidden","data-sl-editable":"skip_link"}}).addEventListener("click",()=>this._footerState.onSkip?.());let s=d({type:"button",classes:"sf-continue-btn sf-primary-btn",parent:n,attributes:{type:"button","data-sl-editable":"cta_label"}});return s.textContent="Continue",s.addEventListener("click",()=>this._footerState.onContinue?.()),t}_buildWatermark(e){d({type:"a",classes:"sf-watermark",html:`${xe.sparkloop}<span>by SparkLoop</span>`,parent:e,attributes:{href:"https://sparkloop.app",target:"_blank",rel:"noopener noreferrer","aria-label":"by SparkLoop"}})}_writeHeaderEmail(){this._headerEmailEl&&(this._headerEmailEl.textContent=window.SL?.visitor?.email||"")}_renderProgress(){if(!this._progressEl)return;this._progressEl.textContent="";let e=this._progressSteps(),t=!!this._stage.ending,i=this._stage.progressAs||this._stage.id,n=Math.max(0,e.findIndex(o=>o.id===i));e.forEach((o,s)=>{let a=t||s<n||s===0,l=!t&&s===n&&s!==0,c=["sf-progress-step"];a?c.push("done"):l&&c.push("current");let u=a?" (complete)":l?" (current)":"",p=d({classes:c.join(" "),parent:this._progressEl,attributes:{"aria-label":`${o.label}${u}`}});d({classes:"sf-progress-circle",html:xe[a?"check":o.icon]||"",parent:p}),s<e.length-1&&d({type:"span",classes:"sf-progress-line",parent:p}),d({classes:"sf-progress-label",text:o.label,parent:p})})}_progressSteps(){let e=this._stages.filter(n=>!n.ending),t=[],i=new Set;for(let n of e){let o=n.progressAs||n.id;if(i.has(o))continue;i.add(o);let s=e.find(a=>a.id===o)||n;t.push({id:o,label:s.label,icon:s.icon})}return[{id:"subscribe",label:"Subscribe",icon:"check"},...t]}_runStage(e){return this._mountStage(this._stages[e],e)}_advance(){let e=this._stageIdx+1;return e<this._stages.length?this._runStage(e):this._executeCompletionAction()}_executeCompletionAction(){let e=this._completionAction||Ct(this.cfg.completion);if(this.mode==="verify"&&this.options.verificationRedirectUrl)return window.location.href=this.options.verificationRedirectUrl,Promise.resolve();if(this._framed||this.mode!=="live")return Promise.resolve();if(e.type===N.SHOW_THANK_YOU){let t=this._stages.findIndex(i=>i.id==="thankyou");if(t>=0)return this._runStage(t)}if(e.type===N.REDIRECT){let t=ri(e.url);return t?window.location.href=t:this.teardown(),Promise.resolve()}return this.teardown(),Promise.resolve()}async _mountStage(e,t){if(!e)return Promise.resolve();this._stage=e,this._stageIdx=t;let i=this._context(this._stageData[e.id]??null),n=this._host?.querySelector(".sf-content"),o=()=>{this._host&&(this._host.dataset.stage=e.id),this._setScreenHead({}),this._renderProgress(),n&&(n.scrollTop=0),this._contentEl.textContent="",this._footerLeadingEl&&(this._footerLeadingEl.textContent=""),this._footerState={},this._headerEl&&(this._headerEl.hidden=!1),this._footerEl&&(this._footerEl.hidden=!1)}
22,s=this._pendingNotice;this._pendingNotice=null,s||this._clearNotice();let a=()=>{o(),e.mount(this._contentEl,i)};return s&&(o(),this._mountNotice(s),await new Promise(l=>setTimeout(l,140))),typeof document.startViewTransition=="function"?document.startViewTransition(a).finished.catch(()=>{}):Us(this._contentEl,a)}_renderLoading(){this._contentEl.textContent="",this._headerEl&&(this._headerEl.hidden=!0),this._footerEl&&(this._footerEl.hidden=!0);let e=d({classes:"sf-loading",parent:this._contentEl});d({classes:"sf-spinner",parent:e}),d({classes:"sf-loading-copy",text:"Just a moment \u2014 setting up your welcome experience\u2026",parent:e})}_enterChallengeInteractive(){this._host&&(this._host.dataset.challenge="interactive"),this._contentEl?.querySelector(".sf-loading")?.remove()}_exitChallengeInteractive(){this._host&&delete this._host.dataset.challenge}_mountNotice(e){if(this._clearNotice(),!e)return;let t=this._host.querySelector(".sf-content");if(!t||!this._screenHeadEl)return;let i=d({classes:"sf-spotlight-claimed",attributes:{"data-sf-spotlight-claimed":"",role:"status"}});d({classes:"sf-spotlight-claimed-icon",html:xe.check,parent:i,attributes:{"aria-hidden":"true"}});let n=d({classes:"sf-spotlight-claimed-copy",parent:i});d({type:"span",classes:"sf-spotlight-claimed-title",text:e,parent:n}),t.insertBefore(i,this._screenHeadEl),this._noticeEl=i,i.classList.add("is-visible")}_clearNotice(){this._noticeEl?.remove(),this._noticeEl=null}_context(e){return{store:this.store,api:this.api,events:this.events,config:this.cfg,mode:this.mode,framed:this._framed,keepOpen:!!this.options.keepOpen,host:this._host,footerLeading:this._footerLeadingEl,data:e,visitor:()=>_(),icons:xe,completionAction:this._completionAction,verificationRedirectUrl:this.options.verificationRedirectUrl||null,advance:()=>this._advance(),skip:()=>this._advance(),complete:()=>this.teardown(),setFooter:t=>this._setFooter(t),setScreenHead:t=>this._setScreenHead(t),setNotice:t=>{this._pendingNotice=t}}}_setScreenHead({title:e,subtitle:t}={}){let i=this._screenHeadEl;if(!!i){if(!e&&!t){i.hidden=!0;return}i.hidden=!1,i.querySelector("h1").textContent=e||"",i.querySelector("p").textContent=t||""}}_setFooter(e){Object.assign(this._footerState,e);let t=this._footerEl;if(!t)return;e.hidden!==void 0&&(t.hidden=e.hidden);let i=t.querySelector(".sf-skip-btn");i&&e.skipLabel!==void 0&&(i.hidden=!e.skipLabel,i.textContent=e.skipLabel||"");let n=t.querySelector(".sf-continue-btn");n&&(e.primaryLabel!==void 0&&(n.textContent=this._footerState.primaryLabel||"Continue"),e.continueEnabled!==void 0&&(n.disabled=!e.continueEnabled))}applyBranding(e={}){!this.cfg?.branding||(Object.assign(this.cfg.branding,e),this._host&&Pt(this._host,e))}remount(e,t=null){return this.cfg=e,this.api=this.mode==="live"?tt(this.cfg):rt(this.cfg),this._destroyDom(),this._stageData={},this._stageIdx=0,this._buildStages(this._stageWhitelist),this._mount(this._container),this._renderLoading(),this._coordinatedPrefetch().then(()=>t?this.gotoStage(t):this._runStage(0))}restart(){return this.api=this.mode==="live"?tt(this.cfg):rt(this.cfg),this._resetStore(),this._destroyDom(),this._stageData={},this._stageIdx=0,this._buildStages(this._stageWhitelist),this._mount(this._container),this._renderLoading(),this._coordinatedPrefetch().then(()=>this._runStage(0))}_resetStore(){this.store={recommendations:{selected:[],recs:[]},survey:{answers:{},profile:{}},offers:{claimed:[]},spotlight:{outcome:null}}}gotoStage(e){if(e==="end")return this._mountStage(this._stages[this._stages.length-1],this._stages.length-1);let t=this._stages.findIndex(o=>o.id===e);if(t>=0)return this._mountStage(this._stages[t],t),Promise.resolve();let i=$s.find(o=>o.id===e);return i?(typeof i.fetch=="function"&&this._stageData[i.id]===void 0?this._fetchStage(i).then(({data:o})=>{this._stageData[i.id]=o}):Promise.resolve()).then(()=>this._mountStage(i,this._stages.length)):(console.warn(`SignupFlow: gotoStage unknown stage "${e}"`),Promise.resolve())}};function Us(r,e){if(!r){e();return}r.dataset.entering="",requestAnimationFrame(()=>{e(),requestAnimationFrame(()=>delete r.dataset.entering)})}
22var Ds="signup-flow",Lt=class{constructor(){this._orchestrator=null}open(e={}){let{container:t,stages:i,subscriber:n,upscribeId:o,keepOpen:s}=e,a=It(o);if(!a)return console.warn("SignupFlow: no upscribe config found"),Promise.resolve();let l=n?.email||_().email;return l&&!Ke(l)?(console.warn("Invalid email address"),Promise.resolve()):(n&&_(n),this._run(a,"live",{container:t,stages:i,keepOpen:s}))}preview(e={}){let{container:t,stages:i,upscribeId:n,keepOpen:o,initialStage:s}=e,a=It(n);return a?this._run(a,"preview",{container:t,stages:i,keepOpen:o,initialStage:s}):(console.warn("SignupFlow: no upscribe config found"),Promise.resolve())}verify(e={}){let{container:t,stages:i,upscribeId:n,keepOpen:o,verificationRedirectUrl:s}=e,a=It(n);return a?this._run(a,"verify",{container:t,stages:i,keepOpen:o,verificationRedirectUrl:s}):(console.warn("SignupFlow: no upscribe config found"),Promise.resolve())}close(){this._orchestrator&&(this._orchestrator.teardown(),this._orchestrator=null)}applyPreviewBranding(e){!this._inPreview("applyPreviewBranding")||this._or
22chestrator.applyBranding(e)}remountPreview(e,t=null){return this._inPreview("remountPreview")?this._orchestrator.remount(e,t):Promise.resolve()}gotoPreviewStage(e){return this._inPreview("gotoPreviewStage")?this._orchestrator.gotoStage(e):Promise.resolve()}restartPreview(){return this._inPreview("restartPreview")?this._orchestrator.restart():Promise.resolve()}_inPreview(e){return!this._orchestrator||this._orchestrator.mode!=="preview"?(console.warn(`[signupFlow.${e}] not in preview mode \u2014 ignoring`),!1):!0}_run(e,t,{container:i,stages:n,keepOpen:o,verificationRedirectUrl:s,initialStage:a}={}){return this.close(),Ee(Ds),this._orchestrator=new it(e,t,{forceCount:Fs(),keepOpen:!!o,verificationRedirectUrl:s||null,initialStage:a||null}),this._orchestrator.run(i||null,n||null)}};function It(r){return we(r)}function Fs(){let r=new URLSearchParams(window.location.search).get("sl_force_count");if(r==null)return null;let e=parseInt(r,10);return Number.isFinite(e)&&e>=0?e:null}var Pe=new Lt;var ie=class{constructor(){this.config=k(),this.formId=0,this.submittedFormsIds=[]}track(){!this.config.scan_forms||(this.trackStandardForms(),document.addEventListener("pico.user.registered",e=>this.trackPicoForms(e)),document.addEventListener("om.Optin.init.submit",e=>this.trackOptinMonsterForms(e)),window.addEventListener("klaviyoForms",e=>this.trackKlaviyoForms(e)),document.addEventListener("MemberSpace.conversion",e=>this.trackMemberSpaceForms(e)),document.addEventListener("ckjs:submission:complete",e=>this.trackConvertKitForms(e)),document.addEventListener("emailoctopus:form.success",e=>this.trackEmailOctopusForms(e)),document.addEventListener("cf:form_submitted:ok",e=>this.trackClickFunnelsForms(e)),document.addEventListener("gform/postRender",e=>this.trackGravityForms(e)),this.trackElementorForms(),this.trackSquareSpaceForms(),this.trackWisepopsForms(),this.trackDynamicForms())}trackForm(e){if(!e.hasAttribute("data-sparkloop-form-ignore")&&!vt(e)&&!e.hasAttribute("data-sparkloop-form-id")){this.formId++,e.dataset.sparkloopFormId=this.formId,console.log("tracking form",e);let t=e.getAttribute("action");t&&!t.includes("#")?e.addEventListener("submit",i=>this.combFormForEmail(e),{once:!0}):this.trackAjaxForm(e)}}trackStandardForms(){document.querySelectorAll(this.config.form_selector||"form").forEach(t=>{this.trackForm(t)})}trackDynamicForms(){let e=i=>{i.forEach(n=>{n.target.querySelectorAll("form").forEach(o=>{this.trackForm(o)})})};new MutationObserver(e).observe(document.body,{childList:!0,subtree:!0})}trackAjaxForm(e){let t=Je(e);if(t){t.addEventListener("keydown",function(n){n.key==="Enter"&&(console.log("Tracked ajax form submission by pressing ENTER key"),this.combFormForEmail(e))},{once:!0});let i=yr(e);i&&i.addEventListener("click",()=>{console.log("Tracked ajax form submission by clicking submit button"),this.combFormForEmail(e)},{once:!0})}}trackKlaviyoForms(e){console.log("klaviyo form submitted",e),console.log("klaviyo event type",e.detail.type);let t,i=e.detail.type;if(i=="submit"||i=="stepSubmit"){let n=document.querySelector(`.klaviyo-form-${e.detail.formId}`);n&&(t=n.querySelector("form"));let o=e.detail.metaData.$email;if(o)_({email:o.trim()});else return;i=="submit"?this.captureSubscriber({form:t}):i=="stepSubmit"&&setTimeout(this.captureSubscriber({form:t}),1e3)}}trackPicoForms(e){console.log("pico form submitted",e),console.log("pico event email",e.detail.email.trim()),_({email:e.detail.email.trim()}),this.captureSubscriber()}trackOptinMonsterForms(e){console.log("optinMonster form submitted",e),console.log("optinMonster event email",e.detail.Optin.data.fields.email.trim()),_({email:e.detail.Optin.data.fields.email.trim()}),this.captureSubscriber()}trackElementorForms(){if(window.jQuery){let e=!!jQuery.fn.on,t=i=>this.combFormForEmail(i.target);e?jQuery(document).on("submit_success",t):jQuery(document).bind("submit_success",t)}}trackMemberSpaceForms({detail:e}){console.log("memberSpace form submitted",e);let{order:t,plan:i,member:n}=e;_({email:n.email.trim()}),this.captureSubscriber()}trackSquareSpaceForms(){var e=this;typeof Y<"u"&&typeof Y.all=="function"&&Y.all("form").each(function(t){t.on("submit",function(i){let n;typeof t._node=="string"?n=document.querySelector(t._node):n=t._node,n&&!vt(n)&&e.combFormForEmail(n)})})}trackConvertKitForms(e){console.log("ConvertKit form submitted",e),console.log("ConvertKit event email",e.detail.email_address.trim()),_({email:e.detail.email_address.trim()}),e.detail.recommendations&&_({upscribeBlocked:!0}),this.captureSubscriber({form:e.target})}trackEmailOctopusForms(e){console.log("emailoctopus form submitted",e),console.log("emailoctopus event detail",e.detail);let t=document.querySelector("[eo-block='form']").querySelector("form")||document.querySelector(".emailoctopus-form");if(t){let i=e.detail.contact.email_address||t.querySelector("input[type=email]").value;_({email:i.trim()}),this.captureSubscriber({form:t})}}trackClickFunnelsForms(e){console.log("clickfunnels form submitted",e),console.log("clickfunnels event detail",e.detail);let t=e.detail.contact?.email;t&&(_({email:t.trim()}),this.captureSubscriber())}trackGravityForms(e){console.log("gravity form submitted",e),console.log("gravity event detail",e.detail),gform!==void 0&&gform.utils.addAsyncFilter("gform/submission/pre_submission",async t=>{let i=gform.utils.getNode(".gfield--type-email input",t.form,!0);i&&(_({email:i.trim()}),this.captureSubscriber({form:t.form}))})}
22trackWisepopsForms(){window.wisepops&&wisepops("listen","after-form-submit",e=>{console.log("wisepops form submitted",e),console.log("wisepops event detail",e.detail);let t=e.target.elements.email;t&&(_({email:t.value.trim()}),this.captureSubscriber({form:e.target}))})}combFormForEmail(e){if(this.submittedFormsIds.includes(e.dataset.formId))return;let t=Je(e);t&&t.value&&(O("form-submitted"),console.log("email input detected",t),this.submittedFormsIds.push(e.dataset.formId),_({email:t.value.trim()}),this.captureSubscriber({form:e}))}async captureSubscriber({form:e=null}={}){let t=Se();if(!t.email){console.log("No email found in the form submission");return}if(!Ke(t.email)){console.error("Invalid email address");return}if(console.log("\u2705 Form submission tracked succesfully. Email captured: "+t.email),A()&&(window.onbeforeunload=function(){return"Are you sure you want to leave?"}),W())if(ne()){this.completePartnerVerification();return}else{if(ve()){this.completeCampaignVerification(t);return}if(ce()){this.completeUpscribeVerification(e);return}if(Ye()){this.completePartnerProgramVerification();return}}try{if(this.loadUpscribe(e),ze()){let n=await Cr(t);L(n.subscriber)}else console.log("Skipping subscriber tracking - no referral or partner link detected")}catch(i){console.log(i)}}async completePartnerVerification(){A()&&console.log("DEBUG: completePartnerVerification() called");try{let e=w("SLVerifyInstall");if(e){let t=await Or(e);A()&&console.log("DEBUG: completePartnerVerification() response",t),be("[Step 3 of 3] Referral tracking working successfully","Your test referral was successful. You can now safely recommend this publication via your partner link."),setTimeout(()=>{window.open(`${this.config.app_url}/partner_profile/partner_campaigns/${e}`)},2500)}}catch(e){console.log(e.message)}}async completeCampaignVerification(e){try{let t=w("SLVerifyInstall");e.campaign_id=t;let i=await Pr(e);be("[Step 3 of 3] Referral tracking working successfully",`SparkLoop was able to track the referral correctly via your form. 23 24PS: If your form normally redirects to another page, don't worry. We have temporarily disabled the redirect to test the referral. 25 26\u{1F449} you'll be redirected back to SparkLoop in a few seconds...`),setTimeout(()=>{window.open(i.redirect_url,"_blank")},4e3)}catch(t){console.log(t.message)}}async completeUpscribeVerification(e){A()&&console.log("DEBUG: completeUpscribeVerification() called");try{let t=w("SLVerifyInstall"),i=await Ar(t);A()&&console.log(`DEBUG: Upscribe ID ${t}`),this.loadUpscribe(e,{verificationRedirectUrl:i.redirect_url}),be("[Step 3 of 3] Signup tracking working successfully","SparkLoop was able to track the signup correctly via your form.<br/><br/>PS: If your form normally redirects to another page, don't worry. We have temporarily disabled the redirect to test the referral.<br/><br/>\u{1F449} you'll be redirected back to SparkLoop in a few seconds...")}catch(t){console.log(t.message)}}async completePartnerProgramVerification(){A()&&console.log("DEBUG: completePartnerProgramVerification() called");try{let e=w("SLVerifyInstall"),t=await Tr(e);A()&&console.log(`DEBUG: PartnerProgram ID ${e}`),be("[Step 3 of 3] Signup tracking working successfully","SparkLoop was able to track the signup correctly via your form.<br/><br/>PS: If your form normally redirects to another page, don't worry. We have temporarily disabled the redirect to test the referral.<br/><br/>\u{1F449} you'll be redirected back to SparkLoop in a few seconds..."),setTimeout(()=>{window.open(t.redirect_url,"_blank")},4e3)}catch(e){console.log(e.message)}}getUpscribeId(e){if(A()&&console.log("DEBUG: getUpscribeId() called"),A()&&console.log(`DEBUG: form ${e}`),ve())return;let t=this.config.widgets.upscribes.find(i=>{if(!ce()&&!i.enabled)return console.log(`Upscribe ${i.uuid} is not enabled`),!1;if(i.visibility.installation!="widget")return console.log(`Upscribe ${i.uuid} is not set to be displayed as a widget`),!1;if(i.visibility.all_pages)return!0;let n=We(),o=i.visibility.rules.find(s=>{let a=Ge(s);return n.match(a)});return o?(console.log(`Upscribe ${i.uuid} is set to be displayed on ${o}`),!0):(console.log(`Can't find a matching rule for Upscribe ${i.uuid}`),!1)});return A()&&console.log(`DEBUG: upscribe ${t}`),t?e?e.dataset.sparkloopUpscribe!=="false"?t.uuid:null:t.uuid:null}async loadUpscribe(e=null,t={}){if(A()&&console.log("DEBUG: loadUpscribe() called"),SL.config.upscribeDisabled){console.log("Upscribe is disabled");return}if(ne()){console.log("Upscribe is disabled in partner mode");return}if(_().upscribeShown){console.log("Upscribe has already been shown to this visitor");return}if(_().upscribeBlocked){console.log("Upscribe has been blocked for this visitor");return}let i=this.getUpscribeId(e);A()&&console.log(`DEBUG: upscribeId ${i}`),i&&(_({upscribeShown:!0}),ce()?Pe.verify({upscribeId:i,verificationRedirectUrl:t.verificationRedirectUrl}):Pe.open({upscribeId:i}))}};var Bs={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function pi(r){return r.replace(RegExp("^"+(r.match(/^(\t| )+/)||"")[0],"gm"),"")}function Ie(r){return(r+"").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function J(r,e){var t,i,n,o,s,a=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,l=[],c="",u=e||{},p=0;function m(g){var y=Bs[g[1]||""],S=l[l.length-1]==g;return y?y[1]?(S?l.pop():l.push(g),y[0|S]):y[0]:g}function h(){for(var g="";l.length;)g+=m(l[l.length-1]);return g}for(r=r.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(g,y,S){return u[y.toLowerCase()]=S,""}).replace(/^\n+|\n+$/g,"");n=a.exec(r);)i=r.substring(p,n.index),p=a.lastIndex,t=n[0],i.match(/[^\\](\\\\)*\\$/)||((s=n[3]||n[4])?t='<pre class="code '+(n[4]?"poetry":n[2].toLowerCase())+'"><code'+(n[2]?' class="language-'+n[2].toLowerCase()+'"':"")+">"+pi(Ie(s).replace(/^\n+|\n+$/g,""))+"</code></pre>":(s=n[6])?(s.match(/\./)&&(n[5]=n[5].replace(/^\d+/gm,"")),o=J(pi(n[5].replace(/^\s*[>*+.-]/gm,""))),s==">
26"?s="blockquote":(s=s.match(/\./)?"ol":"ul",o=o.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),t="<"+s+">"+o+"</"+s+">"):n[8]?t='<img src="'+Ie(n[8])+'" alt="'+Ie(n[7])+'">':n[10]?(c=c.replace("<a>",'<a href="'+Ie(n[11]||u[i.toLowerCase()])+'">'),t=h()+"</a>"):n[9]?t="<a>":n[12]||n[14]?t="<"+(s="h"+(n[14]?n[14].length:n[13]>"="?1:2))+">"+J(n[12]||n[15],u)+"</"+s+">":n[16]?t="<code>"+Ie(n[16])+"</code>":(n[17]||n[1])&&(t=m(n[17]||"--"))),c+=i,c+=t;return(c+r.substring(p)+h()).replace(/^\n+|\n+$/g,"")}var f=d,Le=class{constructor({referral_hub:e={}}={}){this.config=k(),this.referral_hub=e}animateCSS=(e,t)=>new Promise((i,n)=>{e.classList.add(t);function o(s){s.stopPropagation(),e.classList.remove(t),i("Animation ended")}e.addEventListener("animationend",o,{once:!0})});socialSharingLink=(e,t)=>{let i;return t==="facebook"?i="https://www.facebook.com/sharer.php?u="+encodeURIComponent(this.referralLink("facebook")):t==="twitter"?i="https://twitter.com/intent/tweet?text="+encodeURIComponent(e.twitter.message+` 27 28`+this.referralLink("twitter")):t==="email"?i="mailto:?subject="+encodeURIComponent(e.email.subject)+"&body="+encodeURIComponent(e.email.message+` 29 30`+this.referralLink("email")):t==="whatsapp"?i="https://api.whatsapp.com/send?text="+encodeURIComponent(e.whatsapp.message+` 31 32`+this.referralLink("whatsapp")):t==="facebook_messenger"?i=this.messengerLink():t==="linkedin"?i="https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(this.referralLink("linkedin")):t==="reddit"?i="https://www.reddit.com/submit?url="+encodeURIComponent(this.referralLink("reddit"))+"&title="+e.reddit.message:t==="telegram"?i="https://t.me/share/url?url="+encodeURIComponent(this.referralLink("telegram"))+"&text"+encodeURIComponent(e.telegram.message):t==="line"&&(i="https://line.me/R/msg/text/?"+encodeURIComponent(e.line.message+` 33 34`+this.referralLink("line"))),i};referralLink=(e=null)=>{let t=L();if(t){let i=t.referral_link;return e&&(i+=`?utm_source=${e}`),i}else return this.config.app_url+"?rh_ref=ABC123"};messengerLink=()=>{let e;return/Mobi|Android/i.test(navigator.userAgent)?e="fb-messenger://share?redirect_uri="+encodeURIComponent(this.config.default_url)+"&link="+encodeURIComponent(this.referralLink("facebook_messenger")):e="https://www.facebook.com/dialog/send?app_id=189109296592814&link="+encodeURIComponent(this.referralLink("facebook_messenger"))+"&redirect_uri="+encodeURIComponent(this.config.default_url),e};poweredByLink=(e,t,i="")=>{let n=`https://sparkloop.app/${i}?utm_campaign=powered-by&utm_source=${e}&utm_medium=${this.config.uuid}`;return f({type:"a",attributes:{href:n,target:"_blank"},text:"\u26A1\uFE0F by SparkLoop",parent:t})};formWidget=({onSubmit:e})=>{let{form_widget:t}=this.referral_hub;t.cover_image.enabled&&_t(t.cover_image.url);let i=f({id:"sl-form-screen",classes:"sl-widget-body"});if(t.cover_image.enabled){i.classList.add("sl-cover-image","sl-cover-image--"+t.cover_image.position);let g=f({type:"figure",parent:i});f({type:"img",attributes:{src:t.cover_image.url},parent:g})}let n=f({type:"section",id:"sl-form-section",classes:"sl-form-section",parent:i}),o=f({classes:"sl-form-content",parent:n});t.header&&f({type:"h2",html:J(t.header),parent:o}),t.subheader&&f({type:"p",html:J(t.subheader),parent:o});let s=f({type:"form",parent:n,attributes:{"data-sparkloop-form-ignore":!0}}),a=f({classes:"sl-form-container",parent:s});if(t.form.name_input.enabled){let g={type:"text",name:"name",placeholder:t.form.name_input.placeholder};R()||(g.required=!0),f({type:"input",attributes:g,parent:a})}let l={type:"email",name:"email",placeholder:t.form.email_input.placeholder};R()||(l.required=!0);let c=f({type:"input",attributes:l,parent:a}),u=f({type:"button",attributes:{type:"submit"},classes:"sl-button",text:t.form.button.label,parent:a});s.addEventListener("submit",g=>{g.preventDefault(),g.stopPropagation(),c.value.length>0&&(u.disabled=!0,e(c.value).catch(y=>{console.log(y),u.disabled=!1}))});let p=f({type:"footer",parent:n});t.tabs.how_it_works.enabled&&(f({type:"a",attributes:{href:"#"},text:t.tabs.how_it_works.label,parent:p}).addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),this.animateCSS(n,"sl-fadeOutLeft").then(S=>{n.style.display="none",m.style.display="flex"})}),f({type:"span",text:"|",parent:p})),t.tabs.terms.enabled&&(f({type:"a",attributes:{href:"https://"+t.tabs.terms.url},text:t.tabs.terms.label,parent:p}),f({type:"span",text:"|",parent:p})),this.referral_hub.styling.powered_by_enabled&&this.poweredByLink("referral-hub",p);let m=f({type:"section",id:"sl-how-it-works-section",classes:"sl-section-large",parent:i});return m.style.display="none",f({type:"a",classes:"sl-back-button",html:` 35 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
36 viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> 37 <g> 38 <path d="M256,0C114.8,0,0,114.8,0,256s114.8,256,256,256s256-114.8,256-256S397.2,0,256,0z M256,39.4 39 c119.8,0,216.6,96.8,216.6,216.6S375.8,472.6,256,472.6S39.4,375.8,39.4,256S136.2,39.4,256,39.4z M196.9,177.2L118.2,256 40 l78.8,78.8v-59.1h196.9v-39.4H196.9V177.2z"/> 41 </g> 42 </svg> 43 <span>Back</span> 44 `,attributes:{href:"#"},parent:m}).addEventListener("click",g=>{g.preventDefault(),g.stopPropagation(),this.animateCSS(m,"sl-fadeOutRight").then(y=>{n.style.display="flex",m.style.display="none"})}),f({type:"h2",text:t.tabs.how_it_works.label,parent:m}),f({type:"article",html:J(t.tabs.how_it_works.content),parent:m}),i};rewardsElement=()=>{let e=L();if(!e)return;let{hub_widget:t}=this.referral_hub,i=t.rewards.list,n=t.rewards.layout,o=f({type:"ul",id:"sl-rewards-section"});return o.classList.add(`sl-rewards-layout-${n}`),i.forEach((s,a)=>{a++;let l=e.rewards_won.includes(s.id),c=f({type:"li",classes:"sl-reward",parent:o});l&&c.classList.add("sl-reward-won");let u=f({type:"figure",classes:"sl-reward-image",parent:c});u.style.backgroundImage='url("'+s.image+'")';let p=f({classes:"sl-reward-referrals",parent:u});f(l?{type:"span",parent:p,html:`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'> 45 <path fill='#fff' d="M12.8,28.7l-9.5-9.5c-0.4-0.4-0.4-1.1,0-1.6l1.5-1.5c0.4-0.4,1.1-0.4,1.6,0l7.2,7.2 l16-16c0.4-0.4,1.1-0.4,1.6,0l1.5,1.5c0.4,0.4,0.4,1.1,0,1.6L14.4,28.7C13.9,29.1,13.2,29.1,12.8,28.7z"/> 46 </svg>`}:{type:"span",text:s.referrals,parent:p});let m=f({classes:"sl-reward-info",parent:c});if(f({type:"h4",text:s.name,parent:m}),s.description)if(n=="horizontal"){let h=f({classes:"sl-reward-description hide",parent:u});f({type:"p",text:s.description,parent:h}),f({type:"span",parent:m,html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill='currentColor'> 47 <path fill='currentColor' d="M12,2A10,10,0,1,0,22,12,10.01114,10.01114,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8.00917,8.00917,0,0,1,12,20Zm0-8.5a1,1,0,0,0-1,1v3a1,1,0,0,0,2,0v-3A1,1,0,0,0,12,11.5Zm0-4a1.25,1.25,0,1,0,1.25,1.25A1.25,1.25,0,0,0,12,7.5Z"/> 48 </svg>`}).addEventListener("click",function(y){h.classList.toggle("hide")})}else f({type:"p",text:s.description,parent:m});i.length<6||a==1||a==i.length||(i.length%5==0?a%5==0&&(c.classList.add("sl-before-break"),f({type:"span",classes:"sl-reward-break",parent:o})):i.length%4==0?a%4==0&&(c.classList.add("sl-before-break"),f({type:"span",classes:"sl-reward-break",parent:o})):i.length%3==0?a%3==0&&(c.classList.add("sl-before-break"),f({type:"span",classes:"sl-reward-break",parent:o})):a%4==0&&(c.classList.add("sl-before-break"),f({type:"span",classes:"sl-reward-break",parent:o})))}),o};sharingElement=()=>{if(!L())return;let{hub_widget:t}=this.referral_hub,i=f({type:"section",id:"sl-sharing-section"}),n=f({id:"sl-sharinglink-container",parent:i});if(f({type:"p",text:t.sharing.referral_link.header,parent:n}),n.appendChild(this.referralLinkElement()),t.sharing.social_links.enabled){let o=f({id:"sl-sociallinks-container",parent:i});f({type:"p",text:t.sharing.social_links.header,parent:o}),o.appendChild(this.socialIconsElement())}if(t.sharing.email_invitation.enabled){let o=f({id:"sl-emailinvitation-container",parent:i});f({type:"p",text:t.sharing.email_invitation.header,parent:o});let s=f({type:"span"});o.appendChild(this.emailInvitationElement(s)),o.appendChild(s)}return i};referralLinkElement=()=>{let e=L();if(!e)return;let{sharing:t}=this.referral_hub.hub_widget,i=f({type:"form",attributes:{"data-sparkloop-form-ignore":!0}}),n=f({type:"input",parent:i,attributes:{type:"text",readonly:!0,value:e.referral_link}}),o=f({type:"button",classes:"sl-button",parent:i,text:t.referral_link.button.label});return o.addEventListener("click",s=>{s.preventDefault(),br(n,o,t.referral_link.button.label)}),i};statsElement=()=>{let e=L();if(!e)return;let{referrals:t}=this.referral_hub.hub_widget,i=f({type:"section",id:"sl-referrals-section"});if(t.confirmed.enabled){let n=f({id:"sl-confirmed-referrals",parent:i});f({type:"h3",text:Qe(e.referrals.confirmed),parent:n}),f({type:"span",text:t.confirmed.label,parent:n})}
48if(t.pending.enabled){let n=f({id:"sl-pending-referrals",parent:i});f({type:"h3",text:Qe(e.referrals.pending),parent:n}),f({type:"span",text:t.pending.label,parent:n})}if(t.next.enabled){let n=f({id:"sl-next-referrals",parent:i});f({type:"h3",text:Qe(e.next_reward),parent:n}),f({type:"span",text:t.next.label,parent:n})}return i};socialIconsElement=()=>{if(!L())return;let{hub_widget:t}=this.referral_hub,i=f({id:"sl-sociallinks-icons"});return["twitter","facebook","email","whatsapp","linkedin","telegram"].forEach(o=>{if(t.sharing.social_links.socials[o].enabled){let s=f({type:"a",classes:"sl-social",id:`sl-social-${o}`,attributes:{title:`Share on ${o}`,href:this.socialSharingLink(t.sharing.social_links.socials,o)}});s.style.backgroundImage="url(https://sparkloop-static-images.s3-us-west-1.amazonaws.com/"+o+".png)",i.appendChild(s)}}),i};emailInvitationElement=e=>{let t=L();if(!t)return;let{email_invitation:i}=this.referral_hub.hub_widget.sharing,n=f({type:"form",attributes:{"data-sparkloop-form-ignore":!0}}),o=f({type:"input",parent:n,classes:"sl-widget-input",attributes:{type:"text",placeholder:i.placeholder}}),s=f({type:"button",classes:"sl-button",parent:n,text:i.button.label});return s.addEventListener("click",async a=>{a.preventDefault(),a.stopPropagation(),s.disabled=!0,e.innerText="";let l=o.value.trim();if(l.length>0){let c={campaign_id:this.referral_hub.campaign_id,subscriber:t.id,recipients:l};try{await Dr(c),o.value="",e.innerText=i.confirmation_message}catch{e.innerText="Server error. Please try again."}finally{s.disabled=!1}}}),n};hubWidget=()=>{if(!L())return;let{hub_widget:t}=this.referral_hub;t.rewards.list.forEach(o=>{_t(o.image)});let i=f({id:"sl-hub-screen",classes:"sl-widget-body"});if(t.header&&t.header.trim().length>0||t.subheader&&t.subheader.trim().length>0){let o=f({type:"header",parent:i});t.header&&t.header.trim().length>0&&f({type:"h2",html:J(t.header),parent:o}),t.subheader&&t.subheader.trim().length>0&&f({type:"p",html:J(t.subheader),parent:o})}t.rewards.enabled&&t.rewards.list.length>0&&i.appendChild(this.rewardsElement());let n=f({type:"main",id:"sl-hub-main",parent:i});if(n.appendChild(this.sharingElement()),(t.referrals.confirmed.enabled||t.referrals.pending.enabled||t.referrals.next.enabled)&&n.appendChild(this.statsElement()),this.referral_hub.styling.powered_by_enabled){let o=f({id:"sl-hub-powered-by",parent:i});this.poweredByLink("referral-hub",o)}return i}};var fe=class{constructor(){this.config=k(),this.referral_hub={}}async load(){if(this.loadDefaultStyles(),this.config.widgets.referral_hubs.length&&(this.fetchReferralHubSettings(),Object.keys(this.referral_hub).length)){try{await new K().fetch({campaign:this.referral_hub.campaign_id})}catch{console.error("Subscriber was not found")}R()&&yt()&&q("Referral Hub Preview",'To visualize the hub widget, signup using any name<br/>and "[email protected]" as email address.<br>When test mode is enabled no email will be recorded.'),this.loadReferralHubStyles(),this.loadReferralHubWidget(),this.generateReferralHubElements()}}components(){return fr()?new Le({referral_hub:this.referral_hub}):vr()}fetchReferralHubSettings(e){let t=this.config.widgets.referral_hubs;if(e)this.referral_hub=t.find(i=>i.campaign_id==e);else{let i=document.querySelector("#sparkloop-referral-hub")||document.querySelector("[class*=sparkloop-][data-campaign-id]");if(i){let n=i.dataset.campaignId;this.referral_hub=n?t.find(o=>o.campaign_id==n):t[0]}}}loadReferralHubWidget(){let e=document.querySelector("#sparkloop-referral-hub");!e||(L()?e.replaceChildren(this.generateHubWidget()):e.replaceChildren(this.generateFormWidget()))}generateFormWidget(){return this.components().formWidget({onSubmit:e=>this.validateAndHydrateSubscriber(e)})}generateHubWidget(){return this.components().hubWidget()}generateRewardsElement(){return this.components().rewardsElement()}generateSharingElement(){return this.components().sharingElement()}generateStatsElement(){return this.components().statsElement()}generateReferralHubElements(){if(L()){let e=(t,i)=>{let n=document.createElement("div");n.className="sl-widget-body sl-referral-hub-element",n.appendChild(i),t.replaceChildren(n)};document.querySelectorAll(`.sparkloop-rewards-element[data-campaign-id=${this.referral_hub.campaign_id}]`).forEach(t=>{e(t,this.generateRewardsElement())}),document.querySelectorAll(`.sparkloop-sharing-element[data-campaign-id=${this.referral_hub.campaign_id}]`).forEach(t=>{e(t,this.generateSharingElement())}),document.querySelectorAll(`.sparkloop-stats-element[data-campaign-id=${this.referral_hub.campaign_id}]`).forEach(t=>{e(t,this.generateStatsElement())})}}async validateAndHydrateSubscriber(e){try{await new K().upsert({subscriber:e,campaign:this.referral_hub.campaign_id}
48),this.loadReferralHubWidget(),this.generateReferralHubElements()}catch(t){O("subscriber-not-loaded"),console.log(`Subscriber not loaded ${t}`)}}loadDefaultStyles(){hr(),Ee("default")}loadReferralHubStyles(){Ee("referral_hub"),document.documentElement.style.setProperty("--sl-widgets-referral-hub-primary-color",this.referral_hub.styling.colors.primary),document.documentElement.style.setProperty("--sl-widgets-referral-hub-secondary-color",this.referral_hub.styling.colors.secondary),document.documentElement.style.setProperty("--sl-widgets-referral-hub-headers-color",this.referral_hub.styling.colors.headers),gr("referral_hub",this.referral_hub.styling.custom_css)}};var Ae=class{constructor(){this.config=k(),this.signup_email="[email protected]"}timeoutTime(){return w("timeout")?parseInt(w("timeout")):15e3}async run(){if(W()){let e;if(ne())q("[Step 1 of 3] Referral testing process initiated","\u23F1 checking for a valid signup form on the page"),this.verifyReferralTracking();else try{let t=w("SLVerifyInstall");if(ve())e=await xr({campaign_id:t});else if(ce()){if(console.log("upscribe settings",we(t)),we(t)==null)throw"Upscribe settings not found";e=await Ir(t)}else Ye()&&(e=await Lr(t));console.log("script verified successfully",e),q("[Step 1 of 3] Script found on page","Your SparkLoop tracking script is correctly installed on this page.<br/><br/>\u{1F449} let's make sure SparkLoop can identify your email signup form(s)."),this.verifyReferralTracking()}catch(t){console.error("script verification failed",t),mt("Script verification failed","Please reload the page and try again.")}}}fetchForms(){return document.querySelectorAll(this.config.form_selector||"form")}verifyReferralTracking(){setTimeout(()=>{this.fetchForms().length?this.verifyForm():_r(this.fetchForms())?ye("Gravity form detected","SparkLoop has detected a broken Gravity form on this page. <a href='https://help.sparkloop.app/en/articles/5855767-installing-the-tracking-script-on-wordpress#h_f004b7693e' target='_blank'>See instructions</a> on how to fix it"):(ye("We can't detect a valid form on this page","SparkLoop will try for another 15 seconds.<br/><br/>\u{1F449} if the form is inside a popup, try opening it (make the form appear on the page)"),setTimeout(()=>{this.fetchForms().length?this.verifyForm():mt("Bad news \u{1F61E}",`SparkLoop couldn't detect a valid form on this page. 49 50If you get this error but the form is visible on the page, it's possible that the form is inside an iFrame or otherwise incompatible with our SparkLoop tracking script. 51 52\u{1F449} contact our support team ([email protected]) to find a solution.`)},this.timeoutTime()))},1500)}verifyForm(){ne()?q("[Step 2 of 3] Make a test referral",`\u{1F449} Subscribe to this publication via the opt-in form on the page, using the email address <strong>${this.signup_email}</strong><br/><br/>Then wait up to 10 seconds for a success message to be shown.`):q("[Step 2 of 3] Valid form found",`SparkLoop has detected a valid email signup form on this page. 53 54Now we need to check that our tracking script can track signups correctly via your form.<br/><br/><strong>\u{1F449} fill out and submit your form using the email address ${this.signup_email}</strong>`),new ie().track(),setTimeout(()=>{window.SL.visitor.email||(ne()?ye("Signup not yet detected",`We haven't been able to detect a valid referral yet.<br/><br/>If you haven't already followed the instructions in Step #2 (above), do so now.<br/><br/>If you have already subscribed with ${this.signup_email} and are seeing this message, it means referral tracking is broken for this publication. You should contact us via [email protected] and <strong>do not recommend</strong> this publication until the issue has been fixed.`):ye("Signup not yet detected",`SparkLoop hasn't been able to detect a valid signup yet. 55 56\u{1F449} if you haven't submitted the form yet using ${this.signup_email}, please do so now. 57 58If you have submitted the email signup form correctly, it's likely there's an error in the form which prevents us from tracking referrals correctly. 59 60In this case, please contact our support team ([email protected]) and we'll help you find an easy solution!`))},this.timeoutTime())}};var Wt=pn(Vi());var Ue=!1,qi,Wi,jt=new Promise((r,e)=>{qi=r,Wi=e});jt.catch(()=>{});var Ht=()=>{Ue||(Ue=!0,qi())},pt=r=>{Ue||(Ue=!0,Wi(new Error(`SparkLoop is not available: ${r}`)))},Gi=({timeoutMs:r=5e3}={})=>
60{if(Ue)return jt;let e,t=new Promise((i,n)=>{e=setTimeout(()=>n(new Error("SparkLoop did not finish loading in time")),r)});return Promise.race([jt,t]).finally(()=>clearTimeout(e))};var De=class extends Error{constructor({error:e,message:t,status:i}={}){super(t||e||"Client API request failed"),this.name="ClientApiError",this.error=e,this.status=i}};function zi(r,e){return new De({error:r?.error,message:r?.message||r?.error,status:e})}var Oa=5e3;function Yi(){let r=k();return`${r.script_url}/${r.uuid}/client`}function Ki(){return R()?{test_mode:!0}:{}}async function ft(r,{query:e}={}){let t=new URL(`${Yi()}${r}`),i={...Ki(),...e};Object.entries(i).forEach(([s,a])=>{a!=null&&a!==""&&t.searchParams.set(s,a)});let n=new AbortController,o=setTimeout(()=>n.abort(),Oa);try{let s=await fetch(t.toString(),{method:"GET",signal:n.signal}),a=await s.json().catch(()=>({}));if(!s.ok)throw zi(a,s.status);return a}finally{clearTimeout(o)}}async function Ji(r,e){let t=await fetch(`${Yi()}${r}`,{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({...Ki(),...e})}),i=await t.json().catch(()=>({}));if(!t.ok)throw zi(i,t.status);return i}async function Qi({limit:r}={}){return(await ft("/recommendations",{query:{limit:r,...G()}}))?.recommendations||[]}async function Zi({uuid:r}={}){if(!r)throw new De({error:"bad_request",message:"Missing parameters: uuid."});return(await ft(`/recommendations/${encodeURIComponent(r)}`,{query:G()}))?.recommendation}async function Xi({email:r,uuids:e,shownUuids:t}={}){return Ji("/recommendations/submissions",{...G(),email:r,recommendation_uuids:e,shown_uuids:t})}async function en(){return(await ft("/offers",{query:G()}))?.offers||[]}async function tn({uuid:r}={}){if(!r)throw new De({error:"bad_request",message:"Missing parameters: uuid."});return(await ft(`/offers/${encodeURIComponent(r)}`,{query:G()}))?.offer}async function rn({email:r,uuid:e}={}){return Ji("/offers/claims",{...G(),email:r,offer_uuid:e})}function nn(r){return Object.fromEntries(Object.entries(r).map(([e,t])=>[e,async(...i)=>(await Gi(),t(...i))]))}var Vt={recommendations:nn({generate:Qi,fetch:Zi,subscribe:Xi}),offers:nn({generate:en,fetch:tn,claim:rn})};function Ma(){window.SL=window.SL||{},window.SL.client=Vt}var qt=class{constructor(e){this.config=e}widgets(e){let t=new fe;return t.fetchReferralHubSettings(e),t.loadReferralHubStyles(),t}generate={rewardsElement:e=>this.widgets(e).generateRewardsElement(),sharingElement:e=>this.widgets(e).generateSharingElement(),statsElement:e=>this.widgets(e).generateStatsElement(),formWidget:e=>this.widgets(e).generateFormWidget(),hubWidget:e=>this.widgets(e).generateHubWidget()};reset(e){this.config=(0,Wt.default)(e,window.SLConfig)}trackSubscriber(e){e?(_({email:e.trim()}),new ie().captureSubscriber()):console.error("Email can't be blank.")}async getSubscriber(e,t=null){try{let n=await new K().fetch({subscriberId:e.trim(),campaign:t});return Promise.resolve(n)}catch(i){return console.log(i),Promise.reject(i)}}async run(){if(this.config.mode==="client"){await new de().profile(),Ht(),O("ready");return}A()&&console.log("DEBUG MODE IS ON"),pr(),await new de().profile(),Ht(),O("ready"),new Ae().run(),new ie().track();try{await new K().fetch()}catch(o){O("subscriber-not-loaded"),console.log(o)}new fe().load()}},$a=(r,e=null)=>{if(window.SLScriptLoaded=window.SLScriptLoaded||!1,window.SLScriptLoaded)return console.warn("SparkLoop is already loaded. Please check if you have multiple instances of the script on the same page."),!1;if(window.SLScriptLoaded=!0,!r.active)return console.warn("Sparkloop is disabled because the account is not active."),pt("the account is not active"),!1;let t=Object.assign({},e||window.SL||{});delete t.client;let i=(0,Wt.default)(t,r);if(window.SLConfig=r,i.disabled)return console.warn("SparkLoop has been manually disabled."),pt("the script is disabled for this publication"),!1;if(i.mode==="client"&&!i.client_api_enabled)return console.warn("SparkLoop Client API is not enabled for this publication."),pt("the Client API is not enabled"),!1;i.test_mode&&console.warn("SparkLoop is running in test mode."),console.log("\u{1F64C} SparkLoop is loaded, time to rock'n'roll!"),console.log("Looking to grow your newsletter? Check out https://sparkloop.app/console");let n=new qt(i);window.SL=n,window.SL.signupFlow=Pe,i.mode==="client"&&(window.SL.client=Vt),n.run()};{let r=async()=>{setTimeout(async()=>{let e=Sr(),t=Er();if(!e){console.log("\u274C SparkLoop UUID not found");return}if(!t){console.log("\u274C SparkLoop settings base URL not found");return}window.SL?.mode==="client"&&Ma();try{let i=await Fr(t,e);console.log(`\u2705 SparkLoop settings loaded for ${e}`),$a(i)}catch(i){console.log(`\u274C SparkLoop settings failed to load for ${e}`),console.error(i)}},window.sparkloop_delay||800)};document.readyState!=="loading"?r():(document.addEventListener("DOMContentLoaded",()=>r()),document.addEventListener("turbo:load",()=>r()))}})(); 61/*! js-cookie v3.0.1 | MIT */ 62 63;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.