paginar 0.3.5 → 0.3.7
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/README.md +307 -254
- package/dist/index.es.js +1382 -690
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +16 -0
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1583,6 +1583,9 @@ function isRef(r) {
|
|
|
1583
1583
|
function ref(value) {
|
|
1584
1584
|
return createRef(value, false);
|
|
1585
1585
|
}
|
|
1586
|
+
function shallowRef(value) {
|
|
1587
|
+
return createRef(value, true);
|
|
1588
|
+
}
|
|
1586
1589
|
function createRef(rawValue, shallow) {
|
|
1587
1590
|
if (isRef(rawValue)) {
|
|
1588
1591
|
return rawValue;
|
|
@@ -9165,6 +9168,71 @@ class VueElement extends BaseClass {
|
|
|
9165
9168
|
}
|
|
9166
9169
|
}
|
|
9167
9170
|
|
|
9171
|
+
const getModelAssigner = (vnode) => {
|
|
9172
|
+
const fn = vnode.props["onUpdate:modelValue"] || false;
|
|
9173
|
+
return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
|
|
9174
|
+
};
|
|
9175
|
+
function onCompositionStart(e) {
|
|
9176
|
+
e.target.composing = true;
|
|
9177
|
+
}
|
|
9178
|
+
function onCompositionEnd(e) {
|
|
9179
|
+
const target = e.target;
|
|
9180
|
+
if (target.composing) {
|
|
9181
|
+
target.composing = false;
|
|
9182
|
+
target.dispatchEvent(new Event("input"));
|
|
9183
|
+
}
|
|
9184
|
+
}
|
|
9185
|
+
const assignKey = Symbol("_assign");
|
|
9186
|
+
const vModelText = {
|
|
9187
|
+
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
9188
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
9189
|
+
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
9190
|
+
addEventListener$1(el, lazy ? "change" : "input", (e) => {
|
|
9191
|
+
if (e.target.composing) return;
|
|
9192
|
+
let domValue = el.value;
|
|
9193
|
+
if (trim) {
|
|
9194
|
+
domValue = domValue.trim();
|
|
9195
|
+
}
|
|
9196
|
+
if (castToNumber) {
|
|
9197
|
+
domValue = looseToNumber(domValue);
|
|
9198
|
+
}
|
|
9199
|
+
el[assignKey](domValue);
|
|
9200
|
+
});
|
|
9201
|
+
if (trim) {
|
|
9202
|
+
addEventListener$1(el, "change", () => {
|
|
9203
|
+
el.value = el.value.trim();
|
|
9204
|
+
});
|
|
9205
|
+
}
|
|
9206
|
+
if (!lazy) {
|
|
9207
|
+
addEventListener$1(el, "compositionstart", onCompositionStart);
|
|
9208
|
+
addEventListener$1(el, "compositionend", onCompositionEnd);
|
|
9209
|
+
addEventListener$1(el, "change", onCompositionEnd);
|
|
9210
|
+
}
|
|
9211
|
+
},
|
|
9212
|
+
// set value on mounted so it's after min/max for type="range"
|
|
9213
|
+
mounted(el, { value }) {
|
|
9214
|
+
el.value = value == null ? "" : value;
|
|
9215
|
+
},
|
|
9216
|
+
beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
|
|
9217
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
9218
|
+
if (el.composing) return;
|
|
9219
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
9220
|
+
const newValue = value == null ? "" : value;
|
|
9221
|
+
if (elValue === newValue) {
|
|
9222
|
+
return;
|
|
9223
|
+
}
|
|
9224
|
+
if (document.activeElement === el && el.type !== "range") {
|
|
9225
|
+
if (lazy && value === oldValue) {
|
|
9226
|
+
return;
|
|
9227
|
+
}
|
|
9228
|
+
if (trim && el.value.trim() === newValue) {
|
|
9229
|
+
return;
|
|
9230
|
+
}
|
|
9231
|
+
}
|
|
9232
|
+
el.value = newValue;
|
|
9233
|
+
}
|
|
9234
|
+
};
|
|
9235
|
+
|
|
9168
9236
|
const systemModifiers = ["ctrl", "shift", "alt", "meta"];
|
|
9169
9237
|
const modifierGuards = {
|
|
9170
9238
|
stop: (e) => e.stopPropagation(),
|
|
@@ -9190,6 +9258,30 @@ const withModifiers = (fn, modifiers) => {
|
|
|
9190
9258
|
return fn(event, ...args);
|
|
9191
9259
|
}));
|
|
9192
9260
|
};
|
|
9261
|
+
const keyNames = {
|
|
9262
|
+
esc: "escape",
|
|
9263
|
+
space: " ",
|
|
9264
|
+
up: "arrow-up",
|
|
9265
|
+
left: "arrow-left",
|
|
9266
|
+
right: "arrow-right",
|
|
9267
|
+
down: "arrow-down",
|
|
9268
|
+
delete: "backspace"
|
|
9269
|
+
};
|
|
9270
|
+
const withKeys = (fn, modifiers) => {
|
|
9271
|
+
const cache = fn._withKeys || (fn._withKeys = {});
|
|
9272
|
+
const cacheKey = modifiers.join(".");
|
|
9273
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event) => {
|
|
9274
|
+
if (!("key" in event)) {
|
|
9275
|
+
return;
|
|
9276
|
+
}
|
|
9277
|
+
const eventKey = hyphenate(event.key);
|
|
9278
|
+
if (modifiers.some(
|
|
9279
|
+
(k) => k === eventKey || keyNames[k] === eventKey
|
|
9280
|
+
)) {
|
|
9281
|
+
return fn(event);
|
|
9282
|
+
}
|
|
9283
|
+
}));
|
|
9284
|
+
};
|
|
9193
9285
|
|
|
9194
9286
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
9195
9287
|
let renderer;
|
|
@@ -9957,9 +10049,9 @@ const state$6 = reactive({
|
|
|
9957
10049
|
fontSize: 16,
|
|
9958
10050
|
columns: 'double',
|
|
9959
10051
|
mode: 'light',
|
|
9960
|
-
blocked: false,
|
|
9961
|
-
readingProgressAvailable: false,
|
|
9962
|
-
readingProgressEnabled: false,
|
|
10052
|
+
blocked: false,
|
|
10053
|
+
readingProgressAvailable: false,
|
|
10054
|
+
readingProgressEnabled: false,
|
|
9963
10055
|
|
|
9964
10056
|
bookTitle: null,
|
|
9965
10057
|
chapterTitle: null,
|
|
@@ -9972,25 +10064,25 @@ const fontSize = computed(() => state$6.fontSize);
|
|
|
9972
10064
|
const fontsOptions = computed(() => state$6.fontsOptions);
|
|
9973
10065
|
const columns = computed(() => state$6.columns);
|
|
9974
10066
|
const mode = computed(() => state$6.mode);
|
|
9975
|
-
const blocked = computed(() => state$6.blocked);
|
|
9976
|
-
const readingProgressAvailable = computed(() => state$6.readingProgressAvailable);
|
|
9977
|
-
const readingProgressEnabled = computed(() => state$6.readingProgressEnabled);
|
|
10067
|
+
const blocked = computed(() => state$6.blocked);
|
|
10068
|
+
const readingProgressAvailable = computed(() => state$6.readingProgressAvailable);
|
|
10069
|
+
const readingProgressEnabled = computed(() => state$6.readingProgressEnabled);
|
|
9978
10070
|
|
|
9979
10071
|
const bookTitle = computed(() => state$6.bookTitle);
|
|
9980
10072
|
const chapterTitle = computed(() => state$6.chapterTitle);
|
|
9981
10073
|
const homeUrl = computed(() => state$6.homeUrl);
|
|
9982
10074
|
|
|
9983
10075
|
watch(
|
|
9984
|
-
[baseFont, textFont, fontSize, columns, mode, readingProgressEnabled],
|
|
10076
|
+
[baseFont, textFont, fontSize, columns, mode, readingProgressEnabled],
|
|
9985
10077
|
() => saveSettings()
|
|
9986
10078
|
);
|
|
9987
10079
|
|
|
9988
|
-
async function initSettings(settingsString) {
|
|
9989
|
-
const settings = settingsString
|
|
9990
|
-
? JSON.parse(settingsString)
|
|
9991
|
-
: null;
|
|
9992
|
-
state$6.readingProgressAvailable = false;
|
|
9993
|
-
state$6.readingProgressEnabled = false;
|
|
10080
|
+
async function initSettings(settingsString) {
|
|
10081
|
+
const settings = settingsString
|
|
10082
|
+
? JSON.parse(settingsString)
|
|
10083
|
+
: null;
|
|
10084
|
+
state$6.readingProgressAvailable = false;
|
|
10085
|
+
state$6.readingProgressEnabled = false;
|
|
9994
10086
|
|
|
9995
10087
|
if (settings?.baseFont)
|
|
9996
10088
|
state$6.baseFont = settings.baseFont;
|
|
@@ -10026,51 +10118,51 @@ async function initSettings(settingsString) {
|
|
|
10026
10118
|
if (settings?.chapterTitle)
|
|
10027
10119
|
state$6.chapterTitle = settings.chapterTitle;
|
|
10028
10120
|
|
|
10029
|
-
if (settings?.homeUrl)
|
|
10030
|
-
state$6.homeUrl = settings.homeUrl;
|
|
10031
|
-
|
|
10032
|
-
if (settings?.readingProgress &&
|
|
10033
|
-
typeof settings.readingProgress === 'object' &&
|
|
10034
|
-
!Array.isArray(settings.readingProgress)
|
|
10035
|
-
) {
|
|
10036
|
-
state$6.readingProgressAvailable = true;
|
|
10037
|
-
state$6.readingProgressEnabled = settings.readingProgress.enabled !== false;
|
|
10038
|
-
}
|
|
10121
|
+
if (settings?.homeUrl)
|
|
10122
|
+
state$6.homeUrl = settings.homeUrl;
|
|
10123
|
+
|
|
10124
|
+
if (settings?.readingProgress &&
|
|
10125
|
+
typeof settings.readingProgress === 'object' &&
|
|
10126
|
+
!Array.isArray(settings.readingProgress)
|
|
10127
|
+
) {
|
|
10128
|
+
state$6.readingProgressAvailable = true;
|
|
10129
|
+
state$6.readingProgressEnabled = settings.readingProgress.enabled !== false;
|
|
10130
|
+
}
|
|
10039
10131
|
|
|
10040
10132
|
loadSavedSettings(settings);
|
|
10041
10133
|
}
|
|
10042
10134
|
|
|
10043
|
-
function loadSavedSettings(settings) {
|
|
10044
|
-
let hasSettings = null;
|
|
10045
|
-
try {
|
|
10046
|
-
hasSettings = localStorage.getItem('readerSettings');
|
|
10047
|
-
} catch (error) {
|
|
10048
|
-
return
|
|
10049
|
-
}
|
|
10050
|
-
|
|
10051
|
-
if (hasSettings) {
|
|
10052
|
-
let savedSettings = null;
|
|
10053
|
-
try {
|
|
10054
|
-
savedSettings = JSON.parse(hasSettings);
|
|
10055
|
-
} catch (error) {
|
|
10056
|
-
return
|
|
10057
|
-
}
|
|
10135
|
+
function loadSavedSettings(settings) {
|
|
10136
|
+
let hasSettings = null;
|
|
10137
|
+
try {
|
|
10138
|
+
hasSettings = localStorage.getItem('readerSettings');
|
|
10139
|
+
} catch (error) {
|
|
10140
|
+
return
|
|
10141
|
+
}
|
|
10142
|
+
|
|
10143
|
+
if (hasSettings) {
|
|
10144
|
+
let savedSettings = null;
|
|
10145
|
+
try {
|
|
10146
|
+
savedSettings = JSON.parse(hasSettings);
|
|
10147
|
+
} catch (error) {
|
|
10148
|
+
return
|
|
10149
|
+
}
|
|
10058
10150
|
|
|
10059
10151
|
state$6.fontSize = savedSettings.fontSize;
|
|
10060
10152
|
state$6.columns = savedSettings.columns;
|
|
10061
10153
|
state$6.mode = savedSettings.mode;
|
|
10062
10154
|
|
|
10063
|
-
if (settings?.fontsOptions &&
|
|
10155
|
+
if (settings?.fontsOptions &&
|
|
10064
10156
|
settings?.fontsOptions?.find(item => item.name === savedSettings.textFont)
|
|
10065
10157
|
) {
|
|
10066
10158
|
state$6.textFont = savedSettings.textFont;
|
|
10067
|
-
}
|
|
10068
|
-
|
|
10069
|
-
if (state$6.readingProgressAvailable &&
|
|
10070
|
-
typeof savedSettings.readingProgressEnabled === 'boolean'
|
|
10071
|
-
) {
|
|
10072
|
-
state$6.readingProgressEnabled = savedSettings.readingProgressEnabled;
|
|
10073
|
-
}
|
|
10159
|
+
}
|
|
10160
|
+
|
|
10161
|
+
if (state$6.readingProgressAvailable &&
|
|
10162
|
+
typeof savedSettings.readingProgressEnabled === 'boolean'
|
|
10163
|
+
) {
|
|
10164
|
+
state$6.readingProgressEnabled = savedSettings.readingProgressEnabled;
|
|
10165
|
+
}
|
|
10074
10166
|
|
|
10075
10167
|
if (savedSettings.mode === 'dark') {
|
|
10076
10168
|
const htmlRoot = document.querySelector('html');
|
|
@@ -10094,14 +10186,14 @@ function setFontSize(value) {
|
|
|
10094
10186
|
state$6.fontSize = value;
|
|
10095
10187
|
}
|
|
10096
10188
|
|
|
10097
|
-
function setBlocked(value) {
|
|
10098
|
-
state$6.blocked = value;
|
|
10099
|
-
}
|
|
10100
|
-
|
|
10101
|
-
function setReadingProgressEnabled(value) {
|
|
10102
|
-
if (state$6.readingProgressAvailable)
|
|
10103
|
-
state$6.readingProgressEnabled = Boolean(value);
|
|
10104
|
-
}
|
|
10189
|
+
function setBlocked(value) {
|
|
10190
|
+
state$6.blocked = value;
|
|
10191
|
+
}
|
|
10192
|
+
|
|
10193
|
+
function setReadingProgressEnabled(value) {
|
|
10194
|
+
if (state$6.readingProgressAvailable)
|
|
10195
|
+
state$6.readingProgressEnabled = Boolean(value);
|
|
10196
|
+
}
|
|
10105
10197
|
|
|
10106
10198
|
function setMode(value) {
|
|
10107
10199
|
state$6.mode = value;
|
|
@@ -10119,24 +10211,24 @@ function setMode(value) {
|
|
|
10119
10211
|
}
|
|
10120
10212
|
}
|
|
10121
10213
|
|
|
10122
|
-
function saveSettings() {
|
|
10123
|
-
try {
|
|
10124
|
-
localStorage.setItem(
|
|
10125
|
-
'readerSettings',
|
|
10126
|
-
JSON.stringify({
|
|
10127
|
-
textFont: textFont.value,
|
|
10128
|
-
fontSize: fontSize.value,
|
|
10129
|
-
columns: columns.value,
|
|
10130
|
-
mode: mode.value,
|
|
10131
|
-
...(readingProgressAvailable.value
|
|
10132
|
-
? { readingProgressEnabled: readingProgressEnabled.value }
|
|
10133
|
-
: {})
|
|
10134
|
-
})
|
|
10135
|
-
);
|
|
10136
|
-
} catch (error) {
|
|
10137
|
-
// Settings remain available for the current session.
|
|
10138
|
-
}
|
|
10139
|
-
}
|
|
10214
|
+
function saveSettings() {
|
|
10215
|
+
try {
|
|
10216
|
+
localStorage.setItem(
|
|
10217
|
+
'readerSettings',
|
|
10218
|
+
JSON.stringify({
|
|
10219
|
+
textFont: textFont.value,
|
|
10220
|
+
fontSize: fontSize.value,
|
|
10221
|
+
columns: columns.value,
|
|
10222
|
+
mode: mode.value,
|
|
10223
|
+
...(readingProgressAvailable.value
|
|
10224
|
+
? { readingProgressEnabled: readingProgressEnabled.value }
|
|
10225
|
+
: {})
|
|
10226
|
+
})
|
|
10227
|
+
);
|
|
10228
|
+
} catch (error) {
|
|
10229
|
+
// Settings remain available for the current session.
|
|
10230
|
+
}
|
|
10231
|
+
}
|
|
10140
10232
|
|
|
10141
10233
|
const useReaderSettings = {
|
|
10142
10234
|
baseFont,
|
|
@@ -10150,11 +10242,11 @@ const useReaderSettings = {
|
|
|
10150
10242
|
setFontSize,
|
|
10151
10243
|
setBlocked,
|
|
10152
10244
|
mode,
|
|
10153
|
-
blocked,
|
|
10154
|
-
readingProgressAvailable,
|
|
10155
|
-
readingProgressEnabled,
|
|
10156
|
-
setMode,
|
|
10157
|
-
setReadingProgressEnabled,
|
|
10245
|
+
blocked,
|
|
10246
|
+
readingProgressAvailable,
|
|
10247
|
+
readingProgressEnabled,
|
|
10248
|
+
setMode,
|
|
10249
|
+
setReadingProgressEnabled,
|
|
10158
10250
|
saveSettings,
|
|
10159
10251
|
|
|
10160
10252
|
bookTitle,
|
|
@@ -10162,102 +10254,58 @@ const useReaderSettings = {
|
|
|
10162
10254
|
homeUrl
|
|
10163
10255
|
};
|
|
10164
10256
|
|
|
10165
|
-
const
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
};
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
"stroke-linecap": "round",
|
|
10194
|
-
"stroke-linejoin": "round"
|
|
10195
|
-
}, null, -1)
|
|
10196
|
-
]))]))
|
|
10197
|
-
}
|
|
10198
|
-
const IconHome = /*#__PURE__*/_export_sfc(_sfc_main$t, [['render',_sfc_render$c]]);
|
|
10199
|
-
|
|
10200
|
-
const _sfc_main$s = {};
|
|
10201
|
-
|
|
10202
|
-
const _hoisted_1$q = {
|
|
10203
|
-
fill: "none",
|
|
10204
|
-
stroke: "currentColor",
|
|
10205
|
-
viewBox: "0 0 24 24",
|
|
10206
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
10207
|
-
};
|
|
10208
|
-
|
|
10209
|
-
function _sfc_render$b(_ctx, _cache) {
|
|
10210
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$q, [...(_cache[0] || (_cache[0] = [
|
|
10211
|
-
createBaseVNode("path", {
|
|
10212
|
-
"stroke-linecap": "round",
|
|
10213
|
-
"stroke-linejoin": "round",
|
|
10214
|
-
"stroke-width": "2",
|
|
10215
|
-
d: "M6 18L18 6M6 6l12 12"
|
|
10216
|
-
}, null, -1)
|
|
10217
|
-
]))]))
|
|
10218
|
-
}
|
|
10219
|
-
const IconClose = /*#__PURE__*/_export_sfc(_sfc_main$s, [['render',_sfc_render$b]]);
|
|
10220
|
-
|
|
10221
|
-
const _sfc_main$r = {};
|
|
10222
|
-
|
|
10223
|
-
const _hoisted_1$p = {
|
|
10224
|
-
width: "24",
|
|
10225
|
-
height: "19",
|
|
10226
|
-
viewBox: "0 0 24 19",
|
|
10227
|
-
fill: "none",
|
|
10228
|
-
stroke: "currentColor",
|
|
10229
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
10257
|
+
const state$5 = reactive({
|
|
10258
|
+
totalPages: 1
|
|
10259
|
+
});
|
|
10260
|
+
|
|
10261
|
+
function estimate(viewport, content) {
|
|
10262
|
+
if (viewport && content) {
|
|
10263
|
+
const { width: viewportWidth } = viewport.value.getBoundingClientRect();
|
|
10264
|
+
const { width: contentWidth } = content.value.getBoundingClientRect();
|
|
10265
|
+
|
|
10266
|
+
if (contentWidth > viewportWidth) {
|
|
10267
|
+
state$5.totalPages = Math.ceil(contentWidth / viewportWidth);
|
|
10268
|
+
return Math.ceil(contentWidth / viewportWidth)
|
|
10269
|
+
|
|
10270
|
+
} else {
|
|
10271
|
+
state$5.totalPages = 1;
|
|
10272
|
+
return 1
|
|
10273
|
+
}
|
|
10274
|
+
} else {
|
|
10275
|
+
state$5.totalPages = 1;
|
|
10276
|
+
return 1
|
|
10277
|
+
}
|
|
10278
|
+
}
|
|
10279
|
+
|
|
10280
|
+
const totalPages$1 = computed(() => state$5.totalPages);
|
|
10281
|
+
|
|
10282
|
+
const useEstimatePages = {
|
|
10283
|
+
totalPages: totalPages$1,
|
|
10284
|
+
estimate
|
|
10230
10285
|
};
|
|
10231
10286
|
|
|
10232
|
-
|
|
10233
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$p, [...(_cache[0] || (_cache[0] = [
|
|
10234
|
-
createStaticVNode("<line x1=\"5\" y1=\"1.08447\" x2=\"1\" y2=\"1.08447\" stroke-width=\"2\" stroke-linecap=\"round\"></line><line x1=\"23\" y1=\"1.04248\" x2=\"11\" y2=\"1.04248\" stroke-width=\"2\" stroke-linecap=\"round\"></line><line x1=\"23\" y1=\"9.08447\" x2=\"14\" y2=\"9.08447\" stroke-width=\"2\" stroke-linecap=\"round\"></line><line x1=\"8\" y1=\"9.14905\" x2=\"4\" y2=\"9.14905\" stroke-width=\"2\" stroke-linecap=\"round\"></line><line x1=\"23\" y1=\"17.149\" x2=\"10.9993\" y2=\"17.149\" stroke-width=\"2\" stroke-linecap=\"round\"></line><line x1=\"5\" y1=\"17.2429\" x2=\"1\" y2=\"17.2429\" stroke-width=\"2\" stroke-linecap=\"round\"></line>", 6)
|
|
10235
|
-
]))]))
|
|
10236
|
-
}
|
|
10237
|
-
const IconSummary = /*#__PURE__*/_export_sfc(_sfc_main$r, [['render',_sfc_render$a]]);
|
|
10238
|
-
|
|
10239
|
-
const state$5 = reactive({
|
|
10287
|
+
const state$4 = reactive({
|
|
10240
10288
|
references: [],
|
|
10241
10289
|
reference: null
|
|
10242
10290
|
});
|
|
10243
10291
|
|
|
10244
|
-
const references = computed(() => state$
|
|
10292
|
+
const references = computed(() => state$4.references);
|
|
10245
10293
|
|
|
10246
10294
|
function setReferences(references) {
|
|
10247
|
-
state$
|
|
10295
|
+
state$4.references = references;
|
|
10248
10296
|
}
|
|
10249
10297
|
|
|
10250
|
-
const reference = computed(() => state$
|
|
10298
|
+
const reference = computed(() => state$4.reference);
|
|
10251
10299
|
|
|
10252
10300
|
function setHighlightedReference(reference) {
|
|
10253
|
-
state$
|
|
10301
|
+
state$4.reference = reference;
|
|
10254
10302
|
}
|
|
10255
10303
|
|
|
10256
10304
|
function applyReferences(contentRaw) {
|
|
10257
|
-
if (state$
|
|
10305
|
+
if (state$4.references.length === 0 || !contentRaw)
|
|
10258
10306
|
return contentRaw
|
|
10259
10307
|
|
|
10260
|
-
return state$
|
|
10308
|
+
return state$4.references.reduce((content, reference) => {
|
|
10261
10309
|
if (!content) return content
|
|
10262
10310
|
|
|
10263
10311
|
if (content.includes(reference.cit)) {
|
|
@@ -10283,11 +10331,11 @@ function applyReference(event) {
|
|
|
10283
10331
|
const target = classList.find(item => item.startsWith('reference-'));
|
|
10284
10332
|
|
|
10285
10333
|
if (target) {
|
|
10286
|
-
const ref = state$
|
|
10334
|
+
const ref = state$4.references.find(
|
|
10287
10335
|
item => target && item.cit.replaceAll(' ', '') === target.replace('reference-', '')
|
|
10288
10336
|
);
|
|
10289
10337
|
if (ref) {
|
|
10290
|
-
state$
|
|
10338
|
+
state$4.reference = ref;
|
|
10291
10339
|
}
|
|
10292
10340
|
}
|
|
10293
10341
|
|
|
@@ -10302,25 +10350,25 @@ const useReferences = {
|
|
|
10302
10350
|
applyReferences,
|
|
10303
10351
|
};
|
|
10304
10352
|
|
|
10305
|
-
const state$
|
|
10353
|
+
const state$3 = reactive({
|
|
10306
10354
|
footnotes: [],
|
|
10307
10355
|
showFootnotes: false,
|
|
10308
10356
|
footnote: null
|
|
10309
10357
|
});
|
|
10310
10358
|
|
|
10311
|
-
const footnotes = computed(() => state$
|
|
10359
|
+
const footnotes = computed(() => state$3.footnotes);
|
|
10312
10360
|
function setFootnotes(footnotes) {
|
|
10313
|
-
state$
|
|
10361
|
+
state$3.footnotes = footnotes;
|
|
10314
10362
|
}
|
|
10315
10363
|
|
|
10316
|
-
const showFootnotes = computed(() => state$
|
|
10364
|
+
const showFootnotes = computed(() => state$3.showFootnotes);
|
|
10317
10365
|
function setShowFootnotes(value) {
|
|
10318
|
-
state$
|
|
10366
|
+
state$3.showFootnotes = value;
|
|
10319
10367
|
}
|
|
10320
10368
|
|
|
10321
|
-
const footnote = computed(() => state$
|
|
10369
|
+
const footnote = computed(() => state$3.footnote);
|
|
10322
10370
|
function setHighlightedFootnote(footnote) {
|
|
10323
|
-
state$
|
|
10371
|
+
state$3.footnote = footnote;
|
|
10324
10372
|
}
|
|
10325
10373
|
|
|
10326
10374
|
function applyFootnote(event) {
|
|
@@ -10334,9 +10382,9 @@ function applyFootnote(event) {
|
|
|
10334
10382
|
);
|
|
10335
10383
|
|
|
10336
10384
|
if (footnoteTarget) {
|
|
10337
|
-
const ref = state$
|
|
10385
|
+
const ref = state$3.footnotes.find(item => item.id === footnoteTarget);
|
|
10338
10386
|
if (ref) {
|
|
10339
|
-
state$
|
|
10387
|
+
state$3.footnote = ref;
|
|
10340
10388
|
}
|
|
10341
10389
|
}
|
|
10342
10390
|
}
|
|
@@ -10351,36 +10399,36 @@ const useFootnotes = {
|
|
|
10351
10399
|
showFootnotes
|
|
10352
10400
|
};
|
|
10353
10401
|
|
|
10354
|
-
const state$
|
|
10355
|
-
summary: null,
|
|
10356
|
-
content: null,
|
|
10357
|
-
activeChapter: 0
|
|
10402
|
+
const state$2 = reactive({
|
|
10403
|
+
summary: null,
|
|
10404
|
+
content: null,
|
|
10405
|
+
activeChapter: 0
|
|
10358
10406
|
});
|
|
10359
10407
|
|
|
10360
|
-
const content = computed(() => state$
|
|
10361
|
-
const summary = computed(() => state$
|
|
10362
|
-
const context = computed(() => {
|
|
10363
|
-
const chapters = state$
|
|
10364
|
-
const linkedChapter = chapters.findIndex(
|
|
10365
|
-
chapter => window.location.href.includes(chapter.link)
|
|
10366
|
-
);
|
|
10367
|
-
const current = linkedChapter >= 0 ? linkedChapter : state$
|
|
10368
|
-
return {
|
|
10369
|
-
chapter: chapters[current],
|
|
10370
|
-
surround: {
|
|
10371
|
-
before: current - 1 >= 0
|
|
10372
|
-
? chapters[current - 1]
|
|
10373
|
-
: null,
|
|
10374
|
-
after: current + 1 < chapters.length
|
|
10375
|
-
? chapters[current + 1]
|
|
10376
|
-
: null,
|
|
10377
|
-
}
|
|
10378
|
-
}
|
|
10379
|
-
});
|
|
10380
|
-
const contextId = computed(() => {
|
|
10381
|
-
const chapter = context.value.chapter;
|
|
10382
|
-
return chapter?.file || chapter?.link || chapter?.title || window.location.pathname
|
|
10383
|
-
});
|
|
10408
|
+
const content = computed(() => state$2.content);
|
|
10409
|
+
const summary = computed(() => state$2.summary);
|
|
10410
|
+
const context = computed(() => {
|
|
10411
|
+
const chapters = state$2.summary || [];
|
|
10412
|
+
const linkedChapter = chapters.findIndex(
|
|
10413
|
+
chapter => window.location.href.includes(chapter.link)
|
|
10414
|
+
);
|
|
10415
|
+
const current = linkedChapter >= 0 ? linkedChapter : state$2.activeChapter;
|
|
10416
|
+
return {
|
|
10417
|
+
chapter: chapters[current],
|
|
10418
|
+
surround: {
|
|
10419
|
+
before: current - 1 >= 0
|
|
10420
|
+
? chapters[current - 1]
|
|
10421
|
+
: null,
|
|
10422
|
+
after: current + 1 < chapters.length
|
|
10423
|
+
? chapters[current + 1]
|
|
10424
|
+
: null,
|
|
10425
|
+
}
|
|
10426
|
+
}
|
|
10427
|
+
});
|
|
10428
|
+
const contextId = computed(() => {
|
|
10429
|
+
const chapter = context.value.chapter;
|
|
10430
|
+
return chapter?.file || chapter?.link || chapter?.title || window.location.pathname
|
|
10431
|
+
});
|
|
10384
10432
|
|
|
10385
10433
|
async function initContent(contentString, contentWrapper) {
|
|
10386
10434
|
const { setReferences, applyReferences } = useReferences;
|
|
@@ -10391,7 +10439,7 @@ async function initContent(contentString, contentWrapper) {
|
|
|
10391
10439
|
: null;
|
|
10392
10440
|
|
|
10393
10441
|
if (content?.summary)
|
|
10394
|
-
state$
|
|
10442
|
+
state$2.summary = content.summary;
|
|
10395
10443
|
|
|
10396
10444
|
if (content?.references)
|
|
10397
10445
|
setReferences(content.references);
|
|
@@ -10405,7 +10453,7 @@ async function initContent(contentString, contentWrapper) {
|
|
|
10405
10453
|
const newContent = content.applyReferences
|
|
10406
10454
|
? applyReferences(text)
|
|
10407
10455
|
: text;
|
|
10408
|
-
state$
|
|
10456
|
+
state$2.content = newContent;
|
|
10409
10457
|
|
|
10410
10458
|
// else if content comes from slot, apply references to slot
|
|
10411
10459
|
} else {
|
|
@@ -10430,16 +10478,16 @@ async function getContent(location) {
|
|
|
10430
10478
|
return text
|
|
10431
10479
|
} catch (err) {
|
|
10432
10480
|
console.log({ err });
|
|
10433
|
-
state$
|
|
10481
|
+
state$2.content = 'Ops, não foi possível carregar o arquivo solicitado.';
|
|
10434
10482
|
}
|
|
10435
10483
|
}
|
|
10436
10484
|
|
|
10437
|
-
function applyContent(text, chapter = null) {
|
|
10438
|
-
const { applyReferences } = useReferences;
|
|
10439
|
-
const newContent = applyReferences(text);
|
|
10440
|
-
if (chapter)
|
|
10441
|
-
state$
|
|
10442
|
-
state$
|
|
10485
|
+
function applyContent(text, chapter = null) {
|
|
10486
|
+
const { applyReferences } = useReferences;
|
|
10487
|
+
const newContent = applyReferences(text);
|
|
10488
|
+
if (chapter)
|
|
10489
|
+
state$2.activeChapter = state$2.summary.findIndex(item => item === chapter);
|
|
10490
|
+
state$2.content = newContent;
|
|
10443
10491
|
}
|
|
10444
10492
|
|
|
10445
10493
|
function listenToClicks(contentWrapper) {
|
|
@@ -10464,39 +10512,9 @@ const useTextContent = {
|
|
|
10464
10512
|
initContent,
|
|
10465
10513
|
getContent,
|
|
10466
10514
|
applyContent,
|
|
10467
|
-
listenToClicks,
|
|
10468
|
-
context,
|
|
10469
|
-
contextId
|
|
10470
|
-
};
|
|
10471
|
-
|
|
10472
|
-
const state$2 = reactive({
|
|
10473
|
-
totalPages: 1
|
|
10474
|
-
});
|
|
10475
|
-
|
|
10476
|
-
function estimate(viewport, content) {
|
|
10477
|
-
if (viewport && content) {
|
|
10478
|
-
const { width: viewportWidth } = viewport.value.getBoundingClientRect();
|
|
10479
|
-
const { width: contentWidth } = content.value.getBoundingClientRect();
|
|
10480
|
-
|
|
10481
|
-
if (contentWidth > viewportWidth) {
|
|
10482
|
-
state$2.totalPages = Math.ceil(contentWidth / viewportWidth);
|
|
10483
|
-
return Math.ceil(contentWidth / viewportWidth)
|
|
10484
|
-
|
|
10485
|
-
} else {
|
|
10486
|
-
state$2.totalPages = 1;
|
|
10487
|
-
return 1
|
|
10488
|
-
}
|
|
10489
|
-
} else {
|
|
10490
|
-
state$2.totalPages = 1;
|
|
10491
|
-
return 1
|
|
10492
|
-
}
|
|
10493
|
-
}
|
|
10494
|
-
|
|
10495
|
-
const totalPages$1 = computed(() => state$2.totalPages);
|
|
10496
|
-
|
|
10497
|
-
const useEstimatePages = {
|
|
10498
|
-
totalPages: totalPages$1,
|
|
10499
|
-
estimate
|
|
10515
|
+
listenToClicks,
|
|
10516
|
+
context,
|
|
10517
|
+
contextId
|
|
10500
10518
|
};
|
|
10501
10519
|
|
|
10502
10520
|
const isSafari = [
|
|
@@ -10516,214 +10534,216 @@ const useBrowser = {
|
|
|
10516
10534
|
isApple
|
|
10517
10535
|
};
|
|
10518
10536
|
|
|
10519
|
-
const STORAGE_KEY = 'paginar:reading-progress:v1';
|
|
10520
|
-
|
|
10521
|
-
const state$1 = reactive({
|
|
10522
|
-
bookId: null,
|
|
10523
|
-
contextKey: null,
|
|
10524
|
-
restored: false,
|
|
10525
|
-
suspended: false,
|
|
10526
|
-
currentPage: 1,
|
|
10527
|
-
totalPages: 1
|
|
10528
|
-
});
|
|
10529
|
-
|
|
10530
|
-
const available = computed(() => useReaderSettings.readingProgressAvailable.value);
|
|
10531
|
-
const enabled = computed(() => useReaderSettings.readingProgressEnabled.value);
|
|
10532
|
-
|
|
10533
|
-
function init$1(settingsString, fallbackTitle) {
|
|
10534
|
-
let settings = null;
|
|
10535
|
-
state$1.bookId = null;
|
|
10536
|
-
state$1.contextKey = null;
|
|
10537
|
-
state$1.restored = false;
|
|
10538
|
-
|
|
10539
|
-
try {
|
|
10540
|
-
settings = settingsString ? JSON.parse(settingsString) : null;
|
|
10541
|
-
} catch (error) {
|
|
10542
|
-
return
|
|
10543
|
-
}
|
|
10544
|
-
|
|
10545
|
-
if (!settings?.readingProgress ||
|
|
10546
|
-
typeof settings.readingProgress !== 'object' ||
|
|
10547
|
-
Array.isArray(settings.readingProgress)
|
|
10548
|
-
)
|
|
10549
|
-
return
|
|
10550
|
-
|
|
10551
|
-
const configuredId = settings.readingProgress.id;
|
|
10552
|
-
state$1.bookId = typeof configuredId === 'string' && configuredId.trim()
|
|
10553
|
-
? configuredId.trim()
|
|
10554
|
-
: fallbackTitle || window.location.pathname;
|
|
10555
|
-
}
|
|
10556
|
-
|
|
10557
|
-
function getContextKey() {
|
|
10558
|
-
if (!state$1.bookId)
|
|
10559
|
-
return null
|
|
10560
|
-
|
|
10561
|
-
const chapter = useTextContent.contextId.value || window.location.pathname;
|
|
10562
|
-
return `${state$1.bookId}::${chapter}`
|
|
10563
|
-
}
|
|
10564
|
-
|
|
10565
|
-
function readStore() {
|
|
10566
|
-
try {
|
|
10567
|
-
const saved = JSON.parse(localStorage.getItem(STORAGE_KEY));
|
|
10568
|
-
return saved?.version === 1 && saved.entries && typeof saved.entries === 'object'
|
|
10569
|
-
? saved
|
|
10570
|
-
: { version: 1, entries: {} }
|
|
10571
|
-
} catch (error) {
|
|
10572
|
-
return { version: 1, entries: {} }
|
|
10573
|
-
}
|
|
10574
|
-
}
|
|
10575
|
-
|
|
10576
|
-
function writeStore(store) {
|
|
10577
|
-
try {
|
|
10578
|
-
localStorage.setItem(STORAGE_KEY, JSON.stringify(store));
|
|
10579
|
-
} catch (error) {
|
|
10580
|
-
// Reading continues normally when storage is unavailable.
|
|
10581
|
-
}
|
|
10582
|
-
}
|
|
10583
|
-
|
|
10584
|
-
function percentageFor(page, total) {
|
|
10585
|
-
if (total <= 1)
|
|
10586
|
-
return 0
|
|
10587
|
-
|
|
10588
|
-
return Math.min(1, Math.max(0, (page - 1) / (total - 1)))
|
|
10589
|
-
}
|
|
10590
|
-
|
|
10591
|
-
function pageFor(percentage, total) {
|
|
10592
|
-
return Math.min(total, Math.max(1, Math.round(percentage * (total - 1)) + 1))
|
|
10593
|
-
}
|
|
10594
|
-
|
|
10595
|
-
function repaginate(page, previousTotal, nextTotal) {
|
|
10596
|
-
const key = getContextKey();
|
|
10597
|
-
if (!available.value || !enabled.value || !state$1.restored ||
|
|
10598
|
-
!key || key !== state$1.contextKey || previousTotal < 1 || nextTotal < 1
|
|
10599
|
-
)
|
|
10600
|
-
return null
|
|
10601
|
-
|
|
10602
|
-
const percentage = percentageFor(page, previousTotal);
|
|
10603
|
-
return pageFor(percentage, nextTotal)
|
|
10604
|
-
}
|
|
10605
|
-
|
|
10606
|
-
function save(page, total) {
|
|
10607
|
-
const key = getContextKey();
|
|
10608
|
-
if (!available.value || !enabled.value || !state$1.restored || state$1.suspended ||
|
|
10609
|
-
!key || key !== state$1.contextKey || total < 1
|
|
10610
|
-
)
|
|
10611
|
-
return
|
|
10612
|
-
|
|
10613
|
-
const store = readStore();
|
|
10614
|
-
store.entries[key] = percentageFor(page, total);
|
|
10615
|
-
writeStore(store);
|
|
10616
|
-
}
|
|
10617
|
-
|
|
10618
|
-
function suspend() {
|
|
10619
|
-
state$1.suspended = true;
|
|
10620
|
-
}
|
|
10621
|
-
|
|
10622
|
-
function resume() {
|
|
10623
|
-
state$1.suspended = false;
|
|
10624
|
-
}
|
|
10625
|
-
|
|
10626
|
-
function remove() {
|
|
10627
|
-
const key = getContextKey();
|
|
10628
|
-
if (!key)
|
|
10629
|
-
return
|
|
10630
|
-
|
|
10631
|
-
const store = readStore();
|
|
10632
|
-
delete store.entries[key];
|
|
10633
|
-
writeStore(store);
|
|
10634
|
-
}
|
|
10635
|
-
|
|
10636
|
-
function sync(page, total, allowRestore = false) {
|
|
10637
|
-
state$1.currentPage = page;
|
|
10638
|
-
state$1.totalPages = total;
|
|
10639
|
-
const key = getContextKey();
|
|
10640
|
-
if (!available.value || !enabled.value || !key)
|
|
10641
|
-
return
|
|
10642
|
-
|
|
10643
|
-
if (state$1.contextKey !== key) {
|
|
10644
|
-
state$1.contextKey = key;
|
|
10645
|
-
state$1.restored = false;
|
|
10646
|
-
}
|
|
10647
|
-
|
|
10648
|
-
if (!state$1.restored) {
|
|
10649
|
-
if (!allowRestore)
|
|
10650
|
-
return
|
|
10651
|
-
|
|
10652
|
-
const percentage = readStore().entries[key];
|
|
10653
|
-
if (Number.isFinite(percentage) && percentage >= 0 && percentage <= 1) {
|
|
10654
|
-
if (total <= 1 && percentage > 0)
|
|
10655
|
-
return
|
|
10656
|
-
|
|
10657
|
-
state$1.restored = true;
|
|
10658
|
-
const targetPage = pageFor(percentage, total);
|
|
10659
|
-
if (targetPage !== page)
|
|
10660
|
-
return targetPage
|
|
10661
|
-
return
|
|
10662
|
-
}
|
|
10663
|
-
|
|
10664
|
-
state$1.restored = true;
|
|
10665
|
-
}
|
|
10666
|
-
|
|
10667
|
-
save(page, total);
|
|
10668
|
-
}
|
|
10669
|
-
|
|
10670
|
-
function setEnabled(value) {
|
|
10671
|
-
useReaderSettings.setReadingProgressEnabled(value);
|
|
10672
|
-
state$1.restored = true;
|
|
10673
|
-
|
|
10674
|
-
if (value)
|
|
10675
|
-
save(state$1.currentPage, state$1.totalPages);
|
|
10676
|
-
else
|
|
10677
|
-
remove();
|
|
10678
|
-
}
|
|
10679
|
-
|
|
10680
|
-
const useReadingProgress = {
|
|
10681
|
-
available,
|
|
10682
|
-
enabled,
|
|
10683
|
-
init: init$1,
|
|
10684
|
-
remove,
|
|
10685
|
-
repaginate,
|
|
10686
|
-
resume,
|
|
10687
|
-
save,
|
|
10688
|
-
setEnabled,
|
|
10689
|
-
suspend,
|
|
10690
|
-
sync
|
|
10537
|
+
const STORAGE_KEY = 'paginar:reading-progress:v1';
|
|
10538
|
+
|
|
10539
|
+
const state$1 = reactive({
|
|
10540
|
+
bookId: null,
|
|
10541
|
+
contextKey: null,
|
|
10542
|
+
restored: false,
|
|
10543
|
+
suspended: false,
|
|
10544
|
+
currentPage: 1,
|
|
10545
|
+
totalPages: 1
|
|
10546
|
+
});
|
|
10547
|
+
|
|
10548
|
+
const available = computed(() => useReaderSettings.readingProgressAvailable.value);
|
|
10549
|
+
const enabled = computed(() => useReaderSettings.readingProgressEnabled.value);
|
|
10550
|
+
|
|
10551
|
+
function init$1(settingsString, fallbackTitle) {
|
|
10552
|
+
let settings = null;
|
|
10553
|
+
state$1.bookId = null;
|
|
10554
|
+
state$1.contextKey = null;
|
|
10555
|
+
state$1.restored = false;
|
|
10556
|
+
|
|
10557
|
+
try {
|
|
10558
|
+
settings = settingsString ? JSON.parse(settingsString) : null;
|
|
10559
|
+
} catch (error) {
|
|
10560
|
+
return
|
|
10561
|
+
}
|
|
10562
|
+
|
|
10563
|
+
if (!settings?.readingProgress ||
|
|
10564
|
+
typeof settings.readingProgress !== 'object' ||
|
|
10565
|
+
Array.isArray(settings.readingProgress)
|
|
10566
|
+
)
|
|
10567
|
+
return
|
|
10568
|
+
|
|
10569
|
+
const configuredId = settings.readingProgress.id;
|
|
10570
|
+
state$1.bookId = typeof configuredId === 'string' && configuredId.trim()
|
|
10571
|
+
? configuredId.trim()
|
|
10572
|
+
: fallbackTitle || window.location.pathname;
|
|
10573
|
+
}
|
|
10574
|
+
|
|
10575
|
+
function getContextKey() {
|
|
10576
|
+
if (!state$1.bookId)
|
|
10577
|
+
return null
|
|
10578
|
+
|
|
10579
|
+
const chapter = useTextContent.contextId.value || window.location.pathname;
|
|
10580
|
+
return `${state$1.bookId}::${chapter}`
|
|
10581
|
+
}
|
|
10582
|
+
|
|
10583
|
+
function readStore() {
|
|
10584
|
+
try {
|
|
10585
|
+
const saved = JSON.parse(localStorage.getItem(STORAGE_KEY));
|
|
10586
|
+
return saved?.version === 1 && saved.entries && typeof saved.entries === 'object'
|
|
10587
|
+
? saved
|
|
10588
|
+
: { version: 1, entries: {} }
|
|
10589
|
+
} catch (error) {
|
|
10590
|
+
return { version: 1, entries: {} }
|
|
10591
|
+
}
|
|
10592
|
+
}
|
|
10593
|
+
|
|
10594
|
+
function writeStore(store) {
|
|
10595
|
+
try {
|
|
10596
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(store));
|
|
10597
|
+
} catch (error) {
|
|
10598
|
+
// Reading continues normally when storage is unavailable.
|
|
10599
|
+
}
|
|
10600
|
+
}
|
|
10601
|
+
|
|
10602
|
+
function percentageFor(page, total) {
|
|
10603
|
+
if (total <= 1)
|
|
10604
|
+
return 0
|
|
10605
|
+
|
|
10606
|
+
return Math.min(1, Math.max(0, (page - 1) / (total - 1)))
|
|
10607
|
+
}
|
|
10608
|
+
|
|
10609
|
+
function pageFor(percentage, total) {
|
|
10610
|
+
return Math.min(total, Math.max(1, Math.round(percentage * (total - 1)) + 1))
|
|
10611
|
+
}
|
|
10612
|
+
|
|
10613
|
+
function repaginate(page, previousTotal, nextTotal) {
|
|
10614
|
+
const key = getContextKey();
|
|
10615
|
+
if (!available.value || !enabled.value || !state$1.restored ||
|
|
10616
|
+
!key || key !== state$1.contextKey || previousTotal < 1 || nextTotal < 1
|
|
10617
|
+
)
|
|
10618
|
+
return null
|
|
10619
|
+
|
|
10620
|
+
const percentage = percentageFor(page, previousTotal);
|
|
10621
|
+
return pageFor(percentage, nextTotal)
|
|
10622
|
+
}
|
|
10623
|
+
|
|
10624
|
+
function save(page, total) {
|
|
10625
|
+
const key = getContextKey();
|
|
10626
|
+
if (!available.value || !enabled.value || !state$1.restored || state$1.suspended ||
|
|
10627
|
+
!key || key !== state$1.contextKey || total < 1
|
|
10628
|
+
)
|
|
10629
|
+
return
|
|
10630
|
+
|
|
10631
|
+
const store = readStore();
|
|
10632
|
+
store.entries[key] = percentageFor(page, total);
|
|
10633
|
+
writeStore(store);
|
|
10634
|
+
}
|
|
10635
|
+
|
|
10636
|
+
function suspend() {
|
|
10637
|
+
state$1.suspended = true;
|
|
10638
|
+
}
|
|
10639
|
+
|
|
10640
|
+
function resume() {
|
|
10641
|
+
state$1.suspended = false;
|
|
10642
|
+
}
|
|
10643
|
+
|
|
10644
|
+
function remove() {
|
|
10645
|
+
const key = getContextKey();
|
|
10646
|
+
if (!key)
|
|
10647
|
+
return
|
|
10648
|
+
|
|
10649
|
+
const store = readStore();
|
|
10650
|
+
delete store.entries[key];
|
|
10651
|
+
writeStore(store);
|
|
10652
|
+
}
|
|
10653
|
+
|
|
10654
|
+
function sync(page, total, allowRestore = false) {
|
|
10655
|
+
state$1.currentPage = page;
|
|
10656
|
+
state$1.totalPages = total;
|
|
10657
|
+
const key = getContextKey();
|
|
10658
|
+
if (!available.value || !enabled.value || !key)
|
|
10659
|
+
return
|
|
10660
|
+
|
|
10661
|
+
if (state$1.contextKey !== key) {
|
|
10662
|
+
state$1.contextKey = key;
|
|
10663
|
+
state$1.restored = false;
|
|
10664
|
+
}
|
|
10665
|
+
|
|
10666
|
+
if (!state$1.restored) {
|
|
10667
|
+
if (!allowRestore)
|
|
10668
|
+
return
|
|
10669
|
+
|
|
10670
|
+
const percentage = readStore().entries[key];
|
|
10671
|
+
if (Number.isFinite(percentage) && percentage >= 0 && percentage <= 1) {
|
|
10672
|
+
if (total <= 1 && percentage > 0)
|
|
10673
|
+
return
|
|
10674
|
+
|
|
10675
|
+
state$1.restored = true;
|
|
10676
|
+
const targetPage = pageFor(percentage, total);
|
|
10677
|
+
if (targetPage !== page)
|
|
10678
|
+
return targetPage
|
|
10679
|
+
return
|
|
10680
|
+
}
|
|
10681
|
+
|
|
10682
|
+
state$1.restored = true;
|
|
10683
|
+
}
|
|
10684
|
+
|
|
10685
|
+
save(page, total);
|
|
10686
|
+
}
|
|
10687
|
+
|
|
10688
|
+
function setEnabled(value) {
|
|
10689
|
+
useReaderSettings.setReadingProgressEnabled(value);
|
|
10690
|
+
state$1.restored = true;
|
|
10691
|
+
|
|
10692
|
+
if (value)
|
|
10693
|
+
save(state$1.currentPage, state$1.totalPages);
|
|
10694
|
+
else
|
|
10695
|
+
remove();
|
|
10696
|
+
}
|
|
10697
|
+
|
|
10698
|
+
const useReadingProgress = {
|
|
10699
|
+
available,
|
|
10700
|
+
enabled,
|
|
10701
|
+
init: init$1,
|
|
10702
|
+
remove,
|
|
10703
|
+
repaginate,
|
|
10704
|
+
resume,
|
|
10705
|
+
save,
|
|
10706
|
+
setEnabled,
|
|
10707
|
+
suspend,
|
|
10708
|
+
sync
|
|
10691
10709
|
};
|
|
10692
10710
|
|
|
10693
|
-
const state = reactive({
|
|
10694
|
-
currentPage: 1,
|
|
10711
|
+
const state = reactive({
|
|
10712
|
+
currentPage: 1,
|
|
10713
|
+
changeSource: 'initial',
|
|
10695
10714
|
nextTry: 0,
|
|
10696
10715
|
prevTry: 0,
|
|
10697
10716
|
willRedirect: false
|
|
10698
10717
|
});
|
|
10699
10718
|
|
|
10700
|
-
const currentPage = computed(() => state.currentPage);
|
|
10719
|
+
const currentPage = computed(() => state.currentPage);
|
|
10720
|
+
const changeSource = computed(() => state.changeSource);
|
|
10701
10721
|
const totalPages = computed(() => useEstimatePages.totalPages.value);
|
|
10702
10722
|
|
|
10703
|
-
function init(viewport, content, estimate = null) {
|
|
10704
|
-
const updatePages = estimate || (() => useEstimatePages.estimate(viewport, content));
|
|
10705
|
-
// Measure immediately, but let the parent restore progress only after child
|
|
10706
|
-
// controls (notably the page slider) have finished their mount cycle.
|
|
10707
|
-
useEstimatePages.estimate(viewport, content);
|
|
10723
|
+
function init(viewport, content, estimate = null) {
|
|
10724
|
+
const updatePages = estimate || (() => useEstimatePages.estimate(viewport, content));
|
|
10725
|
+
// Measure immediately, but let the parent restore progress only after child
|
|
10726
|
+
// controls (notably the page slider) have finished their mount cycle.
|
|
10727
|
+
useEstimatePages.estimate(viewport, content);
|
|
10708
10728
|
|
|
10709
10729
|
// check if there is a query string for oring, and
|
|
10710
10730
|
// if previews chapter was the next one. If so,
|
|
10711
10731
|
// start from the end, as we are coming backwards
|
|
10712
10732
|
const urlParams = new URLSearchParams(window.location.search);
|
|
10713
10733
|
const origin = urlParams.get('origin');
|
|
10714
|
-
if (origin && origin === 'next') {
|
|
10715
|
-
setTimeout(() => {
|
|
10716
|
-
set(totalPages.value);
|
|
10717
|
-
}, 200);
|
|
10734
|
+
if (origin && origin === 'next') {
|
|
10735
|
+
setTimeout(() => {
|
|
10736
|
+
set(totalPages.value);
|
|
10737
|
+
}, 200);
|
|
10718
10738
|
}
|
|
10719
10739
|
|
|
10720
10740
|
if (!useBrowser.isApple && !useBrowser.isSafari) {
|
|
10721
10741
|
addEventListener('wheel', onWheel);
|
|
10722
10742
|
}
|
|
10723
10743
|
|
|
10724
|
-
setInterval(() => {
|
|
10725
|
-
updatePages();
|
|
10726
|
-
}, 5000);
|
|
10744
|
+
setInterval(() => {
|
|
10745
|
+
updatePages();
|
|
10746
|
+
}, 5000);
|
|
10727
10747
|
}
|
|
10728
10748
|
|
|
10729
10749
|
// when resizing the viewport, totalPages change
|
|
@@ -10735,10 +10755,10 @@ watch(totalPages, () => {
|
|
|
10735
10755
|
});
|
|
10736
10756
|
|
|
10737
10757
|
// navigate by increase/decrease value
|
|
10738
|
-
function next(usingScroll = false) {
|
|
10758
|
+
function next(usingScroll = false, source = 'next') {
|
|
10739
10759
|
if (!useReaderSettings.blocked.value) {
|
|
10740
|
-
if ((state.currentPage + 1) <= totalPages.value) {
|
|
10741
|
-
set(state.currentPage + 1);
|
|
10760
|
+
if ((state.currentPage + 1) <= totalPages.value) {
|
|
10761
|
+
set(state.currentPage + 1, source);
|
|
10742
10762
|
} else {
|
|
10743
10763
|
// prevent going too fast to next chapter on
|
|
10744
10764
|
// stronger scroll
|
|
@@ -10757,22 +10777,22 @@ function next(usingScroll = false) {
|
|
|
10757
10777
|
}
|
|
10758
10778
|
}
|
|
10759
10779
|
}
|
|
10760
|
-
onKeyStroke('ArrowRight', (e) => {
|
|
10761
|
-
e.preventDefault();
|
|
10762
|
-
next();
|
|
10780
|
+
onKeyStroke('ArrowRight', (e) => {
|
|
10781
|
+
e.preventDefault();
|
|
10782
|
+
next(false, 'keyboard');
|
|
10763
10783
|
});
|
|
10764
10784
|
|
|
10765
10785
|
function onWheel(event) {
|
|
10766
10786
|
if (event.wheelDelta < 0) {
|
|
10767
|
-
next(true);
|
|
10768
|
-
} else {
|
|
10769
|
-
prev(true);
|
|
10787
|
+
next(true, 'wheel');
|
|
10788
|
+
} else {
|
|
10789
|
+
prev(true, 'wheel');
|
|
10770
10790
|
}
|
|
10771
10791
|
}
|
|
10772
|
-
function prev(usingScroll = false) {
|
|
10792
|
+
function prev(usingScroll = false, source = 'previous') {
|
|
10773
10793
|
if (!useReaderSettings.blocked.value) {
|
|
10774
|
-
if ((state.currentPage - 1) > 0) {
|
|
10775
|
-
set(state.currentPage - 1);
|
|
10794
|
+
if ((state.currentPage - 1) > 0) {
|
|
10795
|
+
set(state.currentPage - 1, source);
|
|
10776
10796
|
} else {
|
|
10777
10797
|
// prevent going too fast to prev chapter on
|
|
10778
10798
|
// stronger scroll
|
|
@@ -10793,43 +10813,425 @@ function prev(usingScroll = false) {
|
|
|
10793
10813
|
}
|
|
10794
10814
|
onKeyStroke('ArrowLeft', (e) => {
|
|
10795
10815
|
e.preventDefault();
|
|
10796
|
-
prev();
|
|
10816
|
+
prev(false, 'keyboard');
|
|
10797
10817
|
});
|
|
10798
10818
|
|
|
10799
10819
|
// navigate to specific page
|
|
10800
|
-
function set(val) {
|
|
10820
|
+
function set(val, source = 'go-to-page') {
|
|
10801
10821
|
const page = Math.min(totalPages.value, Math.max(1, Number(val) || 1));
|
|
10822
|
+
state.changeSource = source;
|
|
10802
10823
|
state.currentPage = page;
|
|
10803
|
-
useReadingProgress.save(page, totalPages.value);
|
|
10804
|
-
}
|
|
10824
|
+
useReadingProgress.save(page, totalPages.value);
|
|
10825
|
+
}
|
|
10805
10826
|
|
|
10806
10827
|
const usePagination = {
|
|
10807
10828
|
currentPage,
|
|
10808
|
-
totalPages,
|
|
10829
|
+
totalPages,
|
|
10830
|
+
changeSource,
|
|
10809
10831
|
next,
|
|
10810
10832
|
prev,
|
|
10811
10833
|
init,
|
|
10812
10834
|
set
|
|
10813
10835
|
};
|
|
10814
10836
|
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10837
|
+
// Keep offsets into the original UTF-16 text so matches can become DOM Ranges.
|
|
10838
|
+
function normalizeSearchText(value) {
|
|
10839
|
+
let text = '';
|
|
10840
|
+
const starts = [];
|
|
10841
|
+
const ends = [];
|
|
10842
|
+
let offset = 0;
|
|
10843
|
+
for (const character of value) {
|
|
10844
|
+
const end = offset + character.length;
|
|
10845
|
+
const normalized = character.normalize('NFKD').replace(/\p{M}/gu, '').toLowerCase();
|
|
10846
|
+
if (!normalized && ends.length)
|
|
10847
|
+
ends[ends.length - 1] = end;
|
|
10848
|
+
for (const part of normalized) {
|
|
10849
|
+
const next = /[\p{L}\p{N}]/u.test(part) ? part : ' ';
|
|
10850
|
+
if (next === ' ' && text.endsWith(' ')) {
|
|
10851
|
+
ends[ends.length - 1] = end;
|
|
10852
|
+
continue
|
|
10853
|
+
}
|
|
10854
|
+
text += next;
|
|
10855
|
+
for (let index = 0; index < next.length; index++) {
|
|
10856
|
+
starts.push(offset);
|
|
10857
|
+
ends.push(end);
|
|
10858
|
+
}
|
|
10859
|
+
}
|
|
10860
|
+
offset = end;
|
|
10861
|
+
}
|
|
10862
|
+
return { text, starts, ends }
|
|
10863
|
+
}
|
|
10864
|
+
|
|
10865
|
+
// At most one insertion, deletion, substitution or adjacent transposition.
|
|
10866
|
+
function nearWord(left, right) {
|
|
10867
|
+
if (left === right)
|
|
10868
|
+
return true
|
|
10869
|
+
if (left.length < 5 || Math.abs(left.length - right.length) > 1)
|
|
10870
|
+
return false
|
|
10871
|
+
let index = 0;
|
|
10872
|
+
while (index < Math.min(left.length, right.length) && left[index] === right[index])
|
|
10873
|
+
index++;
|
|
10874
|
+
if (left.length === right.length) {
|
|
10875
|
+
return left.slice(index + 1) === right.slice(index + 1) || (
|
|
10876
|
+
left[index] === right[index + 1] && left[index + 1] === right[index] &&
|
|
10877
|
+
left.slice(index + 2) === right.slice(index + 2)
|
|
10878
|
+
)
|
|
10879
|
+
}
|
|
10880
|
+
return left.length > right.length
|
|
10881
|
+
? left.slice(index + 1) === right.slice(index)
|
|
10882
|
+
: left.slice(index) === right.slice(index + 1)
|
|
10883
|
+
}
|
|
10884
|
+
|
|
10885
|
+
function findSearchMatches(index, query) {
|
|
10886
|
+
const needle = normalizeSearchText(query).text.trim();
|
|
10887
|
+
if (!needle)
|
|
10888
|
+
return []
|
|
10889
|
+
const hits = [];
|
|
10890
|
+
let position = index.text.indexOf(needle);
|
|
10891
|
+
while (position !== -1) {
|
|
10892
|
+
hits.push({ start: position, end: position + needle.length });
|
|
10893
|
+
position = index.text.indexOf(needle, position + needle.length);
|
|
10894
|
+
}
|
|
10895
|
+
const words = needle.split(' ');
|
|
10896
|
+
const tokens = Array.from(index.text.matchAll(/[\p{L}\p{N}]+/gu));
|
|
10897
|
+
const exactCount = hits.length;
|
|
10898
|
+
let exactIndex = 0;
|
|
10899
|
+
for (let offset = 0; offset <= tokens.length - words.length; offset++) {
|
|
10900
|
+
const start = tokens[offset].index;
|
|
10901
|
+
const last = tokens[offset + words.length - 1];
|
|
10902
|
+
const end = last.index + last[0].length;
|
|
10903
|
+
while (exactIndex < exactCount && hits[exactIndex].end <= start)
|
|
10904
|
+
exactIndex++;
|
|
10905
|
+
if (exactIndex < exactCount && hits[exactIndex].start < end)
|
|
10906
|
+
continue
|
|
10907
|
+
if (words.every((word, part) => nearWord(word, tokens[offset + part][0])))
|
|
10908
|
+
hits.push({ start, end, approximate: true });
|
|
10909
|
+
}
|
|
10910
|
+
return hits.sort((left, right) => left.start - right.start)
|
|
10911
|
+
.map(hit => ({ start: index.starts[hit.start], end: index.ends[hit.end - 1] }))
|
|
10912
|
+
}
|
|
10913
|
+
|
|
10914
|
+
const searchKey = Symbol('paginarSearch');
|
|
10915
|
+
|
|
10916
|
+
// Walk the rendered slot tree as well as HTML loaded inside the shadow root.
|
|
10917
|
+
function indexContent(root) {
|
|
10918
|
+
let text = '';
|
|
10919
|
+
const nodes = [];
|
|
10920
|
+
function visit(node) {
|
|
10921
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
10922
|
+
nodes.push({ node, start: text.length, end: text.length + node.length });
|
|
10923
|
+
text += node.data;
|
|
10924
|
+
return
|
|
10925
|
+
}
|
|
10926
|
+
if (node.nodeType !== Node.ELEMENT_NODE)
|
|
10927
|
+
return
|
|
10928
|
+
if (node.matches('script, style, template, noscript, [hidden], [aria-hidden="true"]'))
|
|
10929
|
+
return
|
|
10930
|
+
const style = getComputedStyle(node);
|
|
10931
|
+
if (style.display === 'none' || style.visibility === 'hidden')
|
|
10932
|
+
return
|
|
10933
|
+
const separator = node.tagName === 'BR' || !['inline', 'contents'].includes(style.display);
|
|
10934
|
+
if (separator) text += ' ';
|
|
10935
|
+
const children = node.tagName === 'SLOT'
|
|
10936
|
+
? node.assignedNodes({ flatten: true })
|
|
10937
|
+
: node.childNodes;
|
|
10938
|
+
for (const child of children.length ? children : node.childNodes)
|
|
10939
|
+
visit(child);
|
|
10940
|
+
if (separator) text += ' ';
|
|
10941
|
+
}
|
|
10942
|
+
visit(root);
|
|
10943
|
+
return { ...normalizeSearchText(text), nodes }
|
|
10944
|
+
}
|
|
10945
|
+
|
|
10946
|
+
function rangeForMatch(index, match) {
|
|
10947
|
+
// Binary search keeps mapping a common word in a long chapter inexpensive.
|
|
10948
|
+
function findNode(offset) {
|
|
10949
|
+
let low = 0;
|
|
10950
|
+
let high = index.nodes.length - 1;
|
|
10951
|
+
while (low <= high) {
|
|
10952
|
+
const middle = (low + high) >> 1;
|
|
10953
|
+
const item = index.nodes[middle];
|
|
10954
|
+
if (offset < item.start) high = middle - 1;
|
|
10955
|
+
else if (offset >= item.end) low = middle + 1;
|
|
10956
|
+
else return item
|
|
10957
|
+
}
|
|
10958
|
+
}
|
|
10959
|
+
const first = findNode(match.start);
|
|
10960
|
+
const last = findNode(match.end - 1);
|
|
10961
|
+
if (!first || !last || first.node.getRootNode() !== last.node.getRootNode())
|
|
10962
|
+
return null
|
|
10963
|
+
const range = document.createRange();
|
|
10964
|
+
range.setStart(first.node, match.start - first.start);
|
|
10965
|
+
range.setEnd(last.node, match.end - last.start);
|
|
10966
|
+
return range
|
|
10967
|
+
}
|
|
10968
|
+
|
|
10969
|
+
function useSearch(root, viewport, content) {
|
|
10970
|
+
const enabled = ref(false);
|
|
10971
|
+
const open = ref(false);
|
|
10972
|
+
const query = ref('');
|
|
10973
|
+
const input = ref(null);
|
|
10974
|
+
const button = ref(null);
|
|
10975
|
+
const active = ref(-1);
|
|
10976
|
+
const total = ref(0);
|
|
10977
|
+
const geometry = shallowRef([]);
|
|
10978
|
+
const pageWidth = ref(0);
|
|
10979
|
+
const rectangles = computed(() => {
|
|
10980
|
+
if (!open.value) return []
|
|
10981
|
+
// Include adjacent pages so highlights accompany the sliding text.
|
|
10982
|
+
const left = (usePagination.currentPage.value - 2) * pageWidth.value;
|
|
10983
|
+
const right = (usePagination.currentPage.value + 1) * pageWidth.value;
|
|
10984
|
+
return geometry.value.filter(rect => rect.left < right && rect.right > left)
|
|
10985
|
+
.map(rect => ({ ...rect, active: rect.match === active.value }))
|
|
10986
|
+
});
|
|
10987
|
+
const pending = ref(false);
|
|
10988
|
+
let ranges = [];
|
|
10989
|
+
let index = null;
|
|
10990
|
+
let timer = null;
|
|
10991
|
+
let observer = null;
|
|
10992
|
+
let host = null;
|
|
10993
|
+
|
|
10994
|
+
function init(settingsString) {
|
|
10995
|
+
enabled.value = settingsString ? JSON.parse(settingsString).search === true : false;
|
|
10996
|
+
}
|
|
10997
|
+
|
|
10998
|
+
function measure() {
|
|
10999
|
+
const columns = viewport.value?.querySelector('.columnsArea');
|
|
11000
|
+
if (!open.value || !ranges.length || !columns) {
|
|
11001
|
+
geometry.value = [];
|
|
11002
|
+
return
|
|
11003
|
+
}
|
|
11004
|
+
const origin = columns.getBoundingClientRect();
|
|
11005
|
+
pageWidth.value = viewport.value.getBoundingClientRect().width;
|
|
11006
|
+
const measured = [];
|
|
11007
|
+
ranges.forEach((range, match) => {
|
|
11008
|
+
if (!range.startContainer.isConnected) return
|
|
11009
|
+
const seen = new Set();
|
|
11010
|
+
for (const rect of range.getClientRects()) {
|
|
11011
|
+
if (!rect.width || !rect.height) continue
|
|
11012
|
+
const key = `${rect.left},${rect.top},${rect.width},${rect.height}`;
|
|
11013
|
+
// Inline elements can yield the same rectangle as their text node.
|
|
11014
|
+
if (seen.has(key)) continue
|
|
11015
|
+
seen.add(key);
|
|
11016
|
+
measured.push({
|
|
11017
|
+
key: `${match}:${key}`, match,
|
|
11018
|
+
left: rect.left - origin.left, right: rect.right - origin.left,
|
|
11019
|
+
style: {
|
|
11020
|
+
left: `${rect.left - origin.left}px`, top: `${rect.top - origin.top}px`,
|
|
11021
|
+
width: `${rect.width}px`, height: `${rect.height}px`
|
|
11022
|
+
}
|
|
11023
|
+
});
|
|
11024
|
+
}
|
|
11025
|
+
});
|
|
11026
|
+
geometry.value = measured;
|
|
11027
|
+
}
|
|
11028
|
+
|
|
11029
|
+
function navigate(position) {
|
|
11030
|
+
if (!ranges.length || useReaderSettings.blocked.value)
|
|
11031
|
+
return
|
|
11032
|
+
active.value = (position + ranges.length) % ranges.length;
|
|
11033
|
+
const rect = geometry.value.find(rect => rect.match === active.value);
|
|
11034
|
+
if (rect && pageWidth.value)
|
|
11035
|
+
usePagination.set(Math.floor(Math.max(0, rect.left) / pageWidth.value) + 1, 'search');
|
|
11036
|
+
}
|
|
11037
|
+
|
|
11038
|
+
function run() {
|
|
11039
|
+
clearTimeout(timer);
|
|
11040
|
+
pending.value = false;
|
|
11041
|
+
if (!enabled.value || !open.value || !content.value)
|
|
11042
|
+
return
|
|
11043
|
+
index ||= indexContent(content.value);
|
|
11044
|
+
ranges = findSearchMatches(index, query.value)
|
|
11045
|
+
.map(match => rangeForMatch(index, match)).filter(Boolean);
|
|
11046
|
+
total.value = ranges.length;
|
|
11047
|
+
active.value = -1;
|
|
11048
|
+
measure();
|
|
11049
|
+
navigate(0);
|
|
11050
|
+
}
|
|
11051
|
+
|
|
11052
|
+
function schedule(invalidate = false) {
|
|
11053
|
+
if (invalidate) index = null;
|
|
11054
|
+
clearTimeout(timer);
|
|
11055
|
+
ranges = [];
|
|
11056
|
+
total.value = 0;
|
|
11057
|
+
active.value = -1;
|
|
11058
|
+
geometry.value = [];
|
|
11059
|
+
pending.value = open.value && Boolean(query.value.trim());
|
|
11060
|
+
if (pending.value) timer = setTimeout(run, 180);
|
|
11061
|
+
}
|
|
11062
|
+
|
|
11063
|
+
async function show() {
|
|
11064
|
+
if (!enabled.value || useReaderSettings.blocked.value)
|
|
11065
|
+
return
|
|
11066
|
+
open.value = true;
|
|
11067
|
+
run();
|
|
11068
|
+
await nextTick();
|
|
11069
|
+
input.value?.focus({ preventScroll: true });
|
|
11070
|
+
input.value?.select();
|
|
11071
|
+
}
|
|
11072
|
+
|
|
11073
|
+
function close() {
|
|
11074
|
+
open.value = false;
|
|
11075
|
+
clearTimeout(timer);
|
|
11076
|
+
pending.value = false;
|
|
11077
|
+
geometry.value = [];
|
|
11078
|
+
button.value?.focus({ preventScroll: true });
|
|
11079
|
+
}
|
|
11080
|
+
|
|
11081
|
+
function step(direction) {
|
|
11082
|
+
if (pending.value) run();
|
|
11083
|
+
else navigate(active.value + direction);
|
|
11084
|
+
}
|
|
11085
|
+
|
|
11086
|
+
function onKeydown(event) {
|
|
11087
|
+
if (!enabled.value || event.defaultPrevented)
|
|
11088
|
+
return
|
|
11089
|
+
const path = event.composedPath();
|
|
11090
|
+
const otherReader = path.find(node => node?.tagName === 'PAGINATE-CONTENT');
|
|
11091
|
+
if (otherReader && otherReader !== host)
|
|
11092
|
+
return
|
|
11093
|
+
if (event.key === 'Escape' && open.value) {
|
|
11094
|
+
event.preventDefault();
|
|
11095
|
+
close();
|
|
11096
|
+
} else if ((event.ctrlKey || event.metaKey) && !event.altKey && event.key.toLowerCase() === 'f') {
|
|
11097
|
+
// Keep browser find available in unrelated editing fields on the host page.
|
|
11098
|
+
if (!path.includes(host) && path.some(node =>
|
|
11099
|
+
node?.matches?.('input, textarea, select, [contenteditable="true"]')))
|
|
11100
|
+
return
|
|
11101
|
+
if (useReaderSettings.blocked.value || !host?.getClientRects().length)
|
|
11102
|
+
return
|
|
11103
|
+
event.preventDefault();
|
|
11104
|
+
show();
|
|
11105
|
+
}
|
|
11106
|
+
}
|
|
11107
|
+
|
|
11108
|
+
onMounted(() => {
|
|
11109
|
+
host = root.value.getRootNode().host;
|
|
11110
|
+
window.addEventListener('keydown', onKeydown, true);
|
|
11111
|
+
observer = new MutationObserver(() => schedule(true));
|
|
11112
|
+
observer.observe(content.value, { subtree: true, childList: true, characterData: true });
|
|
11113
|
+
if (host) observer.observe(host, { subtree: true, childList: true, characterData: true });
|
|
11114
|
+
content.value.addEventListener('slotchange', invalidate);
|
|
11115
|
+
});
|
|
11116
|
+
function invalidate() { schedule(true); }
|
|
11117
|
+
onBeforeUnmount(() => {
|
|
11118
|
+
clearTimeout(timer);
|
|
11119
|
+
observer?.disconnect();
|
|
11120
|
+
window.removeEventListener('keydown', onKeydown, true);
|
|
11121
|
+
content.value?.removeEventListener('slotchange', invalidate);
|
|
11122
|
+
ranges = [];
|
|
11123
|
+
index = null;
|
|
11124
|
+
});
|
|
11125
|
+
watch(query, () => schedule());
|
|
11126
|
+
watch(useReaderSettings.blocked, blocked => {
|
|
11127
|
+
if (!blocked && open.value && active.value < 0)
|
|
11128
|
+
navigate(0);
|
|
11129
|
+
});
|
|
11130
|
+
return {
|
|
11131
|
+
enabled, open, query, input, button, active, total, rectangles, pending,
|
|
11132
|
+
init, show, close, step, measure,
|
|
11133
|
+
status: computed(() => pending.value ? 'Buscando…' : total.value
|
|
11134
|
+
? `${active.value >= 0 ? `${active.value + 1} de ` : ''}${total.value} ${total.value === 1 ? 'ocorrência' : 'ocorrências'}`
|
|
11135
|
+
: query.value.trim() ? 'Nenhuma ocorrência' : 'Digite para buscar')
|
|
11136
|
+
}
|
|
11137
|
+
}
|
|
11138
|
+
|
|
11139
|
+
const _export_sfc = (sfc, props) => {
|
|
11140
|
+
const target = sfc.__vccOpts || sfc;
|
|
11141
|
+
for (const [key, val] of props) {
|
|
11142
|
+
target[key] = val;
|
|
11143
|
+
}
|
|
11144
|
+
return target;
|
|
11145
|
+
};
|
|
11146
|
+
|
|
11147
|
+
const _sfc_main$u = {};
|
|
11148
|
+
|
|
11149
|
+
const _hoisted_1$s = {
|
|
11150
|
+
fill: "none",
|
|
11151
|
+
stroke: "currentColor",
|
|
11152
|
+
viewBox: "0 0 20 22",
|
|
11153
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11154
|
+
};
|
|
11155
|
+
|
|
11156
|
+
function _sfc_render$c(_ctx, _cache) {
|
|
11157
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$s, [...(_cache[0] || (_cache[0] = [
|
|
11158
|
+
createBaseVNode("path", {
|
|
11159
|
+
d: "M1 8L10 1L19 8V19C19 19.5304 18.7893 20.0391 18.4142 20.4142C18.0391 20.7893 17.5304 21 17 21H3C2.46957 21 1.96086 20.7893 1.58579 20.4142C1.21071 20.0391 1 19.5304 1 19V8Z",
|
|
11160
|
+
"stroke-width": "2",
|
|
11161
|
+
"stroke-linecap": "round",
|
|
11162
|
+
"stroke-linejoin": "round"
|
|
11163
|
+
}, null, -1),
|
|
11164
|
+
createBaseVNode("path", {
|
|
11165
|
+
d: "M7 21V11H13V21",
|
|
11166
|
+
"stroke-width": "2",
|
|
11167
|
+
"stroke-linecap": "round",
|
|
11168
|
+
"stroke-linejoin": "round"
|
|
11169
|
+
}, null, -1)
|
|
11170
|
+
]))]))
|
|
11171
|
+
}
|
|
11172
|
+
const IconHome = /*#__PURE__*/_export_sfc(_sfc_main$u, [['render',_sfc_render$c]]);
|
|
11173
|
+
|
|
11174
|
+
const _sfc_main$t = {};
|
|
11175
|
+
|
|
11176
|
+
const _hoisted_1$r = {
|
|
11177
|
+
fill: "none",
|
|
11178
|
+
stroke: "currentColor",
|
|
11179
|
+
viewBox: "0 0 24 24",
|
|
11180
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11181
|
+
};
|
|
11182
|
+
|
|
11183
|
+
function _sfc_render$b(_ctx, _cache) {
|
|
11184
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$r, [...(_cache[0] || (_cache[0] = [
|
|
11185
|
+
createBaseVNode("path", {
|
|
11186
|
+
"stroke-linecap": "round",
|
|
11187
|
+
"stroke-linejoin": "round",
|
|
11188
|
+
"stroke-width": "2",
|
|
11189
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
11190
|
+
}, null, -1)
|
|
11191
|
+
]))]))
|
|
11192
|
+
}
|
|
11193
|
+
const IconClose = /*#__PURE__*/_export_sfc(_sfc_main$t, [['render',_sfc_render$b]]);
|
|
11194
|
+
|
|
11195
|
+
const _sfc_main$s = {};
|
|
11196
|
+
|
|
11197
|
+
const _hoisted_1$q = {
|
|
11198
|
+
width: "24",
|
|
11199
|
+
height: "19",
|
|
11200
|
+
viewBox: "0 0 24 19",
|
|
11201
|
+
fill: "none",
|
|
11202
|
+
stroke: "currentColor",
|
|
11203
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11204
|
+
};
|
|
11205
|
+
|
|
11206
|
+
function _sfc_render$a(_ctx, _cache) {
|
|
11207
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$q, [...(_cache[0] || (_cache[0] = [
|
|
11208
|
+
createStaticVNode("<line x1=\"5\" y1=\"1.08447\" x2=\"1\" y2=\"1.08447\" stroke-width=\"2\" stroke-linecap=\"round\"></line><line x1=\"23\" y1=\"1.04248\" x2=\"11\" y2=\"1.04248\" stroke-width=\"2\" stroke-linecap=\"round\"></line><line x1=\"23\" y1=\"9.08447\" x2=\"14\" y2=\"9.08447\" stroke-width=\"2\" stroke-linecap=\"round\"></line><line x1=\"8\" y1=\"9.14905\" x2=\"4\" y2=\"9.14905\" stroke-width=\"2\" stroke-linecap=\"round\"></line><line x1=\"23\" y1=\"17.149\" x2=\"10.9993\" y2=\"17.149\" stroke-width=\"2\" stroke-linecap=\"round\"></line><line x1=\"5\" y1=\"17.2429\" x2=\"1\" y2=\"17.2429\" stroke-width=\"2\" stroke-linecap=\"round\"></line>", 6)
|
|
11209
|
+
]))]))
|
|
11210
|
+
}
|
|
11211
|
+
const IconSummary = /*#__PURE__*/_export_sfc(_sfc_main$s, [['render',_sfc_render$a]]);
|
|
11212
|
+
|
|
11213
|
+
const publicEventKey = Symbol('paginarPublicEvent');
|
|
11214
|
+
|
|
11215
|
+
const _hoisted_1$p = ["role"];
|
|
11216
|
+
const _hoisted_2$d = { class: "summary-menu-dropdown-item-title" };
|
|
11217
|
+
const _hoisted_3$6 = {
|
|
10818
11218
|
key: 0,
|
|
10819
11219
|
class: "summary-menu-dropdown-item-author"
|
|
10820
11220
|
};
|
|
10821
11221
|
|
|
10822
|
-
const _sfc_main$
|
|
11222
|
+
const _sfc_main$r = {
|
|
10823
11223
|
__name: 'SummaryDropdown',
|
|
10824
11224
|
setup(__props) {
|
|
10825
|
-
|
|
11225
|
+
|
|
10826
11226
|
const { summary } = useTextContent;
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
useTextContent.
|
|
10831
|
-
|
|
10832
|
-
|
|
11227
|
+
const publicEvent = inject(publicEventKey, () => {});
|
|
11228
|
+
|
|
11229
|
+
async function getChapter(item) {
|
|
11230
|
+
const text = await useTextContent.getContent(item.file);
|
|
11231
|
+
useTextContent.applyContent(text, item);
|
|
11232
|
+
usePagination.set(1, 'summary');
|
|
11233
|
+
publicEvent('chapter-change', { chapter: { ...item } });
|
|
11234
|
+
}
|
|
10833
11235
|
|
|
10834
11236
|
return (_ctx, _cache) => {
|
|
10835
11237
|
return (openBlock(), createElementBlock("div", {
|
|
@@ -10850,9 +11252,9 @@ return (_ctx, _cache) => {
|
|
|
10850
11252
|
onClick: $event => (item.file ? getChapter(item) : null)
|
|
10851
11253
|
}, {
|
|
10852
11254
|
default: withCtx(() => [
|
|
10853
|
-
createBaseVNode("span", _hoisted_2$
|
|
11255
|
+
createBaseVNode("span", _hoisted_2$d, toDisplayString(item.title), 1),
|
|
10854
11256
|
(item.author)
|
|
10855
|
-
? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
11257
|
+
? (openBlock(), createElementBlock("span", _hoisted_3$6, toDisplayString(item.author), 1))
|
|
10856
11258
|
: createCommentVNode("", true)
|
|
10857
11259
|
]),
|
|
10858
11260
|
_: 2
|
|
@@ -10860,19 +11262,19 @@ return (_ctx, _cache) => {
|
|
|
10860
11262
|
}), 128)),
|
|
10861
11263
|
renderSlot(_ctx.$slots, "summaryBottom")
|
|
10862
11264
|
])
|
|
10863
|
-
], 8, _hoisted_1$
|
|
11265
|
+
], 8, _hoisted_1$p))
|
|
10864
11266
|
}
|
|
10865
11267
|
}
|
|
10866
11268
|
|
|
10867
11269
|
};
|
|
10868
11270
|
|
|
10869
|
-
const _hoisted_1$
|
|
10870
|
-
const _hoisted_2$
|
|
10871
|
-
const _hoisted_3$
|
|
10872
|
-
const _hoisted_4$
|
|
11271
|
+
const _hoisted_1$o = { class: "flex" };
|
|
11272
|
+
const _hoisted_2$c = ["href"];
|
|
11273
|
+
const _hoisted_3$5 = { class: "position-relative" };
|
|
11274
|
+
const _hoisted_4$3 = ["aria-expanded"];
|
|
10873
11275
|
|
|
10874
11276
|
|
|
10875
|
-
const _sfc_main$
|
|
11277
|
+
const _sfc_main$q = {
|
|
10876
11278
|
__name: 'SummaryButton',
|
|
10877
11279
|
setup(__props) {
|
|
10878
11280
|
|
|
@@ -10880,15 +11282,18 @@ const show = ref(false);
|
|
|
10880
11282
|
const button = ref(null);
|
|
10881
11283
|
|
|
10882
11284
|
const { homeUrl } = useReaderSettings;
|
|
11285
|
+
const publicEvent = inject(publicEventKey, () => {});
|
|
10883
11286
|
|
|
10884
11287
|
const toggleSummary = () => {
|
|
10885
11288
|
show.value = !show.value;
|
|
10886
11289
|
useReaderSettings.setBlocked(show.value);
|
|
11290
|
+
publicEvent('summary-toggle', { open: show.value });
|
|
10887
11291
|
};
|
|
10888
11292
|
const hide = () => {
|
|
10889
|
-
if (!useReaderSettings.blocked.value) {
|
|
11293
|
+
if (show.value && !useReaderSettings.blocked.value) {
|
|
10890
11294
|
show.value = false;
|
|
10891
11295
|
useReaderSettings.setBlocked(false);
|
|
11296
|
+
publicEvent('summary-toggle', { open: false });
|
|
10892
11297
|
}
|
|
10893
11298
|
};
|
|
10894
11299
|
|
|
@@ -10902,7 +11307,7 @@ return (_ctx, _cache) => {
|
|
|
10902
11307
|
ref: button,
|
|
10903
11308
|
class: "relative"
|
|
10904
11309
|
}, [
|
|
10905
|
-
createBaseVNode("div", _hoisted_1$
|
|
11310
|
+
createBaseVNode("div", _hoisted_1$o, [
|
|
10906
11311
|
(unref(homeUrl))
|
|
10907
11312
|
? (openBlock(), createElementBlock("a", {
|
|
10908
11313
|
key: 0,
|
|
@@ -10912,9 +11317,9 @@ return (_ctx, _cache) => {
|
|
|
10912
11317
|
class: "hidden md:flex items-center border p-3 shadow mr-3 border-white text-white"
|
|
10913
11318
|
}, [
|
|
10914
11319
|
createVNode(IconHome, { class: "w-6 h-6" })
|
|
10915
|
-
], 8, _hoisted_2$
|
|
11320
|
+
], 8, _hoisted_2$c))
|
|
10916
11321
|
: createCommentVNode("", true),
|
|
10917
|
-
createBaseVNode("div", _hoisted_3$
|
|
11322
|
+
createBaseVNode("div", _hoisted_3$5, [
|
|
10918
11323
|
createBaseVNode("button", {
|
|
10919
11324
|
onClick: _cache[0] || (_cache[0] = withModifiers($event => (toggleSummary()), ["prevent"])),
|
|
10920
11325
|
class: "border p-3 shadow flex items-center border-white text-white",
|
|
@@ -10929,7 +11334,7 @@ return (_ctx, _cache) => {
|
|
|
10929
11334
|
class: "w-6 h-6"
|
|
10930
11335
|
})),
|
|
10931
11336
|
_cache[1] || (_cache[1] = createBaseVNode("span", { class: "block ml-3" }, " Sumário ", -1))
|
|
10932
|
-
], 8, _hoisted_4$
|
|
11337
|
+
], 8, _hoisted_4$3),
|
|
10933
11338
|
createVNode(Transition, {
|
|
10934
11339
|
"enter-active-class": "transition ease-out duration-100 transform",
|
|
10935
11340
|
"enter-class": "opacity-0 scale-95",
|
|
@@ -10940,7 +11345,7 @@ return (_ctx, _cache) => {
|
|
|
10940
11345
|
}, {
|
|
10941
11346
|
default: withCtx(() => [
|
|
10942
11347
|
(show.value)
|
|
10943
|
-
? (openBlock(), createBlock(_sfc_main$
|
|
11348
|
+
? (openBlock(), createBlock(_sfc_main$r, { key: 0 }, {
|
|
10944
11349
|
summaryTop: withCtx(() => [
|
|
10945
11350
|
renderSlot(_ctx.$slots, "summaryTop")
|
|
10946
11351
|
]),
|
|
@@ -10961,9 +11366,9 @@ return (_ctx, _cache) => {
|
|
|
10961
11366
|
|
|
10962
11367
|
};
|
|
10963
11368
|
|
|
10964
|
-
const _sfc_main$
|
|
11369
|
+
const _sfc_main$p = {};
|
|
10965
11370
|
|
|
10966
|
-
const _hoisted_1$
|
|
11371
|
+
const _hoisted_1$n = {
|
|
10967
11372
|
fill: "none",
|
|
10968
11373
|
stroke: "currentColor",
|
|
10969
11374
|
viewBox: "0 0 24 24",
|
|
@@ -10971,7 +11376,7 @@ const _hoisted_1$m = {
|
|
|
10971
11376
|
};
|
|
10972
11377
|
|
|
10973
11378
|
function _sfc_render$9(_ctx, _cache) {
|
|
10974
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
11379
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$n, [...(_cache[0] || (_cache[0] = [
|
|
10975
11380
|
createBaseVNode("path", {
|
|
10976
11381
|
"stroke-linecap": "round",
|
|
10977
11382
|
"stroke-linejoin": "round",
|
|
@@ -10980,11 +11385,11 @@ function _sfc_render$9(_ctx, _cache) {
|
|
|
10980
11385
|
}, null, -1)
|
|
10981
11386
|
]))]))
|
|
10982
11387
|
}
|
|
10983
|
-
const IconThreeDots = /*#__PURE__*/_export_sfc(_sfc_main$
|
|
11388
|
+
const IconThreeDots = /*#__PURE__*/_export_sfc(_sfc_main$p, [['render',_sfc_render$9]]);
|
|
10984
11389
|
|
|
10985
|
-
const _sfc_main$
|
|
11390
|
+
const _sfc_main$o = {};
|
|
10986
11391
|
|
|
10987
|
-
const _hoisted_1$
|
|
11392
|
+
const _hoisted_1$m = {
|
|
10988
11393
|
fill: "none",
|
|
10989
11394
|
stroke: "currentColor",
|
|
10990
11395
|
viewBox: "0 0 24 24",
|
|
@@ -10992,7 +11397,7 @@ const _hoisted_1$l = {
|
|
|
10992
11397
|
};
|
|
10993
11398
|
|
|
10994
11399
|
function _sfc_render$8(_ctx, _cache) {
|
|
10995
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
11400
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$m, [...(_cache[0] || (_cache[0] = [
|
|
10996
11401
|
createBaseVNode("path", {
|
|
10997
11402
|
"stroke-linecap": "round",
|
|
10998
11403
|
"stroke-linejoin": "round",
|
|
@@ -11001,11 +11406,11 @@ function _sfc_render$8(_ctx, _cache) {
|
|
|
11001
11406
|
}, null, -1)
|
|
11002
11407
|
]))]))
|
|
11003
11408
|
}
|
|
11004
|
-
const IconExpand = /*#__PURE__*/_export_sfc(_sfc_main$
|
|
11409
|
+
const IconExpand = /*#__PURE__*/_export_sfc(_sfc_main$o, [['render',_sfc_render$8]]);
|
|
11005
11410
|
|
|
11006
|
-
const _sfc_main$
|
|
11411
|
+
const _sfc_main$n = {};
|
|
11007
11412
|
|
|
11008
|
-
const _hoisted_1$
|
|
11413
|
+
const _hoisted_1$l = {
|
|
11009
11414
|
fill: "none",
|
|
11010
11415
|
stroke: "currentColor",
|
|
11011
11416
|
viewBox: "0 0 24 24",
|
|
@@ -11013,7 +11418,7 @@ const _hoisted_1$k = {
|
|
|
11013
11418
|
};
|
|
11014
11419
|
|
|
11015
11420
|
function _sfc_render$7(_ctx, _cache) {
|
|
11016
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
11421
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$l, [...(_cache[0] || (_cache[0] = [
|
|
11017
11422
|
createBaseVNode("path", {
|
|
11018
11423
|
"stroke-linecap": "round",
|
|
11019
11424
|
"stroke-linejoin": "round",
|
|
@@ -11028,11 +11433,11 @@ function _sfc_render$7(_ctx, _cache) {
|
|
|
11028
11433
|
}, null, -1)
|
|
11029
11434
|
]))]))
|
|
11030
11435
|
}
|
|
11031
|
-
const IconEye = /*#__PURE__*/_export_sfc(_sfc_main$
|
|
11436
|
+
const IconEye = /*#__PURE__*/_export_sfc(_sfc_main$n, [['render',_sfc_render$7]]);
|
|
11032
11437
|
|
|
11033
|
-
const _sfc_main$
|
|
11438
|
+
const _sfc_main$m = {};
|
|
11034
11439
|
|
|
11035
|
-
const _hoisted_1$
|
|
11440
|
+
const _hoisted_1$k = {
|
|
11036
11441
|
fill: "none",
|
|
11037
11442
|
stroke: "currentColor",
|
|
11038
11443
|
viewBox: "0 0 24 24",
|
|
@@ -11040,7 +11445,7 @@ const _hoisted_1$j = {
|
|
|
11040
11445
|
};
|
|
11041
11446
|
|
|
11042
11447
|
function _sfc_render$6(_ctx, _cache) {
|
|
11043
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
11448
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$k, [...(_cache[0] || (_cache[0] = [
|
|
11044
11449
|
createBaseVNode("path", {
|
|
11045
11450
|
"stroke-linecap": "round",
|
|
11046
11451
|
"stroke-linejoin": "round",
|
|
@@ -11049,43 +11454,43 @@ function _sfc_render$6(_ctx, _cache) {
|
|
|
11049
11454
|
}, null, -1)
|
|
11050
11455
|
]))]))
|
|
11051
11456
|
}
|
|
11052
|
-
const IconFootnote = /*#__PURE__*/_export_sfc(_sfc_main$
|
|
11457
|
+
const IconFootnote = /*#__PURE__*/_export_sfc(_sfc_main$m, [['render',_sfc_render$6]]);
|
|
11053
11458
|
|
|
11054
|
-
const _sfc_main$
|
|
11459
|
+
const _sfc_main$l = {};
|
|
11055
11460
|
|
|
11056
|
-
const _hoisted_1$
|
|
11461
|
+
const _hoisted_1$j = {
|
|
11057
11462
|
viewBox: "0 0 341.5 441.2",
|
|
11058
11463
|
fill: "currentColor"
|
|
11059
11464
|
};
|
|
11060
11465
|
|
|
11061
11466
|
function _sfc_render$5(_ctx, _cache) {
|
|
11062
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
11467
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$j, [...(_cache[0] || (_cache[0] = [
|
|
11063
11468
|
createStaticVNode("<rect data-v-acadaaca=\"\" x=\"73.2\" y=\"143.7\" width=\"195.2\" height=\"20\"></rect><rect data-v-acadaaca=\"\" x=\"73.2\" y=\"82.7\" width=\"195.2\" height=\"20\"></rect><rect data-v-acadaaca=\"\" x=\"73.2\" y=\"203.7\" width=\"195.2\" height=\"20\"></rect><rect data-v-acadaaca=\"\" x=\"73.2\" y=\"263.7\" width=\"195.2\" height=\"20\"></rect><rect data-v-acadaaca=\"\" x=\"73.2\" y=\"319\" width=\"195.2\" height=\"20\"></rect><rect data-v-acadaaca=\"\" x=\"0\" y=\"-0.6\" width=\"332.3\" height=\"15\"></rect><rect data-v-acadaaca=\"\" x=\"0\" y=\"426.2\" width=\"332.3\" height=\"15\"></rect><rect data-v-acadaaca=\"\" x=\"-209.4\" y=\"216.2\" transform=\"matrix(6.123234e-17 -1 1 6.123234e-17 -216.2339 231.2339)\" width=\"433.7\" height=\"15\"></rect><rect data-v-acadaaca=\"\" x=\"108\" y=\"211.9\" transform=\"matrix(6.123234e-17 -1 1 6.123234e-17 105.4808 544.1859)\" width=\"433.7\" height=\"15\"></rect>", 9)
|
|
11064
11469
|
]))]))
|
|
11065
11470
|
}
|
|
11066
|
-
const SingleColumn = /*#__PURE__*/_export_sfc(_sfc_main$
|
|
11471
|
+
const SingleColumn = /*#__PURE__*/_export_sfc(_sfc_main$l, [['render',_sfc_render$5]]);
|
|
11067
11472
|
|
|
11068
|
-
const _sfc_main$
|
|
11473
|
+
const _sfc_main$k = {};
|
|
11069
11474
|
|
|
11070
|
-
const _hoisted_1$
|
|
11475
|
+
const _hoisted_1$i = {
|
|
11071
11476
|
viewBox: "0 0 653 441.2",
|
|
11072
11477
|
fill: "currentColor"
|
|
11073
11478
|
};
|
|
11074
11479
|
|
|
11075
11480
|
function _sfc_render$4(_ctx, _cache) {
|
|
11076
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
11481
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$i, [...(_cache[0] || (_cache[0] = [
|
|
11077
11482
|
createStaticVNode("<rect x=\"73.2\" y=\"143.7\" width=\"195.2\" height=\"20\"></rect><rect x=\"73.2\" y=\"82.7\" width=\"195.2\" height=\"20\"></rect><rect x=\"73.2\" y=\"203.7\" width=\"195.2\" height=\"20\"></rect><rect x=\"73.2\" y=\"263.7\" width=\"195.2\" height=\"20\"></rect><rect x=\"73.2\" y=\"319\" width=\"195.2\" height=\"20\"></rect><rect x=\"384.7\" y=\"143.7\" width=\"195.2\" height=\"20\"></rect><rect x=\"384.7\" y=\"82.7\" width=\"195.2\" height=\"20\"></rect><rect x=\"384.7\" y=\"203.7\" width=\"195.2\" height=\"20\"></rect><rect x=\"384.7\" y=\"263.7\" width=\"195.2\" height=\"20\"></rect><rect x=\"384.7\" y=\"319\" width=\"195.2\" height=\"20\"></rect><path d=\"M0-0.6v7.5v7.5v411.8v14.4v0.6h653v-5v-10V14.4V2.5v-3.1H0z M638,426.2H15V14.4h623V426.2z\"></path>", 11)
|
|
11078
11483
|
]))]))
|
|
11079
11484
|
}
|
|
11080
|
-
const DoubleColumn = /*#__PURE__*/_export_sfc(_sfc_main$
|
|
11485
|
+
const DoubleColumn = /*#__PURE__*/_export_sfc(_sfc_main$k, [['render',_sfc_render$4]]);
|
|
11081
11486
|
|
|
11082
|
-
const _hoisted_1$
|
|
11487
|
+
const _hoisted_1$h = {
|
|
11083
11488
|
id: "columns-menu",
|
|
11084
11489
|
class: "w-full hidden md:grid grid-cols-3 gap-2 mt-3"
|
|
11085
11490
|
};
|
|
11086
|
-
const _hoisted_2$
|
|
11491
|
+
const _hoisted_2$b = ["title"];
|
|
11087
11492
|
|
|
11088
|
-
const _sfc_main$
|
|
11493
|
+
const _sfc_main$j = {
|
|
11089
11494
|
__name: 'OptionsColumns',
|
|
11090
11495
|
setup(__props) {
|
|
11091
11496
|
|
|
@@ -11099,7 +11504,7 @@ const isSafari = computed(() => {
|
|
|
11099
11504
|
|
|
11100
11505
|
|
|
11101
11506
|
return (_ctx, _cache) => {
|
|
11102
|
-
return (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11507
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
11103
11508
|
createBaseVNode("button", {
|
|
11104
11509
|
id: "single-column-button",
|
|
11105
11510
|
class: normalizeClass(["col-span-1 text-primary text-center cursor-pointer py-3 rounded-sm border", {
|
|
@@ -11112,7 +11517,7 @@ return (_ctx, _cache) => {
|
|
|
11112
11517
|
title: isSafari.value ? 'O navegador Safari não aceita visualização de coluna única.' : 'Coluna única'
|
|
11113
11518
|
}, [
|
|
11114
11519
|
createVNode(SingleColumn, { class: "mx-auto h-10 opacity-75" })
|
|
11115
|
-
], 10, _hoisted_2$
|
|
11520
|
+
], 10, _hoisted_2$b),
|
|
11116
11521
|
createBaseVNode("button", {
|
|
11117
11522
|
id: "double-column-button",
|
|
11118
11523
|
class: normalizeClass(["col-span-2 text-primary text-center cursor-pointer py-3 rounded-sm border", {
|
|
@@ -11135,13 +11540,13 @@ return (_ctx, _cache) => {
|
|
|
11135
11540
|
|
|
11136
11541
|
};
|
|
11137
11542
|
|
|
11138
|
-
const _hoisted_1$
|
|
11543
|
+
const _hoisted_1$g = {
|
|
11139
11544
|
id: "font-family-menu",
|
|
11140
11545
|
class: "w-full grid grid-cols-4 gap-2 my-3"
|
|
11141
11546
|
};
|
|
11142
|
-
const _hoisted_2$
|
|
11547
|
+
const _hoisted_2$a = ["onClick", "title"];
|
|
11143
11548
|
|
|
11144
|
-
const _sfc_main$
|
|
11549
|
+
const _sfc_main$i = {
|
|
11145
11550
|
__name: 'OptionsFontFamily',
|
|
11146
11551
|
setup(__props) {
|
|
11147
11552
|
|
|
@@ -11149,7 +11554,7 @@ const { textFont, fontsOptions, setTextFont } = useReaderSettings;
|
|
|
11149
11554
|
|
|
11150
11555
|
|
|
11151
11556
|
return (_ctx, _cache) => {
|
|
11152
|
-
return (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11557
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
11153
11558
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(fontsOptions), (font) => {
|
|
11154
11559
|
return (openBlock(), createElementBlock("button", {
|
|
11155
11560
|
key: font.name,
|
|
@@ -11159,7 +11564,7 @@ return (_ctx, _cache) => {
|
|
|
11159
11564
|
}]),
|
|
11160
11565
|
style: normalizeStyle(`font-family: ${font.name}`),
|
|
11161
11566
|
title: font.label ?? font.name
|
|
11162
|
-
}, " Ff ", 14, _hoisted_2$
|
|
11567
|
+
}, " Ff ", 14, _hoisted_2$a))
|
|
11163
11568
|
}), 128))
|
|
11164
11569
|
]))
|
|
11165
11570
|
}
|
|
@@ -11167,7 +11572,7 @@ return (_ctx, _cache) => {
|
|
|
11167
11572
|
|
|
11168
11573
|
};
|
|
11169
11574
|
|
|
11170
|
-
const _sfc_main$
|
|
11575
|
+
const _sfc_main$h = {
|
|
11171
11576
|
__name: 'OptionsFontSize',
|
|
11172
11577
|
setup(__props) {
|
|
11173
11578
|
|
|
@@ -11192,9 +11597,9 @@ return (_ctx, _cache) => {
|
|
|
11192
11597
|
|
|
11193
11598
|
};
|
|
11194
11599
|
|
|
11195
|
-
const _sfc_main$
|
|
11600
|
+
const _sfc_main$g = {};
|
|
11196
11601
|
|
|
11197
|
-
const _hoisted_1$
|
|
11602
|
+
const _hoisted_1$f = {
|
|
11198
11603
|
fill: "none",
|
|
11199
11604
|
stroke: "currentColor",
|
|
11200
11605
|
viewBox: "0 0 24 24",
|
|
@@ -11202,7 +11607,7 @@ const _hoisted_1$e = {
|
|
|
11202
11607
|
};
|
|
11203
11608
|
|
|
11204
11609
|
function _sfc_render$3(_ctx, _cache) {
|
|
11205
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
11610
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$f, [...(_cache[0] || (_cache[0] = [
|
|
11206
11611
|
createBaseVNode("path", {
|
|
11207
11612
|
"stroke-linecap": "round",
|
|
11208
11613
|
"stroke-linejoin": "round",
|
|
@@ -11211,11 +11616,11 @@ function _sfc_render$3(_ctx, _cache) {
|
|
|
11211
11616
|
}, null, -1)
|
|
11212
11617
|
]))]))
|
|
11213
11618
|
}
|
|
11214
|
-
const IconSun = /*#__PURE__*/_export_sfc(_sfc_main$
|
|
11619
|
+
const IconSun = /*#__PURE__*/_export_sfc(_sfc_main$g, [['render',_sfc_render$3]]);
|
|
11215
11620
|
|
|
11216
|
-
const _sfc_main$
|
|
11621
|
+
const _sfc_main$f = {};
|
|
11217
11622
|
|
|
11218
|
-
const _hoisted_1$
|
|
11623
|
+
const _hoisted_1$e = {
|
|
11219
11624
|
fill: "none",
|
|
11220
11625
|
stroke: "currentColor",
|
|
11221
11626
|
viewBox: "0 0 24 24",
|
|
@@ -11223,7 +11628,7 @@ const _hoisted_1$d = {
|
|
|
11223
11628
|
};
|
|
11224
11629
|
|
|
11225
11630
|
function _sfc_render$2(_ctx, _cache) {
|
|
11226
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
11631
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$e, [...(_cache[0] || (_cache[0] = [
|
|
11227
11632
|
createBaseVNode("path", {
|
|
11228
11633
|
"stroke-linecap": "round",
|
|
11229
11634
|
"stroke-linejoin": "round",
|
|
@@ -11232,9 +11637,9 @@ function _sfc_render$2(_ctx, _cache) {
|
|
|
11232
11637
|
}, null, -1)
|
|
11233
11638
|
]))]))
|
|
11234
11639
|
}
|
|
11235
|
-
const IconMoon = /*#__PURE__*/_export_sfc(_sfc_main$
|
|
11640
|
+
const IconMoon = /*#__PURE__*/_export_sfc(_sfc_main$f, [['render',_sfc_render$2]]);
|
|
11236
11641
|
|
|
11237
|
-
const _sfc_main$
|
|
11642
|
+
const _sfc_main$e = {
|
|
11238
11643
|
__name: 'OptionsColor',
|
|
11239
11644
|
setup(__props) {
|
|
11240
11645
|
|
|
@@ -11269,18 +11674,18 @@ return (_ctx, _cache) => {
|
|
|
11269
11674
|
|
|
11270
11675
|
};
|
|
11271
11676
|
|
|
11272
|
-
const _hoisted_1$
|
|
11273
|
-
const _hoisted_2$
|
|
11274
|
-
|
|
11677
|
+
const _hoisted_1$d = { class: "w-full border-t border-areia mt-5 pt-5" };
|
|
11678
|
+
const _hoisted_2$9 = ["aria-checked"];
|
|
11679
|
+
|
|
11275
11680
|
|
|
11276
|
-
const _sfc_main$
|
|
11681
|
+
const _sfc_main$d = {
|
|
11277
11682
|
__name: 'OptionsReadingProgress',
|
|
11278
11683
|
setup(__props) {
|
|
11279
|
-
|
|
11280
|
-
const { enabled, setEnabled } = useReadingProgress;
|
|
11684
|
+
|
|
11685
|
+
const { enabled, setEnabled } = useReadingProgress;
|
|
11281
11686
|
|
|
11282
11687
|
return (_ctx, _cache) => {
|
|
11283
|
-
return (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11688
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
11284
11689
|
createBaseVNode("button", {
|
|
11285
11690
|
id: "reading-progress-button",
|
|
11286
11691
|
class: "w-full flex items-center justify-between py-2 px-1 text-left",
|
|
@@ -11301,37 +11706,37 @@ return (_ctx, _cache) => {
|
|
|
11301
11706
|
class: normalizeClass(["inline-block h-5 w-5 rounded-full bg-white shadow transition-transform", unref(enabled) ? 'translate-x-5' : 'translate-x-0'])
|
|
11302
11707
|
}, null, 2)
|
|
11303
11708
|
], 2)
|
|
11304
|
-
], 8, _hoisted_2$
|
|
11709
|
+
], 8, _hoisted_2$9)
|
|
11305
11710
|
]))
|
|
11306
11711
|
}
|
|
11307
11712
|
}
|
|
11308
11713
|
|
|
11309
11714
|
};
|
|
11310
11715
|
|
|
11311
|
-
const _hoisted_1$
|
|
11716
|
+
const _hoisted_1$c = {
|
|
11312
11717
|
class: "absolute top-14 py-4 px-3 shadow-lg w-60 md:w-104 text-areia -right-2 md:right-16 z-10 bg-white",
|
|
11313
11718
|
role: "Opções",
|
|
11314
11719
|
"aria-orientation": "vertical",
|
|
11315
11720
|
"aria-labelledby": "options-menu"
|
|
11316
11721
|
};
|
|
11317
|
-
const _hoisted_2$
|
|
11318
|
-
const _hoisted_3$
|
|
11722
|
+
const _hoisted_2$8 = { id: "footnotes-button" };
|
|
11723
|
+
const _hoisted_3$4 = {
|
|
11319
11724
|
class: "w-full flex justify-center items-center py-3 lowercase",
|
|
11320
11725
|
id: "visualize-title"
|
|
11321
11726
|
};
|
|
11322
|
-
const _hoisted_4$
|
|
11727
|
+
const _hoisted_4$2 = { class: "w-full grid grid-cols-4 gap-2 my-3" };
|
|
11323
11728
|
|
|
11324
11729
|
|
|
11325
|
-
const _sfc_main$
|
|
11730
|
+
const _sfc_main$c = {
|
|
11326
11731
|
__name: 'OptionsDropdown',
|
|
11327
11732
|
setup(__props) {
|
|
11328
11733
|
|
|
11329
11734
|
|
|
11330
11735
|
return (_ctx, _cache) => {
|
|
11331
|
-
return (openBlock(), createElementBlock("div", _hoisted_1$
|
|
11736
|
+
return (openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
11332
11737
|
createBaseVNode("div", null, [
|
|
11333
11738
|
renderSlot(_ctx.$slots, "optionsTop"),
|
|
11334
|
-
createBaseVNode("div", _hoisted_2$
|
|
11739
|
+
createBaseVNode("div", _hoisted_2$8, [
|
|
11335
11740
|
createBaseVNode("button", {
|
|
11336
11741
|
onClick: _cache[0] || (_cache[0] = withModifiers($event => (unref(useFootnotes).setShowFootnotes(true)), ["prevent"])),
|
|
11337
11742
|
class: "w-full flex justify-center items-center py-3 lowercase"
|
|
@@ -11341,18 +11746,18 @@ return (_ctx, _cache) => {
|
|
|
11341
11746
|
]),
|
|
11342
11747
|
_cache[2] || (_cache[2] = createBaseVNode("div", { class: "w-full border-b border-areia my-3" }, null, -1))
|
|
11343
11748
|
]),
|
|
11344
|
-
createBaseVNode("div", _hoisted_3$
|
|
11749
|
+
createBaseVNode("div", _hoisted_3$4, [
|
|
11345
11750
|
createVNode(IconEye, { class: "w-6 h-6" }),
|
|
11346
11751
|
_cache[3] || (_cache[3] = createBaseVNode("span", { class: "ml-4" }, "Visualização", -1))
|
|
11347
11752
|
]),
|
|
11753
|
+
createVNode(_sfc_main$j),
|
|
11348
11754
|
createVNode(_sfc_main$i),
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
createVNode(_sfc_main$
|
|
11352
|
-
createVNode(_sfc_main$d)
|
|
11755
|
+
createBaseVNode("div", _hoisted_4$2, [
|
|
11756
|
+
createVNode(_sfc_main$h),
|
|
11757
|
+
createVNode(_sfc_main$e)
|
|
11353
11758
|
]),
|
|
11354
11759
|
(unref(useReadingProgress).available.value)
|
|
11355
|
-
? (openBlock(), createBlock(_sfc_main$
|
|
11760
|
+
? (openBlock(), createBlock(_sfc_main$d, { key: 0 }))
|
|
11356
11761
|
: createCommentVNode("", true),
|
|
11357
11762
|
_cache[4] || (_cache[4] = createBaseVNode("div", { class: "hidden w-full border-b border-areia my-8" }, null, -1)),
|
|
11358
11763
|
renderSlot(_ctx.$slots, "optionsBottom")
|
|
@@ -11363,21 +11768,26 @@ return (_ctx, _cache) => {
|
|
|
11363
11768
|
|
|
11364
11769
|
};
|
|
11365
11770
|
|
|
11366
|
-
const _hoisted_1$
|
|
11367
|
-
const _hoisted_2$
|
|
11771
|
+
const _hoisted_1$b = { class: "flex" };
|
|
11772
|
+
const _hoisted_2$7 = ["aria-expanded"];
|
|
11368
11773
|
|
|
11369
11774
|
|
|
11370
|
-
const _sfc_main$
|
|
11775
|
+
const _sfc_main$b = {
|
|
11371
11776
|
__name: 'OptionsButton',
|
|
11372
11777
|
setup(__props) {
|
|
11373
11778
|
|
|
11374
11779
|
const show = ref(false);
|
|
11375
11780
|
const button = ref(null);
|
|
11376
11781
|
|
|
11377
|
-
const
|
|
11782
|
+
const publicEvent = inject(publicEventKey, () => {});
|
|
11783
|
+
const toggleSummary = () => {
|
|
11784
|
+
show.value = !show.value;
|
|
11785
|
+
publicEvent('options-toggle', { open: show.value });
|
|
11786
|
+
};
|
|
11378
11787
|
const hide = () => {
|
|
11379
|
-
if (!useReaderSettings.blocked.value) {
|
|
11380
|
-
show.value = false;
|
|
11788
|
+
if (show.value && !useReaderSettings.blocked.value) {
|
|
11789
|
+
show.value = false;
|
|
11790
|
+
publicEvent('options-toggle', { open: false });
|
|
11381
11791
|
}
|
|
11382
11792
|
};
|
|
11383
11793
|
|
|
@@ -11393,11 +11803,12 @@ return (_ctx, _cache) => {
|
|
|
11393
11803
|
ref: button,
|
|
11394
11804
|
class: "relative"
|
|
11395
11805
|
}, [
|
|
11396
|
-
createBaseVNode("div", _hoisted_1$
|
|
11806
|
+
createBaseVNode("div", _hoisted_1$b, [
|
|
11397
11807
|
createBaseVNode("button", {
|
|
11398
11808
|
onClick: _cache[0] || (_cache[0] = withModifiers($event => (toggleSummary()), ["prevent"])),
|
|
11399
11809
|
class: "border p-3 shadow flex items-center border-white text-white",
|
|
11400
11810
|
id: "options-button",
|
|
11811
|
+
"aria-label": "Opções",
|
|
11401
11812
|
"aria-haspopup": "true",
|
|
11402
11813
|
"aria-expanded": show.value
|
|
11403
11814
|
}, [
|
|
@@ -11411,7 +11822,7 @@ return (_ctx, _cache) => {
|
|
|
11411
11822
|
key: 1,
|
|
11412
11823
|
class: "w-6 h-6"
|
|
11413
11824
|
}))
|
|
11414
|
-
], 8, _hoisted_2$
|
|
11825
|
+
], 8, _hoisted_2$7),
|
|
11415
11826
|
createBaseVNode("button", {
|
|
11416
11827
|
onClick: _cache[1] || (_cache[1] = withModifiers($event => (unref(toggleFullScreen)()), ["prevent"])),
|
|
11417
11828
|
class: "hidden md:flex items-center border p-3 shadow ml-3 border-white text-white"
|
|
@@ -11428,7 +11839,7 @@ return (_ctx, _cache) => {
|
|
|
11428
11839
|
"leave-to-class": "opacity-0 scale-95"
|
|
11429
11840
|
}, {
|
|
11430
11841
|
default: withCtx(() => [
|
|
11431
|
-
withDirectives(createVNode(_sfc_main$
|
|
11842
|
+
withDirectives(createVNode(_sfc_main$c, null, {
|
|
11432
11843
|
optionsTop: withCtx(() => [
|
|
11433
11844
|
renderSlot(_ctx.$slots, "optionsTop")
|
|
11434
11845
|
]),
|
|
@@ -11448,20 +11859,194 @@ return (_ctx, _cache) => {
|
|
|
11448
11859
|
|
|
11449
11860
|
};
|
|
11450
11861
|
|
|
11451
|
-
const _hoisted_1$
|
|
11452
|
-
|
|
11453
|
-
|
|
11862
|
+
const _hoisted_1$a = {
|
|
11863
|
+
key: 0,
|
|
11864
|
+
id: "search-menu"
|
|
11865
|
+
};
|
|
11866
|
+
const _hoisted_2$6 = ["aria-expanded"];
|
|
11867
|
+
const _hoisted_3$3 = { class: "search-input-row" };
|
|
11868
|
+
const _hoisted_4$1 = { class: "search-input-control" };
|
|
11869
|
+
const _hoisted_5$1 = { class: "search-results-row" };
|
|
11870
|
+
const _hoisted_6$1 = {
|
|
11871
|
+
id: "search-status",
|
|
11872
|
+
role: "status",
|
|
11873
|
+
"aria-live": "polite"
|
|
11874
|
+
};
|
|
11875
|
+
const _hoisted_7$1 = ["disabled"];
|
|
11876
|
+
const _hoisted_8 = ["disabled"];
|
|
11877
|
+
|
|
11878
|
+
|
|
11879
|
+
const _sfc_main$a = {
|
|
11880
|
+
__name: 'SearchButton',
|
|
11881
|
+
setup(__props) {
|
|
11882
|
+
|
|
11883
|
+
const search = inject(searchKey);
|
|
11884
|
+
const { enabled, open, query, input, button, total, status, pending } = search;
|
|
11885
|
+
|
|
11886
|
+
function clearQuery() {
|
|
11887
|
+
query.value = '';
|
|
11888
|
+
input.value?.focus({ preventScroll: true });
|
|
11889
|
+
}
|
|
11890
|
+
|
|
11891
|
+
return (_ctx, _cache) => {
|
|
11892
|
+
return (unref(enabled))
|
|
11893
|
+
? (openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
11894
|
+
createBaseVNode("button", {
|
|
11895
|
+
ref_key: "button",
|
|
11896
|
+
ref: button,
|
|
11897
|
+
id: "search-button",
|
|
11898
|
+
type: "button",
|
|
11899
|
+
class: "search-icon-button border p-3 shadow flex items-center border-white text-white",
|
|
11900
|
+
"aria-label": "Buscar no texto",
|
|
11901
|
+
title: "Buscar no texto (Ctrl+F)",
|
|
11902
|
+
"aria-controls": "search-dropdown",
|
|
11903
|
+
"aria-expanded": unref(open),
|
|
11904
|
+
onClick: _cache[0] || (_cache[0] = $event => (unref(open) ? unref(search).close() : unref(search).show()))
|
|
11905
|
+
}, [...(_cache[10] || (_cache[10] = [
|
|
11906
|
+
createBaseVNode("svg", {
|
|
11907
|
+
class: "w-6 h-6",
|
|
11908
|
+
viewBox: "0 0 24 24",
|
|
11909
|
+
fill: "none",
|
|
11910
|
+
stroke: "currentColor",
|
|
11911
|
+
"stroke-width": "2",
|
|
11912
|
+
"aria-hidden": "true"
|
|
11913
|
+
}, [
|
|
11914
|
+
createBaseVNode("circle", {
|
|
11915
|
+
cx: "10.5",
|
|
11916
|
+
cy: "10.5",
|
|
11917
|
+
r: "6.5"
|
|
11918
|
+
}),
|
|
11919
|
+
createBaseVNode("path", { d: "m16 16 5 5" })
|
|
11920
|
+
], -1)
|
|
11921
|
+
]))], 8, _hoisted_2$6),
|
|
11922
|
+
withDirectives(createBaseVNode("form", {
|
|
11923
|
+
id: "search-dropdown",
|
|
11924
|
+
role: "search",
|
|
11925
|
+
"aria-label": "Buscar no texto",
|
|
11926
|
+
onSubmit: _cache[6] || (_cache[6] = withModifiers($event => (unref(search).step(1)), ["prevent"])),
|
|
11927
|
+
onWheel: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"])),
|
|
11928
|
+
onKeydown: [
|
|
11929
|
+
_cache[8] || (_cache[8] = withModifiers(() => {}, ["stop"])),
|
|
11930
|
+
_cache[9] || (_cache[9] = withKeys(withModifiers($event => (unref(search).close()), ["prevent"]), ["esc"]))
|
|
11931
|
+
]
|
|
11932
|
+
}, [
|
|
11933
|
+
createBaseVNode("div", _hoisted_3$3, [
|
|
11934
|
+
createBaseVNode("div", _hoisted_4$1, [
|
|
11935
|
+
withDirectives(createBaseVNode("input", {
|
|
11936
|
+
id: "search-input",
|
|
11937
|
+
ref_key: "input",
|
|
11938
|
+
ref: input,
|
|
11939
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (isRef(query) ? (query).value = $event : null)),
|
|
11940
|
+
type: "search",
|
|
11941
|
+
placeholder: "Palavra ou expressão",
|
|
11942
|
+
autocomplete: "off",
|
|
11943
|
+
spellcheck: "false",
|
|
11944
|
+
"aria-label": "Buscar no texto",
|
|
11945
|
+
"aria-describedby": "search-status",
|
|
11946
|
+
onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers($event => (!$event.isComposing && unref(search).step($event.shiftKey ? -1 : 1)), ["prevent"]), ["enter"]))
|
|
11947
|
+
}, null, 544), [
|
|
11948
|
+
[vModelText, unref(query)]
|
|
11949
|
+
]),
|
|
11950
|
+
(unref(query))
|
|
11951
|
+
? (openBlock(), createElementBlock("button", {
|
|
11952
|
+
key: 0,
|
|
11953
|
+
id: "search-clear-button",
|
|
11954
|
+
class: "search-icon-button",
|
|
11955
|
+
type: "button",
|
|
11956
|
+
"aria-label": "Limpar busca",
|
|
11957
|
+
title: "Limpar busca",
|
|
11958
|
+
onClick: clearQuery
|
|
11959
|
+
}, [
|
|
11960
|
+
createVNode(IconClose, {
|
|
11961
|
+
class: "w-4 h-4",
|
|
11962
|
+
"aria-hidden": "true"
|
|
11963
|
+
})
|
|
11964
|
+
]))
|
|
11965
|
+
: createCommentVNode("", true)
|
|
11966
|
+
]),
|
|
11967
|
+
createBaseVNode("button", {
|
|
11968
|
+
class: "search-icon-button",
|
|
11969
|
+
type: "button",
|
|
11970
|
+
"aria-label": "Fechar busca",
|
|
11971
|
+
title: "Fechar (Esc)",
|
|
11972
|
+
onClick: _cache[3] || (_cache[3] = $event => (unref(search).close()))
|
|
11973
|
+
}, [
|
|
11974
|
+
createVNode(IconClose, {
|
|
11975
|
+
class: "w-6 h-6",
|
|
11976
|
+
"aria-hidden": "true"
|
|
11977
|
+
})
|
|
11978
|
+
])
|
|
11979
|
+
]),
|
|
11980
|
+
createBaseVNode("div", _hoisted_5$1, [
|
|
11981
|
+
createBaseVNode("span", _hoisted_6$1, toDisplayString(unref(status)), 1),
|
|
11982
|
+
createBaseVNode("button", {
|
|
11983
|
+
class: "search-icon-button",
|
|
11984
|
+
type: "button",
|
|
11985
|
+
"aria-label": "Ocorrência anterior",
|
|
11986
|
+
title: "Anterior (Shift+Enter)",
|
|
11987
|
+
disabled: !unref(total) || unref(pending),
|
|
11988
|
+
onClick: _cache[4] || (_cache[4] = $event => (unref(search).step(-1)))
|
|
11989
|
+
}, [...(_cache[11] || (_cache[11] = [
|
|
11990
|
+
createBaseVNode("svg", {
|
|
11991
|
+
class: "w-5 h-5",
|
|
11992
|
+
viewBox: "0 0 24 24",
|
|
11993
|
+
fill: "none",
|
|
11994
|
+
stroke: "currentColor",
|
|
11995
|
+
"stroke-width": "2",
|
|
11996
|
+
"stroke-linecap": "round",
|
|
11997
|
+
"stroke-linejoin": "round",
|
|
11998
|
+
"aria-hidden": "true"
|
|
11999
|
+
}, [
|
|
12000
|
+
createBaseVNode("path", { d: "m6 14 6-6 6 6" })
|
|
12001
|
+
], -1)
|
|
12002
|
+
]))], 8, _hoisted_7$1),
|
|
12003
|
+
createBaseVNode("button", {
|
|
12004
|
+
class: "search-icon-button",
|
|
12005
|
+
type: "button",
|
|
12006
|
+
"aria-label": "Próxima ocorrência",
|
|
12007
|
+
title: "Próxima (Enter)",
|
|
12008
|
+
disabled: !unref(total) || unref(pending),
|
|
12009
|
+
onClick: _cache[5] || (_cache[5] = $event => (unref(search).step(1)))
|
|
12010
|
+
}, [...(_cache[12] || (_cache[12] = [
|
|
12011
|
+
createBaseVNode("svg", {
|
|
12012
|
+
class: "w-5 h-5",
|
|
12013
|
+
viewBox: "0 0 24 24",
|
|
12014
|
+
fill: "none",
|
|
12015
|
+
stroke: "currentColor",
|
|
12016
|
+
"stroke-width": "2",
|
|
12017
|
+
"stroke-linecap": "round",
|
|
12018
|
+
"stroke-linejoin": "round",
|
|
12019
|
+
"aria-hidden": "true"
|
|
12020
|
+
}, [
|
|
12021
|
+
createBaseVNode("path", { d: "m6 10 6 6 6-6" })
|
|
12022
|
+
], -1)
|
|
12023
|
+
]))], 8, _hoisted_8)
|
|
12024
|
+
])
|
|
12025
|
+
], 544), [
|
|
12026
|
+
[vShow, unref(open)]
|
|
12027
|
+
])
|
|
12028
|
+
]))
|
|
12029
|
+
: createCommentVNode("", true)
|
|
12030
|
+
}
|
|
12031
|
+
}
|
|
12032
|
+
|
|
11454
12033
|
};
|
|
11455
|
-
|
|
12034
|
+
|
|
12035
|
+
const _hoisted_1$9 = { id: "header-titles" };
|
|
12036
|
+
const _hoisted_2$5 = { class: "header-actions" };
|
|
11456
12037
|
|
|
11457
12038
|
const _sfc_main$9 = {
|
|
11458
12039
|
__name: 'HeaderSlot',
|
|
11459
12040
|
setup(__props) {
|
|
11460
|
-
|
|
12041
|
+
|
|
12042
|
+
const search = inject(searchKey);
|
|
11461
12043
|
|
|
11462
12044
|
return (_ctx, _cache) => {
|
|
11463
|
-
return (openBlock(), createElementBlock("header",
|
|
11464
|
-
|
|
12045
|
+
return (openBlock(), createElementBlock("header", {
|
|
12046
|
+
id: "component-header",
|
|
12047
|
+
class: normalizeClass(["bg-primary flex justify-between items-center p-4", { 'search-enabled': unref(search).enabled.value }])
|
|
12048
|
+
}, [
|
|
12049
|
+
createVNode(_sfc_main$q, null, {
|
|
11465
12050
|
summaryTop: withCtx(() => [
|
|
11466
12051
|
renderSlot(_ctx.$slots, "summaryTop")
|
|
11467
12052
|
]),
|
|
@@ -11470,19 +12055,22 @@ return (_ctx, _cache) => {
|
|
|
11470
12055
|
]),
|
|
11471
12056
|
_: 3
|
|
11472
12057
|
}),
|
|
11473
|
-
createBaseVNode("div",
|
|
12058
|
+
createBaseVNode("div", _hoisted_1$9, [
|
|
11474
12059
|
renderSlot(_ctx.$slots, "header")
|
|
11475
12060
|
]),
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
12061
|
+
createBaseVNode("div", _hoisted_2$5, [
|
|
12062
|
+
createVNode(_sfc_main$a),
|
|
12063
|
+
createVNode(_sfc_main$b, null, {
|
|
12064
|
+
optionsTop: withCtx(() => [
|
|
12065
|
+
renderSlot(_ctx.$slots, "optionsTop")
|
|
12066
|
+
]),
|
|
12067
|
+
optionsBottom: withCtx(() => [
|
|
12068
|
+
renderSlot(_ctx.$slots, "optionsBottom")
|
|
12069
|
+
]),
|
|
12070
|
+
_: 3
|
|
12071
|
+
})
|
|
12072
|
+
])
|
|
12073
|
+
], 2))
|
|
11486
12074
|
}
|
|
11487
12075
|
}
|
|
11488
12076
|
|
|
@@ -11596,12 +12184,12 @@ return (_ctx, _cache) => {
|
|
|
11596
12184
|
createBaseVNode("div", _hoisted_2$3, [
|
|
11597
12185
|
createVNode(NavigationButton, {
|
|
11598
12186
|
target: "prev",
|
|
11599
|
-
onClicked: _cache[0] || (_cache[0] = $event => (unref(prev)()))
|
|
12187
|
+
onClicked: _cache[0] || (_cache[0] = $event => (unref(prev)(false, 'previous-button')))
|
|
11600
12188
|
}),
|
|
11601
12189
|
renderSlot(_ctx.$slots, "default"),
|
|
11602
12190
|
createVNode(NavigationButton, {
|
|
11603
12191
|
target: "next",
|
|
11604
|
-
onClicked: _cache[1] || (_cache[1] = $event => (unref(next)()))
|
|
12192
|
+
onClicked: _cache[1] || (_cache[1] = $event => (unref(next)(false, 'next-button')))
|
|
11605
12193
|
})
|
|
11606
12194
|
])
|
|
11607
12195
|
]))
|
|
@@ -11616,7 +12204,7 @@ const _hoisted_1$5 = { class: "[ typeArea ] h-full relative transition-opacity d
|
|
|
11616
12204
|
const _sfc_main$5 = {
|
|
11617
12205
|
__name: 'ReaderWrapper',
|
|
11618
12206
|
setup(__props) {
|
|
11619
|
-
const { currentPage } = usePagination;
|
|
12207
|
+
const { currentPage, changeSource } = usePagination;
|
|
11620
12208
|
|
|
11621
12209
|
const el = ref(null);
|
|
11622
12210
|
|
|
@@ -11625,10 +12213,10 @@ const { distanceX } = usePointerSwipe(el, {
|
|
|
11625
12213
|
onSwipeEnd() {
|
|
11626
12214
|
if (width.value < 600) {
|
|
11627
12215
|
if (distanceX.value > 100) {
|
|
11628
|
-
usePagination.next();
|
|
12216
|
+
usePagination.next(false, 'swipe');
|
|
11629
12217
|
}
|
|
11630
12218
|
if (distanceX.value < -100) {
|
|
11631
|
-
usePagination.prev();
|
|
12219
|
+
usePagination.prev(false, 'swipe');
|
|
11632
12220
|
}
|
|
11633
12221
|
}
|
|
11634
12222
|
}
|
|
@@ -11639,13 +12227,13 @@ return (_ctx, _cache) => {
|
|
|
11639
12227
|
return (openBlock(), createElementBlock("div", {
|
|
11640
12228
|
ref_key: "el",
|
|
11641
12229
|
ref: el,
|
|
11642
|
-
class: "columnsArea",
|
|
12230
|
+
class: normalizeClass(["columnsArea", { 'search-navigation': unref(changeSource) === 'search' }]),
|
|
11643
12231
|
style: normalizeStyle(`margin-left: -${100 * (unref(currentPage) - 1)}%`)
|
|
11644
12232
|
}, [
|
|
11645
12233
|
createBaseVNode("div", _hoisted_1$5, [
|
|
11646
12234
|
renderSlot(_ctx.$slots, "default")
|
|
11647
12235
|
])
|
|
11648
|
-
],
|
|
12236
|
+
], 6))
|
|
11649
12237
|
}
|
|
11650
12238
|
}
|
|
11651
12239
|
|
|
@@ -11657,7 +12245,7 @@ const _hoisted_1$4 = {
|
|
|
11657
12245
|
class: "[ reference-popup ] bg-gray-800 text-white fixed z-40 bottom-0 md:bottom-14 right-0 md:right-3 rounded flex justify-between p-4 shadow w-full md:w-2/5"
|
|
11658
12246
|
};
|
|
11659
12247
|
const _hoisted_2$2 = ["innerHTML"];
|
|
11660
|
-
const _hoisted_3$
|
|
12248
|
+
const _hoisted_3$2 = { class: "mt-3 flex self-end" };
|
|
11661
12249
|
|
|
11662
12250
|
|
|
11663
12251
|
const _sfc_main$4 = {
|
|
@@ -11693,7 +12281,7 @@ return (_ctx, _cache) => {
|
|
|
11693
12281
|
class: "w-4/5",
|
|
11694
12282
|
innerHTML: unref(reference).ref
|
|
11695
12283
|
}, null, 8, _hoisted_2$2),
|
|
11696
|
-
createBaseVNode("div", _hoisted_3$
|
|
12284
|
+
createBaseVNode("div", _hoisted_3$2, [
|
|
11697
12285
|
createBaseVNode("button", {
|
|
11698
12286
|
onClick: _cache[0] || (_cache[0] = withModifiers($event => (closeRef()), ["prevent"])),
|
|
11699
12287
|
class: "button button-negative"
|
|
@@ -11731,7 +12319,7 @@ return (_ctx, _cache) => {
|
|
|
11731
12319
|
]),
|
|
11732
12320
|
createVNode(unref(m), {
|
|
11733
12321
|
modelValue: unref(currentPage),
|
|
11734
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (unref(set)(Math.round($event)))),
|
|
12322
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (unref(set)(Math.round($event), 'slider'))),
|
|
11735
12323
|
min: 1,
|
|
11736
12324
|
max: unref(totalPages),
|
|
11737
12325
|
step: -1,
|
|
@@ -11775,7 +12363,7 @@ const _hoisted_1$1 = {
|
|
|
11775
12363
|
class: "absolute top-0 right-0 w-96 md:w-[40em] flex-shrink-0 h-screen overflow-auto overflow-x-hidden z-20 shadow-2xl"
|
|
11776
12364
|
};
|
|
11777
12365
|
const _hoisted_2$1 = { class: "w-full p-4" };
|
|
11778
|
-
const _hoisted_3 = { class: "text-areia py-4 pl-4" };
|
|
12366
|
+
const _hoisted_3$1 = { class: "text-areia py-4 pl-4" };
|
|
11779
12367
|
const _hoisted_4 = { class: "flex items-center mb-6" };
|
|
11780
12368
|
const _hoisted_5 = { class: "ml-4" };
|
|
11781
12369
|
const _hoisted_6 = { class: "ml-10" };
|
|
@@ -11844,7 +12432,7 @@ return (_ctx, _cache) => {
|
|
|
11844
12432
|
createVNode(IconClose, { class: "w-6 h-6 text-white" })
|
|
11845
12433
|
]),
|
|
11846
12434
|
createBaseVNode("div", _hoisted_2$1, [
|
|
11847
|
-
createBaseVNode("header", _hoisted_3, [
|
|
12435
|
+
createBaseVNode("header", _hoisted_3$1, [
|
|
11848
12436
|
createBaseVNode("div", _hoisted_4, [
|
|
11849
12437
|
createVNode(IconNotes, { class: "w-8 h-8" }),
|
|
11850
12438
|
createBaseVNode("span", _hoisted_5, [
|
|
@@ -11883,150 +12471,238 @@ return (_ctx, _cache) => {
|
|
|
11883
12471
|
};
|
|
11884
12472
|
const FootnotesAside = /*#__PURE__*/_export_sfc(_sfc_main$1, [['__scopeId',"data-v-5391e486"]]);
|
|
11885
12473
|
|
|
11886
|
-
const _style_0 = ".border-primary { border-color: var(--theme-primary, #690000);\n}\n.text-primary { color: var(--theme-primary, #690000);\n}\n.bg-primary { background-color: var(--theme-primary, #690000);\n}\n.border-primary-extralight { border-color: var(--theme-primary-extralight, #f3f4f6);\n}\n.text-primary-extralight { color: var(--theme-primary-extralight, #f3f4f6);\n}\n.bg-primary-extralight { background-color: var(--theme-primary-extralight, #f3f4f6);\n}\n.border-secondary { border-color: var(--theme-secondary, #ffa03c);\n}\n.text-secondary { color: var(--theme-secondary, #ffa03c);\n}\n.bg-secondary { background-color: var(--theme-secondary, #ffa03c);\n}\n.rootWrapper {\n\tmax-height: 100%;\n height: 100%;\n}\nmain#rootComponent {\n\theight: 100%;\n\tmax-height: 100%;\n}\nmain#rootComponent.light {\n\t\tbackground-color: var(--bg-light-mode, #fff7e0)\n}\nmain#rootComponent.dark {\n\t\tbackground-color: var(--bg-dark-mode, #2d2d2d);\n}\nmain#rootComponent.dark #content-area {\n\t\t\tcolor: #fff\n}\nheader.wrapper {\n\twidth: 200px;\n\tmargin: 0 auto;\n}\n#engine {\n\theight: calc(100% - 8.4rem);\n\tposition: relative;\n right: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.rootWrapper.safari {\n\tmax-height: initial;\n\theight: initial;\n}\n.rootWrapper.safari #engine {\n\theight: auto !important;\n}\n#reader-component {\n\twidth: calc(100% - 5rem);\n}\n.typeArea {\n\twidth: 100%;\n}\n.engineWrapper {\n\theight: 100%;\n display: flex;\n justify-content: space-between;\n\tposition: relative;\n right: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.rootWrapper:not(.safari) .columns-double .columnsArea {\n\t-moz-column-count: 2;\n column-count: 2;\n grid-column-gap: 0;\n -moz-column-gap: 0;\n column-gap: 0;\n height: 100%;\n padding: 0;\n width: 100%;\n}\n@media only screen and (max-width: 1020px) {\n.rootWrapper:not(.safari) .columns-double .columnsArea {\n\t\t-moz-column-count: 1;\n \tcolumn-count: 1\n}\n}\n.rootWrapper:not(.safari) .columns-single .columnsArea {\n\t-moz-column-count: 1;\n\t column-count: 1;\n\t-moz-column-gap: 0;\n\t column-gap: 0;\n\theight: 100%;\n padding: 0;\n width: 100%;\n}\n.rootWrapper:not(.safari) .columns-single .columnsArea #content-area {\n\t\tmax-width: 37em;\n\t\tmargin: 0 auto;\n}\n.nav-prev { left: 0px;\n}\n.nav-next { right: 0px;\n}\n.viewer-nav {\n\theight: 100%;\n\tposition: relative;\n\ttop: 0px;\n\tbottom: 0px;\n\tz-index: 10;\n\twidth: 2.5rem;\n\tflex-shrink: 0;\n\tcursor: pointer;\n\talign-self: center;\n\ttransition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n\ttransition-duration: 500ms;\n\ttransition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n.viewer-nav:focus,\n\t.viewer-nav:active {\n\t\tborder: none !important;\n\t\tbox-shadow: none !important;\n\t\toutline-color: transparent !important;\n}\n#content-area *::-moz-selection {\n\tcolor: var(--theme-primary-extralight, #690000);\n\tbackground: var(--theme-secondary, #ffa03c);\n}\n#content-area *::selection {\n\tcolor: var(--theme-primary-extralight, #690000);\n\tbackground: var(--theme-secondary, #ffa03c);\n}\n.viewer-nav-icon { opacity: 0;\n}\n@media (min-width: 768px) {\n.viewer-nav-icon { opacity: 0.8;\n}\n}\n@media only screen and (max-width: 600px) {\n.columnsArea {\n\t\ttransition: margin 100ms\n}\n}\n#asidebar {\n\tbackground: var(--sidebar-backgorund, #690000);\n\tcolor: var(--sidebar-text, #f3f4f6);\n}\n\n/* slider */\n.rootWrapper.safari .slider-target,\n.rootWrapper.safari .slider-target *{\n\tdisplay: none !important;\n}\n.slider-target,.slider-target *{\n -webkit-touch-callout:none;\n -webkit-tap-highlight-color:rgba(0,0,0,0);\n box-sizing:border-box;\n touch-action:none;\n -webkit-user-select:none;\n -moz-user-select:none;\n user-select:none\n}\n.slider-target{\n position:relative\n}\n.slider-base,.slider-connects{\n height:100%;\n position:relative;\n width:100%;\n z-index:1\n}\n.slider-connects{\n overflow:hidden;\n z-index:0\n}\n.slider-connect,.slider-origin{\n height:100%;\n position:absolute;\n right:0;\n top:0;\n transform-origin:0 0;\n transform-style:flat;\n width:100%;\n will-change:transform;\n z-index:1\n}\n.slider-txt-dir-rtl.slider-horizontal .slider-origin{\n left:0;\n right:auto\n}\n.slider-vertical .slider-origin{\n top:-100%;\n width:0\n}\n.slider-horizontal .slider-origin{\n height:0\n}\n.slider-handle{\n backface-visibility:hidden;\n position:absolute\n}\n.slider-touch-area{\n height:100%;\n width:100%\n}\n.slider-state-tap .slider-connect,.slider-state-tap .slider-origin{\n transition:transform .3s\n}\n.slider-state-drag *{\n cursor:inherit!important\n}\n.slider-tooltip-drag .slider-tooltip,.slider-tooltip-focus .slider-tooltip{\n display:none!important\n}\n.slider-tooltip-drag .slider-active .slider-tooltip,.slider-tooltip-drag.slider-state-drag .slider-tooltip:not(.slider-tooltip-hidden),.slider-tooltip-focus.slider-focused .slider-tooltip:not(.slider-tooltip-hidden){\n display:block!important\n}\n.slider-horizontal{\n height:var(--slider-height,6px)\n}\n.slider-horizontal .slider-handle{\n height:var(--slider-handle-height,16px);\n right:calc(var(--slider-handle-width, 16px)/2*-1);\n top:calc((var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2*-1 + -1px);\n width:var(--slider-handle-width,16px)\n}\n.slider-vertical{\n height:var(--slider-vertical-height,300px);\n width:var(--slider-height,6px)\n}\n.slider-vertical .slider-handle{\n bottom:calc(var(--slider-handle-width, 16px)/2*-1);\n height:var(--slider-handle-width,16px);\n right:calc((var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2*-1 + -1px);\n width:var(--slider-handle-height,16px)\n}\n.slider-txt-dir-rtl.slider-horizontal .slider-handle{\n left:calc(var(--slider-handle-width, 16px)/2*-1);\n right:auto\n}\n.slider-base{\n background-color:var(--slider-bg,#d1d5db)\n}\n.slider-base,.slider-connects{\n border-radius:var(--slider-radius,9999px)\n}\n.slider-connect{\n background:var(--theme-secondary, #690000);\n cursor:pointer\n}\n.slider-draggable{\n cursor:ew-resize\n}\n.slider-vertical .slider-draggable{\n cursor:ns-resize\n}\n.slider-handle{\n background:var(--slider-handle-bg,#fff);\n border:var(--slider-handle-border,0);\n border-radius:var(--slider-handle-radius,9999px);\n box-shadow:var(--slider-handle-shadow,.5px .5px 2px 1px rgba(0,0,0,.32));\n cursor:grab;\n height:var(--slider-handle-height,16px);\n width:var(--slider-handle-width,16px)\n}\n.slider-handle:focus{\n box-shadow:0 0 0 var(--slider-handle-ring-width,3px) var(--slider-handle-ring-color,rgba(16,185,129,.188)),var(--slider-handle-shadow,.5px .5px 2px 1px rgba(0,0,0,.32));\n outline:none\n}\n.slider-active{\n box-shadow:var(--slider-handle-shadow-active,.5px .5px 2px 1px rgba(0,0,0,.42));\n cursor:grabbing\n}\n[disabled] .slider-connect{\n background:var(--slider-connect-bg-disabled,#9ca3af)\n}\n[disabled] .slider-handle,[disabled].slider-handle,[disabled].slider-target{\n cursor:not-allowed\n}\n[disabled] .slider-tooltip{\n background:var(--theme-secondary, #690000);\n border-color:var(--theme-secondary, #690000);\n\topacity: 0.5;\n}\n.slider-tooltip{\n background:var(--theme-secondary, #690000);\n border:1px solid var(--theme-secondary, #690000);\n border-radius:var(--slider-tooltip-radius,5px);\n color:var(--slider-tooltip-color,#fff);\n display:block;\n font-size:var(--slider-tooltip-font-size,.875rem);\n font-weight:var(--slider-tooltip-font-weight,600);\n line-height:var(--slider-tooltip-line-height,1.25rem);\n min-width:var(--slider-tooltip-min-width,20px);\n padding:var(--slider-tooltip-py,2px) var(--slider-tooltip-px,6px);\n position:absolute;\n text-align:center;\n white-space:nowrap\n}\n.slider-horizontal .slider-tooltip-top{\n bottom:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));\n left:50%;\n transform:translate(-50%)\n}\n.slider-horizontal .slider-tooltip-top:before{\n border:var(--slider-tooltip-arrow-size,5px) solid transparent;\n border-top-color:inherit;\n bottom:calc(var(--slider-tooltip-arrow-size, 5px)*-2);\n content:\"\";\n height:0;\n left:50%;\n position:absolute;\n transform:translate(-50%);\n width:0\n}\n.slider-horizontal .slider-tooltip-bottom{\n left:50%;\n top:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));\n transform:translate(-50%)\n}\n.slider-horizontal .slider-tooltip-bottom:before{\n border:var(--slider-tooltip-arrow-size,5px) solid transparent;\n border-bottom-color:inherit;\n content:\"\";\n height:0;\n left:50%;\n position:absolute;\n top:calc(var(--slider-tooltip-arrow-size, 5px)*-2);\n transform:translate(-50%);\n width:0\n}\n.slider-vertical .slider-tooltip-left{\n right:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));\n top:50%;\n transform:translateY(-50%)\n}\n.slider-vertical .slider-tooltip-left:before{\n border:var(--slider-tooltip-arrow-size,5px) solid transparent;\n border-left-color:inherit;\n content:\"\";\n height:0;\n position:absolute;\n right:calc(var(--slider-tooltip-arrow-size, 5px)*-2);\n top:50%;\n transform:translateY(-50%);\n width:0\n}\n.slider-vertical .slider-tooltip-right{\n left:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));\n top:50%;\n transform:translateY(-50%)\n}\n.slider-vertical .slider-tooltip-right:before{\n border:var(--slider-tooltip-arrow-size,5px) solid transparent;\n border-right-color:inherit;\n content:\"\";\n height:0;\n left:calc(var(--slider-tooltip-arrow-size, 5px)*-2);\n position:absolute;\n top:50%;\n transform:translateY(-50%);\n width:0\n}\n.slider-horizontal .slider-origin>.slider-tooltip{\n left:auto;\n transform:translate(50%)\n}\n.slider-horizontal .slider-origin>.slider-tooltip-top{\n bottom:calc(var(--slider-tooltip-arrow-size, 5px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) + 1px)\n}\n.slider-horizontal .slider-origin>.slider-tooltip-bottom{\n top:calc(var(--slider-tooltip-arrow-size, 5px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) + var(--slider-height, 6px) - 1px)\n}\n.slider-vertical .slider-origin>.slider-tooltip{\n top:auto;\n transform:translateY(calc((var(--slider-tooltip-line-height, 1.25rem) - var(--slider-tooltip-py, 2px))*-1 + 1px))\n}\n.slider-vertical .slider-origin>.slider-tooltip-left{\n right:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-height, 6px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) - 1px)\n}\n.slider-vertical .slider-origin>.slider-tooltip-right{\n left:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-height, 6px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) - var(--slider-height, 6px) + 1px)\n}\n\n";
|
|
12474
|
+
const _style_0 = ".border-primary { border-color: var(--theme-primary, #690000);\n}\n.text-primary { color: var(--theme-primary, #690000);\n}\n.bg-primary { background-color: var(--theme-primary, #690000);\n}\n.border-primary-extralight { border-color: var(--theme-primary-extralight, #f3f4f6);\n}\n.text-primary-extralight { color: var(--theme-primary-extralight, #f3f4f6);\n}\n.bg-primary-extralight { background-color: var(--theme-primary-extralight, #f3f4f6);\n}\n.border-secondary { border-color: var(--theme-secondary, #ffa03c);\n}\n.text-secondary { color: var(--theme-secondary, #ffa03c);\n}\n.bg-secondary { background-color: var(--theme-secondary, #ffa03c);\n}\n.rootWrapper {\n\tmax-height: 100%;\n height: 100%;\n}\nmain#rootComponent {\n\theight: 100%;\n\tmax-height: 100%;\n}\nmain#rootComponent.light {\n\t\tbackground-color: var(--bg-light-mode, #fff7e0)\n}\nmain#rootComponent.dark {\n\t\tbackground-color: var(--bg-dark-mode, #2d2d2d);\n}\nmain#rootComponent.dark #content-area {\n\t\t\tcolor: #fff\n}\nheader.wrapper {\n\twidth: 200px;\n\tmargin: 0 auto;\n}\n#engine {\n\theight: calc(100% - 8.4rem);\n\tposition: relative;\n right: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.rootWrapper.safari {\n\tmax-height: initial;\n\theight: initial;\n}\n.rootWrapper.safari #engine {\n\theight: auto !important;\n}\n#reader-component {\n\twidth: calc(100% - 5rem);\n\tposition: relative;\n}\n.header-actions {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.75rem;\n\tflex-shrink: 0;\n}\n@media (max-width: 600px) {\n.search-enabled #options-button > span { display: none;\n}\n}\n#component-header {\n\tposition: relative;\n\tz-index: 20;\n}\n#search-dropdown {\n\tposition: absolute;\n\ttop: calc(100% + 0.25rem);\n\tright: 1rem;\n\twidth: min(23rem, calc(100% - 2rem));\n\tpadding: 1rem;\n\tbackground: #fff;\n\tcolor: #222;\n\tbox-shadow: 0 4px 12px #0003;\n\tfont-size: 0.875rem;\n\tline-height: 1.5;\n}\n.search-input-row, .search-results-row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 0.5rem;\n}\n.search-results-row { margin-top: 0.5rem;\n}\n.search-input-control { position: relative; flex: 1; min-width: 0;\n}\n#search-input {\n\tmin-width: 0;\n\twidth: 100%;\n\tpadding: 0.5rem;\n\tpadding-right: 2.75rem;\n\tborder: 1px solid currentColor;\n\tborder-radius: 0.25rem;\n\tbackground: transparent;\n\tcolor: inherit;\n\tfont: inherit;\n}\n#search-status { flex: 1;\n}\n#search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none;\n}\n#search-clear-button {\n\tposition: absolute;\n\tright: 0.25rem;\n\ttop: 0;\n\tbottom: 0;\n\tmargin: auto;\n\twidth: 2rem;\n\theight: 2rem;\n}\n.search-icon-button {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tflex-shrink: 0;\n\tborder-radius: 0.25rem;\n\tcursor: pointer;\n\ttransition: background-color 120ms ease, transform 80ms ease;\n}\n#search-button {\n\t--search-control-hover: #ffffff26;\n\t--search-control-active: #ffffff40;\n}\n.search-icon-button:not(:disabled):hover,\n.search-icon-button:not(:disabled):focus-visible {\n\tbackground-color: var(--search-control-hover, #0000000d);\n}\n.search-icon-button:not(:disabled):active {\n\tbackground-color: var(--search-control-active, #0000001f);\n\ttransform: scale(0.94);\n}\n#search-dropdown button { padding: 0.375rem;\n}\n#search-dropdown button:disabled { opacity: 0.4; cursor: default;\n}\n#search-dropdown :focus-visible, #search-button:focus-visible {\n\toutline: 2px solid currentColor;\n\toutline-offset: 2px;\n}\n.search-highlights {\n\tposition: absolute;\n\tinset: 0;\n\toverflow: hidden;\n\tpointer-events: none;\n}\n.search-highlight-track { width: 100%; height: 100%;\n}\n.search-highlight {\n\tposition: absolute;\n\tbackground: #ffc40033;\n\tborder-radius: 2px;\n}\n.search-highlight-active {\n\tbackground: #ffc40066;\n\toutline: 1px solid #b87800;\n}\n.columnsArea.search-navigation { transition: margin-left 220ms ease;\n}\n.search-highlight-track.search-navigation { transition: transform 220ms ease;\n}\n@media (prefers-reduced-motion: reduce) {\n.columnsArea.search-navigation, .search-highlight-track.search-navigation { transition: none;\n}\n.search-icon-button { transition: none;\n}\n.search-icon-button:not(:disabled):active { transform: none;\n}\n}\n.typeArea {\n\twidth: 100%;\n}\n.engineWrapper {\n\theight: 100%;\n display: flex;\n justify-content: space-between;\n\tposition: relative;\n right: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.rootWrapper:not(.safari) .columns-double .columnsArea {\n\t-moz-column-count: 2;\n column-count: 2;\n grid-column-gap: 0;\n -moz-column-gap: 0;\n column-gap: 0;\n height: 100%;\n padding: 0;\n width: 100%;\n}\n@media only screen and (max-width: 1020px) {\n.rootWrapper:not(.safari) .columns-double .columnsArea {\n\t\t-moz-column-count: 1;\n \tcolumn-count: 1\n}\n}\n.rootWrapper:not(.safari) .columns-single .columnsArea {\n\t-moz-column-count: 1;\n\t column-count: 1;\n\t-moz-column-gap: 0;\n\t column-gap: 0;\n\theight: 100%;\n padding: 0;\n width: 100%;\n}\n.rootWrapper:not(.safari) .columns-single .columnsArea #content-area {\n\t\tmax-width: 37em;\n\t\tmargin: 0 auto;\n}\n.nav-prev { left: 0px;\n}\n.nav-next { right: 0px;\n}\n.viewer-nav {\n\theight: 100%;\n\tposition: relative;\n\ttop: 0px;\n\tbottom: 0px;\n\tz-index: 10;\n\twidth: 2.5rem;\n\tflex-shrink: 0;\n\tcursor: pointer;\n\talign-self: center;\n\ttransition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n\ttransition-duration: 500ms;\n\ttransition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n.viewer-nav:focus,\n\t.viewer-nav:active {\n\t\tborder: none !important;\n\t\tbox-shadow: none !important;\n\t\toutline-color: transparent !important;\n}\n#content-area *::-moz-selection {\n\tcolor: var(--theme-primary-extralight, #690000);\n\tbackground: var(--theme-secondary, #ffa03c);\n}\n#content-area *::selection {\n\tcolor: var(--theme-primary-extralight, #690000);\n\tbackground: var(--theme-secondary, #ffa03c);\n}\n.viewer-nav-icon { opacity: 0;\n}\n@media (min-width: 768px) {\n.viewer-nav-icon { opacity: 0.8;\n}\n}\n@media only screen and (max-width: 600px) {\n.columnsArea {\n\t\ttransition: margin 100ms\n}\n}\n#asidebar {\n\tbackground: var(--sidebar-backgorund, #690000);\n\tcolor: var(--sidebar-text, #f3f4f6);\n}\n\n/* slider */\n.rootWrapper.safari .slider-target,\n.rootWrapper.safari .slider-target *{\n\tdisplay: none !important;\n}\n.slider-target,.slider-target *{\n -webkit-touch-callout:none;\n -webkit-tap-highlight-color:rgba(0,0,0,0);\n box-sizing:border-box;\n touch-action:none;\n -webkit-user-select:none;\n -moz-user-select:none;\n user-select:none\n}\n.slider-target{\n position:relative\n}\n.slider-base,.slider-connects{\n height:100%;\n position:relative;\n width:100%;\n z-index:1\n}\n.slider-connects{\n overflow:hidden;\n z-index:0\n}\n.slider-connect,.slider-origin{\n height:100%;\n position:absolute;\n right:0;\n top:0;\n transform-origin:0 0;\n transform-style:flat;\n width:100%;\n will-change:transform;\n z-index:1\n}\n.slider-txt-dir-rtl.slider-horizontal .slider-origin{\n left:0;\n right:auto\n}\n.slider-vertical .slider-origin{\n top:-100%;\n width:0\n}\n.slider-horizontal .slider-origin{\n height:0\n}\n.slider-handle{\n backface-visibility:hidden;\n position:absolute\n}\n.slider-touch-area{\n height:100%;\n width:100%\n}\n.slider-state-tap .slider-connect,.slider-state-tap .slider-origin{\n transition:transform .3s\n}\n.slider-state-drag *{\n cursor:inherit!important\n}\n.slider-tooltip-drag .slider-tooltip,.slider-tooltip-focus .slider-tooltip{\n display:none!important\n}\n.slider-tooltip-drag .slider-active .slider-tooltip,.slider-tooltip-drag.slider-state-drag .slider-tooltip:not(.slider-tooltip-hidden),.slider-tooltip-focus.slider-focused .slider-tooltip:not(.slider-tooltip-hidden){\n display:block!important\n}\n.slider-horizontal{\n height:var(--slider-height,6px)\n}\n.slider-horizontal .slider-handle{\n height:var(--slider-handle-height,16px);\n right:calc(var(--slider-handle-width, 16px)/2*-1);\n top:calc((var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2*-1 + -1px);\n width:var(--slider-handle-width,16px)\n}\n.slider-vertical{\n height:var(--slider-vertical-height,300px);\n width:var(--slider-height,6px)\n}\n.slider-vertical .slider-handle{\n bottom:calc(var(--slider-handle-width, 16px)/2*-1);\n height:var(--slider-handle-width,16px);\n right:calc((var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2*-1 + -1px);\n width:var(--slider-handle-height,16px)\n}\n.slider-txt-dir-rtl.slider-horizontal .slider-handle{\n left:calc(var(--slider-handle-width, 16px)/2*-1);\n right:auto\n}\n.slider-base{\n background-color:var(--slider-bg,#d1d5db)\n}\n.slider-base,.slider-connects{\n border-radius:var(--slider-radius,9999px)\n}\n.slider-connect{\n background:var(--theme-secondary, #690000);\n cursor:pointer\n}\n.slider-draggable{\n cursor:ew-resize\n}\n.slider-vertical .slider-draggable{\n cursor:ns-resize\n}\n.slider-handle{\n background:var(--slider-handle-bg,#fff);\n border:var(--slider-handle-border,0);\n border-radius:var(--slider-handle-radius,9999px);\n box-shadow:var(--slider-handle-shadow,.5px .5px 2px 1px rgba(0,0,0,.32));\n cursor:grab;\n height:var(--slider-handle-height,16px);\n width:var(--slider-handle-width,16px)\n}\n.slider-handle:focus{\n box-shadow:0 0 0 var(--slider-handle-ring-width,3px) var(--slider-handle-ring-color,rgba(16,185,129,.188)),var(--slider-handle-shadow,.5px .5px 2px 1px rgba(0,0,0,.32));\n outline:none\n}\n.slider-active{\n box-shadow:var(--slider-handle-shadow-active,.5px .5px 2px 1px rgba(0,0,0,.42));\n cursor:grabbing\n}\n[disabled] .slider-connect{\n background:var(--slider-connect-bg-disabled,#9ca3af)\n}\n[disabled] .slider-handle,[disabled].slider-handle,[disabled].slider-target{\n cursor:not-allowed\n}\n[disabled] .slider-tooltip{\n background:var(--theme-secondary, #690000);\n border-color:var(--theme-secondary, #690000);\n\topacity: 0.5;\n}\n.slider-tooltip{\n background:var(--theme-secondary, #690000);\n border:1px solid var(--theme-secondary, #690000);\n border-radius:var(--slider-tooltip-radius,5px);\n color:var(--slider-tooltip-color,#fff);\n display:block;\n font-size:var(--slider-tooltip-font-size,.875rem);\n font-weight:var(--slider-tooltip-font-weight,600);\n line-height:var(--slider-tooltip-line-height,1.25rem);\n min-width:var(--slider-tooltip-min-width,20px);\n padding:var(--slider-tooltip-py,2px) var(--slider-tooltip-px,6px);\n position:absolute;\n text-align:center;\n white-space:nowrap\n}\n.slider-horizontal .slider-tooltip-top{\n bottom:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));\n left:50%;\n transform:translate(-50%)\n}\n.slider-horizontal .slider-tooltip-top:before{\n border:var(--slider-tooltip-arrow-size,5px) solid transparent;\n border-top-color:inherit;\n bottom:calc(var(--slider-tooltip-arrow-size, 5px)*-2);\n content:\"\";\n height:0;\n left:50%;\n position:absolute;\n transform:translate(-50%);\n width:0\n}\n.slider-horizontal .slider-tooltip-bottom{\n left:50%;\n top:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));\n transform:translate(-50%)\n}\n.slider-horizontal .slider-tooltip-bottom:before{\n border:var(--slider-tooltip-arrow-size,5px) solid transparent;\n border-bottom-color:inherit;\n content:\"\";\n height:0;\n left:50%;\n position:absolute;\n top:calc(var(--slider-tooltip-arrow-size, 5px)*-2);\n transform:translate(-50%);\n width:0\n}\n.slider-vertical .slider-tooltip-left{\n right:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));\n top:50%;\n transform:translateY(-50%)\n}\n.slider-vertical .slider-tooltip-left:before{\n border:var(--slider-tooltip-arrow-size,5px) solid transparent;\n border-left-color:inherit;\n content:\"\";\n height:0;\n position:absolute;\n right:calc(var(--slider-tooltip-arrow-size, 5px)*-2);\n top:50%;\n transform:translateY(-50%);\n width:0\n}\n.slider-vertical .slider-tooltip-right{\n left:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));\n top:50%;\n transform:translateY(-50%)\n}\n.slider-vertical .slider-tooltip-right:before{\n border:var(--slider-tooltip-arrow-size,5px) solid transparent;\n border-right-color:inherit;\n content:\"\";\n height:0;\n left:calc(var(--slider-tooltip-arrow-size, 5px)*-2);\n position:absolute;\n top:50%;\n transform:translateY(-50%);\n width:0\n}\n.slider-horizontal .slider-origin>.slider-tooltip{\n left:auto;\n transform:translate(50%)\n}\n.slider-horizontal .slider-origin>.slider-tooltip-top{\n bottom:calc(var(--slider-tooltip-arrow-size, 5px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) + 1px)\n}\n.slider-horizontal .slider-origin>.slider-tooltip-bottom{\n top:calc(var(--slider-tooltip-arrow-size, 5px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) + var(--slider-height, 6px) - 1px)\n}\n.slider-vertical .slider-origin>.slider-tooltip{\n top:auto;\n transform:translateY(calc((var(--slider-tooltip-line-height, 1.25rem) - var(--slider-tooltip-py, 2px))*-1 + 1px))\n}\n.slider-vertical .slider-origin>.slider-tooltip-left{\n right:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-height, 6px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) - 1px)\n}\n.slider-vertical .slider-origin>.slider-tooltip-right{\n left:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-height, 6px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) - var(--slider-height, 6px) + 1px)\n}\n";
|
|
11887
12475
|
|
|
11888
12476
|
const _style_1 = "/* In your Vue component's <style> section */\n:host {\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n::slotted(*) {\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n/* Ensure paragraphs can be selected across boundaries */\n::slotted(p) {\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n display: block;\n /* Avoid inline-block which can break selection */\n}";
|
|
11889
12477
|
|
|
11890
12478
|
const _hoisted_1 = { class: "text-white text-center text-sm" };
|
|
11891
12479
|
const _hoisted_2 = { class: "text-white text-center text-xs" };
|
|
11892
|
-
|
|
12480
|
+
const _hoisted_3 = {
|
|
12481
|
+
key: 0,
|
|
12482
|
+
class: "search-highlights",
|
|
12483
|
+
"aria-hidden": "true"
|
|
12484
|
+
};
|
|
12485
|
+
|
|
11893
12486
|
|
|
11894
12487
|
const _sfc_main = {
|
|
11895
12488
|
__name: 'App.ce',
|
|
11896
|
-
props: {
|
|
11897
|
-
bookTitle: String,
|
|
11898
|
-
bookContent: String,
|
|
11899
|
-
readerSettings: String,
|
|
11900
|
-
readerBlocked: Boolean,
|
|
11901
|
-
rootClass: {
|
|
11902
|
-
type: String,
|
|
11903
|
-
default: ''
|
|
11904
|
-
},
|
|
11905
|
-
cssFile: String,
|
|
11906
|
-
cssString: String
|
|
12489
|
+
props: {
|
|
12490
|
+
bookTitle: String,
|
|
12491
|
+
bookContent: String,
|
|
12492
|
+
readerSettings: String,
|
|
12493
|
+
readerBlocked: Boolean,
|
|
12494
|
+
rootClass: {
|
|
12495
|
+
type: String,
|
|
12496
|
+
default: ''
|
|
12497
|
+
},
|
|
12498
|
+
cssFile: String,
|
|
12499
|
+
cssString: String
|
|
11907
12500
|
},
|
|
11908
12501
|
setup(__props) {
|
|
11909
|
-
|
|
11910
|
-
const props = __props;
|
|
11911
|
-
|
|
11912
|
-
const { baseFont, bookTitle, chapterTitle, textFont, fontSize, columns, setColumns, mode } = useReaderSettings;
|
|
11913
|
-
const { currentPage, totalPages } = usePagination;
|
|
11914
|
-
const { content, listenToClicks } = useTextContent;
|
|
11915
|
-
const { width, height } = useWindowSize();
|
|
11916
|
-
|
|
11917
|
-
const readerComponent = ref(null);
|
|
11918
|
-
const contentArea = ref(null);
|
|
12502
|
+
|
|
12503
|
+
const props = __props;
|
|
12504
|
+
|
|
12505
|
+
const { baseFont, bookTitle, chapterTitle, textFont, fontSize, columns, setColumns, mode } = useReaderSettings;
|
|
12506
|
+
const { currentPage, totalPages, changeSource } = usePagination;
|
|
12507
|
+
const { content, listenToClicks } = useTextContent;
|
|
12508
|
+
const { width, height } = useWindowSize();
|
|
12509
|
+
|
|
12510
|
+
const readerComponent = ref(null);
|
|
12511
|
+
const contentArea = ref(null);
|
|
11919
12512
|
const rootComponent = ref(null);
|
|
12513
|
+
const search = useSearch(rootComponent, readerComponent, contentArea);
|
|
12514
|
+
provide(searchKey, search);
|
|
11920
12515
|
let paginationRevision = 0;
|
|
12516
|
+
let hostElement = null;
|
|
11921
12517
|
|
|
11922
|
-
function
|
|
11923
|
-
const
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
if (targetPage)
|
|
11950
|
-
usePagination.set(targetPage);
|
|
11951
|
-
else
|
|
11952
|
-
syncReadingProgress(true);
|
|
11953
|
-
|
|
11954
|
-
useReadingProgress.resume();
|
|
11955
|
-
useReadingProgress.save(currentPage.value, nextTotal);
|
|
11956
|
-
}));
|
|
12518
|
+
function getState() {
|
|
12519
|
+
const currentChapter = useTextContent.context.value.chapter;
|
|
12520
|
+
return {
|
|
12521
|
+
pagination: {
|
|
12522
|
+
currentPage: currentPage.value,
|
|
12523
|
+
totalPages: totalPages.value,
|
|
12524
|
+
progress: totalPages.value > 1
|
|
12525
|
+
? (currentPage.value - 1) / (totalPages.value - 1)
|
|
12526
|
+
: 0
|
|
12527
|
+
},
|
|
12528
|
+
settings: {
|
|
12529
|
+
baseFont: baseFont.value,
|
|
12530
|
+
textFont: textFont.value,
|
|
12531
|
+
fontSize: fontSize.value,
|
|
12532
|
+
columns: columns.value,
|
|
12533
|
+
mode: mode.value,
|
|
12534
|
+
blocked: useReaderSettings.blocked.value,
|
|
12535
|
+
searchEnabled: search.enabled.value,
|
|
12536
|
+
readingProgressEnabled: useReaderSettings.readingProgressEnabled.value
|
|
12537
|
+
},
|
|
12538
|
+
content: {
|
|
12539
|
+
bookTitle: props.bookTitle || bookTitle.value,
|
|
12540
|
+
chapterTitle: chapterTitle.value,
|
|
12541
|
+
chapter: currentChapter ? { ...currentChapter } : null
|
|
12542
|
+
}
|
|
12543
|
+
}
|
|
11957
12544
|
}
|
|
11958
12545
|
|
|
11959
|
-
function
|
|
11960
|
-
|
|
11961
|
-
|
|
12546
|
+
function dispatchPublicEvent(name, detail = {}) {
|
|
12547
|
+
if (!hostElement)
|
|
12548
|
+
return
|
|
11962
12549
|
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
12550
|
+
hostElement.dispatchEvent(new CustomEvent(`paginar:${name}`, {
|
|
12551
|
+
bubbles: true,
|
|
12552
|
+
composed: true,
|
|
12553
|
+
detail: { ...detail, state: getState() }
|
|
12554
|
+
}));
|
|
11966
12555
|
}
|
|
11967
12556
|
|
|
12557
|
+
provide(publicEventKey, dispatchPublicEvent);
|
|
12558
|
+
|
|
12559
|
+
function syncReadingProgress(allowRestore = false) {
|
|
12560
|
+
const targetPage = useReadingProgress.sync(
|
|
12561
|
+
currentPage.value,
|
|
12562
|
+
totalPages.value,
|
|
12563
|
+
allowRestore
|
|
12564
|
+
);
|
|
12565
|
+
if (targetPage)
|
|
12566
|
+
usePagination.set(targetPage, 'reading-progress');
|
|
12567
|
+
}
|
|
12568
|
+
|
|
12569
|
+
function estimatePagesAndSyncProgress() {
|
|
12570
|
+
const revision = ++paginationRevision;
|
|
12571
|
+
const previousPage = currentPage.value;
|
|
12572
|
+
const previousTotal = totalPages.value;
|
|
12573
|
+
useReadingProgress.suspend();
|
|
12574
|
+
const nextTotal = useEstimatePages.estimate(readerComponent, contentArea);
|
|
12575
|
+
|
|
12576
|
+
nextTick(() => requestAnimationFrame(() => {
|
|
12577
|
+
if (revision !== paginationRevision)
|
|
12578
|
+
return
|
|
12579
|
+
|
|
12580
|
+
const targetPage = useReadingProgress.repaginate(
|
|
12581
|
+
previousPage,
|
|
12582
|
+
previousTotal,
|
|
12583
|
+
nextTotal
|
|
12584
|
+
);
|
|
12585
|
+
|
|
12586
|
+
if (targetPage)
|
|
12587
|
+
usePagination.set(targetPage, 'repagination');
|
|
12588
|
+
else
|
|
12589
|
+
syncReadingProgress(true);
|
|
12590
|
+
|
|
12591
|
+
useReadingProgress.resume();
|
|
12592
|
+
useReadingProgress.save(currentPage.value, nextTotal);
|
|
12593
|
+
search.measure();
|
|
12594
|
+
}));
|
|
12595
|
+
}
|
|
12596
|
+
|
|
12597
|
+
function saveCurrentReadingProgress() {
|
|
12598
|
+
useReadingProgress.save(currentPage.value, totalPages.value);
|
|
12599
|
+
}
|
|
12600
|
+
|
|
12601
|
+
function saveReadingProgressWhenHidden() {
|
|
12602
|
+
if (document.visibilityState === 'hidden')
|
|
12603
|
+
saveCurrentReadingProgress();
|
|
12604
|
+
}
|
|
12605
|
+
|
|
11968
12606
|
onMounted(async () => {
|
|
12607
|
+
hostElement = rootComponent.value?.getRootNode()?.host || null;
|
|
12608
|
+
if (hostElement) {
|
|
12609
|
+
hostElement.getState = getState;
|
|
12610
|
+
hostElement.goToPage = page => usePagination.set(page, 'api');
|
|
12611
|
+
hostElement.nextPage = () => usePagination.next(false, 'api');
|
|
12612
|
+
hostElement.previousPage = () => usePagination.prev(false, 'api');
|
|
12613
|
+
}
|
|
11969
12614
|
useReaderSettings.initSettings(props.readerSettings);
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
props.
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
12615
|
+
search.init(props.readerSettings);
|
|
12616
|
+
useReadingProgress.init(
|
|
12617
|
+
props.readerSettings,
|
|
12618
|
+
props.bookTitle || bookTitle.value
|
|
12619
|
+
);
|
|
12620
|
+
usePagination.init(readerComponent, contentArea, estimatePagesAndSyncProgress);
|
|
12621
|
+
requestAnimationFrame(() => {
|
|
12622
|
+
estimatePagesAndSyncProgress();
|
|
12623
|
+
});
|
|
12624
|
+
useStyles.initStyles(props, rootComponent);
|
|
12625
|
+
window.addEventListener('pagehide', saveCurrentReadingProgress);
|
|
12626
|
+
document.addEventListener('visibilitychange', saveReadingProgressWhenHidden);
|
|
12627
|
+
|
|
11982
12628
|
if (['string', 'boolean'].includes(typeof props.readerBlocked)) {
|
|
11983
|
-
useReaderSettings.setBlocked(props.readerBlocked);
|
|
12629
|
+
useReaderSettings.setBlocked(props.readerBlocked);
|
|
11984
12630
|
}
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
12631
|
+
nextTick(() => requestAnimationFrame(() => dispatchPublicEvent('ready')));
|
|
12632
|
+
|
|
12633
|
+
});
|
|
12634
|
+
|
|
11988
12635
|
onBeforeUnmount(() => {
|
|
11989
|
-
window.removeEventListener('pagehide', saveCurrentReadingProgress);
|
|
12636
|
+
window.removeEventListener('pagehide', saveCurrentReadingProgress);
|
|
11990
12637
|
document.removeEventListener('visibilitychange', saveReadingProgressWhenHidden);
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
if (props.hasOwnProperty('readerBlocked')) {
|
|
11997
|
-
const readerBlocked = typeof props.readerBlocked === 'boolean'
|
|
11998
|
-
? props.readerBlocked
|
|
11999
|
-
: props.readerBlocked === 'true';
|
|
12000
|
-
useReaderSettings.setBlocked(readerBlocked);
|
|
12001
|
-
}
|
|
12638
|
+
if (hostElement) {
|
|
12639
|
+
delete hostElement.getState;
|
|
12640
|
+
delete hostElement.goToPage;
|
|
12641
|
+
delete hostElement.nextPage;
|
|
12642
|
+
delete hostElement.previousPage;
|
|
12002
12643
|
}
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
}
|
|
12015
|
-
}
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
12644
|
+
hostElement = null;
|
|
12645
|
+
});
|
|
12646
|
+
|
|
12647
|
+
watch(
|
|
12648
|
+
props,
|
|
12649
|
+
() => {
|
|
12650
|
+
if (props.hasOwnProperty('readerBlocked')) {
|
|
12651
|
+
const readerBlocked = typeof props.readerBlocked === 'boolean'
|
|
12652
|
+
? props.readerBlocked
|
|
12653
|
+
: props.readerBlocked === 'true';
|
|
12654
|
+
useReaderSettings.setBlocked(readerBlocked);
|
|
12655
|
+
}
|
|
12656
|
+
}
|
|
12657
|
+
);
|
|
12658
|
+
|
|
12659
|
+
watchDebounced(
|
|
12660
|
+
[width, height, content, columns, fontSize, textFont],
|
|
12661
|
+
() => {
|
|
12662
|
+
if (width.value < 1024 && columns.value === 'double')
|
|
12663
|
+
setColumns('single');
|
|
12664
|
+
else {
|
|
12665
|
+
requestAnimationFrame(() => {
|
|
12666
|
+
estimatePagesAndSyncProgress();
|
|
12667
|
+
});
|
|
12668
|
+
}
|
|
12669
|
+
},
|
|
12670
|
+
{ debounce: 125, maxWait: 250 }
|
|
12671
|
+
);
|
|
12672
|
+
|
|
12019
12673
|
watch(
|
|
12020
12674
|
currentPage,
|
|
12021
|
-
() =>
|
|
12675
|
+
(value, previousValue) => {
|
|
12676
|
+
syncReadingProgress();
|
|
12677
|
+
dispatchPublicEvent('page-change', {
|
|
12678
|
+
page: value,
|
|
12679
|
+
previousPage: previousValue,
|
|
12680
|
+
source: changeSource.value
|
|
12681
|
+
});
|
|
12682
|
+
},
|
|
12022
12683
|
{ flush: 'sync' }
|
|
12023
12684
|
);
|
|
12024
12685
|
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12686
|
+
watch(
|
|
12687
|
+
[baseFont, textFont, fontSize, columns, mode, useReaderSettings.readingProgressEnabled],
|
|
12688
|
+
(values, previousValues) => {
|
|
12689
|
+
const names = ['baseFont', 'textFont', 'fontSize', 'columns', 'mode', 'readingProgressEnabled'];
|
|
12690
|
+
const changes = names.reduce((result, name, index) => {
|
|
12691
|
+
if (values[index] !== previousValues[index])
|
|
12692
|
+
result[name] = { previous: previousValues[index], value: values[index] };
|
|
12693
|
+
return result
|
|
12694
|
+
}, {});
|
|
12695
|
+
if (Object.keys(changes).length)
|
|
12696
|
+
dispatchPublicEvent('settings-change', { changes });
|
|
12697
|
+
},
|
|
12698
|
+
{ flush: 'post' }
|
|
12028
12699
|
);
|
|
12029
|
-
|
|
12700
|
+
|
|
12701
|
+
watchDebounced(content,
|
|
12702
|
+
() => listenToClicks(contentArea),
|
|
12703
|
+
{ debounce: 125, maxWait: 250 }
|
|
12704
|
+
);
|
|
12705
|
+
|
|
12030
12706
|
|
|
12031
12707
|
return (_ctx, _cache) => {
|
|
12032
12708
|
return (openBlock(), createElementBlock("div", {
|
|
@@ -12036,11 +12712,11 @@ return (_ctx, _cache) => {
|
|
|
12036
12712
|
id: "rootComponent",
|
|
12037
12713
|
ref_key: "rootComponent",
|
|
12038
12714
|
ref: rootComponent,
|
|
12039
|
-
class: normalizeClass(unref(mode)
|
|
12040
|
-
.concat(` ${props.rootClass}`)
|
|
12041
|
-
.concat(` currentPage-${unref(currentPage)}`)
|
|
12042
|
-
.concat(` totalPages-${unref(totalPages)}`)
|
|
12043
|
-
.concat(` columns-${unref(columns)}`)
|
|
12715
|
+
class: normalizeClass(unref(mode)
|
|
12716
|
+
.concat(` ${props.rootClass}`)
|
|
12717
|
+
.concat(` currentPage-${unref(currentPage)}`)
|
|
12718
|
+
.concat(` totalPages-${unref(totalPages)}`)
|
|
12719
|
+
.concat(` columns-${unref(columns)}`)
|
|
12044
12720
|
),
|
|
12045
12721
|
style: normalizeStyle(`font-family: ${unref(baseFont)}`)
|
|
12046
12722
|
}, [
|
|
@@ -12089,7 +12765,23 @@ return (_ctx, _cache) => {
|
|
|
12089
12765
|
], 4)
|
|
12090
12766
|
]),
|
|
12091
12767
|
_: 3
|
|
12092
|
-
})
|
|
12768
|
+
}),
|
|
12769
|
+
(unref(search).open.value)
|
|
12770
|
+
? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
12771
|
+
createBaseVNode("div", {
|
|
12772
|
+
class: normalizeClass(["search-highlight-track", { 'search-navigation': unref(changeSource) === 'search' }]),
|
|
12773
|
+
style: normalizeStyle({ transform: `translateX(-${100 * (unref(currentPage) - 1)}%)` })
|
|
12774
|
+
}, [
|
|
12775
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(search).rectangles.value, (rectangle) => {
|
|
12776
|
+
return (openBlock(), createElementBlock("span", {
|
|
12777
|
+
key: rectangle.key,
|
|
12778
|
+
class: normalizeClass(["search-highlight", { 'search-highlight-active': rectangle.active }]),
|
|
12779
|
+
style: normalizeStyle(rectangle.style)
|
|
12780
|
+
}, null, 6))
|
|
12781
|
+
}), 128))
|
|
12782
|
+
], 6)
|
|
12783
|
+
]))
|
|
12784
|
+
: createCommentVNode("", true)
|
|
12093
12785
|
], 512)
|
|
12094
12786
|
]),
|
|
12095
12787
|
_: 3
|
|
@@ -12108,7 +12800,7 @@ return (_ctx, _cache) => {
|
|
|
12108
12800
|
};
|
|
12109
12801
|
const App = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0,_style_1]]]);
|
|
12110
12802
|
|
|
12111
|
-
const tailwindStyles = "*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n/*\n! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com\n*/\n\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box;\n /* 1 */\n border-width: 0;\n /* 2 */\n border-style: solid;\n /* 2 */\n border-color: #e5e7eb;\n /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5;\n /* 1 */\n -webkit-text-size-adjust: 100%;\n /* 2 */\n -moz-tab-size: 4;\n /* 3 */\n -o-tab-size: 4;\n tab-size: 4;\n /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n /* 4 */\n font-feature-settings: normal;\n /* 5 */\n font-variation-settings: normal;\n /* 6 */\n -webkit-tap-highlight-color: transparent;\n /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0;\n /* 1 */\n line-height: inherit;\n /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0;\n /* 1 */\n color: inherit;\n /* 2 */\n border-top-width: 1px;\n /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n /* 1 */\n font-feature-settings: normal;\n /* 2 */\n font-variation-settings: normal;\n /* 3 */\n font-size: 1em;\n /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0;\n /* 1 */\n border-color: inherit;\n /* 2 */\n border-collapse: collapse;\n /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit;\n /* 1 */\n font-feature-settings: inherit;\n /* 1 */\n font-variation-settings: inherit;\n /* 1 */\n font-size: 100%;\n /* 1 */\n font-weight: inherit;\n /* 1 */\n line-height: inherit;\n /* 1 */\n letter-spacing: inherit;\n /* 1 */\n color: inherit;\n /* 1 */\n margin: 0;\n /* 2 */\n padding: 0;\n /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button;\n /* 1 */\n background-color: transparent;\n /* 2 */\n background-image: none;\n /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield;\n /* 1 */\n outline-offset: -2px;\n /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n /* 1 */\n font: inherit;\n /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\n\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1;\n /* 1 */\n color: #9ca3af;\n /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1;\n /* 1 */\n color: #9ca3af;\n /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n /* 1 */\n vertical-align: middle;\n /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.-right-2 {\n right: -0.5rem;\n}\n\n.bottom-0 {\n bottom: 0px;\n}\n\n.right-0 {\n right: 0px;\n}\n\n.right-8 {\n right: 2rem;\n}\n\n.top-0 {\n top: 0px;\n}\n\n.top-14 {\n top: 3.5rem;\n}\n\n.top-4 {\n top: 1rem;\n}\n\n.z-10 {\n z-index: 10;\n}\n\n.z-20 {\n z-index: 20;\n}\n\n.z-40 {\n z-index: 40;\n}\n\n.col-span-1 {\n grid-column: span 1 / span 1;\n}\n\n.col-span-2 {\n grid-column: span 2 / span 2;\n}\n\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n.my-3 {\n margin-top: 0.75rem;\n margin-bottom: 0.75rem;\n}\n\n.my-8 {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem;\n}\n\n.mb-6 {\n margin-bottom: 1.5rem;\n}\n\n.ml-10 {\n margin-left: 2.5rem;\n}\n\n.ml-3 {\n margin-left: 0.75rem;\n}\n\n.ml-4 {\n margin-left: 1rem;\n}\n\n.mr-3 {\n margin-right: 0.75rem;\n}\n\n.mt-1 {\n margin-top: 0.25rem;\n}\n\n.mt-3 {\n margin-top: 0.75rem;\n}\n\n.mt-5 {\n margin-top: 1.25rem;\n}\n\n.block {\n display: block;\n}\n\n.inline-block {\n display: inline-block;\n}\n\n.flex {\n display: flex;\n}\n\n.inline-flex {\n display: inline-flex;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.h-10 {\n height: 2.5rem;\n}\n\n.h-5 {\n height: 1.25rem;\n}\n\n.h-6 {\n height: 1.5rem;\n}\n\n.h-8 {\n height: 2rem;\n}\n\n.h-full {\n height: 100%;\n}\n\n.h-screen {\n height: 100vh;\n}\n\n.w-11 {\n width: 2.75rem;\n}\n\n.w-4\\/5 {\n width: 80%;\n}\n\n.w-5 {\n width: 1.25rem;\n}\n\n.w-6 {\n width: 1.5rem;\n}\n\n.w-60 {\n width: 15rem;\n}\n\n.w-8 {\n width: 2rem;\n}\n\n.w-96 {\n width: 24rem;\n}\n\n.w-full {\n width: 100%;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n\n.translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-x-5 {\n --tw-translate-x: 1.25rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-95 {\n --tw-scale-x: .95;\n --tw-scale-y: .95;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.cursor-default {\n cursor: default;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.grid-cols-4 {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-2 {\n gap: 0.5rem;\n}\n\n.divide-opacity-75 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 0.75;\n}\n\n.self-end {\n align-self: flex-end;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.overflow-x-hidden {\n overflow-x: hidden;\n}\n\n.rounded {\n border-radius: 0.25rem;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.rounded-sm {\n border-radius: 0.125rem;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-2 {\n border-width: 2px;\n}\n\n.border-b {\n border-bottom-width: 1px;\n}\n\n.border-t {\n border-top-width: 1px;\n}\n\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity, 1));\n}\n\n.border-transparent {\n border-color: transparent;\n}\n\n.border-white {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n\n.border-b-white\\/25 {\n border-bottom-color: rgb(255 255 255 / 0.25);\n}\n\n.bg-gray-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(209 213 219 / var(--tw-bg-opacity, 1));\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n\n.p-10 {\n padding: 2.5rem;\n}\n\n.p-3 {\n padding: 0.75rem;\n}\n\n.p-4 {\n padding: 1rem;\n}\n\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n.px-10 {\n padding-left: 2.5rem;\n padding-right: 2.5rem;\n}\n\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n\n.pl-4 {\n padding-left: 1rem;\n}\n\n.pt-10 {\n padding-top: 2.5rem;\n}\n\n.pt-5 {\n padding-top: 1.25rem;\n}\n\n.text-left {\n text-align: left;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.font-light {\n font-weight: 300;\n}\n\n.lowercase {\n text-transform: lowercase;\n}\n\n.tracking-wide {\n letter-spacing: 0.025em;\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity, 1));\n}\n\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1));\n}\n\n.text-gray-700 {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity, 1));\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-100 {\n opacity: 1;\n}\n\n.opacity-30 {\n opacity: 0.3;\n}\n\n.opacity-50 {\n opacity: 0.5;\n}\n\n.opacity-75 {\n opacity: 0.75;\n}\n\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.shadow-2xl {\n --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.transition-transform {\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.duration-100 {\n transition-duration: 100ms;\n}\n\n.duration-200 {\n transition-duration: 200ms;\n}\n\n.duration-75 {\n transition-duration: 75ms;\n}\n\n.ease-in {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n}\n\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n\n.last\\:border-transparent:last-child {\n border-color: transparent;\n}\n\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\n\n@media (min-width: 768px) {\n .md\\:bottom-14 {\n bottom: 3.5rem;\n }\n\n .md\\:right-16 {\n right: 4rem;\n }\n\n .md\\:right-3 {\n right: 0.75rem;\n }\n\n .md\\:flex {\n display: flex;\n }\n\n .md\\:grid {\n display: grid;\n }\n\n .md\\:w-2\\/5 {\n width: 40%;\n }\n\n .md\\:w-\\[40em\\] {\n width: 40em;\n }\n\n .md\\:px-24 {\n padding-left: 6rem;\n padding-right: 6rem;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n .dark\\:text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n }\n}";
|
|
12803
|
+
const tailwindStyles = "*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n/*\n! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com\n*/\n\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box;\n /* 1 */\n border-width: 0;\n /* 2 */\n border-style: solid;\n /* 2 */\n border-color: #e5e7eb;\n /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5;\n /* 1 */\n -webkit-text-size-adjust: 100%;\n /* 2 */\n -moz-tab-size: 4;\n /* 3 */\n -o-tab-size: 4;\n tab-size: 4;\n /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n /* 4 */\n font-feature-settings: normal;\n /* 5 */\n font-variation-settings: normal;\n /* 6 */\n -webkit-tap-highlight-color: transparent;\n /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0;\n /* 1 */\n line-height: inherit;\n /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0;\n /* 1 */\n color: inherit;\n /* 2 */\n border-top-width: 1px;\n /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n /* 1 */\n font-feature-settings: normal;\n /* 2 */\n font-variation-settings: normal;\n /* 3 */\n font-size: 1em;\n /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0;\n /* 1 */\n border-color: inherit;\n /* 2 */\n border-collapse: collapse;\n /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit;\n /* 1 */\n font-feature-settings: inherit;\n /* 1 */\n font-variation-settings: inherit;\n /* 1 */\n font-size: 100%;\n /* 1 */\n font-weight: inherit;\n /* 1 */\n line-height: inherit;\n /* 1 */\n letter-spacing: inherit;\n /* 1 */\n color: inherit;\n /* 1 */\n margin: 0;\n /* 2 */\n padding: 0;\n /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button;\n /* 1 */\n background-color: transparent;\n /* 2 */\n background-image: none;\n /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield;\n /* 1 */\n outline-offset: -2px;\n /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n /* 1 */\n font: inherit;\n /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\n\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1;\n /* 1 */\n color: #9ca3af;\n /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1;\n /* 1 */\n color: #9ca3af;\n /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n /* 1 */\n vertical-align: middle;\n /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.-right-2 {\n right: -0.5rem;\n}\n\n.bottom-0 {\n bottom: 0px;\n}\n\n.right-0 {\n right: 0px;\n}\n\n.right-8 {\n right: 2rem;\n}\n\n.top-0 {\n top: 0px;\n}\n\n.top-14 {\n top: 3.5rem;\n}\n\n.top-4 {\n top: 1rem;\n}\n\n.z-10 {\n z-index: 10;\n}\n\n.z-20 {\n z-index: 20;\n}\n\n.z-40 {\n z-index: 40;\n}\n\n.col-span-1 {\n grid-column: span 1 / span 1;\n}\n\n.col-span-2 {\n grid-column: span 2 / span 2;\n}\n\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n.my-3 {\n margin-top: 0.75rem;\n margin-bottom: 0.75rem;\n}\n\n.my-8 {\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem;\n}\n\n.mb-6 {\n margin-bottom: 1.5rem;\n}\n\n.ml-10 {\n margin-left: 2.5rem;\n}\n\n.ml-3 {\n margin-left: 0.75rem;\n}\n\n.ml-4 {\n margin-left: 1rem;\n}\n\n.mr-3 {\n margin-right: 0.75rem;\n}\n\n.mt-1 {\n margin-top: 0.25rem;\n}\n\n.mt-3 {\n margin-top: 0.75rem;\n}\n\n.mt-5 {\n margin-top: 1.25rem;\n}\n\n.block {\n display: block;\n}\n\n.inline-block {\n display: inline-block;\n}\n\n.inline {\n display: inline;\n}\n\n.flex {\n display: flex;\n}\n\n.inline-flex {\n display: inline-flex;\n}\n\n.grid {\n display: grid;\n}\n\n.contents {\n display: contents;\n}\n\n.hidden {\n display: none;\n}\n\n.h-10 {\n height: 2.5rem;\n}\n\n.h-4 {\n height: 1rem;\n}\n\n.h-5 {\n height: 1.25rem;\n}\n\n.h-6 {\n height: 1.5rem;\n}\n\n.h-8 {\n height: 2rem;\n}\n\n.h-full {\n height: 100%;\n}\n\n.h-screen {\n height: 100vh;\n}\n\n.w-11 {\n width: 2.75rem;\n}\n\n.w-4 {\n width: 1rem;\n}\n\n.w-4\\/5 {\n width: 80%;\n}\n\n.w-5 {\n width: 1.25rem;\n}\n\n.w-6 {\n width: 1.5rem;\n}\n\n.w-60 {\n width: 15rem;\n}\n\n.w-8 {\n width: 2rem;\n}\n\n.w-96 {\n width: 24rem;\n}\n\n.w-full {\n width: 100%;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n\n.translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.translate-x-5 {\n --tw-translate-x: 1.25rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.scale-95 {\n --tw-scale-x: .95;\n --tw-scale-y: .95;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.cursor-default {\n cursor: default;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.grid-cols-4 {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-2 {\n gap: 0.5rem;\n}\n\n.divide-opacity-75 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 0.75;\n}\n\n.self-end {\n align-self: flex-end;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.overflow-x-hidden {\n overflow-x: hidden;\n}\n\n.rounded {\n border-radius: 0.25rem;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.rounded-sm {\n border-radius: 0.125rem;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-2 {\n border-width: 2px;\n}\n\n.border-b {\n border-bottom-width: 1px;\n}\n\n.border-t {\n border-top-width: 1px;\n}\n\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity, 1));\n}\n\n.border-transparent {\n border-color: transparent;\n}\n\n.border-white {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity, 1));\n}\n\n.border-b-white\\/25 {\n border-bottom-color: rgb(255 255 255 / 0.25);\n}\n\n.bg-gray-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(209 213 219 / var(--tw-bg-opacity, 1));\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));\n}\n\n.p-10 {\n padding: 2.5rem;\n}\n\n.p-3 {\n padding: 0.75rem;\n}\n\n.p-4 {\n padding: 1rem;\n}\n\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n.px-10 {\n padding-left: 2.5rem;\n padding-right: 2.5rem;\n}\n\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n\n.pl-4 {\n padding-left: 1rem;\n}\n\n.pt-10 {\n padding-top: 2.5rem;\n}\n\n.pt-5 {\n padding-top: 1.25rem;\n}\n\n.text-left {\n text-align: left;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.font-light {\n font-weight: 300;\n}\n\n.lowercase {\n text-transform: lowercase;\n}\n\n.tracking-wide {\n letter-spacing: 0.025em;\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity, 1));\n}\n\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1));\n}\n\n.text-gray-700 {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity, 1));\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-100 {\n opacity: 1;\n}\n\n.opacity-30 {\n opacity: 0.3;\n}\n\n.opacity-50 {\n opacity: 0.5;\n}\n\n.opacity-75 {\n opacity: 0.75;\n}\n\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.shadow-2xl {\n --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.transition-transform {\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.duration-100 {\n transition-duration: 100ms;\n}\n\n.duration-200 {\n transition-duration: 200ms;\n}\n\n.duration-75 {\n transition-duration: 75ms;\n}\n\n.ease-in {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n}\n\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n\n.last\\:border-transparent:last-child {\n border-color: transparent;\n}\n\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));\n}\n\n@media (min-width: 768px) {\n .md\\:bottom-14 {\n bottom: 3.5rem;\n }\n\n .md\\:right-16 {\n right: 4rem;\n }\n\n .md\\:right-3 {\n right: 0.75rem;\n }\n\n .md\\:flex {\n display: flex;\n }\n\n .md\\:grid {\n display: grid;\n }\n\n .md\\:w-2\\/5 {\n width: 40%;\n }\n\n .md\\:w-\\[40em\\] {\n width: 40em;\n }\n\n .md\\:px-24 {\n padding-left: 6rem;\n padding-right: 6rem;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n .dark\\:text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n }\n}";
|
|
12112
12804
|
|
|
12113
12805
|
// https://maximomussini.com/posts/vue-custom-elements
|
|
12114
12806
|
|