@yui540/comimi 0.1.1 → 0.2.1
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.
- package/LICENSE +21 -0
- package/README.md +3 -1
- package/dist/components/controls-dock.d.ts +10 -2
- package/dist/components/controls-dock.d.ts.map +1 -1
- package/dist/components/controls-dock.styles.d.ts +1 -1
- package/dist/components/controls-dock.styles.d.ts.map +1 -1
- package/dist/components/inputs.styles.d.ts +1 -1
- package/dist/components/inputs.styles.d.ts.map +1 -1
- package/dist/components/menu-panel.d.ts +6 -2
- package/dist/components/menu-panel.d.ts.map +1 -1
- package/dist/components/menu-panel.styles.d.ts +1 -1
- package/dist/components/menu-panel.styles.d.ts.map +1 -1
- package/dist/components/page-layout.d.ts +1 -0
- package/dist/components/page-layout.d.ts.map +1 -1
- package/dist/components/page-stage.d.ts +2 -1
- package/dist/components/page-stage.d.ts.map +1 -1
- package/dist/components/page-stage.styles.d.ts +1 -1
- package/dist/components/page-stage.styles.d.ts.map +1 -1
- package/dist/components/rabbit-mascot.d.ts +2 -1
- package/dist/components/rabbit-mascot.d.ts.map +1 -1
- package/dist/components/rabbit-mascot.styles.d.ts +1 -1
- package/dist/components/rabbit-mascot.styles.d.ts.map +1 -1
- package/dist/components/scroll-fade.d.ts +2 -0
- package/dist/components/scroll-fade.d.ts.map +1 -0
- package/dist/components/scroll-fade.styles.d.ts +2 -0
- package/dist/components/scroll-fade.styles.d.ts.map +1 -0
- package/dist/components/settings-panel.d.ts +2 -0
- package/dist/components/settings-panel.d.ts.map +1 -1
- package/dist/components/settings-panel.styles.d.ts +1 -1
- package/dist/components/settings-panel.styles.d.ts.map +1 -1
- package/dist/components/splash-screen.d.ts +2 -1
- package/dist/components/splash-screen.d.ts.map +1 -1
- package/dist/components/splash-screen.styles.d.ts +1 -1
- package/dist/components/splash-screen.styles.d.ts.map +1 -1
- package/dist/components/viewer-root.styles.d.ts +1 -1
- package/dist/components/viewer-root.styles.d.ts.map +1 -1
- package/dist/core/manga-viewer-core.d.ts +2 -1
- package/dist/core/manga-viewer-core.d.ts.map +1 -1
- package/dist/defaults.d.ts.map +1 -1
- package/dist/i18n/i18n.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +653 -317
- package/dist/manga-viewer.global.js +225 -47
- package/dist/renderer/renderer-callbacks.d.ts +1 -1
- package/dist/renderer/renderer-callbacks.d.ts.map +1 -1
- package/dist/renderer/viewer-renderer.d.ts +4 -2
- package/dist/renderer/viewer-renderer.d.ts.map +1 -1
- package/dist/styles/style-registry.d.ts.map +1 -1
- package/dist/types.d.ts +20 -3
- package/dist/types.d.ts.map +1 -1
- package/docs/USAGE.md +169 -12
- package/locales/en.json +6 -1
- package/locales/id.json +42 -0
- package/locales/ja.json +6 -1
- package/locales/ko.json +42 -0
- package/locales/th.json +42 -0
- package/locales/zh-CN.json +42 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var e = {
|
|
|
6
6
|
layoutMode: "inline",
|
|
7
7
|
autoPageTurnIntervalMs: 5e3,
|
|
8
8
|
pageTurnAnimation: !0,
|
|
9
|
+
backgroundColor: "white",
|
|
9
10
|
zoom: {
|
|
10
11
|
min: 1,
|
|
11
12
|
max: 4,
|
|
@@ -67,11 +68,14 @@ var o = {
|
|
|
67
68
|
"pageMode.single": "Single",
|
|
68
69
|
"pageMode.spread": "Spread",
|
|
69
70
|
"layout.inline": "Standard",
|
|
70
|
-
"layout.
|
|
71
|
+
"layout.wide": "Wide",
|
|
71
72
|
"layout.browserFullscreen": "Fullscreen",
|
|
72
73
|
"settings.title": "Settings",
|
|
73
74
|
"settings.cover": "Has cover",
|
|
74
75
|
"settings.direction": "Page turn direction",
|
|
76
|
+
"settings.backgroundColor": "Background color",
|
|
77
|
+
"settings.backgroundColor.white": "White",
|
|
78
|
+
"settings.backgroundColor.black": "Black",
|
|
75
79
|
"settings.interval": "Auto play interval",
|
|
76
80
|
"settings.interval.unit": "s",
|
|
77
81
|
"settings.animation": "Page turn animation",
|
|
@@ -80,6 +84,7 @@ var o = {
|
|
|
80
84
|
"menu.openShortcuts": "Keyboard shortcuts",
|
|
81
85
|
"menu.openPages": "Page list",
|
|
82
86
|
"menu.back": "Back",
|
|
87
|
+
"pageList.htmlContent": "HTML content",
|
|
83
88
|
"shortcut.section.page": "Page navigation",
|
|
84
89
|
"shortcut.section.viewMode": "View mode",
|
|
85
90
|
"shortcut.section.general": "General",
|
|
@@ -87,10 +92,52 @@ var o = {
|
|
|
87
92
|
"shortcut.moveRight": "Move right",
|
|
88
93
|
"shortcut.autoPageTurnLabel": "Auto play",
|
|
89
94
|
"shortcut.pageModeToggle": "Toggle spread",
|
|
95
|
+
"shortcut.overlayToggle": "Toggle overlay",
|
|
90
96
|
"seek.previewAlt": "Preview of page {{page}}",
|
|
91
97
|
loading: "Loading",
|
|
92
98
|
"error.pageRequestFailed": "Request failed for page {{page}}"
|
|
93
99
|
}, s = {
|
|
100
|
+
"overlay.autoPageTurn": "Putar otomatis",
|
|
101
|
+
"overlay.layout": "Mode tampilan",
|
|
102
|
+
"overlay.settings": "Pengaturan",
|
|
103
|
+
"overlay.menu": "Menu",
|
|
104
|
+
"overlay.centerHint.desktop": "Klik bagian tengah untuk menutup",
|
|
105
|
+
"overlay.centerHint.mobile": "Ketuk bagian tengah untuk menutup",
|
|
106
|
+
"splash.loading": "Memulai viewer",
|
|
107
|
+
"autoplay.start": "Putar otomatis dimulai",
|
|
108
|
+
"autoplay.stop": "Putar otomatis dihentikan",
|
|
109
|
+
"pageMode.single": "Satu halaman",
|
|
110
|
+
"pageMode.spread": "Dua halaman",
|
|
111
|
+
"layout.inline": "Standar",
|
|
112
|
+
"layout.wide": "Lebar",
|
|
113
|
+
"layout.browserFullscreen": "Layar penuh",
|
|
114
|
+
"settings.title": "Pengaturan",
|
|
115
|
+
"settings.cover": "Ada sampul",
|
|
116
|
+
"settings.direction": "Arah balik halaman",
|
|
117
|
+
"settings.backgroundColor": "Warna latar",
|
|
118
|
+
"settings.backgroundColor.white": "Putih",
|
|
119
|
+
"settings.backgroundColor.black": "Hitam",
|
|
120
|
+
"settings.interval": "Interval putar otomatis",
|
|
121
|
+
"settings.interval.unit": "dtk",
|
|
122
|
+
"settings.animation": "Animasi balik halaman",
|
|
123
|
+
"settings.direction.rtl": "Kanan",
|
|
124
|
+
"settings.direction.ltr": "Kiri",
|
|
125
|
+
"menu.openShortcuts": "Pintasan keyboard",
|
|
126
|
+
"menu.openPages": "Daftar halaman",
|
|
127
|
+
"menu.back": "Kembali",
|
|
128
|
+
"pageList.htmlContent": "Konten HTML",
|
|
129
|
+
"shortcut.section.page": "Navigasi halaman",
|
|
130
|
+
"shortcut.section.viewMode": "Mode tampilan",
|
|
131
|
+
"shortcut.section.general": "Umum",
|
|
132
|
+
"shortcut.moveLeft": "Geser kiri",
|
|
133
|
+
"shortcut.moveRight": "Geser kanan",
|
|
134
|
+
"shortcut.autoPageTurnLabel": "Putar otomatis",
|
|
135
|
+
"shortcut.pageModeToggle": "Alih dua halaman",
|
|
136
|
+
"shortcut.overlayToggle": "Alih overlay",
|
|
137
|
+
"seek.previewAlt": "Pratinjau halaman {{page}}",
|
|
138
|
+
loading: "Memuat",
|
|
139
|
+
"error.pageRequestFailed": "Permintaan halaman {{page}} gagal"
|
|
140
|
+
}, c = {
|
|
94
141
|
"overlay.autoPageTurn": "自動再生",
|
|
95
142
|
"overlay.layout": "表示モード",
|
|
96
143
|
"overlay.settings": "設定",
|
|
@@ -103,11 +150,14 @@ var o = {
|
|
|
103
150
|
"pageMode.single": "1ページ",
|
|
104
151
|
"pageMode.spread": "見開き",
|
|
105
152
|
"layout.inline": "標準",
|
|
106
|
-
"layout.
|
|
153
|
+
"layout.wide": "ワイド",
|
|
107
154
|
"layout.browserFullscreen": "全画面",
|
|
108
155
|
"settings.title": "設定",
|
|
109
156
|
"settings.cover": "表紙あり",
|
|
110
157
|
"settings.direction": "ページ移動方向",
|
|
158
|
+
"settings.backgroundColor": "背景色",
|
|
159
|
+
"settings.backgroundColor.white": "白",
|
|
160
|
+
"settings.backgroundColor.black": "黒",
|
|
111
161
|
"settings.interval": "自動再生の秒数",
|
|
112
162
|
"settings.interval.unit": "秒",
|
|
113
163
|
"settings.animation": "ページ移動アニメーション",
|
|
@@ -116,6 +166,7 @@ var o = {
|
|
|
116
166
|
"menu.openShortcuts": "キーボードショートカット",
|
|
117
167
|
"menu.openPages": "ページ一覧",
|
|
118
168
|
"menu.back": "もどる",
|
|
169
|
+
"pageList.htmlContent": "HTMLコンテンツ",
|
|
119
170
|
"shortcut.section.page": "ページ移動",
|
|
120
171
|
"shortcut.section.viewMode": "表示モード",
|
|
121
172
|
"shortcut.section.general": "全般",
|
|
@@ -123,16 +174,144 @@ var o = {
|
|
|
123
174
|
"shortcut.moveRight": "右に移動",
|
|
124
175
|
"shortcut.autoPageTurnLabel": "自動再生",
|
|
125
176
|
"shortcut.pageModeToggle": "見開き切り替え",
|
|
177
|
+
"shortcut.overlayToggle": "オーバーレイ切り替え",
|
|
126
178
|
"seek.previewAlt": "{{page}}ページのプレビュー",
|
|
127
179
|
loading: "読み込み中",
|
|
128
180
|
"error.pageRequestFailed": "{{page}}ページのリクエストに失敗しました"
|
|
129
|
-
},
|
|
181
|
+
}, l = {
|
|
182
|
+
"overlay.autoPageTurn": "자동 재생",
|
|
183
|
+
"overlay.layout": "표시 모드",
|
|
184
|
+
"overlay.settings": "설정",
|
|
185
|
+
"overlay.menu": "메뉴",
|
|
186
|
+
"overlay.centerHint.desktop": "화면 중앙을 클릭하여 닫기",
|
|
187
|
+
"overlay.centerHint.mobile": "화면 중앙을 탭하여 닫기",
|
|
188
|
+
"splash.loading": "뷰어를 시작 중",
|
|
189
|
+
"autoplay.start": "자동 재생 시작",
|
|
190
|
+
"autoplay.stop": "자동 재생 정지",
|
|
191
|
+
"pageMode.single": "한 페이지",
|
|
192
|
+
"pageMode.spread": "양면 보기",
|
|
193
|
+
"layout.inline": "표준",
|
|
194
|
+
"layout.wide": "와이드",
|
|
195
|
+
"layout.browserFullscreen": "전체 화면",
|
|
196
|
+
"settings.title": "설정",
|
|
197
|
+
"settings.cover": "표지 있음",
|
|
198
|
+
"settings.direction": "페이지 이동 방향",
|
|
199
|
+
"settings.backgroundColor": "배경색",
|
|
200
|
+
"settings.backgroundColor.white": "흰색",
|
|
201
|
+
"settings.backgroundColor.black": "검정",
|
|
202
|
+
"settings.interval": "자동 재생 간격",
|
|
203
|
+
"settings.interval.unit": "초",
|
|
204
|
+
"settings.animation": "페이지 넘김 애니메이션",
|
|
205
|
+
"settings.direction.rtl": "오른쪽",
|
|
206
|
+
"settings.direction.ltr": "왼쪽",
|
|
207
|
+
"menu.openShortcuts": "키보드 단축키",
|
|
208
|
+
"menu.openPages": "페이지 목록",
|
|
209
|
+
"menu.back": "뒤로",
|
|
210
|
+
"pageList.htmlContent": "HTML 콘텐츠",
|
|
211
|
+
"shortcut.section.page": "페이지 이동",
|
|
212
|
+
"shortcut.section.viewMode": "표시 모드",
|
|
213
|
+
"shortcut.section.general": "일반",
|
|
214
|
+
"shortcut.moveLeft": "왼쪽으로 이동",
|
|
215
|
+
"shortcut.moveRight": "오른쪽으로 이동",
|
|
216
|
+
"shortcut.autoPageTurnLabel": "자동 재생",
|
|
217
|
+
"shortcut.pageModeToggle": "양면 보기 전환",
|
|
218
|
+
"shortcut.overlayToggle": "오버레이 전환",
|
|
219
|
+
"seek.previewAlt": "{{page}}페이지 미리보기",
|
|
220
|
+
loading: "로딩 중",
|
|
221
|
+
"error.pageRequestFailed": "{{page}}페이지 요청 실패"
|
|
222
|
+
}, ee = {
|
|
223
|
+
"overlay.autoPageTurn": "เล่นอัตโนมัติ",
|
|
224
|
+
"overlay.layout": "โหมดการแสดงผล",
|
|
225
|
+
"overlay.settings": "ตั้งค่า",
|
|
226
|
+
"overlay.menu": "เมนู",
|
|
227
|
+
"overlay.centerHint.desktop": "คลิกตรงกลางเพื่อปิด",
|
|
228
|
+
"overlay.centerHint.mobile": "แตะตรงกลางเพื่อปิด",
|
|
229
|
+
"splash.loading": "กำลังเปิดโปรแกรมอ่าน",
|
|
230
|
+
"autoplay.start": "เริ่มเล่นอัตโนมัติแล้ว",
|
|
231
|
+
"autoplay.stop": "หยุดเล่นอัตโนมัติแล้ว",
|
|
232
|
+
"pageMode.single": "หน้าเดียว",
|
|
233
|
+
"pageMode.spread": "สองหน้า",
|
|
234
|
+
"layout.inline": "มาตรฐาน",
|
|
235
|
+
"layout.wide": "กว้าง",
|
|
236
|
+
"layout.browserFullscreen": "เต็มจอ",
|
|
237
|
+
"settings.title": "ตั้งค่า",
|
|
238
|
+
"settings.cover": "มีหน้าปก",
|
|
239
|
+
"settings.direction": "ทิศทางการพลิกหน้า",
|
|
240
|
+
"settings.backgroundColor": "สีพื้นหลัง",
|
|
241
|
+
"settings.backgroundColor.white": "ขาว",
|
|
242
|
+
"settings.backgroundColor.black": "ดำ",
|
|
243
|
+
"settings.interval": "ระยะเวลาเล่นอัตโนมัติ",
|
|
244
|
+
"settings.interval.unit": "วินาที",
|
|
245
|
+
"settings.animation": "อนิเมชันการพลิกหน้า",
|
|
246
|
+
"settings.direction.rtl": "ขวา",
|
|
247
|
+
"settings.direction.ltr": "ซ้าย",
|
|
248
|
+
"menu.openShortcuts": "คีย์ลัด",
|
|
249
|
+
"menu.openPages": "รายการหน้า",
|
|
250
|
+
"menu.back": "ย้อนกลับ",
|
|
251
|
+
"pageList.htmlContent": "เนื้อหา HTML",
|
|
252
|
+
"shortcut.section.page": "การเลื่อนหน้า",
|
|
253
|
+
"shortcut.section.viewMode": "โหมดการแสดงผล",
|
|
254
|
+
"shortcut.section.general": "ทั่วไป",
|
|
255
|
+
"shortcut.moveLeft": "เลื่อนซ้าย",
|
|
256
|
+
"shortcut.moveRight": "เลื่อนขวา",
|
|
257
|
+
"shortcut.autoPageTurnLabel": "เล่นอัตโนมัติ",
|
|
258
|
+
"shortcut.pageModeToggle": "สลับสองหน้า",
|
|
259
|
+
"shortcut.overlayToggle": "สลับโอเวอร์เลย์",
|
|
260
|
+
"seek.previewAlt": "ตัวอย่างหน้า {{page}}",
|
|
261
|
+
loading: "กำลังโหลด",
|
|
262
|
+
"error.pageRequestFailed": "ขอหน้า {{page}} ไม่สำเร็จ"
|
|
263
|
+
}, te = {
|
|
264
|
+
"overlay.autoPageTurn": "自动播放",
|
|
265
|
+
"overlay.layout": "显示模式",
|
|
266
|
+
"overlay.settings": "设置",
|
|
267
|
+
"overlay.menu": "菜单",
|
|
268
|
+
"overlay.centerHint.desktop": "点击中央以关闭",
|
|
269
|
+
"overlay.centerHint.mobile": "点按中央以关闭",
|
|
270
|
+
"splash.loading": "正在启动阅读器",
|
|
271
|
+
"autoplay.start": "已开始自动播放",
|
|
272
|
+
"autoplay.stop": "已停止自动播放",
|
|
273
|
+
"pageMode.single": "单页",
|
|
274
|
+
"pageMode.spread": "跨页",
|
|
275
|
+
"layout.inline": "标准",
|
|
276
|
+
"layout.wide": "宽屏",
|
|
277
|
+
"layout.browserFullscreen": "全屏",
|
|
278
|
+
"settings.title": "设置",
|
|
279
|
+
"settings.cover": "有封面",
|
|
280
|
+
"settings.direction": "翻页方向",
|
|
281
|
+
"settings.backgroundColor": "背景颜色",
|
|
282
|
+
"settings.backgroundColor.white": "白色",
|
|
283
|
+
"settings.backgroundColor.black": "黑色",
|
|
284
|
+
"settings.interval": "自动播放间隔",
|
|
285
|
+
"settings.interval.unit": "秒",
|
|
286
|
+
"settings.animation": "翻页动画",
|
|
287
|
+
"settings.direction.rtl": "向右",
|
|
288
|
+
"settings.direction.ltr": "向左",
|
|
289
|
+
"menu.openShortcuts": "键盘快捷键",
|
|
290
|
+
"menu.openPages": "页面列表",
|
|
291
|
+
"menu.back": "返回",
|
|
292
|
+
"pageList.htmlContent": "HTML 内容",
|
|
293
|
+
"shortcut.section.page": "翻页",
|
|
294
|
+
"shortcut.section.viewMode": "显示模式",
|
|
295
|
+
"shortcut.section.general": "通用",
|
|
296
|
+
"shortcut.moveLeft": "向左移动",
|
|
297
|
+
"shortcut.moveRight": "向右移动",
|
|
298
|
+
"shortcut.autoPageTurnLabel": "自动播放",
|
|
299
|
+
"shortcut.pageModeToggle": "切换跨页",
|
|
300
|
+
"shortcut.overlayToggle": "切换控制层",
|
|
301
|
+
"seek.previewAlt": "第 {{page}} 页预览",
|
|
302
|
+
loading: "加载中",
|
|
303
|
+
"error.pageRequestFailed": "第 {{page}} 页请求失败"
|
|
304
|
+
}, ne = class {
|
|
130
305
|
locale;
|
|
131
306
|
translations;
|
|
132
307
|
constructor(e, t) {
|
|
133
308
|
this.locale = e, this.translations = {
|
|
134
|
-
ja:
|
|
135
|
-
en: o
|
|
309
|
+
ja: c,
|
|
310
|
+
en: o,
|
|
311
|
+
"zh-CN": te,
|
|
312
|
+
ko: l,
|
|
313
|
+
th: ee,
|
|
314
|
+
id: s
|
|
136
315
|
}, t && (this.translations[e] = {
|
|
137
316
|
...this.translations[e] ?? {},
|
|
138
317
|
...t
|
|
@@ -147,58 +326,58 @@ var o = {
|
|
|
147
326
|
};
|
|
148
327
|
//#endregion
|
|
149
328
|
//#region src/components/icons.ts
|
|
150
|
-
function
|
|
329
|
+
function u(e, t) {
|
|
151
330
|
switch (e) {
|
|
152
|
-
case "arrow": return
|
|
153
|
-
case "default": return
|
|
154
|
-
case "wide": return
|
|
155
|
-
case "fullscreen": return
|
|
156
|
-
case "one": return
|
|
157
|
-
case "two": return
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
331
|
+
case "arrow": return d("0 0 20 20", [f("M7.28685 6.64194L10.7742 10.0838L7.3011 13.3098C7.06547 13.5391 6.9336 13.8467 6.9336 14.1669C6.9336 14.4871 7.06547 14.7945 7.3011 15.0239C7.41902 15.1378 7.55971 15.2282 7.7149 15.29C7.87009 15.3517 8.03669 15.3835 8.20498 15.3835C8.37328 15.3835 8.53987 15.3517 8.69506 15.29C8.85025 15.2282 8.99095 15.1378 9.10887 15.0239L13.4787 10.9746C13.7134 10.7475 13.845 10.4422 13.845 10.1243C13.845 9.80629 13.7134 9.50107 13.4787 9.27399L9.10886 4.96826C8.86878 4.74159 8.54377 4.61426 8.20498 4.61426C7.86619 4.61426 7.54118 4.74159 7.3011 4.96826C7.18102 5.08007 7.08568 5.2134 7.02057 5.36056C6.95546 5.50772 6.92188 5.6657 6.92188 5.82528C6.92188 5.98487 6.95546 6.14293 7.02057 6.29009C7.08568 6.43725 7.18102 6.57058 7.3011 6.68239L7.28685 6.64194Z")], t);
|
|
332
|
+
case "default": return d("0 0 20 20", [p("1", "4", "18", "12", "3")], t);
|
|
333
|
+
case "wide": return d("0 0 20 20", [p("1", "2.5", "18", "15", "3"), f("M5.5719 6.31811C5.88754 6.00907 6.39381 6.01422 6.70294 6.3298C7.01206 6.64539 7.00674 7.15165 6.69124 7.46084L5.06993 9.04896L14.7642 9.16988L13.1761 7.54857C12.867 7.23293 12.8722 6.72667 13.1878 6.41754C13.5034 6.10841 14.0096 6.11374 14.3188 6.42923L17.2579 9.42977C17.5671 9.7454 17.5619 10.2516 17.2462 10.5608L14.2457 13.4999C13.93 13.809 13.4238 13.8038 13.1146 13.4882C12.8055 13.1726 12.8109 12.6664 13.1263 12.3572L14.7477 10.7691L5.0534 10.6481L6.64152 12.2695C6.95055 12.5851 6.94541 13.0914 6.62982 13.4005C6.31424 13.7096 5.80797 13.7043 5.49879 13.3888L2.55967 10.3883C2.2505 10.0726 2.25573 9.5664 2.57136 9.25723L5.5719 6.31811Z")], t);
|
|
334
|
+
case "fullscreen": return d("0 0 20 20", [p("1", "1", "18", "18", "3"), f("M8.69922 3.7002C9.14096 3.7003 9.49902 4.05824 9.49902 4.5C9.49902 4.94176 9.14096 5.2997 8.69922 5.2998H6.42969L14.6992 13.5693V11.2998C14.6993 10.8581 15.0573 10.5 15.499 10.5C15.9408 10.5 16.2987 10.8581 16.2988 11.2998V15.5C16.2988 15.9418 15.9409 16.2998 15.499 16.2998H11.2988C10.8571 16.2997 10.499 15.9418 10.499 15.5C10.499 15.0582 10.8571 14.7003 11.2988 14.7002H13.5684L5.29883 6.43066V8.7002C5.29872 9.14193 4.94079 9.5 4.49902 9.5C4.05726 9.5 3.69932 9.14193 3.69922 8.7002V4.5C3.69922 4.05817 4.0572 3.7002 4.49902 3.7002H8.69922Z")], t);
|
|
335
|
+
case "one": return d("0 0 20 20", [p("1", "2", "18", "16", "3"), re("6", "4", "8", "12", "1.5")], t);
|
|
336
|
+
case "two": return d("0 0 20 20", [
|
|
337
|
+
p("1", "2", "18", "16", "3"),
|
|
338
|
+
f("M3 5.5C3 4.67157 3.67157 4 4.5 4H9.5V16H4.5C3.67157 16 3 15.3284 3 14.5V5.5Z"),
|
|
339
|
+
f("M10.5 4H15.5C16.3284 4 17 4.67157 17 5.5V14.5C17 15.3284 16.3284 16 15.5 16H10.5V4Z")
|
|
161
340
|
], t);
|
|
162
|
-
case "play": return
|
|
163
|
-
case "pause": return
|
|
164
|
-
case "settings": return
|
|
165
|
-
case "menu": return
|
|
166
|
-
case "close": return
|
|
341
|
+
case "play": return d("0 0 20 20", [f("M17.0385 7.78428L6.49809 1.19667C4.68077 0.190227 2.5 1.37966 2.5 3.48403V16.5678C2.5 18.5806 4.68077 19.8616 6.49809 18.7636L17.0385 12.176C18.7649 11.1696 18.7649 8.79072 17.0385 7.78428Z")], t);
|
|
342
|
+
case "pause": return d("0 0 20 20", [f("M6.14289 18.3332H4.68573C3.47144 18.3332 2.5 17.3332 2.5 16.0832V3.9165C2.5 2.6665 3.47144 1.6665 4.68573 1.6665H6.14289C7.35718 1.6665 8.32862 2.6665 8.32862 3.9165V15.9998C8.40957 17.3332 7.43814 18.3332 6.14289 18.3332Z"), f("M15.3138 18.3332H13.8555C12.6402 18.3332 11.668 17.3332 11.668 16.0832V3.9165C11.668 2.6665 12.6402 1.6665 13.8555 1.6665H15.3138C16.5291 1.6665 17.5013 2.6665 17.5013 3.9165V15.9998C17.5013 17.3332 16.5291 18.3332 15.3138 18.3332Z")], t);
|
|
343
|
+
case "settings": return d("0 0 24 24", [f("M10.0144 1.34782C11.2164 0.658798 12.6836 0.658798 13.8856 1.34782C13.8947 1.35299 13.9036 1.35831 13.9125 1.36376L20.1001 5.17383C21.3211 5.88071 22 7.15791 22 8.54376V15.56C22 16.9 21.3552 18.2127 20.1836 18.8369L14.0125 22.6368C14.0036 22.6423 13.9947 22.6476 13.9856 22.6527C12.7836 23.3418 11.3164 23.3418 10.1144 22.6527C10.1053 22.6476 10.0964 22.6423 10.0875 22.6368L3.89984 18.8267C2.67884 18.1198 2 16.8426 2 15.4568V8.54376C2 7.15919 2.6776 5.88306 3.8965 5.17578L9.98139 1.36758C9.99225 1.36078 10.0032 1.35419 10.0144 1.34782ZM11.0006 3.14323L4.91861 6.94964C4.90775 6.95644 4.89675 6.96302 4.88564 6.96939C4.31578 7.29605 4 7.87148 4 8.54376V15.4568C4 16.1291 4.31578 16.7045 4.88564 17.0312C4.89466 17.0364 4.9036 17.0417 4.91246 17.0471L11.0978 20.8558C11.6895 21.1893 12.4105 21.1893 13.0022 20.8558L19.1875 17.0471C19.2088 17.034 19.2306 17.0217 19.2528 17.0103C19.6582 16.8011 20 16.2698 20 15.56V8.54376C20 7.87148 19.6842 7.29605 19.1144 6.96939C19.1053 6.96422 19.0964 6.95891 19.0875 6.95346L12.9022 3.14482C12.3115 2.8118 11.5918 2.81127 11.0006 3.14323ZM12 9.8851C10.8402 9.8851 9.89999 10.8552 9.89999 12.0519C9.89999 13.2486 10.8402 14.2187 12 14.2187C13.1598 14.2187 14.1 13.2486 14.1 12.0519C14.1 10.8552 13.1598 9.8851 12 9.8851ZM7.89999 12.0519C7.89999 9.7155 9.73563 7.8215 12 7.8215C14.2644 7.8215 16.1 9.7155 16.1 12.0519C16.1 14.3883 14.2644 16.2823 12 16.2823C9.73563 16.2823 7.89999 14.3883 7.89999 12.0519Z")], t);
|
|
344
|
+
case "menu": return m(t);
|
|
345
|
+
case "close": return h(t);
|
|
167
346
|
}
|
|
168
347
|
}
|
|
169
|
-
function
|
|
348
|
+
function d(e, t, n) {
|
|
170
349
|
let r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
171
350
|
return r.setAttribute("viewBox", e), r.setAttribute("fill", "none"), r.classList.add("comimi-icon"), n && r.classList.add(n), r.append(...t), r;
|
|
172
351
|
}
|
|
173
|
-
function
|
|
352
|
+
function f(e) {
|
|
174
353
|
let t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
175
354
|
return t.setAttribute("d", e), t.classList.add("comimi-icon-fill"), t;
|
|
176
355
|
}
|
|
177
|
-
function
|
|
356
|
+
function p(e, t, n, r, i) {
|
|
178
357
|
let a = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
179
358
|
return a.setAttribute("x", e), a.setAttribute("y", t), a.setAttribute("width", n), a.setAttribute("height", r), a.setAttribute("rx", i), a.classList.add("comimi-icon-stroke"), a;
|
|
180
359
|
}
|
|
181
|
-
function
|
|
360
|
+
function re(e, t, n, r, i) {
|
|
182
361
|
let a = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
183
362
|
return a.setAttribute("x", e), a.setAttribute("y", t), a.setAttribute("width", n), a.setAttribute("height", r), a.setAttribute("rx", i), a.classList.add("comimi-icon-fill"), a;
|
|
184
363
|
}
|
|
185
|
-
function
|
|
364
|
+
function m(e) {
|
|
186
365
|
let t = document.createElement("span");
|
|
187
366
|
t.className = `comimi-menu-svg ${e ?? ""}`.trim();
|
|
188
367
|
for (let e = 0; e < 3; e += 1) t.append(document.createElement("span"));
|
|
189
368
|
return t;
|
|
190
369
|
}
|
|
191
|
-
function
|
|
370
|
+
function h(e) {
|
|
192
371
|
let t = document.createElement("span");
|
|
193
372
|
return t.className = `comimi-close-svg ${e ?? ""}`.trim(), t.append(document.createElement("span"), document.createElement("span")), t;
|
|
194
373
|
}
|
|
195
374
|
//#endregion
|
|
196
375
|
//#region src/components/arrow-buttons.ts
|
|
197
|
-
function
|
|
376
|
+
function g({ state: e, callbacks: t }) {
|
|
198
377
|
let n = document.createElement("div");
|
|
199
|
-
return n.className = "comimi-arrows", n.dataset.overlay = String(e.overlayVisible), n.append(
|
|
378
|
+
return n.className = "comimi-arrows", n.dataset.overlay = String(e.overlayVisible), n.append(_("prev", () => v(e, t, "left")), _("next", () => v(e, t, "right"))), n;
|
|
200
379
|
}
|
|
201
|
-
function
|
|
380
|
+
function _(e, t) {
|
|
202
381
|
let n = document.createElement("button");
|
|
203
382
|
n.type = "button", n.className = `comimi-arrow-button comimi-arrow-${e}`, n.setAttribute("aria-label", e === "next" ? "Next page" : "Previous page"), n.addEventListener("click", (e) => {
|
|
204
383
|
e.stopPropagation(), t();
|
|
@@ -207,18 +386,18 @@ function h(e, t) {
|
|
|
207
386
|
r.className = "comimi-arrow-inner";
|
|
208
387
|
let i = document.createElement("span");
|
|
209
388
|
i.className = "comimi-arrow-bg";
|
|
210
|
-
let a =
|
|
389
|
+
let a = u("arrow");
|
|
211
390
|
return a.classList.add("comimi-arrow-icon"), r.append(i, a), n.append(r), n;
|
|
212
391
|
}
|
|
213
|
-
function
|
|
214
|
-
|
|
392
|
+
function v(e, t, n) {
|
|
393
|
+
ie(n, e.settings.readingDirection) ? t.nextPage() : t.previousPage();
|
|
215
394
|
}
|
|
216
|
-
function
|
|
395
|
+
function ie(e, t) {
|
|
217
396
|
return t === "rtl" ? e === "left" : e === "right";
|
|
218
397
|
}
|
|
219
398
|
//#endregion
|
|
220
399
|
//#region src/components/center-message.ts
|
|
221
|
-
function
|
|
400
|
+
function ae(e, t) {
|
|
222
401
|
let n = document.createElement("div");
|
|
223
402
|
n.className = "comimi-center-message", n.dataset.overlay = String(e.overlayVisible);
|
|
224
403
|
let r = document.createElement("div");
|
|
@@ -227,14 +406,85 @@ function re(e, t) {
|
|
|
227
406
|
return i.className = "comimi-center-message-text comimi-center-message-mobile", i.textContent = t.t("overlay.centerHint.mobile"), n.append(r, i), n;
|
|
228
407
|
}
|
|
229
408
|
//#endregion
|
|
409
|
+
//#region src/components/page-layout.ts
|
|
410
|
+
function y(e, t) {
|
|
411
|
+
return E(e, e.currentPageIndex, t);
|
|
412
|
+
}
|
|
413
|
+
function b(e, t, n) {
|
|
414
|
+
let r = y(e, n), i = t === "previous" ? Math.min(...r) - 1 : Math.max(...r) + 1;
|
|
415
|
+
return i < 0 || i >= e.manga.pages.length ? [] : E(e, i, n);
|
|
416
|
+
}
|
|
417
|
+
function x(e, t) {
|
|
418
|
+
let n = [];
|
|
419
|
+
for (let r = 1; r >= 1; --r) {
|
|
420
|
+
let i = T(e, "previous", r, t);
|
|
421
|
+
i.length > 0 && n.push({
|
|
422
|
+
indexes: i,
|
|
423
|
+
placement: "previous",
|
|
424
|
+
offset: S(e, "previous", r)
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
n.push({
|
|
428
|
+
indexes: y(e, t),
|
|
429
|
+
placement: "current",
|
|
430
|
+
offset: 0
|
|
431
|
+
});
|
|
432
|
+
for (let r = 1; r <= 1; r += 1) {
|
|
433
|
+
let i = T(e, "next", r, t);
|
|
434
|
+
i.length > 0 && n.push({
|
|
435
|
+
indexes: i,
|
|
436
|
+
placement: "next",
|
|
437
|
+
offset: S(e, "next", r)
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
return n;
|
|
441
|
+
}
|
|
442
|
+
function S(e, t, n) {
|
|
443
|
+
let r = e.settings.readingDirection === "rtl" ? -1 : 1;
|
|
444
|
+
return (t === "next" ? r : -r) * n;
|
|
445
|
+
}
|
|
446
|
+
function C(e, t) {
|
|
447
|
+
if (t === "current") return "center";
|
|
448
|
+
let n = e.settings.readingDirection === "rtl" ? "left" : "right";
|
|
449
|
+
return t === "next" ? n : n === "left" ? "right" : "left";
|
|
450
|
+
}
|
|
451
|
+
function w(e, t) {
|
|
452
|
+
return t === "rtl" ? e > 0 : e < 0;
|
|
453
|
+
}
|
|
454
|
+
function T(e, t, n, r) {
|
|
455
|
+
let i = y(e, r);
|
|
456
|
+
for (let a = 0; a < n; a += 1) {
|
|
457
|
+
let n = t === "previous" ? Math.min(...i) - 1 : Math.max(...i) + 1;
|
|
458
|
+
if (n < 0 || n >= e.manga.pages.length) return [];
|
|
459
|
+
i = E(e, n, r);
|
|
460
|
+
}
|
|
461
|
+
return i;
|
|
462
|
+
}
|
|
463
|
+
function E(e, t, n) {
|
|
464
|
+
let { manga: r, settings: i } = e;
|
|
465
|
+
if (n || i.pageTurnMode !== "spread" || i.hasCover && t === 0) return [t];
|
|
466
|
+
let a = [t, oe(e, t)].filter((e) => e >= 0 && e < r.pages.length), o = [...new Set(a)].sort((e, t) => e - t);
|
|
467
|
+
return i.readingDirection === "rtl" ? o.reverse() : o;
|
|
468
|
+
}
|
|
469
|
+
function oe(e, t) {
|
|
470
|
+
return e.settings.hasCover ? t % 2 == 1 ? t + 1 : t - 1 : t % 2 == 0 ? t + 1 : t - 1;
|
|
471
|
+
}
|
|
472
|
+
//#endregion
|
|
230
473
|
//#region src/components/rabbit-mascot.ts
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
474
|
+
var se = "<svg viewBox=\"0 0 50 50\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"comimi-rabbit-svg\">\n <mask id=\"comimi-rabbit-mask\" style=\"mask-type:alpha\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"50\" height=\"50\">\n <rect width=\"50\" height=\"50\" fill=\"#D9D9D9\"/>\n </mask>\n <g mask=\"url(#comimi-rabbit-mask)\">\n <path d=\"M3 41V50H47L48 46.5L47.5 41.5L46 36L42.5 32V29.5L43 23L41 14L36 10.5L29 12L25 16.5L21 12L15 10.5L9.5 14L7.5 22L7 33L3 41Z\" fill=\"white\"/>\n <path d=\"M44.4296 30.6958C44.6658 29.2364 44.8262 27.5939 44.9287 25.6301C45.1827 20.7786 44.6212 16.8733 43.2531 14.0123C41.4929 10.3257 38.3601 8.25926 34.1979 8.04056C30.3119 7.84418 27.1881 9.20546 24.9822 12.0396C22.3752 8.56275 18.828 7.87096 16.0027 8.01824C11.5152 8.25479 4.09982 10.8568 4.87077 25.6301C4.98218 27.759 5.1426 29.4372 5.37433 30.9011C1.8984 34.6592 0 39.3143 0 44.1301C0 46.2814 0.374332 48.4103 1.11854 50.4589C1.44831 51.365 2.30392 51.9318 3.21301 51.9318C3.46702 51.9318 3.72103 51.8872 3.97504 51.7979C5.13369 51.3784 5.73084 50.0974 5.31194 48.937C4.74599 47.3793 4.46078 45.7636 4.46078 44.1301C4.46078 40.1534 6.18984 36.2838 9.32709 33.2399C9.87077 32.7087 10.1114 31.9411 9.95989 31.1957C9.65241 29.6827 9.46078 27.8929 9.32709 25.398C9.16667 22.3005 8.67202 12.8742 16.2433 12.477C19.3717 12.3119 21.4349 13.807 22.7139 17.1589V27.4689C22.7139 28.7008 23.7121 29.7005 24.9421 29.7005C26.172 29.7005 27.1702 28.7008 27.1702 27.4689V17.1812C28.5294 13.8204 30.6907 12.3297 33.9706 12.4993C36.5107 12.6332 38.1863 13.7267 39.2424 15.9404C40.2807 18.1185 40.6996 21.2963 40.4857 25.398C40.3699 27.6608 40.1604 29.4952 39.8529 31.0038C39.697 31.7581 39.9465 32.5436 40.5036 33.0703C43.7522 36.1454 45.5392 40.073 45.5392 44.1301C45.5392 45.7592 45.254 47.3793 44.6881 48.937C44.2692 50.0974 44.8663 51.3739 46.025 51.7979C47.1836 52.2174 48.4581 51.6194 48.8815 50.4589C49.6212 48.4103 50 46.2814 50 44.1301C50 39.2161 48.0348 34.4896 44.4385 30.6958H44.4296Z\" fill=\"#E0E0E0\"/>\n <path d=\"M15.6152 45.4779C17.0919 45.4779 18.289 44.279 18.289 42.8C18.289 41.321 17.0919 40.1221 15.6152 40.1221C14.1385 40.1221 12.9414 41.321 12.9414 42.8C12.9414 44.279 14.1385 45.4779 15.6152 45.4779Z\" fill=\"#E0E0E0\"/>\n <path d=\"M29.6113 45.4779C31.088 45.4779 32.2851 44.279 32.2851 42.8C32.2851 41.321 31.088 40.1221 29.6113 40.1221C28.1346 40.1221 26.9375 41.321 26.9375 42.8C26.9375 44.279 28.1346 45.4779 29.6113 45.4779Z\" fill=\"#E0E0E0\"/>\n </g>\n</svg>";
|
|
475
|
+
function D(e) {
|
|
476
|
+
if (e === !1) return null;
|
|
477
|
+
let t = document.createElement("div");
|
|
478
|
+
if (t.className = "comimi-rabbit", e && "render" in e) return t.append(e.render()), t;
|
|
479
|
+
if (e && "src" in e) {
|
|
480
|
+
let n = document.createElement("img");
|
|
481
|
+
return n.className = "comimi-rabbit-img", n.src = e.src, n.alt = e.alt ?? "", n.draggable = !1, t.append(n), t;
|
|
482
|
+
}
|
|
483
|
+
return t.innerHTML = se, t;
|
|
234
484
|
}
|
|
235
485
|
//#endregion
|
|
236
486
|
//#region src/components/inputs.ts
|
|
237
|
-
var
|
|
487
|
+
var O = class {
|
|
238
488
|
root;
|
|
239
489
|
constructor(e) {
|
|
240
490
|
this.root = document.createElement("button"), this.root.type = "button", this.root.className = "comimi-toggle-switch", this.root.dataset.checked = "false";
|
|
@@ -259,7 +509,7 @@ var v = class {
|
|
|
259
509
|
getElement() {
|
|
260
510
|
return this.root;
|
|
261
511
|
}
|
|
262
|
-
},
|
|
512
|
+
}, k = class {
|
|
263
513
|
root;
|
|
264
514
|
select;
|
|
265
515
|
label;
|
|
@@ -271,7 +521,7 @@ var v = class {
|
|
|
271
521
|
let t = this.options.find((e) => String(e.value) === this.select.value);
|
|
272
522
|
t && e(t.value);
|
|
273
523
|
}), this.label = document.createElement("span"), this.label.className = "comimi-selectbox-label";
|
|
274
|
-
let n =
|
|
524
|
+
let n = u("arrow");
|
|
275
525
|
n.classList.add("comimi-selectbox-arrow"), this.root.append(t, this.select, this.label, n);
|
|
276
526
|
}
|
|
277
527
|
setOptions(e) {
|
|
@@ -291,7 +541,7 @@ var v = class {
|
|
|
291
541
|
getElement() {
|
|
292
542
|
return this.root;
|
|
293
543
|
}
|
|
294
|
-
},
|
|
544
|
+
}, ce = class {
|
|
295
545
|
root;
|
|
296
546
|
input;
|
|
297
547
|
fill;
|
|
@@ -323,7 +573,24 @@ var v = class {
|
|
|
323
573
|
getElement() {
|
|
324
574
|
return this.root;
|
|
325
575
|
}
|
|
326
|
-
}
|
|
576
|
+
};
|
|
577
|
+
//#endregion
|
|
578
|
+
//#region src/components/scroll-fade.ts
|
|
579
|
+
function A(e) {
|
|
580
|
+
e.classList.add("comimi-scrollfade");
|
|
581
|
+
let t = () => {
|
|
582
|
+
let { scrollTop: t, scrollHeight: n, clientHeight: r } = e;
|
|
583
|
+
e.dataset.scrollUp = String(t > 0), e.dataset.scrollDown = String(t + r < n - 1);
|
|
584
|
+
};
|
|
585
|
+
if (e.addEventListener("scroll", t, { passive: !0 }), typeof ResizeObserver < "u") {
|
|
586
|
+
let n = new ResizeObserver(t);
|
|
587
|
+
n.observe(e), e.firstElementChild && n.observe(e.firstElementChild);
|
|
588
|
+
}
|
|
589
|
+
typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : t();
|
|
590
|
+
}
|
|
591
|
+
//#endregion
|
|
592
|
+
//#region src/components/settings-panel.ts
|
|
593
|
+
var j = class {
|
|
327
594
|
callbacks;
|
|
328
595
|
i18n;
|
|
329
596
|
root;
|
|
@@ -333,30 +600,57 @@ var v = class {
|
|
|
333
600
|
localeLabel;
|
|
334
601
|
coverLabel;
|
|
335
602
|
directionLabel;
|
|
603
|
+
backgroundColorLabel;
|
|
336
604
|
animationLabel;
|
|
337
605
|
intervalLabel;
|
|
338
606
|
localeSelect;
|
|
339
607
|
coverToggle;
|
|
340
608
|
directionSelect;
|
|
609
|
+
backgroundColorSelect;
|
|
341
610
|
animationToggle;
|
|
342
611
|
intervalSlider;
|
|
343
612
|
constructor(e, t) {
|
|
344
|
-
this.callbacks = e, this.i18n = t, this.root = document.createElement("div"), this.root.className = "comimi-settings-panel", this.root.dataset.open = "false", this.root.setAttribute("role", "dialog"), this.root.addEventListener("click", (e) => e.stopPropagation()), this.body = document.createElement("div"), this.body.className = "comimi-settings-panel-body", this.inner = document.createElement("div"), this.inner.className = "comimi-settings-panel-inner", this.titleEl = document.createElement("div"), this.titleEl.className = "comimi-settings-panel-title", this.localeSelect = new
|
|
613
|
+
this.callbacks = e, this.i18n = t, this.root = document.createElement("div"), this.root.className = "comimi-settings-panel", this.root.dataset.open = "false", this.root.setAttribute("role", "dialog"), this.root.addEventListener("click", (e) => e.stopPropagation()), this.body = document.createElement("div"), this.body.className = "comimi-settings-panel-body", this.inner = document.createElement("div"), this.inner.className = "comimi-settings-panel-inner", this.titleEl = document.createElement("div"), this.titleEl.className = "comimi-settings-panel-title", this.localeSelect = new k((e) => this.callbacks.updateSettings({ locale: String(e) })), this.coverToggle = new O((e) => this.callbacks.updateSettings({ hasCover: e })), this.directionSelect = new k((e) => this.callbacks.updateSettings({ readingDirection: e })), this.backgroundColorSelect = new k((e) => this.callbacks.updateSettings({ backgroundColor: e })), this.animationToggle = new O((e) => this.callbacks.updateSettings({ pageTurnAnimation: e })), this.intervalSlider = new ce((e) => this.callbacks.updateSettings({ autoPageTurnIntervalMs: Math.max(1, e) * 1e3 })), this.intervalSlider.setRange(3, 30, 1), this.localeLabel = this.createLabel(), this.coverLabel = this.createLabel(), this.directionLabel = this.createLabel(), this.backgroundColorLabel = this.createLabel(), this.animationLabel = this.createLabel(), this.intervalLabel = this.createLabel(), this.inner.append(this.titleEl, this.section(this.localeLabel, this.localeSelect.getElement()), this.section(this.coverLabel, this.coverToggle.getElement()), this.section(this.directionLabel, this.directionSelect.getElement()), this.section(this.animationLabel, this.animationToggle.getElement()), this.section(this.intervalLabel, this.intervalSlider.getElement()), this.section(this.backgroundColorLabel, this.backgroundColorSelect.getElement())), this.body.append(this.inner), this.root.append(this.body), A(this.body);
|
|
345
614
|
}
|
|
346
615
|
update(e) {
|
|
347
|
-
this.titleEl.textContent = this.i18n.t("settings.title"), this.localeLabel.textContent = "Language", this.coverLabel.textContent = this.i18n.t("settings.cover"), this.directionLabel.textContent = this.i18n.t("settings.direction"), this.animationLabel.textContent = this.i18n.t("settings.animation"), this.intervalLabel.textContent = this.i18n.t("settings.interval"), this.localeSelect.setOptions([
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
616
|
+
this.titleEl.textContent = this.i18n.t("settings.title"), this.localeLabel.textContent = "Language", this.coverLabel.textContent = this.i18n.t("settings.cover"), this.directionLabel.textContent = this.i18n.t("settings.direction"), this.backgroundColorLabel.textContent = this.i18n.t("settings.backgroundColor"), this.animationLabel.textContent = this.i18n.t("settings.animation"), this.intervalLabel.textContent = this.i18n.t("settings.interval"), this.localeSelect.setOptions([
|
|
617
|
+
{
|
|
618
|
+
label: "日本語",
|
|
619
|
+
value: "ja"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
label: "English",
|
|
623
|
+
value: "en"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
label: "简体中文",
|
|
627
|
+
value: "zh-CN"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
label: "한국어",
|
|
631
|
+
value: "ko"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
label: "ภาษาไทย",
|
|
635
|
+
value: "th"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
label: "Indonesia",
|
|
639
|
+
value: "id"
|
|
640
|
+
}
|
|
641
|
+
]), this.directionSelect.setOptions([{
|
|
354
642
|
label: this.i18n.t("settings.direction.rtl"),
|
|
355
643
|
value: "rtl"
|
|
356
644
|
}, {
|
|
357
645
|
label: this.i18n.t("settings.direction.ltr"),
|
|
358
646
|
value: "ltr"
|
|
359
|
-
}]), this.
|
|
647
|
+
}]), this.backgroundColorSelect.setOptions([{
|
|
648
|
+
label: this.i18n.t("settings.backgroundColor.white"),
|
|
649
|
+
value: "white"
|
|
650
|
+
}, {
|
|
651
|
+
label: this.i18n.t("settings.backgroundColor.black"),
|
|
652
|
+
value: "black"
|
|
653
|
+
}]), this.intervalSlider.setUnit(this.i18n.t("settings.interval.unit")), this.localeSelect.setValue(e.settings.locale), this.coverToggle.setChecked(e.settings.hasCover), this.directionSelect.setValue(e.settings.readingDirection), this.backgroundColorSelect.setValue(e.settings.backgroundColor), this.animationToggle.setChecked(e.settings.pageTurnAnimation), this.intervalSlider.setValue(Math.round(e.settings.autoPageTurnIntervalMs / 1e3)), this.root.dataset.open = String(e.panel === "settings"), this.scheduleHeightUpdate();
|
|
360
654
|
}
|
|
361
655
|
getElement() {
|
|
362
656
|
return this.root;
|
|
@@ -375,15 +669,21 @@ var v = class {
|
|
|
375
669
|
};
|
|
376
670
|
typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => requestAnimationFrame(e)) : setTimeout(e, 0);
|
|
377
671
|
}
|
|
378
|
-
},
|
|
672
|
+
}, M = class {
|
|
379
673
|
callbacks;
|
|
380
674
|
i18n;
|
|
675
|
+
mascot;
|
|
381
676
|
root;
|
|
382
677
|
seekCurrent;
|
|
383
678
|
seekTotal;
|
|
384
679
|
seekBar;
|
|
385
680
|
seekFill;
|
|
386
681
|
seekInput;
|
|
682
|
+
seekPreview;
|
|
683
|
+
seekPreviewThumbs;
|
|
684
|
+
seekPreviewLabel;
|
|
685
|
+
seekPreviewKey;
|
|
686
|
+
currentState;
|
|
387
687
|
autoplayContainer;
|
|
388
688
|
autoplayButton;
|
|
389
689
|
autoplaySlider;
|
|
@@ -404,16 +704,18 @@ var v = class {
|
|
|
404
704
|
settingsIcon;
|
|
405
705
|
settingsTooltip;
|
|
406
706
|
prevPageTurnMode;
|
|
407
|
-
constructor(e, t) {
|
|
408
|
-
this.callbacks = e, this.i18n = t, this.root = document.createElement("div"), this.root.className = "comimi-controls-dock", this.root.dataset.overlay = "false", this.root.dataset.autoplay = "false";
|
|
409
|
-
let
|
|
410
|
-
|
|
707
|
+
constructor(e, t, n) {
|
|
708
|
+
this.callbacks = e, this.i18n = t, this.mascot = n, this.root = document.createElement("div"), this.root.className = "comimi-controls-dock", this.root.dataset.overlay = "false", this.root.dataset.autoplay = "false";
|
|
709
|
+
let r = document.createElement("div");
|
|
710
|
+
r.className = "comimi-controls-bg";
|
|
711
|
+
let i = D(this.mascot), a = [r];
|
|
712
|
+
i && a.push(i), a.push(this.buildSeek(), this.buildRow()), this.root.append(...a);
|
|
411
713
|
}
|
|
412
714
|
getElement() {
|
|
413
715
|
return this.root;
|
|
414
716
|
}
|
|
415
717
|
update(e, t) {
|
|
416
|
-
this.root.dataset.autoplay = String(e.autoPageTurnEnabled);
|
|
718
|
+
this.currentState = e, this.root.dataset.autoplay = String(e.autoPageTurnEnabled);
|
|
417
719
|
let n = e.manga.pages.length, r = Math.max(1, n), i = e.currentPageIndex + 1, a = n <= 1 ? 0 : e.currentPageIndex / (n - 1);
|
|
418
720
|
this.seekCurrent.textContent = String(i), this.seekTotal.textContent = ` / ${r}`, this.seekFill.style.width = `${a * 100}%`, this.seekBar.dataset.direction = e.settings.readingDirection, this.seekInput.max = String(Math.max(0, n - 1)), document.activeElement !== this.seekInput && (this.seekInput.value = String(e.currentPageIndex)), this.seekInput.dataset.direction = e.settings.readingDirection, this.autoplaySlider.dataset.active = String(e.autoPageTurnEnabled);
|
|
419
721
|
let o = this.i18n.t("overlay.autoPageTurn");
|
|
@@ -435,7 +737,38 @@ var v = class {
|
|
|
435
737
|
let n = document.createElement("div");
|
|
436
738
|
return n.className = "comimi-seek-track", this.seekFill = document.createElement("div"), this.seekFill.className = "comimi-seek-fill", this.seekFill.style.width = "0%", n.append(this.seekFill), this.seekInput = document.createElement("input"), this.seekInput.className = "comimi-seek-input", this.seekInput.type = "range", this.seekInput.min = "0", this.seekInput.max = "0", this.seekInput.step = "1", this.seekInput.value = "0", this.seekInput.setAttribute("aria-label", "Seek bar"), this.seekInput.addEventListener("input", () => {
|
|
437
739
|
this.callbacks.goToPage(Number(this.seekInput.value));
|
|
438
|
-
}), this.
|
|
740
|
+
}), this.seekPreview = document.createElement("div"), this.seekPreview.className = "comimi-seek-preview", this.seekPreview.dataset.show = "false", this.seekPreviewThumbs = document.createElement("div"), this.seekPreviewThumbs.className = "comimi-seek-preview-thumbs", this.seekPreviewLabel = document.createElement("div"), this.seekPreviewLabel.className = "comimi-seek-preview-label", this.seekPreview.append(this.seekPreviewThumbs, this.seekPreviewLabel), this.seekBar.addEventListener("mousemove", (e) => this.updateSeekPreview(e)), this.seekBar.addEventListener("mouseleave", () => {
|
|
741
|
+
this.seekPreview.dataset.show = "false";
|
|
742
|
+
}), this.seekBar.append(n, this.seekInput, this.seekPreview), e.append(t, this.seekBar), e;
|
|
743
|
+
}
|
|
744
|
+
updateSeekPreview(e) {
|
|
745
|
+
let t = this.currentState;
|
|
746
|
+
if (!t) return;
|
|
747
|
+
let n = t.manga.pages.length;
|
|
748
|
+
if (n === 0) return;
|
|
749
|
+
let r = this.seekBar.getBoundingClientRect();
|
|
750
|
+
if (r.width === 0) return;
|
|
751
|
+
let i = Math.max(0, Math.min(r.width, e.clientX - r.left)), a = i / r.width, o = t.settings.readingDirection === "rtl" ? 1 - a : a, s = E(t, Math.min(n - 1, Math.max(0, Math.floor(o * n))), !1), c = s.map((e) => t.manga.pages[e]).filter((e) => !!e);
|
|
752
|
+
this.refreshSeekPreviewThumbs(s, c);
|
|
753
|
+
let l = [...s].sort((e, t) => e - t);
|
|
754
|
+
this.seekPreviewLabel.textContent = l.length > 1 ? `${l[0] + 1} - ${l[l.length - 1] + 1}` : String(l[0] + 1), this.seekPreview.style.left = `${i}px`, this.seekPreview.dataset.show = "true";
|
|
755
|
+
}
|
|
756
|
+
refreshSeekPreviewThumbs(e, t) {
|
|
757
|
+
let n = e.join(",");
|
|
758
|
+
if (this.seekPreviewKey !== n) {
|
|
759
|
+
this.seekPreviewKey = n, this.seekPreviewThumbs.replaceChildren();
|
|
760
|
+
for (let e of t) {
|
|
761
|
+
let t = document.createElement("div");
|
|
762
|
+
if (t.className = "comimi-seek-preview-thumb", e.type === "image") {
|
|
763
|
+
let n = document.createElement("img");
|
|
764
|
+
n.src = e.thumbnailSrc ?? e.src, n.alt = "", n.draggable = !1, t.append(n), t.dataset.kind = "image";
|
|
765
|
+
} else {
|
|
766
|
+
let e = document.createElement("span");
|
|
767
|
+
e.textContent = this.i18n.t("pageList.htmlContent"), t.append(e), t.dataset.kind = "html";
|
|
768
|
+
}
|
|
769
|
+
this.seekPreviewThumbs.append(t);
|
|
770
|
+
}
|
|
771
|
+
}
|
|
439
772
|
}
|
|
440
773
|
buildRow() {
|
|
441
774
|
let e = document.createElement("div");
|
|
@@ -447,22 +780,22 @@ var v = class {
|
|
|
447
780
|
});
|
|
448
781
|
let e = document.createElement("span");
|
|
449
782
|
e.className = "comimi-autoplay-window", this.autoplaySlider = document.createElement("span"), this.autoplaySlider.className = "comimi-autoplay-slider", this.autoplaySlider.dataset.active = "false";
|
|
450
|
-
let t =
|
|
783
|
+
let t = u("play");
|
|
451
784
|
t.classList.add("comimi-autoplay-icon", "comimi-autoplay-icon-play");
|
|
452
|
-
let n =
|
|
785
|
+
let n = u("pause");
|
|
453
786
|
return n.classList.add("comimi-autoplay-icon", "comimi-autoplay-icon-pause"), this.autoplaySlider.append(t, n), e.append(this.autoplaySlider), this.autoplayTooltip = document.createElement("span"), this.autoplayTooltip.className = "comimi-tooltip", this.autoplayButton.append(e, this.autoplayTooltip), this.autoplayContainer.append(this.autoplayButton), this.autoplayContainer;
|
|
454
787
|
}
|
|
455
788
|
buildSide() {
|
|
456
789
|
this.side = document.createElement("div"), this.side.className = "comimi-controls-side", this.pageMode = document.createElement("div"), this.pageMode.className = "comimi-page-mode";
|
|
457
790
|
let e = document.createElement("div");
|
|
458
|
-
return e.className = "comimi-page-mode-wrapper", [this.pageModeSingleBtn, this.pageModeSingleIcon, this.pageModeSingleTooltip] = this.buildPageModeButton("single", "one"), [this.pageModeSpreadBtn, this.pageModeSpreadIcon, this.pageModeSpreadTooltip] = this.buildPageModeButton("spread", "two"), e.append(this.pageModeSingleBtn, this.pageModeSpreadBtn), this.pageMode.append(e), [this.settingsContainer, this.settingsButton, this.settingsIcon, this.settingsTooltip] = this.buildSettings(), this.settings = new
|
|
791
|
+
return e.className = "comimi-page-mode-wrapper", [this.pageModeSingleBtn, this.pageModeSingleIcon, this.pageModeSingleTooltip] = this.buildPageModeButton("single", "one"), [this.pageModeSpreadBtn, this.pageModeSpreadIcon, this.pageModeSpreadTooltip] = this.buildPageModeButton("spread", "two"), e.append(this.pageModeSingleBtn, this.pageModeSpreadBtn), this.pageMode.append(e), [this.settingsContainer, this.settingsButton, this.settingsIcon, this.settingsTooltip] = this.buildSettings(), this.settings = new j(this.callbacks, this.i18n), this.settingsContainer.append(this.settings.getElement()), this.side.append(this.pageMode, this.settingsContainer), this.side;
|
|
459
792
|
}
|
|
460
793
|
buildPageModeButton(e, t) {
|
|
461
794
|
let n = document.createElement("button");
|
|
462
795
|
n.type = "button", n.className = "comimi-page-mode-button comimi-has-tooltip", n.dataset.selected = "false", n.addEventListener("click", (t) => {
|
|
463
796
|
t.stopPropagation(), this.callbacks.updateSettings({ pageTurnMode: e });
|
|
464
797
|
});
|
|
465
|
-
let r =
|
|
798
|
+
let r = u(t);
|
|
466
799
|
r.classList.add("comimi-page-mode-icon");
|
|
467
800
|
let i = document.createElement("span");
|
|
468
801
|
return i.className = "comimi-tooltip", n.append(r, i), [
|
|
@@ -480,7 +813,7 @@ var v = class {
|
|
|
480
813
|
let n = e.dataset.open === "true";
|
|
481
814
|
this.callbacks.setPanel(n ? "none" : "settings");
|
|
482
815
|
});
|
|
483
|
-
let n =
|
|
816
|
+
let n = u("settings");
|
|
484
817
|
n.classList.add("comimi-settings-icon");
|
|
485
818
|
let r = document.createElement("span");
|
|
486
819
|
return r.className = "comimi-tooltip", t.append(n, r), e.append(t), [
|
|
@@ -493,9 +826,10 @@ var v = class {
|
|
|
493
826
|
applyPopAnimation(e) {
|
|
494
827
|
e.classList.remove("comimi-pop-animate"), e.offsetWidth, e.classList.add("comimi-pop-animate");
|
|
495
828
|
}
|
|
496
|
-
},
|
|
829
|
+
}, N = class {
|
|
497
830
|
callbacks;
|
|
498
831
|
i18n;
|
|
832
|
+
options;
|
|
499
833
|
root;
|
|
500
834
|
titleEl;
|
|
501
835
|
authorEl;
|
|
@@ -508,14 +842,16 @@ var v = class {
|
|
|
508
842
|
currentState;
|
|
509
843
|
currentView = "menu";
|
|
510
844
|
i18nTexts = [];
|
|
511
|
-
constructor(e, t) {
|
|
512
|
-
this.callbacks = e, this.i18n = t, this.root = document.createElement("div"), this.root.className = "comimi-menu-panel", this.root.setAttribute("role", "dialog"), this.root.dataset.open = "false", this.root.dataset.view = "menu", this.root.dataset.overlay = "false";
|
|
513
|
-
let
|
|
514
|
-
|
|
515
|
-
let
|
|
516
|
-
[this.titleEl, this.authorEl] = this.findTitleNodes(
|
|
517
|
-
let
|
|
518
|
-
|
|
845
|
+
constructor(e, t, n = {}) {
|
|
846
|
+
this.callbacks = e, this.i18n = t, this.options = n, this.root = document.createElement("div"), this.root.className = "comimi-menu-panel", this.root.setAttribute("role", "dialog"), this.root.dataset.open = "false", this.root.dataset.view = "menu", this.root.dataset.overlay = "false";
|
|
847
|
+
let r = document.createElement("div");
|
|
848
|
+
r.className = "comimi-menu-bg";
|
|
849
|
+
let i = this.buildTop();
|
|
850
|
+
[this.titleEl, this.authorEl] = this.findTitleNodes(i), this.bottomEl = document.createElement("div"), this.bottomEl.className = "comimi-menu-bottom", this.bottomEl.style.height = "0px";
|
|
851
|
+
let a = document.createElement("div");
|
|
852
|
+
a.className = "comimi-menu-border", this.viewMenu = this.buildMenuView(), this.viewShortcut = this.buildShortcutView(), [this.viewPageList, this.pageListInner] = this.buildPageListView(), this.bottomEl.append(a, this.viewMenu, this.viewShortcut, this.viewPageList);
|
|
853
|
+
let o = D(this.options.mascot), s = [r];
|
|
854
|
+
o && s.push(o), s.push(i, this.bottomEl), this.root.append(...s);
|
|
519
855
|
}
|
|
520
856
|
getElement() {
|
|
521
857
|
return this.root;
|
|
@@ -542,7 +878,7 @@ var v = class {
|
|
|
542
878
|
this.bottomEl.style.height = `${n}px`;
|
|
543
879
|
}
|
|
544
880
|
refreshPageList(e) {
|
|
545
|
-
let t = `${e.manga.id}:${e.manga.pages.length}`;
|
|
881
|
+
let t = `${e.settings.locale}:${e.manga.id}:${e.manga.pages.length}`;
|
|
546
882
|
this.pageListCacheKey !== t && (this.pageListCacheKey = t, this.pageListInner.replaceChildren(), e.manga.pages.forEach((e, t) => {
|
|
547
883
|
let n = document.createElement("button");
|
|
548
884
|
n.type = "button", n.className = "comimi-page-list-item", n.addEventListener("click", (e) => {
|
|
@@ -552,6 +888,9 @@ var v = class {
|
|
|
552
888
|
if (r.className = "comimi-page-list-thumb", e.type === "image") {
|
|
553
889
|
let n = document.createElement("img");
|
|
554
890
|
n.alt = e.alt ?? e.label ?? this.i18n.t("seek.previewAlt", { page: t + 1 }), n.draggable = !1, n.src = e.thumbnailSrc ?? e.src, r.append(n);
|
|
891
|
+
} else if (e.type === "html") {
|
|
892
|
+
let e = document.createElement("span");
|
|
893
|
+
e.className = "comimi-page-list-thumb-html", e.textContent = this.i18n.t("pageList.htmlContent"), r.append(e);
|
|
555
894
|
}
|
|
556
895
|
let i = document.createElement("span");
|
|
557
896
|
i.className = "comimi-page-list-text", i.textContent = e.label ?? String(t + 1), n.append(r, i), this.pageListInner.append(n);
|
|
@@ -567,7 +906,7 @@ var v = class {
|
|
|
567
906
|
let t = document.createElement("span");
|
|
568
907
|
t.className = "comimi-menu-button";
|
|
569
908
|
let n = document.createElement("span");
|
|
570
|
-
n.className = "comimi-menu-button-inner", n.append(
|
|
909
|
+
n.className = "comimi-menu-button-inner", n.append(u("menu"), u("close")), t.append(n);
|
|
571
910
|
let r = document.createElement("span");
|
|
572
911
|
r.className = "comimi-menu-title-wrap";
|
|
573
912
|
let i = document.createElement("span");
|
|
@@ -594,21 +933,24 @@ var v = class {
|
|
|
594
933
|
let r = document.createElement("span");
|
|
595
934
|
r.className = "comimi-menu-link-text", this.bindI18nText(r, e);
|
|
596
935
|
let i = document.createElement("span");
|
|
597
|
-
return i.className = "comimi-menu-link-arrow", i.append(
|
|
936
|
+
return i.className = "comimi-menu-link-arrow", i.append(u("arrow")), n.append(r, i), n;
|
|
598
937
|
}
|
|
599
938
|
buildShortcutView() {
|
|
600
939
|
let e = document.createElement("div");
|
|
601
940
|
e.className = "comimi-menu-view comimi-menu-view-shortcut";
|
|
602
941
|
let t = document.createElement("div");
|
|
603
|
-
|
|
942
|
+
t.className = "comimi-shortcut-inner";
|
|
943
|
+
let n = document.createElement("div");
|
|
944
|
+
return n.className = "comimi-shortcut-grid", t.append(n), A(t), n.append(this.shortcutSection("shortcut.section.page", [
|
|
604
945
|
[["←", "Space"], "shortcut.moveLeft"],
|
|
605
946
|
[["→", "Space + Shift"], "shortcut.moveRight"],
|
|
606
947
|
[["A"], "shortcut.autoPageTurnLabel"]
|
|
607
|
-
]), this.shortcutSection("shortcut.section.viewMode", [
|
|
608
|
-
[["N"], "layout.inline"],
|
|
609
|
-
[["W"], "layout.
|
|
948
|
+
])), this.options.lockLayoutMode || n.append(this.shortcutSection("shortcut.section.viewMode", [
|
|
949
|
+
[["N", "Esc"], "layout.inline"],
|
|
950
|
+
[["W"], "layout.wide"],
|
|
610
951
|
[["F"], "layout.browserFullscreen"]
|
|
611
|
-
], !0), this.shortcutSection("shortcut.section.general", [
|
|
952
|
+
], !0)), n.append(this.shortcutSection("shortcut.section.general", [
|
|
953
|
+
[["O"], "shortcut.overlayToggle"],
|
|
612
954
|
[["M"], "overlay.menu"],
|
|
613
955
|
[["P"], "shortcut.pageModeToggle"],
|
|
614
956
|
[["S"], "overlay.settings"]
|
|
@@ -618,7 +960,9 @@ var v = class {
|
|
|
618
960
|
let e = document.createElement("div");
|
|
619
961
|
e.className = "comimi-menu-view comimi-menu-view-page-list";
|
|
620
962
|
let t = document.createElement("div");
|
|
621
|
-
|
|
963
|
+
t.className = "comimi-page-list-inner";
|
|
964
|
+
let n = document.createElement("div");
|
|
965
|
+
return n.className = "comimi-page-list-grid", t.append(n), A(t), e.append(t, this.renderBackButton()), [e, n];
|
|
622
966
|
}
|
|
623
967
|
shortcutSection(e, t, n = !1) {
|
|
624
968
|
let r = document.createElement("div");
|
|
@@ -657,9 +1001,9 @@ var v = class {
|
|
|
657
1001
|
let r = document.createElement("span");
|
|
658
1002
|
r.className = "comimi-back-text", this.bindI18nText(r, "menu.back");
|
|
659
1003
|
let i = document.createElement("span");
|
|
660
|
-
return i.className = "comimi-back-arrow", i.append(
|
|
1004
|
+
return i.className = "comimi-back-arrow", i.append(u("arrow")), t.append(n, r, i), e.append(t), e;
|
|
661
1005
|
}
|
|
662
|
-
},
|
|
1006
|
+
}, P = class {
|
|
663
1007
|
callbacks;
|
|
664
1008
|
i18n;
|
|
665
1009
|
root;
|
|
@@ -676,8 +1020,8 @@ var v = class {
|
|
|
676
1020
|
"default"
|
|
677
1021
|
],
|
|
678
1022
|
[
|
|
679
|
-
"
|
|
680
|
-
"layout.
|
|
1023
|
+
"wide",
|
|
1024
|
+
"layout.wide",
|
|
681
1025
|
"wide"
|
|
682
1026
|
],
|
|
683
1027
|
[
|
|
@@ -693,7 +1037,7 @@ var v = class {
|
|
|
693
1037
|
});
|
|
694
1038
|
let a = document.createElement("span");
|
|
695
1039
|
a.className = "comimi-view-switcher-icon-wrap";
|
|
696
|
-
let o =
|
|
1040
|
+
let o = u(r);
|
|
697
1041
|
o.classList.add("comimi-view-switcher-icon"), a.append(o);
|
|
698
1042
|
let s = document.createElement("span");
|
|
699
1043
|
return s.className = "comimi-view-switcher-label", s.textContent = t.t(n), i.append(a, s), this.root.append(i), {
|
|
@@ -719,90 +1063,23 @@ var v = class {
|
|
|
719
1063
|
}
|
|
720
1064
|
this.tooltip.textContent = this.i18n.t("overlay.layout"), this.prevMode = e.layout.mode;
|
|
721
1065
|
}
|
|
722
|
-
};
|
|
723
|
-
|
|
724
|
-
//#region src/components/page-layout.ts
|
|
725
|
-
function C(e, t) {
|
|
726
|
-
return A(e, e.currentPageIndex, t);
|
|
727
|
-
}
|
|
728
|
-
function w(e, t, n) {
|
|
729
|
-
let r = C(e, n), i = t === "previous" ? Math.min(...r) - 1 : Math.max(...r) + 1;
|
|
730
|
-
return i < 0 || i >= e.manga.pages.length ? [] : A(e, i, n);
|
|
731
|
-
}
|
|
732
|
-
function T(e, t) {
|
|
733
|
-
let n = [];
|
|
734
|
-
for (let r = 1; r >= 1; --r) {
|
|
735
|
-
let i = k(e, "previous", r, t);
|
|
736
|
-
i.length > 0 && n.push({
|
|
737
|
-
indexes: i,
|
|
738
|
-
placement: "previous",
|
|
739
|
-
offset: E(e, "previous", r)
|
|
740
|
-
});
|
|
741
|
-
}
|
|
742
|
-
n.push({
|
|
743
|
-
indexes: C(e, t),
|
|
744
|
-
placement: "current",
|
|
745
|
-
offset: 0
|
|
746
|
-
});
|
|
747
|
-
for (let r = 1; r <= 1; r += 1) {
|
|
748
|
-
let i = k(e, "next", r, t);
|
|
749
|
-
i.length > 0 && n.push({
|
|
750
|
-
indexes: i,
|
|
751
|
-
placement: "next",
|
|
752
|
-
offset: E(e, "next", r)
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
return n;
|
|
756
|
-
}
|
|
757
|
-
function E(e, t, n) {
|
|
758
|
-
let r = e.settings.readingDirection === "rtl" ? -1 : 1;
|
|
759
|
-
return (t === "next" ? r : -r) * n;
|
|
760
|
-
}
|
|
761
|
-
function D(e, t) {
|
|
762
|
-
if (t === "current") return "center";
|
|
763
|
-
let n = e.settings.readingDirection === "rtl" ? "left" : "right";
|
|
764
|
-
return t === "next" ? n : n === "left" ? "right" : "left";
|
|
765
|
-
}
|
|
766
|
-
function O(e, t) {
|
|
767
|
-
return t === "rtl" ? e > 0 : e < 0;
|
|
768
|
-
}
|
|
769
|
-
function k(e, t, n, r) {
|
|
770
|
-
let i = C(e, r);
|
|
771
|
-
for (let a = 0; a < n; a += 1) {
|
|
772
|
-
let n = t === "previous" ? Math.min(...i) - 1 : Math.max(...i) + 1;
|
|
773
|
-
if (n < 0 || n >= e.manga.pages.length) return [];
|
|
774
|
-
i = A(e, n, r);
|
|
775
|
-
}
|
|
776
|
-
return i;
|
|
777
|
-
}
|
|
778
|
-
function A(e, t, n) {
|
|
779
|
-
let { manga: r, settings: i } = e;
|
|
780
|
-
if (n || i.pageTurnMode !== "spread" || i.hasCover && t === 0) return [t];
|
|
781
|
-
let a = [t, oe(e, t)].filter((e) => e >= 0 && e < r.pages.length), o = [...new Set(a)].sort((e, t) => e - t);
|
|
782
|
-
return i.readingDirection === "rtl" ? o.reverse() : o;
|
|
783
|
-
}
|
|
784
|
-
function oe(e, t) {
|
|
785
|
-
return e.settings.hasCover ? t % 2 == 1 ? t + 1 : t - 1 : t % 2 == 0 ? t + 1 : t - 1;
|
|
786
|
-
}
|
|
787
|
-
//#endregion
|
|
788
|
-
//#region src/components/error-icon.ts
|
|
789
|
-
var j = "\n<svg viewBox=\"0 0 112.19 99.01\" class=\"comimi-error-svg\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path class=\"comimi-error-stroke\" d=\"M17.43,53.54c-7.74,7.51-12.43,17.29-12.43,27.99,0,4.34.78,8.53,2.21,12.48\" />\n <path class=\"comimi-error-stroke\" d=\"M104.98,94.01c1.43-3.95,2.21-8.14,2.21-12.48,0-10.91-4.87-20.85-12.87-28.42\" />\n <path class=\"comimi-error-stroke comimi-error-mimi comimi-error-mimi-left\" d=\"M55.79,43.81v-24.02c3.43-9.18,9.81-15.08,20.52-14.52,16.12.84,20.31,15.9,19.35,34.15-.25,4.75-.69,9.25-1.51,13.3\" />\n <path class=\"comimi-error-stroke comimi-error-mimi comimi-error-mimi-right\" d=\"M55.79,43.62v-24.02c-3.25-9.2-9.34-15.11-19.78-14.56-16.53.87-21.21,15.95-20.25,34.2.26,4.91.67,9.56,1.51,13.72\" />\n <path fill=\"#fff\" d=\"M80.44,49.41H31.46c-12.97,6.71-21.6,18.57-21.6,32.1,0,5.8,1.59,11.3,4.43,16.21h83.34c2.83-4.92,4.43-10.41,4.43-16.21,0-13.53-8.63-25.4-21.6-32.1Z\" />\n <g class=\"comimi-error-eyes\">\n <path class=\"comimi-error-eye\" d=\"M45.85,75.85c1.92,1.92,1.92,5.05,0,6.97s-5.05,1.92-6.97,0l-1.74-1.74-1.74,1.74c-1.92,1.92-5.05,1.92-6.97,0-1.92-1.92-1.92-5.05,0-6.97l1.74-1.74-1.74-1.74c-1.92-1.92-1.92-5.05,0-6.97s5.05-1.92,6.97,0l1.74,1.74,1.74-1.74c1.92-1.92,5.05-1.92,6.97,0,1.93,1.92,1.93,5.05,0,6.97l-1.74,1.74,1.74,1.74Z\" />\n <path class=\"comimi-error-eye\" d=\"M77.89,75.85c1.92,1.92,1.92,5.05,0,6.97-1.92,1.92-5.05,1.92-6.97,0l-1.74-1.74-1.74,1.74c-1.92,1.92-5.05,1.92-6.97,0-1.92-1.92-1.92-5.05,0-6.97l1.74-1.74-1.74-1.74c-1.92-1.92-1.92-5.05,0-6.97,1.92-1.92,5.05-1.92,6.97,0l1.74,1.74,1.74-1.74c1.92-1.92,5.05-1.92,6.97,0,1.92,1.92,1.92,5.05,0,6.97l-1.74,1.74,1.74,1.74Z\" />\n </g>\n </g>\n</svg>\n";
|
|
790
|
-
function M(e, t) {
|
|
1066
|
+
}, F = "\n<svg viewBox=\"0 0 112.19 99.01\" class=\"comimi-error-svg\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path class=\"comimi-error-stroke\" d=\"M17.43,53.54c-7.74,7.51-12.43,17.29-12.43,27.99,0,4.34.78,8.53,2.21,12.48\" />\n <path class=\"comimi-error-stroke\" d=\"M104.98,94.01c1.43-3.95,2.21-8.14,2.21-12.48,0-10.91-4.87-20.85-12.87-28.42\" />\n <path class=\"comimi-error-stroke comimi-error-mimi comimi-error-mimi-left\" d=\"M55.79,43.81v-24.02c3.43-9.18,9.81-15.08,20.52-14.52,16.12.84,20.31,15.9,19.35,34.15-.25,4.75-.69,9.25-1.51,13.3\" />\n <path class=\"comimi-error-stroke comimi-error-mimi comimi-error-mimi-right\" d=\"M55.79,43.62v-24.02c-3.25-9.2-9.34-15.11-19.78-14.56-16.53.87-21.21,15.95-20.25,34.2.26,4.91.67,9.56,1.51,13.72\" />\n <path fill=\"#fff\" d=\"M80.44,49.41H31.46c-12.97,6.71-21.6,18.57-21.6,32.1,0,5.8,1.59,11.3,4.43,16.21h83.34c2.83-4.92,4.43-10.41,4.43-16.21,0-13.53-8.63-25.4-21.6-32.1Z\" />\n <g class=\"comimi-error-eyes\">\n <path class=\"comimi-error-eye\" d=\"M45.85,75.85c1.92,1.92,1.92,5.05,0,6.97s-5.05,1.92-6.97,0l-1.74-1.74-1.74,1.74c-1.92,1.92-5.05,1.92-6.97,0-1.92-1.92-1.92-5.05,0-6.97l1.74-1.74-1.74-1.74c-1.92-1.92-1.92-5.05,0-6.97s5.05-1.92,6.97,0l1.74,1.74,1.74-1.74c1.92-1.92,5.05-1.92,6.97,0,1.93,1.92,1.93,5.05,0,6.97l-1.74,1.74,1.74,1.74Z\" />\n <path class=\"comimi-error-eye\" d=\"M77.89,75.85c1.92,1.92,1.92,5.05,0,6.97-1.92,1.92-5.05,1.92-6.97,0l-1.74-1.74-1.74,1.74c-1.92,1.92-5.05,1.92-6.97,0-1.92-1.92-1.92-5.05,0-6.97l1.74-1.74-1.74-1.74c-1.92-1.92-1.92-5.05,0-6.97,1.92-1.92,5.05-1.92,6.97,0l1.74,1.74,1.74-1.74c1.92-1.92,5.05-1.92,6.97,0,1.92,1.92,1.92,5.05,0,6.97l-1.74,1.74,1.74,1.74Z\" />\n </g>\n </g>\n</svg>\n";
|
|
1067
|
+
function I(e, t) {
|
|
791
1068
|
let n = document.createElement("div");
|
|
792
1069
|
n.className = "comimi-error-icon";
|
|
793
1070
|
let r = document.createElement("div");
|
|
794
|
-
r.className = "comimi-error-icon-svg", r.innerHTML =
|
|
1071
|
+
r.className = "comimi-error-icon-svg", r.innerHTML = F;
|
|
795
1072
|
let i = document.createElement("div");
|
|
796
1073
|
return i.className = "comimi-error-icon-text", i.textContent = e.t("error.pageRequestFailed", { page: t }), n.append(r, i), n;
|
|
797
1074
|
}
|
|
798
1075
|
//#endregion
|
|
799
1076
|
//#region src/components/loading-icon.ts
|
|
800
|
-
var
|
|
801
|
-
function
|
|
1077
|
+
var L = "\n<svg viewBox=\"0 0 112.19 99.01\" class=\"comimi-loading-svg\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path class=\"comimi-loading-stroke\" d=\"M17.43,53.54c-7.74,7.51-12.43,17.29-12.43,27.99,0,4.34.78,8.53,2.21,12.48\" />\n <path class=\"comimi-loading-stroke\" d=\"M104.98,94.01c1.43-3.95,2.21-8.14,2.21-12.48,0-10.91-4.87-20.85-12.87-28.42\" />\n <path class=\"comimi-loading-stroke comimi-loading-mimi comimi-loading-mimi-left\" d=\"M55.79,43.81v-24.02c3.43-9.18,9.81-15.08,20.52-14.52,16.12.84,20.31,15.9,19.35,34.15-.25,4.75-.69,9.25-1.51,13.3\" />\n <path class=\"comimi-loading-stroke comimi-loading-mimi comimi-loading-mimi-right\" d=\"M55.79,43.62v-24.02c-3.25-9.2-9.34-15.11-19.78-14.56-16.53.87-21.21,15.95-20.25,34.2.26,4.91.67,9.56,1.51,13.72\" />\n <path fill=\"#fff\" d=\"M80.44,49.41H31.46c-12.97,6.71-21.6,18.57-21.6,32.1,0,5.8,1.59,11.3,4.43,16.21h83.34c2.83-4.92,4.43-10.41,4.43-16.21,0-13.53-8.63-25.4-21.6-32.1Z\" />\n <g class=\"comimi-loading-eyes\">\n <circle class=\"comimi-loading-eye\" cx=\"40.17\" cy=\"78.21\" r=\"6\" />\n <circle class=\"comimi-loading-eye\" cx=\"71.58\" cy=\"78.21\" r=\"6\" />\n </g>\n </g>\n</svg>\n", R = 3e3;
|
|
1078
|
+
function z(e) {
|
|
802
1079
|
let t = document.createElement("div");
|
|
803
1080
|
t.className = "comimi-loading-icon";
|
|
804
1081
|
let n = document.createElement("div");
|
|
805
|
-
n.className = "comimi-loading-icon-svg", n.innerHTML =
|
|
1082
|
+
n.className = "comimi-loading-icon-svg", n.innerHTML = L;
|
|
806
1083
|
let r = document.createElement("div");
|
|
807
1084
|
r.className = "comimi-loading-icon-text", r.append(document.createTextNode(e.t("loading")));
|
|
808
1085
|
for (let e = 0; e < 3; e += 1) {
|
|
@@ -815,13 +1092,13 @@ function F(e) {
|
|
|
815
1092
|
window.clearInterval(i);
|
|
816
1093
|
return;
|
|
817
1094
|
}
|
|
818
|
-
n.innerHTML =
|
|
819
|
-
},
|
|
1095
|
+
n.innerHTML = L;
|
|
1096
|
+
}, R);
|
|
820
1097
|
return t;
|
|
821
1098
|
}
|
|
822
1099
|
//#endregion
|
|
823
1100
|
//#region src/components/page-stage.ts
|
|
824
|
-
var
|
|
1101
|
+
var B = class {
|
|
825
1102
|
options;
|
|
826
1103
|
root;
|
|
827
1104
|
imageSources = /* @__PURE__ */ new Map();
|
|
@@ -837,75 +1114,83 @@ var I = class {
|
|
|
837
1114
|
this.root.dataset.dragging = t ? "false" : String(e !== 0), this.root.style.transform = e === 0 ? "" : `translateX(${e}px)`;
|
|
838
1115
|
}
|
|
839
1116
|
snapTransform() {
|
|
840
|
-
this.root.dataset.dragging = "false", this.root.style.transition = "none", this.root.style.transform = "", typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => {
|
|
1117
|
+
this.root.dataset.dragging = "false", this.root.style.transition = "none", this.root.style.transform = "", this.root.offsetWidth, typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => {
|
|
841
1118
|
this.root.style.transition = "";
|
|
842
1119
|
}) : this.root.style.transition = "";
|
|
843
1120
|
}
|
|
844
1121
|
update(e, t) {
|
|
845
|
-
let n =
|
|
1122
|
+
let n = x(e, t), r = [];
|
|
846
1123
|
for (let t of n) {
|
|
847
1124
|
let n = document.createElement("div");
|
|
848
|
-
n.className = "comimi-page-group", n.dataset.placement = t.placement, n.dataset.side =
|
|
1125
|
+
n.className = "comimi-page-group", n.dataset.placement = t.placement, n.dataset.side = C(e, t.placement), n.style.transform = `translateX(${t.offset * 100}%)`;
|
|
849
1126
|
let i = t.indexes.length > 1;
|
|
850
1127
|
for (let [r, a] of t.indexes.entries()) {
|
|
851
1128
|
let t = e.manga.pages[a];
|
|
852
1129
|
if (!t) continue;
|
|
853
|
-
let o = this.getOrBuildSlot(e, t, a);
|
|
854
|
-
o.slot.dataset.spread = String(i), o.slot.dataset.position = i ? r === 0 ? "left" : "right" : "single", o.slot.dataset.pageIndex = String(a), o.img && (o.img.style.transform =
|
|
1130
|
+
let o = this.getOrBuildSlot(e, t, a, i);
|
|
1131
|
+
o.slot.dataset.spread = String(i), o.slot.dataset.position = i ? r === 0 ? "left" : "right" : "single", o.slot.dataset.pageIndex = String(a), o.img && (o.img.style.transform = V(e)), n.append(o.slot);
|
|
855
1132
|
}
|
|
856
1133
|
r.push(n);
|
|
857
1134
|
}
|
|
858
1135
|
this.root.replaceChildren(...r);
|
|
859
1136
|
}
|
|
860
|
-
getOrBuildSlot(e, t, n) {
|
|
861
|
-
let
|
|
862
|
-
if (
|
|
863
|
-
let
|
|
864
|
-
return this.slots.set(t.id,
|
|
1137
|
+
getOrBuildSlot(e, t, n, r) {
|
|
1138
|
+
let i = this.slots.get(t.id);
|
|
1139
|
+
if (i) return i;
|
|
1140
|
+
let a = this.buildSlot(e, t, n, r);
|
|
1141
|
+
return this.slots.set(t.id, a), a;
|
|
865
1142
|
}
|
|
866
|
-
buildSlot(e, t, n) {
|
|
867
|
-
let
|
|
868
|
-
if (
|
|
1143
|
+
buildSlot(e, t, n, r) {
|
|
1144
|
+
let i = document.createElement("div");
|
|
1145
|
+
if (i.className = "comimi-page", t.type === "html") {
|
|
869
1146
|
let n = document.createElement("div");
|
|
870
|
-
return n.className = "comimi-html-page", n.innerHTML = t.html, n.style.transform =
|
|
871
|
-
slot:
|
|
1147
|
+
return n.className = "comimi-html-page", n.innerHTML = t.html, n.style.transform = V(e), i.append(n), {
|
|
1148
|
+
slot: i,
|
|
872
1149
|
img: null
|
|
873
1150
|
};
|
|
874
1151
|
}
|
|
875
|
-
let
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
}),
|
|
879
|
-
let
|
|
880
|
-
if (
|
|
881
|
-
slot:
|
|
882
|
-
img:
|
|
1152
|
+
let a = document.createElement("img");
|
|
1153
|
+
a.alt = t.alt ?? t.label ?? `${n + 1}`, a.draggable = !1, a.style.transform = V(e), a.addEventListener("error", () => {
|
|
1154
|
+
i.replaceChildren(I(this.options.i18n, n + 1));
|
|
1155
|
+
}), a.addEventListener("contextmenu", (e) => e.preventDefault()), i.append(a);
|
|
1156
|
+
let o = `${e.manga.id}:${t.id}`, s = this.imageSources.get(o);
|
|
1157
|
+
if (s) return a.src = s, {
|
|
1158
|
+
slot: i,
|
|
1159
|
+
img: a
|
|
883
1160
|
};
|
|
884
|
-
let
|
|
885
|
-
|
|
886
|
-
let
|
|
887
|
-
|
|
888
|
-
this.
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
1161
|
+
let c = z(this.options.i18n);
|
|
1162
|
+
i.append(c), a.style.visibility = "hidden";
|
|
1163
|
+
let l = this.resolvePromises.get(o);
|
|
1164
|
+
if (!l) {
|
|
1165
|
+
let i = this.options.resolvePageSrc;
|
|
1166
|
+
l = i ? Promise.resolve(i({
|
|
1167
|
+
page: t,
|
|
1168
|
+
pageIndex: n,
|
|
1169
|
+
isSpread: r
|
|
1170
|
+
})) : this.options.assetLoader.resolveImageSource(e.manga.id, t), this.resolvePromises.set(o, l), l.then((e) => {
|
|
1171
|
+
this.imageSources.set(o, e);
|
|
1172
|
+
}).finally(() => {
|
|
1173
|
+
this.resolvePromises.delete(o);
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
return l.then((e) => {
|
|
1177
|
+
a.addEventListener("load", () => {
|
|
1178
|
+
a.style.visibility = "", c.remove();
|
|
1179
|
+
}, { once: !0 }), a.src = e;
|
|
895
1180
|
}).catch(() => {
|
|
896
|
-
|
|
1181
|
+
c.remove(), i.replaceChildren(I(this.options.i18n, n + 1));
|
|
897
1182
|
}), {
|
|
898
|
-
slot:
|
|
899
|
-
img:
|
|
1183
|
+
slot: i,
|
|
1184
|
+
img: a
|
|
900
1185
|
};
|
|
901
1186
|
}
|
|
902
1187
|
};
|
|
903
|
-
function
|
|
1188
|
+
function V(e) {
|
|
904
1189
|
return `translate(${e.panX}px, ${e.panY}px) scale(${e.zoomScale})`;
|
|
905
1190
|
}
|
|
906
1191
|
//#endregion
|
|
907
1192
|
//#region src/components/notifications.ts
|
|
908
|
-
function
|
|
1193
|
+
function H(e) {
|
|
909
1194
|
let t = document.createElement("div");
|
|
910
1195
|
t.className = "comimi-notifications";
|
|
911
1196
|
for (let n of e.notifications) {
|
|
@@ -920,39 +1205,53 @@ function R(e) {
|
|
|
920
1205
|
}
|
|
921
1206
|
//#endregion
|
|
922
1207
|
//#region src/components/splash-screen.ts
|
|
923
|
-
var
|
|
924
|
-
function
|
|
925
|
-
let t = document.createElement("div");
|
|
926
|
-
t.className = "comimi-splash";
|
|
1208
|
+
var U = "http://www.w3.org/2000/svg";
|
|
1209
|
+
function W(e, t) {
|
|
927
1210
|
let n = document.createElement("div");
|
|
928
|
-
n.className = "comimi-splash
|
|
1211
|
+
n.className = "comimi-splash";
|
|
929
1212
|
let r = document.createElement("div");
|
|
930
|
-
r.className = "comimi-splash-logo", r.
|
|
931
|
-
let i =
|
|
932
|
-
i
|
|
1213
|
+
r.className = "comimi-splash-logo-wrap", t && r.classList.add("comimi-splash-logo-wrap-custom");
|
|
1214
|
+
let i = G(t);
|
|
1215
|
+
i && r.append(i);
|
|
1216
|
+
let a = document.createElement("div");
|
|
1217
|
+
a.className = "comimi-splash-text", a.append(document.createTextNode(e.t("splash.loading")));
|
|
933
1218
|
for (let e = 0; e < 3; e += 1) {
|
|
934
1219
|
let e = document.createElement("span");
|
|
935
|
-
e.textContent = ".",
|
|
1220
|
+
e.textContent = ".", a.append(e);
|
|
1221
|
+
}
|
|
1222
|
+
return r.append(a), n.append(r), n;
|
|
1223
|
+
}
|
|
1224
|
+
function G(e) {
|
|
1225
|
+
if (e === !1) return null;
|
|
1226
|
+
if (e) {
|
|
1227
|
+
let t = document.createElement("div");
|
|
1228
|
+
if (t.className = "comimi-splash-custom-logo", "render" in e) t.append(e.render());
|
|
1229
|
+
else {
|
|
1230
|
+
let n = document.createElement("img");
|
|
1231
|
+
n.src = e.src, n.alt = e.alt ?? "", n.draggable = !1, t.append(n);
|
|
1232
|
+
}
|
|
1233
|
+
return t;
|
|
936
1234
|
}
|
|
937
|
-
|
|
1235
|
+
let t = document.createElement("div");
|
|
1236
|
+
return t.className = "comimi-splash-logo", t.append(le(), ue()), t;
|
|
938
1237
|
}
|
|
939
|
-
function
|
|
940
|
-
let e = document.createElementNS(
|
|
941
|
-
e.setAttribute("viewBox", "0 0 112.19 99.01"), e.setAttribute("class", "comimi-splash-symbol"),
|
|
942
|
-
let t = document.createElementNS(
|
|
1238
|
+
function le() {
|
|
1239
|
+
let e = document.createElementNS(U, "svg");
|
|
1240
|
+
e.setAttribute("viewBox", "0 0 112.19 99.01"), e.setAttribute("class", "comimi-splash-symbol"), K(e, "M17.43,53.54c-7.74,7.51-12.43,17.29-12.43,27.99,0,4.34.78,8.53,2.21,12.48"), K(e, "M104.98,94.01c1.43-3.95,2.21-8.14,2.21-12.48,0-10.91-4.87-20.85-12.87-28.42"), K(e, "M55.79,43.81v-24.02c3.43-9.18,9.81-15.08,20.52-14.52,16.12.84,20.31,15.9,19.35,34.15-.25,4.75-.69,9.25-1.51,13.3", "comimi-splash-mimi comimi-splash-mimi-left"), K(e, "M55.79,43.62v-24.02c-3.25-9.2-9.34-15.11-19.78-14.56-16.53.87-21.21,15.95-20.25,34.2.26,4.91.67,9.56,1.51,13.72", "comimi-splash-mimi comimi-splash-mimi-right");
|
|
1241
|
+
let t = document.createElementNS(U, "path");
|
|
943
1242
|
t.setAttribute("d", "M80.44,49.41H31.46c-12.97,6.71-21.6,18.57-21.6,32.1,0,5.8,1.59,11.3,4.43,16.21h83.34c2.83-4.92,4.43-10.41,4.43-16.21,0-13.53-8.63-25.4-21.6-32.1Z"), t.setAttribute("fill", "#e0e0e0"), e.append(t);
|
|
944
|
-
let n = document.createElementNS(
|
|
1243
|
+
let n = document.createElementNS(U, "g");
|
|
945
1244
|
n.setAttribute("class", "comimi-splash-eyes");
|
|
946
1245
|
for (let e of ["40.17", "71.58"]) {
|
|
947
|
-
let t = document.createElementNS(
|
|
1246
|
+
let t = document.createElementNS(U, "circle");
|
|
948
1247
|
t.setAttribute("class", "comimi-splash-eye"), t.setAttribute("cx", e), t.setAttribute("cy", "78.21"), t.setAttribute("r", "6"), t.setAttribute("fill", "#fff"), n.append(t);
|
|
949
1248
|
}
|
|
950
1249
|
return e.append(n), e;
|
|
951
1250
|
}
|
|
952
|
-
function
|
|
1251
|
+
function ue() {
|
|
953
1252
|
let e = document.createElement("div");
|
|
954
1253
|
e.className = "comimi-splash-typo-wrap";
|
|
955
|
-
let t = document.createElementNS(
|
|
1254
|
+
let t = document.createElementNS(U, "svg");
|
|
956
1255
|
t.setAttribute("viewBox", "0 0 227.74 38.52"), t.setAttribute("class", "comimi-splash-typo");
|
|
957
1256
|
for (let e of [
|
|
958
1257
|
"M12.53,14.42c-3.15,3.27-3.15,8.45,0,11.6,1.58,1.58,3.6,2.36,5.74,2.36,2.25,0,4.28-.79,5.86-2.36,1.91-1.91,5.18-1.91,7.21,0,1.91,2.03,1.91,5.18,0,7.21-3.49,3.49-8.11,5.29-13.07,5.29s-9.46-1.8-12.95-5.29C-1.77,26.02-1.77,14.42,5.32,7.32,12.53.11,24.13.11,31.34,7.32c1.91,1.91,1.91,5.18,0,7.1-2.03,2.03-5.29,2.03-7.21,0-3.15-3.15-8.45-3.15-11.6,0Z",
|
|
@@ -962,7 +1261,7 @@ function H() {
|
|
|
962
1261
|
"M208.61,15.88v17.57c0,2.82-2.25,5.07-5.07,5.07s-5.07-2.25-5.07-5.07V15.88c0-2.36-2.03-4.39-4.51-4.39-1.13,0-2.25.45-3.15,1.24-.79.9-1.24,2.03-1.24,3.15v14.57c0,2.82-2.25,5.07-5.07,5.07s-5.07-2.25-5.07-5.07v-14.57c0-2.36-2.03-4.39-4.5-4.39s-4.39,1.92-4.39,4.39v17.68c0,2.7-2.25,4.96-5.07,4.96s-5.07-2.25-5.07-5.07V15.88c0-8,6.53-14.53,14.53-14.53,3.72,0,6.98,1.35,9.57,3.49,2.59-2.25,5.97-3.49,9.46-3.49,8.11,0,14.64,6.53,14.64,14.53Z",
|
|
963
1262
|
"M227.74,5.07v28.38c0,2.82-2.25,5.07-5.07,5.07s-5.07-2.25-5.07-5.07V5.07c0-2.7,2.25-5.07,5.07-5.07s5.07,2.36,5.07,5.07Z"
|
|
964
1263
|
]) {
|
|
965
|
-
let n = document.createElementNS(
|
|
1264
|
+
let n = document.createElementNS(U, "path");
|
|
966
1265
|
n.setAttribute("d", e), n.setAttribute("fill", "#fff"), t.append(n);
|
|
967
1266
|
}
|
|
968
1267
|
e.append(t);
|
|
@@ -971,48 +1270,51 @@ function H() {
|
|
|
971
1270
|
let r = document.createElement("div");
|
|
972
1271
|
return r.className = "comimi-splash-heart comimi-splash-heart-2", e.append(n, r), e;
|
|
973
1272
|
}
|
|
974
|
-
function
|
|
975
|
-
let r = document.createElementNS(
|
|
1273
|
+
function K(e, t, n) {
|
|
1274
|
+
let r = document.createElementNS(U, "path");
|
|
976
1275
|
r.setAttribute("d", t), r.setAttribute("class", `comimi-splash-stroke ${n ?? ""}`.trim()), e.append(r);
|
|
977
1276
|
}
|
|
978
1277
|
//#endregion
|
|
979
1278
|
//#region src/components/viewer-root.ts
|
|
980
|
-
function
|
|
1279
|
+
function de({ className: e } = {}) {
|
|
981
1280
|
let t = document.createElement("div");
|
|
982
1281
|
return t.className = e ? `comimi-root ${e}` : "comimi-root", t.tabIndex = 0, t.setAttribute("role", "region"), t.setAttribute("aria-label", "Manga viewer"), t;
|
|
983
1282
|
}
|
|
984
1283
|
//#endregion
|
|
985
1284
|
//#region src/components/arrow-buttons.styles.ts
|
|
986
|
-
var G = "\n.comimi-arrows {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 30;\n}\n\n.comimi-arrow-button {\n position: absolute;\n top: 50%;\n width: 46px;\n height: 46px;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n pointer-events: auto;\n transform: translateY(-50%);\n}\n\n.comimi-arrow-next {\n right: 24px;\n}\n\n.comimi-arrow-prev {\n left: 24px;\n}\n\n.comimi-arrow-inner {\n position: absolute;\n inset: 0;\n transition:\n transform 0.6s var(--comimi-spring),\n opacity 0.3s linear;\n}\n\n.comimi-arrows[data-overlay=\"false\"] .comimi-arrow-next .comimi-arrow-inner {\n transform: translateX(35px);\n opacity: 0;\n transition:\n transform 0.3s var(--comimi-spring),\n opacity 0.15s linear;\n}\n\n.comimi-arrows[data-overlay=\"false\"] .comimi-arrow-prev .comimi-arrow-inner {\n transform: translateX(-35px);\n opacity: 0;\n transition:\n transform 0.3s var(--comimi-spring),\n opacity 0.15s linear;\n}\n\n.comimi-arrows[data-overlay=\"false\"] {\n pointer-events: none;\n}\n\n.comimi-arrow-bg {\n position: absolute;\n inset: 0;\n border-radius: 16px;\n background: var(--comimi-glass);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n transition: inset 0.36s var(--comimi-spring), border-radius 0.36s var(--comimi-spring);\n}\n\n.comimi-arrow-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 20px;\n height: 20px;\n color: #666;\n transform: translate(-50%, -50%);\n pointer-events: none;\n}\n\n.comimi-arrow-prev .comimi-arrow-icon {\n transform: translate(-50%, -50%) scaleX(-1);\n}\n\n@keyframes comimi-arrow-bounce {\n from, to {\n transform: translate(-50%, -50%);\n }\n 40% {\n transform: translate(calc(-50% + 3px), -50%);\n }\n 70% {\n transform: translate(calc(-50% - 1.5px), -50%);\n }\n}\n\n@keyframes comimi-arrow-bounce-prev {\n from, to {\n transform: translate(-50%, -50%) scaleX(-1);\n }\n 40% {\n transform: translate(calc(-50% - 3px), -50%) scaleX(-1);\n }\n 70% {\n transform: translate(calc(-50% + 1.5px), -50%) scaleX(-1);\n }\n}\n\n@media (hover: hover) {\n .comimi-arrow-button:hover .comimi-arrow-bg {\n inset: -3px;\n border-radius: 20px;\n }\n\n .comimi-arrow-next:hover .comimi-arrow-icon {\n animation: comimi-arrow-bounce 0.5s ease-in-out 0.1s both;\n }\n\n .comimi-arrow-prev:hover .comimi-arrow-icon {\n animation: comimi-arrow-bounce-prev 0.5s ease-in-out 0.1s both;\n }\n}\n\n@media (max-width: 767px) {\n .comimi-arrow-button {\n width: 36px;\n height: 50px;\n }\n\n .comimi-arrow-next {\n right: 0;\n }\n\n .comimi-arrow-prev {\n left: 0;\n }\n\n .comimi-arrow-next .comimi-arrow-bg {\n border-radius: 16px 0 0 16px;\n }\n\n .comimi-arrow-prev .comimi-arrow-bg {\n border-radius: 0 16px 16px 0;\n }\n}\n", K = "\n.comimi-center-message {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n pointer-events: none;\n z-index: 20;\n transition: opacity 0.3s linear;\n}\n\n.comimi-center-message[data-overlay=\"false\"] {\n opacity: 0;\n transition: opacity 0.15s linear;\n}\n\n.comimi-center-message-text {\n box-sizing: border-box;\n padding: 6px 12px;\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.5);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n color: #bbb;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.45;\n text-align: center;\n white-space: nowrap;\n}\n\n.comimi-center-message-mobile {\n display: none;\n}\n\n@media (max-width: 767px) {\n .comimi-center-message {\n width: calc(100% - 60px * 2);\n max-width: max-content;\n }\n\n .comimi-center-message-desktop {\n display: none;\n }\n\n .comimi-center-message-mobile {\n display: block;\n }\n}\n", q = "\n/* --- Controls dock (bottom) ------------------------------------------- */\n\n.comimi-controls-dock {\n box-sizing: border-box;\n position: absolute;\n bottom: 24px;\n left: 24px;\n width: calc(100% - 48px);\n padding: 20px 24px;\n z-index: 40;\n pointer-events: auto;\n transition:\n transform 0.6s var(--comimi-spring),\n opacity 0.3s linear;\n}\n\n.comimi-controls-dock[data-overlay=\"false\"] {\n transform: translateY(35px);\n opacity: 0;\n pointer-events: none;\n transition:\n transform 0.3s var(--comimi-spring),\n opacity 0.15s linear;\n}\n\n.comimi-controls-bg {\n position: absolute;\n inset: 0;\n border-radius: 20px;\n background: var(--comimi-glass);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n transition: inset 0.36s var(--comimi-spring), border-radius 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-controls-dock:hover > .comimi-controls-bg {\n inset: -4px -4px 0 -4px;\n border-radius: 20px;\n }\n}\n\n.comimi-controls-row {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n justify-content: space-between;\n align-items: center;\n}\n\n.comimi-controls-side {\n display: grid;\n grid-auto-flow: column;\n column-gap: 16px;\n justify-content: end;\n align-items: center;\n transition:\n opacity 0.2s ease-in-out,\n visibility 0.2s ease-in-out;\n}\n\n.comimi-controls-dock[data-autoplay=\"true\"] .comimi-controls-side {\n opacity: 0;\n visibility: hidden;\n}\n\n/* --- Seek bar --------------------------------------------------------- */\n\n.comimi-seek {\n position: relative;\n display: grid;\n grid-template-columns: auto 1fr;\n column-gap: 10px;\n align-items: center;\n margin-bottom: 10px;\n}\n\n.comimi-seek-text {\n display: grid;\n grid-template-columns: repeat(2, auto);\n justify-content: start;\n align-items: end;\n line-height: 14px;\n}\n\n.comimi-seek-current {\n color: #333;\n font-size: 12px;\n font-weight: 700;\n}\n\n.comimi-seek-total {\n color: #999;\n font-size: 12px;\n font-weight: 400;\n margin-left: 0.4em;\n}\n\n.comimi-seek-bar {\n position: relative;\n width: 100%;\n height: 18px;\n}\n\n.comimi-seek-track {\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n height: 8px;\n border-radius: 999px;\n background: #e0e0e0;\n overflow: hidden;\n transform: translateY(-50%);\n transition: height 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-seek-bar:hover .comimi-seek-track {\n height: 12px;\n }\n}\n\n.comimi-seek-fill {\n position: absolute;\n top: 0;\n height: 100%;\n border-radius: 999px;\n background: #666;\n}\n\n.comimi-seek-bar[data-direction=\"rtl\"] .comimi-seek-fill {\n right: 0;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.comimi-seek-bar[data-direction=\"ltr\"] .comimi-seek-fill {\n left: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.comimi-seek-input {\n position: absolute;\n inset: 0;\n z-index: 1;\n width: 100%;\n height: 18px;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n}\n\n.comimi-seek-input::-webkit-slider-runnable-track {\n height: 8px;\n background: transparent;\n border: 0;\n}\n\n.comimi-seek-input::-webkit-slider-thumb {\n appearance: none;\n -webkit-appearance: none;\n width: 18px;\n height: 18px;\n margin-top: -5px;\n border: 0;\n border-radius: 50%;\n background: #666;\n box-shadow: none;\n transition:\n transform 0.36s var(--comimi-spring),\n background-color 0.2s ease-in-out;\n}\n\n.comimi-seek-input:hover::-webkit-slider-thumb {\n transform: scale(1.15);\n}\n\n.comimi-seek-input::-moz-range-track {\n height: 8px;\n background: transparent;\n border: 0;\n}\n\n.comimi-seek-input::-moz-range-thumb {\n width: 18px;\n height: 18px;\n border: 0;\n border-radius: 50%;\n background: #666;\n box-shadow: none;\n transition:\n transform 0.36s var(--comimi-spring),\n background-color 0.2s ease-in-out;\n}\n\n.comimi-seek-input:hover::-moz-range-thumb {\n transform: scale(1.15);\n}\n\n.comimi-seek-input:focus-visible {\n outline: none;\n}\n\n.comimi-seek-input:focus-visible::-webkit-slider-thumb {\n box-shadow: none;\n}\n\n.comimi-seek-input:focus-visible::-moz-range-thumb {\n box-shadow: none;\n}\n\n.comimi-seek-input[data-direction=\"rtl\"] {\n direction: rtl;\n}\n\n/* --- Auto Play -------------------------------------------------------- */\n\n.comimi-autoplay {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n column-gap: 12px;\n justify-content: start;\n align-items: center;\n}\n\n.comimi-autoplay-button {\n position: relative;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 0;\n background: transparent;\n color: #666;\n cursor: pointer;\n}\n\n.comimi-autoplay-window {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 20px;\n height: 20px;\n overflow: hidden;\n transform: translate(-50%, -50%);\n}\n\n.comimi-autoplay-slider {\n position: absolute;\n top: 0;\n right: 0;\n width: 200%;\n height: 100%;\n transition: transform 0.36s var(--comimi-spring);\n}\n\n.comimi-autoplay-slider[data-active=\"true\"] {\n transform: translateX(50%);\n}\n\n.comimi-autoplay-icon {\n position: absolute;\n top: 0;\n width: 50%;\n height: 100%;\n display: block;\n}\n\n.comimi-autoplay-icon-play {\n right: 0;\n}\n\n.comimi-autoplay-icon-pause {\n left: 0;\n}\n\n.comimi-autoplay-progress {\n position: relative;\n width: 140px;\n height: 6px;\n border-radius: 999px;\n background: #e0e0e0;\n overflow: hidden;\n}\n\n.comimi-autoplay-progress-bar {\n display: block;\n position: absolute;\n inset: 0;\n border-radius: 999px;\n background: #666;\n animation: comimi-autoplay-progress 3s linear 0s infinite;\n}\n\n/* --- Page Mode Toggle (single / spread) ------------------------------ */\n\n.comimi-page-mode {\n position: relative;\n width: 80px;\n height: 30px;\n}\n\n.comimi-page-mode-wrapper {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 80px;\n height: 30px;\n display: grid;\n grid-template-columns: 1fr 1fr;\n background: #eeeeee;\n border-radius: 8px;\n transform: translate(-50%, -50%);\n transition: width 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-page-mode-wrapper:hover {\n width: 95px;\n }\n}\n\n.comimi-page-mode-button {\n position: relative;\n display: grid;\n place-content: center;\n width: 100%;\n height: 100%;\n padding: 0;\n border: 0;\n background: transparent;\n color: #666;\n cursor: pointer;\n}\n\n.comimi-page-mode-icon {\n display: block;\n width: 20px;\n opacity: 0.3;\n transform-origin: center bottom;\n transition: opacity 0.2s ease-in-out;\n}\n\n.comimi-page-mode-button[data-selected=\"true\"] .comimi-page-mode-icon {\n opacity: 1;\n}\n\n.comimi-page-mode-icon.comimi-pop-animate {\n animation: comimi-pop 0.5s ease-in-out 0s both;\n}\n\n/* --- Settings (button + popover panel) ------------------------------- */\n\n.comimi-settings {\n position: relative;\n width: 24px;\n height: 24px;\n}\n\n.comimi-settings-button {\n position: absolute;\n inset: 0;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n\n.comimi-settings-icon {\n display: block;\n width: 100%;\n height: 100%;\n color: #666;\n transition: transform 0.36s var(--comimi-spring);\n}\n\n.comimi-settings[data-open=\"true\"] .comimi-settings-icon {\n transform: rotate(30deg);\n}\n\n@keyframes comimi-pop {\n from, to {\n transform: scale(1, 1);\n }\n 50% {\n transform: scale(0.95, 1.15);\n }\n 75% {\n transform: scale(1.15, 0.95);\n }\n}\n\n@keyframes comimi-autoplay-progress {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n\n@media (max-width: 767px) {\n .comimi-controls-dock {\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));\n }\n\n .comimi-controls-bg {\n border-radius: 20px 20px 0 0;\n }\n}\n", se = "\n.comimi-error-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: grid;\n gap: 10px;\n justify-items: center;\n width: 80px;\n}\n\n.comimi-error-icon-svg {\n width: 80px;\n}\n\n.comimi-error-svg {\n display: block;\n width: 100%;\n transform-origin: center bottom;\n animation: comimi-error-fall 0.8s ease-in-out 0s both;\n}\n\n.comimi-error-stroke {\n fill: none;\n stroke: #ccc;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 10px;\n}\n\n.comimi-error-mimi {\n transform-origin: 56px 43px;\n}\n\n.comimi-error-mimi-left {\n animation:\n comimi-error-mimi-left-intro 0.8s ease-in-out 0s both,\n comimi-error-mimi-left-loop 1.5s ease-in-out 0.8s infinite forwards;\n}\n\n.comimi-error-mimi-right {\n animation:\n comimi-error-mimi-right-intro 0.8s ease-in-out 0s both,\n comimi-error-mimi-right-loop 1.5s ease-in-out 0.8s infinite forwards;\n}\n\n.comimi-error-eye {\n fill: #ccc;\n transform-origin: center;\n transform-box: fill-box;\n animation: comimi-error-eye 1.5s ease-in-out 0.8s infinite forwards;\n}\n\n.comimi-error-icon-text {\n color: #aaa;\n font-size: 12px;\n font-weight: 700;\n line-height: 1.45;\n text-align: center;\n}\n\n@keyframes comimi-error-fall {\n from {\n opacity: 0;\n transform: translateY(-40%) rotate(10deg);\n }\n 20% {\n opacity: 1;\n }\n 40% {\n transform: translateY(0) rotate(0);\n }\n 60% {\n transform: translateY(0) scale(1.1, 0.95);\n }\n 80% {\n transform: translateY(0) scale(0.95, 1.1);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes comimi-error-mimi-left-intro {\n from {\n transform: rotate(0deg);\n }\n 60% {\n transform: rotate(20deg);\n }\n to {\n transform: rotate(10deg);\n }\n}\n\n@keyframes comimi-error-mimi-left-loop {\n from, to {\n transform: rotate(10deg);\n }\n 50% {\n transform: rotate(30deg);\n }\n}\n\n@keyframes comimi-error-mimi-right-intro {\n from {\n transform: rotate(0deg);\n }\n 60% {\n transform: rotate(-20deg);\n }\n to {\n transform: rotate(-10deg);\n }\n}\n\n@keyframes comimi-error-mimi-right-loop {\n from, to {\n transform: rotate(-10deg);\n }\n 50% {\n transform: rotate(-30deg);\n }\n}\n\n@keyframes comimi-error-eye {\n from, to {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(4px);\n }\n}\n", ce = "\n.comimi-icon {\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.comimi-icon-fill {\n fill: currentColor;\n transition: fill .2s linear;\n}\n\n.comimi-icon-stroke {\n fill: none;\n stroke: currentColor;\n stroke-width: 1.6;\n transition: stroke .2s linear;\n}\n\n.comimi-menu-svg,\n.comimi-close-svg {\n display: block;\n position: relative;\n width: 34px;\n height: 34px;\n}\n\n.comimi-menu-svg span,\n.comimi-close-svg span {\n position: absolute;\n left: 50%;\n width: 17px;\n height: 3px;\n border-radius: 999px;\n background: #666;\n}\n\n.comimi-menu-svg span:nth-child(1) {\n top: 9px;\n transform: translateX(-50%);\n}\n\n.comimi-menu-svg span:nth-child(2) {\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.comimi-menu-svg span:nth-child(3) {\n bottom: 9px;\n transform: translateX(-50%);\n}\n\n.comimi-close-svg span {\n top: 50%;\n}\n\n.comimi-close-svg span:nth-child(1) {\n transform: translate(-50%, -50%) rotate(45deg);\n}\n\n.comimi-close-svg span:nth-child(2) {\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n", le = "\n.comimi-selectbox {\n position: relative;\n display: inline-block;\n width: 100%;\n}\n\n.comimi-selectbox-bg {\n position: absolute;\n inset: 0;\n border-radius: 8px;\n background: #eeeeee;\n transition: inset 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-selectbox:hover .comimi-selectbox-bg {\n inset: -3px;\n }\n}\n\n.comimi-selectbox-select {\n position: absolute;\n inset: 0;\n z-index: 2;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n appearance: none;\n -webkit-appearance: none;\n color: transparent;\n font: inherit;\n cursor: pointer;\n opacity: 0;\n}\n\n.comimi-selectbox-select:disabled {\n cursor: not-allowed;\n}\n\n.comimi-selectbox-label {\n position: relative;\n display: block;\n box-sizing: border-box;\n width: 100%;\n padding: 8px 32px 8px 12px;\n color: #333;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.45;\n cursor: pointer;\n pointer-events: none;\n}\n\n.comimi-selectbox-arrow {\n position: absolute;\n top: 50%;\n right: 12px;\n z-index: 1;\n width: 16px;\n height: 16px;\n color: #aaa;\n transform: translateY(-50%) rotate(90deg);\n pointer-events: none;\n}\n\n@media (hover: hover) {\n .comimi-selectbox:hover .comimi-selectbox-arrow {\n animation: comimi-selectbox-arrow 0.5s ease-in-out 0s both;\n }\n}\n\n@keyframes comimi-selectbox-arrow {\n from, to {\n transform: translateY(-50%) rotate(90deg);\n }\n 40% {\n transform: translateY(calc(-50% + 3px)) rotate(90deg);\n }\n 70% {\n transform: translateY(calc(-50% - 1.5px)) rotate(90deg);\n }\n}\n\n.comimi-toggle-switch {\n display: grid;\n grid-template-columns: repeat(2, auto);\n column-gap: 6px;\n justify-content: start;\n align-items: center;\n width: 100%;\n padding: 2px;\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n\n.comimi-toggle-track {\n position: relative;\n width: 32px;\n height: 18px;\n border-radius: 999px;\n background: #eeeeee;\n transition: background-color 0.2s linear;\n}\n\n.comimi-toggle-switch[data-checked=\"true\"] .comimi-toggle-track {\n background: #666;\n}\n\n.comimi-toggle-knob {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background: #666;\n transition:\n transform 0.36s var(--comimi-spring),\n background-color 0.2s linear;\n}\n\n.comimi-toggle-switch[data-checked=\"true\"] .comimi-toggle-knob {\n background: #fff;\n transform: translateX(100%);\n}\n\n.comimi-toggle-label-wrap {\n position: relative;\n width: 22px;\n height: 12px;\n overflow: hidden;\n}\n\n.comimi-toggle-label-inner {\n position: absolute;\n inset: 0;\n transition: transform 0.36s var(--comimi-spring);\n}\n\n.comimi-toggle-switch[data-checked=\"false\"] .comimi-toggle-label-inner {\n transform: translateX(-100%);\n}\n\n.comimi-toggle-label {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n font-size: 11px;\n font-weight: 400;\n line-height: 12px;\n text-align: center;\n}\n\n.comimi-toggle-label-on {\n color: #333;\n}\n\n.comimi-toggle-label-off {\n color: #aaa;\n transform: translateX(100%);\n}\n\n.comimi-range-slider {\n display: grid;\n grid-template-columns: 1fr auto;\n column-gap: 8px;\n align-items: center;\n width: 100%;\n}\n\n.comimi-range-slider[data-disabled=\"true\"] {\n opacity: 0.6;\n}\n\n.comimi-range-slider-wrap {\n position: relative;\n display: grid;\n align-items: center;\n min-width: 0;\n height: 18px;\n}\n\n.comimi-range-slider-track {\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n height: 6px;\n border-radius: 999px;\n background: #eeeeee;\n overflow: hidden;\n transform: translateY(-50%);\n transition: height 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-range-slider-wrap:hover .comimi-range-slider-track {\n height: 10px;\n }\n}\n\n.comimi-range-slider-fill {\n display: block;\n height: 100%;\n background: #666;\n border-radius: inherit;\n}\n\n.comimi-range-slider-input {\n position: relative;\n z-index: 1;\n width: 100%;\n height: 18px;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n}\n\n.comimi-range-slider-input::-webkit-slider-runnable-track {\n height: 6px;\n background: transparent;\n border: 0;\n}\n\n.comimi-range-slider-input::-webkit-slider-thumb {\n appearance: none;\n -webkit-appearance: none;\n width: 18px;\n height: 18px;\n margin-top: -6px;\n border: 0;\n border-radius: 50%;\n background: #666;\n box-shadow: none;\n transition:\n transform 0.36s var(--comimi-spring),\n background-color 0.2s ease-in-out;\n}\n\n.comimi-range-slider-input:hover:not(:disabled)::-webkit-slider-thumb {\n transform: scale(1.15);\n}\n\n.comimi-range-slider-input::-moz-range-track {\n height: 6px;\n background: transparent;\n border: 0;\n}\n\n.comimi-range-slider-input::-moz-range-thumb {\n width: 18px;\n height: 18px;\n border: 0;\n border-radius: 50%;\n background: #666;\n box-shadow: none;\n transition:\n transform 0.36s var(--comimi-spring),\n background-color 0.2s ease-in-out;\n}\n\n.comimi-range-slider-input:hover:not(:disabled)::-moz-range-thumb {\n transform: scale(1.15);\n}\n\n.comimi-range-slider-input:focus-visible {\n outline: none;\n}\n\n.comimi-range-slider-input:focus-visible::-webkit-slider-thumb {\n box-shadow: none;\n}\n\n.comimi-range-slider-input:focus-visible::-moz-range-thumb {\n box-shadow: none;\n}\n\n.comimi-range-slider-value {\n width: 36px;\n color: #666;\n font-size: 11px;\n font-weight: 400;\n line-height: 1;\n text-align: right;\n white-space: nowrap;\n}\n", ue = "\n.comimi-loading-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: grid;\n gap: 10px;\n justify-items: center;\n width: 80px;\n}\n\n.comimi-loading-icon-svg {\n width: 80px;\n}\n\n.comimi-loading-svg {\n display: block;\n width: 100%;\n transform-origin: center bottom;\n}\n\n.comimi-loading-stroke {\n fill: none;\n stroke: #ccc;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 10px;\n}\n\n.comimi-loading-mimi {\n transform-origin: 56px 43px;\n}\n\n.comimi-loading-mimi-left {\n animation:\n comimi-loading-mimi-left 0.4s ease-in-out 0.1s 2 forwards,\n comimi-loading-mimi-left 0.4s ease-in-out 1.7s 2 forwards;\n}\n\n.comimi-loading-mimi-right {\n animation:\n comimi-loading-mimi-right 0.4s ease-in-out 0.1s 2 forwards,\n comimi-loading-mimi-right 0.4s ease-in-out 1.7s 2 forwards;\n}\n\n.comimi-loading-eyes {\n transform: translateX(-7px);\n animation:\n comimi-loading-eyes-move 0.4s ease-in-out 1.2s both,\n comimi-loading-eyes-move 0.4s ease-in-out 2.6s reverse forwards;\n}\n\n.comimi-loading-eye {\n fill: #ccc;\n transform-origin: center;\n transform-box: fill-box;\n animation:\n comimi-loading-eye 0.4s ease-in-out 0s forwards,\n comimi-loading-eye 0.4s ease-in-out 1.6s forwards;\n}\n\n.comimi-loading-icon-text {\n color: #aaa;\n font-size: 12px;\n font-weight: 700;\n line-height: 1.45;\n text-align: center;\n}\n\n.comimi-loading-icon-text span {\n display: inline-block;\n animation: comimi-loading-dot 0.8s ease-in-out 0s infinite both;\n}\n\n.comimi-loading-icon-text span:nth-child(1) {\n animation-delay: 0s;\n}\n\n.comimi-loading-icon-text span:nth-child(2) {\n animation-delay: 0.15s;\n}\n\n.comimi-loading-icon-text span:nth-child(3) {\n animation-delay: 0.3s;\n}\n\n@keyframes comimi-loading-mimi-left {\n from, to {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(20deg);\n }\n}\n\n@keyframes comimi-loading-mimi-right {\n from, to {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(-20deg);\n }\n}\n\n@keyframes comimi-loading-eyes-move {\n from {\n transform: translateX(-7px);\n }\n to {\n transform: translateX(7px);\n }\n}\n\n@keyframes comimi-loading-eye {\n from, to {\n transform: scaleY(1);\n }\n 50% {\n transform: scaleY(0.2);\n }\n}\n\n@keyframes comimi-loading-dot {\n from, 50%, to {\n opacity: 1;\n }\n 25% {\n opacity: 0;\n }\n}\n", de = "\n.comimi-menu-panel {\n position: absolute;\n top: 24px;\n left: 24px;\n width: 420px;\n z-index: 45;\n pointer-events: auto;\n transition:\n transform 0.6s var(--comimi-spring),\n opacity 0.3s linear;\n}\n\n.comimi-menu-panel[data-overlay=\"false\"] {\n transform: translateY(-35px);\n opacity: 0;\n pointer-events: none;\n transition:\n transform 0.3s var(--comimi-spring),\n opacity 0.15s linear;\n}\n\n.comimi-menu-bg {\n position: absolute;\n inset: 0;\n border-radius: 16px;\n background: var(--comimi-glass);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n transition: inset 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-menu-panel:hover > .comimi-menu-bg {\n inset: -5px;\n }\n}\n\n.comimi-menu-top {\n position: relative;\n display: grid;\n grid-template-columns: auto 1fr;\n column-gap: 13px;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n height: 62px;\n padding: 0 13px;\n border: 0;\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.comimi-menu-button {\n position: relative;\n width: 34px;\n height: 34px;\n overflow: hidden;\n}\n\n.comimi-menu-button-inner {\n display: block;\n position: absolute;\n inset: 0;\n transition: transform 0.4s var(--comimi-spring);\n}\n\n.comimi-menu-panel[data-open=\"true\"] .comimi-menu-button-inner {\n transform: translateY(100%);\n}\n\n.comimi-menu-button-inner > * {\n position: absolute;\n inset: 0;\n}\n\n.comimi-menu-button-inner > *:nth-child(2) {\n transform: translateY(-100%);\n}\n\n.comimi-menu-title-wrap {\n min-width: 0;\n}\n\n.comimi-menu-title {\n display: block;\n width: 100%;\n color: #333;\n font-size: 15px;\n font-weight: 700;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.comimi-menu-author {\n display: block;\n width: 100%;\n color: #666;\n font-size: 12px;\n font-weight: 400;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.comimi-menu-bottom {\n position: relative;\n width: 100%;\n overflow: hidden;\n transition: height 0.24s ease-in-out;\n}\n\n.comimi-menu-border {\n width: 100%;\n height: 1px;\n background: #e0e0e0;\n}\n\n.comimi-menu-view {\n position: absolute;\n top: 1px;\n left: 0;\n width: 100%;\n transition: all 0.28s ease-in-out;\n opacity: 0;\n visibility: hidden;\n transform: scale(0.92);\n filter: blur(5px);\n}\n\n.comimi-menu-view-menu {\n position: relative;\n}\n\n.comimi-menu-panel[data-view=\"menu\"] .comimi-menu-view-menu,\n.comimi-menu-panel[data-view=\"shortcut\"] .comimi-menu-view-shortcut,\n.comimi-menu-panel[data-view=\"pageList\"] .comimi-menu-view-page-list {\n opacity: 1;\n visibility: visible;\n transform: scale(1);\n filter: blur(0);\n}\n\n.comimi-menu-list {\n position: relative;\n width: 100%;\n padding: 10px 0;\n}\n\n.comimi-menu-link {\n box-sizing: border-box;\n display: grid;\n grid-template-columns: 1fr auto;\n column-gap: 8px;\n align-items: center;\n width: 100%;\n padding: 10px 16px 10px 22px;\n border: 0;\n border-radius: 10px;\n background: transparent;\n color: #666;\n cursor: pointer;\n transition: background-color 0.24s linear;\n}\n\n.comimi-menu-link:hover {\n background: #f1f1f1;\n}\n\n.comimi-menu-link-text {\n color: #666;\n font-size: 14px;\n font-weight: 700;\n line-height: 1.45;\n text-align: left;\n}\n\n.comimi-menu-link-arrow {\n display: block;\n width: 20px;\n height: 20px;\n color: #aaa;\n}\n\n.comimi-menu-link-arrow > svg {\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.comimi-page-list-inner {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n box-sizing: border-box;\n padding: 22px;\n max-height: 315px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.comimi-page-list-item {\n display: grid;\n row-gap: 4px;\n padding: 0;\n border: 0;\n background: transparent;\n color: #666;\n cursor: pointer;\n text-align: center;\n}\n\n.comimi-page-list-thumb {\n position: relative;\n display: block;\n width: 100%;\n aspect-ratio: 100 / 141;\n background: #fff;\n border-radius: 6px;\n outline: 3px solid #e0e0e0;\n}\n\n.comimi-page-list-thumb img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n border-radius: 4px;\n user-select: none;\n -webkit-user-drag: none;\n}\n\n.comimi-page-list-text {\n color: #666;\n font-size: 14px;\n font-weight: 700;\n}\n\n.comimi-shortcut-inner {\n display: grid;\n row-gap: 22px;\n box-sizing: border-box;\n padding: 22px;\n max-height: 315px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.comimi-shortcut-section {\n display: grid;\n row-gap: 8px;\n}\n\n.comimi-shortcut-heading {\n color: #666;\n font-size: 12px;\n font-weight: 700;\n line-height: 1.45;\n}\n\n.comimi-shortcut-list {\n display: grid;\n row-gap: 8px;\n justify-items: start;\n}\n\n.comimi-shortcut-column {\n display: flex;\n flex-wrap: wrap;\n gap: 8px 16px;\n align-items: center;\n}\n\n.comimi-shortcut-item {\n display: grid;\n grid-template-columns: repeat(2, auto);\n column-gap: 8px;\n align-items: center;\n width: fit-content;\n}\n\n.comimi-shortcut-badge {\n display: grid;\n grid-auto-flow: column;\n column-gap: 6px;\n align-items: center;\n padding: 4px 8px;\n border-radius: 7px;\n background: #eeeeee;\n}\n\n.comimi-shortcut-key {\n color: #666;\n font-size: 13px;\n font-weight: 700;\n line-height: 1.45;\n}\n\n.comimi-shortcut-or::before {\n content: \"or\";\n display: block;\n color: #666;\n font-size: 11px;\n font-weight: 400;\n line-height: 1.45;\n}\n\n.comimi-shortcut-label {\n color: #666;\n font-size: 13px;\n font-weight: 400;\n line-height: 1.45;\n}\n\n.comimi-back-button {\n position: relative;\n width: 100%;\n height: 56px;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n\n.comimi-back-inner {\n position: absolute;\n inset: 8px;\n}\n\n.comimi-back-bg {\n position: absolute;\n inset: 0;\n border-radius: 8px;\n background: #eeeeee;\n transition: inset 0.36s var(--comimi-spring), border-radius 0.36s var(--comimi-spring);\n}\n\n.comimi-back-button:hover .comimi-back-bg {\n inset: -4px;\n border-radius: 10px;\n}\n\n.comimi-back-text {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: #666;\n font-size: 14px;\n font-weight: 700;\n line-height: 1.45;\n pointer-events: none;\n}\n\n.comimi-back-arrow {\n position: absolute;\n top: 50%;\n left: 8px;\n width: 22px;\n height: 22px;\n color: #aaa;\n transform: translateY(-50%) scaleX(-1);\n pointer-events: none;\n}\n\n.comimi-back-arrow > svg {\n display: block;\n width: 100%;\n height: 100%;\n}\n\n@media (max-width: 767px) {\n .comimi-menu-panel {\n top: 0;\n left: 0;\n width: 100%;\n }\n\n .comimi-menu-bg {\n border-radius: 0 0 16px 16px;\n }\n\n .comimi-menu-top {\n width: 100%;\n }\n\n .comimi-page-list-inner,\n .comimi-shortcut-inner {\n max-height: calc(var(--view-height, 100vh) - 62px - 56px);\n }\n}\n", fe = "\n.comimi-notifications {\n position: absolute;\n bottom: 140px;\n left: 50%;\n transform: translateX(-50%);\n display: grid;\n row-gap: 8px;\n justify-items: center;\n pointer-events: none;\n z-index: 35;\n}\n\n.comimi-toast {\n display: grid;\n grid-template-columns: auto auto;\n gap: 5px;\n align-items: center;\n justify-content: center;\n width: fit-content;\n padding: 6px 13px 6px 8px;\n border-radius: 999px;\n background-color: #666;\n animation: comimi-toast-popup 0.37s ease-in-out 0s both;\n}\n\n.comimi-toast-dot {\n display: block;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: #888;\n}\n\n.comimi-toast-text {\n color: #fff;\n font-size: 12px;\n font-weight: 700;\n line-height: 1.45;\n}\n\n@keyframes comimi-toast-popup {\n from {\n transform: translateY(6px) scale(0.2, 0.8);\n opacity: 0;\n }\n 60% {\n transform: translateY(-1px) scale(1.1, 1.05);\n opacity: 1;\n }\n to {\n transform: scale(1, 1);\n opacity: 1;\n }\n}\n\n@media (max-width: 767px) {\n .comimi-notifications {\n bottom: calc(120px + env(safe-area-inset-bottom, 0px));\n }\n}\n", pe = "\n.comimi-stage {\n position: absolute;\n inset: 0;\n will-change: transform;\n transition: transform .18s ease;\n}\n\n.comimi-stage[data-dragging=\"true\"] {\n transition: none;\n}\n\n.comimi-page-group {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0;\n box-sizing: border-box;\n}\n\n.comimi-page {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n min-width: 0;\n min-height: 0;\n background: transparent;\n overflow: hidden;\n flex: 0 0 auto;\n}\n\n.comimi-page[data-spread=\"true\"] {\n width: 50%;\n height: 100%;\n}\n\n.comimi-page[data-spread=\"false\"] {\n width: 100%;\n height: 100%;\n}\n\n.comimi-page[data-position=\"left\"] {\n justify-content: flex-end;\n}\n\n.comimi-page[data-position=\"right\"] {\n justify-content: flex-start;\n}\n\n.comimi-page img,\n.comimi-html-page {\n display: block;\n max-width: 100%;\n max-height: 100%;\n width: 100%;\n height: 100%;\n object-fit: contain;\n transform-origin: center center;\n user-select: none;\n -webkit-user-select: none;\n -webkit-user-drag: none;\n -webkit-touch-callout: none;\n}\n\n.comimi-page[data-spread=\"true\"] img,\n.comimi-page[data-spread=\"true\"] .comimi-html-page {\n width: 100%;\n height: 100%;\n}\n\n.comimi-page[data-position=\"left\"] img,\n.comimi-page[data-position=\"left\"] .comimi-html-page {\n object-position: right center;\n}\n\n.comimi-page[data-position=\"right\"] img,\n.comimi-page[data-position=\"right\"] .comimi-html-page {\n object-position: left center;\n}\n\n.comimi-html-page {\n width: min(100%, 960px);\n height: min(100%, 680px);\n background: #fff;\n color: #111;\n overflow: auto;\n}\n\n", me = "\n.comimi-rabbit {\n position: absolute;\n width: 50px;\n pointer-events: none;\n}\n\n.comimi-rabbit-svg {\n display: block;\n width: 100%;\n height: auto;\n}\n\n.comimi-controls-dock > .comimi-rabbit {\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.comimi-menu-panel > .comimi-rabbit {\n top: 20px;\n right: 20px;\n}\n\n@media (max-width: 767px) {\n .comimi-controls-dock > .comimi-rabbit {\n display: none;\n }\n}\n\n@media (min-width: 768px) {\n .comimi-menu-panel > .comimi-rabbit {\n display: none;\n }\n}\n", he = "\n.comimi-settings-panel {\n position: absolute;\n top: 0;\n right: -16px;\n width: 250px;\n height: 0;\n border-radius: 20px;\n overflow: hidden;\n background: var(--comimi-glass-strong);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n opacity: 0;\n transform: translateY(calc(-100% - 8px));\n transition:\n height 0.38s cubic-bezier(0.12, 1.06, 0.56, 1.02),\n opacity 0.38s cubic-bezier(0.12, 1.06, 0.56, 1.02);\n z-index: 10;\n}\n\n.comimi-settings-panel[data-open=\"true\"] {\n opacity: 1;\n height: var(--comimi-settings-height, 460px);\n}\n\n.comimi-settings-panel-body {\n position: relative;\n width: 100%;\n}\n\n.comimi-settings-panel-inner {\n box-sizing: border-box;\n position: relative;\n padding: 16px 20px 22px;\n}\n\n.comimi-settings-panel-title {\n color: #333;\n font-size: 14px;\n font-weight: 700;\n text-align: center;\n}\n\n.comimi-settings-section {\n display: grid;\n row-gap: 8px;\n margin-top: 18px;\n}\n\n.comimi-settings-label {\n color: #333;\n font-size: 12px;\n font-weight: 400;\n}\n\n@media (max-width: 767px) {\n .comimi-settings-panel-body {\n max-height: calc(var(--view-height, 100vh) - 62px - 56px);\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n }\n}\n", ge = "\n.comimi-splash {\n position: absolute;\n inset: 0;\n z-index: 100;\n background-color: #e0e0e0;\n overflow: hidden;\n animation: comimi-splash-clip 1s cubic-bezier(0.82, 0.01, 0.48, 1.02) 1s both;\n pointer-events: none;\n}\n\n.comimi-splash-logo-wrap {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -60%);\n width: 260px;\n aspect-ratio: 290 / 99;\n}\n\n.comimi-splash-logo {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0.72);\n width: 360px;\n aspect-ratio: 360 / 99;\n}\n\n.comimi-splash-symbol {\n position: absolute;\n top: 0;\n left: 0;\n width: 113px;\n display: block;\n transform-origin: center bottom;\n}\n\n.comimi-splash-typo-wrap {\n position: absolute;\n right: 7px;\n bottom: 11px;\n width: 229.5px;\n}\n\n.comimi-splash-typo {\n display: block;\n width: 100%;\n overflow: visible;\n}\n\n.comimi-splash-stroke {\n fill: none;\n stroke: #fff;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 10px;\n}\n\n.comimi-splash-mimi {\n transform-origin: 56px 43px;\n}\n\n.comimi-splash-mimi-left {\n animation: comimi-splash-mimi-left 0.4s ease-in-out 0.3s 2 forwards;\n}\n\n.comimi-splash-mimi-right {\n animation: comimi-splash-mimi-right 0.4s ease-in-out 0.3s 2 forwards;\n}\n\n.comimi-splash-eyes {\n transform: translateX(-7px);\n}\n\n.comimi-splash-eye {\n transform-origin: center;\n transform-box: fill-box;\n animation: comimi-splash-eye 0.4s ease-in-out 0.2s forwards;\n}\n\n.comimi-splash-heart {\n --size: 14px;\n position: absolute;\n top: -20px;\n width: var(--size);\n height: var(--size);\n}\n\n.comimi-splash-heart::before,\n.comimi-splash-heart::after {\n content: \"\";\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 150%;\n border-radius: 999px;\n transform-origin: center bottom;\n}\n\n.comimi-splash-heart::before {\n transform: translateX(-32%) rotate(45deg);\n background-color: #eee;\n}\n\n.comimi-splash-heart::after {\n transform: translateX(32%) rotate(-45deg);\n background-color: #fff;\n}\n\n.comimi-splash-heart-1 {\n right: -2px;\n}\n\n.comimi-splash-heart-2 {\n right: 76px;\n}\n\n.comimi-splash-text {\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 120%);\n color: #fff;\n font-size: 16px;\n font-weight: 700;\n line-height: 1.45;\n text-align: center;\n white-space: nowrap;\n}\n\n.comimi-splash-text span {\n display: inline-block;\n animation: comimi-splash-dot 0.8s ease-in-out 0s infinite both;\n}\n\n.comimi-splash-text span:nth-child(1) {\n animation-delay: 0s;\n}\n\n.comimi-splash-text span:nth-child(2) {\n animation-delay: 0.15s;\n}\n\n.comimi-splash-text span:nth-child(3) {\n animation-delay: 0.3s;\n}\n\n@keyframes comimi-splash-clip {\n from {\n clip-path: circle(70%);\n }\n to {\n clip-path: circle(0%);\n }\n}\n\n@keyframes comimi-splash-mimi-left {\n from, to {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(20deg);\n }\n}\n\n@keyframes comimi-splash-mimi-right {\n from, to {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(-20deg);\n }\n}\n\n@keyframes comimi-splash-eye {\n from, to {\n transform: scaleY(1);\n }\n 50% {\n transform: scaleY(0.2);\n }\n}\n\n@keyframes comimi-splash-dot {\n from, 50%, to {\n opacity: 1;\n }\n 25% {\n opacity: 0;\n }\n}\n", _e = "\n.comimi-tooltip {\n position: absolute;\n bottom: 0;\n left: 50%;\n padding: 6px 10px;\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.5);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n color: #333;\n font-size: 12px;\n font-weight: 600;\n line-height: 1.45;\n white-space: nowrap;\n pointer-events: none;\n user-select: none;\n opacity: 0;\n transform: translate(-50%, calc(100% + 6px)) scale(0.88);\n transform-origin: center top;\n transition:\n opacity 0.1s ease-in-out,\n transform 0.16s ease-in-out;\n z-index: 5;\n}\n\n@media (hover: hover) {\n .comimi-has-tooltip:hover > .comimi-tooltip {\n opacity: 1;\n transform: translate(-50%, calc(100% + 6px)) scale(1);\n }\n}\n", ve = "\n.comimi-root {\n --comimi-bg: #fff;\n --comimi-surface: #f7f7f7;\n --comimi-surface-2: #eeeeee;\n --comimi-fg: #333;\n --comimi-muted: #666;\n --comimi-soft: #999;\n --comimi-line: #e0e0e0;\n --comimi-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n --comimi-glass: rgba(255, 255, 255, 0.8);\n --comimi-glass-strong: rgba(255, 255, 255, 0.8);\n --comimi-spring: cubic-bezier(0.34, 1.56, 0.64, 1);\n background: var(--comimi-bg);\n color: var(--comimi-fg);\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n position: relative;\n width: calc(100% - 24px * 2);\n max-width: 900px;\n aspect-ratio: 900 / 636;\n margin: 0 auto;\n border-radius: 16px;\n box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.06);\n overflow: hidden;\n user-select: none;\n touch-action: none;\n transition: box-shadow 0.24s ease-out;\n}\n\n.comimi-root:focus {\n outline: none;\n box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.14);\n}\n\n@media (max-width: 767px) {\n .comimi-root {\n max-width: 500px;\n aspect-ratio: 390 / 490;\n }\n}\n\n.comimi-root[data-layout=\"theater\"] {\n width: 100%;\n max-width: none;\n aspect-ratio: auto;\n min-height: 320px;\n margin: 0;\n border-radius: 0;\n box-shadow: none;\n}\n\n.comimi-root[data-layout=\"browserFullscreen\"],\n.comimi-root[data-layout=\"nativeFullscreen\"] {\n position: fixed;\n inset: 0;\n z-index: 999;\n width: 100vw;\n height: 100dvh;\n max-width: none;\n aspect-ratio: auto;\n margin: 0;\n border-radius: 0;\n box-shadow: none;\n}\n\n.comimi-resize-handle {\n position: relative;\n width: 100%;\n height: 20px;\n background: #fff;\n cursor: ns-resize;\n touch-action: none;\n}\n\n.comimi-resize-handle::after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 40px;\n height: 3px;\n border-radius: 999px;\n background: #bbb;\n transition:\n width 0.36s cubic-bezier(0.34, 1.56, 0.64, 1),\n height 0.36s cubic-bezier(0.34, 1.56, 0.64, 1),\n background-color 0.2s linear;\n}\n\n@media (hover: hover) {\n .comimi-resize-handle:hover::after {\n width: 52px;\n height: 5px;\n background: #888;\n }\n}\n\n", ye = "\n.comimi-view-switcher {\n position: absolute;\n top: 20px;\n right: 20px;\n display: grid;\n grid-template-columns: repeat(3, 60px);\n width: 180px;\n border-radius: 16px;\n background: var(--comimi-glass);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n pointer-events: auto;\n transition:\n transform 0.6s var(--comimi-spring),\n opacity 0.3s linear;\n}\n\n.comimi-view-switcher[data-overlay=\"false\"] {\n transform: translateY(-35px);\n opacity: 0;\n pointer-events: none;\n transition:\n transform 0.3s var(--comimi-spring),\n opacity 0.15s linear;\n}\n\n@media (hover: hover) {\n .comimi-view-switcher:hover {\n transform: scaleX(1.03);\n }\n}\n\n.comimi-view-switcher-indicator {\n position: absolute;\n top: 0;\n left: 0;\n width: 60px;\n height: 100%;\n border-radius: 16px;\n background: #666;\n transition: transform 0.36s var(--comimi-spring);\n}\n\n.comimi-view-switcher-button {\n position: relative;\n display: grid;\n row-gap: 5px;\n justify-items: center;\n align-content: center;\n height: 58px;\n padding: 0;\n border: 0;\n background: transparent;\n color: #666;\n cursor: pointer;\n transition: color 0.2s linear;\n}\n\n.comimi-view-switcher-button[data-selected=\"true\"] {\n color: #fff;\n}\n\n.comimi-view-switcher-icon-wrap {\n width: 20px;\n height: 20px;\n transform-origin: center bottom;\n}\n\n.comimi-view-switcher-icon {\n display: block;\n width: 100%;\n height: 100%;\n color: currentColor;\n}\n\n.comimi-view-switcher-icon-wrap.comimi-pop-animate {\n animation: comimi-pop 0.5s ease-in-out 0.1s both;\n}\n\n.comimi-view-switcher-label {\n color: currentColor;\n font-size: 10px;\n font-weight: 500;\n text-align: center;\n transition: color 0.2s linear;\n}\n\n@media (max-width: 767px) {\n .comimi-view-switcher {\n top: 70px;\n right: auto;\n left: calc(50% - 90px);\n }\n}\n", J = !1, be = [
|
|
1285
|
+
var fe = "\n.comimi-arrows {\n position: absolute;\n inset: 0;\n pointer-events: none;\n z-index: 30;\n}\n\n.comimi-arrow-button {\n position: absolute;\n top: 50%;\n width: 46px;\n height: 46px;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n pointer-events: auto;\n transform: translateY(-50%);\n}\n\n.comimi-arrow-next {\n right: 24px;\n}\n\n.comimi-arrow-prev {\n left: 24px;\n}\n\n.comimi-arrow-inner {\n position: absolute;\n inset: 0;\n transition:\n transform 0.6s var(--comimi-spring),\n opacity 0.3s linear;\n}\n\n.comimi-arrows[data-overlay=\"false\"] .comimi-arrow-next .comimi-arrow-inner {\n transform: translateX(35px);\n opacity: 0;\n transition:\n transform 0.3s var(--comimi-spring),\n opacity 0.15s linear;\n}\n\n.comimi-arrows[data-overlay=\"false\"] .comimi-arrow-prev .comimi-arrow-inner {\n transform: translateX(-35px);\n opacity: 0;\n transition:\n transform 0.3s var(--comimi-spring),\n opacity 0.15s linear;\n}\n\n.comimi-arrows[data-overlay=\"false\"] {\n pointer-events: none;\n}\n\n.comimi-arrow-bg {\n position: absolute;\n inset: 0;\n border-radius: 16px;\n background: var(--comimi-glass);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n transition: inset 0.36s var(--comimi-spring), border-radius 0.36s var(--comimi-spring);\n}\n\n.comimi-arrow-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 20px;\n height: 20px;\n color: #666;\n transform: translate(-50%, -50%);\n pointer-events: none;\n}\n\n.comimi-arrow-prev .comimi-arrow-icon {\n transform: translate(-50%, -50%) scaleX(-1);\n}\n\n@keyframes comimi-arrow-bounce {\n from, to {\n transform: translate(-50%, -50%);\n }\n 40% {\n transform: translate(calc(-50% + 3px), -50%);\n }\n 70% {\n transform: translate(calc(-50% - 1.5px), -50%);\n }\n}\n\n@keyframes comimi-arrow-bounce-prev {\n from, to {\n transform: translate(-50%, -50%) scaleX(-1);\n }\n 40% {\n transform: translate(calc(-50% - 3px), -50%) scaleX(-1);\n }\n 70% {\n transform: translate(calc(-50% + 1.5px), -50%) scaleX(-1);\n }\n}\n\n@media (hover: hover) {\n .comimi-arrow-button:hover .comimi-arrow-bg {\n inset: -3px;\n border-radius: 20px;\n }\n\n .comimi-arrow-next:hover .comimi-arrow-icon {\n animation: comimi-arrow-bounce 0.5s ease-in-out 0.1s both;\n }\n\n .comimi-arrow-prev:hover .comimi-arrow-icon {\n animation: comimi-arrow-bounce-prev 0.5s ease-in-out 0.1s both;\n }\n}\n\n@media (max-width: 767px) {\n .comimi-arrow-button {\n width: 36px;\n height: 50px;\n }\n\n .comimi-arrow-next {\n right: 0;\n }\n\n .comimi-arrow-prev {\n left: 0;\n }\n\n .comimi-arrow-next .comimi-arrow-bg {\n border-radius: 16px 0 0 16px;\n }\n\n .comimi-arrow-prev .comimi-arrow-bg {\n border-radius: 0 16px 16px 0;\n }\n}\n", pe = "\n.comimi-center-message {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n pointer-events: none;\n z-index: 20;\n transition: opacity 0.3s linear;\n}\n\n.comimi-center-message[data-overlay=\"false\"] {\n opacity: 0;\n transition: opacity 0.15s linear;\n}\n\n.comimi-center-message-text {\n box-sizing: border-box;\n padding: 6px 12px;\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.5);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n color: #bbb;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.45;\n text-align: center;\n white-space: nowrap;\n}\n\n.comimi-center-message-mobile {\n display: none;\n}\n\n@media (max-width: 767px) {\n .comimi-center-message {\n width: calc(100% - 60px * 2);\n max-width: max-content;\n }\n\n .comimi-center-message-desktop {\n display: none;\n }\n\n .comimi-center-message-mobile {\n display: block;\n }\n}\n", me = "\n/* --- Controls dock (bottom) ------------------------------------------- */\n\n.comimi-controls-dock {\n box-sizing: border-box;\n position: absolute;\n bottom: 24px;\n left: 24px;\n width: calc(100% - 48px);\n padding: 20px 24px;\n z-index: 40;\n pointer-events: auto;\n transition:\n transform 0.6s var(--comimi-spring),\n opacity 0.3s linear;\n}\n\n.comimi-controls-dock[data-overlay=\"false\"] {\n transform: translateY(35px);\n opacity: 0;\n pointer-events: none;\n transition:\n transform 0.3s var(--comimi-spring),\n opacity 0.15s linear;\n}\n\n.comimi-controls-bg {\n position: absolute;\n inset: 0;\n border-radius: 20px;\n background: var(--comimi-glass);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n transition: inset 0.36s var(--comimi-spring), border-radius 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-controls-dock:hover > .comimi-controls-bg {\n inset: -4px -4px 0 -4px;\n border-radius: 20px;\n }\n}\n\n.comimi-controls-row {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n justify-content: space-between;\n align-items: center;\n}\n\n.comimi-controls-side {\n display: grid;\n grid-auto-flow: column;\n column-gap: 16px;\n justify-content: end;\n align-items: center;\n transition:\n opacity 0.2s ease-in-out,\n visibility 0.2s ease-in-out;\n}\n\n.comimi-controls-dock[data-autoplay=\"true\"] .comimi-controls-side {\n opacity: 0;\n visibility: hidden;\n}\n\n/* --- Seek bar --------------------------------------------------------- */\n\n.comimi-seek {\n position: relative;\n display: grid;\n grid-template-columns: auto 1fr;\n column-gap: 10px;\n align-items: center;\n margin-bottom: 10px;\n}\n\n.comimi-seek-text {\n display: grid;\n grid-template-columns: repeat(2, auto);\n justify-content: start;\n align-items: end;\n line-height: 14px;\n}\n\n.comimi-seek-current {\n color: #333;\n font-size: 12px;\n font-weight: 700;\n}\n\n.comimi-seek-total {\n color: #999;\n font-size: 12px;\n font-weight: 400;\n margin-left: 0.4em;\n}\n\n.comimi-seek-bar {\n position: relative;\n width: 100%;\n height: 18px;\n}\n\n.comimi-seek-track {\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n height: 8px;\n border-radius: 999px;\n background: #e0e0e0;\n overflow: hidden;\n transform: translateY(-50%);\n transition: height 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-seek-bar:hover .comimi-seek-track {\n height: 12px;\n }\n}\n\n.comimi-seek-fill {\n position: absolute;\n top: 0;\n height: 100%;\n border-radius: 999px;\n background: #666;\n}\n\n.comimi-seek-bar[data-direction=\"rtl\"] .comimi-seek-fill {\n right: 0;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.comimi-seek-bar[data-direction=\"ltr\"] .comimi-seek-fill {\n left: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.comimi-seek-input {\n position: absolute;\n inset: 0;\n z-index: 1;\n width: 100%;\n height: 18px;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n}\n\n.comimi-seek-input::-webkit-slider-runnable-track {\n height: 8px;\n background: transparent;\n border: 0;\n}\n\n.comimi-seek-input::-webkit-slider-thumb {\n appearance: none;\n -webkit-appearance: none;\n width: 18px;\n height: 18px;\n margin-top: -5px;\n border: 0;\n border-radius: 50%;\n background: #666;\n box-shadow: none;\n transition:\n transform 0.36s var(--comimi-spring),\n background-color 0.2s ease-in-out;\n}\n\n.comimi-seek-input:hover::-webkit-slider-thumb {\n transform: scale(1.15);\n}\n\n.comimi-seek-input::-moz-range-track {\n height: 8px;\n background: transparent;\n border: 0;\n}\n\n.comimi-seek-input::-moz-range-thumb {\n width: 18px;\n height: 18px;\n border: 0;\n border-radius: 50%;\n background: #666;\n box-shadow: none;\n transition:\n transform 0.36s var(--comimi-spring),\n background-color 0.2s ease-in-out;\n}\n\n.comimi-seek-input:hover::-moz-range-thumb {\n transform: scale(1.15);\n}\n\n.comimi-seek-input:focus-visible {\n outline: none;\n}\n\n.comimi-seek-input:focus-visible::-webkit-slider-thumb {\n box-shadow: none;\n}\n\n.comimi-seek-input:focus-visible::-moz-range-thumb {\n box-shadow: none;\n}\n\n.comimi-seek-input[data-direction=\"rtl\"] {\n direction: rtl;\n}\n\n/* --- Seek preview ---------------------------------------------------- */\n\n.comimi-seek-preview {\n position: absolute;\n bottom: 100%;\n left: 0;\n margin-bottom: 14px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 6px;\n pointer-events: none;\n opacity: 0;\n transform: translateX(-50%);\n transition: opacity 0.16s linear;\n z-index: 5;\n}\n\n.comimi-seek-preview[data-show=\"true\"] {\n opacity: 1;\n}\n\n.comimi-seek-preview-thumbs {\n display: flex;\n flex-direction: row;\n gap: 4px;\n}\n\n.comimi-seek-preview-thumb {\n position: relative;\n width: 80px;\n aspect-ratio: 100 / 141;\n background: #fff;\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);\n}\n\n.comimi-seek-preview-thumb img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n user-select: none;\n -webkit-user-drag: none;\n}\n\n.comimi-seek-preview-thumb[data-kind=\"html\"] {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 8px;\n color: #aaa;\n font-size: 11px;\n font-weight: 700;\n line-height: 1.4;\n text-align: center;\n}\n\n.comimi-seek-preview-label {\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n backdrop-filter: blur(5px);\n box-shadow: var(--comimi-shadow);\n border-radius: 8px;\n padding: 4px 10px;\n font-size: 12px;\n font-weight: 600;\n}\n\n@media (hover: none) {\n .comimi-seek-preview {\n display: none;\n }\n}\n\n/* --- Auto Play -------------------------------------------------------- */\n\n.comimi-autoplay {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n column-gap: 12px;\n justify-content: start;\n align-items: center;\n}\n\n.comimi-autoplay-button {\n position: relative;\n width: 24px;\n height: 24px;\n padding: 0;\n border: 0;\n background: transparent;\n color: #666;\n cursor: pointer;\n}\n\n.comimi-autoplay-window {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 20px;\n height: 20px;\n overflow: hidden;\n transform: translate(-50%, -50%);\n}\n\n.comimi-autoplay-slider {\n position: absolute;\n top: 0;\n right: 0;\n width: 200%;\n height: 100%;\n transition: transform 0.36s var(--comimi-spring);\n}\n\n.comimi-autoplay-slider[data-active=\"true\"] {\n transform: translateX(50%);\n}\n\n.comimi-autoplay-icon {\n position: absolute;\n top: 0;\n width: 50%;\n height: 100%;\n display: block;\n}\n\n.comimi-autoplay-icon-play {\n right: 0;\n}\n\n.comimi-autoplay-icon-pause {\n left: 0;\n}\n\n.comimi-autoplay-progress {\n position: relative;\n width: 140px;\n height: 6px;\n border-radius: 999px;\n background: #e0e0e0;\n overflow: hidden;\n}\n\n.comimi-autoplay-progress-bar {\n display: block;\n position: absolute;\n inset: 0;\n border-radius: 999px;\n background: #666;\n animation: comimi-autoplay-progress 3s linear 0s infinite;\n}\n\n/* --- Page Mode Toggle (single / spread) ------------------------------ */\n\n.comimi-page-mode {\n position: relative;\n width: 80px;\n height: 30px;\n}\n\n.comimi-page-mode-wrapper {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 80px;\n height: 30px;\n display: grid;\n grid-template-columns: 1fr 1fr;\n background: #eeeeee;\n border-radius: 8px;\n transform: translate(-50%, -50%);\n transition: width 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-page-mode-wrapper:hover {\n width: 95px;\n }\n}\n\n.comimi-page-mode-button {\n position: relative;\n display: grid;\n place-content: center;\n width: 100%;\n height: 100%;\n padding: 0;\n border: 0;\n background: transparent;\n color: #666;\n cursor: pointer;\n}\n\n.comimi-page-mode-icon {\n display: block;\n width: 20px;\n opacity: 0.3;\n transform-origin: center bottom;\n transition: opacity 0.2s ease-in-out;\n}\n\n.comimi-page-mode-button[data-selected=\"true\"] .comimi-page-mode-icon {\n opacity: 1;\n}\n\n.comimi-page-mode-icon.comimi-pop-animate {\n animation: comimi-pop 0.5s ease-in-out 0s both;\n}\n\n/* --- Settings (button + popover panel) ------------------------------- */\n\n.comimi-settings {\n position: relative;\n width: 24px;\n height: 24px;\n}\n\n.comimi-settings-button {\n position: absolute;\n inset: 0;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n\n.comimi-settings-icon {\n display: block;\n width: 100%;\n height: 100%;\n color: #666;\n transition: transform 0.36s var(--comimi-spring);\n}\n\n.comimi-settings[data-open=\"true\"] .comimi-settings-icon {\n transform: rotate(30deg);\n}\n\n@keyframes comimi-pop {\n from, to {\n transform: scale(1, 1);\n }\n 50% {\n transform: scale(0.95, 1.15);\n }\n 75% {\n transform: scale(1.15, 0.95);\n }\n}\n\n@keyframes comimi-autoplay-progress {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n\n@media (max-width: 767px) {\n .comimi-controls-dock {\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));\n }\n\n .comimi-controls-bg {\n border-radius: 20px 20px 0 0;\n }\n}\n", he = "\n.comimi-error-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: grid;\n gap: 10px;\n justify-items: center;\n width: 80px;\n}\n\n.comimi-error-icon-svg {\n width: 80px;\n}\n\n.comimi-error-svg {\n display: block;\n width: 100%;\n transform-origin: center bottom;\n animation: comimi-error-fall 0.8s ease-in-out 0s both;\n}\n\n.comimi-error-stroke {\n fill: none;\n stroke: #ccc;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 10px;\n}\n\n.comimi-error-mimi {\n transform-origin: 56px 43px;\n}\n\n.comimi-error-mimi-left {\n animation:\n comimi-error-mimi-left-intro 0.8s ease-in-out 0s both,\n comimi-error-mimi-left-loop 1.5s ease-in-out 0.8s infinite forwards;\n}\n\n.comimi-error-mimi-right {\n animation:\n comimi-error-mimi-right-intro 0.8s ease-in-out 0s both,\n comimi-error-mimi-right-loop 1.5s ease-in-out 0.8s infinite forwards;\n}\n\n.comimi-error-eye {\n fill: #ccc;\n transform-origin: center;\n transform-box: fill-box;\n animation: comimi-error-eye 1.5s ease-in-out 0.8s infinite forwards;\n}\n\n.comimi-error-icon-text {\n color: #aaa;\n font-size: 12px;\n font-weight: 700;\n line-height: 1.45;\n text-align: center;\n}\n\n@keyframes comimi-error-fall {\n from {\n opacity: 0;\n transform: translateY(-40%) rotate(10deg);\n }\n 20% {\n opacity: 1;\n }\n 40% {\n transform: translateY(0) rotate(0);\n }\n 60% {\n transform: translateY(0) scale(1.1, 0.95);\n }\n 80% {\n transform: translateY(0) scale(0.95, 1.1);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes comimi-error-mimi-left-intro {\n from {\n transform: rotate(0deg);\n }\n 60% {\n transform: rotate(20deg);\n }\n to {\n transform: rotate(10deg);\n }\n}\n\n@keyframes comimi-error-mimi-left-loop {\n from, to {\n transform: rotate(10deg);\n }\n 50% {\n transform: rotate(30deg);\n }\n}\n\n@keyframes comimi-error-mimi-right-intro {\n from {\n transform: rotate(0deg);\n }\n 60% {\n transform: rotate(-20deg);\n }\n to {\n transform: rotate(-10deg);\n }\n}\n\n@keyframes comimi-error-mimi-right-loop {\n from, to {\n transform: rotate(-10deg);\n }\n 50% {\n transform: rotate(-30deg);\n }\n}\n\n@keyframes comimi-error-eye {\n from, to {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(4px);\n }\n}\n", ge = "\n.comimi-icon {\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.comimi-icon-fill {\n fill: currentColor;\n transition: fill .2s linear;\n}\n\n.comimi-icon-stroke {\n fill: none;\n stroke: currentColor;\n stroke-width: 1.6;\n transition: stroke .2s linear;\n}\n\n.comimi-menu-svg,\n.comimi-close-svg {\n display: block;\n position: relative;\n width: 34px;\n height: 34px;\n}\n\n.comimi-menu-svg span,\n.comimi-close-svg span {\n position: absolute;\n left: 50%;\n width: 17px;\n height: 3px;\n border-radius: 999px;\n background: #666;\n}\n\n.comimi-menu-svg span:nth-child(1) {\n top: 9px;\n transform: translateX(-50%);\n}\n\n.comimi-menu-svg span:nth-child(2) {\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.comimi-menu-svg span:nth-child(3) {\n bottom: 9px;\n transform: translateX(-50%);\n}\n\n.comimi-close-svg span {\n top: 50%;\n}\n\n.comimi-close-svg span:nth-child(1) {\n transform: translate(-50%, -50%) rotate(45deg);\n}\n\n.comimi-close-svg span:nth-child(2) {\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n", _e = "\n.comimi-selectbox {\n position: relative;\n display: inline-block;\n width: 100%;\n}\n\n.comimi-selectbox-bg {\n position: absolute;\n inset: 0;\n border-radius: 8px;\n background: #eeeeee;\n transition: inset 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-selectbox:hover .comimi-selectbox-bg {\n inset: -3px;\n }\n}\n\n.comimi-selectbox-select {\n position: absolute;\n inset: 0;\n z-index: 2;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n appearance: none;\n -webkit-appearance: none;\n color: transparent;\n font: inherit;\n cursor: pointer;\n opacity: 0;\n}\n\n.comimi-selectbox-select:disabled {\n cursor: not-allowed;\n}\n\n.comimi-selectbox-select option {\n color: #333;\n background-color: #fff;\n}\n\n.comimi-selectbox-label {\n position: relative;\n display: block;\n box-sizing: border-box;\n width: 100%;\n padding: 8px 32px 8px 12px;\n color: #333;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.45;\n cursor: pointer;\n pointer-events: none;\n}\n\n.comimi-selectbox-arrow {\n position: absolute;\n top: 50%;\n right: 12px;\n z-index: 1;\n width: 16px;\n height: 16px;\n color: #aaa;\n transform: translateY(-50%) rotate(90deg);\n pointer-events: none;\n}\n\n@media (hover: hover) {\n .comimi-selectbox:hover .comimi-selectbox-arrow {\n animation: comimi-selectbox-arrow 0.5s ease-in-out 0s both;\n }\n}\n\n@keyframes comimi-selectbox-arrow {\n from, to {\n transform: translateY(-50%) rotate(90deg);\n }\n 40% {\n transform: translateY(calc(-50% + 3px)) rotate(90deg);\n }\n 70% {\n transform: translateY(calc(-50% - 1.5px)) rotate(90deg);\n }\n}\n\n.comimi-toggle-switch {\n display: grid;\n grid-template-columns: repeat(2, auto);\n column-gap: 6px;\n justify-content: start;\n align-items: center;\n width: 100%;\n padding: 2px;\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n\n.comimi-toggle-track {\n position: relative;\n width: 32px;\n height: 18px;\n border-radius: 999px;\n background: #eeeeee;\n transition: background-color 0.2s linear;\n}\n\n.comimi-toggle-switch[data-checked=\"true\"] .comimi-toggle-track {\n background: #666;\n}\n\n.comimi-toggle-knob {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background: #666;\n transition:\n transform 0.36s var(--comimi-spring),\n background-color 0.2s linear;\n}\n\n.comimi-toggle-switch[data-checked=\"true\"] .comimi-toggle-knob {\n background: #fff;\n transform: translateX(100%);\n}\n\n.comimi-toggle-label-wrap {\n position: relative;\n width: 22px;\n height: 12px;\n overflow: hidden;\n}\n\n.comimi-toggle-label-inner {\n position: absolute;\n inset: 0;\n transition: transform 0.36s var(--comimi-spring);\n}\n\n.comimi-toggle-switch[data-checked=\"false\"] .comimi-toggle-label-inner {\n transform: translateX(-100%);\n}\n\n.comimi-toggle-label {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n font-size: 11px;\n font-weight: 400;\n line-height: 12px;\n text-align: center;\n}\n\n.comimi-toggle-label-on {\n color: #333;\n}\n\n.comimi-toggle-label-off {\n color: #aaa;\n transform: translateX(100%);\n}\n\n.comimi-range-slider {\n display: grid;\n grid-template-columns: 1fr auto;\n column-gap: 8px;\n align-items: center;\n width: 100%;\n}\n\n.comimi-range-slider[data-disabled=\"true\"] {\n opacity: 0.6;\n}\n\n.comimi-range-slider-wrap {\n position: relative;\n display: grid;\n align-items: center;\n min-width: 0;\n height: 18px;\n}\n\n.comimi-range-slider-track {\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n height: 6px;\n border-radius: 999px;\n background: #eeeeee;\n overflow: hidden;\n transform: translateY(-50%);\n transition: height 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-range-slider-wrap:hover .comimi-range-slider-track {\n height: 10px;\n }\n}\n\n.comimi-range-slider-fill {\n display: block;\n height: 100%;\n background: #666;\n border-radius: inherit;\n}\n\n.comimi-range-slider-input {\n position: relative;\n z-index: 1;\n width: 100%;\n height: 18px;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n appearance: none;\n -webkit-appearance: none;\n cursor: pointer;\n}\n\n.comimi-range-slider-input::-webkit-slider-runnable-track {\n height: 6px;\n background: transparent;\n border: 0;\n}\n\n.comimi-range-slider-input::-webkit-slider-thumb {\n appearance: none;\n -webkit-appearance: none;\n width: 18px;\n height: 18px;\n margin-top: -6px;\n border: 0;\n border-radius: 50%;\n background: #666;\n box-shadow: none;\n transition:\n transform 0.36s var(--comimi-spring),\n background-color 0.2s ease-in-out;\n}\n\n.comimi-range-slider-input:hover:not(:disabled)::-webkit-slider-thumb {\n transform: scale(1.15);\n}\n\n.comimi-range-slider-input::-moz-range-track {\n height: 6px;\n background: transparent;\n border: 0;\n}\n\n.comimi-range-slider-input::-moz-range-thumb {\n width: 18px;\n height: 18px;\n border: 0;\n border-radius: 50%;\n background: #666;\n box-shadow: none;\n transition:\n transform 0.36s var(--comimi-spring),\n background-color 0.2s ease-in-out;\n}\n\n.comimi-range-slider-input:hover:not(:disabled)::-moz-range-thumb {\n transform: scale(1.15);\n}\n\n.comimi-range-slider-input:focus-visible {\n outline: none;\n}\n\n.comimi-range-slider-input:focus-visible::-webkit-slider-thumb {\n box-shadow: none;\n}\n\n.comimi-range-slider-input:focus-visible::-moz-range-thumb {\n box-shadow: none;\n}\n\n.comimi-range-slider-value {\n width: 36px;\n color: #666;\n font-size: 11px;\n font-weight: 400;\n line-height: 1;\n text-align: right;\n white-space: nowrap;\n}\n", ve = "\n.comimi-loading-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: grid;\n gap: 10px;\n justify-items: center;\n width: 80px;\n}\n\n.comimi-loading-icon-svg {\n width: 80px;\n}\n\n.comimi-loading-svg {\n display: block;\n width: 100%;\n transform-origin: center bottom;\n}\n\n.comimi-loading-stroke {\n fill: none;\n stroke: #ccc;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 10px;\n}\n\n.comimi-loading-mimi {\n transform-origin: 56px 43px;\n}\n\n.comimi-loading-mimi-left {\n animation:\n comimi-loading-mimi-left 0.4s ease-in-out 0.1s 2 forwards,\n comimi-loading-mimi-left 0.4s ease-in-out 1.7s 2 forwards;\n}\n\n.comimi-loading-mimi-right {\n animation:\n comimi-loading-mimi-right 0.4s ease-in-out 0.1s 2 forwards,\n comimi-loading-mimi-right 0.4s ease-in-out 1.7s 2 forwards;\n}\n\n.comimi-loading-eyes {\n transform: translateX(-7px);\n animation:\n comimi-loading-eyes-move 0.4s ease-in-out 1.2s both,\n comimi-loading-eyes-move 0.4s ease-in-out 2.6s reverse forwards;\n}\n\n.comimi-loading-eye {\n fill: #ccc;\n transform-origin: center;\n transform-box: fill-box;\n animation:\n comimi-loading-eye 0.4s ease-in-out 0s forwards,\n comimi-loading-eye 0.4s ease-in-out 1.6s forwards;\n}\n\n.comimi-loading-icon-text {\n color: #aaa;\n font-size: 12px;\n font-weight: 700;\n line-height: 1.45;\n text-align: center;\n}\n\n.comimi-loading-icon-text span {\n display: inline-block;\n animation: comimi-loading-dot 0.8s ease-in-out 0s infinite both;\n}\n\n.comimi-loading-icon-text span:nth-child(1) {\n animation-delay: 0s;\n}\n\n.comimi-loading-icon-text span:nth-child(2) {\n animation-delay: 0.15s;\n}\n\n.comimi-loading-icon-text span:nth-child(3) {\n animation-delay: 0.3s;\n}\n\n@keyframes comimi-loading-mimi-left {\n from, to {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(20deg);\n }\n}\n\n@keyframes comimi-loading-mimi-right {\n from, to {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(-20deg);\n }\n}\n\n@keyframes comimi-loading-eyes-move {\n from {\n transform: translateX(-7px);\n }\n to {\n transform: translateX(7px);\n }\n}\n\n@keyframes comimi-loading-eye {\n from, to {\n transform: scaleY(1);\n }\n 50% {\n transform: scaleY(0.2);\n }\n}\n\n@keyframes comimi-loading-dot {\n from, 50%, to {\n opacity: 1;\n }\n 25% {\n opacity: 0;\n }\n}\n", ye = "\n.comimi-menu-panel {\n position: absolute;\n top: 24px;\n left: 24px;\n width: 420px;\n z-index: 45;\n pointer-events: auto;\n transition:\n transform 0.6s var(--comimi-spring),\n opacity 0.3s linear;\n}\n\n.comimi-menu-panel[data-overlay=\"false\"] {\n transform: translateY(-35px);\n opacity: 0;\n pointer-events: none;\n transition:\n transform 0.3s var(--comimi-spring),\n opacity 0.15s linear;\n}\n\n.comimi-menu-bg {\n position: absolute;\n inset: 0;\n border-radius: 16px;\n background: var(--comimi-glass);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n transition: inset 0.36s var(--comimi-spring);\n}\n\n@media (hover: hover) {\n .comimi-menu-panel:hover > .comimi-menu-bg {\n inset: -5px;\n }\n}\n\n.comimi-menu-top {\n position: relative;\n display: grid;\n grid-template-columns: auto 1fr;\n column-gap: 13px;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n height: 62px;\n padding: 0 13px;\n border: 0;\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.comimi-menu-button {\n position: relative;\n width: 34px;\n height: 34px;\n overflow: hidden;\n}\n\n.comimi-menu-button-inner {\n display: block;\n position: absolute;\n inset: 0;\n transition: transform 0.4s var(--comimi-spring);\n}\n\n.comimi-menu-panel[data-open=\"true\"] .comimi-menu-button-inner {\n transform: translateY(100%);\n}\n\n.comimi-menu-button-inner > * {\n position: absolute;\n inset: 0;\n}\n\n.comimi-menu-button-inner > *:nth-child(2) {\n transform: translateY(-100%);\n}\n\n.comimi-menu-title-wrap {\n min-width: 0;\n}\n\n.comimi-menu-title {\n display: block;\n width: 100%;\n color: #333;\n font-size: 15px;\n font-weight: 700;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.comimi-menu-author {\n display: block;\n width: 100%;\n color: #666;\n font-size: 12px;\n font-weight: 400;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.comimi-menu-bottom {\n position: relative;\n width: 100%;\n overflow: hidden;\n transition: height 0.24s ease-in-out;\n}\n\n.comimi-menu-border {\n width: 100%;\n height: 1px;\n background: #e0e0e0;\n}\n\n.comimi-menu-view {\n position: absolute;\n top: 1px;\n left: 0;\n width: 100%;\n transition: all 0.28s ease-in-out;\n opacity: 0;\n visibility: hidden;\n transform: scale(0.92);\n filter: blur(5px);\n}\n\n.comimi-menu-view-menu {\n position: relative;\n}\n\n.comimi-menu-panel[data-view=\"menu\"] .comimi-menu-view-menu,\n.comimi-menu-panel[data-view=\"shortcut\"] .comimi-menu-view-shortcut,\n.comimi-menu-panel[data-view=\"pageList\"] .comimi-menu-view-page-list {\n opacity: 1;\n visibility: visible;\n transform: scale(1);\n filter: blur(0);\n}\n\n.comimi-menu-list {\n position: relative;\n width: 100%;\n padding: 10px 0;\n}\n\n.comimi-menu-link {\n box-sizing: border-box;\n display: grid;\n grid-template-columns: 1fr auto;\n column-gap: 8px;\n align-items: center;\n width: 100%;\n padding: 10px 16px 10px 22px;\n border: 0;\n border-radius: 10px;\n background: transparent;\n color: #666;\n cursor: pointer;\n transition: background-color 0.24s linear;\n}\n\n.comimi-menu-link:hover {\n background: #f1f1f1;\n}\n\n.comimi-menu-link-text {\n color: #666;\n font-size: 14px;\n font-weight: 700;\n line-height: 1.45;\n text-align: left;\n}\n\n.comimi-menu-link-arrow {\n display: block;\n width: 20px;\n height: 20px;\n color: #aaa;\n}\n\n.comimi-menu-link-arrow > svg {\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.comimi-page-list-inner {\n box-sizing: border-box;\n padding: 0 22px;\n max-height: 315px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.comimi-page-list-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n}\n\n.comimi-page-list-item {\n display: grid;\n row-gap: 4px;\n padding: 0;\n border: 0;\n background: transparent;\n color: #666;\n cursor: pointer;\n text-align: center;\n}\n\n.comimi-page-list-thumb {\n position: relative;\n display: block;\n width: 100%;\n aspect-ratio: 100 / 141;\n background: #fff;\n border-radius: 6px;\n outline: 3px solid #e0e0e0;\n}\n\n.comimi-page-list-thumb-html {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 8px;\n text-align: center;\n color: #aaa;\n font-size: 11px;\n font-weight: 700;\n line-height: 1.4;\n}\n\n.comimi-page-list-thumb img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n border-radius: 4px;\n user-select: none;\n -webkit-user-drag: none;\n}\n\n.comimi-page-list-text {\n color: #666;\n font-size: 14px;\n font-weight: 700;\n}\n\n.comimi-shortcut-inner {\n box-sizing: border-box;\n padding: 0 22px;\n max-height: 315px;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.comimi-shortcut-grid {\n display: grid;\n row-gap: 22px;\n}\n\n.comimi-shortcut-section {\n display: grid;\n row-gap: 8px;\n}\n\n.comimi-shortcut-heading {\n color: #666;\n font-size: 12px;\n font-weight: 700;\n line-height: 1.45;\n}\n\n.comimi-shortcut-list {\n display: grid;\n row-gap: 8px;\n justify-items: start;\n}\n\n.comimi-shortcut-column {\n display: flex;\n flex-wrap: wrap;\n gap: 8px 16px;\n align-items: center;\n}\n\n.comimi-shortcut-item {\n display: grid;\n grid-template-columns: repeat(2, auto);\n column-gap: 8px;\n align-items: center;\n width: fit-content;\n}\n\n.comimi-shortcut-badge {\n display: grid;\n grid-auto-flow: column;\n column-gap: 6px;\n align-items: center;\n padding: 4px 8px;\n border-radius: 7px;\n background: #eeeeee;\n}\n\n.comimi-shortcut-key {\n color: #666;\n font-size: 13px;\n font-weight: 700;\n line-height: 1.45;\n}\n\n.comimi-shortcut-or::before {\n content: \"or\";\n display: block;\n color: #666;\n font-size: 11px;\n font-weight: 400;\n line-height: 1.45;\n}\n\n.comimi-shortcut-label {\n color: #666;\n font-size: 13px;\n font-weight: 400;\n line-height: 1.45;\n}\n\n.comimi-back-button {\n position: relative;\n width: 100%;\n height: 56px;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n\n.comimi-back-inner {\n position: absolute;\n inset: 8px;\n}\n\n.comimi-back-bg {\n position: absolute;\n inset: 0;\n border-radius: 8px;\n background: #eeeeee;\n transition: inset 0.36s var(--comimi-spring), border-radius 0.36s var(--comimi-spring);\n}\n\n.comimi-back-button:hover .comimi-back-bg {\n inset: -4px;\n border-radius: 10px;\n}\n\n.comimi-back-text {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: #666;\n font-size: 14px;\n font-weight: 700;\n line-height: 1.45;\n pointer-events: none;\n}\n\n.comimi-back-arrow {\n position: absolute;\n top: 50%;\n left: 8px;\n width: 22px;\n height: 22px;\n color: #aaa;\n transform: translateY(-50%) scaleX(-1);\n pointer-events: none;\n}\n\n.comimi-back-arrow > svg {\n display: block;\n width: 100%;\n height: 100%;\n}\n\n@media (max-width: 767px) {\n .comimi-menu-panel {\n top: 0;\n left: 0;\n width: 100%;\n }\n\n .comimi-menu-bg {\n border-radius: 0 0 16px 16px;\n }\n\n .comimi-menu-top {\n width: 100%;\n }\n\n .comimi-page-list-inner,\n .comimi-shortcut-inner {\n max-height: calc(var(--view-height, 100vh) - 62px - 56px);\n }\n}\n", be = "\n.comimi-notifications {\n position: absolute;\n bottom: 140px;\n left: 50%;\n transform: translateX(-50%);\n display: grid;\n row-gap: 8px;\n justify-items: center;\n pointer-events: none;\n z-index: 35;\n}\n\n.comimi-toast {\n display: grid;\n grid-template-columns: auto auto;\n gap: 5px;\n align-items: center;\n justify-content: center;\n width: fit-content;\n padding: 6px 13px 6px 8px;\n border-radius: 999px;\n background-color: #666;\n animation: comimi-toast-popup 0.37s ease-in-out 0s both;\n}\n\n.comimi-toast-dot {\n display: block;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: #888;\n}\n\n.comimi-toast-text {\n color: #fff;\n font-size: 12px;\n font-weight: 700;\n line-height: 1.45;\n}\n\n@keyframes comimi-toast-popup {\n from {\n transform: translateY(6px) scale(0.2, 0.8);\n opacity: 0;\n }\n 60% {\n transform: translateY(-1px) scale(1.1, 1.05);\n opacity: 1;\n }\n to {\n transform: scale(1, 1);\n opacity: 1;\n }\n}\n\n@media (max-width: 767px) {\n .comimi-notifications {\n bottom: calc(120px + env(safe-area-inset-bottom, 0px));\n }\n}\n", xe = "\n.comimi-stage {\n position: absolute;\n inset: 0;\n will-change: transform;\n transition: transform .18s ease;\n}\n\n.comimi-stage[data-dragging=\"true\"] {\n transition: none;\n}\n\n.comimi-page-group {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0;\n box-sizing: border-box;\n}\n\n.comimi-page {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n min-width: 0;\n min-height: 0;\n background: transparent;\n overflow: hidden;\n flex: 0 0 auto;\n}\n\n.comimi-page[data-spread=\"true\"] {\n width: 50%;\n height: 100%;\n}\n\n.comimi-page[data-spread=\"false\"] {\n width: 100%;\n height: 100%;\n}\n\n.comimi-page[data-position=\"left\"] {\n justify-content: flex-end;\n}\n\n.comimi-page[data-position=\"right\"] {\n justify-content: flex-start;\n}\n\n.comimi-page img,\n.comimi-html-page {\n display: block;\n max-width: 100%;\n max-height: 100%;\n width: 100%;\n height: 100%;\n object-fit: contain;\n transform-origin: center center;\n user-select: none;\n -webkit-user-select: none;\n -webkit-user-drag: none;\n -webkit-touch-callout: none;\n}\n\n.comimi-page img {\n pointer-events: none;\n}\n\n.comimi-page[data-spread=\"true\"] img,\n.comimi-page[data-spread=\"true\"] .comimi-html-page {\n width: 100%;\n height: 100%;\n}\n\n.comimi-page[data-position=\"left\"] img,\n.comimi-page[data-position=\"left\"] .comimi-html-page {\n object-position: right center;\n}\n\n.comimi-page[data-position=\"right\"] img,\n.comimi-page[data-position=\"right\"] .comimi-html-page {\n object-position: left center;\n}\n\n.comimi-html-page {\n width: min(100%, 960px);\n height: min(100%, 680px);\n background: #fff;\n color: #111;\n overflow: auto;\n}\n\n", Se = "\n.comimi-rabbit {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n aspect-ratio: 1 / 1;\n z-index: 0;\n pointer-events: none;\n}\n\n.comimi-rabbit > * {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n\n.comimi-controls-dock > .comimi-rabbit {\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.comimi-menu-panel > .comimi-rabbit {\n top: 12px;\n right: 20px;\n}\n\n@media (max-width: 767px) {\n .comimi-controls-dock > .comimi-rabbit {\n display: none;\n }\n}\n\n@media (min-width: 768px) {\n .comimi-menu-panel > .comimi-rabbit {\n display: none;\n }\n}\n", Ce = "\n.comimi-scrollfade {\n position: relative;\n overscroll-behavior: contain;\n}\n\n.comimi-scrollfade::before,\n.comimi-scrollfade::after {\n content: \"\";\n position: sticky;\n display: block;\n left: 0;\n width: 100%;\n height: 32px;\n z-index: 2;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.16s linear;\n}\n\n.comimi-scrollfade::before {\n top: 0;\n background: linear-gradient(to bottom, #fff, transparent);\n}\n\n.comimi-scrollfade::after {\n bottom: 0;\n background: linear-gradient(to top, #fff, transparent);\n}\n\n.comimi-scrollfade[data-scroll-up=\"true\"]::before {\n opacity: 1;\n}\n\n.comimi-scrollfade[data-scroll-down=\"true\"]::after {\n opacity: 1;\n}\n", we = "\n.comimi-settings-panel {\n position: absolute;\n top: 0;\n right: -16px;\n width: 250px;\n height: 0;\n border-radius: 20px;\n overflow: hidden;\n background: var(--comimi-glass-strong);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n opacity: 0;\n transform: translateY(calc(-100% - 8px));\n transition:\n height 0.38s cubic-bezier(0.12, 1.06, 0.56, 1.02),\n opacity 0.38s cubic-bezier(0.12, 1.06, 0.56, 1.02);\n z-index: 10;\n}\n\n.comimi-settings-panel[data-open=\"true\"] {\n opacity: 1;\n height: var(--comimi-settings-height, 460px);\n}\n\n.comimi-settings-panel-body {\n position: relative;\n width: 100%;\n max-height: calc(var(--view-height, 100vh) - 62px - 56px);\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n.comimi-settings-panel-inner {\n box-sizing: border-box;\n position: relative;\n padding: 0 20px;\n}\n\n.comimi-settings-panel-title {\n color: #333;\n font-size: 14px;\n font-weight: 700;\n text-align: center;\n}\n\n.comimi-settings-section {\n display: grid;\n row-gap: 8px;\n margin-top: 18px;\n}\n\n.comimi-settings-label {\n color: #333;\n font-size: 12px;\n font-weight: 400;\n}\n\n", Te = "\n.comimi-splash {\n position: absolute;\n inset: 0;\n z-index: 100;\n background-color: #e0e0e0;\n overflow: hidden;\n animation: comimi-splash-clip 1s cubic-bezier(0.82, 0.01, 0.48, 1.02) 1s both;\n pointer-events: none;\n}\n\n.comimi-splash-logo-wrap {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -60%);\n width: 260px;\n aspect-ratio: 290 / 99;\n}\n\n.comimi-splash-logo {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0.72);\n width: 360px;\n aspect-ratio: 360 / 99;\n}\n\n.comimi-splash-symbol {\n position: absolute;\n top: 0;\n left: 0;\n width: 113px;\n display: block;\n transform-origin: center bottom;\n}\n\n.comimi-splash-logo-wrap-custom {\n width: 120px;\n aspect-ratio: 1 / 1;\n}\n\n.comimi-splash-logo-wrap-custom .comimi-splash-text {\n transform: translate(-50%, calc(100% + 16px));\n}\n\n.comimi-splash-custom-logo {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 120px;\n aspect-ratio: 1 / 1;\n}\n\n.comimi-splash-custom-logo > * {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n}\n\n.comimi-splash-typo-wrap {\n position: absolute;\n right: 7px;\n bottom: 11px;\n width: 229.5px;\n}\n\n.comimi-splash-typo {\n display: block;\n width: 100%;\n overflow: visible;\n}\n\n.comimi-splash-stroke {\n fill: none;\n stroke: #fff;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 10px;\n}\n\n.comimi-splash-mimi {\n transform-origin: 56px 43px;\n}\n\n.comimi-splash-mimi-left {\n animation: comimi-splash-mimi-left 0.4s ease-in-out 0.3s 2 forwards;\n}\n\n.comimi-splash-mimi-right {\n animation: comimi-splash-mimi-right 0.4s ease-in-out 0.3s 2 forwards;\n}\n\n.comimi-splash-eyes {\n transform: translateX(-7px);\n}\n\n.comimi-splash-eye {\n transform-origin: center;\n transform-box: fill-box;\n animation: comimi-splash-eye 0.4s ease-in-out 0.2s forwards;\n}\n\n.comimi-splash-heart {\n --size: 14px;\n position: absolute;\n top: -20px;\n width: var(--size);\n height: var(--size);\n}\n\n.comimi-splash-heart::before,\n.comimi-splash-heart::after {\n content: \"\";\n display: block;\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 150%;\n border-radius: 999px;\n transform-origin: center bottom;\n}\n\n.comimi-splash-heart::before {\n transform: translateX(-32%) rotate(45deg);\n background-color: #eee;\n}\n\n.comimi-splash-heart::after {\n transform: translateX(32%) rotate(-45deg);\n background-color: #fff;\n}\n\n.comimi-splash-heart-1 {\n right: -2px;\n}\n\n.comimi-splash-heart-2 {\n right: 76px;\n}\n\n.comimi-splash-text {\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 120%);\n color: #fff;\n font-size: 16px;\n font-weight: 700;\n line-height: 1.45;\n text-align: center;\n white-space: nowrap;\n}\n\n.comimi-splash-text span {\n display: inline-block;\n animation: comimi-splash-dot 0.8s ease-in-out 0s infinite both;\n}\n\n.comimi-splash-text span:nth-child(1) {\n animation-delay: 0s;\n}\n\n.comimi-splash-text span:nth-child(2) {\n animation-delay: 0.15s;\n}\n\n.comimi-splash-text span:nth-child(3) {\n animation-delay: 0.3s;\n}\n\n@keyframes comimi-splash-clip {\n from {\n clip-path: circle(70%);\n }\n to {\n clip-path: circle(0%);\n }\n}\n\n@keyframes comimi-splash-mimi-left {\n from, to {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(20deg);\n }\n}\n\n@keyframes comimi-splash-mimi-right {\n from, to {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(-20deg);\n }\n}\n\n@keyframes comimi-splash-eye {\n from, to {\n transform: scaleY(1);\n }\n 50% {\n transform: scaleY(0.2);\n }\n}\n\n@keyframes comimi-splash-dot {\n from, 50%, to {\n opacity: 1;\n }\n 25% {\n opacity: 0;\n }\n}\n", Ee = "\n.comimi-tooltip {\n position: absolute;\n bottom: 0;\n left: 50%;\n padding: 6px 10px;\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.5);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n color: #333;\n font-size: 12px;\n font-weight: 600;\n line-height: 1.45;\n white-space: nowrap;\n pointer-events: none;\n user-select: none;\n opacity: 0;\n transform: translate(-50%, calc(100% + 6px)) scale(0.88);\n transform-origin: center top;\n transition:\n opacity 0.1s ease-in-out,\n transform 0.16s ease-in-out;\n z-index: 5;\n}\n\n@media (hover: hover) {\n .comimi-has-tooltip:hover > .comimi-tooltip {\n opacity: 1;\n transform: translate(-50%, calc(100% + 6px)) scale(1);\n }\n}\n", De = "\n.comimi-root {\n --comimi-bg: #fff;\n --comimi-surface: #f7f7f7;\n --comimi-surface-2: #eeeeee;\n --comimi-fg: #333;\n --comimi-muted: #666;\n --comimi-soft: #999;\n --comimi-line: #e0e0e0;\n --comimi-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n --comimi-glass: rgba(255, 255, 255, 0.8);\n --comimi-glass-strong: rgba(255, 255, 255, 0.8);\n --comimi-spring: cubic-bezier(0.34, 1.56, 0.64, 1);\n background: var(--comimi-bg);\n color: var(--comimi-fg);\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n position: relative;\n width: calc(100% - 24px * 2);\n max-width: 900px;\n aspect-ratio: 900 / 636;\n margin: 0 auto;\n border-radius: 16px;\n box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.06);\n overflow: hidden;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n touch-action: none;\n transition:\n box-shadow 0.24s ease-out,\n background-color 0.16s linear;\n}\n\n.comimi-root:focus {\n outline: none;\n box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.14);\n}\n\n@media (max-width: 767px) {\n .comimi-root {\n max-width: 500px;\n aspect-ratio: 390 / 490;\n }\n}\n\n.comimi-root[data-bg=\"black\"] {\n --comimi-bg: #000;\n}\n\n.comimi-root[data-layout=\"wide\"] {\n width: 100%;\n max-width: none;\n aspect-ratio: auto;\n min-height: 320px;\n margin: 0;\n border-radius: 0;\n box-shadow: none;\n}\n\n.comimi-root[data-layout=\"browserFullscreen\"],\n.comimi-root[data-layout=\"nativeFullscreen\"] {\n position: fixed;\n inset: 0;\n z-index: 999;\n width: 100vw;\n height: 100dvh;\n max-width: none;\n aspect-ratio: auto;\n margin: 0;\n border-radius: 0;\n box-shadow: none;\n}\n\n.comimi-resize-handle {\n position: relative;\n width: 100%;\n height: 20px;\n background: #fff;\n cursor: ns-resize;\n touch-action: none;\n}\n\n.comimi-resize-handle::after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 40px;\n height: 3px;\n border-radius: 999px;\n background: #bbb;\n transition:\n width 0.36s cubic-bezier(0.34, 1.56, 0.64, 1),\n height 0.36s cubic-bezier(0.34, 1.56, 0.64, 1),\n background-color 0.2s linear;\n}\n\n@media (hover: hover) {\n .comimi-resize-handle:hover::after {\n width: 52px;\n height: 5px;\n background: #888;\n }\n}\n\n", Oe = "\n.comimi-view-switcher {\n position: absolute;\n top: 20px;\n right: 20px;\n display: grid;\n grid-template-columns: repeat(3, 60px);\n width: 180px;\n border-radius: 16px;\n background: var(--comimi-glass);\n box-shadow: var(--comimi-shadow);\n backdrop-filter: blur(5px);\n pointer-events: auto;\n transition:\n transform 0.6s var(--comimi-spring),\n opacity 0.3s linear;\n}\n\n.comimi-view-switcher[data-overlay=\"false\"] {\n transform: translateY(-35px);\n opacity: 0;\n pointer-events: none;\n transition:\n transform 0.3s var(--comimi-spring),\n opacity 0.15s linear;\n}\n\n@media (hover: hover) {\n .comimi-view-switcher:hover {\n transform: scaleX(1.03);\n }\n}\n\n.comimi-view-switcher-indicator {\n position: absolute;\n top: 0;\n left: 0;\n width: 60px;\n height: 100%;\n border-radius: 16px;\n background: #666;\n transition: transform 0.36s var(--comimi-spring);\n}\n\n.comimi-view-switcher-button {\n position: relative;\n display: grid;\n row-gap: 5px;\n justify-items: center;\n align-content: center;\n height: 58px;\n padding: 0;\n border: 0;\n background: transparent;\n color: #666;\n cursor: pointer;\n transition: color 0.2s linear;\n}\n\n.comimi-view-switcher-button[data-selected=\"true\"] {\n color: #fff;\n}\n\n.comimi-view-switcher-icon-wrap {\n width: 20px;\n height: 20px;\n transform-origin: center bottom;\n}\n\n.comimi-view-switcher-icon {\n display: block;\n width: 100%;\n height: 100%;\n color: currentColor;\n}\n\n.comimi-view-switcher-icon-wrap.comimi-pop-animate {\n animation: comimi-pop 0.5s ease-in-out 0.1s both;\n}\n\n.comimi-view-switcher-label {\n color: currentColor;\n font-size: 10px;\n font-weight: 500;\n text-align: center;\n transition: color 0.2s linear;\n}\n\n@media (max-width: 767px) {\n .comimi-view-switcher {\n top: 70px;\n right: auto;\n left: calc(50% - 90px);\n }\n}\n", q = !1, ke = [
|
|
1286
|
+
De,
|
|
1287
|
+
ge,
|
|
1288
|
+
Ee,
|
|
1289
|
+
xe,
|
|
987
1290
|
ve,
|
|
988
|
-
ce,
|
|
989
|
-
_e,
|
|
990
|
-
pe,
|
|
991
|
-
ue,
|
|
992
|
-
se,
|
|
993
|
-
G,
|
|
994
|
-
K,
|
|
995
|
-
ye,
|
|
996
|
-
q,
|
|
997
|
-
le,
|
|
998
1291
|
he,
|
|
999
|
-
de,
|
|
1000
1292
|
fe,
|
|
1293
|
+
pe,
|
|
1294
|
+
Oe,
|
|
1001
1295
|
me,
|
|
1002
|
-
|
|
1296
|
+
_e,
|
|
1297
|
+
we,
|
|
1298
|
+
ye,
|
|
1299
|
+
be,
|
|
1300
|
+
Se,
|
|
1301
|
+
Te,
|
|
1302
|
+
Ce
|
|
1003
1303
|
].join("\n");
|
|
1004
|
-
function
|
|
1005
|
-
if (
|
|
1304
|
+
function Ae() {
|
|
1305
|
+
if (q || typeof document > "u") return;
|
|
1006
1306
|
let e = document.createElement("style");
|
|
1007
|
-
e.dataset.comimiViewer = "true", e.textContent =
|
|
1307
|
+
e.dataset.comimiViewer = "true", e.textContent = ke, document.head.append(e), q = !0;
|
|
1008
1308
|
}
|
|
1009
1309
|
//#endregion
|
|
1010
1310
|
//#region src/renderer/viewer-renderer.ts
|
|
1011
|
-
var
|
|
1311
|
+
var je = 180, Me = 2e3, J = class {
|
|
1012
1312
|
container;
|
|
1013
1313
|
callbacks;
|
|
1014
1314
|
assetLoader;
|
|
1015
1315
|
i18n;
|
|
1316
|
+
lockLayoutMode;
|
|
1317
|
+
mascot;
|
|
1016
1318
|
root;
|
|
1017
1319
|
cleanup = [];
|
|
1018
1320
|
mouseStart;
|
|
@@ -1031,12 +1333,13 @@ var Se = 180, Ce = 2e3, we = class {
|
|
|
1031
1333
|
controlsDock;
|
|
1032
1334
|
resizeHandle;
|
|
1033
1335
|
viewSizeObserver;
|
|
1034
|
-
constructor(e, t, n, r, i) {
|
|
1035
|
-
this.container = e, this.callbacks = t, this.assetLoader = n, this.i18n = r,
|
|
1336
|
+
constructor(e, t, n, r, i, a, o = !1, s) {
|
|
1337
|
+
this.container = e, this.callbacks = t, this.assetLoader = n, this.i18n = r, this.lockLayoutMode = o, this.mascot = s, Ae(), this.pageStage = new B({
|
|
1036
1338
|
assetLoader: this.assetLoader,
|
|
1037
1339
|
i18n: this.i18n,
|
|
1038
|
-
isMobileViewport: () => this.isMobileViewport()
|
|
1039
|
-
|
|
1340
|
+
isMobileViewport: () => this.isMobileViewport(),
|
|
1341
|
+
resolvePageSrc: a
|
|
1342
|
+
}), this.root = de({ className: i }), this.container.replaceChildren(this.root), this.observeViewSize();
|
|
1040
1343
|
}
|
|
1041
1344
|
observeViewSize() {
|
|
1042
1345
|
let e = () => {
|
|
@@ -1046,27 +1349,30 @@ var Se = 180, Ce = 2e3, we = class {
|
|
|
1046
1349
|
}
|
|
1047
1350
|
update(e) {
|
|
1048
1351
|
if (this.isPageTurnAnimating) return;
|
|
1049
|
-
this.cleanup.forEach((e) => e()), this.cleanup = [], this.i18n.setLocale(e.settings.locale), this.root.dataset.layout = e.layout.mode, e.layout.mode === "
|
|
1352
|
+
this.cleanup.forEach((e) => e()), this.cleanup = [], this.i18n.setLocale(e.settings.locale), this.root.dataset.layout = e.layout.mode, this.root.dataset.bg = e.settings.backgroundColor, e.layout.mode === "wide" && e.layout.wideHeightPx ? this.root.style.height = `${e.layout.wideHeightPx}px` : this.root.style.height = "";
|
|
1050
1353
|
let t = this.prevOverlayVisible !== e.overlayVisible, n = t ? {
|
|
1051
1354
|
...e,
|
|
1052
1355
|
overlayVisible: this.prevOverlayVisible
|
|
1053
1356
|
} : e;
|
|
1054
|
-
this.menuPanel ||= new
|
|
1055
|
-
|
|
1357
|
+
this.menuPanel ||= new N(this.callbacks, this.i18n, {
|
|
1358
|
+
lockLayoutMode: this.lockLayoutMode,
|
|
1359
|
+
mascot: this.mascot
|
|
1360
|
+
}), !this.viewModeSwitcher && !this.lockLayoutMode && (this.viewModeSwitcher = new P(this.callbacks, this.i18n)), this.controlsDock ||= new M(this.callbacks, this.i18n, this.mascot);
|
|
1361
|
+
let r = this.pageStage.getElement(), i = this.menuPanel.getElement(), a = this.viewModeSwitcher?.getElement(), o = this.controlsDock.getElement();
|
|
1056
1362
|
Array.from(this.root.children).forEach((e) => {
|
|
1057
1363
|
e !== r && e !== i && e !== a && e !== o && e !== this.splash && e.remove();
|
|
1058
1364
|
}), r.parentNode !== this.root && this.root.prepend(r), this.pageStage.update(e, this.isMobileViewport()), this.pageStage.snapTransform();
|
|
1059
1365
|
let s = [
|
|
1060
|
-
|
|
1061
|
-
|
|
1366
|
+
ae(n, this.i18n),
|
|
1367
|
+
g({
|
|
1062
1368
|
state: n,
|
|
1063
1369
|
callbacks: this.callbacks
|
|
1064
1370
|
}),
|
|
1065
|
-
|
|
1371
|
+
H(e)
|
|
1066
1372
|
];
|
|
1067
|
-
this.syncResizeHandle(e.layout.mode === "
|
|
1373
|
+
this.syncResizeHandle(e.layout.mode === "wide");
|
|
1068
1374
|
let c = i.parentNode === this.root ? i : null;
|
|
1069
|
-
if (c ? s.forEach((e) => this.root.insertBefore(e, c)) : (s.forEach((e) => this.root.appendChild(e)), this.root.appendChild(i)), a.parentNode !== this.root && this.root.appendChild(a), o.parentNode !== this.root && this.root.appendChild(o), this.menuPanel.update(n), this.viewModeSwitcher
|
|
1375
|
+
if (c ? s.forEach((e) => this.root.insertBefore(e, c)) : (s.forEach((e) => this.root.appendChild(e)), this.root.appendChild(i)), a && a.parentNode !== this.root && this.root.appendChild(a), o.parentNode !== this.root && this.root.appendChild(o), this.menuPanel.update(n), this.viewModeSwitcher?.update(n), this.controlsDock.update(n, this.isMobileViewport()), this.splash && this.splash.parentNode !== this.root && this.root.append(this.splash), this.bindGestures(e), this.overlayApplyRaf !== void 0 && (cancelAnimationFrame(this.overlayApplyRaf), this.overlayApplyRaf = void 0), t) {
|
|
1070
1376
|
let t = e.overlayVisible;
|
|
1071
1377
|
this.root.offsetWidth, this.overlayApplyRaf = requestAnimationFrame(() => {
|
|
1072
1378
|
this.overlayApplyRaf = void 0, this.applyOverlayVisibility(t);
|
|
@@ -1081,9 +1387,9 @@ var Se = 180, Ce = 2e3, we = class {
|
|
|
1081
1387
|
});
|
|
1082
1388
|
}
|
|
1083
1389
|
showSplash() {
|
|
1084
|
-
this.splash || (this.splash =
|
|
1390
|
+
this.splash || (this.splash = W(this.i18n, this.mascot), this.root.append(this.splash), this.splashRemoveTimer = window.setTimeout(() => {
|
|
1085
1391
|
this.splash?.remove(), this.splash = void 0;
|
|
1086
|
-
},
|
|
1392
|
+
}, Me));
|
|
1087
1393
|
}
|
|
1088
1394
|
destroy() {
|
|
1089
1395
|
window.clearTimeout(this.pageTurnTimer), window.clearTimeout(this.splashRemoveTimer), this.overlayApplyRaf !== void 0 && (cancelAnimationFrame(this.overlayApplyRaf), this.overlayApplyRaf = void 0), this.cleanup.forEach((e) => e()), this.cleanup = [], this.viewSizeObserver?.disconnect(), this.viewSizeObserver = void 0, this.resizeHandle?.remove(), this.resizeHandle = void 0, this.root.remove();
|
|
@@ -1095,9 +1401,9 @@ var Se = 180, Ce = 2e3, we = class {
|
|
|
1095
1401
|
return this.isPageTurnAnimating;
|
|
1096
1402
|
}
|
|
1097
1403
|
animatePageTurn(e, t, n) {
|
|
1098
|
-
return window.clearTimeout(this.pageTurnTimer), !e.settings.pageTurnAnimation || e.autoPageTurnEnabled || this.isPageTurnAnimating ||
|
|
1404
|
+
return window.clearTimeout(this.pageTurnTimer), !e.settings.pageTurnAnimation || e.autoPageTurnEnabled || this.isPageTurnAnimating || b(e, t, this.isMobileViewport()).length === 0 ? !1 : (this.isPageTurnAnimating = !0, this.setStageDragOffset(this.getPageTurnTargetOffset(e, t), !0), this.pageTurnTimer = window.setTimeout(() => {
|
|
1099
1405
|
this.isPageTurnAnimating = !1, n();
|
|
1100
|
-
},
|
|
1406
|
+
}, je), !0);
|
|
1101
1407
|
}
|
|
1102
1408
|
isMobileViewport() {
|
|
1103
1409
|
return window.matchMedia("(max-width: 767px)").matches;
|
|
@@ -1107,7 +1413,7 @@ var Se = 180, Ce = 2e3, we = class {
|
|
|
1107
1413
|
x: 0,
|
|
1108
1414
|
y: 0
|
|
1109
1415
|
};
|
|
1110
|
-
let i =
|
|
1416
|
+
let i = y(r, this.isMobileViewport()).length > 1 ? this.root.offsetWidth / 2 : this.root.offsetWidth, a = this.root.offsetHeight, o = i * (n - 1) / 2, s = a * (n - 1) / 2;
|
|
1111
1417
|
return {
|
|
1112
1418
|
x: Math.min(Math.max(e, -o), o),
|
|
1113
1419
|
y: Math.min(Math.max(t, -s), s)
|
|
@@ -1123,7 +1429,7 @@ var Se = 180, Ce = 2e3, we = class {
|
|
|
1123
1429
|
let e = document.createElement("div");
|
|
1124
1430
|
e.className = "comimi-resize-handle", e.setAttribute("role", "separator"), e.setAttribute("aria-orientation", "horizontal");
|
|
1125
1431
|
let t = 0, n = 0, r, i = (e) => {
|
|
1126
|
-
e.pointerId === r && this.callbacks.
|
|
1432
|
+
e.pointerId === r && this.callbacks.setWideHeight(n + e.clientY - t);
|
|
1127
1433
|
}, a = (e) => {
|
|
1128
1434
|
e.pointerId === r && (window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", a), window.removeEventListener("pointercancel", a), r = void 0);
|
|
1129
1435
|
};
|
|
@@ -1132,12 +1438,22 @@ var Se = 180, Ce = 2e3, we = class {
|
|
|
1132
1438
|
}), e;
|
|
1133
1439
|
}
|
|
1134
1440
|
bindGestures(e) {
|
|
1135
|
-
let t = (
|
|
1441
|
+
let t = (t) => {
|
|
1136
1442
|
if (this.suppressNextClick || this.isPageTurnAnimating) {
|
|
1137
|
-
this.suppressNextClick = !1,
|
|
1443
|
+
this.suppressNextClick = !1, t.preventDefault(), t.stopPropagation();
|
|
1138
1444
|
return;
|
|
1139
1445
|
}
|
|
1140
|
-
this.isInteractiveTarget(
|
|
1446
|
+
if (!this.isInteractiveTarget(t.target)) {
|
|
1447
|
+
if (!e.overlayVisible) {
|
|
1448
|
+
let n = this.root.getBoundingClientRect(), r = (t.clientX - n.left) / n.width;
|
|
1449
|
+
if (r < .2 || r >= .8) {
|
|
1450
|
+
let t = r < .2 ? "left" : "right";
|
|
1451
|
+
(e.settings.readingDirection === "rtl" ? t === "left" : t === "right") ? this.callbacks.nextPage() : this.callbacks.previousPage();
|
|
1452
|
+
return;
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
this.callbacks.toggleOverlay();
|
|
1456
|
+
}
|
|
1141
1457
|
}, n = (t) => {
|
|
1142
1458
|
if (this.isInteractiveTarget(t.target) || !t.ctrlKey && !t.metaKey) return;
|
|
1143
1459
|
t.preventDefault();
|
|
@@ -1209,21 +1525,19 @@ var Se = 180, Ce = 2e3, we = class {
|
|
|
1209
1525
|
let r = n.clientX - this.touchStart.x, i = n.clientY - this.touchStart.y;
|
|
1210
1526
|
this.handleSwipeEnd(r, i, e), this.touchStart = void 0;
|
|
1211
1527
|
}, l = (t) => {
|
|
1212
|
-
this.isInteractiveTarget(t.target) || (e.zoomScale > 1 ? this.callbacks.resetZoom() : this.callbacks.setZoom(2));
|
|
1213
|
-
}, u = (t) => {
|
|
1214
1528
|
if (this.suppressNextClick || this.isPageTurnAnimating || e.panel !== "settings") return;
|
|
1215
1529
|
let n = t.target;
|
|
1216
1530
|
n instanceof Element && (n.closest(".comimi-settings") || this.callbacks.setPanel("none"));
|
|
1217
1531
|
};
|
|
1218
|
-
this.root.addEventListener("click",
|
|
1532
|
+
this.root.addEventListener("click", l, !0), this.root.addEventListener("click", t), this.root.addEventListener("wheel", n, { passive: !1 }), this.root.addEventListener("mousedown", r), window.addEventListener("mousemove", i), window.addEventListener("mouseup", a), this.root.addEventListener("touchstart", o, { passive: !1 }), this.root.addEventListener("touchmove", s, { passive: !1 }), this.root.addEventListener("touchend", c), this.cleanup.push(() => this.root.removeEventListener("click", l, !0), () => this.root.removeEventListener("click", t), () => this.root.removeEventListener("wheel", n), () => this.root.removeEventListener("mousedown", r), () => window.removeEventListener("mousemove", i), () => window.removeEventListener("mouseup", a), () => this.root.removeEventListener("touchstart", o), () => this.root.removeEventListener("touchmove", s), () => this.root.removeEventListener("touchend", c));
|
|
1219
1533
|
}
|
|
1220
1534
|
handleSwipeEnd(e, t, n) {
|
|
1221
|
-
if (window.clearTimeout(this.pageTurnTimer), !(n.zoomScale <= 1 && Math.abs(e) >
|
|
1535
|
+
if (window.clearTimeout(this.pageTurnTimer), !(n.zoomScale <= 1 && Math.abs(e) > 40 && Math.abs(e) > Math.abs(t))) {
|
|
1222
1536
|
this.setStageDragOffset(0, !0);
|
|
1223
1537
|
return;
|
|
1224
1538
|
}
|
|
1225
|
-
let r =
|
|
1226
|
-
if (!(
|
|
1539
|
+
let r = w(e, n.settings.readingDirection) ? "next" : "previous";
|
|
1540
|
+
if (!(b(n, r, this.isMobileViewport()).length > 0)) {
|
|
1227
1541
|
this.setStageDragOffset(0, !0);
|
|
1228
1542
|
return;
|
|
1229
1543
|
}
|
|
@@ -1235,7 +1549,7 @@ var Se = 180, Ce = 2e3, we = class {
|
|
|
1235
1549
|
});
|
|
1236
1550
|
}
|
|
1237
1551
|
constrainDragOffset(e, t, n) {
|
|
1238
|
-
return Math.abs(t) > Math.abs(e) ? 0 :
|
|
1552
|
+
return Math.abs(t) > Math.abs(e) ? 0 : b(n, w(e, n.settings.readingDirection) ? "next" : "previous", this.isMobileViewport()).length > 0 ? e : this.applyEdgeResistance(e);
|
|
1239
1553
|
}
|
|
1240
1554
|
applyEdgeResistance(e) {
|
|
1241
1555
|
let t = Math.sign(e), n = Math.abs(e), r = Math.max(this.root.clientWidth, 1), i = Math.min(r * .22, 140);
|
|
@@ -1245,7 +1559,7 @@ var Se = 180, Ce = 2e3, we = class {
|
|
|
1245
1559
|
this.pageStage.setDragOffset(e, t);
|
|
1246
1560
|
}
|
|
1247
1561
|
getPageTurnTargetOffset(e, t) {
|
|
1248
|
-
return
|
|
1562
|
+
return C(e, t) === "left" ? this.root.clientWidth : -this.root.clientWidth;
|
|
1249
1563
|
}
|
|
1250
1564
|
isInteractiveTarget(e) {
|
|
1251
1565
|
return e instanceof Element ? !!e.closest([
|
|
@@ -1269,7 +1583,7 @@ function Y(e) {
|
|
|
1269
1583
|
}
|
|
1270
1584
|
//#endregion
|
|
1271
1585
|
//#region src/storage/indexed-db-storage.ts
|
|
1272
|
-
var
|
|
1586
|
+
var Ne = class {
|
|
1273
1587
|
enabled;
|
|
1274
1588
|
databaseName;
|
|
1275
1589
|
dbPromise;
|
|
@@ -1399,16 +1713,16 @@ function Q(e, t) {
|
|
|
1399
1713
|
type: "updateSettings",
|
|
1400
1714
|
settings: { layoutMode: t.layoutMode }
|
|
1401
1715
|
});
|
|
1402
|
-
case "
|
|
1716
|
+
case "setWideHeight": return {
|
|
1403
1717
|
...e,
|
|
1404
1718
|
layout: {
|
|
1405
1719
|
...e.layout,
|
|
1406
|
-
|
|
1720
|
+
wideHeightPx: Math.max(240, Math.round(t.heightPx))
|
|
1407
1721
|
}
|
|
1408
1722
|
};
|
|
1409
1723
|
case "setZoom": return {
|
|
1410
1724
|
...e,
|
|
1411
|
-
zoomScale:
|
|
1725
|
+
zoomScale: Pe(t.scale, e),
|
|
1412
1726
|
panX: t.panX ?? e.panX,
|
|
1413
1727
|
panY: t.panY ?? e.panY
|
|
1414
1728
|
};
|
|
@@ -1444,12 +1758,12 @@ function $(e) {
|
|
|
1444
1758
|
visiblePageIndexes: a(e.currentPageIndex, e.manga.pages.length, e.settings)
|
|
1445
1759
|
};
|
|
1446
1760
|
}
|
|
1447
|
-
function
|
|
1761
|
+
function Pe(e, t) {
|
|
1448
1762
|
return Math.min(Math.max(e, t.settings.zoom.min), t.settings.zoom.max);
|
|
1449
1763
|
}
|
|
1450
1764
|
//#endregion
|
|
1451
1765
|
//#region src/store/store.ts
|
|
1452
|
-
var
|
|
1766
|
+
var Fe = class {
|
|
1453
1767
|
state;
|
|
1454
1768
|
listeners = /* @__PURE__ */ new Set();
|
|
1455
1769
|
constructor(e) {
|
|
@@ -1470,7 +1784,7 @@ var De = class {
|
|
|
1470
1784
|
this.listeners.delete(e);
|
|
1471
1785
|
};
|
|
1472
1786
|
}
|
|
1473
|
-
},
|
|
1787
|
+
}, Ie = class {
|
|
1474
1788
|
objectUrls = /* @__PURE__ */ new Set();
|
|
1475
1789
|
async resolveImageSource(e, t) {
|
|
1476
1790
|
return t.src;
|
|
@@ -1479,7 +1793,7 @@ var De = class {
|
|
|
1479
1793
|
for (let e of this.objectUrls) URL.revokeObjectURL(e);
|
|
1480
1794
|
this.objectUrls.clear();
|
|
1481
1795
|
}
|
|
1482
|
-
},
|
|
1796
|
+
}, Le = class {
|
|
1483
1797
|
handlers = /* @__PURE__ */ new Map();
|
|
1484
1798
|
on(e, t) {
|
|
1485
1799
|
let n = this.handlers.get(e);
|
|
@@ -1498,25 +1812,26 @@ var De = class {
|
|
|
1498
1812
|
clear() {
|
|
1499
1813
|
this.handlers.clear();
|
|
1500
1814
|
}
|
|
1501
|
-
},
|
|
1815
|
+
}, Re = class {
|
|
1502
1816
|
container;
|
|
1503
1817
|
store;
|
|
1504
1818
|
storage;
|
|
1505
1819
|
assetLoader;
|
|
1506
1820
|
renderer;
|
|
1507
1821
|
i18n;
|
|
1508
|
-
events = new
|
|
1822
|
+
events = new Le();
|
|
1509
1823
|
unsubscribers = [];
|
|
1510
1824
|
notificationTimers = /* @__PURE__ */ new Map();
|
|
1511
1825
|
autoTimer;
|
|
1512
1826
|
mobileMediaQuery;
|
|
1827
|
+
lockLayoutMode = !1;
|
|
1513
1828
|
constructor(r, i) {
|
|
1514
1829
|
this.container = r;
|
|
1515
1830
|
let a = n(e, {
|
|
1516
1831
|
...i.settings,
|
|
1517
1832
|
locale: i.locale ?? i.settings?.locale ?? e.locale
|
|
1518
1833
|
});
|
|
1519
|
-
this.storage = new
|
|
1834
|
+
this.lockLayoutMode = i.lockLayoutMode ?? !1, this.storage = new Ne(i.storage), this.assetLoader = new Ie(), this.i18n = new ne(a.locale, i.translations), this.store = new Fe(t(i.manga, a, i.initialPageIndex));
|
|
1520
1835
|
let o = {
|
|
1521
1836
|
goToPage: (e) => this.goToPage(e),
|
|
1522
1837
|
nextPage: () => this.nextPage(),
|
|
@@ -1529,7 +1844,7 @@ var De = class {
|
|
|
1529
1844
|
this.updateSettings(e);
|
|
1530
1845
|
},
|
|
1531
1846
|
setLayoutMode: (e) => void this.setLayoutMode(e),
|
|
1532
|
-
|
|
1847
|
+
setWideHeight: (e) => this.setWideHeight(e),
|
|
1533
1848
|
setPanel: (e) => {
|
|
1534
1849
|
this.store.dispatch({
|
|
1535
1850
|
type: "setPanel",
|
|
@@ -1549,7 +1864,7 @@ var De = class {
|
|
|
1549
1864
|
}),
|
|
1550
1865
|
resetZoom: () => this.store.dispatch({ type: "resetZoom" })
|
|
1551
1866
|
};
|
|
1552
|
-
this.renderer = new
|
|
1867
|
+
this.renderer = new J(this.container, o, this.assetLoader, this.i18n, i.className, i.resolvePageSrc, this.lockLayoutMode, i.mascot);
|
|
1553
1868
|
for (let [e, t] of Object.entries(i.events ?? {})) this.on(e, t);
|
|
1554
1869
|
this.unsubscribers.push(this.store.subscribe((e, t) => {
|
|
1555
1870
|
this.renderer.update(e), this.afterStateChange(e, t);
|
|
@@ -1578,12 +1893,13 @@ var De = class {
|
|
|
1578
1893
|
return this.store.getState();
|
|
1579
1894
|
}
|
|
1580
1895
|
async updateSettings(e) {
|
|
1581
|
-
|
|
1896
|
+
let t = e;
|
|
1897
|
+
this.lockLayoutMode && "layoutMode" in e && (t = { ...e }, delete t.layoutMode), this.store.dispatch({
|
|
1582
1898
|
type: "updateSettings",
|
|
1583
|
-
settings:
|
|
1899
|
+
settings: t
|
|
1584
1900
|
});
|
|
1585
|
-
let
|
|
1586
|
-
this.i18n.setLocale(
|
|
1901
|
+
let n = this.store.getState().settings;
|
|
1902
|
+
this.i18n.setLocale(n.locale), await this.storage.saveSettings(n), this.events.emit("settingsChange", { settings: n });
|
|
1587
1903
|
}
|
|
1588
1904
|
goToPage(e) {
|
|
1589
1905
|
let t = this.store.getState().currentPageIndex;
|
|
@@ -1639,6 +1955,7 @@ var De = class {
|
|
|
1639
1955
|
this.notify(this.i18n.t(e ? "autoplay.start" : "autoplay.stop"));
|
|
1640
1956
|
}
|
|
1641
1957
|
async toggleFullscreen() {
|
|
1958
|
+
if (this.lockLayoutMode) return;
|
|
1642
1959
|
let e = this.store.getState();
|
|
1643
1960
|
if (document.fullscreenElement) {
|
|
1644
1961
|
await document.exitFullscreen(), await this.setLayoutMode("inline");
|
|
@@ -1651,15 +1968,24 @@ var De = class {
|
|
|
1651
1968
|
}
|
|
1652
1969
|
async bootstrap() {
|
|
1653
1970
|
let e = await this.storage.getSettings(), t = await this.storage.getLayout(), n = this.store.getState().manga.id, r = await this.storage.getProgress(n);
|
|
1654
|
-
e
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
|
|
1971
|
+
if (e) {
|
|
1972
|
+
let t = { ...e };
|
|
1973
|
+
this.lockLayoutMode && delete t.layoutMode, this.store.dispatch({
|
|
1974
|
+
type: "updateSettings",
|
|
1975
|
+
settings: t
|
|
1976
|
+
});
|
|
1977
|
+
}
|
|
1978
|
+
if (!this.lockLayoutMode && t?.mode) {
|
|
1979
|
+
let e = t.mode === "theater" ? "wide" : t.mode;
|
|
1980
|
+
this.store.dispatch({
|
|
1981
|
+
type: "setLayoutMode",
|
|
1982
|
+
layoutMode: e
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
let i = t?.wideHeightPx ?? t?.theaterHeightPx;
|
|
1986
|
+
i && this.store.dispatch({
|
|
1987
|
+
type: "setWideHeight",
|
|
1988
|
+
heightPx: i
|
|
1663
1989
|
}), typeof r == "number" && this.store.dispatch({
|
|
1664
1990
|
type: "goToPage",
|
|
1665
1991
|
pageIndex: r
|
|
@@ -1686,14 +2012,18 @@ var De = class {
|
|
|
1686
2012
|
break;
|
|
1687
2013
|
case "n":
|
|
1688
2014
|
case "N":
|
|
2015
|
+
case "Escape":
|
|
2016
|
+
if (this.lockLayoutMode) break;
|
|
1689
2017
|
e.preventDefault(), this.setLayoutMode("inline");
|
|
1690
2018
|
break;
|
|
1691
2019
|
case "w":
|
|
1692
2020
|
case "W":
|
|
1693
|
-
|
|
2021
|
+
if (this.lockLayoutMode) break;
|
|
2022
|
+
e.preventDefault(), this.setLayoutMode("wide");
|
|
1694
2023
|
break;
|
|
1695
2024
|
case "f":
|
|
1696
2025
|
case "F":
|
|
2026
|
+
if (this.lockLayoutMode) break;
|
|
1697
2027
|
e.preventDefault(), this.setLayoutMode("browserFullscreen");
|
|
1698
2028
|
break;
|
|
1699
2029
|
case "m":
|
|
@@ -1710,6 +2040,10 @@ var De = class {
|
|
|
1710
2040
|
case "P":
|
|
1711
2041
|
e.preventDefault(), this.updateSettings({ pageTurnMode: this.store.getState().settings.pageTurnMode === "spread" ? "single" : "spread" });
|
|
1712
2042
|
break;
|
|
2043
|
+
case "o":
|
|
2044
|
+
case "O":
|
|
2045
|
+
e.preventDefault(), this.toggleOverlay();
|
|
2046
|
+
break;
|
|
1713
2047
|
case "s":
|
|
1714
2048
|
case "S": {
|
|
1715
2049
|
e.preventDefault();
|
|
@@ -1745,27 +2079,29 @@ var De = class {
|
|
|
1745
2079
|
this.store.getState().settings.readingDirection === "rtl" ? e === "left" ? this.nextPage() : this.previousPage() : e === "left" ? this.previousPage() : this.nextPage();
|
|
1746
2080
|
}
|
|
1747
2081
|
async setLayoutMode(e) {
|
|
1748
|
-
if (
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
2082
|
+
if (!this.lockLayoutMode) {
|
|
2083
|
+
if (e === "nativeFullscreen") try {
|
|
2084
|
+
await this.renderer.getElement().requestFullscreen();
|
|
2085
|
+
} catch {
|
|
2086
|
+
e = "browserFullscreen";
|
|
2087
|
+
}
|
|
2088
|
+
else document.fullscreenElement && await document.exitFullscreen();
|
|
2089
|
+
if (e === "wide" && !this.store.getState().layout.wideHeightPx) {
|
|
2090
|
+
let e = this.renderer.getElement().offsetHeight;
|
|
2091
|
+
e > 0 && this.store.dispatch({
|
|
2092
|
+
type: "setWideHeight",
|
|
2093
|
+
heightPx: e
|
|
2094
|
+
});
|
|
2095
|
+
}
|
|
2096
|
+
this.store.dispatch({
|
|
2097
|
+
type: "setLayoutMode",
|
|
2098
|
+
layoutMode: e
|
|
2099
|
+
}), await this.storage.saveSettings(this.store.getState().settings), await this.storage.saveLayout(this.store.getState().layout), this.events.emit("layoutChange", { layoutMode: e });
|
|
1760
2100
|
}
|
|
1761
|
-
this.store.dispatch({
|
|
1762
|
-
type: "setLayoutMode",
|
|
1763
|
-
layoutMode: e
|
|
1764
|
-
}), await this.storage.saveSettings(this.store.getState().settings), await this.storage.saveLayout(this.store.getState().layout), this.events.emit("layoutChange", { layoutMode: e });
|
|
1765
2101
|
}
|
|
1766
|
-
|
|
2102
|
+
setWideHeight(e) {
|
|
1767
2103
|
this.store.dispatch({
|
|
1768
|
-
type: "
|
|
2104
|
+
type: "setWideHeight",
|
|
1769
2105
|
heightPx: e
|
|
1770
2106
|
}), this.storage.saveLayout(this.store.getState().layout);
|
|
1771
2107
|
}
|
|
@@ -1813,8 +2149,8 @@ var De = class {
|
|
|
1813
2149
|
};
|
|
1814
2150
|
//#endregion
|
|
1815
2151
|
//#region src/index.ts
|
|
1816
|
-
function
|
|
1817
|
-
return new
|
|
2152
|
+
function ze(e, t) {
|
|
2153
|
+
return new Re(e, t);
|
|
1818
2154
|
}
|
|
1819
2155
|
//#endregion
|
|
1820
|
-
export {
|
|
2156
|
+
export { ze as createMangaViewer };
|