@internetarchive/bookreader 5.0.0-28-remove-url-defaults → 5.0.0-30-b

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. package/.husky/_/husky.sh +30 -0
  2. package/BookReader/BookReader.css +1 -1
  3. package/BookReader/BookReader.js +1 -1
  4. package/BookReader/BookReader.js.map +1 -1
  5. package/BookReader/ia-bookreader-bundle.js +1458 -0
  6. package/BookReader/{bookreader-component-bundle.js.LICENSE.txt → ia-bookreader-bundle.js.LICENSE.txt} +12 -0
  7. package/BookReader/ia-bookreader-bundle.js.map +1 -0
  8. package/BookReader/plugins/plugin.search.js +1 -1
  9. package/BookReader/plugins/plugin.search.js.map +1 -1
  10. package/BookReaderDemo/BookReaderDemo.css +14 -1
  11. package/BookReaderDemo/IADemoBr.js +107 -0
  12. package/BookReaderDemo/demo-internetarchive.html +64 -99
  13. package/CHANGELOG.md +4 -0
  14. package/package.json +9 -6
  15. package/src/BookNavigator/assets/ia-logo.js +17 -0
  16. package/src/BookNavigator/book-navigator.js +528 -0
  17. package/src/BookNavigator/bookmarks/bookmark-button.js +2 -1
  18. package/src/BookNavigator/bookmarks/bookmarks-provider.js +20 -8
  19. package/src/BookNavigator/bookmarks/ia-bookmarks.js +84 -51
  20. package/src/BookNavigator/downloads/downloads-provider.js +5 -9
  21. package/src/BookNavigator/downloads/downloads.js +1 -0
  22. package/src/BookNavigator/search/search-provider.js +15 -8
  23. package/src/BookNavigator/sharing.js +27 -0
  24. package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +9 -8
  25. package/src/BookNavigator/volumes/volumes-provider.js +3 -4
  26. package/src/BookReader/options.js +6 -0
  27. package/src/BookReader.js +20 -8
  28. package/src/css/_BRComponent.scss +1 -1
  29. package/src/ia-bookreader/ia-bookreader.js +209 -0
  30. package/src/plugins/search/plugin.search.js +9 -9
  31. package/{src → stat}/BookNavigator/BookModel.js +0 -0
  32. package/{src → stat}/BookNavigator/BookNavigator.js +109 -102
  33. package/stat/BookNavigator/assets/bookmark-colors.js +15 -0
  34. package/stat/BookNavigator/assets/button-base.js +61 -0
  35. package/stat/BookNavigator/assets/ia-logo.js +17 -0
  36. package/stat/BookNavigator/assets/icon_checkmark.js +6 -0
  37. package/stat/BookNavigator/assets/icon_close.js +3 -0
  38. package/stat/BookNavigator/assets/icon_sort_asc.js +5 -0
  39. package/stat/BookNavigator/assets/icon_sort_desc.js +5 -0
  40. package/stat/BookNavigator/assets/icon_sort_neutral.js +5 -0
  41. package/stat/BookNavigator/assets/icon_volumes.js +11 -0
  42. package/stat/BookNavigator/bookmarks/bookmark-button.js +64 -0
  43. package/stat/BookNavigator/bookmarks/bookmark-edit.js +215 -0
  44. package/stat/BookNavigator/bookmarks/bookmarks-list.js +285 -0
  45. package/stat/BookNavigator/bookmarks/bookmarks-loginCTA.js +28 -0
  46. package/stat/BookNavigator/bookmarks/bookmarks-provider.js +56 -0
  47. package/stat/BookNavigator/bookmarks/ia-bookmarks.js +523 -0
  48. package/{src → stat}/BookNavigator/br-fullscreen-mgr.js +1 -2
  49. package/stat/BookNavigator/delete-modal-actions.js +49 -0
  50. package/stat/BookNavigator/downloads/downloads-provider.js +72 -0
  51. package/stat/BookNavigator/downloads/downloads.js +139 -0
  52. package/stat/BookNavigator/provider-config.js +0 -0
  53. package/stat/BookNavigator/search/a-search-result.js +55 -0
  54. package/stat/BookNavigator/search/search-provider.js +180 -0
  55. package/stat/BookNavigator/search/search-results.js +360 -0
  56. package/{src/ItemNavigator/providers → stat/BookNavigator}/sharing.js +3 -5
  57. package/stat/BookNavigator/visual-adjustments/visual-adjustments-provider.js +94 -0
  58. package/stat/BookNavigator/visual-adjustments/visual-adjustments.js +280 -0
  59. package/stat/BookNavigator/volumes/volumes-provider.js +83 -0
  60. package/stat/BookNavigator/volumes/volumes.js +178 -0
  61. package/stat/BookReader/BookModel.js +518 -0
  62. package/stat/BookReader/DebugConsole.js +54 -0
  63. package/stat/BookReader/DragScrollable.js +233 -0
  64. package/stat/BookReader/ImageCache.js +116 -0
  65. package/stat/BookReader/Mode1Up.js +102 -0
  66. package/stat/BookReader/Mode1UpLit.js +434 -0
  67. package/stat/BookReader/Mode2Up.js +1372 -0
  68. package/stat/BookReader/ModeSmoothZoom.js +177 -0
  69. package/stat/BookReader/ModeThumb.js +344 -0
  70. package/stat/BookReader/Navbar/Navbar.js +310 -0
  71. package/stat/BookReader/PageContainer.js +120 -0
  72. package/stat/BookReader/ReduceSet.js +26 -0
  73. package/stat/BookReader/Toolbar/Toolbar.js +384 -0
  74. package/stat/BookReader/events.js +20 -0
  75. package/stat/BookReader/options.js +324 -0
  76. package/stat/BookReader/utils/HTMLDimensionsCacher.js +44 -0
  77. package/stat/BookReader/utils/classes.js +36 -0
  78. package/stat/BookReader/utils.js +240 -0
  79. package/stat/BookReader.js +2550 -0
  80. package/{src → stat}/BookReaderComponent/BookReaderComponent.js +15 -10
  81. package/stat/assets/icons/1up.svg +12 -0
  82. package/stat/assets/icons/2up.svg +15 -0
  83. package/stat/assets/icons/advance.svg +26 -0
  84. package/stat/assets/icons/chevron-right.svg +1 -0
  85. package/stat/assets/icons/close-circle-dark.svg +1 -0
  86. package/stat/assets/icons/close-circle.svg +1 -0
  87. package/stat/assets/icons/fullscreen.svg +17 -0
  88. package/stat/assets/icons/fullscreen_exit.svg +17 -0
  89. package/stat/assets/icons/hamburger.svg +15 -0
  90. package/stat/assets/icons/left-arrow.svg +12 -0
  91. package/stat/assets/icons/magnify-minus.svg +16 -0
  92. package/stat/assets/icons/magnify-plus.svg +17 -0
  93. package/stat/assets/icons/magnify.svg +15 -0
  94. package/stat/assets/icons/pause.svg +23 -0
  95. package/stat/assets/icons/play.svg +22 -0
  96. package/stat/assets/icons/playback-speed.svg +34 -0
  97. package/stat/assets/icons/read-aloud.svg +22 -0
  98. package/stat/assets/icons/review.svg +22 -0
  99. package/stat/assets/icons/thumbnails.svg +17 -0
  100. package/stat/assets/icons/voice.svg +1 -0
  101. package/stat/assets/icons/volume-full.svg +22 -0
  102. package/stat/assets/images/BRicons.png +0 -0
  103. package/stat/assets/images/BRicons.svg +94 -0
  104. package/stat/assets/images/BRicons_ia.png +0 -0
  105. package/stat/assets/images/back_pages.png +0 -0
  106. package/stat/assets/images/book_bottom_icon.png +0 -0
  107. package/stat/assets/images/book_down_icon.png +0 -0
  108. package/stat/assets/images/book_left_icon.png +0 -0
  109. package/stat/assets/images/book_leftmost_icon.png +0 -0
  110. package/stat/assets/images/book_right_icon.png +0 -0
  111. package/stat/assets/images/book_rightmost_icon.png +0 -0
  112. package/stat/assets/images/book_top_icon.png +0 -0
  113. package/stat/assets/images/book_up_icon.png +0 -0
  114. package/stat/assets/images/books_graphic.svg +177 -0
  115. package/stat/assets/images/booksplit.png +0 -0
  116. package/stat/assets/images/control_pause_icon.png +0 -0
  117. package/stat/assets/images/control_play_icon.png +0 -0
  118. package/stat/assets/images/embed_icon.png +0 -0
  119. package/stat/assets/images/icon-home-ia.png +0 -0
  120. package/stat/assets/images/icon_OL-logo-xs.png +0 -0
  121. package/stat/assets/images/icon_alert-xs.png +0 -0
  122. package/stat/assets/images/icon_book.svg +12 -0
  123. package/stat/assets/images/icon_bookmark.svg +12 -0
  124. package/stat/assets/images/icon_close-pop.png +0 -0
  125. package/stat/assets/images/icon_download.png +0 -0
  126. package/stat/assets/images/icon_gear.svg +14 -0
  127. package/stat/assets/images/icon_hamburger.svg +20 -0
  128. package/stat/assets/images/icon_home.png +0 -0
  129. package/stat/assets/images/icon_home.svg +21 -0
  130. package/stat/assets/images/icon_home_ia.png +0 -0
  131. package/stat/assets/images/icon_indicator.png +0 -0
  132. package/stat/assets/images/icon_info.svg +11 -0
  133. package/stat/assets/images/icon_one_page.svg +8 -0
  134. package/stat/assets/images/icon_pause.svg +1 -0
  135. package/stat/assets/images/icon_play.svg +1 -0
  136. package/stat/assets/images/icon_playback-rate.svg +15 -0
  137. package/stat/assets/images/icon_return.png +0 -0
  138. package/stat/assets/images/icon_search_button.svg +8 -0
  139. package/stat/assets/images/icon_share.svg +9 -0
  140. package/stat/assets/images/icon_skip-ahead.svg +6 -0
  141. package/stat/assets/images/icon_skip-back.svg +13 -0
  142. package/stat/assets/images/icon_speaker.svg +18 -0
  143. package/stat/assets/images/icon_speaker_open.svg +10 -0
  144. package/stat/assets/images/icon_thumbnails.svg +12 -0
  145. package/stat/assets/images/icon_toc.svg +5 -0
  146. package/stat/assets/images/icon_two_pages.svg +9 -0
  147. package/stat/assets/images/icon_zoomer.png +0 -0
  148. package/stat/assets/images/loading.gif +0 -0
  149. package/stat/assets/images/logo_icon.png +0 -0
  150. package/stat/assets/images/marker_chap-off.png +0 -0
  151. package/stat/assets/images/marker_chap-off.svg +11 -0
  152. package/stat/assets/images/marker_chap-off_ia.png +0 -0
  153. package/stat/assets/images/marker_chap-on.png +0 -0
  154. package/stat/assets/images/marker_chap-on.svg +11 -0
  155. package/stat/assets/images/marker_srch-on.svg +11 -0
  156. package/stat/assets/images/marker_srchchap-off.png +0 -0
  157. package/stat/assets/images/marker_srchchap-on.png +0 -0
  158. package/stat/assets/images/nav_control-dn.png +0 -0
  159. package/stat/assets/images/nav_control-dn_ia.png +0 -0
  160. package/stat/assets/images/nav_control-up.png +0 -0
  161. package/stat/assets/images/nav_control-up_ia.png +0 -0
  162. package/stat/assets/images/nav_control.png +0 -0
  163. package/stat/assets/images/one_page_mode_icon.png +0 -0
  164. package/stat/assets/images/paper-badge.png +0 -0
  165. package/stat/assets/images/print_icon.png +0 -0
  166. package/stat/assets/images/progressbar.gif +0 -0
  167. package/stat/assets/images/right_edges.png +0 -0
  168. package/stat/assets/images/slider.png +0 -0
  169. package/stat/assets/images/slider_ia.png +0 -0
  170. package/stat/assets/images/thumbnail_mode_icon.png +0 -0
  171. package/stat/assets/images/transparent.png +0 -0
  172. package/stat/assets/images/two_page_mode_icon.png +0 -0
  173. package/stat/assets/images/zoom_in_icon.png +0 -0
  174. package/stat/assets/images/zoom_out_icon.png +0 -0
  175. package/stat/css/BookReader.scss +89 -0
  176. package/stat/css/_BRBookmarks.scss +29 -0
  177. package/stat/css/_BRComponent.scss +13 -0
  178. package/stat/css/_BRfloat.scss +197 -0
  179. package/stat/css/_BRicon.scss +48 -0
  180. package/stat/css/_BRmain.scss +251 -0
  181. package/stat/css/_BRnav.scss +359 -0
  182. package/stat/css/_BRpages.scss +139 -0
  183. package/stat/css/_BRsearch.scss +226 -0
  184. package/stat/css/_BRtoolbar.scss +84 -0
  185. package/stat/css/_BRvendor.scss +5 -0
  186. package/stat/css/_MobileNav.scss +194 -0
  187. package/stat/css/_TextSelection.scss +32 -0
  188. package/stat/css/_colorbox.scss +52 -0
  189. package/stat/css/_controls.scss +253 -0
  190. package/stat/css/_icons.scss +121 -0
  191. package/stat/jquery-wrapper.js +4 -0
  192. package/stat/plugins/plugin.archive_analytics.js +86 -0
  193. package/stat/plugins/plugin.autoplay.js +129 -0
  194. package/stat/plugins/plugin.chapters.js +248 -0
  195. package/stat/plugins/plugin.iframe.js +48 -0
  196. package/stat/plugins/plugin.mobile_nav.js +288 -0
  197. package/stat/plugins/plugin.resume.js +68 -0
  198. package/stat/plugins/plugin.text_selection.js +291 -0
  199. package/stat/plugins/plugin.url.js +198 -0
  200. package/stat/plugins/plugin.vendor-fullscreen.js +247 -0
  201. package/stat/plugins/search/plugin.search.js +439 -0
  202. package/stat/plugins/search/view.js +439 -0
  203. package/stat/plugins/tts/AbstractTTSEngine.js +249 -0
  204. package/stat/plugins/tts/FestivalTTSEngine.js +169 -0
  205. package/stat/plugins/tts/PageChunk.js +107 -0
  206. package/stat/plugins/tts/PageChunkIterator.js +163 -0
  207. package/stat/plugins/tts/WebTTSEngine.js +357 -0
  208. package/stat/plugins/tts/plugin.tts.js +357 -0
  209. package/stat/plugins/tts/tooltip_dict.js +15 -0
  210. package/stat/plugins/tts/utils.js +91 -0
  211. package/stat/util/browserSniffing.js +30 -0
  212. package/stat/util/debouncer.js +26 -0
  213. package/stat/util/docCookies.js +67 -0
  214. package/stat/util/strings.js +34 -0
  215. package/tests/e2e/viewmode.test.js +30 -30
  216. package/tests/jest/BookReader/BookReaderPublicFunctions.test.js +64 -52
  217. package/tests/karma/BookNavigator/book-navigator.test.js +413 -108
  218. package/tests/karma/BookNavigator/bookmarks/bookmark-button.test.js +44 -0
  219. package/tests/karma/BookNavigator/downloads/downloads-provider.test.js +6 -3
  220. package/tests/karma/BookNavigator/search/search-provider.test.js +106 -6
  221. package/tests/karma/BookNavigator/search/search-results.test.js +0 -2
  222. package/tests/karma/BookNavigator/sharing/sharing-provider.test.js +29 -20
  223. package/tests/karma/BookNavigator/volumes/volumes-provider.test.js +41 -17
  224. package/webpack.config.js +1 -1
  225. package/.nvmrc +0 -1
  226. package/BookReader/bookreader-component-bundle.js +0 -1436
  227. package/BookReader/bookreader-component-bundle.js.map +0 -1
  228. package/src/BookNavigator/assets/book-loader.js +0 -27
  229. package/src/ItemNavigator/ItemNavigator.js +0 -377
