codex 1.6.0a12__py3-none-any.whl → 1.6.0rc1__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.

Files changed (363) hide show
  1. codex/static_root/assets/{VCheckbox-B3vCf1Vu.e1991f98ab6c.js → VCheckbox-BjSDxmSa.6b857082d8ff.js} +1 -1
  2. codex/static_root/assets/VCheckbox-BjSDxmSa.6b857082d8ff.js.br +0 -0
  3. codex/static_root/assets/VCheckbox-BjSDxmSa.6b857082d8ff.js.gz +0 -0
  4. codex/static_root/assets/{VCheckbox-B3vCf1Vu.js → VCheckbox-BjSDxmSa.js} +1 -1
  5. codex/static_root/assets/VCheckbox-BjSDxmSa.js.br +0 -0
  6. codex/static_root/assets/VCheckbox-BjSDxmSa.js.gz +0 -0
  7. codex/static_root/assets/{VCheckboxBtn-Cj6bUYmw.196cc43ca1c8.js → VCheckboxBtn-DgL9kXWT.15c0a674a416.js} +1 -1
  8. codex/static_root/assets/VCheckboxBtn-DgL9kXWT.15c0a674a416.js.br +0 -0
  9. codex/static_root/assets/VCheckboxBtn-DgL9kXWT.15c0a674a416.js.gz +0 -0
  10. codex/static_root/assets/{VCheckboxBtn-Cj6bUYmw.js → VCheckboxBtn-DgL9kXWT.js} +1 -1
  11. codex/static_root/assets/VCheckboxBtn-DgL9kXWT.js.br +0 -0
  12. codex/static_root/assets/VCheckboxBtn-DgL9kXWT.js.gz +0 -0
  13. codex/static_root/assets/{VCombobox-wIqJY8no.3547ff73e91e.js → VCombobox-BtGhegdb.3ed82fdda521.js} +1 -1
  14. codex/static_root/assets/VCombobox-BtGhegdb.3ed82fdda521.js.br +0 -0
  15. codex/static_root/assets/VCombobox-BtGhegdb.3ed82fdda521.js.gz +0 -0
  16. codex/static_root/assets/{VCombobox-wIqJY8no.js → VCombobox-BtGhegdb.js} +1 -1
  17. codex/static_root/assets/VCombobox-BtGhegdb.js.br +0 -0
  18. codex/static_root/assets/VCombobox-BtGhegdb.js.gz +0 -0
  19. codex/static_root/assets/{VDialog-D6HUFV6a.ac71da510b3f.js → VDialog-DqQgZayw.fec39962de40.js} +1 -1
  20. codex/static_root/assets/VDialog-DqQgZayw.fec39962de40.js.br +0 -0
  21. codex/static_root/assets/VDialog-DqQgZayw.fec39962de40.js.gz +0 -0
  22. codex/static_root/assets/{VDialog-D6HUFV6a.js → VDialog-DqQgZayw.js} +1 -1
  23. codex/static_root/assets/VDialog-DqQgZayw.js.br +0 -0
  24. codex/static_root/assets/VDialog-DqQgZayw.js.gz +0 -0
  25. codex/static_root/assets/{VExpansionPanels-BUJaYmzY.44e8a00a2ebe.js → VExpansionPanels-CH6E8s7q.47c91b41e26f.js} +1 -1
  26. codex/static_root/assets/VExpansionPanels-CH6E8s7q.47c91b41e26f.js.br +0 -0
  27. codex/static_root/assets/VExpansionPanels-CH6E8s7q.47c91b41e26f.js.gz +0 -0
  28. codex/static_root/assets/{VExpansionPanels-BUJaYmzY.js → VExpansionPanels-CH6E8s7q.js} +1 -1
  29. codex/static_root/assets/VExpansionPanels-CH6E8s7q.js.br +0 -0
  30. codex/static_root/assets/VExpansionPanels-CH6E8s7q.js.gz +0 -0
  31. codex/static_root/assets/{VRadioGroup-CayclHra.0a5b1c9a7b71.js → VRadioGroup-BC5CvPgU.d2a3d39934df.js} +1 -1
  32. codex/static_root/assets/VRadioGroup-BC5CvPgU.d2a3d39934df.js.br +0 -0
  33. codex/static_root/assets/VRadioGroup-BC5CvPgU.d2a3d39934df.js.gz +0 -0
  34. codex/static_root/assets/{VRadioGroup-CayclHra.js → VRadioGroup-BC5CvPgU.js} +1 -1
  35. codex/static_root/assets/VRadioGroup-BC5CvPgU.js.br +0 -0
  36. codex/static_root/assets/VRadioGroup-BC5CvPgU.js.gz +0 -0
  37. codex/static_root/assets/{VSelect-ou2Q9UaN.8ddd219784e1.js → VSelect-BNztcu1Z.48c0f0a0116e.js} +1 -1
  38. codex/static_root/assets/VSelect-BNztcu1Z.48c0f0a0116e.js.br +0 -0
  39. codex/static_root/assets/VSelect-BNztcu1Z.48c0f0a0116e.js.gz +0 -0
  40. codex/static_root/assets/{VSelect-ou2Q9UaN.js → VSelect-BNztcu1Z.js} +1 -1
  41. codex/static_root/assets/VSelect-BNztcu1Z.js.br +0 -0
  42. codex/static_root/assets/VSelect-BNztcu1Z.js.gz +0 -0
  43. codex/static_root/assets/{VSelectionControl-BOKIwNZb.js → VSelectionControl-BlKP2Bmf.e47daa76ddf4.js} +1 -1
  44. codex/static_root/assets/VSelectionControl-BlKP2Bmf.e47daa76ddf4.js.br +0 -0
  45. codex/static_root/assets/VSelectionControl-BlKP2Bmf.e47daa76ddf4.js.gz +0 -0
  46. codex/static_root/assets/{VSelectionControl-BOKIwNZb.16e0cdde978c.js → VSelectionControl-BlKP2Bmf.js} +1 -1
  47. codex/static_root/assets/VSelectionControl-BlKP2Bmf.js.br +0 -0
  48. codex/static_root/assets/VSelectionControl-BlKP2Bmf.js.gz +0 -0
  49. codex/static_root/assets/{VSlideGroup-C3XgVg2T.d2b0ee4f596c.js → VSlideGroup-psRbw8SA.fdcda702522d.js} +1 -1
  50. codex/static_root/assets/VSlideGroup-psRbw8SA.fdcda702522d.js.br +0 -0
  51. codex/static_root/assets/VSlideGroup-psRbw8SA.fdcda702522d.js.gz +0 -0
  52. codex/static_root/assets/{VSlideGroup-C3XgVg2T.js → VSlideGroup-psRbw8SA.js} +1 -1
  53. codex/static_root/assets/VSlideGroup-psRbw8SA.js.br +0 -0
  54. codex/static_root/assets/VSlideGroup-psRbw8SA.js.gz +0 -0
  55. codex/static_root/assets/{VTable-CrIiBr9q.b4669247af45.js → VTable-CmW-pZRU.ddb814d76c40.js} +1 -1
  56. codex/static_root/assets/VTable-CmW-pZRU.ddb814d76c40.js.br +0 -0
  57. codex/static_root/assets/VTable-CmW-pZRU.ddb814d76c40.js.gz +0 -0
  58. codex/static_root/assets/{VTable-CrIiBr9q.js → VTable-CmW-pZRU.js} +1 -1
  59. codex/static_root/assets/VTable-CmW-pZRU.js.br +0 -0
  60. codex/static_root/assets/VTable-CmW-pZRU.js.gz +0 -0
  61. codex/static_root/assets/{VTextField-HAAxrpNi.6f6dcb50079a.js → VTextField-CLXM8_Dv.ec4fd23f77e3.js} +1 -1
  62. codex/static_root/assets/VTextField-CLXM8_Dv.ec4fd23f77e3.js.br +0 -0
  63. codex/static_root/assets/VTextField-CLXM8_Dv.ec4fd23f77e3.js.gz +0 -0
  64. codex/static_root/assets/{VTextField-HAAxrpNi.js → VTextField-CLXM8_Dv.js} +1 -1
  65. codex/static_root/assets/VTextField-CLXM8_Dv.js.br +0 -0
  66. codex/static_root/assets/VTextField-CLXM8_Dv.js.gz +0 -0
  67. codex/static_root/assets/{VWindowItem-aal6-Uv4.d178e2af20a7.js → VWindowItem--B3loLAX.94f86a20da0c.js} +1 -1
  68. codex/static_root/assets/VWindowItem--B3loLAX.94f86a20da0c.js.br +0 -0
  69. codex/static_root/assets/VWindowItem--B3loLAX.94f86a20da0c.js.gz +0 -0
  70. codex/static_root/assets/{VWindowItem-aal6-Uv4.js → VWindowItem--B3loLAX.js} +1 -1
  71. codex/static_root/assets/VWindowItem--B3loLAX.js.br +0 -0
  72. codex/static_root/assets/VWindowItem--B3loLAX.js.gz +0 -0
  73. codex/static_root/assets/{admin-D5JDmLDy.e4df3dd3a3fe.js → admin-C8tNLljO.7af46b89ca08.js} +1 -1
  74. codex/static_root/assets/admin-C8tNLljO.7af46b89ca08.js.br +0 -0
  75. codex/static_root/assets/admin-C8tNLljO.7af46b89ca08.js.gz +0 -0
  76. codex/static_root/assets/{admin-D5JDmLDy.js → admin-C8tNLljO.js} +1 -1
  77. codex/static_root/assets/admin-C8tNLljO.js.br +0 -0
  78. codex/static_root/assets/admin-C8tNLljO.js.gz +0 -0
  79. codex/static_root/assets/{admin-drawer-panel-BF-h3Wm0.1f372db8d08f.js → admin-drawer-panel-vQfT7tFo.133796b20536.js} +2 -2
  80. codex/static_root/assets/admin-drawer-panel-vQfT7tFo.133796b20536.js.br +0 -0
  81. codex/static_root/assets/{admin-drawer-panel-BF-h3Wm0.1f372db8d08f.js.gz → admin-drawer-panel-vQfT7tFo.133796b20536.js.gz} +0 -0
  82. codex/static_root/assets/{admin-drawer-panel-BF-h3Wm0.js → admin-drawer-panel-vQfT7tFo.js} +2 -2
  83. codex/static_root/assets/admin-drawer-panel-vQfT7tFo.js.br +0 -0
  84. codex/static_root/assets/{admin-drawer-panel-BF-h3Wm0.js.gz → admin-drawer-panel-vQfT7tFo.js.gz} +0 -0
  85. codex/static_root/assets/browser-B4FQ8Dry.00bb8157e899.js +1 -0
  86. codex/static_root/assets/browser-B4FQ8Dry.00bb8157e899.js.br +0 -0
  87. codex/static_root/assets/browser-B4FQ8Dry.00bb8157e899.js.gz +0 -0
  88. codex/static_root/assets/browser-B4FQ8Dry.js +1 -0
  89. codex/static_root/assets/browser-B4FQ8Dry.js.br +0 -0
  90. codex/static_root/assets/browser-B4FQ8Dry.js.gz +0 -0
  91. codex/static_root/assets/browser-BlycPHgZ.5842145b0e63.css +1 -0
  92. codex/static_root/assets/browser-BlycPHgZ.5842145b0e63.css.br +0 -0
  93. codex/static_root/assets/browser-BlycPHgZ.5842145b0e63.css.gz +0 -0
  94. codex/static_root/assets/browser-BlycPHgZ.css +1 -0
  95. codex/static_root/assets/browser-BlycPHgZ.css.br +0 -0
  96. codex/static_root/assets/browser-BlycPHgZ.css.gz +0 -0
  97. codex/static_root/assets/{change-password-dialog-BCYw5K7E.a8bae0450f20.js → change-password-dialog-onUsTVN5.eedc238a00c5.js} +1 -1
  98. codex/static_root/assets/change-password-dialog-onUsTVN5.eedc238a00c5.js.br +0 -0
  99. codex/static_root/assets/change-password-dialog-onUsTVN5.eedc238a00c5.js.gz +0 -0
  100. codex/static_root/assets/{change-password-dialog-BCYw5K7E.js → change-password-dialog-onUsTVN5.js} +1 -1
  101. codex/static_root/assets/change-password-dialog-onUsTVN5.js.br +0 -0
  102. codex/static_root/assets/change-password-dialog-onUsTVN5.js.gz +0 -0
  103. codex/static_root/assets/{confirm-dialog-c9JOSGSy.3c5788f95f47.js → confirm-dialog-VQ6k0w55.e38e1eba5340.js} +1 -1
  104. codex/static_root/assets/confirm-dialog-VQ6k0w55.e38e1eba5340.js.br +0 -0
  105. codex/static_root/assets/confirm-dialog-VQ6k0w55.e38e1eba5340.js.gz +0 -0
  106. codex/static_root/assets/{confirm-dialog-c9JOSGSy.js → confirm-dialog-VQ6k0w55.js} +1 -1
  107. codex/static_root/assets/confirm-dialog-VQ6k0w55.js.br +0 -0
  108. codex/static_root/assets/confirm-dialog-VQ6k0w55.js.gz +0 -0
  109. codex/static_root/assets/{datetime-column-D-6LPKdI.d46bbd8134df.js → datetime-column-BuZce4_W.0b4385717bd8.js} +1 -1
  110. codex/static_root/assets/datetime-column-BuZce4_W.0b4385717bd8.js.br +0 -0
  111. codex/static_root/assets/datetime-column-BuZce4_W.0b4385717bd8.js.gz +0 -0
  112. codex/static_root/assets/{datetime-column-D-6LPKdI.js → datetime-column-BuZce4_W.js} +1 -1
  113. codex/static_root/assets/datetime-column-BuZce4_W.js.br +0 -0
  114. codex/static_root/assets/datetime-column-BuZce4_W.js.gz +0 -0
  115. codex/static_root/assets/{filter-BOnVoHTU.93c3d0d0d3f6.js → filter-B_BZaRxz.3902c2895347.js} +1 -1
  116. codex/static_root/assets/filter-B_BZaRxz.3902c2895347.js.br +0 -0
  117. codex/static_root/assets/filter-B_BZaRxz.3902c2895347.js.gz +0 -0
  118. codex/static_root/assets/{filter-BOnVoHTU.js → filter-B_BZaRxz.js} +1 -1
  119. codex/static_root/assets/filter-B_BZaRxz.js.br +0 -0
  120. codex/static_root/assets/filter-B_BZaRxz.js.gz +0 -0
  121. codex/static_root/assets/{flag-tab-IniE-dLy.a02733e359aa.js → flag-tab-si72uDp0.4ffc9a6e889e.js} +1 -1
  122. codex/static_root/assets/flag-tab-si72uDp0.4ffc9a6e889e.js.br +0 -0
  123. codex/static_root/assets/flag-tab-si72uDp0.4ffc9a6e889e.js.gz +0 -0
  124. codex/static_root/assets/{flag-tab-IniE-dLy.js → flag-tab-si72uDp0.js} +1 -1
  125. codex/static_root/assets/flag-tab-si72uDp0.js.br +0 -0
  126. codex/static_root/assets/flag-tab-si72uDp0.js.gz +0 -0
  127. codex/static_root/assets/{group-tab-RPa8XC0J.3d483919ea92.js → group-tab-TVrz49Va.acd3436fa76a.js} +1 -1
  128. codex/static_root/assets/group-tab-TVrz49Va.acd3436fa76a.js.br +0 -0
  129. codex/static_root/assets/group-tab-TVrz49Va.acd3436fa76a.js.gz +0 -0
  130. codex/static_root/assets/{group-tab-RPa8XC0J.js → group-tab-TVrz49Va.js} +1 -1
  131. codex/static_root/assets/group-tab-TVrz49Va.js.br +0 -0
  132. codex/static_root/assets/group-tab-TVrz49Va.js.gz +0 -0
  133. codex/static_root/assets/{http-error-DBQycf8i.561cde2b4598.js → http-error-BqsBR3xn.3a9279e63f76.js} +1 -1
  134. codex/static_root/assets/http-error-BqsBR3xn.3a9279e63f76.js.br +0 -0
  135. codex/static_root/assets/http-error-BqsBR3xn.3a9279e63f76.js.gz +0 -0
  136. codex/static_root/assets/{http-error-DBQycf8i.js → http-error-BqsBR3xn.js} +1 -1
  137. codex/static_root/assets/http-error-BqsBR3xn.js.br +0 -0
  138. codex/static_root/assets/http-error-BqsBR3xn.js.gz +0 -0
  139. codex/static_root/assets/{library-tab-C5trLvkq.js → library-tab-DQSd78XW.751f06da5197.js} +1 -1
  140. codex/static_root/assets/library-tab-DQSd78XW.751f06da5197.js.br +0 -0
  141. codex/static_root/assets/library-tab-DQSd78XW.751f06da5197.js.gz +0 -0
  142. codex/static_root/assets/{library-tab-C5trLvkq.35c7a1b79c71.js → library-tab-DQSd78XW.js} +1 -1
  143. codex/static_root/assets/library-tab-DQSd78XW.js.br +0 -0
  144. codex/static_root/assets/library-tab-DQSd78XW.js.gz +0 -0
  145. codex/static_root/assets/{main-x0Pcl23A.js → main-D888wgNq.df3cf8bd55f4.js} +4 -4
  146. codex/static_root/assets/main-D888wgNq.df3cf8bd55f4.js.br +0 -0
  147. codex/static_root/assets/main-D888wgNq.df3cf8bd55f4.js.gz +0 -0
  148. codex/static_root/assets/{main-x0Pcl23A.364bfe447c9c.js → main-D888wgNq.js} +4 -4
  149. codex/static_root/assets/main-D888wgNq.js.br +0 -0
  150. codex/static_root/assets/main-D888wgNq.js.gz +0 -0
  151. codex/static_root/assets/{pagination-toolbar-DEgDOzzp.71aa03f525e4.js → pagination-toolbar-BJg0iCY_.33d0bc0ed57b.js} +1 -1
  152. codex/static_root/assets/pagination-toolbar-BJg0iCY_.33d0bc0ed57b.js.br +0 -0
  153. codex/static_root/assets/pagination-toolbar-BJg0iCY_.33d0bc0ed57b.js.gz +0 -0
  154. codex/static_root/assets/{pagination-toolbar-DEgDOzzp.js → pagination-toolbar-BJg0iCY_.js} +1 -1
  155. codex/static_root/assets/pagination-toolbar-BJg0iCY_.js.br +0 -0
  156. codex/static_root/assets/pagination-toolbar-BJg0iCY_.js.gz +0 -0
  157. codex/static_root/assets/{pdf-doc-CkV-xfvG.35c1a6a19a41.js → pdf-doc-VIuFHQ5Z.d0be1b21de96.js} +1 -1
  158. codex/static_root/assets/pdf-doc-VIuFHQ5Z.d0be1b21de96.js.br +0 -0
  159. codex/static_root/assets/pdf-doc-VIuFHQ5Z.d0be1b21de96.js.gz +0 -0
  160. codex/static_root/assets/{pdf-doc-CkV-xfvG.js → pdf-doc-VIuFHQ5Z.js} +1 -1
  161. codex/static_root/assets/pdf-doc-VIuFHQ5Z.js.br +0 -0
  162. codex/static_root/assets/pdf-doc-VIuFHQ5Z.js.gz +0 -0
  163. codex/static_root/assets/{reader-ClcgSG93.6afe950e70ac.js → reader-Cq2tfA7k.69c9d5cea641.js} +2 -2
  164. codex/static_root/assets/reader-Cq2tfA7k.69c9d5cea641.js.br +0 -0
  165. codex/static_root/assets/reader-Cq2tfA7k.69c9d5cea641.js.gz +0 -0
  166. codex/static_root/assets/{reader-ClcgSG93.js → reader-Cq2tfA7k.js} +2 -2
  167. codex/static_root/assets/reader-Cq2tfA7k.js.br +0 -0
  168. codex/static_root/assets/reader-Cq2tfA7k.js.gz +0 -0
  169. codex/static_root/assets/{relation-chips-2vga5ApB.js → relation-chips-Diykkd29.3e5aa695fb99.js} +1 -1
  170. codex/static_root/assets/relation-chips-Diykkd29.3e5aa695fb99.js.br +0 -0
  171. codex/static_root/assets/relation-chips-Diykkd29.3e5aa695fb99.js.gz +0 -0
  172. codex/static_root/assets/{relation-chips-2vga5ApB.d94c344f909b.js → relation-chips-Diykkd29.js} +1 -1
  173. codex/static_root/assets/relation-chips-Diykkd29.js.br +0 -0
  174. codex/static_root/assets/relation-chips-Diykkd29.js.gz +0 -0
  175. codex/static_root/assets/{settings-drawer-BOTI_tHr.03748f801e08.js → settings-drawer-B8NlM16d.1c5e5cd47147.js} +2 -2
  176. codex/static_root/assets/settings-drawer-B8NlM16d.1c5e5cd47147.js.br +0 -0
  177. codex/static_root/assets/settings-drawer-B8NlM16d.1c5e5cd47147.js.gz +0 -0
  178. codex/static_root/assets/{settings-drawer-BOTI_tHr.js → settings-drawer-B8NlM16d.js} +2 -2
  179. codex/static_root/assets/settings-drawer-B8NlM16d.js.br +0 -0
  180. codex/static_root/assets/settings-drawer-B8NlM16d.js.gz +0 -0
  181. codex/static_root/assets/{stats-tab-CBz_jhmH.9bdc41225f06.js → stats-tab-Ba1O22T5.1893c322b837.js} +1 -1
  182. codex/static_root/assets/stats-tab-Ba1O22T5.1893c322b837.js.br +0 -0
  183. codex/static_root/assets/stats-tab-Ba1O22T5.1893c322b837.js.gz +0 -0
  184. codex/static_root/assets/{stats-tab-CBz_jhmH.js → stats-tab-Ba1O22T5.js} +1 -1
  185. codex/static_root/assets/stats-tab-Ba1O22T5.js.br +0 -0
  186. codex/static_root/assets/stats-tab-Ba1O22T5.js.gz +0 -0
  187. codex/static_root/assets/{task-tab-B8sYV6Ia.90a8deec0214.js → task-tab-DpFvYIvj.9e11082f11e0.js} +1 -1
  188. codex/static_root/assets/task-tab-DpFvYIvj.9e11082f11e0.js.br +0 -0
  189. codex/static_root/assets/task-tab-DpFvYIvj.9e11082f11e0.js.gz +0 -0
  190. codex/static_root/assets/{task-tab-B8sYV6Ia.js → task-tab-DpFvYIvj.js} +1 -1
  191. codex/static_root/assets/task-tab-DpFvYIvj.js.br +0 -0
  192. codex/static_root/assets/task-tab-DpFvYIvj.js.gz +0 -0
  193. codex/static_root/assets/to-case-nry7wr4q.471d1d673876.js +1 -0
  194. codex/static_root/assets/to-case-nry7wr4q.js +1 -0
  195. codex/static_root/assets/{unauthorized-D5-FvA2_.61b1cd239b47.js → unauthorized-BEhuFi1m.b559e08ad1bb.js} +1 -1
  196. codex/static_root/assets/unauthorized-BEhuFi1m.b559e08ad1bb.js.br +0 -0
  197. codex/static_root/assets/unauthorized-BEhuFi1m.b559e08ad1bb.js.gz +0 -0
  198. codex/static_root/assets/{unauthorized-D5-FvA2_.js → unauthorized-BEhuFi1m.js} +1 -1
  199. codex/static_root/assets/unauthorized-BEhuFi1m.js.br +0 -0
  200. codex/static_root/assets/unauthorized-BEhuFi1m.js.gz +0 -0
  201. codex/static_root/assets/{user-tab-pzFjrggM.97c02ebee729.js → user-tab-BRKamNbm.33d87a0a3715.js} +1 -1
  202. codex/static_root/assets/user-tab-BRKamNbm.33d87a0a3715.js.br +0 -0
  203. codex/static_root/assets/user-tab-BRKamNbm.33d87a0a3715.js.gz +0 -0
  204. codex/static_root/assets/{user-tab-pzFjrggM.js → user-tab-BRKamNbm.js} +1 -1
  205. codex/static_root/assets/user-tab-BRKamNbm.js.br +0 -0
  206. codex/static_root/assets/user-tab-BRKamNbm.js.gz +0 -0
  207. codex/static_root/{manifest.a18726680d5f.json → manifest.40a7890feb17.json} +220 -220
  208. codex/static_root/manifest.40a7890feb17.json.br +0 -0
  209. codex/static_root/manifest.40a7890feb17.json.gz +0 -0
  210. codex/static_root/manifest.json +220 -220
  211. codex/static_root/manifest.json.br +0 -0
  212. codex/static_root/manifest.json.gz +0 -0
  213. codex/static_root/staticfiles.json +1 -1
  214. codex/views/browser/annotations.py +1 -1
  215. codex/views/browser/cover.py +4 -4
  216. codex/views/browser/filters/group.py +4 -3
  217. {codex-1.6.0a12.dist-info → codex-1.6.0rc1.dist-info}/METADATA +2 -1
  218. {codex-1.6.0a12.dist-info → codex-1.6.0rc1.dist-info}/RECORD +221 -221
  219. codex/static_root/assets/VCheckbox-B3vCf1Vu.e1991f98ab6c.js.br +0 -0
  220. codex/static_root/assets/VCheckbox-B3vCf1Vu.e1991f98ab6c.js.gz +0 -0
  221. codex/static_root/assets/VCheckbox-B3vCf1Vu.js.br +0 -0
  222. codex/static_root/assets/VCheckbox-B3vCf1Vu.js.gz +0 -0
  223. codex/static_root/assets/VCheckboxBtn-Cj6bUYmw.196cc43ca1c8.js.br +0 -0
  224. codex/static_root/assets/VCheckboxBtn-Cj6bUYmw.196cc43ca1c8.js.gz +0 -0
  225. codex/static_root/assets/VCheckboxBtn-Cj6bUYmw.js.br +0 -0
  226. codex/static_root/assets/VCheckboxBtn-Cj6bUYmw.js.gz +0 -0
  227. codex/static_root/assets/VCombobox-wIqJY8no.3547ff73e91e.js.br +0 -0
  228. codex/static_root/assets/VCombobox-wIqJY8no.3547ff73e91e.js.gz +0 -0
  229. codex/static_root/assets/VCombobox-wIqJY8no.js.br +0 -0
  230. codex/static_root/assets/VCombobox-wIqJY8no.js.gz +0 -0
  231. codex/static_root/assets/VDialog-D6HUFV6a.ac71da510b3f.js.br +0 -0
  232. codex/static_root/assets/VDialog-D6HUFV6a.ac71da510b3f.js.gz +0 -0
  233. codex/static_root/assets/VDialog-D6HUFV6a.js.br +0 -0
  234. codex/static_root/assets/VDialog-D6HUFV6a.js.gz +0 -0
  235. codex/static_root/assets/VExpansionPanels-BUJaYmzY.44e8a00a2ebe.js.br +0 -0
  236. codex/static_root/assets/VExpansionPanels-BUJaYmzY.44e8a00a2ebe.js.gz +0 -0
  237. codex/static_root/assets/VExpansionPanels-BUJaYmzY.js.br +0 -0
  238. codex/static_root/assets/VExpansionPanels-BUJaYmzY.js.gz +0 -0
  239. codex/static_root/assets/VRadioGroup-CayclHra.0a5b1c9a7b71.js.br +0 -0
  240. codex/static_root/assets/VRadioGroup-CayclHra.0a5b1c9a7b71.js.gz +0 -0
  241. codex/static_root/assets/VRadioGroup-CayclHra.js.br +0 -0
  242. codex/static_root/assets/VRadioGroup-CayclHra.js.gz +0 -0
  243. codex/static_root/assets/VSelect-ou2Q9UaN.8ddd219784e1.js.br +0 -0
  244. codex/static_root/assets/VSelect-ou2Q9UaN.8ddd219784e1.js.gz +0 -0
  245. codex/static_root/assets/VSelect-ou2Q9UaN.js.br +0 -0
  246. codex/static_root/assets/VSelect-ou2Q9UaN.js.gz +0 -0
  247. codex/static_root/assets/VSelectionControl-BOKIwNZb.16e0cdde978c.js.br +0 -0
  248. codex/static_root/assets/VSelectionControl-BOKIwNZb.16e0cdde978c.js.gz +0 -0
  249. codex/static_root/assets/VSelectionControl-BOKIwNZb.js.br +0 -0
  250. codex/static_root/assets/VSelectionControl-BOKIwNZb.js.gz +0 -0
  251. codex/static_root/assets/VSlideGroup-C3XgVg2T.d2b0ee4f596c.js.br +0 -0
  252. codex/static_root/assets/VSlideGroup-C3XgVg2T.d2b0ee4f596c.js.gz +0 -0
  253. codex/static_root/assets/VSlideGroup-C3XgVg2T.js.br +0 -0
  254. codex/static_root/assets/VSlideGroup-C3XgVg2T.js.gz +0 -0
  255. codex/static_root/assets/VTable-CrIiBr9q.b4669247af45.js.br +0 -0
  256. codex/static_root/assets/VTable-CrIiBr9q.b4669247af45.js.gz +0 -0
  257. codex/static_root/assets/VTable-CrIiBr9q.js.br +0 -0
  258. codex/static_root/assets/VTable-CrIiBr9q.js.gz +0 -0
  259. codex/static_root/assets/VTextField-HAAxrpNi.6f6dcb50079a.js.br +0 -0
  260. codex/static_root/assets/VTextField-HAAxrpNi.6f6dcb50079a.js.gz +0 -0
  261. codex/static_root/assets/VTextField-HAAxrpNi.js.br +0 -0
  262. codex/static_root/assets/VTextField-HAAxrpNi.js.gz +0 -0
  263. codex/static_root/assets/VWindowItem-aal6-Uv4.d178e2af20a7.js.br +0 -0
  264. codex/static_root/assets/VWindowItem-aal6-Uv4.d178e2af20a7.js.gz +0 -0
  265. codex/static_root/assets/VWindowItem-aal6-Uv4.js.br +0 -0
  266. codex/static_root/assets/VWindowItem-aal6-Uv4.js.gz +0 -0
  267. codex/static_root/assets/admin-D5JDmLDy.e4df3dd3a3fe.js.br +0 -0
  268. codex/static_root/assets/admin-D5JDmLDy.e4df3dd3a3fe.js.gz +0 -0
  269. codex/static_root/assets/admin-D5JDmLDy.js.br +0 -0
  270. codex/static_root/assets/admin-D5JDmLDy.js.gz +0 -0
  271. codex/static_root/assets/admin-drawer-panel-BF-h3Wm0.1f372db8d08f.js.br +0 -0
  272. codex/static_root/assets/admin-drawer-panel-BF-h3Wm0.js.br +0 -0
  273. codex/static_root/assets/browser-B1-dPld9.0b3fa4fdbe22.css +0 -1
  274. codex/static_root/assets/browser-B1-dPld9.0b3fa4fdbe22.css.br +0 -0
  275. codex/static_root/assets/browser-B1-dPld9.0b3fa4fdbe22.css.gz +0 -0
  276. codex/static_root/assets/browser-B1-dPld9.css +0 -1
  277. codex/static_root/assets/browser-B1-dPld9.css.br +0 -0
  278. codex/static_root/assets/browser-B1-dPld9.css.gz +0 -0
  279. codex/static_root/assets/browser-VhFkImB_.9c3b2c746614.js +0 -1
  280. codex/static_root/assets/browser-VhFkImB_.9c3b2c746614.js.br +0 -0
  281. codex/static_root/assets/browser-VhFkImB_.9c3b2c746614.js.gz +0 -0
  282. codex/static_root/assets/browser-VhFkImB_.js +0 -1
  283. codex/static_root/assets/browser-VhFkImB_.js.br +0 -0
  284. codex/static_root/assets/browser-VhFkImB_.js.gz +0 -0
  285. codex/static_root/assets/change-password-dialog-BCYw5K7E.a8bae0450f20.js.br +0 -0
  286. codex/static_root/assets/change-password-dialog-BCYw5K7E.a8bae0450f20.js.gz +0 -0
  287. codex/static_root/assets/change-password-dialog-BCYw5K7E.js.br +0 -0
  288. codex/static_root/assets/change-password-dialog-BCYw5K7E.js.gz +0 -0
  289. codex/static_root/assets/confirm-dialog-c9JOSGSy.3c5788f95f47.js.br +0 -3
  290. codex/static_root/assets/confirm-dialog-c9JOSGSy.3c5788f95f47.js.gz +0 -0
  291. codex/static_root/assets/confirm-dialog-c9JOSGSy.js.br +0 -3
  292. codex/static_root/assets/confirm-dialog-c9JOSGSy.js.gz +0 -0
  293. codex/static_root/assets/datetime-column-D-6LPKdI.d46bbd8134df.js.br +0 -0
  294. codex/static_root/assets/datetime-column-D-6LPKdI.d46bbd8134df.js.gz +0 -0
  295. codex/static_root/assets/datetime-column-D-6LPKdI.js.br +0 -0
  296. codex/static_root/assets/datetime-column-D-6LPKdI.js.gz +0 -0
  297. codex/static_root/assets/filter-BOnVoHTU.93c3d0d0d3f6.js.br +0 -0
  298. codex/static_root/assets/filter-BOnVoHTU.93c3d0d0d3f6.js.gz +0 -0
  299. codex/static_root/assets/filter-BOnVoHTU.js.br +0 -0
  300. codex/static_root/assets/filter-BOnVoHTU.js.gz +0 -0
  301. codex/static_root/assets/flag-tab-IniE-dLy.a02733e359aa.js.br +0 -0
  302. codex/static_root/assets/flag-tab-IniE-dLy.a02733e359aa.js.gz +0 -0
  303. codex/static_root/assets/flag-tab-IniE-dLy.js.br +0 -0
  304. codex/static_root/assets/flag-tab-IniE-dLy.js.gz +0 -0
  305. codex/static_root/assets/group-tab-RPa8XC0J.3d483919ea92.js.br +0 -0
  306. codex/static_root/assets/group-tab-RPa8XC0J.3d483919ea92.js.gz +0 -0
  307. codex/static_root/assets/group-tab-RPa8XC0J.js.br +0 -0
  308. codex/static_root/assets/group-tab-RPa8XC0J.js.gz +0 -0
  309. codex/static_root/assets/http-error-DBQycf8i.561cde2b4598.js.br +0 -0
  310. codex/static_root/assets/http-error-DBQycf8i.561cde2b4598.js.gz +0 -0
  311. codex/static_root/assets/http-error-DBQycf8i.js.br +0 -0
  312. codex/static_root/assets/http-error-DBQycf8i.js.gz +0 -0
  313. codex/static_root/assets/library-tab-C5trLvkq.35c7a1b79c71.js.br +0 -0
  314. codex/static_root/assets/library-tab-C5trLvkq.35c7a1b79c71.js.gz +0 -0
  315. codex/static_root/assets/library-tab-C5trLvkq.js.br +0 -0
  316. codex/static_root/assets/library-tab-C5trLvkq.js.gz +0 -0
  317. codex/static_root/assets/main-x0Pcl23A.364bfe447c9c.js.br +0 -0
  318. codex/static_root/assets/main-x0Pcl23A.364bfe447c9c.js.gz +0 -0
  319. codex/static_root/assets/main-x0Pcl23A.js.br +0 -0
  320. codex/static_root/assets/main-x0Pcl23A.js.gz +0 -0
  321. codex/static_root/assets/pagination-toolbar-DEgDOzzp.71aa03f525e4.js.br +0 -0
  322. codex/static_root/assets/pagination-toolbar-DEgDOzzp.71aa03f525e4.js.gz +0 -0
  323. codex/static_root/assets/pagination-toolbar-DEgDOzzp.js.br +0 -0
  324. codex/static_root/assets/pagination-toolbar-DEgDOzzp.js.gz +0 -0
  325. codex/static_root/assets/pdf-doc-CkV-xfvG.35c1a6a19a41.js.br +0 -0
  326. codex/static_root/assets/pdf-doc-CkV-xfvG.35c1a6a19a41.js.gz +0 -0
  327. codex/static_root/assets/pdf-doc-CkV-xfvG.js.br +0 -0
  328. codex/static_root/assets/pdf-doc-CkV-xfvG.js.gz +0 -0
  329. codex/static_root/assets/reader-ClcgSG93.6afe950e70ac.js.br +0 -0
  330. codex/static_root/assets/reader-ClcgSG93.6afe950e70ac.js.gz +0 -0
  331. codex/static_root/assets/reader-ClcgSG93.js.br +0 -0
  332. codex/static_root/assets/reader-ClcgSG93.js.gz +0 -0
  333. codex/static_root/assets/relation-chips-2vga5ApB.d94c344f909b.js.br +0 -0
  334. codex/static_root/assets/relation-chips-2vga5ApB.d94c344f909b.js.gz +0 -0
  335. codex/static_root/assets/relation-chips-2vga5ApB.js.br +0 -0
  336. codex/static_root/assets/relation-chips-2vga5ApB.js.gz +0 -0
  337. codex/static_root/assets/settings-drawer-BOTI_tHr.03748f801e08.js.br +0 -0
  338. codex/static_root/assets/settings-drawer-BOTI_tHr.03748f801e08.js.gz +0 -0
  339. codex/static_root/assets/settings-drawer-BOTI_tHr.js.br +0 -0
  340. codex/static_root/assets/settings-drawer-BOTI_tHr.js.gz +0 -0
  341. codex/static_root/assets/stats-tab-CBz_jhmH.9bdc41225f06.js.br +0 -0
  342. codex/static_root/assets/stats-tab-CBz_jhmH.9bdc41225f06.js.gz +0 -0
  343. codex/static_root/assets/stats-tab-CBz_jhmH.js.br +0 -0
  344. codex/static_root/assets/stats-tab-CBz_jhmH.js.gz +0 -0
  345. codex/static_root/assets/task-tab-B8sYV6Ia.90a8deec0214.js.br +0 -0
  346. codex/static_root/assets/task-tab-B8sYV6Ia.90a8deec0214.js.gz +0 -0
  347. codex/static_root/assets/task-tab-B8sYV6Ia.js.br +0 -0
  348. codex/static_root/assets/task-tab-B8sYV6Ia.js.gz +0 -0
  349. codex/static_root/assets/to-case-CnnzURtN.f0e4b42ddb89.js +0 -1
  350. codex/static_root/assets/to-case-CnnzURtN.js +0 -1
  351. codex/static_root/assets/unauthorized-D5-FvA2_.61b1cd239b47.js.br +0 -0
  352. codex/static_root/assets/unauthorized-D5-FvA2_.61b1cd239b47.js.gz +0 -0
  353. codex/static_root/assets/unauthorized-D5-FvA2_.js.br +0 -0
  354. codex/static_root/assets/unauthorized-D5-FvA2_.js.gz +0 -0
  355. codex/static_root/assets/user-tab-pzFjrggM.97c02ebee729.js.br +0 -0
  356. codex/static_root/assets/user-tab-pzFjrggM.97c02ebee729.js.gz +0 -0
  357. codex/static_root/assets/user-tab-pzFjrggM.js.br +0 -0
  358. codex/static_root/assets/user-tab-pzFjrggM.js.gz +0 -0
  359. codex/static_root/manifest.a18726680d5f.json.br +0 -0
  360. codex/static_root/manifest.a18726680d5f.json.gz +0 -0
  361. {codex-1.6.0a12.dist-info → codex-1.6.0rc1.dist-info}/LICENSE +0 -0
  362. {codex-1.6.0a12.dist-info → codex-1.6.0rc1.dist-info}/WHEEL +0 -0
  363. {codex-1.6.0a12.dist-info → codex-1.6.0rc1.dist-info}/entry_points.txt +0 -0
