@harbour-enterprises/superdoc 0.9.18 → 0.9.19

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.
@@ -16220,7 +16220,7 @@ Actual: ` + p3.attribValue
16220
16220
  }
16221
16221
  };
16222
16222
  const Yn$3 = /* @__PURE__ */ Object.create(null);
16223
- let Pe$2 = class Pe {
16223
+ let Pe$1 = class Pe {
16224
16224
  /**
16225
16225
  Get the step map that represents the changes made by this step,
16226
16226
  and which can be used to transform between positions in the old
@@ -16303,7 +16303,7 @@ Actual: ` + p3.attribValue
16303
16303
  }
16304
16304
  return Z$1.fromArray(n);
16305
16305
  }
16306
- let ct$1 = class ct2 extends Pe$2 {
16306
+ let ct$1 = class ct2 extends Pe$1 {
16307
16307
  /**
16308
16308
  Create a mark step.
16309
16309
  */
@@ -16341,8 +16341,8 @@ Actual: ` + p3.attribValue
16341
16341
  return new ct2(t.from, t.to, e.markFromJSON(t.mark));
16342
16342
  }
16343
16343
  };
16344
- Pe$2.jsonID("addMark", ct$1);
16345
- let et$2 = class et2 extends Pe$2 {
16344
+ Pe$1.jsonID("addMark", ct$1);
16345
+ let et$2 = class et2 extends Pe$1 {
16346
16346
  /**
16347
16347
  Create a mark-removing step.
16348
16348
  */
@@ -16380,8 +16380,8 @@ Actual: ` + p3.attribValue
16380
16380
  return new et2(t.from, t.to, e.markFromJSON(t.mark));
16381
16381
  }
16382
16382
  };
16383
- Pe$2.jsonID("removeMark", et$2);
16384
- let ft$1 = class ft2 extends Pe$2 {
16383
+ Pe$1.jsonID("removeMark", et$2);
16384
+ let ft$1 = class ft2 extends Pe$1 {
16385
16385
  /**
16386
16386
  Create a node mark step.
16387
16387
  */
@@ -16424,8 +16424,8 @@ Actual: ` + p3.attribValue
16424
16424
  return new ft2(t.pos, e.markFromJSON(t.mark));
16425
16425
  }
16426
16426
  };
16427
- Pe$2.jsonID("addNodeMark", ft$1);
16428
- let Tt$2 = class Tt2 extends Pe$2 {
16427
+ Pe$1.jsonID("addNodeMark", ft$1);
16428
+ let Tt$2 = class Tt2 extends Pe$1 {
16429
16429
  /**
16430
16430
  Create a mark-removing step.
16431
16431
  */
@@ -16459,8 +16459,8 @@ Actual: ` + p3.attribValue
16459
16459
  return new Tt2(t.pos, e.markFromJSON(t.mark));
16460
16460
  }
16461
16461
  };
16462
- Pe$2.jsonID("removeNodeMark", Tt$2);
16463
- let Ie$3 = class Ie2 extends Pe$2 {
16462
+ Pe$1.jsonID("removeNodeMark", Tt$2);
16463
+ let Ie$3 = class Ie2 extends Pe$1 {
16464
16464
  /**
16465
16465
  The given `slice` should fit the 'gap' between `from` and
16466
16466
  `to`—the depths must line up, and the surrounding nodes must be
@@ -16511,8 +16511,8 @@ Actual: ` + p3.attribValue
16511
16511
  return new Ie2(t.from, t.to, oe$1.fromJSON(e, t.slice), !!t.structure);
16512
16512
  }
16513
16513
  };
16514
- Pe$2.jsonID("replace", Ie$3);
16515
- let Je$3 = class Je2 extends Pe$2 {
16514
+ Pe$1.jsonID("replace", Ie$3);
16515
+ let Je$3 = class Je2 extends Pe$1 {
16516
16516
  /**
16517
16517
  Create a replace-around step with the given range and gap.
16518
16518
  `insert` should be the point in the slice into which the content
@@ -16569,7 +16569,7 @@ Actual: ` + p3.attribValue
16569
16569
  return new Je2(t.from, t.to, t.gapFrom, t.gapTo, oe$1.fromJSON(e, t.slice), t.insert, !!t.structure);
16570
16570
  }
16571
16571
  };
16572
- Pe$2.jsonID("replaceAround", Je$3);
16572
+ Pe$1.jsonID("replaceAround", Je$3);
16573
16573
  function li$2(r22, e, t) {
16574
16574
  let n = r22.resolve(e), i3 = t - e, s = n.depth;
16575
16575
  for (; i3 > 0 && s > 0 && n.indexAfter(s) == n.node(s).childCount; )
@@ -17155,7 +17155,7 @@ Actual: ` + p3.attribValue
17155
17155
  }
17156
17156
  return t;
17157
17157
  }
17158
- let Ct$3 = class Ct2 extends Pe$2 {
17158
+ let Ct$3 = class Ct2 extends Pe$1 {
17159
17159
  /**
17160
17160
  Construct an attribute step.
17161
17161
  */
@@ -17192,8 +17192,8 @@ Actual: ` + p3.attribValue
17192
17192
  return new Ct2(t.pos, t.attr, t.value);
17193
17193
  }
17194
17194
  };
17195
- Pe$2.jsonID("attr", Ct$3);
17196
- let Gt$3 = class Gt2 extends Pe$2 {
17195
+ Pe$1.jsonID("attr", Ct$3);
17196
+ let Gt$3 = class Gt2 extends Pe$1 {
17197
17197
  /**
17198
17198
  Construct an attribute step.
17199
17199
  */
@@ -17226,7 +17226,7 @@ Actual: ` + p3.attribValue
17226
17226
  return new Gt2(t.attr, t.value);
17227
17227
  }
17228
17228
  };
17229
- Pe$2.jsonID("docAttr", Gt$3);
17229
+ Pe$1.jsonID("docAttr", Gt$3);
17230
17230
  let Ft$2 = class Ft extends Error {
17231
17231
  };
