1"use strict";(self.webpackChunktrux_common=self.webpackChunktrux_common||[]).push([[5274],{25274:function(a,e,t){t.r(e);var l=t(52891);e.default=class extends l.xI{static targets=["track","buttonTogglePlay","icon"];isPlay=!1;handlers=[];connect(){console.log(localStorage.indexPlay),console.log(localStorage.time),localStorage.indexPlay=localStorage.indexPlay??0,localStorage.time=localStorage.time??0,window.onbeforeunload=function(){this.isPlay&&(localStorage.time=1e3*this.trackTargets[localStorage.indexPlay].currentTime)}.bind(this)}actionTogglePlay(a){if(this.isPlay)return this.isPlay=!1,localStorage.time=1e3*this.trackTargets[localStorage.indexPlay].currentTime,this.trackTargets[localStorage.indexPlay].pause(),void this.iconTarget.classList.remove("on");this.iconTarget.classList.add("on"),this.audioPlay()}audioPlay(){this.isPlay=!0;try{Array.isArray(this.trackTargets)&&this.trackTargets.length>0&&this.play(this.trackTargets[localStorage.indexPlay])}catch(a){console.log(a)}}play(a){if(!a)return;const e=this._play(a);void 0!==e&&e.then(()=>{if(console.log("Autoplay started... "+localStorage.indexPlay),void 0===this.handlers[localStorage.indexPlay]||!1===this.handlers[localStorage.indexPlay]){this.handlers[localStorage.indexPlay]=!0;let e=function(a){a.target.removeEventListener("ended",e,!1),this.handlers[localStorage.indexPlay]=!1,console.log("ended... "+localStorage.indexPlay),localStorage.indexPlay++,localStorage.time=0,localStorage.indexPlay>=this.trackTargets.length&&(localStorage.indexPlay=0,this.isPlay=!1),this.audioPlay()}.bind(this);a.addEventListener("ended",e)}}).catch(e=>{console.log(e),console.log("Autoplay start..."),this._play(a)})}_play(a){return 0!=localStorage.time?a.currentTime=localStorage.time/1e3:localStorage.time=0,a.muted=!1,a.volume=this.element.dataset.volume/100,a.play()}}}}]);
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.