!function(){vare={},o=null,n=!0,r=!1;try{"undefined"!=typeofAudioContext?o=newAudioContext:"undefined"!=typeofwebkitAudioContext?o=newwebkitAudioContext:n=!1}catch(t){n=!1}if(!n)if("undefined"!=typeofAudio)try{newAudio}catch(t){r=!0}elser=!0;if(n){vara="undefined"==typeofo.createGain?o.createGainNode():o.createGain();a.gain.value=1,a.connect(o.destination)}vari=function(e){this._volume=1,this._muted=!1,this.usingWebAudio=n,this.ctx=o,this.noAudio=r,this._howls=[],this._codecs=e,this.iOSAutoEnable=!0};i.prototype={volume:function(e){varo=this;if(e=parseFloat(e),e>=0&&1>=e){o._volume=e,n&&(a.gain.value=e);for(varrino._howls)if(o._howls.hasOwnProperty(r)&&o._howls[r]._webAudio===!1)for(vart=0;t<o._howls[r]._audioNode.length;t++)o._howls[r]._audioNode[t].volume=o._howls[r]._volume*o._volume;returno}returnn?a.gain.value:o._volume},mute:function(){returnthis._setMuted(!0),this},unmute:function(){returnthis._setMuted(!1),this},_setMuted:function(e){varo=this;o._muted=e,n&&(a.gain.value=e?0:o._volume);for(varrino._howls)if(o._howls.hasOwnProperty(r)&&o._howls[r]._webAudio===!1)for(vart=0;t<o._howls[r]._audioNode.length;t++)o._howls[r]._audioNode[t].muted=e},codecs:function(e){returnthis._codecs[e]},_enableiOSAudio:function(){vare=this;if(!o||!e._iOSEnabled&&/iPhone|iPad|iPod/i.test(navigator.userAgent)){e._iOSEnabled=!1;varn=function(){varr=o.createBuffer(1,1,22050),t=o.createBufferSource();t.buffer=r,t.connect(o.destination),"undefined"==typeoft.start?t.noteOn(0):t.start(0),setTimeout(function(){(t.playbackState===t.PLAYING_STATE||t.playbackState===t.FINISHED_STATE)&&(e._iOSEnabled=!0,e.iOSAutoEnable=!1,window.removeEventListener("touchend",n,!1))},0)};returnwindow.addEventListener("touchend",n,!1),e}}};varu=null,d={};r||(u=newAudio,d={mp3:!!u.canPlayType("audio/mpeg;").replace(/^no$/,""),opus:!!u.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!u.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!u.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),aac:!!u.canPlayType("audio/aac;").replace(/^no$/,""),m4a:!!(u.canPlayType("audio/x-m4a;")||u.canPlayType("audio/m4a;")||u.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(u.canPlayType("audio/x-mp4;")||u.canPlayType("audio/mp4;")||u.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!u.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")});varl=newi(d),f=function(e){varr=this;r._autoplay=e.autoplay||!1,r._buffer=e.buffer||!1,r._duration=e.duration||0,r._format=e.format||null,r._loop=e.loop||!1,r._loaded=!1,r._sprite=e.sprite||{},r._src=e.src||"",r._pos3d=e.pos3d||[0,0,-.5],r._volume=void0!==e.volume?e.volume:1,r._urls=e.urls||[],r._rate=e.rate||1,r._model=e.model||null,r._onload=[e.onload||function(){}],r._onloaderror=[e.onloaderror||function(){}],r._onend=[e.onend||function(){}],r._onpause=[e.onpause||function(){}],r._onplay=[e.onplay||function(){}],r._onendTimer=[],r._webAudio=n&&!r._buffer,r._audioNode=[],r._webAudio&&r._setupAudioNode(),"undefined"!=typeofo&&o&&l.iOSAutoEnable&&l._enableiOSAudio(),l._howls.push(r),r.load()};if(f.prototype={load:function(){vare=this,o=null;if(r)returnvoide.on("loaderror",newError("No audio support."));for(varn=0;n<e._urls.length;n++){vart,a;if(e._format)t=e._format;else{if(a=e._urls[n],t=/^data:audio\/([^;,]+);/i.exec(a),t||(t=/\.([^.]+)$/.exec(a.split("?",1)[0])),!t)returnvoide.on("loaderror",newError("Could not extract format from passed URLs, please add format parameter."));t=t[1].toLowerCase()}if(d[t]){o=e._urls[n];break}}if(!o)returnvoide.on("loaderror",newError("No codec support for selected audio sources."));if(e._src=o,e._webAudio)s(e,o);else{varu=newAudio;u.addEventListener("error",function(){u.error&&4===u.error.code&&(i.noAudio=!0),e.on("loaderror",{type:u.error?u.error.code:0})},!1),e._audioNode.push(u),u.src=o,u._pos=0,u.preload="auto",u.volume=l._muted?0:e._volume*l.volume();varf=function(){e._duration=Math.ceil(10*u.duration)/10,0===Object.getOwnPropertyNames(e._sprite).length&&(e._sprite={_default:[0,1e3*e._duration]}),e._loade