diff --git a/assets/index.c67be838.js b/assets/index.c15c6f76.js similarity index 99% rename from assets/index.c67be838.js rename to assets/index.c15c6f76.js index 0a12b4b..da30bbe 100644 --- a/assets/index.c67be838.js +++ b/assets/index.c15c6f76.js @@ -55,7 +55,7 @@ var De=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var l=(t,e,s)=>(De(t * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Y=ht(class extends dt{constructor(t){var e;if(super(t),t.type!==lt.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var s,i;if(this.nt===void 0){this.nt=new Set,t.strings!==void 0&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in e)e[n]&&!(!((s=this.st)===null||s===void 0)&&s.has(n))&&this.nt.add(n);return this.render(e)}const r=t.element.classList;this.nt.forEach(n=>{n in e||(r.remove(n),this.nt.delete(n))});for(const n in e){const o=!!e[n];o===this.nt.has(n)||((i=this.st)===null||i===void 0?void 0:i.has(n))||(o?(r.add(n),this.nt.add(n)):(r.remove(n),this.nt.delete(n)))}return V}});var Q,O,J;class ts{constructor({renderCallback:e}){$(this,Q,!1);$(this,O,null);$(this,J,void 0);u(this,O,null),u(this,J,e),this.render=this.render.bind(this)}start(){u(this,Q,!0),u(this,O,requestAnimationFrame(this.render))}stop(){l(this,O)&&cancelAnimationFrame(l(this,O)),u(this,Q,!1)}render(){l(this,J)&&l(this,J).call(this),l(this,Q)&&u(this,O,requestAnimationFrame(this.render))}}Q=new WeakMap,O=new WeakMap,J=new WeakMap;const Xs="/nikku/assets/audio-source.68bef94d.js";var m,A,f,S,z,D,N,k,B,M,ge,Xe,ke,ss;class qs{constructor(e){$(this,ge);$(this,ke);$(this,m,void 0);$(this,A,void 0);$(this,f,void 0);$(this,S,void 0);$(this,z,void 0);$(this,D,void 0);$(this,N,void 0);$(this,k,void 0);$(this,B,void 0);$(this,M,void 0);this.metadata=null,u(this,m,null),u(this,A,[]),u(this,f,null),u(this,S,null),u(this,z,0),u(this,D,!1),u(this,N,!0),u(this,k,!1),u(this,B,0),u(this,M,null),this.options=e,this.init()}async init(e){if(e?(this.metadata=e,u(this,m,new AudioContext({sampleRate:e.sampleRate})),l(this,m).audioWorklet&&await l(this,m).audioWorklet.addModule(Xs),u(this,M,new ts({renderCallback:$e(this,ke,ss).bind(this)}))):(this.metadata=null,u(this,m,null),u(this,M,null)),u(this,A,[!0]),this.metadata&&this.metadata.numberTracks>1){u(this,A,[]);for(let s=0;s{for(const a of d){console.time("getSamples");const h=await this.options.decodeSamples(a.offset*s,a.size*s);console.timeEnd("getSamples"),$e(this,ge,Xe).call(this,h,a.offset*s)}})()}initPlayback(e){if(!this.metadata||!l(this,m)||l(this,B)==null)return;const{loopStartSample:s,totalSamples:i,sampleRate:r,trackDescriptions:n}=this.metadata;u(this,f,new AudioWorkletNode(l(this,m),"audio-source-processor",{numberOfInputs:0,numberOfOutputs:1,outputChannelCount:[2],processorOptions:{initialSamples:e,loopStartSample:s,totalSamples:i,sampleRate:r,shouldLoop:l(this,D),trackDescriptions:n,trackStates:l(this,A)}})),l(this,f).port&&(l(this,f).port.addEventListener("message",o=>{switch(o.data.type){case"BUFFER_LOOPED":{console.log("[AudioPlayer]",o.data.type);break}case"BUFFER_ENDED":{console.log("[AudioPlayer]",o.data.type),this.pause(),u(this,N,!0);break}case"TIMESTAMP_REPLY":{u(this,z,o.data.payload.timestamp);break}}}),l(this,f).port.start()),u(this,S,l(this,m).createGain()),l(this,S).gain.value=l(this,B),l(this,f).connect(l(this,S)),l(this,S).connect(l(this,m).destination),u(this,N,!1)}async seek(e){!l(this,m)||(l(this,f)&&l(this,f).port.postMessage({type:"SEEK",payload:{playbackTimeInS:e}}),l(this,k)||await this.play())}async play(){var e;l(this,k)||!l(this,m)||(u(this,k,!0),(e=l(this,M))==null||e.start(),this.options.onPlay(),await l(this,m).resume(),l(this,N)&&this.seek(0))}async pause(){var e;!l(this,k)||!l(this,m)||(u(this,k,!1),(e=l(this,M))==null||e.stop(),this.options.onPause(),await l(this,m).suspend())}async setTrackStates(e){u(this,A,e),l(this,f)&&l(this,f).port.postMessage({type:"UPDATE_TRACK_STATES",payload:{trackStates:l(this,A)}})}async setVolume(e){u(this,B,e),l(this,S)&&(l(this,S).gain.value=e)}setLoop(e){u(this,D,e),l(this,f)&&l(this,f).port.postMessage({type:"UPDATE_SHOULD_LOOP",payload:{shouldLoop:l(this,D)}})}getCurrrentPlaybackTime(){return l(this,f)?l(this,z):0}}m=new WeakMap,A=new WeakMap,f=new WeakMap,S=new WeakMap,z=new WeakMap,D=new WeakMap,N=new WeakMap,k=new WeakMap,B=new WeakMap,M=new WeakMap,ge=new WeakSet,Xe=function(e,s=0){var i;!this.metadata||!l(this,m)||(s===0?(this.initPlayback(e),(i=l(this,M))==null||i.start(),u(this,k,!0),this.options.onPlay()):l(this,f)&&l(this,f).port.postMessage({type:"ADD_SAMPLES",payload:{samples:e,offset:s}},e.map(r=>r.buffer)))},ke=new WeakSet,ss=function(){l(this,f)&&l(this,f).port.postMessage({type:"TIMESTAMP_QUERY"})};var Ks=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,b=(t,e,s,i)=>{for(var r=i>1?void 0:i?Gs(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ks(e,s,r),r},Qs=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},L=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},C=(t,e,s)=>(Qs(t,e,"access private method"),s),G,ue,ut,is,qe,rs,Se,pt,Ke,ns,Ge,os,Qe,as,Je,ls,et,hs,tt,ds;let y=class extends E{constructor(){super(...arguments),L(this,G),L(this,ut),L(this,qe),L(this,Se),L(this,Ke),L(this,Ge),L(this,Qe),L(this,Je),L(this,et),L(this,tt),this.playPauseIcon="play",this.loop="on",this.volume=1,this.muted=!1,this.progressMax=0,this.progressValue=0,this.timeDisplayMax=0,this.timeDisplayValue=0,this.tracksCount=1,this.tracksActive=[!0],this.disabled=!0,this.fileDraggingOver=!1,this.trackTitle="",this.errorMessage="",this.audioPlayer=null,this.workerInstance=Qt(new Worker("/nikku/assets/worker.0002d8a4.js")),this.timer=new ts({renderCallback:()=>{if(!this.audioPlayer)return;const t=this.audioPlayer.getCurrrentPlaybackTime();this.progressValue=t,this.timeDisplayValue=t}})}render(){return P`
${this.errorMessage}
${this.trackTitle}
Drop BRSTM file to start playback
`}firstUpdated(){window.addEventListener("dragover",t=>{t.preventDefault(),this.fileDraggingOver=!0}),window.addEventListener("dragend",t=>{this.fileDraggingOver=!1}),window.addEventListener("dragleave",t=>{this.fileDraggingOver=!1}),window.addEventListener("drop",t=>{if(t.preventDefault(),this.fileDraggingOver=!1,!t.dataTransfer||!t.dataTransfer.items||!t.dataTransfer.items[0]||t.dataTransfer.items[0].kind!=="file"){C(this,G,ue).call(this,new Error("No file read"));return}const e=t.dataTransfer.items[0].getAsFile();if(!e){C(this,G,ue).call(this,new Error("No file read"));return}cs(e).then(C(this,Se,pt).bind(this))})}};G=new WeakSet;ue=function(t){this.errorMessage=t.message+t.stack};ut=new WeakSet;is=function(){this.errorMessage=""};qe=new WeakSet;rs=function(t){const e=t.target.files;if(!e||!e.length){C(this,G,ue).call(this,new Error("No file read"));return}const s=e[0];cs(s).then(C(this,Se,pt).bind(this))};Se=new WeakSet;pt=async function({buffer:t,file:e}){var s;if(C(this,ut,is).call(this),!(!t||!(t instanceof ArrayBuffer))){e.name&&(this.trackTitle=e.name);try{await this.workerInstance.init(es(t,[t]));const i=await this.workerInstance.getMetadata();if(this.audioPlayer?await this.audioPlayer.destroy():this.audioPlayer=new qs({onPlay:()=>{this.playPauseIcon="pause",this.timer.start()},onPause:()=>{this.playPauseIcon="play",this.timer.stop()},decodeSamples:async(o,d)=>await this.workerInstance.getSamples(o,d)||[]}),!i)throw new Error("metadata is undefined");await this.audioPlayer.init(i),await this.audioPlayer.start();const r=i.totalSamples/i.sampleRate,n=i.numberTracks;this.muted?this.audioPlayer.setVolume(0):this.audioPlayer.setVolume(this.volume),this.playPauseIcon="pause",this.progressMax=r,this.timeDisplayMax=r,this.tracksCount=n,this.tracksActive=new Array(n).fill(!0).map((o,d)=>d===0),this.disabled=!1,(s=this.audioPlayer)==null||s.play()}catch(i){C(this,G,ue).call(this,i)}}};Ke=new WeakSet;ns=function(t){var s;const e=t.detail.active;this.tracksActive=e,(s=this.audioPlayer)==null||s.setTrackStates(e)};Ge=new WeakSet;os=function(t){var s,i;const e=t.detail.mode;this.playPauseIcon=e,e==="play"?(s=this.audioPlayer)==null||s.pause():e==="pause"&&((i=this.audioPlayer)==null||i.play())};Qe=new WeakSet;as=function(t){var s;const e=t.detail.value;this.progressValue=e,this.timeDisplayValue=e,(s=this.audioPlayer)==null||s.seek(e)};Je=new WeakSet;ls=function(t){var s,i;const e=t.detail.mode;this.loop=e,e==="on"?(s=this.audioPlayer)==null||s.setLoop(!0):e==="off"&&((i=this.audioPlayer)==null||i.setLoop(!1))};et=new WeakSet;hs=function(t){var s,i;const e=t.detail.muted;this.muted=e,e?(s=this.audioPlayer)==null||s.setVolume(0):(i=this.audioPlayer)==null||i.setVolume(this.volume)};tt=new WeakSet;ds=function(t){var s;const e=t.detail.volume;this.volume=e,this.muted=!1,(s=this.audioPlayer)==null||s.setVolume(e)};y.styles=R`#error{padding:.6rem;margin-top:.6rem;margin-bottom:.6rem;color:#ff4136;border:1px solid currentColor;padding:.6rem}#error.hidden{display:none}#drag-and-drop-overlay{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;color:var(--primary);font-size:2rem;background:var(--white-lighter);z-index:100;user-select:none}#drag-and-drop-overlay:before{content:' ';position:absolute;left:1rem;right:1rem;top:1rem;bottom:1rem;border:1rem dashed currentColor}#drag-and-drop-overlay.hidden{display:none}#main{margin-top:100px;display:grid;grid-template-columns:1fr 80px 1fr;grid-template-rows:20px 15px 24px 80px auto;row-gap:10px;column-gap:2rem;margin-bottom:10px}#track-title{grid-column:1/span 2;grid-row:1;text-overflow:ellipsis;overflow:hidden}#controls-time-display{grid-column:3;grid-row:1}#controls-progress{grid-column:1/span 3;grid-row:2}#controls-select-file-container{grid-column:1/span 3;grid-row:3}#controls-tracks{grid-column:1;grid-row:4/span 2}#controls-play-pause{grid-column:2;grid-row:4}#controls-others{grid-column:3;grid-row:4;display:flex;flex-direction:row;justify-content:flex-end;align-items:center}controls-loop{height:40px}controls-volume{margin-inline-start:10px;height:40px}@media (max-width:640px){#main{margin-top:50px;grid-template-rows:20px 20px 15px 24px 80px auto}#track-title{grid-column:1/span 3;grid-row:1}#controls-time-display{grid-column:1/span 3;grid-row:2}#controls-progress{grid-column:1/span 3;grid-row:3}#controls-select-file-container{grid-column:1/span 3;grid-row:4}#controls-play-pause{grid-column:2;grid-row:5}#controls-others{grid-column:1/span 3;grid-row:6;justify-content:center}#controls-tracks{grid-column:1/span 3;grid-row:7}}#controls-select-file-container{position:relative;display:inline-block;cursor:pointer;width:80px}#controls-select-file-container>input{margin:0;opacity:0;height:24px;width:100%}#controls-select-file-custom{position:absolute;top:0;right:0;left:0;z-index:5;box-sizing:border-box;border-radius:5px;color:var(--primary);background-color:var(--primary-lightest-2);user-select:none;font-size:12px;line-height:16px;height:24px;display:inline-flex;align-items:center;padding:2px 4px;text-align:center}#controls-select-file-custom:after{content:'Select file...'}#controls-select-file-custom:hover{background-color:var(--primary-lightest-1)}#controls-select-fileinput:focus~#controls-select-file-custom{box-shadow:0 0 0 .075rem #fff,0 0 0 .2rem var(--primary-dark)}@media (prefers-color-scheme:dark){#controls-select-file-custom{color:var(--main-text-color)}}`;b([w()],y.prototype,"playPauseIcon",2);b([w()],y.prototype,"loop",2);b([w()],y.prototype,"volume",2);b([w()],y.prototype,"muted",2);b([w()],y.prototype,"progressMax",2);b([w()],y.prototype,"progressValue",2);b([w()],y.prototype,"timeDisplayMax",2);b([w()],y.prototype,"timeDisplayValue",2);b([w()],y.prototype,"tracksCount",2);b([w()],y.prototype,"tracksActive",2);b([w()],y.prototype,"disabled",2);b([w()],y.prototype,"fileDraggingOver",2);b([w()],y.prototype,"trackTitle",2);b([w()],y.prototype,"errorMessage",2);y=b([W("nikku-main")],y);function cs(t){return new Promise(e=>{const s=new FileReader;s.addEventListener("loadend",i=>{const r=s.result;e({buffer:r,file:t})}),s.readAsArrayBuffer(t)})}/** + */const Y=ht(class extends dt{constructor(t){var e;if(super(t),t.type!==lt.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var s,i;if(this.nt===void 0){this.nt=new Set,t.strings!==void 0&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in e)e[n]&&!(!((s=this.st)===null||s===void 0)&&s.has(n))&&this.nt.add(n);return this.render(e)}const r=t.element.classList;this.nt.forEach(n=>{n in e||(r.remove(n),this.nt.delete(n))});for(const n in e){const o=!!e[n];o===this.nt.has(n)||((i=this.st)===null||i===void 0?void 0:i.has(n))||(o?(r.add(n),this.nt.add(n)):(r.remove(n),this.nt.delete(n)))}return V}});var Q,O,J;class ts{constructor({renderCallback:e}){$(this,Q,!1);$(this,O,null);$(this,J,void 0);u(this,O,null),u(this,J,e),this.render=this.render.bind(this)}start(){u(this,Q,!0),u(this,O,requestAnimationFrame(this.render))}stop(){l(this,O)&&cancelAnimationFrame(l(this,O)),u(this,Q,!1)}render(){l(this,J)&&l(this,J).call(this),l(this,Q)&&u(this,O,requestAnimationFrame(this.render))}}Q=new WeakMap,O=new WeakMap,J=new WeakMap;const Xs="/nikku/assets/audio-source.68bef94d.js";var m,A,f,S,z,D,N,k,B,M,ge,Xe,ke,ss;class qs{constructor(e){$(this,ge);$(this,ke);$(this,m,void 0);$(this,A,void 0);$(this,f,void 0);$(this,S,void 0);$(this,z,void 0);$(this,D,void 0);$(this,N,void 0);$(this,k,void 0);$(this,B,void 0);$(this,M,void 0);this.metadata=null,u(this,m,null),u(this,A,[]),u(this,f,null),u(this,S,null),u(this,z,0),u(this,D,!1),u(this,N,!0),u(this,k,!1),u(this,B,0),u(this,M,null),this.options=e,this.init()}async init(e){if(e?(this.metadata=e,u(this,m,new AudioContext({sampleRate:e.sampleRate})),l(this,m).audioWorklet&&await l(this,m).audioWorklet.addModule(Xs),u(this,M,new ts({renderCallback:$e(this,ke,ss).bind(this)}))):(this.metadata=null,u(this,m,null),u(this,M,null)),u(this,A,[!0]),this.metadata&&this.metadata.numberTracks>1){u(this,A,[]);for(let s=0;s{for(const a of d){console.time("getSamples");const h=await this.options.decodeSamples(a.offset*s,a.size*s);console.timeEnd("getSamples"),$e(this,ge,Xe).call(this,h,a.offset*s)}})()}initPlayback(e){if(!this.metadata||!l(this,m)||l(this,B)==null)return;const{loopStartSample:s,totalSamples:i,sampleRate:r,trackDescriptions:n}=this.metadata;u(this,f,new AudioWorkletNode(l(this,m),"audio-source-processor",{numberOfInputs:0,numberOfOutputs:1,outputChannelCount:[2],processorOptions:{initialSamples:e,loopStartSample:s,totalSamples:i,sampleRate:r,shouldLoop:l(this,D),trackDescriptions:n,trackStates:l(this,A)}})),l(this,f).port&&(l(this,f).port.addEventListener("message",o=>{switch(o.data.type){case"BUFFER_LOOPED":{console.log("[AudioPlayer]",o.data.type);break}case"BUFFER_ENDED":{console.log("[AudioPlayer]",o.data.type),this.pause(),u(this,N,!0);break}case"TIMESTAMP_REPLY":{u(this,z,o.data.payload.timestamp);break}}}),l(this,f).port.start()),u(this,S,l(this,m).createGain()),l(this,S).gain.value=l(this,B),l(this,f).connect(l(this,S)),l(this,S).connect(l(this,m).destination),u(this,N,!1)}async seek(e){!l(this,m)||(l(this,f)&&l(this,f).port.postMessage({type:"SEEK",payload:{playbackTimeInS:e}}),l(this,k)||await this.play())}async play(){var e;l(this,k)||!l(this,m)||(u(this,k,!0),(e=l(this,M))==null||e.start(),this.options.onPlay(),await l(this,m).resume(),l(this,N)&&this.seek(0))}async pause(){var e;!l(this,k)||!l(this,m)||(u(this,k,!1),(e=l(this,M))==null||e.stop(),this.options.onPause(),await l(this,m).suspend())}async setTrackStates(e){u(this,A,e),l(this,f)&&l(this,f).port.postMessage({type:"UPDATE_TRACK_STATES",payload:{trackStates:l(this,A)}})}async setVolume(e){u(this,B,e),l(this,S)&&(l(this,S).gain.value=e)}setLoop(e){u(this,D,e),l(this,f)&&l(this,f).port.postMessage({type:"UPDATE_SHOULD_LOOP",payload:{shouldLoop:l(this,D)}})}getCurrrentPlaybackTime(){return l(this,f)?l(this,z):0}}m=new WeakMap,A=new WeakMap,f=new WeakMap,S=new WeakMap,z=new WeakMap,D=new WeakMap,N=new WeakMap,k=new WeakMap,B=new WeakMap,M=new WeakMap,ge=new WeakSet,Xe=function(e,s=0){var i;!this.metadata||!l(this,m)||(s===0?(this.initPlayback(e),(i=l(this,M))==null||i.start(),u(this,k,!0),this.options.onPlay()):l(this,f)&&l(this,f).port.postMessage({type:"ADD_SAMPLES",payload:{samples:e,offset:s}},e.map(r=>r.buffer)))},ke=new WeakSet,ss=function(){l(this,f)&&l(this,f).port.postMessage({type:"TIMESTAMP_QUERY"})};var Ks=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,b=(t,e,s,i)=>{for(var r=i>1?void 0:i?Gs(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ks(e,s,r),r},Qs=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},L=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},C=(t,e,s)=>(Qs(t,e,"access private method"),s),G,ue,ut,is,qe,rs,Se,pt,Ke,ns,Ge,os,Qe,as,Je,ls,et,hs,tt,ds;let y=class extends E{constructor(){super(...arguments),L(this,G),L(this,ut),L(this,qe),L(this,Se),L(this,Ke),L(this,Ge),L(this,Qe),L(this,Je),L(this,et),L(this,tt),this.playPauseIcon="play",this.loop="on",this.volume=1,this.muted=!1,this.progressMax=0,this.progressValue=0,this.timeDisplayMax=0,this.timeDisplayValue=0,this.tracksCount=1,this.tracksActive=[!0],this.disabled=!0,this.fileDraggingOver=!1,this.trackTitle="",this.errorMessage="",this.audioPlayer=null,this.workerInstance=Qt(new Worker("/nikku/assets/worker.18e56157.js")),this.timer=new ts({renderCallback:()=>{if(!this.audioPlayer)return;const t=this.audioPlayer.getCurrrentPlaybackTime();this.progressValue=t,this.timeDisplayValue=t}})}render(){return P`
${this.errorMessage}
${this.trackTitle}
Drop BRSTM file to start playback
`}firstUpdated(){window.addEventListener("dragover",t=>{t.preventDefault(),this.fileDraggingOver=!0}),window.addEventListener("dragend",t=>{this.fileDraggingOver=!1}),window.addEventListener("dragleave",t=>{this.fileDraggingOver=!1}),window.addEventListener("drop",t=>{if(t.preventDefault(),this.fileDraggingOver=!1,!t.dataTransfer||!t.dataTransfer.items||!t.dataTransfer.items[0]||t.dataTransfer.items[0].kind!=="file"){C(this,G,ue).call(this,new Error("No file read"));return}const e=t.dataTransfer.items[0].getAsFile();if(!e){C(this,G,ue).call(this,new Error("No file read"));return}cs(e).then(C(this,Se,pt).bind(this))})}};G=new WeakSet;ue=function(t){this.errorMessage=t.message+t.stack};ut=new WeakSet;is=function(){this.errorMessage=""};qe=new WeakSet;rs=function(t){const e=t.target.files;if(!e||!e.length){C(this,G,ue).call(this,new Error("No file read"));return}const s=e[0];cs(s).then(C(this,Se,pt).bind(this))};Se=new WeakSet;pt=async function({buffer:t,file:e}){var s;if(C(this,ut,is).call(this),!(!t||!(t instanceof ArrayBuffer))){e.name&&(this.trackTitle=e.name);try{await this.workerInstance.init(es(t,[t]));const i=await this.workerInstance.getMetadata();if(this.audioPlayer?await this.audioPlayer.destroy():this.audioPlayer=new qs({onPlay:()=>{this.playPauseIcon="pause",this.timer.start()},onPause:()=>{this.playPauseIcon="play",this.timer.stop()},decodeSamples:async(o,d)=>await this.workerInstance.getSamples(o,d)||[]}),!i)throw new Error("metadata is undefined");await this.audioPlayer.init(i),await this.audioPlayer.start();const r=i.totalSamples/i.sampleRate,n=i.numberTracks;this.muted?this.audioPlayer.setVolume(0):this.audioPlayer.setVolume(this.volume),this.playPauseIcon="pause",this.progressMax=r,this.timeDisplayMax=r,this.tracksCount=n,this.tracksActive=new Array(n).fill(!0).map((o,d)=>d===0),this.disabled=!1,(s=this.audioPlayer)==null||s.play()}catch(i){C(this,G,ue).call(this,i)}}};Ke=new WeakSet;ns=function(t){var s;const e=t.detail.active;this.tracksActive=e,(s=this.audioPlayer)==null||s.setTrackStates(e)};Ge=new WeakSet;os=function(t){var s,i;const e=t.detail.mode;this.playPauseIcon=e,e==="play"?(s=this.audioPlayer)==null||s.pause():e==="pause"&&((i=this.audioPlayer)==null||i.play())};Qe=new WeakSet;as=function(t){var s;const e=t.detail.value;this.progressValue=e,this.timeDisplayValue=e,(s=this.audioPlayer)==null||s.seek(e)};Je=new WeakSet;ls=function(t){var s,i;const e=t.detail.mode;this.loop=e,e==="on"?(s=this.audioPlayer)==null||s.setLoop(!0):e==="off"&&((i=this.audioPlayer)==null||i.setLoop(!1))};et=new WeakSet;hs=function(t){var s,i;const e=t.detail.muted;this.muted=e,e?(s=this.audioPlayer)==null||s.setVolume(0):(i=this.audioPlayer)==null||i.setVolume(this.volume)};tt=new WeakSet;ds=function(t){var s;const e=t.detail.volume;this.volume=e,this.muted=!1,(s=this.audioPlayer)==null||s.setVolume(e)};y.styles=R`#error{padding:.6rem;margin-top:.6rem;margin-bottom:.6rem;color:#ff4136;border:1px solid currentColor;padding:.6rem}#error.hidden{display:none}#drag-and-drop-overlay{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;color:var(--primary);font-size:2rem;background:var(--white-lighter);z-index:100;user-select:none}#drag-and-drop-overlay:before{content:' ';position:absolute;left:1rem;right:1rem;top:1rem;bottom:1rem;border:1rem dashed currentColor}#drag-and-drop-overlay.hidden{display:none}#main{margin-top:100px;display:grid;grid-template-columns:1fr 80px 1fr;grid-template-rows:20px 15px 24px 80px auto;row-gap:10px;column-gap:2rem;margin-bottom:10px}#track-title{grid-column:1/span 2;grid-row:1;text-overflow:ellipsis;overflow:hidden}#controls-time-display{grid-column:3;grid-row:1}#controls-progress{grid-column:1/span 3;grid-row:2}#controls-select-file-container{grid-column:1/span 3;grid-row:3}#controls-tracks{grid-column:1;grid-row:4/span 2}#controls-play-pause{grid-column:2;grid-row:4}#controls-others{grid-column:3;grid-row:4;display:flex;flex-direction:row;justify-content:flex-end;align-items:center}controls-loop{height:40px}controls-volume{margin-inline-start:10px;height:40px}@media (max-width:640px){#main{margin-top:50px;grid-template-rows:20px 20px 15px 24px 80px auto}#track-title{grid-column:1/span 3;grid-row:1}#controls-time-display{grid-column:1/span 3;grid-row:2}#controls-progress{grid-column:1/span 3;grid-row:3}#controls-select-file-container{grid-column:1/span 3;grid-row:4}#controls-play-pause{grid-column:2;grid-row:5}#controls-others{grid-column:1/span 3;grid-row:6;justify-content:center}#controls-tracks{grid-column:1/span 3;grid-row:7}}#controls-select-file-container{position:relative;display:inline-block;cursor:pointer;width:80px}#controls-select-file-container>input{margin:0;opacity:0;height:24px;width:100%}#controls-select-file-custom{position:absolute;top:0;right:0;left:0;z-index:5;box-sizing:border-box;border-radius:5px;color:var(--primary);background-color:var(--primary-lightest-2);user-select:none;font-size:12px;line-height:16px;height:24px;display:inline-flex;align-items:center;padding:2px 4px;text-align:center}#controls-select-file-custom:after{content:'Select file...'}#controls-select-file-custom:hover{background-color:var(--primary-lightest-1)}#controls-select-fileinput:focus~#controls-select-file-custom{box-shadow:0 0 0 .075rem #fff,0 0 0 .2rem var(--primary-dark)}@media (prefers-color-scheme:dark){#controls-select-file-custom{color:var(--main-text-color)}}`;b([w()],y.prototype,"playPauseIcon",2);b([w()],y.prototype,"loop",2);b([w()],y.prototype,"volume",2);b([w()],y.prototype,"muted",2);b([w()],y.prototype,"progressMax",2);b([w()],y.prototype,"progressValue",2);b([w()],y.prototype,"timeDisplayMax",2);b([w()],y.prototype,"timeDisplayValue",2);b([w()],y.prototype,"tracksCount",2);b([w()],y.prototype,"tracksActive",2);b([w()],y.prototype,"disabled",2);b([w()],y.prototype,"fileDraggingOver",2);b([w()],y.prototype,"trackTitle",2);b([w()],y.prototype,"errorMessage",2);y=b([W("nikku-main")],y);function cs(t){return new Promise(e=>{const s=new FileReader;s.addEventListener("loadend",i=>{const r=s.result;e({buffer:r,file:t})}),s.readAsArrayBuffer(t)})}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause diff --git a/assets/worker.0002d8a4.js b/assets/worker.0002d8a4.js deleted file mode 100644 index a898cd5..0000000 --- a/assets/worker.0002d8a4.js +++ /dev/null @@ -1 +0,0 @@ -(function(){"use strict";const Z=Symbol("Comlink.proxy"),it=Symbol("Comlink.endpoint"),ot=Symbol("Comlink.releaseProxy"),z=Symbol("Comlink.thrown"),$=t=>typeof t=="object"&&t!==null||typeof t=="function",lt={canHandle:t=>$(t)&&t[Z],serialize(t){const{port1:e,port2:a}=new MessageChannel;return I(t,e),[a,[a]]},deserialize(t){return t.start(),ut(t)}},ht={canHandle:t=>$(t)&&z in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},tt=new Map([["proxy",lt],["throw",ht]]);function I(t,e=self){e.addEventListener("message",function a(s){if(!s||!s.data)return;const{id:l,type:u,path:r}=Object.assign({path:[]},s.data),c=(s.data.argumentList||[]).map(T);let i;try{const o=r.slice(0,-1).reduce((f,g)=>f[g],t),m=r.reduce((f,g)=>f[g],t);switch(u){case"GET":i=m;break;case"SET":o[r.slice(-1)[0]]=T(s.data.value),i=!0;break;case"APPLY":i=m.apply(o,c);break;case"CONSTRUCT":{const f=new m(...c);i=dt(f)}break;case"ENDPOINT":{const{port1:f,port2:g}=new MessageChannel;I(t,g),i=F(f,[f])}break;case"RELEASE":i=void 0;break;default:return}}catch(o){i={value:o,[z]:0}}Promise.resolve(i).catch(o=>({value:o,[z]:0})).then(o=>{const[m,f]=W(o);e.postMessage(Object.assign(Object.assign({},m),{id:l}),f),u==="RELEASE"&&(e.removeEventListener("message",a),et(e))})}),e.start&&e.start()}function ct(t){return t.constructor.name==="MessagePort"}function et(t){ct(t)&&t.close()}function ut(t,e){return N(t,[],e)}function _(t){if(t)throw new Error("Proxy has been released and is not useable")}function N(t,e=[],a=function(){}){let s=!1;const l=new Proxy(a,{get(u,r){if(_(s),r===ot)return()=>B(t,{type:"RELEASE",path:e.map(c=>c.toString())}).then(()=>{et(t),s=!0});if(r==="then"){if(e.length===0)return{then:()=>l};const c=B(t,{type:"GET",path:e.map(i=>i.toString())}).then(T);return c.then.bind(c)}return N(t,[...e,r])},set(u,r,c){_(s);const[i,o]=W(c);return B(t,{type:"SET",path:[...e,r].map(m=>m.toString()),value:i},o).then(T)},apply(u,r,c){_(s);const i=e[e.length-1];if(i===it)return B(t,{type:"ENDPOINT"}).then(T);if(i==="bind")return N(t,e.slice(0,-1));const[o,m]=st(c);return B(t,{type:"APPLY",path:e.map(f=>f.toString()),argumentList:o},m).then(T)},construct(u,r){_(s);const[c,i]=st(r);return B(t,{type:"CONSTRUCT",path:e.map(o=>o.toString()),argumentList:c},i).then(T)}});return l}function ft(t){return Array.prototype.concat.apply([],t)}function st(t){const e=t.map(W);return[e.map(a=>a[0]),ft(e.map(a=>a[1]))]}const nt=new WeakMap;function F(t,e){return nt.set(t,e),t}function dt(t){return Object.assign(t,{[Z]:!0})}function W(t){for(const[e,a]of tt)if(a.canHandle(t)){const[s,l]=a.serialize(t);return[{type:"HANDLER",name:e,value:s},l]}return[{type:"RAW",value:t},nt.get(t)||[]]}function T(t){switch(t.type){case"HANDLER":return tt.get(t.name).deserialize(t.value);case"RAW":return t.value}}function B(t,e,a){return new Promise(s=>{const l=pt();t.addEventListener("message",function u(r){!r.data||!r.data.id||r.data.id!==l||(t.removeEventListener("message",u),s(r.data))}),t.start&&t.start(),t.postMessage(Object.assign({id:l},e),a)})}function pt(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var mt=0;function b(t){return"__private_"+mt+++"_"+t}function n(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}function U(t,e,a){const s=[];for(let l=e;l256*u+r,0)}function V(t,e,a){return t<=e?e:t>=a?a:t}function M(t){return t>=32768?t-65536:t}var y=b("offsetToHead"),d=b("offsetToHeadChunk1"),D=b("offsetToHeadChunk2"),x=b("offsetToHeadChunk3"),P=b("offsetToAdpc"),j=b("offsetToData"),k=b("cachedSamples"),E=b("partitionedAdpcChunkData"),v=b("cachedChannelInfo"),C=b("cachedBlockResults"),G=b("getChannelInfo"),Y=b("getMetadata"),q=b("getPartitionedBlockData"),X=b("getPartitionedAdpcChunkData"),L=b("getSamplesAtBlock");class wt{constructor(e){if(Object.defineProperty(this,L,{value:Dt}),Object.defineProperty(this,X,{value:St}),Object.defineProperty(this,q,{value:bt}),Object.defineProperty(this,Y,{value:gt}),Object.defineProperty(this,G,{value:yt}),Object.defineProperty(this,y,{writable:!0,value:void 0}),Object.defineProperty(this,d,{writable:!0,value:void 0}),Object.defineProperty(this,D,{writable:!0,value:void 0}),Object.defineProperty(this,x,{writable:!0,value:void 0}),Object.defineProperty(this,P,{writable:!0,value:void 0}),Object.defineProperty(this,j,{writable:!0,value:void 0}),Object.defineProperty(this,k,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:void 0}),Object.defineProperty(this,v,{writable:!0,value:void 0}),Object.defineProperty(this,C,{writable:!0,value:void 0}),n(this,k)[k]=null,n(this,E)[E]=null,n(this,v)[v]=null,n(this,C)[C]=[],this.rawData=new Uint8Array(e),function(a,s,l,u=1){const r=U(a,0,4);return u===0&&r.reverse(),String.fromCharCode(...r)}(this.rawData)!=="RSTM")throw new Error("Not a valid BRSTM file");this.endianness=function(a){const s=U(a,4,2);return s[0]===255&&s[1]===254?0:1}(this.rawData),n(this,y)[y]=h(this.rawData,16,4,this.endianness),n(this,d)[d]=n(this,y)[y]+h(this.rawData,n(this,y)[y]+12,4,this.endianness)+8,n(this,D)[D]=n(this,y)[y]+h(this.rawData,n(this,y)[y]+20,4,this.endianness)+8,n(this,x)[x]=n(this,y)[y]+h(this.rawData,n(this,y)[y]+28,4,this.endianness)+8,n(this,P)[P]=h(this.rawData,24,4,this.endianness),n(this,j)[j]=h(this.rawData,32,4,this.endianness),this.metadata=n(this,Y)[Y]()}getAllSamples(){if(n(this,k)[k])return n(this,k)[k];const{numberChannels:e,totalSamples:a,totalBlocks:s,samplesPerBlock:l}=this.metadata,u=[];for(let r=0;rg[p].length?O.slice(0,a-(w*r-c)):O,w*r-c)}else for(let p=0;p=l.totalSamples&&(l.loopFlag=0,l.loopStartSample=0,console.warn("The loop start sample in this file is invalid.")),l}function bt(t){const{blockSize:e,totalBlocks:a,numberChannels:s,finalBlockSize:l,finalBlockSizeWithPadding:u}=this.metadata,r=[];for(let i=0;i0&&(u=M(h(s,l,2,this.endianness)),l+=2,r=M(h(s,l,2,this.endianness)),l+=2),c[o].push({yn1:u,yn2:r})}let i=[];for(let o=0;om[o]));return n(this,E)[E]=i,i}function Dt(t){if(n(this,C)[C][t])return n(this,C)[C][t];const{numberChannels:e,totalBlocks:a,totalSamplesInFinalBlock:s,samplesPerBlock:l,codec:u}=this.metadata,r=n(this,G)[G](),c=n(this,q)[q](t),i=n(this,X)[X](),o=[],m=t===a-1?s:l;for(let f=0;f>4:15&w[K++],R>=8&&(R-=16);const rt=J>>4<<1;R=1024+((1<<(15&J))*R<<11)+g[V(rt,0,15)]*H+g[V(rt+1,0,15)]*at>>11,at=H,H=V(R,-32768,32767),S.push(H)}te.buffer))}function Ct(t,e){if(!A)return;const a=A.getSamples(t,e).map(Ot);return F(a,a.map(s=>s.buffer))}function Ot(t){const e=new Float32Array(t.length);for(let a=0;a{if(!y.has(g))throw TypeError("Cannot "+E)};var l=(g,y,E)=>(rt(g,y,"read from private field"),E?E.call(g):y.get(g)),D=(g,y,E)=>{if(y.has(g))throw TypeError("Cannot add the same private member more than once");y instanceof WeakSet?y.add(g):y.set(g,E)},b=(g,y,E,z)=>(rt(g,y,"write to private field"),z?z.call(g,E):y.set(g,E),E);var O=(g,y,E)=>(rt(g,y,"access private method"),E);(function(){var T,S,C,G,M,j,x,L,R,H,V,pt,v,mt,Y,wt,q,gt,W,it;"use strict";const g=Symbol("Comlink.proxy"),y=Symbol("Comlink.endpoint"),E=Symbol("Comlink.releaseProxy"),z=Symbol("Comlink.thrown"),ot=t=>typeof t=="object"&&t!==null||typeof t=="function",St={canHandle:t=>ot(t)&&t[g],serialize(t){const{port1:e,port2:s}=new MessageChannel;return J(t,e),[s,[s]]},deserialize(t){return t.start(),kt(t)}},yt={canHandle:t=>ot(t)&&z in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},lt=new Map([["proxy",St],["throw",yt]]);function J(t,e=self){e.addEventListener("message",function s(a){if(!a||!a.data)return;const{id:r,type:u,path:n}=Object.assign({path:[]},a.data),c=(a.data.argumentList||[]).map(B);let h;try{const i=n.slice(0,-1).reduce((d,m)=>d[m],t),f=n.reduce((d,m)=>d[m],t);switch(u){case"GET":h=f;break;case"SET":i[n.slice(-1)[0]]=B(a.data.value),h=!0;break;case"APPLY":h=f.apply(i,c);break;case"CONSTRUCT":{const d=new f(...c);h=bt(d)}break;case"ENDPOINT":{const{port1:d,port2:m}=new MessageChannel;J(t,m),h=Q(d,[d])}break;case"RELEASE":h=void 0;break;default:return}}catch(i){h={value:i,[z]:0}}Promise.resolve(h).catch(i=>({value:i,[z]:0})).then(i=>{const[f,d]=Z(i);e.postMessage(Object.assign(Object.assign({},f),{id:r}),d),u==="RELEASE"&&(e.removeEventListener("message",s),ct(e))})}),e.start&&e.start()}function Dt(t){return t.constructor.name==="MessagePort"}function ct(t){Dt(t)&&t.close()}function kt(t,e){return K(t,[],e)}function U(t){if(t)throw new Error("Proxy has been released and is not useable")}function K(t,e=[],s=function(){}){let a=!1;const r=new Proxy(s,{get(u,n){if(U(a),n===E)return()=>_(t,{type:"RELEASE",path:e.map(c=>c.toString())}).then(()=>{ct(t),a=!0});if(n==="then"){if(e.length===0)return{then:()=>r};const c=_(t,{type:"GET",path:e.map(h=>h.toString())}).then(B);return c.then.bind(c)}return K(t,[...e,n])},set(u,n,c){U(a);const[h,i]=Z(c);return _(t,{type:"SET",path:[...e,n].map(f=>f.toString()),value:h},i).then(B)},apply(u,n,c){U(a);const h=e[e.length-1];if(h===y)return _(t,{type:"ENDPOINT"}).then(B);if(h==="bind")return K(t,e.slice(0,-1));const[i,f]=ht(c);return _(t,{type:"APPLY",path:e.map(d=>d.toString()),argumentList:i},f).then(B)},construct(u,n){U(a);const[c,h]=ht(n);return _(t,{type:"CONSTRUCT",path:e.map(i=>i.toString()),argumentList:c},h).then(B)}});return r}function Et(t){return Array.prototype.concat.apply([],t)}function ht(t){const e=t.map(Z);return[e.map(s=>s[0]),Et(e.map(s=>s[1]))]}const ut=new WeakMap;function Q(t,e){return ut.set(t,e),t}function bt(t){return Object.assign(t,{[g]:!0})}function Z(t){for(const[e,s]of lt)if(s.canHandle(t)){const[a,r]=s.serialize(t);return[{type:"HANDLER",name:e,value:a},r]}return[{type:"RAW",value:t},ut.get(t)||[]]}function B(t){switch(t.type){case"HANDLER":return lt.get(t.name).deserialize(t.value);case"RAW":return t.value}}function _(t,e,s){return new Promise(a=>{const r=Tt();t.addEventListener("message",function u(n){!n.data||!n.data.id||n.data.id!==r||(t.removeEventListener("message",u),a(n.data))}),t.start&&t.start(),t.postMessage(Object.assign({id:r},e),s)})}function Tt(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function $(t,e,s){const a=[];for(let r=e;ru*256+n,0)}function tt(t,e,s){return t<=e?e:t>=s?s:t}function P(t){return t>=32768?t-65536:t}class Ct{constructor(e){D(this,V);D(this,v);D(this,Y);D(this,q);D(this,W);D(this,T,void 0);D(this,S,void 0);D(this,C,void 0);D(this,G,void 0);D(this,M,void 0);D(this,j,void 0);D(this,x,void 0);D(this,L,void 0);D(this,R,void 0);D(this,H,void 0);if(b(this,x,null),b(this,L,null),b(this,R,null),b(this,H,[]),this.rawData=new Uint8Array(e),At(this.rawData,0,4)!=="RSTM")throw new Error("Not a valid BRSTM file");this.endianness=It(this.rawData),b(this,T,o(this.rawData,16,4,this.endianness)),b(this,S,l(this,T)+o(this.rawData,l(this,T)+12,4,this.endianness)+8),b(this,C,l(this,T)+o(this.rawData,l(this,T)+20,4,this.endianness)+8),b(this,G,l(this,T)+o(this.rawData,l(this,T)+28,4,this.endianness)+8),b(this,M,o(this.rawData,24,4,this.endianness)),b(this,j,o(this.rawData,32,4,this.endianness)),this.metadata=O(this,v,mt).call(this)}getAllSamples(){if(l(this,x))return l(this,x);const{numberChannels:e,totalSamples:s,totalBlocks:a,samplesPerBlock:r}=this.metadata,u=[];for(let n=0;nm[p].length?m[p].set(k.slice(0,s-(w*n-c)),w*n-c):m[p].set(k,w*n-c)}else for(let p=0;p=u.totalSamples&&(u.loopFlag=0,u.loopStartSample=0,console.warn("The loop start sample in this file is invalid.")),u},Y=new WeakSet,wt=function(e){const{blockSize:s,totalBlocks:a,numberChannels:r,finalBlockSize:u,finalBlockSizeWithPadding:n}=this.metadata,c=[];for(let i=0;i0&&(n=P(o(r,u,2,this.endianness)),u+=2,c=P(o(r,u,2,this.endianness)),u+=2),h[f].push({yn1:n,yn2:c})}let i=[];for(let f=0;fd[f]));return b(this,L,i),i},W=new WeakSet,it=function(e){if(l(this,H)[e])return l(this,H)[e];const{numberChannels:s,totalBlocks:a,totalSamplesInFinalBlock:r,samplesPerBlock:u,codec:n}=this.metadata,c=O(this,V,pt).call(this),h=O(this,Y,wt).call(this,e),i=O(this,q,gt).call(this),f=[],d=e===a-1?r:u;for(let m=0;m>4:N=I[nt++]&15,N>=8&&(N-=16);const Ot=1<<(st&15),dt=st>>4<<1;N=1024+(Ot*N<<11)+w[tt(dt,0,15)]*X+w[tt(dt+1,0,15)]*ft>>11,ft=X,X=tt(N,-32768,32767),p.push(X)}ee.buffer))}function Lt(t,e){if(!A)return;const s=A.getSamples(t,e).map(Rt);return Q(s,s.map(a=>a.buffer))}function Rt(t){const e=new Float32Array(t.length);for(let s=0;s - + diff --git a/sw.js b/sw.js index cdfa9ff..32c9a29 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,r)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let c={};const t=e=>i(e,o),l={module:{uri:o},exports:c,require:t};s[o]=Promise.all(n.map((e=>l[e]||t(e)))).then((e=>(r(...e),c)))}}define(["./workbox-ec63a76a"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/audio-source.68bef94d.js",revision:null},{url:"assets/index.c67be838.js",revision:null},{url:"assets/index.e3929f89.css",revision:null},{url:"assets/worker.0002d8a4.js",revision:null},{url:"index.html",revision:"3b9c100b8259996c584e77041567e7c3"},{url:"registerSW.js",revision:"42c3bff81e072b0259dea587ccdcbb65"},{url:"./assets/android-launchericon-192-192.png",revision:"56610edb0cbc41b0c274b6c203b1fb37"},{url:"./assets/android-launchericon-512-512.png",revision:"6c92e108574f0ec644225afcaf205749"},{url:"manifest.webmanifest",revision:"9999482dffacf00b89e97a28f9046365"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,r)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let c={};const t=e=>i(e,o),l={module:{uri:o},exports:c,require:t};s[o]=Promise.all(n.map((e=>l[e]||t(e)))).then((e=>(r(...e),c)))}}define(["./workbox-ec63a76a"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/audio-source.68bef94d.js",revision:null},{url:"assets/index.c15c6f76.js",revision:null},{url:"assets/index.e3929f89.css",revision:null},{url:"assets/worker.18e56157.js",revision:null},{url:"index.html",revision:"03584575cdcebde93e162e18ef26a501"},{url:"registerSW.js",revision:"42c3bff81e072b0259dea587ccdcbb65"},{url:"./assets/android-launchericon-192-192.png",revision:"56610edb0cbc41b0c274b6c203b1fb37"},{url:"./assets/android-launchericon-512-512.png",revision:"6c92e108574f0ec644225afcaf205749"},{url:"manifest.webmanifest",revision:"9999482dffacf00b89e97a28f9046365"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));