PageSourceSearch

https://weversity.org/assets/react-DSCU3K9R.js

js weversity.org collected 2026-10-02 01:11:10 UTC 8,946 bytes, 32 lines download raw bytes

1var Z=Object.defineProperty;var U=e=>{throw TypeError(e)};var tt=(e,i,t)=>i in e?Z(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t;var k=(e,i,t)=>tt(e,typeof i!="symbol"?i+"":i,t),B=(e,i,t)=>i.has(e)||U("Cannot "+t);var a=(e,i,t)=>(B(e,i,"read from private field"),t?t.call(e):i.get(e)),d=(e,i,t)=>i.has(e)?U("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,t),n=(e,i,t,s)=>(B(e,i,"write to private field"),s?s.call(e,t):i.set(e,t),t),q=(e,i,t)=>(B(e,i,"access private method"),t);import{R as et}from"./vendor-react-DXfu0YkJ.js";const it="https://open.spotify.com",st=/open\.spotify\.com\/(\w+)\/(\w+)/i,nt="https://open.spotify.com/embed-podcast/iframe-api/v1",ot="SpotifyIframeApi",rt="onSpotifyIframeApiReady";function F(e,i={}){const t={src:K(e,i),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${at(t)}></iframe>
22  `}function K(e,i){var t,s,u;if(!e.src)return;const c=e.src.match(st),b=c&&c[1],g=c&&c[2],A={t:(t=i.config)==null?void 0:t.startAt,theme:((s=i.config)==null?void 0:s.theme)==="dark"?"0":null},l=(u=i.config)!=null&&u.preferVideo?"/video":"";return`${it}/embed/${b}/${g}${l}?${lt(A)}`}var L,S,C,f,p,m,v,_,P,H,N,Q;class R extends(globalThis.HTMLElement??class{}){constructor(){super();d(this,N);k(this,"loadComplete",new V);d(this,L);d(this,S);d(this,C);d(this,f,!1);d(this,p,!1);d(this,m,!0);d(this,v,0);d(this,_,NaN);d(this,P,!1);d(this,H,null);q(this,N,Q).call(this,"config")}async load(){var t,s,u;if(a(this,L))return;a(this,S)&&(this.loadComplete=new V),n(this,S,!0),await n(this,L,Promise.resolve()),n(this,L,null),n(this,f,!1),n(this,p,!1),n(this,v,0),n(this,_,NaN),n(this,P,!1),this.dispatchEvent(new Event("emptied"));let c=this.api;if(this.api=null,!this.src)return;this.dispatchEvent(new Event("loadstart"));const b={t:(t=this.config)==null?void 0:t.startAt,theme:((s=this.config)==null?void 0:s.theme)==="dark"?"0":null,preferVideo:(u=this.config)==null?void 0:u.preferVideo};if(a(this,C))this.api=c,this.api.iframeElement.src=K(G(this.attributes),this);else{n(this,C,!0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=F(G(this.attributes),this));let g=this.shadowRoot.querySelector("iframe");const A=await ct(nt,ot,rt);this.api=await new Promise(l=>A.createController(g,b,l)),this.api.iframeElement=g,this.api.addListener("ready",()=>{this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("volumechange"))}),this.api.addListener("playback_update",l=>{if(a(this,p)&&a(this,m)&&(l.data.isBuffering||!l.data.isPaused)){n(this,p,!1),this.currentTime=1;return}if(l.data.duration/1e3!==a(this,_)&&(n(this,p,!1),n(this,_,l.data.duration/1e3),this.dispatchEvent(new Event("durationchange"))),l.data.position/1e3!==a(this,v)&&(n(this,P,!1),n(this,p,!1),n(this,v,l.data.position/1e3),this.dispatchEvent(new Event("timeupdate"))),!a(this,f)&&!a(this,m)&&l.data.isPaused){n(this,m,!0),this.dispatchEvent(new Event("pause"));return}if(a(this,m)&&(l.data.isBuffering||!l.data.isPaused)){n(this,m,!1),this.dispatchEvent(new Event("play")),n(this,f,l.data.isBuffering),a(this,f)?this.dispatchEvent(new Event("waiting")):this.dispatchEvent(new Event("playing"));return}if(a(this,f)&&!l.data.isPaused){n(this,f,!1),this.dispatchEvent(new Event("playing"));return}if(!this.paused&&!this.seeking&&!a(this,p)&&Math.ceil(this.currentTime)>=this.duration){if(n(this,p,!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,s,u){if(s!==u)switch(t){case"src":{this.load();return}}}async play(){var t;return n(this,m,!1),n(this,f,!0),this.dispatchEvent(new Event("play")),await this.loadComplete,(t=this.api)==null?void 0:t.resume()}async pause(){var t;return await this.loadComplete,(t=this.api)==null?void 0:t.pause()}get config(){return a(this,H)}set config(t){n(this,H,t)}get paused(){return a(this,m)??!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 a(this,P)}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",!!t)}get currentTime(){return a(this,v)}set currentTime(t){if(this.currentTime==t)return;n(this,P,!0);let s=a(this,v);n(this,v,t),this.dispatchEvent(new Event("timeupdate")),n(this,v,s),this.loadComplete.then(()=>{var u;(u=this.api)==null||u.seek(t)})}get duration(){return a(this,_)}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",`${t}`)}}L=new WeakMap,S=new WeakMap,C=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,_=new WeakMap,P=new WeakMap,H=new WeakMap,N=new WeakSet,Q=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){const s=this[t];delete this[t],this[t]=s}},k(R,"getTemplateHTML",F),k(R,"shadowRootOptions",{mode:"open"}),k(R,"observedAttributes",["controls","loop","src"]);function at(e){let i="";for(const t in e){const s=e[t];s===""?i+=` ${t}`:i+=` ${t}="${s}"`}return i}function lt(e){return String(new URLSearchParams(ut(e)))}function ut(e){let i={};for(let t in e){let s=e[t];s===!0||s===""?i[t]=1:s===!1?i[t]=0:s!=null&&(i[t]=s)}return i}function G(e){let i={};for(let t of e)i[t.name]=t.value;return i}const j={};async function ct(e,i,t){return j[e]?j[e]:self[i]?Promise.resolve(self[i]):j[e]=new Promise(function(s,u){const c=document.createElement("script");c.src=e;const b=g=>s(g);self[t]=b,c.onload=()=>!t,c.onerror=u,document.head.append(c)})}class V extends Promise{constructor(i=()=>{}){let t,s;super((u,c)=>{i(u,c),t=u,s=c}),this.resolve=t,this.reject=s}}globalThis.customElements&&!globalThis.customElements.get("spotify-audio")&&globalThis.customElements.define("spotify-audio",R);var ht=R,dt=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),ft={className:"class",htmlFor:"for"};function X(e){return e.toLowerCase()}function Y(e){if(typeof e=="boolean")return e?"":void 0;if(typeof e!="function"&&!(typeof e=="object"&&e!==null))return e}function pt({react:e,tagName:i,elementClass:t,events:s,displayName:u,defaultProps:c,toAttributeName:b=X,toAttributeValue:g=Y}){const A=Number.parseInt(e.version)>=19,l=e.forwardRef((W,M)=>{var x,z;const y=e.useRef(null),O=e.useRef(new Map),$={},D={},w={},I={};for(const[o,r]of Object.entries(W)){if(dt.has(o)){w[o]=r;continue}const h=b(ft[o]??o);if(t.prototype&&o in t.prototype&&!(o in(((x=globalThis.HTMLElement)==null?void 0:x.prototype)??{}))&&!((z=t.observedAttributes)!=null&&z.some(T=>T===h))){I[o]=r;continue}if(o.startsWith("on")){$[o]=r;continue}const E=g(r);if(h&&E!=null&&(D[h]=String(E),A||(w[h]=E)),h&&A){const T=Y(r);E!==T?w[h]=E:w[h]=r}}if(typeof window<"u"){for(const o in $){const r=$[o],h=o.endsWith("Capture"),E=((s==null?void 0:s[o])??o.slice(2).toLowerCase()).slice(0,h?-7:void 0);e.useLayoutEffect(()=>{const T=y==null?void 0:y.current;if(!(!T||typeof r!="function"))return T.addEventListener(E,r,h),()=>{T.removeEventListener(E,r,h)}},[y==null?void 0:y.current,r])}e.useLayoutEffect(()=>{if(y.current===null)return;const o=new Map;for(const r in I)J(y.current,r,I[r]),O.current.delete(r),o.set(r,I[r]);for(const[r,h]of O.current)J(y.current,r,void 0);O.current=o})}if(typeof window>"u"&&(t!=null&&t.getTemplateHTML)&&(t!=null&&t.shadowRootOptions)){const{mode:o,delegatesFocus:r}=t.shadowRootOptions,h=e.createElement("template",{shadowrootmode:o,shadowrootdelegatesfocus:r,dangerouslySetInnerHTML:{__html:t.getTemplateHTML(D,W)},key:"ce-la-react-ssr-template-shadow-root"});w.children=[h,w.children]}return e.createElement(i,{...c,...w,ref:e.useCallback(o=>{y.current=o,typeof M=="function"?M(o):M!==null&&(M.current=o)},[M])},w.children)});return l.displayName=u??t.name,l}function J(e,i,t){var s;e[i]=t,t==null&&i in(((s=globalThis.HTMLElement)==null?void 0:s.prototype)??{})&&e.removeAttribute(i)}var gt=pt({react:et,tagName:"spotify-audio",elementClass:ht,toAttributeName(e){return e==="muted"?"":e==="defaultMuted"?"muted":X(e)}});/*! Bundled license information:
23
24ce-la-react/dist/ce-la-react.js:
25  (**
26   * @license
27   * Copyright 2018 Google LLC
28   * SPDX-License-Identifier: BSD-3-Clause
29   *
30   * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
31   *)
32*/export{gt 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.