/*! * Copyright 2021-2024 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 */ "use strict";(self.webpackChunkIcecastMetadataPlayer=self.webpackChunkIcecastMetadataPlayer||[]).push([[385],{0:(H,i,e)=>{e.d(i,{A:()=>t});const t=(H,i)=>{Object.defineProperty(H,"name",{value:i})}},209:(H,i,e)=>{e.d(i,{A:()=>h});var t=e(178);function h(){const H=Uint8Array,i=Float32Array;h.modules||Object.defineProperties(h,{modules:{value:new WeakMap},setModule:{value(H,i){h.modules.set(H,Promise.resolve(i))}},getModule:{value(H,i){let e=h.modules.get(H);return e||(i?e=WebAssembly.compile((0,t.D4)(i)):(i=H.wasm,e=h.inflateDynEncodeString(i).then(H=>WebAssembly.compile(H))),h.modules.set(H,e)),e}},concatFloat32:{value(H,e){let t=new i(e),h=0,I=0;for(;h({errors:H,channelData:i,samplesDecoded:e,sampleRate:t,bitDepth:h})},getDecodedAudioMultiChannel:{value(H,i,e,t,I,s){let n,r,a=[];for(n=0;n(i=(0,t.D4)(i),new Promise(e=>{const t=String.raw`dynEncode012804c7886d(‰›•)((()>+ˆ*§§)§ˆ,§§§§)§ˆ+§§§)§+.-()(*)-+)(ˆ.7*§)i¸¸,3§(i¸¸,3/G+.••—š¡*(,˜ŽŽ(,3‡‡‰˜‡Š‰›+)2å:-œ),§H(P*DI*H(P*@I++hH)H*r,hH(H(P*WebAssembly.instantiate(H,{})).then(({exports:t})=>{const h=new Map(Object.entries(t)),I=h.get("puff"),s=h.get("memory").buffer,n=new H(s),r=new DataView(s);let a=h.get("__heap_base");const o=i.length,c=a;a+=4,r.setInt32(c,o,!0);const l=a;a+=o,n.set(i,l);const u=a;a+=4,r.setInt32(u,n.byteLength-a,!0),I(a,u,l,c),e(n.slice(a,a+r.getInt32(u,!0)))})}))}}),Object.defineProperty(this,"wasm",{enumerable:!0,get:()=>this.H}),this.getOutputChannels=(H,i,e)=>{let t=[],h=0;for(;h{const t=this.H.malloc(i.BYTES_PER_ELEMENT*H);return e&&this.i.add(t),{ptr:t,len:H,buf:new i(this.H.HEAP,t,H)}},this.free=()=>{this.i.forEach(H=>{this.H.free(H)}),this.i.clear()},this.codeToString=H=>{const i=[],e=new Uint8Array(this.H.HEAP);for(let t=e[H];0!==t;t=e[++H])i.push(t);return String.fromCharCode.apply(null,i)},this.addError=(H,i,e,t,h,I)=>{H.push({message:i,frameLength:e,frameNumber:t,inputBytes:h,outputSamples:I})},this.instantiate=(H,i)=>(i&&h.setModule(H,i),this.H=new H(h).instantiate(),this.i=new Set,this.H.ready.then(()=>this))}},374:(H,i,e)=>{e.d(i,{A:()=>I});var t=e(761),h=e(209);class I extends((()=>globalThis.Worker||t)()){constructor(H,i,e,t){h.A.modules||new h.A;let I=h.A.modules.get(e);if(!I){let H,i="text/javascript",s=`'use strict';(${((H,i,e)=>{let t,h,I=new Promise(H=>{h=H});self.onmessage=({data:{id:s,command:n,data:r}})=>{let a,o=I,c={id:s};"init"===n?(Object.defineProperties(H,{WASMAudioDecoderCommon:{value:i},EmscriptenWASM:{value:e},module:{value:r.module},isWebWorker:{value:!0}}),t=new H(r.options),h()):"free"===n?t.free():"ready"===n?o=o.then(()=>t.ready):"reset"===n?o=o.then(()=>t.reset()):(Object.assign(c,t[n](Array.isArray(r)?r.map(H=>new Uint8Array(H)):new Uint8Array(r))),a=c.channelData?c.channelData.map(H=>H.buffer):[]),o.then(()=>self.postMessage(c,a))}}).toString()})(${e}, ${h.A}, ${t})`;try{H=void 0!==process.versions.node}catch{}I=H?`data:${i};base64,${Buffer.from(s).toString("base64")}`:URL.createObjectURL(new Blob([s],{type:i})),h.A.modules.set(e,I)}super(I,{name:i}),this.t=Number.MIN_SAFE_INTEGER,this.h=new Map,this.onmessage=({data:H})=>{const{id:i,...e}=H;this.h.get(i)(e),this.h.delete(i)},new t(h.A).getModule().then(i=>{this.postToDecoder("init",{module:i,options:H})})}async postToDecoder(H,i){return new Promise(e=>{this.postMessage({command:H,id:this.t,data:i}),this.h.set(this.t++,e)})}get ready(){return this.postToDecoder("ready")}async free(){await this.postToDecoder("free").finally(()=>{this.terminate()})}async reset(){await this.postToDecoder("reset")}}}}]); //# sourceMappingURL=icecast-metadata-player-1.17.13.common.min.js.map