1import{d as u}from"./chunk-72YAZQ5C.js";import"./chunk-D4EZOWEK.js";import{j as l,u as _,v as d}from"./chunk-CIZQHUPH.js";import"./chunk-VTC22NR5.js";import{a as r}from"./chunk-QD2YVZSD.js";import"./chunk-6IEOUFJJ.js";import"./chunk-FY2FBY5S.js";import"./chunk-PDTAGS5S.js";import"./chunk-PHTBXULL.js";import{c as I}from"./chunk-ZIYJVGPD.js";import"./chunk-VIVYENB4.js";import"./chunk-3HVXYCZN.js";import"./chunk-T6LYIDMV.js";import"./chunk-74EIPC4E.js";import"./chunk-YI2EV5SO.js";import{d as e,e as g,u as c}from"./chunk-7WI4Z4JO.js";c();g();var p=class{constructor(t,i,s=null,a=null){this._spotId=t,this._token=a,this._pianoSDK=_.getInstance(),this._containerId=i,this._postId=s}setToken(t){return this._token=t,this}setPostId(t){return this._postId=t,this}setContainerId(t){return this._containerId=t,this}setSpotId(t){return this._spotId=t,this}load(){let t=document.createElement("script"),i=r.getMain(),s=document.getElementById(this._containerId),a=i.hashtags||"",S="".concat(location.protocol,"//").concat(location.host).concat(location.pathname),h=this._postId?this._postId:r.getMainId(),m=this._pianoSDK.getOriginLoad();t.async=!0,t.src="https://launcher.spot.im/spot/".concat(this._spotId),t.onload=()=>{d.getInstance().isAnonymous()?(I(this._pianoSDK,l.ON_LOGGIN_SUCCESS,()=>{window.SPOTIM&&window.SPOTIM.startSSOForProvider?n.bind(this)():document.addEventListener("spot-im-api-ready",n,!1)},this),window.SPOTIM&&window.SPOTIM.logout?window.SPOTIM.logout():document.addEventListener("spot-im-api-ready",function(){window.SPOTIM.logout()},!1),document.addEventListener("spot-im-login-start",function(o){u.showModal(e.PIANO_SCREEN_LOGIN,e.PIANO_DISPLAY_MODAL,m)})):window.SPOTIM&&window.SPOTIM.startSSOForProvider?n.bind(this)():document.addEventListener("spot-im-api-ready",n,!1);function n(){window.SPOTIM.startSSOForProvider({provider:"piano",token:window.tp.pianoId.getToken()}).then(function(o){console.log(o)}).catch(function(o){console.log(o)})}d.getInstance().isSubscriber()&&(window.__SPOTIM_ADS_DISABLED__=!0,window.__SPOTIM_DISABLE_ADS__&&window.__SPOTIM_DISABLE_ADS__())},t.setAttribute("data-spotim-module","spotim-launcher"),t.setAttribute("data-post-url",S),t.setAttribute("data-article-tags",a),t.setAttribute("data-post-id",h),s.appendChild(t)}};export{p as default};
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.