@eternalheart/vue-file-preview 1.6.12 → 1.6.13

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.
Files changed (51) hide show
  1. package/README.md +2 -0
  2. package/README.zh-CN.md +2 -0
  3. package/lib/FilePreviewContent.vue.d.ts +9 -1
  4. package/lib/FilePreviewEmbed.vue.d.ts +4 -1
  5. package/lib/FilePreviewModal.vue.d.ts +4 -1
  6. package/lib/chunks/EmptyState.vue_vue_type_script_setup_true_lang-C7qk6wj0.mjs +20 -0
  7. package/lib/chunks/RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs +32 -0
  8. package/lib/chunks/{avifLoader-CAUzjn-d-CTy7cevh.mjs → avifLoader-CAUzjn-d-C0KRpetN.mjs} +1 -1
  9. package/lib/chunks/{heicLoader-D_9PukkA-DdDu94xL.mjs → heicLoader-D_9PukkA-Czof_5FJ.mjs} +1 -1
  10. package/lib/chunks/{index-CLM9sOKN.mjs → index--612Smof.mjs} +112 -112
  11. package/lib/chunks/{index-De-oaCgN.mjs → index-8Vpbg2kS.mjs} +2 -2
  12. package/lib/chunks/{index-2VQLB2Mi.mjs → index-B21EAyWz.mjs} +53 -49
  13. package/lib/chunks/{index-DmEMePjL.mjs → index-BASg1cr4.mjs} +2 -2
  14. package/lib/chunks/index-BB0i4QqI.mjs +117 -0
  15. package/lib/chunks/{index-Bmqn45d_.mjs → index-BVdrGK3Q.mjs} +72 -72
  16. package/lib/chunks/index-BlrFFeqc.mjs +330 -0
  17. package/lib/chunks/index-Bp9CuvMZ.mjs +157 -0
  18. package/lib/chunks/{index-i-KacQvS.mjs → index-BuqPb5mP.mjs} +3 -3
  19. package/lib/chunks/{index-DVG1fZAv.mjs → index-BvBqDq3O.mjs} +2 -2
  20. package/lib/chunks/{index-D6te_qaB.mjs → index-Bxpf9v5j.mjs} +26 -26
  21. package/lib/chunks/{index-D9z6lQat.mjs → index-C9mAajbD.mjs} +225 -220
  22. package/lib/chunks/{index-CM11hSQu.mjs → index-CDg6vIbT.mjs} +11 -11
  23. package/lib/chunks/{index-BxmX005K.mjs → index-CWE-hKSs.mjs} +11 -11
  24. package/lib/chunks/{index-BPmyF7Wr.mjs → index-CY3xzGgt.mjs} +18 -18
  25. package/lib/chunks/{index-t9kSzzMg.mjs → index-CxKZKUJj.mjs} +521 -523
  26. package/lib/chunks/{index-CuiEjR23.mjs → index-D30L8tm9.mjs} +15 -15
  27. package/lib/chunks/{index-DOAOk6m5.mjs → index-DN4Ui0Gh.mjs} +11 -11
  28. package/lib/chunks/{index-CEk6FKm3.mjs → index-DZZN3kYi.mjs} +551 -531
  29. package/lib/chunks/{index-D6Pjjxi0.mjs → index-Dkro_8Fy.mjs} +20 -20
  30. package/lib/chunks/{index-CiGUKdlt.mjs → index-VdzIFJJW.mjs} +23 -23
  31. package/lib/chunks/{index-WcAnJA2t.mjs → index-aoXgVLBb.mjs} +14 -14
  32. package/lib/chunks/{jp2Loader-Dig19xyo-BBR3tcPW.mjs → jp2Loader-Dig19xyo-CKUaGhPl.mjs} +1 -1
  33. package/lib/chunks/{psdLoader-C0tKUXXl-DGOmJwkQ.mjs → psdLoader-C0tKUXXl-CYWoQis5.mjs} +1 -1
  34. package/lib/chunks/{rawLoader-C-tPeFAB-CrCtXMup.mjs → rawLoader-C-tPeFAB-C35zC8nZ.mjs} +1 -1
  35. package/lib/chunks/{tiffLoader-BlhByX8w-jsxHlbyu.mjs → tiffLoader-BlhByX8w-BOxg_Du5.mjs} +1 -1
  36. package/lib/chunks/{useShikiHighlight-BdhPCj48.mjs → useShikiHighlight-BPmcxA-h.mjs} +1 -1
  37. package/lib/index.cjs +59 -59
  38. package/lib/index.css +1 -1
  39. package/lib/index.d.ts +1 -1
  40. package/lib/index.mjs +4 -4
  41. package/lib/renderers/EmptyState.vue.d.ts +2 -0
  42. package/lib/renderers/Json/index.vue.d.ts +5 -0
  43. package/lib/renderers/Pptx/index.vue.d.ts +3 -0
  44. package/lib/renderers/Text/index.vue.d.ts +3 -0
  45. package/lib/renderers/Xlsx/index.vue.d.ts +3 -0
  46. package/lib/renderers/registry.d.ts +3 -1
  47. package/package.json +1 -1
  48. package/lib/chunks/RendererError.vue_vue_type_script_setup_true_lang-BNoENOWX.mjs +0 -30
  49. package/lib/chunks/index-Bfg5zM8l.mjs +0 -141
  50. package/lib/chunks/index-Cud9j9Xy.mjs +0 -322
  51. package/lib/chunks/index-D4jhvs5m.mjs +0 -113
@@ -1,7 +1,7 @@
1
- import { inject as fM, computed as p, unref as L, provide as aM, ref as wM, watch as TM, onBeforeUnmount as dM, defineComponent as AM, openBlock as x, createElementBlock as c, createElementVNode as m, toDisplayString as R, defineAsyncComponent as xP, h as iP, createVNode as jM, createTextVNode as bP, onMounted as iI, Fragment as h, normalizeStyle as LM, createCommentVNode as E, toRef as GM, renderList as u, normalizeClass as pM, createBlock as f, resolveDynamicComponent as CM, mergeProps as cP, onUnmounted as ZP, Teleport as WP } from "vue";
1
+ import { inject as fM, computed as o, unref as L, provide as aM, ref as lM, watch as jM, onBeforeUnmount as xM, defineComponent as YM, openBlock as x, createElementBlock as c, createElementVNode as m, toDisplayString as R, defineAsyncComponent as xP, h as iP, createVNode as XM, createTextVNode as bP, onMounted as iI, Fragment as h, normalizeStyle as LM, createCommentVNode as E, toRef as dM, renderList as O, normalizeClass as pM, createBlock as f, resolveDynamicComponent as yM, mergeProps as cP, onUnmounted as ZP, Teleport as WP } from "vue";
2
2
  import { FileQuestion as pP, Download as YK, ChevronLeft as oP, ChevronRight as JP, X as hP } from "lucide-vue-next";
3
3
  import HP from "jszip";
