@internetarchive/bookreader 5.0.0-6-14 → 5.0.0-60
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintrc.js +17 -15
- package/.github/workflows/node.js.yml +72 -10
- package/.github/workflows/npm-publish.yml +6 -20
- package/.testcaferc.js +10 -0
- package/BookReader/BookReader.css +241 -140
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.LICENSE.txt +24 -20
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +1519 -0
- package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +17 -0
- package/BookReader/ia-bookreader-bundle.js.map +1 -0
- package/BookReader/icons/close-circle-dark.svg +1 -0
- package/BookReader/icons/magnify-minus.svg +1 -1
- package/BookReader/icons/magnify-plus.svg +1 -1
- package/BookReader/icons/pause.svg +1 -1
- package/BookReader/icons/playback-speed.svg +1 -1
- package/BookReader/icons/read-aloud.svg +1 -1
- package/BookReader/icons/voice.svg +1 -0
- package/BookReader/images/BRicons.svg +2 -2
- package/BookReader/images/books_graphic.svg +1 -1
- package/BookReader/images/icon_book.svg +1 -1
- package/BookReader/images/icon_gear.svg +1 -1
- package/BookReader/images/icon_info.svg +1 -1
- package/BookReader/images/icon_playback-rate.svg +1 -1
- package/BookReader/images/icon_search_button.svg +1 -1
- package/BookReader/images/icon_share.svg +1 -1
- package/BookReader/images/icon_speaker.svg +1 -1
- package/BookReader/images/icon_speaker_open.svg +1 -1
- package/BookReader/images/marker_chap-off.svg +1 -1
- package/BookReader/images/marker_chap-on.svg +1 -1
- package/BookReader/images/marker_srch-on.svg +1 -1
- package/BookReader/jquery-3.js +2 -0
- package/BookReader/jquery-3.js.LICENSE.txt +24 -0
- package/BookReader/plugins/plugin.archive_analytics.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js.map +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +1 -1
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.iframe.js +1 -1
- package/BookReader/plugins/plugin.iframe.js.map +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js +1 -1
- package/BookReader/plugins/plugin.mobile_nav.js.map +1 -1
- package/BookReader/plugins/plugin.resume.js +1 -1
- package/BookReader/plugins/plugin.resume.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +1 -1
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +1 -1
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- package/BookReader/plugins/plugin.tts.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -1
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -1
- package/BookReader/webcomponents-bundle.js +3 -0
- package/BookReader/webcomponents-bundle.js.LICENSE.txt +9 -0
- package/BookReader/webcomponents-bundle.js.map +1 -0
- package/BookReaderDemo/BookReaderDemo.css +14 -1
- package/BookReaderDemo/BookReaderJSAutoplay.js +4 -1
- package/BookReaderDemo/BookReaderJSSimple.js +1 -0
- package/BookReaderDemo/IADemoBr.js +147 -0
- package/BookReaderDemo/demo-advanced.html +2 -2
- package/BookReaderDemo/demo-autoplay.html +2 -1
- package/BookReaderDemo/demo-embed-iframe-src.html +2 -1
- package/BookReaderDemo/demo-fullscreen-mobile.html +2 -1
- package/BookReaderDemo/demo-fullscreen.html +2 -1
- package/BookReaderDemo/demo-iiif.html +2 -1
- package/BookReaderDemo/demo-internetarchive.html +84 -17
- package/BookReaderDemo/demo-multiple.html +2 -1
- package/BookReaderDemo/demo-preview-pages.html +2 -1
- package/BookReaderDemo/demo-simple.html +2 -1
- package/BookReaderDemo/demo-vendor-fullscreen.html +2 -1
- package/BookReaderDemo/ia-multiple-volumes-manifest.js +170 -0
- package/BookReaderDemo/immersion-1up.html +2 -1
- package/BookReaderDemo/immersion-mode.html +2 -1
- package/BookReaderDemo/toggle_controls.html +2 -1
- package/BookReaderDemo/view_mode.html +2 -1
- package/BookReaderDemo/viewmode-cycle.html +2 -3
- package/CHANGELOG.md +244 -0
- package/README.md +14 -1
- package/babel.config.js +19 -0
- package/codecov.yml +6 -0
- package/index.html +3 -0
- package/jsconfig.json +19 -0
- package/netlify.toml +5 -0
- package/package.json +70 -59
- package/renovate.json +52 -0
- package/scripts/preversion.js +4 -1
- package/src/BookNavigator/assets/bookmark-colors.js +1 -1
- package/src/BookNavigator/assets/button-base.js +9 -2
- package/src/BookNavigator/assets/ia-logo.js +17 -0
- package/src/BookNavigator/assets/icon_checkmark.js +1 -1
- package/src/BookNavigator/assets/icon_close.js +1 -1
- package/src/BookNavigator/assets/icon_sort_asc.js +5 -0
- package/src/BookNavigator/assets/icon_sort_desc.js +5 -0
- package/src/BookNavigator/assets/icon_sort_neutral.js +5 -0
- package/src/BookNavigator/assets/icon_volumes.js +11 -0
- package/src/BookNavigator/book-navigator.js +585 -0
- package/src/BookNavigator/bookmarks/bookmark-button.js +3 -2
- package/src/BookNavigator/bookmarks/bookmark-edit.js +3 -4
- package/src/BookNavigator/bookmarks/bookmarks-list.js +2 -3
- package/src/BookNavigator/bookmarks/bookmarks-loginCTA.js +3 -8
- package/src/BookNavigator/bookmarks/bookmarks-provider.js +27 -17
- package/src/BookNavigator/bookmarks/ia-bookmarks.js +116 -67
- package/src/BookNavigator/delete-modal-actions.js +1 -1
- package/src/BookNavigator/downloads/downloads-provider.js +36 -21
- package/src/BookNavigator/downloads/downloads.js +41 -25
- package/src/BookNavigator/search/search-provider.js +80 -28
- package/src/BookNavigator/search/search-results.js +34 -25
- package/src/BookNavigator/sharing.js +27 -0
- package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +11 -10
- package/src/BookNavigator/visual-adjustments/visual-adjustments.js +3 -3
- package/src/BookNavigator/volumes/volumes-provider.js +111 -0
- package/src/BookNavigator/volumes/volumes.js +188 -0
- package/src/BookReader/BookModel.js +59 -30
- package/src/BookReader/DebugConsole.js +3 -3
- package/src/BookReader/DragScrollable.js +233 -0
- package/src/BookReader/Mode1Up.js +56 -351
- package/src/BookReader/Mode1UpLit.js +391 -0
- package/src/BookReader/Mode2Up.js +73 -1318
- package/src/BookReader/Mode2UpLit.js +781 -0
- package/src/BookReader/ModeCoordinateSpace.js +29 -0
- package/src/BookReader/ModeSmoothZoom.js +211 -0
- package/src/BookReader/ModeThumb.js +17 -11
- package/src/BookReader/Navbar/Navbar.js +10 -36
- package/src/BookReader/PageContainer.js +69 -6
- package/src/BookReader/ReduceSet.js +1 -1
- package/src/BookReader/Toolbar/Toolbar.js +10 -37
- package/src/BookReader/events.js +2 -0
- package/src/BookReader/options.js +24 -2
- package/src/BookReader/utils/HTMLDimensionsCacher.js +44 -0
- package/src/BookReader/utils/ScrollClassAdder.js +31 -0
- package/src/BookReader/utils.js +108 -13
- package/src/BookReader.js +481 -828
- package/src/assets/icons/close-circle-dark.svg +1 -0
- package/src/assets/icons/magnify-minus.svg +3 -7
- package/src/assets/icons/magnify-plus.svg +3 -7
- package/src/assets/icons/voice.svg +1 -0
- package/src/css/_BRBookmarks.scss +1 -1
- package/src/css/_BRComponent.scss +1 -1
- package/src/css/_BRmain.scss +33 -0
- package/src/css/_BRnav.scss +4 -26
- package/src/css/_BRpages.scss +147 -40
- package/src/css/_BRsearch.scss +25 -11
- package/src/css/_TextSelection.scss +16 -17
- package/src/css/_colorbox.scss +2 -2
- package/src/css/_controls.scss +17 -5
- package/src/css/_icons.scss +7 -1
- package/src/ia-bookreader/ia-bookreader.js +224 -0
- package/src/plugins/plugin.archive_analytics.js +3 -3
- package/src/plugins/plugin.autoplay.js +4 -9
- package/src/plugins/plugin.chapters.js +28 -35
- package/src/plugins/plugin.mobile_nav.js +11 -10
- package/src/plugins/plugin.resume.js +3 -3
- package/src/plugins/plugin.text_selection.js +32 -41
- package/src/plugins/plugin.vendor-fullscreen.js +4 -4
- package/src/plugins/search/plugin.search.js +179 -103
- package/src/plugins/search/view.js +59 -44
- package/src/plugins/tts/AbstractTTSEngine.js +46 -37
- package/src/plugins/tts/FestivalTTSEngine.js +13 -14
- package/src/plugins/tts/PageChunk.js +15 -21
- package/src/plugins/tts/PageChunkIterator.js +8 -12
- package/src/plugins/tts/WebTTSEngine.js +87 -71
- package/src/plugins/tts/plugin.tts.js +94 -125
- package/src/plugins/tts/utils.js +0 -25
- package/src/plugins/url/UrlPlugin.js +193 -0
- package/src/plugins/{plugin.url.js → url/plugin.url.js} +45 -16
- package/src/util/docCookies.js +21 -2
- package/tests/e2e/README.md +37 -0
- package/tests/e2e/autoplay.test.js +2 -2
- package/tests/e2e/base.test.js +7 -7
- package/tests/e2e/helpers/base.js +28 -23
- package/tests/e2e/helpers/debug.js +1 -1
- package/tests/e2e/helpers/desktopSearch.js +14 -13
- package/tests/e2e/helpers/mobileSearch.js +3 -3
- package/tests/e2e/helpers/params.js +17 -0
- package/tests/e2e/helpers/rightToLeft.js +4 -10
- package/tests/e2e/models/Navigation.js +13 -4
- package/tests/e2e/rightToLeft.test.js +4 -5
- package/tests/e2e/viewmode.test.js +40 -33
- package/tests/jest/BookNavigator/book-navigator.test.js +658 -0
- package/tests/jest/BookNavigator/bookmarks/bookmark-button.test.js +43 -0
- package/tests/{karma → jest}/BookNavigator/bookmarks/bookmark-edit.test.js +25 -26
- package/tests/{karma → jest}/BookNavigator/bookmarks/bookmarks-list.test.js +41 -42
- package/tests/jest/BookNavigator/bookmarks/ia-bookmarks.test.js +45 -0
- package/tests/jest/BookNavigator/downloads/downloads-provider.test.js +67 -0
- package/tests/jest/BookNavigator/downloads/downloads.test.js +53 -0
- package/tests/jest/BookNavigator/search/search-provider.test.js +167 -0
- package/tests/{karma/BookNavigator → jest/BookNavigator/search}/search-results.test.js +104 -60
- package/tests/jest/BookNavigator/sharing/sharing-provider.test.js +49 -0
- package/tests/jest/BookNavigator/visual-adjustments.test.js +200 -0
- package/tests/jest/BookNavigator/volumes/volumes-provider.test.js +184 -0
- package/tests/jest/BookNavigator/volumes/volumes.test.js +97 -0
- package/tests/{BookReader → jest/BookReader}/BookModel.test.js +59 -14
- package/tests/jest/BookReader/BookReaderPublicFunctions.test.js +193 -0
- package/tests/{BookReader → jest/BookReader}/DebugConsole.test.js +1 -1
- package/tests/{BookReader → jest/BookReader}/ImageCache.test.js +4 -4
- package/tests/jest/BookReader/Mode1UpLit.test.js +73 -0
- package/tests/jest/BookReader/Mode2Up.test.js +98 -0
- package/tests/jest/BookReader/Mode2UpLit.test.js +190 -0
- package/tests/jest/BookReader/ModeCoordinateSpace.test.js +16 -0
- package/tests/jest/BookReader/ModeSmoothZoom.test.js +175 -0
- package/tests/jest/BookReader/ModeThumb.test.js +71 -0
- package/tests/{BookReader → jest/BookReader}/Navbar/Navbar.test.js +10 -10
- package/tests/{BookReader → jest/BookReader}/PageContainer.test.js +88 -6
- package/tests/{BookReader → jest/BookReader}/ReduceSet.test.js +1 -1
- package/tests/{BookReader → jest/BookReader}/Toolbar/Toolbar.test.js +2 -2
- package/tests/jest/BookReader/utils/HTMLDimensionsCacher.test.js +59 -0
- package/tests/jest/BookReader/utils/ScrollClassAdder.test.js +49 -0
- package/tests/{BookReader → jest/BookReader}/utils/classes.test.js +1 -1
- package/tests/jest/BookReader/utils.test.js +217 -0
- package/tests/jest/BookReader.keyboard.test.js +190 -0
- package/tests/{BookReader.options.test.js → jest/BookReader.options.test.js} +9 -1
- package/tests/{BookReader.test.js → jest/BookReader.test.js} +26 -37
- package/tests/{plugins → jest/plugins}/plugin.archive_analytics.test.js +2 -2
- package/tests/{plugins → jest/plugins}/plugin.autoplay.test.js +4 -4
- package/tests/{plugins → jest/plugins}/plugin.chapters.test.js +10 -11
- package/tests/{plugins → jest/plugins}/plugin.iframe.test.js +2 -2
- package/tests/{plugins → jest/plugins}/plugin.mobile_nav.test.js +5 -5
- package/tests/{plugins → jest/plugins}/plugin.resume.test.js +3 -3
- package/tests/{plugins → jest/plugins}/plugin.text_selection.test.js +39 -47
- package/tests/{plugins → jest/plugins}/plugin.vendor-fullscreen.test.js +2 -2
- package/tests/{plugins → jest/plugins}/search/plugin.search.test.js +57 -47
- package/tests/{plugins → jest/plugins}/search/plugin.search.view.test.js +35 -6
- package/tests/{plugins → jest/plugins}/tts/AbstractTTSEngine.test.js +9 -9
- package/tests/{plugins → jest/plugins}/tts/FestivalTTSEngine.test.js +4 -4
- package/tests/{plugins → jest/plugins}/tts/PageChunk.test.js +1 -1
- package/tests/{plugins → jest/plugins}/tts/PageChunkIterator.test.js +3 -3
- package/tests/{plugins → jest/plugins}/tts/WebTTSEngine.test.js +47 -1
- package/tests/{plugins → jest/plugins}/tts/utils.test.js +1 -60
- package/tests/jest/plugins/url/UrlPlugin.test.js +190 -0
- package/tests/{plugins → jest/plugins/url}/plugin.url.test.js +53 -14
- package/tests/jest/setup.js +3 -0
- package/tests/{util → jest/util}/browserSniffing.test.js +1 -1
- package/tests/jest/util/docCookies.test.js +24 -0
- package/tests/{util → jest/util}/strings.test.js +1 -1
- package/tests/{utils.js → jest/utils.js} +38 -0
- package/webpack.config.js +11 -5
- package/.babelrc +0 -12
- package/.dependabot/config.yml +0 -6
- package/.testcaferc.json +0 -5
- package/BookReader/bookreader-component-bundle.js +0 -1450
- package/BookReader/bookreader-component-bundle.js.LICENSE.txt +0 -38
- package/BookReader/bookreader-component-bundle.js.map +0 -1
- package/BookReader/jquery-1.10.1.js +0 -2
- package/BookReader/jquery-1.10.1.js.LICENSE.txt +0 -24
- package/BookReader/plugins/plugin.menu_toggle.js +0 -2
- package/BookReader/plugins/plugin.menu_toggle.js.map +0 -1
- package/BookReaderDemo/bookreader-template-bundle.js +0 -7178
- package/BookReaderDemo/demo-plugin-menu-toggle.html +0 -34
- package/karma.conf.js +0 -23
- package/src/BookNavigator/BookModel.js +0 -14
- package/src/BookNavigator/BookNavigator.js +0 -438
- package/src/BookNavigator/assets/book-loader.js +0 -27
- package/src/BookNavigator/br-fullscreen-mgr.js +0 -83
- package/src/BookNavigator/search/a-search-result.js +0 -55
- package/src/BookReaderComponent/BookReaderComponent.js +0 -112
- package/src/ItemNavigator/ItemNavigator.js +0 -372
- package/src/ItemNavigator/providers/sharing.js +0 -29
- package/src/dragscrollable-br.js +0 -261
- package/src/plugins/menu_toggle/plugin.menu_toggle.js +0 -324
- package/tests/BookReader/BookReaderPublicFunctions.test.js +0 -171
- package/tests/BookReader/Mode1Up.test.js +0 -164
- package/tests/BookReader/Mode2Up.test.js +0 -247
- package/tests/BookReader/utils.test.js +0 -109
- package/tests/e2e/ia-production/ia-prod-base.js +0 -17
- package/tests/karma/BookNavigator/book-navigator.test.js +0 -132
- package/tests/karma/BookNavigator/visual-adjustments.test.js +0 -201
- package/tests/plugins/menu_toggle/plugin.menu_toggle.test.js +0 -68
- package/tests/util/docCookies.test.js +0 -15
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/dom.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/template.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/modify-template.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/directive.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/part.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/template-instance.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/template-result.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/parts.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/template-factory.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/render.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/default-template-processor.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lit-html.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/lib/shady-render.js","webpack://@internetarchive/bookreader/./node_modules/lit-element/lib/updating-element.js","webpack://@internetarchive/bookreader/./node_modules/lit-element/lib/decorators.js","webpack://@internetarchive/bookreader/./node_modules/lit-element/lib/css-tag.js","webpack://@internetarchive/bookreader/./node_modules/lit-element/lit-element.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-menu-slider/src/styles/menu-slider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-collapse-sidebar/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-collapse-sidebar/icon-collapse-sidebar.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-menu-slider/src/styles/menu-button.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-menu-slider/src/menu-button.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-menu-slider/src/ia-menu-slider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-advance/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-applepay/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-audio/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-calendar/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-calendar-blank/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-close/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-credit-card/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-donate/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-dl/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-edit-pencil/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-ellipses/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-email/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-facebook/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-googlepay/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-ia-logo/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-images/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-link/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-locale-pin/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-lock/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-minus/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-plus/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-paypal/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-pinterest/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-search/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-share/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-software/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-texts/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-toc/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-tumblr/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-twitter/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-upload/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-user/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-venmo/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-video/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-visual-adjustment/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-volumes/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-web/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-icons/src/ia-icon.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-config.js","webpack://@internetarchive/bookreader/./node_modules/tslib/tslib.es6.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-activity-indicator/src/ia-activity-indicator.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-activity-indicator/ia-activity-indicator.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/node_modules/@internetarchive/icon-close/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/node_modules/@internetarchive/icon-ia-logo/index.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-template.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-manager-mode.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-manager-host-bridge.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/modal-manager/dist/src/modal-manager.js","webpack://@internetarchive/bookreader/./src/ItemNavigator/ItemNavigator.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/directives/unsafe-html.js","webpack://@internetarchive/bookreader/./src/BookNavigator/search/a-search-result.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/icon_checkmark.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/icon_close.js","webpack://@internetarchive/bookreader/./src/BookNavigator/search/search-results.js","webpack://@internetarchive/bookreader/./src/BookNavigator/search/search-provider.js","webpack://@internetarchive/bookreader/./src/BookNavigator/downloads/downloads.js","webpack://@internetarchive/bookreader/./src/BookNavigator/downloads/downloads-provider.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/directives/repeat.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-minus/icon-magnify-minus.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-magnify-plus/icon-magnify-plus.js","webpack://@internetarchive/bookreader/./src/BookNavigator/visual-adjustments/visual-adjustments.js","webpack://@internetarchive/bookreader/./src/BookNavigator/visual-adjustments/visual-adjustments-provider.js","webpack://@internetarchive/bookreader/./src/BookNavigator/delete-modal-actions.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmark-button.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/button-base.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmarks-loginCTA.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/ia-bookmarks.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/bookmark-colors.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmark-edit.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-edit-pencil/icon-edit-pencil.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmarks-list.js","webpack://@internetarchive/bookreader/./src/BookNavigator/bookmarks/bookmarks-provider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-bookmark/src/icon-bookmark.js","webpack://@internetarchive/bookreader/./node_modules/lit-html/directives/class-map.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-link/icon-link.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-sharing-options/src/styles/ia-sharing-options.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-email/icon-email.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-sharing-options/src/providers/provider.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-sharing-options/src/providers/email.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-facebook/icon-facebook.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-sharing-options/src/providers/facebook.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-pinterest/icon-pinterest.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-sharing-options/src/providers/pinterest.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-tumblr/icon-tumblr.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-sharing-options/src/providers/tumblr.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/icon-twitter/icon-twitter.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-sharing-options/src/providers/twitter.js","webpack://@internetarchive/bookreader/./node_modules/@internetarchive/ia-sharing-options/src/ia-sharing-options.js","webpack://@internetarchive/bookreader/./src/ItemNavigator/providers/sharing.js","webpack://@internetarchive/bookreader/./src/util/debouncer.js","webpack://@internetarchive/bookreader/./src/BookNavigator/br-fullscreen-mgr.js","webpack://@internetarchive/bookreader/./src/BookNavigator/BookModel.js","webpack://@internetarchive/bookreader/./src/BookNavigator/assets/book-loader.js","webpack://@internetarchive/bookreader/./src/BookNavigator/BookNavigator.js","webpack://@internetarchive/bookreader/./src/BookReaderComponent/BookReaderComponent.js","webpack://@internetarchive/bookreader/./node_modules/core-js/internals/freezing.js","webpack://@internetarchive/bookreader/./node_modules/core-js/internals/function-bind.js","webpack://@internetarchive/bookreader/./node_modules/core-js/internals/inherit-if-required.js","webpack://@internetarchive/bookreader/./node_modules/core-js/internals/internal-metadata.js","webpack://@internetarchive/bookreader/./node_modules/core-js/internals/is-integer.js","webpack://@internetarchive/bookreader/./node_modules/core-js/internals/string-trim.js","webpack://@internetarchive/bookreader/./node_modules/core-js/internals/whitespaces.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.array.splice.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.number.constructor.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.number.is-integer.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.object.assign.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.object.freeze.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.object.get-prototype-of.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.reflect.construct.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.regexp.constructor.js","webpack://@internetarchive/bookreader/./node_modules/core-js/modules/es.string.match.js","webpack://@internetarchive/bookreader/./node_modules/throttle-debounce/index.umd.js"],"names":["isCEPolyfill","window","customElements","undefined","polyfillWrapFlushCallback","removeNodes","container","start","end","n","nextSibling","removeChild","marker","String","Math","random","slice","nodeMarker","markerRegex","RegExp","boundAttributeSuffix","Template","result","element","this","parts","nodesToRemove","stack","walker","document","createTreeWalker","content","lastPartIndex","index","partIndex","strings","values","length","node","nextNode","nodeType","hasAttributes","attributes","count","i","endsWith","name","stringForPart","lastAttributeNameRegex","exec","attributeLookupName","toLowerCase","attributeValue","getAttribute","removeAttribute","statics","split","push","type","tagName","currentNode","data","indexOf","parent","parentNode","lastIndex","insert","s","createMarker","match","createTextNode","insertBefore","previousSibling","pop","str","suffix","isTemplatePartActive","part","createComment","removeNodesFromTemplate","template","nextActiveIndexInTemplateParts","nodeIndex","removeCount","nodesToRemoveInTemplate","currentRemovingNode","has","forEach","countNodes","startIndex","directives","WeakMap","directive","f","args","d","set","isDirective","o","noChange","nothing","TemplateInstance","processor","options","__parts","setValue","commit","fragment","cloneNode","importNode","nodeName","handleTextExpression","insertAfterNode","handleAttributeExpressions","adoptNode","upgrade","policy","trustedTypes","createPolicy","createHTML","commentMarker","TemplateResult","l","html","isCommentBinding","commentOpen","lastIndexOf","attributeMatch","substr","createElement","value","getHTML","innerHTML","isPrimitive","isIterable","Array","isArray","Symbol","iterator","AttributeCommitter","dirty","_createPart","AttributePart","v","text","t","setAttribute","_getValue","committer","NodePart","__pendingValue","startNode","appendChild","endNode","ref","__insert","__commitText","__commitTemplateResult","Node","__commitNode","__commitIterable","clear","valueAsString","templateFactory","update","instance","_clone","itemParts","itemPart","item","appendIntoPart","insertAfterPart","BooleanAttributePart","Error","PropertyCommitter","super","single","PropertyPart","eventOptionsSupported","addEventListener","removeEventListener","_e","EventPart","eventName","eventContext","__boundHandleEvent","e","handleEvent","newListener","oldListener","shouldRemoveListener","capture","once","passive","shouldAddListener","__options","getOptions","event","call","templateCache","templateCaches","get","stringsArray","keyString","Map","key","join","getTemplateElement","render","firstChild","Object","assign","appendInto","prefix","getTemplateCacheKey","scopeName","compatibleShadyCSSVersion","ShadyCSS","prepareTemplateDom","console","warn","shadyTemplateFactory","cacheKey","TEMPLATE_TYPES","shadyRenderSet","Set","JSCompiler_renameProperty","prop","_obj","defaultConverter","Boolean","JSON","stringify","Number","parse","notEqual","old","defaultPropertyDeclaration","attribute","converter","reflect","hasChanged","UpdatingElement","HTMLElement","initialize","finalize","_classProperties","p","attr","_attributeNameForProperty","_attributeToPropertyMap","hasOwnProperty","superProperties","getPrototypeOf","k","_ensureClassProperties","noAccessor","prototype","descriptor","getPropertyDescriptor","defineProperty","oldValue","requestUpdateInternal","configurable","enumerable","superCtor","props","properties","propKeys","getOwnPropertyNames","getOwnPropertySymbols","createProperty","fromAttribute","toAttribute","_updateState","_updatePromise","Promise","res","_enableUpdatingResolver","_changedProperties","_saveInstanceProperties","constructor","_v","_instanceProperties","enableUpdating","_attributeToProperty","ctor","attrValue","_propertyValueToAttribute","propName","getPropertyOptions","_propertyValueFromAttribute","shouldRequestUpdate","_valueHasChanged","_reflectingProperties","_hasRequestedUpdate","_enqueueUpdate","updateComplete","performUpdate","_applyInstanceProperties","shouldUpdate","changedProperties","_markUpdated","firstUpdated","updated","_getUpdateComplete","size","_propertyToAttribute","customElement","classOrDescriptor","clazz","define","legacyCustomElement","kind","elements","standardCustomElement","standardProperty","placement","initializer","property","protoOrDescriptor","proto","legacyProperty","ElementProto","Element","msMatchesSelector","webkitMatchesSelector","supportsAdoptingStyleSheets","nativeShadow","Document","CSSStyleSheet","constructionToken","CSSResult","cssText","safeToken","_styleSheet","replaceSync","css","reduce","acc","idx","textFromCSSResult","renderNotImplemented","LitElement","styles","userStyles","getStyles","addStyles","reduceRight","add","unshift","_styles","map","cssRules","rule","_getUniqueStyles","renderRoot","createRenderRoot","ShadowRoot","adoptStyles","attachShadow","mode","adoptedStyleSheets","styleSheet","_needsShimAdoptedStyleSheets","ScopingShim","prepareAdoptedCssText","localName","connectedCallback","hasUpdated","styleElement","templateResult","style","textContent","hasRendered","needsScoping","host","firstScopeRender","renderContainer","createDocumentFragment","delete","renderedDOM","templateElement","querySelectorAll","prepareTemplateStyles","condensedStyle","templates","from","removeStylesFromLitTemplates","refNode","insertCount","walkerIndex","insertNodeIntoTemplate","querySelector","removes","menuButtonWidth","sliderWidth","transitionTiming","icon","href","label","menuDetails","id","selected","followable","preventDefault","dispatchMenuTypeSelectedEvent","dispatchEvent","CustomEvent","bubbles","composed","detail","iconClass","buttonClass","onClick","menuItem","linkButton","clickButton","sliderEvents","closeDrawer","iconTemplates","applePay","advance","audio","calendar","calendarBlank","close","collapseSidebar","creditCard","donate","download","editPencil","ellipses","email","facebook","googlePay","iaLogo","images","link","localePin","lock","magnifyMinus","magnifyPlus","paypal","pinterest","search","share","software","texts","toc","tumblr","twitter","upload","user","venmo","video","visualAdjustment","volumes","web","ModalConfig","_a","_b","_c","_d","title","subtitle","headline","message","headerColor","showProcessingIndicator","processingImageMode","showCloseButton","closeOnBackdropClick","__decorate","decorators","target","desc","c","arguments","r","getOwnPropertyDescriptor","Reflect","decorate","IAActivityIndicatorMode","freeze","processing","complete","checkmarkColorCss","completedRingColorCss","loadingRingColorCss","loadingDotColorCss","ModalTemplate","config","closeButtonTemplate","Event","handleCloseButton","modalLogoSize","processingImageSize","modalCornerRadius","modalBorder","modalBottomMarginCss","modalTopMarginCss","modalHeaderBottomPaddingCss","modalBottomPadding","scrollOffset","titleFontSize","subtitleFontSize","headlineFontSize","messageFontSize","titleLineHeight","subtitleLineHeight","headlineLineHeight","messageLineHeight","ModalManagerMode","ModalManagerHostBridge","modalManager","windowResizeThrottler","throttle","updateModalContainerHeight","bind","Open","startResizeListener","stopDocumentScroll","Closed","stopResizeListener","resumeDocumentScroll","setProperty","innerHeight","body","classList","remove","ModalManager","hostBridge","backdropClicked","closeButtonPressed","customModalContent","callback","userClosedModalCallback","thisArg","generator","modalTemplate","focus","P","resolve","reject","fulfilled","step","next","rejected","done","then","apply","changed","handleModeChange","closeModal","callUserClosedModalCallback","emitModeChangeEvent","modalBackdropColor","modalBackdropZindex","modalWidth","modalMaxWidth","modalZindex","selector","legacyQuery","standardQuery","ItemNavigator","baseHost","itemType","menuOpened","signedIn","menuShortcuts","menuContents","viewportInFullscreen","openMenu","renderModalManager","atob","newVal","oldVal","arg","subnavWidth","tabletPlusQuery","transitionEffect","modal","showModal","modalConfig","isFullScreen","action","menuId","openShortcut","toggleMenu","selectedMenuId","drawerState","fullscreenState","setOpenMenu","closeMenu","shortcuts","menuToggleButton","menuSlider","manageViewportFullscreen","manageSideMenuEvents","setMenuContents","setMenuShortcuts","showItemNavigatorModal","closeItemNavigatorModal","renderMenu","menuClass","renderSideMenu","renderViewport","menus","open","selectedMenu","animateMenuOpen","manuallyHandleClose","drawerClosed","selectedMenuDetails","find","menu","component","setSelectedMenu","actionButton","actionSection","closeButton","sliderDetailsClass","menuItems","selectedMenuClass","renderMenuHeader","selectedMenuComponent","previousValues","unsafeHTML","previousValue","BookSearchResult","matchRegex","hit","replace","par","resultDetails","pageNumber","isInteger","page","coverImage","cover","resultSelected","highlightedHit","IABookSearchResults","results","query","queryInProgress","renderHeader","renderSearchAllFields","displayResultImages","errorMessage","bindBookReaderListeners","renderSearchAllFiles","searchResultText","searchResultBg","searchResultBorder","activeButtonBg","checkmarkIcon","closeIcon","focusOnInputIfNecessary","setResults","shadowRoot","currentTarget","input","dispatchSearchCanceled","header","resultsCount","controls","resultsClass","selectResult","performSearch","searchMultipleControls","setQuery","showSearchCTA","headerSection","searchForm","loadingIndicator","setErrorMessage","resultsSet","searchCTA","searchState","onSearchChange","brInstance","onBookSearchInitiated","onSearchStarted","onSearchRequestError","onSearchResultsClicked","onSearchResultsChange","onSearchResultsCleared","bindEventListeners","getMenuDetails","getComponent","advanceToPage","updateMenu","bookreader","unit","term","errorType","errorMessages","noResults","notIndexed","default","messageToShow","searchResults","matches","q","searchView","clearSearchFieldAndResults","leaf","leafNumToIndex","_searchPluginGoToResult","updateSearchHilites","IABookDownloads","downloads","expiration","option","url","note","formatsCount","loanExpiryMessage","renderDownloadOptions","menuBase","pdf","epub","computeAvailableTypes","downloadTypes","ending","availableTypes","menuData","found","incoming","formattedType","downloadOption","menuInfo","createAndInsertPart","containerPart","beforePart","beforeNode","newPart","updatePart","insertPartBefore","before","removePart","generateMap","list","partListCache","keyListCache","repeat","items","keyFnOrTemplate","keyFn","oldParts","oldKeys","newParts","newValues","newKeys","newKeyToIndexMap","oldKeyToIndexMap","oldHead","oldTail","newHead","newTail","oldIndex","oldPart","namespacedEvent","events","optionChange","zoomIn","zoomOut","IABookVisualAdjustments","activeCount","showZoomControls","activeOptions","emitOptionChangedEvent","active","changedOptionId","prepareEventDetails","optionName","updatedOptions","checkedOption","min","max","setRangeValue","formID","changeActiveStateFor","rangeSlider","activeAdjustments","emitZoomOut","emitZoomIn","adjustmentCheckbox","zoomControls","visualAdjustmentOptions","onOptionChange","bookContainerSelector","onAdjustmentChange","optionUpdateComplete","updateOptionsCount","onZoomIn","onZoomOut","zoom","adjustments","brightness","contrast","grayscale","invert","filters","newValue","DeleteModalActions","cancelAction","Function","deleteAction","pageID","BookmarkButton","state","side","position","handleClick","BookmarksLogin","mainCss","buttonStyles","api","endpoint","headers","fetch","identifier","credentials","method","getAll","post","bookmark","sendBookmarkData","put","notes","color","IABookmarks","bookmarks","editedBookmark","displayMode","bookmarkColors","className","defaultColor","activeBookmarkID","isNaN","emitBookmarksChanged","bookId","fetchBookmarks","initializeBookmarks","catch","err","setTimeout","renderBookmarkButtons","markActiveBookmark","constModeThumb","leafNum","nomalizedParams","getBookmarkColor","formatPage","getPageNum","thumbnail","getPageURI","json","success","error","bkmrks","keys","formattedLeafNum","parseInt","formattedBookmark","formatBookmark","getBookmark","confirmDeletion","createBookmark","$","not","pageEl","existingButton","pageBookmark","bookmarkState","_models","book","getPage","isViewable","bookmarkButton","stopPropagation","pageSide","constMode2up","bookmarkButtonClicked","atSetup","currentIndex","pagesInView","displayedIndices","pagesHaveActiveBookmark","includes","requestedPageHasBookmark","closeEdit","m","existingBookmark","bookmarkEdited","emitBookmarkButtonClicked","disableAddBookmarkButton","jumpToPage","emitShowModal","deleteBookmark","emitCloseModal","currBookmarks","loginClicked","pageToCheck","shouldEnableAddBookmarkButton","addBookmark","bookmarkSelected","saveBookmark","loginUrl","bookmarksList","allowAddingBookmark","addBookmarkButton","loginClick","IABookmarkEdit","showBookmark","bookmarkEditCSS","buttonCSS","bookmarkColorsCSS","colorId","bookmarkId","emitColorChangedEvent","changeColorTo","bookmarkTemplate","emitSaveEvent","updateNote","bookmarkColor","emitDeleteEvent","IABookmarksList","defaultBookmarkColor","emitEditEvent","emitSaveBookmark","emitDeleteBookmark","colorVal","labelInfo","editMode","bookmarkColorInfo","activeClass","emitSelectedEvent","editBookmark","editBookmarkComponent","emitBookmarkColorChanged","sort","a","b","bookmarksCount","sortedBookmarks","sortBookmarks","bookmarkItem","bookmarkslist","BookmarksProvider","boundOptions","bookmarksLoginClicked","bindEvents","setup","bookmarksChanged","bookmarksLength","onBookmarksChanged","archive_analytics","send_event_no_sampling","location","path","ClassList","classes","cls","classString","previousClassesCache","classMap","classInfo","previousClasses","params","promoCopy","encodeString","description","creator","encodeURIComponent","class","encodedDescription","encodedCreator","encodedPromoCopy","copyToClipboard","textarea","select","execCommand","blur","clearTimeout","timeout","embedOptionsVisible","sharingOptions","toggleEmbedOptions","sharingItems","embedOption","visible","embed","iframeEmbed","bbcodeEmbed","helpURL","metadata","baseItemType","reconcileItemType","Debouncer","threshhold","context","deferTimeout","executeCallback","BRFullscreenMgr","brSelector","debounceTime","savedScrollY","savedScrollX","teardown","resizeBookReaderContainer","handleResizeEvent","handleBookReaderHeight","brDom","scrollTo","execute","scrollX","scrollY","updateBrClasses","loanbar","loanbarHeight","offsetHeight","windowHeight","newHeight","height","top","Book","isRestricted","itemMetadata","BookNavigator","pageContainerSelector","brWidth","bookReaderCannotLoad","bookReaderLoaded","downloadableTypes","isAdmin","lendingInitialized","lendingStatus","menuProviders","sideMenuOpen","fullscreenMgr","brResizeObserver","model","shortcutOrder","setMetadata","emitPostInit","animating","resize","curIndex","jumpToIndex","el","SearchProvider","updateMenuContents","openSideSearchMenu","DownloadProvider","visualAdjustments","VisualAdjustmentProvider","SharingProvider","bookmarksOptions","addMenuShortcut","referrerStr","availableMenus","filter","shouldShowDownloadsMenu","splice","user_loan_record","sortMenuShortcuts","emitMenuShortcutsUpdated","initializeBookSubmenus","ResizeObserver","reactToBrResize","observe","mainBRContainer","manageFullScreenBehavior","downloadTypesAvailable","previewType","downloadURLs","setRestriction","entries","startBrWidth","contentRect","width","emitFullScreenState","isFullscreen","emitShowItemNavigatorModal","emitCloseItemNavigatorModal","loader","bookLoader","placeholder","itemImage","loadingClass","BookReader","base64Json","fetchData","ocaid","URLSearchParams","response","bookMetadata","jsonBtoa","btoa","setBaseJSON","fails","module","exports","isExtensible","preventExtensions","aFunction","isObject","factories","construct","C","argsLength","that","fn","partArgs","boundFunction","concat","setPrototypeOf","$this","dummy","Wrapper","NewTarget","NewTargetPrototype","hiddenKeys","uid","FREEZING","METADATA","it","objectID","weakData","meta","REQUIRED","fastKey","create","getWeakData","onFreeze","floor","isFinite","requireObjectCoercible","whitespace","ltrim","rtrim","createMethod","TYPE","string","trim","toAbsoluteIndex","toInteger","toLength","toObject","arraySpeciesCreate","HAS_SPECIES_SUPPORT","arrayMethodHasSpeciesSupport","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","forced","deleteCount","actualDeleteCount","A","to","O","len","actualStart","argumentsLength","TypeError","DESCRIPTORS","global","isForced","redefine","classof","inheritIfRequired","toPrimitive","NUMBER","NativeNumber","NumberPrototype","BROKEN_CLASSOF","toNumber","argument","first","third","radix","maxCode","digits","code","charCodeAt","NaN","NumberWrapper","valueOf","j","stat","$freeze","sham","nativeGetPrototypeOf","CORRECT_PROTOTYPE_GETTER","getBuiltIn","anObject","nativeConstruct","NEW_TARGET_BUG","F","ARGS_BUG","FORCED","Target","newTarget","$args","isRegExp","getFlags","stickyHelpers","enforceInternalState","setSpecies","MATCH","wellKnownSymbol","NativeRegExp","RegExpPrototype","re1","re2","CORRECT_NEW","UNSUPPORTED_Y","RegExpWrapper","pattern","flags","sticky","thisIsRegExp","patternIsRegExp","flagsAreUndefined","source","proxy","fixRegExpWellKnownSymbolLogic","advanceStringIndex","regExpExec","nativeMatch","maybeCallNative","regexp","matcher","rx","S","fullUnicode","unicode","matchStr","delay","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","wrapper","_len","arguments_","_key","self","elapsed","Date","now","cancel","debounce","atBegin","factory"],"mappings":";qRAgBO,MAAMA,EAAiC,oBAAXC,QACN,MAAzBA,OAAOC,qBAEHC,IADJF,OAAOC,eAAeE,0BAkBbC,EAAc,CAACC,EAAWC,EAAOC,EAAM,QAChD,KAAOD,IAAUC,GAAK,CAClB,MAAMC,EAAIF,EAAMG,YAChBJ,EAAUK,YAAYJ,GACtBA,EAAQE,ICvBHG,EAAS,SAASC,OAAOC,KAAKC,UAAUC,MAAM,OAK9CC,EAAa,UAAOL,UACpBM,EAAc,IAAIC,OAAO,GAAGP,KAAUK,KAItCG,EAAuB,QAI7B,MAAMC,EACT,YAAYC,EAAQC,GAChBC,KAAKC,MAAQ,GACbD,KAAKD,QAAUA,EACf,MAAMG,EAAgB,GAChBC,EAAQ,GAERC,EAASC,SAASC,iBAAiBP,EAAQQ,QAAS,IAAkD,MAAM,GAIlH,IAAIC,EAAgB,EAChBC,GAAS,EACTC,EAAY,EAChB,MAAM,QAAEC,EAASC,QAAQ,OAAEC,IAAaf,EACxC,KAAOY,EAAYG,GAAQ,CACvB,MAAMC,EAAOV,EAAOW,WACpB,GAAa,OAATD,GASJ,GADAL,IACsB,IAAlBK,EAAKE,SAAwC,CAC7C,GAAIF,EAAKG,gBAAiB,CACtB,MAAMC,EAAaJ,EAAKI,YAClB,OAAEL,GAAWK,EAMnB,IAAIC,EAAQ,EACZ,IAAK,IAAIC,EAAI,EAAGA,EAAIP,EAAQO,IACpBC,EAASH,EAAWE,GAAGE,KAAM1B,IAC7BuB,IAGR,KAAOA,KAAU,GAAG,CAGhB,MAAMI,EAAgBZ,EAAQD,GAExBY,EAAOE,EAAu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,GAQvB,SAASjkC,IACP2jC,OAAYztC,EAhBV0tC,IAmBAF,IAAiBC,GAKnB3qC,IAGF8qC,SAEqB5tC,IAAjBwtC,GAA8BU,EAAUZ,EAK1CxqC,KACwB,IAAfyqC,IAYTE,EAAY3Y,WAAW0Y,EAAe1jC,EAAQhH,OAAuB9C,IAAjBwtC,EAA6BF,EAAQY,EAAUZ,KAMvG,MAzE0B,kBAAfC,IACTC,EAAensB,EACfA,EAAWksB,EACXA,OAAavtC,GAoEf6tC,EAAQQ,OA7ER,WACET,IACAF,GAAY,GA6EPG,EAuBT9I,EAAQuJ,SAJR,SAAmBhB,EAAOiB,EAASltB,GACjC,YAAoBrhB,IAAbqhB,EAAyBnB,EAASotB,EAAOiB,GAAS,GAASruB,EAASotB,EAAOjsB,GAAsB,IAAZktB,IAI9FxJ,EAAQ7kB,SAAWA,EAEnBnT,OAAOkD,eAAe80B,EAAS,aAAc,CAAEh9B,OAAO,IAlJSymC,CAAQzJ,K","file":"bookreader-component-bundle.js","sourcesContent":["/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * True if the custom elements polyfill is in use.\n */\nexport const isCEPolyfill = typeof window !== 'undefined' &&\n window.customElements != null &&\n window.customElements.polyfillWrapFlushCallback !==\n undefined;\n/**\n * Reparents nodes, starting from `start` (inclusive) to `end` (exclusive),\n * into another container (could be the same container), before `before`. If\n * `before` is null, it appends the nodes to the container.\n */\nexport const reparentNodes = (container, start, end = null, before = null) => {\n while (start !== end) {\n const n = start.nextSibling;\n container.insertBefore(start, before);\n start = n;\n }\n};\n/**\n * Removes nodes, starting from `start` (inclusive) to `end` (exclusive), from\n * `container`.\n */\nexport const removeNodes = (container, start, end = null) => {\n while (start !== end) {\n const n = start.nextSibling;\n container.removeChild(start);\n start = n;\n }\n};\n//# sourceMappingURL=dom.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * An expression marker with embedded unique key to avoid collision with\n * possible text in templates.\n */\nexport const marker = `{{lit-${String(Math.random()).slice(2)}}}`;\n/**\n * An expression marker used text-positions, multi-binding attributes, and\n * attributes with markup-like text values.\n */\nexport const nodeMarker = `<!--${marker}-->`;\nexport const markerRegex = new RegExp(`${marker}|${nodeMarker}`);\n/**\n * Suffix appended to all bound attribute names.\n */\nexport const boundAttributeSuffix = '$lit$';\n/**\n * An updatable Template that tracks the location of dynamic parts.\n */\nexport class Template {\n constructor(result, element) {\n this.parts = [];\n this.element = element;\n const nodesToRemove = [];\n const stack = [];\n // Edge needs all 4 parameters present; IE11 needs 3rd parameter to be null\n const walker = document.createTreeWalker(element.content, 133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */, null, false);\n // Keeps track of the last index associated with a part. We try to delete\n // unnecessary nodes, but we never want to associate two different parts\n // to the same index. They must have a constant node between.\n let lastPartIndex = 0;\n let index = -1;\n let partIndex = 0;\n const { strings, values: { length } } = result;\n while (partIndex < length) {\n const node = walker.nextNode();\n if (node === null) {\n // We've exhausted the content inside a nested template element.\n // Because we still have parts (the outer for-loop), we know:\n // - There is a template in the stack\n // - The walker will find a nextNode outside the template\n walker.currentNode = stack.pop();\n continue;\n }\n index++;\n if (node.nodeType === 1 /* Node.ELEMENT_NODE */) {\n if (node.hasAttributes()) {\n const attributes = node.attributes;\n const { length } = attributes;\n // Per\n // https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap,\n // attributes are not guaranteed to be returned in document order.\n // In particular, Edge/IE can return them out of order, so we cannot\n // assume a correspondence between part index and attribute index.\n let count = 0;\n for (let i = 0; i < length; i++) {\n if (endsWith(attributes[i].name, boundAttributeSuffix)) {\n count++;\n }\n }\n while (count-- > 0) {\n // Get the template literal section leading up to the first\n // expression in this attribute\n const stringForPart = strings[partIndex];\n // Find the attribute name\n const name = lastAttributeNameRegex.exec(stringForPart)[2];\n // Find the corresponding attribute\n // All bound attributes have had a suffix added in\n // TemplateResult#getHTML to opt out of special attribute\n // handling. To look up the attribute value we also need to add\n // the suffix.\n const attributeLookupName = name.toLowerCase() + boundAttributeSuffix;\n const attributeValue = node.getAttribute(attributeLookupName);\n node.removeAttribute(attributeLookupName);\n const statics = attributeValue.split(markerRegex);\n this.parts.push({ type: 'attribute', index, name, strings: statics });\n partIndex += statics.length - 1;\n }\n }\n if (node.tagName === 'TEMPLATE') {\n stack.push(node);\n walker.currentNode = node.content;\n }\n }\n else if (node.nodeType === 3 /* Node.TEXT_NODE */) {\n const data = node.data;\n if (data.indexOf(marker) >= 0) {\n const parent = node.parentNode;\n const strings = data.split(markerRegex);\n const lastIndex = strings.length - 1;\n // Generate a new text node for each literal section\n // These nodes are also used as the markers for node parts\n for (let i = 0; i < lastIndex; i++) {\n let insert;\n let s = strings[i];\n if (s === '') {\n insert = createMarker();\n }\n else {\n const match = lastAttributeNameRegex.exec(s);\n if (match !== null && endsWith(match[2], boundAttributeSuffix)) {\n s = s.slice(0, match.index) + match[1] +\n match[2].slice(0, -boundAttributeSuffix.length) + match[3];\n }\n insert = document.createTextNode(s);\n }\n parent.insertBefore(insert, node);\n this.parts.push({ type: 'node', index: ++index });\n }\n // If there's no text, we must insert a comment to mark our place.\n // Else, we can trust it will stick around after cloning.\n if (strings[lastIndex] === '') {\n parent.insertBefore(createMarker(), node);\n nodesToRemove.push(node);\n }\n else {\n node.data = strings[lastIndex];\n }\n // We have a part for each match found\n partIndex += lastIndex;\n }\n }\n else if (node.nodeType === 8 /* Node.COMMENT_NODE */) {\n if (node.data === marker) {\n const parent = node.parentNode;\n // Add a new marker node to be the startNode of the Part if any of\n // the following are true:\n // * We don't have a previousSibling\n // * The previousSibling is already the start of a previous part\n if (node.previousSibling === null || index === lastPartIndex) {\n index++;\n parent.insertBefore(createMarker(), node);\n }\n lastPartIndex = index;\n this.parts.push({ type: 'node', index });\n // If we don't have a nextSibling, keep this node so we have an end.\n // Else, we can remove it to save future costs.\n if (node.nextSibling === null) {\n node.data = '';\n }\n else {\n nodesToRemove.push(node);\n index--;\n }\n partIndex++;\n }\n else {\n let i = -1;\n while ((i = node.data.indexOf(marker, i + 1)) !== -1) {\n // Comment node has a binding marker inside, make an inactive part\n // The binding won't work, but subsequent bindings will\n // TODO (justinfagnani): consider whether it's even worth it to\n // make bindings in comments work\n this.parts.push({ type: 'node', index: -1 });\n partIndex++;\n }\n }\n }\n }\n // Remove text binding nodes after the walk to not disturb the TreeWalker\n for (const n of nodesToRemove) {\n n.parentNode.removeChild(n);\n }\n }\n}\nconst endsWith = (str, suffix) => {\n const index = str.length - suffix.length;\n return index >= 0 && str.slice(index) === suffix;\n};\nexport const isTemplatePartActive = (part) => part.index !== -1;\n// Allows `document.createComment('')` to be renamed for a\n// small manual size-savings.\nexport const createMarker = () => document.createComment('');\n/**\n * This regex extracts the attribute name preceding an attribute-position\n * expression. It does this by matching the syntax allowed for attributes\n * against the string literal directly preceding the expression, assuming that\n * the expression is in an attribute-value position.\n *\n * See attributes in the HTML spec:\n * https://www.w3.org/TR/html5/syntax.html#elements-attributes\n *\n * \" \\x09\\x0a\\x0c\\x0d\" are HTML space characters:\n * https://www.w3.org/TR/html5/infrastructure.html#space-characters\n *\n * \"\\0-\\x1F\\x7F-\\x9F\" are Unicode control characters, which includes every\n * space character except \" \".\n *\n * So an attribute is:\n * * The name: any character except a control character, space character, ('),\n * (\"), \">\", \"=\", or \"/\"\n * * Followed by zero or more space characters\n * * Followed by \"=\"\n * * Followed by zero or more space characters\n * * Followed by:\n * * Any character except space, ('), (\"), \"<\", \">\", \"=\", (`), or\n * * (\") then any non-(\"), or\n * * (') then any non-(')\n */\nexport const lastAttributeNameRegex = \n// eslint-disable-next-line no-control-regex\n/([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;\n//# sourceMappingURL=template.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nimport { isTemplatePartActive } from './template.js';\nconst walkerNodeFilter = 133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */;\n/**\n * Removes the list of nodes from a Template safely. In addition to removing\n * nodes from the Template, the Template part indices are updated to match\n * the mutated Template DOM.\n *\n * As the template is walked the removal state is tracked and\n * part indices are adjusted as needed.\n *\n * div\n * div#1 (remove) <-- start removing (removing node is div#1)\n * div\n * div#2 (remove) <-- continue removing (removing node is still div#1)\n * div\n * div <-- stop removing since previous sibling is the removing node (div#1,\n * removed 4 nodes)\n */\nexport function removeNodesFromTemplate(template, nodesToRemove) {\n const { element: { content }, parts } = template;\n const walker = document.createTreeWalker(content, walkerNodeFilter, null, false);\n let partIndex = nextActiveIndexInTemplateParts(parts);\n let part = parts[partIndex];\n let nodeIndex = -1;\n let removeCount = 0;\n const nodesToRemoveInTemplate = [];\n let currentRemovingNode = null;\n while (walker.nextNode()) {\n nodeIndex++;\n const node = walker.currentNode;\n // End removal if stepped past the removing node\n if (node.previousSibling === currentRemovingNode) {\n currentRemovingNode = null;\n }\n // A node to remove was found in the template\n if (nodesToRemove.has(node)) {\n nodesToRemoveInTemplate.push(node);\n // Track node we're removing\n if (currentRemovingNode === null) {\n currentRemovingNode = node;\n }\n }\n // When removing, increment count by which to adjust subsequent part indices\n if (currentRemovingNode !== null) {\n removeCount++;\n }\n while (part !== undefined && part.index === nodeIndex) {\n // If part is in a removed node deactivate it by setting index to -1 or\n // adjust the index as needed.\n part.index = currentRemovingNode !== null ? -1 : part.index - removeCount;\n // go to the next active part.\n partIndex = nextActiveIndexInTemplateParts(parts, partIndex);\n part = parts[partIndex];\n }\n }\n nodesToRemoveInTemplate.forEach((n) => n.parentNode.removeChild(n));\n}\nconst countNodes = (node) => {\n let count = (node.nodeType === 11 /* Node.DOCUMENT_FRAGMENT_NODE */) ? 0 : 1;\n const walker = document.createTreeWalker(node, walkerNodeFilter, null, false);\n while (walker.nextNode()) {\n count++;\n }\n return count;\n};\nconst nextActiveIndexInTemplateParts = (parts, startIndex = -1) => {\n for (let i = startIndex + 1; i < parts.length; i++) {\n const part = parts[i];\n if (isTemplatePartActive(part)) {\n return i;\n }\n }\n return -1;\n};\n/**\n * Inserts the given node into the Template, optionally before the given\n * refNode. In addition to inserting the node into the Template, the Template\n * part indices are updated to match the mutated Template DOM.\n */\nexport function insertNodeIntoTemplate(template, node, refNode = null) {\n const { element: { content }, parts } = template;\n // If there's no refNode, then put node at end of template.\n // No part indices need to be shifted in this case.\n if (refNode === null || refNode === undefined) {\n content.appendChild(node);\n return;\n }\n const walker = document.createTreeWalker(content, walkerNodeFilter, null, false);\n let partIndex = nextActiveIndexInTemplateParts(parts);\n let insertCount = 0;\n let walkerIndex = -1;\n while (walker.nextNode()) {\n walkerIndex++;\n const walkerNode = walker.currentNode;\n if (walkerNode === refNode) {\n insertCount = countNodes(node);\n refNode.parentNode.insertBefore(node, refNode);\n }\n while (partIndex !== -1 && parts[partIndex].index === walkerIndex) {\n // If we've inserted the node, simply adjust all subsequent parts\n if (insertCount > 0) {\n while (partIndex !== -1) {\n parts[partIndex].index += insertCount;\n partIndex = nextActiveIndexInTemplateParts(parts, partIndex);\n }\n return;\n }\n partIndex = nextActiveIndexInTemplateParts(parts, partIndex);\n }\n }\n}\n//# sourceMappingURL=modify-template.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nconst directives = new WeakMap();\n/**\n * Brands a function as a directive factory function so that lit-html will call\n * the function during template rendering, rather than passing as a value.\n *\n * A _directive_ is a function that takes a Part as an argument. It has the\n * signature: `(part: Part) => void`.\n *\n * A directive _factory_ is a function that takes arguments for data and\n * configuration and returns a directive. Users of directive usually refer to\n * the directive factory as the directive. For example, \"The repeat directive\".\n *\n * Usually a template author will invoke a directive factory in their template\n * with relevant arguments, which will then return a directive function.\n *\n * Here's an example of using the `repeat()` directive factory that takes an\n * array and a function to render an item:\n *\n * ```js\n * html`<ul><${repeat(items, (item) => html`<li>${item}</li>`)}</ul>`\n * ```\n *\n * When `repeat` is invoked, it returns a directive function that closes over\n * `items` and the template function. When the outer template is rendered, the\n * return directive function is called with the Part for the expression.\n * `repeat` then performs it's custom logic to render multiple items.\n *\n * @param f The directive factory function. Must be a function that returns a\n * function of the signature `(part: Part) => void`. The returned function will\n * be called with the part object.\n *\n * @example\n *\n * import {directive, html} from 'lit-html';\n *\n * const immutable = directive((v) => (part) => {\n * if (part.value !== v) {\n * part.setValue(v)\n * }\n * });\n */\nexport const directive = (f) => ((...args) => {\n const d = f(...args);\n directives.set(d, true);\n return d;\n});\nexport const isDirective = (o) => {\n return typeof o === 'function' && directives.has(o);\n};\n//# sourceMappingURL=directive.js.map","/**\n * @license\n * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * A sentinel value that signals that a value was handled by a directive and\n * should not be written to the DOM.\n */\nexport const noChange = {};\n/**\n * A sentinel value that signals a NodePart to fully clear its content.\n */\nexport const nothing = {};\n//# sourceMappingURL=part.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nimport { isCEPolyfill } from './dom.js';\nimport { isTemplatePartActive } from './template.js';\n/**\n * An instance of a `Template` that can be attached to the DOM and updated\n * with new values.\n */\nexport class TemplateInstance {\n constructor(template, processor, options) {\n this.__parts = [];\n this.template = template;\n this.processor = processor;\n this.options = options;\n }\n update(values) {\n let i = 0;\n for (const part of this.__parts) {\n if (part !== undefined) {\n part.setValue(values[i]);\n }\n i++;\n }\n for (const part of this.__parts) {\n if (part !== undefined) {\n part.commit();\n }\n }\n }\n _clone() {\n // There are a number of steps in the lifecycle of a template instance's\n // DOM fragment:\n // 1. Clone - create the instance fragment\n // 2. Adopt - adopt into the main document\n // 3. Process - find part markers and create parts\n // 4. Upgrade - upgrade custom elements\n // 5. Update - set node, attribute, property, etc., values\n // 6. Connect - connect to the document. Optional and outside of this\n // method.\n //\n // We have a few constraints on the ordering of these steps:\n // * We need to upgrade before updating, so that property values will pass\n // through any property setters.\n // * We would like to process before upgrading so that we're sure that the\n // cloned fragment is inert and not disturbed by self-modifying DOM.\n // * We want custom elements to upgrade even in disconnected fragments.\n //\n // Given these constraints, with full custom elements support we would\n // prefer the order: Clone, Process, Adopt, Upgrade, Update, Connect\n //\n // But Safari does not implement CustomElementRegistry#upgrade, so we\n // can not implement that order and still have upgrade-before-update and\n // upgrade disconnected fragments. So we instead sacrifice the\n // process-before-upgrade constraint, since in Custom Elements v1 elements\n // must not modify their light DOM in the constructor. We still have issues\n // when co-existing with CEv0 elements like Polymer 1, and with polyfills\n // that don't strictly adhere to the no-modification rule because shadow\n // DOM, which may be created in the constructor, is emulated by being placed\n // in the light DOM.\n //\n // The resulting order is on native is: Clone, Adopt, Upgrade, Process,\n // Update, Connect. document.importNode() performs Clone, Adopt, and Upgrade\n // in one step.\n //\n // The Custom Elements v1 polyfill supports upgrade(), so the order when\n // polyfilled is the more ideal: Clone, Process, Adopt, Upgrade, Update,\n // Connect.\n const fragment = isCEPolyfill ?\n this.template.element.content.cloneNode(true) :\n document.importNode(this.template.element.content, true);\n const stack = [];\n const parts = this.template.parts;\n // Edge needs all 4 parameters present; IE11 needs 3rd parameter to be null\n const walker = document.createTreeWalker(fragment, 133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */, null, false);\n let partIndex = 0;\n let nodeIndex = 0;\n let part;\n let node = walker.nextNode();\n // Loop through all the nodes and parts of a template\n while (partIndex < parts.length) {\n part = parts[partIndex];\n if (!isTemplatePartActive(part)) {\n this.__parts.push(undefined);\n partIndex++;\n continue;\n }\n // Progress the tree walker until we find our next part's node.\n // Note that multiple parts may share the same node (attribute parts\n // on a single element), so this loop may not run at all.\n while (nodeIndex < part.index) {\n nodeIndex++;\n if (node.nodeName === 'TEMPLATE') {\n stack.push(node);\n walker.currentNode = node.content;\n }\n if ((node = walker.nextNode()) === null) {\n // We've exhausted the content inside a nested template element.\n // Because we still have parts (the outer for-loop), we know:\n // - There is a template in the stack\n // - The walker will find a nextNode outside the template\n walker.currentNode = stack.pop();\n node = walker.nextNode();\n }\n }\n // We've arrived at our part's node.\n if (part.type === 'node') {\n const part = this.processor.handleTextExpression(this.options);\n part.insertAfterNode(node.previousSibling);\n this.__parts.push(part);\n }\n else {\n this.__parts.push(...this.processor.handleAttributeExpressions(node, part.name, part.strings, this.options));\n }\n partIndex++;\n }\n if (isCEPolyfill) {\n document.adoptNode(fragment);\n customElements.upgrade(fragment);\n }\n return fragment;\n }\n}\n//# sourceMappingURL=template-instance.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * @module lit-html\n */\nimport { reparentNodes } from './dom.js';\nimport { boundAttributeSuffix, lastAttributeNameRegex, marker, nodeMarker } from './template.js';\n/**\n * Our TrustedTypePolicy for HTML which is declared using the html template\n * tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n */\nconst policy = window.trustedTypes &&\n trustedTypes.createPolicy('lit-html', { createHTML: (s) => s });\nconst commentMarker = ` ${marker} `;\n/**\n * The return type of `html`, which holds a Template and the values from\n * interpolated expressions.\n */\nexport class TemplateResult {\n constructor(strings, values, type, processor) {\n this.strings = strings;\n this.values = values;\n this.type = type;\n this.processor = processor;\n }\n /**\n * Returns a string of HTML used to create a `<template>` element.\n */\n getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n for (let i = 0; i < l; i++) {\n const s = this.strings[i];\n // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment position.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n const commentOpen = s.lastIndexOf('<!--');\n // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n isCommentBinding = (commentOpen > -1 || isCommentBinding) &&\n s.indexOf('-->', commentOpen + 1) === -1;\n // Check to see if we have an attribute-like sequence preceding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n const attributeMatch = lastAttributeNameRegex.exec(s);\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? commentMarker : nodeMarker);\n }\n else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] +\n attributeMatch[2] + boundAttributeSuffix + attributeMatch[3] +\n marker;\n }\n }\n html += this.strings[l];\n return html;\n }\n getTemplateElement() {\n const template = document.createElement('template');\n let value = this.getHTML();\n if (policy !== undefined) {\n // this is secure because `this.strings` is a TemplateStringsArray.\n // TODO: validate this when\n // https://github.com/tc39/proposal-array-is-template-object is\n // implemented.\n value = policy.createHTML(value);\n }\n template.innerHTML = value;\n return template;\n }\n}\n/**\n * A TemplateResult for SVG fragments.\n *\n * This class wraps HTML in an `<svg>` tag in order to parse its contents in the\n * SVG namespace, then modifies the template to remove the `<svg>` tag so that\n * clones only container the original fragment.\n */\nexport class SVGTemplateResult extends TemplateResult {\n getHTML() {\n return `<svg>${super.getHTML()}</svg>`;\n }\n getTemplateElement() {\n const template = super.getTemplateElement();\n const content = template.content;\n const svgElement = content.firstChild;\n content.removeChild(svgElement);\n reparentNodes(content, svgElement.firstChild);\n return template;\n }\n}\n//# sourceMappingURL=template-result.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nimport { isDirective } from './directive.js';\nimport { removeNodes } from './dom.js';\nimport { noChange, nothing } from './part.js';\nimport { TemplateInstance } from './template-instance.js';\nimport { TemplateResult } from './template-result.js';\nimport { createMarker } from './template.js';\nexport const isPrimitive = (value) => {\n return (value === null ||\n !(typeof value === 'object' || typeof value === 'function'));\n};\nexport const isIterable = (value) => {\n return Array.isArray(value) ||\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !!(value && value[Symbol.iterator]);\n};\n/**\n * Writes attribute values to the DOM for a group of AttributeParts bound to a\n * single attribute. The value is only set once even if there are multiple parts\n * for an attribute.\n */\nexport class AttributeCommitter {\n constructor(element, name, strings) {\n this.dirty = true;\n this.element = element;\n this.name = name;\n this.strings = strings;\n this.parts = [];\n for (let i = 0; i < strings.length - 1; i++) {\n this.parts[i] = this._createPart();\n }\n }\n /**\n * Creates a single part. Override this to create a differnt type of part.\n */\n _createPart() {\n return new AttributePart(this);\n }\n _getValue() {\n const strings = this.strings;\n const l = strings.length - 1;\n const parts = this.parts;\n // If we're assigning an attribute via syntax like:\n // attr=\"${foo}\" or attr=${foo}\n // but not\n // attr=\"${foo} ${bar}\" or attr=\"${foo} baz\"\n // then we don't want to coerce the attribute value into one long\n // string. Instead we want to just return the value itself directly,\n // so that sanitizeDOMValue can get the actual value rather than\n // String(value)\n // The exception is if v is an array, in which case we do want to smash\n // it together into a string without calling String() on the array.\n //\n // This also allows trusted values (when using TrustedTypes) being\n // assigned to DOM sinks without being stringified in the process.\n if (l === 1 && strings[0] === '' && strings[1] === '') {\n const v = parts[0].value;\n if (typeof v === 'symbol') {\n return String(v);\n }\n if (typeof v === 'string' || !isIterable(v)) {\n return v;\n }\n }\n let text = '';\n for (let i = 0; i < l; i++) {\n text += strings[i];\n const part = parts[i];\n if (part !== undefined) {\n const v = part.value;\n if (isPrimitive(v) || !isIterable(v)) {\n text += typeof v === 'string' ? v : String(v);\n }\n else {\n for (const t of v) {\n text += typeof t === 'string' ? t : String(t);\n }\n }\n }\n }\n text += strings[l];\n return text;\n }\n commit() {\n if (this.dirty) {\n this.dirty = false;\n this.element.setAttribute(this.name, this._getValue());\n }\n }\n}\n/**\n * A Part that controls all or part of an attribute value.\n */\nexport class AttributePart {\n constructor(committer) {\n this.value = undefined;\n this.committer = committer;\n }\n setValue(value) {\n if (value !== noChange && (!isPrimitive(value) || value !== this.value)) {\n this.value = value;\n // If the value is a not a directive, dirty the committer so that it'll\n // call setAttribute. If the value is a directive, it'll dirty the\n // committer if it calls setValue().\n if (!isDirective(value)) {\n this.committer.dirty = true;\n }\n }\n }\n commit() {\n while (isDirective(this.value)) {\n const directive = this.value;\n this.value = noChange;\n directive(this);\n }\n if (this.value === noChange) {\n return;\n }\n this.committer.commit();\n }\n}\n/**\n * A Part that controls a location within a Node tree. Like a Range, NodePart\n * has start and end locations and can set and update the Nodes between those\n * locations.\n *\n * NodeParts support several value types: primitives, Nodes, TemplateResults,\n * as well as arrays and iterables of those types.\n */\nexport class NodePart {\n constructor(options) {\n this.value = undefined;\n this.__pendingValue = undefined;\n this.options = options;\n }\n /**\n * Appends this part into a container.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n appendInto(container) {\n this.startNode = container.appendChild(createMarker());\n this.endNode = container.appendChild(createMarker());\n }\n /**\n * Inserts this part after the `ref` node (between `ref` and `ref`'s next\n * sibling). Both `ref` and its next sibling must be static, unchanging nodes\n * such as those that appear in a literal section of a template.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n insertAfterNode(ref) {\n this.startNode = ref;\n this.endNode = ref.nextSibling;\n }\n /**\n * Appends this part into a parent part.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n appendIntoPart(part) {\n part.__insert(this.startNode = createMarker());\n part.__insert(this.endNode = createMarker());\n }\n /**\n * Inserts this part after the `ref` part.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n insertAfterPart(ref) {\n ref.__insert(this.startNode = createMarker());\n this.endNode = ref.endNode;\n ref.endNode = this.startNode;\n }\n setValue(value) {\n this.__pendingValue = value;\n }\n commit() {\n if (this.startNode.parentNode === null) {\n return;\n }\n while (isDirective(this.__pendingValue)) {\n const directive = this.__pendingValue;\n this.__pendingValue = noChange;\n directive(this);\n }\n const value = this.__pendingValue;\n if (value === noChange) {\n return;\n }\n if (isPrimitive(value)) {\n if (value !== this.value) {\n this.__commitText(value);\n }\n }\n else if (value instanceof TemplateResult) {\n this.__commitTemplateResult(value);\n }\n else if (value instanceof Node) {\n this.__commitNode(value);\n }\n else if (isIterable(value)) {\n this.__commitIterable(value);\n }\n else if (value === nothing) {\n this.value = nothing;\n this.clear();\n }\n else {\n // Fallback, will render the string representation\n this.__commitText(value);\n }\n }\n __insert(node) {\n this.endNode.parentNode.insertBefore(node, this.endNode);\n }\n __commitNode(value) {\n if (this.value === value) {\n return;\n }\n this.clear();\n this.__insert(value);\n this.value = value;\n }\n __commitText(value) {\n const node = this.startNode.nextSibling;\n value = value == null ? '' : value;\n // If `value` isn't already a string, we explicitly convert it here in case\n // it can't be implicitly converted - i.e. it's a symbol.\n const valueAsString = typeof value === 'string' ? value : String(value);\n if (node === this.endNode.previousSibling &&\n node.nodeType === 3 /* Node.TEXT_NODE */) {\n // If we only have a single text node between the markers, we can just\n // set its value, rather than replacing it.\n // TODO(justinfagnani): Can we just check if this.value is primitive?\n node.data = valueAsString;\n }\n else {\n this.__commitNode(document.createTextNode(valueAsString));\n }\n this.value = value;\n }\n __commitTemplateResult(value) {\n const template = this.options.templateFactory(value);\n if (this.value instanceof TemplateInstance &&\n this.value.template === template) {\n this.value.update(value.values);\n }\n else {\n // Make sure we propagate the template processor from the TemplateResult\n // so that we use its syntax extension, etc. The template factory comes\n // from the render function options so that it can control template\n // caching and preprocessing.\n const instance = new TemplateInstance(template, value.processor, this.options);\n const fragment = instance._clone();\n instance.update(value.values);\n this.__commitNode(fragment);\n this.value = instance;\n }\n }\n __commitIterable(value) {\n // For an Iterable, we create a new InstancePart per item, then set its\n // value to the item. This is a little bit of overhead for every item in\n // an Iterable, but it lets us recurse easily and efficiently update Arrays\n // of TemplateResults that will be commonly returned from expressions like:\n // array.map((i) => html`${i}`), by reusing existing TemplateInstances.\n // If _value is an array, then the previous render was of an\n // iterable and _value will contain the NodeParts from the previous\n // render. If _value is not an array, clear this part and make a new\n // array for NodeParts.\n if (!Array.isArray(this.value)) {\n this.value = [];\n this.clear();\n }\n // Lets us keep track of how many items we stamped so we can clear leftover\n // items from a previous render\n const itemParts = this.value;\n let partIndex = 0;\n let itemPart;\n for (const item of value) {\n // Try to reuse an existing part\n itemPart = itemParts[partIndex];\n // If no existing part, create a new one\n if (itemPart === undefined) {\n itemPart = new NodePart(this.options);\n itemParts.push(itemPart);\n if (partIndex === 0) {\n itemPart.appendIntoPart(this);\n }\n else {\n itemPart.insertAfterPart(itemParts[partIndex - 1]);\n }\n }\n itemPart.setValue(item);\n itemPart.commit();\n partIndex++;\n }\n if (partIndex < itemParts.length) {\n // Truncate the parts array so _value reflects the current state\n itemParts.length = partIndex;\n this.clear(itemPart && itemPart.endNode);\n }\n }\n clear(startNode = this.startNode) {\n removeNodes(this.startNode.parentNode, startNode.nextSibling, this.endNode);\n }\n}\n/**\n * Implements a boolean attribute, roughly as defined in the HTML\n * specification.\n *\n * If the value is truthy, then the attribute is present with a value of\n * ''. If the value is falsey, the attribute is removed.\n */\nexport class BooleanAttributePart {\n constructor(element, name, strings) {\n this.value = undefined;\n this.__pendingValue = undefined;\n if (strings.length !== 2 || strings[0] !== '' || strings[1] !== '') {\n throw new Error('Boolean attributes can only contain a single expression');\n }\n this.element = element;\n this.name = name;\n this.strings = strings;\n }\n setValue(value) {\n this.__pendingValue = value;\n }\n commit() {\n while (isDirective(this.__pendingValue)) {\n const directive = this.__pendingValue;\n this.__pendingValue = noChange;\n directive(this);\n }\n if (this.__pendingValue === noChange) {\n return;\n }\n const value = !!this.__pendingValue;\n if (this.value !== value) {\n if (value) {\n this.element.setAttribute(this.name, '');\n }\n else {\n this.element.removeAttribute(this.name);\n }\n this.value = value;\n }\n this.__pendingValue = noChange;\n }\n}\n/**\n * Sets attribute values for PropertyParts, so that the value is only set once\n * even if there are multiple parts for a property.\n *\n * If an expression controls the whole property value, then the value is simply\n * assigned to the property under control. If there are string literals or\n * multiple expressions, then the strings are expressions are interpolated into\n * a string first.\n */\nexport class PropertyCommitter extends AttributeCommitter {\n constructor(element, name, strings) {\n super(element, name, strings);\n this.single =\n (strings.length === 2 && strings[0] === '' && strings[1] === '');\n }\n _createPart() {\n return new PropertyPart(this);\n }\n _getValue() {\n if (this.single) {\n return this.parts[0].value;\n }\n return super._getValue();\n }\n commit() {\n if (this.dirty) {\n this.dirty = false;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.element[this.name] = this._getValue();\n }\n }\n}\nexport class PropertyPart extends AttributePart {\n}\n// Detect event listener options support. If the `capture` property is read\n// from the options object, then options are supported. If not, then the third\n// argument to add/removeEventListener is interpreted as the boolean capture\n// value so we should only pass the `capture` property.\nlet eventOptionsSupported = false;\n// Wrap into an IIFE because MS Edge <= v41 does not support having try/catch\n// blocks right into the body of a module\n(() => {\n try {\n const options = {\n get capture() {\n eventOptionsSupported = true;\n return false;\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n window.addEventListener('test', options, options);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n window.removeEventListener('test', options, options);\n }\n catch (_e) {\n // event options not supported\n }\n})();\nexport class EventPart {\n constructor(element, eventName, eventContext) {\n this.value = undefined;\n this.__pendingValue = undefined;\n this.element = element;\n this.eventName = eventName;\n this.eventContext = eventContext;\n this.__boundHandleEvent = (e) => this.handleEvent(e);\n }\n setValue(value) {\n this.__pendingValue = value;\n }\n commit() {\n while (isDirective(this.__pendingValue)) {\n const directive = this.__pendingValue;\n this.__pendingValue = noChange;\n directive(this);\n }\n if (this.__pendingValue === noChange) {\n return;\n }\n const newListener = this.__pendingValue;\n const oldListener = this.value;\n const shouldRemoveListener = newListener == null ||\n oldListener != null &&\n (newListener.capture !== oldListener.capture ||\n newListener.once !== oldListener.once ||\n newListener.passive !== oldListener.passive);\n const shouldAddListener = newListener != null && (oldListener == null || shouldRemoveListener);\n if (shouldRemoveListener) {\n this.element.removeEventListener(this.eventName, this.__boundHandleEvent, this.__options);\n }\n if (shouldAddListener) {\n this.__options = getOptions(newListener);\n this.element.addEventListener(this.eventName, this.__boundHandleEvent, this.__options);\n }\n this.value = newListener;\n this.__pendingValue = noChange;\n }\n handleEvent(event) {\n if (typeof this.value === 'function') {\n this.value.call(this.eventContext || this.element, event);\n }\n else {\n this.value.handleEvent(event);\n }\n }\n}\n// We copy options because of the inconsistent behavior of browsers when reading\n// the third argument of add/removeEventListener. IE11 doesn't support options\n// at all. Chrome 41 only reads `capture` if the argument is an object.\nconst getOptions = (o) => o &&\n (eventOptionsSupported ?\n { capture: o.capture, passive: o.passive, once: o.once } :\n o.capture);\n//# sourceMappingURL=parts.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nimport { marker, Template } from './template.js';\n/**\n * The default TemplateFactory which caches Templates keyed on\n * result.type and result.strings.\n */\nexport function templateFactory(result) {\n let templateCache = templateCaches.get(result.type);\n if (templateCache === undefined) {\n templateCache = {\n stringsArray: new WeakMap(),\n keyString: new Map()\n };\n templateCaches.set(result.type, templateCache);\n }\n let template = templateCache.stringsArray.get(result.strings);\n if (template !== undefined) {\n return template;\n }\n // If the TemplateStringsArray is new, generate a key from the strings\n // This key is shared between all templates with identical content\n const key = result.strings.join(marker);\n // Check if we already have a Template for this key\n template = templateCache.keyString.get(key);\n if (template === undefined) {\n // If we have not seen this key before, create a new Template\n template = new Template(result, result.getTemplateElement());\n // Cache the Template for this key\n templateCache.keyString.set(key, template);\n }\n // Cache all future queries for this TemplateStringsArray\n templateCache.stringsArray.set(result.strings, template);\n return template;\n}\nexport const templateCaches = new Map();\n//# sourceMappingURL=template-factory.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nimport { removeNodes } from './dom.js';\nimport { NodePart } from './parts.js';\nimport { templateFactory } from './template-factory.js';\nexport const parts = new WeakMap();\n/**\n * Renders a template result or other value to a container.\n *\n * To update a container with new values, reevaluate the template literal and\n * call `render` with the new result.\n *\n * @param result Any value renderable by NodePart - typically a TemplateResult\n * created by evaluating a template tag like `html` or `svg`.\n * @param container A DOM parent to render to. The entire contents are either\n * replaced, or efficiently updated if the same result type was previous\n * rendered there.\n * @param options RenderOptions for the entire render tree rendered to this\n * container. Render options must *not* change between renders to the same\n * container, as those changes will not effect previously rendered DOM.\n */\nexport const render = (result, container, options) => {\n let part = parts.get(container);\n if (part === undefined) {\n removeNodes(container, container.firstChild);\n parts.set(container, part = new NodePart(Object.assign({ templateFactory }, options)));\n part.appendInto(container);\n }\n part.setValue(result);\n part.commit();\n};\n//# sourceMappingURL=render.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nimport { AttributeCommitter, BooleanAttributePart, EventPart, NodePart, PropertyCommitter } from './parts.js';\n/**\n * Creates Parts when a template is instantiated.\n */\nexport class DefaultTemplateProcessor {\n /**\n * Create parts for an attribute-position binding, given the event, attribute\n * name, and string literals.\n *\n * @param element The element containing the binding\n * @param name The attribute name\n * @param strings The string literals. There are always at least two strings,\n * event for fully-controlled bindings with a single expression.\n */\n handleAttributeExpressions(element, name, strings, options) {\n const prefix = name[0];\n if (prefix === '.') {\n const committer = new PropertyCommitter(element, name.slice(1), strings);\n return committer.parts;\n }\n if (prefix === '@') {\n return [new EventPart(element, name.slice(1), options.eventContext)];\n }\n if (prefix === '?') {\n return [new BooleanAttributePart(element, name.slice(1), strings)];\n }\n const committer = new AttributeCommitter(element, name, strings);\n return committer.parts;\n }\n /**\n * Create parts for a text-position binding.\n * @param templateFactory\n */\n handleTextExpression(options) {\n return new NodePart(options);\n }\n}\nexport const defaultTemplateProcessor = new DefaultTemplateProcessor();\n//# sourceMappingURL=default-template-processor.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n *\n * Main lit-html module.\n *\n * Main exports:\n *\n * - [[html]]\n * - [[svg]]\n * - [[render]]\n *\n * @packageDocumentation\n */\n/**\n * Do not remove this comment; it keeps typedoc from misplacing the module\n * docs.\n */\nimport { defaultTemplateProcessor } from './lib/default-template-processor.js';\nimport { SVGTemplateResult, TemplateResult } from './lib/template-result.js';\nexport { DefaultTemplateProcessor, defaultTemplateProcessor } from './lib/default-template-processor.js';\nexport { directive, isDirective } from './lib/directive.js';\n// TODO(justinfagnani): remove line when we get NodePart moving methods\nexport { removeNodes, reparentNodes } from './lib/dom.js';\nexport { noChange, nothing } from './lib/part.js';\nexport { AttributeCommitter, AttributePart, BooleanAttributePart, EventPart, isIterable, isPrimitive, NodePart, PropertyCommitter, PropertyPart } from './lib/parts.js';\nexport { parts, render } from './lib/render.js';\nexport { templateCaches, templateFactory } from './lib/template-factory.js';\nexport { TemplateInstance } from './lib/template-instance.js';\nexport { SVGTemplateResult, TemplateResult } from './lib/template-result.js';\nexport { createMarker, isTemplatePartActive, Template } from './lib/template.js';\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for lit-html usage.\n// TODO(justinfagnani): inject version number at build time\nif (typeof window !== 'undefined') {\n (window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.3.0');\n}\n/**\n * Interprets a template literal as an HTML template that can efficiently\n * render to and update a container.\n */\nexport const html = (strings, ...values) => new TemplateResult(strings, values, 'html', defaultTemplateProcessor);\n/**\n * Interprets a template literal as an SVG template that can efficiently\n * render to and update a container.\n */\nexport const svg = (strings, ...values) => new SVGTemplateResult(strings, values, 'svg', defaultTemplateProcessor);\n//# sourceMappingURL=lit-html.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * Module to add shady DOM/shady CSS polyfill support to lit-html template\n * rendering. See the [[render]] method for details.\n *\n * @packageDocumentation\n */\n/**\n * Do not remove this comment; it keeps typedoc from misplacing the module\n * docs.\n */\nimport { removeNodes } from './dom.js';\nimport { insertNodeIntoTemplate, removeNodesFromTemplate } from './modify-template.js';\nimport { parts, render as litRender } from './render.js';\nimport { templateCaches } from './template-factory.js';\nimport { TemplateInstance } from './template-instance.js';\nimport { marker, Template } from './template.js';\nexport { html, svg, TemplateResult } from '../lit-html.js';\n// Get a key to lookup in `templateCaches`.\nconst getTemplateCacheKey = (type, scopeName) => `${type}--${scopeName}`;\nlet compatibleShadyCSSVersion = true;\nif (typeof window.ShadyCSS === 'undefined') {\n compatibleShadyCSSVersion = false;\n}\nelse if (typeof window.ShadyCSS.prepareTemplateDom === 'undefined') {\n console.warn(`Incompatible ShadyCSS version detected. ` +\n `Please update to at least @webcomponents/webcomponentsjs@2.0.2 and ` +\n `@webcomponents/shadycss@1.3.1.`);\n compatibleShadyCSSVersion = false;\n}\n/**\n * Template factory which scopes template DOM using ShadyCSS.\n * @param scopeName {string}\n */\nexport const shadyTemplateFactory = (scopeName) => (result) => {\n const cacheKey = getTemplateCacheKey(result.type, scopeName);\n let templateCache = templateCaches.get(cacheKey);\n if (templateCache === undefined) {\n templateCache = {\n stringsArray: new WeakMap(),\n keyString: new Map()\n };\n templateCaches.set(cacheKey, templateCache);\n }\n let template = templateCache.stringsArray.get(result.strings);\n if (template !== undefined) {\n return template;\n }\n const key = result.strings.join(marker);\n template = templateCache.keyString.get(key);\n if (template === undefined) {\n const element = result.getTemplateElement();\n if (compatibleShadyCSSVersion) {\n window.ShadyCSS.prepareTemplateDom(element, scopeName);\n }\n template = new Template(result, element);\n templateCache.keyString.set(key, template);\n }\n templateCache.stringsArray.set(result.strings, template);\n return template;\n};\nconst TEMPLATE_TYPES = ['html', 'svg'];\n/**\n * Removes all style elements from Templates for the given scopeName.\n */\nconst removeStylesFromLitTemplates = (scopeName) => {\n TEMPLATE_TYPES.forEach((type) => {\n const templates = templateCaches.get(getTemplateCacheKey(type, scopeName));\n if (templates !== undefined) {\n templates.keyString.forEach((template) => {\n const { element: { content } } = template;\n // IE 11 doesn't support the iterable param Set constructor\n const styles = new Set();\n Array.from(content.querySelectorAll('style')).forEach((s) => {\n styles.add(s);\n });\n removeNodesFromTemplate(template, styles);\n });\n }\n });\n};\nconst shadyRenderSet = new Set();\n/**\n * For the given scope name, ensures that ShadyCSS style scoping is performed.\n * This is done just once per scope name so the fragment and template cannot\n * be modified.\n * (1) extracts styles from the rendered fragment and hands them to ShadyCSS\n * to be scoped and appended to the document\n * (2) removes style elements from all lit-html Templates for this scope name.\n *\n * Note, <style> elements can only be placed into templates for the\n * initial rendering of the scope. If <style> elements are included in templates\n * dynamically rendered to the scope (after the first scope render), they will\n * not be scoped and the <style> will be left in the template and rendered\n * output.\n */\nconst prepareTemplateStyles = (scopeName, renderedDOM, template) => {\n shadyRenderSet.add(scopeName);\n // If `renderedDOM` is stamped from a Template, then we need to edit that\n // Template's underlying template element. Otherwise, we create one here\n // to give to ShadyCSS, which still requires one while scoping.\n const templateElement = !!template ? template.element : document.createElement('template');\n // Move styles out of rendered DOM and store.\n const styles = renderedDOM.querySelectorAll('style');\n const { length } = styles;\n // If there are no styles, skip unnecessary work\n if (length === 0) {\n // Ensure prepareTemplateStyles is called to support adding\n // styles via `prepareAdoptedCssText` since that requires that\n // `prepareTemplateStyles` is called.\n //\n // ShadyCSS will only update styles containing @apply in the template\n // given to `prepareTemplateStyles`. If no lit Template was given,\n // ShadyCSS will not be able to update uses of @apply in any relevant\n // template. However, this is not a problem because we only create the\n // template for the purpose of supporting `prepareAdoptedCssText`,\n // which doesn't support @apply at all.\n window.ShadyCSS.prepareTemplateStyles(templateElement, scopeName);\n return;\n }\n const condensedStyle = document.createElement('style');\n // Collect styles into a single style. This helps us make sure ShadyCSS\n // manipulations will not prevent us from being able to fix up template\n // part indices.\n // NOTE: collecting styles is inefficient for browsers but ShadyCSS\n // currently does this anyway. When it does not, this should be changed.\n for (let i = 0; i < length; i++) {\n const style = styles[i];\n style.parentNode.removeChild(style);\n condensedStyle.textContent += style.textContent;\n }\n // Remove styles from nested templates in this scope.\n removeStylesFromLitTemplates(scopeName);\n // And then put the condensed style into the \"root\" template passed in as\n // `template`.\n const content = templateElement.content;\n if (!!template) {\n insertNodeIntoTemplate(template, condensedStyle, content.firstChild);\n }\n else {\n content.insertBefore(condensedStyle, content.firstChild);\n }\n // Note, it's important that ShadyCSS gets the template that `lit-html`\n // will actually render so that it can update the style inside when\n // needed (e.g. @apply native Shadow DOM case).\n window.ShadyCSS.prepareTemplateStyles(templateElement, scopeName);\n const style = content.querySelector('style');\n if (window.ShadyCSS.nativeShadow && style !== null) {\n // When in native Shadow DOM, ensure the style created by ShadyCSS is\n // included in initially rendered output (`renderedDOM`).\n renderedDOM.insertBefore(style.cloneNode(true), renderedDOM.firstChild);\n }\n else if (!!template) {\n // When no style is left in the template, parts will be broken as a\n // result. To fix this, we put back the style node ShadyCSS removed\n // and then tell lit to remove that node from the template.\n // There can be no style in the template in 2 cases (1) when Shady DOM\n // is in use, ShadyCSS removes all styles, (2) when native Shadow DOM\n // is in use ShadyCSS removes the style if it contains no content.\n // NOTE, ShadyCSS creates its own style so we can safely add/remove\n // `condensedStyle` here.\n content.insertBefore(condensedStyle, content.firstChild);\n const removes = new Set();\n removes.add(condensedStyle);\n removeNodesFromTemplate(template, removes);\n }\n};\n/**\n * Extension to the standard `render` method which supports rendering\n * to ShadowRoots when the ShadyDOM (https://github.com/webcomponents/shadydom)\n * and ShadyCSS (https://github.com/webcomponents/shadycss) polyfills are used\n * or when the webcomponentsjs\n * (https://github.com/webcomponents/webcomponentsjs) polyfill is used.\n *\n * Adds a `scopeName` option which is used to scope element DOM and stylesheets\n * when native ShadowDOM is unavailable. The `scopeName` will be added to\n * the class attribute of all rendered DOM. In addition, any style elements will\n * be automatically re-written with this `scopeName` selector and moved out\n * of the rendered DOM and into the document `<head>`.\n *\n * It is common to use this render method in conjunction with a custom element\n * which renders a shadowRoot. When this is done, typically the element's\n * `localName` should be used as the `scopeName`.\n *\n * In addition to DOM scoping, ShadyCSS also supports a basic shim for css\n * custom properties (needed only on older browsers like IE11) and a shim for\n * a deprecated feature called `@apply` that supports applying a set of css\n * custom properties to a given location.\n *\n * Usage considerations:\n *\n * * Part values in `<style>` elements are only applied the first time a given\n * `scopeName` renders. Subsequent changes to parts in style elements will have\n * no effect. Because of this, parts in style elements should only be used for\n * values that will never change, for example parts that set scope-wide theme\n * values or parts which render shared style elements.\n *\n * * Note, due to a limitation of the ShadyDOM polyfill, rendering in a\n * custom element's `constructor` is not supported. Instead rendering should\n * either done asynchronously, for example at microtask timing (for example\n * `Promise.resolve()`), or be deferred until the first time the element's\n * `connectedCallback` runs.\n *\n * Usage considerations when using shimmed custom properties or `@apply`:\n *\n * * Whenever any dynamic changes are made which affect\n * css custom properties, `ShadyCSS.styleElement(element)` must be called\n * to update the element. There are two cases when this is needed:\n * (1) the element is connected to a new parent, (2) a class is added to the\n * element that causes it to match different custom properties.\n * To address the first case when rendering a custom element, `styleElement`\n * should be called in the element's `connectedCallback`.\n *\n * * Shimmed custom properties may only be defined either for an entire\n * shadowRoot (for example, in a `:host` rule) or via a rule that directly\n * matches an element with a shadowRoot. In other words, instead of flowing from\n * parent to child as do native css custom properties, shimmed custom properties\n * flow only from shadowRoots to nested shadowRoots.\n *\n * * When using `@apply` mixing css shorthand property names with\n * non-shorthand names (for example `border` and `border-width`) is not\n * supported.\n */\nexport const render = (result, container, options) => {\n if (!options || typeof options !== 'object' || !options.scopeName) {\n throw new Error('The `scopeName` option is required.');\n }\n const scopeName = options.scopeName;\n const hasRendered = parts.has(container);\n const needsScoping = compatibleShadyCSSVersion &&\n container.nodeType === 11 /* Node.DOCUMENT_FRAGMENT_NODE */ &&\n !!container.host;\n // Handle first render to a scope specially...\n const firstScopeRender = needsScoping && !shadyRenderSet.has(scopeName);\n // On first scope render, render into a fragment; this cannot be a single\n // fragment that is reused since nested renders can occur synchronously.\n const renderContainer = firstScopeRender ? document.createDocumentFragment() : container;\n litRender(result, renderContainer, Object.assign({ templateFactory: shadyTemplateFactory(scopeName) }, options));\n // When performing first scope render,\n // (1) We've rendered into a fragment so that there's a chance to\n // `prepareTemplateStyles` before sub-elements hit the DOM\n // (which might cause them to render based on a common pattern of\n // rendering in a custom element's `connectedCallback`);\n // (2) Scope the template with ShadyCSS one time only for this scope.\n // (3) Render the fragment into the container and make sure the\n // container knows its `part` is the one we just rendered. This ensures\n // DOM will be re-used on subsequent renders.\n if (firstScopeRender) {\n const part = parts.get(renderContainer);\n parts.delete(renderContainer);\n // ShadyCSS might have style sheets (e.g. from `prepareAdoptedCssText`)\n // that should apply to `renderContainer` even if the rendered value is\n // not a TemplateInstance. However, it will only insert scoped styles\n // into the document if `prepareTemplateStyles` has already been called\n // for the given scope name.\n const template = part.value instanceof TemplateInstance ?\n part.value.template :\n undefined;\n prepareTemplateStyles(scopeName, renderContainer, template);\n removeNodes(container, container.firstChild);\n container.appendChild(renderContainer);\n parts.set(container, part);\n }\n // After elements have hit the DOM, update styling if this is the\n // initial render to this container.\n // This is needed whenever dynamic changes are made so it would be\n // safest to do every render; however, this would regress performance\n // so we leave it up to the user to call `ShadyCSS.styleElement`\n // for dynamic changes.\n if (!hasRendered && needsScoping) {\n window.ShadyCSS.styleElement(container.host);\n }\n};\n//# sourceMappingURL=shady-render.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nvar _a;\n/**\n * Use this module if you want to create your own base class extending\n * [[UpdatingElement]].\n * @packageDocumentation\n */\n/*\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is\n * replaced at compile time by the munged name for object[property]. We cannot\n * alias this function, so we have to use a small shim that has the same\n * behavior when not compiling.\n */\nwindow.JSCompiler_renameProperty =\n (prop, _obj) => prop;\nexport const defaultConverter = {\n toAttribute(value, type) {\n switch (type) {\n case Boolean:\n return value ? '' : null;\n case Object:\n case Array:\n // if the value is `null` or `undefined` pass this through\n // to allow removing/no change behavior.\n return value == null ? value : JSON.stringify(value);\n }\n return value;\n },\n fromAttribute(value, type) {\n switch (type) {\n case Boolean:\n return value !== null;\n case Number:\n return value === null ? null : Number(value);\n case Object:\n case Array:\n return JSON.parse(value);\n }\n return value;\n }\n};\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nexport const notEqual = (value, old) => {\n // This ensures (old==NaN, value==NaN) always returns false\n return old !== value && (old === old || value === value);\n};\nconst defaultPropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n reflect: false,\n hasChanged: notEqual\n};\nconst STATE_HAS_UPDATED = 1;\nconst STATE_UPDATE_REQUESTED = 1 << 2;\nconst STATE_IS_REFLECTING_TO_ATTRIBUTE = 1 << 3;\nconst STATE_IS_REFLECTING_TO_PROPERTY = 1 << 4;\n/**\n * The Closure JS Compiler doesn't currently have good support for static\n * property semantics where \"this\" is dynamic (e.g.\n * https://github.com/google/closure-compiler/issues/3177 and others) so we use\n * this hack to bypass any rewriting by the compiler.\n */\nconst finalized = 'finalized';\n/**\n * Base element class which manages element properties and attributes. When\n * properties change, the `update` method is asynchronously called. This method\n * should be supplied by subclassers to render updates as desired.\n * @noInheritDoc\n */\nexport class UpdatingElement extends HTMLElement {\n constructor() {\n super();\n this.initialize();\n }\n /**\n * Returns a list of attributes corresponding to the registered properties.\n * @nocollapse\n */\n static get observedAttributes() {\n // note: piggy backing on this to ensure we're finalized.\n this.finalize();\n const attributes = [];\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n this._classProperties.forEach((v, p) => {\n const attr = this._attributeNameForProperty(p, v);\n if (attr !== undefined) {\n this._attributeToPropertyMap.set(attr, p);\n attributes.push(attr);\n }\n });\n return attributes;\n }\n /**\n * Ensures the private `_classProperties` property metadata is created.\n * In addition to `finalize` this is also called in `createProperty` to\n * ensure the `@property` decorator can add property metadata.\n */\n /** @nocollapse */\n static _ensureClassProperties() {\n // ensure private storage for property declarations.\n if (!this.hasOwnProperty(JSCompiler_renameProperty('_classProperties', this))) {\n this._classProperties = new Map();\n // NOTE: Workaround IE11 not supporting Map constructor argument.\n const superProperties = Object.getPrototypeOf(this)._classProperties;\n if (superProperties !== undefined) {\n superProperties.forEach((v, k) => this._classProperties.set(k, v));\n }\n }\n }\n /**\n * Creates a property accessor on the element prototype if one does not exist\n * and stores a PropertyDeclaration for the property with the given options.\n * The property setter calls the property's `hasChanged` property option\n * or uses a strict identity check to determine whether or not to request\n * an update.\n *\n * This method may be overridden to customize properties; however,\n * when doing so, it's important to call `super.createProperty` to ensure\n * the property is setup correctly. This method calls\n * `getPropertyDescriptor` internally to get a descriptor to install.\n * To customize what properties do when they are get or set, override\n * `getPropertyDescriptor`. To customize the options for a property,\n * implement `createProperty` like this:\n *\n * static createProperty(name, options) {\n * options = Object.assign(options, {myOption: true});\n * super.createProperty(name, options);\n * }\n *\n * @nocollapse\n */\n static createProperty(name, options = defaultPropertyDeclaration) {\n // Note, since this can be called by the `@property` decorator which\n // is called before `finalize`, we ensure storage exists for property\n // metadata.\n this._ensureClassProperties();\n this._classProperties.set(name, options);\n // Do not generate an accessor if the prototype already has one, since\n // it would be lost otherwise and that would never be the user's intention;\n // Instead, we expect users to call `requestUpdate` themselves from\n // user-defined accessors. Note that if the super has an accessor we will\n // still overwrite it\n if (options.noAccessor || this.prototype.hasOwnProperty(name)) {\n return;\n }\n const key = typeof name === 'symbol' ? Symbol() : `__${name}`;\n const descriptor = this.getPropertyDescriptor(name, key, options);\n if (descriptor !== undefined) {\n Object.defineProperty(this.prototype, name, descriptor);\n }\n }\n /**\n * Returns a property descriptor to be defined on the given named property.\n * If no descriptor is returned, the property will not become an accessor.\n * For example,\n *\n * class MyElement extends LitElement {\n * static getPropertyDescriptor(name, key, options) {\n * const defaultDescriptor =\n * super.getPropertyDescriptor(name, key, options);\n * const setter = defaultDescriptor.set;\n * return {\n * get: defaultDescriptor.get,\n * set(value) {\n * setter.call(this, value);\n * // custom action.\n * },\n * configurable: true,\n * enumerable: true\n * }\n * }\n * }\n *\n * @nocollapse\n */\n static getPropertyDescriptor(name, key, options) {\n return {\n // tslint:disable-next-line:no-any no symbol in index\n get() {\n return this[key];\n },\n set(value) {\n const oldValue = this[name];\n this[key] = value;\n this\n .requestUpdateInternal(name, oldValue, options);\n },\n configurable: true,\n enumerable: true\n };\n }\n /**\n * Returns the property options associated with the given property.\n * These options are defined with a PropertyDeclaration via the `properties`\n * object or the `@property` decorator and are registered in\n * `createProperty(...)`.\n *\n * Note, this method should be considered \"final\" and not overridden. To\n * customize the options for a given property, override `createProperty`.\n *\n * @nocollapse\n * @final\n */\n static getPropertyOptions(name) {\n return this._classProperties && this._classProperties.get(name) ||\n defaultPropertyDeclaration;\n }\n /**\n * Creates property accessors for registered properties and ensures\n * any superclasses are also finalized.\n * @nocollapse\n */\n static finalize() {\n // finalize any superclasses\n const superCtor = Object.getPrototypeOf(this);\n if (!superCtor.hasOwnProperty(finalized)) {\n superCtor.finalize();\n }\n this[finalized] = true;\n this._ensureClassProperties();\n // initialize Map populated in observedAttributes\n this._attributeToPropertyMap = new Map();\n // make any properties\n // Note, only process \"own\" properties since this element will inherit\n // any properties defined on the superClass, and finalization ensures\n // the entire prototype chain is finalized.\n if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) {\n const props = this.properties;\n // support symbols in properties (IE11 does not support this)\n const propKeys = [\n ...Object.getOwnPropertyNames(props),\n ...(typeof Object.getOwnPropertySymbols === 'function') ?\n Object.getOwnPropertySymbols(props) :\n []\n ];\n // This for/of is ok because propKeys is an array\n for (const p of propKeys) {\n // note, use of `any` is due to TypeSript lack of support for symbol in\n // index types\n // tslint:disable-next-line:no-any no symbol in index\n this.createProperty(p, props[p]);\n }\n }\n }\n /**\n * Returns the property name for the given attribute `name`.\n * @nocollapse\n */\n static _attributeNameForProperty(name, options) {\n const attribute = options.attribute;\n return attribute === false ?\n undefined :\n (typeof attribute === 'string' ?\n attribute :\n (typeof name === 'string' ? name.toLowerCase() : undefined));\n }\n /**\n * Returns true if a property should request an update.\n * Called when a property value is set and uses the `hasChanged`\n * option for the property if present or a strict identity check.\n * @nocollapse\n */\n static _valueHasChanged(value, old, hasChanged = notEqual) {\n return hasChanged(value, old);\n }\n /**\n * Returns the property value for the given attribute value.\n * Called via the `attributeChangedCallback` and uses the property's\n * `converter` or `converter.fromAttribute` property option.\n * @nocollapse\n */\n static _propertyValueFromAttribute(value, options) {\n const type = options.type;\n const converter = options.converter || defaultConverter;\n const fromAttribute = (typeof converter === 'function' ? converter : converter.fromAttribute);\n return fromAttribute ? fromAttribute(value, type) : value;\n }\n /**\n * Returns the attribute value for the given property value. If this\n * returns undefined, the property will *not* be reflected to an attribute.\n * If this returns null, the attribute will be removed, otherwise the\n * attribute will be set to the value.\n * This uses the property's `reflect` and `type.toAttribute` property options.\n * @nocollapse\n */\n static _propertyValueToAttribute(value, options) {\n if (options.reflect === undefined) {\n return;\n }\n const type = options.type;\n const converter = options.converter;\n const toAttribute = converter && converter.toAttribute ||\n defaultConverter.toAttribute;\n return toAttribute(value, type);\n }\n /**\n * Performs element initialization. By default captures any pre-set values for\n * registered properties.\n */\n initialize() {\n this._updateState = 0;\n this._updatePromise =\n new Promise((res) => this._enableUpdatingResolver = res);\n this._changedProperties = new Map();\n this._saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this.requestUpdateInternal();\n }\n /**\n * Fixes any properties set on the instance before upgrade time.\n * Otherwise these would shadow the accessor and break these properties.\n * The properties are stored in a Map which is played back after the\n * constructor runs. Note, on very old versions of Safari (<=9) or Chrome\n * (<=41), properties created for native platform properties like (`id` or\n * `name`) may not have default values set in the element constructor. On\n * these browsers native properties appear on instances and therefore their\n * default value will overwrite any element default (e.g. if the element sets\n * this.id = 'id' in the constructor, the 'id' will become '' since this is\n * the native platform default).\n */\n _saveInstanceProperties() {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n this.constructor\n ._classProperties.forEach((_v, p) => {\n if (this.hasOwnProperty(p)) {\n const value = this[p];\n delete this[p];\n if (!this._instanceProperties) {\n this._instanceProperties = new Map();\n }\n this._instanceProperties.set(p, value);\n }\n });\n }\n /**\n * Applies previously saved instance properties.\n */\n _applyInstanceProperties() {\n // Use forEach so this works even if for/of loops are compiled to for loops\n // expecting arrays\n // tslint:disable-next-line:no-any\n this._instanceProperties.forEach((v, p) => this[p] = v);\n this._instanceProperties = undefined;\n }\n connectedCallback() {\n // Ensure first connection completes an update. Updates cannot complete\n // before connection.\n this.enableUpdating();\n }\n enableUpdating() {\n if (this._enableUpdatingResolver !== undefined) {\n this._enableUpdatingResolver();\n this._enableUpdatingResolver = undefined;\n }\n }\n /**\n * Allows for `super.disconnectedCallback()` in extensions while\n * reserving the possibility of making non-breaking feature additions\n * when disconnecting at some point in the future.\n */\n disconnectedCallback() {\n }\n /**\n * Synchronizes property values when attributes change.\n */\n attributeChangedCallback(name, old, value) {\n if (old !== value) {\n this._attributeToProperty(name, value);\n }\n }\n _propertyToAttribute(name, value, options = defaultPropertyDeclaration) {\n const ctor = this.constructor;\n const attr = ctor._attributeNameForProperty(name, options);\n if (attr !== undefined) {\n const attrValue = ctor._propertyValueToAttribute(value, options);\n // an undefined value does not change the attribute.\n if (attrValue === undefined) {\n return;\n }\n // Track if the property is being reflected to avoid\n // setting the property again via `attributeChangedCallback`. Note:\n // 1. this takes advantage of the fact that the callback is synchronous.\n // 2. will behave incorrectly if multiple attributes are in the reaction\n // stack at time of calling. However, since we process attributes\n // in `update` this should not be possible (or an extreme corner case\n // that we'd like to discover).\n // mark state reflecting\n this._updateState = this._updateState | STATE_IS_REFLECTING_TO_ATTRIBUTE;\n if (attrValue == null) {\n this.removeAttribute(attr);\n }\n else {\n this.setAttribute(attr, attrValue);\n }\n // mark state not reflecting\n this._updateState = this._updateState & ~STATE_IS_REFLECTING_TO_ATTRIBUTE;\n }\n }\n _attributeToProperty(name, value) {\n // Use tracking info to avoid deserializing attribute value if it was\n // just set from a property setter.\n if (this._updateState & STATE_IS_REFLECTING_TO_ATTRIBUTE) {\n return;\n }\n const ctor = this.constructor;\n // Note, hint this as an `AttributeMap` so closure clearly understands\n // the type; it has issues with tracking types through statics\n // tslint:disable-next-line:no-unnecessary-type-assertion\n const propName = ctor._attributeToPropertyMap.get(name);\n if (propName !== undefined) {\n const options = ctor.getPropertyOptions(propName);\n // mark state reflecting\n this._updateState = this._updateState | STATE_IS_REFLECTING_TO_PROPERTY;\n this[propName] =\n // tslint:disable-next-line:no-any\n ctor._propertyValueFromAttribute(value, options);\n // mark state not reflecting\n this._updateState = this._updateState & ~STATE_IS_REFLECTING_TO_PROPERTY;\n }\n }\n /**\n * This protected version of `requestUpdate` does not access or return the\n * `updateComplete` promise. This promise can be overridden and is therefore\n * not free to access.\n */\n requestUpdateInternal(name, oldValue, options) {\n let shouldRequestUpdate = true;\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n const ctor = this.constructor;\n options = options || ctor.getPropertyOptions(name);\n if (ctor._valueHasChanged(this[name], oldValue, options.hasChanged)) {\n if (!this._changedProperties.has(name)) {\n this._changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `_reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (options.reflect === true &&\n !(this._updateState & STATE_IS_REFLECTING_TO_PROPERTY)) {\n if (this._reflectingProperties === undefined) {\n this._reflectingProperties = new Map();\n }\n this._reflectingProperties.set(name, options);\n }\n }\n else {\n // Abort the request if the property should not be considered changed.\n shouldRequestUpdate = false;\n }\n }\n if (!this._hasRequestedUpdate && shouldRequestUpdate) {\n this._updatePromise = this._enqueueUpdate();\n }\n }\n /**\n * Requests an update which is processed asynchronously. This should\n * be called when an element should update based on some state not triggered\n * by setting a property. In this case, pass no arguments. It should also be\n * called when manually implementing a property setter. In this case, pass the\n * property `name` and `oldValue` to ensure that any configured property\n * options are honored. Returns the `updateComplete` Promise which is resolved\n * when the update completes.\n *\n * @param name {PropertyKey} (optional) name of requesting property\n * @param oldValue {any} (optional) old value of requesting property\n * @returns {Promise} A Promise that is resolved when the update completes.\n */\n requestUpdate(name, oldValue) {\n this.requestUpdateInternal(name, oldValue);\n return this.updateComplete;\n }\n /**\n * Sets up the element to asynchronously update.\n */\n async _enqueueUpdate() {\n this._updateState = this._updateState | STATE_UPDATE_REQUESTED;\n try {\n // Ensure any previous update has resolved before updating.\n // This `await` also ensures that property changes are batched.\n await this._updatePromise;\n }\n catch (e) {\n // Ignore any previous errors. We only care that the previous cycle is\n // done. Any error should have been handled in the previous update.\n }\n const result = this.performUpdate();\n // If `performUpdate` returns a Promise, we await it. This is done to\n // enable coordinating updates with a scheduler. Note, the result is\n // checked to avoid delaying an additional microtask unless we need to.\n if (result != null) {\n await result;\n }\n return !this._hasRequestedUpdate;\n }\n get _hasRequestedUpdate() {\n return (this._updateState & STATE_UPDATE_REQUESTED);\n }\n get hasUpdated() {\n return (this._updateState & STATE_HAS_UPDATED);\n }\n /**\n * Performs an element update. Note, if an exception is thrown during the\n * update, `firstUpdated` and `updated` will not be called.\n *\n * You can override this method to change the timing of updates. If this\n * method is overridden, `super.performUpdate()` must be called.\n *\n * For instance, to schedule updates to occur just before the next frame:\n *\n * ```\n * protected async performUpdate(): Promise<unknown> {\n * await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n * super.performUpdate();\n * }\n * ```\n */\n performUpdate() {\n // Abort any update if one is not pending when this is called.\n // This can happen if `performUpdate` is called early to \"flush\"\n // the update.\n if (!this._hasRequestedUpdate) {\n return;\n }\n // Mixin instance properties once, if they exist.\n if (this._instanceProperties) {\n this._applyInstanceProperties();\n }\n let shouldUpdate = false;\n const changedProperties = this._changedProperties;\n try {\n shouldUpdate = this.shouldUpdate(changedProperties);\n if (shouldUpdate) {\n this.update(changedProperties);\n }\n else {\n this._markUpdated();\n }\n }\n catch (e) {\n // Prevent `firstUpdated` and `updated` from running when there's an\n // update exception.\n shouldUpdate = false;\n // Ensure element can accept additional updates after an exception.\n this._markUpdated();\n throw e;\n }\n if (shouldUpdate) {\n if (!(this._updateState & STATE_HAS_UPDATED)) {\n this._updateState = this._updateState | STATE_HAS_UPDATED;\n this.firstUpdated(changedProperties);\n }\n this.updated(changedProperties);\n }\n }\n _markUpdated() {\n this._changedProperties = new Map();\n this._updateState = this._updateState & ~STATE_UPDATE_REQUESTED;\n }\n /**\n * Returns a Promise that resolves when the element has completed updating.\n * The Promise value is a boolean that is `true` if the element completed the\n * update without triggering another update. The Promise result is `false` if\n * a property was set inside `updated()`. If the Promise is rejected, an\n * exception was thrown during the update.\n *\n * To await additional asynchronous work, override the `_getUpdateComplete`\n * method. For example, it is sometimes useful to await a rendered element\n * before fulfilling this Promise. To do this, first await\n * `super._getUpdateComplete()`, then any subsequent state.\n *\n * @returns {Promise} The Promise returns a boolean that indicates if the\n * update resolved without triggering another update.\n */\n get updateComplete() {\n return this._getUpdateComplete();\n }\n /**\n * Override point for the `updateComplete` promise.\n *\n * It is not safe to override the `updateComplete` getter directly due to a\n * limitation in TypeScript which means it is not possible to call a\n * superclass getter (e.g. `super.updateComplete.then(...)`) when the target\n * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).\n * This method should be overridden instead. For example:\n *\n * class MyElement extends LitElement {\n * async _getUpdateComplete() {\n * await super._getUpdateComplete();\n * await this._myChild.updateComplete;\n * }\n * }\n */\n _getUpdateComplete() {\n return this._updatePromise;\n }\n /**\n * Controls whether or not `update` should be called when the element requests\n * an update. By default, this method always returns `true`, but this can be\n * customized to control when to update.\n *\n * @param _changedProperties Map of changed properties with old values\n */\n shouldUpdate(_changedProperties) {\n return true;\n }\n /**\n * Updates the element. This method reflects property values to attributes.\n * It can be overridden to render and keep updated element DOM.\n * Setting properties inside this method will *not* trigger\n * another update.\n *\n * @param _changedProperties Map of changed properties with old values\n */\n update(_changedProperties) {\n if (this._reflectingProperties !== undefined &&\n this._reflectingProperties.size > 0) {\n // Use forEach so this works even if for/of loops are compiled to for\n // loops expecting arrays\n this._reflectingProperties.forEach((v, k) => this._propertyToAttribute(k, this[k], v));\n this._reflectingProperties = undefined;\n }\n this._markUpdated();\n }\n /**\n * Invoked whenever the element is updated. Implement to perform\n * post-updating tasks via DOM APIs, for example, focusing an element.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n */\n updated(_changedProperties) {\n }\n /**\n * Invoked when the element is first updated. Implement to perform one time\n * work on the element after update.\n *\n * Setting properties inside this method will trigger the element to update\n * again after this update cycle completes.\n *\n * @param _changedProperties Map of changed properties with old values\n */\n firstUpdated(_changedProperties) {\n }\n}\n_a = finalized;\n/**\n * Marks class as having finished creating properties.\n */\nUpdatingElement[_a] = true;\n//# sourceMappingURL=updating-element.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nconst legacyCustomElement = (tagName, clazz) => {\n window.customElements.define(tagName, clazz);\n // Cast as any because TS doesn't recognize the return type as being a\n // subtype of the decorated class when clazz is typed as\n // `Constructor<HTMLElement>` for some reason.\n // `Constructor<HTMLElement>` is helpful to make sure the decorator is\n // applied to elements however.\n // tslint:disable-next-line:no-any\n return clazz;\n};\nconst standardCustomElement = (tagName, descriptor) => {\n const { kind, elements } = descriptor;\n return {\n kind,\n elements,\n // This callback is called once the class is otherwise fully defined\n finisher(clazz) {\n window.customElements.define(tagName, clazz);\n }\n };\n};\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```\n * @customElement('my-element')\n * class MyElement {\n * render() {\n * return html``;\n * }\n * }\n * ```\n * @category Decorator\n * @param tagName The name of the custom element to define.\n */\nexport const customElement = (tagName) => (classOrDescriptor) => (typeof classOrDescriptor === 'function') ?\n legacyCustomElement(tagName, classOrDescriptor) :\n standardCustomElement(tagName, classOrDescriptor);\nconst standardProperty = (options, element) => {\n // When decorating an accessor, pass it through and add property metadata.\n // Note, the `hasOwnProperty` check in `createProperty` ensures we don't\n // stomp over the user's accessor.\n if (element.kind === 'method' && element.descriptor &&\n !('value' in element.descriptor)) {\n return Object.assign(Object.assign({}, element), { finisher(clazz) {\n clazz.createProperty(element.key, options);\n } });\n }\n else {\n // createProperty() takes care of defining the property, but we still\n // must return some kind of descriptor, so return a descriptor for an\n // unused prototype field. The finisher calls createProperty().\n return {\n kind: 'field',\n key: Symbol(),\n placement: 'own',\n descriptor: {},\n // When @babel/plugin-proposal-decorators implements initializers,\n // do this instead of the initializer below. See:\n // https://github.com/babel/babel/issues/9260 extras: [\n // {\n // kind: 'initializer',\n // placement: 'own',\n // initializer: descriptor.initializer,\n // }\n // ],\n initializer() {\n if (typeof element.initializer === 'function') {\n this[element.key] = element.initializer.call(this);\n }\n },\n finisher(clazz) {\n clazz.createProperty(element.key, options);\n }\n };\n }\n};\nconst legacyProperty = (options, proto, name) => {\n proto.constructor\n .createProperty(name, options);\n};\n/**\n * A property decorator which creates a LitElement property which reflects a\n * corresponding attribute value. A [[`PropertyDeclaration`]] may optionally be\n * supplied to configure property features.\n *\n * This decorator should only be used for public fields. Private or protected\n * fields should use the [[`internalProperty`]] decorator.\n *\n * @example\n * ```ts\n * class MyElement {\n * @property({ type: Boolean })\n * clicked = false;\n * }\n * ```\n * @category Decorator\n * @ExportDecoratedItems\n */\nexport function property(options) {\n // tslint:disable-next-line:no-any decorator\n return (protoOrDescriptor, name) => (name !== undefined) ?\n legacyProperty(options, protoOrDescriptor, name) :\n standardProperty(options, protoOrDescriptor);\n}\n/**\n * Declares a private or protected property that still triggers updates to the\n * element when it changes.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like closure compiler.\n * @category Decorator\n */\nexport function internalProperty(options) {\n return property({ attribute: false, hasChanged: options === null || options === void 0 ? void 0 : options.hasChanged });\n}\n/**\n * A property decorator that converts a class property into a getter that\n * executes a querySelector on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n * @param cache An optional boolean which when true performs the DOM query only\n * once and caches the result.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * @example\n *\n * ```ts\n * class MyElement {\n * @query('#first')\n * first;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function query(selector, cache) {\n return (protoOrDescriptor, \n // tslint:disable-next-line:no-any decorator\n name) => {\n const descriptor = {\n get() {\n return this.renderRoot.querySelector(selector);\n },\n enumerable: true,\n configurable: true,\n };\n if (cache) {\n const key = typeof name === 'symbol' ? Symbol() : `__${name}`;\n descriptor.get = function () {\n if (this[key] === undefined) {\n (this[key] =\n this.renderRoot.querySelector(selector));\n }\n return this[key];\n };\n }\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor, name) :\n standardQuery(descriptor, protoOrDescriptor);\n };\n}\n// Note, in the future, we may extend this decorator to support the use case\n// where the queried element may need to do work to become ready to interact\n// with (e.g. load some implementation code). If so, we might elect to\n// add a second argument defining a function that can be run to make the\n// queried element loaded/updated/ready.\n/**\n * A property decorator that converts a class property into a getter that\n * returns a promise that resolves to the result of a querySelector on the\n * element's renderRoot done after the element's `updateComplete` promise\n * resolves. When the queried property may change with element state, this\n * decorator can be used instead of requiring users to await the\n * `updateComplete` before accessing the property.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * @example\n * ```ts\n * class MyElement {\n * @queryAsync('#first')\n * first;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n *\n * // external usage\n * async doSomethingWithFirst() {\n * (await aMyElement.first).doSomething();\n * }\n * ```\n * @category Decorator\n */\nexport function queryAsync(selector) {\n return (protoOrDescriptor, \n // tslint:disable-next-line:no-any decorator\n name) => {\n const descriptor = {\n async get() {\n await this.updateComplete;\n return this.renderRoot.querySelector(selector);\n },\n enumerable: true,\n configurable: true,\n };\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor, name) :\n standardQuery(descriptor, protoOrDescriptor);\n };\n}\n/**\n * A property decorator that converts a class property into a getter\n * that executes a querySelectorAll on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See:\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n *\n * @example\n * ```ts\n * class MyElement {\n * @queryAll('div')\n * divs;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function queryAll(selector) {\n return (protoOrDescriptor, \n // tslint:disable-next-line:no-any decorator\n name) => {\n const descriptor = {\n get() {\n return this.renderRoot.querySelectorAll(selector);\n },\n enumerable: true,\n configurable: true,\n };\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor, name) :\n standardQuery(descriptor, protoOrDescriptor);\n };\n}\nconst legacyQuery = (descriptor, proto, name) => {\n Object.defineProperty(proto, name, descriptor);\n};\nconst standardQuery = (descriptor, element) => ({\n kind: 'method',\n placement: 'prototype',\n key: element.key,\n descriptor,\n});\nconst standardEventOptions = (options, element) => {\n return Object.assign(Object.assign({}, element), { finisher(clazz) {\n Object.assign(clazz.prototype[element.key], options);\n } });\n};\nconst legacyEventOptions = \n// tslint:disable-next-line:no-any legacy decorator\n(options, proto, name) => {\n Object.assign(proto[name], options);\n};\n/**\n * Adds event listener options to a method used as an event listener in a\n * lit-html template.\n *\n * @param options An object that specifies event listener options as accepted by\n * `EventTarget#addEventListener` and `EventTarget#removeEventListener`.\n *\n * Current browsers support the `capture`, `passive`, and `once` options. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters\n *\n * @example\n * ```ts\n * class MyElement {\n * clicked = false;\n *\n * render() {\n * return html`\n * <div @click=${this._onClick}`>\n * <button></button>\n * </div>\n * `;\n * }\n *\n * @eventOptions({capture: true})\n * _onClick(e) {\n * this.clicked = true;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function eventOptions(options) {\n // Return value typed as any to prevent TypeScript from complaining that\n // standard decorator function signature does not match TypeScript decorator\n // signature\n // TODO(kschaaf): unclear why it was only failing on this decorator and not\n // the others\n return ((protoOrDescriptor, name) => (name !== undefined) ?\n legacyEventOptions(options, protoOrDescriptor, name) :\n standardEventOptions(options, protoOrDescriptor));\n}\n// x-browser support for matches\n// tslint:disable-next-line:no-any\nconst ElementProto = Element.prototype;\nconst legacyMatches = ElementProto.msMatchesSelector || ElementProto.webkitMatchesSelector;\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedNodes` of the given named `slot`. Note, the type of\n * this property should be annotated as `NodeListOf<HTMLElement>`.\n *\n * @param slotName A string name of the slot.\n * @param flatten A boolean which when true flattens the assigned nodes,\n * meaning any assigned nodes that are slot elements are replaced with their\n * assigned nodes.\n * @param selector A string which filters the results to elements that match\n * the given css selector.\n *\n * * @example\n * ```ts\n * class MyElement {\n * @queryAssignedNodes('list', true, '.item')\n * listItems;\n *\n * render() {\n * return html`\n * <slot name=\"list\"></slot>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function queryAssignedNodes(slotName = '', flatten = false, selector = '') {\n return (protoOrDescriptor, \n // tslint:disable-next-line:no-any decorator\n name) => {\n const descriptor = {\n get() {\n const slotSelector = `slot${slotName ? `[name=${slotName}]` : ':not([name])'}`;\n const slot = this.renderRoot.querySelector(slotSelector);\n let nodes = slot && slot.assignedNodes({ flatten });\n if (nodes && selector) {\n nodes = nodes.filter((node) => node.nodeType === Node.ELEMENT_NODE &&\n node.matches ?\n node.matches(selector) :\n legacyMatches.call(node, selector));\n }\n return nodes;\n },\n enumerable: true,\n configurable: true,\n };\n return (name !== undefined) ?\n legacyQuery(descriptor, protoOrDescriptor, name) :\n standardQuery(descriptor, protoOrDescriptor);\n };\n}\n//# sourceMappingURL=decorators.js.map","/**\n@license\nCopyright (c) 2019 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/**\n * Whether the current browser supports `adoptedStyleSheets`.\n */\nexport const supportsAdoptingStyleSheets = (window.ShadowRoot) &&\n (window.ShadyCSS === undefined || window.ShadyCSS.nativeShadow) &&\n ('adoptedStyleSheets' in Document.prototype) &&\n ('replace' in CSSStyleSheet.prototype);\nconst constructionToken = Symbol();\nexport class CSSResult {\n constructor(cssText, safeToken) {\n if (safeToken !== constructionToken) {\n throw new Error('CSSResult is not constructable. Use `unsafeCSS` or `css` instead.');\n }\n this.cssText = cssText;\n }\n // Note, this is a getter so that it's lazy. In practice, this means\n // stylesheets are not created until the first element instance is made.\n get styleSheet() {\n if (this._styleSheet === undefined) {\n // Note, if `supportsAdoptingStyleSheets` is true then we assume\n // CSSStyleSheet is constructable.\n if (supportsAdoptingStyleSheets) {\n this._styleSheet = new CSSStyleSheet();\n this._styleSheet.replaceSync(this.cssText);\n }\n else {\n this._styleSheet = null;\n }\n }\n return this._styleSheet;\n }\n toString() {\n return this.cssText;\n }\n}\n/**\n * Wrap a value for interpolation in a [[`css`]] tagged template literal.\n *\n * This is unsafe because untrusted CSS text can be used to phone home\n * or exfiltrate data to an attacker controlled site. Take care to only use\n * this with trusted input.\n */\nexport const unsafeCSS = (value) => {\n return new CSSResult(String(value), constructionToken);\n};\nconst textFromCSSResult = (value) => {\n if (value instanceof CSSResult) {\n return value.cssText;\n }\n else if (typeof value === 'number') {\n return value;\n }\n else {\n throw new Error(`Value passed to 'css' function must be a 'css' function result: ${value}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`);\n }\n};\n/**\n * Template tag which which can be used with LitElement's [[LitElement.styles |\n * `styles`]] property to set element styles. For security reasons, only literal\n * string values may be used. To incorporate non-literal values [[`unsafeCSS`]]\n * may be used inside a template string part.\n */\nexport const css = (strings, ...values) => {\n const cssText = values.reduce((acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1], strings[0]);\n return new CSSResult(cssText, constructionToken);\n};\n//# sourceMappingURL=css-tag.js.map","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n/**\n * The main LitElement module, which defines the [[`LitElement`]] base class and\n * related APIs.\n *\n * LitElement components can define a template and a set of observed\n * properties. Changing an observed property triggers a re-render of the\n * element.\n *\n * Import [[`LitElement`]] and [[`html`]] from this module to create a\n * component:\n *\n * ```js\n * import {LitElement, html} from 'lit-element';\n *\n * class MyElement extends LitElement {\n *\n * // Declare observed properties\n * static get properties() {\n * return {\n * adjective: {}\n * }\n * }\n *\n * constructor() {\n * this.adjective = 'awesome';\n * }\n *\n * // Define the element's template\n * render() {\n * return html`<p>your ${adjective} template here</p>`;\n * }\n * }\n *\n * customElements.define('my-element', MyElement);\n * ```\n *\n * `LitElement` extends [[`UpdatingElement`]] and adds lit-html templating.\n * The `UpdatingElement` class is provided for users that want to build\n * their own custom element base classes that don't use lit-html.\n *\n * @packageDocumentation\n */\nimport { render } from 'lit-html/lib/shady-render.js';\nimport { UpdatingElement } from './lib/updating-element.js';\nexport * from './lib/updating-element.js';\nexport * from './lib/decorators.js';\nexport { html, svg, TemplateResult, SVGTemplateResult } from 'lit-html/lit-html.js';\nimport { supportsAdoptingStyleSheets, unsafeCSS } from './lib/css-tag.js';\nexport * from './lib/css-tag.js';\n// IMPORTANT: do not change the property name or the assignment expression.\n// This line will be used in regexes to search for LitElement usage.\n// TODO(justinfagnani): inject version number at build time\n(window['litElementVersions'] || (window['litElementVersions'] = []))\n .push('2.4.0');\n/**\n * Sentinal value used to avoid calling lit-html's render function when\n * subclasses do not implement `render`\n */\nconst renderNotImplemented = {};\n/**\n * Base element class that manages element properties and attributes, and\n * renders a lit-html template.\n *\n * To define a component, subclass `LitElement` and implement a\n * `render` method to provide the component's template. Define properties\n * using the [[`properties`]] property or the [[`property`]] decorator.\n */\nexport class LitElement extends UpdatingElement {\n /**\n * Return the array of styles to apply to the element.\n * Override this method to integrate into a style management system.\n *\n * @nocollapse\n */\n static getStyles() {\n return this.styles;\n }\n /** @nocollapse */\n static _getUniqueStyles() {\n // Only gather styles once per class\n if (this.hasOwnProperty(JSCompiler_renameProperty('_styles', this))) {\n return;\n }\n // Take care not to call `this.getStyles()` multiple times since this\n // generates new CSSResults each time.\n // TODO(sorvell): Since we do not cache CSSResults by input, any\n // shared styles will generate new stylesheet objects, which is wasteful.\n // This should be addressed when a browser ships constructable\n // stylesheets.\n const userStyles = this.getStyles();\n if (Array.isArray(userStyles)) {\n // De-duplicate styles preserving the _last_ instance in the set.\n // This is a performance optimization to avoid duplicated styles that can\n // occur especially when composing via subclassing.\n // The last item is kept to try to preserve the cascade order with the\n // assumption that it's most important that last added styles override\n // previous styles.\n const addStyles = (styles, set) => styles.reduceRight((set, s) => \n // Note: On IE set.add() does not return the set\n Array.isArray(s) ? addStyles(s, set) : (set.add(s), set), set);\n // Array.from does not work on Set in IE, otherwise return\n // Array.from(addStyles(userStyles, new Set<CSSResult>())).reverse()\n const set = addStyles(userStyles, new Set());\n const styles = [];\n set.forEach((v) => styles.unshift(v));\n this._styles = styles;\n }\n else {\n this._styles = userStyles === undefined ? [] : [userStyles];\n }\n // Ensure that there are no invalid CSSStyleSheet instances here. They are\n // invalid in two conditions.\n // (1) the sheet is non-constructible (`sheet` of a HTMLStyleElement), but\n // this is impossible to check except via .replaceSync or use\n // (2) the ShadyCSS polyfill is enabled (:. supportsAdoptingStyleSheets is\n // false)\n this._styles = this._styles.map((s) => {\n if (s instanceof CSSStyleSheet && !supportsAdoptingStyleSheets) {\n // Flatten the cssText from the passed constructible stylesheet (or\n // undetectable non-constructible stylesheet). The user might have\n // expected to update their stylesheets over time, but the alternative\n // is a crash.\n const cssText = Array.prototype.slice.call(s.cssRules)\n .reduce((css, rule) => css + rule.cssText, '');\n return unsafeCSS(cssText);\n }\n return s;\n });\n }\n /**\n * Performs element initialization. By default this calls\n * [[`createRenderRoot`]] to create the element [[`renderRoot`]] node and\n * captures any pre-set values for registered properties.\n */\n initialize() {\n super.initialize();\n this.constructor._getUniqueStyles();\n this.renderRoot = this.createRenderRoot();\n // Note, if renderRoot is not a shadowRoot, styles would/could apply to the\n // element's getRootNode(). While this could be done, we're choosing not to\n // support this now since it would require different logic around de-duping.\n if (window.ShadowRoot && this.renderRoot instanceof window.ShadowRoot) {\n this.adoptStyles();\n }\n }\n /**\n * Returns the node into which the element should render and by default\n * creates and returns an open shadowRoot. Implement to customize where the\n * element's DOM is rendered. For example, to render into the element's\n * childNodes, return `this`.\n * @returns {Element|DocumentFragment} Returns a node into which to render.\n */\n createRenderRoot() {\n return this.attachShadow({ mode: 'open' });\n }\n /**\n * Applies styling to the element shadowRoot using the [[`styles`]]\n * property. Styling will apply using `shadowRoot.adoptedStyleSheets` where\n * available and will fallback otherwise. When Shadow DOM is polyfilled,\n * ShadyCSS scopes styles and adds them to the document. When Shadow DOM\n * is available but `adoptedStyleSheets` is not, styles are appended to the\n * end of the `shadowRoot` to [mimic spec\n * behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).\n */\n adoptStyles() {\n const styles = this.constructor._styles;\n if (styles.length === 0) {\n return;\n }\n // There are three separate cases here based on Shadow DOM support.\n // (1) shadowRoot polyfilled: use ShadyCSS\n // (2) shadowRoot.adoptedStyleSheets available: use it\n // (3) shadowRoot.adoptedStyleSheets polyfilled: append styles after\n // rendering\n if (window.ShadyCSS !== undefined && !window.ShadyCSS.nativeShadow) {\n window.ShadyCSS.ScopingShim.prepareAdoptedCssText(styles.map((s) => s.cssText), this.localName);\n }\n else if (supportsAdoptingStyleSheets) {\n this.renderRoot.adoptedStyleSheets =\n styles.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);\n }\n else {\n // This must be done after rendering so the actual style insertion is done\n // in `update`.\n this._needsShimAdoptedStyleSheets = true;\n }\n }\n connectedCallback() {\n super.connectedCallback();\n // Note, first update/render handles styleElement so we only call this if\n // connected after first update.\n if (this.hasUpdated && window.ShadyCSS !== undefined) {\n window.ShadyCSS.styleElement(this);\n }\n }\n /**\n * Updates the element. This method reflects property values to attributes\n * and calls `render` to render DOM via lit-html. Setting properties inside\n * this method will *not* trigger another update.\n * @param _changedProperties Map of changed properties with old values\n */\n update(changedProperties) {\n // Setting properties in `render` should not trigger an update. Since\n // updates are allowed after super.update, it's important to call `render`\n // before that.\n const templateResult = this.render();\n super.update(changedProperties);\n // If render is not implemented by the component, don't call lit-html render\n if (templateResult !== renderNotImplemented) {\n this.constructor\n .render(templateResult, this.renderRoot, { scopeName: this.localName, eventContext: this });\n }\n // When native Shadow DOM is used but adoptedStyles are not supported,\n // insert styling after rendering to ensure adoptedStyles have highest\n // priority.\n if (this._needsShimAdoptedStyleSheets) {\n this._needsShimAdoptedStyleSheets = false;\n this.constructor._styles.forEach((s) => {\n const style = document.createElement('style');\n style.textContent = s.cssText;\n this.renderRoot.appendChild(style);\n });\n }\n }\n /**\n * Invoked on each update to perform rendering tasks. This method may return\n * any value renderable by lit-html's `NodePart` - typically a\n * `TemplateResult`. Setting properties inside this method will *not* trigger\n * the element to update.\n */\n render() {\n return renderNotImplemented;\n }\n}\n/**\n * Ensure this class is marked as `finalized` as an optimization ensuring\n * it will not needlessly try to `finalize`.\n *\n * Note this property name is a string to prevent breaking Closure JS Compiler\n * optimizations. See updating-element.ts for more information.\n */\nLitElement['finalized'] = true;\n/**\n * Reference to the underlying library method used to render the element's\n * DOM. By default, points to the `render` method from lit-html's shady-render\n * module.\n *\n * **Most users will never need to touch this property.**\n *\n * This property should not be confused with the `render` instance method,\n * which should be overridden to define a template for the element.\n *\n * Advanced users creating a new base class based on LitElement can override\n * this property to point to a custom render method with a signature that\n * matches [shady-render's `render`\n * method](https://lit-html.polymer-project.org/api/modules/shady_render.html#render).\n *\n * @nocollapse\n */\nLitElement.render = render;\n//# sourceMappingURL=lit-element.js.map","import { css } from 'lit-element';\n\nconst menuButtonWidth = css`42px`;\nconst sliderWidth = css`var(--menuWidth, 320px)`;\nconst transitionTiming = css`var(--animationTiming, 200ms)`;\n\nexport default css`\n\n .main {\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .animate {\n transition: transform ${transitionTiming} ease-out;\n }\n\n .menu {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: ${sliderWidth};\n padding: .5rem .5rem 0 0;\n box-sizing: border-box;\n font-size: 1.4rem;\n color: var(--primaryTextColor);\n background: var(--menuSliderBg);\n transform: translateX(calc(${sliderWidth} * -1));\n }\n\n .menu:before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n z-index: 2;\n width: ${menuButtonWidth};\n content: \"\";\n background: var(--menuSliderBg);\n }\n\n .menu > button.close {\n right: 0.7rem;\n }\n\n button {\n outline: none;\n cursor: pointer;\n }\n\n header {\n margin: 0 0 .5rem 0;\n }\n\n header * {\n margin: 0;\n display: inline-block;\n }\n header button {\n outline: none;\n cursor: pointer;\n }\n\n header.with-secondary-action .details {\n width: 80%;\n }\n\n header .details {\n font-weight: bold;\n width: 88%;\n }\n\n header .custom-action > *,\n button.close {\n padding: 0;\n background-color: transparent;\n border: 0;\n --iconWidth: var(--menuSliderHeaderIconWidth);\n --iconHeight: var(--menuSliderHeaderIconHeight);\n }\n\n header .custom-action,\n button.close {\n position: absolute;\n }\n button.close {\n right: .5rem;\n }\n\n button.close * {\n float: right;\n }\n\n .content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: ${menuButtonWidth};\n z-index: 1;\n transform: translateX(calc(${sliderWidth} * -1));\n transition: transform ${transitionTiming} ease-out;\n background: var(--activeButtonBg);\n border-right: .2rem solid;\n border-color: var(--subpanelRightBorderColor);\n padding: .5rem 0 0 .5rem;\n }\n\n .open {\n transform: translateX(0);\n }\n\n .menu-list {\n padding: 0;\n margin: 0;\n list-style: none;\n background: var(--menuSliderBg);\n }\n .menu-list li {\n margin-bottom: .2rem;\n }\n\n .content section {\n height: 100%;\n position: relative;\n width: 100%;\n }\n\n .content .selected-menu {\n overflow: auto;\n position: absolute;\n top: 0;\n width: 100%;\n padding-bottom: 2rem;\n height: inherit;\n }\n\n .content .selected-menu > * {\n display: block;\n padding-bottom: 3rem;\n }\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 18 18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"collapseSidebarTitleID collapseSidebarDescID\"\n>\n <title id=\"collapseSidebarTitleID\">Collapse sidebar</title>\n <desc id=\"collapseSidebarDescID\">A circle with a left pointing chevron</desc>\n <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\" />\n</svg>\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit-element';\n\nclass IAIconCollapseSidebar extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-collapse-sidebar', IAIconCollapseSidebar);\n\nexport default IAIconCollapseSidebar;","import { css } from 'lit-element';\n\nexport default css`\n a {\n display: inline-block;\n text-decoration: none;\n }\n\n .menu-item {\n display: inline-flex;\n width: 100%;\n padding: 0;\n font-size: 1.6rem;\n text-align: left;\n background: transparent;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border: none;\n cursor: pointer;\n }\n\n button.menu-item {\n -webkit-appearance: none;\n appearance: none;\n border-radius: 0;\n }\n\n .menu-item:focus {\n outline: none;\n }\n\n .label {\n display: var(--menuButtonLabelDisplay, none);\n padding: 0;\n font-weight: 400;\n color: var(--primaryTextColor);\n text-align: left;\n vertical-align: middle;\n margin-left: 1rem;\n }\n\n .menu-details {\n color: var(--primaryTextColor);\n display: inline-block;\n margin-left: .5rem;\n font-style: italic;\n font-size: 1.5rem;\n }\n\n .menu-item > .icon {\n position: relative;\n display: inline-flex;\n z-index: 2;\n width: 4.2rem;\n height: 4.2rem;\n vertical-align: middle;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n\n .menu-item.selected .icon {\n background-color: var(--activeButtonBg);\n border-radius: 1rem 0 0 1rem;\n }\n\n .icon .fill-color {\n fill: #999;\n }\n\n .icon.active .fill-color {\n fill: #fff;\n }\n`;\n","import { html, LitElement } from 'lit-element';\nimport menuButtonCSS from './styles/menu-button.js';\n\nclass MenuButton extends LitElement {\n static get styles() {\n return menuButtonCSS;\n }\n\n static get properties() {\n return {\n icon: { type: String },\n href: { type: String },\n label: { type: String },\n menuDetails: { type: String },\n id: { type: String },\n selected: { type: Boolean },\n followable: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.icon = '';\n this.href = '';\n this.label = '';\n this.menuDetails = '';\n this.id = '';\n this.selected = false;\n this.followable = false;\n }\n\n onClick(e) {\n e.preventDefault();\n this.dispatchMenuTypeSelectedEvent();\n }\n\n dispatchMenuTypeSelectedEvent() {\n this.dispatchEvent(new CustomEvent('menuTypeSelected', {\n bubbles: true,\n composed: true,\n detail: {\n id: this.id,\n },\n }));\n }\n\n get buttonClass() {\n return this.selected ? 'selected' : '';\n }\n\n get iconClass() {\n return this.selected ? 'active' : '';\n }\n\n get menuItem() {\n return html`\n <span class=\"icon ${this.iconClass}\">\n ${this.icon}\n </span>\n <span class=\"label\">${this.label}</span>\n <span class=\"menu-details\">${this.menuDetails}</span>\n `;\n }\n\n get linkButton() {\n return html`\n <a\n href=\"${this.href}\"\n class=\"menu-item ${this.buttonClass}\"\n @click=${this.followable ? undefined : this.onClick}\n >${this.menuItem}</a>\n `;\n }\n\n get clickButton() {\n return html`\n <button\n class=\"menu-item ${this.buttonClass}\"\n @click=${this.onClick}\n >\n ${this.menuItem}\n </button>\n `;\n }\n\n render() {\n return this.href ? this.linkButton : this.clickButton;\n }\n}\n\ncustomElements.define('menu-button', MenuButton);\n","import { nothing } from 'lit-html';\nimport { LitElement, html } from 'lit-element';\nimport menuSliderCSS from './styles/menu-slider.js';\nimport '@internetarchive/icon-collapse-sidebar/icon-collapse-sidebar.js';\nimport './menu-button.js';\n\nconst sliderEvents = {\n closeDrawer: 'menuSliderClosed',\n};\nexport class IAMenuSlider extends LitElement {\n static get styles() {\n return menuSliderCSS;\n }\n\n static get properties() {\n return {\n menus: { type: Array },\n open: { type: Boolean },\n selectedMenu: { type: String },\n animateMenuOpen: { type: Boolean },\n manuallyHandleClose: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n\n this.menus = [];\n this.open = false;\n this.selectedMenu = '';\n this.animateMenuOpen = false;\n this.manuallyHandleClose = false;\n }\n\n /**\n * Event handler, captures state of selected menu\n * @param { CustomEvent } event\n */\n setSelectedMenu({ detail }) {\n const { id } = detail;\n this.selectedMenu = this.selectedMenu === id ? '' : id;\n }\n\n /**\n * closes menu drawer\n */\n closeMenu() {\n if (!this.manuallyHandleClose) {\n this.open = false;\n }\n const { closeDrawer } = sliderEvents;\n const drawerClosed = new CustomEvent(closeDrawer, {\n detail: this.selectedMenuDetails,\n });\n this.dispatchEvent(drawerClosed);\n }\n\n get selectedMenuDetails() {\n return this.menus.find(menu => menu.id === this.selectedMenu);\n }\n\n get selectedMenuComponent() {\n const menuItem = this.selectedMenuDetails;\n return menuItem && menuItem.component ? menuItem.component : html``;\n }\n\n /* render */\n\n get sliderDetailsClass() {\n const animate = this.animateMenuOpen ? 'animate' : '';\n const state = this.open ? 'open' : '';\n return `${animate} ${state}`;\n }\n\n get selectedMenuClass() {\n return this.selectedMenu ? 'open' : '';\n }\n\n get menuItems() {\n return this.menus.map(menu => (\n html`\n <li>\n <menu-button\n @menuTypeSelected=${this.setSelectedMenu}\n .icon=${menu.icon}\n .label=${menu.label}\n .menuDetails=${menu.menuDetails}\n .id=${menu.id}\n .selected=${menu.id === this.selectedMenu}\n .followable=${menu.followable}\n .href=${menu.href}\n ></menu-button>\n </li>\n `\n ));\n }\n\n get renderMenuHeader() {\n const { label = '', menuDetails = '', actionButton } = this.selectedMenuDetails || {};\n const actionSection = actionButton\n ? html`<div class=\"custom-action\">${actionButton}</div>`\n : nothing;\n const headerClass = actionButton ? 'with-secondary-action' : '';\n\n return html`\n <header class=\"${headerClass}\">\n <div class=\"details\">\n <h3>${label}</h3>\n <span class=\"extra-details\">${menuDetails}</span>\n </div>\n ${actionSection}\n ${this.closeButton}\n </header>\n `;\n }\n\n get closeButton() {\n return html`\n <button class=\"close\" aria-label=\"Close this menu\" @click=${this.closeMenu}>\n <ia-icon-collapse-sidebar></ia-icon-collapse-sidebar>\n </button>\n `;\n }\n\n /** @inheritdoc */\n render() {\n return html`\n <div class=\"main\">\n <div class=\"menu ${this.sliderDetailsClass}\">\n ${this.closeButton}\n <ul class=\"menu-list\">\n ${this.menuItems}\n </ul>\n <div class=\"content ${this.selectedMenuClass}\" @menuTypeSelected=${this.setSelectedMenu}>\n ${this.renderMenuHeader}\n <section>\n <div class=\"selected-menu\">\n ${this.selectedMenuComponent}\n </div>\n </section>\n </div>\n </div>\n </div>\n `;\n }\n}\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 21 19\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"advanceTitleID advanceDescID\"\n>\n <title id=\"advanceTitleID\">Advance icon</title>\n <desc id=\"advanceDescID\">An arrow pointing in a forward direction</desc>\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(-200.000000, -15.000000)\">\n <g transform=\"translate(56.922243, 5.000000)\">\n <g transform=\"translate(144.000000, 10.000000)\">\n <g transform=\"translate(11.000000, 10.000000) scale(-1, 1) translate(-11.000000, -10.000000) translate(1.000000, 0.000000)\">\n <polyline class=\"stroke-color\" stroke-width=\"2\" stroke-linejoin=\"round\" points=\"14.4444444 16.6666667 20 16.6666667 20 3.33333333 5.55555556 3.33333333\"></polyline>\n <polygon class=\"fill-color\" points=\"5.55555556 0 5.55555556 6.66666667 1.11111111 3.33333333\"></polygon>\n <text transform=\"translate(6.666667, 13.333333) scale(-1, 1) translate(-6.666667, -13.333333) \" font-family=\"HelveticaNeue, Helvetica Neue\" font-size=\"10\" font-weight=\"normal\" class=\"fill-color\">\n <tspan x=\"0\" y=\"17.3333333\">10</tspan>\n </text>\n </g>\n </g>\n </g>\n </g>\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 468 300\" aria-labelledby=\"applePayTitleID applePayDescID\">\n <title id=\"donateTitleID\">ApplePay icon</title>\n <desc id=\"donateDescID\">An illustration of the Apple Pay logo</desc>\n <g fill=\"none\">\n <path\n fill=\"#000\"\n d=\"M425.540484,0 L41.8576242,0 C40.2596386,0 38.6588291,0 37.0636954,0.0093185241 C35.715305,0.0189194277 34.3700489,0.0338855422 33.0247929,0.0705948795 C30.0908697,0.149943524 27.1318148,0.323042169 24.2346009,0.84375 C21.2910768,1.37349398 18.5519955,2.2375753 15.8798381,3.59807982 C13.2528614,4.93401732 10.8478351,6.68138178 8.76362011,8.76647214 C6.67850151,10.8515625 4.93113705,13.2526355 3.59548193,15.882436 C2.23469503,18.5545934 1.37004895,21.2945218 0.843975904,24.240305 C0.320472515,27.138366 0.146216114,30.0968562 0.0671498494,33.0276732 C0.0310052711,34.3729292 0.0155026355,35.7181852 0.00672063253,37.0631589 C1.12951807e-05,38.6617093 1.12951807e-05,40.2591303 1.12951807e-05,41.8605045 L1.12951807e-05,257.36634 C1.12951807e-05,258.967715 1.12951807e-05,260.56234 0.00672063253,262.163997 C0.0155026355,263.50897 0.0310052711,264.854226 0.0671498494,266.199482 C0.146216114,269.12773 0.320472515,272.08622 0.843975904,274.983434 C1.37004895,277.930346 2.23469503,280.669145 3.59548193,283.341585 C4.93113705,285.971386 6.67850151,288.375565 8.76362011,290.457549 C10.8478351,292.546028 13.2528614,294.29311 15.8798381,295.625659 C18.5519955,296.989834 21.2910768,297.854198 24.2346009,298.38366 C27.1318148,298.900979 30.0908697,299.077184 33.0247929,299.156532 C34.3700489,299.187029 35.715305,299.205102 37.0636954,299.211314 C38.6588291,299.223739 40.2596386,299.223739 41.8576242,299.223739 L425.540484,299.223739 C427.135646,299.223739 428.736483,299.223739 430.331306,299.211314 C431.676591,299.205102 433.021875,299.187029 434.373287,299.156532 C437.300998,299.077184 440.259488,298.900979 443.16379,298.38366 C446.10336,297.854198 448.843006,296.989834 451.515446,295.625659 C454.145247,294.29311 456.543213,292.546028 458.631721,290.457549 C460.713422,288.375565 462.460759,285.971386 463.799831,283.341585 C465.163695,280.669145 466.027494,277.930346 466.551026,274.983434 C467.07484,272.08622 467.244832,269.12773 467.324181,266.199482 C467.36089,264.854226 467.378991,263.50897 467.385203,262.163997 C467.3976,260.56234 467.3976,258.967743 467.3976,257.36634 L467.3976,41.8605045 C467.3976,40.2591303 467.3976,38.6617093 467.385203,37.0631589 C467.378991,35.7181852 467.36089,34.3729292 467.324181,33.0276732 C467.244804,30.0968562 467.07484,27.138366 466.551026,24.240305 C466.027523,21.2945218 465.163695,18.5545934 463.799831,15.882436 C462.460759,13.2526355 460.713422,10.8515625 458.631721,8.76647214 C456.543213,6.68138178 454.145247,4.93401732 451.515446,3.59807982 C448.843006,2.2375753 446.10336,1.37349398 443.16379,0.84375 C440.259516,0.323042169 437.301026,0.149943524 434.373287,0.0705948795 C433.021875,0.0338855422 431.676591,0.0189194277 430.331306,0.0093185241 C428.736483,0 427.135646,0 425.540484,0 L425.540484,0 Z\"\n />\n <path\n fill=\"#FFF\"\n d=\"M425.540484,9.97364458 L430.260429,9.98268072 C431.539044,9.99171687 432.817686,10.0055535 434.103389,10.0405685 C436.339863,10.1009977 438.956052,10.2221386 441.394682,10.659262 C443.514505,11.0410392 445.292338,11.6216114 446.998503,12.4902108 C448.682897,13.3461032 450.22613,14.4677146 451.573588,15.813253 C452.926186,17.1678276 454.049238,18.713573 454.916425,20.4166039 C455.780196,22.1094691 456.357097,23.8788592 456.736615,26.0142131 C457.172609,28.4262989 457.293185,31.0496047 457.35449,33.299887 C457.388912,34.5700301 457.405855,35.8401732 457.412095,37.1405309 C457.423956,38.7131024 457.423956,40.2848268 457.423956,41.8605045 L457.423956,257.36634 C457.423956,258.942018 457.423956,260.510919 457.411813,262.117093 C457.405855,263.386954 457.38894,264.657097 457.354207,265.929499 C457.293185,268.176393 457.172637,270.798287 456.731278,273.238893 C456.357097,275.34488 455.780506,277.114552 454.911935,278.815889 C454.047261,280.514684 452.925932,282.058735 451.579236,283.404838 C450.224125,284.76026 448.685975,285.878483 446.981561,286.742282 C445.288131,287.606645 443.513347,288.186681 441.41442,288.564477 C438.926402,289.007812 436.200593,289.1298 434.147694,289.185429 C432.85609,289.214514 431.570698,289.231994 430.253991,289.238234 C428.68478,289.250095 427.109977,289.250095 425.540512,289.250095 L41.8576242,289.250095 C41.8367282,289.250095 41.8163968,289.250095 41.7952184,289.250095 C40.2438253,289.250095 38.6893261,289.250095 37.109695,289.237952 C35.821762,289.231994 34.5366529,289.214797 33.294183,289.186559 C31.1944089,289.1298 28.4669051,289.008095 25.9991905,288.5673 C23.8822195,288.186653 22.107436,287.606645 20.391698,286.730986 C18.7033791,285.874812 17.1663592,284.757718 15.8106551,283.399755 C14.4653991,282.056758 13.3474586,280.517508 12.4830949,278.816171 C11.617884,277.116529 11.039006,275.341491 10.6583867,273.210373 C10.2184111,270.774567 10.0975527,268.163121 10.0371517,265.931476 C10.0026732,264.653709 9.98827184,263.376224 9.98008283,262.106081 L9.97387048,258.356363 L9.97387048,257.36634 L9.97387048,41.8605045 L9.97387048,40.8704819 L9.97980045,37.1286709 C9.98827184,35.8509036 10.0026732,34.5734187 10.0371517,33.2967809 C10.0975527,31.0628765 10.2184111,28.4503012 10.6620294,25.9941642 C11.0392884,23.8822477 11.617884,22.1072101 12.487613,20.3990964 C13.3451995,18.7107492 14.4651167,17.1695218 15.8174605,15.8174887 C17.1644108,14.4699736 18.7064571,13.3497741 20.4055346,12.4856928 C22.1029179,11.6213291 23.8810617,11.0410392 25.998061,10.6601092 C28.4372553,10.2218562 31.0551958,10.1009977 33.2972892,10.0402861 C34.5753389,10.0055535 35.8533886,9.99171687 37.1218373,9.9829631 L41.8576242,9.97364458 L425.540484,9.97364458\"\n />\n <g fill=\"#000\">\n <path\n d=\"M64.3701386 18.7514966C68.3721341 13.7458678 71.0878627 7.02478351 70.371607.156635919 64.5132486.44793863 57.3642463 4.02159262 53.225325 9.03114646 49.5090129 13.3210561 46.2197715 20.3235599 47.0772734 26.9037933 53.6535818 27.4742282 60.223819 23.6166698 64.3701386 18.7514966M70.2968894 28.1885919C60.7465035 27.6197101 52.6263416 33.608895 48.0655453 33.608895 43.5022358 33.608895 36.5181714 28.4752636 28.9643216 28.6136295 19.1325163 28.7580384 10.0097377 34.3170181 5.02051515 43.1584055-5.24146716 60.845529 2.31238262 87.0817206 12.2916183 101.486888 17.1377591 108.613582 22.9781865 116.460599 30.6738472 116.178727 37.9449504 115.893411 40.7949222 111.470557 49.6332599 111.470557 58.4651029 111.470557 61.032328 116.178727 68.7292313 116.036098 76.7111119 115.893383 81.7012098 108.905845 86.5472941 101.772204 92.1067256 93.6481457 94.3825633 85.8036992 94.5257015 85.3730704 94.3825351 85.2304405 79.13438 79.3808641 78.9929926 61.8407474 78.8490355 47.1541604 90.9645005 40.1684017 91.5347094 39.7351751 84.6929926 29.6162462 74.0029511 28.4752636 70.2968894 28.1885919\"\n transform=\"translate(63.226 81.89)\"\n />\n <path\n d=\"M40.5024334.459215539C61.2600389.459215539 75.7143122 14.7676399 75.7143122 35.5995958 75.7143122 56.5059305 60.9626085 70.8886771 39.9819233 70.8886771L16.9992802 70.8886771 16.9992802 107.437566.394319742 107.437566.394319742.459215539 40.5024334.459215539 40.5024334.459215539zM16.999252 56.95065L36.0523017 56.95065C50.509427 56.95065 58.7375426 49.1672539 58.7375426 35.6739463 58.7375426 22.1820789 50.509427 14.4716214 36.1266522 14.4716214L16.999252 14.4716214 16.999252 56.95065 16.999252 56.95065zM80.0528476 85.271452C80.0528476 71.6294151 90.5060291 63.2525984 109.041449 62.2144301L130.391063 60.9546222 130.391063 54.9501323C130.391063 46.2758571 124.533862 41.0864557 114.74992 41.0864557 105.480784 41.0864557 99.6979342 45.5337073 98.2908371 52.5034268L83.1673243 52.5034268C84.0567915 38.4166704 96.0657712 28.0378676 115.341929 28.0378676 134.246278 28.0378676 146.329608 38.0463014 146.329608 53.6888842L146.329608 107.437595 130.983072 107.437595 130.983072 94.6120864 130.614143 94.6120864C126.092541 103.286362 116.231396 108.771753 106.001295 108.771753 90.7290807 108.771753 80.0528476 99.2823895 80.0528476 85.271452zM130.391063 78.2287939L130.391063 72.075603 111.189256 73.2610604C101.625542 73.9288597 96.2145005 78.1544433 96.2145005 84.8267325 96.2145005 91.6463108 101.848621 96.0949742 110.448546 96.0949742 121.642437 96.0949742 130.391063 88.3845167 130.391063 78.2287939zM160.81819 136.128737L160.81819 123.154528C162.002208 123.450546 164.670553 123.450546 166.006151 123.450546 173.419179 123.450546 177.423122 120.337453 179.868388 112.331006 179.868388 112.182277 181.278337 107.586324 181.278337 107.511973L153.107705 29.4464049 170.453375 29.4464049 190.175664 92.9075589 190.470242 92.9075589 210.19256 29.4464049 227.09495 29.4464049 197.883269 111.514477C191.21386 130.420266 183.503375 136.499106 167.34175 136.499106 166.00618 136.499106 162.002236 136.350377 160.81819 136.128737z\"\n transform=\"translate(63.226 81.89) translate(112.952 7.853)\"\n />\n </g>\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"audioTitleID audioDescID\"\n>\n <title id=\"audioTitleID\">Audio icon</title>\n <desc id=\"audioDescID\">An illustration of an audio speaker.</desc>\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(10, 8)\" class=\"fill-color\">\n <path\n d=\"M19.4264564,11.8585048 L19.4264564,20.7200433 C19.4264564,22.3657576 18.8838179,23.2519114 16.8489237,23.2519114 C12.2364969,23.125318 7.75972977,23.125318 3.14730298,23.2519114 C1.24806842,23.2519114 0.569770368,22.492351 0.569770368,20.7200433 L0.569770368,2.74377955 C0.569770368,1.09806526 1.11240881,0.211911416 3.14730298,0.211911416 C7.75972977,0.338504822 12.2364969,0.338504822 16.8489237,0.211911416 C18.7481583,0.211911416 19.4264564,0.971471855 19.4264564,2.74377955 C19.2907967,5.78202131 19.4264564,8.82026306 19.4264564,11.8585048 L19.4264564,11.8585048 Z M10.0659432,2.74377955 C8.16670861,2.74377955 6.67445288,4.13630702 6.67445288,5.90861471 C6.67445288,7.6809224 8.16670861,9.07344988 10.0659432,9.07344988 C11.9651777,9.07344988 13.4574335,7.6809224 13.4574335,5.90861471 C13.4574335,4.13630702 11.8295181,2.74377955 10.0659432,2.74377955 L10.0659432,2.74377955 Z M10.0659432,11.4787246 C7.21709133,11.4787246 5.04653754,13.6308125 5.04653754,16.1626806 C5.04653754,18.8211422 7.35275094,20.8466367 10.0659432,20.8466367 C12.914795,20.8466367 15.0853488,18.6945488 15.0853488,16.1626806 C15.0853488,13.6308125 12.7791354,11.4787246 10.0659432,11.4787246 L10.0659432,11.4787246 Z\"\n ></path>\n <ellipse cx=\"10.2016028\" cy=\"16.5690777\" rx=\"1.35659611\" ry=\"1.34075134\"></ellipse>\n </g>\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"calendarTitleID calendarDescID\">\n <title id=\"calendarTitleID\">Calendar icon</title>\n <desc id=\"calendarDescID\">An illustration of a calendar</desc>\n\n <g class=\"fill-color\" fill-rule=\"evenodd\">\n <path d=\"m11.998.857v11h-11.998v-11z\" fill-rule=\"nonzero\" />\n <path d=\"m11.143 3h-10.286v8h10.286z\" fill=\"#fff\" fill-rule=\"nonzero\" />\n <path d=\"m9 0h1v1h-1z\" />\n <path d=\"m2.143 0h1v1h-1z\" />\n <path d=\"m2.143.857h1v1h-1z\" fill=\"#fff\" />\n <path d=\"m9 .857h1v1h-1z\" fill=\"#fff\" />\n <path\n d=\"m4.92342857 9.14285714v-4.2h-.678c-.02400012.1600008-.07399962.29399946-.15.402s-.16899945.19499967-.279.261-.23399931.11199987-.372.138-.28099926.03700002-.429.033v.642h1.056v2.724zm3.336 0h-.852v-2.724h-1.056v-.642c.14800074.00400002.29099931-.00699987.429-.033s.26199945-.07199967.372-.138.20299962-.15299946.279-.261.12599988-.2419992.15-.402h.678z\"\n fill-rule=\"nonzero\"\n />\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"calendarBlankTitleID calendarBlankDescID\"\n>\n <title id=\"calendarBlankTitleID\">Blank calendar page icon</title>\n <desc id=\"calendarBlankDescID\">A page-a-day calendar page without a date</desc>\n <path d=\"m6 0v1.71428571h12v-1.71428571h1.7142857v1.71428571h4.2814286v21.99999999h-23.9957143v-21.99999999h4.28571429v-1.71428571zm16.2857143 6h-20.57142859v16h20.57142859z\" class=\"fill-color\" />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"closeTitleID closeDescID\"\n>\n <title id=\"closeTitleID\">Close icon</title>\n <desc id=\"closeDescID\">A line drawing of an X</desc>\n <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\"/>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"creditCardTitleID creditCardDescID\">\n <title id=\"creditCardTitleID\">Credit card icon</title>\n <desc id=\"creditCardDescID\">An illustration of a credit card</desc>\n <g class=\"fill-color\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">\n <g fill-rule=\"nonzero\">\n <path d=\"m11.998 0v9h-11.998v-9z\" />\n <g fill=\"#fff\">\n <path d=\"m11.143 3.429h-10.286v4.714h10.286z\" />\n <path d=\"m11.143.857h-10.286v1.286h10.286z\" />\n </g>\n </g>\n <g>\n <path d=\"m8.143 6.429h1v1h-1z\" />\n <path d=\"m9.429 6.429h1v1h-1z\" />\n </g>\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"donateTitleID donateDescID\"\n>\n <title id=\"donateTitleID\">Donate icon</title>\n <desc id=\"donateDescID\">An illustration of a heart shape</desc>\n <path class=\"fill-color\" d=\"m30.0120362 11.0857287c-1.2990268-1.12627221-2.8599641-1.65258786-4.682812-1.57894699-.8253588.02475323-1.7674318.3849128-2.8262192 1.08047869-1.0587873.6955659-1.89622 1.5724492-2.512298 2.63065-.591311-1.0588196-1.4194561-1.9357029-2.4844351-2.63065-1.0649791-.69494706-2.0039563-1.05510663-2.8169316-1.08047869-1.2067699-.04950647-2.318187.17203498-3.3342513.66462439-1.0160643.4925893-1.82594378 1.2002224-2.42963831 2.1228992-.60369453.9226769-.91173353 1.9629315-.92411701 3.1207641-.03715043 1.9202322.70183359 3.7665141 2.21695202 5.5388457 1.2067699 1.4035084 2.912594 3.1606786 5.1174721 5.2715107 2.2048782 2.1108321 3.7565279 3.5356901 4.6549492 4.2745742.8253588-.6646243 2.355647-2.0647292 4.5908647-4.2003145s3.9747867-3.9171994 5.218707-5.3448422c1.502735-1.7723316 2.2355273-3.6186135 2.1983769-5.5388457-.0256957-1.7608832-.6875926-3.2039968-1.9866194-4.3302689z\"/>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"downloadTitleID downloadDescID\"\n>\n <title id=\"downloadTitleID\">Download icon</title>\n <desc id=\"downloadDescID\">An arrow pointing downward at an empty document tray</desc>\n <g class=\"fill-color\" fill-rule=\"nonzero\">\n <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\"/>\n <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\"/>\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<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>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"ellipsesTitleID ellipsesDescID\"\n>\n <title id=\"ellipsesTitleID\">Ellipses icon</title>\n <desc id=\"ellipsesDescID\">An illustration of text ellipses.</desc>\n <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\"/>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"emailTitleID emailDescID\">\n <title id=\"emailTitleID\">Email icon</title>\n <desc id=\"emailDescID\">An illustration of an envelope</desc>\n <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\" />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"facebookTitleID facebookDescID\">\n <title id=\"facebookTitleID\">Facebook icon</title>\n <desc id=\"facebookDescID\">A lowercase f</desc>\n <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\" />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 469 300\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"googlePayTitleID googlePayDescID\">\n <title id=\"googlePayTitleID\">GooglePay icon</title>\n <desc id=\"googlePayDescID\">The GooglePay logo</desc>\n <g fill=\"none\">\n <path\n d=\"m426.541557.09900471h-384.5859537c-1.6020287 0-3.2068878 0-4.8060861.00848612-1.3501196.01131483-2.6974088.02545836-4.0475283.06223154-2.9408266.07920377-5.9071271.25175484-8.811158.77506548-2.9493177.52896804-5.6948441 1.39455212-8.3724397 2.75798848-2.6351391 1.33797799-5.043843 3.08894709-7.13553773 5.1765322-2.08886428 2.09041387-3.84090626 4.49481397-5.17970411 7.13116817-1.36427179 2.6759559-2.23038625 5.4198009-2.75684798 8.3701415-.52646173 2.9050811-.69911853 5.8667364-.77837083 8.8029334-.03679572 1.3492928-.05377835 2.695757-.06226967 4.042221-.00611375 1.6010478-.00611375 3.2020954-.00611375 4.8059718v215.8811936c0 1.603877 0 3.202097.00611375 4.805973.00849132 1.346464.02547395 2.695757.06226967 4.042221.0792523 2.933368.2519091 5.897852.77837083 8.800105.52646173 2.95034 1.39257619 5.694185 2.75684798 8.372969 1.33879785 2.633526 3.09083983 5.040754 5.17970411 7.12834 2.09169473 2.090414 4.50039863 3.841383 7.13553773 5.176532 2.6775956 1.366265 5.423122 2.23185 8.3724397 2.763646 2.9040309.517653 5.8703314.693033 8.811158.772236 1.3501195.031116 2.6974087.050918 4.0475283.056575 1.5991983.011315 3.2040574.011315 4.8060861.011315h384.5859537c1.599199 0 3.204058 0 4.803256-.011315 1.347289-.005657 2.694578-.025459 4.050359-.056575 2.935166-.079203 5.901466-.254583 8.811157-.772236 2.946488-.531796 5.692014-1.397381 8.37244-2.763646 2.635139-1.335149 5.038182-3.086118 7.132707-5.176532 2.086035-2.087586 3.838077-4.494814 5.179705-7.12834 1.367102-2.678784 2.233216-5.422629 2.756848-8.372969.526462-2.902253.696288-5.866737.77554-8.800105.036796-1.346464.053778-2.695757.06227-4.042221.011322-1.603876.011322-3.202096.011322-4.805973v-215.8811936c0-1.6038764 0-3.204924-.011322-4.8059718-.008492-1.346464-.025474-2.6929282-.06227-4.042221-.079252-2.936197-.249078-5.8978523-.77554-8.8029334-.523632-2.9503406-1.389746-5.6941856-2.756848-8.3701415-1.341628-2.6363542-3.09367-5.0407543-5.179705-7.13116817-2.094525-2.08758511-4.497568-3.83855421-7.132707-5.1765322-2.680426-1.36343636-5.425952-2.22902044-8.37244-2.75798848-2.909691-.52331064-5.875991-.69586171-8.811157-.77506548-1.355781-.03677318-2.70307-.05091671-4.050359-.06223154-1.599198-.00848612-3.204057-.00848612-4.803256-.00848612\"\n fill=\"#3c4043\"\n />\n <path\n d=\"m426.541557 10.0899948 4.732495.0084861c1.279359.0084861 2.561548.0226296 3.849398.0594028 2.241708.0594028 4.865525.1810372 7.311024.6194866 2.12283.3818754 3.906007.9645889 5.615592 1.8330016 1.689772.857098 3.235192 1.9829231 4.585313 3.3293871 1.35578 1.357779 2.482295 2.9050813 3.351239 4.610791.866115 1.6972237 1.443525 3.4679938 1.825633 5.6064956.435888 2.4185437.557598 5.0464117.617037 7.3008905.036796 1.270089.053778 2.5430068.059439 3.8470403.011322 1.5755893.011322 3.14835.011322 4.726768v215.8811936c0 1.578418 0 3.151179-.011322 4.757884-.005661 1.272918-.022643 2.545836-.059439 3.821582-.059439 2.248821-.181149 4.87669-.622697 7.320692-.376448 2.110214-.953858 3.880984-1.825633 5.586695-.866115 1.70288-1.989799 3.247354-3.339919 4.596647-1.358611 1.357779-2.89837 2.477946-4.607955 3.343531-1.698263.865584-3.47578 1.448298-5.578796 1.824515-2.496448.444107-5.227821.56857-7.285551.622315-1.293511.031116-2.581361.048088-3.903177.053746-1.570893.011314-3.150279.011314-4.724003.011314h-384.5859537c-.0198131 0-.0396261 0-.0622696 0-1.5539113 0-3.1134834 0-4.6956991-.011314-1.2906803-.005658-2.5785302-.02263-3.8239236-.050917-2.1058469-.056574-4.8400513-.181037-7.3138554-.622315-2.1228296-.379046-3.9003455-.96176-5.6212527-1.838659-1.6926027-.857098-3.2323618-1.977266-4.5909726-3.337874-1.3472892-1.343635-2.4681433-2.88528-3.3342577-4.590989-.8689448-1.702882-1.449185-3.479309-1.8312943-5.614982-.4387181-2.441174-.560427-5.054898-.6226967-7.292405-.0339652-1.278574-.0481174-2.559979-.0566087-3.830068l-.00566093-3.756521v-217.8641178l.00566093-3.7480355c.0084913-1.2814039.0226435-2.5599791.0566087-3.8385543.0622697-2.2403353.1839786-4.8568884.6283576-7.3178627.3764484-2.1130435.9566886-3.8922997 1.8284639-5.6036669.8604536-1.6915663 1.984138-3.2360398 3.337088-4.5881613 1.3501196-1.3521215 2.8983699-2.4722892 4.599464-3.3378733 1.7010941-.8684127 3.4842709-1.4482975 5.6071005-1.8301729 2.4454996-.4384494 5.0693169-.5600838 7.3166859-.6194866 1.2793586-.0367732 2.5615477-.0509167 3.8324149-.0594028l4.7466469-.0084861z\"\n fill=\"#fffffe\"\n />\n <g transform=\"translate(53.778 84.906)\">\n <g fill=\"#3c4043\" transform=\"translate(158.35 8.41)\">\n <path\n d=\"m13.4306616 63.5773585v42.7212935h-13.34775628v-105.45768165h35.40057118c8.5392479-.16819407 16.8297798 3.1115903 22.8818681 9.16657685 12.1041765 11.4371967 12.8503244 30.6954178 1.4922957 43.0576819-.4974319.5045823-.9948639 1.0091644-1.4922957 1.5137466-6.217899 5.9708896-13.8451883 8.9983828-22.8818681 8.9983828zm0-49.7854447v36.8345013h22.3844362c4.9743191.1681941 9.7828276-1.8501348 13.1819457-5.4663073 6.9640468-7.316442 6.7982361-19.090027-.4145266-26.1541779-3.3991181-3.3638814-7.9589106-5.2140161-12.7674191-5.2140161zm85.3095733 17.9967654c9.8657331 0 17.6588331 2.6911052 23.3793001 7.9892184 5.720466 5.2981131 8.539248 12.6986522 8.539248 22.0334232v44.4873312h-12.767419v-10.0075469h-.580338c-5.554657 8.2415099-12.850324 12.3622639-22.0528145 12.3622639-7.7931 0-14.4255256-2.354717-19.6485607-7.064151-5.1401297-4.3730455-8.0418158-10.8485172-7.8760052-17.660377 0-7.4846361 2.8187808-13.3714286 8.3734372-17.8285714 5.5546563-4.4571429 13.0161351-6.6436658 22.3015308-6.6436658 7.9589104 0 14.4255254 1.5137466 19.5656554 4.3730458v-3.1115903c0-4.6253369-1.989728-8.9983828-5.471751-12.025876-3.564929-3.1956874-8.124721-4.9617251-12.8503246-4.9617251-7.4614787 0-13.3477564 3.1956874-17.658833 9.587062l-11.7725553-7.4846362c6.3008043-9.3347708 15.834916-14.0442048 28.5194298-14.0442048zm-17.2443063 52.3924529c0 3.5320754 1.6581063 6.8118598 4.3939818 8.8301887 2.9845915 2.3547169 6.6324255 3.6161724 10.3631649 3.5320754 5.6375617 0 11.0264077-2.2706199 15.0058627-6.3072776 4.393981-4.2048518 6.632426-9.1665768 6.632426-14.8851752-4.145267-3.3638815-9.948639-5.0458221-17.410117-4.961725-5.3888462 0-9.9486387 1.3455525-13.5964727 3.9525605-3.5649288 2.6070082-5.3888457 5.8867925-5.3888457 9.8393532z\"\n />\n <path\n d=\"m203.947 34.143-44.603 103.86h-13.762l16.581-36.33-29.266-67.53h14.509l21.141 51.804h.248l20.644-51.804z\"\n />\n </g>\n <path\n d=\"m117.808458 62.7363881c0-4.1207546-.331621-8.2415094-.994864-12.278167h-56.2927112v23.2948786h32.2501691c-1.3264851 7.4846362-5.6375617 14.2123989-11.938366 18.4172507v15.1374666h19.2340341c11.275123-10.5121296 17.741738-26.0700811 17.741738-44.5714289z\"\n fill=\"#4285f4\"\n />\n <path\n d=\"m60.5208828 121.940701c16.0836319 0 29.6801042-5.382211 39.5458372-14.632884l-19.2340341-15.1374666c-5.3888456 3.7002695-12.2699871 5.8026954-20.3118031 5.8026954-15.5862 0-28.7681456-10.6803234-33.4937488-24.9768194h-19.81437125v15.6420486c10.11444885 20.435579 30.75787325 33.302426 53.30812005 33.302426z\"\n fill=\"#34a853\"\n />\n <path\n d=\"m27.027134 72.9962264c-2.4871596-7.4846361-2.4871596-15.6420485 0-23.2107817v-15.5579515h-19.81437125c-8.53924786 17.0716981-8.53924786 37.2549866 0 54.3266847z\"\n fill=\"#fbbc04\"\n />\n <path\n d=\"m60.5208828 24.8086253c8.5392479-.168194 16.7468744 3.1115903 22.881868 9.0824798l17.0784962-17.3239891c-10.8605972-10.25983837-25.120312-15.89433972-39.9603642-15.72614565-22.5502468 0-43.1936712 12.95094345-53.30812005 33.38652285l19.81437125 15.6420486c4.7256032-14.380593 17.9075488-25.0609165 33.4937488-25.0609165z\"\n fill=\"#ea4335\"\n />\n </g>\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n class=\"ia-logo\"\n viewBox=\"0 0 27 30\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"logoTitleID logoDescID\"\n>\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\" class=\"fill-color\">\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 class=\"fill-color\" xlink:href=\"#path-1\"></use>\n <g mask=\"url(#mask-2)\" class=\"fill-color\">\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`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"imagesTitleID imagesDescID\"\n>\n <title id=\"imagesTitleID\">Images icon</title>\n <desc id=\"imagesDescID\">An illustration of two photographs.</desc>\n <path class=\"fill-color\" d=\"m20.8219178 15.3769871c0 1.1136708-.8767123 1.8932404-1.8630137 1.8932404s-1.9726027-.8909367-1.9726027-1.8932404c0-1.0023038.8767123-1.8932404 1.9726027-1.8932404.9863014 0 1.8630137.8909366 1.8630137 1.8932404zm-5.9178082-3.7864808h15.4520548v6.0138225l-1.9726028-3.3410125-2.6301369 6.3479237-2.1917809-2.67281-6.1369863 5.1228859h-2.5205479zm-1.7534247-1.6705063v14.9231892h18.8493151v-14.9231892zm-2.9589041 7.2388604c.2191781 0 1.9726028-.3341012 1.9726028-.3341012v-2.0046075l-4.1643836.5568354c.43835616 4.7887846.87671233 9.9116704 1.31506849 14.700455 6.02739731-.5568354 13.26027401-1.5591391 19.39726031-2.1159746-.1095891-.5568354-.1095891-2.0046075-.2191781-2.67281-.4383562.1113671-1.4246575 0-1.8630137.1113671v.8909367c-5.1506849.4454683-10.3013699 1.1136708-15.4520548 1.6705062.109589-.111367-.5479452-7.0161262-.9863014-10.8026071z\" fill-rule=\"evenodd\"/>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"linkTitleID linkDescID\">\n <title id=\"linkTitleID\">Link icon</title>\n <desc id=\"linkDescID\">Two chain links linked together</desc>\n <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\" />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"localPinTitleID localePinDescID\">\n <title id=\"localePinTitleID\">Locale pin icon</title>\n <desc id=\"localePinDescID\">An illustration of a map pin</desc>\n <path\n d=\"m6.30188679 0c2.37586647 0 4.30188681 1.92602032 4.30188681 4.30188679 0 1.58391098-1.43396228 4.14994872-4.30188681 7.69811321l-.3127572-.3901988c-2.65941973-3.34669534-3.98912959-5.7826668-3.98912959-7.30791441 0-2.37586647 1.92602032-4.30188679 4.30188679-4.30188679zm0 2.26415094c-1.12541043 0-2.03773585.91232542-2.03773585 2.03773585 0 1.12541044.91232542 2.03773585 2.03773585 2.03773585 1.12541044 0 2.03773585-.91232541 2.03773585-2.03773585 0-1.12541043-.91232541-2.03773585-2.03773585-2.03773585z\"\n class=\"fill-color\"\n fill-rule=\"evenodd\"\n />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"lockTitleID lockDescID\">\n <title id=\"lockTitleID\">Lock icon</title>\n <desc id=\"lockDescID\">An illustration of a lock</desc>\n <path\n d=\"m9.8480234 5.66075891v-2.17912633c-.00688261-.97492716-.37725298-1.79574705-1.11111111-2.46245966s-1.63734389-1.00632179-2.71045726-1.01882754c-1.04529617-.01250574-1.94175593.31459769-2.68937928.9813103-.74762335.66671262-1.13190232 1.4842758-1.15283692 2.45268954v2.22641369c-.04846504.00625288-.10037138.01250575-.15571902.01875862-.05534764.00625288-.09348877.00937931-.11442337.00937931-.35302046.00625288-.59362498.06917241-.72181356.18875862-.12818859.1195862-.19228288.33022987-.19228288.631931v4.73576994c0 .5030957.269999.7546436.80999699.7546436h8.36968211c.2839076 0 .491533-.0597931.6228761-.1793793s.197158-.3082145.1974448-.565885v-4.82057452c0-.25793103-.0640943-.44499615-.1922829-.56119538s-.3340933-.17755555-.6177141-.18406896c-.0415824 0-.102092-.00468965-.1815288-.01406896-.07943676-.00937931-.13306375-.01406897-.16088096-.01406897zm-1.85873446.00937931h-3.92523766c-.01376522-.12583907-.02064783-.21077393-.02064783-.25480458l-.01032391-.97154019c0-.65420686.0034413-.9813103.01032391-.9813103.00688261-.49684289.1919961-.91513405.55534047-1.2548735.36334438-.33973945.81845687-.51273561 1.36533747-.51898848.52623277-.01875862.98492995.13691187 1.37609154.46701147.39116158.3300996.60050759.74044441.62803802 1.23103443.01376522.2076475.02064783.83032946.02064783 1.86804589v.41503446z\"\n class=\"fill-color\"\n />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 18 18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"magnify-minusTitleID magnify-minusDescID\"\n>\n <title id=\"magnify-minusTitleID\">Zoom out</title>\n <desc id=\"magnify-minusDescID\">Take a look further.</desc>\n <g\n class=\"fill-color\"\n fill=\"none\"\n fill-rule=\"nonzero\"\n >\n <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\"/>\n <path d=\"m10 7.75v-1.5h-6v1.5z\"/>\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 18 18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"magnify-plusTitleID magnify-plusDescID\"\n>\n <title id=\"magnify-plusTitleID\">Zoom in</title>\n <desc id=\"magnify-plusDescID\">Take a look closer.</desc>\n <g\n class=\"fill-color\"\n fill=\"none\"\n fill-rule=\"nonzero\"\n >\n <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\"/>\n <path d=\"m7.75 4v2.25h2.25v1.5h-2.25v2.25h-1.5v-2.25h-2.25v-1.5h2.25v-2.25z\"/>\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 468 300\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"payPalTitleID payPalDescID\">\n <title id=\"payPalTitleID\">PayPal icon</title>\n <desc id=\"payPalDescID\">The PayPal logo</desc>\n <g fill=\"none\" fill-rule=\"nonzero\">\n <g>\n <path\n d=\"m426.088936 0h-384.1773743c-1.6000453 0-3.202918 0-4.8001076.0093427-1.3501283.00962581-2.6971182.02463075-4.044108.06143532-2.9377047.0795545-5.9005735.2531022-8.8015214.77516088-2.9473179.53111826-5.6899295 1.39744123-8.365531 2.76147524-2.6303624 1.33940326-5.0384885 3.09130081-7.1253898 5.18180042-2.08780603 2.09049964-3.8374226 4.49780164-5.1747992 7.13442444-1.36254076 2.6790896-2.22830126 5.4261262-2.75505234 8.3795514-.52417811 2.9055793-.6986591 5.8717446-.77782727 8.8101648-.03619117 1.348746-.05171378 2.697492-.06050711 4.0459548-.00671798 1.6026975-.00671798 3.2042625-.00671798 4.8097911v216.0649119c0 1.605529 0 3.204291.00671798 4.810103.00879333 1.348462.02431594 2.697208.06050711 4.045954.07916817 2.935844.25364916 5.90201.77782727 8.80674.52675108 2.954557 1.39251158 5.700461 2.75505234 8.379834 1.3373766 2.636623 3.08699317 5.047039 5.1747992 7.134425 2.0869013 2.093897 4.4950274 3.845511 7.1253898 5.181517 2.6756015 1.367714 5.4182131 2.23432 8.365531 2.765156 2.9009479.518661 5.8638167.695323 8.8015214.774877 1.3469898.030576 2.6939797.048696 4.044108.054924 1.5971896.012457 3.2000623.012457 4.8001076.012457h384.1773743c1.597218 0 3.200119 0 4.796997-.012457 1.347018-.006228 2.694037-.024348 4.04719-.054924 2.931485-.079554 5.893788-.256216 8.801833-.774877 2.943359-.530836 5.686536-1.397442 8.36242-2.765156 2.63319-1.336006 5.034248-3.08762 7.125447-5.181517 2.084385-2.087386 3.833973-4.497802 5.174771-7.134425 1.365622-2.679373 2.230535-5.425277 2.754741-8.379834.524489-2.90473.694701-5.870896.774152-8.80674.036756-1.348746.05488-2.697492.061101-4.045954.012412-1.605812.012412-3.204546.012412-4.810103v-216.0649119c0-1.6055286 0-3.2070936-.012412-4.8097911-.006221-1.3484628-.024345-2.6972088-.061101-4.0459548-.079479-2.9384202-.249663-5.9045855-.774152-8.8101648-.524178-2.9534252-1.389119-5.7004618-2.754741-8.3795514-1.340798-2.6366228-3.090386-5.0439248-5.174771-7.13442444-2.091199-2.09049961-4.492257-3.84239716-7.125447-5.18180042-2.675884-1.36403401-5.419061-2.23035698-8.36242-2.76147524-2.908017-.52205868-5.87032-.69560638-8.801833-.77516088-1.353153-.03680457-2.700172-.05180951-4.04719-.06143532-1.596878-.0093427-3.199779-.0093427-4.796997-.0093427z\"\n fill=\"#333\"\n />\n <path\n d=\"m426.077344 10 4.725746.0090596c1.280186.0090595 2.5604.022932 3.847682.0580377 2.239223.0605858 4.858628.1820405 7.300254.6202965 2.122429.3827662 3.902447.9648426 5.610709 1.8356924 1.686464.8581098 3.231593 1.9826271 4.580707 3.3316515 1.354261 1.358084 2.478692 2.9078342 3.346946 4.6152773.864832 1.6972511 1.442442 3.4712253 1.822427 5.6121115.43653 2.418335.557254 5.0484372.618634 7.3045496.034464 1.2734338.051428 2.5468676.057676 3.8505942.011875 1.5766458.011875 3.1524422.011875 4.7322022v216.0641685c0 1.57976 0 3.152725-.012158 4.763061-.005965 1.273151-.022901 2.546585-.057676 3.822284-.061097 2.252715-.181793 4.881401-.623695 7.328331-.374641 2.111442-.95194 3.885699-1.821579 5.591444-.865737 1.703196-1.988444 3.251248-3.336795 4.600839-1.356777 1.358933-2.896816 2.480053-4.603326 3.34609-1.695511.866603-3.472476 1.448141-5.573982 1.826916-2.491076.444484-5.220235.566788-7.275657.622561-1.293191.02916-2.580163.046685-3.898488.052942-1.57114.011891-3.147878.011891-4.719272.011891h-384.1544332c-.0209218 0-.0412781 0-.0624826 0-1.5532997 0-3.1097094 0-4.6912818-.012174-1.2895158-.005974-2.5762044-.023215-3.8202013-.051527-2.1023547-.056905-4.8332106-.178926-7.303958-.620862-2.1195728-.381634-3.8965375-.963144-5.6143841-1.841072-1.6903938-.858393-3.2293027-1.97838-4.586673-3.339861-1.3469093-1.346477-2.4662238-2.889716-3.3316498-4.59546-.8662742-1.704046-1.4458636-3.483682-1.8269507-5.620322-.4405163-2.442116-.5615233-5.060328-.6219985-7.297755-.0345209-1.281077-.0489399-2.561872-.057139-3.835306l-.00622-3.759432v-.992588-216.0641685-.9925876l.0059373-3.7515053c.0084818-1.2810777.0229008-2.5618724.0574217-3.8418177.0604752-2.239692.1814822-4.8590359.6256456-7.3215363.3777227-2.117388.9570294-3.8970244 1.8278273-5.6095635.8586405-1.6927213 1.9799341-3.2379418 3.3339398-4.5934777 1.3486057-1.3510062 2.8925472-2.474108 4.5937129-3.340428 1.6994694-.8666031 3.4797986-1.4483964 5.5993996-1.8303133 2.442192-.4393884 5.06335-.56056 7.3081989-.6214289 1.2796204-.0348226 2.5592408-.0486951 3.8292485-.0574715l4.7416072-.0093427z\"\n fill=\"#fff\"\n />\n </g>\n <g transform=\"translate(23 94)\">\n <g fill=\"#238ec2\">\n <path\n d=\"m400.83873 2.69525159-13.453417 85.59022681c-.260388 1.6582649 1.02176 3.1566421 2.69982 3.1566421h13.529554c2.241475 0 4.149469-1.6308556 4.498177-3.8449211l13.26612-84.05073558c.261911-1.65978771-1.020237-3.1596876-2.69982-3.1596876h-15.140614c-1.346103 0-2.491204.97912247-2.69982 2.30847537\"\n />\n <path\n d=\"m360.463252 61.2598709c-1.515127 8.9689446-8.635464 14.9898625-17.715569 14.9898625-4.552995 0-8.196915-1.4648768-10.540413-4.2377882-2.32218-2.7485476-3.196233-6.6635147-2.459227-11.0246449 1.413104-8.8882393 8.647647-15.1025454 17.590704-15.1025454 4.457063 0 8.075096 1.4770588 10.464277 4.2758568 2.404408 2.8185936 3.348507 6.7609701 2.660228 11.0992592zm21.875698-30.5507529h-15.696415c-1.34458 0-2.489681.9775997-2.698297 2.3069526l-.691324 4.3885396-1.096374-1.5897416c-3.40028-4.9352036-10.975917-6.5828094-18.540894-6.5828094-17.340975 0-32.1542 13.1412549-35.038271 31.5709894-1.4999 9.195833.630415 17.9820486 5.84428 24.1156494 4.789021 5.6341417 11.624605 7.9806856 19.768224 7.9806856 13.97724 0 21.731037-8.9796037 21.731037-8.9796037l-.701984 4.362653c-.261911 1.6582649 1.020237 3.1596876 2.69982 3.1596876h14.135605c2.239952 0 4.147946-1.6293329 4.498177-3.8433983l8.484713-53.7329621c.261911-1.658265-1.020237-3.1566421-2.698297-3.1566421z\"\n />\n <path\n d=\"m288.146759 31.085235c-1.792266 11.7662198-10.777961 11.7662198-19.469767 11.7662198h-4.945863l3.468805-21.9685846c.210138-1.3278301 1.355239-2.3054299 2.699819-2.3054299h2.265839c5.917372 0 11.505831 0 14.386857 3.3698259 1.723743 2.0176318 2.246043 5.0067724 1.59431 9.1379688zm-3.782489-30.69845878h-32.780046c-2.241474 0-4.149469 1.63085562-4.498177 3.84492105l-13.25546 84.05225833c-.261911 1.658265 1.020236 3.1581649 2.698297 3.1581649h16.818675c1.568423 0 2.905389-1.1420558 3.149028-2.6906834l3.759647-23.8293741c.348708-2.2140654 2.256703-3.844921 4.498177-3.844921h10.372912c21.590945 0 34.051535-10.4490488 37.308678-31.1598493 1.466399-9.0572636.059387-16.1745551-4.181447-21.15696366-4.662633-5.47729942-12.925026-8.37355282-23.890284-8.37355282z\"\n />\n </g>\n <path\n d=\"m232.141867 30.709118h-15.777119c-1.509037 0-2.920618.7491886-3.767262 1.9963134l-21.763014 32.0521756-9.223243-30.8004824c-.577118-1.9262674-2.351112-3.2480066-4.362653-3.2480066h-15.509117c-1.872971 0-3.190142 1.8425166-2.587137 3.6149871l17.372952 50.9905056-16.340533 23.0558213c-1.282148 1.809017.012182 4.312403 2.229293 4.312403h15.761892c1.493809 0 2.893208-.732439 3.742897-1.959768l52.469087-75.7243876c1.254739-1.8120618-.041114-4.2895614-2.246043-4.2895614\"\n fill=\"#253667\"\n />\n <path\n d=\"m126.667688 61.2598709c-1.51665 8.9689446-8.635464 14.9898625-17.717091 14.9898625-4.551473 0-8.195392-1.4648768-10.5388909-4.2377882-2.3221801-2.7485476-3.1962334-6.6635147-2.4592267-11.0246449 1.4131036-8.8882393 8.6461236-15.1025454 17.5891816-15.1025454 4.457063 0 8.076618 1.4770588 10.465799 4.2758568 2.404408 2.8185936 3.348507 6.7609701 2.660228 11.0992592zm21.874175-30.5507529h-15.694892c-1.346103 0-2.491204.9775997-2.699819 2.3069526l-.689802 4.3885396-1.097896-1.5897416c-3.398758-4.9352036-10.974395-6.5828094-18.539372-6.5828094-17.3409749 0-32.1541994 13.1412549-35.0382709 31.5709894-1.4998999 9.195833.6304148 17.9820486 5.8427572 24.1156494 4.7905433 5.6341417 11.6261277 7.9806856 19.7697467 7.9806856 13.97724 0 21.729514-8.9796037 21.729514-8.9796037l-.700461 4.362653c-.261911 1.6582649 1.020237 3.1596876 2.69982 3.1596876h14.134082c2.241475 0 4.149469-1.6293329 4.498177-3.8433983l8.486236-53.7329621c.261911-1.658265-1.020237-3.1566421-2.69982-3.1566421z\"\n fill=\"#253667\"\n />\n <path\n d=\"m54.3511949 31.085235c-1.7922661 11.7662198-10.7794836 11.7662198-19.4697665 11.7662198h-4.9458629l3.4688041-21.9685846c.2101382-1.3278301 1.3537167-2.3054299 2.698297-2.3054299h2.2673614c5.9158488 0 11.5058311 0 14.3868571 3.3698259 1.7237428 2.0176318 2.246043 5.0067724 1.5943098 9.1379688zm-3.7840114-30.69845878h-32.7800457c-2.2399521 0-4.1494693 1.63085562-4.498177 3.84492105l-13.2554605 84.05225833c-.26038871 1.658265 1.02023648 3.1581649 2.69981982 3.1581649h15.65073208c2.2414748 0 4.1494693-1.6308556 4.498177-3.8449211l3.5769186-22.6751364c.3502304-2.2140654 2.2582249-3.844921 4.4996997-3.844921h10.371389c21.5924676 0 34.0530573-10.4490488 37.3102003-31.1598493 1.4648769-9.0572636.0593869-16.1745551-4.1829696-21.15696366-4.6611102-5.47729942-12.9235029-8.37355282-23.8902837-8.37355282z\"\n fill=\"#253667\"\n />\n </g>\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"pinterestTitleID pinterestDescID\">\n <title id=\"pinterestTitleID\">Pinterest icon</title>\n <desc id=\"pinterestDescID\">A stylized letter p</desc>\n <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\" />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 18 18\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"searchTitleID searchDescID\"\n>\n <title id=\"searchTitleID\">Search icon</title>\n <desc id=\"searchDescID\">Search for something.</desc>\n <path\n class=\"fill-color\"\n fill=\"none\"\n 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\" />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"shareTitleID shareDescID\"\n>\n <title id=\"shareTitleID\">Share icon</title>\n <desc id=\"shareDescID\">A square with an arrow arcing out from the center of the square</desc>\n <g class=\"fill-color\">\n <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\"/>\n <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\"/>\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"softwareTitleID softwareDescID\"\n>\n <title id=\"softwareTitleID\">Software icon</title>\n <desc id=\"softwareDescID\">An illustration of a 3.5\" floppy disk.</desc>\n <path class=\"fill-color\" d=\"m32 30.6900373v-21.44521088c0-.82988428-.4156786-1.24482642-1.2470357-1.24482642h-21.50592858c-.83135715 0-1.24703572.4221795-1.24703572 1.26653851v21.44521089c0 .8588337.41567857 1.2882506 1.24703572 1.2882506h21.48327168c.8458575 0 1.2687863-.4366542 1.2687863-1.3099627zm-5.9950155-20.4410268v6.114667c0 .6694561-.3428744 1.0041841-1.0286232 1.0041841h-10.1294464c-.2622159 0-.4773054-.0802141-.6452685-.2406423s-.2519447-.3642806-.2519447-.6115572v-6.1363791l.0217506-.1311772h12.0326259zm-4.9437353.8295827v5.0010178h3.0405558v-5.0010178zm-9.7134658 18.8035735v-7.753025c0-.5241057.1604108-.9025595.4812325-1.1353613.1897138-.1453504.4011782-.2180256.6343932-.2180256h14.7451099c.3208217 0 .5905898.1091636.8093044.3274907s.3280719.5023936.3280719.8521995v7.8181612l-.0217506.1094652h-16.9772676z\"/>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"textsTitleID textsDescID\"\n>\n <title id=\"textsTitleID\">Texts icon</title>\n <desc id=\"textsDescID\">An illustration of an open book.</desc>\n <path class=\"fill-color\" d=\"m10.3323235 11.0007023h6.9060825c.8851083 0 1.5847122.3064258 2.0988114.9192774v14.4324451h-.6460032c-.1435563-.120323-.3528315-.2434552-.6278257-.3693964-.2749942-.1259413-.5201585-.2191097-.7354929-.2795053l-.3048241-.1081503h-5.7042647c-.3108832 0-.5621067-.0601615-.7536705-.1804846-.0717781-.0599274-.1256117-.1439663-.1615008-.2521166-.0358891-.1081502-.0598928-.2043619-.0720112-.2886348v-13.8741368zm19.1752505 0v13.603761c-.0717781.3361555-.2211606.5943584-.4481473.7746089-.0717781.0599274-.1733862.1079162-.304824.1439663-.1314379.0360501-.2451643.0601615-.3411793.0723343h-5.5965975c-.9568865.2640552-1.5068748.5164059-1.649965.757052h-.6634817v-14.4324451c.5140992-.6128516 1.2076439-.9192774 2.0806339-.9192774h6.92426zm1.3814961.6489017-.1796783 15.2976474c-.0955489 0-1.0342578.0119386-2.8161268.035816-1.7818691.0238773-3.3006293.0898911-4.5562806.1980414-1.2556514.1081503-1.9613144.2884008-2.1169891.5407514-.0955488.1924233-.5439291.273419-1.345141.2429871-.8012118-.0304319-1.3155441-.1776755-1.5429969-.4417308-.334654-.3843783-3.4558378-.5765674-9.36355164-.5765674v-15.3875385l-.96830576.3960828v16.2702977c6.4096947-.2041278 9.7760429-.0840388 10.0990445.3602669.2391051.276228.9864833.414342 2.2421347.414342.1915638 0 .4187835-.0210682.6816593-.0632047s.4810068-.0870821.6543929-.1348367c.1733862-.0477547.2719646-.0838048.2957353-.1081503.0838965-.1563732.9599161-.2675666 2.6280587-.3335805 1.6681426-.0660138 3.3213703-.0931684 4.9596831-.0814638l2.4392915.0182591v-16.2344816z\"/>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"tocTitleID tocDescID\"\n>\n <title id=\"tocTitleID\">Table of contents icon</title>\n <desc id=\"tocDescID\">An illustration of three text list items</desc>\n <g class=\"fill-color\" fill-rule=\"evenodd\"><rect height=\"3\" rx=\"1.5\" width=\"18\" x=\"6\"/><rect height=\"3\" rx=\"1.5\" width=\"18\" x=\"6\" y=\"21\"/><rect height=\"3\" rx=\"1.5\" width=\"18\" x=\"6\" y=\"14\"/><rect height=\"3\" rx=\"1.5\" width=\"18\" x=\"6\" y=\"7\"/><rect height=\"3\" rx=\"1.5\" width=\"4\"/><rect height=\"3\" rx=\"1.5\" width=\"4\" y=\"21\"/><rect height=\"3\" rx=\"1.5\" width=\"4\" y=\"14\"/><rect height=\"3\" rx=\"1.5\" width=\"4\" y=\"7\"/></g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"tumblrTitleID tumblrDescID\">\n <title id=\"tumblrTitleID\">Tumblr icon</title>\n <desc id=\"tumblrDescID\">A lowercase letter t</desc>\n <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\" />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\" aria-labelledby=\"twitterTitleID twitterDescID\">\n <title id=\"twitterTitleID\">Twitter icon</title>\n <desc id=\"twitterDescID\">The Twitter logo, a cartoon bird</desc>\n <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\" />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 41\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"uploadTitleID uploadDescID\"\n>\n <title id=\"uploadTitleID\">Upload icon</title>\n <desc id=\"uploadDescID\">An illustration of a horizontal line over an up pointing arrow.</desc>\n <path class=\"fill-color\" d=\"m20 12.8 8 10.4h-4.8v8.8h-6.4v-8.8h-4.8zm12-4.8v3.2h-24v-3.2z\" fill-rule=\"evenodd\"/>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"userTitleID userDescID\"\n>\n <title id=\"userTitleID\">User icon</title>\n <desc id=\"userDescID\">An illustration of a person's head and chest.</desc>\n <path class=\"fill-color\" d=\"m20.7130435 18.0434783c-3.5658385 0-6.4565218-2.9198821-6.4565218-6.5217392 0-3.60185703 2.8906833-6.5217391 6.4565218-6.5217391s6.4565217 2.91988207 6.4565217 6.5217391c0 3.6018571-2.8906832 6.5217392-6.4565217 6.5217392zm-12.9130435 16.9565217c0-7.9240855 5.7813665-14.3478261 12.9130435-14.3478261s12.9130435 6.4237406 12.9130435 14.3478261z\" fill-rule=\"evenodd\"/>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 449 300\" aria-labelledby=\"venmoTitleID venmoDescID\">\n <title id=\"venmoTitleID\">Venmo icon</title>\n <desc id=\"venmoDescID\">The Venmo logo</desc>\n <g fill=\"none\">\n <rect width=\"448.934\" height=\"299.289\" fill=\"#3D95CE\" rx=\"29.929\" />\n <path\n fill=\"#FFF\"\n d=\"M314.253648,95.768518 C314.253648,140.505629 276.917862,198.622312 246.615405,239.43135 L177.402732,239.43135 L149.644594,69.6528784 L210.247869,63.767475 L224.923984,184.575771 C238.636763,161.724586 255.559021,125.813905 255.559021,101.330492 C255.559021,87.9291341 253.314515,78.8010611 249.806862,71.285106 L304.995473,59.8578376 C311.376749,70.6382477 314.253648,81.742087 314.253648,95.768518 Z\"\n />\n </g>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"videoTitleID videoDescID\"\n>\n <title id=\"videoTitleID\">Video icon</title>\n <desc id=\"videoDescID\">An illustration of two cells of a film strip.</desc>\n <path class=\"fill-color\" d=\"m31.0117647 12.0677966c0 .4067797-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711864-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067797-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711864-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711865-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.3898305c0 .4067797-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711864-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711865-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.2711865-.7058823-.6779661v-.6779661c0-.4067797.2823529-.6779661.7058823-.6779661h1.2705883c.4235294 0 .7058823.2711864.7058823.6779661zm-4.0941176-10.440678c0 .5423729-.4235295.9491525-.9882353.9491525h-11.5764706c-.5647059 0-.9882353-.4067796-.9882353-.9491525v-6.9152542c0-.5423729.4235294-.9491526.9882353-.9491526h11.5764706c.5647058 0 .9882353.4067797.9882353.9491526zm-.1411765 11.2542373c0 .5423729-.4235294.9491525-.9882353.9491525h-11.5764706c-.5647059 0-.9882353-.4067796-.9882353-.9491525v-6.9152542c0-.5423729.4235294-.9491526.9882353-.9491526h11.5764706c.5647059 0 .9882353.4067797.9882353.9491526zm-14.9647059-17.220339c0 .4067797-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711864-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067797-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711864-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711865-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.3898305c0 .4067797-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711864-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711865-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm0 3.2542373c0 .4067796-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.2711865-.70588236-.6779661v-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661zm20.0470588-20.4745763h-.8470588v.27118644.6779661c0 .40677966-.2823529.6779661-.7058823.6779661h-1.2705883c-.4235294 0-.7058823-.27118644-.7058823-.6779661v-.6779661-.27118644h-16.5176471v.27118644.6779661c0 .40677966-.2823529.6779661-.7058823.6779661h-1.27058828c-.42352941 0-.70588236-.27118644-.70588236-.6779661v-.6779661-.27118644h-1.12941176v24h1.12941176v-.2711864-.6779661c0-.4067797.28235295-.6779661.70588236-.6779661h1.27058828c.4235294 0 .7058823.2711864.7058823.6779661v.6779661.2711864h16.6588235v-.2711864-.6779661c0-.4067797.282353-.6779661.7058824-.6779661h1.2705882c.4235294 0 .7058824.2711864.7058824.6779661v.6779661.2711864h.8470588v-24z\" fill-rule=\"evenodd\"/>\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"visualAdjustmentTitleID visualAdjustmentDescID\"\n>\n <title id=\"visualAdjustmentTitleID\">Visual adjustment</title>\n <desc id=\"visualAdjustmentDescID\">A circle with its left hemisphere filled</desc>\n <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\" />\n</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 22 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"volumesTitleID volumesDescID\"\n>\n <title id=\"volumesTitleID\">Volumes icon</title>\n <desc id=\"volumesDescID\">Three books stacked on each other</desc>\n <path class=\"fill-color\" 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</svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n<svg\n viewBox=\"0 0 40 40\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"webTitleID webDescID\"\n>\n <title id=\"webTitleID\">Web icon</title>\n <desc id=\"webDescID\">An illustration of a computer application window</desc>\n <path class=\"fill-color\" d=\"m8 28.7585405v-8.1608108-9.3577297h24v9.3577297 8.1608108zm14.2702703-15.8863783h-12.43243246v2.6114594h12.43243246zm7.7837838 14.0365946v-7.0727027-1.8497838h-20.21621626v1.8497838 7.0727027zm-3.7837838-14.0365946h-2.7027027v2.6114594h2.7027027zm4 0h-2.7027027v2.6114594h2.7027027z\" fill-rule=\"evenodd\"/>\n</svg>\n`;\n","import { LitElement, html, css } from 'lit-element';\nimport advance from '@internetarchive/icon-advance';\nimport applePay from '@internetarchive/icon-applepay';\nimport audio from '@internetarchive/icon-audio';\nimport calendar from '@internetarchive/icon-calendar';\nimport calendarBlank from '@internetarchive/icon-calendar-blank';\nimport close from '@internetarchive/icon-close';\nimport collapseSidebar from '@internetarchive/icon-collapse-sidebar';\nimport creditCard from '@internetarchive/icon-credit-card';\nimport donate from '@internetarchive/icon-donate';\nimport download from '@internetarchive/icon-dl';\nimport editPencil from '@internetarchive/icon-edit-pencil';\nimport ellipses from '@internetarchive/icon-ellipses';\nimport email from '@internetarchive/icon-email';\nimport facebook from '@internetarchive/icon-facebook';\nimport googlePay from '@internetarchive/icon-googlepay';\nimport iaLogo from '@internetarchive/icon-ia-logo';\nimport images from '@internetarchive/icon-images';\nimport link from '@internetarchive/icon-link';\nimport localePin from '@internetarchive/icon-locale-pin';\nimport lock from '@internetarchive/icon-lock';\nimport magnifyMinus from '@internetarchive/icon-magnify-minus';\nimport magnifyPlus from '@internetarchive/icon-magnify-plus';\nimport paypal from '@internetarchive/icon-paypal';\nimport pinterest from '@internetarchive/icon-pinterest';\nimport search from '@internetarchive/icon-search';\nimport share from '@internetarchive/icon-share';\nimport software from '@internetarchive/icon-software';\nimport texts from '@internetarchive/icon-texts';\nimport toc from '@internetarchive/icon-toc';\nimport tumblr from '@internetarchive/icon-tumblr';\nimport twitter from '@internetarchive/icon-twitter';\nimport upload from '@internetarchive/icon-upload';\nimport user from '@internetarchive/icon-user';\nimport venmo from '@internetarchive/icon-venmo';\nimport video from '@internetarchive/icon-video';\nimport visualAdjustment from '@internetarchive/icon-visual-adjustment';\nimport volumes from '@internetarchive/icon-volumes';\nimport web from '@internetarchive/icon-web';\n\nconst iconTemplates = {\n applePay,\n advance,\n audio,\n calendar,\n calendarBlank,\n close,\n collapseSidebar,\n creditCard,\n donate,\n download,\n editPencil,\n ellipses,\n email,\n facebook,\n googlePay,\n iaLogo,\n images,\n link,\n localePin,\n lock,\n magnifyMinus,\n magnifyPlus,\n paypal,\n pinterest,\n search,\n share,\n software,\n texts,\n toc,\n tumblr,\n twitter,\n upload,\n user,\n venmo,\n video,\n visualAdjustment,\n volumes,\n web,\n};\n\nclass IAIcon extends LitElement {\n static get properties() {\n return {\n icon: { type: String },\n };\n }\n\n static get styles() {\n return css`\n svg {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n constructor() {\n super();\n this.icon = '';\n }\n\n render() {\n return iconTemplates[this.icon] || html``;\n }\n}\n\nexport default IAIcon;\n","/**\n * Configuration to show a modal\n *\n * @export\n * @class ModalConfig\n */\nexport class ModalConfig {\n constructor(options) {\n var _a, _b, _c, _d, _e;\n this.title = options === null || options === void 0 ? void 0 : options.title;\n this.subtitle = options === null || options === void 0 ? void 0 : options.subtitle;\n this.headline = options === null || options === void 0 ? void 0 : options.headline;\n this.message = options === null || options === void 0 ? void 0 : options.message;\n this.headerColor = (_a = options === null || options === void 0 ? void 0 : options.headerColor) !== null && _a !== void 0 ? _a : '#55A183';\n this.showProcessingIndicator = (_b = options === null || options === void 0 ? void 0 : options.showProcessingIndicator) !== null && _b !== void 0 ? _b : false;\n this.processingImageMode = (_c = options === null || options === void 0 ? void 0 : options.processingImageMode) !== null && _c !== void 0 ? _c : 'complete';\n this.showCloseButton = (_d = options === null || options === void 0 ? void 0 : options.showCloseButton) !== null && _d !== void 0 ? _d : true;\n this.closeOnBackdropClick = (_e = options === null || options === void 0 ? void 0 : options.closeOnBackdropClick) !== null && _e !== void 0 ? _e : true;\n }\n}\n//# sourceMappingURL=modal-config.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { LitElement, html, css } from 'lit-element';\n\nconst IAActivityIndicatorMode = Object.freeze({\n processing: 'processing',\n complete: 'complete',\n});\n\nclass IAActivityIndicator extends LitElement {\n static get properties() {\n return {\n mode: { type: String },\n };\n }\n\n constructor() {\n super();\n this.mode = IAActivityIndicatorMode.processing;\n }\n\n render() {\n return html`\n <div class=\"${this.mode}\">\n <svg\n viewBox=\"0 0 120 120\"\n preserveAspectRatio=\"none\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n aria-labelledby=\"indicatorTitle indicatorDescription\"\n >\n <title id=\"indicatorTitle\">Activity Indicator</title>\n <desc id=\"indicatorDescription\">\n A rotating activity indicator with three dots in the middle.\n </desc>\n <g\n id=\"icons/check-ring---squared\"\n stroke=\"none\"\n stroke-width=\"1\"\n fill=\"none\"\n fill-rule=\"evenodd\"\n >\n <path\n id=\"completed-ring\"\n class=\"loaded-indicator\"\n 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\"\n ></path>\n <polygon\n id=\"check\"\n class=\"loaded-indicator\"\n transform=\"translate(75.000000, 41.500000) rotate(44.000000) translate(-75.000000, -41.500000) \"\n points=\"96 85 54 85 54 65 76 64.999 76 -2 96 -2\"\n ></polygon>\n <path\n id=\"activity-ring\"\n class=\"activity-indicator\"\n 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\"\n ></path>\n <g\n id=\"activity-dots\"\n class=\"activity-indicator\"\n transform=\"translate(40.000000, 55.000000)\"\n >\n <circle id=\"left-dot\" cx=\"5\" cy=\"5\" r=\"5\"></circle>\n <circle id=\"middle-dot\" cx=\"20\" cy=\"5\" r=\"5\"></circle>\n <circle id=\"right-dot\" cx=\"35\" cy=\"5\" r=\"5\"></circle>\n </g>\n </g>\n </svg>\n </div>\n `;\n }\n\n static get styles() {\n const checkmarkColorCss = css`var(--activityIndicatorCheckmarkColor, #31A481)`;\n const completedRingColorCss = css`var(--activityIndicatorCompletedRingColor, #31A481)`;\n const loadingRingColorCss = css`var(--activityIndicatorLoadingRingColor, #333333)`;\n const loadingDotColorCss = css`var(--activityIndicatorLoadingDotColor, #333333)`;\n\n return css`\n #completed-ring {\n fill: ${completedRingColorCss};\n }\n\n #check {\n fill: ${checkmarkColorCss};\n }\n\n #activity-ring {\n fill: ${loadingRingColorCss};\n }\n\n #activity-dots {\n fill: ${loadingDotColorCss};\n }\n\n .activity-indicator {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n\n .processing .activity-indicator {\n opacity: 1;\n }\n\n .loaded-indicator {\n opacity: 1;\n transition: opacity 0.25s ease-out;\n }\n\n .processing .loaded-indicator {\n opacity: 0;\n }\n\n .image {\n border: 1px solid red;\n display: inline-block;\n }\n\n .processing #activity-ring {\n animation: rotate 1.3s infinite linear;\n transform-origin: 50px 50px;\n transform-box: fill-box;\n }\n\n .processing #left-dot {\n opacity: 0;\n animation: dot 1.3s infinite;\n animation-delay: 0.2s;\n }\n\n .processing #middle-dot {\n opacity: 0;\n animation: dot 1.3s infinite;\n animation-delay: 0.4s;\n }\n\n .processing #right-dot {\n opacity: 0;\n animation: dot 1.3s infinite;\n animation-delay: 0.6s;\n }\n\n @keyframes rotate {\n 0% {\n transform: rotate(-360deg);\n }\n }\n\n @keyframes dot {\n 0% {\n opacity: 0;\n }\n 25% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n `;\n }\n}\n\nexport { IAActivityIndicator, IAActivityIndicatorMode };\n","import { IAActivityIndicator } from './src/ia-activity-indicator.js';\n\nwindow.customElements.define('ia-activity-indicator', IAActivityIndicator);\n","import { html } from 'lit-html';\n\nexport default html`\n <svg\n viewBox=\"0 0 40 40\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"closeTitleID closeDescID\"\n >\n <title id=\"closeTitleID\">Close icon</title>\n <desc id=\"closeDescID\">A line drawing of an X</desc>\n <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\"/>\n </svg>\n`;\n","import { html } from 'lit-html';\n\nexport default html`\n <svg\n class=\"ia-logo\"\n viewBox=\"0 0 27 30\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"logoTitleID logoDescID\"\n >\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\" class=\"fill-color\">\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 class=\"fill-color\" xlink:href=\"#path-1\"></use>\n <g mask=\"url(#mask-2)\" class=\"fill-color\">\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`;\n","import { __decorate } from \"tslib\";\nimport { LitElement, html, css, customElement, property, } from 'lit-element';\nimport '@internetarchive/ia-activity-indicator/ia-activity-indicator';\nimport closeIcon from '@internetarchive/icon-close';\nimport iaLogo from '@internetarchive/icon-ia-logo';\nimport { ModalConfig } from './modal-config';\nlet ModalTemplate = class ModalTemplate extends LitElement {\n constructor() {\n super(...arguments);\n /**\n * The ModalConfig that displayed the template\n *\n * @type {ModalConfig}\n * @memberof ModalTemplate\n */\n this.config = new ModalConfig();\n }\n /** @inheritdoc */\n render() {\n return html `\n <div class=\"modal-wrapper\">\n <div class=\"modal-container\">\n <header style=\"background-color: ${this.config.headerColor}\">\n ${this.config.showCloseButton ? this.closeButtonTemplate : ''}\n <div class=\"logo-icon\">\n ${iaLogo}\n </div>\n ${this.config.title\n ? html `<h1 class=\"title\">${this.config.title}</h1>`\n : ''}\n ${this.config.subtitle\n ? html `<h2 class=\"subtitle\">${this.config.subtitle}</h2>`\n : ''}\n </header>\n <section class=\"modal-body\">\n <div class=\"content\">\n <div\n class=\"processing-logo ${this.config.showProcessingIndicator\n ? ''\n : 'hidden'}\"\n >\n <ia-activity-indicator\n .mode=${this.config.processingImageMode}\n ></ia-activity-indicator>\n </div>\n\n ${this.config.headline\n ? html ` <h1 class=\"headline\">${this.config.headline}</h1> `\n : ''}\n ${this.config.message\n ? html ` <p class=\"message\">${this.config.message}</p> `\n : ''}\n\n <div class=\"slot-container\">\n <slot> </slot>\n </div>\n </div>\n </section>\n </div>\n </div>\n `;\n }\n /**\n * Dispatch the `closeButtonPressed` event to the consumer\n *\n * @private\n * @memberof ModalTemplate\n */\n handleCloseButton() {\n const event = new Event('closeButtonPressed');\n this.dispatchEvent(event);\n }\n /**\n * The close button template\n *\n * @readonly\n * @private\n * @type {TemplateResult}\n * @memberof ModalTemplate\n */\n get closeButtonTemplate() {\n return html `\n <button\n type=\"button\"\n class=\"close-button\"\n tabindex=\"0\"\n @click=${this.handleCloseButton}\n >\n ${closeIcon}\n </button>\n `;\n }\n /** @inheritdoc */\n static get styles() {\n const modalLogoSize = css `var(--modalLogoSize, 6.5rem)`;\n const processingImageSize = css `var(--processingImageSize, 7.5rem)`;\n const modalCornerRadius = css `var(--modalCornerRadius, 1rem)`;\n const modalBorder = css `var(--modalBorder, 2px solid black)`;\n // if the content of the modal is too big to fit on screen, this sets the bottom margin\n // it's not exact, but a close estimation\n const modalBottomMarginCss = css `var(--modalBottomMargin, 2.5rem)`;\n const modalTopMarginCss = css `var(--modalTopMargin, 5rem)`;\n const modalHeaderBottomPaddingCss = css `var(--modalHeaderBottomPadding, 0.5em)`;\n const modalBottomPadding = css `var(--modalBottomPadding, 2rem)`;\n const scrollOffset = css `var(--modalScrollOffset, 5px)`;\n const titleFontSize = css `var(--modalTitleFontSize, 1.8rem)`;\n const subtitleFontSize = css `var(--modalSubtitleFontSize, 1.4rem)`;\n const headlineFontSize = css `var(--modalHeadlineFontSize, 1.6rem)`;\n const messageFontSize = css `var(--modalMessageFontSize, 1.4rem)`;\n const titleLineHeight = css `var(--modalTitleLineHeight, normal)`;\n const subtitleLineHeight = css `var(--modalSubtitleLineHeight, normal)`;\n const headlineLineHeight = css `var(--modalHeadlineLineHeight, normal)`;\n const messageLineHeight = css `var(--modalMessageLineHeight, normal)`;\n return css `\n .processing-logo {\n margin: auto;\n width: ${processingImageSize};\n height: ${processingImageSize};\n }\n\n .processing-logo.hidden {\n height: 1rem;\n }\n\n .processing-logo.hidden ia-activity-indicator {\n display: none;\n }\n\n .modal-wrapper {\n outline: none;\n }\n\n .modal-container {\n border-radius: ${modalCornerRadius};\n width: 100%;\n margin-top: ${modalTopMarginCss};\n }\n\n header {\n position: relative;\n background-color: #36a483;\n color: white;\n border-radius: calc(${modalCornerRadius}) calc(${modalCornerRadius}) 0 0;\n border: ${modalBorder};\n border-bottom: 0;\n text-align: center;\n padding-bottom: ${modalHeaderBottomPaddingCss};\n }\n\n .title {\n margin: 0;\n padding: 0;\n font-size: ${titleFontSize};\n font-weight: bold;\n line-height: ${titleLineHeight};\n }\n\n .subtitle {\n margin: 0;\n padding: 0;\n font-weight: normal;\n padding-top: 0;\n font-size: ${subtitleFontSize};\n line-height: ${subtitleLineHeight};\n }\n\n .modal-body {\n background-color: #f5f5f7;\n border-radius: 0 0 calc(${modalCornerRadius}) calc(${modalCornerRadius});\n border: ${modalBorder};\n border-top: 0;\n padding: 0 1rem calc(${modalBottomPadding} - ${scrollOffset}) 1rem;\n color: #333;\n margin-bottom: 2.5rem;\n min-height: 5rem;\n }\n\n .content {\n overflow-y: auto;\n max-height: calc(100vh - (16.5rem + ${modalBottomMarginCss}));\n min-height: 5rem;\n padding: 0 0 calc(${scrollOffset}) 0;\n }\n\n .headline {\n font-size: ${headlineFontSize};\n font-weight: bold;\n text-align: center;\n line-height: ${headlineLineHeight};\n margin: 0;\n padding: 0;\n }\n\n .message {\n margin: 1rem 0 0 0;\n text-align: center;\n font-size: ${messageFontSize};\n line-height: ${messageLineHeight};\n }\n\n .logo-icon {\n border-radius: 100%;\n border: 3px solid #fff;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),\n 0 2px 2px 0 rgba(0, 0, 0, 0.08);\n width: ${modalLogoSize};\n height: ${modalLogoSize};\n margin: -2.9rem auto 0.5rem auto;\n background-color: black;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .logo-icon svg {\n width: calc(${modalLogoSize} * 0.65);\n height: calc(${modalLogoSize} * 0.65);\n }\n\n .logo-icon svg .fill-color {\n fill: white;\n }\n\n .logo-icon svg .stroke-color {\n stroke: red;\n }\n\n .close-button {\n position: absolute;\n right: 1.2rem;\n top: 1.2rem;\n width: 2rem;\n height: 2rem;\n border-radius: 100%;\n border: 0;\n padding: 0;\n cursor: pointer;\n background-color: white;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18),\n 0 4px 4px 0 rgba(0, 0, 0, 0.08);\n }\n `;\n }\n};\n__decorate([\n property({ type: Object })\n], ModalTemplate.prototype, \"config\", void 0);\nModalTemplate = __decorate([\n customElement('modal-template')\n], ModalTemplate);\nexport { ModalTemplate };\n//# sourceMappingURL=modal-template.js.map","/**\n * Various modes the modal can be in\n *\n * @export\n * @enum {number}\n */\nexport var ModalManagerMode;\n(function (ModalManagerMode) {\n ModalManagerMode[\"Open\"] = \"open\";\n ModalManagerMode[\"Closed\"] = \"closed\";\n})(ModalManagerMode || (ModalManagerMode = {}));\n//# sourceMappingURL=modal-manager-mode.js.map","import { throttle } from 'throttle-debounce';\nimport { ModalManagerMode } from './modal-manager-mode';\n/**\n * The `ModalManagerHostBridge` is a bridge between the `ModalManager` and the\n * host that sets up environment-specific changes when the modal opens and closes.\n *\n * For instance, when the modal opens, this adds a class to the `<body>` tag for styling\n * and adds a `resize` listener to fix a Safari shadow root issue.\n *\n * Consumers can create their own `ModalManagerHostBridgeInterface` classes and pass\n * them into the `ModalManager` if this one does not work for their environment.\n *\n * @export\n * @class ModalManagerHostBridge\n * @implements {ModalManagerHostBridgeInterface}\n */\nexport class ModalManagerHostBridge {\n constructor(modalManager) {\n this.windowResizeThrottler = throttle(100, false, this.updateModalContainerHeight).bind(this);\n this.modalManager = modalManager;\n }\n /**\n * Handle the mode change\n *\n * @private\n * @memberof ModalManager\n */\n handleModeChange(mode) {\n switch (mode) {\n case ModalManagerMode.Open:\n this.startResizeListener();\n this.stopDocumentScroll();\n break;\n case ModalManagerMode.Closed:\n this.stopResizeListener();\n this.resumeDocumentScroll();\n break;\n }\n }\n // This is a workaround for Safari. Safari does not update shadowRoot elements calculated\n // based on the viewport size (ie. `calc(100vh - 10px)`). It does an initial calculation correctly,\n // but resizing the window does not cause the calculation to update. Firefox and Chrome both handle\n // this correctly.\n // It doesn't matter what css variable you set, it is just forcing Safari to do an update.\n // Also note that the value has to change on each update for Safari to do the update,\n // ie. you can't just set a static value.\n updateModalContainerHeight() {\n this.modalManager.style.setProperty('--containerHeight', `${window.innerHeight}px`);\n }\n stopDocumentScroll() {\n document.body.classList.add('modal-manager-open');\n }\n resumeDocumentScroll() {\n document.body.classList.remove('modal-manager-open');\n }\n startResizeListener() {\n window.addEventListener('resize', this.windowResizeThrottler);\n }\n stopResizeListener() {\n window.removeEventListener('resize', this.windowResizeThrottler);\n }\n}\n//# sourceMappingURL=modal-manager-host-bridge.js.map","import { __awaiter, __decorate } from \"tslib\";\nimport { LitElement, html, css, customElement, property, query, } from 'lit-element';\nimport './modal-template';\nimport { ModalManagerHostBridge } from './modal-manager-host-bridge';\nimport { ModalManagerMode } from './modal-manager-mode';\nlet ModalManager = class ModalManager extends LitElement {\n constructor() {\n super(...arguments);\n /**\n * The current mode of the ModalManager\n *\n * Current options are `modal` or `closed`\n *\n * @type {ModalManagerMode}\n * @memberof ModalManager\n */\n this.mode = ModalManagerMode.Closed;\n /**\n * Thie hostBridge handles environmental-specific interactions such as adding classes\n * to the body tag or event listeners needed to support the modal manager in the host environment.\n *\n * There is a default `ModalManagerHostBridge`, but consumers can override it with a custom\n * `ModalManagerHostBridgeInterface`\n *\n * @type {ModalManagerHostBridgeInterface}\n * @memberof ModalManager\n */\n this.hostBridge = new ModalManagerHostBridge(this);\n /**\n * Whether the modal should close if the user taps on the backdrop\n *\n * @private\n * @memberof ModalManager\n */\n this.closeOnBackdropClick = true;\n }\n /** @inheritdoc */\n render() {\n return html `\n <div class=\"container\">\n <div class=\"backdrop\" @click=${this.backdropClicked}></div>\n <modal-template\n @closeButtonPressed=${this.closeButtonPressed}\n tabindex=\"0\"\n >\n ${this.customModalContent}\n </modal-template>\n </div>\n `;\n }\n /** @inheritdoc */\n getMode() {\n return this.mode;\n }\n /** @inheritdoc */\n closeModal() {\n this.mode = ModalManagerMode.Closed;\n }\n /**\n * Call the userClosedModalCallback and reset it if it exists\n *\n * @private\n * @memberof ModalManager\n */\n callUserClosedModalCallback() {\n // we assign the callback to a temp var and undefine it before calling it\n // otherwise, we run into the potential for an infinite loop if the\n // callback triggers another `showModal()`, which would execute `userClosedModalCallback`\n const callback = this.userClosedModalCallback;\n this.userClosedModalCallback = undefined;\n if (callback)\n callback();\n }\n /** @inheritdoc */\n showModal(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.closeOnBackdropClick = options.config.closeOnBackdropClick;\n this.userClosedModalCallback = options.userClosedModalCallback;\n this.modalTemplate.config = options.config;\n this.customModalContent = options.customModalContent;\n this.mode = ModalManagerMode.Open;\n yield this.modalTemplate.updateComplete;\n this.modalTemplate.focus();\n });\n }\n /** @inheritdoc */\n updated(changed) {\n /* istanbul ignore else */\n if (changed.has('mode')) {\n this.handleModeChange();\n }\n }\n /**\n * Called when the backdrop is clicked\n *\n * @private\n * @memberof ModalManager\n */\n backdropClicked() {\n if (this.closeOnBackdropClick) {\n this.closeModal();\n this.callUserClosedModalCallback();\n }\n }\n /**\n * Handle the mode change\n *\n * @private\n * @memberof ModalManager\n */\n handleModeChange() {\n this.hostBridge.handleModeChange(this.mode);\n this.emitModeChangeEvent();\n }\n /**\n * Emit a modeChange event\n *\n * @private\n * @memberof ModalManager\n */\n emitModeChangeEvent() {\n const event = new CustomEvent('modeChanged', {\n detail: { mode: this.mode },\n });\n this.dispatchEvent(event);\n }\n /**\n * Called when the modal close button is pressed. Closes the modal.\n *\n * @private\n * @memberof ModalManager\n */\n closeButtonPressed() {\n this.closeModal();\n this.callUserClosedModalCallback();\n }\n /** @inheritdoc */\n static get styles() {\n const modalBackdropColor = css `var(--modalBackdropColor, rgba(10, 10, 10, 0.9))`;\n const modalBackdropZindex = css `var(--modalBackdropZindex, 1000)`;\n const modalWidth = css `var(--modalWidth, 32rem)`;\n const modalMaxWidth = css `var(--modalMaxWidth, 95%)`;\n const modalZindex = css `var(--modalZindex, 2000)`;\n return css `\n .container {\n width: 100%;\n height: 100%;\n }\n\n .backdrop {\n position: fixed;\n top: 0;\n left: 0;\n background-color: ${modalBackdropColor};\n width: 100%;\n height: 100%;\n z-index: ${modalBackdropZindex};\n }\n\n modal-template {\n outline: 0;\n position: fixed;\n top: 0;\n left: 50%;\n transform: translate(-50%, 0);\n z-index: ${modalZindex};\n width: ${modalWidth};\n max-width: ${modalMaxWidth};\n }\n `;\n }\n};\n__decorate([\n property({ type: String, reflect: true })\n], ModalManager.prototype, \"mode\", void 0);\n__decorate([\n property({ type: Object })\n], ModalManager.prototype, \"customModalContent\", void 0);\n__decorate([\n property({ type: Object })\n], ModalManager.prototype, \"hostBridge\", void 0);\n__decorate([\n query('modal-template')\n], ModalManager.prototype, \"modalTemplate\", void 0);\nModalManager = __decorate([\n customElement('modal-manager')\n], ModalManager);\nexport { ModalManager };\n//# sourceMappingURL=modal-manager.js.map","import { css, html, LitElement } from \"lit-element\";\nimport { nothing } from \"lit-html\";\nimport { IAMenuSlider } from \"@internetarchive/ia-menu-slider\";\nimport IAIcon from \"@internetarchive/ia-icons\";\nimport { ModalConfig } from \"@internetarchive/modal-manager\";\n\nexport default class ItemNavigator extends LitElement {\n static get properties() {\n return {\n baseHost: { type: String },\n item: {\n type: Object,\n converter(value) {\n return !value ? {} : JSON.parse(atob(value));\n },\n },\n itemType: { type: String },\n menuShortcuts: {\n type: Array,\n hasChanged(newVal, oldVal) {\n if (newVal !== oldVal) {\n return true;\n }\n return false;\n },\n },\n menuOpened: { type: Boolean },\n menuContents: { type: Array },\n openMenu: { type: String },\n signedIn: {\n type: Boolean,\n converter: (arg) => {\n if (typeof (arg) === 'boolean') {\n return arg;\n }\n return arg === 'true';\n },\n },\n viewportInFullscreen: { type: Boolean },\n };\n }\n\n constructor() {\n /** TODO: Request BookModel.js\n * Request BookNavigator.js\n * Show loading spinner\n * When JS assets loaded:\n * - render book-navigator component\n */\n super();\n this.baseHost = 'archive.org';\n this.item = {};\n this.itemType = '';\n this.menuOpened = false;\n this.signedIn = false;\n this.menuShortcuts = [];\n this.menuContents = [];\n this.viewportInFullscreen = false;\n this.openMenu = '';\n this.renderModalManager();\n }\n\n showItemNavigatorModal({ detail }) {\n this.modal.showModal({\n config: this.modalConfig,\n customModalContent: detail.customModalContent,\n });\n }\n\n closeItemNavigatorModal() {\n this.modal.closeModal();\n }\n\n /**\n * Event handler - handles viewport slot going into fullscreen\n * @param {Event} e - custom event object\n */\n manageViewportFullscreen({ detail }) {\n const { isFullScreen } = detail;\n this.viewportInFullscreen = isFullScreen;\n }\n\n /**\n * Event handler - handles viewport slot going into fullscreen\n * @param {Event} e - custom event object\n * @param {object} event.detail - custom event detail\n * @param {string} detail.action - open, toggle, close\n * @param {string} detail.menuId - menu id to be shown\n */\n manageSideMenuEvents({ detail }) {\n const { action = '', menuId = '' } = detail;\n if (menuId) {\n if (action === 'open') {\n this.openShortcut(menuId);\n } else if (action === 'toggle') {\n this.openMenu = menuId;\n this.toggleMenu();\n }\n }\n }\n\n toggleMenu() {\n this.menuOpened = !this.menuOpened;\n }\n\n closeMenu() {\n this.menuOpened = false;\n }\n\n /**\n * Opens menu to selected menu\n * @param {string} selectedMenuId\n */\n openShortcut(selectedMenuId = '') {\n // open sidemenu to proper tab\n this.openMenu = selectedMenuId;\n this.menuOpened = true;\n }\n\n setOpenMenu({ detail }) {\n const { id } = detail;\n this.openMenu = id === this.openMenu ? '' : id;\n }\n\n setMenuContents({ detail }) {\n this.menuContents = [...detail];\n }\n\n setMenuShortcuts({ detail }) {\n this.menuShortcuts = [...detail];\n }\n\n /**\n * computes classes for item-navigator <section> node\n */\n get menuClass() {\n const drawerState = this.menuOpened ? 'open' : '';\n const fullscreenState = this.viewportInFullscreen ? 'fullscreen' : '';\n return `${drawerState} ${fullscreenState}`;\n }\n\n get menuToggleButton() {\n return html`\n <button class=\"toggle-menu\" @click=${this.toggleMenu.bind(this)}>\n <div>\n <ia-icon icon=\"ellipses\" style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon>\n </div>\n </button>\n `;\n }\n\n get menuSlider() {\n return html`\n <div id=\"menu\">\n <ia-menu-slider\n .menus=${this.menuContents}\n .open=${true}\n .selectedMenu=${this.openMenu}\n @menuTypeSelected=${this.setOpenMenu}\n @menuSliderClosed=${this.closeMenu}\n ?manuallyHandleClose=${true}\n ?animateMenuOpen=${false}\n ></ia-menu-slider>\n </div>\n `;\n }\n\n /**\n * Returns the shortcut buttons for minimized view\n * @return html\n */\n get shortcuts() {\n // todo: aria tags\n const shortcuts = this.menuShortcuts.map(({\n icon,\n id,\n }) => html`\n <button class=\"shortcut ${id}\" @click=\"${(e) => { this.openShortcut(id); }}\">\n ${icon}\n </button>\n `);\n\n return html`<div class=\"shortcuts\">${shortcuts}</div>`;\n }\n\n /**\n * Returns the side menu given it's open/close state\n * @return html\n */\n get renderSideMenu() {\n // todo: aria tags\n return html`\n <nav>\n <div class=\"minimized\">\n ${this.shortcuts}\n ${this.menuToggleButton}\n </div>\n ${this.menuSlider}\n </nav>\n `;\n }\n\n /**\n * Given a itemType, this chooses the proper viewport component\n * @return html\n */\n get renderViewport() {\n if (this.itemType === 'bookreader') {\n return html`\n <book-navigator\n .baseHost=${this.baseHost}\n .book=${this.item}\n ?signedIn=${this.signedIn}\n ?sideMenuOpen=${this.menuOpened}\n @ViewportInFullScreen=${this.manageViewportFullscreen}\n @updateSideMenu=${this.manageSideMenuEvents}\n @menuUpdated=${this.setMenuContents}\n @menuShortcutsUpdated=${this.setMenuShortcuts}\n @showItemNavigatorModal=${this.showItemNavigatorModal}\n @closeItemNavigatorModal=${this.closeItemNavigatorModal}\n >\n <div slot=\"bookreader\">\n <slot name=\"bookreader\"></slot>\n </div>\n </book-navigator>\n `;\n }\n return html`<div class=\"viewport\"></div>`;\n }\n\n renderModalManager() {\n this.modal = document.createElement('modal-manager');\n this.modal.setAttribute('id', 'item-navigator-modal');\n this.modalConfig = new ModalConfig();\n this.modalConfig.title = 'Delete Bookmark';\n this.modalConfig.headline = 'This bookmark contains a note. Deleting it will permanently delete the note. Are you sure?';\n this.modalConfig.headerColor = '#194880';\n document.body.appendChild(this.modal);\n }\n\n render() {\n const renderMenu = this.menuContents.length || this.menuShortcuts.length;\n return html`\n <div id=\"frame\" class=${this.menuClass}>\n <slot name=\"item-nav-header\"></slot>\n <div class=\"menu-and-reader\">\n ${renderMenu ? this.renderSideMenu : nothing}\n <div id=\"reader\">\n ${this.renderViewport}\n </div>\n </div>\n </div>\n `;\n }\n\n static get styles() {\n const subnavWidth = css`var(--menuWidth, 320px)`;\n const tabletPlusQuery = css`@media (min-width: 640px)`;\n const transitionTiming = css`var(--animationTiming, 200ms)`;\n const transitionEffect = css`transform ${transitionTiming} ease-out`;\n\n return css`\n #frame {\n position: relative;\n overflow: hidden;\n }\n\n #frame.fullscreen,\n #frame.fullscreen #reader {\n height: 100vh;\n }\n\n button {\n cursor: pointer;\n padding: 0;\n border: 0;\n }\n\n button:focus,\n button:active {\n outline: none;\n }\n\n .menu-and-reader {\n position: relative;\n }\n\n nav button {\n background: none;\n }\n\n nav .minimized {\n background: rgba(0, 0, 0, .7);\n border-bottom-right-radius: 5%;\n position: absolute;\n padding-top: .6rem;\n left: 0;\n width: 4rem;\n z-index: 2;\n }\n\n nav .minimized button {\n width: var(--iconWidth);\n height: var(--iconHeight);\n margin: auto;\n display: inline-flex;\n vertical-align: middle;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: center;\n justify-content: center;\n width: 4rem;\n height: 4rem;\n }\n\n nav .minimized button.toggle-menu > * {\n border: 2px solid var(--iconStrokeColor);\n border-radius: var(--iconWidth);\n width: var(--iconWidth);\n height: var(--iconHeight);\n margin: auto;\n }\n\n #menu {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n z-index: 3;\n overflow: hidden;\n transform: translateX(-${subnavWidth});\n width: ${subnavWidth};\n transform: translateX(calc(${subnavWidth} * -1));\n transition: ${transitionEffect};\n }\n\n #reader {\n position: relative;\n z-index: 1;\n transition: ${transitionEffect};\n transform: translateX(0);\n width: 100%;\n }\n\n .open #menu {\n width: ${subnavWidth};\n transform: translateX(0);\n transition: ${transitionEffect};\n }\n\n ${tabletPlusQuery} {\n .open #reader {\n transition: ${transitionEffect};\n transform: translateX(${subnavWidth});\n width: calc(100% - ${subnavWidth});\n }\n }\n\n #loading-indicator {\n display: none;\n }\n\n #loading-indicator.visible {\n display: block;\n }\n `;\n }\n}\n\ncustomElements.define('ia-icon', IAIcon);\ncustomElements.define('ia-menu-slider', IAMenuSlider);\ncustomElements.define('item-navigator', ItemNavigator);\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nimport { isPrimitive } from '../lib/parts.js';\nimport { directive, NodePart } from '../lit-html.js';\n// For each part, remember the value that was last rendered to the part by the\n// unsafeHTML directive, and the DocumentFragment that was last set as a value.\n// The DocumentFragment is used as a unique key to check if the last value\n// rendered to the part was with unsafeHTML. If not, we'll always re-render the\n// value passed to unsafeHTML.\nconst previousValues = new WeakMap();\n/**\n * Renders the result as HTML, rather than text.\n *\n * Note, this is unsafe to use with any user-provided input that hasn't been\n * sanitized or escaped, as it may lead to cross-site-scripting\n * vulnerabilities.\n */\nexport const unsafeHTML = directive((value) => (part) => {\n if (!(part instanceof NodePart)) {\n throw new Error('unsafeHTML can only be used in text bindings');\n }\n const previousValue = previousValues.get(part);\n if (previousValue !== undefined && isPrimitive(value) &&\n value === previousValue.value && part.value === previousValue.fragment) {\n return;\n }\n const template = document.createElement('template');\n template.innerHTML = value; // innerHTML casts to string internally\n const fragment = document.importNode(template.content, true);\n part.setValue(fragment);\n previousValues.set(part, { value, fragment });\n});\n//# sourceMappingURL=unsafe-html.js.map","import { nothing } from 'lit-html';\nimport { html, LitElement } from 'lit-element';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html';\n\nexport class BookSearchResult extends LitElement {\n static get properties() {\n return {\n match: { type: Object },\n };\n }\n\n constructor() {\n super();\n\n this.matchRegex = new RegExp('{{{(.+?)}}}', 'g');\n }\n\n createRenderRoot() {\n return this;\n }\n\n highlightedHit(hit) {\n return html`\n <p>${unsafeHTML(hit.replace(this.matchRegex, '<mark>$1</mark>'))}</p>\n `;\n }\n\n resultSelected() {\n this.dispatchEvent(new CustomEvent('resultSelected', {\n bubbles: true,\n composed: true,\n detail: {\n match: this.match,\n },\n }));\n }\n\n render() {\n const { match } = this;\n const { par = [] } = match;\n const [resultDetails = {}] = par;\n const pageNumber = Number.isInteger(resultDetails.page)\n ? html`<p class=\"page-num\">Page -${resultDetails.page}-</p>` : nothing;\n const coverImage = html`<img src=\"${match.cover}\" />`;\n return html`\n <li @click=${this.resultSelected}>\n ${match.cover ? coverImage : nothing}\n <h4>${match.title || nothing}</h4>\n ${pageNumber}\n ${this.highlightedHit(match.text)}\n </li>\n `;\n }\n}\ncustomElements.define('book-search-result', BookSearchResult);\n","import { css } from 'lit-element';\n\n// Original SVG object for reference\n// <svg height=\"10\" viewBox=\"0 0 13 10\" width=\"13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m4.33333333 10-4.33333333-4.16666667 1.73333333-1.66666666 2.6 2.5 6.93333337-6.66666667 1.7333333 1.66666667z\" fill=\"#fff\" fill-rule=\"evenodd\"/></svg>\n\nexport default css`data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwIiB2aWV3Qm94PSIwIDAgMTMgMTAiIHdpZHRoPSIxMyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNC4zMzMzMzMzMyAxMC00LjMzMzMzMzMzLTQuMTY2NjY2NjcgMS43MzMzMzMzMy0xLjY2NjY2NjY2IDIuNiAyLjUgNi45MzMzMzMzNy02LjY2NjY2NjY3IDEuNzMzMzMzMyAxLjY2NjY2NjY3eiIgZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+`;\n","import { css } from 'lit-element';\n\nexport default css`data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNDAgNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgYXJpYS1sYWJlbGxlZGJ5PSJjbG9zZVRpdGxlSUQgY2xvc2VEZXNjSUQiPjxwYXRoIGQ9Ik0yOS4xOTIgMTAuODA4YTEuNSAxLjUgMCAwMTAgMi4xMkwyMi4xMjIgMjBsNy4wNyA3LjA3MmExLjUgMS41IDAgMDEtMi4xMiAyLjEyMWwtNy4wNzMtNy4wNy03LjA3IDcuMDdhMS41IDEuNSAwIDAxLTIuMTIxLTIuMTJsNy4wNy03LjA3My03LjA3LTcuMDdhMS41IDEuNSAwIDAxMi4xMi0yLjEyMUwyMCAxNy44NzhsNy4wNzItNy4wN2ExLjUgMS41IDAgMDEyLjEyMSAweiIgY2xhc3M9ImZpbGwtY29sb3IiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==`;\n","/* eslint-disable class-methods-use-this */\nimport { nothing } from 'lit-html';\nimport { css, html, LitElement } from 'lit-element';\nimport '@internetarchive/ia-activity-indicator/ia-activity-indicator';\nimport './a-search-result.js';\nimport checkmarkIcon from '../assets/icon_checkmark.js';\nimport closeIcon from '../assets/icon_close.js';\n\n\nexport class IABookSearchResults extends LitElement {\n static get properties() {\n return {\n results: { type: Array },\n query: { type: String },\n queryInProgress: { type: Boolean },\n renderHeader: { type: Boolean },\n renderSearchAllFiles: { type: Boolean },\n displayResultImages: { type: Boolean },\n errorMessage: { type: String },\n };\n }\n\n constructor() {\n super();\n\n this.results = [];\n this.query = '';\n this.queryInProgress = false;\n this.renderHeader = false;\n this.renderSearchAllFields = false;\n this.displayResultImages = false;\n this.errorMessage = '';\n\n this.bindBookReaderListeners();\n }\n\n /** @inheritdoc */\n updated() {\n this.focusOnInputIfNecessary();\n }\n\n bindBookReaderListeners() {\n document.addEventListener('BookReader:SearchCallback', this.setResults.bind(this));\n }\n\n /**\n * Provide immediate input focus if there aren't any results displayed\n */\n focusOnInputIfNecessary() {\n if (this.results.length) {\n return;\n }\n const searchInput = this.shadowRoot.querySelector('input[type=\\'search\\']');\n searchInput.focus();\n }\n\n setResults({ detail }) {\n this.results = detail.results;\n }\n\n setQuery(e) {\n this.query = e.currentTarget.value;\n }\n\n performSearch(e) {\n e.preventDefault();\n const input = e.currentTarget.querySelector('input[type=\"search\"]');\n if (!input || !input.value) {\n return;\n }\n this.dispatchEvent(new CustomEvent('bookSearchInitiated', {\n bubbles: true,\n composed: true,\n detail: {\n query: this.query,\n },\n }));\n }\n\n selectResult() {\n this.dispatchEvent(new CustomEvent('closeMenu', {\n bubbles: true,\n composed: true,\n }));\n }\n\n cancelSearch() {\n this.queryInProgress = false;\n this.dispatchSearchCanceled();\n }\n\n dispatchSearchCanceled() {\n this.dispatchEvent(new CustomEvent('bookSearchCanceled', {\n bubbles: true,\n composed: true,\n }));\n }\n\n get resultsCount() {\n const count = this.results.length;\n return count ? html`<p>(${count} result${count > 1 ? 's' : ''})</p>` : nothing;\n }\n\n get headerSection() {\n const header = html`<header>\n <h3>Search inside</h3>\n ${this.resultsCount}\n </header>`;\n return this.renderHeader ? header : nothing;\n }\n\n get searchMultipleControls() {\n const controls = html`\n <input name=\"all_files\" id=\"all_files\" type=\"checkbox\" />\n <label class=\"checkbox\" for=\"all_files\">Search all files</label>\n `;\n return this.renderSearchAllFiles ? controls : nothing;\n }\n\n get loadingIndicator() {\n return html`\n <div class=\"loading\">\n <ia-activity-indicator mode=\"processing\"></ia-activity-indicator>\n <p>Searching</p>\n </div>\n `;\n }\n\n get resultsSet() {\n const resultsClass = this.displayResultImages ? 'show-image' : '';\n return html`\n <ul class=\"results ${resultsClass}\">\n ${this.results.map(match => html`\n <book-search-result\n .match=${match}\n @resultSelected=${this.selectResult}\n ></book-search-result>\n `)}\n </ul>\n `;\n }\n\n get searchForm() {\n return html`\n <form action=\"\" method=\"get\" @submit=${this.performSearch}>\n <fieldset>\n ${this.searchMultipleControls}\n <input\n type=\"search\"\n name=\"query\"\n alt=\"Search inside this book.\"\n @keyup=${this.setQuery}\n .value=${this.query}\n />\n </fieldset>\n </form>\n `;\n }\n\n get setErrorMessage() {\n return html`\n <p class=\"error-message\">${this.errorMessage}</p>\n `;\n }\n\n get searchCTA() {\n return html`<p class=\"search-cta\"><em>Please enter text to search for</em></p>`;\n }\n\n render() {\n const showSearchCTA = (!this.queryInProgress && !this.errorMessage)\n && (!this.queryInProgress && !this.results.length);\n return html`\n ${this.headerSection}\n ${this.searchForm}\n <div class=\"results-container\">\n ${this.queryInProgress ? this.loadingIndicator : nothing}\n ${this.errorMessage ? this.setErrorMessage : nothing}\n ${this.results.length ? this.resultsSet : nothing}\n ${showSearchCTA ? this.searchCTA : nothing}\n </div>\n `;\n }\n\n static get styles() {\n const searchResultText = css`var(--searchResultText, #adaedc)`;\n const searchResultBg = css`var(--searchResultBg, #272958)`;\n const searchResultBorder = css`var(--searchResultBorder, #adaedc)`;\n const activeButtonBg = css`(--tertiaryBGColor, #333)`;\n\n return css`\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: ${searchResultText};\n background: ${searchResultBg};\n border: 1px solid ${searchResultBorder};\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('${checkmarkIcon}');\n }\n\n label.checkbox[for=\"all_files\"]:after {\n background: ${activeButtonBg} 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('${closeIcon}') 0 0 no-repeat;\n mask: url('${closeIcon}') 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 .loading button {\n -webkit-appearance: none;\n appearance: none;\n padding: .5rem .7rem;\n font: normal 1.4rem \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n border: 1px solid #656565;\n border-radius: 3px;\n cursor: pointer;\n background: transparent;\n }\n\n ia-activity-indicator {\n display: block;\n width: 40px;\n height: 40px;\n margin: 0 auto;\n }\n `;\n }\n}\ncustomElements.define('ia-book-search-results', IABookSearchResults);\n","import { html } from 'lit-element';\nimport { nothing } from 'lit-html';\n\nimport './search-results';\n\nlet searchState = {\n query: '',\n results: [],\n resultsCount: 0,\n queryInProgress: false,\n errorMessage: '',\n};\nexport default class {\n constructor(onSearchChange = () => {}, brInstance) {\n /* search menu events */\n this.onBookSearchInitiated = this.onBookSearchInitiated.bind(this);\n /* bookreader search events */\n this.onSearchStarted = this.onSearchStarted.bind(this);\n this.onSearchRequestError = this.onSearchRequestError.bind(this);\n this.onSearchResultsClicked = this.onSearchResultsClicked.bind(this);\n this.onSearchResultsChange = this.onSearchResultsChange.bind(this);\n this.onSearchResultsCleared = this.onSearchResultsCleared.bind(this);\n /* class methods */\n this.bindEventListeners = this.bindEventListeners.bind(this);\n this.getMenuDetails = this.getMenuDetails.bind(this);\n this.getComponent = this.getComponent.bind(this);\n this.advanceToPage = this.advanceToPage.bind(this);\n this.updateMenu = this.updateMenu.bind(this);\n\n this.onSearchChange = onSearchChange;\n this.bookreader = brInstance;\n this.icon = html`<ia-icon icon=\"search\" style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon>`;\n this.label = 'Search inside';\n this.menuDetails = this.getMenuDetails();\n this.id = 'search';\n this.component = this.getComponent();\n this.bindEventListeners();\n }\n\n getMenuDetails() {\n const { resultsCount, query, queryInProgress } = searchState;\n if (queryInProgress || !query) { return nothing }\n const unit = resultsCount === 1 ? 'result' : 'results';\n return html`(${resultsCount} ${unit})`;\n }\n\n bindEventListeners() {\n window.addEventListener('BookReader:SearchStarted', this.onSearchStarted);\n window.addEventListener('BookReader:SearchCallback', this.onSearchResultsChange);\n window.addEventListener('BookReader:SearchCallbackEmpty', (event) => { this.onSearchRequestError(event, 'noResults') });\n window.addEventListener('BookReader:SearchCallbackNotIndexed', (event) => { this.onSearchRequestError(event, 'notIndexed') });\n window.addEventListener('BookReader:SearchCallbackError', (event) => { this.onSearchRequestError(event) });\n window.addEventListener('BookReader:SearchResultsCleared', () => { this.onSearchResultsCleared() });\n }\n\n onSearchStarted(e) {\n const { term = '' } = e.detail.props;\n searchState.query = term;\n searchState.results = [];\n searchState.resultsCount = 0;\n searchState.queryInProgress = true;\n searchState.errorMessage = '';\n this.updateMenu();\n }\n\n onBookSearchInitiated({ detail }) {\n searchState.query = detail.query;\n this.bookreader.search(searchState.query);\n }\n\n onSearchRequestError(event, errorType = 'default') {\n const { detail: { props = {} } } = event;\n const { instance = null } = props;\n if (instance) {\n /* keep bookreader instance reference up-to-date */\n this.bookreader = instance;\n }\n const errorMessages = {\n noResults: '0 results',\n 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!`,\n default: 'Sorry, there was an error with your search. The text may still be processing.',\n };\n\n const messageToShow = errorMessages[errorType] ?? errorMessages.default;\n searchState.results = [];\n searchState.resultsCount = 0;\n searchState.queryInProgress = false;\n searchState.errorMessage = html`<p class=\"error\">${messageToShow}</p>`;\n this.updateMenu();\n }\n\n onSearchResultsChange({ detail: { props = {} } }) {\n const { instance = null, results: searchResults = [] } = props;\n if (instance) {\n /* keep bookreader instance reference up-to-date */\n this.bookreader = instance;\n }\n const results = searchResults.matches || [];\n const resultsCount = results.length;\n const query = searchResults.q;\n const queryInProgress = false;\n searchState = { results, resultsCount, query, queryInProgress, errorMessage: '' };\n this.updateMenu();\n }\n\n onSearchResultsCleared() {\n searchState = {\n query: '',\n results: [],\n resultsCount: 0,\n queryInProgress: false,\n errorMessage: '',\n }\n this.updateMenu();\n this.bookreader?.searchView?.clearSearchFieldAndResults();\n }\n\n updateMenu() {\n this.menuDetails = this.getMenuDetails();\n this.component = this.getComponent();\n this.onSearchChange(this.bookreader);\n }\n\n getComponent() {\n const { query, results, queryInProgress, errorMessage } = searchState;\n return html`\n <ia-book-search-results\n .query=${query}\n .results=${results}\n .errorMessage=${errorMessage}\n ?queryInProgress=${queryInProgress}\n ?renderSearchAllFiles=${false}\n @resultSelected=${this.onSearchResultsClicked}\n @bookSearchInitiated=${this.onBookSearchInitiated}\n @bookSearchResultsCleared=${this.onSearchResultsCleared}\n ></ia-book-search-results>\n `;\n }\n\n onSearchResultsClicked({ detail }) {\n const page = detail.match.par[0].page;\n this.advanceToPage(page);\n }\n\n advanceToPage(leaf) {\n const page = this.bookreader.leafNumToIndex(leaf);\n this.bookreader._searchPluginGoToResult(page);\n this.bookreader.updateSearchHilites();\n }\n}\n","import { css, html, LitElement } from 'lit-element';\nimport { nothing } from 'lit-html';\nexport class IABookDownloads extends LitElement {\n static get properties() {\n return {\n downloads: { type: Array },\n expiration: { type: Number },\n renderHeader: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.downloads = [];\n this.expiration = 0;\n this.renderHeader = false;\n }\n\n get formatsCount() {\n const count = this.downloads.length;\n return count ? html`<p>${count} format${count > 1 ? 's' : ''}</p>` : html``;\n }\n\n get loanExpiryMessage() {\n return this.expiration\n ? html`<h2>These files will expire in ${this.expiration} days.</h2>`\n : html``;\n }\n\n renderDownloadOptions() {\n return this.downloads.map(option => (\n html`\n <li>\n <a class=\"button\" href=\"${option.url}\">Get ${option.type}</a>\n ${option.note ? html`<p>${option.note}</p>` : html``}\n </li>\n `\n ));\n }\n\n get header() {\n if (!this.renderHeader) {\n return nothing;\n }\n return html`\n <header>\n <h3>Downloadable files</h3>\n ${this.formatsCount}\n </header>\n `;\n }\n\n render() {\n return html`\n ${this.header}\n ${this.loanExpiryMessage}\n <ul>${this.renderDownloadOptions()}</ul>\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=\"button external\" href=\"https://www.adobe.com/solutions/ebook/digital-editions/download.html\" rel=\"noopener noreferrer\" target=\"_blank\">Install Adobe Digital Editions</a>\n `;\n }\n\n static get styles() {\n return css`\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 .button {\n color: var(--primaryTextColor);\n background: var(--primaryCTAFill);\n border: 1px solid var(--primaryCTABorder);\n display: inline-block;\n padding: .6rem 1rem;\n font-size: 1.4rem;\n text-decoration: none;\n text-shadow: 1px 1px #484848;\n border-radius: 4px;\n }\n\n .button.external {\n background: var(--secondaryCTAFill, transparent);\n border: 1px solid var(--secondaryCTABorder, #999);\n text-shadow: none;\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 \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 `;\n }\n}\n","import { html } from 'lit-element';\n\n/* register subpanel */\nimport { IABookDownloads } from './downloads';\ncustomElements.define('ia-book-downloads', IABookDownloads);\n\nlet downloads = [];\nconst menuBase = {\n pdf: {\n type: 'Encrypted Adobe PDF',\n url: '#',\n note: 'PDF files contain high quality images of pages.',\n },\n epub: {\n type: 'Encrypted Adobe ePub',\n url: '#',\n note: 'ePub files are smaller in size, but may contain errors.',\n }\n};\n\nexport default class {\n constructor() {\n this.icon = html`<ia-icon icon=\"download\" style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon>`;\n this.label = 'Downloadable files';\n this.menuDetails = '';\n this.id = 'downloads';\n this.component = '';\n\n this.computeAvailableTypes = this.computeAvailableTypes.bind(this);\n this.update = this.update.bind(this);\n }\n\n\n update(downloadTypes) {\n this.computeAvailableTypes(downloadTypes);\n this.component = this.menu;\n\n const ending = downloads.length === 1 ? '' : 's';\n this.menuDetails = `(${downloads.length} format${ending})`;\n }\n\n /**\n * Generates Download Menu Info for available types\n * sets global `downloads`\n * @param availableTypes\n */\n computeAvailableTypes(availableTypes = []) {\n const menuData = availableTypes.reduce((found, incoming = [], index) => {\n const [ type = '', link = '' ] = incoming;\n const formattedType = type.toLowerCase();\n const downloadOption = menuBase[formattedType] || null;\n if (downloadOption) {\n const menuInfo = Object.assign({}, downloadOption, { url: link });\n found.push(menuInfo);\n }\n return found;\n }, []);\n\n downloads = menuData;\n }\n\n\n get menu () {\n return html`<ia-book-downloads .downloads=${downloads}></ia-book-downloads>`;\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nimport { createMarker, directive, NodePart, removeNodes, reparentNodes } from '../lit-html.js';\n// Helper functions for manipulating parts\n// TODO(kschaaf): Refactor into Part API?\nconst createAndInsertPart = (containerPart, beforePart) => {\n const container = containerPart.startNode.parentNode;\n const beforeNode = beforePart === undefined ? containerPart.endNode :\n beforePart.startNode;\n const startNode = container.insertBefore(createMarker(), beforeNode);\n container.insertBefore(createMarker(), beforeNode);\n const newPart = new NodePart(containerPart.options);\n newPart.insertAfterNode(startNode);\n return newPart;\n};\nconst updatePart = (part, value) => {\n part.setValue(value);\n part.commit();\n return part;\n};\nconst insertPartBefore = (containerPart, part, ref) => {\n const container = containerPart.startNode.parentNode;\n const beforeNode = ref ? ref.startNode : containerPart.endNode;\n const endNode = part.endNode.nextSibling;\n if (endNode !== beforeNode) {\n reparentNodes(container, part.startNode, endNode, beforeNode);\n }\n};\nconst removePart = (part) => {\n removeNodes(part.startNode.parentNode, part.startNode, part.endNode.nextSibling);\n};\n// Helper for generating a map of array item to its index over a subset\n// of an array (used to lazily generate `newKeyToIndexMap` and\n// `oldKeyToIndexMap`)\nconst generateMap = (list, start, end) => {\n const map = new Map();\n for (let i = start; i <= end; i++) {\n map.set(list[i], i);\n }\n return map;\n};\n// Stores previous ordered list of parts and map of key to index\nconst partListCache = new WeakMap();\nconst keyListCache = new WeakMap();\n/**\n * A directive that repeats a series of values (usually `TemplateResults`)\n * generated from an iterable, and updates those items efficiently when the\n * iterable changes based on user-provided `keys` associated with each item.\n *\n * Note that if a `keyFn` is provided, strict key-to-DOM mapping is maintained,\n * meaning previous DOM for a given key is moved into the new position if\n * needed, and DOM will never be reused with values for different keys (new DOM\n * will always be created for new keys). This is generally the most efficient\n * way to use `repeat` since it performs minimum unnecessary work for insertions\n * and removals.\n *\n * IMPORTANT: If providing a `keyFn`, keys *must* be unique for all items in a\n * given call to `repeat`. The behavior when two or more items have the same key\n * is undefined.\n *\n * If no `keyFn` is provided, this directive will perform similar to mapping\n * items to values, and DOM will be reused against potentially different items.\n */\nexport const repeat = directive((items, keyFnOrTemplate, template) => {\n let keyFn;\n if (template === undefined) {\n template = keyFnOrTemplate;\n }\n else if (keyFnOrTemplate !== undefined) {\n keyFn = keyFnOrTemplate;\n }\n return (containerPart) => {\n if (!(containerPart instanceof NodePart)) {\n throw new Error('repeat can only be used in text bindings');\n }\n // Old part & key lists are retrieved from the last update\n // (associated with the part for this instance of the directive)\n const oldParts = partListCache.get(containerPart) || [];\n const oldKeys = keyListCache.get(containerPart) || [];\n // New part list will be built up as we go (either reused from\n // old parts or created for new keys in this update). This is\n // saved in the above cache at the end of the update.\n const newParts = [];\n // New value list is eagerly generated from items along with a\n // parallel array indicating its key.\n const newValues = [];\n const newKeys = [];\n let index = 0;\n for (const item of items) {\n newKeys[index] = keyFn ? keyFn(item, index) : index;\n newValues[index] = template(item, index);\n index++;\n }\n // Maps from key to index for current and previous update; these\n // are generated lazily only when needed as a performance\n // optimization, since they are only required for multiple\n // non-contiguous changes in the list, which are less common.\n let newKeyToIndexMap;\n let oldKeyToIndexMap;\n // Head and tail pointers to old parts and new values\n let oldHead = 0;\n let oldTail = oldParts.length - 1;\n let newHead = 0;\n let newTail = newValues.length - 1;\n // Overview of O(n) reconciliation algorithm (general approach\n // based on ideas found in ivi, vue, snabbdom, etc.):\n //\n // * We start with the list of old parts and new values (and\n // arrays of their respective keys), head/tail pointers into\n // each, and we build up the new list of parts by updating\n // (and when needed, moving) old parts or creating new ones.\n // The initial scenario might look like this (for brevity of\n // the diagrams, the numbers in the array reflect keys\n // associated with the old parts or new values, although keys\n // and parts/values are actually stored in parallel arrays\n // indexed using the same head/tail pointers):\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [ , , , , , , ]\n // newKeys: [0, 2, 1, 4, 3, 7, 6] <- reflects the user's new\n // item order\n // newHead ^ ^ newTail\n //\n // * Iterate old & new lists from both sides, updating,\n // swapping, or removing parts at the head/tail locations\n // until neither head nor tail can move.\n //\n // * Example below: keys at head pointers match, so update old\n // part 0 in-place (no need to move it) and record part 0 in\n // the `newParts` list. The last thing we do is advance the\n // `oldHead` and `newHead` pointers (will be reflected in the\n // next diagram).\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , ] <- heads matched: update 0\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldHead\n // & newHead\n // newHead ^ ^ newTail\n //\n // * Example below: head pointers don't match, but tail\n // pointers do, so update part 6 in place (no need to move\n // it), and record part 6 in the `newParts` list. Last,\n // advance the `oldTail` and `oldHead` pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , 6] <- tails matched: update 6\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldTail\n // & newTail\n // newHead ^ ^ newTail\n //\n // * If neither head nor tail match; next check if one of the\n // old head/tail items was removed. We first need to generate\n // the reverse map of new keys to index (`newKeyToIndexMap`),\n // which is done once lazily as a performance optimization,\n // since we only hit this case if multiple non-contiguous\n // changes were made. Note that for contiguous removal\n // anywhere in the list, the head and tails would advance\n // from either end and pass each other before we get to this\n // case and removals would be handled in the final while loop\n // without needing to generate the map.\n //\n // * Example below: The key at `oldTail` was removed (no longer\n // in the `newKeyToIndexMap`), so remove that part from the\n // DOM and advance just the `oldTail` pointer.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, 2, 3, 4, 5, 6]\n // newParts: [0, , , , , , 6] <- 5 not in new map: remove\n // newKeys: [0, 2, 1, 4, 3, 7, 6] 5 and advance oldTail\n // newHead ^ ^ newTail\n //\n // * Once head and tail cannot move, any mismatches are due to\n // either new or moved items; if a new key is in the previous\n // \"old key to old index\" map, move the old part to the new\n // location, otherwise create and insert a new part. Note\n // that when moving an old part we null its position in the\n // oldParts array if it lies between the head and tail so we\n // know to skip it when the pointers get there.\n //\n // * Example below: neither head nor tail match, and neither\n // were removed; so find the `newHead` key in the\n // `oldKeyToIndexMap`, and move that old part's DOM into the\n // next head position (before `oldParts[oldHead]`). Last,\n // null the part in the `oldPart` array since it was\n // somewhere in the remaining oldParts still to be scanned\n // (between the head and tail pointers) so that we know to\n // skip that old part on future iterations.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, , , , , 6] <- stuck: update & move 2\n // newKeys: [0, 2, 1, 4, 3, 7, 6] into place and advance\n // newHead\n // newHead ^ ^ newTail\n //\n // * Note that for moves/insertions like the one above, a part\n // inserted at the head pointer is inserted before the\n // current `oldParts[oldHead]`, and a part inserted at the\n // tail pointer is inserted before `newParts[newTail+1]`. The\n // seeming asymmetry lies in the fact that new parts are\n // moved into place outside in, so to the right of the head\n // pointer are old parts, and to the right of the tail\n // pointer are new parts.\n //\n // * We always restart back from the top of the algorithm,\n // allowing matching and simple updates in place to\n // continue...\n //\n // * Example below: the head pointers once again match, so\n // simply update part 1 and record it in the `newParts`\n // array. Last, advance both head pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, , , , 6] <- heads matched: update 1\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance both oldHead\n // & newHead\n // newHead ^ ^ newTail\n //\n // * As mentioned above, items that were moved as a result of\n // being stuck (the final else clause in the code below) are\n // marked with null, so we always advance old pointers over\n // these so we're comparing the next actual old value on\n // either end.\n //\n // * Example below: `oldHead` is null (already placed in\n // newParts), so advance `oldHead`.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6] <- old head already used:\n // newParts: [0, 2, 1, , , , 6] advance oldHead\n // newKeys: [0, 2, 1, 4, 3, 7, 6]\n // newHead ^ ^ newTail\n //\n // * Note it's not critical to mark old parts as null when they\n // are moved from head to tail or tail to head, since they\n // will be outside the pointer range and never visited again.\n //\n // * Example below: Here the old tail key matches the new head\n // key, so the part at the `oldTail` position and move its\n // DOM to the new head position (before `oldParts[oldHead]`).\n // Last, advance `oldTail` and `newHead` pointers.\n //\n // oldHead v v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, , , 6] <- old tail matches new\n // newKeys: [0, 2, 1, 4, 3, 7, 6] head: update & move 4,\n // advance oldTail & newHead\n // newHead ^ ^ newTail\n //\n // * Example below: Old and new head keys match, so update the\n // old head part in place, and advance the `oldHead` and\n // `newHead` pointers.\n //\n // oldHead v oldTail\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, 3, ,6] <- heads match: update 3\n // newKeys: [0, 2, 1, 4, 3, 7, 6] and advance oldHead &\n // newHead\n // newHead ^ ^ newTail\n //\n // * Once the new or old pointers move past each other then all\n // we have left is additions (if old list exhausted) or\n // removals (if new list exhausted). Those are handled in the\n // final while loops at the end.\n //\n // * Example below: `oldHead` exceeded `oldTail`, so we're done\n // with the main loop. Create the remaining part and insert\n // it at the new head position, and the update is complete.\n //\n // (oldHead > oldTail)\n // oldKeys: [0, 1, -, 3, 4, 5, 6]\n // newParts: [0, 2, 1, 4, 3, 7 ,6] <- create and insert 7\n // newKeys: [0, 2, 1, 4, 3, 7, 6]\n // newHead ^ newTail\n //\n // * Note that the order of the if/else clauses is not\n // important to the algorithm, as long as the null checks\n // come first (to ensure we're always working on valid old\n // parts) and that the final else clause comes last (since\n // that's where the expensive moves occur). The order of\n // remaining clauses is is just a simple guess at which cases\n // will be most common.\n //\n // * TODO(kschaaf) Note, we could calculate the longest\n // increasing subsequence (LIS) of old items in new position,\n // and only move those not in the LIS set. However that costs\n // O(nlogn) time and adds a bit more code, and only helps\n // make rare types of mutations require fewer moves. The\n // above handles removes, adds, reversal, swaps, and single\n // moves of contiguous items in linear time, in the minimum\n // number of moves. As the number of multiple moves where LIS\n // might help approaches a random shuffle, the LIS\n // optimization becomes less helpful, so it seems not worth\n // the code at this point. Could reconsider if a compelling\n // case arises.\n while (oldHead <= oldTail && newHead <= newTail) {\n if (oldParts[oldHead] === null) {\n // `null` means old part at head has already been used\n // below; skip\n oldHead++;\n }\n else if (oldParts[oldTail] === null) {\n // `null` means old part at tail has already been used\n // below; skip\n oldTail--;\n }\n else if (oldKeys[oldHead] === newKeys[newHead]) {\n // Old head matches new head; update in place\n newParts[newHead] =\n updatePart(oldParts[oldHead], newValues[newHead]);\n oldHead++;\n newHead++;\n }\n else if (oldKeys[oldTail] === newKeys[newTail]) {\n // Old tail matches new tail; update in place\n newParts[newTail] =\n updatePart(oldParts[oldTail], newValues[newTail]);\n oldTail--;\n newTail--;\n }\n else if (oldKeys[oldHead] === newKeys[newTail]) {\n // Old head matches new tail; update and move to new tail\n newParts[newTail] =\n updatePart(oldParts[oldHead], newValues[newTail]);\n insertPartBefore(containerPart, oldParts[oldHead], newParts[newTail + 1]);\n oldHead++;\n newTail--;\n }\n else if (oldKeys[oldTail] === newKeys[newHead]) {\n // Old tail matches new head; update and move to new head\n newParts[newHead] =\n updatePart(oldParts[oldTail], newValues[newHead]);\n insertPartBefore(containerPart, oldParts[oldTail], oldParts[oldHead]);\n oldTail--;\n newHead++;\n }\n else {\n if (newKeyToIndexMap === undefined) {\n // Lazily generate key-to-index maps, used for removals &\n // moves below\n newKeyToIndexMap = generateMap(newKeys, newHead, newTail);\n oldKeyToIndexMap = generateMap(oldKeys, oldHead, oldTail);\n }\n if (!newKeyToIndexMap.has(oldKeys[oldHead])) {\n // Old head is no longer in new list; remove\n removePart(oldParts[oldHead]);\n oldHead++;\n }\n else if (!newKeyToIndexMap.has(oldKeys[oldTail])) {\n // Old tail is no longer in new list; remove\n removePart(oldParts[oldTail]);\n oldTail--;\n }\n else {\n // Any mismatches at this point are due to additions or\n // moves; see if we have an old part we can reuse and move\n // into place\n const oldIndex = oldKeyToIndexMap.get(newKeys[newHead]);\n const oldPart = oldIndex !== undefined ? oldParts[oldIndex] : null;\n if (oldPart === null) {\n // No old part for this value; create a new one and\n // insert it\n const newPart = createAndInsertPart(containerPart, oldParts[oldHead]);\n updatePart(newPart, newValues[newHead]);\n newParts[newHead] = newPart;\n }\n else {\n // Reuse old part\n newParts[newHead] =\n updatePart(oldPart, newValues[newHead]);\n insertPartBefore(containerPart, oldPart, oldParts[oldHead]);\n // This marks the old part as having been used, so that\n // it will be skipped in the first two checks above\n oldParts[oldIndex] = null;\n }\n newHead++;\n }\n }\n }\n // Add parts for any remaining new values\n while (newHead <= newTail) {\n // For all remaining additions, we insert before last new\n // tail, since old pointers are no longer valid\n const newPart = createAndInsertPart(containerPart, newParts[newTail + 1]);\n updatePart(newPart, newValues[newHead]);\n newParts[newHead++] = newPart;\n }\n // Remove any remaining unused old parts\n while (oldHead <= oldTail) {\n const oldPart = oldParts[oldHead++];\n if (oldPart !== null) {\n removePart(oldPart);\n }\n }\n // Save order of new parts for next round\n partListCache.set(containerPart, newParts);\n keyListCache.set(containerPart, newKeys);\n };\n});\n//# sourceMappingURL=repeat.js.map","import icon from './index.js';\nimport { css, LitElement } from 'lit-element';\n\nclass IAIconMagnifyMinus extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-magnify-minus', IAIconMagnifyMinus);\n\nexport default IAIconMagnifyMinus;","import icon from './index.js';\nimport { css, LitElement } from 'lit-element';\n\nclass IAIconMagnifyPlus extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-magnify-plus', IAIconMagnifyPlus);\n\nexport default IAIconMagnifyPlus;","import { css, html, LitElement } from \"lit-element\";\nimport { repeat } from \"lit-html/directives/repeat.js\";\nimport { nothing } from \"lit-html\";\nimport checkmarkIcon from '../assets/icon_checkmark.js';\nimport \"@internetarchive/icon-magnify-minus/icon-magnify-minus\";\nimport \"@internetarchive/icon-magnify-plus/icon-magnify-plus\";\n\nconst namespacedEvent = (eventName) => `visualAdjustment${eventName}`;\n\nconst events = {\n optionChange: namespacedEvent(\"OptionChanged\"),\n zoomIn: namespacedEvent(\"ZoomIn\"),\n zoomOut: namespacedEvent(\"ZoomOut\"),\n};\n\nexport class IABookVisualAdjustments extends LitElement {\n static get properties() {\n return {\n activeCount: { type: Number },\n options: { type: Array },\n renderHeader: { type: Boolean },\n showZoomControls: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n\n this.activeCount = 0;\n this.options = [];\n this.renderHeader = false;\n this.showZoomControls = true;\n }\n\n firstUpdated() {\n this.activeCount = this.activeOptions.length;\n this.emitOptionChangedEvent();\n }\n\n /** Gets list of active options\n * @return array\n */\n get activeOptions() {\n return this.options.reduce(\n (results, option) => (option.active ? [...results, option.id] : results),\n []\n );\n }\n\n /**\n * Returns blob that will be emitted by event\n */\n prepareEventDetails(changedOptionId = \"\") {\n return {\n options: this.options,\n activeCount: this.activeCount,\n changedOptionId,\n };\n }\n\n /**\n * Fires custom event when options change\n * Provides state details: { options, activeCount, changedOptionId }\n *\n * @param { string } changedOptionId\n */\n emitOptionChangedEvent(changedOptionId = \"\") {\n const detail = this.prepareEventDetails(changedOptionId);\n this.dispatchEvent(\n new CustomEvent(events.optionChange, {\n bubbles: true,\n composed: true,\n detail,\n })\n );\n }\n\n emitZoomIn() {\n this.dispatchEvent(new CustomEvent(events.zoomIn));\n }\n\n emitZoomOut() {\n this.dispatchEvent(new CustomEvent(events.zoomOut));\n }\n\n /**\n * Updates adjustment & component state\n * updates params of available ajdustment options list\n * updates active adjustment count\n * triggers custom event\n * @param { string } optionName\n */\n changeActiveStateFor(optionName) {\n const updatedOptions = [...this.options];\n const checkedOption = updatedOptions.find(\n (option) => option.id === optionName\n );\n checkedOption.active = !checkedOption.active;\n this.options = updatedOptions;\n this.activeCount = this.activeOptions.length;\n this.emitOptionChangedEvent(checkedOption.id);\n }\n\n setRangeValue(id, value) {\n const updatedOptions = [...this.options];\n updatedOptions.find((o) => o.id === id).value = value;\n this.options = [...updatedOptions];\n }\n\n /* render */\n rangeSlider(option) {\n return html`\n <div class=${`range${option.active ? \" visible\" : \"\"}`}>\n <input\n type=\"range\"\n name=\"${option.id}_range\"\n min=${option.min || 0}\n max=${option.max || 100}\n step=${option.step || 1}\n .value=${option.value}\n @input=${(e) => this.setRangeValue(option.id, e.target.value)}\n @change=${() => this.emitOptionChangedEvent()}\n />\n <p>${option.value}%</p>\n </div>\n `;\n }\n\n adjustmentCheckbox(option) {\n const formID = `adjustment_${option.id}`;\n return html`<li>\n <label for=\"${formID}\">\n <span class=\"name\">${option.name}</span>\n <input\n type=\"checkbox\"\n name=\"${formID}\"\n id=\"${formID}\"\n @change=${() => this.changeActiveStateFor(option.id)}\n ?checked=${option.active}\n />\n <span class=\"icon\"></span>\n </label>\n ${option.value !== undefined ? this.rangeSlider(option) : nothing}\n </li>`;\n }\n\n get headerSection() {\n const activeAdjustments = this.activeCount\n ? html`<p>(${this.activeCount} active)</p>`\n : nothing;\n const header = html`<header>\n <h3>Visual adjustments</h3>\n ${activeAdjustments}\n </header>`;\n return this.renderHeader ? header : nothing;\n }\n\n get zoomControls() {\n return html`\n <h4>Zoom</h4>\n <button class=\"zoom_out\" @click=${this.emitZoomOut} title=\"zoom out\">\n <ia-icon-magnify-minus></ia-icon-magnify-minus>\n </button>\n <button class=\"zoom_in\" @click=${this.emitZoomIn} title=\"zoom in\">\n <ia-icon-magnify-plus></ia-icon-magnify-plus>\n </button>\n `;\n }\n\n /** @inheritdoc */\n render() {\n return html`\n ${this.headerSection}\n <ul>\n ${repeat(this.options, (option) => option.id, this.adjustmentCheckbox.bind(this))}\n </ul>\n ${this.showZoomControls ? this.zoomControls : nothing}\n `;\n }\n\n static get styles() {\n return css`\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('${checkmarkIcon}');\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}\ncustomElements.define('ia-book-visual-adjustments', IABookVisualAdjustments);\n","import { html } from 'lit-element';\nimport './visual-adjustments.js';\n\nconst visualAdjustmentOptions = [{\n id: 'brightness',\n name: 'Adjust brightness',\n active: false,\n min: 0,\n max: 150,\n step: 1,\n value: 100,\n}, {\n id: 'contrast',\n name: 'Adjust contrast',\n active: false,\n min: 0,\n max: 150,\n step: 1,\n value: 100,\n}, {\n id: 'invert',\n name: 'Inverted colors (dark mode)',\n active: false,\n}, {\n id: 'grayscale',\n name: 'Grayscale',\n active: false,\n}];\n\nexport default class {\n constructor(options) {\n const { onOptionChange = () => {}, bookContainerSelector, bookreader } = options;\n this.onOptionChange = onOptionChange;\n this.bookContainerSelector = bookContainerSelector;\n this.bookreader = bookreader;\n\n this.onAdjustmentChange = this.onAdjustmentChange.bind(this);\n this.optionUpdateComplete = this.optionUpdateComplete.bind(this);\n this.updateOptionsCount = this.updateOptionsCount.bind(this);\n this.onZoomIn = this.onZoomIn.bind(this);\n this.onZoomOut = this.onZoomOut.bind(this);\n\n this.activeCount = 0;\n this.icon = html`<ia-icon icon=\"visualAdjustment\" style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon>`;\n this.label = 'Visual Adjustments';\n this.menuDetails = this.updateOptionsCount();\n this.id = 'adjustment';\n this.component = html`\n <ia-book-visual-adjustments\n .options=${visualAdjustmentOptions}\n @visualAdjustmentOptionChanged=${this.onAdjustmentChange}\n @visualAdjustmentZoomIn=${this.onZoomIn}\n @visualAdjustmentZoomOut=${this.onZoomOut}\n ></ia-book-visual-adjustments>\n `;\n }\n\n onZoomIn() {\n this.bookreader.zoom(1);\n }\n\n onZoomOut() {\n this.bookreader.zoom();\n }\n\n onAdjustmentChange(event) {\n const { detail } = event;\n const adjustments = {\n brightness: (value) => `brightness(${value}%)`,\n contrast: (value) => `contrast(${value}%)`,\n grayscale: () => 'grayscale(100%)',\n invert: () => 'invert(100%)',\n };\n const filters = detail.options.reduce((values, option) => {\n const newValue = `${option.active ? adjustments[option.id](option.value) : ''}`;\n return newValue ? [...values, newValue] : values;\n }, []).join(' ');\n\n document.querySelector(this.bookContainerSelector).style.setProperty('filter', filters);\n\n this.optionUpdateComplete(event);\n }\n\n optionUpdateComplete(event) {\n this.activeCount = event.detail.activeCount;\n this.updateOptionsCount(event);\n this.onOptionChange(event);\n }\n\n updateOptionsCount() {\n this.menuDetails = `(${this.activeCount} active)`;\n }\n}\n","import { LitElement, html, css } from 'lit-element';\n\nexport default class DeleteModalActions extends LitElement {\n static get styles() {\n return css`\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 `;\n }\n\n static get properties() {\n return {\n cancelAction: { type: Function },\n deleteAction: { type: Function },\n pageID: { type: String },\n };\n }\n\n render() {\n return html`\n <div>\n <button class=\"delete\" @click=${() => this.deleteAction({ detail: { id: `${this.pageID}` } })}>Delete</button>\n <button @click=${() => this.cancelAction()}>Cancel</button>\n </div>\n `;\n }\n}\n\ncustomElements.define('delete-modal-actions', DeleteModalActions);\n","import { LitElement, html, css } from 'lit-element';\n\nexport default class BookmarkButton extends LitElement {\n static get styles() {\n return css`\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('/images/bookreader/bookmark-add.png'), 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 `;\n }\n\n static get properties() {\n return {\n side: { type: String },\n state: { type: String },\n };\n }\n\n constructor() {\n super();\n this.state = 'hollow';\n }\n\n handleClick(e) {\n e.preventDefault();\n this.dispatchEvent(new CustomEvent('bookmarkButtonClicked'));\n }\n\n get title() {\n return `${this.state === 'hollow' ? 'Add' : 'Remove'} bookmark`;\n }\n\n render() {\n const position = this.side || 'right';\n return html`\n <button title=${this.title} @click=${this.handleClick} class=${position}>\n <icon-bookmark state=${this.state}></icon-bookmark>\n </button>\n `;\n }\n}\n\ncustomElements.define('bookmark-button', BookmarkButton);\n","import { css } from 'lit-element';\n\nexport default css`\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 min-height: unset;\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","import { LitElement, html, css } from 'lit-element';\nimport buttonStyles from '../assets/button-base.js';\n\nclass BookmarksLogin extends LitElement {\n static get properties() {\n return {\n url: { type: String }\n }\n }\n\n static get styles() {\n const mainCss = css`\n a {\n text-decoration: none;\n }\n `;\n return [buttonStyles, mainCss];\n }\n\n constructor() {\n super();\n this.url = 'https://archive.org/account/login';\n }\n render() {\n\n return html`\n <p>A free account is required to save and access bookmarks.</p>\n <a class=\"ia-button link primary\" href=\"${this.url}\">Log in</a>\n `;\n }\n}\n\ncustomElements.define('bookmarks-login', BookmarksLogin);\n","import { render, nothing } from 'lit-html';\nimport { LitElement, html, css } from 'lit-element';\nimport buttonStyles from '../assets/button-base.js';\nimport './bookmarks-loginCTA.js';\n\nconst api = {\n endpoint: '/services/bookmarks.php',\n headers: {\n 'Content-Type': 'application/json',\n },\n delete(page) {\n return fetch(`${this.endpoint}?identifier=${this.identifier}&page_num=${page}`, {\n credentials: 'same-origin',\n method: 'DELETE',\n headers: this.headers,\n });\n },\n get(page) {\n return fetch(`${this.endpoint}?identifier=${this.identifier}&page_num=${page}`, {\n credentials: 'same-origin',\n method: 'GET',\n headers: this.headers,\n });\n },\n getAll() {\n return fetch(`${this.endpoint}?identifier=${this.identifier}`, {\n credentials: 'same-origin',\n method: 'GET',\n headers: this.headers,\n });\n },\n post(bookmark) {\n return this.sendBookmarkData(bookmark, 'POST');\n },\n put(bookmark) {\n return this.sendBookmarkData(bookmark, 'POST');\n },\n sendBookmarkData(bookmark, method) {\n const notes = {\n note: bookmark.note,\n color: bookmark.color,\n };\n return fetch(`${this.endpoint}?identifier=${this.identifier}&page_num=${bookmark.id}`, {\n credentials: 'same-origin',\n method,\n headers: this.headers,\n body: JSON.stringify({\n notes,\n }),\n });\n },\n};\n\nclass IABookmarks extends LitElement {\n static get properties() {\n return {\n activeBookmarkID: { type: String },\n bookmarks: { type: Array },\n bookreader: { type: Object },\n options: { type: Object },\n displayMode: { type: String },\n editedBookmark: { type: Object },\n };\n }\n\n static get styles() {\n const mainCss = css`\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 `;\n\n return [buttonStyles, mainCss];\n }\n\n static formatPage(page) {\n return isNaN(+page) ? `(${page.replace(/\\D/g, '')})` : page;\n }\n\n constructor() {\n super();\n this.bookmarks = [];\n this.bookreader = {};\n this.editedBookmark = {};\n this.options = {};\n /**\n * Toggles display to either bookmarks or login cta\n * @param {('bookmarks'|'login')} displayMode\n */\n this.displayMode = 'bookmarks';\n\n this.bookmarkColors = [{\n id: 0,\n className: 'red',\n }, {\n id: 1,\n className: 'blue',\n }, {\n id: 2,\n className: 'green',\n }];\n\n // eslint-disable-next-line\n this.defaultColor = this.bookmarkColors[0];\n this.api = api;\n }\n\n updated() {\n this.emitBookmarksChanged();\n }\n\n setup() {\n this.api.identifier = this.bookreader.bookId;\n this.fetchBookmarks()\n .then(() => this.initializeBookmarks())\n .catch((err) => this.displayMode = 'login');\n }\n\n initializeBookmarks() {\n this.displayMode = 'bookmarks';\n ['3PageViewSelected'].forEach((event) => {\n window.addEventListener(`BookReader:${event}`, (e) => {\n setTimeout(() => {\n // wait a lil bit so bookreader can draw its DOM to attach onto\n this.renderBookmarkButtons();\n }, 100);\n });\n });\n ['pageChanged', '1PageViewSelected', '2PageViewSelected'].forEach((event) => {\n window.addEventListener(`BookReader:${event}`, (e) => {\n setTimeout(() => {\n // wait a lil bit so bookreader can draw its DOM to attach onto\n this.renderBookmarkButtons();\n this.markActiveBookmark();\n }, 100);\n });\n });\n ['zoomOut', 'zoomIn', 'resize'].forEach((event) => {\n window.addEventListener(`BookReader:${event}`, () => {\n if (this.bookreader.mode === this.bookreader.constModeThumb) {\n this.renderBookmarkButtons();\n }\n });\n });\n\n this.renderBookmarkButtons();\n this.markActiveBookmark(true);\n this.emitBookmarksChanged();\n }\n\n /**\n * @typedef {object} Bookmark\n * @property {number} id - bookreader page index, becomes key store\n * @property {number} color - color number\n * @property {string} page - bookmark's page label to display\n * @property {string} note - optional, note that one can add\n * @property {string} thumbnail - optional, image url\n */\n /**\n * Formats bookmark view model\n * @param {Object} bookmarkAttrs\n * @param {number} bookmarkAttrs.leafNum\n * @param {string} bookmarkAttrs.notes\n *\n * @returns Bookmark\n */\n formatBookmark({ leafNum = '', notes = {} }) {\n const { note = '', color } = notes;\n const nomalizedParams = {\n note,\n color: this.getBookmarkColor(color) ? color : this.defaultColor.id,\n };\n\n const page = IABookmarks.formatPage(this.bookreader.getPageNum(leafNum));\n const thumbnail = this.bookreader.getPageURI(`${leafNum}`.replace(/\\D/g, ''), 32); // Request thumbnail 1/32 the size of original image\n const bookmark = {\n ...nomalizedParams,\n id: leafNum,\n leafNum,\n page,\n thumbnail,\n };\n\n return bookmark;\n }\n\n fetchBookmarks() {\n return this.api.getAll().then((res) => res.json()).then(({\n success,\n error = 'Something happened while fetching bookmarks.',\n value: bkmrks = [],\n }) => {\n if (!success) {\n throw new Error(`Failed to load bookmarks: ${error}`);\n }\n\n const bookmarks = {};\n Object.keys(bkmrks).forEach((leafNum) => {\n const bookmark = bkmrks[leafNum];\n const formattedLeafNum = parseInt(leafNum, 10);\n const formattedBookmark = this.formatBookmark({ ...bookmark, leafNum: formattedLeafNum });\n bookmarks[leafNum] = formattedBookmark;\n });\n\n this.bookmarks = bookmarks;\n return bookmarks;\n });\n }\n\n emitBookmarksChanged() {\n this.dispatchEvent(new CustomEvent('bookmarksChanged', {\n bubbles: true,\n composed: true,\n detail: {\n bookmarks: this.bookmarks,\n },\n }));\n }\n\n emitBookmarkButtonClicked() {\n this.dispatchEvent(new CustomEvent('bookmarkButtonClicked', {\n bubbles: true,\n composed: true,\n detail: {\n editedBookmark: this.editedBookmark,\n },\n }));\n }\n\n bookmarkButtonClicked(pageID) {\n if (this.getBookmark(pageID)) {\n this.confirmDeletion(pageID);\n } else {\n this.createBookmark(pageID);\n }\n }\n\n renderBookmarkButtons() {\n const pages = this.bookreader.$('.BRpagecontainer').not('.BRemptypage').get();\n\n pages.forEach((pageEl) => {\n const existingButton = pageEl.querySelector('.bookmark-button');\n if (existingButton) { existingButton.remove(); }\n const pageID = +pageEl.classList.value.match(/pagediv\\d+/)[0].replace(/\\D/g, '');\n const pageBookmark = this.getBookmark(pageID);\n const bookmarkState = pageBookmark ? 'filled' : 'hollow';\n // eslint-disable-next-line\n const pageData = this.bookreader._models.book.getPage(pageID);\n const { isViewable } = pageData;\n\n if (!isViewable) { return; }\n\n const bookmarkButton = document.createElement('div');\n ['mousedown', 'mouseup'].forEach((event) => {\n bookmarkButton.addEventListener(event, (e) => e.stopPropagation());\n });\n bookmarkButton.classList.add('bookmark-button', bookmarkState);\n if (pageBookmark) {\n bookmarkButton.classList.add(this.getBookmarkColor(pageBookmark.color));\n }\n const pageSide = (pageEl.getAttribute('data-side') === 'L' && this.bookreader.mode === this.bookreader.constMode2up)\n ? 'left' : 'right';\n\n render(html`\n <bookmark-button\n @bookmarkButtonClicked=${() => this.bookmarkButtonClicked(pageID)}\n state=${bookmarkState}\n side=${pageSide}\n ></bookmark-button>`, bookmarkButton);\n pageEl.appendChild(bookmarkButton);\n });\n }\n\n /**\n * Notes which bookmark is active\n *\n * @param {boolean} atSetup - denotes the first time this is fired\n */\n markActiveBookmark(atSetup = false) {\n const { mode, constMode2up, constModeThumb } = this.bookreader;\n const currentIndex = this.bookreader.currentIndex();\n\n if (mode === constModeThumb) {\n // keep active bookmark the same\n // no syncing until we can verify when a bookmark is \"in view\"\n const requestedPageHasBookmark = this.bookmarks[currentIndex];\n if (atSetup && requestedPageHasBookmark) {\n this.activeBookmarkID = currentIndex;\n }\n return;\n }\n // In 2up, we prefer the right side of the page to bookmark\n // so let's make sure we light that one up.\n if (mode === constMode2up) {\n const pagesInView = this.bookreader.displayedIndices;\n const pagesHaveActiveBookmark = pagesInView.includes(+this.activeBookmarkID);\n if (pagesHaveActiveBookmark) {\n return;\n }\n }\n\n // If a bookmark exists with the current index, set it as active\n if (this.bookmarks[currentIndex]) {\n this.activeBookmarkID = currentIndex;\n return;\n }\n\n // No bookmark for this page\n this.activeBookmarkID = '';\n }\n\n bookmarkEdited({ detail }) {\n const closeEdit = detail.bookmark.id === this.editedBookmark.id;\n this.editedBookmark = closeEdit ? {} : detail.bookmark;\n }\n\n /**\n * Gets bookmark by pageindex\n * @param {number} id\n */\n getBookmark(id) {\n return this.bookmarks[id];\n }\n\n getBookmarkColor(id) {\n return this.bookmarkColors.find((m) => m.id === id)?.className;\n }\n\n /**\n * Adds bookmark for current page\n */\n addBookmark() {\n let pageID = this.bookreader.currentIndex();\n if (this.bookreader.mode === this.bookreader.constMode2up) {\n const pagesInView = this.bookreader.displayedIndices;\n\n // add bookmark to right hand page\n pageID = pagesInView[pagesInView.length - 1];\n }\n this.createBookmark(pageID);\n }\n\n /**\n * Creates bookmark for a given page\n * @param {number} pageID\n */\n createBookmark(pageID) {\n const existingBookmark = this.getBookmark(pageID);\n if (existingBookmark) {\n this.bookmarkEdited({ detail: { bookmark: existingBookmark } });\n this.emitBookmarkButtonClicked();\n return;\n }\n\n this.editedBookmark = this.formatBookmark({ leafNum: pageID });\n\n this.api.post(this.editedBookmark);\n\n this.bookmarks[pageID] = this.editedBookmark;\n this.activeBookmarkID = pageID;\n this.disableAddBookmarkButton = true;\n this.renderBookmarkButtons();\n this.emitBookmarkButtonClicked();\n }\n\n bookmarkSelected({ detail }) {\n const { leafNum } = detail.bookmark;\n this.bookreader.jumpToPage(`${this.bookreader.getPageNum(`${leafNum}`.replace(/\\D/g, ''))}`);\n this.activeBookmarkID = leafNum;\n }\n\n saveBookmark({ detail }) {\n const existingBookmark = this.bookmarks[detail.bookmark.id];\n Object.assign(existingBookmark, detail.bookmark);\n this.api.put(existingBookmark);\n this.editedBookmark = {};\n this.renderBookmarkButtons();\n }\n\n confirmDeletion(pageID) {\n const existingBookmark = this.getBookmark(pageID);\n if (existingBookmark.note) {\n this.emitShowModal(pageID);\n return;\n }\n this.deleteBookmark({ detail: { id: `${pageID}` } });\n }\n\n emitShowModal(pageID) {\n this.dispatchEvent(new CustomEvent('showItemNavigatorModal', {\n bubbles: true,\n composed: true,\n detail: {\n customModalContent: html`\n <delete-modal-actions\n .deleteAction=${() => this.deleteBookmark({ detail: { id: `${pageID}` } })}\n .cancelAction=${() => this.emitCloseModal()}\n .pageID=${pageID}\n ></delete-modal-actions>\n `,\n },\n }));\n }\n\n emitCloseModal() {\n this.dispatchEvent(new CustomEvent('closeItemNavigatorModal', {\n bubbles: true,\n composed: true,\n }));\n }\n\n deleteBookmark({ detail }) {\n const { id } = detail;\n const currBookmarks = this.bookmarks;\n delete currBookmarks[id];\n this.bookmarks = { ...currBookmarks };\n\n this.api.delete(detail.id);\n this.editedBookmark = {};\n this.emitCloseModal();\n this.renderBookmarkButtons();\n }\n\n /**\n * call `loginClicked` callback\n */\n loginClick() {\n const { loginClicked = () => {} } = this.options;\n loginClicked();\n }\n\n /**\n * Tells us if we should allow user to add bookmark via menu panel\n * returns { Boolean }\n */\n get shouldEnableAddBookmarkButton() {\n const pageToCheck = this.bookreader.mode === this.bookreader.constMode2up\n ? this.bookreader.displayedIndices[this.bookreader.displayedIndices.length - 1]\n : this.bookreader.currentIndex();\n const pageHasBookmark = this.getBookmark(pageToCheck);\n return !!pageHasBookmark;\n }\n\n\n get allowAddingBookmark() {\n return this.bookreader.mode !== this.bookreader.constModeThumb;\n }\n\n get addBookmarkButton() {\n return html`\n <button\n class=\"ia-button primary\"\n ?disabled=${this.shouldEnableAddBookmarkButton}\n @click=${this.addBookmark}>\n Add bookmark\n </button>\n `;\n }\n\n get bookmarksList() {\n return html`\n <ia-bookmarks-list\n @bookmarkEdited=${this.bookmarkEdited}\n @bookmarkSelected=${this.bookmarkSelected}\n @saveBookmark=${this.saveBookmark}\n @deleteBookmark=${this.deleteBookmark}\n .editedBookmark=${this.editedBookmark}\n .bookmarks=${{ ...this.bookmarks }}\n .activeBookmarkID=${this.activeBookmarkID}\n .bookmarkColors=${this.bookmarkColors}\n .defaultBookmarkColor=${this.defaultColor}>\n </ia-bookmarks-list>\n `;\n }\n\n render() {\n const { loginUrl } = this.options;\n const bookmarks = html`\n ${this.bookmarksList}\n ${this.allowAddingBookmark ? this.addBookmarkButton : nothing}\n `;\n return html`\n <section class=\"bookmarks\">\n ${this.displayMode === 'login' ? html`<bookmarks-login @click=${this.loginClick} .url=${loginUrl}></bookmarks-login>` : bookmarks}\n </section>\n `;\n }\n}\n\ncustomElements.define('ia-bookmarks', IABookmarks);\n","import { css } from 'lit-element';\n\nexport default css`\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`;\n","import { nothing } from 'lit-html';\nimport { repeat } from 'lit-html/directives/repeat.js';\nimport { css, html, LitElement } from 'lit-element';\nimport bookmarkColorsCSS from '../assets/bookmark-colors.js';\nimport buttonCSS from '../assets/button-base.js';\n\nexport class IABookmarkEdit extends LitElement {\n static get properties() {\n return {\n bookmark: { type: Object },\n bookmarkColors: { type: Array },\n renderHeader: { type: Boolean },\n showBookmark: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.bookmark = {};\n this.bookmarkColors = [];\n this.renderHeader = false;\n this.showBookmark = true;\n }\n\n emitSaveEvent(e) {\n e.preventDefault();\n this.dispatchEvent(new CustomEvent('saveBookmark', {\n detail: {\n bookmark: this.bookmark,\n },\n }));\n }\n\n emitDeleteEvent() {\n this.dispatchEvent(new CustomEvent('deleteBookmark', {\n detail: {\n id: this.bookmark.id,\n },\n }));\n }\n\n emitColorChangedEvent(colorId) {\n this.dispatchEvent(new CustomEvent('bookmarkColorChanged', {\n detail: {\n bookmarkId: this.bookmark.id,\n colorId,\n },\n }));\n }\n\n changeColorTo(id) {\n this.bookmark.color = id;\n this.emitColorChangedEvent(id);\n }\n\n updateNote(e) {\n this.bookmark.note = e.currentTarget.value;\n }\n\n static get headerSection() {\n return html`<header>\n <h3>Edit Bookmark</h3>\n </header>`;\n }\n\n bookmarkColor(color) {\n return html`\n <li>\n <input type=\"radio\" name=\"color\" id=\"color_${color.id}\" .value=${color.id} @change=${() => this.changeColorTo(color.id)} ?checked=${this.bookmark.color === color.id}>\n <label for=\"color_${color.id}\">\n <icon-bookmark class=${color.className}></icon-bookmark>\n </label>\n </li>\n `;\n }\n\n get bookmarkTemplate() {\n return html`\n <div class=\"bookmark\">\n <img src=${this.bookmark.thumbnail} />\n <h4>Page ${this.bookmark.page}</h4>\n </div>\n `;\n }\n\n render() {\n return html`\n ${this.renderHeader ? IABookmarkEdit.headerSection : nothing}\n ${this.showBookmark ? this.bookmarkTemplate : nothing}\n <form action=\"\" method=\"put\" @submit=${this.emitSaveEvent}>\n <fieldset>\n <label for=\"note\">Note <small>(optional)</small></label>\n <textarea rows=\"4\" cols=\"80\" name=\"note\" id=\"note\" @change=${this.updateNote}>${this.bookmark.note}</textarea>\n <label for=\"color\">Bookmark color</label>\n <ul>\n ${repeat(this.bookmarkColors, color => color.id, this.bookmarkColor.bind(this))}\n </ul>\n <div class=\"actions\">\n <button type=\"button\" class=\"ia-button cancel\" @click=${this.emitDeleteEvent}>Delete</button>\n <input class=\"ia-button\" type=\"submit\" value=\"Save\">\n </div>\n </fieldset>\n </form>\n `;\n }\n\n static get styles() {\n const bookmarkEditCSS = css`\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 `\n return [buttonCSS, bookmarkColorsCSS, bookmarkEditCSS];\n }\n}\ncustomElements.define('ia-bookmark-edit', IABookmarkEdit);\n","import icon from './index.js';\nimport { css, LitElement } from 'lit-element';\n\nclass IAIconEditPencil extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-edit-pencil', IAIconEditPencil);\n\nexport default IAIconEditPencil;","import { nothing } from 'lit-html';\nimport { repeat } from 'lit-html/directives/repeat.js';\nimport { css, html, LitElement } from 'lit-element';\nimport './bookmark-edit.js';\nimport '@internetarchive/icon-edit-pencil/icon-edit-pencil.js';\nimport bookmarkColorsCSS from '../assets/bookmark-colors.js';\n\nexport class IABookmarksList extends LitElement {\n static get properties() {\n return {\n activeBookmarkID: { type: Number },\n bookmarkColors: { type: Array },\n defaultBookmarkColor: { type: Object },\n bookmarks: { type: Object },\n editedBookmark: { type: Object },\n renderHeader: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.activeBookmarkID = undefined;\n this.bookmarkColors = [];\n this.defaultBookmarkColor = {};\n this.bookmarks = {};\n this.editedBookmark = {};\n this.renderHeader = false;\n }\n\n emitEditEvent(e, bookmark) {\n this.dispatchEvent(new CustomEvent('bookmarkEdited', {\n detail: {\n bookmark,\n },\n }));\n }\n\n emitSelectedEvent(bookmark) {\n this.activeBookmarkID = bookmark.id;\n this.dispatchEvent(new CustomEvent('bookmarkSelected', {\n detail: {\n bookmark,\n },\n }));\n }\n\n emitSaveBookmark(bookmark) {\n this.dispatchEvent(new CustomEvent('saveBookmark', {\n detail: {\n bookmark,\n },\n }));\n }\n\n emitDeleteBookmark(id) {\n this.dispatchEvent(new CustomEvent('deleteBookmark', {\n detail: {\n id,\n },\n }));\n }\n\n emitBookmarkColorChanged({ detail }) {\n const { bookmarkId, colorId } = detail;\n this.dispatchEvent(new CustomEvent('bookmarkColorChanged', {\n detail: {\n bookmarkId,\n colorId,\n },\n }));\n }\n\n emitAddBookmark() {\n this.dispatchEvent(new CustomEvent('addBookmark'));\n }\n\n editBookmark(e, bookmark) {\n this.emitEditEvent(e, bookmark);\n this.editedBookmark = this.editedBookmark === bookmark ? {} : bookmark;\n }\n\n saveBookmark({ detail }) {\n const { bookmark } = detail;\n this.editedBookmark = {};\n this.emitSaveBookmark(bookmark);\n }\n\n deleteBookmark({ detail }) {\n const { id } = detail;\n this.editedBookmark = {};\n this.emitDeleteBookmark(id);\n }\n\n bookmarkColorInfo(colorVal = 0) {\n return this.bookmarkColors.find(labelInfo => labelInfo?.id === colorVal);\n }\n\n bookmarkItem(bookmark) {\n const editMode = this.editedBookmark.id === bookmark.id;\n const { className } = this.bookmarkColorInfo(bookmark.color);\n const activeClass = bookmark.id === this.activeBookmarkID ? 'active' : '';\n return html`\n <li\n @click=${() => this.emitSelectedEvent(bookmark)}\n tabindex=\"0\"\n data-pageIndex=${bookmark.id}\n >\n <div class=\"separator\"></div>\n <div class=\"content ${activeClass}\">\n <button\n class=\"edit\"\n @click=${e => this.editBookmark(e, bookmark)}\n title=\"Edit this bookmark\"\n >\n <ia-icon-edit-pencil></ia-icon-edit-pencil>\n </button>\n <h4>\n <icon-bookmark class=${className}></icon-bookmark>\n <span> Page ${bookmark.page}</span>\n </h4>\n ${!editMode && bookmark.note ? html`<p>${bookmark.note}</p>` : nothing}\n ${editMode ? this.editBookmarkComponent : nothing}\n </div>\n </li>\n `;\n }\n\n get editBookmarkComponent() {\n const showBookmark = false;\n return html`\n <ia-bookmark-edit\n .bookmark=${this.editedBookmark}\n .bookmarkColors=${this.bookmarkColors}\n .defaultBookmarkColor=${this.defaultBookmarkColor}\n .showBookmark=${showBookmark}\n @saveBookmark=${this.saveBookmark}\n @deleteBookmark=${this.deleteBookmark}\n @bookmarkColorChanged=${this.emitBookmarkColorChanged}\n ></ia-bookmark-edit>\n `;\n }\n\n sortBookmarks() {\n const sortedKeys = Object.keys(this.bookmarks).sort((a, b) => {\n if (+a > +b) { return 1; }\n if (+a < +b) { return -1; }\n return 0;\n });\n const sortedBookmarks = sortedKeys.map(key => this.bookmarks[key]);\n return sortedBookmarks;\n }\n\n get bookmarksCount() {\n const count = this.bookmarks.length;\n return html`<small>(${count})</small>`;\n }\n\n get headerSection() {\n return html`<header>\n <h3>\n Bookmarks\n ${this.bookmarks.length ? this.bookmarksCount : nothing}\n </h3>\n </header>`;\n }\n\n get bookmarkslist() {\n const sortedBookmarks = this.sortBookmarks();\n const bookmarks = repeat(sortedBookmarks, bookmark => bookmark?.id, this.bookmarkItem.bind(this));\n return html`\n <ul>\n ${bookmarks}\n <div class=\"separator\"></div>\n </ul>\n `;\n }\n\n render() {\n return html`\n ${this.renderHeader ? this.headerSection : nothing}\n ${Object.keys(this.bookmarks).length ? this.bookmarkslist : nothing}\n `;\n }\n\n static get styles() {\n const main = css`\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 `;\n\n return [main, bookmarkColorsCSS];\n }\n}\ncustomElements.define('ia-bookmarks-list', IABookmarksList);\n","import { html } from 'lit-element';\nimport '../delete-modal-actions.js';\nimport './bookmark-button.js';\nimport './ia-bookmarks.js';\n\nimport './bookmark-edit.js';\nimport './bookmarks-list.js';\nimport { IAIconBookmark } from '@internetarchive/icon-bookmark';\n\ncustomElements.define('icon-bookmark', IAIconBookmark);\n\nexport default class BookmarksProvider {\n constructor(options, bookreader) {\n const boundOptions = Object.assign(this, options, {loginClicked: this.bookmarksLoginClicked});\n this.component = document.createElement('ia-bookmarks');\n this.component.bookreader = bookreader;\n this.component.options = boundOptions;\n\n this.bindEvents();\n\n this.icon = html`<icon-bookmark state=\"hollow\" style=\"--iconWidth: 16px; --iconHeight: 24px;\"></icon-bookmark>`;\n this.label = 'Bookmarks';\n this.id = 'bookmarks';\n this.component.setup();\n this.updateMenu(this.component.bookmarks.length);\n }\n\n updateMenu(count) {\n this.menuDetails = `(${count})`;\n }\n\n bindEvents() {\n this.component.addEventListener('bookmarksChanged', this.bookmarksChanged.bind(this));\n this.component.addEventListener('showItemNavigatorModal', this.showItemNavigatorModal);\n this.component.addEventListener('closeItemNavigatorModal', this.closeItemNavigatorModal);\n }\n\n bookmarksChanged({ detail }) {\n const bookmarksLength = Object.keys(detail.bookmarks).length;\n this.updateMenu(bookmarksLength);\n this.onBookmarksChanged(detail.bookmarks);\n }\n\n bookmarksLoginClicked() {\n if (window.archive_analytics) {\n window.archive_analytics?.send_event_no_sampling(\n 'BookReader',\n `BookmarksLogin`,\n window.location.path,\n );\n }\n }\n}\n","import { html, css, LitElement } from 'lit-element';\n\nclass IAIconBookmark extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n #hollow,\n #plus,\n #minus {\n display: none;\n }\n\n .hollow #filled,\n .plus #filled,\n .minus #filled {\n display: none;\n }\n\n .hollow #hollow,\n .plus #hollow,\n .minus #hollow {\n display: block;\n }\n\n .plus #plus {\n display: block;\n }\n\n .minus #minus {\n display: block;\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n static get properties() {\n return {\n state: { type: String },\n };\n }\n\n render() {\n return html`\n <div class=${this.state}>\n <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>\n </div>\n `;\n }\n}\n\nexport { IAIconBookmark };\n","/**\n * @license\n * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\nimport { AttributePart, directive, PropertyPart } from '../lit-html.js';\n// IE11 doesn't support classList on SVG elements, so we emulate it with a Set\nclass ClassList {\n constructor(element) {\n this.classes = new Set();\n this.changed = false;\n this.element = element;\n const classList = (element.getAttribute('class') || '').split(/\\s+/);\n for (const cls of classList) {\n this.classes.add(cls);\n }\n }\n add(cls) {\n this.classes.add(cls);\n this.changed = true;\n }\n remove(cls) {\n this.classes.delete(cls);\n this.changed = true;\n }\n commit() {\n if (this.changed) {\n let classString = '';\n this.classes.forEach((cls) => classString += cls + ' ');\n this.element.setAttribute('class', classString);\n }\n }\n}\n/**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\nconst previousClassesCache = new WeakMap();\n/**\n * A directive that applies CSS classes. This must be used in the `class`\n * attribute and must be the only part used in the attribute. It takes each\n * property in the `classInfo` argument and adds the property name to the\n * element's `class` if the property value is truthy; if the property value is\n * falsey, the property name is removed from the element's `class`. For example\n * `{foo: bar}` applies the class `foo` if the value of `bar` is truthy.\n * @param classInfo {ClassInfo}\n */\nexport const classMap = directive((classInfo) => (part) => {\n if (!(part instanceof AttributePart) || (part instanceof PropertyPart) ||\n part.committer.name !== 'class' || part.committer.parts.length > 1) {\n throw new Error('The `classMap` directive must be used in the `class` attribute ' +\n 'and must be the only part in the attribute.');\n }\n const { committer } = part;\n const { element } = committer;\n let previousClasses = previousClassesCache.get(part);\n if (previousClasses === undefined) {\n // Write static classes once\n // Use setAttribute() because className isn't a string on SVG elements\n element.setAttribute('class', committer.strings.join(' '));\n previousClassesCache.set(part, previousClasses = new Set());\n }\n const classList = (element.classList || new ClassList(element));\n // Remove old classes that no longer apply\n // We use forEach() instead of for-of so that re don't require down-level\n // iteration.\n previousClasses.forEach((name) => {\n if (!(name in classInfo)) {\n classList.remove(name);\n previousClasses.delete(name);\n }\n });\n // Add or remove classes based on their classMap value\n for (const name in classInfo) {\n const value = classInfo[name];\n if (value != previousClasses.has(name)) {\n // We explicitly want a loose truthy check of `value` because it seems\n // more convenient that '' and 0 are skipped.\n if (value) {\n classList.add(name);\n previousClasses.add(name);\n }\n else {\n classList.remove(name);\n previousClasses.delete(name);\n }\n }\n }\n if (typeof classList.commit === 'function') {\n classList.commit();\n }\n});\n//# sourceMappingURL=class-map.js.map","import icon from './index.js';\nimport { css, LitElement } from 'lit-element';\n\nclass IAIconLink extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-link', IAIconLink);\n\nexport default IAIconLink;","import { css } from 'lit-element';\n\nexport default css`\n:host {\n display: block;\n height: 100%;\n overflow-y: auto;\n font-size: 1.4rem;\n box-sizing: border-box;\n}\n\nheader {\n display: flex;\n align-items: baseline;\n}\n\nh3 {\n padding: 0;\n margin: 0 1rem 0 0;\n font-size: 1.6rem;\n}\n\nh4 {\n font-size: 1.4rem;\n}\n\nul {\n padding: 0 0 2rem 0;\n list-style: none;\n}\n\nli {\n padding: 0 0 1rem 0;\n}\n\nli a {\n font-size: 1.6rem;\n text-decoration: none;\n color: var(--shareLinkColor);\n}\n\nli a * {\n display: inline-block;\n padding: .2rem;\n margin-right: 1rem;\n vertical-align: middle;\n border: 1px solid var(--shareIconBorder);\n border-radius: 7px;\n background: var(--shareIconBg);\n}\n\n.embed {\n display: none;\n}\n.embed.visible {\n display: block;\n width: 95%;\n}\n\n.embed a {\n color: var(--shareLinkColor);\n}\n\n.code {\n position: relative;\n}\n\ntextarea {\n display: block;\n width: 100%;\n height: 120px;\n padding: .8rem 1rem;\n box-sizing: border-box;\n resize: none;\n cursor: pointer;\n font: normal 1.4rem \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n color: var(--textareaColor, #fff);\n background: var(--textareaBg, #151515);\n}\n\nsmall {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 3rem;\n padding: .5rem 1rem;\n box-sizing: border-box;\n font: normal 1.2rem/2rem \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n color: var(--textareaBg, #151515);\n background: var(--textareaColor, #fff);\n opacity: 0;\n transition: opacity 300ms linear;\n}\nsmall.visible {\n opacity: 1;\n}\n`;\n","import icon from './index.js';\nimport { css, LitElement } from 'lit-element';\n\nclass IAIconEmail extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-email', IAIconEmail);\n\nexport default IAIconEmail;","/* eslint-disable class-methods-use-this */\nexport default class {\n constructor(params) {\n this.promoCopy = ' : Free Download, Borrow, and Streaming : Internet Archive';\n Object.assign(this, params);\n }\n\n get encodedDescription() {\n return this.encodeString(this.description);\n }\n\n get encodedCreator() {\n return this.encodeString(this.creator);\n }\n\n get encodedPromoCopy() {\n return this.encodeString(this.promoCopy);\n }\n\n encodeString(str) {\n return encodeURIComponent(str.replace(/\\s/g, '+')).replace(/%2B/g, '+');\n }\n}\n","import '@internetarchive/icon-email/icon-email';\nimport { html } from 'lit-element';\nimport Provider from './provider.js';\n\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Email';\n this.icon = html`<ia-icon-email></ia-icon-email>`;\n this.class = 'email';\n }\n\n get url() {\n return `mailto:?body=https://${this.baseHost}/details/${this.identifier}&subject=${this.description} : ${this.creator}${this.promoCopy}`;\n }\n}\n","import icon from './index.js';\nimport { css, LitElement } from 'lit-element';\n\nclass IAIconFacebook extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-facebook', IAIconFacebook);\n\nexport default IAIconFacebook;","import '@internetarchive/icon-facebook/icon-facebook';\nimport { html } from 'lit-element';\n\nexport default class {\n constructor(params) {\n this.name = 'Facebook';\n this.icon = html`<ia-icon-facebook></ia-icon-facebook>`;\n this.class = 'facebook';\n Object.assign(this, params);\n }\n\n get url() {\n return `https://www.facebook.com/sharer/sharer.php?u=https://${this.baseHost}/details/${this.identifier}`;\n }\n}\n","import icon from './index.js';\nimport { css, LitElement } from 'lit-element';\n\nclass IAIconPinterest extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-pinterest', IAIconPinterest);\n\nexport default IAIconPinterest;","import '@internetarchive/icon-pinterest/icon-pinterest';\nimport { html } from 'lit-element';\nimport Provider from './provider.js';\n\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Pinterest';\n this.icon = html`<ia-icon-pinterest></ia-icon-pinterest>`;\n this.class = 'pinterest';\n }\n\n get url() {\n return `http://www.pinterest.com/pin/create/button/?url=https://${this.baseHost}/details/${this.identifier}&description=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`;\n }\n}\n","import icon from './index.js';\nimport { css, LitElement } from 'lit-element';\n\nclass IAIconTumblr extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-tumblr', IAIconTumblr);\n\nexport default IAIconTumblr;","import '@internetarchive/icon-tumblr/icon-tumblr';\nimport { html } from 'lit-element';\nimport Provider from './provider.js';\n\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Tumblr';\n this.icon = html`<ia-icon-tumblr></ia-icon-tumblr>`;\n this.class = 'tumblr';\n }\n\n get url() {\n 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}`;\n }\n}\n","import icon from './index.js';\nimport { css, LitElement } from 'lit-element';\n\nclass IAIconTwitter extends LitElement {\n static get styles() {\n return css`\n :host {\n width: var(--iconWidth, 'auto');\n height: var(--iconHeight, 'auto');\n }\n\n .fill-color {\n fill: var(--iconFillColor);\n }\n\n .stroke-color {\n stroke: var(--iconStrokeColor);\n }\n `;\n }\n\n render() {\n return icon;\n }\n}\n\ncustomElements.define('ia-icon-twitter', IAIconTwitter);\n\nexport default IAIconTwitter;","import '@internetarchive/icon-twitter/icon-twitter';\nimport { html } from 'lit-element';\nimport Provider from './provider.js';\n\nexport default class extends Provider {\n constructor(params) {\n super(params);\n this.name = 'Twitter';\n this.icon = html`<ia-icon-twitter></ia-icon-twitter>`;\n this.class = 'twitter';\n }\n\n get url() {\n return `https://twitter.com/intent/tweet?url=https://${this.baseHost}/details/${this.identifier}&via=internetarchive&text=${this.encodedDescription}+%3A+${this.encodedCreator}${this.encodedPromoCopy}`;\n }\n}\n","import { classMap } from 'lit-html/directives/class-map';\nimport { html, LitElement } from 'lit-element';\nimport { nothing } from 'lit-html';\nimport '@internetarchive/icon-link/icon-link.js';\nimport sharingOptionsCSS from './styles/ia-sharing-options.js';\nimport EmailProvider from './providers/email.js';\nimport FacebookProvider from './providers/facebook.js';\nimport PinterestProvider from './providers/pinterest.js';\nimport TumblrProvider from './providers/tumblr.js';\nimport TwitterProvider from './providers/twitter.js';\n\nconst copyToClipboard = ({ currentTarget }) => {\n const textarea = currentTarget.querySelector('textarea');\n const note = currentTarget.querySelector('small');\n textarea.select();\n document.execCommand('copy');\n textarea.blur();\n note.classList.add('visible');\n clearTimeout(note.timeout);\n note.timeout = setTimeout(() => note.classList.remove('visible'), 4000);\n};\n\nexport class IASharingOptions extends LitElement {\n static get styles() {\n return sharingOptionsCSS;\n }\n\n static get properties() {\n return {\n baseHost: { type: String },\n creator: { type: String },\n description: { type: String },\n embedOptionsVisible: { type: Boolean },\n identifier: { type: String },\n sharingOptions: { type: Array },\n type: { type: String },\n renderHeader: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.baseHost = '';\n this.sharingOptions = [];\n }\n\n firstUpdated() {\n const {\n baseHost,\n creator,\n description,\n identifier,\n type,\n } = this;\n const params = {\n baseHost,\n creator,\n description,\n identifier,\n type,\n };\n\n this.sharingOptions = [\n new TwitterProvider(params),\n new FacebookProvider(params),\n new TumblrProvider(params),\n new PinterestProvider(params),\n new EmailProvider(params),\n ];\n }\n\n get sharingItems() {\n return this.sharingOptions.map(option => (\n html`<li>\n <a class=\"${option.class}\" href=\"${option.url}\" target=\"_blank\">\n ${option.icon}\n ${option.name}\n </a>\n </li>`\n ));\n }\n\n get embedOption() {\n return html`<li>\n <a href=\"#\" @click=${this.toggleEmbedOptions}>\n <ia-icon-link></ia-icon-link>\n Get an embeddable link\n </a>\n </li>`;\n }\n\n get iframeEmbed() {\n return html`<iframe src=\"https://${this.baseHost}/embed/${this.identifier}\" width=\"560\" height=\"384\" frameborder=\"0\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" allowfullscreen></iframe>`;\n }\n\n get bbcodeEmbed() {\n return `[archiveorg ${this.identifier} width=560 height=384 frameborder=0 webkitallowfullscreen=true mozallowfullscreen=true]`;\n }\n\n get helpURL() {\n return `https://${this.baseHost}/help/audio.php?identifier=${this.identifier}`;\n }\n\n toggleEmbedOptions(e) {\n e.preventDefault();\n this.embedOptionsVisible = !this.embedOptionsVisible;\n }\n\n get header() {\n const header = html`<header><h3>Share this ${this.type}</h3></header>`;\n return this.renderHeader ? header : nothing;\n }\n\n render() {\n return html`\n ${this.header}\n <ul>\n ${this.sharingItems}\n ${this.embedOption}\n <div class=${classMap({ visible: this.embedOptionsVisible, embed: true })}>\n <h4>Embed</h4>\n <div class=\"code\" @click=${copyToClipboard}>\n <textarea readonly=\"readonly\">${this.iframeEmbed}</textarea>\n <small>Copied to clipboard</small>\n </div>\n <h4>Embed for wordpress.com hosted blogs and archive.org item <description> tags</h4>\n <div class=\"code\" @click=${copyToClipboard}>\n <textarea readonly=\"readonly\">${this.bbcodeEmbed}</textarea>\n <small>Copied to clipboard</small>\n </div>\n <p>Want more? <a href=${this.helpURL}>Advanced embedding details, examples, and help</a>!</p>\n </div>\n </ul>\n `;\n }\n}\n","import { html } from 'lit-element';\n\n/* register subpanel */\nimport { IASharingOptions } from '@internetarchive/ia-sharing-options';\ncustomElements.define('ia-sharing-options', IASharingOptions);\n\nexport default class {\n constructor(metadata = {}, baseHost, baseItemType) {\n this.itemType = baseItemType;\n const label = `Share this ${this.reconcileItemType}`;\n this.icon = html`<ia-icon icon=\"share\" style=\"width: var(--iconWidth); height: var(--iconHeight);\"></ia-icon>`;\n this.label = label;\n this.id = 'share';\n this.component = html`<ia-sharing-options\n identifier=\"${metadata.identifier}\"\n type=\"book\"\n creator=\"${metadata.creator}\"\n description=\"${metadata.title}\"\n baseHost=\"${baseHost}\"\n ></ia-sharing-options>`;\n }\n\n get reconcileItemType() {\n if (this.itemType === 'bookreader') {\n return 'book';\n }\n return 'item';\n }\n}\n","/**\n * Wait until some time has passed before executing a callback.\n *\n * @param {Function} callback\n * @param {Number} threshhold - in milliseconds\n * @param {*} context - will be bound to callback as its \"this\" value\n */\nclass Debouncer {\n constructor(callback, threshhold = 250, context = undefined) {\n this.callback = callback;\n this.threshhold = threshhold;\n this.context = context;\n this.deferTimeout = undefined;\n }\n\n execute() {\n clearTimeout(this.deferTimeout);\n this.deferTimeout = setTimeout(this.executeCallback.bind(this), this.threshhold);\n }\n\n executeCallback() {\n this.callback.apply(this.context);\n }\n}\n\nexport { Debouncer as default };\n","import Debouncer from '../util/debouncer';\n\n/**\n * Manages fullscreen size\n * so that bookreader chrome is always visible\n * This is a shim to hold us until we update loan bar\n * https://drive.google.com/drive/folders/1Ym9FDMZPiM4EbNh3NU-_2h8kizIYaLWt\n */\nexport default class BRFullscreenMgr {\n constructor(brSelector = '#BookReader') {\n this.debounceTime = 250;\n this.savedScrollY = 0;\n this.savedScrollX = 0;\n this.brSelector = brSelector;\n\n this.setup = this.setup.bind(this);\n this.teardown = this.teardown.bind(this);\n this.resizeBookReaderContainer = this.resizeBookReaderContainer.bind(this);\n\n this.handleResizeEvent = this.handleResizeEvent.bind(this);\n\n this.handleBookReaderHeight = new Debouncer(\n this.resizeBookReaderContainer, this.debounceTime, this,\n );\n }\n\n get brDom() {\n return document.querySelector(this.brSelector);\n }\n\n /**\n * Sets bookreader height\n * & adds resize, orientationchange listeners\n * & passes captured scroll positions\n *\n * @param {object} brInstance\n */\n setup(brInstance) {\n this.bookreader = brInstance;\n\n this.resizeBookReaderContainer();\n window.addEventListener('resize', this.handleResizeEvent);\n }\n\n /**\n * Resets BookReader height\n * & removes event handlers, resets captured scroll positions\n */\n teardown() {\n this.brDom.setAttribute('style', '');\n window.removeEventListener('resize', this.handleResizeEvent);\n window.scrollTo(this.savedScrollX, this.savedScrollY);\n this.savedScrollX = 0;\n this.savedScrollY = 0;\n }\n\n /**\n * Event listener for resize & orientationchange\n */\n handleResizeEvent() {\n this.handleBookReaderHeight.execute();\n }\n\n /**\n * Calculates & sets BookReader's needed height to\n * take the loan bar into account\n * + appends fullscreen classes to DOM\n */\n resizeBookReaderContainer() {\n const { scrollX, scrollY } = window;\n this.savedScrollX = scrollX;\n this.savedScrollY = scrollY;\n this.bookreader.updateBrClasses();\n\n const loanbar = document.querySelector('.BookReaderMessage');\n const loanbarHeight = loanbar?.offsetHeight ?? 0;\n const windowHeight = window.innerHeight;\n const newHeight = `${(windowHeight - loanbarHeight)}px`;\n this.brDom.style.height = newHeight;\n this.brDom.style.top = loanbarHeight;\n window.scrollTo(0, 0);\n }\n}\n","export class Book {\n constructor() {\n this.metadata = {};\n this.isRestricted = null;\n }\n\n setMetadata(itemMetadata) {\n this.metadata = itemMetadata;\n }\n\n setRestriction(isRestricted) {\n this.isRestricted = isRestricted;\n }\n}\n","import { html } from 'lit-element';\n\nexport default html`\n <svg\n height=\"100\"\n viewBox=\"0 0 100 100\"\n width=\"100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"bookreader-loading\"\n >\n <title id=\"bookreader-loading\">Currently loading viewer.</title>\n <desc>Please wait while we load book reader.</desc>\n <g fill=\"#333\" fill-rule=\"evenodd\" class=\"book-icon\">\n <g transform=\"matrix(1 0 0 -1 28 67.362264)\">\n <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\"/>\n <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\"/>\n <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\"/>\n </g>\n <path\n class=\"ring\"\n 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\"\n fill-rule=\"nonzero\"\n />\n </g>\n </svg>\n`;\n\n","import { css, html, LitElement } from 'lit-element';\nimport { nothing } from 'lit-html';\nimport SearchProvider from './search/search-provider.js';\nimport DownloadProvider from './downloads/downloads-provider.js';\nimport VisualAdjustmentProvider from './visual-adjustments/visual-adjustments-provider.js';\nimport BookmarksProvider from './bookmarks/bookmarks-provider.js';\nimport SharingProvider from '../ItemNavigator/providers/sharing.js';\nimport BRFullscreenMgr from './br-fullscreen-mgr.js';\nimport { Book } from './BookModel.js';\nimport bookLoader from './assets/book-loader.js';\n\nconst events = {\n menuUpdated: 'menuUpdated',\n updateSideMenu: 'updateSideMenu',\n PostInit: 'PostInit',\n ViewportInFullScreen: 'ViewportInFullScreen',\n};\nexport class BookNavigator extends LitElement {\n static get properties() {\n return {\n book: { type: Object },\n pageContainerSelector: { type: String },\n brWidth: { type: Number },\n bookReaderLoaded: { type: Boolean },\n bookreader: { type: Object },\n downloadableTypes: { type: Array },\n isAdmin: { type: Boolean },\n lendingInitialized: { type: Boolean },\n lendingStatus: { type: Object },\n menuProviders: { type: Object },\n menuShortcuts: { type: Array },\n sideMenuOpen: { type: Boolean },\n signedIn: { type: Boolean },\n };\n }\n\n constructor() {\n super();\n this.book = {};\n this.pageContainerSelector = '.BRcontainer';\n this.brWidth = 0;\n this.bookReaderCannotLoad = false;\n this.bookReaderLoaded = false;\n this.bookreader = null;\n this.downloadableTypes = [];\n this.isAdmin = false;\n this.lendingInitialized = false;\n this.lendingStatus = {};\n this.menuProviders = {};\n this.menuShortcuts = [];\n this.sideMenuOpen = false;\n this.signedIn = false;\n\n // Untracked properties\n this.fullscreenMgr = null;\n this.brResizeObserver = null;\n this.model = new Book();\n this.shortcutOrder = ['volumes', 'search', 'bookmarks'];\n }\n\n firstUpdated() {\n this.model.setMetadata(this.book);\n this.bindEventListeners();\n this.emitPostInit();\n }\n\n updated(changed) {\n if (!this.bookreader) {\n return;\n }\n const isFirstSideMenuUpdate = changed.has('sideMenuOpen') && (changed.get('sideMenuOpen') === undefined);\n if (!isFirstSideMenuUpdate) {\n // realign image\n if (this.bookreader.animating) {\n return;\n }\n this.bookreader.resize();\n const curIndex = this.bookreader.currentIndex();\n this.bookreader.jumpToIndex(curIndex);\n }\n }\n\n /**\n * Global event emitter for when Book Navigator loads\n */\n emitPostInit() {\n // emit global event when book nav has loaded with current bookreader selector\n this.dispatchEvent(new CustomEvent(`BrBookNav:${events.PostInit}`, {\n detail: { brSelector: this.bookreader?.el },\n bubbles: true,\n composed: true,\n }));\n }\n\n /**\n * Instantiates books submenus & their update callbacks\n *\n * NOTE: we are doing our best to scope bookreader's instance.\n * If your submenu provider uses a bookreader instance to read, manually\n * manipulate BookReader, please update the navigator's instance of it\n * to keep it in sync.\n */\n initializeBookSubmenus() {\n this.menuProviders = {\n search: new SearchProvider(\n (brInstance = null) => {\n if (brInstance) {\n /* refresh br instance reference */\n this.bookreader = brInstance;\n }\n this.updateMenuContents();\n if (this.brWidth >= 640) { /* open side search menu */\n this.openSideSearchMenu();\n }\n },\n this.bookreader,\n ),\n downloads: new DownloadProvider(),\n visualAdjustments: new VisualAdjustmentProvider({\n onOptionChange: (event, brInstance = null) => {\n if (brInstance) {\n /* refresh br instance reference */\n this.bookreader = brInstance;\n }\n this.updateMenuContents();\n },\n bookContainerSelector: this.pageContainerSelector,\n bookreader: this.bookreader,\n }),\n share: new SharingProvider(this.book.metadata, this.baseHost, this.itemType),\n bookmarks: new BookmarksProvider(this.bookmarksOptions, this.bookreader)\n };\n\n this.addMenuShortcut('search'); /* start with search as a shortcut */\n this.updateMenuContents();\n }\n\n /** gets element that houses the bookreader in light dom */\n get mainBRContainer() {\n return document.querySelector(this.bookreader.el);\n }\n\n get bookmarksOptions() {\n const referrerStr = `referer=${encodeURIComponent(location.href)}`\n return {\n loginUrl: `https://${this.baseHost}/account/login?${referrerStr}`,\n displayMode: this.signedIn ? 'bookmarks' : 'login',\n showItemNavigatorModal: this.showItemNavigatorModal.bind(this),\n closeItemNavigatorModal: this.closeItemNavigatorModal.bind(this),\n onBookmarksChanged: (bookmarks) => {\n const method = Object.keys(bookmarks).length ? 'add' : 'remove';\n this[`${method}MenuShortcut`]('bookmarks');\n this.updateMenuContents();\n },\n };\n }\n\n /**\n * Open side search menu\n */\n openSideSearchMenu() {\n const event = new CustomEvent(\n events.updateSideMenu, {\n detail: { menuId: 'search', action: 'open' },\n },\n );\n this.dispatchEvent(event);\n }\n\n /**\n * Sets order of menu and emits custom event when done\n */\n updateMenuContents() {\n const {\n search, downloads, visualAdjustments, share, bookmarks,\n } = this.menuProviders;\n const availableMenus = [search, bookmarks, visualAdjustments, share].filter((menu) => !!menu);\n\n if (this.shouldShowDownloadsMenu()) {\n downloads.update(this.downloadableTypes);\n availableMenus.splice(1, 0, downloads);\n }\n\n const event = new CustomEvent(\n events.menuUpdated, {\n detail: availableMenus,\n },\n );\n this.dispatchEvent(event);\n }\n\n /**\n * Confirms if we should show the downloads menu\n * @returns {bool}\n */\n shouldShowDownloadsMenu() {\n if (this.model.isRestricted === false) { return true; }\n if (this.isAdmin) { return true; }\n const { user_loan_record = {} } = this.lendingStatus;\n const hasNoLoanRecord = Array.isArray(user_loan_record); /* (bc PHP assoc. arrays) */\n\n if (hasNoLoanRecord) { return false; }\n\n const hasValidLoan = user_loan_record.type && (user_loan_record.type !== 'SESSION_LOAN');\n return hasValidLoan;\n }\n\n /**\n * Adds a provider object to the menuShortcuts array property if it isn't\n * already added. menuShortcuts are then sorted by shortcutOrder and\n * a menuShortcutsUpdated event is emitted.\n *\n * @param {string} menuId - a string matching the id property of a provider\n */\n addMenuShortcut(menuId) {\n if (this.menuShortcuts.find((m) => m.id === menuId)) { return; }\n\n this.menuShortcuts.push(this.menuProviders[menuId]);\n this.sortMenuShortcuts();\n this.emitMenuShortcutsUpdated();\n }\n\n /**\n * Removes a provider object from the menuShortcuts array and emits a\n * menuShortcutsUpdated event.\n *\n * @param {string} menuId - a string matching the id property of a provider\n */\n removeMenuShortcut(menuId) {\n this.menuShortcuts = this.menuShortcuts.filter((m) => m.id !== menuId);\n this.emitMenuShortcutsUpdated();\n }\n\n /**\n * Sorts the menuShortcuts property by comparing each provider's id to\n * the id in each iteration over the shortcutOrder array.\n */\n sortMenuShortcuts() {\n this.menuShortcuts = this.shortcutOrder.reduce((shortcuts, id) => {\n const menu = this.menuShortcuts.find((m) => m.id === id);\n if (menu) { shortcuts.push(menu); }\n return shortcuts;\n }, []);\n }\n\n emitMenuShortcutsUpdated() {\n const event = new CustomEvent('menuShortcutsUpdated', {\n detail: this.menuShortcuts,\n });\n this.dispatchEvent(event);\n }\n\n /**\n * Core bookreader event handler registry\n *\n * NOTE: we are trying to keep bookreader's instance in scope\n * Please update Book Navigator's instance reference of it to keep it current\n */\n bindEventListeners() {\n window.addEventListener('BookReader:PostInit', (e) => {\n this.bookreader = e.detail.props;\n this.bookReaderLoaded = true;\n this.bookReaderCannotLoad = false;\n this.fullscreenMgr = new BRFullscreenMgr(this.bookreader.el);\n\n this.initializeBookSubmenus();\n setTimeout(() => this.bookreader.resize(), 0);\n this.brResizeObserver = new ResizeObserver((elements) => this.reactToBrResize(elements));\n this.brResizeObserver.observe(this.mainBRContainer);\n });\n window.addEventListener('BookReader:fullscreenToggled', (event) => {\n const { detail: { props: brInstance = null } } = event;\n if (brInstance) {\n this.bookreader = brInstance;\n }\n this.manageFullScreenBehavior(event);\n }, { passive: true });\n window.addEventListener('BookReader:ToggleSearchMenu', (event) => {\n this.dispatchEvent(new CustomEvent(events.updateSideMenu, {\n detail: { menuId: 'search', action: 'toggle' },\n }));\n });\n window.addEventListener('LendingFlow:PostInit', ({ detail }) => {\n const {\n downloadTypesAvailable, lendingStatus, isAdmin, previewType,\n } = detail;\n this.lendingInitialized = true;\n this.downloadableTypes = downloadTypesAvailable;\n this.lendingStatus = lendingStatus;\n this.isAdmin = isAdmin;\n this.bookReaderCannotLoad = previewType === 'singlePagePreview';\n });\n window.addEventListener('BRJSIA:PostInit', ({ detail }) => {\n const { isRestricted, downloadURLs } = detail;\n this.bookReaderLoaded = true;\n this.downloadableTypes = downloadURLs;\n this.model.setRestriction(isRestricted);\n });\n }\n\n /**\n * Uses resize observer to fire BookReader's `resize` functionality\n * We do not want to trigger resize IF:\n * - book animation is happening\n * - book is in fullscreen (fullscreen is handled separately)\n *\n * @param { Object } entries - resize observer entries\n */\n reactToBrResize(entries = []) {\n const startBrWidth = this.brWidth;\n const { animating } = this.bookreader;\n\n entries.forEach(({ contentRect, target }) => {\n if (target === this.mainBRContainer) {\n this.brWidth = contentRect.width;\n }\n });\n setTimeout(() => {\n if (startBrWidth && !animating) {\n this.bookreader.resize();\n }\n }, 0);\n }\n\n /**\n * Manages Fullscreen behavior\n * This makes sure that controls are _always_ in view\n * We need this to accommodate LOAN BAR during fullscreen\n */\n manageFullScreenBehavior() {\n this.emitFullScreenState();\n\n if (!this.bookreader.isFullscreen()) {\n this.fullscreenMgr.teardown();\n } else {\n this.fullscreenMgr.setup(this.bookreader);\n }\n }\n\n /**\n * Intercepts and relays fullscreen toggle events\n */\n emitFullScreenState() {\n const isFullScreen = this.bookreader.isFullscreen();\n const event = new CustomEvent('ViewportInFullScreen', {\n detail: { isFullScreen },\n });\n this.dispatchEvent(event);\n }\n\n emitShowItemNavigatorModal(e) {\n this.dispatchEvent(new CustomEvent('showItemNavigatorModal', {\n detail: e.detail,\n }));\n }\n\n emitCloseItemNavigatorModal() {\n this.dispatchEvent(new CustomEvent('closeItemNavigatorModal'));\n }\n\n showItemNavigatorModal(e) {\n this.emitShowItemNavigatorModal(e);\n }\n\n closeItemNavigatorModal() {\n this.emitCloseItemNavigatorModal();\n }\n\n get loader() {\n const loader = html`\n <div class=\"book-loader\">${bookLoader}<div>\n <h3>Loading viewer</h3>\n `;\n return !this.bookReaderLoaded ? loader : nothing;\n }\n\n get loadingClass() {\n return !this.bookReaderLoaded ? 'loading' : '';\n }\n\n get itemImage() {\n const url = `https://${this.baseHost}/services/img/${this.book.metadata.identifier}`;\n return html`<img src=\"${url}\" alt=\"cover image for ${this.book.metadata.identifier}\">`;\n }\n\n render() {\n const placeholder = this.bookReaderCannotLoad ? this.itemImage : this.loader;\n return html`<div id=\"book-navigator\" class=\"${this.loadingClass}\">\n ${placeholder}\n <slot name=\"bookreader\"></slot>\n </div>\n `;\n }\n\n static get styles() {\n return css`\n #book-navigator.loading {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 30vh;\n }\n\n #book-navigator .book-loader {\n width: 30%;\n margin: auto;\n text-align: center;\n color: var(--primaryTextColor);\n }\n\n .book-loader svg {\n display: block;\n width: 60%;\n max-width: 100px;\n height: auto;\n margin: auto;\n }\n\n svg * {\n fill: var(--primaryTextColor);\n }\n\n svg .ring {\n animation: rotate 1.3s infinite linear;\n transform-origin: 50px 50px;\n transform-box: fill-box;\n }\n\n @keyframes rotate {\n 0% {\n transform: rotate(-360deg);\n }\n }\n `\n }\n}\n\ncustomElements.define('book-navigator', BookNavigator);\n","/**\n * BookReaderTemplate to load BookNavigator components\n */\n\nimport { LitElement, html, css } from 'lit-element';\n\nimport '../ItemNavigator/ItemNavigator.js'\nimport '../BookNavigator/BookNavigator.js'\n\nexport class BookReader extends LitElement {\n static get properties() {\n return {\n base64Json: { type: String },\n baseHost: { type: String },\n };\n }\n\n constructor() {\n super();\n this.base64Json = '';\n this.baseHost = 'https://archive.org';\n }\n\n firstUpdated() {\n this.fetchData();\n }\n\n /**\n * Fetch metadata response from public metadata API\n * convert response to base64 data\n * set base64 data to props\n */\n async fetchData() {\n const ocaid = new URLSearchParams(location.search).get('ocaid');\n const response = await fetch(`${this.baseHost}/metadata/${ocaid}`);\n const bookMetadata = await response.json();\n const jsonBtoa = btoa(JSON.stringify(bookMetadata));\n this.setBaseJSON(jsonBtoa);\n }\n\n /**\n * Set base64 data to prop\n * @param {string} value - base64 string format\n */\n setBaseJSON(value) {\n this.base64Json = value;\n }\n\n render() {\n return html`\n <div class=\"ia-bookreader\">\n <item-navigator\n itemType=\"bookreader\"\n basehost=${this.baseHost}\n item=${this.base64Json}>\n <div slot=\"bookreader\">\n <slot name=\"bookreader\"></slot>\n </div>\n </item-navigator>\n </div>\n `;\n }\n\n static get styles() {\n return css`\n :host {\n display: block;\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 .ia-bookreader {\n background-color: var(--primaryBGColor);\n position: relative;\n height: auto;\n }\n\n item-navigator {\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 }\n}\n\nwindow.customElements.define(\"ia-bookreader\", BookReader);\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n return Object.isExtensible(Object.preventExtensions({}));\n});\n","'use strict';\nvar aFunction = require('../internals/a-function');\nvar isObject = require('../internals/is-object');\n\nvar slice = [].slice;\nvar factories = {};\n\nvar construct = function (C, argsLength, args) {\n if (!(argsLength in factories)) {\n for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';\n // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only\n factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');\n } return factories[argsLength](C, args);\n};\n\n// `Function.prototype.bind` method implementation\n// https://tc39.es/ecma262/#sec-function.prototype.bind\nmodule.exports = Function.bind || function bind(that /* , ...args */) {\n var fn = aFunction(this);\n var partArgs = slice.call(arguments, 1);\n var boundFunction = function bound(/* args... */) {\n var args = partArgs.concat(slice.call(arguments));\n return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);\n };\n if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;\n return boundFunction;\n};\n","var isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n","var hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar defineProperty = require('../internals/object-define-property').f;\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar METADATA = uid('meta');\nvar id = 0;\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, { value: {\n objectID: 'O' + ++id, // object ID\n weakData: {} // weak collections IDs\n } });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMetadata(it);\n // return object ID\n } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMetadata(it);\n // return the store of weak collections IDs\n } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar meta = module.exports = {\n REQUIRED: false,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n","var isObject = require('../internals/is-object');\n\nvar floor = Math.floor;\n\n// `Number.isInteger` method implementation\n// https://tc39.es/ecma262/#sec-number.isinteger\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +\n // ESNext\n 'fromString,range'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\n}\n","var $ = require('../internals/export');\nvar isInteger = require('../internals/is-integer');\n\n// `Number.isInteger` method\n// https://tc39.es/ecma262/#sec-number.isinteger\n$({ target: 'Number', stat: true }, {\n isInteger: isInteger\n});\n","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n assign: assign\n});\n","var $ = require('../internals/export');\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\n\n// eslint-disable-next-line es/no-object-freeze -- safe\nvar $freeze = Object.freeze;\nvar FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); });\n\n// `Object.freeze` method\n// https://tc39.es/ecma262/#sec-object.freeze\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n freeze: function freeze(it) {\n return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it;\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});\n\n","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar aFunction = require('../internals/a-function');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar bind = require('../internals/function-bind');\nvar fails = require('../internals/fails');\n\nvar nativeConstruct = getBuiltIn('Reflect', 'construct');\n\n// `Reflect.construct` method\n// https://tc39.es/ecma262/#sec-reflect.construct\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\nvar NEW_TARGET_BUG = fails(function () {\n function F() { /* empty */ }\n return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);\n});\nvar ARGS_BUG = !fails(function () {\n nativeConstruct(function () { /* empty */ });\n});\nvar FORCED = NEW_TARGET_BUG || ARGS_BUG;\n\n$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {\n construct: function construct(Target, args /* , newTarget */) {\n aFunction(Target);\n anObject(args);\n var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);\n if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);\n if (Target == newTarget) {\n // w/o altered newTarget, optimization for 0-4 arguments\n switch (args.length) {\n case 0: return new Target();\n case 1: return new Target(args[0]);\n case 2: return new Target(args[0], args[1]);\n case 3: return new Target(args[0], args[1], args[2]);\n case 4: return new Target(args[0], args[1], args[2], args[3]);\n }\n // w/o altered newTarget, lot of arguments case\n var $args = [null];\n $args.push.apply($args, args);\n return new (bind.apply(Target, $args))();\n }\n // with altered newTarget, not support built-in constructors\n var proto = newTarget.prototype;\n var instance = create(isObject(proto) ? proto : Object.prototype);\n var result = Function.apply.call(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isRegExp = require('../internals/is-regexp');\nvar getFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar enforceInternalState = require('../internals/internal-state').enforce;\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = global.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\n\nvar FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {\n re2[MATCH] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';\n})));\n\n// `RegExp` constructor\n// https://tc39.es/ecma262/#sec-regexp-constructor\nif (FORCED) {\n var RegExpWrapper = function RegExp(pattern, flags) {\n var thisIsRegExp = this instanceof RegExpWrapper;\n var patternIsRegExp = isRegExp(pattern);\n var flagsAreUndefined = flags === undefined;\n var sticky;\n\n if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {\n return pattern;\n }\n\n if (CORRECT_NEW) {\n if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;\n } else if (pattern instanceof RegExpWrapper) {\n if (flagsAreUndefined) flags = getFlags.call(pattern);\n pattern = pattern.source;\n }\n\n if (UNSUPPORTED_Y) {\n sticky = !!flags && flags.indexOf('y') > -1;\n if (sticky) flags = flags.replace(/y/g, '');\n }\n\n var result = inheritIfRequired(\n CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),\n thisIsRegExp ? this : RegExpPrototype,\n RegExpWrapper\n );\n\n if (UNSUPPORTED_Y && sticky) {\n var state = enforceInternalState(result);\n state.sticky = true;\n }\n\n return result;\n };\n var proxy = function (key) {\n key in RegExpWrapper || defineProperty(RegExpWrapper, key, {\n configurable: true,\n get: function () { return NativeRegExp[key]; },\n set: function (it) { NativeRegExp[key] = it; }\n });\n };\n var keys = getOwnPropertyNames(NativeRegExp);\n var index = 0;\n while (keys.length > index) proxy(keys[index++]);\n RegExpPrototype.constructor = RegExpWrapper;\n RegExpWrapper.prototype = RegExpPrototype;\n redefine(global, 'RegExp', RegExpWrapper);\n}\n\n// https://tc39.es/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(global = global || self, factory(global.throttleDebounce = {}));\n}(this, (function (exports) { 'use strict';\n\n\t/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n\t/**\n\t * Throttle execution of a function. Especially useful for rate limiting\n\t * execution of handlers on events like resize and scroll.\n\t *\n\t * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n\t * @param {boolean} [noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n\t * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n\t * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n\t * the internal counter is reset).\n\t * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n\t * to `callback` when the throttled-function is executed.\n\t * @param {boolean} [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n\t * schedule `callback` to execute after `delay` ms.\n\t *\n\t * @returns {Function} A new, throttled, function.\n\t */\n\tfunction throttle (delay, noTrailing, callback, debounceMode) {\n\t /*\n\t * After wrapper has stopped being called, this timeout ensures that\n\t * `callback` is executed at the proper times in `throttle` and `end`\n\t * debounce modes.\n\t */\n\t var timeoutID;\n\t var cancelled = false; // Keep track of the last time `callback` was executed.\n\n\t var lastExec = 0; // Function to clear existing timeout\n\n\t function clearExistingTimeout() {\n\t if (timeoutID) {\n\t clearTimeout(timeoutID);\n\t }\n\t } // Function to cancel next exec\n\n\n\t function cancel() {\n\t clearExistingTimeout();\n\t cancelled = true;\n\t } // `noTrailing` defaults to falsy.\n\n\n\t if (typeof noTrailing !== 'boolean') {\n\t debounceMode = callback;\n\t callback = noTrailing;\n\t noTrailing = undefined;\n\t }\n\t /*\n\t * The `wrapper` function encapsulates all of the throttling / debouncing\n\t * functionality and when executed will limit the rate at which `callback`\n\t * is executed.\n\t */\n\n\n\t function wrapper() {\n\t for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n\t arguments_[_key] = arguments[_key];\n\t }\n\n\t var self = this;\n\t var elapsed = Date.now() - lastExec;\n\n\t if (cancelled) {\n\t return;\n\t } // Execute `callback` and update the `lastExec` timestamp.\n\n\n\t function exec() {\n\t lastExec = Date.now();\n\t callback.apply(self, arguments_);\n\t }\n\t /*\n\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t * to allow future `callback` executions.\n\t */\n\n\n\t function clear() {\n\t timeoutID = undefined;\n\t }\n\n\t if (debounceMode && !timeoutID) {\n\t /*\n\t * Since `wrapper` is being called for the first time and\n\t * `debounceMode` is true (at begin), execute `callback`.\n\t */\n\t exec();\n\t }\n\n\t clearExistingTimeout();\n\n\t if (debounceMode === undefined && elapsed > delay) {\n\t /*\n\t * In throttle mode, if `delay` time has been exceeded, execute\n\t * `callback`.\n\t */\n\t exec();\n\t } else if (noTrailing !== true) {\n\t /*\n\t * In trailing throttle mode, since `delay` time has not been\n\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t * recent execution.\n\t *\n\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t * after `delay` ms.\n\t *\n\t * If `debounceMode` is false (at end), schedule `callback` to\n\t * execute after `delay` ms.\n\t */\n\t timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t }\n\t }\n\n\t wrapper.cancel = cancel; // Return the wrapper function.\n\n\t return wrapper;\n\t}\n\n\t/* eslint-disable no-undefined */\n\t/**\n\t * Debounce execution of a function. Debouncing, unlike throttling,\n\t * guarantees that a function is only executed a single time, either at the\n\t * very beginning of a series of calls, or at the very end.\n\t *\n\t * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n\t * @param {boolean} [atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n\t * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n\t * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n\t * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n\t * to `callback` when the debounced-function is executed.\n\t *\n\t * @returns {Function} A new, debounced function.\n\t */\n\n\tfunction debounce (delay, atBegin, callback) {\n\t return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n\t}\n\n\texports.debounce = debounce;\n\texports.throttle = throttle;\n\n\tObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=index.umd.js.map\n"],"sourceRoot":""}
|