@univerjs/core 0.1.9 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/lib/cjs/index.js +8 -8
  2. package/lib/es/index.js +1319 -1286
  3. package/lib/types/common/unit.d.ts +1 -1
  4. package/lib/types/docs/data-model/action-types.d.ts +1 -1
  5. package/lib/types/docs/data-model/apply-utils/update-apply.d.ts +1 -1
  6. package/lib/types/docs/data-model/document-data-model.d.ts +4 -5
  7. package/lib/types/docs/data-model/empty-snapshot.d.ts +1 -1
  8. package/lib/types/docs/data-model/text-x/text-x.d.ts +2 -2
  9. package/lib/types/docs/data-model/text-x/utils.d.ts +2 -2
  10. package/lib/types/docs/data-model/types.d.ts +2 -1
  11. package/lib/types/index.d.ts +1 -0
  12. package/lib/types/observer/observable-hooks.d.ts +1 -1
  13. package/lib/types/services/command/command.service.d.ts +2 -2
  14. package/lib/types/services/context/context.service.d.ts +1 -1
  15. package/lib/types/services/floating-object/floating-object-manager.service.d.ts +6 -6
  16. package/lib/types/services/instance/instance.service.d.ts +7 -7
  17. package/lib/types/services/lifecycle/lifecycle.service.d.ts +4 -4
  18. package/lib/types/services/locale/locale.service.d.ts +3 -3
  19. package/lib/types/services/permission/permission.service.d.ts +4 -4
  20. package/lib/types/services/permission/univer.permission.service.d.ts +2 -2
  21. package/lib/types/services/plugin/__tests__/plugin-override.spec.d.ts +16 -0
  22. package/lib/types/services/plugin/plugin-holder.d.ts +5 -5
  23. package/lib/types/services/plugin/plugin-override.d.ts +4 -3
  24. package/lib/types/services/plugin/plugin.d.ts +3 -3
  25. package/lib/types/services/plugin/plugin.service.d.ts +3 -3
  26. package/lib/types/services/resource-loader/resource-loader.service.d.ts +5 -5
  27. package/lib/types/services/resource-loader/type.d.ts +1 -1
  28. package/lib/types/services/resource-manager/resource-manager.service.d.ts +2 -2
  29. package/lib/types/services/resource-manager/type.d.ts +3 -3
  30. package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +3 -3
  31. package/lib/types/services/snapshot/snapshot-server.service.d.ts +1 -1
  32. package/lib/types/services/snapshot/snapshot-transform.d.ts +4 -4
  33. package/lib/types/services/snapshot/snapshot-utils.d.ts +5 -5
  34. package/lib/types/services/theme/theme.service.d.ts +1 -1
  35. package/lib/types/services/undoredo/undoredo.service.d.ts +6 -6
  36. package/lib/types/services/user-manager/user-manager.service.d.ts +16 -0
  37. package/lib/types/shared/after-init-apply.d.ts +3 -0
  38. package/lib/types/shared/color/color.d.ts +1 -1
  39. package/lib/types/shared/common.d.ts +5 -5
  40. package/lib/types/shared/index.d.ts +1 -0
  41. package/lib/types/shared/lifecycle.d.ts +3 -3
  42. package/lib/types/shared/object-matrix-query.d.ts +1 -1
  43. package/lib/types/shared/object-matrix.d.ts +1 -1
  44. package/lib/types/shared/rectangle.d.ts +1 -1
  45. package/lib/types/shared/rxjs.d.ts +1 -1
  46. package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +1 -1
  47. package/lib/types/sheets/column-manager.d.ts +2 -2
  48. package/lib/types/sheets/empty-snapshot.d.ts +1 -1
  49. package/lib/types/sheets/range.d.ts +4 -4
  50. package/lib/types/sheets/row-manager.d.ts +3 -3
  51. package/lib/types/sheets/styles.d.ts +1 -1
  52. package/lib/types/sheets/view-model.d.ts +3 -3
  53. package/lib/types/sheets/workbook.d.ts +6 -6
  54. package/lib/types/sheets/worksheet.d.ts +7 -7
  55. package/lib/types/slides/slide-model.d.ts +1 -2
  56. package/lib/types/types/enum/locale-type.d.ts +2 -1
  57. package/lib/types/types/interfaces/i-cell-custom-render.d.ts +3 -3
  58. package/lib/types/types/interfaces/i-cell-data.d.ts +5 -5
  59. package/lib/types/types/interfaces/i-cell-validation-data.d.ts +1 -1
  60. package/lib/types/types/interfaces/i-data-validation.d.ts +5 -5
  61. package/lib/types/types/interfaces/i-document-data.d.ts +23 -18
  62. package/lib/types/types/interfaces/i-extra-model-data.d.ts +0 -6
  63. package/lib/types/types/interfaces/i-selection-data.d.ts +1 -1
  64. package/lib/types/types/interfaces/i-shape-properties.d.ts +1 -1
  65. package/lib/types/types/interfaces/i-slide-data.d.ts +10 -10
  66. package/lib/types/types/interfaces/i-style-data.d.ts +3 -3
  67. package/lib/types/types/interfaces/i-univer-data.d.ts +4 -4
  68. package/lib/types/types/interfaces/i-workbook-data.d.ts +4 -4
  69. package/lib/types/types/interfaces/i-worksheet-data.d.ts +6 -6
  70. package/lib/types/univer.d.ts +7 -7
  71. package/lib/umd/index.js +8 -8
  72. package/package.json +8 -8
package/lib/es/index.js CHANGED
@@ -1,14 +1,14 @@
1
- var ws = Object.defineProperty;
2
- var Ls = (t, e, s) => e in t ? ws(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
1
+ var Ss = Object.defineProperty;
2
+ var Ls = (t, e, s) => e in t ? Ss(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
3
3
  var d = (t, e, s) => (Ls(t, typeof e != "symbol" ? e + "" : e, s), s);
4
- import { Subject as W, Observable as re, filter as zt, BehaviorSubject as q, map as bs, distinctUntilChanged as vs, combineLatest as Us } from "rxjs";
5
- import { createIdentifier as G, Inject as x, Injector as tt } from "@wendellhu/redi";
6
- import { map as Ts } from "rxjs/operators";
7
- function Ms() {
8
- Ds();
4
+ import { Subject as H, Observable as ie, filter as Xt, merge as bs, timer as vs, BehaviorSubject as q, map as Us, distinctUntilChanged as Ts, combineLatest as Ms, finalize as Ds } from "rxjs";
5
+ import { filter as ps, debounceTime as xs, first as Ps, map as Hs } from "rxjs/operators";
6
+ import { createIdentifier as G, Inject as P, Injector as tt } from "@wendellhu/redi";
7
+ function Fs() {
8
+ Ws();
9
9
  }
10
10
  const dt = typeof global < "u" ? global : typeof self < "u" ? self : window;
11
- function Ds() {
11
+ function Ws() {
12
12
  typeof dt.requestIdleCallback != "function" && (dt.requestIdleCallback = function(s) {
13
13
  const n = Date.now();
14
14
  return setTimeout(function() {
@@ -24,7 +24,7 @@ function Ds() {
24
24
  clearTimeout(s);
25
25
  });
26
26
  }
27
- function ps(t, e) {
27
+ function Gs(t, e) {
28
28
  let s = 0, n = t.length - 1;
29
29
  for (; s <= n; ) {
30
30
  const r = Math.floor((n + s) / 2);
@@ -39,7 +39,7 @@ function ps(t, e) {
39
39
  }
40
40
  return -1;
41
41
  }
42
- function Ps(t, e) {
42
+ function Bs(t, e) {
43
43
  let s = 0, n = 0, r = 0, i = -1, o = t.length - 1;
44
44
  for (; s < t.length && o >= 0 && o >= s; ) {
45
45
  if (n = t[o], o === 0 ? r = 0 : r = t[o - 1], e >= r && e <= n) {
@@ -54,16 +54,16 @@ function Ps(t, e) {
54
54
  }
55
55
  return i;
56
56
  }
57
- function ho(t, e) {
57
+ function Oo(t, e) {
58
58
  let s = t.length - 1;
59
- return e < 0 ? -1 : e < t[0] ? 0 : e > t[t.length - 1] ? Number.POSITIVE_INFINITY : (t.length < 40 || e <= t[20] || e >= t[s - 20] ? s = Ps(t, e) : s = ps(t, e), s);
59
+ return e < 0 ? -1 : e < t[0] ? 0 : e > t[t.length - 1] ? Number.POSITIVE_INFINITY : (t.length < 40 || e <= t[20] || e >= t[s - 20] ? s = Bs(t, e) : s = Gs(t, e), s);
60
60
  }
61
- function _o(t) {
61
+ function Ao(t) {
62
62
  const e = new Blob([t], { type: "text/javascript" });
63
63
  return window.URL.createObjectURL(e);
64
64
  }
65
- var xs = /* @__PURE__ */ ((t) => (t[t.DEFAULT_SERIES = 0] = "DEFAULT_SERIES", t[t.ALTERNATE_SERIES = 1] = "ALTERNATE_SERIES", t))(xs || {}), S = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.THIN = 1] = "THIN", t[t.HAIR = 2] = "HAIR", t[t.DOTTED = 3] = "DOTTED", t[t.DASHED = 4] = "DASHED", t[t.DASH_DOT = 5] = "DASH_DOT", t[t.DASH_DOT_DOT = 6] = "DASH_DOT_DOT", t[t.DOUBLE = 7] = "DOUBLE", t[t.MEDIUM = 8] = "MEDIUM", t[t.MEDIUM_DASHED = 9] = "MEDIUM_DASHED", t[t.MEDIUM_DASH_DOT = 10] = "MEDIUM_DASH_DOT", t[t.MEDIUM_DASH_DOT_DOT = 11] = "MEDIUM_DASH_DOT_DOT", t[t.SLANT_DASH_DOT = 12] = "SLANT_DASH_DOT", t[t.THICK = 13] = "THICK", t))(S || {}), Hs = /* @__PURE__ */ ((t) => (t.TOP = "top", t.BOTTOM = "bottom", t.LEFT = "left", t.RIGHT = "right", t.NONE = "none", t.ALL = "all", t.OUTSIDE = "outside", t.INSIDE = "inside", t.HORIZONTAL = "horizontal", t.VERTICAL = "vertical", t.TLBR = "tlbr", t.TLBC_TLMR = "tlbc_tlmr", t.TLBR_TLBC_TLMR = "tlbr_tlbc_tlmr", t.BLTR = "bl_tr", t.MLTR_BCTR = "mltr_bctr", t))(Hs || {}), B = /* @__PURE__ */ ((t) => (t[t.UNSUPPORTED = 0] = "UNSUPPORTED", t[t.RGB = 1] = "RGB", t[t.HEX = 2] = "HEX", t[t.THEME = 3] = "THEME", t))(B || {}), Fs = /* @__PURE__ */ ((t) => (t[t.ON = 0] = "ON", t[t.OFF = 1] = "OFF", t))(Fs || {}), Ws = /* @__PURE__ */ ((t) => (t[t.PASTE_NORMAL = 0] = "PASTE_NORMAL", t[t.PASTE_NO_BORDERS = 1] = "PASTE_NO_BORDERS", t[t.PASTE_FORMAT = 2] = "PASTE_FORMAT", t[t.PASTE_FORMULA = 3] = "PASTE_FORMULA", t[t.PASTE_DATA_VALIDATION = 4] = "PASTE_DATA_VALIDATION", t[t.PASTE_VALUES = 5] = "PASTE_VALUES", t[t.PASTE_CONDITIONAL_FORMATTING = 6] = "PASTE_CONDITIONAL_FORMATTING", t[t.PASTE_COLUMN_WIDTHS = 7] = "PASTE_COLUMN_WIDTHS", t))(Ws || {}), Gs = /* @__PURE__ */ ((t) => (t[t.DOCUMENT = 0] = "DOCUMENT", t[t.PROJECT = 1] = "PROJECT", t))(Gs || {}), Bs = /* @__PURE__ */ ((t) => (t[t.COLUMNS = 0] = "COLUMNS", t[t.ROWS = 1] = "ROWS", t))(Bs || {}), ks = /* @__PURE__ */ ((t) => (t[t.UP = 0] = "UP", t[t.RIGHT = 1] = "RIGHT", t[t.DOWN = 2] = "DOWN", t[t.LEFT = 3] = "LEFT", t))(ks || {});
66
- function fo(t) {
65
+ var $s = /* @__PURE__ */ ((t) => (t[t.DEFAULT_SERIES = 0] = "DEFAULT_SERIES", t[t.ALTERNATE_SERIES = 1] = "ALTERNATE_SERIES", t))($s || {}), w = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.THIN = 1] = "THIN", t[t.HAIR = 2] = "HAIR", t[t.DOTTED = 3] = "DOTTED", t[t.DASHED = 4] = "DASHED", t[t.DASH_DOT = 5] = "DASH_DOT", t[t.DASH_DOT_DOT = 6] = "DASH_DOT_DOT", t[t.DOUBLE = 7] = "DOUBLE", t[t.MEDIUM = 8] = "MEDIUM", t[t.MEDIUM_DASHED = 9] = "MEDIUM_DASHED", t[t.MEDIUM_DASH_DOT = 10] = "MEDIUM_DASH_DOT", t[t.MEDIUM_DASH_DOT_DOT = 11] = "MEDIUM_DASH_DOT_DOT", t[t.SLANT_DASH_DOT = 12] = "SLANT_DASH_DOT", t[t.THICK = 13] = "THICK", t))(w || {}), ks = /* @__PURE__ */ ((t) => (t.TOP = "top", t.BOTTOM = "bottom", t.LEFT = "left", t.RIGHT = "right", t.NONE = "none", t.ALL = "all", t.OUTSIDE = "outside", t.INSIDE = "inside", t.HORIZONTAL = "horizontal", t.VERTICAL = "vertical", t.TLBR = "tlbr", t.TLBC_TLMR = "tlbc_tlmr", t.TLBR_TLBC_TLMR = "tlbr_tlbc_tlmr", t.BLTR = "bl_tr", t.MLTR_BCTR = "mltr_bctr", t))(ks || {}), B = /* @__PURE__ */ ((t) => (t[t.UNSUPPORTED = 0] = "UNSUPPORTED", t[t.RGB = 1] = "RGB", t[t.HEX = 2] = "HEX", t[t.THEME = 3] = "THEME", t))(B || {}), Vs = /* @__PURE__ */ ((t) => (t[t.ON = 0] = "ON", t[t.OFF = 1] = "OFF", t))(Vs || {}), js = /* @__PURE__ */ ((t) => (t[t.PASTE_NORMAL = 0] = "PASTE_NORMAL", t[t.PASTE_NO_BORDERS = 1] = "PASTE_NO_BORDERS", t[t.PASTE_FORMAT = 2] = "PASTE_FORMAT", t[t.PASTE_FORMULA = 3] = "PASTE_FORMULA", t[t.PASTE_DATA_VALIDATION = 4] = "PASTE_DATA_VALIDATION", t[t.PASTE_VALUES = 5] = "PASTE_VALUES", t[t.PASTE_CONDITIONAL_FORMATTING = 6] = "PASTE_CONDITIONAL_FORMATTING", t[t.PASTE_COLUMN_WIDTHS = 7] = "PASTE_COLUMN_WIDTHS", t))(js || {}), Ks = /* @__PURE__ */ ((t) => (t[t.DOCUMENT = 0] = "DOCUMENT", t[t.PROJECT = 1] = "PROJECT", t))(Ks || {}), Ys = /* @__PURE__ */ ((t) => (t[t.COLUMNS = 0] = "COLUMNS", t[t.ROWS = 1] = "ROWS", t))(Ys || {}), zs = /* @__PURE__ */ ((t) => (t[t.UP = 0] = "UP", t[t.RIGHT = 1] = "RIGHT", t[t.DOWN = 2] = "DOWN", t[t.LEFT = 3] = "LEFT", t))(zs || {});
66
+ function Io(t) {
67
67
  switch (t) {
68
68
  case 3:
69
69
  return 1;
@@ -75,37 +75,37 @@ function fo(t) {
75
75
  return 0;
76
76
  }
77
77
  }
78
- var $s = /* @__PURE__ */ ((t) => (t[t.NUMBER_FORMAT_TYPE_UNSPECIFIED = 0] = "NUMBER_FORMAT_TYPE_UNSPECIFIED", t[t.TEXT = 1] = "TEXT", t[t.NUMBER = 2] = "NUMBER", t[t.PERCENT = 3] = "PERCENT", t[t.CURRENCY = 4] = "CURRENCY", t[t.DATE = 5] = "DATE", t[t.TIME = 6] = "TIME", t[t.DATE_TIME = 7] = "DATE_TIME", t[t.SCIENTIFIC = 8] = "SCIENTIFIC", t))($s || {}), Vs = /* @__PURE__ */ ((t) => (t[t.INTERPOLATION_POINT_TYPE_UNSPECIFIED = 0] = "INTERPOLATION_POINT_TYPE_UNSPECIFIED", t[t.MIN = 1] = "MIN", t[t.MAX = 2] = "MAX", t[t.NUMBER = 3] = "NUMBER", t[t.PERCENT = 4] = "PERCENT", t[t.PERCENTILE = 5] = "PERCENTILE", t))(Vs || {}), ut = /* @__PURE__ */ ((t) => (t.EN_US = "enUS", t.ZH_CN = "zhCN", t))(ut || {}), js = /* @__PURE__ */ ((t) => (t[t.RANGE = 0] = "RANGE", t[t.SHEET = 1] = "SHEET", t))(js || {}), Ks = /* @__PURE__ */ ((t) => (t[t.RELATIVE_DATE_UNSPECIFIED = 0] = "RELATIVE_DATE_UNSPECIFIED", t[t.PAST_YEAR = 1] = "PAST_YEAR", t[t.PAST_MONTH = 2] = "PAST_MONTH", t[t.PAST_WEEK = 3] = "PAST_WEEK", t[t.YESTERDAY = 4] = "YESTERDAY", t[t.TODAY = 5] = "TODAY", t[t.TOMORROW = 6] = "TOMORROW", t))(Ks || {}), Ys = /* @__PURE__ */ ((t) => (t[t.TYPE_UNSPECIFIED = 0] = "TYPE_UNSPECIFIED", t[t.TEXT_BOX = 1] = "TEXT_BOX", t[t.RECTANGLE = 2] = "RECTANGLE", t[t.ROUND_RECTANGLE = 3] = "ROUND_RECTANGLE", t[t.ELLIPSE = 4] = "ELLIPSE", t[t.ARC = 5] = "ARC", t[t.BENT_ARROW = 6] = "BENT_ARROW", t[t.BENT_UP_ARROW = 7] = "BENT_UP_ARROW", t[t.BEVEL = 8] = "BEVEL", t[t.BLOCK_ARC = 9] = "BLOCK_ARC", t[t.BRACE_PAIR = 10] = "BRACE_PAIR", t[t.BRACKET_PAIR = 11] = "BRACKET_PAIR", t[t.CAN = 12] = "CAN", t[t.CHEVRON = 13] = "CHEVRON", t[t.CHORD = 14] = "CHORD", t[t.CLOUD = 15] = "CLOUD", t[t.CORNER = 16] = "CORNER", t[t.CUBE = 17] = "CUBE", t[t.CURVED_DOWN_ARROW = 18] = "CURVED_DOWN_ARROW", t[t.CURVED_LEFT_ARROW = 19] = "CURVED_LEFT_ARROW", t[t.CURVED_RIGHT_ARROW = 20] = "CURVED_RIGHT_ARROW", t[t.CURVED_UP_ARROW = 21] = "CURVED_UP_ARROW", t[t.DECAGON = 22] = "DECAGON", t[t.DIAGONAL_STRIPE = 23] = "DIAGONAL_STRIPE", t[t.DIAMOND = 24] = "DIAMOND", t[t.DODECAGON = 25] = "DODECAGON", t[t.DONUT = 26] = "DONUT", t[t.DOUBLE_WAVE = 27] = "DOUBLE_WAVE", t[t.DOWN_ARROW = 28] = "DOWN_ARROW", t[t.DOWN_ARROW_CALLOUT = 29] = "DOWN_ARROW_CALLOUT", t[t.FOLDED_CORNER = 30] = "FOLDED_CORNER", t[t.FRAME = 31] = "FRAME", t[t.HALF_FRAME = 32] = "HALF_FRAME", t[t.HEART = 33] = "HEART", t[t.HEPTAGON = 34] = "HEPTAGON", t[t.HEXAGON = 35] = "HEXAGON", t[t.HOME_PLATE = 36] = "HOME_PLATE", t[t.HORIZONTAL_SCROLL = 37] = "HORIZONTAL_SCROLL", t[t.IRREGULAR_SEAL_1 = 38] = "IRREGULAR_SEAL_1", t[t.IRREGULAR_SEAL_2 = 39] = "IRREGULAR_SEAL_2", t[t.LEFT_ARROW = 40] = "LEFT_ARROW", t[t.LEFT_ARROW_CALLOUT = 41] = "LEFT_ARROW_CALLOUT", t[t.LEFT_BRACE = 42] = "LEFT_BRACE", t[t.LEFT_BRACKET = 43] = "LEFT_BRACKET", t[t.LEFT_RIGHT_ARROW = 44] = "LEFT_RIGHT_ARROW", t[t.LEFT_RIGHT_ARROW_CALLOUT = 45] = "LEFT_RIGHT_ARROW_CALLOUT", t[t.LEFT_RIGHT_UP_ARROW = 46] = "LEFT_RIGHT_UP_ARROW", t[t.LEFT_UP_ARROW = 47] = "LEFT_UP_ARROW", t[t.LIGHTNING_BOLT = 48] = "LIGHTNING_BOLT", t[t.MATH_DIVIDE = 49] = "MATH_DIVIDE", t[t.MATH_EQUAL = 50] = "MATH_EQUAL", t[t.MATH_MINUS = 51] = "MATH_MINUS", t[t.MATH_MULTIPLY = 52] = "MATH_MULTIPLY", t[t.MATH_NOT_EQUAL = 53] = "MATH_NOT_EQUAL", t[t.MATH_PLUS = 54] = "MATH_PLUS", t[t.MOON = 55] = "MOON", t[t.NO_SMOKING = 56] = "NO_SMOKING", t[t.NOTCHED_RIGHT_ARROW = 57] = "NOTCHED_RIGHT_ARROW", t[t.OCTAGON = 58] = "OCTAGON", t[t.PARALLELOGRAM = 59] = "PARALLELOGRAM", t[t.PENTAGON = 60] = "PENTAGON", t[t.PIE = 61] = "PIE", t[t.PLAQUE = 62] = "PLAQUE", t[t.PLUS = 63] = "PLUS", t[t.QUAD_ARROW = 64] = "QUAD_ARROW", t[t.QUAD_ARROW_CALLOUT = 65] = "QUAD_ARROW_CALLOUT", t[t.RIBBON = 66] = "RIBBON", t[t.RIBBON_2 = 67] = "RIBBON_2", t[t.RIGHT_ARROW = 68] = "RIGHT_ARROW", t[t.RIGHT_ARROW_CALLOUT = 69] = "RIGHT_ARROW_CALLOUT", t[t.RIGHT_BRACE = 70] = "RIGHT_BRACE", t[t.RIGHT_BRACKET = 71] = "RIGHT_BRACKET", t[t.ROUND_1_RECTANGLE = 72] = "ROUND_1_RECTANGLE", t[t.ROUND_2_DIAGONAL_RECTANGLE = 73] = "ROUND_2_DIAGONAL_RECTANGLE", t[t.ROUND_2_SAME_RECTANGLE = 74] = "ROUND_2_SAME_RECTANGLE", t[t.RIGHT_TRIANGLE = 75] = "RIGHT_TRIANGLE", t[t.SMILEY_FACE = 76] = "SMILEY_FACE", t[t.SNIP_1_RECTANGLE = 77] = "SNIP_1_RECTANGLE", t[t.SNIP_2_DIAGONAL_RECTANGLE = 78] = "SNIP_2_DIAGONAL_RECTANGLE", t[t.SNIP_2_SAME_RECTANGLE = 79] = "SNIP_2_SAME_RECTANGLE", t[t.SNIP_ROUND_RECTANGLE = 80] = "SNIP_ROUND_RECTANGLE", t[t.STAR_10 = 81] = "STAR_10", t[t.STAR_12 = 82] = "STAR_12", t[t.STAR_16 = 83] = "STAR_16", t[t.STAR_24 = 84] = "STAR_24", t[t.STAR_32 = 85] = "STAR_32", t[t.STAR_4 = 86] = "STAR_4", t[t.STAR_5 = 87] = "STAR_5", t[t.STAR_6 = 88] = "STAR_6", t[t.STAR_7 = 89] = "STAR_7", t[t.STAR_8 = 90] = "STAR_8", t[t.STRIPED_RIGHT_ARROW = 91] = "STRIPED_RIGHT_ARROW", t[t.SUN = 92] = "SUN", t[t.TRAPEZOID = 93] = "TRAPEZOID", t[t.TRIANGLE = 94] = "TRIANGLE", t[t.UP_ARROW = 95] = "UP_ARROW", t[t.UP_ARROW_CALLOUT = 96] = "UP_ARROW_CALLOUT", t[t.UP_DOWN_ARROW = 97] = "UP_DOWN_ARROW", t[t.UTURN_ARROW = 98] = "UTURN_ARROW", t[t.VERTICAL_SCROLL = 99] = "VERTICAL_SCROLL", t[t.WAVE = 100] = "WAVE", t[t.WEDGE_ELLIPSE_CALLOUT = 101] = "WEDGE_ELLIPSE_CALLOUT", t[t.WEDGE_RECTANGLE_CALLOUT = 102] = "WEDGE_RECTANGLE_CALLOUT", t[t.WEDGE_ROUND_RECTANGLE_CALLOUT = 103] = "WEDGE_ROUND_RECTANGLE_CALLOUT", t[t.FLOW_CHART_ALTERNATE_PROCESS = 104] = "FLOW_CHART_ALTERNATE_PROCESS", t[t.FLOW_CHART_COLLATE = 105] = "FLOW_CHART_COLLATE", t[t.FLOW_CHART_CONNECTOR = 106] = "FLOW_CHART_CONNECTOR", t[t.FLOW_CHART_DECISION = 107] = "FLOW_CHART_DECISION", t[t.FLOW_CHART_DELAY = 108] = "FLOW_CHART_DELAY", t[t.FLOW_CHART_DISPLAY = 109] = "FLOW_CHART_DISPLAY", t[t.FLOW_CHART_DOCUMENT = 110] = "FLOW_CHART_DOCUMENT", t[t.FLOW_CHART_EXTRACT = 111] = "FLOW_CHART_EXTRACT", t[t.FLOW_CHART_INPUT_OUTPUT = 112] = "FLOW_CHART_INPUT_OUTPUT", t[t.FLOW_CHART_INTERNAL_STORAGE = 113] = "FLOW_CHART_INTERNAL_STORAGE", t[t.FLOW_CHART_MAGNETIC_DISK = 114] = "FLOW_CHART_MAGNETIC_DISK", t[t.FLOW_CHART_MAGNETIC_DRUM = 115] = "FLOW_CHART_MAGNETIC_DRUM", t[t.FLOW_CHART_MAGNETIC_TAPE = 116] = "FLOW_CHART_MAGNETIC_TAPE", t[t.FLOW_CHART_MANUAL_INPUT = 117] = "FLOW_CHART_MANUAL_INPUT", t[t.FLOW_CHART_MANUAL_OPERATION = 118] = "FLOW_CHART_MANUAL_OPERATION", t[t.FLOW_CHART_MERGE = 119] = "FLOW_CHART_MERGE", t[t.FLOW_CHART_MULTIDOCUMENT = 120] = "FLOW_CHART_MULTIDOCUMENT", t[t.FLOW_CHART_OFFLINE_STORAGE = 121] = "FLOW_CHART_OFFLINE_STORAGE", t[t.FLOW_CHART_OFFPAGE_CONNECTOR = 122] = "FLOW_CHART_OFFPAGE_CONNECTOR", t[t.FLOW_CHART_ONLINE_STORAGE = 123] = "FLOW_CHART_ONLINE_STORAGE", t[t.FLOW_CHART_OR = 124] = "FLOW_CHART_OR", t[t.FLOW_CHART_PREDEFINED_PROCESS = 125] = "FLOW_CHART_PREDEFINED_PROCESS", t[t.FLOW_CHART_PREPARATION = 126] = "FLOW_CHART_PREPARATION", t[t.FLOW_CHART_PROCESS = 127] = "FLOW_CHART_PROCESS", t[t.FLOW_CHART_PUNCHED_CARD = 128] = "FLOW_CHART_PUNCHED_CARD", t[t.FLOW_CHART_PUNCHED_TAPE = 129] = "FLOW_CHART_PUNCHED_TAPE", t[t.FLOW_CHART_SORT = 130] = "FLOW_CHART_SORT", t[t.FLOW_CHART_SUMMING_JUNCTION = 131] = "FLOW_CHART_SUMMING_JUNCTION", t[t.FLOW_CHART_TERMINATOR = 132] = "FLOW_CHART_TERMINATOR", t[t.ARROW_EAST = 133] = "ARROW_EAST", t[t.ARROW_NORTH_EAST = 134] = "ARROW_NORTH_EAST", t[t.ARROW_NORTH = 135] = "ARROW_NORTH", t[t.SPEECH = 136] = "SPEECH", t[t.STARBURST = 137] = "STARBURST", t[t.TEARDROP = 138] = "TEARDROP", t[t.ELLIPSE_RIBBON = 139] = "ELLIPSE_RIBBON", t[t.ELLIPSE_RIBBON_2 = 140] = "ELLIPSE_RIBBON_2", t[t.CLOUD_CALLOUT = 141] = "CLOUD_CALLOUT", t[t.CUSTOM = 142] = "CUSTOM", t))(Ys || {}), ie = /* @__PURE__ */ ((t) => (t[t.GRID = 0] = "GRID", t[t.KANBAN = 1] = "KANBAN", t[t.GANTT = 2] = "GANTT", t))(ie || {}), wt = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t))(wt || {}), zs = /* @__PURE__ */ ((t) => (t[t.DASH = 0] = "DASH", t[t.DASH_DOT_DOT_HEAVY = 1] = "DASH_DOT_DOT_HEAVY", t[t.DASH_DOT_HEAVY = 2] = "DASH_DOT_HEAVY", t[t.DASHED_HEAVY = 3] = "DASHED_HEAVY", t[t.DASH_LONG = 4] = "DASH_LONG", t[t.DASH_LONG_HEAVY = 5] = "DASH_LONG_HEAVY", t[t.DOT_DASH = 6] = "DOT_DASH", t[t.DOT_DOT_DASH = 7] = "DOT_DOT_DASH", t[t.DOTTED = 8] = "DOTTED", t[t.DOTTED_HEAVY = 9] = "DOTTED_HEAVY", t[t.DOUBLE = 10] = "DOUBLE", t[t.NONE = 11] = "NONE", t[t.SINGLE = 12] = "SINGLE", t[t.THICK = 13] = "THICK", t[t.WAVE = 14] = "WAVE", t[t.WAVY_DOUBLE = 15] = "WAVY_DOUBLE", t[t.WAVY_HEAVY = 16] = "WAVY_HEAVY", t[t.WORDS = 17] = "WORDS", t))(zs || {}), st = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.LEFT = 1] = "LEFT", t[t.CENTER = 2] = "CENTER", t[t.RIGHT = 3] = "RIGHT", t[t.JUSTIFIED = 4] = "JUSTIFIED", t))(st || {}), at = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.TOP = 1] = "TOP", t[t.MIDDLE = 2] = "MIDDLE", t[t.BOTTOM = 3] = "BOTTOM", t))(at || {}), Lt = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.OVERFLOW = 1] = "OVERFLOW", t[t.CLIP = 2] = "CLIP", t[t.WRAP = 3] = "WRAP", t))(Lt || {}), Xt = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ITALIC = 1] = "ITALIC", t))(Xt || {}), Jt = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.BOLD = 1] = "BOLD", t))(Jt || {}), ct = /* @__PURE__ */ ((t) => (t[t.NORMAL = 1] = "NORMAL", t[t.SUBSCRIPT = 2] = "SUBSCRIPT", t[t.SUPERSCRIPT = 3] = "SUPERSCRIPT", t))(ct || {}), C = /* @__PURE__ */ ((t) => (t[t.FALSE = 0] = "FALSE", t[t.TRUE = 1] = "TRUE", t))(C || {}), nt = /* @__PURE__ */ ((t) => (t[t.STRING = 1] = "STRING", t[t.NUMBER = 2] = "NUMBER", t[t.BOOLEAN = 3] = "BOOLEAN", t[t.FORCE_STRING = 4] = "FORCE_STRING", t))(nt || {}), P = /* @__PURE__ */ ((t) => (t[t.DARK1 = 0] = "DARK1", t[t.LIGHT1 = 1] = "LIGHT1", t[t.DARK2 = 2] = "DARK2", t[t.LIGHT2 = 3] = "LIGHT2", t[t.ACCENT1 = 4] = "ACCENT1", t[t.ACCENT2 = 5] = "ACCENT2", t[t.ACCENT3 = 6] = "ACCENT3", t[t.ACCENT4 = 7] = "ACCENT4", t[t.ACCENT5 = 8] = "ACCENT5", t[t.ACCENT6 = 9] = "ACCENT6", t[t.HYPERLINK = 10] = "HYPERLINK", t[t.FOLLOWED_HYPERLINK = 11] = "FOLLOWED_HYPERLINK", t))(P || {}), oe = /* @__PURE__ */ ((t) => (t.OFFICE = "Office", t.OFFICE_2007_2010 = "Office 2007-2010", t.GRAYSCALE = "Grayscale", t.BLUE_WARM = "Blue Warm", t.BLUE = "Blue", t.BLUE_II = "Blue II", t.BLUE_GREEN = "Blue Green", t.GREEN = "Green", t.GREEN_YELLOW = "Green Yellow", t.YELLOW = "Yellow", t.YELLOW_ORANGE = "Yellow Orange", t.ORANGE = "Orange", t.ORANGE_RED = "Orange Red", t.RED_ORANGE = "Red Orange", t.RED = "Red", t.RED_VIOLET = "Red Violet", t.VIOLET = "Violet", t.VIOLET_II = "Violet II", t.MEDIAN = "Median", t.PAPER = "Paper", t.MARQUEE = "Marquee", t.SLIPSTREAM = "Slipstream", t.Aspect = "Aspect", t))(oe || {});
79
- const Xs = {
80
- [oe.OFFICE]: {
81
- [P.ACCENT1]: "#4472C4",
82
- [P.ACCENT2]: "#ED7D31",
83
- [P.ACCENT3]: "#A5A5A5",
84
- [P.ACCENT4]: "#70AD47",
85
- [P.ACCENT5]: "#5B9BD5",
86
- [P.ACCENT6]: "#70AD47",
87
- [P.DARK1]: "#000000",
88
- [P.DARK2]: "#44546A",
89
- [P.LIGHT1]: "#FFFFFF",
90
- [P.LIGHT2]: "#E7E6E6",
91
- [P.HYPERLINK]: "#0563C1",
92
- [P.FOLLOWED_HYPERLINK]: "#954F72"
78
+ var Xs = /* @__PURE__ */ ((t) => (t[t.NUMBER_FORMAT_TYPE_UNSPECIFIED = 0] = "NUMBER_FORMAT_TYPE_UNSPECIFIED", t[t.TEXT = 1] = "TEXT", t[t.NUMBER = 2] = "NUMBER", t[t.PERCENT = 3] = "PERCENT", t[t.CURRENCY = 4] = "CURRENCY", t[t.DATE = 5] = "DATE", t[t.TIME = 6] = "TIME", t[t.DATE_TIME = 7] = "DATE_TIME", t[t.SCIENTIFIC = 8] = "SCIENTIFIC", t))(Xs || {}), Js = /* @__PURE__ */ ((t) => (t[t.INTERPOLATION_POINT_TYPE_UNSPECIFIED = 0] = "INTERPOLATION_POINT_TYPE_UNSPECIFIED", t[t.MIN = 1] = "MIN", t[t.MAX = 2] = "MAX", t[t.NUMBER = 3] = "NUMBER", t[t.PERCENT = 4] = "PERCENT", t[t.PERCENTILE = 5] = "PERCENTILE", t))(Js || {}), ut = /* @__PURE__ */ ((t) => (t.EN_US = "enUS", t.ZH_CN = "zhCN", t.RU_RU = "ruRU", t))(ut || {}), qs = /* @__PURE__ */ ((t) => (t[t.RANGE = 0] = "RANGE", t[t.SHEET = 1] = "SHEET", t))(qs || {}), Zs = /* @__PURE__ */ ((t) => (t[t.RELATIVE_DATE_UNSPECIFIED = 0] = "RELATIVE_DATE_UNSPECIFIED", t[t.PAST_YEAR = 1] = "PAST_YEAR", t[t.PAST_MONTH = 2] = "PAST_MONTH", t[t.PAST_WEEK = 3] = "PAST_WEEK", t[t.YESTERDAY = 4] = "YESTERDAY", t[t.TODAY = 5] = "TODAY", t[t.TOMORROW = 6] = "TOMORROW", t))(Zs || {}), Qs = /* @__PURE__ */ ((t) => (t[t.TYPE_UNSPECIFIED = 0] = "TYPE_UNSPECIFIED", t[t.TEXT_BOX = 1] = "TEXT_BOX", t[t.RECTANGLE = 2] = "RECTANGLE", t[t.ROUND_RECTANGLE = 3] = "ROUND_RECTANGLE", t[t.ELLIPSE = 4] = "ELLIPSE", t[t.ARC = 5] = "ARC", t[t.BENT_ARROW = 6] = "BENT_ARROW", t[t.BENT_UP_ARROW = 7] = "BENT_UP_ARROW", t[t.BEVEL = 8] = "BEVEL", t[t.BLOCK_ARC = 9] = "BLOCK_ARC", t[t.BRACE_PAIR = 10] = "BRACE_PAIR", t[t.BRACKET_PAIR = 11] = "BRACKET_PAIR", t[t.CAN = 12] = "CAN", t[t.CHEVRON = 13] = "CHEVRON", t[t.CHORD = 14] = "CHORD", t[t.CLOUD = 15] = "CLOUD", t[t.CORNER = 16] = "CORNER", t[t.CUBE = 17] = "CUBE", t[t.CURVED_DOWN_ARROW = 18] = "CURVED_DOWN_ARROW", t[t.CURVED_LEFT_ARROW = 19] = "CURVED_LEFT_ARROW", t[t.CURVED_RIGHT_ARROW = 20] = "CURVED_RIGHT_ARROW", t[t.CURVED_UP_ARROW = 21] = "CURVED_UP_ARROW", t[t.DECAGON = 22] = "DECAGON", t[t.DIAGONAL_STRIPE = 23] = "DIAGONAL_STRIPE", t[t.DIAMOND = 24] = "DIAMOND", t[t.DODECAGON = 25] = "DODECAGON", t[t.DONUT = 26] = "DONUT", t[t.DOUBLE_WAVE = 27] = "DOUBLE_WAVE", t[t.DOWN_ARROW = 28] = "DOWN_ARROW", t[t.DOWN_ARROW_CALLOUT = 29] = "DOWN_ARROW_CALLOUT", t[t.FOLDED_CORNER = 30] = "FOLDED_CORNER", t[t.FRAME = 31] = "FRAME", t[t.HALF_FRAME = 32] = "HALF_FRAME", t[t.HEART = 33] = "HEART", t[t.HEPTAGON = 34] = "HEPTAGON", t[t.HEXAGON = 35] = "HEXAGON", t[t.HOME_PLATE = 36] = "HOME_PLATE", t[t.HORIZONTAL_SCROLL = 37] = "HORIZONTAL_SCROLL", t[t.IRREGULAR_SEAL_1 = 38] = "IRREGULAR_SEAL_1", t[t.IRREGULAR_SEAL_2 = 39] = "IRREGULAR_SEAL_2", t[t.LEFT_ARROW = 40] = "LEFT_ARROW", t[t.LEFT_ARROW_CALLOUT = 41] = "LEFT_ARROW_CALLOUT", t[t.LEFT_BRACE = 42] = "LEFT_BRACE", t[t.LEFT_BRACKET = 43] = "LEFT_BRACKET", t[t.LEFT_RIGHT_ARROW = 44] = "LEFT_RIGHT_ARROW", t[t.LEFT_RIGHT_ARROW_CALLOUT = 45] = "LEFT_RIGHT_ARROW_CALLOUT", t[t.LEFT_RIGHT_UP_ARROW = 46] = "LEFT_RIGHT_UP_ARROW", t[t.LEFT_UP_ARROW = 47] = "LEFT_UP_ARROW", t[t.LIGHTNING_BOLT = 48] = "LIGHTNING_BOLT", t[t.MATH_DIVIDE = 49] = "MATH_DIVIDE", t[t.MATH_EQUAL = 50] = "MATH_EQUAL", t[t.MATH_MINUS = 51] = "MATH_MINUS", t[t.MATH_MULTIPLY = 52] = "MATH_MULTIPLY", t[t.MATH_NOT_EQUAL = 53] = "MATH_NOT_EQUAL", t[t.MATH_PLUS = 54] = "MATH_PLUS", t[t.MOON = 55] = "MOON", t[t.NO_SMOKING = 56] = "NO_SMOKING", t[t.NOTCHED_RIGHT_ARROW = 57] = "NOTCHED_RIGHT_ARROW", t[t.OCTAGON = 58] = "OCTAGON", t[t.PARALLELOGRAM = 59] = "PARALLELOGRAM", t[t.PENTAGON = 60] = "PENTAGON", t[t.PIE = 61] = "PIE", t[t.PLAQUE = 62] = "PLAQUE", t[t.PLUS = 63] = "PLUS", t[t.QUAD_ARROW = 64] = "QUAD_ARROW", t[t.QUAD_ARROW_CALLOUT = 65] = "QUAD_ARROW_CALLOUT", t[t.RIBBON = 66] = "RIBBON", t[t.RIBBON_2 = 67] = "RIBBON_2", t[t.RIGHT_ARROW = 68] = "RIGHT_ARROW", t[t.RIGHT_ARROW_CALLOUT = 69] = "RIGHT_ARROW_CALLOUT", t[t.RIGHT_BRACE = 70] = "RIGHT_BRACE", t[t.RIGHT_BRACKET = 71] = "RIGHT_BRACKET", t[t.ROUND_1_RECTANGLE = 72] = "ROUND_1_RECTANGLE", t[t.ROUND_2_DIAGONAL_RECTANGLE = 73] = "ROUND_2_DIAGONAL_RECTANGLE", t[t.ROUND_2_SAME_RECTANGLE = 74] = "ROUND_2_SAME_RECTANGLE", t[t.RIGHT_TRIANGLE = 75] = "RIGHT_TRIANGLE", t[t.SMILEY_FACE = 76] = "SMILEY_FACE", t[t.SNIP_1_RECTANGLE = 77] = "SNIP_1_RECTANGLE", t[t.SNIP_2_DIAGONAL_RECTANGLE = 78] = "SNIP_2_DIAGONAL_RECTANGLE", t[t.SNIP_2_SAME_RECTANGLE = 79] = "SNIP_2_SAME_RECTANGLE", t[t.SNIP_ROUND_RECTANGLE = 80] = "SNIP_ROUND_RECTANGLE", t[t.STAR_10 = 81] = "STAR_10", t[t.STAR_12 = 82] = "STAR_12", t[t.STAR_16 = 83] = "STAR_16", t[t.STAR_24 = 84] = "STAR_24", t[t.STAR_32 = 85] = "STAR_32", t[t.STAR_4 = 86] = "STAR_4", t[t.STAR_5 = 87] = "STAR_5", t[t.STAR_6 = 88] = "STAR_6", t[t.STAR_7 = 89] = "STAR_7", t[t.STAR_8 = 90] = "STAR_8", t[t.STRIPED_RIGHT_ARROW = 91] = "STRIPED_RIGHT_ARROW", t[t.SUN = 92] = "SUN", t[t.TRAPEZOID = 93] = "TRAPEZOID", t[t.TRIANGLE = 94] = "TRIANGLE", t[t.UP_ARROW = 95] = "UP_ARROW", t[t.UP_ARROW_CALLOUT = 96] = "UP_ARROW_CALLOUT", t[t.UP_DOWN_ARROW = 97] = "UP_DOWN_ARROW", t[t.UTURN_ARROW = 98] = "UTURN_ARROW", t[t.VERTICAL_SCROLL = 99] = "VERTICAL_SCROLL", t[t.WAVE = 100] = "WAVE", t[t.WEDGE_ELLIPSE_CALLOUT = 101] = "WEDGE_ELLIPSE_CALLOUT", t[t.WEDGE_RECTANGLE_CALLOUT = 102] = "WEDGE_RECTANGLE_CALLOUT", t[t.WEDGE_ROUND_RECTANGLE_CALLOUT = 103] = "WEDGE_ROUND_RECTANGLE_CALLOUT", t[t.FLOW_CHART_ALTERNATE_PROCESS = 104] = "FLOW_CHART_ALTERNATE_PROCESS", t[t.FLOW_CHART_COLLATE = 105] = "FLOW_CHART_COLLATE", t[t.FLOW_CHART_CONNECTOR = 106] = "FLOW_CHART_CONNECTOR", t[t.FLOW_CHART_DECISION = 107] = "FLOW_CHART_DECISION", t[t.FLOW_CHART_DELAY = 108] = "FLOW_CHART_DELAY", t[t.FLOW_CHART_DISPLAY = 109] = "FLOW_CHART_DISPLAY", t[t.FLOW_CHART_DOCUMENT = 110] = "FLOW_CHART_DOCUMENT", t[t.FLOW_CHART_EXTRACT = 111] = "FLOW_CHART_EXTRACT", t[t.FLOW_CHART_INPUT_OUTPUT = 112] = "FLOW_CHART_INPUT_OUTPUT", t[t.FLOW_CHART_INTERNAL_STORAGE = 113] = "FLOW_CHART_INTERNAL_STORAGE", t[t.FLOW_CHART_MAGNETIC_DISK = 114] = "FLOW_CHART_MAGNETIC_DISK", t[t.FLOW_CHART_MAGNETIC_DRUM = 115] = "FLOW_CHART_MAGNETIC_DRUM", t[t.FLOW_CHART_MAGNETIC_TAPE = 116] = "FLOW_CHART_MAGNETIC_TAPE", t[t.FLOW_CHART_MANUAL_INPUT = 117] = "FLOW_CHART_MANUAL_INPUT", t[t.FLOW_CHART_MANUAL_OPERATION = 118] = "FLOW_CHART_MANUAL_OPERATION", t[t.FLOW_CHART_MERGE = 119] = "FLOW_CHART_MERGE", t[t.FLOW_CHART_MULTIDOCUMENT = 120] = "FLOW_CHART_MULTIDOCUMENT", t[t.FLOW_CHART_OFFLINE_STORAGE = 121] = "FLOW_CHART_OFFLINE_STORAGE", t[t.FLOW_CHART_OFFPAGE_CONNECTOR = 122] = "FLOW_CHART_OFFPAGE_CONNECTOR", t[t.FLOW_CHART_ONLINE_STORAGE = 123] = "FLOW_CHART_ONLINE_STORAGE", t[t.FLOW_CHART_OR = 124] = "FLOW_CHART_OR", t[t.FLOW_CHART_PREDEFINED_PROCESS = 125] = "FLOW_CHART_PREDEFINED_PROCESS", t[t.FLOW_CHART_PREPARATION = 126] = "FLOW_CHART_PREPARATION", t[t.FLOW_CHART_PROCESS = 127] = "FLOW_CHART_PROCESS", t[t.FLOW_CHART_PUNCHED_CARD = 128] = "FLOW_CHART_PUNCHED_CARD", t[t.FLOW_CHART_PUNCHED_TAPE = 129] = "FLOW_CHART_PUNCHED_TAPE", t[t.FLOW_CHART_SORT = 130] = "FLOW_CHART_SORT", t[t.FLOW_CHART_SUMMING_JUNCTION = 131] = "FLOW_CHART_SUMMING_JUNCTION", t[t.FLOW_CHART_TERMINATOR = 132] = "FLOW_CHART_TERMINATOR", t[t.ARROW_EAST = 133] = "ARROW_EAST", t[t.ARROW_NORTH_EAST = 134] = "ARROW_NORTH_EAST", t[t.ARROW_NORTH = 135] = "ARROW_NORTH", t[t.SPEECH = 136] = "SPEECH", t[t.STARBURST = 137] = "STARBURST", t[t.TEARDROP = 138] = "TEARDROP", t[t.ELLIPSE_RIBBON = 139] = "ELLIPSE_RIBBON", t[t.ELLIPSE_RIBBON_2 = 140] = "ELLIPSE_RIBBON_2", t[t.CLOUD_CALLOUT = 141] = "CLOUD_CALLOUT", t[t.CUSTOM = 142] = "CUSTOM", t))(Qs || {}), oe = /* @__PURE__ */ ((t) => (t[t.GRID = 0] = "GRID", t[t.KANBAN = 1] = "KANBAN", t[t.GANTT = 2] = "GANTT", t))(oe || {}), St = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t))(St || {}), ys = /* @__PURE__ */ ((t) => (t[t.DASH = 0] = "DASH", t[t.DASH_DOT_DOT_HEAVY = 1] = "DASH_DOT_DOT_HEAVY", t[t.DASH_DOT_HEAVY = 2] = "DASH_DOT_HEAVY", t[t.DASHED_HEAVY = 3] = "DASHED_HEAVY", t[t.DASH_LONG = 4] = "DASH_LONG", t[t.DASH_LONG_HEAVY = 5] = "DASH_LONG_HEAVY", t[t.DOT_DASH = 6] = "DOT_DASH", t[t.DOT_DOT_DASH = 7] = "DOT_DOT_DASH", t[t.DOTTED = 8] = "DOTTED", t[t.DOTTED_HEAVY = 9] = "DOTTED_HEAVY", t[t.DOUBLE = 10] = "DOUBLE", t[t.NONE = 11] = "NONE", t[t.SINGLE = 12] = "SINGLE", t[t.THICK = 13] = "THICK", t[t.WAVE = 14] = "WAVE", t[t.WAVY_DOUBLE = 15] = "WAVY_DOUBLE", t[t.WAVY_HEAVY = 16] = "WAVY_HEAVY", t[t.WORDS = 17] = "WORDS", t))(ys || {}), st = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.LEFT = 1] = "LEFT", t[t.CENTER = 2] = "CENTER", t[t.RIGHT = 3] = "RIGHT", t[t.JUSTIFIED = 4] = "JUSTIFIED", t))(st || {}), at = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.TOP = 1] = "TOP", t[t.MIDDLE = 2] = "MIDDLE", t[t.BOTTOM = 3] = "BOTTOM", t))(at || {}), Lt = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.OVERFLOW = 1] = "OVERFLOW", t[t.CLIP = 2] = "CLIP", t[t.WRAP = 3] = "WRAP", t))(Lt || {}), Jt = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ITALIC = 1] = "ITALIC", t))(Jt || {}), qt = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.BOLD = 1] = "BOLD", t))(qt || {}), ct = /* @__PURE__ */ ((t) => (t[t.NORMAL = 1] = "NORMAL", t[t.SUBSCRIPT = 2] = "SUBSCRIPT", t[t.SUPERSCRIPT = 3] = "SUPERSCRIPT", t))(ct || {}), C = /* @__PURE__ */ ((t) => (t[t.FALSE = 0] = "FALSE", t[t.TRUE = 1] = "TRUE", t))(C || {}), nt = /* @__PURE__ */ ((t) => (t[t.STRING = 1] = "STRING", t[t.NUMBER = 2] = "NUMBER", t[t.BOOLEAN = 3] = "BOOLEAN", t[t.FORCE_STRING = 4] = "FORCE_STRING", t))(nt || {}), x = /* @__PURE__ */ ((t) => (t[t.DARK1 = 0] = "DARK1", t[t.LIGHT1 = 1] = "LIGHT1", t[t.DARK2 = 2] = "DARK2", t[t.LIGHT2 = 3] = "LIGHT2", t[t.ACCENT1 = 4] = "ACCENT1", t[t.ACCENT2 = 5] = "ACCENT2", t[t.ACCENT3 = 6] = "ACCENT3", t[t.ACCENT4 = 7] = "ACCENT4", t[t.ACCENT5 = 8] = "ACCENT5", t[t.ACCENT6 = 9] = "ACCENT6", t[t.HYPERLINK = 10] = "HYPERLINK", t[t.FOLLOWED_HYPERLINK = 11] = "FOLLOWED_HYPERLINK", t))(x || {}), ue = /* @__PURE__ */ ((t) => (t.OFFICE = "Office", t.OFFICE_2007_2010 = "Office 2007-2010", t.GRAYSCALE = "Grayscale", t.BLUE_WARM = "Blue Warm", t.BLUE = "Blue", t.BLUE_II = "Blue II", t.BLUE_GREEN = "Blue Green", t.GREEN = "Green", t.GREEN_YELLOW = "Green Yellow", t.YELLOW = "Yellow", t.YELLOW_ORANGE = "Yellow Orange", t.ORANGE = "Orange", t.ORANGE_RED = "Orange Red", t.RED_ORANGE = "Red Orange", t.RED = "Red", t.RED_VIOLET = "Red Violet", t.VIOLET = "Violet", t.VIOLET_II = "Violet II", t.MEDIAN = "Median", t.PAPER = "Paper", t.MARQUEE = "Marquee", t.SLIPSTREAM = "Slipstream", t.Aspect = "Aspect", t))(ue || {});
79
+ const tn = {
80
+ [ue.OFFICE]: {
81
+ [x.ACCENT1]: "#4472C4",
82
+ [x.ACCENT2]: "#ED7D31",
83
+ [x.ACCENT3]: "#A5A5A5",
84
+ [x.ACCENT4]: "#70AD47",
85
+ [x.ACCENT5]: "#5B9BD5",
86
+ [x.ACCENT6]: "#70AD47",
87
+ [x.DARK1]: "#000000",
88
+ [x.DARK2]: "#44546A",
89
+ [x.LIGHT1]: "#FFFFFF",
90
+ [x.LIGHT2]: "#E7E6E6",
91
+ [x.HYPERLINK]: "#0563C1",
92
+ [x.FOLLOWED_HYPERLINK]: "#954F72"
93
93
  }
94
94
  };
