/*! copyright 2025 Aditude, Inc - Prebid - production - Updated: 2025-07-12T10:56:33.045Z, v1.4.0, soundcloud-yUijW49gH8/soundcloud.com/prebid-load 09b75fb9d0c48c33160f 6b2c307a59107b497142 */ !function(){var e={86964:function(e,t,r){e.exports=function(){"use strict";function e(e){return"function"==typeof e}var t,i,s,o,n=void 0,a=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},l=0,d=void 0,u=void 0,c=function(e,t){y[l]=e,y[l+1]=t,2===(l+=2)&&(u?u(w):v())},h="undefined"!=typeof window?window:void 0,p=h||{},f=p.MutationObserver||p.WebKitMutationObserver,g="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"===({}).toString.call(process),b="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function m(){var e=setTimeout;return function(){return e(w,1)}}var y=Array(1e3);function w(){for(var e=0;e{let n=document.createElement("script");n.async=r,i&&(n.defer=!0),s.forEach(e=>{n.setAttribute("data-"+e.key,e.value)}),o.forEach(e=>{n.setAttribute(e.key,e.value)}),n.src=e,document[t].appendChild(n)},a=((s=a||{}).Head="head",s);/*! js-cookie v3.0.5 | MIT */function l(e){for(var t=1;td.get(e)||!1,c=e=>{let t=window.location.search.match("[?&]"+e+"(?:&|$|=([^&]*))");return t?t[1]?decodeURIComponent(t[1]):"":null},h=e=>{let t=window.location.hash.match("[#&]"+e+"(?:&|$|=([^&]*))");return t?t[1]?decodeURIComponent(t[1]):"":null};function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let f="#339933";var g=((o=g||{})[o.Advanced=0]="Advanced",o[o.None=1]="None",o[o.Standard=2]="Standard",o);let b=1,m=u("aditude_debug")||c("aditude_debug")||h("aditude_debug");m&&(b=2*("99"!=m));class y{setLabel(e,t=f){return this.label={text:e,color:t},this}tag(e,t="black"){return this.tempTag={text:e,color:t},this}clearTag(){this.tempTag=null}enable(e=2){return this.setLevel(e),this}setLevel(e){return this.level=e,this}isAdvanced(){return 0===this.level}isEnabled(){return 1!==this.level}advancedLog(...e){this.isAdvanced()&&this._sendLog("log",this._decorate(e,""))}log(...e){this.isEnabled()&&this._sendLog("log",this._decorate(e,""))}warn(...e){this.isEnabled()&&this._sendLog("warn",this._decorate(e,""))}error(...e){this._sendLog("error",this._decorate(e,""))}table(e=Array,t=null){this.isEnabled()&&console.table(e,t)}group(e,t){this.isEnabled()&&(console.group(e),t(this),console.groupEnd(),this.clearTag())}_sendLog(e,t){let r=[e,"log","debug","info"].find(e=>String(console[e])===`function ${e}() { [native code] }`)||e;console[r](...t)}_getElapsedTime(){if(!y.firstLogTime)return y.firstLogTime=Date.now(),"0ms";let e=Date.now()-y.firstLogTime;return`${e}ms`}_decorate(e,t=""){e=[].slice.call(e),t&&e.unshift(t);let r=[],i=[];if(this.isAdvanced()){let e=this._getElapsedTime();r.push(`%c[${e}]`),i.push("background: grey; color: white; font-size: 9px; padding: 1px 4px; border-radius: 0; margin-right: 1px;")}return r.push("%cCW"),i.push(s("#61B321")),this.label&&this.label.text.length>0&&(r.push("%c"+this.label.text),i.push(s(this.label.color))),this.tempTag&&(r.push("%c"+this.tempTag.text),i.push(s(this.tempTag.color))),e.unshift(...i),e.unshift(r.join("")),e;function s(e){return`display: inline-block; color: #fff; font-size: 9px; background: ${e}; padding: 1px 4px; border-radius: 0; margin-right: 1px;`}}constructor(e){p(this,"labelColor",void 0),p(this,"label",{text:"",color:f}),p(this,"level",b),p(this,"namespace",void 0),p(this,"tempTag",void 0),this.namespace=e}}p(y,"firstLogTime",null);let w={};var v=function(e="default"){return w[e]||(w[e]=new y(e)),w[e]};let _=new class{get isDisabled(){return"boolean"==typeof window.__RAVEN_ENABLED&&!1===window.__RAVEN_ENABLED}disableTracking(){window.__RAVEN_ENABLED=!1}getGlobal(){return window.Raven=window.Raven||{cmd:[]},window.Raven.cmd=window.Raven.cmd||[],window.Raven}setCustomParams(e){this.push(({config:t})=>{t.setCustom(e)})}setTudeMeta(e){this.push(({config:t})=>{t.setTudeMeta(e)})}recordPageview(){this.push(({events:e})=>{e.pageview()})}recordCustomEvent(e,t){this.push(({events:r})=>{r.sendCustomEvent(e,t)})}recordEvent(e,t){this.push(({events:r})=>{r.send(e,t)})}constructor(){var e,t;e="push",t=e=>{this.isDisabled||this.getGlobal().cmd.push(e)},e in this?Object.defineProperty(this,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):this[e]=t}};window.Raven=window.Raven||{cmd:[]};let R=v("analytics").setLabel("Analytics"),E=async()=>{_.disableTracking()},T=e=>{_.setCustomParams(e),R.log("sending custom param",e)};(async e=>{if(e.disableTrackingExplicitly)return R.log("Tracking explicitly disabled");let{raven:t="standalone"}=e,r="none",i=r&&["standalone","legacy"].includes(r)?r:t;if("legacy"===i){let t=`${e.publisherKeyCw}/${e.wrapper}`,r=new URL(`https://edge.aditude.io/wrapper/${t}/info.json`);try{let e=await fetch(r.toString());if(e.ok){let{p:t,a:r}=await e.json();t&&r||(v().advancedLog("publisher not configured for analytics"),E())}else throw Error(`${e.status} ${e.statusText}`)}catch(e){v().error("analytics config failed to load",e)}}else if("standalone"===i){if(!e.propertyId||""===e.propertyId||window.RavenLoaded)return;let{pbjsGlobals:t,propertyId:r,wrapper:i}=e;window.__RAVEN_ENABLED=!0,window.RavenLoaded=!0,window.Raven=window.Raven||{cmd:[]},window.Raven.initialConfig={globalParams:{wrapper:i},pbjsGlobals:t||["pbjs"],propertyId:r},n(`https://raven-edge.aditude.io/raven/${r}/library.js`,a.Head,!1,!1)}})({publisherKeyCw:"soundcloud-yUijW49gH8",propertyId:"soundcloud-main-t9Iut",wrapper:"soundcloud.com"});var S="d5ac32e859ab1e26c3f186cb6feb62a2";class L extends Error{response;request;options;constructor(e,t,r){let i=e.status||0===e.status?e.status:"",s=e.statusText||"",o=`${i} ${s}`.trim();super(`Request failed with ${o?`status code ${o}`:"an unknown error"}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=r}}class C extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}let A=(()=>{let e=!1,t=!1,r="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(e){if(e instanceof Error&&"unsupported BodyInit type"===e.message)return!1;throw e}return e&&!t})(),P="function"==typeof globalThis.AbortController,x="function"==typeof globalThis.ReadableStream,j="function"==typeof globalThis.FormData,k=["get","post","put","patch","head","delete"],I={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},D=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,q=Symbol("stop"),O={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},U={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},N=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[r,i]of e)t+=D,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${r}"`).length,t+="string"==typeof i?new TextEncoder().encode(i).length:i.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{}return 0},$=(e,t)=>{let r=Number(e.headers.get("content-length"))||0,i=0;return 204===e.status?(t&&t({percent:1,totalBytes:r,transferredBytes:i},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(s){let o=e.body.getReader();async function n(){let{done:e,value:a}=await o.read();if(e)return void s.close();t&&(i+=a.byteLength,t({percent:0===r?0:i/r,transferredBytes:i,totalBytes:r},a)),s.enqueue(a),await n()}t&&t({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),await n()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},G=(e,t)=>{let r=N(e.body),i=0;return new Request(e,{duplex:"half",body:new ReadableStream({async start(s){let o=e.body instanceof ReadableStream?e.body.getReader():new Response("").body.getReader();async function n(){let{done:e,value:a}=await o.read();if(e){t&&t({percent:1,transferredBytes:i,totalBytes:Math.max(r,i)},new Uint8Array),s.close();return}i+=a.byteLength;let l=0===r?0:i/r;(rnull!==e&&"object"==typeof e,B=(...e)=>{for(let t of e)if((!F(t)||Array.isArray(t))&&void 0!==t)throw TypeError("The `options` argument must be an object");return z({},...e)},M=(e={},t={})=>{let r=new globalThis.Headers(e),i=t instanceof globalThis.Headers;for(let[e,s]of new globalThis.Headers(t).entries())i&&"undefined"===s||void 0===s?r.delete(e):r.set(e,s);return r};function H(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:z(e[r]??[],t[r]??[])}let W=(e={},t={})=>({beforeRequest:H(e,t,"beforeRequest"),beforeRetry:H(e,t,"beforeRetry"),afterResponse:H(e,t,"afterResponse"),beforeError:H(e,t,"beforeError")}),z=(...e)=>{let t={},r={},i={};for(let s of e)if(Array.isArray(s))Array.isArray(t)||(t=[]),t=[...t,...s];else if(F(s)){for(let[e,r]of Object.entries(s))F(r)&&e in t&&(r=z(t[e],r)),t={...t,[e]:r};F(s.hooks)&&(i=W(i,s.hooks),t.hooks=i),F(s.headers)&&(r=M(r,s.headers),t.headers=r)}return t},V=e=>k.includes(e)?e.toUpperCase():e,J={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},K=(e={})=>{if("number"==typeof e)return{...J,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error("retry.statusCodes must be an array");return{...J,...e}};var Y=r(86964).Promise;async function X(e,t,r,i){return new Y((s,o)=>{let n=setTimeout(()=>{r&&r.abort(),o(new C(e))},i.timeout);i.fetch(e,t).then(s).catch(o).then(()=>{clearTimeout(n)})})}var Q=r(86964).Promise;async function Z(e,{signal:t}){return new Q((r,i)=>{function s(){clearTimeout(o),i(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",s,{once:!0}));let o=setTimeout(()=>{t?.removeEventListener("abort",s),r()},e)})}let ee=(e,t)=>{let r={};for(let i in t)i in U||i in O||i in e||(r[i]=t[i]);return r};var et=r(86964).Promise;class er{static create(e,t){let r=new er(e,t),i=async()=>{if("number"==typeof r._options.timeout&&r._options.timeout>0x7fffffff)throw RangeError("The `timeout` option cannot be greater than 2147483647");await et.resolve();let e=await r._fetch();for(let t of r._options.hooks.afterResponse){let i=await t(r.request,r._options,r._decorateResponse(e.clone()));i instanceof globalThis.Response&&(e=i)}if(r._decorateResponse(e),!e.ok&&r._options.throwHttpErrors){let t=new L(e,r.request,r._options);for(let e of r._options.hooks.beforeError)t=await e(t);throw t}if(r.request.bodyUsed||await r.request.body?.cancel(),r._options.onDownloadProgress){if("function"!=typeof r._options.onDownloadProgress)throw TypeError("The `onDownloadProgress` option must be a function");if(!x)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");return $(e.clone(),r._options.onDownloadProgress)}return e},s=r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(i):i();for(let[e,i]of Object.entries(I))s[e]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||i);let o=await s;if("json"===e){if(204===o.status||0===(await o.clone().arrayBuffer()).byteLength)return"";if(t.parseJson)return t.parseJson(await o.text())}return o[e]()};return s}request;abortController;_retryCount=0;_input;_options;constructor(e,t={}){if(this._input=e,this._options={...t,headers:M(this._input.headers,t.headers),hooks:W({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:V(t.method??this._input.method??"GET"),prefixUrl:String(t.prefixUrl||""),retry:K(t.retry),throwHttpErrors:!1!==t.throwHttpErrors,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(P){let e=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=e?AbortSignal.any([e,this.abortController.signal]):this.abortController.signal}if(A&&(this._options.duplex="half"),void 0!==this._options.json&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let e="string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString(),t=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,"?"+e);(j&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(t,{...this.request}),this._options)}if(this._options.onUploadProgress){if("function"!=typeof this._options.onUploadProgress)throw TypeError("The `onUploadProgress` option must be a function");if(!A)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=G(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof C)throw e;if(e instanceof L){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());let r=this._options.retry.maxRetryAfter??e;return ethis._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(r){let t=Math.min(this._calculateRetryDelay(r),0x7fffffff);if(this._retryCount<1)throw r;for(let e of(await Z(t,{signal:this._options.signal}),this._options.hooks.beforeRetry))if(await e({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===q)return;return this._retry(e)}}async _fetch(){for(let e of this._options.hooks.beforeRequest){let t=await e(this.request,this._options);if(t instanceof Request){this.request=t;break}if(t instanceof Response)return t}let e=ee(this.request,this._options),t=this.request;return(this.request=t.clone(),!1===this._options.timeout)?this._options.fetch(t,e):X(t,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */let ei=e=>{let t=(t,r)=>er.create(t,B(e,r));for(let r of k)t[r]=(t,i)=>er.create(t,B(e,i,{method:r}));return t.create=e=>ei(B(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),ei(B(e,t))),t.stop=q,t},es=ei();var eo=r(86964).Promise;let en={gdpr:{country:"GB",region:"ENG",city:"London",postalCode:"W1B"},ccpa:{country:"US",region:"CA",city:"San Francisco",postalCode:"94107"},none:{country:"US",region:"IL",city:"Chicago",postalCode:"60007"}},ea="aditude_geo";if(c(ea)){let t=c(ea);en[t]&&(e=en[t])}let el=!1,ed=new eo(e=>{i=e});async function eu(r="https://geo-location.prebid.cloud/v1/geo"){if(e)return e;if(t||el)return ed;let s=window.localStorage.getItem("cwgl");if(s){let e=window.localStorage.getItem("cwglt");(c("aditude_nocache")||!e||Date.now()-parseInt(e)>36e5)&&(s=!1)}if(s)t=JSON.parse(s),i(t);else{el=!0;try{let e=await es.get(r||"https://geo-location.prebid.cloud/v1/geo",{timeout:3e3}).json();window.localStorage.setItem("cwgl",JSON.stringify(e)),window.localStorage.setItem("cwglt",JSON.stringify(Date.now())),t=e,i(t)}catch(e){v().error(e),i(t)}}return ed}let ec=u("tude_dev")||c("tude_dev")||h("tude_dev");if(ec){let e=new URL(document.currentScript.src);if(ec&&e.pathname.match("prebid-load.js")&&!e.searchParams.has("testing")){let t=e.pathname,r=document.createElement("script");throw r.src=`${"stage"===ec?"https://d3g98hgqjqzwq5.cloudfront.net":"https://localhost:9000/static"}${t}?testing`.replace("/static/static/","/static/"),r.async=!1,document.currentScript.after(r),Error("prebid-load.js -- bailing to load script from another environment")}}let eh=document.currentScript;if(null==eh?void 0:eh.src){let e=new URL(eh.src);if(null==e?void 0:e.pathname){if(r.g.__tudeLoadedScripts=r.g.__tudeLoadedScripts||[],r.g.__tudeLoadedScripts.includes(e.pathname))throw Error(`attempted to load file multiple times: ${eh.src}`);r.g.__tudeLoadedScripts.push(e.pathname)}}let ep=(e="",t="")=>{let r="https://dn0qt3r0xannq.cloudfront.net";return(-1!==e.indexOf("vendor/")||-1!==t.indexOf("vendor/"))&&(r="https://dn0qt3r0xannq.cloudfront.net"),r+e+t},ef=(e,t,r=!1,i=!1,s=[])=>{let o=document.createElement("script");r?o.async=!0:o.async=!1,i&&(o.defer=!0),s.forEach(e=>{o.setAttribute("data-"+e.key,e.value)}),o.src=e,document[t].appendChild(o)};var eg=(e,t=!1)=>{let r=document.createElement("link");t&&(r.id=t),r.rel="stylesheet",r.type="text/css",r.href=e,r.media="all",document.getElementsByTagName("head")[0].appendChild(r)},eb=r(86964).Promise;function em(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let ey='"1.4.0"'.replace(/"/g,""),ew="Loader";v(ew).setLabel("Loader","red");var ev=class{setForcedModules(e=[]){this.forcedModules=e}appendForcedModules(e=[]){this.forcedModules=[...this.forcedModules,...e]}forceEnablePrebidFork(){this._forceEnablePrebidFork=!0}forcePrebidVersion(e){this._forcePrebidVersion=e}getLibraryLocation(){return this.libraryFolder?this.publisherKey+"/"+this.libraryFolder:this.publisherKey}setLibraryFolder(e){this.libraryFolder=e}setPrebidBuild(e){this.dynamicLibrary=e,c("prebid_version_override")&&(this.dynamicLibrary.version=c("prebid_version_override"))}setDynamicLibrary(e,t){this.dynamicLibrary={version:e,modules:t}}setLoadRemoteConfig(e=!0){this.loadRemoteConfig=e}disableAnalytics(){this.checkForAnalytics=!1}enableAnalyticsExperiment(){this.checkForAnalytics=!0}disableLibrary(){this.hasLibrary=!1}setGeo(e=!0){this.geo=e}setGeoEndpoint(e="https://geo-location.prebid.cloud/v1/geo"){v(ew).advancedLog("Endpoint set: ",e),this.geoEndpoint=e}setGeoTimeout(e=500){this.geoTimeout=e}setWhitelistDomains(e){this.whitelistDomains=e}isDomainWhitelisted(){if(!this.whitelistDomains||0===this.whitelistDomains.length)return!0;let e=window.location.hostname.replace(/^www\./,"");return this.whitelistDomains.some(t=>t.replace(/^www\./,"")===e)}async getGeo(){let e=await eu(this.geoEndpoint);r.g._tudeGeo=e,v(ew).advancedLog("Global Geo Set",e)}setGlobalPbjsName(e){this.globalPbjsName=e,r.g._tudePbjsGlobal=this.globalPbjsName}setPublisherKey(e){this.publisherKey=e}setResourceVersion(e){this.version=e}setWrapper(e){this.wrapper=e}addPreset(e){e.forEach(e=>{this.addResource(e)})}addResource(e){this.resources[e.name]=e}getCurrentWrapperUrl(e,t=!0){let r="";return this.version&&t&&(r="?v="+this.version),ep(`/${this.publisherKey}/${this.wrapper}`,`/${e}`)+r}createCloudResource(e,t,r,i,s){let o="";this.version&&(o="?v="+this.version);let n={name:e,appendTo:a.Head,async:i,trigger:s,url:ep(`/${t}`,`/${r}`)+o};this.addResource(n)}async start(){if(v(ew).advancedLog("Loader starting at: ",Math.floor(performance.now()).toString()),!this.isDomainWhitelisted())return void v(ew).advancedLog("Domain not whitelisted, skipping loader");if(await this.maybeLoadRemoteConfig(),this.hasLibrary&&this.addLibrary(),this.addWrapper(),Object.keys(this.resources).reverse().forEach(e=>{try{let t=this.resources[e];if((!t.type||"js"===t.type)&&!document.querySelector(`link[rel="preload"][as="script"][href="${t.url}"]`)){let e=document.createElement("link");e.rel="preload",e.as="script",e.href=t.url,document.head&&document.head.appendChild(e)}}catch(e){}}),this.geo){v(ew).advancedLog("Fetching geo from loader with timeout: ",this.geoTimeout);let e=this.getGeo(),t=new eb(e=>setTimeout(e,this.geoTimeout));await eb.race([e,t])}Object.keys(this.resources).forEach(e=>{let t=this.resources[e];(void 0===t.trigger||!t.trigger||t.trigger())&&(void 0===t.type||"js"===t.type?n(this._createUrl(t.url),t.appendTo,t.async||!1,t.defer||!1,t.dataAttributes||[],t.attributes||[]):eg(this._createUrl(t.url),t.id))}),v(ew).advancedLog("Loader finished at: ",Math.floor(performance.now()).toString())}maybeAddDynamicLibrary(){if(this.dynamicLibrary){let{version:e,modules:t,fork:r=!1}=this.dynamicLibrary,i=this.globalPbjsName,s=new URL(`https://edge.aditude.io/prebid/${this._forcePrebidVersion||e}.js`);"pbjs"!==i&&s.searchParams.set("var",i),(r||this._forceEnablePrebidFork)&&s.searchParams.set("fork","1");let o=[...new Set([...t,...this.forcedModules,...this.mandatoryModules])];o.includes("aditude")&&S&&s.searchParams.set("v",S),o.forEach((e,t)=>{"cpmstarBidAdapter"===e&&(o[t]="cpmstarCustomBidAdapter")}),[].forEach(e=>{let t=o.indexOf(e);t>-1&&o.splice(t,1)});let n=window.btoa(JSON.stringify(o.sort()));s.searchParams.set("modules",n);let l={name:"library",appendTo:a.Head,async:!0,trigger:()=>(!window[i]||!window[i].getConfig||"function"!=typeof window[i].getConfig)&&!window[i+"LibraryLoaded"]&&(window[i+"LibraryLoaded"]=!0,!0),url:s.toString()};return this.addResource(l),!0}return!1}setupLoaderFromConfig(){var e,t,r;this.dynamicLibrary=null==(e=window.ADITUDE_WRAPPER_CONFIG)?void 0:e.PBJS_BUILD,this.addPreset((null==(t=window.ADITUDE_WRAPPER_CONFIG)?void 0:t.THIRD_PARTY_SCRIPTS)||[]);let i=null==(r=window.ADITUDE_WRAPPER_CONFIG)?void 0:r.PREBID_GLOBAL;"string"==typeof i&&""!==i.trim()&&this.setGlobalPbjsName(i.trim())}async maybeLoadRemoteConfig(){return"object"==typeof window.ADITUDE_WRAPPER_CONFIG?(this.setupLoaderFromConfig(),!0):!!this.loadRemoteConfig}addLibrary(){if(this.maybeAddDynamicLibrary())return;let e=this.getLibraryLocation();this.createCloudResource("library",e,"prebid-library.js",!0,()=>(!window[this.globalPbjsName]||!window[this.globalPbjsName].getConfig||"function"!=typeof window[this.globalPbjsName].getConfig)&&!window[this.globalPbjsName+"LibraryLoaded"]&&(window[this.globalPbjsName+"LibraryLoaded"]=!0,!0))}addWrapper(){this.createCloudResource("wrapper",this.publisherKey+"/"+this.wrapper,"prebid-wrapper.js",!1)}_createUrl(e){return e}constructor(e,t=ey){em(this,"resources",{}),em(this,"globalPbjsName","pbjs"),em(this,"libraryFolder",void 0),em(this,"dynamicLibrary",void 0),em(this,"loadRemoteConfig",!1),em(this,"publisherKey",void 0),em(this,"hasLibrary",!0),em(this,"version",'"1.4.0"'),em(this,"wrapper",""),em(this,"checkForAnalytics",!0),em(this,"geo",!0),em(this,"geoEndpoint","https://geo-location.prebid.cloud/v1/geo"),em(this,"geoTimeout",500),em(this,"whitelistDomains",[]),em(this,"_forceEnablePrebidFork",!1),em(this,"_forcePrebidVersion",!1),em(this,"forcedModules",["gptPreAuction","sharedIdSystem","33acrossIdSystem","fabrickIdSystem","id5IdSystem","criteoIdSystem","pubProvidedIdSystem","unifiedIdSystem"]),em(this,"mandatoryModules",["aditude"]),this.publisherKey=e,this.version=t}};let e_={name:"gpt",appendTo:a.Head,async:!0,url:"https://securepubads.g.doubleclick.net/tag/js/gpt.js",external:!0,trigger:()=>!window.googletag||!window.googletag.apiReady},eR=30,eE=e=>"cw-test-"+e,eT=e=>d.get(eE(e))||!1,eS=(e,t,r=eR)=>{d.set(eE(e),t,{expires:r})},eL=(e,t)=>{let r=t.filter(t=>t.name===e);return r.length>0&&r[0]},eC=e=>{let t=Math.floor(1e3*Math.random()+1),r=0,i=0,s=[...e].sort((e,t)=>e.percentage>t.percentage?1:e.percentage({experiment:e,fromCookie:r,trackingId:e+"@"+t.name,variant:t.name,value:t.value});var ej=class{variant(e){return this.variants.push(new eP(e.name,e.value,e.percentage)),this}pick(e=30){if(this.selectedVariant&&this.pickResponse)return this.pickResponse;let t=eT(this.name);if(t){let e=eL(t,this.variants);if(e)return this.selectedVariant=e,this.pickResponse=ex(this.name,e,!0),this.pickResponse}let r=eC(this.variants);if(r)return this.selectedVariant=r,this.pickResponse=ex(this.name,r,!1),eS(this.name,r.name,e),this.pickResponse;v("experiment").error(`Failed to pick a variant for experiment '${this.name}'`)}constructor(e){eA(this,"name",void 0),eA(this,"selectedVariant",void 0),eA(this,"variants",void 0),eA(this,"pickResponse",void 0),this.name=e,this.selectedVariant=!1,this.variants=[]}},ek={createExperiment(e){return new ej(e)}};let eI=new(function(){let e=0;function t(e){let t=[],r=0,i=0;this.push=function(s){r-i>=e&&++i>=e&&(i=0,r=e-1),t[r%e]=s,r++},this.asArray=function(){let s=t.slice(i,Math.min(r,e)),o=t.slice(0,Math.max(r-e,0));return s.concat(o)},this.list=t}function r(t,r){let i=r;for(let r=0;r-1&&n.splice(e,1)}}function l(e,t){let r=Date.now();n.push([e,r]);let a=i(e,s,o),l={topic:e};for(let e=0;e(eU=e.AMAZON_HASH_MAP||{},e));let eN=function(e=eD){return e=e.length>0?e:eD,window[e]=window[e]||{cmd:[],que:[]},window[e].cmd=window[e].cmd||[],window[e].que=window[e].que||[],window[e]}(),e$=v("GooglePublisherTag").setLabel("GooglePublisherTag","#039be5"),eG=new class{init(e){let{enableSingleRequest:t,setForceSafeFrame:r,setCentering:i,disableInitialLoad:s,enableLazyLoad:o,collapseEmptyDivs:n}=e;if(this.googleTagInitialized)return;e$.log("Initialized",e),this.googleTagInitialized=!0;let a=this.getGlobal();this.push(()=>{n&&a.pubads().collapseEmptyDivs(),t&&a.pubads().enableSingleRequest(),r&&a.pubads().setForceSafeFrame(!0),i&&a.pubads().setCentering(!0),s&&a.pubads().disableInitialLoad(),o&&a.pubads().enableLazyLoad(o),a.enableServices()})}addAllEventListeners(){this.eventListenersAdded||(e$.log("Adding all event listeners"),this.eventListenersAdded=!0,this.push(()=>{this.addEventListener("slotRenderEnded",e=>{var t,r,i,s,o;let n=Array.isArray(null==e?void 0:e.size)&&0===e.size[0]&&0===e.size[1],a=e.slot,l=null==a?void 0:a.getSlotElementId(),d=document.getElementById(l),u=null==a?void 0:a.getTargetingMap(),c=a.getSizes().filter(e=>e.getWidth&&e.getHeight).map(e=>[e.getWidth(),e.getHeight()]),h=function(e){try{return eN.adUnits.find(t=>t.code===e)}catch(e){}return!1}(l),p=String((null==a||null==(t=a.getTargeting("hb_pb"))?void 0:t[0])||"").trim(),f=!!(p&&Number(p)),g=!!(null==a||null==(r=a.getTargeting("amziid"))?void 0:r[0]),b=null==a||null==(i=a.getTargeting("hb_bidder"))?void 0:i[0],m=null==a?void 0:a.getAdUnitPath(),y=window.console.warn;window.console.warn=()=>{};let w=(null==a?void 0:a.getResponseInformation())?a.getHtml():"";window.console.warn=y;let v=w.includes("apstag.renderImp"),_=!e.isEmpty,R=a.getResponseInformation(),E=e.campaignId,T=e.lineItemId,S=!!w.match(/(?:prebid-universal|(?:ucTag|pbjs)\.renderAd|window\.pbRender)/),L=[...w.matchAll(//g)].map(e=>e[0].replace(//g,"")),C=null==u||null==(s=u.amzniid)?void 0:s[0],A=null==u||null==(o=u.amznbid)?void 0:o[0],P=eU[null==A?void 0:A.replace(/^(v_|o_)/,"")],x=[];P&&x.push(P),isNaN(Number(p))||x.push(p);let j=Math.max(...x),k={aditudeComments:L,amazonBid:P,amzniid:C,isPrebidWin:S,isNative:n,slot:a,adSlot:d,adUnitPath:m,divId:l,prebidUnit:h,hasBid:g||f,hasPrebidBid:f,hbBidder:b,prebidBid:Number(p),targetingMap:u,highBid:j,sizes:c,isAmazonWin:v,filled:_,info:R,orderId:E,lineItemId:T};eI.emit("gpt.slotRenderEnded",k),eI.emit("gpt.slotRenderEnded.${divId}",k)})}))}setPrivacySettings(e){let t=this.getGlobal();this.push(()=>{t.pubads().setPrivacySettings(e)})}setPublisherProvidedId(e){let t=this.getGlobal();this.push(()=>{t.pubads().setPublisherProvidedId(e)})}getGlobal(){return window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],window.googletag}pubadsLoaded(){return"function"==typeof this.getGlobal().pubads}destroySlots(e){let t=this.getGlobal();this.push(()=>{eI.emit("gpt.destroySlots",{divIds:null==e?void 0:e.map(e=>e.getSlotElementId()),destroyAll:!e.length,slots:e}),t.destroySlots(e)})}destroySlotsByDivIds(e){let t=this.getGlobal();this.push(()=>{t.destroySlots(this.getSlotListByDivIds(e))})}destroyAllSlots(){let e=this.getGlobal();this.push(()=>{e.destroySlots()})}push(e){this.getGlobal().cmd.push(e)}getAllSlots(){return this.pubadsLoaded()?this.getGlobal().pubads().getSlots():[]}getAllSlotDivIds(){return this.getAllSlots().map(e=>e.getSlotElementId())}getSlotByDivId(e){return this.getAllSlots().find(t=>t.getSlotElementId()===e)}getSlotListByDivIds(e){return this.getAllSlots().filter(t=>e.includes(t.getSlotElementId()))}setSlotTargeting(e,t){Object.keys(t).forEach(r=>{e.setTargeting(r,t[r])})}refreshDivIds(e){if(!e.length)return!1;let t=this.getGlobal(),r=this.getSlotListByDivIds(e);return!!r.length&&(this.push(()=>{t.pubads().refresh(r)}),!0)}defineGptSlot({adUnit:e,sizes:t,divId:r}){e$.log("Defining slot",{adUnit:e,sizes:t,divId:r});let i=this.getGlobal().defineSlot(e,t,r);if(i)return i.addService(googletag.pubads()),i}defineOutOfPageSlot(e,t){let r=this.getGlobal().defineOutOfPageSlot(e,t);if(r)return r.addService(googletag.pubads()),r}addEventListener(e,t){let r=this.getGlobal();this.push(()=>{r.pubads().addEventListener(e,t)})}setTargeting(e){let t=this.getGlobal();this.push(()=>{Object.keys(e).forEach(r=>{let i=[].concat(e[r]).map(String);t.pubads().setTargeting(r,i)})})}clearTargeting(e){let t=this.getGlobal();this.push(()=>{t.pubads().clearTargeting(e)})}getTargeting(e){return this.getGlobal().pubads().getTargeting(e)}refresh(e){let t=this.getGlobal();this.push(()=>{t.pubads().refresh(e)})}setPageUrl(e){let t=this.getGlobal();this.push(()=>{t.pubads().set("page_url",e)})}constructor(){eO(this,"googleTagInitialized",!1),eO(this,"eventListenersAdded",!1)}};function eF(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var eB=class{setState(e){let t=[];for(let r in e)r in this.props&&(t.push(r),this.props[r]=e[r]);this.isReady||(this.isReady=!0,this.triggerReadyCallbacks()),this.triggerStateChangeCallbacks(t)}onStateChange(e,t){this.onStateChangeCallbacks.push({cb:e,depProps:t})}triggerStateChangeCallbacks(e){this.onStateChangeCallbacks.length<1||this.onStateChangeCallbacks.filter(t=>t.depProps.some(t=>e.includes(t))).forEach(e=>{e.cb(this.props)})}onReady(e){this.isReady?e():this.onReadyCallbacks.push(e.bind(this))}triggerReadyCallbacks(){this.onReadyCallbacks.length<1||(this.onReadyCallbacks.forEach(e=>e()),this.onReadyCallbacks=[])}constructor(e){eF(this,"isReady",!1),eF(this,"onStateChangeCallbacks",[]),eF(this,"onReadyCallbacks",[]),eF(this,"props",void 0),this.props=e}};let eM=["param1","param2","param3","param4","param5","param6","param7","param8","param9","param10"],eH=new class extends eB{getTargeting(){return this.props.targeting}setTargeting(e){this.setState({targeting:function(e){for(var t=1;t{for(let t in eI.emit("pageContext.setTargeting",e),eG.setTargeting(e),e)eI.emit(`pageContext.setTargeting.${t}`,{key:t,value:e[t]}),eM.includes(t)&&_.setCustomParams({[t]:e[t]})},["targeting"]);let eW=v("quick-test").setLabel("A/B Quick Test");async function ez(e){let t=`https://htlbid.com/stage/v3/${e}/bridge-htlbid.js`,r=`https://htlbid.com/v3/${e}/bridge-htlbid.js`;if((await fetch(t,{method:"HEAD"})).ok)return t;if((await fetch(r,{method:"HEAD"})).ok)return r;throw Error("Error fetching Bridge URL: Could not find Bridge deployed in either stage or prod.")}async function eV({loader:e,website:t,onPercent:r=100,tracking:i="htl",insights:s="param1"}){let o=100-r;if(function({name:e,condition:t=!0,tracking:r,variants:i,insights:s=!1}){if(!t)return;if(!Array.isArray(i)||0===i.length)return void eW.error(`Experiment "${e}" must have at least one variant.`);let o=0,n=new Set;for(let t of i){if("number"!=typeof t.percent||t.percent<0||t.percent>100)return void eW.error(`Variant "${t.name}" has an invalid percent value: ${t.percent}. Must be a number between 0 and 100.`);if(n.has(t.name))return void eW.error(`Duplicate variant name "${t.name}" found in experiment "${e}". Variant names must be unique.`);n.add(t.name),o+=t.percent}if(100!==o)return void eW.error(`Total percentage for experiment "${e}" is ${o}, but it must equal 100.`);if(!1!==s&&!["param1","param2","param3","param4","param5","param6","param7","param8","param9","param10"].includes(s))return void eW.error(`Invalid insights parameter "${s}" provided for experiment "${e}".`);let a=ek.createExperiment(e);i.forEach(e=>{a.variant({name:e.name,value:e.value,percentage:e.percent})});let l=a.pick();return s&&T({[s]:`${e}:${l.variant}`}),eW.log(e,l),r&&eH.setTargeting({[`tude_${r}`]:l.variant}),l.value}({name:`htlbid-tude${r}-${o}`,tracking:i,insights:s,variants:[{name:"htl",value:!0,percent:r},{name:"tude",value:!1,percent:o}]}))try{let e=await ez(t);ef(e,"head",!0)}catch(t){v().error(t),e.start()}else e.start()}window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],window.googletag.cmd.push(()=>{window.googletag.pubads().setTargeting("htlbidid","cw")});let eJ=new ev("soundcloud-yUijW49gH8",!1);eJ.addPreset([e_]),eJ.addResource({name:"cleanio",appendTo:a.Head,async:!1,url:"//cadmus.script.ac/d24657ks8lvxjy/script.js"}),eJ.setLibraryFolder("soundcloud.com"),eJ.setWrapper("soundcloud.com"),eJ.setLoadRemoteConfig(),eJ.appendForcedModules(["priceFloors"]),eV({loader:eJ,website:"soundcloud.com",onPercent:0})}()}();