@internetarchive/bookreader 5.0.0-38 → 5.0.0-39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (222) hide show
  1. package/BookReader/BookReader.css +8 -0
  2. package/BookReader/BookReader.js +1 -1
  3. package/BookReader/BookReader.js.map +1 -1
  4. package/BookReader/ia-bookreader-bundle.js +99 -75
  5. package/BookReader/ia-bookreader-bundle.js.map +1 -1
  6. package/BookReader/icons/magnify-minus.svg +1 -1
  7. package/BookReader/icons/magnify-plus.svg +1 -1
  8. package/BookReader/plugins/plugin.autoplay.js +1 -1
  9. package/BookReader/plugins/plugin.autoplay.js.map +1 -1
  10. package/BookReader/plugins/plugin.chapters.js +1 -1
  11. package/BookReader/plugins/plugin.chapters.js.map +1 -1
  12. package/BookReader/plugins/plugin.mobile_nav.js +1 -1
  13. package/BookReader/plugins/plugin.mobile_nav.js.map +1 -1
  14. package/BookReader/plugins/plugin.resume.js +1 -1
  15. package/BookReader/plugins/plugin.resume.js.map +1 -1
  16. package/BookReader/plugins/plugin.search.js +1 -1
  17. package/BookReader/plugins/plugin.search.js.map +1 -1
  18. package/BookReader/plugins/plugin.text_selection.js +1 -1
  19. package/BookReader/plugins/plugin.text_selection.js.map +1 -1
  20. package/BookReader/plugins/plugin.tts.js +1 -1
  21. package/BookReader/plugins/plugin.tts.js.map +1 -1
  22. package/BookReader/plugins/plugin.url.js +1 -1
  23. package/BookReader/plugins/plugin.url.js.map +1 -1
  24. package/CHANGELOG.md +5 -0
  25. package/README.md +13 -0
  26. package/package.json +14 -14
  27. package/renovate.json +1 -1
  28. package/src/BookReader/Mode1UpLit.js +7 -1
  29. package/src/BookReader/Mode2Up.js +11 -0
  30. package/src/BookReader/ModeSmoothZoom.js +2 -0
  31. package/src/BookReader/PageContainer.js +10 -4
  32. package/src/BookReader/utils/ScrollClassAdder.js +31 -0
  33. package/src/assets/icons/magnify-minus.svg +3 -7
  34. package/src/assets/icons/magnify-plus.svg +3 -7
  35. package/src/css/_TextSelection.scss +13 -0
  36. package/tests/jest/BookReader/PageContainer.test.js +5 -4
  37. package/tests/jest/BookReader/utils/ScrollClassAdder.test.js +49 -0
  38. package/.husky/_/husky.sh +0 -30
  39. package/stat/BookNavigator/BookModel.js +0 -14
  40. package/stat/BookNavigator/BookNavigator.js +0 -524
  41. package/stat/BookNavigator/assets/bookmark-colors.js +0 -15
  42. package/stat/BookNavigator/assets/button-base.js +0 -61
  43. package/stat/BookNavigator/assets/ia-logo.js +0 -17
  44. package/stat/BookNavigator/assets/icon_checkmark.js +0 -6
  45. package/stat/BookNavigator/assets/icon_close.js +0 -3
  46. package/stat/BookNavigator/assets/icon_sort_asc.js +0 -5
  47. package/stat/BookNavigator/assets/icon_sort_desc.js +0 -5
  48. package/stat/BookNavigator/assets/icon_sort_neutral.js +0 -5
  49. package/stat/BookNavigator/assets/icon_volumes.js +0 -11
  50. package/stat/BookNavigator/bookmarks/bookmark-button.js +0 -64
  51. package/stat/BookNavigator/bookmarks/bookmark-edit.js +0 -215
  52. package/stat/BookNavigator/bookmarks/bookmarks-list.js +0 -285
  53. package/stat/BookNavigator/bookmarks/bookmarks-loginCTA.js +0 -28
  54. package/stat/BookNavigator/bookmarks/bookmarks-provider.js +0 -56
  55. package/stat/BookNavigator/bookmarks/ia-bookmarks.js +0 -523
  56. package/stat/BookNavigator/br-fullscreen-mgr.js +0 -82
  57. package/stat/BookNavigator/delete-modal-actions.js +0 -49
  58. package/stat/BookNavigator/downloads/downloads-provider.js +0 -72
  59. package/stat/BookNavigator/downloads/downloads.js +0 -139
  60. package/stat/BookNavigator/provider-config.js +0 -0
  61. package/stat/BookNavigator/search/a-search-result.js +0 -55
  62. package/stat/BookNavigator/search/search-provider.js +0 -180
  63. package/stat/BookNavigator/search/search-results.js +0 -360
  64. package/stat/BookNavigator/sharing.js +0 -31
  65. package/stat/BookNavigator/visual-adjustments/visual-adjustments-provider.js +0 -94
  66. package/stat/BookNavigator/visual-adjustments/visual-adjustments.js +0 -280
  67. package/stat/BookNavigator/volumes/volumes-provider.js +0 -83
  68. package/stat/BookNavigator/volumes/volumes.js +0 -178
  69. package/stat/BookReader/BookModel.js +0 -518
  70. package/stat/BookReader/DebugConsole.js +0 -54
  71. package/stat/BookReader/DragScrollable.js +0 -233
  72. package/stat/BookReader/ImageCache.js +0 -116
  73. package/stat/BookReader/Mode1Up.js +0 -102
  74. package/stat/BookReader/Mode1UpLit.js +0 -434
  75. package/stat/BookReader/Mode2Up.js +0 -1372
  76. package/stat/BookReader/ModeSmoothZoom.js +0 -177
  77. package/stat/BookReader/ModeThumb.js +0 -344
  78. package/stat/BookReader/Navbar/Navbar.js +0 -310
  79. package/stat/BookReader/PageContainer.js +0 -120
  80. package/stat/BookReader/ReduceSet.js +0 -26
  81. package/stat/BookReader/Toolbar/Toolbar.js +0 -384
  82. package/stat/BookReader/events.js +0 -20
  83. package/stat/BookReader/options.js +0 -324
  84. package/stat/BookReader/utils/HTMLDimensionsCacher.js +0 -44
  85. package/stat/BookReader/utils/classes.js +0 -36
  86. package/stat/BookReader/utils.js +0 -240
  87. package/stat/BookReader.js +0 -2550
  88. package/stat/BookReaderComponent/BookReaderComponent.js +0 -117
  89. package/stat/assets/icons/1up.svg +0 -12
  90. package/stat/assets/icons/2up.svg +0 -15
  91. package/stat/assets/icons/advance.svg +0 -26
  92. package/stat/assets/icons/chevron-right.svg +0 -1
  93. package/stat/assets/icons/close-circle-dark.svg +0 -1
  94. package/stat/assets/icons/close-circle.svg +0 -1
  95. package/stat/assets/icons/fullscreen.svg +0 -17
  96. package/stat/assets/icons/fullscreen_exit.svg +0 -17
  97. package/stat/assets/icons/hamburger.svg +0 -15
  98. package/stat/assets/icons/left-arrow.svg +0 -12
  99. package/stat/assets/icons/magnify-minus.svg +0 -16
  100. package/stat/assets/icons/magnify-plus.svg +0 -17
  101. package/stat/assets/icons/magnify.svg +0 -15
  102. package/stat/assets/icons/pause.svg +0 -23
  103. package/stat/assets/icons/play.svg +0 -22
  104. package/stat/assets/icons/playback-speed.svg +0 -34
  105. package/stat/assets/icons/read-aloud.svg +0 -22
  106. package/stat/assets/icons/review.svg +0 -22
  107. package/stat/assets/icons/thumbnails.svg +0 -17
  108. package/stat/assets/icons/voice.svg +0 -1
  109. package/stat/assets/icons/volume-full.svg +0 -22
  110. package/stat/assets/images/BRicons.png +0 -0
  111. package/stat/assets/images/BRicons.svg +0 -94
  112. package/stat/assets/images/BRicons_ia.png +0 -0
  113. package/stat/assets/images/back_pages.png +0 -0
  114. package/stat/assets/images/book_bottom_icon.png +0 -0
  115. package/stat/assets/images/book_down_icon.png +0 -0
  116. package/stat/assets/images/book_left_icon.png +0 -0
  117. package/stat/assets/images/book_leftmost_icon.png +0 -0
  118. package/stat/assets/images/book_right_icon.png +0 -0
  119. package/stat/assets/images/book_rightmost_icon.png +0 -0
  120. package/stat/assets/images/book_top_icon.png +0 -0
  121. package/stat/assets/images/book_up_icon.png +0 -0
  122. package/stat/assets/images/books_graphic.svg +0 -177
  123. package/stat/assets/images/booksplit.png +0 -0
  124. package/stat/assets/images/control_pause_icon.png +0 -0
  125. package/stat/assets/images/control_play_icon.png +0 -0
  126. package/stat/assets/images/embed_icon.png +0 -0
  127. package/stat/assets/images/icon-home-ia.png +0 -0
  128. package/stat/assets/images/icon_OL-logo-xs.png +0 -0
  129. package/stat/assets/images/icon_alert-xs.png +0 -0
  130. package/stat/assets/images/icon_book.svg +0 -12
  131. package/stat/assets/images/icon_bookmark.svg +0 -12
  132. package/stat/assets/images/icon_close-pop.png +0 -0
  133. package/stat/assets/images/icon_download.png +0 -0
  134. package/stat/assets/images/icon_gear.svg +0 -14
  135. package/stat/assets/images/icon_hamburger.svg +0 -20
  136. package/stat/assets/images/icon_home.png +0 -0
  137. package/stat/assets/images/icon_home.svg +0 -21
  138. package/stat/assets/images/icon_home_ia.png +0 -0
  139. package/stat/assets/images/icon_indicator.png +0 -0
  140. package/stat/assets/images/icon_info.svg +0 -11
  141. package/stat/assets/images/icon_one_page.svg +0 -8
  142. package/stat/assets/images/icon_pause.svg +0 -1
  143. package/stat/assets/images/icon_play.svg +0 -1
  144. package/stat/assets/images/icon_playback-rate.svg +0 -15
  145. package/stat/assets/images/icon_return.png +0 -0
  146. package/stat/assets/images/icon_search_button.svg +0 -8
  147. package/stat/assets/images/icon_share.svg +0 -9
  148. package/stat/assets/images/icon_skip-ahead.svg +0 -6
  149. package/stat/assets/images/icon_skip-back.svg +0 -13
  150. package/stat/assets/images/icon_speaker.svg +0 -18
  151. package/stat/assets/images/icon_speaker_open.svg +0 -10
  152. package/stat/assets/images/icon_thumbnails.svg +0 -12
  153. package/stat/assets/images/icon_toc.svg +0 -5
  154. package/stat/assets/images/icon_two_pages.svg +0 -9
  155. package/stat/assets/images/icon_zoomer.png +0 -0
  156. package/stat/assets/images/loading.gif +0 -0
  157. package/stat/assets/images/logo_icon.png +0 -0
  158. package/stat/assets/images/marker_chap-off.png +0 -0
  159. package/stat/assets/images/marker_chap-off.svg +0 -11
  160. package/stat/assets/images/marker_chap-off_ia.png +0 -0
  161. package/stat/assets/images/marker_chap-on.png +0 -0
  162. package/stat/assets/images/marker_chap-on.svg +0 -11
  163. package/stat/assets/images/marker_srch-on.svg +0 -11
  164. package/stat/assets/images/marker_srchchap-off.png +0 -0
  165. package/stat/assets/images/marker_srchchap-on.png +0 -0
  166. package/stat/assets/images/nav_control-dn.png +0 -0
  167. package/stat/assets/images/nav_control-dn_ia.png +0 -0
  168. package/stat/assets/images/nav_control-up.png +0 -0
  169. package/stat/assets/images/nav_control-up_ia.png +0 -0
  170. package/stat/assets/images/nav_control.png +0 -0
  171. package/stat/assets/images/one_page_mode_icon.png +0 -0
  172. package/stat/assets/images/paper-badge.png +0 -0
  173. package/stat/assets/images/print_icon.png +0 -0
  174. package/stat/assets/images/progressbar.gif +0 -0
  175. package/stat/assets/images/right_edges.png +0 -0
  176. package/stat/assets/images/slider.png +0 -0
  177. package/stat/assets/images/slider_ia.png +0 -0
  178. package/stat/assets/images/thumbnail_mode_icon.png +0 -0
  179. package/stat/assets/images/transparent.png +0 -0
  180. package/stat/assets/images/two_page_mode_icon.png +0 -0
  181. package/stat/assets/images/zoom_in_icon.png +0 -0
  182. package/stat/assets/images/zoom_out_icon.png +0 -0
  183. package/stat/css/BookReader.scss +0 -89
  184. package/stat/css/_BRBookmarks.scss +0 -29
  185. package/stat/css/_BRComponent.scss +0 -13
  186. package/stat/css/_BRfloat.scss +0 -197
  187. package/stat/css/_BRicon.scss +0 -48
  188. package/stat/css/_BRmain.scss +0 -251
  189. package/stat/css/_BRnav.scss +0 -359
  190. package/stat/css/_BRpages.scss +0 -139
  191. package/stat/css/_BRsearch.scss +0 -226
  192. package/stat/css/_BRtoolbar.scss +0 -84
  193. package/stat/css/_BRvendor.scss +0 -5
  194. package/stat/css/_MobileNav.scss +0 -194
  195. package/stat/css/_TextSelection.scss +0 -32
  196. package/stat/css/_colorbox.scss +0 -52
  197. package/stat/css/_controls.scss +0 -253
  198. package/stat/css/_icons.scss +0 -121
  199. package/stat/jquery-wrapper.js +0 -4
  200. package/stat/plugins/plugin.archive_analytics.js +0 -86
  201. package/stat/plugins/plugin.autoplay.js +0 -129
  202. package/stat/plugins/plugin.chapters.js +0 -248
  203. package/stat/plugins/plugin.iframe.js +0 -48
  204. package/stat/plugins/plugin.mobile_nav.js +0 -288
  205. package/stat/plugins/plugin.resume.js +0 -68
  206. package/stat/plugins/plugin.text_selection.js +0 -291
  207. package/stat/plugins/plugin.url.js +0 -198
  208. package/stat/plugins/plugin.vendor-fullscreen.js +0 -247
  209. package/stat/plugins/search/plugin.search.js +0 -439
  210. package/stat/plugins/search/view.js +0 -439
  211. package/stat/plugins/tts/AbstractTTSEngine.js +0 -249
  212. package/stat/plugins/tts/FestivalTTSEngine.js +0 -169
  213. package/stat/plugins/tts/PageChunk.js +0 -107
  214. package/stat/plugins/tts/PageChunkIterator.js +0 -163
  215. package/stat/plugins/tts/WebTTSEngine.js +0 -357
  216. package/stat/plugins/tts/plugin.tts.js +0 -357
  217. package/stat/plugins/tts/tooltip_dict.js +0 -15
  218. package/stat/plugins/tts/utils.js +0 -91
  219. package/stat/util/browserSniffing.js +0 -30
  220. package/stat/util/debouncer.js +0 -26
  221. package/stat/util/docCookies.js +0 -67
  222. package/stat/util/strings.js +0 -34
