@internetarchive/bookreader 5.0.0-8 → 5.0.0-80
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintrc.js +17 -15
- package/.github/workflows/node.js.yml +73 -10
- package/.github/workflows/npm-publish.yml +6 -20
- package/.testcaferc.js +10 -0
- package/BookReader/BookReader.css +398 -1133
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.LICENSE.txt +20 -20
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +1782 -0
- package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +7 -0
- package/BookReader/ia-bookreader-bundle.js.map +1 -0
- 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/thumbnails.svg +1 -1
- package/BookReader/icons/voice.svg +1 -0
- package/BookReader/icons/volume-full.svg +1 -1
- package/BookReader/images/BRicons.svg +3 -3
- 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-ahead.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/jquery-3.js +2 -0
- package/BookReader/jquery-3.js.LICENSE.txt +24 -0
- 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 +25 -1
- package/BookReader/plugins/plugin.chapters.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.chapters.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 +2 -0
- package/BookReader/plugins/plugin.iiif.js.map +1 -0
- package/BookReader/plugins/plugin.resume.js +1 -1
- package/BookReader/plugins/plugin.resume.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +2 -1
- package/BookReader/plugins/plugin.search.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +2 -1
- package/BookReader/plugins/plugin.text_selection.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- package/BookReader/plugins/plugin.tts.js.LICENSE.txt +2 -0
- 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/webcomponents-bundle.js +3 -0
- package/BookReader/webcomponents-bundle.js.LICENSE.txt +9 -0
- package/BookReader/webcomponents-bundle.js.map +1 -0
- package/BookReaderDemo/BookReaderDemo.css +18 -19
- package/BookReaderDemo/BookReaderJSAdvanced.js +0 -3
- package/BookReaderDemo/BookReaderJSAutoplay.js +4 -1
- package/BookReaderDemo/BookReaderJSSimple.js +1 -0
- package/BookReaderDemo/IADemoBr.js +147 -0
- package/BookReaderDemo/demo-advanced.html +2 -2
- package/BookReaderDemo/demo-autoplay.html +2 -3
- package/BookReaderDemo/demo-embed-iframe-src.html +2 -1
- package/BookReaderDemo/demo-fullscreen-mobile.html +3 -5
- package/BookReaderDemo/demo-fullscreen.html +2 -4
- package/BookReaderDemo/demo-iiif.html +99 -12
- package/BookReaderDemo/demo-internetarchive.html +214 -18
- package/BookReaderDemo/demo-multiple.html +2 -1
- package/BookReaderDemo/demo-preview-pages.html +2 -1
- package/BookReaderDemo/demo-simple.html +2 -1
- package/BookReaderDemo/demo-vendor-fullscreen.html +2 -4
- package/BookReaderDemo/ia-multiple-volumes-manifest.js +170 -0
- package/BookReaderDemo/immersion-1up.html +2 -2
- package/BookReaderDemo/immersion-mode.html +2 -4
- package/BookReaderDemo/toggle_controls.html +3 -2
- package/BookReaderDemo/view_mode.html +2 -1
- package/BookReaderDemo/viewmode-cycle.html +2 -3
- package/CHANGELOG.md +536 -33
- package/README.md +14 -1
- package/babel.config.js +20 -0
- package/codecov.yml +6 -0
- package/index.html +4 -1
- package/jsconfig.json +19 -0
- package/netlify.toml +9 -0
- package/package.json +70 -60
- package/renovate.json +52 -0
- package/scripts/preversion.js +0 -1
- package/src/BookNavigator/assets/bookmark-colors.js +1 -1
- package/src/BookNavigator/assets/button-base.js +4 -2
- package/src/BookNavigator/assets/ia-logo.js +17 -0
- package/src/BookNavigator/assets/icon_checkmark.js +1 -1
- package/src/BookNavigator/assets/icon_close.js +1 -1
- package/src/BookNavigator/book-navigator.js +590 -0
- package/src/BookNavigator/bookmarks/bookmark-button.js +3 -2
- package/src/BookNavigator/bookmarks/bookmark-edit.js +3 -4
- package/src/BookNavigator/bookmarks/bookmarks-list.js +2 -3
- package/src/BookNavigator/bookmarks/bookmarks-loginCTA.js +3 -8
- package/src/BookNavigator/bookmarks/bookmarks-provider.js +27 -17
- package/src/BookNavigator/bookmarks/ia-bookmarks.js +116 -67
- package/src/BookNavigator/delete-modal-actions.js +1 -1
- package/src/BookNavigator/downloads/downloads-provider.js +36 -21
- package/src/BookNavigator/downloads/downloads.js +41 -25
- package/src/BookNavigator/search/search-provider.js +49 -27
- package/src/BookNavigator/search/search-results.js +23 -9
- package/src/BookNavigator/sharing.js +27 -0
- package/src/BookNavigator/viewable-files.js +95 -0
- package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +11 -10
- package/src/BookNavigator/visual-adjustments/visual-adjustments.js +3 -3
- package/src/BookReader/BookModel.js +64 -34
- package/src/BookReader/DragScrollable.js +233 -0
- package/src/BookReader/Mode1Up.js +56 -351
- package/src/BookReader/Mode1UpLit.js +388 -0
- package/src/BookReader/Mode2Up.js +73 -1318
- package/src/BookReader/Mode2UpLit.js +776 -0
- package/src/BookReader/ModeCoordinateSpace.js +29 -0
- package/src/BookReader/ModeSmoothZoom.js +312 -0
- package/src/BookReader/ModeThumb.js +18 -12
- package/src/BookReader/Navbar/Navbar.js +14 -40
- package/src/BookReader/PageContainer.js +81 -6
- package/src/BookReader/ReduceSet.js +1 -1
- package/src/BookReader/Toolbar/Toolbar.js +10 -37
- package/src/BookReader/events.js +2 -3
- package/src/BookReader/options.js +27 -2
- package/src/BookReader/utils/HTMLDimensionsCacher.js +44 -0
- package/src/BookReader/utils/ScrollClassAdder.js +31 -0
- package/src/BookReader/utils/SelectionObserver.js +45 -0
- package/src/BookReader/utils.js +118 -13
- package/src/BookReader.js +427 -1061
- package/src/assets/icons/magnify-minus.svg +3 -7
- package/src/assets/icons/magnify-plus.svg +3 -7
- package/src/assets/icons/voice.svg +1 -0
- package/src/css/BookReader.scss +1 -5
- package/src/css/_BRBookmarks.scss +1 -1
- package/src/css/_BRComponent.scss +1 -1
- package/src/css/_BRmain.scss +16 -3
- package/src/css/_BRnav.scss +12 -39
- package/src/css/_BRpages.scss +149 -40
- package/src/css/_BRsearch.scss +68 -25
- package/src/css/_BRtoolbar.scss +5 -5
- package/src/css/_TextSelection.scss +87 -27
- package/src/css/_colorbox.scss +2 -2
- package/src/css/_controls.scss +20 -7
- package/src/css/_icons.scss +1 -1
- package/src/ia-bookreader/ia-bookreader.js +224 -0
- package/src/plugins/plugin.archive_analytics.js +3 -3
- package/src/plugins/plugin.autoplay.js +5 -11
- package/src/plugins/plugin.chapters.js +237 -191
- package/src/plugins/plugin.iiif.js +151 -0
- package/src/plugins/plugin.resume.js +3 -3
- package/src/plugins/plugin.text_selection.js +464 -134
- package/src/plugins/plugin.vendor-fullscreen.js +4 -4
- package/src/plugins/search/plugin.search.js +142 -125
- package/src/plugins/search/utils.js +43 -0
- package/src/plugins/search/view.js +33 -58
- package/src/plugins/tts/AbstractTTSEngine.js +71 -40
- package/src/plugins/tts/FestivalTTSEngine.js +13 -14
- package/src/plugins/tts/PageChunk.js +15 -21
- package/src/plugins/tts/PageChunkIterator.js +8 -12
- package/src/plugins/tts/WebTTSEngine.js +87 -71
- package/src/plugins/tts/plugin.tts.js +96 -127
- package/src/plugins/tts/utils.js +15 -25
- package/src/plugins/url/UrlPlugin.js +191 -0
- package/src/plugins/{plugin.url.js → url/plugin.url.js} +45 -16
- package/src/util/browserSniffing.js +22 -0
- package/src/util/docCookies.js +21 -2
- package/tests/e2e/README.md +37 -0
- package/tests/e2e/autoplay.test.js +2 -2
- package/tests/e2e/base.test.js +8 -16
- package/tests/e2e/helpers/base.js +53 -48
- package/tests/e2e/helpers/debug.js +1 -1
- package/tests/e2e/helpers/params.js +17 -0
- package/tests/e2e/helpers/rightToLeft.js +8 -14
- package/tests/e2e/helpers/search.js +73 -0
- package/tests/e2e/models/Navigation.js +20 -37
- package/tests/e2e/rightToLeft.test.js +4 -5
- package/tests/e2e/viewmode.test.js +40 -33
- package/tests/jest/BookNavigator/book-navigator.test.js +661 -0
- package/tests/jest/BookNavigator/bookmarks/bookmark-button.test.js +43 -0
- package/tests/{karma → jest}/BookNavigator/bookmarks/bookmark-edit.test.js +25 -26
- package/tests/{karma → jest}/BookNavigator/bookmarks/bookmarks-list.test.js +41 -42
- package/tests/jest/BookNavigator/bookmarks/ia-bookmarks.test.js +45 -0
- package/tests/jest/BookNavigator/downloads/downloads-provider.test.js +67 -0
- package/tests/jest/BookNavigator/downloads/downloads.test.js +53 -0
- package/tests/jest/BookNavigator/search/search-provider.test.js +167 -0
- package/tests/{karma → jest}/BookNavigator/search/search-results.test.js +109 -60
- package/tests/jest/BookNavigator/sharing/sharing-provider.test.js +49 -0
- package/tests/jest/BookNavigator/viewable-files/viewable-files-provider.test.js +80 -0
- package/tests/jest/BookNavigator/visual-adjustments.test.js +200 -0
- package/tests/{BookReader → jest/BookReader}/BookModel.test.js +74 -14
- package/tests/jest/BookReader/BookReaderPublicFunctions.test.js +193 -0
- package/tests/{BookReader → jest/BookReader}/ImageCache.test.js +4 -4
- package/tests/jest/BookReader/Mode1UpLit.test.js +73 -0
- package/tests/jest/BookReader/Mode2Up.test.js +98 -0
- package/tests/jest/BookReader/Mode2UpLit.test.js +190 -0
- package/tests/jest/BookReader/ModeCoordinateSpace.test.js +16 -0
- package/tests/jest/BookReader/ModeSmoothZoom.test.js +218 -0
- package/tests/jest/BookReader/ModeThumb.test.js +71 -0
- package/tests/{BookReader → jest/BookReader}/Navbar/Navbar.test.js +10 -10
- package/tests/{BookReader → jest/BookReader}/PageContainer.test.js +88 -6
- package/tests/{BookReader → jest/BookReader}/ReduceSet.test.js +1 -1
- package/tests/{BookReader → jest/BookReader}/Toolbar/Toolbar.test.js +2 -2
- package/tests/jest/BookReader/utils/HTMLDimensionsCacher.test.js +59 -0
- package/tests/jest/BookReader/utils/ScrollClassAdder.test.js +49 -0
- package/tests/jest/BookReader/utils/SelectionObserver.test.js +57 -0
- package/tests/{BookReader → jest/BookReader}/utils/classes.test.js +1 -1
- package/tests/jest/BookReader/utils.test.js +229 -0
- package/tests/jest/BookReader.keyboard.test.js +190 -0
- package/tests/{BookReader.options.test.js → jest/BookReader.options.test.js} +9 -1
- package/tests/{BookReader.test.js → jest/BookReader.test.js} +26 -37
- package/tests/{plugins → jest/plugins}/plugin.archive_analytics.test.js +2 -2
- package/tests/{plugins → jest/plugins}/plugin.autoplay.test.js +4 -4
- package/tests/jest/plugins/plugin.chapters.test.js +195 -0
- package/tests/{plugins → jest/plugins}/plugin.iframe.test.js +2 -2
- package/tests/{plugins → jest/plugins}/plugin.resume.test.js +3 -3
- package/tests/jest/plugins/plugin.text_selection.test.js +317 -0
- package/tests/{plugins → jest/plugins}/plugin.vendor-fullscreen.test.js +2 -2
- package/tests/{plugins → jest/plugins}/search/plugin.search.test.js +25 -47
- package/tests/{plugins → jest/plugins}/search/plugin.search.view.test.js +39 -6
- package/tests/jest/plugins/search/utils.js +25 -0
- package/tests/jest/plugins/search/utils.test.js +29 -0
- package/tests/{plugins → jest/plugins}/tts/AbstractTTSEngine.test.js +29 -9
- package/tests/{plugins → jest/plugins}/tts/FestivalTTSEngine.test.js +4 -4
- package/tests/{plugins → jest/plugins}/tts/PageChunk.test.js +1 -1
- package/tests/{plugins → jest/plugins}/tts/PageChunkIterator.test.js +3 -3
- package/tests/{plugins → jest/plugins}/tts/WebTTSEngine.test.js +47 -1
- package/tests/{plugins → jest/plugins}/tts/utils.test.js +1 -60
- package/tests/jest/plugins/url/UrlPlugin.test.js +198 -0
- package/tests/{plugins → jest/plugins/url}/plugin.url.test.js +53 -14
- package/tests/jest/setup.js +3 -0
- package/tests/{util → jest/util}/browserSniffing.test.js +1 -1
- package/tests/jest/util/docCookies.test.js +24 -0
- package/tests/{util → jest/util}/strings.test.js +1 -1
- package/tests/{utils.js → jest/utils.js} +38 -0
- package/webpack.config.js +12 -6
- package/.babelrc +0 -12
- package/.dependabot/config.yml +0 -6
- package/.testcaferc.json +0 -5
- package/BookReader/bookreader-component-bundle.js +0 -1450
- package/BookReader/bookreader-component-bundle.js.LICENSE.txt +0 -38
- package/BookReader/bookreader-component-bundle.js.map +0 -1
- package/BookReader/jquery-1.10.1.js +0 -2
- package/BookReader/jquery-1.10.1.js.LICENSE.txt +0 -24
- package/BookReader/plugins/plugin.menu_toggle.js +0 -2
- package/BookReader/plugins/plugin.menu_toggle.js.map +0 -1
- package/BookReader/plugins/plugin.mobile_nav.js +0 -2
- package/BookReader/plugins/plugin.mobile_nav.js.map +0 -1
- package/BookReaderDemo/IIIFBookReader.js +0 -207
- package/BookReaderDemo/bookreader-template-bundle.js +0 -7178
- package/BookReaderDemo/demo-iiif.js +0 -26
- package/BookReaderDemo/demo-plugin-menu-toggle.html +0 -34
- package/karma.conf.js +0 -23
- package/src/BookNavigator/BookModel.js +0 -14
- package/src/BookNavigator/BookNavigator.js +0 -446
- package/src/BookNavigator/assets/book-loader.js +0 -27
- package/src/BookNavigator/br-fullscreen-mgr.js +0 -83
- package/src/BookNavigator/search/a-search-result.js +0 -55
- package/src/BookReader/DebugConsole.js +0 -54
- package/src/BookReaderComponent/BookReaderComponent.js +0 -112
- package/src/ItemNavigator/ItemNavigator.js +0 -376
- package/src/ItemNavigator/providers/sharing.js +0 -29
- package/src/css/_MobileNav.scss +0 -194
- package/src/dragscrollable-br.js +0 -261
- package/src/lit-wrapper.js +0 -2
- package/src/plugins/menu_toggle/plugin.menu_toggle.js +0 -324
- package/src/plugins/plugin.mobile_nav.js +0 -287
- package/tests/BookReader/BookReaderPublicFunctions.test.js +0 -171
- package/tests/BookReader/DebugConsole.test.js +0 -25
- package/tests/BookReader/Mode1Up.test.js +0 -164
- package/tests/BookReader/Mode2Up.test.js +0 -247
- package/tests/BookReader/utils.test.js +0 -109
- package/tests/e2e/helpers/desktopSearch.js +0 -72
- package/tests/e2e/helpers/mobileSearch.js +0 -85
- package/tests/e2e/ia-production/ia-prod-base.js +0 -17
- package/tests/karma/BookNavigator/book-navigator.test.js +0 -132
- package/tests/karma/BookNavigator/search/search-provider.test.js +0 -23
- package/tests/karma/BookNavigator/visual-adjustments.test.js +0 -201
- package/tests/plugins/menu_toggle/plugin.menu_toggle.test.js +0 -68
- package/tests/plugins/plugin.chapters.test.js +0 -130
- package/tests/plugins/plugin.mobile_nav.test.js +0 -66
- package/tests/plugins/plugin.text_selection.test.js +0 -203
- package/tests/util/docCookies.test.js +0 -15
@@ -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([[34],{2862:function(e,t,n){"use strict";n(1539),n(9714),n(4916),n(4723),n(9600),n(1249),n(7327),n(9826),n(2222),n(8674),n(5827),n(489),n(2419),n(4819),n(5003),n(2526),n(1817),n(2165),n(6992),n(8783),n(3948),n(6755),n(5306),n(7042),n(8309),n(1038),n(9601);var o=n(3609);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var o,i,a=[],r=!0,s=!1;try{for(n=n.call(e);!(r=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);r=!0);}catch(e){s=!0,i=e}finally{try{r||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.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)?a(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 a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}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,o.key,o)}}var s=function(){function e(t,n,o,i){!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=i}var t,n;return t=e,n=[{key:"fetch",value:function(t,n,i){return new Promise((function(a,r){o.ajax({type:"GET",url:"https://".concat(t,"/BookReader/BookReaderGetTextWrapper.php"),dataType:"jsonp",cache:!0,data:{path:"".concat(n,"_djvu.xml"),page:i},error:r}).then((function(t){a(e._fromTextWrapperResponse(i,t))}))}))}},{key:"_fromTextWrapperResponse",value:function(t,n){return n.map((function(n,o){var i=e._fixChunkRects(n.slice(1)),a=e._removeDanglingHyphens(n[0]);return new e(t,o,a,i)}))}},{key:"_fixChunkRects",value:function(e){if(e.length<2)return e;var t=i(e,2),n=t[0],o=t[1],a=i(n,3),r=a[0],s=a[1],u=a[2]-r,l=o[1]-o[3],c=o[2]-o[0],d=o[2];return u>30*c&&(n[2]=d,n[3]=s-l),e}},{key:"_removeDanglingHyphens",value:function(e){return e.replace(/-\s+/g,"")}}],null&&r(t.prototype,null),n&&r(t,n),e}();function u(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,o.key,o)}}var l=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({},c,o),this._cursor={page:n,chunk:0},this._bufferedPages={},this._bufferingPages={},this._cursorLock=Promise.resolve()}var t,n;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:function(){var t=this;return this._cursor.page==this.pageCount?Promise.resolve(e.AT_END):(this._recenterBuffer(this._cursor.page),this._fetchPageChunks(this._cursor.page).then((function(e){return t._cursor.chunk==e.length?(t._cursor.page++,t._cursor.chunk=0,t._nextUncontrolled()):e[t._cursor.chunk++]})))}},{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 s.fetch(this.opts.server,this.opts.bookPath,e)}}])&&u(t.prototype,n),e}();l.AT_END="__PageChunkIterator.AT_END__";var c={server:null,bookPath:null,pageBufferSize:2},d=n(3609);function h(e){return(h="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})(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function p(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,o.key,o)}}var A=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.playing=!1,this.paused=!1,this.opts=t,this._chunkIterator=null,this.activeSound=null,this.playbackRate=1,this.events=d({}),this.voice=null,this.events.on("voiceschanged",(function(){n.voice=e.getBestBookVoice(n.getVoices(),n.opts.bookLanguage)})),this.events.trigger("voiceschanged")}var t,n,o;return t=e,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,i=t.filter((function(e){return e.lang.startsWith(n)})),a=(o=o||(navigator.language?[navigator.language]:[])).filter((function(e){return e.startsWith(n)}));return e.getMatchingVoice(a,i)||i.find((function(e){return e.default}))||i[0]||e.getMatchingVoice(o,t)||t.find((function(e){return e.default}))||t[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 f(e,t);var n=Object.prototype.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}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 a,r=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw a}}}}(e);try{var 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;){var a=i();if("object"===h(a))return a.v}}catch(e){o.e(e)}finally{o.f()}}}],(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.opts.onLoadingStart(),this._chunkIterator=new l(t,e,{server:this.opts.server,bookPath:this.opts.bookPath,pageBufferSize:5}),this.step(),this.events.trigger("start")}},{key:"stop",value:function(){this.activeSound&&this.activeSound.stop(),this.playing=!1,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:function(){var e=this;Promise.all([this.activeSound.stop(),this._chunkIterator.decrement().then((function(){return e._chunkIterator.decrement()}))]).then((function(){return e.step()}))}},{key:"setPlaybackRate",value:function(e){this.playbackRate=e,this.activeSound&&this.activeSound.setPlaybackRate(e)}},{key:"step",value:function(){var e=this;this._chunkIterator.next().then((function(t){if(t==l.AT_END)return e.stop(),void e.opts.onDone();e.opts.onLoadingStart();var n=e.createSound(t);return n.chunk=t,n.rate=e.playbackRate,n.voice=e.voice,n.load((function(){return e.opts.onLoadingComplete()})),e.opts.onLoadingComplete(),e.opts.beforeChunkPlay(t).then((function(){return n}))})).then((function(t){if(e.playing){var n=e.playSound(t).then((function(){return e.opts.afterChunkPlay(t.chunk)}));return e.paused&&e.pause(),n}})).then((function(){if(e.playing)return e.step()}))}},{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(){return e.getBestBookVoice(this.getVoices(),this.opts.bookLanguage)}}])&&p(t.prototype,n),o&&p(t,o),e}(),m=(n(3123),n(1030));function g(e,t){return new Promise((function(n){e.addEventListener(t,(function o(i){e.removeEventListener(t,o),n(i)}))}))}function y(e){return new Promise((function(t){return setTimeout(t,e)}))}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(e)}var b={Name:0,Endonym:1,"ISO 639-1":2,"ISO 639-2/T":3,"ISO 639-2/B":4};function w(e,t){for(var n=0;n<m.Z.length;n++)for(var o=0;o<t.length;o++){var i=t[o];if(-1!=m.Z[n][b[i]].split(", ").map((function(e){return e.toLowerCase()})).indexOf(e))return m.Z[n][b["ISO 639-1"]]}return null}n(5529),n(4371);var V=n(3609);function k(e){return(k="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})(e)}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(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,o.key,o)}}function S(e,t,n){return t&&M(e.prototype,t),n&&M(e,n),e}function O(e,t,n){return(O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=R(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return!t||"object"!==k(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L=function(e){!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}}),t&&P(e,t)}(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=R(t);if(n){var i=R(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return I(this,e)});function i(e){var t,n;return _(this,i),(n=o.call(this,e)).audioFormat=null!==(t=V.browser)&&void 0!==t&&t.mozilla?"ogg":"mp3",n}return S(i,[{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,t){var n=this,o=null;navigator.userAgent.match(/mobile/i)&&(o=this.iOSCaptureUserIntentHack()),(o=o||Promise.resolve()).then((function(){return O(R(i.prototype),"start",n).call(n,e,t)}))}},{key:"createSound",value:function(e){return new q(this.getSoundUrl(e.text))}},{key:"getSoundUrl",value:function(e){return"https://"+this.opts.server+"/BookReader/BookReaderGetTTS.php?string="+encodeURIComponent(e)+"&format=."+this.audioFormat}},{key:"iOSCaptureUserIntentHack",value:function(){var e=soundManager.createSound({url:x[this.audioFormat]});return new Promise((function(t){return e.play({onfinish:t})})).then((function(){return e.destruct()}))}}],[{key:"isSupported",value:function(){return"undefined"!=typeof soundManager&&soundManager.supported()}}]),i}(A),q=function(){function e(t){_(this,e),this.soundUrl=t,this.sound=null,this.rate=1,this._finishResolver=null}return S(e,[{key:"loaded",get:function(){return this.sound&&this.sound.loaded}},{key:"load",value:function(e){var t=this;return this.sound=soundManager.createSound({url:this.soundUrl,onload:function(){1!=t.rate&&t.sound.setPlaybackRate(t.rate),e()},onresume:function(){y(25).then((function(){1!=t.rate&&t.sound.setPlaybackRate(t.rate)}))}}),this.sound.load()}},{key:"play",value:function(){var e=this;return new Promise((function(t){e._finishResolver=t,e.sound.play({onfinish:t})})).then((function(){return e.sound.destruct()}))}},{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()}}]),e}(),x={mp3:"data:audio/mp3;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAAAeTEFNRTMuOTlyBJwAAAAAAAAAADUgJAaUQQABrgAAAnHIf8sZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AeAACSDSAiIpo5jg6PD5AQkRGSEpMTlAAAAAAA4AGADwCAJAWIiIhmjqPD4wMkRGSEpMTkBCUAAAAAAAAAAAAICAgAAAAAAAQAAAAICE9nZ1MABCwAAAAAAAAAFRIAAAIAAAAPBTD1AgEBAAo="},E=n(7775);function T(e){return(T="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})(e)}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D(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,o.key,o)}}function F(e,t,n){return t&&D(e.prototype,t),n&&D(e,n),e}function B(e,t,n){return(B="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=j(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var N,Q=function(e){!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}}),t&&H(e,t)}(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=j(t);if(n){var i=j(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return U(this,e)});function i(e){var t;return C(this,i),t=o.call(this,e),speechSynthesis.addEventListener&&speechSynthesis.addEventListener("voiceschanged",(function(){return t.events.trigger("voiceschanged")})),t}return F(i,[{key:"start",value:function(e,t){var n=this;if("mediaSession"in navigator){var o=new Audio(z);o.loop=!0,this.events.on("pause",(function(){return o.pause()})),this.events.on("resume",(function(){return o.play()})),this.events.on("stop",(function(){return o.src=""})),o.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.setActionHandler("play",(function(){o.play(),n.resume()})),navigator.mediaSession.setActionHandler("pause",(function(){o.pause(),n.pause()})),navigator.mediaSession.setActionHandler("previoustrack",(function(){return n.jumpBackward()})),navigator.mediaSession.setActionHandler("nexttrack",(function(){return n.jumpForward()}))}))}return B(j(i.prototype),"start",this).call(this,e,t)}},{key:"getVoices",value:function(){return speechSynthesis.getVoices()}},{key:"createSound",value:function(e){return new Y(e.text)}}],[{key:"isSupported",value:function(){return void 0!==window.speechSynthesis&&!/samsungbrowser/i.test(navigator.userAgent)}}]),i}(A),Y=function(){function e(t){C(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}return F(e,[{key:"load",value:function(e){var t=this;this.loaded=!1,this.started=!1,this.utterance=new SpeechSynthesisUtterance(this.text.slice(this._charIndex)),this.utterance.voice=this.voice,this.voice&&(this.utterance.lang=this.voice.lang),this.utterance.rate=this.rate,-1!=location.toString().indexOf("_debugReadAloud=true")&&(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(){return console.log("error")})),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 t._lastEvents.start=e})),this.utterance.addEventListener("boundary",(function(e){return t._lastEvents.boundary=e})),this.utterance.addEventListener("pause",(function(e){return t._lastEvents.pause=e})),this.utterance.addEventListener("start",(function(){t.started=!0,t.stopped=!1,t.paused=!1})),this.utterance.addEventListener("pause",(function(){return t.paused=!0})),this.utterance.addEventListener("resume",(function(){return t.paused=!1})),this.utterance.addEventListener("end",(function(e){t.paused||t.stopped||t.utterance.dispatchEvent(new CustomEvent("finish",e))})),this.loaded=!0,e&&e()}},{key:"reload",value:function(){var e=this,t=this.paused,n=this._lastEvents.boundary||this._lastEvents.pause;return n&&(this._charIndex=this.text.indexOf(n.target.text)+n.charIndex),this.stop().then((function(){e.load(),t||e.play()}))}},{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,E.i7)()&&!t&&this._chromePausingBugFix(),this._finishPromise}},{key:"stop",value:function(){var e=Promise.resolve();return this.stopped||(e=Promise.race([g(this.utterance,"end"),g(this.utterance,"error")])),this.stopped=!0,speechSynthesis.cancel(),e}},{key:"finish",value:function(){var e=this;this.stop().then((function(){return e.utterance.dispatchEvent(new Event("finish"))}))}},{key:"pause",value:function(){var e=this;if(!this.paused){var t=g(this.utterance,"pause");speechSynthesis.pause();var n=(0,E.vU)()&&v();if((0,E.i7)()||n){var o=y(100).then((function(){return"timeout"}));Promise.race([t,o]).then((function(t){"timeout"==t&&(e.utterance.dispatchEvent(new CustomEvent("pause",e._lastEvents.start)),n&&e.stop())}))}}}},{key:"resume",value:function(){var e=this;if(this.started){if(this.paused){var t=(0,E.i7)()&&v()||(0,E.vU)()&&v(),n=(0,E.i7)()||t,o=g(this.utterance,"resume");speechSynthesis.resume(),n&&Promise.race([o,y(100).then((function(){return"timeout"}))]).then((function(n){"timeout"==n&&(e.utterance.dispatchEvent(new CustomEvent("resume",{})),t&&e.reload().then((function(){return e.play()})))}))}}else this.play()}},{key:"setPlaybackRate",value:function(e){this.rate=e,this.reload()}},{key:"_chromePausingBugFix",value:function(){var e=this,t=y(14e3).then((function(){return"timeout"})),n=g(this.utterance,"pause").then((function(){return"paused"})),o=g(this.utterance,"end").then((function(){return"ended"}));return Promise.race([t,n,o]).then((function(t){switch(-1!=location.toString().indexOf("_debugReadAloud=true")&&console.log("CHROME-PAUSE-HACK: ".concat(t)),t){case"ended":break;case"paused":Promise.race([g(e.utterance,"resume"),y(14e3).then((function(){return"timeout"}))]).then((function(t){"timeout"==t?e.reload():e._chromePausingBugFix()}));break;case"timeout":speechSynthesis.pause(),y(25).then((function(){speechSynthesis.resume(),e._chromePausingBugFix()}))}}))}}]),e}(),z="data:audio/mp3;base64,/+MYxAAMEAISSAhElhIpJYzz1vz9mUdlHvJwTP/n3FJesPxB9/8mp0oGaz9+7+T//8oCDhJqOMqLh4o4uhUAUUDaf//3r+///+MYxAoKy2ImKAgEqbfr/t///27/+n3s32/////+b5qMsq7vnXCKh2By3ZcIqyrUYbbRH0fp+ljtf+n2Uo72PHX/03f0df///+MYxBkKUAYmQAhEAL+2l44oKFjZMwJAOJnhguMqokFAqBKl/5f1/+f+3/v////9GT//r+//v+//////b1VvucaRChqnMqsY/+MYxCoLo2IiSAgEpRrgIRVq//p////25nlpVFbQ9kuXtrpt+n//3ZUZNKHVTHdJk3Q6h961DAU8loFlsfTnTZYLLQ1xiIYC/+MYxDYLa2YYAACNFAKKv5swEnqSccBoi//xVP9R/q/370r02////7VpaiWWLrD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VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",K="Read this book aloud",Z=n(3609),W=n(3609);Z.extend(BookReader.defaultOptions,{server:"ia600609.us.archive.org",bookPath:"",enableTtsPlugin:!0}),BookReader.prototype.setup=(N=BookReader.prototype.setup,function(e){if(N.call(this,e),this.options.enableTtsPlugin){this.ttsHilites=[];var t=Q.isSupported()?Q:L.isSupported()?L:null;if(/_forceTTSEngine=(festival|web)/.test(location.toString())){var n=location.toString().match(/_forceTTSEngine=(festival|web)/)[1];t={festival:L,web:Q}[n]}t&&(this.ttsEngine=new t({server:e.server,bookPath:e.bookPath,bookLanguage:(o=e.bookLanguage,o?w(o=o.toLowerCase(),["ISO 639-1"])||w(o,["ISO 639-2/B"])||w(o,["ISO 639-2/T","Endonym","Name"]):null),onLoadingStart:this.showProgressPopup.bind(this,"Loading audio..."),onLoadingComplete:this.removeProgressPopup.bind(this),onDone:this.ttsStop.bind(this),beforeChunkPlay:this.ttsBeforeChunkPlay.bind(this),afterChunkPlay:this.ttsSendChunkFinishedAnalyticsEvent.bind(this)}))}var o}),BookReader.prototype.init=function(e){return function(){var t=this;this.options.enableTtsPlugin&&(this.bind(BookReader.eventNames.fragmentChange,(function(){if(t.mode==t.constMode2up){var e=[t.twoPage.currentIndexL,t.twoPage.currentIndexR].map((function(e){return".BRReadAloudHilite.Leaf-".concat(e)})).join(", ");W(t.ttsHilites).filter(e).show(),W(t.ttsHilites).not(e).hide()}})),this.bind(BookReader.eventNames.PostInit,(function(){t.$(".BRicon.read").click((function(){return t.ttsToggle(),!1})),t.ttsEngine&&(t.ttsEngine.init(),/[?&]_autoReadAloud=show/.test(location.toString())&&t.ttsStart(!1))}))),e.call(this)}}(BookReader.prototype.init),BookReader.prototype.buildMobileDrawerElement=function(e){return function(){var t=e.call(this);return this.options.enableTtsPlugin&&this.ttsEngine&&t.find(".BRmobileMenu__moreInfoRow").after(W('\n <li>\n <span>\n <span class="DrawerIconWrapper"><img class="DrawerIcon" src="'.concat(this.imagesBaseURL,'icon_speaker_open.svg" alt="info-speaker"/></span>\n Read Aloud\n </span>\n <div>\n <span class="larger">Press to toggle read aloud</span>\n <br/>\n <button class="BRicon read"></button>\n </div>\n </li>'))),t}}(BookReader.prototype.buildMobileDrawerElement),BookReader.prototype.initNavbar=function(e){return function(){var t=this,n=e.call(this);if(this.options.enableTtsPlugin&&this.ttsEngine){this.refs.$BRReadAloudToolbar=W('\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 </ul>\n ')),n.find(".BRcontrols").prepend(this.refs.$BRReadAloudToolbar),this.ttsEngine.events.on("pause resume start",(function(){return t.ttsUpdateState()})),this.refs.$BRReadAloudToolbar.find("[name=play]").click(this.ttsPlayPause.bind(this)),this.refs.$BRReadAloudToolbar.find("[name=advance]").click(this.ttsJumpForward.bind(this)),this.refs.$BRReadAloudToolbar.find("[name=review]").click(this.ttsJumpBackward.bind(this));var o=this.refs.$BRReadAloudToolbar.find('select[name="playback-speed"]');o.change((function(e){return t.ttsEngine.setPlaybackRate(parseFloat(o.val()))})),W('<li>\n <button class="BRicon read js-tooltip" title="'.concat(K,'">\n <div class="icon icon-read-aloud"></div>\n <span class="tooltip">').concat(K,"</span>\n </button>\n </li>")).insertBefore(n.find(".BRcontrols .BRicon.zoom_out").closest("li"))}return n}}(BookReader.prototype.initNavbar),BookReader.prototype.ttsToggle=function(){this.autoStop&&this.autoStop(),this.ttsEngine.playing?this.ttsStop():this.ttsStart()},BookReader.prototype.ttsStart=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.constModeThumb==this.mode&&this.switchMode(this.constMode1up),this.refs.$BRReadAloudToolbar.addClass("visible"),this.$(".BRicon.read").addClass("unread active"),this.ttsSendAnalyticsEvent("Start"),e&&this.ttsEngine.start(this.currentIndex(),this.getNumLeafs())},BookReader.prototype.ttsJumpForward=function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpForward()},BookReader.prototype.ttsJumpBackward=function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpBackward()},BookReader.prototype.ttsUpdateState=function(){var e=!(this.ttsEngine.paused||!this.ttsEngine.playing);this.$(".read-aloud [name=play]").toggleClass("playing",e)},BookReader.prototype.ttsPlayPause=function(){this.ttsEngine.playing?(this.ttsEngine.togglePlayPause(),this.ttsUpdateState(this.ttsEngine.paused)):this.ttsToggle()},BookReader.prototype.ttsStop=function(){this.refs.$BRReadAloudToolbar.removeClass("visible"),this.$(".BRicon.read").removeClass("unread active"),this.ttsSendAnalyticsEvent("Stop"),this.ttsEngine.stop(),this.ttsRemoveHilites(),this.removeProgressPopup()},BookReader.prototype.ttsBeforeChunkPlay=function(e){var t=this;return this.ttsMaybeFlipToIndex(e.leafIndex).then((function(){t.ttsHighlightChunk(e),t.ttsScrollToChunk(e)}))},BookReader.prototype.ttsSendChunkFinishedAnalyticsEvent=function(e){var t;this.ttsSendAnalyticsEvent("ChunkFinished-Words",(t=e.text.match(/\S+/g))?t.length:0)},BookReader.prototype.ttsMaybeFlipToIndex=function(e){var t=this.constMode2up==this.mode,n=null,o=new Promise((function(e){return n=e}));return t?e==this.twoPage.currentIndexR||e==this.twoPage.currentIndexL?n():(this.animationFinishedCallback=n,e>Math.max(this.twoPage.currentIndexR,this.twoPage.currentIndexL)?this.next():this.prev(),o.then(this.ttsMaybeFlipToIndex.bind(this,e))):(this.jumpToIndex(e),n()),o},BookReader.prototype.ttsHighlightChunk=function(e){this.ttsRemoveHilites(),this.constMode2up==this.mode?this.ttsHilite2UP(e):this.ttsHilite1UP(e)},BookReader.prototype.ttsScrollToChunk=function(e){var t,n,o,i;if(this.constMode1up==this.mode){var a,r=0;for(a=0;a<e.leafIndex;a++)r+=parseInt(this._getPageHeight(a)/this.reduce)+this.padding;var s=e.lineRects[0][3],u=e.lineRects[e.lineRects.length-1][1],l=r+s/this.reduce,c=r+u/this.reduce;null!==(t=window)&&void 0!==t&&null!==(n=t.soundManager)&&void 0!==n&&n.debugMode&&console.log("leafTop = "+r+" topOfFirstChunk = "+l+" botOfLastChunk = "+c);var d=this.refs.$brContainer.prop("scrollTop"),h=d+this.refs.$brContainer.height();null!==(o=window)&&void 0!==o&&null!==(i=o.soundManager)&&void 0!==i&&i.debugMode&&console.log("containerTop = "+d+" containerBot = "+h),(l<d||c>h)&&this.refs.$brContainer.stop(!0).animate({scrollTop:l},"fast")}},BookReader.prototype.ttsHilite1UP=function(e){for(var t=0;t<e.lineRects.length;t++){var n=e.lineRects[t][0],o=e.lineRects[t][1],i=e.lineRects[t][2],a=e.lineRects[t][3],r=document.createElement("div");this.ttsHilites.push(r),W(r).prop("className","BookReaderSearchHilite").appendTo(this.$(".pagediv"+e.leafIndex)),W(r).css({width:(i-n)/this.reduce+"px",height:(o-a)/this.reduce+"px",left:n/this.reduce+"px",top:a/this.reduce+"px"})}},BookReader.prototype.ttsHilite2UP=function(e){for(var t=0;t<e.lineRects.length;t++){var n=e.lineRects[t][0],o=e.lineRects[t][1],i=e.lineRects[t][2],a=e.lineRects[t][3],r=document.createElement("div");this.ttsHilites.push(r),W(r).prop("className","BookReaderSearchHilite BRReadAloudHilite Leaf-"+e.leafIndex).css("zIndex",3).appendTo(this.refs.$brTwoPageView),this.setHilightCss2UP(r,e.leafIndex,n,i,a,o)}},BookReader.prototype.ttsRemoveHilites=function(){W(this.ttsHilites).remove(),this.ttsHilites=[]},BookReader.prototype.ttsSendAnalyticsEvent=function(e,t){if(this.archiveAnalyticsSendEvent){var n={},o=this.ttsEngine.opts.bookLanguage;o&&(n.mediaLanguage=o),this.archiveAnalyticsSendEvent("BRReadAloud",e,t,n)}}},7775:function(e,t,n){"use strict";function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:navigator.vendor;return/chrome/i.test(e)&&/google inc/i.test(t)}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/firefox/i.test(e)}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/safari/i.test(e)&&!/chrome|chromium/i.test(e)}n.d(t,{i7:function(){return o},vU:function(){return i},G6:function(){return a}})},7065:function(e,t,n){"use strict";var o=n(3099),i=n(111),a=[].slice,r={},s=function(e,t,n){if(!(t in r)){for(var o=[],i=0;i<t;i++)o[i]="a["+i+"]";r[t]=Function("C,a","return new C("+o.join(",")+")")}return r[t](e,n)};e.exports=Function.bind||function(e){var t=o(this),n=a.call(arguments,1),r=function(){var o=n.concat(a.call(arguments));return this instanceof r?s(t,o.length,o):t.apply(e,o)};return i(t.prototype)&&(r.prototype=t.prototype),r}},9601:function(e,t,n){var o=n(2109),i=n(1574);o({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},489:function(e,t,n){var o=n(2109),i=n(7293),a=n(7908),r=n(9518),s=n(8544);o({target:"Object",stat:!0,forced:i((function(){r(1)})),sham:!s},{getPrototypeOf:function(e){return r(a(e))}})},2419:function(e,t,n){var o=n(2109),i=n(5005),a=n(3099),r=n(9670),s=n(111),u=n(30),l=n(7065),c=n(7293),d=i("Reflect","construct"),h=c((function(){function e(){}return!(d((function(){}),[],e)instanceof e)})),f=!c((function(){d((function(){}))})),p=h||f;o({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(e,t){a(e),r(t);var n=arguments.length<3?e:a(arguments[2]);if(f&&!h)return d(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var o=[null];return o.push.apply(o,t),new(l.apply(e,o))}var i=n.prototype,c=u(s(i)?i:Object.prototype),p=Function.apply.call(e,c,t);return s(p)?p:c}})},4819:function(e,t,n){var o=n(2109),i=n(111),a=n(9670),r=n(6656),s=n(1236),u=n(9518);o({target:"Reflect",stat:!0},{get:function e(t,n){var o,l,c=arguments.length<3?t:arguments[2];return a(t)===c?t[n]:(o=s.f(t,n))?r(o,"value")?o.value:void 0===o.get?void 0:o.get.call(c):i(l=u(t))?e(l,n,c):void 0}})},4723:function(e,t,n){"use strict";var o=n(7007),i=n(9670),a=n(7466),r=n(4488),s=n(1530),u=n(7651);o("match",1,(function(e,t,n){return[function(t){var n=r(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var r=i(e),l=String(this);if(!r.global)return u(r,l);var c=r.unicode;r.lastIndex=0;for(var d,h=[],f=0;null!==(d=u(r,l));){var p=String(d[0]);h[f]=p,""===p&&(r.lastIndex=s(l,a(r.lastIndex),c)),f++}return 0===f?null:h}]}))},6755:function(e,t,n){"use strict";var o,i=n(2109),a=n(1236).f,r=n(7466),s=n(3929),u=n(4488),l=n(4964),c=n(1913),d="".startsWith,h=Math.min,f=l("startsWith");i({target:"String",proto:!0,forced:!(!c&&!f&&(o=a(String.prototype,"startsWith"),o&&!o.writable)||f)},{startsWith:function(e){var t=String(u(this));s(e);var n=r(h(arguments.length>1?arguments[1]:void 0,t.length)),o=String(e);return d?d.call(t,o,n):t.slice(n,n+o.length)===o}})},1030:function(e,t){"use strict";t.Z=void 0,t.Z=[["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"]]},4371:function(e,t,n){var o,i;o=[n(3609)],void 0===(i=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={},i={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",versionNumber:t[4]||t[2]||"0",platform:n[0]||""};if(i.browser&&(o[i.browser]=!0,o.version=i.version,o.versionNumber=parseInt(i.versionNumber,10)),i.platform&&(o[i.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 a="msie";i.browser=a,o[a]=!0}if(o.edge){delete o.edge;var r="msedge";i.browser=r,o.msedge=!0}if(o.safari&&o.blackberry){var s="blackberry";i.browser=s,o.blackberry=!0}if(o.safari&&o.playbook){var u="playbook";i.browser=u,o.playbook=!0}if(o.bb){var l="blackberry";i.browser=l,o[l]=!0}if(o.opr){var c="opera";i.browser=c,o.opera=!0}if(o.safari&&o.android){var d="android";i.browser=d,o.android=!0}if(o.safari&&o.kindle){var h="kindle";i.browser=h,o.kindle=!0}if(o.safari&&o.silk){var f="silk";i.browser=f,o.silk=!0}return o.name=i.browser,o.platform=i.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=i)},5529:function(e,t,n){var o;e=n.nmd(e),function(i,a){"use strict";if(!i||!i.document)throw new Error("SoundManager requires a browser with window and document objects.");var r=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,r,s,u,l,c,d,h,f,p,A,m,g,y,v,b,w,V,k,_,M,S,O,P,I,R,L,q,x,E,T,C,D,F,B,H,U,j,N,Q,Y,z,K,Z,W,G,X,J,$,ee,te,ne,oe,ie,ae,re,se,ue,le,ce,de,he,fe,pe,Ae=this,me=null,ge=null,ye="soundManager",ve=ye+": ",be=navigator.userAgent,we=i.location.href.toString(),Ve=document,ke=[],_e=!0,Me=!1,Se=!1,Oe=!1,Pe=!1,Ie=!1,Re=0,Le=["log","info","warn","error"],qe=null,xe=null,Ee=!1,Te=!1,Ce=0,De=null,Fe=[],Be=null,He=Array.prototype.slice,Ue=!1,je=0,Ne=1e3,Qe=be.match(/(ipad|iphone|ipod)/i),Ye=be.match(/android/i),ze=be.match(/msie|trident/i),Ke=be.match(/webkit/i),Ze=be.match(/safari/i)&&!be.match(/chrome/i),We=be.match(/opera/i),Ge=be.match(/(mobile|pre\/|xoom)/i)||Qe||Ye,Xe=!we.match(/usehtml5audio/i)&&!we.match(/sm2-ignorebadua/i)&&Ze&&!be.match(/silk/i)&&be.match(/OS\sX\s10_6_([3-7])/i),Je=i.console!==a&&console.log!==a,$e=Ve.hasFocus!==a?Ve.hasFocus():null,et=Ze&&(Ve.hasFocus===a||!Ve.hasFocus()),tt=!et,nt=/(mp3|mp4|mpa|m4a|m4b)/i,ot="about:blank",it=Ve.location?Ve.location.protocol.match(/http/i):null,at=it?"":"//",rt=/^\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 Ae.preferFlash&&se&&!Ae.ignoreFlash&&Ae.flash[e]!==a&&Ae.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?Ae._wD(o.id+": Ignoring "+t.type):Ae._wD("HTML5::Ignoring "+t.type),n=null),n}}this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!it,H={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!==a&&(We&&opera!==a&&opera.version()<10?new Audio(null):new Audio).canPlayType!==a}catch(e){return!1}}(),this.setup=function(e){var t=!Ae.url;return e!==a&&Oe&&Be&&Ae.ok()&&(e.flashVersion!==a||e.url!==a||e.html5Test!==a)&&Q(D("setupLate")),p(e),Ue||(Ge?Ae.setupOptions.ignoreMobileRestrictions&&!Ae.setupOptions.forceUseGlobalHTML5Audio||(Fe.push(_.globalHTML5),Ue=!0):Ae.setupOptions.forceUseGlobalHTML5Audio&&(Fe.push(_.globalHTML5),Ue=!0)),!pe&&Ge&&(Ae.setupOptions.ignoreMobileRestrictions?Fe.push(_.ignoreMobile):(Ae.setupOptions.useHTML5Audio&&!Ae.setupOptions.preferFlash||Ae._wD(_.mobileUA),Ae.setupOptions.useHTML5Audio=!0,Ae.setupOptions.preferFlash=!1,Qe?Ae.ignoreFlash=!0:(Ye&&!be.match(/android\s2\.3/i)||!Ye)&&(Ae._wD(_.globalHTML5),Ue=!0))),e&&(t&&P&&e.url!==a&&Ae.beginDelayedInit(),P||e.url===a||"complete"!==Ve.readyState||setTimeout(S,1)),pe=!0,Ae},this.ok=function(){return Be?Oe&&!Pe:Ae.useHTML5Audio&&Ae.hasHTML5},this.supported=this.ok,this.getMovie=function(e){return o(e)||Ve[e]||i[e]},this.createSound=function(e,t){var o,i,r,s=null;if(i=(o=ye+".createSound(): ")+D(Oe?"notOK":"notReady"),!Oe||!Ae.ok())return Q(i),!1;if(t!==a&&(e={id:e,url:t}),(r=f(e)).url=W(r.url),r.id===a&&(r.id=Ae.setupOptions.idPrefix+je++),r.id.toString().charAt(0).match(/^[0-9]$/)&&Ae._wD(o+D("badID",r.id),2),Ae._wD(o+r.id+(r.url?" ("+r.url+")":""),1),Y(r.id,!0))return Ae._wD(o+r.id+" exists",1),Ae.sounds[r.id];function u(){return r=j(r),Ae.sounds[r.id]=new n(r),Ae.soundIDs.push(r.id),Ae.sounds[r.id]}if(J(r))s=u(),Ae.html5Only||Ae._wD(r.id+": Using HTML5"),s._setup_html5(r);else{if(Ae.html5Only)return Ae._wD(r.id+": No HTML5 support for this sound, and no Flash. Exiting."),u();if(Ae.html5.usingFlash&&r.url&&r.url.match(/data:/i))return Ae._wD(r.id+": data: URIs not supported via Flash. Exiting."),u();l>8&&(null===r.isMovieStar&&(r.isMovieStar=!!(r.serverURL||r.type&&r.type.match(rt)||r.url&&r.url.match(ut))),r.isMovieStar&&(Ae._wD(o+"using MovieStar handling"),r.loops>1&&d("noNSLoop"))),r=N(r,o),s=u(),8===l?ge._createSound(r.id,r.loops||1,r.usePolicyFile):(ge._createSound(r.id,r.url,r.usePeakData,r.useWaveformData,r.useEQData,r.isMovieStar,!!r.isMovieStar&&r.bufferTime,r.loops||1,r.serverURL,r.duration||null,r.autoPlay,!0,r.autoLoad,r.usePolicyFile),r.serverURL||(s.connected=!0,r.onconnect&&r.onconnect.apply(s))),r.serverURL||!r.autoLoad&&!r.autoPlay||s.load(r)}return!r.serverURL&&r.autoPlay&&s.play(),s},this.destroySound=function(e,t){if(!Y(e))return!1;var n,o=Ae.sounds[e];for(o.stop(),o._iO={},o.unload(),n=0;n<Ae.soundIDs.length;n++)if(Ae.soundIDs[n]===e){Ae.soundIDs.splice(n,1);break}return t||o.destruct(!0),o=null,delete Ae.sounds[e],!0},this.load=function(e,t){return!!Y(e)&&Ae.sounds[e].load(t)},this.unload=function(e){return!!Y(e)&&Ae.sounds[e].unload()},this.onPosition=function(e,t,n,o){return!!Y(e)&&Ae.sounds[e].onposition(t,n,o)},this.onposition=this.onPosition,this.clearOnPosition=function(e,t,n){return!!Y(e)&&Ae.sounds[e].clearOnPosition(t,n)},this.play=function(e,t){var n=null,o=t&&!(t instanceof Object);if(!Oe||!Ae.ok())return Q(ye+".play(): "+D(Oe?"notOK":"notReady")),!1;if(Y(e,o))o&&(t={url:t});else{if(!o)return!1;o&&(t={url:t}),t&&t.url&&(Ae._wD(ye+'.play(): Attempting to create "'+e+'"',1),t.id=e,n=Ae.createSound(t).play())}return null===n&&(n=Ae.sounds[e].play(t)),n},this.start=this.play,this.setPlaybackRate=function(e,t,n){return!!Y(e)&&Ae.sounds[e].setPlaybackRate(t,n)},this.setPosition=function(e,t){return!!Y(e)&&Ae.sounds[e].setPosition(t)},this.stop=function(e){return!!Y(e)&&(Ae._wD(ye+".stop("+e+")",1),Ae.sounds[e].stop())},this.stopAll=function(){var e;for(e in Ae._wD(ye+".stopAll()",1),Ae.sounds)Ae.sounds.hasOwnProperty(e)&&Ae.sounds[e].stop()},this.pause=function(e){return!!Y(e)&&Ae.sounds[e].pause()},this.pauseAll=function(){var e;for(e=Ae.soundIDs.length-1;e>=0;e--)Ae.sounds[Ae.soundIDs[e]].pause()},this.resume=function(e){return!!Y(e)&&Ae.sounds[e].resume()},this.resumeAll=function(){var e;for(e=Ae.soundIDs.length-1;e>=0;e--)Ae.sounds[Ae.soundIDs[e]].resume()},this.togglePause=function(e){return!!Y(e)&&Ae.sounds[e].togglePause()},this.setPan=function(e,t){return!!Y(e)&&Ae.sounds[e].setPan(t)},this.setVolume=function(e,t){var n,o;if(e!==a&&!isNaN(e)&&t===a){for(n=0,o=Ae.soundIDs.length;n<o;n++)Ae.sounds[Ae.soundIDs[n]].setVolume(e);return!1}return!!Y(e)&&Ae.sounds[e].setVolume(t)},this.mute=function(e){var t=0;if(e instanceof String&&(e=null),e)return!!Y(e)&&(Ae._wD(ye+'.mute(): Muting "'+e+'"'),Ae.sounds[e].mute());for(Ae._wD(ye+".mute(): Muting all sounds"),t=Ae.soundIDs.length-1;t>=0;t--)Ae.sounds[Ae.soundIDs[t]].mute();return Ae.muted=!0,!0},this.muteAll=function(){Ae.mute()},this.unmute=function(e){var t;if(e instanceof String&&(e=null),e)return!!Y(e)&&(Ae._wD(ye+'.unmute(): Unmuting "'+e+'"'),Ae.sounds[e].unmute());for(Ae._wD(ye+".unmute(): Unmuting all sounds"),t=Ae.soundIDs.length-1;t>=0;t--)Ae.sounds[Ae.soundIDs[t]].unmute();return Ae.muted=!1,!0},this.unmuteAll=function(){Ae.unmute()},this.toggleMute=function(e){return!!Y(e)&&Ae.sounds[e].toggleMute()},this.getMemoryUse=function(){var e=0;return ge&&8!==l&&(e=parseInt(ge._getMemoryUse(),10)),e},this.disable=function(e){var t;if(e===a&&(e=!1),Pe)return!1;for(Pe=!0,d("shutdown",1),t=Ae.soundIDs.length-1;t>=0;t--)E(Ae.sounds[Ae.soundIDs[t]]);return E(Ae),h(e),ae.remove(i,"load",y),!0},this.canPlayMIME=function(e){var t;return Ae.hasHTML5&&(t=$({type:e})),!t&&Be&&(t=e&&Ae.ok()?!!(l>8&&e.match(rt)||e.match(Ae.mimePattern)):null),t},this.canPlayURL=function(e){var t;return Ae.hasHTML5&&(t=$({url:e})),!t&&Be&&(t=e&&Ae.ok()?!!e.match(Ae.filePattern):null),t},this.canPlayLink=function(e){return!(e.type===a||!e.type||!Ae.canPlayMIME(e.type))||Ae.canPlayURL(e.href)},this.getSoundById=function(e,t){if(!e)return null;var n=Ae.sounds[e];return n||t||Ae._wD(ye+'.getSoundById(): Sound "'+e+'" not found.',2),n},this.onready=function(e,t){var n="onready";if("function"!=typeof e)throw D("needFunction",n);return Oe&&Ae._wD(D("queue",n)),t||(t=i),m(n,e,t),g(),!0},this.ontimeout=function(e,t){var n="ontimeout";if("function"!=typeof e)throw D("needFunction",n);return Oe&&Ae._wD(D("queue",n)),t||(t=i),m(n,e,t),g({type:n}),!0},this._writeDebug=function(e,t){var n,i;return!(!Ae.setupOptions.debugMode||!(Je&&Ae.useConsole&&(t&&"object"==typeof t?console.log(e,t):Le[t]!==a?console[Le[t]](e):console.log(e),Ae.consoleOnly))&&(!(n=o("soundmanager-debug"))||(i=Ve.createElement("div"),++Re%2==0&&(i.className="sm2-alt"),t=t===a?0:parseInt(t,10),i.appendChild(Ve.createTextNode(e)),t&&(t>=2&&(i.style.fontWeight="bold"),3===t&&(i.style.color="#ff3333")),n.insertBefore(i,n.firstChild),n=null,0)))},-1!==we.indexOf("sm2-debug=alert")&&(this._writeDebug=function(e){i.alert(e)}),this._wD=this._writeDebug,this._debug=function(){var e,t;for(d("currentObj",1),e=0,t=Ae.soundIDs.length;e<t;e++)Ae.sounds[Ae.soundIDs[e]]._debug()},this.reboot=function(e,t){var n,o,a;for(Ae.soundIDs.length&&Ae._wD("Destroying "+Ae.soundIDs.length+" SMSound object"+(1!==Ae.soundIDs.length?"s":"")+"..."),n=Ae.soundIDs.length-1;n>=0;n--)Ae.sounds[Ae.soundIDs[n]].destruct();if(ge)try{ze&&(xe=ge.innerHTML),qe=ge.parentNode.removeChild(ge)}catch(e){d("badRemove",2)}if(xe=qe=Be=ge=null,Ae.enabled=P=Oe=Ee=Te=Me=Se=Pe=Ue=Ae.swfLoaded=!1,Ae.soundIDs=[],Ae.sounds={},je=0,pe=!1,e)ke=[];else for(n in ke)if(ke.hasOwnProperty(n))for(o=0,a=ke[n].length;o<a;o++)ke[n][o].fired=!1;return t||Ae._wD(ye+": Rebooting..."),Ae.html5={usingFlash:null},Ae.flash={},Ae.html5Only=!1,Ae.ignoreFlash=!1,i.setTimeout((function(){t||Ae.beginDelayedInit()}),20),Ae},this.reset=function(){return d("reset"),Ae.reboot(!0,!0)},this.getMoviePercent=function(){return ge&&"PercentLoaded"in ge?ge.PercentLoaded():null},this.beginDelayedInit=function(){Ie=!0,S(),setTimeout((function(){return!Te&&(R(),M(),Te=!0,!0)}),20),v()},this.destruct=function(){Ae._wD(ye+".destruct()"),Ae.disable(!0)},n=function(e){var t,n,o,i,r,s,u,h,p,A,m=this,g=!1,y=[],v=0,b=null;p={duration:null,time:null},this.id=e.id,this.sID=this.id,this.url=e.url,this.options=f(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,A=!this.url,this.id3={},this._debug=function(){Ae._wD(m.id+": Merged options:",m.options)},this.load=function(e){var t;if(e!==a?m._iO=f(e,m.options):(e=m.options,m._iO=e,b&&b!==m.url&&(d("manURL"),m._iO.url=m.url,m.url=null)),m._iO.url||(m._iO.url=m.url),m._iO.url=W(m._iO.url),m.instanceOptions=m._iO,t=m._iO,Ae._wD(m.id+": load ("+t.url+")"),!t.url&&!m.url)return Ae._wD(m.id+": load(): url is unassigned. Exiting.",2),m;if(m.isHTML5||8!==l||m.url||t.autoPlay||Ae._wD(m.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),t.url===m.url&&0!==m.readyState&&2!==m.readyState)return d("onURL",1),3===m.readyState&&t.onload&&fe(m,(function(){t.onload.apply(m,[!!m.duration])})),m;if(m.loaded=!1,m.readyState=1,m.playState=0,m.id3={},J(t))m._setup_html5(t)._called_load?Ae._wD(m.id+": Ignoring request to load again"):(m._html5_canplay=!1,m.url!==t.url&&(Ae._wD(d("manURL")+": "+t.url),m._a.src=t.url,m.setPosition(0)),m._a.autobuffer="auto",m._a.preload="auto",m._a._called_load=!0);else{if(Ae.html5Only)return Ae._wD(m.id+": No flash support. Exiting."),m;if(m._iO.url&&m._iO.url.match(/data:/i))return Ae._wD(m.id+": data: URIs not supported via Flash. Exiting."),m;try{m.isHTML5=!1,m._iO=N(j(t)),m._iO.autoPlay&&(m._iO.position||m._iO.from)&&(Ae._wD(m.id+": Disabling autoPlay because of non-zero offset case"),m._iO.autoPlay=!1),t=m._iO,8===l?ge._load(m.id,t.url,t.stream,t.autoPlay,t.usePolicyFile):ge._load(m.id,t.url,!!t.stream,!!t.autoPlay,t.loops||1,!!t.autoLoad,t.usePolicyFile)}catch(e){d("smError",2),c("onload",!1),L({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return m.url=t.url,m},this.unload=function(){return 0!==m.readyState&&(Ae._wD(m.id+": unload()"),m.isHTML5?(i(),m._a&&(m._a.pause(),b=ne(m._a))):8===l?ge._unload(m.id,ot):ge._unload(m.id),t()),m},this.destruct=function(e){Ae._wD(m.id+": Destruct"),m.isHTML5?(i(),m._a&&(m._a.pause(),ne(m._a),Ue||o(),m._a._s=null,m._a=null)):(m._iO.onfailure=null,ge._destroySound(m.id)),e||Ae.destroySound(m.id,!0)},this.play=function(e,t){var n,o,i,u,c,d,p=!0;if(n=m.id+": play(): ",t=t===a||t,e||(e={}),m.url&&(m._iO.url=m.url),m._iO=f(m._iO,m.options),m._iO=f(e,m._iO),m._iO.url=W(m._iO.url),m.instanceOptions=m._iO,!m.isHTML5&&m._iO.serverURL&&!m.connected)return m.getAutoPlay()||(Ae._wD(n+" Netstream not connected yet - setting autoPlay"),m.setAutoPlay(!0)),m;if(J(m._iO)&&(m._setup_html5(m._iO),r()),1===m.playState&&!m.paused){if(!m._iO.multiShot)return Ae._wD(n+"Already playing (one-shot)",1),m.isHTML5&&m.setPosition(m._iO.position),m;Ae._wD(n+"Already playing (multi-shot)",1)}if(e.url&&e.url!==m.url&&(m.readyState||m.isHTML5||8!==l||!A?m.load(m._iO):A=!1),m.loaded)Ae._wD(n.substr(0,n.lastIndexOf(":")));else if(0===m.readyState){if(Ae._wD(n+"Attempting to load"),m.isHTML5||Ae.html5Only){if(!m.isHTML5)return Ae._wD(n+"Unsupported type. Exiting."),m;m.load(m._iO)}else m._iO.autoPlay=!0,m.load(m._iO);m.instanceOptions=m._iO}else{if(2===m.readyState)return Ae._wD(n+"Could not load - exiting",2),m;Ae._wD(n+"Loading - attempting to play...")}return!m.isHTML5&&9===l&&m.position>0&&m.position===m.duration&&(Ae._wD(n+"Sound at end, resetting to position: 0"),e.position=0),m.paused&&m.position>=0&&(!m._iO.serverURL||m.position>0)?(Ae._wD(n+"Resuming from paused state",1),m.resume()):(m._iO=f(e,m._iO),(!m.isHTML5&&null!==m._iO.position&&m._iO.position>0||null!==m._iO.from&&m._iO.from>0||null!==m._iO.to)&&0===m.instanceCount&&0===m.playState&&!m._iO.serverURL&&(i=function(){m._iO=f(e,m._iO),m.play(m._iO)},m.isHTML5&&!m._html5_canplay?(Ae._wD(n+"Beginning load for non-zero offset case"),m.load({_oncanplay:i})):m.isHTML5||m.loaded||m.readyState&&2===m.readyState||(Ae._wD(n+"Preloading for non-zero offset case"),m.load({onload:i})),m._iO=h()),(!m.instanceCount||m._iO.multiShotEvents||m.isHTML5&&m._iO.multiShot&&!Ue||!m.isHTML5&&l>8&&!m.getAutoPlay())&&m.instanceCount++,m._iO.onposition&&0===m.playState&&s(m),m.playState=1,m.paused=!1,m.position=m._iO.position===a||isNaN(m._iO.position)?0:m._iO.position,m.isHTML5||(m._iO=N(j(m._iO))),m._iO.onplay&&t&&(m._iO.onplay.apply(m),g=!0),m.setVolume(m._iO.volume,!0),m.setPan(m._iO.pan,!0),1!==m._iO.playbackRate&&m.setPlaybackRate(m._iO.playbackRate),m.isHTML5?m.instanceCount<2?(r(),o=m._setup_html5(),m.setPosition(m._iO.position),o.play()):(Ae._wD(m.id+": Cloning Audio() for instance #"+m.instanceCount+"..."),u=new Audio(m._iO.url),c=function(){ae.remove(u,"ended",c),m._onfinish(m),ne(u),u=null},d=function(){ae.remove(u,"canplay",d);try{u.currentTime=m._iO.position/Ne}catch(e){Q(m.id+": multiShot play() failed to apply position of "+m._iO.position/Ne)}u.play()},ae.add(u,"ended",c),m._iO.volume!==a&&(u.volume=Math.max(0,Math.min(1,m._iO.volume/100))),m.muted&&(u.muted=!0),m._iO.position?ae.add(u,"canplay",d):u.play()):(p=ge._start(m.id,m._iO.loops||1,9===l?m.position:m.position/Ne,m._iO.multiShot||!1),9!==l||p||(Ae._wD(n+"No sound hardware, or 32-sound ceiling hit",2),m._iO.onplayerror&&m._iO.onplayerror.apply(m)))),m},this.start=this.play,this.stop=function(e){var t,n=m._iO;return 1===m.playState&&(Ae._wD(m.id+": stop()"),m._onbufferchange(0),m._resetOnPosition(0),m.paused=!1,m.isHTML5||(m.playState=0),u(),n.to&&m.clearOnPosition(n.to),m.isHTML5?m._a&&(t=m.position,m.setPosition(0),m.position=t,m._a.pause(),m.playState=0,m._onTimer(),i()):(ge._stop(m.id,e),n.serverURL&&m.unload()),m.instanceCount=0,m._iO={},n.onstop&&n.onstop.apply(m)),m},this.setAutoPlay=function(e){Ae._wD(m.id+": Autoplay turned "+(e?"on":"off")),m._iO.autoPlay=e,m.isHTML5||(ge._setAutoPlay(m.id,e),e&&(m.instanceCount||1!==m.readyState||(m.instanceCount++,Ae._wD(m.id+": Incremented instance count to "+m.instanceCount))))},this.getAutoPlay=function(){return m._iO.autoPlay},this.setPlaybackRate=function(e){var t=Math.max(.5,Math.min(4,e));if(t!==e&&Ae._wD(m.id+": setPlaybackRate("+e+"): limiting rate to "+t,2),m.isHTML5)try{m._iO.playbackRate=t,m._a.playbackRate=t}catch(e){Ae._wD(m.id+": setPlaybackRate("+t+") failed: "+e.message,2)}return m},this.setPosition=function(e){e===a&&(e=0);var t,n,o=m.isHTML5?Math.max(e,0):Math.min(m.duration||m._iO.duration,Math.max(e,0));if(m.position=o,n=m.position/Ne,m._resetOnPosition(m.position),m._iO.position=o,m.isHTML5){if(m._a){if(m._html5_canplay){if(m._a.currentTime.toFixed(3)!==n.toFixed(3)){Ae._wD(m.id+": setPosition("+n+")");try{m._a.currentTime=n,(0===m.playState||m.paused)&&m._a.pause()}catch(e){Ae._wD(m.id+": setPosition("+n+") failed: "+e.message,2)}}}else if(n)return Ae._wD(m.id+": setPosition("+n+"): Cannot seek yet, sound not ready",2),m;m.paused&&m._onTimer(!0)}}else t=9===l?m.position:n,m.readyState&&2!==m.readyState&&ge._setPosition(m.id,t,m.paused||!m.playState,m._iO.multiShot);return m},this.pause=function(e){return m.paused||0===m.playState&&1!==m.readyState||(Ae._wD(m.id+": pause()"),m.paused=!0,m.isHTML5?(m._setup_html5().pause(),i()):(e||e===a)&&ge._pause(m.id,m._iO.multiShot),m._iO.onpause&&m._iO.onpause.apply(m)),m},this.resume=function(){var e=m._iO;return m.paused?(Ae._wD(m.id+": resume()"),m.paused=!1,m.playState=1,m.isHTML5?(m._setup_html5().play(),r()):(e.isMovieStar&&!e.serverURL&&m.setPosition(m.position),ge._pause(m.id,e.multiShot)),!g&&e.onplay?(e.onplay.apply(m),g=!0):e.onresume&&e.onresume.apply(m),m):m},this.togglePause=function(){return Ae._wD(m.id+": togglePause()"),0===m.playState?(m.play({position:9!==l||m.isHTML5?m.position/Ne:m.position}),m):(m.paused?m.resume():m.pause(),m)},this.setPan=function(e,t){return e===a&&(e=0),t===a&&(t=!1),m.isHTML5||ge._setPan(m.id,e),m._iO.pan=e,t||(m.pan=e,m.options.pan=e),m},this.setVolume=function(e,t){return e===a&&(e=100),t===a&&(t=!1),m.isHTML5?m._a&&(Ae.muted&&!m.muted&&(m.muted=!0,m._a.muted=!0),m._a.volume=Math.max(0,Math.min(1,e/100))):ge._setVolume(m.id,Ae.muted&&!m.muted||m.muted?0:e),m._iO.volume=e,t||(m.volume=e,m.options.volume=e),m},this.mute=function(){return m.muted=!0,m.isHTML5?m._a&&(m._a.muted=!0):ge._setVolume(m.id,0),m},this.unmute=function(){m.muted=!1;var e=m._iO.volume!==a;return m.isHTML5?m._a&&(m._a.muted=!1):ge._setVolume(m.id,e?m._iO.volume:m.options.volume),m},this.toggleMute=function(){return m.muted?m.unmute():m.mute()},this.onPosition=function(e,t,n){return y.push({position:parseInt(e,10),method:t,scope:n!==a?n:m,fired:!1}),m},this.onposition=this.onPosition,this.clearOnPosition=function(e,t){var n;if(e=parseInt(e,10),!isNaN(e))for(n=0;n<y.length;n++)e===y[n].position&&(t&&t!==y[n].method||(y[n].fired&&v--,y.splice(n,1)))},this._processOnPosition=function(){var e,t,n=y.length;if(!n||!m.playState||v>=n)return!1;for(e=n-1;e>=0;e--)!(t=y[e]).fired&&m.position>=t.position&&(t.fired=!0,v++,t.method.apply(t.scope,[t.position]),n=y.length);return!0},this._resetOnPosition=function(e){var t,n,o=y.length;if(!o)return!1;for(t=o-1;t>=0;t--)(n=y[t]).fired&&e<=n.position&&(n.fired=!1,v--);return!0},h=function(){var e,t,n=m._iO,o=n.from,i=n.to;return t=function(){Ae._wD(m.id+': "To" time of '+i+" reached."),m.clearOnPosition(i,t),m.stop()},e=function(){Ae._wD(m.id+': Playing "from" '+o),null===i||isNaN(i)||m.onPosition(i,t)},null===o||isNaN(o)||(n.position=o,n.multiShot=!1,e()),n},s=function(){var e,t=m._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&m.onPosition(parseInt(e,10),t[e])},u=function(){var e,t=m._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&m.clearOnPosition(parseInt(e,10))},r=function(){m.isHTML5&&z(m)},i=function(){m.isHTML5&&K(m)},(t=function(e){e||(y=[],v=0),g=!1,m._hasTimer=null,m._a=null,m._html5_canplay=!1,m.bytesLoaded=null,m.bytesTotal=null,m.duration=m._iO&&m._iO.duration?m._iO.duration:null,m.durationEstimate=null,m.buffered=[],m.eqData=[],m.eqData.left=[],m.eqData.right=[],m.failures=0,m.isBuffering=!1,m.instanceOptions={},m.instanceCount=0,m.loaded=!1,m.metadata={},m.readyState=0,m.muted=!1,m.paused=!1,m.peakData={left:0,right:0},m.waveformData={left:[],right:[]},m.playState=0,m.position=null,m.id3={}})(),this._onTimer=function(e){var t,n,o=!1,i={};return(m._hasTimer||e)&&m._a&&(e||(m.playState>0||1===m.readyState)&&!m.paused)&&((t=m._get_html5_duration())!==p.duration&&(p.duration=t,m.duration=t,o=!0),m.durationEstimate=m.duration,(n=m._a.currentTime*Ne||0)!==p.time&&(p.time=n,o=!0),(o||e)&&m._whileplaying(n,i,i,i,i)),o},this._get_html5_duration=function(){var e=m._iO,t=m._a&&m._a.duration?m._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&&Ae._wD("Note: Native HTML5 looping is infinite.",1),e.loop=t>1?"loop":""},this._setup_html5=function(e){var o,i=f(m._iO,e),a=Ue?me:m._a,r=decodeURI(i.url);if(Ue?r===decodeURI(re)&&(o=!0):r===decodeURI(b)&&(o=!0),a){if(a._s)if(Ue)a._s&&a._s.playState&&!o&&a._s.stop();else if(!Ue&&r===decodeURI(b))return m._apply_loop(a,i.loops),a;o||(b&&t(!1),a.src=i.url,m.url=i.url,b=i.url,re=i.url,a._called_load=!1)}else i.autoLoad||i.autoPlay?(m._a=new Audio(i.url),m._a.load()):m._a=We&&opera.version()<10?new Audio(null):new Audio,(a=m._a)._called_load=!1,Ue&&(me=a);return m.isHTML5=!0,m._a=a,a._s=m,n(),m._apply_loop(a,i.loops),i.autoLoad||i.autoPlay?m.load():(a.autobuffer=!1,a.preload="auto"),a},n=function(){if(m._a._added_events)return!1;var e,t,n;for(e in m._a._added_events=!0,ce)ce.hasOwnProperty(e)&&(t=e,n=ce[e],void 0,m._a&&m._a.addEventListener(t,n,!1));return!0},o=function(){var e,t,n;for(e in Ae._wD(m.id+": Removing event listeners"),m._a._added_events=!1,ce)ce.hasOwnProperty(e)&&(t=e,n=ce[e],void 0,m._a&&m._a.removeEventListener(t,n,!1))},this._onload=function(e){var t,n=!!e||!m.isHTML5&&8===l&&m.duration;return t=m.id+": ",Ae._wD(t+(n?"onload()":"Failed to load / invalid sound?"+(m.duration?" -":" Zero-length duration reported.")+" ("+m.url+")"),n?1:2),n||m.isHTML5||(!0===Ae.sandbox.noRemote&&Ae._wD(t+D("noNet"),1),!0===Ae.sandbox.noLocal&&Ae._wD(t+D("noLocal"),1)),m.loaded=n,m.readyState=n?3:2,m._onbufferchange(0),n||m.isHTML5||m._onerror(),m._iO.onload&&fe(m,(function(){m._iO.onload.apply(m,[n])})),!0},this._onerror=function(e,t){m._iO.onerror&&fe(m,(function(){m._iO.onerror.apply(m,[e,t])}))},this._onbufferchange=function(e){return!(0===m.playState||e&&m.isBuffering||!e&&!m.isBuffering||(m.isBuffering=1===e,m._iO.onbufferchange&&(Ae._wD(m.id+": Buffer state change: "+e),m._iO.onbufferchange.apply(m,[e])),0))},this._onsuspend=function(){return m._iO.onsuspend&&(Ae._wD(m.id+": Playback suspended"),m._iO.onsuspend.apply(m)),!0},this._onfailure=function(e,t,n){m.failures++,Ae._wD(m.id+": Failure ("+m.failures+"): "+e),m._iO.onfailure&&1===m.failures?m._iO.onfailure(e,t,n):Ae._wD(m.id+": Ignoring failure")},this._onwarning=function(e,t,n){m._iO.onwarning&&m._iO.onwarning(e,t,n)},this._onfinish=function(){var e=m._iO.onfinish;m._onbufferchange(0),m._resetOnPosition(0),m.instanceCount&&(m.instanceCount--,m.instanceCount||(u(),m.playState=0,m.paused=!1,m.instanceCount=0,m.instanceOptions={},m._iO={},i(),m.isHTML5&&(m.position=0)),m.instanceCount&&!m._iO.multiShotEvents||e&&(Ae._wD(m.id+": onfinish()"),fe(m,(function(){e.apply(m)}))))},this._whileloading=function(e,t,n,o){var i=m._iO;m.bytesLoaded=e,m.bytesTotal=t,m.duration=Math.floor(n),m.bufferLength=o,m.isHTML5||i.isMovieStar?m.durationEstimate=m.duration:i.duration?m.durationEstimate=m.duration>i.duration?m.duration:i.duration:m.durationEstimate=parseInt(m.bytesTotal/m.bytesLoaded*m.duration,10),m.isHTML5||(m.buffered=[{start:0,end:m.duration}]),(3!==m.readyState||m.isHTML5)&&i.whileloading&&i.whileloading.apply(m)},this._whileplaying=function(e,t,n,o,i){var r,s=m._iO;return!isNaN(e)&&null!==e&&(m.position=Math.max(0,e),m._processOnPosition(),!m.isHTML5&&l>8&&(s.usePeakData&&t!==a&&t&&(m.peakData={left:t.leftPeak,right:t.rightPeak}),s.useWaveformData&&n!==a&&n&&(m.waveformData={left:n.split(","),right:o.split(",")}),s.useEQData&&i!==a&&i&&i.leftEQ&&(r=i.leftEQ.split(","),m.eqData=r,m.eqData.left=r,i.rightEQ!==a&&i.rightEQ&&(m.eqData.right=i.rightEQ.split(",")))),1===m.playState&&(m.isHTML5||8!==l||m.position||!m.isBuffering||m._onbufferchange(0),s.whileplaying&&s.whileplaying.apply(m)),!0)},this._oncaptiondata=function(e){Ae._wD(m.id+": Caption data received."),m.captiondata=e,m._iO.oncaptiondata&&m._iO.oncaptiondata.apply(m,[e])},this._onmetadata=function(e,t){Ae._wD(m.id+": Metadata received.");var n,o,i={};for(n=0,o=e.length;n<o;n++)i[e[n]]=t[n];m.metadata=i,m._iO.onmetadata&&m._iO.onmetadata.call(m,m.metadata)},this._onid3=function(e,t){Ae._wD(m.id+": ID3 data received.");var n,o,i=[];for(n=0,o=e.length;n<o;n++)i[e[n]]=t[n];m.id3=f(m.id3,i),m._iO.onid3&&m._iO.onid3.apply(m)},this._onconnect=function(e){e=1===e,Ae._wD(m.id+": "+(e?"Connected.":"Failed to connect? - "+m.url),e?1:2),m.connected=e,e&&(m.failures=0,Y(m.id)&&(m.getAutoPlay()?m.play(a,m.getAutoPlay()):m._iO.autoLoad&&m.load()),m._iO.onconnect&&m._iO.onconnect.apply(m,[e]))},this._ondataerror=function(e){m.playState>0&&(Ae._wD(m.id+": Data error: "+e),m._iO.ondataerror&&m._iO.ondataerror.apply(m))},this._debug()},I=function(){return Ve.body||Ve.getElementsByTagName("div")[0]},o=function(e){return Ve.getElementById(e)},f=function(e,t){var n,o,i=e||{};for(o in n=t===a?Ae.defaultOptions:t)n.hasOwnProperty(o)&&i[o]===a&&("object"!=typeof n[o]||null===n[o]?i[o]=n[o]:i[o]=f(i[o],n[o]));return i},fe=function(e,t){e.isHTML5||8!==l?t():i.setTimeout(t,0)},A={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},p=function(e,t){var n,o=!0,i=t!==a,r=Ae.setupOptions,s=A;if(e===a){for(n in o=[],r)r.hasOwnProperty(n)&&o.push(n);for(n in s)s.hasOwnProperty(n)&&("object"==typeof Ae[n]?o.push(n+": {...}"):Ae[n]instanceof Function?o.push(n+": function() {...}"):o.push(n));return Ae._wD(D("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)i&&s[t]!==a?Ae[t][n]=e[n]:r[n]!==a?(Ae.setupOptions[n]=e[n],Ae[n]=e[n]):s[n]===a?(Q(D(Ae[n]===a?"setupUndef":"setupError",n),2),o=!1):Ae[n]instanceof Function?Ae[n].apply(Ae,e[n]instanceof Array?e[n]:[e[n]]):Ae[n]=e[n];else{if(s[n]!==a)return p(e[n],n);Q(D(Ae[n]===a?"setupUndef":"setupError",n),2),o=!1}return o},ae=function(){var e=i.attachEvent,t={add:e?"attachEvent":"addEventListener",remove:e?"detachEvent":"removeEventListener"};function n(t){var n=He.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 i=n.shift(),a=[t[o]];e?i[a](n[0],n[1]):i[a].apply(i,n)}return{add:function(){o(n(arguments),"add")},remove:function(){o(n(arguments),"remove")}}}(),ce={abort:ct((function(){Ae._wD(this._s.id+": abort")})),canplay:ct((function(){var e,t=this._s;if(!t._html5_canplay){if(t._html5_canplay=!0,Ae._wD(t.id+": canplay"),t._onbufferchange(0),e=t._iO.position===a||isNaN(t._iO.position)?null:t._iO.position/Ne,this.currentTime!==e){Ae._wD(t.id+": canplay: Setting position to "+e);try{this.currentTime=e}catch(n){Ae._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||(Ae._wD(this._s.id+": durationchange ("+e+")"+(t.duration?", previously "+t.duration:"")),t.durationEstimate=t.duration=e)})),ended:ct((function(){var e=this._s;Ae._wD(e.id+": ended"),e._onfinish()})),error:ct((function(){var e=ee[this.error.code]||null;Ae._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;Ae._wD(e.id+": loadeddata"),e._loaded||Ze||(e.duration=e._get_html5_duration())})),loadedmetadata:ct((function(){Ae._wD(this._s.id+": loadedmetadata")})),loadstart:ct((function(){Ae._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)})),play:ct((function(){this._s._onbufferchange(0)})),playing:ct((function(){Ae._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)})),progress:ct((function(e){var t,n,o,i=this._s,a=0,r="progress"===e.type,s=e.target.buffered,u=e.loaded||0,l=e.total||1;if(i.buffered=[],s&&s.length){for(t=0,n=s.length;t<n;t++)i.buffered.push({start:s.start(t)*Ne,end:s.end(t)*Ne});if(a=(s.end(0)-s.start(0))*Ne,u=Math.min(1,a/(e.target.duration*Ne)),r&&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);Ae._wD(this._s.id+": progress, timeRanges: "+o.join(", "))}r&&!isNaN(u)&&Ae._wD(this._s.id+": progress, "+Math.floor(100*u)+"% loaded")}isNaN(u)||(i._whileloading(u,l,i._get_html5_duration()),u&&l&&u===l&&ce.canplaythrough.call(this,e))})),ratechange:ct((function(){Ae._wD(this._s.id+": ratechange")})),suspend:ct((function(e){var t=this._s;Ae._wD(this._s.id+": suspend"),ce.progress.call(this,e),t._onsuspend()})),stalled:ct((function(){Ae._wD(this._s.id+": stalled")})),timeupdate:ct((function(){this._s._onTimer()})),waiting:ct((function(){var e=this._s;Ae._wD(this._s.id+": waiting"),e._onbufferchange(1)}))},J=function(e){return!(!e||!(e.type||e.url||e.serverURL))&&!(e.serverURL||e.type&<(e.type))&&(e.type?$({type:e.type}):$({url:e.url})||Ae.html5Only||e.url.match(/data:/i))},ne=function(e){var t;return e&&(t=Ze?ot:Ae.html5.canPlayType("audio/wav")?"data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==":ot,e.src=t,e._called_unload!==a&&(e._called_load=!1)),Ue&&(re=null),t},$=function(e){if(!Ae.useHTML5Audio||!Ae.hasHTML5)return!1;var t,n,o,i,r=e.url||null,s=e.type||null,u=Ae.audioFormats;if(s&&Ae.html5[s]!==a)return Ae.html5[s]&&!lt(s);if(!te){for(i in te=[],u)u.hasOwnProperty(i)&&(te.push(i),u[i].related&&(te=te.concat(u[i].related)));te=new RegExp("\\.("+te.join("|")+")(\\?.*)?$","i")}return(o=r?r.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&&Ae.html5[o]!==a?t=Ae.html5[o]&&!lt(o):(s="audio/"+o,t=Ae.html5.canPlayType({type:s}),Ae.html5[o]=t,t=t&&Ae.html5[s]&&!lt(s)),t},ie=function(){if(!Ae.useHTML5Audio||!Ae.hasHTML5)return Ae.html5.usingFlash=!0,Be=!0,!1;var e,t,n,o,i=Audio!==a?We&&opera.version()<10?new Audio(null):new Audio:null,r={};function s(e){var t,n,a=!1,r=!1;if(!i||"function"!=typeof i.canPlayType)return a;if(e instanceof Array){for(o=0,n=e.length;o<n;o++)(Ae.html5[e[o]]||i.canPlayType(e[o]).match(Ae.html5Test))&&(r=!0,Ae.html5[e[o]]=!0,Ae.flash[e[o]]=!!e[o].match(nt));a=r}else a=!(!(t=!(!i||"function"!=typeof i.canPlayType)&&i.canPlayType(e))||!t.match(Ae.html5Test));return a}for(e in n=Ae.audioFormats)if(n.hasOwnProperty(e)&&(t="audio/"+e,r[e]=s(n[e].type),r[t]=r[e],e.match(nt)?(Ae.flash[e]=!0,Ae.flash[t]=!0):(Ae.flash[e]=!1,Ae.flash[t]=!1),n[e]&&n[e].related))for(o=n[e].related.length-1;o>=0;o--)r["audio/"+n[e].related[o]]=r[e],Ae.html5[n[e].related[o]]=r[e],Ae.flash[n[e].related[o]]=r[e];return r.canPlayType=i?s:null,Ae.html5=f(Ae.html5,r),Ae.html5.usingFlash=X(),Be=Ae.html5.usingFlash,!0},_={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:ye+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:ve+"Verify that %s is a valid path.",tryDebug:"Try "+ye+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:ve+"Non-HTTP page ("+Ve.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:ve+"Special case: Waiting for SWF to load with window focus...",waitForever:ve+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:ve+"Waiting for 100% SWF load...",needFunction:ve+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:ve+"_debug(): Current sound objects",waitOnload:ve+"Waiting for window.onload()",docLoaded:ve+"Document already loaded",onload:ve+"initComplete(): calling soundManager.onload()",onloadOK:ye+".onload() complete",didInit:ve+"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:ve+"Failed to remove Flash node.",shutdown:ye+".disable(): Shutting down",queue:ve+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+H.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:ve+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:ye+".load(): current URL already assigned.",badFV:ye+'.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:ve+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:ve+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:ye+".setup(): allowed parameters: %s",setupError:ye+'.setup(): "%s" cannot be assigned with this method.',setupUndef:ye+'.setup(): Could not find option "%s"',setupLate:ye+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:ve+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:ye+".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."},D=function(){var e,t,n,o,i;if(o=(e=He.call(arguments)).shift(),(i=_&&_[o]?_[o]:"")&&e&&e.length)for(t=0,n=e.length;t<n;t++)i=i.replace("%s",e[t]);return i},j=function(e){return 8===l&&e.loops>1&&e.stream&&(d("as2loop"),e.stream=!1),e},N=function(e,t){return e&&!e.usePolicyFile&&(e.onid3||e.usePeakData||e.useWaveformData||e.useEQData)&&(Ae._wD((t||"")+D("policy")),e.usePolicyFile=!0),e},Q=function(e){Je&&console.warn!==a?console.warn(e):Ae._wD(e)},r=function(){return!1},E=function(e){var t;for(t in e)e.hasOwnProperty(t)&&"function"==typeof e[t]&&(e[t]=r);t=null},T=function(e){e===a&&(e=!1),(Pe||e)&&Ae.disable(e)},C=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):"./")+Ae.movieURL,Ae.noSWFCache&&(t+="?ts="+(new Date).getTime()),t},V=function(){8!==(l=parseInt(Ae.flashVersion,10))&&9!==l&&(Ae._wD(D("badFV",l,8)),Ae.flashVersion=l=8);var e=Ae.debugMode||Ae.debugFlash?"_debug.swf":".swf";Ae.useHTML5Audio&&!Ae.html5Only&&Ae.audioFormats.mp4.required&&l<9&&(Ae._wD(D("needfl9")),Ae.flashVersion=l=9),Ae.version=Ae.versionNumber+(Ae.html5Only?" (HTML5-only mode)":9===l?" (AS3/Flash 9)":" (AS2/Flash 8)"),l>8?(Ae.defaultOptions=f(Ae.defaultOptions,Ae.flash9Options),Ae.features.buffering=!0,Ae.defaultOptions=f(Ae.defaultOptions,Ae.movieStarOptions),Ae.filePatterns.flash9=new RegExp("\\.(mp3|"+st.join("|")+")(\\?.*)?$","i"),Ae.features.movieStar=!0):Ae.features.movieStar=!1,Ae.filePattern=Ae.filePatterns[8!==l?"flash9":"flash8"],Ae.movieURL=(8===l?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",e),Ae.features.peakData=Ae.features.waveformData=Ae.features.eqData=l>8},q=function(e,t){ge&&ge._setPolling(e,t)},x=function(){if(Ae.debugURLParam.test(we)&&(Ae.setupOptions.debugMode=Ae.debugMode=!0),!o(Ae.debugID)){var e,t,n,i,a;if(Ae.debugMode&&!o(Ae.debugID)&&(!Je||!Ae.useConsole||!Ae.consoleOnly)){for(a in(e=Ve.createElement("div")).id=Ae.debugID+"-toggle",i={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(Ve.createTextNode("-")),e.onclick=U,e.title="Toggle SM2 debug console",be.match(/msie 6/i)&&(e.style.position="absolute",e.style.cursor="hand"),i)i.hasOwnProperty(a)&&(e.style[a]=i[a]);if((t=Ve.createElement("div")).id=Ae.debugID,t.style.display=Ae.debugMode?"block":"none",Ae.debugMode&&!o(e.id)){try{(n=I()).appendChild(e)}catch(e){throw new Error(D("domError")+" \n"+e.toString())}n.appendChild(t)}}n=null}},Y=this.getSoundById,d=function(e,t){return e?Ae._wD(D(e),t):""},U=function(){var e=o(Ae.debugID),t=o(Ae.debugID+"-toggle");e&&(_e?(t.innerHTML="+",e.style.display="none"):(t.innerHTML="-",e.style.display="block"),_e=!_e)},c=function(e,t,n){if(i.sm2Debugger!==a)try{sm2Debugger.handleEvent(e,t,n)}catch(e){return!1}return!0},B=function(){var e=[];return Ae.debugMode&&e.push(H.sm2Debug),Ae.debugFlash&&e.push(H.flashDebug),Ae.useHighPerformance&&e.push(H.highPerf),e.join(" ")},F=function(){var e=D("fbHandler"),t=Ae.getMoviePercent(),n=H,o={type:"FLASHBLOCK"};Ae.html5Only||(Ae.ok()?(Ae.didFlashBlock&&Ae._wD(e+": Unblocked"),Ae.oMC&&(Ae.oMC.className=[B(),n.swfDefault,n.swfLoaded+(Ae.didFlashBlock?" "+n.swfUnblocked:"")].join(" "))):(Be&&(Ae.oMC.className=B()+" "+n.swfDefault+" "+(null===t?n.swfTimedout:n.swfError),Ae._wD(e+": "+D("fbTimeout")+(t?" ("+D("fbLoaded")+")":""))),Ae.didFlashBlock=!0,g({type:"ontimeout",ignoreInit:!0,error:o}),L(o)))},m=function(e,t,n){ke[e]===a&&(ke[e]=[]),ke[e].push({method:t,scope:n||null,fired:!1})},g=function(e){if(e||(e={type:Ae.ok()?"onready":"ontimeout"}),!Oe&&e&&!e.ignoreInit)return!1;if("ontimeout"===e.type&&(Ae.ok()||Pe&&!e.ignoreInit))return!1;var t,n,o={success:e&&e.ignoreInit?Ae.ok():!Pe},i=e&&e.type&&ke[e.type]||[],a=[],r=[o],s=Be&&!Ae.ok();for(e.error&&(r[0].error=e.error),t=0,n=i.length;t<n;t++)!0!==i[t].fired&&a.push(i[t]);if(a.length)for(t=0,n=a.length;t<n;t++)a[t].scope?a[t].method.apply(a[t].scope,r):a[t].method.apply(this,r),s||(a[t].fired=!0);return!0},y=function(){i.setTimeout((function(){Ae.useFlashBlock&&F(),g(),"function"==typeof Ae.onload&&(d("onload",1),Ae.onload.apply(i),d("onloadOK",1)),Ae.waitForWindowLoad&&ae.add(i,"load",y)}),1)},ue=function(){if(se!==a)return se;var e,t,n,o,r=!1,s=navigator,u=i.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&&(r=!0);else if(u!==a&&!be.match(/MSAppHost/i)){try{e=new u("ShockwaveFlash.ShockwaveFlash")}catch(t){e=null}r=!!e,e=null}return se=r,r},X=function(){var e,t,n=Ae.audioFormats;if(Qe&&be.match(/os (1|2|3_0|3_1)\s/i)?(Ae.hasHTML5=!1,Ae.html5Only=!0,Ae.oMC&&(Ae.oMC.style.display="none")):Ae.useHTML5Audio&&(Ae.html5&&Ae.html5.canPlayType||(Ae._wD("SoundManager: No HTML5 Audio() support detected."),Ae.hasHTML5=!1),Xe&&Ae._wD(ve+"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)),Ae.useHTML5Audio&&Ae.hasHTML5)for(t in G=!0,n)n.hasOwnProperty(t)&&n[t].required&&(Ae.html5.canPlayType(n[t].type)?Ae.preferFlash&&(Ae.flash[t]||Ae.flash[n[t].type])&&(e=!0):(G=!1,e=!0));return Ae.ignoreFlash&&(e=!1,G=!0),Ae.html5Only=Ae.hasHTML5&&Ae.useHTML5Audio&&!e,!Ae.html5Only},W=function(e){var t,n,o,i=0;if(e instanceof Array){for(t=0,n=e.length;t<n;t++)if(e[t]instanceof Object){if(Ae.canPlayMIME(e[t].type)){i=t;break}}else if(Ae.canPlayURL(e[t])){i=t;break}e[i].url&&(e[i]=e[i].url),o=e[i]}else o=e;return o},z=function(e){e._hasTimer||(e._hasTimer=!0,!Ge&&Ae.html5PollingInterval&&(null===De&&0===Ce&&(De=setInterval(Z,Ae.html5PollingInterval)),Ce++))},K=function(e){e._hasTimer&&(e._hasTimer=!1,!Ge&&Ae.html5PollingInterval&&Ce--)},Z=function(){var e;if(null!==De&&!Ce)return clearInterval(De),void(De=null);for(e=Ae.soundIDs.length-1;e>=0;e--)Ae.sounds[Ae.soundIDs[e]].isHTML5&&Ae.sounds[Ae.soundIDs[e]]._hasTimer&&Ae.sounds[Ae.soundIDs[e]]._onTimer()},L=function(e){e=e!==a?e:{},"function"==typeof Ae.onerror&&Ae.onerror.apply(i,[{type:e.type!==a?e.type:null}]),e.fatal!==a&&e.fatal&&Ae.disable()},le=function(){if(Xe&&ue()){var e,t,n=Ae.audioFormats;for(t in n)if(n.hasOwnProperty(t)&&("mp3"===t||"mp4"===t)&&(Ae._wD(ye+": Using flash fallback for "+t+" format"),Ae.html5[t]=!1,n[t]&&n[t].related))for(e=n[t].related.length-1;e>=0;e--)Ae.html5[n[t].related[e]]=!1}},this._setSandboxType=function(e){var t=Ae.sandbox;t.type=e,t.description=t.types[t.types[e]!==a?e:"unknown"],"localWithFile"===t.type?(t.noRemote=!0,t.noLocal=!1,d("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(!Ae.swfLoaded){var t;if(c("swf",!0),c("flashtojs",!0),Ae.swfLoaded=!0,et=!1,Xe&&le(),!e||e.replace(/\+dev/i,"")!==Ae.versionNumber.replace(/\+dev/i,""))return t=ye+': Fatal: JavaScript file build "'+Ae.versionNumber+'" does not match Flash SWF build "'+e+'" at '+Ae.url+". Ensure both are up-to-date.",void setTimeout((function(){throw new Error(t)}),0);setTimeout(u,ze?100:1)}},R=function(e,t){if(Me&&Se)return!1;function n(){var e,t=[],n=[];e="SoundManager "+Ae.version+(!Ae.html5Only&&Ae.useHTML5Audio?Ae.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),Ae.html5Only?Ae.html5PollingInterval&&t.push("html5PollingInterval ("+Ae.html5PollingInterval+"ms)"):(Ae.preferFlash&&t.push("preferFlash"),Ae.useHighPerformance&&t.push("useHighPerformance"),Ae.flashPollingInterval&&t.push("flashPollingInterval ("+Ae.flashPollingInterval+"ms)"),Ae.html5PollingInterval&&t.push("html5PollingInterval ("+Ae.html5PollingInterval+"ms)"),Ae.wmode&&t.push("wmode ("+Ae.wmode+")"),Ae.debugFlash&&t.push("debugFlash"),Ae.useFlashBlock&&t.push("flashBlock")),t.length&&(n=n.concat([t.join(" + ")])),Ae._wD(e+(n.length?" + "+n.join(", "):""),1),de()}if(Ae.html5Only)return V(),n(),Ae.oMC=o(Ae.movieID),u(),Me=!0,Se=!0,!1;var i,r,s,l,c,d,h,f,p,A=t||Ae.url,m=Ae.altURL||A,g=I(),y=B(),v=Ve.getElementsByTagName("html")[0];function b(e,t){return'<param name="'+e+'" value="'+t+'" />'}if(i=v&&v.dir&&v.dir.match(/rtl/i),e=e===a?Ae.id:e,V(),Ae.url=C(it?A:m),t=Ae.url,Ae.wmode=!Ae.wmode&&Ae.useHighPerformance?"transparent":Ae.wmode,null!==Ae.wmode&&(be.match(/msie 8/i)||!ze&&!Ae.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(Fe.push(_.spcWmode),Ae.wmode=null),r={name:e,id:e,src:t,quality:"high",allowScriptAccess:Ae.allowScriptAccess,bgcolor:Ae.bgColor,pluginspage:at+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:Ae.wmode,hasPriority:"true"},Ae.debugFlash&&(r.FlashVars="debug=1"),Ae.wmode||delete r.wmode,ze)s=Ve.createElement("div"),c=['<object id="'+e+'" data="'+t+'" type="'+r.type+'" title="'+r.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",Ae.allowScriptAccess),b("quality",r.quality),Ae.wmode?b("wmode",Ae.wmode):"",b("bgcolor",Ae.bgColor),b("hasPriority","true"),Ae.debugFlash?b("FlashVars",r.FlashVars):"","</object>"].join("");else for(l in s=Ve.createElement("embed"),r)r.hasOwnProperty(l)&&s.setAttribute(l,r[l]);if(x(),y=B(),g=I())if(Ae.oMC=o(Ae.movieID)||Ve.createElement("div"),Ae.oMC.id)p=Ae.oMC.className,Ae.oMC.className=(p?p+" ":H.swfDefault)+(y?" "+y:""),Ae.oMC.appendChild(s),ze&&((d=Ae.oMC.appendChild(Ve.createElement("div"))).className=H.swfBox,d.innerHTML=c),Se=!0;else{if(Ae.oMC.id=Ae.movieID,Ae.oMC.className=H.swfDefault+" "+y,h=null,d=null,Ae.useFlashBlock||(Ae.useHighPerformance?h={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(h={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},i&&(h.left=Math.abs(parseInt(h.left,10))+"px"))),Ke&&(Ae.oMC.style.zIndex=1e4),!Ae.debugFlash)for(f in h)h.hasOwnProperty(f)&&(Ae.oMC.style[f]=h[f]);try{ze||Ae.oMC.appendChild(s),g.appendChild(Ae.oMC),ze&&((d=Ae.oMC.appendChild(Ve.createElement("div"))).className=H.swfBox,d.innerHTML=c),Se=!0}catch(e){throw new Error(D("domError")+" \n"+e.toString())}}return Me=!0,n(),!0},M=function(){return Ae.html5Only?(R(),!1):!ge&&(Ae.url?((ge=Ae.getMovie(Ae.id))||(qe?(ze?Ae.oMC.innerHTML=xe:Ae.oMC.appendChild(qe),qe=null,Me=!0):R(Ae.id,Ae.url),ge=Ae.getMovie(Ae.id)),"function"==typeof Ae.oninitmovie&&setTimeout(Ae.oninitmovie,1),he(),!0):(d("noURL"),!1))},v=function(){setTimeout(b,1e3)},w=function(){i.setTimeout((function(){Q(ve+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),Ae.setup({preferFlash:!1}).reboot(),Ae.didFlashBlock=!0,Ae.beginDelayedInit()}),1)},b=function(){var e,t=!1;Ae.url&&(Ee||(Ee=!0,ae.remove(i,"load",v),se&&et&&!$e?d("waitFocus"):(Oe||(e=Ae.getMoviePercent())>0&&e<100&&(t=!0),setTimeout((function(){if(e=Ae.getMoviePercent(),t)return Ee=!1,Ae._wD(D("waitSWF")),void i.setTimeout(v,1);Oe||(Ae._wD(ye+": No Flash response within expected time. Likely causes: "+(0===e?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(Ae.debugFlash?" "+D("checkSWF"):""),2),!it&&e&&(d("localFail",2),Ae.debugFlash||d("tryDebug",2)),0===e&&Ae._wD(D("swf404",Ae.url),1),c("flashtojs",!1,": Timed out"+(it?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),!Oe&&tt&&(null===e?Ae.useFlashBlock||0===Ae.flashLoadTimeout?(Ae.useFlashBlock&&F(),d("waitForever")):!Ae.useFlashBlock&&G?w():(d("waitForever"),g({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===Ae.flashLoadTimeout?d("waitForever"):!Ae.useFlashBlock&&G?w():T(!0))}),Ae.flashLoadTimeout))))},k=function(){function e(){ae.remove(i,"focus",k)}return $e||!et?(e(),!0):(tt=!0,$e=!0,d("gotFocus"),Ee=!1,v(),e(),!0)},he=function(){Fe.length&&(Ae._wD("SoundManager 2: "+Fe.join(" "),1),Fe=[])},de=function(){he();var e,t=[];if(Ae.useHTML5Audio&&Ae.hasHTML5){for(e in Ae.audioFormats)Ae.audioFormats.hasOwnProperty(e)&&t.push(e+" = "+Ae.html5[e]+(!Ae.html5[e]&&Be&&Ae.flash[e]?" (using flash)":Ae.preferFlash&&Ae.flash[e]&&Be?" (preferring flash)":Ae.html5[e]?"":" ("+(Ae.audioFormats[e].required?"required, ":"")+"and no flash support)"));Ae._wD("SoundManager 2 HTML5 support: "+t.join(", "),1)}},h=function(e){if(Oe)return!1;if(Ae.html5Only)return d("sm2Loaded",1),Oe=!0,y(),c("onload",!0),!0;var t,n=!0;return Ae.useFlashBlock&&Ae.flashLoadTimeout&&!Ae.getMoviePercent()||(Oe=!0),t={type:!se&&Be?"NO_FLASH":"INIT_TIMEOUT"},Ae._wD("SoundManager 2 "+(Pe?"failed to load":"loaded")+" ("+(Pe?"Flash security/load error":"OK")+") "+String.fromCharCode(Pe?10006:10003),Pe?2:1),Pe||e?(Ae.useFlashBlock&&Ae.oMC&&(Ae.oMC.className=B()+" "+(null===Ae.getMoviePercent()?H.swfTimedout:H.swfError)),g({type:"ontimeout",error:t,ignoreInit:!0}),c("onload",!1),L(t),n=!1):c("onload",!0),Pe||(Ae.waitForWindowLoad&&!Ie?(d("waitOnload"),ae.add(i,"load",y)):(Ae.waitForWindowLoad&&Ie&&d("docLoaded"),y())),n},s=function(){var e,t=Ae.setupOptions;for(e in t)t.hasOwnProperty(e)&&(Ae[e]===a?Ae[e]=t[e]:Ae[e]!==t[e]&&(Ae.setupOptions[e]=Ae[e]))},u=function(){if(Oe)return d("didInit"),!1;function e(){ae.remove(i,"load",Ae.beginDelayedInit)}if(Ae.html5Only)return Oe||(e(),Ae.enabled=!0,h()),!0;M();try{ge._externalInterfaceTest(!1),q(!0,Ae.flashPollingInterval||(Ae.useHighPerformance?10:50)),Ae.debugMode||ge._disableDebug(),Ae.enabled=!0,c("jstoflash",!0),Ae.html5Only||ae.add(i,"unload",r)}catch(e){return Ae._wD("js/flash exception: "+e.toString()),c("jstoflash",!1),L({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),T(!0),h(),!1}return h(),e(),!0},S=function(){return!P&&(P=!0,s(),x(),!se&&Ae.hasHTML5&&(Ae._wD("SoundManager 2: No Flash detected"+(Ae.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),Ae.setup({useHTML5Audio:!0,preferFlash:!1})),ie(),!se&&Be&&(Fe.push(_.needFlash),Ae.setup({flashLoadTimeout:1})),Ve.removeEventListener&&Ve.removeEventListener("DOMContentLoaded",S,!1),M(),!0)},oe=function(){return"complete"===Ve.readyState&&(S(),Ve.detachEvent("onreadystatechange",oe)),!0},O=function(){Ie=!0,S(),ae.remove(i,"load",O)},ue(),ae.add(i,"focus",k),ae.add(i,"load",v),ae.add(i,"load",O),Ve.addEventListener?Ve.addEventListener("DOMContentLoaded",S,!1):Ve.attachEvent?Ve.attachEvent("onreadystatechange",oe):(c("onload",!1),L({type:"NO_DOM2_EVENTS",fatal:!0}))}i.SM2_DEFER!==a&&SM2_DEFER||(r=new s),e&&"object"==typeof e.exports?(e.exports.SoundManager=s,e.exports.soundManager=r):void 0===(o=function(){return{constructor:s,getInstance:function(e){if(!i.soundManager&&e instanceof Function){var t=e(s);t instanceof s&&(i.soundManager=t)}return i.soundManager}}}.call(t,n,t,e))||(e.exports=o),i.SoundManager=s,i.soundManager=r}(window)}},function(e){"use strict";e(e.s=2862)}]);
|
2
|
+
(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[34],{2862:function(t,e,n){"use strict";n(4043),n(228),n(2826),n(2462),n(5728),n(4338),n(6203),n(886),n(4284),n(5137),n(8077),n(268),n(939),n(6585),n(7522),n(3964),n(9749),n(6544),n(4254),n(752),n(1694),n(6265),n(8373),n(6793),n(7629),n(7509),n(8052),n(3374),n(9730),n(7049),n(9373),n(9903),n(9288),n(50),n(2349),n(1919),n(7267),n(429);var r=n(5311);function o(t){return o="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},o(t)}function i(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 a(t,e);var n=Object.prototype.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)?a(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 a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(){s=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.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 o=e&&e.prototype instanceof A?e:A,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:L(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",m="executing",g="completed",v={};function A(){}function b(){}function w(){}var k={};h(k,u,(function(){return this}));var _=Object.getPrototypeOf,V=_&&_(_(T([])));V&&V!==n&&r.call(V,u)&&(k=V);var O=w.prototype=A.prototype=Object.create(k);function S(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(i,a,s,u){var l=d(t[i],t,a);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==o(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;i(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 L(e,n,r){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===g){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=M(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=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var l=d(e,n,r);if("normal"===l.type){if(o=r.done?g:y,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=g,r.method="throw",r.arg=l.arg)}}}function M(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,M(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 P(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(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 i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(o(e)+" is not iterable")}return b.prototype=w,i(O,"constructor",{value:w,configurable:!0}),i(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}},S(x.prototype),h(x.prototype,l,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new x(f(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(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=T,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(E),!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 new 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),E(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;E(n)}return o}}throw new 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),v}},e}function u(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 l(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,(void 0,i=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===o(i)?i:String(i)),r)}var i}var c=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}var e,n,o,a;return e=t,null,n=[{key:"fetch",value:(o=s().mark((function e(n,o,i){var a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.ajax({type:"GET",url:"https://".concat(n,"/BookReader/BookReaderGetTextWrapper.php"),dataType:"jsonp",cache:!0,data:{path:"".concat(o,"_djvu.xml"),page:i}});case 2:return a=e.sent,e.abrupt("return",t._fromTextWrapperResponse(i,a));case 4:case"end":return e.stop()}}),e)})),a=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){u(i,n,r,a,s,"next",t)}function s(t){u(i,n,r,a,s,"throw",t)}a(void 0)}))},function(t,e,n){return a.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=i(t,2),n=e[0],r=e[1],o=i(n,3),a=o[0],s=o[1],u=o[2]-a,l=r[1]-r[3],c=r[2]-r[0],h=r[2];return u>30*c&&(n[2]=h,n[3]=s-l),t}},{key:"_removeDanglingHyphens",value:function(t){return t.replace(/[-¬]\s+/g,"")}}],n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function h(t){return h="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},h(t)}function f(){f=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:L(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=c;var p="suspendedStart",y="suspendedYield",m="executing",g="completed",v={};function A(){}function b(){}function w(){}var k={};l(k,a,(function(){return this}));var _=Object.getPrototypeOf,V=_&&_(_(T([])));V&&V!==n&&r.call(V,a)&&(k=V);var O=w.prototype=A.prototype=Object.create(k);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,s){var u=d(t[o],t,i);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==h(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 L(e,n,r){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===g){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=M(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=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var l=d(e,n,r);if("normal"===l.type){if(o=r.done?g:y,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=g,r.method="throw",r.arg=l.arg)}}}function M(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,M(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 P(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,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(h(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}},S(x.prototype),l(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new x(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(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=T,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(E),!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 new 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),E(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;E(n)}return o}}throw new 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),v}},e}function d(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 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,(void 0,o=function(t,e){if("object"!==h(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===h(o)?o:String(o)),r)}var o}var y=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({},m,r),this._cursor={page:n,chunk:0},this._bufferedPages={},this._bufferingPages={},this._cursorLock=Promise.resolve()}var e,n,r,o;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=f().mark((function e(){var n;return f().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){d(i,n,o,a,s,"next",t)}function s(t){d(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 c.fetch(this.opts.server,this.opts.bookPath,t)}}],n&&p(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();y.AT_END="__PageChunkIterator.AT_END__";var m={server:null,bookPath:null,pageBufferSize:2},g=n(1030);function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(t)}var A={Name:0,Endonym:1,"ISO 639-1":2,"ISO 639-2/T":3,"ISO 639-2/B":4};function b(t,e){for(var n=0;n<g.Z.length;n++)for(var r=0;r<e.length;r++){var o=e[r];if(-1!=g.Z[n][A[o]].split(", ").map((function(t){return t.toLowerCase()})).indexOf(t))return g.Z[n][A["ISO 639-1"]]}return null}function w(){try{return!!window.localStorage}catch(t){return!1}}var k=n(5311);function _(t){return _="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},_(t)}function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function O(){O=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 g?e:g,a=Object.create(i.prototype),s=new I(r||[]);return o(a,"_invoke",{value:L(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",m={};function g(){}function v(){}function A(){}var b={};l(b,a,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(T([])));k&&k!==n&&r.call(k,a)&&(b=k);var V=A.prototype=g.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(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)&&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 L(e,n,r){var o=f;return function(i,a){if(o===p)throw new 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=M(s,r);if(u){if(u===m)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===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function M(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,M(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function P(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,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(_(e)+" is not iterable")}return v.prototype=A,o(V,"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(V),t},e.awrap=function(t){return{__await:t}},S(x.prototype),l(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new x(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(V),l(V,u,"Generator"),l(V,a,(function(){return this})),l(V,"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,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(E),!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 new 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,m):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),m},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),E(n),m}},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;E(n)}return o}}throw new 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),m}},e}function S(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){S(i,r,o,a,s,"next",t)}function s(t){S(i,r,o,a,s,"throw",t)}a(void 0)}))}}function L(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"!==_(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===_(e)?e:String(e)}var P=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")}var e,n,r,o,i;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 y(e,t,{server:this.opts.server,bookPath:this.opts.bookPath,pageBufferSize:5}),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(O().mark((function t(){var e=this;return O().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&&w()&&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(O().mark((function t(){var e,n,r,o=this;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._chunkIterator.next();case 2:if((e=t.sent)!=y.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(){return t.getBestBookVoice(this.getVoices(),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=w()&&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 V(t,e);var n=Object.prototype.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)?V(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&&L(e.prototype,n),r&&L(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),E=n(5685),I=(n(5529),n(4371),n(5311));function T(t){return T="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},T(t)}function q(){q=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 g?e:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:S(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",m={};function g(){}function v(){}function A(){}var b={};l(b,a,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(E([])));k&&k!==n&&r.call(k,a)&&(b=k);var _=A.prototype=g.prototype=Object.create(b);function V(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"==T(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 S(e,n,r){var o=f;return function(i,a){if(o===p)throw new 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=x(s,r);if(u){if(u===m)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===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(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 M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function E(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(T(e)+" is not iterable")}return v.prototype=A,o(_,"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(_),t},e.awrap=function(t){return{__await:t}},V(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()}))},V(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"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=E,P.prototype={constructor:P,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(M),!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 new 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,m):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),m},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),M(n),m}},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;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:E(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function R(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 D(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){R(i,r,o,a,s,"next",t)}function s(t){R(i,r,o,a,s,"throw",t)}a(void 0)}))}}function C(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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,(void 0,o=function(t,e){if("object"!==T(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===T(o)?o:String(o)),r)}var o}function j(t,e,n){return e&&F(t.prototype,e),n&&F(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function B(){return B="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=U(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}},B.apply(this,arguments)}function N(t,e){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},N(t,e)}function U(t){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},U(t)}var H=function(t){!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&&N(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=U(n);if(r){var o=U(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===T(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)}(this,t)});function i(t){var e,n;return C(this,i),(n=o.call(this,t)).audioFormat=null!==(e=I.browser)&&void 0!==e&&e.mozilla?"ogg":"mp3",n}return j(i,[{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,e){var n=this,r=null;navigator.userAgent.match(/mobile/i)&&(r=this.iOSCaptureUserIntentHack()),(r=r||Promise.resolve()).then((function(){return B(U(i.prototype),"start",n).call(n,t,e)}))}},{key:"createSound",value:function(t){return new Y(this.getSoundUrl(t.text))}},{key:"getSoundUrl",value:function(t){return"https://"+this.opts.server+"/BookReader/BookReaderGetTTS.php?string="+encodeURIComponent(t)+"&format=."+this.audioFormat}},{key:"iOSCaptureUserIntentHack",value:(e=D(q().mark((function t(){var e;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=soundManager.createSound({url:Q[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 e.apply(this,arguments)})}],[{key:"isSupported",value:function(){return"undefined"!=typeof soundManager&&soundManager.supported()}}]),i}(P),Y=function(){function t(e){C(this,t),this.soundUrl=e,this.sound=null,this.rate=1,this._finishResolver=null}var e;return j(t,[{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=D(q().mark((function t(){return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,E.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:(e=D(q().mark((function t(){var e=this;return q().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 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(t){this.rate=t,this.sound.setPlaybackRate(t)}},{key:"finish",value:function(){this.sound.stop(),this._finishResolver()}}]),t}(),Q={mp3:"data:audio/mp3;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAAAeTEFNRTMuOTlyBJwAAAAAAAAAADUgJAaUQQABrgAAAnHIf8sZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADwlwBKGAAACAAAD/AAAAEAAAAH///////////////+UBAMExBTUUzLjk5LjOqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xDEIAPAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==",ogg:"data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAVEgAAAAAAAADSDf4BHgF2b3JiaXMAAAAAAUSsAAAAAAAAAHcBAAAAAAC4AU9nZ1MAAAAAAAAAAAAAFRIAAAEAAAB4VKTpEDv//////////////////8kDdm9yYmlzKwAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMTIwMjAzIChPbW5pcHJlc2VudCkAAAAAAQV2b3JiaXMpQkNWAQAIAAAA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eeccxBCCCFSijHnoIMQQgghREox5hx0EEIIIYSMMeeggxBCCCGEkDHmHHQQQgghhBA65xyEEEIIoYRSSuccdBBCCCGUUELpIIQQQgihhFJKKR2EEEIooYRSSiklhBBCCaWUUkoppYQQQgihhBJKKaWUEEIIpZRSSimllBJCCCGUUkoppZRSQgihlFBKKaWUUkoIIYRSSimllFJKCSGEUEoppZRSSikhhBJKKaWUUkoppQAAgAMHAIAAI+gko8oibDThwgNQaMhKAIAMAABx2GrrKdbIIMWchJZLhJByEGIuEVKKOUexZUgZxRjVlDGlFFNSa+icYoxRT51jSjHDrJRWSiiRgtJyrLV2zAEAACAIADAQITOBQAEUGMgAgAOEBCkAoLDA0DFcBATkEjIKDArHhHPSaQMAEITIDJGIWAwSE6qBomI6AFhcYMgHgAyNjbSLC+gywAVd3HUghCAEIYjFARSQgIMTbnjiDU+4wQk6RaUOAgAAAAAAAQAeAACSDSAiIpo5jg6PD5AQkRGSEpMTlAAAAAAA4AGADwCAJAWIiIhmjqPD4wMkRGSEpMTkBCUAAAAAAAAAAAAICAgAAAAAAAQAAAAICE9nZ1MABCwAAAAAAAAAFRIAAAIAAAAPBTD1AgEBAAo="},G=n(7775);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 K(){K=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 g?e:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:S(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",m={};function g(){}function v(){}function A(){}var b={};l(b,a,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(E([])));k&&k!==n&&r.call(k,a)&&(b=k);var _=A.prototype=g.prototype=Object.create(b);function V(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 S(e,n,r){var o=f;return function(i,a){if(o===p)throw new 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=x(s,r);if(u){if(u===m)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===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(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 M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function E(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(_,"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(_),t},e.awrap=function(t){return{__await:t}},V(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()}))},V(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"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=E,P.prototype={constructor:P,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(M),!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 new 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,m):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),m},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),M(n),m}},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;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:E(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function Z(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 W(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Z(i,r,o,a,s,"next",t)}function s(t){Z(i,r,o,a,s,"throw",t)}a(void 0)}))}}function X(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J(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,(void 0,o=function(t,e){if("object"!==z(t)||null===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)}(r.key),"symbol"===z(o)?o:String(o)),r)}var o}function $(t,e,n){return e&&J(t.prototype,e),n&&J(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function tt(){return tt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=nt(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}},tt.apply(this,arguments)}function et(t,e){return et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},et(t,e)}function nt(t){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nt(t)}var rt,ot=function(t){!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&&et(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=nt(e);if(n){var o=nt(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return 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)}(this,t)});function o(t){var e;return X(this,o),e=r.call(this,t),speechSynthesis.addEventListener&&speechSynthesis.addEventListener("voiceschanged",(function(){return e.events.trigger("voiceschanged")})),e}return $(o,[{key:"start",value:function(t,e){var n=this;if("mediaSession"in navigator){var r=new Audio(at);r.loop=!0,this.events.on("pause",(function(){return r.pause()})),this.events.on("resume",(function(){return r.play()})),this.events.on("stop",(function(){return r.src=""})),r.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.setActionHandler("play",(function(){r.play(),n.resume()})),navigator.mediaSession.setActionHandler("pause",(function(){r.pause(),n.pause()})),navigator.mediaSession.setActionHandler("previoustrack",(function(){return n.jumpBackward()})),navigator.mediaSession.setActionHandler("nexttrack",(function(){return n.jumpForward()}))}))}return tt(nt(o.prototype),"start",this).call(this,t,e)}},{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 it(t.text)}}],[{key:"isSupported",value:function(){return void 0!==window.speechSynthesis&&!/samsungbrowser/i.test(navigator.userAgent)}}]),o}(P),it=function(){function t(e){X(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}var e,n,r,o,i;return $(t,[{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,-1!=location.toString().indexOf("_debugReadAloud=true")&&(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(){return console.log("error")})),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:(i=W(K().mark((function t(){var e,n;return K().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 i.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,G.i7)()&&!e&&this._chromePausingBugFix(),this._finishPromise}},{key:"stop",value:function(){var t=Promise.resolve();return this.stopped||(t=Promise.race([(0,E.promisifyEvent)(this.utterance,"end"),(0,E.promisifyEvent)(this.utterance,"error")])),this.stopped=!0,speechSynthesis.cancel(),t}},{key:"finish",value:(o=W(K().mark((function t(){return K().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 o.apply(this,arguments)})},{key:"pause",value:(r=W(K().mark((function t(){var e,n,r;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.paused){t.next=2;break}return t.abrupt("return");case 2:if(e=(0,E.promisifyEvent)(this.utterance,"pause"),speechSynthesis.pause(),n=(0,G.vU)()&&v(),!(0,G.i7)()&&!n){t.next=15;break}return r=(0,E.sleep)(100).then((function(){return"timeout"})),t.next=10,Promise.race([e,r]);case 10:if("timeout"==t.sent){t.next=13;break}return t.abrupt("return");case 13:this.utterance.dispatchEvent(new CustomEvent("pause",this._lastEvents.start)),n&&this.stop();case 15:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"resume",value:(n=W(K().mark((function t(){var e,n,r;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.started){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:if(e=(0,G.i7)()&&v()||(0,G.vU)()&&v(),n=(0,G.i7)()||e,r=(0,E.promisifyEvent)(this.utterance,"resume"),speechSynthesis.resume(),!n){t.next=20;break}return t.next=12,Promise.race([r,(0,E.sleep)(100).then((function(){return"timeout"}))]);case 12:if("timeout"==t.sent){t.next=15;break}return t.abrupt("return");case 15:if(this.utterance.dispatchEvent(new CustomEvent("resume",{})),!e){t.next=20;break}return t.next=19,this.reload();case 19:this.play();case 20:case"end":return t.stop()}}),t,this)}))),function(){return n.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:(e=W(K().mark((function t(){var e,n,r,o;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,E.sleep)(14e3).then((function(){return"timeout"})),n=(0,E.promisifyEvent)(this.utterance,"pause").then((function(){return"paused"})),r=(0,E.promisifyEvent)(this.utterance,"end").then((function(){return"ended"})),t.next=5,Promise.race([e,n,r]);case 5:o=t.sent,-1!=location.toString().indexOf("_debugReadAloud=true")&&console.log("CHROME-PAUSE-HACK: ".concat(o)),t.t0=o,t.next="ended"===t.t0?10:"paused"===t.t0?11:"timeout"===t.t0?15:21;break;case 10:return t.abrupt("break",21);case 11:return t.next=13,Promise.race([(0,E.promisifyEvent)(this.utterance,"resume"),(0,E.sleep)(14e3).then((function(){return"timeout"}))]);case 13:return"timeout"==o?this.reload():this._chromePausingBugFix(),t.abrupt("break",21);case 15:return speechSynthesis.pause(),t.next=18,(0,E.sleep)(25);case 18:return speechSynthesis.resume(),this._chromePausingBugFix(),t.abrupt("break",21);case 21:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),t}(),at="data:audio/mp3;base64,/+MYxAAMEAISSAhElhIpJYzz1vz9mUdlHvJwTP/n3FJesPxB9/8mp0oGaz9+7+T//8oCDhJqOMqLh4o4uhUAUUDaf//3r+///+MYxAoKy2ImKAgEqbfr/t///27/+n3s32/////+b5qMsq7vnXCKh2By3ZcIqyrUYbbRH0fp+ljtf+n2Uo72PHX/03f0df///+MYxBkKUAYmQAhEAL+2l44oKFjZMwJAOJnhguMqokFAqBKl/5f1/+f+3/v////9GT//r+//v+//////b1VvucaRChqnMqsY/+MYxCoLo2IiSAgEpRrgIRVq//p////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YxOwOG1oOIAgEqFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxO4L6AVtkAhEAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",st="Read this book aloud",ut=n(9860),lt=n(5311),ct=n(5311);function ht(t){return ht="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},ht(t)}function ft(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 dt(t,e);var n=Object.prototype.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)?dt(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 dt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function pt(){pt=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 g?e:g,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:S(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",m={};function g(){}function v(){}function A(){}var b={};l(b,a,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(E([])));k&&k!==n&&r.call(k,a)&&(b=k);var _=A.prototype=g.prototype=Object.create(b);function V(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"==ht(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 S(e,n,r){var o=f;return function(i,a){if(o===p)throw new 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=x(s,r);if(u){if(u===m)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===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function x(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,x(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;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,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(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 M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function E(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(ht(e)+" is not iterable")}return v.prototype=A,o(_,"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(_),t},e.awrap=function(t){return{__await:t}},V(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()}))},V(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"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=E,P.prototype={constructor:P,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(M),!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 new 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,m):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),m},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),M(n),m}},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;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:E(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function yt(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 mt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){yt(i,r,o,a,s,"next",t)}function s(t){yt(i,r,o,a,s,"throw",t)}a(void 0)}))}}lt.extend(BookReader.defaultOptions,{server:"ia600609.us.archive.org",bookPath:"",enableTtsPlugin:!0}),BookReader.prototype.setup=(rt=BookReader.prototype.setup,function(t){if(rt.call(this,t),this.options.enableTtsPlugin){this._ttsBoxesByIndex={};var e=ot.isSupported()?ot:H.isSupported()?H:null;if(/_forceTTSEngine=(festival|web)/.test(location.toString())){var n=location.toString().match(/_forceTTSEngine=(festival|web)/)[1];e={festival:H,web:ot}[n]}e&&(this.ttsEngine=new e({server:t.server,bookPath:t.bookPath,bookLanguage:(r=t.bookLanguage,r?b(r=r.toLowerCase(),["ISO 639-1"])||b(r,["ISO 639-2/B"])||b(r,["ISO 639-2/T","Endonym","Name"]):null),onLoadingStart:this.showProgressPopup.bind(this,"Loading audio..."),onLoadingComplete:this.removeProgressPopup.bind(this),onDone:this.ttsStop.bind(this),beforeChunkPlay:this.ttsBeforeChunkPlay.bind(this),afterChunkPlay:this.ttsSendChunkFinishedAnalyticsEvent.bind(this)}))}var r}),BookReader.prototype.init=function(t){return function(){var e=this;this.options.enableTtsPlugin&&this.bind(BookReader.eventNames.PostInit,(function(){e.$(".BRicon.read").click((function(){return e.ttsToggle(),!1})),e.ttsEngine&&(e.ttsEngine.init(),/[?&]_autoReadAloud=show/.test(location.toString())&&e.ttsStart(!1))})),t.call(this)}}(BookReader.prototype.init),BookReader.prototype._createPageContainer=function(t){return function(e){var n=t.call(this,e);if(this.options.enableTtsPlugin&&n.page&&e in this._ttsBoxesByIndex){var r=n.page.index;(0,ut.Tm)("ttsHiliteLayer",this._ttsBoxesByIndex[r],n.page,n.$container[0])}return n}}(BookReader.prototype._createPageContainer),BookReader.prototype.buildMobileDrawerElement=function(t){return function(){var e=t.call(this);return this.options.enableTtsPlugin&&this.ttsEngine&&e.find(".BRmobileMenu__moreInfoRow").after(ct('\n <li>\n <span>\n <span class="DrawerIconWrapper"><img class="DrawerIcon" src="'.concat(this.imagesBaseURL,'icon_speaker_open.svg" alt="info-speaker"/></span>\n Read Aloud\n </span>\n <div>\n <span class="larger">Press to toggle read aloud</span>\n <br/>\n <button class="BRicon read"></button>\n </div>\n </li>'))),e}}(BookReader.prototype.buildMobileDrawerElement),BookReader.prototype.initNavbar=function(t){return function(){var e=this,n=t.call(this);if(this.options.enableTtsPlugin&&this.ttsEngine){this.refs.$BRReadAloudToolbar=ct('\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 ')),n.find(".BRcontrols").prepend(this.refs.$BRReadAloudToolbar);var r=function(t){return t.map((function(t){return'<option value="'.concat(t.voiceURI,'">').concat(t.lang," - ").concat(t.name,"</option>")})).join("")},o=function(t,e){return"".concat(t.lang," - ").concat(t.name).localeCompare("".concat(e.lang," - ").concat(e.name))},i=function(t){t.empty();var n=e.ttsEngine.opts.bookLanguage,i=e.ttsEngine.getVoices().filter((function(t){return t.lang.startsWith(n)})).sort(o),a=e.ttsEngine.getVoices().filter((function(t){return!t.lang.startsWith(n)})).sort(o);e.ttsEngine.getVoices().length>1?(t.append(ct('<optgroup label="Book Language ('.concat(n,')"> ').concat(r(i)," </optgroup>"))),t.append(ct('<optgroup label="Other Languages"> '.concat(r(a)," </optgroup>"))),t.val(e.ttsEngine.voice.voiceURI),t.show()):t.hide()},a=this.refs.$BRReadAloudToolbar.find("[name=playback-voice]");i(a),a.on("change",(function(t){return e.ttsEngine.setVoice(a.val())})),this.ttsEngine.events.on("pause resume start",(function(){return e.ttsUpdateState()})),this.ttsEngine.events.on("voiceschanged",(function(){return i(a)})),this.refs.$BRReadAloudToolbar.find("[name=play]").on("click",this.ttsPlayPause.bind(this)),this.refs.$BRReadAloudToolbar.find("[name=advance]").on("click",this.ttsJumpForward.bind(this)),this.refs.$BRReadAloudToolbar.find("[name=review]").on("click",this.ttsJumpBackward.bind(this));var s=this.refs.$BRReadAloudToolbar.find('select[name="playback-speed"]');s.on("change",(function(t){return e.ttsEngine.setPlaybackRate(parseFloat(s.val()))})),ct('<li>\n <button class="BRicon read js-tooltip" title="'.concat(st,'">\n <div class="icon icon-read-aloud"></div>\n <span class="BRtooltip">').concat(st,"</span>\n </button>\n </li>")).insertBefore(n.find(".BRcontrols .BRicon.zoom_out").closest("li"))}return n}}(BookReader.prototype.initNavbar),BookReader.prototype.ttsToggle=function(){this.autoStop&&this.autoStop(),this.ttsEngine.playing?this.ttsStop():this.ttsStart()},BookReader.prototype.ttsStart=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.constModeThumb==this.mode&&this.switchMode(this.constMode1up),this.refs.$BRReadAloudToolbar.addClass("visible"),this.$(".BRicon.read").addClass("unread active"),this.ttsSendAnalyticsEvent("Start"),t&&this.ttsEngine.start(this.currentIndex(),this.book.getNumLeafs())},BookReader.prototype.ttsJumpForward=function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpForward()},BookReader.prototype.ttsJumpBackward=function(){this.ttsEngine.paused&&this.ttsEngine.resume(),this.ttsEngine.jumpBackward()},BookReader.prototype.ttsUpdateState=function(){var t=!(this.ttsEngine.paused||!this.ttsEngine.playing);this.$(".read-aloud [name=play]").toggleClass("playing",t)},BookReader.prototype.ttsPlayPause=function(){this.ttsEngine.playing?(this.ttsEngine.togglePlayPause(),this.ttsUpdateState()):this.ttsToggle()},BookReader.prototype.ttsStop=function(){this.refs.$BRReadAloudToolbar.removeClass("visible"),this.$(".BRicon.read").removeClass("unread active"),this.ttsSendAnalyticsEvent("Stop"),this.ttsEngine.stop(),this.ttsRemoveHilites(),this.removeProgressPopup()},BookReader.prototype.ttsBeforeChunkPlay=function(){var t=mt(pt().mark((function t(e){return pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.ttsMaybeFlipToIndex(e.leafIndex);case 2:this.ttsHighlightChunk(e),this.ttsScrollToChunk(e);case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),BookReader.prototype.ttsSendChunkFinishedAnalyticsEvent=function(t){var e;this.ttsSendAnalyticsEvent("ChunkFinished-Words",(e=t.text.match(/\S+/g))?e.length:0)},BookReader.prototype.ttsMaybeFlipToIndex=function(){var t=mt(pt().mark((function t(e){return pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.constMode2up==this.mode){t.next=4;break}this.jumpToIndex(e),t.next=6;break;case 4:return t.next=6,this._modes.mode2Up.mode2UpLit.jumpToIndex(e);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),BookReader.prototype.ttsHighlightChunk=function(t){var e,n,r,o=this,i=t.leafIndex;this.ttsRemoveHilites(),this._ttsBoxesByIndex=(e={},n=i,r=t.lineRects.map((function(t){var e=ft(t,4),n=e[0],r=e[1];return{l:n,r:e[2],b:r,t:e[3]}})),(n=function(t){var e=function(t,e){if("object"!==ht(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ht(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ht(e)?e:String(e)}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e);for(var a=function(){var t=ft(u[s],2),e=t[0],n=t[1],r=parseFloat(e),i=o.book.getPage(r);o.getActivePageContainerElementsForIndex(r).forEach((function(t){return(0,ut.Tm)("ttsHiliteLayer",n,i,t)}))},s=0,u=Object.entries(this._ttsBoxesByIndex);s<u.length;s++)a()},BookReader.prototype.ttsScrollToChunk=function(t){var e;this.constModeThumb!=this.mode&&(null===(e=ct(".pagediv".concat(t.leafIndex," .ttsHiliteLayer rect")).last())||void 0===e||null===(e=e[0])||void 0===e||e.scrollIntoView({block:this.constMode1up==this.mode||this.isFullscreenActive?"center":"nearest",inline:"center",behavior:"smooth"}))},BookReader.prototype.ttsRemoveHilites=function(){ct(this.getActivePageContainerElements()).find(".ttsHiliteLayer").remove(),this._ttsBoxesByIndex={}},BookReader.prototype.ttsSendAnalyticsEvent=function(t,e){if(this.archiveAnalyticsSendEvent){var n={},r=this.ttsEngine.opts.bookLanguage;r&&(n.mediaLanguage=r),this.archiveAnalyticsSendEvent("BRReadAloud",t,e,n)}}},1030:function(t,e){"use strict";e.Z=void 0,e.Z=[["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"]]},4371:function(t,e,n){var r,o;r=[n(5311)],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)},5529: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,m,g,v,A,b,w,k,_,V,O,S,x,L,M,P,E,I,T,q,R,D,C,F,j,B,N,U,H,Y,Q,G,z,K,Z,W,X,J,$,tt,et,nt,rt,ot,it,at,st,ut,lt,ct,ht,ft,dt,pt,yt=this,mt=null,gt=null,vt="soundManager",At=vt+": ",bt=navigator.userAgent,wt=o.location.href.toString(),kt=document,_t=[],Vt=!0,Ot=!1,St=!1,xt=!1,Lt=!1,Mt=!1,Pt=0,Et=["log","info","warn","error"],It=null,Tt=null,qt=!1,Rt=!1,Dt=0,Ct=null,Ft=[],jt=null,Bt=Array.prototype.slice,Nt=!1,Ut=0,Ht=1e3,Yt=bt.match(/(ipad|iphone|ipod)/i),Qt=bt.match(/android/i),Gt=bt.match(/msie|trident/i),zt=bt.match(/webkit/i),Kt=bt.match(/safari/i)&&!bt.match(/chrome/i),Zt=bt.match(/opera/i),Wt=bt.match(/(mobile|pre\/|xoom)/i)||Yt||Qt,Xt=!wt.match(/usehtml5audio/i)&&!wt.match(/sm2-ignorebadua/i)&&Kt&&!bt.match(/silk/i)&&bt.match(/OS\sX\s10_6_([3-7])/i),Jt=o.console!==i&&console.log!==i,$t=kt.hasFocus!==i?kt.hasFocus():null,te=Kt&&(kt.hasFocus===i||!kt.hasFocus()),ee=!te,ne=/(mp3|mp4|mpa|m4a|m4b)/i,re="about:blank",oe=kt.location?kt.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&&(Zt&&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&&xt&&jt&&yt.ok()&&(t.flashVersion!==i||t.url!==i||t.html5Test!==i)&&Y(C("setupLate")),p(t),Nt||(Wt?yt.setupOptions.ignoreMobileRestrictions&&!yt.setupOptions.forceUseGlobalHTML5Audio||(Ft.push(V.globalHTML5),Nt=!0):yt.setupOptions.forceUseGlobalHTML5Audio&&(Ft.push(V.globalHTML5),Nt=!0)),!pt&&Wt&&(yt.setupOptions.ignoreMobileRestrictions?Ft.push(V.ignoreMobile):(yt.setupOptions.useHTML5Audio&&!yt.setupOptions.preferFlash||yt._wD(V.mobileUA),yt.setupOptions.useHTML5Audio=!0,yt.setupOptions.preferFlash=!1,Yt?yt.ignoreFlash=!0:(Qt&&!bt.match(/android\s2\.3/i)||!Qt)&&(yt._wD(V.globalHTML5),Nt=!0))),t&&(e&&L&&t.url!==i&&yt.beginDelayedInit(),L||t.url===i||"complete"!==kt.readyState||setTimeout(S,1)),pt=!0,yt},this.ok=function(){return jt?xt&&!Lt:yt.useHTML5Audio&&yt.hasHTML5},this.supported=this.ok,this.getMovie=function(t){return r(t)||kt[t]||o[t]},this.createSound=function(t,e){var r,o,a,s=null;if(o=(r=vt+".createSound(): ")+C(xt?"notOK":"notReady"),!xt||!yt.ok())return Y(o),!1;if(e!==i&&(t={id:t,url:e}),(a=d(t)).url=Z(a.url),a.id===i&&(a.id=yt.setupOptions.idPrefix+Ut++),a.id.toString().charAt(0).match(/^[0-9]$/)&&yt._wD(r+C("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=U(a),yt.sounds[a.id]=new n(a),yt.soundIDs.push(a.id),yt.sounds[a.id]}if(J(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=H(a,r),s=u(),8===l?gt._createSound(a.id,a.loops||1,a.usePolicyFile):(gt._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(!xt||!yt.ok())return Y(vt+".play(): "+C(xt?"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 gt&&8!==l&&(t=parseInt(gt._getMemoryUse(),10)),t},this.disable=function(t){var e;if(t===i&&(t=!1),Lt)return!1;for(Lt=!0,h("shutdown",1),e=yt.soundIDs.length-1;e>=0;e--)q(yt.sounds[yt.soundIDs[e]]);return q(yt),f(t),it.remove(o,"load",v),!0},this.canPlayMIME=function(t){var e;return yt.hasHTML5&&(e=$({type:t})),!e&&jt&&(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&&jt&&(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 C("needFunction",n);return xt&&yt._wD(C("queue",n)),e||(e=o),m(n,t,e),g(),!0},this.ontimeout=function(t,e){var n="ontimeout";if("function"!=typeof t)throw C("needFunction",n);return xt&&yt._wD(C("queue",n)),e||(e=o),m(n,t,e),g({type:n}),!0},this._writeDebug=function(t,e){var n,o;return!(!yt.setupOptions.debugMode||!(Jt&&yt.useConsole&&(e&&"object"==typeof e?console.log(t,e):Et[e]!==i?console[Et[e]](t):console.log(t),yt.consoleOnly))&&(!(n=r("soundmanager-debug"))||(o=kt.createElement("div"),++Pt%2==0&&(o.className="sm2-alt"),e=e===i?0:parseInt(e,10),o.appendChild(kt.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(gt)try{Gt&&(Tt=gt.innerHTML),It=gt.parentNode.removeChild(gt)}catch(t){h("badRemove",2)}if(Tt=It=jt=gt=null,yt.enabled=L=xt=qt=Rt=Ot=St=Lt=Nt=yt.swfLoaded=!1,yt.soundIDs=[],yt.sounds={},Ut=0,pt=!1,t)_t=[];else for(n in _t)if(_t.hasOwnProperty(n))for(r=0,i=_t[n].length;r<i;r++)_t[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 gt&&"PercentLoaded"in gt?gt.PercentLoaded():null},this.beginDelayedInit=function(){Mt=!0,S(),setTimeout((function(){return!Rt&&(P(),O(),Rt=!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,m=this,g=!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(m.id+": Merged options:",m.options)},this.load=function(t){var e;if(t!==i?m._iO=d(t,m.options):(t=m.options,m._iO=t,b&&b!==m.url&&(h("manURL"),m._iO.url=m.url,m.url=null)),m._iO.url||(m._iO.url=m.url),m._iO.url=Z(m._iO.url),m.instanceOptions=m._iO,e=m._iO,yt._wD(m.id+": load ("+e.url+")"),!e.url&&!m.url)return yt._wD(m.id+": load(): url is unassigned. Exiting.",2),m;if(m.isHTML5||8!==l||m.url||e.autoPlay||yt._wD(m.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),e.url===m.url&&0!==m.readyState&&2!==m.readyState)return h("onURL",1),3===m.readyState&&e.onload&&dt(m,(function(){e.onload.apply(m,[!!m.duration])})),m;if(m.loaded=!1,m.readyState=1,m.playState=0,m.id3={},J(e))m._setup_html5(e)._called_load?yt._wD(m.id+": Ignoring request to load again"):(m._html5_canplay=!1,m.url!==e.url&&(yt._wD(h("manURL")+": "+e.url),m._a.src=e.url,m.setPosition(0)),m._a.autobuffer="auto",m._a.preload="auto",m._a._called_load=!0);else{if(yt.html5Only)return yt._wD(m.id+": No flash support. Exiting."),m;if(m._iO.url&&m._iO.url.match(/data:/i))return yt._wD(m.id+": data: URIs not supported via Flash. Exiting."),m;try{m.isHTML5=!1,m._iO=H(U(e)),m._iO.autoPlay&&(m._iO.position||m._iO.from)&&(yt._wD(m.id+": Disabling autoPlay because of non-zero offset case"),m._iO.autoPlay=!1),e=m._iO,8===l?gt._load(m.id,e.url,e.stream,e.autoPlay,e.usePolicyFile):gt._load(m.id,e.url,!!e.stream,!!e.autoPlay,e.loops||1,!!e.autoLoad,e.usePolicyFile)}catch(t){h("smError",2),c("onload",!1),E({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return m.url=e.url,m},this.unload=function(){return 0!==m.readyState&&(yt._wD(m.id+": unload()"),m.isHTML5?(o(),m._a&&(m._a.pause(),b=nt(m._a))):8===l?gt._unload(m.id,re):gt._unload(m.id),e()),m},this.destruct=function(t){yt._wD(m.id+": Destruct"),m.isHTML5?(o(),m._a&&(m._a.pause(),nt(m._a),Nt||r(),m._a._s=null,m._a=null)):(m._iO.onfailure=null,gt._destroySound(m.id)),t||yt.destroySound(m.id,!0)},this.play=function(t,e){var n,r,o,u,c,h,p=!0;if(n=m.id+": play(): ",e=e===i||e,t||(t={}),m.url&&(m._iO.url=m.url),m._iO=d(m._iO,m.options),m._iO=d(t,m._iO),m._iO.url=Z(m._iO.url),m.instanceOptions=m._iO,!m.isHTML5&&m._iO.serverURL&&!m.connected)return m.getAutoPlay()||(yt._wD(n+" Netstream not connected yet - setting autoPlay"),m.setAutoPlay(!0)),m;if(J(m._iO)&&(m._setup_html5(m._iO),a()),1===m.playState&&!m.paused){if(!m._iO.multiShot)return yt._wD(n+"Already playing (one-shot)",1),m.isHTML5&&m.setPosition(m._iO.position),m;yt._wD(n+"Already playing (multi-shot)",1)}if(t.url&&t.url!==m.url&&(m.readyState||m.isHTML5||8!==l||!y?m.load(m._iO):y=!1),m.loaded)yt._wD(n.substr(0,n.lastIndexOf(":")));else if(0===m.readyState){if(yt._wD(n+"Attempting to load"),m.isHTML5||yt.html5Only){if(!m.isHTML5)return yt._wD(n+"Unsupported type. Exiting."),m;m.load(m._iO)}else m._iO.autoPlay=!0,m.load(m._iO);m.instanceOptions=m._iO}else{if(2===m.readyState)return yt._wD(n+"Could not load - exiting",2),m;yt._wD(n+"Loading - attempting to play...")}return!m.isHTML5&&9===l&&m.position>0&&m.position===m.duration&&(yt._wD(n+"Sound at end, resetting to position: 0"),t.position=0),m.paused&&m.position>=0&&(!m._iO.serverURL||m.position>0)?(yt._wD(n+"Resuming from paused state",1),m.resume()):(m._iO=d(t,m._iO),(!m.isHTML5&&null!==m._iO.position&&m._iO.position>0||null!==m._iO.from&&m._iO.from>0||null!==m._iO.to)&&0===m.instanceCount&&0===m.playState&&!m._iO.serverURL&&(o=function(){m._iO=d(t,m._iO),m.play(m._iO)},m.isHTML5&&!m._html5_canplay?(yt._wD(n+"Beginning load for non-zero offset case"),m.load({_oncanplay:o})):m.isHTML5||m.loaded||m.readyState&&2===m.readyState||(yt._wD(n+"Preloading for non-zero offset case"),m.load({onload:o})),m._iO=f()),(!m.instanceCount||m._iO.multiShotEvents||m.isHTML5&&m._iO.multiShot&&!Nt||!m.isHTML5&&l>8&&!m.getAutoPlay())&&m.instanceCount++,m._iO.onposition&&0===m.playState&&s(m),m.playState=1,m.paused=!1,m.position=m._iO.position===i||isNaN(m._iO.position)?0:m._iO.position,m.isHTML5||(m._iO=H(U(m._iO))),m._iO.onplay&&e&&(m._iO.onplay.apply(m),g=!0),m.setVolume(m._iO.volume,!0),m.setPan(m._iO.pan,!0),1!==m._iO.playbackRate&&m.setPlaybackRate(m._iO.playbackRate),m.isHTML5?m.instanceCount<2?(a(),r=m._setup_html5(),m.setPosition(m._iO.position),r.play()):(yt._wD(m.id+": Cloning Audio() for instance #"+m.instanceCount+"..."),u=new Audio(m._iO.url),c=function(){it.remove(u,"ended",c),m._onfinish(m),nt(u),u=null},h=function(){it.remove(u,"canplay",h);try{u.currentTime=m._iO.position/Ht}catch(t){Y(m.id+": multiShot play() failed to apply position of "+m._iO.position/Ht)}u.play()},it.add(u,"ended",c),m._iO.volume!==i&&(u.volume=Math.max(0,Math.min(1,m._iO.volume/100))),m.muted&&(u.muted=!0),m._iO.position?it.add(u,"canplay",h):u.play()):(p=gt._start(m.id,m._iO.loops||1,9===l?m.position:m.position/Ht,m._iO.multiShot||!1),9!==l||p||(yt._wD(n+"No sound hardware, or 32-sound ceiling hit",2),m._iO.onplayerror&&m._iO.onplayerror.apply(m)))),m},this.start=this.play,this.stop=function(t){var e,n=m._iO;return 1===m.playState&&(yt._wD(m.id+": stop()"),m._onbufferchange(0),m._resetOnPosition(0),m.paused=!1,m.isHTML5||(m.playState=0),u(),n.to&&m.clearOnPosition(n.to),m.isHTML5?m._a&&(e=m.position,m.setPosition(0),m.position=e,m._a.pause(),m.playState=0,m._onTimer(),o()):(gt._stop(m.id,t),n.serverURL&&m.unload()),m.instanceCount=0,m._iO={},n.onstop&&n.onstop.apply(m)),m},this.setAutoPlay=function(t){yt._wD(m.id+": Autoplay turned "+(t?"on":"off")),m._iO.autoPlay=t,m.isHTML5||(gt._setAutoPlay(m.id,t),t&&(m.instanceCount||1!==m.readyState||(m.instanceCount++,yt._wD(m.id+": Incremented instance count to "+m.instanceCount))))},this.getAutoPlay=function(){return m._iO.autoPlay},this.setPlaybackRate=function(t){var e=Math.max(.5,Math.min(4,t));if(e!==t&&yt._wD(m.id+": setPlaybackRate("+t+"): limiting rate to "+e,2),m.isHTML5)try{m._iO.playbackRate=e,m._a.playbackRate=e}catch(t){yt._wD(m.id+": setPlaybackRate("+e+") failed: "+t.message,2)}return m},this.setPosition=function(t){t===i&&(t=0);var e,n,r=m.isHTML5?Math.max(t,0):Math.min(m.duration||m._iO.duration,Math.max(t,0));if(m.position=r,n=m.position/Ht,m._resetOnPosition(m.position),m._iO.position=r,m.isHTML5){if(m._a){if(m._html5_canplay){if(m._a.currentTime.toFixed(3)!==n.toFixed(3)){yt._wD(m.id+": setPosition("+n+")");try{m._a.currentTime=n,(0===m.playState||m.paused)&&m._a.pause()}catch(t){yt._wD(m.id+": setPosition("+n+") failed: "+t.message,2)}}}else if(n)return yt._wD(m.id+": setPosition("+n+"): Cannot seek yet, sound not ready",2),m;m.paused&&m._onTimer(!0)}}else e=9===l?m.position:n,m.readyState&&2!==m.readyState&>._setPosition(m.id,e,m.paused||!m.playState,m._iO.multiShot);return m},this.pause=function(t){return m.paused||0===m.playState&&1!==m.readyState||(yt._wD(m.id+": pause()"),m.paused=!0,m.isHTML5?(m._setup_html5().pause(),o()):(t||t===i)&>._pause(m.id,m._iO.multiShot),m._iO.onpause&&m._iO.onpause.apply(m)),m},this.resume=function(){var t=m._iO;return m.paused?(yt._wD(m.id+": resume()"),m.paused=!1,m.playState=1,m.isHTML5?(m._setup_html5().play(),a()):(t.isMovieStar&&!t.serverURL&&m.setPosition(m.position),gt._pause(m.id,t.multiShot)),!g&&t.onplay?(t.onplay.apply(m),g=!0):t.onresume&&t.onresume.apply(m),m):m},this.togglePause=function(){return yt._wD(m.id+": togglePause()"),0===m.playState?(m.play({position:9!==l||m.isHTML5?m.position/Ht:m.position}),m):(m.paused?m.resume():m.pause(),m)},this.setPan=function(t,e){return t===i&&(t=0),e===i&&(e=!1),m.isHTML5||gt._setPan(m.id,t),m._iO.pan=t,e||(m.pan=t,m.options.pan=t),m},this.setVolume=function(t,e){return t===i&&(t=100),e===i&&(e=!1),m.isHTML5?m._a&&(yt.muted&&!m.muted&&(m.muted=!0,m._a.muted=!0),m._a.volume=Math.max(0,Math.min(1,t/100))):gt._setVolume(m.id,yt.muted&&!m.muted||m.muted?0:t),m._iO.volume=t,e||(m.volume=t,m.options.volume=t),m},this.mute=function(){return m.muted=!0,m.isHTML5?m._a&&(m._a.muted=!0):gt._setVolume(m.id,0),m},this.unmute=function(){m.muted=!1;var t=m._iO.volume!==i;return m.isHTML5?m._a&&(m._a.muted=!1):gt._setVolume(m.id,t?m._iO.volume:m.options.volume),m},this.toggleMute=function(){return m.muted?m.unmute():m.mute()},this.onPosition=function(t,e,n){return v.push({position:parseInt(t,10),method:e,scope:n!==i?n:m,fired:!1}),m},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||!m.playState||A>=n)return!1;for(t=n-1;t>=0;t--)!(e=v[t]).fired&&m.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=m._iO,r=n.from,o=n.to;return e=function(){yt._wD(m.id+': "To" time of '+o+" reached."),m.clearOnPosition(o,e),m.stop()},t=function(){yt._wD(m.id+': Playing "from" '+r),null===o||isNaN(o)||m.onPosition(o,e)},null===r||isNaN(r)||(n.position=r,n.multiShot=!1,t()),n},s=function(){var t,e=m._iO.onposition;if(e)for(t in e)e.hasOwnProperty(t)&&m.onPosition(parseInt(t,10),e[t])},u=function(){var t,e=m._iO.onposition;if(e)for(t in e)e.hasOwnProperty(t)&&m.clearOnPosition(parseInt(t,10))},a=function(){m.isHTML5&&G(m)},o=function(){m.isHTML5&&z(m)},(e=function(t){t||(v=[],A=0),g=!1,m._hasTimer=null,m._a=null,m._html5_canplay=!1,m.bytesLoaded=null,m.bytesTotal=null,m.duration=m._iO&&m._iO.duration?m._iO.duration:null,m.durationEstimate=null,m.buffered=[],m.eqData=[],m.eqData.left=[],m.eqData.right=[],m.failures=0,m.isBuffering=!1,m.instanceOptions={},m.instanceCount=0,m.loaded=!1,m.metadata={},m.readyState=0,m.muted=!1,m.paused=!1,m.peakData={left:0,right:0},m.waveformData={left:[],right:[]},m.playState=0,m.position=null,m.id3={}})(),this._onTimer=function(t){var e,n,r=!1,o={};return(m._hasTimer||t)&&m._a&&(t||(m.playState>0||1===m.readyState)&&!m.paused)&&((e=m._get_html5_duration())!==p.duration&&(p.duration=e,m.duration=e,r=!0),m.durationEstimate=m.duration,(n=m._a.currentTime*Ht||0)!==p.time&&(p.time=n,r=!0),(r||t)&&m._whileplaying(n,o,o,o,o)),r},this._get_html5_duration=function(){var t=m._iO,e=m._a&&m._a.duration?m._a.duration*Ht: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(m._iO,t),i=Nt?mt:m._a,a=decodeURI(o.url);if(Nt?a===decodeURI(at)&&(r=!0):a===decodeURI(b)&&(r=!0),i){if(i._s)if(Nt)i._s&&i._s.playState&&!r&&i._s.stop();else if(!Nt&&a===decodeURI(b))return m._apply_loop(i,o.loops),i;r||(b&&e(!1),i.src=o.url,m.url=o.url,b=o.url,at=o.url,i._called_load=!1)}else o.autoLoad||o.autoPlay?(m._a=new Audio(o.url),m._a.load()):m._a=Zt&&opera.version()<10?new Audio(null):new Audio,(i=m._a)._called_load=!1,Nt&&(mt=i);return m.isHTML5=!0,m._a=i,i._s=m,n(),m._apply_loop(i,o.loops),o.autoLoad||o.autoPlay?m.load():(i.autobuffer=!1,i.preload="auto"),i},n=function(){if(m._a._added_events)return!1;var t,e,n;for(t in m._a._added_events=!0,ct)ct.hasOwnProperty(t)&&(e=t,n=ct[t],void 0,m._a&&m._a.addEventListener(e,n,!1));return!0},r=function(){var t,e,n;for(t in yt._wD(m.id+": Removing event listeners"),m._a._added_events=!1,ct)ct.hasOwnProperty(t)&&(e=t,n=ct[t],void 0,m._a&&m._a.removeEventListener(e,n,!1))},this._onload=function(t){var e,n=!!t||!m.isHTML5&&8===l&&m.duration;return e=m.id+": ",yt._wD(e+(n?"onload()":"Failed to load / invalid sound?"+(m.duration?" -":" Zero-length duration reported.")+" ("+m.url+")"),n?1:2),n||m.isHTML5||(!0===yt.sandbox.noRemote&&yt._wD(e+C("noNet"),1),!0===yt.sandbox.noLocal&&yt._wD(e+C("noLocal"),1)),m.loaded=n,m.readyState=n?3:2,m._onbufferchange(0),n||m.isHTML5||m._onerror(),m._iO.onload&&dt(m,(function(){m._iO.onload.apply(m,[n])})),!0},this._onerror=function(t,e){m._iO.onerror&&dt(m,(function(){m._iO.onerror.apply(m,[t,e])}))},this._onbufferchange=function(t){return!(0===m.playState||t&&m.isBuffering||!t&&!m.isBuffering||(m.isBuffering=1===t,m._iO.onbufferchange&&(yt._wD(m.id+": Buffer state change: "+t),m._iO.onbufferchange.apply(m,[t])),0))},this._onsuspend=function(){return m._iO.onsuspend&&(yt._wD(m.id+": Playback suspended"),m._iO.onsuspend.apply(m)),!0},this._onfailure=function(t,e,n){m.failures++,yt._wD(m.id+": Failure ("+m.failures+"): "+t),m._iO.onfailure&&1===m.failures?m._iO.onfailure(t,e,n):yt._wD(m.id+": Ignoring failure")},this._onwarning=function(t,e,n){m._iO.onwarning&&m._iO.onwarning(t,e,n)},this._onfinish=function(){var t=m._iO.onfinish;m._onbufferchange(0),m._resetOnPosition(0),m.instanceCount&&(m.instanceCount--,m.instanceCount||(u(),m.playState=0,m.paused=!1,m.instanceCount=0,m.instanceOptions={},m._iO={},o(),m.isHTML5&&(m.position=0)),m.instanceCount&&!m._iO.multiShotEvents||t&&(yt._wD(m.id+": onfinish()"),dt(m,(function(){t.apply(m)}))))},this._whileloading=function(t,e,n,r){var o=m._iO;m.bytesLoaded=t,m.bytesTotal=e,m.duration=Math.floor(n),m.bufferLength=r,m.isHTML5||o.isMovieStar?m.durationEstimate=m.duration:o.duration?m.durationEstimate=m.duration>o.duration?m.duration:o.duration:m.durationEstimate=parseInt(m.bytesTotal/m.bytesLoaded*m.duration,10),m.isHTML5||(m.buffered=[{start:0,end:m.duration}]),(3!==m.readyState||m.isHTML5)&&o.whileloading&&o.whileloading.apply(m)},this._whileplaying=function(t,e,n,r,o){var a,s=m._iO;return!isNaN(t)&&null!==t&&(m.position=Math.max(0,t),m._processOnPosition(),!m.isHTML5&&l>8&&(s.usePeakData&&e!==i&&e&&(m.peakData={left:e.leftPeak,right:e.rightPeak}),s.useWaveformData&&n!==i&&n&&(m.waveformData={left:n.split(","),right:r.split(",")}),s.useEQData&&o!==i&&o&&o.leftEQ&&(a=o.leftEQ.split(","),m.eqData=a,m.eqData.left=a,o.rightEQ!==i&&o.rightEQ&&(m.eqData.right=o.rightEQ.split(",")))),1===m.playState&&(m.isHTML5||8!==l||m.position||!m.isBuffering||m._onbufferchange(0),s.whileplaying&&s.whileplaying.apply(m)),!0)},this._oncaptiondata=function(t){yt._wD(m.id+": Caption data received."),m.captiondata=t,m._iO.oncaptiondata&&m._iO.oncaptiondata.apply(m,[t])},this._onmetadata=function(t,e){yt._wD(m.id+": Metadata received.");var n,r,o={};for(n=0,r=t.length;n<r;n++)o[t[n]]=e[n];m.metadata=o,m._iO.onmetadata&&m._iO.onmetadata.call(m,m.metadata)},this._onid3=function(t,e){yt._wD(m.id+": ID3 data received.");var n,r,o=[];for(n=0,r=t.length;n<r;n++)o[t[n]]=e[n];m.id3=d(m.id3,o),m._iO.onid3&&m._iO.onid3.apply(m)},this._onconnect=function(t){t=1===t,yt._wD(m.id+": "+(t?"Connected.":"Failed to connect? - "+m.url),t?1:2),m.connected=t,t&&(m.failures=0,Q(m.id)&&(m.getAutoPlay()?m.play(i,m.getAutoPlay()):m._iO.autoLoad&&m.load()),m._iO.onconnect&&m._iO.onconnect.apply(m,[t]))},this._ondataerror=function(t){m.playState>0&&(yt._wD(m.id+": Data error: "+t),m._iO.ondataerror&&m._iO.ondataerror.apply(m))},this._debug()},M=function(){return kt.body||kt.getElementsByTagName("div")[0]},r=function(t){return kt.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(C("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?(Y(C(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);Y(C(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/Ht,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||Kt||(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)*Ht,end:s.end(e)*Ht});if(i=(s.end(0)-s.start(0))*Ht,u=Math.min(1,i/(t.target.duration*Ht)),a&&s.length>1){for(r=[],n=s.length,e=0;e<n;e++)r.push(t.target.buffered.start(e)*Ht+"-"+t.target.buffered.end(e)*Ht);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)}))},J=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=Kt?re:yt.html5.canPlayType("audio/wav")?"data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==":re,t.src=e,t._called_unload!==i&&(t._called_load=!1)),Nt&&(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,jt=!0,!1;var t,e,n,r,o=Audio!==i?Zt&&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=X(),jt=yt.html5.usingFlash,!0},V={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 ("+kt.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."},C=function(){var t,e,n,r,o;if(r=(t=Bt.call(arguments)).shift(),(o=V&&V[r]?V[r]:"")&&t&&t.length)for(e=0,n=t.length;e<n;e++)o=o.replace("%s",t[e]);return o},U=function(t){return 8===l&&t.loops>1&&t.stream&&(h("as2loop"),t.stream=!1),t},H=function(t,e){return t&&!t.usePolicyFile&&(t.onid3||t.usePeakData||t.useWaveformData||t.useEQData)&&(yt._wD((e||"")+C("policy")),t.usePolicyFile=!0),t},Y=function(t){Jt&&console.warn!==i?console.warn(t):yt._wD(t)},a=function(){return!1},q=function(t){var e;for(e in t)t.hasOwnProperty(e)&&"function"==typeof t[e]&&(t[e]=a);e=null},R=function(t){t===i&&(t=!1),(Lt||t)&&yt.disable(t)},D=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},k=function(){8!==(l=parseInt(yt.flashVersion,10))&&9!==l&&(yt._wD(C("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(C("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){gt&>._setPolling(t,e)},T=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)&&(!Jt||!yt.useConsole||!yt.consoleOnly)){for(i in(t=kt.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(kt.createTextNode("-")),t.onclick=N,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=kt.createElement("div")).id=yt.debugID,e.style.display=yt.debugMode?"block":"none",yt.debugMode&&!r(t.id)){try{(n=M()).appendChild(t)}catch(t){throw new Error(C("domError")+" \n"+t.toString())}n.appendChild(e)}}n=null}},Q=this.getSoundById,h=function(t,e){return t?yt._wD(C(t),e):""},N=function(){var t=r(yt.debugID),e=r(yt.debugID+"-toggle");t&&(Vt?(e.innerHTML="+",t.style.display="none"):(e.innerHTML="-",t.style.display="block"),Vt=!Vt)},c=function(t,e,n){if(o.sm2Debugger!==i)try{sm2Debugger.handleEvent(t,e,n)}catch(t){return!1}return!0},j=function(){var t=[];return yt.debugMode&&t.push(B.sm2Debug),yt.debugFlash&&t.push(B.flashDebug),yt.useHighPerformance&&t.push(B.highPerf),t.join(" ")},F=function(){var t=C("fbHandler"),e=yt.getMoviePercent(),n=B,r={type:"FLASHBLOCK"};yt.html5Only||(yt.ok()?(yt.didFlashBlock&&yt._wD(t+": Unblocked"),yt.oMC&&(yt.oMC.className=[j(),n.swfDefault,n.swfLoaded+(yt.didFlashBlock?" "+n.swfUnblocked:"")].join(" "))):(jt&&(yt.oMC.className=j()+" "+n.swfDefault+" "+(null===e?n.swfTimedout:n.swfError),yt._wD(t+": "+C("fbTimeout")+(e?" ("+C("fbLoaded")+")":""))),yt.didFlashBlock=!0,g({type:"ontimeout",ignoreInit:!0,error:r}),E(r)))},m=function(t,e,n){_t[t]===i&&(_t[t]=[]),_t[t].push({method:e,scope:n||null,fired:!1})},g=function(t){if(t||(t={type:yt.ok()?"onready":"ontimeout"}),!xt&&t&&!t.ignoreInit)return!1;if("ontimeout"===t.type&&(yt.ok()||Lt&&!t.ignoreInit))return!1;var e,n,r={success:t&&t.ignoreInit?yt.ok():!Lt},o=t&&t.type&&_t[t.type]||[],i=[],a=[r],s=jt&&!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&&F(),g(),"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},X=function(){var t,e,n=yt.audioFormats;if(Yt&&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),Xt&&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 W=!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):(W=!1,t=!0));return yt.ignoreFlash&&(t=!1,W=!0),yt.html5Only=yt.hasHTML5&&yt.useHTML5Audio&&!t,!yt.html5Only},Z=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},G=function(t){t._hasTimer||(t._hasTimer=!0,!Wt&&yt.html5PollingInterval&&(null===Ct&&0===Dt&&(Ct=setInterval(K,yt.html5PollingInterval)),Dt++))},z=function(t){t._hasTimer&&(t._hasTimer=!1,!Wt&&yt.html5PollingInterval&&Dt--)},K=function(){var t;if(null!==Ct&&!Dt)return clearInterval(Ct),void(Ct=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()},E=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(Xt&&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,Xt&<(),!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,Gt?100:1)}},P=function(t,e){if(Ot&&St)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 k(),n(),yt.oMC=r(yt.movieID),u(),Ot=!0,St=!0,!1;var o,a,s,l,c,h,f,d,p,y=e||yt.url,m=yt.altURL||y,g=M(),v=j(),A=kt.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,k(),yt.url=D(oe?y:m),e=yt.url,yt.wmode=!yt.wmode&&yt.useHighPerformance?"transparent":yt.wmode,null!==yt.wmode&&(bt.match(/msie 8/i)||!Gt&&!yt.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(Ft.push(V.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,Gt)s=kt.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=kt.createElement("embed"),a)a.hasOwnProperty(l)&&s.setAttribute(l,a[l]);if(T(),v=j(),g=M())if(yt.oMC=r(yt.movieID)||kt.createElement("div"),yt.oMC.id)p=yt.oMC.className,yt.oMC.className=(p?p+" ":B.swfDefault)+(v?" "+v:""),yt.oMC.appendChild(s),Gt&&((h=yt.oMC.appendChild(kt.createElement("div"))).className=B.swfBox,h.innerHTML=c),St=!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"))),zt&&(yt.oMC.style.zIndex=1e4),!yt.debugFlash)for(d in f)f.hasOwnProperty(d)&&(yt.oMC.style[d]=f[d]);try{Gt||yt.oMC.appendChild(s),g.appendChild(yt.oMC),Gt&&((h=yt.oMC.appendChild(kt.createElement("div"))).className=B.swfBox,h.innerHTML=c),St=!0}catch(t){throw new Error(C("domError")+" \n"+t.toString())}}return Ot=!0,n(),!0},O=function(){return yt.html5Only?(P(),!1):!gt&&(yt.url?((gt=yt.getMovie(yt.id))||(It?(Gt?yt.oMC.innerHTML=Tt:yt.oMC.appendChild(It),It=null,Ot=!0):P(yt.id,yt.url),gt=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(){Y(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&&(qt||(qt=!0,it.remove(o,"load",A),st&&te&&!$t?h("waitFocus"):(xt||(t=yt.getMoviePercent())>0&&t<100&&(e=!0),setTimeout((function(){if(t=yt.getMoviePercent(),e)return qt=!1,yt._wD(C("waitSWF")),void o.setTimeout(A,1);xt||(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?" "+C("checkSWF"):""),2),!oe&&t&&(h("localFail",2),yt.debugFlash||h("tryDebug",2)),0===t&&yt._wD(C("swf404",yt.url),1),c("flashtojs",!1,": Timed out"+(oe?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),!xt&&ee&&(null===t?yt.useFlashBlock||0===yt.flashLoadTimeout?(yt.useFlashBlock&&F(),h("waitForever")):!yt.useFlashBlock&&W?w():(h("waitForever"),g({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===yt.flashLoadTimeout?h("waitForever"):!yt.useFlashBlock&&W?w():R(!0))}),yt.flashLoadTimeout))))},_=function(){function t(){it.remove(o,"focus",_)}return $t||!te?(t(),!0):(ee=!0,$t=!0,h("gotFocus"),qt=!1,A(),t(),!0)},ft=function(){Ft.length&&(yt._wD("SoundManager 2: "+Ft.join(" "),1),Ft=[])},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]&&jt&&yt.flash[t]?" (using flash)":yt.preferFlash&&yt.flash[t]&&jt?" (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(xt)return!1;if(yt.html5Only)return h("sm2Loaded",1),xt=!0,v(),c("onload",!0),!0;var e,n=!0;return yt.useFlashBlock&&yt.flashLoadTimeout&&!yt.getMoviePercent()||(xt=!0),e={type:!st&&jt?"NO_FLASH":"INIT_TIMEOUT"},yt._wD("SoundManager 2 "+(Lt?"failed to load":"loaded")+" ("+(Lt?"Flash security/load error":"OK")+") "+String.fromCharCode(Lt?10006:10003),Lt?2:1),Lt||t?(yt.useFlashBlock&&yt.oMC&&(yt.oMC.className=j()+" "+(null===yt.getMoviePercent()?B.swfTimedout:B.swfError)),g({type:"ontimeout",error:e,ignoreInit:!0}),c("onload",!1),E(e),n=!1):c("onload",!0),Lt||(yt.waitForWindowLoad&&!Mt?(h("waitOnload"),it.add(o,"load",v)):(yt.waitForWindowLoad&&Mt&&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(xt)return h("didInit"),!1;function t(){it.remove(o,"load",yt.beginDelayedInit)}if(yt.html5Only)return xt||(t(),yt.enabled=!0,f()),!0;O();try{gt._externalInterfaceTest(!1),I(!0,yt.flashPollingInterval||(yt.useHighPerformance?10:50)),yt.debugMode||gt._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),E({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),R(!0),f(),!1}return f(),t(),!0},S=function(){return!L&&(L=!0,s(),T(),!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&&jt&&(Ft.push(V.needFlash),yt.setup({flashLoadTimeout:1})),kt.removeEventListener&&kt.removeEventListener("DOMContentLoaded",S,!1),O(),!0)},rt=function(){return"complete"===kt.readyState&&(S(),kt.detachEvent("onreadystatechange",rt)),!0},x=function(){Mt=!0,S(),it.remove(o,"load",x)},ut(),it.add(o,"focus",_),it.add(o,"load",A),it.add(o,"load",x),kt.addEventListener?kt.addEventListener("DOMContentLoaded",S,!1):kt.attachEvent?kt.attachEvent("onreadystatechange",rt):(c("onload",!1),E({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)},6585:function(t,e,n){"use strict";var r=n(9989),o=n(9419).entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})}},function(t){t(t.s=2862)}]);
|
3
3
|
//# sourceMappingURL=plugin.tts.js.map
|