@@ -1,2 +1,2 @@
1
- const __vite__fileDeps=["assets/pdf-doc-CkV-xfvG.js","assets/admin-drawer-panel-BF-h3Wm0.js","assets/admin-drawer-panel-mne3FIj6.css","assets/main-x0Pcl23A.js","assets/main-Ztp855PW.css","assets/pdf-doc-CMzaSV_K.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{an as f,V as P,W as _,_ as k,Y as u,Z as i,X as h,$ as d,S as n,aP as C,aj as b,aH as w,ak as R,aJ as S,aF as v,aW as J,U as B,bB as ke,bC as be,as as F,bD as Q,bE as ee,aI as te,bF as oe,bG as _e,b6 as fe,aT as T,by as Pe,aG as O,br as ae,bH as ve,aO as s,b4 as we,al as Se,bI as ye,bJ as Ce,D as M,bK as Re,bL as Be,bM as Te,bN as De,bO as Ie,aQ as Le,aR as $e,aM as Ve,m as D,bP as Oe,ar as se,aU as W,bQ as Ne,aV as z,bR as Ae,bS as Ue,bj as Ee,am as xe,bT as Fe,aY as ze,bU as Me,bV as re,bm as We,bp as He,bW as qe,bX as Ge}from"./admin-drawer-panel-BF-h3Wm0.js";import{b as l,c as Ke,_ as je,S as U,d as ne,e as Ye,h as Xe}from"./main-x0Pcl23A.js";import{d as Ze,b as Je,S as Qe,V as et,a as tt}from"./settings-drawer-BOTI_tHr.js";import{P as ot,a as ie,U as at,V as st}from"./unauthorized-D5-FvA2_.js";import{b as le,V as ce}from"./VWindowItem-aal6-Uv4.js";import{a as rt}from"./VSelect-ou2Q9UaN.js";import{V as nt,a as it,b as lt,c as ct}from"./VExpansionPanels-BUJaYmzY.js";import{V as I,a as E}from"./VRadioGroup-CayclHra.js";import{V as L}from"./VCheckbox-B3vCf1Vu.js";import{T as dt,M as ut,V as x,a as ht,P as de,b as gt,c as pt}from"./pagination-toolbar-DEgDOzzp.js";import"./copy-to-clipboard-DoUvDJVx.js";import"./VDialog-D6HUFV6a.js";import"./change-password-dialog-BCYw5K7E.js";import"./VTextField-HAAxrpNi.js";import"./VSelectionControl-BOKIwNZb.js";import"./VCheckboxBtn-Cj6bUYmw.js";import"./VSlideGroup-C3XgVg2T.js";import"./to-case-CnnzURtN.js";const mt={name:"BookChangeDrawer",props:{direction:{type:String,required:!0}},head(){if(this.isDrawerOpen)return this.prefetchLinks(this.params,this.computedDirection,!0)},computed:{...f(l,["isBTT"]),...P(l,{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:{..._(l,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute","bookChangeLocation","bookChangeCursorClass","bookChangeShow","bookChangeIcon"])}};function kt(e,t,a,p,c,o){const r=u("router-link");return o.show?(i(),h(Ze,{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:d(()=>[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:d(()=>[n(C,{class:"bookChangeIcon"},{default:d(()=>[b(w(e.icon),1)]),_:1})]),_:1},8,["class","to","aria-label","title"])]),_:1},8,["location","model-value","class"])):S("",!0)}const bt=k(mt,[["render",kt],["__scopeId","data-v-03e41a14"]]),_t={name:"BookChangeActivator",components:{BookChangeDrawer:bt},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:{..._(l,["setBookChangeFlag","normalizeDirection","bookChangeLocation","bookChangeCursorClass","bookChangeShow"])}};function ft(e,t,a,p,c,o){const r=u("BookChangeDrawer");return i(),v(B,null,[o.show?(i(),v("div",{key:0,class:R(["bookChangeColumn",{[o.positionClass]:!0,[o.cursorClass]:!0}]),onClick:t[0]||(t[0]=J(g=>e.setBookChangeFlag(a.direction),["stop"]))},null,2)):S("",!0),n(r,{direction:a.direction},null,8,["direction"])],64)}const Pt=k(_t,[["render",ft],["__scopeId","data-v-db3eb561"]]),vt={name:"LoadingPage",components:{Placeholder:ot},props:{twoPages:{type:Boolean,required:!0}}};function wt(e,t,a,p,c,o){const r=u("Placeholder");return i(),v("div",{class:R(["pageLoading",{twoPages:a.twoPages}])},[n(r,{class:"pagePlaceholder"})],2)}const St=k(vt,[["render",wt],["__scopeId","data-v-04027168"]]),H="unauthorized",yt={name:"ErrorPage",props:{twoPages:{type:Boolean,required:!0},type:{type:String,required:!0}},computed:{text(){return this.type===H?"Protected page":"Failed to load page"},icon(){return this.type===H?ke:be}}};function Ct(e,t,a,p,c,o){return i(),h(ie,{class:R(["pageError",{twoPages:a.twoPages}]),headline:o.text,icon:o.icon},null,8,["class","headline","icon"])}const Rt=k(yt,[["render",Ct],["__scopeId","data-v-417a4cab"]]),Bt={name:"ImgPage",props:{book:{type:Object,required:!0},src:{type:String,required:!0}},emits:["load","error"],computed:{...P(l,{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:{..._(l,["fitToClass"])}},Tt=["src"];function Dt(e,t,a,p,c,o){return i(),v("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,Tt)}const q=k(Bt,[["render",Dt],["__scopeId","data-v-559e2ecc"]]),G=Q(ee(()=>je(()=>import("./pdf-doc-CkV-xfvG.js"),__vite__mapDeps([0,1,2,3,4,5])))),It=333,Lt={name:"BookPage",components:{ErrorPage:Rt,LoadingPage:St,PDFDoc:G,ImgPage:q},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},data(){return{showProgress:!1,loaded:!1,error:!1}},computed:{...f(l,["isVertical"]),...P(l,{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 Ke(e)},component(){return this.book.fileType==="PDF"?G:q},settings(){return this.getSettings(this.book)}},mounted(){setTimeout(function(){this.loaded||(this.loading=!0)},It)},methods:{..._(l,["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}}},$t=["id","data-page"];function Vt(e,t,a,p,c,o){const r=u("ErrorPage"),g=u("LoadingPage");return i(),v("div",{id:`page${a.page}`,"data-page":a.page,class:"page",style:oe(o.style)},[c.error?(i(),h(r,{key:0,"two-pages":o.settings.twoPages,type:c.error},null,8,["two-pages","type"])):c.showProgress&&!c.loaded?(i(),h(g,{key:1,"two-pages":o.settings.twoPages},null,8,["two-pages"])):(i(),h(te(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,$t)}const ue=k(Lt,[["render",Vt],["__scopeId","data-v-87996fa1"]]),Ot=.5,Nt={name:"ScaleForScroll",emits:["click"],data(){return{mdiMagnifyMinusOutline:_e}},computed:{...P(l,{scale:e=>e.clientSettings.scale}),showReset(){return this.scale!=U},style(){return{cursor:this.scale==U?"zoom-in":"all-scroll"}}},methods:{..._(l,["setSettingsClient"]),clearSelection(){window.getSelection&&window.getSelection().removeAllRanges()},onDoubleClick(){this.clearSelection();const e=this.scale+Ot;this.setSettingsClient({scale:e})},scaleReset(){this.setSettingsClient({scale:U})}}};function At(e,t,a,p,c,o){const r=fe("drag-scroller");return T((i(),v("div",{class:"scaleForScroll",style:oe(o.style),onDblclick:t[0]||(t[0]=(...g)=>o.onDoubleClick&&o.onDoubleClick(...g))},[Pe(e.$slots,"default",{},void 0,!0),o.showReset?(i(),h(C,{key:0,class:"resetIcon",onClick:J(o.scaleReset,["stop"])},{default:d(()=>[b(w(c.mdiMagnifyMinusOutline),1)]),_:1},8,["onClick"])):S("",!0)],36)),[[r,,void 0,{onlyX:!0}]])}const he=k(Nt,[["render",At],["__scopeId","data-v-b24267c0"]]),Ut={name:"HorizontalPages",components:{BookPage:ue,ScaleForScroll:he},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},emits:["click"],computed:{...f(l,["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:{..._(l,["getSettings"])}};function Et(e,t,a,p,c,o){const r=u("BookPage"),g=u("ScaleForScroll");return i(),h(g,{class:"noWrap"},{default:d(()=>[o.showPageOne?(i(),h(r,{key:0,ref:"pageOne",book:a.book,page:o.pageOne,class:"horizontalPage"},null,8,["book","page"])):S("",!0),o.showPageTwo?(i(),h(r,{key:1,book:a.book,page:o.pageTwo,class:"horizontalPage"},null,8,["book","page"])):S("",!0)]),_:1})}const xt=k(Ut,[["render",Et],["__scopeId","data-v-9a560964"]]),Ft={name:"PageChangeLink",props:{direction:{type:String,required:!0}},head(){return this.prefetchLinks(this.params,this.computedDirection)},computed:{...f(l,["isVertical","isFirstPage","isLastPage"]),...P(l,{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:{..._(l,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute"])}};function zt(e,t,a,p,c,o){const r=u("router-link");return o.show?(i(),h(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 Mt=k(Ft,[["render",zt],["__scopeId","data-v-9ade7d96"]]),Wt=48,Ht=48,qt={name:"PagerHorizontal",components:{HorizontalPages:xt,PageChangeLink:Mt},props:{book:{type:Object,required:!0}},data(){return{activePage:0,pages:[]}},computed:{...f(l,["isReadInReverse"]),...P(l,{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:{..._(l,["getSettings","setBookChangeFlag","setActivePage"]),setPages(){const e=Math.max(this.activePage-Wt,0),t=Math.min(this.activePage+Ht,this.book.maxPage),a=ne.range(e,t+1);this.pages=a}}};function Gt(e,t,a,p,c,o){const r=u("PageChangeLink"),g=u("HorizontalPages");return i(),h(ce,{"show-arrows":"",continuous:"","model-value":o.windowIndex,reverse:e.isReadInReverse},{prev:d(()=>[n(r,{direction:"prev"})]),next:d(()=>[n(r,{direction:"next"})]),default:d(()=>[(i(!0),v(B,null,O(c.pages,m=>(i(),h(le,{key:`c/${a.book.pk}/${m}`,class:"windowItem",disabled:"",eager:m>=e.storePage-1&&m<=e.storePage+2,"model-value":m,transition:!0},{default:d(()=>[n(g,{book:a.book,page:m},null,8,["book","page"])]),_:2},1032,["eager","model-value"]))),128))]),_:1},8,["model-value","reverse"])}const K=k(qt,[["render",Gt],["__scopeId","data-v-e04bbc00"]]),Kt=12,j=250,jt={name:"PagerVertical",components:{BookPage:ue,ScaleForScroll:he},props:{book:{type:Object,required:!0}},data(){return{innerHeight:window.innerHeight,innerWidth:window.innerWidth,intersectorOn:!1,programmaticScroll:!1}},computed:{...P(l,{storePage:e=>e.page,showToolbars:e=>e.showToolbars}),...ae(l,["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=ne.range(0,e);return this.readInReverse&&t.reverse(),t},visibleItems(){var e;return Math.min(((e=this.book)==null?void 0:e.maxPage)??0,Kt)}},watch:{storePage(e){this.reactWithScroll&&this.scrollToPage(e)}},mounted(){window.addEventListener("resize",this.onResize),setTimeout(()=>{this.scrollToPage(this.storePage)},j)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{..._(l,["setActivePage","setBookChangeFlag","getSettings"]),onIntersect(e,t){if(e&&this.intersectorOn){const p=+t[0].target.dataset.page;this.setActivePage(p,!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},j)},onResize(){this.innerHeight=window.innerHeight,this.innerWidth=window.innerWidth}}},Yt=["data-page"];function Xt(e,t,a,p,c,o){const r=u("BookPage"),g=u("ScaleForScroll");return i(),h(g,null,{default:d(()=>[T((i(),h(rt,{id:"verticalScroll",key:o.readInReverse,ref:"verticalScroll",items:o.items,height:c.innerHeight,width:c.innerWidth},{default:d(({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,Yt),[[we,{handler:o.onIntersect,options:{threshold:[.75]}},void 0,{quiet:!0}]])]),_:1},8,["items","height","width"])),[[ve,o.onScroll,"#verticalScroll"]])]),_:1})}const Y=k(jt,[["render",Xt],["__scopeId","data-v-ef3b4ade"]]),X=Q(ee(()=>"@/components/reader/pager/pager-full-pdf.vue")),Zt={name:"PagerSelector",components:{PagerHorizontal:K,PagerPDF:X,PagerVertical:Y},props:{book:{type:Object,required:!0}},emits:["click"],head(){return this.prefetchBook(this.book)},computed:{...f(l,["isVertical","cacheBook"]),...P(l,{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?X:this.isVertical?Y:K}},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:{..._(l,["getSettings","setActivePage","prefetchBook"])}};function Jt(e,t,a,p,c,o){return i(),h(te(o.component),{book:a.book},null,8,["book"])}const Qt=k(Zt,[["render",Jt]]),eo={name:"BooksWindow",components:{BookChangeActivator:Pt,Pager:Qt},computed:{...f(l,["isBTT"]),...P(l,{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({params:e.params})}},beforeMount(){this.setBookChangeFlag(),this.loadBooks({})},methods:{..._(l,["setBookChangeFlag","loadBooks","toggleToolbars"]),click(){this.toggleToolbars(),this.setBookChangeFlag()},eager(e){return this.bookChange&&this.bookRoutes[this.bookChange]&&this.bookRoutes[this.bookChange].pk===e}}};function to(e,t,a,p,c,o){const r=u("BookChangeActivator"),g=u("Pager");return i(),h(ce,{id:"booksWindow",direction:"vertical","model-value":e.currentBookPk,reverse:e.isBTT,"show-arrows":"",onClick:e.toggleToolbars},{prev:d(()=>[n(r,{direction:"prev"})]),next:d(()=>[n(r,{direction:"next"})]),default:d(()=>[(i(!0),v(B,null,O(e.books,m=>(i(),h(le,{key:`c/${m.pk}`,class:"windowItem",disabled:"",eager:o.eager(m.pk),value:m.pk,transition:!0},{default:d(()=>[n(g,{book:m,onClick:o.click},null,8,["book","onClick"])]),_:2},1032,["eager","value"]))),128))]),_:1},8,["model-value","reverse","onClick"])}const oo=k(eo,[["render",to],["__scopeId","data-v-aeb79f89"]]),ao={name:"DownloadPanel",components:{DrawerItem:Se},data(){return{mdiDownload:ye,mdiFileImage:Ce}},computed:{...f(l,["activeTitle","routeParams"]),...P(l,{currentBook:e=>{var t;return(t=e.books)==null?void 0:t.current},storePage:e=>e.page}),downloadURL(){return Ye(this.currentBook)},filename(){var e;return(e=this.currentBook)==null?void 0:e.filename},pageSrc(){const{pk:e,mtime:t}=this.currentBook;return Xe({pk:e,page:this.storePage,mtime:t})},pageName(){return`${this.activeTitle} - page ${this.storePage}.jpg`},downloadPageTitle(){return`Download Page ${this.storePage}`}},methods:{..._(M,["downloadIOSPWAFix"]),downloadPage(){this.downloadIOSPWAFix(this.pageSrc,this.pageName)},downloadBook(){this.downloadIOSPWAFix(this.downloadURL,this.filename)}}},so={key:0,id:"downloadPanel"};function ro(e,t,a,p,c,o){const r=u("DrawerItem");return e.currentBook?(i(),v("div",so,[n(r,{"prepend-icon":c.mdiFileImage,title:o.downloadPageTitle,onClick:o.downloadPage},null,8,["prepend-icon","title","onClick"]),n(r,{"prepend-icon":c.mdiDownload,title:"Download Book",onClick:o.downloadBook},null,8,["prepend-icon","onClick"])])):S("",!0)}const no=k(ao,[["render",ro],["__scopeId","data-v-e4f5bb93"]]),io={name:"KeyboardShortcutsPanel",data(){return{mdiMenuLeft:Re,mdiMenuRight:Be,mdiKeyboardOutline:Te,mdiKeyboardSpace:De,mdiAppleKeyboardShift:Ie}},computed:{...f(M,["isMobile"])}},y=e=>(Le("data-v-a8b4ac47"),e=e(),$e(),e),lo=y(()=>s("h4",null,"Navigation",-1)),co={class:"highlight-table"},uo=y(()=>s("td",null,"Previous page",-1)),ho=y(()=>s("td",null,"Next page",-1)),go=y(()=>s("tr",null,[s("td",null,","),s("td",null,[b("Next "),s("em",null,"only"),b(" one page in two page mode.")])],-1)),po=y(()=>s("tr",null,[s("td",null,"."),s("td",null,[b("Previous "),s("em",null,"only"),b(" one page in two page mode.")])],-1)),mo=y(()=>s("tr",null,[s("td",null,"p"),s("td",null,"Previous Book")],-1)),ko=y(()=>s("tr",null,[s("td",null,"n"),s("td",null,"Next Book")],-1)),bo=y(()=>s("tr",null,[s("td",null,"esc"),s("td",null,"Close book")],-1)),_o=y(()=>s("h4",null,"Fit Page To",-1)),fo=y(()=>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=y(()=>s("h4",null,"Other",-1)),vo=y(()=>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 wo(e,t,a,p,c,o){return e.isMobile?S("",!0):(i(),h(ct,{key:0},{default:d(()=>[n(nt,{id:"readerKeyboardShortcuts"},{default:d(()=>[n(it,{id:"shortcutsTitle"},{default:d(()=>[n(C,{id:"keyboardIcon"},{default:d(()=>[b(w(c.mdiKeyboardOutline),1)]),_:1}),b("Keyboard Shortcuts ")]),_:1}),n(lt,null,{default:d(()=>[lo,s("table",co,[s("tbody",null,[s("tr",null,[s("td",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiMenuLeft),1)]),_:1}),b(", j, "),s("div",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiAppleKeyboardShift),1)]),_:1}),n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiKeyboardSpace),1)]),_:1})])]),uo]),s("tr",null,[s("td",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiMenuRight),1)]),_:1}),b(", k, "),n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiKeyboardSpace),1)]),_:1})]),ho]),go,po,mo,ko,bo])]),_o,fo,Po,vo]),_:1})]),_:1})]),_:1}))}const So=k(io,[["render",wo],["__scopeId","data-v-a8b4ac47"]]),ge=["fitTo","readingDirection","twoPages"];Object.freeze(ge);const yo={name:"ReaderSettingsPanel",data(){return{isGlobalScope:!1,mdiOpenInNew:Ve,openDelay:2e3}},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["isVertical","isPDF","cacheBook"]),...P(l,{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 p of ge){const c=(a=e.books)==null?void 0:a.current.settings[p];if(!e.choices.nullValues.has(c))return!1}return!0},bookInBrowserURL(e){var t,a;return(t=e.books)!=null&&t.current?Oe((a=e.books)==null?void 0:a.current):""},finishOnLastPage:e=>e.readerSettings.finishOnLastPage}),...ae(l,["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:{..._(l,["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)}}},Co={id:"readerScopedSettings",class:"readerDrawerItem"},Ro=["href"];function Bo(e,t,a,p,c,o){return i(),v(B,null,[n(E,{modelValue:c.isGlobalScope,"onUpdate:modelValue":t[0]||(t[0]=r=>c.isGlobalScope=r),class:"scopeRadioButton readerDrawerItem",density:"compact",label:"Scope","hide-details":"auto"},{default:d(()=>[n(I,{label:"Only this comic",value:!1}),n(I,{label:"Default for all comics",value:!0})]),_:1},8,["modelValue"]),n(Ne,null,{default:d(()=>[s("div",Co,[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:d(()=>[(i(!0),v(B,null,O(o.fitToChoices,r=>(i(),h(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),n(L,{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:d(()=>[(i(!0),v(B,null,O(o.readingDirectionChoices,r=>(i(),h(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),c.isGlobalScope?S("",!0):T((i(),h(se,{key:0,id:"clearSettingsButton",disabled:e.isClearSettingsButtonDisabled,onClick:e.clearSettingsLocal},{default:d(()=>[b(" Clear Settings ")]),_:1},8,["disabled","onClick"])),[[W,{openDelay:c.openDelay,text:"Use the default settings for all comics for this comic"}]])])]),_:1}),n(z),n(L,{class:"readerDrawerItem","model-value":e.finishOnLastPage,density:"compact",label:"Finish Book On Last Page","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[4]||(t[4]=r=>o.settingsDialogChanged({finishOnLastPage:r}))},null,8,["model-value"]),n(L,{"model-value":e.selectedSettings.readRtlInReverse,class:"readerDrawerItem",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"]),T(n(L,{"model-value":e.cacheBook,class:"readerDrawerItem cacheBook",density:"compact",disabled:o.disableCacheBook,label:"Cache Entire Book","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[6]||(t[6]=r=>e.setSettingsClient({cacheBook:r}))},null,8,["model-value","disabled"]),[[W,{openDelay:c.openDelay,text:"Cache all pages from this book in the browser"}]]),e.isPDF?(i(),v("a",{key:0,id:"readPDFInBrowser",class:"readerDrawerItem",href:e.bookInBrowserURL,target:"_blank"},[n(C,null,{default:d(()=>[b(w(c.mdiOpenInNew),1)]),_:1}),b("Read PDF in Browser ")],8,Ro)):S("",!0)],64)}const To=k(yo,[["render",Bo],["__scopeId","data-v-3e689883"]]),Do={name:"ReaderSettingsSuperPanel",components:{DownloadPanel:no,ReaderKeyboardShortcutsPanel:So,ReaderSettingsPanel:To}};function Io(e,t,a,p,c,o){const r=u("ReaderSettingsPanel"),g=u("ReaderKeyboardShortcutsPanel"),m=u("DownloadPanel");return i(),v(B,null,[n(r),n(z),n(g),n(z),n(m)],64)}const Lo=k(Do,[["render",Io]]),$o={name:"ReaderSettingsDrawer",components:{SettingsDrawer:Je,ReaderSettingsSuperPanel:Lo}};function Vo(e,t,a,p,c,o){const r=u("ReaderSettingsSuperPanel"),g=u("SettingsDrawer");return i(),h(g,{title:"Reader",temporary:"","disable-resize-watcher":""},{panel:d(()=>[n(r)]),_:1})}const Oo=k($o,[["render",Vo]]),Z={a:Ue,f:Ee,s:xe,v:Fe},No={a:"Story Arc",f:"Folder",s:"Series",v:"Volume"},Ao={name:"ReaderArcSelect",components:{ToolbarSelect:dt},computed:{...P(l,{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 p={value:a,title:a.name,group:a.group,subtitle:No[a.group],prependIcon:Z[a.group]};t.push(p)}return t}})},methods:{..._(l,["loadBooks"]),arcIcon(e){return Z[e]},checkIcon(e){return e===this.arc?Ae:""},onUpdate(e){const t={group:e.group,pks:e.pks};this.loadBooks({arc:t})}}},Uo={id:"arcPos"};function Eo(e,t,a,p,c,o){const r=u("ToolbarSelect");return i(),h(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:d(({item:g,props:m})=>[n(ze,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:d(({item:g,props:m})=>[n(C,F({size:"large"},m,{class:"arcSelectIcon"}),{default:d(()=>[b(w(o.arcIcon(g.raw.group)),1)]),_:2},1040),s("span",Uo,w(e.arc.index)+" / "+w(e.arc.count),1)]),_:1},8,["model-value","items","disabled","onUpdate:modelValue"])}const xo=k(Ao,[["render",Eo],["__scopeId","data-v-2b466f8a"]]),Fo={name:"ReaderTitleToolbar",components:{MetadataDialog:ut,ReaderArcSelect:xo,SettingsDrawerButton:Qe},data(){return{mdiClose:Me,routeChanged:!1}},head(){return{meta:[{hid:"description",name:"description",content:`reader ${this.activeTitle} page ${this.storePage}`}]}},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["activeTitle","closeBookRoute"]),...P(l,{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"]),..._(l,["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}}}},zo={id:"title"},Mo={key:0,id:"subtitle"};function Wo(e,t,a,p,c,o){const r=u("ReaderArcSelect"),g=u("MetadataDialog"),m=u("SettingsDrawerButton");return i(),h(He,null,{default:d(()=>[T(n(tt,{id:"readerToolbarTop",density:"compact","extension-height":o.extensionHeight},We({default:d(()=>[n(x,null,{default:d(()=>[n(se,{ref:"closeBook",class:"closeBook",to:e.closeBookRoute,size:"large",density:"compact",variant:"plain",onClick:o.onCloseBook},{default:d(()=>[b(" close book ")]),_:1},8,["to","onClick"])]),_:1}),n(ht),e.empty?S("",!0):(i(),h(x,{key:0},{default:d(()=>[n(r),n(g,{ref:"metadataDialog",group:"c",toolbar:!0,book:e.currentBook},null,8,["book"])]),_:1})),n(x,null,{default:d(()=>[n(m)]),_:1})]),_:2},[o.title?{name:"extension",fn:d(()=>[n(et,{class:"readerTitle"},{default:d(()=>[s("div",zo,w(o.title),1),e.subtitle?(i(),v("div",Mo,w(e.subtitle),1)):S("",!0)]),_:1})]),key:"0"}:void 0]),1032,["extension-height"]),[[re,e.showToolbars]])]),_:1})}const pe=k(Fo,[["render",Wo],["__scopeId","data-v-e9e8347c"]]),Ho={name:"ReaderEmpty",components:{ReaderTopToolbar:pe},data(){return{mdiBookRemoveOutline:qe}}};function qo(e,t,a,p,c,o){const r=u("ReaderTopToolbar");return i(),v(B,null,[n(r),n(ie,{class:"empty",headline:"Book Not Found",title:"Close the reader and find another book",icon:c.mdiBookRemoveOutline},null,8,["icon"])],64)}const Go=k(Ho,[["render",qo],["__scopeId","data-v-65d65e48"]]),Ko={name:"ReaderBookChangeNavButton",components:{PaginationNavButton:de},props:{direction:{type:String,required:!0}},computed:{...f(l,["isBTT"]),...P(l,{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:{..._(l,["bookChangeIcon"])}};function jo(e,t,a,p,c,o){const r=u("PaginationNavButton");return e.toRoute?(i(),h(r,{key:0,class:R(o.classes),icon:"",variant:"plain",title:o.title,to:e.toRoute},{default:d(()=>[n(C,null,{default:d(()=>[b(w(o.icon),1)]),_:1})]),_:1},8,["class","title","to"])):S("",!0)}const Yo=k(Ko,[["render",jo],["__scopeId","data-v-117f651c"]]),Xo={name:"ReaderNavButton",components:{PaginationNavButton:de},props:{value:{type:Number,required:!0},twoPages:{type:Boolean,default:!1}},computed:{...f(l,["isVertical"]),...P(l,{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:{..._(l,["setActivePage"]),onClick(){this.isVertical&&this.setActivePage(this.value,!0)}}};function Zo(e,t,a,p,c,o){const r=u("PaginationNavButton");return i(),h(r,{key:e.isVertical,disabled:o.disabled,class:R(["readerNavButton",o.classes]),title:o.title,to:e.toRoute,onClick:o.onClick},{default:d(()=>[b(w(a.value),1)]),_:1},8,["disabled","class","title","to","onClick"])}const Jo=k(Xo,[["render",Zo],["__scopeId","data-v-530fba8c"]]),$="prev",V="next",Qo={name:"ReaderNavToolbar",components:{PaginationSlider:gt,ReaderNavButton:Jo,PaginationToolbar:pt,ReaderBookChangeNavButton:Yo},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["activeSettings","isReadInReverse","isVertical"]),...P(l,{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:{..._(l,["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(V):e.shiftKey&&window.scrollY===0&&this.routeToDirection($);break;case"j":case"ArrowRight":this.routeToDirection(V);break;case"k":case"ArrowLeft":this.routeToDirection($);break;case",":this.routeToDirectionOne($);break;case".":this.routeToDirectionOne(V);break;case"n":this.routeToBook(V);break;case"p":this.routeToBook($);break}}}};function ea(e,t,a,p,c,o){const r=u("ReaderBookChangeNavButton"),g=u("ReaderNavButton"),m=u("PaginationSlider"),N=u("PaginationToolbar");return i(),h(Ge,null,{default:d(()=>[e.maxPage?T((i(),h(N,{key:0,id:"readerToolbarNav"},{default:d(()=>[n(r,{direction:o.bookPrev,narrow:!1},null,8,["direction"]),n(g,{value:o.min,"two-pages":o.twoPages},null,8,["value","two-pages"]),(i(),h(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]=A=>o.onSliderUpdate(A))},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)),[[re,e.showToolbars]]):S("",!0)]),_:1})}const ta=k(Qo,[["render",ea],["__scopeId","data-v-20fc0313"]]),oa={name:"MainReader",components:{BooksWindow:oo,ReaderEmpty:Go,ReaderNavToolbar:ta,ReaderTopToolbar:pe,ReaderSettingsDrawer:Oo,Unauthorized:at},data(){return{showToolbars:!1}},computed:{...f(D,["isAuthorized"]),...P(D,{user:e=>e.user}),...P(l,{empty:e=>e.empty,arc:e=>e.arc})},watch:{user(){this.loadReaderSettings()},isAuthorized(){this.loadReaderSettings()}},beforeMount(){this.reset(),this.loadReaderSettings()},methods:{..._(l,["loadReaderSettings","reset"])}},aa={key:0},sa={id:"readerContainer"};function ra(e,t,a,p,c,o){const r=u("ReaderTopToolbar"),g=u("BooksWindow"),m=u("ReaderNavToolbar"),N=u("ReaderEmpty"),A=u("ReaderSettingsDrawer"),me=u("Unauthorized");return e.isAuthorized?(i(),h(st,{key:0,id:"readerWrapper"},{default:d(()=>[e.empty?(i(),h(N,{key:1})):(i(),v("div",aa,[s("div",sa,[n(r),n(g),n(m)])])),n(A)]),_:1})):(i(),h(me,{key:1}))}const ya=k(oa,[["render",ra],["__scopeId","data-v-4f31abfa"]]);export{ya as default};
1
+ const __vite__fileDeps=["assets/pdf-doc-VIuFHQ5Z.js","assets/admin-drawer-panel-vQfT7tFo.js","assets/admin-drawer-panel-mne3FIj6.css","assets/main-D888wgNq.js","assets/main-Ztp855PW.css","assets/pdf-doc-CMzaSV_K.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{an as f,V as P,W as _,_ as k,Y as u,Z as i,X as h,$ as d,S as n,aP as C,aj as b,aH as w,ak as R,aJ as S,aF as v,aX as J,U as B,bB as ke,bC as be,as as F,bD as Q,bE as ee,aI as te,bF as oe,bG as _e,b6 as fe,aT as T,by as Pe,aG as O,br as ae,bH as ve,aO as s,b4 as we,al as Se,bI as ye,bJ as Ce,D as M,bK as Re,bL as Be,bM as Te,bN as De,bO as Ie,aQ as Le,aR as $e,aM as Ve,m as D,bP as Oe,ar as se,aU as W,bQ as Ne,aV as z,bR as Ae,bS as Ue,bj as Ee,am as xe,bT as Fe,aY as ze,bU as Me,bV as re,bm as We,bp as He,bW as qe,bX as Ge}from"./admin-drawer-panel-vQfT7tFo.js";import{b as l,c as Ke,_ as je,S as U,d as ne,e as Ye,h as Xe}from"./main-D888wgNq.js";import{d as Ze,b as Je,S as Qe,V as et,a as tt}from"./settings-drawer-B8NlM16d.js";import{P as ot,a as ie,U as at,V as st}from"./unauthorized-BEhuFi1m.js";import{b as le,V as ce}from"./VWindowItem--B3loLAX.js";import{a as rt}from"./VSelect-BNztcu1Z.js";import{V as nt,a as it,b as lt,c as ct}from"./VExpansionPanels-CH6E8s7q.js";import{V as I,a as E}from"./VRadioGroup-BC5CvPgU.js";import{V as L}from"./VCheckbox-BjSDxmSa.js";import{T as dt,M as ut,V as x,a as ht,P as de,b as gt,c as pt}from"./pagination-toolbar-BJg0iCY_.js";import"./copy-to-clipboard-DoUvDJVx.js";import"./VDialog-DqQgZayw.js";import"./change-password-dialog-onUsTVN5.js";import"./VTextField-CLXM8_Dv.js";import"./VSelectionControl-BlKP2Bmf.js";import"./VCheckboxBtn-DgL9kXWT.js";import"./VSlideGroup-psRbw8SA.js";import"./to-case-nry7wr4q.js";const mt={name:"BookChangeDrawer",props:{direction:{type:String,required:!0}},head(){if(this.isDrawerOpen)return this.prefetchLinks(this.params,this.computedDirection,!0)},computed:{...f(l,["isBTT"]),...P(l,{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:{..._(l,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute","bookChangeLocation","bookChangeCursorClass","bookChangeShow","bookChangeIcon"])}};function kt(e,t,a,p,c,o){const r=u("router-link");return o.show?(i(),h(Ze,{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:d(()=>[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:d(()=>[n(C,{class:"bookChangeIcon"},{default:d(()=>[b(w(e.icon),1)]),_:1})]),_:1},8,["class","to","aria-label","title"])]),_:1},8,["location","model-value","class"])):S("",!0)}const bt=k(mt,[["render",kt],["__scopeId","data-v-03e41a14"]]),_t={name:"BookChangeActivator",components:{BookChangeDrawer:bt},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:{..._(l,["setBookChangeFlag","normalizeDirection","bookChangeLocation","bookChangeCursorClass","bookChangeShow"])}};function ft(e,t,a,p,c,o){const r=u("BookChangeDrawer");return i(),v(B,null,[o.show?(i(),v("div",{key:0,class:R(["bookChangeColumn",{[o.positionClass]:!0,[o.cursorClass]:!0}]),onClick:t[0]||(t[0]=J(g=>e.setBookChangeFlag(a.direction),["stop"]))},null,2)):S("",!0),n(r,{direction:a.direction},null,8,["direction"])],64)}const Pt=k(_t,[["render",ft],["__scopeId","data-v-db3eb561"]]),vt={name:"LoadingPage",components:{Placeholder:ot},props:{twoPages:{type:Boolean,required:!0}}};function wt(e,t,a,p,c,o){const r=u("Placeholder");return i(),v("div",{class:R(["pageLoading",{twoPages:a.twoPages}])},[n(r,{class:"pagePlaceholder"})],2)}const St=k(vt,[["render",wt],["__scopeId","data-v-04027168"]]),H="unauthorized",yt={name:"ErrorPage",props:{twoPages:{type:Boolean,required:!0},type:{type:String,required:!0}},computed:{text(){return this.type===H?"Protected page":"Failed to load page"},icon(){return this.type===H?ke:be}}};function Ct(e,t,a,p,c,o){return i(),h(ie,{class:R(["pageError",{twoPages:a.twoPages}]),headline:o.text,icon:o.icon},null,8,["class","headline","icon"])}const Rt=k(yt,[["render",Ct],["__scopeId","data-v-417a4cab"]]),Bt={name:"ImgPage",props:{book:{type:Object,required:!0},src:{type:String,required:!0}},emits:["load","error"],computed:{...P(l,{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:{..._(l,["fitToClass"])}},Tt=["src"];function Dt(e,t,a,p,c,o){return i(),v("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,Tt)}const q=k(Bt,[["render",Dt],["__scopeId","data-v-559e2ecc"]]),G=Q(ee(()=>je(()=>import("./pdf-doc-VIuFHQ5Z.js"),__vite__mapDeps([0,1,2,3,4,5])))),It=333,Lt={name:"BookPage",components:{ErrorPage:Rt,LoadingPage:St,PDFDoc:G,ImgPage:q},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},data(){return{showProgress:!1,loaded:!1,error:!1}},computed:{...f(l,["isVertical"]),...P(l,{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 Ke(e)},component(){return this.book.fileType==="PDF"?G:q},settings(){return this.getSettings(this.book)}},mounted(){setTimeout(function(){this.loaded||(this.loading=!0)},It)},methods:{..._(l,["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}}},$t=["id","data-page"];function Vt(e,t,a,p,c,o){const r=u("ErrorPage"),g=u("LoadingPage");return i(),v("div",{id:`page${a.page}`,"data-page":a.page,class:"page",style:oe(o.style)},[c.error?(i(),h(r,{key:0,"two-pages":o.settings.twoPages,type:c.error},null,8,["two-pages","type"])):c.showProgress&&!c.loaded?(i(),h(g,{key:1,"two-pages":o.settings.twoPages},null,8,["two-pages"])):(i(),h(te(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,$t)}const ue=k(Lt,[["render",Vt],["__scopeId","data-v-87996fa1"]]),Ot=.5,Nt={name:"ScaleForScroll",emits:["click"],data(){return{mdiMagnifyMinusOutline:_e}},computed:{...P(l,{scale:e=>e.clientSettings.scale}),showReset(){return this.scale!=U},style(){return{cursor:this.scale==U?"zoom-in":"all-scroll"}}},methods:{..._(l,["setSettingsClient"]),clearSelection(){window.getSelection&&window.getSelection().removeAllRanges()},onDoubleClick(){this.clearSelection();const e=this.scale+Ot;this.setSettingsClient({scale:e})},scaleReset(){this.setSettingsClient({scale:U})}}};function At(e,t,a,p,c,o){const r=fe("drag-scroller");return T((i(),v("div",{class:"scaleForScroll",style:oe(o.style),onDblclick:t[0]||(t[0]=(...g)=>o.onDoubleClick&&o.onDoubleClick(...g))},[Pe(e.$slots,"default",{},void 0,!0),o.showReset?(i(),h(C,{key:0,class:"resetIcon",onClick:J(o.scaleReset,["stop"])},{default:d(()=>[b(w(c.mdiMagnifyMinusOutline),1)]),_:1},8,["onClick"])):S("",!0)],36)),[[r,,void 0,{onlyX:!0}]])}const he=k(Nt,[["render",At],["__scopeId","data-v-b24267c0"]]),Ut={name:"HorizontalPages",components:{BookPage:ue,ScaleForScroll:he},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},emits:["click"],computed:{...f(l,["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:{..._(l,["getSettings"])}};function Et(e,t,a,p,c,o){const r=u("BookPage"),g=u("ScaleForScroll");return i(),h(g,{class:"noWrap"},{default:d(()=>[o.showPageOne?(i(),h(r,{key:0,ref:"pageOne",book:a.book,page:o.pageOne,class:"horizontalPage"},null,8,["book","page"])):S("",!0),o.showPageTwo?(i(),h(r,{key:1,book:a.book,page:o.pageTwo,class:"horizontalPage"},null,8,["book","page"])):S("",!0)]),_:1})}const xt=k(Ut,[["render",Et],["__scopeId","data-v-9a560964"]]),Ft={name:"PageChangeLink",props:{direction:{type:String,required:!0}},head(){return this.prefetchLinks(this.params,this.computedDirection)},computed:{...f(l,["isVertical","isFirstPage","isLastPage"]),...P(l,{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:{..._(l,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute"])}};function zt(e,t,a,p,c,o){const r=u("router-link");return o.show?(i(),h(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 Mt=k(Ft,[["render",zt],["__scopeId","data-v-9ade7d96"]]),Wt=48,Ht=48,qt={name:"PagerHorizontal",components:{HorizontalPages:xt,PageChangeLink:Mt},props:{book:{type:Object,required:!0}},data(){return{activePage:0,pages:[]}},computed:{...f(l,["isReadInReverse"]),...P(l,{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:{..._(l,["getSettings","setBookChangeFlag","setActivePage"]),setPages(){const e=Math.max(this.activePage-Wt,0),t=Math.min(this.activePage+Ht,this.book.maxPage),a=ne.range(e,t+1);this.pages=a}}};function Gt(e,t,a,p,c,o){const r=u("PageChangeLink"),g=u("HorizontalPages");return i(),h(ce,{"show-arrows":"",continuous:"","model-value":o.windowIndex,reverse:e.isReadInReverse},{prev:d(()=>[n(r,{direction:"prev"})]),next:d(()=>[n(r,{direction:"next"})]),default:d(()=>[(i(!0),v(B,null,O(c.pages,m=>(i(),h(le,{key:`c/${a.book.pk}/${m}`,class:"windowItem",disabled:"",eager:m>=e.storePage-1&&m<=e.storePage+2,"model-value":m,transition:!0},{default:d(()=>[n(g,{book:a.book,page:m},null,8,["book","page"])]),_:2},1032,["eager","model-value"]))),128))]),_:1},8,["model-value","reverse"])}const K=k(qt,[["render",Gt],["__scopeId","data-v-e04bbc00"]]),Kt=12,j=250,jt={name:"PagerVertical",components:{BookPage:ue,ScaleForScroll:he},props:{book:{type:Object,required:!0}},data(){return{innerHeight:window.innerHeight,innerWidth:window.innerWidth,intersectorOn:!1,programmaticScroll:!1}},computed:{...P(l,{storePage:e=>e.page,showToolbars:e=>e.showToolbars}),...ae(l,["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=ne.range(0,e);return this.readInReverse&&t.reverse(),t},visibleItems(){var e;return Math.min(((e=this.book)==null?void 0:e.maxPage)??0,Kt)}},watch:{storePage(e){this.reactWithScroll&&this.scrollToPage(e)}},mounted(){window.addEventListener("resize",this.onResize),setTimeout(()=>{this.scrollToPage(this.storePage)},j)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{..._(l,["setActivePage","setBookChangeFlag","getSettings"]),onIntersect(e,t){if(e&&this.intersectorOn){const p=+t[0].target.dataset.page;this.setActivePage(p,!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},j)},onResize(){this.innerHeight=window.innerHeight,this.innerWidth=window.innerWidth}}},Yt=["data-page"];function Xt(e,t,a,p,c,o){const r=u("BookPage"),g=u("ScaleForScroll");return i(),h(g,null,{default:d(()=>[T((i(),h(rt,{id:"verticalScroll",key:o.readInReverse,ref:"verticalScroll",items:o.items,height:c.innerHeight,width:c.innerWidth},{default:d(({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,Yt),[[we,{handler:o.onIntersect,options:{threshold:[.75]}},void 0,{quiet:!0}]])]),_:1},8,["items","height","width"])),[[ve,o.onScroll,"#verticalScroll"]])]),_:1})}const Y=k(jt,[["render",Xt],["__scopeId","data-v-ef3b4ade"]]),X=Q(ee(()=>"@/components/reader/pager/pager-full-pdf.vue")),Zt={name:"PagerSelector",components:{PagerHorizontal:K,PagerPDF:X,PagerVertical:Y},props:{book:{type:Object,required:!0}},emits:["click"],head(){return this.prefetchBook(this.book)},computed:{...f(l,["isVertical","cacheBook"]),...P(l,{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?X:this.isVertical?Y:K}},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:{..._(l,["getSettings","setActivePage","prefetchBook"])}};function Jt(e,t,a,p,c,o){return i(),h(te(o.component),{book:a.book},null,8,["book"])}const Qt=k(Zt,[["render",Jt]]),eo={name:"BooksWindow",components:{BookChangeActivator:Pt,Pager:Qt},computed:{...f(l,["isBTT"]),...P(l,{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({params:e.params})}},beforeMount(){this.setBookChangeFlag(),this.loadBooks({})},methods:{..._(l,["setBookChangeFlag","loadBooks","toggleToolbars"]),click(){this.toggleToolbars(),this.setBookChangeFlag()},eager(e){return this.bookChange&&this.bookRoutes[this.bookChange]&&this.bookRoutes[this.bookChange].pk===e}}};function to(e,t,a,p,c,o){const r=u("BookChangeActivator"),g=u("Pager");return i(),h(ce,{id:"booksWindow",direction:"vertical","model-value":e.currentBookPk,reverse:e.isBTT,"show-arrows":"",onClick:e.toggleToolbars},{prev:d(()=>[n(r,{direction:"prev"})]),next:d(()=>[n(r,{direction:"next"})]),default:d(()=>[(i(!0),v(B,null,O(e.books,m=>(i(),h(le,{key:`c/${m.pk}`,class:"windowItem",disabled:"",eager:o.eager(m.pk),value:m.pk,transition:!0},{default:d(()=>[n(g,{book:m,onClick:o.click},null,8,["book","onClick"])]),_:2},1032,["eager","value"]))),128))]),_:1},8,["model-value","reverse","onClick"])}const oo=k(eo,[["render",to],["__scopeId","data-v-aeb79f89"]]),ao={name:"DownloadPanel",components:{DrawerItem:Se},data(){return{mdiDownload:ye,mdiFileImage:Ce}},computed:{...f(l,["activeTitle","routeParams"]),...P(l,{currentBook:e=>{var t;return(t=e.books)==null?void 0:t.current},storePage:e=>e.page}),downloadURL(){return Ye(this.currentBook)},filename(){var e;return(e=this.currentBook)==null?void 0:e.filename},pageSrc(){const{pk:e,mtime:t}=this.currentBook;return Xe({pk:e,page:this.storePage,mtime:t})},pageName(){return`${this.activeTitle} - page ${this.storePage}.jpg`},downloadPageTitle(){return`Download Page ${this.storePage}`}},methods:{..._(M,["downloadIOSPWAFix"]),downloadPage(){this.downloadIOSPWAFix(this.pageSrc,this.pageName)},downloadBook(){this.downloadIOSPWAFix(this.downloadURL,this.filename)}}},so={key:0,id:"downloadPanel"};function ro(e,t,a,p,c,o){const r=u("DrawerItem");return e.currentBook?(i(),v("div",so,[n(r,{"prepend-icon":c.mdiFileImage,title:o.downloadPageTitle,onClick:o.downloadPage},null,8,["prepend-icon","title","onClick"]),n(r,{"prepend-icon":c.mdiDownload,title:"Download Book",onClick:o.downloadBook},null,8,["prepend-icon","onClick"])])):S("",!0)}const no=k(ao,[["render",ro],["__scopeId","data-v-e4f5bb93"]]),io={name:"KeyboardShortcutsPanel",data(){return{mdiMenuLeft:Re,mdiMenuRight:Be,mdiKeyboardOutline:Te,mdiKeyboardSpace:De,mdiAppleKeyboardShift:Ie}},computed:{...f(M,["isMobile"])}},y=e=>(Le("data-v-a8b4ac47"),e=e(),$e(),e),lo=y(()=>s("h4",null,"Navigation",-1)),co={class:"highlight-table"},uo=y(()=>s("td",null,"Previous page",-1)),ho=y(()=>s("td",null,"Next page",-1)),go=y(()=>s("tr",null,[s("td",null,","),s("td",null,[b("Next "),s("em",null,"only"),b(" one page in two page mode.")])],-1)),po=y(()=>s("tr",null,[s("td",null,"."),s("td",null,[b("Previous "),s("em",null,"only"),b(" one page in two page mode.")])],-1)),mo=y(()=>s("tr",null,[s("td",null,"p"),s("td",null,"Previous Book")],-1)),ko=y(()=>s("tr",null,[s("td",null,"n"),s("td",null,"Next Book")],-1)),bo=y(()=>s("tr",null,[s("td",null,"esc"),s("td",null,"Close book")],-1)),_o=y(()=>s("h4",null,"Fit Page To",-1)),fo=y(()=>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=y(()=>s("h4",null,"Other",-1)),vo=y(()=>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 wo(e,t,a,p,c,o){return e.isMobile?S("",!0):(i(),h(ct,{key:0},{default:d(()=>[n(nt,{id:"readerKeyboardShortcuts"},{default:d(()=>[n(it,{id:"shortcutsTitle"},{default:d(()=>[n(C,{id:"keyboardIcon"},{default:d(()=>[b(w(c.mdiKeyboardOutline),1)]),_:1}),b("Keyboard Shortcuts ")]),_:1}),n(lt,null,{default:d(()=>[lo,s("table",co,[s("tbody",null,[s("tr",null,[s("td",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiMenuLeft),1)]),_:1}),b(", j, "),s("div",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiAppleKeyboardShift),1)]),_:1}),n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiKeyboardSpace),1)]),_:1})])]),uo]),s("tr",null,[s("td",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiMenuRight),1)]),_:1}),b(", k, "),n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiKeyboardSpace),1)]),_:1})]),ho]),go,po,mo,ko,bo])]),_o,fo,Po,vo]),_:1})]),_:1})]),_:1}))}const So=k(io,[["render",wo],["__scopeId","data-v-a8b4ac47"]]),ge=["fitTo","readingDirection","twoPages"];Object.freeze(ge);const yo={name:"ReaderSettingsPanel",data(){return{isGlobalScope:!1,mdiOpenInNew:Ve,openDelay:2e3}},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["isVertical","isPDF","cacheBook"]),...P(l,{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 p of ge){const c=(a=e.books)==null?void 0:a.current.settings[p];if(!e.choices.nullValues.has(c))return!1}return!0},bookInBrowserURL(e){var t,a;return(t=e.books)!=null&&t.current?Oe((a=e.books)==null?void 0:a.current):""},finishOnLastPage:e=>e.readerSettings.finishOnLastPage}),...ae(l,["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:{..._(l,["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)}}},Co={id:"readerScopedSettings",class:"readerDrawerItem"},Ro=["href"];function Bo(e,t,a,p,c,o){return i(),v(B,null,[n(E,{modelValue:c.isGlobalScope,"onUpdate:modelValue":t[0]||(t[0]=r=>c.isGlobalScope=r),class:"scopeRadioButton readerDrawerItem",density:"compact",label:"Scope","hide-details":"auto"},{default:d(()=>[n(I,{label:"Only this comic",value:!1}),n(I,{label:"Default for all comics",value:!0})]),_:1},8,["modelValue"]),n(Ne,null,{default:d(()=>[s("div",Co,[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:d(()=>[(i(!0),v(B,null,O(o.fitToChoices,r=>(i(),h(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),n(L,{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:d(()=>[(i(!0),v(B,null,O(o.readingDirectionChoices,r=>(i(),h(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),c.isGlobalScope?S("",!0):T((i(),h(se,{key:0,id:"clearSettingsButton",disabled:e.isClearSettingsButtonDisabled,onClick:e.clearSettingsLocal},{default:d(()=>[b(" Clear Settings ")]),_:1},8,["disabled","onClick"])),[[W,{openDelay:c.openDelay,text:"Use the default settings for all comics for this comic"}]])])]),_:1}),n(z),n(L,{class:"readerDrawerItem","model-value":e.finishOnLastPage,density:"compact",label:"Finish Book On Last Page","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[4]||(t[4]=r=>o.settingsDialogChanged({finishOnLastPage:r}))},null,8,["model-value"]),n(L,{"model-value":e.selectedSettings.readRtlInReverse,class:"readerDrawerItem",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"]),T(n(L,{"model-value":e.cacheBook,class:"readerDrawerItem cacheBook",density:"compact",disabled:o.disableCacheBook,label:"Cache Entire Book","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[6]||(t[6]=r=>e.setSettingsClient({cacheBook:r}))},null,8,["model-value","disabled"]),[[W,{openDelay:c.openDelay,text:"Cache all pages from this book in the browser"}]]),e.isPDF?(i(),v("a",{key:0,id:"readPDFInBrowser",class:"readerDrawerItem",href:e.bookInBrowserURL,target:"_blank"},[n(C,null,{default:d(()=>[b(w(c.mdiOpenInNew),1)]),_:1}),b("Read PDF in Browser ")],8,Ro)):S("",!0)],64)}const To=k(yo,[["render",Bo],["__scopeId","data-v-3e689883"]]),Do={name:"ReaderSettingsSuperPanel",components:{DownloadPanel:no,ReaderKeyboardShortcutsPanel:So,ReaderSettingsPanel:To}};function Io(e,t,a,p,c,o){const r=u("ReaderSettingsPanel"),g=u("ReaderKeyboardShortcutsPanel"),m=u("DownloadPanel");return i(),v(B,null,[n(r),n(z),n(g),n(z),n(m)],64)}const Lo=k(Do,[["render",Io]]),$o={name:"ReaderSettingsDrawer",components:{SettingsDrawer:Je,ReaderSettingsSuperPanel:Lo}};function Vo(e,t,a,p,c,o){const r=u("ReaderSettingsSuperPanel"),g=u("SettingsDrawer");return i(),h(g,{title:"Reader",temporary:"","disable-resize-watcher":""},{panel:d(()=>[n(r)]),_:1})}const Oo=k($o,[["render",Vo]]),Z={a:Ue,f:Ee,s:xe,v:Fe},No={a:"Story Arc",f:"Folder",s:"Series",v:"Volume"},Ao={name:"ReaderArcSelect",components:{ToolbarSelect:dt},computed:{...P(l,{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 p={value:a,title:a.name,group:a.group,subtitle:No[a.group],prependIcon:Z[a.group]};t.push(p)}return t}})},methods:{..._(l,["loadBooks"]),arcIcon(e){return Z[e]},checkIcon(e){return e===this.arc?Ae:""},onUpdate(e){const t={group:e.group,pks:e.pks};this.loadBooks({arc:t})}}},Uo={id:"arcPos"};function Eo(e,t,a,p,c,o){const r=u("ToolbarSelect");return i(),h(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:d(({item:g,props:m})=>[n(ze,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:d(({item:g,props:m})=>[n(C,F({size:"large"},m,{class:"arcSelectIcon"}),{default:d(()=>[b(w(o.arcIcon(g.raw.group)),1)]),_:2},1040),s("span",Uo,w(e.arc.index)+" / "+w(e.arc.count),1)]),_:1},8,["model-value","items","disabled","onUpdate:modelValue"])}const xo=k(Ao,[["render",Eo],["__scopeId","data-v-2b466f8a"]]),Fo={name:"ReaderTitleToolbar",components:{MetadataDialog:ut,ReaderArcSelect:xo,SettingsDrawerButton:Qe},data(){return{mdiClose:Me,routeChanged:!1}},head(){return{meta:[{hid:"description",name:"description",content:`reader ${this.activeTitle} page ${this.storePage}`}]}},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["activeTitle","closeBookRoute"]),...P(l,{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"]),..._(l,["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}}}},zo={id:"title"},Mo={key:0,id:"subtitle"};function Wo(e,t,a,p,c,o){const r=u("ReaderArcSelect"),g=u("MetadataDialog"),m=u("SettingsDrawerButton");return i(),h(He,null,{default:d(()=>[T(n(tt,{id:"readerToolbarTop",density:"compact","extension-height":o.extensionHeight},We({default:d(()=>[n(x,null,{default:d(()=>[n(se,{ref:"closeBook",class:"closeBook",to:e.closeBookRoute,size:"large",density:"compact",variant:"plain",onClick:o.onCloseBook},{default:d(()=>[b(" close book ")]),_:1},8,["to","onClick"])]),_:1}),n(ht),e.empty?S("",!0):(i(),h(x,{key:0},{default:d(()=>[n(r),n(g,{ref:"metadataDialog",group:"c",toolbar:!0,book:e.currentBook},null,8,["book"])]),_:1})),n(x,null,{default:d(()=>[n(m)]),_:1})]),_:2},[o.title?{name:"extension",fn:d(()=>[n(et,{class:"readerTitle"},{default:d(()=>[s("div",zo,w(o.title),1),e.subtitle?(i(),v("div",Mo,w(e.subtitle),1)):S("",!0)]),_:1})]),key:"0"}:void 0]),1032,["extension-height"]),[[re,e.showToolbars]])]),_:1})}const pe=k(Fo,[["render",Wo],["__scopeId","data-v-e9e8347c"]]),Ho={name:"ReaderEmpty",components:{ReaderTopToolbar:pe},data(){return{mdiBookRemoveOutline:qe}}};function qo(e,t,a,p,c,o){const r=u("ReaderTopToolbar");return i(),v(B,null,[n(r),n(ie,{class:"empty",headline:"Book Not Found",title:"Close the reader and find another book",icon:c.mdiBookRemoveOutline},null,8,["icon"])],64)}const Go=k(Ho,[["render",qo],["__scopeId","data-v-65d65e48"]]),Ko={name:"ReaderBookChangeNavButton",components:{PaginationNavButton:de},props:{direction:{type:String,required:!0}},computed:{...f(l,["isBTT"]),...P(l,{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:{..._(l,["bookChangeIcon"])}};function jo(e,t,a,p,c,o){const r=u("PaginationNavButton");return e.toRoute?(i(),h(r,{key:0,class:R(o.classes),icon:"",variant:"plain",title:o.title,to:e.toRoute},{default:d(()=>[n(C,null,{default:d(()=>[b(w(o.icon),1)]),_:1})]),_:1},8,["class","title","to"])):S("",!0)}const Yo=k(Ko,[["render",jo],["__scopeId","data-v-117f651c"]]),Xo={name:"ReaderNavButton",components:{PaginationNavButton:de},props:{value:{type:Number,required:!0},twoPages:{type:Boolean,default:!1}},computed:{...f(l,["isVertical"]),...P(l,{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:{..._(l,["setActivePage"]),onClick(){this.isVertical&&this.setActivePage(this.value,!0)}}};function Zo(e,t,a,p,c,o){const r=u("PaginationNavButton");return i(),h(r,{key:e.isVertical,disabled:o.disabled,class:R(["readerNavButton",o.classes]),title:o.title,to:e.toRoute,onClick:o.onClick},{default:d(()=>[b(w(a.value),1)]),_:1},8,["disabled","class","title","to","onClick"])}const Jo=k(Xo,[["render",Zo],["__scopeId","data-v-530fba8c"]]),$="prev",V="next",Qo={name:"ReaderNavToolbar",components:{PaginationSlider:gt,ReaderNavButton:Jo,PaginationToolbar:pt,ReaderBookChangeNavButton:Yo},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["activeSettings","isReadInReverse","isVertical"]),...P(l,{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:{..._(l,["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(V):e.shiftKey&&window.scrollY===0&&this.routeToDirection($);break;case"j":case"ArrowRight":this.routeToDirection(V);break;case"k":case"ArrowLeft":this.routeToDirection($);break;case",":this.routeToDirectionOne($);break;case".":this.routeToDirectionOne(V);break;case"n":this.routeToBook(V);break;case"p":this.routeToBook($);break}}}};function ea(e,t,a,p,c,o){const r=u("ReaderBookChangeNavButton"),g=u("ReaderNavButton"),m=u("PaginationSlider"),N=u("PaginationToolbar");return i(),h(Ge,null,{default:d(()=>[e.maxPage?T((i(),h(N,{key:0,id:"readerToolbarNav"},{default:d(()=>[n(r,{direction:o.bookPrev,narrow:!1},null,8,["direction"]),n(g,{value:o.min,"two-pages":o.twoPages},null,8,["value","two-pages"]),(i(),h(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]=A=>o.onSliderUpdate(A))},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)),[[re,e.showToolbars]]):S("",!0)]),_:1})}const ta=k(Qo,[["render",ea],["__scopeId","data-v-20fc0313"]]),oa={name:"MainReader",components:{BooksWindow:oo,ReaderEmpty:Go,ReaderNavToolbar:ta,ReaderTopToolbar:pe,ReaderSettingsDrawer:Oo,Unauthorized:at},data(){return{showToolbars:!1}},computed:{...f(D,["isAuthorized"]),...P(D,{user:e=>e.user}),...P(l,{empty:e=>e.empty,arc:e=>e.arc})},watch:{user(){this.loadReaderSettings()},isAuthorized(){this.loadReaderSettings()}},beforeMount(){this.reset(),this.loadReaderSettings()},methods:{..._(l,["loadReaderSettings","reset"])}},aa={key:0},sa={id:"readerContainer"};function ra(e,t,a,p,c,o){const r=u("ReaderTopToolbar"),g=u("BooksWindow"),m=u("ReaderNavToolbar"),N=u("ReaderEmpty"),A=u("ReaderSettingsDrawer"),me=u("Unauthorized");return e.isAuthorized?(i(),h(st,{key:0,id:"readerWrapper"},{default:d(()=>[e.empty?(i(),h(N,{key:1})):(i(),v("div",aa,[s("div",sa,[n(r),n(g),n(m)])])),n(A)]),_:1})):(i(),h(me,{key:1}))}const ya=k(oa,[["render",ra],["__scopeId","data-v-4f31abfa"]]);export{ya as default};
@@ -1,2 +1,2 @@
1
- const __vite__fileDeps=["assets/pdf-doc-CkV-xfvG.js","assets/admin-drawer-panel-BF-h3Wm0.js","assets/admin-drawer-panel-mne3FIj6.css","assets/main-x0Pcl23A.js","assets/main-Ztp855PW.css","assets/pdf-doc-CMzaSV_K.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{an as f,V as P,W as _,_ as k,Y as u,Z as i,X as h,$ as d,S as n,aP as C,aj as b,aH as w,ak as R,aJ as S,aF as v,aW as J,U as B,bB as ke,bC as be,as as F,bD as Q,bE as ee,aI as te,bF as oe,bG as _e,b6 as fe,aT as T,by as Pe,aG as O,br as ae,bH as ve,aO as s,b4 as we,al as Se,bI as ye,bJ as Ce,D as M,bK as Re,bL as Be,bM as Te,bN as De,bO as Ie,aQ as Le,aR as $e,aM as Ve,m as D,bP as Oe,ar as se,aU as W,bQ as Ne,aV as z,bR as Ae,bS as Ue,bj as Ee,am as xe,bT as Fe,aY as ze,bU as Me,bV as re,bm as We,bp as He,bW as qe,bX as Ge}from"./admin-drawer-panel-BF-h3Wm0.js";import{b as l,c as Ke,_ as je,S as U,d as ne,e as Ye,h as Xe}from"./main-x0Pcl23A.js";import{d as Ze,b as Je,S as Qe,V as et,a as tt}from"./settings-drawer-BOTI_tHr.js";import{P as ot,a as ie,U as at,V as st}from"./unauthorized-D5-FvA2_.js";import{b as le,V as ce}from"./VWindowItem-aal6-Uv4.js";import{a as rt}from"./VSelect-ou2Q9UaN.js";import{V as nt,a as it,b as lt,c as ct}from"./VExpansionPanels-BUJaYmzY.js";import{V as I,a as E}from"./VRadioGroup-CayclHra.js";import{V as L}from"./VCheckbox-B3vCf1Vu.js";import{T as dt,M as ut,V as x,a as ht,P as de,b as gt,c as pt}from"./pagination-toolbar-DEgDOzzp.js";import"./copy-to-clipboard-DoUvDJVx.js";import"./VDialog-D6HUFV6a.js";import"./change-password-dialog-BCYw5K7E.js";import"./VTextField-HAAxrpNi.js";import"./VSelectionControl-BOKIwNZb.js";import"./VCheckboxBtn-Cj6bUYmw.js";import"./VSlideGroup-C3XgVg2T.js";import"./to-case-CnnzURtN.js";const mt={name:"BookChangeDrawer",props:{direction:{type:String,required:!0}},head(){if(this.isDrawerOpen)return this.prefetchLinks(this.params,this.computedDirection,!0)},computed:{...f(l,["isBTT"]),...P(l,{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:{..._(l,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute","bookChangeLocation","bookChangeCursorClass","bookChangeShow","bookChangeIcon"])}};function kt(e,t,a,p,c,o){const r=u("router-link");return o.show?(i(),h(Ze,{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:d(()=>[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:d(()=>[n(C,{class:"bookChangeIcon"},{default:d(()=>[b(w(e.icon),1)]),_:1})]),_:1},8,["class","to","aria-label","title"])]),_:1},8,["location","model-value","class"])):S("",!0)}const bt=k(mt,[["render",kt],["__scopeId","data-v-03e41a14"]]),_t={name:"BookChangeActivator",components:{BookChangeDrawer:bt},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:{..._(l,["setBookChangeFlag","normalizeDirection","bookChangeLocation","bookChangeCursorClass","bookChangeShow"])}};function ft(e,t,a,p,c,o){const r=u("BookChangeDrawer");return i(),v(B,null,[o.show?(i(),v("div",{key:0,class:R(["bookChangeColumn",{[o.positionClass]:!0,[o.cursorClass]:!0}]),onClick:t[0]||(t[0]=J(g=>e.setBookChangeFlag(a.direction),["stop"]))},null,2)):S("",!0),n(r,{direction:a.direction},null,8,["direction"])],64)}const Pt=k(_t,[["render",ft],["__scopeId","data-v-db3eb561"]]),vt={name:"LoadingPage",components:{Placeholder:ot},props:{twoPages:{type:Boolean,required:!0}}};function wt(e,t,a,p,c,o){const r=u("Placeholder");return i(),v("div",{class:R(["pageLoading",{twoPages:a.twoPages}])},[n(r,{class:"pagePlaceholder"})],2)}const St=k(vt,[["render",wt],["__scopeId","data-v-04027168"]]),H="unauthorized",yt={name:"ErrorPage",props:{twoPages:{type:Boolean,required:!0},type:{type:String,required:!0}},computed:{text(){return this.type===H?"Protected page":"Failed to load page"},icon(){return this.type===H?ke:be}}};function Ct(e,t,a,p,c,o){return i(),h(ie,{class:R(["pageError",{twoPages:a.twoPages}]),headline:o.text,icon:o.icon},null,8,["class","headline","icon"])}const Rt=k(yt,[["render",Ct],["__scopeId","data-v-417a4cab"]]),Bt={name:"ImgPage",props:{book:{type:Object,required:!0},src:{type:String,required:!0}},emits:["load","error"],computed:{...P(l,{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:{..._(l,["fitToClass"])}},Tt=["src"];function Dt(e,t,a,p,c,o){return i(),v("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,Tt)}const q=k(Bt,[["render",Dt],["__scopeId","data-v-559e2ecc"]]),G=Q(ee(()=>je(()=>import("./pdf-doc-CkV-xfvG.js"),__vite__mapDeps([0,1,2,3,4,5])))),It=333,Lt={name:"BookPage",components:{ErrorPage:Rt,LoadingPage:St,PDFDoc:G,ImgPage:q},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},data(){return{showProgress:!1,loaded:!1,error:!1}},computed:{...f(l,["isVertical"]),...P(l,{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 Ke(e)},component(){return this.book.fileType==="PDF"?G:q},settings(){return this.getSettings(this.book)}},mounted(){setTimeout(function(){this.loaded||(this.loading=!0)},It)},methods:{..._(l,["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}}},$t=["id","data-page"];function Vt(e,t,a,p,c,o){const r=u("ErrorPage"),g=u("LoadingPage");return i(),v("div",{id:`page${a.page}`,"data-page":a.page,class:"page",style:oe(o.style)},[c.error?(i(),h(r,{key:0,"two-pages":o.settings.twoPages,type:c.error},null,8,["two-pages","type"])):c.showProgress&&!c.loaded?(i(),h(g,{key:1,"two-pages":o.settings.twoPages},null,8,["two-pages"])):(i(),h(te(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,$t)}const ue=k(Lt,[["render",Vt],["__scopeId","data-v-87996fa1"]]),Ot=.5,Nt={name:"ScaleForScroll",emits:["click"],data(){return{mdiMagnifyMinusOutline:_e}},computed:{...P(l,{scale:e=>e.clientSettings.scale}),showReset(){return this.scale!=U},style(){return{cursor:this.scale==U?"zoom-in":"all-scroll"}}},methods:{..._(l,["setSettingsClient"]),clearSelection(){window.getSelection&&window.getSelection().removeAllRanges()},onDoubleClick(){this.clearSelection();const e=this.scale+Ot;this.setSettingsClient({scale:e})},scaleReset(){this.setSettingsClient({scale:U})}}};function At(e,t,a,p,c,o){const r=fe("drag-scroller");return T((i(),v("div",{class:"scaleForScroll",style:oe(o.style),onDblclick:t[0]||(t[0]=(...g)=>o.onDoubleClick&&o.onDoubleClick(...g))},[Pe(e.$slots,"default",{},void 0,!0),o.showReset?(i(),h(C,{key:0,class:"resetIcon",onClick:J(o.scaleReset,["stop"])},{default:d(()=>[b(w(c.mdiMagnifyMinusOutline),1)]),_:1},8,["onClick"])):S("",!0)],36)),[[r,,void 0,{onlyX:!0}]])}const he=k(Nt,[["render",At],["__scopeId","data-v-b24267c0"]]),Ut={name:"HorizontalPages",components:{BookPage:ue,ScaleForScroll:he},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},emits:["click"],computed:{...f(l,["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:{..._(l,["getSettings"])}};function Et(e,t,a,p,c,o){const r=u("BookPage"),g=u("ScaleForScroll");return i(),h(g,{class:"noWrap"},{default:d(()=>[o.showPageOne?(i(),h(r,{key:0,ref:"pageOne",book:a.book,page:o.pageOne,class:"horizontalPage"},null,8,["book","page"])):S("",!0),o.showPageTwo?(i(),h(r,{key:1,book:a.book,page:o.pageTwo,class:"horizontalPage"},null,8,["book","page"])):S("",!0)]),_:1})}const xt=k(Ut,[["render",Et],["__scopeId","data-v-9a560964"]]),Ft={name:"PageChangeLink",props:{direction:{type:String,required:!0}},head(){return this.prefetchLinks(this.params,this.computedDirection)},computed:{...f(l,["isVertical","isFirstPage","isLastPage"]),...P(l,{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:{..._(l,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute"])}};function zt(e,t,a,p,c,o){const r=u("router-link");return o.show?(i(),h(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 Mt=k(Ft,[["render",zt],["__scopeId","data-v-9ade7d96"]]),Wt=48,Ht=48,qt={name:"PagerHorizontal",components:{HorizontalPages:xt,PageChangeLink:Mt},props:{book:{type:Object,required:!0}},data(){return{activePage:0,pages:[]}},computed:{...f(l,["isReadInReverse"]),...P(l,{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:{..._(l,["getSettings","setBookChangeFlag","setActivePage"]),setPages(){const e=Math.max(this.activePage-Wt,0),t=Math.min(this.activePage+Ht,this.book.maxPage),a=ne.range(e,t+1);this.pages=a}}};function Gt(e,t,a,p,c,o){const r=u("PageChangeLink"),g=u("HorizontalPages");return i(),h(ce,{"show-arrows":"",continuous:"","model-value":o.windowIndex,reverse:e.isReadInReverse},{prev:d(()=>[n(r,{direction:"prev"})]),next:d(()=>[n(r,{direction:"next"})]),default:d(()=>[(i(!0),v(B,null,O(c.pages,m=>(i(),h(le,{key:`c/${a.book.pk}/${m}`,class:"windowItem",disabled:"",eager:m>=e.storePage-1&&m<=e.storePage+2,"model-value":m,transition:!0},{default:d(()=>[n(g,{book:a.book,page:m},null,8,["book","page"])]),_:2},1032,["eager","model-value"]))),128))]),_:1},8,["model-value","reverse"])}const K=k(qt,[["render",Gt],["__scopeId","data-v-e04bbc00"]]),Kt=12,j=250,jt={name:"PagerVertical",components:{BookPage:ue,ScaleForScroll:he},props:{book:{type:Object,required:!0}},data(){return{innerHeight:window.innerHeight,innerWidth:window.innerWidth,intersectorOn:!1,programmaticScroll:!1}},computed:{...P(l,{storePage:e=>e.page,showToolbars:e=>e.showToolbars}),...ae(l,["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=ne.range(0,e);return this.readInReverse&&t.reverse(),t},visibleItems(){var e;return Math.min(((e=this.book)==null?void 0:e.maxPage)??0,Kt)}},watch:{storePage(e){this.reactWithScroll&&this.scrollToPage(e)}},mounted(){window.addEventListener("resize",this.onResize),setTimeout(()=>{this.scrollToPage(this.storePage)},j)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{..._(l,["setActivePage","setBookChangeFlag","getSettings"]),onIntersect(e,t){if(e&&this.intersectorOn){const p=+t[0].target.dataset.page;this.setActivePage(p,!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},j)},onResize(){this.innerHeight=window.innerHeight,this.innerWidth=window.innerWidth}}},Yt=["data-page"];function Xt(e,t,a,p,c,o){const r=u("BookPage"),g=u("ScaleForScroll");return i(),h(g,null,{default:d(()=>[T((i(),h(rt,{id:"verticalScroll",key:o.readInReverse,ref:"verticalScroll",items:o.items,height:c.innerHeight,width:c.innerWidth},{default:d(({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,Yt),[[we,{handler:o.onIntersect,options:{threshold:[.75]}},void 0,{quiet:!0}]])]),_:1},8,["items","height","width"])),[[ve,o.onScroll,"#verticalScroll"]])]),_:1})}const Y=k(jt,[["render",Xt],["__scopeId","data-v-ef3b4ade"]]),X=Q(ee(()=>"@/components/reader/pager/pager-full-pdf.vue")),Zt={name:"PagerSelector",components:{PagerHorizontal:K,PagerPDF:X,PagerVertical:Y},props:{book:{type:Object,required:!0}},emits:["click"],head(){return this.prefetchBook(this.book)},computed:{...f(l,["isVertical","cacheBook"]),...P(l,{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?X:this.isVertical?Y:K}},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:{..._(l,["getSettings","setActivePage","prefetchBook"])}};function Jt(e,t,a,p,c,o){return i(),h(te(o.component),{book:a.book},null,8,["book"])}const Qt=k(Zt,[["render",Jt]]),eo={name:"BooksWindow",components:{BookChangeActivator:Pt,Pager:Qt},computed:{...f(l,["isBTT"]),...P(l,{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({params:e.params})}},beforeMount(){this.setBookChangeFlag(),this.loadBooks({})},methods:{..._(l,["setBookChangeFlag","loadBooks","toggleToolbars"]),click(){this.toggleToolbars(),this.setBookChangeFlag()},eager(e){return this.bookChange&&this.bookRoutes[this.bookChange]&&this.bookRoutes[this.bookChange].pk===e}}};function to(e,t,a,p,c,o){const r=u("BookChangeActivator"),g=u("Pager");return i(),h(ce,{id:"booksWindow",direction:"vertical","model-value":e.currentBookPk,reverse:e.isBTT,"show-arrows":"",onClick:e.toggleToolbars},{prev:d(()=>[n(r,{direction:"prev"})]),next:d(()=>[n(r,{direction:"next"})]),default:d(()=>[(i(!0),v(B,null,O(e.books,m=>(i(),h(le,{key:`c/${m.pk}`,class:"windowItem",disabled:"",eager:o.eager(m.pk),value:m.pk,transition:!0},{default:d(()=>[n(g,{book:m,onClick:o.click},null,8,["book","onClick"])]),_:2},1032,["eager","value"]))),128))]),_:1},8,["model-value","reverse","onClick"])}const oo=k(eo,[["render",to],["__scopeId","data-v-aeb79f89"]]),ao={name:"DownloadPanel",components:{DrawerItem:Se},data(){return{mdiDownload:ye,mdiFileImage:Ce}},computed:{...f(l,["activeTitle","routeParams"]),...P(l,{currentBook:e=>{var t;return(t=e.books)==null?void 0:t.current},storePage:e=>e.page}),downloadURL(){return Ye(this.currentBook)},filename(){var e;return(e=this.currentBook)==null?void 0:e.filename},pageSrc(){const{pk:e,mtime:t}=this.currentBook;return Xe({pk:e,page:this.storePage,mtime:t})},pageName(){return`${this.activeTitle} - page ${this.storePage}.jpg`},downloadPageTitle(){return`Download Page ${this.storePage}`}},methods:{..._(M,["downloadIOSPWAFix"]),downloadPage(){this.downloadIOSPWAFix(this.pageSrc,this.pageName)},downloadBook(){this.downloadIOSPWAFix(this.downloadURL,this.filename)}}},so={key:0,id:"downloadPanel"};function ro(e,t,a,p,c,o){const r=u("DrawerItem");return e.currentBook?(i(),v("div",so,[n(r,{"prepend-icon":c.mdiFileImage,title:o.downloadPageTitle,onClick:o.downloadPage},null,8,["prepend-icon","title","onClick"]),n(r,{"prepend-icon":c.mdiDownload,title:"Download Book",onClick:o.downloadBook},null,8,["prepend-icon","onClick"])])):S("",!0)}const no=k(ao,[["render",ro],["__scopeId","data-v-e4f5bb93"]]),io={name:"KeyboardShortcutsPanel",data(){return{mdiMenuLeft:Re,mdiMenuRight:Be,mdiKeyboardOutline:Te,mdiKeyboardSpace:De,mdiAppleKeyboardShift:Ie}},computed:{...f(M,["isMobile"])}},y=e=>(Le("data-v-a8b4ac47"),e=e(),$e(),e),lo=y(()=>s("h4",null,"Navigation",-1)),co={class:"highlight-table"},uo=y(()=>s("td",null,"Previous page",-1)),ho=y(()=>s("td",null,"Next page",-1)),go=y(()=>s("tr",null,[s("td",null,","),s("td",null,[b("Next "),s("em",null,"only"),b(" one page in two page mode.")])],-1)),po=y(()=>s("tr",null,[s("td",null,"."),s("td",null,[b("Previous "),s("em",null,"only"),b(" one page in two page mode.")])],-1)),mo=y(()=>s("tr",null,[s("td",null,"p"),s("td",null,"Previous Book")],-1)),ko=y(()=>s("tr",null,[s("td",null,"n"),s("td",null,"Next Book")],-1)),bo=y(()=>s("tr",null,[s("td",null,"esc"),s("td",null,"Close book")],-1)),_o=y(()=>s("h4",null,"Fit Page To",-1)),fo=y(()=>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=y(()=>s("h4",null,"Other",-1)),vo=y(()=>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 wo(e,t,a,p,c,o){return e.isMobile?S("",!0):(i(),h(ct,{key:0},{default:d(()=>[n(nt,{id:"readerKeyboardShortcuts"},{default:d(()=>[n(it,{id:"shortcutsTitle"},{default:d(()=>[n(C,{id:"keyboardIcon"},{default:d(()=>[b(w(c.mdiKeyboardOutline),1)]),_:1}),b("Keyboard Shortcuts ")]),_:1}),n(lt,null,{default:d(()=>[lo,s("table",co,[s("tbody",null,[s("tr",null,[s("td",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiMenuLeft),1)]),_:1}),b(", j, "),s("div",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiAppleKeyboardShift),1)]),_:1}),n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiKeyboardSpace),1)]),_:1})])]),uo]),s("tr",null,[s("td",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiMenuRight),1)]),_:1}),b(", k, "),n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiKeyboardSpace),1)]),_:1})]),ho]),go,po,mo,ko,bo])]),_o,fo,Po,vo]),_:1})]),_:1})]),_:1}))}const So=k(io,[["render",wo],["__scopeId","data-v-a8b4ac47"]]),ge=["fitTo","readingDirection","twoPages"];Object.freeze(ge);const yo={name:"ReaderSettingsPanel",data(){return{isGlobalScope:!1,mdiOpenInNew:Ve,openDelay:2e3}},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["isVertical","isPDF","cacheBook"]),...P(l,{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 p of ge){const c=(a=e.books)==null?void 0:a.current.settings[p];if(!e.choices.nullValues.has(c))return!1}return!0},bookInBrowserURL(e){var t,a;return(t=e.books)!=null&&t.current?Oe((a=e.books)==null?void 0:a.current):""},finishOnLastPage:e=>e.readerSettings.finishOnLastPage}),...ae(l,["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:{..._(l,["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)}}},Co={id:"readerScopedSettings",class:"readerDrawerItem"},Ro=["href"];function Bo(e,t,a,p,c,o){return i(),v(B,null,[n(E,{modelValue:c.isGlobalScope,"onUpdate:modelValue":t[0]||(t[0]=r=>c.isGlobalScope=r),class:"scopeRadioButton readerDrawerItem",density:"compact",label:"Scope","hide-details":"auto"},{default:d(()=>[n(I,{label:"Only this comic",value:!1}),n(I,{label:"Default for all comics",value:!0})]),_:1},8,["modelValue"]),n(Ne,null,{default:d(()=>[s("div",Co,[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:d(()=>[(i(!0),v(B,null,O(o.fitToChoices,r=>(i(),h(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),n(L,{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:d(()=>[(i(!0),v(B,null,O(o.readingDirectionChoices,r=>(i(),h(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),c.isGlobalScope?S("",!0):T((i(),h(se,{key:0,id:"clearSettingsButton",disabled:e.isClearSettingsButtonDisabled,onClick:e.clearSettingsLocal},{default:d(()=>[b(" Clear Settings ")]),_:1},8,["disabled","onClick"])),[[W,{openDelay:c.openDelay,text:"Use the default settings for all comics for this comic"}]])])]),_:1}),n(z),n(L,{class:"readerDrawerItem","model-value":e.finishOnLastPage,density:"compact",label:"Finish Book On Last Page","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[4]||(t[4]=r=>o.settingsDialogChanged({finishOnLastPage:r}))},null,8,["model-value"]),n(L,{"model-value":e.selectedSettings.readRtlInReverse,class:"readerDrawerItem",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"]),T(n(L,{"model-value":e.cacheBook,class:"readerDrawerItem cacheBook",density:"compact",disabled:o.disableCacheBook,label:"Cache Entire Book","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[6]||(t[6]=r=>e.setSettingsClient({cacheBook:r}))},null,8,["model-value","disabled"]),[[W,{openDelay:c.openDelay,text:"Cache all pages from this book in the browser"}]]),e.isPDF?(i(),v("a",{key:0,id:"readPDFInBrowser",class:"readerDrawerItem",href:e.bookInBrowserURL,target:"_blank"},[n(C,null,{default:d(()=>[b(w(c.mdiOpenInNew),1)]),_:1}),b("Read PDF in Browser ")],8,Ro)):S("",!0)],64)}const To=k(yo,[["render",Bo],["__scopeId","data-v-3e689883"]]),Do={name:"ReaderSettingsSuperPanel",components:{DownloadPanel:no,ReaderKeyboardShortcutsPanel:So,ReaderSettingsPanel:To}};function Io(e,t,a,p,c,o){const r=u("ReaderSettingsPanel"),g=u("ReaderKeyboardShortcutsPanel"),m=u("DownloadPanel");return i(),v(B,null,[n(r),n(z),n(g),n(z),n(m)],64)}const Lo=k(Do,[["render",Io]]),$o={name:"ReaderSettingsDrawer",components:{SettingsDrawer:Je,ReaderSettingsSuperPanel:Lo}};function Vo(e,t,a,p,c,o){const r=u("ReaderSettingsSuperPanel"),g=u("SettingsDrawer");return i(),h(g,{title:"Reader",temporary:"","disable-resize-watcher":""},{panel:d(()=>[n(r)]),_:1})}const Oo=k($o,[["render",Vo]]),Z={a:Ue,f:Ee,s:xe,v:Fe},No={a:"Story Arc",f:"Folder",s:"Series",v:"Volume"},Ao={name:"ReaderArcSelect",components:{ToolbarSelect:dt},computed:{...P(l,{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 p={value:a,title:a.name,group:a.group,subtitle:No[a.group],prependIcon:Z[a.group]};t.push(p)}return t}})},methods:{..._(l,["loadBooks"]),arcIcon(e){return Z[e]},checkIcon(e){return e===this.arc?Ae:""},onUpdate(e){const t={group:e.group,pks:e.pks};this.loadBooks({arc:t})}}},Uo={id:"arcPos"};function Eo(e,t,a,p,c,o){const r=u("ToolbarSelect");return i(),h(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:d(({item:g,props:m})=>[n(ze,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:d(({item:g,props:m})=>[n(C,F({size:"large"},m,{class:"arcSelectIcon"}),{default:d(()=>[b(w(o.arcIcon(g.raw.group)),1)]),_:2},1040),s("span",Uo,w(e.arc.index)+" / "+w(e.arc.count),1)]),_:1},8,["model-value","items","disabled","onUpdate:modelValue"])}const xo=k(Ao,[["render",Eo],["__scopeId","data-v-2b466f8a"]]),Fo={name:"ReaderTitleToolbar",components:{MetadataDialog:ut,ReaderArcSelect:xo,SettingsDrawerButton:Qe},data(){return{mdiClose:Me,routeChanged:!1}},head(){return{meta:[{hid:"description",name:"description",content:`reader ${this.activeTitle} page ${this.storePage}`}]}},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["activeTitle","closeBookRoute"]),...P(l,{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"]),..._(l,["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}}}},zo={id:"title"},Mo={key:0,id:"subtitle"};function Wo(e,t,a,p,c,o){const r=u("ReaderArcSelect"),g=u("MetadataDialog"),m=u("SettingsDrawerButton");return i(),h(He,null,{default:d(()=>[T(n(tt,{id:"readerToolbarTop",density:"compact","extension-height":o.extensionHeight},We({default:d(()=>[n(x,null,{default:d(()=>[n(se,{ref:"closeBook",class:"closeBook",to:e.closeBookRoute,size:"large",density:"compact",variant:"plain",onClick:o.onCloseBook},{default:d(()=>[b(" close book ")]),_:1},8,["to","onClick"])]),_:1}),n(ht),e.empty?S("",!0):(i(),h(x,{key:0},{default:d(()=>[n(r),n(g,{ref:"metadataDialog",group:"c",toolbar:!0,book:e.currentBook},null,8,["book"])]),_:1})),n(x,null,{default:d(()=>[n(m)]),_:1})]),_:2},[o.title?{name:"extension",fn:d(()=>[n(et,{class:"readerTitle"},{default:d(()=>[s("div",zo,w(o.title),1),e.subtitle?(i(),v("div",Mo,w(e.subtitle),1)):S("",!0)]),_:1})]),key:"0"}:void 0]),1032,["extension-height"]),[[re,e.showToolbars]])]),_:1})}const pe=k(Fo,[["render",Wo],["__scopeId","data-v-e9e8347c"]]),Ho={name:"ReaderEmpty",components:{ReaderTopToolbar:pe},data(){return{mdiBookRemoveOutline:qe}}};function qo(e,t,a,p,c,o){const r=u("ReaderTopToolbar");return i(),v(B,null,[n(r),n(ie,{class:"empty",headline:"Book Not Found",title:"Close the reader and find another book",icon:c.mdiBookRemoveOutline},null,8,["icon"])],64)}const Go=k(Ho,[["render",qo],["__scopeId","data-v-65d65e48"]]),Ko={name:"ReaderBookChangeNavButton",components:{PaginationNavButton:de},props:{direction:{type:String,required:!0}},computed:{...f(l,["isBTT"]),...P(l,{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:{..._(l,["bookChangeIcon"])}};function jo(e,t,a,p,c,o){const r=u("PaginationNavButton");return e.toRoute?(i(),h(r,{key:0,class:R(o.classes),icon:"",variant:"plain",title:o.title,to:e.toRoute},{default:d(()=>[n(C,null,{default:d(()=>[b(w(o.icon),1)]),_:1})]),_:1},8,["class","title","to"])):S("",!0)}const Yo=k(Ko,[["render",jo],["__scopeId","data-v-117f651c"]]),Xo={name:"ReaderNavButton",components:{PaginationNavButton:de},props:{value:{type:Number,required:!0},twoPages:{type:Boolean,default:!1}},computed:{...f(l,["isVertical"]),...P(l,{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:{..._(l,["setActivePage"]),onClick(){this.isVertical&&this.setActivePage(this.value,!0)}}};function Zo(e,t,a,p,c,o){const r=u("PaginationNavButton");return i(),h(r,{key:e.isVertical,disabled:o.disabled,class:R(["readerNavButton",o.classes]),title:o.title,to:e.toRoute,onClick:o.onClick},{default:d(()=>[b(w(a.value),1)]),_:1},8,["disabled","class","title","to","onClick"])}const Jo=k(Xo,[["render",Zo],["__scopeId","data-v-530fba8c"]]),$="prev",V="next",Qo={name:"ReaderNavToolbar",components:{PaginationSlider:gt,ReaderNavButton:Jo,PaginationToolbar:pt,ReaderBookChangeNavButton:Yo},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["activeSettings","isReadInReverse","isVertical"]),...P(l,{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:{..._(l,["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(V):e.shiftKey&&window.scrollY===0&&this.routeToDirection($);break;case"j":case"ArrowRight":this.routeToDirection(V);break;case"k":case"ArrowLeft":this.routeToDirection($);break;case",":this.routeToDirectionOne($);break;case".":this.routeToDirectionOne(V);break;case"n":this.routeToBook(V);break;case"p":this.routeToBook($);break}}}};function ea(e,t,a,p,c,o){const r=u("ReaderBookChangeNavButton"),g=u("ReaderNavButton"),m=u("PaginationSlider"),N=u("PaginationToolbar");return i(),h(Ge,null,{default:d(()=>[e.maxPage?T((i(),h(N,{key:0,id:"readerToolbarNav"},{default:d(()=>[n(r,{direction:o.bookPrev,narrow:!1},null,8,["direction"]),n(g,{value:o.min,"two-pages":o.twoPages},null,8,["value","two-pages"]),(i(),h(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]=A=>o.onSliderUpdate(A))},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)),[[re,e.showToolbars]]):S("",!0)]),_:1})}const ta=k(Qo,[["render",ea],["__scopeId","data-v-20fc0313"]]),oa={name:"MainReader",components:{BooksWindow:oo,ReaderEmpty:Go,ReaderNavToolbar:ta,ReaderTopToolbar:pe,ReaderSettingsDrawer:Oo,Unauthorized:at},data(){return{showToolbars:!1}},computed:{...f(D,["isAuthorized"]),...P(D,{user:e=>e.user}),...P(l,{empty:e=>e.empty,arc:e=>e.arc})},watch:{user(){this.loadReaderSettings()},isAuthorized(){this.loadReaderSettings()}},beforeMount(){this.reset(),this.loadReaderSettings()},methods:{..._(l,["loadReaderSettings","reset"])}},aa={key:0},sa={id:"readerContainer"};function ra(e,t,a,p,c,o){const r=u("ReaderTopToolbar"),g=u("BooksWindow"),m=u("ReaderNavToolbar"),N=u("ReaderEmpty"),A=u("ReaderSettingsDrawer"),me=u("Unauthorized");return e.isAuthorized?(i(),h(st,{key:0,id:"readerWrapper"},{default:d(()=>[e.empty?(i(),h(N,{key:1})):(i(),v("div",aa,[s("div",sa,[n(r),n(g),n(m)])])),n(A)]),_:1})):(i(),h(me,{key:1}))}const ya=k(oa,[["render",ra],["__scopeId","data-v-4f31abfa"]]);export{ya as default};
1
+ const __vite__fileDeps=["assets/pdf-doc-VIuFHQ5Z.js","assets/admin-drawer-panel-vQfT7tFo.js","assets/admin-drawer-panel-mne3FIj6.css","assets/main-D888wgNq.js","assets/main-Ztp855PW.css","assets/pdf-doc-CMzaSV_K.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{an as f,V as P,W as _,_ as k,Y as u,Z as i,X as h,$ as d,S as n,aP as C,aj as b,aH as w,ak as R,aJ as S,aF as v,aX as J,U as B,bB as ke,bC as be,as as F,bD as Q,bE as ee,aI as te,bF as oe,bG as _e,b6 as fe,aT as T,by as Pe,aG as O,br as ae,bH as ve,aO as s,b4 as we,al as Se,bI as ye,bJ as Ce,D as M,bK as Re,bL as Be,bM as Te,bN as De,bO as Ie,aQ as Le,aR as $e,aM as Ve,m as D,bP as Oe,ar as se,aU as W,bQ as Ne,aV as z,bR as Ae,bS as Ue,bj as Ee,am as xe,bT as Fe,aY as ze,bU as Me,bV as re,bm as We,bp as He,bW as qe,bX as Ge}from"./admin-drawer-panel-vQfT7tFo.js";import{b as l,c as Ke,_ as je,S as U,d as ne,e as Ye,h as Xe}from"./main-D888wgNq.js";import{d as Ze,b as Je,S as Qe,V as et,a as tt}from"./settings-drawer-B8NlM16d.js";import{P as ot,a as ie,U as at,V as st}from"./unauthorized-BEhuFi1m.js";import{b as le,V as ce}from"./VWindowItem--B3loLAX.js";import{a as rt}from"./VSelect-BNztcu1Z.js";import{V as nt,a as it,b as lt,c as ct}from"./VExpansionPanels-CH6E8s7q.js";import{V as I,a as E}from"./VRadioGroup-BC5CvPgU.js";import{V as L}from"./VCheckbox-BjSDxmSa.js";import{T as dt,M as ut,V as x,a as ht,P as de,b as gt,c as pt}from"./pagination-toolbar-BJg0iCY_.js";import"./copy-to-clipboard-DoUvDJVx.js";import"./VDialog-DqQgZayw.js";import"./change-password-dialog-onUsTVN5.js";import"./VTextField-CLXM8_Dv.js";import"./VSelectionControl-BlKP2Bmf.js";import"./VCheckboxBtn-DgL9kXWT.js";import"./VSlideGroup-psRbw8SA.js";import"./to-case-nry7wr4q.js";const mt={name:"BookChangeDrawer",props:{direction:{type:String,required:!0}},head(){if(this.isDrawerOpen)return this.prefetchLinks(this.params,this.computedDirection,!0)},computed:{...f(l,["isBTT"]),...P(l,{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:{..._(l,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute","bookChangeLocation","bookChangeCursorClass","bookChangeShow","bookChangeIcon"])}};function kt(e,t,a,p,c,o){const r=u("router-link");return o.show?(i(),h(Ze,{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:d(()=>[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:d(()=>[n(C,{class:"bookChangeIcon"},{default:d(()=>[b(w(e.icon),1)]),_:1})]),_:1},8,["class","to","aria-label","title"])]),_:1},8,["location","model-value","class"])):S("",!0)}const bt=k(mt,[["render",kt],["__scopeId","data-v-03e41a14"]]),_t={name:"BookChangeActivator",components:{BookChangeDrawer:bt},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:{..._(l,["setBookChangeFlag","normalizeDirection","bookChangeLocation","bookChangeCursorClass","bookChangeShow"])}};function ft(e,t,a,p,c,o){const r=u("BookChangeDrawer");return i(),v(B,null,[o.show?(i(),v("div",{key:0,class:R(["bookChangeColumn",{[o.positionClass]:!0,[o.cursorClass]:!0}]),onClick:t[0]||(t[0]=J(g=>e.setBookChangeFlag(a.direction),["stop"]))},null,2)):S("",!0),n(r,{direction:a.direction},null,8,["direction"])],64)}const Pt=k(_t,[["render",ft],["__scopeId","data-v-db3eb561"]]),vt={name:"LoadingPage",components:{Placeholder:ot},props:{twoPages:{type:Boolean,required:!0}}};function wt(e,t,a,p,c,o){const r=u("Placeholder");return i(),v("div",{class:R(["pageLoading",{twoPages:a.twoPages}])},[n(r,{class:"pagePlaceholder"})],2)}const St=k(vt,[["render",wt],["__scopeId","data-v-04027168"]]),H="unauthorized",yt={name:"ErrorPage",props:{twoPages:{type:Boolean,required:!0},type:{type:String,required:!0}},computed:{text(){return this.type===H?"Protected page":"Failed to load page"},icon(){return this.type===H?ke:be}}};function Ct(e,t,a,p,c,o){return i(),h(ie,{class:R(["pageError",{twoPages:a.twoPages}]),headline:o.text,icon:o.icon},null,8,["class","headline","icon"])}const Rt=k(yt,[["render",Ct],["__scopeId","data-v-417a4cab"]]),Bt={name:"ImgPage",props:{book:{type:Object,required:!0},src:{type:String,required:!0}},emits:["load","error"],computed:{...P(l,{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:{..._(l,["fitToClass"])}},Tt=["src"];function Dt(e,t,a,p,c,o){return i(),v("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,Tt)}const q=k(Bt,[["render",Dt],["__scopeId","data-v-559e2ecc"]]),G=Q(ee(()=>je(()=>import("./pdf-doc-VIuFHQ5Z.js"),__vite__mapDeps([0,1,2,3,4,5])))),It=333,Lt={name:"BookPage",components:{ErrorPage:Rt,LoadingPage:St,PDFDoc:G,ImgPage:q},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},data(){return{showProgress:!1,loaded:!1,error:!1}},computed:{...f(l,["isVertical"]),...P(l,{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 Ke(e)},component(){return this.book.fileType==="PDF"?G:q},settings(){return this.getSettings(this.book)}},mounted(){setTimeout(function(){this.loaded||(this.loading=!0)},It)},methods:{..._(l,["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}}},$t=["id","data-page"];function Vt(e,t,a,p,c,o){const r=u("ErrorPage"),g=u("LoadingPage");return i(),v("div",{id:`page${a.page}`,"data-page":a.page,class:"page",style:oe(o.style)},[c.error?(i(),h(r,{key:0,"two-pages":o.settings.twoPages,type:c.error},null,8,["two-pages","type"])):c.showProgress&&!c.loaded?(i(),h(g,{key:1,"two-pages":o.settings.twoPages},null,8,["two-pages"])):(i(),h(te(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,$t)}const ue=k(Lt,[["render",Vt],["__scopeId","data-v-87996fa1"]]),Ot=.5,Nt={name:"ScaleForScroll",emits:["click"],data(){return{mdiMagnifyMinusOutline:_e}},computed:{...P(l,{scale:e=>e.clientSettings.scale}),showReset(){return this.scale!=U},style(){return{cursor:this.scale==U?"zoom-in":"all-scroll"}}},methods:{..._(l,["setSettingsClient"]),clearSelection(){window.getSelection&&window.getSelection().removeAllRanges()},onDoubleClick(){this.clearSelection();const e=this.scale+Ot;this.setSettingsClient({scale:e})},scaleReset(){this.setSettingsClient({scale:U})}}};function At(e,t,a,p,c,o){const r=fe("drag-scroller");return T((i(),v("div",{class:"scaleForScroll",style:oe(o.style),onDblclick:t[0]||(t[0]=(...g)=>o.onDoubleClick&&o.onDoubleClick(...g))},[Pe(e.$slots,"default",{},void 0,!0),o.showReset?(i(),h(C,{key:0,class:"resetIcon",onClick:J(o.scaleReset,["stop"])},{default:d(()=>[b(w(c.mdiMagnifyMinusOutline),1)]),_:1},8,["onClick"])):S("",!0)],36)),[[r,,void 0,{onlyX:!0}]])}const he=k(Nt,[["render",At],["__scopeId","data-v-b24267c0"]]),Ut={name:"HorizontalPages",components:{BookPage:ue,ScaleForScroll:he},props:{book:{type:Object,required:!0},page:{type:Number,required:!0}},emits:["click"],computed:{...f(l,["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:{..._(l,["getSettings"])}};function Et(e,t,a,p,c,o){const r=u("BookPage"),g=u("ScaleForScroll");return i(),h(g,{class:"noWrap"},{default:d(()=>[o.showPageOne?(i(),h(r,{key:0,ref:"pageOne",book:a.book,page:o.pageOne,class:"horizontalPage"},null,8,["book","page"])):S("",!0),o.showPageTwo?(i(),h(r,{key:1,book:a.book,page:o.pageTwo,class:"horizontalPage"},null,8,["book","page"])):S("",!0)]),_:1})}const xt=k(Ut,[["render",Et],["__scopeId","data-v-9a560964"]]),Ft={name:"PageChangeLink",props:{direction:{type:String,required:!0}},head(){return this.prefetchLinks(this.params,this.computedDirection)},computed:{...f(l,["isVertical","isFirstPage","isLastPage"]),...P(l,{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:{..._(l,["getSettings","linkLabel","normalizeDirection","prefetchLinks","toRoute"])}};function zt(e,t,a,p,c,o){const r=u("router-link");return o.show?(i(),h(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 Mt=k(Ft,[["render",zt],["__scopeId","data-v-9ade7d96"]]),Wt=48,Ht=48,qt={name:"PagerHorizontal",components:{HorizontalPages:xt,PageChangeLink:Mt},props:{book:{type:Object,required:!0}},data(){return{activePage:0,pages:[]}},computed:{...f(l,["isReadInReverse"]),...P(l,{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:{..._(l,["getSettings","setBookChangeFlag","setActivePage"]),setPages(){const e=Math.max(this.activePage-Wt,0),t=Math.min(this.activePage+Ht,this.book.maxPage),a=ne.range(e,t+1);this.pages=a}}};function Gt(e,t,a,p,c,o){const r=u("PageChangeLink"),g=u("HorizontalPages");return i(),h(ce,{"show-arrows":"",continuous:"","model-value":o.windowIndex,reverse:e.isReadInReverse},{prev:d(()=>[n(r,{direction:"prev"})]),next:d(()=>[n(r,{direction:"next"})]),default:d(()=>[(i(!0),v(B,null,O(c.pages,m=>(i(),h(le,{key:`c/${a.book.pk}/${m}`,class:"windowItem",disabled:"",eager:m>=e.storePage-1&&m<=e.storePage+2,"model-value":m,transition:!0},{default:d(()=>[n(g,{book:a.book,page:m},null,8,["book","page"])]),_:2},1032,["eager","model-value"]))),128))]),_:1},8,["model-value","reverse"])}const K=k(qt,[["render",Gt],["__scopeId","data-v-e04bbc00"]]),Kt=12,j=250,jt={name:"PagerVertical",components:{BookPage:ue,ScaleForScroll:he},props:{book:{type:Object,required:!0}},data(){return{innerHeight:window.innerHeight,innerWidth:window.innerWidth,intersectorOn:!1,programmaticScroll:!1}},computed:{...P(l,{storePage:e=>e.page,showToolbars:e=>e.showToolbars}),...ae(l,["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=ne.range(0,e);return this.readInReverse&&t.reverse(),t},visibleItems(){var e;return Math.min(((e=this.book)==null?void 0:e.maxPage)??0,Kt)}},watch:{storePage(e){this.reactWithScroll&&this.scrollToPage(e)}},mounted(){window.addEventListener("resize",this.onResize),setTimeout(()=>{this.scrollToPage(this.storePage)},j)},beforeUnmount(){window.removeEventListener("resize",this.onResize)},methods:{..._(l,["setActivePage","setBookChangeFlag","getSettings"]),onIntersect(e,t){if(e&&this.intersectorOn){const p=+t[0].target.dataset.page;this.setActivePage(p,!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},j)},onResize(){this.innerHeight=window.innerHeight,this.innerWidth=window.innerWidth}}},Yt=["data-page"];function Xt(e,t,a,p,c,o){const r=u("BookPage"),g=u("ScaleForScroll");return i(),h(g,null,{default:d(()=>[T((i(),h(rt,{id:"verticalScroll",key:o.readInReverse,ref:"verticalScroll",items:o.items,height:c.innerHeight,width:c.innerWidth},{default:d(({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,Yt),[[we,{handler:o.onIntersect,options:{threshold:[.75]}},void 0,{quiet:!0}]])]),_:1},8,["items","height","width"])),[[ve,o.onScroll,"#verticalScroll"]])]),_:1})}const Y=k(jt,[["render",Xt],["__scopeId","data-v-ef3b4ade"]]),X=Q(ee(()=>"@/components/reader/pager/pager-full-pdf.vue")),Zt={name:"PagerSelector",components:{PagerHorizontal:K,PagerPDF:X,PagerVertical:Y},props:{book:{type:Object,required:!0}},emits:["click"],head(){return this.prefetchBook(this.book)},computed:{...f(l,["isVertical","cacheBook"]),...P(l,{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?X:this.isVertical?Y:K}},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:{..._(l,["getSettings","setActivePage","prefetchBook"])}};function Jt(e,t,a,p,c,o){return i(),h(te(o.component),{book:a.book},null,8,["book"])}const Qt=k(Zt,[["render",Jt]]),eo={name:"BooksWindow",components:{BookChangeActivator:Pt,Pager:Qt},computed:{...f(l,["isBTT"]),...P(l,{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({params:e.params})}},beforeMount(){this.setBookChangeFlag(),this.loadBooks({})},methods:{..._(l,["setBookChangeFlag","loadBooks","toggleToolbars"]),click(){this.toggleToolbars(),this.setBookChangeFlag()},eager(e){return this.bookChange&&this.bookRoutes[this.bookChange]&&this.bookRoutes[this.bookChange].pk===e}}};function to(e,t,a,p,c,o){const r=u("BookChangeActivator"),g=u("Pager");return i(),h(ce,{id:"booksWindow",direction:"vertical","model-value":e.currentBookPk,reverse:e.isBTT,"show-arrows":"",onClick:e.toggleToolbars},{prev:d(()=>[n(r,{direction:"prev"})]),next:d(()=>[n(r,{direction:"next"})]),default:d(()=>[(i(!0),v(B,null,O(e.books,m=>(i(),h(le,{key:`c/${m.pk}`,class:"windowItem",disabled:"",eager:o.eager(m.pk),value:m.pk,transition:!0},{default:d(()=>[n(g,{book:m,onClick:o.click},null,8,["book","onClick"])]),_:2},1032,["eager","value"]))),128))]),_:1},8,["model-value","reverse","onClick"])}const oo=k(eo,[["render",to],["__scopeId","data-v-aeb79f89"]]),ao={name:"DownloadPanel",components:{DrawerItem:Se},data(){return{mdiDownload:ye,mdiFileImage:Ce}},computed:{...f(l,["activeTitle","routeParams"]),...P(l,{currentBook:e=>{var t;return(t=e.books)==null?void 0:t.current},storePage:e=>e.page}),downloadURL(){return Ye(this.currentBook)},filename(){var e;return(e=this.currentBook)==null?void 0:e.filename},pageSrc(){const{pk:e,mtime:t}=this.currentBook;return Xe({pk:e,page:this.storePage,mtime:t})},pageName(){return`${this.activeTitle} - page ${this.storePage}.jpg`},downloadPageTitle(){return`Download Page ${this.storePage}`}},methods:{..._(M,["downloadIOSPWAFix"]),downloadPage(){this.downloadIOSPWAFix(this.pageSrc,this.pageName)},downloadBook(){this.downloadIOSPWAFix(this.downloadURL,this.filename)}}},so={key:0,id:"downloadPanel"};function ro(e,t,a,p,c,o){const r=u("DrawerItem");return e.currentBook?(i(),v("div",so,[n(r,{"prepend-icon":c.mdiFileImage,title:o.downloadPageTitle,onClick:o.downloadPage},null,8,["prepend-icon","title","onClick"]),n(r,{"prepend-icon":c.mdiDownload,title:"Download Book",onClick:o.downloadBook},null,8,["prepend-icon","onClick"])])):S("",!0)}const no=k(ao,[["render",ro],["__scopeId","data-v-e4f5bb93"]]),io={name:"KeyboardShortcutsPanel",data(){return{mdiMenuLeft:Re,mdiMenuRight:Be,mdiKeyboardOutline:Te,mdiKeyboardSpace:De,mdiAppleKeyboardShift:Ie}},computed:{...f(M,["isMobile"])}},y=e=>(Le("data-v-a8b4ac47"),e=e(),$e(),e),lo=y(()=>s("h4",null,"Navigation",-1)),co={class:"highlight-table"},uo=y(()=>s("td",null,"Previous page",-1)),ho=y(()=>s("td",null,"Next page",-1)),go=y(()=>s("tr",null,[s("td",null,","),s("td",null,[b("Next "),s("em",null,"only"),b(" one page in two page mode.")])],-1)),po=y(()=>s("tr",null,[s("td",null,"."),s("td",null,[b("Previous "),s("em",null,"only"),b(" one page in two page mode.")])],-1)),mo=y(()=>s("tr",null,[s("td",null,"p"),s("td",null,"Previous Book")],-1)),ko=y(()=>s("tr",null,[s("td",null,"n"),s("td",null,"Next Book")],-1)),bo=y(()=>s("tr",null,[s("td",null,"esc"),s("td",null,"Close book")],-1)),_o=y(()=>s("h4",null,"Fit Page To",-1)),fo=y(()=>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=y(()=>s("h4",null,"Other",-1)),vo=y(()=>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 wo(e,t,a,p,c,o){return e.isMobile?S("",!0):(i(),h(ct,{key:0},{default:d(()=>[n(nt,{id:"readerKeyboardShortcuts"},{default:d(()=>[n(it,{id:"shortcutsTitle"},{default:d(()=>[n(C,{id:"keyboardIcon"},{default:d(()=>[b(w(c.mdiKeyboardOutline),1)]),_:1}),b("Keyboard Shortcuts ")]),_:1}),n(lt,null,{default:d(()=>[lo,s("table",co,[s("tbody",null,[s("tr",null,[s("td",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiMenuLeft),1)]),_:1}),b(", j, "),s("div",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiAppleKeyboardShift),1)]),_:1}),n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiKeyboardSpace),1)]),_:1})])]),uo]),s("tr",null,[s("td",null,[n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiMenuRight),1)]),_:1}),b(", k, "),n(C,{class:"keyIcon",density:"compact"},{default:d(()=>[b(w(c.mdiKeyboardSpace),1)]),_:1})]),ho]),go,po,mo,ko,bo])]),_o,fo,Po,vo]),_:1})]),_:1})]),_:1}))}const So=k(io,[["render",wo],["__scopeId","data-v-a8b4ac47"]]),ge=["fitTo","readingDirection","twoPages"];Object.freeze(ge);const yo={name:"ReaderSettingsPanel",data(){return{isGlobalScope:!1,mdiOpenInNew:Ve,openDelay:2e3}},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["isVertical","isPDF","cacheBook"]),...P(l,{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 p of ge){const c=(a=e.books)==null?void 0:a.current.settings[p];if(!e.choices.nullValues.has(c))return!1}return!0},bookInBrowserURL(e){var t,a;return(t=e.books)!=null&&t.current?Oe((a=e.books)==null?void 0:a.current):""},finishOnLastPage:e=>e.readerSettings.finishOnLastPage}),...ae(l,["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:{..._(l,["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)}}},Co={id:"readerScopedSettings",class:"readerDrawerItem"},Ro=["href"];function Bo(e,t,a,p,c,o){return i(),v(B,null,[n(E,{modelValue:c.isGlobalScope,"onUpdate:modelValue":t[0]||(t[0]=r=>c.isGlobalScope=r),class:"scopeRadioButton readerDrawerItem",density:"compact",label:"Scope","hide-details":"auto"},{default:d(()=>[n(I,{label:"Only this comic",value:!1}),n(I,{label:"Default for all comics",value:!0})]),_:1},8,["modelValue"]),n(Ne,null,{default:d(()=>[s("div",Co,[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:d(()=>[(i(!0),v(B,null,O(o.fitToChoices,r=>(i(),h(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),n(L,{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:d(()=>[(i(!0),v(B,null,O(o.readingDirectionChoices,r=>(i(),h(I,{key:r.value,label:r.title,value:r.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"]),c.isGlobalScope?S("",!0):T((i(),h(se,{key:0,id:"clearSettingsButton",disabled:e.isClearSettingsButtonDisabled,onClick:e.clearSettingsLocal},{default:d(()=>[b(" Clear Settings ")]),_:1},8,["disabled","onClick"])),[[W,{openDelay:c.openDelay,text:"Use the default settings for all comics for this comic"}]])])]),_:1}),n(z),n(L,{class:"readerDrawerItem","model-value":e.finishOnLastPage,density:"compact",label:"Finish Book On Last Page","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[4]||(t[4]=r=>o.settingsDialogChanged({finishOnLastPage:r}))},null,8,["model-value"]),n(L,{"model-value":e.selectedSettings.readRtlInReverse,class:"readerDrawerItem",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"]),T(n(L,{"model-value":e.cacheBook,class:"readerDrawerItem cacheBook",density:"compact",disabled:o.disableCacheBook,label:"Cache Entire Book","hide-details":"auto","true-value":!0,"onUpdate:modelValue":t[6]||(t[6]=r=>e.setSettingsClient({cacheBook:r}))},null,8,["model-value","disabled"]),[[W,{openDelay:c.openDelay,text:"Cache all pages from this book in the browser"}]]),e.isPDF?(i(),v("a",{key:0,id:"readPDFInBrowser",class:"readerDrawerItem",href:e.bookInBrowserURL,target:"_blank"},[n(C,null,{default:d(()=>[b(w(c.mdiOpenInNew),1)]),_:1}),b("Read PDF in Browser ")],8,Ro)):S("",!0)],64)}const To=k(yo,[["render",Bo],["__scopeId","data-v-3e689883"]]),Do={name:"ReaderSettingsSuperPanel",components:{DownloadPanel:no,ReaderKeyboardShortcutsPanel:So,ReaderSettingsPanel:To}};function Io(e,t,a,p,c,o){const r=u("ReaderSettingsPanel"),g=u("ReaderKeyboardShortcutsPanel"),m=u("DownloadPanel");return i(),v(B,null,[n(r),n(z),n(g),n(z),n(m)],64)}const Lo=k(Do,[["render",Io]]),$o={name:"ReaderSettingsDrawer",components:{SettingsDrawer:Je,ReaderSettingsSuperPanel:Lo}};function Vo(e,t,a,p,c,o){const r=u("ReaderSettingsSuperPanel"),g=u("SettingsDrawer");return i(),h(g,{title:"Reader",temporary:"","disable-resize-watcher":""},{panel:d(()=>[n(r)]),_:1})}const Oo=k($o,[["render",Vo]]),Z={a:Ue,f:Ee,s:xe,v:Fe},No={a:"Story Arc",f:"Folder",s:"Series",v:"Volume"},Ao={name:"ReaderArcSelect",components:{ToolbarSelect:dt},computed:{...P(l,{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 p={value:a,title:a.name,group:a.group,subtitle:No[a.group],prependIcon:Z[a.group]};t.push(p)}return t}})},methods:{..._(l,["loadBooks"]),arcIcon(e){return Z[e]},checkIcon(e){return e===this.arc?Ae:""},onUpdate(e){const t={group:e.group,pks:e.pks};this.loadBooks({arc:t})}}},Uo={id:"arcPos"};function Eo(e,t,a,p,c,o){const r=u("ToolbarSelect");return i(),h(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:d(({item:g,props:m})=>[n(ze,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:d(({item:g,props:m})=>[n(C,F({size:"large"},m,{class:"arcSelectIcon"}),{default:d(()=>[b(w(o.arcIcon(g.raw.group)),1)]),_:2},1040),s("span",Uo,w(e.arc.index)+" / "+w(e.arc.count),1)]),_:1},8,["model-value","items","disabled","onUpdate:modelValue"])}const xo=k(Ao,[["render",Eo],["__scopeId","data-v-2b466f8a"]]),Fo={name:"ReaderTitleToolbar",components:{MetadataDialog:ut,ReaderArcSelect:xo,SettingsDrawerButton:Qe},data(){return{mdiClose:Me,routeChanged:!1}},head(){return{meta:[{hid:"description",name:"description",content:`reader ${this.activeTitle} page ${this.storePage}`}]}},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["activeTitle","closeBookRoute"]),...P(l,{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"]),..._(l,["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}}}},zo={id:"title"},Mo={key:0,id:"subtitle"};function Wo(e,t,a,p,c,o){const r=u("ReaderArcSelect"),g=u("MetadataDialog"),m=u("SettingsDrawerButton");return i(),h(He,null,{default:d(()=>[T(n(tt,{id:"readerToolbarTop",density:"compact","extension-height":o.extensionHeight},We({default:d(()=>[n(x,null,{default:d(()=>[n(se,{ref:"closeBook",class:"closeBook",to:e.closeBookRoute,size:"large",density:"compact",variant:"plain",onClick:o.onCloseBook},{default:d(()=>[b(" close book ")]),_:1},8,["to","onClick"])]),_:1}),n(ht),e.empty?S("",!0):(i(),h(x,{key:0},{default:d(()=>[n(r),n(g,{ref:"metadataDialog",group:"c",toolbar:!0,book:e.currentBook},null,8,["book"])]),_:1})),n(x,null,{default:d(()=>[n(m)]),_:1})]),_:2},[o.title?{name:"extension",fn:d(()=>[n(et,{class:"readerTitle"},{default:d(()=>[s("div",zo,w(o.title),1),e.subtitle?(i(),v("div",Mo,w(e.subtitle),1)):S("",!0)]),_:1})]),key:"0"}:void 0]),1032,["extension-height"]),[[re,e.showToolbars]])]),_:1})}const pe=k(Fo,[["render",Wo],["__scopeId","data-v-e9e8347c"]]),Ho={name:"ReaderEmpty",components:{ReaderTopToolbar:pe},data(){return{mdiBookRemoveOutline:qe}}};function qo(e,t,a,p,c,o){const r=u("ReaderTopToolbar");return i(),v(B,null,[n(r),n(ie,{class:"empty",headline:"Book Not Found",title:"Close the reader and find another book",icon:c.mdiBookRemoveOutline},null,8,["icon"])],64)}const Go=k(Ho,[["render",qo],["__scopeId","data-v-65d65e48"]]),Ko={name:"ReaderBookChangeNavButton",components:{PaginationNavButton:de},props:{direction:{type:String,required:!0}},computed:{...f(l,["isBTT"]),...P(l,{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:{..._(l,["bookChangeIcon"])}};function jo(e,t,a,p,c,o){const r=u("PaginationNavButton");return e.toRoute?(i(),h(r,{key:0,class:R(o.classes),icon:"",variant:"plain",title:o.title,to:e.toRoute},{default:d(()=>[n(C,null,{default:d(()=>[b(w(o.icon),1)]),_:1})]),_:1},8,["class","title","to"])):S("",!0)}const Yo=k(Ko,[["render",jo],["__scopeId","data-v-117f651c"]]),Xo={name:"ReaderNavButton",components:{PaginationNavButton:de},props:{value:{type:Number,required:!0},twoPages:{type:Boolean,default:!1}},computed:{...f(l,["isVertical"]),...P(l,{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:{..._(l,["setActivePage"]),onClick(){this.isVertical&&this.setActivePage(this.value,!0)}}};function Zo(e,t,a,p,c,o){const r=u("PaginationNavButton");return i(),h(r,{key:e.isVertical,disabled:o.disabled,class:R(["readerNavButton",o.classes]),title:o.title,to:e.toRoute,onClick:o.onClick},{default:d(()=>[b(w(a.value),1)]),_:1},8,["disabled","class","title","to","onClick"])}const Jo=k(Xo,[["render",Zo],["__scopeId","data-v-530fba8c"]]),$="prev",V="next",Qo={name:"ReaderNavToolbar",components:{PaginationSlider:gt,ReaderNavButton:Jo,PaginationToolbar:pt,ReaderBookChangeNavButton:Yo},computed:{...f(D,["isAuthDialogOpen"]),...f(l,["activeSettings","isReadInReverse","isVertical"]),...P(l,{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:{..._(l,["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(V):e.shiftKey&&window.scrollY===0&&this.routeToDirection($);break;case"j":case"ArrowRight":this.routeToDirection(V);break;case"k":case"ArrowLeft":this.routeToDirection($);break;case",":this.routeToDirectionOne($);break;case".":this.routeToDirectionOne(V);break;case"n":this.routeToBook(V);break;case"p":this.routeToBook($);break}}}};function ea(e,t,a,p,c,o){const r=u("ReaderBookChangeNavButton"),g=u("ReaderNavButton"),m=u("PaginationSlider"),N=u("PaginationToolbar");return i(),h(Ge,null,{default:d(()=>[e.maxPage?T((i(),h(N,{key:0,id:"readerToolbarNav"},{default:d(()=>[n(r,{direction:o.bookPrev,narrow:!1},null,8,["direction"]),n(g,{value:o.min,"two-pages":o.twoPages},null,8,["value","two-pages"]),(i(),h(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]=A=>o.onSliderUpdate(A))},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)),[[re,e.showToolbars]]):S("",!0)]),_:1})}const ta=k(Qo,[["render",ea],["__scopeId","data-v-20fc0313"]]),oa={name:"MainReader",components:{BooksWindow:oo,ReaderEmpty:Go,ReaderNavToolbar:ta,ReaderTopToolbar:pe,ReaderSettingsDrawer:Oo,Unauthorized:at},data(){return{showToolbars:!1}},computed:{...f(D,["isAuthorized"]),...P(D,{user:e=>e.user}),...P(l,{empty:e=>e.empty,arc:e=>e.arc})},watch:{user(){this.loadReaderSettings()},isAuthorized(){this.loadReaderSettings()}},beforeMount(){this.reset(),this.loadReaderSettings()},methods:{..._(l,["loadReaderSettings","reset"])}},aa={key:0},sa={id:"readerContainer"};function ra(e,t,a,p,c,o){const r=u("ReaderTopToolbar"),g=u("BooksWindow"),m=u("ReaderNavToolbar"),N=u("ReaderEmpty"),A=u("ReaderSettingsDrawer"),me=u("Unauthorized");return e.isAuthorized?(i(),h(st,{key:0,id:"readerWrapper"},{default:d(()=>[e.empty?(i(),h(N,{key:1})):(i(),v("div",aa,[s("div",sa,[n(r),n(g),n(m)])])),n(A)]),_:1})):(i(),h(me,{key:1}))}const ya=k(oa,[["render",ra],["__scopeId","data-v-4f31abfa"]]);export{ya as default};