@@ -1 +1 @@
1
- {"version":3,"file":"plugins/plugin.mobile_nav.js","mappings":"2KAmCuCA,E,+CAzBjCC,EAAa,CACjB,CACEC,OAAQ,kBACRC,MAAO,aAET,CACED,OAAQ,mBACRC,MAAO,mBAET,CACED,OAAQ,eACRC,MAAO,wBAET,CACED,OAAQ,iBACRC,MAAO,kBAIXC,EAAOC,OAAOC,WAAWC,eAAgB,CACvCC,iBAAiB,EACjBC,eAAgB,mBAChBC,yBAAyB,IAG3BJ,WAAWK,UAAUC,OAAkBZ,EAUpCM,WAAWK,UAAUC,MATf,SAAUC,GACfb,EAAOc,KAAKC,KAAMF,GAElBE,KAAKP,gBAAkBK,EAAQL,gBAC/BO,KAAKN,eAAiBI,EAAQJ,eAC9BM,KAAKL,wBAA0BG,EAAQH,wBAEvCK,KAAKC,KAAKC,OAAS,OAMvBX,WAAWK,UAAUO,YAAe,SAAUlB,GAC5C,OAAO,SAAUmB,EAAMC,GAAI,IACrBC,EADqB,OAEzB,GAAIN,KAAKP,gBAAiB,CACxB,IAAMc,EAAYP,KAAKQ,2BACvBR,KAAKC,KAAKQ,IAAIC,OAAOH,GAGrBP,KAAKW,aAAaX,KAAKY,EAAE,kBACzBZ,KAAKa,cAAcb,KAAKY,EAAE,oBAE1BN,EAAWC,GACFO,MAAM,CACbC,QAAS,CACP,CAAE,SAAY,QAEhBC,OAAQ,CACNC,KAAK,EACLC,MAAOlB,KAAKN,eACZyB,UAAW,SAEbC,WAAY,CAAE,gBACb,CACDC,UAAW,CACTC,kBAAkB,EAClBC,UAAW,OACXC,aAAcxB,KAAKyB,MAIvB,IAAMC,EAAmBpB,EAASqB,KAAK,oBACvCrB,EAASsB,KAAK,SAASC,KAAK,UAAU,WAEhCH,EAAiBI,QACnBJ,EAAiBK,I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O,EAAE+N,cAAcD,UAAU9N,EAAE+N,cAAcE,eAAejO,EAAE+N,cAAcD,WAAW,GAAG7K,GAAE,OAAOpE,GAAGyD,EAAEoL,UAAU,IAAIvK,EAAE,MAAMT,EAAEiH,OAAO,MAAMjH,EAAEgD,SAAQ,SAASnD,GAAGxB,EAAErB,KAAKC,QAAQK,EAAEtD,MAAM,GAAGsR,aAAahO,EAAEtD,MAAMwR,eAAe3L,EAAEoL,qBAAoB3K,EAAEuD,MAAM1H,GAAGyD,EAAE6L,mBAAkB,WAAWpN,EAAE0E,MAAMzB,SAAS,IAAItB,EAAEgD,SAASoI,UAAU,GAAGR,IAAI,CAAC,6BAA6B,SAASA,IAAI,CAAC,6BAA6B,eAAc3P,IAAI,WAAW+E,EAAE1C,EAAEuC,GAAGgC,GAAKvE,EAAEuC,GAAGiC,GAAGlC,EAAEtC,EAAEuC,GAAGkC,IAAIC,YAAY,SAAS1E,EAAEuC,MAAMvC,EAAEuC,GAAGkF,SAASpF,GAAG,CAACwL,KAAI,GAA1rC,CAA2sC9R,K","sources":["webpack://@internetarchive/bookreader/./src/plugins/plugin.mobile_nav.js","webpack://@internetarchive/bookreader/./node_modules/jquery.mmenu/dist/addons/navbars/jquery.mmenu.navbars.min.js","webpack://@internetarchive/bookreader/./node_modules/jquery.mmenu/dist/js/jquery.mmenu.min.js"],"sourcesContent":["/* global BookReader */\n/**\n * Adds mobile navigation at responsive breakpoint\n */\n\nimport * as utils from '../BookReader/utils.js';\nimport 'jquery.mmenu/dist/js/jquery.mmenu.min.js';\nimport 'jquery.mmenu/dist/addons/navbars/jquery.mmenu.navbars.min.js';\n\n//contains all filters and labels for checkboxs\nconst FILTERLIST = [\n {\n filter: \"grayscale(100%)\",\n label: \"Grayscale\"\n },\n {\n filter: \"brightness(120%)\",\n label: \"High brightness\"\n },\n {\n filter: \"invert(100%)\",\n label: \"Inverted (dark mode)\"\n },\n {\n filter: \"contrast(120%)\",\n label: \"High contrast\"\n },\n];\n\njQuery.extend(BookReader.defaultOptions, {\n enableMobileNav: true,\n mobileNavTitle: 'Internet Archive',\n mobileNavFullscreenOnly: false,\n});\n\nBookReader.prototype.setup = (function(super_) {\n return function (options) {\n super_.call(this, options);\n\n this.enableMobileNav = options.enableMobileNav;\n this.mobileNavTitle = options.mobileNavTitle;\n this.mobileNavFullscreenOnly = options.mobileNavFullscreenOnly;\n\n this.refs.$mmenu = null;\n };\n})(BookReader.prototype.setup);\n\n\n// Extend initToolbar\nBookReader.prototype.initToolbar = (function (super_) {\n return function (mode, ui) {\n let $mmenuEl;\n if (this.enableMobileNav) {\n const $drawerEl = this.buildMobileDrawerElement();\n this.refs.$br.append($drawerEl);\n\n // Render info into mobile info before mmenu\n this.buildInfoDiv(this.$('.BRmobileInfo'));\n this.buildShareDiv(this.$('.BRmobileShare'));\n\n $mmenuEl = $drawerEl;\n $mmenuEl.mmenu({\n navbars: [\n { \"position\": \"top\" },\n ],\n navbar: {\n add: true,\n title: this.mobileNavTitle,\n titleLink: 'panel'\n },\n extensions: [ \"panelshadow\" ],\n }, {\n offCanvas: {\n wrapPageIfNeeded: false,\n zposition: 'next',\n pageSelector: this.el,\n }\n });\n\n const $BRpageviewField = $mmenuEl.find('.BRpageviewValue');\n $mmenuEl.data('mmenu').bind('opened', () => {\n // Update \"Link to this page view\" link\n if ($BRpageviewField.length) {\n $BRpageviewField.val(window.location.href);\n }\n });\n\n //apply filters when checkboxs clicked\n $drawerEl.find('.BRcheckbox-filters')\n .on(\"click\", () => applyFilters($drawerEl, this));\n\n // Bind mobile switch buttons\n $drawerEl.find('.DrawerLayoutButton.one_page_mode')\n .on(\"click\", () => this.switchMode(this.constMode1up));\n $drawerEl.find('.DrawerLayoutButton.two_page_mode')\n .on(\"click\", () => this.switchMode(this.constMode2up));\n $drawerEl.find('.DrawerLayoutButton.thumbnail_mode')\n .on(\"click\", () => this.switchMode(this.constModeThumb));\n\n if (this.mobileNavFullscreenOnly) {\n $(document.body).addClass('BRbodyMobileNavEnabledFullscreen');\n } else {\n $(document.body).addClass('BRbodyMobileNavEnabled');\n }\n\n this.refs.$mmenu = $mmenuEl;\n\n }\n\n // Call the parent method at the end, because it binds events to DOM\n super_.apply(this, arguments);\n\n\n if (this.enableMobileNav) {\n // Need to bind more, console after toolbar is initialized\n this.$('.BRmobileHamburger').click(() => {\n if ($mmenuEl.data('mmenu').getInstance().vars.opened) {\n $mmenuEl.data('mmenu').close();\n } else {\n $mmenuEl.data('mmenu').open();\n this.trigger(\"mobileNavOpen\");\n }\n });\n\n\n const closeMobileMenu = (e) => {\n // Need to close the mobile menu to reset DOM & Style\n // driven by menu plugin\n const width = $( window ).width();\n const mobileMenuIsOpen = $mmenuEl.data('mmenu').getInstance().vars.opened;\n // $brBreakPointMobile: 800px;\n if (mobileMenuIsOpen && (width >= 800)) {\n $mmenuEl.data('mmenu').close ();\n }\n };\n\n window.addEventListener('resize', utils.debounce(closeMobileMenu, 900));\n }\n };\n})(BookReader.prototype.initToolbar);\n\n\nBookReader.prototype.buildToolbarElement = (function (super_) {\n return function () {\n const $el = super_.call(this);\n if (this.enableMobileNav) {\n const escapedTitle = BookReader.util.escapeHTML(this.bookTitle);\n const toolbar = `\n <span class=\"BRmobileHamburgerWrapper\">\n <button class=\"BRmobileHamburger\"></button>\n <span class=\"BRtoolbarMobileTitle\" title=\"${escapedTitle}\">${escapedTitle}</span>\n </span>\n `;\n $el\n .addClass('responsive')\n .prepend($(toolbar));\n }\n return $el;\n };\n})(BookReader.prototype.buildToolbarElement);\n\n/**\n * This method builds the html for the mobile drawer. It can be decorated to\n * extend the default drawer.\n * @return {jqueryElement}\n */\nBookReader.prototype.buildMobileDrawerElement = function() {\n let experimentalHtml = '';\n //builds filters checkbox html\n if (this.enableExperimentalControls) {\n experimentalHtml = `\n <p class=\"DrawerSettingsTitle\">Visual Adjustment</p>\n <div class=\"BRcheckbox-group-filters\">\n `;\n FILTERLIST.forEach( (el, i) => {\n const checkboxHtml = `\n <input type=\"checkbox\" class=\"BRcheckbox-filters\" id=\"filter${i}\">\n <label for=\"filter${i}\" class=\"BRcheckbox-label-filters\">${el.label}</label><br>\n \n `;\n experimentalHtml = experimentalHtml.concat(checkboxHtml);\n });\n experimentalHtml = experimentalHtml.concat(\"</div>\");\n }\n\n\n const settingsSection = `\n <span>\n <span class=\"DrawerIconWrapper\">\n <img class=\"DrawerIcon\" src=\"${`${this.imagesBaseURL}icon_gear.svg`}\" alt=\"settings-icon\"/>\n </span>\n Settings\n </span>\n <div class=DrawerSettingsWrapper>\n <div class=\"DrawerSettingsLayoutWrapper\">\n <button class=\"DrawerLayoutButton one_page_mode\">\n <img src=\"${this.imagesBaseURL}icon_one_page.svg\" alt=\"Single Page\"/>\n <br>\n One Page\n </button>\n <button class=\"DrawerLayoutButton two_page_mode TwoPagesButton\">\n <img src=\"${this.imagesBaseURL}icon_two_pages.svg\" alt=\"Two Pages\"/>\n <br>\n Two Pages\n </button>\n <button class=\"DrawerLayoutButton thumbnail_mode\">\n <img src=\"${this.imagesBaseURL}icon_thumbnails.svg\" alt=\"Thumbnails\"/>\n <br>\n Thumbnails\n </button>\n </div>\n <br>\n <div class=\"DrawerSettingsTitle\">Zoom</div>\n <button class='BRicon zoom_out'></button>\n <button class='BRicon zoom_in'></button>\n <br style=\"clear:both\"><br><br>\n ${experimentalHtml}\n </div>\n `;\n const moreInfo = `\n <span>\n <span class=\"DrawerIconWrapper \">\n <img class=\"DrawerIcon\" src=\"${this.imagesBaseURL}icon_info.svg\" alt=\"info-icon\"/>\n </span>\n About This Book\n </span>\n <div class=\"BRmobileInfo\"></div>\n `;\n const share = `\n <span>\n <span class=\"DrawerIconWrapper\">\n <img class=\"DrawerIcon\" src=\"${this.imagesBaseURL}icon_share.svg\" alt=\"info-share\"/>\n </span>\n Share This Book\n </span>\n <div class=\"BRmobileShare\"></div>\n `;\n const navMenu = `\n <nav id=\"BRmobileMenu\" class=\"BRmobileMenu\">\n <ul>\n <li class=\"BRmobileMenu__settings\">${settingsSection}</li>\n <li class=\"BRmobileMenu__moreInfoRow\">${moreInfo}</li>\n <li class=\"BRmobileMenu__share\">${share}</li>\n </ul>\n </nav>\n `;\n\n const $el = $(navMenu);\n return $el;\n};\n\n/**\n * Mmenu moves itself out side of the root BookReader element, so we need to\n * include it in the scoped $ function.\n */\nBookReader.prototype.$ = (function (super_) {\n return function (arg) {\n let $results = super_.call(this, arg);\n if (this.refs.$mmenu) {\n $results = $results.add(this.refs.$mmenu.find(arg));\n }\n return $results;\n };\n})(BookReader.prototype.$);\n\n/**\n* Dynamically creates styles combining different filters for BookReaders imgs\n* based on filters checkbox\n*/\nconst applyFilters = (drawerEl, br) => {\n let filterStr = \"\";\n\n $('.BRcheckbox-filters').each(\n (i, el) => {\n br.refs.$br.removeClass(\"filter-applied\");\n if ($(el).is(':checked')) {\n br.refs.$br.addClass($(el).attr(\"filter-applied\"));\n filterStr = filterStr + FILTERLIST[i].filter;\n }\n }\n );\n const filtersSheet = $(\"#filtersStyle\")[0] || document.createElement('style');\n filtersSheet.id = \"filtersStyle\";\n filtersSheet.innerHTML = `.BRpagecontainer img {\n filter: ${filterStr};\n -webkit-filter: ${filterStr};}`;\n document.body.appendChild(filtersSheet);\n};\n","/*\t\n * jQuery mmenu navbar addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\n!function(n){var a=\"mmenu\",t=\"navbars\";n[a].addons[t]={setup:function(){var r=this,s=this.opts[t],c=this.conf[t];if(i=n[a].glbl,\"undefined\"!=typeof s){s instanceof Array||(s=[s]);var o={};n.each(s,function(i){var d=s[i];\"boolean\"==typeof d&&d&&(d={}),\"object\"!=typeof d&&(d={}),\"undefined\"==typeof d.content&&(d.content=[\"prev\",\"title\"]),d.content instanceof Array||(d.content=[d.content]),d=n.extend(!0,{},r.opts.navbar,d);var l=d.position,h=d.height;\"number\"!=typeof h&&(h=1),h=Math.min(4,Math.max(1,h)),\"bottom\"!=l&&(l=\"top\"),o[l]||(o[l]=0),o[l]++;var f=n(\"<div />\").addClass(e.navbar+\" \"+e.navbar+\"-\"+l+\" \"+e.navbar+\"-\"+l+\"-\"+o[l]+\" \"+e.navbar+\"-size-\"+h);o[l]+=h-1;for(var u=0,v=0,p=d.content.length;p>v;v++){var b=n[a].addons[t][d.content[v]]||!1;b?u+=b.call(r,f,d,c):(b=d.content[v],b instanceof n||(b=n(d.content[v])),f.append(b))}u+=Math.ceil(f.children().not(\".\"+e.btn).length/h),u>1&&f.addClass(e.navbar+\"-content-\"+u),f.children(\".\"+e.btn).length&&f.addClass(e.hasbtns),f.prependTo(r.$menu)});for(var d in o)r.$menu.addClass(e.hasnavbar+\"-\"+d+\"-\"+o[d])}},add:function(){e=n[a]._c,r=n[a]._d,s=n[a]._e,e.add(\"close hasbtns\")},clickAnchor:function(n,a){}},n[a].configuration[t]={breadcrumbSeparator:\"/\"},n[a].configuration.classNames[t]={};var e,r,s,i}(jQuery),/*\t\n * jQuery mmenu navbar addon breadcrumbs content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"breadcrumbs\";n[a].addons[t][e]=function(t,e,r){var s=n[a]._c,i=n[a]._d;s.add(\"breadcrumbs separator\");var c=n('<span class=\"'+s.breadcrumbs+'\" />').appendTo(t);this.bind(\"init\",function(a){a.removeClass(s.hasnavbar).each(function(){for(var a=[],t=n(this),e=n('<span class=\"'+s.breadcrumbs+'\"></span>'),c=n(this).children().first(),o=!0;c&&c.length;){c.is(\".\"+s.panel)||(c=c.closest(\".\"+s.panel));var d=c.children(\".\"+s.navbar).children(\".\"+s.title).text();a.unshift(o?\"<span>\"+d+\"</span>\":'<a href=\"#'+c.attr(\"id\")+'\">'+d+\"</a>\"),o=!1,c=c.data(i.parent)}e.append(a.join('<span class=\"'+s.separator+'\">'+r.breadcrumbSeparator+\"</span>\")).appendTo(t.children(\".\"+s.navbar))})});var o=function(){c.html(this.$pnls.children(\".\"+s.current).children(\".\"+s.navbar).children(\".\"+s.breadcrumbs).html())};return this.bind(\"openPanel\",o),this.bind(\"init\",o),0}}(jQuery),/*\t\n * jQuery mmenu navbar addon close content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"close\";n[a].addons[t][e]=function(t,e){var r=n[a]._c,s=n[a].glbl,i=n('<a class=\"'+r.close+\" \"+r.btn+'\" href=\"#\" />').appendTo(t),c=function(n){i.attr(\"href\",\"#\"+n.attr(\"id\"))};return c.call(this,s.$page),this.bind(\"setPage\",c),-1}}(jQuery),/*\t\n * jQuery mmenu navbar addon next content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"next\";n[a].addons[t][e]=function(e,r){var s,i,c=n[a]._c,o=n('<a class=\"'+c.next+\" \"+c.btn+'\" href=\"#\" />').appendTo(e),d=function(n){n=n||this.$pnls.children(\".\"+c.current);var a=n.find(\".\"+this.conf.classNames[t].panelNext);s=a.attr(\"href\"),i=a.html(),o[s?\"attr\":\"removeAttr\"](\"href\",s),o[s||i?\"removeClass\":\"addClass\"](c.hidden),o.html(i)};return this.bind(\"openPanel\",d),this.bind(\"init\",function(){d.call(this)}),-1},n[a].configuration.classNames[t].panelNext=\"Next\"}(jQuery),/*\t\n * jQuery mmenu navbar addon prev content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"prev\";n[a].addons[t][e]=function(e,r){var s=n[a]._c,i=n('<a class=\"'+s.prev+\" \"+s.btn+'\" href=\"#\" />').appendTo(e);this.bind(\"init\",function(n){n.removeClass(s.hasnavbar).children(\".\"+s.navbar).addClass(s.hidden)});var c,o,d=function(n){if(n=n||this.$pnls.children(\".\"+s.current),!n.hasClass(s.vertical)){var a=n.find(\".\"+this.conf.classNames[t].panelPrev);a.length||(a=n.children(\".\"+s.navbar).children(\".\"+s.prev)),c=a.attr(\"href\"),o=a.html(),i[c?\"attr\":\"removeAttr\"](\"href\",c),i[c||o?\"removeClass\":\"addClass\"](s.hidden),i.html(o)}};return this.bind(\"openPanel\",d),this.bind(\"init\",function(){d.call(this)}),-1},n[a].configuration.classNames[t].panelPrev=\"Prev\"}(jQuery),/*\t\n * jQuery mmenu navbar addon searchfield content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"searchfield\";n[a].addons[t][e]=function(t,e){var r=n[a]._c,s=n('<div class=\"'+r.search+'\" />').appendTo(t);return\"object\"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=s,0}}(jQuery),/*\t\n * jQuery mmenu navbar addon title content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"title\";n[a].addons[t][e]=function(e,r){var s,i,c=n[a]._c,o=n('<a class=\"'+c.title+'\" />').appendTo(e),d=function(n){if(n=n||this.$pnls.children(\".\"+c.current),!n.hasClass(c.vertical)){var a=n.find(\".\"+this.conf.classNames[t].panelTitle);a.length||(a=n.children(\".\"+c.navbar).children(\".\"+c.title)),s=a.attr(\"href\"),i=a.html()||r.title,o[s?\"attr\":\"removeAttr\"](\"href\",s),o[s||i?\"removeClass\":\"addClass\"](c.hidden),o.html(i)}};return this.bind(\"openPanel\",d),this.bind(\"init\",function(n){d.call(this)}),0},n[a].configuration.classNames[t].panelTitle=\"Title\"}(jQuery);","/*\n * jQuery mmenu v5.6.5\n * @requires jQuery 1.7.0 or later\n *\n * mmenu.frebsite.nl\n *\t\n * Copyright (c) Fred Heusschen\n * www.frebsite.nl\n *\n * License: CC-BY-NC-4.0\n * http://creativecommons.org/licenses/by-nc/4.0/\n */\n!function(e){function t(){e[n].glbl||(r={$wndw:e(window),$docu:e(document),$html:e(\"html\"),$body:e(\"body\")},i={},a={},o={},e.each([i,a,o],function(e,t){t.add=function(e){e=e.split(\" \");for(var n=0,s=e.length;s>n;n++)t[e[n]]=t.mm(e[n])}}),i.mm=function(e){return\"mm-\"+e},i.add(\"wrapper menu panels panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen\"),i.umm=function(e){return\"mm-\"==e.slice(0,3)&&(e=e.slice(3)),e},a.mm=function(e){return\"mm-\"+e},a.add(\"parent sub\"),o.mm=function(e){return e+\".mm\"},o.add(\"transitionend webkitTransitionEnd click scroll keydown mousedown mouseup touchstart touchmove touchend orientationchange\"),e[n]._c=i,e[n]._d=a,e[n]._e=o,e[n].glbl=r)}var n=\"mmenu\",s=\"5.6.4\";if(!(e[n]&&e[n].version>s)){e[n]=function(e,t,n){this.$menu=e,this._api=[\"bind\",\"init\",\"update\",\"setSelected\",\"getInstance\",\"openPanel\",\"closePanel\",\"closeAllPanels\"],this.opts=t,this.conf=n,this.vars={},this.cbck={},\"function\"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors();var s=this.$pnls.children();return this._initAddons(),this.init(s),\"function\"==typeof this.___debug&&this.___debug(),this},e[n].version=s,e[n].addons={},e[n].uniqueId=0,e[n].defaults={extensions:[],navbar:{add:!0,title:\"Menu\",titleLink:\"panel\"},onClick:{setSelected:!0},slidingSubmenus:!0},e[n].configuration={classNames:{divider:\"Divider\",inset:\"Inset\",panel:\"Panel\",selected:\"Selected\",spacer:\"Spacer\",vertical:\"Vertical\"},clone:!1,openingInterval:25,panelNodetype:\"ul, ol, div\",transitionDuration:400},e[n].prototype={init:function(e){e=e.not(\".\"+i.nopanel),e=this._initPanels(e),this.trigger(\"init\",e),this.trigger(\"update\")},update:function(){this.trigger(\"update\")},setSelected:function(e){this.$menu.find(\".\"+i.listview).children().removeClass(i.selected),e.addClass(i.selected),this.trigger(\"setSelected\",e)},openPanel:function(t){var s=t.parent(),a=this;if(s.hasClass(i.vertical)){var o=s.parents(\".\"+i.subopened);if(o.length)return void this.openPanel(o.first());s.addClass(i.opened),this.trigger(\"openPanel\",t),this.trigger(\"openingPanel\",t),this.trigger(\"openedPanel\",t)}else{if(t.hasClass(i.current))return;var r=this.$pnls.children(\".\"+i.panel),l=r.filter(\".\"+i.current);r.removeClass(i.highest).removeClass(i.current).not(t).not(l).not(\".\"+i.vertical).addClass(i.hidden),e[n].support.csstransitions||l.addClass(i.hidden),t.hasClass(i.opened)?t.nextAll(\".\"+i.opened).addClass(i.highest).removeClass(i.opened).removeClass(i.subopened):(t.addClass(i.highest),l.addClass(i.subopened)),t.removeClass(i.hidden).addClass(i.current),a.trigger(\"openPanel\",t),setTimeout(function(){t.removeClass(i.subopened).addClass(i.opened),a.trigger(\"openingPanel\",t),a.__transitionend(t,function(){a.trigger(\"openedPanel\",t)},a.conf.transitionDuration)},this.conf.openingInterval)}},closePanel:function(e){var t=e.parent();t.hasClass(i.vertical)&&(t.removeClass(i.opened),this.trigger(\"closePanel\",e),this.trigger(\"closingPanel\",e),this.trigger(\"closedPanel\",e))},closeAllPanels:function(){this.$menu.find(\".\"+i.listview).children().removeClass(i.selected).filter(\".\"+i.vertical).removeClass(i.opened);var e=this.$pnls.children(\".\"+i.panel),t=e.first();this.$pnls.children(\".\"+i.panel).not(t).removeClass(i.subopened).removeClass(i.opened).removeClass(i.current).removeClass(i.highest).addClass(i.hidden),this.openPanel(t)},togglePanel:function(e){var t=e.parent();t.hasClass(i.vertical)&&this[t.hasClass(i.opened)?\"closePanel\":\"openPanel\"](e)},getInstance:function(){return this},bind:function(e,t){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(t)},trigger:function(){var e=this,t=Array.prototype.slice.call(arguments),n=t.shift();if(this.cbck[n])for(var s=0,i=this.cbck[n].length;i>s;s++)this.cbck[n][s].apply(e,t)},_initMenu:function(){this.$menu.attr(\"id\",this.$menu.attr(\"id\")||this.__getUniqueId()),this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find(\"[id]\")).filter(\"[id]\").each(function(){e(this).attr(\"id\",i.mm(e(this).attr(\"id\")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$pnls=e('<div class=\"'+i.panels+'\" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu),this.$menu.parent().addClass(i.wrapper);var t=[i.menu];this.opts.slidingSubmenus||t.push(i.vertical),this.opts.extensions=this.opts.extensions.length?\"mm-\"+this.opts.extensions.join(\" mm-\"):\"\",this.opts.extensions&&t.push(this.opts.extensions),this.$menu.addClass(t.join(\" \"))},_initPanels:function(t){var n=this,s=this.__findAddBack(t,\"ul, ol\");this.__refactorClass(s,this.conf.classNames.inset,\"inset\").addClass(i.nolistview+\" \"+i.nopanel),s.not(\".\"+i.nolistview).addClass(i.listview);var o=this.__findAddBack(t,\".\"+i.listview).children();this.__refactorClass(o,this.conf.classNames.selected,\"selected\"),this.__refactorClass(o,this.conf.classNames.divider,\"divider\"),this.__refactorClass(o,this.conf.classNames.spacer,\"spacer\"),this.__refactorClass(this.__findAddBack(t,\".\"+this.conf.classNames.panel),this.conf.classNames.panel,\"panel\");var r=e(),l=t.add(t.find(\".\"+i.panel)).add(this.__findAddBack(t,\".\"+i.listview).children().children(this.conf.panelNodetype)).not(\".\"+i.nopanel);this.__refactorClass(l,this.conf.classNames.vertical,\"vertical\"),this.opts.slidingSubmenus||l.addClass(i.vertical),l.each(function(){var t=e(this),s=t;t.is(\"ul, ol\")?(t.wrap('<div class=\"'+i.panel+'\" />'),s=t.parent()):s.addClass(i.panel);var a=t.attr(\"id\");t.removeAttr(\"id\"),s.attr(\"id\",a||n.__getUniqueId()),t.hasClass(i.vertical)&&(t.removeClass(n.conf.classNames.vertical),s.add(s.parent()).addClass(i.vertical)),r=r.add(s)});var d=e(\".\"+i.panel,this.$menu);r.each(function(t){var s,o,r=e(this),l=r.parent(),d=l.children(\"a, span\").first();if(l.is(\".\"+i.panels)||(l.data(a.sub,r),r.data(a.parent,l)),l.children(\".\"+i.next).length||l.parent().is(\".\"+i.listview)&&(s=r.attr(\"id\"),o=e('<a class=\"'+i.next+'\" href=\"#'+s+'\" data-target=\"#'+s+'\" />').insertBefore(d),d.is(\"span\")&&o.addClass(i.fullsubopen)),!r.children(\".\"+i.navbar).length&&!l.hasClass(i.vertical)){l.parent().is(\".\"+i.listview)?l=l.closest(\".\"+i.panel):(d=l.closest(\".\"+i.panel).find('a[href=\"#'+r.attr(\"id\")+'\"]').first(),l=d.closest(\".\"+i.panel));var c=!1,p=e('<div class=\"'+i.navbar+'\" />');if(n.opts.navbar.add&&r.addClass(i.hasnavbar),l.length){switch(s=l.attr(\"id\"),n.opts.navbar.titleLink){case\"anchor\":c=d.attr(\"href\");break;case\"panel\":case\"parent\":c=\"#\"+s;break;default:c=!1}p.append('<a class=\"'+i.btn+\" \"+i.prev+'\" href=\"#'+s+'\" data-target=\"#'+s+'\" />').append(e('<a class=\"'+i.title+'\"'+(c?' href=\"'+c+'\"':\"\")+\" />\").text(d.text())).prependTo(r)}else n.opts.navbar.title&&p.append('<a class=\"'+i.title+'\">'+n.opts.navbar.title+\"</a>\").prependTo(r)}});var c=this.__findAddBack(t,\".\"+i.listview).children(\".\"+i.selected).removeClass(i.selected).last().addClass(i.selected);c.add(c.parentsUntil(\".\"+i.menu,\"li\")).filter(\".\"+i.vertical).addClass(i.opened).end().each(function(){e(this).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).addClass(i.subopened)}),c.children(\".\"+i.panel).not(\".\"+i.vertical).addClass(i.opened).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).addClass(i.subopened);var p=d.filter(\".\"+i.opened);return p.length||(p=r.first()),p.addClass(i.opened).last().addClass(i.current),r.not(\".\"+i.vertical).not(p.last()).addClass(i.hidden).end().filter(function(){return!e(this).parent().hasClass(i.panels)}).appendTo(this.$pnls),r},_initAnchors:function(){var t=this;r.$body.on(o.click+\"-oncanvas\",\"a[href]\",function(s){var a=e(this),o=!1,r=t.$menu.find(a).length;for(var l in e[n].addons)if(e[n].addons[l].clickAnchor.call(t,a,r)){o=!0;break}var d=a.attr(\"href\");if(!o&&r&&d.length>1&&\"#\"==d.slice(0,1))try{var c=e(d,t.$menu);c.is(\".\"+i.panel)&&(o=!0,t[a.parent().hasClass(i.vertical)?\"togglePanel\":\"openPanel\"](c))}catch(p){}if(o&&s.preventDefault(),!o&&r&&a.is(\".\"+i.listview+\" > li > a\")&&!a.is('[rel=\"external\"]')&&!a.is('[target=\"_blank\"]')){t.__valueOrFn(t.opts.onClick.setSelected,a)&&t.setSelected(e(s.target).parent());var h=t.__valueOrFn(t.opts.onClick.preventDefault,a,\"#\"==d.slice(0,1));h&&s.preventDefault(),t.__valueOrFn(t.opts.onClick.close,a,h)&&t.close()}})},_initAddons:function(){var t;for(t in e[n].addons)e[n].addons[t].add.call(this),e[n].addons[t].add=function(){};for(t in e[n].addons)e[n].addons[t].setup.call(this)},_getOriginalMenuId:function(){var e=this.$menu.attr(\"id\");return e&&e.length&&this.conf.clone&&(e=i.umm(e)),e},__api:function(){var t=this,n={};return e.each(this._api,function(e){var s=this;n[s]=function(){var e=t[s].apply(t,arguments);return\"undefined\"==typeof e?n:e}}),n},__valueOrFn:function(e,t,n){return\"function\"==typeof e?e.call(t[0]):\"undefined\"==typeof e&&\"undefined\"!=typeof n?n:e},__refactorClass:function(e,t,n){return e.filter(\".\"+t).removeClass(t).addClass(i[n])},__findAddBack:function(e,t){return e.find(t).add(e.filter(t))},__filterListItems:function(e){return e.not(\".\"+i.divider).not(\".\"+i.hidden)},__transitionend:function(e,t,n){var s=!1,i=function(){s||t.call(e[0]),s=!0};e.one(o.transitionend,i),e.one(o.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return i.mm(e[n].uniqueId++)}},e.fn[n]=function(s,i){return t(),s=e.extend(!0,{},e[n].defaults,s),i=e.extend(!0,{},e[n].configuration,i),this.each(function(){var t=e(this);if(!t.data(n)){var a=new e[n](t,s,i);a.$menu.data(n,a.__api())}})},e[n].support={touch:\"ontouchstart\"in window||navigator.msMaxTouchPoints||!1,csstransitions:function(){if(\"undefined\"!=typeof Modernizr&&\"undefined\"!=typeof Modernizr.csstransitions)return Modernizr.csstransitions;var e=document.body||document.documentElement,t=e.style,n=\"transition\";if(\"string\"==typeof t[n])return!0;var s=[\"Moz\",\"webkit\",\"Webkit\",\"Khtml\",\"O\",\"ms\"];n=n.charAt(0).toUpperCase()+n.substr(1);for(var i=0;i<s.length;i++)if(\"string\"==typeof t[s[i]+n])return!0;return!1}()};var i,a,o,r}}(jQuery),/*\t\n * jQuery mmenu offCanvas addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(e){var t=\"mmenu\",n=\"offCanvas\";e[t].addons[n]={setup:function(){if(this.opts[n]){var i=this.opts[n],a=this.conf[n];o=e[t].glbl,this._api=e.merge(this._api,[\"open\",\"close\",\"setPage\"]),(\"top\"==i.position||\"bottom\"==i.position)&&(i.zposition=\"front\"),\"string\"!=typeof a.pageSelector&&(a.pageSelector=\"> \"+a.pageNodetype),o.$allMenus=(o.$allMenus||e()).add(this.$menu),this.vars.opened=!1;var r=[s.offcanvas];\"left\"!=i.position&&r.push(s.mm(i.position)),\"back\"!=i.zposition&&r.push(s.mm(i.zposition)),this.$menu.addClass(r.join(\" \")).parent().removeClass(s.wrapper),this.setPage(o.$page),this._initBlocker(),this[\"_initWindow_\"+n](),this.$menu[a.menuInjectMethod+\"To\"](a.menuWrapperSelector);var l=window.location.hash;if(l){var d=this._getOriginalMenuId();d&&d==l.slice(1)&&this.open()}}},add:function(){s=e[t]._c,i=e[t]._d,a=e[t]._e,s.add(\"offcanvas slideout blocking modal background opening blocker page\"),i.add(\"style\"),a.add(\"resize\")},clickAnchor:function(e,t){if(!this.opts[n])return!1;var s=this._getOriginalMenuId();if(s&&e.is('[href=\"#'+s+'\"]'))return this.open(),!0;if(o.$page)return s=o.$page.first().attr(\"id\"),s&&e.is('[href=\"#'+s+'\"]')?(this.close(),!0):!1}},e[t].defaults[n]={position:\"left\",zposition:\"back\",blockUI:!0,moveBackground:!0},e[t].configuration[n]={pageNodetype:\"div\",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuWrapperSelector:\"body\",menuInjectMethod:\"prepend\"},e[t].prototype.open=function(){if(!this.vars.opened){var e=this;this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),this.trigger(\"open\")}},e[t].prototype._openSetup=function(){var t=this,r=this.opts[n];this.closeAllOthers(),o.$page.each(function(){e(this).data(i.style,e(this).attr(\"style\")||\"\")}),o.$wndw.trigger(a.resize+\"-\"+n,[!0]);var l=[s.opened];r.blockUI&&l.push(s.blocking),\"modal\"==r.blockUI&&l.push(s.modal),r.moveBackground&&l.push(s.background),\"left\"!=r.position&&l.push(s.mm(this.opts[n].position)),\"back\"!=r.zposition&&l.push(s.mm(this.opts[n].zposition)),this.opts.extensions&&l.push(this.opts.extensions),o.$html.addClass(l.join(\" \")),setTimeout(function(){t.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(s.current+\" \"+s.opened)},e[t].prototype._openFinish=function(){var e=this;this.__transitionend(o.$page.first(),function(){e.trigger(\"opened\")},this.conf.transitionDuration),o.$html.addClass(s.opening),this.trigger(\"opening\")},e[t].prototype.close=function(){if(this.vars.opened){var t=this;this.__transitionend(o.$page.first(),function(){t.$menu.removeClass(s.current).removeClass(s.opened),o.$html.removeClass(s.opened).removeClass(s.blocking).removeClass(s.modal).removeClass(s.background).removeClass(s.mm(t.opts[n].position)).removeClass(s.mm(t.opts[n].zposition)),t.opts.extensions&&o.$html.removeClass(t.opts.extensions),o.$page.each(function(){e(this).attr(\"style\",e(this).data(i.style))}),t.vars.opened=!1,t.trigger(\"closed\")},this.conf.transitionDuration),o.$html.removeClass(s.opening),this.trigger(\"close\"),this.trigger(\"closing\")}},e[t].prototype.closeAllOthers=function(){o.$allMenus.not(this.$menu).each(function(){var n=e(this).data(t);n&&n.close&&n.close()})},e[t].prototype.setPage=function(t){var i=this,a=this.conf[n];t&&t.length||(t=o.$body.find(a.pageSelector),a.noPageSelector.length&&(t=t.not(a.noPageSelector.join(\", \"))),t.length>1&&a.wrapPageIfNeeded&&(t=t.wrapAll(\"<\"+this.conf[n].pageNodetype+\" />\").parent())),t.each(function(){e(this).attr(\"id\",e(this).attr(\"id\")||i.__getUniqueId())}),t.addClass(s.page+\" \"+s.slideout),o.$page=t,this.trigger(\"setPage\",t)},e[t].prototype[\"_initWindow_\"+n]=function(){o.$wndw.off(a.keydown+\"-\"+n).on(a.keydown+\"-\"+n,function(e){return o.$html.hasClass(s.opened)&&9==e.keyCode?(e.preventDefault(),!1):void 0});var e=0;o.$wndw.off(a.resize+\"-\"+n).on(a.resize+\"-\"+n,function(t,n){if(1==o.$page.length&&(n||o.$html.hasClass(s.opened))){var i=o.$wndw.height();(n||i!=e)&&(e=i,o.$page.css(\"minHeight\",i))}})},e[t].prototype._initBlocker=function(){var t=this;this.opts[n].blockUI&&(o.$blck||(o.$blck=e('<div id=\"'+s.blocker+'\" class=\"'+s.slideout+'\" />')),o.$blck.appendTo(o.$body).off(a.touchstart+\"-\"+n+\" \"+a.touchmove+\"-\"+n).on(a.touchstart+\"-\"+n+\" \"+a.touchmove+\"-\"+n,function(e){e.preventDefault(),e.stopPropagation(),o.$blck.trigger(a.mousedown+\"-\"+n)}).off(a.mousedown+\"-\"+n).on(a.mousedown+\"-\"+n,function(e){e.preventDefault(),o.$html.hasClass(s.modal)||(t.closeAllOthers(),t.close())}))};var s,i,a,o}(jQuery),/*\t\n * jQuery mmenu scrollBugFix addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(e){var t=\"mmenu\",n=\"scrollBugFix\";e[t].addons[n]={setup:function(){var i=this,r=this.opts[n];this.conf[n];if(o=e[t].glbl,e[t].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&(\"boolean\"==typeof r&&(r={fix:r}),\"object\"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),r.fix)){var l=this.$menu.attr(\"id\"),d=!1;this.bind(\"opening\",function(){this.$pnls.children(\".\"+s.current).scrollTop(0)}),o.$docu.on(a.touchmove,function(e){i.vars.opened&&e.preventDefault()}),o.$body.on(a.touchstart,\"#\"+l+\"> .\"+s.panels+\"> .\"+s.current,function(e){i.vars.opened&&(d||(d=!0,0===e.currentTarget.scrollTop?e.currentTarget.scrollTop=1:e.currentTarget.scrollHeight===e.currentTarget.scrollTop+e.currentTarget.offsetHeight&&(e.currentTarget.scrollTop-=1),d=!1))}).on(a.touchmove,\"#\"+l+\"> .\"+s.panels+\"> .\"+s.current,function(t){i.vars.opened&&e(this)[0].scrollHeight>e(this).innerHeight()&&t.stopPropagation()}),o.$wndw.on(a.orientationchange,function(){i.$pnls.children(\".\"+s.current).scrollTop(0).css({\"-webkit-overflow-scrolling\":\"auto\"}).css({\"-webkit-overflow-scrolling\":\"touch\"})})}},add:function(){s=e[t]._c,i=e[t]._d,a=e[t]._e},clickAnchor:function(e,t){}},e[t].defaults[n]={fix:!0};var s,i,a,o}(jQuery);"],"names":["super_","FILTERLIST","filter","label","jQuery","extend","BookReader","defaultOptions","enableMobileNav","mobileNavTitle","mobileNavFullscreenOnly","prototype","setup","options","call","this","refs","$mmenu","initToolbar","mode","ui","$mmenuEl","$drawerEl","buildMobileDrawerElement","$br","append","buildInfoDiv","$","buildShareDiv","mmenu","navbars","navbar","add","title","titleLink","extensions","offCanvas","wrapPageIfNeeded","zposition","pageSelector","el","$BRpageviewField","find","data","bind","length","val","window","location","href","on","applyFilters","switchMode","constMode1up","constMode2up","constModeThumb","document","body","addClass","apply","arguments","click","getInstance","vars","opened","close","open","trigger","closeMobileMenu","e","width","addEventListener","utils","buildToolbarElement","$el","escapedTitle","util","escapeHTML","bookTitle","toolbar","prepend","experimentalHtml","enableExperimentalControls","forEach","i","checkboxHtml","concat","settingsSection","imagesBaseURL","moreInfo","share","navMenu","arg","$results","drawerEl","br","filterStr","each","removeClass","is","attr","filtersSheet","createElement","id","innerHTML","appendChild","n","a","t","addons","r","s","opts","c","conf","glbl","Array","o","d","content","l","position","h","height","Math","min","max","f","u","v","p","b","ceil","children","not","btn","hasbtns","prependTo","$menu","hasnavbar","_c","_d","_e","clickAnchor","configuration","breadcrumbSeparator","classNames","breadcrumbs","appendTo","first","panel","closest","text","unshift","parent","join","separator","html","$pnls","current","$page","next","panelNext","hidden","prev","hasClass","vertical","panelPrev","search","searchfield","addTo","panelTitle","$wndw","$docu","$html","$body","split","mm","umm","slice","version","_api","cbck","___deprecated","_initMenu","_initAnchors","_initAddons","init","___debug","uniqueId","defaults","onClick","setSelected","slidingSubmenus","divider","inset","selected","spacer","clone","openingInterval","panelNodetype","transitionDuration","nopanel","_initPanels","update","listview","openPanel","parents","subopened","highest","support","csstransitions","nextAll","setTimeout","__transitionend","closePanel","closeAllPanels","togglePanel","push","shift","__getUniqueId","contents","nodeType","remove","panels","wrapper","menu","__findAddBack","__refactorClass","nolistview","wrap","removeAttr","sub","insertBefore","fullsubopen","last","parentsUntil","end","preventDefault","__valueOrFn","target","_getOriginalMenuId","__api","__filterListItems","one","transitionend","webkitTransitionEnd","fn","touch","navigator","msMaxTouchPoints","Modernizr","documentElement","style","charAt","toUpperCase","substr","merge","pageNodetype","$allMenus","offcanvas","setPage","_initBlocker","menuInjectMethod","menuWrapperSelector","hash","blockUI","moveBackground","noPageSelector","_openSetup","_openFinish","closeAllOthers","resize","blocking","modal","background","opening","wrapAll","page","slideout","off","keydown","keyCode","css","$blck","blocker","touchstart","touchmove","stopPropagation","mousedown","fix","scrollTop","currentTarget","scrollHeight","offsetHeight","innerHeight","orientationchange"],"sourceRoot":""}
1
+ {"version":3,"file":"plugins/plugin.mobile_nav.js","mappings":"mLAmCuCA,E,+CAzBjCC,EAAa,C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AAM,GAAGsR,aAAahO,EAAEtD,MAAMwR,eAAe3L,EAAEoL,qBAAoB3K,EAAEuD,MAAM1H,GAAGyD,EAAE6L,mBAAkB,WAAWpN,EAAE0E,MAAMzB,SAAS,IAAItB,EAAEgD,SAASoI,UAAU,GAAGR,IAAI,CAAC,6BAA6B,SAASA,IAAI,CAAC,6BAA6B,eAAc3P,IAAI,WAAW+E,EAAE1C,EAAEuC,GAAGgC,GAAKvE,EAAEuC,GAAGiC,GAAGlC,EAAEtC,EAAEuC,GAAGkC,IAAIC,YAAY,SAAS1E,EAAEuC,MAAMvC,EAAEuC,GAAGkF,SAASpF,GAAG,CAACwL,KAAI,GAA1rC,CAA2sC9R,K","sources":["webpack://@internetarchive/bookreader/./src/plugins/plugin.mobile_nav.js","webpack://@internetarchive/bookreader/./node_modules/jquery.mmenu/dist/addons/navbars/jquery.mmenu.navbars.min.js","webpack://@internetarchive/bookreader/./node_modules/jquery.mmenu/dist/js/jquery.mmenu.min.js"],"sourcesContent":["/* global BookReader */\n/**\n * Adds mobile navigation at responsive breakpoint\n */\n\nimport * as utils from '../BookReader/utils.js';\nimport 'jquery.mmenu/dist/js/jquery.mmenu.min.js';\nimport 'jquery.mmenu/dist/addons/navbars/jquery.mmenu.navbars.min.js';\n\n//contains all filters and labels for checkboxs\nconst FILTERLIST = [\n {\n filter: \"grayscale(100%)\",\n label: \"Grayscale\"\n },\n {\n filter: \"brightness(120%)\",\n label: \"High brightness\"\n },\n {\n filter: \"invert(100%)\",\n label: \"Inverted (dark mode)\"\n },\n {\n filter: \"contrast(120%)\",\n label: \"High contrast\"\n },\n];\n\njQuery.extend(BookReader.defaultOptions, {\n enableMobileNav: true,\n mobileNavTitle: 'Internet Archive',\n mobileNavFullscreenOnly: false,\n});\n\nBookReader.prototype.setup = (function(super_) {\n return function (options) {\n super_.call(this, options);\n\n this.enableMobileNav = options.enableMobileNav;\n this.mobileNavTitle = options.mobileNavTitle;\n this.mobileNavFullscreenOnly = options.mobileNavFullscreenOnly;\n\n this.refs.$mmenu = null;\n };\n})(BookReader.prototype.setup);\n\n\n// Extend initToolbar\nBookReader.prototype.initToolbar = (function (super_) {\n return function (mode, ui) {\n let $mmenuEl;\n if (this.enableMobileNav) {\n const $drawerEl = this.buildMobileDrawerElement();\n this.refs.$br.append($drawerEl);\n\n // Render info into mobile info before mmenu\n this.buildInfoDiv(this.$('.BRmobileInfo'));\n this.buildShareDiv(this.$('.BRmobileShare'));\n\n $mmenuEl = $drawerEl;\n $mmenuEl.mmenu({\n navbars: [\n { \"position\": \"top\" },\n ],\n navbar: {\n add: true,\n title: this.mobileNavTitle,\n titleLink: 'panel'\n },\n extensions: [ \"panelshadow\" ],\n }, {\n offCanvas: {\n wrapPageIfNeeded: false,\n zposition: 'next',\n pageSelector: this.el,\n }\n });\n\n const $BRpageviewField = $mmenuEl.find('.BRpageviewValue');\n $mmenuEl.data('mmenu').bind('opened', () => {\n // Update \"Link to this page view\" link\n if ($BRpageviewField.length) {\n $BRpageviewField.val(window.location.href);\n }\n });\n\n //apply filters when checkboxs clicked\n $drawerEl.find('.BRcheckbox-filters')\n .on(\"click\", () => applyFilters($drawerEl, this));\n\n // Bind mobile switch buttons\n $drawerEl.find('.DrawerLayoutButton.one_page_mode')\n .on(\"click\", () => this.switchMode(this.constMode1up));\n $drawerEl.find('.DrawerLayoutButton.two_page_mode')\n .on(\"click\", () => this.switchMode(this.constMode2up));\n $drawerEl.find('.DrawerLayoutButton.thumbnail_mode')\n .on(\"click\", () => this.switchMode(this.constModeThumb));\n\n if (this.mobileNavFullscreenOnly) {\n $(document.body).addClass('BRbodyMobileNavEnabledFullscreen');\n } else {\n $(document.body).addClass('BRbodyMobileNavEnabled');\n }\n\n this.refs.$mmenu = $mmenuEl;\n\n }\n\n // Call the parent method at the end, because it binds events to DOM\n super_.apply(this, arguments);\n\n\n if (this.enableMobileNav) {\n // Need to bind more, console after toolbar is initialized\n this.$('.BRmobileHamburger').click(() => {\n if ($mmenuEl.data('mmenu').getInstance().vars.opened) {\n $mmenuEl.data('mmenu').close();\n } else {\n $mmenuEl.data('mmenu').open();\n this.trigger(\"mobileNavOpen\");\n }\n });\n\n\n const closeMobileMenu = (e) => {\n // Need to close the mobile menu to reset DOM & Style\n // driven by menu plugin\n const width = $( window ).width();\n const mobileMenuIsOpen = $mmenuEl.data('mmenu').getInstance().vars.opened;\n // $brBreakPointMobile: 800px;\n if (mobileMenuIsOpen && (width >= 800)) {\n $mmenuEl.data('mmenu').close ();\n }\n };\n\n window.addEventListener('resize', utils.debounce(closeMobileMenu, 900));\n }\n };\n})(BookReader.prototype.initToolbar);\n\n\nBookReader.prototype.buildToolbarElement = (function (super_) {\n return function () {\n const $el = super_.call(this);\n if (this.enableMobileNav) {\n const escapedTitle = BookReader.util.escapeHTML(this.bookTitle);\n const toolbar = `\n <span class=\"BRmobileHamburgerWrapper\">\n <button class=\"BRmobileHamburger\"></button>\n <span class=\"BRtoolbarMobileTitle\" title=\"${escapedTitle}\">${escapedTitle}</span>\n </span>\n `;\n $el\n .addClass('responsive')\n .prepend($(toolbar));\n }\n return $el;\n };\n})(BookReader.prototype.buildToolbarElement);\n\n/**\n * This method builds the html for the mobile drawer. It can be decorated to\n * extend the default drawer.\n * @return {jqueryElement}\n */\nBookReader.prototype.buildMobileDrawerElement = function() {\n let experimentalHtml = '';\n //builds filters checkbox html\n if (this.enableExperimentalControls) {\n experimentalHtml = `\n <p class=\"DrawerSettingsTitle\">Visual Adjustment</p>\n <div class=\"BRcheckbox-group-filters\">\n `;\n FILTERLIST.forEach( (el, i) => {\n const checkboxHtml = `\n <input type=\"checkbox\" class=\"BRcheckbox-filters\" id=\"filter${i}\">\n <label for=\"filter${i}\" class=\"BRcheckbox-label-filters\">${el.label}</label><br>\n \n `;\n experimentalHtml = experimentalHtml.concat(checkboxHtml);\n });\n experimentalHtml = experimentalHtml.concat(\"</div>\");\n }\n\n\n const settingsSection = `\n <span>\n <span class=\"DrawerIconWrapper\">\n <img class=\"DrawerIcon\" src=\"${`${this.imagesBaseURL}icon_gear.svg`}\" alt=\"settings-icon\"/>\n </span>\n Settings\n </span>\n <div class=DrawerSettingsWrapper>\n <div class=\"DrawerSettingsLayoutWrapper\">\n <button class=\"DrawerLayoutButton one_page_mode\">\n <img src=\"${this.imagesBaseURL}icon_one_page.svg\" alt=\"Single Page\"/>\n <br>\n One Page\n </button>\n <button class=\"DrawerLayoutButton two_page_mode TwoPagesButton\">\n <img src=\"${this.imagesBaseURL}icon_two_pages.svg\" alt=\"Two Pages\"/>\n <br>\n Two Pages\n </button>\n <button class=\"DrawerLayoutButton thumbnail_mode\">\n <img src=\"${this.imagesBaseURL}icon_thumbnails.svg\" alt=\"Thumbnails\"/>\n <br>\n Thumbnails\n </button>\n </div>\n <br>\n <div class=\"DrawerSettingsTitle\">Zoom</div>\n <button class='BRicon zoom_out'></button>\n <button class='BRicon zoom_in'></button>\n <br style=\"clear:both\"><br><br>\n ${experimentalHtml}\n </div>\n `;\n const moreInfo = `\n <span>\n <span class=\"DrawerIconWrapper \">\n <img class=\"DrawerIcon\" src=\"${this.imagesBaseURL}icon_info.svg\" alt=\"info-icon\"/>\n </span>\n About This Book\n </span>\n <div class=\"BRmobileInfo\"></div>\n `;\n const share = `\n <span>\n <span class=\"DrawerIconWrapper\">\n <img class=\"DrawerIcon\" src=\"${this.imagesBaseURL}icon_share.svg\" alt=\"info-share\"/>\n </span>\n Share This Book\n </span>\n <div class=\"BRmobileShare\"></div>\n `;\n const navMenu = `\n <nav id=\"BRmobileMenu\" class=\"BRmobileMenu\">\n <ul>\n <li class=\"BRmobileMenu__settings\">${settingsSection}</li>\n <li class=\"BRmobileMenu__moreInfoRow\">${moreInfo}</li>\n <li class=\"BRmobileMenu__share\">${share}</li>\n </ul>\n </nav>\n `;\n\n const $el = $(navMenu);\n return $el;\n};\n\n/**\n * Mmenu moves itself out side of the root BookReader element, so we need to\n * include it in the scoped $ function.\n */\nBookReader.prototype.$ = (function (super_) {\n return function (arg) {\n let $results = super_.call(this, arg);\n if (this.refs.$mmenu) {\n $results = $results.add(this.refs.$mmenu.find(arg));\n }\n return $results;\n };\n})(BookReader.prototype.$);\n\n/**\n* Dynamically creates styles combining different filters for BookReaders imgs\n* based on filters checkbox\n*/\nconst applyFilters = (drawerEl, br) => {\n let filterStr = \"\";\n\n $('.BRcheckbox-filters').each(\n (i, el) => {\n br.refs.$br.removeClass(\"filter-applied\");\n if ($(el).is(':checked')) {\n br.refs.$br.addClass($(el).attr(\"filter-applied\"));\n filterStr = filterStr + FILTERLIST[i].filter;\n }\n }\n );\n const filtersSheet = $(\"#filtersStyle\")[0] || document.createElement('style');\n filtersSheet.id = \"filtersStyle\";\n filtersSheet.innerHTML = `.BRpagecontainer img {\n filter: ${filterStr};\n -webkit-filter: ${filterStr};}`;\n document.body.appendChild(filtersSheet);\n};\n","/*\t\n * jQuery mmenu navbar addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\n!function(n){var a=\"mmenu\",t=\"navbars\";n[a].addons[t]={setup:function(){var r=this,s=this.opts[t],c=this.conf[t];if(i=n[a].glbl,\"undefined\"!=typeof s){s instanceof Array||(s=[s]);var o={};n.each(s,function(i){var d=s[i];\"boolean\"==typeof d&&d&&(d={}),\"object\"!=typeof d&&(d={}),\"undefined\"==typeof d.content&&(d.content=[\"prev\",\"title\"]),d.content instanceof Array||(d.content=[d.content]),d=n.extend(!0,{},r.opts.navbar,d);var l=d.position,h=d.height;\"number\"!=typeof h&&(h=1),h=Math.min(4,Math.max(1,h)),\"bottom\"!=l&&(l=\"top\"),o[l]||(o[l]=0),o[l]++;var f=n(\"<div />\").addClass(e.navbar+\" \"+e.navbar+\"-\"+l+\" \"+e.navbar+\"-\"+l+\"-\"+o[l]+\" \"+e.navbar+\"-size-\"+h);o[l]+=h-1;for(var u=0,v=0,p=d.content.length;p>v;v++){var b=n[a].addons[t][d.content[v]]||!1;b?u+=b.call(r,f,d,c):(b=d.content[v],b instanceof n||(b=n(d.content[v])),f.append(b))}u+=Math.ceil(f.children().not(\".\"+e.btn).length/h),u>1&&f.addClass(e.navbar+\"-content-\"+u),f.children(\".\"+e.btn).length&&f.addClass(e.hasbtns),f.prependTo(r.$menu)});for(var d in o)r.$menu.addClass(e.hasnavbar+\"-\"+d+\"-\"+o[d])}},add:function(){e=n[a]._c,r=n[a]._d,s=n[a]._e,e.add(\"close hasbtns\")},clickAnchor:function(n,a){}},n[a].configuration[t]={breadcrumbSeparator:\"/\"},n[a].configuration.classNames[t]={};var e,r,s,i}(jQuery),/*\t\n * jQuery mmenu navbar addon breadcrumbs content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"breadcrumbs\";n[a].addons[t][e]=function(t,e,r){var s=n[a]._c,i=n[a]._d;s.add(\"breadcrumbs separator\");var c=n('<span class=\"'+s.breadcrumbs+'\" />').appendTo(t);this.bind(\"init\",function(a){a.removeClass(s.hasnavbar).each(function(){for(var a=[],t=n(this),e=n('<span class=\"'+s.breadcrumbs+'\"></span>'),c=n(this).children().first(),o=!0;c&&c.length;){c.is(\".\"+s.panel)||(c=c.closest(\".\"+s.panel));var d=c.children(\".\"+s.navbar).children(\".\"+s.title).text();a.unshift(o?\"<span>\"+d+\"</span>\":'<a href=\"#'+c.attr(\"id\")+'\">'+d+\"</a>\"),o=!1,c=c.data(i.parent)}e.append(a.join('<span class=\"'+s.separator+'\">'+r.breadcrumbSeparator+\"</span>\")).appendTo(t.children(\".\"+s.navbar))})});var o=function(){c.html(this.$pnls.children(\".\"+s.current).children(\".\"+s.navbar).children(\".\"+s.breadcrumbs).html())};return this.bind(\"openPanel\",o),this.bind(\"init\",o),0}}(jQuery),/*\t\n * jQuery mmenu navbar addon close content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"close\";n[a].addons[t][e]=function(t,e){var r=n[a]._c,s=n[a].glbl,i=n('<a class=\"'+r.close+\" \"+r.btn+'\" href=\"#\" />').appendTo(t),c=function(n){i.attr(\"href\",\"#\"+n.attr(\"id\"))};return c.call(this,s.$page),this.bind(\"setPage\",c),-1}}(jQuery),/*\t\n * jQuery mmenu navbar addon next content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"next\";n[a].addons[t][e]=function(e,r){var s,i,c=n[a]._c,o=n('<a class=\"'+c.next+\" \"+c.btn+'\" href=\"#\" />').appendTo(e),d=function(n){n=n||this.$pnls.children(\".\"+c.current);var a=n.find(\".\"+this.conf.classNames[t].panelNext);s=a.attr(\"href\"),i=a.html(),o[s?\"attr\":\"removeAttr\"](\"href\",s),o[s||i?\"removeClass\":\"addClass\"](c.hidden),o.html(i)};return this.bind(\"openPanel\",d),this.bind(\"init\",function(){d.call(this)}),-1},n[a].configuration.classNames[t].panelNext=\"Next\"}(jQuery),/*\t\n * jQuery mmenu navbar addon prev content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"prev\";n[a].addons[t][e]=function(e,r){var s=n[a]._c,i=n('<a class=\"'+s.prev+\" \"+s.btn+'\" href=\"#\" />').appendTo(e);this.bind(\"init\",function(n){n.removeClass(s.hasnavbar).children(\".\"+s.navbar).addClass(s.hidden)});var c,o,d=function(n){if(n=n||this.$pnls.children(\".\"+s.current),!n.hasClass(s.vertical)){var a=n.find(\".\"+this.conf.classNames[t].panelPrev);a.length||(a=n.children(\".\"+s.navbar).children(\".\"+s.prev)),c=a.attr(\"href\"),o=a.html(),i[c?\"attr\":\"removeAttr\"](\"href\",c),i[c||o?\"removeClass\":\"addClass\"](s.hidden),i.html(o)}};return this.bind(\"openPanel\",d),this.bind(\"init\",function(){d.call(this)}),-1},n[a].configuration.classNames[t].panelPrev=\"Prev\"}(jQuery),/*\t\n * jQuery mmenu navbar addon searchfield content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"searchfield\";n[a].addons[t][e]=function(t,e){var r=n[a]._c,s=n('<div class=\"'+r.search+'\" />').appendTo(t);return\"object\"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=s,0}}(jQuery),/*\t\n * jQuery mmenu navbar addon title content\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(n){var a=\"mmenu\",t=\"navbars\",e=\"title\";n[a].addons[t][e]=function(e,r){var s,i,c=n[a]._c,o=n('<a class=\"'+c.title+'\" />').appendTo(e),d=function(n){if(n=n||this.$pnls.children(\".\"+c.current),!n.hasClass(c.vertical)){var a=n.find(\".\"+this.conf.classNames[t].panelTitle);a.length||(a=n.children(\".\"+c.navbar).children(\".\"+c.title)),s=a.attr(\"href\"),i=a.html()||r.title,o[s?\"attr\":\"removeAttr\"](\"href\",s),o[s||i?\"removeClass\":\"addClass\"](c.hidden),o.html(i)}};return this.bind(\"openPanel\",d),this.bind(\"init\",function(n){d.call(this)}),0},n[a].configuration.classNames[t].panelTitle=\"Title\"}(jQuery);","/*\n * jQuery mmenu v5.6.5\n * @requires jQuery 1.7.0 or later\n *\n * mmenu.frebsite.nl\n *\t\n * Copyright (c) Fred Heusschen\n * www.frebsite.nl\n *\n * License: CC-BY-NC-4.0\n * http://creativecommons.org/licenses/by-nc/4.0/\n */\n!function(e){function t(){e[n].glbl||(r={$wndw:e(window),$docu:e(document),$html:e(\"html\"),$body:e(\"body\")},i={},a={},o={},e.each([i,a,o],function(e,t){t.add=function(e){e=e.split(\" \");for(var n=0,s=e.length;s>n;n++)t[e[n]]=t.mm(e[n])}}),i.mm=function(e){return\"mm-\"+e},i.add(\"wrapper menu panels panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen\"),i.umm=function(e){return\"mm-\"==e.slice(0,3)&&(e=e.slice(3)),e},a.mm=function(e){return\"mm-\"+e},a.add(\"parent sub\"),o.mm=function(e){return e+\".mm\"},o.add(\"transitionend webkitTransitionEnd click scroll keydown mousedown mouseup touchstart touchmove touchend orientationchange\"),e[n]._c=i,e[n]._d=a,e[n]._e=o,e[n].glbl=r)}var n=\"mmenu\",s=\"5.6.4\";if(!(e[n]&&e[n].version>s)){e[n]=function(e,t,n){this.$menu=e,this._api=[\"bind\",\"init\",\"update\",\"setSelected\",\"getInstance\",\"openPanel\",\"closePanel\",\"closeAllPanels\"],this.opts=t,this.conf=n,this.vars={},this.cbck={},\"function\"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors();var s=this.$pnls.children();return this._initAddons(),this.init(s),\"function\"==typeof this.___debug&&this.___debug(),this},e[n].version=s,e[n].addons={},e[n].uniqueId=0,e[n].defaults={extensions:[],navbar:{add:!0,title:\"Menu\",titleLink:\"panel\"},onClick:{setSelected:!0},slidingSubmenus:!0},e[n].configuration={classNames:{divider:\"Divider\",inset:\"Inset\",panel:\"Panel\",selected:\"Selected\",spacer:\"Spacer\",vertical:\"Vertical\"},clone:!1,openingInterval:25,panelNodetype:\"ul, ol, div\",transitionDuration:400},e[n].prototype={init:function(e){e=e.not(\".\"+i.nopanel),e=this._initPanels(e),this.trigger(\"init\",e),this.trigger(\"update\")},update:function(){this.trigger(\"update\")},setSelected:function(e){this.$menu.find(\".\"+i.listview).children().removeClass(i.selected),e.addClass(i.selected),this.trigger(\"setSelected\",e)},openPanel:function(t){var s=t.parent(),a=this;if(s.hasClass(i.vertical)){var o=s.parents(\".\"+i.subopened);if(o.length)return void this.openPanel(o.first());s.addClass(i.opened),this.trigger(\"openPanel\",t),this.trigger(\"openingPanel\",t),this.trigger(\"openedPanel\",t)}else{if(t.hasClass(i.current))return;var r=this.$pnls.children(\".\"+i.panel),l=r.filter(\".\"+i.current);r.removeClass(i.highest).removeClass(i.current).not(t).not(l).not(\".\"+i.vertical).addClass(i.hidden),e[n].support.csstransitions||l.addClass(i.hidden),t.hasClass(i.opened)?t.nextAll(\".\"+i.opened).addClass(i.highest).removeClass(i.opened).removeClass(i.subopened):(t.addClass(i.highest),l.addClass(i.subopened)),t.removeClass(i.hidden).addClass(i.current),a.trigger(\"openPanel\",t),setTimeout(function(){t.removeClass(i.subopened).addClass(i.opened),a.trigger(\"openingPanel\",t),a.__transitionend(t,function(){a.trigger(\"openedPanel\",t)},a.conf.transitionDuration)},this.conf.openingInterval)}},closePanel:function(e){var t=e.parent();t.hasClass(i.vertical)&&(t.removeClass(i.opened),this.trigger(\"closePanel\",e),this.trigger(\"closingPanel\",e),this.trigger(\"closedPanel\",e))},closeAllPanels:function(){this.$menu.find(\".\"+i.listview).children().removeClass(i.selected).filter(\".\"+i.vertical).removeClass(i.opened);var e=this.$pnls.children(\".\"+i.panel),t=e.first();this.$pnls.children(\".\"+i.panel).not(t).removeClass(i.subopened).removeClass(i.opened).removeClass(i.current).removeClass(i.highest).addClass(i.hidden),this.openPanel(t)},togglePanel:function(e){var t=e.parent();t.hasClass(i.vertical)&&this[t.hasClass(i.opened)?\"closePanel\":\"openPanel\"](e)},getInstance:function(){return this},bind:function(e,t){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(t)},trigger:function(){var e=this,t=Array.prototype.slice.call(arguments),n=t.shift();if(this.cbck[n])for(var s=0,i=this.cbck[n].length;i>s;s++)this.cbck[n][s].apply(e,t)},_initMenu:function(){this.$menu.attr(\"id\",this.$menu.attr(\"id\")||this.__getUniqueId()),this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find(\"[id]\")).filter(\"[id]\").each(function(){e(this).attr(\"id\",i.mm(e(this).attr(\"id\")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$pnls=e('<div class=\"'+i.panels+'\" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu),this.$menu.parent().addClass(i.wrapper);var t=[i.menu];this.opts.slidingSubmenus||t.push(i.vertical),this.opts.extensions=this.opts.extensions.length?\"mm-\"+this.opts.extensions.join(\" mm-\"):\"\",this.opts.extensions&&t.push(this.opts.extensions),this.$menu.addClass(t.join(\" \"))},_initPanels:function(t){var n=this,s=this.__findAddBack(t,\"ul, ol\");this.__refactorClass(s,this.conf.classNames.inset,\"inset\").addClass(i.nolistview+\" \"+i.nopanel),s.not(\".\"+i.nolistview).addClass(i.listview);var o=this.__findAddBack(t,\".\"+i.listview).children();this.__refactorClass(o,this.conf.classNames.selected,\"selected\"),this.__refactorClass(o,this.conf.classNames.divider,\"divider\"),this.__refactorClass(o,this.conf.classNames.spacer,\"spacer\"),this.__refactorClass(this.__findAddBack(t,\".\"+this.conf.classNames.panel),this.conf.classNames.panel,\"panel\");var r=e(),l=t.add(t.find(\".\"+i.panel)).add(this.__findAddBack(t,\".\"+i.listview).children().children(this.conf.panelNodetype)).not(\".\"+i.nopanel);this.__refactorClass(l,this.conf.classNames.vertical,\"vertical\"),this.opts.slidingSubmenus||l.addClass(i.vertical),l.each(function(){var t=e(this),s=t;t.is(\"ul, ol\")?(t.wrap('<div class=\"'+i.panel+'\" />'),s=t.parent()):s.addClass(i.panel);var a=t.attr(\"id\");t.removeAttr(\"id\"),s.attr(\"id\",a||n.__getUniqueId()),t.hasClass(i.vertical)&&(t.removeClass(n.conf.classNames.vertical),s.add(s.parent()).addClass(i.vertical)),r=r.add(s)});var d=e(\".\"+i.panel,this.$menu);r.each(function(t){var s,o,r=e(this),l=r.parent(),d=l.children(\"a, span\").first();if(l.is(\".\"+i.panels)||(l.data(a.sub,r),r.data(a.parent,l)),l.children(\".\"+i.next).length||l.parent().is(\".\"+i.listview)&&(s=r.attr(\"id\"),o=e('<a class=\"'+i.next+'\" href=\"#'+s+'\" data-target=\"#'+s+'\" />').insertBefore(d),d.is(\"span\")&&o.addClass(i.fullsubopen)),!r.children(\".\"+i.navbar).length&&!l.hasClass(i.vertical)){l.parent().is(\".\"+i.listview)?l=l.closest(\".\"+i.panel):(d=l.closest(\".\"+i.panel).find('a[href=\"#'+r.attr(\"id\")+'\"]').first(),l=d.closest(\".\"+i.panel));var c=!1,p=e('<div class=\"'+i.navbar+'\" />');if(n.opts.navbar.add&&r.addClass(i.hasnavbar),l.length){switch(s=l.attr(\"id\"),n.opts.navbar.titleLink){case\"anchor\":c=d.attr(\"href\");break;case\"panel\":case\"parent\":c=\"#\"+s;break;default:c=!1}p.append('<a class=\"'+i.btn+\" \"+i.prev+'\" href=\"#'+s+'\" data-target=\"#'+s+'\" />').append(e('<a class=\"'+i.title+'\"'+(c?' href=\"'+c+'\"':\"\")+\" />\").text(d.text())).prependTo(r)}else n.opts.navbar.title&&p.append('<a class=\"'+i.title+'\">'+n.opts.navbar.title+\"</a>\").prependTo(r)}});var c=this.__findAddBack(t,\".\"+i.listview).children(\".\"+i.selected).removeClass(i.selected).last().addClass(i.selected);c.add(c.parentsUntil(\".\"+i.menu,\"li\")).filter(\".\"+i.vertical).addClass(i.opened).end().each(function(){e(this).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).addClass(i.subopened)}),c.children(\".\"+i.panel).not(\".\"+i.vertical).addClass(i.opened).parentsUntil(\".\"+i.menu,\".\"+i.panel).not(\".\"+i.vertical).first().addClass(i.opened).addClass(i.subopened);var p=d.filter(\".\"+i.opened);return p.length||(p=r.first()),p.addClass(i.opened).last().addClass(i.current),r.not(\".\"+i.vertical).not(p.last()).addClass(i.hidden).end().filter(function(){return!e(this).parent().hasClass(i.panels)}).appendTo(this.$pnls),r},_initAnchors:function(){var t=this;r.$body.on(o.click+\"-oncanvas\",\"a[href]\",function(s){var a=e(this),o=!1,r=t.$menu.find(a).length;for(var l in e[n].addons)if(e[n].addons[l].clickAnchor.call(t,a,r)){o=!0;break}var d=a.attr(\"href\");if(!o&&r&&d.length>1&&\"#\"==d.slice(0,1))try{var c=e(d,t.$menu);c.is(\".\"+i.panel)&&(o=!0,t[a.parent().hasClass(i.vertical)?\"togglePanel\":\"openPanel\"](c))}catch(p){}if(o&&s.preventDefault(),!o&&r&&a.is(\".\"+i.listview+\" > li > a\")&&!a.is('[rel=\"external\"]')&&!a.is('[target=\"_blank\"]')){t.__valueOrFn(t.opts.onClick.setSelected,a)&&t.setSelected(e(s.target).parent());var h=t.__valueOrFn(t.opts.onClick.preventDefault,a,\"#\"==d.slice(0,1));h&&s.preventDefault(),t.__valueOrFn(t.opts.onClick.close,a,h)&&t.close()}})},_initAddons:function(){var t;for(t in e[n].addons)e[n].addons[t].add.call(this),e[n].addons[t].add=function(){};for(t in e[n].addons)e[n].addons[t].setup.call(this)},_getOriginalMenuId:function(){var e=this.$menu.attr(\"id\");return e&&e.length&&this.conf.clone&&(e=i.umm(e)),e},__api:function(){var t=this,n={};return e.each(this._api,function(e){var s=this;n[s]=function(){var e=t[s].apply(t,arguments);return\"undefined\"==typeof e?n:e}}),n},__valueOrFn:function(e,t,n){return\"function\"==typeof e?e.call(t[0]):\"undefined\"==typeof e&&\"undefined\"!=typeof n?n:e},__refactorClass:function(e,t,n){return e.filter(\".\"+t).removeClass(t).addClass(i[n])},__findAddBack:function(e,t){return e.find(t).add(e.filter(t))},__filterListItems:function(e){return e.not(\".\"+i.divider).not(\".\"+i.hidden)},__transitionend:function(e,t,n){var s=!1,i=function(){s||t.call(e[0]),s=!0};e.one(o.transitionend,i),e.one(o.webkitTransitionEnd,i),setTimeout(i,1.1*n)},__getUniqueId:function(){return i.mm(e[n].uniqueId++)}},e.fn[n]=function(s,i){return t(),s=e.extend(!0,{},e[n].defaults,s),i=e.extend(!0,{},e[n].configuration,i),this.each(function(){var t=e(this);if(!t.data(n)){var a=new e[n](t,s,i);a.$menu.data(n,a.__api())}})},e[n].support={touch:\"ontouchstart\"in window||navigator.msMaxTouchPoints||!1,csstransitions:function(){if(\"undefined\"!=typeof Modernizr&&\"undefined\"!=typeof Modernizr.csstransitions)return Modernizr.csstransitions;var e=document.body||document.documentElement,t=e.style,n=\"transition\";if(\"string\"==typeof t[n])return!0;var s=[\"Moz\",\"webkit\",\"Webkit\",\"Khtml\",\"O\",\"ms\"];n=n.charAt(0).toUpperCase()+n.substr(1);for(var i=0;i<s.length;i++)if(\"string\"==typeof t[s[i]+n])return!0;return!1}()};var i,a,o,r}}(jQuery),/*\t\n * jQuery mmenu offCanvas addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(e){var t=\"mmenu\",n=\"offCanvas\";e[t].addons[n]={setup:function(){if(this.opts[n]){var i=this.opts[n],a=this.conf[n];o=e[t].glbl,this._api=e.merge(this._api,[\"open\",\"close\",\"setPage\"]),(\"top\"==i.position||\"bottom\"==i.position)&&(i.zposition=\"front\"),\"string\"!=typeof a.pageSelector&&(a.pageSelector=\"> \"+a.pageNodetype),o.$allMenus=(o.$allMenus||e()).add(this.$menu),this.vars.opened=!1;var r=[s.offcanvas];\"left\"!=i.position&&r.push(s.mm(i.position)),\"back\"!=i.zposition&&r.push(s.mm(i.zposition)),this.$menu.addClass(r.join(\" \")).parent().removeClass(s.wrapper),this.setPage(o.$page),this._initBlocker(),this[\"_initWindow_\"+n](),this.$menu[a.menuInjectMethod+\"To\"](a.menuWrapperSelector);var l=window.location.hash;if(l){var d=this._getOriginalMenuId();d&&d==l.slice(1)&&this.open()}}},add:function(){s=e[t]._c,i=e[t]._d,a=e[t]._e,s.add(\"offcanvas slideout blocking modal background opening blocker page\"),i.add(\"style\"),a.add(\"resize\")},clickAnchor:function(e,t){if(!this.opts[n])return!1;var s=this._getOriginalMenuId();if(s&&e.is('[href=\"#'+s+'\"]'))return this.open(),!0;if(o.$page)return s=o.$page.first().attr(\"id\"),s&&e.is('[href=\"#'+s+'\"]')?(this.close(),!0):!1}},e[t].defaults[n]={position:\"left\",zposition:\"back\",blockUI:!0,moveBackground:!0},e[t].configuration[n]={pageNodetype:\"div\",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuWrapperSelector:\"body\",menuInjectMethod:\"prepend\"},e[t].prototype.open=function(){if(!this.vars.opened){var e=this;this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),this.trigger(\"open\")}},e[t].prototype._openSetup=function(){var t=this,r=this.opts[n];this.closeAllOthers(),o.$page.each(function(){e(this).data(i.style,e(this).attr(\"style\")||\"\")}),o.$wndw.trigger(a.resize+\"-\"+n,[!0]);var l=[s.opened];r.blockUI&&l.push(s.blocking),\"modal\"==r.blockUI&&l.push(s.modal),r.moveBackground&&l.push(s.background),\"left\"!=r.position&&l.push(s.mm(this.opts[n].position)),\"back\"!=r.zposition&&l.push(s.mm(this.opts[n].zposition)),this.opts.extensions&&l.push(this.opts.extensions),o.$html.addClass(l.join(\" \")),setTimeout(function(){t.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(s.current+\" \"+s.opened)},e[t].prototype._openFinish=function(){var e=this;this.__transitionend(o.$page.first(),function(){e.trigger(\"opened\")},this.conf.transitionDuration),o.$html.addClass(s.opening),this.trigger(\"opening\")},e[t].prototype.close=function(){if(this.vars.opened){var t=this;this.__transitionend(o.$page.first(),function(){t.$menu.removeClass(s.current).removeClass(s.opened),o.$html.removeClass(s.opened).removeClass(s.blocking).removeClass(s.modal).removeClass(s.background).removeClass(s.mm(t.opts[n].position)).removeClass(s.mm(t.opts[n].zposition)),t.opts.extensions&&o.$html.removeClass(t.opts.extensions),o.$page.each(function(){e(this).attr(\"style\",e(this).data(i.style))}),t.vars.opened=!1,t.trigger(\"closed\")},this.conf.transitionDuration),o.$html.removeClass(s.opening),this.trigger(\"close\"),this.trigger(\"closing\")}},e[t].prototype.closeAllOthers=function(){o.$allMenus.not(this.$menu).each(function(){var n=e(this).data(t);n&&n.close&&n.close()})},e[t].prototype.setPage=function(t){var i=this,a=this.conf[n];t&&t.length||(t=o.$body.find(a.pageSelector),a.noPageSelector.length&&(t=t.not(a.noPageSelector.join(\", \"))),t.length>1&&a.wrapPageIfNeeded&&(t=t.wrapAll(\"<\"+this.conf[n].pageNodetype+\" />\").parent())),t.each(function(){e(this).attr(\"id\",e(this).attr(\"id\")||i.__getUniqueId())}),t.addClass(s.page+\" \"+s.slideout),o.$page=t,this.trigger(\"setPage\",t)},e[t].prototype[\"_initWindow_\"+n]=function(){o.$wndw.off(a.keydown+\"-\"+n).on(a.keydown+\"-\"+n,function(e){return o.$html.hasClass(s.opened)&&9==e.keyCode?(e.preventDefault(),!1):void 0});var e=0;o.$wndw.off(a.resize+\"-\"+n).on(a.resize+\"-\"+n,function(t,n){if(1==o.$page.length&&(n||o.$html.hasClass(s.opened))){var i=o.$wndw.height();(n||i!=e)&&(e=i,o.$page.css(\"minHeight\",i))}})},e[t].prototype._initBlocker=function(){var t=this;this.opts[n].blockUI&&(o.$blck||(o.$blck=e('<div id=\"'+s.blocker+'\" class=\"'+s.slideout+'\" />')),o.$blck.appendTo(o.$body).off(a.touchstart+\"-\"+n+\" \"+a.touchmove+\"-\"+n).on(a.touchstart+\"-\"+n+\" \"+a.touchmove+\"-\"+n,function(e){e.preventDefault(),e.stopPropagation(),o.$blck.trigger(a.mousedown+\"-\"+n)}).off(a.mousedown+\"-\"+n).on(a.mousedown+\"-\"+n,function(e){e.preventDefault(),o.$html.hasClass(s.modal)||(t.closeAllOthers(),t.close())}))};var s,i,a,o}(jQuery),/*\t\n * jQuery mmenu scrollBugFix addon\n * mmenu.frebsite.nl\n *\n * Copyright (c) Fred Heusschen\n */\nfunction(e){var t=\"mmenu\",n=\"scrollBugFix\";e[t].addons[n]={setup:function(){var i=this,r=this.opts[n];this.conf[n];if(o=e[t].glbl,e[t].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&(\"boolean\"==typeof r&&(r={fix:r}),\"object\"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),r.fix)){var l=this.$menu.attr(\"id\"),d=!1;this.bind(\"opening\",function(){this.$pnls.children(\".\"+s.current).scrollTop(0)}),o.$docu.on(a.touchmove,function(e){i.vars.opened&&e.preventDefault()}),o.$body.on(a.touchstart,\"#\"+l+\"> .\"+s.panels+\"> .\"+s.current,function(e){i.vars.opened&&(d||(d=!0,0===e.currentTarget.scrollTop?e.currentTarget.scrollTop=1:e.currentTarget.scrollHeight===e.currentTarget.scrollTop+e.currentTarget.offsetHeight&&(e.currentTarget.scrollTop-=1),d=!1))}).on(a.touchmove,\"#\"+l+\"> .\"+s.panels+\"> .\"+s.current,function(t){i.vars.opened&&e(this)[0].scrollHeight>e(this).innerHeight()&&t.stopPropagation()}),o.$wndw.on(a.orientationchange,function(){i.$pnls.children(\".\"+s.current).scrollTop(0).css({\"-webkit-overflow-scrolling\":\"auto\"}).css({\"-webkit-overflow-scrolling\":\"touch\"})})}},add:function(){s=e[t]._c,i=e[t]._d,a=e[t]._e},clickAnchor:function(e,t){}},e[t].defaults[n]={fix:!0};var s,i,a,o}(jQuery);"],"names":["super_","FILTERLIST","filter","label","jQuery","extend","BookReader","defaultOptions","enableMobileNav","mobileNavTitle","mobileNavFullscreenOnly","prototype","setup","options","call","this","refs","$mmenu","initToolbar","mode","ui","$mmenuEl","$drawerEl","buildMobileDrawerElement","$br","append","buildInfoDiv","$","buildShareDiv","mmenu","navbars","navbar","add","title","titleLink","extensions","offCanvas","wrapPageIfNeeded","zposition","pageSelector","el","$BRpageviewField","find","data","bind","length","val","window","location","href","on","applyFilters","switchMode","constMode1up","constMode2up","constModeThumb","document","body","addClass","apply","arguments","click","getInstance","vars","opened","close","open","trigger","closeMobileMenu","e","width","addEventListener","utils","buildToolbarElement","$el","escapedTitle","util","escapeHTML","bookTitle","toolbar","prepend","experimentalHtml","enableExperimentalControls","forEach","i","checkboxHtml","concat","settingsSection","imagesBaseURL","moreInfo","share","navMenu","arg","$results","drawerEl","br","filterStr","each","removeClass","is","attr","filtersSheet","createElement","id","innerHTML","appendChild","n","a","t","addons","r","s","opts","c","conf","glbl","Array","o","d","content","l","position","h","height","Math","min","max","f","u","v","p","b","ceil","children","not","btn","hasbtns","prependTo","$menu","hasnavbar","_c","_d","_e","clickAnchor","configuration","breadcrumbSeparator","classNames","breadcrumbs","appendTo","first","panel","closest","text","unshift","parent","join","separator","html","$pnls","current","$page","next","panelNext","hidden","prev","hasClass","vertical","panelPrev","search","searchfield","addTo","panelTitle","$wndw","$docu","$html","$body","split","mm","umm","slice","version","_api","cbck","___deprecated","_initMenu","_initAnchors","_initAddons","init","___debug","uniqueId","defaults","onClick","setSelected","slidingSubmenus","divider","inset","selected","spacer","clone","openingInterval","panelNodetype","transitionDuration","nopanel","_initPanels","update","listview","openPanel","parents","subopened","highest","support","csstransitions","nextAll","setTimeout","__transitionend","closePanel","closeAllPanels","togglePanel","push","shift","__getUniqueId","contents","nodeType","remove","panels","wrapper","menu","__findAddBack","__refactorClass","nolistview","wrap","removeAttr","sub","insertBefore","fullsubopen","last","parentsUntil","end","preventDefault","__valueOrFn","target","_getOriginalMenuId","__api","__filterListItems","one","transitionend","webkitTransitionEnd","fn","touch","navigator","msMaxTouchPoints","Modernizr","documentElement","style","charAt","toUpperCase","substr","merge","pageNodetype","$allMenus","offcanvas","setPage","_initBlocker","menuInjectMethod","menuWrapperSelector","hash","blockUI","moveBackground","noPageSelector","_openSetup","_openFinish","closeAllOthers","resize","blocking","modal","background","opening","wrapAll","page","slideout","off","keydown","keyCode","css","$blck","blocker","touchstart","touchmove","stopPropagation","mousedown","fix","scrollTop","currentTarget","scrollHeight","offsetHeight","innerHeight","orientationchange"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[951],{5842:function(e,o,n){var t={};function r(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null}function a(e,o,n,t,r,a){return document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(o)+(n?"; expires=".concat(n.toUTCString()):"")+(r?"; domain=".concat(r):"")+(t?"; path=".concat(t):"")+(a?"; secure":""),!0}function u(e,o,n){return!!hasItem(e)&&(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain=".concat(n):"")+(o?"; path=".concat(o):""),!0)}n.r(t),n.d(t,{getItem:function(){return r},removeItem:function(){return u},setItem:function(){return a}}),n(4916),n(4723),n(5306),n(4603),n(9714);var i,c=n(3609);BookReader.docCookies=t,c.extend(BookReader.defaultOptions,{enablePageResume:!0,resumeCookiePath:null}),BookReader.prototype.init=(i=BookReader.prototype.init,function(){var e=this;i.call(this),this.options.enablePageResume&&this.bind(BookReader.eventNames.fragmentChange,(function(){var o=e.paramsFromCurrent();e.updateResumeValue(o.index)}))}),BookReader.prototype.getResumeValue=function(){var e=BookReader.docCookies.getItem("br-resume");return null!==e?parseInt(e):null},BookReader.prototype.getCookiePath=function(e){return e.match(".+?(?=/page/|/mode/|$)")[0]},BookReader.prototype.updateResumeValue=function(e,o){var n=new Date(+new Date+12096e5),t=this.options.resumeCookiePath||this.getCookiePath(window.location.pathname);BookReader.docCookies.setItem(o||"br-resume",e,n,t,null,!1)}},4723:function(e,o,n){var t=n(7007),r=n(9670),a=n(7466),u=n(1340),i=n(4488),c=n(1530),s=n(7651);t("match",(function(e,o,n){return[function(o){var n=i(this),t=null==o?void 0:o[e];return void 0!==t?t.call(o,n):new RegExp(o)[e](u(n))},function(e){var t=r(this),i=u(e),d=n(o,t,i);if(d.done)return d.value;if(!t.global)return s(t,i);var l=t.unicode;t.lastIndex=0;for(var p,m=[],k=0;null!==(p=s(t,i));){var h=u(p[0]);m[k]=h,""===h&&(t.lastIndex=c(i,a(t.lastIndex),l)),k++}return 0===k?null:m}]}))}},function(e){e(e.s=5842)}]);
1
+ "use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[951],{5842:function(e,o,n){var t={};function r(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null}function a(e,o,n,t,r,a){return document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(o)+(n?"; expires=".concat(n.toUTCString()):"")+(r?"; domain=".concat(r):"")+(t?"; path=".concat(t):"")+(a?"; secure":""),!0}function u(e,o,n){return!!hasItem(e)&&(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain=".concat(n):"")+(o?"; path=".concat(o):""),!0)}n.r(t),n.d(t,{getItem:function(){return r},removeItem:function(){return u},setItem:function(){return a}}),n(1058),n(4916),n(4723),n(5306),n(4603),n(9714);var i,c=n(3609);BookReader.docCookies=t,c.extend(BookReader.defaultOptions,{enablePageResume:!0,resumeCookiePath:null}),BookReader.prototype.init=(i=BookReader.prototype.init,function(){var e=this;i.call(this),this.options.enablePageResume&&this.bind(BookReader.eventNames.fragmentChange,(function(){var o=e.paramsFromCurrent();e.updateResumeValue(o.index)}))}),BookReader.prototype.getResumeValue=function(){var e=BookReader.docCookies.getItem("br-resume");return null!==e?parseInt(e):null},BookReader.prototype.getCookiePath=function(e){return e.match(".+?(?=/page/|/mode/|$)")[0]},BookReader.prototype.updateResumeValue=function(e,o){var n=new Date(+new Date+12096e5),t=this.options.resumeCookiePath||this.getCookiePath(window.location.pathname);BookReader.docCookies.setItem(o||"br-resume",e,n,t,null,!1)}},4723:function(e,o,n){var t=n(7007),r=n(9670),a=n(7466),u=n(1340),i=n(4488),c=n(1530),s=n(7651);t("match",(function(e,o,n){return[function(o){var n=i(this),t=null==o?void 0:o[e];return void 0!==t?t.call(o,n):new RegExp(o)[e](u(n))},function(e){var t=r(this),i=u(e),d=n(o,t,i);if(d.done)return d.value;if(!t.global)return s(t,i);var l=t.unicode;t.lastIndex=0;for(var p,m=[],k=0;null!==(p=s(t,i));){var h=u(p[0]);m[k]=h,""===h&&(t.lastIndex=c(i,a(t.lastIndex),l)),k++}return 0===k?null:m}]}))}},function(e){e(e.s=5842)}]);
2
2
  //# sourceMappingURL=plugin.resume.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugins/plugin.resume.js","mappings":"wJAkBO,SAASA,EAAQC,GACtB,OAAKA,GAEEC,mBAELC,SAASC,OAAOC,QAAQ,IAAIC,OAAO,mBAAqBC,mBAAmBN,GAAMI,QAAQ,cAAe,QAAU,+BAAgC,QAJlI,KAmBb,SAASG,EAAQP,EAAMQ,EAAQC,EAAMC,EAAOC,EAASC,GAO1D,OANAV,SAASC,OAASG,mBAAmBN,GAAQ,IAAMM,mBAAmBE,IACnEC,EAAO,aAAH,OAAgBA,EAAKI,eAAkB,KAC3CF,EAAU,YAAH,OAAeA,GAAY,KAClCD,EAAQ,UAAH,OAAaA,GAAU,KAC5BE,EAAU,WAAa,KAEnB,EAYF,SAASE,EAAWd,EAAMU,EAAOC,GAEtC,QAAKI,QAAQf,KAEbE,SAASC,OAASG,mBAAmBN,GAAnB,4CACfW,EAAU,YAAH,OAAeA,GAAY,KAClCD,EAAQ,UAAH,OAAaA,GAAU,KAExB,G,sJChD6BM,E,UAZtCC,WAAWC,WAAaA,EAKxBC,EAAOC,OAAOH,WAAWI,eAAgB,CACvCC,kBAAkB,EAElBC,iBAAkB,OAIpBN,WAAWO,UAAUC,MAAiBT,EAUnCC,WAAWO,UAAUC,KATf,WAAW,WAChBT,EAAOU,KAAKC,MACRA,KAAKC,QAAQN,kBACfK,KAAKE,KAAKZ,WAAWa,WAAWC,gBAAgB,WAC9C,IAAMC,EAAS,EAAKC,oBACpB,EAAKC,kBAAkBF,EAAOG,YAYtClB,WAAWO,UAAUY,eAAiB,WACpC,IAAMC,EAAMpB,WAAWC,WAAWnB,QAAQ,aAC1C,OAAY,OAARsC,EAAqBC,SAASD,GACtB,MAWdpB,WAAWO,UAAUe,cAAgB,SAAS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ookreader/./src/plugins/plugin.resume.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.string.match.js"],"sourcesContent":["/**\n * Helper module use to get, set and remove item from cookie\n *\n * See more:\n * https://developer.mozilla.org/en-US/docs/Web/API/document.cookie\n * https://developer.mozilla.org/User:fusionchess\n * https://github.com/madmurphy/cookies.js\n * This framework is released under the GNU Public License, version 3 or later.\n * http://www.gnu.org/licenses/gpl-3.0-standalone.html\n */\n\n/**\n * Get specific key's value stored in cookie\n *\n * @param {string} sKey\n *\n * @returns {string|null}\n */\nexport function getItem(sKey) {\n if (!sKey) return null;\n\n return decodeURIComponent(\n // eslint-disable-next-line no-useless-escape\n document.cookie.replace(new RegExp('(?:(?:^|.*;)\\\\s*' + encodeURIComponent(sKey).replace(/[\\-\\.\\+\\*]/g, '\\\\$&') + '\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$'), '$1')) || null;\n}\n\n/**\n * Set specific key's value in cookie\n *\n * @param {string} sKey cookie name\n * @param {string} sValue cookie value\n * @param {string} [vEnd] expire|max-age\n * @param {string} [sPath] path of current item\n * @param {string} [sDomain] domain name\n * @param {boolean} [bSecure]\n *\n * @returns {true}\n */\nexport function setItem(sKey, sValue, vEnd, sPath, sDomain, bSecure) {\n document.cookie = encodeURIComponent(sKey) + '=' + encodeURIComponent(sValue)\n + (vEnd ? `; expires=${vEnd.toUTCString()}` : '')\n + (sDomain ? `; domain=${sDomain}` : '')\n + (sPath ? `; path=${sPath}` : '')\n + (bSecure ? `; secure` : '');\n\n return true;\n}\n\n/**\n * BROKEN Remove specific key's value from cookie\n * @fixme hasItem isn't even implemented! This will always error.\n * @param {string} sKey cookie name\n * @param {string} [sPath] path of current item\n * @param {string} [sDomain]\n *\n * @returns {boolean}\n */\nexport function removeItem(sKey, sPath, sDomain) {\n // eslint-disable-next-line\n if (!hasItem(sKey)) return false;\n\n document.cookie = encodeURIComponent(sKey) + `=; expires=Thu, 01 Jan 1970 00:00:00 GMT`\n + (sDomain ? `; domain=${sDomain}` : '')\n + (sPath ? `; path=${sPath}` : '');\n\n return true;\n}\n","import * as docCookies from '../util/docCookies.js';\n\n/* global BookReader */\n\n/** @deprecated Exposed for backward compatibility */\nBookReader.docCookies = docCookies;\n\n/**\n * Plugin to remember the current page number in a cookie\n */\njQuery.extend(BookReader.defaultOptions, {\n enablePageResume: true,\n /** @type {string|null} eg '/', '/details/id' */\n resumeCookiePath: null,\n});\n\n/** @override */\nBookReader.prototype.init = (function(super_) {\n return function() {\n super_.call(this);\n if (this.options.enablePageResume) {\n this.bind(BookReader.eventNames.fragmentChange, () => {\n const params = this.paramsFromCurrent();\n this.updateResumeValue(params.index);\n });\n }\n };\n})(BookReader.prototype.init);\n\n/**\n * Gets page resume value, for remembering reader's page\n * Can be overridden for different implementation\n *\n * @return {number|null}\n */\nBookReader.prototype.getResumeValue = function() {\n const val = BookReader.docCookies.getItem('br-resume');\n if (val !== null) return parseInt(val);\n else return null;\n};\n\n/**\n * Return cookie path using pathname up to /page/... or /mode/...\n * using window.location.pathname for urlPathPart:\n * - matches encoding\n * - ignores querystring part\n * - ignores fragment part (after #)\n * @param {string} urlPathPart - window.location.pathname\n */\nBookReader.prototype.getCookiePath = function(urlPathPart) {\n return urlPathPart.match('.+?(?=/page/|/mode/|$)')[0];\n};\n\n/**\n * Sets page resume value, for remembering reader's page\n * Can be overridden for different implementation\n *\n * @param {Number} index leaf index\n * @param {string} [cookieName]\n */\nBookReader.prototype.updateResumeValue = function(index, cookieName) {\n const ttl = new Date(+new Date + 12096e5); // 2 weeks\n // For multiple files in item, leave resumeCookiePath blank\n // It's likely we can remove resumeCookiePath using getCookiePath()\n const path = this.options.resumeCookiePath\n || this.getCookiePath(window.location.pathname);\n BookReader.docCookies.setItem(cookieName || 'br-resume', index, ttl, path, null, false);\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n"],"names":["getItem","sKey","decodeURIComponent","document","cookie","replace","RegExp","encodeURIComponent","setItem","sValue","vEnd","sPath","sDomain","bSecure","toUTCString","removeItem","hasItem","super_","BookReader","docCookies","jQuery","extend","defaultOptions","enablePageResume","resumeCookiePath","prototype","init","call","this","options","bind","eventNames","fragmentChange","params","paramsFromCurrent","updateResumeValue","index","getResumeValue","val","parseInt","getCookiePath","urlPathPart","match","cookieName","ttl","Date","path","window","location","pathname","fixRegExpWellKnownSymbolLogic","anObject","toLength","toString","requireObjectCoercible","advanceStringIndex","regExpExec","MATCH","nativeMatch","maybeCallNative","regexp","O","matcher","undefined","string","rx","S","res","done","value","global","fullUnicode","unicode","lastIndex","result","A","n","matchStr"],"sourceRoot":""}