4
- const mP = "1.6.12", kP = {
4
+ const mP = "1.6.13", kP = {
5
5
  version: mP
6
6
  };
7
7
  var FP = Object.defineProperty, LP = (M, I, K) => I in M ? FP(M, I, { enumerable: !0, configurable: !0, writable: !0, value: K }) : M[I] = K, HM = (M, I, K) => LP(M, typeof I != "symbol" ? I + "" : I, K);
@@ -165,6 +165,12 @@ function UP(M) {
165
165
  function zP(M, I) {
166
166
  return I !== void 0 ? I : M === "modal";
167
167
  }
168
+ function DC(M) {
169
+ return M == null ? !0 : M.trim().length === 0;
170
+ }
171
+ function GC(M, I) {
172
+ return M === "always" ? !0 : M === "never" ? !1 : I === "structured";
173
+ }
168
174
  const DK = {
169
175
  dockerfile: "dockerfile",
170
176
  makefile: "makefile"
@@ -311,7 +317,7 @@ function VP(M) {
311
317
  ];
312
318
  return P.startsWith("text/") || w.includes(I) || DK[K] || M.name.startsWith(".") && !M.name.includes("/") || !I && K ? "text" : "unsupported";
313
319
  }
314
- function DC(M) {
320
+ function dC(M) {
315
321
  const I = M.toLowerCase(), K = I.split(".").pop() || "", P = I.split(/[\\/]/).pop() || "", w = DK[P];
316
322
  if (w)
317
323
  return w;
@@ -420,7 +426,7 @@ function DC(M) {
420
426
  }
421
427
  return "text";
422
428
  }
423
- function GC(M, I) {
429
+ function xC(M, I) {
424
430
  var K;
425
431
  const P = I == null ? void 0 : I.split(";")[0].trim().toLowerCase();
426
432
  if (P != null && P.startsWith("video/")) return P;
@@ -439,26 +445,26 @@ function GC(M, I) {
439
445
  ts: "video/mp2t"
440
446
  }[w] || "video/mp4";
441
447
  }
442
- function dC(M) {
448
+ function iC(M) {
443
449
  return M < 1024 ? `${M} B` : M < 1024 * 1024 ? `${(M / 1024).toFixed(1)} KB` : `${(M / (1024 * 1024)).toFixed(1)} MB`;
444
450
  }
445
- function xC(M) {
451
+ function bC(M) {
446
452
  if (!isFinite(M) || isNaN(M) || M < 0) return "0:00";
447
453
  const I = Math.floor(M / 60), K = Math.floor(M % 60);
448
454
  return `${I}:${K.toString().padStart(2, "0")}`;
449
455
  }
450
- function iC(M) {
456
+ function cC(M) {
451
457
  var I;
452
458
  return (((I = M.split(".").pop()) == null ? void 0 : I.toLowerCase()) || "") === "tsv" ? " " : ",";
453
459
  }
454
- function bC(M, I = {}) {
460
+ function ZC(M, I = {}) {
455
461
  const K = I.delimiter ?? ",", P = I.firstRowAsHeader ?? !0, w = [];
456
462
  let l = [], C = "", g = !1, y = 0;
457
463
  const s = M.length;
458
464
  for (; y < s; ) {
459
- const X = M[y];
465
+ const j = M[y];
460
466
  if (g) {
461
- if (X === '"') {
467
+ if (j === '"') {
462
468
  if (M[y + 1] === '"') {
463
469
  C += '"', y += 2;
464
470
  continue;
@@ -466,49 +472,49 @@ function bC(M, I = {}) {
466
472
  g = !1, y += 1;
467
473
  continue;
468
474
  }
469
- C += X, y += 1;
475
+ C += j, y += 1;
470
476
  continue;
471
477
  }
472
- if (X === '"') {
478
+ if (j === '"') {
473
479
  g = !0, y += 1;
474
480
  continue;
475
481
  }
476
- if (X === K) {
482
+ if (j === K) {
477
483
  l.push(C), C = "", y += 1;
478
484
  continue;
479
485
  }
480
- if (X === "\r") {
486
+ if (j === "\r") {
481
487
  M[y + 1] === `
482
488
  ` && (y += 1), l.push(C), w.push(l), l = [], C = "", y += 1;
483
489
  continue;
484
490
  }
485
- if (X === `
491
+ if (j === `
486
492
  `) {
487
493
  l.push(C), w.push(l), l = [], C = "", y += 1;
488
494
  continue;
489
495
  }
490
- C += X, y += 1;
496
+ C += j, y += 1;
491
497
  }
492
498
  for ((C.length > 0 || l.length > 0) && (l.push(C), w.push(l)); w.length > 0; ) {
493
- const X = w[w.length - 1];
494
- if (X.length === 1 && X[0] === "")
499
+ const j = w[w.length - 1];
500
+ if (j.length === 1 && j[0] === "")
495
501
  w.pop();
496
502
  else
497
503
  break;
498
504
  }
499
505
  let S = [], T = w;
500
506
  P && w.length > 0 && (S = w[0], T = w.slice(1));
501
- const j = Math.max(
507
+ const X = Math.max(
502
508
  S.length,
503
- ...T.map((X) => X.length),
509
+ ...T.map((j) => j.length),
504
510
  0
505
511
  );
506
- for (const X of T)
507
- for (; X.length < j; ) X.push("");
512
+ for (const j of T)
513
+ for (; j.length < X; ) j.push("");
508
514
  return {
509
515
  header: S,
510
516
  rows: T,
511
- columnCount: j,
517
+ columnCount: X,
512
518
  delimiter: K
513
519
  };
514
520
  }
@@ -965,7 +971,7 @@ function eP(M) {
965
971
  }
966
972
  return new TextDecoder("utf-8", { fatal: !1 }).decode(I);
967
973
  }
968
- async function cC(M, I) {
974
+ async function WC(M, I) {
969
975
  const K = !!I && ("fetcher" in I || "init" in I || "signal" in I), P = K ? I.fetcher ?? fetch : fetch, w = K ? I.signal : void 0, l = K ? I.init : I, C = w ? { ...l, signal: w } : l, g = await P(M, C);
970
976
  if (!g.ok) throw new n("request.failed", { status: g.status });
971
977
  const y = await g.arrayBuffer();
@@ -1024,7 +1030,7 @@ function UI(M) {
1024
1030
  }
1025
1031
  return Number(I) || 0;
1026
1032
  }
1027
- function ZC(M) {
1033
+ function pC(M) {
1028
1034
  if (!isFinite(M) || M < 0) return "00:00:00.000";
1029
1035
  const I = Math.floor(M * 1e3), K = I % 1e3, P = Math.floor(I / 1e3) % 60, w = Math.floor(I / 6e4) % 60, l = Math.floor(I / 36e5), C = (g, y = 2) => g.toString().padStart(y, "0");
1030
1036
  return `${C(l)}:${C(w)}:${C(P)}.${C(K, 3)}`;
@@ -1101,8 +1107,8 @@ function Pw(M) {
1101
1107
  y.push(gI(S[1], S[2], S[3])), s = S.index + S[0].length;
1102
1108
  if (y.length === 0) continue;
1103
1109
  const T = g.slice(s).trim();
1104
- for (const j of y)
1105
- w.push({ start: j, text: T });
1110
+ for (const X of y)
1111
+ w.push({ start: X, text: T });
1106
1112
  }
1107
1113
  w.sort((C, g) => C.start - g.start);
1108
1114
  const l = K.offsetMs / 1e3;
@@ -1125,23 +1131,23 @@ function ww(M) {
1125
1131
  for (; (T = P.exec(y)) !== null && T.index === S; )
1126
1132
  s.push(gI(T[1], T[2], T[3])), S = T.index + T[0].length;
1127
1133
  if (s.length === 0) continue;
1128
- const j = y.slice(S);
1129
- for (const X of s)
1130
- l.push({ start: X, raw: j });
1134
+ const X = y.slice(S);
1135
+ for (const j of s)
1136
+ l.push({ start: j, raw: X });
1131
1137
  }
1132
1138
  l.sort((g, y) => g.start - y.start);
1133
1139
  const C = K.offsetMs / 1e3;
1134
1140
  return { format: "elrc", cues: l.map((g, y) => {
1135
1141
  const s = [];
1136
- let S = "", T = 0, j = null;
1142
+ let S = "", T = 0, X = null;
1137
1143
  w.lastIndex = 0;
1138
- let X;
1139
- for (; (X = w.exec(g.raw)) !== null; ) {
1140
- const G = g.raw.slice(T, X.index);
1141
- j !== null && G && s.push({ start: Math.max(0, j - C), text: G }), S += G, j = gI(X[1], X[2], X[3]), T = X.index + X[0].length;
1144
+ let j;
1145
+ for (; (j = w.exec(g.raw)) !== null; ) {
1146
+ const G = g.raw.slice(T, j.index);
1147
+ X !== null && G && s.push({ start: Math.max(0, X - C), text: G }), S += G, X = gI(j[1], j[2], j[3]), T = j.index + j[0].length;
1142
1148
  }
1143
1149
  const B = g.raw.slice(T);
1144
- j !== null && B && s.push({ start: Math.max(0, j - C), text: B }), S += B;
1150
+ X !== null && B && s.push({ start: Math.max(0, X - C), text: B }), S += B;
1145
1151
  const Y = Math.max(0, g.start - C), A = l[y + 1], D = A ? Math.max(Y, A.start - C) : Y + 5;
1146
1152
  return {
1147
1153
  start: Y,
@@ -1176,16 +1182,16 @@ function aI(M, I) {
1176
1182
  w = T[1].split(",").map((W) => W.trim());
1177
1183
  continue;
1178
1184
  }
1179
- const j = /^(Dialogue|Comment):\s*(.+)$/i.exec(s);
1180
- if (!j || j[1].toLowerCase() === "comment" || w.length === 0) continue;
1181
- const X = w.length, B = j[2].split(","), Y = B.slice(0, X - 1), A = B.slice(X - 1).join(","), D = {};
1185
+ const X = /^(Dialogue|Comment):\s*(.+)$/i.exec(s);
1186
+ if (!X || X[1].toLowerCase() === "comment" || w.length === 0) continue;
1187
+ const j = w.length, B = X[2].split(","), Y = B.slice(0, j - 1), A = B.slice(j - 1).join(","), D = {};
1182
1188
  w.forEach((W, H) => {
1183
- D[W] = H === X - 1 ? A : Y[H] ?? "";
1189
+ D[W] = H === j - 1 ? A : Y[H] ?? "";
1184
1190
  });
1185
- const G = fI(D.Start || ""), d = fI(D.End || ""), o = (D.Text || "").replace(/\\N/g, `
1191
+ const G = fI(D.Start || ""), d = fI(D.End || ""), p = (D.Text || "").replace(/\\N/g, `
1186
1192
  `).replace(/\\n/g, `
1187
1193
  `).replace(/\\h/g, " ").replace(/\{[^}]*\}/g, "");
1188
- l.push({ start: G, end: d, text: o, style: D.Style });
1194
+ l.push({ start: G, end: d, text: p, style: D.Style });
1189
1195
  }
1190
1196
  return l.sort((g, y) => g.start - y.start), {
1191
1197
  format: I,
@@ -1194,7 +1200,7 @@ function aI(M, I) {
1194
1200
  `).trim() || void 0
1195
1201
  };
1196
1202
  }
1197
- function sM(M) {
1203
+ function SM(M) {
1198
1204
  const I = M.trim();
1199
1205
  if (!I) return 0;
1200
1206
  const K = /^(\d+(?:\.\d+)?)(h|m|s|ms|f|t)$/i.exec(I);
@@ -1213,15 +1219,15 @@ function gw(M) {
1213
1219
  const w = [], l = /<(?:[\w-]+:)?p\b([^>]*)>([\s\S]*?)<\/(?:[\w-]+:)?p\s*>/gi;
1214
1220
  let C;
1215
1221
  for (; (C = l.exec(M)) !== null; ) {
1216
- const g = C[1], y = C[2], s = ((I = /\bbegin\s*=\s*["']([^"']+)["']/i.exec(g)) == null ? void 0 : I[1]) || "", S = ((K = /\bend\s*=\s*["']([^"']+)["']/i.exec(g)) == null ? void 0 : K[1]) || "", T = ((P = /\bdur\s*=\s*["']([^"']+)["']/i.exec(g)) == null ? void 0 : P[1]) || "", j = sM(s);
1217
- let X;
1218
- S ? X = sM(S) : T ? X = j + sM(T) : X = j + 5;
1222
+ const g = C[1], y = C[2], s = ((I = /\bbegin\s*=\s*["']([^"']+)["']/i.exec(g)) == null ? void 0 : I[1]) || "", S = ((K = /\bend\s*=\s*["']([^"']+)["']/i.exec(g)) == null ? void 0 : K[1]) || "", T = ((P = /\bdur\s*=\s*["']([^"']+)["']/i.exec(g)) == null ? void 0 : P[1]) || "", X = SM(s);
1223
+ let j;
1224
+ S ? j = SM(S) : T ? j = X + SM(T) : j = X + 5;
1219
1225
  const B = lw(
1220
1226
  y.replace(/<(?:[\w-]+:)?br\s*\/?>/gi, `
1221
1227
  `).replace(/<[^>]+>/g, "")
1222
1228
  ).replace(/[ \t]+/g, " ").replace(/\n /g, `
1223
1229
  `).trim();
1224
- (B || j || X) && w.push({ start: j, end: X, text: B });
1230
+ (B || X || j) && w.push({ start: X, end: j, text: B });
1225
1231
  }
1226
1232
  return w.sort((g, y) => g.start - y.start), { format: "ttml", cues: w };
1227
1233
  }
@@ -1234,22 +1240,22 @@ function Cw(M) {
1234
1240
  if (P.length > 0) {
1235
1241
  const w = [];
1236
1242
  for (let l = 0; l < P.length; l++) {
1237
- const C = P[l], g = C.getAttribute("begin") || "", y = C.getAttribute("end") || "", s = C.getAttribute("dur") || "", S = sM(g);
1243
+ const C = P[l], g = C.getAttribute("begin") || "", y = C.getAttribute("end") || "", s = C.getAttribute("dur") || "", S = SM(g);
1238
1244
  let T;
1239
- y ? T = sM(y) : s ? T = S + sM(s) : T = S + 5;
1240
- let j = "";
1245
+ y ? T = SM(y) : s ? T = S + SM(s) : T = S + 5;
1246
+ let X = "";
1241
1247
  C.childNodes.forEach((B) => {
1242
1248
  if (B.nodeType === 3)
1243
- j += B.nodeValue || "";
1249
+ X += B.nodeValue || "";
1244
1250
  else if (B.nodeType === 1) {
1245
1251
  const Y = B;
1246
- (Y.localName || Y.tagName).toLowerCase() === "br" ? j += `
1247
- ` : j += Y.textContent || "";
1252
+ (Y.localName || Y.tagName).toLowerCase() === "br" ? X += `
1253
+ ` : X += Y.textContent || "";
1248
1254
  }
1249
1255
  });
1250
- const X = j.replace(/[ \t]+/g, " ").replace(/\n /g, `
1256
+ const j = X.replace(/[ \t]+/g, " ").replace(/\n /g, `
1251
1257
  `).trim();
1252
- (X || S || T) && w.push({ start: S, end: T, text: X });
1258
+ (j || S || T) && w.push({ start: S, end: T, text: j });
1253
1259
  }
1254
1260
  return w.sort((l, C) => l.start - C.start), { format: "ttml", cues: w };
1255
1261
  }
@@ -1257,7 +1263,7 @@ function Cw(M) {
1257
1263
  }
1258
1264
  return gw(I);
1259
1265
  }
1260
- function WC(M, I) {
1266
+ function oC(M, I) {
1261
1267
  switch (I ?? Kw(M)) {
1262
1268
  case "lrc":
1263
1269
  return Pw(M);
@@ -1279,7 +1285,7 @@ function WC(M, I) {
1279
1285
  async function iK(M) {
1280
1286
  return HP.loadAsync(M);
1281
1287
  }
1282
- function pC(M) {
1288
+ function JC(M) {
1283
1289
  const I = [];
1284
1290
  return M.forEach((K, P) => {
1285
1291
  var w;
@@ -1294,7 +1300,7 @@ function pC(M) {
1294
1300
  });
1295
1301
  }), I;
1296
1302
  }
1297
- function oC(M) {
1303
+ function hC(M) {
1298
1304
  const I = { name: "", path: "", isDir: !0, children: [], size: 0 }, K = /* @__PURE__ */ new Map();
1299
1305
  K.set("", I);
1300
1306
  const P = (l) => {
@@ -1328,24 +1334,24 @@ function oC(M) {
1328
1334
  };
1329
1335
  return w(I), I;
1330
1336
  }
1331
- async function JC(M, I, K) {
1337
+ async function HC(M, I, K) {
1332
1338
  const P = M.file(I);
1333
1339
  if (!P) throw new Error(`ZIP entry not found: ${I}`);
1334
1340
  const w = await P.async("arraybuffer");
1335
1341
  return new Blob([w], K ? { type: K } : void 0);
1336
1342
  }
1337
1343
  const bK = 100, uM = [80, 75, 3, 4], OM = [80, 75, 5, 6], VI = [80, 75, 6, 6], yw = [208, 207, 17, 224, 161, 177, 26, 225];
1338
- function PM(M, I, K) {
1344
+ function wM(M, I, K) {
1339
1345
  return K.every((P, w) => M[I + w] === P);
1340
1346
  }
1341
- function hC(M) {
1347
+ function mC(M) {
1342
1348
  const I = M instanceof Uint8Array ? M : new Uint8Array(M);
1343
- if (PM(I, 0, yw) || PM(I, 0, uM) || PM(I, 0, OM) || PM(I, 0, VI))
1349
+ if (wM(I, 0, yw) || wM(I, 0, uM) || wM(I, 0, OM) || wM(I, 0, VI))
1344
1350
  return I;
1345
1351
  const K = Math.min(I.length - uM.length, 64 * 1024);
1346
1352
  let P = -1;
1347
1353
  for (let C = 1; C <= K; C++)
1348
- if (PM(I, C, uM)) {
1354
+ if (wM(I, C, uM)) {
1349
1355
  P = C;
1350
1356
  break;
1351
1357
  }
@@ -1354,13 +1360,13 @@ function hC(M) {
1354
1360
  const w = Math.max(P, I.length - 65536 - 22);
1355
1361
  let l = !1;
1356
1362
  for (let C = w; C <= I.length - OM.length; C++)
1357
- if (PM(I, C, OM) || PM(I, C, VI)) {
1363
+ if (wM(I, C, OM) || wM(I, C, VI)) {
1358
1364
  l = !0;
1359
1365
  break;
1360
1366
  }
1361
1367
  return l ? I.subarray(P) : I;
1362
1368
  }
1363
- function HC(M, I = bK) {
1369
+ function kC(M, I = bK) {
1364
1370
  let K = 0;
1365
1371
  for (const P of M) {
1366
1372
  const w = P.rows;
@@ -1555,49 +1561,50 @@ function nI(M) {
1555
1561
  w = w * 26 + (K.charCodeAt(l) - 64);
1556
1562
  return { row: P, col: w };
1557
1563
  }
1558
- function mC(M) {
1564
+ function FC(M) {
1559
1565
  const I = [];
1560
1566
  return M.eachSheet((K) => {
1561
- const P = [], w = /* @__PURE__ */ new Map(), l = [], C = {}, g = {}, y = Math.max(K.columnCount, K.columns.length);
1562
- for (let j = 1; j <= y; j++) {
1563
- const X = K.getColumn(j);
1564
- if (X.hidden) {
1565
- const B = { hide: !0 };
1566
- X.width !== void 0 && (B.width = Math.round(X.width * 7.5)), g[String(j - 1)] = B;
1567
- } else X.width !== void 0 && (g[String(j - 1)] = { width: Math.round(X.width * 7.5) });
1567
+ var P;
1568
+ const w = [], l = /* @__PURE__ */ new Map(), C = [], g = {}, y = {}, s = Math.max(K.columnCount, ((P = K.columns) == null ? void 0 : P.length) ?? 0);
1569
+ for (let j = 1; j <= s; j++) {
1570
+ const B = K.getColumn(j);
1571
+ if (B.hidden) {
1572
+ const Y = { hide: !0 };
1573
+ B.width !== void 0 && (Y.width = Math.round(B.width * 7.5)), y[String(j - 1)] = Y;
1574
+ } else B.width !== void 0 && (y[String(j - 1)] = { width: Math.round(B.width * 7.5) });
1568
1575
  }
1569
- g.len = Math.max(y, 26);
1570
- const s = /* @__PURE__ */ new Map(), S = K.model, T = (S == null ? void 0 : S.merges) || [];
1571
- for (const j of T) {
1572
- l.push(j);
1573
- const { top: X, left: B, bottom: Y, right: A } = dw(j), D = Y - X, G = A - B;
1574
- s.set(`${X - 1},${B - 1}`, [D, G]);
1576
+ y.len = Math.max(s, 26);
1577
+ const S = /* @__PURE__ */ new Map(), T = K.model, X = (T == null ? void 0 : T.merges) || [];
1578
+ for (const j of X) {
1579
+ C.push(j);
1580
+ const { top: B, left: Y, bottom: A, right: D } = dw(j), G = A - B, d = D - Y;
1581
+ S.set(`${B - 1},${Y - 1}`, [G, d]);
1575
1582
  }
1576
- K.eachRow({ includeEmpty: !0 }, (j, X) => {
1577
- const B = X - 1, Y = {};
1578
- j.eachCell({ includeEmpty: !1 }, (D, G) => {
1579
- const d = G - 1;
1580
- if (D.isMerged && D.master !== D) return;
1581
- const o = Gw(D), W = Dw(D, P, w), H = { text: o };
1582
- W !== -1 && (H.style = W);
1583
- const $ = `${B},${d}`;
1584
- s.has($) && (H.merge = s.get($)), Y[String(d)] = H;
1583
+ K.eachRow({ includeEmpty: !0 }, (j, B) => {
1584
+ const Y = B - 1, A = {};
1585
+ j.eachCell({ includeEmpty: !1 }, (G, d) => {
1586
+ const p = d - 1;
1587
+ if (G.isMerged && G.master !== G) return;
1588
+ const W = Gw(G), H = Dw(G, w, l), r = { text: W };
1589
+ H !== -1 && (r.style = H);
1590
+ const MM = `${Y},${p}`;
1591
+ S.has(MM) && (r.merge = S.get(MM)), A[String(p)] = r;
1585
1592
  });
1586
- const A = { cells: Y };
1587
- j.hidden && (A.hide = !0), j.height !== void 0 && (A.height = Math.round(j.height * 1.333)), (Object.keys(Y).length > 0 || j.hidden || j.height !== void 0) && (C[String(B)] = A);
1593
+ const D = { cells: A };
1594
+ j.hidden && (D.hide = !0), j.height !== void 0 && (D.height = Math.round(j.height * 1.333)), (Object.keys(A).length > 0 || j.hidden || j.height !== void 0) && (g[String(Y)] = D);
1588
1595
  }), I.push({
1589
1596
  name: K.name,
1590
- styles: P,
1591
- merges: l,
1597
+ styles: w,
1598
+ merges: C,
1592
1599
  rows: Object.assign(
1593
1600
  { len: Math.max(K.rowCount, bK) },
1594
- C
1601
+ g
1595
1602
  ),
1596
- cols: g
1603
+ cols: y
1597
1604
  });
1598
1605
  }), I;
1599
1606
  }
1600
- function kC(M, I, K = "Sheet1") {
1607
+ function LC(M, I, K = "Sheet1") {
1601
1608
  const P = M.length > 0, w = P ? [{ font: { bold: !0 } }] : [], l = {};
1602
1609
  if (P) {
1603
1610
  const g = {};
@@ -1680,10 +1687,10 @@ function mM(M, I, K, P, w) {
1680
1687
  if (g >= I.length || C.has(g))
1681
1688
  return null;
1682
1689
  C.add(g);
1683
- const X = pK(g, P);
1684
- if (!Number.isSafeInteger(X) || X < 512 || X >= M.length)
1690
+ const j = pK(g, P);
1691
+ if (!Number.isSafeInteger(j) || j < 512 || j >= M.length)
1685
1692
  return null;
1686
- const B = Math.min(X + P, M.length), Y = M.subarray(X, B);
1693
+ const B = Math.min(j + P, M.length), Y = M.subarray(j, B);
1687
1694
  if (l.push(Y), y += Y.length, y >= S)
1688
1695
  break;
1689
1696
  g = I[g];
@@ -1691,10 +1698,10 @@ function mM(M, I, K, P, w) {
1691
1698
  if (!l.length)
1692
1699
  return new Uint8Array(0);
1693
1700
  const T = new Uint8Array(Math.min(y, S));
1694
- let j = 0;
1695
- for (const X of l) {
1696
- const B = Math.min(X.length, T.length - j);
1697
- if (T.set(X.subarray(0, B), j), j += B, j >= T.length) break;
1701
+ let X = 0;
1702
+ for (const j of l) {
1703
+ const B = Math.min(j.length, T.length - X);
1704
+ if (T.set(j.subarray(0, B), X), X += B, X >= T.length) break;
1698
1705
  }
1699
1706
  return T;
1700
1707
  }
@@ -1725,13 +1732,13 @@ function pw(M) {
1725
1732
  const w = EM(I, P + 64);
1726
1733
  let l = "";
1727
1734
  const C = Math.max(0, Math.min(64, w - 2));
1728
- for (let X = 0; X < C; X += 2) {
1729
- const B = EM(I, P + X);
1735
+ for (let j = 0; j < C; j += 2) {
1736
+ const B = EM(I, P + j);
1730
1737
  if (B === 0)
1731
1738
  break;
1732
1739
  l += String.fromCharCode(B);
1733
1740
  }
1734
- const g = M[P + 66], y = a(I, P + 68), s = a(I, P + 72), S = a(I, P + 76), T = a(I, P + 116), j = a(I, P + 120);
1741
+ const g = M[P + 66], y = a(I, P + 68), s = a(I, P + 72), S = a(I, P + 76), T = a(I, P + 116), X = a(I, P + 120);
1735
1742
  K.push({
1736
1743
  name: l,
1737
1744
  type: g,
@@ -1739,7 +1746,7 @@ function pw(M) {
1739
1746
  leftId: y,
1740
1747
  rightId: s,
1741
1748
  startSector: T,
1742
- streamSize: j
1749
+ streamSize: X
1743
1750
  });
1744
1751
  }
1745
1752
  return K;
@@ -1795,7 +1802,7 @@ function VM(M, I) {
1795
1802
  if (!g || g.streamSize <= 0 || g.streamSize > K.length || g.streamSize > RI)
1796
1803
  return null;
1797
1804
  if (g.streamSize < P.miniStreamCutoff) {
1798
- const s = C.find((j) => j.type === 5) ?? C[0];
1805
+ const s = C.find((X) => X.type === 5) ?? C[0];
1799
1806
  if (!s || s.streamSize <= 0 || s.streamSize > K.length || s.streamSize > RI)
1800
1807
  return null;
1801
1808
  const S = mM(
@@ -1839,7 +1846,7 @@ function hK(M, I) {
1839
1846
  function Z(M) {
1840
1847
  return new DataView(M.buffer, M.byteOffset, M.byteLength);
1841
1848
  }
1842
- const ZI = 42476, lM = "", Jw = "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ", hw = [
1849
+ const ZI = 42476, gM = "", Jw = "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ", hw = [
1843
1850
  "#000000",
1844
1851
  "#000000",
1845
1852
  "#0000ff",
@@ -1862,7 +1869,7 @@ function CI(M) {
1862
1869
  return M >= 127744 && M <= 129791 || M >= 128512 && M <= 128591 || M >= 129280 && M <= 129535 || M >= 9728 && M <= 10175 || // Misc symbols + dingbats (includes ✅ U+2705)
1863
1870
  M >= 8960 && M <= 9215 || M >= 11088 && M <= 11093 || M === 12336 || M === 12349 || M === 12951 || M === 12953;
1864
1871
  }
1865
- function cM(M) {
1872
+ function ZM(M) {
1866
1873
  var I;
1867
1874
  if (!M) return null;
1868
1875
  const K = [...M], P = (I = K[0]) == null ? void 0 : I.codePointAt(0);
@@ -1890,7 +1897,7 @@ function HK(M, I, K) {
1890
1897
  for (; w < K && w < M.length; ) {
1891
1898
  const l = M[w];
1892
1899
  l === 13 || l === 11 || l === 12 ? P += `
1893
- ` : l === 7 ? P += lM : l === 9 ? P += " " : l >= 32 && l !== 127 && (P += l >= 128 && l <= 159 ? Jw[l - 128] : String.fromCharCode(l)), w++;
1900
+ ` : l === 7 ? P += gM : l === 9 ? P += " " : l >= 32 && l !== 127 && (P += l >= 128 && l <= 159 ? Jw[l - 128] : String.fromCharCode(l)), w++;
1894
1901
  }
1895
1902
  return P;
1896
1903
  }
@@ -1905,7 +1912,7 @@ function mK(M, I, K) {
1905
1912
  w += `
1906
1913
  `;
1907
1914
  else if (g === 7)
1908
- w += lM;
1915
+ w += gM;
1909
1916
  else if (g === 9)
1910
1917
  w += " ";
1911
1918
  else if (g >= 55296 && g <= 56319 && l + 3 < C) {
@@ -1944,7 +1951,7 @@ function Hw(M) {
1944
1951
  const C = [];
1945
1952
  for (let g = 0; g < l.length; g++) {
1946
1953
  const y = l[g], s = g + 1 < l.length ? l[g + 1] : w.length, S = w.slice(y, s).join("").trim();
1947
- S && cM(S) && C.push(S);
1954
+ S && ZM(S) && C.push(S);
1948
1955
  }
1949
1956
  if (C.length > 1) {
1950
1957
  I.push(...C);
@@ -1969,7 +1976,7 @@ function kw(M) {
1969
1976
  continue;
1970
1977
  }
1971
1978
  if (l === 7) {
1972
- P += lM;
1979
+ P += gM;
1973
1980
  continue;
1974
1981
  }
1975
1982
  l >= 32 && l < 65534 && l !== 65535 ? P += String.fromCharCode(l) : (P.length >= 4 && K.push(P), P = "");
@@ -2049,32 +2056,32 @@ function Ew(M, I, K) {
2049
2056
  const T = l.getUint16(s, !0);
2050
2057
  if (s += 2, !T) continue;
2051
2058
  if (s + T > w.length) break;
2052
- const j = w.subarray(s, s + T);
2059
+ const X = w.subarray(s, s + T);
2053
2060
  s += T;
2054
- const X = Z(j), B = Math.min(y, j.length);
2061
+ const j = Z(X), B = Math.min(y, X.length);
2055
2062
  let Y = "";
2056
- if (B + 2 <= j.length) {
2057
- const D = X.getUint16(B, !0);
2058
- if (D > 0 && D < 80 && B + 2 + D * 2 <= j.length)
2063
+ if (B + 2 <= X.length) {
2064
+ const D = j.getUint16(B, !0);
2065
+ if (D > 0 && D < 80 && B + 2 + D * 2 <= X.length)
2059
2066
  for (let G = 0; G < D; G++) {
2060
- const d = X.getUint16(B + 2 + G * 2, !0);
2067
+ const d = j.getUint16(B + 2 + G * 2, !0);
2061
2068
  d >= 32 && (Y += String.fromCharCode(d));
2062
2069
  }
2063
2070
  }
2064
2071
  if (!Y) continue;
2065
2072
  const A = {};
2066
- for (let D = 0; D + 3 < j.length; D++) {
2067
- const G = X.getUint16(D, !0);
2073
+ for (let D = 0; D + 3 < X.length; D++) {
2074
+ const G = j.getUint16(D, !0);
2068
2075
  if (G === 19011) {
2069
- const d = X.getUint16(D + 2, !0);
2076
+ const d = j.getUint16(D + 2, !0);
2070
2077
  d >= 8 && d <= 200 && (A.size = d / 2);
2071
2078
  } else if (G === 19023) {
2072
- const d = X.getUint16(D + 2, !0);
2079
+ const d = j.getUint16(D + 2, !0);
2073
2080
  K[d] && (A.font = K[d]);
2074
2081
  } else if (G === 10818) {
2075
- const d = tw(j[D + 2]);
2082
+ const d = tw(X[D + 2]);
2076
2083
  d && (A.color = d);
2077
- } else G === 26736 && D + 5 < j.length && (A.color = Lw(X.getUint32(D + 2, !0)));
2084
+ } else G === 26736 && D + 5 < X.length && (A.color = Lw(j.getUint32(D + 2, !0)));
2078
2085
  }
2079
2086
  P.set(Y.toLowerCase(), A);
2080
2087
  }
@@ -2115,8 +2122,8 @@ function Nw(M, I) {
2115
2122
  if (T === 1) {
2116
2123
  if (l + 3 > P.length)
2117
2124
  return null;
2118
- const j = w.getUint16(l + 1, !0);
2119
- l += 3 + j;
2125
+ const X = w.getUint16(l + 1, !0);
2126
+ l += 3 + X;
2120
2127
  continue;
2121
2128
  }
2122
2129
  if (T === 2)
@@ -2133,18 +2140,18 @@ function Nw(M, I) {
2133
2140
  return null;
2134
2141
  let s = "";
2135
2142
  for (let T = 0; T < y; T++) {
2136
- const j = w.getUint32(g + T * 4, !0), X = w.getUint32(g + (T + 1) * 4, !0) - j;
2137
- if (T === 0 && j !== 0 || X <= 0 || X > 5e6)
2143
+ const X = w.getUint32(g + T * 4, !0), j = w.getUint32(g + (T + 1) * 4, !0) - X;
2144
+ if (T === 0 && X !== 0 || j <= 0 || j > 5e6)
2138
2145
  return null;
2139
2146
  const B = g + 4 * (y + 1) + T * 8, Y = w.getUint32(B + 2, !0), A = (Y & 1073741824) !== 0, D = Y & 1073741823;
2140
2147
  if (A) {
2141
2148
  if (D % 2 !== 0) return null;
2142
2149
  const G = Math.floor(D / 2);
2143
- if (G + X > M.length) return null;
2144
- s += HK(M, G, G + X);
2150
+ if (G + j > M.length) return null;
2151
+ s += HK(M, G, G + j);
2145
2152
  } else {
2146
- if (D + X * 2 > M.length) return null;
2147
- s += mK(M, D, D + X * 2);
2153
+ if (D + j * 2 > M.length) return null;
2154
+ s += mK(M, D, D + j * 2);
2148
2155
  }
2149
2156
  }
2150
2157
  const S = WI(s);
@@ -2175,43 +2182,43 @@ function fw(M) {
2175
2182
  return C.length ? C : null;
2176
2183
  }
2177
2184
  function aw(M) {
2178
- return M.split(lM).map((I) => I.replace(/\t+/g, " ").trim()).filter(Boolean);
2185
+ return M.split(gM).map((I) => I.replace(/\t+/g, " ").trim()).filter(Boolean);
2179
2186
  }
2180
- function e(M) {
2181
- const I = cM(M);
2187
+ function v(M) {
2188
+ const I = ZM(M);
2182
2189
  let K = I ? M.slice(I.length) : M;
2183
2190
  return K = K.replace(/^[\uFE0F\u200D\s]+/, "").trim(), K;
2184
2191
  }
2185
2192
  function pI(M) {
2186
- return /^(table of contents|contents)\s*$/i.test(e(M));
2193
+ return /^(table of contents|contents)\s*$/i.test(v(M));
2187
2194
  }
2188
- function xM(M) {
2189
- const I = e(M);
2195
+ function iM(M) {
2196
+ const I = v(M);
2190
2197
  return /^\d{1,2}[.)]\s+\S.+/.test(I) && I.length < 120;
2191
2198
  }
2192
2199
  function yI(M) {
2193
- const I = cM(M);
2200
+ const I = ZM(M);
2194
2201
  if (!I) return !1;
2195
2202
  const K = M.slice(I.length).replace(/^\s+/, "");
2196
2203
  return /^\d{1,2}[.)]\s+\S.+/.test(K) && M.length < 120;
2197
2204
  }
2198
2205
  function LK(M) {
2199
- const I = e(M);
2206
+ const I = v(M);
2200
2207
  return /^[A-Z][.)]\s+\S/.test(I) && I.length < 80;
2201
2208
  }
2202
2209
  function tK(M) {
2203
- const I = e(M);
2204
- if (I.length < 3 || I.length > 60 || /[.!?:]$/.test(I) || /^\d+[.)]/.test(I) || /^[A-Z][.)]/.test(I) || iM(I) || UM(I) || zM(I)) return !1;
2210
+ const I = v(M);
2211
+ if (I.length < 3 || I.length > 60 || /[.!?:]$/.test(I) || /^\d+[.)]/.test(I) || /^[A-Z][.)]/.test(I) || bM(I) || UM(I) || zM(I)) return !1;
2205
2212
  const K = I.split(/\s+/);
2206
2213
  return K.length > 8 ? !1 : K.filter((P) => /^[A-Z0-9]/.test(P) || /^(and|or|of|for|to|in|a|an|the|&)$/i.test(P)).length >= Math.ceil(K.length * 0.7);
2207
2214
  }
2208
2215
  function UM(M) {
2209
2216
  return /^([-*•·▪◦–—])\s+\S/.test(M);
2210
2217
  }
2211
- function iM(M) {
2212
- if (xM(M) || yI(M) || pI(M))
2218
+ function bM(M) {
2219
+ if (iM(M) || yI(M) || pI(M))
2213
2220
  return !1;
2214
- const I = cM(M);
2221
+ const I = ZM(M);
2215
2222
  if (!I) return !1;
2216
2223
  const K = M.slice(I.length);
2217
2224
  return /^\s+\S/.test(K);
@@ -2223,12 +2230,12 @@ function sI(M) {
2223
2230
  return /^[A-Z0-9][A-Z0-9,/+\s-]{0,40}\([^)]{2,40}\)\s*$/.test(M) && M.length < 80;
2224
2231
  }
2225
2232
  function vM(M) {
2226
- if (M.length > 72 || /[.!?]$/.test(M) || xM(M) || LK(M) || tK(M) || iM(M) || UM(M) || zM(M) || sI(M) || M.includes(lM) || /HYPERLINK\s+"/i.test(M)) return !1;
2233
+ if (M.length > 72 || /[.!?]$/.test(M) || iM(M) || LK(M) || tK(M) || bM(M) || UM(M) || zM(M) || sI(M) || M.includes(gM) || /HYPERLINK\s+"/i.test(M)) return !1;
2227
2234
  const I = M.split(/\s+/);
2228
2235
  return I.length >= 2 && I.length <= 10;
2229
2236
  }
2230
2237
  function Vw(M) {
2231
- const I = M.trim(), K = cM(I);
2238
+ const I = M.trim(), K = ZM(I);
2232
2239
  if (K)
2233
2240
  return {
2234
2241
  marker: K,
@@ -2241,7 +2248,7 @@ function Vw(M) {
2241
2248
  } : { text: I.replace(/^([-*•·▪◦–—])\s+/, "") };
2242
2249
  }
2243
2250
  function nw(M) {
2244
- if (xM(M) || pI(M) || iM(M) || M.length > 100 || /[.!]$/.test(M))
2251
+ if (iM(M) || pI(M) || bM(M) || M.length > 100 || /[.!]$/.test(M))
2245
2252
  return !1;
2246
2253
  if (/^[IVXLCDM\d]+[.)]\s+\S/.test(M) || /^[A-Z][.)]\s+\S/.test(M))
2247
2254
  return !0;
@@ -2274,23 +2281,23 @@ function rw(M) {
2274
2281
  let K = 0, P = !1;
2275
2282
  for (; K < M.length; ) {
2276
2283
  const w = M[K];
2277
- if (w.includes(lM)) {
2284
+ if (w.includes(gM)) {
2278
2285
  const C = [];
2279
- for (; K < M.length && M[K].includes(lM); ) {
2286
+ for (; K < M.length && M[K].includes(gM); ) {
2280
2287
  const g = aw(M[K]);
2281
2288
  g.length && C.push(g), K += 1;
2282
2289
  }
2283
2290
  if (C.length) {
2284
2291
  const g = Math.max(...C.map((T) => T.length)), y = C.map((T) => {
2285
- const j = [...T];
2286
- for (; j.length < g; )
2287
- j.push("");
2288
- return j;
2292
+ const X = [...T];
2293
+ for (; X.length < g; )
2294
+ X.push("");
2295
+ return X;
2289
2296
  }), s = y[0], S = y.slice(1);
2290
2297
  I.push(
2291
2298
  S.length ? { kind: "table", headers: s, rows: S } : {
2292
2299
  kind: "table",
2293
- headers: s.map((T, j) => `Column ${j + 1}`),
2300
+ headers: s.map((T, X) => `Column ${X + 1}`),
2294
2301
  rows: [s]
2295
2302
  }
2296
2303
  );
@@ -2307,7 +2314,7 @@ function rw(M) {
2307
2314
  continue;
2308
2315
  }
2309
2316
  if (pI(w)) {
2310
- I.push({ kind: "heading", text: e(w), level: 2 }), K += 1;
2317
+ I.push({ kind: "heading", text: v(w), level: 2 }), K += 1;
2311
2318
  const C = [];
2312
2319
  for (; K < M.length && nw(M[K]); ) {
2313
2320
  const g = M[K].replace(/^[IVXLCDM\d]+[.)]\s+/, "").replace(/^[A-Z][.)]\s+/, "").trim();
@@ -2316,8 +2323,8 @@ function rw(M) {
2316
2323
  C.length && I.push({ kind: "list", style: "ordered", items: C });
2317
2324
  continue;
2318
2325
  }
2319
- if (xM(w) && !yI(w)) {
2320
- P = !0, I.push({ kind: "heading", text: e(w), level: 2 }), K += 1;
2326
+ if (iM(w) && !yI(w)) {
2327
+ P = !0, I.push({ kind: "heading", text: v(w), level: 2 }), K += 1;
2321
2328
  continue;
2322
2329
  }
2323
2330
  if (yI(w)) {
@@ -2325,16 +2332,16 @@ function rw(M) {
2325
2332
  continue;
2326
2333
  }
2327
2334
  if (LK(w)) {
2328
- I.push({ kind: "heading", text: e(w), level: 3 }), K += 1;
2335
+ I.push({ kind: "heading", text: v(w), level: 3 }), K += 1;
2329
2336
  continue;
2330
2337
  }
2331
2338
  if (P && tK(w)) {
2332
- I.push({ kind: "heading", text: e(w), level: 2 }), K += 1;
2339
+ I.push({ kind: "heading", text: v(w), level: 2 }), K += 1;
2333
2340
  continue;
2334
2341
  }
2335
- if (iM(w)) {
2342
+ if (bM(w)) {
2336
2343
  const C = [];
2337
- for (; K < M.length && iM(M[K]) && !xM(M[K]); )
2344
+ for (; K < M.length && bM(M[K]) && !iM(M[K]); )
2338
2345
  C.push(Vw(M[K])), K += 1;
2339
2346
  I.push({ kind: "list", style: "emoji", items: C });
2340
2347
  continue;
@@ -2370,14 +2377,14 @@ function rw(M) {
2370
2377
  function uw(M) {
2371
2378
  const I = M.match(/^([^—–\-]{2,48})\s*[—–\-]\s+([\s\S]+)$/);
2372
2379
  if (I)
2373
- return `<strong>${V(I[1].trim())}</strong> — ${yM(I[2], !1)}`;
2380
+ return `<strong>${V(I[1].trim())}</strong> — ${sM(I[2], !1)}`;
2374
2381
  const K = M.match(
2375
2382
  /^((?:[A-Z][\w'/&-]*)(?:\s+[A-Za-z][\w'/&-]*){0,5})\s+((?:You|Your|Avoid|Sample|They|It|This|These|A|An|The|Same|Don't|Do|Use|Try|Check|Test|Everyone|Real)\b[\s\S]*)$/
2376
2383
  );
2377
2384
  if (K)
2378
- return `<strong>${V(K[1])}</strong> ${yM(K[2], !1)}`;
2385
+ return `<strong>${V(K[1])}</strong> ${sM(K[2], !1)}`;
2379
2386
  const P = M.match(/^([^:]{2,48}):\s+([\s\S]+)$/);
2380
- return P ? `<strong>${V(P[1])}</strong> ${yM(P[2], !1)}` : yM(M, !1);
2387
+ return P ? `<strong>${V(P[1])}</strong> ${sM(P[2], !1)}` : sM(M, !1);
2381
2388
  }
2382
2389
  function Ow(M) {
2383
2390
  return M.replace(
@@ -2388,7 +2395,7 @@ function Ow(M) {
2388
2395
  }
2389
2396
  );
2390
2397
  }
2391
- function yM(M, I = !0) {
2398
+ function sM(M, I = !0) {
2392
2399
  let K = V(M);
2393
2400
  return K = Ow(K), K = K.replace(/(^|[\s(])\*([^*\n]+)\*(?=[\s).,!?]|$)/g, "$1<em>$2</em>"), K = K.replace(/(^|[\s(])_([^_\n]+)_(?=[\s).,!?]|$)/g, "$1<em>$2</em>"), K = K.replace(/(\((?:also called|aka|i\.e\.,?)[^)]+\))/gi, "<em>$1</em>"), K = K.replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>"), K = K.replace(/\b(why [a-z0-9][a-z0-9\s-]{2,40} matter)\b/gi, "<strong>$1</strong>"), I && (K = K.replace(/^([^:<]{2,48})(:\s+)/, "<strong>$1</strong>$2")), K;
2394
2401
  }
@@ -2428,14 +2435,14 @@ function vw(M) {
2428
2435
  })}">${V(P.text)}</h${P.level}>`;
2429
2436
  }
2430
2437
  case "paragraph":
2431
- return `<p class="legacy-doc__p">${yM(P.text)}</p>`;
2438
+ return `<p class="legacy-doc__p">${sM(P.text)}</p>`;
2432
2439
  case "list": {
2433
2440
  if (P.style === "emoji")
2434
2441
  return `<ul class="legacy-doc__list legacy-doc__list--emoji">${P.items.map((g) => {
2435
2442
  const y = g.marker ?? "•", s = uw(g.text);
2436
2443
  return `<li class="legacy-doc__emoji-item"><span class="legacy-doc__emoji" aria-hidden="true">${y}</span><span class="legacy-doc__emoji-text">${s}</span></li>`;
2437
2444
  }).join("")}</ul>`;
2438
- const w = P.style === "ordered" ? "ol" : "ul", l = P.style === "ordered" ? " legacy-doc__list--toc" : " legacy-doc__list--disc", C = P.items.map((g) => `<li>${yM(g.text, !1)}</li>`).join("");
2445
+ const w = P.style === "ordered" ? "ol" : "ul", l = P.style === "ordered" ? " legacy-doc__list--toc" : " legacy-doc__list--disc", C = P.items.map((g) => `<li>${sM(g.text, !1)}</li>`).join("");
2439
2446
  return `<${w} class="legacy-doc__list${l}">${C}</${w}>`;
2440
2447
  }
2441
2448
  case "table": {
@@ -2451,7 +2458,7 @@ function vw(M) {
2451
2458
  function V(M) {
2452
2459
  return M.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
2453
2460
  }
2454
- const qw = 4080, _ = 4e3, _w = 4001, nM = 4008, oI = 3999, $w = 1011, QK = 2032, M0 = 4023, I0 = 4003, EK = 61451, UK = 385, K0 = 1001, P0 = 1006, w0 = 1016, zK = 61450, l0 = 384, g0 = 387, C0 = 395, y0 = 396, s0 = 0, S0 = 4, uI = 61443, NK = 61444, fK = 61455, aK = 61456, T0 = 75, j0 = 1, VK = 61469, nK = 61482, RK = 61470, X0 = 61471, B0 = 61481, v = 0, NM = 1, JI = 2, A0 = 4, gM = 5, SM = 6, Y0 = 7, D0 = 8;
2461
+ const qw = 4080, $ = 4e3, _w = 4001, nM = 4008, oI = 3999, $w = 1011, QK = 2032, M0 = 4023, I0 = 4003, EK = 61451, UK = 385, K0 = 1001, P0 = 1006, w0 = 1016, zK = 61450, l0 = 384, g0 = 387, C0 = 395, y0 = 396, s0 = 0, S0 = 4, uI = 61443, NK = 61444, fK = 61455, aK = 61456, T0 = 75, j0 = 1, VK = 61469, nK = 61482, RK = 61470, X0 = 61471, B0 = 61481, q = 0, NM = 1, JI = 2, A0 = 4, CM = 5, TM = 6, Y0 = 7, D0 = 8;
2455
2462
  function t(M, I) {
2456
2463
  if (I + 8 > M.byteLength) return null;
2457
2464
  const K = M.getUint16(I, !0), P = M.getUint16(I + 2, !0), w = M.getUint32(I + 4, !0), l = Math.max(0, M.byteLength - I - 8);
@@ -2551,8 +2558,8 @@ function c0(M, I, K, P, w = 0) {
2551
2558
  const l = Z(M);
2552
2559
  let C = K, g = 0, y, s = !1, S, T;
2553
2560
  for (; C + 8 <= M.length && g < I; ) {
2554
- const X = l.getUint32(C, !0), B = l.getUint32(C + 4, !0);
2555
- if (X === 0 || X > 65536) break;
2561
+ const j = l.getUint32(C, !0), B = l.getUint32(C + 4, !0);
2562
+ if (j === 0 || j > 65536) break;
2556
2563
  C += 8;
2557
2564
  const Y = uK(B);
2558
2565
  if (C + Y > M.length) break;
@@ -2570,22 +2577,22 @@ function c0(M, I, K, P, w = 0) {
2570
2577
  const D = b0(M, A, Math.min(M.length, C + Y + 8), P);
2571
2578
  D && !y && (y = D);
2572
2579
  }
2573
- C += Y, g += X;
2580
+ C += Y, g += j;
2574
2581
  }
2575
2582
  if (!s)
2576
- for (let X = 0; X + 8 <= M.length; X += 2) {
2577
- const B = l.getUint32(X + 4, !0), Y = l.getUint32(X, !0);
2583
+ for (let j = 0; j + 8 <= M.length; j += 2) {
2584
+ const B = l.getUint32(j + 4, !0), Y = l.getUint32(j, !0);
2578
2585
  if (Y > 0 && Y <= 65536 && B & 16 && B & 262144) {
2579
2586
  s = !0;
2580
2587
  break;
2581
2588
  }
2582
2589
  }
2583
- const j = OK(M, w);
2590
+ const X = OK(M, w);
2584
2591
  return {
2585
2592
  color: i0(M) ?? y,
2586
2593
  shadow: s,
2587
- size: S ?? j.size,
2588
- font: T ?? j.font ?? W0(M, w)
2594
+ size: S ?? X.size,
2595
+ font: T ?? X.font ?? W0(M, w)
2589
2596
  };
2590
2597
  }
2591
2598
  function Z0(M, I) {
@@ -2602,15 +2609,15 @@ function Z0(M, I) {
2602
2609
  return l += y.length + 1, { text: y.replace(/[ \t]+$/g, "").replace(/^[ \t]+/, ""), indent: S };
2603
2610
  });
2604
2611
  }
2605
- function O(M) {
2612
+ function e(M) {
2606
2613
  const I = M.trim();
2607
2614
  return /^(by|from|with|featuring|presented by)\s+/i.test(I) || /^[\w\s]+,\s*(phd|md|esq|jr|sr|ii|iii|iv)$/i.test(I);
2608
2615
  }
2609
- function bM(M) {
2616
+ function cM(M) {
2610
2617
  const I = M.trim();
2611
2618
  return /^(click to (edit|add)|double[- ]click|placeholder|^title$|^subtitle$|^text$|^slide title$|^body text$)/i.test(I) || /^\[.*\]$/.test(I) || I.length === 0;
2612
2619
  }
2613
- function XM(M) {
2620
+ function BM(M) {
2614
2621
  const I = M.trim();
2615
2622
  return !!(!I || /^[\s*•·▪◦\-–—]+$/u.test(I) || I.length <= 2 && !/[a-zA-Z0-9\u00C0-\u024F]/u.test(I));
2616
2623
  }
@@ -2628,7 +2635,7 @@ function TI(M) {
2628
2635
  const K = /times|roman|georgia|garamond|antiqua|mincho|serif/i.test(I) ? "serif" : /wingdings|symbol/i.test(I) ? "fantasy" : "sans-serif";
2629
2636
  return `'${I}',${K}`;
2630
2637
  }
2631
- function BM(M) {
2638
+ function AM(M) {
2632
2639
  return !!M && /gothic|mincho|droid|simsun|nsimsun|mingliu|pming|gulim|batang|malgun|meiryo|hiragino|微软|宋体|黑体|ゴシック/i.test(M);
2633
2640
  }
2634
2641
  function OK(M, I) {
@@ -2660,7 +2667,7 @@ function W0(M, I) {
2660
2667
  }
2661
2668
  function p0(M, I, K, P) {
2662
2669
  const w = (l) => {
2663
- if (!(l == null || !K[l]) && !(BM(K[l]) && K.some((C) => C && !BM(C))))
2670
+ if (!(l == null || !K[l]) && !(AM(K[l]) && K.some((C) => C && !AM(C))))
2664
2671
  return l;
2665
2672
  };
2666
2673
  return w(M) ?? w(I) ?? jI(K, P);
@@ -2668,8 +2675,8 @@ function p0(M, I, K, P) {
2668
2675
  function jI(M, I) {
2669
2676
  const K = I ? [1, 0, 2, 5] : [0, 1, 2, 5];
2670
2677
  for (const w of K)
2671
- if (M[w] && !BM(M[w])) return w;
2672
- const P = M.findIndex((w) => w && !BM(w));
2678
+ if (M[w] && !AM(M[w])) return w;
2679
+ const P = M.findIndex((w) => w && !AM(w));
2673
2680
  return P >= 0 ? P : 0;
2674
2681
  }
2675
2682
  function XI(M, I) {
@@ -2769,19 +2776,19 @@ function $K(M, I = !1, K = !1) {
2769
2776
  return I && g === 0 && !w ? "image" : P && w && g < 100 || P && g < 40 && s.length >= 2 || P && g === 0 && !w && y.length >= 2 && y.length <= 4 && C.length <= 36 ? "hero" : P && g === 0 && !w && y.length <= 3 && C.length <= 28 ? "section" : "content";
2770
2777
  }
2771
2778
  function L0(M) {
2772
- const I = M.filter((s) => !XM(s.text) && !bM(s.text)).map((s) => ({ ...s }));
2779
+ const I = M.filter((s) => !BM(s.text) && !cM(s.text)).map((s) => ({ ...s }));
2773
2780
  if (!I.length) return I;
2774
2781
  for (const s of I)
2775
- O(s.text) ? s.role = "subtitle" : s.textType === v || s.textType === SM ? s.role = "title" : s.textType === gM ? s.role = "subtitle" : s.role = "body";
2782
+ e(s.text) ? s.role = "subtitle" : s.textType === q || s.textType === TM ? s.role = "title" : s.textType === CM ? s.role = "subtitle" : s.role = "body";
2776
2783
  {
2777
- const s = I.filter((T) => T.role === "title").find((T) => O(T.text)), S = I.find(
2778
- (T) => T.role !== "subtitle" && !O(T.text) && T.text.length <= 40 && !T.text.includes(`
2779
- `) && (T.textType === gM || T.textType === v || T.textType === NM)
2784
+ const s = I.filter((T) => T.role === "title").find((T) => e(T.text)), S = I.find(
2785
+ (T) => T.role !== "subtitle" && !e(T.text) && T.text.length <= 40 && !T.text.includes(`
2786
+ `) && (T.textType === CM || T.textType === q || T.textType === NM)
2780
2787
  );
2781
2788
  s && S && s !== S && (s.role = "subtitle", S.role = "title");
2782
2789
  }
2783
2790
  const K = I.filter(
2784
- (s) => s.textType === v || s.textType === SM || s.role === "title"
2791
+ (s) => s.textType === q || s.textType === TM || s.role === "title"
2785
2792
  );
2786
2793
  for (const s of I) {
2787
2794
  const S = SI(s.text);
@@ -2790,37 +2797,37 @@ function L0(M) {
2790
2797
  s.role = "title";
2791
2798
  continue;
2792
2799
  }
2793
- if (S === "kicker" && (s.textType === v || s.textType === SM) && I.indexOf(s) === 0) {
2800
+ if (S === "kicker" && (s.textType === q || s.textType === TM) && I.indexOf(s) === 0) {
2794
2801
  s.role = "title";
2795
2802
  continue;
2796
2803
  }
2797
2804
  s.role = S;
2798
2805
  }
2799
2806
  }
2800
- let P = I.find((s) => s.role === "title" && !O(s.text));
2807
+ let P = I.find((s) => s.role === "title" && !e(s.text));
2801
2808
  if (!P) {
2802
2809
  const s = I.find((S) => S.role === "body");
2803
2810
  if (s && s.text.includes(`
2804
2811
  `)) {
2805
- const [S, ...T] = s.text.split(/\n/).map((j) => j.trim()).filter(Boolean);
2812
+ const [S, ...T] = s.text.split(/\n/).map((X) => X.trim()).filter(Boolean);
2806
2813
  if (S && S.length <= 48 && T.length) {
2807
2814
  s.role = "title", s.text = S, P = s;
2808
- const j = T.join(`
2815
+ const X = T.join(`
2809
2816
  `);
2810
2817
  if (SI(T[0] || "") === "meta" && T.length >= 1) {
2811
2818
  I.splice(I.indexOf(s) + 1, 0, {
2812
2819
  role: "meta",
2813
2820
  text: T[0]
2814
2821
  });
2815
- const X = T.slice(1).join(`
2822
+ const j = T.slice(1).join(`
2816
2823
  `);
2817
- X && I.splice(I.indexOf(s) + 2, 0, { role: "body", text: X });
2818
- } else j && I.splice(I.indexOf(s) + 1, 0, { role: "body", text: j });
2824
+ j && I.splice(I.indexOf(s) + 2, 0, { role: "body", text: j });
2825
+ } else X && I.splice(I.indexOf(s) + 1, 0, { role: "body", text: X });
2819
2826
  }
2820
2827
  }
2821
2828
  if (!P) {
2822
2829
  const S = I.find((T) => T.role === "body" && T.text.length <= 60 && !T.text.includes(`
2823
- `)) ?? I.find((T) => !O(T.text) && T.role !== "meta");
2830
+ `)) ?? I.find((T) => !e(T.text) && T.role !== "meta");
2824
2831
  S && (S.role = "title", P = S);
2825
2832
  }
2826
2833
  }
@@ -2831,14 +2838,14 @@ function L0(M) {
2831
2838
  const l = I.filter((s) => s !== P && s.role !== "kicker" && s.role !== "meta");
2832
2839
  if (P && l.length >= 1) {
2833
2840
  const s = l[0];
2834
- (s.role === "subtitle" || O(s.text) || s.role === "body" && s.text.length <= 60 && !s.text.includes(`
2841
+ (s.role === "subtitle" || e(s.text) || s.role === "body" && s.text.length <= 60 && !s.text.includes(`
2835
2842
  `) && l.length === 1) && (s.role = "subtitle");
2836
2843
  }
2837
2844
  let C = !1;
2838
2845
  for (const s of I)
2839
2846
  s.role === "subtitle" && (C ? s.role = "body" : C = !0);
2840
2847
  const g = I.find((s) => s.role === "title"), y = I.find((s) => s.role === "subtitle");
2841
- return g && y && O(g.text) && !O(y.text) && (g.role = "subtitle", y.role = "title"), I.filter((s) => !XM(s.text));
2848
+ return g && y && e(g.text) && !e(y.text) && (g.role = "subtitle", y.role = "title"), I.filter((s) => !BM(s.text));
2842
2849
  }
2843
2850
  function MP(M, I, K = [], P, w, l) {
2844
2851
  const C = L0(M);
@@ -2897,13 +2904,13 @@ function z0(M) {
2897
2904
  const l = K.getUint16(w, !0), C = K.getUint16(w + 2, !0), g = K.getUint32(w + 4, !0), y = l >> 4, s = w + 8, S = Math.min(s + g, I.length);
2898
2905
  if (g === 0 || S <= s) break;
2899
2906
  let T = null;
2900
- const j = Q0(C);
2901
- if (j && S - s > 32) {
2902
- const X = I.subarray(s, S), B = U0(X, E0(y, C));
2907
+ const X = Q0(C);
2908
+ if (X && S - s > 32) {
2909
+ const j = I.subarray(s, S), B = U0(j, E0(y, C));
2903
2910
  B && B.length > 64 && (T = {
2904
- data: `data:${j};base64,${t0(B)}`,
2911
+ data: `data:${X};base64,${t0(B)}`,
2905
2912
  alt: `Image ${P.length + 1}`,
2906
- mimeType: j
2913
+ mimeType: X
2907
2914
  });
2908
2915
  }
2909
2916
  P.push(T), w = S;
@@ -2922,11 +2929,11 @@ function N0(M) {
2922
2929
  const s = g + y.headerSize, S = Math.min(s + y.len, l), T = M.subarray(s, S);
2923
2930
  if (y.type === oI)
2924
2931
  T.length >= 4 ? K = new DataView(T.buffer, T.byteOffset, 4).getUint32(0, !0) : T.length >= 2 && (K = new DataView(T.buffer, T.byteOffset, 2).getUint16(0, !0));
2925
- else if (y.type === _ || y.type === nM) {
2926
- const j = y.type === _ ? hI(T) : HI(T);
2927
- j && K !== JI && !XM(j) && !bM(j) && I.push({
2932
+ else if (y.type === $ || y.type === nM) {
2933
+ const X = y.type === $ ? hI(T) : HI(T);
2934
+ X && K !== JI && !BM(X) && !cM(X) && I.push({
2928
2935
  role: "body",
2929
- text: j,
2936
+ text: X,
2930
2937
  textType: K ?? void 0
2931
2938
  }), K = null;
2932
2939
  } else y.ver === 15 && y.len > 0 && P(s, S);
@@ -2964,21 +2971,21 @@ function a0(M) {
2964
2971
  const I = Z(M);
2965
2972
  let K = -1, P = 0, w = 0, l = 0, C = 0, g = !1, y = "";
2966
2973
  const s = (S, T) => {
2967
- let j = S;
2968
- for (; j + 8 <= T; ) {
2969
- const X = t(I, j);
2970
- if (!X) break;
2971
- const B = j + X.headerSize, Y = Math.min(B + X.len, T), A = M.subarray(B, Y);
2972
- if (X.type === zK)
2973
- K = X.instance;
2974
- else if (X.type === fK && A.length >= 16) {
2975
- const D = Z(A), G = D.getInt32(0, !0), d = D.getInt32(4, !0), o = D.getInt32(8, !0), W = D.getInt32(12, !0);
2976
- P = G, w = d, l = o - G, C = W - d, g = !0;
2977
- } else if (X.type === aK && A.length >= 8) {
2978
- const D = Z(A), G = D.getInt16(0, !0), d = D.getInt16(2, !0), o = D.getInt16(4, !0), W = D.getInt16(6, !0);
2979
- P = d, w = G, l = o - d, C = W - G, g = !0;
2980
- } else X.type === _ || X.type === nM ? y = X.type === _ ? hI(A) : HI(A) : X.ver === 15 && X.len > 0 && s(B, Y);
2981
- if (j = Y, X.len === 0) break;
2974
+ let X = S;
2975
+ for (; X + 8 <= T; ) {
2976
+ const j = t(I, X);
2977
+ if (!j) break;
2978
+ const B = X + j.headerSize, Y = Math.min(B + j.len, T), A = M.subarray(B, Y);
2979
+ if (j.type === zK)
2980
+ K = j.instance;
2981
+ else if (j.type === fK && A.length >= 16) {
2982
+ const D = Z(A), G = D.getInt32(0, !0), d = D.getInt32(4, !0), p = D.getInt32(8, !0), W = D.getInt32(12, !0);
2983
+ P = G, w = d, l = p - G, C = W - d, g = !0;
2984
+ } else if (j.type === aK && A.length >= 8) {
2985
+ const D = Z(A), G = D.getInt16(0, !0), d = D.getInt16(2, !0), p = D.getInt16(4, !0), W = D.getInt16(6, !0);
2986
+ P = d, w = G, l = p - d, C = W - G, g = !0;
2987
+ } else j.type === $ || j.type === nM ? y = j.type === $ ? hI(A) : HI(A) : j.ver === 15 && j.len > 0 && s(B, Y);
2988
+ if (X = Y, j.len === 0) break;
2982
2989
  }
2983
2990
  };
2984
2991
  return s(0, M.length), !g || K !== j0 || l < 48 || C < 24 ? null : { x: P, y: w, w: l, h: C, text: y };
@@ -2990,15 +2997,15 @@ function V0(M) {
2990
2997
  for (; s + 8 <= g; ) {
2991
2998
  const S = t(I, s);
2992
2999
  if (!S) break;
2993
- const T = s + S.headerSize, j = Math.min(T + S.len, g), X = M.subarray(T, j);
3000
+ const T = s + S.headerSize, X = Math.min(T + S.len, g), j = M.subarray(T, X);
2994
3001
  if (S.type === NK) {
2995
- const B = a0(X);
3002
+ const B = a0(j);
2996
3003
  B && y.push(B);
2997
3004
  } else if (S.type === uI) {
2998
- const B = P(T, j);
3005
+ const B = P(T, X);
2999
3006
  B.length >= 4 && K.push(B);
3000
- } else S.ver === 15 && S.len > 0 && y.push(...P(T, j));
3001
- if (s = j, S.len === 0) break;
3007
+ } else S.ver === 15 && S.len > 0 && y.push(...P(T, X));
3008
+ if (s = X, S.len === 0) break;
3002
3009
  }
3003
3010
  return y;
3004
3011
  }, w = (C, g) => {
@@ -3008,8 +3015,8 @@ function V0(M) {
3008
3015
  if (!s) break;
3009
3016
  const S = y + s.headerSize, T = Math.min(S + s.len, g);
3010
3017
  if (s.type === uI) {
3011
- const j = P(S, T);
3012
- j.length >= 4 && K.push(j);
3018
+ const X = P(S, T);
3019
+ X.length >= 4 && K.push(X);
3013
3020
  } else s.ver === 15 && s.len > 0 && w(S, T);
3014
3021
  if (y = T, s.len === 0) break;
3015
3022
  }
@@ -3107,12 +3114,12 @@ function u0(M) {
3107
3114
  b: T.getInt16(6, !0)
3108
3115
  };
3109
3116
  } else if (g.type === EK) {
3110
- const T = Z(S), j = Math.floor(S.length / 6);
3111
- for (let X = 0; X < j; X++) {
3112
- const B = T.getUint16(X * 6, !0) & 16383, Y = T.getUint32(X * 6 + 2, !0);
3117
+ const T = Z(S), X = Math.floor(S.length / 6);
3118
+ for (let j = 0; j < X; j++) {
3119
+ const B = T.getUint16(j * 6, !0) & 16383, Y = T.getUint32(j * 6 + 2, !0);
3113
3120
  B === 260 ? K.pib = Y & 65535 : B === l0 ? K.fillType = Y : B === UK ? K.fillColor = Y : B === g0 ? K.fillBackColor = Y : B === C0 ? K.fillAngle = Y : B === y0 && (K.fillFocus = Y);
3114
3121
  }
3115
- } else g.type === oI && S.length >= 4 ? K.textType = new DataView(S.buffer, S.byteOffset, 4).getUint32(0, !0) : g.type === _ || g.type === nM ? (K.rawText = g.type === _ ? G0(S) : d0(S), K.text = mI(K.rawText)) : g.type === _w ? K.style = S : g.ver === 15 && g.len > 0 && P(y, s);
3122
+ } else g.type === oI && S.length >= 4 ? K.textType = new DataView(S.buffer, S.byteOffset, 4).getUint32(0, !0) : g.type === $ || g.type === nM ? (K.rawText = g.type === $ ? G0(S) : d0(S), K.text = mI(K.rawText)) : g.type === _w ? K.style = S : g.ver === 15 && g.len > 0 && P(y, s);
3116
3123
  if (C = s, g.len === 0) break;
3117
3124
  }
3118
3125
  };
@@ -3140,10 +3147,10 @@ function O0(M) {
3140
3147
  if (g.type === M0) {
3141
3148
  const S = M.subarray(y, s);
3142
3149
  let T = "";
3143
- for (let j = 0; j + 1 < Math.min(64, S.length); j += 2) {
3144
- const X = S[j] | S[j + 1] << 8;
3145
- if (!X) break;
3146
- T += String.fromCharCode(X);
3150
+ for (let X = 0; X + 1 < Math.min(64, S.length); X += 2) {
3151
+ const j = S[X] | S[X + 1] << 8;
3152
+ if (!j) break;
3153
+ T += String.fromCharCode(j);
3147
3154
  }
3148
3155
  T && (K[g.instance] = T);
3149
3156
  } else g.ver === 15 && g.len > 0 && P(y, s);
@@ -3160,17 +3167,17 @@ function e0(M, I) {
3160
3167
  if (!y) break;
3161
3168
  const s = g + y.headerSize, S = Math.min(s + y.len, C);
3162
3169
  if (y.type === I0) {
3163
- const T = M.subarray(s, S), j = OK(T, I);
3164
- let X;
3170
+ const T = M.subarray(s, S), X = OK(T, I);
3171
+ let j;
3165
3172
  const B = Z(T);
3166
3173
  for (let A = 0; A + 2 <= T.length; A += 2) {
3167
3174
  const D = B.getUint16(A, !0);
3168
- D >= 20 && D <= 72 && (X = D);
3175
+ D >= 20 && D <= 72 && (j = D);
3169
3176
  }
3170
3177
  const Y = P[y.instance];
3171
- (j.font != null || j.size || X) && (P[y.instance] = {
3172
- font: (Y == null ? void 0 : Y.font) ?? j.font,
3173
- size: (Y == null ? void 0 : Y.size) ?? j.size ?? X
3178
+ (X.font != null || X.size || j) && (P[y.instance] = {
3179
+ font: (Y == null ? void 0 : Y.font) ?? X.font,
3180
+ size: (Y == null ? void 0 : Y.size) ?? X.size ?? j
3174
3181
  });
3175
3182
  } else y.ver === 15 && y.len > 0 && w(s, S);
3176
3183
  if (g = S, y.len === 0) break;
@@ -3179,7 +3186,7 @@ function e0(M, I) {
3179
3186
  return w(0, M.length), P;
3180
3187
  }
3181
3188
  function IP(M, I, K) {
3182
- const P = K[v] ?? K[SM], w = K[NM] ?? K[gM], l = (P == null ? void 0 : P.font) != null && !BM(I[P.font]) ? P.font : jI(I, !0), C = (w == null ? void 0 : w.font) != null && !BM(I[w.font]) ? w.font : jI(I, !1), g = TI(I[l] ?? I[0]), y = TI(I[C] ?? I[0]);
3189
+ const P = K[q] ?? K[TM], w = K[NM] ?? K[CM], l = (P == null ? void 0 : P.font) != null && !AM(I[P.font]) ? P.font : jI(I, !0), C = (w == null ? void 0 : w.font) != null && !AM(I[w.font]) ? w.font : jI(I, !1), g = TI(I[l] ?? I[0]), y = TI(I[C] ?? I[0]);
3183
3190
  return {
3184
3191
  ...M,
3185
3192
  font: y ?? g,
@@ -3222,9 +3229,9 @@ function _0(M, I, K) {
3222
3229
  return K.add(P), I[P] ?? void 0;
3223
3230
  }
3224
3231
  function $0(M, I, K) {
3225
- if (M === v || M === SM) return "title";
3226
- if (M === gM || M === Y0 || M === D0) {
3227
- if (M === gM) {
3232
+ if (M === q || M === TM) return "title";
3233
+ if (M === CM || M === Y0 || M === D0) {
3234
+ if (M === CM) {
3228
3235
  const P = I.split(/\n/).map((w) => w.trim()).filter(Boolean);
3229
3236
  if (I.length <= 80 && P.length <= 3 && P.every((w) => w.length <= 48)) return "subtitle";
3230
3237
  }
@@ -3234,13 +3241,13 @@ function $0(M, I, K) {
3234
3241
  }
3235
3242
  function Ml(M, I, K, P, w, l = [], C = []) {
3236
3243
  var g, y;
3237
- const s = V0(M), S = s == null ? void 0 : s.table, T = new Set((S == null ? void 0 : S.cells.flat().map((A) => A.trim()).filter(Boolean)) ?? []), j = AI(M), X = [], B = [];
3244
+ const s = V0(M), S = s == null ? void 0 : s.table, T = new Set((S == null ? void 0 : S.cells.flat().map((A) => A.trim()).filter(Boolean)) ?? []), X = AI(M), j = [], B = [];
3238
3245
  if (S && s) {
3239
3246
  const A = vI(s.box, K);
3240
- A && X.push({ kind: "table", box: A, table: S });
3247
+ A && j.push({ kind: "table", box: A, table: S });
3241
3248
  }
3242
3249
  const Y = [];
3243
- for (const A of j)
3250
+ for (const A of X)
3244
3251
  !A.box || A.textType === JI || S && T.has(A.text.trim()) || A.shapeType === 20 && (A.box.r - A.box.l < 8 || A.box.b - A.box.t < 8) || Y.find(
3245
3252
  (D) => D.text && D.text === A.text && D.box && q0(D.box, A.box) >= 0.55
3246
3253
  ) || Y.push(A);
@@ -3248,25 +3255,25 @@ function Ml(M, I, K, P, w, l = [], C = []) {
3248
3255
  const D = vI(A.box, K);
3249
3256
  if (!D) continue;
3250
3257
  if (A.shapeType === T0 || A.pib) {
3251
- const DM = _0(A.pib, I, P);
3252
- if (DM && (B.push(DM), X.push({ kind: "image", box: D, image: DM })), !A.text || XM(A.text) || bM(A.text)) continue;
3258
+ const GM = _0(A.pib, I, P);
3259
+ if (GM && (B.push(GM), j.push({ kind: "image", box: D, image: GM })), !A.text || BM(A.text) || cM(A.text)) continue;
3253
3260
  }
3254
- if (!A.text || XM(A.text) || bM(A.text)) continue;
3255
- const G = $0(A.textType, A.text, D), d = Z0(A.rawText || A.text, A.style), o = (g = A.style) != null && g.length ? rK(A.style, (A.rawText || A.text).length).end : 0, W = (y = A.style) != null && y.length ? c0(A.style, (A.rawText || A.text).length, o, w, l.length) : { color: void 0, shadow: !1, size: void 0, font: void 0 }, H = G === "title" ? w == null ? void 0 : w[3] : w == null ? void 0 : w[1], $ = W.color ?? H ?? { r: 0, g: 0, b: 0 }, ZM = A.textType ?? (G === "title" ? v : G === "subtitle" ? gM : NM), N = C[ZM] ?? (G === "title" ? C[v] : C[NM]), RM = p0(W.font, N == null ? void 0 : N.font, l, G === "title"), YM = G === "title" && W.size != null && W.size < 20 ? (N == null ? void 0 : N.size) ?? W.size : W.size ?? (N == null ? void 0 : N.size);
3256
- X.push({
3261
+ if (!A.text || BM(A.text) || cM(A.text)) continue;
3262
+ const G = $0(A.textType, A.text, D), d = Z0(A.rawText || A.text, A.style), p = (g = A.style) != null && g.length ? rK(A.style, (A.rawText || A.text).length).end : 0, W = (y = A.style) != null && y.length ? c0(A.style, (A.rawText || A.text).length, p, w, l.length) : { color: void 0, shadow: !1, size: void 0, font: void 0 }, H = G === "title" ? w == null ? void 0 : w[3] : w == null ? void 0 : w[1], r = W.color ?? H ?? { r: 0, g: 0, b: 0 }, MM = A.textType ?? (G === "title" ? q : G === "subtitle" ? CM : NM), N = C[MM] ?? (G === "title" ? C[q] : C[NM]), RM = p0(W.font, N == null ? void 0 : N.font, l, G === "title"), DM = G === "title" && W.size != null && W.size < 20 ? (N == null ? void 0 : N.size) ?? W.size : W.size ?? (N == null ? void 0 : N.size);
3263
+ j.push({
3257
3264
  kind: G,
3258
3265
  box: D,
3259
- center: A.textType === SM || A.textType === gM && G === "subtitle" || G === "title" && !W.shadow,
3266
+ center: A.textType === TM || A.textType === CM && G === "subtitle" || G === "title" && !W.shadow,
3260
3267
  narrow: D.w < 42,
3261
3268
  shadow: W.shadow || void 0,
3262
- color: U($),
3263
- fontSize: YM,
3269
+ color: U(r),
3270
+ fontSize: DM,
3264
3271
  fontFamily: TI(l[RM] ?? l[0]),
3265
3272
  text: A.text,
3266
3273
  paragraphs: d.length ? d : void 0
3267
3274
  });
3268
3275
  }
3269
- return { shapes: X, images: B, table: S };
3276
+ return { shapes: j, images: B, table: S };
3270
3277
  }
3271
3278
  function Il(M) {
3272
3279
  const I = Z(M), K = (P, w) => {
@@ -3290,36 +3297,36 @@ function Il(M) {
3290
3297
  return K(0, M.length) ?? { width: 4, height: 3 };
3291
3298
  }
3292
3299
  function Kl(M, I, K, P, w = [], l = []) {
3293
- const C = Z(M), g = [], y = [], s = [], S = /* @__PURE__ */ new Set(), T = (j, X) => {
3294
- let B = j;
3295
- for (; B + 8 <= X; ) {
3300
+ const C = Z(M), g = [], y = [], s = [], S = /* @__PURE__ */ new Set(), T = (X, j) => {
3301
+ let B = X;
3302
+ for (; B + 8 <= j; ) {
3296
3303
  const Y = t(C, B);
3297
3304
  if (!Y) break;
3298
- const A = B + Y.headerSize, D = Math.min(A + Y.len, X), G = M.subarray(A, D);
3305
+ const A = B + Y.headerSize, D = Math.min(A + Y.len, j), G = M.subarray(A, D);
3299
3306
  if (Y.type === w0) {
3300
- const d = $I(G), o = AI(G);
3301
- y.push({ scheme: d, fill: _I(o, d ?? void 0) });
3307
+ const d = $I(G), p = AI(G);
3308
+ y.push({ scheme: d, fill: _I(p, d ?? void 0) });
3302
3309
  } else Y.type === P0 ? s.push(G) : Y.ver === 15 && Y.len > 0 && T(A, D);
3303
3310
  if (B = D, Y.len === 0) break;
3304
3311
  }
3305
3312
  };
3306
3313
  T(0, M.length);
3307
- for (const j of s) {
3308
- const X = $I(j), B = AI(j);
3309
- let Y = _I(B, X ?? void 0);
3310
- if (!Y && X) {
3311
- const W = y.find((H) => r0(H.scheme, X));
3312
- W && (Y = W.fill ?? (X[0] ? { css: U(X[0]), surface: X[0] } : null));
3314
+ for (const X of s) {
3315
+ const j = $I(X), B = AI(X);
3316
+ let Y = _I(B, j ?? void 0);
3317
+ if (!Y && j) {
3318
+ const W = y.find((H) => r0(H.scheme, j));
3319
+ W && (Y = W.fill ?? (j[0] ? { css: U(j[0]), surface: j[0] } : null));
3313
3320
  }
3314
- const A = IP(v0(X ?? void 0, P, Y), w, l), D = Ml(
3315
- j,
3321
+ const A = IP(v0(j ?? void 0, P, Y), w, l), D = Ml(
3322
+ X,
3316
3323
  I,
3317
3324
  K,
3318
3325
  S,
3319
- X ?? void 0,
3326
+ j ?? void 0,
3320
3327
  w,
3321
3328
  l
3322
- ), G = N0(j), d = D.table ? n0(G, D.table) : G, o = MP(
3329
+ ), G = N0(X), d = D.table ? n0(G, D.table) : G, p = MP(
3323
3330
  d,
3324
3331
  g.length + 1,
3325
3332
  D.images,
@@ -3327,7 +3334,7 @@ function Kl(M, I, K, P, w = [], l = []) {
3327
3334
  D.shapes,
3328
3335
  A
3329
3336
  );
3330
- o && g.push(o);
3337
+ p && g.push(p);
3331
3338
  }
3332
3339
  return g;
3333
3340
  }
@@ -3344,23 +3351,23 @@ function MK(M) {
3344
3351
  const S = Z(g);
3345
3352
  let T = y;
3346
3353
  for (; T + 8 <= s; ) {
3347
- const j = t(S, T);
3348
- if (!j) break;
3349
- const X = T + j.headerSize, B = Math.min(X + j.len, s), Y = g.subarray(X, B);
3350
- if (j.type === $w)
3354
+ const X = t(S, T);
3355
+ if (!X) break;
3356
+ const j = T + X.headerSize, B = Math.min(j + X.len, s), Y = g.subarray(j, B);
3357
+ if (X.type === $w)
3351
3358
  l(), w = !0;
3352
- else if (j.type === oI)
3359
+ else if (X.type === oI)
3353
3360
  Y.length >= 4 ? P = new DataView(Y.buffer, Y.byteOffset, 4).getUint32(0, !0) : Y.length >= 2 && (P = new DataView(Y.buffer, Y.byteOffset, 2).getUint16(0, !0));
3354
- else if (j.type === _ || j.type === nM) {
3361
+ else if (X.type === $ || X.type === nM) {
3355
3362
  !w && I.length === 0 && (w = !0);
3356
- const A = j.type === _ ? hI(Y) : HI(Y);
3357
- A && P !== JI && !XM(A) && !bM(A) && K.push({
3363
+ const A = X.type === $ ? hI(Y) : HI(Y);
3364
+ A && P !== JI && !BM(A) && !cM(A) && K.push({
3358
3365
  role: "body",
3359
3366
  text: A,
3360
3367
  textType: P ?? void 0
3361
3368
  }), P = null;
3362
- } else j.ver === 15 && j.len > 0 && C(g, X, B);
3363
- if (T = B, j.len === 0) break;
3369
+ } else X.ver === 15 && X.len > 0 && C(g, j, B);
3370
+ if (T = B, X.len === 0) break;
3364
3371
  }
3365
3372
  };
3366
3373
  return C(M, 0, M.length), l(), I;
@@ -3389,27 +3396,27 @@ function Pl(M) {
3389
3396
  const C = z0(M), g = O0(P), y = e0(P, g.length), s = IP(F0(w, l), g, y), S = Il(P);
3390
3397
  let T = Kl(P, C, S, s, g, y);
3391
3398
  if (!T.length) {
3392
- const j = [], X = (B, Y) => {
3399
+ const X = [], j = (B, Y) => {
3393
3400
  const A = Z(P);
3394
3401
  let D = B;
3395
3402
  for (; D + 8 <= Y; ) {
3396
3403
  const G = t(A, D);
3397
3404
  if (!G) break;
3398
- const d = D + G.headerSize, o = Math.min(d + G.len, Y), W = P.subarray(d, o);
3405
+ const d = D + G.headerSize, p = Math.min(d + G.len, Y), W = P.subarray(d, p);
3399
3406
  if (G.type === qw) {
3400
3407
  const H = MK(W);
3401
- H.length && j.push({ instance: G.instance, slides: H });
3402
- } else G.ver === 15 && G.len > 0 && X(d, o);
3403
- if (D = o, G.len === 0) break;
3408
+ H.length && X.push({ instance: G.instance, slides: H });
3409
+ } else G.ver === 15 && G.len > 0 && j(d, p);
3410
+ if (D = p, G.len === 0) break;
3404
3411
  }
3405
3412
  };
3406
- X(0, P.length), T = ((I = j.find((B) => B.instance === 0)) == null ? void 0 : I.slides) ?? ((K = [...j].sort((B, Y) => Y.slides.length - B.slides.length)[0]) == null ? void 0 : K.slides) ?? MK(P);
3413
+ j(0, P.length), T = ((I = X.find((B) => B.instance === 0)) == null ? void 0 : I.slides) ?? ((K = [...X].sort((B, Y) => Y.slides.length - B.slides.length)[0]) == null ? void 0 : K.slides) ?? MK(P);
3407
3414
  }
3408
3415
  if (!T.length)
3409
3416
  throw new Error("Could not extract slides from .ppt");
3410
- return T.forEach((j, X) => {
3417
+ return T.forEach((X, j) => {
3411
3418
  var B;
3412
- j.index = X + 1, j.layout = $K(j.blocks, !!((B = j.images) != null && B.length), !!j.table);
3419
+ X.index = j + 1, X.layout = $K(X.blocks, !!((B = X.images) != null && B.length), !!X.table);
3413
3420
  }), {
3414
3421
  slides: T,
3415
3422
  theme: s,
@@ -3527,7 +3534,7 @@ function Sl(M) {
3527
3534
  }
3528
3535
  function Tl(M) {
3529
3536
  const I = M.theme, K = M.size ?? { width: 4, height: 3 }, P = `${IK(I, K.width)};--ppt-ratio:${K.width} / ${K.height}${I.font ? `;font-family:${I.font}` : ""}`, w = M.slides.map((l) => {
3530
- const C = `legacy-ppt__slide--${l.layout}`, g = !!(l.shapes && l.shapes.length), y = l.images && l.images.length > 0 ? " legacy-ppt__slide--has-image" : "", s = g ? " legacy-ppt__slide--positioned" : "", S = l.theme ? IK(l.theme, K.width) : "", T = g ? l.shapes.map((j) => sl(j, K.width)).join("") : `<div class="legacy-ppt__frame" aria-hidden="true"></div><div class="legacy-ppt__content">${Sl(l)}</div>`;
3537
+ const C = `legacy-ppt__slide--${l.layout}`, g = !!(l.shapes && l.shapes.length), y = l.images && l.images.length > 0 ? " legacy-ppt__slide--has-image" : "", s = g ? " legacy-ppt__slide--positioned" : "", S = l.theme ? IK(l.theme, K.width) : "", T = g ? l.shapes.map((X) => sl(X, K.width)).join("") : `<div class="legacy-ppt__frame" aria-hidden="true"></div><div class="legacy-ppt__content">${Sl(l)}</div>`;
3531
3538
  return `<section class="legacy-ppt__slide ${C}${y}${s}" style="${S}" aria-label="Slide ${l.index}">
3532
3539
  <div class="legacy-ppt__viewport">
3533
3540
  <div class="legacy-ppt__canvas">
@@ -3571,21 +3578,21 @@ const _M = 2057, gP = 10, jl = 60, Xl = 252, Bl = 253, Al = 516, Yl = 214, Dl =
3571
3578
  57,
3572
3579
  58
3573
3580
  ]), CP = ["#NULL!", "#DIV/0!", "#VALUE!", "#REF!", "#NAME?", "#NUM!", "#N/A"];
3574
- function q(M) {
3581
+ function _(M) {
3575
3582
  return new DataView(M.buffer, M.byteOffset, M.byteLength);
3576
3583
  }
3577
3584
  function yP(M) {
3578
3585
  if (M.length < 4)
3579
3586
  return !1;
3580
- const I = q(M).getUint16(0, !0);
3587
+ const I = _(M).getUint16(0, !0);
3581
3588
  return I === 9 || I === 521 || I === 1033 || I === 2057;
3582
3589
  }
3583
- function FC(M) {
3590
+ function tC(M) {
3584
3591
  const I = M instanceof Uint8Array ? M : new Uint8Array(M);
3585
3592
  return JK(I) ? !0 : yP(I);
3586
3593
  }
3587
3594
  function Hl(M) {
3588
- const I = q(M), K = [];
3595
+ const I = _(M), K = [];
3589
3596
  let P = 0;
3590
3597
  for (; P + 4 <= M.length; ) {
3591
3598
  const w = I.getUint16(P, !0), l = I.getUint16(P + 2, !0);
@@ -3698,7 +3705,7 @@ function Fl(M, I, K) {
3698
3705
  for (let g = 0; g < P && l < M.length; g++)
3699
3706
  C += String.fromCharCode(M[l++]);
3700
3707
  else {
3701
- const g = q(M);
3708
+ const g = _(M);
3702
3709
  for (let y = 0; y < P && l + 1 < M.length; y++)
3703
3710
  C += String.fromCharCode(g.getUint16(l, !0)), l += 2;
3704
3711
  }
@@ -3735,7 +3742,7 @@ function Ql(M, I) {
3735
3742
  const P = M[6];
3736
3743
  return P === 0 ? { pendingString: !0 } : P === 1 ? M[8] ? "TRUE" : "FALSE" : P === 2 ? CP[M[8]] ?? `#ERR${M[8]}` : "";
3737
3744
  }
3738
- const K = q(M).getFloat64(6, !0);
3745
+ const K = _(M).getFloat64(6, !0);
3739
3746
  return kM(K, I);
3740
3747
  }
3741
3748
  function wK(M) {
@@ -3770,103 +3777,103 @@ function zl(M, I, K, P, w, l) {
3770
3777
  };
3771
3778
  let s = null, S = I;
3772
3779
  for (; S < M.length; S++) {
3773
- const { type: T, data: j } = M[S], X = q(j);
3780
+ const { type: T, data: X } = M[S], j = _(X);
3774
3781
  if (T === gP)
3775
3782
  return { sheet: y, next: S + 1 };
3776
- if (T === Bl && j.length >= 10) {
3777
- const B = X.getUint16(0, !0), Y = X.getUint16(2, !0), A = X.getUint32(6, !0);
3783
+ if (T === Bl && X.length >= 10) {
3784
+ const B = j.getUint16(0, !0), Y = j.getUint16(2, !0), A = j.getUint32(6, !0);
3778
3785
  y.cells.push({ row: B, col: Y, text: K[A] ?? "" }), s = null;
3779
3786
  continue;
3780
3787
  }
3781
- if ((T === Al || T === Yl) && j.length >= 8) {
3782
- const B = X.getUint16(0, !0), Y = X.getUint16(2, !0), A = X.getUint16(6, !0), D = j[8];
3788
+ if ((T === Al || T === Yl) && X.length >= 8) {
3789
+ const B = j.getUint16(0, !0), Y = j.getUint16(2, !0), A = j.getUint16(6, !0), D = X[8];
3783
3790
  let G = "";
3784
3791
  if (D === void 0)
3785
- for (let d = 8; d < j.length && G.length < A; d++)
3786
- G += String.fromCharCode(j[d]);
3792
+ for (let d = 8; d < X.length && G.length < A; d++)
3793
+ G += String.fromCharCode(X[d]);
3787
3794
  else if (D & 1)
3788
- for (let d = 9; d + 1 < j.length && G.length < A; d += 2)
3789
- G += String.fromCharCode(X.getUint16(d, !0));
3795
+ for (let d = 9; d + 1 < X.length && G.length < A; d += 2)
3796
+ G += String.fromCharCode(j.getUint16(d, !0));
3790
3797
  else
3791
- for (let d = 9; d < j.length && G.length < A; d++)
3792
- G += String.fromCharCode(j[d]);
3798
+ for (let d = 9; d < X.length && G.length < A; d++)
3799
+ G += String.fromCharCode(X[d]);
3793
3800
  y.cells.push({ row: B, col: Y, text: G }), s = null;
3794
3801
  continue;
3795
3802
  }
3796
- if (T === Dl && j.length >= 14) {
3797
- const B = X.getUint16(0, !0), Y = X.getUint16(2, !0), A = X.getUint16(4, !0);
3798
- y.cells.push({ row: B, col: Y, text: kM(X.getFloat64(6, !0), P[A]) }), s = null;
3803
+ if (T === Dl && X.length >= 14) {
3804
+ const B = j.getUint16(0, !0), Y = j.getUint16(2, !0), A = j.getUint16(4, !0);
3805
+ y.cells.push({ row: B, col: Y, text: kM(j.getFloat64(6, !0), P[A]) }), s = null;
3799
3806
  continue;
3800
3807
  }
3801
- if (T === cl && j.length >= 8) {
3802
- const B = X.getUint16(0, !0), Y = X.getUint16(2, !0);
3803
- y.cells.push({ row: B, col: Y, text: String(X.getUint16(6, !0)) }), s = null;
3808
+ if (T === cl && X.length >= 8) {
3809
+ const B = j.getUint16(0, !0), Y = j.getUint16(2, !0);
3810
+ y.cells.push({ row: B, col: Y, text: String(j.getUint16(6, !0)) }), s = null;
3804
3811
  continue;
3805
3812
  }
3806
- if (T === Gl && j.length >= 10) {
3807
- const B = X.getUint16(0, !0), Y = X.getUint16(2, !0), A = X.getUint16(4, !0);
3808
- y.cells.push({ row: B, col: Y, text: kM(PK(X.getUint32(6, !0)), P[A]) }), s = null;
3813
+ if (T === Gl && X.length >= 10) {
3814
+ const B = j.getUint16(0, !0), Y = j.getUint16(2, !0), A = j.getUint16(4, !0);
3815
+ y.cells.push({ row: B, col: Y, text: kM(PK(j.getUint32(6, !0)), P[A]) }), s = null;
3809
3816
  continue;
3810
3817
  }
3811
- if (T === dl && j.length >= 6) {
3812
- const B = X.getUint16(0, !0), Y = X.getUint16(2, !0), A = j.length - 6, D = Math.floor(A / 6);
3818
+ if (T === dl && X.length >= 6) {
3819
+ const B = j.getUint16(0, !0), Y = j.getUint16(2, !0), A = X.length - 6, D = Math.floor(A / 6);
3813
3820
  for (let G = 0; G < D; G++) {
3814
- const d = 4 + G * 6, o = X.getUint16(d, !0), W = X.getUint32(d + 2, !0);
3821
+ const d = 4 + G * 6, p = j.getUint16(d, !0), W = j.getUint32(d + 2, !0);
3815
3822
  y.cells.push({
3816
3823
  row: B,
3817
3824
  col: Y + G,
3818
- text: kM(PK(W), P[o])
3825
+ text: kM(PK(W), P[p])
3819
3826
  });
3820
3827
  }
3821
3828
  s = null;
3822
3829
  continue;
3823
3830
  }
3824
- if (T === xl && j.length >= 8) {
3825
- const B = X.getUint16(0, !0), Y = X.getUint16(2, !0);
3826
- y.cells.push({ row: B, col: Y, text: tl(j[6], j[7]) }), s = null;
3831
+ if (T === xl && X.length >= 8) {
3832
+ const B = j.getUint16(0, !0), Y = j.getUint16(2, !0);
3833
+ y.cells.push({ row: B, col: Y, text: tl(X[6], X[7]) }), s = null;
3827
3834
  continue;
3828
3835
  }
3829
- if (T === il && j.length >= 14) {
3830
- const B = X.getUint16(0, !0), Y = X.getUint16(2, !0), A = X.getUint16(4, !0), D = Ql(j, P[A]);
3836
+ if (T === il && X.length >= 14) {
3837
+ const B = j.getUint16(0, !0), Y = j.getUint16(2, !0), A = j.getUint16(4, !0), D = Ql(X, P[A]);
3831
3838
  D && typeof D == "object" ? s = { row: B, col: Y } : D !== null && (y.cells.push({ row: B, col: Y, text: D }), s = null);
3832
3839
  continue;
3833
3840
  }
3834
- if (T === bl && s && j.length >= 3) {
3835
- const B = X.getUint16(0, !0), Y = j[2];
3841
+ if (T === bl && s && X.length >= 3) {
3842
+ const B = j.getUint16(0, !0), Y = X[2];
3836
3843
  let A = "";
3837
3844
  if (Y & 1)
3838
- for (let D = 3; D + 1 < j.length && A.length < B; D += 2)
3839
- A += String.fromCharCode(X.getUint16(D, !0));
3845
+ for (let D = 3; D + 1 < X.length && A.length < B; D += 2)
3846
+ A += String.fromCharCode(j.getUint16(D, !0));
3840
3847
  else
3841
- for (let D = 3; D < j.length && A.length < B; D++)
3842
- A += String.fromCharCode(j[D]);
3848
+ for (let D = 3; D < X.length && A.length < B; D++)
3849
+ A += String.fromCharCode(X[D]);
3843
3850
  y.cells.push({ row: s.row, col: s.col, text: A }), s = null;
3844
3851
  continue;
3845
3852
  }
3846
- if (T === pl && j.length >= 2) {
3847
- const B = X.getUint16(0, !0);
3853
+ if (T === pl && X.length >= 2) {
3854
+ const B = j.getUint16(0, !0);
3848
3855
  for (let Y = 0; Y < B; Y++) {
3849
3856
  const A = 2 + Y * 8;
3850
- if (A + 8 > j.length)
3857
+ if (A + 8 > X.length)
3851
3858
  break;
3852
3859
  y.merges.push({
3853
- rowFirst: X.getUint16(A, !0),
3854
- rowLast: X.getUint16(A + 2, !0),
3855
- colFirst: X.getUint16(A + 4, !0),
3856
- colLast: X.getUint16(A + 6, !0)
3860
+ rowFirst: j.getUint16(A, !0),
3861
+ rowLast: j.getUint16(A + 2, !0),
3862
+ colFirst: j.getUint16(A + 4, !0),
3863
+ colLast: j.getUint16(A + 6, !0)
3857
3864
  });
3858
3865
  }
3859
3866
  continue;
3860
3867
  }
3861
- if (T === ol && j.length >= 6) {
3862
- const B = X.getUint16(0, !0), Y = X.getUint16(2, !0), A = X.getUint16(4, !0), D = ((j.length >= 10 ? X.getUint16(8, !0) : 0) & 1) !== 0, G = Math.max(20, Math.round(A / 256 * 7.5));
3868
+ if (T === ol && X.length >= 6) {
3869
+ const B = j.getUint16(0, !0), Y = j.getUint16(2, !0), A = j.getUint16(4, !0), D = ((X.length >= 10 ? j.getUint16(8, !0) : 0) & 1) !== 0, G = Math.max(20, Math.round(A / 256 * 7.5));
3863
3870
  for (let d = B; d <= Y; d++)
3864
3871
  y.colWidths.set(d, G), D && ((C = y.hiddenColumns) == null || C.add(d));
3865
3872
  continue;
3866
3873
  }
3867
- if (T === Jl && j.length >= 8) {
3868
- const B = X.getUint16(0, !0), Y = X.getUint16(6, !0);
3869
- (j.length >= 14 ? X.getUint16(12, !0) : 0) & 1 && ((g = y.hiddenRows) == null || g.add(B)), Y > 0 && y.rowHeights.set(B, Math.max(16, Math.round(Y / 15)));
3874
+ if (T === Jl && X.length >= 8) {
3875
+ const B = j.getUint16(0, !0), Y = j.getUint16(6, !0);
3876
+ (X.length >= 14 ? j.getUint16(12, !0) : 0) & 1 && ((g = y.hiddenRows) == null || g.add(B)), Y > 0 && y.rowHeights.set(B, Math.max(16, Math.round(Y / 15)));
3870
3877
  }
3871
3878
  }
3872
3879
  return { sheet: y, next: S };
@@ -3879,7 +3886,7 @@ function Nl(M) {
3879
3886
  let g = 0;
3880
3887
  if (((I = K[0]) == null ? void 0 : I.type) === _M) {
3881
3888
  const S = K[0].data;
3882
- S.length >= 2 && (P = q(S).getUint16(0, !0) >= 1536), g = 1;
3889
+ S.length >= 2 && (P = _(S).getUint16(0, !0) >= 1536), g = 1;
3883
3890
  }
3884
3891
  for (; g < K.length; ) {
3885
3892
  const S = K[g];
@@ -3887,13 +3894,13 @@ function Nl(M) {
3887
3894
  break;
3888
3895
  if (S.type === Xl) {
3889
3896
  const T = [];
3890
- let j = g + 1;
3891
- for (; j < K.length && K[j].type === jl; )
3892
- T.push(K[j].data), j += 1;
3893
- w.push(...kl(S.data, T)), g = j;
3897
+ let X = g + 1;
3898
+ for (; X < K.length && K[X].type === jl; )
3899
+ T.push(K[X].data), X += 1;
3900
+ w.push(...kl(S.data, T)), g = X;
3894
3901
  continue;
3895
3902
  }
3896
- S.type === Zl ? l.push(Ul(S.data, P)) : S.type === Wl && S.data.length >= 4 && C.push(q(S.data).getUint16(2, !0)), g += 1;
3903
+ S.type === Zl ? l.push(Ul(S.data, P)) : S.type === Wl && S.data.length >= 4 && C.push(_(S.data).getUint16(2, !0)), g += 1;
3897
3904
  }
3898
3905
  const y = [];
3899
3906
  let s = 0;
@@ -3903,22 +3910,22 @@ function Nl(M) {
3903
3910
  g += 1;
3904
3911
  continue;
3905
3912
  }
3906
- const T = S.data.length >= 4 ? q(S.data).getUint16(2, !0) : KK, j = l[s];
3913
+ const T = S.data.length >= 4 ? _(S.data).getUint16(2, !0) : KK, X = l[s];
3907
3914
  if (s += 1, T !== KK) {
3908
3915
  for (; g < K.length && K[g].type !== gP; )
3909
3916
  g += 1;
3910
3917
  g += 1;
3911
3918
  continue;
3912
3919
  }
3913
- const X = zl(
3920
+ const j = zl(
3914
3921
  K,
3915
3922
  g + 1,
3916
3923
  w,
3917
3924
  C,
3918
- (j == null ? void 0 : j.name) || `Sheet${y.length + 1}`,
3919
- (j == null ? void 0 : j.hidden) ?? !1
3925
+ (X == null ? void 0 : X.name) || `Sheet${y.length + 1}`,
3926
+ (X == null ? void 0 : X.hidden) ?? !1
3920
3927
  );
3921
- y.push(X.sheet), g = X.next;
3928
+ y.push(j.sheet), g = j.next;
3922
3929
  }
3923
3930
  return y.length || y.push({
3924
3931
  name: "Sheet1",
@@ -3931,7 +3938,7 @@ function Nl(M) {
3931
3938
  hiddenRows: /* @__PURE__ */ new Set()
3932
3939
  }), { sheets: y };
3933
3940
  }
3934
- function LC(M) {
3941
+ function QC(M) {
3935
3942
  const I = M instanceof Uint8Array ? M : new Uint8Array(M), K = JK(I) ? hK(I, ["Workbook", "Book"]) : yP(I) ? I : null;
3936
3943
  if (!(K != null && K.length))
3937
3944
  throw new Error("Not a legacy Excel workbook");
@@ -3940,7 +3947,7 @@ function LC(M) {
3940
3947
  throw new Error("Invalid legacy Excel workbook data");
3941
3948
  return P;
3942
3949
  }
3943
- function tC(M) {
3950
+ function EC(M) {
3944
3951
  if (!M || !Array.isArray(M.sheets))
3945
3952
  throw new Error("Invalid legacy Excel workbook data");
3946
3953
  return M.sheets.map((I) => {
@@ -3962,8 +3969,8 @@ function tC(M) {
3962
3969
  continue;
3963
3970
  const s = String(y.row), S = K[s] ?? { cells: {} }, T = l.get(`${y.row},${y.col}`);
3964
3971
  S.cells[String(y.col)] = T ? { text: y.text, merge: T } : { text: y.text };
3965
- const j = I.rowHeights.get(y.row);
3966
- j && (S.height = j), K[s] = S, y.col > C && (C = y.col), y.row > g && (g = y.row);
3972
+ const X = I.rowHeights.get(y.row);
3973
+ X && (S.height = X), K[s] = S, y.col > C && (C = y.col), y.row > g && (g = y.row);
3967
3974
  }
3968
3975
  for (const [y, s] of I.rowHeights) {
3969
3976
  const S = String(y);
@@ -3981,10 +3988,10 @@ function tC(M) {
3981
3988
  };
3982
3989
  });
3983
3990
  }
3984
- async function QC(M) {
3991
+ async function UC(M) {
3985
3992
  return vw(ew(M));
3986
3993
  }
3987
- async function EC(M) {
3994
+ async function zC(M) {
3988
3995
  return Tl(Pl(M));
3989
3996
  }
3990
3997
  function sP(M) {
@@ -4049,7 +4056,7 @@ async function DI(M, I) {
4049
4056
  const K = jP(M, I);
4050
4057
  return K ? M.file(K).async("string") : null;
4051
4058
  }
4052
- const UC = [
4059
+ const NC = [
4053
4060
  "p[style-name='Title'] => h1.ooxml-doc__title:fresh",
4054
4061
  "p[style-name='Heading 1'] => h1.ooxml-doc__heading.ooxml-doc__heading--h1:fresh",
4055
4062
  "p[style-name='Heading 2'] => h2.ooxml-doc__heading.ooxml-doc__heading--h2:fresh",
@@ -4178,18 +4185,18 @@ function ul(M, I) {
4178
4185
  if (P.name.toLowerCase() === K || P.id.toLowerCase() === K.replace(/\s+/g, ""))
4179
4186
  return P.id;
4180
4187
  }
4181
- function zC(M) {
4188
+ function fC(M) {
4182
4189
  const I = { "line-height": "1.8" };
4183
4190
  return M.font && (I["font-family"] = M.font, I["--docx-font"] = M.font), M.size && (I["font-size"] = `${M.size}pt`, I["--docx-size"] = `${M.size}pt`), M.color && (I.color = M.color, I["--docx-color"] = M.color), M.titleFont && (I["--docx-title-font"] = M.titleFont), M.titleSize && (I["--docx-title-size"] = `${M.titleSize}pt`), M.titleColor && (I["--docx-title-color"] = M.titleColor), M.headingFont && (I["--docx-heading-font"] = M.headingFont), M.heading1Size && (I["--docx-h1-size"] = `${M.heading1Size}pt`), M.heading2Size && (I["--docx-h2-size"] = `${M.heading2Size}pt`), M.heading3Size && (I["--docx-h3-size"] = `${M.heading3Size}pt`), M.heading3Color && (I["--docx-h3-color"] = M.heading3Color), M.linkColor && (I["--docx-link"] = M.linkColor), I;
4184
4191
  }
4185
- async function NC(M) {
4192
+ async function aC(M) {
4186
4193
  const I = await iK(M);
4187
4194
  if (!jP(I, "word/document.xml"))
4188
4195
  throw new Error("Not a valid .docx (missing word/document.xml)");
4189
4196
  const [K, P] = await Promise.all([
4190
4197
  DI(I, "word/styles.xml"),
4191
4198
  DI(I, "theme1.xml")
4192
- ]), w = nl(P), { styles: l, defaults: C } = rl(K, w), g = /* @__PURE__ */ new Map(), y = (Y) => GI(C, FM(l, g, ul(l, Y))), s = y("Normal"), S = y("Title"), T = y("Heading 1"), j = y("Heading 2"), X = y("Heading 3"), B = GI(
4199
+ ]), w = nl(P), { styles: l, defaults: C } = rl(K, w), g = /* @__PURE__ */ new Map(), y = (Y) => GI(C, FM(l, g, ul(l, Y))), s = y("Normal"), S = y("Title"), T = y("Heading 1"), X = y("Heading 2"), j = y("Heading 3"), B = GI(
4193
4200
  FM(l, g, "InternetLink"),
4194
4201
  FM(l, g, "Hyperlink")
4195
4202
  );
@@ -4202,9 +4209,9 @@ async function NC(M) {
4202
4209
  titleColor: S.color,
4203
4210
  headingFont: T.font ? $M(T.font) : void 0,
4204
4211
  heading1Size: T.size,
4205
- heading2Size: j.size,
4206
- heading3Size: X.size,
4207
- heading3Color: X.color,
4212
+ heading2Size: X.size,
4213
+ heading3Size: j.size,
4214
+ heading3Color: j.color,
4208
4215
  linkColor: B.color
4209
4216
  };
4210
4217
  }
@@ -4213,7 +4220,7 @@ const MI = {
4213
4220
  cy: 6858e3,
4214
4221
  ratio: 9 / 16
4215
4222
  };
4216
- async function fC(M) {
4223
+ async function VC(M) {
4217
4224
  var I, K;
4218
4225
  try {
4219
4226
  const P = await iK(M), w = await DI(P, "ppt/presentation.xml");
@@ -4305,7 +4312,7 @@ function _l() {
4305
4312
  });
4306
4313
  }
4307
4314
  let dI = null;
4308
- function aC(M, I) {
4315
+ function nC(M, I) {
4309
4316
  var K;
4310
4317
  if (typeof window > "u") return;
4311
4318
  _l();
@@ -4318,7 +4325,7 @@ function aC(M, I) {
4318
4325
  } = I || {};
4319
4326
  M.GlobalWorkerOptions && (M.GlobalWorkerOptions.workerSrc = w), dI = { cMapUrl: l, cMapPacked: C, standardFontDataUrl: g, wasmUrl: y };
4320
4327
  }
4321
- function VC() {
4328
+ function RC() {
4322
4329
  return dI ? { ...dI } : null;
4323
4330
  }
4324
4331
  const $l = {
@@ -4437,19 +4444,19 @@ function Kg(M) {
4437
4444
  ].includes(M);
4438
4445
  }
4439
4446
  const KI = /* @__PURE__ */ new Map();
4440
- async function nC(M) {
4447
+ async function rC(M) {
4441
4448
  if (KI.has(M))
4442
4449
  return KI.get(M);
4443
4450
  if (!Kg(M))
4444
4451
  return null;
4445
4452
  try {
4446
4453
  let I = null;
4447
- return M === "image/heic" || M === "image/heif" ? I = (await import("./heicLoader-D_9PukkA-DdDu94xL.mjs")).default : M === "image/avif" ? I = (await import("./avifLoader-CAUzjn-d-CTy7cevh.mjs")).default : M === "image/tiff" ? I = (await import("./tiffLoader-BlhByX8w-jsxHlbyu.mjs")).default : M === "image/x-canon-cr2" || M === "image/x-nikon-nef" || M === "image/x-sony-arw" || M === "image/x-adobe-dng" || M === "image/x-fuji-raf" || M === "image/x-olympus-orf" ? I = (await import("./rawLoader-C-tPeFAB-CrCtXMup.mjs")).default : M === "image/vnd.adobe.photoshop" ? I = (await import("./psdLoader-C0tKUXXl-DGOmJwkQ.mjs")).default : (M === "image/jp2" || M === "image/jpx") && (I = (await import("./jp2Loader-Dig19xyo-BBR3tcPW.mjs")).default), I && KI.set(M, I), I;
4454
+ return M === "image/heic" || M === "image/heif" ? I = (await import("./heicLoader-D_9PukkA-Czof_5FJ.mjs")).default : M === "image/avif" ? I = (await import("./avifLoader-CAUzjn-d-C0KRpetN.mjs")).default : M === "image/tiff" ? I = (await import("./tiffLoader-BlhByX8w-BOxg_Du5.mjs")).default : M === "image/x-canon-cr2" || M === "image/x-nikon-nef" || M === "image/x-sony-arw" || M === "image/x-adobe-dng" || M === "image/x-fuji-raf" || M === "image/x-olympus-orf" ? I = (await import("./rawLoader-C-tPeFAB-C35zC8nZ.mjs")).default : M === "image/vnd.adobe.photoshop" ? I = (await import("./psdLoader-C0tKUXXl-CYWoQis5.mjs")).default : (M === "image/jp2" || M === "image/jpx") && (I = (await import("./jp2Loader-Dig19xyo-CKUaGhPl.mjs")).default), I && KI.set(M, I), I;
4448
4455
  } catch (I) {
4449
4456
  return console.warn(`Failed to load image decoder for ${M}:`, I), null;
4450
4457
  }
4451
4458
  }
4452
- async function RC(M) {
4459
+ async function uC(M) {
4453
4460
  if (M.type && M.type !== "application/octet-stream")
4454
4461
  return M.type;
4455
4462
  const I = Ig(M.name);
@@ -4516,10 +4523,10 @@ const gg = /* @__PURE__ */ new Set([
4516
4523
  "image/x-olympus-orf",
4517
4524
  "image/vnd.adobe.photoshop"
4518
4525
  ]);
4519
- function rC(M) {
4526
+ function OC(M) {
4520
4527
  return gg.has(M);
4521
4528
  }
4522
- async function uC(M, I, K) {
4529
+ async function eC(M, I, K) {
4523
4530
  return new Promise((P, w) => {
4524
4531
  let l;
4525
4532
  try {
@@ -4532,12 +4539,12 @@ async function uC(M, I, K) {
4532
4539
  const T = S.data;
4533
4540
  if (T.id === C)
4534
4541
  if (T.success) {
4535
- const j = new Blob([T.data], { type: T.mimeType });
4536
- s(), P(j);
4542
+ const X = new Blob([T.data], { type: T.mimeType });
4543
+ s(), P(X);
4537
4544
  } else {
4538
4545
  s();
4539
- const j = T.error;
4540
- w(j && typeof j == "object" && "key" in j ? new n(j.key, j.params, j.detail) : new n("image.decode_failed", void 0, j));
4546
+ const X = T.error;
4547
+ w(X && typeof X == "object" && "key" in X ? new n(X.key, X.params, X.detail) : new n("image.decode_failed", void 0, X));
4541
4548
  }
4542
4549
  }, y = (S) => {
4543
4550
  s(), w(new n("image.worker_crashed", void 0, S.message || new n("image.out_of_memory")));
@@ -4552,7 +4559,7 @@ async function uC(M, I, K) {
4552
4559
  }
4553
4560
  const xI = Symbol("file-preview-locale");
4554
4561
  function Cg(M, I) {
4555
- const K = fM(xI, null), P = p(() => L(M) ?? (K == null ? void 0 : K.locale.value) ?? "en-US"), w = p(
4562
+ const K = fM(xI, null), P = o(() => L(M) ?? (K == null ? void 0 : K.locale.value) ?? "en-US"), w = o(
4556
4563
  () => L(I) === void 0 && (K == null ? void 0 : K.locale.value) === P.value ? K.t.value : bI({ locale: P.value, messages: L(I) })
4557
4564
  ), l = { locale: P, t: w };
4558
4565
  return aM(xI, l), l;
@@ -4564,21 +4571,21 @@ function yg() {
4564
4571
  function AP() {
4565
4572
  const M = fM(xI, null);
4566
4573
  if (M) return M;
4567
- const I = p(() => "en-US"), K = p(() => yg());
4574
+ const I = o(() => "en-US"), K = o(() => yg());
4568
4575
  return { locale: I, t: K };
4569
4576
  }
4570
4577
  const YP = Symbol("vfp-resolved-theme");
4571
4578
  function sg(M) {
4572
- const I = p(() => L(M));
4579
+ const I = o(() => L(M));
4573
4580
  aM(YP, I);
4574
4581
  }
4575
- function OC() {
4582
+ function vC() {
4576
4583
  const M = fM(YP, null);
4577
- return M || p(() => "dark");
4584
+ return M || o(() => "dark");
4578
4585
  }
4579
4586
  const DP = Symbol("file-preview:request");
4580
4587
  function Sg(M) {
4581
- const I = p(() => {
4588
+ const I = o(() => {
4582
4589
  const K = typeof M == "function" ? M() : M;
4583
4590
  return {
4584
4591
  fetcher: _P({
@@ -4595,19 +4602,19 @@ function Tg() {
4595
4602
  }
4596
4603
  function GP() {
4597
4604
  const M = fM(DP, void 0);
4598
- return M || p(() => Tg());
4605
+ return M || o(() => Tg());
4599
4606
  }
4600
4607
  function jg() {
4601
4608
  const M = GP();
4602
- return p(() => M.value.fetcher);
4609
+ return o(() => M.value.fetcher);
4603
4610
  }
4604
4611
  function Xg(M) {
4605
- const I = GP(), K = wM("");
4612
+ const I = GP(), K = lM("");
4606
4613
  let P = null;
4607
4614
  const w = () => {
4608
4615
  P && (URL.revokeObjectURL(P), P = null);
4609
4616
  };
4610
- return TM(
4617
+ return jM(
4611
4618
  () => {
4612
4619
  var g, y;
4613
4620
  const l = M.value, C = !!(l && ((y = (g = I.value).shouldFetchAsBlob) != null && y.call(g, l)));
@@ -4634,18 +4641,18 @@ function Xg(M) {
4634
4641
  }
4635
4642
  },
4636
4643
  { immediate: !0 }
4637
- ), dM(w), p(() => {
4644
+ ), xM(w), o(() => {
4638
4645
  var g, y;
4639
4646
  const l = M.value;
4640
4647
  return l ? !((y = (g = I.value).shouldFetchAsBlob) != null && y.call(g, l)) ? l.url : K.value : "";
4641
4648
  });
4642
4649
  }
4643
4650
  function LI(M) {
4644
- const I = wM(
4651
+ const I = lM(
4645
4652
  typeof window < "u" ? window.matchMedia("(prefers-color-scheme: dark)").matches : !0
4646
4653
  );
4647
4654
  let K;
4648
- return TM(
4655
+ return jM(
4649
4656
  M,
4650
4657
  (P) => {
4651
4658
  if (K == null || K(), K = void 0, P !== "auto" || typeof window > "u") return;
@@ -4657,9 +4664,9 @@ function LI(M) {
4657
4664
  w.addEventListener("change", l), K = () => w.removeEventListener("change", l);
4658
4665
  },
4659
4666
  { immediate: !0 }
4660
- ), dM(() => K == null ? void 0 : K()), p(() => M.value === "auto" ? I.value ? "dark" : "light" : M.value);
4667
+ ), xM(() => K == null ? void 0 : K()), o(() => M.value === "auto" ? I.value ? "dark" : "light" : M.value);
4661
4668
  }
4662
- const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loading-content" }, Yg = { class: "vfp-renderer-loading-text" }, Dg = /* @__PURE__ */ AM({
4669
+ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loading-content" }, Yg = { class: "vfp-renderer-loading-text" }, Dg = /* @__PURE__ */ YM({
4663
4670
  __name: "RendererLoading",
4664
4671
  setup(M) {
4665
4672
  const { t: I } = AP();
@@ -4674,7 +4681,7 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4674
4681
  loader: M,
4675
4682
  loadingComponent: { render: () => iP(Dg) },
4676
4683
  delay: 0
4677
- }), Gg = J(() => import("./index-CLM9sOKN.mjs")), dg = J(() => import("./index-DVG1fZAv.mjs")), xg = J(() => import("./index-BPmyF7Wr.mjs")), XK = J(() => import("./index-2VQLB2Mi.mjs")), ig = J(() => import("./index-Bfg5zM8l.mjs")), bg = J(() => import("./index-DmEMePjL.mjs")), cg = J(() => import("./index-Cud9j9Xy.mjs")), Zg = J(() => import("./index-De-oaCgN.mjs")), Wg = J(() => import("./index-D6Pjjxi0.mjs")), pg = J(() => import("./index-DOAOk6m5.mjs")), og = J(() => import("./index-CuiEjR23.mjs")), Jg = J(() => import("./index-D9z6lQat.mjs")), hg = J(() => import("./index-D6te_qaB.mjs")), Hg = J(() => import("./index-BxmX005K.mjs")), mg = J(() => import("./index-CiGUKdlt.mjs")), kg = J(() => import("./index-Bmqn45d_.mjs")), Fg = J(() => import("./index-D4jhvs5m.mjs")), Lg = J(() => import("./index-t9kSzzMg.mjs")), tg = J(() => import("./index-i-KacQvS.mjs")), Qg = J(() => import("./index-WcAnJA2t.mjs")), Eg = J(() => import("./index-CM11hSQu.mjs")), BK = [
4684
+ }), Gg = J(() => import("./index--612Smof.mjs")), dg = J(() => import("./index-BvBqDq3O.mjs")), xg = J(() => import("./index-CY3xzGgt.mjs")), XK = J(() => import("./index-B21EAyWz.mjs")), ig = J(() => import("./index-Bp9CuvMZ.mjs")), bg = J(() => import("./index-BASg1cr4.mjs")), cg = J(() => import("./index-BlrFFeqc.mjs")), Zg = J(() => import("./index-8Vpbg2kS.mjs")), Wg = J(() => import("./index-Dkro_8Fy.mjs")), pg = J(() => import("./index-DN4Ui0Gh.mjs")), og = J(() => import("./index-D30L8tm9.mjs")), Jg = J(() => import("./index-C9mAajbD.mjs")), hg = J(() => import("./index-Bxpf9v5j.mjs")), Hg = J(() => import("./index-CWE-hKSs.mjs")), mg = J(() => import("./index-VdzIFJJW.mjs")), kg = J(() => import("./index-BVdrGK3Q.mjs")), Fg = J(() => import("./index-BB0i4QqI.mjs")), Lg = J(() => import("./index-CxKZKUJj.mjs")), tg = J(() => import("./index-BuqPb5mP.mjs")), Qg = J(() => import("./index-aoXgVLBb.mjs")), Eg = J(() => import("./index-CDg6vIbT.mjs")), BK = [
4678
4685
  {
4679
4686
  fileType: "image",
4680
4687
  component: Gg,
@@ -4709,21 +4716,24 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4709
4716
  fileType: "xlsx",
4710
4717
  component: XK,
4711
4718
  getProps: (M) => ({
4712
- url: M.resolvedUrl
4719
+ url: M.resolvedUrl,
4720
+ emptyHint: M.emptyHint
4713
4721
  })
4714
4722
  },
4715
4723
  {
4716
4724
  fileType: "xls",
4717
4725
  component: XK,
4718
4726
  getProps: (M) => ({
4719
- url: M.resolvedUrl
4727
+ url: M.resolvedUrl,
4728
+ emptyHint: M.emptyHint
4720
4729
  })
4721
4730
  },
4722
4731
  {
4723
4732
  fileType: "pptx",
4724
4733
  component: ig,
4725
4734
  getProps: (M) => ({
4726
- url: M.resolvedUrl
4735
+ url: M.resolvedUrl,
4736
+ emptyHint: M.emptyHint
4727
4737
  })
4728
4738
  },
4729
4739
  {
@@ -4783,7 +4793,8 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4783
4793
  component: Jg,
4784
4794
  getProps: (M) => ({
4785
4795
  url: M.resolvedUrl,
4786
- fileName: M.currentFile.name
4796
+ fileName: M.currentFile.name,
4797
+ emptyHint: M.emptyHint
4787
4798
  })
4788
4799
  },
4789
4800
  {
@@ -4823,7 +4834,8 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4823
4834
  component: Fg,
4824
4835
  getProps: (M) => ({
4825
4836
  url: M.resolvedUrl,
4826
- fileName: M.currentFile.name
4837
+ fileName: M.currentFile.name,
4838
+ emptyHint: M.emptyHint
4827
4839
  })
4828
4840
  },
4829
4841
  {
@@ -4845,7 +4857,7 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4845
4857
  baseUrl: M.currentFile.url
4846
4858
  })
4847
4859
  }
4848
- ], Ug = { class: "vfp-flex vfp-flex-col vfp-items-center vfp-justify-center vfp-w-full vfp-h-full vfp-p-6 vfp-gap-4" }, zg = { class: "vfp-w-20 vfp-h-20 vfp-rounded-full vfp-bg-surface-2 vfp-flex vfp-items-center vfp-justify-center" }, Ng = { class: "vfp-text-fg-primary vfp-text-center" }, fg = { class: "vfp-text-lg vfp-font-medium vfp-mb-2" }, ag = { class: "vfp-text-fg-secondary" }, AK = /* @__PURE__ */ AM({
4860
+ ], Ug = { class: "vfp-flex vfp-flex-col vfp-items-center vfp-justify-center vfp-w-full vfp-h-full vfp-p-6 vfp-gap-4" }, zg = { class: "vfp-w-20 vfp-h-20 vfp-rounded-full vfp-bg-surface-2 vfp-flex vfp-items-center vfp-justify-center" }, Ng = { class: "vfp-text-fg-primary vfp-text-center" }, fg = { class: "vfp-text-lg vfp-font-medium vfp-mb-2" }, ag = { class: "vfp-text-fg-secondary" }, AK = /* @__PURE__ */ YM({
4849
4861
  __name: "index",
4850
4862
  props: {
4851
4863
  fileName: {},
@@ -4858,7 +4870,7 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4858
4870
  getToolbarGroups: () => []
4859
4871
  }), (C, g) => (x(), c("div", Ug, [
4860
4872
  m("div", zg, [
4861
- jM(L(pP), { class: "vfp-w-10 vfp-h-10 vfp-text-fg-secondary" })
4873
+ XM(L(pP), { class: "vfp-w-10 vfp-h-10 vfp-text-fg-secondary" })
4862
4874
  ]),
4863
4875
  m("div", Ng, [
4864
4876
  m("p", fg, R(M.fileName), 1),
@@ -4868,12 +4880,12 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4868
4880
  class: "vfp-flex vfp-items-center vfp-gap-2 vfp-px-4 vfp-py-2 vfp-bg-surface-2 hover:vfp-bg-surface-3 vfp-backdrop-blur-sm vfp-rounded-lg vfp-text-fg-primary vfp-font-medium vfp-transition-all",
4869
4881
  onClick: g[0] || (g[0] = (y) => w("download"))
4870
4882
  }, [
4871
- jM(L(YK), { class: "vfp-w-5 vfp-h-5" }),
4883
+ XM(L(YK), { class: "vfp-w-5 vfp-h-5" }),
4872
4884
  bP(" " + R(L(P)("common.download")), 1)
4873
4885
  ])
4874
4886
  ]));
4875
4887
  }
4876
- }), Vg = 2e3, ng = /* @__PURE__ */ AM({
4888
+ }), Vg = 2e3, ng = /* @__PURE__ */ YM({
4877
4889
  __name: "NavArrows",
4878
4890
  props: {
4879
4891
  containerRef: {},
@@ -4883,7 +4895,7 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4883
4895
  },
4884
4896
  emits: ["prev", "next"],
4885
4897
  setup(M, { emit: I }) {
4886
- const K = M, P = I, w = wM(!0);
4898
+ const K = M, P = I, w = lM(!0);
4887
4899
  let l = null;
4888
4900
  const C = () => {
4889
4901
  l !== null && clearTimeout(l), l = window.setTimeout(() => {
@@ -4898,13 +4910,13 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4898
4910
  }, S = (T) => {
4899
4911
  y !== T && (s(), T && (T.addEventListener("mousemove", g), y = T));
4900
4912
  };
4901
- return TM(() => K.containerRef, (T) => S(T), { immediate: !0 }), TM(() => K.resetKey, () => {
4913
+ return jM(() => K.containerRef, (T) => S(T), { immediate: !0 }), jM(() => K.resetKey, () => {
4902
4914
  w.value = !0, C();
4903
4915
  }), iI(() => {
4904
4916
  C();
4905
- }), dM(() => {
4917
+ }), xM(() => {
4906
4918
  l !== null && clearTimeout(l), s();
4907
- }), (T, j) => (x(), c(h, null, [
4919
+ }), (T, X) => (x(), c(h, null, [
4908
4920
  M.hasPrev ? (x(), c("button", {
4909
4921
  key: 0,
4910
4922
  style: LM({
@@ -4914,10 +4926,10 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4914
4926
  transition: "opacity 0.2s, transform 0.2s"
4915
4927
  }),
4916
4928
  class: "vfp-absolute vfp-z-20 vfp-left-2 md:vfp-left-4 vfp-top-1/2 vfp-w-10 vfp-h-10 md:vfp-w-12 md:vfp-h-12 vfp-rounded-full vfp-backdrop-blur-xl vfp-border vfp-flex vfp-items-center vfp-justify-center vfp-transition-colors vfp-shadow-2xl vfp-bg-surface-nav vfp-border-line hover:vfp-bg-surface-nav-hover vfp-text-fg-primary",
4917
- onClick: j[0] || (j[0] = (X) => P("prev")),
4929
+ onClick: X[0] || (X[0] = (j) => P("prev")),
4918
4930
  onMouseenter: g
4919
4931
  }, [
4920
- jM(L(oP), { class: "vfp-w-5 vfp-h-5 md:vfp-w-6 md:vfp-h-6" })
4932
+ XM(L(oP), { class: "vfp-w-5 vfp-h-5 md:vfp-w-6 md:vfp-h-6" })
4921
4933
  ], 36)) : E("", !0),
4922
4934
  M.hasNext ? (x(), c("button", {
4923
4935
  key: 1,
@@ -4928,16 +4940,16 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4928
4940
  transition: "opacity 0.2s, transform 0.2s"
4929
4941
  }),
4930
4942
  class: "vfp-absolute vfp-z-20 vfp-right-2 md:vfp-right-4 vfp-top-1/2 vfp-w-10 vfp-h-10 md:vfp-w-12 md:vfp-h-12 vfp-rounded-full vfp-backdrop-blur-xl vfp-border vfp-flex vfp-items-center vfp-justify-center vfp-transition-colors vfp-shadow-2xl vfp-bg-surface-nav vfp-border-line hover:vfp-bg-surface-nav-hover vfp-text-fg-primary",
4931
- onClick: j[1] || (j[1] = (X) => P("next")),
4943
+ onClick: X[1] || (X[1] = (j) => P("next")),
4932
4944
  onMouseenter: g
4933
4945
  }, [
4934
- jM(L(JP), { class: "vfp-w-5 vfp-h-5 md:vfp-w-6 md:vfp-h-6" })
4946
+ XM(L(JP), { class: "vfp-w-5 vfp-h-5 md:vfp-w-6 md:vfp-h-6" })
4935
4947
  ], 36)) : E("", !0)
4936
4948
  ], 64));
4937
4949
  }
4938
4950
  }), Rg = ["tabindex", "data-theme"], rg = {
4939
4951
  key: 0,
4940
- class: "vfp-flex-shrink-0 vfp-z-10 vfp-backdrop-blur-md vfp-border-b vfp-bg-surface-toolbar vfp-border-line",
4952
+ class: "vfp-relative vfp-flex-shrink-0 vfp-z-30 vfp-backdrop-blur-md vfp-border-b vfp-bg-surface-toolbar vfp-border-line",
4941
4953
  style: { "padding-top": "env(safe-area-inset-top, 0px)" }
4942
4954
  }, ug = { class: "vfp-flex vfp-items-center vfp-justify-between vfp-px-3 md:vfp-px-5 vfp-py-1.5 md:vfp-py-2.5" }, Og = { class: "vfp-flex vfp-items-center vfp-flex-1 vfp-min-w-0 vfp-mr-2 md:vfp-mr-3" }, eg = { class: "vfp-font-medium vfp-text-xs md:vfp-text-sm vfp-truncate vfp-text-fg-primary" }, vg = { class: "vfp-text-xs vfp-ml-2 vfp-flex-shrink-0 vfp-text-fg-muted" }, qg = { class: "vfp-flex vfp-items-center vfp-gap-1 md:vfp-hidden vfp-flex-shrink-0" }, _g = ["data-tooltip", "disabled", "aria-pressed", "onClick"], $g = { class: "vfp-hidden md:vfp-flex vfp-items-center vfp-gap-1 vfp-flex-shrink-0" }, MC = ["data-tooltip", "disabled", "aria-pressed", "onClick"], IC = {
4943
4955
  key: 0,
@@ -4948,7 +4960,7 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4948
4960
  }, wC = {
4949
4961
  key: 0,
4950
4962
  class: "vfp-w-px vfp-h-4 vfp-mx-0.5 vfp-bg-divide"
4951
- }, lC = ["data-tooltip", "disabled", "aria-pressed", "onClick"], gC = 3, CC = /* @__PURE__ */ AM({
4963
+ }, lC = ["data-tooltip", "disabled", "aria-pressed", "onClick"], gC = 3, CC = /* @__PURE__ */ YM({
4952
4964
  __name: "FilePreviewContent",
4953
4965
  props: {
4954
4966
  files: {},
@@ -4968,7 +4980,8 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4968
4980
  showClose: { type: Boolean, default: void 0 },
4969
4981
  showDownload: { type: Boolean, default: !0 },
4970
4982
  showNavigation: { type: Boolean, default: !0 },
4971
- loopNavigation: { type: Boolean, default: !1 }
4983
+ loopNavigation: { type: Boolean, default: !1 },
4984
+ emptyHint: { default: "auto" }
4972
4985
  },
4973
4986
  emits: ["navigate", "close", "custom-event"],
4974
4987
  setup(M, { emit: I }) {
@@ -4978,54 +4991,55 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
4978
4991
  requestHandler: K.requestHandler,
4979
4992
  shouldFetchAsBlob: K.shouldFetchAsBlob
4980
4993
  }));
4981
- const P = I, { t: w, locale: l } = Cg(GM(K, "locale"), GM(K, "messages")), C = LI(GM(K, "theme"));
4994
+ const P = I, { t: w, locale: l } = Cg(dM(K, "locale"), dM(K, "messages")), C = LI(dM(K, "theme"));
4982
4995
  sg(C);
4983
- const g = wM(null), y = wM(null), s = wM(null), S = wM([]);
4996
+ const g = lM(null), y = lM(null), s = lM(null), S = lM([]);
4984
4997
  let T = null;
4985
- const j = () => {
4998
+ const X = () => {
4986
4999
  T && (T(), T = null);
4987
5000
  };
4988
- TM(s, (i) => {
4989
- var r;
4990
- j(), S.value = [], i && (i.onToolbarChange && (T = i.onToolbarChange(() => {
4991
- var MM;
4992
- S.value = ((MM = i.getToolbarGroups) == null ? void 0 : MM.call(i)) ?? [];
4993
- })), S.value = ((r = i.getToolbarGroups) == null ? void 0 : r.call(i)) ?? []);
4994
- }), dM(() => {
4995
- j();
5001
+ jM(s, (i) => {
5002
+ var u;
5003
+ X(), S.value = [], i && (i.onToolbarChange && (T = i.onToolbarChange(() => {
5004
+ var IM;
5005
+ S.value = ((IM = i.getToolbarGroups) == null ? void 0 : IM.call(i)) ?? [];
5006
+ })), S.value = ((u = i.getToolbarGroups) == null ? void 0 : u.call(i)) ?? []);
5007
+ }), xM(() => {
5008
+ X();
4996
5009
  });
4997
- const X = p(() => UP(K.files)), B = p(() => X.value[K.currentIndex]), Y = Xg(B), A = p(() => B.value && K.customRenderers.find((i) => i.test(B.value)) || null), D = p(() => !A.value || !B.value ? null : A.value.render(B.value, H.value)), G = p(() => B.value ? VP(B.value) : "unsupported"), d = p(
5010
+ const j = o(() => UP(K.files)), B = o(() => j.value[K.currentIndex]), Y = Xg(B), A = o(() => B.value && K.customRenderers.find((i) => i.test(B.value)) || null), D = o(() => !A.value || !B.value ? null : A.value.render(B.value, H.value)), G = o(() => B.value ? VP(B.value) : "unsupported"), d = o(
4998
5011
  () => BK.find((i) => i.fileType === G.value) ?? (G.value === "xls" ? BK.find((i) => i.fileType === "xlsx") : null) ?? null
4999
- ), o = p(() => !d.value || !B.value ? {} : d.value.getProps({
5012
+ ), p = o(() => !d.value || !B.value ? {} : d.value.getProps({
5000
5013
  resolvedUrl: Y.value,
5001
5014
  zipNestingDepth: K.zipNestingDepth,
5002
- currentFile: B.value
5003
- })), W = (i, r) => {
5015
+ currentFile: B.value,
5016
+ emptyHint: K.emptyHint
5017
+ })), W = (i, u) => {
5004
5018
  if (!B.value) return;
5005
- const MM = { name: i, payload: r, file: B.value };
5006
- P("custom-event", MM);
5007
- }, H = p(() => ({
5019
+ const IM = { name: i, payload: u, file: B.value };
5020
+ P("custom-event", IM);
5021
+ }, H = o(() => ({
5008
5022
  emit: W,
5009
5023
  t: w.value,
5010
5024
  theme: C.value,
5011
5025
  locale: l.value
5012
5026
  }));
5013
5027
  aM("file-preview:custom-ctx", H);
5014
- const $ = () => {
5015
- const i = X.value.length;
5028
+ const r = () => {
5029
+ const i = j.value.length;
5016
5030
  i <= 1 || (K.currentIndex > 0 ? P("navigate", K.currentIndex - 1) : K.loopNavigation && P("navigate", i - 1));
5017
- }, ZM = () => {
5018
- const i = X.value.length;
5031
+ }, MM = () => {
5032
+ const i = j.value.length;
5019
5033
  i <= 1 || (K.currentIndex < i - 1 ? P("navigate", K.currentIndex + 1) : K.loopNavigation && P("navigate", 0));
5020
5034
  }, N = (i) => {
5021
- i.key === "Escape" && K.mode === "modal" ? P("close") : i.key === "ArrowLeft" ? $() : i.key === "ArrowRight" ? ZM() : i.key === "Home" && X.value.length > 0 && K.currentIndex !== 0 ? P("navigate", 0) : i.key === "End" && X.value.length > 0 && K.currentIndex !== X.value.length - 1 && P("navigate", X.value.length - 1);
5035
+ i.key === "Escape" && K.mode === "modal" ? P("close") : i.key === "ArrowLeft" ? r() : i.key === "ArrowRight" ? MM() : i.key === "Home" && j.value.length > 0 && K.currentIndex !== 0 ? P("navigate", 0) : i.key === "End" && j.value.length > 0 && K.currentIndex !== j.value.length - 1 && P("navigate", j.value.length - 1);
5022
5036
  };
5023
5037
  iI(() => {
5024
5038
  K.mode === "modal" ? window.addEventListener("keydown", N) : y.value && y.value.addEventListener("keydown", N);
5025
- }), dM(() => {
5039
+ }), xM(() => {
5026
5040
  K.mode === "modal" ? window.removeEventListener("keydown", N) : y.value && y.value.removeEventListener("keydown", N);
5027
5041
  });
5028
- const RM = jg(), YM = async () => {
5042
+ const RM = jg(), DM = async () => {
5029
5043
  if (B.value) {
5030
5044
  if (K.onDownload) {
5031
5045
  await K.onDownload(B.value);
@@ -5037,25 +5051,25 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
5037
5051
  console.error("[file-preview] download failed:", i);
5038
5052
  }
5039
5053
  }
5040
- }, DM = p(
5054
+ }, GM = o(
5041
5055
  () => zP(K.mode, K.showClose)
5042
- ), WM = p(() => {
5043
- var i, r;
5044
- return A.value ? ((r = (i = A.value).getToolbarGroups) == null ? void 0 : r.call(i, B.value, H.value)) ?? [] : S.value;
5045
- }), rM = p(() => {
5056
+ ), WM = o(() => {
5057
+ var i, u;
5058
+ return A.value ? ((u = (i = A.value).getToolbarGroups) == null ? void 0 : u.call(i, B.value, H.value)) ?? [] : S.value;
5059
+ }), rM = o(() => {
5046
5060
  const i = [];
5047
5061
  return K.showDownload && i.push({
5048
5062
  items: [
5049
- { type: "button", icon: YK, tooltip: w.value("common.download"), action: YM }
5063
+ { type: "button", icon: YK, tooltip: w.value("common.download"), action: DM }
5050
5064
  ]
5051
- }), DM.value && i.push({
5065
+ }), GM.value && i.push({
5052
5066
  items: [
5053
5067
  { type: "button", icon: hP, tooltip: w.value("common.close"), action: () => P("close") }
5054
5068
  ]
5055
5069
  }), i;
5056
- }), dP = p(() => WM.value.length > 0);
5057
- return (i, r) => {
5058
- var MM, QI;
5070
+ }), dP = o(() => WM.value.length > 0);
5071
+ return (i, u) => {
5072
+ var IM, QI;
5059
5073
  return x(), c("div", {
5060
5074
  ref_key: "rootRef",
5061
5075
  ref: y,
@@ -5066,15 +5080,15 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
5066
5080
  M.headless ? E("", !0) : (x(), c("div", rg, [
5067
5081
  m("div", ug, [
5068
5082
  m("div", Og, [
5069
- m("h2", eg, R((MM = B.value) == null ? void 0 : MM.name), 1),
5070
- m("span", vg, R(M.currentIndex + 1) + "/" + R(X.value.length), 1)
5083
+ m("h2", eg, R((IM = B.value) == null ? void 0 : IM.name), 1),
5084
+ m("span", vg, R(M.currentIndex + 1) + "/" + R(j.value.length), 1)
5071
5085
  ]),
5072
5086
  m("div", qg, [
5073
- (x(!0), c(h, null, u(rM.value, (IM, Q) => (x(), c(h, {
5087
+ (x(!0), c(h, null, O(rM.value, (KM, Q) => (x(), c(h, {
5074
5088
  key: "m-action-" + Q
5075
5089
  }, [
5076
- (x(!0), c(h, null, u(IM.items, (b, KM) => (x(), c(h, {
5077
- key: "m-action-" + Q + "-" + KM
5090
+ (x(!0), c(h, null, O(KM.items, (b, PM) => (x(), c(h, {
5091
+ key: "m-action-" + Q + "-" + PM
5078
5092
  }, [
5079
5093
  b.type === "button" ? (x(), c("button", {
5080
5094
  key: 0,
@@ -5084,17 +5098,17 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
5084
5098
  "aria-pressed": b.active,
5085
5099
  onClick: b.action
5086
5100
  }, [
5087
- (x(), f(CM(b.icon), { class: "vfp-w-4 vfp-h-4" }))
5101
+ (x(), f(yM(b.icon), { class: "vfp-w-4 vfp-h-4" }))
5088
5102
  ], 10, _g)) : E("", !0)
5089
5103
  ], 64))), 128))
5090
5104
  ], 64))), 128))
5091
5105
  ]),
5092
5106
  m("div", $g, [
5093
- (x(!0), c(h, null, u(WM.value, (IM, Q) => (x(), c(h, {
5107
+ (x(!0), c(h, null, O(WM.value, (KM, Q) => (x(), c(h, {
5094
5108
  key: "d-tool-" + Q
5095
5109
  }, [
5096
- (x(!0), c(h, null, u(IM.items, (b, KM) => (x(), c(h, {
5097
- key: "d-tool-" + Q + "-" + KM
5110
+ (x(!0), c(h, null, O(KM.items, (b, PM) => (x(), c(h, {
5111
+ key: "d-tool-" + Q + "-" + PM
5098
5112
  }, [
5099
5113
  b.type === "button" ? (x(), c("button", {
5100
5114
  key: 0,
@@ -5104,7 +5118,7 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
5104
5118
  "aria-pressed": b.active,
5105
5119
  onClick: b.action
5106
5120
  }, [
5107
- (x(), f(CM(b.icon), { class: "vfp-w-4 vfp-h-4" }))
5121
+ (x(), f(yM(b.icon), { class: "vfp-w-4 vfp-h-4" }))
5108
5122
  ], 10, MC)) : b.type === "text" ? (x(), c("span", {
5109
5123
  key: 1,
5110
5124
  class: "vfp-text-xs vfp-text-center vfp-font-medium vfp-tabular-nums vfp-text-fg-tertiary",
@@ -5113,11 +5127,11 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
5113
5127
  ], 64))), 128)),
5114
5128
  Q < WM.value.length - 1 || rM.value.length > 0 ? (x(), c("div", IC)) : E("", !0)
5115
5129
  ], 64))), 128)),
5116
- (x(!0), c(h, null, u(rM.value, (IM, Q) => (x(), c(h, {
5130
+ (x(!0), c(h, null, O(rM.value, (KM, Q) => (x(), c(h, {
5117
5131
  key: "d-action-" + Q
5118
5132
  }, [
5119
- (x(!0), c(h, null, u(IM.items, (b, KM) => (x(), c(h, {
5120
- key: "d-action-" + Q + "-" + KM
5133
+ (x(!0), c(h, null, O(KM.items, (b, PM) => (x(), c(h, {
5134
+ key: "d-action-" + Q + "-" + PM
5121
5135
  }, [
5122
5136
  b.type === "button" ? (x(), c("button", {
5123
5137
  key: 0,
@@ -5127,19 +5141,19 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
5127
5141
  "aria-pressed": b.active,
5128
5142
  onClick: b.action
5129
5143
  }, [
5130
- (x(), f(CM(b.icon), { class: "vfp-w-4 vfp-h-4" }))
5144
+ (x(), f(yM(b.icon), { class: "vfp-w-4 vfp-h-4" }))
5131
5145
  ], 10, KC)) : E("", !0)
5132
5146
  ], 64))), 128))
5133
5147
  ], 64))), 128))
5134
5148
  ])
5135
5149
  ]),
5136
5150
  dP.value ? (x(), c("div", PC, [
5137
- (x(!0), c(h, null, u(WM.value, (IM, Q) => (x(), c(h, {
5151
+ (x(!0), c(h, null, O(WM.value, (KM, Q) => (x(), c(h, {
5138
5152
  key: "m-tool-" + Q
5139
5153
  }, [
5140
5154
  Q > 0 ? (x(), c("div", wC)) : E("", !0),
5141
- (x(!0), c(h, null, u(IM.items, (b, KM) => (x(), c(h, {
5142
- key: "m-tool-" + Q + "-" + KM
5155
+ (x(!0), c(h, null, O(KM.items, (b, PM) => (x(), c(h, {
5156
+ key: "m-tool-" + Q + "-" + PM
5143
5157
  }, [
5144
5158
  b.type === "button" ? (x(), c("button", {
5145
5159
  key: 0,
@@ -5149,7 +5163,7 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
5149
5163
  "aria-pressed": b.active,
5150
5164
  onClick: b.action
5151
5165
  }, [
5152
- (x(), f(CM(b.icon), { class: "vfp-w-4 vfp-h-4" }))
5166
+ (x(), f(yM(b.icon), { class: "vfp-w-4 vfp-h-4" }))
5153
5167
  ], 10, lC)) : b.type === "text" ? (x(), c("span", {
5154
5168
  key: 1,
5155
5169
  class: "vfp-text-xs vfp-text-center vfp-font-medium vfp-tabular-nums vfp-text-fg-tertiary",
@@ -5162,11 +5176,11 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
5162
5176
  (x(), c("div", {
5163
5177
  ref_key: "contentRef",
5164
5178
  ref: g,
5165
- class: "vfp-flex-1 vfp-flex vfp-items-center vfp-justify-center vfp-overflow-auto",
5179
+ class: "vfp-isolate vfp-flex-1 vfp-flex vfp-items-center vfp-justify-center vfp-overflow-auto",
5166
5180
  key: (QI = B.value) == null ? void 0 : QI.url
5167
5181
  }, [
5168
5182
  B.value ? (x(), c(h, { key: 0 }, [
5169
- D.value ? (x(), f(CM(D.value), {
5183
+ D.value ? (x(), f(yM(D.value), {
5170
5184
  key: 0,
5171
5185
  file: B.value,
5172
5186
  ctx: H.value
@@ -5175,28 +5189,28 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
5175
5189
  key: 0,
5176
5190
  "file-name": B.value.name,
5177
5191
  "file-type": B.value.type,
5178
- onDownload: YM
5179
- }, null, 8, ["file-name", "file-type"])) : d.value ? (x(), f(CM(d.value.component), cP({
5192
+ onDownload: DM
5193
+ }, null, 8, ["file-name", "file-type"])) : d.value ? (x(), f(yM(d.value.component), cP({
5180
5194
  key: 1,
5181
5195
  ref_key: "rendererRef",
5182
5196
  ref: s
5183
- }, o.value), null, 16)) : (x(), f(AK, {
5197
+ }, p.value), null, 16)) : (x(), f(AK, {
5184
5198
  key: 2,
5185
5199
  "file-name": B.value.name,
5186
5200
  "file-type": B.value.type,
5187
- onDownload: YM
5201
+ onDownload: DM
5188
5202
  }, null, 8, ["file-name", "file-type"]))
5189
5203
  ], 64))
5190
5204
  ], 64)) : E("", !0)
5191
5205
  ])),
5192
- !M.headless && M.showNavigation && X.value.length > 1 ? (x(), f(ng, {
5206
+ !M.headless && M.showNavigation && j.value.length > 1 ? (x(), f(ng, {
5193
5207
  key: 1,
5194
5208
  "container-ref": g.value,
5195
5209
  "has-prev": M.loopNavigation || M.currentIndex > 0,
5196
- "has-next": M.loopNavigation || M.currentIndex < X.value.length - 1,
5210
+ "has-next": M.loopNavigation || M.currentIndex < j.value.length - 1,
5197
5211
  "reset-key": M.currentIndex,
5198
- onPrev: $,
5199
- onNext: ZM
5212
+ onPrev: r,
5213
+ onNext: MM
5200
5214
  }, null, 8, ["container-ref", "has-prev", "has-next", "reset-key"])) : E("", !0)
5201
5215
  ], 8, Rg);
5202
5216
  };
@@ -5206,7 +5220,7 @@ const Bg = { class: "vfp-renderer-loading" }, Ag = { class: "vfp-renderer-loadin
5206
5220
  for (const [P, w] of I)
5207
5221
  K[P] = w;
5208
5222
  return K;
5209
- }, tI = /* @__PURE__ */ yC(CC, [["__scopeId", "data-v-7428d161"]]), eC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5223
+ }, tI = /* @__PURE__ */ yC(CC, [["__scopeId", "data-v-b7330ee6"]]), qC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5210
5224
  __proto__: null,
5211
5225
  default: tI
5212
5226
  }, Symbol.toStringTag, { value: "Module" }));
@@ -5226,7 +5240,7 @@ function sC(M) {
5226
5240
  l();
5227
5241
  }), { lock: w, unlock: l };
5228
5242
  }
5229
- const SC = ["data-theme"], vC = /* @__PURE__ */ AM({
5243
+ const SC = ["data-theme"], _C = /* @__PURE__ */ YM({
5230
5244
  __name: "FilePreviewModal",
5231
5245
  props: {
5232
5246
  files: {},
@@ -5244,18 +5258,19 @@ const SC = ["data-theme"], vC = /* @__PURE__ */ AM({
5244
5258
  showClose: { type: Boolean, default: void 0 },
5245
5259
  showDownload: { type: Boolean, default: !0 },
5246
5260
  showNavigation: { type: Boolean, default: !0 },
5247
- loopNavigation: { type: Boolean, default: !1 }
5261
+ loopNavigation: { type: Boolean, default: !1 },
5262
+ emptyHint: { default: "auto" }
5248
5263
  },
5249
5264
  emits: ["close", "navigate", "custom-event"],
5250
5265
  setup(M, { emit: I }) {
5251
5266
  const K = M, P = I, { lock: w, unlock: l } = sC(() => K.isOpen);
5252
- TM(
5267
+ jM(
5253
5268
  () => K.isOpen,
5254
5269
  (S) => {
5255
5270
  S ? w() : l();
5256
5271
  }
5257
5272
  );
5258
- const C = LI(GM(K, "theme")), g = () => P("close"), y = (S) => S.stopPropagation(), s = (S) => S.stopPropagation();
5273
+ const C = LI(dM(K, "theme")), g = () => P("close"), y = (S) => S.stopPropagation(), s = (S) => S.stopPropagation();
5259
5274
  return (S, T) => (x(), f(WP, { to: "body" }, [
5260
5275
  M.isOpen ? (x(), c("div", {
5261
5276
  key: 0,
@@ -5271,7 +5286,7 @@ const SC = ["data-theme"], vC = /* @__PURE__ */ AM({
5271
5286
  class: "vfp-relative vfp-w-full vfp-h-full",
5272
5287
  onClick: y
5273
5288
  }, [
5274
- jM(tI, {
5289
+ XM(tI, {
5275
5290
  mode: "modal",
5276
5291
  files: M.files,
5277
5292
  "current-index": M.currentIndex,
@@ -5289,16 +5304,17 @@ const SC = ["data-theme"], vC = /* @__PURE__ */ AM({
5289
5304
  "show-download": M.showDownload,
5290
5305
  "show-navigation": M.showNavigation,
5291
5306
  "loop-navigation": M.loopNavigation,
5292
- onClose: T[0] || (T[0] = (j) => P("close")),
5293
- onNavigate: T[1] || (T[1] = (j) => P("navigate", j)),
5294
- onCustomEvent: T[2] || (T[2] = (j) => P("custom-event", j))
5295
- }, null, 8, ["files", "current-index", "custom-renderers", "locale", "messages", "headless", "theme", "request-init", "request-handler", "should-fetch-as-blob", "on-download", "on-close", "show-close", "show-download", "show-navigation", "loop-navigation"])
5307
+ "empty-hint": M.emptyHint,
5308
+ onClose: T[0] || (T[0] = (X) => P("close")),
5309
+ onNavigate: T[1] || (T[1] = (X) => P("navigate", X)),
5310
+ onCustomEvent: T[2] || (T[2] = (X) => P("custom-event", X))
5311
+ }, null, 8, ["files", "current-index", "custom-renderers", "locale", "messages", "headless", "theme", "request-init", "request-handler", "should-fetch-as-blob", "on-download", "on-close", "show-close", "show-download", "show-navigation", "loop-navigation", "empty-hint"])
5296
5312
  ])
5297
5313
  ], 32)
5298
5314
  ], 8, SC)) : E("", !0)
5299
5315
  ]));
5300
5316
  }
5301
- }), TC = ["data-theme"], jC = { class: "vfp-relative vfp-w-full vfp-h-full vfp-overflow-hidden vfp-bg-surface-overlay" }, qC = /* @__PURE__ */ AM({
5317
+ }), TC = ["data-theme"], jC = { class: "vfp-relative vfp-w-full vfp-h-full vfp-overflow-hidden vfp-bg-surface-overlay" }, $C = /* @__PURE__ */ YM({
5302
5318
  __name: "FilePreviewEmbed",
5303
5319
  props: {
5304
5320
  files: {},
@@ -5318,11 +5334,12 @@ const SC = ["data-theme"], vC = /* @__PURE__ */ AM({
5318
5334
  showClose: { type: Boolean, default: void 0 },
5319
5335
  showDownload: { type: Boolean, default: !0 },
5320
5336
  showNavigation: { type: Boolean, default: !0 },
5321
- loopNavigation: { type: Boolean, default: !1 }
5337
+ loopNavigation: { type: Boolean, default: !1 },
5338
+ emptyHint: { default: "auto" }
5322
5339
  },
5323
5340
  emits: ["navigate", "custom-event", "close"],
5324
5341
  setup(M, { emit: I }) {
5325
- const K = M, P = I, w = LI(GM(K, "theme")), l = {
5342
+ const K = M, P = I, w = LI(dM(K, "theme")), l = {
5326
5343
  width: typeof K.width == "number" ? `${K.width}px` : K.width,
5327
5344
  height: typeof K.height == "number" ? `${K.height}px` : K.height
5328
5345
  };
@@ -5332,7 +5349,7 @@ const SC = ["data-theme"], vC = /* @__PURE__ */ AM({
5332
5349
  "data-theme": L(w)
5333
5350
  }, [
5334
5351
  m("div", jC, [
5335
- jM(tI, {
5352
+ XM(tI, {
5336
5353
  mode: "embed",
5337
5354
  files: M.files,
5338
5355
  "current-index": M.currentIndex,
@@ -5350,65 +5367,68 @@ const SC = ["data-theme"], vC = /* @__PURE__ */ AM({
5350
5367
  "show-download": M.showDownload,
5351
5368
  "show-navigation": M.showNavigation,
5352
5369
  "loop-navigation": M.loopNavigation,
5370
+ "empty-hint": M.emptyHint,
5353
5371
  onNavigate: g[0] || (g[0] = (y) => P("navigate", y)),
5354
5372
  onCustomEvent: g[1] || (g[1] = (y) => P("custom-event", y)),
5355
5373
  onClose: g[2] || (g[2] = () => P("close"))
5356
- }, null, 8, ["files", "current-index", "custom-renderers", "locale", "messages", "headless", "theme", "request-init", "request-handler", "should-fetch-as-blob", "on-download", "on-close", "show-close", "show-download", "show-navigation", "loop-navigation"])
5374
+ }, null, 8, ["files", "current-index", "custom-renderers", "locale", "messages", "headless", "theme", "request-init", "request-handler", "should-fetch-as-blob", "on-download", "on-close", "show-close", "show-download", "show-navigation", "loop-navigation", "empty-hint"])
5357
5375
  ])
5358
5376
  ], 8, TC));
5359
5377
  }
5360
- }), _C = kP.version;
5378
+ }), My = kP.version;
5361
5379
  export {
5362
- ZC as A,
5363
- EC as B,
5380
+ qC as $,
5381
+ HC as A,
5382
+ zC as B,
5364
5383
  dC as C,
5365
- WC as D,
5366
- tI as E,
5384
+ tI as D,
5385
+ RC as E,
5367
5386
  aC as F,
5368
5387
  oC as G,
5369
5388
  UC as H,
5370
- qC as I,
5389
+ $C as I,
5371
5390
  QC as J,
5372
- vC as K,
5391
+ _C as K,
5373
5392
  fC as L,
5374
5393
  YC as M,
5375
- nC as N,
5376
- _C as O,
5377
- EP as P,
5378
- UP as Q,
5379
- Cg as R,
5394
+ My as N,
5395
+ EP as O,
5396
+ UP as P,
5397
+ nC as Q,
5398
+ eC as R,
5380
5399
  bC as S,
5381
5400
  cC as T,
5382
- eC as U,
5401
+ Cg as U,
5383
5402
  uC as V,
5384
- FC as W,
5403
+ lI as W,
5404
+ WC as X,
5385
5405
  pC as Y,
5386
- lI as Z,
5406
+ kC as Z,
5387
5407
  yC as _,
5388
5408
  rC as a,
5389
- jg as b,
5390
- NC as c,
5391
- hC as d,
5409
+ _l as b,
5410
+ jg as c,
5411
+ NC as d,
5392
5412
  mC as e,
5393
- RC as f,
5394
- GC as g,
5395
- OC as h,
5413
+ FC as f,
5414
+ vC as g,
5415
+ EC as h,
5396
5416
  xI as i,
5397
5417
  bI as j,
5398
5418
  n as k,
5399
- kC as l,
5400
- zC as m,
5401
- _l as n,
5419
+ GC as l,
5420
+ ZC as m,
5421
+ OC as n,
5402
5422
  tC as o,
5403
5423
  LC as p,
5404
- wI as q,
5405
- iK as r,
5424
+ VP as q,
5425
+ wI as r,
5406
5426
  iC as s,
5407
5427
  VC as t,
5408
5428
  AP as u,
5409
- JC as v,
5410
- VP as w,
5411
- HC as x,
5429
+ iK as v,
5430
+ DC as w,
5431
+ JC as x,
5412
5432
  xC as y,
5413
- DC as z
5433
+ hC as z
5414
5434
  };