17232
17232
  Ft$2 = function r(e) {
@@ -23421,7 +23421,7 @@ Actual: ` + p3.attribValue
23421
23421
  return;
23422
23422
  }
23423
23423
  }
23424
- static updateDocumentVersion(e = this.convertedXml, t = "0.9.18") {
23424
+ static updateDocumentVersion(e = this.convertedXml, t = "0.9.19") {
23425
23425
  const n = "docProps/custom.xml";
23426
23426
  e[n] || (e[n] = Au$2());
23427
23427
  const i3 = e["docProps/custom.xml"];
@@ -23646,7 +23646,7 @@ Actual: ` + p3.attribValue
23646
23646
  function Au$2() {
23647
23647
  return Nf$2;
23648
23648
  }
23649
- function Du$2(r22 = 2, e = "0.9.18") {
23649
+ function Du$2(r22 = 2, e = "0.9.19") {
23650
23650
  return {
23651
23651
  type: "element",
23652
23652
  name: "property",
@@ -26695,7 +26695,7 @@ Actual: ` + p3.attribValue
26695
26695
  }
26696
26696
  const it = typeof navigator < "u" ? navigator : null, ia$1 = typeof document < "u" ? document : null, Ut$2 = it && it.userAgent || "", wi$1 = /Edge\/(\d+)/.exec(Ut$2), rc$1 = /MSIE \d/.exec(Ut$2), vi$1 = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ut$2), Te$1 = !!(rc$1 || vi$1 || wi$1), Lt$1 = rc$1 ? document.documentMode : vi$1 ? +vi$1[1] : wi$1 ? +wi$1[1] : 0, Ye$2 = !Te$1 && /gecko\/(\d+)/i.test(Ut$2);
26697
26697
  Ye$2 && +(/Firefox\/(\d+)/.exec(Ut$2) || [0, 0])[1];
26698
- const ki$1 = !Te$1 && /Chrome\/(\d+)/.exec(Ut$2), we$1 = !!ki$1, oc$1 = ki$1 ? +ki$1[1] : 0, Me$1 = !Te$1 && !!it && /Apple Computer/.test(it.vendor), Tn$1 = Me$1 && (/Mobile\/\w+/.test(Ut$2) || !!it && it.maxTouchPoints > 2), ze$1 = Tn$1 || (it ? /Mac/.test(it.platform) : false), Xf$1 = it ? /Win/.test(it.platform) : false, yt$1 = /Android \d/.test(Ut$2), Tr$1 = !!ia$1 && "webkitFontSmoothing" in ia$1.documentElement.style, Jf$1 = Tr$1 ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
26698
+ const ki$1 = !Te$1 && /Chrome\/(\d+)/.exec(Ut$2), we$1 = !!ki$1, oc$1 = ki$1 ? +ki$1[1] : 0, Me$1 = !Te$1 && !!it && /Apple Computer/.test(it.vendor), Tn$1 = Me$1 && (/Mobile\/\w+/.test(Ut$2) || !!it && it.maxTouchPoints > 2), ze$2 = Tn$1 || (it ? /Mac/.test(it.platform) : false), Xf$1 = it ? /Win/.test(it.platform) : false, yt$1 = /Android \d/.test(Ut$2), Tr$1 = !!ia$1 && "webkitFontSmoothing" in ia$1.documentElement.style, Jf$1 = Tr$1 ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
26699
26699
  function Yf$1(t) {
26700
26700
  let e = t.defaultView && t.defaultView.visualViewport;
26701
26701
  return e ? {
@@ -28188,7 +28188,7 @@ Actual: ` + p3.attribValue
28188
28188
  if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
28189
28189
  let o = xi$1(t.state, e);
28190
28190
  return o && o instanceof Ge$1 ? Nt$2(t, o) : false;
28191
- } else if (!(ze$1 && n.indexOf("m") > -1)) {
28191
+ } else if (!(ze$2 && n.indexOf("m") > -1)) {
28192
28192
  let o = r.$head, i3 = o.textOffset ? null : e < 0 ? o.nodeBefore : o.nodeAfter, s;
28193
28193
  if (!i3 || i3.isText)
28194
28194
  return false;
@@ -28348,7 +28348,7 @@ Actual: ` + p3.attribValue
28348
28348
  }
28349
28349
  function ka$1(t, e, n) {
28350
28350
  let r = t.state.selection;
28351
- if (r instanceof tt$2 && !r.empty || n.indexOf("s") > -1 || ze$1 && n.indexOf("m") > -1)
28351
+ if (r instanceof tt$2 && !r.empty || n.indexOf("s") > -1 || ze$2 && n.indexOf("m") > -1)
28352
28352
  return false;
28353
28353
  let { $from: o, $to: i3 } = r;
28354
28354
  if (!o.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
@@ -28398,24 +28398,24 @@ Actual: ` + p3.attribValue
28398
28398
  }
28399
28399
  function Dp(t, e) {
28400
28400
  let n = e.keyCode, r = Tp$1(e);
28401
- if (n == 8 || ze$1 && n == 72 && r == "c")
28401
+ if (n == 8 || ze$2 && n == 72 && r == "c")
28402
28402
  return Ca$1(t, -1) || gn$2(t, -1);
28403
- if (n == 46 && !e.shiftKey || ze$1 && n == 68 && r == "c")
28403
+ if (n == 46 && !e.shiftKey || ze$2 && n == 68 && r == "c")
28404
28404
  return Ca$1(t, 1) || gn$2(t, 1);
28405
28405
  if (n == 13 || n == 27)
28406
28406
  return true;
28407
- if (n == 37 || ze$1 && n == 66 && r == "c") {
28407
+ if (n == 37 || ze$2 && n == 66 && r == "c") {
28408
28408
  let o = n == 37 ? va$1(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
28409
28409
  return wa$1(t, o, r) || gn$2(t, o);
28410
- } else if (n == 39 || ze$1 && n == 70 && r == "c") {
28410
+ } else if (n == 39 || ze$2 && n == 70 && r == "c") {
28411
28411
  let o = n == 39 ? va$1(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
28412
28412
  return wa$1(t, o, r) || gn$2(t, o);
28413
28413
  } else {
28414
- if (n == 38 || ze$1 && n == 80 && r == "c")
28414
+ if (n == 38 || ze$2 && n == 80 && r == "c")
28415
28415
  return ka$1(t, -1, r) || gn$2(t, -1);
28416
- if (n == 40 || ze$1 && n == 78 && r == "c")
28416
+ if (n == 40 || ze$2 && n == 78 && r == "c")
28417
28417
  return Op(t) || ka$1(t, 1, r) || gn$2(t, 1);
28418
- if (r == (ze$1 ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
28418
+ if (r == (ze$2 ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
28419
28419
  return true;
28420
28420
  }
28421
28421
  return false;
@@ -28672,7 +28672,7 @@ Actual: ` + p3.attribValue
28672
28672
  };
28673
28673
  Oe$1.keypress = (t, e) => {
28674
28674
  let n = e;
28675
- if (Oc$1(t, n) || !n.charCode || n.ctrlKey && !n.altKey || ze$1 && n.metaKey)
28675
+ if (Oc$1(t, n) || !n.charCode || n.ctrlKey && !n.altKey || ze$2 && n.metaKey)
28676
28676
  return;
28677
28677
  if (t.someProp("handleKeyPress", (o) => o(t, n))) {
28678
28678
  n.preventDefault();
@@ -28757,7 +28757,7 @@ Actual: ` + p3.attribValue
28757
28757
  function ks(t) {
28758
28758
  return ho$1(t);
28759
28759
  }
28760
- const Ac$1 = ze$1 ? "metaKey" : "ctrlKey";
28760
+ const Ac$1 = ze$2 ? "metaKey" : "ctrlKey";
28761
28761
  Ae.mousedown = (t, e) => {
28762
28762
  let n = e;
28763
28763
  t.input.shiftKey = n.shiftKey;
@@ -28948,7 +28948,7 @@ Actual: ` + p3.attribValue
28948
28948
  this.slice = e, this.move = n, this.node = r;
28949
28949
  }
28950
28950
  };
28951
- const nh$1 = ze$1 ? "altKey" : "ctrlKey";
28951
+ const nh$1 = ze$2 ? "altKey" : "ctrlKey";
28952
28952
  function Pc$1(t, e) {
28953
28953
  let n = t.someProp("dragCopies", (r) => !r(e));
28954
28954
  return n ?? !e[nh$1];
@@ -35977,6 +35977,7 @@ Actual: ` + p3.attribValue
35977
35977
  });
35978
35978
  }
35979
35979
  getMaxContentSize() {
35980
+ if (!this.converter) return {};
35980
35981
  const { pageSize: n = {}, pageMargins: r = {} } = this.converter.pageStyles ?? {}, { width: o, height: i3 } = n, { top: s = 0, bottom: a = 0, left: l = 0, right: c3 = 0 } = r;
35981
35982
  if (!o || !i3) return {};
35982
35983
  const d = i3 * 96 - s * 96 - a * 96 - 50;
@@ -36125,7 +36126,7 @@ Actual: ` + p3.attribValue
36125
36126
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
36126
36127
  */
36127
36128
  processCollaborationMigrations() {
36128
- if (console.debug("[checkVersionMigrations] Current editor version", "0.9.18"), !this.options.ydoc) return;
36129
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.9.19"), !this.options.ydoc) return;
36129
36130
  let r = this.options.ydoc.getMap("meta").get("version");
36130
36131
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
36131
36132
  const o = Za$1(r) || [], s = this.state.plugins.find((c3) => c3.key.startsWith("y-sync"));
@@ -39751,7 +39752,7 @@ Actual: ` + p3.attribValue
39751
39752
  l ? (n.style.width = a + "px", n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = a + "px");
39752
39753
  }
39753
39754
  }
39754
- var Pe$1 = new np$2(
39755
+ var Pe = new np$2(
39755
39756
  "tableColumnResizing"
39756
39757
  );
39757
39758
  function q0({
@@ -39762,7 +39763,7 @@ Actual: ` + p3.attribValue
39762
39763
  lastColumnResizable: o = true
39763
39764
  } = {}) {
39764
39765
  const i3 = new rp$2({
39765
- key: Pe$1,
39766
+ key: Pe,
39766
39767
  state: {
39767
39768
  init(s, a) {
39768
39769
  var l, c3;
@@ -39775,7 +39776,7 @@ Actual: ` + p3.attribValue
39775
39776
  },
39776
39777
  props: {
39777
39778
  attributes: (s) => {
39778
- const a = Pe$1.getState(s);
39779
+ const a = Pe.getState(s);
39779
39780
  return a && a.activeHandle > -1 ? { class: "resize-cursor" } : {};
39780
39781
  },
39781
39782
  handleDOMEvents: {
@@ -39790,7 +39791,7 @@ Actual: ` + p3.attribValue
39790
39791
  }
39791
39792
  },
39792
39793
  decorations: (s) => {
39793
- const a = Pe$1.getState(s);
39794
+ const a = Pe.getState(s);
39794
39795
  if (a && a.activeHandle > -1)
39795
39796
  return tw(s, a.activeHandle);
39796
39797
  },
@@ -39804,7 +39805,7 @@ Actual: ` + p3.attribValue
39804
39805
  this.activeHandle = e, this.dragging = n;
39805
39806
  }
39806
39807
  apply(e) {
39807
- const n = this, r = e.getMeta(Pe$1);
39808
+ const n = this, r = e.getMeta(Pe);
39808
39809
  if (r && r.setHandle != null)
39809
39810
  return new so2(r.setHandle, false);
39810
39811
  if (r && r.setDragging !== void 0)
@@ -39818,7 +39819,7 @@ Actual: ` + p3.attribValue
39818
39819
  };
39819
39820
  function X0(t, e, n, r) {
39820
39821
  if (!t.editable) return;
39821
- const o = Pe$1.getState(t.state);
39822
+ const o = Pe.getState(t.state);
39822
39823
  if (o && !o.dragging) {
39823
39824
  const i3 = Z0(e.target);
39824
39825
  let s = -1;
@@ -39838,35 +39839,35 @@ Actual: ` + p3.attribValue
39838
39839
  }
39839
39840
  function J0(t) {
39840
39841
  if (!t.editable) return;
39841
- const e = Pe$1.getState(t.state);
39842
+ const e = Pe.getState(t.state);
39842
39843
  e && e.activeHandle > -1 && !e.dragging && pu$1(t, -1);
39843
39844
  }
39844
39845
  function Y0(t, e, n, r) {
39845
39846
  var o;
39846
39847
  if (!t.editable) return false;
39847
- const i3 = (o = t.dom.ownerDocument.defaultView) != null ? o : window, s = Pe$1.getState(t.state);
39848
+ const i3 = (o = t.dom.ownerDocument.defaultView) != null ? o : window, s = Pe.getState(t.state);
39848
39849
  if (!s || s.activeHandle == -1 || s.dragging)
39849
39850
  return false;
39850
39851
  const a = t.state.doc.nodeAt(s.activeHandle), l = G0(t, s.activeHandle, a.attrs);
39851
39852
  t.dispatch(
39852
- t.state.tr.setMeta(Pe$1, {
39853
+ t.state.tr.setMeta(Pe, {
39853
39854
  setDragging: { startX: e.clientX, startWidth: l }
39854
39855
  })
39855
39856
  );
39856
39857
  function c3(u) {
39857
39858
  i3.removeEventListener("mouseup", c3), i3.removeEventListener("mousemove", d);
39858
- const f3 = Pe$1.getState(t.state);
39859
+ const f3 = Pe.getState(t.state);
39859
39860
  f3?.dragging && (Q0(
39860
39861
  t,
39861
39862
  f3.activeHandle,
39862
39863
  wl$1(f3.dragging, u, n)
39863
39864
  ), t.dispatch(
39864
- t.state.tr.setMeta(Pe$1, { setDragging: null })
39865
+ t.state.tr.setMeta(Pe, { setDragging: null })
39865
39866
  ));
39866
39867
  }
39867
39868
  function d(u) {
39868
39869
  if (!u.which) return c3(u);
39869
- const f3 = Pe$1.getState(t.state);
39870
+ const f3 = Pe.getState(t.state);
39870
39871
  if (f3 && f3.dragging) {
39871
39872
  const p3 = wl$1(f3.dragging, u, n);
39872
39873
  vl$1(
@@ -39917,7 +39918,7 @@ Actual: ` + p3.attribValue
39917
39918
  }
39918
39919
  function pu$1(t, e) {
39919
39920
  t.dispatch(
39920
- t.state.tr.setMeta(Pe$1, { setHandle: e })
39921
+ t.state.tr.setMeta(Pe, { setHandle: e })
39921
39922
  );
39922
39923
  }
39923
39924
  function Q0(t, e, n) {
@@ -39959,7 +39960,7 @@ Actual: ` + p3.attribValue
39959
39960
  const d = l + c3 * s.width;
39960
39961
  if ((l == s.width - 1 || s.map[d] != s.map[d + 1]) && (c3 == 0 || s.map[d] != s.map[d - s.width])) {
39961
39962
  const u = s.map[d], f3 = a + u + i3.nodeAt(u).nodeSize - 1, p3 = document.createElement("div");
39962
- p3.className = "column-resize-handle", (n = Pe$1.getState(t)) != null && n.dragging && r.push(
39963
+ p3.className = "column-resize-handle", (n = Pe.getState(t)) != null && n.dragging && r.push(
39963
39964
  z.node(
39964
39965
  a + u,
39965
39966
  a + u + i3.nodeAt(u).nodeSize,
@@ -45068,7 +45069,7 @@ ${o}
45068
45069
  let r = t * Math.min(n, 1 - n), o = (i3, s = (i3 + e / 30) % 12) => n - r * Math.max(Math.min(s - 3, 9 - s, 1), -1);
45069
45070
  return [o(0) * 255, o(8) * 255, o(4) * 255];
45070
45071
  }
45071
- const ze = "^\\s*", Fe = "\\s*$", He$1 = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*", ve = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*", Xe$1 = "([0-9A-Fa-f])", qe = "([0-9A-Fa-f]{2})", di = new RegExp(`${ze}hsl\\s*\\(${ve},${He$1},${He$1}\\)${Fe}`), fi = new RegExp(`${ze}hsv\\s*\\(${ve},${He$1},${He$1}\\)${Fe}`), hi = new RegExp(`${ze}hsla\\s*\\(${ve},${He$1},${He$1},${ve}\\)${Fe}`), pi = new RegExp(`${ze}hsva\\s*\\(${ve},${He$1},${He$1},${ve}\\)${Fe}`), _a = new RegExp(`${ze}rgb\\s*\\(${ve},${ve},${ve}\\)${Fe}`), Ia = new RegExp(`${ze}rgba\\s*\\(${ve},${ve},${ve},${ve}\\)${Fe}`), Oa = new RegExp(`${ze}#${Xe$1}${Xe$1}${Xe$1}${Fe}`), Pa = new RegExp(`${ze}#${qe}${qe}${qe}${Fe}`), La = new RegExp(`${ze}#${Xe$1}${Xe$1}${Xe$1}${Xe$1}${Fe}`), Ra = new RegExp(`${ze}#${qe}${qe}${qe}${qe}${Fe}`);
45072
+ const ze$1 = "^\\s*", Fe = "\\s*$", He$1 = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*", ve = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*", Xe$1 = "([0-9A-Fa-f])", qe = "([0-9A-Fa-f]{2})", di = new RegExp(`${ze$1}hsl\\s*\\(${ve},${He$1},${He$1}\\)${Fe}`), fi = new RegExp(`${ze$1}hsv\\s*\\(${ve},${He$1},${He$1}\\)${Fe}`), hi = new RegExp(`${ze$1}hsla\\s*\\(${ve},${He$1},${He$1},${ve}\\)${Fe}`), pi = new RegExp(`${ze$1}hsva\\s*\\(${ve},${He$1},${He$1},${ve}\\)${Fe}`), _a = new RegExp(`${ze$1}rgb\\s*\\(${ve},${ve},${ve}\\)${Fe}`), Ia = new RegExp(`${ze$1}rgba\\s*\\(${ve},${ve},${ve},${ve}\\)${Fe}`), Oa = new RegExp(`${ze$1}#${Xe$1}${Xe$1}${Xe$1}${Fe}`), Pa = new RegExp(`${ze$1}#${qe}${qe}${qe}${Fe}`), La = new RegExp(`${ze$1}#${Xe$1}${Xe$1}${Xe$1}${Xe$1}${Fe}`), Ra = new RegExp(`${ze$1}#${qe}${qe}${qe}${qe}${Fe}`);
45072
45073
  function fe$1(e) {
45073
45074
  return parseInt(e, 16);
45074
45075
  }
@@ -51568,9 +51569,9 @@ ${t}
51568
51569
  throw TypeError(t);
51569
51570
  };
51570
51571
  var rt = (t, s, o) => s in t ? at(t, s, { enumerable: true, configurable: true, writable: true, value: o }) : t[s] = o;
51571
- var Ie = (t, s, o) => rt(t, typeof s != "symbol" ? s + "" : s, o), Pe = (t, s, o) => s.has(t) || Ne("Cannot " + o);
51572
- var we = (t, s, o) => (Pe(t, s, "read from private field"), o ? o.call(t) : s.get(t)), Le = (t, s, o) => s.has(t) ? Ne("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, o);
51573
- var O = (t, s, o) => (Pe(t, s, "access private method"), o);
51572
+ var Ie = (t, s, o) => rt(t, typeof s != "symbol" ? s + "" : s, o), ze = (t, s, o) => s.has(t) || Ne("Cannot " + o);
51573
+ var we = (t, s, o) => (ze(t, s, "read from private field"), o ? o.call(t) : s.get(t)), Le = (t, s, o) => s.has(t) ? Ne("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, o);
51574
+ var O = (t, s, o) => (ze(t, s, "access private method"), o);
51574
51575
  var Ke = { exports: {} };
51575
51576
  (function(t) {
51576
51577
  var s = Object.prototype.hasOwnProperty, o = "~";
@@ -51631,7 +51632,7 @@ ${t}
51631
51632
  D3[p3 - 1] = arguments[p3];
51632
51633
  v.fn.apply(v.context, D3);
51633
51634
  } else {
51634
- var _ = v.length, A;
51635
+ var _ = v.length, T3;
51635
51636
  for (p3 = 0; p3 < _; p3++)
51636
51637
  switch (v[p3].once && this.removeListener(d, v[p3].fn, void 0, true), M) {
51637
51638
  case 1:
@@ -51647,8 +51648,8 @@ ${t}
51647
51648
  v[p3].fn.call(v[p3].context, u, r, b);
51648
51649
  break;
51649
51650
  default:
51650
- if (!D3) for (A = 1, D3 = new Array(M - 1); A < M; A++)
51651
- D3[A - 1] = arguments[A];
51651
+ if (!D3) for (T3 = 1, D3 = new Array(M - 1); T3 < M; T3++)
51652
+ D3[T3 - 1] = arguments[T3];
51652
51653
  v[p3].fn.apply(v[p3].context, D3);
51653
51654
  }
51654
51655
  }
@@ -51703,7 +51704,7 @@ ${t}
51703
51704
  throw new Error("Toolbar button item needs either icon or label - " + t.name);
51704
51705
  if (!t.name)
51705
51706
  throw new Error("Invalid toolbar item name - " + t.name);
51706
- const o = ref(ga$2()), n = t.type, e = ref(t.name), i3 = t.command, c3 = ref(t.icon), l = ref(t.group || "center"), a = ref(t.allowWithoutEditor), d = ref(t.attributes || {}), u = t.disabled || false, r = ref(t.disabled), b = ref(false), h3 = ref(false), y = ref(t.style), w = ref(t.isNarrow), v = ref(t.isWide), M = ref(t.minWidth), D3 = ref(t.suppressActiveHighlight || false), p3 = ref(t.argument), _ = ref(null), A = ref(null), B = ref(t.iconColor), N = ref(t.hasCaret), Q3 = ref(t.tooltip), he2 = ref(t.tooltipVisible), ae2 = ref(t.tooltipTimeout), re2 = ref(t.defaultLabel), se = ref(t.label), T3 = ref(t.hideLabel), I3 = ref(t.inlineTextInputVisible), H3 = ref(t.hasInlineTextInput), R = ref(t.markName), V = ref(t.labelAttr), q = ref([]);
51707
+ const o = ref(ga$2()), n = t.type, e = ref(t.name), i3 = t.command, c3 = ref(t.icon), l = ref(t.group || "center"), a = ref(t.allowWithoutEditor), d = ref(t.attributes || {}), u = t.disabled || false, r = ref(t.disabled), b = ref(false), h3 = ref(false), y = ref(t.style), w = ref(t.isNarrow), v = ref(t.isWide), M = ref(t.minWidth), D3 = ref(t.suppressActiveHighlight || false), p3 = ref(t.argument), _ = ref(null), T3 = ref(null), B = ref(t.iconColor), N = ref(t.hasCaret), Q3 = ref(t.tooltip), he2 = ref(t.tooltipVisible), ae2 = ref(t.tooltipTimeout), re2 = ref(t.defaultLabel), se = ref(t.label), S = ref(t.hideLabel), I3 = ref(t.inlineTextInputVisible), H3 = ref(t.hasInlineTextInput), R = ref(t.markName), V = ref(t.labelAttr), q = ref([]);
51707
51708
  if (t.options) {
51708
51709
  if (!Array.isArray(t.options)) throw new Error("Invalid toolbar item options - " + t.options);
51709
51710
  q.value.push(...t.options);
@@ -51739,14 +51740,14 @@ ${t}
51739
51740
  isWide: v,
51740
51741
  minWidth: M,
51741
51742
  argument: p3,
51742
- parentItem: A,
51743
+ parentItem: T3,
51743
51744
  iconColor: B,
51744
51745
  hasCaret: N,
51745
51746
  tooltipVisible: he2,
51746
51747
  tooltipTimeout: ae2,
51747
51748
  defaultLabel: re2,
51748
51749
  label: se,
51749
- hideLabel: T3,
51750
+ hideLabel: S,
51750
51751
  inlineTextInputVisible: I3,
51751
51752
  hasInlineTextInput: H3,
51752
51753
  markName: R,
@@ -51764,19 +51765,19 @@ ${t}
51764
51765
  onActivate: Ce2,
51765
51766
  onDeactivate: ve2
51766
51767
  };
51767
- }, Pt = { class: "alignment-buttons" }, zt = ["innerHTML"], Wt = ["innerHTML"], jt = ["innerHTML"], Ut = ["innerHTML"], Vt = {
51768
+ }, zt = { class: "alignment-buttons" }, Pt = ["innerHTML"], Wt = ["innerHTML"], jt = ["innerHTML"], Ut = ["innerHTML"], Vt = {
51768
51769
  __name: "AlignmentButtons",
51769
51770
  emits: ["select"],
51770
51771
  setup(t, { emit: s }) {
51771
51772
  const o = s, n = (e) => {
51772
51773
  o("select", e);
51773
51774
  };
51774
- return (e, i3) => (openBlock(), createElementBlock("div", Pt, [
51775
+ return (e, i3) => (openBlock(), createElementBlock("div", zt, [
51775
51776
  createBaseVNode("div", {
51776
51777
  class: "button-icon",
51777
51778
  onClick: i3[0] || (i3[0] = (c3) => n("left")),
51778
51779
  innerHTML: unref(Ur).alignLeft
51779
- }, null, 8, zt),
51780
+ }, null, 8, Pt),
51780
51781
  createBaseVNode("div", {
51781
51782
  class: "button-icon",
51782
51783
  onClick: i3[1] || (i3[1] = (c3) => n("center")),
@@ -51874,10 +51875,10 @@ ${t}
51874
51875
  type: "text",
51875
51876
  placeholder: "Type or paste a link",
51876
51877
  class: normalizeClass({ error: l.value }),
51877
- "onUpdate:modelValue": _[0] || (_[0] = (A) => d.value = A),
51878
+ "onUpdate:modelValue": _[0] || (_[0] = (T3) => d.value = T3),
51878
51879
  onKeydown: [
51879
51880
  withKeys(withModifiers(i3, ["stop", "prevent"]), ["enter"]),
51880
- _[1] || (_[1] = (A) => l.value = false)
51881
+ _[1] || (_[1] = (T3) => l.value = false)
51881
51882
  ]
51882
51883
  }, null, 42, en), [
51883
51884
  [vModelText, d.value]
@@ -51908,7 +51909,7 @@ ${t}
51908
51909
  ])
51909
51910
  ])) : v.value ? (openBlock(), createElementBlock("div", sn, [
51910
51911
  createBaseVNode("a", {
51911
- onClick: _[2] || (_[2] = withModifiers((...A) => t.goToAnchor && t.goToAnchor(...A), ["stop", "prevent"]))
51912
+ onClick: _[2] || (_[2] = withModifiers((...T3) => t.goToAnchor && t.goToAnchor(...T3), ["stop", "prevent"]))
51912
51913
  }, "Go to " + toDisplayString(t.href.startsWith("#_") ? t.href.substring(2) : t.href), 1)
51913
51914
  ])) : createCommentVNode("", true)
51914
51915
  ]));
@@ -52183,7 +52184,7 @@ ${t}
52183
52184
  createBaseVNode("div", Mn, toDisplayString(n.value) + " x " + toDisplayString(e.value), 1)
52184
52185
  ]));
52185
52186
  }
52186
- }, $n = /* @__PURE__ */ pk(Dn, [["__scopeId", "data-v-06352ab9"]]), Bn = { class: "toolbar-table-actions" }, Hn = ["onClick"], Rn = { class: "toolbar-table-actions__icon" }, On = ["innerHTML"], Nn = { class: "toolbar-table-actions__label" }, Pn = {
52187
+ }, $n = /* @__PURE__ */ pk(Dn, [["__scopeId", "data-v-06352ab9"]]), Bn = { class: "toolbar-table-actions" }, Hn = ["onClick"], Rn = { class: "toolbar-table-actions__icon" }, On = ["innerHTML"], Nn = { class: "toolbar-table-actions__label" }, zn = {
52187
52188
  __name: "TableActions",
52188
52189
  props: {
52189
52190
  options: {
@@ -52210,7 +52211,7 @@ ${t}
52210
52211
  ], 10, Hn))), 256))
52211
52212
  ]));
52212
52213
  }
52213
- }, zn = /* @__PURE__ */ pk(Pn, [["__scopeId", "data-v-9a702d7f"]]), le = (t) => {
52214
+ }, Pn = /* @__PURE__ */ pk(zn, [["__scopeId", "data-v-9a702d7f"]]), le = (t) => {
52214
52215
  t.expand.value = false;
52215
52216
  }, Wn = (t, s = false, o, n, e) => {
52216
52217
  const i3 = E({
@@ -52303,8 +52304,8 @@ ${t}
52303
52304
  ],
52304
52305
  onActivate: ({ fontSize: m }) => {
52305
52306
  if (!m) return l.label.value = l.defaultLabel.value;
52306
- let S = Mp(m, 12);
52307
- S < 8 && (S = 8), S > 96 && (S = 96), l.label.value = String(S);
52307
+ let A = Mp(m, 12);
52308
+ A < 8 && (A = 8), A > 96 && (A = 96), l.label.value = String(A);
52308
52309
  },
52309
52310
  onDeactivate: () => l.label.value = l.defaultLabel.value
52310
52311
  }), a = E({
@@ -52451,7 +52452,7 @@ ${t}
52451
52452
  options: [
52452
52453
  {
52453
52454
  type: "render",
52454
- render: () => A(p3)
52455
+ render: () => T3(p3)
52455
52456
  }
52456
52457
  ]
52457
52458
  }), _ = [
@@ -52513,12 +52514,12 @@ ${t}
52513
52514
  icon: e.fixTables
52514
52515
  }
52515
52516
  ];
52516
- function A(m) {
52517
- return h(zn, {
52517
+ function T3(m) {
52518
+ return h(Pn, {
52518
52519
  options: _,
52519
- onSelect: (S) => {
52520
+ onSelect: (A) => {
52520
52521
  le(m);
52521
- const { command: F3 } = S;
52522
+ const { command: F3 } = A;
52522
52523
  t.emitCommand({ item: m, argument: { command: F3 } });
52523
52524
  }
52524
52525
  });
@@ -52538,10 +52539,10 @@ ${t}
52538
52539
  type: "render",
52539
52540
  render: () => h("div", {}, [
52540
52541
  h(qt, {
52541
- onSelect: (S) => {
52542
+ onSelect: (A) => {
52542
52543
  le(B);
52543
52544
  const F3 = { ...B, command: "setTextAlign" };
52544
- F3.command = "setTextAlign", t.emitCommand({ item: F3, argument: S }), N(B, S);
52545
+ F3.command = "setTextAlign", t.emitCommand({ item: F3, argument: A }), N(B, A);
52545
52546
  }
52546
52547
  })
52547
52548
  ]),
@@ -52554,8 +52555,8 @@ ${t}
52554
52555
  onDeactivate: () => {
52555
52556
  N(B, "left");
52556
52557
  }
52557
- }), N = (m, S) => {
52558
- let F3 = S === "both" ? "justify" : S, X3 = {
52558
+ }), N = (m, A) => {
52559
+ let F3 = A === "both" ? "justify" : A, X3 = {
52559
52560
  left: e.alignLeft,
52560
52561
  right: e.alignRight,
52561
52562
  center: e.alignCenter,
@@ -52594,7 +52595,7 @@ ${t}
52594
52595
  command: "toggleOverflow",
52595
52596
  icon: e.overflow,
52596
52597
  disabled: false
52597
- }), T3 = E({
52598
+ }), S = E({
52598
52599
  type: "dropdown",
52599
52600
  name: "zoom",
52600
52601
  allowWithoutEditor: true,
@@ -52616,7 +52617,7 @@ ${t}
52616
52617
  { label: "200%", key: 2 }
52617
52618
  ],
52618
52619
  onActivate: ({ zoom: m }) => {
52619
- m && (T3.label.value = m);
52620
+ m && (S.label.value = m);
52620
52621
  }
52621
52622
  }), I3 = E({
52622
52623
  type: "button",
@@ -52702,7 +52703,7 @@ ${t}
52702
52703
  tooltip: "Format painter",
52703
52704
  icon: e.copyFormat,
52704
52705
  command: "copyFormat"
52705
- }), Ce2 = (m, S) => m === "editor" ? S : m === "suggester" ? S.filter((F3) => F3.value === "suggesting") : S.filter((F3) => F3.value === "viewing"), ve2 = (m) => m === "editor" ? "Editing" : m === "suggester" ? "Suggesting" : "Viewing", oe2 = E({
52706
+ }), Ce2 = (m, A) => m === "editor" ? A : m === "suggester" ? A.filter((F3) => F3.value === "suggesting") : A.filter((F3) => F3.value === "viewing"), ve2 = (m) => m === "editor" ? "Editing" : m === "suggester" ? "Suggesting" : "Viewing", oe2 = E({
52706
52707
  type: "dropdown",
52707
52708
  name: "documentMode",
52708
52709
  command: "setDocumentMode",
@@ -52748,9 +52749,9 @@ ${t}
52748
52749
  }
52749
52750
  ];
52750
52751
  function ie(m) {
52751
- const S = Ce2(n, ue2);
52752
+ const A = Ce2(n, ue2);
52752
52753
  return h(vn, {
52753
- options: S,
52754
+ options: A,
52754
52755
  onSelect: (F3) => {
52755
52756
  le(m);
52756
52757
  const { label: X3, icon: me2 } = F3;
@@ -52799,10 +52800,10 @@ ${t}
52799
52800
  type: "render",
52800
52801
  key: "linkedStyle",
52801
52802
  render: () => {
52802
- const m = (S) => {
52803
+ const m = (A) => {
52803
52804
  le(ye2);
52804
52805
  const F3 = { ...ye2, command: "setLinkedStyle" };
52805
- t.emitCommand({ item: F3, argument: S });
52806
+ t.emitCommand({ item: F3, argument: A });
52806
52807
  };
52807
52808
  return h("div", {}, [
52808
52809
  h(kn, {
@@ -52824,7 +52825,7 @@ ${t}
52824
52825
  md: 1024,
52825
52826
  xl: 1410
52826
52827
  }, tt2 = 120, nt2 = 32, ot2 = ["linkedStyles", "clearFormatting", "copyFormat", "ruler"], it2 = ["zoom", "fontFamily", "fontSize", "redo"];
52827
- let P3 = [
52828
+ let z3 = [
52828
52829
  I3,
52829
52830
  H3,
52830
52831
  // Dev - tracked changes
@@ -52833,8 +52834,7 @@ ${t}
52833
52834
  q,
52834
52835
  // toggleTrackChangesOriginal,
52835
52836
  // toggleTrackChangesFinal,
52836
- T3,
52837
- a,
52837
+ S,
52838
52838
  c3,
52839
52839
  a,
52840
52840
  l,
@@ -52866,20 +52866,22 @@ ${t}
52866
52866
  oe2
52867
52867
  // search,
52868
52868
  ];
52869
- if (o <= Te2.md && (P3 = P3.filter((m) => m.type !== "separator")), t.config.pagination || (P3 = P3.filter((m) => m.name.value !== "pageBreakTool")), t.config.mode !== "docx") {
52870
- const m = P3.findIndex((S) => S.name.value === "linkedStyles");
52871
- P3.splice(m - 1, 2), P3 = P3.filter((S) => S.name.value !== "ruler");
52869
+ if (o <= Te2.md && (z3 = z3.filter((m) => m.type !== "separator")), t.config.pagination || (z3 = z3.filter((m) => m.name.value !== "pageBreakTool")), t.config.mode !== "docx") {
52870
+ const m = z3.findIndex((F3) => F3.name.value === "linkedStyles");
52871
+ z3.splice(m - 1, 2);
52872
+ const A = ["ruler", "zoom", "undo", "redo"];
52873
+ z3 = z3.filter((F3) => !A.includes(F3.name.value));
52872
52874
  }
52873
52875
  const Oe2 = [R, ce2, de2];
52874
- s || (n === "viewer" && Oe2.push(V, q), P3 = P3.filter((m) => !Oe2.includes(m)));
52876
+ s || (n === "viewer" && Oe2.push(V, q), z3 = z3.filter((m) => !Oe2.includes(m)));
52875
52877
  const st2 = [I3, se, oe2].map((m) => m.name), lt2 = (m) => st2.includes(m.name), _e = [], Ae2 = [];
52876
52878
  let Fe2 = nt2 + tt2;
52877
- return P3.forEach((m) => {
52878
- const S = Re2.get(m.name.value) || Re2.get("default");
52879
+ return z3.forEach((m) => {
52880
+ const A = Re2.get(m.name.value) || Re2.get("default");
52879
52881
  if (o < Te2.xl && ot2.includes(m.name.value)) {
52880
52882
  if (_e.push(m), m.name.value === "linkedStyles") {
52881
- const F3 = P3.findIndex((X3) => X3.name.value === "linkedStyles");
52882
- P3.splice(F3 + 1, 1);
52883
+ const F3 = z3.findIndex((X3) => X3.name.value === "linkedStyles");
52884
+ z3.splice(F3 + 1, 1);
52883
52885
  }
52884
52886
  return;
52885
52887
  }
@@ -52888,10 +52890,10 @@ ${t}
52888
52890
  return;
52889
52891
  }
52890
52892
  if (lt2(m)) {
52891
- Ae2.push(m), Fe2 += S;
52893
+ Ae2.push(m), Fe2 += A;
52892
52894
  return;
52893
52895
  }
52894
- Fe2 < o ? (Ae2.push(m), Fe2 += S) : _e.push(m);
52896
+ Fe2 < o ? (Ae2.push(m), Fe2 += A) : _e.push(m);
52895
52897
  }), {
52896
52898
  defaultItems: Ae2,
52897
52899
  overflowItems: _e.filter((m) => m.type !== "separator")
@@ -52989,7 +52991,9 @@ ${t}
52989
52991
  pagination: false,
52990
52992
  icons: { ...Ur },
52991
52993
  mode: "docx",
52992
- excludeItems: []
52994
+ excludeItems: [],
52995
+ groups: null,
52996
+ editor: null
52993
52997
  });
52994
52998
  Le(this, fe, {
52995
52999
  setZoom: ({ item: o22, argument: n22 }) => {
@@ -53077,7 +53081,7 @@ ${t}
53077
53081
  Ie(this, "onToolbarResize", () => {
53078
53082
  O(this, L, Be).call(this, this, this.config.icons, this.isDev), this.role === "viewer" && O(this, L, He).call(this);
53079
53083
  });
53080
- this.config = { ...this.config, ...o }, this.toolbarItems = [], this.overflowItems = [], this.documentMode = o.documentMode || "editing", this.isDev = o.isDev || false, this.superdoc = o.superdoc, this.role = o.role || "editor", this.config.icons = {
53084
+ this.config = { ...this.config, ...o }, this.toolbarItems = [], this.overflowItems = [], this.documentMode = o.documentMode || "editing", this.isDev = o.isDev || false, this.superdoc = o.superdoc, this.role = o.role || "editor", this.config.editor && (this.config.mode = this.config.editor.options.mode), this.config.icons = {
53081
53085
  ...Ur,
53082
53086
  ...o.icons
53083
53087
  }, !this.config.selector && this.config.element && (this.config.selector = this.config.element), O(this, L, Ze).call(this), O(this, L, Be).call(this, this, this.config.icons, o.isDev);
@@ -53238,52 +53242,52 @@ ${t}
53238
53242
  const o = s, n = t, e = ref(null), i3 = ref([]), c3 = ref("#CCCCCC"), l = ref("#2563EB66"), a = ref(null), d = ref(null), u = ref(false), r = ref(null), b = reactive({ side: "left", x: 0 }), h3 = reactive({ side: "right", x: 0 }), y = ref(false), w = ref(0);
53239
53243
  let v = 0;
53240
53244
  const M = () => {
53241
- const T3 = [], { pageMargins: I3, pageSize: H3 } = n.editor.getPageStyles();
53245
+ const S = [], { pageMargins: I3, pageSize: H3 } = n.editor.getPageStyles();
53242
53246
  a.value = H3, d.value = I3, h3.x = H3.width * 96 - I3.right * 96, b.x = I3.left * 96;
53243
53247
  for (let R = 0; R < H3.width; R++) {
53244
53248
  const q = `${5.5}px`, ce2 = H3.width - R;
53245
- if (T3.push(...D3(1, "main", "20%", q, R)), T3.push(...D3(3, "eighth", "10%", q)), T3.push(...D3(1, "half", "40%", q)), ce2 <= 0.5) break;
53246
- T3.push(...D3(3, "eighth", "10%", q));
53249
+ if (S.push(...D3(1, "main", "20%", q, R)), S.push(...D3(3, "eighth", "10%", q)), S.push(...D3(1, "half", "40%", q)), ce2 <= 0.5) break;
53250
+ S.push(...D3(3, "eighth", "10%", q));
53247
53251
  }
53248
- return T3;
53249
- }, D3 = (T3, I3, H3, R, V) => Array.from({ length: T3 }, (q, ce2) => {
53252
+ return S;
53253
+ }, D3 = (S, I3, H3, R, V) => Array.from({ length: S }, (q, ce2) => {
53250
53254
  const de2 = {
53251
53255
  className: `${I3}-unit ruler-section`,
53252
53256
  height: H3,
53253
53257
  margin: R
53254
53258
  };
53255
53259
  return V !== void 0 && (de2.numbering = V), de2;
53256
- }), p3 = computed(() => (T3) => ({
53260
+ }), p3 = computed(() => (S) => ({
53257
53261
  width: "1px",
53258
53262
  minWidth: "1px",
53259
53263
  maxWidth: "1px",
53260
- height: T3.height,
53261
- backgroundColor: T3.color || "#666",
53262
- marginLeft: T3.numbering === 0 ? null : T3.margin,
53263
- marginRight: T3.margin
53264
- })), _ = computed(() => (T3) => ({
53265
- left: `${(T3 === "left" ? b : h3).x}px`
53266
- })), A = computed(() => {
53264
+ height: S.height,
53265
+ backgroundColor: S.color || "#666",
53266
+ marginLeft: S.numbering === 0 ? null : S.margin,
53267
+ marginRight: S.margin
53268
+ })), _ = computed(() => (S) => ({
53269
+ left: `${(S === "left" ? b : h3).x}px`
53270
+ })), T3 = computed(() => {
53267
53271
  if (!e.value) return;
53268
53272
  const H3 = e.value.parentElement.querySelector(".super-editor").getBoundingClientRect();
53269
53273
  return {
53270
53274
  left: `${r.value.x}px`,
53271
53275
  minHeight: `${H3.height}px`
53272
53276
  };
53273
- }), B = (T3) => {
53277
+ }), B = (S) => {
53274
53278
  u.value = true, he2();
53275
- const I3 = T3.currentTarget.id;
53276
- r.value = I3 === "left-margin-handle" ? b : h3, w.value = r.value.x, v = T3.clientX - r.value.x, y.value = true;
53277
- }, N = (T3) => {
53279
+ const I3 = S.currentTarget.id;
53280
+ r.value = I3 === "left-margin-handle" ? b : h3, w.value = r.value.x, v = S.clientX - r.value.x, y.value = true;
53281
+ }, N = (S) => {
53278
53282
  if (!u.value) return;
53279
- const I3 = T3.clientX - v;
53283
+ const I3 = S.clientX - v;
53280
53284
  r.value.x = I3, r.value.side === "left" ? I3 <= 0 ? r.value.x = 0 : I3 >= h3.x - xe && (r.value.x = h3.x - xe) : I3 >= a.value.width * 96 ? r.value.x = a.value.width * 96 : I3 <= b.x + xe && (r.value.x = b.x + xe);
53281
53285
  }, Q3 = () => {
53282
53286
  if (u.value = false, y.value = false, ae2(), r.value && r.value.x !== w.value) {
53283
- const T3 = re2();
53287
+ const S = re2();
53284
53288
  o("margin-change", {
53285
53289
  side: r.value.side,
53286
- value: T3
53290
+ value: S
53287
53291
  });
53288
53292
  }
53289
53293
  }, he2 = () => {
@@ -53299,7 +53303,7 @@ ${t}
53299
53303
  i3.value = M(), window.addEventListener("mousemove", N), window.addEventListener("mouseup", Q3);
53300
53304
  }), onUnmounted(() => {
53301
53305
  window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", Q3);
53302
- }), (T3, I3) => (openBlock(), createElementBlock("div", {
53306
+ }), (S, I3) => (openBlock(), createElementBlock("div", {
53303
53307
  class: "ruler",
53304
53308
  ref_key: "ruler",
53305
53309
  ref: e,
@@ -53320,7 +53324,7 @@ ${t}
53320
53324
  y.value ? (openBlock(), createElementBlock("div", {
53321
53325
  key: 0,
53322
53326
  class: "vertical-indicator",
53323
- style: normalizeStyle(A.value)
53327
+ style: normalizeStyle(T3.value)
53324
53328
  }, null, 4)) : createCommentVNode("", true),
53325
53329
  (openBlock(true), createElementBlock(Fragment, null, renderList(i3.value, (H3) => (openBlock(), createElementBlock("div", {
53326
53330
  class: normalizeClass(H3.className),
@@ -53376,16 +53380,16 @@ ${t}
53376
53380
  let a;
53377
53381
  const d = () => {
53378
53382
  clearTimeout(a);
53379
- }, u = (p3, _ = 10, A = 500) => {
53383
+ }, u = (p3, _ = 10, T3 = 500) => {
53380
53384
  const B = p3.getMap("meta"), N = () => {
53381
53385
  const Q3 = B.get("docx");
53382
- Q3 ? (d(), y({ content: Q3 })) : _ > 0 ? (console.debug(`Waiting for 'docx' data... retries left: ${_}`), a = setTimeout(N, A), _--) : console.warn("Failed to load docx data from meta map.");
53386
+ Q3 ? (d(), y({ content: Q3 })) : _ > 0 ? (console.debug(`Waiting for 'docx' data... retries left: ${_}`), a = setTimeout(N, T3), _--) : console.warn("Failed to load docx data from meta map.");
53383
53387
  };
53384
53388
  N();
53385
53389
  }, r = async () => {
53386
53390
  try {
53387
- const [p3, _, A, B] = await Hi$1.loadXmlData(n.fileSource);
53388
- return { content: p3, media: _, mediaFiles: A, fonts: B };
53391
+ const [p3, _, T3, B] = await Hi$1.loadXmlData(n.fileSource);
53392
+ return { content: p3, media: _, mediaFiles: T3, fonts: B };
53389
53393
  } catch (p3) {
53390
53394
  console.debug("Error loading new file data:", p3);
53391
53395
  }
@@ -53395,15 +53399,15 @@ ${t}
53395
53399
  return y(p3);
53396
53400
  } else if (n.options.ydoc && n.options.collaborationProvider) {
53397
53401
  delete n.options.content;
53398
- const p3 = n.options.ydoc, _ = n.options.collaborationProvider, A = () => {
53399
- u(p3), _.off("synced", A);
53402
+ const p3 = n.options.ydoc, _ = n.options.collaborationProvider, T3 = () => {
53403
+ u(p3), _.off("synced", T3);
53400
53404
  };
53401
- _.on("synced", A);
53405
+ _.on("synced", T3);
53402
53406
  }
53403
53407
  }, h3 = () => {
53404
53408
  const p3 = Nk();
53405
53409
  return n.options.pagination ? p3 : p3.filter((_) => _.name !== "pagination");
53406
- }, y = async ({ content: p3, media: _ = {}, mediaFiles: A = {}, fonts: B = {} } = {}) => {
53410
+ }, y = async ({ content: p3, media: _ = {}, mediaFiles: T3 = {}, fonts: B = {} } = {}) => {
53407
53411
  i3.value = new Hi$1({
53408
53412
  mode: "docx",
53409
53413
  element: l.value,
@@ -53413,7 +53417,7 @@ ${t}
53413
53417
  documentId: n.documentId,
53414
53418
  content: p3,
53415
53419
  media: _,
53416
- mediaFiles: A,
53420
+ mediaFiles: T3,
53417
53421
  fonts: B,
53418
53422
  ...n.options
53419
53423
  }), i3.value.on("paginationUpdate", () => {
@@ -53439,7 +53443,7 @@ ${t}
53439
53443
  p3.target.classList.contains("ProseMirror") || Zn(p3, i3.value);
53440
53444
  }, D3 = ({ side: p3, value: _ }) => {
53441
53445
  if (!i3.value) return;
53442
- const A = i3.value.getPageStyles(), { pageMargins: B } = A, N = { ...B, [p3]: _ };
53446
+ const T3 = i3.value.getPageStyles(), { pageMargins: B } = T3, N = { ...B, [p3]: _ };
53443
53447
  i3.value?.updatePageStyle({ pageMargins: N });
53444
53448
  };
53445
53449
  return onBeforeUnmount(() => {
@@ -68324,7 +68328,7 @@ ${style2}
68324
68328
  this.config.colors = shuffleArray(this.config.colors);
68325
68329
  this.userColorMap = /* @__PURE__ */ new Map();
68326
68330
  this.colorIndex = 0;
68327
- this.version = "0.9.18";
68331
+ this.version = "0.9.19";
68328
68332
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
68329
68333
  this.superdocId = config.superdocId || v4();
68330
68334
  this.colors = this.config.colors;