!function(t){self.webpackChunk=function(e,n){for(variinn)t[i]=n[i];for(;e.length;)r[e.pop()]=1};vare={},r={0:1},n={};vari={10:function(){return{"./index_bg.js":{__wbindgen_object_drop_ref:function(t){returne[9].exports.e(t)},__wbg_buffer_9e184d6f785de5ed:function(t){returne[9].exports.b(t)},__wbg_newwithbyteoffsetandlength_e57ad1f2ce812c03:function(t,r,n){returne[9].exports.c(t,r,n)},__wbindgen_throw:function(t,r){returne[9].exports.f(t,r)},__wbindgen_memory:function(){returne[9].exports.d()}}}}};functiono(r){if(e[r])returne[r].exports;varn=e[r]={i:r,l:!1,exports:{}};returnt[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.e=function(t){vare=[];returne.push(Promise.resolve().then((function(){r[t]||importScripts(o.p+""+t+".worker.js")}))),({1:[10]}[t]||[]).forEach((function(t){varr=n[t];if(r)e.push(r);else{vara,s=i[t](),u=fetch(o.p+""+{10:"1b2a941e0e6bd21031c4"}[t]+".module.wasm");if(sinstanceofPromise&&"function"==typeofWebAssembly.compileStreaming)a=Promise.all([WebAssembly.compileStreaming(u),s]).then((function(t){returnWebAssembly.instantiate(t[0],t[1])}));elseif("function"==typeofWebAssembly.instantiateStreaming)a=WebAssembly.instantiateStreaming(u,s);else{a=u.then((function(t){returnt.arrayBuffer()})).then((function(t){returnWebAssembly.instantiate(t,s)}))}e.push(n[t]=a.then((function(e){returno.w[t]=(e.instance||e).exports})))}})),Promise.all(e)},o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)returnt;if(4&e&&"object"==typeoft&&t&&t.__esModule)returnt;varr=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeoft)for(varnint)o.d(r,n,function(e){returnt[e]}.bind(null,n));returnr},o.n=function(t){vare=t&&t.__esModule?function(){returnt.default}:function(){returnt};returno.d(e,"a",e),e},o.o=function(t,e){returnObject.prototype.hasOwnProperty.call(t,e)},o.p="",o.w={},o(o.s=0)}([function(t,e,r){(function(t){conste=r(6),n=r(7);addEventListener("fetch",t=>{t.respondWith(asyncfunction(t){constr=newe;r.get("/track/.*",()=>o("track",t)),r.get("/album/.*",()=>o("album",t)),r.get("/playlist/.*",()=>o("playlist",t));returnawaitr.route(t)}(t.request))});consti={aac_96:"8",64:"10",128:"1",320:"3",ra1:"13",ra2:"14",ra3:"15",sbc_256:"12",misc:"0"};asyncfunctiono(e,o){if(access_token=awaitKV.get("access_token"),null===access_token){constt=awaitfetch("https://connect.deezer.com/oauth/access_token.php?grant_type=client_credentials&client_id=447462&client_secret=a83bf7f38ad2f137e444727cfc3775cf&output=json"),e=awaitt.json();if(void0!==e.error)returnnewResponse("Couldn't get access token from Deezer",{status:500,headers:{"content-type":"text/plain"}});access_token=e.access_token,awaitKV.put("access_token",access_token,{expirationTtl:parseInt(e.expires)})}consta=newURL(o.url),s=a.pathname.split("/")[2];if(""===s)returnnewResponse("ID needs to be specified",{status:400,headers:{"content-type":"text/plain"}});if(format=a.searchParams.get("f"),null===format)format="320";elseif(format=format.toLowerCase(),void0===i[format]){if(index=Object.values(i).indexOf(format),-1===index)returnnewResponse("Invalid format",{status:400,headers:{"content-type":"text/plain"}});format=Object.keys(i)[index]}letu=a.searchParams.get("t");switch(u="true"===u||"1"===u,e){case"track":returnawaitasyncfunction(e,o,a,s){constu=awaitfetch(`https://api.deezer.com/track/${e}?access_token=${a}`),f=awaitu.json();if(void0!==f.error)returnnewResponse(JSON.stringify(f.error),{status:403,headers:{"content-type":"application/json"}});constc=awaitr.e(1).then(r.bind(null,8));if(result=awaitfunction(t,e,r){t.alternative&&(t=t.alternative);constn=t.id,o=t.md5_origin,a=t.media_version;n<0&&(e="misc");if("0"===t["filesize_"+e])returnnewResponse("Format unavailable",{status:403,headers:{"cont
varn=r(3),i=r(4),o=r(5);functiona(){returnu.TYPED_ARRAY_SUPPORT?2147483647:1073741823}functions(t,e){if(a()<e)thrownewRangeError("Invalid typed array length");returnu.TYPED_ARRAY_SUPPORT?(t=newUint8Array(e)).__proto__=u.prototype:(null===t&&(t=newu(e)),t.length=e),t}functionu(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||thisinstanceofu))returnnewu(t,e,r);if("number"==typeoft){if("string"==typeofe)thrownewError("If encoding is specified then the first argument must be a string");returnh(this,t)}returnf(this,t,e,r)}functionf(t,e,r,n){if("number"==typeofe)thrownewTypeError('"value" argument must not be a number');return"undefined"!=typeofArrayBuffer&&einstanceofArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)thrownewRangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))thrownewRangeError("'length' is out of bounds");e=void0===r&&void0===n?newUint8Array(e):void0===n?newUint8Array(e,r):newUint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=l(t,e);returnt}(t,e,r,n):"string"==typeofe?function(t,e,r){"string"==typeofr&&""!==r||(r="utf8");if(!u.isEncoding(r))thrownewTypeError('"encoding" must be a valid string encoding');varn=0|g(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));returnt}(t,e,r):function(t,e){if(u.isBuffer(e)){varr=0|p(e.length);return0===(t=s(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeofArrayBuffer&&e.bufferinstanceofArrayBuffer||"length"ine)return"number"!=typeofe.length||(n=e.length)!=n?s(t,0):l(t,e);if("Buffer"===e.type&&o(e.data))returnl(t,e.data)}varn;thrownewTypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}functionc(t){if("number"!=typeoft)thrownewTypeError('"size" argument must be a number');if(t<0)thrownewRangeError('"size" argument must not be negative')}functionh(t,e){if(c(e),t=s(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(varr=0;r<e;++r)t[r]=0;returnt}functionl(t,e){varr=e.length<0?0:0|p(e.length);t=s(t,r);for(varn=0;n<r;n+=1)t[n]=255&e[n];returnt}functionp(t){if(t>=a())thrownewRangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return0|t}functiong(t,e){if(u.isBuffer(t))returnt.length;if("undefined"!=typeofArrayBuffer&&"function"==typeofArrayBuffer.isView&&(ArrayBuffer.isView(t)||tinstanceofArrayBuffer))returnt.byteLength;"string"!=typeoft&&(t=""+t);varr=t.length;if(0===r)return0;for(varn=!1;;)switch(e){case"ascii":case"latin1":case"binary":returnr;case"utf8":case"utf-8":casevoid0:returnD(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return2*r;case"hex":returnr>>>1;case"base64":returnz(t).length;default:if(n)returnD(t).length;e=(""+e).toLowerCase(),n=!0}}functiond(t,e,r){varn=!1;if((void0===e||e<0)&&(e=0),e>this.length)return"";if((void0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":returnB(this,e,r);case"utf8":case"utf-8":returnP(this,e,r);case"ascii":returnS(this,e,r);case"latin1":case"binary":returnU(this,e,r);case"base64":returnR(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnO(this,e,r);default:if(n)thrownewTypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}functiony(t,e,r){varn=t[e];t[e]=t[r],t[r]=n}functionw(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeofr?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}elseif(r<0){if(!i)return-1;r=0}if("string"==typeofe&&(e=u.from(e,n)),u.isBuffer(e))return0===e.length?-1:m(t,e,r,n,i);if("number"==typeofe)returne&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeofUint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);thrownewTypeError("val must be string, number or Buffer")}functionm(t,e,r,n,i){varo,a=1,s=t.length,u=e.length;if(void0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"
e.read=function(t,e,r,n,i){varo,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=l,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+h],h+=l,c-=8);if(0===o)o=1-f;else{if(o===u)returna?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=f}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){vara,s,u,f=8*o-i-1,c=(1<<f)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=g,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;t[r+p]=255&a,p+=g,a/=256,f-=8);t[r+p-g]|=128*d}},function(t,e){varr={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){constr=t=>e=>e.method.toLowerCase()===t.toLowerCase(),n=r("connect"),i=r("delete"),o=r("get"),a=r("head"),s=r("options"),u=r("patch"),f=r("post"),c=r("put"),h=r("trace"),l=t=>e=>{constr=newURL(e.url).pathname;return(r.match(t)||[])[0]===r};t.exports=class{constructor(){this.routes=[]}handle(t,e){returnthis.routes.push({conditions:t,handler:e}),this}connect(t,e){returnthis.handle([n,l(t)],e)}delete(t,e){returnthis.handle([i,l(t)],e)}get(t,e){returnthis.handle([o,l(t)],e)}head(t,e){returnthis.handle([a,l(t)],e)}options(t,e){returnthis.handle([s,l(t)],e)}patch(t,e){returnthis.handle([u,l(t)],e)}post(t,e){returnthis.handle([f,l(t)],e)}put(t,e){returnthis.handle([c,l(t)],e)}trace(t,e){returnthis.handle([h,l(t)],e)}all(t){returnthis.handle([],t)}route(t){conste=this.resolve(t);returne?e.handler(t):newResponse("resource not found",{status:404,statusText:"not found",headers:{"content-type":"text/plain"}})}resolve(t){returnthis.routes.find(e=>!(e.conditions&&(!Array.isArray(e)||e.conditions.length))||("function"==typeofe.conditions?e.conditions(t):e.conditions.every(e=>e(t))))}}},function(t,e,r){t.exports=function(){"use strict";functiont(t){returnString(t).split("").map((function(t){returnt.charCodeAt(0)}))}functione(e){returnnewUint8Array(t(e))}functionr(e){varr=newUint8Array(2*e.length);returnnewUint16Array(r.buffer).set(t(e)),r}returnfunction(){vart=n.prototype;functionn(t){if(!t||"object"!=typeoft||!("byteLength"int))thrownewError("First argument should be an instance of ArrayBuffer or Buffer");this.arrayBuffer=t,this.padding=4096,this.frames=[],this.url=""}returnt._setIntegerFrame=function(t,e){varr=parseInt(e,10);this.frames.push({name:t,value:r,size:11+r.toString().length})},t._setStringFrame=function(t,e){varr=e.toString();this.frames.push({name:t,value:r,size:13+2*r.length})},t._setPictureFrame=function(t,e,r,n){vari,o,a,s=function(t){if(!t||!t.length)returnnull;if(255===t[0]&&216===t[1]&&255===t[2])return"image/jpeg";if(137===t[0]&&80===t[1]&&78===t[2]&&71===t[3])return"image/png";if(71===t[0]&&73===t[1]&&70===t[2])return"image/gif";if(87===t[8]&&69===t[9]&&66===t[10]&&80===t[11])return"image/webp";vare=73===t[0]&&73===t[1]&&42===t[2]&&0===t[3],r=77===t[0]&&77===t[1]&&0===t[2]&&42===t[3];returne||r?"image/tiff":66===t[0]&&77===t[1]?"image/bmp":0===t[0]&&0===t[1]&&1===t[2]&&0===t[3]?"image/x-icon":null}(newUint8Array(e)),u=r.toString();if(!s)thrownewError("Unknown picture MIME type");r||(n=!1),this.frames.push({name:"APIC",value:e,pictureType:t,mimeType:s,useUnicodeEncoding:n,description:u,size:(i=e.byteLength,o=s.length,a=u.length,11+o+1+1+(n?2+2*(a+1):a+1)+i)})},t._setLyricsFrame=function(t,e,r){varn,i,o=t.split("").map((function(t){returnt.charCodeAt(0)})),a=e.toString(),s=r.toString();this.frames.push({name:"USLT",value:s,language:o,description:a,size:(n=a.length,i=s.length,16+2*n+2+2+2*i)})},t._setCommentFrame=function(t,e,r){varn,i,o=t.split("").map((function(t){returnt.charCodeAt(0)})),a=e.toString(),s=r.toString();this.frames.push({name:"COMM",value:s,language:o,description:a,size:(n=a.length,