PageSourceSearch

https://www.true.th/_next/static/chunks/reactPlayerSpotify.5dfe8dad011906ca.js

js true.th collected 2026-10-01 11:42:06 UTC 7,678 bytes, 22 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[954],{5959:function(t,e,i){i.r(e),i.d(e,{default:function(){return g}});var n=i(7294);let s=/open\.spotify\.com\/(\w+)\/(\w+)/i;function r(t,e={}){let i={src:o(t,e),scrolling:"no",frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return`
2    <style>
3      :host {
4        display: inline-block;
5        min-width: 160px;
6        min-height: 80px;
7        position: relative;
8      }
9      iframe {
10        position: absolute;
11        top: 0;
12        left: 0;
13        width: 100%;
14        height: 100%;
15        overflow: hidden;
16      }
17      :host(:not([controls])) {
18        display: none !important;
19      }
20    </style>
21    <iframe${function(t){let e="";for(let i in t){let n=t[i];""===n?e+=` ${i}`:e+=` ${i}="${n}"`}return e}(i)}></iframe>
22  `}function o(t,e){var i,n,r;if(!t.src)return;let o=t.src.match(s),a=o&&o[1],l=o&&o[2],u={t:null==(i=e.config)?void 0:i.startAt,theme:(null==(n=e.config)?void 0:n.theme)==="dark"?"0":null},d=(null==(r=e.config)?void 0:r.preferVideo)?"/video":"";return`https://open.spotify.com/embed/${a}/${l}${d}?${String(new URLSearchParams(function(t){let e={};for(let i in t){let n=t[i];!0===n||""===n?e[i]=1:!1===n?e[i]=0:null!=n&&(e[i]=n)}return e}(u)))}`}class a extends(globalThis.HTMLElement??class{}){static getTemplateHTML=r;static shadowRootOptions={mode:"open"};static observedAttributes=["controls","loop","src"];loadComplete=new h;#t;#e;#i;#n=!1;#s=!1;#r=!0;#o=0;#a=NaN;#l=!1;#u=null;constructor(){super(),this.#d("config")}async load(){var t,e,i;if(this.#t)return;this.#e&&(this.loadComplete=new h),this.#e=!0,await (this.#t=Promise.resolve()),this.#t=null,this.#n=!1,this.#s=!1,this.#o=0,this.#a=NaN,this.#l=!1,this.dispatchEvent(new Event("emptied"));let n=this.api;if(this.api=null,!this.src)return;this.dispatchEvent(new Event("loadstart"));let s={t:null==(t=this.config)?void 0:t.startAt,theme:(null==(e=this.config)?void 0:e.theme)==="dark"?"0":null,preferVideo:null==(i=this.config)?void 0:i.preferVideo};if(this.#i)this.api=n,this.api.iframeElement.src=o(l(this.attributes),this);else{this.#i=!0,this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=r(l(this.attributes),this));let t=this.shadowRoot.querySelector("iframe"),e=await d("https://open.spotify.com/embed-podcast/iframe-api/v1","SpotifyIframeApi","onSpotifyIframeApiReady");this.api=await new Promise(i=>e.createController(t,s,i)),this.api.iframeElement=t,this.api.addListener("ready",()=>{this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("volumechange"))}),this.api.addListener("playback_update",t=>{if(this.#s&&this.#r&&(t.data.isBuffering||!t.data.isPaused)){this.#s=!1,this.currentTime=1;return}if(t.data.duration/1e3!==this.#a&&(this.#s=!1,this.#a=t.data.duration/1e3,this.dispatchEvent(new Event("durationchange"))),t.data.position/1e3!==this.#o&&(this.#l=!1,this.#s=!1,this.#o=t.data.position/1e3,this.dispatchEvent(new Event("timeupdate"))),!this.#n&&!this.#r&&t.data.isPaused){this.#r=!0,this.dispatchEvent(new Event("pause"));return}if(this.#r&&(t.data.isBuffering||!t.data.isPaused)){this.#r=!1,this.dispatchEvent(new Event("play")),this.#n=t.data.isBuffering,this.#n?this.dispatchEvent(new Event("waiting")):this.dispatchEvent(new Event("playing"));return}if(this.#n&&!t.data.isPaused){this.#n=!1,this.dispatchEvent(new Event("playing"));return}if(!this.paused&&!this.seeking&&!this.#s&&Math.ceil(this.currentTime)>=this.duration){if(this.#s=!0,this.loop){this.currentTime=1;return}this.continuous||(this.pause(),this.dispatchEvent(new Event("ended")));return}})}this.loadComplete.resolve(),await this.loadComplete}async attributeChangedCallback(t,e,i){if(e!==i&&"src"===t){this.load();return}}async play(){var t;return this.#r=!1,this.#n=!0,this.dispatchEvent(new Event("play")),await this.loadComplete,null==(t=this.api)?void 0:t.resume()}async pause(){var t;return await this.loadComplete,null==(t=this.api)?void 0:t.pause()}get config(){return this.#u}set config(t){this.#u=t}get paused(){return this.#r??!0}get muted(){return!1}set muted(t){}get volume(){return 1}set volume(t){}get ended(){return Math.ceil(this.currentTime)>=this.duration}get seeking(){return this.#l}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",!!t)}get currentTime(){return this.#o}set currentTime(t){if(this.currentTime==t)return;this.#l=!0;let e=this.#o;this.#o=t,this.dispatchEvent(new Event("timeupdate")),this.#o=e,this.loadComplete.then(()=>{var e;null==(e=this.api)||e.seek(t)})}get duration(){return this.#a}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",`${t}`)}#d(t){if(Object.prototype.hasOwnProperty.call(this,t)){let e=this[t];delete this[t],this[t]=e}}}function l(t){let e={};for(let i of t)e[i.name]=i.value;return e}let u={};async function d(t,e,i){return u[t]?u[t]:e&&self[e]?Promise.resolve(self[e]):u[t]=new Promise(function(e,n){let s=document.createElement("script");s.src=t;let r=t=>e(t);i&&(self[i]=r),s.onload=()=>!i&&r(),s.onerror=n,document.head.append(s)})}class h extends Promise{constructor(t=()=>{}){let e,i;super((n,s)=>{t(n,s),e=n,i=s}
22),this.resolve=e,this.reject=i}}globalThis.customElements&&!globalThis.customElements.get("spotify-audio")&&globalThis.customElements.define("spotify-audio",a);var c=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),p={className:"class",htmlFor:"for"};function f(t){return t.toLowerCase()}function m(t){return"boolean"==typeof t?t?"":void 0:"function"==typeof t?void 0:"object"!=typeof t||null===t?t:void 0}function v(t,e,i){var n;t[e]=i,null==i&&e in((null==(n=globalThis.HTMLElement)?void 0:n.prototype)??{})&&t.removeAttribute(e)}var g=function({react:t,tagName:e,elementClass:i,events:n,displayName:s,defaultProps:r,toAttributeName:o=f,toAttributeValue:a=m}){let l=Number.parseInt(t.version)>=19,u=t.forwardRef((s,u)=>{var d,h;let f=t.useRef(null),g=t.useRef(new Map),w={},E={},y={},T={};for(let[t,e]of Object.entries(s)){if(c.has(t)){y[t]=e;continue}let n=o(p[t]??t);if(i.prototype&&t in i.prototype&&!(t in((null==(d=globalThis.HTMLElement)?void 0:d.prototype)??{}))&&!(null==(h=i.observedAttributes)?void 0:h.some(t=>t===n))){T[t]=e;continue}if(t.startsWith("on")){w[t]=e;continue}let s=a(e);n&&null!=s&&(E[n]=String(s),l||(y[n]=s)),n&&l&&(s!==m(e)?y[n]=s:y[n]=e)}if("undefined"!=typeof window){for(let e in w){let i=w[e],s=e.endsWith("Capture"),r=((null==n?void 0:n[e])??e.slice(2).toLowerCase()).slice(0,s?-7:void 0);t.useLayoutEffect(()=>{let t=null==f?void 0:f.current;if(t&&"function"==typeof i)return t.addEventListener(r,i,s),()=>{t.removeEventListener(r,i,s)}},[null==f?void 0:f.current,i])}t.useLayoutEffect(()=>{if(null===f.current)return;let t=new Map;for(let e in T)v(f.current,e,T[e]),g.current.delete(e),t.set(e,T[e]);for(let[t,e]of g.current)v(f.current,t,void 0);g.current=t})}if("undefined"==typeof window&&(null==i?void 0:i.getTemplateHTML)&&(null==i?void 0:i.shadowRootOptions)){let{mode:e,delegatesFocus:n}=i.shadowRootOptions,r=t.createElement("template",{shadowrootmode:e,shadowrootdelegatesfocus:n,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(E,s)}});y.children=[r,y.children]}return t.createElement(e,{...r,...y,ref:t.useCallback(t=>{f.current=t,"function"==typeof u?u(t):null!==u&&(u.current=t)},[u])})});return u.displayName=s??i.name,u}({react:n,tagName:"spotify-audio",elementClass:a,toAttributeName:t=>"muted"===t?"":"defaultMuted"===t?"muted":f(t)})}}]);

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.