@@ -0,0 +1,1458 @@
1
+ /*! For license information please see ia-bookreader-bundle.js.LICENSE.txt */
2
+ (self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[64],{2937:function(e,t,n){"use strict";n(2419),n(2526),n(1817),n(1539),n(2165),n(6992),n(8783),n(3948),n(1038),n(7042),n(8309),n(3371),n(489);var o=n(3282);function r(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}var i,s,a,l,c=n(9890);class d{parseValue(e){return("string"!=typeof e||"false"!==e&&"0"!==e)&&Boolean(e)}}d.shared=new d;class u{parseValue(e){if("number"==typeof e)return e;if("boolean"==typeof e)return;const t=parseFloat(e);return Number.isNaN(t)?void 0:t}}u.shared=new u;class h{parseValue(e){return u.shared.parseValue(e)}}h.shared=new h;class p{parseValue(e){return this.parseJSDate(e)||this.parseBracketDate(e)}parseBracketDate(e){if("string"!=typeof e)return;const t=e.match(/\[([0-9]{4})\]/);return!t||t.length<2?void 0:this.parseJSDate(t[1])}parseJSDate(e){if("string"!=typeof e)return;let t=e;t.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}\s{1}[0-9]{2}:[0-9]{2}:[0-9]{2}$/)&&(t=t.replace(" ","T"));const n=Date.parse(t);if(Number.isNaN(n))return;let o=new Date(t);return(t.indexOf("Z")>-1||t.indexOf("+")>-1||t.match(/^[0-9]{4}$/)||t.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/)||t.match(/^.*?-[0-9]{2}:[0-9]{2}$/)||t.match(/^.*?-[0-9]{4}$/))&&(o=new Date(o.getTime()+1e3*o.getTimezoneOffset()*60)),o}}p.shared=new p;class f{parseValue(e){if("number"==typeof e)return e;if("boolean"==typeof e)return;const t=e.split(":");let n;return n=1===t.length?this.parseNumberFormat(t[0]):this.parseColonSeparatedFormat(t),n}parseNumberFormat(e){let t=parseFloat(e);return Number.isNaN(t)&&(t=void 0),t}parseColonSeparatedFormat(e){let t=!1;const n=e.map(((n,o)=>{const r=parseFloat(n);if(Number.isNaN(r))return t=!0,0;const i=60**(e.length-1-o);return r*Math.floor(i)})).reduce(((e,t)=>e+t),0);return t?void 0:n}}f.shared=new f,function(e){e.Audio="audio",e.Collection="collection",e.Data="data",e.Etree="etree",e.Image="image",e.Movies="movies",e.Software="software",e.Texts="texts",e.Web="web"}(i||(i={}));class m{parseValue(e){if("string"==typeof e)switch(e.toLowerCase()){case"audio":return i.Audio;case"collection":return i.Collection;case"data":return i.Data;case"etree":return i.Etree;case"image":return i.Image;case"movies":return i.Movies;case"software":return i.Software;case"texts":return i.Texts;case"web":return i.Web;default:return}}}m.shared=new m,function(e){e.RightToLeft="rl",e.LeftToRight="lr"}(s||(s={}));class v{parseValue(e){if("string"==typeof e)switch(e.toLowerCase()){case"rl":return s.RightToLeft;case"lr":return s.LeftToRight;default:return}}}v.shared=new v;class b{parseValue(e){return String(e)}}b.shared=new b;class g{constructor(e,t){this.values=[],this.parser=e,this.rawValue=t,this.processRawValue()}get value(){return this.values.length>0?this.values[0]:void 0}processRawValue(){void 0!==this.rawValue&&(Array.isArray(this.rawValue)?this.rawValue.forEach((e=>{this.parseAndPersistValue(e)})):this.parseAndPersistValue(this.rawValue))}parseAndPersistValue(e){const t=this.parser.parseValue(e);void 0!==t&&this.values.push(t)}}class y extends g{constructor(e){super(d.shared,e)}}class k extends g{constructor(e){super(p.shared,e)}}class w extends g{constructor(e){super(f.shared,e)}}class C extends g{constructor(e){super(u.shared,e)}}class S extends g{constructor(e){super(b.shared,e)}}class x extends g{constructor(e){super(h.shared,e)}}class O extends g{constructor(e){super(m.shared,e)}}class E{constructor(e){this.rawMetadata=e,this.identifier=e.identifier,this.addeddate=e.addeddate?new k(e.addeddate):void 0,this.publicdate=e.publicdate?new k(e.publicdate):void 0,this.indexdate=e.indexdate?new k(e.indexdate):void 0,this.audio_codec=e.audio_codec?new S(e.audio_codec):void 0,this.audio_sample_rate=e.audio_sample_rate?new C(e.audio_sample_rate):void 0,this.collection=e.collection?new S(e.collection):void 0,this.collections_raw=e.collections_raw?new S(e.collections_raw):void 0,this.collection_size=e.collection_size?new x(e.collection_size):void 0,this.contributor=e.contributor?new S(e.contributor):void 0,this.coverage=e.coverage?new S(e.coverage):void 0,this.creator=e.creator?new S(e.creator):void 0,this.date=e.date?new k(e.date):void 0,this.description=e.description?new S(e.description):void 0,this.downloads=e.downloads?new C(e.downloads):void 0,this.duration=e.duration?new w(e.duration):void 0,this.files_count=e.files_count?new C(e.files_count):void 0,this.item_count=e.item_count?new C(e.item_count):void 0,this.item_size=e.item_size?new x(e.item_size):void 0,this.language=e.language?new S(e.language):void 0,this.length=e.length?new w(e.length):void 0,this.lineage=e.lineage?new S(e.lineage):void 0,this.mediatype=e.mediatype?new O(e.mediatype):void 0,this.month=e.month?new C(e.month):void 0,this.noindex=e.noindex?new y(e.noindex):void 0,this.notes=e.notes?new S(e.notes):void 0,this.num_favorites=e.num_favorites?new C(e.num_favorites):void 0,this.num_reviews=e.num_reviews?new C(e.num_reviews):void 0,this.runtime=e.runtime?new w(e.runtime):void 0,this.scanner=e.scanner?new S(e.scanner):void 0,this.source=e.source?new S(e.source):void 0,this.start_localtime=e.start_localtime?new k(e.start_localtime):void 0,this.start_time=e.start_time?new k(e.start_time):void 0,this.stop_time=e.stop_time?new k(e.stop_time):void 0,this.subject=e.subject?new S(e.subject):void 0,this.taper=e.taper?new S(e.taper):void 0,this.title=e.title?new S(e.title):void 0,this.track=e.track?new C(e.track):void 0,this.transferer=e.transferer?new S(e.transferer):void 0,this.type=e.type?new S(e.type):void 0,this.uploader=e.uploader?new S(e.uploader):void 0,this.utc_offset=e.utc_offset?new C(e.utc_offset):void 0,this.venue=e.venue?new S(e.venue):void 0,this.week=e.week?new C(e.week):void 0,this.year=e.year?new k(e.year):void 0}}class B{constructor(e){this.name=e.name,this.source=e.source,this.btih=e.btih,this.md5=e.md5,this.format=e.format,this.mtime=e.mtime,this.crc32=e.crc32,this.sha1=e.sha1,this.original=e.original,this.title=e.title,this.length=e.length?f.shared.parseValue(e.length):void 0,this.size=e.size?h.shared.parseValue(e.size):void 0,this.height=e.height?u.shared.parseValue(e.height):void 0,this.width=e.width?u.shared.parseValue(e.width):void 0,this.track=e.track?u.shared.parseValue(e.track):void 0,this.external_identifier=e["external-identifier"],this.creator=e.creator,this.album=e.album}}class ${constructor(e){this.reviewbody=e.reviewbody,this.reviewtitle=e.reviewtitle,this.reviewer=e.reviewer,this.reviewdate=p.shared.parseValue(e.reviewdate),this.createdate=p.shared.parseValue(e.createdate),this.stars=e.stars?parseFloat(e.stars):void 0}}class A{constructor(e){var t,n;this.rawResponse=e,this.created=e.created,this.d1=e.d1,this.d2=e.d2,this.dir=e.dir,this.files=null===(t=e.files)||void 0===t?void 0:t.map((e=>new B(e))),this.files_count=e.files_count,this.item_last_updated=e.item_last_updated,this.item_size=e.item_size,this.metadata=new E(e.metadata),this.server=e.server,this.uniq=e.uniq,this.workable_servers=e.workable_servers,this.speech_vs_music_asr=e.speech_vs_music_asr,this.reviews=null===(n=e.reviews)||void 0===n?void 0:n.map((e=>new $(e)))}}class _{constructor(e){this.numFound=e.numFound,this.start=e.start,this.docs=e.docs.map((e=>new E(e))),this.aggregations=e.aggregations}}class j{constructor(e){this.rawResponse=e,this.responseHeader=e.responseHeader,this.response=new _(e.response)}}!function(e){e.networkError="SearchService.NetworkError",e.itemNotFound="SearchService.ItemNotFound",e.decodingError="SearchService.DecodingError",e.searchEngineError="SearchService.SearchEngineError"}(a||(a={}));class I extends Error{constructor(e,t,n){super(t),this.name=e,this.type=e,this.details=n}}class z{constructor(e){this.searchBackend=e}async search(e){const t=await this.searchBackend.performSearch(e);return t.error?t:{success:new j(t.success)}}async fetchMetadata(e){var t;const n=await this.searchBackend.fetchMetadata(e);return n.error?n:void 0===(null===(t=n.success)||void 0===t?void 0:t.metadata)?{error:new I(a.itemNotFound)}:{success:new A(n.success)}}}z.default=new z(new class{constructor(e="archive.org"){this.baseUrl=e}async performSearch(e){const t=e.asUrlSearchParams.toString(),n=`https://${this.baseUrl}/advancedsearch.php?${t}`;return this.fetchUrl(n)}async fetchMetadata(e){const t=`https://${this.baseUrl}/metadata/${e}`;return this.fetchUrl(t)}async fetchUrl(e){let t;try{t=await fetch(e)}catch(e){const t=e instanceof Error?e.message:e;return this.getErrorResult(a.networkError,t)}try{const e=await t.json(),n=e.error;if(n){const t=e.forensics;return this.getErrorResult(a.searchEngineError,n,t)}return{success:e}}catch(e){const t=e instanceof Error?e.message:e;return this.getErrorResult(a.decodingError,t)}}getErrorResult(e,t,n){return{error:new I(e,t,n)}}}),function(e){e.Asc="asc",e.Desc="desc"}(l||(l={}));const M=o.iv`42px`,L=o.iv`var(--menuWidth, 320px)`,T=o.iv`var(--animationTiming, 200ms)`;var P=o.iv`
3
+
4
+ .main {
5
+ overflow: hidden;
6
+ width: 100%;
7
+ height: 100%;
8
+ }
9
+
10
+ .animate {
11
+ transition: transform ${T} ease-out;
12
+ }
13
+
14
+ .menu {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ bottom: 0;
19
+ width: ${L};
20
+ padding: .5rem .5rem 0 0;
21
+ box-sizing: border-box;
22
+ font-size: 1.4rem;
23
+ color: var(--primaryTextColor);
24
+ background: var(--menuSliderBg);
25
+ transform: translateX(calc(${L} * -1));
26
+ }
27
+
28
+ .menu > button.close {
29
+ right: 0.7rem;
30
+ }
31
+
32
+ button {
33
+ outline: none;
34
+ cursor: pointer;
35
+ }
36
+
37
+ header {
38
+ margin: 0 0 .5rem 0;
39
+ }
40
+
41
+ header * {
42
+ margin: 0;
43
+ display: inline-block;
44
+ }
45
+ header button {
46
+ outline: none;
47
+ cursor: pointer;
48
+ }
49
+
50
+ header.with-secondary-action .details {
51
+ width: 80%;
52
+ }
53
+
54
+ header .details {
55
+ font-weight: bold;
56
+ width: 88%;
57
+ }
58
+
59
+ header .custom-action > *,
60
+ button.close {
61
+ padding: 0;
62
+ background-color: transparent;
63
+ border: 0;
64
+ --iconWidth: var(--menuSliderHeaderIconWidth);
65
+ --iconHeight: var(--menuSliderHeaderIconHeight);
66
+ }
67
+
68
+ header .custom-action,
69
+ button.close {
70
+ position: absolute;
71
+ }
72
+ button.close {
73
+ right: .5rem;
74
+ }
75
+
76
+ button.close * {
77
+ float: right;
78
+ }
79
+
80
+ .content {
81
+ position: absolute;
82
+ top: 0;
83
+ right: 0;
84
+ bottom: 0;
85
+ left: ${M};
86
+ z-index: 1;
87
+ transform: translateX(calc(${L} * -1));
88
+ transition: transform ${T} ease-out;
89
+ background: var(--activeButtonBg);
90
+ border-right: .2rem solid;
91
+ border-color: var(--subpanelRightBorderColor);
92
+ padding: .5rem 0 0 .5rem;
93
+ }
94
+
95
+ .open {
96
+ transform: translateX(0);
97
+ }
98
+
99
+ .menu-list {
100
+ padding: 0;
101
+ margin: 0;
102
+ list-style: none;
103
+ background: var(--menuSliderBg);
104
+ }
105
+ .menu-list li {
106
+ margin-bottom: .2rem;
107
+ }
108
+
109
+ .content section {
110
+ height: 100%;
111
+ position: relative;
112
+ width: 100%;
113
+ }
114
+
115
+ .content .selected-menu {
116
+ overflow: auto;
117
+ height: inherit;
118
+ position: relative;
119
+ }
120
+
121
+ .content .selected-menu > * {
122
+ display: block;
123
+ padding-bottom: 3rem;
124
+ position: relative;
125
+ }
126
+ `;const D=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,R=Symbol(),H=new Map;class N{constructor(e,t){if(this._$cssResult$=!0,t!==R)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=H.get(this.cssText);return D&&void 0===e&&(H.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const F=e=>new N("string"==typeof e?e:e+"",R),U=(e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,n,o)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[o+1]),e[0]);return new N(n,R)},V=D?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return F(t)})(e):e;var W;const q=window.trustedTypes,Z=q?q.emptyScript:"",G=window.reactiveElementPolyfillSupport,X={toAttribute(e,t){switch(t){case Boolean:e=e?Z:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Y=(e,t)=>t!==e&&(t==t||e==e),J={attribute:!0,type:String,converter:X,reflect:!1,hasChanged:Y};class Q extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,n)=>{const o=this._$Eh(n,t);void 0!==o&&(this._$Eu.set(o,n),e.push(o))})),e}static createProperty(e,t=J){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n="symbol"==typeof e?Symbol():"__"+e,o=this.getPropertyDescriptor(e,n,t);void 0!==o&&Object.defineProperty(this.prototype,e,o)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(o){const r=this[e];this[t]=o,this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||J}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(V(e))}else void 0!==e&&t.push(V(e));return t}static _$Eh(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,n;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{D?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const n=document.createElement("style"),o=window.litNonce;void 0!==o&&n.setAttribute("nonce",o),n.textContent=t.cssText,e.appendChild(n)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ES(e,t,n=J){var o,r;const i=this.constructor._$Eh(e,n);if(void 0!==i&&!0===n.reflect){const s=(null!==(r=null===(o=n.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==r?r:X.toAttribute)(t,n.type);this._$Ei=e,null==s?this.removeAttribute(i):this.setAttribute(i,s),this._$Ei=null}}_$AK(e,t){var n,o,r;const i=this.constructor,s=i._$Eu.get(e);if(void 0!==s&&this._$Ei!==s){const e=i.getPropertyOptions(s),a=e.converter,l=null!==(r=null!==(o=null===(n=a)||void 0===n?void 0:n.fromAttribute)&&void 0!==o?o:"function"==typeof a?a:null)&&void 0!==r?r:X.fromAttribute;this._$Ei=s,this[s]=l(t,e.type),this._$Ei=null}}requestUpdate(e,t,n){let o=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Y)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$Ei!==e&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(e,n))):o=!1),!this.isUpdatePending&&o&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((e,t)=>this[t]=e)),this._$Et=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(n)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$E_&&(this._$E_.forEach(((e,t)=>this._$ES(t,this[t],e))),this._$E_=void 0),this._$EU()}updated(e){}firstUpdated(e){}}var K;Q.finalized=!0,Q.elementProperties=new Map,Q.elementStyles=[],Q.shadowRootOptions={mode:"open"},null==G||G({ReactiveElement:Q}),(null!==(W=globalThis.reactiveElementVersions)&&void 0!==W?W:globalThis.reactiveElementVersions=[]).push("1.0.2");const ee=globalThis.trustedTypes,te=ee?ee.createPolicy("lit-html",{createHTML:e=>e}):void 0,ne=`lit$${(Math.random()+"").slice(9)}$`,oe="?"+ne,re=`<${oe}>`,ie=document,se=(e="")=>ie.createComment(e),ae=e=>null===e||"object"!=typeof e&&"function"!=typeof e,le=Array.isArray,ce=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,de=/-->/g,ue=/>/g,he=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,pe=/'/g,fe=/"/g,me=/^(?:script|style|textarea)$/i,ve=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),be=ve(1),ge=(ve(2),Symbol.for("lit-noChange")),ye=Symbol.for("lit-nothing"),ke=new WeakMap,we=ie.createTreeWalker(ie,129,null,!1),Ce=(e,t)=>{const n=e.length-1,o=[];let r,i=2===t?"<svg>":"",s=ce;for(let t=0;t<n;t++){const n=e[t];let a,l,c=-1,d=0;for(;d<n.length&&(s.lastIndex=d,l=s.exec(n),null!==l);)d=s.lastIndex,s===ce?"!--"===l[1]?s=de:void 0!==l[1]?s=ue:void 0!==l[2]?(me.test(l[2])&&(r=RegExp("</"+l[2],"g")),s=he):void 0!==l[3]&&(s=he):s===he?">"===l[0]?(s=null!=r?r:ce,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?he:'"'===l[3]?fe:pe):s===fe||s===pe?s=he:s===de||s===ue?s=ce:(s=he,r=void 0);const u=s===he&&e[t+1].startsWith("/>")?" ":"";i+=s===ce?n+re:c>=0?(o.push(a),n.slice(0,c)+"$lit$"+n.slice(c)+ne+u):n+ne+(-2===c?(o.push(void 0),t):u)}const a=i+(e[n]||"<?>")+(2===t?"</svg>":"");return[void 0!==te?te.createHTML(a):a,o]};class Se{constructor({strings:e,_$litType$:t},n){let o;this.parts=[];let r=0,i=0;const s=e.length-1,a=this.parts,[l,c]=Ce(e,t);if(this.el=Se.createElement(l,n),we.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(o=we.nextNode())&&a.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const e=[];for(const t of o.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(ne)){const n=c[i++];if(e.push(t),void 0!==n){const e=o.getAttribute(n.toLowerCase()+"$lit$").split(ne),t=/([.?@])?(.*)/.exec(n);a.push({type:1,index:r,name:t[2],strings:e,ctor:"."===t[1]?$e:"?"===t[1]?_e:"@"===t[1]?je:Be})}else a.push({type:6,index:r})}for(const t of e)o.removeAttribute(t)}if(me.test(o.tagName)){const e=o.textContent.split(ne),t=e.length-1;if(t>0){o.textContent=ee?ee.emptyScript:"";for(let n=0;n<t;n++)o.append(e[n],se()),we.nextNode(),a.push({type:2,index:++r});o.append(e[t],se())}}}else if(8===o.nodeType)if(o.data===oe)a.push({type:2,index:r});else{let e=-1;for(;-1!==(e=o.data.indexOf(ne,e+1));)a.push({type:7,index:r}),e+=ne.length-1}r++}}static createElement(e,t){const n=ie.createElement("template");return n.innerHTML=e,n}}function xe(e,t,n=e,o){var r,i,s,a;if(t===ge)return t;let l=void 0!==o?null===(r=n._$Cl)||void 0===r?void 0:r[o]:n._$Cu;const c=ae(t)?void 0:t._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(i=null==l?void 0:l._$AO)||void 0===i||i.call(l,!1),void 0===c?l=void 0:(l=new c(e),l._$AT(e,n,o)),void 0!==o?(null!==(s=(a=n)._$Cl)&&void 0!==s?s:a._$Cl=[])[o]=l:n._$Cu=l),void 0!==l&&(t=xe(e,l._$AS(e,t.values),l,o)),t}class Oe{constructor(e,t){this.v=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(e){var t;const{el:{content:n},parts:o}=this._$AD,r=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:ie).importNode(n,!0);we.currentNode=r;let i=we.nextNode(),s=0,a=0,l=o[0];for(;void 0!==l;){if(s===l.index){let t;2===l.type?t=new Ee(i,i.nextSibling,this,e):1===l.type?t=new l.ctor(i,l.name,l.strings,this,e):6===l.type&&(t=new Ie(i,this,e)),this.v.push(t),l=o[++a]}s!==(null==l?void 0:l.index)&&(i=we.nextNode(),s++)}return r}m(e){let t=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Ee{constructor(e,t,n,o){var r;this.type=2,this._$AH=ye,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=o,this._$Cg=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cg}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=xe(this,e,t),ae(e)?e===ye||null==e||""===e?(this._$AH!==ye&&this._$AR(),this._$AH=ye):e!==this._$AH&&e!==ge&&this.$(e):void 0!==e._$litType$?this.T(e):void 0!==e.nodeType?this.S(e):(e=>{var t;return le(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])})(e)?this.M(e):this.$(e)}A(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}S(e){this._$AH!==e&&(this._$AR(),this._$AH=this.A(e))}$(e){this._$AH!==ye&&ae(this._$AH)?this._$AA.nextSibling.data=e:this.S(ie.createTextNode(e)),this._$AH=e}T(e){var t;const{values:n,_$litType$:o}=e,r="number"==typeof o?this._$AC(e):(void 0===o.el&&(o.el=Se.createElement(o.h,this.options)),o);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===r)this._$AH.m(n);else{const e=new Oe(r,this),t=e.p(this.options);e.m(n),this.S(t),this._$AH=e}}_$AC(e){let t=ke.get(e.strings);return void 0===t&&ke.set(e.strings,t=new Se(e)),t}M(e){le(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,o=0;for(const r of e)o===t.length?t.push(n=new Ee(this.A(se()),this.A(se()),this,this.options)):n=t[o],n._$AI(r),o++;o<t.length&&(this._$AR(n&&n._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cg=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class Be{constructor(e,t,n,o,r){this.type=1,this._$AH=ye,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=ye}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,o){const r=this.strings;let i=!1;if(void 0===r)e=xe(this,e,t,0),i=!ae(e)||e!==this._$AH&&e!==ge,i&&(this._$AH=e);else{const o=e;let s,a;for(e=r[0],s=0;s<r.length-1;s++)a=xe(this,o[n+s],t,s),a===ge&&(a=this._$AH[s]),i||(i=!ae(a)||a!==this._$AH[s]),a===ye?e=ye:e!==ye&&(e+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}i&&!o&&this.k(e)}k(e){e===ye?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class $e extends Be{constructor(){super(...arguments),this.type=3}k(e){this.element[this.name]=e===ye?void 0:e}}const Ae=ee?ee.emptyScript:"";class _e extends Be{constructor(){super(...arguments),this.type=4}k(e){e&&e!==ye?this.element.setAttribute(this.name,Ae):this.element.removeAttribute(this.name)}}class je extends Be{constructor(e,t,n,o,r){super(e,t,n,o,r),this.type=5}_$AI(e,t=this){var n;if((e=null!==(n=xe(this,e,t,0))&&void 0!==n?n:ye)===ge)return;const o=this._$AH,r=e===ye&&o!==ye||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,i=e!==ye&&(o===ye||r);r&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}class Ie{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){xe(this,e)}}const ze=window.litHtmlPolyfillSupport;var Me,Le;null==ze||ze(Se,Ee),(null!==(K=globalThis.litHtmlVersions)&&void 0!==K?K:globalThis.litHtmlVersions=[]).push("2.0.2");class Te extends Q{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Dt=((e,t,n)=>{var o,r;const i=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:t;let s=i._$litPart$;if(void 0===s){const e=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;i._$litPart$=s=new Ee(t.insertBefore(se(),e),e,void 0,null!=n?n:{})}return s._$AI(e),s})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!1)}render(){return ge}}Te.finalized=!0,Te._$litElement$=!0,null===(Me=globalThis.litElementHydrateSupport)||void 0===Me||Me.call(globalThis,{LitElement:Te});const Pe=globalThis.litElementPolyfillSupport;null==Pe||Pe({LitElement:Te}),(null!==(Le=globalThis.litElementVersions)&&void 0!==Le?Le:globalThis.litElementVersions=[]).push("3.0.2");var De=be`
127
+ <svg
128
+ viewBox="0 0 18 18"
129
+ xmlns="http://www.w3.org/2000/svg"
130
+ aria-labelledby="collapseSidebarTitleID collapseSidebarDescID"
131
+ >
132
+ <title id="collapseSidebarTitleID">Collapse sidebar</title>
133
+ <desc id="collapseSidebarDescID">A circle with a left pointing chevron</desc>
134
+ <path d="m9 0c4.9705627 0 9 4.02943725 9 9 0 4.9705627-4.0294373 9-9 9-4.97056275 0-9-4.0294373-9-9 0-4.97056275 4.02943725-9 9-9zm1.6976167 5.28352881c-.365258-.3556459-.9328083-.37581056-1.32099801-.06558269l-.09308988.0844372-3 3.08108108-.08194436.09533317c-.27484337.36339327-.26799482.87009349.01656959 1.22592581l.084491.09308363 3 2.91891889.09533796.0818904c.3633964.2746544.8699472.2677153 1.2256839-.0167901l.093059-.0844712.0818904-.095338c.2746544-.3633964.2677153-.8699472-.0167901-1.2256839l-.0844712-.093059-2.283355-2.2222741 2.3024712-2.36338332.0819252-.09530804c.2997677-.39632298.2644782-.96313393-.1007797-1.31877983z" fill-rule="evenodd" class="fill-color" />
135
+ </svg>
136
+ `;customElements.define("ia-icon-collapse-sidebar",class extends Te{static get styles(){return U`
137
+ :host {
138
+ width: var(--iconWidth, 'auto');
139
+ height: var(--iconHeight, 'auto');
140
+ }
141
+
142
+ .fill-color {
143
+ fill: var(--iconFillColor);
144
+ }
145
+
146
+ .stroke-color {
147
+ stroke: var(--iconStrokeColor);
148
+ }
149
+ `}render(){return De}});var Re=o.iv`
150
+ a {
151
+ display: inline-block;
152
+ text-decoration: none;
153
+ }
154
+
155
+ .menu-item {
156
+ display: inline-flex;
157
+ width: 100%;
158
+ padding: 0;
159
+ font-size: 1.6rem;
160
+ text-align: left;
161
+ background: transparent;
162
+ -webkit-box-align: center;
163
+ -ms-flex-align: center;
164
+ align-items: center;
165
+ border: none;
166
+ cursor: pointer;
167
+ }
168
+
169
+ button.menu-item {
170
+ -webkit-appearance: none;
171
+ appearance: none;
172
+ border-radius: 0;
173
+ }
174
+
175
+ .menu-item:focus {
176
+ outline: none;
177
+ }
178
+
179
+ .label {
180
+ display: var(--menuButtonLabelDisplay, none);
181
+ padding: 0;
182
+ font-weight: 400;
183
+ color: var(--primaryTextColor);
184
+ text-align: left;
185
+ vertical-align: middle;
186
+ margin-left: 1rem;
187
+ }
188
+
189
+ .menu-details {
190
+ color: var(--primaryTextColor);
191
+ display: inline-block;
192
+ margin-left: .5rem;
193
+ font-style: italic;
194
+ font-size: 1.5rem;
195
+ }
196
+
197
+ .menu-item > .icon {
198
+ position: relative;
199
+ display: inline-flex;
200
+ z-index: 2;
201
+ width: 4.2rem;
202
+ height: 4.2rem;
203
+ vertical-align: middle;
204
+ -webkit-box-align: center;
205
+ -ms-flex-align: center;
206
+ align-items: center;
207
+ -webkit-box-pack: center;
208
+ -ms-flex-pack: center;
209
+ justify-content: center;
210
+ }
211
+
212
+ .menu-item.selected .icon {
213
+ background-color: var(--activeButtonBg);
214
+ border-radius: 1rem 0 0 1rem;
215
+ }
216
+
217
+ .icon .fill-color {
218
+ fill: #999;
219
+ }
220
+
221
+ .icon.active .fill-color {
222
+ fill: #fff;
223
+ }
224
+ `;class He extends o.oi{static get styles(){return Re}static get properties(){return{icon:{type:String},href:{type:String},label:{type:String},menuDetails:{type:String},id:{type:String},selected:{type:Boolean},followable:{type:Boolean}}}constructor(){super(),this.icon="",this.href="",this.label="",this.menuDetails="",this.id="",this.selected=!1,this.followable=!1}onClick(e){e.preventDefault(),this.dispatchMenuTypeSelectedEvent()}dispatchMenuTypeSelectedEvent(){this.dispatchEvent(new CustomEvent("menuTypeSelected",{bubbles:!0,composed:!0,detail:{id:this.id}}))}get buttonClass(){return this.selected?"selected":""}get iconClass(){return this.selected?"active":""}get menuItem(){return o.dy`
225
+ <span class="icon ${this.iconClass}">
226
+ ${this.icon}
227
+ </span>
228
+ <span class="label">${this.label}</span>
229
+ <span class="menu-details">${this.menuDetails}</span>
230
+ `}get linkButton(){return o.dy`
231
+ <a
232
+ href="${this.href}"
233
+ class="menu-item ${this.buttonClass}"
234
+ @click=${this.followable?void 0:this.onClick}
235
+ >${this.menuItem}</a>
236
+ `}get clickButton(){return o.dy`
237
+ <button
238
+ class="menu-item ${this.buttonClass}"
239
+ @click=${this.onClick}
240
+ >
241
+ ${this.menuItem}
242
+ </button>
243
+ `}render(){return this.href?this.linkButton:this.clickButton}}customElements.define("menu-button",He);const Ne={closeDrawer:"menuSliderClosed"};class Fe extends o.oi{static get styles(){return P}static get properties(){return{menus:{type:Array},open:{type:Boolean},manuallyHandleClose:{type:Boolean},selectedMenu:{type:String},selectedMenuAction:{type:Object},animateMenuOpen:{type:Boolean}}}constructor(){super(),this.menus=[],this.open=!1,this.selectedMenu="",this.selectedMenuAction=c.Ld,this.animateMenuOpen=!1,this.manuallyHandleClose=!1}updated(){const{actionButton:e}=this.selectedMenuDetails||{};e!==this.selectedMenuAction&&(this.selectedMenuAction=e||c.Ld)}setSelectedMenu({detail:e}){const{id:t}=e;this.selectedMenu=this.selectedMenu===t?"":t;const{actionButton:n}=this.selectedMenuDetails||{};this.selectedMenuAction=n||c.Ld}closeMenu(){this.manuallyHandleClose||(this.open=!1);const{closeDrawer:e}=Ne,t=new CustomEvent(e,{detail:this.selectedMenuDetails});this.dispatchEvent(t)}get selectedMenuDetails(){return this.menus.find((e=>e.id===this.selectedMenu))}get selectedMenuComponent(){const e=this.selectedMenuDetails;return e&&e.component?e.component:o.dy``}get sliderDetailsClass(){return`${this.animateMenuOpen?"animate":""} ${this.open?"open":""}`}get selectedMenuClass(){return this.selectedMenu?"open":""}get menuItems(){return this.menus.map((e=>o.dy`
244
+ <li>
245
+ <menu-button
246
+ @menuTypeSelected=${this.setSelectedMenu}
247
+ .icon=${e.icon}
248
+ .label=${e.label}
249
+ .menuDetails=${e.menuDetails}
250
+ .id=${e.id}
251
+ .selected=${e.id===this.selectedMenu}
252
+ .followable=${e.followable}
253
+ .href=${e.href}
254
+ ></menu-button>
255
+ </li>
256
+ `))}get renderMenuHeader(){const{label:e="",menuDetails:t=""}=this.selectedMenuDetails||{},n=this.selectedMenuAction?"with-secondary-action":"",r=this.selectedMenuAction?o.dy`<span class="custom-action">${this.selectedMenuAction}</span>`:c.Ld;return o.dy`
257
+ <header class="${n}">
258
+ <div class="details">
259
+ <h3>${e}</h3>
260
+ <span class="extra-details">${t}</span>
261
+ </div>
262
+ ${r}
263
+ ${this.closeButton}
264
+ </header>
265
+ `}get closeButton(){return o.dy`
266
+ <button class="close" aria-label="Close this menu" @click=${this.closeMenu}>
267
+ <ia-icon-collapse-sidebar></ia-icon-collapse-sidebar>
268
+ </button>
269
+ `}render(){return o.dy`
270
+ <div class="main">
271
+ <div class="menu ${this.sliderDetailsClass}">
272
+ ${this.closeButton}
273
+ <ul class="menu-list">
274
+ ${this.menuItems}
275
+ </ul>
276
+ <div class="content ${this.selectedMenuClass}" @menuTypeSelected=${this.setSelectedMenu}>
277
+ ${this.renderMenuHeader}
278
+ <section>
279
+ <div class="selected-menu">
280
+ ${this.selectedMenuComponent}
281
+ </div>
282
+ </section>
283
+ </div>
284
+ </div>
285
+ </div>
286
+ `}}window.customElements.define("ia-menu-slider",Fe);var Ue=be`
287
+ <svg
288
+ viewBox="0 0 40 40"
289
+ xmlns="http://www.w3.org/2000/svg"
290
+ aria-labelledby="ellipsesTitleID ellipsesDescID"
291
+ >
292
+ <title id="ellipsesTitleID">Ellipses icon</title>
293
+ <desc id="ellipsesDescID">An illustration of text ellipses.</desc>
294
+ <path class="fill-color" d="m10.5 17.5c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5c-1.38071187 0-2.5-1.1192881-2.5-2.5s1.11928813-2.5 2.5-2.5zm9.5 0c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5-2.5-1.1192881-2.5-2.5 1.1192881-2.5 2.5-2.5zm9.5 0c1.3807119 0 2.5 1.1192881 2.5 2.5s-1.1192881 2.5-2.5 2.5-2.5-1.1192881-2.5-2.5 1.1192881-2.5 2.5-2.5z" fill-rule="evenodd"/>
295
+ </svg>
296
+ `;customElements.define("ia-icon-ellipses",class extends Te{static get styles(){return U`
297
+ :host {
298
+ width: var(--iconWidth, 'auto');
299
+ height: var(--iconHeight, 'auto');
300
+ }
301
+
302
+ .fill-color {
303
+ fill: var(--iconFillColor);
304
+ }
305
+
306
+ .stroke-color {
307
+ stroke: var(--iconStrokeColor);
308
+ }
309
+ `}render(){return Ue}});let Ve=class extends o.oi{static get properties(){return{title:{type:String}}}get bookIconSvg(){return c.YP`
310
+ <g class="bookIcon" transform="matrix(1 0 0 -1 28 67.362264)">
311
+ <path d="m44.71698 31.6981124v-29.99320678s-18.0956599.30735848-18.6322637-.7171698c-.0633962-.12226414-1.890566-.59207545-2.9745282-.59207545-1.3228302 0-3.5122641 0-4.1286791.74547168-.9707547 1.17452827-18.82811278.71660375-18.82811278.71660375v30.040754l1.83849052.7867924.29094339-28.48188608s15.94981097.15339622 17.09094297-1.10716978c.8145283-.90056602 4.997547-.91641507 5.3450942-.3526415.9611321 1.55716977 14.7101883 1.31716978 17.6077354 1.45981128l.3266038 28.22830118z"/>
312
+ <path d="m40.1129424 33.5957539h-12.8337733c-1.8690565 0-3.1098112-.7545283-3.9299999-1.6279245v-26.70452764l1.2362264-.00792453c.4584906.72962262 3.0922641 1.39415091 3.0922641 1.39415091h10.1298111s1.0381131.01754717 1.5141509.47377357c.5643396.54056602.7913207 1.36981129.7913207 1.36981129z"/>
313
+ <path d="m17.3354713 33.5957539h-12.8337733v-25.37660316s0-.75283017.49358489-1.14113205c.52867924-.41433961 1.3415094-.42849055 1.3415094-.42849055h10.59905631s2.2075471-.52698112 3.0928301-1.39415091l1.2.00792453v26.74245214c-.8201886.8581132-2.0530188 1.59-3.8932074 1.59"/>
314
+ </g>
315
+ `}get icon(){return this.bookIconSvg}get loader(){return c.YP`
316
+ <svg
317
+ height="100"
318
+ viewBox="0 0 100 100"
319
+ width="100"
320
+ xmlns="http://www.w3.org/2000/svg"
321
+ aria-labelledby="item-loading"
322
+ >
323
+ <title id="item-loading">Currently loading viewer.</title>
324
+ <desc>Please wait while we load theater.</desc>
325
+ <g fill="#333" fill-rule="evenodd" class="book-icon">
326
+ ${this.icon}
327
+ <path
328
+ class="ring"
329
+ d="m17.8618849 11.6970233c18.5864635-15.59603144 45.6875867-15.59603102 64.2740497.000001 1.9271446 1.6170806 2.1785128 4.4902567.5614466 6.4174186-1.6170661 1.9271618-4.4902166 2.1785323-6.4173612.5614517-15.1996922-12.75416882-37.3625282-12.75416916-52.5622206-.000001-15.19969387 12.7541707-19.04823077 34.5805019-9.1273354 51.7641499 9.9208955 17.183646 30.7471499 24.7638499 49.3923323 17.9774983 18.6451823-6.7863521 29.7266014-25.9801026 26.2811129-45.5206248-.436848-2.4775114 1.2174186-4.8400696 3.6949079-5.2769215 2.4774893-.4368518 4.8400264 1.2174296 5.2768744 3.694941 4.2132065 23.8945096-9.3373563 47.3649806-32.137028 55.6634567-22.799672 8.2984758-48.2663986-.9707372-60.39785211-21.9832155-12.1314534-21.012481-7.42539173-47.7021198 11.16107351-63.2981544z"
330
+ fill-rule="nonzero"
331
+ />
332
+ </g>
333
+ </svg>
334
+ `}render(){const e=this.title?o.dy`<h2>${this.title}</h2>`:c.Ld;return o.dy`
335
+ <div class="place-holder">
336
+ ${e} ${this.loader}
337
+ <h3>Loading viewer</h3>
338
+ </div>
339
+ `}static get styles(){return o.iv`
340
+ .place-holder {
341
+ width: 30%;
342
+ margin: auto;
343
+ text-align: center;
344
+ color: var(--primaryTextColor);
345
+ }
346
+
347
+ .place-holder {
348
+ position: relative;
349
+ }
350
+
351
+ .place-holder svg {
352
+ display: block;
353
+ width: 60%;
354
+ max-width: 100px;
355
+ height: auto;
356
+ margin: auto;
357
+ }
358
+
359
+ svg * {
360
+ fill: var(--primaryTextColor);
361
+ }
362
+
363
+ svg .ring {
364
+ animation: rotate 1.3s infinite linear;
365
+ transform-origin: 50px 50px;
366
+ transform-box: fill-box;
367
+ display: block; // transform won't work on inline style
368
+ }
369
+
370
+ @keyframes rotate {
371
+ 0% {
372
+ -moz-transform: rotate(-360deg);
373
+ -webkit-transform: rotate(-360deg);
374
+ transform: rotate(-360deg);
375
+ }
376
+ }
377
+ `}};Ve=r([(0,o.Mo)("ia-itemnav-loader")],Ve);let We=class extends o.oi{constructor(){super(...arguments),this.identifier=""}emitLoaded(){this.dispatchEvent(new CustomEvent("loadingStateUpdated",{detail:{loaded:!0}}))}updated(e){e.has("identifier")&&this.emitLoaded()}get downloadUrl(){return`/download/${this.identifier}`}render(){return o.dy`
378
+ <section>
379
+ <h2>THERE IS NO PREVIEW AVAILABLE FOR THIS ITEM</h2>
380
+ <p>
381
+ This item does not appear to have any files that can be experienced on
382
+ Archive.org. <br />
383
+ Please download files in this item to interact with them on your
384
+ computer.
385
+ </p>
386
+ <a href=${this.downloadUrl}>Show all files</a>
387
+ </section>
388
+ `}static get styles(){return o.iv`
389
+ :host {
390
+ color: var(--primaryTextColor, #fff);
391
+ text-align: center;
392
+ }
393
+ section {
394
+ margin: 10% auto 0;
395
+ padding: 0 5%;
396
+ }
397
+ p {
398
+ font-size: 1.4rem;
399
+ }
400
+ a {
401
+ color: var(--primaryTextColor, #fff);
402
+ background-color: rgb(25, 72, 128);
403
+ min-height: 35px;
404
+ outline: none;
405
+ cursor: pointer;
406
+ line-height: normal;
407
+ border-radius: 0.4rem;
408
+ text-align: center;
409
+ vertical-align: middle;
410
+ font-size: 1.4rem;
411
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
412
+ display: inline-block;
413
+ padding: 0.85rem 1.2rem;
414
+ border: 1px solid rgb(197, 209, 223);
415
+ white-space: nowrap;
416
+ appearance: auto;
417
+ box-sizing: border-box;
418
+ user-select: none;
419
+ text-decoration: none;
420
+ }
421
+ `}};var qe;r([(0,o.Cb)({type:String})],We.prototype,"identifier",void 0),We=r([(0,o.Mo)("ia-no-theater-available")],We),function(e){e.OPEN="open"}(qe||(qe={}));let Ze=class extends o.oi{constructor(){super(...arguments),this.baseHost="archive.org",this.signedIn=!1,this.menuContents=[],this.menuShortcuts=[],this.viewportInFullscreen=null,this.menuOpened=!1,this.loaded=null,this.openMenuState="shift"}disconnectedCallback(){this.removeResizeObserver()}updated(e){if(e.has("sharedObserver")){const t=e.get("sharedObserver");null==t||t.removeObserver(this.resizeObserverConfig),this.setResizeObserver()}}handleResize(e){const{width:t}=e.contentRect;this.openMenuState=t<=600?"overlay":"shift"}setResizeObserver(){var e,t;null===(e=this.sharedObserver)||void 0===e||e.addObserver(this.resizeObserverConfig),null===(t=this.sharedObserver)||void 0===t||t.addObserver({target:this.headerSlot,handler:{handleResize:({contentRect:e})=>{e.height&&this.requestUpdate()}}})}removeResizeObserver(){var e;null===(e=this.sharedObserver)||void 0===e||e.removeObserver(this.resizeObserverConfig)}get resizeObserverConfig(){return{handler:this,target:this.frame}}get loaderTitle(){return this.viewportInFullscreen?"Internet Archive":""}get readerHeightStyle(){var e;const t=`calc(100vh - ${(null===(e=this.headerSlot)||void 0===e?void 0:e.offsetHeight)||0}px)`;return this.viewportInFullscreen?`height: ${t}`:""}get loadingArea(){return o.dy`
422
+ <div class="loading-area">
423
+ <div class="loading-view">
424
+ <ia-itemnav-loader .title=${this.loaderTitle}></ia-itemnav-loader>
425
+ </div>
426
+ </div>
427
+ `}slotChange(e,t){var n;const o=null===(n=e.target.assignedNodes())||void 0===n?void 0:n[0];this.dispatchEvent(new CustomEvent("slotChange",{detail:{slot:o,type:t}})),this.requestUpdate()}render(){const e=this.loaded?"":"hidden";return o.dy`
428
+ <div id="frame" class=${`${this.menuClass}`}>
429
+ <slot
430
+ name="theater-header"
431
+ @slotchange=${e=>this.slotChange(e,"header")}
432
+ ></slot>
433
+ <div class="menu-and-reader">
434
+ ${this.shouldRenderMenu?this.renderSideMenu:c.Ld}
435
+ <div
436
+ id="reader"
437
+ class=${e}
438
+ style=${this.readerHeightStyle}
439
+ >
440
+ ${this.renderViewport}
441
+ </div>
442
+ ${this.loaded?c.Ld:this.loadingArea}
443
+ </div>
444
+ </div>
445
+ `}get noTheaterView(){var e,t;return o.dy`<ia-no-theater-available
446
+ .identifier=${null===(t=null===(e=this.item)||void 0===e?void 0:e.metadata)||void 0===t?void 0:t.identifier}
447
+ @loadingStateUpdated=${this.loadingStateUpdated}
448
+ ></ia-no-theater-available>`}get renderViewport(){if(!this.item)return c.Ld;if(this.itemType!==qe.OPEN)return this.noTheaterView;const e=this.loaded?"opacity: 1;":"opacity: 0;";return o.dy`
449
+ <div slot="theater-main" style=${e}>
450
+ <slot
451
+ name="theater-main"
452
+ style=${this.readerHeightStyle}
453
+ @slotchange=${e=>this.slotChange(e,"main")}
454
+ ></slot>
455
+ </div>
456
+ `}loadingStateUpdated(e){const{loaded:t}=e.detail;this.loaded=t||null}manageViewportFullscreen(e){const t=!!e.detail.isFullScreen;this.viewportInFullscreen=t||null;const n=new CustomEvent("fullscreenToggled",{detail:e.detail});this.dispatchEvent(n)}get shouldRenderMenu(){var e;return!!(null===(e=this.menuContents)||void 0===e?void 0:e.length)}toggleMenu(){this.menuOpened=!this.menuOpened}closeMenu(){this.menuOpened=!1}setOpenMenu(e){const{id:t}=e.detail;this.openMenu=t!==this.openMenu?t:void 0}setMenuContents(e){const t=[...e.detail];this.menuContents=t}setMenuShortcuts(e){this.menuShortcuts=[...e.detail]}manageSideMenuEvents(e){const{menuId:t,action:n}=e.detail;t&&("open"===n?this.openShortcut(t):"toggle"===n&&(this.openMenu=t,this.toggleMenu()))}get menuToggleButton(){return o.dy`
457
+ <button
458
+ class="toggle-menu"
459
+ @click=${this.toggleMenu}
460
+ title="Toggle theater side panels"
461
+ >
462
+ <div>
463
+ <ia-icon-ellipses
464
+ style="width: var(--iconWidth); height: var(--iconHeight);"
465
+ ></ia-icon-ellipses>
466
+ </div>
467
+ </button>
468
+ `}get selectedMenuId(){return this.openMenu||""}get renderSideMenu(){const e=this.menuOpened?"":"hidden";return o.dy`
469
+ <nav>
470
+ <div class="minimized">${this.shortcuts} ${this.menuToggleButton}</div>
471
+ <div id="menu" class=${e}>
472
+ <ia-menu-slider
473
+ .menus=${this.menuContents}
474
+ .selectedMenu=${this.selectedMenuId}
475
+ @menuTypeSelected=${this.setOpenMenu}
476
+ @menuSliderClosed=${this.closeMenu}
477
+ manuallyHandleClose
478
+ open
479
+ ></ia-menu-slider>
480
+ </div>
481
+ </nav>
482
+ `}openShortcut(e=""){this.openMenu=e,this.menuOpened=!0}get shortcuts(){const e=this.menuShortcuts.map((({icon:e,id:t})=>"fullscreen"===t?o.dy`${e}`:o.dy`
483
+ <button class="shortcut ${t}" @click="${()=>this.openShortcut(t)}">
484
+ ${e}
485
+ </button>
486
+ `));return o.dy`<div class="shortcuts">${e}</div>`}get menuClass(){return`${this.menuOpened?"open":""} ${this.viewportInFullscreen?"fullscreen":""} ${this.openMenuState}`}static get styles(){const e=o.iv`var(--menuWidth, 320px)`,t=o.iv`var(--animationTiming, 200ms)`,n=o.iv`transform ${t} ease-out`,r=o.iv`var(--theaterMenuMargin, 42px)`,i=o.iv`var(--theaterBgColor, #000)`;return o.iv`
487
+ :host,
488
+ #frame,
489
+ .menu-and-reader {
490
+ min-height: inherit;
491
+ height: inherit;
492
+ position: relative;
493
+ overflow: hidden;
494
+ display: block;
495
+ }
496
+
497
+ :host,
498
+ #frame,
499
+ .menu-and-reader,
500
+ .loading-area,
501
+ .loading-view {
502
+ min-height: inherit;
503
+ height: inherit;
504
+ }
505
+
506
+ slot {
507
+ display: block;
508
+ overflow: hidden;
509
+ }
510
+
511
+ slot * {
512
+ display: block;
513
+ height: inherit;
514
+ }
515
+
516
+ #frame {
517
+ background-color: ${i};
518
+ color-scheme: dark;
519
+ }
520
+
521
+ #frame.fullscreen {
522
+ position: fixed;
523
+ top: 0;
524
+ bottom: 0;
525
+ left: 0;
526
+ right: 0;
527
+ z-index: 9;
528
+ }
529
+
530
+ .loading-view {
531
+ display: flex;
532
+ align-items: center;
533
+ justify-content: center;
534
+ }
535
+
536
+ ia-itemnav-loader {
537
+ display: block;
538
+ width: 100%;
539
+ }
540
+
541
+ .hidden {
542
+ display: none;
543
+ }
544
+
545
+ button {
546
+ cursor: pointer;
547
+ padding: 0;
548
+ border: 0;
549
+ }
550
+
551
+ button:focus,
552
+ button:active {
553
+ outline: none;
554
+ }
555
+
556
+ .menu-and-reader {
557
+ position: relative;
558
+ }
559
+
560
+ nav button {
561
+ background: none;
562
+ }
563
+
564
+ nav .minimized {
565
+ background: rgba(0, 0, 0, 0.7);
566
+ padding-top: 6px;
567
+ position: absolute;
568
+ width: ${r};
569
+ z-index: 2;
570
+ left: 0;
571
+ border-bottom-right-radius: 5%;
572
+ }
573
+
574
+ nav .minimized button {
575
+ width: var(--iconWidth);
576
+ height: var(--iconHeight);
577
+ margin-bottom: 0.2rem;
578
+ margin: auto;
579
+ display: inline-flex;
580
+ vertical-align: middle;
581
+ -webkit-box-align: center;
582
+ align-items: center;
583
+ -webkit-box-pack: center;
584
+ justify-content: center;
585
+ width: ${r};
586
+ height: ${r};
587
+ }
588
+
589
+ nav .minimized button.toggle-menu > * {
590
+ border: 2px solid var(--iconStrokeColor);
591
+ border-radius: var(--iconWidth);
592
+ width: var(--iconWidth);
593
+ height: var(--iconHeight);
594
+ margin: auto;
595
+ }
596
+
597
+ ia-icon-ellipses {
598
+ width: var(--iconWidth);
599
+ height: var(--iconHeight);
600
+ }
601
+
602
+ #menu {
603
+ position: absolute;
604
+ top: 0;
605
+ bottom: 0;
606
+ left: 0;
607
+ z-index: 3;
608
+ overflow: hidden;
609
+ transform: translateX(-${e});
610
+ width: ${e};
611
+ transform: translateX(calc(${e} * -1));
612
+ transition: ${n};
613
+ }
614
+
615
+ #reader {
616
+ position: relative;
617
+ z-index: 1;
618
+ transform: translateX(0);
619
+ width: 100%;
620
+ }
621
+
622
+ .open.overlay #reader {
623
+ transition: none;
624
+ }
625
+
626
+ .open #menu {
627
+ width: ${e};
628
+ transform: translateX(0);
629
+ transition: ${n};
630
+ }
631
+
632
+ .open.shift #reader {
633
+ width: calc(100% - var(--menuWidth));
634
+ float: right;
635
+ transition: ${n};
636
+ }
637
+ `}};r([(0,o.Cb)({type:Object,converter:e=>e&&"string"==typeof e?new A(JSON.parse(atob(e))):e})],Ze.prototype,"item",void 0),r([(0,o.Cb)({type:String})],Ze.prototype,"itemType",void 0),r([(0,o.Cb)({type:String})],Ze.prototype,"baseHost",void 0),r([(0,o.Cb)({converter:e=>"boolean"==typeof e?e:"true"===e})],Ze.prototype,"signedIn",void 0),r([(0,o.Cb)({type:Array})],Ze.prototype,"menuContents",void 0),r([(0,o.Cb)({type:Array})],Ze.prototype,"menuShortcuts",void 0),r([(0,o.Cb)({type:Boolean,reflect:!0,attribute:!0})],Ze.prototype,"viewportInFullscreen",void 0),r([(0,o.Cb)({type:Boolean})],Ze.prototype,"menuOpened",void 0),r([(0,o.Cb)({type:String})],Ze.prototype,"openMenu",void 0),r([(0,o.Cb)({attribute:!1})],Ze.prototype,"modal",void 0),r([(0,o.Cb)({attribute:!1})],Ze.prototype,"sharedObserver",void 0),r([(0,o.Cb)({type:Boolean,reflect:!0,attribute:!0})],Ze.prototype,"loaded",void 0),r([(0,o.SB)()],Ze.prototype,"openMenuState",void 0),r([(0,o.IO)("#frame")],Ze.prototype,"frame",void 0),r([(0,o.IO)('slot[name="theater-header"]')],Ze.prototype,"headerSlot",void 0),r([(0,o.IO)('slot[name="theater-main"]')],Ze.prototype,"mainSlot",void 0),Ze=r([(0,o.Mo)("ia-item-navigator")],Ze),n(5003),n(4747),n(9337),n(4916),n(4765),n(7941),n(7327),n(561),n(9826),n(5827),n(2222);var Ge,Xe=[],Ye="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Ge||(Ge={}));var Je,Qe=function(e){return Object.freeze(e)},Ke=function(e,t){this.inlineSize=e,this.blockSize=t,Qe(this)},et=function(){function e(e,t,n,o){return this.x=e,this.y=t,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Qe(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),tt=function(e){return e instanceof SVGElement&&"getBBox"in e},nt=function(e){if(tt(e)){var t=e.getBBox(),n=t.width,o=t.height;return!n&&!o}var r=e,i=r.offsetWidth,s=r.offsetHeight;return!(i||s||e.getClientRects().length)},ot=function(e){var t,n;if(e instanceof Element)return!0;var o=null===(n=null===(t=e)||void 0===t?void 0:t.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(o&&e instanceof o.Element)},rt="undefined"!=typeof window?window:{},it=new WeakMap,st=/auto|scroll/,at=/^tb|vertical/,lt=/msie|trident/i.test(rt.navigator&&rt.navigator.userAgent),ct=function(e){return parseFloat(e||"0")},dt=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Ke((n?t:e)||0,(n?e:t)||0)},ut=Qe({devicePixelContentBoxSize:dt(),borderBoxSize:dt(),contentBoxSize:dt(),contentRect:new et(0,0,0,0)}),ht=function(e,t){if(void 0===t&&(t=!1),it.has(e)&&!t)return it.get(e);if(nt(e))return it.set(e,ut),ut;var n=getComputedStyle(e),o=tt(e)&&e.ownerSVGElement&&e.getBBox(),r=!lt&&"border-box"===n.boxSizing,i=at.test(n.writingMode||""),s=!o&&st.test(n.overflowY||""),a=!o&&st.test(n.overflowX||""),l=o?0:ct(n.paddingTop),c=o?0:ct(n.paddingRight),d=o?0:ct(n.paddingBottom),u=o?0:ct(n.paddingLeft),h=o?0:ct(n.borderTopWidth),p=o?0:ct(n.borderRightWidth),f=o?0:ct(n.borderBottomWidth),m=u+c,v=l+d,b=(o?0:ct(n.borderLeftWidth))+p,g=h+f,y=a?e.offsetHeight-g-e.clientHeight:0,k=s?e.offsetWidth-b-e.clientWidth:0,w=r?m+b:0,C=r?v+g:0,S=o?o.width:ct(n.width)-w-k,x=o?o.height:ct(n.height)-C-y,O=S+m+k+b,E=x+v+y+g,B=Qe({devicePixelContentBoxSize:dt(Math.round(S*devicePixelRatio),Math.round(x*devicePixelRatio),i),borderBoxSize:dt(O,E,i),contentBoxSize:dt(S,x,i),contentRect:new et(u,l,S,x)});return it.set(e,B),B},pt=function(e,t,n){var o=ht(e,n),r=o.borderBoxSize,i=o.contentBoxSize,s=o.devicePixelContentBoxSize;switch(t){case Ge.DEVICE_PIXEL_CONTENT_BOX:return s;case Ge.BORDER_BOX:return r;default:return i}},ft=function(e){var t=ht(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Qe([t.borderBoxSize]),this.contentBoxSize=Qe([t.contentBoxSize]),this.devicePixelContentBoxSize=Qe([t.devicePixelContentBoxSize])},mt=function(e){if(nt(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},vt=function(){var e=1/0,t=[];Xe.forEach((function(n){if(0!==n.activeTargets.length){var o=[];n.activeTargets.forEach((function(t){var n=new ft(t.target),r=mt(t.target);o.push(n),t.lastReportedSize=pt(t.target,t.observedBox),r<e&&(e=r)})),t.push((function(){n.callback.call(n.observer,o,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,o=t;n<o.length;n++)(0,o[n])();return e},bt=function(e){Xe.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(mt(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},gt=[],yt=0,kt={attributes:!0,characterData:!0,childList:!0,subtree:!0},wt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ct=function(e){return void 0===e&&(e=0),Date.now()+e},St=!1,xt=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!St){St=!0;var n,o=Ct(e);n=function(){var n=!1;try{n=function(){var e,t=0;for(bt(t);Xe.some((function(e){return e.activeTargets.length>0}));)t=vt(),bt(t);return Xe.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:Ye}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=Ye),window.dispatchEvent(e)),t>0}()}finally{if(St=!1,e=o-Ct(),!yt)return;n?t.run(1e3):e>0?t.run(e):t.start()}},function(e){if(!Je){var t=0,n=document.createTextNode("");new MutationObserver((function(){return gt.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Je=function(){n.textContent=""+(t?t--:t++)}}gt.push(e),Je()}((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,kt)};document.body?t():rt.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),wt.forEach((function(t){return rt.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),wt.forEach((function(t){return rt.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Ot=function(e){!yt&&e>0&&xt.start(),!(yt+=e)&&xt.stop()},Et=function(){function e(e,t){this.target=e,this.observedBox=t||Ge.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=pt(this.target,this.observedBox,!0);return e=this.target,tt(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Bt=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},$t=new WeakMap,At=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},_t=function(){function e(){}return e.connect=function(e,t){var n=new Bt(e,t);$t.set(e,n)},e.observe=function(e,t,n){var o=$t.get(e),r=0===o.observationTargets.length;At(o.observationTargets,t)<0&&(r&&Xe.push(o),o.observationTargets.push(new Et(t,n&&n.box)),Ot(1),xt.schedule())},e.unobserve=function(e,t){var n=$t.get(e),o=At(n.observationTargets,t),r=1===n.observationTargets.length;o>=0&&(r&&Xe.splice(Xe.indexOf(n),1),n.observationTargets.splice(o,1),Ot(-1))},e.disconnect=function(e){var t=this,n=$t.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),jt=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");_t.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ot(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");_t.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ot(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");_t.unobserve(this,e)},e.prototype.disconnect=function(){_t.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();const It=window.ResizeObserver||jt;class zt{constructor(){this.resizeObserver=new It((e=>{window.requestAnimationFrame((()=>{for(const t of e){const e=this.resizeHandlers.get(t.target);null==e||e.forEach((e=>{e.handleResize(t)}))}}))})),this.resizeHandlers=new Map}addObserver(e){var t;const n=null!==(t=this.resizeHandlers.get(e.target))&&void 0!==t?t:new Set;n.add(e.handler),this.resizeHandlers.set(e.target,n),this.resizeObserver.observe(e.target,e.options)}removeObserver(e){const t=this.resizeHandlers.get(e.target);t&&(this.resizeObserver.unobserve(e.target),t.delete(e.handler),0===t.size&&this.resizeHandlers.delete(e.target))}}class Mt{constructor(e){var t,n,o,r,i;this.title=null==e?void 0:e.title,this.subtitle=null==e?void 0:e.subtitle,this.headline=null==e?void 0:e.headline,this.message=null==e?void 0:e.message,this.headerColor=null!==(t=null==e?void 0:e.headerColor)&&void 0!==t?t:"#55A183",this.showProcessingIndicator=null!==(n=null==e?void 0:e.showProcessingIndicator)&&void 0!==n&&n,this.processingImageMode=null!==(o=null==e?void 0:e.processingImageMode)&&void 0!==o?o:"complete",this.showCloseButton=null===(r=null==e?void 0:e.showCloseButton)||void 0===r||r,this.closeOnBackdropClick=null===(i=null==e?void 0:e.closeOnBackdropClick)||void 0===i||i}}const Lt=Object.freeze({processing:"processing",complete:"complete"});class Tt extends o.oi{static get properties(){return{mode:{type:String}}}constructor(){super(),this.mode=Lt.processing}render(){return o.dy`
638
+ <div class="${this.mode}">
639
+ <svg
640
+ viewBox="0 0 120 120"
641
+ preserveAspectRatio="none"
642
+ version="1.1"
643
+ xmlns="http://www.w3.org/2000/svg"
644
+ xmlns:xlink="http://www.w3.org/1999/xlink"
645
+ aria-labelledby="indicatorTitle indicatorDescription"
646
+ >
647
+ <title id="indicatorTitle">Activity Indicator</title>
648
+ <desc id="indicatorDescription">
649
+ A rotating activity indicator with three dots in the middle.
650
+ </desc>
651
+ <g
652
+ id="icons/check-ring---squared"
653
+ stroke="none"
654
+ stroke-width="1"
655
+ fill="none"
656
+ fill-rule="evenodd"
657
+ >
658
+ <path
659
+ id="completed-ring"
660
+ class="loaded-indicator"
661
+ d="M60,10 C70.5816709,10 80.3955961,13.2871104 88.4763646,18.8959201 L78.3502633,29.0214223 C72.9767592,25.8315427 66.7022695,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 L95.995,59.46 L108.327675,47.128668 C109.350926,50.9806166 109.925886,55.015198 109.993301,59.1731586 L110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z"
662
+ ></path>
663
+ <polygon
664
+ id="check"
665
+ class="loaded-indicator"
666
+ transform="translate(75.000000, 41.500000) rotate(44.000000) translate(-75.000000, -41.500000) "
667
+ points="96 85 54 85 54 65 76 64.999 76 -2 96 -2"
668
+ ></polygon>
669
+ <path
670
+ id="activity-ring"
671
+ class="activity-indicator"
672
+ d="M60,10 C69.8019971,10 78.9452178,12.8205573 86.6623125,17.6943223 L76.4086287,27.9484118 C71.4880919,25.4243078 65.9103784,24 60,24 C40.117749,24 24,40.117749 24,60 C24,79.882251 40.117749,96 60,96 C79.882251,96 96,79.882251 96,60 C96,53.3014663 94.1704984,47.0302355 90.9839104,41.6587228 L101.110332,31.5326452 C106.715332,39.6116982 110,49.4222615 110,60 C110,87.6142375 87.6142375,110 60,110 C32.3857625,110 10,87.6142375 10,60 C10,32.3857625 32.3857625,10 60,10 Z"
673
+ ></path>
674
+ <g
675
+ id="activity-dots"
676
+ class="activity-indicator"
677
+ transform="translate(40.000000, 55.000000)"
678
+ >
679
+ <circle id="left-dot" cx="5" cy="5" r="5"></circle>
680
+ <circle id="middle-dot" cx="20" cy="5" r="5"></circle>
681
+ <circle id="right-dot" cx="35" cy="5" r="5"></circle>
682
+ </g>
683
+ </g>
684
+ </svg>
685
+ </div>
686
+ `}static get styles(){const e=o.iv`var(--activityIndicatorCheckmarkColor, #31A481)`,t=o.iv`var(--activityIndicatorCompletedRingColor, #31A481)`,n=o.iv`var(--activityIndicatorLoadingRingColor, #333333)`,r=o.iv`var(--activityIndicatorLoadingDotColor, #333333)`;return o.iv`
687
+ #completed-ring {
688
+ fill: ${t};
689
+ }
690
+
691
+ #check {
692
+ fill: ${e};
693
+ }
694
+
695
+ #activity-ring {
696
+ fill: ${n};
697
+ }
698
+
699
+ #activity-dots {
700
+ fill: ${r};
701
+ }
702
+
703
+ .activity-indicator {
704
+ opacity: 0;
705
+ transition: opacity 0.25s ease-out;
706
+ }
707
+
708
+ .processing .activity-indicator {
709
+ opacity: 1;
710
+ }
711
+
712
+ .loaded-indicator {
713
+ opacity: 1;
714
+ transition: opacity 0.25s ease-out;
715
+ }
716
+
717
+ .processing .loaded-indicator {
718
+ opacity: 0;
719
+ }
720
+
721
+ .image {
722
+ border: 1px solid red;
723
+ display: inline-block;
724
+ }
725
+
726
+ .processing #activity-ring {
727
+ animation: rotate 1.3s infinite linear;
728
+ transform-origin: 50px 50px;
729
+ transform-box: fill-box;
730
+ }
731
+
732
+ .processing #left-dot {
733
+ opacity: 0;
734
+ animation: dot 1.3s infinite;
735
+ animation-delay: 0.2s;
736
+ }
737
+
738
+ .processing #middle-dot {
739
+ opacity: 0;
740
+ animation: dot 1.3s infinite;
741
+ animation-delay: 0.4s;
742
+ }
743
+
744
+ .processing #right-dot {
745
+ opacity: 0;
746
+ animation: dot 1.3s infinite;
747
+ animation-delay: 0.6s;
748
+ }
749
+
750
+ @keyframes rotate {
751
+ 0% {
752
+ transform: rotate(-360deg);
753
+ }
754
+ }
755
+
756
+ @keyframes dot {
757
+ 0% {
758
+ opacity: 0;
759
+ }
760
+ 25% {
761
+ opacity: 1;
762
+ }
763
+ 100% {
764
+ opacity: 0;
765
+ }
766
+ }
767
+ `}}window.customElements.define("ia-activity-indicator",Tt);var Pt=c.dy`
768
+ <svg
769
+ viewBox="0 0 40 40"
770
+ version="1.1"
771
+ xmlns="http://www.w3.org/2000/svg"
772
+ aria-labelledby="closeTitleID closeDescID"
773
+ >
774
+ <title id="closeTitleID">Close icon</title>
775
+ <desc id="closeDescID">A line drawing of an X</desc>
776
+ <path d="m29.1923882 10.8076118c.5857864.5857865.5857864 1.535534 0 2.1213204l-7.0711162 7.0703398 7.0711162 7.0717958c.5857864.5857864.5857864 1.5355339 0 2.1213204-.5857865.5857864-1.535534.5857864-2.1213204 0l-7.0717958-7.0711162-7.0703398 7.0711162c-.5857864.5857864-1.5355339.5857864-2.1213204 0-.5857864-.5857865-.5857864-1.535534 0-2.1213204l7.0706602-7.0717958-7.0706602-7.0703398c-.5857864-.5857864-.5857864-1.5355339 0-2.1213204.5857865-.5857864 1.535534-.5857864 2.1213204 0l7.0703398 7.0706602 7.0717958-7.0706602c.5857864-.5857864 1.5355339-.5857864 2.1213204 0z" class="fill-color" fill-rule="evenodd"/>
777
+ </svg>
778
+ `,Dt=c.dy`
779
+ <svg
780
+ class="ia-logo"
781
+ viewBox="0 0 27 30"
782
+ xmlns="http://www.w3.org/2000/svg"
783
+ aria-labelledby="logoTitleID logoDescID"
784
+ >
785
+ <title id="logoTitleID">Internet Archive logo</title>
786
+ <desc id="logoDescID">A line drawing of the Internet Archive headquarters building façade.</desc>
787
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
788
+ <mask id="mask-2" class="fill-color">
789
+ <path d="M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z" id="path-1"></path>
790
+ </mask>
791
+ <use class="fill-color" xlink:href="#path-1"></use>
792
+ <g mask="url(#mask-2)" class="fill-color">
793
+ <path d="M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z" id="swatch"></path>
794
+ </g>
795
+ </g>
796
+ </svg>
797
+ `;let Rt=class extends o.oi{constructor(){super(...arguments),this.config=new Mt}render(){return o.dy`
798
+ <div class="modal-wrapper">
799
+ <div class="modal-container">
800
+ <header style="background-color: ${this.config.headerColor}">
801
+ ${this.config.showCloseButton?this.closeButtonTemplate:""}
802
+ <div class="logo-icon">
803
+ ${Dt}
804
+ </div>
805
+ ${this.config.title?o.dy`<h1 class="title">${this.config.title}</h1>`:""}
806
+ ${this.config.subtitle?o.dy`<h2 class="subtitle">${this.config.subtitle}</h2>`:""}
807
+ </header>
808
+ <section class="modal-body">
809
+ <div class="content">
810
+ <div
811
+ class="processing-logo ${this.config.showProcessingIndicator?"":"hidden"}"
812
+ >
813
+ <ia-activity-indicator
814
+ .mode=${this.config.processingImageMode}
815
+ ></ia-activity-indicator>
816
+ </div>
817
+
818
+ ${this.config.headline?o.dy` <h1 class="headline">${this.config.headline}</h1> `:""}
819
+ ${this.config.message?o.dy` <p class="message">${this.config.message}</p> `:""}
820
+
821
+ <div class="slot-container">
822
+ <slot> </slot>
823
+ </div>
824
+ </div>
825
+ </section>
826
+ </div>
827
+ </div>
828
+ `}handleCloseButton(){const e=new Event("closeButtonPressed");this.dispatchEvent(e)}get closeButtonTemplate(){return o.dy`
829
+ <button
830
+ type="button"
831
+ class="close-button"
832
+ tabindex="0"
833
+ @click=${this.handleCloseButton}
834
+ >
835
+ ${Pt}
836
+ </button>
837
+ `}static get styles(){const e=o.iv`var(--modalLogoSize, 6.5rem)`,t=o.iv`var(--processingImageSize, 7.5rem)`,n=o.iv`var(--modalCornerRadius, 1rem)`,r=o.iv`var(--modalBorder, 2px solid black)`,i=o.iv`var(--modalBottomMargin, 2.5rem)`,s=o.iv`var(--modalTopMargin, 5rem)`,a=o.iv`var(--modalHeaderBottomPadding, 0.5em)`,l=o.iv`var(--modalBottomPadding, 2rem)`,c=o.iv`var(--modalScrollOffset, 5px)`,d=o.iv`var(--modalTitleFontSize, 1.8rem)`,u=o.iv`var(--modalSubtitleFontSize, 1.4rem)`,h=o.iv`var(--modalHeadlineFontSize, 1.6rem)`,p=o.iv`var(--modalMessageFontSize, 1.4rem)`,f=o.iv`var(--modalTitleLineHeight, normal)`,m=o.iv`var(--modalSubtitleLineHeight, normal)`,v=o.iv`var(--modalHeadlineLineHeight, normal)`,b=o.iv`var(--modalMessageLineHeight, normal)`;return o.iv`
838
+ .processing-logo {
839
+ margin: auto;
840
+ width: ${t};
841
+ height: ${t};
842
+ }
843
+
844
+ .processing-logo.hidden {
845
+ height: 1rem;
846
+ }
847
+
848
+ .processing-logo.hidden ia-activity-indicator {
849
+ display: none;
850
+ }
851
+
852
+ .modal-wrapper {
853
+ outline: none;
854
+ }
855
+
856
+ .modal-container {
857
+ border-radius: ${n};
858
+ width: 100%;
859
+ margin-top: ${s};
860
+ }
861
+
862
+ header {
863
+ position: relative;
864
+ background-color: #36a483;
865
+ color: white;
866
+ border-radius: calc(${n}) calc(${n}) 0 0;
867
+ border: ${r};
868
+ border-bottom: 0;
869
+ text-align: center;
870
+ padding-bottom: ${a};
871
+ }
872
+
873
+ .title {
874
+ margin: 0;
875
+ padding: 0;
876
+ font-size: ${d};
877
+ font-weight: bold;
878
+ line-height: ${f};
879
+ }
880
+
881
+ .subtitle {
882
+ margin: 0;
883
+ padding: 0;
884
+ font-weight: normal;
885
+ padding-top: 0;
886
+ font-size: ${u};
887
+ line-height: ${m};
888
+ }
889
+
890
+ .modal-body {
891
+ background-color: #f5f5f7;
892
+ border-radius: 0 0 calc(${n}) calc(${n});
893
+ border: ${r};
894
+ border-top: 0;
895
+ padding: 0 1rem calc(${l} - ${c}) 1rem;
896
+ color: #333;
897
+ margin-bottom: 2.5rem;
898
+ min-height: 5rem;
899
+ }
900
+
901
+ .content {
902
+ overflow-y: auto;
903
+ max-height: calc(100vh - (16.5rem + ${i}));
904
+ min-height: 5rem;
905
+ padding: 0 0 calc(${c}) 0;
906
+ }
907
+
908
+ .headline {
909
+ font-size: ${h};
910
+ font-weight: bold;
911
+ text-align: center;
912
+ line-height: ${v};
913
+ margin: 0;
914
+ padding: 0;
915
+ }
916
+
917
+ .message {
918
+ margin: 1rem 0 0 0;
919
+ text-align: center;
920
+ font-size: ${p};
921
+ line-height: ${b};
922
+ }
923
+
924
+ .logo-icon {
925
+ border-radius: 100%;
926
+ border: 3px solid #fff;
927
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),
928
+ 0 2px 2px 0 rgba(0, 0, 0, 0.08);
929
+ width: ${e};
930
+ height: ${e};
931
+ margin: -2.9rem auto 0.5rem auto;
932
+ background-color: black;
933
+ display: flex;
934
+ justify-content: center;
935
+ align-items: center;
936
+ }
937
+
938
+ .logo-icon svg {
939
+ width: calc(${e} * 0.65);
940
+ height: calc(${e} * 0.65);
941
+ }
942
+
943
+ .logo-icon svg .fill-color {
944
+ fill: white;
945
+ }
946
+
947
+ .logo-icon svg .stroke-color {
948
+ stroke: red;
949
+ }
950
+
951
+ .close-button {
952
+ position: absolute;
953
+ right: 1.2rem;
954
+ top: 1.2rem;
955
+ width: 2rem;
956
+ height: 2rem;
957
+ border-radius: 100%;
958
+ border: 0;
959
+ padding: 0;
960
+ cursor: pointer;
961
+ background-color: white;
962
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),
963
+ 0 4px 4px 0 rgba(0, 0, 0, 0.08);
964
+ }
965
+ `}};r([(0,o.Cb)({type:Object})],Rt.prototype,"config",void 0),Rt=r([(0,o.Mo)("modal-template")],Rt);var Ht,Nt=n(3774);!function(e){e.Open="open",e.Closed="closed"}(Ht||(Ht={}));class Ft{constructor(e){this.windowResizeThrottler=(0,Nt.throttle)(100,!1,this.updateModalContainerHeight).bind(this),this.modalManager=e}handleModeChange(e){switch(e){case Ht.Open:this.startResizeListener(),this.stopDocumentScroll();break;case Ht.Closed:this.stopResizeListener(),this.resumeDocumentScroll()}}updateModalContainerHeight(){this.modalManager.style.setProperty("--containerHeight",`${window.innerHeight}px`)}stopDocumentScroll(){document.body.classList.add("modal-manager-open")}resumeDocumentScroll(){document.body.classList.remove("modal-manager-open")}startResizeListener(){window.addEventListener("resize",this.windowResizeThrottler)}stopResizeListener(){window.removeEventListener("resize",this.windowResizeThrottler)}}let Ut=class extends o.oi{constructor(){super(...arguments),this.mode=Ht.Closed,this.hostBridge=new Ft(this),this.closeOnBackdropClick=!0}render(){return o.dy`
966
+ <div class="container">
967
+ <div class="backdrop" @click=${this.backdropClicked}></div>
968
+ <modal-template
969
+ @closeButtonPressed=${this.closeButtonPressed}
970
+ tabindex="0"
971
+ >
972
+ ${this.customModalContent}
973
+ </modal-template>
974
+ </div>
975
+ `}getMode(){return this.mode}closeModal(){this.mode=Ht.Closed}callUserClosedModalCallback(){const e=this.userClosedModalCallback;this.userClosedModalCallback=void 0,e&&e()}showModal(e){return function(e,t,n,o){return new(n||(n=Promise))((function(t,r){function i(e){try{a(o.next(e))}catch(e){r(e)}}function s(e){try{a(o.throw(e))}catch(e){r(e)}}function a(e){e.done?t(e.value):new n((function(t){t(e.value)})).then(i,s)}a((o=o.apply(e,[])).next())}))}(this,0,void 0,(function*(){this.closeOnBackdropClick=e.config.closeOnBackdropClick,this.userClosedModalCallback=e.userClosedModalCallback,this.modalTemplate.config=e.config,this.customModalContent=e.customModalContent,this.mode=Ht.Open,yield this.modalTemplate.updateComplete,this.modalTemplate.focus()}))}updated(e){e.has("mode")&&this.handleModeChange()}backdropClicked(){this.closeOnBackdropClick&&(this.closeModal(),this.callUserClosedModalCallback())}handleModeChange(){this.hostBridge.handleModeChange(this.mode),this.emitModeChangeEvent()}emitModeChangeEvent(){const e=new CustomEvent("modeChanged",{detail:{mode:this.mode}});this.dispatchEvent(e)}closeButtonPressed(){this.closeModal(),this.callUserClosedModalCallback()}static get styles(){const e=o.iv`var(--modalBackdropColor, rgba(10, 10, 10, 0.9))`,t=o.iv`var(--modalBackdropZindex, 1000)`,n=o.iv`var(--modalWidth, 32rem)`,r=o.iv`var(--modalMaxWidth, 95%)`,i=o.iv`var(--modalZindex, 2000)`;return o.iv`
976
+ .container {
977
+ width: 100%;
978
+ height: 100%;
979
+ }
980
+
981
+ .backdrop {
982
+ position: fixed;
983
+ top: 0;
984
+ left: 0;
985
+ background-color: ${e};
986
+ width: 100%;
987
+ height: 100%;
988
+ z-index: ${t};
989
+ }
990
+
991
+ modal-template {
992
+ outline: 0;
993
+ position: fixed;
994
+ top: 0;
995
+ left: 50%;
996
+ transform: translate(-50%, 0);
997
+ z-index: ${i};
998
+ width: ${n};
999
+ max-width: ${r};
1000
+ }
1001
+ `}};r([(0,o.Cb)({type:String,reflect:!0})],Ut.prototype,"mode",void 0),r([(0,o.Cb)({type:Object})],Ut.prototype,"customModalContent",void 0),r([(0,o.Cb)({type:Object})],Ut.prototype,"hostBridge",void 0),r([(0,o.IO)("modal-template")],Ut.prototype,"modalTemplate",void 0),Ut=r([(0,o.Mo)("modal-manager")],Ut),n(4723);var Vt=c.dy`
1002
+ <svg
1003
+ viewBox="0 0 18 18"
1004
+ xmlns="http://www.w3.org/2000/svg"
1005
+ aria-labelledby="searchTitleID searchDescID"
1006
+ >
1007
+ <title id="searchTitleID">Search icon</title>
1008
+ <desc id="searchDescID">Search for something.</desc>
1009
+ <path
1010
+ class="fill-color"
1011
+ fill="none"
1012
+ d="m7 0c3.854149 0 7 3.1458514 7 7 0 1.5717634-.529107 3.020558-1.410156 4.191406.0416324.03077.0808125.0647264.117187.101563l4.335938 4.335937c.3904239.3905071.3904239 1.0235559 0 1.414063-.3905071.3904239-1.0235559.3904239-1.414063 0l-4.335937-4.335938c-.0362414-.0370712-.0695452-.0769047-.09961-.11914-1.171224.882043-2.6206167 1.412109-4.193359 1.412109-3.8541486 0-7-3.145851-7-7 0-3.8541486 3.1458514-7 7-7zm0 2c-2.7732684 0-5 2.2267316-5 5s2.2267316 5 5 5 5-2.2267316 5-5-2.2267316-5-5-5z" />
1013
+ </svg>
1014
+ `;class Wt extends o.oi{static get styles(){return o.iv`
1015
+ :host {
1016
+ width: var(--iconWidth, 'auto');
1017
+ height: var(--iconHeight, 'auto');
1018
+ }
1019
+
1020
+ .fill-color {
1021
+ fill: var(--iconFillColor);
1022
+ }
1023
+
1024
+ .stroke-color {
1025
+ stroke: var(--iconStrokeColor);
1026
+ }
1027
+ `}render(){return Vt}}customElements.define("ia-icon-search",Wt),n(1249),n(4603),n(9714),n(5306),n(3161),n(9653),n(4129);var qt,Zt,Gt,Xt,Yt=n(7552),Jt=new WeakMap,Qt=(0,c.XM)((function(e){return function(t){if(!(t instanceof c.nt))throw new Error("unsafeHTML can only be used in text bindings");var n=Jt.get(t);if(void 0===n||!(0,Yt.pt)(e)||e!==n.value||t.value!==n.fragment){var o=document.createElement("template");o.innerHTML=e;var r=document.importNode(o.content,!0);t.setValue(r),Jt.set(t,{value:e,fragment:r})}}}));function Kt(e){return(Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function tn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function nn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function on(e,t){return(on=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rn(e,t){if(t&&("object"===Kt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function sn(e){return(sn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var an,ln=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&on(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=sn(i);if(s){var n=sn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return rn(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).matchRegex=new RegExp("{{{(.+?)}}}","g"),e}return t=l,r=[{key:"properties",get:function(){return{match:{type:Object}}}}],(n=[{key:"createRenderRoot",value:function(){return this}},{key:"highlightedHit",value:function(e){return(0,o.dy)(qt||(qt=tn(["\n <p>","</p>\n "])),Qt(e.replace(this.matchRegex,"<mark>$1</mark>")))}},{key:"resultSelected",value:function(){this.dispatchEvent(new CustomEvent("resultSelected",{bubbles:!0,composed:!0,detail:{match:this.match}}))}},{key:"render",value:function(){var e,t,n=this.match,r=n.par,i=(e=void 0===r?[]:r,t=1,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return en(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?en(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],s=void 0===i?{}:i,a=Number.isInteger(s.page)?(0,o.dy)(Zt||(Zt=tn(['<p class="page-num">Page -',"-</p>"])),s.page):c.Ld,l=(0,o.dy)(Gt||(Gt=tn(['<img src="','" />'])),n.cover);return(0,o.dy)(Xt||(Xt=tn(["\n <li @click=",">\n ","\n <h4>","</h4>\n ","\n ","\n </li>\n "])),this.resultSelected,n.cover?l:c.Ld,n.title||c.Ld,a,this.highlightedHit(n.text))}}])&&nn(t.prototype,n),r&&nn(t,r),l}(o.oi);customElements.define("book-search-result",ln);var cn,dn,un,hn,pn,fn,mn,vn,bn,gn,yn,kn,wn,Cn,Sn,xn,On,En,Bn,$n=(0,o.iv)(an||(cn=["data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwIiB2aWV3Qm94PSIwIDAgMTMgMTAiIHdpZHRoPSIxMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNC4zMzMzMzMzMyAxMC00LjMzMzMzMzMzLTQuMTY2NjY2NjcgMS43MzMzMzMzMy0xLjY2NjY2NjY2IDIuNiAyLjUgNi45MzMzMzMzNy02LjY2NjY2NjY3IDEuNzMzMzMzMyAxLjY2NjY2NjY3eiIgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+"],dn||(dn=cn.slice(0)),an=Object.freeze(Object.defineProperties(cn,{raw:{value:Object.freeze(dn)}})))),An=(0,o.iv)(un||(un=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDAgNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgYXJpYS1sYWJlbGxlZGJ5PSJjbG9zZVRpdGxlSUQgY2xvc2VEZXNjSUQiPjxwYXRoIGQ9Ik0yOS4xOTIgMTAuODA4YTEuNSAxLjUgMCAwMTAgMi4xMkwyMi4xMjIgMjBsNy4wNyA3LjA3MmExLjUgMS41IDAgMDEtMi4xMiAyLjEyMWwtNy4wNzMtNy4wNy03LjA3IDcuMDdhMS41IDEuNSAwIDAxLTIuMTIxLTIuMTJsNy4wNy03LjA3My03LjA3LTcuMDdhMS41IDEuNSAwIDAxMi4xMi0yLjEyMUwyMCAxNy44NzhsNy4wNzItNy4wN2ExLjUgMS41IDAgMDEyLjEyMSAweiIgY2xhc3M9ImZpbGwtY29sb3IiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg=="]))),_n=(0,o.iv)(hn||(hn=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n .ia-button {\n min-height: 3rem;\n border: none;\n outline: none;\n cursor: pointer;\n color: var(--primaryTextColor);\n line-height: normal;\n border-radius: .4rem;\n text-align: center;\n vertical-align: middle;\n font-size: 1.4rem;\n display: inline-block;\n padding: .6rem 1.2rem;\n border: 1px solid transparent;\n\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n }\n\n .ia-button.link,\n .ia-button.external {\n min-height: unset;\n text-decoration: none;\n }\n\n .ia-button:disabled,\n .ia-button.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .ia-button.transparent {\n background-color: transparent;\n }\n \n .ia-button.slim {\n padding: 0;\n }\n\n .ia-button.primary {\n background-color: var(--primaryCTAFill);\n border-color: var(--primaryCTABorder);\n }\n\n .ia-button.cancel {\n background-color: var(--primaryErrorCTAFill);\n border-color: var(--primaryErrorCTABorder);\n }\n\n .ia-button.external {\n background: var(--secondaryCTAFill);\n border-color: var(--secondaryCTABorder);\n }\n"])));function jn(e){return(jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function In(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function zn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Mn(e,t){return(Mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ln(e,t){if(t&&("object"===jn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Tn(e){return(Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pn,Dn,Rn,Hn,Nn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mn(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Tn(i);if(s){var n=Tn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ln(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).results=[],e.query="",e.queryInProgress=!1,e.renderHeader=!1,e.renderSearchAllFields=!1,e.displayResultImages=!1,e.errorMessage="",e.bindBookReaderListeners(),e}return t=l,r=[{key:"properties",get:function(){return{results:{type:Array},query:{type:String},queryInProgress:{type:Boolean},renderHeader:{type:Boolean},renderSearchAllFiles:{type:Boolean},displayResultImages:{type:Boolean},errorMessage:{type:String}}}},{key:"styles",get:function(){var e=(0,o.iv)(Sn||(Sn=In(["var(--searchResultText, #adaedc)"]))),t=(0,o.iv)(xn||(xn=In(["var(--searchResultBg, #272958)"]))),n=(0,o.iv)(On||(On=In(["var(--searchResultBorder, #adaedc)"]))),r=(0,o.iv)(En||(En=In(["(--tertiaryBGColor, #333)"]))),i=(0,o.iv)(Bn||(Bn=In(["\n :host {\n display: block;\n height: 100%;\n padding: 1.5rem 1rem 2rem 0;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n mark {\n padding: 0 .2rem;\n color: ",";\n background: ",";\n border: 1px solid ",';\n border-radius: 2px;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 2rem;\n }\n\n header {\n display: flex;\n align-items: center;\n padding: 0 2rem 0 0;\n }\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n\n fieldset {\n padding: 0 0 1rem 0;\n border: none;\n }\n\n [type="checkbox"] {\n display: none;\n }\n\n label {\n display: block;\n text-align: center;\n }\n\n label.checkbox {\n padding-bottom: .5rem;\n font-size: 1.6rem;\n line-height: 150%;\n vertical-align: middle;\n }\n\n label.checkbox:after {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n content: "";\n border-radius: 2px;\n }\n :checked + label.checkbox:after {\n background-image: url(\'','\');\n }\n\n label.checkbox[for="all_files"]:after {\n background: ',' 50% 50% no-repeat;\n border: 1px solid var(--primaryTextColor);\n }\n\n [type="search"] {\n color: var(--primaryTextColor);\n border: 1px solid var(--primaryTextColor);\n -webkit-appearance: textfield;\n width: 100%;\n height: 3rem;\n padding: 0 1.5rem;\n box-sizing: border-box;\n font: normal 1.6rem "Helvetica qNeue", Helvetica, Arial, sans-serif;\n border-radius: 1.5rem;\n background: transparent;\n }\n [type="search"]:focus {\n outline: none;\n }\n [type="search"]::-webkit-search-cancel-button {\n width: 18px;\n height: 18px;\n -webkit-appearance: none;\n appearance: none;\n -webkit-mask: url(\'',"') 0 0 no-repeat;\n mask: url('","') 0 0 no-repeat;\n -webkit-mask-size: 100%;\n mask-size: 100%;\n background: #fff;\n }\n\n p.page-num {\n font-weight: bold;\n padding-bottom: 0;\n }\n\n p.search-cta {\n text-align: center;\n }\n\n .results-container {\n padding-bottom: 2rem;\n }\n\n ul {\n padding: 0 0 2rem 0;\n margin: 0;\n list-style: none;\n }\n\n ul.show-image li {\n display: grid;\n }\n\n li {\n cursor: pointer;\n grid-template-columns: 30px 1fr;\n grid-gap: 0 .5rem;\n }\n\n li img {\n display: block;\n width: 100%;\n }\n\n li h4 {\n grid-column: 2 / 3;\n padding: 0 0 2rem 0;\n margin: 0;\n font-weight: normal;\n }\n\n li p {\n grid-column: 2 / 3;\n padding: 0 0 1.5rem 0;\n margin: 0;\n font-size: 1.2rem;\n }\n\n .loading {\n text-align: center;\n }\n\n .loading p {\n padding: 0 0 1rem 0;\n margin: 0;\n font-size: 1.2rem;\n }\n\n ia-activity-indicator {\n display: block;\n width: 40px;\n height: 40px;\n margin: 0 auto;\n }\n "])),e,t,n,$n,r,An,An);return[_n,i]}}],(n=[{key:"updated",value:function(){this.focusOnInputIfNecessary()}},{key:"bindBookReaderListeners",value:function(){document.addEventListener("BookReader:SearchCallback",this.setResults.bind(this))}},{key:"focusOnInputIfNecessary",value:function(){this.results.length||this.shadowRoot.querySelector("input[type='search']").focus()}},{key:"setResults",value:function(e){var t=e.detail;this.results=t.results}},{key:"setQuery",value:function(e){this.query=e.currentTarget.value}},{key:"performSearch",value:function(e){e.preventDefault();var t=e.currentTarget.querySelector('input[type="search"]');t&&t.value&&this.dispatchEvent(new CustomEvent("bookSearchInitiated",{bubbles:!0,composed:!0,detail:{query:this.query}}))}},{key:"selectResult",value:function(){this.dispatchEvent(new CustomEvent("closeMenu",{bubbles:!0,composed:!0}))}},{key:"cancelSearch",value:function(){this.queryInProgress=!1,this.dispatchSearchCanceled()}},{key:"dispatchSearchCanceled",value:function(){this.dispatchEvent(new Event("bookSearchCanceled"))}},{key:"resultsCount",get:function(){var e=this.results.length;return e?(0,o.dy)(pn||(pn=In(["<p>("," result",")</p>"])),e,e>1?"s":""):c.Ld}},{key:"headerSection",get:function(){var e=(0,o.dy)(fn||(fn=In(["<header>\n <h3>Search inside</h3>\n ","\n </header>"])),this.resultsCount);return this.renderHeader?e:c.Ld}},{key:"searchMultipleControls",get:function(){var e=(0,o.dy)(mn||(mn=In(['\n <input name="all_files" id="all_files" type="checkbox" />\n <label class="checkbox" for="all_files">Search all files</label>\n '])));return this.renderSearchAllFiles?e:c.Ld}},{key:"loadingIndicator",get:function(){return(0,o.dy)(vn||(vn=In(['\n <div class="loading">\n <ia-activity-indicator mode="processing"></ia-activity-indicator>\n <p>Searching</p>\n <button class="ia-button external cancel-search" @click=',">Cancel</button>\n </div>\n "])),this.cancelSearch)}},{key:"resultsSet",get:function(){var e=this,t=this.displayResultImages?"show-image":"";return(0,o.dy)(bn||(bn=In(['\n <ul class="results ','">\n ',"\n </ul>\n "])),t,this.results.map((function(t){return(0,o.dy)(gn||(gn=In(["\n <book-search-result\n .match=","\n @resultSelected=","\n ></book-search-result>\n "])),t,e.selectResult)})))}},{key:"searchForm",get:function(){return(0,o.dy)(yn||(yn=In(['\n <form action="" method="get" @submit=',">\n <fieldset>\n ",'\n <input\n type="search"\n name="query"\n alt="Search inside this book."\n @keyup=',"\n .value=","\n />\n </fieldset>\n </form>\n "])),this.performSearch,this.searchMultipleControls,this.setQuery,this.query)}},{key:"setErrorMessage",get:function(){return(0,o.dy)(kn||(kn=In(['\n <p class="error-message">',"</p>\n "])),this.errorMessage)}},{key:"searchCTA",get:function(){return(0,o.dy)(wn||(wn=In(['<p class="search-cta"><em>Please enter text to search for</em></p>'])))}},{key:"render",value:function(){var e=!(this.queryInProgress||this.errorMessage||this.queryInProgress||this.results.length);return(0,o.dy)(Cn||(Cn=In(["\n ","\n ",'\n <div class="results-container">\n ',"\n ","\n ","\n ","\n </div>\n "])),this.headerSection,this.searchForm,this.queryInProgress?this.loadingIndicator:c.Ld,this.errorMessage?this.setErrorMessage:c.Ld,this.results.length?this.resultsSet:c.Ld,e?this.searchCTA:c.Ld)}}])&&zn(t.prototype,n),r&&zn(t,r),l}(o.oi);function Fn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Un(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("ia-book-search-results",Nn);var Vn,Wn,qn,Zn,Gn,Xn,Yn,Jn,Qn,Kn,eo,to={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},no=function(){function e(t){var n=t.onProviderChange,r=t.bookreader;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onBookSearchInitiated=this.onBookSearchInitiated.bind(this),this.onSearchStarted=this.onSearchStarted.bind(this),this.onSearchRequestError=this.onSearchRequestError.bind(this),this.onSearchResultsClicked=this.onSearchResultsClicked.bind(this),this.onSearchResultsChange=this.onSearchResultsChange.bind(this),this.onSearchResultsCleared=this.onSearchResultsCleared.bind(this),this.searchCanceledInMenu=this.searchCanceledInMenu.bind(this),this.bindEventListeners=this.bindEventListeners.bind(this),this.getMenuDetails=this.getMenuDetails.bind(this),this.getComponent=this.getComponent.bind(this),this.advanceToPage=this.advanceToPage.bind(this),this.updateMenu=this.updateMenu.bind(this),this.onProviderChange=n,this.bookreader=r,this.icon=(0,o.dy)(Pn||(Pn=Fn(['<ia-icon-search style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon-search>']))),this.label="Search inside",this.menuDetails=this.getMenuDetails(),this.id="search",this.component=this.getComponent(),this.bindEventListeners()}var t,n;return t=e,(n=[{key:"getMenuDetails",value:function(){var e=to,t=e.resultsCount,n=e.query;if(e.queryInProgress||!n)return c.Ld;var r=1===t?"result":"results";return(0,o.dy)(Dn||(Dn=Fn(["("," ",")"])),t,r)}},{key:"bindEventListeners",value:function(){var e=this;window.addEventListener("BookReader:SearchStarted",this.onSearchStarted),window.addEventListener("BookReader:SearchCallback",this.onSearchResultsChange),window.addEventListener("BookReader:SearchCallbackEmpty",(function(t){e.onSearchRequestError(t,"noResults")})),window.addEventListener("BookReader:SearchCallbackNotIndexed",(function(t){e.onSearchRequestError(t,"notIndexed")})),window.addEventListener("BookReader:SearchCallbackError",(function(t){e.onSearchRequestError(t)})),window.addEventListener("BookReader:SearchResultsCleared",(function(){e.onSearchResultsCleared()})),window.addEventListener("BookReader:SearchCanceled",(function(t){e.onSearchCanceled(t)}))}},{key:"onSearchCanceled",value:function(){to={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},this.updateMenu({searchCanceled:!0})}},{key:"onSearchStarted",value:function(e){var t=e.detail.props,n=t.term,o=void 0===n?"":n,r=t.instance;r&&(this.bookreader=r),to.query=o,to.results=[],to.resultsCount=0,to.queryInProgress=!0,to.errorMessage="",this.updateMenu()}},{key:"onBookSearchInitiated",value:function(e){var t=e.detail;to.query=t.query,this.bookreader.search(to.query)}},{key:"onSearchRequestError",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=e.detail.props,s=void 0===i?{}:i,a=s.instance,l=void 0===a?null:a;l&&(this.bookreader=l);var c={noResults:"0 results",notIndexed:"This book hasn't been indexed for searching yet. We've just started indexing it,\n so search should be available soon. Please try again later. Thanks!",default:"Sorry, there was an error with your search. Please try again."},d=null!==(t=c[r])&&void 0!==t?t:c.default;to.query=(null==l||null===(n=l.searchResults)||void 0===n?void 0:n.q)||"",to.results=[],to.resultsCount=0,to.queryInProgress=!1,to.errorMessage=(0,o.dy)(Rn||(Rn=Fn(['<p class="error">',"</p>"])),d),this.updateMenu()}},{key:"onSearchResultsChange",value:function(e){var t=e.detail.props,n=void 0===t?{}:t,o=n.instance,r=void 0===o?null:o,i=n.results,s=void 0===i?[]:i;r&&(this.bookreader=r);var a=s.matches||[],l=a.length,c=s.q;to={results:a,resultsCount:l,query:c,queryInProgress:!1,errorMessage:""},this.updateMenu()}},{key:"searchCanceledInMenu",value:function(){var e;null===(e=this.bookreader)||void 0===e||e.cancelSearchRequest()}},{key:"onSearchResultsCleared",value:function(){var e,t;to={query:"",results:[],resultsCount:0,queryInProgress:!1,errorMessage:""},this.updateMenu(),null===(e=this.bookreader)||void 0===e||null===(t=e.searchView)||void 0===t||t.clearSearchFieldAndResults()}},{key:"updateMenu",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.menuDetails=this.getMenuDetails(),this.component=this.getComponent(),this.onProviderChange(this.bookreader,e)}},{key:"getComponent",value:function(){var e=to,t=e.query,n=e.results,r=e.queryInProgress,i=e.errorMessage;return(0,o.dy)(Hn||(Hn=Fn(["\n <ia-book-search-results\n .query=","\n .results=","\n .errorMessage=","\n ?queryInProgress=","\n ?renderSearchAllFiles=","\n @resultSelected=","\n @bookSearchInitiated=","\n @bookSearchResultsCleared=","\n @bookSearchCanceled=","\n ></ia-book-search-results>\n "])),t,n,i,r,!1,this.onSearchResultsClicked,this.onBookSearchInitiated,this.onSearchResultsCleared,this.searchCanceledInMenu)}},{key:"onSearchResultsClicked",value:function(e){var t=e.detail.match.par[0].page;this.advanceToPage(t)}},{key:"advanceToPage",value:function(e){var t=this.bookreader.leafNumToIndex(e);this.bookreader._searchPluginGoToResult(t)}}])&&Un(t.prototype,n),e}(),oo=(n(9601),c.dy`
1028
+ <svg
1029
+ viewBox="0 0 24 24"
1030
+ xmlns="http://www.w3.org/2000/svg"
1031
+ aria-labelledby="downloadTitleID downloadDescID"
1032
+ >
1033
+ <title id="downloadTitleID">Download icon</title>
1034
+ <desc id="downloadDescID">An arrow pointing downward at an empty document tray</desc>
1035
+ <g class="fill-color" fill-rule="nonzero">
1036
+ <path d="m1.04347826 22c-.57629713 0-1.04347826.4477153-1.04347826 1s.46718113 1 1.04347826 1h21.91304344c.5762972 0 1.0434783-.4477153 1.0434783-1s-.4671811-1-1.0434783-1z"/>
1037
+ <path d="m12 0c-.8284271 0-1.5.67526574-1.5 1.50824823v8.0007855h-4.75l6.25 10.49096627 6.25-10.49096627h-4.75v-8.0007855c0-.83298249-.6715729-1.50824823-1.5-1.50824823z"/>
1038
+ </g>
1039
+ </svg>
1040
+ `);class ro extends o.oi{static get styles(){return o.iv`
1041
+ :host {
1042
+ width: var(--iconWidth, 'auto');
1043
+ height: var(--iconHeight, 'auto');
1044
+ }
1045
+
1046
+ .fill-color {
1047
+ fill: var(--iconFillColor);
1048
+ }
1049
+
1050
+ .stroke-color {
1051
+ stroke: var(--iconStrokeColor);
1052
+ }
1053
+ `}render(){return oo}}function io(e){return(io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function so(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ao(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function lo(e,t){return(lo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function co(e,t){if(t&&("object"===io(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function uo(e){return(uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("ia-icon-dl",ro);var ho,po,fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lo(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=uo(i);if(s){var n=uo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return co(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).downloads=[],e.expiration=0,e.renderHeader=!1,e.isBookProtected=!1,e}return t=l,r=[{key:"properties",get:function(){return{downloads:{type:Array},expiration:{type:Number},renderHeader:{type:Boolean},isBookProtected:{type:Boolean}}}},{key:"styles",get:function(){var e=(0,o.iv)(eo||(eo=so(["\n :host {\n display: block;\n height: 100%;\n padding: 1.5rem 0;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n a.close ia-icon {\n --iconWidth: 18px;\n --iconHeight: 18px;\n }\n a.close {\n justify-self: end;\n }\n\n header {\n display: flex;\n align-items: center;\n padding: 0 2rem;\n }\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n header div {\n display: flex;\n align-items: baseline;\n } \n\n h2 {\n font-size: 1.6rem;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.4rem;\n }\n\n ul {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n p {\n margin: .3rem 0 0 0;\n }\n\n li,\n ul + p {\n padding-bottom: 1.2rem;\n font-size: 1.2rem;\n line-height: 140%;\n }\n "])));return[_n,e]}}],(n=[{key:"formatsCount",get:function(){var e=this.downloads.length;return e?(0,o.dy)(Vn||(Vn=so(["<p>"," format","</p>"])),e,e>1?"s":""):(0,o.dy)(Wn||(Wn=so([""])))}},{key:"loanExpiryMessage",get:function(){return this.expiration?(0,o.dy)(qn||(qn=so(["<h2>These files will expire in "," days.</h2>"])),this.expiration):(0,o.dy)(Zn||(Zn=so([""])))}},{key:"renderDownloadOptions",value:function(){return this.downloads.map((function(e){return(0,o.dy)(Gn||(Gn=so(['\n <li>\n <a class="ia-button link primary" href="','">Get ',"</a>\n ","\n </li>\n "])),e.url,e.type,e.note?(0,o.dy)(Xn||(Xn=so(["<p>","</p>"])),e.note):(0,o.dy)(Yn||(Yn=so([""]))))}))}},{key:"header",get:function(){return this.renderHeader?(0,o.dy)(Jn||(Jn=so(["\n <header>\n <h3>Downloadable files</h3>\n ","\n </header>\n "])),this.formatsCount):c.Ld}},{key:"accessProtectedBook",get:function(){return(0,o.dy)(Qn||(Qn=so(['\n <p>To access downloaded books, you need Adobe-compliant software on your device. The Internet Archive will administer this loan, but Adobe may also collect some information.</p>\n <a class="ia-button external primary" href="https://www.adobe.com/solutions/ebook/digital-editions/download.html" rel="noopener noreferrer" target="_blank">Install Adobe Digital Editions</a>\n '])))}},{key:"render",value:function(){return(0,o.dy)(Kn||(Kn=so(["\n ","\n ","\n <ul>","</ul>\n ","\n "])),this.header,this.loanExpiryMessage,this.renderDownloadOptions(),this.isBookProtected?this.accessProtectedBook:c.Ld)}}])&&ao(t.prototype,n),r&&ao(t,r),l}(o.oi);function mo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vo(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function bo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function go(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("ia-book-downloads",fo);var yo={pdf:{type:"Encrypted Adobe PDF",url:"#",note:"PDF files contain high quality images of pages."},epub:{type:"Encrypted Adobe ePub",url:"#",note:"ePub files are smaller in size, but may contain errors."}},ko={pdf:"PDF",epub:"ePub"},wo=function(){function e(t){var n,r=t.bookreader;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.icon=(0,o.dy)(ho||(ho=bo(['<ia-icon-dl style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon-dl>']))),this.label="Downloadable files",this.menuDetails="",this.downloads=[],this.id="downloads",this.component="",this.isBookProtected=(null==r||null===(n=r.options)||void 0===n?void 0:n.isProtected)||!1,this.computeAvailableTypes=this.computeAvailableTypes.bind(this),this.update=this.update.bind(this)}var t,n;return t=e,(n=[{key:"update",value:function(e){this.computeAvailableTypes(e),this.component=this.menu,this.component.isBookProtected=this.isBookProtected;var t=1===this.downloads.length?"":"s";this.menuDetails="(".concat(this.downloads.length," format").concat(t,")")}},{key:"computeAvailableTypes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=t.reduce((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=mo(n,2),r=o[0],i=void 0===r?"":r,s=o[1],a=void 0===s?"":s,l=i.toLowerCase(),c=yo[l]||null;if(c){var d=e.isBookProtected?yo[l].type:ko[l],u=Object.assign({},c,{url:a,type:d});t.push(u)}return t}),[]);this.downloads=n}},{key:"menu",get:function(){return(0,o.dy)(po||(po=bo(["<ia-book-downloads .downloads=","></ia-book-downloads>"])),this.downloads)}}])&&go(t.prototype,n),e}(),Co=(n(9600),c.dy`
1054
+ <svg
1055
+ viewBox="0 0 24 24"
1056
+ xmlns="http://www.w3.org/2000/svg"
1057
+ aria-labelledby="visualAdjustmentTitleID visualAdjustmentDescID"
1058
+ >
1059
+ <title id="visualAdjustmentTitleID">Visual adjustment</title>
1060
+ <desc id="visualAdjustmentDescID">A circle with its left hemisphere filled</desc>
1061
+ <path class="fill-color" d="m12 0c6.627417 0 12 5.372583 12 12s-5.372583 12-12 12-12-5.372583-12-12 5.372583-12 12-12zm0 2v20l.2664041-.0034797c5.399703-.1412166 9.7335959-4.562751 9.7335959-9.9965203 0-5.5228475-4.4771525-10-10-10z" fill-rule="evenodd" />
1062
+ </svg>
1063
+ `);class So extends o.oi{static get styles(){return o.iv`
1064
+ :host {
1065
+ width: var(--iconWidth, 'auto');
1066
+ height: var(--iconHeight, 'auto');
1067
+ }
1068
+
1069
+ .fill-color {
1070
+ fill: var(--iconFillColor);
1071
+ }
1072
+
1073
+ .stroke-color {
1074
+ stroke: var(--iconStrokeColor);
1075
+ }
1076
+ `}render(){return Co}}function xo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}customElements.define("ia-icon-visual-adjustment",So),n(1532);var Oo=function(e,t){var n=e.startNode.parentNode,o=void 0===t?e.endNode:t.startNode,r=n.insertBefore((0,c.IW)(),o);n.insertBefore((0,c.IW)(),o);var i=new c.nt(e.options);return i.insertAfterNode(r),i},Eo=function(e,t){return e.setValue(t),e.commit(),e},Bo=function(e,t,n){var o=e.startNode.parentNode,r=n?n.startNode:e.endNode,i=t.endNode.nextSibling;i!==r&&(0,c.V)(o,t.startNode,i,r)},$o=function(e){(0,c.r4)(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},Ao=function(e,t,n){for(var o=new Map,r=t;r<=n;r++)o.set(e[r],r);return o},_o=new WeakMap,jo=new WeakMap,Io=(0,c.XM)((function(e,t,n){var o;return void 0===n?n=t:void 0!==t&&(o=t),function(t){if(!(t instanceof c.nt))throw new Error("repeat can only be used in text bindings");var r,i,s,a=_o.get(t)||[],l=jo.get(t)||[],d=[],u=[],h=[],p=0,f=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return xo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xo(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(e);try{for(f.s();!(r=f.n()).done;){var m=r.value;h[p]=o?o(m,p):p,u[p]=n(m,p),p++}}catch(e){f.e(e)}finally{f.f()}for(var v=0,b=a.length-1,g=0,y=u.length-1;v<=b&&g<=y;)if(null===a[v])v++;else if(null===a[b])b--;else if(l[v]===h[g])d[g]=Eo(a[v],u[g]),v++,g++;else if(l[b]===h[y])d[y]=Eo(a[b],u[y]),b--,y--;else if(l[v]===h[y])d[y]=Eo(a[v],u[y]),Bo(t,a[v],d[y+1]),v++,y--;else if(l[b]===h[g])d[g]=Eo(a[b],u[g]),Bo(t,a[b],a[v]),b--,g++;else if(void 0===i&&(i=Ao(h,g,y),s=Ao(l,v,b)),i.has(l[v]))if(i.has(l[b])){var k=s.get(h[g]),w=void 0!==k?a[k]:null;if(null===w){var C=Oo(t,a[v]);Eo(C,u[g]),d[g]=C}else d[g]=Eo(w,u[g]),Bo(t,w,a[v]),a[k]=null;g++}else $o(a[b]),b--;else $o(a[v]),v++;for(;g<=y;){var S=Oo(t,d[y+1]);Eo(S,u[g]),d[g++]=S}for(;v<=b;){var x=a[v++];null!==x&&$o(x)}_o.set(t,d),jo.set(t,h)}})),zo=c.dy`
1077
+ <svg
1078
+ viewBox="0 0 18 18"
1079
+ xmlns="http://www.w3.org/2000/svg"
1080
+ aria-labelledby="magnify-minusTitleID magnify-minusDescID"
1081
+ >
1082
+ <title id="magnify-minusTitleID">Zoom out</title>
1083
+ <desc id="magnify-minusDescID">Take a look further.</desc>
1084
+ <g
1085
+ class="fill-color"
1086
+ fill="none"
1087
+ fill-rule="nonzero"
1088
+ >
1089
+ <path d="m7 0c3.854149 0 7 3.1458514 7 7 0 1.5717634-.529107 3.020558-1.410156 4.191406.0416324.03077.0808125.0647264.117187.101563l4.335938 4.335937c.3904239.3905071.3904239 1.0235559 0 1.414063-.3905071.3904239-1.0235559.3904239-1.414063 0l-4.335937-4.335938c-.0362414-.0370712-.0695452-.0769047-.09961-.11914-1.171224.882043-2.6206167 1.412109-4.193359 1.412109-3.8541486 0-7-3.145851-7-7 0-3.8541486 3.1458514-7 7-7zm0 2c-2.7732684 0-5 2.2267316-5 5s2.2267316 5 5 5 5-2.2267316 5-5-2.2267316-5-5-5z"/>
1090
+ <path d="m10 7.75v-1.5h-6v1.5z"/>
1091
+ </g>
1092
+ </svg>
1093
+ `;class Mo extends o.oi{static get styles(){return o.iv`
1094
+ :host {
1095
+ width: var(--iconWidth, 'auto');
1096
+ height: var(--iconHeight, 'auto');
1097
+ }
1098
+
1099
+ .fill-color {
1100
+ fill: var(--iconFillColor);
1101
+ }
1102
+
1103
+ .stroke-color {
1104
+ stroke: var(--iconStrokeColor);
1105
+ }
1106
+ `}render(){return zo}}customElements.define("ia-icon-magnify-minus",Mo);var Lo,To,Po,Do,Ro,Ho,No,Fo=c.dy`
1107
+ <svg
1108
+ viewBox="0 0 18 18"
1109
+ xmlns="http://www.w3.org/2000/svg"
1110
+ aria-labelledby="magnify-plusTitleID magnify-plusDescID"
1111
+ >
1112
+ <title id="magnify-plusTitleID">Zoom in</title>
1113
+ <desc id="magnify-plusDescID">Take a look closer.</desc>
1114
+ <g
1115
+ class="fill-color"
1116
+ fill="none"
1117
+ fill-rule="nonzero"
1118
+ >
1119
+ <path d="m7 0c3.854149 0 7 3.1458514 7 7 0 1.5717634-.529107 3.020558-1.410156 4.191406.0416324.03077.0808125.0647264.117187.101563l4.335938 4.335937c.3904239.3905071.3904239 1.0235559 0 1.414063-.3905071.3904239-1.0235559.3904239-1.414063 0l-4.335937-4.335938c-.0362414-.0370712-.0695452-.0769047-.09961-.11914-1.171224.882043-2.6206167 1.412109-4.193359 1.412109-3.8541486 0-7-3.145851-7-7 0-3.8541486 3.1458514-7 7-7zm0 2c-2.7732684 0-5 2.2267316-5 5s2.2267316 5 5 5 5-2.2267316 5-5-2.2267316-5-5-5z"/>
1120
+ <path d="m7.75 4v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z"/>
1121
+ </g>
1122
+ </svg>
1123
+ `;class Uo extends o.oi{static get styles(){return o.iv`
1124
+ :host {
1125
+ width: var(--iconWidth, 'auto');
1126
+ height: var(--iconHeight, 'auto');
1127
+ }
1128
+
1129
+ .fill-color {
1130
+ fill: var(--iconFillColor);
1131
+ }
1132
+
1133
+ .stroke-color {
1134
+ stroke: var(--iconStrokeColor);
1135
+ }
1136
+ `}render(){return Fo}}function Vo(e){return(Vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function qo(e){return function(e){if(Array.isArray(e))return Zo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Zo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zo(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Go(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Xo(e,t){return(Xo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yo(e,t){if(t&&("object"===Vo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Jo(e){return(Jo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("ia-icon-magnify-plus",Uo);var Qo,Ko,er=function(e){return"visualAdjustment".concat(e)},tr={optionChange:er("OptionChanged"),zoomIn:er("ZoomIn"),zoomOut:er("ZoomOut")},nr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xo(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Jo(i);if(s){var n=Jo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Yo(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).activeCount=0,e.options=[],e.renderHeader=!1,e.showZoomControls=!0,e}return t=l,r=[{key:"properties",get:function(){return{activeCount:{type:Number},options:{type:Array},renderHeader:{type:Boolean},showZoomControls:{type:Boolean}}}},{key:"styles",get:function(){return(0,o.iv)(No||(No=Wo(['\n :host {\n display: block;\n height: 100%;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n }\n\n header {\n display: flex;\n align-items: baseline;\n }\n\n h3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.6rem;\n }\n\n header p {\n padding: 0;\n margin: 0;\n font-size: 1.2rem;\n font-weight: bold;\n font-style: italic;\n }\n\n ul {\n padding: 1rem 2rem 0 0;\n list-style: none;\n margin-top: 0;\n }\n\n [type="checkbox"] {\n display: none;\n }\n\n label {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n font-size: 1.4rem;\n font-weight: bold;\n line-height: 150%;\n vertical-align: middle;\n }\n\n .icon {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n border: 1px solid var(--primaryTextColor);\n border-radius: 2px;\n background: var(--activeButtonBg) 50% 50% no-repeat;\n }\n :checked + .icon {\n background-image: url(\'',"');\n }\n\n .range {\n display: none;\n padding-top: .5rem;\n }\n .range.visible {\n display: flex;\n }\n\n .range p {\n margin-left: 1rem;\n }\n\n h4 {\n padding: 1rem 0;\n margin: 0;\n font-size: 1.4rem;\n }\n\n button {\n -webkit-appearance: none;\n appearance: none;\n border: none;\n border-radius: 0;\n background: transparent;\n outline: none;\n cursor: pointer;\n --iconFillColor: var(--primaryTextColor);\n --iconStrokeColor: var(--primaryTextColor);\n height: 4rem;\n width: 4rem;\n }\n\n button * {\n display: inline-block;\n }"])),$n)}}],(n=[{key:"firstUpdated",value:function(){this.activeCount=this.activeOptions.length,this.emitOptionChangedEvent()}},{key:"activeOptions",get:function(){return this.options.reduce((function(e,t){return t.active?[].concat(qo(e),[t.id]):e}),[])}},{key:"prepareEventDetails",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{options:this.options,activeCount:this.activeCount,changedOptionId:e}}},{key:"emitOptionChangedEvent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.prepareEventDetails(e);this.dispatchEvent(new CustomEvent(tr.optionChange,{bubbles:!0,composed:!0,detail:t}))}},{key:"emitZoomIn",value:function(){this.dispatchEvent(new CustomEvent(tr.zoomIn))}},{key:"emitZoomOut",value:function(){this.dispatchEvent(new CustomEvent(tr.zoomOut))}},{key:"changeActiveStateFor",value:function(e){var t=qo(this.options),n=t.find((function(t){return t.id===e}));n.active=!n.active,this.options=t,this.activeCount=this.activeOptions.length,this.emitOptionChangedEvent(n.id)}},{key:"setRangeValue",value:function(e,t){var n=qo(this.options);n.find((function(t){return t.id===e})).value=t,this.options=qo(n)}},{key:"rangeSlider",value:function(e){var t=this;return(0,o.dy)(Lo||(Lo=Wo(["\n <div class=",'>\n <input\n type="range"\n name="','_range"\n min=',"\n max=","\n step=","\n .value=","\n @input=","\n @change=","\n />\n <p>","%</p>\n </div>\n "])),"range".concat(e.active?" visible":""),e.id,e.min||0,e.max||100,e.step||1,e.value,(function(n){return t.setRangeValue(e.id,n.target.value)}),(function(){return t.emitOptionChangedEvent()}),e.value)}},{key:"adjustmentCheckbox",value:function(e){var t=this,n="adjustment_".concat(e.id);return(0,o.dy)(To||(To=Wo(['<li>\n <label for="','">\n <span class="name">','</span>\n <input\n type="checkbox"\n name="','"\n id="','"\n @change=',"\n ?checked=",'\n />\n <span class="icon"></span>\n </label>\n ',"\n </li>"])),n,e.name,n,n,(function(){return t.changeActiveStateFor(e.id)}),e.active,void 0!==e.value?this.rangeSlider(e):c.Ld)}},{key:"headerSection",get:function(){var e=this.activeCount?(0,o.dy)(Po||(Po=Wo(["<p>("," active)</p>"])),this.activeCount):c.Ld,t=(0,o.dy)(Do||(Do=Wo(["<header>\n <h3>Visual adjustments</h3>\n ","\n </header>"])),e);return this.renderHeader?t:c.Ld}},{key:"zoomControls",get:function(){return(0,o.dy)(Ro||(Ro=Wo(['\n <h4>Zoom</h4>\n <button class="zoom_out" @click=',' title="zoom out">\n <ia-icon-magnify-minus></ia-icon-magnify-minus>\n </button>\n <button class="zoom_in" @click=',' title="zoom in">\n <ia-icon-magnify-plus></ia-icon-magnify-plus>\n </button>\n '])),this.emitZoomOut,this.emitZoomIn)}},{key:"render",value:function(){return(0,o.dy)(Ho||(Ho=Wo(["\n ","\n <ul>\n ","\n </ul>\n ","\n "])),this.headerSection,Io(this.options,(function(e){return e.id}),this.adjustmentCheckbox.bind(this)),this.showZoomControls?this.zoomControls:c.Ld)}}])&&Go(t.prototype,n),r&&Go(t,r),l}(o.oi);function or(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function rr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ir(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("ia-book-visual-adjustments",nr);var sr,ar,lr=[{id:"brightness",name:"Adjust brightness",active:!1,min:0,max:150,step:1,value:100},{id:"contrast",name:"Adjust contrast",active:!1,min:0,max:150,step:1,value:100},{id:"invert",name:"Inverted colors (dark mode)",active:!1},{id:"grayscale",name:"Grayscale",active:!1}],cr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.onProviderChange,r=t.bookreader;this.onProviderChange=n,this.bookContainer=r.refs.$brContainer,this.bookreader=r,this.onAdjustmentChange=this.onAdjustmentChange.bind(this),this.optionUpdateComplete=this.optionUpdateComplete.bind(this),this.updateOptionsCount=this.updateOptionsCount.bind(this),this.onZoomIn=this.onZoomIn.bind(this),this.onZoomOut=this.onZoomOut.bind(this),this.activeCount=0,this.icon=(0,o.dy)(Qo||(Qo=rr(['<ia-icon-visual-adjustment style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon-visual-adjustment>']))),this.label="Visual Adjustments",this.menuDetails=this.updateOptionsCount(),this.id="adjustment",this.component=(0,o.dy)(Ko||(Ko=rr(["\n <ia-book-visual-adjustments\n .options=","\n @visualAdjustmentOptionChanged=","\n @visualAdjustmentZoomIn=","\n @visualAdjustmentZoomOut=","\n ></ia-book-visual-adjustments>\n "])),lr,this.onAdjustmentChange,this.onZoomIn,this.onZoomOut)}var t,n;return t=e,(n=[{key:"onZoomIn",value:function(){this.bookreader.zoom(1)}},{key:"onZoomOut",value:function(){this.bookreader.zoom(-1)}},{key:"onAdjustmentChange",value:function(e){var t=e.detail,n={brightness:function(e){return"brightness(".concat(e,"%)")},contrast:function(e){return"contrast(".concat(e,"%)")},grayscale:function(){return"grayscale(100%)"},invert:function(){return"invert(100%)"}},o=t.options.reduce((function(e,t){var o,r="".concat(t.active?n[t.id](t.value):"");return r?[].concat(function(e){if(Array.isArray(e))return or(e)}(o=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return or(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?or(e,t):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[r]):e}),[]).join(" ");this.bookContainer.css("filter",o),this.optionUpdateComplete(e)}},{key:"optionUpdateComplete",value:function(e){this.activeCount=e.detail.activeCount,this.updateOptionsCount(e),this.onProviderChange()}},{key:"updateOptionsCount",value:function(){this.menuDetails="(".concat(this.activeCount," active)")}}])&&ir(t.prototype,n),e}();function dr(e){return(dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ur(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function hr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function fr(e,t){return(fr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mr(e,t){if(t&&("object"===dr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vr(e){return(vr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var br,gr,yr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fr(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=vr(i);if(s){var n=vr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return mr(this,e)});function l(){return hr(this,l),a.apply(this,arguments)}return t=l,r=[{key:"styles",get:function(){return(0,o.iv)(ar||(ar=ur(['\n div {\n display: flex;\n justify-content: center;\n padding-top: 2rem;\n }\n\n button {\n appearance: none;\n padding: 0.5rem 1rem;\n margin: 0 .5rem;\n box-sizing: border-box;\n font: 1.3rem "Helvetica Neue", Helvetica, Arial, sans-serif;\n color: var(--primaryTextColor);\n border: none;\n border-radius: 4px;\n cursor: pointer;\n background: var(--primaryCTAFill);\n }\n\n .delete {\n background: var(--primaryErrorCTAFill);\n }\n '])))}},{key:"properties",get:function(){return{cancelAction:{type:Function},deleteAction:{type:Function},pageID:{type:String}}}}],(n=[{key:"render",value:function(){var e=this;return(0,o.dy)(sr||(sr=ur(['\n <div>\n <button class="delete" @click=',">Delete</button>\n <button @click=",">Cancel</button>\n </div>\n "])),(function(){return e.deleteAction({detail:{id:"".concat(e.pageID)}})}),(function(){return e.cancelAction()}))}}])&&pr(t.prototype,n),r&&pr(t,r),l}(o.oi);function kr(e){return(kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Cr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Sr(e,t){return(Sr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xr(e,t){if(t&&("object"===kr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Or(e){return(Or=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("delete-modal-actions",yr);var Er,Br=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sr(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Or(i);if(s){var n=Or(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return xr(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).state="hollow",e.side=void 0,e}return t=l,r=[{key:"styles",get:function(){return(0,o.iv)(gr||(gr=wr(["\n button {\n -webkit-appearance: none;\n appearance: none;\n outline: 0;\n border: none;\n padding: 0;\n height: 4rem;\n width: 4rem;\n background: transparent;\n cursor: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 16 24' width='16'%3E%3Cg fill='%23333' fill-rule='evenodd'%3E%3Cpath d='m15 0c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1zm-2 2h-10c-.51283584 0-.93550716.38604019-.99327227.88337887l-.00672773.11662113v18l6-4.3181818 6 4.3181818v-18c0-.51283584-.3860402-.93550716-.8833789-.99327227z'/%3E%3Cpath d='m8.75 6v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z' fill-rule='nonzero'/%3E%3C/g%3E%3C/svg%3E\"), pointer;\n position: relative;\n }\n button > * {\n display: block;\n position: absolute;\n top: 0.2rem;\n }\n button.left > * {\n left: 0.2rem;\n }\n\n button.right > * {\n right: 0.2rem;\n }\n "])))}},{key:"properties",get:function(){return{side:{type:String},state:{type:String}}}}],(n=[{key:"handleClick",value:function(e){e.preventDefault(),this.dispatchEvent(new CustomEvent("bookmarkButtonClicked"))}},{key:"title",get:function(){return"".concat("hollow"===this.state?"Add":"Remove"," bookmark")}},{key:"render",value:function(){var e=this.side||"right";return(0,o.dy)(br||(br=wr(["\n <button title="," @click="," class=",">\n <icon-bookmark state=","></icon-bookmark>\n </button>\n "])),this.title,this.handleClick,e,this.state)}}])&&Cr(t.prototype,n),r&&Cr(t,r),l}(o.oi);function $r(e){return($r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ar(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _r(e,t){return(_r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jr(e,t){if(t&&("object"===$r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ir(e){return(Ir=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("bookmark-button",Br),n(8674),n(6699),n(2023);var zr,Mr,Lr,Tr,Pr,Dr,Rr,Hr,Nr,Fr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_r(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ir(i);if(s){var n=Ir(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return jr(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).url="https://archive.org/account/login",e}return t=l,r=[{key:"properties",get:function(){return{url:{type:String}}}},{key:"styles",get:function(){return _n}}],(n=[{key:"render",value:function(){return(0,o.dy)(Er||(Er=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <p>A free account is required to save and access bookmarks.</p>\n <a class="ia-button link primary" href="','">Log in</a>\n '])),this.url)}}])&&Ar(t.prototype,n),r&&Ar(t,r),l}(o.oi);function Ur(e){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach((function(t){Zr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Xr(e,t){return(Xr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yr(e,t){if(t&&("object"===Ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Jr(e){return(Jr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("bookmarks-login",Fr);var Qr,Kr={endpoint:"/services/bookmarks.php",headers:{"Content-Type":"application/json"},delete:function(e){return fetch("".concat(this.endpoint,"?identifier=").concat(this.identifier,"&page_num=").concat(e),{credentials:"same-origin",method:"DELETE",headers:this.headers})},get:function(e){return fetch("".concat(this.endpoint,"?identifier=").concat(this.identifier,"&page_num=").concat(e),{credentials:"same-origin",method:"GET",headers:this.headers})},getAll:function(){return fetch("".concat(this.endpoint,"?identifier=").concat(this.identifier),{credentials:"same-origin",method:"GET",headers:this.headers})},post:function(e){return this.sendBookmarkData(e,"POST")},put:function(e){return this.sendBookmarkData(e,"POST")},sendBookmarkData:function(e,t){var n={note:e.note,color:e.color};return fetch("".concat(this.endpoint,"?identifier=").concat(this.identifier,"&page_num=").concat(e.id),{credentials:"same-origin",method:t,headers:this.headers,body:JSON.stringify({notes:n})})}},ei=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xr(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Jr(i);if(s){var n=Jr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Yr(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).bookmarks=[],e.bookreader={},e.editedBookmark={},e.modal=void 0,e.loginOptions={loginClicked:function(){},loginUrl:""},e.displayMode="bookmarks",e.bookmarkColors=[{id:0,className:"red"},{id:1,className:"blue"},{id:2,className:"green"}],e.defaultColor=e.bookmarkColors[0],e.api=Kr,e.deleteModalConfig=new Mt({title:"Delete Bookmark",headline:"This bookmark contains a note. Deleting it will permanently delete the note. Are you sure?",headerColor:"#194880"}),e}return t=l,r=[{key:"properties",get:function(){return{activeBookmarkID:{type:String},bookmarks:{type:Array},bookreader:{type:Object},displayMode:{type:String},editedBookmark:{type:Object},deleteModalConfig:{type:Object},modal:{attribute:!1},loginOptions:{type:Object,attribute:!1}}}},{key:"styles",get:function(){var e=(0,o.iv)(Nr||(Nr=Vr(["\n .bookmarks {\n height: 100%;\n overflow: hidden;\n padding-bottom: 20px;\n }\n\n .list ia-bookmark-edit {\n display: none;\n }\n\n .edit ia-bookmarks-list {\n display: none;\n }\n "])));return[_n,e]}},{key:"formatPage",value:function(e){return isNaN(+e)?"(".concat(e.replace(/\D/g,""),")"):e}}],(n=[{key:"updated",value:function(e){e.has("displayMode")&&this.updateDisplay(),this.emitBookmarksChanged()}},{key:"setup",value:function(){this.api.identifier=this.bookreader.bookId,"login"!==this.displayMode&&(this.setBREventListeners(),this.initializeBookmarks())}},{key:"updateDisplay",value:function(){"bookmarks"===this.displayMode&&this.fetchUserBookmarks()}},{key:"fetchUserBookmarks",value:function(){var e=this;this.fetchBookmarks().then((function(){e.initializeBookmarks()}))}},{key:"setBREventListeners",value:function(){var e=this;["3PageViewSelected"].forEach((function(t){window.addEventListener("BookReader:".concat(t),(function(t){setTimeout((function(){e.renderBookmarkButtons()}),100)}))})),["pageChanged","1PageViewSelected","2PageViewSelected"].forEach((function(t){window.addEventListener("BookReader:".concat(t),(function(t){setTimeout((function(){e.renderBookmarkButtons(),e.markActiveBookmark()}),100)}))})),["zoomOut","zoomIn","resize"].forEach((function(t){window.addEventListener("BookReader:".concat(t),(function(){e.renderBookmarkButtons()}))}))}},{key:"initializeBookmarks",value:function(){this.renderBookmarkButtons(),this.markActiveBookmark(!0),this.emitBookmarksChanged()}},{key:"formatBookmark",value:function(e){var t=e.leafNum,n=void 0===t?"":t,o=e.notes,r=void 0===o?{}:o,i=r.note,s=void 0===i?"":i,a=r.color,c={note:s,color:this.getBookmarkColor(a)?a:this.defaultColor.id},d=l.formatPage(this.bookreader.getPageNum(n)),u=this.bookreader.getPageURI("".concat(n).replace(/\D/g,""),32);return qr(qr({},c),{},{id:n,leafNum:n,page:d,thumbnail:u})}},{key:"fetchBookmarks",value:function(){var e=this;return this.api.getAll().then((function(e){var t;try{t=JSON.parse(e)}catch(e){t={error:e.message}}return t})).then((function(t){var n,o=t.success,r=t.error,i=void 0===r?"Something happened while fetching bookmarks.":r,s=t.value,a=void 0===s?[]:s;o||null===(n=console)||void 0===n||n.warn("Error fetching bookmarks",i);var l={};return Object.keys(a).forEach((function(t){var n=a[t],o=parseInt(t,10),r=e.formatBookmark(qr(qr({},n),{},{leafNum:o}));l[t]=r})),e.bookmarks=l,l}))}},{key:"emitBookmarksChanged",value:function(){this.dispatchEvent(new CustomEvent("bookmarksChanged",{bubbles:!0,composed:!0,detail:{bookmarks:this.bookmarks}}))}},{key:"emitBookmarkButtonClicked",value:function(){this.dispatchEvent(new CustomEvent("bookmarkButtonClicked",{bubbles:!0,composed:!0,detail:{editedBookmark:this.editedBookmark}}))}},{key:"bookmarkButtonClicked",value:function(e){this.getBookmark(e)?this.confirmDeletion(e):this.createBookmark(e)}},{key:"renderBookmarkButtons",value:function(){var e=this;this.bookreader.$(".BRpagecontainer").not(".BRemptypage").get().forEach((function(t){var n=t.querySelector(".bookmark-button");n&&n.remove();var r=+t.classList.value.match(/pagediv\d+/)[0].replace(/\D/g,""),i=e.getBookmark(r),s=i?"filled":"hollow";if(e.bookreader._models.book.getPage(r).isViewable){var a=document.createElement("div");["mousedown","mouseup"].forEach((function(e){a.addEventListener(e,(function(e){return e.stopPropagation()}))})),a.classList.add("bookmark-button",s),i&&a.classList.add(e.getBookmarkColor(i.color));var l="L"===t.getAttribute("data-side")&&e.bookreader.mode===e.bookreader.constMode2up?"left":"right";(0,c.sY)((0,o.dy)(zr||(zr=Vr(["\n <bookmark-button\n @bookmarkButtonClicked=","\n state=","\n side=","\n ></bookmark-button>"])),(function(){return e.bookmarkButtonClicked(r)}),s,l),a),t.appendChild(a)}}))}},{key:"markActiveBookmark",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.bookreader,n=t.mode,o=t.constMode2up,r=t.constModeThumb,i=this.bookreader.currentIndex();if(n!==r){if(n===o){var s=this.bookreader.displayedIndices,a=s.includes(+this.activeBookmarkID);if(a)return}this.bookmarks[i]?this.activeBookmarkID=i:this.activeBookmarkID=""}else{var l=this.bookmarks[i];e&&l&&(this.activeBookmarkID=i)}}},{key:"bookmarkEdited",value:function(e){var t=e.detail,n=t.bookmark.id===this.editedBookmark.id;this.editedBookmark=n?{}:t.bookmark}},{key:"getBookmark",value:function(e){return this.bookmarks[e]}},{key:"getBookmarkColor",value:function(e){var t;return null===(t=this.bookmarkColors.find((function(t){return t.id===e})))||void 0===t?void 0:t.className}},{key:"addBookmark",value:function(){var e=this.bookreader.currentIndex();if(this.bookreader.mode===this.bookreader.constMode2up){var t=this.bookreader.displayedIndices;e=t[t.length-1]}this.createBookmark(e)}},{key:"createBookmark",value:function(e){var t=this.getBookmark(e);if(t)return this.bookmarkEdited({detail:{bookmark:t}}),void this.emitBookmarkButtonClicked();this.editedBookmark=this.formatBookmark({leafNum:e}),this.api.post(this.editedBookmark),this.bookmarks[e]=this.editedBookmark,this.activeBookmarkID=e,this.disableAddBookmarkButton=!0,this.renderBookmarkButtons(),this.emitBookmarkButtonClicked()}},{key:"bookmarkSelected",value:function(e){var t=e.detail.bookmark.leafNum;this.bookreader.jumpToPage("".concat(this.bookreader.getPageNum("".concat(t).replace(/\D/g,"")))),this.activeBookmarkID=t}},{key:"saveBookmark",value:function(e){var t=e.detail,n=this.bookmarks[t.bookmark.id];Object.assign(n,t.bookmark),this.api.put(n),this.editedBookmark={},this.renderBookmarkButtons()}},{key:"confirmDeletion",value:function(e){this.getBookmark(e).note?this.displayDeletionModal(e):this.deleteBookmark({detail:{id:"".concat(e)}})}},{key:"displayDeletionModal",value:function(e){var t=this,n=(0,o.dy)(Mr||(Mr=Vr(["\n <delete-modal-actions\n .deleteAction=","\n .cancelAction=","\n .pageID=","\n ></delete-modal-actions>\n "])),(function(){return t.deleteBookmark({detail:{id:"".concat(e)}})}),(function(){return t.modal.closeModal()}),e);this.modal.showModal({config:this.deleteModalConfig,customModalContent:n})}},{key:"deleteBookmark",value:function(e){var t=e.detail,n=t.id,o=this.bookmarks;delete o[n],this.bookmarks=qr({},o),this.api.delete(t.id),this.editedBookmark={},this.modal.closeModal(),this.renderBookmarkButtons()}},{key:"shouldEnableAddBookmarkButton",get:function(){var e=this.bookreader.mode===this.bookreader.constMode2up?this.bookreader.displayedIndices[this.bookreader.displayedIndices.length-1]:this.bookreader.currentIndex();return!!this.getBookmark(e)}},{key:"allowAddingBookmark",get:function(){return this.bookreader.mode!==this.bookreader.constModeThumb}},{key:"addBookmarkButton",get:function(){return(0,o.dy)(Lr||(Lr=Vr(['\n <button\n class="ia-button primary"\n tabindex="-1"\n ?disabled=',"\n @click=",">\n Add bookmark\n </button>\n "])),this.shouldEnableAddBookmarkButton,this.addBookmark)}},{key:"bookmarksList",get:function(){return(0,o.dy)(Tr||(Tr=Vr(["\n <ia-bookmarks-list\n @bookmarkEdited=","\n @bookmarkSelected=","\n @saveBookmark=","\n @deleteBookmark=","\n .editedBookmark=","\n .bookmarks=","\n .activeBookmarkID=","\n .bookmarkColors=","\n .defaultBookmarkColor=",">\n </ia-bookmarks-list>\n "])),this.bookmarkEdited,this.bookmarkSelected,this.saveBookmark,this.deleteBookmark,this.editedBookmark,qr({},this.bookmarks),this.activeBookmarkID,this.bookmarkColors,this.defaultColor)}},{key:"bookmarkHelperMessage",get:function(){return(0,o.dy)(Pr||(Pr=Vr(["<p>Please use 1up or 2up view modes to add bookmark.</p>"])))}},{key:"render",value:function(){var e=this,t=(0,o.dy)(Dr||(Dr=Vr(["\n ","\n ","\n "])),this.bookmarksList,this.allowAddingBookmark?this.addBookmarkButton:this.bookmarkHelperMessage);return(0,o.dy)(Rr||(Rr=Vr(['\n <section class="bookmarks">\n ',"\n </section>\n "])),"login"===this.displayMode?(0,o.dy)(Hr||(Hr=Vr(["<bookmarks-login\n @click=","\n .url=","></bookmarks-login>"])),(function(){return e.loginOptions.loginClicked()}),this.loginOptions.loginUrl):t)}}])&&Gr(t.prototype,n),r&&Gr(t,r),l}(o.oi);customElements.define("ia-bookmarks",ei);var ti,ni,oi,ri,ii,si=(0,o.iv)(Qr||(Qr=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n .blue {\n --iconFillColor: var(--blueBookmarkColor, #0023f5);\n }\n\n .red {\n --iconFillColor: var(--redBookmarkColor, #eb3223);\n }\n\n .green {\n --iconFillColor: var(--greenBookmarkColor, #75ef4c);\n }\n"])));function ai(e){return(ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function li(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ci(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function di(e,t){return(di=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ui(e,t){if(t&&("object"===ai(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function hi(e){return(hi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&di(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=hi(i);if(s){var n=hi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ui(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).bookmark={},e.bookmarkColors=[],e.renderHeader=!1,e.showBookmark=!0,e}return t=l,r=[{key:"properties",get:function(){return{bookmark:{type:Object},bookmarkColors:{type:Array},renderHeader:{type:Boolean},showBookmark:{type:Boolean}}}},{key:"headerSection",get:function(){return(0,o.dy)(ri||(ri=li(["<header>\n <h3>Edit Bookmark</h3>\n </header>"])))}},{key:"styles",get:function(){var e=(0,o.iv)(ii||(ii=li(['\n :host {\n display: block;\n padding: 0 1rem 2rem 1rem;\n color: var(--primaryTextColor);\n }\n\n small {\n font-style: italic;\n }\n\n .bookmark {\n display: grid;\n grid-template-columns: 37px 1fr;\n grid-gap: 0 1rem;\n align-items: center;\n }\n\n h4 {\n margin: 0;\n font-size: 1.4rem;\n }\n\n fieldset {\n padding: 2rem 0 0 0;\n border: none;\n }\n\n label {\n display: block;\n font-weight: bold;\n }\n\n p {\n padding: 0;\n margin: .5rem 0;\n font-size: 1.2rem;\n line-height: 120%;\n }\n\n textarea {\n width: 100%;\n margin-bottom: 2rem;\n box-sizing: border-box;\n font: normal 1.4rem "Helvetica Neue", Helvetica, Arial, sans-serif;\n resize: vertical;\n }\n\n ul {\n display: grid;\n grid-template-columns: repeat(3, auto);\n grid-gap: 0 2rem;\n justify-content: start;\n padding: 1rem 0 0 0;\n margin: 0 0 2rem 0;\n list-style: none;\n }\n\n li input {\n display: none;\n }\n\n li label {\n display: block;\n min-width: 50px;\n padding-top: .4rem;\n text-align: center;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n }\n\n li input:checked + label {\n border-color: var(--primaryTextColor);\n }\n\n input[type="submit"] {\n background: var(--primaryCTAFill);\n border-color: var(--primaryCTABorder);\n }\n\n button {\n background: var(--primaryErrorCTAFill);\n border-color: var(--primaryErrorCTABorder);\n }\n\n .button {\n -webkit-appearance: none;\n appearance: none;\n padding: .5rem 1rem;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n border: none;\n border-radius: 4px;\n cursor: pointer;\n }\n\n .actions {\n display: grid;\n grid-template-columns: auto auto;\n grid-gap: 0 1rem;\n justify-items: stretch;\n }\n '])));return[_n,si,e]}}],(n=[{key:"emitSaveEvent",value:function(e){e.preventDefault(),this.dispatchEvent(new CustomEvent("saveBookmark",{detail:{bookmark:this.bookmark}}))}},{key:"emitDeleteEvent",value:function(){this.dispatchEvent(new CustomEvent("deleteBookmark",{detail:{id:this.bookmark.id}}))}},{key:"emitColorChangedEvent",value:function(e){this.dispatchEvent(new CustomEvent("bookmarkColorChanged",{detail:{bookmarkId:this.bookmark.id,colorId:e}}))}},{key:"changeColorTo",value:function(e){this.bookmark.color=e,this.emitColorChangedEvent(e)}},{key:"updateNote",value:function(e){this.bookmark.note=e.currentTarget.value}},{key:"bookmarkColor",value:function(e){var t=this;return(0,o.dy)(ti||(ti=li(['\n <li>\n <input type="radio" name="color" id="color_','" .value='," @change="," ?checked=",'>\n <label for="color_','">\n <icon-bookmark class=',"></icon-bookmark>\n </label>\n </li>\n "])),e.id,e.id,(function(){return t.changeColorTo(e.id)}),this.bookmark.color===e.id,e.id,e.className)}},{key:"bookmarkTemplate",get:function(){return(0,o.dy)(ni||(ni=li(['\n <div class="bookmark">\n <img src='," />\n <h4>Page ","</h4>\n </div>\n "])),this.bookmark.thumbnail,this.bookmark.page)}},{key:"render",value:function(){return(0,o.dy)(oi||(oi=li(["\n ","\n ",'\n <form action="" method="put" @submit=','>\n <fieldset>\n <label for="note">Note <small>(optional)</small></label>\n <textarea rows="4" cols="80" name="note" id="note" @change=',">",'</textarea>\n <label for="color">Bookmark color</label>\n <ul>\n ','\n </ul>\n <div class="actions">\n <button type="button" class="ia-button cancel" @click=','>Delete</button>\n <input class="ia-button" type="submit" value="Save">\n </div>\n </fieldset>\n </form>\n '])),this.renderHeader?l.headerSection:c.Ld,this.showBookmark?this.bookmarkTemplate:c.Ld,this.emitSaveEvent,this.updateNote,this.bookmark.note,Io(this.bookmarkColors,(function(e){return e.id}),this.bookmarkColor.bind(this)),this.emitDeleteEvent)}}])&&ci(t.prototype,n),r&&ci(t,r),l}(o.oi);customElements.define("ia-bookmark-edit",pi),n(2707);var fi,mi,vi,bi,gi,yi,ki,wi,Ci=c.dy`
1137
+ <svg height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg" aria-labelledby="editPencilTitleID editPencilDescID"><title id="editPencilTitleID">Pencil icon</title><desc id="editPencilDescID">An illustration of a pencil, used to represent an edit action</desc><path class="fill-color" d="m15.6111048 9.3708338-9.52237183 9.5222966-5.14363353 1.0897111c-.42296707.0896082-.83849202-.1806298-.92810097-.6035935-.02266463-.1069795-.02266463-.2175207 0-.3245001l1.08971974-5.1435929 9.52237189-9.52229656zm-10.89310224 5.9110366-2.78094924-.5403869-.67567462 3.166657.83033407.8303275 3.16668096-.6756703zm14.82724244-12.05935921c.6114418.61143705.6055516 1.6086709-.0131615 2.22737904l-2.2405581 2.24054036-4.9820147-4.98197536 2.2405581-2.24054036c.618713-.61870814 1.6159506-.62460252 2.2273925-.01316547z" fill-rule="evenodd"/></svg>
1138
+ `;class Si extends o.oi{static get styles(){return o.iv`
1139
+ :host {
1140
+ width: var(--iconWidth, 'auto');
1141
+ height: var(--iconHeight, 'auto');
1142
+ }
1143
+
1144
+ .fill-color {
1145
+ fill: var(--iconFillColor);
1146
+ }
1147
+
1148
+ .stroke-color {
1149
+ stroke: var(--iconStrokeColor);
1150
+ }
1151
+ `}render(){return Ci}}function xi(e){return(xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ei(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Bi(e,t){return(Bi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $i(e,t){if(t&&("object"===xi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ai(e){return(Ai=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("ia-icon-edit-pencil",Si);var _i,ji=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bi(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ai(i);if(s){var n=Ai(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return $i(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).activeBookmarkID=void 0,e.bookmarkColors=[],e.defaultBookmarkColor={},e.bookmarks={},e.editedBookmark={},e.renderHeader=!1,e}return t=l,r=[{key:"properties",get:function(){return{activeBookmarkID:{type:Number},bookmarkColors:{type:Array},defaultBookmarkColor:{type:Object},bookmarks:{type:Object},editedBookmark:{type:Object},renderHeader:{type:Boolean}}}},{key:"styles",get:function(){return[(0,o.iv)(wi||(wi=Oi(["\n :host {\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n margin-bottom: 2rem;\n --activeBorderWidth: 2px;\n }\n\n icon-bookmark {\n width: 16px;\n height: 24px;\n }\n\n .separator {\n background-color: var(--secondaryBGColor);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n small {\n font-style: italic;\n }\n\n h4 {\n margin: 0;\n font-size: 1.4rem;\n }\n h4 * {\n display: inline-block;\n }\n h4 icon-bookmark {\n vertical-align: bottom;\n }\n h4 span {\n vertical-align: top;\n padding-top: 1%;\n }\n\n p {\n padding: 0;\n margin: 5px 0 0 0;\n width: 98%;\n overflow-wrap: break-word;\n }\n\n ia-bookmark-edit {\n margin: 5px 5px 3px 6px;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--activeBorderWidth) 0.5rem 1rem 0;\n }\n ul > li:first-child .separator {\n display: none;\n }\n li {\n cursor: pointer;\n outline: none;\n position: relative;\n }\n li .content {\n padding: 2px 0 4px 2px;\n border: var(--activeBorderWidth) solid transparent;\n padding: .2rem 0 .4rem .2rem;\n }\n li .content.active {\n border: var(--activeBorderWidth) solid #538bc5;\n }\n li button.edit {\n padding: 5px 2px 0 0;\n background: transparent;\n cursor: pointer;\n height: 40px;\n width: 40px;\n position: absolute;\n right: 2px;\n top: 2px;\n text-align: right;\n -webkit-appearance: none;\n appearance: none;\n outline: none;\n box-sizing: border-box;\n border: none;\n }\n li button.edit > * {\n display: block;\n height: 100%;\n width: 100%;\n }\n "]))),si]}}],(n=[{key:"emitEditEvent",value:function(e,t){this.dispatchEvent(new CustomEvent("bookmarkEdited",{detail:{bookmark:t}}))}},{key:"emitSelectedEvent",value:function(e){this.activeBookmarkID=e.id,this.dispatchEvent(new CustomEvent("bookmarkSelected",{detail:{bookmark:e}}))}},{key:"emitSaveBookmark",value:function(e){this.dispatchEvent(new CustomEvent("saveBookmark",{detail:{bookmark:e}}))}},{key:"emitDeleteBookmark",value:function(e){this.dispatchEvent(new CustomEvent("deleteBookmark",{detail:{id:e}}))}},{key:"emitBookmarkColorChanged",value:function(e){var t=e.detail,n=t.bookmarkId,o=t.colorId;this.dispatchEvent(new CustomEvent("bookmarkColorChanged",{detail:{bookmarkId:n,colorId:o}}))}},{key:"emitAddBookmark",value:function(){this.dispatchEvent(new CustomEvent("addBookmark"))}},{key:"editBookmark",value:function(e,t){this.emitEditEvent(e,t),this.editedBookmark=this.editedBookmark===t?{}:t}},{key:"saveBookmark",value:function(e){var t=e.detail.bookmark;this.editedBookmark={},this.emitSaveBookmark(t)}},{key:"deleteBookmark",value:function(e){var t=e.detail.id;this.editedBookmark={},this.emitDeleteBookmark(t)}},{key:"bookmarkColorInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.bookmarkColors.find((function(t){return(null==t?void 0:t.id)===e}))}},{key:"bookmarkItem",value:function(e){var t=this,n=this.editedBookmark.id===e.id,r=this.bookmarkColorInfo(e.color).className,i=e.id===this.activeBookmarkID?"active":"";return(0,o.dy)(fi||(fi=Oi(["\n <li\n @click=",'\n tabindex="0"\n data-pageIndex=','\n >\n <div class="separator"></div>\n <div class="content ','">\n <button\n class="edit"\n @click=','\n title="Edit this bookmark"\n >\n <ia-icon-edit-pencil></ia-icon-edit-pencil>\n </button>\n <h4>\n <icon-bookmark class=',"></icon-bookmark>\n <span> Page ","</span>\n </h4>\n ","\n ","\n </div>\n </li>\n "])),(function(){return t.emitSelectedEvent(e)}),e.id,i,(function(n){return t.editBookmark(n,e)}),r,e.page,!n&&e.note?(0,o.dy)(mi||(mi=Oi(["<p>","</p>"])),e.note):c.Ld,n?this.editBookmarkComponent:c.Ld)}},{key:"editBookmarkComponent",get:function(){return(0,o.dy)(vi||(vi=Oi(["\n <ia-bookmark-edit\n .bookmark=","\n .bookmarkColors=","\n .defaultBookmarkColor=","\n .showBookmark=","\n @saveBookmark=","\n @deleteBookmark=","\n @bookmarkColorChanged=","\n ></ia-bookmark-edit>\n "])),this.editedBookmark,this.bookmarkColors,this.defaultBookmarkColor,!1,this.saveBookmark,this.deleteBookmark,this.emitBookmarkColorChanged)}},{key:"sortBookmarks",value:function(){var e=this;return Object.keys(this.bookmarks).sort((function(e,t){return+e>+t?1:+e<+t?-1:0})).map((function(t){return e.bookmarks[t]}))}},{key:"bookmarksCount",get:function(){var e=this.bookmarks.length;return(0,o.dy)(bi||(bi=Oi(["<small>(",")</small>"])),e)}},{key:"headerSection",get:function(){return(0,o.dy)(gi||(gi=Oi(["<header>\n <h3>\n Bookmarks\n ","\n </h3>\n </header>"])),this.bookmarks.length?this.bookmarksCount:c.Ld)}},{key:"bookmarkslist",get:function(){var e=this.sortBookmarks(),t=Io(e,(function(e){return null==e?void 0:e.id}),this.bookmarkItem.bind(this));return(0,o.dy)(yi||(yi=Oi(["\n <ul>\n ",'\n <div class="separator"></div>\n </ul>\n '])),t)}},{key:"render",value:function(){return(0,o.dy)(ki||(ki=Oi(["\n ","\n ","\n "])),this.renderHeader?this.headerSection:c.Ld,Object.keys(this.bookmarks).length?this.bookmarkslist:c.Ld)}}])&&Ei(t.prototype,n),r&&Ei(t,r),l}(o.oi);customElements.define("ia-bookmarks-list",ji);class Ii extends o.oi{static get styles(){return o.iv`
1152
+ :host {
1153
+ width: var(--iconWidth, 'auto');
1154
+ height: var(--iconHeight, 'auto');
1155
+ }
1156
+
1157
+ #hollow,
1158
+ #plus,
1159
+ #minus {
1160
+ display: none;
1161
+ }
1162
+
1163
+ .hollow #filled,
1164
+ .plus #filled,
1165
+ .minus #filled {
1166
+ display: none;
1167
+ }
1168
+
1169
+ .hollow #hollow,
1170
+ .plus #hollow,
1171
+ .minus #hollow {
1172
+ display: block;
1173
+ }
1174
+
1175
+ .plus #plus {
1176
+ display: block;
1177
+ }
1178
+
1179
+ .minus #minus {
1180
+ display: block;
1181
+ }
1182
+
1183
+ .fill-color {
1184
+ fill: var(--iconFillColor);
1185
+ }
1186
+
1187
+ .stroke-color {
1188
+ stroke: var(--iconStrokeColor);
1189
+ }
1190
+ `}static get properties(){return{state:{type:String}}}render(){return o.dy`
1191
+ <div class=${this.state}>
1192
+ <svg height="24" viewBox="0 0 16 24" width="16" xmlns="http://www.w3.org/2000/svg" aria-labelledby="bookmarkTitleID bookmarDescID"><title id="bookmarkTitleID">Bookmark icon</title><desc id="bookmarkDescID">An outline of the shape of a bookmark</desc><path id="filled" d="m1 0h14c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1z" class="fill-color" fill-rule="evenodd"/><g class="fill-color" fill-rule="evenodd"><path id="hollow" d="m15 0c.5522847 0 1 .44771525 1 1v23l-8-5.4545455-8 5.4545455v-23c0-.55228475.44771525-1 1-1zm-2 2h-10c-.51283584 0-.93550716.38604019-.99327227.88337887l-.00672773.11662113v18l6-4.3181818 6 4.3181818v-18c0-.51283584-.3860402-.93550716-.8833789-.99327227z"/><path id="plus" d="m8.75 6v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z" fill-rule="nonzero"/><path id="minus" d="m11 8.25v1.5h-6v-1.5z" fill-rule="nonzero"/></g></svg>
1193
+ </div>
1194
+ `}}function zi(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("icon-bookmark",Ii);var Mi=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.baseHost,r=t.signedIn,i=t.bookreader,s=t.modal,a=t.onProviderChange,l="referer=".concat(encodeURIComponent(location.href)),c="https://".concat(n,"/account/login?").concat(l);this.component=document.createElement("ia-bookmarks"),this.component.bookreader=i,this.component.displayMode=r?"bookmarks":"login",this.component.modal=s,this.component.loginOptions={loginClicked:this.bookmarksLoginClicked,loginUrl:c},this.bindEvents(),this.icon=(0,o.dy)(_i||(_i=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<icon-bookmark state="hollow" style="--iconWidth: 16px; --iconHeight: 24px;"></icon-bookmark>']))),this.label="Bookmarks",this.id="bookmarks",this.onProviderChange=a,this.component.setup(),this.updateMenu(this.component.bookmarks.length)}var t,n;return t=e,(n=[{key:"updateMenu",value:function(e){this.menuDetails="(".concat(e,")")}},{key:"bindEvents",value:function(){this.component.addEventListener("bookmarksChanged",this.bookmarksChanged.bind(this))}},{key:"bookmarksChanged",value:function(e){var t=e.detail,n=Object.keys(t.bookmarks).length;this.updateMenu(n),this.onProviderChange(t.bookmarks,t.showSidePanel)}},{key:"bookmarksLoginClicked",value:function(){var e;window.archive_analytics&&(null===(e=window.archive_analytics)||void 0===e||e.send_event_no_sampling("BookReader","BookmarksLogin",window.location.path))}}])&&zi(t.prototype,n),e}(),Li=c.dy`
1195
+ <svg
1196
+ viewBox="0 0 24 24"
1197
+ xmlns="http://www.w3.org/2000/svg"
1198
+ aria-labelledby="shareTitleID shareDescID"
1199
+ >
1200
+ <title id="shareTitleID">Share icon</title>
1201
+ <desc id="shareDescID">A square with an arrow arcing out from the center of the square</desc>
1202
+ <g class="fill-color">
1203
+ <path d="m0 6.765625v17.143466h23.996455v-12.820312c0-.6024929-.564349-1.0909095-1.26051-1.0909095-.696159 0-1.260509.4884166-1.260509 1.0909095v10.638494h-18.9544172v-12.7798301h4.7793938c.6961602 0 1.2605092-.4884166 1.2605092-1.0909091 0-.6024924-.564349-1.0909088-1.2605092-1.0909088z"/>
1204
+ <path d="m23.97066.18118436-10.372158.62642052 1.587358 2.76562492c-.632399.5111771-1.204137 1.0741171-1.700285 1.6981534-1.40286 1.7644678-2.279987 4.0202049-2.712357 6.6775568-.144711.891238.459803 1.731264 1.350853 1.87713.428345.07012.866999-.03282 1.21944-.286164.35244-.253341.589789-.636328.659821-1.064688.366789-2.2542958 1.073357-3.946915 2.043324-5.1669026.237573-.298812.501471-.5831095.792613-.8522728l1.40625 2.4502844z"/>
1205
+ </g>
1206
+ </svg>
1207
+ `;class Ti extends o.oi{static get styles(){return o.iv`
1208
+ :host {
1209
+ width: var(--iconWidth, 'auto');
1210
+ height: var(--iconHeight, 'auto');
1211
+ }
1212
+
1213
+ .fill-color {
1214
+ fill: var(--iconFillColor);
1215
+ }
1216
+
1217
+ .stroke-color {
1218
+ stroke: var(--iconStrokeColor);
1219
+ }
1220
+ `}render(){return Li}}function Pi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Di(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("ia-icon-share",Ti),n(189),n(3123);var Ri=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.classes=new Set,this.changed=!1,this.element=t;var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pi(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}((t.getAttribute("class")||"").split(/\s+/));try{for(o.s();!(n=o.n()).done;){var r=n.value;this.classes.add(r)}}catch(e){o.e(e)}finally{o.f()}}var t,n;return t=e,(n=[{key:"add",value:function(e){this.classes.add(e),this.changed=!0}},{key:"remove",value:function(e){this.classes.delete(e),this.changed=!0}},{key:"commit",value:function(){if(this.changed){var e="";this.classes.forEach((function(t){return e+=t+" "})),this.element.setAttribute("class",e)}}}])&&Di(t.prototype,n),e}(),Hi=new WeakMap,Ni=(0,c.XM)((function(e){return function(t){if(!(t instanceof c._l)||t instanceof c.sL||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");var n=t.committer,o=n.element,r=Hi.get(t);void 0===r&&(o.setAttribute("class",n.strings.join(" ")),Hi.set(t,r=new Set));var i=o.classList||new Ri(o);for(var s in r.forEach((function(t){t in e||(i.remove(t),r.delete(t))})),e){var a=e[s];a!=r.has(s)&&(a?(i.add(s),r.add(s)):(i.remove(s),r.delete(s)))}"function"==typeof i.commit&&i.commit()}})),Fi=be`
1221
+ <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="linkTitleID linkDescID">
1222
+ <title id="linkTitleID">Link icon</title>
1223
+ <desc id="linkDescID">Two chain links linked together</desc>
1224
+ <path d="m7.80511706 12.3659763c1.2669254-2.2579539 4.09819784-2.9949938 6.41200864-1.7733458l.2295791.12871 1.6067188.9559859 3.5467013-6.31849361c1.2682451-2.26030597 4.104098-2.99652769 6.4192376-1.76952182l.2223501.12488594 3.2168204 1.91103915c2.2770002 1.3527136 3.1866331 4.21502324 2.0564431 6.51290984l-.1198433.2278304-5.2002499 9.2680474c-1.2669254 2.2579539-4.0981978 2.9949938-6.4120086 1.7733458l-.2295791-.12871-1.6096554-.9558482-3.5437647 6.3183559c-1.2682451 2.260306-4.104098 2.9965277-6.41923761 1.7695218l-.22235013-.1248859-3.21682032-1.9110392c-2.27700024-1.3527136-3.18663314-4.2150232-2.05644312-6.5129098l.11984332-.2278304zm13.93955474-5.73311741-3.563271 6.35055051c1.889633 1.4530595 2.5776248 4.0429866 1.5410255 6.156875l-.1223014.2328355-.4183304.7430134 1.6096554.9558483c1.1431442.6791157 2.5155496.3977368 3.1667361-.5628389l.0921501-.1491451 5.2002498-9.2680474c.5752467-1.0252226.2110342-2.4011579-.8559335-3.14755806l-.1742742-.11247814-3.2168203-1.91103915c-1.1402863-.67741793-2.5086889-.39913772-3.1618387.55564729zm-11.79500786 7.00714351-5.20024982 9.2680474c-.57524673 1.0252226-.21103426 2.4011579.85593348 3.1475581l.17427416.1124781 3.21682032 1.9110392c1.14028632.6774179 2.50868892.3991377 3.16183872-.5556473l.0970474-.1563368 3.5622708-6.3513198c-1.8888875-1.4532134-2.5764504-4.042623-1.5400057-6.1561456l.1222818-.2327956.4153938-.7428758-1.6067188-.9559859c-1.1431442-.6791157-2.5155496-.3977368-3.1667361.5628389zm6.97653866 1.5796652-.3817806.6812386c-.5117123.9119895-.2800268 2.1014993.528439 2.8785267l.382717-.6803391c.5119098-.9123415.2798478-2.1024176-.5293754-2.8794262z" class="fill-color" />
1225
+ </svg>
1226
+ `;customElements.define("ia-icon-link",class extends Te{static get styles(){return U`
1227
+ :host {
1228
+ width: var(--iconWidth, 'auto');
1229
+ height: var(--iconHeight, 'auto');
1230
+ }
1231
+
1232
+ .fill-color {
1233
+ fill: var(--iconFillColor);
1234
+ }
1235
+
1236
+ .stroke-color {
1237
+ stroke: var(--iconStrokeColor);
1238
+ }
1239
+ `}render(){return Fi}});var Ui=o.iv`
1240
+ :host {
1241
+ display: block;
1242
+ height: 100%;
1243
+ overflow-y: auto;
1244
+ font-size: 1.4rem;
1245
+ box-sizing: border-box;
1246
+ }
1247
+
1248
+ header {
1249
+ display: flex;
1250
+ align-items: baseline;
1251
+ }
1252
+
1253
+ h3 {
1254
+ padding: 0;
1255
+ margin: 0 1rem 0 0;
1256
+ font-size: 1.6rem;
1257
+ }
1258
+
1259
+ h4 {
1260
+ font-size: 1.4rem;
1261
+ }
1262
+
1263
+ ul {
1264
+ padding: 0 0 2rem 0;
1265
+ list-style: none;
1266
+ }
1267
+
1268
+ li {
1269
+ padding: 0 0 1rem 0;
1270
+ }
1271
+
1272
+ li a {
1273
+ font-size: 1.6rem;
1274
+ text-decoration: none;
1275
+ color: var(--shareLinkColor);
1276
+ }
1277
+
1278
+ li a * {
1279
+ display: inline-block;
1280
+ padding: .2rem;
1281
+ margin-right: 1rem;
1282
+ vertical-align: middle;
1283
+ border: 1px solid var(--shareIconBorder);
1284
+ border-radius: 7px;
1285
+ background: var(--shareIconBg);
1286
+ }
1287
+
1288
+ .embed {
1289
+ display: none;
1290
+ }
1291
+ .embed.visible {
1292
+ display: block;
1293
+ width: 95%;
1294
+ }
1295
+
1296
+ .embed a {
1297
+ color: var(--shareLinkColor);
1298
+ }
1299
+
1300
+ .code {
1301
+ position: relative;
1302
+ }
1303
+
1304
+ textarea {
1305
+ display: block;
1306
+ width: 100%;
1307
+ height: 120px;
1308
+ padding: .8rem 1rem;
1309
+ box-sizing: border-box;
1310
+ resize: none;
1311
+ cursor: pointer;
1312
+ font: normal 1.4rem "Helvetica Neue", Helvetica, Arial, sans-serif;
1313
+ color: var(--textareaColor, #fff);
1314
+ background: var(--textareaBg, #151515);
1315
+ }
1316
+
1317
+ small {
1318
+ position: absolute;
1319
+ bottom: 0;
1320
+ left: 0;
1321
+ height: 3rem;
1322
+ padding: .5rem 1rem;
1323
+ box-sizing: border-box;
1324
+ font: normal 1.2rem/2rem "Helvetica Neue", Helvetica, Arial, sans-serif;
1325
+ color: var(--textareaBg, #151515);
1326
+ background: var(--textareaColor, #fff);
1327
+ opacity: 0;
1328
+ transition: opacity 300ms linear;
1329
+ }
1330
+ small.visible {
1331
+ opacity: 1;
1332
+ }
1333
+ `,Vi=be`
1334
+ <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="emailTitleID emailDescID">
1335
+ <title id="emailTitleID">Email icon</title>
1336
+ <desc id="emailDescID">An illustration of an envelope</desc>
1337
+ <path d="m32 7.04156803v19.91686397c0 .5752421-.4763773 1.041568-1.0640184 1.041568h-27.87196316c-.58764116 0-1.06401844-.4663259-1.06401844-1.041568v-19.91686397c0-.57524214.47637728-1.04156803 1.06401844-1.04156803h27.87196316c.5876411 0 1.0640184.46632589 1.0640184 1.04156803zm-26.25039901 1.19676167 10.04327011 10.1323738c.5135662.4194048.8817166.6291071 1.1044511.6291071.1198794 0 .2695514-.0503424.4490158-.1510273.1794644-.100685.3291364-.2013699.4490158-.3020548l.1798191-.1510273 10.1198794-10.15841306zm16.77212271 9.7303286 6.8831353 6.7889404v-13.5778809zm-17.92871075-6.6379131v13.350819l6.78098955-6.6629107zm22.09008685 14.2059464-5.9074304-5.8588202-.9757049.9551179-.3594018.3295984c-.0342324.0304241-.0665646.0587822-.0969964.0850743l-.1597867.1329606c-.0684912.0540844-.1198794.0895749-.1541644.1064714-.6674943.3687151-1.3523675.5530727-2.0546196.5530727-.65047 0-1.3782586-.218035-2.1833659-.6541048l-.6682036-.4520405-1.0278418-1.0311524-5.95850326 5.832781z" class="fill-color" />
1338
+ </svg>
1339
+ `;customElements.define("ia-icon-email",class extends Te{static get styles(){return U`
1340
+ :host {
1341
+ width: var(--iconWidth, 'auto');
1342
+ height: var(--iconHeight, 'auto');
1343
+ }
1344
+
1345
+ .fill-color {
1346
+ fill: var(--iconFillColor);
1347
+ }
1348
+
1349
+ .stroke-color {
1350
+ stroke: var(--iconStrokeColor);
1351
+ }
1352
+ `}render(){return Vi}});var Wi=class{constructor(e){this.promoCopy=" : Free Download, Borrow, and Streaming : Internet Archive",Object.assign(this,e)}get encodedDescription(){return this.encodeString(this.description)}get encodedCreator(){return this.encodeString(this.creator)}get encodedPromoCopy(){return this.encodeString(this.promoCopy)}get itemPath(){const e=this.fileSubPrefix?encodeURIComponent(this.fileSubPrefix):"";return e?`${this.identifier}/${e}`:this.identifier}encodeString(e){return encodeURIComponent(e.replace(/\s/g,"+")).replace(/%2B/g,"+")}},qi=class extends Wi{constructor(e){super(e),this.name="Email",this.icon=o.dy`<ia-icon-email></ia-icon-email>`,this.class="email"}get url(){return`mailto:?body=https://${this.baseHost}/details/${this.itemPath}&subject=${this.description} : ${this.creator}${this.promoCopy}`}},Zi=be`
1353
+ <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="facebookTitleID facebookDescID">
1354
+ <title id="facebookTitleID">Facebook icon</title>
1355
+ <desc id="facebookDescID">A lowercase f</desc>
1356
+ <path d="m30.91057 19.2442068.2670004-5.3339402h-5.7329237c-.0890001-3.4962895.25183-5.42243459 1.0224903-5.77843514.3560005-.17800028.8004955-.28925046 1.333485-.33375053s1.0442346-.0520853 1.5337353-.02275571c.4895008.02932959 1.045246.01466479 1.6672356-.04399439.0890001-1.59997977.1335002-3.24445961.1335002-4.93343953-2.1633102-.20732987-3.6742898-.28115953-4.5329389-.22148898-2.8146294.17800028-4.7847688 1.25965538-5.9104183 3.2449653-.1780003.3256596-.3261653.68873971-.444495 1.08924034-.1183298.40050062-.2144095.76358074-.2882391 1.08924034-.0738297.32565959-.125915.7848194-.1562559 1.37747942-.030341.59266002-.052591 1.04474028-.0667501 1.35624078-.0141592.3115005-.0217444.8449956-.0227558 1.6004854v1.5777298h-3.8229605v5.3339401h3.8669549v14.622824h5.8224296c0-.3560006-.0146648-1.6819003-.0439944-3.9776994-.0293296-2.295799-.0515796-4.2957737-.0667501-5.9999241s-.0075853-3.2525506.0227557-4.6452005h5.4219289z" class="fill-color" />
1357
+ </svg>
1358
+ `;customElements.define("ia-icon-facebook",class extends Te{static get styles(){return U`
1359
+ :host {
1360
+ width: var(--iconWidth, 'auto');
1361
+ height: var(--iconHeight, 'auto');
1362
+ }
1363
+
1364
+ .fill-color {
1365
+ fill: var(--iconFillColor);
1366
+ }
1367
+
1368
+ .stroke-color {
1369
+ stroke: var(--iconStrokeColor);
1370
+ }
1371
+ `}render(){return Zi}});var Gi=class extends Wi{constructor(e){super(e),this.name="Facebook",this.icon=o.dy`<ia-icon-facebook></ia-icon-facebook>`,this.class="facebook"}get url(){return`https://www.facebook.com/sharer/sharer.php?u=https://${this.baseHost}/details/${this.itemPath}`}},Xi=be`
1372
+ <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="pinterestTitleID pinterestDescID">
1373
+ <title id="pinterestTitleID">Pinterest icon</title>
1374
+ <desc id="pinterestDescID">A stylized letter p</desc>
1375
+ <path d="m11.9051049 30.5873434.653491-1.0742755.4207845-.839975c.2805229-.591861.5371377-1.2533214.7698443-1.9843813.2327065-.7310599.4659444-1.6029125.6997135-2.6155579.2337692-1.0126455.4128151-1.752206.5371377-2.2186817.0308151.030815.0775689.0855382.1402615.1641697.0626927.0786314.1094465.1333547.1402615.1641697.1243227.1870153.2178304.311338.280523.372968 1.1210293.964829 2.3817888 1.4631823 3.7822785 1.4950599 1.4939973 0 2.8790795-.3426843 4.1552465-1.0280529 2.1166733-1.1826593 3.6733633-3.1128487 4.6700699-5.7905679.4048457-1.1518444.6848374-2.5996192.8399751-4.3433245.1243226-1.587505-.0781002-3.0974411-.6072685-4.5298084-.903199-2.36638128-2.5528653-4.20306294-4.948999-5.51004497-1.276167-.65349101-2.5990879-1.05833667-3.9687625-1.21453696-1.525875-.21783034-3.1293188-.17107651-4.8103315.14026149-2.7701643.52916833-5.02709913 1.743174-6.77080442 3.64201699-1.99235065 2.14748836-2.98852598 4.62225355-2.98852598 7.42429545 0 2.9571797.9494215 5.0584455 2.84826449 6.3037975l.83997504.4207845c.12432268 0 .22526845.0154075.3028373.0462225s.1551377.0074381.23270656-.0701308c.07756885-.0775688.13229208-.1243226.16416969-.1402614s.07066204-.0860696.11635328-.2103923c.04569124-.1243226.07703756-.2098609.09403895-.2566147.01700139-.0467539.04834771-.1476996.09403895-.3028373s.06906816-.2486454.07013074-.280523l.14026149-.5132295c.06269263-.311338.09403895-.5291684.09403895-.653491-.03081502-.1243227-.12432268-.2799917-.28052297-.467007-.15620029-.1870154-.23376915-.2959305-.23270656-.3267455-.62267599-.8096914-.9494215-1.7904592-.98023652-2.9423035-.03081502-1.55669.28052297-2.9731185.93401399-4.24928547 1.18265932-2.45882635 3.17501002-3.93741618 5.97705192-4.43576949 1.6183201-.311338 3.1356943-.25661476 4.5521228.16416969 1.4164285.42078446 2.5135496 1.09765239 3.2913633 2.03060379.8405063 1.02752164 1.3229208 2.28828114 1.4472435 3.78227848.1243227 1.4004897-.0313463 2.9725872-.467007 4.7162925-.3740306 1.3696746-.9186065 2.5528653-1.6337275 3.5495719-.9967066 1.245352-2.0863896 1.8834355-3.269049 1.9142505-1.7118277.0626926-2.7547568-.6375522-3.1287874-2.1007345-.0935077-.4664757 0-1.2134744.2805229-2.240996.7469987-2.5842117 1.1359055-3.9384788 1.1667206-4.0628015.1870153-1.0275216.2024228-1.7904591.0462225-2.2888124-.1870153-.65349104-.5759222-1.15928246-1.1667205-1.51737429-.5907984-.35809182-1.2756357-.39687625-2.054512-.11635327-1.1826594.43566067-1.9610044 1.40048968-2.335035 2.89448706-.311338 1.306982-.2491767 2.6299028.186484 3.9687625 0 .0626926.0313463.1402615.094039.2327065.0626926.0924451.0940389.1700139.0940389.2327066 0 .0935076-.0313463.2491766-.0940389.467007-.0626927.2178303-.094039.3580918-.094039.4207844-.0935076.4356607-.3038999 1.3308903-.6311767 2.6856887-.3272768 1.3547985-.5838915 2.3897582-.7698443 3.1048793-.7778136 3.2068876-1.12049796 5.5881451-1.02805289 7.1437725l.37296809 2.7558194c.653491-.591861 1.2294131-1.2299445 1.7277664-1.9142505z" class="fill-color" />
1376
+ </svg>
1377
+ `;customElements.define("ia-icon-pinterest",class extends Te{static get styles(){return U`
1378
+ :host {
1379
+ width: var(--iconWidth, 'auto');
1380
+ height: var(--iconHeight, 'auto');
1381
+ }
1382
+
1383
+ .fill-color {
1384
+ fill: var(--iconFillColor);
1385
+ }
1386
+
1387
+ .stroke-color {
1388
+ stroke: var(--iconStrokeColor);
1389
+ }
1390
+ `}render(){return Xi}});var Yi=class extends Wi{constructor(e){super(e),this.name="Pinterest",this.icon=o.dy`<ia-icon-pinterest></ia-icon-pinterest>`,this.class="pinterest"}get url(){return`http://www.pinterest.com/pin/create/button/?url=https://${this.baseHost}/details/${this.itemPath}&description=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`}},Ji=be`
1391
+ <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="tumblrTitleID tumblrDescID">
1392
+ <title id="tumblrTitleID">Tumblr icon</title>
1393
+ <desc id="tumblrDescID">A lowercase letter t</desc>
1394
+ <path d="m8.50321407 8.54544475v5.32088575c.15641786.0310693.6819176.0310693 1.57649923 0 .8945816-.0310693 1.3574071.0160703 1.3884764.1414189.0942792 1.5695354.1333837 3.2253149.1173133 4.9673385-.0160703 1.7420236-.0316049 3.3426283-.0466039 4.8018141s.2046288 2.824628.6588835 4.0963267c.4542546 1.2716986 1.1999178 2.2209194 2.2369897 2.8476622 1.2556283.784232 2.9896167 1.207953 5.2019653 1.271163 2.2123485.0632099 4.1659648-.2506972 5.8608487-.9417213-.0310693-.3449764-.0230341-1.4045467.0241055-3.1787109.0471397-1.7741643-.0080351-2.75499-.1655244-2.9424772-3.5472571 1.0360005-5.697467.6904885-6.4506298-1.0365361-.7220934-1.6638147-.8635123-4.9909084-.4242566-9.981281v-.046604h6.7318605v-5.32088568h-6.7318605v-6.54383772h-4.0497228c-.2828378 1.28669763-.6122795 2.35376743-.9883252 3.20120941-.3760457.84744199-.98029 1.60060471-1.812733 2.25948817-.832443.65888347-1.87594303 1.01993018-3.1305 1.08314014z" class="fill-color" />
1395
+ </svg>
1396
+ `;customElements.define("ia-icon-tumblr",class extends Te{static get styles(){return U`
1397
+ :host {
1398
+ width: var(--iconWidth, 'auto');
1399
+ height: var(--iconHeight, 'auto');
1400
+ }
1401
+
1402
+ .fill-color {
1403
+ fill: var(--iconFillColor);
1404
+ }
1405
+
1406
+ .stroke-color {
1407
+ stroke: var(--iconStrokeColor);
1408
+ }
1409
+ `}render(){return Ji}});var Qi=class extends Wi{constructor(e){super(e),this.name="Tumblr",this.icon=o.dy`<ia-icon-tumblr></ia-icon-tumblr>`,this.class="tumblr"}get url(){return`https://www.tumblr.com/share/video?embed=%3Ciframe+width%3D%22640%22+height%3D%22480%22+frameborder%3D%220%22+allowfullscreen+src%3D%22https%3A%2F%2F${this.baseHost}%2Fembed%2F%22+webkitallowfullscreen%3D%22true%22+mozallowfullscreen%3D%22true%22%26gt%3B%26lt%3B%2Fiframe%3E&name=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`}},Ki=be`
1410
+ <svg viewBox="0 0 34 34" xmlns="http://www.w3.org/2000/svg" aria-labelledby="twitterTitleID twitterDescID">
1411
+ <title id="twitterTitleID">Twitter icon</title>
1412
+ <desc id="twitterDescID">The Twitter logo, a cartoon bird</desc>
1413
+ <path d="m31.5297453 8.76273313c-.3135031.40766104-.7447036.83083673-1.2936015 1.26952707-.5488979.4386904-.9169698.7837578-1.1042157 1.0352022.1562166 2.319709-.1417719 4.5297454-.8939653 6.6301092-.7521935 2.1003638-1.8023754 3.9182538-3.1505457 5.45367-1.3481704 1.5354162-2.9627648 2.8284828-4.8437835 3.8791996-1.8810186 1.0507169-3.8321207 1.7483416-5.8533062 2.092874s-4.1215493.2894286-6.30109136-.1653114c-2.17954205-.45474-4.2092874-1.3401455-6.08923604-2.6562165 2.72737.4697196 5.67408517-.2514445 8.8401455-2.1634924-3.0719024-.7521935-4.88979241-2.2881447-5.45367-4.6078537 1.12882516.0631287 1.86550396.0631287 2.21003638 0-2.91568586-1.2850417-4.38904344-3.3693558-4.42007276-6.2529424.21934517.0310293.53284828.1487267.94050931.3530922s.78375775.3060133 1.12829017.3049433c-.81532206-.7211641-1.41076396-1.9045581-1.7863257-3.5501819-.37556173-1.64562376-.17173122-3.17355015.61149155-4.58377912 1.81789001 1.88101862 3.6908838 3.36989086 5.61898138 4.46661672 1.92809757 1.0967259 4.22426707 1.7547614 6.88850847 1.9741066-.2503745-1.1908838-.1722662-2.32719882.2343248-3.40894502.4065911-1.0817462 1.0416221-1.93612241 1.9050931-2.56312861.863471-.62700621 1.8114702-1.0817462 2.8439975-1.36421999 1.0325272-.28247378 2.0827091-.27444896 3.1505456.02407447s1.9767815.87042585 2.726835 1.71570726c1.3791997-.37663172 2.6802911-.87845068 3.9032742-1.50545688-.0310293.37663171-.1407019.74470361-.3290178 1.1042157-.1883158.35951209-.3530922.62593623-.4943291.79927242s-.3841216.4317355-.728654.77519795c-.3445324.34346244-.5638776.57832227-.6580355.70457949.2193452-.09415792.6895998-.23539482 1.410764-.42371067.7211641-.18831586 1.2069334-.39214638 1.4573079-.61149155 0 .44350524-.1567516.86668093-.4702547 1.27434196z" class="fill-color" />
1414
+ </svg>
1415
+ `;customElements.define("ia-icon-twitter",class extends Te{static get styles(){return U`
1416
+ :host {
1417
+ width: var(--iconWidth, 'auto');
1418
+ height: var(--iconHeight, 'auto');
1419
+ }
1420
+
1421
+ .fill-color {
1422
+ fill: var(--iconFillColor);
1423
+ }
1424
+
1425
+ .stroke-color {
1426
+ stroke: var(--iconStrokeColor);
1427
+ }
1428
+ `}render(){return Ki}});var es=class extends Wi{constructor(e){super(e),this.name="Twitter",this.icon=o.dy`<ia-icon-twitter></ia-icon-twitter>`,this.class="twitter"}get url(){return`https://twitter.com/intent/tweet?url=https://${this.baseHost}/details/${this.itemPath}&via=internetarchive&text=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`}};const ts=({currentTarget:e})=>{const t=e.querySelector("textarea"),n=e.querySelector("small");t.select(),document.execCommand("copy"),t.blur(),n.classList.add("visible"),clearTimeout(n.timeout),n.timeout=setTimeout((()=>n.classList.remove("visible")),4e3)};class ns extends o.oi{static get styles(){return Ui}static get properties(){return{baseHost:{type:String},creator:{type:String},description:{type:String},embedOptionsVisible:{type:Boolean},identifier:{type:String},sharingOptions:{type:Array},type:{type:String},renderHeader:{type:Boolean},fileSubPrefix:{type:String}}}constructor(){super(),this.baseHost="",this.sharingOptions=[],this.fileSubPrefix=""}firstUpdated(){const{baseHost:e,creator:t,description:n,identifier:o,type:r,fileSubPrefix:i}=this,s={baseHost:e,creator:t,description:n,identifier:o,type:r,fileSubPrefix:i};this.sharingOptions=[new es(s),new Gi(s),new Qi(s),new Yi(s),new qi(s)]}get sharingItems(){return this.sharingOptions.map((e=>o.dy`<li>
1429
+ <a class="${e.class}" href="${e.url}" target="_blank">
1430
+ ${e.icon}
1431
+ ${e.name}
1432
+ </a>
1433
+ </li>`))}get embedOption(){return o.dy`<li>
1434
+ <a href="#" @click=${this.toggleEmbedOptions}>
1435
+ <ia-icon-link></ia-icon-link>
1436
+ Get an embeddable link
1437
+ </a>
1438
+ </li>`}get iframeEmbed(){return o.dy`&lt;iframe src="https://${this.baseHost}/embed/${this.identifier}" width="560" height="384" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen&gt;&lt;/iframe&gt;`}get bbcodeEmbed(){return`[archiveorg ${this.identifier} width=560 height=384 frameborder=0 webkitallowfullscreen=true mozallowfullscreen=true]`}get helpURL(){return`https://${this.baseHost}/help/audio.php?identifier=${this.identifier}`}toggleEmbedOptions(e){e.preventDefault(),this.embedOptionsVisible=!this.embedOptionsVisible}get header(){const e=o.dy`<header><h3>Share this ${this.type}</h3></header>`;return this.renderHeader?e:c.Ld}render(){return o.dy`
1439
+ ${this.header}
1440
+ <ul>
1441
+ ${this.sharingItems}
1442
+ ${this.embedOption}
1443
+ <div class=${Ni({visible:this.embedOptionsVisible,embed:!0})}>
1444
+ <h4>Embed</h4>
1445
+ <div class="code" @click=${ts}>
1446
+ <textarea readonly="readonly">${this.iframeEmbed}</textarea>
1447
+ <small>Copied to clipboard</small>
1448
+ </div>
1449
+ <h4>Embed for wordpress.com hosted blogs and archive.org item &lt;description&gt; tags</h4>
1450
+ <div class="code" @click=${ts}>
1451
+ <textarea readonly="readonly">${this.bbcodeEmbed}</textarea>
1452
+ <small>Copied to clipboard</small>
1453
+ </div>
1454
+ <p>Want more? <a href=${this.helpURL}>Advanced embedding details, examples, and help</a>!</p>
1455
+ </div>
1456
+ </ul>
1457
+ `}}var os,rs;function is(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}customElements.define("ia-sharing-options",ns);var ss,as,ls,cs,ds,us,hs,ps,fs,ms=function e(t){var n=t.item,r=t.baseHost,i=t.bookreader;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var s=null==n?void 0:n.metadata,a=s.identifier,l=s.creator,c=s.title,d=Array.isArray(l)?l[0]:l,u=i.options.subPrefix||"";this.icon=(0,o.dy)(os||(os=is(['<ia-icon-share style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon-share>']))),this.label="Share this book",this.id="share",this.component=(0,o.dy)(rs||(rs=is(["<ia-sharing-options\n .identifier=","\n .type=","\n .creator=","\n .description=","\n .baseHost=","\n .fileSubPrefix=","\n ></ia-sharing-options>"])),a,"book",d,c,r,u)},vs=(0,c.dy)(ss||(ss=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n<svg name="sort-desc" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z" fill="#fff" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill="#fff" fill-rule="nonzero"/><path d="m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.661538"/></g></svg>\n']))),bs=(0,c.dy)(as||(as=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n<svg name="sort-asc" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z" fill="#fff" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill="#fff" fill-rule="nonzero"/><path d="m10.3846154 11.0769231 2.7692308 5.5384615 2.7692307-5.5384615m-2.7692307 4.1538461v-13.15384612" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.661538" transform="matrix(1 0 0 -1 0 18.692308)"/></g></svg>\n']))),gs=(0,c.dy)(ls||(ls=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n<svg name="sort-neutral" height="18" viewBox="0 0 18 18" width="18" xmlns="http://www.w3.org/2000/svg"><g fill="#fff" fill-rule="evenodd"><path d="m2.32514544 8.30769231.7756949-2.08468003h2.92824822l.75630252 2.08468003h1.01809955l-2.70523594-6.92307693h-1.01809955l-2.69553976 6.92307693zm3.41305753-2.86037492h-2.34647705l1.17323853-3.22883h.01939237z" fill-rule="nonzero"/><path d="m7.1689722 16.6153846v-.7756949h-4.4117647l4.29541047-5.3716871v-.77569491h-5.06140918v.77569491h3.97543633l-4.30510666 5.3716871v.7756949z" fill-rule="nonzero"/><circle cx="13" cy="9" r="2"/></g></svg>\n']))),ys=(0,c.dy)(cs||(cs=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" aria-labelledby="volumesTitleID volumesDescID">\n <title id="volumesTitleID">Volumes icon</title>\n <desc id="volumesDescID">Three books stacked on each other</desc>\n <g fill="#ffffff">\n <path fill="#ffffff" d="m9.83536396 0h10.07241114c.1725502.47117517.3378411.76385809.4958725.87804878.1295523.11419069.3199719.1998337.5712586.25692905.2512868.05709534.4704647.08564301.6575337.08564301h.2806036v15.24362526h-4.3355343v3.8106985h-4.44275v3.7250554h-12.01318261c-.27306495 0-.50313194-.085643-.69020098-.256929-.18706903-.1712861-.30936193-.3425721-.36687867-.5138581l-.06449694-.2785477v-14.2159091c0-.32815965.08627512-.5922949.25882537-.79240577.17255024-.20011086.34510049-.32150776.51765073-.36419068l.25882537-.0640244h3.36472977v-2.54767184c0-.31374722.08627513-.57067627.25882537-.77078714.17255025-.20011086.34510049-.32150776.51765074-.36419068l.25882536-.06402439h3.36472978v-2.56929047c0-.32815964.08627512-.5922949.25882537-.79240576.17255024-.20011087.34510049-.31430156.51765073-.34257207zm10.78355264 15.6294346v-13.53076498c-.2730649-.08536585-.4456152-.16380266-.5176507-.23531042-.1725502-.1424612-.2730649-.27078714-.3015441-.38497783v13.36031043h-9.87808272c0 .0144124-.02149898.0144124-.06449694 0-.04299795-.0144124-.08962561.006929-.13988296.0640244-.05025735.0570953-.07538603.1427383-.07538603.256929s.02149898.210643.06449694.289357c.04299795.078714.08599591.1322062.12899387.1604767l.06449693.0216187h10.71905571zm-10.2449613-2.4412417h7.98003v-11.60421286h-7.98003zm1.6827837-9.41990022h4.6153002c.1725502 0 .3199718.05349224.4422647.16047672s.1834393.23891353.1834393.39578714c0 .15687362-.0611464.28519956-.1834393.38497783s-.2697145.1496674-.4422647.1496674h-4.6153002c-.1725503 0-.3199719-.04988913-.4422647-.1496674-.1222929-.09977827-.1834394-.22810421-.1834394-.38497783 0-.15687361.0611465-.28880266.1834394-.39578714.1222928-.10698448.2697144-.16047672.4422647-.16047672zm-6.08197737 13.50997782h7.72120467v-.8131929h-3.79610541c-.27306495 0-.49950224-.085643-.67931188-.256929-.17980964-.1712861-.29847284-.3425721-.35598958-.5138581l-.06449694-.2785477v-10.02023282h-2.82530086zm6.77217827-11.36890243h3.2139578c.1295522 0 .240956.05709534.3342113.17128603.0932554.11419069.139883.24972284.139883.40659645 0 .15687362-.0466276.28880267-.139883.39578714-.0932553.10698448-.2046591.16047672-.3342113.16047672h-3.2139578c-.1295523 0-.2373264-.05349224-.3233223-.16047672-.0859959-.10698447-.1289938-.23891352-.1289938-.39578714 0-.15687361.0429979-.29240576.1289938-.40659645s.19377-.17128603.3233223-.17128603zm-11.15043132 15.11557653h7.69942646v-.7491685h-3.79610539c-.25854616 0-.48135376-.0892462-.66842279-.2677384-.18706904-.1784922-.30936193-.3605876-.36687868-.546286l-.06449694-.2569291v-10.04101994h-2.80352266zm14.62237682-4.5606985h-.8191949v2.1410754h-9.89986085s-.04299796.0285477-.12899387.085643c-.08599592.0570954-.12201369.1427384-.10805331.2569291 0 .1141907.01786928.210643.05360784.289357.03573856.0787139.07538603.125.1189424.138858l.06449694.0432373h10.71905575v-2.9542683zm-4.3991936 3.8106985h-.8191949v2.077051h-9.8563045c0 .0144124-.02149898.0144124-.06449694 0-.04299795-.0144125-.08962561.0105321-.13988296.0748337-.05025735.0643015-.07538603.1607538-.07538603.289357 0 .1141906.02149898.2070399.06449694.2785476.04299795.0715078.08599591.1141907.12899387.1280488l.06449693.0216186h10.69811519v-2.8686252z" />\n </g>\n </svg>\n'])));function ks(e){return(ks="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ws(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Cs(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ss(e,t){return(Ss=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xs(e,t){if(t&&("object"===ks(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Os(e){return(Os=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Es,Bs,$s,As,_s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ss(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Os(i);if(s){var n=Os(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return xs(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).hostUrl="",e.sortOrderBy="",e.subPrefix="",e.viewableFiles=[],e}return t=l,r=[{key:"properties",get:function(){return{subPrefix:{type:String},hostUrl:{type:String},viewableFiles:{type:Array},sortOrderBy:{type:String}}}},{key:"styles",get:function(){return(0,o.iv)(fs||(fs=ws(["\n :host {\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--primaryTextColor);\n margin-top: 14px;\n margin-bottom: 2rem;\n --activeBorderWidth: 2px;\n }\n\n a {\n color: #ffffff;\n text-decoration: none\n }\n\n img {\n width: 35px;\n height: 45px;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--activeBorderWidth) 0.5rem 1rem 0;\n }\n\n ul > li:first-child .separator {\n display: none;\n }\n\n li {\n cursor: pointer;\n outline: none;\n position: relative;\n }\n\n li .content {\n padding: 2px 0 4px 2px;\n border: var(--activeBorderWidth) solid transparent;\n padding: .2rem 0 .4rem .2rem;\n }\n \n li .content.active {\n border: var(--activeBorderWidth) solid #538bc5;\n }\n\n small {\n font-style: italic;\n white-space: initial;\n }\n\n .container {\n display: flex;\n align-items: center;\n justify-content: center\n }\n\n .item-title {\n margin-block-start: 0em;\n margin-block-end: 0em;\n font-size: 14px;\n font-weight: bold;\n word-wrap: break-word;\n padding-left: 5px;\n }\n\n .separator {\n background-color: var(--secondaryBGColor);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n .text {\n padding-left: 10px;\n }\n\n .icon {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-left: .7rem;\n border: 1px solid var(--primaryTextColor);\n border-radius: 2px;\n background: var(--activeButtonBg) 50% 50% no-repeat;\n }\n\n "])))}}],(n=[{key:"firstUpdated",value:function(){var e=this.shadowRoot.querySelector(".content.active");setTimeout((function(){null!=e&&e.scrollIntoViewIfNeeded&&(null==e||e.scrollIntoViewIfNeeded(!0))}),350)}},{key:"volumeItemWithImageTitle",value:function(e){var t="default"===this.sortOrderBy?"".concat(this.hostUrl).concat(e.url_path):"".concat(this.hostUrl).concat(e.url_path,"?sort=").concat(this.sortOrderBy);return(0,o.dy)(ds||(ds=ws(['\n <li class="content active">\n <div class="separator"></div>\n <a class="container" href="','">\n <div class="image">\n <img src="','">\n </div>\n <div class="text">\n <p class="item-title">',"</p>\n <small>by: ","</small>\n </div>\n </a>\n </li>\n "])),t,e.image,e.title,e.author)}},{key:"volumeItem",value:function(e){var t=this.subPrefix===e.file_subprefix?" active":"",n="default"===this.sortOrderBy?"".concat(this.hostUrl).concat(e.url_path):"".concat(this.hostUrl).concat(e.url_path,"?sort=").concat(this.sortOrderBy);return(0,o.dy)(us||(us=ws(['\n <li>\n <div class="separator"></div>\n <div class="content','">\n <a href="https://','">\n <p class="item-title">',"</p>\n </a>\n </div>\n </li>\n "])),t,n,e.title)}},{key:"volumesList",get:function(){var e=Io(this.viewableFiles,(function(e){return null==e?void 0:e.file_prefix}),this.volumeItem.bind(this));return(0,o.dy)(hs||(hs=ws(["\n <ul>\n ",'\n <div class="separator"></div> \n </ul>\n '])),e)}},{key:"render",value:function(){return(0,o.dy)(ps||(ps=ws(["\n ","\n "])),this.viewableFiles.length?this.volumesList:c.Ld)}}])&&Cs(t.prototype,n),r&&Cs(t,r),l}(o.oi);function js(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Is(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function zs(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}customElements.define("viewable-files",_s);var Ms,Ls,Ts,Ps,Ds,Rs="title_asc",Hs="title_desc",Ns="default",Fs=function(){function e(t){var n=t.baseHost,r=t.bookreader,i=t.onProviderChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onProviderChange=i,this.component=document.createElement("viewable-files");var s=r.options.multipleBooksList.by_subprefix;if(this.viewableFiles=Object.keys(s).map((function(e){return s[e]})),this.volumeCount=Object.keys(s).length,this.bookreader=r,this.component.subPrefix=r.options.subPrefix||"",this.component.hostUrl=n,this.component.viewableFiles=this.viewableFiles,this.id="volumes",this.label="Viewable files (".concat(this.volumeCount,")"),this.icon=(0,o.dy)(Es||(Es=Is(["",""])),ys),this.sortOrderBy=Ns,this.bookreader.urlPlugin){this.bookreader.urlPlugin.pullFromAddressBar();var a=this.bookreader.urlPlugin.getUrlParam("sort");a!==Rs&&a!==Hs||(this.sortOrderBy=a)}this.sortVolumes(this.sortOrderBy)}var t,n;return t=e,(n=[{key:"sortButton",get:function(){var e=this;return{default:(0,o.dy)(Bs||(Bs=Is(['\n <button class="sort-by neutral-icon" aria-label="Sort volumes in initial order" @click=',">","</button>\n "])),(function(){return e.sortVolumes("title_asc")}),gs),title_asc:(0,o.dy)($s||($s=Is(['\n <button class="sort-by asc-icon" aria-label="Sort volumes in ascending order" @click=',">","</button>\n "])),(function(){return e.sortVolumes("title_desc")}),bs),title_desc:(0,o.dy)(As||(As=Is(['\n <button class="sort-by desc-icon" aria-label="Sort volumes in descending order" @click=',">","</button>\n "])),(function(){return e.sortVolumes("default")}),vs)}[this.sortOrderBy]}},{key:"sortVolumes",value:function(e){var t,n;t=this.viewableFiles.sort((function(t,n){return e===Rs?t.title.localeCompare(n.title):e===Hs?n.title.localeCompare(t.title):t.orig_sort-n.orig_sort})),this.sortOrderBy=e,this.component.sortOrderBy=e,this.component.viewableFiles=function(e){if(Array.isArray(e))return js(e)}(n=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return js(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?js(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),this.actionButton=this.sortButton,this.bookreader.urlPlugin&&(this.bookreader.urlPlugin.pullFromAddressBar(),this.sortOrderBy!==Ns?this.bookreader.urlPlugin.setUrlParam("sort",e):this.bookreader.urlPlugin.removeUrlParam("sort")),this.onProviderChange(this.bookreader),this.multipleFilesClicked(e)}},{key:"multipleFilesClicked",value:function(e){var t;window.archive_analytics&&(null===(t=window.archive_analytics)||void 0===t||t.send_event_no_sampling("BookReader","VolumesSort|".concat(e),window.location.path))}}])&&zs(t.prototype,n),e}(),Us=(0,o.YP)(Ms||(Ms=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <svg class="ia-logo" width="27" height="30" viewBox="0 0 27 30" xmlns="http://www.w3.org/2000/svg" aria-labelledby="logoTitleID logoDescID">\n <title id="logoTitleID">Internet Archive logo</title>\n <desc id="logoDescID">A line drawing of the Internet Archive headquarters building façade.</desc>\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <mask id="mask-2" fill="white">\n <path d="M26.6666667,28.6046512 L26.6666667,30 L0,30 L0.000283687943,28.6046512 L26.6666667,28.6046512 Z M25.6140351,26.5116279 L25.6140351,28.255814 L1.05263158,28.255814 L1.05263158,26.5116279 L25.6140351,26.5116279 Z M3.62469203,7.6744186 L3.91746909,7.82153285 L4.0639977,10.1739544 L4.21052632,13.9963932 L4.21052632,17.6725617 L4.0639977,22.255044 L4.03962296,25.3421929 L3.62469203,25.4651163 L2.16024641,25.4651163 L1.72094074,25.3421929 L1.55031755,22.255044 L1.40350877,17.6970339 L1.40350877,14.0211467 L1.55031755,10.1739544 L1.68423854,7.80887484 L1.98962322,7.6744186 L3.62469203,7.6744186 Z M24.6774869,7.6744186 L24.9706026,7.82153285 L25.1168803,10.1739544 L25.2631579,13.9963932 L25.2631579,17.6725617 L25.1168803,22.255044 L25.0927809,25.3421929 L24.6774869,25.4651163 L23.2130291,25.4651163 L22.7736357,25.3421929 L22.602418,22.255044 L22.4561404,17.6970339 L22.4561404,14.0211467 L22.602418,10.1739544 L22.7369262,7.80887484 L23.0420916,7.6744186 L24.6774869,7.6744186 Z M9.94042303,7.6744186 L10.2332293,7.82153285 L10.3797725,10.1739544 L10.5263158,13.9963932 L10.5263158,17.6725617 L10.3797725,22.255044 L10.3556756,25.3421929 L9.94042303,25.4651163 L8.47583122,25.4651163 L8.0362015,25.3421929 L7.86556129,22.255044 L7.71929825,17.6970339 L7.71929825,14.0211467 L7.86556129,10.1739544 L8.00005604,7.80887484 L8.30491081,7.6744186 L9.94042303,7.6744186 Z M18.0105985,7.6744186 L18.3034047,7.82153285 L18.449948,10.1739544 L18.5964912,13.9963932 L18.5964912,17.6725617 L18.449948,22.255044 L18.425851,25.3421929 L18.0105985,25.4651163 L16.5460067,25.4651163 L16.1066571,25.3421929 L15.9357367,22.255044 L15.7894737,17.6970339 L15.7894737,14.0211467 L15.9357367,10.1739544 L16.0702315,7.80887484 L16.3753664,7.6744186 L18.0105985,7.6744186 Z M25.6140351,4.53488372 L25.6140351,6.97674419 L1.05263158,6.97674419 L1.05263158,4.53488372 L25.6140351,4.53488372 Z M13.0806755,0 L25.9649123,2.93331338 L25.4484139,3.8372093 L0.771925248,3.8372093 L0,3.1041615 L13.0806755,0 Z" id="path-1"></path>\n </mask>\n <use fill="#FFFFFF" xlink:href="#path-1"></use>\n <g mask="url(#mask-2)" fill="#FFFFFF">\n <path d="M0,0 L26.6666667,0 L26.6666667,30 L0,30 L0,0 Z" id="swatch"></path>\n </g>\n </g>\n </svg>\n'])));function Vs(e){return(Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ws(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Zs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qs(Object(n),!0).forEach((function(t){Gs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xs(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ys(e,t){return(Ys=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Js(e,t){if(t&&("object"===Vs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qs(e){return(Qs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ks,ea,ta="updateSideMenu",na=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ys(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Qs(i);if(s){var n=Qs(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Js(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).itemMD=void 0,e.loaded=!1,e.bookReaderCannotLoad=!1,e.bookReaderLoaded=!1,e.bookreader=null,e.bookIsRestricted=!1,e.downloadableTypes=[],e.isAdmin=!1,e.lendingInitialized=!1,e.lendingStatus={},e.menuProviders={},e.menuShortcuts=[],e.signedIn=!1,e.modal=void 0,e.sharedObserver=void 0,e.fullscreenBranding=Us,e.sharedObserverHandler=void 0,e.brWidth=0,e.brHeight=0,e.shortcutOrder=["fullscreen","volumes","search","bookmarks"],e}return t=l,r=[{key:"properties",get:function(){return{itemMD:{type:Object},bookReaderLoaded:{type:Boolean},bookreader:{type:Object},bookIsRestricted:{type:Boolean},downloadableTypes:{type:Array},isAdmin:{type:Boolean},lendingInitialized:{type:Boolean},lendingStatus:{type:Object},menuProviders:{type:Object},menuShortcuts:{type:Array},signedIn:{type:Boolean},loaded:{type:Boolean},sharedObserver:{type:Object,attribute:!1},modal:{type:Object,attribute:!1},fullscreenBranding:{type:Object}}}},{key:"styles",get:function(){return(0,o.iv)(Ds||(Ds=Ws(["\n :host,\n #book-navigator,\n slot,\n slot > * {\n display: block;\n height: inherit;\n }\n .cover-img {\n max-height: 300px;\n }\n "])))}}],(n=[{key:"disconnectedCallback",value:function(){this.sharedObserver.removeObserver({target:this.mainBRContainer,handler:this.sharedObserverHandler})}},{key:"firstUpdated",value:function(){this.bindEventListeners(),this.emitPostInit(),this.loaded=!0}},{key:"updated",value:function(e){this.bookreader&&this.itemMD&&this.bookReaderLoaded&&((e.has("loaded")&&this.loaded||e.has("itemMD")||e.has("bookreader")||e.has("signedIn")||e.has("isAdmin")||e.has("modal"))&&this.initializeBookSubmenus(),e.has("sharedObserver")&&this.bookreader&&this.loadSharedObserver())}},{key:"emitPostInit",value:function(){var e;this.dispatchEvent(new CustomEvent("BrBookNav:".concat("PostInit"),{detail:{brSelector:null===(e=this.bookreader)||void 0===e?void 0:e.el},bubbles:!0,composed:!0}))}},{key:"baseProviderConfig",get:function(){return{baseHost:this.baseHost,modal:this.modal,sharedObserver:this.sharedObserver,bookreader:this.bookreader,item:this.itemMD,signedIn:this.signedIn,isAdmin:this.isAdmin,onProviderChange:function(){}}}},{key:"initializeBookSubmenus",value:function(){var e=this,t={downloads:new wo(this.baseProviderConfig),share:new ms(this.baseProviderConfig),visualAdjustments:new cr(Zs(Zs({},this.baseProviderConfig),{},{onProviderChange:function(){e.updateMenuContents()}}))};this.bookreader.options.enableSearch&&(t.search=new no(Zs(Zs({},this.baseProviderConfig),{},{onProviderChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&(e.bookreader=t);var o=e.brWidth>=640;!o||null!=n&&n.searchCanceled||setTimeout((function(){e.updateSideMenu("search","open")}),0),e.updateMenuContents()}}))),this.bookreader.options.enableBookmarks&&(t.bookmarks=new Mi(Zs(Zs({},this.baseProviderConfig),{},{onProviderChange:function(t){var n=Object.keys(t).length?"add":"remove";e["".concat(n,"MenuShortcut")]("bookmarks"),e.updateMenuContents()}}))),this.bookreader.options.enableMultipleBooks&&(t.volumes=new Fs(Zs(Zs({},this.baseProviderConfig),{},{onProviderChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&(e.bookreader=t),e.updateMenuContents(),e.updateSideMenu("volumes","open")}}))),this.menuProviders=t,this.addMenuShortcut("search"),this.addMenuShortcut("volumes"),this.updateMenuContents()}},{key:"mainBRContainer",get:function(){var e;return document.querySelector(null===(e=this.bookreader)||void 0===e?void 0:e.el)}},{key:"addFullscreenShortcut",value:function(){var e={icon:this.fullscreenShortcut,id:"fullscreen"};this.menuShortcuts.push(e),this.sortMenuShortcuts(),this.emitMenuShortcutsUpdated()}},{key:"deleteFullscreenShortcut",value:function(){var e=this.menuShortcuts.filter((function(e){return"fullscreen"!==e.id}));this.menuShortcuts=e,this.sortMenuShortcuts(),this.emitMenuShortcutsUpdated()}},{key:"closeFullscreen",value:function(){this.bookreader.exitFullScreen()}},{key:"fullscreenShortcut",get:function(){var e=this;return(0,o.dy)(Ls||(Ls=Ws(["\n <button\n @click=",'\n title="Exit fullscreen view"\n >',"</button>\n "])),(function(){return e.closeFullscreen()}),this.fullscreenBranding)}},{key:"updateSideMenu",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";if(e){var n=new CustomEvent(ta,{detail:{menuId:e,action:t}});this.dispatchEvent(n)}}},{key:"updateMenuContents",value:function(){var e=this.menuProviders,t=e.search,n=e.downloads,o=e.visualAdjustments,r=e.share,i=e.bookmarks,s=[e.volumes,t,i,o,r].filter((function(e){return!!e}));this.shouldShowDownloadsMenu()&&(null==n||n.update(this.downloadableTypes),s.splice(1,0,n));var a=new CustomEvent("menuUpdated",{detail:s});this.dispatchEvent(a)}},{key:"shouldShowDownloadsMenu",value:function(){if(!1===this.bookIsRestricted)return!0;if(this.isAdmin)return!0;var e=this.lendingStatus.user_loan_record,t=void 0===e?{}:e;return!Array.isArray(t)&&t.type&&"SESSION_LOAN"!==t.type}},{key:"addMenuShortcut",value:function(e){this.menuShortcuts.find((function(t){return t.id===e}))||this.menuProviders[e]&&(this.menuShortcuts.push(this.menuProviders[e]),this.sortMenuShortcuts(),this.emitMenuShortcutsUpdated())}},{key:"removeMenuShortcut",value:function(e){this.menuShortcuts=this.menuShortcuts.filter((function(t){return t.id!==e})),this.emitMenuShortcutsUpdated()}},{key:"sortMenuShortcuts",value:function(){var e=this;this.menuShortcuts=this.shortcutOrder.reduce((function(t,n){var o=e.menuShortcuts.find((function(e){return e.id===n}));return o&&t.push(o),t}),[])}},{key:"emitMenuShortcutsUpdated",value:function(){var e=new CustomEvent("menuShortcutsUpdated",{detail:this.menuShortcuts});this.dispatchEvent(e)}},{key:"emitLoadingStatusUpdate",value:function(e){var t=new CustomEvent("loadingStateUpdated",{detail:{loaded:e}});this.dispatchEvent(t)}},{key:"bindEventListeners",value:function(){var e=this;window.addEventListener("BookReader:PostInit",(function(t){e.bookreader=t.detail.props,e.bookReaderLoaded=!0,e.bookReaderCannotLoad=!1,e.emitLoadingStatusUpdate(!0),e.loadSharedObserver(),setTimeout((function(){e.bookreader.resize()}),0)})),window.addEventListener("BookReader:fullscreenToggled",(function(t){var n=t.detail.props,o=void 0===n?null:n;o&&(e.bookreader=o),e.manageFullScreenBehavior()}),{passive:!0}),window.addEventListener("BookReader:ToggleSearchMenu",(function(t){e.dispatchEvent(new CustomEvent(ta,{detail:{menuId:"search",action:"toggle"}}))})),window.addEventListener("LendingFlow:PostInit",(function(t){var n=t.detail,o=n.downloadTypesAvailable,r=n.lendingStatus,i=n.isAdmin,s=n.previewType;e.lendingInitialized=!0,e.downloadableTypes=o,e.lendingStatus=r,e.isAdmin=i,e.bookReaderCannotLoad="singlePagePreview"===s})),window.addEventListener("BRJSIA:PostInit",(function(t){var n=t.detail,o=n.isRestricted,r=n.downloadURLs;e.bookReaderLoaded=!0,e.downloadableTypes=r,e.bookIsRestricted=o}))}},{key:"loadSharedObserver",value:function(){var e;this.sharedObserverHandler={handleResize:this.handleResize.bind(this)},null===(e=this.sharedObserver)||void 0===e||e.addObserver({target:this.mainBRContainer,handler:this.sharedObserverHandler})}},{key:"handleResize",value:function(e){var t=e.contentRect,n=e.target,o=this.brWidth,r=this.brHeight,i=this.bookreader.animating;n===this.mainBRContainer&&(this.brWidth=t.width,this.brHeight=t.height);var s=o!==this.brWidth,a=r!==this.brHeight;i||!s&&!a||this.bookreader.resize()}},{key:"manageFullScreenBehavior",value:function(){this.emitFullScreenState(),this.bookreader.options.enableFSLogoShortcut&&(this.bookreader.isFullscreen()?this.addFullscreenShortcut():this.deleteFullscreenShortcut())}},{key:"emitFullScreenState",value:function(){var e=this.bookreader.isFullscreen(),t=new CustomEvent("ViewportInFullScreen",{detail:{isFullScreen:e}});this.dispatchEvent(t)}},{key:"loadingClass",get:function(){return this.bookReaderLoaded?"":"loading"}},{key:"itemImage",get:function(){var e="https://".concat(this.baseHost,"/services/img/").concat(this.item.metadata.identifier);return(0,o.dy)(Ts||(Ts=Ws(['<img class="cover-img" src=',' alt="cover image for ','">'])),e,this.item.metadata.identifier)}},{key:"render",value:function(){var e=this.bookReaderCannotLoad?this.itemImage:this.loader;return(0,o.dy)(Ps||(Ps=Ws(['<div id="book-navigator" class="','">\n ','\n <slot name="theater-main"></slot>\n </div>\n '])),this.loadingClass,e)}}])&&Xs(t.prototype,n),r&&Xs(t,r),l}(o.oi);function oa(e){return(oa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ra(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ia(e){return function(e){if(Array.isArray(e))return sa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return sa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sa(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function aa(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function la(e,t){return(la=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ca(e,t){if(t&&("object"===oa(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return da(e)}function da(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ua(e){return(ua=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}customElements.define("book-navigator",na);var ha=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&la(e,t)}(l,e);var t,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ua(i);if(s){var n=ua(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ca(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this)).item=void 0,e.bookreader=void 0,e.baseHost="https://archive.org",e.fullscreen=!1,e.signedIn=!1,e.modal=void 0,e.sharedObserver=void 0,e.loaded=!1,e.menuShortcuts=[],e.menuContents=[],console.log("ia-bookreader constructor",da(e)),e}return t=l,r=[{key:"properties",get:function(){return{item:{type:Object},baseHost:{type:String},signedIn:{type:Boolean},fullscreen:{type:Boolean,reflect:!0,attribute:!0},sharedObserver:{type:Object,attribute:!1},modal:{type:Object,attribute:!1},loaded:{type:Boolean},menuShortcuts:{type:Array},menuContents:{type:Array}}}},{key:"styles",get:function(){return(0,o.iv)(ea||(ea=ra(['\n :host {\n display: block;\n height: inherit;\n min-height: inherit;\n --primaryBGColor: var(--black, #000);\n --secondaryBGColor: #222;\n --tertiaryBGColor: #333;\n --primaryTextColor: var(--white, #fff);\n --primaryCTAFill: #194880;\n --primaryCTABorder: #c5d1df;\n --secondaryCTAFill: #333;\n --secondaryCTABorder: #999;\n --primaryErrorCTAFill: #e51c26;\n --primaryErrorCTABorder: #f8c6c8;\n }\n\n :host([fullscreen]),\n ia-item-navigator[viewportinfullscreen] {\n position: fixed;\n inset: 0;\n height: 100vh;\n min-height: unset;\n }\n\n div[slot="theater-main"],\n div[slot="theater-main"] > * {\n height: inherit;\n }\n\n slot {\n display: block;\n }\n\n .ia-bookreader {\n background-color: var(--primaryBGColor);\n position: relative;\n min-height: inherit;\n height: inherit;\n }\n\n ia-item-navigator {\n min-height: var(--br-height, inherit);\n height: var(--br-height, inherit);\n display: block;\n width: 100%;\n color: var(--primaryTextColor);\n --menuButtonLabelDisplay: block;\n --menuWidth: 320px;\n --menuSliderBg: var(--secondaryBGColor);\n --activeButtonBg: var(--tertiaryBGColor);\n --subpanelRightBorderColor: var(--secondaryCTABorder);\n --animationTiming: 100ms;\n --iconFillColor: var(--primaryTextColor);\n --iconStrokeColor: var(--primaryTextColor);\n --menuSliderHeaderIconHeight: 2rem;\n --menuSliderHeaderIconWidth: 2rem;\n --iconWidth: 2.4rem;\n --iconHeight: 2.4rem;\n --shareLinkColor: var(--primaryTextColor);\n --shareIconBorder: var(--primaryTextColor);\n --shareIconBg: var(--secondaryBGColor);\n --activityIndicatorLoadingDotColor: var(--primaryTextColor);\n --activityIndicatorLoadingRingColor: var(--primaryTextColor);\n }\n '])))}}],(n=[{key:"updated",value:function(){this.modal||(this.modal=new Ut),this.sharedObserver||(this.sharedObserver=new zt)}},{key:"manageFullscreen",value:function(e){var t=!!e.detail.isFullScreen;this.fullscreen=t,this.dispatchEvent(new CustomEvent("fullscreenStatusUpdated",{detail:{fullscreen:t}}))}},{key:"loadingStateUpdated",value:function(e){var t=e.detail.loaded;this.loaded=t||null,this.dispatchEvent(new CustomEvent("loadingStateUpdated",{detail:{loaded:t}}))}},{key:"setMenuShortcuts",value:function(e){this.menuShortcuts=ia(e.detail)}},{key:"setMenuContents",value:function(e){var t=ia(e.detail);this.menuContents=t}},{key:"manageSideMenuEvents",value:function(e){var t=e.detail,n=t.menuId,o=t.action;n&&("open"===o?(this.itemNav.openShortcut(n),this.openShortcut(n)):"toggle"===o&&(this.itemNav.openMenu(n),this.itemNav.toggleMenu()))}},{key:"render",value:function(){return(0,o.dy)(Ks||(Ks=ra(['\n <div class="ia-bookreader">\n <ia-item-navigator\n ?viewportInFullscreen=',"\n .itemType=","\n .basehost=","\n .item=","\n .modal=","\n .loaded=","\n .sharedObserver=","\n ?signedIn=","\n .menuShortcuts=","\n .menuContents=",'\n >\n <div slot="theater-header">\n <slot name="theater-header"></slot>\n </div>\n <div slot="theater-main">\n <book-navigator\n .modal=',"\n .baseHost=","\n .itemMD=","\n ?signedIn=","\n ?sideMenuOpen=","\n .sharedObserver=","\n @ViewportInFullScreen=","\n @loadingStateUpdated=","\n @updateSideMenu=","\n @menuUpdated=","\n @menuShortcutsUpdated=",'\n >\n <div slot="theater-main">\n <slot name="theater-main"></slot>\n </div>\n </book-navigator>\n </div>\n </ia-item-navigator>\n </div>\n '])),this.fullscreen,"open",this.baseHost,this.item,this.modal,this.loaded,this.sharedObserver,this.signedIn,this.menuShortcuts,this.menuContents,this.modal,this.baseHost,this.item,this.signedIn,this.menuOpened,this.sharedObserver,this.manageFullscreen,this.loadingStateUpdated,this.manageSideMenuEvents,this.setMenuContents,this.setMenuShortcuts)}}])&&aa(t.prototype,n),r&&aa(t,r),l}(o.oi);window.customElements.define("ia-bookreader",ha)},8730:function(e,t,n){var o=n(111),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},3161:function(e,t,n){n(2109)({target:"Number",stat:!0},{isInteger:n(8730)})},4723:function(e,t,n){"use strict";var o=n(7007),r=n(9670),i=n(7466),s=n(1340),a=n(4488),l=n(1530),c=n(7651);o("match",(function(e,t,n){return[function(t){var n=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,n):new RegExp(t)[e](s(n))},function(e){var o=r(this),a=s(e),d=n(t,o,a);if(d.done)return d.value;if(!o.global)return c(o,a);var u=o.unicode;o.lastIndex=0;for(var h,p=[],f=0;null!==(h=c(o,a));){var m=s(h[0]);p[f]=m,""===m&&(o.lastIndex=l(a,i(o.lastIndex),u)),f++}return 0===f?null:p}]}))},3774:function(e,t){!function(e){"use strict";function t(e,t,n,o){var r,i=!1,s=0;function a(){r&&clearTimeout(r)}function l(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var u=this,h=Date.now()-s;function p(){s=Date.now(),n.apply(u,c)}function f(){r=void 0}i||(o&&!r&&p(),a(),void 0===o&&h>e?p():!0!==t&&(r=setTimeout(o?f:p,void 0===o?e-h:e)))}return"boolean"!=typeof t&&(o=n,n=t,t=void 0),l.cancel=function(){a(),i=!0},l}e.debounce=function(e,n,o){return void 0===o?t(e,n,!1):t(e,o,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)}},function(e){e(e.s=2937)}]);
1458
+ //# sourceMappingURL=ia-bookreader-bundle.js.map