codex 1.6.0a8__py3-none-any.whl → 1.6.0a9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of codex might be problematic. Click here for more details.
- codex/integrity.py +1 -2
- codex/librarian/importer/create_comics.py +3 -4
- codex/librarian/importer/create_covers.py +1 -3
- codex/librarian/importer/failed_imports.py +1 -2
- codex/librarian/importer/importerd.py +2 -2
- codex/librarian/importer/moved.py +4 -8
- codex/serializers/browser/mtime.py +21 -0
- codex/serializers/fields.py +8 -9
- codex/serializers/reader.py +5 -5
- codex/serializers/route.py +9 -4
- codex/static_root/assets/{VCheckbox-DI-DgMb4.8eeb1bd3e18b.js → VCheckbox-eNspVUje.da8282a08876.js} +1 -1
- codex/static_root/assets/VCheckbox-eNspVUje.da8282a08876.js.br +0 -0
- codex/static_root/assets/VCheckbox-eNspVUje.da8282a08876.js.gz +0 -0
- codex/static_root/assets/{VCheckbox-DI-DgMb4.js → VCheckbox-eNspVUje.js} +1 -1
- codex/static_root/assets/VCheckbox-eNspVUje.js.br +0 -0
- codex/static_root/assets/VCheckbox-eNspVUje.js.gz +0 -0
- codex/static_root/assets/{VCheckboxBtn-B8Z4NA-t.3d8921f98ad9.js → VCheckboxBtn-DLzF_WHB.9a47873b8548.js} +1 -1
- codex/static_root/assets/VCheckboxBtn-DLzF_WHB.9a47873b8548.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-DLzF_WHB.9a47873b8548.js.gz +0 -0
- codex/static_root/assets/{VCheckboxBtn-B8Z4NA-t.js → VCheckboxBtn-DLzF_WHB.js} +1 -1
- codex/static_root/assets/VCheckboxBtn-DLzF_WHB.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-DLzF_WHB.js.gz +0 -0
- codex/static_root/assets/{VCombobox-D1_0lCri.6ef85a29c2dc.js → VCombobox-BIO7lU_B.d607ada71b06.js} +1 -1
- codex/static_root/assets/VCombobox-BIO7lU_B.d607ada71b06.js.br +0 -0
- codex/static_root/assets/VCombobox-BIO7lU_B.d607ada71b06.js.gz +0 -0
- codex/static_root/assets/{VCombobox-D1_0lCri.js → VCombobox-BIO7lU_B.js} +1 -1
- codex/static_root/assets/VCombobox-BIO7lU_B.js.br +0 -0
- codex/static_root/assets/VCombobox-BIO7lU_B.js.gz +0 -0
- codex/static_root/assets/{VDialog-opmV0YZz.d77216e97599.js → VDialog-87AymJC5.4a46716358c0.js} +1 -1
- codex/static_root/assets/VDialog-87AymJC5.4a46716358c0.js.br +0 -0
- codex/static_root/assets/VDialog-87AymJC5.4a46716358c0.js.gz +0 -0
- codex/static_root/assets/{VDialog-opmV0YZz.js → VDialog-87AymJC5.js} +1 -1
- codex/static_root/assets/VDialog-87AymJC5.js.br +0 -0
- codex/static_root/assets/VDialog-87AymJC5.js.gz +0 -0
- codex/static_root/assets/{VExpansionPanels-DX2dhUf5.ecc2ebfa62ec.js → VExpansionPanels-CgA3shsd.9e524c73726a.js} +1 -1
- codex/static_root/assets/VExpansionPanels-CgA3shsd.9e524c73726a.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-CgA3shsd.9e524c73726a.js.gz +0 -0
- codex/static_root/assets/{VExpansionPanels-DX2dhUf5.js → VExpansionPanels-CgA3shsd.js} +1 -1
- codex/static_root/assets/VExpansionPanels-CgA3shsd.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-CgA3shsd.js.gz +0 -0
- codex/static_root/assets/{VRadioGroup-BGa6_q5a.d1a3ad7266bd.js → VRadioGroup-B--7K_v5.4a4e9c2d6c42.js} +1 -1
- codex/static_root/assets/VRadioGroup-B--7K_v5.4a4e9c2d6c42.js.br +0 -0
- codex/static_root/assets/VRadioGroup-B--7K_v5.4a4e9c2d6c42.js.gz +0 -0
- codex/static_root/assets/{VRadioGroup-BGa6_q5a.js → VRadioGroup-B--7K_v5.js} +1 -1
- codex/static_root/assets/VRadioGroup-B--7K_v5.js.br +0 -0
- codex/static_root/assets/VRadioGroup-B--7K_v5.js.gz +0 -0
- codex/static_root/assets/{VSelect-sIYW_-ud.7d40da0ec3ff.js → VSelect-BoJq222l.fc714657e214.js} +1 -1
- codex/static_root/assets/VSelect-BoJq222l.fc714657e214.js.br +0 -0
- codex/static_root/assets/VSelect-BoJq222l.fc714657e214.js.gz +0 -0
- codex/static_root/assets/{VSelect-sIYW_-ud.js → VSelect-BoJq222l.js} +1 -1
- codex/static_root/assets/VSelect-BoJq222l.js.br +0 -0
- codex/static_root/assets/VSelect-BoJq222l.js.gz +0 -0
- codex/static_root/assets/{VSelectionControl-C8DP9rgp.ef80e8e3dfc1.js → VSelectionControl-CVQ9wkE2.c02186cceba6.js} +1 -1
- codex/static_root/assets/VSelectionControl-CVQ9wkE2.c02186cceba6.js.br +0 -0
- codex/static_root/assets/VSelectionControl-CVQ9wkE2.c02186cceba6.js.gz +0 -0
- codex/static_root/assets/{VSelectionControl-C8DP9rgp.js → VSelectionControl-CVQ9wkE2.js} +1 -1
- codex/static_root/assets/VSelectionControl-CVQ9wkE2.js.br +0 -0
- codex/static_root/assets/VSelectionControl-CVQ9wkE2.js.gz +0 -0
- codex/static_root/assets/{VSlideGroup-BRYhkLH8.3534ec94b2f1.js → VSlideGroup-Ce0j2BKK.85e64443a928.js} +1 -1
- codex/static_root/assets/VSlideGroup-Ce0j2BKK.85e64443a928.js.br +0 -0
- codex/static_root/assets/VSlideGroup-Ce0j2BKK.85e64443a928.js.gz +0 -0
- codex/static_root/assets/{VSlideGroup-BRYhkLH8.js → VSlideGroup-Ce0j2BKK.js} +1 -1
- codex/static_root/assets/VSlideGroup-Ce0j2BKK.js.br +0 -0
- codex/static_root/assets/VSlideGroup-Ce0j2BKK.js.gz +0 -0
- codex/static_root/assets/{VTable-D1esKtlw.52165930e3b9.js → VTable-CrWkhkiP.6d530eea0c09.js} +1 -1
- codex/static_root/assets/VTable-CrWkhkiP.6d530eea0c09.js.br +0 -0
- codex/static_root/assets/VTable-CrWkhkiP.6d530eea0c09.js.gz +0 -0
- codex/static_root/assets/{VTable-D1esKtlw.js → VTable-CrWkhkiP.js} +1 -1
- codex/static_root/assets/VTable-CrWkhkiP.js.br +0 -0
- codex/static_root/assets/VTable-CrWkhkiP.js.gz +0 -0
- codex/static_root/assets/VTextField-CkWbil3K.2cac13161dfe.js +1 -0
- codex/static_root/assets/VTextField-CkWbil3K.2cac13161dfe.js.br +0 -0
- codex/static_root/assets/VTextField-CkWbil3K.2cac13161dfe.js.gz +0 -0
- codex/static_root/assets/VTextField-CkWbil3K.js +1 -0
- codex/static_root/assets/VTextField-CkWbil3K.js.br +0 -0
- codex/static_root/assets/VTextField-CkWbil3K.js.gz +0 -0
- codex/static_root/assets/{VWindowItem-B0KokcAk.ea94224aecb9.js → VWindowItem-7z55Y4lK.98eb7487e039.js} +1 -1
- codex/static_root/assets/VWindowItem-7z55Y4lK.98eb7487e039.js.br +0 -0
- codex/static_root/assets/VWindowItem-7z55Y4lK.98eb7487e039.js.gz +0 -0
- codex/static_root/assets/{VWindowItem-B0KokcAk.js → VWindowItem-7z55Y4lK.js} +1 -1
- codex/static_root/assets/VWindowItem-7z55Y4lK.js.br +0 -0
- codex/static_root/assets/VWindowItem-7z55Y4lK.js.gz +0 -0
- codex/static_root/assets/{admin-Y0bL21AB.42d4f0d68163.js → admin-D3OK784R.f69891726ec5.js} +1 -1
- codex/static_root/assets/admin-D3OK784R.f69891726ec5.js.br +0 -0
- codex/static_root/assets/admin-D3OK784R.f69891726ec5.js.gz +0 -0
- codex/static_root/assets/{admin-Y0bL21AB.js → admin-D3OK784R.js} +1 -1
- codex/static_root/assets/admin-D3OK784R.js.br +0 -0
- codex/static_root/assets/admin-D3OK784R.js.gz +0 -0
- codex/static_root/assets/{admin-drawer-panel-DNngWUEM.4e992e3fe86e.js → admin-drawer-panel-1pnfvY8O.5438f252970e.js} +11 -11
- codex/static_root/assets/admin-drawer-panel-1pnfvY8O.5438f252970e.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-1pnfvY8O.5438f252970e.js.gz +0 -0
- codex/static_root/assets/{admin-drawer-panel-DNngWUEM.js → admin-drawer-panel-1pnfvY8O.js} +11 -11
- codex/static_root/assets/admin-drawer-panel-1pnfvY8O.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-1pnfvY8O.js.gz +0 -0
- codex/static_root/assets/browser-BuU2x9y7.css +1 -0
- codex/static_root/assets/browser-BuU2x9y7.css.br +0 -0
- codex/static_root/assets/browser-BuU2x9y7.css.gz +0 -0
- codex/static_root/assets/browser-BuU2x9y7.f67595d24664.css +1 -0
- codex/static_root/assets/browser-BuU2x9y7.f67595d24664.css.br +0 -0
- codex/static_root/assets/browser-BuU2x9y7.f67595d24664.css.gz +0 -0
- codex/static_root/assets/browser-CO9EYHIr.be49367c6a75.js +1 -0
- codex/static_root/assets/browser-CO9EYHIr.be49367c6a75.js.br +0 -0
- codex/static_root/assets/browser-CO9EYHIr.be49367c6a75.js.gz +0 -0
- codex/static_root/assets/browser-CO9EYHIr.js +1 -0
- codex/static_root/assets/browser-CO9EYHIr.js.br +0 -0
- codex/static_root/assets/browser-CO9EYHIr.js.gz +0 -0
- codex/static_root/assets/{change-password-dialog-CH4xbjJa.b749aa6ea07e.js → change-password-dialog-CjZdzaIk.188c765431ab.js} +1 -1
- codex/static_root/assets/change-password-dialog-CjZdzaIk.188c765431ab.js.br +0 -0
- codex/static_root/assets/change-password-dialog-CjZdzaIk.188c765431ab.js.gz +0 -0
- codex/static_root/assets/{change-password-dialog-CH4xbjJa.js → change-password-dialog-CjZdzaIk.js} +1 -1
- codex/static_root/assets/change-password-dialog-CjZdzaIk.js.br +0 -0
- codex/static_root/assets/change-password-dialog-CjZdzaIk.js.gz +0 -0
- codex/static_root/assets/{confirm-dialog-DkU0twE6.a20006aa5ba6.js → confirm-dialog-jwL7B98r.1cfd579cbcfe.js} +1 -1
- codex/static_root/assets/confirm-dialog-jwL7B98r.1cfd579cbcfe.js.br +0 -0
- codex/static_root/assets/confirm-dialog-jwL7B98r.1cfd579cbcfe.js.gz +0 -0
- codex/static_root/assets/{confirm-dialog-DkU0twE6.js → confirm-dialog-jwL7B98r.js} +1 -1
- codex/static_root/assets/confirm-dialog-jwL7B98r.js.br +0 -0
- codex/static_root/assets/confirm-dialog-jwL7B98r.js.gz +0 -0
- codex/static_root/assets/{datetime-column-BfW_j_3Q.6a614321a435.js → datetime-column-9w3GcKvo.f9172256f091.js} +1 -1
- codex/static_root/assets/datetime-column-9w3GcKvo.f9172256f091.js.br +0 -0
- codex/static_root/assets/datetime-column-9w3GcKvo.f9172256f091.js.gz +0 -0
- codex/static_root/assets/{datetime-column-BfW_j_3Q.js → datetime-column-9w3GcKvo.js} +1 -1
- codex/static_root/assets/datetime-column-9w3GcKvo.js.br +0 -0
- codex/static_root/assets/datetime-column-9w3GcKvo.js.gz +0 -0
- codex/static_root/assets/{filter-DjxN78cK.35673f6e49b1.js → filter-C-pghOri.eeb7c2ecf398.js} +1 -1
- codex/static_root/assets/filter-C-pghOri.eeb7c2ecf398.js.br +0 -0
- codex/static_root/assets/filter-C-pghOri.eeb7c2ecf398.js.gz +0 -0
- codex/static_root/assets/{filter-DjxN78cK.js → filter-C-pghOri.js} +1 -1
- codex/static_root/assets/filter-C-pghOri.js.br +0 -0
- codex/static_root/assets/filter-C-pghOri.js.gz +0 -0
- codex/static_root/assets/{flag-tab-D4ZNSbMR.e763a9937701.js → flag-tab-Da2DBNyz.ffbe5ca37e1c.js} +1 -1
- codex/static_root/assets/flag-tab-Da2DBNyz.ffbe5ca37e1c.js.br +0 -0
- codex/static_root/assets/flag-tab-Da2DBNyz.ffbe5ca37e1c.js.gz +0 -0
- codex/static_root/assets/{flag-tab-D4ZNSbMR.js → flag-tab-Da2DBNyz.js} +1 -1
- codex/static_root/assets/flag-tab-Da2DBNyz.js.br +0 -0
- codex/static_root/assets/flag-tab-Da2DBNyz.js.gz +0 -0
- codex/static_root/assets/{group-tab-DucpNoBs.a6f37ae940c0.js → group-tab-BONYWOc1.6ddf321a4a56.js} +1 -1
- codex/static_root/assets/group-tab-BONYWOc1.6ddf321a4a56.js.br +0 -0
- codex/static_root/assets/group-tab-BONYWOc1.6ddf321a4a56.js.gz +0 -0
- codex/static_root/assets/{group-tab-DucpNoBs.js → group-tab-BONYWOc1.js} +1 -1
- codex/static_root/assets/group-tab-BONYWOc1.js.br +0 -0
- codex/static_root/assets/group-tab-BONYWOc1.js.gz +0 -0
- codex/static_root/assets/{http-error-Cj0hTq-c.062a88ddd4dc.js → http-error-D2Jnc20C.32846bc3a43d.js} +1 -1
- codex/static_root/assets/http-error-D2Jnc20C.32846bc3a43d.js.br +0 -0
- codex/static_root/assets/http-error-D2Jnc20C.32846bc3a43d.js.gz +0 -0
- codex/static_root/assets/{http-error-Cj0hTq-c.js → http-error-D2Jnc20C.js} +1 -1
- codex/static_root/assets/http-error-D2Jnc20C.js.br +0 -0
- codex/static_root/assets/http-error-D2Jnc20C.js.gz +0 -0
- codex/static_root/assets/{library-tab-CzksdS3Q.566acdb45dec.js → library-tab-B419agXA.d4b778172aaa.js} +1 -1
- codex/static_root/assets/library-tab-B419agXA.d4b778172aaa.js.br +0 -0
- codex/static_root/assets/library-tab-B419agXA.d4b778172aaa.js.gz +0 -0
- codex/static_root/assets/{library-tab-CzksdS3Q.js → library-tab-B419agXA.js} +1 -1
- codex/static_root/assets/library-tab-B419agXA.js.br +0 -0
- codex/static_root/assets/library-tab-B419agXA.js.gz +0 -0
- codex/static_root/assets/{main-DX-k2724.js → main-CMQwJ9aG.9836fe81c80a.js} +4 -4
- codex/static_root/assets/main-CMQwJ9aG.9836fe81c80a.js.br +0 -0
- codex/static_root/assets/main-CMQwJ9aG.9836fe81c80a.js.gz +0 -0
- codex/static_root/assets/{main-DX-k2724.f73d08e9ad64.js → main-CMQwJ9aG.js} +4 -4
- codex/static_root/assets/main-CMQwJ9aG.js.br +0 -0
- codex/static_root/assets/main-CMQwJ9aG.js.gz +0 -0
- codex/static_root/assets/{pagination-toolbar-CQcR0a3T.js → pagination-toolbar-LTuj5U-G.a295defbcd2f.js} +1 -1
- codex/static_root/assets/pagination-toolbar-LTuj5U-G.a295defbcd2f.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-LTuj5U-G.a295defbcd2f.js.gz +0 -0
- codex/static_root/assets/{pagination-toolbar-CQcR0a3T.7a2d33ed8c39.js → pagination-toolbar-LTuj5U-G.js} +1 -1
- codex/static_root/assets/pagination-toolbar-LTuj5U-G.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-LTuj5U-G.js.gz +0 -0
- codex/static_root/assets/{pdf-doc-GkMk4o5L.ef24c859a7a4.js → pdf-doc-8RVZqILx.2e7166dd26fb.js} +1 -1
- codex/static_root/assets/pdf-doc-8RVZqILx.2e7166dd26fb.js.br +0 -0
- codex/static_root/assets/pdf-doc-8RVZqILx.2e7166dd26fb.js.gz +0 -0
- codex/static_root/assets/{pdf-doc-GkMk4o5L.js → pdf-doc-8RVZqILx.js} +1 -1
- codex/static_root/assets/pdf-doc-8RVZqILx.js.br +0 -0
- codex/static_root/assets/pdf-doc-8RVZqILx.js.gz +0 -0
- codex/static_root/assets/{reader-Cl6mmQB_.js → reader-DNnK_Chr.114d0e321547.js} +2 -2
- codex/static_root/assets/reader-DNnK_Chr.114d0e321547.js.br +0 -0
- codex/static_root/assets/reader-DNnK_Chr.114d0e321547.js.gz +0 -0
- codex/static_root/assets/{reader-Cl6mmQB_.7b9e7591954f.js → reader-DNnK_Chr.js} +2 -2
- codex/static_root/assets/reader-DNnK_Chr.js.br +0 -0
- codex/static_root/assets/reader-DNnK_Chr.js.gz +0 -0
- codex/static_root/assets/{relation-chips-CZ8VvR4y.d4232f3c2518.js → relation-chips-PYua7aXv.428ba0b5861e.js} +1 -1
- codex/static_root/assets/relation-chips-PYua7aXv.428ba0b5861e.js.br +0 -0
- codex/static_root/assets/relation-chips-PYua7aXv.428ba0b5861e.js.gz +0 -0
- codex/static_root/assets/{relation-chips-CZ8VvR4y.js → relation-chips-PYua7aXv.js} +1 -1
- codex/static_root/assets/relation-chips-PYua7aXv.js.br +0 -0
- codex/static_root/assets/relation-chips-PYua7aXv.js.gz +0 -0
- codex/static_root/assets/{settings-drawer-DyS0A2pN.17a98928589f.js → settings-drawer-DbN6ISRH.d14f525d8eee.js} +2 -2
- codex/static_root/assets/settings-drawer-DbN6ISRH.d14f525d8eee.js.br +0 -0
- codex/static_root/assets/settings-drawer-DbN6ISRH.d14f525d8eee.js.gz +0 -0
- codex/static_root/assets/{settings-drawer-DyS0A2pN.js → settings-drawer-DbN6ISRH.js} +2 -2
- codex/static_root/assets/settings-drawer-DbN6ISRH.js.br +0 -0
- codex/static_root/assets/settings-drawer-DbN6ISRH.js.gz +0 -0
- codex/static_root/assets/{stats-tab-R3Ekobfm.70fa09a67518.js → stats-tab-DImNhH8O.d5026283841a.js} +1 -1
- codex/static_root/assets/stats-tab-DImNhH8O.d5026283841a.js.br +0 -0
- codex/static_root/assets/stats-tab-DImNhH8O.d5026283841a.js.gz +0 -0
- codex/static_root/assets/{stats-tab-R3Ekobfm.js → stats-tab-DImNhH8O.js} +1 -1
- codex/static_root/assets/stats-tab-DImNhH8O.js.br +0 -0
- codex/static_root/assets/stats-tab-DImNhH8O.js.gz +0 -0
- codex/static_root/assets/task-tab-DPD53kjv.e56a35ff1691.js +1 -0
- codex/static_root/assets/task-tab-DPD53kjv.e56a35ff1691.js.br +0 -0
- codex/static_root/assets/task-tab-DPD53kjv.e56a35ff1691.js.gz +0 -0
- codex/static_root/assets/task-tab-DPD53kjv.js +1 -0
- codex/static_root/assets/task-tab-DPD53kjv.js.br +0 -0
- codex/static_root/assets/task-tab-DPD53kjv.js.gz +0 -0
- codex/static_root/assets/to-case-ehC9Ccyj.a7b8e25b391f.js +1 -0
- codex/static_root/assets/to-case-ehC9Ccyj.js +1 -0
- codex/static_root/assets/{unauthorized-BbXjAe5l.d48912d34a68.js → unauthorized-BOIx7Y18.ee3961abfccb.js} +1 -1
- codex/static_root/assets/unauthorized-BOIx7Y18.ee3961abfccb.js.br +0 -0
- codex/static_root/assets/unauthorized-BOIx7Y18.ee3961abfccb.js.gz +0 -0
- codex/static_root/assets/{unauthorized-BbXjAe5l.js → unauthorized-BOIx7Y18.js} +1 -1
- codex/static_root/assets/unauthorized-BOIx7Y18.js.br +0 -0
- codex/static_root/assets/unauthorized-BOIx7Y18.js.gz +0 -0
- codex/static_root/assets/{user-tab-DxITIl2d.d79d7f062930.js → user-tab-BABwfxLO.37dd0440fbdd.js} +1 -1
- codex/static_root/assets/user-tab-BABwfxLO.37dd0440fbdd.js.br +0 -0
- codex/static_root/assets/user-tab-BABwfxLO.37dd0440fbdd.js.gz +0 -0
- codex/static_root/assets/{user-tab-DxITIl2d.js → user-tab-BABwfxLO.js} +1 -1
- codex/static_root/assets/user-tab-BABwfxLO.js.br +0 -0
- codex/static_root/assets/user-tab-BABwfxLO.js.gz +0 -0
- codex/static_root/{manifest.16d52597ef50.json → manifest.cbea5663003a.json} +224 -224
- codex/static_root/manifest.cbea5663003a.json.br +0 -0
- codex/static_root/manifest.cbea5663003a.json.gz +0 -0
- codex/static_root/manifest.json +224 -224
- codex/static_root/manifest.json.br +0 -0
- codex/static_root/manifest.json.gz +0 -0
- codex/static_root/staticfiles.json +1 -1
- codex/urls/api/v3.py +1 -1
- codex/views/admin/tasks.py +2 -5
- codex/views/bookmark.py +44 -40
- codex/views/browser/annotations.py +30 -45
- codex/views/browser/base.py +5 -4
- codex/views/browser/browser.py +7 -11
- codex/views/browser/filters/annotations.py +58 -14
- codex/views/browser/filters/bookmark.py +21 -5
- codex/views/browser/filters/group.py +7 -4
- codex/views/browser/mtime.py +72 -0
- codex/views/const.py +8 -0
- codex/views/reader/books.py +6 -8
- codex/views/reader/reader.py +24 -21
- {codex-1.6.0a8.dist-info → codex-1.6.0a9.dist-info}/METADATA +1 -1
- {codex-1.6.0a8.dist-info → codex-1.6.0a9.dist-info}/RECORD +241 -241
- codex/serializers/mtime.py +0 -25
- codex/static_root/assets/VCheckbox-DI-DgMb4.8eeb1bd3e18b.js.br +0 -0
- codex/static_root/assets/VCheckbox-DI-DgMb4.8eeb1bd3e18b.js.gz +0 -0
- codex/static_root/assets/VCheckbox-DI-DgMb4.js.br +0 -0
- codex/static_root/assets/VCheckbox-DI-DgMb4.js.gz +0 -0
- codex/static_root/assets/VCheckboxBtn-B8Z4NA-t.3d8921f98ad9.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-B8Z4NA-t.3d8921f98ad9.js.gz +0 -0
- codex/static_root/assets/VCheckboxBtn-B8Z4NA-t.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-B8Z4NA-t.js.gz +0 -0
- codex/static_root/assets/VCombobox-D1_0lCri.6ef85a29c2dc.js.br +0 -0
- codex/static_root/assets/VCombobox-D1_0lCri.6ef85a29c2dc.js.gz +0 -0
- codex/static_root/assets/VCombobox-D1_0lCri.js.br +0 -0
- codex/static_root/assets/VCombobox-D1_0lCri.js.gz +0 -0
- codex/static_root/assets/VDialog-opmV0YZz.d77216e97599.js.br +0 -0
- codex/static_root/assets/VDialog-opmV0YZz.d77216e97599.js.gz +0 -0
- codex/static_root/assets/VDialog-opmV0YZz.js.br +0 -0
- codex/static_root/assets/VDialog-opmV0YZz.js.gz +0 -0
- codex/static_root/assets/VExpansionPanels-DX2dhUf5.ecc2ebfa62ec.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-DX2dhUf5.ecc2ebfa62ec.js.gz +0 -0
- codex/static_root/assets/VExpansionPanels-DX2dhUf5.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-DX2dhUf5.js.gz +0 -0
- codex/static_root/assets/VRadioGroup-BGa6_q5a.d1a3ad7266bd.js.br +0 -0
- codex/static_root/assets/VRadioGroup-BGa6_q5a.d1a3ad7266bd.js.gz +0 -0
- codex/static_root/assets/VRadioGroup-BGa6_q5a.js.br +0 -0
- codex/static_root/assets/VRadioGroup-BGa6_q5a.js.gz +0 -0
- codex/static_root/assets/VSelect-sIYW_-ud.7d40da0ec3ff.js.br +0 -0
- codex/static_root/assets/VSelect-sIYW_-ud.7d40da0ec3ff.js.gz +0 -0
- codex/static_root/assets/VSelect-sIYW_-ud.js.br +0 -0
- codex/static_root/assets/VSelect-sIYW_-ud.js.gz +0 -0
- codex/static_root/assets/VSelectionControl-C8DP9rgp.ef80e8e3dfc1.js.br +0 -0
- codex/static_root/assets/VSelectionControl-C8DP9rgp.ef80e8e3dfc1.js.gz +0 -0
- codex/static_root/assets/VSelectionControl-C8DP9rgp.js.br +0 -0
- codex/static_root/assets/VSelectionControl-C8DP9rgp.js.gz +0 -0
- codex/static_root/assets/VSlideGroup-BRYhkLH8.3534ec94b2f1.js.br +0 -0
- codex/static_root/assets/VSlideGroup-BRYhkLH8.3534ec94b2f1.js.gz +0 -0
- codex/static_root/assets/VSlideGroup-BRYhkLH8.js.br +0 -0
- codex/static_root/assets/VSlideGroup-BRYhkLH8.js.gz +0 -0
- codex/static_root/assets/VTable-D1esKtlw.52165930e3b9.js.br +0 -0
- codex/static_root/assets/VTable-D1esKtlw.52165930e3b9.js.gz +0 -0
- codex/static_root/assets/VTable-D1esKtlw.js.br +0 -0
- codex/static_root/assets/VTable-D1esKtlw.js.gz +0 -0
- codex/static_root/assets/VTextField-BnGscKcY.54032adf3a4b.js +0 -1
- codex/static_root/assets/VTextField-BnGscKcY.54032adf3a4b.js.br +0 -0
- codex/static_root/assets/VTextField-BnGscKcY.54032adf3a4b.js.gz +0 -0
- codex/static_root/assets/VTextField-BnGscKcY.js +0 -1
- codex/static_root/assets/VTextField-BnGscKcY.js.br +0 -0
- codex/static_root/assets/VTextField-BnGscKcY.js.gz +0 -0
- codex/static_root/assets/VWindowItem-B0KokcAk.ea94224aecb9.js.br +0 -0
- codex/static_root/assets/VWindowItem-B0KokcAk.ea94224aecb9.js.gz +0 -0
- codex/static_root/assets/VWindowItem-B0KokcAk.js.br +0 -0
- codex/static_root/assets/VWindowItem-B0KokcAk.js.gz +0 -0
- codex/static_root/assets/admin-Y0bL21AB.42d4f0d68163.js.br +0 -0
- codex/static_root/assets/admin-Y0bL21AB.42d4f0d68163.js.gz +0 -0
- codex/static_root/assets/admin-Y0bL21AB.js.br +0 -0
- codex/static_root/assets/admin-Y0bL21AB.js.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-DNngWUEM.4e992e3fe86e.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-DNngWUEM.4e992e3fe86e.js.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-DNngWUEM.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-DNngWUEM.js.gz +0 -0
- codex/static_root/assets/browser-CMAtBCLx.17a277ce43a9.css +0 -1
- codex/static_root/assets/browser-CMAtBCLx.17a277ce43a9.css.br +0 -0
- codex/static_root/assets/browser-CMAtBCLx.17a277ce43a9.css.gz +0 -0
- codex/static_root/assets/browser-CMAtBCLx.css +0 -1
- codex/static_root/assets/browser-CMAtBCLx.css.br +0 -0
- codex/static_root/assets/browser-CMAtBCLx.css.gz +0 -0
- codex/static_root/assets/browser-DoJk8uvb.2c97a3858932.js +0 -1
- codex/static_root/assets/browser-DoJk8uvb.2c97a3858932.js.br +0 -0
- codex/static_root/assets/browser-DoJk8uvb.2c97a3858932.js.gz +0 -0
- codex/static_root/assets/browser-DoJk8uvb.js +0 -1
- codex/static_root/assets/browser-DoJk8uvb.js.br +0 -0
- codex/static_root/assets/browser-DoJk8uvb.js.gz +0 -0
- codex/static_root/assets/change-password-dialog-CH4xbjJa.b749aa6ea07e.js.br +0 -0
- codex/static_root/assets/change-password-dialog-CH4xbjJa.b749aa6ea07e.js.gz +0 -0
- codex/static_root/assets/change-password-dialog-CH4xbjJa.js.br +0 -0
- codex/static_root/assets/change-password-dialog-CH4xbjJa.js.gz +0 -0
- codex/static_root/assets/confirm-dialog-DkU0twE6.a20006aa5ba6.js.br +0 -0
- codex/static_root/assets/confirm-dialog-DkU0twE6.a20006aa5ba6.js.gz +0 -0
- codex/static_root/assets/confirm-dialog-DkU0twE6.js.br +0 -0
- codex/static_root/assets/confirm-dialog-DkU0twE6.js.gz +0 -0
- codex/static_root/assets/datetime-column-BfW_j_3Q.6a614321a435.js.br +0 -0
- codex/static_root/assets/datetime-column-BfW_j_3Q.6a614321a435.js.gz +0 -0
- codex/static_root/assets/datetime-column-BfW_j_3Q.js.br +0 -0
- codex/static_root/assets/datetime-column-BfW_j_3Q.js.gz +0 -0
- codex/static_root/assets/filter-DjxN78cK.35673f6e49b1.js.br +0 -0
- codex/static_root/assets/filter-DjxN78cK.35673f6e49b1.js.gz +0 -0
- codex/static_root/assets/filter-DjxN78cK.js.br +0 -0
- codex/static_root/assets/filter-DjxN78cK.js.gz +0 -0
- codex/static_root/assets/flag-tab-D4ZNSbMR.e763a9937701.js.br +0 -0
- codex/static_root/assets/flag-tab-D4ZNSbMR.e763a9937701.js.gz +0 -0
- codex/static_root/assets/flag-tab-D4ZNSbMR.js.br +0 -0
- codex/static_root/assets/flag-tab-D4ZNSbMR.js.gz +0 -0
- codex/static_root/assets/group-tab-DucpNoBs.a6f37ae940c0.js.br +0 -0
- codex/static_root/assets/group-tab-DucpNoBs.a6f37ae940c0.js.gz +0 -0
- codex/static_root/assets/group-tab-DucpNoBs.js.br +0 -0
- codex/static_root/assets/group-tab-DucpNoBs.js.gz +0 -0
- codex/static_root/assets/http-error-Cj0hTq-c.062a88ddd4dc.js.br +0 -0
- codex/static_root/assets/http-error-Cj0hTq-c.062a88ddd4dc.js.gz +0 -0
- codex/static_root/assets/http-error-Cj0hTq-c.js.br +0 -0
- codex/static_root/assets/http-error-Cj0hTq-c.js.gz +0 -0
- codex/static_root/assets/library-tab-CzksdS3Q.566acdb45dec.js.br +0 -0
- codex/static_root/assets/library-tab-CzksdS3Q.566acdb45dec.js.gz +0 -0
- codex/static_root/assets/library-tab-CzksdS3Q.js.br +0 -0
- codex/static_root/assets/library-tab-CzksdS3Q.js.gz +0 -0
- codex/static_root/assets/main-DX-k2724.f73d08e9ad64.js.br +0 -0
- codex/static_root/assets/main-DX-k2724.f73d08e9ad64.js.gz +0 -0
- codex/static_root/assets/main-DX-k2724.js.br +0 -0
- codex/static_root/assets/main-DX-k2724.js.gz +0 -0
- codex/static_root/assets/pagination-toolbar-CQcR0a3T.7a2d33ed8c39.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-CQcR0a3T.7a2d33ed8c39.js.gz +0 -0
- codex/static_root/assets/pagination-toolbar-CQcR0a3T.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-CQcR0a3T.js.gz +0 -0
- codex/static_root/assets/pdf-doc-GkMk4o5L.ef24c859a7a4.js.br +0 -0
- codex/static_root/assets/pdf-doc-GkMk4o5L.ef24c859a7a4.js.gz +0 -0
- codex/static_root/assets/pdf-doc-GkMk4o5L.js.br +0 -0
- codex/static_root/assets/pdf-doc-GkMk4o5L.js.gz +0 -0
- codex/static_root/assets/reader-Cl6mmQB_.7b9e7591954f.js.br +0 -0
- codex/static_root/assets/reader-Cl6mmQB_.7b9e7591954f.js.gz +0 -0
- codex/static_root/assets/reader-Cl6mmQB_.js.br +0 -0
- codex/static_root/assets/reader-Cl6mmQB_.js.gz +0 -0
- codex/static_root/assets/relation-chips-CZ8VvR4y.d4232f3c2518.js.br +0 -0
- codex/static_root/assets/relation-chips-CZ8VvR4y.d4232f3c2518.js.gz +0 -0
- codex/static_root/assets/relation-chips-CZ8VvR4y.js.br +0 -0
- codex/static_root/assets/relation-chips-CZ8VvR4y.js.gz +0 -0
- codex/static_root/assets/settings-drawer-DyS0A2pN.17a98928589f.js.br +0 -0
- codex/static_root/assets/settings-drawer-DyS0A2pN.17a98928589f.js.gz +0 -0
- codex/static_root/assets/settings-drawer-DyS0A2pN.js.br +0 -0
- codex/static_root/assets/settings-drawer-DyS0A2pN.js.gz +0 -0
- codex/static_root/assets/stats-tab-R3Ekobfm.70fa09a67518.js.br +0 -0
- codex/static_root/assets/stats-tab-R3Ekobfm.70fa09a67518.js.gz +0 -0
- codex/static_root/assets/stats-tab-R3Ekobfm.js.br +0 -0
- codex/static_root/assets/stats-tab-R3Ekobfm.js.gz +0 -0
- codex/static_root/assets/task-tab-BhLDK_7Q.28ff51b3ed01.js +0 -1
- codex/static_root/assets/task-tab-BhLDK_7Q.28ff51b3ed01.js.br +0 -0
- codex/static_root/assets/task-tab-BhLDK_7Q.28ff51b3ed01.js.gz +0 -0
- codex/static_root/assets/task-tab-BhLDK_7Q.js +0 -1
- codex/static_root/assets/task-tab-BhLDK_7Q.js.br +0 -0
- codex/static_root/assets/task-tab-BhLDK_7Q.js.gz +0 -0
- codex/static_root/assets/to-case-BR2frjFx.87de5d7a0503.js +0 -1
- codex/static_root/assets/to-case-BR2frjFx.js +0 -1
- codex/static_root/assets/unauthorized-BbXjAe5l.d48912d34a68.js.br +0 -0
- codex/static_root/assets/unauthorized-BbXjAe5l.d48912d34a68.js.gz +0 -0
- codex/static_root/assets/unauthorized-BbXjAe5l.js.br +0 -0
- codex/static_root/assets/unauthorized-BbXjAe5l.js.gz +0 -0
- codex/static_root/assets/user-tab-DxITIl2d.d79d7f062930.js.br +0 -0
- codex/static_root/assets/user-tab-DxITIl2d.d79d7f062930.js.gz +0 -0
- codex/static_root/assets/user-tab-DxITIl2d.js.br +0 -0
- codex/static_root/assets/user-tab-DxITIl2d.js.gz +0 -0
- codex/static_root/manifest.16d52597ef50.json.br +0 -0
- codex/static_root/manifest.16d52597ef50.json.gz +0 -0
- codex/views/mtime.py +0 -72
- {codex-1.6.0a8.dist-info → codex-1.6.0a9.dist-info}/LICENSE +0 -0
- {codex-1.6.0a8.dist-info → codex-1.6.0a9.dist-info}/WHEEL +0 -0
- {codex-1.6.0a8.dist-info → codex-1.6.0a9.dist-info}/entry_points.txt +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__fileDeps=["assets/pdf-doc-
|
|
2
|
-
import{an as v,V as P,W as _,_ as b,Y as h,Z as c,X as p,$ as l,S as n,ao as y,ak as k,ap as f,al as R,aK as S,aH as w,aX as ee,U as B,bB as ve,bC as Pe,aw as F,bD as te,bE as oe,aJ as ae,bF as se,bG as we,b5 as Se,aU as T,by as ye,aI as V,bt as re,aR as s,b3 as Ce,bH as Re,bI as Be,D as M,aq as W,ar as z,bJ as Te,bK as De,bL as Ie,bM as Le,bN as $e,aS as Ve,aT as Oe,aN as Ne,m as D,bO as Ae,av as ne,aV as H,bP as Ee,bQ as Ue,bj as xe,am as Fe,bR as ze,b7 as ie,bm as Me,bp as We,bS as He,bT as qe}from"./admin-drawer-panel-DNngWUEM.js";import{b as d,c as Ge,_ as Ke,S as A,d as le,e as je,h as Ye}from"./main-DX-k2724.js";import{d as Xe,b as Ze,S as Je,V as Qe,a as et}from"./settings-drawer-DyS0A2pN.js";import{P as tt,a as ce,U as ot,V as at}from"./unauthorized-BbXjAe5l.js";import{b as de,V as ue}from"./VWindowItem-B0KokcAk.js";import{a as st}from"./VSelect-sIYW_-ud.js";import{V as rt,a as nt,b as it,c as lt}from"./VExpansionPanels-DX2dhUf5.js";import{V as I,a as E}from"./VRadioGroup-BGa6_q5a.js";import{V as U}from"./VCheckbox-DI-DgMb4.js";import{T as q,a as ct,M as dt,V as x,b as ut,P as he,c as ht,d as pt}from"./pagination-toolbar-CQcR0a3T.js";import"./copy-to-clipboard-DoUvDJVx.js";import"./VDialog-opmV0YZz.js";import"./change-password-dialog-CH4xbjJa.js";import"./VTextField-BnGscKcY.js";import"./VSelectionControl-C8DP9rgp.js";import"./VCheckboxBtn-B8Z4NA-t.js";import"./VSlideGroup-BRYhkLH8.js";import"./to-case-BR2frjFx.js";function pe(e,t){const{self:a=!1}=t.modifiers??{},u=t.value,i=typeof u=="object"&&u.options||{passive:!0},o=typeof u=="function"||"handleEvent"in u?u:u.handler,r=a?e:t.arg?document.querySelector(t.arg):window;r&&(r.addEventListener("scroll",o,i),e._onScroll=Object(e._onScroll),e._onScroll[t.instance.$.uid]={handler:o,options:i,target:a?void 0:r})}function ge(e,t){var o;if(!((o=e._onScroll)!=null&&o[t.instance.$.uid]))return;const{handler:a,options:u,target:i=e}=e._onScroll[t.instance.$.uid];i.removeEventListener("scroll",a,u),delete e._onScroll[t.instance.$.uid]}function gt(e,t){t.value!==t.oldValue&&(ge(e,t),pe(e,t))}const mt={mounted:pe,unmounted:ge,updated:gt},kt={name:"BookChangeDrawer",props:{direction:{type:String,required:!0}},head(){if(this.isDrawerOpen)return this.prefetchLinks(this.params,this.computedDirection,!0)},computed:{...v(d,["isBTT"]),...P(d,{computedDirection(){return this.normalizeDirection(this.direction)},params(e){return e.routes.books[this.computedDirection]},isDrawerOpen(e){return e.bookChange===this.computedDirection},icon(){return this.bookChangeIcon(this.computedDirection)}}),drawerLocation(){return this.bookChangeLocation(this.direction)},cursorClass(){return this.bookChangeCursorClass(this.computedDirection)},show(){return this.bookChangeShow(this.computedDirection)},route(){return this.toRoute(this.params)},label(){return this.linkLabel(this.computedDirection,"Book")}},methods:{..._(d,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute","bookChangeLocation","bookChangeCursorClass","bookChangeShow","bookChangeIcon"])}};function bt(e,t,a,u,i,o){const r=h("router-link");return o.show?(c(),p(Xe,{key:0,class:R(["bookChangeDrawer",{drawerActivated:e.isDrawerOpen}]),"disable-resize-watcher":"","disable-route-watcher":"",location:o.drawerLocation,"model-value":e.isDrawerOpen,scrim:!1,temporary:"",touchless:""},{default:l(()=>[n(r,{class:R({navLink:!0,[o.cursorClass]:!0}),to:o.route,"aria-label":o.label,title:o.label,onClick:t[0]||(t[0]=g=>g.stopImmediatePropagation())},{default:l(()=>[n(y,{class:"bookChangeIcon"},{default:l(()=>[k(f(e.icon),1)]),_:1})]),_:1},8,["class","to","aria-label","title"])]),_:1},8,["location","model-value","class"])):S("",!0)}const _t=b(kt,[["render",bt],["__scopeId","data-v-03e41a14"]]),ft={name:"BookChangeActivator",components:{BookChangeDrawer:_t},props:{direction:{type:String,required:!0}},computed:{computedDirection(){return this.normalizeDirection(this.direction)},positionClass(){return this.bookChangeLocation(this.direction)+"Pos"},cursorClass(){return this.bookChangeCursorClass(this.direction)},show(){return this.bookChangeShow(this.computedDirection)}},methods:{..._(d,["setBookChangeFlag","normalizeDirection","bookChangeLocation","bookChangeCursorClass","bookChangeShow"])}};function vt(e,t,a,u,i,o){const r=h("BookChangeDrawer");return c(),w(B,null,[o.show?(c(),w("div",{key:0,class:R(["bookChangeColumn",{[o.positionClass]:!0,[o.cursorClass]:!0}]),onClick:t[0]||(t[0]=ee(g=>e.setBookChangeFlag(a.direction),["stop"]))},null,2)):S("",!0),n(r,{direction:a.direction},null,8,["direction"])],64)}const Pt=b(ft,[["render",vt],["__scopeId","data-v-db3eb561"]]),wt={name:"LoadingPage",components:{Placeholder:tt},props:{twoPages:{type:Boolean,required:!0}}};function St(e,t,a,u,i,o){const r=h("Placeholder");return c(),w("div",{class:R(["pageLoading",{twoPages:a.twoPages}])},[n(r,{class:"pagePlaceholder"})],2)}const yt=b(wt,[["render",St],["__scopeId","data-v-04027168"]]),G="unauthorized",Ct={name:"ErrorPage",props:{twoPages:{type:Boolean,required:!0},type:{type:String,required:!0}},computed:{text(){return this.type===G?"Protected page":"Failed to load page"},icon(){return this.type===G?ve:Pe}}};function Rt(e,t,a,u,i,o){return c(),p(ce,{class:R(["pageError",{twoPages:a.twoPages}]),headline:o.text,icon:o.icon},null,8,["class","headline","icon"])}const Bt=b(Ct,[["render",Rt],["__scopeId","data-v-417a4cab"]]),Tt={name:"ImgPage",props:{book:{type:Object,required:!0},src:{type:String,required:!0}},emits:["load","error"],computed:{...P(d,{scale:e=>e.clientSettings.scale}),style(){const e={};if(this.scale==1)return e;const t=this.$el;if(!(t!=null&&t.naturalWidth))return e;const a=t.naturalWidth/2;return e.transformOrigin=`${a}px top`,e.transform=`scale(${this.scale})`,e},classes(){return this.fitToClass(this.book)}},methods:{..._(d,["fitToClass"])}},Dt=["src"];function It(e,t,a,u,i,o){return c(),w("img",F({class:[o.classes,"img"],draggable:"false",src:a.src,style:o.style},e.$attrs,{onError:t[0]||(t[0]=r=>e.$emit("error",r)),onLoad:t[1]||(t[1]=r=>e.$emit("load",r))}),null,16,Dt)}const K=b(Tt,[["render",It],["__scopeId","data-v-559e2ecc"]]),j=te(oe(()=>Ke(()=>import("./pdf-doc-GkMk4o5L.js"),__vite__mapDeps([0,1,2,3,4,5])))),Lt=333,$t={name:"BookPage",components:{ErrorPage:Bt,LoadingPage:yt,PDFDoc:j,ImgPage:K},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},data(){return{showProgress:!1,loaded:!1,error:!1}},computed:{...v(d,["isVertical"]),...P(d,{scale:e=>e.clientSettings.scale}),style(){var a;const e={};if(this.book.fileType==="PDF"||this.scale==1)return e;const t=(a=this.$refs.pageComponent)==null?void 0:a.$el;return t!=null&&t.naturalHeight&&(e.height=t.naturalHeight*this.scale+"px",e.width=t.naturalWidth*this.scale+"px"),e},src(){const e={pk:this.book.pk,page:this.page,mtime:this.book.mtime};return Ge(e)},component(){return this.book.fileType==="PDF"?j:K},settings(){return this.getSettings(this.book)}},mounted(){setTimeout(function(){this.loaded||(this.loading=!0)},Lt)},methods:{..._(d,["getSettings"]),onLoad(){this.showProgress=!1,this.loaded=!0,this.error=!1},onError(){this.error="load",this.showProgress=!1},onUnauthorized(){this.error="unauthorized",this.showProgress=!1}}},Vt=["id","data-page"];function Ot(e,t,a,u,i,o){const r=h("ErrorPage"),g=h("LoadingPage");return c(),w("div",{id:`page${a.page}`,"data-page":a.page,class:"page",style:se(o.style)},[i.error?(c(),p(r,{key:0,"two-pages":o.settings.twoPages,type:i.error},null,8,["two-pages","type"])):i.showProgress&&!i.loaded?(c(),p(g,{key:1,"two-pages":o.settings.twoPages},null,8,["two-pages"])):(c(),p(ae(o.component),{key:2,ref:"pageComponent",book:a.book,page:1,src:o.src,onError:o.onError,onLoad:o.onLoad,onUnauthorized:o.onUnauthorized},null,40,["book","src","onError","onLoad","onUnauthorized"]))],12,Vt)}const me=b($t,[["render",Ot],["__scopeId","data-v-87996fa1"]]),Nt=.5,At={name:"ScaleForScroll",emits:["click"],data(){return{mdiMagnifyMinusOutline:we}},computed:{...P(d,{scale:e=>e.clientSettings.scale}),showReset(){return this.scale!=A},style(){return{cursor:this.scale==A?"zoom-in":"all-scroll"}}},methods:{..._(d,["setSettingsClient"]),clearSelection(){window.getSelection&&window.getSelection().removeAllRanges()},onDoubleClick(){this.clearSelection();const e=this.scale+Nt;this.setSettingsClient({scale:e})},scaleReset(){this.setSettingsClient({scale:A})}}};function Et(e,t,a,u,i,o){const r=Se("drag-scroller");return T((c(),w("div",{class:"scaleForScroll",style:se(o.style),onDblclick:t[0]||(t[0]=(...g)=>o.onDoubleClick&&o.onDoubleClick(...g))},[ye(e.$slots,"default",{},void 0,!0),o.showReset?(c(),p(y,{key:0,class:"resetIcon",onClick:ee(o.scaleReset,["stop"])},{default:l(()=>[k(f(i.mdiMagnifyMinusOutline),1)]),_:1},8,["onClick"])):S("",!0)],36)),[[r,,void 0,{onlyX:!0}]])}const ke=b(At,[["render",Et],["__scopeId","data-v-b24267c0"]]),Ut={name:"HorizontalPages",components:{BookPage:me,ScaleForScroll:ke},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},emits:["click"],computed:{...v(d,["isCoverPage","isReadInReverse"]),showSecondPage(){return this.getSettings(this.book).twoPages&&this.page<this.book.maxPage&&!this.isCoverPage(this.book,this.page)},showPageOne(){return!this.isReadInReverse||this.showSecondPage},showPageTwo(){return this.isReadInReverse||this.showSecondPage},pageOne(){return this.isReadInReverse?this.page+1:this.page},pageTwo(){return this.isReadInReverse?this.page:this.page+1}},methods:{..._(d,["getSettings"])}};function xt(e,t,a,u,i,o){const r=h("BookPage"),g=h("ScaleForScroll");return c(),p(g,{class:"noWrap"},{default:l(()=>[o.showPageOne?(c(),p(r,{key:0,ref:"pageOne",book:a.book,page:o.pageOne,class:"horizontalPage"},null,8,["book","page"])):S("",!0),o.showPageTwo?(c(),p(r,{key:1,book:a.book,page:o.pageTwo,class:"horizontalPage"},null,8,["book","page"])):S("",!0)]),_:1})}const Ft=b(Ut,[["render",xt],["__scopeId","data-v-9a560964"]]),zt={name:"PageChangeLink",props:{direction:{type:String,required:!0}},head(){return this.prefetchLinks(this.params,this.computedDirection)},computed:{...v(d,["isVertical","isFirstPage","isLastPage"]),...P(d,{params(e){return e.routes[this.computedDirection]}}),computedDirection(){return this.normalizeDirection(this.direction)},show(){return this.computedDirection==="prev"?!this.isFirstPage:!this.isLastPage},pageChangeClass(){let e="pageChange";return e+=this.isVertical?"Row":"Column",e},directionClass(){let e=this.direction;return this.isVertical&&(e+="Vertical"),e},route(){return this.toRoute(this.params)},label(){return this.linkLabel(this.computedDirection,"Page")}},methods:{..._(d,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute"])}};function Mt(e,t,a,u,i,o){const r=h("router-link");return o.show?(c(),p(r,{key:0,to:o.route,"aria-label":o.label,class:R({[o.pageChangeClass]:!0,[o.directionClass]:!0}),onClick:t[0]||(t[0]=g=>g.stopImmediatePropagation())},null,8,["to","aria-label","class"])):S("",!0)}const Wt=b(zt,[["render",Mt],["__scopeId","data-v-9ade7d96"]]),Ht=48,qt=48,Gt={name:"PagerHorizontal",components:{HorizontalPages:Ft,PageChangeLink:Wt},props:{book:{type:Object,required:!0}},data(){return{activePage:0,pages:[]}},computed:{...v(d,["isReadInReverse"]),...P(d,{prevBook:e=>{var t;return(t=e.routes.books)==null?void 0:t.prev},nextBook:e=>{var t;return(t=e.routes.books)==null?void 0:t.next},storePage:e=>e.page,storePk:e=>e.books.current.pk}),twoPages(){return this.getSettings(this.book).twoPages},windowIndex(){const e=this.activePage-this.pages[0];return Math.min(Math.max(0,e),this.book.maxPage)}},watch:{twoPages(){this.setActivePage(this.storePage,!0)},storePage(e){if(this.book.pk===this.storePk){this.activePage=e;const t=this.pages.at(0),a=this.pages.at(-1);(e<t||e>a)&&this.setPages()}},prevBook(e){this.book.pk===e.pk&&(this.activePage=this.book.maxPage)},nextBook(e){this.book.pk===e.pk&&(this.activePage=0)}},created(){this.book.pk===this.storePk?this.activePage=+this.$route.params.page:this.book.pk===this.prevBook.pk?this.activePage=this.book.maxPage:this.activePage=0,this.setPages()},methods:{..._(d,["getSettings","setBookChangeFlag","setActivePage"]),setPages(){const e=Math.max(this.activePage-Ht,0),t=Math.min(this.activePage+qt,this.book.maxPage),a=le.range(e,t+1);this.pages=a}}};function Kt(e,t,a,u,i,o){const r=h("PageChangeLink"),g=h("HorizontalPages");return c(),p(ue,{"show-arrows":"",continuous:"","model-value":o.windowIndex,reverse:e.isReadInReverse},{prev:l(()=>[n(r,{direction:"prev"})]),next:l(()=>[n(r,{direction:"next"})]),default:l(()=>[(c(!0),w(B,null,V(i.pages,m=>(c(),p(de,{key:`c/${a.book.pk}/${m}`,class:"windowItem",disabled:"",eager:m>=e.storePage-1&&m<=e.storePage+2,"model-value":m,transition:!0},{default:l(()=>[n(g,{book:a.book,page:m},null,8,["book","page"])]),_:2},1032,["eager","model-value"]))),128))]),_:1},8,["model-value","reverse"])}const Y=b(Gt,[["render",Kt],["__scopeId","data-v-e04bbc00"]]),jt=12,X=250,Yt={name:"PagerVertical",components:{BookPage:me,ScaleForScroll:ke},props:{book:{type:Object,required:!0}},data(){return{innerHeight:window.innerHeight,innerWidth:window.innerWidth,intersectorOn:!1,programmaticScroll:!1}},computed:{...P(d,{storePage:e=>e.page,showToolbars:e=>e.showToolbars}),...re(d,["reactWithScroll"]),settings(){return this.getSettings(this.book)},readInReverse(){return this.settings.readInReverse},items(){var a;const e=(a=this.book)!=null&&a.maxPage?this.book.maxPage+1:0,t=le.range(0,e);return this.readInReverse&&t.reverse(),t},visibleItems(){var e;return Math.min(((e=this.book)==null?void 0:e.maxPage)??0,jt)}},watch:{storePage(e){this.reactWithScroll&&this.scrollToPage(e)}},mounted(){window.addEventListener("resize",this.onResize),setTimeout(()=>{this.scrollToPage(this.storePage)},X)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{..._(d,["setActivePage","setBookChangeFlag","getSettings"]),onIntersect(e,t){if(e&&this.intersectorOn){const u=+t[0].target.dataset.page;this.setActivePage(u,!1)}},onScroll(){if(this.programmaticScroll)return;this.intersectorOn=!0;const e=this.$refs.verticalScroll.$el,t=e.scrollTop;if(this.storePage===0&&t===0)this.setBookChangeFlag("prev");else if(this.storePage===this.book.maxPage){const a=e.scrollTopMax||e.scrollHeight-e.clientTop;window.innerHeight+t+1>=a&&this.setBookChangeFlag("next")}},scrollToPage(e){this.intersectorOn=!1,this.programmaticScroll=!0;const t=this.$refs.verticalScroll;t?t.scrollToIndex(e):console.debug("Can't find verticalScroll component."),setTimeout(()=>{this.programmaticScroll=!1},X)},onResize(){this.innerHeight=window.innerHeight,this.innerWidth=window.innerWidth}}},Xt=["data-page"];function Zt(e,t,a,u,i,o){const r=h("BookPage"),g=h("ScaleForScroll");return c(),p(g,null,{default:l(()=>[T((c(),p(st,{id:"verticalScroll",key:o.readInReverse,ref:"verticalScroll",items:o.items,height:i.innerHeight,width:i.innerWidth},{default:l(({item:m})=>[n(r,{book:a.book,page:m,class:"verticalPage"},null,8,["book","page"]),T(s("div",{class:R(["pageTracker",{pageTrackerToolbars:e.showToolbars}]),"data-page":m},null,10,Xt),[[Ce,{handler:o.onIntersect,options:{threshold:[.75]}},void 0,{quiet:!0}]])]),_:1},8,["items","height","width"])),[[mt,o.onScroll,"#verticalScroll"]])]),_:1})}const Z=b(Yt,[["render",Zt],["__scopeId","data-v-ef3b4ade"]]),J=te(oe(()=>"@/components/reader/pager/pager-full-pdf.vue")),Jt={name:"PagerSelector",components:{PagerHorizontal:Y,PagerPDF:J,PagerVertical:Z},props:{book:{type:Object,required:!0}},emits:["click"],head(){return this.prefetchBook(this.book)},computed:{...v(d,["isVertical","cacheBook"]),...P(d,{storePk:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk)||0}}),readFullPdf(){return this.book.fileType=="PDF"&&this.cacheBook},component(){return this.readFullPdf?J:this.isVertical?Z:Y}},watch:{$route(e){+e.params.pk===this.book.pk&&this.setActivePage(+e.params.page,!0)}},created(){this.book.pk===this.storePk&&this.setActivePage(+this.$route.params.page,!0)},methods:{..._(d,["getSettings","setActivePage","prefetchBook"])}};function Qt(e,t,a,u,i,o){return c(),p(ae(o.component),{book:a.book},null,8,["book"])}const eo=b(Jt,[["render",Qt]]),to={name:"BooksWindow",components:{BookChangeActivator:Pt,Pager:eo},computed:{...v(d,["isBTT"]),...P(d,{books:e=>[e.books.prev,e.books.current,e.books.next].filter(Boolean),bookChange:e=>e.bookChange,currentBookPk:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk)||0},bookRoutes:e=>e.routes.books})},watch:{$route(e,t){(!t||!t.params||+e.params.pk!=+t.params.pk)&&this.loadBooks(e.params)}},beforeMount(){this.setBookChangeFlag(),this.loadBooks()},methods:{..._(d,["setBookChangeFlag","loadBooks","toggleToolbars"]),click(){this.toggleToolbars(),this.setBookChangeFlag()},eager(e){return this.bookChange&&this.bookRoutes[this.bookChange]&&this.bookRoutes[this.bookChange].pk===e}}};function oo(e,t,a,u,i,o){const r=h("BookChangeActivator"),g=h("Pager");return c(),p(ue,{id:"booksWindow",direction:"vertical","model-value":e.currentBookPk,reverse:e.isBTT,"show-arrows":"",onClick:e.toggleToolbars},{prev:l(()=>[n(r,{direction:"prev"})]),next:l(()=>[n(r,{direction:"next"})]),default:l(()=>[(c(!0),w(B,null,V(e.books,m=>(c(),p(de,{key:`c/${m.pk}`,class:"windowItem",disabled:"",eager:o.eager(m.pk),value:m.pk,transition:!0},{default:l(()=>[n(g,{book:m,onClick:o.click},null,8,["book","onClick"])]),_:2},1032,["eager","value"]))),128))]),_:1},8,["model-value","reverse","onClick"])}const ao=b(to,[["render",oo],["__scopeId","data-v-1e3deb54"]]),so={name:"DownloadPanel",data(){return{mdiDownload:Re,mdiFileImage:Be}},computed:{...v(d,["activeTitle","routeParams"]),...P(d,{currentBook:e=>{var t;return(t=e.books)==null?void 0:t.current},storePage:e=>e.page}),downloadURL(){return je(this.currentBook)},filename(){var e;return(e=this.currentBook)==null?void 0:e.filename},pageSrc(){const{pk:e,mtime:t}=this.currentBook;return Ye({pk:e,page:this.storePage,mtime:t})},pageName(){return`${this.activeTitle} - page ${this.storePage}.jpg`}},methods:{..._(M,["downloadIOSPWAFix"]),downloadPage(){this.downloadIOSPWAFix(this.pageSrc,this.pageName)},downloadBook(){this.downloadIOSPWAFix(this.downloadURL,this.filename)}}},ro={key:0,id:"downloadPanel"};function no(e,t,a,u,i,o){return e.currentBook?(c(),w("div",ro,[n(z,{onClick:o.downloadPage},{default:l(()=>[n(W,null,{default:l(()=>[n(y,null,{default:l(()=>[k(f(i.mdiFileImage),1)]),_:1}),k("Download Page "+f(e.storePage),1)]),_:1})]),_:1},8,["onClick"]),n(z,{onClick:o.downloadBook},{default:l(()=>[n(W,null,{default:l(()=>[n(y,null,{default:l(()=>[k(f(i.mdiDownload),1)]),_:1}),k("Download Book ")]),_:1})]),_:1},8,["onClick"])])):S("",!0)}const io=b(so,[["render",no],["__scopeId","data-v-9e01f4cb"]]),lo={name:"KeyboardShortcutsPanel",data(){return{mdiMenuLeft:Te,mdiMenuRight:De,mdiKeyboardOutline:Ie,mdiKeyboardSpace:Le,mdiAppleKeyboardShift:$e}},computed:{...v(M,["isMobile"])}},C=e=>(Ve("data-v-a8b4ac47"),e=e(),Oe(),e),co=C(()=>s("h4",null,"Navigation",-1)),uo={class:"highlight-table"},ho=C(()=>s("td",null,"Previous page",-1)),po=C(()=>s("td",null,"Next page",-1)),go=C(()=>s("tr",null,[s("td",null,","),s("td",null,[k("Next "),s("em",null,"only"),k(" one page in two page mode.")])],-1)),mo=C(()=>s("tr",null,[s("td",null,"."),s("td",null,[k("Previous "),s("em",null,"only"),k(" one page in two page mode.")])],-1)),ko=C(()=>s("tr",null,[s("td",null,"p"),s("td",null,"Previous Book")],-1)),bo=C(()=>s("tr",null,[s("td",null,"n"),s("td",null,"Next Book")],-1)),_o=C(()=>s("tr",null,[s("td",null,"esc"),s("td",null,"Close book")],-1)),fo=C(()=>s("h4",null,"Fit Page To",-1)),vo=C(()=>s("table",{class:"highlight-table"},[s("tbody",null,[s("tr",null,[s("td",null,"s"),s("td",null,"screen")]),s("tr",null,[s("td",null,"h"),s("td",null,"screen height")]),s("tr",null,[s("td",null,"w"),s("td",null,"screen width")]),s("tr",null,[s("td",null,"o"),s("td",null,"Show page at original size")]),s("tr",null,[s("td",null,"2"),s("td",null,"Toggle two page view")]),s("tr",null,[s("td",null,"r"),s("td",null,"Read Right to Left")]),s("tr",null,[s("td",null,"l"),s("td",null,"Read Left to Right")]),s("tr",null,[s("td",null,"t"),s("td",null,"Read Top to Bottom")]),s("tr",null,[s("td",null,"b"),s("td",null,"Read in Bottom to Top")])])],-1)),Po=C(()=>s("h4",null,"Other",-1)),wo=C(()=>s("table",{class:"highlight-table"},[s("tbody",null,[s("tr",null,[s("td",null,"m"),s("td",null,"Show comic's metadata")]),s("tr",null,[s("td",null,"double click"),s("td",null,"Zoom page")])])],-1));function So(e,t,a,u,i,o){return e.isMobile?S("",!0):(c(),p(lt,{key:0},{default:l(()=>[n(rt,{id:"readerKeyboardShortcuts"},{default:l(()=>[n(nt,{id:"shortcutsTitle"},{default:l(()=>[n(y,{id:"keyboardIcon"},{default:l(()=>[k(f(i.mdiKeyboardOutline),1)]),_:1}),k("Keyboard Shortcuts ")]),_:1}),n(it,null,{default:l(()=>[co,s("table",uo,[s("tbody",null,[s("tr",null,[s("td",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiMenuLeft),1)]),_:1}),k(", j, "),s("div",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiAppleKeyboardShift),1)]),_:1}),n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiKeyboardSpace),1)]),_:1})])]),ho]),s("tr",null,[s("td",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiMenuRight),1)]),_:1}),k(", k, "),n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiKeyboardSpace),1)]),_:1})]),po]),go,mo,ko,bo,_o])]),fo,vo,Po,wo]),_:1})]),_:1})]),_:1}))}const yo=b(lo,[["render",So],["__scopeId","data-v-a8b4ac47"]]),be=["fitTo","readingDirection","twoPages"];Object.freeze(be);const Co={name:"ReaderSettingsPanel",data(){return{isGlobalScope:!1,mdiOpenInNew:Ne,openDelay:2e3}},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["isVertical","isPDF","cacheBook"]),...P(d,{choices:e=>e.choices,validBook:e=>{var t;return!!((t=e.books)!=null&&t.current)},selectedSettings(e){var t,a;return this.isGlobalScope||!((t=e.books)!=null&&t.current)?e.readerSettings:(a=e.books)==null?void 0:a.current.settings},isClearSettingsButtonDisabled(e){var t,a;if(this.isGlobalScope||!((t=e.books)!=null&&t.current))return!0;for(const u of be){const i=(a=e.books)==null?void 0:a.current.settings[u];if(!e.choices.nullValues.has(i))return!1}return!0},bookInBrowserURL(e){var t,a;return(t=e.books)!=null&&t.current?Ae((a=e.books)==null?void 0:a.current):""}}),...re(d,["readRtlInReverse"]),fitToChoices(){return this.choicesWithoutNull("fitTo")},readingDirectionChoices(){return this.choicesWithoutNull("readingDirection")},disableTwoPages(){return this.isVertical||this.isPDF&&this.cacheBook},disableCacheBook(){return this.isVertical&&this.isPDF}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(d,["clearSettingsLocal","setSettingsGlobal","setSettingsLocal","setSettingsClient"]),settingsDialogChanged(e){this.isGlobalScope?this.setSettingsGlobal(e):this.setSettingsLocal(e)},choicesWithoutNull(e){const t=[];for(const a of this.choices[e])a.value&&t.push(a);return Object.freeze(t),t},_keyUpListener(e){if(e.stopPropagation(),this.isAuthDialogOpen)return;let t;switch(e.key){case"w":t={fitTo:"W"};break;case"h":t={fitTo:"H"};break;case"s":t={fitTo:"S"};break;case"o":t={fitTo:"O"};break;case"2":t={twoPages:!this.selectedSettings.twoPages};break;case"l":t={readingDirection:"ltr"};break;case"r":t={readingDirection:"rtl"};break;case"t":t={readingDirection:"ttb"};break;case"b":t={readingDirection:"bbt"};break}t&&this.setSettingsLocal(t)}}},Ro={key:0,id:"readerSettings"},Bo={id:"readerScopedSettings"},To=["href"];function Do(e,t,a,u,i,o){return e.validBook?(c(),w("div",Ro,[n(E,{modelValue:i.isGlobalScope,"onUpdate:modelValue":t[0]||(t[0]=r=>i.isGlobalScope=r),density:"compact",label:"Scope","hide-details":"auto"},{default:l(()=>[n(I,{label:"Only this comic",value:!1}),n(I,{label:"Default for all comics",value:!0})]),_:1},8,["modelValue"]),s("div",Bo,[n(E,{class:"displayRadioGroup",density:"compact",label:"Display","hide-details":"auto","model-value":e.selectedSettings.fitTo,"onUpdate:modelValue":t[1]||(t[1]=r=>o.settingsDialogChanged({fitTo:r}))},{default:l(()=>[(c(!0),w(B,null,V(o.fitToChoices,r=>(c(),p(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),n(U,{disabled:o.disableTwoPages,class:"displayTwoPages",density:"compact",label:"Two pages","hide-details":"auto","model-value":e.selectedSettings.twoPages,"true-value":!0,indeterminate:e.selectedSettings.twoPages===null||e.selectedSettings.twoPages===void 0,"onUpdate:modelValue":t[2]||(t[2]=r=>o.settingsDialogChanged({twoPages:r}))},null,8,["disabled","model-value","indeterminate"]),n(E,{class:"displayRadioGroup",density:"compact",label:"Reading Direction","hide-details":"auto","model-value":e.selectedSettings.readingDirection,"onUpdate:modelValue":t[3]||(t[3]=r=>o.settingsDialogChanged({readingDirection:r}))},{default:l(()=>[(c(!0),w(B,null,V(o.readingDirectionChoices,r=>(c(),p(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),T(n(U,{"model-value":e.cacheBook,class:"cacheBook",density:"compact",disabled:o.disableCacheBook,label:"Cache Entire Book","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[4]||(t[4]=r=>e.setSettingsClient({cacheBook:r}))},null,8,["model-value","disabled"]),[[q,{openDelay:i.openDelay,text:"Cache all pages from this book in the browser"}]]),e.isPDF?(c(),w("a",{key:0,id:"readPDFInBrowser",href:e.bookInBrowserURL,target:"_blank"},[n(y,null,{default:l(()=>[k(f(i.mdiOpenInNew),1)]),_:1}),k("Read PDF in Browser ")],8,To)):S("",!0),i.isGlobalScope?(c(),p(U,{key:1,"model-value":e.selectedSettings.readRtlInReverse,class:"readRtlInReverse",density:"compact",label:"Read RTL Comics as LTR","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[5]||(t[5]=r=>o.settingsDialogChanged({readRtlInReverse:r}))},null,8,["model-value"])):S("",!0),i.isGlobalScope?S("",!0):T((c(),p(ne,{key:2,id:"clearSettingsButton",disabled:e.isClearSettingsButtonDisabled,onClick:e.clearSettingsLocal},{default:l(()=>[k(" Clear Settings ")]),_:1},8,["disabled","onClick"])),[[q,{openDelay:i.openDelay,text:"Use the default settings for all comics for this comic"}]])])])):S("",!0)}const Io=b(Co,[["render",Do],["__scopeId","data-v-993d7417"]]),Lo={name:"ReaderSettingsSuperPanel",components:{DownloadPanel:io,ReaderKeyboardShortcutsPanel:yo,ReaderSettingsPanel:Io}};function $o(e,t,a,u,i,o){const r=h("ReaderSettingsPanel"),g=h("ReaderKeyboardShortcutsPanel"),m=h("DownloadPanel");return c(),w(B,null,[n(r),n(H),n(g),n(H),n(m)],64)}const Vo=b(Lo,[["render",$o]]),Oo={name:"ReaderSettingsDrawer",components:{SettingsDrawer:Ze,ReaderSettingsSuperPanel:Vo}};function No(e,t,a,u,i,o){const r=h("ReaderSettingsSuperPanel"),g=h("SettingsDrawer");return c(),p(g,{title:"Reader",temporary:"","disable-resize-watcher":""},{panel:l(()=>[n(r)]),_:1})}const Ao=b(Oo,[["render",No]]),Q={a:Ue,f:xe,s:Fe},Eo={a:"Story Arc",f:"Folder",s:"Series"},Uo={name:"ReaderArcSelect",components:{ToolbarSelect:ct},computed:{...P(d,{arcGroup:e=>{var t;return((t=e.arc)==null?void 0:t.group)||"s"},arc:e=>e.arc,arcName:e=>{for(const t of e.arcs)if(e.arc.group===t.group&&e.arc.pks===t.pks)return t.name;return"Unknown"},arcItems:e=>{const t=[];for(const a of e.arcs){const u={value:a,title:a.name,group:a.group,subtitle:Eo[a.group],prependIcon:Q[a.group]};t.push(u)}return t}})},methods:{..._(d,["loadBooks"]),arcIcon(e){return Q[e]},checkIcon(e){return e===this.arc?Ee:""},onUpdate(e){const t=this.$route.params;if(!t)return;const a={group:e.group,pks:e.pks},u={...t,arc:a};this.loadBooks(u)}}},xo={id:"arcPos"};function Fo(e,t,a,u,i,o){const r=h("ToolbarSelect");return c(),p(r,{"model-value":e.arc,class:"arcSelect","select-label":"reading order",items:e.arcItems,disabled:!e.arcItems||e.arcItems.length<=1,"onUpdate:modelValue":o.onUpdate},{item:l(({item:g,props:m})=>[n(z,F(m,{density:"compact",variant:"plain","prepend-icon":g.raw.prependIcon,subtitle:g.raw.subtitle,"append-icon":o.checkIcon(m.value)}),null,16,["prepend-icon","subtitle","append-icon"])]),selection:l(({item:g,props:m})=>[n(y,F({size:"large"},m,{class:"arcSelectIcon"}),{default:l(()=>[k(f(o.arcIcon(g.raw.group)),1)]),_:2},1040),s("span",xo,f(e.arc.index)+" / "+f(e.arc.count),1)]),_:1},8,["model-value","items","disabled","onUpdate:modelValue"])}const zo=b(Uo,[["render",Fo],["__scopeId","data-v-42a57aca"]]),Mo={name:"ReaderTitleToolbar",components:{MetadataDialog:dt,ReaderArcSelect:zo,SettingsDrawerButton:Je},data(){return{mdiClose:ze,routeChanged:!1}},head(){return{meta:[{hid:"description",name:"description",content:`reader ${this.activeTitle} page ${this.storePage}`}]}},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["activeTitle","closeBookRoute"]),...P(d,{showToolbars:e=>e.showToolbars,currentBook:e=>{var t;return((t=e.books)==null?void 0:t.current)||{}},empty:e=>e.empty,subtitle:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.name)||""}}),title(){return this.activeTitle},extensionHeight(){let e=32;return this.subtitle&&(e*=2),e+=4,e}},watch:{$route(e,t){t&&(this.routeChanged=!0)}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(M,["setTimestamp"]),..._(d,["routeToDirection","routeToDirectionOne","routeToBook","setBookChangeFlag"]),openMetadata(){this.$refs.metadataDialog.dialog=!0},onCloseBook(){this.routeChanged&&this.setTimestamp()},_keyUpListener(e){if(e.stopPropagation(),!this.isAuthDialogOpen)switch(e.key){case"Escape":this.$refs.closeBook.$el.click();break;case"m":this.empty||this.openMetadata();break}}}},Wo={id:"title"},Ho={key:0,id:"subtitle"};function qo(e,t,a,u,i,o){const r=h("ReaderArcSelect"),g=h("MetadataDialog"),m=h("SettingsDrawerButton");return c(),p(We,null,{default:l(()=>[T(n(et,{id:"readerToolbarTop",density:"compact","extension-height":o.extensionHeight},Me({default:l(()=>[n(x,null,{default:l(()=>[n(ne,{ref:"closeBook",class:"closeBook",to:e.closeBookRoute,size:"large",density:"compact",variant:"plain",onClick:o.onCloseBook},{default:l(()=>[k(" close book ")]),_:1},8,["to","onClick"])]),_:1}),n(ut),e.empty?S("",!0):(c(),p(x,{key:0},{default:l(()=>[n(r),n(g,{ref:"metadataDialog",group:"c",toolbar:!0,book:e.currentBook},null,8,["book"])]),_:1})),n(x,null,{default:l(()=>[n(m)]),_:1})]),_:2},[o.title?{name:"extension",fn:l(()=>[n(Qe,{class:"readerTitle"},{default:l(()=>[s("div",Wo,f(o.title),1),e.subtitle?(c(),w("div",Ho,f(e.subtitle),1)):S("",!0)]),_:1})]),key:"0"}:void 0]),1032,["extension-height"]),[[ie,e.showToolbars]])]),_:1})}const _e=b(Mo,[["render",qo],["__scopeId","data-v-8ac187ef"]]),Go={name:"ReaderEmpty",components:{ReaderTopToolbar:_e},data(){return{mdiBookRemoveOutline:He}}};function Ko(e,t,a,u,i,o){const r=h("ReaderTopToolbar");return c(),w(B,null,[n(r),n(ce,{class:"empty",headline:"Book Not Found",title:"Close the reader and find another book",icon:i.mdiBookRemoveOutline},null,8,["icon"])],64)}const jo=b(Go,[["render",Ko],["__scopeId","data-v-65d65e48"]]),Yo={name:"ReaderBookChangeNavButton",components:{PaginationNavButton:he},props:{direction:{type:String,required:!0}},computed:{...v(d,["isBTT"]),...P(d,{toRoute(e){var a;const t=(a=e==null?void 0:e.routes)==null?void 0:a.books[this.direction];return t?{params:{...t}}:""}}),title(){return(this.direction==="prev"?"Previous":"Next")+" Book"},icon(){return this.bookChangeIcon(this.direction)},classes(){return{bookChangeNavButtonLeft:this.direction==="prev",bookChangeNavButtonRight:this.direction==="next"}}},methods:{..._(d,["bookChangeIcon"])}};function Xo(e,t,a,u,i,o){const r=h("PaginationNavButton");return e.toRoute?(c(),p(r,{key:0,class:R(o.classes),icon:"",variant:"plain",title:o.title,to:e.toRoute},{default:l(()=>[n(y,null,{default:l(()=>[k(f(o.icon),1)]),_:1})]),_:1},8,["class","title","to"])):S("",!0)}const Zo=b(Yo,[["render",Xo],["__scopeId","data-v-117f651c"]]),Jo={name:"ReaderNavButton",components:{PaginationNavButton:he},props:{value:{type:Number,required:!0},twoPages:{type:Boolean,default:!1}},computed:{...v(d,["isVertical"]),...P(d,{storePage:e=>e.page,toRoute(e){if(!this.isVertical)return{params:{pk:e.books.current.pk,page:this.value}}},isBookPrev:e=>!!e.routes.books.prev,isBookNext:e=>!!e.routes.books.next}),classes(){return{readerNavButtonLeft:!this.isBookPrev&&this.value===0,readerNavButtonRight:!this.isBookNext&&this.value!=0}},title(){return"Page "+this.value},disabled(){return this.value===this.storePage||this.twoPages&&!!(this.value%2)&&this.value-1===this.storePage}},methods:{..._(d,["setActivePage"]),onClick(){this.isVertical&&this.setActivePage(this.value,!0)}}};function Qo(e,t,a,u,i,o){const r=h("PaginationNavButton");return c(),p(r,{key:e.isVertical,disabled:o.disabled,class:R(["readerNavButton",o.classes]),title:o.title,to:e.toRoute,onClick:o.onClick},{default:l(()=>[k(f(a.value),1)]),_:1},8,["disabled","class","title","to","onClick"])}const ea=b(Jo,[["render",Qo],["__scopeId","data-v-530fba8c"]]),L="prev",$="next",ta={name:"ReaderNavToolbar",components:{PaginationSlider:ht,ReaderNavButton:ea,PaginationToolbar:pt,ReaderBookChangeNavButton:Zo},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["activeSettings","isReadInReverse","isVertical"]),...P(d,{showToolbars:e=>e.showToolbars,storePage:e=>e.page,key(e){var t,a;return`${(a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk}:${this.step}:${this.isReadInReverse}`},maxPage:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.maxPage)||0}}),twoPages(){return this.activeSettings.twoPages},step(){return this.activeSettings.twoPages?2:1},trackColor(){return this.twoPages&&+this.storePage>=this.maxPage-1?this.$vuetify.theme.current.colors.primary:""},min(){return this.isReadInReverse?this.maxPage:0},max(){return this.isReadInReverse?0:this.maxPage},bookPrev(){return this.isReadInReverse?"next":"prev"},bookNext(){return this.isReadInReverse?"prev":"next"}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(d,["routeToBook","routeToDirection","routeToDirectionOne","routeToPage","setActivePage"]),onSliderUpdate(e){this.isVertical?this.setActivePage(e,!0):this.routeToPage(e)},_keyUpListener(e){if(e.stopPropagation(),!this.isAuthDialogOpen)switch(e.key){case" ":!e.shiftKey&&window.innerHeight+window.scrollY+1>=document.body.scrollHeight?this.routeToDirection($):e.shiftKey&&window.scrollY===0&&this.routeToDirection(L);break;case"j":case"ArrowRight":this.routeToDirection($);break;case"k":case"ArrowLeft":this.routeToDirection(L);break;case",":this.routeToDirectionOne(L);break;case".":this.routeToDirectionOne($);break;case"n":this.routeToBook($);break;case"p":this.routeToBook(L);break}}}};function oa(e,t,a,u,i,o){const r=h("ReaderBookChangeNavButton"),g=h("ReaderNavButton"),m=h("PaginationSlider"),O=h("PaginationToolbar");return c(),p(qe,null,{default:l(()=>[e.maxPage?T((c(),p(O,{key:0,id:"readerToolbarNav"},{default:l(()=>[n(r,{direction:o.bookPrev,narrow:!1},null,8,["direction"]),n(g,{value:o.min,"two-pages":o.twoPages},null,8,["value","two-pages"]),(c(),p(m,{key:e.key,"model-value":e.storePage,min:0,max:e.maxPage,step:o.step,"track-color":o.trackColor,reverse:e.isReadInReverse,"onUpdate:modelValue":t[0]||(t[0]=N=>o.onSliderUpdate(N))},null,8,["model-value","max","step","track-color","reverse"])),n(g,{value:o.max,"two-pages":o.twoPages},null,8,["value","two-pages"]),n(r,{direction:o.bookNext,narrow:!1},null,8,["direction"])]),_:1},512)),[[ie,e.showToolbars]]):S("",!0)]),_:1})}const aa=b(ta,[["render",oa],["__scopeId","data-v-20fc0313"]]),sa={name:"MainReader",components:{BooksWindow:ao,ReaderEmpty:jo,ReaderNavToolbar:aa,ReaderTopToolbar:_e,ReaderSettingsDrawer:Ao,Unauthorized:ot},data(){return{showToolbars:!1}},computed:{...v(D,["isAuthorized"]),...P(D,{user:e=>e.user}),...P(d,{empty:e=>e.empty})},watch:{user(){this.loadReaderSettings()},isAuthorized(){this.loadReaderSettings()}},beforeMount(){d().$reset,this.loadReaderSettings()},methods:{..._(d,["loadReaderSettings"])}},ra={key:0},na={id:"readerContainer"};function ia(e,t,a,u,i,o){const r=h("ReaderTopToolbar"),g=h("BooksWindow"),m=h("ReaderNavToolbar"),O=h("ReaderEmpty"),N=h("ReaderSettingsDrawer"),fe=h("Unauthorized");return e.isAuthorized?(c(),p(at,{key:0,id:"readerWrapper"},{default:l(()=>[e.empty?(c(),p(O,{key:1})):(c(),w("div",ra,[s("div",na,[n(r),n(g),n(m)])])),n(N)]),_:1})):(c(),p(fe,{key:1}))}const Ra=b(sa,[["render",ia],["__scopeId","data-v-fa358348"]]);export{Ra as default};
|
|
1
|
+
const __vite__fileDeps=["assets/pdf-doc-8RVZqILx.js","assets/admin-drawer-panel-1pnfvY8O.js","assets/admin-drawer-panel-o87BwD38.css","assets/main-CMQwJ9aG.js","assets/main-Ztp855PW.css","assets/pdf-doc-CMzaSV_K.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{an as v,V as P,W as _,_ as b,Y as h,Z as c,X as p,$ as l,S as n,ao as y,ak as k,ap as f,al as R,aK as S,aH as w,aX as ee,U as B,bC as ve,bD as Pe,aw as F,bE as te,bF as oe,aJ as ae,bG as se,bH as we,b5 as Se,aU as T,bz as ye,aI as V,bu as re,aR as s,b3 as Ce,bI as Re,bJ as Be,D as M,aq as W,ar as z,bK as Te,bL as De,bM as Ie,bN as Le,bO as $e,aS as Ve,aT as Oe,aN as Ne,m as D,bP as Ae,av as ne,aV as H,bQ as Ee,bR as Ue,bj as xe,am as Fe,bS as ze,b7 as ie,bn as Me,bq as We,bT as He,bU as qe}from"./admin-drawer-panel-1pnfvY8O.js";import{b as d,c as Ge,_ as Ke,S as A,d as le,e as je,h as Ye}from"./main-CMQwJ9aG.js";import{d as Xe,b as Ze,S as Je,V as Qe,a as et}from"./settings-drawer-DbN6ISRH.js";import{P as tt,a as ce,U as ot,V as at}from"./unauthorized-BOIx7Y18.js";import{b as de,V as ue}from"./VWindowItem-7z55Y4lK.js";import{a as st}from"./VSelect-BoJq222l.js";import{V as rt,a as nt,b as it,c as lt}from"./VExpansionPanels-CgA3shsd.js";import{V as I,a as E}from"./VRadioGroup-B--7K_v5.js";import{V as U}from"./VCheckbox-eNspVUje.js";import{T as q,a as ct,M as dt,V as x,b as ut,P as he,c as ht,d as pt}from"./pagination-toolbar-LTuj5U-G.js";import"./copy-to-clipboard-DoUvDJVx.js";import"./VDialog-87AymJC5.js";import"./change-password-dialog-CjZdzaIk.js";import"./VTextField-CkWbil3K.js";import"./VSelectionControl-CVQ9wkE2.js";import"./VCheckboxBtn-DLzF_WHB.js";import"./VSlideGroup-Ce0j2BKK.js";import"./to-case-ehC9Ccyj.js";function pe(e,t){const{self:a=!1}=t.modifiers??{},u=t.value,i=typeof u=="object"&&u.options||{passive:!0},o=typeof u=="function"||"handleEvent"in u?u:u.handler,r=a?e:t.arg?document.querySelector(t.arg):window;r&&(r.addEventListener("scroll",o,i),e._onScroll=Object(e._onScroll),e._onScroll[t.instance.$.uid]={handler:o,options:i,target:a?void 0:r})}function ge(e,t){var o;if(!((o=e._onScroll)!=null&&o[t.instance.$.uid]))return;const{handler:a,options:u,target:i=e}=e._onScroll[t.instance.$.uid];i.removeEventListener("scroll",a,u),delete e._onScroll[t.instance.$.uid]}function gt(e,t){t.value!==t.oldValue&&(ge(e,t),pe(e,t))}const mt={mounted:pe,unmounted:ge,updated:gt},kt={name:"BookChangeDrawer",props:{direction:{type:String,required:!0}},head(){if(this.isDrawerOpen)return this.prefetchLinks(this.params,this.computedDirection,!0)},computed:{...v(d,["isBTT"]),...P(d,{computedDirection(){return this.normalizeDirection(this.direction)},params(e){return e.routes.books[this.computedDirection]},isDrawerOpen(e){return e.bookChange===this.computedDirection},icon(){return this.bookChangeIcon(this.computedDirection)}}),drawerLocation(){return this.bookChangeLocation(this.direction)},cursorClass(){return this.bookChangeCursorClass(this.computedDirection)},show(){return this.bookChangeShow(this.computedDirection)},route(){return this.toRoute(this.params)},label(){return this.linkLabel(this.computedDirection,"Book")}},methods:{..._(d,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute","bookChangeLocation","bookChangeCursorClass","bookChangeShow","bookChangeIcon"])}};function bt(e,t,a,u,i,o){const r=h("router-link");return o.show?(c(),p(Xe,{key:0,class:R(["bookChangeDrawer",{drawerActivated:e.isDrawerOpen}]),"disable-resize-watcher":"","disable-route-watcher":"",location:o.drawerLocation,"model-value":e.isDrawerOpen,scrim:!1,temporary:"",touchless:""},{default:l(()=>[n(r,{class:R({navLink:!0,[o.cursorClass]:!0}),to:o.route,"aria-label":o.label,title:o.label,onClick:t[0]||(t[0]=g=>g.stopImmediatePropagation())},{default:l(()=>[n(y,{class:"bookChangeIcon"},{default:l(()=>[k(f(e.icon),1)]),_:1})]),_:1},8,["class","to","aria-label","title"])]),_:1},8,["location","model-value","class"])):S("",!0)}const _t=b(kt,[["render",bt],["__scopeId","data-v-03e41a14"]]),ft={name:"BookChangeActivator",components:{BookChangeDrawer:_t},props:{direction:{type:String,required:!0}},computed:{computedDirection(){return this.normalizeDirection(this.direction)},positionClass(){return this.bookChangeLocation(this.direction)+"Pos"},cursorClass(){return this.bookChangeCursorClass(this.direction)},show(){return this.bookChangeShow(this.computedDirection)}},methods:{..._(d,["setBookChangeFlag","normalizeDirection","bookChangeLocation","bookChangeCursorClass","bookChangeShow"])}};function vt(e,t,a,u,i,o){const r=h("BookChangeDrawer");return c(),w(B,null,[o.show?(c(),w("div",{key:0,class:R(["bookChangeColumn",{[o.positionClass]:!0,[o.cursorClass]:!0}]),onClick:t[0]||(t[0]=ee(g=>e.setBookChangeFlag(a.direction),["stop"]))},null,2)):S("",!0),n(r,{direction:a.direction},null,8,["direction"])],64)}const Pt=b(ft,[["render",vt],["__scopeId","data-v-db3eb561"]]),wt={name:"LoadingPage",components:{Placeholder:tt},props:{twoPages:{type:Boolean,required:!0}}};function St(e,t,a,u,i,o){const r=h("Placeholder");return c(),w("div",{class:R(["pageLoading",{twoPages:a.twoPages}])},[n(r,{class:"pagePlaceholder"})],2)}const yt=b(wt,[["render",St],["__scopeId","data-v-04027168"]]),G="unauthorized",Ct={name:"ErrorPage",props:{twoPages:{type:Boolean,required:!0},type:{type:String,required:!0}},computed:{text(){return this.type===G?"Protected page":"Failed to load page"},icon(){return this.type===G?ve:Pe}}};function Rt(e,t,a,u,i,o){return c(),p(ce,{class:R(["pageError",{twoPages:a.twoPages}]),headline:o.text,icon:o.icon},null,8,["class","headline","icon"])}const Bt=b(Ct,[["render",Rt],["__scopeId","data-v-417a4cab"]]),Tt={name:"ImgPage",props:{book:{type:Object,required:!0},src:{type:String,required:!0}},emits:["load","error"],computed:{...P(d,{scale:e=>e.clientSettings.scale}),style(){const e={};if(this.scale==1)return e;const t=this.$el;if(!(t!=null&&t.naturalWidth))return e;const a=t.naturalWidth/2;return e.transformOrigin=`${a}px top`,e.transform=`scale(${this.scale})`,e},classes(){return this.fitToClass(this.book)}},methods:{..._(d,["fitToClass"])}},Dt=["src"];function It(e,t,a,u,i,o){return c(),w("img",F({class:[o.classes,"img"],draggable:"false",src:a.src,style:o.style},e.$attrs,{onError:t[0]||(t[0]=r=>e.$emit("error",r)),onLoad:t[1]||(t[1]=r=>e.$emit("load",r))}),null,16,Dt)}const K=b(Tt,[["render",It],["__scopeId","data-v-559e2ecc"]]),j=te(oe(()=>Ke(()=>import("./pdf-doc-8RVZqILx.js"),__vite__mapDeps([0,1,2,3,4,5])))),Lt=333,$t={name:"BookPage",components:{ErrorPage:Bt,LoadingPage:yt,PDFDoc:j,ImgPage:K},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},data(){return{showProgress:!1,loaded:!1,error:!1}},computed:{...v(d,["isVertical"]),...P(d,{scale:e=>e.clientSettings.scale}),style(){var a;const e={};if(this.book.fileType==="PDF"||this.scale==1)return e;const t=(a=this.$refs.pageComponent)==null?void 0:a.$el;return t!=null&&t.naturalHeight&&(e.height=t.naturalHeight*this.scale+"px",e.width=t.naturalWidth*this.scale+"px"),e},src(){const e={pk:this.book.pk,page:this.page,mtime:this.book.mtime};return Ge(e)},component(){return this.book.fileType==="PDF"?j:K},settings(){return this.getSettings(this.book)}},mounted(){setTimeout(function(){this.loaded||(this.loading=!0)},Lt)},methods:{..._(d,["getSettings"]),onLoad(){this.showProgress=!1,this.loaded=!0,this.error=!1},onError(){this.error="load",this.showProgress=!1},onUnauthorized(){this.error="unauthorized",this.showProgress=!1}}},Vt=["id","data-page"];function Ot(e,t,a,u,i,o){const r=h("ErrorPage"),g=h("LoadingPage");return c(),w("div",{id:`page${a.page}`,"data-page":a.page,class:"page",style:se(o.style)},[i.error?(c(),p(r,{key:0,"two-pages":o.settings.twoPages,type:i.error},null,8,["two-pages","type"])):i.showProgress&&!i.loaded?(c(),p(g,{key:1,"two-pages":o.settings.twoPages},null,8,["two-pages"])):(c(),p(ae(o.component),{key:2,ref:"pageComponent",book:a.book,page:1,src:o.src,onError:o.onError,onLoad:o.onLoad,onUnauthorized:o.onUnauthorized},null,40,["book","src","onError","onLoad","onUnauthorized"]))],12,Vt)}const me=b($t,[["render",Ot],["__scopeId","data-v-87996fa1"]]),Nt=.5,At={name:"ScaleForScroll",emits:["click"],data(){return{mdiMagnifyMinusOutline:we}},computed:{...P(d,{scale:e=>e.clientSettings.scale}),showReset(){return this.scale!=A},style(){return{cursor:this.scale==A?"zoom-in":"all-scroll"}}},methods:{..._(d,["setSettingsClient"]),clearSelection(){window.getSelection&&window.getSelection().removeAllRanges()},onDoubleClick(){this.clearSelection();const e=this.scale+Nt;this.setSettingsClient({scale:e})},scaleReset(){this.setSettingsClient({scale:A})}}};function Et(e,t,a,u,i,o){const r=Se("drag-scroller");return T((c(),w("div",{class:"scaleForScroll",style:se(o.style),onDblclick:t[0]||(t[0]=(...g)=>o.onDoubleClick&&o.onDoubleClick(...g))},[ye(e.$slots,"default",{},void 0,!0),o.showReset?(c(),p(y,{key:0,class:"resetIcon",onClick:ee(o.scaleReset,["stop"])},{default:l(()=>[k(f(i.mdiMagnifyMinusOutline),1)]),_:1},8,["onClick"])):S("",!0)],36)),[[r,,void 0,{onlyX:!0}]])}const ke=b(At,[["render",Et],["__scopeId","data-v-b24267c0"]]),Ut={name:"HorizontalPages",components:{BookPage:me,ScaleForScroll:ke},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},emits:["click"],computed:{...v(d,["isCoverPage","isReadInReverse"]),showSecondPage(){return this.getSettings(this.book).twoPages&&this.page<this.book.maxPage&&!this.isCoverPage(this.book,this.page)},showPageOne(){return!this.isReadInReverse||this.showSecondPage},showPageTwo(){return this.isReadInReverse||this.showSecondPage},pageOne(){return this.isReadInReverse?this.page+1:this.page},pageTwo(){return this.isReadInReverse?this.page:this.page+1}},methods:{..._(d,["getSettings"])}};function xt(e,t,a,u,i,o){const r=h("BookPage"),g=h("ScaleForScroll");return c(),p(g,{class:"noWrap"},{default:l(()=>[o.showPageOne?(c(),p(r,{key:0,ref:"pageOne",book:a.book,page:o.pageOne,class:"horizontalPage"},null,8,["book","page"])):S("",!0),o.showPageTwo?(c(),p(r,{key:1,book:a.book,page:o.pageTwo,class:"horizontalPage"},null,8,["book","page"])):S("",!0)]),_:1})}const Ft=b(Ut,[["render",xt],["__scopeId","data-v-9a560964"]]),zt={name:"PageChangeLink",props:{direction:{type:String,required:!0}},head(){return this.prefetchLinks(this.params,this.computedDirection)},computed:{...v(d,["isVertical","isFirstPage","isLastPage"]),...P(d,{params(e){return e.routes[this.computedDirection]}}),computedDirection(){return this.normalizeDirection(this.direction)},show(){return this.computedDirection==="prev"?!this.isFirstPage:!this.isLastPage},pageChangeClass(){let e="pageChange";return e+=this.isVertical?"Row":"Column",e},directionClass(){let e=this.direction;return this.isVertical&&(e+="Vertical"),e},route(){return this.toRoute(this.params)},label(){return this.linkLabel(this.computedDirection,"Page")}},methods:{..._(d,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute"])}};function Mt(e,t,a,u,i,o){const r=h("router-link");return o.show?(c(),p(r,{key:0,to:o.route,"aria-label":o.label,class:R({[o.pageChangeClass]:!0,[o.directionClass]:!0}),onClick:t[0]||(t[0]=g=>g.stopImmediatePropagation())},null,8,["to","aria-label","class"])):S("",!0)}const Wt=b(zt,[["render",Mt],["__scopeId","data-v-9ade7d96"]]),Ht=48,qt=48,Gt={name:"PagerHorizontal",components:{HorizontalPages:Ft,PageChangeLink:Wt},props:{book:{type:Object,required:!0}},data(){return{activePage:0,pages:[]}},computed:{...v(d,["isReadInReverse"]),...P(d,{prevBook:e=>{var t;return(t=e.routes.books)==null?void 0:t.prev},nextBook:e=>{var t;return(t=e.routes.books)==null?void 0:t.next},storePage:e=>e.page,storePk:e=>e.books.current.pk}),twoPages(){return this.getSettings(this.book).twoPages},windowIndex(){const e=this.activePage-this.pages[0];return Math.min(Math.max(0,e),this.book.maxPage)}},watch:{twoPages(){this.setActivePage(this.storePage,!0)},storePage(e){if(this.book.pk===this.storePk){this.activePage=e;const t=this.pages.at(0),a=this.pages.at(-1);(e<t||e>a)&&this.setPages()}},prevBook(e){this.book.pk===e.pk&&(this.activePage=this.book.maxPage)},nextBook(e){this.book.pk===e.pk&&(this.activePage=0)}},created(){this.book.pk===this.storePk?this.activePage=+this.$route.params.page:this.book.pk===this.prevBook.pk?this.activePage=this.book.maxPage:this.activePage=0,this.setPages()},methods:{..._(d,["getSettings","setBookChangeFlag","setActivePage"]),setPages(){const e=Math.max(this.activePage-Ht,0),t=Math.min(this.activePage+qt,this.book.maxPage),a=le.range(e,t+1);this.pages=a}}};function Kt(e,t,a,u,i,o){const r=h("PageChangeLink"),g=h("HorizontalPages");return c(),p(ue,{"show-arrows":"",continuous:"","model-value":o.windowIndex,reverse:e.isReadInReverse},{prev:l(()=>[n(r,{direction:"prev"})]),next:l(()=>[n(r,{direction:"next"})]),default:l(()=>[(c(!0),w(B,null,V(i.pages,m=>(c(),p(de,{key:`c/${a.book.pk}/${m}`,class:"windowItem",disabled:"",eager:m>=e.storePage-1&&m<=e.storePage+2,"model-value":m,transition:!0},{default:l(()=>[n(g,{book:a.book,page:m},null,8,["book","page"])]),_:2},1032,["eager","model-value"]))),128))]),_:1},8,["model-value","reverse"])}const Y=b(Gt,[["render",Kt],["__scopeId","data-v-e04bbc00"]]),jt=12,X=250,Yt={name:"PagerVertical",components:{BookPage:me,ScaleForScroll:ke},props:{book:{type:Object,required:!0}},data(){return{innerHeight:window.innerHeight,innerWidth:window.innerWidth,intersectorOn:!1,programmaticScroll:!1}},computed:{...P(d,{storePage:e=>e.page,showToolbars:e=>e.showToolbars}),...re(d,["reactWithScroll"]),settings(){return this.getSettings(this.book)},readInReverse(){return this.settings.readInReverse},items(){var a;const e=(a=this.book)!=null&&a.maxPage?this.book.maxPage+1:0,t=le.range(0,e);return this.readInReverse&&t.reverse(),t},visibleItems(){var e;return Math.min(((e=this.book)==null?void 0:e.maxPage)??0,jt)}},watch:{storePage(e){this.reactWithScroll&&this.scrollToPage(e)}},mounted(){window.addEventListener("resize",this.onResize),setTimeout(()=>{this.scrollToPage(this.storePage)},X)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{..._(d,["setActivePage","setBookChangeFlag","getSettings"]),onIntersect(e,t){if(e&&this.intersectorOn){const u=+t[0].target.dataset.page;this.setActivePage(u,!1)}},onScroll(){if(this.programmaticScroll)return;this.intersectorOn=!0;const e=this.$refs.verticalScroll.$el,t=e.scrollTop;if(this.storePage===0&&t===0)this.setBookChangeFlag("prev");else if(this.storePage===this.book.maxPage){const a=e.scrollTopMax||e.scrollHeight-e.clientTop;window.innerHeight+t+1>=a&&this.setBookChangeFlag("next")}},scrollToPage(e){this.intersectorOn=!1,this.programmaticScroll=!0;const t=this.$refs.verticalScroll;t?t.scrollToIndex(e):console.debug("Can't find verticalScroll component."),setTimeout(()=>{this.programmaticScroll=!1},X)},onResize(){this.innerHeight=window.innerHeight,this.innerWidth=window.innerWidth}}},Xt=["data-page"];function Zt(e,t,a,u,i,o){const r=h("BookPage"),g=h("ScaleForScroll");return c(),p(g,null,{default:l(()=>[T((c(),p(st,{id:"verticalScroll",key:o.readInReverse,ref:"verticalScroll",items:o.items,height:i.innerHeight,width:i.innerWidth},{default:l(({item:m})=>[n(r,{book:a.book,page:m,class:"verticalPage"},null,8,["book","page"]),T(s("div",{class:R(["pageTracker",{pageTrackerToolbars:e.showToolbars}]),"data-page":m},null,10,Xt),[[Ce,{handler:o.onIntersect,options:{threshold:[.75]}},void 0,{quiet:!0}]])]),_:1},8,["items","height","width"])),[[mt,o.onScroll,"#verticalScroll"]])]),_:1})}const Z=b(Yt,[["render",Zt],["__scopeId","data-v-ef3b4ade"]]),J=te(oe(()=>"@/components/reader/pager/pager-full-pdf.vue")),Jt={name:"PagerSelector",components:{PagerHorizontal:Y,PagerPDF:J,PagerVertical:Z},props:{book:{type:Object,required:!0}},emits:["click"],head(){return this.prefetchBook(this.book)},computed:{...v(d,["isVertical","cacheBook"]),...P(d,{storePk:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk)||0}}),readFullPdf(){return this.book.fileType=="PDF"&&this.cacheBook},component(){return this.readFullPdf?J:this.isVertical?Z:Y}},watch:{$route(e){+e.params.pk===this.book.pk&&this.setActivePage(+e.params.page,!0)}},created(){this.book.pk===this.storePk&&this.setActivePage(+this.$route.params.page,!0)},methods:{..._(d,["getSettings","setActivePage","prefetchBook"])}};function Qt(e,t,a,u,i,o){return c(),p(ae(o.component),{book:a.book},null,8,["book"])}const eo=b(Jt,[["render",Qt]]),to={name:"BooksWindow",components:{BookChangeActivator:Pt,Pager:eo},computed:{...v(d,["isBTT"]),...P(d,{books:e=>[e.books.prev,e.books.current,e.books.next].filter(Boolean),bookChange:e=>e.bookChange,currentBookPk:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk)||0},bookRoutes:e=>e.routes.books})},watch:{$route(e,t){(!t||!t.params||+e.params.pk!=+t.params.pk)&&this.loadBooks(e.params)}},beforeMount(){this.setBookChangeFlag(),this.loadBooks()},methods:{..._(d,["setBookChangeFlag","loadBooks","toggleToolbars"]),click(){this.toggleToolbars(),this.setBookChangeFlag()},eager(e){return this.bookChange&&this.bookRoutes[this.bookChange]&&this.bookRoutes[this.bookChange].pk===e}}};function oo(e,t,a,u,i,o){const r=h("BookChangeActivator"),g=h("Pager");return c(),p(ue,{id:"booksWindow",direction:"vertical","model-value":e.currentBookPk,reverse:e.isBTT,"show-arrows":"",onClick:e.toggleToolbars},{prev:l(()=>[n(r,{direction:"prev"})]),next:l(()=>[n(r,{direction:"next"})]),default:l(()=>[(c(!0),w(B,null,V(e.books,m=>(c(),p(de,{key:`c/${m.pk}`,class:"windowItem",disabled:"",eager:o.eager(m.pk),value:m.pk,transition:!0},{default:l(()=>[n(g,{book:m,onClick:o.click},null,8,["book","onClick"])]),_:2},1032,["eager","value"]))),128))]),_:1},8,["model-value","reverse","onClick"])}const ao=b(to,[["render",oo],["__scopeId","data-v-1e3deb54"]]),so={name:"DownloadPanel",data(){return{mdiDownload:Re,mdiFileImage:Be}},computed:{...v(d,["activeTitle","routeParams"]),...P(d,{currentBook:e=>{var t;return(t=e.books)==null?void 0:t.current},storePage:e=>e.page}),downloadURL(){return je(this.currentBook)},filename(){var e;return(e=this.currentBook)==null?void 0:e.filename},pageSrc(){const{pk:e,mtime:t}=this.currentBook;return Ye({pk:e,page:this.storePage,mtime:t})},pageName(){return`${this.activeTitle} - page ${this.storePage}.jpg`}},methods:{..._(M,["downloadIOSPWAFix"]),downloadPage(){this.downloadIOSPWAFix(this.pageSrc,this.pageName)},downloadBook(){this.downloadIOSPWAFix(this.downloadURL,this.filename)}}},ro={key:0,id:"downloadPanel"};function no(e,t,a,u,i,o){return e.currentBook?(c(),w("div",ro,[n(z,{onClick:o.downloadPage},{default:l(()=>[n(W,null,{default:l(()=>[n(y,null,{default:l(()=>[k(f(i.mdiFileImage),1)]),_:1}),k("Download Page "+f(e.storePage),1)]),_:1})]),_:1},8,["onClick"]),n(z,{onClick:o.downloadBook},{default:l(()=>[n(W,null,{default:l(()=>[n(y,null,{default:l(()=>[k(f(i.mdiDownload),1)]),_:1}),k("Download Book ")]),_:1})]),_:1},8,["onClick"])])):S("",!0)}const io=b(so,[["render",no],["__scopeId","data-v-9e01f4cb"]]),lo={name:"KeyboardShortcutsPanel",data(){return{mdiMenuLeft:Te,mdiMenuRight:De,mdiKeyboardOutline:Ie,mdiKeyboardSpace:Le,mdiAppleKeyboardShift:$e}},computed:{...v(M,["isMobile"])}},C=e=>(Ve("data-v-a8b4ac47"),e=e(),Oe(),e),co=C(()=>s("h4",null,"Navigation",-1)),uo={class:"highlight-table"},ho=C(()=>s("td",null,"Previous page",-1)),po=C(()=>s("td",null,"Next page",-1)),go=C(()=>s("tr",null,[s("td",null,","),s("td",null,[k("Next "),s("em",null,"only"),k(" one page in two page mode.")])],-1)),mo=C(()=>s("tr",null,[s("td",null,"."),s("td",null,[k("Previous "),s("em",null,"only"),k(" one page in two page mode.")])],-1)),ko=C(()=>s("tr",null,[s("td",null,"p"),s("td",null,"Previous Book")],-1)),bo=C(()=>s("tr",null,[s("td",null,"n"),s("td",null,"Next Book")],-1)),_o=C(()=>s("tr",null,[s("td",null,"esc"),s("td",null,"Close book")],-1)),fo=C(()=>s("h4",null,"Fit Page To",-1)),vo=C(()=>s("table",{class:"highlight-table"},[s("tbody",null,[s("tr",null,[s("td",null,"s"),s("td",null,"screen")]),s("tr",null,[s("td",null,"h"),s("td",null,"screen height")]),s("tr",null,[s("td",null,"w"),s("td",null,"screen width")]),s("tr",null,[s("td",null,"o"),s("td",null,"Show page at original size")]),s("tr",null,[s("td",null,"2"),s("td",null,"Toggle two page view")]),s("tr",null,[s("td",null,"r"),s("td",null,"Read Right to Left")]),s("tr",null,[s("td",null,"l"),s("td",null,"Read Left to Right")]),s("tr",null,[s("td",null,"t"),s("td",null,"Read Top to Bottom")]),s("tr",null,[s("td",null,"b"),s("td",null,"Read in Bottom to Top")])])],-1)),Po=C(()=>s("h4",null,"Other",-1)),wo=C(()=>s("table",{class:"highlight-table"},[s("tbody",null,[s("tr",null,[s("td",null,"m"),s("td",null,"Show comic's metadata")]),s("tr",null,[s("td",null,"double click"),s("td",null,"Zoom page")])])],-1));function So(e,t,a,u,i,o){return e.isMobile?S("",!0):(c(),p(lt,{key:0},{default:l(()=>[n(rt,{id:"readerKeyboardShortcuts"},{default:l(()=>[n(nt,{id:"shortcutsTitle"},{default:l(()=>[n(y,{id:"keyboardIcon"},{default:l(()=>[k(f(i.mdiKeyboardOutline),1)]),_:1}),k("Keyboard Shortcuts ")]),_:1}),n(it,null,{default:l(()=>[co,s("table",uo,[s("tbody",null,[s("tr",null,[s("td",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiMenuLeft),1)]),_:1}),k(", j, "),s("div",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiAppleKeyboardShift),1)]),_:1}),n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiKeyboardSpace),1)]),_:1})])]),ho]),s("tr",null,[s("td",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiMenuRight),1)]),_:1}),k(", k, "),n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiKeyboardSpace),1)]),_:1})]),po]),go,mo,ko,bo,_o])]),fo,vo,Po,wo]),_:1})]),_:1})]),_:1}))}const yo=b(lo,[["render",So],["__scopeId","data-v-a8b4ac47"]]),be=["fitTo","readingDirection","twoPages"];Object.freeze(be);const Co={name:"ReaderSettingsPanel",data(){return{isGlobalScope:!1,mdiOpenInNew:Ne,openDelay:2e3}},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["isVertical","isPDF","cacheBook"]),...P(d,{choices:e=>e.choices,validBook:e=>{var t;return!!((t=e.books)!=null&&t.current)},selectedSettings(e){var t,a;return this.isGlobalScope||!((t=e.books)!=null&&t.current)?e.readerSettings:(a=e.books)==null?void 0:a.current.settings},isClearSettingsButtonDisabled(e){var t,a;if(this.isGlobalScope||!((t=e.books)!=null&&t.current))return!0;for(const u of be){const i=(a=e.books)==null?void 0:a.current.settings[u];if(!e.choices.nullValues.has(i))return!1}return!0},bookInBrowserURL(e){var t,a;return(t=e.books)!=null&&t.current?Ae((a=e.books)==null?void 0:a.current):""}}),...re(d,["readRtlInReverse"]),fitToChoices(){return this.choicesWithoutNull("fitTo")},readingDirectionChoices(){return this.choicesWithoutNull("readingDirection")},disableTwoPages(){return this.isVertical||this.isPDF&&this.cacheBook},disableCacheBook(){return this.isVertical&&this.isPDF}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(d,["clearSettingsLocal","setSettingsGlobal","setSettingsLocal","setSettingsClient"]),settingsDialogChanged(e){this.isGlobalScope?this.setSettingsGlobal(e):this.setSettingsLocal(e)},choicesWithoutNull(e){const t=[];for(const a of this.choices[e])a.value&&t.push(a);return Object.freeze(t),t},_keyUpListener(e){if(e.stopPropagation(),this.isAuthDialogOpen)return;let t;switch(e.key){case"w":t={fitTo:"W"};break;case"h":t={fitTo:"H"};break;case"s":t={fitTo:"S"};break;case"o":t={fitTo:"O"};break;case"2":t={twoPages:!this.selectedSettings.twoPages};break;case"l":t={readingDirection:"ltr"};break;case"r":t={readingDirection:"rtl"};break;case"t":t={readingDirection:"ttb"};break;case"b":t={readingDirection:"bbt"};break}t&&this.setSettingsLocal(t)}}},Ro={key:0,id:"readerSettings"},Bo={id:"readerScopedSettings"},To=["href"];function Do(e,t,a,u,i,o){return e.validBook?(c(),w("div",Ro,[n(E,{modelValue:i.isGlobalScope,"onUpdate:modelValue":t[0]||(t[0]=r=>i.isGlobalScope=r),density:"compact",label:"Scope","hide-details":"auto"},{default:l(()=>[n(I,{label:"Only this comic",value:!1}),n(I,{label:"Default for all comics",value:!0})]),_:1},8,["modelValue"]),s("div",Bo,[n(E,{class:"displayRadioGroup",density:"compact",label:"Display","hide-details":"auto","model-value":e.selectedSettings.fitTo,"onUpdate:modelValue":t[1]||(t[1]=r=>o.settingsDialogChanged({fitTo:r}))},{default:l(()=>[(c(!0),w(B,null,V(o.fitToChoices,r=>(c(),p(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),n(U,{disabled:o.disableTwoPages,class:"displayTwoPages",density:"compact",label:"Two pages","hide-details":"auto","model-value":e.selectedSettings.twoPages,"true-value":!0,indeterminate:e.selectedSettings.twoPages===null||e.selectedSettings.twoPages===void 0,"onUpdate:modelValue":t[2]||(t[2]=r=>o.settingsDialogChanged({twoPages:r}))},null,8,["disabled","model-value","indeterminate"]),n(E,{class:"displayRadioGroup",density:"compact",label:"Reading Direction","hide-details":"auto","model-value":e.selectedSettings.readingDirection,"onUpdate:modelValue":t[3]||(t[3]=r=>o.settingsDialogChanged({readingDirection:r}))},{default:l(()=>[(c(!0),w(B,null,V(o.readingDirectionChoices,r=>(c(),p(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),T(n(U,{"model-value":e.cacheBook,class:"cacheBook",density:"compact",disabled:o.disableCacheBook,label:"Cache Entire Book","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[4]||(t[4]=r=>e.setSettingsClient({cacheBook:r}))},null,8,["model-value","disabled"]),[[q,{openDelay:i.openDelay,text:"Cache all pages from this book in the browser"}]]),e.isPDF?(c(),w("a",{key:0,id:"readPDFInBrowser",href:e.bookInBrowserURL,target:"_blank"},[n(y,null,{default:l(()=>[k(f(i.mdiOpenInNew),1)]),_:1}),k("Read PDF in Browser ")],8,To)):S("",!0),i.isGlobalScope?(c(),p(U,{key:1,"model-value":e.selectedSettings.readRtlInReverse,class:"readRtlInReverse",density:"compact",label:"Read RTL Comics as LTR","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[5]||(t[5]=r=>o.settingsDialogChanged({readRtlInReverse:r}))},null,8,["model-value"])):S("",!0),i.isGlobalScope?S("",!0):T((c(),p(ne,{key:2,id:"clearSettingsButton",disabled:e.isClearSettingsButtonDisabled,onClick:e.clearSettingsLocal},{default:l(()=>[k(" Clear Settings ")]),_:1},8,["disabled","onClick"])),[[q,{openDelay:i.openDelay,text:"Use the default settings for all comics for this comic"}]])])])):S("",!0)}const Io=b(Co,[["render",Do],["__scopeId","data-v-993d7417"]]),Lo={name:"ReaderSettingsSuperPanel",components:{DownloadPanel:io,ReaderKeyboardShortcutsPanel:yo,ReaderSettingsPanel:Io}};function $o(e,t,a,u,i,o){const r=h("ReaderSettingsPanel"),g=h("ReaderKeyboardShortcutsPanel"),m=h("DownloadPanel");return c(),w(B,null,[n(r),n(H),n(g),n(H),n(m)],64)}const Vo=b(Lo,[["render",$o]]),Oo={name:"ReaderSettingsDrawer",components:{SettingsDrawer:Ze,ReaderSettingsSuperPanel:Vo}};function No(e,t,a,u,i,o){const r=h("ReaderSettingsSuperPanel"),g=h("SettingsDrawer");return c(),p(g,{title:"Reader",temporary:"","disable-resize-watcher":""},{panel:l(()=>[n(r)]),_:1})}const Ao=b(Oo,[["render",No]]),Q={a:Ue,f:xe,s:Fe},Eo={a:"Story Arc",f:"Folder",s:"Series"},Uo={name:"ReaderArcSelect",components:{ToolbarSelect:ct},computed:{...P(d,{arcGroup:e=>{var t;return((t=e.arc)==null?void 0:t.group)||"s"},arc:e=>e.arc,arcName:e=>{for(const t of e.arcs)if(e.arc.group===t.group&&e.arc.pks===t.pks)return t.name;return"Unknown"},arcItems:e=>{const t=[];for(const a of e.arcs){const u={value:a,title:a.name,group:a.group,subtitle:Eo[a.group],prependIcon:Q[a.group]};t.push(u)}return t}})},methods:{..._(d,["loadBooks"]),arcIcon(e){return Q[e]},checkIcon(e){return e===this.arc?Ee:""},onUpdate(e){const t=this.$route.params;if(!t)return;const a={group:e.group,pks:e.pks},u={...t,arc:a};this.loadBooks(u)}}},xo={id:"arcPos"};function Fo(e,t,a,u,i,o){const r=h("ToolbarSelect");return c(),p(r,{"model-value":e.arc,class:"arcSelect","select-label":"reading order",items:e.arcItems,disabled:!e.arcItems||e.arcItems.length<=1,"onUpdate:modelValue":o.onUpdate},{item:l(({item:g,props:m})=>[n(z,F(m,{density:"compact",variant:"plain","prepend-icon":g.raw.prependIcon,subtitle:g.raw.subtitle,"append-icon":o.checkIcon(m.value)}),null,16,["prepend-icon","subtitle","append-icon"])]),selection:l(({item:g,props:m})=>[n(y,F({size:"large"},m,{class:"arcSelectIcon"}),{default:l(()=>[k(f(o.arcIcon(g.raw.group)),1)]),_:2},1040),s("span",xo,f(e.arc.index)+" / "+f(e.arc.count),1)]),_:1},8,["model-value","items","disabled","onUpdate:modelValue"])}const zo=b(Uo,[["render",Fo],["__scopeId","data-v-42a57aca"]]),Mo={name:"ReaderTitleToolbar",components:{MetadataDialog:dt,ReaderArcSelect:zo,SettingsDrawerButton:Je},data(){return{mdiClose:ze,routeChanged:!1}},head(){return{meta:[{hid:"description",name:"description",content:`reader ${this.activeTitle} page ${this.storePage}`}]}},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["activeTitle","closeBookRoute"]),...P(d,{showToolbars:e=>e.showToolbars,currentBook:e=>{var t;return((t=e.books)==null?void 0:t.current)||{}},empty:e=>e.empty,subtitle:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.name)||""}}),title(){return this.activeTitle},extensionHeight(){let e=32;return this.subtitle&&(e*=2),e+=4,e}},watch:{$route(e,t){t&&(this.routeChanged=!0)}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(M,["setTimestamp"]),..._(d,["routeToDirection","routeToDirectionOne","routeToBook","setBookChangeFlag"]),openMetadata(){this.$refs.metadataDialog.dialog=!0},onCloseBook(){this.routeChanged&&this.setTimestamp()},_keyUpListener(e){if(e.stopPropagation(),!this.isAuthDialogOpen)switch(e.key){case"Escape":this.$refs.closeBook.$el.click();break;case"m":this.empty||this.openMetadata();break}}}},Wo={id:"title"},Ho={key:0,id:"subtitle"};function qo(e,t,a,u,i,o){const r=h("ReaderArcSelect"),g=h("MetadataDialog"),m=h("SettingsDrawerButton");return c(),p(We,null,{default:l(()=>[T(n(et,{id:"readerToolbarTop",density:"compact","extension-height":o.extensionHeight},Me({default:l(()=>[n(x,null,{default:l(()=>[n(ne,{ref:"closeBook",class:"closeBook",to:e.closeBookRoute,size:"large",density:"compact",variant:"plain",onClick:o.onCloseBook},{default:l(()=>[k(" close book ")]),_:1},8,["to","onClick"])]),_:1}),n(ut),e.empty?S("",!0):(c(),p(x,{key:0},{default:l(()=>[n(r),n(g,{ref:"metadataDialog",group:"c",toolbar:!0,book:e.currentBook},null,8,["book"])]),_:1})),n(x,null,{default:l(()=>[n(m)]),_:1})]),_:2},[o.title?{name:"extension",fn:l(()=>[n(Qe,{class:"readerTitle"},{default:l(()=>[s("div",Wo,f(o.title),1),e.subtitle?(c(),w("div",Ho,f(e.subtitle),1)):S("",!0)]),_:1})]),key:"0"}:void 0]),1032,["extension-height"]),[[ie,e.showToolbars]])]),_:1})}const _e=b(Mo,[["render",qo],["__scopeId","data-v-8ac187ef"]]),Go={name:"ReaderEmpty",components:{ReaderTopToolbar:_e},data(){return{mdiBookRemoveOutline:He}}};function Ko(e,t,a,u,i,o){const r=h("ReaderTopToolbar");return c(),w(B,null,[n(r),n(ce,{class:"empty",headline:"Book Not Found",title:"Close the reader and find another book",icon:i.mdiBookRemoveOutline},null,8,["icon"])],64)}const jo=b(Go,[["render",Ko],["__scopeId","data-v-65d65e48"]]),Yo={name:"ReaderBookChangeNavButton",components:{PaginationNavButton:he},props:{direction:{type:String,required:!0}},computed:{...v(d,["isBTT"]),...P(d,{toRoute(e){var a;const t=(a=e==null?void 0:e.routes)==null?void 0:a.books[this.direction];return t?{params:{...t}}:""}}),title(){return(this.direction==="prev"?"Previous":"Next")+" Book"},icon(){return this.bookChangeIcon(this.direction)},classes(){return{bookChangeNavButtonLeft:this.direction==="prev",bookChangeNavButtonRight:this.direction==="next"}}},methods:{..._(d,["bookChangeIcon"])}};function Xo(e,t,a,u,i,o){const r=h("PaginationNavButton");return e.toRoute?(c(),p(r,{key:0,class:R(o.classes),icon:"",variant:"plain",title:o.title,to:e.toRoute},{default:l(()=>[n(y,null,{default:l(()=>[k(f(o.icon),1)]),_:1})]),_:1},8,["class","title","to"])):S("",!0)}const Zo=b(Yo,[["render",Xo],["__scopeId","data-v-117f651c"]]),Jo={name:"ReaderNavButton",components:{PaginationNavButton:he},props:{value:{type:Number,required:!0},twoPages:{type:Boolean,default:!1}},computed:{...v(d,["isVertical"]),...P(d,{storePage:e=>e.page,toRoute(e){if(!this.isVertical)return{params:{pk:e.books.current.pk,page:this.value}}},isBookPrev:e=>!!e.routes.books.prev,isBookNext:e=>!!e.routes.books.next}),classes(){return{readerNavButtonLeft:!this.isBookPrev&&this.value===0,readerNavButtonRight:!this.isBookNext&&this.value!=0}},title(){return"Page "+this.value},disabled(){return this.value===this.storePage||this.twoPages&&!!(this.value%2)&&this.value-1===this.storePage}},methods:{..._(d,["setActivePage"]),onClick(){this.isVertical&&this.setActivePage(this.value,!0)}}};function Qo(e,t,a,u,i,o){const r=h("PaginationNavButton");return c(),p(r,{key:e.isVertical,disabled:o.disabled,class:R(["readerNavButton",o.classes]),title:o.title,to:e.toRoute,onClick:o.onClick},{default:l(()=>[k(f(a.value),1)]),_:1},8,["disabled","class","title","to","onClick"])}const ea=b(Jo,[["render",Qo],["__scopeId","data-v-530fba8c"]]),L="prev",$="next",ta={name:"ReaderNavToolbar",components:{PaginationSlider:ht,ReaderNavButton:ea,PaginationToolbar:pt,ReaderBookChangeNavButton:Zo},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["activeSettings","isReadInReverse","isVertical"]),...P(d,{showToolbars:e=>e.showToolbars,storePage:e=>e.page,key(e){var t,a;return`${(a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk}:${this.step}:${this.isReadInReverse}`},maxPage:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.maxPage)||0}}),twoPages(){return this.activeSettings.twoPages},step(){return this.activeSettings.twoPages?2:1},trackColor(){return this.twoPages&&+this.storePage>=this.maxPage-1?this.$vuetify.theme.current.colors.primary:""},min(){return this.isReadInReverse?this.maxPage:0},max(){return this.isReadInReverse?0:this.maxPage},bookPrev(){return this.isReadInReverse?"next":"prev"},bookNext(){return this.isReadInReverse?"prev":"next"}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(d,["routeToBook","routeToDirection","routeToDirectionOne","routeToPage","setActivePage"]),onSliderUpdate(e){this.isVertical?this.setActivePage(e,!0):this.routeToPage(e)},_keyUpListener(e){if(e.stopPropagation(),!this.isAuthDialogOpen)switch(e.key){case" ":!e.shiftKey&&window.innerHeight+window.scrollY+1>=document.body.scrollHeight?this.routeToDirection($):e.shiftKey&&window.scrollY===0&&this.routeToDirection(L);break;case"j":case"ArrowRight":this.routeToDirection($);break;case"k":case"ArrowLeft":this.routeToDirection(L);break;case",":this.routeToDirectionOne(L);break;case".":this.routeToDirectionOne($);break;case"n":this.routeToBook($);break;case"p":this.routeToBook(L);break}}}};function oa(e,t,a,u,i,o){const r=h("ReaderBookChangeNavButton"),g=h("ReaderNavButton"),m=h("PaginationSlider"),O=h("PaginationToolbar");return c(),p(qe,null,{default:l(()=>[e.maxPage?T((c(),p(O,{key:0,id:"readerToolbarNav"},{default:l(()=>[n(r,{direction:o.bookPrev,narrow:!1},null,8,["direction"]),n(g,{value:o.min,"two-pages":o.twoPages},null,8,["value","two-pages"]),(c(),p(m,{key:e.key,"model-value":e.storePage,min:0,max:e.maxPage,step:o.step,"track-color":o.trackColor,reverse:e.isReadInReverse,"onUpdate:modelValue":t[0]||(t[0]=N=>o.onSliderUpdate(N))},null,8,["model-value","max","step","track-color","reverse"])),n(g,{value:o.max,"two-pages":o.twoPages},null,8,["value","two-pages"]),n(r,{direction:o.bookNext,narrow:!1},null,8,["direction"])]),_:1},512)),[[ie,e.showToolbars]]):S("",!0)]),_:1})}const aa=b(ta,[["render",oa],["__scopeId","data-v-20fc0313"]]),sa={name:"MainReader",components:{BooksWindow:ao,ReaderEmpty:jo,ReaderNavToolbar:aa,ReaderTopToolbar:_e,ReaderSettingsDrawer:Ao,Unauthorized:ot},data(){return{showToolbars:!1}},computed:{...v(D,["isAuthorized"]),...P(D,{user:e=>e.user}),...P(d,{empty:e=>e.empty})},watch:{user(){this.loadReaderSettings()},isAuthorized(){this.loadReaderSettings()}},beforeMount(){d().$reset,this.loadReaderSettings()},methods:{..._(d,["loadReaderSettings"])}},ra={key:0},na={id:"readerContainer"};function ia(e,t,a,u,i,o){const r=h("ReaderTopToolbar"),g=h("BooksWindow"),m=h("ReaderNavToolbar"),O=h("ReaderEmpty"),N=h("ReaderSettingsDrawer"),fe=h("Unauthorized");return e.isAuthorized?(c(),p(at,{key:0,id:"readerWrapper"},{default:l(()=>[e.empty?(c(),p(O,{key:1})):(c(),w("div",ra,[s("div",na,[n(r),n(g),n(m)])])),n(N)]),_:1})):(c(),p(fe,{key:1}))}const Ra=b(sa,[["render",ia],["__scopeId","data-v-fa358348"]]);export{Ra as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__fileDeps=["assets/pdf-doc-
|
|
2
|
-
import{an as v,V as P,W as _,_ as b,Y as h,Z as c,X as p,$ as l,S as n,ao as y,ak as k,ap as f,al as R,aK as S,aH as w,aX as ee,U as B,bB as ve,bC as Pe,aw as F,bD as te,bE as oe,aJ as ae,bF as se,bG as we,b5 as Se,aU as T,by as ye,aI as V,bt as re,aR as s,b3 as Ce,bH as Re,bI as Be,D as M,aq as W,ar as z,bJ as Te,bK as De,bL as Ie,bM as Le,bN as $e,aS as Ve,aT as Oe,aN as Ne,m as D,bO as Ae,av as ne,aV as H,bP as Ee,bQ as Ue,bj as xe,am as Fe,bR as ze,b7 as ie,bm as Me,bp as We,bS as He,bT as qe}from"./admin-drawer-panel-DNngWUEM.js";import{b as d,c as Ge,_ as Ke,S as A,d as le,e as je,h as Ye}from"./main-DX-k2724.js";import{d as Xe,b as Ze,S as Je,V as Qe,a as et}from"./settings-drawer-DyS0A2pN.js";import{P as tt,a as ce,U as ot,V as at}from"./unauthorized-BbXjAe5l.js";import{b as de,V as ue}from"./VWindowItem-B0KokcAk.js";import{a as st}from"./VSelect-sIYW_-ud.js";import{V as rt,a as nt,b as it,c as lt}from"./VExpansionPanels-DX2dhUf5.js";import{V as I,a as E}from"./VRadioGroup-BGa6_q5a.js";import{V as U}from"./VCheckbox-DI-DgMb4.js";import{T as q,a as ct,M as dt,V as x,b as ut,P as he,c as ht,d as pt}from"./pagination-toolbar-CQcR0a3T.js";import"./copy-to-clipboard-DoUvDJVx.js";import"./VDialog-opmV0YZz.js";import"./change-password-dialog-CH4xbjJa.js";import"./VTextField-BnGscKcY.js";import"./VSelectionControl-C8DP9rgp.js";import"./VCheckboxBtn-B8Z4NA-t.js";import"./VSlideGroup-BRYhkLH8.js";import"./to-case-BR2frjFx.js";function pe(e,t){const{self:a=!1}=t.modifiers??{},u=t.value,i=typeof u=="object"&&u.options||{passive:!0},o=typeof u=="function"||"handleEvent"in u?u:u.handler,r=a?e:t.arg?document.querySelector(t.arg):window;r&&(r.addEventListener("scroll",o,i),e._onScroll=Object(e._onScroll),e._onScroll[t.instance.$.uid]={handler:o,options:i,target:a?void 0:r})}function ge(e,t){var o;if(!((o=e._onScroll)!=null&&o[t.instance.$.uid]))return;const{handler:a,options:u,target:i=e}=e._onScroll[t.instance.$.uid];i.removeEventListener("scroll",a,u),delete e._onScroll[t.instance.$.uid]}function gt(e,t){t.value!==t.oldValue&&(ge(e,t),pe(e,t))}const mt={mounted:pe,unmounted:ge,updated:gt},kt={name:"BookChangeDrawer",props:{direction:{type:String,required:!0}},head(){if(this.isDrawerOpen)return this.prefetchLinks(this.params,this.computedDirection,!0)},computed:{...v(d,["isBTT"]),...P(d,{computedDirection(){return this.normalizeDirection(this.direction)},params(e){return e.routes.books[this.computedDirection]},isDrawerOpen(e){return e.bookChange===this.computedDirection},icon(){return this.bookChangeIcon(this.computedDirection)}}),drawerLocation(){return this.bookChangeLocation(this.direction)},cursorClass(){return this.bookChangeCursorClass(this.computedDirection)},show(){return this.bookChangeShow(this.computedDirection)},route(){return this.toRoute(this.params)},label(){return this.linkLabel(this.computedDirection,"Book")}},methods:{..._(d,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute","bookChangeLocation","bookChangeCursorClass","bookChangeShow","bookChangeIcon"])}};function bt(e,t,a,u,i,o){const r=h("router-link");return o.show?(c(),p(Xe,{key:0,class:R(["bookChangeDrawer",{drawerActivated:e.isDrawerOpen}]),"disable-resize-watcher":"","disable-route-watcher":"",location:o.drawerLocation,"model-value":e.isDrawerOpen,scrim:!1,temporary:"",touchless:""},{default:l(()=>[n(r,{class:R({navLink:!0,[o.cursorClass]:!0}),to:o.route,"aria-label":o.label,title:o.label,onClick:t[0]||(t[0]=g=>g.stopImmediatePropagation())},{default:l(()=>[n(y,{class:"bookChangeIcon"},{default:l(()=>[k(f(e.icon),1)]),_:1})]),_:1},8,["class","to","aria-label","title"])]),_:1},8,["location","model-value","class"])):S("",!0)}const _t=b(kt,[["render",bt],["__scopeId","data-v-03e41a14"]]),ft={name:"BookChangeActivator",components:{BookChangeDrawer:_t},props:{direction:{type:String,required:!0}},computed:{computedDirection(){return this.normalizeDirection(this.direction)},positionClass(){return this.bookChangeLocation(this.direction)+"Pos"},cursorClass(){return this.bookChangeCursorClass(this.direction)},show(){return this.bookChangeShow(this.computedDirection)}},methods:{..._(d,["setBookChangeFlag","normalizeDirection","bookChangeLocation","bookChangeCursorClass","bookChangeShow"])}};function vt(e,t,a,u,i,o){const r=h("BookChangeDrawer");return c(),w(B,null,[o.show?(c(),w("div",{key:0,class:R(["bookChangeColumn",{[o.positionClass]:!0,[o.cursorClass]:!0}]),onClick:t[0]||(t[0]=ee(g=>e.setBookChangeFlag(a.direction),["stop"]))},null,2)):S("",!0),n(r,{direction:a.direction},null,8,["direction"])],64)}const Pt=b(ft,[["render",vt],["__scopeId","data-v-db3eb561"]]),wt={name:"LoadingPage",components:{Placeholder:tt},props:{twoPages:{type:Boolean,required:!0}}};function St(e,t,a,u,i,o){const r=h("Placeholder");return c(),w("div",{class:R(["pageLoading",{twoPages:a.twoPages}])},[n(r,{class:"pagePlaceholder"})],2)}const yt=b(wt,[["render",St],["__scopeId","data-v-04027168"]]),G="unauthorized",Ct={name:"ErrorPage",props:{twoPages:{type:Boolean,required:!0},type:{type:String,required:!0}},computed:{text(){return this.type===G?"Protected page":"Failed to load page"},icon(){return this.type===G?ve:Pe}}};function Rt(e,t,a,u,i,o){return c(),p(ce,{class:R(["pageError",{twoPages:a.twoPages}]),headline:o.text,icon:o.icon},null,8,["class","headline","icon"])}const Bt=b(Ct,[["render",Rt],["__scopeId","data-v-417a4cab"]]),Tt={name:"ImgPage",props:{book:{type:Object,required:!0},src:{type:String,required:!0}},emits:["load","error"],computed:{...P(d,{scale:e=>e.clientSettings.scale}),style(){const e={};if(this.scale==1)return e;const t=this.$el;if(!(t!=null&&t.naturalWidth))return e;const a=t.naturalWidth/2;return e.transformOrigin=`${a}px top`,e.transform=`scale(${this.scale})`,e},classes(){return this.fitToClass(this.book)}},methods:{..._(d,["fitToClass"])}},Dt=["src"];function It(e,t,a,u,i,o){return c(),w("img",F({class:[o.classes,"img"],draggable:"false",src:a.src,style:o.style},e.$attrs,{onError:t[0]||(t[0]=r=>e.$emit("error",r)),onLoad:t[1]||(t[1]=r=>e.$emit("load",r))}),null,16,Dt)}const K=b(Tt,[["render",It],["__scopeId","data-v-559e2ecc"]]),j=te(oe(()=>Ke(()=>import("./pdf-doc-GkMk4o5L.js"),__vite__mapDeps([0,1,2,3,4,5])))),Lt=333,$t={name:"BookPage",components:{ErrorPage:Bt,LoadingPage:yt,PDFDoc:j,ImgPage:K},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},data(){return{showProgress:!1,loaded:!1,error:!1}},computed:{...v(d,["isVertical"]),...P(d,{scale:e=>e.clientSettings.scale}),style(){var a;const e={};if(this.book.fileType==="PDF"||this.scale==1)return e;const t=(a=this.$refs.pageComponent)==null?void 0:a.$el;return t!=null&&t.naturalHeight&&(e.height=t.naturalHeight*this.scale+"px",e.width=t.naturalWidth*this.scale+"px"),e},src(){const e={pk:this.book.pk,page:this.page,mtime:this.book.mtime};return Ge(e)},component(){return this.book.fileType==="PDF"?j:K},settings(){return this.getSettings(this.book)}},mounted(){setTimeout(function(){this.loaded||(this.loading=!0)},Lt)},methods:{..._(d,["getSettings"]),onLoad(){this.showProgress=!1,this.loaded=!0,this.error=!1},onError(){this.error="load",this.showProgress=!1},onUnauthorized(){this.error="unauthorized",this.showProgress=!1}}},Vt=["id","data-page"];function Ot(e,t,a,u,i,o){const r=h("ErrorPage"),g=h("LoadingPage");return c(),w("div",{id:`page${a.page}`,"data-page":a.page,class:"page",style:se(o.style)},[i.error?(c(),p(r,{key:0,"two-pages":o.settings.twoPages,type:i.error},null,8,["two-pages","type"])):i.showProgress&&!i.loaded?(c(),p(g,{key:1,"two-pages":o.settings.twoPages},null,8,["two-pages"])):(c(),p(ae(o.component),{key:2,ref:"pageComponent",book:a.book,page:1,src:o.src,onError:o.onError,onLoad:o.onLoad,onUnauthorized:o.onUnauthorized},null,40,["book","src","onError","onLoad","onUnauthorized"]))],12,Vt)}const me=b($t,[["render",Ot],["__scopeId","data-v-87996fa1"]]),Nt=.5,At={name:"ScaleForScroll",emits:["click"],data(){return{mdiMagnifyMinusOutline:we}},computed:{...P(d,{scale:e=>e.clientSettings.scale}),showReset(){return this.scale!=A},style(){return{cursor:this.scale==A?"zoom-in":"all-scroll"}}},methods:{..._(d,["setSettingsClient"]),clearSelection(){window.getSelection&&window.getSelection().removeAllRanges()},onDoubleClick(){this.clearSelection();const e=this.scale+Nt;this.setSettingsClient({scale:e})},scaleReset(){this.setSettingsClient({scale:A})}}};function Et(e,t,a,u,i,o){const r=Se("drag-scroller");return T((c(),w("div",{class:"scaleForScroll",style:se(o.style),onDblclick:t[0]||(t[0]=(...g)=>o.onDoubleClick&&o.onDoubleClick(...g))},[ye(e.$slots,"default",{},void 0,!0),o.showReset?(c(),p(y,{key:0,class:"resetIcon",onClick:ee(o.scaleReset,["stop"])},{default:l(()=>[k(f(i.mdiMagnifyMinusOutline),1)]),_:1},8,["onClick"])):S("",!0)],36)),[[r,,void 0,{onlyX:!0}]])}const ke=b(At,[["render",Et],["__scopeId","data-v-b24267c0"]]),Ut={name:"HorizontalPages",components:{BookPage:me,ScaleForScroll:ke},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},emits:["click"],computed:{...v(d,["isCoverPage","isReadInReverse"]),showSecondPage(){return this.getSettings(this.book).twoPages&&this.page<this.book.maxPage&&!this.isCoverPage(this.book,this.page)},showPageOne(){return!this.isReadInReverse||this.showSecondPage},showPageTwo(){return this.isReadInReverse||this.showSecondPage},pageOne(){return this.isReadInReverse?this.page+1:this.page},pageTwo(){return this.isReadInReverse?this.page:this.page+1}},methods:{..._(d,["getSettings"])}};function xt(e,t,a,u,i,o){const r=h("BookPage"),g=h("ScaleForScroll");return c(),p(g,{class:"noWrap"},{default:l(()=>[o.showPageOne?(c(),p(r,{key:0,ref:"pageOne",book:a.book,page:o.pageOne,class:"horizontalPage"},null,8,["book","page"])):S("",!0),o.showPageTwo?(c(),p(r,{key:1,book:a.book,page:o.pageTwo,class:"horizontalPage"},null,8,["book","page"])):S("",!0)]),_:1})}const Ft=b(Ut,[["render",xt],["__scopeId","data-v-9a560964"]]),zt={name:"PageChangeLink",props:{direction:{type:String,required:!0}},head(){return this.prefetchLinks(this.params,this.computedDirection)},computed:{...v(d,["isVertical","isFirstPage","isLastPage"]),...P(d,{params(e){return e.routes[this.computedDirection]}}),computedDirection(){return this.normalizeDirection(this.direction)},show(){return this.computedDirection==="prev"?!this.isFirstPage:!this.isLastPage},pageChangeClass(){let e="pageChange";return e+=this.isVertical?"Row":"Column",e},directionClass(){let e=this.direction;return this.isVertical&&(e+="Vertical"),e},route(){return this.toRoute(this.params)},label(){return this.linkLabel(this.computedDirection,"Page")}},methods:{..._(d,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute"])}};function Mt(e,t,a,u,i,o){const r=h("router-link");return o.show?(c(),p(r,{key:0,to:o.route,"aria-label":o.label,class:R({[o.pageChangeClass]:!0,[o.directionClass]:!0}),onClick:t[0]||(t[0]=g=>g.stopImmediatePropagation())},null,8,["to","aria-label","class"])):S("",!0)}const Wt=b(zt,[["render",Mt],["__scopeId","data-v-9ade7d96"]]),Ht=48,qt=48,Gt={name:"PagerHorizontal",components:{HorizontalPages:Ft,PageChangeLink:Wt},props:{book:{type:Object,required:!0}},data(){return{activePage:0,pages:[]}},computed:{...v(d,["isReadInReverse"]),...P(d,{prevBook:e=>{var t;return(t=e.routes.books)==null?void 0:t.prev},nextBook:e=>{var t;return(t=e.routes.books)==null?void 0:t.next},storePage:e=>e.page,storePk:e=>e.books.current.pk}),twoPages(){return this.getSettings(this.book).twoPages},windowIndex(){const e=this.activePage-this.pages[0];return Math.min(Math.max(0,e),this.book.maxPage)}},watch:{twoPages(){this.setActivePage(this.storePage,!0)},storePage(e){if(this.book.pk===this.storePk){this.activePage=e;const t=this.pages.at(0),a=this.pages.at(-1);(e<t||e>a)&&this.setPages()}},prevBook(e){this.book.pk===e.pk&&(this.activePage=this.book.maxPage)},nextBook(e){this.book.pk===e.pk&&(this.activePage=0)}},created(){this.book.pk===this.storePk?this.activePage=+this.$route.params.page:this.book.pk===this.prevBook.pk?this.activePage=this.book.maxPage:this.activePage=0,this.setPages()},methods:{..._(d,["getSettings","setBookChangeFlag","setActivePage"]),setPages(){const e=Math.max(this.activePage-Ht,0),t=Math.min(this.activePage+qt,this.book.maxPage),a=le.range(e,t+1);this.pages=a}}};function Kt(e,t,a,u,i,o){const r=h("PageChangeLink"),g=h("HorizontalPages");return c(),p(ue,{"show-arrows":"",continuous:"","model-value":o.windowIndex,reverse:e.isReadInReverse},{prev:l(()=>[n(r,{direction:"prev"})]),next:l(()=>[n(r,{direction:"next"})]),default:l(()=>[(c(!0),w(B,null,V(i.pages,m=>(c(),p(de,{key:`c/${a.book.pk}/${m}`,class:"windowItem",disabled:"",eager:m>=e.storePage-1&&m<=e.storePage+2,"model-value":m,transition:!0},{default:l(()=>[n(g,{book:a.book,page:m},null,8,["book","page"])]),_:2},1032,["eager","model-value"]))),128))]),_:1},8,["model-value","reverse"])}const Y=b(Gt,[["render",Kt],["__scopeId","data-v-e04bbc00"]]),jt=12,X=250,Yt={name:"PagerVertical",components:{BookPage:me,ScaleForScroll:ke},props:{book:{type:Object,required:!0}},data(){return{innerHeight:window.innerHeight,innerWidth:window.innerWidth,intersectorOn:!1,programmaticScroll:!1}},computed:{...P(d,{storePage:e=>e.page,showToolbars:e=>e.showToolbars}),...re(d,["reactWithScroll"]),settings(){return this.getSettings(this.book)},readInReverse(){return this.settings.readInReverse},items(){var a;const e=(a=this.book)!=null&&a.maxPage?this.book.maxPage+1:0,t=le.range(0,e);return this.readInReverse&&t.reverse(),t},visibleItems(){var e;return Math.min(((e=this.book)==null?void 0:e.maxPage)??0,jt)}},watch:{storePage(e){this.reactWithScroll&&this.scrollToPage(e)}},mounted(){window.addEventListener("resize",this.onResize),setTimeout(()=>{this.scrollToPage(this.storePage)},X)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{..._(d,["setActivePage","setBookChangeFlag","getSettings"]),onIntersect(e,t){if(e&&this.intersectorOn){const u=+t[0].target.dataset.page;this.setActivePage(u,!1)}},onScroll(){if(this.programmaticScroll)return;this.intersectorOn=!0;const e=this.$refs.verticalScroll.$el,t=e.scrollTop;if(this.storePage===0&&t===0)this.setBookChangeFlag("prev");else if(this.storePage===this.book.maxPage){const a=e.scrollTopMax||e.scrollHeight-e.clientTop;window.innerHeight+t+1>=a&&this.setBookChangeFlag("next")}},scrollToPage(e){this.intersectorOn=!1,this.programmaticScroll=!0;const t=this.$refs.verticalScroll;t?t.scrollToIndex(e):console.debug("Can't find verticalScroll component."),setTimeout(()=>{this.programmaticScroll=!1},X)},onResize(){this.innerHeight=window.innerHeight,this.innerWidth=window.innerWidth}}},Xt=["data-page"];function Zt(e,t,a,u,i,o){const r=h("BookPage"),g=h("ScaleForScroll");return c(),p(g,null,{default:l(()=>[T((c(),p(st,{id:"verticalScroll",key:o.readInReverse,ref:"verticalScroll",items:o.items,height:i.innerHeight,width:i.innerWidth},{default:l(({item:m})=>[n(r,{book:a.book,page:m,class:"verticalPage"},null,8,["book","page"]),T(s("div",{class:R(["pageTracker",{pageTrackerToolbars:e.showToolbars}]),"data-page":m},null,10,Xt),[[Ce,{handler:o.onIntersect,options:{threshold:[.75]}},void 0,{quiet:!0}]])]),_:1},8,["items","height","width"])),[[mt,o.onScroll,"#verticalScroll"]])]),_:1})}const Z=b(Yt,[["render",Zt],["__scopeId","data-v-ef3b4ade"]]),J=te(oe(()=>"@/components/reader/pager/pager-full-pdf.vue")),Jt={name:"PagerSelector",components:{PagerHorizontal:Y,PagerPDF:J,PagerVertical:Z},props:{book:{type:Object,required:!0}},emits:["click"],head(){return this.prefetchBook(this.book)},computed:{...v(d,["isVertical","cacheBook"]),...P(d,{storePk:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk)||0}}),readFullPdf(){return this.book.fileType=="PDF"&&this.cacheBook},component(){return this.readFullPdf?J:this.isVertical?Z:Y}},watch:{$route(e){+e.params.pk===this.book.pk&&this.setActivePage(+e.params.page,!0)}},created(){this.book.pk===this.storePk&&this.setActivePage(+this.$route.params.page,!0)},methods:{..._(d,["getSettings","setActivePage","prefetchBook"])}};function Qt(e,t,a,u,i,o){return c(),p(ae(o.component),{book:a.book},null,8,["book"])}const eo=b(Jt,[["render",Qt]]),to={name:"BooksWindow",components:{BookChangeActivator:Pt,Pager:eo},computed:{...v(d,["isBTT"]),...P(d,{books:e=>[e.books.prev,e.books.current,e.books.next].filter(Boolean),bookChange:e=>e.bookChange,currentBookPk:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk)||0},bookRoutes:e=>e.routes.books})},watch:{$route(e,t){(!t||!t.params||+e.params.pk!=+t.params.pk)&&this.loadBooks(e.params)}},beforeMount(){this.setBookChangeFlag(),this.loadBooks()},methods:{..._(d,["setBookChangeFlag","loadBooks","toggleToolbars"]),click(){this.toggleToolbars(),this.setBookChangeFlag()},eager(e){return this.bookChange&&this.bookRoutes[this.bookChange]&&this.bookRoutes[this.bookChange].pk===e}}};function oo(e,t,a,u,i,o){const r=h("BookChangeActivator"),g=h("Pager");return c(),p(ue,{id:"booksWindow",direction:"vertical","model-value":e.currentBookPk,reverse:e.isBTT,"show-arrows":"",onClick:e.toggleToolbars},{prev:l(()=>[n(r,{direction:"prev"})]),next:l(()=>[n(r,{direction:"next"})]),default:l(()=>[(c(!0),w(B,null,V(e.books,m=>(c(),p(de,{key:`c/${m.pk}`,class:"windowItem",disabled:"",eager:o.eager(m.pk),value:m.pk,transition:!0},{default:l(()=>[n(g,{book:m,onClick:o.click},null,8,["book","onClick"])]),_:2},1032,["eager","value"]))),128))]),_:1},8,["model-value","reverse","onClick"])}const ao=b(to,[["render",oo],["__scopeId","data-v-1e3deb54"]]),so={name:"DownloadPanel",data(){return{mdiDownload:Re,mdiFileImage:Be}},computed:{...v(d,["activeTitle","routeParams"]),...P(d,{currentBook:e=>{var t;return(t=e.books)==null?void 0:t.current},storePage:e=>e.page}),downloadURL(){return je(this.currentBook)},filename(){var e;return(e=this.currentBook)==null?void 0:e.filename},pageSrc(){const{pk:e,mtime:t}=this.currentBook;return Ye({pk:e,page:this.storePage,mtime:t})},pageName(){return`${this.activeTitle} - page ${this.storePage}.jpg`}},methods:{..._(M,["downloadIOSPWAFix"]),downloadPage(){this.downloadIOSPWAFix(this.pageSrc,this.pageName)},downloadBook(){this.downloadIOSPWAFix(this.downloadURL,this.filename)}}},ro={key:0,id:"downloadPanel"};function no(e,t,a,u,i,o){return e.currentBook?(c(),w("div",ro,[n(z,{onClick:o.downloadPage},{default:l(()=>[n(W,null,{default:l(()=>[n(y,null,{default:l(()=>[k(f(i.mdiFileImage),1)]),_:1}),k("Download Page "+f(e.storePage),1)]),_:1})]),_:1},8,["onClick"]),n(z,{onClick:o.downloadBook},{default:l(()=>[n(W,null,{default:l(()=>[n(y,null,{default:l(()=>[k(f(i.mdiDownload),1)]),_:1}),k("Download Book ")]),_:1})]),_:1},8,["onClick"])])):S("",!0)}const io=b(so,[["render",no],["__scopeId","data-v-9e01f4cb"]]),lo={name:"KeyboardShortcutsPanel",data(){return{mdiMenuLeft:Te,mdiMenuRight:De,mdiKeyboardOutline:Ie,mdiKeyboardSpace:Le,mdiAppleKeyboardShift:$e}},computed:{...v(M,["isMobile"])}},C=e=>(Ve("data-v-a8b4ac47"),e=e(),Oe(),e),co=C(()=>s("h4",null,"Navigation",-1)),uo={class:"highlight-table"},ho=C(()=>s("td",null,"Previous page",-1)),po=C(()=>s("td",null,"Next page",-1)),go=C(()=>s("tr",null,[s("td",null,","),s("td",null,[k("Next "),s("em",null,"only"),k(" one page in two page mode.")])],-1)),mo=C(()=>s("tr",null,[s("td",null,"."),s("td",null,[k("Previous "),s("em",null,"only"),k(" one page in two page mode.")])],-1)),ko=C(()=>s("tr",null,[s("td",null,"p"),s("td",null,"Previous Book")],-1)),bo=C(()=>s("tr",null,[s("td",null,"n"),s("td",null,"Next Book")],-1)),_o=C(()=>s("tr",null,[s("td",null,"esc"),s("td",null,"Close book")],-1)),fo=C(()=>s("h4",null,"Fit Page To",-1)),vo=C(()=>s("table",{class:"highlight-table"},[s("tbody",null,[s("tr",null,[s("td",null,"s"),s("td",null,"screen")]),s("tr",null,[s("td",null,"h"),s("td",null,"screen height")]),s("tr",null,[s("td",null,"w"),s("td",null,"screen width")]),s("tr",null,[s("td",null,"o"),s("td",null,"Show page at original size")]),s("tr",null,[s("td",null,"2"),s("td",null,"Toggle two page view")]),s("tr",null,[s("td",null,"r"),s("td",null,"Read Right to Left")]),s("tr",null,[s("td",null,"l"),s("td",null,"Read Left to Right")]),s("tr",null,[s("td",null,"t"),s("td",null,"Read Top to Bottom")]),s("tr",null,[s("td",null,"b"),s("td",null,"Read in Bottom to Top")])])],-1)),Po=C(()=>s("h4",null,"Other",-1)),wo=C(()=>s("table",{class:"highlight-table"},[s("tbody",null,[s("tr",null,[s("td",null,"m"),s("td",null,"Show comic's metadata")]),s("tr",null,[s("td",null,"double click"),s("td",null,"Zoom page")])])],-1));function So(e,t,a,u,i,o){return e.isMobile?S("",!0):(c(),p(lt,{key:0},{default:l(()=>[n(rt,{id:"readerKeyboardShortcuts"},{default:l(()=>[n(nt,{id:"shortcutsTitle"},{default:l(()=>[n(y,{id:"keyboardIcon"},{default:l(()=>[k(f(i.mdiKeyboardOutline),1)]),_:1}),k("Keyboard Shortcuts ")]),_:1}),n(it,null,{default:l(()=>[co,s("table",uo,[s("tbody",null,[s("tr",null,[s("td",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiMenuLeft),1)]),_:1}),k(", j, "),s("div",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiAppleKeyboardShift),1)]),_:1}),n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiKeyboardSpace),1)]),_:1})])]),ho]),s("tr",null,[s("td",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiMenuRight),1)]),_:1}),k(", k, "),n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiKeyboardSpace),1)]),_:1})]),po]),go,mo,ko,bo,_o])]),fo,vo,Po,wo]),_:1})]),_:1})]),_:1}))}const yo=b(lo,[["render",So],["__scopeId","data-v-a8b4ac47"]]),be=["fitTo","readingDirection","twoPages"];Object.freeze(be);const Co={name:"ReaderSettingsPanel",data(){return{isGlobalScope:!1,mdiOpenInNew:Ne,openDelay:2e3}},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["isVertical","isPDF","cacheBook"]),...P(d,{choices:e=>e.choices,validBook:e=>{var t;return!!((t=e.books)!=null&&t.current)},selectedSettings(e){var t,a;return this.isGlobalScope||!((t=e.books)!=null&&t.current)?e.readerSettings:(a=e.books)==null?void 0:a.current.settings},isClearSettingsButtonDisabled(e){var t,a;if(this.isGlobalScope||!((t=e.books)!=null&&t.current))return!0;for(const u of be){const i=(a=e.books)==null?void 0:a.current.settings[u];if(!e.choices.nullValues.has(i))return!1}return!0},bookInBrowserURL(e){var t,a;return(t=e.books)!=null&&t.current?Ae((a=e.books)==null?void 0:a.current):""}}),...re(d,["readRtlInReverse"]),fitToChoices(){return this.choicesWithoutNull("fitTo")},readingDirectionChoices(){return this.choicesWithoutNull("readingDirection")},disableTwoPages(){return this.isVertical||this.isPDF&&this.cacheBook},disableCacheBook(){return this.isVertical&&this.isPDF}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(d,["clearSettingsLocal","setSettingsGlobal","setSettingsLocal","setSettingsClient"]),settingsDialogChanged(e){this.isGlobalScope?this.setSettingsGlobal(e):this.setSettingsLocal(e)},choicesWithoutNull(e){const t=[];for(const a of this.choices[e])a.value&&t.push(a);return Object.freeze(t),t},_keyUpListener(e){if(e.stopPropagation(),this.isAuthDialogOpen)return;let t;switch(e.key){case"w":t={fitTo:"W"};break;case"h":t={fitTo:"H"};break;case"s":t={fitTo:"S"};break;case"o":t={fitTo:"O"};break;case"2":t={twoPages:!this.selectedSettings.twoPages};break;case"l":t={readingDirection:"ltr"};break;case"r":t={readingDirection:"rtl"};break;case"t":t={readingDirection:"ttb"};break;case"b":t={readingDirection:"bbt"};break}t&&this.setSettingsLocal(t)}}},Ro={key:0,id:"readerSettings"},Bo={id:"readerScopedSettings"},To=["href"];function Do(e,t,a,u,i,o){return e.validBook?(c(),w("div",Ro,[n(E,{modelValue:i.isGlobalScope,"onUpdate:modelValue":t[0]||(t[0]=r=>i.isGlobalScope=r),density:"compact",label:"Scope","hide-details":"auto"},{default:l(()=>[n(I,{label:"Only this comic",value:!1}),n(I,{label:"Default for all comics",value:!0})]),_:1},8,["modelValue"]),s("div",Bo,[n(E,{class:"displayRadioGroup",density:"compact",label:"Display","hide-details":"auto","model-value":e.selectedSettings.fitTo,"onUpdate:modelValue":t[1]||(t[1]=r=>o.settingsDialogChanged({fitTo:r}))},{default:l(()=>[(c(!0),w(B,null,V(o.fitToChoices,r=>(c(),p(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),n(U,{disabled:o.disableTwoPages,class:"displayTwoPages",density:"compact",label:"Two pages","hide-details":"auto","model-value":e.selectedSettings.twoPages,"true-value":!0,indeterminate:e.selectedSettings.twoPages===null||e.selectedSettings.twoPages===void 0,"onUpdate:modelValue":t[2]||(t[2]=r=>o.settingsDialogChanged({twoPages:r}))},null,8,["disabled","model-value","indeterminate"]),n(E,{class:"displayRadioGroup",density:"compact",label:"Reading Direction","hide-details":"auto","model-value":e.selectedSettings.readingDirection,"onUpdate:modelValue":t[3]||(t[3]=r=>o.settingsDialogChanged({readingDirection:r}))},{default:l(()=>[(c(!0),w(B,null,V(o.readingDirectionChoices,r=>(c(),p(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),T(n(U,{"model-value":e.cacheBook,class:"cacheBook",density:"compact",disabled:o.disableCacheBook,label:"Cache Entire Book","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[4]||(t[4]=r=>e.setSettingsClient({cacheBook:r}))},null,8,["model-value","disabled"]),[[q,{openDelay:i.openDelay,text:"Cache all pages from this book in the browser"}]]),e.isPDF?(c(),w("a",{key:0,id:"readPDFInBrowser",href:e.bookInBrowserURL,target:"_blank"},[n(y,null,{default:l(()=>[k(f(i.mdiOpenInNew),1)]),_:1}),k("Read PDF in Browser ")],8,To)):S("",!0),i.isGlobalScope?(c(),p(U,{key:1,"model-value":e.selectedSettings.readRtlInReverse,class:"readRtlInReverse",density:"compact",label:"Read RTL Comics as LTR","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[5]||(t[5]=r=>o.settingsDialogChanged({readRtlInReverse:r}))},null,8,["model-value"])):S("",!0),i.isGlobalScope?S("",!0):T((c(),p(ne,{key:2,id:"clearSettingsButton",disabled:e.isClearSettingsButtonDisabled,onClick:e.clearSettingsLocal},{default:l(()=>[k(" Clear Settings ")]),_:1},8,["disabled","onClick"])),[[q,{openDelay:i.openDelay,text:"Use the default settings for all comics for this comic"}]])])])):S("",!0)}const Io=b(Co,[["render",Do],["__scopeId","data-v-993d7417"]]),Lo={name:"ReaderSettingsSuperPanel",components:{DownloadPanel:io,ReaderKeyboardShortcutsPanel:yo,ReaderSettingsPanel:Io}};function $o(e,t,a,u,i,o){const r=h("ReaderSettingsPanel"),g=h("ReaderKeyboardShortcutsPanel"),m=h("DownloadPanel");return c(),w(B,null,[n(r),n(H),n(g),n(H),n(m)],64)}const Vo=b(Lo,[["render",$o]]),Oo={name:"ReaderSettingsDrawer",components:{SettingsDrawer:Ze,ReaderSettingsSuperPanel:Vo}};function No(e,t,a,u,i,o){const r=h("ReaderSettingsSuperPanel"),g=h("SettingsDrawer");return c(),p(g,{title:"Reader",temporary:"","disable-resize-watcher":""},{panel:l(()=>[n(r)]),_:1})}const Ao=b(Oo,[["render",No]]),Q={a:Ue,f:xe,s:Fe},Eo={a:"Story Arc",f:"Folder",s:"Series"},Uo={name:"ReaderArcSelect",components:{ToolbarSelect:ct},computed:{...P(d,{arcGroup:e=>{var t;return((t=e.arc)==null?void 0:t.group)||"s"},arc:e=>e.arc,arcName:e=>{for(const t of e.arcs)if(e.arc.group===t.group&&e.arc.pks===t.pks)return t.name;return"Unknown"},arcItems:e=>{const t=[];for(const a of e.arcs){const u={value:a,title:a.name,group:a.group,subtitle:Eo[a.group],prependIcon:Q[a.group]};t.push(u)}return t}})},methods:{..._(d,["loadBooks"]),arcIcon(e){return Q[e]},checkIcon(e){return e===this.arc?Ee:""},onUpdate(e){const t=this.$route.params;if(!t)return;const a={group:e.group,pks:e.pks},u={...t,arc:a};this.loadBooks(u)}}},xo={id:"arcPos"};function Fo(e,t,a,u,i,o){const r=h("ToolbarSelect");return c(),p(r,{"model-value":e.arc,class:"arcSelect","select-label":"reading order",items:e.arcItems,disabled:!e.arcItems||e.arcItems.length<=1,"onUpdate:modelValue":o.onUpdate},{item:l(({item:g,props:m})=>[n(z,F(m,{density:"compact",variant:"plain","prepend-icon":g.raw.prependIcon,subtitle:g.raw.subtitle,"append-icon":o.checkIcon(m.value)}),null,16,["prepend-icon","subtitle","append-icon"])]),selection:l(({item:g,props:m})=>[n(y,F({size:"large"},m,{class:"arcSelectIcon"}),{default:l(()=>[k(f(o.arcIcon(g.raw.group)),1)]),_:2},1040),s("span",xo,f(e.arc.index)+" / "+f(e.arc.count),1)]),_:1},8,["model-value","items","disabled","onUpdate:modelValue"])}const zo=b(Uo,[["render",Fo],["__scopeId","data-v-42a57aca"]]),Mo={name:"ReaderTitleToolbar",components:{MetadataDialog:dt,ReaderArcSelect:zo,SettingsDrawerButton:Je},data(){return{mdiClose:ze,routeChanged:!1}},head(){return{meta:[{hid:"description",name:"description",content:`reader ${this.activeTitle} page ${this.storePage}`}]}},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["activeTitle","closeBookRoute"]),...P(d,{showToolbars:e=>e.showToolbars,currentBook:e=>{var t;return((t=e.books)==null?void 0:t.current)||{}},empty:e=>e.empty,subtitle:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.name)||""}}),title(){return this.activeTitle},extensionHeight(){let e=32;return this.subtitle&&(e*=2),e+=4,e}},watch:{$route(e,t){t&&(this.routeChanged=!0)}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(M,["setTimestamp"]),..._(d,["routeToDirection","routeToDirectionOne","routeToBook","setBookChangeFlag"]),openMetadata(){this.$refs.metadataDialog.dialog=!0},onCloseBook(){this.routeChanged&&this.setTimestamp()},_keyUpListener(e){if(e.stopPropagation(),!this.isAuthDialogOpen)switch(e.key){case"Escape":this.$refs.closeBook.$el.click();break;case"m":this.empty||this.openMetadata();break}}}},Wo={id:"title"},Ho={key:0,id:"subtitle"};function qo(e,t,a,u,i,o){const r=h("ReaderArcSelect"),g=h("MetadataDialog"),m=h("SettingsDrawerButton");return c(),p(We,null,{default:l(()=>[T(n(et,{id:"readerToolbarTop",density:"compact","extension-height":o.extensionHeight},Me({default:l(()=>[n(x,null,{default:l(()=>[n(ne,{ref:"closeBook",class:"closeBook",to:e.closeBookRoute,size:"large",density:"compact",variant:"plain",onClick:o.onCloseBook},{default:l(()=>[k(" close book ")]),_:1},8,["to","onClick"])]),_:1}),n(ut),e.empty?S("",!0):(c(),p(x,{key:0},{default:l(()=>[n(r),n(g,{ref:"metadataDialog",group:"c",toolbar:!0,book:e.currentBook},null,8,["book"])]),_:1})),n(x,null,{default:l(()=>[n(m)]),_:1})]),_:2},[o.title?{name:"extension",fn:l(()=>[n(Qe,{class:"readerTitle"},{default:l(()=>[s("div",Wo,f(o.title),1),e.subtitle?(c(),w("div",Ho,f(e.subtitle),1)):S("",!0)]),_:1})]),key:"0"}:void 0]),1032,["extension-height"]),[[ie,e.showToolbars]])]),_:1})}const _e=b(Mo,[["render",qo],["__scopeId","data-v-8ac187ef"]]),Go={name:"ReaderEmpty",components:{ReaderTopToolbar:_e},data(){return{mdiBookRemoveOutline:He}}};function Ko(e,t,a,u,i,o){const r=h("ReaderTopToolbar");return c(),w(B,null,[n(r),n(ce,{class:"empty",headline:"Book Not Found",title:"Close the reader and find another book",icon:i.mdiBookRemoveOutline},null,8,["icon"])],64)}const jo=b(Go,[["render",Ko],["__scopeId","data-v-65d65e48"]]),Yo={name:"ReaderBookChangeNavButton",components:{PaginationNavButton:he},props:{direction:{type:String,required:!0}},computed:{...v(d,["isBTT"]),...P(d,{toRoute(e){var a;const t=(a=e==null?void 0:e.routes)==null?void 0:a.books[this.direction];return t?{params:{...t}}:""}}),title(){return(this.direction==="prev"?"Previous":"Next")+" Book"},icon(){return this.bookChangeIcon(this.direction)},classes(){return{bookChangeNavButtonLeft:this.direction==="prev",bookChangeNavButtonRight:this.direction==="next"}}},methods:{..._(d,["bookChangeIcon"])}};function Xo(e,t,a,u,i,o){const r=h("PaginationNavButton");return e.toRoute?(c(),p(r,{key:0,class:R(o.classes),icon:"",variant:"plain",title:o.title,to:e.toRoute},{default:l(()=>[n(y,null,{default:l(()=>[k(f(o.icon),1)]),_:1})]),_:1},8,["class","title","to"])):S("",!0)}const Zo=b(Yo,[["render",Xo],["__scopeId","data-v-117f651c"]]),Jo={name:"ReaderNavButton",components:{PaginationNavButton:he},props:{value:{type:Number,required:!0},twoPages:{type:Boolean,default:!1}},computed:{...v(d,["isVertical"]),...P(d,{storePage:e=>e.page,toRoute(e){if(!this.isVertical)return{params:{pk:e.books.current.pk,page:this.value}}},isBookPrev:e=>!!e.routes.books.prev,isBookNext:e=>!!e.routes.books.next}),classes(){return{readerNavButtonLeft:!this.isBookPrev&&this.value===0,readerNavButtonRight:!this.isBookNext&&this.value!=0}},title(){return"Page "+this.value},disabled(){return this.value===this.storePage||this.twoPages&&!!(this.value%2)&&this.value-1===this.storePage}},methods:{..._(d,["setActivePage"]),onClick(){this.isVertical&&this.setActivePage(this.value,!0)}}};function Qo(e,t,a,u,i,o){const r=h("PaginationNavButton");return c(),p(r,{key:e.isVertical,disabled:o.disabled,class:R(["readerNavButton",o.classes]),title:o.title,to:e.toRoute,onClick:o.onClick},{default:l(()=>[k(f(a.value),1)]),_:1},8,["disabled","class","title","to","onClick"])}const ea=b(Jo,[["render",Qo],["__scopeId","data-v-530fba8c"]]),L="prev",$="next",ta={name:"ReaderNavToolbar",components:{PaginationSlider:ht,ReaderNavButton:ea,PaginationToolbar:pt,ReaderBookChangeNavButton:Zo},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["activeSettings","isReadInReverse","isVertical"]),...P(d,{showToolbars:e=>e.showToolbars,storePage:e=>e.page,key(e){var t,a;return`${(a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk}:${this.step}:${this.isReadInReverse}`},maxPage:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.maxPage)||0}}),twoPages(){return this.activeSettings.twoPages},step(){return this.activeSettings.twoPages?2:1},trackColor(){return this.twoPages&&+this.storePage>=this.maxPage-1?this.$vuetify.theme.current.colors.primary:""},min(){return this.isReadInReverse?this.maxPage:0},max(){return this.isReadInReverse?0:this.maxPage},bookPrev(){return this.isReadInReverse?"next":"prev"},bookNext(){return this.isReadInReverse?"prev":"next"}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(d,["routeToBook","routeToDirection","routeToDirectionOne","routeToPage","setActivePage"]),onSliderUpdate(e){this.isVertical?this.setActivePage(e,!0):this.routeToPage(e)},_keyUpListener(e){if(e.stopPropagation(),!this.isAuthDialogOpen)switch(e.key){case" ":!e.shiftKey&&window.innerHeight+window.scrollY+1>=document.body.scrollHeight?this.routeToDirection($):e.shiftKey&&window.scrollY===0&&this.routeToDirection(L);break;case"j":case"ArrowRight":this.routeToDirection($);break;case"k":case"ArrowLeft":this.routeToDirection(L);break;case",":this.routeToDirectionOne(L);break;case".":this.routeToDirectionOne($);break;case"n":this.routeToBook($);break;case"p":this.routeToBook(L);break}}}};function oa(e,t,a,u,i,o){const r=h("ReaderBookChangeNavButton"),g=h("ReaderNavButton"),m=h("PaginationSlider"),O=h("PaginationToolbar");return c(),p(qe,null,{default:l(()=>[e.maxPage?T((c(),p(O,{key:0,id:"readerToolbarNav"},{default:l(()=>[n(r,{direction:o.bookPrev,narrow:!1},null,8,["direction"]),n(g,{value:o.min,"two-pages":o.twoPages},null,8,["value","two-pages"]),(c(),p(m,{key:e.key,"model-value":e.storePage,min:0,max:e.maxPage,step:o.step,"track-color":o.trackColor,reverse:e.isReadInReverse,"onUpdate:modelValue":t[0]||(t[0]=N=>o.onSliderUpdate(N))},null,8,["model-value","max","step","track-color","reverse"])),n(g,{value:o.max,"two-pages":o.twoPages},null,8,["value","two-pages"]),n(r,{direction:o.bookNext,narrow:!1},null,8,["direction"])]),_:1},512)),[[ie,e.showToolbars]]):S("",!0)]),_:1})}const aa=b(ta,[["render",oa],["__scopeId","data-v-20fc0313"]]),sa={name:"MainReader",components:{BooksWindow:ao,ReaderEmpty:jo,ReaderNavToolbar:aa,ReaderTopToolbar:_e,ReaderSettingsDrawer:Ao,Unauthorized:ot},data(){return{showToolbars:!1}},computed:{...v(D,["isAuthorized"]),...P(D,{user:e=>e.user}),...P(d,{empty:e=>e.empty})},watch:{user(){this.loadReaderSettings()},isAuthorized(){this.loadReaderSettings()}},beforeMount(){d().$reset,this.loadReaderSettings()},methods:{..._(d,["loadReaderSettings"])}},ra={key:0},na={id:"readerContainer"};function ia(e,t,a,u,i,o){const r=h("ReaderTopToolbar"),g=h("BooksWindow"),m=h("ReaderNavToolbar"),O=h("ReaderEmpty"),N=h("ReaderSettingsDrawer"),fe=h("Unauthorized");return e.isAuthorized?(c(),p(at,{key:0,id:"readerWrapper"},{default:l(()=>[e.empty?(c(),p(O,{key:1})):(c(),w("div",ra,[s("div",na,[n(r),n(g),n(m)])])),n(N)]),_:1})):(c(),p(fe,{key:1}))}const Ra=b(sa,[["render",ia],["__scopeId","data-v-fa358348"]]);export{Ra as default};
|
|
1
|
+
const __vite__fileDeps=["assets/pdf-doc-8RVZqILx.js","assets/admin-drawer-panel-1pnfvY8O.js","assets/admin-drawer-panel-o87BwD38.css","assets/main-CMQwJ9aG.js","assets/main-Ztp855PW.css","assets/pdf-doc-CMzaSV_K.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{an as v,V as P,W as _,_ as b,Y as h,Z as c,X as p,$ as l,S as n,ao as y,ak as k,ap as f,al as R,aK as S,aH as w,aX as ee,U as B,bC as ve,bD as Pe,aw as F,bE as te,bF as oe,aJ as ae,bG as se,bH as we,b5 as Se,aU as T,bz as ye,aI as V,bu as re,aR as s,b3 as Ce,bI as Re,bJ as Be,D as M,aq as W,ar as z,bK as Te,bL as De,bM as Ie,bN as Le,bO as $e,aS as Ve,aT as Oe,aN as Ne,m as D,bP as Ae,av as ne,aV as H,bQ as Ee,bR as Ue,bj as xe,am as Fe,bS as ze,b7 as ie,bn as Me,bq as We,bT as He,bU as qe}from"./admin-drawer-panel-1pnfvY8O.js";import{b as d,c as Ge,_ as Ke,S as A,d as le,e as je,h as Ye}from"./main-CMQwJ9aG.js";import{d as Xe,b as Ze,S as Je,V as Qe,a as et}from"./settings-drawer-DbN6ISRH.js";import{P as tt,a as ce,U as ot,V as at}from"./unauthorized-BOIx7Y18.js";import{b as de,V as ue}from"./VWindowItem-7z55Y4lK.js";import{a as st}from"./VSelect-BoJq222l.js";import{V as rt,a as nt,b as it,c as lt}from"./VExpansionPanels-CgA3shsd.js";import{V as I,a as E}from"./VRadioGroup-B--7K_v5.js";import{V as U}from"./VCheckbox-eNspVUje.js";import{T as q,a as ct,M as dt,V as x,b as ut,P as he,c as ht,d as pt}from"./pagination-toolbar-LTuj5U-G.js";import"./copy-to-clipboard-DoUvDJVx.js";import"./VDialog-87AymJC5.js";import"./change-password-dialog-CjZdzaIk.js";import"./VTextField-CkWbil3K.js";import"./VSelectionControl-CVQ9wkE2.js";import"./VCheckboxBtn-DLzF_WHB.js";import"./VSlideGroup-Ce0j2BKK.js";import"./to-case-ehC9Ccyj.js";function pe(e,t){const{self:a=!1}=t.modifiers??{},u=t.value,i=typeof u=="object"&&u.options||{passive:!0},o=typeof u=="function"||"handleEvent"in u?u:u.handler,r=a?e:t.arg?document.querySelector(t.arg):window;r&&(r.addEventListener("scroll",o,i),e._onScroll=Object(e._onScroll),e._onScroll[t.instance.$.uid]={handler:o,options:i,target:a?void 0:r})}function ge(e,t){var o;if(!((o=e._onScroll)!=null&&o[t.instance.$.uid]))return;const{handler:a,options:u,target:i=e}=e._onScroll[t.instance.$.uid];i.removeEventListener("scroll",a,u),delete e._onScroll[t.instance.$.uid]}function gt(e,t){t.value!==t.oldValue&&(ge(e,t),pe(e,t))}const mt={mounted:pe,unmounted:ge,updated:gt},kt={name:"BookChangeDrawer",props:{direction:{type:String,required:!0}},head(){if(this.isDrawerOpen)return this.prefetchLinks(this.params,this.computedDirection,!0)},computed:{...v(d,["isBTT"]),...P(d,{computedDirection(){return this.normalizeDirection(this.direction)},params(e){return e.routes.books[this.computedDirection]},isDrawerOpen(e){return e.bookChange===this.computedDirection},icon(){return this.bookChangeIcon(this.computedDirection)}}),drawerLocation(){return this.bookChangeLocation(this.direction)},cursorClass(){return this.bookChangeCursorClass(this.computedDirection)},show(){return this.bookChangeShow(this.computedDirection)},route(){return this.toRoute(this.params)},label(){return this.linkLabel(this.computedDirection,"Book")}},methods:{..._(d,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute","bookChangeLocation","bookChangeCursorClass","bookChangeShow","bookChangeIcon"])}};function bt(e,t,a,u,i,o){const r=h("router-link");return o.show?(c(),p(Xe,{key:0,class:R(["bookChangeDrawer",{drawerActivated:e.isDrawerOpen}]),"disable-resize-watcher":"","disable-route-watcher":"",location:o.drawerLocation,"model-value":e.isDrawerOpen,scrim:!1,temporary:"",touchless:""},{default:l(()=>[n(r,{class:R({navLink:!0,[o.cursorClass]:!0}),to:o.route,"aria-label":o.label,title:o.label,onClick:t[0]||(t[0]=g=>g.stopImmediatePropagation())},{default:l(()=>[n(y,{class:"bookChangeIcon"},{default:l(()=>[k(f(e.icon),1)]),_:1})]),_:1},8,["class","to","aria-label","title"])]),_:1},8,["location","model-value","class"])):S("",!0)}const _t=b(kt,[["render",bt],["__scopeId","data-v-03e41a14"]]),ft={name:"BookChangeActivator",components:{BookChangeDrawer:_t},props:{direction:{type:String,required:!0}},computed:{computedDirection(){return this.normalizeDirection(this.direction)},positionClass(){return this.bookChangeLocation(this.direction)+"Pos"},cursorClass(){return this.bookChangeCursorClass(this.direction)},show(){return this.bookChangeShow(this.computedDirection)}},methods:{..._(d,["setBookChangeFlag","normalizeDirection","bookChangeLocation","bookChangeCursorClass","bookChangeShow"])}};function vt(e,t,a,u,i,o){const r=h("BookChangeDrawer");return c(),w(B,null,[o.show?(c(),w("div",{key:0,class:R(["bookChangeColumn",{[o.positionClass]:!0,[o.cursorClass]:!0}]),onClick:t[0]||(t[0]=ee(g=>e.setBookChangeFlag(a.direction),["stop"]))},null,2)):S("",!0),n(r,{direction:a.direction},null,8,["direction"])],64)}const Pt=b(ft,[["render",vt],["__scopeId","data-v-db3eb561"]]),wt={name:"LoadingPage",components:{Placeholder:tt},props:{twoPages:{type:Boolean,required:!0}}};function St(e,t,a,u,i,o){const r=h("Placeholder");return c(),w("div",{class:R(["pageLoading",{twoPages:a.twoPages}])},[n(r,{class:"pagePlaceholder"})],2)}const yt=b(wt,[["render",St],["__scopeId","data-v-04027168"]]),G="unauthorized",Ct={name:"ErrorPage",props:{twoPages:{type:Boolean,required:!0},type:{type:String,required:!0}},computed:{text(){return this.type===G?"Protected page":"Failed to load page"},icon(){return this.type===G?ve:Pe}}};function Rt(e,t,a,u,i,o){return c(),p(ce,{class:R(["pageError",{twoPages:a.twoPages}]),headline:o.text,icon:o.icon},null,8,["class","headline","icon"])}const Bt=b(Ct,[["render",Rt],["__scopeId","data-v-417a4cab"]]),Tt={name:"ImgPage",props:{book:{type:Object,required:!0},src:{type:String,required:!0}},emits:["load","error"],computed:{...P(d,{scale:e=>e.clientSettings.scale}),style(){const e={};if(this.scale==1)return e;const t=this.$el;if(!(t!=null&&t.naturalWidth))return e;const a=t.naturalWidth/2;return e.transformOrigin=`${a}px top`,e.transform=`scale(${this.scale})`,e},classes(){return this.fitToClass(this.book)}},methods:{..._(d,["fitToClass"])}},Dt=["src"];function It(e,t,a,u,i,o){return c(),w("img",F({class:[o.classes,"img"],draggable:"false",src:a.src,style:o.style},e.$attrs,{onError:t[0]||(t[0]=r=>e.$emit("error",r)),onLoad:t[1]||(t[1]=r=>e.$emit("load",r))}),null,16,Dt)}const K=b(Tt,[["render",It],["__scopeId","data-v-559e2ecc"]]),j=te(oe(()=>Ke(()=>import("./pdf-doc-8RVZqILx.js"),__vite__mapDeps([0,1,2,3,4,5])))),Lt=333,$t={name:"BookPage",components:{ErrorPage:Bt,LoadingPage:yt,PDFDoc:j,ImgPage:K},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},data(){return{showProgress:!1,loaded:!1,error:!1}},computed:{...v(d,["isVertical"]),...P(d,{scale:e=>e.clientSettings.scale}),style(){var a;const e={};if(this.book.fileType==="PDF"||this.scale==1)return e;const t=(a=this.$refs.pageComponent)==null?void 0:a.$el;return t!=null&&t.naturalHeight&&(e.height=t.naturalHeight*this.scale+"px",e.width=t.naturalWidth*this.scale+"px"),e},src(){const e={pk:this.book.pk,page:this.page,mtime:this.book.mtime};return Ge(e)},component(){return this.book.fileType==="PDF"?j:K},settings(){return this.getSettings(this.book)}},mounted(){setTimeout(function(){this.loaded||(this.loading=!0)},Lt)},methods:{..._(d,["getSettings"]),onLoad(){this.showProgress=!1,this.loaded=!0,this.error=!1},onError(){this.error="load",this.showProgress=!1},onUnauthorized(){this.error="unauthorized",this.showProgress=!1}}},Vt=["id","data-page"];function Ot(e,t,a,u,i,o){const r=h("ErrorPage"),g=h("LoadingPage");return c(),w("div",{id:`page${a.page}`,"data-page":a.page,class:"page",style:se(o.style)},[i.error?(c(),p(r,{key:0,"two-pages":o.settings.twoPages,type:i.error},null,8,["two-pages","type"])):i.showProgress&&!i.loaded?(c(),p(g,{key:1,"two-pages":o.settings.twoPages},null,8,["two-pages"])):(c(),p(ae(o.component),{key:2,ref:"pageComponent",book:a.book,page:1,src:o.src,onError:o.onError,onLoad:o.onLoad,onUnauthorized:o.onUnauthorized},null,40,["book","src","onError","onLoad","onUnauthorized"]))],12,Vt)}const me=b($t,[["render",Ot],["__scopeId","data-v-87996fa1"]]),Nt=.5,At={name:"ScaleForScroll",emits:["click"],data(){return{mdiMagnifyMinusOutline:we}},computed:{...P(d,{scale:e=>e.clientSettings.scale}),showReset(){return this.scale!=A},style(){return{cursor:this.scale==A?"zoom-in":"all-scroll"}}},methods:{..._(d,["setSettingsClient"]),clearSelection(){window.getSelection&&window.getSelection().removeAllRanges()},onDoubleClick(){this.clearSelection();const e=this.scale+Nt;this.setSettingsClient({scale:e})},scaleReset(){this.setSettingsClient({scale:A})}}};function Et(e,t,a,u,i,o){const r=Se("drag-scroller");return T((c(),w("div",{class:"scaleForScroll",style:se(o.style),onDblclick:t[0]||(t[0]=(...g)=>o.onDoubleClick&&o.onDoubleClick(...g))},[ye(e.$slots,"default",{},void 0,!0),o.showReset?(c(),p(y,{key:0,class:"resetIcon",onClick:ee(o.scaleReset,["stop"])},{default:l(()=>[k(f(i.mdiMagnifyMinusOutline),1)]),_:1},8,["onClick"])):S("",!0)],36)),[[r,,void 0,{onlyX:!0}]])}const ke=b(At,[["render",Et],["__scopeId","data-v-b24267c0"]]),Ut={name:"HorizontalPages",components:{BookPage:me,ScaleForScroll:ke},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},emits:["click"],computed:{...v(d,["isCoverPage","isReadInReverse"]),showSecondPage(){return this.getSettings(this.book).twoPages&&this.page<this.book.maxPage&&!this.isCoverPage(this.book,this.page)},showPageOne(){return!this.isReadInReverse||this.showSecondPage},showPageTwo(){return this.isReadInReverse||this.showSecondPage},pageOne(){return this.isReadInReverse?this.page+1:this.page},pageTwo(){return this.isReadInReverse?this.page:this.page+1}},methods:{..._(d,["getSettings"])}};function xt(e,t,a,u,i,o){const r=h("BookPage"),g=h("ScaleForScroll");return c(),p(g,{class:"noWrap"},{default:l(()=>[o.showPageOne?(c(),p(r,{key:0,ref:"pageOne",book:a.book,page:o.pageOne,class:"horizontalPage"},null,8,["book","page"])):S("",!0),o.showPageTwo?(c(),p(r,{key:1,book:a.book,page:o.pageTwo,class:"horizontalPage"},null,8,["book","page"])):S("",!0)]),_:1})}const Ft=b(Ut,[["render",xt],["__scopeId","data-v-9a560964"]]),zt={name:"PageChangeLink",props:{direction:{type:String,required:!0}},head(){return this.prefetchLinks(this.params,this.computedDirection)},computed:{...v(d,["isVertical","isFirstPage","isLastPage"]),...P(d,{params(e){return e.routes[this.computedDirection]}}),computedDirection(){return this.normalizeDirection(this.direction)},show(){return this.computedDirection==="prev"?!this.isFirstPage:!this.isLastPage},pageChangeClass(){let e="pageChange";return e+=this.isVertical?"Row":"Column",e},directionClass(){let e=this.direction;return this.isVertical&&(e+="Vertical"),e},route(){return this.toRoute(this.params)},label(){return this.linkLabel(this.computedDirection,"Page")}},methods:{..._(d,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute"])}};function Mt(e,t,a,u,i,o){const r=h("router-link");return o.show?(c(),p(r,{key:0,to:o.route,"aria-label":o.label,class:R({[o.pageChangeClass]:!0,[o.directionClass]:!0}),onClick:t[0]||(t[0]=g=>g.stopImmediatePropagation())},null,8,["to","aria-label","class"])):S("",!0)}const Wt=b(zt,[["render",Mt],["__scopeId","data-v-9ade7d96"]]),Ht=48,qt=48,Gt={name:"PagerHorizontal",components:{HorizontalPages:Ft,PageChangeLink:Wt},props:{book:{type:Object,required:!0}},data(){return{activePage:0,pages:[]}},computed:{...v(d,["isReadInReverse"]),...P(d,{prevBook:e=>{var t;return(t=e.routes.books)==null?void 0:t.prev},nextBook:e=>{var t;return(t=e.routes.books)==null?void 0:t.next},storePage:e=>e.page,storePk:e=>e.books.current.pk}),twoPages(){return this.getSettings(this.book).twoPages},windowIndex(){const e=this.activePage-this.pages[0];return Math.min(Math.max(0,e),this.book.maxPage)}},watch:{twoPages(){this.setActivePage(this.storePage,!0)},storePage(e){if(this.book.pk===this.storePk){this.activePage=e;const t=this.pages.at(0),a=this.pages.at(-1);(e<t||e>a)&&this.setPages()}},prevBook(e){this.book.pk===e.pk&&(this.activePage=this.book.maxPage)},nextBook(e){this.book.pk===e.pk&&(this.activePage=0)}},created(){this.book.pk===this.storePk?this.activePage=+this.$route.params.page:this.book.pk===this.prevBook.pk?this.activePage=this.book.maxPage:this.activePage=0,this.setPages()},methods:{..._(d,["getSettings","setBookChangeFlag","setActivePage"]),setPages(){const e=Math.max(this.activePage-Ht,0),t=Math.min(this.activePage+qt,this.book.maxPage),a=le.range(e,t+1);this.pages=a}}};function Kt(e,t,a,u,i,o){const r=h("PageChangeLink"),g=h("HorizontalPages");return c(),p(ue,{"show-arrows":"",continuous:"","model-value":o.windowIndex,reverse:e.isReadInReverse},{prev:l(()=>[n(r,{direction:"prev"})]),next:l(()=>[n(r,{direction:"next"})]),default:l(()=>[(c(!0),w(B,null,V(i.pages,m=>(c(),p(de,{key:`c/${a.book.pk}/${m}`,class:"windowItem",disabled:"",eager:m>=e.storePage-1&&m<=e.storePage+2,"model-value":m,transition:!0},{default:l(()=>[n(g,{book:a.book,page:m},null,8,["book","page"])]),_:2},1032,["eager","model-value"]))),128))]),_:1},8,["model-value","reverse"])}const Y=b(Gt,[["render",Kt],["__scopeId","data-v-e04bbc00"]]),jt=12,X=250,Yt={name:"PagerVertical",components:{BookPage:me,ScaleForScroll:ke},props:{book:{type:Object,required:!0}},data(){return{innerHeight:window.innerHeight,innerWidth:window.innerWidth,intersectorOn:!1,programmaticScroll:!1}},computed:{...P(d,{storePage:e=>e.page,showToolbars:e=>e.showToolbars}),...re(d,["reactWithScroll"]),settings(){return this.getSettings(this.book)},readInReverse(){return this.settings.readInReverse},items(){var a;const e=(a=this.book)!=null&&a.maxPage?this.book.maxPage+1:0,t=le.range(0,e);return this.readInReverse&&t.reverse(),t},visibleItems(){var e;return Math.min(((e=this.book)==null?void 0:e.maxPage)??0,jt)}},watch:{storePage(e){this.reactWithScroll&&this.scrollToPage(e)}},mounted(){window.addEventListener("resize",this.onResize),setTimeout(()=>{this.scrollToPage(this.storePage)},X)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{..._(d,["setActivePage","setBookChangeFlag","getSettings"]),onIntersect(e,t){if(e&&this.intersectorOn){const u=+t[0].target.dataset.page;this.setActivePage(u,!1)}},onScroll(){if(this.programmaticScroll)return;this.intersectorOn=!0;const e=this.$refs.verticalScroll.$el,t=e.scrollTop;if(this.storePage===0&&t===0)this.setBookChangeFlag("prev");else if(this.storePage===this.book.maxPage){const a=e.scrollTopMax||e.scrollHeight-e.clientTop;window.innerHeight+t+1>=a&&this.setBookChangeFlag("next")}},scrollToPage(e){this.intersectorOn=!1,this.programmaticScroll=!0;const t=this.$refs.verticalScroll;t?t.scrollToIndex(e):console.debug("Can't find verticalScroll component."),setTimeout(()=>{this.programmaticScroll=!1},X)},onResize(){this.innerHeight=window.innerHeight,this.innerWidth=window.innerWidth}}},Xt=["data-page"];function Zt(e,t,a,u,i,o){const r=h("BookPage"),g=h("ScaleForScroll");return c(),p(g,null,{default:l(()=>[T((c(),p(st,{id:"verticalScroll",key:o.readInReverse,ref:"verticalScroll",items:o.items,height:i.innerHeight,width:i.innerWidth},{default:l(({item:m})=>[n(r,{book:a.book,page:m,class:"verticalPage"},null,8,["book","page"]),T(s("div",{class:R(["pageTracker",{pageTrackerToolbars:e.showToolbars}]),"data-page":m},null,10,Xt),[[Ce,{handler:o.onIntersect,options:{threshold:[.75]}},void 0,{quiet:!0}]])]),_:1},8,["items","height","width"])),[[mt,o.onScroll,"#verticalScroll"]])]),_:1})}const Z=b(Yt,[["render",Zt],["__scopeId","data-v-ef3b4ade"]]),J=te(oe(()=>"@/components/reader/pager/pager-full-pdf.vue")),Jt={name:"PagerSelector",components:{PagerHorizontal:Y,PagerPDF:J,PagerVertical:Z},props:{book:{type:Object,required:!0}},emits:["click"],head(){return this.prefetchBook(this.book)},computed:{...v(d,["isVertical","cacheBook"]),...P(d,{storePk:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk)||0}}),readFullPdf(){return this.book.fileType=="PDF"&&this.cacheBook},component(){return this.readFullPdf?J:this.isVertical?Z:Y}},watch:{$route(e){+e.params.pk===this.book.pk&&this.setActivePage(+e.params.page,!0)}},created(){this.book.pk===this.storePk&&this.setActivePage(+this.$route.params.page,!0)},methods:{..._(d,["getSettings","setActivePage","prefetchBook"])}};function Qt(e,t,a,u,i,o){return c(),p(ae(o.component),{book:a.book},null,8,["book"])}const eo=b(Jt,[["render",Qt]]),to={name:"BooksWindow",components:{BookChangeActivator:Pt,Pager:eo},computed:{...v(d,["isBTT"]),...P(d,{books:e=>[e.books.prev,e.books.current,e.books.next].filter(Boolean),bookChange:e=>e.bookChange,currentBookPk:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk)||0},bookRoutes:e=>e.routes.books})},watch:{$route(e,t){(!t||!t.params||+e.params.pk!=+t.params.pk)&&this.loadBooks(e.params)}},beforeMount(){this.setBookChangeFlag(),this.loadBooks()},methods:{..._(d,["setBookChangeFlag","loadBooks","toggleToolbars"]),click(){this.toggleToolbars(),this.setBookChangeFlag()},eager(e){return this.bookChange&&this.bookRoutes[this.bookChange]&&this.bookRoutes[this.bookChange].pk===e}}};function oo(e,t,a,u,i,o){const r=h("BookChangeActivator"),g=h("Pager");return c(),p(ue,{id:"booksWindow",direction:"vertical","model-value":e.currentBookPk,reverse:e.isBTT,"show-arrows":"",onClick:e.toggleToolbars},{prev:l(()=>[n(r,{direction:"prev"})]),next:l(()=>[n(r,{direction:"next"})]),default:l(()=>[(c(!0),w(B,null,V(e.books,m=>(c(),p(de,{key:`c/${m.pk}`,class:"windowItem",disabled:"",eager:o.eager(m.pk),value:m.pk,transition:!0},{default:l(()=>[n(g,{book:m,onClick:o.click},null,8,["book","onClick"])]),_:2},1032,["eager","value"]))),128))]),_:1},8,["model-value","reverse","onClick"])}const ao=b(to,[["render",oo],["__scopeId","data-v-1e3deb54"]]),so={name:"DownloadPanel",data(){return{mdiDownload:Re,mdiFileImage:Be}},computed:{...v(d,["activeTitle","routeParams"]),...P(d,{currentBook:e=>{var t;return(t=e.books)==null?void 0:t.current},storePage:e=>e.page}),downloadURL(){return je(this.currentBook)},filename(){var e;return(e=this.currentBook)==null?void 0:e.filename},pageSrc(){const{pk:e,mtime:t}=this.currentBook;return Ye({pk:e,page:this.storePage,mtime:t})},pageName(){return`${this.activeTitle} - page ${this.storePage}.jpg`}},methods:{..._(M,["downloadIOSPWAFix"]),downloadPage(){this.downloadIOSPWAFix(this.pageSrc,this.pageName)},downloadBook(){this.downloadIOSPWAFix(this.downloadURL,this.filename)}}},ro={key:0,id:"downloadPanel"};function no(e,t,a,u,i,o){return e.currentBook?(c(),w("div",ro,[n(z,{onClick:o.downloadPage},{default:l(()=>[n(W,null,{default:l(()=>[n(y,null,{default:l(()=>[k(f(i.mdiFileImage),1)]),_:1}),k("Download Page "+f(e.storePage),1)]),_:1})]),_:1},8,["onClick"]),n(z,{onClick:o.downloadBook},{default:l(()=>[n(W,null,{default:l(()=>[n(y,null,{default:l(()=>[k(f(i.mdiDownload),1)]),_:1}),k("Download Book ")]),_:1})]),_:1},8,["onClick"])])):S("",!0)}const io=b(so,[["render",no],["__scopeId","data-v-9e01f4cb"]]),lo={name:"KeyboardShortcutsPanel",data(){return{mdiMenuLeft:Te,mdiMenuRight:De,mdiKeyboardOutline:Ie,mdiKeyboardSpace:Le,mdiAppleKeyboardShift:$e}},computed:{...v(M,["isMobile"])}},C=e=>(Ve("data-v-a8b4ac47"),e=e(),Oe(),e),co=C(()=>s("h4",null,"Navigation",-1)),uo={class:"highlight-table"},ho=C(()=>s("td",null,"Previous page",-1)),po=C(()=>s("td",null,"Next page",-1)),go=C(()=>s("tr",null,[s("td",null,","),s("td",null,[k("Next "),s("em",null,"only"),k(" one page in two page mode.")])],-1)),mo=C(()=>s("tr",null,[s("td",null,"."),s("td",null,[k("Previous "),s("em",null,"only"),k(" one page in two page mode.")])],-1)),ko=C(()=>s("tr",null,[s("td",null,"p"),s("td",null,"Previous Book")],-1)),bo=C(()=>s("tr",null,[s("td",null,"n"),s("td",null,"Next Book")],-1)),_o=C(()=>s("tr",null,[s("td",null,"esc"),s("td",null,"Close book")],-1)),fo=C(()=>s("h4",null,"Fit Page To",-1)),vo=C(()=>s("table",{class:"highlight-table"},[s("tbody",null,[s("tr",null,[s("td",null,"s"),s("td",null,"screen")]),s("tr",null,[s("td",null,"h"),s("td",null,"screen height")]),s("tr",null,[s("td",null,"w"),s("td",null,"screen width")]),s("tr",null,[s("td",null,"o"),s("td",null,"Show page at original size")]),s("tr",null,[s("td",null,"2"),s("td",null,"Toggle two page view")]),s("tr",null,[s("td",null,"r"),s("td",null,"Read Right to Left")]),s("tr",null,[s("td",null,"l"),s("td",null,"Read Left to Right")]),s("tr",null,[s("td",null,"t"),s("td",null,"Read Top to Bottom")]),s("tr",null,[s("td",null,"b"),s("td",null,"Read in Bottom to Top")])])],-1)),Po=C(()=>s("h4",null,"Other",-1)),wo=C(()=>s("table",{class:"highlight-table"},[s("tbody",null,[s("tr",null,[s("td",null,"m"),s("td",null,"Show comic's metadata")]),s("tr",null,[s("td",null,"double click"),s("td",null,"Zoom page")])])],-1));function So(e,t,a,u,i,o){return e.isMobile?S("",!0):(c(),p(lt,{key:0},{default:l(()=>[n(rt,{id:"readerKeyboardShortcuts"},{default:l(()=>[n(nt,{id:"shortcutsTitle"},{default:l(()=>[n(y,{id:"keyboardIcon"},{default:l(()=>[k(f(i.mdiKeyboardOutline),1)]),_:1}),k("Keyboard Shortcuts ")]),_:1}),n(it,null,{default:l(()=>[co,s("table",uo,[s("tbody",null,[s("tr",null,[s("td",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiMenuLeft),1)]),_:1}),k(", j, "),s("div",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiAppleKeyboardShift),1)]),_:1}),n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiKeyboardSpace),1)]),_:1})])]),ho]),s("tr",null,[s("td",null,[n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiMenuRight),1)]),_:1}),k(", k, "),n(y,{class:"keyIcon",density:"compact"},{default:l(()=>[k(f(i.mdiKeyboardSpace),1)]),_:1})]),po]),go,mo,ko,bo,_o])]),fo,vo,Po,wo]),_:1})]),_:1})]),_:1}))}const yo=b(lo,[["render",So],["__scopeId","data-v-a8b4ac47"]]),be=["fitTo","readingDirection","twoPages"];Object.freeze(be);const Co={name:"ReaderSettingsPanel",data(){return{isGlobalScope:!1,mdiOpenInNew:Ne,openDelay:2e3}},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["isVertical","isPDF","cacheBook"]),...P(d,{choices:e=>e.choices,validBook:e=>{var t;return!!((t=e.books)!=null&&t.current)},selectedSettings(e){var t,a;return this.isGlobalScope||!((t=e.books)!=null&&t.current)?e.readerSettings:(a=e.books)==null?void 0:a.current.settings},isClearSettingsButtonDisabled(e){var t,a;if(this.isGlobalScope||!((t=e.books)!=null&&t.current))return!0;for(const u of be){const i=(a=e.books)==null?void 0:a.current.settings[u];if(!e.choices.nullValues.has(i))return!1}return!0},bookInBrowserURL(e){var t,a;return(t=e.books)!=null&&t.current?Ae((a=e.books)==null?void 0:a.current):""}}),...re(d,["readRtlInReverse"]),fitToChoices(){return this.choicesWithoutNull("fitTo")},readingDirectionChoices(){return this.choicesWithoutNull("readingDirection")},disableTwoPages(){return this.isVertical||this.isPDF&&this.cacheBook},disableCacheBook(){return this.isVertical&&this.isPDF}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(d,["clearSettingsLocal","setSettingsGlobal","setSettingsLocal","setSettingsClient"]),settingsDialogChanged(e){this.isGlobalScope?this.setSettingsGlobal(e):this.setSettingsLocal(e)},choicesWithoutNull(e){const t=[];for(const a of this.choices[e])a.value&&t.push(a);return Object.freeze(t),t},_keyUpListener(e){if(e.stopPropagation(),this.isAuthDialogOpen)return;let t;switch(e.key){case"w":t={fitTo:"W"};break;case"h":t={fitTo:"H"};break;case"s":t={fitTo:"S"};break;case"o":t={fitTo:"O"};break;case"2":t={twoPages:!this.selectedSettings.twoPages};break;case"l":t={readingDirection:"ltr"};break;case"r":t={readingDirection:"rtl"};break;case"t":t={readingDirection:"ttb"};break;case"b":t={readingDirection:"bbt"};break}t&&this.setSettingsLocal(t)}}},Ro={key:0,id:"readerSettings"},Bo={id:"readerScopedSettings"},To=["href"];function Do(e,t,a,u,i,o){return e.validBook?(c(),w("div",Ro,[n(E,{modelValue:i.isGlobalScope,"onUpdate:modelValue":t[0]||(t[0]=r=>i.isGlobalScope=r),density:"compact",label:"Scope","hide-details":"auto"},{default:l(()=>[n(I,{label:"Only this comic",value:!1}),n(I,{label:"Default for all comics",value:!0})]),_:1},8,["modelValue"]),s("div",Bo,[n(E,{class:"displayRadioGroup",density:"compact",label:"Display","hide-details":"auto","model-value":e.selectedSettings.fitTo,"onUpdate:modelValue":t[1]||(t[1]=r=>o.settingsDialogChanged({fitTo:r}))},{default:l(()=>[(c(!0),w(B,null,V(o.fitToChoices,r=>(c(),p(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),n(U,{disabled:o.disableTwoPages,class:"displayTwoPages",density:"compact",label:"Two pages","hide-details":"auto","model-value":e.selectedSettings.twoPages,"true-value":!0,indeterminate:e.selectedSettings.twoPages===null||e.selectedSettings.twoPages===void 0,"onUpdate:modelValue":t[2]||(t[2]=r=>o.settingsDialogChanged({twoPages:r}))},null,8,["disabled","model-value","indeterminate"]),n(E,{class:"displayRadioGroup",density:"compact",label:"Reading Direction","hide-details":"auto","model-value":e.selectedSettings.readingDirection,"onUpdate:modelValue":t[3]||(t[3]=r=>o.settingsDialogChanged({readingDirection:r}))},{default:l(()=>[(c(!0),w(B,null,V(o.readingDirectionChoices,r=>(c(),p(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),T(n(U,{"model-value":e.cacheBook,class:"cacheBook",density:"compact",disabled:o.disableCacheBook,label:"Cache Entire Book","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[4]||(t[4]=r=>e.setSettingsClient({cacheBook:r}))},null,8,["model-value","disabled"]),[[q,{openDelay:i.openDelay,text:"Cache all pages from this book in the browser"}]]),e.isPDF?(c(),w("a",{key:0,id:"readPDFInBrowser",href:e.bookInBrowserURL,target:"_blank"},[n(y,null,{default:l(()=>[k(f(i.mdiOpenInNew),1)]),_:1}),k("Read PDF in Browser ")],8,To)):S("",!0),i.isGlobalScope?(c(),p(U,{key:1,"model-value":e.selectedSettings.readRtlInReverse,class:"readRtlInReverse",density:"compact",label:"Read RTL Comics as LTR","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[5]||(t[5]=r=>o.settingsDialogChanged({readRtlInReverse:r}))},null,8,["model-value"])):S("",!0),i.isGlobalScope?S("",!0):T((c(),p(ne,{key:2,id:"clearSettingsButton",disabled:e.isClearSettingsButtonDisabled,onClick:e.clearSettingsLocal},{default:l(()=>[k(" Clear Settings ")]),_:1},8,["disabled","onClick"])),[[q,{openDelay:i.openDelay,text:"Use the default settings for all comics for this comic"}]])])])):S("",!0)}const Io=b(Co,[["render",Do],["__scopeId","data-v-993d7417"]]),Lo={name:"ReaderSettingsSuperPanel",components:{DownloadPanel:io,ReaderKeyboardShortcutsPanel:yo,ReaderSettingsPanel:Io}};function $o(e,t,a,u,i,o){const r=h("ReaderSettingsPanel"),g=h("ReaderKeyboardShortcutsPanel"),m=h("DownloadPanel");return c(),w(B,null,[n(r),n(H),n(g),n(H),n(m)],64)}const Vo=b(Lo,[["render",$o]]),Oo={name:"ReaderSettingsDrawer",components:{SettingsDrawer:Ze,ReaderSettingsSuperPanel:Vo}};function No(e,t,a,u,i,o){const r=h("ReaderSettingsSuperPanel"),g=h("SettingsDrawer");return c(),p(g,{title:"Reader",temporary:"","disable-resize-watcher":""},{panel:l(()=>[n(r)]),_:1})}const Ao=b(Oo,[["render",No]]),Q={a:Ue,f:xe,s:Fe},Eo={a:"Story Arc",f:"Folder",s:"Series"},Uo={name:"ReaderArcSelect",components:{ToolbarSelect:ct},computed:{...P(d,{arcGroup:e=>{var t;return((t=e.arc)==null?void 0:t.group)||"s"},arc:e=>e.arc,arcName:e=>{for(const t of e.arcs)if(e.arc.group===t.group&&e.arc.pks===t.pks)return t.name;return"Unknown"},arcItems:e=>{const t=[];for(const a of e.arcs){const u={value:a,title:a.name,group:a.group,subtitle:Eo[a.group],prependIcon:Q[a.group]};t.push(u)}return t}})},methods:{..._(d,["loadBooks"]),arcIcon(e){return Q[e]},checkIcon(e){return e===this.arc?Ee:""},onUpdate(e){const t=this.$route.params;if(!t)return;const a={group:e.group,pks:e.pks},u={...t,arc:a};this.loadBooks(u)}}},xo={id:"arcPos"};function Fo(e,t,a,u,i,o){const r=h("ToolbarSelect");return c(),p(r,{"model-value":e.arc,class:"arcSelect","select-label":"reading order",items:e.arcItems,disabled:!e.arcItems||e.arcItems.length<=1,"onUpdate:modelValue":o.onUpdate},{item:l(({item:g,props:m})=>[n(z,F(m,{density:"compact",variant:"plain","prepend-icon":g.raw.prependIcon,subtitle:g.raw.subtitle,"append-icon":o.checkIcon(m.value)}),null,16,["prepend-icon","subtitle","append-icon"])]),selection:l(({item:g,props:m})=>[n(y,F({size:"large"},m,{class:"arcSelectIcon"}),{default:l(()=>[k(f(o.arcIcon(g.raw.group)),1)]),_:2},1040),s("span",xo,f(e.arc.index)+" / "+f(e.arc.count),1)]),_:1},8,["model-value","items","disabled","onUpdate:modelValue"])}const zo=b(Uo,[["render",Fo],["__scopeId","data-v-42a57aca"]]),Mo={name:"ReaderTitleToolbar",components:{MetadataDialog:dt,ReaderArcSelect:zo,SettingsDrawerButton:Je},data(){return{mdiClose:ze,routeChanged:!1}},head(){return{meta:[{hid:"description",name:"description",content:`reader ${this.activeTitle} page ${this.storePage}`}]}},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["activeTitle","closeBookRoute"]),...P(d,{showToolbars:e=>e.showToolbars,currentBook:e=>{var t;return((t=e.books)==null?void 0:t.current)||{}},empty:e=>e.empty,subtitle:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.name)||""}}),title(){return this.activeTitle},extensionHeight(){let e=32;return this.subtitle&&(e*=2),e+=4,e}},watch:{$route(e,t){t&&(this.routeChanged=!0)}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(M,["setTimestamp"]),..._(d,["routeToDirection","routeToDirectionOne","routeToBook","setBookChangeFlag"]),openMetadata(){this.$refs.metadataDialog.dialog=!0},onCloseBook(){this.routeChanged&&this.setTimestamp()},_keyUpListener(e){if(e.stopPropagation(),!this.isAuthDialogOpen)switch(e.key){case"Escape":this.$refs.closeBook.$el.click();break;case"m":this.empty||this.openMetadata();break}}}},Wo={id:"title"},Ho={key:0,id:"subtitle"};function qo(e,t,a,u,i,o){const r=h("ReaderArcSelect"),g=h("MetadataDialog"),m=h("SettingsDrawerButton");return c(),p(We,null,{default:l(()=>[T(n(et,{id:"readerToolbarTop",density:"compact","extension-height":o.extensionHeight},Me({default:l(()=>[n(x,null,{default:l(()=>[n(ne,{ref:"closeBook",class:"closeBook",to:e.closeBookRoute,size:"large",density:"compact",variant:"plain",onClick:o.onCloseBook},{default:l(()=>[k(" close book ")]),_:1},8,["to","onClick"])]),_:1}),n(ut),e.empty?S("",!0):(c(),p(x,{key:0},{default:l(()=>[n(r),n(g,{ref:"metadataDialog",group:"c",toolbar:!0,book:e.currentBook},null,8,["book"])]),_:1})),n(x,null,{default:l(()=>[n(m)]),_:1})]),_:2},[o.title?{name:"extension",fn:l(()=>[n(Qe,{class:"readerTitle"},{default:l(()=>[s("div",Wo,f(o.title),1),e.subtitle?(c(),w("div",Ho,f(e.subtitle),1)):S("",!0)]),_:1})]),key:"0"}:void 0]),1032,["extension-height"]),[[ie,e.showToolbars]])]),_:1})}const _e=b(Mo,[["render",qo],["__scopeId","data-v-8ac187ef"]]),Go={name:"ReaderEmpty",components:{ReaderTopToolbar:_e},data(){return{mdiBookRemoveOutline:He}}};function Ko(e,t,a,u,i,o){const r=h("ReaderTopToolbar");return c(),w(B,null,[n(r),n(ce,{class:"empty",headline:"Book Not Found",title:"Close the reader and find another book",icon:i.mdiBookRemoveOutline},null,8,["icon"])],64)}const jo=b(Go,[["render",Ko],["__scopeId","data-v-65d65e48"]]),Yo={name:"ReaderBookChangeNavButton",components:{PaginationNavButton:he},props:{direction:{type:String,required:!0}},computed:{...v(d,["isBTT"]),...P(d,{toRoute(e){var a;const t=(a=e==null?void 0:e.routes)==null?void 0:a.books[this.direction];return t?{params:{...t}}:""}}),title(){return(this.direction==="prev"?"Previous":"Next")+" Book"},icon(){return this.bookChangeIcon(this.direction)},classes(){return{bookChangeNavButtonLeft:this.direction==="prev",bookChangeNavButtonRight:this.direction==="next"}}},methods:{..._(d,["bookChangeIcon"])}};function Xo(e,t,a,u,i,o){const r=h("PaginationNavButton");return e.toRoute?(c(),p(r,{key:0,class:R(o.classes),icon:"",variant:"plain",title:o.title,to:e.toRoute},{default:l(()=>[n(y,null,{default:l(()=>[k(f(o.icon),1)]),_:1})]),_:1},8,["class","title","to"])):S("",!0)}const Zo=b(Yo,[["render",Xo],["__scopeId","data-v-117f651c"]]),Jo={name:"ReaderNavButton",components:{PaginationNavButton:he},props:{value:{type:Number,required:!0},twoPages:{type:Boolean,default:!1}},computed:{...v(d,["isVertical"]),...P(d,{storePage:e=>e.page,toRoute(e){if(!this.isVertical)return{params:{pk:e.books.current.pk,page:this.value}}},isBookPrev:e=>!!e.routes.books.prev,isBookNext:e=>!!e.routes.books.next}),classes(){return{readerNavButtonLeft:!this.isBookPrev&&this.value===0,readerNavButtonRight:!this.isBookNext&&this.value!=0}},title(){return"Page "+this.value},disabled(){return this.value===this.storePage||this.twoPages&&!!(this.value%2)&&this.value-1===this.storePage}},methods:{..._(d,["setActivePage"]),onClick(){this.isVertical&&this.setActivePage(this.value,!0)}}};function Qo(e,t,a,u,i,o){const r=h("PaginationNavButton");return c(),p(r,{key:e.isVertical,disabled:o.disabled,class:R(["readerNavButton",o.classes]),title:o.title,to:e.toRoute,onClick:o.onClick},{default:l(()=>[k(f(a.value),1)]),_:1},8,["disabled","class","title","to","onClick"])}const ea=b(Jo,[["render",Qo],["__scopeId","data-v-530fba8c"]]),L="prev",$="next",ta={name:"ReaderNavToolbar",components:{PaginationSlider:ht,ReaderNavButton:ea,PaginationToolbar:pt,ReaderBookChangeNavButton:Zo},computed:{...v(D,["isAuthDialogOpen"]),...v(d,["activeSettings","isReadInReverse","isVertical"]),...P(d,{showToolbars:e=>e.showToolbars,storePage:e=>e.page,key(e){var t,a;return`${(a=(t=e.books)==null?void 0:t.current)==null?void 0:a.pk}:${this.step}:${this.isReadInReverse}`},maxPage:e=>{var t,a;return((a=(t=e.books)==null?void 0:t.current)==null?void 0:a.maxPage)||0}}),twoPages(){return this.activeSettings.twoPages},step(){return this.activeSettings.twoPages?2:1},trackColor(){return this.twoPages&&+this.storePage>=this.maxPage-1?this.$vuetify.theme.current.colors.primary:""},min(){return this.isReadInReverse?this.maxPage:0},max(){return this.isReadInReverse?0:this.maxPage},bookPrev(){return this.isReadInReverse?"next":"prev"},bookNext(){return this.isReadInReverse?"prev":"next"}},mounted(){document.addEventListener("keyup",this._keyUpListener)},beforeUnmount(){document.removeEventListener("keyup",this._keyUpListener)},methods:{..._(d,["routeToBook","routeToDirection","routeToDirectionOne","routeToPage","setActivePage"]),onSliderUpdate(e){this.isVertical?this.setActivePage(e,!0):this.routeToPage(e)},_keyUpListener(e){if(e.stopPropagation(),!this.isAuthDialogOpen)switch(e.key){case" ":!e.shiftKey&&window.innerHeight+window.scrollY+1>=document.body.scrollHeight?this.routeToDirection($):e.shiftKey&&window.scrollY===0&&this.routeToDirection(L);break;case"j":case"ArrowRight":this.routeToDirection($);break;case"k":case"ArrowLeft":this.routeToDirection(L);break;case",":this.routeToDirectionOne(L);break;case".":this.routeToDirectionOne($);break;case"n":this.routeToBook($);break;case"p":this.routeToBook(L);break}}}};function oa(e,t,a,u,i,o){const r=h("ReaderBookChangeNavButton"),g=h("ReaderNavButton"),m=h("PaginationSlider"),O=h("PaginationToolbar");return c(),p(qe,null,{default:l(()=>[e.maxPage?T((c(),p(O,{key:0,id:"readerToolbarNav"},{default:l(()=>[n(r,{direction:o.bookPrev,narrow:!1},null,8,["direction"]),n(g,{value:o.min,"two-pages":o.twoPages},null,8,["value","two-pages"]),(c(),p(m,{key:e.key,"model-value":e.storePage,min:0,max:e.maxPage,step:o.step,"track-color":o.trackColor,reverse:e.isReadInReverse,"onUpdate:modelValue":t[0]||(t[0]=N=>o.onSliderUpdate(N))},null,8,["model-value","max","step","track-color","reverse"])),n(g,{value:o.max,"two-pages":o.twoPages},null,8,["value","two-pages"]),n(r,{direction:o.bookNext,narrow:!1},null,8,["direction"])]),_:1},512)),[[ie,e.showToolbars]]):S("",!0)]),_:1})}const aa=b(ta,[["render",oa],["__scopeId","data-v-20fc0313"]]),sa={name:"MainReader",components:{BooksWindow:ao,ReaderEmpty:jo,ReaderNavToolbar:aa,ReaderTopToolbar:_e,ReaderSettingsDrawer:Ao,Unauthorized:ot},data(){return{showToolbars:!1}},computed:{...v(D,["isAuthorized"]),...P(D,{user:e=>e.user}),...P(d,{empty:e=>e.empty})},watch:{user(){this.loadReaderSettings()},isAuthorized(){this.loadReaderSettings()}},beforeMount(){d().$reset,this.loadReaderSettings()},methods:{..._(d,["loadReaderSettings"])}},ra={key:0},na={id:"readerContainer"};function ia(e,t,a,u,i,o){const r=h("ReaderTopToolbar"),g=h("BooksWindow"),m=h("ReaderNavToolbar"),O=h("ReaderEmpty"),N=h("ReaderSettingsDrawer"),fe=h("Unauthorized");return e.isAuthorized?(c(),p(at,{key:0,id:"readerWrapper"},{default:l(()=>[e.empty?(c(),p(O,{key:1})):(c(),w("div",ra,[s("div",na,[n(r),n(g),n(m)])])),n(N)]),_:1})):(c(),p(fe,{key:1}))}const Ra=b(sa,[["render",ia],["__scopeId","data-v-fa358348"]]);export{Ra as default};
|
|
Binary file
|
|
Binary file
|