@kedataindo/docflow-vue 0.0.23 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ var bp = (e, t, i) => t in e ? hp(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var gi = (e, t, i) => bp(e, typeof t != "symbol" ? t + "" : t, i);
4
4
  import { createEditor as gp, definePlugin as ct, FontSizeExtension as vp, setSearchQuery as yp, clearSearch as xp, getSearchState as wp, searchNext as kp, searchPrev as _p, replaceCurrent as Sp, replaceAll as Cp, sanitizePastedHTML as Op } from "@kedataindo/docflow-core";
5
5
  import { httpKeyStorage as KO, localStorageKeyStorage as XO, memoryKeyStorage as JO, openaiCompatibleProvider as ZO, toAIStreamFn as QO } from "@kedataindo/docflow-core";
6
- import { ref as K, shallowRef as Ap, computed as ue, onMounted as Bi, onUnmounted as jt, watch as ze, unref as S, nextTick as Sn, inject as Tp, provide as Ep, defineComponent as tt, openBlock as I, createElementBlock as D, Fragment as Te, renderList as De, normalizeStyle as at, createElementVNode as w, createCommentVNode as se, createBlock as Ke, Teleport as Mp, toDisplayString as N, normalizeClass as ge, h as Es, withDirectives as Se, withKeys as ei, vModelText as Re, createVNode as Y, withModifiers as ke, Transition as Er, withCtx as Wi, renderSlot as wn, createTextVNode as je, resolveDynamicComponent as ki, vModelSelect as zc, toRaw as ns, normalizeProps as al, guardReactiveProps as sl, vModelCheckbox as rs, vModelRadio as Mr } from "vue";
6
+ import { ref as K, shallowRef as Ap, computed as ue, onMounted as Bi, onUnmounted as jt, watch as Re, unref as S, nextTick as Sn, inject as Tp, provide as Ep, defineComponent as tt, openBlock as I, createElementBlock as D, Fragment as Ee, renderList as Le, normalizeStyle as at, createElementVNode as w, createCommentVNode as se, createBlock as Ke, Teleport as Mp, toDisplayString as N, normalizeClass as ge, h as Es, withDirectives as Ce, withKeys as ei, vModelText as De, createVNode as Y, withModifiers as _e, Transition as Er, withCtx as Wi, renderSlot as wn, createTextVNode as je, resolveDynamicComponent as ki, vModelSelect as zc, toRaw as ns, normalizeProps as al, guardReactiveProps as sl, vModelCheckbox as rs, vModelRadio as Mr } from "vue";
7
7
  import { VirtualPageOverlay as Np, getPageSize as Ip, PAGE_SIZES as as } from "@kedataindo/docflow-layout-engine";
8
8
  function zp(e) {
9
9
  const t = K(null), i = Ap(null), n = K(!1), r = ue(() => {
@@ -40,12 +40,12 @@ function zp(e) {
40
40
  s();
41
41
  }), jt(() => {
42
42
  o();
43
- }), ze(
43
+ }), Re(
44
44
  () => e.editable,
45
45
  (l) => {
46
46
  r.value && r.value.setEditable(l ?? !0);
47
47
  }
48
- ), ze(
48
+ ), Re(
49
49
  () => {
50
50
  const l = S(e.collaboration);
51
51
  return l ? { room: l.room, provider: l.provider } : null;
@@ -577,6 +577,10 @@ const Rc = {
577
577
  noDocumentsDescription: "No files match your current filters. Select a template or create a blank file to start drafting!",
578
578
  createBlankDocument: "Create Blank Document",
579
579
  loadingDocuments: "Loading documents...",
580
+ folderCreated: "Folder created.",
581
+ folderAlreadyExists: "A folder with that name already exists.",
582
+ folderLoadError: "Could not load folders. Please try again.",
583
+ folderCreateError: "Could not create the folder. Please try again.",
580
584
  documentTitle: "Document Title",
581
585
  lastModified: "Last Modified",
582
586
  actions: "Actions",
@@ -1095,6 +1099,10 @@ const Rc = {
1095
1099
  noDocumentsDescription: "Tidak ada file yang cocok dengan filter. Pilih template atau buat dokumen kosong untuk mulai menulis!",
1096
1100
  createBlankDocument: "Buat Dokumen Kosong",
1097
1101
  loadingDocuments: "Memuat dokumen...",
1102
+ folderCreated: "Folder berhasil dibuat.",
1103
+ folderAlreadyExists: "Folder dengan nama tersebut sudah ada.",
1104
+ folderLoadError: "Folder tidak dapat dimuat. Silakan coba lagi.",
1105
+ folderCreateError: "Folder tidak dapat dibuat. Silakan coba lagi.",
1098
1106
  documentTitle: "Judul Dokumen",
1099
1107
  lastModified: "Terakhir Diubah",
1100
1108
  actions: "Aksi",
@@ -1218,12 +1226,12 @@ function Hp(e) {
1218
1226
  f = setInterval(u, 250);
1219
1227
  }), jt(() => {
1220
1228
  f && clearInterval(f), a == null || a.disconnect(), s == null || s.disconnect();
1221
- }), ze([() => {
1229
+ }), Re([() => {
1222
1230
  var d, p;
1223
1231
  return (p = (d = e.editorRef.value) == null ? void 0 : d.view) == null ? void 0 : p.dom;
1224
1232
  }, e.scrollRef], () => {
1225
1233
  r.value || o();
1226
- }, { immediate: !0 }), ze(() => e.config, (d) => {
1234
+ }, { immediate: !0 }), Re(() => e.config, (d) => {
1227
1235
  r.value && l(d);
1228
1236
  }, { deep: !0 }), {
1229
1237
  data: t,
@@ -1268,7 +1276,7 @@ const jp = {
1268
1276
  return f.replace(/\{page\}/g, String(d + 1)).replace(/\{total\}/g, String(t.data.totalPages));
1269
1277
  }
1270
1278
  return (f, d) => e.isReady ? (I(), D("div", jp, [
1271
- (I(!0), D(Te, null, De(i.value, (p) => (I(), D("div", {
1279
+ (I(!0), D(Ee, null, Le(i.value, (p) => (I(), D("div", {
1272
1280
  key: p.index,
1273
1281
  class: "vp-page",
1274
1282
  style: at(l(p))
@@ -1328,7 +1336,7 @@ const jp = {
1328
1336
  };
1329
1337
  }
1330
1338
  function u(m) {
1331
- var A, H, _, C;
1339
+ var A, U, _, C;
1332
1340
  if (!i.editor) return;
1333
1341
  const { view: g } = i.editor, { selection: h } = g.state, v = h.head, b = g.state.doc.resolve(v), y = b.start(), k = b.parent.textContent.slice(0, b.parentOffset).lastIndexOf("/");
1334
1342
  if (k >= 0) {
@@ -1340,7 +1348,7 @@ const jp = {
1340
1348
  O.commands[m.command]();
1341
1349
  else if (O.chain)
1342
1350
  try {
1343
- (C = (_ = (H = O.chain().focus())[m.command]) == null ? void 0 : _.call(H)) == null || C.run();
1351
+ (C = (_ = (U = O.chain().focus())[m.command]) == null ? void 0 : _.call(U)) == null || C.run();
1344
1352
  } catch {
1345
1353
  }
1346
1354
  n.value = !1, r.value = "";
@@ -1361,11 +1369,11 @@ const jp = {
1361
1369
  }
1362
1370
  n.value = !1;
1363
1371
  }
1364
- ze(() => i.editor, (m) => {
1372
+ Re(() => i.editor, (m) => {
1365
1373
  m && (m.on("update", d), m.on("selectionUpdate", () => {
1366
1374
  n.value && l();
1367
1375
  }));
1368
- }), ze([r, () => i.commands], () => {
1376
+ }), Re([r, () => i.commands], () => {
1369
1377
  const m = r.value.toLowerCase();
1370
1378
  o.value = m ? i.commands.filter((g) => g.name.toLowerCase().includes(m)) : i.commands;
1371
1379
  });
@@ -1390,7 +1398,7 @@ const jp = {
1390
1398
  style: at({ top: s.value.top + "px", left: s.value.left + "px" })
1391
1399
  }, [
1392
1400
  w("div", Xp, N(S(t)("slashMenu.basicBlocks")), 1),
1393
- (I(!0), D(Te, null, De(o.value, (h, v) => (I(), D("button", {
1401
+ (I(!0), D(Ee, null, Le(o.value, (h, v) => (I(), D("button", {
1394
1402
  key: h.command,
1395
1403
  class: ge(["flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors", v === a.value ? "bg-slate-100 dark:bg-slate-700" : "hover:bg-slate-50 dark:hover:bg-slate-700/50"]),
1396
1404
  onClick: (b) => u(h),
@@ -2587,7 +2595,7 @@ const Yt = fe("x", [
2587
2595
  emits: ["back", "update:title", "toggle-star", "toggle-simulators", "export", "share", "menu-click"],
2588
2596
  setup(e, { emit: t }) {
2589
2597
  const { setLocale: i, t: n } = Mt(), { isDark: r } = mo(), a = Up(), s = e, o = t, l = K(!1), u = K(s.title), f = K(null), d = K(null), p = K(!1);
2590
- ze(() => s.title, (G) => {
2598
+ Re(() => s.title, (G) => {
2591
2599
  u.value = G;
2592
2600
  });
2593
2601
  const m = async () => {
@@ -2758,7 +2766,7 @@ const Yt = fe("x", [
2758
2766
  { label: n("header.about"), action: "about" }
2759
2767
  ]
2760
2768
  }
2761
- })), H = ue(() => Object.keys(A.value)), _ = K(null), C = (G) => {
2769
+ })), U = ue(() => Object.keys(A.value)), _ = K(null), C = (G) => {
2762
2770
  const z = d.value !== G;
2763
2771
  d.value = z ? G : null, _.value = null, p.value = z;
2764
2772
  }, R = K(!1), L = () => {
@@ -2804,7 +2812,7 @@ const Yt = fe("x", [
2804
2812
  type: "button",
2805
2813
  class: "flex h-9 cursor-pointer items-center justify-center hover:opacity-90 transition-opacity",
2806
2814
  title: S(n)("header.backToDocuments"),
2807
- onClick: z[0] || (z[0] = (j) => o("back"))
2815
+ onClick: z[0] || (z[0] = (H) => o("back"))
2808
2816
  }, [
2809
2817
  w("img", {
2810
2818
  src: h.value,
@@ -2814,28 +2822,28 @@ const Yt = fe("x", [
2814
2822
  ], 8, im),
2815
2823
  w("div", rm, [
2816
2824
  w("div", am, [
2817
- l.value ? Se((I(), D("input", {
2825
+ l.value ? Ce((I(), D("input", {
2818
2826
  key: 0,
2819
2827
  ref_key: "titleInputEl",
2820
2828
  ref: f,
2821
- "onUpdate:modelValue": z[1] || (z[1] = (j) => u.value = j),
2829
+ "onUpdate:modelValue": z[1] || (z[1] = (H) => u.value = H),
2822
2830
  type: "text",
2823
2831
  class: "min-w-[150px] border-b-2 border-cyan-500 bg-transparent px-1 py-0 text-sm font-semibold text-slate-800 focus:outline-none dark:text-slate-100 md:min-w-[240px]",
2824
2832
  onBlur: g,
2825
2833
  onKeydown: ei(g, ["enter"])
2826
2834
  }, null, 544)), [
2827
- [Re, u.value]
2835
+ [De, u.value]
2828
2836
  ]) : (I(), D("h1", {
2829
2837
  key: 1,
2830
2838
  class: "max-w-[180px] cursor-text truncate rounded px-1 py-0 text-sm font-semibold text-slate-800 hover:bg-slate-50 dark:text-slate-100 dark:hover:bg-slate-800/60 md:max-w-[280px]",
2831
2839
  title: S(n)("header.clickToRename"),
2832
- onClick: z[2] || (z[2] = (j) => void m())
2840
+ onClick: z[2] || (z[2] = (H) => void m())
2833
2841
  }, N(s.title), 9, sm)),
2834
2842
  w("button", {
2835
2843
  type: "button",
2836
2844
  class: "flex h-6 w-6 items-center justify-center rounded-full text-slate-400 transition-colors hover:text-amber-500",
2837
2845
  title: e.starred ? S(n)("header.unstarDocument") : S(n)("header.starDocument"),
2838
- onClick: z[3] || (z[3] = (j) => o("toggle-star"))
2846
+ onClick: z[3] || (z[3] = (H) => o("toggle-star"))
2839
2847
  }, [
2840
2848
  Y(S(Vd), {
2841
2849
  class: ge(["h-4 w-4", e.starred ? "fill-amber-400 text-amber-500" : ""])
@@ -2843,16 +2851,16 @@ const Yt = fe("x", [
2843
2851
  ], 8, om)
2844
2852
  ]),
2845
2853
  w("nav", lm, [
2846
- (I(!0), D(Te, null, De(H.value, (j) => (I(), D("div", {
2847
- key: j,
2854
+ (I(!0), D(Ee, null, Le(U.value, (H) => (I(), D("div", {
2855
+ key: H,
2848
2856
  class: "relative"
2849
2857
  }, [
2850
2858
  w("button", {
2851
2859
  type: "button",
2852
- class: ge(["flex items-center gap-0.5 rounded px-2 py-0.5 text-[13px] transition-colors", d.value === j ? "bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300" : "text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800"]),
2853
- onClick: ke(($) => C(j), ["stop"]),
2854
- onMouseenter: ($) => F(j)
2855
- }, N(A.value[j].label), 43, cm),
2860
+ class: ge(["flex items-center gap-0.5 rounded px-2 py-0.5 text-[13px] transition-colors", d.value === H ? "bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300" : "text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800"]),
2861
+ onClick: _e(($) => C(H), ["stop"]),
2862
+ onMouseenter: ($) => F(H)
2863
+ }, N(A.value[H].label), 43, cm),
2856
2864
  Y(Er, {
2857
2865
  "enter-active-class": "transition-all duration-150 ease-out",
2858
2866
  "enter-from-class": "opacity-0 scale-95 translate-y-[-4px]",
@@ -2862,12 +2870,12 @@ const Yt = fe("x", [
2862
2870
  "leave-to-class": "opacity-0 scale-95 translate-y-[-4px]"
2863
2871
  }, {
2864
2872
  default: Wi(() => [
2865
- d.value === j ? (I(), D("div", um, [
2866
- (I(!0), D(Te, null, De(A.value[j].items, ($, pe) => (I(), D(Te, { key: pe }, [
2873
+ d.value === H ? (I(), D("div", um, [
2874
+ (I(!0), D(Ee, null, Le(A.value[H].items, ($, pe) => (I(), D(Ee, { key: pe }, [
2867
2875
  $.divider ? (I(), D("div", fm)) : $.sub ? (I(), D("div", {
2868
2876
  key: 1,
2869
2877
  class: "relative",
2870
- onMouseenter: (ce) => _.value = `${j}-${pe}`,
2878
+ onMouseenter: (ce) => _.value = `${H}-${pe}`,
2871
2879
  onMouseleave: z[4] || (z[4] = (ce) => _.value = null)
2872
2880
  }, [
2873
2881
  w("button", dm, [
@@ -2883,12 +2891,12 @@ const Yt = fe("x", [
2883
2891
  "leave-to-class": "opacity-0 translate-x-2"
2884
2892
  }, {
2885
2893
  default: Wi(() => [
2886
- _.value === `${j}-${pe}` ? (I(), D("div", mm, [
2887
- (I(!0), D(Te, null, De($.sub, (ce) => (I(), D("button", {
2894
+ _.value === `${H}-${pe}` ? (I(), D("div", mm, [
2895
+ (I(!0), D(Ee, null, Le($.sub, (ce) => (I(), D("button", {
2888
2896
  key: ce.action,
2889
2897
  type: "button",
2890
2898
  class: "flex w-full items-center justify-between px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-white/5",
2891
- onClick: ke((ae) => q(ce.action), ["stop"])
2899
+ onClick: _e((ae) => q(ce.action), ["stop"])
2892
2900
  }, [
2893
2901
  w("span", null, N(ce.label), 1),
2894
2902
  ce.badge ? (I(), D("span", bm, N(ce.badge), 1)) : se("", !0)
@@ -2901,7 +2909,7 @@ const Yt = fe("x", [
2901
2909
  key: 2,
2902
2910
  type: "button",
2903
2911
  class: "flex w-full items-center justify-between gap-6 px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-white/5",
2904
- onClick: ke((ce) => q($.action), ["stop"])
2912
+ onClick: _e((ce) => q($.action), ["stop"])
2905
2913
  }, [
2906
2914
  w("span", null, N($.label), 1),
2907
2915
  $.checked ? (I(), D("span", vm, [
@@ -2920,13 +2928,13 @@ const Yt = fe("x", [
2920
2928
  w("div", xm, [
2921
2929
  e.collaborators.length > 0 ? (I(), D("div", wm, [
2922
2930
  w("div", km, [
2923
- (I(!0), D(Te, null, De(e.collaborators, (j) => (I(), D("div", {
2924
- key: j.userId,
2931
+ (I(!0), D(Ee, null, Le(e.collaborators, (H) => (I(), D("div", {
2932
+ key: H.userId,
2925
2933
  class: "flex h-7 w-7 flex-shrink-0 cursor-help items-center justify-center rounded-full border-2 border-white text-[10px] font-bold text-white dark:border-slate-900",
2926
- style: at({ backgroundColor: j.color }),
2927
- title: `${j.name} ${j.userId === e.currentUserId ? "(You)" : ""} ${j.isTyping ? "is typing..." : ""}`
2934
+ style: at({ backgroundColor: H.color }),
2935
+ title: `${H.name} ${H.userId === e.currentUserId ? "(You)" : ""} ${H.isTyping ? "is typing..." : ""}`
2928
2936
  }, [
2929
- w("span", Sm, N(v(j.name)), 1)
2937
+ w("span", Sm, N(v(H.name)), 1)
2930
2938
  ], 12, _m))), 128))
2931
2939
  ])
2932
2940
  ])) : se("", !0),
@@ -2936,7 +2944,7 @@ const Yt = fe("x", [
2936
2944
  type: "button",
2937
2945
  class: ge(["hidden h-8 w-8 items-center justify-center rounded-md transition-all xl:flex", e.simulatorsActive ? "animate-pulse bg-emerald-600 text-white hover:bg-emerald-700" : "text-indigo-600 hover:bg-slate-100 dark:text-indigo-300 dark:hover:bg-slate-800"]),
2938
2946
  title: S(n)("header.sandbox"),
2939
- onClick: z[5] || (z[5] = (j) => o("toggle-simulators"))
2947
+ onClick: z[5] || (z[5] = (H) => o("toggle-simulators"))
2940
2948
  }, [
2941
2949
  Y(S(bl), { class: "h-[18px] w-[18px]" })
2942
2950
  ], 10, Cm)) : se("", !0),
@@ -2946,7 +2954,7 @@ const Yt = fe("x", [
2946
2954
  w("button", {
2947
2955
  type: "button",
2948
2956
  class: "flex h-8 items-center gap-1.5 rounded-md bg-blue-600 px-3 text-[13px] font-semibold text-white shadow transition-colors hover:bg-blue-700",
2949
- onClick: z[6] || (z[6] = (j) => o("share"))
2957
+ onClick: z[6] || (z[6] = (H) => o("share"))
2950
2958
  }, [
2951
2959
  Y(S(Ud), { class: "h-3.5 w-3.5" }),
2952
2960
  w("span", Am, N(S(n)("header.share")), 1)
@@ -2956,7 +2964,7 @@ const Yt = fe("x", [
2956
2964
  type: "button",
2957
2965
  class: "flex h-8 items-center gap-1.5 rounded-full py-0.5 pl-0.5 pr-1.5 transition-colors hover:bg-slate-100 dark:hover:bg-slate-800",
2958
2966
  title: e.userName,
2959
- onClick: ke(Q, ["stop"])
2967
+ onClick: _e(Q, ["stop"])
2960
2968
  }, [
2961
2969
  e.userAvatar && !x.value ? (I(), D("img", {
2962
2970
  key: 0,
@@ -2964,7 +2972,7 @@ const Yt = fe("x", [
2964
2972
  alt: e.userName,
2965
2973
  referrerpolicy: "no-referrer",
2966
2974
  class: "h-7 w-7 flex-shrink-0 rounded-full object-cover",
2967
- onError: z[7] || (z[7] = (j) => x.value = !0)
2975
+ onError: z[7] || (z[7] = (H) => x.value = !0)
2968
2976
  }, null, 40, Mm)) : (I(), D("span", Nm, N(y.value), 1)),
2969
2977
  w("span", Im, N(e.userName || S(n)("header.account")), 1),
2970
2978
  Y(S(_i), { class: "h-3.5 w-3.5 flex-shrink-0 text-slate-400" })
@@ -2995,7 +3003,7 @@ const Yt = fe("x", [
2995
3003
  type: "button",
2996
3004
  class: "flex h-8 w-8 items-center justify-center rounded-full text-slate-500 transition-colors hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800",
2997
3005
  title: "More",
2998
- onClick: ke(L, ["stop"])
3006
+ onClick: _e(L, ["stop"])
2999
3007
  }, [
3000
3008
  Y(S(jc), { class: "h-[18px] w-[18px]" })
3001
3009
  ]),
@@ -3016,7 +3024,7 @@ const Yt = fe("x", [
3016
3024
  key: 0,
3017
3025
  type: "button",
3018
3026
  class: "flex w-full items-center gap-2.5 px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-white/5",
3019
- onClick: z[8] || (z[8] = (j) => {
3027
+ onClick: z[8] || (z[8] = (H) => {
3020
3028
  o("toggle-simulators"), R.value = !1;
3021
3029
  })
3022
3030
  }, [
@@ -3057,7 +3065,7 @@ const Yt = fe("x", [
3057
3065
  ["#85200c", "#990000", "#b45f06", "#bf9000", "#38761d", "#134f5c", "#1155cc", "#0b5394", "#351c75", "#741b47"],
3058
3066
  ["#5b0f00", "#660000", "#783f04", "#7f6000", "#274e13", "#0c343d", "#1c4587", "#073763", "#20124d", "#4a1130"]
3059
3067
  ], a = K("#000000"), s = K(null);
3060
- ze(() => i.isOpen, (d) => {
3068
+ Re(() => i.isOpen, (d) => {
3061
3069
  d && (a.value = i.activeColor || "#000000");
3062
3070
  });
3063
3071
  function o(d) {
@@ -3078,7 +3086,7 @@ const Yt = fe("x", [
3078
3086
  onClick: f
3079
3087
  }, [
3080
3088
  w("div", Um, [
3081
- (I(!0), D(Te, null, De(r[0], (m) => (I(), D("button", {
3089
+ (I(!0), D(Ee, null, Le(r[0], (m) => (I(), D("button", {
3082
3090
  key: m,
3083
3091
  type: "button",
3084
3092
  class: "h-5 w-5 rounded-full border border-slate-200 transition-transform hover:scale-110 focus:outline-none focus:ring-2 focus:ring-cyan-500 dark:border-slate-600",
@@ -3088,11 +3096,11 @@ const Yt = fe("x", [
3088
3096
  }, null, 12, Hm))), 128))
3089
3097
  ]),
3090
3098
  w("div", jm, [
3091
- (I(!0), D(Te, null, De(r.slice(1), (m, g) => (I(), D("div", {
3099
+ (I(!0), D(Ee, null, Le(r.slice(1), (m, g) => (I(), D("div", {
3092
3100
  key: g,
3093
3101
  class: "grid grid-cols-10 gap-1.5"
3094
3102
  }, [
3095
- (I(!0), D(Te, null, De(m, (h) => (I(), D("button", {
3103
+ (I(!0), D(Ee, null, Le(m, (h) => (I(), D("button", {
3096
3104
  key: h,
3097
3105
  type: "button",
3098
3106
  class: "h-5 w-5 rounded-full border border-slate-200 transition-transform hover:scale-110 focus:outline-none focus:ring-2 focus:ring-cyan-500 dark:border-slate-600",
@@ -3115,7 +3123,7 @@ const Yt = fe("x", [
3115
3123
  }, [
3116
3124
  Y(S(Ri), { class: "h-3.5 w-3.5 text-slate-600 dark:text-slate-300" })
3117
3125
  ]),
3118
- Se(w("input", {
3126
+ Ce(w("input", {
3119
3127
  ref_key: "customInput",
3120
3128
  ref: s,
3121
3129
  "onUpdate:modelValue": p[1] || (p[1] = (m) => a.value = m),
@@ -3123,7 +3131,7 @@ const Yt = fe("x", [
3123
3131
  class: "sr-only",
3124
3132
  onChange: u
3125
3133
  }, null, 544), [
3126
- [Re, a.value]
3134
+ [De, a.value]
3127
3135
  ]),
3128
3136
  w("div", Gm, [
3129
3137
  w("div", {
@@ -3234,7 +3242,7 @@ const Yt = fe("x", [
3234
3242
  function u() {
3235
3243
  l.value++;
3236
3244
  }
3237
- ze(
3245
+ Re(
3238
3246
  () => n.editor,
3239
3247
  (Z, B) => {
3240
3248
  B && B.off("transaction", u), Z && Z.on("transaction", u);
@@ -3332,7 +3340,7 @@ const Yt = fe("x", [
3332
3340
  }
3333
3341
  Z === "setTextColor" ? ($e = B.unsetColor) == null || $e.call(B).run() : Z === "setHighlight" && ((it = B.unsetHighlight) == null || it.call(B).run()), (ot = n.editor) == null || ot.commands.focus(), P.value = null;
3334
3342
  }
3335
- const v = ["toggleHeading1", "toggleHeading2", "toggleHeading3", "toggleHeading4", "toggleHeading5", "toggleHeading6"], b = ["alignLeft", "alignCenter", "alignRight", "alignJustify"], y = ["toggleBulletList", "toggleOrderedList", "toggleTaskList"], x = ["setLink", "insertImage", "insertTable", "toggleBlockquote", "toggleCodeBlock", "insertFootnote", "insertPageBreak", "setPageBreak", "togglePageBreak", "addPageBreak"], k = ["setTextColor", "setHighlight"], O = ue(() => o.value.flatMap((Z) => Z.items)), A = ue(() => O.value.filter((Z) => b.includes(Z.action))), H = ue(() => O.value.filter((Z) => y.includes(Z.action))), _ = ue(() => O.value.filter((Z) => x.includes(Z.action))), C = ue(() => O.value.filter((Z) => k.includes(Z.action))), R = ue(() => C.value.find((Z) => Z.action === "setTextColor")), L = ue(() => C.value.find((Z) => Z.action === "setHighlight")), W = ue(
3343
+ const v = ["toggleHeading1", "toggleHeading2", "toggleHeading3", "toggleHeading4", "toggleHeading5", "toggleHeading6"], b = ["alignLeft", "alignCenter", "alignRight", "alignJustify"], y = ["toggleBulletList", "toggleOrderedList", "toggleTaskList"], x = ["setLink", "insertImage", "insertTable", "toggleBlockquote", "toggleCodeBlock", "insertFootnote", "insertPageBreak", "setPageBreak", "togglePageBreak", "addPageBreak"], k = ["setTextColor", "setHighlight"], O = ue(() => o.value.flatMap((Z) => Z.items)), A = ue(() => O.value.filter((Z) => b.includes(Z.action))), U = ue(() => O.value.filter((Z) => y.includes(Z.action))), _ = ue(() => O.value.filter((Z) => x.includes(Z.action))), C = ue(() => O.value.filter((Z) => k.includes(Z.action))), R = ue(() => C.value.find((Z) => Z.action === "setTextColor")), L = ue(() => C.value.find((Z) => Z.action === "setHighlight")), W = ue(
3336
3344
  () => O.value.filter(
3337
3345
  (Z) => !v.includes(Z.action) && !b.includes(Z.action) && !y.includes(Z.action) && !x.includes(Z.action) && !k.includes(Z.action)
3338
3346
  )
@@ -3374,7 +3382,7 @@ const Yt = fe("x", [
3374
3382
  function z() {
3375
3383
  n.editor && (n.editor.commands.undo(), n.editor.commands.focus()), r("undo");
3376
3384
  }
3377
- function j() {
3385
+ function H() {
3378
3386
  n.editor && (n.editor.commands.redo(), n.editor.commands.focus()), r("redo");
3379
3387
  }
3380
3388
  function $() {
@@ -3495,7 +3503,7 @@ const Yt = fe("x", [
3495
3503
  title: S(i)("toolbar.undo"),
3496
3504
  "aria-label": S(i)("toolbar.undo"),
3497
3505
  disabled: !e.editor,
3498
- onMousedown: B[0] || (B[0] = ke(() => {
3506
+ onMousedown: B[0] || (B[0] = _e(() => {
3499
3507
  }, ["prevent"])),
3500
3508
  onClick: z
3501
3509
  }, [
@@ -3507,9 +3515,9 @@ const Yt = fe("x", [
3507
3515
  title: S(i)("toolbar.redo"),
3508
3516
  "aria-label": S(i)("toolbar.redo"),
3509
3517
  disabled: !e.editor,
3510
- onMousedown: B[1] || (B[1] = ke(() => {
3518
+ onMousedown: B[1] || (B[1] = _e(() => {
3511
3519
  }, ["prevent"])),
3512
- onClick: j
3520
+ onClick: H
3513
3521
  }, [
3514
3522
  Y(S(Ld), { class: "h-[18px] w-[18px]" })
3515
3523
  ], 42, Zm),
@@ -3519,7 +3527,7 @@ const Yt = fe("x", [
3519
3527
  class: ge([Dt, "w-8"]),
3520
3528
  title: S(i)("toolbar.print"),
3521
3529
  "aria-label": S(i)("toolbar.print"),
3522
- onMousedown: B[2] || (B[2] = ke(() => {
3530
+ onMousedown: B[2] || (B[2] = _e(() => {
3523
3531
  }, ["prevent"])),
3524
3532
  onClick: $
3525
3533
  }, [
@@ -3531,7 +3539,7 @@ const Yt = fe("x", [
3531
3539
  title: S(i)("toolbar.spelling"),
3532
3540
  "aria-label": S(i)("toolbar.spelling"),
3533
3541
  disabled: !e.editor,
3534
- onMousedown: B[3] || (B[3] = ke(() => {
3542
+ onMousedown: B[3] || (B[3] = _e(() => {
3535
3543
  }, ["prevent"]))
3536
3544
  }, [
3537
3545
  Y(S(jd), { class: "h-[18px] w-[18px]" })
@@ -3541,7 +3549,7 @@ const Yt = fe("x", [
3541
3549
  class: ge([Dt, "px-2 text-xs"]),
3542
3550
  title: S(i)("toolbar.zoom"),
3543
3551
  "aria-label": S(i)("toolbar.zoom"),
3544
- onMousedown: B[4] || (B[4] = ke(() => {
3552
+ onMousedown: B[4] || (B[4] = _e(() => {
3545
3553
  }, ["prevent"]))
3546
3554
  }, N(S(i)("toolbar.zoom")), 43, eh),
3547
3555
  B[40] || (B[40] = w("span", { class: "mx-1 h-5 w-px flex-shrink-0 bg-slate-200 dark:bg-white/10" }, null, -1)),
@@ -3552,20 +3560,20 @@ const Yt = fe("x", [
3552
3560
  title: S(i)("toolbar.paragraphStyle"),
3553
3561
  "aria-label": S(i)("toolbar.paragraphStyle"),
3554
3562
  disabled: !e.editor,
3555
- onMousedown: B[5] || (B[5] = ke(() => {
3563
+ onMousedown: B[5] || (B[5] = _e(() => {
3556
3564
  }, ["prevent"])),
3557
- onClick: B[6] || (B[6] = ke((te) => Q("heading"), ["stop"]))
3565
+ onClick: B[6] || (B[6] = _e((te) => Q("heading"), ["stop"]))
3558
3566
  }, [
3559
3567
  w("span", nh, N(le.value), 1),
3560
3568
  Y(S(_i), { class: "h-3.5 w-3.5 flex-shrink-0 text-slate-400" })
3561
3569
  ], 42, ih),
3562
3570
  P.value === "heading" ? (I(), D("div", rh, [
3563
- (I(!0), D(Te, null, De(pe.value, (te) => (I(), D("button", {
3571
+ (I(!0), D(Ee, null, Le(pe.value, (te) => (I(), D("button", {
3564
3572
  key: te.value,
3565
3573
  type: "button",
3566
3574
  class: ge(["flex w-full items-center px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", ae.value === te.value ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
3567
3575
  disabled: !e.editor,
3568
- onMousedown: B[7] || (B[7] = ke(() => {
3576
+ onMousedown: B[7] || (B[7] = _e(() => {
3569
3577
  }, ["prevent"])),
3570
3578
  onClick: ($e) => ce(te.value)
3571
3579
  }, N(te.label), 43, ah))), 128))
@@ -3578,19 +3586,19 @@ const Yt = fe("x", [
3578
3586
  title: S(i)("toolbar.fontFamily"),
3579
3587
  "aria-label": S(i)("toolbar.fontFamily"),
3580
3588
  disabled: !e.editor,
3581
- onMousedown: B[8] || (B[8] = ke(() => {
3589
+ onMousedown: B[8] || (B[8] = _e(() => {
3582
3590
  }, ["prevent"])),
3583
- onClick: B[9] || (B[9] = ke((te) => Q("font"), ["stop"]))
3591
+ onClick: B[9] || (B[9] = _e((te) => Q("font"), ["stop"]))
3584
3592
  }, [
3585
3593
  w("span", lh, N(X.value), 1),
3586
3594
  Y(S(_i), { class: "h-3.5 w-3.5 flex-shrink-0 text-slate-400" })
3587
3595
  ], 42, oh),
3588
3596
  P.value === "font" ? (I(), D("div", ch, [
3589
- (I(), D(Te, null, De(ee, (te) => w("button", {
3597
+ (I(), D(Ee, null, Le(ee, (te) => w("button", {
3590
3598
  key: te.value,
3591
3599
  type: "button",
3592
3600
  class: ge(["flex w-full items-center px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", E.value === te.value ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
3593
- onMousedown: B[10] || (B[10] = ke(() => {
3601
+ onMousedown: B[10] || (B[10] = _e(() => {
3594
3602
  }, ["prevent"])),
3595
3603
  onClick: ($e) => oe(te.value)
3596
3604
  }, N(te.label), 43, uh)), 64))
@@ -3602,7 +3610,7 @@ const Yt = fe("x", [
3602
3610
  title: S(i)("toolbar.decreaseFontSize"),
3603
3611
  "aria-label": S(i)("toolbar.decreaseFontSize"),
3604
3612
  disabled: !e.editor,
3605
- onMousedown: B[11] || (B[11] = ke((te) => Fe(-1), ["prevent"]))
3613
+ onMousedown: B[11] || (B[11] = _e((te) => Fe(-1), ["prevent"]))
3606
3614
  }, [
3607
3615
  Y(S(Nd), { class: "h-3.5 w-3.5" })
3608
3616
  ], 42, fh),
@@ -3617,8 +3625,8 @@ const Yt = fe("x", [
3617
3625
  onFocus: Ue,
3618
3626
  onInput: It,
3619
3627
  onKeydown: [
3620
- B[12] || (B[12] = ei(ke((te) => te.target.blur(), ["prevent"]), ["enter"])),
3621
- ei(ke(xt, ["prevent"]), ["esc"])
3628
+ B[12] || (B[12] = ei(_e((te) => te.target.blur(), ["prevent"]), ["enter"])),
3629
+ ei(_e(xt, ["prevent"]), ["esc"])
3622
3630
  ],
3623
3631
  onBlur: Ve
3624
3632
  }, null, 40, ph),
@@ -3628,12 +3636,12 @@ const Yt = fe("x", [
3628
3636
  title: S(i)("toolbar.increaseFontSize"),
3629
3637
  "aria-label": S(i)("toolbar.increaseFontSize"),
3630
3638
  disabled: !e.editor,
3631
- onMousedown: B[13] || (B[13] = ke((te) => Fe(1), ["prevent"]))
3639
+ onMousedown: B[13] || (B[13] = _e((te) => Fe(1), ["prevent"]))
3632
3640
  }, [
3633
3641
  Y(S(Ri), { class: "h-3.5 w-3.5" })
3634
3642
  ], 42, dh),
3635
3643
  B[41] || (B[41] = w("span", { class: "mx-1 h-5 w-px flex-shrink-0 bg-slate-200 dark:bg-white/10" }, null, -1)),
3636
- (I(!0), D(Te, null, De(W.value, (te) => (I(), D("button", {
3644
+ (I(!0), D(Ee, null, Le(W.value, (te) => (I(), D("button", {
3637
3645
  key: te.id,
3638
3646
  type: "button",
3639
3647
  title: te.label ?? te.id,
@@ -3643,7 +3651,7 @@ const Yt = fe("x", [
3643
3651
  f(te) ? Uh : Hh
3644
3652
  ]),
3645
3653
  disabled: !e.editor,
3646
- onMousedown: B[14] || (B[14] = ke(() => {
3654
+ onMousedown: B[14] || (B[14] = _e(() => {
3647
3655
  }, ["prevent"])),
3648
3656
  onClick: ($e) => d(te)
3649
3657
  }, [
@@ -3660,9 +3668,9 @@ const Yt = fe("x", [
3660
3668
  title: R.value.label ?? "Text color",
3661
3669
  "aria-label": R.value.label ?? "Text color",
3662
3670
  disabled: !e.editor,
3663
- onMousedown: B[15] || (B[15] = ke(() => {
3671
+ onMousedown: B[15] || (B[15] = _e(() => {
3664
3672
  }, ["prevent"])),
3665
- onClick: B[16] || (B[16] = ke((te) => Q("textColor"), ["stop"]))
3673
+ onClick: B[16] || (B[16] = _e((te) => Q("textColor"), ["stop"]))
3666
3674
  }, [
3667
3675
  Y(S(fl), { class: "h-[18px] w-[18px]" })
3668
3676
  ], 42, vh),
@@ -3682,9 +3690,9 @@ const Yt = fe("x", [
3682
3690
  title: L.value.label ?? "Highlight",
3683
3691
  "aria-label": L.value.label ?? "Highlight",
3684
3692
  disabled: !e.editor,
3685
- onMousedown: B[20] || (B[20] = ke(() => {
3693
+ onMousedown: B[20] || (B[20] = _e(() => {
3686
3694
  }, ["prevent"])),
3687
- onClick: B[21] || (B[21] = ke((te) => Q("highlight"), ["stop"]))
3695
+ onClick: B[21] || (B[21] = _e((te) => Q("highlight"), ["stop"]))
3688
3696
  }, [
3689
3697
  Y(S(ul), { class: "h-[18px] w-[18px]" })
3690
3698
  ], 42, xh),
@@ -3697,28 +3705,28 @@ const Yt = fe("x", [
3697
3705
  onClose: B[24] || (B[24] = (te) => P.value = null)
3698
3706
  }, null, 8, ["is-open", "active-color"])
3699
3707
  ])) : se("", !0),
3700
- H.value.length || A.value.length || _.value.length ? (I(), D("span", wh)) : se("", !0),
3701
- H.value.length ? (I(), D("div", kh, [
3708
+ U.value.length || A.value.length || _.value.length ? (I(), D("span", wh)) : se("", !0),
3709
+ U.value.length ? (I(), D("div", kh, [
3702
3710
  w("button", {
3703
3711
  type: "button",
3704
3712
  class: ge([Dt, "gap-0.5 px-1.5"]),
3705
3713
  title: S(i)("toolbar.lists"),
3706
3714
  "aria-label": S(i)("toolbar.lists"),
3707
3715
  disabled: !e.editor,
3708
- onMousedown: B[25] || (B[25] = ke(() => {
3716
+ onMousedown: B[25] || (B[25] = _e(() => {
3709
3717
  }, ["prevent"])),
3710
- onClick: B[26] || (B[26] = ke((te) => Q("lists"), ["stop"]))
3718
+ onClick: B[26] || (B[26] = _e((te) => Q("lists"), ["stop"]))
3711
3719
  }, [
3712
3720
  Y(S(ta), { class: "h-[18px] w-[18px]" }),
3713
3721
  Y(S(_i), { class: "h-3 w-3 text-slate-400" })
3714
3722
  ], 42, _h),
3715
3723
  P.value === "lists" ? (I(), D("div", Sh, [
3716
- (I(!0), D(Te, null, De(H.value, (te) => (I(), D("button", {
3724
+ (I(!0), D(Ee, null, Le(U.value, (te) => (I(), D("button", {
3717
3725
  key: te.id,
3718
3726
  type: "button",
3719
3727
  class: ge(["flex w-full items-center gap-2.5 px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", f(te) ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
3720
3728
  disabled: !e.editor,
3721
- onMousedown: B[27] || (B[27] = ke(() => {
3729
+ onMousedown: B[27] || (B[27] = _e(() => {
3722
3730
  }, ["prevent"])),
3723
3731
  onClick: ($e) => q(te)
3724
3732
  }, [
@@ -3737,20 +3745,20 @@ const Yt = fe("x", [
3737
3745
  title: S(i)("toolbar.alignment"),
3738
3746
  "aria-label": S(i)("toolbar.alignment"),
3739
3747
  disabled: !e.editor,
3740
- onMousedown: B[28] || (B[28] = ke(() => {
3748
+ onMousedown: B[28] || (B[28] = _e(() => {
3741
3749
  }, ["prevent"])),
3742
- onClick: B[29] || (B[29] = ke((te) => Q("align"), ["stop"]))
3750
+ onClick: B[29] || (B[29] = _e((te) => Q("align"), ["stop"]))
3743
3751
  }, [
3744
3752
  (I(), Ke(ki(V.value), { class: "h-[18px] w-[18px]" })),
3745
3753
  Y(S(_i), { class: "h-3 w-3 text-slate-400" })
3746
3754
  ], 42, Ah),
3747
3755
  P.value === "align" ? (I(), D("div", Th, [
3748
- (I(!0), D(Te, null, De(A.value, (te) => (I(), D("button", {
3756
+ (I(!0), D(Ee, null, Le(A.value, (te) => (I(), D("button", {
3749
3757
  key: te.id,
3750
3758
  type: "button",
3751
3759
  class: ge(["flex w-full items-center gap-2.5 px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", f(te) ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
3752
3760
  disabled: !e.editor,
3753
- onMousedown: B[30] || (B[30] = ke(() => {
3761
+ onMousedown: B[30] || (B[30] = _e(() => {
3754
3762
  }, ["prevent"])),
3755
3763
  onClick: ($e) => q(te)
3756
3764
  }, [
@@ -3769,21 +3777,21 @@ const Yt = fe("x", [
3769
3777
  title: S(i)("toolbar.insert"),
3770
3778
  "aria-label": S(i)("toolbar.insert"),
3771
3779
  disabled: !e.editor,
3772
- onMousedown: B[31] || (B[31] = ke(() => {
3780
+ onMousedown: B[31] || (B[31] = _e(() => {
3773
3781
  }, ["prevent"])),
3774
- onClick: B[32] || (B[32] = ke((te) => Q("insert"), ["stop"]))
3782
+ onClick: B[32] || (B[32] = _e((te) => Q("insert"), ["stop"]))
3775
3783
  }, [
3776
3784
  Y(S(Ri), { class: "h-4 w-4" }),
3777
3785
  w("span", Ih, N(S(i)("toolbar.insert")), 1),
3778
3786
  Y(S(_i), { class: "h-3 w-3 text-slate-400" })
3779
3787
  ], 42, Nh),
3780
3788
  P.value === "insert" ? (I(), D("div", zh, [
3781
- (I(!0), D(Te, null, De(_.value, (te) => (I(), D("button", {
3789
+ (I(!0), D(Ee, null, Le(_.value, (te) => (I(), D("button", {
3782
3790
  key: te.id,
3783
3791
  type: "button",
3784
3792
  class: ge(["flex w-full items-center gap-2.5 px-3 py-1.5 text-left hover:bg-slate-50 dark:hover:bg-white/5", f(te) ? "text-blue-600 dark:text-blue-300" : "text-slate-700 dark:text-slate-200"]),
3785
3793
  disabled: !e.editor,
3786
- onMousedown: B[33] || (B[33] = ke(() => {
3794
+ onMousedown: B[33] || (B[33] = _e(() => {
3787
3795
  }, ["prevent"])),
3788
3796
  onClick: ($e) => q(te)
3789
3797
  }, [
@@ -3868,7 +3876,7 @@ const Yt = fe("x", [
3868
3876
  function r() {
3869
3877
  i.value++;
3870
3878
  }
3871
- ze(
3879
+ Re(
3872
3880
  () => t.editor,
3873
3881
  (h, v) => {
3874
3882
  v && v.off("transaction", r), h && h.on("transaction", r);
@@ -3876,7 +3884,7 @@ const Yt = fe("x", [
3876
3884
  { immediate: !0 }
3877
3885
  ), jt(() => {
3878
3886
  t.editor && t.editor.off("transaction", r);
3879
- }), ze(i, () => {
3887
+ }), Re(i, () => {
3880
3888
  n.value = !1;
3881
3889
  });
3882
3890
  const a = ue(() => {
@@ -3931,8 +3939,8 @@ const Yt = fe("x", [
3931
3939
  }
3932
3940
  const A = typeof window < "u" ? window.prompt("Enter link URL:", "https://") : null;
3933
3941
  if (A) {
3934
- const H = t.actions[h];
3935
- typeof H == "function" ? H({ href: A, target: "_blank" }) : (k = (x = (y = t.editor) == null ? void 0 : y.chain().focus()).setLink) == null || k.call(x, { href: A, target: "_blank" }).run();
3942
+ const U = t.actions[h];
3943
+ typeof U == "function" ? U({ href: A, target: "_blank" }) : (k = (x = (y = t.editor) == null ? void 0 : y.chain().focus()).setLink) == null || k.call(x, { href: A, target: "_blank" }).run();
3936
3944
  }
3937
3945
  return;
3938
3946
  }
@@ -3949,10 +3957,10 @@ const Yt = fe("x", [
3949
3957
  "data-testid": "bubble-menu",
3950
3958
  class: "docs-editor-bubble-menu fixed z-50 flex gap-1 rounded-xl border border-slate-200 bg-white p-1.5 shadow-2xl dark:border-white/10 dark:bg-[#0c1329]",
3951
3959
  style: at(m.value),
3952
- onMousedown: v[1] || (v[1] = ke(() => {
3960
+ onMousedown: v[1] || (v[1] = _e(() => {
3953
3961
  }, ["prevent"]))
3954
3962
  }, [
3955
- o.value ? (I(), D(Te, { key: 0 }, [
3963
+ o.value ? (I(), D(Ee, { key: 0 }, [
3956
3964
  o.value.status === "streaming" ? (I(), D("span", Gh, [
3957
3965
  Y(S(Od), { class: "h-3.5 w-3.5 animate-spin" }),
3958
3966
  v[2] || (v[2] = w("span", null, "AI writing…", -1))
@@ -3989,8 +3997,8 @@ const Yt = fe("x", [
3989
3997
  Y(S(Yt), { class: "h-3.5 w-3.5" }),
3990
3998
  v[5] || (v[5] = w("span", null, "Reject", -1))
3991
3999
  ])
3992
- ], 64)) : (I(), D(Te, { key: 1 }, [
3993
- (I(!0), D(Te, null, De(a.value, (b) => (I(), D("button", {
4000
+ ], 64)) : (I(), D(Ee, { key: 1 }, [
4001
+ (I(!0), D(Ee, null, Le(a.value, (b) => (I(), D("button", {
3994
4002
  key: b.id,
3995
4003
  type: "button",
3996
4004
  class: ge([
@@ -4015,7 +4023,7 @@ const Yt = fe("x", [
4015
4023
  v[6] || (v[6] = w("span", null, "AI", -1))
4016
4024
  ], 2),
4017
4025
  n.value ? (I(), D("div", Qh, [
4018
- (I(), D(Te, null, De(l, (b) => w("button", {
4026
+ (I(), D(Ee, null, Le(l, (b) => w("button", {
4019
4027
  key: b.id,
4020
4028
  type: "button",
4021
4029
  class: "flex items-center gap-2 rounded-lg px-3 py-1.5 text-left text-xs font-semibold text-slate-600 transition-all hover:bg-slate-100 hover:text-slate-900 dark:text-slate-300 dark:hover:bg-white/5 dark:hover:text-white",
@@ -4109,7 +4117,7 @@ const Yt = fe("x", [
4109
4117
  "aria-label": S(i)("statusBar.pageSize"),
4110
4118
  onChange: l[0] || (l[0] = (u) => r("update:pageSize", u.target.value))
4111
4119
  }, [
4112
- (I(!0), D(Te, null, De(e.pageSizes, (u) => (I(), D("option", {
4120
+ (I(!0), D(Ee, null, Le(e.pageSizes, (u) => (I(), D("option", {
4113
4121
  key: u.id,
4114
4122
  value: u.id
4115
4123
  }, N(u.name), 9, gb))), 128))
@@ -4167,7 +4175,7 @@ const Yt = fe("x", [
4167
4175
  style: at({ left: a.value, transform: "translateX(-4px)" })
4168
4176
  }, null, 4),
4169
4177
  w("div", Ob, [
4170
- (I(!0), D(Te, null, De(n.value, (l) => (I(), D("div", {
4178
+ (I(!0), D(Ee, null, Le(n.value, (l) => (I(), D("div", {
4171
4179
  key: l,
4172
4180
  class: ge(["absolute top-0 border-l border-slate-300 dark:border-slate-600", l % 96 === 0 ? "h-3" : "h-1.5"]),
4173
4181
  style: at({ left: `${l}px` })
@@ -4202,7 +4210,7 @@ const Yt = fe("x", [
4202
4210
  style: at({ minHeight: `${i.value.pageHeight}px` })
4203
4211
  }, [
4204
4212
  w("div", Eb, [
4205
- (I(!0), D(Te, null, De(n.value, (s) => (I(), D("div", {
4213
+ (I(!0), D(Ee, null, Le(n.value, (s) => (I(), D("div", {
4206
4214
  key: s,
4207
4215
  class: ge(["absolute right-0 border-t border-slate-300 dark:border-slate-600", s % 96 === 0 ? "w-3" : "w-1.5"]),
4208
4216
  style: at({ top: `${s}px` })
@@ -4276,7 +4284,7 @@ const Yt = fe("x", [
4276
4284
  }), jt(() => {
4277
4285
  var b, y;
4278
4286
  (b = i.editor) == null || b.off("update", u), (y = i.editor) == null || y.off("selectionUpdate", d), l !== null && (clearTimeout(l), l = null);
4279
- }), ze(
4287
+ }), Re(
4280
4288
  () => i.editor,
4281
4289
  (b, y) => {
4282
4290
  y == null || y.off("update", u), y == null || y.off("selectionUpdate", d), l !== null && (clearTimeout(l), l = null), f(), d(), b == null || b.on("update", u), b == null || b.on("selectionUpdate", d);
@@ -4335,13 +4343,13 @@ const Yt = fe("x", [
4335
4343
  a.value.length > 0 ? (I(), D("div", Pb, [
4336
4344
  w("div", Bb, [
4337
4345
  Y(S(na), { class: "absolute left-3 h-3.5 w-3.5 text-slate-400 dark:text-slate-500" }),
4338
- Se(w("input", {
4346
+ Ce(w("input", {
4339
4347
  "onUpdate:modelValue": y[1] || (y[1] = (x) => s.value = x),
4340
4348
  type: "text",
4341
4349
  placeholder: S(r)("sidebars.toc.searchHeadings"),
4342
4350
  class: "w-full rounded-xl border border-slate-200/80 bg-slate-50 py-2 pl-9 pr-8 text-xs text-slate-700 transition-all focus:outline-none focus:ring-1 focus:ring-cyan-500/50 dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200 dark:focus:ring-cyan-400/30"
4343
4351
  }, null, 8, Fb), [
4344
- [Re, s.value]
4352
+ [De, s.value]
4345
4353
  ]),
4346
4354
  s.value ? (I(), D("button", {
4347
4355
  key: 0,
@@ -4362,7 +4370,7 @@ const Yt = fe("x", [
4362
4370
  w("p", Vb, N(S(r)("sidebars.toc.noHeadingsDescription")), 1),
4363
4371
  w("div", $b, [
4364
4372
  w("span", Wb, N(S(r)("sidebars.toc.quickInsert")), 1),
4365
- (I(), D(Te, null, De([1, 2, 3], (x) => w("button", {
4373
+ (I(), D(Ee, null, Le([1, 2, 3], (x) => w("button", {
4366
4374
  key: x,
4367
4375
  type: "button",
4368
4376
  class: "flex w-full items-center justify-between rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-[11px] font-semibold text-slate-700 transition-all hover:bg-slate-100 dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-300 dark:hover:bg-white/5",
@@ -4384,7 +4392,7 @@ const Yt = fe("x", [
4384
4392
  ])) : (I(), D("div", Qb, [
4385
4393
  w("span", Yb, N(S(r)("sidebars.toc.outlineLayout")), 1),
4386
4394
  w("div", eg, [
4387
- (I(!0), D(Te, null, De(p.value, (x) => (I(), D("button", {
4395
+ (I(!0), D(Ee, null, Le(p.value, (x) => (I(), D("button", {
4388
4396
  key: x.id,
4389
4397
  type: "button",
4390
4398
  class: ge(h(x.level, o.value === x.id)),
@@ -4489,9 +4497,9 @@ const Yt = fe("x", [
4489
4497
  E.URL,
4490
4498
  ...(E.author ?? []).map((oe) => `${oe.family ?? ""} ${oe.given ?? ""} ${oe.literal ?? ""}`)
4491
4499
  ].filter(Boolean).join(" ").toLowerCase().includes(ee)) : i.sources;
4492
- }), d = K("list"), p = K(null), m = K("book"), g = K(""), h = K([{ family: "", given: "" }]), v = K(""), b = K(""), y = K(""), x = K(""), k = K(""), O = K(""), A = K(""), H = K(""), _ = K("");
4500
+ }), d = K("list"), p = K(null), m = K("book"), g = K(""), h = K([{ family: "", given: "" }]), v = K(""), b = K(""), y = K(""), x = K(""), k = K(""), O = K(""), A = K(""), U = K(""), _ = K("");
4493
4501
  function C() {
4494
- m.value = "book", g.value = "", h.value = [{ family: "", given: "" }], v.value = "", b.value = "", y.value = "", x.value = "", k.value = "", O.value = "", A.value = "", H.value = "", _.value = "";
4502
+ m.value = "book", g.value = "", h.value = [{ family: "", given: "" }], v.value = "", b.value = "", y.value = "", x.value = "", k.value = "", O.value = "", A.value = "", U.value = "", _.value = "";
4495
4503
  }
4496
4504
  function R() {
4497
4505
  p.value = null, C(), d.value = "form";
@@ -4499,7 +4507,7 @@ const Yt = fe("x", [
4499
4507
  function L(ee) {
4500
4508
  p.value = ee.id, m.value = ee.type || "book", g.value = ee.title ?? "", h.value = (ee.author ?? []).filter((X) => !X.literal).map((X) => ({ family: X.family ?? "", given: X.given ?? "" }));
4501
4509
  const E = (ee.author ?? []).find((X) => X.literal);
4502
- h.value.length === 0 && (h.value = [{ family: (E == null ? void 0 : E.literal) ?? "", given: "" }]), v.value = l(ee), b.value = ee.publisher ?? "", y.value = ee["publisher-place"] ?? "", x.value = ee["container-title"] ?? "", k.value = ee.volume ?? "", O.value = ee.issue ?? "", A.value = ee.page ?? "", H.value = ee.DOI ?? "", _.value = ee.URL ?? "", d.value = "form";
4510
+ h.value.length === 0 && (h.value = [{ family: (E == null ? void 0 : E.literal) ?? "", given: "" }]), v.value = l(ee), b.value = ee.publisher ?? "", y.value = ee["publisher-place"] ?? "", x.value = ee["container-title"] ?? "", k.value = ee.volume ?? "", O.value = ee.issue ?? "", A.value = ee.page ?? "", U.value = ee.DOI ?? "", _.value = ee.URL ?? "", d.value = "form";
4503
4511
  }
4504
4512
  function W() {
4505
4513
  h.value.push({ family: "", given: "" });
@@ -4514,7 +4522,7 @@ const Yt = fe("x", [
4514
4522
  type: m.value,
4515
4523
  title: g.value.trim()
4516
4524
  };
4517
- return ee.length > 0 && (X.author = ee), Number.isFinite(E) && (X.issued = { "date-parts": [[E]] }), b.value.trim() && (X.publisher = b.value.trim()), y.value.trim() && (X["publisher-place"] = y.value.trim()), x.value.trim() && (X["container-title"] = x.value.trim()), k.value.trim() && (X.volume = k.value.trim()), O.value.trim() && (X.issue = O.value.trim()), A.value.trim() && (X.page = A.value.trim()), H.value.trim() && (X.DOI = H.value.trim()), _.value.trim() && (X.URL = _.value.trim()), X;
4525
+ return ee.length > 0 && (X.author = ee), Number.isFinite(E) && (X.issued = { "date-parts": [[E]] }), b.value.trim() && (X.publisher = b.value.trim()), y.value.trim() && (X["publisher-place"] = y.value.trim()), x.value.trim() && (X["container-title"] = x.value.trim()), k.value.trim() && (X.volume = k.value.trim()), O.value.trim() && (X.issue = O.value.trim()), A.value.trim() && (X.page = A.value.trim()), U.value.trim() && (X.DOI = U.value.trim()), _.value.trim() && (X.URL = _.value.trim()), X;
4518
4526
  }
4519
4527
  function G() {
4520
4528
  if (!F.value) return;
@@ -4524,7 +4532,7 @@ const Yt = fe("x", [
4524
4532
  function z(ee) {
4525
4533
  window.confirm(r("sidebars.references.confirmDelete").replace("{title}", ee.title ?? ee.id)) && n("remove", ee.id);
4526
4534
  }
4527
- const j = K(!1), $ = K(""), pe = K(null);
4535
+ const H = K(!1), $ = K(""), pe = K(null);
4528
4536
  function ce() {
4529
4537
  const ee = $.value.trim();
4530
4538
  !ee || i.importing || (n("import-doi", ee), $.value = "");
@@ -4558,7 +4566,7 @@ const Yt = fe("x", [
4558
4566
  Y(S(Yt), { class: "h-4 w-4" })
4559
4567
  ], 8, fg)
4560
4568
  ]),
4561
- d.value === "list" ? (I(), D(Te, { key: 0 }, [
4569
+ d.value === "list" ? (I(), D(Ee, { key: 0 }, [
4562
4570
  w("div", pg, [
4563
4571
  w("label", dg, N(S(r)("sidebars.references.citationStyle")), 1),
4564
4572
  w("select", {
@@ -4566,7 +4574,7 @@ const Yt = fe("x", [
4566
4574
  class: "w-full rounded-xl border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs text-slate-700 transition-all focus:outline-none focus:ring-1 focus:ring-cyan-500/50 dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200",
4567
4575
  onChange: E[1] || (E[1] = (X) => n("update:style", X.target.value))
4568
4576
  }, [
4569
- (I(!0), D(Te, null, De(e.availableStyles, (X) => (I(), D("option", {
4577
+ (I(!0), D(Ee, null, Le(e.availableStyles, (X) => (I(), D("option", {
4570
4578
  key: X.id,
4571
4579
  value: X.id
4572
4580
  }, N(X.name), 9, hg))), 128))
@@ -4575,13 +4583,13 @@ const Yt = fe("x", [
4575
4583
  w("div", bg, [
4576
4584
  w("div", gg, [
4577
4585
  Y(S(na), { class: "absolute left-3 h-3.5 w-3.5 text-slate-400 dark:text-slate-500" }),
4578
- Se(w("input", {
4586
+ Ce(w("input", {
4579
4587
  "onUpdate:modelValue": E[2] || (E[2] = (X) => a.value = X),
4580
4588
  type: "text",
4581
4589
  placeholder: S(r)("sidebars.references.searchSources"),
4582
4590
  class: "w-full rounded-xl border border-slate-200/80 bg-slate-50 py-2 pl-9 pr-8 text-xs text-slate-700 transition-all focus:outline-none focus:ring-1 focus:ring-cyan-500/50 dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200 dark:focus:ring-cyan-400/30"
4583
4591
  }, null, 8, vg), [
4584
- [Re, a.value]
4592
+ [De, a.value]
4585
4593
  ]),
4586
4594
  a.value ? (I(), D("button", {
4587
4595
  key: 0,
@@ -4620,7 +4628,7 @@ const Yt = fe("x", [
4620
4628
  Y(S(na), { class: "mb-2 h-5 w-5 text-slate-300" }),
4621
4629
  w("p", Og, N(S(r)("sidebars.references.noMatchingSources")), 1)
4622
4630
  ])) : (I(), D("div", Ag, [
4623
- (I(!0), D(Te, null, De(f.value, (X) => (I(), D("div", {
4631
+ (I(!0), D(Ee, null, Le(f.value, (X) => (I(), D("div", {
4624
4632
  key: X.id,
4625
4633
  class: "group rounded-xl border border-slate-200/80 bg-slate-50/60 p-3 transition-all hover:border-slate-300 dark:border-white/10 dark:bg-white/[0.02] dark:hover:border-white/20"
4626
4634
  }, [
@@ -4669,25 +4677,25 @@ const Yt = fe("x", [
4669
4677
  w("button", {
4670
4678
  type: "button",
4671
4679
  class: "flex w-full items-center justify-between px-4 py-2.5 text-[10px] font-bold uppercase tracking-widest text-slate-400 transition-colors hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300",
4672
- onClick: E[4] || (E[4] = (X) => j.value = !j.value)
4680
+ onClick: E[4] || (E[4] = (X) => H.value = !H.value)
4673
4681
  }, [
4674
4682
  w("span", null, N(S(r)("sidebars.references.import.title")), 1),
4675
4683
  Y(S(_i), {
4676
- class: ge(["h-3.5 w-3.5 transition-transform", j.value ? "rotate-180" : ""])
4684
+ class: ge(["h-3.5 w-3.5 transition-transform", H.value ? "rotate-180" : ""])
4677
4685
  }, null, 8, ["class"])
4678
4686
  ]),
4679
- j.value ? (I(), D("div", Ug, [
4687
+ H.value ? (I(), D("div", Ug, [
4680
4688
  w("div", null, [
4681
4689
  w("label", Hg, N(S(r)("sidebars.references.import.fromDoi")), 1),
4682
4690
  w("div", jg, [
4683
- Se(w("input", {
4691
+ Ce(w("input", {
4684
4692
  "onUpdate:modelValue": E[5] || (E[5] = (X) => $.value = X),
4685
4693
  type: "text",
4686
4694
  placeholder: S(r)("sidebars.references.import.doiPlaceholder"),
4687
4695
  class: "min-w-0 flex-1 rounded-lg border border-slate-200/80 bg-slate-50 px-2.5 py-1.5 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200",
4688
4696
  onKeydown: ei(ce, ["enter"])
4689
4697
  }, null, 40, qg), [
4690
- [Re, $.value]
4698
+ [De, $.value]
4691
4699
  ]),
4692
4700
  w("button", {
4693
4701
  type: "button",
@@ -4723,7 +4731,7 @@ const Yt = fe("x", [
4723
4731
  e.importMessage ? (I(), D("p", Gg, N(e.importMessage), 1)) : se("", !0)
4724
4732
  ])) : se("", !0)
4725
4733
  ])) : se("", !0)
4726
- ], 64)) : (I(), D(Te, { key: 1 }, [
4734
+ ], 64)) : (I(), D(Ee, { key: 1 }, [
4727
4735
  w("div", Kg, [
4728
4736
  w("button", {
4729
4737
  type: "button",
@@ -4738,15 +4746,15 @@ const Yt = fe("x", [
4738
4746
  w("div", Zg, [
4739
4747
  w("form", {
4740
4748
  class: "space-y-3.5",
4741
- onSubmit: ke(G, ["prevent"])
4749
+ onSubmit: _e(G, ["prevent"])
4742
4750
  }, [
4743
4751
  w("div", null, [
4744
4752
  w("label", Qg, N(S(r)("sidebars.references.form.type")), 1),
4745
- Se(w("select", {
4753
+ Ce(w("select", {
4746
4754
  "onUpdate:modelValue": E[7] || (E[7] = (X) => m.value = X),
4747
4755
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4748
4756
  }, [
4749
- (I(), D(Te, null, De(s, (X) => w("option", {
4757
+ (I(), D(Ee, null, Le(s, (X) => w("option", {
4750
4758
  key: X,
4751
4759
  value: X
4752
4760
  }, N(u(X)), 9, Yg)), 64))
@@ -4756,37 +4764,37 @@ const Yt = fe("x", [
4756
4764
  ]),
4757
4765
  w("div", null, [
4758
4766
  w("label", ev, N(S(r)("sidebars.references.form.title")) + " *", 1),
4759
- Se(w("input", {
4767
+ Ce(w("input", {
4760
4768
  "onUpdate:modelValue": E[8] || (E[8] = (X) => g.value = X),
4761
4769
  type: "text",
4762
4770
  required: "",
4763
4771
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4764
4772
  }, null, 512), [
4765
- [Re, g.value]
4773
+ [De, g.value]
4766
4774
  ])
4767
4775
  ]),
4768
4776
  w("div", null, [
4769
4777
  w("label", tv, N(S(r)("sidebars.references.form.authors")), 1),
4770
4778
  w("div", iv, [
4771
- (I(!0), D(Te, null, De(h.value, (X, oe) => (I(), D("div", {
4779
+ (I(!0), D(Ee, null, Le(h.value, (X, oe) => (I(), D("div", {
4772
4780
  key: oe,
4773
4781
  class: "flex items-center gap-1.5"
4774
4782
  }, [
4775
- Se(w("input", {
4783
+ Ce(w("input", {
4776
4784
  "onUpdate:modelValue": (be) => X.family = be,
4777
4785
  type: "text",
4778
4786
  placeholder: S(r)("sidebars.references.form.familyName"),
4779
4787
  class: "w-1/2 rounded-lg border border-slate-200/80 bg-slate-50 px-2.5 py-1.5 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4780
4788
  }, null, 8, nv), [
4781
- [Re, X.family]
4789
+ [De, X.family]
4782
4790
  ]),
4783
- Se(w("input", {
4791
+ Ce(w("input", {
4784
4792
  "onUpdate:modelValue": (be) => X.given = be,
4785
4793
  type: "text",
4786
4794
  placeholder: S(r)("sidebars.references.form.givenName"),
4787
4795
  class: "w-1/2 rounded-lg border border-slate-200/80 bg-slate-50 px-2.5 py-1.5 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4788
4796
  }, null, 8, rv), [
4789
- [Re, X.given]
4797
+ [De, X.given]
4790
4798
  ]),
4791
4799
  w("button", {
4792
4800
  type: "button",
@@ -4808,99 +4816,99 @@ const Yt = fe("x", [
4808
4816
  ]),
4809
4817
  w("div", null, [
4810
4818
  w("label", sv, N(S(r)("sidebars.references.form.year")), 1),
4811
- Se(w("input", {
4819
+ Ce(w("input", {
4812
4820
  "onUpdate:modelValue": E[9] || (E[9] = (X) => v.value = X),
4813
4821
  type: "number",
4814
4822
  min: "0",
4815
4823
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4816
4824
  }, null, 512), [
4817
- [Re, v.value]
4825
+ [De, v.value]
4818
4826
  ])
4819
4827
  ]),
4820
4828
  Q.value ? (I(), D("div", ov, [
4821
4829
  w("label", lv, N(m.value === "chapter" ? S(r)("sidebars.references.form.bookTitle") : S(r)("sidebars.references.form.journal")), 1),
4822
- Se(w("input", {
4830
+ Ce(w("input", {
4823
4831
  "onUpdate:modelValue": E[10] || (E[10] = (X) => x.value = X),
4824
4832
  type: "text",
4825
4833
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4826
4834
  }, null, 512), [
4827
- [Re, x.value]
4835
+ [De, x.value]
4828
4836
  ])
4829
4837
  ])) : se("", !0),
4830
4838
  P.value ? (I(), D("div", cv, [
4831
4839
  w("div", null, [
4832
4840
  w("label", uv, N(S(r)("sidebars.references.form.publisher")), 1),
4833
- Se(w("input", {
4841
+ Ce(w("input", {
4834
4842
  "onUpdate:modelValue": E[11] || (E[11] = (X) => b.value = X),
4835
4843
  type: "text",
4836
4844
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4837
4845
  }, null, 512), [
4838
- [Re, b.value]
4846
+ [De, b.value]
4839
4847
  ])
4840
4848
  ]),
4841
4849
  w("div", null, [
4842
4850
  w("label", fv, N(S(r)("sidebars.references.form.publisherPlace")), 1),
4843
- Se(w("input", {
4851
+ Ce(w("input", {
4844
4852
  "onUpdate:modelValue": E[12] || (E[12] = (X) => y.value = X),
4845
4853
  type: "text",
4846
4854
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4847
4855
  }, null, 512), [
4848
- [Re, y.value]
4856
+ [De, y.value]
4849
4857
  ])
4850
4858
  ])
4851
4859
  ])) : se("", !0),
4852
4860
  q.value ? (I(), D("div", pv, [
4853
4861
  w("div", null, [
4854
4862
  w("label", dv, N(S(r)("sidebars.references.form.volume")), 1),
4855
- Se(w("input", {
4863
+ Ce(w("input", {
4856
4864
  "onUpdate:modelValue": E[13] || (E[13] = (X) => k.value = X),
4857
4865
  type: "text",
4858
4866
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4859
4867
  }, null, 512), [
4860
- [Re, k.value]
4868
+ [De, k.value]
4861
4869
  ])
4862
4870
  ]),
4863
4871
  w("div", null, [
4864
4872
  w("label", mv, N(S(r)("sidebars.references.form.issue")), 1),
4865
- Se(w("input", {
4873
+ Ce(w("input", {
4866
4874
  "onUpdate:modelValue": E[14] || (E[14] = (X) => O.value = X),
4867
4875
  type: "text",
4868
4876
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4869
4877
  }, null, 512), [
4870
- [Re, O.value]
4878
+ [De, O.value]
4871
4879
  ])
4872
4880
  ]),
4873
4881
  w("div", null, [
4874
4882
  w("label", hv, N(S(r)("sidebars.references.form.pages")), 1),
4875
- Se(w("input", {
4883
+ Ce(w("input", {
4876
4884
  "onUpdate:modelValue": E[15] || (E[15] = (X) => A.value = X),
4877
4885
  type: "text",
4878
4886
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4879
4887
  }, null, 512), [
4880
- [Re, A.value]
4888
+ [De, A.value]
4881
4889
  ])
4882
4890
  ])
4883
4891
  ])) : se("", !0),
4884
4892
  m.value === "article-journal" ? (I(), D("div", bv, [
4885
4893
  E[19] || (E[19] = w("label", { class: "mb-1 block text-[10px] font-semibold text-slate-500 dark:text-slate-400" }, "DOI", -1)),
4886
- Se(w("input", {
4887
- "onUpdate:modelValue": E[16] || (E[16] = (X) => H.value = X),
4894
+ Ce(w("input", {
4895
+ "onUpdate:modelValue": E[16] || (E[16] = (X) => U.value = X),
4888
4896
  type: "text",
4889
4897
  placeholder: "10.xxxx/xxxxx",
4890
4898
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4891
4899
  }, null, 512), [
4892
- [Re, H.value]
4900
+ [De, U.value]
4893
4901
  ])
4894
4902
  ])) : se("", !0),
4895
4903
  J.value ? (I(), D("div", gv, [
4896
4904
  E[20] || (E[20] = w("label", { class: "mb-1 block text-[10px] font-semibold text-slate-500 dark:text-slate-400" }, "URL", -1)),
4897
- Se(w("input", {
4905
+ Ce(w("input", {
4898
4906
  "onUpdate:modelValue": E[17] || (E[17] = (X) => _.value = X),
4899
4907
  type: "url",
4900
4908
  placeholder: "https://…",
4901
4909
  class: "w-full rounded-lg border border-slate-200/80 bg-slate-50 px-3 py-2 text-xs dark:border-white/10 dark:bg-slate-900/40 dark:text-slate-200"
4902
4910
  }, null, 512), [
4903
- [Re, _.value]
4911
+ [De, _.value]
4904
4912
  ])
4905
4913
  ])) : se("", !0),
4906
4914
  w("div", vv, [
@@ -9375,8 +9383,8 @@ c.DateParser = function() {
9375
9383
  var s = e[t], n = s[0];
9376
9384
  r.push(n), a[s[0]] = s[1];
9377
9385
  }
9378
- var o = r.join("|"), l = new RegExp("(?:" + o + ")(?:[0-9]+)"), u = new RegExp("(?:" + o + ")(?:[0-9]+)", "g"), f = /(\u6708|\u5E74)/g, d = /\u65E5/g, p = /\u301c/g, m = "(?:[?0-9]{1,2}%%NUMD%%){0,2}[?0-9]{4}(?![0-9])", g = "[?0-9]{4}(?:%%NUMD%%[?0-9]{1,2}){0,2}(?![0-9])", h = "[?0-9]{1,3}", v = "[%%DATED%%]", b = "[?~]", y = "[^-/~?0-9]+", x = "(" + g + "|" + m + "|" + h + "|" + v + "|" + b + "|" + y + ")", k = new RegExp(x.replace(/%%NUMD%%/g, "-").replace(/%%DATED%%/g, "-")), O = new RegExp(x.replace(/%%NUMD%%/g, "-").replace(/%%DATED%%/g, "/")), A = new RegExp(x.replace(/%%NUMD%%/g, "/").replace(/%%DATED%%/g, "-")), H = "january february march april may june july august september october november december spring summer fall winter spring summer";
9379
- this.monthStrings = H.split(" "), this.setOrderDayMonth = function() {
9386
+ var o = r.join("|"), l = new RegExp("(?:" + o + ")(?:[0-9]+)"), u = new RegExp("(?:" + o + ")(?:[0-9]+)", "g"), f = /(\u6708|\u5E74)/g, d = /\u65E5/g, p = /\u301c/g, m = "(?:[?0-9]{1,2}%%NUMD%%){0,2}[?0-9]{4}(?![0-9])", g = "[?0-9]{4}(?:%%NUMD%%[?0-9]{1,2}){0,2}(?![0-9])", h = "[?0-9]{1,3}", v = "[%%DATED%%]", b = "[?~]", y = "[^-/~?0-9]+", x = "(" + g + "|" + m + "|" + h + "|" + v + "|" + b + "|" + y + ")", k = new RegExp(x.replace(/%%NUMD%%/g, "-").replace(/%%DATED%%/g, "-")), O = new RegExp(x.replace(/%%NUMD%%/g, "-").replace(/%%DATED%%/g, "/")), A = new RegExp(x.replace(/%%NUMD%%/g, "/").replace(/%%DATED%%/g, "-")), U = "january february march april may june july august september october november december spring summer fall winter spring summer";
9387
+ this.monthStrings = U.split(" "), this.setOrderDayMonth = function() {
9380
9388
  this.monthGuess = 1, this.dayGuess = 0;
9381
9389
  }, this.setOrderMonthDay = function() {
9382
9390
  this.monthGuess = 0, this.dayGuess = 1;
@@ -9490,7 +9498,7 @@ c.DateParser = function() {
9490
9498
  }
9491
9499
  }
9492
9500
  _ = _.replace(/([A-Za-z])\./g, "$1");
9493
- var z = "", j = "", $ = {}, pe, ce;
9501
+ var z = "", H = "", $ = {}, pe, ce;
9494
9502
  if (_.slice(0, 1) === '"' && _.slice(-1) === '"')
9495
9503
  return $.literal = _.slice(1, -1), $;
9496
9504
  if (R > -1 && L > -1) {
@@ -9532,11 +9540,11 @@ c.DateParser = function() {
9532
9540
  continue;
9533
9541
  }
9534
9542
  if (Ue.toLocaleLowerCase().match(/(?:mic|tri|hil|eas)/) && !$["season" + oe]) {
9535
- j = Ue;
9543
+ H = Ue;
9536
9544
  continue;
9537
9545
  }
9538
9546
  }
9539
- z && ($["day" + oe] = z, z = ""), j && !$["season" + oe] && ($["season" + oe] = j.trim(), j = ""), oe = "_end";
9547
+ z && ($["day" + oe] = z, z = ""), H && !$["season" + oe] && ($["season" + oe] = H.trim(), H = ""), oe = "_end";
9540
9548
  }
9541
9549
  if (X)
9542
9550
  for (var Fe = 0, xe = c.DATE_PARTS_ALL.length; Fe < xe; Fe++) {
@@ -10359,13 +10367,13 @@ c.Output.Queue.adjust = function(e) {
10359
10367
  V[C] += E;
10360
10368
  }
10361
10369
  var z = W ? F : J;
10362
- function j() {
10370
+ function H() {
10363
10371
  return u[q];
10364
10372
  }
10365
10373
  function $() {
10366
10374
  return n[Q];
10367
10375
  }
10368
- var pe = W ? $ : j;
10376
+ var pe = W ? $ : H;
10369
10377
  function ce() {
10370
10378
  var E = n[Q][q];
10371
10379
  typeof E == "string" ? (F(), J(), ne(E)) : (ne(Q), F());
@@ -10459,7 +10467,7 @@ c.Output.Queue.adjust = function(e) {
10459
10467
  for (var C = _.blobs[_.blobs.length - 1].strings.suffix.slice(-1); a[C]; )
10460
10468
  b(_.blobs[_.blobs.length - 1], "suffix", _, "suffix", !0), C = _.blobs[_.blobs.length - 1].strings.suffix.slice(-1);
10461
10469
  }
10462
- function H(_) {
10470
+ function U(_) {
10463
10471
  if (!(typeof _ != "object" || typeof _.blobs != "object" || !_.blobs.length)) {
10464
10472
  for (var C, R = 0, L = _.blobs.length; R < L; R++) {
10465
10473
  for (var W = _.blobs[R], V = !1, P = 0, Q = W.decorations.length; P < Q; P++) {
@@ -10471,7 +10479,7 @@ c.Output.Queue.adjust = function(e) {
10471
10479
  return C;
10472
10480
  }
10473
10481
  }
10474
- this.upward = y, this.leftward = x, this.downward = k, this.fix = H;
10482
+ this.upward = y, this.leftward = x, this.downward = k, this.fix = U;
10475
10483
  };
10476
10484
  c.Engine.Opt = function() {
10477
10485
  this.parallel = {
@@ -10637,18 +10645,18 @@ c.Engine.prototype.appendCitationCluster = function(e) {
10637
10645
  c.Engine.prototype.processCitationCluster = function(e, t, i, n) {
10638
10646
  var r, a, s, o, l, u, f, d, p, m, g, h, v, b, y, x, k, O;
10639
10647
  this.debug = !1, this.tmp.loadedItemIDs = {}, this.tmp.citation_errors = [], this.registry.return_data = { bibchange: !1 }, this.setCitationId(e);
10640
- var A, H, _;
10648
+ var A, U, _;
10641
10649
  if (n === c.PREVIEW) {
10642
- this.debug && c.debug("****** start state save *********"), A = this.registry.citationreg.citationByIndex.slice(), H = this.registry.reflist.slice();
10650
+ this.debug && c.debug("****** start state save *********"), A = this.registry.citationreg.citationByIndex.slice(), U = this.registry.reflist.slice();
10643
10651
  for (var C = t.concat(i), R = {}, L = [], o = 0, l = C.length; o < l; o += 1)
10644
10652
  for (r = this.registry.citationreg.citationById[C[o][0]], u = 0, f = r.citationItems.length; u < f; u += 1)
10645
10653
  R[r.citationItems[u].id] = !0, L.push("" + r.citationItems[u].id);
10646
10654
  for (u = 0, f = e.citationItems.length; u < f; u += 1)
10647
10655
  R[e.citationItems[u].id] = !0, L.push("" + e.citationItems[u].id);
10648
10656
  _ = {};
10649
- for (var o = 0, l = H.length; o < l; o += 1)
10650
- if (!R[H[o].id]) {
10651
- var W = this.registry.registry[H[o].id].ambig, V = this.registry.ambigcites[W];
10657
+ for (var o = 0, l = U.length; o < l; o += 1)
10658
+ if (!R[U[o].id]) {
10659
+ var W = this.registry.registry[U[o].id].ambig, V = this.registry.ambigcites[W];
10652
10660
  if (V)
10653
10661
  for (u = 0, f = V.length; u < f; u += 1)
10654
10662
  _[V[u]] = c.cloneAmbigConfig(this.registry.registry[V[u]].disambig);
@@ -10689,12 +10697,12 @@ c.Engine.prototype.processCitationCluster = function(e, t, i, n) {
10689
10697
  P[o][1].sortkeys = c.getSortKeys.call(this, P[o][0], "citation_sort");
10690
10698
  if (this.opt.grouped_sort && !e.properties.unsorted) {
10691
10699
  for (var o = 0, l = P.length; o < l; o += 1) {
10692
- var j = P[o][1].sortkeys;
10700
+ var H = P[o][1].sortkeys;
10693
10701
  this.tmp.authorstring_request = !0;
10694
10702
  var $ = this.registry.registry[P[o][0].id].disambig;
10695
10703
  this.tmp.authorstring_request = !0, c.getAmbiguousCite.call(this, P[o][0], $);
10696
10704
  var pe = this.registry.authorstrings[P[o][0].id];
10697
- this.tmp.authorstring_request = !1, P[o][1].sortkeys = [pe].concat(j);
10705
+ this.tmp.authorstring_request = !1, P[o][1].sortkeys = [pe].concat(H);
10698
10706
  }
10699
10707
  P.sort(this.citation.srt.compareCompositeKeys);
10700
10708
  for (var ce = !1, ae = !1, le = !1, o = 0, l = P.length; o < l; o += 1)
@@ -10797,8 +10805,8 @@ c.Engine.prototype.processCitationCluster = function(e, t, i, n) {
10797
10805
  for (var o = 0, l = A.length; o < l; o += 1)
10798
10806
  this.registry.citationreg.citationById[A[o].citationID] = A[o];
10799
10807
  this.debug && c.debug("****** start final update *********");
10800
- for (var di = [], o = 0, l = H.length; o < l; o += 1)
10801
- di.push("" + H[o].id);
10808
+ for (var di = [], o = 0, l = U.length; o < l; o += 1)
10809
+ di.push("" + U[o].id);
10802
10810
  this.updateItems(di, null, null, !0), this.debug && c.debug("****** end final update *********");
10803
10811
  for (var h in _)
10804
10812
  _.hasOwnProperty(h) && (this.registry.registry[h].disambig = _[h]);
@@ -10910,11 +10918,11 @@ c.getSpliceDelimiter = function(e, t, i) {
10910
10918
  return this.tmp.splice_delimiter;
10911
10919
  };
10912
10920
  c.getCitationCluster = function(e, t) {
10913
- var i, n, r, a, s, o, l, u, f, d, p, m, g, h, v, b, y, x, k, O, A, H = "";
10914
- this.output.checkNestedBrace = new c.checkNestedBrace(this), t && (k = t.citationID, O = t.properties.mode === "author-only" ? !!t.properties.mode : !1, this.opt.xclass !== "note" && (A = t.properties.mode === "suppress-author" ? !!t.properties.mode : !1), t.properties.prefix && (H = c.checkPrefixSpaceAppend(this, t.properties.prefix))), e = e || [], this.tmp.last_primary_names_string = !1, y = c.getSafeEscape(this), this.tmp.area = "citation", this.tmp.root = "citation", i = "", n = [], this.tmp.last_suffix_used = "", this.tmp.last_names_used = [], this.tmp.last_years_used = [], this.tmp.backref_index = [], this.tmp.cite_locales = [], this.tmp.just_looking || (this.tmp.abbrev_trimmer = {
10921
+ var i, n, r, a, s, o, l, u, f, d, p, m, g, h, v, b, y, x, k, O, A, U = "";
10922
+ this.output.checkNestedBrace = new c.checkNestedBrace(this), t && (k = t.citationID, O = t.properties.mode === "author-only" ? !!t.properties.mode : !1, this.opt.xclass !== "note" && (A = t.properties.mode === "suppress-author" ? !!t.properties.mode : !1), t.properties.prefix && (U = c.checkPrefixSpaceAppend(this, t.properties.prefix))), e = e || [], this.tmp.last_primary_names_string = !1, y = c.getSafeEscape(this), this.tmp.area = "citation", this.tmp.root = "citation", i = "", n = [], this.tmp.last_suffix_used = "", this.tmp.last_names_used = [], this.tmp.last_years_used = [], this.tmp.backref_index = [], this.tmp.cite_locales = [], this.tmp.just_looking || (this.tmp.abbrev_trimmer = {
10915
10923
  QUASHES: {}
10916
10924
  });
10917
- var _ = this.output.checkNestedBrace.update(this.citation.opt.layout_prefix + H), C = !1;
10925
+ var _ = this.output.checkNestedBrace.update(this.citation.opt.layout_prefix + U), C = !1;
10918
10926
  if (this.citation.opt.suppressTrailingPunctuation && (C = !0), k && this.registry.citationreg.citationById[k].properties["suppress-trailing-punctuation"] && (C = !0), this.opt.xclass === "note") {
10919
10927
  for (var R = [], L = !1, W = !1, V = [], P = 0, Q = e.length; P < Q; P += 1) {
10920
10928
  var q = e[P][0].type, J = e[P][0].title, F = e[P][1].position, ne = e[P][0].id;
@@ -10924,7 +10932,7 @@ c.getCitationCluster = function(e, t) {
10924
10932
  if (V = R[P], !(V.length < 2)) {
10925
10933
  var G = V.slice(-1)[0].locator;
10926
10934
  if (G)
10927
- for (var z = 0, j = V.length - 1; z < j; z += 1)
10935
+ for (var z = 0, H = V.length - 1; z < H; z += 1)
10928
10936
  V[z].locator && (G = !1);
10929
10937
  G && (V[0].locator = G, delete V.slice(-1)[0].locator, V[0].label = V.slice(-1)[0].label, V.slice(-1)[0].label && delete V.slice(-1)[0].label);
10930
10938
  }
@@ -10962,7 +10970,7 @@ c.getCitationCluster = function(e, t) {
10962
10970
  for (var P = 0, Q = this.output.queue.length; P < Q; P += 1)
10963
10971
  c.Output.Queue.purgeEmptyBlobs(this.output.queue[P]);
10964
10972
  if (!this.tmp.suppress_decorations && this.output.queue.length && (this.opt.development_extensions.apply_citation_wrapper && this.sys.wrapCitationEntry && !this.tmp.just_looking && this.tmp.area === "citation" || (C || (this.output.queue[this.output.queue.length - 1].strings.suffix = E), this.output.queue[0].strings.prefix = _)), this.opt.development_extensions.clean_up_csl_flaws)
10965
- for (var z = 0, j = this.output.queue.length; z < j; z += 1)
10973
+ for (var z = 0, H = this.output.queue.length; z < H; z += 1)
10966
10974
  this.output.adjust.upward(this.output.queue[z]), this.output.adjust.leftward(this.output.queue[z]), this.output.adjust.downward(this.output.queue[z]), this.tmp.last_chr = this.output.adjust.fix(this.output.queue[z]);
10967
10975
  for (s = 0, a = p.length; s < a; s += 1) {
10968
10976
  var oe = [];
@@ -11093,14 +11101,14 @@ c.getBibliographyEntries = function(e) {
11093
11101
  function A(q, J) {
11094
11102
  return q === J;
11095
11103
  }
11096
- function H(q, J) {
11104
+ function U(q, J) {
11097
11105
  for (f = J.length, d = 0; d < f; d += 1)
11098
11106
  if (A(q, J[d]))
11099
11107
  return !0;
11100
11108
  return !1;
11101
11109
  }
11102
11110
  function _(q, J) {
11103
- return typeof q == "boolean" || !q ? q ? !!J : !J : typeof J == "string" ? A(q, J) : J ? H(q, J) : !1;
11111
+ return typeof q == "boolean" || !q ? q ? !!J : !J : typeof J == "string" ? A(q, J) : J ? U(q, J) : !1;
11104
11112
  }
11105
11113
  b = {};
11106
11114
  var C;
@@ -11289,7 +11297,7 @@ c.Engine.prototype.localeSet = function(e, t, i) {
11289
11297
  }
11290
11298
  }
11291
11299
  for (a = e.getNodesByName(r, "type"), b = 0, y = e.numberofnodes(a); b < y; b += 1) {
11292
- var H = a[b], _ = e.getAttributeValue(H, "name"), C = e.getAttributeValue(H, "gender");
11300
+ var U = a[b], _ = e.getAttributeValue(U, "name"), C = e.getAttributeValue(U, "gender");
11293
11301
  this.opt.gender[_] = C;
11294
11302
  }
11295
11303
  var R = e.getNodesByName(r, "term", "ordinal").length;
@@ -11343,8 +11351,8 @@ c.Engine.prototype.localeSet = function(e, t, i) {
11343
11351
  var z = s[m].split(/\s+/);
11344
11352
  this.locale[i].opts[m.slice(1)] = z;
11345
11353
  } else if (m === "@skip-words") {
11346
- var j = s[m].split(/\s*,\s*/);
11347
- this.locale[i].opts[m.slice(1)] = j;
11354
+ var H = s[m].split(/\s*,\s*/);
11355
+ this.locale[i].opts[m.slice(1)] = H;
11348
11356
  } else if (m === "@leading-noise-words") {
11349
11357
  var $ = s[m].split(/\s*,\s*/);
11350
11358
  this.locale[i].opts["leading-noise-words"] = $;
@@ -11481,7 +11489,7 @@ c.Node["date-part"] = {
11481
11489
  build: function(e, t) {
11482
11490
  var i, n, r, a, s, o, l, u, f, d, p, m, g, h, v, b, y, x, k, O, A;
11483
11491
  this.strings.form || (this.strings.form = "long"), e.build.date_parts.push(this.strings.name);
11484
- var H = e.build.date_variables[0];
11492
+ var U = e.build.date_variables[0];
11485
11493
  function _(C, R, L) {
11486
11494
  if (!L)
11487
11495
  return L;
@@ -11535,7 +11543,7 @@ c.Node["date-part"] = {
11535
11543
  L = s, C.output.append(s, this);
11536
11544
  m && (L = m, C.output.append(m)), g && (L = g, C.output.append(g)), C.output.closeLevel();
11537
11545
  } else this.strings.name === "month" && C.tmp.date_object.season && (s = "" + C.tmp.date_object.season, s && s.match(/^[1-4]$/) ? (C.tmp.group_context.tip.variable_success = !0, L = "winter", C.output.append(C.getTerm("season-0" + s), this)) : s && (L = s, C.output.append(s, this)));
11538
- C.tmp.value = [], R[H] && (s || C.tmp.have_collapsed) && !C.opt.has_year_suffix && this.strings.name === "year" && !C.tmp.just_looking && C.registry.registry[R.id] && C.registry.registry[R.id].disambig.year_suffix !== !1 && !C.tmp.has_done_year_suffix && (C.tmp.has_done_year_suffix = !0, L = "x", x = parseInt(C.registry.registry[R.id].disambig.year_suffix, 10), y = new c.NumericBlob(C, !1, x, this, R.id), this.successor_prefix = C[C.build.area].opt.layout_delimiter, this.splice_prefix = C[C.build.area].opt.layout_delimiter, k = new c.Util.Suffixator(c.SUFFIX_CHARS), y.setFormatter(k), C[C.tmp.area].opt.collapse === "year-suffix-ranged" && (y.range_prefix = C.getTerm("citation-range-delimiter")), C[C.tmp.area].opt.cite_group_delimiter ? y.successor_prefix = C[C.tmp.area].opt.cite_group_delimiter : C[C.tmp.area].opt["year-suffix-delimiter"] ? y.successor_prefix = C[C.tmp.area].opt["year-suffix-delimiter"] : y.successor_prefix = C[C.tmp.area].opt.layout_delimiter, y.UGLY_DELIMITER_SUPPRESS_HACK = !0, C.output.append(y, "literal")), L && !C.tmp.group_context.tip.condition && (C.tmp.just_did_number = L.match(/[0-9]$/), C.output.current.tip.strings.suffix && (C.tmp.just_did_number = !1));
11546
+ C.tmp.value = [], R[U] && (s || C.tmp.have_collapsed) && !C.opt.has_year_suffix && this.strings.name === "year" && !C.tmp.just_looking && C.registry.registry[R.id] && C.registry.registry[R.id].disambig.year_suffix !== !1 && !C.tmp.has_done_year_suffix && (C.tmp.has_done_year_suffix = !0, L = "x", x = parseInt(C.registry.registry[R.id].disambig.year_suffix, 10), y = new c.NumericBlob(C, !1, x, this, R.id), this.successor_prefix = C[C.build.area].opt.layout_delimiter, this.splice_prefix = C[C.build.area].opt.layout_delimiter, k = new c.Util.Suffixator(c.SUFFIX_CHARS), y.setFormatter(k), C[C.tmp.area].opt.collapse === "year-suffix-ranged" && (y.range_prefix = C.getTerm("citation-range-delimiter")), C[C.tmp.area].opt.cite_group_delimiter ? y.successor_prefix = C[C.tmp.area].opt.cite_group_delimiter : C[C.tmp.area].opt["year-suffix-delimiter"] ? y.successor_prefix = C[C.tmp.area].opt["year-suffix-delimiter"] : y.successor_prefix = C[C.tmp.area].opt.layout_delimiter, y.UGLY_DELIMITER_SUPPRESS_HACK = !0, C.output.append(y, "literal")), L && !C.tmp.group_context.tip.condition && (C.tmp.just_did_number = L.match(/[0-9]$/), C.output.current.tip.strings.suffix && (C.tmp.just_did_number = !1));
11539
11547
  }, this.execs.push(i), t.push(this);
11540
11548
  }
11541
11549
  };
@@ -11675,8 +11683,8 @@ c.Node.group = {
11675
11683
  } else {
11676
11684
  if (p.tmp.term_predecessor = h.old_term_predecessor, p.tmp.group_context.tip.variable_attempt = h.variable_attempt, h.force_suppress && !p.tmp.group_context.tip.condition && (p.tmp.group_context.tip.variable_attempt = !0, p.tmp.group_context.tip.variable_success = h.variable_success_parent), h.force_suppress)
11677
11685
  for (var k = 0, O = h.done_vars.length; k < O; k++)
11678
- for (var A = h.done_vars[k], H = 0, _ = p.tmp.done_vars.length; H < _; H++)
11679
- p.tmp.done_vars[H] === A && (p.tmp.done_vars = p.tmp.done_vars.slice(0, H).concat(p.tmp.done_vars.slice(H + 1)));
11686
+ for (var A = h.done_vars[k], U = 0, _ = p.tmp.done_vars.length; U < _; U++)
11687
+ p.tmp.done_vars[U] === A && (p.tmp.done_vars = p.tmp.done_vars.slice(0, U).concat(p.tmp.done_vars.slice(U + 1)));
11680
11688
  p.output.current.value().blobs && p.output.current.value().blobs.pop();
11681
11689
  }
11682
11690
  }
@@ -12602,8 +12610,8 @@ c.NameOutput.prototype._renderOnePersonalName = function(e, t, i, n) {
12602
12610
  A.indexOf(O.slice(-1)) > -1 && O.slice(0, -1) !== "de" && (s = this._join([a, s], ""), a = !1);
12603
12611
  }
12604
12612
  h ? (k = this._join([o, s], ""), k = this._join([a, k], v)) : k = this._join([a, o, s], v), k = this._join([k, f], p), k && this.family && (k.strings.prefix = this.family.strings.prefix, k.strings.suffix = this.family.strings.suffix), u && this.given && (u.strings.prefix = this.given.strings.prefix, u.strings.suffix = this.given.strings.suffix), k.strings.prefix && (r["comma-dropping-particle"] = "");
12605
- var H;
12606
- this.state.inheritOpt(this.name, "initialize-with") && this.state.inheritOpt(this.name, "initialize-with").match(/[\u00a0\ufeff]/) && l.initializationLevel === 1 ? H = v : H = " ", b = this._join([u, k], r["comma-dropping-particle"] + H);
12613
+ var U;
12614
+ this.state.inheritOpt(this.name, "initialize-with") && this.state.inheritOpt(this.name, "initialize-with").match(/[\u00a0\ufeff]/) && l.initializationLevel === 1 ? U = v : U = " ", b = this._join([u, k], r["comma-dropping-particle"] + U);
12607
12615
  }
12608
12616
  return this.state.tmp.group_context.tip.variable_success = !0, this.state.tmp.can_substitute.replace(!1, c.LITERAL), this.state.tmp.term_predecessor = !0, this.state.tmp.name_node.children.push(b), b;
12609
12617
  };
@@ -13043,8 +13051,8 @@ c.Node.text = {
13043
13051
  if (x.registry.registry[k.id] && x.registry.registry[k.id].disambig.year_suffix !== !1 && !x.tmp.just_looking) {
13044
13052
  s = parseInt(x.registry.registry[k.id].disambig.year_suffix, 10), x[x.tmp.area].opt.cite_group_delimiter && (this.successor_prefix = x[x.tmp.area].opt.cite_group_delimiter), o = new c.NumericBlob(x, !1, s, this, k.id), l = new c.Util.Suffixator(c.SUFFIX_CHARS), o.setFormatter(l), x.output.append(o, "literal"), u = !1;
13045
13053
  for (var O = 0, A = x.tmp.group_context.mystack.length; O < A; O++) {
13046
- var H = x.tmp.group_context.mystack[O];
13047
- if (!H.variable_success && (H.variable_attempt || !H.variable_attempt && !H.term_intended)) {
13054
+ var U = x.tmp.group_context.mystack[O];
13055
+ if (!U.variable_success && (U.variable_attempt || !U.variable_attempt && !U.term_intended)) {
13048
13056
  u = !0;
13049
13057
  break;
13050
13058
  }
@@ -13058,16 +13066,16 @@ c.Node.text = {
13058
13066
  i = function(x, k) {
13059
13067
  var O = x.opt.gender[k.type], A = this.strings.term;
13060
13068
  A = x.getTerm(A, n, r, O, c.TOLERANT, this.default_locale);
13061
- var H;
13062
- if (A !== "" && (x.tmp.group_context.tip.term_intended = !0), c.UPDATE_GROUP_CONTEXT_CONDITION(x, A, null, this), !x.tmp.term_predecessor && !(x.opt.class === "in-text" && x.tmp.area === "citation") ? H = c.Output.Formatters["capitalize-first"](x, A) : H = A, x.tmp.strip_periods)
13063
- H = H.replace(/\./g, "");
13069
+ var U;
13070
+ if (A !== "" && (x.tmp.group_context.tip.term_intended = !0), c.UPDATE_GROUP_CONTEXT_CONDITION(x, A, null, this), !x.tmp.term_predecessor && !(x.opt.class === "in-text" && x.tmp.area === "citation") ? U = c.Output.Formatters["capitalize-first"](x, A) : U = A, x.tmp.strip_periods)
13071
+ U = U.replace(/\./g, "");
13064
13072
  else
13065
13073
  for (var _ = 0, C = this.decorations.length; _ < C; _ += 1)
13066
13074
  if (this.decorations[_][0] === "@strip-periods" && this.decorations[_][1] === "true") {
13067
- H = H.replace(/\./g, "");
13075
+ U = U.replace(/\./g, "");
13068
13076
  break;
13069
13077
  }
13070
- x.output.append(H, this), x.tmp.can_block_substitute && x.tmp.can_substitute.replace(!1, c.LITERAL);
13078
+ x.output.append(U, this), x.tmp.can_block_substitute && x.tmp.can_substitute.replace(!1, c.LITERAL);
13071
13079
  }, this.execs.push(i), e.build.term = !1, e.build.form = !1, e.build.plural = !1;
13072
13080
  else if (this.variables_real.length) {
13073
13081
  if (i = function(x, k) {
@@ -13087,15 +13095,15 @@ c.Node.text = {
13087
13095
  if (this.variables[0] && (O = x.getVariable(k, this.variables[0], n), O))
13088
13096
  if (this.variables[0] === "URL" && n === "short" && (O = O.replace(/(.*\.[^\/]+)\/.*/, "$1"), O.match(/\/\/www\./) && (O = O.replace(/https?:\/\//, ""))), x.opt.development_extensions.wrap_url_and_doi)
13089
13097
  if (!this.decorations.length || this.decorations[0][0] !== "@" + this.variables[0]) {
13090
- var A = c.Util.cloneToken(this), H = new c.Blob(null, null, "url-wrapper");
13091
- if (H.decorations.push(["@DOI", "true"]), this.variables_real[0] === "DOI") {
13098
+ var A = c.Util.cloneToken(this), U = new c.Blob(null, null, "url-wrapper");
13099
+ if (U.decorations.push(["@DOI", "true"]), this.variables_real[0] === "DOI") {
13092
13100
  var _;
13093
13101
  this.strings.prefix && this.strings.prefix.match(/^.*https:\/\/doi\.org\/$/) && (O = O.replace(/^https?:\/\/doi\.org\//, ""), O.match(/^https?:\/\//) ? _ = "" : _ = "https://doi.org/", A.strings.prefix = this.strings.prefix.slice(0, A.strings.prefix.length - 16));
13094
13102
  var C = new c.Blob(_), R = new c.Blob(O);
13095
- H.push(C), H.push(R), x.output.append(H, A, !1, !1, !0);
13103
+ U.push(C), U.push(R), x.output.append(U, A, !1, !1, !0);
13096
13104
  } else {
13097
13105
  var R = new c.Blob(O);
13098
- H.push(R), x.output.append(H, A, !1, !1, !0);
13106
+ U.push(R), x.output.append(U, A, !1, !1, !0);
13099
13107
  }
13100
13108
  } else
13101
13109
  x.output.append(O, this, !1, !1, !0);
@@ -14005,7 +14013,7 @@ c.Parallel.prototype.StartCitation = function(e, t) {
14005
14013
  for (var m = 0, g = r.length; m < g; m++) {
14006
14014
  var A = e[r[m][0]][0].id;
14007
14015
  this.state.registry.registry[A].master = !0, this.state.registry.registry[A].siblings = [];
14008
- for (var H = r[m][0], _ = r[m][1], C = H; C < _; C++) {
14016
+ for (var U = r[m][0], _ = r[m][1], C = U; C < _; C++) {
14009
14017
  this.state.tmp.suppress_repeats[C].SIBLING = !0;
14010
14018
  var R = e[C + 1][0].id;
14011
14019
  e[C + 1][1].parallel = "other", this.state.registry.registry[A].siblings.push(R);
@@ -14092,9 +14100,9 @@ c.Transform = function(e) {
14092
14100
  var A = !1;
14093
14101
  if (k === "jurisdiction" && O && (A = O.indexOf(":") === -1), ["jurisdiction", "country"].indexOf(h) > -1 && g === g.toLowerCase() && (O = g.toUpperCase()), f.sys.getAbbreviation) {
14094
14102
  ["jurisdiction", "country", "language-name", "language-name-original"].indexOf(k) > -1 ? x = "default" : p.jurisdiction ? x = p.jurisdiction : x = "default";
14095
- var H = f.transform.loadAbbreviation(x, y, O, p.language);
14096
- if (f.transform.abbrevs[H][y] && O) {
14097
- var _ = f.transform.abbrevs[H][y][O];
14103
+ var U = f.transform.loadAbbreviation(x, y, O, p.language);
14104
+ if (f.transform.abbrevs[U][y] && O) {
14105
+ var _ = f.transform.abbrevs[U][y][O];
14098
14106
  d.strings.form === "short" && _ ? A ? b = "" : b = _ : b = t(k, O, A);
14099
14107
  }
14100
14108
  }
@@ -14118,7 +14126,7 @@ c.Transform = function(e) {
14118
14126
  };
14119
14127
  var A = !1;
14120
14128
  c.VARIABLES_WITH_SHORT_FORM.indexOf(d) > -1 && h && (d = d + "-short", A = !0);
14121
- var H = !1, _ = null, C = [];
14129
+ var U = !1, _ = null, C = [];
14122
14130
  d.slice(-6) === "-short" ? (C.push(d), C.push(d.slice(0, -6))) : C.push(d);
14123
14131
  for (var R = 0, L = C.length; R < L; R++) {
14124
14132
  var W = !1, d = C[R];
@@ -14135,14 +14143,14 @@ c.Transform = function(e) {
14135
14143
  }
14136
14144
  !y.name && m && (y = { name: f[d], usedOrig: !0, locale: n(f, d) }, O = !0);
14137
14145
  }
14138
- if (y.token = c.Util.cloneToken(this), R === 0 ? (W && (y.found_variant_ok = !0), _ = y, !A && (typeof x > "u" || x.length === 0) && (H = !0), W && (H = !0)) : !A && !W && _ ? (y = _, d = C[0]) : W && (y.found_variant_ok = !0), ["title", "container-title"].indexOf(d) > -1 && !k && (!y.token.strings["text-case"] || y.token.strings["text-case"] === "sentence" || y.token.strings["text-case"] === "normal")) {
14146
+ if (y.token = c.Util.cloneToken(this), R === 0 ? (W && (y.found_variant_ok = !0), _ = y, !A && (typeof x > "u" || x.length === 0) && (U = !0), W && (U = !0)) : !A && !W && _ ? (y = _, d = C[0]) : W && (y.found_variant_ok = !0), ["title", "container-title"].indexOf(d) > -1 && !k && (!y.token.strings["text-case"] || y.token.strings["text-case"] === "sentence" || y.token.strings["text-case"] === "normal")) {
14139
14147
  e.opt.lang;
14140
14148
  var q;
14141
14149
  O ? q = !1 : q = y.locale;
14142
14150
  var J = d.slice(0, -5), F = y.token.strings["text-case"] === "sentence";
14143
14151
  y.name = c.titlecaseSentenceOrNormal(e, f, J, q, F), delete y.token.strings["text-case"];
14144
14152
  }
14145
- if (H)
14153
+ if (U)
14146
14154
  break;
14147
14155
  }
14148
14156
  return y;
@@ -14185,7 +14193,7 @@ c.Transform = function(e) {
14185
14193
  function u(f, d, p, m) {
14186
14194
  var g, h = c.LangPrefsMap[f[0]];
14187
14195
  return h ? g = e.opt["cite-lang-prefs"][h] : g = !1, function(v, b, y) {
14188
- var x, k, O, A, H, _, Q;
14196
+ var x, k, O, A, U, _, Q;
14189
14197
  if (!f[0] || !b[f[0]] && !b[m] || !v.tmp.just_looking && y && y["suppress-author"] && !v.tmp.probably_rendered_something && v.tmp.can_substitute.length() > 1)
14190
14198
  return null;
14191
14199
  var C = { primary: !1, secondary: !1, tertiary: !1 };
@@ -14205,16 +14213,16 @@ c.Transform = function(e) {
14205
14213
  var Q = P.token, q = P.usedOrig;
14206
14214
  if (d && !P.found_variant_ok && (x = i(v, Q, b, m, x, d, !0), x && (o(b, x), v.tmp.just_looking || (x = l(b.jurisdiction, x)))), s(this, b, x, d))
14207
14215
  return v.tmp.lang_array = V, null;
14208
- O = !1, H = !1;
14216
+ O = !1, U = !1;
14209
14217
  var J, F;
14210
- C.secondary && (P = r.call(this, b, f[0], C.secondary, !1, P.usedOrig, null, d), O = P.name, A = P.locale, J = P.token, d && !P.found_variant_ok && O && (O = i(v, J, b, !1, O, d, !0))), C.tertiary && (P = r.call(this, b, f[0], C.tertiary, !1, P.usedOrig, null, d), H = P.name, _ = P.locale, F = P.token, d && !P.found_variant_ok && H && (H = i(v, F, b, !1, H, d, !0)));
14218
+ C.secondary && (P = r.call(this, b, f[0], C.secondary, !1, P.usedOrig, null, d), O = P.name, A = P.locale, J = P.token, d && !P.found_variant_ok && O && (O = i(v, J, b, !1, O, d, !0))), C.tertiary && (P = r.call(this, b, f[0], C.tertiary, !1, P.usedOrig, null, d), U = P.name, _ = P.locale, F = P.token, d && !P.found_variant_ok && U && (U = i(v, F, b, !1, U, d, !0)));
14211
14219
  var ne;
14212
14220
  if (C.primary === "locale-translit" && (ne = v.opt.citeAffixes[h][C.primary].prefix), ne === "<i>" && f[0] === "title" && !q) {
14213
14221
  for (var G = !1, L = 0, W = Q.decorations.length; L < W; L += 1)
14214
14222
  Q.decorations[L][0] === "@font-style" && Q.decorations[L][1] === "italic" && (G = !0);
14215
14223
  G || Q.decorations.push(["@font-style", "italic"]);
14216
14224
  }
14217
- if (k !== "en" && Q.strings["text-case"] === "title" && (Q.strings["text-case"] = "passthrough"), f[0] === "title" && (x = c.demoteNoiseWords(v, x, this["leading-noise-words"])), O || H) {
14225
+ if (k !== "en" && Q.strings["text-case"] === "title" && (Q.strings["text-case"] = "passthrough"), f[0] === "title" && (x = c.demoteNoiseWords(v, x, this["leading-noise-words"])), O || U) {
14218
14226
  if (v.output.openLevel("empty"), Q.strings.suffix = Q.strings.suffix.replace(/[ .,]+$/, ""), k && (v.tmp.lang_array = [k].concat(V)), c.UPDATE_GROUP_CONTEXT_CONDITION(v, null, null, Q, Q.strings.prefix + x), v.output.append(x, Q), v.tmp.probably_rendered_something = !0, x === O && (O = !1), O) {
14219
14227
  J.strings.prefix = v.opt.citeAffixes[h][C.secondary].prefix, J.strings.suffix = v.opt.citeAffixes[h][C.secondary].suffix, J.strings.prefix || (J.strings.prefix = " ");
14220
14228
  for (var L = J.decorations.length - 1; L > -1; L += -1)
@@ -14223,13 +14231,13 @@ c.Transform = function(e) {
14223
14231
  var z = new c.Token();
14224
14232
  z.decorations.push(["@font-style", "normal"]), z.decorations.push(["@font-weight", "normal"]), v.output.openLevel(z), v.output.append(O, J), v.output.closeLevel(), v.output.current.value(), v.output.current.value().blobs.length - 1;
14225
14233
  }
14226
- if (x === H && (H = !1), H) {
14234
+ if (x === U && (U = !1), U) {
14227
14235
  F.strings.prefix = v.opt.citeAffixes[h][C.tertiary].prefix, F.strings.suffix = v.opt.citeAffixes[h][C.tertiary].suffix, F.strings.prefix || (F.strings.prefix = " ");
14228
14236
  for (var L = F.decorations.length - 1; L > -1; L += -1)
14229
14237
  ["@quotes/true", "@font-style/italic", "@font-style/oblique", "@font-weight/bold"].indexOf(F.decorations[L].join("/")) > -1 && (F.decorations = F.decorations.slice(0, L).concat(F.decorations.slice(L + 1)));
14230
14238
  _ !== "en" && F.strings["text-case"] === "title" && (F.strings["text-case"] = "passthrough"), _ && (v.tmp.lang_array = [_].concat(V));
14231
- var j = new c.Token();
14232
- j.decorations.push(["@font-style", "normal"]), j.decorations.push(["@font-weight", "normal"]), v.output.openLevel(j), v.output.append(H, F), v.output.closeLevel(), v.output.current.value(), v.output.current.value().blobs.length - 1;
14239
+ var H = new c.Token();
14240
+ H.decorations.push(["@font-style", "normal"]), H.decorations.push(["@font-weight", "normal"]), v.output.openLevel(H), v.output.append(U, F), v.output.closeLevel(), v.output.current.value(), v.output.current.value().blobs.length - 1;
14233
14241
  }
14234
14242
  v.output.closeLevel();
14235
14243
  } else
@@ -14733,30 +14741,30 @@ c.Engine.prototype.processNumber = function(e, t, i) {
14733
14741
  d === p && (p = "&");
14734
14742
  function m(z) {
14735
14743
  z = z.trim();
14736
- var j = z.match(/^([^ ]+)/);
14737
- if (j && !c.STATUTE_SUBDIV_STRINGS[j[1]]) {
14744
+ var H = z.match(/^([^ ]+)/);
14745
+ if (H && !c.STATUTE_SUBDIV_STRINGS[H[1]]) {
14738
14746
  var $ = null;
14739
14747
  ["locator", "locator-extra", "page"].indexOf(i) > -1 ? t.label ? $ = c.STATUTE_SUBDIV_STRINGS_REVERSE[t.label] : $ = "p." : $ = c.STATUTE_SUBDIV_STRINGS_REVERSE[i], $ && (z = $ + " " + z);
14740
14748
  }
14741
14749
  return z;
14742
14750
  }
14743
- function g(z, j, $, pe, ce) {
14751
+ function g(z, H, $, pe, ce) {
14744
14752
  pe = pe || "";
14745
14753
  var ae = {};
14746
- if (!j && !c.STATUTE_SUBDIV_STRINGS_REVERSE[i] && (j = "var:" + i), j) {
14747
- var le = j.match(/(\s*)([^\s]+)(\s*)/);
14754
+ if (!H && !c.STATUTE_SUBDIV_STRINGS_REVERSE[i] && (H = "var:" + i), H) {
14755
+ var le = H.match(/(\s*)([^\s]+)(\s*)/);
14748
14756
  a === "page" && ce === 0 && ["p.", "pp."].indexOf(le[2]) === -1 ? (ae.gotosleepability = !0, ae.labelVisibility = !0) : ae.labelVisibility = !1, ae.label = le[2], ae.origLabel = z, ae.labelSuffix = le[3] ? le[3] : "", ae.plural = 0;
14749
14757
  }
14750
14758
  var le = $.match(/^([0-9]*[a-zA-Z]+0*)?([0-9]+(?:[a-zA-Z]*|[-,a-zA-Z]+))$/);
14751
14759
  return le ? (ae.particle = le[1] ? le[1] : "", ae.value = le[2]) : (ae.particle = "", ae.value = $), ae.joiningSuffix = pe.replace(/\s*-\s*/, "-"), ae;
14752
14760
  }
14753
14761
  function h(z) {
14754
- for (var j = z.length - 2; j > -1; j -= 2)
14755
- z[j] === "-" && z[j - 1].match(/^(?:(?:[a-z]|[a-z][a-z]|[a-z][a-z][a-z]|[a-z][a-z][a-z][a-z])\. *)*[0-9]+[,a-zA-Z]+$/) && z[j + 1].match(/^[,a-zA-Z]+$/) && (z[j - 1] = z.slice(j - 1, j + 2).join(""), z = z.slice(0, j).concat(z.slice(j + 2)));
14762
+ for (var H = z.length - 2; H > -1; H -= 2)
14763
+ z[H] === "-" && z[H - 1].match(/^(?:(?:[a-z]|[a-z][a-z]|[a-z][a-z][a-z]|[a-z][a-z][a-z][a-z])\. *)*[0-9]+[,a-zA-Z]+$/) && z[H + 1].match(/^[,a-zA-Z]+$/) && (z[H - 1] = z.slice(H - 1, H + 2).join(""), z = z.slice(0, H).concat(z.slice(H + 2)));
14756
14764
  return z;
14757
14765
  }
14758
- function v(z, j) {
14759
- j = j || "", z = m(z);
14766
+ function v(z, H) {
14767
+ H = H || "", z = m(z);
14760
14768
  var $, pe, ce;
14761
14769
  if (i === "page" && z.indexOf("–") > -1 && (z = z.replace(/\u2013/g, "-")), z.indexOf("\\-") > -1) {
14762
14770
  $ = new RegExp(u.source.replace("\\-", "")), pe = new RegExp(f.source.replace("\\-", ""));
@@ -14782,7 +14790,7 @@ c.Engine.prototype.processNumber = function(e, t, i) {
14782
14790
  }
14783
14791
  } else
14784
14792
  var E = [ce];
14785
- for (var be = [], He = j, Fe = "", le = 0, ee = E.length; le < ee; le += 2) {
14793
+ for (var be = [], He = H, Fe = "", le = 0, ee = E.length; le < ee; le += 2) {
14786
14794
  var X = E[le].match(/((?:^| )(?:[a-z]|[a-z][a-z]|[a-z][a-z][a-z]|[a-z][a-z][a-z][a-z]|subpara|subch|amend|bibliog|annot|illus|princ|intro|sched|subdiv|subsec)(?:\.| ) *)/g);
14787
14795
  if (X) {
14788
14796
  for (var ae = E[le].split(/(?:(?:^| )(?:[a-z]|[a-z][a-z]|[a-z][a-z][a-z]|[a-z][a-z][a-z][a-z]|subpara|subch|amend|bibliog|annot|illus|princ|intro|sched|subdiv|subsec)(?:\.| ) *)/), xe = ae.length - 1; xe > 0; xe--)
@@ -14804,110 +14812,110 @@ c.Engine.prototype.processNumber = function(e, t, i) {
14804
14812
  return be;
14805
14813
  }
14806
14814
  function b(z) {
14807
- for (var j = 0, $ = z.length - 1; j < $; j++)
14808
- !z[j].joiningSuffix && z[j + 1].label && (z[j].joiningSuffix = " ");
14815
+ for (var H = 0, $ = z.length - 1; H < $; H++)
14816
+ !z[H].joiningSuffix && z[H + 1].label && (z[H].joiningSuffix = " ");
14809
14817
  }
14810
- function y(z, j, $) {
14811
- var pe = z[$.pos], ce = z[j].value, ae = pe.joiningSuffix === "\\-";
14818
+ function y(z, H, $) {
14819
+ var pe = z[$.pos], ce = z[H].value, ae = pe.joiningSuffix === "\\-";
14812
14820
  ce.particle && ce.particle !== pe.particle && ($.collapsible = !1);
14813
14821
  var le = ce.match(/^[0-9]+([-,:a-zA-Z]*)$/), ee = pe.value.match(/^(?:[0-9]+|[ixv]+)([-,:a-zA-Z]*|\-[\-0-9]+)$/);
14814
- if ((!ce || !le || !ee || ae) && ($.collapsible = !1, (!ce || !ee) && ($.numeric = !1), ae && $.count--), (le && le[1] || ee && ee[1]) && ($.collapsible = !1), z[j].collapsible === void 0) {
14815
- for (var E = j, X = j + $.count; E < X; E++)
14822
+ if ((!ce || !le || !ee || ae) && ($.collapsible = !1, (!ce || !ee) && ($.numeric = !1), ae && $.count--), (le && le[1] || ee && ee[1]) && ($.collapsible = !1), z[H].collapsible === void 0) {
14823
+ for (var E = H, X = H + $.count; E < X; E++)
14816
14824
  isNaN(parseInt(z[E].value)) && !z[E].value.match(/^[ivxlcmIVXLCM]+$/) ? z[E].collapsible = !1 : z[E].collapsible = !0;
14817
- $.collapsible = z[j].collapsible;
14825
+ $.collapsible = z[H].collapsible;
14818
14826
  }
14819
14827
  for (var oe = $.collapsible, E = $.pos, X = $.pos + $.count; E < X; E++)
14820
14828
  $.count > 1 && oe && (z[E].plural = 1), z[E].numeric = $.numeric, z[E].collapsible = $.collapsible;
14821
14829
  }
14822
- function x(z, j, $) {
14830
+ function x(z, H, $) {
14823
14831
  $.label.slice(0, 4) !== "var:" && ($.pos === 0 ? (["locator", "number", "locator-extra", "page"].indexOf(i) > -1 && typeof r.getTerm(c.STATUTE_SUBDIV_STRINGS[$.label]) > "u" && (z[$.pos].labelVisibility = !0), ["locator", "number", "locator-extra", "page"].indexOf(i) === -1 && c.STATUTE_SUBDIV_STRINGS[$.label] !== i && (z[0].labelVisibility = !0)) : z[$.pos].labelVisibility = !0);
14824
14832
  }
14825
14833
  function k(z) {
14826
14834
  if (z.length !== 0) {
14827
- for (var j = 0, $ = 1, pe = 1, ce = z.length; pe < ce; pe++) {
14835
+ for (var H = 0, $ = 1, pe = 1, ce = z.length; pe < ce; pe++) {
14828
14836
  var ae = z[pe - 1], le = z[pe];
14829
14837
  if (ae.label === le.label && ae.particle === ae.particle)
14830
14838
  $++;
14831
14839
  else {
14832
- var ee = JSON.parse(JSON.stringify(z[j]));
14833
- ee.pos = j, ee.count = $, ee.numeric = !0, y(z, j, ee), ae.label !== le.label && x(z, j, ee), j = pe, $ = 1;
14840
+ var ee = JSON.parse(JSON.stringify(z[H]));
14841
+ ee.pos = H, ee.count = $, ee.numeric = !0, y(z, H, ee), ae.label !== le.label && x(z, H, ee), H = pe, $ = 1;
14834
14842
  }
14835
14843
  }
14836
- var ee = JSON.parse(JSON.stringify(z[j]));
14837
- ee.pos = j, ee.count = $, ee.numeric = !0, y(z, j, ee), x(z, j, ee), z.length && z[0].numeric && i.slice(0, 10) === "number-of-" && parseInt(t[a], 10) > 1 && (z[0].plural = 1);
14844
+ var ee = JSON.parse(JSON.stringify(z[H]));
14845
+ ee.pos = H, ee.count = $, ee.numeric = !0, y(z, H, ee), x(z, H, ee), z.length && z[0].numeric && i.slice(0, 10) === "number-of-" && parseInt(t[a], 10) > 1 && (z[0].plural = 1);
14838
14846
  }
14839
14847
  }
14840
14848
  function O(z) {
14841
14849
  return z.replace("\\-", "-");
14842
14850
  }
14843
14851
  function A(z) {
14844
- var j = c.Util.cloneToken(e), $ = new c.Token();
14845
- r.tmp.just_looking || ($.decorations = j.decorations, j.decorations = [], $.strings.prefix = j.strings.prefix, j.strings.prefix = "", $.strings.suffix = j.strings.suffix, j.strings.suffix = "");
14852
+ var H = c.Util.cloneToken(e), $ = new c.Token();
14853
+ r.tmp.just_looking || ($.decorations = H.decorations, H.decorations = [], $.strings.prefix = H.strings.prefix, H.strings.prefix = "", $.strings.suffix = H.strings.suffix, H.strings.suffix = "");
14846
14854
  var pe = z.length ? z[0].label : null;
14847
14855
  if (z.length) {
14848
14856
  for (var ce = 0, ae = z.length; ce < ae; ce++) {
14849
- var le = z[ce], ee = c.Util.cloneToken(j);
14857
+ var le = z[ce], ee = c.Util.cloneToken(H);
14850
14858
  ee.gender = e.gender, pe === le.label && (ee.formatter = e.formatter), le.numeric && (ee.successor_prefix = le.successor_prefix), ee.strings.suffix = ee.strings.suffix + O(le.joiningSuffix), le.styling = ee;
14851
14859
  }
14852
14860
  r.tmp.just_looking || z[0].value.slice(0, 1) === '"' && z[z.length - 1].value.slice(-1) === '"' && (z[0].value = z[0].value.slice(1), z[z.length - 1].value = z[z.length - 1].value.slice(0, -1), $.decorations.push(["@quotes", !0]));
14853
14861
  }
14854
14862
  return $;
14855
14863
  }
14856
- function H(z, j) {
14864
+ function U(z, H) {
14857
14865
  var $ = !0;
14858
14866
  if (["locator", "locator-extra", "page"].indexOf(z) > -1) {
14859
14867
  var pe;
14860
- j.origLabel ? pe = j.origLabel : pe = j.label, $ = !!r.getTerm(c.STATUTE_SUBDIV_STRINGS[pe]);
14868
+ H.origLabel ? pe = H.origLabel : pe = H.label, $ = !!r.getTerm(c.STATUTE_SUBDIV_STRINGS[pe]);
14861
14869
  }
14862
14870
  return $;
14863
14871
  }
14864
- function _(z, j) {
14865
- return z === "page" || ["locator", "locator-extra"].indexOf(z) > -1 && (["p."].indexOf(j.label) > -1 || ["p."].indexOf(j.origLabel) > -1);
14872
+ function _(z, H) {
14873
+ return z === "page" || ["locator", "locator-extra"].indexOf(z) > -1 && (["p."].indexOf(H.label) > -1 || ["p."].indexOf(H.origLabel) > -1);
14866
14874
  }
14867
- function C(z, j, $, pe) {
14868
- var ce = _(z, j), ae = H(z, j);
14875
+ function C(z, H, $, pe) {
14876
+ var ce = _(z, H), ae = U(z, H);
14869
14877
  return ae && $ === "-" && pe && ((ce || ["locator", "locator-extra", "issue", "volume", "edition", "number"].indexOf(z) > -1) && ($ = r.getTerm("page-range-delimiter"), $ || ($ = "–")), z === "collection-number" && ($ = r.getTerm("year-range-delimiter"), $ || ($ = "–"))), $;
14870
14878
  }
14871
- function R(z, j, $) {
14872
- if (!(j < 1) && $.count === 2 && z[j - 1].particle === z[j].particle) {
14873
- if (z[j - 1].joiningSuffix !== "-") {
14879
+ function R(z, H, $) {
14880
+ if (!(H < 1) && $.count === 2 && z[H - 1].particle === z[H].particle) {
14881
+ if (z[H - 1].joiningSuffix !== "-") {
14874
14882
  $.count = 1;
14875
14883
  return;
14876
14884
  }
14877
- if (!r.opt["page-range-format"] && parseInt(z[j - 1].value, 10) > parseInt(z[j].value, 10)) {
14878
- z[j - 1].joiningSuffix = C(i, z[j], z[j - 1].joiningSuffix, !0);
14885
+ if (!r.opt["page-range-format"] && parseInt(z[H - 1].value, 10) > parseInt(z[H].value, 10)) {
14886
+ z[H - 1].joiningSuffix = C(i, z[H], z[H - 1].joiningSuffix, !0);
14879
14887
  return;
14880
14888
  }
14881
- var pe = z[j], ce = _(i, pe), ae;
14882
- ce && !isNaN(parseInt(z[j - 1].value)) && !isNaN(parseInt(z[j].value)) ? (ae = z[j - 1].particle + z[j - 1].value + " - " + z[j].particle + z[j].value, ae = r.fun.page_mangler(ae)) : (("" + z[j - 1].value).match(/^([0-9]+|[ivxlcmIVXLCM]+)$/) && ("" + z[j].value).match(/^([0-9]+|[ivxlcmIVXLCM]+)$/) && (z[j - 1].joiningSuffix = r.getTerm("page-range-delimiter")), ae = z[j - 1].value + O(z[j - 1].joiningSuffix) + z[j].value);
14889
+ var pe = z[H], ce = _(i, pe), ae;
14890
+ ce && !isNaN(parseInt(z[H - 1].value)) && !isNaN(parseInt(z[H].value)) ? (ae = z[H - 1].particle + z[H - 1].value + " - " + z[H].particle + z[H].value, ae = r.fun.page_mangler(ae)) : (("" + z[H - 1].value).match(/^([0-9]+|[ivxlcmIVXLCM]+)$/) && ("" + z[H].value).match(/^([0-9]+|[ivxlcmIVXLCM]+)$/) && (z[H - 1].joiningSuffix = r.getTerm("page-range-delimiter")), ae = z[H - 1].value + O(z[H - 1].joiningSuffix) + z[H].value);
14883
14891
  var le = ae.match(/^((?:[0-9]*[a-zA-Z]+0*))?([0-9]+[a-z]*)(\s*[^0-9]+\s*)([-,a-zA-Z]?0*)([0-9]+[a-z]*)$/);
14884
14892
  if (le) {
14885
14893
  var ee = le[3];
14886
- ee = C(i, pe, ee, z[j].numeric), z[j - 1].particle = le[1], z[j - 1].value = le[2], z[j - 1].joiningSuffix = ee, z[j].particle = le[4], z[j].value = le[5];
14894
+ ee = C(i, pe, ee, z[H].numeric), z[H - 1].particle = le[1], z[H - 1].value = le[2], z[H - 1].joiningSuffix = ee, z[H].particle = le[4], z[H].value = le[5];
14887
14895
  }
14888
14896
  $.count = 0;
14889
14897
  }
14890
14898
  }
14891
14899
  function L(z) {
14892
14900
  if (e && ["page", "chapter-number", "collection-number", "edition", "issue", "number", "number-of-pages", "number-of-volumes", "volume", "locator", "locator-extra"].indexOf(i) !== -1) {
14893
- for (var j = {
14901
+ for (var H = {
14894
14902
  count: 0,
14895
14903
  label: null
14896
14904
  }, $ = 0, pe = z.length; $ < pe; $++) {
14897
14905
  var ce = z[$];
14898
14906
  if (ce.collapsible)
14899
- j.label === ce.label && ce.joiningSuffix === "-" ? j.count = 1 : j.label === ce.label && ce.joiningSuffix !== "-" ? (j.count++, j.count === 2 && R(z, $, j)) : j.label !== ce.label ? (j.label = ce.label, j.count = 1) : (j.count = 1, j.label = ce.label);
14907
+ H.label === ce.label && ce.joiningSuffix === "-" ? H.count = 1 : H.label === ce.label && ce.joiningSuffix !== "-" ? (H.count++, H.count === 2 && R(z, $, H)) : H.label !== ce.label ? (H.label = ce.label, H.count = 1) : (H.count = 1, H.label = ce.label);
14900
14908
  else {
14901
- j.count = 0, j.label = null;
14909
+ H.count = 0, H.label = null;
14902
14910
  var ae = ce.numeric;
14903
14911
  ce.joiningSuffix = C(i, ce, ce.joiningSuffix, ae);
14904
14912
  }
14905
14913
  }
14906
- j.count === 2 && R(z, z.length - 1, j);
14914
+ H.count === 2 && R(z, z.length - 1, H);
14907
14915
  }
14908
14916
  }
14909
- function W(z, j, $) {
14910
- var pe = z[j];
14917
+ function W(z, H, $) {
14918
+ var pe = z[H];
14911
14919
  $.length && (pe.numeric = $[0].numeric, pe.collapsible = $[0].collapsible, pe.plural = $[0].plural, pe.label = c.STATUTE_SUBDIV_STRINGS[$[0].label], i === "number" && pe.label === "issue" && r.getTerm("number") && (pe.label = "number"));
14912
14920
  }
14913
14921
  if (e && this.tmp.shadow_numbers[a] && this.tmp.shadow_numbers[a].values.length) {
@@ -14983,29 +14991,29 @@ c.Util.PageRangeMangler.getFunction = function(e, t) {
14983
14991
  i = /([0-9]*[a-zA-Z]+0*)?([0-9]+[a-z]*)\s*(?:\u2013|-)\s*([0-9]*[a-zA-Z]+0*)?([0-9]+[a-z]*)/, a = function(A) {
14984
14992
  for (r = A.length, n = 1; n < r; n += 2)
14985
14993
  typeof A[n] == "object" && (A[n] = A[n].join(""));
14986
- var H = A.join("");
14987
- return H = H.replace(/([^\\])\-/g, "$1" + e.getTerm(t + "-range-delimiter")), H;
14994
+ var U = A.join("");
14995
+ return U = U.replace(/([^\\])\-/g, "$1" + e.getTerm(t + "-range-delimiter")), U;
14988
14996
  }, s = function(A) {
14989
- var H, _, C, R = "\\s+\\-\\s+", L = k === "-" ? "" : k, W = new RegExp("([^\\\\])[-" + L + "\\u2013]", "g");
14997
+ var U, _, C, R = "\\s+\\-\\s+", L = k === "-" ? "" : k, W = new RegExp("([^\\\\])[-" + L + "\\u2013]", "g");
14990
14998
  A = A.replace(W, "$1 - ").replace(/\s+-\s+/g, " - ");
14991
14999
  var V = new RegExp("((?:[0-9]*[a-zA-Z]+0*)?[0-9]+[a-z]*" + R + "(?:[0-9]*[a-zA-Z]+0*)?[0-9]+[a-z]*)", "g"), P = new RegExp("(?:[0-9]*[a-zA-Z]+0*)?[0-9]+[a-z]*" + R + "(?:[0-9]*[a-zA-Z]+0*)?[0-9]+[a-z]*");
14992
- if (H = A.match(V), _ = A.split(P), _.length === 0)
14993
- C = H;
15000
+ if (U = A.match(V), _ = A.split(P), _.length === 0)
15001
+ C = U;
14994
15002
  else
14995
15003
  for (C = [_[0]], n = 1, r = _.length; n < r; n += 1)
14996
- C.push(H[n - 1].replace(/\s*\-\s*/g, "-")), C.push(_[n]);
15004
+ C.push(U[n - 1].replace(/\s*\-\s*/g, "-")), C.push(_[n]);
14997
15005
  return C;
14998
15006
  }, o = function(A) {
14999
15007
  for (A = "" + A, p = s(A), r = p.length, n = 1; n < r; n += 2)
15000
15008
  m = p[n].match(i), m && (!m[3] || m[1] === m[3]) && (m[4].length < m[2].length && (m[4] = m[2].slice(0, m[2].length - m[4].length) + m[4]), parseInt(m[2], 10) < parseInt(m[4], 10) && (m[3] = k + (m[1] ? m[1] : ""), p[n] = m.slice(1))), typeof p[n] == "string" && (p[n] = p[n].replace(/\-/g, k));
15001
15009
  return p;
15002
- }, l = function(A, H, _) {
15010
+ }, l = function(A, U, _) {
15003
15011
  r = A.length;
15004
15012
  for (var C = 1, R = A.length; C < R; C += 2)
15005
- typeof A[C] == "object" && (A[C][3] = u(A[C][1], A[C][3], H, _), A[C][2].slice(1) === A[C][0] && (A[C][2] = k));
15013
+ typeof A[C] == "object" && (A[C][3] = u(A[C][1], A[C][3], U, _), A[C][2].slice(1) === A[C][0] && (A[C][2] = k));
15006
15014
  return a(A);
15007
- }, u = function(A, H, _, C) {
15008
- if (_ || (_ = 0), g = ("" + A).split(""), h = ("" + H).split(""), v = h.slice(), v.reverse(), g.length === h.length)
15015
+ }, u = function(A, U, _, C) {
15016
+ if (_ || (_ = 0), g = ("" + A).split(""), h = ("" + U).split(""), v = h.slice(), v.reverse(), g.length === h.length)
15009
15017
  for (var R = 0, L = g.length; R < L; R += 1)
15010
15018
  if (g[R] === h[R] && v.length > _)
15011
15019
  v.pop();
@@ -15024,8 +15032,8 @@ c.Util.PageRangeMangler.getFunction = function(e, t) {
15024
15032
  }, d = function(A) {
15025
15033
  for (r = A.length, n = 1; n < r; n += 2) {
15026
15034
  if (typeof A[n] == "object" && (m = A[n], b = parseInt(m[1], 10), y = parseInt(m[3], 10), h = "" + y, b > 100 && b % 100))
15027
- for (var H = 2; H < h.length; H++) {
15028
- var _ = Math.pow(10, H);
15035
+ for (var U = 2; U < h.length; U++) {
15036
+ var _ = Math.pow(10, U);
15029
15037
  if (Math.floor(b / _) === Math.floor(y / _)) {
15030
15038
  m[3] = "" + y % _;
15031
15039
  break;
@@ -15035,18 +15043,18 @@ c.Util.PageRangeMangler.getFunction = function(e, t) {
15035
15043
  }
15036
15044
  return a(A);
15037
15045
  };
15038
- var O = function(A, H, _, C) {
15046
+ var O = function(A, U, _, C) {
15039
15047
  var L;
15040
15048
  A = "" + A;
15041
- var R = o(A), L = H(R, _, C);
15049
+ var R = o(A), L = U(R, _, C);
15042
15050
  return L;
15043
15051
  };
15044
15052
  return e.opt[t + "-range-format"] ? e.opt[t + "-range-format"] === "expanded" ? x = function(A) {
15045
15053
  return O(A, a);
15046
15054
  } : e.opt[t + "-range-format"] === "minimal" ? x = function(A) {
15047
15055
  return O(A, l);
15048
- } : e.opt[t + "-range-format"] === "minimal-two" ? x = function(A, H) {
15049
- return O(A, l, 2, H);
15056
+ } : e.opt[t + "-range-format"] === "minimal-two" ? x = function(A, U) {
15057
+ return O(A, l, 2, U);
15050
15058
  } : e.opt[t + "-range-format"] === "chicago" ? x = function(A) {
15051
15059
  return O(A, f);
15052
15060
  } : e.opt[t + "-range-format"] === "chicago-15" ? x = function(A) {
@@ -15182,8 +15190,8 @@ c.Util.FlipFlopper = function(e) {
15182
15190
  }
15183
15191
  function l(y) {
15184
15192
  for (var x = [], k = Object.keys(i), O = 0, A = k.length; O < A; O++) {
15185
- var H = k[O];
15186
- (i[y].type !== "quote" || !i[y]) && x.push(H);
15193
+ var U = k[O];
15194
+ (i[y].type !== "quote" || !i[y]) && x.push(U);
15187
15195
  }
15188
15196
  var _ = i[y];
15189
15197
  return _.opener = new RegExp("^(?:" + x.map(function(C) {
@@ -15200,8 +15208,8 @@ c.Util.FlipFlopper = function(e) {
15200
15208
  var y = [], x = [], k = {};
15201
15209
  for (var O in u)
15202
15210
  y.push(O), k[u[O].closer] = !0;
15203
- for (var A = Object.keys(k), H = 0, _ = A.length; H < _; H++) {
15204
- var C = A[H];
15211
+ for (var A = Object.keys(k), U = 0, _ = A.length; U < _; U++) {
15212
+ var C = A[U];
15205
15213
  x.push(C);
15206
15214
  }
15207
15215
  var R = y.concat(x).map(function(L) {
@@ -15258,7 +15266,7 @@ c.Util.FlipFlopper = function(e) {
15258
15266
  strings: [y],
15259
15267
  forcedSpaces: []
15260
15268
  };
15261
- for (var O = y.split(f.splitAll), A = 0, H = k.length - 1; A < H; A++)
15269
+ for (var O = y.split(f.splitAll), A = 0, U = k.length - 1; A < U; A++)
15262
15270
  i[k[A]] && (O[A + 1] === "" && ['"', "'"].indexOf(k[A + 1]) > -1 ? (k[A + 1] = " " + k[A + 1], x.push(!0)) : x.push(!1));
15263
15271
  return {
15264
15272
  tags: k,
@@ -15269,8 +15277,8 @@ c.Util.FlipFlopper = function(e) {
15269
15277
  var h = function(y) {
15270
15278
  var x = [];
15271
15279
  this.set = function(k) {
15272
- for (var O = i[k].attr, A = null, H = x.length - 1; H > -1; H--) {
15273
- var _ = x[H];
15280
+ for (var O = i[k].attr, A = null, U = x.length - 1; U > -1; U--) {
15281
+ var _ = x[U];
15274
15282
  if (_[0] === O) {
15275
15283
  A = _;
15276
15284
  break;
@@ -15279,8 +15287,8 @@ c.Util.FlipFlopper = function(e) {
15279
15287
  if (!A) {
15280
15288
  var C = [e[e.tmp.area].opt.layout_decorations].concat(y.alldecor);
15281
15289
  e:
15282
- for (var H = C.length - 1; H > -1; H--) {
15283
- var R = C[H];
15290
+ for (var U = C.length - 1; U > -1; U--) {
15291
+ var R = C[U];
15284
15292
  if (R)
15285
15293
  for (var L = R.length - 1; L > -1; L--) {
15286
15294
  var _ = R[L];
@@ -15309,7 +15317,7 @@ c.Util.FlipFlopper = function(e) {
15309
15317
  function b(y, x, k) {
15310
15318
  var O = !0, A = new h(y);
15311
15319
  y.blobs = [];
15312
- function H(V) {
15320
+ function U(V) {
15313
15321
  this.stack = [V], this.latest = V, this.addStyling = function(P, Q) {
15314
15322
  if (O && (P.slice(0, 1) === " " && (P = P.slice(1)), P.slice(0, 1) === " " && (P = P.slice(1)), O = !1), this.latest = this.stack[this.stack.length - 1], Q) {
15315
15323
  if (typeof this.latest.blobs == "string") {
@@ -15318,8 +15326,8 @@ c.Util.FlipFlopper = function(e) {
15318
15326
  }
15319
15327
  var J = new c.Token(), F = new c.Blob(null, J);
15320
15328
  if (F.alldecor = this.latest.alldecor.slice(), Q[0] === "@class" && Q[1] === "nodecor") {
15321
- for (var ne = [], G = {}, z = [e[e.tmp.area].opt.layout_decorations].concat(F.alldecor), j = z.length - 1; j > -1; j--) {
15322
- var $ = z[j];
15329
+ for (var ne = [], G = {}, z = [e[e.tmp.area].opt.layout_decorations].concat(F.alldecor), H = z.length - 1; H > -1; H--) {
15330
+ var $ = z[H];
15323
15331
  if ($)
15324
15332
  for (var pe = $.length - 1; pe > -1; pe--) {
15325
15333
  var ce = $[pe];
@@ -15341,7 +15349,7 @@ c.Util.FlipFlopper = function(e) {
15341
15349
  this.stack.pop();
15342
15350
  };
15343
15351
  }
15344
- var _ = new H(y);
15352
+ var _ = new U(y);
15345
15353
  if (x.strings.length) {
15346
15354
  var C = x.strings[0];
15347
15355
  k && (C = " " + C), _.addStyling(C);
@@ -15356,7 +15364,7 @@ c.Util.FlipFlopper = function(e) {
15356
15364
  O.slice(0, 1) === " " && !O.match(/^\s+[\'\"]/) && (x = !0);
15357
15365
  var k = new RegExp("(" + c.ROMANESQUE_REGEXP.source + ")’(" + c.ROMANESQUE_REGEXP.source + ")", "g"), O = " " + O.replace(k, "$1'$2"), A = g(O);
15358
15366
  if (A.tags.length !== 0) {
15359
- for (var H = !1, _ = 0, C = A.tags.length; _ < C; _++) {
15367
+ for (var U = !1, _ = 0, C = A.tags.length; _ < C; _++) {
15360
15368
  var R = A.tags[_], O = A.strings[_ + 1], L = v(R, O);
15361
15369
  if (L)
15362
15370
  A.strings[_ + 1] = L + A.strings[_ + 1], A.tags[_] = "";
@@ -15392,7 +15400,7 @@ c.Util.FlipFlopper = function(e) {
15392
15400
  A.tags[_] || (A.tags = A.tags.slice(0, _).concat(A.tags.slice(_ + 1)), A.strings[_] = A.strings[_] + A.strings[_ + 1], A.strings = A.strings.slice(0, _ + 1).concat(A.strings.slice(_ + 2)));
15393
15401
  for (var _ = 0, C = A.tags.length; _ < C; _++) {
15394
15402
  var R = A.tags[_], Q = A.forcedSpaces[_ - 1];
15395
- [' "', " '", '("', "('"].indexOf(R) > -1 && (H || (o(R), H = !0), Q || (A.strings[_] += R.slice(0, 1)));
15403
+ [' "', " '", '("', "('"].indexOf(R) > -1 && (U || (o(R), U = !0), Q || (A.strings[_] += R.slice(0, 1)));
15396
15404
  }
15397
15405
  b(y, A, x);
15398
15406
  }
@@ -15465,7 +15473,7 @@ c.Output.Formatters = function() {
15465
15473
  return k(q[1], Q);
15466
15474
  }
15467
15475
  h.doppel.strings.length && h.doppel.strings[0].trim() && (h.doppel.strings[0] = h.capitaliseWords(h.doppel.strings[0], 0, h.doppel.tags[0]));
15468
- for (var A = 0, H = h.doppel.tags.length; A < H; A++) {
15476
+ for (var A = 0, U = h.doppel.tags.length; A < U; A++) {
15469
15477
  var _ = h.doppel.tags[A], C = h.doppel.strings[A + 1];
15470
15478
  if (h.tagState !== null && (a[_] ? h.tagState.push(a[_]) : h.tagState.length && _ === h.tagState[h.tagState.length - 1] && h.tagState.pop()), h.afterPunct !== null && _.match(/[\!\?\:]$/) && (h.afterPunct = !0), h.tagState.length === 0 ? h.doppel.strings[A + 1] = h.capitaliseWords(C, A + 1, h.doppel, h.doppel.tags[A + 1]) : h.doppel.strings[A + 1].trim() && (h.lastWordPos = null), h.quoteState !== null) {
15471
15479
  var R = O(_, A);
@@ -15477,7 +15485,7 @@ c.Output.Formatters = function() {
15477
15485
  h.isFirst && C.trim() && (h.isFirst = !1), h.afterPunct && C.trim() && (h.afterPunct = !1);
15478
15486
  }
15479
15487
  if (h.quoteState)
15480
- for (var A = 0, H = h.quoteState.length; A < H; A++) {
15488
+ for (var A = 0, U = h.quoteState.length; A < U; A++) {
15481
15489
  var R = h.quoteState[A].pos;
15482
15490
  if (typeof R < "u") {
15483
15491
  var L = h.doppel.origStrings[R + 1].slice(0, 1);
@@ -15549,14 +15557,14 @@ c.Output.Formatters = function() {
15549
15557
  quoteState: [],
15550
15558
  capitaliseWords: function(y, x, k) {
15551
15559
  if (y.trim()) {
15552
- for (var O = r.split(y), A = O.strings, H = 0, _ = A.length; H < _; H++) {
15553
- var C = A[H];
15560
+ for (var O = r.split(y), A = O.strings, U = 0, _ = A.length; U < _; U++) {
15561
+ var C = A[U];
15554
15562
  if (!C)
15555
15563
  continue;
15556
15564
  let R = c.toLocaleLowerCase.call(h, C), L = !1;
15557
- (C.length > 1 && !R.match(b.skipWordsRex) || H === A.length - 1 && k === "-" || b.isFirst || b.afterPunct) && (L = !0), L && C === R && (A[H] = s.call(h, C)), b.afterPunct = !1, b.isFirst = !1, b.lastWordPos = {
15565
+ (C.length > 1 && !R.match(b.skipWordsRex) || U === A.length - 1 && k === "-" || b.isFirst || b.afterPunct) && (L = !0), L && C === R && (A[U] = s.call(h, C)), b.afterPunct = !1, b.isFirst = !1, b.lastWordPos = {
15558
15566
  strings: x,
15559
- words: H
15567
+ words: U
15560
15568
  };
15561
15569
  }
15562
15570
  y = r.join(O);
@@ -15575,9 +15583,9 @@ c.Output.Formatters = function() {
15575
15583
  quoteState: [],
15576
15584
  capitaliseWords: function(y) {
15577
15585
  for (var x = r.split(y), k = x.strings, O = 0, A = k.length; O < A; O++) {
15578
- var H = k[O];
15579
- if (H && b.isFirst) {
15580
- H === c.toLocaleLowerCase.call(h, H) && (k[O] = s.call(h, H)), b.isFirst = !1;
15586
+ var U = k[O];
15587
+ if (U && b.isFirst) {
15588
+ U === c.toLocaleLowerCase.call(h, U) && (k[O] = s.call(h, U)), b.isFirst = !1;
15581
15589
  break;
15582
15590
  }
15583
15591
  }
@@ -15595,8 +15603,8 @@ c.Output.Formatters = function() {
15595
15603
  quoteState: [],
15596
15604
  capitaliseWords: function(y) {
15597
15605
  for (var x = r.split(y), k = x.strings, O = 0, A = k.length; O < A; O++) {
15598
- var H = k[O];
15599
- H && H === c.toLocaleLowerCase.call(h, H) && (k[O] = s.call(h, H));
15606
+ var U = k[O];
15607
+ U && U === c.toLocaleLowerCase.call(h, U) && (k[O] = s.call(h, U));
15600
15608
  }
15601
15609
  return r.join(x);
15602
15610
  },
@@ -18465,7 +18473,7 @@ class Ne {
18465
18473
  found.
18466
18474
  */
18467
18475
  static findFrom(t, i, n = !1) {
18468
- let r = t.parent.inlineContent ? new Oe(t) : gn(t.node(0), t.parent, t.pos, t.index(), i, n);
18476
+ let r = t.parent.inlineContent ? new Ae(t) : gn(t.node(0), t.parent, t.pos, t.index(), i, n);
18469
18477
  if (r)
18470
18478
  return r;
18471
18479
  for (let a = t.depth - 1; a >= 0; a--) {
@@ -18532,7 +18540,7 @@ class Ne {
18532
18540
  returns the bookmark for that.
18533
18541
  */
18534
18542
  getBookmark() {
18535
- return Oe.between(this.$anchor, this.$head).getBookmark();
18543
+ return Ae.between(this.$anchor, this.$head).getBookmark();
18536
18544
  }
18537
18545
  }
18538
18546
  Ne.prototype.visible = !0;
@@ -18548,7 +18556,7 @@ let Rl = !1;
18548
18556
  function Dl(e) {
18549
18557
  !Rl && !e.parent.inlineContent && (Rl = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + e.parent.type.name + ")"));
18550
18558
  }
18551
- class Oe extends Ne {
18559
+ class Ae extends Ne {
18552
18560
  /**
18553
18561
  Construct a text selection between the given points.
18554
18562
  */
@@ -18567,7 +18575,7 @@ class Oe extends Ne {
18567
18575
  if (!n.parent.inlineContent)
18568
18576
  return Ne.near(n);
18569
18577
  let r = t.resolve(i.map(this.anchor));
18570
- return new Oe(r.parent.inlineContent ? r : n, n);
18578
+ return new Ae(r.parent.inlineContent ? r : n, n);
18571
18579
  }
18572
18580
  replace(t, i = de.empty) {
18573
18581
  if (super.replace(t, i), i == de.empty) {
@@ -18576,7 +18584,7 @@ class Oe extends Ne {
18576
18584
  }
18577
18585
  }
18578
18586
  eq(t) {
18579
- return t instanceof Oe && t.anchor == this.anchor && t.head == this.head;
18587
+ return t instanceof Ae && t.anchor == this.anchor && t.head == this.head;
18580
18588
  }
18581
18589
  getBookmark() {
18582
18590
  return new Ka(this.anchor, this.head);
@@ -18590,7 +18598,7 @@ class Oe extends Ne {
18590
18598
  static fromJSON(t, i) {
18591
18599
  if (typeof i.anchor != "number" || typeof i.head != "number")
18592
18600
  throw new RangeError("Invalid input for TextSelection.fromJSON");
18593
- return new Oe(t.resolve(i.anchor), t.resolve(i.head));
18601
+ return new Ae(t.resolve(i.anchor), t.resolve(i.head));
18594
18602
  }
18595
18603
  /**
18596
18604
  Create a text selection from non-resolved positions.
@@ -18616,10 +18624,10 @@ class Oe extends Ne {
18616
18624
  else
18617
18625
  return Ne.near(i, n);
18618
18626
  }
18619
- return t.parent.inlineContent || (r == 0 ? t = i : (t = (Ne.findFrom(t, -n, !0) || Ne.findFrom(t, n, !0)).$anchor, t.pos < i.pos != r < 0 && (t = i))), new Oe(t, i);
18627
+ return t.parent.inlineContent || (r == 0 ? t = i : (t = (Ne.findFrom(t, -n, !0) || Ne.findFrom(t, n, !0)).$anchor, t.pos < i.pos != r < 0 && (t = i))), new Ae(t, i);
18620
18628
  }
18621
18629
  }
18622
- Ne.jsonID("text", Oe);
18630
+ Ne.jsonID("text", Ae);
18623
18631
  class Ka {
18624
18632
  constructor(t, i) {
18625
18633
  this.anchor = t, this.head = i;
@@ -18628,10 +18636,10 @@ class Ka {
18628
18636
  return new Ka(t.map(this.anchor), t.map(this.head));
18629
18637
  }
18630
18638
  resolve(t) {
18631
- return Oe.between(t.resolve(this.anchor), t.resolve(this.head));
18639
+ return Ae.between(t.resolve(this.anchor), t.resolve(this.head));
18632
18640
  }
18633
18641
  }
18634
- class _e extends Ne {
18642
+ class Se extends Ne {
18635
18643
  /**
18636
18644
  Create a node selection. Does not verify the validity of its
18637
18645
  argument.
@@ -18642,13 +18650,13 @@ class _e extends Ne {
18642
18650
  }
18643
18651
  map(t, i) {
18644
18652
  let { deleted: n, pos: r } = i.mapResult(this.anchor), a = t.resolve(r);
18645
- return n ? Ne.near(a) : new _e(a);
18653
+ return n ? Ne.near(a) : new Se(a);
18646
18654
  }
18647
18655
  content() {
18648
18656
  return new de(ie.from(this.node), 0, 0);
18649
18657
  }
18650
18658
  eq(t) {
18651
- return t instanceof _e && t.anchor == this.anchor;
18659
+ return t instanceof Se && t.anchor == this.anchor;
18652
18660
  }
18653
18661
  toJSON() {
18654
18662
  return { type: "node", anchor: this.anchor };
@@ -18662,13 +18670,13 @@ class _e extends Ne {
18662
18670
  static fromJSON(t, i) {
18663
18671
  if (typeof i.anchor != "number")
18664
18672
  throw new RangeError("Invalid input for NodeSelection.fromJSON");
18665
- return new _e(t.resolve(i.anchor));
18673
+ return new Se(t.resolve(i.anchor));
18666
18674
  }
18667
18675
  /**
18668
18676
  Create a node selection from non-resolved positions.
18669
18677
  */
18670
18678
  static create(t, i) {
18671
- return new _e(t.resolve(i));
18679
+ return new Se(t.resolve(i));
18672
18680
  }
18673
18681
  /**
18674
18682
  Determines whether the given node may be selected as a node
@@ -18678,8 +18686,8 @@ class _e extends Ne {
18678
18686
  return !t.isText && t.type.spec.selectable !== !1;
18679
18687
  }
18680
18688
  }
18681
- _e.prototype.visible = !1;
18682
- Ne.jsonID("node", _e);
18689
+ Se.prototype.visible = !1;
18690
+ Ne.jsonID("node", Se);
18683
18691
  class xo {
18684
18692
  constructor(t) {
18685
18693
  this.anchor = t;
@@ -18690,7 +18698,7 @@ class xo {
18690
18698
  }
18691
18699
  resolve(t) {
18692
18700
  let i = t.resolve(this.anchor), n = i.nodeAfter;
18693
- return n && _e.isSelectable(n) ? new _e(i) : Ne.near(i);
18701
+ return n && Se.isSelectable(n) ? new Se(i) : Ne.near(i);
18694
18702
  }
18695
18703
  }
18696
18704
  class Ht extends Ne {
@@ -18738,12 +18746,12 @@ const gy = {
18738
18746
  };
18739
18747
  function gn(e, t, i, n, r, a = !1) {
18740
18748
  if (t.inlineContent)
18741
- return Oe.create(e, i);
18749
+ return Ae.create(e, i);
18742
18750
  for (let s = n - (r > 0 ? 0 : 1); r > 0 ? s < t.childCount : s >= 0; s += r) {
18743
18751
  let o = t.child(s);
18744
18752
  if (o.isAtom) {
18745
- if (!a && _e.isSelectable(o))
18746
- return _e.create(e, i - (r < 0 ? o.nodeSize : 0));
18753
+ if (!a && Se.isSelectable(o))
18754
+ return Se.create(e, i - (r < 0 ? o.nodeSize : 0));
18747
18755
  } else {
18748
18756
  let l = gn(e, o, i + r, r < 0 ? o.childCount : 0, r, a);
18749
18757
  if (l)
@@ -18918,9 +18926,9 @@ function wy(e, t = null) {
18918
18926
  for (l = s; r && !r.node; )
18919
18927
  r = r.parent;
18920
18928
  let d = r.node;
18921
- if (r && d.isAtom && _e.isSelectable(d) && r.parent && !(d.isInline && yy(i.focusNode, i.focusOffset, r.dom))) {
18929
+ if (r && d.isAtom && Se.isSelectable(d) && r.parent && !(d.isInline && yy(i.focusNode, i.focusOffset, r.dom))) {
18922
18930
  let p = r.posBefore;
18923
- u = new _e(s == p ? o : n.resolve(p));
18931
+ u = new Se(s == p ? o : n.resolve(p));
18924
18932
  }
18925
18933
  } else {
18926
18934
  if (i instanceof e.dom.ownerDocument.defaultView.Selection && i.rangeCount > 1) {
@@ -18963,7 +18971,7 @@ function So(e, t = !1) {
18963
18971
  _y(e);
18964
18972
  else {
18965
18973
  let { anchor: r, head: a } = i, s, o;
18966
- Ul && !(i instanceof Oe) && (i.$from.parent.inlineContent || (s = Hl(e, i.from)), !i.empty && !i.$from.parent.inlineContent && (o = Hl(e, i.to))), e.docView.setSelection(r, a, e, t), Ul && (s && jl(s), o && jl(o)), i.visible ? e.dom.classList.remove("ProseMirror-hideselection") : (e.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && ky(e));
18974
+ Ul && !(i instanceof Ae) && (i.$from.parent.inlineContent || (s = Hl(e, i.from)), !i.empty && !i.$from.parent.inlineContent && (o = Hl(e, i.to))), e.docView.setSelection(r, a, e, t), Ul && (s && jl(s), o && jl(o)), i.visible ? e.dom.classList.remove("ProseMirror-hideselection") : (e.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && ky(e));
18967
18975
  }
18968
18976
  e.domObserver.setCurSelection(), e.domObserver.connectSelection();
18969
18977
  }
@@ -19003,7 +19011,7 @@ function _y(e) {
19003
19011
  n ? t.collapse(i.parentNode, sn(i) + 1) : t.collapse(i, 0), !n && !e.state.selection.visible && sr && Bu <= 11 && (i.disabled = !0, i.disabled = !1);
19004
19012
  }
19005
19013
  function Sy(e, t) {
19006
- if (t instanceof _e) {
19014
+ if (t instanceof Se) {
19007
19015
  let i = e.docView.descAt(t.from);
19008
19016
  i != e.lastSelectedViewDesc && (ql(e), i && i.selectNode(), e.lastSelectedViewDesc = i);
19009
19017
  } else
@@ -19013,7 +19021,7 @@ function ql(e) {
19013
19021
  e.lastSelectedViewDesc && (e.lastSelectedViewDesc.parent && e.lastSelectedViewDesc.deselectNode(), e.lastSelectedViewDesc = void 0);
19014
19022
  }
19015
19023
  function ju(e, t, i, n) {
19016
- return e.someProp("createSelectionBetween", (r) => r(e, t, i)) || Oe.between(t, i, n);
19024
+ return e.someProp("createSelectionBetween", (r) => r(e, t, i)) || Ae.between(t, i, n);
19017
19025
  }
19018
19026
  function Cy(e) {
19019
19027
  let t = e.domSelectionRange();
@@ -19034,28 +19042,28 @@ function Ei(e, t) {
19034
19042
  }
19035
19043
  function Vl(e, t, i) {
19036
19044
  let n = e.state.selection;
19037
- if (n instanceof Oe)
19045
+ if (n instanceof Ae)
19038
19046
  if (i.indexOf("s") > -1) {
19039
19047
  let { $head: r } = n, a = r.textOffset ? null : t < 0 ? r.nodeBefore : r.nodeAfter;
19040
19048
  if (!a || a.isText || !a.isLeaf)
19041
19049
  return !1;
19042
19050
  let s = e.state.doc.resolve(r.pos + a.nodeSize * (t < 0 ? -1 : 1));
19043
- return Ei(e, new Oe(n.$anchor, s));
19051
+ return Ei(e, new Ae(n.$anchor, s));
19044
19052
  } else if (n.empty) {
19045
19053
  if (e.endOfTextblock(t > 0 ? "forward" : "backward")) {
19046
19054
  let r = $s(e.state, t);
19047
- return r && r instanceof _e ? Ei(e, r) : !1;
19055
+ return r && r instanceof Se ? Ei(e, r) : !1;
19048
19056
  } else if (!(Kt && i.indexOf("m") > -1)) {
19049
19057
  let r = n.$head, a = r.textOffset ? null : t < 0 ? r.nodeBefore : r.nodeAfter, s;
19050
19058
  if (!a || a.isText)
19051
19059
  return !1;
19052
19060
  let o = t < 0 ? r.pos - a.nodeSize : r.pos;
19053
- return a.isAtom || (s = e.docView.descAt(o)) && !s.contentDOM ? _e.isSelectable(a) ? Ei(e, new _e(t < 0 ? e.state.doc.resolve(r.pos - a.nodeSize) : r)) : _o ? Ei(e, new Oe(e.state.doc.resolve(t < 0 ? o : o + a.nodeSize))) : !1 : !1;
19061
+ return a.isAtom || (s = e.docView.descAt(o)) && !s.contentDOM ? Se.isSelectable(a) ? Ei(e, new Se(t < 0 ? e.state.doc.resolve(r.pos - a.nodeSize) : r)) : _o ? Ei(e, new Ae(e.state.doc.resolve(t < 0 ? o : o + a.nodeSize))) : !1 : !1;
19054
19062
  }
19055
19063
  } else return !1;
19056
19064
  else {
19057
- if (n instanceof _e && n.node.isInline)
19058
- return Ei(e, new Oe(t > 0 ? n.$to : n.$from));
19065
+ if (n instanceof Se && n.node.isInline)
19066
+ return Ei(e, new Ae(t > 0 ? n.$to : n.$from));
19059
19067
  {
19060
19068
  let r = $s(e.state, t);
19061
19069
  return r ? Ei(e, r) : !1;
@@ -19205,12 +19213,12 @@ function $l(e, t) {
19205
19213
  }
19206
19214
  function Wl(e, t, i) {
19207
19215
  let n = e.state.selection;
19208
- if (n instanceof Oe && !n.empty || i.indexOf("s") > -1 || Kt && i.indexOf("m") > -1)
19216
+ if (n instanceof Ae && !n.empty || i.indexOf("s") > -1 || Kt && i.indexOf("m") > -1)
19209
19217
  return !1;
19210
19218
  let { $from: r, $to: a } = n;
19211
19219
  if (!r.parent.inlineContent || e.endOfTextblock(t < 0 ? "up" : "down")) {
19212
19220
  let s = $s(e.state, t);
19213
- if (s && s instanceof _e)
19221
+ if (s && s instanceof Se)
19214
19222
  return Ei(e, s);
19215
19223
  }
19216
19224
  if (!r.parent.inlineContent) {
@@ -19220,7 +19228,7 @@ function Wl(e, t, i) {
19220
19228
  return !1;
19221
19229
  }
19222
19230
  function Gl(e, t) {
19223
- if (!(e.state.selection instanceof Oe))
19231
+ if (!(e.state.selection instanceof Ae))
19224
19232
  return !0;
19225
19233
  let { $head: i, $anchor: n, empty: r } = e.state.selection;
19226
19234
  if (!i.sameParent(n))
@@ -19493,7 +19501,7 @@ qt.keypress = (e, t) => {
19493
19501
  return;
19494
19502
  }
19495
19503
  let n = e.state.selection;
19496
- if (!(n instanceof Oe) || !n.$from.sameParent(n.$to)) {
19504
+ if (!(n instanceof Ae) || !n.$from.sameParent(n.$to)) {
19497
19505
  let r = String.fromCharCode(i.charCode), a = () => e.state.tr.insertText(r).scrollIntoView();
19498
19506
  !/[\r\n]/.test(r) && !e.someProp("handleTextInput", (s) => s(e, n.$from.pos, n.$to.pos, r, a)) && e.dispatch(a()), i.preventDefault();
19499
19507
  }
@@ -19524,22 +19532,22 @@ function Uy(e, t) {
19524
19532
  if (t == -1)
19525
19533
  return !1;
19526
19534
  let i = e.state.doc.resolve(t), n = i.nodeAfter;
19527
- return n && n.isAtom && _e.isSelectable(n) ? (cr(e, new _e(i)), !0) : !1;
19535
+ return n && n.isAtom && Se.isSelectable(n) ? (cr(e, new Se(i)), !0) : !1;
19528
19536
  }
19529
19537
  function Hy(e, t) {
19530
19538
  if (t == -1)
19531
19539
  return !1;
19532
19540
  let i = e.state.selection, n, r;
19533
- i instanceof _e && (n = i.node);
19541
+ i instanceof Se && (n = i.node);
19534
19542
  let a = e.state.doc.resolve(t);
19535
19543
  for (let s = a.depth + 1; s > 0; s--) {
19536
19544
  let o = s > a.depth ? a.nodeAfter : a.node(s);
19537
- if (_e.isSelectable(o)) {
19545
+ if (Se.isSelectable(o)) {
19538
19546
  n && i.$from.depth > 0 && s >= i.$from.depth && a.before(i.$from.depth + 1) == i.$from.pos ? r = a.before(i.$from.depth) : r = a.before(s);
19539
19547
  break;
19540
19548
  }
19541
19549
  }
19542
- return r != null ? (cr(e, _e.create(e.state.doc, r)), !0) : !1;
19550
+ return r != null ? (cr(e, Se.create(e.state.doc, r)), !0) : !1;
19543
19551
  }
19544
19552
  function jy(e, t, i, n, r) {
19545
19553
  return Co(e, "handleClickOn", t, i, n) || e.someProp("handleClick", (a) => a(e, t, n)) || (r ? Hy(e, i) : Uy(e, i));
@@ -19554,19 +19562,19 @@ function $y(e, t, i) {
19554
19562
  if (i.button != 0)
19555
19563
  return !1;
19556
19564
  let n = Zu(e, t, !0), r = e.state.doc;
19557
- return n ? (cr(e, n), n instanceof Oe && r.eq(e.state.doc) && (e.input.mouseDown = new Gy(e, n)), !0) : !1;
19565
+ return n ? (cr(e, n), n instanceof Ae && r.eq(e.state.doc) && (e.input.mouseDown = new Gy(e, n)), !0) : !1;
19558
19566
  }
19559
19567
  function Zu(e, t, i) {
19560
19568
  let n = e.state.doc;
19561
19569
  if (t == -1)
19562
- return n.inlineContent ? Oe.create(n, 0, n.content.size) : null;
19570
+ return n.inlineContent ? Ae.create(n, 0, n.content.size) : null;
19563
19571
  let r = n.resolve(t);
19564
19572
  for (let a = r.depth + 1; a > 0; a--) {
19565
19573
  let s = a > r.depth ? r.nodeAfter : r.node(a), o = r.before(a);
19566
19574
  if (s.inlineContent)
19567
- return Oe.create(n, o + 1, o + 1 + s.content.size);
19568
- if (i && _e.isSelectable(s))
19569
- return _e.create(n, o);
19575
+ return Ae.create(n, o + 1, o + 1 + s.content.size);
19576
+ if (i && Se.isSelectable(s))
19577
+ return Se.create(n, o);
19570
19578
  }
19571
19579
  return null;
19572
19580
  }
@@ -19612,7 +19620,7 @@ class Wy extends Yu {
19612
19620
  const o = r ? null : n.target, l = o ? t.docView.nearestDesc(o, !0) : null;
19613
19621
  this.target = l && l.nodeDOM.nodeType == 1 ? l.nodeDOM : null;
19614
19622
  let { selection: u } = t.state;
19615
- n.button == 0 && (a.type.spec.draggable && a.type.spec.selectable !== !1 || u instanceof _e && u.from <= s && u.to > s) && (this.mightDrag = {
19623
+ n.button == 0 && (a.type.spec.draggable && a.type.spec.selectable !== !1 || u instanceof Se && u.from <= s && u.to > s) && (this.mightDrag = {
19616
19624
  node: a,
19617
19625
  pos: s,
19618
19626
  addAttr: !!(this.target && !this.target.draggable),
@@ -19664,7 +19672,7 @@ class Gy extends Yu {
19664
19672
  if (!n)
19665
19673
  return;
19666
19674
  let { doc: r } = this.view.state, a = this.startSelection, [s, o] = n.from < a.from ? [a.to, n.from] : [a.from, n.to];
19667
- cr(this.view, Oe.create(r, s, o));
19675
+ cr(this.view, Ae.create(r, s, o));
19668
19676
  }
19669
19677
  }
19670
19678
  ti.touchstart = (e) => {
@@ -19682,7 +19690,7 @@ qt.compositionstart = qt.compositionupdate = (e) => {
19682
19690
  if (!e.composing) {
19683
19691
  e.domObserver.flush();
19684
19692
  let { state: t } = e, i = t.selection.$to;
19685
- if (t.selection instanceof Oe && (t.storedMarks || !i.textOffset && i.parentOffset && i.nodeBefore.marks.some((n) => n.type.spec.inclusive === !1) || Oi && Uu && Xy(e)))
19693
+ if (t.selection instanceof Ae && (t.storedMarks || !i.textOffset && i.parentOffset && i.nodeBefore.marks.some((n) => n.type.spec.inclusive === !1) || Oi && Uu && Xy(e)))
19686
19694
  e.markCursor = e.state.storedMarks || i.marks(), fa(e, !0), e.markCursor = null;
19687
19695
  else if (fa(e, !t.selection.empty), Xa && t.selection.empty && i.parentOffset && !i.textOffset && i.nodeBefore.marks.length) {
19688
19696
  let n = e.domSelectionRange();
@@ -19799,12 +19807,12 @@ ti.dragstart = (e, t) => {
19799
19807
  if (n && n.done(), !i.dataTransfer)
19800
19808
  return;
19801
19809
  let r = e.state.selection, a = r.empty ? null : e.posAtCoords(lr(i)), s;
19802
- if (!(a && a.pos >= r.from && a.pos <= (r instanceof _e ? r.to - 1 : r.to))) {
19810
+ if (!(a && a.pos >= r.from && a.pos <= (r instanceof Se ? r.to - 1 : r.to))) {
19803
19811
  if (n && n.mightDrag)
19804
- s = _e.create(e.state.doc, n.mightDrag.pos);
19812
+ s = Se.create(e.state.doc, n.mightDrag.pos);
19805
19813
  else if (i.target && i.target.nodeType == 1) {
19806
19814
  let d = e.docView.nearestDesc(i.target, !0);
19807
- d && d.node.type.spec.draggable && d != e.docView && (s = _e.create(e.state.doc, d.posBefore));
19815
+ d && d.node.type.spec.draggable && d != e.docView && (s = Se.create(e.state.doc, d.posBefore));
19808
19816
  }
19809
19817
  }
19810
19818
  let o = (s || e.state.selection).content(), { dom: l, text: u, slice: f } = Vu(e, o);
@@ -19853,8 +19861,8 @@ function ix(e, t, i) {
19853
19861
  if (f ? l.replaceRangeWith(u, u, a.content.firstChild) : l.replaceRange(u, u, a), l.doc.eq(d))
19854
19862
  return;
19855
19863
  let p = l.doc.resolve(u);
19856
- if (f && _e.isSelectable(a.content.firstChild) && p.nodeAfter && p.nodeAfter.sameMarkup(a.content.firstChild))
19857
- l.setSelection(new _e(p));
19864
+ if (f && Se.isSelectable(a.content.firstChild) && p.nodeAfter && p.nodeAfter.sameMarkup(a.content.firstChild))
19865
+ l.setSelection(new Se(p));
19858
19866
  else {
19859
19867
  let m = l.mapping.map(o);
19860
19868
  l.mapping.maps[l.mapping.maps.length - 1].forEach((g, h, v, b) => m = b), l.setSelection(ju(e, p, l.doc.resolve(m)));
@@ -20543,13 +20551,13 @@ const cf = (e, t, i) => {
20543
20551
  let a = r.nodeBefore;
20544
20552
  if (vf(e, r, t, -1))
20545
20553
  return !0;
20546
- if (n.parent.content.size == 0 && (On(a, "end") || _e.isSelectable(a)))
20554
+ if (n.parent.content.size == 0 && (On(a, "end") || Se.isSelectable(a)))
20547
20555
  for (let s = n.depth; ; s--) {
20548
20556
  let o = Ga(e.doc, n.before(s), n.after(s), de.empty);
20549
20557
  if (o && o.slice.size < o.to - o.from) {
20550
20558
  if (t) {
20551
20559
  let l = e.tr.step(o);
20552
- l.setSelection(On(a, "end") ? Ne.findFrom(l.doc.resolve(l.mapping.map(r.pos, -1)), -1) : _e.create(l.doc, r.pos - a.nodeSize)), t(l.scrollIntoView());
20560
+ l.setSelection(On(a, "end") ? Ne.findFrom(l.doc.resolve(l.mapping.map(r.pos, -1)), -1) : Se.create(l.doc, r.pos - a.nodeSize)), t(l.scrollIntoView());
20553
20561
  }
20554
20562
  return !0;
20555
20563
  }
@@ -20594,7 +20602,7 @@ function uf(e, t, i) {
20594
20602
  return !1;
20595
20603
  if (i) {
20596
20604
  let f = e.tr.step(u);
20597
- f.setSelection(Oe.create(f.doc, a)), i(f.scrollIntoView());
20605
+ f.setSelection(Ae.create(f.doc, a)), i(f.scrollIntoView());
20598
20606
  }
20599
20607
  return !0;
20600
20608
  }
@@ -20617,7 +20625,7 @@ const ff = (e, t, i) => {
20617
20625
  a = Mo(n);
20618
20626
  }
20619
20627
  let s = a && a.nodeBefore;
20620
- return !s || !_e.isSelectable(s) ? !1 : (t && t(e.tr.setSelection(_e.create(e.doc, a.pos - s.nodeSize)).scrollIntoView()), !0);
20628
+ return !s || !Se.isSelectable(s) ? !1 : (t && t(e.tr.setSelection(Se.create(e.doc, a.pos - s.nodeSize)).scrollIntoView()), !0);
20621
20629
  };
20622
20630
  function Mo(e) {
20623
20631
  if (!e.parent.type.spec.isolating)
@@ -20643,12 +20651,12 @@ const df = (e, t, i) => {
20643
20651
  let a = r.nodeAfter;
20644
20652
  if (vf(e, r, t, 1))
20645
20653
  return !0;
20646
- if (n.parent.content.size == 0 && (On(a, "start") || _e.isSelectable(a))) {
20654
+ if (n.parent.content.size == 0 && (On(a, "start") || Se.isSelectable(a))) {
20647
20655
  let s = Ga(e.doc, n.before(), n.after(), de.empty);
20648
20656
  if (s && s.slice.size < s.to - s.from) {
20649
20657
  if (t) {
20650
20658
  let o = e.tr.step(s);
20651
- o.setSelection(On(a, "start") ? Ne.findFrom(o.doc.resolve(o.mapping.map(r.pos)), 1) : _e.create(o.doc, o.mapping.map(r.pos))), t(o.scrollIntoView());
20659
+ o.setSelection(On(a, "start") ? Ne.findFrom(o.doc.resolve(o.mapping.map(r.pos)), 1) : Se.create(o.doc, o.mapping.map(r.pos))), t(o.scrollIntoView());
20652
20660
  }
20653
20661
  return !0;
20654
20662
  }
@@ -20664,7 +20672,7 @@ const df = (e, t, i) => {
20664
20672
  a = No(n);
20665
20673
  }
20666
20674
  let s = a && a.nodeAfter;
20667
- return !s || !_e.isSelectable(s) ? !1 : (t && t(e.tr.setSelection(_e.create(e.doc, a.pos)).scrollIntoView()), !0);
20675
+ return !s || !Se.isSelectable(s) ? !1 : (t && t(e.tr.setSelection(Se.create(e.doc, a.pos)).scrollIntoView()), !0);
20668
20676
  };
20669
20677
  function No(e) {
20670
20678
  if (!e.parent.type.spec.isolating)
@@ -20678,7 +20686,7 @@ function No(e) {
20678
20686
  return null;
20679
20687
  }
20680
20688
  const hx = (e, t) => {
20681
- let i = e.selection, n = i instanceof _e, r;
20689
+ let i = e.selection, n = i instanceof Se, r;
20682
20690
  if (n) {
20683
20691
  if (i.node.isTextblock || !Fi(e.doc, i.from))
20684
20692
  return !1;
@@ -20687,12 +20695,12 @@ const hx = (e, t) => {
20687
20695
  return !1;
20688
20696
  if (t) {
20689
20697
  let a = e.tr.join(r);
20690
- n && a.setSelection(_e.create(a.doc, r - e.doc.resolve(r).nodeBefore.nodeSize)), t(a.scrollIntoView());
20698
+ n && a.setSelection(Se.create(a.doc, r - e.doc.resolve(r).nodeBefore.nodeSize)), t(a.scrollIntoView());
20691
20699
  }
20692
20700
  return !0;
20693
20701
  }, bx = (e, t) => {
20694
20702
  let i = e.selection, n;
20695
- if (i instanceof _e) {
20703
+ if (i instanceof Se) {
20696
20704
  if (i.node.isTextblock || !Fi(e.doc, i.to))
20697
20705
  return !1;
20698
20706
  n = i.to;
@@ -20736,7 +20744,7 @@ const vx = (e, t) => {
20736
20744
  return !1;
20737
20745
  if (t) {
20738
20746
  let s = (!n.parentOffset && r.index() < r.parent.childCount ? n : r).pos, o = e.tr.insert(s, a.createAndFill());
20739
- o.setSelection(Oe.create(o.doc, s + 1)), t(o.scrollIntoView());
20747
+ o.setSelection(Ae.create(o.doc, s + 1)), t(o.scrollIntoView());
20740
20748
  }
20741
20749
  return !0;
20742
20750
  }, gf = (e, t) => {
@@ -20754,7 +20762,7 @@ const vx = (e, t) => {
20754
20762
  function yx(e) {
20755
20763
  return (t, i) => {
20756
20764
  let { $from: n, $to: r } = t.selection;
20757
- if (t.selection instanceof _e && t.selection.node.isBlock)
20765
+ if (t.selection instanceof Se && t.selection.node.isBlock)
20758
20766
  return !n.parentOffset || !Ci(t.doc, n.pos) ? !1 : (i && i(t.tr.split(n.pos).scrollIntoView()), !0);
20759
20767
  if (!n.depth)
20760
20768
  return !1;
@@ -20769,7 +20777,7 @@ function yx(e) {
20769
20777
  a.unshift(null);
20770
20778
  }
20771
20779
  let f = t.tr;
20772
- (t.selection instanceof Oe || t.selection instanceof Ht) && f.deleteSelection();
20780
+ (t.selection instanceof Ae || t.selection instanceof Ht) && f.deleteSelection();
20773
20781
  let d = f.mapping.map(n.pos), p = Ci(f.doc, d, a.length, a);
20774
20782
  if (p || (a[0] = o ? { type: o } : null, p = Ci(f.doc, d, a.length, a)), !p)
20775
20783
  return !1;
@@ -20782,7 +20790,7 @@ function yx(e) {
20782
20790
  }
20783
20791
  const xx = yx(), wx = (e, t) => {
20784
20792
  let { $from: i, to: n } = e.selection, r, a = i.sharedDepth(n);
20785
- return a == 0 ? !1 : (r = i.before(a), t && t(e.tr.setSelection(_e.create(e.doc, r))), !0);
20793
+ return a == 0 ? !1 : (r = i.before(a), t && t(e.tr.setSelection(Se.create(e.doc, r))), !0);
20786
20794
  };
20787
20795
  function kx(e, t, i) {
20788
20796
  let n = t.nodeBefore, r = t.nodeAfter, a = t.index();
@@ -20835,7 +20843,7 @@ function yf(e) {
20835
20843
  return !1;
20836
20844
  a--;
20837
20845
  }
20838
- return r.node(a).isTextblock ? (i && i(t.tr.setSelection(Oe.create(t.doc, e < 0 ? r.start(a) : r.end(a)))), !0) : !1;
20846
+ return r.node(a).isTextblock ? (i && i(t.tr.setSelection(Ae.create(t.doc, e < 0 ? r.start(a) : r.end(a)))), !0) : !1;
20839
20847
  };
20840
20848
  }
20841
20849
  const _x = yf(-1), Sx = yf(1);
@@ -21282,7 +21290,7 @@ const Hx = () => ({ editor: e, view: t }) => (requestAnimationFrame(() => {
21282
21290
  const { state: r } = i, a = r.doc.slice(e.from, e.to);
21283
21291
  n.deleteRange(e.from, e.to);
21284
21292
  const s = n.mapping.map(t);
21285
- return n.insert(s, a.content), n.setSelection(new Oe(n.doc.resolve(Math.max(s - 1, 0)))), !0;
21293
+ return n.insert(s, a.content), n.setSelection(new Ae(n.doc.resolve(Math.max(s - 1, 0)))), !0;
21286
21294
  }, Gx = () => ({ tr: e, dispatch: t }) => {
21287
21295
  const { selection: i } = e, n = i.$anchor.node();
21288
21296
  if (n.content.size > 0)
@@ -21356,7 +21364,7 @@ const Yx = (e, t = {}) => ({ tr: i, state: n, dispatch: r }) => {
21356
21364
  if (r) {
21357
21365
  const d = Do(l, a, t);
21358
21366
  if (d && d.from <= u && d.to >= f) {
21359
- const p = Oe.create(s, d.from, d.to);
21367
+ const p = Ae.create(s, d.from, d.to);
21360
21368
  i.setSelection(p);
21361
21369
  }
21362
21370
  }
@@ -21369,7 +21377,7 @@ const Yx = (e, t = {}) => ({ tr: i, state: n, dispatch: r }) => {
21369
21377
  return !1;
21370
21378
  };
21371
21379
  function kf(e) {
21372
- return e instanceof Oe;
21380
+ return e instanceof Ae;
21373
21381
  }
21374
21382
  function Gi(e = 0, t = 0, i = 0) {
21375
21383
  return Math.min(Math.max(e, t), i);
@@ -21383,7 +21391,7 @@ function t0(e, t = null) {
21383
21391
  if (t === "end")
21384
21392
  return n;
21385
21393
  const r = i.from, a = n.to;
21386
- return t === "all" ? Oe.create(e, Gi(0, r, a), Gi(e.content.size, r, a)) : Oe.create(e, Gi(t, r, a), Gi(t, r, a));
21394
+ return t === "all" ? Ae.create(e, Gi(0, r, a), Gi(e.content.size, r, a)) : Ae.create(e, Gi(t, r, a), Gi(t, r, a));
21387
21395
  }
21388
21396
  function ec() {
21389
21397
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
@@ -21907,13 +21915,13 @@ const q0 = (e, t = {}) => ({ tr: i, state: n, dispatch: r }) => {
21907
21915
  return i.selection.$anchor.sameParent(i.selection.$head) && (s = i.selection.$anchor.parent.attrs), a.isTextblock ? r().command(({ commands: o }) => Ql(a, { ...s, ...t })(i) ? !0 : o.clearNodes()).command(({ state: o }) => Ql(a, { ...s, ...t })(o, n)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
21908
21916
  }, W0 = (e) => ({ tr: t, dispatch: i }) => {
21909
21917
  if (i) {
21910
- const { doc: n } = t, r = Gi(e, 0, n.content.size), a = _e.create(n, r);
21918
+ const { doc: n } = t, r = Gi(e, 0, n.content.size), a = Se.create(n, r);
21911
21919
  t.setSelection(a);
21912
21920
  }
21913
21921
  return !0;
21914
21922
  }, G0 = (e) => ({ tr: t, dispatch: i }) => {
21915
21923
  if (i) {
21916
- const { doc: n } = t, { from: r, to: a } = typeof e == "number" ? { from: e, to: e } : e, s = Oe.atStart(n).from, o = Oe.atEnd(n).to, l = Gi(r, s, o), u = Gi(a, s, o), f = Oe.create(n, l, u);
21924
+ const { doc: n } = t, { from: r, to: a } = typeof e == "number" ? { from: e, to: e } : e, s = Ae.atStart(n).from, o = Ae.atEnd(n).to, l = Gi(r, s, o), u = Gi(a, s, o), f = Ae.create(n, l, u);
21917
21925
  t.setSelection(f);
21918
21926
  }
21919
21927
  return !0;
@@ -21930,7 +21938,7 @@ function nc(e, t) {
21930
21938
  }
21931
21939
  const X0 = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: i, dispatch: n, editor: r }) => {
21932
21940
  const { selection: a, doc: s } = t, { $from: o, $to: l } = a, u = r.extensionManager.attributes, f = Jr(u, o.node().type.name, o.node().attrs);
21933
- if (a instanceof _e && a.node.isBlock)
21941
+ if (a instanceof Se && a.node.isBlock)
21934
21942
  return !o.parentOffset || !Ci(s, o.pos) ? !1 : (n && (e && nc(i, r.extensionManager.splittableMarks), t.split(o.pos).scrollIntoView()), !0);
21935
21943
  if (!o.parent.isBlock)
21936
21944
  return !1;
@@ -21947,7 +21955,7 @@ const X0 = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: i, dispatch: n, edit
21947
21955
  attrs: f
21948
21956
  }
21949
21957
  ] : void 0), n) {
21950
- if (g && (a instanceof Oe && t.deleteSelection(), t.split(t.mapping.map(o.pos), 1, m), p && !d && !o.parentOffset && o.parent.type !== p)) {
21958
+ if (g && (a instanceof Ae && t.deleteSelection(), t.split(t.mapping.map(o.pos), 1, m), p && !d && !o.parentOffset && o.parent.type !== p)) {
21951
21959
  const h = t.mapping.map(o.before()), v = t.doc.resolve(h);
21952
21960
  o.node(-1).canReplaceWith(v.index(), v.index() + 1, p) && t.setNodeMarkup(t.mapping.map(o.before()), p);
21953
21961
  }
@@ -21978,12 +21986,12 @@ const X0 = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: i, dispatch: n, edit
21978
21986
  b = b.append(ie.from(o.createAndFill(null, O) || void 0));
21979
21987
  const A = l.before(l.depth - (y - 1));
21980
21988
  i.replace(A, l.after(-x), new de(b, 4 - y, 0));
21981
- let H = -1;
21989
+ let U = -1;
21982
21990
  i.doc.nodesBetween(A, i.doc.content.size, (_, C) => {
21983
- if (H > -1)
21991
+ if (U > -1)
21984
21992
  return !1;
21985
- _.isTextblock && _.content.size === 0 && (H = C + 1);
21986
- }), H > -1 && i.setSelection(Oe.near(i.doc.resolve(H))), i.scrollIntoView();
21993
+ _.isTextblock && _.content.size === 0 && (U = C + 1);
21994
+ }), U > -1 && i.setSelection(Ae.near(i.doc.resolve(U))), i.scrollIntoView();
21987
21995
  }
21988
21996
  return !0;
21989
21997
  }
@@ -22039,8 +22047,8 @@ const X0 = ({ keepMarks: e = !0 } = {}) => ({ tr: t, state: i, dispatch: n, edit
22039
22047
  return l().command(() => (a.setNodeMarkup(O.pos, m), !0)).command(() => vs(a, m)).command(() => ys(a, m)).run();
22040
22048
  }
22041
22049
  return !i || !k || !o ? l().command(() => f().wrapInList(m, n) ? !0 : u.clearNodes()).wrapInList(m, n).command(() => vs(a, m)).command(() => ys(a, m)).run() : l().command(() => {
22042
- const A = f().wrapInList(m, n), H = k.filter((_) => p.includes(_.type.name));
22043
- return a.ensureMarks(H), A ? !0 : u.clearNodes();
22050
+ const A = f().wrapInList(m, n), U = k.filter((_) => p.includes(_.type.name));
22051
+ return a.ensureMarks(U), A ? !0 : u.clearNodes();
22044
22052
  }).wrapInList(m, n).command(() => vs(a, m)).command(() => ys(a, m)).run();
22045
22053
  }, Q0 = (e, t = {}, i = {}) => ({ state: n, commands: r }) => {
22046
22054
  const { extendEmptyMarkRange: a = !1 } = i, s = Hi(e, n.schema);
@@ -37812,7 +37820,7 @@ Lt.prototype = {
37812
37820
  return r.j[e] = s, s;
37813
37821
  }
37814
37822
  };
37815
- const Ie = (e, t, i, n, r) => e.ta(t, i, n, r), Ye = (e, t, i, n, r) => e.tr(t, i, n, r), lc = (e, t, i, n, r) => e.ts(t, i, n, r), re = (e, t, i, n, r) => e.tt(t, i, n, r), xi = "WORD", eo = "UWORD", Nf = "ASCIINUMERICAL", If = "ALPHANUMERICAL", ir = "LOCALHOST", to = "TLD", io = "UTLD", Zr = "SCHEME", yn = "SLASH_SCHEME", Ho = "NUM", no = "WS", jo = "NL", Vn = "OPENBRACE", $n = "CLOSEBRACE", ga = "OPENBRACKET", va = "CLOSEBRACKET", ya = "OPENPAREN", xa = "CLOSEPAREN", wa = "OPENANGLEBRACKET", ka = "CLOSEANGLEBRACKET", _a = "FULLWIDTHLEFTPAREN", Sa = "FULLWIDTHRIGHTPAREN", Ca = "LEFTCORNERBRACKET", Oa = "RIGHTCORNERBRACKET", Aa = "LEFTWHITECORNERBRACKET", Ta = "RIGHTWHITECORNERBRACKET", Ea = "FULLWIDTHLESSTHAN", Ma = "FULLWIDTHGREATERTHAN", Na = "AMPERSAND", Ia = "APOSTROPHE", za = "ASTERISK", Mi = "AT", Ra = "BACKSLASH", Da = "BACKTICK", La = "CARET", Xi = "COLON", qo = "COMMA", Pa = "DOLLAR", ai = "DOT", Ba = "EQUALS", Vo = "EXCLAMATION", Gt = "HYPHEN", Wn = "PERCENT", Fa = "PIPE", Ua = "PLUS", Ha = "POUND", Gn = "QUERY", $o = "QUOTE", zf = "FULLWIDTHMIDDLEDOT", Wo = "SEMI", si = "SLASH", Kn = "TILDE", ja = "UNDERSCORE", Rf = "EMOJI", qa = "SYM";
37823
+ const ze = (e, t, i, n, r) => e.ta(t, i, n, r), Ye = (e, t, i, n, r) => e.tr(t, i, n, r), lc = (e, t, i, n, r) => e.ts(t, i, n, r), re = (e, t, i, n, r) => e.tt(t, i, n, r), xi = "WORD", eo = "UWORD", Nf = "ASCIINUMERICAL", If = "ALPHANUMERICAL", ir = "LOCALHOST", to = "TLD", io = "UTLD", Zr = "SCHEME", yn = "SLASH_SCHEME", Ho = "NUM", no = "WS", jo = "NL", Vn = "OPENBRACE", $n = "CLOSEBRACE", ga = "OPENBRACKET", va = "CLOSEBRACKET", ya = "OPENPAREN", xa = "CLOSEPAREN", wa = "OPENANGLEBRACKET", ka = "CLOSEANGLEBRACKET", _a = "FULLWIDTHLEFTPAREN", Sa = "FULLWIDTHRIGHTPAREN", Ca = "LEFTCORNERBRACKET", Oa = "RIGHTCORNERBRACKET", Aa = "LEFTWHITECORNERBRACKET", Ta = "RIGHTWHITECORNERBRACKET", Ea = "FULLWIDTHLESSTHAN", Ma = "FULLWIDTHGREATERTHAN", Na = "AMPERSAND", Ia = "APOSTROPHE", za = "ASTERISK", Mi = "AT", Ra = "BACKSLASH", Da = "BACKTICK", La = "CARET", Xi = "COLON", qo = "COMMA", Pa = "DOLLAR", ai = "DOT", Ba = "EQUALS", Vo = "EXCLAMATION", Gt = "HYPHEN", Wn = "PERCENT", Fa = "PIPE", Ua = "PLUS", Ha = "POUND", Gn = "QUERY", $o = "QUOTE", zf = "FULLWIDTHMIDDLEDOT", Wo = "SEMI", si = "SLASH", Kn = "TILDE", ja = "UNDERSCORE", Rf = "EMOJI", qa = "SYM";
37816
37824
  var Df = /* @__PURE__ */ Object.freeze({
37817
37825
  __proto__: null,
37818
37826
  ALPHANUMERICAL: If,
@@ -38235,31 +38243,31 @@ function W1({
38235
38243
  groups: e
38236
38244
  }) {
38237
38245
  const t = e.domain.concat([Na, za, Mi, Ra, Da, La, Pa, Ba, Gt, Ho, Wn, Fa, Ua, Ha, si, qa, Kn, ja]), i = [Ia, Xi, qo, ai, Vo, Wn, Gn, $o, Wo, wa, ka, Vn, $n, va, ga, ya, xa, _a, Sa, Ca, Oa, Aa, Ta, Ea, Ma], n = [Na, Ia, za, Ra, Da, La, Pa, Ba, Gt, Vn, $n, Wn, Fa, Ua, Ha, Gn, si, qa, Kn, ja], r = Wt(), a = re(r, Kn);
38238
- Ie(a, n, a), Ie(a, e.domain, a);
38246
+ ze(a, n, a), ze(a, e.domain, a);
38239
38247
  const s = Wt(), o = Wt(), l = Wt();
38240
- Ie(r, e.domain, s), Ie(r, e.scheme, o), Ie(r, e.slashscheme, l), Ie(s, n, a), Ie(s, e.domain, s);
38248
+ ze(r, e.domain, s), ze(r, e.scheme, o), ze(r, e.slashscheme, l), ze(s, n, a), ze(s, e.domain, s);
38241
38249
  const u = re(s, Mi);
38242
38250
  re(a, Mi, u), re(o, Mi, u), re(l, Mi, u);
38243
38251
  const f = re(a, ai);
38244
- Ie(f, n, a), Ie(f, e.domain, a);
38252
+ ze(f, n, a), ze(f, e.domain, a);
38245
38253
  const d = Wt();
38246
- Ie(u, e.domain, d), Ie(d, e.domain, d);
38254
+ ze(u, e.domain, d), ze(d, e.domain, d);
38247
38255
  const p = re(d, ai);
38248
- Ie(p, e.domain, d);
38256
+ ze(p, e.domain, d);
38249
38257
  const m = Wt(V1);
38250
- Ie(p, e.tld, m), Ie(p, e.utld, m), re(u, ir, m);
38258
+ ze(p, e.tld, m), ze(p, e.utld, m), re(u, ir, m);
38251
38259
  const g = re(d, Gt);
38252
- re(g, Gt, g), Ie(g, e.domain, d), Ie(m, e.domain, d), re(m, ai, p), re(m, Gt, g);
38260
+ re(g, Gt, g), ze(g, e.domain, d), ze(m, e.domain, d), re(m, ai, p), re(m, Gt, g);
38253
38261
  const h = re(s, Gt), v = re(s, ai);
38254
- re(h, Gt, h), Ie(h, e.domain, s), Ie(v, n, a), Ie(v, e.domain, s);
38262
+ re(h, Gt, h), ze(h, e.domain, s), ze(v, n, a), ze(v, e.domain, s);
38255
38263
  const b = Wt(Ur);
38256
- Ie(v, e.tld, b), Ie(v, e.utld, b), Ie(b, e.domain, s), Ie(b, n, a), re(b, ai, v), re(b, Gt, h), re(b, Mi, u);
38264
+ ze(v, e.tld, b), ze(v, e.utld, b), ze(b, e.domain, s), ze(b, n, a), re(b, ai, v), re(b, Gt, h), re(b, Mi, u);
38257
38265
  const y = re(b, Xi), x = Wt(Ur);
38258
- Ie(y, e.numeric, x);
38266
+ ze(y, e.numeric, x);
38259
38267
  const k = Wt(Ur), O = Wt();
38260
- Ie(k, t, k), Ie(k, i, O), Ie(O, t, k), Ie(O, i, O), re(b, si, k), re(x, si, k);
38261
- const A = re(o, Xi), H = re(l, Xi), _ = re(H, si), C = re(_, si);
38262
- Ie(o, e.domain, s), re(o, ai, v), re(o, Gt, h), Ie(l, e.domain, s), re(l, ai, v), re(l, Gt, h), Ie(A, e.domain, k), re(A, si, k), re(A, Gn, k), Ie(C, e.domain, k), Ie(C, t, k), re(C, si, k);
38268
+ ze(k, t, k), ze(k, i, O), ze(O, t, k), ze(O, i, O), re(b, si, k), re(x, si, k);
38269
+ const A = re(o, Xi), U = re(l, Xi), _ = re(U, si), C = re(_, si);
38270
+ ze(o, e.domain, s), re(o, ai, v), re(o, Gt, h), ze(l, e.domain, s), re(l, ai, v), re(l, Gt, h), ze(A, e.domain, k), re(A, si, k), re(A, Gn, k), ze(C, e.domain, k), ze(C, t, k), re(C, si, k);
38263
38271
  const R = [
38264
38272
  [Vn, $n],
38265
38273
  // {}
@@ -38282,9 +38290,9 @@ function W1({
38282
38290
  const [W, V] = R[L], P = re(k, W);
38283
38291
  re(O, W, P);
38284
38292
  const Q = Wt(Ur);
38285
- Ie(P, t, Q);
38293
+ ze(P, t, Q);
38286
38294
  const q = Wt();
38287
- Ie(P, i, q), re(P, V, k), Ie(Q, t, Q), Ie(Q, i, q), Ie(q, t, Q), Ie(q, i, q), re(Q, V, k), re(q, V, k);
38295
+ ze(P, i, q), re(P, V, k), ze(Q, t, Q), ze(Q, i, q), ze(q, t, Q), ze(q, i, q), re(Q, V, k), re(q, V, k);
38288
38296
  }
38289
38297
  return re(r, ir, b), re(r, jo, $1), {
38290
38298
  start: r,
@@ -38792,8 +38800,8 @@ function lw(e) {
38792
38800
  });
38793
38801
  const A = y && y[O];
38794
38802
  if (A) {
38795
- const H = (k + O) % t * 2, _ = s[H];
38796
- _ == null || _ != A && s[H + 1] == 1 ? (s[H] = A, s[H + 1] = 1) : _ == A && s[H + 1]++;
38803
+ const U = (k + O) % t * 2, _ = s[U];
38804
+ _ == null || _ != A && s[U + 1] == 1 ? (s[U] = A, s[U + 1] = 1) : _ == A && s[U + 1]++;
38797
38805
  }
38798
38806
  }
38799
38807
  }
@@ -38962,7 +38970,7 @@ var We = class wi extends Ne {
38962
38970
  const a = this.$anchorCell.node(-1) != n.node(-1);
38963
38971
  return a && this.isRowSelection() ? wi.rowSelection(n, r) : a && this.isColSelection() ? wi.colSelection(n, r) : new wi(n, r);
38964
38972
  }
38965
- return Oe.between(n, r);
38973
+ return Ae.between(n, r);
38966
38974
  }
38967
38975
  content() {
38968
38976
  const t = this.$anchorCell.node(-1), i = et.get(t), n = this.$anchorCell.start(-1), r = i.rectBetween(this.$anchorCell.pos - n, this.$headCell.pos - n), a = {}, s = [];
@@ -39101,7 +39109,7 @@ function yw({ $from: e, $to: t }) {
39101
39109
  function xw(e, t, i) {
39102
39110
  const n = (t || e).selection, r = (t || e).doc;
39103
39111
  let a, s;
39104
- if (n instanceof _e && (s = n.node.type.spec.tableRole)) {
39112
+ if (n instanceof Se && (s = n.node.type.spec.tableRole)) {
39105
39113
  if (s == "cell" || s == "header_cell") a = We.create(r, n.from);
39106
39114
  else if (s == "row") {
39107
39115
  const o = r.resolve(n.from + 1);
@@ -39110,7 +39118,7 @@ function xw(e, t, i) {
39110
39118
  const o = et.get(n.node), l = n.from + 1, u = l + o.map[o.width * o.height - 1];
39111
39119
  a = We.create(r, l + 1, u);
39112
39120
  }
39113
- } else n instanceof Oe && vw(n) ? a = Oe.create(r, n.from) : n instanceof Oe && yw(n) && (a = Oe.create(r, n.$from.start(), n.$from.end()));
39121
+ } else n instanceof Ae && vw(n) ? a = Ae.create(r, n.from) : n instanceof Ae && yw(n) && (a = Ae.create(r, n.$from.start(), n.$from.end()));
39114
39122
  return a && (t || (t = e.tr)).setSelection(a), t;
39115
39123
  }
39116
39124
  const ww = new Ct("fix-tables");
@@ -39538,7 +39546,7 @@ function vc(e) {
39538
39546
  if (n == null) return !1;
39539
39547
  if (i) {
39540
39548
  const r = t.doc.resolve(n);
39541
- i(t.tr.setSelection(Oe.between(r, mw(r))).scrollIntoView());
39549
+ i(t.tr.setSelection(Ae.between(r, mw(r))).scrollIntoView());
39542
39550
  }
39543
39551
  return !0;
39544
39552
  };
@@ -39814,7 +39822,7 @@ function Ww(e, t) {
39814
39822
  e.root.addEventListener("mouseup", s), e.root.addEventListener("dragstart", s), e.root.addEventListener("mousemove", o);
39815
39823
  }
39816
39824
  function Wf(e, t, i) {
39817
- if (!(e.state.selection instanceof Oe)) return null;
39825
+ if (!(e.state.selection instanceof Ae)) return null;
39818
39826
  const { $head: n } = e.state.selection;
39819
39827
  for (let r = n.depth - 1; r >= 0; r--) {
39820
39828
  const a = n.node(r);
@@ -40218,7 +40226,7 @@ const Vr = ({ editor: e }) => {
40218
40226
  const s = lk(a.schema, e, t, i);
40219
40227
  if (r) {
40220
40228
  const o = n.selection.from + 1;
40221
- n.replaceSelectionWith(s).scrollIntoView().setSelection(Oe.near(n.doc.resolve(o)));
40229
+ n.replaceSelectionWith(s).scrollIntoView().setSelection(Ae.near(n.doc.resolve(o)));
40222
40230
  }
40223
40231
  return !0;
40224
40232
  },
@@ -41664,7 +41672,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
41664
41672
  function b() {
41665
41673
  v.value++;
41666
41674
  }
41667
- ze(
41675
+ Re(
41668
41676
  () => i.editor,
41669
41677
  (q, J) => {
41670
41678
  J && ns(J).off("transaction", b), q && ns(q).on("transaction", b);
@@ -41715,7 +41723,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
41715
41723
  const q = o.value.trim();
41716
41724
  if (!q || l.value) return;
41717
41725
  if (o.value = "", h.value) {
41718
- H({ prompt: q, context: x() }, q);
41726
+ U({ prompt: q, context: x() }, q);
41719
41727
  return;
41720
41728
  }
41721
41729
  const J = y.value;
@@ -41729,7 +41737,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
41729
41737
  q
41730
41738
  );
41731
41739
  }
41732
- async function H(q, J) {
41740
+ async function U(q, J) {
41733
41741
  const F = g.value;
41734
41742
  if (!F || l.value) return;
41735
41743
  p == null || p.abort(), p = new AbortController(), l.value = !0, s.value.push({ role: "user", text: J }), s.value.push({ role: "assistant", text: "", streaming: !0 });
@@ -41789,18 +41797,18 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
41789
41797
  function P(q, J) {
41790
41798
  const F = a();
41791
41799
  if (!q.text || !F) return;
41792
- const { state: ne, view: G } = F, { from: z, to: j } = ne.selection;
41800
+ const { state: ne, view: G } = F, { from: z, to: H } = ne.selection;
41793
41801
  if (!q.citations || q.citations.length === 0) {
41794
- G.dispatch(ne.tr.insertText(q.text, z, j)), G.focus(), V(J);
41802
+ G.dispatch(ne.tr.insertText(q.text, z, H)), G.focus(), V(J);
41795
41803
  return;
41796
41804
  }
41797
41805
  const $ = An(F);
41798
41806
  if (!$) {
41799
- G.dispatch(ne.tr.insertText(Uk(q.text), z, j)), G.focus(), V(J);
41807
+ G.dispatch(ne.tr.insertText(Uk(q.text), z, H)), G.focus(), V(J);
41800
41808
  return;
41801
41809
  }
41802
41810
  const pe = new Map(q.citations.map((E) => [E.ref, E])), ce = Hk(q.text, pe, $), ae = ne.schema, le = ce.map((E) => typeof E == "string" ? ae.text(E) : ae.nodeFromJSON(E)).filter((E) => !!E), ee = new de(ie.from(le), 0, 0);
41803
- G.dispatch(ne.tr.replace(z, j, ee)), G.focus(), V(J);
41811
+ G.dispatch(ne.tr.replace(z, H, ee)), G.focus(), V(J);
41804
41812
  }
41805
41813
  function Q() {
41806
41814
  p == null || p.abort(), l.value = !1, n("close");
@@ -41826,11 +41834,11 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
41826
41834
  Y(S(Yt), { class: "h-4 w-4" })
41827
41835
  ], 8, Wk)
41828
41836
  ]),
41829
- m.value ? (I(), D(Te, { key: 1 }, [
41837
+ m.value ? (I(), D(Ee, { key: 1 }, [
41830
41838
  w("div", Xk, [
41831
41839
  w("span", Jk, N(S(r)("sidebars.ai.quickMacros")), 1),
41832
41840
  w("div", Zk, [
41833
- (I(!0), D(Te, null, De(L.value, (F) => (I(), D("button", {
41841
+ (I(!0), D(Ee, null, Le(L.value, (F) => (I(), D("button", {
41834
41842
  key: F.label,
41835
41843
  type: "button",
41836
41844
  disabled: l.value || F.needsSelection && !y.value || "disabled" in F && F.disabled,
@@ -41857,7 +41865,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
41857
41865
  Y(S(xn), { class: "mb-2 h-6 w-6 text-cyan-500 opacity-30" }),
41858
41866
  w("p", e_, N(S(r)("sidebars.ai.noDraft")), 1)
41859
41867
  ])) : se("", !0),
41860
- (I(!0), D(Te, null, De(s.value, (F, ne) => (I(), D("div", {
41868
+ (I(!0), D(Ee, null, Le(s.value, (F, ne) => (I(), D("div", {
41861
41869
  key: ne,
41862
41870
  class: ge(["flex flex-col gap-1", F.role === "user" ? "items-end" : "items-start"])
41863
41871
  }, [
@@ -41880,7 +41888,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
41880
41888
  F.streaming ? (I(), D("span", i_, "▌")) : se("", !0)
41881
41889
  ], 2),
41882
41890
  F.role === "assistant" && F.citations && F.citations.length > 0 ? (I(), D("div", n_, [
41883
- (I(!0), D(Te, null, De(F.citations, (G) => (I(), D("span", {
41891
+ (I(!0), D(Ee, null, Le(F.citations, (G) => (I(), D("span", {
41884
41892
  key: G.ref,
41885
41893
  class: "inline-flex items-center gap-1 rounded-full border border-cyan-500/30 bg-cyan-500/5 px-2 py-0.5 text-[10px] font-semibold text-cyan-700 dark:border-cyan-400/30 dark:bg-cyan-500/10 dark:text-cyan-300"
41886
41894
  }, [
@@ -41913,17 +41921,17 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
41913
41921
  w("div", o_, [
41914
41922
  w("form", {
41915
41923
  class: "space-y-2",
41916
- onSubmit: ke(A, ["prevent"])
41924
+ onSubmit: _e(A, ["prevent"])
41917
41925
  }, [
41918
- Se(w("textarea", {
41926
+ Ce(w("textarea", {
41919
41927
  "onUpdate:modelValue": J[0] || (J[0] = (F) => o.value = F),
41920
41928
  rows: "2",
41921
41929
  disabled: l.value,
41922
41930
  placeholder: h.value ? S(r)("sidebars.ai.draftPlaceholder") : S(r)("sidebars.ai.promptPlaceholder"),
41923
41931
  class: "w-full min-h-[55px] resize-none rounded-xl border border-slate-200 bg-white p-2.5 text-xs text-slate-800 transition-all focus:border-cyan-500/50 focus:shadow-cyan focus:outline-none disabled:opacity-60 dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-100 dark:focus:border-cyan-500/30",
41924
- onKeydown: ei(ke(A, ["exact", "prevent"]), ["enter"])
41932
+ onKeydown: ei(_e(A, ["exact", "prevent"]), ["enter"])
41925
41933
  }, null, 40, l_), [
41926
- [Re, o.value]
41934
+ [De, o.value]
41927
41935
  ]),
41928
41936
  w("div", c_, [
41929
41937
  w("button", {
@@ -42022,7 +42030,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42022
42030
  ])) : se("", !0)
42023
42031
  ]),
42024
42032
  w("div", x_, [
42025
- (I(!0), D(Te, null, De(u.value, (h) => (I(), D("div", {
42033
+ (I(!0), D(Ee, null, Le(u.value, (h) => (I(), D("div", {
42026
42034
  key: h.id,
42027
42035
  class: "relative space-y-3 rounded-2xl border border-slate-200/60 bg-slate-50/60 p-4 transition-all hover:border-cyan-500/30 hover:shadow-cyan dark:border-white/5 dark:bg-[#02040a]/40"
42028
42036
  }, [
@@ -42050,7 +42058,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42050
42058
  h.anchorText ? (I(), D("div", O_, N(S(r)("sidebars.comments.quote")) + ' "' + N(h.anchorText) + '" ', 1)) : se("", !0),
42051
42059
  w("p", A_, N(h.content), 1),
42052
42060
  h.replies.length > 0 ? (I(), D("div", T_, [
42053
- (I(!0), D(Te, null, De(h.replies, (v) => (I(), D("div", {
42061
+ (I(!0), D(Ee, null, Le(h.replies, (v) => (I(), D("div", {
42054
42062
  key: v.id,
42055
42063
  class: "space-y-1"
42056
42064
  }, [
@@ -42067,14 +42075,14 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42067
42075
  ])) : se("", !0),
42068
42076
  h.resolved ? se("", !0) : (I(), D("div", z_, [
42069
42077
  o.value === h.id ? (I(), D("div", R_, [
42070
- Se(w("input", {
42078
+ Ce(w("input", {
42071
42079
  "onUpdate:modelValue": (v) => s.value[h.id] = v,
42072
42080
  type: "text",
42073
42081
  placeholder: S(r)("sidebars.comments.reply"),
42074
42082
  class: "flex-1 rounded-lg border border-slate-200 bg-white px-2.5 py-1.5 text-xs text-slate-800 focus:border-cyan-500/50 focus:outline-none dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-100 dark:focus:border-cyan-500/30",
42075
42083
  onKeydown: ei((v) => d(h.id), ["enter"])
42076
42084
  }, null, 40, D_), [
42077
- [Re, s.value[h.id]]
42085
+ [De, s.value[h.id]]
42078
42086
  ]),
42079
42087
  w("button", {
42080
42088
  type: "button",
@@ -42106,15 +42114,15 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42106
42114
  l.value === "active" ? (I(), D("div", j_, [
42107
42115
  w("form", {
42108
42116
  class: "space-y-2",
42109
- onSubmit: ke(f, ["prevent"])
42117
+ onSubmit: _e(f, ["prevent"])
42110
42118
  }, [
42111
- Se(w("textarea", {
42119
+ Ce(w("textarea", {
42112
42120
  "onUpdate:modelValue": g[2] || (g[2] = (h) => a.value = h),
42113
42121
  rows: "2",
42114
42122
  placeholder: e.selectedTextSnippet ? S(r)("sidebars.comments.commentOnSelection") : S(r)("sidebars.comments.generalComment"),
42115
42123
  class: "w-full min-h-[60px] resize-none rounded-xl border border-slate-200 bg-white p-2.5 text-xs text-slate-800 transition-all focus:border-cyan-500/50 focus:shadow-cyan focus:outline-none dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-100 dark:focus:border-cyan-500/30"
42116
42124
  }, null, 8, q_), [
42117
- [Re, a.value]
42125
+ [De, a.value]
42118
42126
  ]),
42119
42127
  w("div", V_, [
42120
42128
  w("span", $_, N(e.selectedTextSnippet ? S(r)("sidebars.comments.anchoredComment") : S(r)("sidebars.comments.general")), 1),
@@ -42189,7 +42197,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42189
42197
  ])
42190
42198
  ])) : se("", !0),
42191
42199
  w("div", rS, [
42192
- (I(!0), D(Te, null, De(l.value, (d) => (I(), D("div", {
42200
+ (I(!0), D(Ee, null, Le(l.value, (d) => (I(), D("div", {
42193
42201
  key: d.versionIndex,
42194
42202
  class: ge(["space-y-2.5 rounded-2xl border p-4 transition-all", e.activePreviewIndex === d.versionIndex ? "border-cyan-500/40 bg-cyan-500/5 shadow-cyan dark:border-cyan-500/30" : "border-slate-200/60 bg-slate-50/60 hover:border-cyan-500/30 dark:border-white/5 dark:bg-[#02040a]/40 dark:hover:border-white/10"])
42195
42203
  }, [
@@ -42237,16 +42245,16 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42237
42245
  s.value ? (I(), D("form", {
42238
42246
  key: 0,
42239
42247
  class: "space-y-2 animate-fadeIn",
42240
- onSubmit: ke(o, ["prevent"])
42248
+ onSubmit: _e(o, ["prevent"])
42241
42249
  }, [
42242
- Se(w("input", {
42250
+ Ce(w("input", {
42243
42251
  "onUpdate:modelValue": f[2] || (f[2] = (d) => a.value = d),
42244
42252
  type: "text",
42245
42253
  required: "",
42246
42254
  placeholder: S(r)("sidebars.history.snapshotPlaceholder"),
42247
42255
  class: "w-full rounded-xl border border-slate-200 bg-white px-2.5 py-1.5 text-xs text-slate-800 transition-all focus:border-cyan-500/50 focus:shadow-cyan focus:outline-none dark:border-white/10 dark:bg-white/[0.02] dark:text-slate-100 dark:focus:border-cyan-500/30"
42248
42256
  }, null, 8, bS), [
42249
- [Re, a.value]
42257
+ [De, a.value]
42250
42258
  ]),
42251
42259
  w("div", gS, [
42252
42260
  w("button", {
@@ -42289,7 +42297,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42289
42297
  return (a, s) => e.isOpen ? (I(), D("div", {
42290
42298
  key: 0,
42291
42299
  class: "fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 p-4 backdrop-blur-sm",
42292
- onClick: s[1] || (s[1] = ke((o) => n("close"), ["self"]))
42300
+ onClick: s[1] || (s[1] = _e((o) => n("close"), ["self"]))
42293
42301
  }, [
42294
42302
  w("div", xS, [
42295
42303
  w("div", wS, [
@@ -42386,9 +42394,9 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42386
42394
  emits: ["close", "copy-link"],
42387
42395
  setup(e, { emit: t }) {
42388
42396
  const { t: i } = Mt(), n = e, r = t, a = K(n.defaultRecipient || ""), s = K(""), o = K(""), l = K(!1), u = K(!1), f = ue(() => i("editor.email.defaultSubject", { title: n.documentTitle })), d = ue(() => i("editor.email.defaultBody", { url: n.shareUrl })), p = ue(() => s.value === f.value), m = ue(() => o.value === d.value);
42389
- ze(() => n.documentTitle, () => {
42397
+ Re(() => n.documentTitle, () => {
42390
42398
  s.value = f.value;
42391
- }, { immediate: !0 }), ze(() => n.shareUrl, () => {
42399
+ }, { immediate: !0 }), Re(() => n.shareUrl, () => {
42392
42400
  o.value = d.value;
42393
42401
  }, { immediate: !0 });
42394
42402
  const g = ue(() => {
@@ -42404,12 +42412,12 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42404
42412
  function v() {
42405
42413
  a.value = n.defaultRecipient || "", s.value = f.value, o.value = d.value, l.value = !1, u.value = !1;
42406
42414
  }
42407
- return ze(() => n.isOpen, (b) => {
42415
+ return Re(() => n.isOpen, (b) => {
42408
42416
  b && v();
42409
42417
  }), (b, y) => e.isOpen ? (I(), D("div", {
42410
42418
  key: 0,
42411
42419
  class: "fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 p-4 backdrop-blur-sm",
42412
- onClick: y[10] || (y[10] = ke((x) => r("close"), ["self"]))
42420
+ onClick: y[10] || (y[10] = _e((x) => r("close"), ["self"]))
42413
42421
  }, [
42414
42422
  w("div", n2, [
42415
42423
  w("div", r2, [
@@ -42449,18 +42457,18 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42449
42457
  w("div", d2, [
42450
42458
  w("div", null, [
42451
42459
  w("label", m2, N(S(i)("editor.email.to")), 1),
42452
- Se(w("input", {
42460
+ Ce(w("input", {
42453
42461
  "onUpdate:modelValue": y[1] || (y[1] = (x) => a.value = x),
42454
42462
  type: "email",
42455
42463
  class: "w-full rounded-md border border-slate-300 bg-white px-3 py-2 text-xs text-slate-700 focus:border-cyan-500 focus:outline-none dark:border-slate-600 dark:bg-slate-900 dark:text-slate-300",
42456
42464
  placeholder: S(i)("editor.email.toPlaceholder")
42457
42465
  }, null, 8, h2), [
42458
- [Re, a.value]
42466
+ [De, a.value]
42459
42467
  ])
42460
42468
  ]),
42461
42469
  w("div", null, [
42462
42470
  w("label", b2, N(S(i)("editor.email.subject")), 1),
42463
- Se(w("input", {
42471
+ Ce(w("input", {
42464
42472
  "onUpdate:modelValue": y[2] || (y[2] = (x) => s.value = x),
42465
42473
  type: "text",
42466
42474
  class: ge([
@@ -42470,12 +42478,12 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42470
42478
  onFocus: y[3] || (y[3] = (x) => l.value = !0),
42471
42479
  onBlur: y[4] || (y[4] = (x) => l.value = !1)
42472
42480
  }, null, 34), [
42473
- [Re, s.value]
42481
+ [De, s.value]
42474
42482
  ])
42475
42483
  ]),
42476
42484
  w("div", null, [
42477
42485
  w("label", g2, N(S(i)("editor.email.body")), 1),
42478
- Se(w("textarea", {
42486
+ Ce(w("textarea", {
42479
42487
  "onUpdate:modelValue": y[5] || (y[5] = (x) => o.value = x),
42480
42488
  rows: "4",
42481
42489
  class: ge([
@@ -42485,7 +42493,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42485
42493
  onFocus: y[6] || (y[6] = (x) => u.value = !0),
42486
42494
  onBlur: y[7] || (y[7] = (x) => u.value = !1)
42487
42495
  }, null, 34), [
42488
- [Re, o.value]
42496
+ [De, o.value]
42489
42497
  ])
42490
42498
  ])
42491
42499
  ]),
@@ -42519,9 +42527,9 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42519
42527
  }), f = () => {
42520
42528
  n.editor && (l.value = wp(n.editor));
42521
42529
  };
42522
- ze(() => n.editor, (y, x) => {
42530
+ Re(() => n.editor, (y, x) => {
42523
42531
  x == null || x.off("transaction", f), y == null || y.on("transaction", f);
42524
- }), ze(() => n.isOpen, async (y) => {
42532
+ }), Re(() => n.isOpen, async (y) => {
42525
42533
  var x, k;
42526
42534
  if (n.editor)
42527
42535
  if (y) {
@@ -42533,7 +42541,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42533
42541
  function d() {
42534
42542
  n.editor && (yp(n.editor, s.value), f());
42535
42543
  }
42536
- ze(s, d);
42544
+ Re(s, d);
42537
42545
  function p() {
42538
42546
  n.editor && kp(n.editor);
42539
42547
  }
@@ -42563,7 +42571,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42563
42571
  "aria-label": S(i)("editor.findReplace.title")
42564
42572
  }, [
42565
42573
  w("div", k2, [
42566
- Se(w("input", {
42574
+ Ce(w("input", {
42567
42575
  ref_key: "findInput",
42568
42576
  ref: a,
42569
42577
  "onUpdate:modelValue": x[0] || (x[0] = (k) => s.value = k),
@@ -42572,7 +42580,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42572
42580
  class: "min-w-0 flex-1 rounded-lg border border-slate-200 bg-transparent px-2.5 py-1.5 text-sm text-slate-800 focus:border-cyan-500 focus:outline-none dark:border-slate-600 dark:text-slate-100",
42573
42581
  onKeydown: v
42574
42582
  }, null, 40, _2), [
42575
- [Re, s.value]
42583
+ [De, s.value]
42576
42584
  ]),
42577
42585
  w("span", S2, N(u.value), 1),
42578
42586
  w("button", {
@@ -42603,14 +42611,14 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42603
42611
  ], 8, A2)
42604
42612
  ]),
42605
42613
  w("div", T2, [
42606
- Se(w("input", {
42614
+ Ce(w("input", {
42607
42615
  "onUpdate:modelValue": x[1] || (x[1] = (k) => o.value = k),
42608
42616
  type: "text",
42609
42617
  placeholder: S(i)("editor.findReplace.replacePlaceholder"),
42610
42618
  class: "min-w-0 flex-1 rounded-lg border border-slate-200 bg-transparent px-2.5 py-1.5 text-sm text-slate-800 focus:border-cyan-500 focus:outline-none dark:border-slate-600 dark:text-slate-100",
42611
- onKeydown: ei(ke(g, ["prevent"]), ["enter"])
42619
+ onKeydown: ei(_e(g, ["prevent"]), ["enter"])
42612
42620
  }, null, 40, E2), [
42613
- [Re, o.value]
42621
+ [De, o.value]
42614
42622
  ]),
42615
42623
  w("button", {
42616
42624
  type: "button",
@@ -42641,7 +42649,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42641
42649
  emits: ["apply", "remove", "close"],
42642
42650
  setup(e, { emit: t }) {
42643
42651
  const { t: i } = Mt(), n = e, r = t, a = K(""), s = K(""), o = K("");
42644
- ze(
42652
+ Re(
42645
42653
  () => n.isOpen,
42646
42654
  (g) => {
42647
42655
  g && (a.value = n.initialText ?? "", s.value = n.initialUrl ?? "https://", o.value = "");
@@ -42681,7 +42689,7 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42681
42689
  return (g, h) => e.isOpen ? (I(), D("div", {
42682
42690
  key: 0,
42683
42691
  class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
42684
- onClick: ke(p, ["self"]),
42692
+ onClick: _e(p, ["self"]),
42685
42693
  onKeydown: m
42686
42694
  }, [
42687
42695
  w("div", z2, [
@@ -42700,26 +42708,26 @@ const jk = { class: "ai-sidebar flex h-full w-80 flex-shrink-0 flex-col border-l
42700
42708
  ]),
42701
42709
  w("div", L2, [
42702
42710
  w("label", P2, N(S(i)("editor.linkDialog.text")), 1),
42703
- Se(w("input", {
42711
+ Ce(w("input", {
42704
42712
  "onUpdate:modelValue": h[0] || (h[0] = (v) => a.value = v),
42705
42713
  type: "text",
42706
42714
  placeholder: S(i)("editor.linkDialog.textPlaceholder"),
42707
42715
  class: "w-full rounded-md border border-slate-300 bg-white px-3 py-2 text-xs text-slate-700 dark:border-slate-600 dark:bg-slate-900 dark:text-slate-300",
42708
42716
  onKeydown: ei(f, ["enter"])
42709
42717
  }, null, 40, B2), [
42710
- [Re, a.value]
42718
+ [De, a.value]
42711
42719
  ])
42712
42720
  ]),
42713
42721
  w("div", F2, [
42714
42722
  w("label", U2, N(S(i)("editor.linkDialog.url")), 1),
42715
- Se(w("input", {
42723
+ Ce(w("input", {
42716
42724
  "onUpdate:modelValue": h[1] || (h[1] = (v) => s.value = v),
42717
42725
  type: "text",
42718
42726
  placeholder: S(i)("editor.linkDialog.urlPlaceholder"),
42719
42727
  class: "w-full rounded-md border border-slate-300 bg-white px-3 py-2 text-xs text-slate-700 dark:border-slate-600 dark:bg-slate-900 dark:text-slate-300",
42720
42728
  onKeydown: ei(f, ["enter"])
42721
42729
  }, null, 40, H2), [
42722
- [Re, s.value]
42730
+ [De, s.value]
42723
42731
  ]),
42724
42732
  o.value ? (I(), D("p", j2, N(o.value), 1)) : se("", !0)
42725
42733
  ]),
@@ -42843,18 +42851,18 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
42843
42851
  setup(e, { emit: t }) {
42844
42852
  var rl;
42845
42853
  const i = e, n = t, { locale: r, setLocale: a, t: s } = Bp(i.locale);
42846
- ze(
42854
+ Re(
42847
42855
  () => i.locale,
42848
42856
  (T) => {
42849
42857
  T && T !== r.value && a(T);
42850
42858
  }
42851
- ), ze(r, (T) => {
42859
+ ), Re(r, (T) => {
42852
42860
  n("update:locale", T);
42853
42861
  });
42854
42862
  const o = K({ top: 72, bottom: 72, left: 90, right: 90 }), l = K("portrait"), u = K(i.pageSize ?? "a4"), f = K(i.pageless ?? !1), d = ue(() => {
42855
42863
  const T = Ip(u.value) ?? as[0];
42856
- let M = T.pageWidth, U = T.pageHeight;
42857
- return l.value === "landscape" && ([M, U] = [U, M]), { pageHeight: U, pageWidth: M, margins: { ...o.value } };
42864
+ let M = T.pageWidth, j = T.pageHeight;
42865
+ return l.value === "landscape" && ([M, j] = [j, M]), { pageHeight: j, pageWidth: M, margins: { ...o.value } };
42858
42866
  }), { isDark: p } = mo(), m = ue(() => i.virtualPages === !0), g = ue(() => ({
42859
42867
  enabled: !f.value && !m.value,
42860
42868
  pageHeight: d.value.pageHeight,
@@ -42884,20 +42892,20 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
42884
42892
  v.tabs.forEach((T) => {
42885
42893
  A.value[T.id] = T.content;
42886
42894
  });
42887
- const H = K(v.activeTabId), _ = ue(() => A.value[H.value]), C = K(!1), R = K(null), L = K(null), W = K(localStorage.getItem("docflow:view:showRuler") !== "false"), V = K(!1);
42888
- ze(W, (T) => {
42895
+ const U = K(v.activeTabId), _ = ue(() => A.value[U.value]), C = K(!1), R = K(null), L = K(null), W = K(localStorage.getItem("docflow:view:showRuler") !== "false"), V = K(!1);
42896
+ Re(W, (T) => {
42889
42897
  localStorage.setItem("docflow:view:showRuler", T ? "true" : "false");
42890
42898
  });
42891
42899
  const P = K(0), Q = K(0), q = K("saved"), J = K(Date.now()), F = K(null), ne = ue(() => {
42892
42900
  const T = [];
42893
42901
  for (const M of i.plugins)
42894
- for (const U of M.slashCommands || [])
42895
- T.push({ name: U.name, command: U.command });
42902
+ for (const j of M.slashCommands || [])
42903
+ T.push({ name: j.name, command: j.command });
42896
42904
  return T;
42897
42905
  }), G = () => {
42898
42906
  const T = {
42899
42907
  type: "tabbed-doc",
42900
- activeTabId: H.value,
42908
+ activeTabId: U.value,
42901
42909
  tabs: O.value.map((M) => ({ id: M.id, label: M.label, content: A.value[M.id] })),
42902
42910
  headerLeft: b.value,
42903
42911
  headerRight: y.value,
@@ -42913,7 +42921,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
42913
42921
  const T = (M = i.citation) == null ? void 0 : M.sources;
42914
42922
  return Array.isArray(T) ? [...T] : typeof T == "function" ? [...T()] : [];
42915
42923
  })()
42916
- ), j = K(((rl = i.citation) == null ? void 0 : rl.style) || "chicago-notes-bibliography");
42924
+ ), H = K(((rl = i.citation) == null ? void 0 : rl.style) || "chicago-notes-bibliography");
42917
42925
  let $ = null;
42918
42926
  const pe = K(!1), ce = (T) => {
42919
42927
  $ == null || $(T), $ = null, pe.value = !1;
@@ -42940,11 +42948,11 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
42940
42948
  getPageMap: () => /* @__PURE__ */ new Map(),
42941
42949
  paginationOptions: g.value,
42942
42950
  onUpdate: (T) => {
42943
- A.value[H.value] = T, G();
42951
+ A.value[U.value] = T, G();
42944
42952
  }
42945
42953
  }), He = () => {
42946
- var T, M, U;
42947
- return ((U = (M = (T = E.value) == null ? void 0 : T.storage) == null ? void 0 : M.citation) == null ? void 0 : U.engine) ?? null;
42954
+ var T, M, j;
42955
+ return ((j = (M = (T = E.value) == null ? void 0 : T.storage) == null ? void 0 : M.citation) == null ? void 0 : j.engine) ?? null;
42948
42956
  }, Fe = () => {
42949
42957
  var T;
42950
42958
  (T = He()) == null || T.updateSources(z.value), n("citation-sources-change", z.value);
@@ -42956,12 +42964,12 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
42956
42964
  z.value = z.value.filter((M) => M.id !== T), Fe();
42957
42965
  }, ni = (T) => {
42958
42966
  var M;
42959
- j.value = T, (M = He()) == null || M.setStyle(T), n("update:citation-style", T);
42967
+ H.value = T, (M = He()) == null || M.setStyle(T), n("update:citation-style", T);
42960
42968
  }, Ve = (T) => {
42961
- var M, U;
42962
- $ ? (ce(T), L.value = null) : (U = (M = X.value).insertCitation) == null || U.call(M, { sourceId: T });
42969
+ var M, j;
42970
+ $ ? (ce(T), L.value = null) : (j = (M = X.value).insertCitation) == null || j.call(M, { sourceId: T });
42963
42971
  };
42964
- ze(L, (T, M) => {
42972
+ Re(L, (T, M) => {
42965
42973
  M === "references" && T !== "references" && ce(null);
42966
42974
  });
42967
42975
  const xt = K(!1), Z = K(""), B = ue(
@@ -42974,13 +42982,13 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
42974
42982
  if (!(!(M != null && M.onImportDoi) || xt.value)) {
42975
42983
  xt.value = !0, Z.value = "";
42976
42984
  try {
42977
- const U = await M.onImportDoi(T);
42978
- if (!U) {
42985
+ const j = await M.onImportDoi(T);
42986
+ if (!j) {
42979
42987
  Z.value = s("sidebars.references.import.doiFailed");
42980
42988
  return;
42981
42989
  }
42982
- const me = z.value.some((he) => he.id === U.id);
42983
- z.value = me ? z.value.map((he) => he.id === U.id ? U : he) : [...z.value, U], Fe(), Z.value = s("sidebars.references.import.doiSuccess");
42990
+ const me = z.value.some((he) => he.id === j.id);
42991
+ z.value = me ? z.value.map((he) => he.id === j.id ? j : he) : [...z.value, j], Fe(), Z.value = s("sidebars.references.import.doiSuccess");
42984
42992
  } catch {
42985
42993
  Z.value = s("sidebars.references.import.doiFailed");
42986
42994
  } finally {
@@ -42992,13 +43000,13 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
42992
43000
  if (!(!(M != null && M.onImportBibliography) || xt.value)) {
42993
43001
  xt.value = !0, Z.value = "";
42994
43002
  try {
42995
- const { imported: U, failed: me } = await M.onImportBibliography(T);
42996
- if (U.length > 0) {
42997
- const he = new Map(z.value.map((Le) => [Le.id, Le]));
42998
- for (const Le of U) he.set(Le.id, Le);
43003
+ const { imported: j, failed: me } = await M.onImportBibliography(T);
43004
+ if (j.length > 0) {
43005
+ const he = new Map(z.value.map((Ie) => [Ie.id, Ie]));
43006
+ for (const Ie of j) he.set(Ie.id, Ie);
42999
43007
  z.value = [...he.values()], Fe();
43000
43008
  }
43001
- Z.value = me > 0 ? s("sidebars.references.import.partial").replace("{ok}", String(U.length)).replace("{failed}", String(me)) : s("sidebars.references.import.batchSuccess").replace("{count}", String(U.length));
43009
+ Z.value = me > 0 ? s("sidebars.references.import.partial").replace("{ok}", String(j.length)).replace("{failed}", String(me)) : s("sidebars.references.import.batchSuccess").replace("{count}", String(j.length));
43002
43010
  } catch {
43003
43011
  Z.value = s("sidebars.references.import.failed");
43004
43012
  } finally {
@@ -43011,10 +43019,21 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43011
43019
  Q.value = T.length, P.value = T.trim() ? T.trim().split(/\s+/).length : 0;
43012
43020
  }, ot = () => {
43013
43021
  if (!E.value) return null;
43014
- const { from: T, to: M } = E.value.state.selection;
43022
+ const { from: T, to: M, head: j } = E.value.state.selection;
43015
43023
  if (T === M) return null;
43016
- const U = E.value.view.coordsAtPos(T);
43017
- return U ? { top: U.top - 48, left: U.left + (U.right - U.left) / 2 } : null;
43024
+ const me = E.value.view.coordsAtPos(j);
43025
+ if (!me) return null;
43026
+ const he = 12, Ie = 180, qe = me.top - 48, Te = (me.left + me.right) / 2;
43027
+ if (typeof window > "u")
43028
+ return { top: Math.max(he, qe), left: Te };
43029
+ const ye = Math.min(
43030
+ Ie,
43031
+ Math.max(0, window.innerWidth / 2 - he)
43032
+ ), Oe = he + ye, ve = window.innerWidth - he - ye, ke = Math.max(he, window.innerHeight - 48);
43033
+ return {
43034
+ top: Math.min(ke, Math.max(he, qe)),
43035
+ left: Math.min(ve, Math.max(Oe, Te))
43036
+ };
43018
43037
  }, ri = () => {
43019
43038
  if (!E.value) {
43020
43039
  C.value = !1, R.value = null;
@@ -43050,9 +43069,9 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43050
43069
  config: ln.value,
43051
43070
  bufferPages: 2
43052
43071
  });
43053
- ze([Mn, cn], () => {
43072
+ Re([Mn, cn], () => {
43054
43073
  m.value && cn.value && (zt.value = Mn.value);
43055
- }), ze(m, (T) => {
43074
+ }), Re(m, (T) => {
43056
43075
  T && ur();
43057
43076
  });
43058
43077
  const ji = () => {
@@ -43063,26 +43082,26 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43063
43082
  const T = E.value.view.dom, M = T.querySelector("[data-rm-pagination]");
43064
43083
  M ? zt.value = M.children.length || 1 : zt.value = 1;
43065
43084
  try {
43066
- const { selection: U } = E.value.state, me = E.value.view.coordsAtPos(U.head);
43085
+ const { selection: j } = E.value.state, me = E.value.view.coordsAtPos(j.head);
43067
43086
  if (me && M) {
43068
- const he = Array.from(M.querySelectorAll(".rm-page-break")), Le = T.getBoundingClientRect(), qe = me.top - Le.top + T.scrollTop;
43069
- let Ee = 1, ye = !1;
43070
- for (let Ae = 0; Ae < he.length; Ae++) {
43071
- const ve = he[Ae].querySelector(".breaker");
43087
+ const he = Array.from(M.querySelectorAll(".rm-page-break")), Ie = T.getBoundingClientRect(), qe = me.top - Ie.top + T.scrollTop;
43088
+ let Te = 1, ye = !1;
43089
+ for (let Oe = 0; Oe < he.length; Oe++) {
43090
+ const ve = he[Oe].querySelector(".breaker");
43072
43091
  if (ve instanceof HTMLElement && qe < ve.offsetTop) {
43073
- Ze.value = Ee, ye = !0;
43092
+ Ze.value = Te, ye = !0;
43074
43093
  break;
43075
43094
  }
43076
- Ee++;
43095
+ Te++;
43077
43096
  }
43078
- ye || (Ze.value = Ee);
43097
+ ye || (Ze.value = Te);
43079
43098
  } else
43080
43099
  Ze.value = 1;
43081
43100
  } catch {
43082
43101
  Ze.value = 1;
43083
43102
  }
43084
43103
  };
43085
- ze(d, (T) => {
43104
+ Re(d, (T) => {
43086
43105
  E.value && (E.value.commands.updatePageHeight(T.pageHeight), E.value.commands.updatePageWidth(T.pageWidth), E.value.commands.updateMargins({
43087
43106
  top: T.margins.top,
43088
43107
  bottom: T.margins.bottom,
@@ -43095,7 +43114,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43095
43114
  ji(), qi();
43096
43115
  }, 60)));
43097
43116
  };
43098
- ze(
43117
+ Re(
43099
43118
  () => i.pageless,
43100
43119
  (T) => fr(T ?? !1)
43101
43120
  );
@@ -43105,22 +43124,22 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43105
43124
  return hr.value === "startAt" && (M = T + br.value), String(M);
43106
43125
  }, $t = () => {
43107
43126
  if (!E.value || !oe.value) return;
43108
- const T = String(zt.value), M = b.value.replace(/{total}/g, T), U = y.value.replace(/{total}/g, T), me = x.value.replace(/{total}/g, T), he = k.value.replace(/{total}/g, T);
43109
- E.value.commands.updateHeaderContent(M, U), E.value.commands.updateFooterContent(me, he), E.value.view.dispatch(E.value.state.tr), setTimeout(() => {
43127
+ const T = String(zt.value), M = b.value.replace(/{total}/g, T), j = y.value.replace(/{total}/g, T), me = x.value.replace(/{total}/g, T), he = k.value.replace(/{total}/g, T);
43128
+ E.value.commands.updateHeaderContent(M, j), E.value.commands.updateFooterContent(me, he), E.value.view.dispatch(E.value.state.tr), setTimeout(() => {
43110
43129
  requestAnimationFrame(() => {
43111
43130
  if (!E.value) return;
43112
- const Le = `${pi.value * 37.795}px`, qe = `${Zt.value * 37.795}px`;
43113
- document.documentElement.style.setProperty("--rm-header-margin-top", Le), document.documentElement.style.setProperty("--rm-footer-margin-bottom", qe);
43114
- const Ee = document.querySelector(".rm-with-pagination");
43115
- Ee && (Ee.style.setProperty("--rm-header-margin-top", Le), Ee.style.setProperty("--rm-footer-margin-bottom", qe));
43131
+ const Ie = `${pi.value * 37.795}px`, qe = `${Zt.value * 37.795}px`;
43132
+ document.documentElement.style.setProperty("--rm-header-margin-top", Ie), document.documentElement.style.setProperty("--rm-footer-margin-bottom", qe);
43133
+ const Te = document.querySelector(".rm-with-pagination");
43134
+ Te && (Te.style.setProperty("--rm-header-margin-top", Ie), Te.style.setProperty("--rm-footer-margin-bottom", qe));
43116
43135
  const ye = Array.from(document.querySelectorAll(".rm-with-pagination .page, .rm-with-pagination .rm-page, .rm-page-break"));
43117
43136
  if (ye.length > 0)
43118
- ye.forEach((Ae, ve) => {
43119
- const Ce = Ae.querySelector(".rm-page-header"), Me = Ae.querySelector(".rm-page-footer"), Pe = ve === 0, we = (ve + 1) % 2 === 0, Be = Ya(ve);
43120
- if (Ce) {
43121
- Ce.style.marginTop = Le;
43122
- const Qe = Ce.querySelector(".rm-page-header-left"), lt = Ce.querySelector(".rm-page-header-right");
43123
- let Bt = M, Qt = U;
43137
+ ye.forEach((Oe, ve) => {
43138
+ const ke = Oe.querySelector(".rm-page-header"), Me = Oe.querySelector(".rm-page-footer"), Pe = ve === 0, we = (ve + 1) % 2 === 0, Be = Ya(ve);
43139
+ if (ke) {
43140
+ ke.style.marginTop = Ie;
43141
+ const Qe = ke.querySelector(".rm-page-header-left"), lt = ke.querySelector(".rm-page-header-right");
43142
+ let Bt = M, Qt = j;
43124
43143
  dt.value && Pe ? (Bt = fi.value.replace(/{total}/g, T), Qt = Vt.value.replace(/{total}/g, T)) : mt.value && we && (Bt = Ai.value.replace(/{total}/g, T), Qt = pr.value.replace(/{total}/g, T)), Qe && (Qe.innerHTML = Bt.replace(/{page}/g, Be)), lt && (lt.innerHTML = Qt.replace(/{page}/g, Be));
43125
43144
  }
43126
43145
  if (Me) {
@@ -43130,36 +43149,36 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43130
43149
  }
43131
43150
  });
43132
43151
  else {
43133
- const Ae = document.querySelectorAll(".rm-page-header"), ve = document.querySelectorAll(".rm-page-footer");
43134
- Ae.forEach((Ce, Me) => {
43135
- Ce.style.marginTop = Le;
43136
- const Pe = Me === 0, we = (Me + 1) % 2 === 0, Be = Ya(Me), Qe = Ce.querySelector(".rm-page-header-left"), lt = Ce.querySelector(".rm-page-header-right");
43137
- let Bt = M, Qt = U;
43152
+ const Oe = document.querySelectorAll(".rm-page-header"), ve = document.querySelectorAll(".rm-page-footer");
43153
+ Oe.forEach((ke, Me) => {
43154
+ ke.style.marginTop = Ie;
43155
+ const Pe = Me === 0, we = (Me + 1) % 2 === 0, Be = Ya(Me), Qe = ke.querySelector(".rm-page-header-left"), lt = ke.querySelector(".rm-page-header-right");
43156
+ let Bt = M, Qt = j;
43138
43157
  dt.value && Pe ? (Bt = fi.value.replace(/{total}/g, T), Qt = Vt.value.replace(/{total}/g, T)) : mt.value && we && (Bt = Ai.value.replace(/{total}/g, T), Qt = pr.value.replace(/{total}/g, T)), Qe && (Qe.innerHTML = Bt.replace(/{page}/g, Be)), lt && (lt.innerHTML = Qt.replace(/{page}/g, Be));
43139
- }), ve.forEach((Ce, Me) => {
43140
- Ce.style.marginBottom = qe;
43141
- const Pe = Ya(Me), we = Ce.querySelector(".rm-page-footer-left"), Be = Ce.querySelector(".rm-page-footer-right");
43158
+ }), ve.forEach((ke, Me) => {
43159
+ ke.style.marginBottom = qe;
43160
+ const Pe = Ya(Me), we = ke.querySelector(".rm-page-footer-left"), Be = ke.querySelector(".rm-page-footer-right");
43142
43161
  we && (we.innerHTML = me.replace(/{page}/g, Pe)), Be && (Be.innerHTML = he.replace(/{page}/g, Pe));
43143
43162
  });
43144
43163
  }
43145
43164
  });
43146
43165
  }, 50);
43147
43166
  };
43148
- ze(dt, () => {
43167
+ Re(dt, () => {
43149
43168
  $t();
43150
- }), ze([mt, pi, Zt, dr, mr, hr, br], () => {
43169
+ }), Re([mt, pi, Zt, dr, mr, hr, br], () => {
43151
43170
  $t();
43152
- }), ze(zt, (T) => {
43171
+ }), Re(zt, (T) => {
43153
43172
  $t(), n("update:pageCount", T);
43154
- }), ze(p, (T) => {
43173
+ }), Re(p, (T) => {
43155
43174
  E.value && (E.value.commands.updatePageBreakBackground(T ? "#02040a" : "#f1f5f9"), E.value.view.dispatch(E.value.state.tr));
43156
- }), ze(g, (T) => {
43175
+ }), Re(g, (T) => {
43157
43176
  if (!E.value || !oe.value) return;
43158
43177
  const M = E.value.storage.PaginationPlus;
43159
43178
  !M || !(M.pageHeight !== T.pageHeight || M.pageWidth !== T.pageWidth || M.marginTop !== T.marginTop || M.marginBottom !== T.marginBottom || M.marginLeft !== T.marginLeft || M.marginRight !== T.marginRight || M.pageGap !== T.pageGap || M.contentMarginTop !== T.contentMarginTop || M.contentMarginBottom !== T.contentMarginBottom || M.pageBreakBackground !== T.pageBreakBackground || M.enabled !== T.enabled) || (M.pageHeight = T.pageHeight, M.pageWidth = T.pageWidth, M.marginTop = T.marginTop, M.marginBottom = T.marginBottom, M.marginLeft = T.marginLeft, M.marginRight = T.marginRight, M.pageGap = T.pageGap, M.contentMarginTop = T.contentMarginTop, M.contentMarginBottom = T.contentMarginBottom, M.pageBreakBackground = T.pageBreakBackground, M.enabled = T.enabled, E.value.view.dispatch(E.value.state.tr));
43160
- }, { deep: !0 }), ze(oe, (T) => {
43161
- var M, U, me, he, Le, qe, Ee, ye;
43162
- T && E.value && (!b.value && !y.value && !x.value && !k.value && (b.value = ((U = (M = E.value.storage.PaginationPlus) == null ? void 0 : M.appliedConfig) == null ? void 0 : U.headerLeft) || "", y.value = ((he = (me = E.value.storage.PaginationPlus) == null ? void 0 : me.appliedConfig) == null ? void 0 : he.headerRight) || "", x.value = ((qe = (Le = E.value.storage.PaginationPlus) == null ? void 0 : Le.appliedConfig) == null ? void 0 : qe.footerLeft) || "", k.value = ((ye = (Ee = E.value.storage.PaginationPlus) == null ? void 0 : Ee.appliedConfig) == null ? void 0 : ye.footerRight) || ""), $t(), be.value && n("ready", be.value), E.value.on("selectionUpdate", () => {
43179
+ }, { deep: !0 }), Re(oe, (T) => {
43180
+ var M, j, me, he, Ie, qe, Te, ye;
43181
+ T && E.value && (!b.value && !y.value && !x.value && !k.value && (b.value = ((j = (M = E.value.storage.PaginationPlus) == null ? void 0 : M.appliedConfig) == null ? void 0 : j.headerLeft) || "", y.value = ((he = (me = E.value.storage.PaginationPlus) == null ? void 0 : me.appliedConfig) == null ? void 0 : he.headerRight) || "", x.value = ((qe = (Ie = E.value.storage.PaginationPlus) == null ? void 0 : Ie.appliedConfig) == null ? void 0 : qe.footerLeft) || "", k.value = ((ye = (Te = E.value.storage.PaginationPlus) == null ? void 0 : Te.appliedConfig) == null ? void 0 : ye.footerRight) || ""), $t(), be.value && n("ready", be.value), E.value.on("selectionUpdate", () => {
43163
43182
  ri(), ji();
43164
43183
  }), E.value.on("transaction", () => {
43165
43184
  ji(), it();
@@ -43173,13 +43192,13 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43173
43192
  }), E.value.view.dom.addEventListener("keydown", (ve) => {
43174
43193
  (ve.metaKey || ve.ctrlKey) && ve.key.toLowerCase() === "k" && (ve.preventDefault(), Zo());
43175
43194
  }), E.value.view.dom.addEventListener("click", (ve) => {
43176
- const Ce = ve.target;
43177
- if (!Ce || Ce.closest('.rm-google-docs-header-bar, .rm-options-dropdown, [contenteditable="true"]')) return;
43178
- if (Ce.closest(".rm-page-header, .rm-first-page-header")) {
43195
+ const ke = ve.target;
43196
+ if (!ke || ke.closest('.rm-google-docs-header-bar, .rm-options-dropdown, [contenteditable="true"]')) return;
43197
+ if (ke.closest(".rm-page-header, .rm-first-page-header")) {
43179
43198
  Or(ve);
43180
43199
  return;
43181
43200
  }
43182
- const Pe = Ce.closest(".rm-with-pagination, .rm-page-break, .page, .docs-editor-page");
43201
+ const Pe = ke.closest(".rm-with-pagination, .rm-page-break, .page, .docs-editor-page");
43183
43202
  if (Pe) {
43184
43203
  const we = Pe.getBoundingClientRect(), Be = ve.clientY - we.top, Qe = pi.value * 37.795;
43185
43204
  if (Be >= 0 && Be <= Math.max(Qe, 40) + 15) {
@@ -43188,34 +43207,34 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43188
43207
  }
43189
43208
  }
43190
43209
  }), E.value.view.dom.addEventListener("dblclick", (ve) => {
43191
- const Ce = ve.target;
43192
- if (!Ce) return;
43193
- if (Ce.closest(".rm-page-footer")) {
43210
+ const ke = ve.target;
43211
+ if (!ke) return;
43212
+ if (ke.closest(".rm-page-footer")) {
43194
43213
  Ar();
43195
43214
  return;
43196
43215
  }
43197
- const Pe = Ce.closest(".rm-with-pagination, .rm-page-break, .page, .docs-editor-page");
43216
+ const Pe = ke.closest(".rm-with-pagination, .rm-page-break, .page, .docs-editor-page");
43198
43217
  if (Pe) {
43199
43218
  const Be = Pe.getBoundingClientRect().bottom - ve.clientY, Qe = Zt.value * 37.795;
43200
43219
  Be >= 0 && Be <= Math.max(Qe, 40) + 15 && Ar();
43201
43220
  }
43202
43221
  }));
43203
- }), ze(() => i.collaboration, () => {
43222
+ }), Re(() => i.collaboration, () => {
43204
43223
  }, { deep: !0 }), jt(() => {
43205
43224
  F.value && clearTimeout(F.value), Xt && clearTimeout(Xt);
43206
43225
  });
43207
43226
  const yr = K(!1), Nn = K(""), In = K(""), xr = K(!1), es = K(!1), ts = K(!1), wr = K(!1), zn = K(!1), kr = K(""), is = K(""), _r = K(!1);
43208
43227
  function Zo() {
43209
43228
  if (!E.value) return;
43210
- const { state: T } = E.value, { from: M, to: U, empty: me } = T.selection, he = E.value.getAttributes("link");
43211
- he.href ? (_r.value = !0, is.value = he.href, me ? kr.value = "" : kr.value = T.doc.textBetween(M, U, " ")) : (_r.value = !1, is.value = "https://", kr.value = me ? "" : T.doc.textBetween(M, U, " ")), zn.value = !0;
43229
+ const { state: T } = E.value, { from: M, to: j, empty: me } = T.selection, he = E.value.getAttributes("link");
43230
+ he.href ? (_r.value = !0, is.value = he.href, me ? kr.value = "" : kr.value = T.doc.textBetween(M, j, " ")) : (_r.value = !1, is.value = "https://", kr.value = me ? "" : T.doc.textBetween(M, j, " ")), zn.value = !0;
43212
43231
  }
43213
43232
  function Qf(T) {
43214
43233
  if (!E.value) return;
43215
- const { state: M } = E.value, { from: U, to: me, empty: he } = M.selection, Le = T.text.trim(), qe = E.value.chain().focus();
43216
- _r.value || E.value.isActive("link") ? (qe.setLink({ href: T.url, target: "_blank" }).run(), Le && !he && qe.insertContentAt({ from: U, to: me }, Le).run()) : Le ? qe.insertContentAt({ from: U, to: me }, {
43234
+ const { state: M } = E.value, { from: j, to: me, empty: he } = M.selection, Ie = T.text.trim(), qe = E.value.chain().focus();
43235
+ _r.value || E.value.isActive("link") ? (qe.setLink({ href: T.url, target: "_blank" }).run(), Ie && !he && qe.insertContentAt({ from: j, to: me }, Ie).run()) : Ie ? qe.insertContentAt({ from: j, to: me }, {
43217
43236
  type: "text",
43218
- text: Le,
43237
+ text: Ie,
43219
43238
  marks: [{ type: "link", attrs: { href: T.url, target: "_blank" } }]
43220
43239
  }).run() : he ? qe.insertContent({
43221
43240
  type: "text",
@@ -43231,8 +43250,8 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43231
43250
  Sr.value = u.value, dn.value = l.value, At.value = { ...o.value }, xr.value = !0;
43232
43251
  }, tp = () => {
43233
43252
  const T = (M) => {
43234
- const U = typeof M == "number" ? M : Number(M);
43235
- return Number.isFinite(U) ? Math.min(Ln, Math.max(bn, U)) : bn;
43253
+ const j = typeof M == "number" ? M : Number(M);
43254
+ return Number.isFinite(j) ? Math.min(Ln, Math.max(bn, j)) : bn;
43236
43255
  };
43237
43256
  u.value = Sr.value, l.value = dn.value, At.value = {
43238
43257
  top: T(At.value.top),
@@ -43255,22 +43274,22 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43255
43274
  }, Or = (T) => {
43256
43275
  let M = null;
43257
43276
  if (T) {
43258
- const Ee = T.target;
43259
- M = Ee == null ? void 0 : Ee.closest(".rm-page-header, .rm-first-page-header");
43277
+ const Te = T.target;
43278
+ M = Te == null ? void 0 : Te.closest(".rm-page-header, .rm-first-page-header");
43260
43279
  }
43261
43280
  if (M || (M = document.querySelector(".rm-page-header, .rm-first-page-header")), !M) return;
43262
- const U = M;
43263
- Cr.value = !0, U.classList.add("rm-header-active");
43264
- let me = U.querySelector(".rm-page-header-left");
43265
- me || (me = document.createElement("div"), me.className = "rm-page-header-left", U.prepend(me)), me.contentEditable = "true", me.setAttribute("tabindex", "0"), me.dataset.placeholder = s("editor.headerFooter.headerPlaceholder") || "Header", me.addEventListener("keydown", (Ee) => {
43266
- Ee.stopPropagation();
43281
+ const j = M;
43282
+ Cr.value = !0, j.classList.add("rm-header-active");
43283
+ let me = j.querySelector(".rm-page-header-left");
43284
+ me || (me = document.createElement("div"), me.className = "rm-page-header-left", j.prepend(me)), me.contentEditable = "true", me.setAttribute("tabindex", "0"), me.dataset.placeholder = s("editor.headerFooter.headerPlaceholder") || "Header", me.addEventListener("keydown", (Te) => {
43285
+ Te.stopPropagation();
43267
43286
  }), me.focus(), setTimeout(() => {
43268
43287
  if (me) {
43269
- const Ee = document.createRange(), ye = window.getSelection();
43270
- Ee.selectNodeContents(me), Ee.collapse(!1), ye == null || ye.removeAllRanges(), ye == null || ye.addRange(Ee);
43288
+ const Te = document.createRange(), ye = window.getSelection();
43289
+ Te.selectNodeContents(me), Te.collapse(!1), ye == null || ye.removeAllRanges(), ye == null || ye.addRange(Te);
43271
43290
  }
43272
43291
  }, 10);
43273
- let he = U.querySelector(".rm-google-docs-header-bar");
43292
+ let he = j.querySelector(".rm-google-docs-header-bar");
43274
43293
  if (!he) {
43275
43294
  he = document.createElement("div"), he.className = "rm-google-docs-header-bar", he.innerHTML = `
43276
43295
  <span class="rm-header-label">Header</span>
@@ -43291,74 +43310,74 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43291
43310
  </div>
43292
43311
  </div>
43293
43312
  </div>
43294
- `, U.appendChild(he), he.addEventListener("mousedown", (we) => {
43313
+ `, j.appendChild(he), he.addEventListener("mousedown", (we) => {
43295
43314
  we.stopPropagation(), we.preventDefault();
43296
43315
  });
43297
- const Ee = he.querySelector(".rm-diff-cb");
43298
- Ee == null || Ee.addEventListener("change", (we) => {
43316
+ const Te = he.querySelector(".rm-diff-cb");
43317
+ Te == null || Te.addEventListener("change", (we) => {
43299
43318
  we.stopPropagation();
43300
43319
  const Be = we.target.checked;
43301
43320
  Be && (fi.value = "", Vt.value = ""), dt.value = Be, $t();
43302
43321
  });
43303
- const ye = he.querySelector(".rm-options-btn"), Ae = he.querySelector(".rm-options-dropdown"), ve = he.querySelector(".rm-arrow-icon");
43322
+ const ye = he.querySelector(".rm-options-btn"), Oe = he.querySelector(".rm-options-dropdown"), ve = he.querySelector(".rm-arrow-icon");
43304
43323
  ye == null || ye.addEventListener("mousedown", (we) => {
43305
43324
  we.stopPropagation(), we.preventDefault();
43306
43325
  }), ye == null || ye.addEventListener("click", (we) => {
43307
43326
  we.stopPropagation(), we.preventDefault();
43308
- const Be = Ae.classList.toggle("is-open");
43327
+ const Be = Oe.classList.toggle("is-open");
43309
43328
  ve && (ve.textContent = Be ? "▲" : "▼");
43310
43329
  });
43311
- const Ce = he.querySelector(".rm-opt-format");
43312
- Ce == null || Ce.addEventListener("mousedown", (we) => {
43330
+ const ke = he.querySelector(".rm-opt-format");
43331
+ ke == null || ke.addEventListener("mousedown", (we) => {
43313
43332
  we.stopPropagation(), we.preventDefault();
43314
- }), Ce == null || Ce.addEventListener("click", (we) => {
43315
- we.stopPropagation(), Ae.classList.remove("is-open"), ve && (ve.textContent = "▼"), ip();
43333
+ }), ke == null || ke.addEventListener("click", (we) => {
43334
+ we.stopPropagation(), Oe.classList.remove("is-open"), ve && (ve.textContent = "▼"), ip();
43316
43335
  });
43317
43336
  const Me = he.querySelector(".rm-opt-page-num");
43318
43337
  Me == null || Me.addEventListener("mousedown", (we) => {
43319
43338
  we.stopPropagation(), we.preventDefault();
43320
43339
  }), Me == null || Me.addEventListener("click", (we) => {
43321
- we.stopPropagation(), Ae.classList.remove("is-open"), ve && (ve.textContent = "▼"), rp();
43340
+ we.stopPropagation(), Oe.classList.remove("is-open"), ve && (ve.textContent = "▼"), rp();
43322
43341
  });
43323
43342
  const Pe = he.querySelector(".rm-opt-remove");
43324
43343
  Pe == null || Pe.addEventListener("mousedown", (we) => {
43325
43344
  we.stopPropagation(), we.preventDefault();
43326
43345
  }), Pe == null || Pe.addEventListener("click", (we) => {
43327
- we.stopPropagation(), Ae.classList.remove("is-open"), ve && (ve.textContent = "▼"), sp();
43346
+ we.stopPropagation(), Oe.classList.remove("is-open"), ve && (ve.textContent = "▼"), sp();
43328
43347
  });
43329
43348
  }
43330
- const Le = (Ee) => {
43331
- const ye = Ee.target;
43332
- if (!ye || U.contains(ye) || he && he.contains(ye) || ye.closest(".rm-google-docs-header-bar, .rm-options-dropdown, .fixed.z-50") || di.value || hi.value) return;
43333
- me.contentEditable = "false", U.classList.remove("rm-header-active"), he && he.remove(), Cr.value = !1;
43334
- const ve = Array.from(document.querySelectorAll(".rm-page-header")).indexOf(U), Ce = ve === 0, Me = (ve + 1) % 2 === 0;
43335
- dt.value && Ce ? fi.value = me.innerHTML : mt.value && Me ? Ai.value = me.innerHTML : b.value = me.innerHTML, $t(), G(), document.removeEventListener("mousedown", Le);
43349
+ const Ie = (Te) => {
43350
+ const ye = Te.target;
43351
+ if (!ye || j.contains(ye) || he && he.contains(ye) || ye.closest(".rm-google-docs-header-bar, .rm-options-dropdown, .fixed.z-50") || di.value || hi.value) return;
43352
+ me.contentEditable = "false", j.classList.remove("rm-header-active"), he && he.remove(), Cr.value = !1;
43353
+ const ve = Array.from(document.querySelectorAll(".rm-page-header")).indexOf(j), ke = ve === 0, Me = (ve + 1) % 2 === 0;
43354
+ dt.value && ke ? fi.value = me.innerHTML : mt.value && Me ? Ai.value = me.innerHTML : b.value = me.innerHTML, $t(), G(), document.removeEventListener("mousedown", Ie);
43336
43355
  };
43337
43356
  setTimeout(() => {
43338
- document.addEventListener("mousedown", Le);
43357
+ document.addEventListener("mousedown", Ie);
43339
43358
  }, 50);
43340
- const qe = (Ee) => {
43341
- const ye = Ee.relatedTarget;
43359
+ const qe = (Te) => {
43360
+ const ye = Te.relatedTarget;
43342
43361
  if (he && (he.contains(ye) || ye != null && ye.closest(".rm-google-docs-header-bar, .rm-options-dropdown")) || di.value || hi.value) return;
43343
- me.contentEditable = "false", U.classList.remove("rm-header-active"), he && he.remove(), Cr.value = !1;
43344
- const ve = Array.from(document.querySelectorAll(".rm-page-header")).indexOf(U), Ce = ve === 0, Me = (ve + 1) % 2 === 0;
43345
- dt.value && Ce ? fi.value = me.innerHTML : mt.value && Me ? Ai.value = me.innerHTML : b.value = me.innerHTML, $t(), G(), me.removeEventListener("blur", qe), document.removeEventListener("mousedown", Le);
43362
+ me.contentEditable = "false", j.classList.remove("rm-header-active"), he && he.remove(), Cr.value = !1;
43363
+ const ve = Array.from(document.querySelectorAll(".rm-page-header")).indexOf(j), ke = ve === 0, Me = (ve + 1) % 2 === 0;
43364
+ dt.value && ke ? fi.value = me.innerHTML : mt.value && Me ? Ai.value = me.innerHTML : b.value = me.innerHTML, $t(), G(), me.removeEventListener("blur", qe), document.removeEventListener("mousedown", Ie);
43346
43365
  };
43347
43366
  me.addEventListener("blur", qe);
43348
43367
  }, Ar = () => {
43349
- var T, M, U, me;
43350
- E.value && (Nn.value = x.value || ((M = (T = E.value.storage.PaginationPlus) == null ? void 0 : T.appliedConfig) == null ? void 0 : M.footerLeft) || "", In.value = k.value || ((me = (U = E.value.storage.PaginationPlus) == null ? void 0 : U.appliedConfig) == null ? void 0 : me.footerRight) || "", yr.value = !0);
43368
+ var T, M, j, me;
43369
+ E.value && (Nn.value = x.value || ((M = (T = E.value.storage.PaginationPlus) == null ? void 0 : T.appliedConfig) == null ? void 0 : M.footerLeft) || "", In.value = k.value || ((me = (j = E.value.storage.PaginationPlus) == null ? void 0 : j.appliedConfig) == null ? void 0 : me.footerRight) || "", yr.value = !0);
43351
43370
  }, op = () => {
43352
43371
  E.value && (x.value = Nn.value, k.value = In.value, $t(), G(), yr.value = !1);
43353
43372
  }, Rt = (T, ...M) => {
43354
43373
  if (!E.value) return;
43355
- const U = E.value.commands[T];
43356
- typeof U == "function" && U(...M), E.value.commands.focus();
43374
+ const j = E.value.commands[T];
43375
+ typeof j == "function" && j(...M), E.value.commands.focus();
43357
43376
  }, bi = (T, ...M) => {
43358
43377
  if (!E.value) return;
43359
- const U = X.value[T];
43360
- if (typeof U == "function")
43361
- U(...M);
43378
+ const j = X.value[T];
43379
+ if (typeof j == "function")
43380
+ j(...M);
43362
43381
  else {
43363
43382
  Rt(T, ...M);
43364
43383
  return;
@@ -43371,9 +43390,9 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43371
43390
  if (!E.value) return null;
43372
43391
  const { state: T } = E.value;
43373
43392
  if (T.selection.empty) return null;
43374
- const M = T.selection.content(), U = document.createElement("div");
43375
- return U.appendChild(ar.fromSchema(T.schema).serializeFragment(M.content)), {
43376
- html: U.innerHTML,
43393
+ const M = T.selection.content(), j = document.createElement("div");
43394
+ return j.appendChild(ar.fromSchema(T.schema).serializeFragment(M.content)), {
43395
+ html: j.innerHTML,
43377
43396
  text: M.content.textBetween(0, M.content.size, `
43378
43397
 
43379
43398
  `, " ")
@@ -43390,17 +43409,17 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43390
43409
  if (!E.value) return;
43391
43410
  const T = await $2();
43392
43411
  if (T) {
43393
- const U = Op(T);
43412
+ const j = Op(T);
43394
43413
  try {
43395
- E.value.chain().focus().insertContent(U).run();
43414
+ E.value.chain().focus().insertContent(j).run();
43396
43415
  } catch (me) {
43397
43416
  console.error("[DocsEditor] paste HTML failed, falling back to plain text:", me);
43398
43417
  const he = await Ts();
43399
43418
  if (he)
43400
43419
  try {
43401
43420
  E.value.chain().focus().insertContent(he).run();
43402
- } catch (Le) {
43403
- console.error("[DocsEditor] paste plain text also failed:", Le);
43421
+ } catch (Ie) {
43422
+ console.error("[DocsEditor] paste plain text also failed:", Ie);
43404
43423
  }
43405
43424
  }
43406
43425
  return;
@@ -43409,8 +43428,8 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43409
43428
  if (M)
43410
43429
  try {
43411
43430
  E.value.chain().focus().insertContent(M).run();
43412
- } catch (U) {
43413
- console.error("[DocsEditor] paste plain text failed:", U);
43431
+ } catch (j) {
43432
+ console.error("[DocsEditor] paste plain text failed:", j);
43414
43433
  }
43415
43434
  }, el = async () => {
43416
43435
  if (!E.value) return;
@@ -43420,8 +43439,8 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43420
43439
  if (!E.value) return;
43421
43440
  const { state: T } = E.value;
43422
43441
  if (T.selection.empty) {
43423
- const { from: M, to: U } = T.selection;
43424
- U < T.doc.content.size && E.value.chain().focus().deleteRange({ from: M, to: U + 1 }).run();
43442
+ const { from: M, to: j } = T.selection;
43443
+ j < T.doc.content.size && E.value.chain().focus().deleteRange({ from: M, to: j + 1 }).run();
43425
43444
  } else
43426
43445
  E.value.chain().focus().deleteSelection().run();
43427
43446
  }, tl = (T) => {
@@ -43512,15 +43531,15 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43512
43531
  V.value = !V.value, V.value && (L.value = null);
43513
43532
  else if (T === "insert-footnote") {
43514
43533
  if (!E.value) return;
43515
- const { state: M, view: U } = E.value, me = M.schema.nodes.footnote;
43534
+ const { state: M, view: j } = E.value, me = M.schema.nodes.footnote;
43516
43535
  if (!me) {
43517
43536
  console.error("[DocsEditor] footnote node type not registered in schema");
43518
43537
  return;
43519
43538
  }
43520
- const he = M.selection.head, Le = me.create({ content: "" }), qe = M.tr.insert(he, Le);
43521
- U.dispatch(qe), U.focus(), setTimeout(() => {
43539
+ const he = M.selection.head, Ie = me.create({ content: "" }), qe = M.tr.insert(he, Ie);
43540
+ j.dispatch(qe), j.focus(), setTimeout(() => {
43522
43541
  qi();
43523
- const Ee = document.querySelectorAll(".docs-footnote-item-text"), ye = Ee[Ee.length - 1];
43542
+ const Te = document.querySelectorAll(".docs-footnote-item-text"), ye = Te[Te.length - 1];
43524
43543
  ye && (ye.scrollIntoView({ behavior: "smooth", block: "nearest" }), ye.focus());
43525
43544
  }, 160);
43526
43545
  } else il[T] ? il[T]() : n("menu-click", T);
@@ -43529,71 +43548,71 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43529
43548
  }, nl = () => window.print();
43530
43549
  const dp = (T, M) => {
43531
43550
  if (!E.value) return;
43532
- const U = E.value.view;
43533
- U.state.doc.descendants((me, he) => {
43534
- if (me.type.name === "footnote" && U.nodeDOM(he) === T)
43535
- return U.dispatch(U.state.tr.setNodeMarkup(he, void 0, { content: M })), !1;
43551
+ const j = E.value.view;
43552
+ j.state.doc.descendants((me, he) => {
43553
+ if (me.type.name === "footnote" && j.nodeDOM(he) === T)
43554
+ return j.dispatch(j.state.tr.setNodeMarkup(he, void 0, { content: M })), !1;
43536
43555
  });
43537
43556
  }, qi = () => {
43538
- var Ee;
43557
+ var Te;
43539
43558
  if (!E.value || !oe.value) return;
43540
43559
  const T = E.value.view.dom, M = T.querySelector("[data-rm-pagination]");
43541
43560
  if (!M) return;
43542
- const U = (ye) => {
43543
- var Ce, Me, Pe;
43544
- const Ae = document.createElement("div");
43545
- if (Ae.className = "docs-footnote-item-text", ye.hasAttribute("data-footnote-source-id")) {
43546
- const we = ye.getAttribute("data-citation-id") ?? "", Be = (Me = (Ce = E.value) == null ? void 0 : Ce.storage) == null ? void 0 : Me.citation, Qe = ((Pe = Be == null ? void 0 : Be.engine) == null ? void 0 : Pe.renderCluster(we)) ?? "";
43547
- return Ae.classList.add("docs-footnote-item-text--citation"), Qe ? Ae.innerHTML = Qe : Ae.setAttribute("data-empty", "true"), Ae;
43561
+ const j = (ye) => {
43562
+ var ke, Me, Pe;
43563
+ const Oe = document.createElement("div");
43564
+ if (Oe.className = "docs-footnote-item-text", ye.hasAttribute("data-footnote-source-id")) {
43565
+ const we = ye.getAttribute("data-citation-id") ?? "", Be = (Me = (ke = E.value) == null ? void 0 : ke.storage) == null ? void 0 : Me.citation, Qe = ((Pe = Be == null ? void 0 : Be.engine) == null ? void 0 : Pe.renderCluster(we)) ?? "";
43566
+ return Oe.classList.add("docs-footnote-item-text--citation"), Qe ? Oe.innerHTML = Qe : Oe.setAttribute("data-empty", "true"), Oe;
43548
43567
  }
43549
43568
  const ve = ye.getAttribute("data-footnote-content") ?? "";
43550
- return Ae.contentEditable = "true", Ae.textContent = ve, ve || Ae.setAttribute("data-empty", "true"), Ae.addEventListener("input", () => {
43551
- Ae.removeAttribute("data-empty"), Ae.textContent || Ae.setAttribute("data-empty", "true");
43552
- }), Ae.addEventListener("blur", () => {
43569
+ return Oe.contentEditable = "true", Oe.textContent = ve, ve || Oe.setAttribute("data-empty", "true"), Oe.addEventListener("input", () => {
43570
+ Oe.removeAttribute("data-empty"), Oe.textContent || Oe.setAttribute("data-empty", "true");
43571
+ }), Oe.addEventListener("blur", () => {
43553
43572
  var Be;
43554
- const we = ((Be = Ae.textContent) == null ? void 0 : Be.trim()) ?? "";
43573
+ const we = ((Be = Oe.textContent) == null ? void 0 : Be.trim()) ?? "";
43555
43574
  dp(ye, we);
43556
- }), Ae;
43575
+ }), Oe;
43557
43576
  }, me = Array.from(M.querySelectorAll(".rm-page-break")), he = Array.from(T.querySelectorAll(".docs-footnote-ref"));
43558
43577
  if (me.length === 0) {
43559
43578
  he.forEach((Me, Pe) => {
43560
43579
  Me.textContent = String(Pe + 1);
43561
43580
  });
43562
43581
  const ye = ee.value;
43563
- if (!ye || ((Ee = ye.querySelector(".docs-pageless-footnotes")) == null || Ee.remove(), he.length === 0)) return;
43564
- const Ae = ye.querySelector(".docs-pageless-footnotes");
43565
- if (Ae != null && Ae.querySelector(".docs-footnote-item-text:focus")) return;
43582
+ if (!ye || ((Te = ye.querySelector(".docs-pageless-footnotes")) == null || Te.remove(), he.length === 0)) return;
43583
+ const Oe = ye.querySelector(".docs-pageless-footnotes");
43584
+ if (Oe != null && Oe.querySelector(".docs-footnote-item-text:focus")) return;
43566
43585
  const ve = document.createElement("div");
43567
43586
  ve.className = "docs-page-footnotes docs-pageless-footnotes";
43568
- const Ce = document.createElement("div");
43569
- Ce.className = "docs-footnotes-sep", ve.appendChild(Ce), he.forEach((Me, Pe) => {
43587
+ const ke = document.createElement("div");
43588
+ ke.className = "docs-footnotes-sep", ve.appendChild(ke), he.forEach((Me, Pe) => {
43570
43589
  const we = document.createElement("div");
43571
43590
  we.className = "docs-footnote-item";
43572
43591
  const Be = document.createElement("sup");
43573
43592
  Be.className = "docs-footnote-item-num", Be.textContent = String(Pe + 1);
43574
- const Qe = U(Me);
43593
+ const Qe = j(Me);
43575
43594
  Me.dataset.footnoteItemId = `fn-pageless-${Pe}`, we.id = `fn-pageless-${Pe}`, we.appendChild(Be), we.appendChild(Qe), ve.appendChild(we);
43576
43595
  }), ye.appendChild(ve);
43577
43596
  return;
43578
43597
  }
43579
- const Le = /* @__PURE__ */ new Map();
43580
- me.forEach((ye, Ae) => Le.set(Ae, [])), he.forEach((ye) => {
43581
- const Ae = ye.getBoundingClientRect().top;
43598
+ const Ie = /* @__PURE__ */ new Map();
43599
+ me.forEach((ye, Oe) => Ie.set(Oe, [])), he.forEach((ye) => {
43600
+ const Oe = ye.getBoundingClientRect().top;
43582
43601
  let ve = me.length - 1;
43583
- for (let Ce = 0; Ce < me.length - 1; Ce++) {
43584
- const Me = me[Ce].querySelector(".breaker");
43585
- if (Me && Ae < Me.getBoundingClientRect().top) {
43586
- ve = Ce;
43602
+ for (let ke = 0; ke < me.length - 1; ke++) {
43603
+ const Me = me[ke].querySelector(".breaker");
43604
+ if (Me && Oe < Me.getBoundingClientRect().top) {
43605
+ ve = ke;
43587
43606
  break;
43588
43607
  }
43589
43608
  }
43590
- Le.get(ve).push(ye);
43609
+ Ie.get(ve).push(ye);
43591
43610
  });
43592
43611
  let qe = 1;
43593
- me.forEach((ye, Ae) => {
43594
- const ve = Le.get(Ae) ?? [], Ce = qe;
43612
+ me.forEach((ye, Oe) => {
43613
+ const ve = Ie.get(Oe) ?? [], ke = qe;
43595
43614
  qe += ve.length, ve.forEach((Qe, lt) => {
43596
- Qe.textContent = String(Ce + lt);
43615
+ Qe.textContent = String(ke + lt);
43597
43616
  });
43598
43617
  const Me = ye.querySelector(".docs-page-footnotes");
43599
43618
  if (Me != null && Me.querySelector(".docs-footnote-item-text:focus") || (Me == null || Me.remove(), ve.length === 0)) return;
@@ -43604,32 +43623,32 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43604
43623
  const Bt = document.createElement("div");
43605
43624
  Bt.className = "docs-footnote-item";
43606
43625
  const Qt = document.createElement("sup");
43607
- Qt.className = "docs-footnote-item-num", Qt.textContent = String(Ce + lt);
43608
- const mp = U(Qe);
43609
- Qe.dataset.footnoteItemId = `fn-${Ae}-${lt}`, Bt.id = `fn-${Ae}-${lt}`, Bt.appendChild(Qt), Bt.appendChild(mp), Pe.appendChild(Bt);
43626
+ Qt.className = "docs-footnote-item-num", Qt.textContent = String(ke + lt);
43627
+ const mp = j(Qe);
43628
+ Qe.dataset.footnoteItemId = `fn-${Oe}-${lt}`, Bt.id = `fn-${Oe}-${lt}`, Bt.appendChild(Qt), Bt.appendChild(mp), Pe.appendChild(Bt);
43610
43629
  });
43611
43630
  const Be = ye.querySelector(".breaker");
43612
43631
  Be ? Be.insertBefore(Pe, Be.firstChild) : ye.appendChild(Pe);
43613
43632
  });
43614
43633
  };
43615
- return ze(oe, (T) => {
43634
+ return Re(oe, (T) => {
43616
43635
  !T || !E.value || E.value.view.dom.addEventListener("click", (M) => {
43617
- const U = M.target.closest(".docs-footnote-ref");
43618
- if (!U) return;
43636
+ const j = M.target.closest(".docs-footnote-ref");
43637
+ if (!j) return;
43619
43638
  M.preventDefault(), M.stopPropagation();
43620
- const me = U.dataset.footnoteItemId;
43639
+ const me = j.dataset.footnoteItemId;
43621
43640
  if (!me) return;
43622
- const he = document.getElementById(me), Le = he == null ? void 0 : he.querySelector(".docs-footnote-item-text");
43623
- if (Le) {
43624
- Le.scrollIntoView({ behavior: "smooth", block: "nearest" }), Le.focus();
43641
+ const he = document.getElementById(me), Ie = he == null ? void 0 : he.querySelector(".docs-footnote-item-text");
43642
+ if (Ie) {
43643
+ Ie.scrollIntoView({ behavior: "smooth", block: "nearest" }), Ie.focus();
43625
43644
  const qe = document.createRange();
43626
- qe.selectNodeContents(Le), qe.collapse(!1);
43627
- const Ee = window.getSelection();
43628
- Ee == null || Ee.removeAllRanges(), Ee == null || Ee.addRange(qe);
43645
+ qe.selectNodeContents(Ie), qe.collapse(!1);
43646
+ const Te = window.getSelection();
43647
+ Te == null || Te.removeAllRanges(), Te == null || Te.addRange(qe);
43629
43648
  }
43630
43649
  });
43631
- }), ze(oe, (T) => {
43632
- var U;
43650
+ }), Re(oe, (T) => {
43651
+ var j;
43633
43652
  if (!T || !E.value) return;
43634
43653
  setTimeout(qi, 150), E.value.on("update", () => {
43635
43654
  setTimeout(qi, 60);
@@ -43637,7 +43656,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43637
43656
  setTimeout(qi, 100);
43638
43657
  });
43639
43658
  const M = E.value.storage.citation;
43640
- (U = M == null ? void 0 : M.engine) == null || U.onChange(() => {
43659
+ (j = M == null ? void 0 : M.engine) == null || j.onChange(() => {
43641
43660
  setTimeout(qi, 30);
43642
43661
  }), window.addEventListener("resize", qi);
43643
43662
  }), (T, M) => (I(), D("div", W2, [
@@ -43654,20 +43673,20 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43654
43673
  "show-ruler": W.value,
43655
43674
  "focus-mode": V.value,
43656
43675
  onMenuClick: S(pp),
43657
- onBack: M[0] || (M[0] = (U) => T.$emit("back")),
43658
- "onUpdate:title": M[1] || (M[1] = (U) => T.$emit("update:title", U)),
43659
- onToggleStar: M[2] || (M[2] = (U) => T.$emit("toggle-star")),
43660
- onExport: M[3] || (M[3] = (U) => T.$emit("export", U)),
43661
- onShare: M[4] || (M[4] = (U) => T.$emit("share"))
43676
+ onBack: M[0] || (M[0] = (j) => T.$emit("back")),
43677
+ "onUpdate:title": M[1] || (M[1] = (j) => T.$emit("update:title", j)),
43678
+ onToggleStar: M[2] || (M[2] = (j) => T.$emit("toggle-star")),
43679
+ onExport: M[3] || (M[3] = (j) => T.$emit("export", j)),
43680
+ onShare: M[4] || (M[4] = (j) => T.$emit("share"))
43662
43681
  }, {
43663
43682
  actions: Wi(() => [
43664
43683
  wn(T.$slots, "header-actions", {}, void 0, !0)
43665
43684
  ]),
43666
- "overflow-actions": Wi((U) => [
43667
- wn(T.$slots, "overflow-actions", al(sl(U)), void 0, !0)
43685
+ "overflow-actions": Wi((j) => [
43686
+ wn(T.$slots, "overflow-actions", al(sl(j)), void 0, !0)
43668
43687
  ]),
43669
- "user-menu": Wi((U) => [
43670
- wn(T.$slots, "user-menu", al(sl(U)), void 0, !0)
43688
+ "user-menu": Wi((j) => [
43689
+ wn(T.$slots, "user-menu", al(sl(j)), void 0, !0)
43671
43690
  ]),
43672
43691
  _: 3
43673
43692
  }, 8, ["title", "editable", "collaborators", "starred", "user-name", "user-avatar", "pageless", "outline-open", "show-ruler", "focus-mode", "onMenuClick"])),
@@ -43690,7 +43709,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43690
43709
  class: "fixed right-4 top-4 z-50 flex h-11 w-11 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-600 shadow-md transition-colors hover:bg-slate-100 dark:border-white/10 dark:bg-[#0e1525] dark:text-slate-300 dark:hover:bg-white/5",
43691
43710
  title: S(s)("header.focusMode"),
43692
43711
  "aria-label": S(s)("header.focusMode"),
43693
- onClick: M[5] || (M[5] = (U) => V.value = !1)
43712
+ onClick: M[5] || (M[5] = (j) => V.value = !1)
43694
43713
  }, [
43695
43714
  Y(S(Md), { class: "h-5 w-5" })
43696
43715
  ], 8, G2)) : se("", !0),
@@ -43708,18 +43727,18 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43708
43727
  Y(I2, {
43709
43728
  "is-open": wr.value,
43710
43729
  editor: S(E),
43711
- onClose: M[6] || (M[6] = (U) => wr.value = !1)
43730
+ onClose: M[6] || (M[6] = (j) => wr.value = !1)
43712
43731
  }, null, 8, ["is-open", "editor"]),
43713
43732
  L.value === "toc" ? (I(), Ke(sg, {
43714
43733
  key: 0,
43715
43734
  editor: S(E),
43716
- onClose: M[7] || (M[7] = (U) => L.value = null)
43735
+ onClose: M[7] || (M[7] = (j) => L.value = null)
43717
43736
  }, null, 8, ["editor"])) : (I(), D("button", {
43718
43737
  key: 1,
43719
43738
  type: "button",
43720
43739
  class: "absolute left-4 top-4 z-20 flex h-11 w-11 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-600 shadow-md transition-colors hover:bg-slate-100 dark:border-white/10 dark:bg-[#0e1525] dark:text-slate-300 dark:hover:bg-white/5",
43721
43740
  title: S(s)("editor.showOutline"),
43722
- onClick: M[8] || (M[8] = (U) => S(Tr)("toc"))
43741
+ onClick: M[8] || (M[8] = (j) => S(Tr)("toc"))
43723
43742
  }, [
43724
43743
  Y(S(Td), { class: "h-5 w-5" })
43725
43744
  ], 8, X2)),
@@ -43756,12 +43775,12 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43756
43775
  L.value === "references" ? (I(), Ke(xv, {
43757
43776
  key: 2,
43758
43777
  sources: z.value,
43759
- "active-style": j.value,
43778
+ "active-style": H.value,
43760
43779
  "picker-mode": pe.value,
43761
43780
  "can-import": B.value,
43762
43781
  importing: xt.value,
43763
43782
  "import-message": Z.value,
43764
- onClose: M[9] || (M[9] = (U) => L.value = null),
43783
+ onClose: M[9] || (M[9] = (j) => L.value = null),
43765
43784
  onInsert: Ve,
43766
43785
  onCreate: xe,
43767
43786
  onUpdate: Ue,
@@ -43775,25 +43794,25 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43775
43794
  comments: i.comments,
43776
43795
  "selected-text-snippet": i.selectedTextSnippet,
43777
43796
  "selected-text-index": i.selectedTextIndex,
43778
- onClose: M[10] || (M[10] = (U) => L.value = null),
43779
- onAddComment: M[11] || (M[11] = (U, me, he) => T.$emit("add-comment", U, me, he)),
43780
- onAddReply: M[12] || (M[12] = (U, me) => T.$emit("add-reply", U, me)),
43781
- onResolveComment: M[13] || (M[13] = (U) => T.$emit("resolve-comment", U))
43797
+ onClose: M[10] || (M[10] = (j) => L.value = null),
43798
+ onAddComment: M[11] || (M[11] = (j, me, he) => T.$emit("add-comment", j, me, he)),
43799
+ onAddReply: M[12] || (M[12] = (j, me) => T.$emit("add-reply", j, me)),
43800
+ onResolveComment: M[13] || (M[13] = (j) => T.$emit("resolve-comment", j))
43782
43801
  }, null, 8, ["comments", "selected-text-snippet", "selected-text-index"])) : se("", !0),
43783
43802
  L.value === "history" ? (I(), Ke(yS, {
43784
43803
  key: 4,
43785
43804
  snapshots: i.snapshots,
43786
43805
  "active-preview-index": i.activePreviewIndex,
43787
- onSaveSnapshot: M[14] || (M[14] = (U) => T.$emit("save-snapshot", U)),
43788
- onRestoreSnapshot: M[15] || (M[15] = (U) => T.$emit("restore-snapshot", U)),
43789
- onPreviewSnapshot: M[16] || (M[16] = (U) => T.$emit("preview-snapshot", U))
43806
+ onSaveSnapshot: M[14] || (M[14] = (j) => T.$emit("save-snapshot", j)),
43807
+ onRestoreSnapshot: M[15] || (M[15] = (j) => T.$emit("restore-snapshot", j)),
43808
+ onPreviewSnapshot: M[16] || (M[16] = (j) => T.$emit("preview-snapshot", j))
43790
43809
  }, null, 8, ["snapshots", "active-preview-index"])) : se("", !0),
43791
43810
  L.value === "ai" ? (I(), Ke(f_, {
43792
43811
  key: 5,
43793
43812
  editor: S(E),
43794
43813
  "ai-stream": i.aiStream,
43795
43814
  "ai-draft": i.aiDraft,
43796
- onClose: M[17] || (M[17] = (U) => L.value = null)
43815
+ onClose: M[17] || (M[17] = (j) => L.value = null)
43797
43816
  }, null, 8, ["editor", "ai-stream", "ai-draft"])) : se("", !0)
43798
43817
  ]),
43799
43818
  V.value ? se("", !0) : (I(), Ke(Sb, {
@@ -43808,8 +43827,8 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43808
43827
  "page-size": u.value,
43809
43828
  "page-sizes": S(as),
43810
43829
  pageless: f.value,
43811
- "onUpdate:pageSize": M[18] || (M[18] = (U) => {
43812
- u.value = U, n("update:pageSize", U);
43830
+ "onUpdate:pageSize": M[18] || (M[18] = (j) => {
43831
+ u.value = j, n("update:pageSize", j);
43813
43832
  })
43814
43833
  }, null, 8, ["connection-state", "saving-status", "last-saved", "word-count", "char-count", "page-count", "current-page", "page-size", "page-sizes", "pageless"])),
43815
43834
  yr.value ? (I(), D("div", Y2, [
@@ -43821,7 +43840,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43821
43840
  w("button", {
43822
43841
  type: "button",
43823
43842
  class: "text-[11px] text-red-500 hover:text-red-600 font-medium transition-colors",
43824
- onClick: M[19] || (M[19] = (U) => {
43843
+ onClick: M[19] || (M[19] = (j) => {
43825
43844
  Nn.value = "", In.value = "";
43826
43845
  })
43827
43846
  }, N(S(s)("editor.headerFooter.clear")), 1)
@@ -43829,24 +43848,24 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43829
43848
  w("div", aC, [
43830
43849
  w("div", null, [
43831
43850
  w("label", sC, N(S(s)("editor.headerFooter.left")), 1),
43832
- Se(w("input", {
43833
- "onUpdate:modelValue": M[20] || (M[20] = (U) => Nn.value = U),
43851
+ Ce(w("input", {
43852
+ "onUpdate:modelValue": M[20] || (M[20] = (j) => Nn.value = j),
43834
43853
  type: "text",
43835
43854
  class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700",
43836
43855
  placeholder: S(s)("editor.headerFooter.footerLeftPlaceholder")
43837
43856
  }, null, 8, oC), [
43838
- [Re, Nn.value]
43857
+ [De, Nn.value]
43839
43858
  ])
43840
43859
  ]),
43841
43860
  w("div", null, [
43842
43861
  w("label", lC, N(S(s)("editor.headerFooter.right")), 1),
43843
- Se(w("input", {
43844
- "onUpdate:modelValue": M[21] || (M[21] = (U) => In.value = U),
43862
+ Ce(w("input", {
43863
+ "onUpdate:modelValue": M[21] || (M[21] = (j) => In.value = j),
43845
43864
  type: "text",
43846
43865
  class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700",
43847
43866
  placeholder: S(s)("editor.headerFooter.footerRightPlaceholder")
43848
43867
  }, null, 8, cC), [
43849
- [Re, In.value]
43868
+ [De, In.value]
43850
43869
  ])
43851
43870
  ])
43852
43871
  ])
@@ -43856,7 +43875,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43856
43875
  w("button", {
43857
43876
  type: "button",
43858
43877
  class: "rounded-md px-3 py-1.5 text-xs font-semibold hover:bg-slate-100 dark:hover:bg-white/5",
43859
- onClick: M[22] || (M[22] = (U) => yr.value = !1)
43878
+ onClick: M[22] || (M[22] = (j) => yr.value = !1)
43860
43879
  }, N(S(s)("editor.headerFooter.cancel")), 1),
43861
43880
  w("button", {
43862
43881
  type: "button",
@@ -43874,24 +43893,24 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43874
43893
  w("div", gC, [
43875
43894
  w("div", null, [
43876
43895
  w("label", vC, N(S(s)("editor.headerFooter.headerTopMargin")), 1),
43877
- Se(w("input", {
43878
- "onUpdate:modelValue": M[23] || (M[23] = (U) => un.value = U),
43896
+ Ce(w("input", {
43897
+ "onUpdate:modelValue": M[23] || (M[23] = (j) => un.value = j),
43879
43898
  type: "number",
43880
43899
  step: "0.01",
43881
43900
  class: "w-full rounded-lg border border-slate-300 dark:border-slate-700 bg-white dark:bg-[#1a2332] px-3.5 py-2 text-sm text-slate-800 dark:text-slate-100 focus:border-blue-600 focus:ring-2 focus:ring-blue-500/20 focus:outline-none transition-all"
43882
43901
  }, null, 512), [
43883
- [Re, un.value]
43902
+ [De, un.value]
43884
43903
  ])
43885
43904
  ]),
43886
43905
  w("div", null, [
43887
43906
  w("label", yC, N(S(s)("editor.headerFooter.footerBottomMargin")), 1),
43888
- Se(w("input", {
43889
- "onUpdate:modelValue": M[24] || (M[24] = (U) => Ot.value = U),
43907
+ Ce(w("input", {
43908
+ "onUpdate:modelValue": M[24] || (M[24] = (j) => Ot.value = j),
43890
43909
  type: "number",
43891
43910
  step: "0.01",
43892
43911
  class: "w-full rounded-lg border border-slate-300 dark:border-slate-700 bg-white dark:bg-[#1a2332] px-3.5 py-2 text-sm text-slate-800 dark:text-slate-100 focus:border-blue-600 focus:ring-2 focus:ring-blue-500/20 focus:outline-none transition-all"
43893
43912
  }, null, 512), [
43894
- [Re, Ot.value]
43913
+ [De, Ot.value]
43895
43914
  ])
43896
43915
  ])
43897
43916
  ])
@@ -43900,8 +43919,8 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43900
43919
  w("h3", wC, N(S(s)("editor.headerFooter.layoutSection")), 1),
43901
43920
  w("div", kC, [
43902
43921
  w("label", _C, [
43903
- Se(w("input", {
43904
- "onUpdate:modelValue": M[25] || (M[25] = (U) => ht.value = U),
43922
+ Ce(w("input", {
43923
+ "onUpdate:modelValue": M[25] || (M[25] = (j) => ht.value = j),
43905
43924
  type: "checkbox",
43906
43925
  class: "w-4 h-4 rounded border-slate-300 text-blue-600 focus:ring-blue-500"
43907
43926
  }, null, 512), [
@@ -43910,8 +43929,8 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43910
43929
  w("span", null, N(S(s)("editor.headerFooter.differentFirstPage")), 1)
43911
43930
  ]),
43912
43931
  w("label", SC, [
43913
- Se(w("input", {
43914
- "onUpdate:modelValue": M[26] || (M[26] = (U) => mi.value = U),
43932
+ Ce(w("input", {
43933
+ "onUpdate:modelValue": M[26] || (M[26] = (j) => mi.value = j),
43915
43934
  type: "checkbox",
43916
43935
  class: "w-4 h-4 rounded border-slate-300 text-blue-600 focus:ring-blue-500"
43917
43936
  }, null, 512), [
@@ -43925,7 +43944,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43925
43944
  w("button", {
43926
43945
  type: "button",
43927
43946
  class: "rounded-full px-5 py-2 text-xs font-semibold text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-950/40 transition-colors",
43928
- onClick: M[27] || (M[27] = (U) => di.value = !1)
43947
+ onClick: M[27] || (M[27] = (j) => di.value = !1)
43929
43948
  }, N(S(s)("editor.headerFooter.cancel")), 1),
43930
43949
  w("button", {
43931
43950
  type: "button",
@@ -43942,8 +43961,8 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43942
43961
  w("h3", MC, N(S(s)("editor.headerFooter.positionSection")), 1),
43943
43962
  w("div", NC, [
43944
43963
  w("label", IC, [
43945
- Se(w("input", {
43946
- "onUpdate:modelValue": M[28] || (M[28] = (U) => fn.value = U),
43964
+ Ce(w("input", {
43965
+ "onUpdate:modelValue": M[28] || (M[28] = (j) => fn.value = j),
43947
43966
  type: "radio",
43948
43967
  value: "header",
43949
43968
  class: "w-4 h-4 text-blue-600 focus:ring-blue-500"
@@ -43953,8 +43972,8 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43953
43972
  w("span", null, N(S(s)("editor.headerFooter.positionHeader")), 1)
43954
43973
  ]),
43955
43974
  w("label", zC, [
43956
- Se(w("input", {
43957
- "onUpdate:modelValue": M[29] || (M[29] = (U) => fn.value = U),
43975
+ Ce(w("input", {
43976
+ "onUpdate:modelValue": M[29] || (M[29] = (j) => fn.value = j),
43958
43977
  type: "radio",
43959
43978
  value: "footer",
43960
43979
  class: "w-4 h-4 text-blue-600 focus:ring-blue-500"
@@ -43964,8 +43983,8 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43964
43983
  w("span", null, N(S(s)("editor.headerFooter.positionFooter")), 1)
43965
43984
  ]),
43966
43985
  w("label", RC, [
43967
- Se(w("input", {
43968
- "onUpdate:modelValue": M[30] || (M[30] = (U) => gr.value = U),
43986
+ Ce(w("input", {
43987
+ "onUpdate:modelValue": M[30] || (M[30] = (j) => gr.value = j),
43969
43988
  type: "checkbox",
43970
43989
  class: "w-4 h-4 rounded border-slate-300 text-blue-600 focus:ring-blue-500"
43971
43990
  }, null, 512), [
@@ -43980,8 +43999,8 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43980
43999
  w("div", PC, [
43981
44000
  w("div", BC, [
43982
44001
  w("label", FC, [
43983
- Se(w("input", {
43984
- "onUpdate:modelValue": M[31] || (M[31] = (U) => pn.value = U),
44002
+ Ce(w("input", {
44003
+ "onUpdate:modelValue": M[31] || (M[31] = (j) => pn.value = j),
43985
44004
  type: "radio",
43986
44005
  value: "startAt",
43987
44006
  class: "w-4 h-4 text-blue-600 focus:ring-blue-500"
@@ -43990,18 +44009,18 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
43990
44009
  ]),
43991
44010
  w("span", null, N(S(s)("editor.headerFooter.startAt")), 1)
43992
44011
  ]),
43993
- Se(w("input", {
43994
- "onUpdate:modelValue": M[32] || (M[32] = (U) => vr.value = U),
44012
+ Ce(w("input", {
44013
+ "onUpdate:modelValue": M[32] || (M[32] = (j) => vr.value = j),
43995
44014
  type: "number",
43996
44015
  min: "1",
43997
44016
  class: "w-16 rounded-md border border-slate-300 dark:border-slate-700 bg-white dark:bg-[#1a2332] px-2.5 py-1 text-xs text-slate-800 dark:text-slate-100 focus:border-blue-600 focus:outline-none"
43998
44017
  }, null, 512), [
43999
- [Re, vr.value]
44018
+ [De, vr.value]
44000
44019
  ])
44001
44020
  ]),
44002
44021
  w("label", UC, [
44003
- Se(w("input", {
44004
- "onUpdate:modelValue": M[33] || (M[33] = (U) => pn.value = U),
44022
+ Ce(w("input", {
44023
+ "onUpdate:modelValue": M[33] || (M[33] = (j) => pn.value = j),
44005
44024
  type: "radio",
44006
44025
  value: "continue",
44007
44026
  class: "w-4 h-4 text-blue-600 focus:ring-blue-500"
@@ -44016,7 +44035,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44016
44035
  w("button", {
44017
44036
  type: "button",
44018
44037
  class: "rounded-full px-5 py-2 text-xs font-semibold text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-950/40 transition-colors",
44019
- onClick: M[34] || (M[34] = (U) => hi.value = !1)
44038
+ onClick: M[34] || (M[34] = (j) => hi.value = !1)
44020
44039
  }, N(S(s)("editor.headerFooter.cancel")), 1),
44021
44040
  w("button", {
44022
44041
  type: "button",
@@ -44030,13 +44049,13 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44030
44049
  "is-open": ts.value,
44031
44050
  "document-title": i.title,
44032
44051
  "share-url": i.shareUrl,
44033
- onClose: M[35] || (M[35] = (U) => ts.value = !1),
44034
- onCopyLink: M[36] || (M[36] = (U) => n("share"))
44052
+ onClose: M[35] || (M[35] = (j) => ts.value = !1),
44053
+ onCopyLink: M[36] || (M[36] = (j) => n("share"))
44035
44054
  }, null, 8, ["is-open", "document-title", "share-url"]),
44036
44055
  Y(i2, {
44037
44056
  "is-open": es.value,
44038
44057
  meta: i.documentMeta,
44039
- onClose: M[37] || (M[37] = (U) => es.value = !1)
44058
+ onClose: M[37] || (M[37] = (j) => es.value = !1)
44040
44059
  }, null, 8, ["is-open", "meta"]),
44041
44060
  Y(V2, {
44042
44061
  "is-open": zn.value,
@@ -44045,21 +44064,21 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44045
44064
  "is-editing": _r.value,
44046
44065
  onApply: Qf,
44047
44066
  onRemove: Yf,
44048
- onClose: M[38] || (M[38] = (U) => zn.value = !1)
44067
+ onClose: M[38] || (M[38] = (j) => zn.value = !1)
44049
44068
  }, null, 8, ["is-open", "initial-text", "initial-url", "is-editing"]),
44050
44069
  xr.value ? (I(), D("div", jC, [
44051
44070
  w("div", qC, [
44052
44071
  w("h2", VC, N(S(s)("editor.pageSetup.title")), 1),
44053
44072
  w("div", $C, [
44054
44073
  w("label", WC, N(S(s)("editor.pageSetup.paperSize")), 1),
44055
- Se(w("select", {
44056
- "onUpdate:modelValue": M[39] || (M[39] = (U) => Sr.value = U),
44074
+ Ce(w("select", {
44075
+ "onUpdate:modelValue": M[39] || (M[39] = (j) => Sr.value = j),
44057
44076
  class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-2 text-xs focus:outline-none dark:border-slate-700"
44058
44077
  }, [
44059
- (I(!0), D(Te, null, De(S(as), (U) => (I(), D("option", {
44060
- key: U.id,
44061
- value: U.id
44062
- }, N(U.name), 9, GC))), 128))
44078
+ (I(!0), D(Ee, null, Le(S(as), (j) => (I(), D("option", {
44079
+ key: j.id,
44080
+ value: j.id
44081
+ }, N(j.name), 9, GC))), 128))
44063
44082
  ], 512), [
44064
44083
  [zc, Sr.value]
44065
44084
  ])
@@ -44070,12 +44089,12 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44070
44089
  w("button", {
44071
44090
  type: "button",
44072
44091
  class: ge(["flex-1 rounded-md border px-3 py-2 text-xs font-medium transition-colors", dn.value === "portrait" ? "border-cyan-500 bg-cyan-50 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300" : "border-slate-200 hover:bg-slate-50 dark:border-slate-700 dark:hover:bg-white/5"]),
44073
- onClick: M[40] || (M[40] = (U) => dn.value = "portrait")
44092
+ onClick: M[40] || (M[40] = (j) => dn.value = "portrait")
44074
44093
  }, N(S(s)("editor.pageSetup.portrait")), 3),
44075
44094
  w("button", {
44076
44095
  type: "button",
44077
44096
  class: ge(["flex-1 rounded-md border px-3 py-2 text-xs font-medium transition-colors", dn.value === "landscape" ? "border-cyan-500 bg-cyan-50 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300" : "border-slate-200 hover:bg-slate-50 dark:border-slate-700 dark:hover:bg-white/5"]),
44078
- onClick: M[41] || (M[41] = (U) => dn.value = "landscape")
44097
+ onClick: M[41] || (M[41] = (j) => dn.value = "landscape")
44079
44098
  }, N(S(s)("editor.pageSetup.landscape")), 3)
44080
44099
  ])
44081
44100
  ]),
@@ -44084,15 +44103,15 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44084
44103
  w("div", YC, [
44085
44104
  w("div", null, [
44086
44105
  w("label", eO, N(S(s)("editor.pageSetup.top")), 1),
44087
- Se(w("input", {
44088
- "onUpdate:modelValue": M[42] || (M[42] = (U) => At.value.top = U),
44106
+ Ce(w("input", {
44107
+ "onUpdate:modelValue": M[42] || (M[42] = (j) => At.value.top = j),
44089
44108
  type: "number",
44090
44109
  min: bn,
44091
44110
  max: Ln,
44092
44111
  class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700"
44093
44112
  }, null, 512), [
44094
44113
  [
44095
- Re,
44114
+ De,
44096
44115
  At.value.top,
44097
44116
  void 0,
44098
44117
  { number: !0 }
@@ -44101,15 +44120,15 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44101
44120
  ]),
44102
44121
  w("div", null, [
44103
44122
  w("label", tO, N(S(s)("editor.pageSetup.bottom")), 1),
44104
- Se(w("input", {
44105
- "onUpdate:modelValue": M[43] || (M[43] = (U) => At.value.bottom = U),
44123
+ Ce(w("input", {
44124
+ "onUpdate:modelValue": M[43] || (M[43] = (j) => At.value.bottom = j),
44106
44125
  type: "number",
44107
44126
  min: bn,
44108
44127
  max: Ln,
44109
44128
  class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700"
44110
44129
  }, null, 512), [
44111
44130
  [
44112
- Re,
44131
+ De,
44113
44132
  At.value.bottom,
44114
44133
  void 0,
44115
44134
  { number: !0 }
@@ -44118,15 +44137,15 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44118
44137
  ]),
44119
44138
  w("div", null, [
44120
44139
  w("label", iO, N(S(s)("editor.pageSetup.left")), 1),
44121
- Se(w("input", {
44122
- "onUpdate:modelValue": M[44] || (M[44] = (U) => At.value.left = U),
44140
+ Ce(w("input", {
44141
+ "onUpdate:modelValue": M[44] || (M[44] = (j) => At.value.left = j),
44123
44142
  type: "number",
44124
44143
  min: bn,
44125
44144
  max: Ln,
44126
44145
  class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700"
44127
44146
  }, null, 512), [
44128
44147
  [
44129
- Re,
44148
+ De,
44130
44149
  At.value.left,
44131
44150
  void 0,
44132
44151
  { number: !0 }
@@ -44135,15 +44154,15 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44135
44154
  ]),
44136
44155
  w("div", null, [
44137
44156
  w("label", nO, N(S(s)("editor.pageSetup.right")), 1),
44138
- Se(w("input", {
44139
- "onUpdate:modelValue": M[45] || (M[45] = (U) => At.value.right = U),
44157
+ Ce(w("input", {
44158
+ "onUpdate:modelValue": M[45] || (M[45] = (j) => At.value.right = j),
44140
44159
  type: "number",
44141
44160
  min: bn,
44142
44161
  max: Ln,
44143
44162
  class: "w-full rounded-md border border-slate-200 bg-transparent px-3 py-1.5 text-xs focus:outline-none dark:border-slate-700"
44144
44163
  }, null, 512), [
44145
44164
  [
44146
- Re,
44165
+ De,
44147
44166
  At.value.right,
44148
44167
  void 0,
44149
44168
  { number: !0 }
@@ -44156,7 +44175,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44156
44175
  w("button", {
44157
44176
  type: "button",
44158
44177
  class: "rounded-md px-3 py-1.5 text-xs font-semibold hover:bg-slate-100 dark:hover:bg-white/5",
44159
- onClick: M[46] || (M[46] = (U) => xr.value = !1)
44178
+ onClick: M[46] || (M[46] = (j) => xr.value = !1)
44160
44179
  }, N(S(s)("editor.pageSetup.cancel")), 1),
44161
44180
  w("button", {
44162
44181
  type: "button",
@@ -44168,7 +44187,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44168
44187
  ])) : se("", !0)
44169
44188
  ]));
44170
44189
  }
44171
- }), qO = /* @__PURE__ */ ho(aO, [["__scopeId", "data-v-397b536d"]]), sO = { class: "docs-editor-pages flex flex-col items-center gap-10" }, oO = ["data-page-index"], lO = ["data-node-type", "data-from", "data-to"], cO = ["innerHTML"], uO = {
44190
+ }), qO = /* @__PURE__ */ ho(aO, [["__scopeId", "data-v-c85aa2d3"]]), sO = { class: "docs-editor-pages flex flex-col items-center gap-10" }, oO = ["data-page-index"], lO = ["data-node-type", "data-from", "data-to"], cO = ["innerHTML"], uO = {
44172
44191
  key: 1,
44173
44192
  class: "docs-editor-page__block-fallback flex justify-between text-sm text-slate-700"
44174
44193
  }, fO = { class: "docs-editor-page__block-type font-medium" }, pO = { class: "docs-editor-page__block-range text-slate-500" }, VO = /* @__PURE__ */ tt({
@@ -44188,7 +44207,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44188
44207
  const t = e, i = K(0), n = () => {
44189
44208
  i.value++;
44190
44209
  };
44191
- ze(
44210
+ Re(
44192
44211
  () => t.editor,
44193
44212
  (p, m) => {
44194
44213
  m && typeof m.off == "function" && m.off("update", n), p && typeof p.on == "function" && p.on("update", n);
@@ -44268,7 +44287,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44268
44287
  `${p.from}-${p.to}-${p.nodeType}`
44269
44288
  ) ?? null;
44270
44289
  return (p, m) => (I(), D("div", sO, [
44271
- (I(!0), D(Te, null, De(e.pages, (g, h) => (I(), D("div", {
44290
+ (I(!0), D(Ee, null, Le(e.pages, (g, h) => (I(), D("div", {
44272
44291
  key: `${h}-${g.from}-${g.to}`,
44273
44292
  class: ge(["docs-editor-page tiptap ProseMirror relative box-border overflow-hidden text-slate-800 dark:text-[#e2e8f0]", e.isPageless ? "" : "editor-page-shadow rounded-lg border border-slate-200/70 bg-white dark:border-white/5 dark:bg-[#0a0f1e]"]),
44274
44293
  "data-page-index": h,
@@ -44278,7 +44297,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44278
44297
  class: "docs-editor-page__blocks flex flex-col",
44279
44298
  style: at(e.isPageless ? {} : { height: "100%", overflow: "hidden" })
44280
44299
  }, [
44281
- (I(!0), D(Te, null, De(g.blocks, (v) => (I(), D("div", {
44300
+ (I(!0), D(Ee, null, Le(g.blocks, (v) => (I(), D("div", {
44282
44301
  key: `${v.from}-${v.to}`,
44283
44302
  class: "docs-editor-page__block",
44284
44303
  "data-node-type": v.nodeType,
@@ -44346,7 +44365,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44346
44365
  }), g.value = y;
44347
44366
  };
44348
44367
  let v = null;
44349
- ze(
44368
+ Re(
44350
44369
  () => n.editor,
44351
44370
  (y) => {
44352
44371
  if (v && (v(), v = null), !y) {
@@ -44400,7 +44419,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44400
44419
  ], 8, yO)
44401
44420
  ]),
44402
44421
  w("div", xO, [
44403
- (I(!0), D(Te, null, De(e.tabs, (k) => (I(), D("div", {
44422
+ (I(!0), D(Ee, null, Le(e.tabs, (k) => (I(), D("div", {
44404
44423
  key: k.id,
44405
44424
  class: ge(["group relative flex w-full items-center justify-between rounded-r-full py-1.5 pl-3 pr-2 text-left text-sm transition-all", [
44406
44425
  k.active ? "bg-[#c2e7ff]/70 text-[#001d35] dark:bg-blue-950/40 dark:text-blue-200 font-medium" : "text-slate-700 hover:bg-slate-200/40 dark:text-slate-300 dark:hover:bg-slate-800/30"
@@ -44417,7 +44436,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44417
44436
  ], 8, wO)) : se("", !0),
44418
44437
  o.value === k.id ? (I(), D("div", _O, [
44419
44438
  Y(S(kn), { class: "h-4 w-4 flex-shrink-0 opacity-70" }),
44420
- Se(w("input", {
44439
+ Ce(w("input", {
44421
44440
  "onUpdate:modelValue": x[2] || (x[2] = (O) => l.value = O),
44422
44441
  type: "text",
44423
44442
  class: "flex-1 rounded border border-blue-400 bg-white px-1.5 py-0.5 text-xs text-slate-800 outline-none focus:ring-1 focus:ring-blue-400/50 dark:bg-slate-900 dark:text-slate-100",
@@ -44426,10 +44445,10 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44426
44445
  ei((O) => f(k.id), ["enter"]),
44427
44446
  ei(d, ["esc"])
44428
44447
  ],
44429
- onClick: x[3] || (x[3] = ke(() => {
44448
+ onClick: x[3] || (x[3] = _e(() => {
44430
44449
  }, ["stop"]))
44431
44450
  }, null, 40, SO), [
44432
- [Re, l.value]
44451
+ [De, l.value]
44433
44452
  ])
44434
44453
  ])) : se("", !0),
44435
44454
  w("div", CO, [
@@ -44437,7 +44456,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44437
44456
  key: 0,
44438
44457
  type: "button",
44439
44458
  class: ge(["rounded-full p-1 text-slate-500 opacity-0 transition-opacity hover:bg-slate-200/70 group-hover:opacity-100 dark:hover:bg-slate-700/70", { "opacity-100": s.value === k.id }]),
44440
- onClick: ke((O) => m(k.id), ["stop"])
44459
+ onClick: _e((O) => m(k.id), ["stop"])
44441
44460
  }, [
44442
44461
  Y(S(jc), { class: "h-3.5 w-3.5" })
44443
44462
  ], 10, OO)) : se("", !0),
@@ -44445,13 +44464,13 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44445
44464
  w("button", {
44446
44465
  type: "button",
44447
44466
  class: "flex w-full items-center px-3 py-1.5 text-xs hover:bg-slate-50 dark:hover:bg-slate-700/50",
44448
- onClick: ke((O) => u(k), ["stop"])
44467
+ onClick: _e((O) => u(k), ["stop"])
44449
44468
  }, N(S(i)("documentTabs.rename")), 9, TO),
44450
44469
  w("button", {
44451
44470
  type: "button",
44452
44471
  class: "flex w-full items-center px-3 py-1.5 text-xs text-red-600 dark:text-red-400 hover:bg-slate-50 dark:hover:bg-slate-700/50 disabled:opacity-40",
44453
44472
  disabled: e.tabs.length <= 1,
44454
- onClick: ke((O) => p(k.id), ["stop"])
44473
+ onClick: _e((O) => p(k.id), ["stop"])
44455
44474
  }, N(S(i)("documentTabs.delete")), 9, EO)
44456
44475
  ])) : se("", !0)
44457
44476
  ])
@@ -44461,7 +44480,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44461
44480
  w("div", MO, [
44462
44481
  w("span", NO, N(S(i)("documentTabs.outline")), 1),
44463
44482
  g.value.length > 0 ? (I(), D("div", IO, [
44464
- (I(!0), D(Te, null, De(g.value, (k) => (I(), D("button", {
44483
+ (I(!0), D(Ee, null, Le(g.value, (k) => (I(), D("button", {
44465
44484
  key: k.id,
44466
44485
  type: "button",
44467
44486
  class: ge(["w-full text-left text-xs text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200 py-1 transition-colors truncate", [
@@ -44474,7 +44493,7 @@ const W2 = { class: "docs-editor flex h-screen w-full flex-col overflow-hidden b
44474
44493
  ])
44475
44494
  ]),
44476
44495
  w("div", DO, [
44477
- (I(!0), D(Te, null, De(n.tabs, (k) => (I(), D("button", {
44496
+ (I(!0), D(Ee, null, Le(n.tabs, (k) => (I(), D("button", {
44478
44497
  key: k.id,
44479
44498
  type: "button",
44480
44499
  class: ge(["flex h-8 w-8 items-center justify-center rounded-lg transition-colors", [