1
+ {"version":3,"file":"plugins/plug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,SAASC,UACxC/B,WAAWC,WAAWX,QAAQmC,GAAc,YAAaP,EAAOQ,EAAKE,EAAM,MAAM,K,qBCjEnF,IAAII,EAAgC,EAAQ,MACxCC,EAAW,EAAQ,MACnBC,EAAW,EAAQ,MACnBC,EAAW,EAAQ,MACnBC,EAAyB,EAAQ,MACjCC,EAAqB,EAAQ,MAC7BC,EAAa,EAAQ,MAGzBN,EAA8B,SAAS,SAAUO,EAAOC,EAAaC,GACnE,MAAO,CAGL,SAAeC,GACb,IAAIC,EAAIP,EAAuB1B,MAC3BkC,EAAoBC,MAAVH,OAAsBG,EAAYH,EAAOH,GACvD,YAAmBM,IAAZD,EAAwBA,EAAQnC,KAAKiC,EAAQC,GAAK,IAAIvD,OAAOsD,GAAQH,GAAOJ,EAASQ,KAI9F,SAAUG,GACR,IAAIC,EAAKd,EAASvB,MACdsC,EAAIb,EAASW,GACbG,EAAMR,EAAgBD,EAAaO,EAAIC,GAE3C,GAAIC,EAAIC,KAAM,OAAOD,EAAIE,MAEzB,IAAKJ,EAAGK,OAAQ,OAAOd,EAAWS,EAAIC,GAEtC,IAAIK,EAAcN,EAAGO,QACrBP,EAAGQ,UAAY,EAIf,IAHA,IAEIC,EAFAC,EAAI,GACJC,EAAI,EAEgC,QAAhCF,EAASlB,EAAWS,EAAIC,KAAc,CAC5C,IAAIW,EAAWxB,EAASqB,EAAO,IAC/BC,EAAEC,GAAKC,EACU,KAAbA,IAAiBZ,EAAGQ,UAAYlB,EAAmBW,EAAGd,EAASa,EAAGQ,WAAYF,IAClFK,IAEF,OAAa,IAANA,EAAU,KAAOD,S","sources":["webpack://@internetarchive/bookreader/./src/util/docCookies.js","webpack://@internetarchive/bookreader/./src/plugins/plugin.resume.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.string.match.js"],"sourcesContent":["/**\n * Helper module use to get, set and remove item from cookie\n *\n * See more:\n * https://developer.mozilla.org/en-US/docs/Web/API/document.cookie\n * https://developer.mozilla.org/User:fusionchess\n * https://github.com/madmurphy/cookies.js\n * This framework is released under the GNU Public License, version 3 or later.\n * http://www.gnu.org/licenses/gpl-3.0-standalone.html\n */\n\n/**\n * Get specific key's value stored in cookie\n *\n * @param {string} sKey\n *\n * @returns {string|null}\n */\nexport function getItem(sKey) {\n if (!sKey) return null;\n\n return decodeURIComponent(\n // eslint-disable-next-line no-useless-escape\n document.cookie.replace(new RegExp('(?:(?:^|.*;)\\\\s*' + encodeURIComponent(sKey).replace(/[\\-\\.\\+\\*]/g, '\\\\$&') + '\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$'), '$1')) || null;\n}\n\n/**\n * Set specific key's value in cookie\n *\n * @param {string} sKey cookie name\n * @param {string} sValue cookie value\n * @param {string} [vEnd] expire|max-age\n * @param {string} [sPath] path of current item\n * @param {string} [sDomain] domain name\n * @param {boolean} [bSecure]\n *\n * @returns {true}\n */\nexport function setItem(sKey, sValue, vEnd, sPath, sDomain, bSecure) {\n document.cookie = encodeURIComponent(sKey) + '=' + encodeURIComponent(sValue)\n + (vEnd ? `; expires=${vEnd.toUTCString()}` : '')\n + (sDomain ? `; domain=${sDomain}` : '')\n + (sPath ? `; path=${sPath}` : '')\n + (bSecure ? `; secure` : '');\n\n return true;\n}\n\n/**\n * BROKEN Remove specific key's value from cookie\n * @fixme hasItem isn't even implemented! This will always error.\n * @param {string} sKey cookie name\n * @param {string} [sPath] path of current item\n * @param {string} [sDomain]\n *\n * @returns {boolean}\n */\nexport function removeItem(sKey, sPath, sDomain) {\n // eslint-disable-next-line\n if (!hasItem(sKey)) return false;\n\n document.cookie = encodeURIComponent(sKey) + `=; expires=Thu, 01 Jan 1970 00:00:00 GMT`\n + (sDomain ? `; domain=${sDomain}` : '')\n + (sPath ? `; path=${sPath}` : '');\n\n return true;\n}\n","import * as docCookies from '../util/docCookies.js';\n\n/* global BookReader */\n\n/** @deprecated Exposed for backward compatibility */\nBookReader.docCookies = docCookies;\n\n/**\n * Plugin to remember the current page number in a cookie\n */\njQuery.extend(BookReader.defaultOptions, {\n enablePageResume: true,\n /** @type {string|null} eg '/', '/details/id' */\n resumeCookiePath: null,\n});\n\n/** @override */\nBookReader.prototype.init = (function(super_) {\n return function() {\n super_.call(this);\n if (this.options.enablePageResume) {\n this.bind(BookReader.eventNames.fragmentChange, () => {\n const params = this.paramsFromCurrent();\n this.updateResumeValue(params.index);\n });\n }\n };\n})(BookReader.prototype.init);\n\n/**\n * Gets page resume value, for remembering reader's page\n * Can be overridden for different implementation\n *\n * @return {number|null}\n */\nBookReader.prototype.getResumeValue = function() {\n const val = BookReader.docCookies.getItem('br-resume');\n if (val !== null) return parseInt(val);\n else return null;\n};\n\n/**\n * Return cookie path using pathname up to /page/... or /mode/...\n * using window.location.pathname for urlPathPart:\n * - matches encoding\n * - ignores querystring part\n * - ignores fragment part (after #)\n * @param {string} urlPathPart - window.location.pathname\n */\nBookReader.prototype.getCookiePath = function(urlPathPart) {\n return urlPathPart.match('.+?(?=/page/|/mode/|$)')[0];\n};\n\n/**\n * Sets page resume value, for remembering reader's page\n * Can be overridden for different implementation\n *\n * @param {Number} index leaf index\n * @param {string} [cookieName]\n */\nBookReader.prototype.updateResumeValue = function(index, cookieName) {\n const ttl = new Date(+new Date + 12096e5); // 2 weeks\n // For multiple files in item, leave resumeCookiePath blank\n // It's likely we can remove resumeCookiePath using getCookiePath()\n const path = this.options.resumeCookiePath\n || this.getCookiePath(window.location.pathname);\n BookReader.docCookies.setItem(cookieName || 'br-resume', index, ttl, path, null, false);\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n"],"names":["getItem","sKey","decodeURIComponent","document","cookie","replace","RegExp","encodeURIComponent","setItem","sValue","vEnd","sPath","sDomain","bSecure","toUTCString","removeItem","hasItem","super_","BookReader","docCookies","jQuery","extend","defaultOptions","enablePageResume","resumeCookiePath","prototype","init","call","this","options","bind","eventNames","fragmentChange","params","paramsFromCurrent","updateResumeValue","index","getResumeValue","val","parseInt","getCookiePath","urlPathPart","match","cookieName","ttl","Date","path","window","location","pathname","fixRegExpWellKnownSymbolLogic","anObject","toLength","toString","requireObjectCoercible","advanceStringIndex","regExpExec","MATCH","nativeMatch","maybeCallNative","regexp","O","matcher","undefined","string","rx","S","res","done","value","global","fullUnicode","unicode","lastIndex","result","A","n","matchStr"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[73],{8011:function(e,t,r){"use strict";r(5666),r(4916),r(4765),r(9826),r(5306),r(2222),r(9601),r(9720),r(4747),r(1539),r(8674),r(6992),r(8783),r(3948),r(285),r(7042),r(8309),r(1038),r(2526),r(1817),r(2165);var n=r(9860),a=(r(4603),r(9714),r(1249),r(3609));function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s,o=function(){function e(t){var r=t.br,n=t.searchCancelledCallback,a=void 0===n?function(){}:n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=r,this.matcher=new RegExp("{{{(.+?)}}}","g"),this.matches=[],this.cacheDOMElements(),this.bindEvents(),this.cancelSearch=a}var t,r;return t=e,(r=[{key:"cacheDOMElements",value:function(){this.dom={},this.dom.toolbarSearch=this.buildToolbarSearch()}},{key:"setQuery",value:function(e){this.br.$('[name="query"]').val(e)}},{key:"emptyMatches",value:function(){this.matches=[]}},{key:"removeResultPins",value:function(){this.br.$(".BRnavpos .BRsearch").remove()}},{key:"clearSearchFieldAndResults",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.br.removeSearchResults(),this.removeResultPins(),this.emptyMatches(),this.setQuery(""),this.teardownSearchNavigation(),e&&this.br.trigger("SearchResultsCleared")}},{key:"toggleSidebar",value:function(){this.br.trigger("ToggleSearchMenu")}},{key:"renderSearchNavigation",value:function(){var e="BRsearch-navigation";a(".BRnav").before('\n <div class="'.concat(e,'">\n <button class="toggle-sidebar">\n <h4>\n <span class="icon icon-search"></span> Results\n </h4>\n </button>\n <div class="pagination">\n <button class="prev" title="Previous result"><span class="icon icon-chevron hflip"></span></button>\n <span data-id="resultsCount">').concat(this.resultsPosition(),'</span>\n <button class="next" title="Next result"><span class="icon icon-chevron"></button>\n </div>\n <button class="clear" title="Clear search results">\n <span class="icon icon-close"></span>\n </button>\n </div>\n ')),this.dom.searchNavigation=a(".".concat(e))}},{key:"resultsPosition",value:function(){var e="".concat(this.matches.length," result").concat(1===this.matches.length?"":"s");return~this.currentMatchIndex&&(e="".concat(this.currentMatchIndex+1," / ").concat(this.matches.length)),e}},{key:"bindSearchNavigationEvents",value:function(){if(this.dom.searchNavigation){var e="searchNavigation";this.dom.searchNavigation.on("click.".concat(e),".clear",this.clearSearchFieldAndResults.bind(this)).on("click.".concat(e),".prev",this.showPrevResult.bind(this)).on("click.".concat(e),".next",this.showNextResult.bind(this)).on("click.".concat(e),".toggle-sidebar",this.toggleSidebar.bind(this)).on("click.".concat(e),!1)}}},{key:"showPrevResult",value:function(){0!==this.currentMatchIndex&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,r){return t[0]>r}))+1),this.br.$(".BRnavline .BRsearch").eq(--this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"showNextResult",value:function(){this.currentMatchIndex+1!==this.matches.length&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,r){return e[e.length-1]>r}))-1),this.br.$(".BRnavline .BRsearch").eq(++this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"getClosestMatchIndex",value:function(e){var t=function t(r,n){if(1===r.length)return r[0];var a=r.slice(0,r.length/2),i=r.slice(r.length/2);return t(e(a,i,n)?a:i,n)}(this.matches.map((function(e){return e.par[0].page})),this.br.currentIndex()+1);return this.matches.indexOf(this.matches.find((function(e){return e.par[0].page===t})))}},{key:"updateResultsPosition",value:function(){this.dom.searchNavigation&&this.dom.searchNavigation.find("[data-id=resultsCount]").text(this.resultsPosition())}},{key:"updateSearchNavigationButtons",value:function(){this.dom.searchNavigation&&(this.dom.searchNavigation.find(".prev").attr("disabled",!this.currentMatchIndex),this.dom.searchNavigation.find(".next").attr("disabled",this.currentMatchIndex+1===this.matches.length))}},{key:"teardownSearchNavigation",value:function(){this.dom.searchNavigation||(this.dom.searchNavigation=a(".BRsearch-navigation")),this.dom.searchNavigation.length&&(this.dom.searchNavigation.off(".searchNavigation").remove(),this.dom.searchNavigation=null,this.br.resize())}},{key:"setCurrentMatchIndex",value:function(){var e;this.br.mode!==this.br.constModeThumb?(e=this.br.mode===this.br.constMode2up?this.find2upMatchingSearchResult():this.find1upMatchingSearchResult(),this.currentMatchIndex=this.matches.indexOf(e)):this.currentMatchIndex=-1}},{key:"find1upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br.currentIndex()===t.par[0].page-1}))}},{key:"find2upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br._isIndexDisplayed(t.par[0].page-1)}))}},{key:"updateSearchNavigation",value:function(){this.matches.length&&(this.setCurrentMatchIndex(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"togglePinsFor",value:function(e){var t=e?"visible":"hidden";this.br.refs.$BRfooter.find(".BRsearch").css({visibility:t})}},{key:"buildToolbarSearch",value:function(){var e=document.createElement("span");return e.classList.add("BRtoolbarSection","BRtoolbarSectionSearch"),e.innerHTML='\n <form class="BRbooksearch desktop">\n <input type="search" name="query" class="BRsearchInput" value="" placeholder="Search inside"/>\n <button type="submit" class="BRsearchSubmit">\n <img src="'.concat(this.br.imagesBaseURL,'icon_search_button.svg" />\n </button>\n </form>\n '),e}},{key:"renderPins",value:function(e){var t=this;e.forEach((function(e){var r=e.text,n=t.br.leafNumToIndex(e.par[0].page),i=t.br.getPageNum(n),s=t.br.constructor.util.cssPercentage(n,t.br.getNumLeafs()-1),o=r.replace(t.matcher,"<b>$1</b>"),c="";r.length>100&&(c=r.replace(/^(.{100}[^\s]*).*/,"$1").replace(t.matcher,"<b>$1</b>")+"..."),a("<div>").addClass("BRsearch").css({left:s}).attr("title","Search result").append('\n <div class="BRquery">\n <div>'.concat(c||o,"</div>\n <div>").concat("Page"," ").concat(i,"</div>\n </div>\n ")).data({pageIndex:n}).appendTo(t.br.$(".BRnavline")).on("mouseenter",(function(e){var t=e.currentTarget,r=t.querySelector(".BRquery"),n=r.getBoundingClientRect(),i=t.getBoundingClientRect(),s=2*parseInt(getComputedStyle(r).paddingLeft);n.x-s<0&&r.style.setProperty("transform","translateX(-".concat(i.left-s,"px)")),a(".BRsearch,.BRchapter").removeClass("front"),a(e.target).addClass("front")})).on("mouseleave",(function(e){return a(e.target).removeClass("front")})).on("click",function(e){this.br._searchPluginGoToResult(+a(e.target).data("pageIndex"))}.bind(t))}))}},{key:"toggleSearchPending",value:function(e){var t=this;e?this.br.showProgressPopup("Search results will appear below...",(function(){return t.progressPopupClosed()})):this.br.removeProgressPopup()}},{key:"progressPopupClosed",value:function(){this.toggleSearchPending(),this.cancelSearch()}},{key:"renderErrorModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t="".concat(e?"":"The text may still be processing. ","Please try again.");this.renderModalMessage("\n Sorry, there was an error with your search.\n <br />\n ".concat(t,"\n ")),this.delayModalRemovalFor(4e3)}},{key:"renderBookNotIndexedModal",value:function(){this.renderModalMessage("\n <p>\n This book hasn't been indexed for searching yet.\n We've just started indexing it, so search should be available soon.\n <br />\n Please try again later. Thanks!\n </p>\n "),this.delayModalRemovalFor(5e3)}},{key:"renderResultsEmptyModal",value:function(){this.renderModalMessage("No matches were found."),this.delayModalRemovalFor(2e3)}},{key:"renderModalMessage",value:function(e){var t=document.createElement("div");t.classList.add("BRprogresspopup","search_modal"),t.innerHTML=e,document.querySelector(this.br.el).append(t)}},{key:"delayModalRemovalFor",value:function(e){setTimeout(this.br.removeProgressPopup.bind(this.br),e)}},{key:"submitHandler",value:function(e){e.preventDefault();var t=e.target.querySelector('[name="query"]').value;return!!t.length&&(this.br.search(t),this.emptyMatches(),this.toggleSearchPending(!0),!1)}},{key:"handleSearchCallback",value:function(e,t){var r=this,n=t.results,i=t.options;this.matches=n.matches,this.setCurrentMatchIndex(),this.teardownSearchNavigation(),this.renderSearchNavigation(),this.bindSearchNavigationEvents(),this.renderPins(n.matches),this.toggleSearchPending(!1),i.goToFirstResult?a(document).one("BookReader:pageChanged",(function(){r.br.resize()})):this.br.resize()}},{key:"handleNavToggledCallback",value:function(e){var t=this.br.navigationIsVisible();this.togglePinsFor(t)}},{key:"handleSearchStarted",value:function(){this.emptyMatches(),this.br.removeSearchHilites(),this.removeResultPins(),this.toggleSearchPending(!0),this.teardownSearchNavigation(),this.setQuery(this.br.searchTerm)}},{key:"handleSearchCallbackError",value:function(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.toggleSearchPending(!1);var a=null==n||null===(e=n.detail)||void 0===e||null===(t=e.props)||void 0===t||null===(r=t.results)||void 0===r?void 0:r.indexed;this.renderErrorModal(a)}},{key:"handleSearchCallbackBookNotIndexed",value:function(){this.toggleSearchPending(!1),this.renderBookNotIndexedModal()}},{key:"handleSearchCallbackEmpty",value:function(){this.toggleSearchPending(!1),this.renderResultsEmptyModal()}},{key:"bindEvents",value:function(){var e="BookReader:";window.addEventListener("".concat(e,"SearchCallbackError"),this.handleSearchCallbackError.bind(this)),a(document).on("".concat(e,"SearchCallback"),this.handleSearchCallback.bind(this)).on("".concat(e,"navToggled"),this.handleNavToggledCallback.bind(this)).on("".concat(e,"SearchStarted"),this.handleSearchStarted.bind(this)).on("".concat(e,"SearchCallbackBookNotIndexed"),this.handleSearchCallbackBookNotIndexed.bind(this)).on("".concat(e,"SearchCallbackEmpty"),this.handleSearchCallbackEmpty.bind(this)).on("".concat(e,"pageChanged"),this.updateSearchNavigation.bind(this)),this.dom.toolbarSearch.querySelector("form").addEventListener("submit",this.submitHandler.bind(this))}}])&&i(t.prototype,r),e}(),c=r(3609),h=r(3609);function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function g(e,t,r,n,a,i,s){try{var o=e[i](s),c=o.value}catch(e){return void r(e)}o.done?t(c):Promise.resolve(c).then(n,a)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){g(i,n,a,s,o,"next",e)}function o(e){g(i,n,a,s,o,"throw",e)}s(void 0)}))}}c.extend(BookReader.defaultOptions,{server:"ia600609.us.archive.org",bookId:"",subPrefix:"",bookPath:"",enableSearch:!0,searchInsideUrl:"/fulltext/inside.php",initialSearchTerm:null}),BookReader.prototype.setup=(s=BookReader.prototype.setup,function(e){s.call(this,e),this.searchTerm="",this.searchResults=null,this.searchInsideUrl=e.searchInsideUrl,this.enableSearch=e.enableSearch,this.bookId=e.bookId,this.server=e.server,this.subPrefix=e.subPrefix,this.bookPath=e.bookPath,this.searchXHR=null,this._cancelSearch.bind(this),this.cancelSearchRequest.bind(this),this._searchBoxesByIndex={},this.searchView=void 0}),BookReader.prototype.init=function(e){return function(){var t=this;e.call(this),this.searchView=new o({br:this,searchCancelledCallback:function(){t._cancelSearch(),t.trigger("SearchCanceled",{term:t.searchTerm,instance:t})}}),this.options.enableSearch&&this.options.initialSearchTerm&&this.search(this.options.initialSearchTerm,{goToFirstResult:this.options.goToFirstResult,suppressFragmentChange:!1})}}(BookReader.prototype.init),BookReader.prototype.buildToolbarElement=function(e){return function(){var t=e.call(this);if(this.enableSearch)return this.searchView.dom.toolbarSearch&&t.find(".BRtoolbarSectionInfo").after(this.searchView.dom.toolbarSearch),t}}(BookReader.prototype.buildToolbarElement),BookReader.prototype._createPageContainer=function(e){return function(t){var r=e.call(this,t);if(this.enableSearch&&r.page&&t in this._searchBoxesByIndex){var a=r.page.index;(0,n.Tm)("searchHiliteLayer",this._searchBoxesByIndex[a],r.page,r.$container[0])}return r}}(BookReader.prototype._createPageContainer),BookReader.prototype.search=v(regeneratorRuntime.mark((function e(){var t,r,n,a,i,s,o,l,u,d,g,v,p=this,f=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>0&&void 0!==f[0]?f[0]:"",r=f.length>1&&void 0!==f[1]?f[1]:{},n={goToFirstResult:!1,disablePopup:!1,suppressFragmentChange:!1,error:null,success:null},a=c.extend({},n,r),this.suppressFragmentChange=a.suppressFragmentChange,this.searchCancelled=!1,this.searchTerm=t.replace(/\//g," "),a.suppressFragmentChange||this.trigger(BookReader.eventNames.fragmentChange),i=this.server.replace(/:.+/,""),s="https://".concat(i).concat(this.searchInsideUrl,"?"),o=this.bookPath,l="/".concat(this.subPrefix),this.bookPath.length-this.bookPath.lastIndexOf(l)==l.length&&(o=this.bookPath.substr(0,this.bookPath.length-l.length)),u={item_id:this.bookId,doc:this.subPrefix,path:o,q:t},d=h.param(u).replace(/%2F/g,"/"),g="".concat(s).concat(d),v=function(e){if(!p.searchCancelled){var t=e.error||!e.matches.length,r="function"==typeof a.error,n="function"==typeof a.success;t?r?a.error.call(p,e,a):p.BRSearchCallbackError(e,a):n?a.success.call(p,e,a):p.BRSearchCallback(e,a)}},this.trigger("SearchStarted",{term:this.searchTerm,instance:this}),e.t0=v,e.next=21,h.ajax({url:g,dataType:"jsonp",cache:!0,beforeSend:function(e){p.searchXHR=e}});case 21:return e.t1=e.sent,e.abrupt("return",(0,e.t0)(e.t1));case 23:case"end":return e.stop()}}),e,this)}))),BookReader.prototype._cancelSearch=function(){var e;null===(e=this.searchXHR)||void 0===e||e.abort(),this.searchView.clearSearchFieldAndResults(!1),this.searchTerm="",this.searchXHR=null,this.searchCancelled=!0,this.searchResults=[]},BookReader.prototype.cancelSearchRequest=function(){this.searchCancelled=!0,null!==this.searchXHR&&(this._cancelSearch(),this.searchView.toggleSearchPending(),this.trigger("SearchCanceled",{term:this.searchTerm,instance:this}))},BookReader.prototype.BRSearchCallback=function(e,t){if(this.searchResults=e||[],this.updateSearchHilites(),this.removeProgressPopup(),t.goToFirstResult){var r=this._models.book.leafNumToIndex(e.matches[0].par[0].page);this._searchPluginGoToResult(r)}this.trigger("SearchCallback",{results:e,options:t,instance:this})},BookReader.prototype.BRSearchCallbackError=function(e){this._BRSearchCallbackError(e)},BookReader.prototype._BRSearchCallbackError=function(e){this.searchResults=e;var t={term:this.searchTerm,instance:this};if(e.error){var r=Object.assign({},t,{results:e});this.trigger("SearchCallbackError",r)}else if(0==e.matches.length){if(!1===e.indexed)return void this.trigger("SearchCallbackBookNotIndexed",t);this.trigger("SearchCallbackEmpty",t)}},BookReader.prototype.updateSearchHilites=function(){var e,t=this,r=(null===(e=this.searchResults)||void 0===e?void 0:e.matches)||[],a={};this.removeSearchHilites();var i,s=l(r);try{for(s.s();!(i=s.n()).done;){var o,c=l(i.value.par[0].boxes);try{for(c.s();!(o=c.n()).done;){var h=o.value,d=this.leafNumToIndex(h.page);(a[d]||(a[d]=[])).push(h)}}catch(e){c.e(e)}finally{c.f()}}}catch(e){s.e(e)}finally{s.f()}for(var g=function(){var e,r,a=(e=p[v],r=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i=[],s=!0,o=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){o=!0,a=e}finally{try{s||null==r.return||r.return()}finally{if(o)throw a}}return i}}(e,r)||u(e,r)||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.")}()),i=a[0],s=a[1],o=parseFloat(i),c=t._models.book.getPage(o);t.getActivePageContainerElementsForIndex(o).forEach((function(e){return(0,n.Tm)("searchHiliteLayer",s,c,e)}))},v=0,p=Object.entries(a);v<p.length;v++)g();this._searchBoxesByIndex=a},BookReader.prototype.removeSearchHilites=function(){h(this.getActivePageContainerElements()).find(".searchHiliteLayer").remove()},BookReader.prototype._searchPluginGoToResult=function(){var e=v(regeneratorRuntime.mark((function e(t){var r,n,a,i,s,o,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this._models.book,n=r.getPage(t),a=!1,n.isViewable){e.next=10;break}return e.next=6,fetch("/services/bookreader/request_page?"+new URLSearchParams({id:this.options.bookId,subprefix:this.options.subPrefix,leafNum:n.leafNum})).then((function(e){return e.json()}));case 6:i=e.sent,s=l(i.value);try{for(s.s();!(o=s.n()).done;)c=o.value,r.getPage(r.leafNumToIndex(c)).makeViewable()}catch(e){s.e(e)}finally{s.f()}i.value.length||(r.getPage(t).makeViewable(),a=!0);case 10:this.suppressFragmentChange=!1,this.jumpToIndex(t),a&&r.getPage(t).makeViewable(!1);case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),BookReader.prototype.removeSearchResults=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.removeSearchHilites(),this.searchTerm=null,this.searchResults=null,e||this.trigger(BookReader.eventNames.fragmentChange)},BookReader.prototype.searchHighlightVisible=function(){var e=this,t=this.searchResults,r=[];if(null==t)return!1;if(this.constMode2up==this.mode)r=[this.twoPage.currentIndexL,this.twoPage.currentIndexR];else{if(this.constMode1up!=this.mode)return!1;r=[this.currentIndex()]}return t.matches.some((function(t){return t.par[0].boxes.some((function(t){var n=e.leafNumToIndex(t.page);if(c.inArray(n,r)>=0)return!0}))})),!1}},9720:function(e,t,r){var n=r(2109),a=r(4699).entries;n({target:"Object",stat:!0},{entries:function(e){return a(e)}})}},function(e){e(e.s=8011)}]);
1
+ (self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[73],{8011:function(e,t,r){"use strict";r(5666),r(4916),r(4765),r(9826),r(1539),r(5306),r(2222),r(9601),r(9720),r(4678),r(4747),r(8674),r(6992),r(8783),r(3948),r(1637),r(7042),r(8309),r(1038),r(2526),r(1817),r(2165);var a=r(9860),n=(r(4603),r(9714),r(1249),r(1058),r(3609));function i(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var s,o=function(){function e(t){var r=t.br,a=t.searchCancelledCallback,n=void 0===a?function(){}:a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=r,this.matcher=new RegExp("{{{(.+?)}}}","g"),this.matches=[],this.cacheDOMElements(),this.bindEvents(),this.cancelSearch=n}var t,r;return t=e,(r=[{key:"cacheDOMElements",value:function(){this.dom={},this.dom.toolbarSearch=this.buildToolbarSearch()}},{key:"setQuery",value:function(e){this.br.$('[name="query"]').val(e)}},{key:"emptyMatches",value:function(){this.matches=[]}},{key:"removeResultPins",value:function(){this.br.$(".BRnavpos .BRsearch").remove()}},{key:"clearSearchFieldAndResults",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.br.removeSearchResults(),this.removeResultPins(),this.emptyMatches(),this.setQuery(""),this.teardownSearchNavigation(),e&&this.br.trigger("SearchResultsCleared")}},{key:"toggleSidebar",value:function(){this.br.trigger("ToggleSearchMenu")}},{key:"renderSearchNavigation",value:function(){var e="BRsearch-navigation";n(".BRnav").before('\n <div class="'.concat(e,'">\n <button class="toggle-sidebar">\n <h4>\n <span class="icon icon-search"></span> Results\n </h4>\n </button>\n <div class="pagination">\n <button class="prev" title="Previous result"><span class="icon icon-chevron hflip"></span></button>\n <span data-id="resultsCount">').concat(this.resultsPosition(),'</span>\n <button class="next" title="Next result"><span class="icon icon-chevron"></button>\n </div>\n <button class="clear" title="Clear search results">\n <span class="icon icon-close"></span>\n </button>\n </div>\n ')),this.dom.searchNavigation=n(".".concat(e))}},{key:"resultsPosition",value:function(){var e="".concat(this.matches.length," result").concat(1===this.matches.length?"":"s");return~this.currentMatchIndex&&(e="".concat(this.currentMatchIndex+1," / ").concat(this.matches.length)),e}},{key:"bindSearchNavigationEvents",value:function(){if(this.dom.searchNavigation){var e="searchNavigation";this.dom.searchNavigation.on("click.".concat(e),".clear",this.clearSearchFieldAndResults.bind(this)).on("click.".concat(e),".prev",this.showPrevResult.bind(this)).on("click.".concat(e),".next",this.showNextResult.bind(this)).on("click.".concat(e),".toggle-sidebar",this.toggleSidebar.bind(this)).on("click.".concat(e),!1)}}},{key:"showPrevResult",value:function(){0!==this.currentMatchIndex&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,r){return t[0]>r}))+1),this.br.$(".BRnavline .BRsearch").eq(--this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"showNextResult",value:function(){this.currentMatchIndex+1!==this.matches.length&&(this.br.mode===this.br.constModeThumb&&this.br.switchMode(this.br.constMode1up),~this.currentMatchIndex||(this.currentMatchIndex=this.getClosestMatchIndex((function(e,t,r){return e[e.length-1]>r}))-1),this.br.$(".BRnavline .BRsearch").eq(++this.currentMatchIndex).click(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"getClosestMatchIndex",value:function(e){var t=function t(r,a){if(1===r.length)return r[0];var n=r.slice(0,r.length/2),i=r.slice(r.length/2);return t(e(n,i,a)?n:i,a)}(this.matches.map((function(e){return e.par[0].page})),this.br.currentIndex()+1);return this.matches.indexOf(this.matches.find((function(e){return e.par[0].page===t})))}},{key:"updateResultsPosition",value:function(){this.dom.searchNavigation&&this.dom.searchNavigation.find("[data-id=resultsCount]").text(this.resultsPosition())}},{key:"updateSearchNavigationButtons",value:function(){this.dom.searchNavigation&&(this.dom.searchNavigation.find(".prev").attr("disabled",!this.currentMatchIndex),this.dom.searchNavigation.find(".next").attr("disabled",this.currentMatchIndex+1===this.matches.length))}},{key:"teardownSearchNavigation",value:function(){this.dom.searchNavigation||(this.dom.searchNavigation=n(".BRsearch-navigation")),this.dom.searchNavigation.length&&(this.dom.searchNavigation.off(".searchNavigation").remove(),this.dom.searchNavigation=null,this.br.resize())}},{key:"setCurrentMatchIndex",value:function(){var e;this.br.mode!==this.br.constModeThumb?(e=this.br.mode===this.br.constMode2up?this.find2upMatchingSearchResult():this.find1upMatchingSearchResult(),this.currentMatchIndex=this.matches.indexOf(e)):this.currentMatchIndex=-1}},{key:"find1upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br.currentIndex()===t.par[0].page-1}))}},{key:"find2upMatchingSearchResult",value:function(){var e=this;return this.matches.find((function(t){return e.br._isIndexDisplayed(t.par[0].page-1)}))}},{key:"updateSearchNavigation",value:function(){this.matches.length&&(this.setCurrentMatchIndex(),this.updateResultsPosition(),this.updateSearchNavigationButtons())}},{key:"togglePinsFor",value:function(e){var t=e?"visible":"hidden";this.br.refs.$BRfooter.find(".BRsearch").css({visibility:t})}},{key:"buildToolbarSearch",value:function(){var e=document.createElement("span");return e.classList.add("BRtoolbarSection","BRtoolbarSectionSearch"),e.innerHTML='\n <form class="BRbooksearch desktop">\n <input type="search" name="query" class="BRsearchInput" value="" placeholder="Search inside"/>\n <button type="submit" class="BRsearchSubmit">\n <img src="'.concat(this.br.imagesBaseURL,'icon_search_button.svg" />\n </button>\n </form>\n '),e}},{key:"renderPins",value:function(e){var t=this;e.forEach((function(e){var r=e.text,a=t.br.leafNumToIndex(e.par[0].page),i=t.br.getPageNum(a),s=t.br.constructor.util.cssPercentage(a,t.br.getNumLeafs()-1),o=r.replace(t.matcher,"<b>$1</b>"),c="";r.length>100&&(c=r.replace(/^(.{100}[^\s]*).*/,"$1").replace(t.matcher,"<b>$1</b>")+"..."),n("<div>").addClass("BRsearch").css({left:s}).attr("title","Search result").append('\n <div class="BRquery">\n <div>'.concat(c||o,"</div>\n <div>").concat("Page"," ").concat(i,"</div>\n </div>\n ")).data({pageIndex:a}).appendTo(t.br.$(".BRnavline")).on("mouseenter",(function(e){var t=e.currentTarget,r=t.querySelector(".BRquery"),a=r.getBoundingClientRect(),i=t.getBoundingClientRect(),s=2*parseInt(getComputedStyle(r).paddingLeft);a.x-s<0&&r.style.setProperty("transform","translateX(-".concat(i.left-s,"px)")),n(".BRsearch,.BRchapter").removeClass("front"),n(e.target).addClass("front")})).on("mouseleave",(function(e){return n(e.target).removeClass("front")})).on("click",function(e){this.br._searchPluginGoToResult(+n(e.target).data("pageIndex"))}.bind(t))}))}},{key:"toggleSearchPending",value:function(e){var t=this;e?this.br.showProgressPopup("Search results will appear below...",(function(){return t.progressPopupClosed()})):this.br.removeProgressPopup()}},{key:"progressPopupClosed",value:function(){this.toggleSearchPending(),this.cancelSearch()}},{key:"renderErrorModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t="".concat(e?"":"The text may still be processing. ","Please try again.");this.renderModalMessage("\n Sorry, there was an error with your search.\n <br />\n ".concat(t,"\n ")),this.delayModalRemovalFor(4e3)}},{key:"renderBookNotIndexedModal",value:function(){this.renderModalMessage("\n <p>\n This book hasn't been indexed for searching yet.\n We've just started indexing it, so search should be available soon.\n <br />\n Please try again later. Thanks!\n </p>\n "),this.delayModalRemovalFor(5e3)}},{key:"renderResultsEmptyModal",value:function(){this.renderModalMessage("No matches were found."),this.delayModalRemovalFor(2e3)}},{key:"renderModalMessage",value:function(e){var t=document.createElement("div");t.classList.add("BRprogresspopup","search_modal"),t.innerHTML=e,document.querySelector(this.br.el).append(t)}},{key:"delayModalRemovalFor",value:function(e){setTimeout(this.br.removeProgressPopup.bind(this.br),e)}},{key:"submitHandler",value:function(e){e.preventDefault();var t=e.target.querySelector('[name="query"]').value;return!!t.length&&(this.br.search(t),this.emptyMatches(),this.toggleSearchPending(!0),!1)}},{key:"handleSearchCallback",value:function(e,t){var r=this,a=t.results,i=t.options;this.matches=a.matches,this.setCurrentMatchIndex(),this.teardownSearchNavigation(),this.renderSearchNavigation(),this.bindSearchNavigationEvents(),this.renderPins(a.matches),this.toggleSearchPending(!1),i.goToFirstResult?n(document).one("BookReader:pageChanged",(function(){r.br.resize()})):this.br.resize()}},{key:"handleNavToggledCallback",value:function(e){var t=this.br.navigationIsVisible();this.togglePinsFor(t)}},{key:"handleSearchStarted",value:function(){this.emptyMatches(),this.br.removeSearchHilites(),this.removeResultPins(),this.toggleSearchPending(!0),this.teardownSearchNavigation(),this.setQuery(this.br.searchTerm)}},{key:"handleSearchCallbackError",value:function(){var e,t,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.toggleSearchPending(!1);var n=null==a||null===(e=a.detail)||void 0===e||null===(t=e.props)||void 0===t||null===(r=t.results)||void 0===r?void 0:r.indexed;this.renderErrorModal(n)}},{key:"handleSearchCallbackBookNotIndexed",value:function(){this.toggleSearchPending(!1),this.renderBookNotIndexedModal()}},{key:"handleSearchCallbackEmpty",value:function(){this.toggleSearchPending(!1),this.renderResultsEmptyModal()}},{key:"bindEvents",value:function(){var e="BookReader:";window.addEventListener("".concat(e,"SearchCallbackError"),this.handleSearchCallbackError.bind(this)),n(document).on("".concat(e,"SearchCallback"),this.handleSearchCallback.bind(this)).on("".concat(e,"navToggled"),this.handleNavToggledCallback.bind(this)).on("".concat(e,"SearchStarted"),this.handleSearchStarted.bind(this)).on("".concat(e,"SearchCallbackBookNotIndexed"),this.handleSearchCallbackBookNotIndexed.bind(this)).on("".concat(e,"SearchCallbackEmpty"),this.handleSearchCallbackEmpty.bind(this)).on("".concat(e,"pageChanged"),this.updateSearchNavigation.bind(this)),this.dom.toolbarSearch.querySelector("form").addEventListener("submit",this.submitHandler.bind(this))}}])&&i(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),c=r(3609),h=r(3609);function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}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,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function g(e,t,r,a,n,i,s){try{var o=e[i](s),c=o.value}catch(e){return void r(e)}o.done?t(c):Promise.resolve(c).then(a,n)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var i=e.apply(t,r);function s(e){g(i,a,n,s,o,"next",e)}function o(e){g(i,a,n,s,o,"throw",e)}s(void 0)}))}}c.extend(BookReader.defaultOptions,{server:"ia600609.us.archive.org",bookId:"",subPrefix:"",bookPath:"",enableSearch:!0,searchInsideUrl:"/fulltext/inside.php",initialSearchTerm:null}),BookReader.prototype.setup=(s=BookReader.prototype.setup,function(e){s.call(this,e),this.searchTerm="",this.searchResults=null,this.searchInsideUrl=e.searchInsideUrl,this.enableSearch=e.enableSearch,this.bookId=e.bookId,this.server=e.server,this.subPrefix=e.subPrefix,this.bookPath=e.bookPath,this.searchXHR=null,this._cancelSearch.bind(this),this.cancelSearchRequest.bind(this),this._searchBoxesByIndex={},this.searchView=void 0}),BookReader.prototype.init=function(e){return function(){var t=this;e.call(this),this.searchView=new o({br:this,searchCancelledCallback:function(){t._cancelSearch(),t.trigger("SearchCanceled",{term:t.searchTerm,instance:t})}}),this.options.enableSearch&&this.options.initialSearchTerm&&this.search(this.options.initialSearchTerm,{goToFirstResult:this.options.goToFirstResult,suppressFragmentChange:!1})}}(BookReader.prototype.init),BookReader.prototype.buildToolbarElement=function(e){return function(){var t=e.call(this);if(this.enableSearch)return this.searchView.dom.toolbarSearch&&t.find(".BRtoolbarSectionInfo").after(this.searchView.dom.toolbarSearch),t}}(BookReader.prototype.buildToolbarElement),BookReader.prototype._createPageContainer=function(e){return function(t){var r=e.call(this,t);if(this.enableSearch&&r.page&&t in this._searchBoxesByIndex){var n=r.page.index;(0,a.Tm)("searchHiliteLayer",this._searchBoxesByIndex[n],r.page,r.$container[0])}return r}}(BookReader.prototype._createPageContainer),BookReader.prototype.search=v(regeneratorRuntime.mark((function e(){var t,r,a,n,i,s,o,l,u,d,g,v,p=this,f=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>0&&void 0!==f[0]?f[0]:"",r=f.length>1&&void 0!==f[1]?f[1]:{},a={goToFirstResult:!1,disablePopup:!1,suppressFragmentChange:!1,error:null,success:null},n=c.extend({},a,r),this.suppressFragmentChange=n.suppressFragmentChange,this.searchCancelled=!1,this.searchTerm=t.replace(/\//g," "),n.suppressFragmentChange||this.trigger(BookReader.eventNames.fragmentChange),i=this.server.replace(/:.+/,""),s="https://".concat(i).concat(this.searchInsideUrl,"?"),o=this.bookPath,l="/".concat(this.subPrefix),this.bookPath.length-this.bookPath.lastIndexOf(l)==l.length&&(o=this.bookPath.substr(0,this.bookPath.length-l.length)),u={item_id:this.bookId,doc:this.subPrefix,path:o,q:t},d=h.param(u).replace(/%2F/g,"/"),g="".concat(s).concat(d),v=function(e){if(!p.searchCancelled){var t=e.error||!e.matches.length,r="function"==typeof n.error,a="function"==typeof n.success;t?r?n.error.call(p,e,n):p.BRSearchCallbackError(e,n):a?n.success.call(p,e,n):p.BRSearchCallback(e,n)}},this.trigger("SearchStarted",{term:this.searchTerm,instance:this}),e.t0=v,e.next=21,h.ajax({url:g,dataType:"jsonp",cache:!0,beforeSend:function(e){p.searchXHR=e}});case 21:return e.t1=e.sent,e.abrupt("return",(0,e.t0)(e.t1));case 23:case"end":return e.stop()}}),e,this)}))),BookReader.prototype._cancelSearch=function(){var e;null===(e=this.searchXHR)||void 0===e||e.abort(),this.searchView.clearSearchFieldAndResults(!1),this.searchTerm="",this.searchXHR=null,this.searchCancelled=!0,this.searchResults=[]},BookReader.prototype.cancelSearchRequest=function(){this.searchCancelled=!0,null!==this.searchXHR&&(this._cancelSearch(),this.searchView.toggleSearchPending(),this.trigger("SearchCanceled",{term:this.searchTerm,instance:this}))},BookReader.prototype.BRSearchCallback=function(e,t){if(this.searchResults=e||[],this.updateSearchHilites(),this.removeProgressPopup(),t.goToFirstResult){var r=this._models.book.leafNumToIndex(e.matches[0].par[0].page);this._searchPluginGoToResult(r)}this.trigger("SearchCallback",{results:e,options:t,instance:this})},BookReader.prototype.BRSearchCallbackError=function(e){this._BRSearchCallbackError(e)},BookReader.prototype._BRSearchCallbackError=function(e){this.searchResults=e;var t={term:this.searchTerm,instance:this};if(e.error){var r=Object.assign({},t,{results:e});this.trigger("SearchCallbackError",r)}else if(0==e.matches.length){if(!1===e.indexed)return void this.trigger("SearchCallbackBookNotIndexed",t);this.trigger("SearchCallbackEmpty",t)}},BookReader.prototype.updateSearchHilites=function(){var e,t=this,r=(null===(e=this.searchResults)||void 0===e?void 0:e.matches)||[],n={};this.removeSearchHilites();var i,s=l(r);try{for(s.s();!(i=s.n()).done;){var o,c=l(i.value.par[0].boxes);try{for(c.s();!(o=c.n()).done;){var h=o.value,d=this.leafNumToIndex(h.page);(n[d]||(n[d]=[])).push(h)}}catch(e){c.e(e)}finally{c.f()}}}catch(e){s.e(e)}finally{s.f()}for(var g=function(){var e,r,n=(e=p[v],r=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,i=[],s=!0,o=!1;try{for(r=r.call(e);!(s=(a=r.next()).done)&&(i.push(a.value),!t||i.length!==t);s=!0);}catch(e){o=!0,n=e}finally{try{s||null==r.return||r.return()}finally{if(o)throw n}}return i}}(e,r)||u(e,r)||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.")}()),i=n[0],s=n[1],o=parseFloat(i),c=t._models.book.getPage(o);t.getActivePageContainerElementsForIndex(o).forEach((function(e){return(0,a.Tm)("searchHiliteLayer",s,c,e)}))},v=0,p=Object.entries(n);v<p.length;v++)g();this._searchBoxesByIndex=n},BookReader.prototype.removeSearchHilites=function(){h(this.getActivePageContainerElements()).find(".searchHiliteLayer").remove()},BookReader.prototype._searchPluginGoToResult=function(){var e=v(regeneratorRuntime.mark((function e(t){var r,a,n,i,s,o,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this._models.book,a=r.getPage(t),n=!1,a.isViewable){e.next=10;break}return e.next=6,fetch("/services/bookreader/request_page?"+new URLSearchParams({id:this.options.bookId,subprefix:this.options.subPrefix,leafNum:a.leafNum})).then((function(e){return e.json()}));case 6:i=e.sent,s=l(i.value);try{for(s.s();!(o=s.n()).done;)c=o.value,r.getPage(r.leafNumToIndex(c)).makeViewable()}catch(e){s.e(e)}finally{s.f()}i.value.length||(r.getPage(t).makeViewable(),n=!0);case 10:this.suppressFragmentChange=!1,this.jumpToIndex(t),n&&r.getPage(t).makeViewable(!1);case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),BookReader.prototype.removeSearchResults=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.removeSearchHilites(),this.searchTerm=null,this.searchResults=null,e||this.trigger(BookReader.eventNames.fragmentChange)},BookReader.prototype.searchHighlightVisible=function(){var e=this,t=this.searchResults,r=[];if(null==t)return!1;if(this.constMode2up==this.mode)r=[this.twoPage.currentIndexL,this.twoPage.currentIndexR];else{if(this.constMode1up!=this.mode)return!1;r=[this.currentIndex()]}return t.matches.some((function(t){return t.par[0].boxes.some((function(t){var a=e.leafNumToIndex(t.page);if(c.inArray(a,r)>=0)return!0}))})),!1}},2814:function(e,t,r){var a=r(7854),n=r(1340),i=r(3111).trim,s=r(1361),o=a.parseFloat,c=1/o(s+"-0")!=-1/0;e.exports=c?function(e){var t=i(n(e)),r=o(t);return 0===r&&"-"==t.charAt(0)?-0:r}:o},9720:function(e,t,r){var a=r(2109),n=r(4699).entries;a({target:"Object",stat:!0},{entries:function(e){return n(e)}})},4678:function(e,t,r){var a=r(2109),n=r(2814);a({global:!0,forced:parseFloat!=n},{parseFloat:n})}},function(e){e(e.s=8011)}]);
2
2
  //# sourceMappingURL=plugin.search.js.map