@internetarchive/bookreader 5.0.0-101 → 5.0.0-102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BookReader/474.js +1 -1
- package/BookReader/474.js.map +1 -1
- package/BookReader/BookReader.css +71 -8
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.LICENSE.txt +1 -1
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +52 -52
- package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +7 -1
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/icons/1up.svg +1 -1
- package/BookReader/icons/2up.svg +1 -1
- package/BookReader/icons/advance.svg +1 -1
- package/BookReader/icons/chevron-right.svg +1 -1
- package/BookReader/icons/close-circle-dark.svg +1 -1
- package/BookReader/icons/close-circle.svg +1 -1
- package/BookReader/icons/fullscreen.svg +1 -1
- package/BookReader/icons/fullscreen_exit.svg +1 -1
- package/BookReader/icons/hamburger.svg +1 -1
- package/BookReader/icons/left-arrow.svg +1 -1
- package/BookReader/icons/magnify-minus.svg +1 -1
- package/BookReader/icons/magnify-plus.svg +1 -1
- package/BookReader/icons/magnify.svg +1 -1
- package/BookReader/icons/pause.svg +1 -1
- package/BookReader/icons/play.svg +1 -1
- package/BookReader/icons/playback-speed.svg +1 -1
- package/BookReader/icons/read-aloud.svg +1 -1
- package/BookReader/icons/review.svg +1 -1
- package/BookReader/icons/slider-toggle.svg +1 -0
- package/BookReader/icons/thumbnails.svg +1 -1
- package/BookReader/icons/voice.svg +1 -1
- package/BookReader/icons/volume-full.svg +1 -1
- package/BookReader/images/BRicons.svg +2 -2
- package/BookReader/images/books_graphic.svg +1 -1
- package/BookReader/images/icon_book.svg +1 -1
- package/BookReader/images/icon_bookmark.svg +1 -1
- package/BookReader/images/icon_gear.svg +1 -1
- package/BookReader/images/icon_hamburger.svg +1 -1
- package/BookReader/images/icon_home.svg +1 -1
- package/BookReader/images/icon_info.svg +1 -1
- package/BookReader/images/icon_one_page.svg +1 -1
- package/BookReader/images/icon_pause.svg +1 -1
- package/BookReader/images/icon_play.svg +1 -1
- package/BookReader/images/icon_playback-rate.svg +1 -1
- package/BookReader/images/icon_search_button.svg +1 -1
- package/BookReader/images/icon_share.svg +1 -1
- package/BookReader/images/icon_skip-back.svg +1 -1
- package/BookReader/images/icon_speaker.svg +1 -1
- package/BookReader/images/icon_speaker_open.svg +1 -1
- package/BookReader/images/icon_thumbnails.svg +1 -1
- package/BookReader/images/icon_toc.svg +1 -1
- package/BookReader/images/icon_two_pages.svg +1 -1
- package/BookReader/images/marker_chap-off.svg +1 -1
- package/BookReader/images/marker_chap-on.svg +1 -1
- package/BookReader/images/marker_srch-on.svg +1 -1
- package/BookReader/images/translate.svg +1 -1
- package/BookReader/jquery-3.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js.map +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +2 -2
- package/BookReader/plugins/plugin.chapters.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.experiments.js +1 -1
- package/BookReader/plugins/plugin.experiments.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.experiments.js.map +1 -1
- package/BookReader/plugins/plugin.iframe.js +1 -1
- package/BookReader/plugins/plugin.iframe.js.map +1 -1
- package/BookReader/plugins/plugin.iiif.js +1 -1
- package/BookReader/plugins/plugin.iiif.js.map +1 -1
- package/BookReader/plugins/plugin.resume.js +1 -1
- package/BookReader/plugins/plugin.resume.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +1 -1
- package/BookReader/plugins/plugin.search.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +1 -1
- package/BookReader/plugins/plugin.text_selection.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.translate.js +4 -4
- package/BookReader/plugins/plugin.translate.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.translate.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- package/BookReader/plugins/plugin.tts.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.tts.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -1
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -1
- package/BookReader/plugins/translator-worker.js +1 -1
- package/BookReader/plugins/translator-worker.js.map +1 -1
- package/BookReader/webcomponents-bundle.js +1 -1
- package/BookReader/webcomponents-bundle.js.map +1 -1
- package/package.json +20 -20
- package/src/BookNavigator/search/search-results.js +84 -63
- package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +4 -4
- package/src/BookNavigator/visual-adjustments/visual-adjustments.js +77 -59
- package/src/BookReader/Navbar/Navbar.js +54 -71
- package/src/BookReader/options.js +6 -0
- package/src/BookReader.js +12 -0
- package/src/assets/icons/slider-toggle.svg +1 -0
- package/src/css/_BRnav.scss +57 -4
- package/src/css/_icons.scss +7 -0
- package/src/plugins/plugin.text_selection.js +9 -0
- package/src/plugins/search/plugin.search.js +4 -0
- package/src/plugins/search/utils.js +8 -1
- package/src/plugins/search/view.js +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see plugin.tts.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[51],{1792:function(t,e,n){var r,o;r=[n(1669)],void 0===(o=function(t){return function(t){"use strict";function e(t){void 0===t&&(t=window.navigator.userAgent),t=t.toLowerCase();var e=/(edge)\/([\w.]+)/.exec(t)||/(opr)[\/]([\w.]+)/.exec(t)||/(chrome)[ \/]([\w.]+)/.exec(t)||/(iemobile)[\/]([\w.]+)/.exec(t)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n=/(ipad)/.exec(t)||/(ipod)/.exec(t)||/(windows phone)/.exec(t)||/(iphone)/.exec(t)||/(kindle)/.exec(t)||/(silk)/.exec(t)||/(android)/.exec(t)||/(win)/.exec(t)||/(mac)/.exec(t)||/(linux)/.exec(t)||/(cros)/.exec(t)||/(playbook)/.exec(t)||/(bb)/.exec(t)||/(blackberry)/.exec(t)||[],r={},o={browser:e[5]||e[3]||e[1]||"",version:e[2]||e[4]||"0",versionNumber:e[4]||e[2]||"0",platform:n[0]||""};if(o.browser&&(r[o.browser]=!0,r.version=o.version,r.versionNumber=parseInt(o.versionNumber,10)),o.platform&&(r[o.platform]=!0),(r.android||r.bb||r.blackberry||r.ipad||r.iphone||r.ipod||r.kindle||r.playbook||r.silk||r["windows phone"])&&(r.mobile=!0),(r.cros||r.mac||r.linux||r.win)&&(r.desktop=!0),(r.chrome||r.opr||r.safari)&&(r.webkit=!0),r.rv||r.iemobile){var i="msie";o.browser=i,r[i]=!0}if(r.edge){delete r.edge;var a="msedge";o.browser=a,r[a]=!0}if(r.safari&&r.blackberry){var s="blackberry";o.browser=s,r[s]=!0}if(r.safari&&r.playbook){var u="playbook";o.browser=u,r[u]=!0}if(r.bb){var l="blackberry";o.browser=l,r[l]=!0}if(r.opr){var c="opera";o.browser=c,r[c]=!0}if(r.safari&&r.android){var h="android";o.browser=h,r[h]=!0}if(r.safari&&r.kindle){var f="kindle";o.browser=f,r[f]=!0}if(r.safari&&r.silk){var d="silk";o.browser=d,r[d]=!0}return r.name=o.browser,r.platform=o.platform,r}return window.jQBrowser=e(window.navigator.userAgent),window.jQBrowser.uaMatch=e,t&&(t.browser=window.jQBrowser),window.jQBrowser}(t)}.apply(e,r))||(t.exports=o)},2443:function(t,e,n){var r;t=n.nmd(t),function(o,i){"use strict";if(!o||!o.document)throw new Error("SoundManager requires a browser with window and document objects.");var a=null;function s(t,e){this.setupOptions={url:t||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1e3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,forceUseGlobalHTML5Audio:!1,ignoreMobileRestrictions:!1,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"},this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onerror:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,playbackRate:1,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100},this.flash9Options={onfailure:null,isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1},flac:{type:["audio/flac"],required:!1}},this.movieID="sm2-container",this.id=e||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20170601",this.version=null,this.movieURL=null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null},this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var n,r,a,s,u,l,c,h,f,d,p,y,g,m,v,A,b,w,_,k,S,O,E,L,x,P,M,T,I,D,C,j,F,q,R,V,B,H,N,U,G,Q,K,W,z,J,Y,Z,X,$,tt,et,nt,rt,ot,it,at,st,ut,lt,ct,ht,ft,dt,pt,yt=this,gt=null,mt=null,vt="soundManager",At=vt+": ",bt=navigator.userAgent,wt=o.location.href.toString(),_t=document,kt=[],St=!0,Ot=!1,Et=!1,Lt=!1,xt=!1,Pt=!1,Mt=0,Tt=["log","info","warn","error"],It=null,Dt=null,Ct=!1,jt=!1,Ft=0,qt=null,Rt=[],Vt=null,Bt=Array.prototype.slice,Ht=!1,Nt=0,Ut=1e3,Gt=bt.match(/(ipad|iphone|ipod)/i),Qt=bt.match(/android/i),Kt=bt.match(/msie|trident/i),Wt=bt.match(/webkit/i),zt=bt.match(/safari/i)&&!bt.match(/chrome/i),Jt=bt.match(/opera/i),Yt=bt.match(/(mobile|pre\/|xoom)/i)||Gt||Qt,Zt=!wt.match(/usehtml5audio/i)&&!wt.match(/sm2-ignorebadua/i)&&zt&&!bt.match(/silk/i)&&bt.match(/OS\sX\s10_6_([3-7])/i),Xt=o.console!==i&&console.log!==i,$t=_t.hasFocus!==i?_t.hasFocus():null,te=zt&&(_t.hasFocus===i||!_t.hasFocus()),ee=!te,ne=/(mp3|mp4|mpa|m4a|m4b)/i,re="about:blank",oe=_t.location?_t.location.protocol.match(/http/i):null,ie=oe?"":"//",ae=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4|m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,se=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],ue=new RegExp("\\.("+se.join("|")+")(\\?.*)?$","i");function le(t){return yt.preferFlash&&st&&!yt.ignoreFlash&&yt.flash[t]!==i&&yt.flash[t]}function ce(t){return function(e){var n,r=this._s;return r&&r._a?n=t.call(this,e):(r&&r.id?yt._wD(r.id+": Ignoring "+e.type):yt._wD("HTML5::Ignoring "+e.type),n=null),n}}this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!oe,B={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"},tt=[null,"MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"],this.hasHTML5=function(){try{return Audio!==i&&(Jt&&opera!==i&&opera.version()<10?new Audio(null):new Audio).canPlayType!==i}catch(t){return!1}}(),this.setup=function(t){var e=!yt.url;return t!==i&&Lt&&Vt&&yt.ok()&&(t.flashVersion!==i||t.url!==i||t.html5Test!==i)&&G(q("setupLate")),p(t),Ht||(Yt?yt.setupOptions.ignoreMobileRestrictions&&!yt.setupOptions.forceUseGlobalHTML5Audio||(Rt.push(S.globalHTML5),Ht=!0):yt.setupOptions.forceUseGlobalHTML5Audio&&(Rt.push(S.globalHTML5),Ht=!0)),!pt&&Yt&&(yt.setupOptions.ignoreMobileRestrictions?Rt.push(S.ignoreMobile):(yt.setupOptions.useHTML5Audio&&!yt.setupOptions.preferFlash||yt._wD(S.mobileUA),yt.setupOptions.useHTML5Audio=!0,yt.setupOptions.preferFlash=!1,Gt?yt.ignoreFlash=!0:(Qt&&!bt.match(/android\s2\.3/i)||!Qt)&&(yt._wD(S.globalHTML5),Ht=!0))),t&&(e&&x&&t.url!==i&&yt.beginDelayedInit(),x||t.url===i||"complete"!==_t.readyState||setTimeout(E,1)),pt=!0,yt},this.ok=function(){return Vt?Lt&&!xt:yt.useHTML5Audio&&yt.hasHTML5},this.supported=this.ok,this.getMovie=function(t){return r(t)||_t[t]||o[t]},this.createSound=function(t,e){var r,o,a,s=null;if(o=(r=vt+".createSound(): ")+q(Lt?"notOK":"notReady"),!Lt||!yt.ok())return G(o),!1;if(e!==i&&(t={id:t,url:e}),(a=d(t)).url=J(a.url),a.id===i&&(a.id=yt.setupOptions.idPrefix+Nt++),a.id.toString().charAt(0).match(/^[0-9]$/)&&yt._wD(r+q("badID",a.id),2),yt._wD(r+a.id+(a.url?" ("+a.url+")":""),1),Q(a.id,!0))return yt._wD(r+a.id+" exists",1),yt.sounds[a.id];function u(){return a=N(a),yt.sounds[a.id]=new n(a),yt.soundIDs.push(a.id),yt.sounds[a.id]}if(X(a))s=u(),yt.html5Only||yt._wD(a.id+": Using HTML5"),s._setup_html5(a);else{if(yt.html5Only)return yt._wD(a.id+": No HTML5 support for this sound, and no Flash. Exiting."),u();if(yt.html5.usingFlash&&a.url&&a.url.match(/data:/i))return yt._wD(a.id+": data: URIs not supported via Flash. Exiting."),u();l>8&&(null===a.isMovieStar&&(a.isMovieStar=!!(a.serverURL||a.type&&a.type.match(ae)||a.url&&a.url.match(ue))),a.isMovieStar&&(yt._wD(r+"using MovieStar handling"),a.loops>1&&h("noNSLoop"))),a=U(a,r),s=u(),8===l?mt._createSound(a.id,a.loops||1,a.usePolicyFile):(mt._createSound(a.id,a.url,a.usePeakData,a.useWaveformData,a.useEQData,a.isMovieStar,!!a.isMovieStar&&a.bufferTime,a.loops||1,a.serverURL,a.duration||null,a.autoPlay,!0,a.autoLoad,a.usePolicyFile),a.serverURL||(s.connected=!0,a.onconnect&&a.onconnect.apply(s))),a.serverURL||!a.autoLoad&&!a.autoPlay||s.load(a)}return!a.serverURL&&a.autoPlay&&s.play(),s},this.destroySound=function(t,e){if(!Q(t))return!1;var n,r=yt.sounds[t];for(r.stop(),r._iO={},r.unload(),n=0;n<yt.soundIDs.length;n++)if(yt.soundIDs[n]===t){yt.soundIDs.splice(n,1);break}return e||r.destruct(!0),r=null,delete yt.sounds[t],!0},this.load=function(t,e){return!!Q(t)&&yt.sounds[t].load(e)},this.unload=function(t){return!!Q(t)&&yt.sounds[t].unload()},this.onPosition=function(t,e,n,r){return!!Q(t)&&yt.sounds[t].onposition(e,n,r)},this.onposition=this.onPosition,this.clearOnPosition=function(t,e,n){return!!Q(t)&&yt.sounds[t].clearOnPosition(e,n)},this.play=function(t,e){var n=null,r=e&&!(e instanceof Object);if(!Lt||!yt.ok())return G(vt+".play(): "+q(Lt?"notOK":"notReady")),!1;if(Q(t,r))r&&(e={url:e});else{if(!r)return!1;r&&(e={url:e}),e&&e.url&&(yt._wD(vt+'.play(): Attempting to create "'+t+'"',1),e.id=t,n=yt.createSound(e).play())}return null===n&&(n=yt.sounds[t].play(e)),n},this.start=this.play,this.setPlaybackRate=function(t,e,n){return!!Q(t)&&yt.sounds[t].setPlaybackRate(e,n)},this.setPosition=function(t,e){return!!Q(t)&&yt.sounds[t].setPosition(e)},this.stop=function(t){return!!Q(t)&&(yt._wD(vt+".stop("+t+")",1),yt.sounds[t].stop())},this.stopAll=function(){var t;for(t in yt._wD(vt+".stopAll()",1),yt.sounds)yt.sounds.hasOwnProperty(t)&&yt.sounds[t].stop()},this.pause=function(t){return!!Q(t)&&yt.sounds[t].pause()},this.pauseAll=function(){var t;for(t=yt.soundIDs.length-1;t>=0;t--)yt.sounds[yt.soundIDs[t]].pause()},this.resume=function(t){return!!Q(t)&&yt.sounds[t].resume()},this.resumeAll=function(){var t;for(t=yt.soundIDs.length-1;t>=0;t--)yt.sounds[yt.soundIDs[t]].resume()},this.togglePause=function(t){return!!Q(t)&&yt.sounds[t].togglePause()},this.setPan=function(t,e){return!!Q(t)&&yt.sounds[t].setPan(e)},this.setVolume=function(t,e){var n,r;if(t!==i&&!isNaN(t)&&e===i){for(n=0,r=yt.soundIDs.length;n<r;n++)yt.sounds[yt.soundIDs[n]].setVolume(t);return!1}return!!Q(t)&&yt.sounds[t].setVolume(e)},this.mute=function(t){var e=0;if(t instanceof String&&(t=null),t)return!!Q(t)&&(yt._wD(vt+'.mute(): Muting "'+t+'"'),yt.sounds[t].mute());for(yt._wD(vt+".mute(): Muting all sounds"),e=yt.soundIDs.length-1;e>=0;e--)yt.sounds[yt.soundIDs[e]].mute();return yt.muted=!0,!0},this.muteAll=function(){yt.mute()},this.unmute=function(t){var e;if(t instanceof String&&(t=null),t)return!!Q(t)&&(yt._wD(vt+'.unmute(): Unmuting "'+t+'"'),yt.sounds[t].unmute());for(yt._wD(vt+".unmute(): Unmuting all sounds"),e=yt.soundIDs.length-1;e>=0;e--)yt.sounds[yt.soundIDs[e]].unmute();return yt.muted=!1,!0},this.unmuteAll=function(){yt.unmute()},this.toggleMute=function(t){return!!Q(t)&&yt.sounds[t].toggleMute()},this.getMemoryUse=function(){var t=0;return mt&&8!==l&&(t=parseInt(mt._getMemoryUse(),10)),t},this.disable=function(t){var e;if(t===i&&(t=!1),xt)return!1;for(xt=!0,h("shutdown",1),e=yt.soundIDs.length-1;e>=0;e--)C(yt.sounds[yt.soundIDs[e]]);return C(yt),f(t),it.remove(o,"load",v),!0},this.canPlayMIME=function(t){var e;return yt.hasHTML5&&(e=$({type:t})),!e&&Vt&&(e=t&&yt.ok()?!!(l>8&&t.match(ae)||t.match(yt.mimePattern)):null),e},this.canPlayURL=function(t){var e;return yt.hasHTML5&&(e=$({url:t})),!e&&Vt&&(e=t&&yt.ok()?!!t.match(yt.filePattern):null),e},this.canPlayLink=function(t){return!(t.type===i||!t.type||!yt.canPlayMIME(t.type))||yt.canPlayURL(t.href)},this.getSoundById=function(t,e){if(!t)return null;var n=yt.sounds[t];return n||e||yt._wD(vt+'.getSoundById(): Sound "'+t+'" not found.',2),n},this.onready=function(t,e){var n="onready";if("function"!=typeof t)throw q("needFunction",n);return Lt&&yt._wD(q("queue",n)),e||(e=o),g(n,t,e),m(),!0},this.ontimeout=function(t,e){var n="ontimeout";if("function"!=typeof t)throw q("needFunction",n);return Lt&&yt._wD(q("queue",n)),e||(e=o),g(n,t,e),m({type:n}),!0},this._writeDebug=function(t,e){var n,o;return!(!yt.setupOptions.debugMode||!(Xt&&yt.useConsole&&(e&&"object"==typeof e?console.log(t,e):Tt[e]!==i?console[Tt[e]](t):console.log(t),yt.consoleOnly))&&(!(n=r("soundmanager-debug"))||(o=_t.createElement("div"),++Mt%2==0&&(o.className="sm2-alt"),e=e===i?0:parseInt(e,10),o.appendChild(_t.createTextNode(t)),e&&(e>=2&&(o.style.fontWeight="bold"),3===e&&(o.style.color="#ff3333")),n.insertBefore(o,n.firstChild),n=null,0)))},-1!==wt.indexOf("sm2-debug=alert")&&(this._writeDebug=function(t){o.alert(t)}),this._wD=this._writeDebug,this._debug=function(){var t,e;for(h("currentObj",1),t=0,e=yt.soundIDs.length;t<e;t++)yt.sounds[yt.soundIDs[t]]._debug()},this.reboot=function(t,e){var n,r,i;for(yt.soundIDs.length&&yt._wD("Destroying "+yt.soundIDs.length+" SMSound object"+(1!==yt.soundIDs.length?"s":"")+"..."),n=yt.soundIDs.length-1;n>=0;n--)yt.sounds[yt.soundIDs[n]].destruct();if(mt)try{Kt&&(Dt=mt.innerHTML),It=mt.parentNode.removeChild(mt)}catch(t){h("badRemove",2)}if(Dt=It=Vt=mt=null,yt.enabled=x=Lt=Ct=jt=Ot=Et=xt=Ht=yt.swfLoaded=!1,yt.soundIDs=[],yt.sounds={},Nt=0,pt=!1,t)kt=[];else for(n in kt)if(kt.hasOwnProperty(n))for(r=0,i=kt[n].length;r<i;r++)kt[n][r].fired=!1;return e||yt._wD(vt+": Rebooting..."),yt.html5={usingFlash:null},yt.flash={},yt.html5Only=!1,yt.ignoreFlash=!1,o.setTimeout((function(){e||yt.beginDelayedInit()}),20),yt},this.reset=function(){return h("reset"),yt.reboot(!0,!0)},this.getMoviePercent=function(){return mt&&"PercentLoaded"in mt?mt.PercentLoaded():null},this.beginDelayedInit=function(){Pt=!0,E(),setTimeout((function(){return!jt&&(M(),O(),jt=!0,!0)}),20),A()},this.destruct=function(){yt._wD(vt+".destruct()"),yt.disable(!0)},n=function(t){var e,n,r,o,a,s,u,f,p,y,g=this,m=!1,v=[],A=0,b=null;p={duration:null,time:null},this.id=t.id,this.sID=this.id,this.url=t.url,this.options=d(t),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,y=!this.url,this.id3={},this._debug=function(){yt._wD(g.id+": Merged options:",g.options)},this.load=function(t){var e;if(t!==i?g._iO=d(t,g.options):(t=g.options,g._iO=t,b&&b!==g.url&&(h("manURL"),g._iO.url=g.url,g.url=null)),g._iO.url||(g._iO.url=g.url),g._iO.url=J(g._iO.url),g.instanceOptions=g._iO,e=g._iO,yt._wD(g.id+": load ("+e.url+")"),!e.url&&!g.url)return yt._wD(g.id+": load(): url is unassigned. Exiting.",2),g;if(g.isHTML5||8!==l||g.url||e.autoPlay||yt._wD(g.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),e.url===g.url&&0!==g.readyState&&2!==g.readyState)return h("onURL",1),3===g.readyState&&e.onload&&dt(g,(function(){e.onload.apply(g,[!!g.duration])})),g;if(g.loaded=!1,g.readyState=1,g.playState=0,g.id3={},X(e))g._setup_html5(e)._called_load?yt._wD(g.id+": Ignoring request to load again"):(g._html5_canplay=!1,g.url!==e.url&&(yt._wD(h("manURL")+": "+e.url),g._a.src=e.url,g.setPosition(0)),g._a.autobuffer="auto",g._a.preload="auto",g._a._called_load=!0);else{if(yt.html5Only)return yt._wD(g.id+": No flash support. Exiting."),g;if(g._iO.url&&g._iO.url.match(/data:/i))return yt._wD(g.id+": data: URIs not supported via Flash. Exiting."),g;try{g.isHTML5=!1,g._iO=U(N(e)),g._iO.autoPlay&&(g._iO.position||g._iO.from)&&(yt._wD(g.id+": Disabling autoPlay because of non-zero offset case"),g._iO.autoPlay=!1),e=g._iO,8===l?mt._load(g.id,e.url,e.stream,e.autoPlay,e.usePolicyFile):mt._load(g.id,e.url,!!e.stream,!!e.autoPlay,e.loops||1,!!e.autoLoad,e.usePolicyFile)}catch(t){h("smError",2),c("onload",!1),T({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return g.url=e.url,g},this.unload=function(){return 0!==g.readyState&&(yt._wD(g.id+": unload()"),g.isHTML5?(o(),g._a&&(g._a.pause(),b=nt(g._a))):8===l?mt._unload(g.id,re):mt._unload(g.id),e()),g},this.destruct=function(t){yt._wD(g.id+": Destruct"),g.isHTML5?(o(),g._a&&(g._a.pause(),nt(g._a),Ht||r(),g._a._s=null,g._a=null)):(g._iO.onfailure=null,mt._destroySound(g.id)),t||yt.destroySound(g.id,!0)},this.play=function(t,e){var n,r,o,u,c,h,p=!0;if(n=g.id+": play(): ",e=e===i||e,t||(t={}),g.url&&(g._iO.url=g.url),g._iO=d(g._iO,g.options),g._iO=d(t,g._iO),g._iO.url=J(g._iO.url),g.instanceOptions=g._iO,!g.isHTML5&&g._iO.serverURL&&!g.connected)return g.getAutoPlay()||(yt._wD(n+" Netstream not connected yet - setting autoPlay"),g.setAutoPlay(!0)),g;if(X(g._iO)&&(g._setup_html5(g._iO),a()),1===g.playState&&!g.paused){if(!g._iO.multiShot)return yt._wD(n+"Already playing (one-shot)",1),g.isHTML5&&g.setPosition(g._iO.position),g;yt._wD(n+"Already playing (multi-shot)",1)}if(t.url&&t.url!==g.url&&(g.readyState||g.isHTML5||8!==l||!y?g.load(g._iO):y=!1),g.loaded)yt._wD(n.substr(0,n.lastIndexOf(":")));else if(0===g.readyState){if(yt._wD(n+"Attempting to load"),g.isHTML5||yt.html5Only){if(!g.isHTML5)return yt._wD(n+"Unsupported type. Exiting."),g;g.load(g._iO)}else g._iO.autoPlay=!0,g.load(g._iO);g.instanceOptions=g._iO}else{if(2===g.readyState)return yt._wD(n+"Could not load - exiting",2),g;yt._wD(n+"Loading - attempting to play...")}return!g.isHTML5&&9===l&&g.position>0&&g.position===g.duration&&(yt._wD(n+"Sound at end, resetting to position: 0"),t.position=0),g.paused&&g.position>=0&&(!g._iO.serverURL||g.position>0)?(yt._wD(n+"Resuming from paused state",1),g.resume()):(g._iO=d(t,g._iO),(!g.isHTML5&&null!==g._iO.position&&g._iO.position>0||null!==g._iO.from&&g._iO.from>0||null!==g._iO.to)&&0===g.instanceCount&&0===g.playState&&!g._iO.serverURL&&(o=function(){g._iO=d(t,g._iO),g.play(g._iO)},g.isHTML5&&!g._html5_canplay?(yt._wD(n+"Beginning load for non-zero offset case"),g.load({_oncanplay:o})):g.isHTML5||g.loaded||g.readyState&&2===g.readyState||(yt._wD(n+"Preloading for non-zero offset case"),g.load({onload:o})),g._iO=f()),(!g.instanceCount||g._iO.multiShotEvents||g.isHTML5&&g._iO.multiShot&&!Ht||!g.isHTML5&&l>8&&!g.getAutoPlay())&&g.instanceCount++,g._iO.onposition&&0===g.playState&&s(g),g.playState=1,g.paused=!1,g.position=g._iO.position===i||isNaN(g._iO.position)?0:g._iO.position,g.isHTML5||(g._iO=U(N(g._iO))),g._iO.onplay&&e&&(g._iO.onplay.apply(g),m=!0),g.setVolume(g._iO.volume,!0),g.setPan(g._iO.pan,!0),1!==g._iO.playbackRate&&g.setPlaybackRate(g._iO.playbackRate),g.isHTML5?g.instanceCount<2?(a(),r=g._setup_html5(),g.setPosition(g._iO.position),r.play()):(yt._wD(g.id+": Cloning Audio() for instance #"+g.instanceCount+"..."),u=new Audio(g._iO.url),c=function(){it.remove(u,"ended",c),g._onfinish(g),nt(u),u=null},h=function(){it.remove(u,"canplay",h);try{u.currentTime=g._iO.position/Ut}catch(t){G(g.id+": multiShot play() failed to apply position of "+g._iO.position/Ut)}u.play()},it.add(u,"ended",c),g._iO.volume!==i&&(u.volume=Math.max(0,Math.min(1,g._iO.volume/100))),g.muted&&(u.muted=!0),g._iO.position?it.add(u,"canplay",h):u.play()):(p=mt._start(g.id,g._iO.loops||1,9===l?g.position:g.position/Ut,g._iO.multiShot||!1),9!==l||p||(yt._wD(n+"No sound hardware, or 32-sound ceiling hit",2),g._iO.onplayerror&&g._iO.onplayerror.apply(g)))),g},this.start=this.play,this.stop=function(t){var e,n=g._iO;return 1===g.playState&&(yt._wD(g.id+": stop()"),g._onbufferchange(0),g._resetOnPosition(0),g.paused=!1,g.isHTML5||(g.playState=0),u(),n.to&&g.clearOnPosition(n.to),g.isHTML5?g._a&&(e=g.position,g.setPosition(0),g.position=e,g._a.pause(),g.playState=0,g._onTimer(),o()):(mt._stop(g.id,t),n.serverURL&&g.unload()),g.instanceCount=0,g._iO={},n.onstop&&n.onstop.apply(g)),g},this.setAutoPlay=function(t){yt._wD(g.id+": Autoplay turned "+(t?"on":"off")),g._iO.autoPlay=t,g.isHTML5||(mt._setAutoPlay(g.id,t),t&&(g.instanceCount||1!==g.readyState||(g.instanceCount++,yt._wD(g.id+": Incremented instance count to "+g.instanceCount))))},this.getAutoPlay=function(){return g._iO.autoPlay},this.setPlaybackRate=function(t){var e=Math.max(.5,Math.min(4,t));if(e!==t&&yt._wD(g.id+": setPlaybackRate("+t+"): limiting rate to "+e,2),g.isHTML5)try{g._iO.playbackRate=e,g._a.playbackRate=e}catch(t){yt._wD(g.id+": setPlaybackRate("+e+") failed: "+t.message,2)}return g},this.setPosition=function(t){t===i&&(t=0);var e,n,r=g.isHTML5?Math.max(t,0):Math.min(g.duration||g._iO.duration,Math.max(t,0));if(g.position=r,n=g.position/Ut,g._resetOnPosition(g.position),g._iO.position=r,g.isHTML5){if(g._a){if(g._html5_canplay){if(g._a.currentTime.toFixed(3)!==n.toFixed(3)){yt._wD(g.id+": setPosition("+n+")");try{g._a.currentTime=n,(0===g.playState||g.paused)&&g._a.pause()}catch(t){yt._wD(g.id+": setPosition("+n+") failed: "+t.message,2)}}}else if(n)return yt._wD(g.id+": setPosition("+n+"): Cannot seek yet, sound not ready",2),g;g.paused&&g._onTimer(!0)}}else e=9===l?g.position:n,g.readyState&&2!==g.readyState&&mt._setPosition(g.id,e,g.paused||!g.playState,g._iO.multiShot);return g},this.pause=function(t){return g.paused||0===g.playState&&1!==g.readyState||(yt._wD(g.id+": pause()"),g.paused=!0,g.isHTML5?(g._setup_html5().pause(),o()):(t||t===i)&&mt._pause(g.id,g._iO.multiShot),g._iO.onpause&&g._iO.onpause.apply(g)),g},this.resume=function(){var t=g._iO;return g.paused?(yt._wD(g.id+": resume()"),g.paused=!1,g.playState=1,g.isHTML5?(g._setup_html5().play(),a()):(t.isMovieStar&&!t.serverURL&&g.setPosition(g.position),mt._pause(g.id,t.multiShot)),!m&&t.onplay?(t.onplay.apply(g),m=!0):t.onresume&&t.onresume.apply(g),g):g},this.togglePause=function(){return yt._wD(g.id+": togglePause()"),0===g.playState?(g.play({position:9!==l||g.isHTML5?g.position/Ut:g.position}),g):(g.paused?g.resume():g.pause(),g)},this.setPan=function(t,e){return t===i&&(t=0),e===i&&(e=!1),g.isHTML5||mt._setPan(g.id,t),g._iO.pan=t,e||(g.pan=t,g.options.pan=t),g},this.setVolume=function(t,e){return t===i&&(t=100),e===i&&(e=!1),g.isHTML5?g._a&&(yt.muted&&!g.muted&&(g.muted=!0,g._a.muted=!0),g._a.volume=Math.max(0,Math.min(1,t/100))):mt._setVolume(g.id,yt.muted&&!g.muted||g.muted?0:t),g._iO.volume=t,e||(g.volume=t,g.options.volume=t),g},this.mute=function(){return g.muted=!0,g.isHTML5?g._a&&(g._a.muted=!0):mt._setVolume(g.id,0),g},this.unmute=function(){g.muted=!1;var t=g._iO.volume!==i;return g.isHTML5?g._a&&(g._a.muted=!1):mt._setVolume(g.id,t?g._iO.volume:g.options.volume),g},this.toggleMute=function(){return g.muted?g.unmute():g.mute()},this.onPosition=function(t,e,n){return v.push({position:parseInt(t,10),method:e,scope:n!==i?n:g,fired:!1}),g},this.onposition=this.onPosition,this.clearOnPosition=function(t,e){var n;if(t=parseInt(t,10),!isNaN(t))for(n=0;n<v.length;n++)t===v[n].position&&(e&&e!==v[n].method||(v[n].fired&&A--,v.splice(n,1)))},this._processOnPosition=function(){var t,e,n=v.length;if(!n||!g.playState||A>=n)return!1;for(t=n-1;t>=0;t--)!(e=v[t]).fired&&g.position>=e.position&&(e.fired=!0,A++,e.method.apply(e.scope,[e.position]),n=v.length);return!0},this._resetOnPosition=function(t){var e,n,r=v.length;if(!r)return!1;for(e=r-1;e>=0;e--)(n=v[e]).fired&&t<=n.position&&(n.fired=!1,A--);return!0},f=function(){var t,e,n=g._iO,r=n.from,o=n.to;return e=function(){yt._wD(g.id+': "To" time of '+o+" reached."),g.clearOnPosition(o,e),g.stop()},t=function(){yt._wD(g.id+': Playing "from" '+r),null===o||isNaN(o)||g.onPosition(o,e)},null===r||isNaN(r)||(n.position=r,n.multiShot=!1,t()),n},s=function(){var t,e=g._iO.onposition;if(e)for(t in e)e.hasOwnProperty(t)&&g.onPosition(parseInt(t,10),e[t])},u=function(){var t,e=g._iO.onposition;if(e)for(t in e)e.hasOwnProperty(t)&&g.clearOnPosition(parseInt(t,10))},a=function(){g.isHTML5&&K(g)},o=function(){g.isHTML5&&W(g)},(e=function(t){t||(v=[],A=0),m=!1,g._hasTimer=null,g._a=null,g._html5_canplay=!1,g.bytesLoaded=null,g.bytesTotal=null,g.duration=g._iO&&g._iO.duration?g._iO.duration:null,g.durationEstimate=null,g.buffered=[],g.eqData=[],g.eqData.left=[],g.eqData.right=[],g.failures=0,g.isBuffering=!1,g.instanceOptions={},g.instanceCount=0,g.loaded=!1,g.metadata={},g.readyState=0,g.muted=!1,g.paused=!1,g.peakData={left:0,right:0},g.waveformData={left:[],right:[]},g.playState=0,g.position=null,g.id3={}})(),this._onTimer=function(t){var e,n,r=!1,o={};return(g._hasTimer||t)&&g._a&&(t||(g.playState>0||1===g.readyState)&&!g.paused)&&((e=g._get_html5_duration())!==p.duration&&(p.duration=e,g.duration=e,r=!0),g.durationEstimate=g.duration,(n=g._a.currentTime*Ut||0)!==p.time&&(p.time=n,r=!0),(r||t)&&g._whileplaying(n,o,o,o,o)),r},this._get_html5_duration=function(){var t=g._iO,e=g._a&&g._a.duration?g._a.duration*Ut:t&&t.duration?t.duration:null;return e&&!isNaN(e)&&e!==1/0?e:null},this._apply_loop=function(t,e){!t.loop&&e>1&&yt._wD("Note: Native HTML5 looping is infinite.",1),t.loop=e>1?"loop":""},this._setup_html5=function(t){var r,o=d(g._iO,t),i=Ht?gt:g._a,a=decodeURI(o.url);if(Ht?a===decodeURI(at)&&(r=!0):a===decodeURI(b)&&(r=!0),i){if(i._s)if(Ht)i._s&&i._s.playState&&!r&&i._s.stop();else if(!Ht&&a===decodeURI(b))return g._apply_loop(i,o.loops),i;r||(b&&e(!1),i.src=o.url,g.url=o.url,b=o.url,at=o.url,i._called_load=!1)}else o.autoLoad||o.autoPlay?(g._a=new Audio(o.url),g._a.load()):g._a=Jt&&opera.version()<10?new Audio(null):new Audio,(i=g._a)._called_load=!1,Ht&&(gt=i);return g.isHTML5=!0,g._a=i,i._s=g,n(),g._apply_loop(i,o.loops),o.autoLoad||o.autoPlay?g.load():(i.autobuffer=!1,i.preload="auto"),i},n=function(){if(g._a._added_events)return!1;var t,e,n;for(t in g._a._added_events=!0,ct)ct.hasOwnProperty(t)&&(e=t,n=ct[t],g._a&&g._a.addEventListener(e,n,!1));return!0},r=function(){var t,e,n;for(t in yt._wD(g.id+": Removing event listeners"),g._a._added_events=!1,ct)ct.hasOwnProperty(t)&&(e=t,n=ct[t],g._a&&g._a.removeEventListener(e,n,!1))},this._onload=function(t){var e,n=!!t||!g.isHTML5&&8===l&&g.duration;return e=g.id+": ",yt._wD(e+(n?"onload()":"Failed to load / invalid sound?"+(g.duration?" -":" Zero-length duration reported.")+" ("+g.url+")"),n?1:2),n||g.isHTML5||(!0===yt.sandbox.noRemote&&yt._wD(e+q("noNet"),1),!0===yt.sandbox.noLocal&&yt._wD(e+q("noLocal"),1)),g.loaded=n,g.readyState=n?3:2,g._onbufferchange(0),n||g.isHTML5||g._onerror(),g._iO.onload&&dt(g,(function(){g._iO.onload.apply(g,[n])})),!0},this._onerror=function(t,e){g._iO.onerror&&dt(g,(function(){g._iO.onerror.apply(g,[t,e])}))},this._onbufferchange=function(t){return!(0===g.playState||t&&g.isBuffering||!t&&!g.isBuffering||(g.isBuffering=1===t,g._iO.onbufferchange&&(yt._wD(g.id+": Buffer state change: "+t),g._iO.onbufferchange.apply(g,[t])),0))},this._onsuspend=function(){return g._iO.onsuspend&&(yt._wD(g.id+": Playback suspended"),g._iO.onsuspend.apply(g)),!0},this._onfailure=function(t,e,n){g.failures++,yt._wD(g.id+": Failure ("+g.failures+"): "+t),g._iO.onfailure&&1===g.failures?g._iO.onfailure(t,e,n):yt._wD(g.id+": Ignoring failure")},this._onwarning=function(t,e,n){g._iO.onwarning&&g._iO.onwarning(t,e,n)},this._onfinish=function(){var t=g._iO.onfinish;g._onbufferchange(0),g._resetOnPosition(0),g.instanceCount&&(g.instanceCount--,g.instanceCount||(u(),g.playState=0,g.paused=!1,g.instanceCount=0,g.instanceOptions={},g._iO={},o(),g.isHTML5&&(g.position=0)),g.instanceCount&&!g._iO.multiShotEvents||t&&(yt._wD(g.id+": onfinish()"),dt(g,(function(){t.apply(g)}))))},this._whileloading=function(t,e,n,r){var o=g._iO;g.bytesLoaded=t,g.bytesTotal=e,g.duration=Math.floor(n),g.bufferLength=r,g.isHTML5||o.isMovieStar?g.durationEstimate=g.duration:o.duration?g.durationEstimate=g.duration>o.duration?g.duration:o.duration:g.durationEstimate=parseInt(g.bytesTotal/g.bytesLoaded*g.duration,10),g.isHTML5||(g.buffered=[{start:0,end:g.duration}]),(3!==g.readyState||g.isHTML5)&&o.whileloading&&o.whileloading.apply(g)},this._whileplaying=function(t,e,n,r,o){var a,s=g._iO;return!isNaN(t)&&null!==t&&(g.position=Math.max(0,t),g._processOnPosition(),!g.isHTML5&&l>8&&(s.usePeakData&&e!==i&&e&&(g.peakData={left:e.leftPeak,right:e.rightPeak}),s.useWaveformData&&n!==i&&n&&(g.waveformData={left:n.split(","),right:r.split(",")}),s.useEQData&&o!==i&&o&&o.leftEQ&&(a=o.leftEQ.split(","),g.eqData=a,g.eqData.left=a,o.rightEQ!==i&&o.rightEQ&&(g.eqData.right=o.rightEQ.split(",")))),1===g.playState&&(g.isHTML5||8!==l||g.position||!g.isBuffering||g._onbufferchange(0),s.whileplaying&&s.whileplaying.apply(g)),!0)},this._oncaptiondata=function(t){yt._wD(g.id+": Caption data received."),g.captiondata=t,g._iO.oncaptiondata&&g._iO.oncaptiondata.apply(g,[t])},this._onmetadata=function(t,e){yt._wD(g.id+": Metadata received.");var n,r,o={};for(n=0,r=t.length;n<r;n++)o[t[n]]=e[n];g.metadata=o,g._iO.onmetadata&&g._iO.onmetadata.call(g,g.metadata)},this._onid3=function(t,e){yt._wD(g.id+": ID3 data received.");var n,r,o=[];for(n=0,r=t.length;n<r;n++)o[t[n]]=e[n];g.id3=d(g.id3,o),g._iO.onid3&&g._iO.onid3.apply(g)},this._onconnect=function(t){t=1===t,yt._wD(g.id+": "+(t?"Connected.":"Failed to connect? - "+g.url),t?1:2),g.connected=t,t&&(g.failures=0,Q(g.id)&&(g.getAutoPlay()?g.play(i,g.getAutoPlay()):g._iO.autoLoad&&g.load()),g._iO.onconnect&&g._iO.onconnect.apply(g,[t]))},this._ondataerror=function(t){g.playState>0&&(yt._wD(g.id+": Data error: "+t),g._iO.ondataerror&&g._iO.ondataerror.apply(g))},this._debug()},P=function(){return _t.body||_t.getElementsByTagName("div")[0]},r=function(t){return _t.getElementById(t)},d=function(t,e){var n,r,o=t||{};for(r in n=e===i?yt.defaultOptions:e)n.hasOwnProperty(r)&&o[r]===i&&("object"!=typeof n[r]||null===n[r]?o[r]=n[r]:o[r]=d(o[r],n[r]));return o},dt=function(t,e){t.isHTML5||8!==l?e():o.setTimeout(e,0)},y={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},p=function(t,e){var n,r=!0,o=e!==i,a=yt.setupOptions,s=y;if(t===i){for(n in r=[],a)a.hasOwnProperty(n)&&r.push(n);for(n in s)s.hasOwnProperty(n)&&("object"==typeof yt[n]?r.push(n+": {...}"):yt[n]instanceof Function?r.push(n+": function() {...}"):r.push(n));return yt._wD(q("setup",r.join(", "))),!1}for(n in t)if(t.hasOwnProperty(n))if("object"!=typeof t[n]||null===t[n]||t[n]instanceof Array||t[n]instanceof RegExp)o&&s[e]!==i?yt[e][n]=t[n]:a[n]!==i?(yt.setupOptions[n]=t[n],yt[n]=t[n]):s[n]===i?(G(q(yt[n]===i?"setupUndef":"setupError",n),2),r=!1):yt[n]instanceof Function?yt[n].apply(yt,t[n]instanceof Array?t[n]:[t[n]]):yt[n]=t[n];else{if(s[n]!==i)return p(t[n],n);G(q(yt[n]===i?"setupUndef":"setupError",n),2),r=!1}return r},it=function(){var t=o.attachEvent,e={add:t?"attachEvent":"addEventListener",remove:t?"detachEvent":"removeEventListener"};function n(e){var n=Bt.call(e),r=n.length;return t?(n[1]="on"+n[1],r>3&&n.pop()):3===r&&n.push(!1),n}function r(n,r){var o=n.shift(),i=[e[r]];t?o[i](n[0],n[1]):o[i].apply(o,n)}return{add:function(){r(n(arguments),"add")},remove:function(){r(n(arguments),"remove")}}}(),ct={abort:ce((function(){yt._wD(this._s.id+": abort")})),canplay:ce((function(){var t,e=this._s;if(!e._html5_canplay){if(e._html5_canplay=!0,yt._wD(e.id+": canplay"),e._onbufferchange(0),t=e._iO.position===i||isNaN(e._iO.position)?null:e._iO.position/Ut,this.currentTime!==t){yt._wD(e.id+": canplay: Setting position to "+t);try{this.currentTime=t}catch(n){yt._wD(e.id+": canplay: Setting position of "+t+" failed: "+n.message,2)}}e._iO._oncanplay&&e._iO._oncanplay()}})),canplaythrough:ce((function(){var t=this._s;t.loaded||(t._onbufferchange(0),t._whileloading(t.bytesLoaded,t.bytesTotal,t._get_html5_duration()),t._onload(!0))})),durationchange:ce((function(){var t,e=this._s;t=e._get_html5_duration(),isNaN(t)||t===e.duration||(yt._wD(this._s.id+": durationchange ("+t+")"+(e.duration?", previously "+e.duration:"")),e.durationEstimate=e.duration=t)})),ended:ce((function(){var t=this._s;yt._wD(t.id+": ended"),t._onfinish()})),error:ce((function(){var t=tt[this.error.code]||null;yt._wD(this._s.id+": HTML5 error, code "+this.error.code+(t?" ("+t+")":"")),this._s._onload(!1),this._s._onerror(this.error.code,t)})),loadeddata:ce((function(){var t=this._s;yt._wD(t.id+": loadeddata"),t._loaded||zt||(t.duration=t._get_html5_duration())})),loadedmetadata:ce((function(){yt._wD(this._s.id+": loadedmetadata")})),loadstart:ce((function(){yt._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)})),play:ce((function(){this._s._onbufferchange(0)})),playing:ce((function(){yt._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)})),progress:ce((function(t){var e,n,r,o=this._s,i=0,a="progress"===t.type,s=t.target.buffered,u=t.loaded||0,l=t.total||1;if(o.buffered=[],s&&s.length){for(e=0,n=s.length;e<n;e++)o.buffered.push({start:s.start(e)*Ut,end:s.end(e)*Ut});if(i=(s.end(0)-s.start(0))*Ut,u=Math.min(1,i/(t.target.duration*Ut)),a&&s.length>1){for(r=[],n=s.length,e=0;e<n;e++)r.push(t.target.buffered.start(e)*Ut+"-"+t.target.buffered.end(e)*Ut);yt._wD(this._s.id+": progress, timeRanges: "+r.join(", "))}a&&!isNaN(u)&&yt._wD(this._s.id+": progress, "+Math.floor(100*u)+"% loaded")}isNaN(u)||(o._whileloading(u,l,o._get_html5_duration()),u&&l&&u===l&&ct.canplaythrough.call(this,t))})),ratechange:ce((function(){yt._wD(this._s.id+": ratechange")})),suspend:ce((function(t){var e=this._s;yt._wD(this._s.id+": suspend"),ct.progress.call(this,t),e._onsuspend()})),stalled:ce((function(){yt._wD(this._s.id+": stalled")})),timeupdate:ce((function(){this._s._onTimer()})),waiting:ce((function(){var t=this._s;yt._wD(this._s.id+": waiting"),t._onbufferchange(1)}))},X=function(t){return!(!t||!(t.type||t.url||t.serverURL))&&!(t.serverURL||t.type&&le(t.type))&&(t.type?$({type:t.type}):$({url:t.url})||yt.html5Only||t.url.match(/data:/i))},nt=function(t){var e;return t&&(e=zt?re:yt.html5.canPlayType("audio/wav")?"data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==":re,t.src=e,t._called_unload!==i&&(t._called_load=!1)),Ht&&(at=null),e},$=function(t){if(!yt.useHTML5Audio||!yt.hasHTML5)return!1;var e,n,r,o,a=t.url||null,s=t.type||null,u=yt.audioFormats;if(s&&yt.html5[s]!==i)return yt.html5[s]&&!le(s);if(!et){for(o in et=[],u)u.hasOwnProperty(o)&&(et.push(o),u[o].related&&(et=et.concat(u[o].related)));et=new RegExp("\\.("+et.join("|")+")(\\?.*)?$","i")}return(r=a?a.toLowerCase().match(et):null)&&r.length?r=r[1]:s?r=(-1!==(n=s.indexOf(";"))?s.substr(0,n):s).substr(6):e=!1,r&&yt.html5[r]!==i?e=yt.html5[r]&&!le(r):(s="audio/"+r,e=yt.html5.canPlayType({type:s}),yt.html5[r]=e,e=e&&yt.html5[s]&&!le(s)),e},ot=function(){if(!yt.useHTML5Audio||!yt.hasHTML5)return yt.html5.usingFlash=!0,Vt=!0,!1;var t,e,n,r,o=Audio!==i?Jt&&opera.version()<10?new Audio(null):new Audio:null,a={};function s(t){var e,n,i=!1,a=!1;if(!o||"function"!=typeof o.canPlayType)return i;if(t instanceof Array){for(r=0,n=t.length;r<n;r++)(yt.html5[t[r]]||o.canPlayType(t[r]).match(yt.html5Test))&&(a=!0,yt.html5[t[r]]=!0,yt.flash[t[r]]=!!t[r].match(ne));i=a}else i=!(!(e=!(!o||"function"!=typeof o.canPlayType)&&o.canPlayType(t))||!e.match(yt.html5Test));return i}for(t in n=yt.audioFormats)if(n.hasOwnProperty(t)&&(e="audio/"+t,a[t]=s(n[t].type),a[e]=a[t],t.match(ne)?(yt.flash[t]=!0,yt.flash[e]=!0):(yt.flash[t]=!1,yt.flash[e]=!1),n[t]&&n[t].related))for(r=n[t].related.length-1;r>=0;r--)a["audio/"+n[t].related[r]]=a[t],yt.html5[n[t].related[r]]=a[t],yt.flash[n[t].related[r]]=a[t];return a.canPlayType=o?s:null,yt.html5=d(yt.html5,a),yt.html5.usingFlash=Z(),Vt=yt.html5.usingFlash,!0},S={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:vt+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:At+"Verify that %s is a valid path.",tryDebug:"Try "+vt+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:At+"Non-HTTP page ("+_t.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/",waitFocus:At+"Special case: Waiting for SWF to load with window focus...",waitForever:At+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:At+"Waiting for 100% SWF load...",needFunction:At+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:At+"_debug(): Current sound objects",waitOnload:At+"Waiting for window.onload()",docLoaded:At+"Document already loaded",onload:At+"initComplete(): calling soundManager.onload()",onloadOK:vt+".onload() complete",didInit:At+"init(): Already called?",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",badRemove:At+"Failed to remove Flash node.",shutdown:vt+".disable(): Shutting down",queue:At+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+B.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:At+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:vt+".load(): current URL already assigned.",badFV:vt+'.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",needFlash:At+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:At+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:vt+".setup(): allowed parameters: %s",setupError:vt+'.setup(): "%s" cannot be assigned with this method.',setupUndef:vt+'.setup(): Could not find option "%s"',setupLate:vt+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:At+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:vt+".reset(): Removing event callbacks",mobileUA:"Mobile UA detected, preferring HTML5 by default.",globalHTML5:"Using singleton HTML5 Audio() pattern for this device.",ignoreMobile:"Ignoring mobile restrictions for this device."},q=function(){var t,e,n,r,o;if(r=(t=Bt.call(arguments)).shift(),(o=S&&S[r]?S[r]:"")&&t&&t.length)for(e=0,n=t.length;e<n;e++)o=o.replace("%s",t[e]);return o},N=function(t){return 8===l&&t.loops>1&&t.stream&&(h("as2loop"),t.stream=!1),t},U=function(t,e){return t&&!t.usePolicyFile&&(t.onid3||t.usePeakData||t.useWaveformData||t.useEQData)&&(yt._wD((e||"")+q("policy")),t.usePolicyFile=!0),t},G=function(t){Xt&&console.warn!==i?console.warn(t):yt._wD(t)},a=function(){return!1},C=function(t){var e;for(e in t)t.hasOwnProperty(e)&&"function"==typeof t[e]&&(t[e]=a);e=null},j=function(t){t===i&&(t=!1),(xt||t)&&yt.disable(t)},F=function(t){var e;if(t)if(t.match(/\.swf(\?.*)?$/i)){if(t.substr(t.toLowerCase().lastIndexOf(".swf?")+4))return t}else t.lastIndexOf("/")!==t.length-1&&(t+="/");return e=(t&&-1!==t.lastIndexOf("/")?t.substr(0,t.lastIndexOf("/")+1):"./")+yt.movieURL,yt.noSWFCache&&(e+="?ts="+(new Date).getTime()),e},_=function(){8!==(l=parseInt(yt.flashVersion,10))&&9!==l&&(yt._wD(q("badFV",l,8)),yt.flashVersion=l=8);var t=yt.debugMode||yt.debugFlash?"_debug.swf":".swf";yt.useHTML5Audio&&!yt.html5Only&&yt.audioFormats.mp4.required&&l<9&&(yt._wD(q("needfl9")),yt.flashVersion=l=9),yt.version=yt.versionNumber+(yt.html5Only?" (HTML5-only mode)":9===l?" (AS3/Flash 9)":" (AS2/Flash 8)"),l>8?(yt.defaultOptions=d(yt.defaultOptions,yt.flash9Options),yt.features.buffering=!0,yt.defaultOptions=d(yt.defaultOptions,yt.movieStarOptions),yt.filePatterns.flash9=new RegExp("\\.(mp3|"+se.join("|")+")(\\?.*)?$","i"),yt.features.movieStar=!0):yt.features.movieStar=!1,yt.filePattern=yt.filePatterns[8!==l?"flash9":"flash8"],yt.movieURL=(8===l?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",t),yt.features.peakData=yt.features.waveformData=yt.features.eqData=l>8},I=function(t,e){mt&&mt._setPolling(t,e)},D=function(){if(yt.debugURLParam.test(wt)&&(yt.setupOptions.debugMode=yt.debugMode=!0),!r(yt.debugID)){var t,e,n,o,i;if(yt.debugMode&&!r(yt.debugID)&&(!Xt||!yt.useConsole||!yt.consoleOnly)){for(i in(t=_t.createElement("div")).id=yt.debugID+"-toggle",o={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001},t.appendChild(_t.createTextNode("-")),t.onclick=H,t.title="Toggle SM2 debug console",bt.match(/msie 6/i)&&(t.style.position="absolute",t.style.cursor="hand"),o)o.hasOwnProperty(i)&&(t.style[i]=o[i]);if((e=_t.createElement("div")).id=yt.debugID,e.style.display=yt.debugMode?"block":"none",yt.debugMode&&!r(t.id)){try{(n=P()).appendChild(t)}catch(t){throw new Error(q("domError")+" \n"+t.toString())}n.appendChild(e)}}n=null}},Q=this.getSoundById,h=function(t,e){return t?yt._wD(q(t),e):""},H=function(){var t=r(yt.debugID),e=r(yt.debugID+"-toggle");t&&(St?(e.innerHTML="+",t.style.display="none"):(e.innerHTML="-",t.style.display="block"),St=!St)},c=function(t,e,n){if(o.sm2Debugger!==i)try{sm2Debugger.handleEvent(t,e,n)}catch(t){return!1}return!0},V=function(){var t=[];return yt.debugMode&&t.push(B.sm2Debug),yt.debugFlash&&t.push(B.flashDebug),yt.useHighPerformance&&t.push(B.highPerf),t.join(" ")},R=function(){var t=q("fbHandler"),e=yt.getMoviePercent(),n=B,r={type:"FLASHBLOCK"};yt.html5Only||(yt.ok()?(yt.didFlashBlock&&yt._wD(t+": Unblocked"),yt.oMC&&(yt.oMC.className=[V(),n.swfDefault,n.swfLoaded+(yt.didFlashBlock?" "+n.swfUnblocked:"")].join(" "))):(Vt&&(yt.oMC.className=V()+" "+n.swfDefault+" "+(null===e?n.swfTimedout:n.swfError),yt._wD(t+": "+q("fbTimeout")+(e?" ("+q("fbLoaded")+")":""))),yt.didFlashBlock=!0,m({type:"ontimeout",ignoreInit:!0,error:r}),T(r)))},g=function(t,e,n){kt[t]===i&&(kt[t]=[]),kt[t].push({method:e,scope:n||null,fired:!1})},m=function(t){if(t||(t={type:yt.ok()?"onready":"ontimeout"}),!Lt&&t&&!t.ignoreInit)return!1;if("ontimeout"===t.type&&(yt.ok()||xt&&!t.ignoreInit))return!1;var e,n,r={success:t&&t.ignoreInit?yt.ok():!xt},o=t&&t.type&&kt[t.type]||[],i=[],a=[r],s=Vt&&!yt.ok();for(t.error&&(a[0].error=t.error),e=0,n=o.length;e<n;e++)!0!==o[e].fired&&i.push(o[e]);if(i.length)for(e=0,n=i.length;e<n;e++)i[e].scope?i[e].method.apply(i[e].scope,a):i[e].method.apply(this,a),s||(i[e].fired=!0);return!0},v=function(){o.setTimeout((function(){yt.useFlashBlock&&R(),m(),"function"==typeof yt.onload&&(h("onload",1),yt.onload.apply(o),h("onloadOK",1)),yt.waitForWindowLoad&&it.add(o,"load",v)}),1)},ut=function(){if(st!==i)return st;var t,e,n,r,a=!1,s=navigator,u=o.ActiveXObject;try{r=s.plugins}catch(t){r=void 0}if(r&&r.length)e="application/x-shockwave-flash",(n=s.mimeTypes)&&n[e]&&n[e].enabledPlugin&&n[e].enabledPlugin.description&&(a=!0);else if(u!==i&&!bt.match(/MSAppHost/i)){try{t=new u("ShockwaveFlash.ShockwaveFlash")}catch(e){t=null}a=!!t,t=null}return st=a,a},Z=function(){var t,e,n=yt.audioFormats;if(Gt&&bt.match(/os (1|2|3_0|3_1)\s/i)?(yt.hasHTML5=!1,yt.html5Only=!0,yt.oMC&&(yt.oMC.style.display="none")):yt.useHTML5Audio&&(yt.html5&&yt.html5.canPlayType||(yt._wD("SoundManager: No HTML5 Audio() support detected."),yt.hasHTML5=!1),Zt&&yt._wD(At+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(st?"will use flash fallback for MP3/MP4, if available":" would use flash fallback for MP3/MP4, but none detected."),1)),yt.useHTML5Audio&&yt.hasHTML5)for(e in Y=!0,n)n.hasOwnProperty(e)&&n[e].required&&(yt.html5.canPlayType(n[e].type)?yt.preferFlash&&(yt.flash[e]||yt.flash[n[e].type])&&(t=!0):(Y=!1,t=!0));return yt.ignoreFlash&&(t=!1,Y=!0),yt.html5Only=yt.hasHTML5&&yt.useHTML5Audio&&!t,!yt.html5Only},J=function(t){var e,n,r,o=0;if(t instanceof Array){for(e=0,n=t.length;e<n;e++)if(t[e]instanceof Object){if(yt.canPlayMIME(t[e].type)){o=e;break}}else if(yt.canPlayURL(t[e])){o=e;break}t[o].url&&(t[o]=t[o].url),r=t[o]}else r=t;return r},K=function(t){t._hasTimer||(t._hasTimer=!0,!Yt&&yt.html5PollingInterval&&(null===qt&&0===Ft&&(qt=setInterval(z,yt.html5PollingInterval)),Ft++))},W=function(t){t._hasTimer&&(t._hasTimer=!1,!Yt&&yt.html5PollingInterval&&Ft--)},z=function(){var t;if(null!==qt&&!Ft)return clearInterval(qt),void(qt=null);for(t=yt.soundIDs.length-1;t>=0;t--)yt.sounds[yt.soundIDs[t]].isHTML5&&yt.sounds[yt.soundIDs[t]]._hasTimer&&yt.sounds[yt.soundIDs[t]]._onTimer()},T=function(t){t=t!==i?t:{},"function"==typeof yt.onerror&&yt.onerror.apply(o,[{type:t.type!==i?t.type:null}]),t.fatal!==i&&t.fatal&&yt.disable()},lt=function(){if(Zt&&ut()){var t,e,n=yt.audioFormats;for(e in n)if(n.hasOwnProperty(e)&&("mp3"===e||"mp4"===e)&&(yt._wD(vt+": Using flash fallback for "+e+" format"),yt.html5[e]=!1,n[e]&&n[e].related))for(t=n[e].related.length-1;t>=0;t--)yt.html5[n[e].related[t]]=!1}},this._setSandboxType=function(t){var e=yt.sandbox;e.type=t,e.description=e.types[e.types[t]!==i?t:"unknown"],"localWithFile"===e.type?(e.noRemote=!0,e.noLocal=!1,h("secNote",2)):"localWithNetwork"===e.type?(e.noRemote=!1,e.noLocal=!0):"localTrusted"===e.type&&(e.noRemote=!1,e.noLocal=!1)},this._externalInterfaceOK=function(t){if(!yt.swfLoaded){var e;if(c("swf",!0),c("flashtojs",!0),yt.swfLoaded=!0,te=!1,Zt&<(),!t||t.replace(/\+dev/i,"")!==yt.versionNumber.replace(/\+dev/i,""))return e=vt+': Fatal: JavaScript file build "'+yt.versionNumber+'" does not match Flash SWF build "'+t+'" at '+yt.url+". Ensure both are up-to-date.",void setTimeout((function(){throw new Error(e)}),0);setTimeout(u,Kt?100:1)}},M=function(t,e){if(Ot&&Et)return!1;function n(){var t,e=[],n=[];t="SoundManager "+yt.version+(!yt.html5Only&&yt.useHTML5Audio?yt.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),yt.html5Only?yt.html5PollingInterval&&e.push("html5PollingInterval ("+yt.html5PollingInterval+"ms)"):(yt.preferFlash&&e.push("preferFlash"),yt.useHighPerformance&&e.push("useHighPerformance"),yt.flashPollingInterval&&e.push("flashPollingInterval ("+yt.flashPollingInterval+"ms)"),yt.html5PollingInterval&&e.push("html5PollingInterval ("+yt.html5PollingInterval+"ms)"),yt.wmode&&e.push("wmode ("+yt.wmode+")"),yt.debugFlash&&e.push("debugFlash"),yt.useFlashBlock&&e.push("flashBlock")),e.length&&(n=n.concat([e.join(" + ")])),yt._wD(t+(n.length?" + "+n.join(", "):""),1),ht()}if(yt.html5Only)return _(),n(),yt.oMC=r(yt.movieID),u(),Ot=!0,Et=!0,!1;var o,a,s,l,c,h,f,d,p,y=e||yt.url,g=yt.altURL||y,m=P(),v=V(),A=_t.getElementsByTagName("html")[0];function b(t,e){return'<param name="'+t+'" value="'+e+'" />'}if(o=A&&A.dir&&A.dir.match(/rtl/i),t=t===i?yt.id:t,_(),yt.url=F(oe?y:g),e=yt.url,yt.wmode=!yt.wmode&&yt.useHighPerformance?"transparent":yt.wmode,null!==yt.wmode&&(bt.match(/msie 8/i)||!Kt&&!yt.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(Rt.push(S.spcWmode),yt.wmode=null),a={name:t,id:t,src:e,quality:"high",allowScriptAccess:yt.allowScriptAccess,bgcolor:yt.bgColor,pluginspage:ie+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:yt.wmode,hasPriority:"true"},yt.debugFlash&&(a.FlashVars="debug=1"),yt.wmode||delete a.wmode,Kt)s=_t.createElement("div"),c=['<object id="'+t+'" data="'+e+'" type="'+a.type+'" title="'+a.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',b("movie",e),b("AllowScriptAccess",yt.allowScriptAccess),b("quality",a.quality),yt.wmode?b("wmode",yt.wmode):"",b("bgcolor",yt.bgColor),b("hasPriority","true"),yt.debugFlash?b("FlashVars",a.FlashVars):"","</object>"].join("");else for(l in s=_t.createElement("embed"),a)a.hasOwnProperty(l)&&s.setAttribute(l,a[l]);if(D(),v=V(),m=P())if(yt.oMC=r(yt.movieID)||_t.createElement("div"),yt.oMC.id)p=yt.oMC.className,yt.oMC.className=(p?p+" ":B.swfDefault)+(v?" "+v:""),yt.oMC.appendChild(s),Kt&&((h=yt.oMC.appendChild(_t.createElement("div"))).className=B.swfBox,h.innerHTML=c),Et=!0;else{if(yt.oMC.id=yt.movieID,yt.oMC.className=B.swfDefault+" "+v,f=null,h=null,yt.useFlashBlock||(yt.useHighPerformance?f={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(f={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},o&&(f.left=Math.abs(parseInt(f.left,10))+"px"))),Wt&&(yt.oMC.style.zIndex=1e4),!yt.debugFlash)for(d in f)f.hasOwnProperty(d)&&(yt.oMC.style[d]=f[d]);try{Kt||yt.oMC.appendChild(s),m.appendChild(yt.oMC),Kt&&((h=yt.oMC.appendChild(_t.createElement("div"))).className=B.swfBox,h.innerHTML=c),Et=!0}catch(t){throw new Error(q("domError")+" \n"+t.toString())}}return Ot=!0,n(),!0},O=function(){return yt.html5Only?(M(),!1):!mt&&(yt.url?((mt=yt.getMovie(yt.id))||(It?(Kt?yt.oMC.innerHTML=Dt:yt.oMC.appendChild(It),It=null,Ot=!0):M(yt.id,yt.url),mt=yt.getMovie(yt.id)),"function"==typeof yt.oninitmovie&&setTimeout(yt.oninitmovie,1),ft(),!0):(h("noURL"),!1))},A=function(){setTimeout(b,1e3)},w=function(){o.setTimeout((function(){G(At+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),yt.setup({preferFlash:!1}).reboot(),yt.didFlashBlock=!0,yt.beginDelayedInit()}),1)},b=function(){var t,e=!1;yt.url&&(Ct||(Ct=!0,it.remove(o,"load",A),st&&te&&!$t?h("waitFocus"):(Lt||(t=yt.getMoviePercent())>0&&t<100&&(e=!0),setTimeout((function(){if(t=yt.getMoviePercent(),e)return Ct=!1,yt._wD(q("waitSWF")),void o.setTimeout(A,1);Lt||(yt._wD(vt+": No Flash response within expected time. Likely causes: "+(0===t?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(yt.debugFlash?" "+q("checkSWF"):""),2),!oe&&t&&(h("localFail",2),yt.debugFlash||h("tryDebug",2)),0===t&&yt._wD(q("swf404",yt.url),1),c("flashtojs",!1,": Timed out"+(oe?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),!Lt&&ee&&(null===t?yt.useFlashBlock||0===yt.flashLoadTimeout?(yt.useFlashBlock&&R(),h("waitForever")):!yt.useFlashBlock&&Y?w():(h("waitForever"),m({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===yt.flashLoadTimeout?h("waitForever"):!yt.useFlashBlock&&Y?w():j(!0))}),yt.flashLoadTimeout))))},k=function(){function t(){it.remove(o,"focus",k)}return $t||!te?(t(),!0):(ee=!0,$t=!0,h("gotFocus"),Ct=!1,A(),t(),!0)},ft=function(){Rt.length&&(yt._wD("SoundManager 2: "+Rt.join(" "),1),Rt=[])},ht=function(){ft();var t,e=[];if(yt.useHTML5Audio&&yt.hasHTML5){for(t in yt.audioFormats)yt.audioFormats.hasOwnProperty(t)&&e.push(t+" = "+yt.html5[t]+(!yt.html5[t]&&Vt&&yt.flash[t]?" (using flash)":yt.preferFlash&&yt.flash[t]&&Vt?" (preferring flash)":yt.html5[t]?"":" ("+(yt.audioFormats[t].required?"required, ":"")+"and no flash support)"));yt._wD("SoundManager 2 HTML5 support: "+e.join(", "),1)}},f=function(t){if(Lt)return!1;if(yt.html5Only)return h("sm2Loaded",1),Lt=!0,v(),c("onload",!0),!0;var e,n=!0;return yt.useFlashBlock&&yt.flashLoadTimeout&&!yt.getMoviePercent()||(Lt=!0),e={type:!st&&Vt?"NO_FLASH":"INIT_TIMEOUT"},yt._wD("SoundManager 2 "+(xt?"failed to load":"loaded")+" ("+(xt?"Flash security/load error":"OK")+") "+String.fromCharCode(xt?10006:10003),xt?2:1),xt||t?(yt.useFlashBlock&&yt.oMC&&(yt.oMC.className=V()+" "+(null===yt.getMoviePercent()?B.swfTimedout:B.swfError)),m({type:"ontimeout",error:e,ignoreInit:!0}),c("onload",!1),T(e),n=!1):c("onload",!0),xt||(yt.waitForWindowLoad&&!Pt?(h("waitOnload"),it.add(o,"load",v)):(yt.waitForWindowLoad&&Pt&&h("docLoaded"),v())),n},s=function(){var t,e=yt.setupOptions;for(t in e)e.hasOwnProperty(t)&&(yt[t]===i?yt[t]=e[t]:yt[t]!==e[t]&&(yt.setupOptions[t]=yt[t]))},u=function(){if(Lt)return h("didInit"),!1;function t(){it.remove(o,"load",yt.beginDelayedInit)}if(yt.html5Only)return Lt||(t(),yt.enabled=!0,f()),!0;O();try{mt._externalInterfaceTest(!1),I(!0,yt.flashPollingInterval||(yt.useHighPerformance?10:50)),yt.debugMode||mt._disableDebug(),yt.enabled=!0,c("jstoflash",!0),yt.html5Only||it.add(o,"unload",a)}catch(t){return yt._wD("js/flash exception: "+t.toString()),c("jstoflash",!1),T({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),j(!0),f(),!1}return f(),t(),!0},E=function(){return!x&&(x=!0,s(),D(),!st&&yt.hasHTML5&&(yt._wD("SoundManager 2: No Flash detected"+(yt.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),yt.setup({useHTML5Audio:!0,preferFlash:!1})),ot(),!st&&Vt&&(Rt.push(S.needFlash),yt.setup({flashLoadTimeout:1})),_t.removeEventListener&&_t.removeEventListener("DOMContentLoaded",E,!1),O(),!0)},rt=function(){return"complete"===_t.readyState&&(E(),_t.detachEvent("onreadystatechange",rt)),!0},L=function(){Pt=!0,E(),it.remove(o,"load",L)},ut(),it.add(o,"focus",k),it.add(o,"load",A),it.add(o,"load",L),_t.addEventListener?_t.addEventListener("DOMContentLoaded",E,!1):_t.attachEvent?_t.attachEvent("onreadystatechange",rt):(c("onload",!1),T({type:"NO_DOM2_EVENTS",fatal:!0}))}o.SM2_DEFER!==i&&SM2_DEFER||(a=new s),t&&"object"==typeof t.exports?(t.exports.SoundManager=s,t.exports.soundManager=a):void 0===(r=function(){return{constructor:s,getInstance:function(t){if(!o.soundManager&&t instanceof Function){var e=t(s);e instanceof s&&(o.soundManager=e)}return o.soundManager}}}.call(e,n,e,t))||(t.exports=r),o.SoundManager=s,o.soundManager=a}(window)},706:function(t,e,n){"use strict";var r=n(350).PROPER,o=n(9039),i=n(7452);t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||r&&i[t].name!==t}))}},2762:function(t,e,n){"use strict";var r=n(6518),o=n(3802).trim;r({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return o(this)}})},1041:function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function i(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.d(e,{S:function(){return a}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(9085),n(6099),n(7764),n(2953);var a=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.br=e,this.options},(e=[{key:"setup",value:function(t){this.options=Object.assign({},this.options,t)}},{key:"init",value:function(){}},{key:"_configurePageContainer",value:function(t){}},{key:"_configureToolbar",value:function(t){}},{key:"_bindNavigationHandlers",value:function(){}},{key:"extendNavBar",value:function(t){}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},3638:function(t,e,n){"use strict";n(2675),n(9463),n(6412),n(2259),n(5700),n(8125),n(8706),n(2008),n(113),n(3418),n(3792),n(8598),n(2062),n(4490),n(4782),n(6910),n(9572),n(2010),n(4731),n(479),n(8130),n(9085),n(5506),n(3851),n(1278),n(875),n(9432),n(6099),n(8459),n(3362),n(825),n(888),n(7495),n(8781),n(7764),n(1761),n(1392),n(3500),n(2953),n(5440);var r=n(9073),o=n(1669);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(){a=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var i=e&&e.prototype instanceof A?e:A,a=Object.create(i.prototype),s=new I(r||[]);return o(a,"_invoke",{value:x(t,n,s)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",y="suspendedYield",g="executing",m="completed",v={};function A(){}function b(){}function w(){}var _={};h(_,u,(function(){return this}));var k=Object.getPrototypeOf,S=k&&k(k(D([])));S&&S!==n&&r.call(S,u)&&(_=S);var O=w.prototype=A.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(o,a,s,u){var l=d(t[o],t,a);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==i(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,u)}))}u(l.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function x(e,n,r){var o=p;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=P(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var l=d(e,n,r);if("normal"===l.type){if(o=r.done?m:y,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function P(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=d(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return b.prototype=w,o(O,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=h(w,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,h(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},E(L.prototype),h(L.prototype,l,(function(){return this})),e.AsyncIterator=L,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new L(f(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(O),h(O,c,"Generator"),h(O,u,(function(){return this})),h(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=D,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:D(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(t,e)||l(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=l(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}function d(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var p=function(){function t(e,n,r,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.leafIndex=e,this.chunkIndex=n,this.text=r,this.lineRects=o}return e=t,n=[{key:"fetch",value:(i=a().mark((function e(n,i){var l,c,h,f,d,p,y,g,m,v,A,b;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(l=window.br.plugins.translate)||void 0===l||!l.translationManager.active){e.next=12;break}return e.next=3,window.br.plugins.translate.getTranslateLayers(i);case 3:c=e.sent,h=Array.from(c[0].childNodes),f=[],d=u(h.entries());try{for(d.s();!(p=d.n()).done;)y=s(p.value,2),g=y[0],(m=y[1]).classList.contains("ocr-role-header-footer")||(v=new t(i,g,m.textContent,[]),f.push(v))}catch(t){d.e(t)}finally{d.f()}return 0===f.length&&(A=new t(i,0,"",[]),f.push(A)),e.abrupt("return",f);case 12:return e.next=14,o.ajax({type:"GET",url:(0,r.g)(n,{pageIndex:i}),cache:!0,xhrFields:{withCredentials:window.br.protected}});case 14:return b=e.sent,e.abrupt("return",t._fromTextWrapperResponse(i,b));case 16:case"end":return e.stop()}}),e)})),l=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=i.apply(t,e);function a(t){h(o,n,r,a,s,"next",t)}function s(t){h(o,n,r,a,s,"throw",t)}a(void 0)}))},function(t,e){return l.apply(this,arguments)})},{key:"_fromTextWrapperResponse",value:function(e,n){return n.map((function(n,r){var o=t._fixChunkRects(n.slice(1)),i=t._removeDanglingHyphens(n[0]);return new t(e,r,i,o)}))}},{key:"_fixChunkRects",value:function(t){if(t.length<2)return t;var e=s(t,2),n=e[0],r=e[1],o=s(n,3),i=o[0],a=o[1],u=o[2]-i,l=r[1]-r[3],c=r[2]-r[0],h=r[2];return u>30*c&&(n[2]=h,n[3]=a-l),t}},{key:"_removeDanglingHyphens",value:function(t){return t.replace(/[-¬]\s+/g,"")}}],n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,i,l}();function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function g(){g=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof A?e:A,a=Object.create(i.prototype),s=new I(r||[]);return o(a,"_invoke",{value:x(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function A(){}function b(){}function w(){}var _={};l(_,a,(function(){return this}));var k=Object.getPrototypeOf,S=k&&k(k(D([])));S&&S!==n&&r.call(S,a)&&(_=S);var O=w.prototype=A.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(o,i,a,s){var u=h(t[o],t,i);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==y(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(c).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function x(e,n,r){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=P(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=h(e,n,r);if("normal"===l.type){if(o=r.done?m:d,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function P(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(y(e)+" is not iterable")}return b.prototype=w,o(O,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},E(L.prototype),l(L.prototype,s,(function(){return this})),e.AsyncIterator=L,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new L(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(O),l(O,u,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=D,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:D(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function m(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function A(t){var e=function(t,e){if("object"!=y(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==y(e)?e:e+""}var b=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.pageCount=e,this.opts=Object.assign({},w,r),this._cursor={page:n,chunk:0},this._bufferedPages={},this._bufferingPages={},this._cursorLock=Promise.resolve()}return e=t,n=[{key:"next",value:function(){var t=this;return this._cursorLock=this._cursorLock.then((function(){return t._nextUncontrolled()}))}},{key:"decrement",value:function(){var t=this;return this._cursorLock=this._cursorLock.then((function(){return t._decrementUncontrolled()}))}},{key:"_nextUncontrolled",value:(r=g().mark((function e(){var n;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._cursor.page!=this.pageCount){e.next=2;break}return e.abrupt("return",Promise.resolve(t.AT_END));case 2:return this._recenterBuffer(this._cursor.page),e.next=5,this._fetchPageChunks(this._cursor.page);case 5:if(n=e.sent,this._cursor.chunk!=n.length){e.next=10;break}return this._cursor.page++,this._cursor.chunk=0,e.abrupt("return",this._nextUncontrolled());case 10:return e.abrupt("return",n[this._cursor.chunk++]);case 11:case"end":return e.stop()}}),e,this)})),o=function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(t){m(i,n,o,a,s,"next",t)}function s(t){m(i,n,o,a,s,"throw",t)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"_decrementUncontrolled",value:function(){var t=this,e=Promise.resolve();return this._cursor.chunk>0?this._cursor.chunk--:this._cursor.page>0&&(this._cursor.page--,e=this._fetchPageChunks(this._cursor.page).then((function(e){if(0==e.length)return t._decrementUncontrolled();t._cursor.chunk=e.length-1}))),e.then((function(){return t._fetchPageChunks(t._cursor.page)}))}},{key:"_recenterBuffer",value:function(t){for(var e=Math.max(0,t-this.opts.pageBufferSize),n=Math.min(this.pageCount,t+this.opts.pageBufferSize+1),r=e;r<n;r++)this._fetchPageChunks(r);this._removePageFromBuffer(e-1),this._removePageFromBuffer(n+1)}},{key:"_removePageFromBuffer",value:function(t){delete this._bufferingPages[t],delete this._bufferedPages[t]}},{key:"_fetchPageChunks",value:function(t){var e=this;return t in this._bufferingPages?this._bufferingPages[t]:t in this._bufferedPages?Promise.resolve(this._bufferedPages[t]):(this._bufferingPages[t]=this._fetchPageChunksDirect(t).then((function(n){return delete e._bufferingPages[t],e._bufferedPages[t]=n,n})),this._bufferingPages[t])}},{key:"_fetchPageChunksDirect",value:function(t){return p.fetch(this.opts.pageChunkUrl,t)}}],n&&v(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r,o}();b.AT_END="__PageChunkIterator.AT_END__";var w={pageChunkUrl:null,pageBufferSize:2},_=n(4160),k=n(1669);function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function E(){E=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),s=new I(r||[]);return o(a,"_invoke",{value:x(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",y="completed",g={};function m(){}function v(){}function A(){}var b={};l(b,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(D([])));_&&_!==n&&r.call(_,a)&&(b=_);var k=A.prototype=m.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(o,i,a,s){var u=h(t[o],t,i);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==S(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(c).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function x(e,n,r){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=P(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=h(e,n,r);if("normal"===l.type){if(o=r.done?y:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function P(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(S(e)+" is not iterable")}return v.prototype=A,o(k,"constructor",{value:A,configurable:!0}),o(A,"constructor",{value:v,configurable:!0}),v.displayName=l(A,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(L.prototype),l(L.prototype,s,(function(){return this})),e.AsyncIterator=L,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new L(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(k),l(k,u,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=D,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:D(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function L(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function x(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){L(i,r,o,a,s,"next",t)}function s(t){L(i,r,o,a,s,"throw",t)}a(void 0)}))}}function P(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,M(r.key),r)}}function M(t){var e=function(t,e){if("object"!=S(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==S(e)?e:e+""}var T=function(){function t(e){var n,r,o,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=function(){i.voice=t.getBestBookVoice(i.getVoices(),i.opts.bookLanguage)},(r=M(r="updateBestVoice"))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,this.playing=!1,this.paused=!1,this.opts=e,this._chunkIterator=null,this.activeSound=null,this.playbackRate=1,this.events=k({}),this.voice=null,this.events.on("voiceschanged",this.updateBestVoice),this.events.trigger("voiceschanged")}return e=t,n=[{key:"getVoices",value:function(){throw new Error("Unimplemented abstract class")}},{key:"init",value:function(){return null}},{key:"start",value:function(t,e){this.playing=!0,this.paused=!1,this.opts.onLoadingStart(),this._chunkIterator=new b(e,t,{pageChunkUrl:this.opts.pageChunkUrl,pageBufferSize:3}),this.step(),this.events.trigger("start")}},{key:"stop",value:function(){this.activeSound&&this.activeSound.stop(),this.playing=!1,this.paused=!0,this._chunkIterator=null,this.activeSound=null,this.events.trigger("stop")}},{key:"pause",value:function(){var t=!this.paused&&this.activeSound;this.paused=!0,this.activeSound&&this.activeSound.pause(),t&&this.events.trigger("pause")}},{key:"resume",value:function(){var t=this.paused&&this.activeSound;this.paused=!1,this.activeSound&&this.activeSound.resume(),t&&this.events.trigger("resume")}},{key:"togglePlayPause",value:function(){this.paused?this.resume():this.pause()}},{key:"jumpForward",value:function(){this.activeSound&&this.activeSound.finish()}},{key:"jumpBackward",value:(i=x(E().mark((function t(){var e=this;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([this.activeSound.stop(),this._chunkIterator.decrement().then((function(){return e._chunkIterator.decrement()}))]);case 2:this.step();case 3:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"setVoice",value:function(t){this.events.off("voiceschanged",this.updateBestVoice),this.voice=this.getVoices().find((function(e){return e.voiceURI===t})),this.opts.bookLanguage&&(0,_.ND)()&&localStorage.setItem("BRtts-voice-".concat(this.opts.bookLanguage),this.voice.voiceURI),this.activeSound&&this.activeSound.setVoice(this.voice)}},{key:"setPlaybackRate",value:function(t){this.playbackRate=t,this.activeSound&&this.activeSound.setPlaybackRate(t)}},{key:"step",value:(o=x(E().mark((function t(){var e,n,r,o=this;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._chunkIterator.next();case 2:if((e=t.sent)!=b.AT_END){t.next=7;break}return this.stop(),this.opts.onDone(),t.abrupt("return");case 7:return this.opts.onLoadingStart(),(n=this.createSound(e)).chunk=e,n.rate=this.playbackRate,n.voice=this.voice,n.load((function(){return o.opts.onLoadingComplete()})),this.opts.onLoadingComplete(),t.next=16,this.opts.beforeChunkPlay(e);case 16:if(this.playing){t.next=18;break}return t.abrupt("return");case 18:return t.next=20,this.playSound(n).then((function(){return o.opts.afterChunkPlay(n.chunk)}));case 20:return r=t.sent,this.paused&&this.pause(),t.next=24,r;case 24:if(!this.playing){t.next=26;break}return t.abrupt("return",this.step());case 26:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"createSound",value:function(t){throw new Error("Unimplemented abstract class")}},{key:"playSound",value:function(t){return this.activeSound=t,this.activeSound.loaded||this.opts.onLoadingStart(),this.activeSound.play()}},{key:"getBestVoice",value:function(e){return t.getBestBookVoice(this.getVoices(),e||this.opts.bookLanguage)}}],r=[{key:"isSupported",value:function(){throw new Error("Unimplemented abstract class")}},{key:"getBestBookVoice",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:navigator.languages,o=e.filter((function(t){return t.lang.startsWith(n)})),i=(r=r||(navigator.language?[navigator.language]:[])).filter((function(t){return t.startsWith(n)}));return t.getMatchingStoredVoice(o,n)||t.getMatchingVoice(i,o)||o.find((function(t){return t.default}))||o[0]||t.getMatchingVoice(r,e)||e.find((function(t){return t.default}))||e[0]}},{key:"getMatchingStoredVoice",value:function(t,e){var n=(0,_.ND)()&&localStorage.getItem("BRtts-voice-".concat(e));return n?t.find((function(t){return t.voiceURI===n})):void 0}},{key:"getMatchingVoice",value:function(t,e){var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return O(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(t);try{var o,i=function(){var t=n.value,r=e.filter((function(e){return e.lang.replace("_","-").startsWith(t)}));if(r.length)return{v:r.find((function(t){return t.default}))||r[0]}};for(r.s();!(n=r.n()).done;)if(o=i())return o.v}catch(t){r.e(t)}finally{r.f()}}}],n&&P(e.prototype,n),r&&P(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r,o,i}(),I=n(8004),D=(n(2443),n(1792),n(1669));function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function j(){j=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),s=new M(r||[]);return o(a,"_invoke",{value:E(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",y="completed",g={};function m(){}function v(){}function A(){}var b={};l(b,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==n&&r.call(_,a)&&(b=_);var k=A.prototype=m.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,s){var u=h(t[o],t,i);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==C(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(c).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=L(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=h(e,n,r);if("normal"===l.type){if(o=r.done?y:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function L(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(C(e)+" is not iterable")}return v.prototype=A,o(k,"constructor",{value:A,configurable:!0}),o(A,"constructor",{value:v,configurable:!0}),v.displayName=l(A,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(O.prototype),l(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(k),l(k,u,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function F(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function q(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){F(i,r,o,a,s,"next",t)}function s(t){F(i,r,o,a,s,"throw",t)}a(void 0)}))}}function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function V(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,H(r.key),r)}}function B(t,e,n){return e&&V(t.prototype,e),n&&V(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function H(t){var e=function(t,e){if("object"!=C(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==C(e)?e:e+""}function N(t,e,n){return e=Q(e),function(t,e){if(e&&("object"==C(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,U()?Reflect.construct(e,n||[],Q(t).constructor):e.apply(t,n))}function U(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(U=function(){return!!t})()}function G(){return G="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Q(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},G.apply(null,arguments)}function Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Q(t)}function K(t,e){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},K(t,e)}var W=function(t){function e(t){var n,r;return R(this,e),(r=N(this,e,[t])).audioFormat=null!==(n=D.browser)&&void 0!==n&&n.mozilla?"ogg":"mp3",r.festivalUrl=t.festivalUrl,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&K(t,e)}(e,t),B(e,[{key:"getVoices",value:function(){return[{default:!0,lang:"en-US",localService:!1,name:"Festival - English (US)",voiceURI:null}]}},{key:"init",value:function(){soundManager.setup({debugMode:!1,preferFlash:!0,url:"/bookreader/BookReader/soundmanager/swf",useHTML5Audio:!0,flashVersion:9})}},{key:"start",value:function(t,n){var r=this,o=null;navigator.userAgent.match(/mobile/i)&&(o=this.iOSCaptureUserIntentHack()),(o=o||Promise.resolve()).then((function(){return(o=e,i=r,"function"==typeof(a=G(Q(1&3?o.prototype:o),"start",i))?function(t){return a.apply(i,t)}:a)([t,n]);var o,i,a}))}},{key:"createSound",value:function(t){return new z((0,r.g)(this.festivalUrl,{text:t.text,format:this.audioFormat}))}},{key:"iOSCaptureUserIntentHack",value:(n=q(j().mark((function t(){var e;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=soundManager.createSound({url:J[this.audioFormat]}),t.next=3,new Promise((function(t){return e.play({onfinish:t})}));case 3:e.destruct();case 4:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],[{key:"isSupported",value:function(){return"undefined"!=typeof soundManager&&soundManager.supported()}}]);var n}(T),z=function(){return B((function t(e){R(this,t),this.soundUrl=e,this.sound=null,this.rate=1,this._finishResolver=null}),[{key:"loaded",get:function(){return this.sound&&this.sound.loaded}},{key:"load",value:function(t){var e,n=this;return this.sound=soundManager.createSound({url:this.soundUrl,onload:function(){1!=n.rate&&n.sound.setPlaybackRate(n.rate),t()},onresume:(e=q(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,I.sleep)(25);case 2:1!=n.rate&&n.sound.setPlaybackRate(n.rate);case 3:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})}),this.sound.load()}},{key:"play",value:(t=q(j().mark((function t(){var e=this;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t){e._finishResolver=t,e.sound.play({onfinish:t})}));case 2:this.sound.destruct();case 3:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"stop",value:function(){return this.sound.stop(),Promise.resolve()}},{key:"pause",value:function(){this.sound.pause()}},{key:"resume",value:function(){this.sound.resume()}},{key:"setPlaybackRate",value:function(t){this.rate=t,this.sound.setPlaybackRate(t)}},{key:"finish",value:function(){this.sound.stop(),this._finishResolver()}}]);var t}(),J={mp3:"data:audio/mp3;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAAAeTEFNRTMuOTlyBJwAAAAAAAAAADUgJAaUQQABrgAAAnHIf8sZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADwlwBKGAAACAAAD/AAAAEAAAAH///////////////+UBAMExBTUUzLjk5LjOqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xDEIAPAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==",ogg:"data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAVEgAAAAAAAADSDf4BHgF2b3JiaXMAAAAAAUSsAAAAAAAAAHcBAAAAAAC4AU9nZ1MAAAAAAAAAAAAAFRIAAAEAAAB4VKTpEDv//////////////////8kDdm9yYmlzKwAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMTIwMjAzIChPbW5pcHJlc2VudCkAAAAAAQV2b3JiaXMpQkNWAQAIAAAAMUwgxYDQkFUAABAAAGAkKQ6TZkkppZShKHmYlEhJKaWUxTCJmJSJxRhjjDHGGGOMMcYYY4wgNGQVAAAEAIAoCY6j5klqzjlnGCeOcqA5aU44pyAHilHgOQnC9SZjbqa0pmtuziklCA1ZBQAAAgBASCGFFFJIIYUUYoghhhhiiCGHHHLIIaeccgoqqKCCCjLIIINMMumkk0466aijjjrqKLTQQgsttNJKTDHVVmOuvQZdfHPOOeecc84555xzzglCQ1YBACAAAARCBhlkEEIIIYUUUogppphyCjLIgNCQVQAAIACAAAAAAEeRFEmxFMuxHM3RJE/yLFETNdEzRVNUTVVVVVV1XVd2Zdd2ddd2fVmYhVu4fVm4hVvYhV33hWEYhmEYhmEYhmH4fd/3fd/3fSA0ZBUAIAEAoCM5luMpoiIaouI5ogOEhqwCAGQAAAQAIAmSIimSo0mmZmquaZu2aKu2bcuyLMuyDISGrAIAAAEABAAAAAAAoGmapmmapmmapmmapmmapmmapmmaZlmWZVmWZVmWZVmWZVmWZVmWZVmWZVmWZVmWZVmWZVmWZVmWZVlAaMgqAEACAEDHcRzHcSRFUiTHciwHCA1ZBQDIAAAIAEBSLMVyNEdzNMdzPMdzPEd0RMmUTM30TA8IDVkFAAACAAgAAAAAAEAxHMVxHMnRJE9SLdNyNVdzPddzTdd1XVdVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVgdCQVQAABAAAIZ1mlmqACDOQYSA0ZBUAgAAAABihCEMMCA1ZBQAABAAAiKHkIJrQmvPNOQ6a5aCpFJvTwYlUmye5qZibc84555xszhnjnHPOKcqZxaCZ0JpzzkkMmqWgmdCac855EpsHranSmnPOGeecDsYZYZxzzmnSmgep2Vibc85Z0JrmqLkUm3POiZSbJ7W5VJtzzjnnnHPOOeecc86pXpzOwTnhnHPOidqba7kJXZxzzvlknO7NCeGcc84555xzzjnnnHPOCUJDVgEAQAAABGHYGMadgiB9jgZiFCGmIZMedI8Ok6AxyCmkHo2ORkqpg1BSGSeldILQkFUAACAAAIQQUkghhRRSSCGFFFJIIYYYYoghp5xyCiqopJKKKsoos8wyyyyzzDLLrMPOOuuwwxBDDDG00kosNdVWY4215p5zrjlIa6W11lorpZRSSimlIDRkFQAAAgBAIGSQQQYZhRRSSCGGmHLKKaegggoIDVkFAAACAAgAAADwJM8RHdERHdERHdERHdERHc/xHFESJVESJdEyLVMzPVVUVVd2bVmXddu3hV3Ydd/Xfd/XjV8XhmVZlmVZlmVZlmVZlmVZlmUJQkNWAQAgAAAAQgghhBRSSCGFlGKMMcecg05CCYHQkFUAACAAgAAAAABHcRTHkRzJkSRLsiRN0izN8jRP8zTRE0VRNE1TFV3RFXXTFmVTNl3TNWXTVWXVdmXZtmVbt31Ztn3f933f933f933f933f13UgNGQVACABAKAjOZIiKZIiOY7jSJIEhIasAgBkAAAEAKAojuI4jiNJkiRZkiZ5lmeJmqmZnumpogqEhqwCAAABAAQAAAAAAKBoiqeYiqeIiueIjiiJlmmJmqq5omzKruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6QGjIKgBAAgBAR3IkR3IkRVIkRXIkBwgNWQUAyAAACADAMRxDUiTHsixN8zRP8zTREz3RMz1VdEUXCA1ZBQAAAgAIAAAAAADAkAxLsRzN0SRRUi3VUjXVUi1VVD1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXVNE3TNIHQkJUAABkAACNBBhmEEIpykEJuPVgIMeYkBaE5BqHEGISnEDMMOQ0idJBBJz24kjnDDPPgUigVREyDjSU3jiANwqZcSeU4CEJDVgQAUQAAgDHIMcQYcs5JyaBEzjEJnZTIOSelk9JJKS2WGDMpJaYSY+Oco9JJyaSUGEuKnaQSY4mtAACAAAcAgAALodCQFQFAFAAAYgxSCimFlFLOKeaQUsox5RxSSjmnnFPOOQgdhMoxBp2DECmlHFPOKccchMxB5ZyD0EEoAAAgwAEAIMBCKDRkRQAQJwDgcCTPkzRLFCVLE0XPFGXXE03XlTTNNDVRVFXLE1XVVFXbFk1VtiVNE01N9FRVE0VVFVXTlk1VtW3PNGXZVFXdFlXVtmXbFn5XlnXfM01ZFlXV1k1VtXXXln1f1m1dmDTNNDVRVFVNFFXVVFXbNlXXtjVRdFVRVWVZVFVZdmVZ91VX1n1LFFXVU03ZFVVVtlXZ9W1Vln3hdFVdV2XZ91VZFn5b14Xh9n3hGFXV1k3X1XVVln1h1mVht3XfKGmaaWqiqKqaKKqqqaq2baqurVui6KqiqsqyZ6qurMqyr6uubOuaKKquqKqyLKqqLKuyrPuqLOu2qKq6rcqysJuuq+u27wvDLOu6cKqurquy7PuqLOu6revGceu6MHymKcumq+q6qbq6buu6ccy2bRyjquq+KsvCsMqy7+u6L7R1IVFVdd2UXeNXZVn3bV93nlv3hbJtO7+t+8px67rS+DnPbxy5tm0cs24bv637xvMrP2E4jqVnmrZtqqqtm6qr67JuK8Os60JRVX1dlWXfN11ZF27fN45b142iquq6Ksu+sMqyMdzGbxy7MBxd2zaOW9edsq0LfWPI9wnPa9vGcfs64/Z1o68MCcePAACAAQcAgAATykChISsCgDgBAAYh5xRTECrFIHQQUuogpFQxBiFzTkrFHJRQSmohlNQqxiBUjknInJMSSmgplNJSB6GlUEproZTWUmuxptRi7SCkFkppLZTSWmqpxtRajBFjEDLnpGTOSQmltBZKaS1zTkrnoKQOQkqlpBRLSi1WzEnJoKPSQUippBJTSam1UEprpaQWS0oxthRbbjHWHEppLaQSW0kpxhRTbS3GmiPGIGTOScmckxJKaS2U0lrlmJQOQkqZg5JKSq2VklLMnJPSQUipg45KSSm2kkpMoZTWSkqxhVJabDHWnFJsNZTSWkkpxpJKbC3GWltMtXUQWgultBZKaa21VmtqrcZQSmslpRhLSrG1FmtuMeYaSmmtpBJbSanFFluOLcaaU2s1ptZqbjHmGlttPdaac0qt1tRSjS3GmmNtvdWae+8gpBZKaS2U0mJqLcbWYq2hlNZKKrGVklpsMebaWow5lNJiSanFklKMLcaaW2y5ppZqbDHmmlKLtebac2w19tRarC3GmlNLtdZac4+59VYAAMCAAwBAgAlloNCQlQBAFAAAQYhSzklpEHLMOSoJQsw5J6lyTEIpKVXMQQgltc45KSnF1jkIJaUWSyotxVZrKSm1FmstAACgwAEAIMAGTYnFAQoNWQkARAEAIMYgxBiEBhmlGIPQGKQUYxAipRhzTkqlFGPOSckYcw5CKhljzkEoKYRQSiophRBKSSWlAgAAChwAAAJs0JRYHKDQkBUBQBQAAGAMYgwxhiB0VDIqEYRMSiepgRBaC6111lJrpcXMWmqttNhACK2F1jJLJcbUWmatxJhaKwAA7MABAOzAQig0ZCUAkAcAQBijFGPOOWcQYsw56Bw0CDHmHIQOKsacgw5CCBVjzkEIIYTMOQghhBBC5hyEEEIIoYMQQgillNJBCCGEUkrpIIQQQimldBBCCKGUUgoAACpwAAAIsFFkc4KRoEJDVgIAeQAAgDFKOQehlEYpxiCUklKjFGMQSkmpcgxCKSnFVjkHoZSUWuwglNJabDV2EEppLcZaQ0qtxVhrriGl1mKsNdfUWoy15pprSi3GWmvNuQAA3AUHALADG0U2JxgJKjRkJQCQBwCAIKQUY4wxhhRiijHnnEMIKcWYc84pphhzzjnnlGKMOeecc4wx55xzzjnGmHPOOeccc84555xzjjnnnHPOOeecc84555xzzjnnnHPOCQAAKnAAAAiwUWRzgpGgQkNWAgCpAAAAEVZijDHGGBsIMcYYY4wxRhJijDHGGGNsMcYYY4wxxphijDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYW2uttdZaa6211lprrbXWWmutAEC/CgcA/wcbVkc4KRoLLDRkJQAQDgAAGMOYc445Bh2EhinopIQOQgihQ0o5KCWEUEopKXNOSkqlpJRaSplzUlIqJaWWUuogpNRaSi211loHJaXWUmqttdY6CKW01FprrbXYQUgppdZaiy3GUEpKrbXYYow1hlJSaq3F2GKsMaTSUmwtxhhjrKGU1lprMcYYay0ptdZijLXGWmtJqbXWYos11loLAOBucACASLBxhpWks8LR4EJDVgIAIQEABEKMOeeccxBCCCFSijHnoIMQQgghREox5hx0EEIIIYSMMeeggxBCCCGEkDHmHHQQQgghhBA65xyEEEIIoYRSSuccdBBCCCGUUELpIIQQQgihhFJKKR2EEEIooYRSSiklhBBCCaWUUkoppYQQQgihhBJKKaWUEEIIpZRSSimllBJCCCGUUkoppZRSQgihlFBKKaWUUkoIIYRSSimllFJKCSGEUEoppZRSSikhhBJKKaWUUkoppQAAgAMHAIAAI+gko8oibDThwgNQaMhKAIAMAABx2GrrKdbIIMWchJZLhJByEGIuEVKKOUexZUgZxRjVlDGlFFNSa+icYoxRT51jSjHDrJRWSiiRgtJyrLV2zAEAACAIADAQITOBQAEUGMgAgAOEBCkAoLDA0DFcBATkEjIKDArHhHPSaQMAEITIDJGIWAwSE6qBomI6AFhcYMgHgAyNjbSLC+gywAVd3HUghCAEIYjFARSQgIMTbnjiDU+4wQk6RaUOAgAAAAAAAQAeAACSDSAiIpo5jg6PD5AQkRGSEpMTlAAAAAAA4AGADwCAJAWIiIhmjqPD4wMkRGSEpMTkBCUAAAAAAAAAAAAICAgAAAAAAAQAAAAICE9nZ1MABCwAAAAAAAAAFRIAAAIAAAAPBTD1AgEBAAo="},Y=n(7583);function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}function X(){X=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),s=new M(r||[]);return o(a,"_invoke",{value:E(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",y="completed",g={};function m(){}function v(){}function A(){}var b={};l(b,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==n&&r.call(_,a)&&(b=_);var k=A.prototype=m.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,s){var u=h(t[o],t,i);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==Z(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(c).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=L(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=h(e,n,r);if("normal"===l.type){if(o=r.done?y:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function L(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Z(e)+" is not iterable")}return v.prototype=A,o(k,"constructor",{value:A,configurable:!0}),o(A,"constructor",{value:v,configurable:!0}),v.displayName=l(A,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(O.prototype),l(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(k),l(k,u,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function $(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function tt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){$(i,r,o,a,s,"next",t)}function s(t){$(i,r,o,a,s,"throw",t)}a(void 0)}))}}function et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ot(r.key),r)}}function rt(t,e,n){return e&&nt(t.prototype,e),n&&nt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ot(t){var e=function(t,e){if("object"!=Z(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=Z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Z(e)?e:e+""}function it(t,e,n){return e=ut(e),function(t,e){if(e&&("object"==Z(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,at()?Reflect.construct(e,n||[],ut(t).constructor):e.apply(t,n))}function at(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(at=function(){return!!t})()}function st(){return st="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ut(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},st.apply(null,arguments)}function ut(t){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ut(t)}function lt(t,e){return lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lt(t,e)}var ct=function(t){function e(t){var n;return et(this,e),n=it(this,e,[t]),speechSynthesis.addEventListener&&speechSynthesis.addEventListener("voiceschanged",(function(){return n.events.trigger("voiceschanged")})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&<(t,e)}(e,t),rt(e,[{key:"start",value:function(t,n){var r,o,i,a=this;if("mediaSession"in navigator){var s=new Audio(br.options.imagesBaseURL+"../silence.mp3");s.loop=!0,this.events.on("pause",(function(){return s.pause()})),this.events.on("resume",(function(){return s.play()})),this.events.on("stop",(function(){return s.src=""})),s.play().then((function(){navigator.mediaSession.metadata=new MediaMetadata({title:br.bookTitle,artist:br.options.metadata.filter((function(t){return"Author"==t.label})).map((function(t){return t.value}))[0],artwork:[{src:br.options.thumbnail,type:"image/jpg"}]}),navigator.mediaSession.setPositionState({duration:1/0}),navigator.mediaSession.setActionHandler("play",(function(){s.play(),a.resume()})),navigator.mediaSession.setActionHandler("pause",(function(){s.pause(),a.pause()})),navigator.mediaSession.setActionHandler("previoustrack",(function(){return a.jumpBackward()})),navigator.mediaSession.setActionHandler("nexttrack",(function(){return a.jumpForward()}))}))}return(r=e,o=this,"function"==typeof(i=st(ut(1&3?r.prototype:r),"start",o))?function(t){return i.apply(o,t)}:i)([t,n])}},{key:"getVoices",value:function(){var t=speechSynthesis.getVoices();return 1!=t.filter((function(t){return t.default})).length&&t.unshift({voiceURI:"bookreader.SystemDefault",name:"System Default",lang:navigator.language,default:!0,localService:!0}),t}},{key:"createSound",value:function(t){return new ht(t.text)}}],[{key:"isSupported",value:function(){return void 0!==window.speechSynthesis}}])}(T),ht=function(){return rt((function t(e){et(this,t),this.text=e,this.loaded=!1,this.paused=!1,this.started=!1,this.stopped=!1,this.rate=1,this.utterance=null,this.voice=null,this._lastEvents={pause:null,boundary:null,start:null},this._charIndex=0,this._finishResolver=null,this._finishPromise=null}),[{key:"load",value:function(t){var e,n=this;this.loaded=!1,this.started=!1,this.utterance=new SpeechSynthesisUtterance(this.text.slice(this._charIndex)),"bookreader.SystemDefault"!==(null===(e=this.voice)||void 0===e?void 0:e.voiceURI)&&(this.utterance.voice=this.voice),this.voice&&(this.utterance.lang=this.voice.lang),this.utterance.rate=this.rate,_.$x&&(this.utterance.addEventListener("pause",(function(){return console.log("pause")})),this.utterance.addEventListener("resume",(function(){return console.log("resume")})),this.utterance.addEventListener("start",(function(){return console.log("start")})),this.utterance.addEventListener("end",(function(){return console.log("end")})),this.utterance.addEventListener("error",(function(t){return console.log("error",t)})),this.utterance.addEventListener("boundary",(function(){return console.log("boundary")})),this.utterance.addEventListener("mark",(function(){return console.log("mark")})),this.utterance.addEventListener("finish",(function(){return console.log("finish")}))),this.utterance.addEventListener("start",(function(t){return n._lastEvents.start=t})),this.utterance.addEventListener("boundary",(function(t){return n._lastEvents.boundary=t})),this.utterance.addEventListener("pause",(function(t){return n._lastEvents.pause=t})),this.utterance.addEventListener("start",(function(){n.started=!0,n.stopped=!1,n.paused=!1})),this.utterance.addEventListener("pause",(function(){return n.paused=!0})),this.utterance.addEventListener("resume",(function(){return n.paused=!1})),this.utterance.addEventListener("end",(function(t){n.paused||n.stopped||n.utterance.dispatchEvent(new CustomEvent("finish",t))})),this.loaded=!0,t&&t()}},{key:"reload",value:(o=tt(X().mark((function t(){var e,n;return X().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.paused,(n=this._lastEvents.boundary||this._lastEvents.pause)&&(this._charIndex=this.text.indexOf(n.target.text)+n.charIndex),t.next=5,this.stop();case 5:this.load(),e||this.play();case 7:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"play",value:function(){var t=this;this._finishPromise=this._finishPromise||new Promise((function(e){return t._finishResolver=e})),this.utterance.addEventListener("finish",this._finishResolver),speechSynthesis.cancel(),speechSynthesis.resume(),speechSynthesis.speak(this.utterance);var e=this.utterance.voice&&this.utterance.voice.localService;return(0,Y.H8)()&&!e&&this._chromePausingBugFix(),this._finishPromise}},{key:"stop",value:function(){var t=Promise.resolve();return this.stopped||(t=Promise.race([(0,I.promisifyEvent)(this.utterance,"end"),(0,I.promisifyEvent)(this.utterance,"error")])),this.stopped=!0,speechSynthesis.cancel(),t}},{key:"finish",value:(r=tt(X().mark((function t(){return X().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:this.utterance.dispatchEvent(new Event("finish"));case 3:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"pause",value:(n=tt(X().mark((function t(){var e,n;return X().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.paused){t.next=2;break}return t.abrupt("return");case 2:return e=(0,I.promisifyEvent)(this.utterance,"pause"),speechSynthesis.pause(),n=(0,Y.gm)()&&(0,_.m0)(),t.next=7,Promise.race([e,(0,I.sleep)(100).then((function(){return"timeout"}))]);case 7:if("timeout"==t.sent){t.next=10;break}return t.abrupt("return");case 10:_.$x&&console.log("TTS: Firing pause event manually"),this.utterance.dispatchEvent(new CustomEvent("pause",this._lastEvents.start)),n&&this.stop();case 13:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"resume",value:(e=tt(X().mark((function t(){var e,n;return X().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.started&&!this.stopped){t.next=3;break}return this.play(),t.abrupt("return");case 3:if(this.paused){t.next=5;break}return t.abrupt("return");case 5:return e=(0,Y.H8)()&&(0,_.m0)()||(0,Y.gm)()&&(0,_.m0)(),n=(0,I.promisifyEvent)(this.utterance,"resume"),speechSynthesis.resume(),t.next=10,Promise.race([n,(0,I.sleep)(100).then((function(){return"timeout"}))]);case 10:if("timeout"==t.sent){t.next=13;break}return t.abrupt("return");case 13:if(_.$x&&console.log("TTS: Firing resume event manually"),this.utterance.dispatchEvent(new CustomEvent("resume",{})),!e){t.next=19;break}return t.next=18,this.reload();case 18:this.play();case 19:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"setPlaybackRate",value:function(t){this.rate=t,this.reload()}},{key:"setVoice",value:function(t){this.voice=t,this.reload()}},{key:"_chromePausingBugFix",value:(t=tt(X().mark((function t(){var e;return X().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return _.$x&&console.log("CHROME-PAUSE-HACK: starting"),t.next=3,Promise.race([(0,I.sleep)(14e3).then((function(){return"timeout"})),(0,I.promisifyEvent)(this.utterance,"pause").then((function(){return"pause"})),(0,I.promisifyEvent)(this.utterance,"end").then((function(){return"end"})),(0,I.promisifyEvent)(this.utterance,"error").then((function(){return"error"}))]);case 3:if(e=t.sent,_.$x&&console.log("CHROME-PAUSE-HACK: ".concat(e)),"end"!=e&&"error"!=e){t.next=9;break}_.$x&&console.log("CHROME-PAUSE-HACK: stopped (end/error)"),t.next=22;break;case 9:if("pause"!=e){t.next=16;break}return t.next=12,Promise.race([(0,I.promisifyEvent)(this.utterance,"resume").then((function(){return"resume"})),(0,I.sleep)(14e3).then((function(){return"timeout"}))]);case 12:"timeout"==t.sent?(_.$x&&console.log("CHROME-PAUSE-HACK: stopped (timed out while paused)"),this.stop()):this._chromePausingBugFix(),t.next=22;break;case 16:if("timeout"!=e){t.next=22;break}return speechSynthesis.pause(),t.next=20,(0,I.sleep)(25);case 20:speechSynthesis.resume(),this._chromePausingBugFix();case 22:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}]);var t,e,n,r,o}(),ft="Read this book aloud",dt=n(4907),pt=n(1041),yt=n(1669);function gt(t){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function mt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return vt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function At(){At=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),s=new M(r||[]);return o(a,"_invoke",{value:E(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",y="completed",g={};function m(){}function v(){}function A(){}var b={};l(b,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==n&&r.call(_,a)&&(b=_);var k=A.prototype=m.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,s){var u=h(t[o],t,i);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==gt(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(c).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,n,r){var o=f;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var u=L(s,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var l=h(e,n,r);if("normal"===l.type){if(o=r.done?y:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function L(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(gt(e)+" is not iterable")}return v.prototype=A,o(k,"constructor",{value:A,configurable:!0}),o(A,"constructor",{value:v,configurable:!0}),v.displayName=l(A,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(O.prototype),l(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(k),l(k,u,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function bt(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function wt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){bt(i,r,o,a,s,"next",t)}function s(t){bt(i,r,o,a,s,"throw",t)}a(void 0)}))}}function _t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function kt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mt(r.key),r)}}function St(t,e,n){return e=Lt(e),function(t,e){if(e&&("object"==gt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ot()?Reflect.construct(e,n||[],Lt(t).constructor):e.apply(t,n))}function Ot(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ot=function(){return!!t})()}function Et(){return Et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Lt(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Et.apply(null,arguments)}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lt(t)}function xt(t,e){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xt(t,e)}function Pt(t,e,n){return(e=Mt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mt(t){var e=function(t,e){if("object"!=gt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=gt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gt(e)?e:e+""}var Tt=window.BookReader,It=function(t){function e(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Pt(t=St(this,e,[].concat(r)),"options",{enabled:!0,pageChunkUrl:"https://{{server}}/BookReader/BookReaderGetTextWrapper.php?path={{bookPath|urlencode}}_djvu.xml&page={{pageIndex}}&callback=false",remoteTtsUrl:"https://{{server}}/BookReader/BookReaderGetTTS.php?string={{text|urlencode}}&format={{format}}"}),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xt(t,e)}(e,t),n=e,o=[{key:"setup",value:function(t){var n,o,i;if((n=e,o=this,"function"==typeof(i=Et(Lt(1&3?n.prototype:n),"setup",o))?function(t){return i.apply(o,t)}:i)([Object.assign({server:this.br.options.server,bookPath:this.br.options.bookPath},t)]),this.options.enabled){this._ttsBoxesByIndex={};var a=ct.isSupported()?ct:W.isSupported()?W:null;if(/_forceTTSEngine=(festival|web)/.test(location.toString())){var s=location.toString().match(/_forceTTSEngine=(festival|web)/)[1];a={festival:W,web:ct}[s]}a&&(this.ttsEngine=new a(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_t(Object(n),!0).forEach((function(e){Pt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({pageChunkUrl:(0,r.g)(this.options.pageChunkUrl,this.br.options.vars),bookLanguage:(0,_.YH)(this.br.options.bookLanguage),onLoadingStart:this.br.showProgressPopup.bind(this.br,"Loading audio..."),onLoadingComplete:this.br.removeProgressPopup.bind(this.br),onDone:this.stop.bind(this),beforeChunkPlay:this.beforeChunkPlay.bind(this),afterChunkPlay:this.sendChunkFinishedAnalyticsEvent.bind(this)},a===W?{festivalUrl:(0,r.g)(this.options.remoteTtsUrl,this.br.options.vars)}:{})))}}},{key:"init",value:function(){var t=this;this.options.enabled&&this.br.bind(Tt.eventNames.PostInit,(function(){t.br.$(".BRicon.read").click((function(){return t.toggle(),!1})),t.ttsEngine&&(t.ttsEngine.init(),/[?&]_autoReadAloud=show/.test(location.toString())&&t.start(!1))}))}},{key:"_configurePageContainer",value:function(t){if(this.options.enabled&&t.page&&t.page.index in this._ttsBoxesByIndex){var e=t.page.index;(0,dt.KL)("ttsHiliteLayer",this._ttsBoxesByIndex[e],t.page,t.$container[0])}}},{key:"extendNavBar",value:function(t){var e=this;if(this.options.enabled&&this.ttsEngine){this.br.refs.$BRReadAloudToolbar=yt('\n <ul class="read-aloud">\n <li>\n <select class="playback-speed" name="playback-speed" title="'.concat("Playback speed",'">\n <option value="0.25">0.25x</option>\n <option value="0.5">0.5x</option>\n <option value="0.75">0.75x</option>\n <option value="1.0" selected>1.0x</option>\n <option value="1.25">1.25x</option>\n <option value="1.5">1.5x</option>\n <option value="1.75">1.75x</option>\n <option value="2">2x</option>\n </select>\n </li>\n <li>\n <button type="button" name="review" title="').concat("Review 10 seconds",'">\n <div class="icon icon-review"></div>\n </button>\n </li>\n <li>\n <button type="button" name="play" title="').concat("Play",'">\n <div class="icon icon-play"></div>\n <div class="icon icon-pause"></div>\n </button>\n </li>\n <li>\n <button type="button" name="advance" title="').concat("Advance 10 seconds",'">\n <div class="icon icon-advance"></div>\n </button>\n </li>\n <li>\n <select class="playback-voices" name="playback-voice" style="display: none" title="Change read aloud voices">\n </select>\n </li>\n </ul>\n ')),t.find(".BRcontrols").prepend(this.br.refs.$BRReadAloudToolbar);var n=function(t){return t.map((function(t){return'<option value="'.concat(t.voiceURI,'">').concat(t.lang," - ").concat(t.name,"</option>")})).join("")},r=function(t,e){return"".concat(t.lang," - ").concat(t.name).localeCompare("".concat(e.lang," - ").concat(e.name))},o=function(t){var o;t.empty();var i=e.ttsEngine.opts.bookLanguage;null!==(o=e.br.plugins.translate)&&void 0!==o&&null!==(o=o.translationManager)&&void 0!==o&&o.active&&(i=e.br.plugins.translate.langFromCode);var a=e.ttsEngine.getVoices().filter((function(t){return t.lang.startsWith(i)})).sort(r),s=e.ttsEngine.getVoices().filter((function(t){return!t.lang.startsWith(i)})).sort(r);if(e.ttsEngine.getVoices().length>1){var u;if(null!==(u=e.br.plugins.translate)&&void 0!==u&&null!==(u=u.translationManager)&&void 0!==u&&u.active){var l=e.br.plugins.translate.langToCode,c=e.ttsEngine.getVoices().filter((function(t){return t.lang.startsWith(l)})).sort(r);t.append(yt('<optgroup label="Book Language, Translated From ('.concat(i,')"> ').concat(n(a)," </optgroup>"))),t.append(yt('<optgroup label="Book Language, Translated To ('.concat(l,')"> ').concat(n(c)," </optgroup>"))),t.append(yt('<optgroup label="Other Languages"> '.concat(n(s.filter((function(t){return!t.lang.startsWith(l)})).sort(r)))))}else t.append(yt('<optgroup label="Book Language ('.concat(i,')"> ').concat(n(a)," </optgroup>"))),t.append(yt('<optgroup label="Other Languages"> '.concat(n(s)," </optgroup>")));t.val(e.ttsEngine.voice.voiceURI),t.show()}else t.hide()},i=this.br.refs.$BRReadAloudToolbar.find("[name=playback-voice]");o(i),i.on("change",(function(t){return e.ttsEngine.setVoice(i.val())})),this.ttsEngine.events.on("pause resume start",(function(){return e.updateState()})),this.ttsEngine.events.on("voiceschanged",(function(){return o(i)})),this.br.on("translationEnabled",(function(){return o(i)})),this.br.on("translationDisabled",(function(){return o(i)})),this.br.refs.$BRReadAloudToolbar.find("[name=play]").on("click",this.playPause.bind(this)),this.br.refs.$BRReadAloudToolbar.find("[name=advance]").on("click",this.jumpForward.bind(this)),this.br.refs.$BRReadAloudToolbar.find("[name=review]").on("click",this.jumpBackward.bind(this));var a=this.br.refs.$BRReadAloudToolbar.find('select[name="playback-speed"]');a.on("change",(function(t){return e.ttsEngine.setPlaybackRate(parseFloat(a.val()))})),yt('<li>\n <button class="BRicon read js-tooltip" title="'.concat(ft,'">\n <div class="icon icon-read-aloud"></div>\n <span class="BRtooltip">').concat(ft,"</span>\n </button>\n </li>")).insertBefore(t.find(".BRcontrols .BRicon.zoom_out").closest("li"))}}},{key:"toggle",value:function(){var t;null===(t=this.br.plugins.autoplay)||void 0===t||t.stop(),this.ttsEngine.playing?this.stop():this.start()}},{key:"start",value:function(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=null!==(t=this.br.plugins.translate)&&void 0!==t&&null!==(t=t.translationManager)&&void 0!==t&&t.active?(0,_.YH)(this.br.plugins.translate.langToCode):"",r=this.ttsEngine.getBestVoice(n),o=this.br.refs.$BRReadAloudToolbar.find("[name=playback-voice");this.ttsEngine.setVoice(r.voiceURI),o.val(r.voiceURI),this.br.constModeThumb==this.br.mode&&this.br.switchMode(this.br.constMode1up),this.br.refs.$BRReadAloudToolbar.addClass("visible"),this.br.$(".BRicon.read").addClass("unread active"),this.sendAnalyticsEvent("Start"),e&&this.ttsEngine.start(this.br.currentIndex(),this.br.book.getNumLeafs())}},{key:"jumpForward",value:function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpForward()}},{key:"jumpBackward",value:function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpBackward()}},{key:"updateState",value:function(){var t=!(this.ttsEngine.paused||!this.ttsEngine.playing);this.br.$(".read-aloud [name=play]").toggleClass("playing",t)}},{key:"playPause",value:function(){this.ttsEngine.playing?(this.ttsEngine.togglePlayPause(),this.updateState()):this.toggle()}},{key:"stop",value:function(){this.br.refs.$BRReadAloudToolbar.removeClass("visible"),this.br.$(".BRicon.read").removeClass("unread active"),this.sendAnalyticsEvent("Stop"),this.ttsEngine.stop(),this.removeHilites(),this.br.removeProgressPopup()}},{key:"beforeChunkPlay",value:(a=wt(At().mark((function t(e){return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.maybeFlipToIndex(e.leafIndex);case 2:this.highlightChunk(e),this.scrollToChunk(e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"sendChunkFinishedAnalyticsEvent",value:function(t){this.sendAnalyticsEvent("ChunkFinished-Words",(0,_.EF)(t.text))}},{key:"maybeFlipToIndex",value:(i=wt(At().mark((function t(e){return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.br._isIndexDisplayed(e)||this.br.jumpToIndex(e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"highlightChunk",value:function(t){var e,n=this,r=t.leafIndex;if(this.removeHilites(),null!==(e=this.br.plugins.translate)&&void 0!==e&&e.translationManager.active){var o=this.br.getActivePageContainerElementsForIndex(r),i=t.chunkIndex;o.forEach((function(t){var e=t.querySelector(".BRtranslateLayer"),o=Array.from(e.childNodes)[i];if(o){var a=[o.offsetHeight,o.offsetTop,o.offsetWidth,o.offsetLeft],s=a[1],u=a[3],l={pageIndex:[{l:u,r:u+a[2],b:s+a[0],t:s}]};(0,dt.KL)("ttsHiliteLayer",l.pageIndex,n.br.book.getPage(r),e)}}))}else{this._ttsBoxesByIndex=Pt({},r,t.lineRects.map((function(t){var e=mt(t,4),n=e[0],r=e[1];return{l:n,r:e[2],b:r,t:e[3]}})));for(var a=function(){var t=mt(u[s],2),e=t[0],r=t[1],o=parseFloat(e),i=n.br.book.getPage(o);n.br.getActivePageContainerElementsForIndex(o).forEach((function(t){return(0,dt.KL)("ttsHiliteLayer",r,i,t)}))},s=0,u=Object.entries(this._ttsBoxesByIndex);s<u.length;s++)a()}}},{key:"scrollToChunk",value:function(t){var e;this.br.constModeThumb!=this.br.mode&&(null===(e=yt(".pagediv".concat(t.leafIndex," .ttsHiliteLayer rect")).last())||void 0===e||null===(e=e[0])||void 0===e||e.scrollIntoView({block:this.br.constMode1up==this.br.mode||this.br.isFullscreenActive?"center":"nearest",inline:"center",behavior:"smooth"}))}},{key:"removeHilites",value:function(){yt(this.br.getActivePageContainerElements()).find(".ttsHiliteLayer").remove(),this._ttsBoxesByIndex={}}},{key:"sendAnalyticsEvent",value:function(t,e){if(this.br.plugins.archiveAnalytics){var n={},r=this.ttsEngine.opts.bookLanguage;r&&(n.mediaLanguage=r),this.br.plugins.archiveAnalytics.sendEvent("BRReadAloud",t,e,n)}}}],o&&kt(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,i,a}(pt.S);null==Tt||Tt.registerPlugin("tts",It)},4160:function(t,e,n){"use strict";n.d(e,{$x:function(){return g},EF:function(){return c},ND:function(){return y},m0:function(){return h},YH:function(){return d}}),n(2675),n(9463),n(6412),n(2259),n(8125),n(8706),n(3418),n(3792),n(2062),n(4490),n(4782),n(2010),n(4731),n(479),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(1761),n(3500),n(2953);var r=[],o={},i={},a={};[["Serbian","српски језик","sr","srp","srp"],["Romanian, Moldavian, Moldovan","Română","ro","ron","rum"],["Sichuan Yi, Nuosu","ꆈꌠ꒿ Nuosuhxop","ii","iii","iii"],["Tahitian","Reo Tahiti","ty","tah","tah"],["Tagalog","Wikang Tagalog","tl","tgl","tgl"],["Yiddish","ייִדיש","yi","yid","yid"],["Akan","Akan","ak","aka","aka"],["Malay","Bahasa Melayu, بهاس ملايو","ms","msa","may"],["Arabic","العربية","ar","ara","ara"],["Norwegian","Norsk","no","nor","nor"],["Ojibwa","ᐊᓂᔑᓈᐯᒧᐎᓐ","oj","oji","oji"],["Fulah","Fulfulde, Pulaar, Pular","ff","ful","ful"],["Persian","فارسی","fa","fas","per"],["Albanian","Shqip","sq","sqi","alb"],["Aymara","aymar aru","ay","aym","aym"],["Azerbaijani","azərbaycan dili","az","aze","aze"],["Chinese","中文 (Zhōngwén), 汉语, 漢語","zh","zho","chi"],["Cree","ᓀᐦᐃᔭᐍᐏᐣ","cr","cre","cre"],["Estonian","eesti, eesti keel","et","est","est"],["Guaraní","Avañe'ẽ","gn","grn","grn"],["Inupiaq","Iñupiaq, Iñupiatun","ik","ipk","ipk"],["Inuktitut","ᐃᓄᒃᑎᑐᑦ","iu","iku","iku"],["Kanuri","Kanuri","kr","kau","kau"],["Komi","коми кыв","kv","kom","kom"],["Kongo","Kikongo","kg","kon","kon"],["Kurdish","Kurdî, أۇزبېك","ku","kur","kur"],["Latvian","latviešu valoda","lv","lav","lav"],["Malagasy","fiteny malagasy","mg","mlg","mlg"],["Mongolian","Монгол хэл","mn","mon","mon"],["Oromo","Afaan Oromoo","om","orm","orm"],["Pashto, Pushto","پښتو","ps","pus","pus"],["Quechua","Runa Simi, Kichwa","qu","que","que"],["Sardinian","sardu","sc","srd","srd"],["Swahili","Kiswahili","sw","swa","swa"],["Uzbek","Oʻzbek, Ўзбек, ","uz","uzb","uzb"],["Zhuang, Chuang","Saɯ cueŋƅ, Saw cuengh","za","zha","zha"],["Bislama","Bislama","bi","bis","bis"],["Norwegian Bokmål","Norsk Bokmål","nb","nob","nob"],["Norwegian Nynorsk","Norsk Nynorsk","nn","nno","nno"],["Indonesian","Bahasa Indonesia","id","ind","ind"],["Twi","Twi","tw","twi","twi"],["Esperanto","Esperanto","eo","epo","epo"],["Interlingua","Interlingua","ia","ina","ina"],["Interlingue","Originally called Occidental; then Interlingue after WWII","ie","ile","ile"],["Ido","Ido","io","ido","ido"],["Volapük","Volapük","vo","vol","vol"],["Bihari languages","भोजपुरी","bh","bih","bih"],["Hebrew (modern)","עברית","he","heb","heb"],["Sanskrit","संस्कृतम्","sa","san","san"],["Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian","ѩзыкъ словѣньскъ","cu","chu","chu"],["Pali","पाऴि","pi","pli","pli"],["Avestan","avesta","ae","ave","ave"],["Latin","latine, lingua latina","la","lat","lat"],["Armenian","Հայերեն","hy","hye","arm"],["Swati","SiSwati","ss","ssw","ssw"],["Tibetan","བོད་ཡིག","bo","bod","tib"],["South Ndebele","isiNdebele","nr","nbl","nbl"],["Slovene","Slovenski Jezik, Slovenščina","sl","slv","slv"],["Oriya","ଓଡ଼ିଆ","or","ori","ori"],["North Ndebele","isiNdebele","nd","nde","nde"],["Nauru","Dorerin Naoero","na","nau","nau"],["Maori","te reo Māori","mi","mri","mao"],["Marathi","मराठी","mr","mar","mar"],["Luba-Katanga","Kiluba","lu","lub","lub"],["Rundi","Ikirundi","rn","run","run"],["Central Khmer","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ","km","khm","khm"],["Western Frisian","Frysk","fy","fry","fry"],["Bengali","বাংলা","bn","ben","ben"],["Avaric","авар мацӀ, магӀарул мацӀ","av","ava","ava"],["Abkhazian","аҧсуа бызшәа, аҧсшәа","ab","abk","abk"],["Afar","Afaraf","aa","aar","aar"],["Afrikaans","Afrikaans","af","afr","afr"],["Amharic","አማርኛ","am","amh","amh"],["Aragonese","aragonés","an","arg","arg"],["Assamese","অসমীয়া","as","asm","asm"],["Bambara","bamanankan","bm","bam","bam"],["Bashkir","башҡорт теле","ba","bak","bak"],["Basque","euskara, euskera","eu","eus","baq"],["Belarusian","беларуская мова","be","bel","bel"],["Bosnian","bosanski jezik","bs","bos","bos"],["Breton","brezhoneg","br","bre","bre"],["Bulgarian","български език","bg","bul","bul"],["Burmese","ဗမာစာ","my","mya","bur"],["Catalan, Valencian","català, valencià","ca","cat","cat"],["Chamorro","Chamoru","ch","cha","cha"],["Chechen","нохчийн мотт","ce","che","che"],["Chichewa, Chewa, Nyanja","chiCheŵa, chinyanja","ny","nya","nya"],["Chuvash","чӑваш чӗлхи","cv","chv","chv"],["Cornish","Kernewek","kw","cor","cor"],["Corsican","corsu, lingua corsa","co","cos","cos"],["Croatian","hrvatski jezik","hr","hrv","hrv"],["Czech","čeština, český jazyk","cs","ces","cze"],["Danish","dansk","da","dan","dan"],["Divehi, Dhivehi, Maldivian","ދިވެހި","dv","div","div"],["Dutch, Flemish","Nederlands, Vlaams","nl","nld","dut"],["Dzongkha","རྫོང་ཁ","dz","dzo","dzo"],["English","English","en","eng","eng"],["Ewe","Eʋegbe","ee","ewe","ewe"],["Faroese","føroyskt","fo","fao","fao"],["Fijian","vosa Vakaviti","fj","fij","fij"],["Finnish","suomi, suomen kieli","fi","fin","fin"],["French","français, langue française","fr","fra","fre"],["Galician","Galego","gl","glg","glg"],["Georgian","ქართული","ka","kat","geo"],["German","Deutsch","de","deu","ger"],["Greek (modern)","ελληνικά","el","ell","gre"],["Gujarati","ગુજરાતી","gu","guj","guj"],["Haitian, Haitian Creole","Kreyòl ayisyen","ht","hat","hat"],["Hausa","(Hausa) هَوُسَ","ha","hau","hau"],["Herero","Otjiherero","hz","her","her"],["Hindi","हिन्दी, हिंदी","hi","hin","hin"],["Hiri Motu","Hiri Motu","ho","hmo","hmo"],["Hungarian","magyar","hu","hun","hun"],["Irish","Gaeilge","ga","gle","gle"],["Igbo","Asụsụ Igbo","ig","ibo","ibo"],["Icelandic","Íslenska","is","isl","ice"],["Italian","Italiano","it","ita","ita"],["Japanese","日本語 (にほんご)","ja","jpn","jpn"],["Javanese","ꦧꦱꦗꦮ, Basa Jawa","jv","jav","jav"],["Kalaallisut, Greenlandic","kalaallisut, kalaallit oqaasii","kl","kal","kal"],["Kannada","ಕನ್ನಡ","kn","kan","kan"],["Kashmiri","कश्मीरी, كشميري","ks","kas","kas"],["Kazakh","қазақ тілі","kk","kaz","kaz"],["Kikuyu, Gikuyu","Gĩkũyũ","ki","kik","kik"],["Kinyarwanda","Ikinyarwanda","rw","kin","kin"],["Kirghiz, Kyrgyz","Кыргызча, Кыргыз тили","ky","kir","kir"],["Korean","한국어","ko","kor","kor"],["Kuanyama, Kwanyama","Kuanyama","kj","kua","kua"],["Luxembourgish, Letzeburgesch","Lëtzebuergesch","lb","ltz","ltz"],["Ganda","Luganda","lg","lug","lug"],["Limburgan, Limburger, Limburgish","Limburgs","li","lim","lim"],["Lingala","Lingála","ln","lin","lin"],["Lao","ພາສາລາວ","lo","lao","lao"],["Lithuanian","lietuvių kalba","lt","lit","lit"],["Manx","Gaelg, Gailck","gv","glv","glv"],["Macedonian","македонски јазик","mk","mkd","mac"],["Malayalam","മലയാളം","ml","mal","mal"],["Maltese","Malti","mt","mlt","mlt"],["Marshallese","Kajin M̧ajeļ","mh","mah","mah"],["Navajo, Navaho","Diné bizaad","nv","nav","nav"],["Nepali","नेपाली","ne","nep","nep"],["Ndonga","Owambo","ng","ndo","ndo"],["Occitan","occitan, lenga d'òc","oc","oci","oci"],["Ossetian, Ossetic","ирон æвзаг","os","oss","oss"],["Panjabi, Punjabi","ਪੰਜਾਬੀ","pa","pan","pan"],["Polish","język polski, polszczyzna","pl","pol","pol"],["Portuguese","Português","pt","por","por"],["Romansh","Rumantsch Grischun","rm","roh","roh"],["Russian","русский","ru","rus","rus"],["Sindhi","सिन्धी, سنڌي، سندھی","sd","snd","snd"],["Northern Sami","Davvisámegiella","se","sme","sme"],["Samoan","gagana fa'a Samoa","sm","smo","smo"],["Sango","yângâ tî sängö","sg","sag","sag"],["Gaelic, Scottish Gaelic","Gàidhlig","gd","gla","gla"],["Shona","chiShona","sn","sna","sna"],["Sinhala, Sinhalese","සිංහල","si","sin","sin"],["Slovak","Slovenčina, Slovenský Jazyk","sk","slk","slo"],["Somali","Soomaaliga, af Soomaali","so","som","som"],["Southern Sotho","Sesotho","st","sot","sot"],["Spanish, Castilian","Español","es","spa","spa"],["Sundanese","Basa Sunda","su","sun","sun"],["Swedish","Svenska","sv","swe","swe"],["Tamil","தமிழ்","ta","tam","tam"],["Telugu","తెలుగు","te","tel","tel"],["Tajik","тоҷикӣ, toçikī, تاجیکی","tg","tgk","tgk"],["Thai","ไทย","th","tha","tha"],["Tigrinya","ትግርኛ","ti","tir","tir"],["Turkmen","Türkmen, Түркмен","tk","tuk","tuk"],["Tswana","Setswana","tn","tsn","tsn"],["Tongan (Tonga Islands)","Faka Tonga","to","ton","ton"],["Turkish","Türkçe","tr","tur","tur"],["Tsonga","Xitsonga","ts","tso","tso"],["Tatar","татар теле, tatar tele","tt","tat","tat"],["Uighur, Uyghur","ئۇيغۇرچە, Uyghurche","ug","uig","uig"],["Ukrainian","Українська","uk","ukr","ukr"],["Urdu","اردو","ur","urd","urd"],["Venda","Tshivenḓa","ve","ven","ven"],["Vietnamese","Tiếng Việt","vi","vie","vie"],["Walloon","Walon","wa","wln","wln"],["Welsh","Cymraeg","cy","cym","wel"],["Wolof","Wollof","wo","wol","wol"],["Xhosa","isiXhosa","xh","xho","xho"],["Yoruba","Yorùbá","yo","yor","yor"],["Zulu","isiZulu","zu","zul","zul"]].forEach((t=>{var e={name:t[0],nativeName:t[1],iso639_1:t[2],iso639_2T:t[3],iso639_2B:t[4]};o[t[2]]=i[t[3]]=a[t[4]]=e,r.push(e)}));var s=r;function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return l(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function c(t){var e=t.match(/\S+/g);return e?e.length:0}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(t)}var f={"zh-hans":"中文 (Zhōngwén)"};function d(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?p(t=t.toLowerCase(),["iso639_1"],e)||p(t,["iso639_2T"],e)||p(t,["iso639_2B","nativeName","name"],e):null}function p(t,e,n){var r,o=u(s);try{for(o.s();!(r=o.n()).done;){var i,a=r.value,l=u(e);try{for(l.s();!(i=l.n()).done;)if(-1!=a[i.value].split(", ").map((function(t){return t.toLowerCase()})).indexOf(t))return n?"".concat(a.nativeName.split(", ")[0]," (").concat(a.iso639_1,")"):a.iso639_1}catch(t){l.e(t)}finally{l.f()}}}catch(t){o.e(t)}finally{o.f()}return f[t]?"".concat(f[t]," (").concat(t,")"):null}function y(){try{return!!window.localStorage}catch(t){return!1}}var g=-1!=location.toString().indexOf("_debugReadAloud=true")},9073:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;return null==t?void 0:t.replace(/\{\{([^}]*?)\}\}/g,(function(t,i){if(!i)return t;var a,s=function(t){if(Array.isArray(t))return t}(a=i.split("|").map((function(t){return t.trim()})))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(a)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=s[0],l=s.slice(1);if(!(u in n)&&!(u in e))return t;var c=u in n?n[u]:u in e?e[u]:null;return l.map((function(t){return o[t]})).reduce((function(t,e){return e(t)}),c&&c.toString())}))}n.d(e,{g:function(){return o}}),n(2675),n(9463),n(2259),n(3418),n(3792),n(2062),n(2712),n(4782),n(2010),n(6099),n(7495),n(8781),n(7764),n(5440),n(2762),n(2953);var i={urlencode:encodeURIComponent}}},function(t){t(t.s=3638)}]);
|
|
2
|
+
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[51],{706:function(e,t,n){"use strict";var o=n(350).PROPER,r=n(9039),i=n(7452);e.exports=function(e){return r(function(){return!!i[e]()||"
"!=="
"[e]()||o&&i[e].name!==e})}},1041:function(e,t,n){"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function i(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}n.d(t,{S:function(){return a}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(9085),n(6099),n(7764),n(2953);var a=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t,this.options},(t=[{key:"setup",value:function(e){this.options=Object.assign({},this.options,e)}},{key:"init",value:function(){}},{key:"_configurePageContainer",value:function(e){}},{key:"_configureToolbar",value:function(e){}},{key:"_bindNavigationHandlers",value:function(){}},{key:"extendNavBar",value:function(e){}}])&&r(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},1792:function(e,t,n){var o,r;o=[n(1669)],void 0===(r=function(e){return function(e){"use strict";function t(e){void 0===e&&(e=window.navigator.userAgent),e=e.toLowerCase();var t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[],o={},r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",versionNumber:t[4]||t[2]||"0",platform:n[0]||""};if(r.browser&&(o[r.browser]=!0,o.version=r.version,o.versionNumber=parseInt(r.versionNumber,10)),r.platform&&(o[r.platform]=!0),(o.android||o.bb||o.blackberry||o.ipad||o.iphone||o.ipod||o.kindle||o.playbook||o.silk||o["windows phone"])&&(o.mobile=!0),(o.cros||o.mac||o.linux||o.win)&&(o.desktop=!0),(o.chrome||o.opr||o.safari)&&(o.webkit=!0),o.rv||o.iemobile){var i="msie";r.browser=i,o[i]=!0}if(o.edge){delete o.edge;var a="msedge";r.browser=a,o[a]=!0}if(o.safari&&o.blackberry){var s="blackberry";r.browser=s,o[s]=!0}if(o.safari&&o.playbook){var u="playbook";r.browser=u,o[u]=!0}if(o.bb){var l="blackberry";r.browser=l,o[l]=!0}if(o.opr){var c="opera";r.browser=c,o[c]=!0}if(o.safari&&o.android){var f="android";r.browser=f,o[f]=!0}if(o.safari&&o.kindle){var d="kindle";r.browser=d,o[d]=!0}if(o.safari&&o.silk){var h="silk";r.browser=h,o[h]=!0}return o.name=r.browser,o.platform=r.platform,o}return window.jQBrowser=t(window.navigator.userAgent),window.jQBrowser.uaMatch=t,e&&(e.browser=window.jQBrowser),window.jQBrowser}(e)}.apply(t,o))||(e.exports=r)},2443:function(e,t,n){var o;e=n.nmd(e),function(r,i){"use strict";if(!r||!r.document)throw new Error("SoundManager requires a browser with window and document objects.");var a=null;function s(e,t){this.setupOptions={url:e||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1e3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,forceUseGlobalHTML5Audio:!1,ignoreMobileRestrictions:!1,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"},this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onerror:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,playbackRate:1,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100},this.flash9Options={onfailure:null,isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1},flac:{type:["audio/flac"],required:!1}},this.movieID="sm2-container",this.id=t||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20170601",this.version=null,this.movieURL=null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null},this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var n,o,a,s,u,l,c,f,d,h,p,m,g,y,v,A,b,w,_,k,S,O,P,E,M,T,I,D,L,C,q,F,R,j,x,V,B,H,U,N,G,Q,K,W,z,J,Z,Y,X,$,ee,te,ne,oe,re,ie,ae,se,ue,le,ce,fe,de,he,pe,me=this,ge=null,ye=null,ve="soundManager",Ae=ve+": ",be=navigator.userAgent,we=r.location.href.toString(),_e=document,ke=[],Se=!0,Oe=!1,Pe=!1,Ee=!1,Me=!1,Te=!1,Ie=0,De=["log","info","warn","error"],Le=null,Ce=null,qe=!1,Fe=!1,Re=0,je=null,xe=[],Ve=null,Be=Array.prototype.slice,He=!1,Ue=0,Ne=1e3,Ge=be.match(/(ipad|iphone|ipod)/i),Qe=be.match(/android/i),Ke=be.match(/msie|trident/i),We=be.match(/webkit/i),ze=be.match(/safari/i)&&!be.match(/chrome/i),Je=be.match(/opera/i),Ze=be.match(/(mobile|pre\/|xoom)/i)||Ge||Qe,Ye=!we.match(/usehtml5audio/i)&&!we.match(/sm2-ignorebadua/i)&&ze&&!be.match(/silk/i)&&be.match(/OS\sX\s10_6_([3-7])/i),Xe=r.console!==i&&console.log!==i,$e=_e.hasFocus!==i?_e.hasFocus():null,et=ze&&(_e.hasFocus===i||!_e.hasFocus()),tt=!et,nt=/(mp3|mp4|mpa|m4a|m4b)/i,ot="about:blank",rt=_e.location?_e.location.protocol.match(/http/i):null,it=rt?"":"//",at=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4|m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,st=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],ut=new RegExp("\\.("+st.join("|")+")(\\?.*)?$","i");function lt(e){return me.preferFlash&&se&&!me.ignoreFlash&&me.flash[e]!==i&&me.flash[e]}function ct(e){return function(t){var n,o=this._s;return o&&o._a?n=e.call(this,t):(o&&o.id?me._wD(o.id+": Ignoring "+t.type):me._wD("HTML5::Ignoring "+t.type),n=null),n}}this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!rt,B={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"},ee=[null,"MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"],this.hasHTML5=function(){try{return Audio!==i&&(Je&&opera!==i&&opera.version()<10?new Audio(null):new Audio).canPlayType!==i}catch(e){return!1}}(),this.setup=function(e){var t=!me.url;return e!==i&&Ee&&Ve&&me.ok()&&(e.flashVersion!==i||e.url!==i||e.html5Test!==i)&&G(j("setupLate")),p(e),He||(Ze?me.setupOptions.ignoreMobileRestrictions&&!me.setupOptions.forceUseGlobalHTML5Audio||(xe.push(S.globalHTML5),He=!0):me.setupOptions.forceUseGlobalHTML5Audio&&(xe.push(S.globalHTML5),He=!0)),!pe&&Ze&&(me.setupOptions.ignoreMobileRestrictions?xe.push(S.ignoreMobile):(me.setupOptions.useHTML5Audio&&!me.setupOptions.preferFlash||me._wD(S.mobileUA),me.setupOptions.useHTML5Audio=!0,me.setupOptions.preferFlash=!1,Ge?me.ignoreFlash=!0:(Qe&&!be.match(/android\s2\.3/i)||!Qe)&&(me._wD(S.globalHTML5),He=!0))),e&&(t&&M&&e.url!==i&&me.beginDelayedInit(),M||e.url===i||"complete"!==_e.readyState||setTimeout(P,1)),pe=!0,me},this.ok=function(){return Ve?Ee&&!Me:me.useHTML5Audio&&me.hasHTML5},this.supported=this.ok,this.getMovie=function(e){return o(e)||_e[e]||r[e]},this.createSound=function(e,t){var o,r,a,s=null;if(r=(o=ve+".createSound(): ")+j(Ee?"notOK":"notReady"),!Ee||!me.ok())return G(r),!1;if(t!==i&&(e={id:e,url:t}),(a=h(e)).url=J(a.url),a.id===i&&(a.id=me.setupOptions.idPrefix+Ue++),a.id.toString().charAt(0).match(/^[0-9]$/)&&me._wD(o+j("badID",a.id),2),me._wD(o+a.id+(a.url?" ("+a.url+")":""),1),Q(a.id,!0))return me._wD(o+a.id+" exists",1),me.sounds[a.id];function u(){return a=U(a),me.sounds[a.id]=new n(a),me.soundIDs.push(a.id),me.sounds[a.id]}if(X(a))s=u(),me.html5Only||me._wD(a.id+": Using HTML5"),s._setup_html5(a);else{if(me.html5Only)return me._wD(a.id+": No HTML5 support for this sound, and no Flash. Exiting."),u();if(me.html5.usingFlash&&a.url&&a.url.match(/data:/i))return me._wD(a.id+": data: URIs not supported via Flash. Exiting."),u();l>8&&(null===a.isMovieStar&&(a.isMovieStar=!!(a.serverURL||a.type&&a.type.match(at)||a.url&&a.url.match(ut))),a.isMovieStar&&(me._wD(o+"using MovieStar handling"),a.loops>1&&f("noNSLoop"))),a=N(a,o),s=u(),8===l?ye._createSound(a.id,a.loops||1,a.usePolicyFile):(ye._createSound(a.id,a.url,a.usePeakData,a.useWaveformData,a.useEQData,a.isMovieStar,!!a.isMovieStar&&a.bufferTime,a.loops||1,a.serverURL,a.duration||null,a.autoPlay,!0,a.autoLoad,a.usePolicyFile),a.serverURL||(s.connected=!0,a.onconnect&&a.onconnect.apply(s))),a.serverURL||!a.autoLoad&&!a.autoPlay||s.load(a)}return!a.serverURL&&a.autoPlay&&s.play(),s},this.destroySound=function(e,t){if(!Q(e))return!1;var n,o=me.sounds[e];for(o.stop(),o._iO={},o.unload(),n=0;n<me.soundIDs.length;n++)if(me.soundIDs[n]===e){me.soundIDs.splice(n,1);break}return t||o.destruct(!0),o=null,delete me.sounds[e],!0},this.load=function(e,t){return!!Q(e)&&me.sounds[e].load(t)},this.unload=function(e){return!!Q(e)&&me.sounds[e].unload()},this.onPosition=function(e,t,n,o){return!!Q(e)&&me.sounds[e].onposition(t,n,o)},this.onposition=this.onPosition,this.clearOnPosition=function(e,t,n){return!!Q(e)&&me.sounds[e].clearOnPosition(t,n)},this.play=function(e,t){var n=null,o=t&&!(t instanceof Object);if(!Ee||!me.ok())return G(ve+".play(): "+j(Ee?"notOK":"notReady")),!1;if(Q(e,o))o&&(t={url:t});else{if(!o)return!1;o&&(t={url:t}),t&&t.url&&(me._wD(ve+'.play(): Attempting to create "'+e+'"',1),t.id=e,n=me.createSound(t).play())}return null===n&&(n=me.sounds[e].play(t)),n},this.start=this.play,this.setPlaybackRate=function(e,t,n){return!!Q(e)&&me.sounds[e].setPlaybackRate(t,n)},this.setPosition=function(e,t){return!!Q(e)&&me.sounds[e].setPosition(t)},this.stop=function(e){return!!Q(e)&&(me._wD(ve+".stop("+e+")",1),me.sounds[e].stop())},this.stopAll=function(){var e;for(e in me._wD(ve+".stopAll()",1),me.sounds)me.sounds.hasOwnProperty(e)&&me.sounds[e].stop()},this.pause=function(e){return!!Q(e)&&me.sounds[e].pause()},this.pauseAll=function(){var e;for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].pause()},this.resume=function(e){return!!Q(e)&&me.sounds[e].resume()},this.resumeAll=function(){var e;for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].resume()},this.togglePause=function(e){return!!Q(e)&&me.sounds[e].togglePause()},this.setPan=function(e,t){return!!Q(e)&&me.sounds[e].setPan(t)},this.setVolume=function(e,t){var n,o;if(e!==i&&!isNaN(e)&&t===i){for(n=0,o=me.soundIDs.length;n<o;n++)me.sounds[me.soundIDs[n]].setVolume(e);return!1}return!!Q(e)&&me.sounds[e].setVolume(t)},this.mute=function(e){var t=0;if(e instanceof String&&(e=null),e)return!!Q(e)&&(me._wD(ve+'.mute(): Muting "'+e+'"'),me.sounds[e].mute());for(me._wD(ve+".mute(): Muting all sounds"),t=me.soundIDs.length-1;t>=0;t--)me.sounds[me.soundIDs[t]].mute();return me.muted=!0,!0},this.muteAll=function(){me.mute()},this.unmute=function(e){var t;if(e instanceof String&&(e=null),e)return!!Q(e)&&(me._wD(ve+'.unmute(): Unmuting "'+e+'"'),me.sounds[e].unmute());for(me._wD(ve+".unmute(): Unmuting all sounds"),t=me.soundIDs.length-1;t>=0;t--)me.sounds[me.soundIDs[t]].unmute();return me.muted=!1,!0},this.unmuteAll=function(){me.unmute()},this.toggleMute=function(e){return!!Q(e)&&me.sounds[e].toggleMute()},this.getMemoryUse=function(){var e=0;return ye&&8!==l&&(e=parseInt(ye._getMemoryUse(),10)),e},this.disable=function(e){var t;if(e===i&&(e=!1),Me)return!1;for(Me=!0,f("shutdown",1),t=me.soundIDs.length-1;t>=0;t--)q(me.sounds[me.soundIDs[t]]);return q(me),d(e),ie.remove(r,"load",v),!0},this.canPlayMIME=function(e){var t;return me.hasHTML5&&(t=$({type:e})),!t&&Ve&&(t=e&&me.ok()?!!(l>8&&e.match(at)||e.match(me.mimePattern)):null),t},this.canPlayURL=function(e){var t;return me.hasHTML5&&(t=$({url:e})),!t&&Ve&&(t=e&&me.ok()?!!e.match(me.filePattern):null),t},this.canPlayLink=function(e){return!(e.type===i||!e.type||!me.canPlayMIME(e.type))||me.canPlayURL(e.href)},this.getSoundById=function(e,t){if(!e)return null;var n=me.sounds[e];return n||t||me._wD(ve+'.getSoundById(): Sound "'+e+'" not found.',2),n},this.onready=function(e,t){var n="onready";if("function"!=typeof e)throw j("needFunction",n);return Ee&&me._wD(j("queue",n)),t||(t=r),g(n,e,t),y(),!0},this.ontimeout=function(e,t){var n="ontimeout";if("function"!=typeof e)throw j("needFunction",n);return Ee&&me._wD(j("queue",n)),t||(t=r),g(n,e,t),y({type:n}),!0},this._writeDebug=function(e,t){var n,r;return!(!me.setupOptions.debugMode||!(Xe&&me.useConsole&&(t&&"object"==typeof t?console.log(e,t):De[t]!==i?console[De[t]](e):console.log(e),me.consoleOnly))&&(!(n=o("soundmanager-debug"))||(r=_e.createElement("div"),++Ie%2==0&&(r.className="sm2-alt"),t=t===i?0:parseInt(t,10),r.appendChild(_e.createTextNode(e)),t&&(t>=2&&(r.style.fontWeight="bold"),3===t&&(r.style.color="#ff3333")),n.insertBefore(r,n.firstChild),n=null,0)))},-1!==we.indexOf("sm2-debug=alert")&&(this._writeDebug=function(e){r.alert(e)}),this._wD=this._writeDebug,this._debug=function(){var e,t;for(f("currentObj",1),e=0,t=me.soundIDs.length;e<t;e++)me.sounds[me.soundIDs[e]]._debug()},this.reboot=function(e,t){var n,o,i;for(me.soundIDs.length&&me._wD("Destroying "+me.soundIDs.length+" SMSound object"+(1!==me.soundIDs.length?"s":"")+"..."),n=me.soundIDs.length-1;n>=0;n--)me.sounds[me.soundIDs[n]].destruct();if(ye)try{Ke&&(Ce=ye.innerHTML),Le=ye.parentNode.removeChild(ye)}catch(e){f("badRemove",2)}if(Ce=Le=Ve=ye=null,me.enabled=M=Ee=qe=Fe=Oe=Pe=Me=He=me.swfLoaded=!1,me.soundIDs=[],me.sounds={},Ue=0,pe=!1,e)ke=[];else for(n in ke)if(ke.hasOwnProperty(n))for(o=0,i=ke[n].length;o<i;o++)ke[n][o].fired=!1;return t||me._wD(ve+": Rebooting..."),me.html5={usingFlash:null},me.flash={},me.html5Only=!1,me.ignoreFlash=!1,r.setTimeout(function(){t||me.beginDelayedInit()},20),me},this.reset=function(){return f("reset"),me.reboot(!0,!0)},this.getMoviePercent=function(){return ye&&"PercentLoaded"in ye?ye.PercentLoaded():null},this.beginDelayedInit=function(){Te=!0,P(),setTimeout(function(){return!Fe&&(I(),O(),Fe=!0,!0)},20),A()},this.destruct=function(){me._wD(ve+".destruct()"),me.disable(!0)},n=function(e){var t,n,o,r,a,s,u,d,p,m,g=this,y=!1,v=[],A=0,b=null;p={duration:null,time:null},this.id=e.id,this.sID=this.id,this.url=e.url,this.options=h(e),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,m=!this.url,this.id3={},this._debug=function(){me._wD(g.id+": Merged options:",g.options)},this.load=function(e){var t;if(e!==i?g._iO=h(e,g.options):(e=g.options,g._iO=e,b&&b!==g.url&&(f("manURL"),g._iO.url=g.url,g.url=null)),g._iO.url||(g._iO.url=g.url),g._iO.url=J(g._iO.url),g.instanceOptions=g._iO,t=g._iO,me._wD(g.id+": load ("+t.url+")"),!t.url&&!g.url)return me._wD(g.id+": load(): url is unassigned. Exiting.",2),g;if(g.isHTML5||8!==l||g.url||t.autoPlay||me._wD(g.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),t.url===g.url&&0!==g.readyState&&2!==g.readyState)return f("onURL",1),3===g.readyState&&t.onload&&he(g,function(){t.onload.apply(g,[!!g.duration])}),g;if(g.loaded=!1,g.readyState=1,g.playState=0,g.id3={},X(t))g._setup_html5(t)._called_load?me._wD(g.id+": Ignoring request to load again"):(g._html5_canplay=!1,g.url!==t.url&&(me._wD(f("manURL")+": "+t.url),g._a.src=t.url,g.setPosition(0)),g._a.autobuffer="auto",g._a.preload="auto",g._a._called_load=!0);else{if(me.html5Only)return me._wD(g.id+": No flash support. Exiting."),g;if(g._iO.url&&g._iO.url.match(/data:/i))return me._wD(g.id+": data: URIs not supported via Flash. Exiting."),g;try{g.isHTML5=!1,g._iO=N(U(t)),g._iO.autoPlay&&(g._iO.position||g._iO.from)&&(me._wD(g.id+": Disabling autoPlay because of non-zero offset case"),g._iO.autoPlay=!1),t=g._iO,8===l?ye._load(g.id,t.url,t.stream,t.autoPlay,t.usePolicyFile):ye._load(g.id,t.url,!!t.stream,!!t.autoPlay,t.loops||1,!!t.autoLoad,t.usePolicyFile)}catch(e){f("smError",2),c("onload",!1),D({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return g.url=t.url,g},this.unload=function(){return 0!==g.readyState&&(me._wD(g.id+": unload()"),g.isHTML5?(r(),g._a&&(g._a.pause(),b=ne(g._a))):8===l?ye._unload(g.id,ot):ye._unload(g.id),t()),g},this.destruct=function(e){me._wD(g.id+": Destruct"),g.isHTML5?(r(),g._a&&(g._a.pause(),ne(g._a),He||o(),g._a._s=null,g._a=null)):(g._iO.onfailure=null,ye._destroySound(g.id)),e||me.destroySound(g.id,!0)},this.play=function(e,t){var n,o,r,u,c,f,p=!0;if(n=g.id+": play(): ",t=t===i||t,e||(e={}),g.url&&(g._iO.url=g.url),g._iO=h(g._iO,g.options),g._iO=h(e,g._iO),g._iO.url=J(g._iO.url),g.instanceOptions=g._iO,!g.isHTML5&&g._iO.serverURL&&!g.connected)return g.getAutoPlay()||(me._wD(n+" Netstream not connected yet - setting autoPlay"),g.setAutoPlay(!0)),g;if(X(g._iO)&&(g._setup_html5(g._iO),a()),1===g.playState&&!g.paused){if(!g._iO.multiShot)return me._wD(n+"Already playing (one-shot)",1),g.isHTML5&&g.setPosition(g._iO.position),g;me._wD(n+"Already playing (multi-shot)",1)}if(e.url&&e.url!==g.url&&(g.readyState||g.isHTML5||8!==l||!m?g.load(g._iO):m=!1),g.loaded)me._wD(n.substr(0,n.lastIndexOf(":")));else if(0===g.readyState){if(me._wD(n+"Attempting to load"),g.isHTML5||me.html5Only){if(!g.isHTML5)return me._wD(n+"Unsupported type. Exiting."),g;g.load(g._iO)}else g._iO.autoPlay=!0,g.load(g._iO);g.instanceOptions=g._iO}else{if(2===g.readyState)return me._wD(n+"Could not load - exiting",2),g;me._wD(n+"Loading - attempting to play...")}return!g.isHTML5&&9===l&&g.position>0&&g.position===g.duration&&(me._wD(n+"Sound at end, resetting to position: 0"),e.position=0),g.paused&&g.position>=0&&(!g._iO.serverURL||g.position>0)?(me._wD(n+"Resuming from paused state",1),g.resume()):(g._iO=h(e,g._iO),(!g.isHTML5&&null!==g._iO.position&&g._iO.position>0||null!==g._iO.from&&g._iO.from>0||null!==g._iO.to)&&0===g.instanceCount&&0===g.playState&&!g._iO.serverURL&&(r=function(){g._iO=h(e,g._iO),g.play(g._iO)},g.isHTML5&&!g._html5_canplay?(me._wD(n+"Beginning load for non-zero offset case"),g.load({_oncanplay:r})):g.isHTML5||g.loaded||g.readyState&&2===g.readyState||(me._wD(n+"Preloading for non-zero offset case"),g.load({onload:r})),g._iO=d()),(!g.instanceCount||g._iO.multiShotEvents||g.isHTML5&&g._iO.multiShot&&!He||!g.isHTML5&&l>8&&!g.getAutoPlay())&&g.instanceCount++,g._iO.onposition&&0===g.playState&&s(g),g.playState=1,g.paused=!1,g.position=g._iO.position===i||isNaN(g._iO.position)?0:g._iO.position,g.isHTML5||(g._iO=N(U(g._iO))),g._iO.onplay&&t&&(g._iO.onplay.apply(g),y=!0),g.setVolume(g._iO.volume,!0),g.setPan(g._iO.pan,!0),1!==g._iO.playbackRate&&g.setPlaybackRate(g._iO.playbackRate),g.isHTML5?g.instanceCount<2?(a(),o=g._setup_html5(),g.setPosition(g._iO.position),o.play()):(me._wD(g.id+": Cloning Audio() for instance #"+g.instanceCount+"..."),u=new Audio(g._iO.url),c=function(){ie.remove(u,"ended",c),g._onfinish(g),ne(u),u=null},f=function(){ie.remove(u,"canplay",f);try{u.currentTime=g._iO.position/Ne}catch(e){G(g.id+": multiShot play() failed to apply position of "+g._iO.position/Ne)}u.play()},ie.add(u,"ended",c),g._iO.volume!==i&&(u.volume=Math.max(0,Math.min(1,g._iO.volume/100))),g.muted&&(u.muted=!0),g._iO.position?ie.add(u,"canplay",f):u.play()):(p=ye._start(g.id,g._iO.loops||1,9===l?g.position:g.position/Ne,g._iO.multiShot||!1),9!==l||p||(me._wD(n+"No sound hardware, or 32-sound ceiling hit",2),g._iO.onplayerror&&g._iO.onplayerror.apply(g)))),g},this.start=this.play,this.stop=function(e){var t,n=g._iO;return 1===g.playState&&(me._wD(g.id+": stop()"),g._onbufferchange(0),g._resetOnPosition(0),g.paused=!1,g.isHTML5||(g.playState=0),u(),n.to&&g.clearOnPosition(n.to),g.isHTML5?g._a&&(t=g.position,g.setPosition(0),g.position=t,g._a.pause(),g.playState=0,g._onTimer(),r()):(ye._stop(g.id,e),n.serverURL&&g.unload()),g.instanceCount=0,g._iO={},n.onstop&&n.onstop.apply(g)),g},this.setAutoPlay=function(e){me._wD(g.id+": Autoplay turned "+(e?"on":"off")),g._iO.autoPlay=e,g.isHTML5||(ye._setAutoPlay(g.id,e),e&&(g.instanceCount||1!==g.readyState||(g.instanceCount++,me._wD(g.id+": Incremented instance count to "+g.instanceCount))))},this.getAutoPlay=function(){return g._iO.autoPlay},this.setPlaybackRate=function(e){var t=Math.max(.5,Math.min(4,e));if(t!==e&&me._wD(g.id+": setPlaybackRate("+e+"): limiting rate to "+t,2),g.isHTML5)try{g._iO.playbackRate=t,g._a.playbackRate=t}catch(e){me._wD(g.id+": setPlaybackRate("+t+") failed: "+e.message,2)}return g},this.setPosition=function(e){e===i&&(e=0);var t,n,o=g.isHTML5?Math.max(e,0):Math.min(g.duration||g._iO.duration,Math.max(e,0));if(g.position=o,n=g.position/Ne,g._resetOnPosition(g.position),g._iO.position=o,g.isHTML5){if(g._a){if(g._html5_canplay){if(g._a.currentTime.toFixed(3)!==n.toFixed(3)){me._wD(g.id+": setPosition("+n+")");try{g._a.currentTime=n,(0===g.playState||g.paused)&&g._a.pause()}catch(e){me._wD(g.id+": setPosition("+n+") failed: "+e.message,2)}}}else if(n)return me._wD(g.id+": setPosition("+n+"): Cannot seek yet, sound not ready",2),g;g.paused&&g._onTimer(!0)}}else t=9===l?g.position:n,g.readyState&&2!==g.readyState&&ye._setPosition(g.id,t,g.paused||!g.playState,g._iO.multiShot);return g},this.pause=function(e){return g.paused||0===g.playState&&1!==g.readyState||(me._wD(g.id+": pause()"),g.paused=!0,g.isHTML5?(g._setup_html5().pause(),r()):(e||e===i)&&ye._pause(g.id,g._iO.multiShot),g._iO.onpause&&g._iO.onpause.apply(g)),g},this.resume=function(){var e=g._iO;return g.paused?(me._wD(g.id+": resume()"),g.paused=!1,g.playState=1,g.isHTML5?(g._setup_html5().play(),a()):(e.isMovieStar&&!e.serverURL&&g.setPosition(g.position),ye._pause(g.id,e.multiShot)),!y&&e.onplay?(e.onplay.apply(g),y=!0):e.onresume&&e.onresume.apply(g),g):g},this.togglePause=function(){return me._wD(g.id+": togglePause()"),0===g.playState?(g.play({position:9!==l||g.isHTML5?g.position/Ne:g.position}),g):(g.paused?g.resume():g.pause(),g)},this.setPan=function(e,t){return e===i&&(e=0),t===i&&(t=!1),g.isHTML5||ye._setPan(g.id,e),g._iO.pan=e,t||(g.pan=e,g.options.pan=e),g},this.setVolume=function(e,t){return e===i&&(e=100),t===i&&(t=!1),g.isHTML5?g._a&&(me.muted&&!g.muted&&(g.muted=!0,g._a.muted=!0),g._a.volume=Math.max(0,Math.min(1,e/100))):ye._setVolume(g.id,me.muted&&!g.muted||g.muted?0:e),g._iO.volume=e,t||(g.volume=e,g.options.volume=e),g},this.mute=function(){return g.muted=!0,g.isHTML5?g._a&&(g._a.muted=!0):ye._setVolume(g.id,0),g},this.unmute=function(){g.muted=!1;var e=g._iO.volume!==i;return g.isHTML5?g._a&&(g._a.muted=!1):ye._setVolume(g.id,e?g._iO.volume:g.options.volume),g},this.toggleMute=function(){return g.muted?g.unmute():g.mute()},this.onPosition=function(e,t,n){return v.push({position:parseInt(e,10),method:t,scope:n!==i?n:g,fired:!1}),g},this.onposition=this.onPosition,this.clearOnPosition=function(e,t){var n;if(e=parseInt(e,10),!isNaN(e))for(n=0;n<v.length;n++)e===v[n].position&&(t&&t!==v[n].method||(v[n].fired&&A--,v.splice(n,1)))},this._processOnPosition=function(){var e,t,n=v.length;if(!n||!g.playState||A>=n)return!1;for(e=n-1;e>=0;e--)!(t=v[e]).fired&&g.position>=t.position&&(t.fired=!0,A++,t.method.apply(t.scope,[t.position]),n=v.length);return!0},this._resetOnPosition=function(e){var t,n,o=v.length;if(!o)return!1;for(t=o-1;t>=0;t--)(n=v[t]).fired&&e<=n.position&&(n.fired=!1,A--);return!0},d=function(){var e,t,n=g._iO,o=n.from,r=n.to;return t=function(){me._wD(g.id+': "To" time of '+r+" reached."),g.clearOnPosition(r,t),g.stop()},e=function(){me._wD(g.id+': Playing "from" '+o),null===r||isNaN(r)||g.onPosition(r,t)},null===o||isNaN(o)||(n.position=o,n.multiShot=!1,e()),n},s=function(){var e,t=g._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&g.onPosition(parseInt(e,10),t[e])},u=function(){var e,t=g._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&g.clearOnPosition(parseInt(e,10))},a=function(){g.isHTML5&&K(g)},r=function(){g.isHTML5&&W(g)},(t=function(e){e||(v=[],A=0),y=!1,g._hasTimer=null,g._a=null,g._html5_canplay=!1,g.bytesLoaded=null,g.bytesTotal=null,g.duration=g._iO&&g._iO.duration?g._iO.duration:null,g.durationEstimate=null,g.buffered=[],g.eqData=[],g.eqData.left=[],g.eqData.right=[],g.failures=0,g.isBuffering=!1,g.instanceOptions={},g.instanceCount=0,g.loaded=!1,g.metadata={},g.readyState=0,g.muted=!1,g.paused=!1,g.peakData={left:0,right:0},g.waveformData={left:[],right:[]},g.playState=0,g.position=null,g.id3={}})(),this._onTimer=function(e){var t,n,o=!1,r={};return(g._hasTimer||e)&&g._a&&(e||(g.playState>0||1===g.readyState)&&!g.paused)&&((t=g._get_html5_duration())!==p.duration&&(p.duration=t,g.duration=t,o=!0),g.durationEstimate=g.duration,(n=g._a.currentTime*Ne||0)!==p.time&&(p.time=n,o=!0),(o||e)&&g._whileplaying(n,r,r,r,r)),o},this._get_html5_duration=function(){var e=g._iO,t=g._a&&g._a.duration?g._a.duration*Ne:e&&e.duration?e.duration:null;return t&&!isNaN(t)&&t!==1/0?t:null},this._apply_loop=function(e,t){!e.loop&&t>1&&me._wD("Note: Native HTML5 looping is infinite.",1),e.loop=t>1?"loop":""},this._setup_html5=function(e){var o,r=h(g._iO,e),i=He?ge:g._a,a=decodeURI(r.url);if(He?a===decodeURI(ae)&&(o=!0):a===decodeURI(b)&&(o=!0),i){if(i._s)if(He)i._s&&i._s.playState&&!o&&i._s.stop();else if(!He&&a===decodeURI(b))return g._apply_loop(i,r.loops),i;o||(b&&t(!1),i.src=r.url,g.url=r.url,b=r.url,ae=r.url,i._called_load=!1)}else r.autoLoad||r.autoPlay?(g._a=new Audio(r.url),g._a.load()):g._a=Je&&opera.version()<10?new Audio(null):new Audio,(i=g._a)._called_load=!1,He&&(ge=i);return g.isHTML5=!0,g._a=i,i._s=g,n(),g._apply_loop(i,r.loops),r.autoLoad||r.autoPlay?g.load():(i.autobuffer=!1,i.preload="auto"),i},n=function(){if(g._a._added_events)return!1;var e;function t(e,t,n){return g._a?g._a.addEventListener(e,t,n||!1):null}for(e in g._a._added_events=!0,ce)ce.hasOwnProperty(e)&&t(e,ce[e]);return!0},o=function(){var e;function t(e,t,n){return g._a?g._a.removeEventListener(e,t,n||!1):null}for(e in me._wD(g.id+": Removing event listeners"),g._a._added_events=!1,ce)ce.hasOwnProperty(e)&&t(e,ce[e])},this._onload=function(e){var t,n=!!e||!g.isHTML5&&8===l&&g.duration;return t=g.id+": ",me._wD(t+(n?"onload()":"Failed to load / invalid sound?"+(g.duration?" -":" Zero-length duration reported.")+" ("+g.url+")"),n?1:2),n||g.isHTML5||(!0===me.sandbox.noRemote&&me._wD(t+j("noNet"),1),!0===me.sandbox.noLocal&&me._wD(t+j("noLocal"),1)),g.loaded=n,g.readyState=n?3:2,g._onbufferchange(0),n||g.isHTML5||g._onerror(),g._iO.onload&&he(g,function(){g._iO.onload.apply(g,[n])}),!0},this._onerror=function(e,t){g._iO.onerror&&he(g,function(){g._iO.onerror.apply(g,[e,t])})},this._onbufferchange=function(e){return!(0===g.playState||e&&g.isBuffering||!e&&!g.isBuffering||(g.isBuffering=1===e,g._iO.onbufferchange&&(me._wD(g.id+": Buffer state change: "+e),g._iO.onbufferchange.apply(g,[e])),0))},this._onsuspend=function(){return g._iO.onsuspend&&(me._wD(g.id+": Playback suspended"),g._iO.onsuspend.apply(g)),!0},this._onfailure=function(e,t,n){g.failures++,me._wD(g.id+": Failure ("+g.failures+"): "+e),g._iO.onfailure&&1===g.failures?g._iO.onfailure(e,t,n):me._wD(g.id+": Ignoring failure")},this._onwarning=function(e,t,n){g._iO.onwarning&&g._iO.onwarning(e,t,n)},this._onfinish=function(){var e=g._iO.onfinish;g._onbufferchange(0),g._resetOnPosition(0),g.instanceCount&&(g.instanceCount--,g.instanceCount||(u(),g.playState=0,g.paused=!1,g.instanceCount=0,g.instanceOptions={},g._iO={},r(),g.isHTML5&&(g.position=0)),g.instanceCount&&!g._iO.multiShotEvents||e&&(me._wD(g.id+": onfinish()"),he(g,function(){e.apply(g)})))},this._whileloading=function(e,t,n,o){var r=g._iO;g.bytesLoaded=e,g.bytesTotal=t,g.duration=Math.floor(n),g.bufferLength=o,g.isHTML5||r.isMovieStar?g.durationEstimate=g.duration:r.duration?g.durationEstimate=g.duration>r.duration?g.duration:r.duration:g.durationEstimate=parseInt(g.bytesTotal/g.bytesLoaded*g.duration,10),g.isHTML5||(g.buffered=[{start:0,end:g.duration}]),(3!==g.readyState||g.isHTML5)&&r.whileloading&&r.whileloading.apply(g)},this._whileplaying=function(e,t,n,o,r){var a,s=g._iO;return!isNaN(e)&&null!==e&&(g.position=Math.max(0,e),g._processOnPosition(),!g.isHTML5&&l>8&&(s.usePeakData&&t!==i&&t&&(g.peakData={left:t.leftPeak,right:t.rightPeak}),s.useWaveformData&&n!==i&&n&&(g.waveformData={left:n.split(","),right:o.split(",")}),s.useEQData&&r!==i&&r&&r.leftEQ&&(a=r.leftEQ.split(","),g.eqData=a,g.eqData.left=a,r.rightEQ!==i&&r.rightEQ&&(g.eqData.right=r.rightEQ.split(",")))),1===g.playState&&(g.isHTML5||8!==l||g.position||!g.isBuffering||g._onbufferchange(0),s.whileplaying&&s.whileplaying.apply(g)),!0)},this._oncaptiondata=function(e){me._wD(g.id+": Caption data received."),g.captiondata=e,g._iO.oncaptiondata&&g._iO.oncaptiondata.apply(g,[e])},this._onmetadata=function(e,t){me._wD(g.id+": Metadata received.");var n,o,r={};for(n=0,o=e.length;n<o;n++)r[e[n]]=t[n];g.metadata=r,g._iO.onmetadata&&g._iO.onmetadata.call(g,g.metadata)},this._onid3=function(e,t){me._wD(g.id+": ID3 data received.");var n,o,r=[];for(n=0,o=e.length;n<o;n++)r[e[n]]=t[n];g.id3=h(g.id3,r),g._iO.onid3&&g._iO.onid3.apply(g)},this._onconnect=function(e){e=1===e,me._wD(g.id+": "+(e?"Connected.":"Failed to connect? - "+g.url),e?1:2),g.connected=e,e&&(g.failures=0,Q(g.id)&&(g.getAutoPlay()?g.play(i,g.getAutoPlay()):g._iO.autoLoad&&g.load()),g._iO.onconnect&&g._iO.onconnect.apply(g,[e]))},this._ondataerror=function(e){g.playState>0&&(me._wD(g.id+": Data error: "+e),g._iO.ondataerror&&g._iO.ondataerror.apply(g))},this._debug()},T=function(){return _e.body||_e.getElementsByTagName("div")[0]},o=function(e){return _e.getElementById(e)},h=function(e,t){var n,o,r=e||{};for(o in n=t===i?me.defaultOptions:t)n.hasOwnProperty(o)&&r[o]===i&&("object"!=typeof n[o]||null===n[o]?r[o]=n[o]:r[o]=h(r[o],n[o]));return r},he=function(e,t){e.isHTML5||8!==l?t():r.setTimeout(t,0)},m={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},p=function(e,t){var n,o=!0,r=t!==i,a=me.setupOptions,s=m;if(e===i){for(n in o=[],a)a.hasOwnProperty(n)&&o.push(n);for(n in s)s.hasOwnProperty(n)&&("object"==typeof me[n]?o.push(n+": {...}"):me[n]instanceof Function?o.push(n+": function() {...}"):o.push(n));return me._wD(j("setup",o.join(", "))),!1}for(n in e)if(e.hasOwnProperty(n))if("object"!=typeof e[n]||null===e[n]||e[n]instanceof Array||e[n]instanceof RegExp)r&&s[t]!==i?me[t][n]=e[n]:a[n]!==i?(me.setupOptions[n]=e[n],me[n]=e[n]):s[n]===i?(G(j(me[n]===i?"setupUndef":"setupError",n),2),o=!1):me[n]instanceof Function?me[n].apply(me,e[n]instanceof Array?e[n]:[e[n]]):me[n]=e[n];else{if(s[n]!==i)return p(e[n],n);G(j(me[n]===i?"setupUndef":"setupError",n),2),o=!1}return o},ie=function(){var e=r.attachEvent,t={add:e?"attachEvent":"addEventListener",remove:e?"detachEvent":"removeEventListener"};function n(t){var n=Be.call(t),o=n.length;return e?(n[1]="on"+n[1],o>3&&n.pop()):3===o&&n.push(!1),n}function o(n,o){var r=n.shift(),i=[t[o]];e?r[i](n[0],n[1]):r[i].apply(r,n)}return{add:function(){o(n(arguments),"add")},remove:function(){o(n(arguments),"remove")}}}(),ce={abort:ct(function(){me._wD(this._s.id+": abort")}),canplay:ct(function(){var e,t=this._s;if(!t._html5_canplay){if(t._html5_canplay=!0,me._wD(t.id+": canplay"),t._onbufferchange(0),e=t._iO.position===i||isNaN(t._iO.position)?null:t._iO.position/Ne,this.currentTime!==e){me._wD(t.id+": canplay: Setting position to "+e);try{this.currentTime=e}catch(n){me._wD(t.id+": canplay: Setting position of "+e+" failed: "+n.message,2)}}t._iO._oncanplay&&t._iO._oncanplay()}}),canplaythrough:ct(function(){var e=this._s;e.loaded||(e._onbufferchange(0),e._whileloading(e.bytesLoaded,e.bytesTotal,e._get_html5_duration()),e._onload(!0))}),durationchange:ct(function(){var e,t=this._s;e=t._get_html5_duration(),isNaN(e)||e===t.duration||(me._wD(this._s.id+": durationchange ("+e+")"+(t.duration?", previously "+t.duration:"")),t.durationEstimate=t.duration=e)}),ended:ct(function(){var e=this._s;me._wD(e.id+": ended"),e._onfinish()}),error:ct(function(){var e=ee[this.error.code]||null;me._wD(this._s.id+": HTML5 error, code "+this.error.code+(e?" ("+e+")":"")),this._s._onload(!1),this._s._onerror(this.error.code,e)}),loadeddata:ct(function(){var e=this._s;me._wD(e.id+": loadeddata"),e._loaded||ze||(e.duration=e._get_html5_duration())}),loadedmetadata:ct(function(){me._wD(this._s.id+": loadedmetadata")}),loadstart:ct(function(){me._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)}),play:ct(function(){this._s._onbufferchange(0)}),playing:ct(function(){me._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)}),progress:ct(function(e){var t,n,o,r=this._s,i=0,a="progress"===e.type,s=e.target.buffered,u=e.loaded||0,l=e.total||1;if(r.buffered=[],s&&s.length){for(t=0,n=s.length;t<n;t++)r.buffered.push({start:s.start(t)*Ne,end:s.end(t)*Ne});if(i=(s.end(0)-s.start(0))*Ne,u=Math.min(1,i/(e.target.duration*Ne)),a&&s.length>1){for(o=[],n=s.length,t=0;t<n;t++)o.push(e.target.buffered.start(t)*Ne+"-"+e.target.buffered.end(t)*Ne);me._wD(this._s.id+": progress, timeRanges: "+o.join(", "))}a&&!isNaN(u)&&me._wD(this._s.id+": progress, "+Math.floor(100*u)+"% loaded")}isNaN(u)||(r._whileloading(u,l,r._get_html5_duration()),u&&l&&u===l&&ce.canplaythrough.call(this,e))}),ratechange:ct(function(){me._wD(this._s.id+": ratechange")}),suspend:ct(function(e){var t=this._s;me._wD(this._s.id+": suspend"),ce.progress.call(this,e),t._onsuspend()}),stalled:ct(function(){me._wD(this._s.id+": stalled")}),timeupdate:ct(function(){this._s._onTimer()}),waiting:ct(function(){var e=this._s;me._wD(this._s.id+": waiting"),e._onbufferchange(1)})},X=function(e){return!(!e||!(e.type||e.url||e.serverURL))&&!(e.serverURL||e.type&<(e.type))&&(e.type?$({type:e.type}):$({url:e.url})||me.html5Only||e.url.match(/data:/i))},ne=function(e){var t;return e&&(t=ze?ot:me.html5.canPlayType("audio/wav")?"data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==":ot,e.src=t,e._called_unload!==i&&(e._called_load=!1)),He&&(ae=null),t},$=function(e){if(!me.useHTML5Audio||!me.hasHTML5)return!1;var t,n,o,r,a=e.url||null,s=e.type||null,u=me.audioFormats;if(s&&me.html5[s]!==i)return me.html5[s]&&!lt(s);if(!te){for(r in te=[],u)u.hasOwnProperty(r)&&(te.push(r),u[r].related&&(te=te.concat(u[r].related)));te=new RegExp("\\.("+te.join("|")+")(\\?.*)?$","i")}return(o=a?a.toLowerCase().match(te):null)&&o.length?o=o[1]:s?o=(-1!==(n=s.indexOf(";"))?s.substr(0,n):s).substr(6):t=!1,o&&me.html5[o]!==i?t=me.html5[o]&&!lt(o):(s="audio/"+o,t=me.html5.canPlayType({type:s}),me.html5[o]=t,t=t&&me.html5[s]&&!lt(s)),t},re=function(){if(!me.useHTML5Audio||!me.hasHTML5)return me.html5.usingFlash=!0,Ve=!0,!1;var e,t,n,o,r=Audio!==i?Je&&opera.version()<10?new Audio(null):new Audio:null,a={};function s(e){var t,n,i=!1,a=!1;if(!r||"function"!=typeof r.canPlayType)return i;if(e instanceof Array){for(o=0,n=e.length;o<n;o++)(me.html5[e[o]]||r.canPlayType(e[o]).match(me.html5Test))&&(a=!0,me.html5[e[o]]=!0,me.flash[e[o]]=!!e[o].match(nt));i=a}else i=!(!(t=!(!r||"function"!=typeof r.canPlayType)&&r.canPlayType(e))||!t.match(me.html5Test));return i}for(e in n=me.audioFormats)if(n.hasOwnProperty(e)&&(t="audio/"+e,a[e]=s(n[e].type),a[t]=a[e],e.match(nt)?(me.flash[e]=!0,me.flash[t]=!0):(me.flash[e]=!1,me.flash[t]=!1),n[e]&&n[e].related))for(o=n[e].related.length-1;o>=0;o--)a["audio/"+n[e].related[o]]=a[e],me.html5[n[e].related[o]]=a[e],me.flash[n[e].related[o]]=a[e];return a.canPlayType=r?s:null,me.html5=h(me.html5,a),me.html5.usingFlash=Y(),Ve=me.html5.usingFlash,!0},S={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:ve+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:Ae+"Verify that %s is a valid path.",tryDebug:"Try "+ve+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:Ae+"Non-HTTP page ("+_e.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/",waitFocus:Ae+"Special case: Waiting for SWF to load with window focus...",waitForever:Ae+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:Ae+"Waiting for 100% SWF load...",needFunction:Ae+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:Ae+"_debug(): Current sound objects",waitOnload:Ae+"Waiting for window.onload()",docLoaded:Ae+"Document already loaded",onload:Ae+"initComplete(): calling soundManager.onload()",onloadOK:ve+".onload() complete",didInit:Ae+"init(): Already called?",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",badRemove:Ae+"Failed to remove Flash node.",shutdown:ve+".disable(): Shutting down",queue:Ae+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+B.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:Ae+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:ve+".load(): current URL already assigned.",badFV:ve+'.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",needFlash:Ae+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:Ae+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:ve+".setup(): allowed parameters: %s",setupError:ve+'.setup(): "%s" cannot be assigned with this method.',setupUndef:ve+'.setup(): Could not find option "%s"',setupLate:ve+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:Ae+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:ve+".reset(): Removing event callbacks",mobileUA:"Mobile UA detected, preferring HTML5 by default.",globalHTML5:"Using singleton HTML5 Audio() pattern for this device.",ignoreMobile:"Ignoring mobile restrictions for this device."},j=function(){var e,t,n,o,r;if(o=(e=Be.call(arguments)).shift(),(r=S&&S[o]?S[o]:"")&&e&&e.length)for(t=0,n=e.length;t<n;t++)r=r.replace("%s",e[t]);return r},U=function(e){return 8===l&&e.loops>1&&e.stream&&(f("as2loop"),e.stream=!1),e},N=function(e,t){return e&&!e.usePolicyFile&&(e.onid3||e.usePeakData||e.useWaveformData||e.useEQData)&&(me._wD((t||"")+j("policy")),e.usePolicyFile=!0),e},G=function(e){Xe&&console.warn!==i?console.warn(e):me._wD(e)},a=function(){return!1},q=function(e){var t;for(t in e)e.hasOwnProperty(t)&&"function"==typeof e[t]&&(e[t]=a);t=null},F=function(e){e===i&&(e=!1),(Me||e)&&me.disable(e)},R=function(e){var t;if(e)if(e.match(/\.swf(\?.*)?$/i)){if(e.substr(e.toLowerCase().lastIndexOf(".swf?")+4))return e}else e.lastIndexOf("/")!==e.length-1&&(e+="/");return t=(e&&-1!==e.lastIndexOf("/")?e.substr(0,e.lastIndexOf("/")+1):"./")+me.movieURL,me.noSWFCache&&(t+="?ts="+(new Date).getTime()),t},_=function(){8!==(l=parseInt(me.flashVersion,10))&&9!==l&&(me._wD(j("badFV",l,8)),me.flashVersion=l=8);var e=me.debugMode||me.debugFlash?"_debug.swf":".swf";me.useHTML5Audio&&!me.html5Only&&me.audioFormats.mp4.required&&l<9&&(me._wD(j("needfl9")),me.flashVersion=l=9),me.version=me.versionNumber+(me.html5Only?" (HTML5-only mode)":9===l?" (AS3/Flash 9)":" (AS2/Flash 8)"),l>8?(me.defaultOptions=h(me.defaultOptions,me.flash9Options),me.features.buffering=!0,me.defaultOptions=h(me.defaultOptions,me.movieStarOptions),me.filePatterns.flash9=new RegExp("\\.(mp3|"+st.join("|")+")(\\?.*)?$","i"),me.features.movieStar=!0):me.features.movieStar=!1,me.filePattern=me.filePatterns[8!==l?"flash9":"flash8"],me.movieURL=(8===l?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",e),me.features.peakData=me.features.waveformData=me.features.eqData=l>8},L=function(e,t){ye&&ye._setPolling(e,t)},C=function(){if(me.debugURLParam.test(we)&&(me.setupOptions.debugMode=me.debugMode=!0),!o(me.debugID)){var e,t,n,r,i;if(me.debugMode&&!o(me.debugID)&&(!Xe||!me.useConsole||!me.consoleOnly)){for(i in(e=_e.createElement("div")).id=me.debugID+"-toggle",r={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001},e.appendChild(_e.createTextNode("-")),e.onclick=H,e.title="Toggle SM2 debug console",be.match(/msie 6/i)&&(e.style.position="absolute",e.style.cursor="hand"),r)r.hasOwnProperty(i)&&(e.style[i]=r[i]);if((t=_e.createElement("div")).id=me.debugID,t.style.display=me.debugMode?"block":"none",me.debugMode&&!o(e.id)){try{(n=T()).appendChild(e)}catch(e){throw new Error(j("domError")+" \n"+e.toString())}n.appendChild(t)}}n=null}},Q=this.getSoundById,f=function(e,t){return e?me._wD(j(e),t):""},H=function(){var e=o(me.debugID),t=o(me.debugID+"-toggle");e&&(Se?(t.innerHTML="+",e.style.display="none"):(t.innerHTML="-",e.style.display="block"),Se=!Se)},c=function(e,t,n){if(r.sm2Debugger!==i)try{sm2Debugger.handleEvent(e,t,n)}catch(e){return!1}return!0},V=function(){var e=[];return me.debugMode&&e.push(B.sm2Debug),me.debugFlash&&e.push(B.flashDebug),me.useHighPerformance&&e.push(B.highPerf),e.join(" ")},x=function(){var e=j("fbHandler"),t=me.getMoviePercent(),n=B,o={type:"FLASHBLOCK"};me.html5Only||(me.ok()?(me.didFlashBlock&&me._wD(e+": Unblocked"),me.oMC&&(me.oMC.className=[V(),n.swfDefault,n.swfLoaded+(me.didFlashBlock?" "+n.swfUnblocked:"")].join(" "))):(Ve&&(me.oMC.className=V()+" "+n.swfDefault+" "+(null===t?n.swfTimedout:n.swfError),me._wD(e+": "+j("fbTimeout")+(t?" ("+j("fbLoaded")+")":""))),me.didFlashBlock=!0,y({type:"ontimeout",ignoreInit:!0,error:o}),D(o)))},g=function(e,t,n){ke[e]===i&&(ke[e]=[]),ke[e].push({method:t,scope:n||null,fired:!1})},y=function(e){if(e||(e={type:me.ok()?"onready":"ontimeout"}),!Ee&&e&&!e.ignoreInit)return!1;if("ontimeout"===e.type&&(me.ok()||Me&&!e.ignoreInit))return!1;var t,n,o={success:e&&e.ignoreInit?me.ok():!Me},r=e&&e.type&&ke[e.type]||[],i=[],a=[o],s=Ve&&!me.ok();for(e.error&&(a[0].error=e.error),t=0,n=r.length;t<n;t++)!0!==r[t].fired&&i.push(r[t]);if(i.length)for(t=0,n=i.length;t<n;t++)i[t].scope?i[t].method.apply(i[t].scope,a):i[t].method.apply(this,a),s||(i[t].fired=!0);return!0},v=function(){r.setTimeout(function(){me.useFlashBlock&&x(),y(),"function"==typeof me.onload&&(f("onload",1),me.onload.apply(r),f("onloadOK",1)),me.waitForWindowLoad&&ie.add(r,"load",v)},1)},ue=function(){if(se!==i)return se;var e,t,n,o,a=!1,s=navigator,u=r.ActiveXObject;try{o=s.plugins}catch(e){o=void 0}if(o&&o.length)t="application/x-shockwave-flash",(n=s.mimeTypes)&&n[t]&&n[t].enabledPlugin&&n[t].enabledPlugin.description&&(a=!0);else if(u!==i&&!be.match(/MSAppHost/i)){try{e=new u("ShockwaveFlash.ShockwaveFlash")}catch(t){e=null}a=!!e,e=null}return se=a,a},Y=function(){var e,t,n=me.audioFormats;if(Ge&&be.match(/os (1|2|3_0|3_1)\s/i)?(me.hasHTML5=!1,me.html5Only=!0,me.oMC&&(me.oMC.style.display="none")):me.useHTML5Audio&&(me.html5&&me.html5.canPlayType||(me._wD("SoundManager: No HTML5 Audio() support detected."),me.hasHTML5=!1),Ye&&me._wD(Ae+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(se?"will use flash fallback for MP3/MP4, if available":" would use flash fallback for MP3/MP4, but none detected."),1)),me.useHTML5Audio&&me.hasHTML5)for(t in Z=!0,n)n.hasOwnProperty(t)&&n[t].required&&(me.html5.canPlayType(n[t].type)?me.preferFlash&&(me.flash[t]||me.flash[n[t].type])&&(e=!0):(Z=!1,e=!0));return me.ignoreFlash&&(e=!1,Z=!0),me.html5Only=me.hasHTML5&&me.useHTML5Audio&&!e,!me.html5Only},J=function(e){var t,n,o,r=0;if(e instanceof Array){for(t=0,n=e.length;t<n;t++)if(e[t]instanceof Object){if(me.canPlayMIME(e[t].type)){r=t;break}}else if(me.canPlayURL(e[t])){r=t;break}e[r].url&&(e[r]=e[r].url),o=e[r]}else o=e;return o},K=function(e){e._hasTimer||(e._hasTimer=!0,!Ze&&me.html5PollingInterval&&(null===je&&0===Re&&(je=setInterval(z,me.html5PollingInterval)),Re++))},W=function(e){e._hasTimer&&(e._hasTimer=!1,!Ze&&me.html5PollingInterval&&Re--)},z=function(){var e;if(null!==je&&!Re)return clearInterval(je),void(je=null);for(e=me.soundIDs.length-1;e>=0;e--)me.sounds[me.soundIDs[e]].isHTML5&&me.sounds[me.soundIDs[e]]._hasTimer&&me.sounds[me.soundIDs[e]]._onTimer()},D=function(e){e=e!==i?e:{},"function"==typeof me.onerror&&me.onerror.apply(r,[{type:e.type!==i?e.type:null}]),e.fatal!==i&&e.fatal&&me.disable()},le=function(){if(Ye&&ue()){var e,t,n=me.audioFormats;for(t in n)if(n.hasOwnProperty(t)&&("mp3"===t||"mp4"===t)&&(me._wD(ve+": Using flash fallback for "+t+" format"),me.html5[t]=!1,n[t]&&n[t].related))for(e=n[t].related.length-1;e>=0;e--)me.html5[n[t].related[e]]=!1}},this._setSandboxType=function(e){var t=me.sandbox;t.type=e,t.description=t.types[t.types[e]!==i?e:"unknown"],"localWithFile"===t.type?(t.noRemote=!0,t.noLocal=!1,f("secNote",2)):"localWithNetwork"===t.type?(t.noRemote=!1,t.noLocal=!0):"localTrusted"===t.type&&(t.noRemote=!1,t.noLocal=!1)},this._externalInterfaceOK=function(e){if(!me.swfLoaded){var t;if(c("swf",!0),c("flashtojs",!0),me.swfLoaded=!0,et=!1,Ye&&le(),!e||e.replace(/\+dev/i,"")!==me.versionNumber.replace(/\+dev/i,""))return t=ve+': Fatal: JavaScript file build "'+me.versionNumber+'" does not match Flash SWF build "'+e+'" at '+me.url+". Ensure both are up-to-date.",void setTimeout(function(){throw new Error(t)},0);setTimeout(u,Ke?100:1)}},I=function(e,t){if(Oe&&Pe)return!1;function n(){var e,t=[],n=[];e="SoundManager "+me.version+(!me.html5Only&&me.useHTML5Audio?me.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),me.html5Only?me.html5PollingInterval&&t.push("html5PollingInterval ("+me.html5PollingInterval+"ms)"):(me.preferFlash&&t.push("preferFlash"),me.useHighPerformance&&t.push("useHighPerformance"),me.flashPollingInterval&&t.push("flashPollingInterval ("+me.flashPollingInterval+"ms)"),me.html5PollingInterval&&t.push("html5PollingInterval ("+me.html5PollingInterval+"ms)"),me.wmode&&t.push("wmode ("+me.wmode+")"),me.debugFlash&&t.push("debugFlash"),me.useFlashBlock&&t.push("flashBlock")),t.length&&(n=n.concat([t.join(" + ")])),me._wD(e+(n.length?" + "+n.join(", "):""),1),fe()}if(me.html5Only)return _(),n(),me.oMC=o(me.movieID),u(),Oe=!0,Pe=!0,!1;var r,a,s,l,c,f,d,h,p,m=t||me.url,g=me.altURL||m,y=T(),v=V(),A=_e.getElementsByTagName("html")[0];function b(e,t){return'<param name="'+e+'" value="'+t+'" />'}if(r=A&&A.dir&&A.dir.match(/rtl/i),e=e===i?me.id:e,_(),me.url=R(rt?m:g),t=me.url,me.wmode=!me.wmode&&me.useHighPerformance?"transparent":me.wmode,null!==me.wmode&&(be.match(/msie 8/i)||!Ke&&!me.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(xe.push(S.spcWmode),me.wmode=null),a={name:e,id:e,src:t,quality:"high",allowScriptAccess:me.allowScriptAccess,bgcolor:me.bgColor,pluginspage:it+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:me.wmode,hasPriority:"true"},me.debugFlash&&(a.FlashVars="debug=1"),me.wmode||delete a.wmode,Ke)s=_e.createElement("div"),c=['<object id="'+e+'" data="'+t+'" type="'+a.type+'" title="'+a.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',b("movie",t),b("AllowScriptAccess",me.allowScriptAccess),b("quality",a.quality),me.wmode?b("wmode",me.wmode):"",b("bgcolor",me.bgColor),b("hasPriority","true"),me.debugFlash?b("FlashVars",a.FlashVars):"","</object>"].join("");else for(l in s=_e.createElement("embed"),a)a.hasOwnProperty(l)&&s.setAttribute(l,a[l]);if(C(),v=V(),y=T())if(me.oMC=o(me.movieID)||_e.createElement("div"),me.oMC.id)p=me.oMC.className,me.oMC.className=(p?p+" ":B.swfDefault)+(v?" "+v:""),me.oMC.appendChild(s),Ke&&((f=me.oMC.appendChild(_e.createElement("div"))).className=B.swfBox,f.innerHTML=c),Pe=!0;else{if(me.oMC.id=me.movieID,me.oMC.className=B.swfDefault+" "+v,d=null,f=null,me.useFlashBlock||(me.useHighPerformance?d={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(d={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},r&&(d.left=Math.abs(parseInt(d.left,10))+"px"))),We&&(me.oMC.style.zIndex=1e4),!me.debugFlash)for(h in d)d.hasOwnProperty(h)&&(me.oMC.style[h]=d[h]);try{Ke||me.oMC.appendChild(s),y.appendChild(me.oMC),Ke&&((f=me.oMC.appendChild(_e.createElement("div"))).className=B.swfBox,f.innerHTML=c),Pe=!0}catch(e){throw new Error(j("domError")+" \n"+e.toString())}}return Oe=!0,n(),!0},O=function(){return me.html5Only?(I(),!1):!ye&&(me.url?((ye=me.getMovie(me.id))||(Le?(Ke?me.oMC.innerHTML=Ce:me.oMC.appendChild(Le),Le=null,Oe=!0):I(me.id,me.url),ye=me.getMovie(me.id)),"function"==typeof me.oninitmovie&&setTimeout(me.oninitmovie,1),de(),!0):(f("noURL"),!1))},A=function(){setTimeout(b,1e3)},w=function(){r.setTimeout(function(){G(Ae+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),me.setup({preferFlash:!1}).reboot(),me.didFlashBlock=!0,me.beginDelayedInit()},1)},b=function(){var e,t=!1;me.url&&(qe||(qe=!0,ie.remove(r,"load",A),se&&et&&!$e?f("waitFocus"):(Ee||(e=me.getMoviePercent())>0&&e<100&&(t=!0),setTimeout(function(){if(e=me.getMoviePercent(),t)return qe=!1,me._wD(j("waitSWF")),void r.setTimeout(A,1);Ee||(me._wD(ve+": No Flash response within expected time. Likely causes: "+(0===e?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(me.debugFlash?" "+j("checkSWF"):""),2),!rt&&e&&(f("localFail",2),me.debugFlash||f("tryDebug",2)),0===e&&me._wD(j("swf404",me.url),1),c("flashtojs",!1,": Timed out"+(rt?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),!Ee&&tt&&(null===e?me.useFlashBlock||0===me.flashLoadTimeout?(me.useFlashBlock&&x(),f("waitForever")):!me.useFlashBlock&&Z?w():(f("waitForever"),y({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===me.flashLoadTimeout?f("waitForever"):!me.useFlashBlock&&Z?w():F(!0))},me.flashLoadTimeout))))},k=function(){function e(){ie.remove(r,"focus",k)}return $e||!et?(e(),!0):(tt=!0,$e=!0,f("gotFocus"),qe=!1,A(),e(),!0)},de=function(){xe.length&&(me._wD("SoundManager 2: "+xe.join(" "),1),xe=[])},fe=function(){de();var e,t=[];if(me.useHTML5Audio&&me.hasHTML5){for(e in me.audioFormats)me.audioFormats.hasOwnProperty(e)&&t.push(e+" = "+me.html5[e]+(!me.html5[e]&&Ve&&me.flash[e]?" (using flash)":me.preferFlash&&me.flash[e]&&Ve?" (preferring flash)":me.html5[e]?"":" ("+(me.audioFormats[e].required?"required, ":"")+"and no flash support)"));me._wD("SoundManager 2 HTML5 support: "+t.join(", "),1)}},d=function(e){if(Ee)return!1;if(me.html5Only)return f("sm2Loaded",1),Ee=!0,v(),c("onload",!0),!0;var t,n=!0;return me.useFlashBlock&&me.flashLoadTimeout&&!me.getMoviePercent()||(Ee=!0),t={type:!se&&Ve?"NO_FLASH":"INIT_TIMEOUT"},me._wD("SoundManager 2 "+(Me?"failed to load":"loaded")+" ("+(Me?"Flash security/load error":"OK")+") "+String.fromCharCode(Me?10006:10003),Me?2:1),Me||e?(me.useFlashBlock&&me.oMC&&(me.oMC.className=V()+" "+(null===me.getMoviePercent()?B.swfTimedout:B.swfError)),y({type:"ontimeout",error:t,ignoreInit:!0}),c("onload",!1),D(t),n=!1):c("onload",!0),Me||(me.waitForWindowLoad&&!Te?(f("waitOnload"),ie.add(r,"load",v)):(me.waitForWindowLoad&&Te&&f("docLoaded"),v())),n},s=function(){var e,t=me.setupOptions;for(e in t)t.hasOwnProperty(e)&&(me[e]===i?me[e]=t[e]:me[e]!==t[e]&&(me.setupOptions[e]=me[e]))},u=function(){if(Ee)return f("didInit"),!1;function e(){ie.remove(r,"load",me.beginDelayedInit)}if(me.html5Only)return Ee||(e(),me.enabled=!0,d()),!0;O();try{ye._externalInterfaceTest(!1),L(!0,me.flashPollingInterval||(me.useHighPerformance?10:50)),me.debugMode||ye._disableDebug(),me.enabled=!0,c("jstoflash",!0),me.html5Only||ie.add(r,"unload",a)}catch(e){return me._wD("js/flash exception: "+e.toString()),c("jstoflash",!1),D({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),F(!0),d(),!1}return d(),e(),!0},P=function(){return!M&&(M=!0,s(),C(),!se&&me.hasHTML5&&(me._wD("SoundManager 2: No Flash detected"+(me.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),me.setup({useHTML5Audio:!0,preferFlash:!1})),re(),!se&&Ve&&(xe.push(S.needFlash),me.setup({flashLoadTimeout:1})),_e.removeEventListener&&_e.removeEventListener("DOMContentLoaded",P,!1),O(),!0)},oe=function(){return"complete"===_e.readyState&&(P(),_e.detachEvent("onreadystatechange",oe)),!0},E=function(){Te=!0,P(),ie.remove(r,"load",E)},ue(),ie.add(r,"focus",k),ie.add(r,"load",A),ie.add(r,"load",E),_e.addEventListener?_e.addEventListener("DOMContentLoaded",P,!1):_e.attachEvent?_e.attachEvent("onreadystatechange",oe):(c("onload",!1),D({type:"NO_DOM2_EVENTS",fatal:!0}))}r.SM2_DEFER!==i&&SM2_DEFER||(a=new s),e&&"object"==typeof e.exports?(e.exports.SoundManager=s,e.exports.soundManager=a):void 0===(o=function(){return{constructor:s,getInstance:function(e){if(!r.soundManager&&e instanceof Function){var t=e(s);t instanceof s&&(r.soundManager=t)}return r.soundManager}}}.call(t,n,t,e))||(e.exports=o),r.SoundManager=s,r.soundManager=a}(window)},2762:function(e,t,n){"use strict";var o=n(6518),r=n(3802).trim;o({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return r(this)}})},3638:function(e,t,n){"use strict";n(2675),n(9463),n(2259),n(5700),n(8706),n(2008),n(113),n(3418),n(3792),n(8598),n(2062),n(4782),n(6910),n(9572),n(2010),n(8130),n(9085),n(5506),n(3851),n(1278),n(875),n(9432),n(6099),n(8459),n(3362),n(825),n(888),n(7495),n(8781),n(7764),n(1761),n(1392),n(3500),n(2953),n(5440);var o=n(9073),r=n(1669);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var a=o&&o.prototype instanceof l?o:l,c=Object.create(a.prototype);return s(c,"_invoke",function(n,o,r){var i,a,s,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,a=0,s=e,d.n=n,u}};function h(n,o){for(a=n,s=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(a=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,a=0))}if(r||n>1)return u;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),a=c,s=p;(t=a<2?e:s)||!f;){i||(a?a<3?(a>1&&(d.n=-1),h(a,s)):d.n=s:d.v=s);try{if(l=2,i){if(a||(r="next"),t=i[r]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),a=1);i=e}else if((t=(f=d.n<0)?s:n.call(o,d))!==u)break}catch(t){i=e,a=1,s=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),c}var u={};function l(){}function c(){}function f(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(s(t={},o,function(){return this}),t),h=f.prototype=l.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e}return c.prototype=f,s(h,"constructor",f),s(f,"constructor",c),c.displayName="GeneratorFunction",s(f,r,"GeneratorFunction"),s(h),s(h,r,"Generator"),s(h,o,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:p}})()}function s(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}s=function(e,t,n,o){function i(t,n){s(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},s(e,t,n,o)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=c(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function d(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p(o.key),o)}}function p(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}var m=function(){function e(t,n,o,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.leafIndex=t,this.chunkIndex=n,this.text=o,this.lineRects=r}return t=e,n=[{key:"fetch",value:(i=a().m(function t(n,i){var s,c,f,d,h,p,m,g,y,v,A,b;return a().w(function(t){for(;;)switch(t.n){case 0:if(null===(s=window.br.plugins.translate)||void 0===s||!s.translationManager.active){t.n=2;break}return t.n=1,window.br.plugins.translate.getTranslateLayers(i);case 1:c=t.v,f=Array.from(c[0].childNodes),d=[],h=l(f.entries());try{for(h.s();!(p=h.n()).done;)m=u(p.value,2),g=m[0],(y=m[1]).classList.contains("ocr-role-header-footer")||(v=new e(i,g,y.textContent,[]),d.push(v))}catch(e){h.e(e)}finally{h.f()}return 0===d.length&&(A=new e(i,0,"",[]),d.push(A)),t.a(2,d);case 2:return t.n=3,r.ajax({type:"GET",url:(0,o.g)(n,{pageIndex:i}),cache:!0,xhrFields:{withCredentials:window.br.protected}});case 3:return b=t.v,t.a(2,e._fromTextWrapperResponse(i,b));case 4:return t.a(2)}},t)}),s=function(){var e=this,t=arguments;return new Promise(function(n,o){var r=i.apply(e,t);function a(e){d(r,n,o,a,s,"next",e)}function s(e){d(r,n,o,a,s,"throw",e)}a(void 0)})},function(e,t){return s.apply(this,arguments)})},{key:"_fromTextWrapperResponse",value:function(t,n){return n.map(function(n,o){var r=e._fixChunkRects(n.slice(1)),i=e._removeDanglingHyphens(n[0]);return new e(t,o,i,r)})}},{key:"_fixChunkRects",value:function(e){if(e.length<2)return e;var t=u(e,2),n=t[0],o=t[1],r=u(n,3),i=r[0],a=r[1],s=r[2]-i,l=o[1]-o[3],c=o[2]-o[0],f=o[2];return s>30*c&&(n[2]=f,n[3]=a-l),e}},{key:"_removeDanglingHyphens",value:function(e){return e.replace(/[-¬]\s+/g,"")}}],n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,i,s}();function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function y(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return v(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(v(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,v(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,v(f,"constructor",l),v(l,"constructor",u),u.displayName="GeneratorFunction",v(l,r,"GeneratorFunction"),v(f),v(f,r,"Generator"),v(f,o,function(){return this}),v(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:i,m:d}})()}function v(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}v=function(e,t,n,o){function i(t,n){v(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},v(e,t,n,o)}function A(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function b(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,w(o.key),o)}}function w(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}var _=function(){function e(t,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pageCount=t,this.opts=Object.assign({},k,o),this._cursor={page:n,chunk:0},this._bufferedPages={},this._bufferingPages={},this._cursorLock=Promise.resolve()}return t=e,n=[{key:"next",value:function(){var e=this;return this._cursorLock=this._cursorLock.then(function(){return e._nextUncontrolled()})}},{key:"decrement",value:function(){var e=this;return this._cursorLock=this._cursorLock.then(function(){return e._decrementUncontrolled()})}},{key:"_nextUncontrolled",value:(o=y().m(function t(){var n;return y().w(function(t){for(;;)switch(t.n){case 0:if(this._cursor.page!=this.pageCount){t.n=1;break}return t.a(2,Promise.resolve(e.AT_END));case 1:return this._recenterBuffer(this._cursor.page),t.n=2,this._fetchPageChunks(this._cursor.page);case 2:if(n=t.v,this._cursor.chunk!=n.length){t.n=3;break}return this._cursor.page++,this._cursor.chunk=0,t.a(2,this._nextUncontrolled());case 3:return t.a(2,n[this._cursor.chunk++])}},t,this)}),r=function(){var e=this,t=arguments;return new Promise(function(n,r){var i=o.apply(e,t);function a(e){A(i,n,r,a,s,"next",e)}function s(e){A(i,n,r,a,s,"throw",e)}a(void 0)})},function(){return r.apply(this,arguments)})},{key:"_decrementUncontrolled",value:function(){var e=this,t=Promise.resolve();return this._cursor.chunk>0?this._cursor.chunk--:this._cursor.page>0&&(this._cursor.page--,t=this._fetchPageChunks(this._cursor.page).then(function(t){if(0==t.length)return e._decrementUncontrolled();e._cursor.chunk=t.length-1})),t.then(function(){return e._fetchPageChunks(e._cursor.page)})}},{key:"_recenterBuffer",value:function(e){for(var t=Math.max(0,e-this.opts.pageBufferSize),n=Math.min(this.pageCount,e+this.opts.pageBufferSize+1),o=t;o<n;o++)this._fetchPageChunks(o);this._removePageFromBuffer(t-1),this._removePageFromBuffer(n+1)}},{key:"_removePageFromBuffer",value:function(e){delete this._bufferingPages[e],delete this._bufferedPages[e]}},{key:"_fetchPageChunks",value:function(e){var t=this;return e in this._bufferingPages?this._bufferingPages[e]:e in this._bufferedPages?Promise.resolve(this._bufferedPages[e]):(this._bufferingPages[e]=this._fetchPageChunksDirect(e).then(function(n){return delete t._bufferingPages[e],t._bufferedPages[e]=n,n}),this._bufferingPages[e])}},{key:"_fetchPageChunksDirect",value:function(e){return m.fetch(this.opts.pageChunkUrl,e)}}],n&&b(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o,r}();_.AT_END="__PageChunkIterator.AT_END__";var k={pageChunkUrl:null,pageBufferSize:2},S=n(4160),O=n(1669);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function M(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return T(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(T(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,T(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,T(f,"constructor",l),T(l,"constructor",u),u.displayName="GeneratorFunction",T(l,r,"GeneratorFunction"),T(f),T(f,r,"Generator"),T(f,o,function(){return this}),T(f,"toString",function(){return"[object Generator]"}),(M=function(){return{w:i,m:d}})()}function T(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}T=function(e,t,n,o){function i(t,n){T(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},T(e,t,n,o)}function I(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function D(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){I(i,o,r,a,s,"next",e)}function s(e){I(i,o,r,a,s,"throw",e)}a(void 0)})}}function L(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,C(o.key),o)}}function C(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}var q=function(){function e(t){var n,o,r,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,r=function(){i.voice=e.getBestBookVoice(i.getVoices(),i.opts.bookLanguage)},(o=C(o="updateBestVoice"))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,this.playing=!1,this.paused=!1,this.opts=t,this._chunkIterator=null,this.activeSound=null,this.playbackRate=1,this.events=O({}),this.voice=null,this.events.on("voiceschanged",this.updateBestVoice),this.events.trigger("voiceschanged")}return t=e,n=[{key:"getVoices",value:function(){throw new Error("Unimplemented abstract class")}},{key:"init",value:function(){return null}},{key:"start",value:function(e,t){this.playing=!0,this.paused=!1,this.opts.onLoadingStart(),this._chunkIterator=new _(t,e,{pageChunkUrl:this.opts.pageChunkUrl,pageBufferSize:3}),this.step(),this.events.trigger("start")}},{key:"stop",value:function(){this.activeSound&&this.activeSound.stop(),this.playing=!1,this.paused=!0,this._chunkIterator=null,this.activeSound=null,this.events.trigger("stop")}},{key:"pause",value:function(){var e=!this.paused&&this.activeSound;this.paused=!0,this.activeSound&&this.activeSound.pause(),e&&this.events.trigger("pause")}},{key:"resume",value:function(){var e=this.paused&&this.activeSound;this.paused=!1,this.activeSound&&this.activeSound.resume(),e&&this.events.trigger("resume")}},{key:"togglePlayPause",value:function(){this.paused?this.resume():this.pause()}},{key:"jumpForward",value:function(){this.activeSound&&this.activeSound.finish()}},{key:"jumpBackward",value:(i=D(M().m(function e(){var t=this;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.all([this.activeSound.stop(),this._chunkIterator.decrement().then(function(){return t._chunkIterator.decrement()})]);case 1:this.step();case 2:return e.a(2)}},e,this)})),function(){return i.apply(this,arguments)})},{key:"setVoice",value:function(e){this.events.off("voiceschanged",this.updateBestVoice),this.voice=this.getVoices().find(function(t){return t.voiceURI===e}),this.opts.bookLanguage&&(0,S.ND)()&&localStorage.setItem("BRtts-voice-".concat(this.opts.bookLanguage),this.voice.voiceURI),this.activeSound&&this.activeSound.setVoice(this.voice)}},{key:"setPlaybackRate",value:function(e){this.playbackRate=e,this.activeSound&&this.activeSound.setPlaybackRate(e)}},{key:"step",value:(r=D(M().m(function e(){var t,n,o,r=this;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._chunkIterator.next();case 1:if((t=e.v)!=_.AT_END){e.n=2;break}return this.stop(),this.opts.onDone(),e.a(2);case 2:return this.opts.onLoadingStart(),(n=this.createSound(t)).chunk=t,n.rate=this.playbackRate,n.voice=this.voice,n.load(function(){return r.opts.onLoadingComplete()}),this.opts.onLoadingComplete(),e.n=3,this.opts.beforeChunkPlay(t);case 3:if(this.playing){e.n=4;break}return e.a(2);case 4:return e.n=5,this.playSound(n).then(function(){return r.opts.afterChunkPlay(n.chunk)});case 5:return o=e.v,this.paused&&this.pause(),e.n=6,o;case 6:if(!this.playing){e.n=7;break}return e.a(2,this.step());case 7:return e.a(2)}},e,this)})),function(){return r.apply(this,arguments)})},{key:"createSound",value:function(e){throw new Error("Unimplemented abstract class")}},{key:"playSound",value:function(e){return this.activeSound=e,this.activeSound.loaded||this.opts.onLoadingStart(),this.activeSound.play()}},{key:"getBestVoice",value:function(t){return e.getBestBookVoice(this.getVoices(),t||this.opts.bookLanguage)}}],o=[{key:"isSupported",value:function(){throw new Error("Unimplemented abstract class")}},{key:"getBestBookVoice",value:function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:navigator.languages,r=t.filter(function(e){return e.lang.startsWith(n)}),i=(o=o||(navigator.language?[navigator.language]:[])).filter(function(e){return e.startsWith(n)});return e.getMatchingStoredVoice(r,n)||e.getMatchingVoice(i,r)||r.find(function(e){return e.default})||r[0]||e.getMatchingVoice(o,t)||t.find(function(e){return e.default})||t[0]}},{key:"getMatchingStoredVoice",value:function(e,t){var n=(0,S.ND)()&&localStorage.getItem("BRtts-voice-".concat(t));return n?e.find(function(e){return e.voiceURI===n}):void 0}},{key:"getMatchingVoice",value:function(e,t){var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e);try{var r,i=function(){var e=n.value,o=t.filter(function(t){return t.lang.replace("_","-").startsWith(e)});if(o.length)return{v:o.find(function(e){return e.default})||o[0]}};for(o.s();!(n=o.n()).done;)if(r=i())return r.v}catch(e){o.e(e)}finally{o.f()}}}],n&&L(t.prototype,n),o&&L(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o,r,i}(),F=n(8004),R=(n(2443),n(1792),n(1669));function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function x(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return V(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(V(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,V(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,V(f,"constructor",l),V(l,"constructor",u),u.displayName="GeneratorFunction",V(l,r,"GeneratorFunction"),V(f),V(f,r,"Generator"),V(f,o,function(){return this}),V(f,"toString",function(){return"[object Generator]"}),(x=function(){return{w:i,m:d}})()}function V(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}V=function(e,t,n,o){function i(t,n){V(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},V(e,t,n,o)}function B(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function H(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){B(i,o,r,a,s,"next",e)}function s(e){B(i,o,r,a,s,"throw",e)}a(void 0)})}}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Q(o.key),o)}}function G(e,t,n){return t&&N(e.prototype,t),n&&N(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q(e){var t=function(e){if("object"!=j(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:t+""}function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(K=function(){return!!e})()}function W(){return W="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=z(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},W.apply(null,arguments)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}var Z=function(e){function t(e){var n,o,r,i,a;return U(this,t),(r=this,i=t,a=[e],i=z(i),o=function(e,t){if(t&&("object"==j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,K()?Reflect.construct(i,a||[],z(r).constructor):i.apply(r,a))).audioFormat=null!==(n=R.browser)&&void 0!==n&&n.mozilla?"ogg":"mp3",o.festivalUrl=e.festivalUrl,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(t,e),G(t,[{key:"getVoices",value:function(){return[{default:!0,lang:"en-US",localService:!1,name:"Festival - English (US)",voiceURI:null}]}},{key:"init",value:function(){soundManager.setup({debugMode:!1,preferFlash:!0,url:"/bookreader/BookReader/soundmanager/swf",useHTML5Audio:!0,flashVersion:9})}},{key:"start",value:function(e,n){var o=this,r=null;navigator.userAgent.match(/mobile/i)&&(r=this.iOSCaptureUserIntentHack()),(r=r||Promise.resolve()).then(function(){return(r=t,i=o,"function"==typeof(a=W(z(1&3?r.prototype:r),"start",i))?function(e){return a.apply(i,e)}:a)([e,n]);var r,i,a})}},{key:"createSound",value:function(e){return new Y((0,o.g)(this.festivalUrl,{text:e.text,format:this.audioFormat}))}},{key:"iOSCaptureUserIntentHack",value:(n=H(x().m(function e(){var t;return x().w(function(e){for(;;)switch(e.n){case 0:return t=soundManager.createSound({url:X[this.audioFormat]}),e.n=1,new Promise(function(e){return t.play({onfinish:e})});case 1:t.destruct();case 2:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})}],[{key:"isSupported",value:function(){return"undefined"!=typeof soundManager&&soundManager.supported()}}]);var n}(q),Y=function(){return G(function e(t){U(this,e),this.soundUrl=t,this.sound=null,this.rate=1,this._finishResolver=null},[{key:"loaded",get:function(){return this.sound&&this.sound.loaded}},{key:"load",value:function(e){var t,n=this;return this.sound=soundManager.createSound({url:this.soundUrl,onload:function(){1!=n.rate&&n.sound.setPlaybackRate(n.rate),e()},onresume:(t=H(x().m(function e(){return x().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,(0,F.sleep)(25);case 1:1!=n.rate&&n.sound.setPlaybackRate(n.rate);case 2:return e.a(2)}},e)})),function(){return t.apply(this,arguments)})}),this.sound.load()}},{key:"play",value:(e=H(x().m(function e(){var t=this;return x().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,new Promise(function(e){t._finishResolver=e,t.sound.play({onfinish:e})});case 1:this.sound.destruct();case 2:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})},{key:"stop",value:function(){return this.sound.stop(),Promise.resolve()}},{key:"pause",value:function(){this.sound.pause()}},{key:"resume",value:function(){this.sound.resume()}},{key:"setPlaybackRate",value:function(e){this.rate=e,this.sound.setPlaybackRate(e)}},{key:"finish",value:function(){this.sound.stop(),this._finishResolver()}}]);var e}(),X={mp3:"data:audio/mp3;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAAAeTEFNRTMuOTlyBJwAAAAAAAAAADUgJAaUQQABrgAAAnHIf8sZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADwlwBKGAAACAAAD/AAAAEAAAAH///////////////+UBAMExBTUUzLjk5LjOqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xDEIAPAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==",ogg:"data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAVEgAAAAAAAADSDf4BHgF2b3JiaXMAAAAAAUSsAAAAAAAAAHcBAAAAAAC4AU9nZ1MAAAAAAAAAAAAAFRIAAAEAAAB4VKTpEDv//////////////////8kDdm9yYmlzKwAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMTIwMjAzIChPbW5pcHJlc2VudCkAAAAAAQV2b3JiaXMpQkNWAQAIAAAAMUwgxYDQkFUAABAAAGAkKQ6TZkkppZShKHmYlEhJKaWUxTCJmJSJxRhjjDHGGGOMMcYYY4wgNGQVAAAEAIAoCY6j5klqzjlnGCeOcqA5aU44pyAHilHgOQnC9SZjbqa0pmtuziklCA1ZBQAAAgBASCGFFFJIIYUUYoghhhhiiCGHHHLIIaeccgoqqKCCCjLIIINMMumkk0466aijjjrqKLTQQgsttNJKTDHVVmOuvQZdfHPOOeecc84555xzzglCQ1YBACAAAARCBhlkEEIIIYUUUogppphyCjLIgNCQVQAAIACAAAAAAEeRFEmxFMuxHM3RJE/yLFETNdEzRVNUTVVVVVV1XVd2Zdd2ddd2fVmYhVu4fVm4hVvYhV33hWEYhmEYhmEYhmH4fd/3fd/3fSA0ZBUAIAEAoCM5luMpoiIaouI5ogOEhqwCAGQAAAQAIAmSIimSo0mmZmquaZu2aKu2bcuyLMuyDISGrAIAAAEABAAAAAAAoGmapmmapmmapmmapmmapmmapmmaZlmWZVmWZVmWZVmWZVmWZVmWZVmWZVmWZVmWZVmWZVmWZVmWZVlAaMgqAEACAEDHcRzHcSRFUiTHciwHCA1ZBQDIAAAIAEBSLMVyNEdzNMdzPMdzPEd0RMmUTM30TA8IDVkFAAACAAgAAAAAAEAxHMVxHMnRJE9SLdNyNVdzPddzTdd1XVdVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVgdCQVQAABAAAIZ1mlmqACDOQYSA0ZBUAgAAAABihCEMMCA1ZBQAABAAAiKHkIJrQmvPNOQ6a5aCpFJvTwYlUmye5qZibc84555xszhnjnHPOKcqZxaCZ0JpzzkkMmqWgmdCac855EpsHranSmnPOGeecDsYZYZxzzmnSmgep2Vibc85Z0JrmqLkUm3POiZSbJ7W5VJtzzjnnnHPOOeecc86pXpzOwTnhnHPOidqba7kJXZxzzvlknO7NCeGcc84555xzzjnnnHPOCUJDVgEAQAAABGHYGMadgiB9jgZiFCGmIZMedI8Ok6AxyCmkHo2ORkqpg1BSGSeldILQkFUAACAAAIQQUkghhRRSSCGFFFJIIYYYYoghp5xyCiqopJKKKsoos8wyyyyzzDLLrMPOOuuwwxBDDDG00kosNdVWY4215p5zrjlIa6W11lorpZRSSimlIDRkFQAAAgBAIGSQQQYZhRRSSCGGmHLKKaegggoIDVkFAAACAAgAAADwJM8RHdERHdERHdERHdERHc/xHFESJVESJdEyLVMzPVVUVVd2bVmXddu3hV3Ydd/Xfd/XjV8XhmVZlmVZlmVZlmVZlmVZlmUJQkNWAQAgAAAAQgghhBRSSCGFlGKMMcecg05CCYHQkFUAACAAgAAAAABHcRTHkRzJkSRLsiRN0izN8jRP8zTRE0VRNE1TFV3RFXXTFmVTNl3TNWXTVWXVdmXZtmVbt31Ztn3f933f933f933f933f13UgNGQVACABAKAjOZIiKZIiOY7jSJIEhIasAgBkAAAEAKAojuI4jiNJkiRZkiZ5lmeJmqmZnumpogqEhqwCAAABAAQAAAAAAKBoiqeYiqeIiueIjiiJlmmJmqq5omzKruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6ruu6QGjIKgBAAgBAR3IkR3IkRVIkRXIkBwgNWQUAyAAACADAMRxDUiTHsixN8zRP8zTREz3RMz1VdEUXCA1ZBQAAAgAIAAAAAADAkAxLsRzN0SRRUi3VUjXVUi1VVD1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVXVNE3TNIHQkJUAABkAACNBBhmEEIpykEJuPVgIMeYkBaE5BqHEGISnEDMMOQ0idJBBJz24kjnDDPPgUigVREyDjSU3jiANwqZcSeU4CEJDVgQAUQAAgDHIMcQYcs5JyaBEzjEJnZTIOSelk9JJKS2WGDMpJaYSY+Oco9JJyaSUGEuKnaQSY4mtAACAAAcAgAALodCQFQFAFAAAYgxSCimFlFLOKeaQUsox5RxSSjmnnFPOOQgdhMoxBp2DECmlHFPOKccchMxB5ZyD0EEoAAAgwAEAIMBCKDRkRQAQJwDgcCTPkzRLFCVLE0XPFGXXE03XlTTNNDVRVFXLE1XVVFXbFk1VtiVNE01N9FRVE0VVFVXTlk1VtW3PNGXZVFXdFlXVtmXbFn5XlnXfM01ZFlXV1k1VtXXXln1f1m1dmDTNNDVRVFVNFFXVVFXbNlXXtjVRdFVRVWVZVFVZdmVZ91VX1n1LFFXVU03ZFVVVtlXZ9W1Vln3hdFVdV2XZ91VZFn5b14Xh9n3hGFXV1k3X1XVVln1h1mVht3XfKGmaaWqiqKqaKKqqqaq2baqurVui6KqiqsqyZ6qurMqyr6uubOuaKKquqKqyLKqqLKuyrPuqLOu2qKq6rcqysJuuq+u27wvDLOu6cKqurquy7PuqLOu6revGceu6MHymKcumq+q6qbq6buu6ccy2bRyjquq+KsvCsMqy7+u6L7R1IVFVdd2UXeNXZVn3bV93nlv3hbJtO7+t+8px67rS+DnPbxy5tm0cs24bv637xvMrP2E4jqVnmrZtqqqtm6qr67JuK8Os60JRVX1dlWXfN11ZF27fN45b142iquq6Ksu+sMqyMdzGbxy7MBxd2zaOW9edsq0LfWPI9wnPa9vGcfs64/Z1o68MCcePAACAAQcAgAATykChISsCgDgBAAYh5xRTECrFIHQQUuogpFQxBiFzTkrFHJRQSmohlNQqxiBUjknInJMSSmgplNJSB6GlUEproZTWUmuxptRi7SCkFkppLZTSWmqpxtRajBFjEDLnpGTOSQmltBZKaS1zTkrnoKQOQkqlpBRLSi1WzEnJoKPSQUippBJTSam1UEprpaQWS0oxthRbbjHWHEppLaQSW0kpxhRTbS3GmiPGIGTOScmckxJKaS2U0lrlmJQOQkqZg5JKSq2VklLMnJPSQUipg45KSSm2kkpMoZTWSkqxhVJabDHWnFJsNZTSWkkpxpJKbC3GWltMtXUQWgultBZKaa21VmtqrcZQSmslpRhLSrG1FmtuMeYaSmmtpBJbSanFFluOLcaaU2s1ptZqbjHmGlttPdaac0qt1tRSjS3GmmNtvdWae+8gpBZKaS2U0mJqLcbWYq2hlNZKKrGVklpsMebaWow5lNJiSanFklKMLcaaW2y5ppZqbDHmmlKLtebac2w19tRarC3GmlNLtdZac4+59VYAAMCAAwBAgAlloNCQlQBAFAAAQYhSzklpEHLMOSoJQsw5J6lyTEIpKVXMQQgltc45KSnF1jkIJaUWSyotxVZrKSm1FmstAACgwAEAIMAGTYnFAQoNWQkARAEAIMYgxBiEBhmlGIPQGKQUYxAipRhzTkqlFGPOSckYcw5CKhljzkEoKYRQSiophRBKSSWlAgAAChwAAAJs0JRYHKDQkBUBQBQAAGAMYgwxhiB0VDIqEYRMSiepgRBaC6111lJrpcXMWmqttNhACK2F1jJLJcbUWmatxJhaKwAA7MABAOzAQig0ZCUAkAcAQBijFGPOOWcQYsw56Bw0CDHmHIQOKsacgw5CCBVjzkEIIYTMOQghhBBC5hyEEEIIoYMQQgillNJBCCGEUkrpIIQQQimldBBCCKGUUgoAACpwAAAIsFFkc4KRoEJDVgIAeQAAgDFKOQehlEYpxiCUklKjFGMQSkmpcgxCKSnFVjkHoZSUWuwglNJabDV2EEppLcZaQ0qtxVhrriGl1mKsNdfUWoy15pprSi3GWmvNuQAA3AUHALADG0U2JxgJKjRkJQCQBwCAIKQUY4wxhhRiijHnnEMIKcWYc84pphhzzjnnlGKMOeecc4wx55xzzjnGmHPOOeccc84555xzjjnnnHPOOeecc84555xzzjnnnHPOCQAAKnAAAAiwUWRzgpGgQkNWAgCpAAAAEVZijDHGGBsIMcYYY4wxRhJijDHGGGNsMcYYY4wxxphijDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYW2uttdZaa6211lprrbXWWmutAEC/CgcA/wcbVkc4KRoLLDRkJQAQDgAAGMOYc445Bh2EhinopIQOQgihQ0o5KCWEUEopKXNOSkqlpJRaSplzUlIqJaWWUuogpNRaSi211loHJaXWUmqttdY6CKW01FprrbXYQUgppdZaiy3GUEpKrbXYYow1hlJSaq3F2GKsMaTSUmwtxhhjrKGU1lprMcYYay0ptdZijLXGWmtJqbXWYos11loLAOBucACASLBxhpWks8LR4EJDVgIAIQEABEKMOeeccxBCCCFSijHnoIMQQgghREox5hx0EEIIIYSMMeeggxBCCCGEkDHmHHQQQgghhBA65xyEEEIIoYRSSuccdBBCCCGUUELpIIQQQgihhFJKKR2EEEIooYRSSiklhBBCCaWUUkoppYQQQgihhBJKKaWUEEIIpZRSSimllBJCCCGUUkoppZRSQgihlFBKKaWUUkoIIYRSSimllFJKCSGEUEoppZRSSikhhBJKKaWUUkoppQAAgAMHAIAAI+gko8oibDThwgNQaMhKAIAMAABx2GrrKdbIIMWchJZLhJByEGIuEVKKOUexZUgZxRjVlDGlFFNSa+icYoxRT51jSjHDrJRWSiiRgtJyrLV2zAEAACAIADAQITOBQAEUGMgAgAOEBCkAoLDA0DFcBATkEjIKDArHhHPSaQMAEITIDJGIWAwSE6qBomI6AFhcYMgHgAyNjbSLC+gywAVd3HUghCAEIYjFARSQgIMTbnjiDU+4wQk6RaUOAgAAAAAAAQAeAACSDSAiIpo5jg6PD5AQkRGSEpMTlAAAAAAA4AGADwCAJAWIiIhmjqPD4wMkRGSEpMTkBCUAAAAAAAAAAAAICAgAAAAAAAQAAAAICE9nZ1MABCwAAAAAAAAAFRIAAAIAAAAPBTD1AgEBAAo="},$=n(7583);function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return ne(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(ne(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,ne(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,ne(f,"constructor",l),ne(l,"constructor",u),u.displayName="GeneratorFunction",ne(l,r,"GeneratorFunction"),ne(f),ne(f,r,"Generator"),ne(f,o,function(){return this}),ne(f,"toString",function(){return"[object Generator]"}),(te=function(){return{w:i,m:d}})()}function ne(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}ne=function(e,t,n,o){function i(t,n){ne(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ne(e,t,n,o)}function oe(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function re(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){oe(i,o,r,a,s,"next",e)}function s(e){oe(i,o,r,a,s,"throw",e)}a(void 0)})}}function ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ue(o.key),o)}}function se(e,t,n){return t&&ae(e.prototype,t),n&&ae(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ue(e){var t=function(e){if("object"!=ee(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ee(t)?t:t+""}function le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(le=function(){return!!e})()}function ce(){return ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fe(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},ce.apply(null,arguments)}function fe(e){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fe(e)}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}var he=function(e){function t(e){var n,o,r,i;return ie(this,t),o=this,i=[e],r=fe(r=t),n=function(e,t){if(t&&("object"==ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(o,le()?Reflect.construct(r,i||[],fe(o).constructor):r.apply(o,i)),speechSynthesis.addEventListener&&speechSynthesis.addEventListener("voiceschanged",function(){return n.events.trigger("voiceschanged")}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(t,e),se(t,[{key:"start",value:function(e,n){var o,r,i,a=this;if("mediaSession"in navigator){var s=new Audio(br.options.imagesBaseURL+"../silence.mp3");s.loop=!0,this.events.on("pause",function(){return s.pause()}),this.events.on("resume",function(){return s.play()}),this.events.on("stop",function(){return s.src=""}),s.play().then(function(){navigator.mediaSession.metadata=new MediaMetadata({title:br.bookTitle,artist:br.options.metadata.filter(function(e){return"Author"==e.label}).map(function(e){return e.value})[0],artwork:[{src:br.options.thumbnail,type:"image/jpg"}]}),navigator.mediaSession.setPositionState({duration:1/0}),navigator.mediaSession.setActionHandler("play",function(){s.play(),a.resume()}),navigator.mediaSession.setActionHandler("pause",function(){s.pause(),a.pause()}),navigator.mediaSession.setActionHandler("previoustrack",function(){return a.jumpBackward()}),navigator.mediaSession.setActionHandler("nexttrack",function(){return a.jumpForward()})})}return(o=t,r=this,"function"==typeof(i=ce(fe(1&3?o.prototype:o),"start",r))?function(e){return i.apply(r,e)}:i)([e,n])}},{key:"getVoices",value:function(){var e=speechSynthesis.getVoices();return 1!=e.filter(function(e){return e.default}).length&&e.unshift({voiceURI:"bookreader.SystemDefault",name:"System Default",lang:navigator.language,default:!0,localService:!0}),e}},{key:"createSound",value:function(e){return new pe(e.text)}}],[{key:"isSupported",value:function(){return void 0!==window.speechSynthesis}}])}(q),pe=function(){return se(function e(t){ie(this,e),this.text=t,this.loaded=!1,this.paused=!1,this.started=!1,this.stopped=!1,this.rate=1,this.utterance=null,this.voice=null,this._lastEvents={pause:null,boundary:null,start:null},this._charIndex=0,this._finishResolver=null,this._finishPromise=null},[{key:"load",value:function(e){var t,n=this;this.loaded=!1,this.started=!1,this.utterance=new SpeechSynthesisUtterance(this.text.slice(this._charIndex)),"bookreader.SystemDefault"!==(null===(t=this.voice)||void 0===t?void 0:t.voiceURI)&&(this.utterance.voice=this.voice),this.voice&&(this.utterance.lang=this.voice.lang),this.utterance.rate=this.rate,S.$x&&(this.utterance.addEventListener("pause",function(){return console.log("pause")}),this.utterance.addEventListener("resume",function(){return console.log("resume")}),this.utterance.addEventListener("start",function(){return console.log("start")}),this.utterance.addEventListener("end",function(){return console.log("end")}),this.utterance.addEventListener("error",function(e){return console.log("error",e)}),this.utterance.addEventListener("boundary",function(){return console.log("boundary")}),this.utterance.addEventListener("mark",function(){return console.log("mark")}),this.utterance.addEventListener("finish",function(){return console.log("finish")})),this.utterance.addEventListener("start",function(e){return n._lastEvents.start=e}),this.utterance.addEventListener("boundary",function(e){return n._lastEvents.boundary=e}),this.utterance.addEventListener("pause",function(e){return n._lastEvents.pause=e}),this.utterance.addEventListener("start",function(){n.started=!0,n.stopped=!1,n.paused=!1}),this.utterance.addEventListener("pause",function(){return n.paused=!0}),this.utterance.addEventListener("resume",function(){return n.paused=!1}),this.utterance.addEventListener("end",function(e){n.paused||n.stopped||n.utterance.dispatchEvent(new CustomEvent("finish",e))}),this.loaded=!0,e&&e()}},{key:"reload",value:(r=re(te().m(function e(){var t,n;return te().w(function(e){for(;;)switch(e.n){case 0:return t=this.paused,(n=this._lastEvents.boundary||this._lastEvents.pause)&&(this._charIndex=this.text.indexOf(n.target.text)+n.charIndex),e.n=1,this.stop();case 1:this.load(),t||this.play();case 2:return e.a(2)}},e,this)})),function(){return r.apply(this,arguments)})},{key:"play",value:function(){var e=this;this._finishPromise=this._finishPromise||new Promise(function(t){return e._finishResolver=t}),this.utterance.addEventListener("finish",this._finishResolver),speechSynthesis.cancel(),speechSynthesis.resume(),speechSynthesis.speak(this.utterance);var t=this.utterance.voice&&this.utterance.voice.localService;return(0,$.H8)()&&!t&&this._chromePausingBugFix(),this._finishPromise}},{key:"stop",value:function(){var e=Promise.resolve();return this.stopped||(e=Promise.race([(0,F.promisifyEvent)(this.utterance,"end"),(0,F.promisifyEvent)(this.utterance,"error")])),this.stopped=!0,speechSynthesis.cancel(),e}},{key:"finish",value:(o=re(te().m(function e(){return te().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.stop();case 1:this.utterance.dispatchEvent(new Event("finish"));case 2:return e.a(2)}},e,this)})),function(){return o.apply(this,arguments)})},{key:"pause",value:(n=re(te().m(function e(){var t,n;return te().w(function(e){for(;;)switch(e.n){case 0:if(!this.paused){e.n=1;break}return e.a(2);case 1:return t=(0,F.promisifyEvent)(this.utterance,"pause"),speechSynthesis.pause(),n=(0,$.gm)()&&(0,S.m0)(),e.n=2,Promise.race([t,(0,F.sleep)(100).then(function(){return"timeout"})]);case 2:if("timeout"==e.v){e.n=3;break}return e.a(2);case 3:S.$x&&console.log("TTS: Firing pause event manually"),this.utterance.dispatchEvent(new CustomEvent("pause",this._lastEvents.start)),n&&this.stop();case 4:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})},{key:"resume",value:(t=re(te().m(function e(){var t,n;return te().w(function(e){for(;;)switch(e.n){case 0:if(this.started&&!this.stopped){e.n=1;break}return this.play(),e.a(2);case 1:if(this.paused){e.n=2;break}return e.a(2);case 2:return t=(0,$.H8)()&&(0,S.m0)()||(0,$.gm)()&&(0,S.m0)(),n=(0,F.promisifyEvent)(this.utterance,"resume"),speechSynthesis.resume(),e.n=3,Promise.race([n,(0,F.sleep)(100).then(function(){return"timeout"})]);case 3:if("timeout"==e.v){e.n=4;break}return e.a(2);case 4:if(S.$x&&console.log("TTS: Firing resume event manually"),this.utterance.dispatchEvent(new CustomEvent("resume",{})),!t){e.n=6;break}return e.n=5,this.reload();case 5:this.play();case 6:return e.a(2)}},e,this)})),function(){return t.apply(this,arguments)})},{key:"setPlaybackRate",value:function(e){this.rate=e,this.reload()}},{key:"setVoice",value:function(e){this.voice=e,this.reload()}},{key:"_chromePausingBugFix",value:(e=re(te().m(function e(){var t;return te().w(function(e){for(;;)switch(e.n){case 0:return S.$x&&console.log("CHROME-PAUSE-HACK: starting"),e.n=1,Promise.race([(0,F.sleep)(14e3).then(function(){return"timeout"}),(0,F.promisifyEvent)(this.utterance,"pause").then(function(){return"pause"}),(0,F.promisifyEvent)(this.utterance,"end").then(function(){return"end"}),(0,F.promisifyEvent)(this.utterance,"error").then(function(){return"error"})]);case 1:if(t=e.v,S.$x&&console.log("CHROME-PAUSE-HACK: ".concat(t)),"end"!=t&&"error"!=t){e.n=2;break}S.$x&&console.log("CHROME-PAUSE-HACK: stopped (end/error)"),e.n=6;break;case 2:if("pause"!=t){e.n=4;break}return e.n=3,Promise.race([(0,F.promisifyEvent)(this.utterance,"resume").then(function(){return"resume"}),(0,F.sleep)(14e3).then(function(){return"timeout"})]);case 3:"timeout"==e.v?(S.$x&&console.log("CHROME-PAUSE-HACK: stopped (timed out while paused)"),this.stop()):this._chromePausingBugFix(),e.n=6;break;case 4:if("timeout"!=t){e.n=6;break}return speechSynthesis.pause(),e.n=5,(0,F.sleep)(25);case 5:speechSynthesis.resume(),this._chromePausingBugFix();case 6:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})}]);var e,t,n,o,r}(),me="Read this book aloud",ge=n(4907),ye=n(1041),ve=n(1669);function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function be(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return we(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?we(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function _e(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return ke(l,"_invoke",function(n,o,r){var i,s,u,l=0,c=r||[],f=!1,d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return i=t,s=0,u=e,d.n=n,a}};function h(n,o){for(s=n,u=o,t=0;!f&&l&&!r&&t<c.length;t++){var r,i=c[t],h=d.p,p=i[2];n>3?(r=p===o)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((r=n<2&&h<i[1])?(s=0,d.v=o,d.n=i[1]):h<p&&(r=n<3||i[0]>o||o>p)&&(i[4]=n,i[5]=o,d.n=p,s=0))}if(r||n>1)return a;throw f=!0,o}return function(r,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,p),s=c,u=p;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(f=d.n<0)?u:n.call(o,d))!==a)break}catch(t){i=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,r,i),!0),l}var a={};function s(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(ke(t={},o,function(){return this}),t),f=l.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,ke(e,r,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=l,ke(f,"constructor",l),ke(l,"constructor",u),u.displayName="GeneratorFunction",ke(l,r,"GeneratorFunction"),ke(f),ke(f,r,"Generator"),ke(f,o,function(){return this}),ke(f,"toString",function(){return"[object Generator]"}),(_e=function(){return{w:i,m:d}})()}function ke(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}ke=function(e,t,n,o){function i(t,n){ke(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},ke(e,t,n,o)}function Se(e,t,n,o,r,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(o,r)}function Oe(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function a(e){Se(i,o,r,a,s,"next",e)}function s(e){Se(i,o,r,a,s,"throw",e)}a(void 0)})}}function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ee(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ce(o.key),o)}}function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Me=function(){return!!e})()}function Te(){return Te="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ie(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Te.apply(null,arguments)}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(e)}function De(e,t){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},De(e,t)}function Le(e,t,n){return(t=Ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(e){var t=function(e){if("object"!=Ae(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ae(t)?t:t+""}var qe=window.BookReader,Fe=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return Le(e=function(e,t,n){return t=Ie(t),function(e,t){if(t&&("object"==Ae(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Me()?Reflect.construct(t,n||[],Ie(e).constructor):t.apply(e,n))}(this,t,[].concat(o)),"options",{enabled:!0,pageChunkUrl:"https://{{server}}/BookReader/BookReaderGetTextWrapper.php?path={{bookPath|urlencode}}_djvu.xml&page={{pageIndex}}&callback=false",remoteTtsUrl:"https://{{server}}/BookReader/BookReaderGetTTS.php?string={{text|urlencode}}&format={{format}}"}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(t,e),n=t,r=[{key:"setup",value:function(e){var n,r,i;if((n=t,r=this,"function"==typeof(i=Te(Ie(1&3?n.prototype:n),"setup",r))?function(e){return i.apply(r,e)}:i)([Object.assign({server:this.br.options.server,bookPath:this.br.options.bookPath},e)]),this.options.enabled){this._ttsBoxesByIndex={};var a=he.isSupported()?he:Z.isSupported()?Z:null;if(/_forceTTSEngine=(festival|web)/.test(location.toString())){var s=location.toString().match(/_forceTTSEngine=(festival|web)/)[1];a={festival:Z,web:he}[s]}a&&(this.ttsEngine=new a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach(function(t){Le(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({pageChunkUrl:(0,o.g)(this.options.pageChunkUrl,this.br.options.vars),bookLanguage:(0,S.YH)(this.br.options.bookLanguage),onLoadingStart:this.br.showProgressPopup.bind(this.br,"Loading audio..."),onLoadingComplete:this.br.removeProgressPopup.bind(this.br),onDone:this.stop.bind(this),beforeChunkPlay:this.beforeChunkPlay.bind(this),afterChunkPlay:this.sendChunkFinishedAnalyticsEvent.bind(this)},a===Z?{festivalUrl:(0,o.g)(this.options.remoteTtsUrl,this.br.options.vars)}:{})))}}},{key:"init",value:function(){var e=this;this.options.enabled&&this.br.bind(qe.eventNames.PostInit,function(){e.br.$(".BRicon.read").click(function(){return e.toggle(),!1}),e.ttsEngine&&(e.ttsEngine.init(),/[?&]_autoReadAloud=show/.test(location.toString())&&e.start(!1))})}},{key:"_configurePageContainer",value:function(e){if(this.options.enabled&&e.page&&e.page.index in this._ttsBoxesByIndex){var t=e.page.index;(0,ge.KL)("ttsHiliteLayer",this._ttsBoxesByIndex[t],e.page,e.$container[0])}}},{key:"extendNavBar",value:function(e){var t=this;if(this.options.enabled&&this.ttsEngine){this.br.refs.$BRReadAloudToolbar=ve('\n <ul class="read-aloud">\n <li>\n <select class="playback-speed" name="playback-speed" title="'.concat("Playback speed",'">\n <option value="0.25">0.25x</option>\n <option value="0.5">0.5x</option>\n <option value="0.75">0.75x</option>\n <option value="1.0" selected>1.0x</option>\n <option value="1.25">1.25x</option>\n <option value="1.5">1.5x</option>\n <option value="1.75">1.75x</option>\n <option value="2">2x</option>\n </select>\n </li>\n <li>\n <button type="button" name="review" title="').concat("Review 10 seconds",'">\n <div class="icon icon-review"></div>\n </button>\n </li>\n <li>\n <button type="button" name="play" title="').concat("Play",'">\n <div class="icon icon-play"></div>\n <div class="icon icon-pause"></div>\n </button>\n </li>\n <li>\n <button type="button" name="advance" title="').concat("Advance 10 seconds",'">\n <div class="icon icon-advance"></div>\n </button>\n </li>\n <li>\n <select class="playback-voices" name="playback-voice" style="display: none" title="Change read aloud voices">\n </select>\n </li>\n </ul>\n ')),e.find(".BRcontrols").prepend(this.br.refs.$BRReadAloudToolbar);var n=function(e){return e.map(function(e){return'<option value="'.concat(e.voiceURI,'">').concat(e.lang," - ").concat(e.name,"</option>")}).join("")},o=function(e,t){return"".concat(e.lang," - ").concat(e.name).localeCompare("".concat(t.lang," - ").concat(t.name))},r=function(e){var r;e.empty();var i=t.ttsEngine.opts.bookLanguage;null!==(r=t.br.plugins.translate)&&void 0!==r&&null!==(r=r.translationManager)&&void 0!==r&&r.active&&(i=t.br.plugins.translate.langFromCode);var a=t.ttsEngine.getVoices().filter(function(e){return e.lang.startsWith(i)}).sort(o),s=t.ttsEngine.getVoices().filter(function(e){return!e.lang.startsWith(i)}).sort(o);if(t.ttsEngine.getVoices().length>1){var u;if(null!==(u=t.br.plugins.translate)&&void 0!==u&&null!==(u=u.translationManager)&&void 0!==u&&u.active){var l=t.br.plugins.translate.langToCode,c=t.ttsEngine.getVoices().filter(function(e){return e.lang.startsWith(l)}).sort(o);e.append(ve('<optgroup label="Book Language, Translated From ('.concat(i,')"> ').concat(n(a)," </optgroup>"))),e.append(ve('<optgroup label="Book Language, Translated To ('.concat(l,')"> ').concat(n(c)," </optgroup>"))),e.append(ve('<optgroup label="Other Languages"> '.concat(n(s.filter(function(e){return!e.lang.startsWith(l)}).sort(o)))))}else e.append(ve('<optgroup label="Book Language ('.concat(i,')"> ').concat(n(a)," </optgroup>"))),e.append(ve('<optgroup label="Other Languages"> '.concat(n(s)," </optgroup>")));e.val(t.ttsEngine.voice.voiceURI),e.show()}else e.hide()},i=this.br.refs.$BRReadAloudToolbar.find("[name=playback-voice]");r(i),i.on("change",function(e){return t.ttsEngine.setVoice(i.val())}),this.ttsEngine.events.on("pause resume start",function(){return t.updateState()}),this.ttsEngine.events.on("voiceschanged",function(){return r(i)}),this.br.on("translationEnabled",function(){return r(i)}),this.br.on("translationDisabled",function(){return r(i)}),this.br.refs.$BRReadAloudToolbar.find("[name=play]").on("click",this.playPause.bind(this)),this.br.refs.$BRReadAloudToolbar.find("[name=advance]").on("click",this.jumpForward.bind(this)),this.br.refs.$BRReadAloudToolbar.find("[name=review]").on("click",this.jumpBackward.bind(this));var a=this.br.refs.$BRReadAloudToolbar.find('select[name="playback-speed"]');a.on("change",function(e){return t.ttsEngine.setPlaybackRate(parseFloat(a.val()))}),ve('<li>\n <button class="BRicon read js-tooltip" title="'.concat(me,'">\n <div class="icon icon-read-aloud"></div>\n <span class="BRtooltip">').concat(me,"</span>\n </button>\n </li>")).insertBefore(e.find(".BRcontrols .BRicon.zoom_out").closest("li"))}}},{key:"toggle",value:function(){var e;null===(e=this.br.plugins.autoplay)||void 0===e||e.stop(),this.ttsEngine.playing?this.stop():this.start()}},{key:"start",value:function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=null!==(e=this.br.plugins.translate)&&void 0!==e&&null!==(e=e.translationManager)&&void 0!==e&&e.active?(0,S.YH)(this.br.plugins.translate.langToCode):"",o=this.ttsEngine.getBestVoice(n),r=this.br.refs.$BRReadAloudToolbar.find("[name=playback-voice");this.ttsEngine.setVoice(o.voiceURI),r.val(o.voiceURI),this.br.constModeThumb==this.br.mode&&this.br.switchMode(this.br.constMode1up),this.br.refs.$BRReadAloudToolbar.addClass("visible"),this.br.$(".BRicon.read").addClass("unread active"),this.sendAnalyticsEvent("Start"),t&&this.ttsEngine.start(this.br.currentIndex(),this.br.book.getNumLeafs())}},{key:"jumpForward",value:function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpForward()}},{key:"jumpBackward",value:function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpBackward()}},{key:"updateState",value:function(){var e=!(this.ttsEngine.paused||!this.ttsEngine.playing);this.br.$(".read-aloud [name=play]").toggleClass("playing",e)}},{key:"playPause",value:function(){this.ttsEngine.playing?(this.ttsEngine.togglePlayPause(),this.updateState()):this.toggle()}},{key:"stop",value:function(){this.br.refs.$BRReadAloudToolbar.removeClass("visible"),this.br.$(".BRicon.read").removeClass("unread active"),this.sendAnalyticsEvent("Stop"),this.ttsEngine.stop(),this.removeHilites(),this.br.removeProgressPopup()}},{key:"beforeChunkPlay",value:(a=Oe(_e().m(function e(t){return _e().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.maybeFlipToIndex(t.leafIndex);case 1:this.highlightChunk(t),this.scrollToChunk(t);case 2:return e.a(2)}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"sendChunkFinishedAnalyticsEvent",value:function(e){this.sendAnalyticsEvent("ChunkFinished-Words",(0,S.EF)(e.text))}},{key:"maybeFlipToIndex",value:(i=Oe(_e().m(function e(t){return _e().w(function(e){for(;;)switch(e.n){case 0:this.br._isIndexDisplayed(t)||this.br.jumpToIndex(t);case 1:return e.a(2)}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"highlightChunk",value:function(e){var t,n=this,o=e.leafIndex;if(this.removeHilites(),null!==(t=this.br.plugins.translate)&&void 0!==t&&t.translationManager.active){var r=this.br.getActivePageContainerElementsForIndex(o),i=e.chunkIndex;r.forEach(function(e){var t=e.querySelector(".BRtranslateLayer"),r=Array.from(t.childNodes)[i];if(r){var a=[r.offsetHeight,r.offsetTop,r.offsetWidth,r.offsetLeft],s=a[1],u=a[3],l={pageIndex:[{l:u,r:u+a[2],b:s+a[0],t:s}]};(0,ge.KL)("ttsHiliteLayer",l.pageIndex,n.br.book.getPage(o),t)}})}else{this._ttsBoxesByIndex=Le({},o,e.lineRects.map(function(e){var t=be(e,4),n=t[0],o=t[1];return{l:n,r:t[2],b:o,t:t[3]}}));for(var a=function(){var e=be(u[s],2),t=e[0],o=e[1],r=parseFloat(t),i=n.br.book.getPage(r);n.br.getActivePageContainerElementsForIndex(r).forEach(function(e){return(0,ge.KL)("ttsHiliteLayer",o,i,e)})},s=0,u=Object.entries(this._ttsBoxesByIndex);s<u.length;s++)a()}}},{key:"scrollToChunk",value:function(e){var t;this.br.constModeThumb!=this.br.mode&&(null===(t=ve(".pagediv".concat(e.leafIndex," .ttsHiliteLayer rect")).last())||void 0===t||null===(t=t[0])||void 0===t||t.scrollIntoView({block:this.br.constMode1up==this.br.mode||this.br.isFullscreenActive?"center":"nearest",inline:"center",behavior:"smooth"}))}},{key:"removeHilites",value:function(){ve(this.br.getActivePageContainerElements()).find(".ttsHiliteLayer").remove(),this._ttsBoxesByIndex={}}},{key:"sendAnalyticsEvent",value:function(e,t){if(this.br.plugins.archiveAnalytics){var n={},o=this.ttsEngine.opts.bookLanguage;o&&(n.mediaLanguage=o),this.br.plugins.archiveAnalytics.sendEvent("BRReadAloud",e,t,n)}}}],r&&Ee(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,a}(ye.S);null==qe||qe.registerPlugin("tts",Fe)},4160:function(e,t,n){"use strict";n.d(t,{$x:function(){return g},EF:function(){return c},ND:function(){return m},m0:function(){return f},YH:function(){return h}}),n(2675),n(9463),n(2259),n(8706),n(3418),n(3792),n(2062),n(4782),n(2010),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(1761),n(2953);var o=[],r={},i={},a={};[["Serbian","српски језик","sr","srp","srp"],["Romanian, Moldavian, Moldovan","Română","ro","ron","rum"],["Sichuan Yi, Nuosu","ꆈꌠ꒿ Nuosuhxop","ii","iii","iii"],["Tahitian","Reo Tahiti","ty","tah","tah"],["Tagalog","Wikang Tagalog","tl","tgl","tgl"],["Yiddish","ייִדיש","yi","yid","yid"],["Akan","Akan","ak","aka","aka"],["Malay","Bahasa Melayu, بهاس ملايو","ms","msa","may"],["Arabic","العربية","ar","ara","ara"],["Norwegian","Norsk","no","nor","nor"],["Ojibwa","ᐊᓂᔑᓈᐯᒧᐎᓐ","oj","oji","oji"],["Fulah","Fulfulde, Pulaar, Pular","ff","ful","ful"],["Persian","فارسی","fa","fas","per"],["Albanian","Shqip","sq","sqi","alb"],["Aymara","aymar aru","ay","aym","aym"],["Azerbaijani","azərbaycan dili","az","aze","aze"],["Chinese","中文 (Zhōngwén), 汉语, 漢語","zh","zho","chi"],["Cree","ᓀᐦᐃᔭᐍᐏᐣ","cr","cre","cre"],["Estonian","eesti, eesti keel","et","est","est"],["Guaraní","Avañe'ẽ","gn","grn","grn"],["Inupiaq","Iñupiaq, Iñupiatun","ik","ipk","ipk"],["Inuktitut","ᐃᓄᒃᑎᑐᑦ","iu","iku","iku"],["Kanuri","Kanuri","kr","kau","kau"],["Komi","коми кыв","kv","kom","kom"],["Kongo","Kikongo","kg","kon","kon"],["Kurdish","Kurdî, أۇزبېك","ku","kur","kur"],["Latvian","latviešu valoda","lv","lav","lav"],["Malagasy","fiteny malagasy","mg","mlg","mlg"],["Mongolian","Монгол хэл","mn","mon","mon"],["Oromo","Afaan Oromoo","om","orm","orm"],["Pashto, Pushto","پښتو","ps","pus","pus"],["Quechua","Runa Simi, Kichwa","qu","que","que"],["Sardinian","sardu","sc","srd","srd"],["Swahili","Kiswahili","sw","swa","swa"],["Uzbek","Oʻzbek, Ўзбек, ","uz","uzb","uzb"],["Zhuang, Chuang","Saɯ cueŋƅ, Saw cuengh","za","zha","zha"],["Bislama","Bislama","bi","bis","bis"],["Norwegian Bokmål","Norsk Bokmål","nb","nob","nob"],["Norwegian Nynorsk","Norsk Nynorsk","nn","nno","nno"],["Indonesian","Bahasa Indonesia","id","ind","ind"],["Twi","Twi","tw","twi","twi"],["Esperanto","Esperanto","eo","epo","epo"],["Interlingua","Interlingua","ia","ina","ina"],["Interlingue","Originally called Occidental; then Interlingue after WWII","ie","ile","ile"],["Ido","Ido","io","ido","ido"],["Volapük","Volapük","vo","vol","vol"],["Bihari languages","भोजपुरी","bh","bih","bih"],["Hebrew (modern)","עברית","he","heb","heb"],["Sanskrit","संस्कृतम्","sa","san","san"],["Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian","ѩзыкъ словѣньскъ","cu","chu","chu"],["Pali","पाऴि","pi","pli","pli"],["Avestan","avesta","ae","ave","ave"],["Latin","latine, lingua latina","la","lat","lat"],["Armenian","Հայերեն","hy","hye","arm"],["Swati","SiSwati","ss","ssw","ssw"],["Tibetan","བོད་ཡིག","bo","bod","tib"],["South Ndebele","isiNdebele","nr","nbl","nbl"],["Slovene","Slovenski Jezik, Slovenščina","sl","slv","slv"],["Oriya","ଓଡ଼ିଆ","or","ori","ori"],["North Ndebele","isiNdebele","nd","nde","nde"],["Nauru","Dorerin Naoero","na","nau","nau"],["Maori","te reo Māori","mi","mri","mao"],["Marathi","मराठी","mr","mar","mar"],["Luba-Katanga","Kiluba","lu","lub","lub"],["Rundi","Ikirundi","rn","run","run"],["Central Khmer","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ","km","khm","khm"],["Western Frisian","Frysk","fy","fry","fry"],["Bengali","বাংলা","bn","ben","ben"],["Avaric","авар мацӀ, магӀарул мацӀ","av","ava","ava"],["Abkhazian","аҧсуа бызшәа, аҧсшәа","ab","abk","abk"],["Afar","Afaraf","aa","aar","aar"],["Afrikaans","Afrikaans","af","afr","afr"],["Amharic","አማርኛ","am","amh","amh"],["Aragonese","aragonés","an","arg","arg"],["Assamese","অসমীয়া","as","asm","asm"],["Bambara","bamanankan","bm","bam","bam"],["Bashkir","башҡорт теле","ba","bak","bak"],["Basque","euskara, euskera","eu","eus","baq"],["Belarusian","беларуская мова","be","bel","bel"],["Bosnian","bosanski jezik","bs","bos","bos"],["Breton","brezhoneg","br","bre","bre"],["Bulgarian","български език","bg","bul","bul"],["Burmese","ဗမာစာ","my","mya","bur"],["Catalan, Valencian","català, valencià","ca","cat","cat"],["Chamorro","Chamoru","ch","cha","cha"],["Chechen","нохчийн мотт","ce","che","che"],["Chichewa, Chewa, Nyanja","chiCheŵa, chinyanja","ny","nya","nya"],["Chuvash","чӑваш чӗлхи","cv","chv","chv"],["Cornish","Kernewek","kw","cor","cor"],["Corsican","corsu, lingua corsa","co","cos","cos"],["Croatian","hrvatski jezik","hr","hrv","hrv"],["Czech","čeština, český jazyk","cs","ces","cze"],["Danish","dansk","da","dan","dan"],["Divehi, Dhivehi, Maldivian","ދިވެހި","dv","div","div"],["Dutch, Flemish","Nederlands, Vlaams","nl","nld","dut"],["Dzongkha","རྫོང་ཁ","dz","dzo","dzo"],["English","English","en","eng","eng"],["Ewe","Eʋegbe","ee","ewe","ewe"],["Faroese","føroyskt","fo","fao","fao"],["Fijian","vosa Vakaviti","fj","fij","fij"],["Finnish","suomi, suomen kieli","fi","fin","fin"],["French","français, langue française","fr","fra","fre"],["Galician","Galego","gl","glg","glg"],["Georgian","ქართული","ka","kat","geo"],["German","Deutsch","de","deu","ger"],["Greek (modern)","ελληνικά","el","ell","gre"],["Gujarati","ગુજરાતી","gu","guj","guj"],["Haitian, Haitian Creole","Kreyòl ayisyen","ht","hat","hat"],["Hausa","(Hausa) هَوُسَ","ha","hau","hau"],["Herero","Otjiherero","hz","her","her"],["Hindi","हिन्दी, हिंदी","hi","hin","hin"],["Hiri Motu","Hiri Motu","ho","hmo","hmo"],["Hungarian","magyar","hu","hun","hun"],["Irish","Gaeilge","ga","gle","gle"],["Igbo","Asụsụ Igbo","ig","ibo","ibo"],["Icelandic","Íslenska","is","isl","ice"],["Italian","Italiano","it","ita","ita"],["Japanese","日本語 (にほんご)","ja","jpn","jpn"],["Javanese","ꦧꦱꦗꦮ, Basa Jawa","jv","jav","jav"],["Kalaallisut, Greenlandic","kalaallisut, kalaallit oqaasii","kl","kal","kal"],["Kannada","ಕನ್ನಡ","kn","kan","kan"],["Kashmiri","कश्मीरी, كشميري","ks","kas","kas"],["Kazakh","қазақ тілі","kk","kaz","kaz"],["Kikuyu, Gikuyu","Gĩkũyũ","ki","kik","kik"],["Kinyarwanda","Ikinyarwanda","rw","kin","kin"],["Kirghiz, Kyrgyz","Кыргызча, Кыргыз тили","ky","kir","kir"],["Korean","한국어","ko","kor","kor"],["Kuanyama, Kwanyama","Kuanyama","kj","kua","kua"],["Luxembourgish, Letzeburgesch","Lëtzebuergesch","lb","ltz","ltz"],["Ganda","Luganda","lg","lug","lug"],["Limburgan, Limburger, Limburgish","Limburgs","li","lim","lim"],["Lingala","Lingála","ln","lin","lin"],["Lao","ພາສາລາວ","lo","lao","lao"],["Lithuanian","lietuvių kalba","lt","lit","lit"],["Manx","Gaelg, Gailck","gv","glv","glv"],["Macedonian","македонски јазик","mk","mkd","mac"],["Malayalam","മലയാളം","ml","mal","mal"],["Maltese","Malti","mt","mlt","mlt"],["Marshallese","Kajin M̧ajeļ","mh","mah","mah"],["Navajo, Navaho","Diné bizaad","nv","nav","nav"],["Nepali","नेपाली","ne","nep","nep"],["Ndonga","Owambo","ng","ndo","ndo"],["Occitan","occitan, lenga d'òc","oc","oci","oci"],["Ossetian, Ossetic","ирон æвзаг","os","oss","oss"],["Panjabi, Punjabi","ਪੰਜਾਬੀ","pa","pan","pan"],["Polish","język polski, polszczyzna","pl","pol","pol"],["Portuguese","Português","pt","por","por"],["Romansh","Rumantsch Grischun","rm","roh","roh"],["Russian","русский","ru","rus","rus"],["Sindhi","सिन्धी, سنڌي، سندھی","sd","snd","snd"],["Northern Sami","Davvisámegiella","se","sme","sme"],["Samoan","gagana fa'a Samoa","sm","smo","smo"],["Sango","yângâ tî sängö","sg","sag","sag"],["Gaelic, Scottish Gaelic","Gàidhlig","gd","gla","gla"],["Shona","chiShona","sn","sna","sna"],["Sinhala, Sinhalese","සිංහල","si","sin","sin"],["Slovak","Slovenčina, Slovenský Jazyk","sk","slk","slo"],["Somali","Soomaaliga, af Soomaali","so","som","som"],["Southern Sotho","Sesotho","st","sot","sot"],["Spanish, Castilian","Español","es","spa","spa"],["Sundanese","Basa Sunda","su","sun","sun"],["Swedish","Svenska","sv","swe","swe"],["Tamil","தமிழ்","ta","tam","tam"],["Telugu","తెలుగు","te","tel","tel"],["Tajik","тоҷикӣ, toçikī, تاجیکی","tg","tgk","tgk"],["Thai","ไทย","th","tha","tha"],["Tigrinya","ትግርኛ","ti","tir","tir"],["Turkmen","Türkmen, Түркмен","tk","tuk","tuk"],["Tswana","Setswana","tn","tsn","tsn"],["Tongan (Tonga Islands)","Faka Tonga","to","ton","ton"],["Turkish","Türkçe","tr","tur","tur"],["Tsonga","Xitsonga","ts","tso","tso"],["Tatar","татар теле, tatar tele","tt","tat","tat"],["Uighur, Uyghur","ئۇيغۇرچە, Uyghurche","ug","uig","uig"],["Ukrainian","Українська","uk","ukr","ukr"],["Urdu","اردو","ur","urd","urd"],["Venda","Tshivenḓa","ve","ven","ven"],["Vietnamese","Tiếng Việt","vi","vie","vie"],["Walloon","Walon","wa","wln","wln"],["Welsh","Cymraeg","cy","cym","wel"],["Wolof","Wollof","wo","wol","wol"],["Xhosa","isiXhosa","xh","xho","xho"],["Yoruba","Yorùbá","yo","yor","yor"],["Zulu","isiZulu","zu","zul","zul"]].forEach(e=>{var t={name:e[0],nativeName:e[1],iso639_1:e[2],iso639_2T:e[3],iso639_2B:e[4]};r[e[2]]=i[e[3]]=a[e[4]]=t,o.push(t)});var s=o;function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function c(e){var t=e.match(/\S+/g);return t?t.length:0}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(e)}var d={"zh-hans":"中文 (Zhōngwén)"};function h(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?p(e=e.toLowerCase(),["iso639_1"],t)||p(e,["iso639_2T"],t)||p(e,["iso639_2B","nativeName","name"],t):null}function p(e,t,n){var o,r=u(s);try{for(r.s();!(o=r.n()).done;){var i,a=o.value,l=u(t);try{for(l.s();!(i=l.n()).done;)if(-1!=a[i.value].split(", ").map(function(e){return e.toLowerCase()}).indexOf(e))return n?"".concat(a.nativeName.split(", ")[0]," (").concat(a.iso639_1,")"):a.iso639_1}catch(e){l.e(e)}finally{l.f()}}}catch(e){r.e(e)}finally{r.f()}return d[e]?"".concat(d[e]," (").concat(e,")"):null}function m(){try{return!!window.localStorage}catch(e){return!1}}var g=-1!=location.toString().indexOf("_debugReadAloud=true")},9073:function(e,t,n){"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;return null==e?void 0:e.replace(/\{\{([^}]*?)\}\}/g,function(e,i){if(!i)return e;var a,s=function(e){if(Array.isArray(e))return e}(a=i.split("|").map(function(e){return e.trim()}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=s[0],l=o(s).slice(1);if(!(u in n)&&!(u in t))return e;var c=u in n?n[u]:u in t?t[u]:null;return l.map(function(e){return r[e]}).reduce(function(e,t){return t(e)},c&&c.toString())})}n.d(t,{g:function(){return r}}),n(2675),n(9463),n(2259),n(3418),n(3792),n(2062),n(2712),n(4782),n(2010),n(6099),n(7495),n(8781),n(7764),n(5440),n(2762),n(2953);var i={urlencode:encodeURIComponent}}},function(e){e(e.s=3638)}]);
|
|
3
3
|
//# sourceMappingURL=plugin.tts.js.map
|