95
- class ue {
95
+ class ae {
96
96
  constructor() {
97
- d(this, "_themeValue", P.LIGHT1);
97
+ d(this, "_themeValue", x.LIGHT1);
98
98
  d(this, "_themeColors");
99
99
  d(this, "_themeTint");
100
100
  d(this, "_rgbValue", "");
101
101
  d(this, "_colorType");
102
- this._colorType = B.UNSUPPORTED, this._themeColors = oe.OFFICE, this._themeTint = 0;
102
+ this._colorType = B.UNSUPPORTED, this._themeColors = ue.OFFICE, this._themeTint = 0;
103
103
  }
104
104
  asRgbColor() {
105
- return new qt(this._rgbValue, this);
105
+ return new Zt(this._rgbValue, this);
106
106
  }
107
107
  asThemeColor() {
108
- return new Zt(this._themeValue, this._themeTint, this._themeColors, this);
108
+ return new Qt(this._themeValue, this._themeTint, this._themeColors, this);
109
109
  }
110
110
  build() {
111
111
  switch (this._colorType) {
@@ -144,7 +144,7 @@ class rt {
144
144
  static hexValueToRgbColor(e) {
145
145
  e ? e.indexOf("#") > -1 && (e = e.substring(1)) : e = "#000000";
146
146
  const s = +`0x${e[0]}${e[1]}`, n = +`0x${e[2]}${e[3]}`, r = +`0x${e[4]}${e[5]}`;
147
- return new ue().setRgbColor(`rgb(${s},${n},${r})`).asRgbColor();
147
+ return new ae().setRgbColor(`rgb(${s},${n},${r})`).asRgbColor();
148
148
  }
149
149
  static hexToRgbString(e) {
150
150
  const s = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
@@ -173,7 +173,7 @@ class rt {
173
173
  return !1;
174
174
  }
175
175
  }
176
- class Js {
176
+ class en {
177
177
  constructor(e) {
178
178
  d(this, "_saturation", 0);
179
179
  d(this, "_hue", 0);
@@ -187,7 +187,7 @@ class Js {
187
187
  this._lightness = (o + u) / 2, this._lightness < 0.5 ? this._saturation = a / (u + o) : this._saturation = a / (2 - u - o), s === u && (this._hue = (n - r) / a), n === u && (this._hue = 2 + (r - s) / a), r === u && (this._hue = 4 + (s - n) / a), this._hue *= 60, this._hue < 0 && (this._hue += 360), this._alpha = i;
188
188
  }
189
189
  asRgbColor() {
190
- const e = new ue();
190
+ const e = new ae();
191
191
  if (this._saturation === 0)
192
192
  return e.setRgbColor(
193
193
  `rgba(${this._lightness * 255},${this._lightness * 255},${this._lightness * 255},${this._alpha * 255})`
@@ -220,7 +220,7 @@ class Js {
220
220
  this._lightness = e;
221
221
  }
222
222
  }
223
- const H = class H extends rt {
223
+ const F = class F extends rt {
224
224
  constructor(s, n) {
225
225
  super(n);
226
226
  d(this, "_cssString");
@@ -228,13 +228,13 @@ const H = class H extends rt {
228
228
  d(this, "_green");
229
229
  d(this, "_blue");
230
230
  d(this, "_alpha");
231
- let r = s.match(H.RGBA_EXTRACT);
231
+ let r = s.match(F.RGBA_EXTRACT);
232
232
  if (r) {
233
233
  const i = +r[1], o = +r[2], u = +r[3], a = +r[4];
234
234
  this._cssString = s, this._red = i, this._green = o, this._blue = u, this._alpha = a;
235
235
  return;
236
236
  }
237
- if (r = s.match(H.RGB_EXTRACT), r) {
237
+ if (r = s.match(F.RGB_EXTRACT), r) {
238
238
  const i = +r[1], o = +r[2], u = +r[3];
239
239
  this._cssString = s, this._red = i, this._green = o, this._blue = u, this._alpha = 1;
240
240
  return;
@@ -245,15 +245,15 @@ const H = class H extends rt {
245
245
  return rt.rgbColorToHexValue(this);
246
246
  }
247
247
  getRed() {
248
- let s = this._red + H.RGB_COLOR_AMT;
248
+ let s = this._red + F.RGB_COLOR_AMT;
249
249
  return s > 255 ? s = 255 : s < 0 && (s = 0), s;
250
250
  }
251
251
  getGreen() {
252
- let s = this._green + H.RGB_COLOR_AMT;
252
+ let s = this._green + F.RGB_COLOR_AMT;
253
253
  return s > 255 ? s = 255 : s < 0 && (s = 0), s;
254
254
  }
255
255
  getBlue() {
256
- let s = this._blue + H.RGB_COLOR_AMT;
256
+ let s = this._blue + F.RGB_COLOR_AMT;
257
257
  return s > 255 ? s = 255 : s < 0 && (s = 0), s;
258
258
  }
259
259
  getAlpha() {
@@ -263,22 +263,22 @@ const H = class H extends rt {
263
263
  return B.RGB;
264
264
  }
265
265
  clone() {
266
- return new H(this._cssString, this._builder);
266
+ return new F(this._cssString, this._builder);
267
267
  }
268
268
  asThemeColor() {
269
269
  throw new Error("rgb color not support to themeColor");
270
270
  }
271
271
  equals(s) {
272
- return s instanceof H ? s._red === this._red && s._blue === this._blue && s._green === this._green && s._alpha === this._alpha : !1;
272
+ return s instanceof F ? s._red === this._red && s._blue === this._blue && s._green === this._green && s._alpha === this._alpha : !1;
273
273
  }
274
274
  getCssString() {
275
275
  return this._cssString;
276
276
  }
277
277
  };
278
- d(H, "RGB_COLOR_AMT", 0), d(H, "RGBA_EXTRACT", new RegExp(
278
+ d(F, "RGB_COLOR_AMT", 0), d(F, "RGBA_EXTRACT", new RegExp(
279
279
  "\\s*rgba\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d.\\d|\\d\\s*)\\)\\s*"
280
- )), d(H, "RGB_EXTRACT", new RegExp("\\s*rgb\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*)\\)\\s*"));
281
- let qt = H;
280
+ )), d(F, "RGB_EXTRACT", new RegExp("\\s*rgb\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*)\\)\\s*"));
281
+ let Zt = F;
282
282
  const Y = class Y extends rt {
283
283
  constructor(s, n, r, i) {
284
284
  super(i);
@@ -294,7 +294,7 @@ const Y = class Y extends rt {
294
294
  return s < 0 ? r = n * (1 + s) : r = n * (1 - s) + (255 - 255 * (1 - s)), r;
295
295
  }
296
296
  asRgbColor() {
297
- const s = Xs[this._themeColors];
297
+ const s = tn[this._themeColors];
298
298
  if (s == null)
299
299
  throw new Error("not find themeColors type");
300
300
  const n = s[this._themeColorType];
@@ -306,7 +306,7 @@ const Y = class Y extends rt {
306
306
  return r.get(this._themeColorType);
307
307
  } else
308
308
  r = /* @__PURE__ */ new Map(), Y._cacheThemeColor.set(this._themeColors, r);
309
- const i = new Js(rt.hexValueToRgbColor(n));
309
+ const i = new en(rt.hexValueToRgbColor(n));
310
310
  i.setLightness(this.lumValue(this._themeTint, i.getLightness() * 255) / 255);
311
311
  const o = i.asRgbColor();
312
312
  return r.set(this._themeColorType, o), o;
@@ -325,8 +325,8 @@ const Y = class Y extends rt {
325
325
  }
326
326
  };
327
327
  d(Y, "_cacheThemeColor", /* @__PURE__ */ new Map());
328
- let Zt = Y;
329
- const go = "rgb(", Eo = "rgba(", Ce = {
328
+ let Qt = Y;
329
+ const No = "rgb(", wo = "rgba(", Ce = {
330
330
  aliceBlue: [240, 248, 255],
331
331
  antiqueWhite: [250, 235, 215],
332
332
  aqua: [0, 255, 255],
@@ -477,7 +477,7 @@ const go = "rgb(", Eo = "rgba(", Ce = {
477
477
  yellow: [255, 255, 0],
478
478
  yellowGreen: [154, 205, 5]
479
479
  };
480
- class k {
480
+ class $ {
481
481
  constructor(e) {
482
482
  d(this, "_color");
483
483
  d(this, "_rgbColor");
@@ -486,17 +486,17 @@ class k {
486
486
  this._setNullColor();
487
487
  return;
488
488
  }
489
- if (e instanceof k) {
489
+ if (e instanceof $) {
490
490
  this._color = { ...e._color }, this._rgbColor = { ...e._rgbColor };
491
491
  return;
492
492
  }
493
- const s = ke(e);
493
+ const s = $e(e);
494
494
  if (s == null) {
495
495
  this._setNullColor();
496
496
  return;
497
497
  }
498
498
  this._color = s;
499
- const n = tn(this._color);
499
+ const n = un(this._color);
500
500
  if (n == null) {
501
501
  this._setNullColor();
502
502
  return;
@@ -506,16 +506,16 @@ class k {
506
506
  static mix(e, s, n) {
507
507
  var l, c;
508
508
  n = Math.min(1, Math.max(0, n));
509
- const r = new k(e).toRgb(), i = new k(s).toRgb(), o = (l = r.a) != null ? l : 1, u = (c = i.a) != null ? c : 1, a = {
509
+ const r = new $(e).toRgb(), i = new $(s).toRgb(), o = (l = r.a) != null ? l : 1, u = (c = i.a) != null ? c : 1, a = {
510
510
  r: (i.r - r.r) * n + r.r,
511
511
  g: (i.g - r.g) * n + r.g,
512
512
  b: (i.b - r.b) * n + r.b,
513
513
  a: (u - o) * n + o
514
514
  };
515
- return new k(a);
515
+ return new $(a);
516
516
  }
517
517
  static getContrastRatio(e, s) {
518
- const n = new k(e).getLuminance(), r = new k(s).getLuminance();
518
+ const n = new $(e).getLuminance(), r = new $(s).getLuminance();
519
519
  return (Math.max(n, r) + 0.05) / (Math.min(n, r) + 0.05);
520
520
  }
521
521
  get isValid() {
@@ -541,25 +541,25 @@ class k {
541
541
  return e && u[0][0] === u[0][1] && u[1][0] === u[1][1] && u[2][0] === u[2][1] && u[3][0] === u[3][1] ? o ? `#${u[0][0]}${u[1][0]}${u[2][0]}${u[3][0]}` : `#${u[0][0]}${u[1][0]}${u[2][0]}` : o ? `#${u[0]}${u[1]}${u[2]}${u[3]}` : `#${u[0]}${u[1]}${u[2]}`;
542
542
  }
543
543
  toHsv() {
544
- return rn(this.toRgb());
544
+ return hn(this.toRgb());
545
545
  }
546
546
  toHsl() {
547
- return nn(this.toRgb());
547
+ return cn(this.toRgb());
548
548
  }
549
549
  lighten(e = 10) {
550
550
  const s = this.toHsl();
551
- return s.l += e, s.l = Math.min(Math.max(s.l, 0), 100), new k(s);
551
+ return s.l += e, s.l = Math.min(Math.max(s.l, 0), 100), new $(s);
552
552
  }
553
553
  darken(e = 10) {
554
554
  const s = this.toHsl();
555
- return s.l -= e, s.l = Math.min(Math.max(s.l, 0), 100), new k(s);
555
+ return s.l -= e, s.l = Math.min(Math.max(s.l, 0), 100), new $(s);
556
556
  }
557
557
  setAlpha(e) {
558
- return new k({ ...this._rgbColor, a: e });
558
+ return new $({ ...this._rgbColor, a: e });
559
559
  }
560
560
  getLuminance() {
561
561
  let { r: e, g: s, b: n } = this.toRgb();
562
- return e = Ht(e), s = Ht(s), n = Ht(n), Number((0.2126 * e + 0.7152 * s + 0.0722 * n).toFixed(3));
562
+ return e = Ft(e), s = Ft(s), n = Ft(n), Number((0.2126 * e + 0.7152 * s + 0.0722 * n).toFixed(3));
563
563
  }
564
564
  getBrightness() {
565
565
  const { r: e, g: s, b: n } = this.toRgb();
@@ -589,8 +589,8 @@ class k {
589
589
  };
590
590
  }
591
591
  }
592
- const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4), ke = (t) => {
593
- if (un(t)) {
592
+ const _t = (t) => t.length === 1 ? `0${t}` : t, Ft = (t) => (t /= 255, t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4), $e = (t) => {
593
+ if (_n(t)) {
594
594
  if ("r" in t) {
595
595
  const n = {
596
596
  r: Math.round(t.r),
@@ -624,14 +624,14 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
624
624
  return n.a = s[3] || 1, n;
625
625
  }
626
626
  if (e.startsWith("#"))
627
- return qs(e);
627
+ return sn(e);
628
628
  if (e.startsWith("rgb"))
629
- return Zs(e);
629
+ return nn(e);
630
630
  if (e.startsWith("hsl"))
631
- return Qs(e);
631
+ return rn(e);
632
632
  if (e.startsWith("hsv"))
633
- return ys(e);
634
- }, qs = (t) => {
633
+ return on(e);
634
+ }, sn = (t) => {
635
635
  const e = t.substring(1), s = new RegExp(`.{1,${e.length >= 6 ? 2 : 1}}`, "g");
636
636
  let n = e.match(s);
637
637
  if (!n || n.length < 3)
@@ -643,7 +643,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
643
643
  b: Number.parseInt(n[2], 16)
644
644
  };
645
645
  return n.length > 3 && (r.a = Number.parseInt(n[3], 16) / 255), r;
646
- }, Zs = (t) => {
646
+ }, nn = (t) => {
647
647
  const e = t.indexOf("(");
648
648
  if (e === -1)
649
649
  throw new Error(`The color '${t}' is illegal rgb color`);
@@ -656,7 +656,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
656
656
  b: Number.parseInt(s[2], 10)
657
657
  };
658
658
  return s.length > 3 && (n.a = Number.parseFloat(s[3])), n;
659
- }, Qs = (t) => {
659
+ }, rn = (t) => {
660
660
  const e = t.indexOf("(");
661
661
  if (e === -1)
662
662
  throw new Error(`The color '${t}' is illegal hsl color`);
@@ -669,7 +669,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
669
669
  l: Number.parseFloat(s[2])
670
670
  };
671
671
  return s.length > 3 && (n.a = Number.parseFloat(s[3])), n;
672
- }, ys = (t) => {
672
+ }, on = (t) => {
673
673
  const e = t.indexOf("(");
674
674
  if (e === -1)
675
675
  throw new Error(`The color '${t}' is illegal hsv color`);
@@ -682,11 +682,11 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
682
682
  v: Number.parseFloat(s[2])
683
683
  };
684
684
  return s.length > 3 && (n.a = Number.parseFloat(s[3])), n;
685
- }, tn = (t) => {
686
- const e = ke(t);
685
+ }, un = (t) => {
686
+ const e = $e(t);
687
687
  if (e != null)
688
- return "r" in e ? e : "l" in e ? en(e) : sn(e);
689
- }, Ft = (t, e, s) => (s < 0 && (s += 1), s > 1 && (s -= 1), s < 1 / 6 ? t + (e - t) * 6 * s : s < 1 / 2 ? e : s < 2 / 3 ? t + (e - t) * (2 / 3 - s) * 6 : t), en = (t) => {
688
+ return "r" in e ? e : "l" in e ? an(e) : ln(e);
689
+ }, Wt = (t, e, s) => (s < 0 && (s += 1), s > 1 && (s -= 1), s < 1 / 6 ? t + (e - t) * 6 * s : s < 1 / 2 ? e : s < 2 / 3 ? t + (e - t) * (2 / 3 - s) * 6 : t), an = (t) => {
690
690
  let { h: e, s, l: n } = t;
691
691
  e /= 360, s /= 100, n /= 100;
692
692
  let r = 0, i = 0, o = 0;
@@ -694,7 +694,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
694
694
  r = i = o = n;
695
695
  else {
696
696
  const a = n < 0.5 ? n * (1 + s) : n + s - n * s, l = 2 * n - a;
697
- r = Ft(l, a, e + 1 / 3), i = Ft(l, a, e), o = Ft(l, a, e - 1 / 3);
697
+ r = Wt(l, a, e + 1 / 3), i = Wt(l, a, e), o = Wt(l, a, e - 1 / 3);
698
698
  }
699
699
  const u = {
700
700
  r: Math.round(r * 255),
@@ -702,7 +702,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
702
702
  b: Math.round(o * 255)
703
703
  };
704
704
  return t.a !== void 0 && (u.a = t.a), u;
705
- }, sn = (t) => {
705
+ }, ln = (t) => {
706
706
  let { h: e, s, v: n } = t;
707
707
  e = e / 360 * 6, s /= 100, n /= 100;
708
708
  const r = Math.floor(e), i = e - r, o = n * (1 - s), u = n * (1 - i * s), a = n * (1 - (1 - i) * s), l = r % 6, c = [n, u, o, o, a, n][l], h = [a, n, n, u, o, o][l], _ = [o, o, a, n, n, u][l], f = {
@@ -711,7 +711,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
711
711
  b: _ * 255
712
712
  };
713
713
  return t.a !== void 0 && (f.a = t.a), f;
714
- }, nn = (t) => {
714
+ }, cn = (t) => {
715
715
  let { r: e, g: s, b: n } = t;
716
716
  e /= 255, s /= 255, n /= 255;
717
717
  const r = Math.max(e, s, n), i = Math.min(e, s, n), o = (r + i) / 2;
@@ -739,7 +739,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
739
739
  l: Math.round(o * 100)
740
740
  };
741
741
  return t.a !== void 0 && (l.a = t.a), l;
742
- }, rn = (t) => {
742
+ }, hn = (t) => {
743
743
  let { r: e, g: s, b: n } = t;
744
744
  e /= 255, s /= 255, n /= 255;
745
745
  const r = Math.max(e, s, n), i = Math.min(e, s, n);
@@ -767,20 +767,20 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
767
767
  v: Math.round(u * 100)
768
768
  };
769
769
  return t.a !== void 0 && (c.a = t.a), c;
770
- }, on = (t) => t == null, un = (t) => !on(t) && typeof t == "object";
771
- function Ro(t) {
770
+ }, dn = (t) => t == null, _n = (t) => !dn(t) && typeof t == "object";
771
+ function So(t) {
772
772
  const e = /^#(?:[0]{3}|[0]{6})\b/, s = /^rgb\s*\(\s*0+\s*,\s*0+\s*,\s*0+\s*\)$/, n = /^rgba\s*\(\s*0+\s*,\s*0+\s*,\s*0+\s*,\s*(1|1\.0*|0?\.\d+)\)$/, r = /^hsl\s*\(\s*0*\s*,\s*0%*\s*,\s*0%*\s*\)$/, i = /^hsla\s*\(\s*0*\s*,\s*0%*\s*,\s*0%*\s*,\s*(1|1\.0*|0?\.\d+)\)$/;
773
773
  return !!(e.test(t) || s.test(t) || n.test(t) || r.test(t) || i.test(t));
774
774
  }
775
- function mo(t) {
775
+ function Lo(t) {
776
776
  const e = /^#(?:[Ff]{3}|[Ff]{6})\b/, s = /^rgb\s*\(\s*255\s*,\s*255\s*,\s*255\s*\)$/, n = /^rgba\s*\(\s*255\s*,\s*255\s*,\s*255\s*,\s*(1|1\.0*|0?\.\d+)\)$/, r = /^hsl\s*\(\s*0*\s*,\s*0%*\s*,\s*100%*\s*\)$/, i = /^hsla\s*\(\s*0*\s*,\s*0%*\s*,\s*100%*\s*,\s*(1|1\.0*|0?\.\d+)\)$/;
777
777
  return !!(e.test(t) || s.test(t) || n.test(t) || r.test(t) || i.test(t));
778
778
  }
779
779
  var D = /* @__PURE__ */ ((t) => (t[t.COVER = 0] = "COVER", t[t.REPLACE = 1] = "REPLACE", t[t.INTERSECTION = 2] = "INTERSECTION", t))(D || {});
780
- function Co(t) {
780
+ function bo(t) {
781
781
  return t && (t.s !== void 0 || t.p !== void 0 || t.v !== void 0 || t.t !== void 0 || t.f !== void 0 || t.si !== void 0);
782
782
  }
783
- function Oo(t) {
783
+ function vo(t) {
784
784
  if (t.t !== void 0)
785
785
  return t.t;
786
786
  if (typeof t.v == "string")
@@ -790,22 +790,22 @@ function Oo(t) {
790
790
  if (typeof t.v == "boolean")
791
791
  return nt.BOOLEAN;
792
792
  }
793
- function Ao(t) {
793
+ function Uo(t) {
794
794
  if (t == null)
795
795
  return !0;
796
- const { v: e, f: s, si: n, p: r, s: i } = t;
797
- return !(!(e == null || typeof e == "string" && e.length === 0) || s != null && s.length > 0 || n != null && n.length > 0 || r != null);
796
+ const { v: e, f: s, si: n, p: r, s: i, custom: o } = t;
797
+ return !(!(e == null || typeof e == "string" && e.length === 0) || s != null && s.length > 0 || n != null && n.length > 0 || r != null || o != null);
798
798
  }
799
- function Io(t) {
799
+ function To(t) {
800
800
  return t != null && (typeof t == "string" || typeof t == "number" || typeof t == "boolean");
801
801
  }
802
- var an = /* @__PURE__ */ ((t) => (t[t.character = 0] = "character", t[t.paragraph = 1] = "paragraph", t[t.table = 2] = "table", t[t.numbering = 3] = "numbering", t))(an || {}), ln = /* @__PURE__ */ ((t) => (t[t.TAB = 0] = "TAB", t[t.SPACE = 1] = "SPACE", t[t.NOTHING = 2] = "NOTHING", t))(ln || {}), Ct = /* @__PURE__ */ ((t) => (t[t.GLYPH_TYPE_UNSPECIFIED = 0] = "GLYPH_TYPE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.DECIMAL = 2] = "DECIMAL", t[t.ZERO_DECIMAL = 3] = "ZERO_DECIMAL", t[t.UPPER_ALPHA = 4] = "UPPER_ALPHA", t[t.ALPHA = 5] = "ALPHA", t[t.UPPER_ROMAN = 6] = "UPPER_ROMAN", t[t.ROMAN = 7] = "ROMAN", t))(Ct || {}), X = /* @__PURE__ */ ((t) => (t[t.BULLET_ALIGNMENT_UNSPECIFIED = 0] = "BULLET_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(X || {}), cn = /* @__PURE__ */ ((t) => (t[t.HYPERLINK = 0] = "HYPERLINK", t[t.FIELD = 1] = "FIELD", t[t.SDT = 2] = "SDT", t[t.BOOKMARK = 3] = "BOOKMARK", t[t.COMMENT = 4] = "COMMENT", t[t.CUSTOM = 5] = "CUSTOM", t))(cn || {}), hn = /* @__PURE__ */ ((t) => (t[t.DRAWING = 0] = "DRAWING", t[t.CUSTOM = 1] = "CUSTOM", t))(hn || {}), dn = /* @__PURE__ */ ((t) => (t[t.DEFAULT = 0] = "DEFAULT", t[t.LINES = 1] = "LINES", t[t.LINES_AND_CHARS = 2] = "LINES_AND_CHARS", t[t.SNAP_TO_CHARS = 3] = "SNAP_TO_CHARS", t))(dn || {}), _n = /* @__PURE__ */ ((t) => (t[t.SECTION_TYPE_UNSPECIFIED = 0] = "SECTION_TYPE_UNSPECIFIED", t[t.CONTINUOUS = 1] = "CONTINUOUS", t[t.NEXT_PAGE = 2] = "NEXT_PAGE", t[t.EVEN_PAGE = 3] = "EVEN_PAGE", t[t.ODD_PAGE = 4] = "ODD_PAGE", t))(_n || {}), fn = /* @__PURE__ */ ((t) => (t[t.COLUMN_SEPARATOR_STYLE_UNSPECIFIED = 0] = "COLUMN_SEPARATOR_STYLE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.BETWEEN_EACH_COLUMN = 2] = "BETWEEN_EACH_COLUMN", t))(fn || {}), gn = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.TBRL = 1] = "TBRL", t[t.LRTBV = 2] = "LRTBV", t))(gn || {}), En = /* @__PURE__ */ ((t) => (t[t.TEXT_RUN = 0] = "TEXT_RUN", t[t.AUTO_TEXT = 1] = "AUTO_TEXT", t[t.PAGE_BREAK = 2] = "PAGE_BREAK", t[t.COLUMN_BREAK = 3] = "COLUMN_BREAK", t[t.FOOT_NOTE_REFERENCE = 4] = "FOOT_NOTE_REFERENCE", t[t.HORIZONTAL_RULE = 5] = "HORIZONTAL_RULE", t[t.EQUATION = 6] = "EQUATION", t[t.DRAWING = 7] = "DRAWING", t[t.PERSON = 8] = "PERSON", t[t.RICH_LINK = 9] = "RICH_LINK", t))(En || {}), Rn = /* @__PURE__ */ ((t) => (t[t.BOTH_SIDES = 0] = "BOTH_SIDES", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT", t[t.LARGEST = 3] = "LARGEST", t))(Rn || {}), mn = /* @__PURE__ */ ((t) => (t[t.INLINE = 0] = "INLINE", t[t.WRAP_NONE = 1] = "WRAP_NONE", t[t.WRAP_POLYGON = 2] = "WRAP_POLYGON", t[t.WRAP_SQUARE = 3] = "WRAP_SQUARE", t[t.WRAP_THROUGH = 4] = "WRAP_THROUGH", t[t.WRAP_TIGHT = 5] = "WRAP_TIGHT", t[t.WRAP_TOP_AND_BOTTOM = 6] = "WRAP_TOP_AND_BOTTOM", t))(mn || {}), Cn = /* @__PURE__ */ ((t) => (t[t.NAMED_STYLE_TYPE_UNSPECIFIED = 0] = "NAMED_STYLE_TYPE_UNSPECIFIED", t[t.NORMAL_TEXT = 1] = "NORMAL_TEXT", t[t.TITLE = 2] = "TITLE", t[t.SUBTITLE = 3] = "SUBTITLE", t[t.HEADING_1 = 4] = "HEADING_1", t[t.HEADING_2 = 5] = "HEADING_2", t[t.HEADING_3 = 6] = "HEADING_3", t[t.HEADING_4 = 7] = "HEADING_4", t[t.HEADING_5 = 8] = "HEADING_5", t[t.HEADING_6 = 9] = "HEADING_6", t))(Cn || {}), On = /* @__PURE__ */ ((t) => (t[t.AUTO = 0] = "AUTO", t[t.AT_LEAST = 1] = "AT_LEAST", t[t.EXACT = 2] = "EXACT", t))(On || {}), An = /* @__PURE__ */ ((t) => (t[t.DASH_STYLE_UNSPECIFIED = 0] = "DASH_STYLE_UNSPECIFIED", t[t.SOLID = 1] = "SOLID", t[t.DOT = 2] = "DOT", t[t.DASH = 3] = "DASH", t))(An || {}), In = /* @__PURE__ */ ((t) => (t[t.TAB_STOP_ALIGNMENT_UNSPECIFIED = 0] = "TAB_STOP_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(In || {}), Nn = /* @__PURE__ */ ((t) => (t.EVENLY_DISTRIBUTED = "0", t.FIXED_WIDTH = "1", t))(Nn || {}), Sn = /* @__PURE__ */ ((t) => (t[t.CONTENT_ALIGNMENT_UNSPECIFIED = 0] = "CONTENT_ALIGNMENT_UNSPECIFIED", t[t.CONTENT_ALIGNMENT_UNSUPPORTED = 1] = "CONTENT_ALIGNMENT_UNSUPPORTED", t[t.TOP = 2] = "TOP", t[t.MIDDLE = 3] = "MIDDLE", t[t.BOTTOM = 4] = "BOTTOM", t))(Sn || {}), wn = /* @__PURE__ */ ((t) => (t.NORMAL = "normal", t.BOLD = "bold", t.ITALIC = "italic", t))(wn || {}), Ln = /* @__PURE__ */ ((t) => (t[t.CHARACTER = 0] = "CHARACTER", t[t.COLUMN = 1] = "COLUMN", t[t.INSIDE_MARGIN = 2] = "INSIDE_MARGIN", t[t.LEFT_MARGIN = 3] = "LEFT_MARGIN", t[t.MARGIN = 4] = "MARGIN", t[t.OUTSIDE_MARGIN = 5] = "OUTSIDE_MARGIN", t[t.PAGE = 6] = "PAGE", t[t.RIGHT_MARGIN = 7] = "RIGHT_MARGIN", t))(Ln || {}), bn = /* @__PURE__ */ ((t) => (t[t.BOTTOM_MARGIN = 0] = "BOTTOM_MARGIN", t[t.INSIDE_MARGIN = 1] = "INSIDE_MARGIN", t[t.LINE = 2] = "LINE", t[t.MARGIN = 3] = "MARGIN", t[t.OUTSIDE_MARGIN = 4] = "OUTSIDE_MARGIN", t[t.PAGE = 5] = "PAGE", t[t.PARAGRAPH = 6] = "PARAGRAPH", t[t.TOP_MARGIN = 7] = "TOP_MARGIN", t))(bn || {}), vn = /* @__PURE__ */ ((t) => (t[t.POINT = 0] = "POINT", t[t.LINE = 1] = "LINE", t[t.CHARACTER = 2] = "CHARACTER", t))(vn || {}), Un = /* @__PURE__ */ ((t) => (t[t.CENTER = 0] = "CENTER", t[t.INSIDE = 1] = "INSIDE", t[t.LEFT = 2] = "LEFT", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.RIGHT = 4] = "RIGHT", t))(Un || {}), Tn = /* @__PURE__ */ ((t) => (t[t.BOTTOM = 0] = "BOTTOM", t[t.CENTER = 1] = "CENTER", t[t.INSIDE = 2] = "INSIDE", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.TOP = 4] = "TOP", t))(Tn || {}), Mn = /* @__PURE__ */ ((t) => (t[t.compressPunctuation = 0] = "compressPunctuation", t[t.compressPunctuationAndJapaneseKana = 1] = "compressPunctuationAndJapaneseKana", t[t.doNotCompress = 2] = "doNotCompress", t))(Mn || {}), Dn = /* @__PURE__ */ ((t) => (t[t.PORTRAIT = 0] = "PORTRAIT", t[t.LANDSCAPE = 1] = "LANDSCAPE", t))(Dn || {}), p = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ROW = 1] = "ROW", t[t.COLUMN = 2] = "COLUMN", t[t.ALL = 3] = "ALL", t))(p || {}), L = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.ROW = 1] = "ROW", t[t.COLUMN = 2] = "COLUMN", t[t.ALL = 3] = "ALL", t))(L || {});
803
- function No(t) {
802
+ var fn = /* @__PURE__ */ ((t) => (t[t.character = 0] = "character", t[t.paragraph = 1] = "paragraph", t[t.table = 2] = "table", t[t.numbering = 3] = "numbering", t))(fn || {}), gn = /* @__PURE__ */ ((t) => (t[t.TAB = 0] = "TAB", t[t.SPACE = 1] = "SPACE", t[t.NOTHING = 2] = "NOTHING", t))(gn || {}), Ct = /* @__PURE__ */ ((t) => (t[t.GLYPH_TYPE_UNSPECIFIED = 0] = "GLYPH_TYPE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.DECIMAL = 2] = "DECIMAL", t[t.ZERO_DECIMAL = 3] = "ZERO_DECIMAL", t[t.UPPER_ALPHA = 4] = "UPPER_ALPHA", t[t.ALPHA = 5] = "ALPHA", t[t.UPPER_ROMAN = 6] = "UPPER_ROMAN", t[t.ROMAN = 7] = "ROMAN", t))(Ct || {}), X = /* @__PURE__ */ ((t) => (t[t.BULLET_ALIGNMENT_UNSPECIFIED = 0] = "BULLET_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(X || {}), En = /* @__PURE__ */ ((t) => (t[t.HYPERLINK = 0] = "HYPERLINK", t[t.FIELD = 1] = "FIELD", t[t.SDT = 2] = "SDT", t[t.BOOKMARK = 3] = "BOOKMARK", t[t.COMMENT = 4] = "COMMENT", t[t.CUSTOM = 5] = "CUSTOM", t))(En || {}), Rn = /* @__PURE__ */ ((t) => (t[t.DRAWING = 0] = "DRAWING", t[t.CUSTOM = 1] = "CUSTOM", t))(Rn || {}), mn = /* @__PURE__ */ ((t) => (t[t.DEFAULT = 0] = "DEFAULT", t[t.LINES = 1] = "LINES", t[t.LINES_AND_CHARS = 2] = "LINES_AND_CHARS", t[t.SNAP_TO_CHARS = 3] = "SNAP_TO_CHARS", t))(mn || {}), Cn = /* @__PURE__ */ ((t) => (t[t.SECTION_TYPE_UNSPECIFIED = 0] = "SECTION_TYPE_UNSPECIFIED", t[t.CONTINUOUS = 1] = "CONTINUOUS", t[t.NEXT_PAGE = 2] = "NEXT_PAGE", t[t.EVEN_PAGE = 3] = "EVEN_PAGE", t[t.ODD_PAGE = 4] = "ODD_PAGE", t))(Cn || {}), On = /* @__PURE__ */ ((t) => (t[t.COLUMN_SEPARATOR_STYLE_UNSPECIFIED = 0] = "COLUMN_SEPARATOR_STYLE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.BETWEEN_EACH_COLUMN = 2] = "BETWEEN_EACH_COLUMN", t))(On || {}), An = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.TBRL = 1] = "TBRL", t[t.LRTBV = 2] = "LRTBV", t))(An || {}), In = /* @__PURE__ */ ((t) => (t[t.TEXT_RUN = 0] = "TEXT_RUN", t[t.AUTO_TEXT = 1] = "AUTO_TEXT", t[t.PAGE_BREAK = 2] = "PAGE_BREAK", t[t.COLUMN_BREAK = 3] = "COLUMN_BREAK", t[t.FOOT_NOTE_REFERENCE = 4] = "FOOT_NOTE_REFERENCE", t[t.HORIZONTAL_RULE = 5] = "HORIZONTAL_RULE", t[t.EQUATION = 6] = "EQUATION", t[t.DRAWING = 7] = "DRAWING", t[t.PERSON = 8] = "PERSON", t[t.RICH_LINK = 9] = "RICH_LINK", t))(In || {}), Nn = /* @__PURE__ */ ((t) => (t[t.BOTH_SIDES = 0] = "BOTH_SIDES", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT", t[t.LARGEST = 3] = "LARGEST", t))(Nn || {}), wn = /* @__PURE__ */ ((t) => (t[t.INLINE = 0] = "INLINE", t[t.WRAP_NONE = 1] = "WRAP_NONE", t[t.WRAP_POLYGON = 2] = "WRAP_POLYGON", t[t.WRAP_SQUARE = 3] = "WRAP_SQUARE", t[t.WRAP_THROUGH = 4] = "WRAP_THROUGH", t[t.WRAP_TIGHT = 5] = "WRAP_TIGHT", t[t.WRAP_TOP_AND_BOTTOM = 6] = "WRAP_TOP_AND_BOTTOM", t))(wn || {}), Sn = /* @__PURE__ */ ((t) => (t[t.NAMED_STYLE_TYPE_UNSPECIFIED = 0] = "NAMED_STYLE_TYPE_UNSPECIFIED", t[t.NORMAL_TEXT = 1] = "NORMAL_TEXT", t[t.TITLE = 2] = "TITLE", t[t.SUBTITLE = 3] = "SUBTITLE", t[t.HEADING_1 = 4] = "HEADING_1", t[t.HEADING_2 = 5] = "HEADING_2", t[t.HEADING_3 = 6] = "HEADING_3", t[t.HEADING_4 = 7] = "HEADING_4", t[t.HEADING_5 = 8] = "HEADING_5", t[t.HEADING_6 = 9] = "HEADING_6", t))(Sn || {}), Ln = /* @__PURE__ */ ((t) => (t[t.AUTO = 0] = "AUTO", t[t.AT_LEAST = 1] = "AT_LEAST", t[t.EXACT = 2] = "EXACT", t))(Ln || {}), bn = /* @__PURE__ */ ((t) => (t[t.DASH_STYLE_UNSPECIFIED = 0] = "DASH_STYLE_UNSPECIFIED", t[t.SOLID = 1] = "SOLID", t[t.DOT = 2] = "DOT", t[t.DASH = 3] = "DASH", t))(bn || {}), vn = /* @__PURE__ */ ((t) => (t[t.TAB_STOP_ALIGNMENT_UNSPECIFIED = 0] = "TAB_STOP_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(vn || {}), Un = /* @__PURE__ */ ((t) => (t.EVENLY_DISTRIBUTED = "0", t.FIXED_WIDTH = "1", t))(Un || {}), Tn = /* @__PURE__ */ ((t) => (t[t.CONTENT_ALIGNMENT_UNSPECIFIED = 0] = "CONTENT_ALIGNMENT_UNSPECIFIED", t[t.CONTENT_ALIGNMENT_UNSUPPORTED = 1] = "CONTENT_ALIGNMENT_UNSUPPORTED", t[t.TOP = 2] = "TOP", t[t.MIDDLE = 3] = "MIDDLE", t[t.BOTTOM = 4] = "BOTTOM", t))(Tn || {}), Mn = /* @__PURE__ */ ((t) => (t.NORMAL = "normal", t.BOLD = "bold", t.ITALIC = "italic", t))(Mn || {}), Dn = /* @__PURE__ */ ((t) => (t[t.PAGE = 0] = "PAGE", t[t.COLUMN = 1] = "COLUMN", t[t.CHARACTER = 2] = "CHARACTER", t[t.MARGIN = 3] = "MARGIN", t[t.INSIDE_MARGIN = 4] = "INSIDE_MARGIN", t[t.OUTSIDE_MARGIN = 5] = "OUTSIDE_MARGIN", t[t.LEFT_MARGIN = 6] = "LEFT_MARGIN", t[t.RIGHT_MARGIN = 7] = "RIGHT_MARGIN", t))(Dn || {}), pn = /* @__PURE__ */ ((t) => (t[t.PAGE = 0] = "PAGE", t[t.PARAGRAPH = 1] = "PARAGRAPH", t[t.LINE = 2] = "LINE", t[t.MARGIN = 3] = "MARGIN", t[t.TOP_MARGIN = 4] = "TOP_MARGIN", t[t.BOTTOM_MARGIN = 5] = "BOTTOM_MARGIN", t[t.INSIDE_MARGIN = 6] = "INSIDE_MARGIN", t[t.OUTSIDE_MARGIN = 7] = "OUTSIDE_MARGIN", t))(pn || {}), xn = /* @__PURE__ */ ((t) => (t[t.POINT = 0] = "POINT", t[t.LINE = 1] = "LINE", t[t.CHARACTER = 2] = "CHARACTER", t))(xn || {}), Pn = /* @__PURE__ */ ((t) => (t[t.CENTER = 0] = "CENTER", t[t.INSIDE = 1] = "INSIDE", t[t.LEFT = 2] = "LEFT", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.RIGHT = 4] = "RIGHT", t))(Pn || {}), Hn = /* @__PURE__ */ ((t) => (t[t.BOTTOM = 0] = "BOTTOM", t[t.CENTER = 1] = "CENTER", t[t.INSIDE = 2] = "INSIDE", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.TOP = 4] = "TOP", t))(Hn || {}), Fn = /* @__PURE__ */ ((t) => (t[t.compressPunctuation = 0] = "compressPunctuation", t[t.compressPunctuationAndJapaneseKana = 1] = "compressPunctuationAndJapaneseKana", t[t.doNotCompress = 2] = "doNotCompress", t))(Fn || {}), Wn = /* @__PURE__ */ ((t) => (t[t.PORTRAIT = 0] = "PORTRAIT", t[t.LANDSCAPE = 1] = "LANDSCAPE", t))(Wn || {}), p = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ROW = 1] = "ROW", t[t.COLUMN = 2] = "COLUMN", t[t.ALL = 3] = "ALL", t))(p || {}), L = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.ROW = 1] = "ROW", t[t.COLUMN = 2] = "COLUMN", t[t.ALL = 3] = "ALL", t))(L || {});
803
+ function Mo(t) {
804
804
  return [t.startRow, t.startColumn, t.endRow, t.endColumn];
805
805
  }
806
- var $e = /* @__PURE__ */ ((t) => (t[t.SLIDE = 0] = "SLIDE", t[t.MASTER = 1] = "MASTER", t[t.LAYOUT = 2] = "LAYOUT", t[t.HANDOUT_MASTER = 3] = "HANDOUT_MASTER", t[t.NOTES_MASTER = 4] = "NOTES_MASTER", t))($e || {}), pn = /* @__PURE__ */ ((t) => (t[t.SHAPE = 0] = "SHAPE", t[t.IMAGE = 1] = "IMAGE", t[t.TEXT = 2] = "TEXT", t[t.SPREADSHEET = 3] = "SPREADSHEET", t[t.DOCUMENT = 4] = "DOCUMENT", t[t.SLIDE = 5] = "SLIDE", t))(pn || {}), Pn = /* @__PURE__ */ ((t) => (t[t.RELATIVE_SLIDE_LINK_UNSPECIFIED = 0] = "RELATIVE_SLIDE_LINK_UNSPECIFIED", t[t.NEXT_SLIDE = 1] = "NEXT_SLIDE", t[t.PREVIOUS_SLIDE = 2] = "PREVIOUS_SLIDE", t[t.FIRST_SLIDE = 3] = "FIRST_SLIDE", t[t.LAST_SLIDE = 4] = "LAST_SLIDE", t))(Pn || {});
807
- const xn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
808
- let Hn = (t) => crypto.getRandomValues(new Uint8Array(t)), Fn = (t, e, s) => {
806
+ var ke = /* @__PURE__ */ ((t) => (t[t.SLIDE = 0] = "SLIDE", t[t.MASTER = 1] = "MASTER", t[t.LAYOUT = 2] = "LAYOUT", t[t.HANDOUT_MASTER = 3] = "HANDOUT_MASTER", t[t.NOTES_MASTER = 4] = "NOTES_MASTER", t))(ke || {}), Gn = /* @__PURE__ */ ((t) => (t[t.SHAPE = 0] = "SHAPE", t[t.IMAGE = 1] = "IMAGE", t[t.TEXT = 2] = "TEXT", t[t.SPREADSHEET = 3] = "SPREADSHEET", t[t.DOCUMENT = 4] = "DOCUMENT", t[t.SLIDE = 5] = "SLIDE", t))(Gn || {}), Bn = /* @__PURE__ */ ((t) => (t[t.RELATIVE_SLIDE_LINK_UNSPECIFIED = 0] = "RELATIVE_SLIDE_LINK_UNSPECIFIED", t[t.NEXT_SLIDE = 1] = "NEXT_SLIDE", t[t.PREVIOUS_SLIDE = 2] = "PREVIOUS_SLIDE", t[t.FIRST_SLIDE = 3] = "FIRST_SLIDE", t[t.LAST_SLIDE = 4] = "LAST_SLIDE", t))(Bn || {});
807
+ const $n = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
808
+ let kn = (t) => crypto.getRandomValues(new Uint8Array(t)), Vn = (t, e, s) => {
809
809
  let n = (2 << Math.log(t.length - 1) / Math.LN2) - 1, r = -~(1.6 * n * e / t.length);
810
810
  return (i = e) => {
811
811
  let o = "";
@@ -816,13 +816,13 @@ let Hn = (t) => crypto.getRandomValues(new Uint8Array(t)), Fn = (t, e, s) => {
816
816
  return o;
817
817
  }
818
818
  };
819
- }, Wn = (t, e = 21) => Fn(t, e, Hn), Gn = (t = 21) => {
819
+ }, jn = (t, e = 21) => Vn(t, e, kn), Kn = (t = 21) => {
820
820
  let e = "", s = crypto.getRandomValues(new Uint8Array(t));
821
821
  for (; t--; )
822
- e += xn[s[t] & 63];
822
+ e += $n[s[t] & 63];
823
823
  return e;
824
824
  };
825
- const Bn = /^-ms-/, kn = /-([a-z])/g, K = [
825
+ const Yn = /^-ms-/, zn = /-([a-z])/g, K = [
826
826
  "A",
827
827
  "B",
828
828
  "C",
@@ -905,7 +905,7 @@ class R {
905
905
  return o ? "FF" : s ? "Opera" : u ? "Safari" : a ? "Chrome" : i ? "Edge" : r ? "IE11" : "Unknown browser";
906
906
  }
907
907
  static generateRandomId(e = 21, s) {
908
- return s ? Wn(s, e)() : Gn(e);
908
+ return s ? jn(s, e)() : Kn(e);
909
909
  }
910
910
  static getClassName(e) {
911
911
  return e.constructor.name;
@@ -1108,7 +1108,7 @@ class R {
1108
1108
  // Support: IE <=9 - 11, Edge 12 - 15
1109
1109
  // Microsoft forgot to hump their vendor prefix (#9572)
1110
1110
  static camelCase(e) {
1111
- return e.replace(Bn, "ms-").replace(kn, this.fCamelCase);
1111
+ return e.replace(Yn, "ms-").replace(zn, this.fCamelCase);
1112
1112
  }
1113
1113
  /**
1114
1114
  * remove all null from object
@@ -1234,7 +1234,7 @@ class R {
1234
1234
  return !s && n;
1235
1235
  }
1236
1236
  }
1237
- function So(t) {
1237
+ function Do(t) {
1238
1238
  if (!t)
1239
1239
  return;
1240
1240
  const { actualRow: e, actualColumn: s, isMerged: n, isMergedMainCell: r, mergeInfo: i } = t;
@@ -1248,9 +1248,9 @@ function So(t) {
1248
1248
  startY: v,
1249
1249
  endY: M,
1250
1250
  startX: j,
1251
- endX: Ss
1251
+ endX: ws
1252
1252
  } = i;
1253
- c = g, h = E, _ = m, f = I, o = v, u = M, a = j, l = Ss;
1253
+ c = g, h = E, _ = m, f = I, o = v, u = M, a = j, l = ws;
1254
1254
  }
1255
1255
  return r && (o = i.startY, u = i.endY, a = i.startX, l = i.endX, _ = i.endRow, f = i.endColumn), {
1256
1256
  startRow: c,
@@ -1263,7 +1263,7 @@ function So(t) {
1263
1263
  endX: l
1264
1264
  };
1265
1265
  }
1266
- function wo(t) {
1266
+ function po(t) {
1267
1267
  if (!t)
1268
1268
  return;
1269
1269
  const {
@@ -1284,7 +1284,7 @@ function wo(t) {
1284
1284
  endColumn: _
1285
1285
  };
1286
1286
  }
1287
- function Lo(t) {
1287
+ function xo(t) {
1288
1288
  var s;
1289
1289
  return !t || (((s = t == null ? void 0 : t.v) == null ? void 0 : s.toString()) || "").length === 0 && !t.p;
1290
1290
  }
@@ -1293,20 +1293,20 @@ function V(t) {
1293
1293
  if (t.rgb)
1294
1294
  return t.rgb;
1295
1295
  if (t.th)
1296
- return new ue().setThemeColor(t.th).asThemeColor().asRgbColor().getCssString();
1296
+ return new ae().setThemeColor(t.th).asThemeColor().asRgbColor().getCssString();
1297
1297
  }
1298
1298
  return null;
1299
1299
  }
1300
- function bo(t) {
1300
+ function Po(t) {
1301
1301
  return R.isString(t) && t.substring(0, 1) === "=" && t.length > 1;
1302
1302
  }
1303
- function vo(t) {
1303
+ function Ho(t) {
1304
1304
  return R.isString(t) && t.length > 0;
1305
1305
  }
1306
- function Uo(t) {
1306
+ function Fo(t) {
1307
1307
  return "";
1308
1308
  }
1309
- function To(t, e = !1) {
1309
+ function Wo(t, e = !1) {
1310
1310
  var i;
1311
1311
  let s = "";
1312
1312
  const n = /* @__PURE__ */ new Map([
@@ -1386,7 +1386,7 @@ function To(t, e = !1) {
1386
1386
  [
1387
1387
  "td",
1388
1388
  () => {
1389
- t.td === wt.LEFT_TO_RIGHT ? s += "direction: ltr; " : t.td === wt.RIGHT_TO_LEFT && (s += "direction: rtl; ");
1389
+ t.td === St.LEFT_TO_RIGHT ? s += "direction: ltr; " : t.td === St.RIGHT_TO_LEFT && (s += "direction: rtl; ");
1390
1390
  }
1391
1391
  ],
1392
1392
  [
@@ -1429,35 +1429,35 @@ function To(t, e = !1) {
1429
1429
  }
1430
1430
  function ft(t) {
1431
1431
  let e = "";
1432
- return t === S.NONE ? e = "none" : t === S.THIN ? e = "0.5pt solid" : t === S.HAIR ? e = "0.5pt double" : t === S.DOTTED ? e = "0.5pt dotted" : t === S.DASHED || t === S.DASH_DOT ? e = "0.5pt dashed" : t === S.DASH_DOT_DOT ? e = "0.5pt dotted" : t === S.DOUBLE ? e = "0.5pt double" : t === S.MEDIUM ? e = "1pt solid" : t === S.MEDIUM_DASHED || t === S.MEDIUM_DASH_DOT ? e = "1pt dashed" : t === S.MEDIUM_DASH_DOT_DOT ? e = "1pt dotted" : t === S.SLANT_DASH_DOT ? e = "0.5pt dashed" : t === S.THICK && (e = "1.5pt solid"), e;
1432
+ return t === w.NONE ? e = "none" : t === w.THIN ? e = "0.5pt solid" : t === w.HAIR ? e = "0.5pt double" : t === w.DOTTED ? e = "0.5pt dotted" : t === w.DASHED || t === w.DASH_DOT ? e = "0.5pt dashed" : t === w.DASH_DOT_DOT ? e = "0.5pt dotted" : t === w.DOUBLE ? e = "0.5pt double" : t === w.MEDIUM ? e = "1pt solid" : t === w.MEDIUM_DASHED || t === w.MEDIUM_DASH_DOT ? e = "1pt dashed" : t === w.MEDIUM_DASH_DOT_DOT ? e = "1pt dotted" : t === w.SLANT_DASH_DOT ? e = "0.5pt dashed" : t === w.THICK && (e = "1.5pt solid"), e;
1433
1433
  }
1434
- function Mo(t) {
1434
+ function Go(t) {
1435
1435
  let e = 0;
1436
1436
  if (t = t.trim(), t === "none")
1437
- e = S.NONE;
1437
+ e = w.NONE;
1438
1438
  else if (t === "0.5pt solid")
1439
- e = S.THIN;
1439
+ e = w.THIN;
1440
1440
  else if (t === "0.5pt double")
1441
- e = S.HAIR;
1441
+ e = w.HAIR;
1442
1442
  else if (t === "0.5pt dotted")
1443
- e = S.DOTTED;
1443
+ e = w.DOTTED;
1444
1444
  else if (t === "0.5pt dashed")
1445
- e = S.DASHED;
1445
+ e = w.DASHED;
1446
1446
  else if (t === "1pt solid")
1447
- e = S.MEDIUM;
1447
+ e = w.MEDIUM;
1448
1448
  else if (t === "1pt dashed")
1449
- e = S.MEDIUM_DASHED;
1449
+ e = w.MEDIUM_DASHED;
1450
1450
  else if (t === "1pt dotted")
1451
- e = S.MEDIUM_DASH_DOT_DOT;
1451
+ e = w.MEDIUM_DASH_DOT_DOT;
1452
1452
  else if (t === "1.5pt solid")
1453
- e = S.THICK;
1453
+ e = w.THICK;
1454
1454
  else if (!t.includes("none"))
1455
- e = S.THIN;
1455
+ e = w.THIN;
1456
1456
  else
1457
- return S.NONE;
1457
+ return w.NONE;
1458
1458
  return e;
1459
1459
  }
1460
- function Wt(t, e) {
1460
+ function Gt(t, e) {
1461
1461
  let s = t.body;
1462
1462
  if (e) {
1463
1463
  const { headers: n, footers: r } = t;
@@ -1465,21 +1465,21 @@ function Wt(t, e) {
1465
1465
  }
1466
1466
  return s;
1467
1467
  }
1468
- function Do(t) {
1468
+ function Bo(t) {
1469
1469
  const { startRow: e, endRow: s, startColumn: n, endColumn: r, rangeType: i } = t;
1470
1470
  return !(e < 0 || n < 0 || s < 0 || r < 0 || !(Number.isNaN(e) && Number.isNaN(s)) && i === p.COLUMN || !(Number.isNaN(n) && Number.isNaN(r)) && i === p.ROW);
1471
1471
  }
1472
- function po(t, e) {
1472
+ function $o(t, e) {
1473
1473
  return { startRow: t, endRow: t, startColumn: e, endColumn: e };
1474
1474
  }
1475
1475
  function Ve(t, e) {
1476
1476
  return Object.prototype.toString.call(t) === Object.prototype.toString.call(e) ? Object.prototype.toString.call(t) === "[object Object]" || Object.prototype.toString.call(t) === "[object Array]" ? Object.keys(t).length !== Object.keys(e).length ? !1 : Object.keys(t).every((s) => Ve(t[s], e[s])) : t === e : !1;
1477
1477
  }
1478
- function $n(t, e) {
1478
+ function Xn(t, e) {
1479
1479
  const s = t.ts || {}, n = e.ts || {};
1480
1480
  return t.sId !== e.sId ? !1 : Ve(s, n);
1481
1481
  }
1482
- function Po(t, e) {
1482
+ function ko(t, e) {
1483
1483
  return e.some((s) => t.indexOf(s) > -1);
1484
1484
  }
1485
1485
  function je(t, e, s, n) {
@@ -1490,31 +1490,31 @@ function je(t, e, s, n) {
1490
1490
  let i = [];
1491
1491
  return t === s ? i = [n + 1 - r, e - r] : e === n ? i = [t, s - 1] : i = [t, e - r], i;
1492
1492
  }
1493
- function xo(t) {
1493
+ function Vo(t) {
1494
1494
  if (t == null)
1495
1495
  return !1;
1496
1496
  const e = t.bullet;
1497
1497
  return (e == null ? void 0 : e.listId) != null;
1498
1498
  }
1499
- function Ho(t) {
1499
+ function jo(t) {
1500
1500
  if (t == null)
1501
1501
  return !1;
1502
1502
  const e = t.paragraphStyle;
1503
- return Vn(e);
1503
+ return Jn(e);
1504
1504
  }
1505
- function Vn(t) {
1505
+ function Jn(t) {
1506
1506
  return !(t == null || (t.indentStart == null || t.indentStart === 0) && t.hanging == null || t.hanging === 0);
1507
1507
  }
1508
- function jn(t, e, s) {
1508
+ function qn(t, e, s) {
1509
1509
  return t.slice(0, e) + s + t.slice(e);
1510
1510
  }
1511
- function Kn(t, e, s) {
1511
+ function Zn(t, e, s) {
1512
1512
  return e > s ? t : t.slice(0, e) + t.slice(s);
1513
1513
  }
1514
- function Fo(t) {
1514
+ function Ko(t) {
1515
1515
  return t === null || t.toString().replace(/\s/g, "") === "" || typeof t == "boolean" ? !1 : !isNaN(t);
1516
1516
  }
1517
- function Wo(t) {
1517
+ function Yo(t) {
1518
1518
  let e = 0;
1519
1519
  for (let s = 0; s < t.length; s++)
1520
1520
  e = t.charCodeAt(s) + (e << 6) + (e << 16) - e;
@@ -1561,13 +1561,13 @@ function Ie(t, e, s) {
1561
1561
  function lt(t) {
1562
1562
  return typeof t == "function";
1563
1563
  }
1564
- function Yn(t) {
1564
+ function Qn(t) {
1565
1565
  var e = function(n) {
1566
1566
  Error.call(n), n.stack = new Error().stack;
1567
1567
  }, s = t(e);
1568
1568
  return s.prototype = Object.create(Error.prototype), s.prototype.constructor = s, s;
1569
1569
  }
1570
- var Gt = Yn(function(t) {
1570
+ var Bt = Qn(function(t) {
1571
1571
  return function(s) {
1572
1572
  t(this), this.message = s ? s.length + ` errors occurred during unsubscription:
1573
1573
  ` + s.map(function(n, r) {
@@ -1615,7 +1615,7 @@ var Ke = function() {
1615
1615
  try {
1616
1616
  c();
1617
1617
  } catch (E) {
1618
- i = E instanceof Gt ? E.errors : [E];
1618
+ i = E instanceof Bt ? E.errors : [E];
1619
1619
  }
1620
1620
  var h = this._finalizers;
1621
1621
  if (h) {
@@ -1624,9 +1624,9 @@ var Ke = function() {
1624
1624
  for (var _ = Oe(h), f = _.next(); !f.done; f = _.next()) {
1625
1625
  var g = f.value;
1626
1626
  try {
1627
- Se(g);
1627
+ we(g);
1628
1628
  } catch (E) {
1629
- i = i != null ? i : [], E instanceof Gt ? i = Ie(Ie([], Ae(i)), Ae(E.errors)) : i.push(E);
1629
+ i = i != null ? i : [], E instanceof Bt ? i = Ie(Ie([], Ae(i)), Ae(E.errors)) : i.push(E);
1630
1630
  }
1631
1631
  }
1632
1632
  } catch (E) {
@@ -1641,13 +1641,13 @@ var Ke = function() {
1641
1641
  }
1642
1642
  }
1643
1643
  if (i)
1644
- throw new Gt(i);
1644
+ throw new Bt(i);
1645
1645
  }
1646
1646
  }, t.prototype.add = function(e) {
1647
1647
  var s;
1648
1648
  if (e && e !== this)
1649
1649
  if (this.closed)
1650
- Se(e);
1650
+ we(e);
1651
1651
  else {
1652
1652
  if (e instanceof t) {
1653
1653
  if (e.closed || e._hasParent(this))
@@ -1674,13 +1674,13 @@ var Ke = function() {
1674
1674
  }(), t;
1675
1675
  }();
1676
1676
  Ke.EMPTY;
1677
- function zn(t) {
1677
+ function yn(t) {
1678
1678
  return t instanceof Ke || t && "closed" in t && lt(t.remove) && lt(t.add) && lt(t.unsubscribe);
1679
1679
  }
1680
- function Se(t) {
1680
+ function we(t) {
1681
1681
  lt(t) ? t() : t.unsubscribe();
1682
1682
  }
1683
- class Xn {
1683
+ class tr {
1684
1684
  /**
1685
1685
  * Create a new EventState
1686
1686
  * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true
@@ -1714,10 +1714,10 @@ class Xn {
1714
1714
  this.isStopPropagation = !0;
1715
1715
  }
1716
1716
  }
1717
- function Jn(t) {
1718
- return t instanceof ae;
1717
+ function er(t) {
1718
+ return t instanceof le;
1719
1719
  }
1720
- class ae {
1720
+ class le {
1721
1721
  /**
1722
1722
  * Creates a new observer
1723
1723
  * @param callback defines the callback to call when the observer is notified
@@ -1735,7 +1735,7 @@ class ae {
1735
1735
  this.observable.remove(this);
1736
1736
  }
1737
1737
  }
1738
- class le {
1738
+ class ce {
1739
1739
  /**
1740
1740
  * Creates a new observable
1741
1741
  * @param onObserverAdded defines a callback to call when a new observer is added
@@ -1744,7 +1744,7 @@ class le {
1744
1744
  d(this, "_observers", new Array());
1745
1745
  d(this, "_eventState");
1746
1746
  d(this, "_onObserverAdded");
1747
- this._eventState = new Xn(), e && (this._onObserverAdded = e);
1747
+ this._eventState = new tr(), e && (this._onObserverAdded = e);
1748
1748
  }
1749
1749
  /**
1750
1750
  * Gets the list of observers
@@ -1762,7 +1762,7 @@ class le {
1762
1762
  add(e, s = !1, n = !1) {
1763
1763
  if (!e)
1764
1764
  return null;
1765
- const r = new ae(e, this);
1765
+ const r = new le(e, this);
1766
1766
  return r.unregisterOnNextCall = n, s ? this._observers.unshift(r) : this._observers.push(r), this._onObserverAdded && this._onObserverAdded(r), r;
1767
1767
  }
1768
1768
  /**
@@ -1887,7 +1887,7 @@ class le {
1887
1887
  * @returns a new observable
1888
1888
  */
1889
1889
  clone() {
1890
- const e = new le();
1890
+ const e = new ce();
1891
1891
  return e._observers = this._observers.slice(0), e;
1892
1892
  }
1893
1893
  _deferUnregister(e) {
@@ -1906,9 +1906,9 @@ class le {
1906
1906
  }
1907
1907
  function b(t) {
1908
1908
  let e = !1;
1909
- return t ? zn(t) ? {
1909
+ return t ? yn(t) ? {
1910
1910
  dispose: () => t.unsubscribe()
1911
- } : Jn(t) ? {
1911
+ } : er(t) ? {
1912
1912
  dispose: () => {
1913
1913
  e || (e = !0, t.dispose());
1914
1914
  }
@@ -1919,7 +1919,7 @@ function b(t) {
1919
1919
  } : t : b(() => {
1920
1920
  });
1921
1921
  }
1922
- function Go(t) {
1922
+ function zo(t) {
1923
1923
  return b(() => {
1924
1924
  t.unsubscribe();
1925
1925
  });
@@ -1958,10 +1958,10 @@ class T {
1958
1958
  this._disposed || (this._disposed = !0, this._collection.dispose());
1959
1959
  }
1960
1960
  }
1961
- class Bo extends T {
1961
+ class Xo extends T {
1962
1962
  constructor() {
1963
1963
  super(...arguments);
1964
- d(this, "dispose$", new W());
1964
+ d(this, "dispose$", new H());
1965
1965
  }
1966
1966
  dispose() {
1967
1967
  super.dispose(), this.dispose$.next(), this.dispose$.complete();
@@ -1984,17 +1984,17 @@ class gt {
1984
1984
  return this.getValueType(e) === "[object Number]";
1985
1985
  }
1986
1986
  }
1987
- function ce(t, e) {
1987
+ function he(t, e) {
1988
1988
  const s = t.indexOf(e);
1989
1989
  return s > -1 ? (t.splice(s, 1), !0) : !1;
1990
1990
  }
1991
- function ko(t) {
1991
+ function Jo(t) {
1992
1992
  const e = /* @__PURE__ */ new Set(), s = [];
1993
1993
  for (const n of t)
1994
1994
  e.has(n) || (e.add(n), s.push(n));
1995
1995
  return s;
1996
1996
  }
1997
- function qn(t, e) {
1997
+ function sr(t, e) {
1998
1998
  for (let s = t.length - 1; s > -1; s--) {
1999
1999
  const n = t[s];
2000
2000
  if (e(n, s))
@@ -2002,13 +2002,13 @@ function qn(t, e) {
2002
2002
  }
2003
2003
  return null;
2004
2004
  }
2005
- function $o(t, e) {
2005
+ function qo(t, e) {
2006
2006
  if (t.length === 0)
2007
2007
  return t;
2008
2008
  const s = e % t.length;
2009
2009
  return t.slice(s).concat(t.slice(0, s));
2010
2010
  }
2011
- function Vo(t, e) {
2011
+ function Zo(t, e) {
2012
2012
  const s = /* @__PURE__ */ new Map();
2013
2013
  return t.forEach((n) => {
2014
2014
  const r = e(n);
@@ -2017,7 +2017,7 @@ function Vo(t, e) {
2017
2017
  }), s;
2018
2018
  }
2019
2019
  const N = Symbol("newer"), U = Symbol("older");
2020
- class Zn {
2020
+ class nr {
2021
2021
  constructor(e) {
2022
2022
  d(this, "entry");
2023
2023
  this.entry = e;
@@ -2030,7 +2030,7 @@ class Zn {
2030
2030
  return e ? (this.entry = e[N], { done: !1, value: e.key }) : { done: !0, value: void 0 };
2031
2031
  }
2032
2032
  }
2033
- class Qn {
2033
+ class rr {
2034
2034
  constructor(e) {
2035
2035
  d(this, "entry");
2036
2036
  this.entry = e;
@@ -2043,7 +2043,7 @@ class Qn {
2043
2043
  return e ? (this.entry = e[N], { done: !1, value: e.value }) : { done: !0, value: void 0 };
2044
2044
  }
2045
2045
  }
2046
- class yn {
2046
+ class ir {
2047
2047
  constructor(e) {
2048
2048
  d(this, "entry");
2049
2049
  this.entry = e;
@@ -2056,13 +2056,13 @@ class yn {
2056
2056
  return e ? (this.entry = e[N], { done: !1, value: [e.key, e.value] }) : { done: !0, value: void 0 };
2057
2057
  }
2058
2058
  }
2059
- var io, oo;
2060
- class we {
2059
+ var fo, go;
2060
+ class Se {
2061
2061
  constructor(e, s) {
2062
2062
  d(this, "key");
2063
2063
  d(this, "value");
2064
- d(this, io);
2065
- d(this, oo);
2064
+ d(this, fo);
2065
+ d(this, go);
2066
2066
  this.key = e, this.value = s, this[N] = void 0, this[U] = void 0;
2067
2067
  }
2068
2068
  toJSON() {
@@ -2072,8 +2072,8 @@ class we {
2072
2072
  };
2073
2073
  }
2074
2074
  }
2075
- io = N, oo = U;
2076
- class tr {
2075
+ fo = N, go = U;
2076
+ class or {
2077
2077
  constructor(...e) {
2078
2078
  d(this, "_keymap");
2079
2079
  d(this, "size", 0);
@@ -2101,7 +2101,7 @@ class tr {
2101
2101
  }
2102
2102
  onShift(e) {
2103
2103
  if (this._onShiftListeners.indexOf(e) === -1)
2104
- return this._onShiftListeners.push(e), b(() => ce(this._onShiftListeners, e));
2104
+ return this._onShiftListeners.push(e), b(() => he(this._onShiftListeners, e));
2105
2105
  throw new Error("[LRUMap]: the listener has been registered!");
2106
2106
  }
2107
2107
  _initialize(e, s) {
@@ -2115,7 +2115,7 @@ class tr {
2115
2115
  this._keymap.clear();
2116
2116
  const r = e[Symbol.iterator]();
2117
2117
  for (let i = r.next(); !i.done; i = r.next()) {
2118
- const o = new we(i.value[0], i.value[1]);
2118
+ const o = new Se(i.value[0], i.value[1]);
2119
2119
  if (this._keymap.set(o.key, o), s ? (s[N] = o, o[U] = s) : this.oldest = o, s = o, n-- === 0)
2120
2120
  throw new Error("overflow");
2121
2121
  }
@@ -2123,7 +2123,7 @@ class tr {
2123
2123
  }
2124
2124
  set(e, s) {
2125
2125
  let n = this._keymap.get(e);
2126
- return n ? (n.value = s, this._markEntryAsUsed(n), this) : (this._keymap.set(e, n = new we(e, s)), this.newest ? (this.newest[N] = n, n[U] = this.newest) : this.oldest = n, this.newest = n, ++this.size, this.size > this.limit && this.shift(), this);
2126
+ return n ? (n.value = s, this._markEntryAsUsed(n), this) : (this._keymap.set(e, n = new Se(e, s)), this.newest ? (this.newest[N] = n, n[U] = this.newest) : this.oldest = n, this.newest = n, ++this.size, this.size > this.limit && this.shift(), this);
2127
2127
  }
2128
2128
  shift() {
2129
2129
  const e = this.oldest;
@@ -2151,16 +2151,16 @@ class tr {
2151
2151
  this.oldest = void 0, this.newest = void 0, this.size = 0, this._keymap.clear();
2152
2152
  }
2153
2153
  keys() {
2154
- return new Zn(this.oldest);
2154
+ return new nr(this.oldest);
2155
2155
  }
2156
2156
  values() {
2157
- return new Qn(this.oldest);
2157
+ return new rr(this.oldest);
2158
2158
  }
2159
2159
  entries() {
2160
2160
  return this[Symbol.iterator]();
2161
2161
  }
2162
2162
  [Symbol.iterator]() {
2163
- return new yn(this.oldest);
2163
+ return new ir(this.oldest);
2164
2164
  }
2165
2165
  forEach(e, s) {
2166
2166
  typeof s != "object" && (s = this);
@@ -2202,7 +2202,7 @@ function be(t, e, s) {
2202
2202
  for (let r = t; r < n; r++)
2203
2203
  r < t + e ? delete s[r] : s[r] !== void 0 && (s[r - e] = s[r], delete s[r]);
2204
2204
  }
2205
- function jo(t, e) {
2205
+ function Qo(t, e) {
2206
2206
  const s = t, n = Object.keys(s), r = n.length, i = e, o = Object.keys(i), u = o.length, a = {};
2207
2207
  let l = 0;
2208
2208
  for (let c = 0; c < r; c++, l++) {
@@ -2215,7 +2215,7 @@ function jo(t, e) {
2215
2215
  }
2216
2216
  return a;
2217
2217
  }
2218
- function Ko(t, e, s) {
2218
+ function yo(t, e, s) {
2219
2219
  const n = s;
2220
2220
  if (J(s) > 0) {
2221
2221
  const i = {};
@@ -2230,9 +2230,9 @@ function ve(t, e, s, n) {
2230
2230
  const r = t > s;
2231
2231
  if (!r && t + e > s)
2232
2232
  throw new Error("Invalid move operation");
2233
- r ? er(t, e, s, n) : sr(t, e, s, n);
2233
+ r ? ur(t, e, s, n) : ar(t, e, s, n);
2234
2234
  }
2235
- function er(t, e, s, n) {
2235
+ function ur(t, e, s, n) {
2236
2236
  const r = n, i = [];
2237
2237
  for (let o = t; o < t + e; o++)
2238
2238
  i.push(r[o]);
@@ -2244,7 +2244,7 @@ function er(t, e, s, n) {
2244
2244
  r[s + u] = o, o === void 0 && delete r[s + u];
2245
2245
  });
2246
2246
  }
2247
- function sr(t, e, s, n) {
2247
+ function ar(t, e, s, n) {
2248
2248
  const r = n, i = [];
2249
2249
  for (let o = t; o < t + e; o++)
2250
2250
  i.push(r[o]);
@@ -2256,13 +2256,13 @@ function sr(t, e, s, n) {
2256
2256
  r[s + u - e] = o, o === void 0 && delete r[s + u - e];
2257
2257
  });
2258
2258
  }
2259
- class $ {
2259
+ class k {
2260
2260
  constructor(e = {}) {
2261
2261
  d(this, "_matrix");
2262
2262
  this._setOriginValue(e);
2263
2263
  }
2264
2264
  static MakeObjectMatrixSize(e) {
2265
- return new $({
2265
+ return new k({
2266
2266
  [e - 1]: {}
2267
2267
  });
2268
2268
  }
@@ -2399,7 +2399,7 @@ class $ {
2399
2399
  * @returns
2400
2400
  */
2401
2401
  getFragment(e, s, n, r) {
2402
- const i = new $();
2402
+ const i = new k();
2403
2403
  let o = 0;
2404
2404
  for (let u = e; u <= s; u++) {
2405
2405
  const a = {};
@@ -2424,7 +2424,7 @@ class $ {
2424
2424
  * @returns
2425
2425
  */
2426
2426
  getSlice(e, s, n, r) {
2427
- const i = new $();
2427
+ const i = new k();
2428
2428
  for (let o = e; o <= s; o++)
2429
2429
  for (let u = n; u <= r; u++) {
2430
2430
  const a = this.getValue(o, u);
@@ -2499,7 +2499,7 @@ class $ {
2499
2499
  }
2500
2500
  getArrayData() {
2501
2501
  let e = 0, s = 0, n = !1, r = !1;
2502
- const i = new $();
2502
+ const i = new k();
2503
2503
  return this.forEach((o, u) => {
2504
2504
  n || (n = !0, e = o), Object.keys(u).forEach((a) => {
2505
2505
  const l = Number(a);
@@ -2557,12 +2557,12 @@ class $ {
2557
2557
  }
2558
2558
  }
2559
2559
  var ze = /* @__PURE__ */ ((t) => (t.INIT = "init", t.FETCHING = "fetching", t.DONE = "done", t))(ze || {});
2560
- class nr {
2560
+ class lr {
2561
2561
  constructor() {
2562
2562
  d(this, "status", "init");
2563
2563
  }
2564
2564
  }
2565
- const Yo = (t) => t.some(
2565
+ const tu = (t) => t.some(
2566
2566
  (e) => e.status === "init"
2567
2567
  /* INIT */
2568
2568
  ) ? "init" : t.some(
@@ -2702,7 +2702,7 @@ d(z, "getRelativeRange", (e, s) => ({
2702
2702
  endColumn: e.endColumn + s
2703
2703
  }));
2704
2704
  let Z = z;
2705
- class zo {
2705
+ class eu {
2706
2706
  constructor(e, s) {
2707
2707
  d(this, "_values", []);
2708
2708
  d(this, "_keys", []);
@@ -2779,7 +2779,7 @@ function Ue(t, e, s, n) {
2779
2779
  }
2780
2780
  };
2781
2781
  }
2782
- function Xo(t) {
2782
+ function su(t) {
2783
2783
  if (t == null || t.length === 0)
2784
2784
  return Number.NaN;
2785
2785
  const e = t.toLowerCase().split(""), s = e.length, n = (o) => o.charCodeAt(0) - 96;
@@ -2788,37 +2788,37 @@ function Xo(t) {
2788
2788
  i = n(e[o]), r += i * 26 ** (s - o - 1);
2789
2789
  return r === 0 ? Number.NaN : r - 1;
2790
2790
  }
2791
- const bt = 65, Xe = 90, rr = 97;
2792
- function Jo(t) {
2791
+ const bt = 65, Xe = 90, cr = 97;
2792
+ function nu(t) {
2793
2793
  const e = Xe - bt + 1;
2794
2794
  let s = "";
2795
2795
  for (; t >= 0; )
2796
2796
  s = String.fromCharCode(t % e + bt) + s, t = Math.floor(t / e) - 1;
2797
2797
  return s;
2798
2798
  }
2799
- function ir(t, e) {
2799
+ function hr(t, e) {
2800
2800
  let s = "";
2801
2801
  for (; e > 0; )
2802
2802
  s += t, e--;
2803
2803
  return s;
2804
2804
  }
2805
- function qo(t, e = !1) {
2805
+ function ru(t, e = !1) {
2806
2806
  const s = Xe - bt + 1;
2807
- let n = rr;
2807
+ let n = cr;
2808
2808
  e && (n = bt);
2809
2809
  const r = String.fromCharCode(t % s + n), i = Math.floor(t / s) + 1;
2810
- return ir(r, i);
2810
+ return hr(r, i);
2811
2811
  }
2812
- function Zo(t, e) {
2812
+ function iu(t, e) {
2813
2813
  return t.zIndex > e.zIndex ? 1 : t.zIndex === e.zIndex ? 0 : -1;
2814
2814
  }
2815
- function Qo(t, e) {
2815
+ function ou(t, e) {
2816
2816
  return t.zIndex > e.zIndex ? -1 : t.zIndex === e.zIndex ? 0 : 1;
2817
2817
  }
2818
2818
  function ht(t = "index", e = 1) {
2819
2819
  return (s, n) => s[t] > n[t] ? e : s[t] === n[t] ? 0 : -e;
2820
2820
  }
2821
- function yo(t, e) {
2821
+ function uu(t, e) {
2822
2822
  let s;
2823
2823
  return function(...n) {
2824
2824
  const r = this, i = function() {
@@ -2827,7 +2827,7 @@ function yo(t, e) {
2827
2827
  clearTimeout(s), s = setTimeout(i, e);
2828
2828
  };
2829
2829
  }
2830
- function Bt(t, e, s) {
2830
+ function $t(t, e, s) {
2831
2831
  const { dataStream: n, textRuns: r = [] } = t;
2832
2832
  let i = e;
2833
2833
  const o = [];
@@ -2844,18 +2844,18 @@ function Bt(t, e, s) {
2844
2844
  }
2845
2845
  return i !== s && o.push(n.slice(i, s)), o.join("");
2846
2846
  }
2847
- function tu(t, e = !0) {
2847
+ function au(t, e = !0) {
2848
2848
  var s;
2849
2849
  if (e && ((s = t.paragraphs) != null && s.length)) {
2850
2850
  const { dataStream: n, paragraphs: r = [] } = t;
2851
2851
  let i = "", o = -1;
2852
2852
  for (const u of r) {
2853
2853
  const { startIndex: a, paragraphStyle: l = {} } = u, { spaceAbove: c, spaceBelow: h, lineSpacing: _ } = l, f = [];
2854
- c != null && (typeof c == "number" ? f.push(`margin-top: ${c}px`) : f.push(`margin-top: ${c.v}px`)), h != null && (typeof h == "number" ? f.push(`margin-bottom: ${h}px`) : f.push(`margin-bottom: ${h.v}px`)), _ != null && f.push(`line-height: ${_}`), a > o + 1 ? i += `<p class="UniverNormal" ${f.length ? `style="${f.join("; ")};"` : ""}>${Bt(t, o + 1, a)}</p>` : i += `<p class="UniverNormal" ${f.length ? `style="${f.join("; ")};"` : ""}></p>`, o = a;
2854
+ c != null && (typeof c == "number" ? f.push(`margin-top: ${c}px`) : f.push(`margin-top: ${c.v}px`)), h != null && (typeof h == "number" ? f.push(`margin-bottom: ${h}px`) : f.push(`margin-bottom: ${h.v}px`)), _ != null && f.push(`line-height: ${_}`), a > o + 1 ? i += `<p class="UniverNormal" ${f.length ? `style="${f.join("; ")};"` : ""}>${$t(t, o + 1, a)}</p>` : i += `<p class="UniverNormal" ${f.length ? `style="${f.join("; ")};"` : ""}></p>`, o = a;
2855
2855
  }
2856
- return o !== n.length && (i += Bt(t, o, n.length)), i;
2856
+ return o !== n.length && (i += $t(t, o, n.length)), i;
2857
2857
  } else
2858
- return Bt(t, 0, t.dataStream.length);
2858
+ return $t(t, 0, t.dataStream.length);
2859
2859
  }
2860
2860
  function Te(t, e) {
2861
2861
  const { st: s, ed: n, ts: r = {} } = e, { ff: i, fs: o, it: u, bl: a, ul: l, st: c, ol: h, bg: _, cl: f, va: g } = r;
@@ -2871,17 +2871,17 @@ const Et = {
2871
2871
  startColumn: -1,
2872
2872
  endColumn: -1
2873
2873
  }
2874
- }, eu = {
2874
+ }, lu = {
2875
2875
  startRow: -1,
2876
2876
  startColumn: -1,
2877
2877
  endRow: -1,
2878
2878
  endColumn: -1
2879
- }, su = {
2879
+ }, cu = {
2880
2880
  startRow: 0,
2881
2881
  startColumn: 0,
2882
2882
  endRow: 0,
2883
2883
  endColumn: 0
2884
- }, nu = {
2884
+ }, hu = {
2885
2885
  row: 0,
2886
2886
  column: 0
2887
2887
  }, kt = {
@@ -2937,7 +2937,7 @@ const Et = {
2937
2937
  /**
2938
2938
  * textDirection
2939
2939
  */
2940
- td: wt.UNSPECIFIED,
2940
+ td: St.UNSPECIFIED,
2941
2941
  /**
2942
2942
  * color
2943
2943
  */
@@ -2971,7 +2971,7 @@ const Et = {
2971
2971
  b: 0,
2972
2972
  l: 0
2973
2973
  }
2974
- }, or = {
2974
+ }, dr = {
2975
2975
  id: "default_slide",
2976
2976
  title: "defaultSlide",
2977
2977
  pageSize: {
@@ -2979,7 +2979,7 @@ const Et = {
2979
2979
  height: 300
2980
2980
  }
2981
2981
  };
2982
- var ur = /* @__PURE__ */ ((t) => (t.ARRAY_CONVERTOR = "ARRAY_CONVERTOR", t.MATRIX_CONVERTOR = "MATRIX_CONVERTOR", t))(ur || {});
2982
+ var _r = /* @__PURE__ */ ((t) => (t.ARRAY_CONVERTOR = "ARRAY_CONVERTOR", t.MATRIX_CONVERTOR = "MATRIX_CONVERTOR", t))(_r || {});
2983
2983
  function Rt(t, e) {
2984
2984
  const { textRuns: s = [] } = e;
2985
2985
  let n = 0;
@@ -3065,7 +3065,7 @@ class it {
3065
3065
  * @returns range matrix
3066
3066
  */
3067
3067
  getMatrix() {
3068
- const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = this._worksheet.getCellMatrix(), o = new $();
3068
+ const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = this._worksheet.getCellMatrix(), o = new k();
3069
3069
  for (let u = e; u <= s; u++)
3070
3070
  for (let a = n; a <= r; a++)
3071
3071
  o.setValue(u, a, i.getValue(u, a) || null);
@@ -3077,7 +3077,7 @@ class it {
3077
3077
  * @returns range matrix object
3078
3078
  */
3079
3079
  getMatrixObject() {
3080
- const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = this._worksheet.getCellMatrix(), o = new $();
3080
+ const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = this._worksheet.getCellMatrix(), o = new k();
3081
3081
  for (let u = e; u <= s; u++)
3082
3082
  for (let a = n; a <= r; a++)
3083
3083
  o.setValue(u - e, a - n, i.getValue(u, a) || {});
@@ -3281,7 +3281,7 @@ class it {
3281
3281
  getFontStyle() {
3282
3282
  var s, n;
3283
3283
  const { p: e } = (s = this.getValue()) != null ? s : {};
3284
- return e && Array.isArray((n = e.body) == null ? void 0 : n.textRuns) && e.body.textRuns.length > 0 ? Rt("it", e.body) === C.TRUE ? Xt.ITALIC : Xt.NORMAL : this._getFontStyles()[0][0];
3284
+ return e && Array.isArray((n = e.body) == null ? void 0 : n.textRuns) && e.body.textRuns.length > 0 ? Rt("it", e.body) === C.TRUE ? Jt.ITALIC : Jt.NORMAL : this._getFontStyles()[0][0];
3285
3285
  }
3286
3286
  /**
3287
3287
  * Returns the font styles of the cells in the range.
@@ -3298,7 +3298,7 @@ class it {
3298
3298
  getFontWeight() {
3299
3299
  var s, n;
3300
3300
  const { p: e } = (s = this.getValue()) != null ? s : {};
3301
- return e && Array.isArray((n = e.body) == null ? void 0 : n.textRuns) && e.body.textRuns.length > 0 ? Rt("bl", e.body) === C.TRUE ? Jt.BOLD : Jt.NORMAL : this._getFontWeights()[0][0];
3301
+ return e && Array.isArray((n = e.body) == null ? void 0 : n.textRuns) && e.body.textRuns.length > 0 ? Rt("bl", e.body) === C.TRUE ? qt.BOLD : qt.NORMAL : this._getFontWeights()[0][0];
3302
3302
  }
3303
3303
  /**
3304
3304
  * Returns the font weights of the cells in the range.
@@ -3489,7 +3489,7 @@ class it {
3489
3489
  );
3490
3490
  }
3491
3491
  }
3492
- function ar(t, e) {
3492
+ function fr(t, e) {
3493
3493
  if (t.length === 0 || t[0].length === 0)
3494
3494
  return null;
3495
3495
  const s = new Array(t[0].length).fill(0);
@@ -3497,7 +3497,7 @@ function ar(t, e) {
3497
3497
  for (let i = 0; i < t.length; i++) {
3498
3498
  for (let u = 0; u < t[0].length; u++)
3499
3499
  s[u] = e(t[i][u]) ? s[u] + 1 : 0;
3500
- const o = lr(s);
3500
+ const o = gr(s);
3501
3501
  o.area > n && (n = o.area, r = {
3502
3502
  startColumn: o.start,
3503
3503
  startRow: i - o.height + 1,
@@ -3507,7 +3507,7 @@ function ar(t, e) {
3507
3507
  }
3508
3508
  return r;
3509
3509
  }
3510
- function lr(t) {
3510
+ function gr(t) {
3511
3511
  const e = [];
3512
3512
  let s = 0, n = { area: 0, height: 0, start: 0, end: 0 }, r = 0;
3513
3513
  for (; r < t.length; )
@@ -3523,174 +3523,483 @@ function lr(t) {
3523
3523
  }
3524
3524
  return n;
3525
3525
  }
3526
- function cr(t, e) {
3526
+ function Er(t, e) {
3527
3527
  it.foreach(e, (s, n) => {
3528
3528
  t[s][n] = void 0;
3529
3529
  });
3530
3530
  }
3531
- function ru(t, e) {
3531
+ function du(t, e) {
3532
3532
  const s = t.toFullArray(), n = [];
3533
3533
  for (; ; ) {
3534
- const r = ar(s, e);
3534
+ const r = fr(s, e);
3535
3535
  if (!r)
3536
3536
  break;
3537
- n.push(r), cr(s, r);
3537
+ n.push(r), Er(s, r);
3538
3538
  }
3539
3539
  return n;
3540
3540
  }
3541
- function iu(t, e, s, n = !1) {
3541
+ function _u(t, e, s, n = !1) {
3542
3542
  let r = { ...t };
3543
3543
  const i = r.startAbsoluteRefType || L.NONE, o = r.endAbsoluteRefType || L.NONE;
3544
3544
  return !n && i === L.ALL && o === L.ALL ? r : n || i === L.NONE && o === L.NONE ? Z.moveOffset(r, e, s) : (i === L.NONE ? r = { ...r, startRow: r.startRow + s, startColumn: r.startColumn + e } : i === L.COLUMN ? r = { ...r, startRow: r.startRow + s } : i === L.ROW && (r = { ...r, startColumn: r.startColumn + e }), o === L.NONE ? r = { ...r, endRow: r.endRow + s, endColumn: r.endColumn + e } : o === L.COLUMN ? r = { ...r, endRow: r.endRow + s } : o === L.ROW && (r = { ...r, endColumn: r.endColumn + e }), r);
3545
3545
  }
3546
- var F = /* @__PURE__ */ ((t) => (t[t.UNDEFINED = 0] = "UNDEFINED", t[t.OK = 1] = "OK", t[t.INTERNAL_ERROR = 2] = "INTERNAL_ERROR", t[t.PERMISSION_DENIED = 3] = "PERMISSION_DENIED", t[t.NOT_FOUND = 4] = "NOT_FOUND", t[t.UNAUTHENTICATED = 5] = "UNAUTHENTICATED", t[t.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", t[t.INVALID_ARGUMENT = 7] = "INVALID_ARGUMENT", t[t.TOO_MANY_REQUESTS = 8] = "TOO_MANY_REQUESTS", t[t.CHANGESET_REVISION_CONFILICT = 5001] = "CHANGESET_REVISION_CONFILICT", t[t.SNAPSHOT_INVALID_SNAPSHOT = 6001] = "SNAPSHOT_INVALID_SNAPSHOT", t[t.APPLY_REJECT = 7001] = "APPLY_REJECT", t[t.APPLY_NON_SEQUENTIAL_REVISION = 7002] = "APPLY_NON_SEQUENTIAL_REVISION", t[t.APPLY_REVISION_CONFILICT = 7003] = "APPLY_REVISION_CONFILICT", t[t.CONNECTOR_DATA_TOO_LARGE = 8001] = "CONNECTOR_DATA_TOO_LARGE", t[t.LICENSE_MAX_UNITS_EXCEEDED = 9001] = "LICENSE_MAX_UNITS_EXCEEDED", t[t.LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED = 9002] = "LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED", t[t.LICENSE_IMPORT_SIZE_EXCEEDED = 9003] = "LICENSE_IMPORT_SIZE_EXCEEDED", t[t.LICENSE_EXPORT_SIZE_EXCEEDED = 9004] = "LICENSE_EXPORT_SIZE_EXCEEDED", t[t.LICENSE_DISTRO_REJECTED = 9005] = "LICENSE_DISTRO_REJECTED", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(F || {});
3547
- function Je(t) {
3548
- return !!(t && t.code && t.code !== F.OK && t.code !== "OK");
3546
+ async function Rr(t) {
3547
+ for (const [e, s] of t.entries())
3548
+ try {
3549
+ if (!await s())
3550
+ return {
3551
+ index: e,
3552
+ result: !1
3553
+ };
3554
+ } catch (n) {
3555
+ return {
3556
+ index: e,
3557
+ result: !1,
3558
+ error: n
3559
+ };
3560
+ }
3561
+ return {
3562
+ result: !0,
3563
+ index: -1
3564
+ };
3549
3565
  }
3550
- var O = /* @__PURE__ */ ((t) => (t[t.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", t[t.UNIVER_DOC = 1] = "UNIVER_DOC", t[t.UNIVER_SHEET = 2] = "UNIVER_SHEET", t[t.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(O || {});
3551
- class he extends T {
3566
+ function mr(t) {
3567
+ for (const [e, s] of t.entries())
3568
+ try {
3569
+ if (!s())
3570
+ return {
3571
+ index: e,
3572
+ result: !1
3573
+ };
3574
+ } catch (n) {
3575
+ return {
3576
+ index: e,
3577
+ result: !1,
3578
+ error: n
3579
+ };
3580
+ }
3581
+ return {
3582
+ result: !0,
3583
+ index: -1
3584
+ };
3552
3585
  }
3553
- class qe {
3586
+ const pt = G("univer.context-service");
3587
+ class Cr extends T {
3554
3588
  constructor() {
3555
- d(this, "_data", []);
3589
+ super(...arguments);
3590
+ d(this, "_contextChanged$", new H());
3591
+ d(this, "contextChanged$", this._contextChanged$.asObservable());
3592
+ d(this, "_contextMap", /* @__PURE__ */ new Map());
3556
3593
  }
3557
- static create() {
3558
- return new qe();
3594
+ dispose() {
3595
+ super.dispose(), this._contextChanged$.complete();
3559
3596
  }
3560
- add(e) {
3561
- this._data.indexOf(e) > -1 || this._data.push(e);
3597
+ getContextValue(s) {
3598
+ var n;
3599
+ return (n = this._contextMap.get(s)) != null ? n : !1;
3562
3600
  }
3563
- delete(e) {
3564
- const s = this._data.indexOf(e);
3565
- this._data.splice(s, 1);
3601
+ setContextValue(s, n) {
3602
+ this._contextMap.set(s, n), this._contextChanged$.next({ [s]: n });
3566
3603
  }
3567
- getData() {
3568
- return this._data;
3604
+ subscribeContextValue$(s) {
3605
+ return new ie((n) => {
3606
+ const r = this._contextChanged$.pipe(Xt((i) => typeof i[s] < "u")).subscribe((i) => n.next(i[s]));
3607
+ return this._contextMap.has(s) && n.next(this._contextMap.get(s)), () => r.unsubscribe();
3608
+ });
3569
3609
  }
3570
3610
  }
3571
- class Ze {
3611
+ var Or = /* @__PURE__ */ ((t) => (t[t.SILENT = 0] = "SILENT", t[t.ERROR = 1] = "ERROR", t[t.WARN = 2] = "WARN", t[t.INFO = 3] = "INFO", t[t.VERBOSE = 4] = "VERBOSE", t))(Or || {});
3612
+ const et = G("univer.log");
3613
+ class Ar extends T {
3572
3614
  constructor() {
3573
- d(this, "_data", /* @__PURE__ */ new Map());
3615
+ super(...arguments);
3616
+ d(this, "_logLevel", 3);
3574
3617
  }
3575
- static create() {
3576
- return new Ze();
3618
+ debug(...s) {
3619
+ this._logLevel >= 4 && this._log(console.debug, ...s);
3577
3620
  }
3578
- add(e, s) {
3579
- this._data.has(e) || this._data.set(e, s);
3621
+ log(...s) {
3622
+ this._logLevel >= 3 && this._log(console.log, ...s);
3580
3623
  }
3581
- delete(e) {
3582
- this._data.delete(e);
3624
+ warn(...s) {
3625
+ this._logLevel >= 2 && this._log(console.warn, ...s);
3583
3626
  }
3584
- getData() {
3585
- return this._data;
3627
+ error(...s) {
3628
+ this._logLevel >= 1 && this._log(console.error, ...s);
3629
+ }
3630
+ setLogLevel(s) {
3631
+ this._logLevel = s;
3632
+ }
3633
+ _log(s, ...n) {
3634
+ const r = n[0];
3635
+ /^\[(.*?)\]/g.test(r) ? s(`\x1B[97;104m${r}\x1B[0m`, ...n.slice(1)) : s(...n);
3586
3636
  }
3587
3637
  }
3588
- class hr {
3638
+ var Ir = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, wr = (t, e, s, n) => {
3639
+ for (var r = n > 1 ? void 0 : n ? Nr(e, s) : e, i = t.length - 1, o; i >= 0; i--)
3640
+ (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
3641
+ return n && r && Ir(e, s, r), r;
3642
+ }, Me = (t, e) => (s, n) => e(s, n, t), xt = /* @__PURE__ */ ((t) => (t[t.COMMAND = 0] = "COMMAND", t[t.OPERATION = 1] = "OPERATION", t[t.MUTATION = 2] = "MUTATION", t))(xt || {});
3643
+ const Pt = G("anywhere.command-service");
3644
+ class Sr {
3589
3645
  constructor() {
3590
- d(this, "cursor", 0);
3646
+ d(this, "_commands", /* @__PURE__ */ new Map());
3591
3647
  }
3592
- reset() {
3593
- return this.cursor = 0, this;
3648
+ registerCommand(e) {
3649
+ if (this._commands.has(e.id))
3650
+ throw new Error(`[CommandRegistry]: command "${e.id}" has been registered before.`);
3651
+ return this._commands.set(e.id, e), b(() => {
3652
+ var s;
3653
+ this._commands.delete(e.id), (s = e.onDispose) == null || s.call(e);
3654
+ });
3594
3655
  }
3595
- moveCursor(e) {
3596
- this.cursor += e;
3656
+ hasCommand(e) {
3657
+ return this._commands.has(e);
3597
3658
  }
3598
- moveCursorTo(e) {
3599
- this.cursor = e;
3659
+ getCommand(e) {
3660
+ return this._commands.has(e) ? [this._commands.get(e)] : null;
3600
3661
  }
3601
3662
  }
3602
- var dr = /* @__PURE__ */ ((t) => (t[t.PARAGRAPH = 0] = "PARAGRAPH", t[t.SECTION_BREAK = 1] = "SECTION_BREAK", t[t.TABLE = 2] = "TABLE", t[t.TABLE_ROW = 3] = "TABLE_ROW", t[t.TABLE_CELL = 4] = "TABLE_CELL", t))(dr || {}), Qe = /* @__PURE__ */ ((t) => (t.PARAGRAPH = "\r", t.SECTION_BREAK = `
3603
- `, t.TABLE_START = "", t.TABLE_ROW_START = "\x1B", t.TABLE_CELL_START = "", t.TABLE_CELL_END = "", t.TABLE_ROW_END = "", t.TABLE_END = "", t.CUSTOM_RANGE_START = "", t.CUSTOM_RANGE_END = "", t.COLUMN_BREAK = "\v", t.PAGE_BREAK = "\f", t.DOCS_END = "\0", t.TAB = " ", t.CUSTOM_BLOCK = "\b", t.LETTER = "", t.SPACE = " ", t))(Qe || {});
3604
- function ye(t) {
3605
- const e = [];
3606
- for (const s of t) {
3607
- const { st: n, ed: r, ts: i } = s;
3608
- if (s.sId === void 0 && delete s.sId, n === r || R.isEmptyObject(i) && s.sId == null)
3609
- continue;
3610
- if (e.length === 0) {
3611
- e.push(s);
3612
- continue;
3613
- }
3614
- const o = e.pop();
3615
- $n(s, o) && R.hasIntersectionBetweenTwoRanges(o.st, o.ed, s.st, s.ed) ? e.push({
3616
- ...s,
3617
- st: o.st,
3618
- ed: r
3619
- }) : e.push(o, s);
3663
+ const Lr = {
3664
+ id: "nil",
3665
+ type: 0,
3666
+ handler: () => !0
3667
+ };
3668
+ let yt = class {
3669
+ constructor(t, e) {
3670
+ d(this, "_commandRegistry");
3671
+ d(this, "_beforeCommandExecutionListeners", []);
3672
+ d(this, "_commandExecutedListeners", []);
3673
+ d(this, "_multiCommandDisposables", /* @__PURE__ */ new Map());
3674
+ d(this, "_commandExecutingLevel", 0);
3675
+ d(this, "_commandExecutionStack", []);
3676
+ this._injector = t, this._logService = e, this._commandRegistry = new Sr(), this._registerCommand(Lr);
3620
3677
  }
3621
- return e;
3622
- }
3623
- function ts(t, e, s, n) {
3624
- var l;
3625
- const { textRuns: r } = t;
3626
- if (r == null)
3627
- return;
3628
- const i = [], o = r.length;
3629
- let u = !1;
3630
- const a = (l = e.textRuns) != null ? l : [];
3631
- if (a.length)
3632
- for (let c = 0, h = a.length; c < h; c++) {
3633
- const _ = a[c];
3634
- _.st += n, _.ed += n;
3635
- }
3636
- for (let c = 0; c < o; c++) {
3637
- const h = r[c], { st: _, ed: f } = h;
3638
- if (f < n)
3639
- i.push(h);
3640
- else if (n >= _ && n <= f)
3641
- if (u)
3642
- h.st += s, h.ed += s, i.push(h);
3643
- else {
3644
- u = !0, h.ed += s;
3645
- const g = [];
3646
- if (a.length) {
3647
- const E = {
3648
- ...h,
3649
- st: _,
3650
- ed: a[0].st
3651
- };
3652
- g.push(E), g.push(...a);
3653
- const m = a[a.length - 1], I = {
3654
- ...h,
3655
- st: m.ed,
3656
- ed: f + s
3657
- };
3658
- g.push(I);
3659
- } else
3660
- g.push(h);
3661
- i.push(...g);
3662
- }
3663
- else
3664
- h.st += s, h.ed += s, u || (u = !0, i.push(...a)), i.push(h);
3678
+ hasCommand(t) {
3679
+ return this._commandRegistry.hasCommand(t);
3665
3680
  }
3666
- u || (u = !0, i.push(...a)), t.textRuns = ye(i);
3667
- }
3668
- function de(t, e, s, n) {
3669
- const { paragraphs: r } = t;
3670
- if (r == null)
3671
- return;
3672
- const { paragraphs: i, dataStream: o } = e, u = [];
3673
- let a = -1;
3674
- for (let c = 0, h = r.length; c < h; c++) {
3675
- const _ = r[c], { startIndex: f } = _;
3676
- f >= n && (_.startIndex += s), a === -1 && f >= n && (a = c), u.push(_.startIndex);
3681
+ registerCommand(t) {
3682
+ return this._registerCommand(t);
3677
3683
  }
3678
- let l = -1;
3679
- if (i) {
3680
- for (let c = 0, h = i.length; c < h; c++) {
3681
- const _ = i[c];
3682
- _.startIndex += n;
3683
- const f = _.startIndex;
3684
- l = u.indexOf(f);
3685
- }
3686
- if (o === Qe.PARAGRAPH && i.length === 1) {
3687
- const c = r[a], h = i[0], _ = c.paragraphStyle, f = c.bullet;
3688
- c.paragraphStyle = h.paragraphStyle, c.bullet = h.bullet, h.paragraphStyle = _, h.bullet = f;
3689
- }
3684
+ registerMultipleCommand(t) {
3685
+ return this._registerMultiCommand(t);
3686
+ }
3687
+ beforeCommandExecuted(t) {
3688
+ if (this._beforeCommandExecutionListeners.indexOf(t) === -1)
3689
+ return this._beforeCommandExecutionListeners.push(t), b(() => {
3690
+ const e = this._beforeCommandExecutionListeners.indexOf(t);
3691
+ this._beforeCommandExecutionListeners.splice(e, 1);
3692
+ });
3693
+ throw new Error("[CommandService]: could not add a listener twice.");
3694
+ }
3695
+ onCommandExecuted(t) {
3696
+ if (this._commandExecutedListeners.indexOf(t) === -1)
3697
+ return this._commandExecutedListeners.push(t), b(() => {
3698
+ const e = this._commandExecutedListeners.indexOf(t);
3699
+ this._commandExecutedListeners.splice(e, 1);
3700
+ });
3701
+ throw new Error("[CommandService]: could not add a listener twice.");
3702
+ }
3703
+ async executeCommand(t, e, s) {
3704
+ const n = this._commandRegistry.getCommand(t);
3705
+ if (n) {
3706
+ const [r] = n, i = {
3707
+ id: r.id,
3708
+ type: r.type,
3709
+ params: e
3710
+ }, o = this._pushCommandExecutionStack(i);
3711
+ this._beforeCommandExecutionListeners.forEach((a) => a(i, s));
3712
+ const u = await this._execute(r, e, s);
3713
+ return this._commandExecutedListeners.forEach((a) => a(i, s)), o.dispose(), u;
3714
+ }
3715
+ throw new Error(`[CommandService]: command "${t}" is not registered.`);
3716
+ }
3717
+ syncExecuteCommand(t, e, s) {
3718
+ var r;
3719
+ const n = this._commandRegistry.getCommand(t);
3720
+ if (n) {
3721
+ const [i] = n, o = {
3722
+ id: i.id,
3723
+ type: i.type,
3724
+ params: e
3725
+ };
3726
+ if (i.type === 2) {
3727
+ const l = sr(
3728
+ this._commandExecutionStack,
3729
+ (c) => c.type === 0
3730
+ /* COMMAND */
3731
+ );
3732
+ l && (o.params = (r = o.params) != null ? r : {}, o.params.trigger = l.id);
3733
+ }
3734
+ const u = this._pushCommandExecutionStack(o);
3735
+ this._beforeCommandExecutionListeners.forEach((l) => l(o, s));
3736
+ const a = this._syncExecute(i, e, s);
3737
+ return this._commandExecutedListeners.forEach((l) => l(o, s)), u.dispose(), a;
3738
+ }
3739
+ throw new Error(`[CommandService]: command "${t}" is not registered.`);
3740
+ }
3741
+ _pushCommandExecutionStack(t) {
3742
+ return this._commandExecutionStack.push(t), b(() => he(this._commandExecutionStack, t));
3743
+ }
3744
+ _registerCommand(t) {
3745
+ return this._commandRegistry.registerCommand(t);
3746
+ }
3747
+ _registerMultiCommand(t) {
3748
+ const e = this._commandRegistry.getCommand(t.id);
3749
+ let s;
3750
+ if (e) {
3751
+ if (e[0].multi !== !0)
3752
+ throw new Error("Command has registered as a single command.");
3753
+ s = e[0];
3754
+ } else {
3755
+ const r = new Ye();
3756
+ s = new br(t.id), r.add(this._commandRegistry.registerCommand(s)), r.add(
3757
+ b(() => {
3758
+ this._multiCommandDisposables.delete(t.id);
3759
+ })
3760
+ ), this._multiCommandDisposables.set(t.id, r);
3761
+ }
3762
+ const n = s.registerImplementation(t);
3763
+ return b(() => {
3764
+ var r;
3765
+ n.dispose(), s.hasImplementations() || (r = this._multiCommandDisposables.get(t.id)) == null || r.dispose();
3766
+ });
3767
+ }
3768
+ async _execute(t, e, s) {
3769
+ this._logService.debug(
3770
+ "[CommandService]",
3771
+ `${"|-".repeat(Math.max(this._commandExecutingLevel, 0))}executing command "${t.id}"`
3772
+ ), this._commandExecutingLevel++;
3773
+ let n;
3774
+ try {
3775
+ n = await this._injector.invoke(t.handler, e, s), this._commandExecutingLevel--;
3776
+ } catch (r) {
3777
+ throw n = !1, this._commandExecutingLevel = 0, r;
3778
+ }
3779
+ return n;
3780
+ }
3781
+ _syncExecute(t, e, s) {
3782
+ this._logService.debug(
3783
+ "[CommandService]",
3784
+ `${"|-".repeat(Math.max(0, this._commandExecutingLevel))}executing command "${t.id}".`
3785
+ ), this._commandExecutingLevel++;
3786
+ let n;
3787
+ try {
3788
+ if (n = this._injector.invoke(t.handler, e, s), n instanceof Promise)
3789
+ throw new TypeError("[CommandService]: Command handler should not return a promise.");
3790
+ this._commandExecutingLevel--;
3791
+ } catch (r) {
3792
+ throw n = !1, this._commandExecutingLevel = 0, r;
3793
+ }
3794
+ return n;
3795
+ }
3796
+ };
3797
+ yt = wr([
3798
+ Me(0, P(tt)),
3799
+ Me(1, et)
3800
+ ], yt);
3801
+ class br {
3802
+ constructor(e) {
3803
+ d(this, "name");
3804
+ d(this, "multi", !0);
3805
+ d(this, "type", 0);
3806
+ d(this, "priority", 0);
3807
+ d(this, "_implementations", []);
3808
+ d(this, "handler", async (e, s) => {
3809
+ if (!this._implementations.length)
3810
+ return !1;
3811
+ const n = e.get(et), r = e.get(pt), i = e.get(tt);
3812
+ for (const o of this._implementations) {
3813
+ const u = o.command.preconditions;
3814
+ if ((!u || u && u(r)) && (n.debug("[MultiCommand]", `executing implementation "${o.command.name}".`), await i.invoke(o.command.handler, s)))
3815
+ return !0;
3816
+ }
3817
+ return !1;
3818
+ });
3819
+ this.id = e, this.name = e;
3820
+ }
3821
+ registerImplementation(e) {
3822
+ const s = { command: e };
3823
+ return this._implementations.push(s), this._implementations.sort((n, r) => r.command.priority - n.command.priority), b(() => {
3824
+ var r;
3825
+ const n = this._implementations.indexOf(s);
3826
+ this._implementations.splice(n, 1), (r = e.onDispose) == null || r.call(e);
3827
+ });
3828
+ }
3829
+ hasImplementations() {
3830
+ return this._implementations.length > 0;
3831
+ }
3832
+ }
3833
+ function Je(t, e, s) {
3834
+ const n = t.map((r) => () => e.syncExecuteCommand(r.id, r.params, s));
3835
+ return mr(n);
3836
+ }
3837
+ function fu(t, e, s) {
3838
+ const n = t.map((r) => () => e.executeCommand(r.id, r.params, s));
3839
+ return Rr(n);
3840
+ }
3841
+ function vr(t) {
3842
+ return new ie((e) => {
3843
+ const s = t((...n) => e.next(n));
3844
+ return () => s == null ? void 0 : s.dispose();
3845
+ });
3846
+ }
3847
+ const gu = (t) => new Promise((e) => {
3848
+ bs(
3849
+ vr(t.onCommandExecuted).pipe(ps(([s]) => s.type === xt.MUTATION)),
3850
+ vs(300)
3851
+ ).pipe(xs(16), Ps()).subscribe(() => {
3852
+ e();
3853
+ });
3854
+ });
3855
+ var W = /* @__PURE__ */ ((t) => (t[t.UNDEFINED = 0] = "UNDEFINED", t[t.OK = 1] = "OK", t[t.INTERNAL_ERROR = 2] = "INTERNAL_ERROR", t[t.PERMISSION_DENIED = 3] = "PERMISSION_DENIED", t[t.NOT_FOUND = 4] = "NOT_FOUND", t[t.UNAUTHENTICATED = 5] = "UNAUTHENTICATED", t[t.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", t[t.INVALID_ARGUMENT = 7] = "INVALID_ARGUMENT", t[t.TOO_MANY_REQUESTS = 8] = "TOO_MANY_REQUESTS", t[t.CHANGESET_REVISION_CONFILICT = 5001] = "CHANGESET_REVISION_CONFILICT", t[t.SNAPSHOT_INVALID_SNAPSHOT = 6001] = "SNAPSHOT_INVALID_SNAPSHOT", t[t.APPLY_REJECT = 7001] = "APPLY_REJECT", t[t.APPLY_NON_SEQUENTIAL_REVISION = 7002] = "APPLY_NON_SEQUENTIAL_REVISION", t[t.APPLY_REVISION_CONFILICT = 7003] = "APPLY_REVISION_CONFILICT", t[t.CONNECTOR_DATA_TOO_LARGE = 8001] = "CONNECTOR_DATA_TOO_LARGE", t[t.LICENSE_MAX_UNITS_EXCEEDED = 9001] = "LICENSE_MAX_UNITS_EXCEEDED", t[t.LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED = 9002] = "LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED", t[t.LICENSE_IMPORT_SIZE_EXCEEDED = 9003] = "LICENSE_IMPORT_SIZE_EXCEEDED", t[t.LICENSE_EXPORT_SIZE_EXCEEDED = 9004] = "LICENSE_EXPORT_SIZE_EXCEEDED", t[t.LICENSE_DISTRO_REJECTED = 9005] = "LICENSE_DISTRO_REJECTED", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(W || {});
3856
+ function qe(t) {
3857
+ return !!(t && t.code && t.code !== W.OK && t.code !== "OK");
3858
+ }
3859
+ var O = /* @__PURE__ */ ((t) => (t[t.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", t[t.UNIVER_DOC = 1] = "UNIVER_DOC", t[t.UNIVER_SHEET = 2] = "UNIVER_SHEET", t[t.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(O || {});
3860
+ class de extends T {
3861
+ }
3862
+ class Ze {
3863
+ constructor() {
3864
+ d(this, "_data", []);
3865
+ }
3866
+ static create() {
3867
+ return new Ze();
3868
+ }
3869
+ add(e) {
3870
+ this._data.indexOf(e) > -1 || this._data.push(e);
3871
+ }
3872
+ delete(e) {
3873
+ const s = this._data.indexOf(e);
3874
+ this._data.splice(s, 1);
3875
+ }
3876
+ getData() {
3877
+ return this._data;
3878
+ }
3879
+ }
3880
+ class Qe {
3881
+ constructor() {
3882
+ d(this, "_data", /* @__PURE__ */ new Map());
3883
+ }
3884
+ static create() {
3885
+ return new Qe();
3886
+ }
3887
+ add(e, s) {
3888
+ this._data.has(e) || this._data.set(e, s);
3889
+ }
3890
+ delete(e) {
3891
+ this._data.delete(e);
3892
+ }
3893
+ getData() {
3894
+ return this._data;
3895
+ }
3896
+ }
3897
+ class Ur {
3898
+ constructor() {
3899
+ d(this, "cursor", 0);
3900
+ }
3901
+ reset() {
3902
+ return this.cursor = 0, this;
3903
+ }
3904
+ moveCursor(e) {
3905
+ this.cursor += e;
3906
+ }
3907
+ moveCursorTo(e) {
3908
+ this.cursor = e;
3909
+ }
3910
+ }
3911
+ var Tr = /* @__PURE__ */ ((t) => (t[t.PARAGRAPH = 0] = "PARAGRAPH", t[t.SECTION_BREAK = 1] = "SECTION_BREAK", t[t.TABLE = 2] = "TABLE", t[t.TABLE_ROW = 3] = "TABLE_ROW", t[t.TABLE_CELL = 4] = "TABLE_CELL", t[t.CUSTOM_BLOCK = 5] = "CUSTOM_BLOCK", t))(Tr || {}), ye = /* @__PURE__ */ ((t) => (t.PARAGRAPH = "\r", t.SECTION_BREAK = `
3912
+ `, t.TABLE_START = "", t.TABLE_ROW_START = "\x1B", t.TABLE_CELL_START = "", t.TABLE_CELL_END = "", t.TABLE_ROW_END = "", t.TABLE_END = "", t.CUSTOM_RANGE_START = "", t.CUSTOM_RANGE_END = "", t.COLUMN_BREAK = "\v", t.PAGE_BREAK = "\f", t.DOCS_END = "\0", t.TAB = " ", t.CUSTOM_BLOCK = "\b", t.LETTER = "", t.SPACE = " ", t))(ye || {});
3913
+ function ts(t) {
3914
+ const e = [];
3915
+ for (const s of t) {
3916
+ const { st: n, ed: r, ts: i } = s;
3917
+ if (s.sId === void 0 && delete s.sId, n === r || R.isEmptyObject(i) && s.sId == null)
3918
+ continue;
3919
+ if (e.length === 0) {
3920
+ e.push(s);
3921
+ continue;
3922
+ }
3923
+ const o = e.pop();
3924
+ Xn(s, o) && R.hasIntersectionBetweenTwoRanges(o.st, o.ed, s.st, s.ed) ? e.push({
3925
+ ...s,
3926
+ st: o.st,
3927
+ ed: r
3928
+ }) : e.push(o, s);
3929
+ }
3930
+ return e;
3931
+ }
3932
+ function es(t, e, s, n) {
3933
+ var l;
3934
+ const { textRuns: r } = t;
3935
+ if (r == null)
3936
+ return;
3937
+ const i = [], o = r.length;
3938
+ let u = !1;
3939
+ const a = (l = e.textRuns) != null ? l : [];
3940
+ if (a.length)
3941
+ for (let c = 0, h = a.length; c < h; c++) {
3942
+ const _ = a[c];
3943
+ _.st += n, _.ed += n;
3944
+ }
3945
+ for (let c = 0; c < o; c++) {
3946
+ const h = r[c], { st: _, ed: f } = h;
3947
+ if (f < n)
3948
+ i.push(h);
3949
+ else if (n >= _ && n <= f)
3950
+ if (u)
3951
+ h.st += s, h.ed += s, i.push(h);
3952
+ else {
3953
+ u = !0, h.ed += s;
3954
+ const g = [];
3955
+ if (a.length) {
3956
+ const E = {
3957
+ ...h,
3958
+ st: _,
3959
+ ed: a[0].st
3960
+ };
3961
+ g.push(E), g.push(...a);
3962
+ const m = a[a.length - 1], I = {
3963
+ ...h,
3964
+ st: m.ed,
3965
+ ed: f + s
3966
+ };
3967
+ g.push(I);
3968
+ } else
3969
+ g.push(h);
3970
+ i.push(...g);
3971
+ }
3972
+ else
3973
+ h.st += s, h.ed += s, u || (u = !0, i.push(...a)), i.push(h);
3974
+ }
3975
+ u || (u = !0, i.push(...a)), t.textRuns = ts(i);
3976
+ }
3977
+ function _e(t, e, s, n) {
3978
+ const { paragraphs: r } = t;
3979
+ if (r == null)
3980
+ return;
3981
+ const { paragraphs: i, dataStream: o } = e, u = [];
3982
+ let a = -1;
3983
+ for (let c = 0, h = r.length; c < h; c++) {
3984
+ const _ = r[c], { startIndex: f } = _;
3985
+ f >= n && (_.startIndex += s), a === -1 && f >= n && (a = c), u.push(_.startIndex);
3986
+ }
3987
+ let l = -1;
3988
+ if (i) {
3989
+ for (let c = 0, h = i.length; c < h; c++) {
3990
+ const _ = i[c];
3991
+ _.startIndex += n;
3992
+ const f = _.startIndex;
3993
+ l = u.indexOf(f);
3994
+ }
3995
+ if (o === ye.PARAGRAPH && i.length === 1) {
3996
+ const c = r[a], h = i[0], _ = c.paragraphStyle, f = c.bullet;
3997
+ c.paragraphStyle = h.paragraphStyle, c.bullet = h.bullet, h.paragraphStyle = _, h.bullet = f;
3998
+ }
3690
3999
  l !== -1 && r.splice(l, 1), r.push(...i), r.sort(ht("startIndex"));
3691
4000
  }
3692
4001
  }
3693
- function _r(t, e, s, n) {
4002
+ function Mr(t, e, s, n) {
3694
4003
  const { sectionBreaks: r } = t;
3695
4004
  if (r == null)
3696
4005
  return;
@@ -3707,7 +4016,7 @@ function _r(t, e, s, n) {
3707
4016
  r.push(...i), r.sort(ht("startIndex"));
3708
4017
  }
3709
4018
  }
3710
- function es(t, e, s, n) {
4019
+ function ss(t, e, s, n) {
3711
4020
  const { customBlocks: r } = t;
3712
4021
  if (r == null)
3713
4022
  return;
@@ -3724,7 +4033,7 @@ function es(t, e, s, n) {
3724
4033
  r.push(...i), r.sort(ht("startIndex"));
3725
4034
  }
3726
4035
  }
3727
- function _e(t, e, s, n) {
4036
+ function fe(t, e, s, n) {
3728
4037
  const { tables: r } = t;
3729
4038
  if (r == null)
3730
4039
  return;
@@ -3741,7 +4050,7 @@ function _e(t, e, s, n) {
3741
4050
  r.push(...i), r.sort(ht("startIndex"));
3742
4051
  }
3743
4052
  }
3744
- function fr(t, e, s, n) {
4053
+ function Dr(t, e, s, n) {
3745
4054
  const { customRanges: r } = t;
3746
4055
  if (r == null)
3747
4056
  return;
@@ -3758,7 +4067,7 @@ function fr(t, e, s, n) {
3758
4067
  r.push(...i), r.sort(ht("startIndex"));
3759
4068
  }
3760
4069
  }
3761
- function ss(t, e, s) {
4070
+ function ns(t, e, s) {
3762
4071
  const { textRuns: n } = t, r = s, i = s + e, o = [];
3763
4072
  if (n) {
3764
4073
  const u = [];
@@ -3789,9 +4098,13 @@ function ss(t, e, s) {
3789
4098
  }
3790
4099
  t.textRuns = u;
3791
4100
  }
3792
- return o;
4101
+ return o.length === 0 && o.push({
4102
+ st: 0,
4103
+ ed: e,
4104
+ ts: {}
4105
+ }), o;
3793
4106
  }
3794
- function ns(t, e, s) {
4107
+ function rs(t, e, s) {
3795
4108
  const { paragraphs: n } = t, r = s, i = s + e, o = [];
3796
4109
  if (n) {
3797
4110
  const u = [];
@@ -3811,7 +4124,7 @@ function ns(t, e, s) {
3811
4124
  }
3812
4125
  return o;
3813
4126
  }
3814
- function rs(t, e, s) {
4127
+ function is(t, e, s) {
3815
4128
  const { sectionBreaks: n } = t, r = s, i = s + e - 1, o = [];
3816
4129
  if (n) {
3817
4130
  const u = [];
@@ -3831,7 +4144,7 @@ function rs(t, e, s) {
3831
4144
  }
3832
4145
  return o;
3833
4146
  }
3834
- function is(t, e, s) {
4147
+ function os(t, e, s) {
3835
4148
  const { customBlocks: n } = t, r = s, i = s + e - 1, o = [];
3836
4149
  if (n) {
3837
4150
  const u = [];
@@ -3851,7 +4164,7 @@ function is(t, e, s) {
3851
4164
  }
3852
4165
  return o;
3853
4166
  }
3854
- function os(t, e, s) {
4167
+ function us(t, e, s) {
3855
4168
  const { tables: n } = t, r = s, i = s + e - 1, o = [];
3856
4169
  if (n) {
3857
4170
  const u = [];
@@ -3875,7 +4188,7 @@ function os(t, e, s) {
3875
4188
  }
3876
4189
  return o;
3877
4190
  }
3878
- function us(t, e, s) {
4191
+ function as(t, e, s) {
3879
4192
  const { customRanges: n } = t, r = s, i = s + e - 1, o = [];
3880
4193
  if (n) {
3881
4194
  const u = [];
@@ -3899,10 +4212,10 @@ function us(t, e, s) {
3899
4212
  }
3900
4213
  return o;
3901
4214
  }
3902
- function gr(t, e, s) {
3903
- const { dataStream: n } = t, r = s, i = s + e, o = ss(t, e, s), u = ns(t, e, s), a = rs(t, e, s), l = is(t, e, s), c = os(t, e, s), h = us(t, e, s);
4215
+ function pr(t, e, s) {
4216
+ const { dataStream: n } = t, r = s, i = s + e, o = ns(t, e, s), u = rs(t, e, s), a = is(t, e, s), l = os(t, e, s), c = us(t, e, s), h = as(t, e, s);
3904
4217
  let _ = "";
3905
- return n && (t.dataStream = Kn(n, r, i), _ = n.slice(r, i)), {
4218
+ return n && (t.dataStream = Zn(n, r, i), _ = n.slice(r, i)), {
3906
4219
  dataStream: _,
3907
4220
  textRuns: o,
3908
4221
  paragraphs: u,
@@ -3912,11 +4225,11 @@ function gr(t, e, s) {
3912
4225
  customRanges: h
3913
4226
  };
3914
4227
  }
3915
- function Er(t, e, s, n) {
3916
- t.dataStream = jn(t.dataStream, n, e.dataStream), ts(t, e, s, n), de(t, e, s, n), _r(t, e, s, n), es(t, e, s, n), _e(t, e, s, n), fr(t, e, s, n);
4228
+ function xr(t, e, s, n) {
4229
+ t.dataStream = qn(t.dataStream, n, e.dataStream), es(t, e, s, n), _e(t, e, s, n), Mr(t, e, s, n), ss(t, e, s, n), fe(t, e, s, n), Dr(t, e, s, n);
3917
4230
  }
3918
- var Qt = /* @__PURE__ */ ((t) => (t.BULLET_LIST = "BULLET_LIST", t.ORDER_LIST = "ORDER_LIST", t))(Qt || {});
3919
- const ou = {
4231
+ var te = /* @__PURE__ */ ((t) => (t.BULLET_LIST = "BULLET_LIST", t.ORDER_LIST = "ORDER_LIST", t))(te || {});
4232
+ const Eu = {
3920
4233
  BULLET_LIST: {
3921
4234
  listType: "BULLET_LIST",
3922
4235
  nestingLevel: [
@@ -3994,8 +4307,8 @@ const ou = {
3994
4307
  ]
3995
4308
  }
3996
4309
  };
3997
- function Rr(t, e, s, n, r) {
3998
- const i = mr(t, e, s, n, r), o = Cr(t, e, s, n, r), u = Or(t, e, s, n, r), a = Ar(t, e, s, n, r), l = Ir(t, e, s, n, r), c = Nr(t, e, s, n, r);
4310
+ function Pr(t, e, s, n, r) {
4311
+ const i = Hr(t, e, s, n, r), o = Fr(t, e, s, n, r), u = Wr(t, e, s, n, r), a = Gr(t, e, s, n, r), l = Br(t, e, s, n, r), c = $r(t, e, s, n, r);
3999
4312
  return {
4000
4313
  dataStream: "",
4001
4314
  textRuns: i,
@@ -4006,18 +4319,18 @@ function Rr(t, e, s, n, r) {
4006
4319
  customRanges: c
4007
4320
  };
4008
4321
  }
4009
- function mr(t, e, s, n, r) {
4322
+ function Hr(t, e, s, n, r) {
4010
4323
  const { textRuns: i } = t, { textRuns: o } = e;
4011
4324
  if (i == null || o == null)
4012
4325
  return;
4013
- const u = ss(t, s, n);
4326
+ const u = ns(t, s, n);
4014
4327
  if (r !== D.REPLACE) {
4015
- const a = as(o, u, r);
4328
+ const a = ls(o, u, r);
4016
4329
  e.textRuns = a;
4017
4330
  }
4018
- return ts(t, e, s, n), u;
4331
+ return es(t, e, s, n), u;
4019
4332
  }
4020
- function as(t, e, s) {
4333
+ function ls(t, e, s) {
4021
4334
  if (e.length === 0)
4022
4335
  return t;
4023
4336
  t = R.deepClone(t), e = R.deepClone(e);
@@ -4048,13 +4361,13 @@ function as(t, e, s) {
4048
4361
  }
4049
4362
  l();
4050
4363
  const c = n[n.length - 1], h = t[r - 1], _ = e[i - 1];
4051
- return c.ed !== Math.max(h.ed, _.ed) && (h.ed > _.ed ? n.push(h) : n.push(_)), ye(n);
4364
+ return c.ed !== Math.max(h.ed, _.ed) && (h.ed > _.ed ? n.push(h) : n.push(_)), ts(n);
4052
4365
  }
4053
- function Cr(t, e, s, n, r) {
4366
+ function Fr(t, e, s, n, r) {
4054
4367
  const { paragraphs: i } = t, { paragraphs: o } = e;
4055
4368
  if (i == null || o == null)
4056
4369
  return;
4057
- const u = ns(t, s, n);
4370
+ const u = rs(t, s, n);
4058
4371
  if (r !== D.REPLACE) {
4059
4372
  const a = [];
4060
4373
  for (const l of o) {
@@ -4073,14 +4386,14 @@ function Cr(t, e, s, n, r) {
4073
4386
  let v, M;
4074
4387
  if (r === D.COVER ? (v = { ...m, ...h }, M = {
4075
4388
  listId: "",
4076
- listType: Qt.BULLET_LIST,
4389
+ listType: te.BULLET_LIST,
4077
4390
  nestingLevel: 0,
4078
4391
  textStyle: {},
4079
4392
  ...I,
4080
4393
  ..._
4081
4394
  }) : (v = { ...h, ...m }, M = {
4082
4395
  listId: "",
4083
- listType: Qt.BULLET_LIST,
4396
+ listType: te.BULLET_LIST,
4084
4397
  nestingLevel: 0,
4085
4398
  textStyle: {},
4086
4399
  ..._,
@@ -4098,13 +4411,13 @@ function Cr(t, e, s, n, r) {
4098
4411
  }
4099
4412
  e.paragraphs = a;
4100
4413
  }
4101
- return de(t, e, s, n), u;
4414
+ return _e(t, e, s, n), u;
4102
4415
  }
4103
- function Or(t, e, s, n, r) {
4416
+ function Wr(t, e, s, n, r) {
4104
4417
  const { sectionBreaks: i } = t, { sectionBreaks: o } = e;
4105
4418
  if (i == null || o == null)
4106
4419
  return;
4107
- const u = rs(t, s, n);
4420
+ const u = is(t, s, n);
4108
4421
  if (r !== D.REPLACE) {
4109
4422
  const a = [];
4110
4423
  for (const l of o) {
@@ -4127,13 +4440,13 @@ function Or(t, e, s, n, r) {
4127
4440
  }
4128
4441
  e.sectionBreaks = a;
4129
4442
  }
4130
- return de(t, e, s, n), u;
4443
+ return _e(t, e, s, n), u;
4131
4444
  }
4132
- function Ar(t, e, s, n, r) {
4445
+ function Gr(t, e, s, n, r) {
4133
4446
  const { customBlocks: i } = t, { customBlocks: o } = e;
4134
4447
  if (i == null || o == null)
4135
4448
  return;
4136
- const u = is(t, s, n);
4449
+ const u = os(t, s, n);
4137
4450
  if (r !== D.REPLACE) {
4138
4451
  const a = [];
4139
4452
  for (const l of o) {
@@ -4156,13 +4469,13 @@ function Ar(t, e, s, n, r) {
4156
4469
  }
4157
4470
  e.customBlocks = a;
4158
4471
  }
4159
- return es(t, e, s, n), u;
4472
+ return ss(t, e, s, n), u;
4160
4473
  }
4161
- function Ir(t, e, s, n, r) {
4474
+ function Br(t, e, s, n, r) {
4162
4475
  const { tables: i } = t, { tables: o } = e;
4163
4476
  if (i == null || o == null)
4164
4477
  return;
4165
- const u = os(t, s, n);
4478
+ const u = us(t, s, n);
4166
4479
  if (r !== D.REPLACE) {
4167
4480
  const a = [];
4168
4481
  for (const l of o) {
@@ -4185,13 +4498,13 @@ function Ir(t, e, s, n, r) {
4185
4498
  }
4186
4499
  e.tables = a;
4187
4500
  }
4188
- return _e(t, e, s, n), u;
4501
+ return fe(t, e, s, n), u;
4189
4502
  }
4190
- function Nr(t, e, s, n, r) {
4503
+ function $r(t, e, s, n, r) {
4191
4504
  const { customRanges: i } = t, { tables: o } = e;
4192
4505
  if (i == null || o == null)
4193
4506
  return;
4194
- const u = us(t, s, n);
4507
+ const u = as(t, s, n);
4195
4508
  if (r !== D.REPLACE) {
4196
4509
  const a = [];
4197
4510
  for (const l of o) {
@@ -4214,10 +4527,10 @@ function Nr(t, e, s, n, r) {
4214
4527
  }
4215
4528
  e.customRanges = a;
4216
4529
  }
4217
- return _e(t, e, s, n), u;
4530
+ return fe(t, e, s, n), u;
4218
4531
  }
4219
4532
  var A = /* @__PURE__ */ ((t) => (t.RETAIN = "r", t.INSERT = "i", t.DELETE = "d", t))(A || {});
4220
- function ls(t, e, s) {
4533
+ function cs(t, e, s) {
4221
4534
  const { dataStream: n, textRuns: r = [], paragraphs: i = [] } = t, o = {
4222
4535
  dataStream: n.slice(e, s)
4223
4536
  }, u = [];
@@ -4251,12 +4564,12 @@ function ls(t, e, s) {
4251
4564
  startIndex: l.startIndex - e
4252
4565
  }))), o;
4253
4566
  }
4254
- function Me(t, e, s = D.COVER) {
4567
+ function De(t, e, s = D.COVER) {
4255
4568
  if (e.dataStream !== "")
4256
4569
  throw new Error("Cannot compose other body with non-empty dataStream");
4257
4570
  const n = {
4258
4571
  dataStream: t.dataStream
4259
- }, { textRuns: r = [], paragraphs: i = [] } = t, { textRuns: o = [], paragraphs: u = [] } = e, a = as(o, r, s);
4572
+ }, { textRuns: r = [], paragraphs: i = [] } = t, { textRuns: o = [], paragraphs: u = [] } = e, a = ls(o, r, s);
4260
4573
  a.length && (n.textRuns = a);
4261
4574
  const l = [];
4262
4575
  let c = 0, h = 0;
@@ -4266,14 +4579,14 @@ function Me(t, e, s = D.COVER) {
4266
4579
  }
4267
4580
  return c < i.length && l.push(...i.slice(c)), h < u.length && l.push(...u.slice(h)), l.length && (n.paragraphs = l), n;
4268
4581
  }
4269
- function Sr(t) {
4582
+ function kr(t) {
4270
4583
  const { body: e } = t;
4271
4584
  if (e == null)
4272
4585
  return !0;
4273
4586
  const { textRuns: s = [], paragraphs: n = [] } = e;
4274
4587
  return s.length === 0 && n.length === 0;
4275
4588
  }
4276
- function wr(t = R.generateRandomId(6), e = ut.EN_US, s = "") {
4589
+ function Vr(t = R.generateRandomId(6), e = ut.EN_US, s = "") {
4277
4590
  return {
4278
4591
  id: t,
4279
4592
  locale: e,
@@ -4316,16 +4629,16 @@ function wr(t = R.generateRandomId(6), e = ut.EN_US, s = "") {
4316
4629
  settings: {}
4317
4630
  };
4318
4631
  }
4319
- const cs = {
4632
+ const hs = {
4320
4633
  id: "default_doc",
4321
4634
  documentStyle: {}
4322
4635
  };
4323
- class Lr extends he {
4636
+ class jr extends de {
4324
4637
  constructor(s) {
4325
4638
  super();
4326
4639
  d(this, "type", O.UNIVER_DOC);
4327
4640
  d(this, "snapshot");
4328
- this.snapshot = { ...cs, ...s };
4641
+ this.snapshot = { ...hs, ...s };
4329
4642
  }
4330
4643
  getUnitId() {
4331
4644
  throw new Error("Method not implemented.");
@@ -4358,9 +4671,6 @@ class Lr extends he {
4358
4671
  getContainer() {
4359
4672
  return this.snapshot.container;
4360
4673
  }
4361
- getParentRenderUnitId() {
4362
- return this.snapshot.parentRenderUnitId;
4363
- }
4364
4674
  getSnapshot() {
4365
4675
  return this.snapshot;
4366
4676
  }
@@ -4408,10 +4718,10 @@ class Lr extends he {
4408
4718
  } : this.snapshot.settings.zoomRatio = 1;
4409
4719
  }
4410
4720
  }
4411
- class ot extends Lr {
4721
+ class ot extends jr {
4412
4722
  constructor(s) {
4413
4723
  var r;
4414
- super(R.isEmptyObject(s) ? wr() : s);
4724
+ super(R.isEmptyObject(s) ? Vr() : s);
4415
4725
  d(this, "_unitId");
4416
4726
  d(this, "headerModelMap", /* @__PURE__ */ new Map());
4417
4727
  d(this, "footerModelMap", /* @__PURE__ */ new Map());
@@ -4421,417 +4731,122 @@ class ot extends Lr {
4421
4731
  dispose() {
4422
4732
  this.headerModelMap.forEach((s) => {
4423
4733
  s.dispose();
4424
- }), this.footerModelMap.forEach((s) => {
4425
- s.dispose();
4426
- });
4427
- }
4428
- getRev() {
4429
- var s;
4430
- return (s = this.snapshot.rev) != null ? s : 1;
4431
- }
4432
- incrementRev() {
4433
- this.snapshot.rev = this.getRev() + 1;
4434
- }
4435
- getSettings() {
4436
- return this.snapshot.settings;
4437
- }
4438
- // TODO: @JOCS do not use reset, please use apply to modify the snapshot.
4439
- reset(s) {
4440
- if (s.id && s.id !== this._unitId)
4441
- throw new Error("Cannot reset a document model with a different unit id!");
4442
- this.snapshot = { ...cs, ...s }, this._initializeHeaderFooterModel();
4443
- }
4444
- getSelfOrHeaderFooterModel(s) {
4445
- if (s != null) {
4446
- if (this.headerModelMap.has(s))
4447
- return this.headerModelMap.get(s);
4448
- if (this.footerModelMap.has(s))
4449
- return this.footerModelMap.get(s);
4450
- }
4451
- return this;
4452
- }
4453
- getUnitId() {
4454
- return this._unitId;
4455
- }
4456
- apply(s) {
4457
- const n = [], r = new hr();
4458
- return r.reset(), s.forEach((i) => {
4459
- if (i = R.deepClone(i), i.t === A.RETAIN) {
4460
- const { coverType: o, body: u, len: a, segmentId: l } = i;
4461
- if (u != null) {
4462
- const c = this._updateApply(u, a, r.cursor, o, l);
4463
- n.push({
4464
- ...i,
4465
- t: A.RETAIN,
4466
- coverType: D.REPLACE,
4467
- body: c
4468
- });
4469
- } else
4470
- n.push({
4471
- ...i,
4472
- t: A.RETAIN
4473
- });
4474
- r.moveCursor(a);
4475
- } else if (i.t === A.INSERT) {
4476
- const { body: o, len: u, segmentId: a, line: l } = i;
4477
- this._insertApply(o, u, r.cursor, a), r.moveCursor(u), n.push({
4478
- t: A.DELETE,
4479
- len: u,
4480
- line: l,
4481
- segmentId: a
4482
- });
4483
- } else if (i.t === A.DELETE) {
4484
- const { len: o, segmentId: u } = i, a = this._deleteApply(o, r.cursor, u);
4485
- n.push({
4486
- ...i,
4487
- t: A.INSERT,
4488
- body: a
4489
- });
4490
- } else
4491
- throw new Error(`Unknown action type for action: ${i}.`);
4492
- }), n;
4493
- }
4494
- sliceBody(s, n) {
4495
- const r = this.getBody();
4496
- if (r != null)
4497
- return ls(r, s, n);
4498
- }
4499
- _updateApply(s, n, r, i = D.COVER, o) {
4500
- if (s == null)
4501
- throw new Error("updateBody is none");
4502
- const u = this.snapshot, a = Wt(u, o);
4503
- if (a == null)
4504
- throw new Error("no body has changed");
4505
- return Rr(a, s, n, r, i);
4506
- }
4507
- _deleteApply(s, n, r) {
4508
- const i = this.snapshot, o = Wt(i, r);
4509
- if (o == null)
4510
- throw new Error("no body has changed");
4511
- return s <= 0 ? { dataStream: "" } : gr(o, s, n);
4512
- }
4513
- _insertApply(s, n, r, i) {
4514
- const o = this.snapshot, u = Wt(o, i);
4515
- if (n !== 0) {
4516
- if (u == null)
4517
- throw new Error("no body has changed");
4518
- Er(u, s, n, r);
4519
- }
4520
- }
4521
- _initializeHeaderFooterModel() {
4522
- const { headers: s, footers: n } = this.getSnapshot();
4523
- if (s)
4524
- for (const r in s) {
4525
- const i = s[r];
4526
- this.headerModelMap.set(r, new ot(i));
4527
- }
4528
- if (n)
4529
- for (const r in n) {
4530
- const i = n[r];
4531
- this.footerModelMap.set(r, new ot(i));
4532
- }
4533
- }
4534
- updateDocumentId(s) {
4535
- super.updateDocumentId(s), this._unitId = s;
4536
- }
4537
- }
4538
- async function br(t) {
4539
- for (const [e, s] of t.entries())
4540
- try {
4541
- if (!await s())
4542
- return {
4543
- index: e,
4544
- result: !1
4545
- };
4546
- } catch (n) {
4547
- return {
4548
- index: e,
4549
- result: !1,
4550
- error: n
4551
- };
4552
- }
4553
- return {
4554
- result: !0,
4555
- index: -1
4556
- };
4557
- }
4558
- function vr(t) {
4559
- for (const [e, s] of t.entries())
4560
- try {
4561
- if (!s())
4562
- return {
4563
- index: e,
4564
- result: !1
4565
- };
4566
- } catch (n) {
4567
- return {
4568
- index: e,
4569
- result: !1,
4570
- error: n
4571
- };
4572
- }
4573
- return {
4574
- result: !0,
4575
- index: -1
4576
- };
4577
- }
4578
- const pt = G("univer.context-service");
4579
- class Ur extends T {
4580
- constructor() {
4581
- super(...arguments);
4582
- d(this, "_contextChanged$", new W());
4583
- d(this, "contextChanged$", this._contextChanged$.asObservable());
4584
- d(this, "_contextMap", /* @__PURE__ */ new Map());
4585
- }
4586
- dispose() {
4587
- super.dispose(), this._contextChanged$.complete();
4588
- }
4589
- getContextValue(s) {
4590
- var n;
4591
- return (n = this._contextMap.get(s)) != null ? n : !1;
4592
- }
4593
- setContextValue(s, n) {
4594
- this._contextMap.set(s, n), this._contextChanged$.next({ [s]: n });
4595
- }
4596
- subscribeContextValue$(s) {
4597
- return new re((n) => {
4598
- const r = this._contextChanged$.pipe(zt((i) => typeof i[s] < "u")).subscribe((i) => n.next(i[s]));
4599
- return this._contextMap.has(s) && n.next(this._contextMap.get(s)), () => r.unsubscribe();
4600
- });
4601
- }
4602
- }
4603
- var Tr = /* @__PURE__ */ ((t) => (t[t.SILENT = 0] = "SILENT", t[t.ERROR = 1] = "ERROR", t[t.WARN = 2] = "WARN", t[t.INFO = 3] = "INFO", t[t.VERBOSE = 4] = "VERBOSE", t))(Tr || {});
4604
- const et = G("univer.log");
4605
- class Mr extends T {
4606
- constructor() {
4607
- super(...arguments);
4608
- d(this, "_logLevel", 3);
4609
- }
4610
- debug(...s) {
4611
- this._logLevel >= 4 && this._log(console.debug, ...s);
4612
- }
4613
- log(...s) {
4614
- this._logLevel >= 3 && this._log(console.log, ...s);
4615
- }
4616
- warn(...s) {
4617
- this._logLevel >= 2 && this._log(console.warn, ...s);
4618
- }
4619
- error(...s) {
4620
- this._logLevel >= 1 && this._log(console.error, ...s);
4621
- }
4622
- setLogLevel(s) {
4623
- this._logLevel = s;
4624
- }
4625
- _log(s, ...n) {
4626
- const r = n[0];
4627
- /^\[(.*?)\]/g.test(r) ? s(`\x1B[97;104m${r}\x1B[0m`, ...n.slice(1)) : s(...n);
4628
- }
4629
- }
4630
- var Dr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, Pr = (t, e, s, n) => {
4631
- for (var r = n > 1 ? void 0 : n ? pr(e, s) : e, i = t.length - 1, o; i >= 0; i--)
4632
- (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
4633
- return n && r && Dr(e, s, r), r;
4634
- }, De = (t, e) => (s, n) => e(s, n, t), fe = /* @__PURE__ */ ((t) => (t[t.COMMAND = 0] = "COMMAND", t[t.OPERATION = 1] = "OPERATION", t[t.MUTATION = 2] = "MUTATION", t))(fe || {});
4635
- const Pt = G("anywhere.command-service");
4636
- class xr {
4637
- constructor() {
4638
- d(this, "_commands", /* @__PURE__ */ new Map());
4639
- }
4640
- registerCommand(e) {
4641
- if (this._commands.has(e.id))
4642
- throw new Error(`[CommandRegistry]: command "${e.id}" has been registered before.`);
4643
- return this._commands.set(e.id, e), b(() => {
4644
- var s;
4645
- this._commands.delete(e.id), (s = e.onDispose) == null || s.call(e);
4646
- });
4647
- }
4648
- hasCommand(e) {
4649
- return this._commands.has(e);
4650
- }
4651
- getCommand(e) {
4652
- return this._commands.has(e) ? [this._commands.get(e)] : null;
4653
- }
4654
- }
4655
- const Hr = {
4656
- id: "nil",
4657
- type: 0,
4658
- handler: () => !0
4659
- };
4660
- let yt = class {
4661
- constructor(t, e) {
4662
- d(this, "_commandRegistry");
4663
- d(this, "_beforeCommandExecutionListeners", []);
4664
- d(this, "_commandExecutedListeners", []);
4665
- d(this, "_multiCommandDisposables", /* @__PURE__ */ new Map());
4666
- d(this, "_commandExecutingLevel", 0);
4667
- d(this, "_commandExecutionStack", []);
4668
- this._injector = t, this._logService = e, this._commandRegistry = new xr(), this._registerCommand(Hr);
4669
- }
4670
- hasCommand(t) {
4671
- return this._commandRegistry.hasCommand(t);
4734
+ }), this.footerModelMap.forEach((s) => {
4735
+ s.dispose();
4736
+ });
4672
4737
  }
4673
- registerCommand(t) {
4674
- return this._registerCommand(t);
4738
+ getRev() {
4739
+ var s;
4740
+ return (s = this.snapshot.rev) != null ? s : 1;
4675
4741
  }
4676
- registerMultipleCommand(t) {
4677
- return this._registerMultiCommand(t);
4742
+ incrementRev() {
4743
+ this.snapshot.rev = this.getRev() + 1;
4678
4744
  }
4679
- beforeCommandExecuted(t) {
4680
- if (this._beforeCommandExecutionListeners.indexOf(t) === -1)
4681
- return this._beforeCommandExecutionListeners.push(t), b(() => {
4682
- const e = this._beforeCommandExecutionListeners.indexOf(t);
4683
- this._beforeCommandExecutionListeners.splice(e, 1);
4684
- });
4685
- throw new Error("[CommandService]: could not add a listener twice.");
4745
+ getSettings() {
4746
+ return this.snapshot.settings;
4686
4747
  }
4687
- onCommandExecuted(t) {
4688
- if (this._commandExecutedListeners.indexOf(t) === -1)
4689
- return this._commandExecutedListeners.push(t), b(() => {
4690
- const e = this._commandExecutedListeners.indexOf(t);
4691
- this._commandExecutedListeners.splice(e, 1);
4692
- });
4693
- throw new Error("[CommandService]: could not add a listener twice.");
4748
+ // TODO: @JOCS do not use reset, please use apply to modify the snapshot.
4749
+ reset(s) {
4750
+ if (s.id && s.id !== this._unitId)
4751
+ throw new Error("Cannot reset a document model with a different unit id!");
4752
+ this.snapshot = { ...hs, ...s }, this._initializeHeaderFooterModel();
4694
4753
  }
4695
- async executeCommand(t, e, s) {
4696
- const n = this._commandRegistry.getCommand(t);
4697
- if (n) {
4698
- const [r] = n, i = {
4699
- id: r.id,
4700
- type: r.type,
4701
- params: e
4702
- }, o = this._pushCommandExecutionStack(i);
4703
- this._beforeCommandExecutionListeners.forEach((a) => a(i, s));
4704
- const u = await this._execute(r, e, s);
4705
- return this._commandExecutedListeners.forEach((a) => a(i, s)), o.dispose(), u;
4754
+ getSelfOrHeaderFooterModel(s) {
4755
+ if (s != null) {
4756
+ if (this.headerModelMap.has(s))
4757
+ return this.headerModelMap.get(s);
4758
+ if (this.footerModelMap.has(s))
4759
+ return this.footerModelMap.get(s);
4706
4760
  }
4707
- throw new Error(`[CommandService]: command "${t}" is not registered.`);
4761
+ return this;
4708
4762
  }
4709
- syncExecuteCommand(t, e, s) {
4710
- var r;
4711
- const n = this._commandRegistry.getCommand(t);
4712
- if (n) {
4713
- const [i] = n, o = {
4714
- id: i.id,
4715
- type: i.type,
4716
- params: e
4717
- };
4718
- if (i.type === 2) {
4719
- const l = qn(
4720
- this._commandExecutionStack,
4721
- (c) => c.type === 0
4722
- /* COMMAND */
4723
- );
4724
- l && (o.params = (r = o.params) != null ? r : {}, o.params.trigger = l.id);
4725
- }
4726
- const u = this._pushCommandExecutionStack(o);
4727
- this._beforeCommandExecutionListeners.forEach((l) => l(o, s));
4728
- const a = this._syncExecute(i, e, s);
4729
- return this._commandExecutedListeners.forEach((l) => l(o, s)), u.dispose(), a;
4730
- }
4731
- throw new Error(`[CommandService]: command "${t}" is not registered.`);
4763
+ getUnitId() {
4764
+ return this._unitId;
4732
4765
  }
4733
- _pushCommandExecutionStack(t) {
4734
- return this._commandExecutionStack.push(t), b(() => ce(this._commandExecutionStack, t));
4766
+ apply(s) {
4767
+ const n = [], r = new Ur();
4768
+ return r.reset(), s.forEach((i) => {
4769
+ if (i = R.deepClone(i), i.t === A.RETAIN) {
4770
+ const { coverType: o, body: u, len: a, segmentId: l } = i;
4771
+ if (u != null) {
4772
+ const c = this._updateApply(u, a, r.cursor, o, l);
4773
+ n.push({
4774
+ ...i,
4775
+ t: A.RETAIN,
4776
+ coverType: D.REPLACE,
4777
+ body: c
4778
+ });
4779
+ } else
4780
+ n.push({
4781
+ ...i,
4782
+ t: A.RETAIN
4783
+ });
4784
+ r.moveCursor(a);
4785
+ } else if (i.t === A.INSERT) {
4786
+ const { body: o, len: u, segmentId: a, line: l } = i;
4787
+ this._insertApply(o, u, r.cursor, a), r.moveCursor(u), n.push({
4788
+ t: A.DELETE,
4789
+ len: u,
4790
+ line: l,
4791
+ segmentId: a
4792
+ });
4793
+ } else if (i.t === A.DELETE) {
4794
+ const { len: o, segmentId: u } = i, a = this._deleteApply(o, r.cursor, u);
4795
+ n.push({
4796
+ ...i,
4797
+ t: A.INSERT,
4798
+ body: a
4799
+ });
4800
+ } else
4801
+ throw new Error(`Unknown action type for action: ${i}.`);
4802
+ }), n;
4735
4803
  }
4736
- _registerCommand(t) {
4737
- return this._commandRegistry.registerCommand(t);
4804
+ sliceBody(s, n) {
4805
+ const r = this.getBody();
4806
+ if (r != null)
4807
+ return cs(r, s, n);
4738
4808
  }
4739
- _registerMultiCommand(t) {
4740
- const e = this._commandRegistry.getCommand(t.id);
4741
- let s;
4742
- if (e) {
4743
- if (e[0].multi !== !0)
4744
- throw new Error("Command has registered as a single command.");
4745
- s = e[0];
4746
- } else {
4747
- const r = new Ye();
4748
- s = new Fr(t.id), r.add(this._commandRegistry.registerCommand(s)), r.add(
4749
- b(() => {
4750
- this._multiCommandDisposables.delete(t.id);
4751
- })
4752
- ), this._multiCommandDisposables.set(t.id, r);
4753
- }
4754
- const n = s.registerImplementation(t);
4755
- return b(() => {
4756
- var r;
4757
- n.dispose(), s.hasImplementations() || (r = this._multiCommandDisposables.get(t.id)) == null || r.dispose();
4758
- });
4809
+ _updateApply(s, n, r, i = D.COVER, o) {
4810
+ if (s == null)
4811
+ throw new Error("updateBody is none");
4812
+ const u = this.snapshot, a = Gt(u, o);
4813
+ if (a == null)
4814
+ throw new Error("no body has changed");
4815
+ return Pr(a, s, n, r, i);
4759
4816
  }
4760
- async _execute(t, e, s) {
4761
- this._logService.debug(
4762
- "[CommandService]",
4763
- `${"|-".repeat(Math.max(this._commandExecutingLevel, 0))}executing command "${t.id}"`
4764
- ), this._commandExecutingLevel++;
4765
- let n;
4766
- try {
4767
- n = await this._injector.invoke(t.handler, e, s), this._commandExecutingLevel--;
4768
- } catch (r) {
4769
- throw n = !1, this._commandExecutingLevel = 0, r;
4770
- }
4771
- return n;
4817
+ _deleteApply(s, n, r) {
4818
+ const i = this.snapshot, o = Gt(i, r);
4819
+ if (o == null)
4820
+ throw new Error("no body has changed");
4821
+ return s <= 0 ? { dataStream: "" } : pr(o, s, n);
4772
4822
  }
4773
- _syncExecute(t, e, s) {
4774
- this._logService.debug(
4775
- "[CommandService]",
4776
- `${"|-".repeat(Math.max(0, this._commandExecutingLevel))}executing command "${t.id}".`
4777
- ), this._commandExecutingLevel++;
4778
- let n;
4779
- try {
4780
- if (n = this._injector.invoke(t.handler, e, s), n instanceof Promise)
4781
- throw new TypeError("[CommandService]: Command handler should not return a promise.");
4782
- this._commandExecutingLevel--;
4783
- } catch (r) {
4784
- throw n = !1, this._commandExecutingLevel = 0, r;
4823
+ _insertApply(s, n, r, i) {
4824
+ const o = this.snapshot, u = Gt(o, i);
4825
+ if (n !== 0) {
4826
+ if (u == null)
4827
+ throw new Error("no body has changed");
4828
+ xr(u, s, n, r);
4785
4829
  }
4786
- return n;
4787
4830
  }
4788
- };
4789
- yt = Pr([
4790
- De(0, x(tt)),
4791
- De(1, et)
4792
- ], yt);
4793
- class Fr {
4794
- constructor(e) {
4795
- d(this, "name");
4796
- d(this, "multi", !0);
4797
- d(this, "type", 0);
4798
- d(this, "priority", 0);
4799
- d(this, "_implementations", []);
4800
- d(this, "handler", async (e, s) => {
4801
- if (!this._implementations.length)
4802
- return !1;
4803
- const n = e.get(et), r = e.get(pt), i = e.get(tt);
4804
- for (const o of this._implementations) {
4805
- const u = o.command.preconditions;
4806
- if ((!u || u && u(r)) && (n.debug("[MultiCommand]", `executing implementation "${o.command.name}".`), await i.invoke(o.command.handler, s)))
4807
- return !0;
4831
+ _initializeHeaderFooterModel() {
4832
+ const { headers: s, footers: n } = this.getSnapshot();
4833
+ if (s)
4834
+ for (const r in s) {
4835
+ const i = s[r];
4836
+ this.headerModelMap.set(r, new ot(i));
4837
+ }
4838
+ if (n)
4839
+ for (const r in n) {
4840
+ const i = n[r];
4841
+ this.footerModelMap.set(r, new ot(i));
4808
4842
  }
4809
- return !1;
4810
- });
4811
- this.id = e, this.name = e;
4812
- }
4813
- registerImplementation(e) {
4814
- const s = { command: e };
4815
- return this._implementations.push(s), this._implementations.sort((n, r) => r.command.priority - n.command.priority), b(() => {
4816
- var r;
4817
- const n = this._implementations.indexOf(s);
4818
- this._implementations.splice(n, 1), (r = e.onDispose) == null || r.call(e);
4819
- });
4820
4843
  }
4821
- hasImplementations() {
4822
- return this._implementations.length > 0;
4844
+ updateDocumentId(s) {
4845
+ super.updateDocumentId(s), this._unitId = s;
4823
4846
  }
4824
4847
  }
4825
- function hs(t, e, s) {
4826
- const n = t.map((r) => () => e.syncExecuteCommand(r.id, r.params, s));
4827
- return vr(n);
4828
- }
4829
- function uu(t, e, s) {
4830
- const n = t.map((r) => () => e.executeCommand(r.id, r.params, s));
4831
- return br(n);
4832
- }
4833
- const Wr = G("univer.config-service");
4834
- class Gr {
4848
+ const Kr = G("univer.config-service");
4849
+ class Yr {
4835
4850
  constructor() {
4836
4851
  d(this, "_config", /* @__PURE__ */ new Map());
4837
4852
  }
@@ -4845,10 +4860,10 @@ class Gr {
4845
4860
  this._config.delete(e);
4846
4861
  }
4847
4862
  }
4848
- class Br extends T {
4863
+ class zr extends T {
4849
4864
  constructor() {
4850
4865
  super(...arguments);
4851
- d(this, "_error$", new W());
4866
+ d(this, "_error$", new H());
4852
4867
  d(this, "error$", this._error$.asObservable());
4853
4868
  }
4854
4869
  dispose() {
@@ -4858,28 +4873,28 @@ class Br extends T {
4858
4873
  this._error$.next({ errorKey: s });
4859
4874
  }
4860
4875
  }
4861
- const au = "__default_document_sub_component_id20231101__";
4862
- class kr {
4876
+ const Ru = "__default_document_sub_component_id20231101__";
4877
+ class Xr {
4863
4878
  constructor() {
4864
4879
  d(this, "_managerInfo", /* @__PURE__ */ new Map());
4865
4880
  /**
4866
4881
  * The deletion action is triggered and broadcasted within the core business plugin.
4867
4882
  * Upon receiving the deletion broadcast, the plugin executes the plugin command logic.
4868
4883
  */
4869
- d(this, "_remove$", new W());
4884
+ d(this, "_remove$", new H());
4870
4885
  d(this, "remove$", this._remove$.asObservable());
4871
4886
  /**
4872
4887
  * Addition and updates are also triggered and broadcasted within the core business plugin.
4873
4888
  * Upon receiving the update broadcast, the plugin updates the location of its business components.
4874
4889
  */
4875
- d(this, "_andOrUpdate$", new W());
4890
+ d(this, "_andOrUpdate$", new H());
4876
4891
  d(this, "andOrUpdate$", this._andOrUpdate$.asObservable());
4877
4892
  /**
4878
4893
  * The position, width, and height of the plugin's business components can be changed by the user through interface operations.
4879
4894
  * Here, it is necessary to notify the core business plugin to update the relevant location model.
4880
4895
  * The logic converges in the core business plugin.
4881
4896
  */
4882
- d(this, "_pluginUpdate$", new W());
4897
+ d(this, "_pluginUpdate$", new H());
4883
4898
  d(this, "pluginUpdate$", this._pluginUpdate$.asObservable());
4884
4899
  }
4885
4900
  getFloatObject(e) {
@@ -4899,7 +4914,7 @@ class kr {
4899
4914
  const s = this._addByParam(e);
4900
4915
  this._andOrUpdate$.next(s);
4901
4916
  }
4902
- BatchAddOrUpdate(e) {
4917
+ batchAddOrUpdate(e) {
4903
4918
  const s = [];
4904
4919
  e.forEach((n) => {
4905
4920
  s.push(...this._addByParam(n));
@@ -4927,10 +4942,10 @@ class kr {
4927
4942
  return (o = (i = this._managerInfo.get(s)) == null ? void 0 : i.get(n)) == null ? void 0 : o.get(r);
4928
4943
  }
4929
4944
  _addByParam(e) {
4930
- const { unitId: s, subUnitId: n, floatingObject: r, floatingObjectId: i } = e;
4945
+ const { unitId: s, subUnitId: n, floatingObject: r, floatingObjectId: i, behindText: o } = e;
4931
4946
  this._managerInfo.has(s) || this._managerInfo.set(s, /* @__PURE__ */ new Map());
4932
- const o = this._managerInfo.get(s);
4933
- return o.has(n) || o.set(n, /* @__PURE__ */ new Map()), o.get(n).set(i, r), [{ unitId: s, subUnitId: n, floatingObjectId: i, floatingObject: r }];
4947
+ const u = this._managerInfo.get(s);
4948
+ return u.has(n) || u.set(n, /* @__PURE__ */ new Map()), u.get(n).set(i, r), [{ unitId: s, subUnitId: n, floatingObjectId: i, floatingObject: r, behindText: o }];
4934
4949
  }
4935
4950
  _clearByParam(e) {
4936
4951
  const s = this._getFloatingObjects(e), { unitId: n, subUnitId: r } = e, i = [];
@@ -4948,13 +4963,13 @@ class kr {
4948
4963
  return n == null ? [] : (s == null || s.delete(e.floatingObjectId), [{ ...e, floatingObject: n }]);
4949
4964
  }
4950
4965
  }
4951
- const $r = G(
4966
+ const Jr = G(
4952
4967
  "univer.floating-object.service"
4953
4968
  );
4954
- class Vr {
4969
+ class qr {
4955
4970
  constructor(e = {}) {
4956
4971
  d(this, "_styles");
4957
- d(this, "_cacheMap", new tr(1e5));
4972
+ d(this, "_cacheMap", new or(1e5));
4958
4973
  this._styles = e, this._generateCacheMap();
4959
4974
  }
4960
4975
  each(e) {
@@ -5006,7 +5021,7 @@ class Vr {
5006
5021
  return null;
5007
5022
  }
5008
5023
  }
5009
- class jr {
5024
+ class Zr {
5010
5025
  constructor(e, s) {
5011
5026
  d(this, "_columnData", {});
5012
5027
  this._config = e, this._columnData = s;
@@ -5131,7 +5146,7 @@ class jr {
5131
5146
  return this._columnData[e] = i, i;
5132
5147
  }
5133
5148
  }
5134
- class Kr {
5149
+ class Qr {
5135
5150
  constructor(e, s, n) {
5136
5151
  d(this, "_rowData");
5137
5152
  this._config = e, this._viewModel = s, this._rowData = n;
@@ -5238,15 +5253,15 @@ class Kr {
5238
5253
  return J(this._rowData);
5239
5254
  }
5240
5255
  }
5241
- const lu = "DEFAULT_WORKSHEET_ROW_COUNT", Yr = 1e3, cu = "DEFAULT_WORKSHEET_COLUMN_COUNT", zr = 20, hu = "DEFAULT_WORKSHEET_ROW_HEIGHT", Xr = 19, du = "DEFAULT_WORKSHEET_COLUMN_WIDTH", Jr = 73, _u = "DEFAULT_WORKSHEET_ROW_TITLE_WIDTH", qr = 46, fu = "DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT", Zr = 20;
5242
- function Qr(t) {
5256
+ const mu = "DEFAULT_WORKSHEET_ROW_COUNT", yr = 1e3, Cu = "DEFAULT_WORKSHEET_COLUMN_COUNT", ti = 20, Ou = "DEFAULT_WORKSHEET_ROW_HEIGHT", ei = 19, Au = "DEFAULT_WORKSHEET_COLUMN_WIDTH", si = 73, Iu = "DEFAULT_WORKSHEET_ROW_TITLE_WIDTH", ni = 46, Nu = "DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT", ri = 20;
5257
+ function ii(t) {
5243
5258
  const e = {
5244
5259
  name: "Sheet1",
5245
5260
  id: "sheet-01",
5246
5261
  tabColor: "",
5247
5262
  hidden: C.FALSE,
5248
- rowCount: Yr,
5249
- columnCount: zr,
5263
+ rowCount: yr,
5264
+ columnCount: ti,
5250
5265
  zoomRatio: 1,
5251
5266
  freeze: {
5252
5267
  xSplit: 0,
@@ -5256,19 +5271,19 @@ function Qr(t) {
5256
5271
  },
5257
5272
  scrollTop: 0,
5258
5273
  scrollLeft: 0,
5259
- defaultColumnWidth: Jr,
5260
- defaultRowHeight: Xr,
5274
+ defaultColumnWidth: si,
5275
+ defaultRowHeight: ei,
5261
5276
  mergeData: [],
5262
5277
  cellData: {},
5263
5278
  rowData: {},
5264
5279
  columnData: {},
5265
5280
  showGridlines: C.TRUE,
5266
5281
  rowHeader: {
5267
- width: qr,
5282
+ width: ni,
5268
5283
  hidden: C.FALSE
5269
5284
  },
5270
5285
  columnHeader: {
5271
- height: Zr,
5286
+ height: ri,
5272
5287
  hidden: C.FALSE
5273
5288
  },
5274
5289
  selections: ["A1"],
@@ -5279,7 +5294,7 @@ function Qr(t) {
5279
5294
  typeof t[n] > "u" && (t[n] = e[n]);
5280
5295
  }), t;
5281
5296
  }
5282
- class yr extends T {
5297
+ class oi extends T {
5283
5298
  constructor(s) {
5284
5299
  super();
5285
5300
  d(this, "_cellContentInterceptor", null);
@@ -5316,9 +5331,9 @@ class vt {
5316
5331
  d(this, "_columnManager");
5317
5332
  d(this, "_viewModel");
5318
5333
  var u;
5319
- this.unitId = e, this._styles = n, this._snapshot = Qr(s);
5334
+ this.unitId = e, this._styles = n, this._snapshot = ii(s);
5320
5335
  const { columnData: r, rowData: i, cellData: o } = this._snapshot;
5321
- this._sheetId = (u = this._snapshot.id) != null ? u : R.generateRandomId(6), this._cellData = new $(o), this._viewModel = new yr((a, l) => this.getCellRaw(a, l)), this._rowManager = new Kr(this._snapshot, this._viewModel, i), this._columnManager = new jr(this._snapshot, r);
5336
+ this._sheetId = (u = this._snapshot.id) != null ? u : R.generateRandomId(6), this._cellData = new k(o), this._viewModel = new oi((a, l) => this.getCellRaw(a, l)), this._rowManager = new Qr(this._snapshot, this._viewModel, i), this._columnManager = new Zr(this._snapshot, r);
5322
5337
  }
5323
5338
  /**
5324
5339
  * @internal
@@ -5439,7 +5454,7 @@ class vt {
5439
5454
  getMatrixWithMergedCells(e, s, n, r, i = !1) {
5440
5455
  const o = this.getCellMatrix(), u = this._snapshot.mergeData.filter(
5441
5456
  (l) => Z.intersects({ startRow: e, startColumn: s, endRow: n, endColumn: r }, l)
5442
- ), a = new $();
5457
+ ), a = new k();
5443
5458
  return Ue(e, n, s, r).forEach((l, c) => {
5444
5459
  const h = i ? this.getCellRaw(l, c) : this.getCell(l, c);
5445
5460
  h && a.setValue(l, c, h);
@@ -5720,7 +5735,7 @@ class vt {
5720
5735
  };
5721
5736
  }
5722
5737
  }
5723
- function gu(t) {
5738
+ function wu(t) {
5724
5739
  var n, r;
5725
5740
  if (!t)
5726
5741
  return "";
@@ -5730,34 +5745,34 @@ function gu(t) {
5730
5745
  const s = t.v;
5731
5746
  return typeof s == "string" ? t.t === nt.BOOLEAN ? s.toUpperCase() : s : typeof s == "number" ? t.t === nt.BOOLEAN ? s ? "TRUE" : "FALSE" : s.toString() : typeof s == "boolean" ? s ? "TRUE" : "FALSE" : "";
5732
5747
  }
5733
- const ti = "0.1.9";
5734
- function ei(t = "", e = ut.ZH_CN, s = "") {
5748
+ const ui = "0.1.11";
5749
+ function ai(t = "", e = ut.ZH_CN, s = "") {
5735
5750
  return {
5736
5751
  id: t,
5737
5752
  sheetOrder: [],
5738
5753
  name: s,
5739
- appVersion: ti,
5754
+ appVersion: ui,
5740
5755
  locale: e,
5741
5756
  styles: {},
5742
5757
  sheets: {},
5743
5758
  resources: []
5744
5759
  };
5745
5760
  }
5746
- var si = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ri = (t, e, s, n) => {
5747
- for (var r = n > 1 ? void 0 : n ? ni(e, s) : e, i = t.length - 1, o; i >= 0; i--)
5761
+ var li = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, hi = (t, e, s, n) => {
5762
+ for (var r = n > 1 ? void 0 : n ? ci(e, s) : e, i = t.length - 1, o; i >= 0; i--)
5748
5763
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
5749
- return n && r && si(e, s, r), r;
5750
- }, ii = (t, e) => (s, n) => e(s, n, t);
5751
- function Eu(t, e) {
5764
+ return n && r && li(e, s, r), r;
5765
+ }, di = (t, e) => (s, n) => e(s, n, t);
5766
+ function Su(t, e) {
5752
5767
  return `${t.getUnitId()}|${e.getSheetId()}`;
5753
5768
  }
5754
- let Ut = class extends he {
5769
+ let Ut = class extends de {
5755
5770
  constructor(e = {}, s) {
5756
5771
  super();
5757
5772
  d(this, "type", O.UNIVER_SHEET);
5758
- d(this, "_sheetCreated$", new W());
5773
+ d(this, "_sheetCreated$", new H());
5759
5774
  d(this, "sheetCreated$", this._sheetCreated$.asObservable());
5760
- d(this, "_sheetDisposed$", new W());
5775
+ d(this, "_sheetDisposed$", new H());
5761
5776
  d(this, "sheetDisposed$", this._sheetDisposed$.asObservable());
5762
5777
  d(this, "_activeSheet$", new q(null));
5763
5778
  d(this, "activeSheet$", this._activeSheet$.asObservable());
@@ -5780,10 +5795,10 @@ let Ut = class extends he {
5780
5795
  d(this, "_unitId");
5781
5796
  d(this, "_count");
5782
5797
  this._logService = s;
5783
- const n = ei();
5798
+ const n = ai();
5784
5799
  R.isEmptyObject(e) ? this._snapshot = n : this._snapshot = R.commonExtend(n, e);
5785
5800
  const { styles: r } = this._snapshot;
5786
- (this._snapshot.id == null || this._snapshot.id.length === 0) && (this._snapshot.id = R.generateRandomId(6)), this._unitId = this._snapshot.id, this._styles = new Vr(r), this._count = 1, this._worksheets = /* @__PURE__ */ new Map(), this._passWorksheetSnapshots();
5801
+ (this._snapshot.id == null || this._snapshot.id.length === 0) && (this._snapshot.id = R.generateRandomId(6)), this._unitId = this._snapshot.id, this._styles = new qr(r), this._count = 1, this._worksheets = /* @__PURE__ */ new Map(), this._passWorksheetSnapshots();
5787
5802
  }
5788
5803
  get _activeSheet() {
5789
5804
  return this._activeSheet$.getValue();
@@ -5806,6 +5821,9 @@ let Ut = class extends he {
5806
5821
  getName() {
5807
5822
  return this._snapshot.name;
5808
5823
  }
5824
+ setName(e) {
5825
+ this._snapshot.name = e;
5826
+ }
5809
5827
  getUnitId() {
5810
5828
  return this._unitId;
5811
5829
  }
@@ -5833,9 +5851,6 @@ let Ut = class extends he {
5833
5851
  const o = new vt(this._unitId, n, this._styles);
5834
5852
  return this._worksheets.set(e, o), this._sheetCreated$.next(o), !0;
5835
5853
  }
5836
- getParentRenderUnitId() {
5837
- return this._snapshot.parentRenderUnitId;
5838
- }
5839
5854
  getSheetOrders() {
5840
5855
  return this._snapshot.sheetOrder;
5841
5856
  }
@@ -6066,24 +6081,21 @@ let Ut = class extends he {
6066
6081
  }
6067
6082
  }
6068
6083
  };
6069
- Ut = ri([
6070
- ii(1, et)
6084
+ Ut = hi([
6085
+ di(1, et)
6071
6086
  ], Ut);
6072
- class ds extends he {
6087
+ class ds extends de {
6073
6088
  constructor(s) {
6074
6089
  var n;
6075
6090
  super();
6076
6091
  d(this, "type", O.UNIVER_SLIDE);
6077
6092
  d(this, "_snapshot");
6078
6093
  d(this, "_unitId");
6079
- this._snapshot = { ...or, ...s }, this._unitId = (n = this._snapshot.id) != null ? n : R.generateRandomId(6);
6094
+ this._snapshot = { ...dr, ...s }, this._unitId = (n = this._snapshot.id) != null ? n : R.generateRandomId(6);
6080
6095
  }
6081
6096
  getContainer() {
6082
6097
  return this._snapshot.container;
6083
6098
  }
6084
- getParentRenderUnitId() {
6085
- return this._snapshot.parentRenderUnitId;
6086
- }
6087
6099
  getSnapshot() {
6088
6100
  return this._snapshot;
6089
6101
  }
@@ -6116,7 +6128,7 @@ class ds extends he {
6116
6128
  addPage() {
6117
6129
  return {
6118
6130
  id: "cover_1",
6119
- pageType: $e.SLIDE,
6131
+ pageType: ke.SLIDE,
6120
6132
  zIndex: 1,
6121
6133
  title: "cover",
6122
6134
  description: "this is first page, cover",
@@ -6127,14 +6139,14 @@ class ds extends he {
6127
6139
  };
6128
6140
  }
6129
6141
  }
6130
- const Ot = "FOCUSING_SHEET", $t = "FOCUSING_DOC", Vt = "FOCUSING_SLIDE", Ru = "FOCUSING_EDITOR_BUT_HIDDEN", oi = "EDITOR_ACTIVATED", mu = "FOCUSING_EDITOR_INPUT_FORMULA", ui = "FOCUSING_FORMULA_EDITOR", Cu = "FOCUSING_UNIVER_EDITOR", Ou = "FOCUSING_EDITOR_INPUT_FORMULA", Au = "FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE";
6131
- var ai = Object.defineProperty, li = Object.getOwnPropertyDescriptor, ci = (t, e, s, n) => {
6132
- for (var r = n > 1 ? void 0 : n ? li(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6142
+ const Ot = "FOCUSING_SHEET", Vt = "FOCUSING_DOC", jt = "FOCUSING_SLIDE", Lu = "FOCUSING_EDITOR_BUT_HIDDEN", _i = "EDITOR_ACTIVATED", bu = "FOCUSING_EDITOR_INPUT_FORMULA", fi = "FOCUSING_FORMULA_EDITOR", vu = "FOCUSING_UNIVER_EDITOR", Uu = "FOCUSING_EDITOR_INPUT_FORMULA", Tu = "FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE";
6143
+ var gi = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, Ri = (t, e, s, n) => {
6144
+ for (var r = n > 1 ? void 0 : n ? Ei(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6133
6145
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6134
- return n && r && ai(e, s, r), r;
6146
+ return n && r && gi(e, s, r), r;
6135
6147
  }, pe = (t, e) => (s, n) => e(s, n, t);
6136
6148
  const Q = G("univer.current");
6137
- let te = class extends T {
6149
+ let ee = class extends T {
6138
6150
  constructor(e, s) {
6139
6151
  super();
6140
6152
  d(this, "_unitsByType", /* @__PURE__ */ new Map());
@@ -6142,9 +6154,9 @@ let te = class extends T {
6142
6154
  d(this, "_ctorByType", /* @__PURE__ */ new Map());
6143
6155
  d(this, "_currentUnits$", new q({}));
6144
6156
  d(this, "currentUnits$", this._currentUnits$.asObservable());
6145
- d(this, "_unitAdded$", new W());
6157
+ d(this, "_unitAdded$", new H());
6146
6158
  d(this, "unitAdded$", this._unitAdded$.asObservable());
6147
- d(this, "_unitDisposed$", new W());
6159
+ d(this, "_unitDisposed$", new H());
6148
6160
  d(this, "unitDisposed$", this._unitDisposed$.asObservable());
6149
6161
  d(this, "_focused$", new q(null));
6150
6162
  d(this, "focused$", this._focused$.asObservable());
@@ -6167,10 +6179,10 @@ let te = class extends T {
6167
6179
  };
6168
6180
  }
6169
6181
  getCurrentTypeOfUnit$(e) {
6170
- return this.currentUnits$.pipe(bs((s) => {
6182
+ return this.currentUnits$.pipe(Us((s) => {
6171
6183
  var n;
6172
6184
  return (n = s[e]) != null ? n : null;
6173
- }), vs());
6185
+ }), Ts());
6174
6186
  }
6175
6187
  getCurrentUnitForType(e) {
6176
6188
  return this._currentUnits$.getValue()[e];
@@ -6182,14 +6194,14 @@ let te = class extends T {
6182
6194
  this._currentUnits$.next({ ...this._currentUnits$.getValue(), [s[1]]: s[0] });
6183
6195
  }
6184
6196
  getTypeOfUnitAdded$(e) {
6185
- return this._unitAdded$.pipe(zt((s) => s.type === e));
6197
+ return this._unitAdded$.pipe(Xt((s) => s.type === e));
6186
6198
  }
6187
6199
  __addUnit(e) {
6188
6200
  const s = e.type;
6189
- this._unitsByType.has(s) || this._unitsByType.set(s, []), this._unitsByType.get(s).push(e), this._unitAdded$.next(e), this._currentUnits$.next({ ...this._currentUnits$.getValue(), [s]: e });
6201
+ this._unitsByType.has(s) || this._unitsByType.set(s, []), this._unitsByType.get(s).push(e), this._currentUnits$.next({ ...this._currentUnits$.getValue(), [s]: e }), this._unitAdded$.next(e);
6190
6202
  }
6191
6203
  getTypeOfUnitDisposed$(e) {
6192
- return this.unitDisposed$.pipe(zt((s) => s.type === e));
6204
+ return this.unitDisposed$.pipe(Xt((s) => s.type === e));
6193
6205
  }
6194
6206
  getUnit(e, s) {
6195
6207
  var r;
@@ -6223,7 +6235,7 @@ let te = class extends T {
6223
6235
  return e ? (s = this._getUnitById(e)) == null ? void 0 : s[0] : null;
6224
6236
  }
6225
6237
  focusUnit(e) {
6226
- this._focused$.next(e), this.focused instanceof Ut ? (this._contextService.setContextValue($t, !1), this._contextService.setContextValue(Ot, !0), this._contextService.setContextValue(Vt, !1)) : this.focused instanceof ot ? (this._contextService.setContextValue($t, !0), this._contextService.setContextValue(Ot, !1), this._contextService.setContextValue(Vt, !1)) : this.focused instanceof ds && (this._contextService.setContextValue($t, !1), this._contextService.setContextValue(Ot, !1), this._contextService.setContextValue(Vt, !0));
6238
+ this._focused$.next(e), this.focused instanceof Ut ? (this._contextService.setContextValue(Vt, !1), this._contextService.setContextValue(Ot, !0), this._contextService.setContextValue(jt, !1)) : this.focused instanceof ot ? (this._contextService.setContextValue(Vt, !0), this._contextService.setContextValue(Ot, !1), this._contextService.setContextValue(jt, !1)) : this.focused instanceof ds && (this._contextService.setContextValue(Vt, !1), this._contextService.setContextValue(Ot, !1), this._contextService.setContextValue(jt, !0));
6227
6239
  }
6228
6240
  getFocusedUnit() {
6229
6241
  return this.focused;
@@ -6249,12 +6261,12 @@ let te = class extends T {
6249
6261
  }
6250
6262
  }
6251
6263
  };
6252
- te = ci([
6253
- pe(0, x(tt)),
6264
+ ee = Ri([
6265
+ pe(0, P(tt)),
6254
6266
  pe(1, pt)
6255
- ], te);
6256
- var w = /* @__PURE__ */ ((t) => (t[t.Starting = 0] = "Starting", t[t.Ready = 1] = "Ready", t[t.Rendered = 2] = "Rendered", t[t.Steady = 3] = "Steady", t))(w || {});
6257
- const hi = {
6267
+ ], ee);
6268
+ var S = /* @__PURE__ */ ((t) => (t[t.Starting = 0] = "Starting", t[t.Ready = 1] = "Ready", t[t.Rendered = 2] = "Rendered", t[t.Steady = 3] = "Steady", t))(S || {});
6269
+ const mi = {
6258
6270
  0: "Starting",
6259
6271
  1: "Ready",
6260
6272
  2: "Rendered",
@@ -6268,18 +6280,18 @@ function _s(t, e) {
6268
6280
  function fs(t, e) {
6269
6281
  At.has(t) || At.set(t, []), At.get(t).push(e);
6270
6282
  }
6271
- var di = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, gs = (t, e, s, n) => {
6272
- for (var r = n > 1 ? void 0 : n ? _i(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6283
+ var Ci = Object.defineProperty, Oi = Object.getOwnPropertyDescriptor, gs = (t, e, s, n) => {
6284
+ for (var r = n > 1 ? void 0 : n ? Oi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6273
6285
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6274
- return n && r && di(e, s, r), r;
6275
- }, ee = (t, e) => (s, n) => e(s, n, t);
6286
+ return n && r && Ci(e, s, r), r;
6287
+ }, se = (t, e) => (s, n) => e(s, n, t);
6276
6288
  let y = class extends T {
6277
6289
  constructor(e) {
6278
6290
  super();
6279
- d(this, "_lifecycle$", new q(w.Starting));
6291
+ d(this, "_lifecycle$", new q(S.Starting));
6280
6292
  d(this, "lifecycle$", this._lifecycle$.asObservable());
6281
6293
  d(this, "_lock", !1);
6282
- this._logService = e, this._reportProgress(w.Starting);
6294
+ this._logService = e, this._reportProgress(S.Starting);
6283
6295
  }
6284
6296
  get stage() {
6285
6297
  return this._lifecycle$.getValue();
@@ -6302,14 +6314,18 @@ let y = class extends T {
6302
6314
  * @returns
6303
6315
  */
6304
6316
  subscribeWithPrevious() {
6305
- return new re((e) => (this.stage === w.Starting || (this.stage === w.Ready ? e.next(w.Starting) : this.stage === w.Rendered ? (e.next(w.Starting), e.next(w.Ready)) : (e.next(w.Starting), e.next(w.Ready), e.next(w.Rendered))), this._lifecycle$.subscribe(e)));
6317
+ return new ie((e) => {
6318
+ this.stage === S.Starting || (this.stage === S.Ready ? e.next(S.Starting) : this.stage === S.Rendered ? (e.next(S.Starting), e.next(S.Ready)) : (e.next(S.Starting), e.next(S.Ready), e.next(S.Rendered))), this._lifecycle$.subscribe((s) => {
6319
+ e.next(s), s === S.Steady && e.complete();
6320
+ });
6321
+ });
6306
6322
  }
6307
6323
  _reportProgress(e) {
6308
- this._logService.debug("[LifecycleService]", `lifecycle progressed to "${hi[e]}".`);
6324
+ this._logService.debug("[LifecycleService]", `lifecycle progressed to "${mi[e]}".`);
6309
6325
  }
6310
6326
  };
6311
6327
  y = gs([
6312
- ee(0, et)
6328
+ se(0, et)
6313
6329
  ], y);
6314
6330
  let Tt = class extends T {
6315
6331
  constructor(e, s) {
@@ -6325,15 +6341,15 @@ let Tt = class extends T {
6325
6341
  }
6326
6342
  };
6327
6343
  Tt = gs([
6328
- ee(0, x(y)),
6329
- ee(1, x(tt))
6344
+ se(0, P(y)),
6345
+ se(1, P(tt))
6330
6346
  ], Tt);
6331
6347
  class It extends T {
6332
6348
  constructor() {
6333
6349
  super();
6334
6350
  d(this, "_currentLocale", ut.ZH_CN);
6335
6351
  d(this, "_locales", null);
6336
- d(this, "localeChanged$", new W());
6352
+ d(this, "localeChanged$", new H());
6337
6353
  /**
6338
6354
  * Translate a key to the current locale
6339
6355
  *
@@ -6402,11 +6418,11 @@ class It extends T {
6402
6418
  }
6403
6419
  }
6404
6420
  const ge = G("resource-manager-service");
6405
- var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, Ei = (t, e, s, n) => {
6406
- for (var r = n > 1 ? void 0 : n ? gi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6421
+ var Ai = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ni = (t, e, s, n) => {
6422
+ for (var r = n > 1 ? void 0 : n ? Ii(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6407
6423
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6408
- return n && r && fi(e, s, r), r;
6409
- }, Pe = (t, e) => (s, n) => e(s, n, t);
6424
+ return n && r && Ai(e, s, r), r;
6425
+ }, xe = (t, e) => (s, n) => e(s, n, t);
6410
6426
  const Es = G("univer.permission-service");
6411
6427
  let Nt = class extends T {
6412
6428
  constructor(e, s) {
@@ -6489,9 +6505,9 @@ let Nt = class extends T {
6489
6505
  throw new Error(`${i} permissionPoint is not exist`);
6490
6506
  return o.asObservable();
6491
6507
  });
6492
- return Us(r).pipe(
6508
+ return Ms(r).pipe(
6493
6509
  // Check that all permissions exist
6494
- Ts((i) => (i.every((o) => this._permissionPointMap.get(o.id)), i))
6510
+ Hs((i) => (i.every((o) => this._permissionPointMap.get(o.id)), i))
6495
6511
  );
6496
6512
  }
6497
6513
  composePermission(e, s) {
@@ -6504,57 +6520,57 @@ let Nt = class extends T {
6504
6520
  });
6505
6521
  }
6506
6522
  };
6507
- Nt = Ei([
6508
- _s(w.Starting, Nt),
6509
- Pe(0, x(ge)),
6510
- Pe(1, x(Q))
6523
+ Nt = Ni([
6524
+ _s(S.Starting, Nt),
6525
+ xe(0, P(ge)),
6526
+ xe(1, P(Q))
6511
6527
  ], Nt);
6512
- const Ri = "univer.editable";
6513
- class jt extends nr {
6528
+ const wi = "univer.editable";
6529
+ class Kt extends lr {
6514
6530
  constructor(s) {
6515
6531
  super();
6516
- d(this, "id", Ri);
6532
+ d(this, "id", wi);
6517
6533
  d(this, "value", !0);
6518
6534
  d(this, "unitID");
6519
6535
  this.unitID = s;
6520
6536
  }
6521
6537
  }
6522
- var mi = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Oi = (t, e, s, n) => {
6523
- for (var r = n > 1 ? void 0 : n ? Ci(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6538
+ var Si = Object.defineProperty, Li = Object.getOwnPropertyDescriptor, bi = (t, e, s, n) => {
6539
+ for (var r = n > 1 ? void 0 : n ? Li(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6524
6540
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6525
- return n && r && mi(e, s, r), r;
6526
- }, xe = (t, e) => (s, n) => e(s, n, t);
6527
- let St = class extends T {
6541
+ return n && r && Si(e, s, r), r;
6542
+ }, Pe = (t, e) => (s, n) => e(s, n, t);
6543
+ let wt = class extends T {
6528
6544
  constructor(t, e) {
6529
6545
  super(), this._permissionService = t, this._univerInstanceService = e, this._init();
6530
6546
  }
6531
6547
  _init() {
6532
6548
  this._univerInstanceService.getTypeOfUnitAdded$(O.UNIVER_SHEET).subscribe((t) => {
6533
- const e = new jt(t.getUnitId());
6549
+ const e = new Kt(t.getUnitId());
6534
6550
  this._permissionService.addPermissionPoint(t.getUnitId(), e);
6535
6551
  });
6536
6552
  }
6537
6553
  getEditable(t = ((e) => (e = this._univerInstanceService.getCurrentUnitForType(O.UNIVER_SHEET)) == null ? void 0 : e.getUnitId())()) {
6538
6554
  if (!t)
6539
6555
  return;
6540
- const s = new jt(t), n = this._permissionService.getPermissionPoint(t, s.id);
6556
+ const s = new Kt(t), n = this._permissionService.getPermissionPoint(t, s.id);
6541
6557
  return n == null ? void 0 : n.value;
6542
6558
  }
6543
6559
  setEditable(t, e) {
6544
- const s = new jt(t);
6560
+ const s = new Kt(t);
6545
6561
  this._permissionService.updatePermissionPoint(t, s.id, e);
6546
6562
  }
6547
6563
  };
6548
- St = Oi([
6549
- _s(w.Starting, St),
6550
- xe(0, x(Es)),
6551
- xe(1, x(Q))
6552
- ], St);
6553
- class Ai extends T {
6564
+ wt = bi([
6565
+ _s(S.Starting, wt),
6566
+ Pe(0, P(Es)),
6567
+ Pe(1, P(Q))
6568
+ ], wt);
6569
+ class vi extends T {
6554
6570
  constructor() {
6555
6571
  super(...arguments);
6556
6572
  d(this, "_resourceMap", /* @__PURE__ */ new Map());
6557
- d(this, "_register$", new W());
6573
+ d(this, "_register$", new H());
6558
6574
  d(this, "register$", this._register$.asObservable());
6559
6575
  }
6560
6576
  getAllResourceHooks() {
@@ -6600,12 +6616,12 @@ class Ai extends T {
6600
6616
  this._register$.complete(), this._resourceMap.clear();
6601
6617
  }
6602
6618
  }
6603
- var Ii = Object.defineProperty, Ni = Object.getOwnPropertyDescriptor, Si = (t, e, s, n) => {
6604
- for (var r = n > 1 ? void 0 : n ? Ni(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6619
+ var Ui = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, Mi = (t, e, s, n) => {
6620
+ for (var r = n > 1 ? void 0 : n ? Ti(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6605
6621
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6606
- return n && r && Ii(e, s, r), r;
6622
+ return n && r && Ui(e, s, r), r;
6607
6623
  }, He = (t, e) => (s, n) => e(s, n, t);
6608
- let se = class extends T {
6624
+ let ne = class extends T {
6609
6625
  constructor(e, s) {
6610
6626
  super();
6611
6627
  d(this, "saveWorkbook", (e) => {
@@ -6656,12 +6672,12 @@ let se = class extends T {
6656
6672
  );
6657
6673
  }
6658
6674
  };
6659
- se = Si([
6660
- He(0, x(ge)),
6661
- He(1, x(Q))
6662
- ], se);
6675
+ ne = Mi([
6676
+ He(0, P(ge)),
6677
+ He(1, P(Q))
6678
+ ], ne);
6663
6679
  const Rs = G("resource-loader-service");
6664
- fs(w.Ready, Rs);
6680
+ fs(S.Ready, Rs);
6665
6681
  class ms extends T {
6666
6682
  constructor() {
6667
6683
  super();
@@ -6679,20 +6695,20 @@ class ms extends T {
6679
6695
  this._currentTheme = s, this._currentTheme$.next(s);
6680
6696
  }
6681
6697
  }
6682
- const wi = "__defaultDocumentNormalEditorSpecialUnitId_20231006__", Li = "__defaultDocumentFormulaBarEditorSpecialUnitId_20231012__", Iu = `\r
6698
+ const Di = "__defaultDocumentNormalEditorSpecialUnitId_20231006__", pi = "__defaultDocumentFormulaBarEditorSpecialUnitId_20231012__", Mu = `\r
6683
6699
  `;
6684
- function Nu(t) {
6700
+ function Du(t) {
6685
6701
  return `__internalEditorId__${t}`;
6686
6702
  }
6687
- function Su(t) {
6703
+ function pu(t) {
6688
6704
  return t.startsWith("__");
6689
6705
  }
6690
- var bi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, Ui = (t, e, s, n) => {
6691
- for (var r = n > 1 ? void 0 : n ? vi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6706
+ var xi = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, Hi = (t, e, s, n) => {
6707
+ for (var r = n > 1 ? void 0 : n ? Pi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6692
6708
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6693
- return n && r && bi(e, s, r), r;
6694
- }, Kt = (t, e) => (s, n) => e(s, n, t);
6695
- const Ee = G("univer.undo-redo.service"), Ti = 20;
6709
+ return n && r && xi(e, s, r), r;
6710
+ }, Yt = (t, e) => (s, n) => e(s, n, t);
6711
+ const Ee = G("univer.undo-redo.service"), Fi = 20;
6696
6712
  class Cs {
6697
6713
  dispose() {
6698
6714
  }
@@ -6700,34 +6716,34 @@ class Cs {
6700
6716
  return !1;
6701
6717
  }
6702
6718
  }
6703
- const Mi = "univer.command.redo", Di = "univer.command.undo", pi = new class extends Cs {
6719
+ const Wi = "univer.command.redo", Gi = "univer.command.undo", Bi = new class extends Cs {
6704
6720
  constructor() {
6705
6721
  super(...arguments);
6706
- d(this, "type", fe.COMMAND);
6707
- d(this, "id", Di);
6722
+ d(this, "type", xt.COMMAND);
6723
+ d(this, "id", Gi);
6708
6724
  }
6709
6725
  async handler(e) {
6710
6726
  const s = e.get(Ee), n = s.pitchTopUndoElement();
6711
6727
  if (!n)
6712
6728
  return !1;
6713
6729
  const r = e.get(Pt);
6714
- return hs(n.undoMutations, r) ? (s.popUndoToRedo(), !0) : !1;
6730
+ return Je(n.undoMutations, r) ? (s.popUndoToRedo(), !0) : !1;
6715
6731
  }
6716
- }(), Pi = new class extends Cs {
6732
+ }(), $i = new class extends Cs {
6717
6733
  constructor() {
6718
6734
  super(...arguments);
6719
- d(this, "type", fe.COMMAND);
6720
- d(this, "id", Mi);
6735
+ d(this, "type", xt.COMMAND);
6736
+ d(this, "id", Wi);
6721
6737
  }
6722
6738
  async handler(e) {
6723
6739
  const s = e.get(Ee), n = s.pitchTopRedoElement();
6724
6740
  if (!n)
6725
6741
  return !1;
6726
6742
  const r = e.get(Pt);
6727
- return hs(n.redoMutations, r) ? (s.popRedoToUndo(), !0) : !1;
6743
+ return Je(n.redoMutations, r) ? (s.popRedoToUndo(), !0) : !1;
6728
6744
  }
6729
6745
  }();
6730
- let ne = class extends T {
6746
+ let re = class extends T {
6731
6747
  constructor(e, s, n) {
6732
6748
  super();
6733
6749
  d(this, "undoRedoStatus$");
@@ -6736,7 +6752,7 @@ let ne = class extends T {
6736
6752
  d(this, "_undoStacks", /* @__PURE__ */ new Map());
6737
6753
  d(this, "_redoStacks", /* @__PURE__ */ new Map());
6738
6754
  d(this, "_batchingStatus", /* @__PURE__ */ new Map());
6739
- this._univerInstanceService = e, this._commandService = s, this._contextService = n, this.undoRedoStatus$ = this._undoRedoStatus$.asObservable(), this.disposeWithMe(this._commandService.registerCommand(pi)), this.disposeWithMe(this._commandService.registerCommand(Pi)), this.disposeWithMe(b(() => this._undoRedoStatus$.complete())), this.disposeWithMe(b(this._univerInstanceService.focused$.subscribe(() => this._updateStatus())));
6755
+ this._univerInstanceService = e, this._commandService = s, this._contextService = n, this.undoRedoStatus$ = this._undoRedoStatus$.asObservable(), this.disposeWithMe(this._commandService.registerCommand(Bi)), this.disposeWithMe(this._commandService.registerCommand($i)), this.disposeWithMe(b(() => this._undoRedoStatus$.complete())), this.disposeWithMe(b(this._univerInstanceService.focused$.subscribe(() => this._updateStatus())));
6740
6756
  }
6741
6757
  pushUndoRedo(e) {
6742
6758
  const { unitID: s } = e, n = this._getRedoStack(s, !0), r = this._getUndoStack(s, !0);
@@ -6750,7 +6766,7 @@ let ne = class extends T {
6750
6766
  } else
6751
6767
  i(e);
6752
6768
  function i(o) {
6753
- r.push(o), r.length > Ti && r.splice(0, 1);
6769
+ r.push(o), r.length > Fi && r.splice(0, 1);
6754
6770
  }
6755
6771
  this._updateStatus();
6756
6772
  }
@@ -6827,17 +6843,16 @@ let ne = class extends T {
6827
6843
  _getFocusedUnitId() {
6828
6844
  var i, o, u, a;
6829
6845
  let e = "";
6830
- const s = this._contextService.getContextValue(Ot), n = this._contextService.getContextValue(ui), r = this._contextService.getContextValue(oi);
6831
- return s ? n ? e = Li : r ? e = wi : e = (o = (i = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : i.getUnitId()) != null ? o : "" : e = (a = (u = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : u.getUnitId()) != null ? a : "", e;
6846
+ const s = this._contextService.getContextValue(Ot), n = this._contextService.getContextValue(fi), r = this._contextService.getContextValue(_i);
6847
+ return s ? n ? e = pi : r ? e = Di : e = (o = (i = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : i.getUnitId()) != null ? o : "" : e = (a = (u = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : u.getUnitId()) != null ? a : "", e;
6832
6848
  }
6833
6849
  };
6834
- ne = Ui([
6835
- Kt(0, Q),
6836
- Kt(1, Pt),
6837
- Kt(2, pt)
6838
- ], ne);
6850
+ re = Hi([
6851
+ Yt(0, Q),
6852
+ Yt(1, Pt),
6853
+ Yt(2, pt)
6854
+ ], re);
6839
6855
  class Fe extends T {
6840
- // eslint-disable-next-line unused-imports/no-unused-vars
6841
6856
  onStarting(e) {
6842
6857
  }
6843
6858
  onReady() {
@@ -6854,7 +6869,7 @@ class Fe extends T {
6854
6869
  }
6855
6870
  }
6856
6871
  d(Fe, "pluginName"), d(Fe, "type", O.UNIVER_UNKNOWN);
6857
- class xi {
6872
+ class ki {
6858
6873
  constructor() {
6859
6874
  d(this, "_plugins", []);
6860
6875
  }
@@ -6869,7 +6884,7 @@ class xi {
6869
6884
  this._plugins.forEach(e);
6870
6885
  }
6871
6886
  }
6872
- class Hi {
6887
+ class Vi {
6873
6888
  constructor() {
6874
6889
  d(this, "_pluginsRegistered", []);
6875
6890
  }
@@ -6884,18 +6899,18 @@ class Hi {
6884
6899
  this._pluginsRegistered = [];
6885
6900
  }
6886
6901
  }
6887
- var Fi = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, Gi = (t, e, s, n) => {
6888
- for (var r = n > 1 ? void 0 : n ? Wi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6902
+ var ji = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, Yi = (t, e, s, n) => {
6903
+ for (var r = n > 1 ? void 0 : n ? Ki(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6889
6904
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6890
- return n && r && Fi(e, s, r), r;
6905
+ return n && r && ji(e, s, r), r;
6891
6906
  }, mt = (t, e) => (s, n) => e(s, n, t);
6892
6907
  let Mt = class extends T {
6893
6908
  constructor(e, s, n, r) {
6894
6909
  super();
6895
6910
  d(this, "_started", !1);
6896
6911
  d(this, "_pluginRegistered", /* @__PURE__ */ new Set());
6897
- d(this, "_pluginStore", new xi());
6898
- d(this, "_pluginRegistry", new Hi());
6912
+ d(this, "_pluginStore", new ki());
6913
+ d(this, "_pluginRegistry", new Vi());
6899
6914
  this._logService = e, this._injector = s, this._lifecycleService = n, this._lifecycleInitializerService = r;
6900
6915
  }
6901
6916
  get started() {
@@ -6920,23 +6935,25 @@ let Mt = class extends T {
6920
6935
  return;
6921
6936
  const e = this._pluginRegistry.getRegisterPlugins().map(({ plugin: n, options: r }) => this._initPlugin(n, r));
6922
6937
  this._pluginRegistry.removePlugins();
6923
- const s = this.disposeWithMe(this._lifecycleService.subscribeWithPrevious().subscribe((n) => {
6924
- this._pluginsRunLifecycle(e, n), n === w.Steady && s.dispose();
6938
+ const s = this.disposeWithMe(this._lifecycleService.subscribeWithPrevious().pipe(Ds(() => {
6939
+ Promise.resolve().then(() => s.dispose());
6940
+ })).subscribe((n) => {
6941
+ this._pluginsRunLifecycle(e, n);
6925
6942
  }));
6926
6943
  }
6927
6944
  _pluginsRunLifecycle(e, s) {
6928
6945
  e.forEach((n) => {
6929
6946
  switch (s) {
6930
- case w.Starting:
6947
+ case S.Starting:
6931
6948
  n.onStarting(this._injector);
6932
6949
  break;
6933
- case w.Ready:
6950
+ case S.Ready:
6934
6951
  n.onReady();
6935
6952
  break;
6936
- case w.Rendered:
6953
+ case S.Rendered:
6937
6954
  n.onRendered();
6938
6955
  break;
6939
- case w.Steady:
6956
+ case S.Steady:
6940
6957
  n.onSteady();
6941
6958
  break;
6942
6959
  }
@@ -6946,18 +6963,18 @@ let Mt = class extends T {
6946
6963
  return this._injector.createInstance(e, s);
6947
6964
  }
6948
6965
  };
6949
- Mt = Gi([
6966
+ Mt = Yi([
6950
6967
  mt(0, et),
6951
- mt(1, x(tt)),
6952
- mt(2, x(y)),
6953
- mt(3, x(Tt))
6968
+ mt(1, P(tt)),
6969
+ mt(2, P(y)),
6970
+ mt(3, P(Tt))
6954
6971
  ], Mt);
6955
- var Bi = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, $i = (t, e, s, n) => {
6956
- for (var r = n > 1 ? void 0 : n ? ki(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6972
+ var zi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, Ji = (t, e, s, n) => {
6973
+ for (var r = n > 1 ? void 0 : n ? Xi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6957
6974
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6958
- return n && r && Bi(e, s, r), r;
6959
- }, Vi = (t, e) => (s, n) => e(s, n, t);
6960
- const ji = 4;
6975
+ return n && r && zi(e, s, r), r;
6976
+ }, qi = (t, e) => (s, n) => e(s, n, t);
6977
+ const Zi = 4;
6961
6978
  let Dt = class {
6962
6979
  constructor(t) {
6963
6980
  d(this, "_pluginHolderForUniver");
@@ -6999,7 +7016,7 @@ let Dt = class {
6999
7016
  () => {
7000
7017
  this._pluginHolderForUniver.started || this._pluginHolderForUniver.start(), this._flushPlugins(), this._clearFlushTimer();
7001
7018
  },
7002
- ji
7019
+ Zi
7003
7020
  ));
7004
7021
  }
7005
7022
  _clearFlushTimer() {
@@ -7011,18 +7028,14 @@ let Dt = class {
7011
7028
  e.started && e.flush();
7012
7029
  }
7013
7030
  };
7014
- Dt = $i([
7015
- Vi(0, x(tt))
7031
+ Dt = Ji([
7032
+ qi(0, P(tt))
7016
7033
  ], Dt);
7017
- function Ki(t, e) {
7034
+ function Qi(t, e) {
7018
7035
  if (!e)
7019
7036
  return t;
7020
7037
  const s = [];
7021
7038
  for (const n of t) {
7022
- if (n.length === 1) {
7023
- s.push(n);
7024
- continue;
7025
- }
7026
7039
  const r = e.find(([i]) => i === n[0]);
7027
7040
  if (r) {
7028
7041
  if (r[1] === null)
@@ -7033,7 +7046,30 @@ function Ki(t, e) {
7033
7046
  }
7034
7047
  return s;
7035
7048
  }
7036
- class wu {
7049
+ class yi {
7050
+ constructor() {
7051
+ d(this, "_model", /* @__PURE__ */ new Map());
7052
+ d(this, "_userChange$", new H());
7053
+ d(this, "userChange$", this._userChange$.asObservable());
7054
+ }
7055
+ addUser(e) {
7056
+ this._model.set(e.userID, e), this._userChange$.next({ type: "add", user: e });
7057
+ }
7058
+ getUser(e, s) {
7059
+ const n = this._model.get(e);
7060
+ if (n)
7061
+ return n;
7062
+ s && s();
7063
+ }
7064
+ delete(e) {
7065
+ const s = this.getUser(e);
7066
+ this._model.delete(e), s && this._userChange$.next({ type: "delete", user: s });
7067
+ }
7068
+ clear() {
7069
+ this._model.clear(), this._userChange$.next({ type: "clear" });
7070
+ }
7071
+ }
7072
+ class xu {
7037
7073
  /**
7038
7074
  * Create a Univer instance.
7039
7075
  * @param config Configuration data for Univer
@@ -7042,7 +7078,7 @@ class wu {
7042
7078
  constructor(e = {}, s) {
7043
7079
  d(this, "_startedTypes", /* @__PURE__ */ new Set());
7044
7080
  d(this, "_injector");
7045
- const n = this._injector = Yi(s, e == null ? void 0 : e.override), { theme: r, locale: i, locales: o, logLevel: u } = e;
7081
+ const n = this._injector = to(s, e == null ? void 0 : e.override), { theme: r, locale: i, locales: o, logLevel: u } = e;
7046
7082
  r && this._injector.get(ms).setTheme(r), o && this._injector.get(It).load(o), i && this._injector.get(It).setLocale(i), u && this._injector.get(et).setLogLevel(u), this._init(n), this._pluginService;
7047
7083
  }
7048
7084
  get _univerInstanceService() {
@@ -7099,41 +7135,42 @@ class wu {
7099
7135
  );
7100
7136
  }
7101
7137
  _tryProgressToReady() {
7102
- this._injector.get(y).stage < w.Ready && (this._injector.get(y).stage = w.Ready);
7138
+ this._injector.get(y).stage < S.Ready && (this._injector.get(y).stage = S.Ready);
7103
7139
  }
7104
7140
  /** Register a plugin into univer. */
7105
7141
  registerPlugin(e, s) {
7106
7142
  this._pluginService.registerPlugin(e, s);
7107
7143
  }
7108
7144
  }
7109
- function Yi(t, e) {
7110
- const s = Ki([
7111
- [Br],
7145
+ function to(t, e) {
7146
+ const s = Qi([
7147
+ [zr],
7112
7148
  [It],
7113
7149
  [ms],
7114
7150
  [y],
7115
7151
  [Tt],
7116
- [St],
7152
+ [wt],
7117
7153
  [Dt],
7154
+ [yi],
7118
7155
  // abstract services
7119
- [Q, { useClass: te }],
7156
+ [Q, { useClass: ee }],
7120
7157
  [Es, { useClass: Nt }],
7121
- [et, { useClass: Mr, lazy: !0 }],
7158
+ [et, { useClass: Ar, lazy: !0 }],
7122
7159
  [Pt, { useClass: yt, lazy: !0 }],
7123
- [Ee, { useClass: ne, lazy: !0 }],
7124
- [Wr, { useClass: Gr }],
7125
- [pt, { useClass: Ur }],
7126
- [$r, { useClass: kr, lazy: !0 }],
7127
- [ge, { useClass: Ai, lazy: !0 }],
7128
- [Rs, { useClass: se, lazy: !0 }]
7160
+ [Ee, { useClass: re, lazy: !0 }],
7161
+ [Kr, { useClass: Yr }],
7162
+ [pt, { useClass: Cr }],
7163
+ [Jr, { useClass: Xr, lazy: !0 }],
7164
+ [ge, { useClass: vi, lazy: !0 }],
7165
+ [Rs, { useClass: ne, lazy: !0 }]
7129
7166
  ], e);
7130
7167
  return t ? t.createChild(s) : new tt(s);
7131
7168
  }
7132
- const Lu = (t, e) => e.length === t.length && !t.some((s) => e.some((n) => !Z.equals(n, s))), bu = (t, e) => e.length === t.length && t.every((s, n) => {
7169
+ const Pu = (t, e) => e.length === t.length && !t.some((s) => e.some((n) => !Z.equals(n, s))), Hu = (t, e) => e.length === t.length && t.every((s, n) => {
7133
7170
  const r = e[n];
7134
7171
  return r.unitId === s.unitId && r.sheetId === s.sheetId && Z.equals(s.range, r.range);
7135
7172
  });
7136
- function vu(t, e) {
7173
+ function Fu(t, e) {
7137
7174
  if (Object.is(t, e))
7138
7175
  return !0;
7139
7176
  if (typeof t != "object" || !t || typeof e != "object" || !e)
@@ -7152,19 +7189,19 @@ function vu(t, e) {
7152
7189
  }
7153
7190
  return !0;
7154
7191
  }
7155
- function zi(t) {
7192
+ function eo(t) {
7156
7193
  return /^-?\d+(\.\d+)?$/.test(t);
7157
7194
  }
7158
- function Uu(t) {
7159
- return zi(t) ? Number(t) <= Number.MAX_SAFE_INTEGER : !1;
7195
+ function Wu(t) {
7196
+ return eo(t) ? Number(t) <= Number.MAX_SAFE_INTEGER : !1;
7160
7197
  }
7161
- function Tu(t) {
7198
+ function Gu(t) {
7162
7199
  return ["true", "false"].includes(t.toLowerCase());
7163
7200
  }
7164
- function Mu(t, e) {
7201
+ function Bu(t, e) {
7165
7202
  return e.forEach((s) => t.add(s)), t;
7166
7203
  }
7167
- function Du(t, e = 16) {
7204
+ function $u(t, e = 16) {
7168
7205
  let s = 0, n = null;
7169
7206
  return function(...i) {
7170
7207
  const o = Date.now();
@@ -7173,7 +7210,7 @@ function Du(t, e = 16) {
7173
7210
  }, e)) : (s = o, t.apply(this, i));
7174
7211
  };
7175
7212
  }
7176
- function pu(t) {
7213
+ function ku(t) {
7177
7214
  const e = new MessageChannel();
7178
7215
  let s = !1;
7179
7216
  return e.port1.onmessage = () => {
@@ -7182,7 +7219,7 @@ function pu(t) {
7182
7219
  s = !0;
7183
7220
  };
7184
7221
  }
7185
- var Xi = /* @__PURE__ */ ((t) => (t[t.TEXT = 0] = "TEXT", t[t.ARROW = 1] = "ARROW", t[t.CUSTOM = 2] = "CUSTOM", t))(Xi || {});
7222
+ var so = /* @__PURE__ */ ((t) => (t[t.TEXT = 0] = "TEXT", t[t.ARROW = 1] = "ARROW", t[t.CUSTOM = 2] = "CUSTOM", t))(so || {});
7186
7223
  class We {
7187
7224
  constructor(e) {
7188
7225
  d(this, "_index", 0);
@@ -7203,7 +7240,7 @@ class We {
7203
7240
  }) : R.deepClone({
7204
7241
  ...s,
7205
7242
  len: e,
7206
- body: ls(s.body, n, n + e)
7243
+ body: cs(s.body, n, n + e)
7207
7244
  });
7208
7245
  } else
7209
7246
  return {
@@ -7251,10 +7288,10 @@ class Re {
7251
7288
  const o = Math.min(n.peekLength(), r.peekLength()), u = n.next(o), a = r.next(o);
7252
7289
  u.t === A.INSERT && a.t === A.RETAIN ? a.body == null ? i.push(u) : i.push({
7253
7290
  ...u,
7254
- body: Me(u.body, a.body, a.coverType)
7291
+ body: De(u.body, a.body, a.coverType)
7255
7292
  }) : u.t === A.RETAIN && a.t === A.RETAIN ? u.body == null && a.body == null ? i.push(u.len !== Number.POSITIVE_INFINITY ? u : a) : u.body && a.body ? i.push({
7256
7293
  ...u,
7257
- body: Me(u.body, a.body, a.coverType)
7294
+ body: De(u.body, a.body, a.coverType)
7258
7295
  }) : i.push(u.body ? u : a) : u.t === A.RETAIN && a.t === A.DELETE ? i.push(a) : u.t === A.INSERT && (a.t, A.DELETE);
7259
7296
  }
7260
7297
  return i.trimEndUselessRetainAction(), i.serialize();
@@ -7315,12 +7352,12 @@ class Re {
7315
7352
  }
7316
7353
  trimEndUselessRetainAction() {
7317
7354
  let e = this._actions[this._actions.length - 1];
7318
- for (; e && e.t === A.RETAIN && Sr(e); )
7355
+ for (; e && e.t === A.RETAIN && kr(e); )
7319
7356
  this._actions.pop(), e = this._actions[this._actions.length - 1];
7320
7357
  return this;
7321
7358
  }
7322
7359
  }
7323
- function Pu(t, e, s) {
7360
+ function Vu(t, e, s) {
7324
7361
  if (e === "")
7325
7362
  return t;
7326
7363
  const n = {
@@ -7348,7 +7385,7 @@ function Pu(t, e, s) {
7348
7385
  const u = r.getBody();
7349
7386
  return r.dispose(), u;
7350
7387
  }
7351
- class xu extends le {
7388
+ class ju extends ce {
7352
7389
  /**
7353
7390
  * Create a new WorkBookObserver with the specified callback
7354
7391
  * @param callback the callback that will be executed for that WorkBookObserver
@@ -7359,7 +7396,7 @@ class xu extends le {
7359
7396
  add(e) {
7360
7397
  if (!e)
7361
7398
  return null;
7362
- const s = new ae(e, this);
7399
+ const s = new le(e, this);
7363
7400
  return this._observers = [s], this._onObserverAdded && this._onObserverAdded(s), s;
7364
7401
  }
7365
7402
  makeObserverTopPriority() {
@@ -7367,17 +7404,11 @@ class xu extends le {
7367
7404
  makeObserverBottomPriority() {
7368
7405
  }
7369
7406
  }
7370
- const Hu = G("ILocalStorageService");
7371
- function Fu(t) {
7372
- return new re((e) => {
7373
- const s = t((...n) => e.next(n));
7374
- return () => s == null ? void 0 : s.dispose();
7375
- });
7376
- }
7377
- function Wu(t) {
7407
+ const Ku = G("ILocalStorageService");
7408
+ function Yu(t) {
7378
7409
  return `sheet_interceptor_${t}`;
7379
7410
  }
7380
- const Ji = (t) => function(e, s) {
7411
+ const no = (t) => function(e, s) {
7381
7412
  let n = -1;
7382
7413
  function r(i, o) {
7383
7414
  if (i <= n)
@@ -7386,7 +7417,7 @@ const Ji = (t) => function(e, s) {
7386
7417
  }
7387
7418
  return r(0, e);
7388
7419
  };
7389
- class Gu {
7420
+ class zu {
7390
7421
  constructor(e) {
7391
7422
  d(this, "_interceptorsByName", /* @__PURE__ */ new Map());
7392
7423
  d(this, "_interceptorPoints");
@@ -7394,7 +7425,7 @@ class Gu {
7394
7425
  }
7395
7426
  fetchThroughInterceptors(e) {
7396
7427
  const s = e, n = this._interceptorsByName.get(s);
7397
- return Ji(n || []);
7428
+ return no(n || []);
7398
7429
  }
7399
7430
  intercept(e, s) {
7400
7431
  const n = e;
@@ -7407,16 +7438,16 @@ class Gu {
7407
7438
  return ((u = o.priority) != null ? u : 0) - ((a = i.priority) != null ? a : 0);
7408
7439
  })
7409
7440
  // from large to small
7410
- ), () => ce(this._interceptorsByName.get(n), s);
7441
+ ), () => he(this._interceptorsByName.get(n), s);
7411
7442
  }
7412
7443
  getInterceptPoints() {
7413
7444
  return this._interceptorPoints;
7414
7445
  }
7415
7446
  }
7416
- const Bu = G(
7447
+ const Xu = G(
7417
7448
  "univer.snapshot-server-service"
7418
7449
  );
7419
- class ku {
7450
+ class Ju {
7420
7451
  constructor() {
7421
7452
  d(this, "_sheetBlockCache", /* @__PURE__ */ new Map());
7422
7453
  }
@@ -7432,7 +7463,7 @@ class ku {
7432
7463
  },
7433
7464
  changesets: [],
7434
7465
  error: {
7435
- code: F.OK,
7466
+ code: W.OK,
7436
7467
  message: ""
7437
7468
  }
7438
7469
  });
@@ -7443,7 +7474,7 @@ class ku {
7443
7474
  return Promise.resolve({
7444
7475
  block: n,
7445
7476
  error: {
7446
- code: F.OK,
7477
+ code: W.OK,
7447
7478
  message: ""
7448
7479
  }
7449
7480
  });
@@ -7453,7 +7484,7 @@ class ku {
7453
7484
  return Promise.resolve({
7454
7485
  changesets: [],
7455
7486
  error: {
7456
- code: F.OK,
7487
+ code: W.OK,
7457
7488
  message: ""
7458
7489
  }
7459
7490
  });
@@ -7462,7 +7493,7 @@ class ku {
7462
7493
  return Promise.resolve({
7463
7494
  resources: {},
7464
7495
  error: {
7465
- code: F.OK,
7496
+ code: W.OK,
7466
7497
  message: ""
7467
7498
  }
7468
7499
  });
@@ -7471,7 +7502,7 @@ class ku {
7471
7502
  saveSnapshot(e, s) {
7472
7503
  return Promise.resolve({
7473
7504
  error: {
7474
- code: F.OK,
7505
+ code: W.OK,
7475
7506
  message: ""
7476
7507
  }
7477
7508
  });
@@ -7481,13 +7512,13 @@ class ku {
7481
7512
  const { block: n } = s;
7482
7513
  return n ? (this._sheetBlockCache.set(n.id, n), Promise.resolve({
7483
7514
  error: {
7484
- code: F.OK,
7515
+ code: W.OK,
7485
7516
  message: ""
7486
7517
  },
7487
7518
  blockID: n.id
7488
7519
  })) : Promise.resolve({
7489
7520
  error: {
7490
- code: F.UNDEFINED,
7521
+ code: W.UNDEFINED,
7491
7522
  message: "block is required"
7492
7523
  },
7493
7524
  blockID: ""
@@ -7497,14 +7528,14 @@ class ku {
7497
7528
  saveChangeset(e, s) {
7498
7529
  return Promise.resolve({
7499
7530
  error: {
7500
- code: F.OK,
7531
+ code: W.OK,
7501
7532
  message: ""
7502
7533
  },
7503
7534
  concurrent: []
7504
7535
  });
7505
7536
  }
7506
7537
  }
7507
- function $u(t) {
7538
+ function qu(t) {
7508
7539
  return btoa(
7509
7540
  encodeURIComponent(t).replace(/%([0-9A-F]{2})/g, (e, s) => String.fromCharCode(Number.parseInt(s, 16)))
7510
7541
  );
@@ -7514,55 +7545,55 @@ function Os(t) {
7514
7545
  Array.prototype.map.call(atob(t), (e) => `%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")
7515
7546
  );
7516
7547
  }
7517
- const xt = new TextEncoder(), me = new TextDecoder();
7548
+ const Ht = new TextEncoder(), me = new TextDecoder();
7518
7549
  function As(t) {
7519
7550
  const e = R.deepClone(t);
7520
- return delete e.id, delete e.name, delete e.rowCount, delete e.columnCount, delete e.cellData, xt.encode(JSON.stringify(e));
7551
+ return delete e.id, delete e.name, delete e.rowCount, delete e.columnCount, delete e.cellData, Ht.encode(JSON.stringify(e));
7521
7552
  }
7522
7553
  function Is(t) {
7523
7554
  const e = R.deepClone(t);
7524
- return delete e.id, delete e.rev, delete e.name, delete e.sheetOrder, delete e.sheets, xt.encode(JSON.stringify(e));
7555
+ return delete e.id, delete e.rev, delete e.name, delete e.sheetOrder, delete e.sheets, Ht.encode(JSON.stringify(e));
7525
7556
  }
7526
- function qi(t) {
7557
+ function ro(t) {
7527
7558
  const e = R.deepClone(t);
7528
- return delete e.id, delete e.rev, delete e.title, delete e.resources, xt.encode(JSON.stringify(e));
7559
+ return delete e.id, delete e.rev, delete e.title, delete e.resources, Ht.encode(JSON.stringify(e));
7529
7560
  }
7530
7561
  function Be(t) {
7531
7562
  return JSON.parse(me.decode(t));
7532
7563
  }
7533
- function Zi(t) {
7564
+ function io(t) {
7534
7565
  return JSON.parse(typeof t == "string" ? Os(t) : me.decode(t));
7535
7566
  }
7536
- function Qi(t) {
7567
+ function oo(t) {
7537
7568
  return JSON.parse(typeof t == "string" ? Os(t) : me.decode(t));
7538
7569
  }
7539
- const Yt = 256;
7570
+ const zt = 256;
7540
7571
  function Ns(t, e) {
7541
- const s = new $(t), n = s.getLength(), r = [];
7572
+ const s = new k(t), n = s.getLength(), r = [];
7542
7573
  let i = 0;
7543
7574
  for (; i < n; ) {
7544
- const o = Math.min(i + Yt, n - 1), u = s.getSlice(i, Math.min(i + Yt, n - 1), 0, e), a = yi(u);
7575
+ const o = Math.min(i + zt, n - 1), u = s.getSlice(i, Math.min(i + zt, n - 1), 0, e), a = uo(u);
7545
7576
  r.push({
7546
7577
  id: R.generateRandomId(19, "0123456789"),
7547
7578
  // an random ID for client, this would be changed after the block is saved in the server
7548
7579
  startRow: i,
7549
7580
  endRow: o,
7550
7581
  data: a
7551
- }), i += Yt;
7582
+ }), i += zt;
7552
7583
  }
7553
7584
  return r;
7554
7585
  }
7555
- function yi(t) {
7586
+ function uo(t) {
7556
7587
  const e = t.getData();
7557
- return xt.encode(JSON.stringify(e));
7588
+ return Ht.encode(JSON.stringify(e));
7558
7589
  }
7559
- async function Vu(t, e, s, n, r) {
7590
+ async function Zu(t, e, s, n, r) {
7560
7591
  const i = {}, o = {};
7561
7592
  if (!await Promise.all(
7562
7593
  Object.entries(e.sheets).map(async ([h, _]) => {
7563
7594
  const f = {
7564
7595
  id: _.id,
7565
- type: ie.GRID,
7596
+ type: oe.GRID,
7566
7597
  name: _.name,
7567
7598
  rowCount: _.rowCount,
7568
7599
  columnCount: _.columnCount,
@@ -7580,7 +7611,7 @@ async function Vu(t, e, s, n, r) {
7580
7611
  );
7581
7612
  if (E.some((m) => {
7582
7613
  var I;
7583
- return ((I = m.error) == null ? void 0 : I.code) !== F.OK;
7614
+ return ((I = m.error) == null ? void 0 : I.code) !== W.OK;
7584
7615
  }))
7585
7616
  return !1;
7586
7617
  i[h] = {
@@ -7614,14 +7645,14 @@ async function Vu(t, e, s, n, r) {
7614
7645
  }
7615
7646
  };
7616
7647
  }
7617
- async function ju(t, e, s, n, r) {
7648
+ async function Qu(t, e, s, n, r) {
7618
7649
  var _, f;
7619
7650
  const i = {}, o = {};
7620
7651
  if (!await Promise.all(
7621
7652
  Object.entries(e.sheets).map(async ([g, E]) => {
7622
7653
  const m = {
7623
7654
  id: E.id,
7624
- type: ie.GRID,
7655
+ type: oe.GRID,
7625
7656
  name: E.name,
7626
7657
  rowCount: E.rowCount,
7627
7658
  columnCount: E.columnCount,
@@ -7639,7 +7670,7 @@ async function ju(t, e, s, n, r) {
7639
7670
  );
7640
7671
  if (v.some((M) => {
7641
7672
  var j;
7642
- return ((j = M.error) == null ? void 0 : j.code) !== F.OK;
7673
+ return ((j = M.error) == null ? void 0 : j.code) !== W.OK;
7643
7674
  }))
7644
7675
  return !1;
7645
7676
  i[g] = {
@@ -7673,7 +7704,7 @@ async function ju(t, e, s, n, r) {
7673
7704
  type: O.UNIVER_SHEET,
7674
7705
  snapshot: c
7675
7706
  });
7676
- if (Je(h.error))
7707
+ if (qe(h.error))
7677
7708
  throw new Error(
7678
7709
  `transformWorkbookDataToSnapshot(): Failed to save snapshot.
7679
7710
  ErrorCode: ${(_ = h.error) == null ? void 0 : _.code}:${(f = h.error) == null ? void 0 : f.message}`
@@ -7682,7 +7713,7 @@ ErrorCode: ${(_ = h.error) == null ? void 0 : _.code}:${(f = h.error) == null ?
7682
7713
  snapshot: c
7683
7714
  };
7684
7715
  }
7685
- function Ku(t, e, s) {
7716
+ function yu(t, e, s) {
7686
7717
  const n = t.workbook;
7687
7718
  if (!n)
7688
7719
  throw new Error("");
@@ -7712,7 +7743,7 @@ function Ku(t, e, s) {
7712
7743
  else
7713
7744
  throw new Error("");
7714
7745
  }), h.forEach((f) => {
7715
- const g = Zi(f.data);
7746
+ const g = io(f.data);
7716
7747
  Object.entries(g).forEach(([E, m]) => {
7717
7748
  const I = c.cellData[+E] = {};
7718
7749
  Object.entries(m).forEach(([v, M]) => {
@@ -7735,11 +7766,11 @@ function Ku(t, e, s) {
7735
7766
  ...o
7736
7767
  };
7737
7768
  }
7738
- function Yu(t) {
7769
+ function ta(t) {
7739
7770
  const e = t.doc;
7740
7771
  if (e == null)
7741
7772
  throw new Error("transformSnapshotToDocumentData(): snapshot.doc is undefined.");
7742
- const { unitID: s, rev: n, name: r, originalMeta: i } = e, { body: o, documentStyle: u = {}, settings: a = {} } = Qi(i);
7773
+ const { unitID: s, rev: n, name: r, originalMeta: i } = e, { body: o, documentStyle: u = {}, settings: a = {} } = oo(i);
7743
7774
  return {
7744
7775
  id: s,
7745
7776
  rev: n,
@@ -7750,7 +7781,7 @@ function Yu(t) {
7750
7781
  settings: a
7751
7782
  };
7752
7783
  }
7753
- async function zu(t, e, s, n, r) {
7784
+ async function ea(t, e, s, n, r) {
7754
7785
  var a, l, c;
7755
7786
  const i = {
7756
7787
  unitID: e.id,
@@ -7758,7 +7789,7 @@ async function zu(t, e, s, n, r) {
7758
7789
  creator: "",
7759
7790
  name: (a = e.title) != null ? a : "",
7760
7791
  resources: e.resources || [],
7761
- originalMeta: qi(e)
7792
+ originalMeta: ro(e)
7762
7793
  }, o = {
7763
7794
  unitID: s,
7764
7795
  rev: i.rev,
@@ -7770,7 +7801,7 @@ async function zu(t, e, s, n, r) {
7770
7801
  type: O.UNIVER_DOC,
7771
7802
  snapshot: o
7772
7803
  });
7773
- if (Je(u.error))
7804
+ if (qe(u.error))
7774
7805
  throw new Error(
7775
7806
  `transformDocumentDataToSnapshot(): Failed to save snapshot.
7776
7807
  ErrorCode: ${(l = u.error) == null ? void 0 : l.code}:${(c = u.error) == null ? void 0 : c.message}`
@@ -7779,7 +7810,7 @@ ErrorCode: ${(l = u.error) == null ? void 0 : l.code}:${(c = u.error) == null ?
7779
7810
  snapshot: o
7780
7811
  };
7781
7812
  }
7782
- async function Xu(t, e) {
7813
+ async function sa(t, e) {
7783
7814
  const s = t.workbook;
7784
7815
  if (!s)
7785
7816
  throw new Error("Workbook metadata is not available");
@@ -7799,300 +7830,302 @@ async function Xu(t, e) {
7799
7830
  r.push(...u);
7800
7831
  }), await Promise.all(r), n;
7801
7832
  }
7802
- var to = /* @__PURE__ */ ((t) => (t[t.INFO = 0] = "INFO", t[t.STOP = 1] = "STOP", t[t.WARNING = 2] = "WARNING", t))(to || {}), eo = /* @__PURE__ */ ((t) => (t[t.DISABLED = 0] = "DISABLED", t[t.FULL_ALPHA = 1] = "FULL_ALPHA", t[t.FULL_HANGUL = 2] = "FULL_HANGUL", t[t.FULL_KATAKANA = 3] = "FULL_KATAKANA", t[t.HALF_ALPHA = 4] = "HALF_ALPHA", t[t.HALF_HANGUL = 5] = "HALF_HANGUL", t[t.HALF_KATAKANA = 6] = "HALF_KATAKANA", t[t.HIRAGANA = 7] = "HIRAGANA", t[t.NO_CONTROL = 8] = "NO_CONTROL", t[t.OFF = 9] = "OFF", t[t.ON = 10] = "ON", t))(eo || {}), so = /* @__PURE__ */ ((t) => (t.BETWEEN = "between", t.EQUAL = "equal", t.GREATER_THAN = "greaterThan", t.GREATER_THAN_OR_EQUAL = "greaterThanOrEqual", t.LESS_THAN = "lessThan", t.LESS_THAN_OR_EQUAL = "lessThanOrEqual", t.NOT_BETWEEN = "notBetween", t.NOT_EQUAL = "notEqual", t))(so || {}), no = /* @__PURE__ */ ((t) => (t.CUSTOM = "custom", t.LIST = "list", t.LIST_MULTIPLE = "listMultiple", t.NONE = "none", t.TEXT_LENGTH = "textLength", t.DATE = "date", t.TIME = "time", t.WHOLE = "whole", t.DECIMAL = "decimal", t.CHECKBOX = "checkbox", t))(no || {}), ro = /* @__PURE__ */ ((t) => (t.VALID = "valid", t.INVALID = "invalid", t.VALIDATING = "validating", t))(ro || {});
7803
- Ms();
7833
+ var ao = /* @__PURE__ */ ((t) => (t[t.INFO = 0] = "INFO", t[t.STOP = 1] = "STOP", t[t.WARNING = 2] = "WARNING", t))(ao || {}), lo = /* @__PURE__ */ ((t) => (t[t.DISABLED = 0] = "DISABLED", t[t.FULL_ALPHA = 1] = "FULL_ALPHA", t[t.FULL_HANGUL = 2] = "FULL_HANGUL", t[t.FULL_KATAKANA = 3] = "FULL_KATAKANA", t[t.HALF_ALPHA = 4] = "HALF_ALPHA", t[t.HALF_HANGUL = 5] = "HALF_HANGUL", t[t.HALF_KATAKANA = 6] = "HALF_KATAKANA", t[t.HIRAGANA = 7] = "HIRAGANA", t[t.NO_CONTROL = 8] = "NO_CONTROL", t[t.OFF = 9] = "OFF", t[t.ON = 10] = "ON", t))(lo || {}), co = /* @__PURE__ */ ((t) => (t.BETWEEN = "between", t.EQUAL = "equal", t.GREATER_THAN = "greaterThan", t.GREATER_THAN_OR_EQUAL = "greaterThanOrEqual", t.LESS_THAN = "lessThan", t.LESS_THAN_OR_EQUAL = "lessThanOrEqual", t.NOT_BETWEEN = "notBetween", t.NOT_EQUAL = "notEqual", t))(co || {}), ho = /* @__PURE__ */ ((t) => (t.CUSTOM = "custom", t.LIST = "list", t.LIST_MULTIPLE = "listMultiple", t.NONE = "none", t.TEXT_LENGTH = "textLength", t.DATE = "date", t.TIME = "time", t.WHOLE = "whole", t.DECIMAL = "decimal", t.CHECKBOX = "checkbox", t))(ho || {}), _o = /* @__PURE__ */ ((t) => (t.VALID = "valid", t.INVALID = "invalid", t.VALIDATING = "validating", t))(_o || {});
7834
+ Fs();
7804
7835
  export {
7805
- Xo as ABCToNumber,
7836
+ su as ABCToNumber,
7806
7837
  L as AbsoluteRefType,
7807
7838
  We as ActionIterator,
7808
- Un as AlignTypeH,
7809
- Tn as AlignTypeV,
7810
- xs as AutoFillSeries,
7839
+ Pn as AlignTypeH,
7840
+ Hn as AlignTypeV,
7841
+ $s as AutoFillSeries,
7811
7842
  ct as BaselineOffset,
7812
- hn as BlockType,
7843
+ Rn as BlockType,
7813
7844
  C as BooleanNumber,
7814
- S as BorderStyleTypes,
7815
- Hs as BorderType,
7845
+ w as BorderStyleTypes,
7846
+ ks as BorderType,
7816
7847
  X as BulletAlignment,
7817
7848
  Ce as COLORS,
7818
7849
  nt as CellValueType,
7819
- ku as ClientSnapshotServerService,
7850
+ Ju as ClientSnapshotServerService,
7820
7851
  rt as Color,
7821
- ue as ColorBuilder,
7822
- k as ColorKit,
7852
+ ae as ColorBuilder,
7853
+ $ as ColorKit,
7823
7854
  B as ColorType,
7824
- fn as ColumnSeparatorType,
7855
+ On as ColumnSeparatorType,
7825
7856
  yt as CommandService,
7826
- fe as CommandType,
7827
- Fs as CommonHideTypes,
7828
- Gr as ConfigService,
7829
- Sn as ContentAlignment,
7830
- Ur as ContextService,
7831
- Ws as CopyPasteType,
7832
- cn as CustomRangeType,
7833
- nu as DEFAULT_CELL,
7834
- cs as DEFAULT_DOC,
7835
- au as DEFAULT_DOCUMENT_SUB_COMPONENT_ID,
7836
- Iu as DEFAULT_EMPTY_DOCUMENT_VALUE,
7837
- eu as DEFAULT_RANGE,
7857
+ xt as CommandType,
7858
+ Vs as CommonHideTypes,
7859
+ Yr as ConfigService,
7860
+ Tn as ContentAlignment,
7861
+ Cr as ContextService,
7862
+ js as CopyPasteType,
7863
+ En as CustomRangeType,
7864
+ hu as DEFAULT_CELL,
7865
+ hs as DEFAULT_DOC,
7866
+ Ru as DEFAULT_DOCUMENT_SUB_COMPONENT_ID,
7867
+ Mu as DEFAULT_EMPTY_DOCUMENT_VALUE,
7868
+ lu as DEFAULT_RANGE,
7838
7869
  Et as DEFAULT_RANGE_ARRAY,
7839
- su as DEFAULT_SELECTION,
7840
- or as DEFAULT_SLIDE,
7870
+ cu as DEFAULT_SELECTION,
7871
+ dr as DEFAULT_SLIDE,
7841
7872
  kt as DEFAULT_STYLES,
7842
- zr as DEFAULT_WORKSHEET_COLUMN_COUNT,
7843
- cu as DEFAULT_WORKSHEET_COLUMN_COUNT_KEY,
7844
- Zr as DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT,
7845
- fu as DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY,
7846
- Jr as DEFAULT_WORKSHEET_COLUMN_WIDTH,
7847
- du as DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY,
7848
- Yr as DEFAULT_WORKSHEET_ROW_COUNT,
7849
- lu as DEFAULT_WORKSHEET_ROW_COUNT_KEY,
7850
- Xr as DEFAULT_WORKSHEET_ROW_HEIGHT,
7851
- hu as DEFAULT_WORKSHEET_ROW_HEIGHT_KEY,
7852
- qr as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH,
7853
- _u as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY,
7854
- Li as DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,
7855
- wi as DOCS_NORMAL_EDITOR_UNIT_ID_KEY,
7856
- An as DashStyleType,
7857
- dr as DataStreamTreeNodeType,
7858
- Qe as DataStreamTreeTokenType,
7859
- to as DataValidationErrorStyle,
7860
- eo as DataValidationImeMode,
7861
- so as DataValidationOperator,
7862
- Xi as DataValidationRenderMode,
7863
- ro as DataValidationStatus,
7864
- no as DataValidationType,
7865
- Mr as DesktopLogService,
7866
- Gs as DeveloperMetadataVisibility,
7867
- Bs as Dimension,
7868
- ks as Direction,
7873
+ ti as DEFAULT_WORKSHEET_COLUMN_COUNT,
7874
+ Cu as DEFAULT_WORKSHEET_COLUMN_COUNT_KEY,
7875
+ ri as DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT,
7876
+ Nu as DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY,
7877
+ si as DEFAULT_WORKSHEET_COLUMN_WIDTH,
7878
+ Au as DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY,
7879
+ yr as DEFAULT_WORKSHEET_ROW_COUNT,
7880
+ mu as DEFAULT_WORKSHEET_ROW_COUNT_KEY,
7881
+ ei as DEFAULT_WORKSHEET_ROW_HEIGHT,
7882
+ Ou as DEFAULT_WORKSHEET_ROW_HEIGHT_KEY,
7883
+ ni as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH,
7884
+ Iu as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY,
7885
+ pi as DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,
7886
+ Di as DOCS_NORMAL_EDITOR_UNIT_ID_KEY,
7887
+ bn as DashStyleType,
7888
+ Tr as DataStreamTreeNodeType,
7889
+ ye as DataStreamTreeTokenType,
7890
+ ao as DataValidationErrorStyle,
7891
+ lo as DataValidationImeMode,
7892
+ co as DataValidationOperator,
7893
+ so as DataValidationRenderMode,
7894
+ _o as DataValidationStatus,
7895
+ ho as DataValidationType,
7896
+ Ar as DesktopLogService,
7897
+ Ks as DeveloperMetadataVisibility,
7898
+ Ys as Dimension,
7899
+ zs as Direction,
7869
7900
  T as Disposable,
7870
7901
  Ye as DisposableCollection,
7871
- an as DocStyleType,
7902
+ fn as DocStyleType,
7872
7903
  ot as DocumentDataModel,
7873
- oi as EDITOR_ACTIVATED,
7874
- ur as EXTENSION_NAMES,
7875
- we as Entry,
7876
- yn as EntryIterator,
7877
- Br as ErrorService,
7878
- Xn as EventState,
7879
- $t as FOCUSING_DOC,
7880
- Ru as FOCUSING_EDITOR_BUT_HIDDEN,
7881
- mu as FOCUSING_EDITOR_INPUT_FORMULA,
7882
- Ou as FOCUSING_EDITOR_STANDALONE,
7883
- ui as FOCUSING_FORMULA_EDITOR,
7904
+ _i as EDITOR_ACTIVATED,
7905
+ _r as EXTENSION_NAMES,
7906
+ Se as Entry,
7907
+ ir as EntryIterator,
7908
+ zr as ErrorService,
7909
+ tr as EventState,
7910
+ Vt as FOCUSING_DOC,
7911
+ Lu as FOCUSING_EDITOR_BUT_HIDDEN,
7912
+ bu as FOCUSING_EDITOR_INPUT_FORMULA,
7913
+ Uu as FOCUSING_EDITOR_STANDALONE,
7914
+ fi as FOCUSING_FORMULA_EDITOR,
7884
7915
  Ot as FOCUSING_SHEET,
7885
- Vt as FOCUSING_SLIDE,
7886
- Cu as FOCUSING_UNIVER_EDITOR,
7887
- Au as FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE,
7888
- kr as FloatingObjectManagerService,
7889
- ln as FollowNumberWithType,
7890
- Xt as FontItalic,
7891
- wn as FontStyleType,
7892
- Jt as FontWeight,
7893
- $s as FormatType,
7916
+ jt as FOCUSING_SLIDE,
7917
+ vu as FOCUSING_UNIVER_EDITOR,
7918
+ Tu as FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE,
7919
+ Xr as FloatingObjectManagerService,
7920
+ gn as FollowNumberWithType,
7921
+ Jt as FontItalic,
7922
+ Mn as FontStyleType,
7923
+ qt as FontWeight,
7924
+ Xs as FormatType,
7894
7925
  Ct as GlyphType,
7895
- dn as GridType,
7896
- Js as HLSColor,
7926
+ mn as GridType,
7927
+ en as HLSColor,
7897
7928
  st as HorizontalAlign,
7898
7929
  Pt as ICommandService,
7899
- Wr as IConfigService,
7930
+ Kr as IConfigService,
7900
7931
  pt as IContextService,
7901
- $r as IFloatingObjectManagerService,
7902
- Hu as ILocalStorageService,
7932
+ Jr as IFloatingObjectManagerService,
7933
+ Ku as ILocalStorageService,
7903
7934
  et as ILogService,
7904
7935
  Es as IPermissionService,
7905
7936
  Rs as IResourceLoaderService,
7906
7937
  ge as IResourceManagerService,
7907
- Bu as ISnapshotServerService,
7938
+ Xu as ISnapshotServerService,
7908
7939
  Ee as IUndoRedoService,
7909
7940
  Q as IUniverInstanceService,
7910
- Gu as InterceptorManager,
7911
- Vs as InterpolationPointType,
7912
- Zn as KeyIterator,
7941
+ zu as InterceptorManager,
7942
+ Js as InterpolationPointType,
7943
+ nr as KeyIterator,
7913
7944
  gt as LRUHelper,
7914
- tr as LRUMap,
7945
+ or as LRUMap,
7915
7946
  Tt as LifecycleInitializerService,
7916
7947
  y as LifecycleService,
7917
- w as LifecycleStages,
7918
- ne as LocalUndoRedoService,
7948
+ S as LifecycleStages,
7949
+ re as LocalUndoRedoService,
7919
7950
  It as LocaleService,
7920
7951
  ut as LocaleType,
7921
- Tr as LogLevel,
7922
- hr as MemoryCursor,
7923
- Cn as NamedStyleType,
7924
- Hr as NilCommand,
7925
- vn as NumberUnitType,
7926
- $ as ObjectMatrix,
7927
- Ln as ObjectRelativeFromH,
7928
- bn as ObjectRelativeFromV,
7929
- le as Observable,
7930
- xu as ObservableHooks,
7931
- ae as Observer,
7952
+ Or as LogLevel,
7953
+ Ur as MemoryCursor,
7954
+ Sn as NamedStyleType,
7955
+ Lr as NilCommand,
7956
+ xn as NumberUnitType,
7957
+ k as ObjectMatrix,
7958
+ Dn as ObjectRelativeFromH,
7959
+ pn as ObjectRelativeFromV,
7960
+ ce as Observable,
7961
+ ju as ObservableHooks,
7962
+ le as Observer,
7932
7963
  _s as OnLifecycle,
7933
- ou as PRESET_LIST_TYPE,
7934
- pn as PageElementType,
7935
- Dn as PageOrientType,
7936
- $e as PageType,
7937
- En as ParagraphElementType,
7938
- nr as PermissionPoint,
7964
+ Eu as PRESET_LIST_TYPE,
7965
+ Gn as PageElementType,
7966
+ Wn as PageOrientType,
7967
+ ke as PageType,
7968
+ In as ParagraphElementType,
7969
+ lr as PermissionPoint,
7939
7970
  Nt as PermissionService,
7940
7971
  ze as PermissionStatus,
7941
7972
  Fe as Plugin,
7942
7973
  Mt as PluginHolder,
7943
7974
  Dt as PluginService,
7944
- mn as PositionedObjectLayoutType,
7945
- Qt as PresetListType,
7946
- js as ProtectionType,
7975
+ wn as PositionedObjectLayoutType,
7976
+ te as PresetListType,
7977
+ qs as ProtectionType,
7947
7978
  p as RANGE_TYPE,
7948
- Eo as RGBA_PAREN,
7949
- go as RGB_PAREN,
7979
+ wo as RGBA_PAREN,
7980
+ No as RGB_PAREN,
7950
7981
  it as Range,
7951
7982
  Z as Rectangle,
7952
- Pi as RedoCommand,
7953
- Mi as RedoCommandId,
7954
- zo as RefAlias,
7955
- qe as Registry,
7956
- Ze as RegistryAsMap,
7957
- Ks as RelativeDate,
7958
- Pn as RelativeSlideLink,
7959
- Ai as ResourceManagerService,
7960
- qt as RgbColor,
7961
- Bo as RxDisposable,
7962
- _n as SectionType,
7963
- Ys as ShapeType,
7964
- ie as SheetTypes,
7965
- yr as SheetViewModel,
7983
+ $i as RedoCommand,
7984
+ Wi as RedoCommandId,
7985
+ eu as RefAlias,
7986
+ Ze as Registry,
7987
+ Qe as RegistryAsMap,
7988
+ Zs as RelativeDate,
7989
+ Bn as RelativeSlideLink,
7990
+ vi as ResourceManagerService,
7991
+ Zt as RgbColor,
7992
+ Xo as RxDisposable,
7993
+ Cn as SectionType,
7994
+ Qs as ShapeType,
7995
+ oe as SheetTypes,
7996
+ oi as SheetViewModel,
7966
7997
  ds as SlideDataModel,
7967
- On as SpacingRule,
7968
- Vr as Styles,
7969
- Xs as THEME_COLORS,
7970
- In as TabStopAlignment,
7971
- zs as TextDecoration,
7972
- wt as TextDirection,
7973
- gn as TextDirectionType,
7998
+ Ln as SpacingRule,
7999
+ qr as Styles,
8000
+ tn as THEME_COLORS,
8001
+ vn as TabStopAlignment,
8002
+ ys as TextDecoration,
8003
+ St as TextDirection,
8004
+ An as TextDirectionType,
7974
8005
  Re as TextX,
7975
8006
  A as TextXActionType,
7976
- Zt as ThemeColor,
7977
- P as ThemeColorType,
7978
- oe as ThemeColors,
8007
+ Qt as ThemeColor,
8008
+ x as ThemeColorType,
8009
+ ue as ThemeColors,
7979
8010
  ms as ThemeService,
7980
8011
  R as Tools,
7981
- pi as UndoCommand,
7982
- Di as UndoCommandId,
7983
- he as UnitModel,
7984
- wu as Univer,
7985
- jt as UniverEditablePermission,
7986
- Ri as UniverEditablePermissionPoint,
7987
- te as UniverInstanceService,
8012
+ Bi as UndoCommand,
8013
+ Gi as UndoCommandId,
8014
+ de as UnitModel,
8015
+ xu as Univer,
8016
+ Kt as UniverEditablePermission,
8017
+ wi as UniverEditablePermissionPoint,
8018
+ ee as UniverInstanceService,
7988
8019
  O as UniverInstanceType,
7989
- St as UniverPermissionService,
8020
+ wt as UniverPermissionService,
7990
8021
  D as UpdateDocsAttributeType,
7991
- Qn as ValueIterator,
8022
+ yi as UserManagerService,
8023
+ rr as ValueIterator,
7992
8024
  at as VerticalAlign,
7993
- Nn as WidthType,
8025
+ Un as WidthType,
7994
8026
  Ut as Workbook,
7995
8027
  vt as Worksheet,
7996
8028
  Lt as WrapStrategy,
7997
- Rn as WrapTextType,
8029
+ Nn as WrapTextType,
8030
+ gu as afterInitApply,
7998
8031
  Os as b64DecodeUnicode,
7999
- $u as b64EncodeUnicode,
8000
- ps as binarySearchArray,
8001
- po as cellToRange,
8002
- Mn as characterSpacingControlType,
8003
- Po as checkForSubstrings,
8004
- xo as checkParagraphHasBullet,
8005
- Ho as checkParagraphHasIndent,
8006
- Vn as checkParagraphHasIndentByStyle,
8007
- _o as codeToBlob,
8008
- Me as composeBody,
8009
- Ji as composeInterceptors,
8010
- jo as concatMatrixArray,
8011
- tu as convertBodyToHtml,
8032
+ qu as b64EncodeUnicode,
8033
+ Gs as binarySearchArray,
8034
+ $o as cellToRange,
8035
+ Fn as characterSpacingControlType,
8036
+ ko as checkForSubstrings,
8037
+ Vo as checkParagraphHasBullet,
8038
+ jo as checkParagraphHasIndent,
8039
+ Jn as checkParagraphHasIndentByStyle,
8040
+ Ao as codeToBlob,
8041
+ De as composeBody,
8042
+ no as composeInterceptors,
8043
+ Qo as concatMatrixArray,
8044
+ au as convertBodyToHtml,
8012
8045
  Te as covertTextRunToHtml,
8013
- Wu as createInterceptorKey,
8014
- Nu as createInternalEditorID,
8046
+ Yu as createInterceptorKey,
8047
+ Du as createInternalEditorID,
8015
8048
  Ue as createRowColIter,
8016
- yo as debounce,
8017
- ko as dedupe,
8049
+ uu as debounce,
8050
+ Jo as dedupe,
8018
8051
  Ve as deepCompare,
8019
- Kn as deleteContent,
8020
- gu as extractPureTextFromCell,
8021
- Fu as fromCallback,
8022
- Go as fromObservable,
8023
- Vu as generateTemporarySnap,
8052
+ Zn as deleteContent,
8053
+ wu as extractPureTextFromCell,
8054
+ vr as fromCallback,
8055
+ zo as fromObservable,
8056
+ Zu as generateTemporarySnap,
8024
8057
  J as getArrayLength,
8025
- ls as getBodySlice,
8026
- Bt as getBodySliceHtml,
8027
- Mo as getBorderStyleType,
8028
- Oo as getCellValueType,
8058
+ cs as getBodySlice,
8059
+ $t as getBodySliceHtml,
8060
+ Go as getBorderStyleType,
8061
+ vo as getCellValueType,
8029
8062
  V as getColorStyle,
8030
- Wt as getDocsUpdateBody,
8031
- fo as getReverseDirection,
8032
- Xu as getSheetBlocksFromSnapshot,
8033
- Yo as getTypeFromPermissionItemList,
8034
- Eu as getWorksheetUID,
8035
- Vo as groupBy,
8036
- Uo as handleJsonToDom,
8037
- To as handleStyleToString,
8038
- Wo as hashAlgorithm,
8063
+ Gt as getDocsUpdateBody,
8064
+ Io as getReverseDirection,
8065
+ sa as getSheetBlocksFromSnapshot,
8066
+ tu as getTypeFromPermissionItemList,
8067
+ Su as getWorksheetUID,
8068
+ Zo as groupBy,
8069
+ Fo as handleJsonToDom,
8070
+ Wo as handleStyleToString,
8071
+ Yo as hashAlgorithm,
8039
8072
  je as horizontalLineSegmentsSubtraction,
8040
8073
  Le as insertMatrixArray,
8041
- jn as insertTextToContent,
8042
- Ro as isBlackColor,
8043
- Tu as isBooleanString,
8044
- Io as isCellV,
8045
- Lo as isEmptyCell,
8046
- vo as isFormulaId,
8047
- bo as isFormulaString,
8048
- Co as isICellData,
8049
- Su as isInternalEditorID,
8050
- Ao as isNullCell,
8051
- zi as isNumeric,
8052
- Jn as isObserver,
8053
- Lu as isRangesEqual,
8054
- Fo as isRealNum,
8055
- Uu as isSafeNumeric,
8056
- $n as isSameStyleTextRun,
8057
- bu as isUnitRangesEqual,
8058
- Do as isValidRange,
8059
- mo as isWhiteColor,
8060
- wo as makeCellRangeToRangeData,
8061
- So as makeCellToSelection,
8062
- Ki as mergeOverrideWithDependencies,
8063
- Mu as mergeSets,
8064
- Qr as mergeWorksheetSnapshotWithDefault,
8074
+ qn as insertTextToContent,
8075
+ So as isBlackColor,
8076
+ Gu as isBooleanString,
8077
+ To as isCellV,
8078
+ xo as isEmptyCell,
8079
+ Ho as isFormulaId,
8080
+ Po as isFormulaString,
8081
+ bo as isICellData,
8082
+ pu as isInternalEditorID,
8083
+ Uo as isNullCell,
8084
+ eo as isNumeric,
8085
+ er as isObserver,
8086
+ Pu as isRangesEqual,
8087
+ Ko as isRealNum,
8088
+ Wu as isSafeNumeric,
8089
+ Xn as isSameStyleTextRun,
8090
+ Hu as isUnitRangesEqual,
8091
+ Bo as isValidRange,
8092
+ Lo as isWhiteColor,
8093
+ po as makeCellRangeToRangeData,
8094
+ Do as makeCellToSelection,
8095
+ Qi as mergeOverrideWithDependencies,
8096
+ Bu as mergeSets,
8097
+ ii as mergeWorksheetSnapshotWithDefault,
8065
8098
  ve as moveMatrixArray,
8066
- iu as moveRangeByOffset,
8067
- ye as normalizeTextRuns,
8068
- Jo as numberToABC,
8069
- qo as numberToListABC,
8070
- Ps as orderSearchArray,
8071
- ru as queryObjectMatrix,
8072
- ce as remove,
8073
- ir as repeatStringNumTimes,
8074
- Pu as replaceInDocumentBody,
8075
- pu as requestImmediateMacroTask,
8076
- $o as rotate,
8099
+ _u as moveRangeByOffset,
8100
+ ts as normalizeTextRuns,
8101
+ nu as numberToABC,
8102
+ ru as numberToListABC,
8103
+ Bs as orderSearchArray,
8104
+ du as queryObjectMatrix,
8105
+ he as remove,
8106
+ hr as repeatStringNumTimes,
8107
+ Vu as replaceInDocumentBody,
8108
+ ku as requestImmediateMacroTask,
8109
+ qo as rotate,
8077
8110
  fs as runOnLifecycle,
8078
- ho as searchArray,
8079
- No as selectionToArray,
8080
- vr as sequence,
8081
- br as sequenceAsync,
8082
- hs as sequenceExecute,
8083
- uu as sequenceExecuteAsync,
8084
- vu as shallowEqual,
8085
- Ko as sliceMatrixArray,
8086
- Zo as sortRules,
8087
- Qo as sortRulesByDesc,
8111
+ Oo as searchArray,
8112
+ Mo as selectionToArray,
8113
+ mr as sequence,
8114
+ Rr as sequenceAsync,
8115
+ Je as sequenceExecute,
8116
+ fu as sequenceExecuteAsync,
8117
+ Fu as shallowEqual,
8118
+ yo as sliceMatrixArray,
8119
+ iu as sortRules,
8120
+ ou as sortRulesByDesc,
8088
8121
  ht as sortRulesFactory,
8089
8122
  be as spliceArray,
8090
8123
  me as textDecoder,
8091
- xt as textEncoder,
8092
- Du as throttle,
8124
+ Ht as textEncoder,
8125
+ $u as throttle,
8093
8126
  b as toDisposable,
8094
- zu as transformDocumentDataToSnapshot,
8095
- Yu as transformSnapshotToDocumentData,
8096
- Ku as transformSnapshotToWorkbookData,
8097
- ju as transformWorkbookDataToSnapshot
8127
+ ea as transformDocumentDataToSnapshot,
8128
+ ta as transformSnapshotToDocumentData,
8129
+ yu as transformSnapshotToWorkbookData,
8130
+ Qu as transformWorkbookDataToSnapshot
8098
8131
  };