1159cl/lib/icecast-metadata-player-1.17.3.main.min.js

23 lines
63 KiB
JavaScript
Raw Permalink Normal View History

2024-12-06 23:38:18 +00:00
/*! For license information please see icecast-metadata-player-1.17.3.main.min.js.LICENSE.txt */
/*!
* Copyright 2021-2023 Ethan Halsall
* https://github.com/eshaz/icecast-metadata-js
*
* This file is part of icecast-metadata-player.
*
* icecast-metadata-player free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* icecast-metadata-player distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>
*/
var IcecastMetadataPlayer;(()=>{"use strict";var t,s,i,e={317:(t,s,i)=>{i.d(s,{fp:()=>re,HQ:()=>ne,p:()=>ae,Ay:()=>he,wx:()=>oe,we:()=>ce,cJ:()=>de,Er:()=>ue,$:()=>le});const e=Symbol,h=(()=>{const t="left",s="center",i="right";return["","front ","side ","rear "].map((e=>[[t,i],[t,i,s],[t,s,i],[s,t,i],[s]].flatMap((t=>t.map((t=>e+t)).join(", ")))))})(),r="LFE",n="monophonic (mono)",a="stereo",o="surround",c=(t,...s)=>`${[n,a,`linear ${o}`,"quadraphonic",`5.0 ${o}`,`5.1 ${o}`,`6.1 ${o}`,`7.1 ${o}`][t-1]} (${s.join(", ")})`,u=[n,c(2,h[0][0]),c(3,h[0][2]),c(4,h[1][0],h[3][0]),c(5,h[1][2],h[3][0]),c(6,h[1][2],h[3][0],r),c(7,h[1][2],h[2][0],h[3][4],r),c(8,h[1][2],h[2][0],h[3][0],r)],l=48e3,d=44100,y=32e3,f=24e3,m=22050,p=16e3,w=8e3,g="absoluteGranulePosition",b="bandwidth",S="bitDepth",q="bitrate",M=q+"Maximum",A=q+"Minimum",v=q+"Nominal",P="buffer",E=P+"Fullness",_="codec",T=_+"Frames",C="coupledStreamCount",I="crc",R=I+"16",x=I+"32",$="data",k="description",O="duration",D="emphasis",B="hasOpusPadding",L="header",U="isContinuedPacket",F="isCopyrighted",N="isFirstPage",j="isHome",W="isLastPage",G="isOriginal",H="isPrivate",Q="isVbr",V="layer",Y="length",z="mode",K=z+"Extension",J="mpeg",Z=J+"Version",X="numberAACFrames",tt="outputGain",st="preSkip",it="profile",et=e(),ht="protection",rt="rawData",nt="segments",at="subarray",ot="version",ct="vorbis",ut=ct+"Comments",lt=ct+"Setup",dt="block",yt=dt+"ingStrategy",ft=e(),mt=dt+"Size",pt=dt+"size0",wt=dt+"size1",gt=e(),bt="channel",St=bt+"MappingFamily",qt=bt+"MappingTable",Mt=bt+"Mode",At=e(),vt=bt+"s",Pt="copyright",Et=Pt+"Id",_t=Pt+"IdStart",Tt="frame",Ct=Tt+"Count",It=Tt+"Length",Rt="Number",xt=Tt+Rt,$t=Tt+"Padding",kt=Tt+"Size",Ot="Rate",Dt="inputSample"+Ot,Bt="page",Lt=Bt+"Checksum",Ut=e(),Ft=Bt+"SegmentTable",Nt=Bt+"Sequence"+Rt,jt="sample",Wt=jt+Rt,Gt=jt+Ot,Ht=e(),Qt=jt+"s",Vt="stream",Yt=Vt+"Count",zt=Vt+"Info",Kt=Vt+"Serial"+Rt,Jt=Vt+"StructureVersion",Zt="total",Xt=Zt+"BytesOut",ts=Zt+"Duration",ss=Zt+"Samples",is=e(),es=e(),hs=e(),rs=e(),ns=e(),as=e(),os=e(),cs=e(),us=e(),ls=e(),ds=e(),ys=e(),fs=e(),ms=e(),ps=e(),ws=e(),gs=e(),bs=e(),Ss=Uint8Array,qs=DataView,Ms="reserved",As="bad",vs="free",Ps="none",Es="16bit CRC",_s=(t,s,i)=>{for(let e=0;e<t[Y];e++){let h=s(e);for(let t=8;t>0;t--)h=i(h);t[e]=h}return t},Ts=_s(new Ss(256),(t=>t),(t=>128&t?7^t<<1:t<<1)),Cs=[_s(new Uint16Array(256),(t=>t<<8),(t=>t<<1^(32768&t?32773:0)))],Is=[_s(new Uint32Array(256),(t=>t),(t=>t>>>1^3988292384*(1&t)))];for(let t=0;t<15;t++){Cs.push(new Uint16Array(256)),Is.push(new Uint32Array(256));for(let s=0;s<=255;s++)Cs[t+1][s]=Cs[0][Cs[t][s]>>>8]^Cs[t][s]<<8,Is[t+1][s]=Is[t][s]>>>8^Is[0][255&Is[t][s]]}const Rs=t=>{const s=t[Y],i=s-16;let e=0,h=0;for(;h<=i;)e=Is[15][255&(t[h++]^e)]^Is[14][255&(t[h++]^e>>>8)]^Is[13][255&(t[h++]^e>>>16)]^Is[12][t[h++]^e>>>24]^Is[11][t[h++]]^Is[10][t[h++]]^Is[9][t[h++]]^Is[8][t[h++]]^Is[7][t[h++]]^Is[6][t[h++]]^Is[5][t[h++]]^Is[4][t[h++]]^Is[3][t[h++]]^Is[2][t[h++]]^Is[1][t[h++]]^Is[0][t[h++]];for(;h!==s;)e=Is[0][255&(e^t[h++])]^e>>>8;return~e},xs=(...t)=>{const s=new Ss(t.reduce(((t,s)=>t+s[Y]),0));return t.reduce(((t,i)=>(s.set(i,t),t+i[Y])),0),s},$s=t=>String.fromCharCode(...t),ks=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],Os=t=>ks[15&t]<<4|ks[t>>4];class Ds{constructor(t){this.t=t,this.i=8*t[Y]}set position(t){this.i=t}get position(){return this.i}read(t){const s=Math.floor(this.i/8),i=this.i%8;this.i-=t;return(Os(this.t[s-1])<<8)+Os(this.t[s])>>7-i&255}}class Bs{constructor(t,s){this.h=t,this.S=s,this[ps]()}[ws](){this.q=!0}[ps](){this.M=new Map,this.A=new WeakMap,this.v=!1,this.P=!1,this._=null,this.q=!1}[ms](t,s){if(this.S){this._!==t&&(this._=t,this.P=!0);const i=this.A.get(this.M.get(this.T));this.P&&i&&this.S({bitrate:t,...i},s),this.P=!1}}[us](t){const s=this.M.get(t);return s&&this.C(t),s}[ls](t,s,i){this.q&&(this.v||(this.h({...s}),this.v=!0),this.C(t),this.M.set(t,s),this.A.set(s,i))}C(t){this.S&&t!==this.T&&(this.P=!0,this.T=t)}}const Ls=new WeakMap,Us=new WeakMap;class Fs{constructor(t,s){this.I=t,this.M=s}*[os](){let t;for(;;){if(t=yield*this.Frame[ds](t
//# sourceMappingURL=icecast-metadata-player-1.17.3.main.min.js.map