@pubwave/editor 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Node as tn, mergeAttributes as ut, Mark as Fn, Extension as Wn, Editor as Ho } from "@tiptap/core";
1
+ import { Node as tn, mergeAttributes as bt, Mark as Fn, Extension as Wn, Editor as Ho } from "@tiptap/core";
2
2
  import $o from "@tiptap/extension-placeholder";
3
3
  import zo from "@tiptap/extension-history";
4
4
  import jo from "@tiptap/extension-dropcursor";
@@ -23,7 +23,7 @@ import ar from "@tiptap/extension-hard-break";
23
23
  import ir from "@tiptap/extension-image";
24
24
  import { NodeViewWrapper as Wt, ReactNodeViewRenderer as Vn, NodeViewContent as sr, ReactRenderer as lr, useEditor as cr, EditorContent as ur } from "@tiptap/react";
25
25
  import { jsx as u, jsxs as I, Fragment as dr } from "react/jsx-runtime";
26
- import Vt, { useState as W, useRef as G, useEffect as Y, useCallback as N, createContext as pr, useContext as fr, useMemo as nn, forwardRef as hr, useImperativeHandle as br } from "react";
26
+ import Vt, { useState as V, useRef as G, useEffect as Y, useCallback as z, createContext as pr, useContext as fr, useMemo as nn, forwardRef as hr, useImperativeHandle as br } from "react";
27
27
  import { createPortal as vr } from "react-dom";
28
28
  import { Plugin as Gn, PluginKey as Yn } from "@tiptap/pm/state";
29
29
  import mr from "@tiptap/extension-bold";
@@ -53,10 +53,10 @@ function Br({
53
53
  onCancel: n,
54
54
  locale: o
55
55
  }) {
56
- var L, v, T, B, H, z, U, V, F;
57
- const [r, a] = W(e.type), [i, s] = W(((T = (v = (L = e.options) == null ? void 0 : L.plugins) == null ? void 0 : v.title) == null ? void 0 : T.text) ?? ""), [l, p] = W(((z = (H = (B = e.options) == null ? void 0 : B.plugins) == null ? void 0 : H.legend) == null ? void 0 : z.display) ?? !0), [c, g] = W(
58
- ((F = (V = (U = e.options) == null ? void 0 : U.plugins) == null ? void 0 : V.legend) == null ? void 0 : F.position) ?? "bottom"
59
- ), [h, b] = W(e.data.labels), [f, m] = W(e.data.datasets), C = G(null), k = (o == null ? void 0 : o.chart) || {
56
+ var L, v, T, B, N, H, U, q, j;
57
+ const [r, a] = V(e.type), [i, s] = V(((T = (v = (L = e.options) == null ? void 0 : L.plugins) == null ? void 0 : v.title) == null ? void 0 : T.text) ?? ""), [l, p] = V(((H = (N = (B = e.options) == null ? void 0 : B.plugins) == null ? void 0 : N.legend) == null ? void 0 : H.display) ?? !0), [c, g] = V(
58
+ ((j = (q = (U = e.options) == null ? void 0 : U.plugins) == null ? void 0 : q.legend) == null ? void 0 : j.position) ?? "bottom"
59
+ ), [h, b] = V(e.data.labels), [f, m] = V(e.data.datasets), C = G(null), k = (o == null ? void 0 : o.chart) || {
60
60
  modal: {
61
61
  title: "Edit Chart",
62
62
  close: "Close",
@@ -97,48 +97,48 @@ function Br({
97
97
  }
98
98
  };
99
99
  Y(() => {
100
- const O = ($) => {
101
- $.key === "Escape" && n();
100
+ const S = (E) => {
101
+ E.key === "Escape" && n();
102
102
  };
103
- return document.addEventListener("keydown", O), () => document.removeEventListener("keydown", O);
103
+ return document.addEventListener("keydown", S), () => document.removeEventListener("keydown", S);
104
104
  }, [n]), Y(() => {
105
- const O = (K) => {
105
+ const S = (K) => {
106
106
  C.current && C.current.contains(K.target);
107
- }, $ = setTimeout(() => {
108
- document.addEventListener("mousedown", O);
107
+ }, E = setTimeout(() => {
108
+ document.addEventListener("mousedown", S);
109
109
  }, 100);
110
110
  return () => {
111
- clearTimeout($), document.removeEventListener("mousedown", O);
111
+ clearTimeout(E), document.removeEventListener("mousedown", S);
112
112
  };
113
113
  }, []);
114
- const P = N((O, $) => {
114
+ const P = z((S, E) => {
115
115
  m(
116
- (K) => K.map((X, Q) => Q === O ? { ...X, label: $ } : X)
116
+ (K) => K.map((X, ee) => ee === S ? { ...X, label: E } : X)
117
117
  );
118
- }, []), x = N((O, $) => {
118
+ }, []), x = z((S, E) => {
119
119
  m(
120
120
  (K) => K.map(
121
- (X, Q) => Q === O ? { ...X, data: $.split(",").map((ne) => parseFloat(ne.trim()) || 0) } : X
121
+ (X, ee) => ee === S ? { ...X, data: E.split(",").map((te) => parseFloat(te.trim()) || 0) } : X
122
122
  )
123
123
  );
124
- }, []), d = N(() => {
125
- const O = Lr(f.length);
126
- m(($) => [
127
- ...$,
124
+ }, []), d = z(() => {
125
+ const S = Lr(f.length);
126
+ m((E) => [
127
+ ...E,
128
128
  {
129
- label: `${k.modal.fields.datasets.title} ${$.length + 1}`,
129
+ label: `${k.modal.fields.datasets.title} ${E.length + 1}`,
130
130
  data: h.map(() => Math.floor(Math.random() * 100)),
131
- backgroundColor: O.backgroundColor,
132
- borderColor: O.borderColor,
131
+ backgroundColor: S.backgroundColor,
132
+ borderColor: S.borderColor,
133
133
  borderWidth: 2
134
134
  }
135
135
  ]);
136
- }, [f.length, h, k]), A = N((O) => {
137
- m(($) => $.filter((K, X) => X !== O));
138
- }, []), w = N((O) => {
139
- b(O.split(",").map(($) => $.trim()).filter(Boolean));
140
- }, []), M = N(() => {
141
- const O = {
136
+ }, [f.length, h, k]), A = z((S) => {
137
+ m((E) => E.filter((K, X) => X !== S));
138
+ }, []), w = z((S) => {
139
+ b(S.split(",").map((E) => E.trim()).filter(Boolean));
140
+ }, []), M = z(() => {
141
+ const S = {
142
142
  type: r,
143
143
  data: {
144
144
  labels: h,
@@ -165,10 +165,10 @@ function Br({
165
165
  }
166
166
  }
167
167
  };
168
- t(O);
169
- }, [r, i, l, c, h, f, e.options, t]), S = N((O) => {
170
- O.target === O.currentTarget && n();
171
- }, [n]), R = /* @__PURE__ */ u("div", { className: "pubwave-modal__overlay", onClick: S, children: /* @__PURE__ */ I("div", { ref: C, className: "pubwave-modal__container", role: "dialog", "aria-modal": "true", "aria-labelledby": "chart-modal-title", children: [
168
+ t(S);
169
+ }, [r, i, l, c, h, f, e.options, t]), O = z((S) => {
170
+ S.target === S.currentTarget && n();
171
+ }, [n]), _ = /* @__PURE__ */ u("div", { className: "pubwave-modal__overlay", onClick: O, children: /* @__PURE__ */ I("div", { ref: C, className: "pubwave-modal__container", role: "dialog", "aria-modal": "true", "aria-labelledby": "chart-modal-title", children: [
172
172
  /* @__PURE__ */ I("div", { className: "pubwave-modal__header", children: [
173
173
  /* @__PURE__ */ u("h2", { id: "chart-modal-title", className: "pubwave-modal__title", children: k.modal.title }),
174
174
  /* @__PURE__ */ u(
@@ -194,8 +194,8 @@ function Br({
194
194
  id: "chart-type",
195
195
  className: "pubwave-form__select",
196
196
  value: r,
197
- onChange: (O) => a(O.target.value),
198
- children: Tr.map((O) => /* @__PURE__ */ u("option", { value: O.value, children: k.chartTypes[O.value] }, O.value))
197
+ onChange: (S) => a(S.target.value),
198
+ children: Tr.map((S) => /* @__PURE__ */ u("option", { value: S.value, children: k.chartTypes[S.value] }, S.value))
199
199
  }
200
200
  )
201
201
  ] }),
@@ -208,7 +208,7 @@ function Br({
208
208
  type: "text",
209
209
  className: "pubwave-form__input",
210
210
  value: i,
211
- onChange: (O) => s(O.target.value),
211
+ onChange: (S) => s(S.target.value),
212
212
  placeholder: k.modal.fields.titlePlaceholder
213
213
  }
214
214
  )
@@ -221,7 +221,7 @@ function Br({
221
221
  type: "checkbox",
222
222
  className: "pubwave-form__checkbox",
223
223
  checked: l,
224
- onChange: (O) => p(O.target.checked)
224
+ onChange: (S) => p(S.target.checked)
225
225
  }
226
226
  ),
227
227
  k.modal.fields.showLegend
@@ -234,7 +234,7 @@ function Br({
234
234
  id: "legend-position",
235
235
  className: "pubwave-form__select",
236
236
  value: c,
237
- onChange: (O) => g(O.target.value),
237
+ onChange: (S) => g(S.target.value),
238
238
  children: [
239
239
  /* @__PURE__ */ u("option", { value: "top", children: k.modal.fields.position.top }),
240
240
  /* @__PURE__ */ u("option", { value: "bottom", children: k.modal.fields.position.bottom }),
@@ -254,7 +254,7 @@ function Br({
254
254
  type: "text",
255
255
  className: "pubwave-form__input",
256
256
  value: h.join(", "),
257
- onChange: (O) => w(O.target.value),
257
+ onChange: (S) => w(S.target.value),
258
258
  placeholder: k.modal.fields.labelsPlaceholder
259
259
  }
260
260
  )
@@ -272,53 +272,53 @@ function Br({
272
272
  }
273
273
  )
274
274
  ] }),
275
- f.map((O, $) => /* @__PURE__ */ I("div", { className: "pubwave-form__dataset", children: [
275
+ f.map((S, E) => /* @__PURE__ */ I("div", { className: "pubwave-form__dataset", children: [
276
276
  /* @__PURE__ */ I("div", { className: "pubwave-form__dataset-header", children: [
277
277
  /* @__PURE__ */ I("span", { className: "pubwave-form__dataset-title", children: [
278
278
  k.modal.fields.datasets.datasetLabel,
279
279
  " ",
280
- $ + 1
280
+ E + 1
281
281
  ] }),
282
282
  f.length > 1 && /* @__PURE__ */ u(
283
283
  "button",
284
284
  {
285
285
  type: "button",
286
286
  className: "pubwave-button pubwave-button--danger pubwave-button--small",
287
- onClick: () => A($),
288
- "aria-label": `${k.modal.fields.datasets.remove} ${$ + 1}`,
287
+ onClick: () => A(E),
288
+ "aria-label": `${k.modal.fields.datasets.remove} ${E + 1}`,
289
289
  children: k.modal.fields.datasets.remove
290
290
  }
291
291
  )
292
292
  ] }),
293
293
  /* @__PURE__ */ I("div", { className: "pubwave-form__field", children: [
294
- /* @__PURE__ */ u("label", { htmlFor: `dataset-label-${$}`, className: "pubwave-form__label", children: k.modal.fields.datasets.datasetLabel }),
294
+ /* @__PURE__ */ u("label", { htmlFor: `dataset-label-${E}`, className: "pubwave-form__label", children: k.modal.fields.datasets.datasetLabel }),
295
295
  /* @__PURE__ */ u(
296
296
  "input",
297
297
  {
298
- id: `dataset-label-${$}`,
298
+ id: `dataset-label-${E}`,
299
299
  type: "text",
300
300
  className: "pubwave-form__input",
301
- value: O.label ?? "",
302
- onChange: (K) => P($, K.target.value),
301
+ value: S.label ?? "",
302
+ onChange: (K) => P(E, K.target.value),
303
303
  placeholder: k.modal.fields.datasets.datasetLabelPlaceholder
304
304
  }
305
305
  )
306
306
  ] }),
307
307
  /* @__PURE__ */ I("div", { className: "pubwave-form__field", children: [
308
- /* @__PURE__ */ u("label", { htmlFor: `dataset-data-${$}`, className: "pubwave-form__label", children: k.modal.fields.datasets.data }),
308
+ /* @__PURE__ */ u("label", { htmlFor: `dataset-data-${E}`, className: "pubwave-form__label", children: k.modal.fields.datasets.data }),
309
309
  /* @__PURE__ */ u(
310
310
  "input",
311
311
  {
312
- id: `dataset-data-${$}`,
312
+ id: `dataset-data-${E}`,
313
313
  type: "text",
314
314
  className: "pubwave-form__input",
315
- value: O.data.join(", "),
316
- onChange: (K) => x($, K.target.value),
315
+ value: S.data.join(", "),
316
+ onChange: (K) => x(E, K.target.value),
317
317
  placeholder: k.modal.fields.datasets.dataPlaceholder
318
318
  }
319
319
  )
320
320
  ] })
321
- ] }, $))
321
+ ] }, E))
322
322
  ] })
323
323
  ] }),
324
324
  /* @__PURE__ */ I("div", { className: "pubwave-modal__footer", children: [
@@ -342,7 +342,7 @@ function Br({
342
342
  )
343
343
  ] })
344
344
  ] }) });
345
- return vr(R, document.body);
345
+ return vr(_, document.body);
346
346
  }
347
347
  const Ar = { groups: { basic: "Basic", list: "Lists", media: "Media", advanced: "Advanced", layout: "Layout" }, commands: { paragraph: { title: "Text", description: "Plain text block" }, heading1: { title: "Heading 1", description: "Large section heading" }, heading2: { title: "Heading 2", description: "Medium section heading" }, heading3: { title: "Heading 3", description: "Small section heading" }, bulletList: { title: "Bullet List", description: "Create a bulleted list" }, orderedList: { title: "Numbered List", description: "Create a numbered list" }, taskList: { title: "To-do list", description: "Create a todo list with checkboxes" }, image: { title: "Image", description: "Upload or paste an image" }, blockquote: { title: "Blockquote", description: "Create a quote block" }, codeBlock: { title: "Code", description: "Create a code snippet" }, horizontalRule: { title: "Divider", description: "Create a horizontal line" }, table: { title: "Table", description: "Insert a table" }, layoutTwoColumn: { title: "Two Column Layout", description: "Split content into two side-by-side columns" }, layoutThreeColumn: { title: "Three Column Layout", description: "Split content into three side-by-side columns" } } }, Mr = { bold: "Bold", italic: "Italic", underline: "Underline", strike: "Strikethrough", code: "Inline Code", link: "Link", turnInto: "Turn Into", colorPicker: "Text and background color", textColor: "Text color", backgroundColor: "Background color", recentlyUsed: "Recently used", openLink: "Open link", removeLink: "Remove link", confirmLink: "Confirm link", clearLink: "Clear link", blockTypes: { text: "Text", heading1: "Heading 1", heading2: "Heading 2", heading3: "Heading 3", bulletedList: "Bulleted list", numberedList: "Numbered list" } }, Pr = { editor: "Rich text editor", editorContent: "Editor content area", toolbar: "Text formatting toolbar", boldButton: "Toggle bold formatting", italicButton: "Toggle italic formatting", underlineButton: "Toggle underline formatting", strikeButton: "Toggle strikethrough formatting", codeButton: "Toggle inline code formatting", linkButton: "Add or edit link", turnIntoButton: "Turn into", colorPickerButton: "Text and background color", headingButton: "Set heading level", paragraphButton: "Convert to paragraph", dragHandle: "Drag to reorder block", dropIndicator: "Drop here to move block", blockMenu: "Block options menu", addBlock: "Add new block", deleteBlock: "Delete this block", linkDialog: "Link editor dialog", linkUrlInput: "Link URL input", linkSaveButton: "Save link", linkRemoveButton: "Remove link", linkCancelButton: "Cancel link editing", addBlockBelow: "Add block below", dragToMove: "Drag to reorder block", openLinkInNewTab: "Open link in new tab", linkConfirmButton: "Confirm link", linkOpenButton: "Open link in new tab", linkClearButton: "Clear link input" }, Sr = 'Write, type "/" for commands...', Dr = "Paste a link...", Ir = { modal: { title: "Edit Chart", close: "Close", save: "Save", cancel: "Cancel", fields: { chartType: "Chart Type", title: "Title", titlePlaceholder: "Chart title...", showLegend: "Show Legend", legendPosition: "Position", position: { top: "Top", bottom: "Bottom", left: "Left", right: "Right" }, labels: "Labels (comma-separated)", labelsPlaceholder: "Jan, Feb, Mar, Apr...", datasets: { title: "Datasets", add: "+ Add Dataset", remove: "Remove", datasetLabel: "Dataset", datasetLabelPlaceholder: "Dataset label...", data: "Data (comma-separated numbers)", dataPlaceholder: "10, 20, 30, 40..." } } }, chartTypes: { bar: "Bar Chart", line: "Line Chart", pie: "Pie Chart", doughnut: "Doughnut Chart", radar: "Radar Chart", polarArea: "Polar Area Chart" } }, Kn = {
348
348
  slashMenu: Ar,
@@ -426,145 +426,153 @@ function At(e) {
426
426
  const Xn = pr({
427
427
  locale: Gt
428
428
  }), bn = Xn.Provider;
429
- function _e() {
429
+ function We() {
430
430
  return fr(Xn).locale;
431
431
  }
432
432
  const _a = async () => import("./auto-h8n00k8H.js");
433
- function je(e, t, n) {
433
+ function Xe(e, t, n) {
434
434
  const o = getComputedStyle(e), r = t.replace(/^var\(/, "").replace(/\)$/, "");
435
435
  return o.getPropertyValue(r).trim() || n;
436
436
  }
437
437
  function Na(e) {
438
- var M;
439
- const { node: t, updateAttributes: n, editor: o, selected: r } = e, a = t.attrs.data, [i, s] = W(!1), [l, p] = W(!1), [c, g] = W(null), h = G(null), b = G(null), f = G(null), m = _e(), C = ((M = o == null ? void 0 : o.options) == null ? void 0 : M.editable) ?? !0, k = C ? r : !1, P = N(() => {
438
+ var L, v, T;
439
+ const { node: t, updateAttributes: n, editor: o, selected: r } = e, a = t.attrs.data, [i, s] = V(!1), [l, p] = V(!1), [c, g] = V(null), h = G(null), b = G(null), f = G(null), m = We(), C = ((L = o == null ? void 0 : o.options) == null ? void 0 : L.editable) ?? !0, k = C ? r : !1, P = z(() => {
440
440
  if (!c || !f.current || !b.current)
441
441
  return;
442
- const S = b.current, R = je(
443
- S,
442
+ const B = b.current, N = Xe(
443
+ B,
444
444
  "--pubwave-text",
445
445
  "#37352f"
446
- ), L = je(
447
- S,
446
+ ), H = Xe(
447
+ B,
448
448
  "--pubwave-text-muted",
449
449
  "#9b9a97"
450
- ), v = je(
451
- S,
450
+ ), U = Xe(
451
+ B,
452
452
  "--pubwave-border",
453
453
  "#e3e2e0"
454
- ), T = c.options.plugins || {}, B = c.options.scales;
455
- if (T.legend) {
456
- const H = T.legend;
457
- H.labels ? H.labels.color = R : T.legend.labels = { color: R }, H.onHover = () => {
458
- const z = h.current;
459
- z && (z.style.cursor = "pointer");
460
- }, H.onLeave = () => {
461
- const z = h.current;
462
- z && (z.style.cursor = "default");
454
+ ), q = c.options.plugins || {}, j = c.options.scales;
455
+ if (q.legend) {
456
+ const S = q.legend;
457
+ S.labels ? S.labels.color = N : q.legend.labels = { color: N }, S.onHover = () => {
458
+ const E = h.current;
459
+ E && (E.style.cursor = "pointer");
460
+ }, S.onLeave = () => {
461
+ const E = h.current;
462
+ E && (E.style.cursor = "default");
463
463
  };
464
464
  }
465
- T.title && (T.title.color = R), B && (B.x && (B.x.ticks && (B.x.ticks.color = L), B.x.grid && (B.x.grid.color = v)), B.y && (B.y.ticks && (B.y.ticks.color = L), B.y.grid && (B.y.grid.color = v))), c.update("none");
465
+ q.title && (q.title.color = N), j && (j.x && (j.x.ticks && (j.x.ticks.color = H), j.x.grid && (j.x.grid.color = U)), j.y && (j.y.ticks && (j.y.ticks.color = H), j.y.grid && (j.y.grid.color = U))), c.update("none");
466
466
  }, [c]);
467
467
  Y(() => !h.current || !a ? void 0 : ((async () => {
468
- var R, L, v, T, B, H, z, U, V, F, O, $, K;
468
+ var N, H, U, q, j, S, E, K, X, ee, te, ne, le, Ce, ce, Te, he, Le;
469
469
  try {
470
- const Q = (await _a()).default;
471
- if (f.current = Q, h.current) {
472
- const ee = Q.getChart(h.current);
473
- ee && ee.destroy();
470
+ const Be = (await _a()).default;
471
+ if (f.current = Be, h.current) {
472
+ const J = Be.getChart(h.current);
473
+ J && J.destroy();
474
474
  }
475
475
  c && c.destroy();
476
- const ne = (R = h.current) == null ? void 0 : R.getContext("2d");
477
- if (!ne) {
476
+ const _e = (N = h.current) == null ? void 0 : N.getContext("2d");
477
+ if (!_e) {
478
478
  console.warn("Failed to get 2D context for chart");
479
479
  return;
480
480
  }
481
- const J = b.current, ie = J ? je(J, "--pubwave-text", "#37352f") : "#37352f", ye = J ? je(J, "--pubwave-text-muted", "#9b9a97") : "#9b9a97", ce = J ? je(J, "--pubwave-border", "#e3e2e0") : "#e3e2e0", Te = {
481
+ const be = b.current, Ae = be ? Xe(be, "--pubwave-text", "#37352f") : "#37352f", De = be ? Xe(be, "--pubwave-text-muted", "#9b9a97") : "#9b9a97", Ne = be ? Xe(be, "--pubwave-border", "#e3e2e0") : "#e3e2e0", ve = ((H = a.options) == null ? void 0 : H.scales) ?? {}, me = x(a.type) ? {
482
+ x: {
483
+ ...ve.x ?? {},
484
+ ticks: { ...((U = ve.x) == null ? void 0 : U.ticks) ?? {}, color: De },
485
+ grid: { ...((q = ve.x) == null ? void 0 : q.grid) ?? {}, color: Ne }
486
+ },
487
+ y: {
488
+ ...ve.y ?? {},
489
+ ticks: { ...((j = ve.y) == null ? void 0 : j.ticks) ?? {}, color: De },
490
+ grid: { ...((S = ve.y) == null ? void 0 : S.grid) ?? {}, color: Ne }
491
+ }
492
+ } : void 0, ge = {
482
493
  ...a.options,
483
494
  responsive: !0,
484
495
  maintainAspectRatio: !1,
485
496
  plugins: {
486
- ...(L = a.options) == null ? void 0 : L.plugins,
497
+ ...(E = a.options) == null ? void 0 : E.plugins,
487
498
  legend: {
488
- display: ((B = (T = (v = a.options) == null ? void 0 : v.plugins) == null ? void 0 : T.legend) == null ? void 0 : B.display) ?? !0,
489
- position: ((U = (z = (H = a.options) == null ? void 0 : H.plugins) == null ? void 0 : z.legend) == null ? void 0 : U.position) ?? "top",
490
- ...(O = (F = (V = a.options) == null ? void 0 : V.plugins) == null ? void 0 : F.legend) != null && O.labels ? {
499
+ display: ((ee = (X = (K = a.options) == null ? void 0 : K.plugins) == null ? void 0 : X.legend) == null ? void 0 : ee.display) ?? !0,
500
+ position: ((le = (ne = (te = a.options) == null ? void 0 : te.plugins) == null ? void 0 : ne.legend) == null ? void 0 : le.position) ?? "top",
501
+ ...(Te = (ce = (Ce = a.options) == null ? void 0 : Ce.plugins) == null ? void 0 : ce.legend) != null && Te.labels ? {
491
502
  labels: {
492
503
  ...a.options.plugins.legend.labels,
493
- color: ie
504
+ color: Ae
494
505
  }
495
- } : { labels: { color: ie } },
506
+ } : { labels: { color: Ae } },
496
507
  onHover: () => {
497
- const ee = h.current;
498
- ee && (ee.style.cursor = "pointer");
508
+ const J = h.current;
509
+ J && (J.style.cursor = "pointer");
499
510
  },
500
511
  onLeave: () => {
501
- const ee = h.current;
502
- ee && (ee.style.cursor = "default");
512
+ const J = h.current;
513
+ J && (J.style.cursor = "default");
503
514
  }
504
515
  },
505
- title: (K = ($ = a.options) == null ? void 0 : $.plugins) != null && K.title ? {
516
+ title: (Le = (he = a.options) == null ? void 0 : he.plugins) != null && Le.title ? {
506
517
  ...a.options.plugins.title,
507
- color: ie,
518
+ color: Ae,
508
519
  ...a.options.plugins.title.font ? { font: { ...a.options.plugins.title.font } } : {}
509
520
  } : void 0
510
521
  },
511
- scales: x(a.type) ? {
512
- x: {
513
- ticks: { color: ye },
514
- grid: { color: ce }
515
- },
516
- y: {
517
- ticks: { color: ye },
518
- grid: { color: ce }
519
- }
520
- } : void 0
521
- }, he = new Q(ne, {
522
+ scales: me
523
+ }, He = new Be(_e, {
522
524
  type: a.type,
523
525
  data: a.data,
524
- options: Te
526
+ options: ge
525
527
  });
526
- g(he);
527
- } catch (X) {
528
- console.error("Failed to load Chart.js:", X);
528
+ g(He);
529
+ } catch (Ee) {
530
+ console.error("Failed to load Chart.js:", Ee);
529
531
  }
530
532
  })(), () => {
531
533
  c && c.destroy();
532
534
  }), [a, C]), Y(() => {
533
535
  if (!c || !b.current)
534
536
  return;
535
- const S = () => {
537
+ const B = () => {
536
538
  setTimeout(() => {
537
539
  P();
538
540
  }, 0);
539
- }, R = new MutationObserver((v) => {
540
- v.forEach((T) => {
541
- (T.attributeName === "style" || T.attributeName === "class") && S();
541
+ }, N = new MutationObserver((U) => {
542
+ U.forEach((q) => {
543
+ (q.attributeName === "style" || q.attributeName === "class") && B();
542
544
  });
543
545
  });
544
- let L = b.current;
545
- for (; L && (R.observe(L, { attributes: !0 }), !(L.classList.contains("pubwave-editor") || L === document.body)); )
546
- L = L.parentElement;
547
- return R.observe(document.body, {
546
+ let H = b.current;
547
+ for (; H && (N.observe(H, { attributes: !0 }), !(H.classList.contains("pubwave-editor") || H === document.body)); )
548
+ H = H.parentElement;
549
+ return N.observe(document.body, {
548
550
  attributes: !0,
549
551
  attributeFilter: ["class"]
550
552
  }), () => {
551
- R.disconnect();
553
+ N.disconnect();
552
554
  };
553
555
  }, [c, P]);
554
- function x(S) {
555
- return ["bar", "line", "radar"].includes(S);
556
+ function x(B) {
557
+ return ["bar", "line", "radar"].includes(B);
556
558
  }
557
- const d = N(
558
- (S) => {
559
- n({ data: S }), s(!1);
559
+ const d = z(
560
+ (B) => {
561
+ n({ data: B }), s(!1);
560
562
  },
561
563
  [n]
562
- ), A = N(() => {
564
+ ), A = z(() => {
563
565
  s(!1);
564
- }, []), w = N(() => {
566
+ }, []), w = z(() => {
565
567
  s(!0);
566
568
  }, []);
567
- return a ? /* @__PURE__ */ I(
569
+ if (!a)
570
+ return /* @__PURE__ */ u(Wt, { className: "pubwave-editor__chart", children: /* @__PURE__ */ u("div", { className: "pubwave-chart__placeholder", children: "Invalid chart data" }) });
571
+ const M = (v = a.options) == null ? void 0 : v.height, O = (T = a.options) == null ? void 0 : T.minHeight, _ = M || O ? {
572
+ height: M ? `${M}px` : void 0,
573
+ minHeight: O ? `${O}px` : void 0
574
+ } : void 0;
575
+ return /* @__PURE__ */ I(
568
576
  Wt,
569
577
  {
570
578
  ref: b,
@@ -579,7 +587,7 @@ function Na(e) {
579
587
  onMouseEnter: () => p(!0),
580
588
  onMouseLeave: () => p(!1),
581
589
  children: [
582
- /* @__PURE__ */ u("div", { className: "pubwave-chart__canvas-wrapper", children: /* @__PURE__ */ u("canvas", { ref: h, className: "pubwave-chart__canvas" }) }),
590
+ /* @__PURE__ */ u("div", { className: "pubwave-chart__canvas-wrapper", style: _, children: /* @__PURE__ */ u("canvas", { ref: h, className: "pubwave-chart__canvas" }) }),
583
591
  C && (l || k) && /* @__PURE__ */ u(
584
592
  "button",
585
593
  {
@@ -621,7 +629,7 @@ function Na(e) {
621
629
  )
622
630
  ]
623
631
  }
624
- ) : /* @__PURE__ */ u(Wt, { className: "pubwave-editor__chart", children: /* @__PURE__ */ u("div", { className: "pubwave-chart__placeholder", children: "Invalid chart data" }) });
632
+ );
625
633
  }
626
634
  const Ha = tn.create({
627
635
  name: "chart",
@@ -678,7 +686,7 @@ const Ha = tn.create({
678
686
  * This is used for copy/paste and serialization
679
687
  */
680
688
  renderHTML({ HTMLAttributes: e }) {
681
- return ["div", ut({ "data-type": "chart" }, e)];
689
+ return ["div", bt({ "data-type": "chart" }, e)];
682
690
  },
683
691
  /**
684
692
  * Use React component to render the chart node
@@ -760,7 +768,7 @@ const za = tn.create({
760
768
  ];
761
769
  return [
762
770
  "div",
763
- ut({
771
+ bt({
764
772
  "data-type": "layout",
765
773
  "data-layout-columns": String(n),
766
774
  class: o.join(" ")
@@ -802,7 +810,7 @@ const za = tn.create({
802
810
  * this is primarily for HTML serialization/export.
803
811
  */
804
812
  renderHTML({ HTMLAttributes: e }) {
805
- return ["div", ut({
813
+ return ["div", bt({
806
814
  "data-type": "layoutColumn",
807
815
  class: "pubwave-layout__column"
808
816
  }, e), 0];
@@ -1026,7 +1034,7 @@ const Fa = Fn.create({
1026
1034
  ];
1027
1035
  },
1028
1036
  renderHTML({ HTMLAttributes: e }) {
1029
- return ["span", ut(this.options.HTMLAttributes, e), 0];
1037
+ return ["span", bt(this.options.HTMLAttributes, e), 0];
1030
1038
  },
1031
1039
  addCommands() {
1032
1040
  return {
@@ -1076,7 +1084,7 @@ const Fa = Fn.create({
1076
1084
  ];
1077
1085
  },
1078
1086
  renderHTML({ HTMLAttributes: e }) {
1079
- return ["span", ut(this.options.HTMLAttributes, e), 0];
1087
+ return ["span", bt(this.options.HTMLAttributes, e), 0];
1080
1088
  },
1081
1089
  addCommands() {
1082
1090
  return {
@@ -1912,15 +1920,15 @@ function ki(e, t) {
1912
1920
  return a || i;
1913
1921
  });
1914
1922
  }
1915
- var re = "top", pe = "bottom", fe = "right", ae = "left", rn = "auto", dt = [re, pe, fe, ae], Fe = "start", it = "end", xi = "clippingParents", ro = "viewport", et = "popper", Ci = "reference", mn = /* @__PURE__ */ dt.reduce(function(e, t) {
1916
- return e.concat([t + "-" + Fe, t + "-" + it]);
1917
- }, []), ao = /* @__PURE__ */ [].concat(dt, [rn]).reduce(function(e, t) {
1918
- return e.concat([t, t + "-" + Fe, t + "-" + it]);
1923
+ var re = "top", pe = "bottom", fe = "right", ae = "left", rn = "auto", vt = [re, pe, fe, ae], Qe = "start", dt = "end", xi = "clippingParents", ro = "viewport", at = "popper", Ci = "reference", mn = /* @__PURE__ */ vt.reduce(function(e, t) {
1924
+ return e.concat([t + "-" + Qe, t + "-" + dt]);
1925
+ }, []), ao = /* @__PURE__ */ [].concat(vt, [rn]).reduce(function(e, t) {
1926
+ return e.concat([t, t + "-" + Qe, t + "-" + dt]);
1919
1927
  }, []), Ti = "beforeRead", Li = "read", Bi = "afterRead", Ai = "beforeMain", Mi = "main", Pi = "afterMain", Si = "beforeWrite", Di = "write", Ii = "afterWrite", Oi = [Ti, Li, Bi, Ai, Mi, Pi, Si, Di, Ii];
1920
- function me(e) {
1928
+ function ke(e) {
1921
1929
  return e ? (e.nodeName || "").toLowerCase() : null;
1922
1930
  }
1923
- function le(e) {
1931
+ function se(e) {
1924
1932
  if (e == null)
1925
1933
  return window;
1926
1934
  if (e.toString() !== "[object Window]") {
@@ -1929,25 +1937,25 @@ function le(e) {
1929
1937
  }
1930
1938
  return e;
1931
1939
  }
1932
- function Ee(e) {
1933
- var t = le(e).Element;
1940
+ function Fe(e) {
1941
+ var t = se(e).Element;
1934
1942
  return e instanceof t || e instanceof Element;
1935
1943
  }
1936
1944
  function de(e) {
1937
- var t = le(e).HTMLElement;
1945
+ var t = se(e).HTMLElement;
1938
1946
  return e instanceof t || e instanceof HTMLElement;
1939
1947
  }
1940
1948
  function an(e) {
1941
1949
  if (typeof ShadowRoot > "u")
1942
1950
  return !1;
1943
- var t = le(e).ShadowRoot;
1951
+ var t = se(e).ShadowRoot;
1944
1952
  return e instanceof t || e instanceof ShadowRoot;
1945
1953
  }
1946
1954
  function Ri(e) {
1947
1955
  var t = e.state;
1948
1956
  Object.keys(t.elements).forEach(function(n) {
1949
1957
  var o = t.styles[n] || {}, r = t.attributes[n] || {}, a = t.elements[n];
1950
- !de(a) || !me(a) || (Object.assign(a.style, o), Object.keys(r).forEach(function(i) {
1958
+ !de(a) || !ke(a) || (Object.assign(a.style, o), Object.keys(r).forEach(function(i) {
1951
1959
  var s = r[i];
1952
1960
  s === !1 ? a.removeAttribute(i) : a.setAttribute(i, s === !0 ? "" : s);
1953
1961
  }));
@@ -1971,7 +1979,7 @@ function Ei(e) {
1971
1979
  var r = t.elements[o], a = t.attributes[o] || {}, i = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), s = i.reduce(function(l, p) {
1972
1980
  return l[p] = "", l;
1973
1981
  }, {});
1974
- !de(r) || !me(r) || (Object.assign(r.style, s), Object.keys(a).forEach(function(l) {
1982
+ !de(r) || !ke(r) || (Object.assign(r.style, s), Object.keys(a).forEach(function(l) {
1975
1983
  r.removeAttribute(l);
1976
1984
  }));
1977
1985
  });
@@ -1985,10 +1993,10 @@ const io = {
1985
1993
  effect: Ei,
1986
1994
  requires: ["computeStyles"]
1987
1995
  };
1988
- function ve(e) {
1996
+ function we(e) {
1989
1997
  return e.split("-")[0];
1990
1998
  }
1991
- var Re = Math.max, St = Math.min, We = Math.round;
1999
+ var qe = Math.max, St = Math.min, et = Math.round;
1992
2000
  function Kt() {
1993
2001
  var e = navigator.userAgentData;
1994
2002
  return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
@@ -1998,11 +2006,11 @@ function Kt() {
1998
2006
  function so() {
1999
2007
  return !/^((?!chrome|android).)*safari/i.test(Kt());
2000
2008
  }
2001
- function Ve(e, t, n) {
2009
+ function tt(e, t, n) {
2002
2010
  t === void 0 && (t = !1), n === void 0 && (n = !1);
2003
2011
  var o = e.getBoundingClientRect(), r = 1, a = 1;
2004
- t && de(e) && (r = e.offsetWidth > 0 && We(o.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && We(o.height) / e.offsetHeight || 1);
2005
- var i = Ee(e) ? le(e) : window, s = i.visualViewport, l = !so() && n, p = (o.left + (l && s ? s.offsetLeft : 0)) / r, c = (o.top + (l && s ? s.offsetTop : 0)) / a, g = o.width / r, h = o.height / a;
2012
+ t && de(e) && (r = e.offsetWidth > 0 && et(o.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && et(o.height) / e.offsetHeight || 1);
2013
+ var i = Fe(e) ? se(e) : window, s = i.visualViewport, l = !so() && n, p = (o.left + (l && s ? s.offsetLeft : 0)) / r, c = (o.top + (l && s ? s.offsetTop : 0)) / a, g = o.width / r, h = o.height / a;
2006
2014
  return {
2007
2015
  width: g,
2008
2016
  height: h,
@@ -2015,7 +2023,7 @@ function Ve(e, t, n) {
2015
2023
  };
2016
2024
  }
2017
2025
  function sn(e) {
2018
- var t = Ve(e), n = e.offsetWidth, o = e.offsetHeight;
2026
+ var t = tt(e), n = e.offsetWidth, o = e.offsetHeight;
2019
2027
  return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
2020
2028
  x: e.offsetLeft,
2021
2029
  y: e.offsetTop,
@@ -2037,20 +2045,20 @@ function lo(e, t) {
2037
2045
  }
2038
2046
  return !1;
2039
2047
  }
2040
- function Ce(e) {
2041
- return le(e).getComputedStyle(e);
2048
+ function Se(e) {
2049
+ return se(e).getComputedStyle(e);
2042
2050
  }
2043
2051
  function _i(e) {
2044
- return ["table", "td", "th"].indexOf(me(e)) >= 0;
2052
+ return ["table", "td", "th"].indexOf(ke(e)) >= 0;
2045
2053
  }
2046
- function Ae(e) {
2047
- return ((Ee(e) ? e.ownerDocument : (
2054
+ function Oe(e) {
2055
+ return ((Fe(e) ? e.ownerDocument : (
2048
2056
  // $FlowFixMe[prop-missing]
2049
2057
  e.document
2050
2058
  )) || window.document).documentElement;
2051
2059
  }
2052
2060
  function _t(e) {
2053
- return me(e) === "html" ? e : (
2061
+ return ke(e) === "html" ? e : (
2054
2062
  // this is a quicker (but less type safe) way to save quite some bytes from the bundle
2055
2063
  // $FlowFixMe[incompatible-return]
2056
2064
  // $FlowFixMe[prop-missing]
@@ -2058,42 +2066,42 @@ function _t(e) {
2058
2066
  e.parentNode || // DOM Element detected
2059
2067
  (an(e) ? e.host : null) || // ShadowRoot detected
2060
2068
  // $FlowFixMe[incompatible-call]: HTMLElement is a Node
2061
- Ae(e)
2069
+ Oe(e)
2062
2070
  );
2063
2071
  }
2064
2072
  function gn(e) {
2065
2073
  return !de(e) || // https://github.com/popperjs/popper-core/issues/837
2066
- Ce(e).position === "fixed" ? null : e.offsetParent;
2074
+ Se(e).position === "fixed" ? null : e.offsetParent;
2067
2075
  }
2068
2076
  function Ni(e) {
2069
2077
  var t = /firefox/i.test(Kt()), n = /Trident/i.test(Kt());
2070
2078
  if (n && de(e)) {
2071
- var o = Ce(e);
2079
+ var o = Se(e);
2072
2080
  if (o.position === "fixed")
2073
2081
  return null;
2074
2082
  }
2075
2083
  var r = _t(e);
2076
- for (an(r) && (r = r.host); de(r) && ["html", "body"].indexOf(me(r)) < 0; ) {
2077
- var a = Ce(r);
2084
+ for (an(r) && (r = r.host); de(r) && ["html", "body"].indexOf(ke(r)) < 0; ) {
2085
+ var a = Se(r);
2078
2086
  if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none")
2079
2087
  return r;
2080
2088
  r = r.parentNode;
2081
2089
  }
2082
2090
  return null;
2083
2091
  }
2084
- function pt(e) {
2085
- for (var t = le(e), n = gn(e); n && _i(n) && Ce(n).position === "static"; )
2092
+ function mt(e) {
2093
+ for (var t = se(e), n = gn(e); n && _i(n) && Se(n).position === "static"; )
2086
2094
  n = gn(n);
2087
- return n && (me(n) === "html" || me(n) === "body" && Ce(n).position === "static") ? t : n || Ni(e) || t;
2095
+ return n && (ke(n) === "html" || ke(n) === "body" && Se(n).position === "static") ? t : n || Ni(e) || t;
2088
2096
  }
2089
2097
  function ln(e) {
2090
2098
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
2091
2099
  }
2092
- function ot(e, t, n) {
2093
- return Re(e, St(t, n));
2100
+ function lt(e, t, n) {
2101
+ return qe(e, St(t, n));
2094
2102
  }
2095
2103
  function Hi(e, t, n) {
2096
- var o = ot(e, t, n);
2104
+ var o = lt(e, t, n);
2097
2105
  return o > n ? n : o;
2098
2106
  }
2099
2107
  function co() {
@@ -2115,13 +2123,13 @@ function po(e, t) {
2115
2123
  var $i = function(t, n) {
2116
2124
  return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
2117
2125
  placement: n.placement
2118
- })) : t, uo(typeof t != "number" ? t : po(t, dt));
2126
+ })) : t, uo(typeof t != "number" ? t : po(t, vt));
2119
2127
  };
2120
2128
  function zi(e) {
2121
- var t, n = e.state, o = e.name, r = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = ve(n.placement), l = ln(s), p = [ae, fe].indexOf(s) >= 0, c = p ? "height" : "width";
2129
+ var t, n = e.state, o = e.name, r = e.options, a = n.elements.arrow, i = n.modifiersData.popperOffsets, s = we(n.placement), l = ln(s), p = [ae, fe].indexOf(s) >= 0, c = p ? "height" : "width";
2122
2130
  if (!(!a || !i)) {
2123
- var g = $i(r.padding, n), h = sn(a), b = l === "y" ? re : ae, f = l === "y" ? pe : fe, m = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], C = i[l] - n.rects.reference[l], k = pt(a), P = k ? l === "y" ? k.clientHeight || 0 : k.clientWidth || 0 : 0, x = m / 2 - C / 2, d = g[b], A = P - h[c] - g[f], w = P / 2 - h[c] / 2 + x, M = ot(d, w, A), S = l;
2124
- n.modifiersData[o] = (t = {}, t[S] = M, t.centerOffset = M - w, t);
2131
+ var g = $i(r.padding, n), h = sn(a), b = l === "y" ? re : ae, f = l === "y" ? pe : fe, m = n.rects.reference[c] + n.rects.reference[l] - i[l] - n.rects.popper[c], C = i[l] - n.rects.reference[l], k = mt(a), P = k ? l === "y" ? k.clientHeight || 0 : k.clientWidth || 0 : 0, x = m / 2 - C / 2, d = g[b], A = P - h[c] - g[f], w = P / 2 - h[c] / 2 + x, M = lt(d, w, A), O = l;
2132
+ n.modifiersData[o] = (t = {}, t[O] = M, t.centerOffset = M - w, t);
2125
2133
  }
2126
2134
  }
2127
2135
  function ji(e) {
@@ -2137,7 +2145,7 @@ const Ui = {
2137
2145
  requires: ["popperOffsets"],
2138
2146
  requiresIfExists: ["preventOverflow"]
2139
2147
  };
2140
- function Ge(e) {
2148
+ function nt(e) {
2141
2149
  return e.split("-")[1];
2142
2150
  }
2143
2151
  var qi = {
@@ -2149,8 +2157,8 @@ var qi = {
2149
2157
  function Fi(e, t) {
2150
2158
  var n = e.x, o = e.y, r = t.devicePixelRatio || 1;
2151
2159
  return {
2152
- x: We(n * r) / r || 0,
2153
- y: We(o * r) / r || 0
2160
+ x: et(n * r) / r || 0,
2161
+ y: et(o * r) / r || 0
2154
2162
  };
2155
2163
  }
2156
2164
  function yn(e) {
@@ -2164,20 +2172,20 @@ function yn(e) {
2164
2172
  b = C.x, m = C.y;
2165
2173
  var k = i.hasOwnProperty("x"), P = i.hasOwnProperty("y"), x = ae, d = re, A = window;
2166
2174
  if (p) {
2167
- var w = pt(n), M = "clientHeight", S = "clientWidth";
2168
- if (w === le(n) && (w = Ae(n), Ce(w).position !== "static" && s === "absolute" && (M = "scrollHeight", S = "scrollWidth")), w = w, r === re || (r === ae || r === fe) && a === it) {
2175
+ var w = mt(n), M = "clientHeight", O = "clientWidth";
2176
+ if (w === se(n) && (w = Oe(n), Se(w).position !== "static" && s === "absolute" && (M = "scrollHeight", O = "scrollWidth")), w = w, r === re || (r === ae || r === fe) && a === dt) {
2169
2177
  d = pe;
2170
- var R = g && w === A && A.visualViewport ? A.visualViewport.height : (
2178
+ var _ = g && w === A && A.visualViewport ? A.visualViewport.height : (
2171
2179
  // $FlowFixMe[prop-missing]
2172
2180
  w[M]
2173
2181
  );
2174
- m -= R - o.height, m *= l ? 1 : -1;
2182
+ m -= _ - o.height, m *= l ? 1 : -1;
2175
2183
  }
2176
- if (r === ae || (r === re || r === pe) && a === it) {
2184
+ if (r === ae || (r === re || r === pe) && a === dt) {
2177
2185
  x = fe;
2178
2186
  var L = g && w === A && A.visualViewport ? A.visualViewport.width : (
2179
2187
  // $FlowFixMe[prop-missing]
2180
- w[S]
2188
+ w[O]
2181
2189
  );
2182
2190
  b -= L - o.width, b *= l ? 1 : -1;
2183
2191
  }
@@ -2187,7 +2195,7 @@ function yn(e) {
2187
2195
  }, p && qi), T = c === !0 ? Fi({
2188
2196
  x: b,
2189
2197
  y: m
2190
- }, le(n)) : {
2198
+ }, se(n)) : {
2191
2199
  x: b,
2192
2200
  y: m
2193
2201
  };
@@ -2199,8 +2207,8 @@ function yn(e) {
2199
2207
  }
2200
2208
  function Wi(e) {
2201
2209
  var t = e.state, n = e.options, o = n.gpuAcceleration, r = o === void 0 ? !0 : o, a = n.adaptive, i = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, p = {
2202
- placement: ve(t.placement),
2203
- variation: Ge(t.placement),
2210
+ placement: we(t.placement),
2211
+ variation: nt(t.placement),
2204
2212
  popper: t.elements.popper,
2205
2213
  popperRect: t.rects.popper,
2206
2214
  gpuAcceleration: r,
@@ -2231,7 +2239,7 @@ var Tt = {
2231
2239
  passive: !0
2232
2240
  };
2233
2241
  function Gi(e) {
2234
- var t = e.state, n = e.instance, o = e.options, r = o.scroll, a = r === void 0 ? !0 : r, i = o.resize, s = i === void 0 ? !0 : i, l = le(t.elements.popper), p = [].concat(t.scrollParents.reference, t.scrollParents.popper);
2242
+ var t = e.state, n = e.instance, o = e.options, r = o.scroll, a = r === void 0 ? !0 : r, i = o.resize, s = i === void 0 ? !0 : i, l = se(t.elements.popper), p = [].concat(t.scrollParents.reference, t.scrollParents.popper);
2235
2243
  return a && p.forEach(function(c) {
2236
2244
  c.addEventListener("scroll", n.update, Tt);
2237
2245
  }), s && l.addEventListener("resize", n.update, Tt), function() {
@@ -2270,17 +2278,17 @@ function wn(e) {
2270
2278
  });
2271
2279
  }
2272
2280
  function cn(e) {
2273
- var t = le(e), n = t.pageXOffset, o = t.pageYOffset;
2281
+ var t = se(e), n = t.pageXOffset, o = t.pageYOffset;
2274
2282
  return {
2275
2283
  scrollLeft: n,
2276
2284
  scrollTop: o
2277
2285
  };
2278
2286
  }
2279
2287
  function un(e) {
2280
- return Ve(Ae(e)).left + cn(e).scrollLeft;
2288
+ return tt(Oe(e)).left + cn(e).scrollLeft;
2281
2289
  }
2282
2290
  function Ji(e, t) {
2283
- var n = le(e), o = Ae(e), r = n.visualViewport, a = o.clientWidth, i = o.clientHeight, s = 0, l = 0;
2291
+ var n = se(e), o = Oe(e), r = n.visualViewport, a = o.clientWidth, i = o.clientHeight, s = 0, l = 0;
2284
2292
  if (r) {
2285
2293
  a = r.width, i = r.height;
2286
2294
  var p = so();
@@ -2294,8 +2302,8 @@ function Ji(e, t) {
2294
2302
  };
2295
2303
  }
2296
2304
  function Zi(e) {
2297
- var t, n = Ae(e), o = cn(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, a = Re(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), i = Re(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), s = -o.scrollLeft + un(e), l = -o.scrollTop;
2298
- return Ce(r || n).direction === "rtl" && (s += Re(n.clientWidth, r ? r.clientWidth : 0) - a), {
2305
+ var t, n = Oe(e), o = cn(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, a = qe(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), i = qe(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), s = -o.scrollLeft + un(e), l = -o.scrollTop;
2306
+ return Se(r || n).direction === "rtl" && (s += qe(n.clientWidth, r ? r.clientWidth : 0) - a), {
2299
2307
  width: a,
2300
2308
  height: i,
2301
2309
  x: s,
@@ -2303,19 +2311,19 @@ function Zi(e) {
2303
2311
  };
2304
2312
  }
2305
2313
  function dn(e) {
2306
- var t = Ce(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
2314
+ var t = Se(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
2307
2315
  return /auto|scroll|overlay|hidden/.test(n + r + o);
2308
2316
  }
2309
2317
  function fo(e) {
2310
- return ["html", "body", "#document"].indexOf(me(e)) >= 0 ? e.ownerDocument.body : de(e) && dn(e) ? e : fo(_t(e));
2318
+ return ["html", "body", "#document"].indexOf(ke(e)) >= 0 ? e.ownerDocument.body : de(e) && dn(e) ? e : fo(_t(e));
2311
2319
  }
2312
- function rt(e, t) {
2320
+ function ct(e, t) {
2313
2321
  var n;
2314
2322
  t === void 0 && (t = []);
2315
- var o = fo(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a = le(o), i = r ? [a].concat(a.visualViewport || [], dn(o) ? o : []) : o, s = t.concat(i);
2323
+ var o = fo(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a = se(o), i = r ? [a].concat(a.visualViewport || [], dn(o) ? o : []) : o, s = t.concat(i);
2316
2324
  return r ? s : (
2317
2325
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
2318
- s.concat(rt(_t(i)))
2326
+ s.concat(ct(_t(i)))
2319
2327
  );
2320
2328
  }
2321
2329
  function Xt(e) {
@@ -2327,27 +2335,27 @@ function Xt(e) {
2327
2335
  });
2328
2336
  }
2329
2337
  function Qi(e, t) {
2330
- var n = Ve(e, !1, t === "fixed");
2338
+ var n = tt(e, !1, t === "fixed");
2331
2339
  return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
2332
2340
  }
2333
2341
  function kn(e, t, n) {
2334
- return t === ro ? Xt(Ji(e, n)) : Ee(t) ? Qi(t, n) : Xt(Zi(Ae(e)));
2342
+ return t === ro ? Xt(Ji(e, n)) : Fe(t) ? Qi(t, n) : Xt(Zi(Oe(e)));
2335
2343
  }
2336
2344
  function es(e) {
2337
- var t = rt(_t(e)), n = ["absolute", "fixed"].indexOf(Ce(e).position) >= 0, o = n && de(e) ? pt(e) : e;
2338
- return Ee(o) ? t.filter(function(r) {
2339
- return Ee(r) && lo(r, o) && me(r) !== "body";
2345
+ var t = ct(_t(e)), n = ["absolute", "fixed"].indexOf(Se(e).position) >= 0, o = n && de(e) ? mt(e) : e;
2346
+ return Fe(o) ? t.filter(function(r) {
2347
+ return Fe(r) && lo(r, o) && ke(r) !== "body";
2340
2348
  }) : [];
2341
2349
  }
2342
2350
  function ts(e, t, n, o) {
2343
2351
  var r = t === "clippingParents" ? es(e) : [].concat(t), a = [].concat(r, [n]), i = a[0], s = a.reduce(function(l, p) {
2344
2352
  var c = kn(e, p, o);
2345
- return l.top = Re(c.top, l.top), l.right = St(c.right, l.right), l.bottom = St(c.bottom, l.bottom), l.left = Re(c.left, l.left), l;
2353
+ return l.top = qe(c.top, l.top), l.right = St(c.right, l.right), l.bottom = St(c.bottom, l.bottom), l.left = qe(c.left, l.left), l;
2346
2354
  }, kn(e, i, o));
2347
2355
  return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
2348
2356
  }
2349
2357
  function ho(e) {
2350
- var t = e.reference, n = e.element, o = e.placement, r = o ? ve(o) : null, a = o ? Ge(o) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l;
2358
+ var t = e.reference, n = e.element, o = e.placement, r = o ? we(o) : null, a = o ? nt(o) : null, i = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l;
2351
2359
  switch (r) {
2352
2360
  case re:
2353
2361
  l = {
@@ -2383,59 +2391,59 @@ function ho(e) {
2383
2391
  if (p != null) {
2384
2392
  var c = p === "y" ? "height" : "width";
2385
2393
  switch (a) {
2386
- case Fe:
2394
+ case Qe:
2387
2395
  l[p] = l[p] - (t[c] / 2 - n[c] / 2);
2388
2396
  break;
2389
- case it:
2397
+ case dt:
2390
2398
  l[p] = l[p] + (t[c] / 2 - n[c] / 2);
2391
2399
  break;
2392
2400
  }
2393
2401
  }
2394
2402
  return l;
2395
2403
  }
2396
- function st(e, t) {
2404
+ function pt(e, t) {
2397
2405
  t === void 0 && (t = {});
2398
- var n = t, o = n.placement, r = o === void 0 ? e.placement : o, a = n.strategy, i = a === void 0 ? e.strategy : a, s = n.boundary, l = s === void 0 ? xi : s, p = n.rootBoundary, c = p === void 0 ? ro : p, g = n.elementContext, h = g === void 0 ? et : g, b = n.altBoundary, f = b === void 0 ? !1 : b, m = n.padding, C = m === void 0 ? 0 : m, k = uo(typeof C != "number" ? C : po(C, dt)), P = h === et ? Ci : et, x = e.rects.popper, d = e.elements[f ? P : h], A = ts(Ee(d) ? d : d.contextElement || Ae(e.elements.popper), l, c, i), w = Ve(e.elements.reference), M = ho({
2406
+ var n = t, o = n.placement, r = o === void 0 ? e.placement : o, a = n.strategy, i = a === void 0 ? e.strategy : a, s = n.boundary, l = s === void 0 ? xi : s, p = n.rootBoundary, c = p === void 0 ? ro : p, g = n.elementContext, h = g === void 0 ? at : g, b = n.altBoundary, f = b === void 0 ? !1 : b, m = n.padding, C = m === void 0 ? 0 : m, k = uo(typeof C != "number" ? C : po(C, vt)), P = h === at ? Ci : at, x = e.rects.popper, d = e.elements[f ? P : h], A = ts(Fe(d) ? d : d.contextElement || Oe(e.elements.popper), l, c, i), w = tt(e.elements.reference), M = ho({
2399
2407
  reference: w,
2400
2408
  element: x,
2401
2409
  placement: r
2402
- }), S = Xt(Object.assign({}, x, M)), R = h === et ? S : w, L = {
2403
- top: A.top - R.top + k.top,
2404
- bottom: R.bottom - A.bottom + k.bottom,
2405
- left: A.left - R.left + k.left,
2406
- right: R.right - A.right + k.right
2410
+ }), O = Xt(Object.assign({}, x, M)), _ = h === at ? O : w, L = {
2411
+ top: A.top - _.top + k.top,
2412
+ bottom: _.bottom - A.bottom + k.bottom,
2413
+ left: A.left - _.left + k.left,
2414
+ right: _.right - A.right + k.right
2407
2415
  }, v = e.modifiersData.offset;
2408
- if (h === et && v) {
2416
+ if (h === at && v) {
2409
2417
  var T = v[r];
2410
2418
  Object.keys(L).forEach(function(B) {
2411
- var H = [fe, pe].indexOf(B) >= 0 ? 1 : -1, z = [re, pe].indexOf(B) >= 0 ? "y" : "x";
2412
- L[B] += T[z] * H;
2419
+ var N = [fe, pe].indexOf(B) >= 0 ? 1 : -1, H = [re, pe].indexOf(B) >= 0 ? "y" : "x";
2420
+ L[B] += T[H] * N;
2413
2421
  });
2414
2422
  }
2415
2423
  return L;
2416
2424
  }
2417
2425
  function ns(e, t) {
2418
2426
  t === void 0 && (t = {});
2419
- var n = t, o = n.placement, r = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, p = l === void 0 ? ao : l, c = Ge(o), g = c ? s ? mn : mn.filter(function(f) {
2420
- return Ge(f) === c;
2421
- }) : dt, h = g.filter(function(f) {
2427
+ var n = t, o = n.placement, r = n.boundary, a = n.rootBoundary, i = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, p = l === void 0 ? ao : l, c = nt(o), g = c ? s ? mn : mn.filter(function(f) {
2428
+ return nt(f) === c;
2429
+ }) : vt, h = g.filter(function(f) {
2422
2430
  return p.indexOf(f) >= 0;
2423
2431
  });
2424
2432
  h.length === 0 && (h = g);
2425
2433
  var b = h.reduce(function(f, m) {
2426
- return f[m] = st(e, {
2434
+ return f[m] = pt(e, {
2427
2435
  placement: m,
2428
2436
  boundary: r,
2429
2437
  rootBoundary: a,
2430
2438
  padding: i
2431
- })[ve(m)], f;
2439
+ })[we(m)], f;
2432
2440
  }, {});
2433
2441
  return Object.keys(b).sort(function(f, m) {
2434
2442
  return b[f] - b[m];
2435
2443
  });
2436
2444
  }
2437
2445
  function os(e) {
2438
- if (ve(e) === rn)
2446
+ if (we(e) === rn)
2439
2447
  return [];
2440
2448
  var t = Mt(e);
2441
2449
  return [wn(e), t, wn(t)];
@@ -2443,49 +2451,49 @@ function os(e) {
2443
2451
  function rs(e) {
2444
2452
  var t = e.state, n = e.options, o = e.name;
2445
2453
  if (!t.modifiersData[o]._skip) {
2446
- for (var r = n.mainAxis, a = r === void 0 ? !0 : r, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, p = n.padding, c = n.boundary, g = n.rootBoundary, h = n.altBoundary, b = n.flipVariations, f = b === void 0 ? !0 : b, m = n.allowedAutoPlacements, C = t.options.placement, k = ve(C), P = k === C, x = l || (P || !f ? [Mt(C)] : os(C)), d = [C].concat(x).reduce(function(ne, J) {
2447
- return ne.concat(ve(J) === rn ? ns(t, {
2448
- placement: J,
2454
+ for (var r = n.mainAxis, a = r === void 0 ? !0 : r, i = n.altAxis, s = i === void 0 ? !0 : i, l = n.fallbackPlacements, p = n.padding, c = n.boundary, g = n.rootBoundary, h = n.altBoundary, b = n.flipVariations, f = b === void 0 ? !0 : b, m = n.allowedAutoPlacements, C = t.options.placement, k = we(C), P = k === C, x = l || (P || !f ? [Mt(C)] : os(C)), d = [C].concat(x).reduce(function(te, ne) {
2455
+ return te.concat(we(ne) === rn ? ns(t, {
2456
+ placement: ne,
2449
2457
  boundary: c,
2450
2458
  rootBoundary: g,
2451
2459
  padding: p,
2452
2460
  flipVariations: f,
2453
2461
  allowedAutoPlacements: m
2454
- }) : J);
2455
- }, []), A = t.rects.reference, w = t.rects.popper, M = /* @__PURE__ */ new Map(), S = !0, R = d[0], L = 0; L < d.length; L++) {
2456
- var v = d[L], T = ve(v), B = Ge(v) === Fe, H = [re, pe].indexOf(T) >= 0, z = H ? "width" : "height", U = st(t, {
2462
+ }) : ne);
2463
+ }, []), A = t.rects.reference, w = t.rects.popper, M = /* @__PURE__ */ new Map(), O = !0, _ = d[0], L = 0; L < d.length; L++) {
2464
+ var v = d[L], T = we(v), B = nt(v) === Qe, N = [re, pe].indexOf(T) >= 0, H = N ? "width" : "height", U = pt(t, {
2457
2465
  placement: v,
2458
2466
  boundary: c,
2459
2467
  rootBoundary: g,
2460
2468
  altBoundary: h,
2461
2469
  padding: p
2462
- }), V = H ? B ? fe : ae : B ? pe : re;
2463
- A[z] > w[z] && (V = Mt(V));
2464
- var F = Mt(V), O = [];
2465
- if (a && O.push(U[T] <= 0), s && O.push(U[V] <= 0, U[F] <= 0), O.every(function(ne) {
2466
- return ne;
2470
+ }), q = N ? B ? fe : ae : B ? pe : re;
2471
+ A[H] > w[H] && (q = Mt(q));
2472
+ var j = Mt(q), S = [];
2473
+ if (a && S.push(U[T] <= 0), s && S.push(U[q] <= 0, U[j] <= 0), S.every(function(te) {
2474
+ return te;
2467
2475
  })) {
2468
- R = v, S = !1;
2476
+ _ = v, O = !1;
2469
2477
  break;
2470
2478
  }
2471
- M.set(v, O);
2479
+ M.set(v, S);
2472
2480
  }
2473
- if (S)
2474
- for (var $ = f ? 3 : 1, K = function(J) {
2475
- var ie = d.find(function(ye) {
2476
- var ce = M.get(ye);
2481
+ if (O)
2482
+ for (var E = f ? 3 : 1, K = function(ne) {
2483
+ var le = d.find(function(Ce) {
2484
+ var ce = M.get(Ce);
2477
2485
  if (ce)
2478
- return ce.slice(0, J).every(function(Te) {
2486
+ return ce.slice(0, ne).every(function(Te) {
2479
2487
  return Te;
2480
2488
  });
2481
2489
  });
2482
- if (ie)
2483
- return R = ie, "break";
2484
- }, X = $; X > 0; X--) {
2485
- var Q = K(X);
2486
- if (Q === "break") break;
2490
+ if (le)
2491
+ return _ = le, "break";
2492
+ }, X = E; X > 0; X--) {
2493
+ var ee = K(X);
2494
+ if (ee === "break") break;
2487
2495
  }
2488
- t.placement !== R && (t.modifiersData[o]._skip = !0, t.placement = R, t.reset = !0);
2496
+ t.placement !== _ && (t.modifiersData[o]._skip = !0, t.placement = _, t.reset = !0);
2489
2497
  }
2490
2498
  }
2491
2499
  const as = {
@@ -2515,9 +2523,9 @@ function Cn(e) {
2515
2523
  });
2516
2524
  }
2517
2525
  function is(e) {
2518
- var t = e.state, n = e.name, o = t.rects.reference, r = t.rects.popper, a = t.modifiersData.preventOverflow, i = st(t, {
2526
+ var t = e.state, n = e.name, o = t.rects.reference, r = t.rects.popper, a = t.modifiersData.preventOverflow, i = pt(t, {
2519
2527
  elementContext: "reference"
2520
- }), s = st(t, {
2528
+ }), s = pt(t, {
2521
2529
  altBoundary: !0
2522
2530
  }), l = xn(i, o), p = xn(s, r, a), c = Cn(l), g = Cn(p);
2523
2531
  t.modifiersData[n] = {
@@ -2538,7 +2546,7 @@ const ss = {
2538
2546
  fn: is
2539
2547
  };
2540
2548
  function ls(e, t, n) {
2541
- var o = ve(e), r = [ae, re].indexOf(o) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, {
2549
+ var o = we(e), r = [ae, re].indexOf(o) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, {
2542
2550
  placement: e
2543
2551
  })) : n, i = a[0], s = a[1];
2544
2552
  return i = i || 0, s = (s || 0) * r, [ae, fe].indexOf(o) >= 0 ? {
@@ -2581,34 +2589,34 @@ function fs(e) {
2581
2589
  return e === "x" ? "y" : "x";
2582
2590
  }
2583
2591
  function hs(e) {
2584
- var t = e.state, n = e.options, o = e.name, r = n.mainAxis, a = r === void 0 ? !0 : r, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, p = n.rootBoundary, c = n.altBoundary, g = n.padding, h = n.tether, b = h === void 0 ? !0 : h, f = n.tetherOffset, m = f === void 0 ? 0 : f, C = st(t, {
2592
+ var t = e.state, n = e.options, o = e.name, r = n.mainAxis, a = r === void 0 ? !0 : r, i = n.altAxis, s = i === void 0 ? !1 : i, l = n.boundary, p = n.rootBoundary, c = n.altBoundary, g = n.padding, h = n.tether, b = h === void 0 ? !0 : h, f = n.tetherOffset, m = f === void 0 ? 0 : f, C = pt(t, {
2585
2593
  boundary: l,
2586
2594
  rootBoundary: p,
2587
2595
  padding: g,
2588
2596
  altBoundary: c
2589
- }), k = ve(t.placement), P = Ge(t.placement), x = !P, d = ln(k), A = fs(d), w = t.modifiersData.popperOffsets, M = t.rects.reference, S = t.rects.popper, R = typeof m == "function" ? m(Object.assign({}, t.rects, {
2597
+ }), k = we(t.placement), P = nt(t.placement), x = !P, d = ln(k), A = fs(d), w = t.modifiersData.popperOffsets, M = t.rects.reference, O = t.rects.popper, _ = typeof m == "function" ? m(Object.assign({}, t.rects, {
2590
2598
  placement: t.placement
2591
- })) : m, L = typeof R == "number" ? {
2592
- mainAxis: R,
2593
- altAxis: R
2599
+ })) : m, L = typeof _ == "number" ? {
2600
+ mainAxis: _,
2601
+ altAxis: _
2594
2602
  } : Object.assign({
2595
2603
  mainAxis: 0,
2596
2604
  altAxis: 0
2597
- }, R), v = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, T = {
2605
+ }, _), v = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, T = {
2598
2606
  x: 0,
2599
2607
  y: 0
2600
2608
  };
2601
2609
  if (w) {
2602
2610
  if (a) {
2603
- var B, H = d === "y" ? re : ae, z = d === "y" ? pe : fe, U = d === "y" ? "height" : "width", V = w[d], F = V + C[H], O = V - C[z], $ = b ? -S[U] / 2 : 0, K = P === Fe ? M[U] : S[U], X = P === Fe ? -S[U] : -M[U], Q = t.elements.arrow, ne = b && Q ? sn(Q) : {
2611
+ var B, N = d === "y" ? re : ae, H = d === "y" ? pe : fe, U = d === "y" ? "height" : "width", q = w[d], j = q + C[N], S = q - C[H], E = b ? -O[U] / 2 : 0, K = P === Qe ? M[U] : O[U], X = P === Qe ? -O[U] : -M[U], ee = t.elements.arrow, te = b && ee ? sn(ee) : {
2604
2612
  width: 0,
2605
2613
  height: 0
2606
- }, J = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : co(), ie = J[H], ye = J[z], ce = ot(0, M[U], ne[U]), Te = x ? M[U] / 2 - $ - ce - ie - L.mainAxis : K - ce - ie - L.mainAxis, he = x ? -M[U] / 2 + $ + ce + ye + L.mainAxis : X + ce + ye + L.mainAxis, ee = t.elements.arrow && pt(t.elements.arrow), ft = ee ? d === "y" ? ee.clientTop || 0 : ee.clientLeft || 0 : 0, Ke = (B = v == null ? void 0 : v[d]) != null ? B : 0, ht = V + Te - Ke - ft, bt = V + he - Ke, Xe = ot(b ? St(F, ht) : F, V, b ? Re(O, bt) : O);
2607
- w[d] = Xe, T[d] = Xe - V;
2614
+ }, ne = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : co(), le = ne[N], Ce = ne[H], ce = lt(0, M[U], te[U]), Te = x ? M[U] / 2 - E - ce - le - L.mainAxis : K - ce - le - L.mainAxis, he = x ? -M[U] / 2 + E + ce + Ce + L.mainAxis : X + ce + Ce + L.mainAxis, Le = t.elements.arrow && mt(t.elements.arrow), Ee = Le ? d === "y" ? Le.clientTop || 0 : Le.clientLeft || 0 : 0, Be = (B = v == null ? void 0 : v[d]) != null ? B : 0, _e = q + Te - Be - Ee, be = q + he - Be, Ae = lt(b ? St(j, _e) : j, q, b ? qe(S, be) : S);
2615
+ w[d] = Ae, T[d] = Ae - q;
2608
2616
  }
2609
2617
  if (s) {
2610
- var Je, vt = d === "x" ? re : ae, mt = d === "x" ? pe : fe, we = w[A], Le = A === "y" ? "height" : "width", Ze = we + C[vt], Pe = we - C[mt], Qe = [re, ae].indexOf(k) !== -1, gt = (Je = v == null ? void 0 : v[A]) != null ? Je : 0, yt = Qe ? Ze : we - M[Le] - S[Le] - gt + L.altAxis, wt = Qe ? we + M[Le] + S[Le] - gt - L.altAxis : Pe, kt = b && Qe ? Hi(yt, we, wt) : ot(b ? yt : Ze, we, b ? wt : Pe);
2611
- w[A] = kt, T[A] = kt - we;
2618
+ var De, Ne = d === "x" ? re : ae, ve = d === "x" ? pe : fe, me = w[A], ge = A === "y" ? "height" : "width", He = me + C[Ne], J = me - C[ve], rt = [re, ae].indexOf(k) !== -1, gt = (De = v == null ? void 0 : v[A]) != null ? De : 0, yt = rt ? He : me - M[ge] - O[ge] - gt + L.altAxis, wt = rt ? me + M[ge] + O[ge] - gt - L.altAxis : J, kt = b && rt ? Hi(yt, me, wt) : lt(b ? yt : He, me, b ? wt : J);
2619
+ w[A] = kt, T[A] = kt - me;
2612
2620
  }
2613
2621
  t.modifiersData[o] = T;
2614
2622
  }
@@ -2627,23 +2635,23 @@ function vs(e) {
2627
2635
  };
2628
2636
  }
2629
2637
  function ms(e) {
2630
- return e === le(e) || !de(e) ? cn(e) : vs(e);
2638
+ return e === se(e) || !de(e) ? cn(e) : vs(e);
2631
2639
  }
2632
2640
  function gs(e) {
2633
- var t = e.getBoundingClientRect(), n = We(t.width) / e.offsetWidth || 1, o = We(t.height) / e.offsetHeight || 1;
2641
+ var t = e.getBoundingClientRect(), n = et(t.width) / e.offsetWidth || 1, o = et(t.height) / e.offsetHeight || 1;
2634
2642
  return n !== 1 || o !== 1;
2635
2643
  }
2636
2644
  function ys(e, t, n) {
2637
2645
  n === void 0 && (n = !1);
2638
- var o = de(t), r = de(t) && gs(t), a = Ae(t), i = Ve(e, r, n), s = {
2646
+ var o = de(t), r = de(t) && gs(t), a = Oe(t), i = tt(e, r, n), s = {
2639
2647
  scrollLeft: 0,
2640
2648
  scrollTop: 0
2641
2649
  }, l = {
2642
2650
  x: 0,
2643
2651
  y: 0
2644
2652
  };
2645
- return (o || !o && !n) && ((me(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
2646
- dn(a)) && (s = ms(t)), de(t) ? (l = Ve(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = un(a))), {
2653
+ return (o || !o && !n) && ((ke(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
2654
+ dn(a)) && (s = ms(t)), de(t) ? (l = tt(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : a && (l.x = un(a))), {
2647
2655
  x: i.left + s.scrollLeft - l.x,
2648
2656
  y: i.top + s.scrollTop - l.y,
2649
2657
  width: i.width,
@@ -2732,8 +2740,8 @@ function Ts(e) {
2732
2740
  setOptions: function(k) {
2733
2741
  var P = typeof k == "function" ? k(c.options) : k;
2734
2742
  m(), c.options = Object.assign({}, a, c.options, P), c.scrollParents = {
2735
- reference: Ee(s) ? rt(s) : s.contextElement ? rt(s.contextElement) : [],
2736
- popper: rt(l)
2743
+ reference: Fe(s) ? ct(s) : s.contextElement ? ct(s.contextElement) : [],
2744
+ popper: ct(l)
2737
2745
  };
2738
2746
  var x = ks(Cs([].concat(o, c.options.modifiers)));
2739
2747
  return c.orderedModifiers = x.filter(function(d) {
@@ -2750,7 +2758,7 @@ function Ts(e) {
2750
2758
  var k = c.elements, P = k.reference, x = k.popper;
2751
2759
  if (Ln(P, x)) {
2752
2760
  c.rects = {
2753
- reference: ys(P, pt(x), c.options.strategy === "fixed"),
2761
+ reference: ys(P, mt(x), c.options.strategy === "fixed"),
2754
2762
  popper: sn(x)
2755
2763
  }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(L) {
2756
2764
  return c.modifiersData[L.name] = Object.assign({}, L.data);
@@ -2760,11 +2768,11 @@ function Ts(e) {
2760
2768
  c.reset = !1, d = -1;
2761
2769
  continue;
2762
2770
  }
2763
- var A = c.orderedModifiers[d], w = A.fn, M = A.options, S = M === void 0 ? {} : M, R = A.name;
2771
+ var A = c.orderedModifiers[d], w = A.fn, M = A.options, O = M === void 0 ? {} : M, _ = A.name;
2764
2772
  typeof w == "function" && (c = w({
2765
2773
  state: c,
2766
- options: S,
2767
- name: R,
2774
+ options: O,
2775
+ name: _,
2768
2776
  instance: b
2769
2777
  }) || c);
2770
2778
  }
@@ -2812,7 +2820,7 @@ function Ts(e) {
2812
2820
  }
2813
2821
  var Ls = [Yi, ps, Vi, io, us, as, bs, Ui, ss], Bs = /* @__PURE__ */ Ts({
2814
2822
  defaultModifiers: Ls
2815
- }), As = "tippy-box", bo = "tippy-content", Ms = "tippy-backdrop", vo = "tippy-arrow", mo = "tippy-svg-arrow", Ie = {
2823
+ }), As = "tippy-box", bo = "tippy-content", Ms = "tippy-backdrop", vo = "tippy-arrow", mo = "tippy-svg-arrow", je = {
2816
2824
  passive: !0,
2817
2825
  capture: !0
2818
2826
  }, go = function() {
@@ -2854,7 +2862,7 @@ function Ss(e, t) {
2854
2862
  function Ds(e) {
2855
2863
  return e.split(/\s+/).filter(Boolean);
2856
2864
  }
2857
- function qe(e) {
2865
+ function Ze(e) {
2858
2866
  return [].concat(e);
2859
2867
  }
2860
2868
  function An(e, t) {
@@ -2876,10 +2884,10 @@ function Mn(e) {
2876
2884
  return e[n] !== void 0 && (t[n] = e[n]), t;
2877
2885
  }, {});
2878
2886
  }
2879
- function at() {
2887
+ function ut() {
2880
2888
  return document.createElement("div");
2881
2889
  }
2882
- function lt(e) {
2890
+ function ft(e) {
2883
2891
  return ["Element", "Fragment"].some(function(t) {
2884
2892
  return pn(e, t);
2885
2893
  });
@@ -2894,7 +2902,7 @@ function _s(e) {
2894
2902
  return !!(e && e._tippy && e._tippy.reference === e);
2895
2903
  }
2896
2904
  function Ns(e) {
2897
- return lt(e) ? [e] : Rs(e) ? Dt(e) : Array.isArray(e) ? e : Dt(document.querySelectorAll(e));
2905
+ return ft(e) ? [e] : Rs(e) ? Dt(e) : Array.isArray(e) ? e : Dt(document.querySelectorAll(e));
2898
2906
  }
2899
2907
  function jt(e, t) {
2900
2908
  e.forEach(function(n) {
@@ -2907,7 +2915,7 @@ function Pn(e, t) {
2907
2915
  });
2908
2916
  }
2909
2917
  function Hs(e) {
2910
- var t, n = qe(e), o = n[0];
2918
+ var t, n = Ze(e), o = n[0];
2911
2919
  return o != null && (t = o.ownerDocument) != null && t.body ? o.ownerDocument : document;
2912
2920
  }
2913
2921
  function $s(e, t) {
@@ -2935,15 +2943,15 @@ function Sn(e, t) {
2935
2943
  }
2936
2944
  return !1;
2937
2945
  }
2938
- var be = {
2946
+ var ye = {
2939
2947
  isTouch: !1
2940
2948
  }, Dn = 0;
2941
2949
  function zs() {
2942
- be.isTouch || (be.isTouch = !0, window.performance && document.addEventListener("mousemove", wo));
2950
+ ye.isTouch || (ye.isTouch = !0, window.performance && document.addEventListener("mousemove", wo));
2943
2951
  }
2944
2952
  function wo() {
2945
2953
  var e = performance.now();
2946
- e - Dn < 20 && (be.isTouch = !1, document.removeEventListener("mousemove", wo)), Dn = e;
2954
+ e - Dn < 20 && (ye.isTouch = !1, document.removeEventListener("mousemove", wo)), Dn = e;
2947
2955
  }
2948
2956
  function js() {
2949
2957
  var e = document.activeElement;
@@ -2953,13 +2961,13 @@ function js() {
2953
2961
  }
2954
2962
  }
2955
2963
  function Us() {
2956
- document.addEventListener("touchstart", zs, Ie), window.addEventListener("blur", js);
2964
+ document.addEventListener("touchstart", zs, je), window.addEventListener("blur", js);
2957
2965
  }
2958
2966
  var qs = typeof window < "u" && typeof document < "u", Fs = qs ? (
2959
2967
  // @ts-ignore
2960
2968
  !!window.msCrypto
2961
2969
  ) : !1;
2962
- function Ue(e) {
2970
+ function Je(e) {
2963
2971
  var t = e === "destroy" ? "n already-" : " ";
2964
2972
  return [e + "() was called on a" + t + "destroyed instance. This is a no-op but", "indicates a potential memory leak."].join(" ");
2965
2973
  }
@@ -2987,21 +2995,21 @@ function ko(e) {
2987
2995
  "color: #a6a095;"
2988
2996
  ];
2989
2997
  }
2990
- var ct;
2998
+ var ht;
2991
2999
  process.env.NODE_ENV !== "production" && Vs();
2992
3000
  function Vs() {
2993
- ct = /* @__PURE__ */ new Set();
3001
+ ht = /* @__PURE__ */ new Set();
2994
3002
  }
2995
- function ke(e, t) {
2996
- if (e && !ct.has(t)) {
3003
+ function Me(e, t) {
3004
+ if (e && !ht.has(t)) {
2997
3005
  var n;
2998
- ct.add(t), (n = console).warn.apply(n, ko(t));
3006
+ ht.add(t), (n = console).warn.apply(n, ko(t));
2999
3007
  }
3000
3008
  }
3001
3009
  function Jt(e, t) {
3002
- if (e && !ct.has(t)) {
3010
+ if (e && !ht.has(t)) {
3003
3011
  var n;
3004
- ct.add(t), (n = console).error.apply(n, ko(t));
3012
+ ht.add(t), (n = console).error.apply(n, ko(t));
3005
3013
  }
3006
3014
  }
3007
3015
  function Gs(e) {
@@ -3023,7 +3031,7 @@ var xo = {
3023
3031
  role: "tooltip",
3024
3032
  theme: "",
3025
3033
  zIndex: 9999
3026
- }, se = Object.assign({
3034
+ }, ie = Object.assign({
3027
3035
  appendTo: go,
3028
3036
  aria: {
3029
3037
  content: "auto",
@@ -3071,11 +3079,11 @@ var xo = {
3071
3079
  touch: !0,
3072
3080
  trigger: "mouseenter focus",
3073
3081
  triggerTarget: null
3074
- }, xo, Ys), Ks = Object.keys(se), Xs = function(t) {
3082
+ }, xo, Ys), Ks = Object.keys(ie), Xs = function(t) {
3075
3083
  process.env.NODE_ENV !== "production" && To(t, []);
3076
3084
  var n = Object.keys(t);
3077
3085
  n.forEach(function(o) {
3078
- se[o] = t[o];
3086
+ ie[o] = t[o];
3079
3087
  });
3080
3088
  };
3081
3089
  function Co(e) {
@@ -3083,14 +3091,14 @@ function Co(e) {
3083
3091
  var a = r.name, i = r.defaultValue;
3084
3092
  if (a) {
3085
3093
  var s;
3086
- o[a] = e[a] !== void 0 ? e[a] : (s = se[a]) != null ? s : i;
3094
+ o[a] = e[a] !== void 0 ? e[a] : (s = ie[a]) != null ? s : i;
3087
3095
  }
3088
3096
  return o;
3089
3097
  }, {});
3090
3098
  return Object.assign({}, e, n);
3091
3099
  }
3092
3100
  function Js(e, t) {
3093
- var n = t ? Object.keys(Co(Object.assign({}, se, {
3101
+ var n = t ? Object.keys(Co(Object.assign({}, ie, {
3094
3102
  plugins: t
3095
3103
  }))) : Ks, o = n.reduce(function(r, a) {
3096
3104
  var i = (e.getAttribute("data-tippy-" + a) || "").trim();
@@ -3112,7 +3120,7 @@ function On(e, t) {
3112
3120
  var n = Object.assign({}, t, {
3113
3121
  content: yo(t.content, [e])
3114
3122
  }, t.ignoreAttributes ? {} : Js(e, t.plugins));
3115
- return n.aria = Object.assign({}, se.aria, n.aria), n.aria = {
3123
+ return n.aria = Object.assign({}, ie.aria, n.aria), n.aria = {
3116
3124
  expanded: n.aria.expanded === "auto" ? t.interactive : n.aria.expanded,
3117
3125
  content: n.aria.content === "auto" ? t.interactive ? null : "describedby" : n.aria.content
3118
3126
  }, n;
@@ -3121,10 +3129,10 @@ function To(e, t) {
3121
3129
  e === void 0 && (e = {}), t === void 0 && (t = []);
3122
3130
  var n = Object.keys(e);
3123
3131
  n.forEach(function(o) {
3124
- var r = Ss(se, Object.keys(xo)), a = !Ps(r, o);
3132
+ var r = Ss(ie, Object.keys(xo)), a = !Ps(r, o);
3125
3133
  a && (a = t.filter(function(i) {
3126
3134
  return i.name === o;
3127
- }).length === 0), ke(a, ["`" + o + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
3135
+ }).length === 0), Me(a, ["`" + o + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
3128
3136
 
3129
3137
  `, `All props: https://atomiks.github.io/tippyjs/v6/all-props/
3130
3138
  `, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
@@ -3137,11 +3145,11 @@ function Zt(e, t) {
3137
3145
  e[Zs()] = t;
3138
3146
  }
3139
3147
  function Rn(e) {
3140
- var t = at();
3141
- return e === !0 ? t.className = vo : (t.className = mo, lt(e) ? t.appendChild(e) : Zt(t, e)), t;
3148
+ var t = ut();
3149
+ return e === !0 ? t.className = vo : (t.className = mo, ft(e) ? t.appendChild(e) : Zt(t, e)), t;
3142
3150
  }
3143
3151
  function En(e, t) {
3144
- lt(t.content) ? (Zt(e, ""), e.appendChild(t.content)) : typeof t.content != "function" && (t.allowHTML ? Zt(e, t.content) : e.textContent = t.content);
3152
+ ft(t.content) ? (Zt(e, ""), e.appendChild(t.content)) : typeof t.content != "function" && (t.allowHTML ? Zt(e, t.content) : e.textContent = t.content);
3145
3153
  }
3146
3154
  function Qt(e) {
3147
3155
  var t = e.firstElementChild, n = Dt(t.children);
@@ -3159,9 +3167,9 @@ function Qt(e) {
3159
3167
  };
3160
3168
  }
3161
3169
  function Lo(e) {
3162
- var t = at(), n = at();
3170
+ var t = ut(), n = ut();
3163
3171
  n.className = As, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
3164
- var o = at();
3172
+ var o = ut();
3165
3173
  o.className = bo, o.setAttribute("data-state", "hidden"), En(o, e.props), t.appendChild(n), n.appendChild(o), r(e.props, e.props);
3166
3174
  function r(a, i) {
3167
3175
  var s = Qt(t), l = s.box, p = s.content, c = s.arrow;
@@ -3175,7 +3183,7 @@ function Lo(e) {
3175
3183
  Lo.$$tippy = !0;
3176
3184
  var Qs = 1, Lt = [], qt = [];
3177
3185
  function el(e, t) {
3178
- var n = On(e, Object.assign({}, se, Co(Mn(t)))), o, r, a, i = !1, s = !1, l = !1, p = !1, c, g, h, b = [], f = Bn(ht, n.interactiveDebounce), m, C = Qs++, k = null, P = Is(n.plugins), x = {
3186
+ var n = On(e, Object.assign({}, ie, Co(Mn(t)))), o, r, a, i = !1, s = !1, l = !1, p = !1, c, g, h, b = [], f = Bn(_e, n.interactiveDebounce), m, C = Qs++, k = null, P = Is(n.plugins), x = {
3179
3187
  // Is the instance currently enabled?
3180
3188
  isEnabled: !0,
3181
3189
  // Is the tippy currently showing and not transitioning out?
@@ -3190,7 +3198,7 @@ function el(e, t) {
3190
3198
  // properties
3191
3199
  id: C,
3192
3200
  reference: e,
3193
- popper: at(),
3201
+ popper: ut(),
3194
3202
  popperInstance: k,
3195
3203
  props: n,
3196
3204
  state: x,
@@ -3202,7 +3210,7 @@ function el(e, t) {
3202
3210
  show: Io,
3203
3211
  hide: Oo,
3204
3212
  hideWithInteractivity: Ro,
3205
- enable: Qe,
3213
+ enable: rt,
3206
3214
  disable: gt,
3207
3215
  unmount: Eo,
3208
3216
  destroy: _o
@@ -3211,13 +3219,13 @@ function el(e, t) {
3211
3219
  return process.env.NODE_ENV !== "production" && Jt(!0, "render() function has not been supplied."), d;
3212
3220
  var A = n.render(d), w = A.popper, M = A.onUpdate;
3213
3221
  w.setAttribute("data-tippy-root", ""), w.id = "tippy-" + d.id, d.popper = w, e._tippy = d, w._tippy = d;
3214
- var S = P.map(function(y) {
3222
+ var O = P.map(function(y) {
3215
3223
  return y.fn(d);
3216
- }), R = e.hasAttribute("aria-expanded");
3217
- return ee(), $(), V(), F("onCreate", [d]), n.showOnCreate && Ze(), w.addEventListener("mouseenter", function() {
3224
+ }), _ = e.hasAttribute("aria-expanded");
3225
+ return Le(), E(), q(), j("onCreate", [d]), n.showOnCreate && He(), w.addEventListener("mouseenter", function() {
3218
3226
  d.props.interactive && d.state.isVisible && d.clearDelayTimeouts();
3219
3227
  }), w.addEventListener("mouseleave", function() {
3220
- d.props.interactive && d.props.trigger.indexOf("mouseenter") >= 0 && H().addEventListener("mousemove", f);
3228
+ d.props.interactive && d.props.trigger.indexOf("mouseenter") >= 0 && N().addEventListener("mousemove", f);
3221
3229
  }), d;
3222
3230
  function L() {
3223
3231
  var y = d.props.touch;
@@ -3233,87 +3241,87 @@ function el(e, t) {
3233
3241
  function B() {
3234
3242
  return m || e;
3235
3243
  }
3236
- function H() {
3244
+ function N() {
3237
3245
  var y = B().parentNode;
3238
3246
  return y ? Hs(y) : document;
3239
3247
  }
3240
- function z() {
3248
+ function H() {
3241
3249
  return Qt(w);
3242
3250
  }
3243
3251
  function U(y) {
3244
- return d.state.isMounted && !d.state.isVisible || be.isTouch || c && c.type === "focus" ? 0 : zt(d.props.delay, y ? 0 : 1, se.delay);
3252
+ return d.state.isMounted && !d.state.isVisible || ye.isTouch || c && c.type === "focus" ? 0 : zt(d.props.delay, y ? 0 : 1, ie.delay);
3245
3253
  }
3246
- function V(y) {
3254
+ function q(y) {
3247
3255
  y === void 0 && (y = !1), w.style.pointerEvents = d.props.interactive && !y ? "" : "none", w.style.zIndex = "" + d.props.zIndex;
3248
3256
  }
3249
- function F(y, D, E) {
3250
- if (E === void 0 && (E = !0), S.forEach(function(j) {
3251
- j[y] && j[y].apply(j, D);
3252
- }), E) {
3253
- var q;
3254
- (q = d.props)[y].apply(q, D);
3257
+ function j(y, D, R) {
3258
+ if (R === void 0 && (R = !0), O.forEach(function(F) {
3259
+ F[y] && F[y].apply(F, D);
3260
+ }), R) {
3261
+ var W;
3262
+ (W = d.props)[y].apply(W, D);
3255
3263
  }
3256
3264
  }
3257
- function O() {
3265
+ function S() {
3258
3266
  var y = d.props.aria;
3259
3267
  if (y.content) {
3260
- var D = "aria-" + y.content, E = w.id, q = qe(d.props.triggerTarget || e);
3261
- q.forEach(function(j) {
3262
- var te = j.getAttribute(D);
3268
+ var D = "aria-" + y.content, R = w.id, W = Ze(d.props.triggerTarget || e);
3269
+ W.forEach(function(F) {
3270
+ var Q = F.getAttribute(D);
3263
3271
  if (d.state.isVisible)
3264
- j.setAttribute(D, te ? te + " " + E : E);
3272
+ F.setAttribute(D, Q ? Q + " " + R : R);
3265
3273
  else {
3266
- var ue = te && te.replace(E, "").trim();
3267
- ue ? j.setAttribute(D, ue) : j.removeAttribute(D);
3274
+ var ue = Q && Q.replace(R, "").trim();
3275
+ ue ? F.setAttribute(D, ue) : F.removeAttribute(D);
3268
3276
  }
3269
3277
  });
3270
3278
  }
3271
3279
  }
3272
- function $() {
3273
- if (!(R || !d.props.aria.expanded)) {
3274
- var y = qe(d.props.triggerTarget || e);
3280
+ function E() {
3281
+ if (!(_ || !d.props.aria.expanded)) {
3282
+ var y = Ze(d.props.triggerTarget || e);
3275
3283
  y.forEach(function(D) {
3276
3284
  d.props.interactive ? D.setAttribute("aria-expanded", d.state.isVisible && D === B() ? "true" : "false") : D.removeAttribute("aria-expanded");
3277
3285
  });
3278
3286
  }
3279
3287
  }
3280
3288
  function K() {
3281
- H().removeEventListener("mousemove", f), Lt = Lt.filter(function(y) {
3289
+ N().removeEventListener("mousemove", f), Lt = Lt.filter(function(y) {
3282
3290
  return y !== f;
3283
3291
  });
3284
3292
  }
3285
3293
  function X(y) {
3286
- if (!(be.isTouch && (l || y.type === "mousedown"))) {
3294
+ if (!(ye.isTouch && (l || y.type === "mousedown"))) {
3287
3295
  var D = y.composedPath && y.composedPath()[0] || y.target;
3288
3296
  if (!(d.props.interactive && Sn(w, D))) {
3289
- if (qe(d.props.triggerTarget || e).some(function(E) {
3290
- return Sn(E, D);
3297
+ if (Ze(d.props.triggerTarget || e).some(function(R) {
3298
+ return Sn(R, D);
3291
3299
  })) {
3292
- if (be.isTouch || d.state.isVisible && d.props.trigger.indexOf("click") >= 0)
3300
+ if (ye.isTouch || d.state.isVisible && d.props.trigger.indexOf("click") >= 0)
3293
3301
  return;
3294
3302
  } else
3295
- F("onClickOutside", [d, y]);
3303
+ j("onClickOutside", [d, y]);
3296
3304
  d.props.hideOnClick === !0 && (d.clearDelayTimeouts(), d.hide(), s = !0, setTimeout(function() {
3297
3305
  s = !1;
3298
- }), d.state.isMounted || ie());
3306
+ }), d.state.isMounted || le());
3299
3307
  }
3300
3308
  }
3301
3309
  }
3302
- function Q() {
3310
+ function ee() {
3303
3311
  l = !0;
3304
3312
  }
3305
- function ne() {
3313
+ function te() {
3306
3314
  l = !1;
3307
3315
  }
3308
- function J() {
3309
- var y = H();
3310
- y.addEventListener("mousedown", X, !0), y.addEventListener("touchend", X, Ie), y.addEventListener("touchstart", ne, Ie), y.addEventListener("touchmove", Q, Ie);
3316
+ function ne() {
3317
+ var y = N();
3318
+ y.addEventListener("mousedown", X, !0), y.addEventListener("touchend", X, je), y.addEventListener("touchstart", te, je), y.addEventListener("touchmove", ee, je);
3311
3319
  }
3312
- function ie() {
3313
- var y = H();
3314
- y.removeEventListener("mousedown", X, !0), y.removeEventListener("touchend", X, Ie), y.removeEventListener("touchstart", ne, Ie), y.removeEventListener("touchmove", Q, Ie);
3320
+ function le() {
3321
+ var y = N();
3322
+ y.removeEventListener("mousedown", X, !0), y.removeEventListener("touchend", X, je), y.removeEventListener("touchstart", te, je), y.removeEventListener("touchmove", ee, je);
3315
3323
  }
3316
- function ye(y, D) {
3324
+ function Ce(y, D) {
3317
3325
  Te(y, function() {
3318
3326
  !d.state.isVisible && w.parentNode && w.parentNode.contains(w) && D();
3319
3327
  });
@@ -3322,114 +3330,114 @@ function el(e, t) {
3322
3330
  Te(y, D);
3323
3331
  }
3324
3332
  function Te(y, D) {
3325
- var E = z().box;
3326
- function q(j) {
3327
- j.target === E && (Ut(E, "remove", q), D());
3333
+ var R = H().box;
3334
+ function W(F) {
3335
+ F.target === R && (Ut(R, "remove", W), D());
3328
3336
  }
3329
3337
  if (y === 0)
3330
3338
  return D();
3331
- Ut(E, "remove", g), Ut(E, "add", q), g = q;
3339
+ Ut(R, "remove", g), Ut(R, "add", W), g = W;
3332
3340
  }
3333
- function he(y, D, E) {
3334
- E === void 0 && (E = !1);
3335
- var q = qe(d.props.triggerTarget || e);
3336
- q.forEach(function(j) {
3337
- j.addEventListener(y, D, E), b.push({
3338
- node: j,
3341
+ function he(y, D, R) {
3342
+ R === void 0 && (R = !1);
3343
+ var W = Ze(d.props.triggerTarget || e);
3344
+ W.forEach(function(F) {
3345
+ F.addEventListener(y, D, R), b.push({
3346
+ node: F,
3339
3347
  eventType: y,
3340
3348
  handler: D,
3341
- options: E
3349
+ options: R
3342
3350
  });
3343
3351
  });
3344
3352
  }
3345
- function ee() {
3346
- v() && (he("touchstart", Ke, {
3353
+ function Le() {
3354
+ v() && (he("touchstart", Be, {
3347
3355
  passive: !0
3348
- }), he("touchend", bt, {
3356
+ }), he("touchend", be, {
3349
3357
  passive: !0
3350
3358
  })), Ds(d.props.trigger).forEach(function(y) {
3351
3359
  if (y !== "manual")
3352
- switch (he(y, Ke), y) {
3360
+ switch (he(y, Be), y) {
3353
3361
  case "mouseenter":
3354
- he("mouseleave", bt);
3362
+ he("mouseleave", be);
3355
3363
  break;
3356
3364
  case "focus":
3357
- he(Fs ? "focusout" : "blur", Xe);
3365
+ he(Fs ? "focusout" : "blur", Ae);
3358
3366
  break;
3359
3367
  case "focusin":
3360
- he("focusout", Xe);
3368
+ he("focusout", Ae);
3361
3369
  break;
3362
3370
  }
3363
3371
  });
3364
3372
  }
3365
- function ft() {
3373
+ function Ee() {
3366
3374
  b.forEach(function(y) {
3367
- var D = y.node, E = y.eventType, q = y.handler, j = y.options;
3368
- D.removeEventListener(E, q, j);
3375
+ var D = y.node, R = y.eventType, W = y.handler, F = y.options;
3376
+ D.removeEventListener(R, W, F);
3369
3377
  }), b = [];
3370
3378
  }
3371
- function Ke(y) {
3372
- var D, E = !1;
3373
- if (!(!d.state.isEnabled || Je(y) || s)) {
3374
- var q = ((D = c) == null ? void 0 : D.type) === "focus";
3375
- c = y, m = y.currentTarget, $(), !d.state.isVisible && Es(y) && Lt.forEach(function(j) {
3376
- return j(y);
3377
- }), y.type === "click" && (d.props.trigger.indexOf("mouseenter") < 0 || i) && d.props.hideOnClick !== !1 && d.state.isVisible ? E = !0 : Ze(y), y.type === "click" && (i = !E), E && !q && Pe(y);
3379
+ function Be(y) {
3380
+ var D, R = !1;
3381
+ if (!(!d.state.isEnabled || De(y) || s)) {
3382
+ var W = ((D = c) == null ? void 0 : D.type) === "focus";
3383
+ c = y, m = y.currentTarget, E(), !d.state.isVisible && Es(y) && Lt.forEach(function(F) {
3384
+ return F(y);
3385
+ }), y.type === "click" && (d.props.trigger.indexOf("mouseenter") < 0 || i) && d.props.hideOnClick !== !1 && d.state.isVisible ? R = !0 : He(y), y.type === "click" && (i = !R), R && !W && J(y);
3378
3386
  }
3379
3387
  }
3380
- function ht(y) {
3381
- var D = y.target, E = B().contains(D) || w.contains(D);
3382
- if (!(y.type === "mousemove" && E)) {
3383
- var q = Le().concat(w).map(function(j) {
3384
- var te, ue = j._tippy, $e = (te = ue.popperInstance) == null ? void 0 : te.state;
3385
- return $e ? {
3386
- popperRect: j.getBoundingClientRect(),
3387
- popperState: $e,
3388
+ function _e(y) {
3389
+ var D = y.target, R = B().contains(D) || w.contains(D);
3390
+ if (!(y.type === "mousemove" && R)) {
3391
+ var W = ge().concat(w).map(function(F) {
3392
+ var Q, ue = F._tippy, Ye = (Q = ue.popperInstance) == null ? void 0 : Q.state;
3393
+ return Ye ? {
3394
+ popperRect: F.getBoundingClientRect(),
3395
+ popperState: Ye,
3388
3396
  props: n
3389
3397
  } : null;
3390
3398
  }).filter(Boolean);
3391
- $s(q, y) && (K(), Pe(y));
3399
+ $s(W, y) && (K(), J(y));
3392
3400
  }
3393
3401
  }
3394
- function bt(y) {
3395
- var D = Je(y) || d.props.trigger.indexOf("click") >= 0 && i;
3402
+ function be(y) {
3403
+ var D = De(y) || d.props.trigger.indexOf("click") >= 0 && i;
3396
3404
  if (!D) {
3397
3405
  if (d.props.interactive) {
3398
3406
  d.hideWithInteractivity(y);
3399
3407
  return;
3400
3408
  }
3401
- Pe(y);
3409
+ J(y);
3402
3410
  }
3403
3411
  }
3404
- function Xe(y) {
3405
- d.props.trigger.indexOf("focusin") < 0 && y.target !== B() || d.props.interactive && y.relatedTarget && w.contains(y.relatedTarget) || Pe(y);
3412
+ function Ae(y) {
3413
+ d.props.trigger.indexOf("focusin") < 0 && y.target !== B() || d.props.interactive && y.relatedTarget && w.contains(y.relatedTarget) || J(y);
3406
3414
  }
3407
- function Je(y) {
3408
- return be.isTouch ? v() !== y.type.indexOf("touch") >= 0 : !1;
3415
+ function De(y) {
3416
+ return ye.isTouch ? v() !== y.type.indexOf("touch") >= 0 : !1;
3409
3417
  }
3410
- function vt() {
3411
- mt();
3412
- var y = d.props, D = y.popperOptions, E = y.placement, q = y.offset, j = y.getReferenceClientRect, te = y.moveTransition, ue = T() ? Qt(w).arrow : null, $e = j ? {
3413
- getBoundingClientRect: j,
3414
- contextElement: j.contextElement || B()
3418
+ function Ne() {
3419
+ ve();
3420
+ var y = d.props, D = y.popperOptions, R = y.placement, W = y.offset, F = y.getReferenceClientRect, Q = y.moveTransition, ue = T() ? Qt(w).arrow : null, Ye = F ? {
3421
+ getBoundingClientRect: F,
3422
+ contextElement: F.contextElement || B()
3415
3423
  } : e, hn = {
3416
3424
  name: "$$tippy",
3417
3425
  enabled: !0,
3418
3426
  phase: "beforeWrite",
3419
3427
  requires: ["computeStyles"],
3420
3428
  fn: function(xt) {
3421
- var ze = xt.state;
3429
+ var Ke = xt.state;
3422
3430
  if (T()) {
3423
- var No = z(), $t = No.box;
3431
+ var No = H(), $t = No.box;
3424
3432
  ["placement", "reference-hidden", "escaped"].forEach(function(Ct) {
3425
- Ct === "placement" ? $t.setAttribute("data-placement", ze.placement) : ze.attributes.popper["data-popper-" + Ct] ? $t.setAttribute("data-" + Ct, "") : $t.removeAttribute("data-" + Ct);
3426
- }), ze.attributes.popper = {};
3433
+ Ct === "placement" ? $t.setAttribute("data-placement", Ke.placement) : Ke.attributes.popper["data-popper-" + Ct] ? $t.setAttribute("data-" + Ct, "") : $t.removeAttribute("data-" + Ct);
3434
+ }), Ke.attributes.popper = {};
3427
3435
  }
3428
3436
  }
3429
- }, Se = [{
3437
+ }, $e = [{
3430
3438
  name: "offset",
3431
3439
  options: {
3432
- offset: q
3440
+ offset: W
3433
3441
  }
3434
3442
  }, {
3435
3443
  name: "preventOverflow",
@@ -3449,27 +3457,27 @@ function el(e, t) {
3449
3457
  }, {
3450
3458
  name: "computeStyles",
3451
3459
  options: {
3452
- adaptive: !te
3460
+ adaptive: !Q
3453
3461
  }
3454
3462
  }, hn];
3455
- T() && ue && Se.push({
3463
+ T() && ue && $e.push({
3456
3464
  name: "arrow",
3457
3465
  options: {
3458
3466
  element: ue,
3459
3467
  padding: 3
3460
3468
  }
3461
- }), Se.push.apply(Se, (D == null ? void 0 : D.modifiers) || []), d.popperInstance = Bs($e, w, Object.assign({}, D, {
3462
- placement: E,
3469
+ }), $e.push.apply($e, (D == null ? void 0 : D.modifiers) || []), d.popperInstance = Bs(Ye, w, Object.assign({}, D, {
3470
+ placement: R,
3463
3471
  onFirstUpdate: h,
3464
- modifiers: Se
3472
+ modifiers: $e
3465
3473
  }));
3466
3474
  }
3467
- function mt() {
3475
+ function ve() {
3468
3476
  d.popperInstance && (d.popperInstance.destroy(), d.popperInstance = null);
3469
3477
  }
3470
- function we() {
3471
- var y = d.props.appendTo, D, E = B();
3472
- d.props.interactive && y === go || y === "parent" ? D = E.parentNode : D = yo(y, [E]), D.contains(w) || D.appendChild(w), d.state.isMounted = !0, vt(), process.env.NODE_ENV !== "production" && ke(d.props.interactive && y === se.appendTo && E.nextElementSibling !== w, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
3478
+ function me() {
3479
+ var y = d.props.appendTo, D, R = B();
3480
+ d.props.interactive && y === go || y === "parent" ? D = R.parentNode : D = yo(y, [R]), D.contains(w) || D.appendChild(w), d.state.isMounted = !0, Ne(), process.env.NODE_ENV !== "production" && Me(d.props.interactive && y === ie.appendTo && R.nextElementSibling !== w, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
3473
3481
 
3474
3482
  `, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
3475
3483
 
@@ -3477,19 +3485,19 @@ function el(e, t) {
3477
3485
 
3478
3486
  `, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
3479
3487
  }
3480
- function Le() {
3488
+ function ge() {
3481
3489
  return Dt(w.querySelectorAll("[data-tippy-root]"));
3482
3490
  }
3483
- function Ze(y) {
3484
- d.clearDelayTimeouts(), y && F("onTrigger", [d, y]), J();
3485
- var D = U(!0), E = L(), q = E[0], j = E[1];
3486
- be.isTouch && q === "hold" && j && (D = j), D ? o = setTimeout(function() {
3491
+ function He(y) {
3492
+ d.clearDelayTimeouts(), y && j("onTrigger", [d, y]), ne();
3493
+ var D = U(!0), R = L(), W = R[0], F = R[1];
3494
+ ye.isTouch && W === "hold" && F && (D = F), D ? o = setTimeout(function() {
3487
3495
  d.show();
3488
3496
  }, D) : d.show();
3489
3497
  }
3490
- function Pe(y) {
3491
- if (d.clearDelayTimeouts(), F("onUntrigger", [d, y]), !d.state.isVisible) {
3492
- ie();
3498
+ function J(y) {
3499
+ if (d.clearDelayTimeouts(), j("onUntrigger", [d, y]), !d.state.isVisible) {
3500
+ le();
3493
3501
  return;
3494
3502
  }
3495
3503
  if (!(d.props.trigger.indexOf("mouseenter") >= 0 && d.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(y.type) >= 0 && i)) {
@@ -3501,7 +3509,7 @@ function el(e, t) {
3501
3509
  });
3502
3510
  }
3503
3511
  }
3504
- function Qe() {
3512
+ function rt() {
3505
3513
  d.state.isEnabled = !0;
3506
3514
  }
3507
3515
  function gt() {
@@ -3511,16 +3519,16 @@ function el(e, t) {
3511
3519
  clearTimeout(o), clearTimeout(r), cancelAnimationFrame(a);
3512
3520
  }
3513
3521
  function wt(y) {
3514
- if (process.env.NODE_ENV !== "production" && ke(d.state.isDestroyed, Ue("setProps")), !d.state.isDestroyed) {
3515
- F("onBeforeUpdate", [d, y]), ft();
3516
- var D = d.props, E = On(e, Object.assign({}, D, Mn(y), {
3522
+ if (process.env.NODE_ENV !== "production" && Me(d.state.isDestroyed, Je("setProps")), !d.state.isDestroyed) {
3523
+ j("onBeforeUpdate", [d, y]), Ee();
3524
+ var D = d.props, R = On(e, Object.assign({}, D, Mn(y), {
3517
3525
  ignoreAttributes: !0
3518
3526
  }));
3519
- d.props = E, ee(), D.interactiveDebounce !== E.interactiveDebounce && (K(), f = Bn(ht, E.interactiveDebounce)), D.triggerTarget && !E.triggerTarget ? qe(D.triggerTarget).forEach(function(q) {
3520
- q.removeAttribute("aria-expanded");
3521
- }) : E.triggerTarget && e.removeAttribute("aria-expanded"), $(), V(), M && M(D, E), d.popperInstance && (vt(), Le().forEach(function(q) {
3522
- requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
3523
- })), F("onAfterUpdate", [d, y]);
3527
+ d.props = R, Le(), D.interactiveDebounce !== R.interactiveDebounce && (K(), f = Bn(_e, R.interactiveDebounce)), D.triggerTarget && !R.triggerTarget ? Ze(D.triggerTarget).forEach(function(W) {
3528
+ W.removeAttribute("aria-expanded");
3529
+ }) : R.triggerTarget && e.removeAttribute("aria-expanded"), E(), q(), M && M(D, R), d.popperInstance && (Ne(), ge().forEach(function(W) {
3530
+ requestAnimationFrame(W._tippy.popperInstance.forceUpdate);
3531
+ })), j("onAfterUpdate", [d, y]);
3524
3532
  }
3525
3533
  }
3526
3534
  function kt(y) {
@@ -3529,62 +3537,62 @@ function el(e, t) {
3529
3537
  });
3530
3538
  }
3531
3539
  function Io() {
3532
- process.env.NODE_ENV !== "production" && ke(d.state.isDestroyed, Ue("show"));
3533
- var y = d.state.isVisible, D = d.state.isDestroyed, E = !d.state.isEnabled, q = be.isTouch && !d.props.touch, j = zt(d.props.duration, 0, se.duration);
3534
- if (!(y || D || E || q) && !B().hasAttribute("disabled") && (F("onShow", [d], !1), d.props.onShow(d) !== !1)) {
3535
- if (d.state.isVisible = !0, T() && (w.style.visibility = "visible"), V(), J(), d.state.isMounted || (w.style.transition = "none"), T()) {
3536
- var te = z(), ue = te.box, $e = te.content;
3537
- jt([ue, $e], 0);
3540
+ process.env.NODE_ENV !== "production" && Me(d.state.isDestroyed, Je("show"));
3541
+ var y = d.state.isVisible, D = d.state.isDestroyed, R = !d.state.isEnabled, W = ye.isTouch && !d.props.touch, F = zt(d.props.duration, 0, ie.duration);
3542
+ if (!(y || D || R || W) && !B().hasAttribute("disabled") && (j("onShow", [d], !1), d.props.onShow(d) !== !1)) {
3543
+ if (d.state.isVisible = !0, T() && (w.style.visibility = "visible"), q(), ne(), d.state.isMounted || (w.style.transition = "none"), T()) {
3544
+ var Q = H(), ue = Q.box, Ye = Q.content;
3545
+ jt([ue, Ye], 0);
3538
3546
  }
3539
3547
  h = function() {
3540
- var Se;
3548
+ var $e;
3541
3549
  if (!(!d.state.isVisible || p)) {
3542
3550
  if (p = !0, w.offsetHeight, w.style.transition = d.props.moveTransition, T() && d.props.animation) {
3543
- var Ht = z(), xt = Ht.box, ze = Ht.content;
3544
- jt([xt, ze], j), Pn([xt, ze], "visible");
3551
+ var Ht = H(), xt = Ht.box, Ke = Ht.content;
3552
+ jt([xt, Ke], F), Pn([xt, Ke], "visible");
3545
3553
  }
3546
- O(), $(), An(qt, d), (Se = d.popperInstance) == null || Se.forceUpdate(), F("onMount", [d]), d.props.animation && T() && ce(j, function() {
3547
- d.state.isShown = !0, F("onShown", [d]);
3554
+ S(), E(), An(qt, d), ($e = d.popperInstance) == null || $e.forceUpdate(), j("onMount", [d]), d.props.animation && T() && ce(F, function() {
3555
+ d.state.isShown = !0, j("onShown", [d]);
3548
3556
  });
3549
3557
  }
3550
- }, we();
3558
+ }, me();
3551
3559
  }
3552
3560
  }
3553
3561
  function Oo() {
3554
- process.env.NODE_ENV !== "production" && ke(d.state.isDestroyed, Ue("hide"));
3555
- var y = !d.state.isVisible, D = d.state.isDestroyed, E = !d.state.isEnabled, q = zt(d.props.duration, 1, se.duration);
3556
- if (!(y || D || E) && (F("onHide", [d], !1), d.props.onHide(d) !== !1)) {
3557
- if (d.state.isVisible = !1, d.state.isShown = !1, p = !1, i = !1, T() && (w.style.visibility = "hidden"), K(), ie(), V(!0), T()) {
3558
- var j = z(), te = j.box, ue = j.content;
3559
- d.props.animation && (jt([te, ue], q), Pn([te, ue], "hidden"));
3562
+ process.env.NODE_ENV !== "production" && Me(d.state.isDestroyed, Je("hide"));
3563
+ var y = !d.state.isVisible, D = d.state.isDestroyed, R = !d.state.isEnabled, W = zt(d.props.duration, 1, ie.duration);
3564
+ if (!(y || D || R) && (j("onHide", [d], !1), d.props.onHide(d) !== !1)) {
3565
+ if (d.state.isVisible = !1, d.state.isShown = !1, p = !1, i = !1, T() && (w.style.visibility = "hidden"), K(), le(), q(!0), T()) {
3566
+ var F = H(), Q = F.box, ue = F.content;
3567
+ d.props.animation && (jt([Q, ue], W), Pn([Q, ue], "hidden"));
3560
3568
  }
3561
- O(), $(), d.props.animation ? T() && ye(q, d.unmount) : d.unmount();
3569
+ S(), E(), d.props.animation ? T() && Ce(W, d.unmount) : d.unmount();
3562
3570
  }
3563
3571
  }
3564
3572
  function Ro(y) {
3565
- process.env.NODE_ENV !== "production" && ke(d.state.isDestroyed, Ue("hideWithInteractivity")), H().addEventListener("mousemove", f), An(Lt, f), f(y);
3573
+ process.env.NODE_ENV !== "production" && Me(d.state.isDestroyed, Je("hideWithInteractivity")), N().addEventListener("mousemove", f), An(Lt, f), f(y);
3566
3574
  }
3567
3575
  function Eo() {
3568
- process.env.NODE_ENV !== "production" && ke(d.state.isDestroyed, Ue("unmount")), d.state.isVisible && d.hide(), d.state.isMounted && (mt(), Le().forEach(function(y) {
3576
+ process.env.NODE_ENV !== "production" && Me(d.state.isDestroyed, Je("unmount")), d.state.isVisible && d.hide(), d.state.isMounted && (ve(), ge().forEach(function(y) {
3569
3577
  y._tippy.unmount();
3570
3578
  }), w.parentNode && w.parentNode.removeChild(w), qt = qt.filter(function(y) {
3571
3579
  return y !== d;
3572
- }), d.state.isMounted = !1, F("onHidden", [d]));
3580
+ }), d.state.isMounted = !1, j("onHidden", [d]));
3573
3581
  }
3574
3582
  function _o() {
3575
- process.env.NODE_ENV !== "production" && ke(d.state.isDestroyed, Ue("destroy")), !d.state.isDestroyed && (d.clearDelayTimeouts(), d.unmount(), ft(), delete e._tippy, d.state.isDestroyed = !0, F("onDestroy", [d]));
3583
+ process.env.NODE_ENV !== "production" && Me(d.state.isDestroyed, Je("destroy")), !d.state.isDestroyed && (d.clearDelayTimeouts(), d.unmount(), Ee(), delete e._tippy, d.state.isDestroyed = !0, j("onDestroy", [d]));
3576
3584
  }
3577
3585
  }
3578
- function Me(e, t) {
3586
+ function Re(e, t) {
3579
3587
  t === void 0 && (t = {});
3580
- var n = se.plugins.concat(t.plugins || []);
3588
+ var n = ie.plugins.concat(t.plugins || []);
3581
3589
  process.env.NODE_ENV !== "production" && (Gs(e), To(t, n)), Us();
3582
3590
  var o = Object.assign({}, t, {
3583
3591
  plugins: n
3584
3592
  }), r = Ns(e);
3585
3593
  if (process.env.NODE_ENV !== "production") {
3586
- var a = lt(o.content), i = r.length > 1;
3587
- ke(a && i, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
3594
+ var a = ft(o.content), i = r.length > 1;
3595
+ Me(a && i, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
3588
3596
 
3589
3597
  `, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
3590
3598
 
@@ -3595,11 +3603,11 @@ function Me(e, t) {
3595
3603
  var c = p && el(p, o);
3596
3604
  return c && l.push(c), l;
3597
3605
  }, []);
3598
- return lt(e) ? s[0] : s;
3606
+ return ft(e) ? s[0] : s;
3599
3607
  }
3600
- Me.defaultProps = se;
3601
- Me.setDefaultProps = Xs;
3602
- Me.currentInput = be;
3608
+ Re.defaultProps = ie;
3609
+ Re.setDefaultProps = Xs;
3610
+ Re.currentInput = ye;
3603
3611
  Object.assign({}, io, {
3604
3612
  effect: function(t) {
3605
3613
  var n = t.state, o = {
@@ -3617,10 +3625,10 @@ Object.assign({}, io, {
3617
3625
  Object.assign(n.elements.popper.style, o.popper), n.styles = o, n.elements.arrow && Object.assign(n.elements.arrow.style, o.arrow);
3618
3626
  }
3619
3627
  });
3620
- Me.setDefaultProps({
3628
+ Re.setDefaultProps({
3621
3629
  render: Lo
3622
3630
  });
3623
- const _ = {
3631
+ const $ = {
3624
3632
  // Colors - all use CSS custom properties
3625
3633
  colors: {
3626
3634
  background: "var(--pubwave-color-background)",
@@ -3771,7 +3779,7 @@ const _ = {
3771
3779
  }
3772
3780
  }
3773
3781
  `, kc = tl;
3774
- function Ye(...e) {
3782
+ function ot(...e) {
3775
3783
  return e.filter(Boolean).join(" ");
3776
3784
  }
3777
3785
  const Pt = {
@@ -3852,7 +3860,7 @@ function nl(e = Yt, t, n) {
3852
3860
  groupLabels: r
3853
3861
  },
3854
3862
  editor: this.editor
3855
- }), p.clientRect && (l = Me("body", {
3863
+ }), p.clientRect && (l = Re("body", {
3856
3864
  getReferenceClientRect: p.clientRect,
3857
3865
  appendTo: () => document.body,
3858
3866
  content: s.element,
@@ -3861,7 +3869,7 @@ function nl(e = Yt, t, n) {
3861
3869
  trigger: "manual",
3862
3870
  placement: "bottom-start",
3863
3871
  offset: [0, 8],
3864
- zIndex: _.zIndex.dropdown,
3872
+ zIndex: $.zIndex.dropdown,
3865
3873
  arrow: !1,
3866
3874
  // Disable animations to prevent black block flash
3867
3875
  duration: [0, 0],
@@ -3886,7 +3894,7 @@ function nl(e = Yt, t, n) {
3886
3894
  },
3887
3895
  onShow(c) {
3888
3896
  const g = c.popper.querySelector(".tippy-box");
3889
- g && (g.style.zIndex = String(_.zIndex.dropdown), g.style.backgroundColor = "transparent", g.style.background = "transparent", g.style.border = "none");
3897
+ g && (g.style.zIndex = String($.zIndex.dropdown), g.style.backgroundColor = "transparent", g.style.background = "transparent", g.style.border = "none");
3890
3898
  const h = c.popper.querySelector(".pubwave-slash-menu");
3891
3899
  if (h) {
3892
3900
  const b = document.querySelector(".ProseMirror");
@@ -3933,7 +3941,7 @@ function nl(e = Yt, t, n) {
3933
3941
  });
3934
3942
  }
3935
3943
  const ol = Vt.forwardRef(function({ items: t, command: n, query: o = "", groupLabels: r }, a) {
3936
- const [i, s] = W(-1), l = G(null), p = G(null);
3944
+ const [i, s] = V(-1), l = G(null), p = G(null);
3937
3945
  Y(() => {
3938
3946
  t.length > 0 && o.length > 0 ? s(0) : (t.length, s(-1));
3939
3947
  }, [t, o]), Ga(i, l, p);
@@ -3944,7 +3952,7 @@ const ol = Vt.forwardRef(function({ items: t, command: n, query: o = "", groupLa
3944
3952
  C.push(m), f[m.group] = C;
3945
3953
  }
3946
3954
  return f;
3947
- }, [t]), g = t, h = N(
3955
+ }, [t]), g = t, h = z(
3948
3956
  (f) => {
3949
3957
  const m = g[f];
3950
3958
  m && n(m);
@@ -3997,7 +4005,7 @@ const ol = Vt.forwardRef(function({ items: t, command: n, query: o = "", groupLa
3997
4005
  dropPosition: null,
3998
4006
  cancelled: !1
3999
4007
  };
4000
- function Oe(e, t) {
4008
+ function Ue(e, t) {
4001
4009
  switch (t.type) {
4002
4010
  case "START_DRAG":
4003
4011
  return {
@@ -4156,7 +4164,7 @@ function al(e) {
4156
4164
  },
4157
4165
  props: {
4158
4166
  handleKeyDown(n, o) {
4159
- return o.key === "Escape" && t.draggingBlockId ? (t = Oe(t, { type: "CANCEL_DRAG" }), n.dispatch(n.state.tr.setMeta(oe, t)), !0) : !1;
4167
+ return o.key === "Escape" && t.draggingBlockId ? (t = Ue(t, { type: "CANCEL_DRAG" }), n.dispatch(n.state.tr.setMeta(oe, t)), !0) : !1;
4160
4168
  },
4161
4169
  handleDOMEvents: {
4162
4170
  dragover(n, o) {
@@ -4167,11 +4175,11 @@ function al(e) {
4167
4175
  n.state
4168
4176
  ) ?? t;
4169
4177
  const a = _n(n, o);
4170
- return a ? (t = Oe(t, {
4178
+ return a ? (t = Ue(t, {
4171
4179
  type: "UPDATE_DROP_TARGET",
4172
4180
  pos: a.pos,
4173
4181
  position: a.position
4174
- }), n.dispatch(n.state.tr.setMeta(oe, t))) : t.dropTargetPos !== null && (t = Oe(t, {
4182
+ }), n.dispatch(n.state.tr.setMeta(oe, t))) : t.dropTargetPos !== null && (t = Ue(t, {
4175
4183
  type: "UPDATE_DROP_TARGET",
4176
4184
  pos: null,
4177
4185
  position: null
@@ -4206,11 +4214,11 @@ function al(e) {
4206
4214
  p,
4207
4215
  c
4208
4216
  );
4209
- return t = Oe(t, { type: "COMPLETE_DRAG" }), n.dispatch(n.state.tr.setMeta(oe, t)), g;
4217
+ return t = Ue(t, { type: "COMPLETE_DRAG" }), n.dispatch(n.state.tr.setMeta(oe, t)), g;
4210
4218
  },
4211
4219
  dragleave(n, o) {
4212
4220
  const r = o.relatedTarget;
4213
- return r != null && r.closest(".pubwave-editor") || (t = Oe(t, {
4221
+ return r != null && r.closest(".pubwave-editor") || (t = Ue(t, {
4214
4222
  type: "UPDATE_DROP_TARGET",
4215
4223
  pos: null,
4216
4224
  position: null
@@ -4224,11 +4232,11 @@ function Bo(e) {
4224
4232
  return oe.getState(e.state) ?? It;
4225
4233
  }
4226
4234
  function il(e, t, n) {
4227
- const { view: o } = e, r = { type: "START_DRAG", blockId: t, pos: n }, a = Oe(Bo(e), r);
4235
+ const { view: o } = e, r = { type: "START_DRAG", blockId: t, pos: n }, a = Ue(Bo(e), r);
4228
4236
  o.dispatch(o.state.tr.setMeta(oe, a));
4229
4237
  }
4230
4238
  function xc(e) {
4231
- const { view: t } = e, n = { type: "CANCEL_DRAG" }, o = Oe(Bo(e), n);
4239
+ const { view: t } = e, n = { type: "CANCEL_DRAG" }, o = Ue(Bo(e), n);
4232
4240
  t.dispatch(t.state.tr.setMeta(oe, o));
4233
4241
  }
4234
4242
  const Cc = [
@@ -4475,23 +4483,23 @@ const Rt = {
4475
4483
  toolbar: "Text formatting toolbar",
4476
4484
  // Drag and Drop
4477
4485
  dragHandle: "Drag to reorder block"
4478
- }, tt = {
4486
+ }, it = {
4479
4487
  bold: "Cmd+B",
4480
4488
  italic: "Cmd+I",
4481
4489
  underline: "Cmd+U",
4482
4490
  strike: "Cmd+Shift+X",
4483
4491
  code: "Cmd+E"
4484
4492
  };
4485
- function Be(e, t) {
4493
+ function Ie(e, t) {
4486
4494
  return t ? `${e} (${t})` : e;
4487
4495
  }
4488
- const xe = Vt.forwardRef(
4496
+ const Pe = Vt.forwardRef(
4489
4497
  ({ active: e = !1, disabled: t = !1, onClick: n, "data-tooltip": o, "data-testid": r, "aria-label": a, children: i, style: s }, l) => /* @__PURE__ */ u(
4490
4498
  "button",
4491
4499
  {
4492
4500
  ref: l,
4493
4501
  type: "button",
4494
- className: Ye(
4502
+ className: ot(
4495
4503
  "pubwave-toolbar__button",
4496
4504
  e && "pubwave-toolbar__button--active",
4497
4505
  t && "pubwave-toolbar__button--disabled"
@@ -4528,7 +4536,7 @@ const xe = Vt.forwardRef(
4528
4536
  }
4529
4537
  )
4530
4538
  );
4531
- xe.displayName = "ToolbarButton";
4539
+ Pe.displayName = "ToolbarButton";
4532
4540
  function Nn() {
4533
4541
  return /* @__PURE__ */ u(
4534
4542
  "div",
@@ -4583,7 +4591,7 @@ function fn({
4583
4591
  onClick: l,
4584
4592
  "data-testid": p
4585
4593
  }) {
4586
- const [c, g] = W("top"), [h, b] = W(null), f = G(null);
4594
+ const [c, g] = V("top"), [h, b] = V(null), f = G(null);
4587
4595
  if (Y(() => {
4588
4596
  if (!e || !t.current) return;
4589
4597
  const C = () => {
@@ -4592,8 +4600,8 @@ function fn({
4592
4600
  g(A);
4593
4601
  let w = t.current.parentElement;
4594
4602
  for (; w; ) {
4595
- const S = window.getComputedStyle(w);
4596
- if (S.position === "relative" || S.position === "absolute" || S.position === "fixed")
4603
+ const O = window.getComputedStyle(w);
4604
+ if (O.position === "relative" || O.position === "absolute" || O.position === "fixed")
4597
4605
  break;
4598
4606
  w = w.parentElement;
4599
4607
  }
@@ -4604,8 +4612,8 @@ function fn({
4604
4612
  i
4605
4613
  );
4606
4614
  if (w) {
4607
- const S = w.getBoundingClientRect(), R = M.left - S.left;
4608
- b({ align: M.align, left: R });
4615
+ const O = w.getBoundingClientRect(), _ = M.left - O.left;
4616
+ b({ align: M.align, left: _ });
4609
4617
  } else
4610
4618
  b(M);
4611
4619
  };
@@ -4671,7 +4679,7 @@ function fn({
4671
4679
  );
4672
4680
  }
4673
4681
  function dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
4674
- const r = _e(), a = G(null), i = N(() => e.isActive("heading", { level: 1 }) ? "heading1" : e.isActive("heading", { level: 2 }) ? "heading2" : e.isActive("heading", { level: 3 }) ? "heading3" : e.isActive("bulletList") ? "bulletList" : e.isActive("orderedList") ? "orderedList" : e.isActive("taskList") ? "taskList" : e.isActive("blockquote") ? "blockquote" : e.isActive("codeBlock") ? "codeBlock" : "paragraph", [e]), s = nn(
4682
+ const r = We(), a = G(null), i = z(() => e.isActive("heading", { level: 1 }) ? "heading1" : e.isActive("heading", { level: 2 }) ? "heading2" : e.isActive("heading", { level: 3 }) ? "heading3" : e.isActive("bulletList") ? "bulletList" : e.isActive("orderedList") ? "orderedList" : e.isActive("taskList") ? "taskList" : e.isActive("blockquote") ? "blockquote" : e.isActive("codeBlock") ? "codeBlock" : "paragraph", [e]), s = nn(
4675
4683
  () => [
4676
4684
  {
4677
4685
  id: "paragraph",
@@ -4717,7 +4725,7 @@ function dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
4717
4725
  }
4718
4726
  ],
4719
4727
  [r]
4720
- ), l = i(), p = s.find((h) => h.id === l), c = N(
4728
+ ), l = i(), p = s.find((h) => h.id === l), c = z(
4721
4729
  (h) => {
4722
4730
  h.action(e), o(), setTimeout(() => {
4723
4731
  e.chain().blur().run();
@@ -4727,12 +4735,12 @@ function dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
4727
4735
  ), g = (h) => h === r.toolbar.blockTypes.heading1 ? r.toolbar.blockTypes.heading1 : h === r.toolbar.blockTypes.heading2 ? r.toolbar.blockTypes.heading2 : h === r.toolbar.blockTypes.heading3 ? r.toolbar.blockTypes.heading3 : h === r.toolbar.blockTypes.bulletedList ? r.toolbar.blockTypes.bulletedList : h === r.toolbar.blockTypes.numberedList ? r.toolbar.blockTypes.numberedList : r.toolbar.blockTypes.text;
4728
4736
  return /* @__PURE__ */ I("div", { style: { position: "relative" }, children: [
4729
4737
  /* @__PURE__ */ u(
4730
- xe,
4738
+ Pe,
4731
4739
  {
4732
4740
  ref: a,
4733
4741
  active: t,
4734
4742
  onClick: n,
4735
- "data-tooltip": Be(r.toolbar.turnInto),
4743
+ "data-tooltip": Ie(r.toolbar.turnInto),
4736
4744
  "data-testid": "toolbar-turnInto",
4737
4745
  "aria-label": r.aria.turnIntoButton,
4738
4746
  style: { width: "auto", minWidth: "auto", padding: "0 8px", height: "var(--pubwave-button-height, 28px)" },
@@ -4759,7 +4767,7 @@ function dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
4759
4767
  boxShadow: "var(--pubwave-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05))",
4760
4768
  padding: "var(--pubwave-spacing-1, 4px)",
4761
4769
  minWidth: "240px",
4762
- zIndex: _.zIndex.dropdown + 1
4770
+ zIndex: $.zIndex.dropdown + 1
4763
4771
  },
4764
4772
  children: [
4765
4773
  /* @__PURE__ */ u("div", { style: Pt, children: r.toolbar.turnInto }),
@@ -4769,7 +4777,7 @@ function dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
4769
4777
  "button",
4770
4778
  {
4771
4779
  type: "button",
4772
- className: Ye(
4780
+ className: ot(
4773
4781
  "pubwave-toolbar__turn-into-option",
4774
4782
  b && "pubwave-toolbar__turn-into-option--active"
4775
4783
  ),
@@ -4814,12 +4822,12 @@ function dl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
4814
4822
  )
4815
4823
  ] });
4816
4824
  }
4817
- function ge(e) {
4825
+ function xe(e) {
4818
4826
  return !!(e && !e.isDestroyed);
4819
4827
  }
4820
4828
  function Xc(e, t) {
4821
- ge(e) && Z(() => {
4822
- if (ge(e))
4829
+ xe(e) && Z(() => {
4830
+ if (xe(e))
4823
4831
  switch (t) {
4824
4832
  case "start":
4825
4833
  e.commands.focus("start");
@@ -4835,18 +4843,18 @@ function Xc(e, t) {
4835
4843
  }
4836
4844
  });
4837
4845
  }
4838
- function Ne(e) {
4839
- ge(e) && Z(() => {
4840
- ge(e) && (e.isFocused || e.commands.focus());
4846
+ function Ve(e) {
4847
+ xe(e) && Z(() => {
4848
+ xe(e) && (e.isFocused || e.commands.focus());
4841
4849
  });
4842
4850
  }
4843
4851
  function Jc(e, t) {
4844
- ge(e) && (t.preventDefault(), Z(() => {
4845
- ge(e) && e.commands.focus();
4852
+ xe(e) && (t.preventDefault(), Z(() => {
4853
+ xe(e) && e.commands.focus();
4846
4854
  }));
4847
4855
  }
4848
4856
  function Zc(e) {
4849
- if (!ge(e))
4857
+ if (!xe(e))
4850
4858
  return function() {
4851
4859
  };
4852
4860
  const t = (o) => {
@@ -4863,17 +4871,17 @@ function Zc(e) {
4863
4871
  };
4864
4872
  }
4865
4873
  function pl(e) {
4866
- if (!ge(e)) return null;
4874
+ if (!xe(e)) return null;
4867
4875
  const { from: t, to: n, empty: o } = e.state.selection;
4868
4876
  return { from: t, to: n, empty: o };
4869
4877
  }
4870
4878
  function Bt(e, t) {
4871
- if (!ge(e) || !t) return;
4879
+ if (!xe(e) || !t) return;
4872
4880
  const { from: n, to: o } = t, r = e.state.doc.content.size, a = Math.min(n, r), i = Math.min(o, r);
4873
4881
  e.commands.setTextSelection({ from: a, to: i });
4874
4882
  }
4875
4883
  function Qc(e) {
4876
- if (!ge(e)) return;
4884
+ if (!xe(e)) return;
4877
4885
  const { selection: t } = e.state;
4878
4886
  if (t.$anchor.pos > 0) {
4879
4887
  e.commands.focus();
@@ -4897,7 +4905,7 @@ function eu(e) {
4897
4905
  };
4898
4906
  }
4899
4907
  function fl({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }) {
4900
- const a = _e(), i = G(null), s = G(null), l = G(null), p = G([]), c = G(null), [g, h] = W(""), b = (r == null ? void 0 : r.hasLink) ?? !1, f = (r == null ? void 0 : r.linkHref) ?? null;
4908
+ const a = We(), i = G(null), s = G(null), l = G(null), p = G([]), c = G(null), [g, h] = V(""), b = (r == null ? void 0 : r.hasLink) ?? !1, f = (r == null ? void 0 : r.linkHref) ?? null;
4901
4909
  Y(() => {
4902
4910
  t ? (c.current = pl(e), h(f || ""), setTimeout(() => {
4903
4911
  var x, d;
@@ -4915,7 +4923,7 @@ function fl({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }
4915
4923
  l.current.querySelectorAll("[data-tooltip]").forEach((d) => {
4916
4924
  const A = d.getAttribute("data-tooltip");
4917
4925
  if (A) {
4918
- const w = Me(d, {
4926
+ const w = Re(d, {
4919
4927
  content: A,
4920
4928
  placement: "top",
4921
4929
  delay: [300, 0],
@@ -4931,7 +4939,7 @@ function fl({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }
4931
4939
  };
4932
4940
  }
4933
4941
  }, [t, a, g, f]);
4934
- const m = N((x) => {
4942
+ const m = z((x) => {
4935
4943
  if (x == null || x.preventDefault(), !g.trim()) {
4936
4944
  c.current && Bt(e, c.current), e.chain().focus().unsetLink().run(), c.current && Z(() => {
4937
4945
  Z(() => {
@@ -4946,26 +4954,26 @@ function fl({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }
4946
4954
  Bt(e, c.current);
4947
4955
  });
4948
4956
  }), o();
4949
- }, [e, g, o]), C = N(() => {
4957
+ }, [e, g, o]), C = z(() => {
4950
4958
  const x = g.trim() || f;
4951
4959
  if (x) {
4952
4960
  let d = x;
4953
4961
  !/^https?:\/\//i.test(d) && !d.startsWith("/") && !d.startsWith("#") && (d = `https://${d}`), window.open(d, "_blank", "noopener,noreferrer");
4954
4962
  }
4955
- }, [g, f]), k = N(() => {
4963
+ }, [g, f]), k = z(() => {
4956
4964
  var x;
4957
4965
  h(""), (x = s.current) == null || x.focus();
4958
- }, []), P = N((x) => {
4966
+ }, []), P = z((x) => {
4959
4967
  x.key === "Enter" ? (x.preventDefault(), m()) : x.key === "Escape" && (x.preventDefault(), o(), e.chain().focus().run());
4960
4968
  }, [m, o, e]);
4961
4969
  return /* @__PURE__ */ I("div", { style: { position: "relative" }, children: [
4962
4970
  /* @__PURE__ */ u(
4963
- xe,
4971
+ Pe,
4964
4972
  {
4965
4973
  ref: i,
4966
4974
  active: b,
4967
4975
  onClick: n,
4968
- "data-tooltip": Be(a.toolbar.link),
4976
+ "data-tooltip": Ie(a.toolbar.link),
4969
4977
  "data-testid": "toolbar-link",
4970
4978
  "aria-label": a.aria.linkButton,
4971
4979
  children: /* @__PURE__ */ u(ii, {})
@@ -4987,7 +4995,7 @@ function fl({ editor: e, isOpen: t, onToggle: n, onClose: o, selectionState: r }
4987
4995
  boxShadow: "var(--pubwave-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05))",
4988
4996
  padding: "var(--pubwave-spacing-2, 8px)",
4989
4997
  minWidth: "280px",
4990
- zIndex: _.zIndex.dropdown + 1
4998
+ zIndex: $.zIndex.dropdown + 1
4991
4999
  },
4992
5000
  children: /* @__PURE__ */ u("div", { ref: l, children: /* @__PURE__ */ u("form", { onSubmit: m, style: { display: "flex", flexDirection: "column", gap: "8px" }, children: /* @__PURE__ */ I("div", { style: { position: "relative", display: "flex", alignItems: "center" }, children: [
4993
5001
  /* @__PURE__ */ u(
@@ -5156,7 +5164,7 @@ function $n(e) {
5156
5164
  }
5157
5165
  }
5158
5166
  function ml({ editor: e, onClose: t, buttonRef: n }) {
5159
- const o = _e(), [r, a] = W([]), i = G(null), s = G([]);
5167
+ const o = We(), [r, a] = V([]), i = G(null), s = G([]);
5160
5168
  Y(() => {
5161
5169
  const f = vl();
5162
5170
  f.length > 0 && a(f);
@@ -5193,7 +5201,7 @@ function ml({ editor: e, onClose: t, buttonRef: n }) {
5193
5201
  i.current.querySelectorAll("[data-tooltip]").forEach((m) => {
5194
5202
  const C = m.getAttribute("data-tooltip");
5195
5203
  if (C) {
5196
- const k = Me(m, {
5204
+ const k = Re(m, {
5197
5205
  content: C,
5198
5206
  placement: "top",
5199
5207
  delay: [300, 0],
@@ -5223,7 +5231,7 @@ function ml({ editor: e, onClose: t, buttonRef: n }) {
5223
5231
  boxShadow: "var(--pubwave-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1))",
5224
5232
  padding: "12px",
5225
5233
  minWidth: "240px",
5226
- zIndex: _.zIndex.dropdown + 1
5234
+ zIndex: $.zIndex.dropdown + 1
5227
5235
  },
5228
5236
  children: /* @__PURE__ */ I("div", { ref: i, children: [
5229
5237
  r.length > 0 && /* @__PURE__ */ I("div", { style: { marginBottom: "16px" }, children: [
@@ -5364,7 +5372,7 @@ function ml({ editor: e, onClose: t, buttonRef: n }) {
5364
5372
  );
5365
5373
  }
5366
5374
  function gl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
5367
- const r = _e(), a = G(null), i = () => {
5375
+ const r = We(), a = G(null), i = () => {
5368
5376
  try {
5369
5377
  const f = e.getAttributes("textColor");
5370
5378
  return (f == null ? void 0 : f.color) || null;
@@ -5387,12 +5395,12 @@ function gl({ editor: e, isOpen: t, onToggle: n, onClose: o }) {
5387
5395
  })(), b = p;
5388
5396
  return /* @__PURE__ */ I("div", { style: { position: "relative" }, children: [
5389
5397
  /* @__PURE__ */ u(
5390
- xe,
5398
+ Pe,
5391
5399
  {
5392
5400
  ref: a,
5393
5401
  active: !!c,
5394
5402
  onClick: n,
5395
- "data-tooltip": Be(r.toolbar.textColor),
5403
+ "data-tooltip": Ie(r.toolbar.textColor),
5396
5404
  "data-testid": "toolbar-colorPicker",
5397
5405
  "aria-label": r.aria.colorPickerButton,
5398
5406
  children: /* @__PURE__ */ u(ui, { textColor: h, backgroundColor: b })
@@ -5412,21 +5420,21 @@ function yl({
5412
5420
  editor: e,
5413
5421
  selectionState: t
5414
5422
  }) {
5415
- const n = _e(), [o, r] = W(null), a = N(() => {
5423
+ const n = We(), [o, r] = V(null), a = z(() => {
5416
5424
  r(null), e.chain().focus().toggleBold().run();
5417
- }, [e]), i = N(() => {
5425
+ }, [e]), i = z(() => {
5418
5426
  r(null), e.chain().focus().toggleItalic().run();
5419
- }, [e]), s = N(() => {
5427
+ }, [e]), s = z(() => {
5420
5428
  r(null), e.chain().focus().toggleUnderline().run();
5421
- }, [e]), l = N(() => {
5429
+ }, [e]), l = z(() => {
5422
5430
  r(null), e.chain().focus().toggleStrike().run();
5423
- }, [e]), p = N(() => {
5431
+ }, [e]), p = z(() => {
5424
5432
  r(null), e.chain().focus().toggleCode().run();
5425
- }, [e]), c = N(() => {
5433
+ }, [e]), c = z(() => {
5426
5434
  r((P) => P === "turnInto" ? null : "turnInto");
5427
- }, []), g = N(() => {
5435
+ }, []), g = z(() => {
5428
5436
  r((P) => P === "link" ? null : "link");
5429
- }, []), h = N(() => {
5437
+ }, []), h = z(() => {
5430
5438
  r((P) => P === "colorPicker" ? null : "colorPicker");
5431
5439
  }, []), b = (t == null ? void 0 : t.isBold) ?? !1, f = (t == null ? void 0 : t.isItalic) ?? !1, m = (t == null ? void 0 : t.isUnderline) ?? !1, C = (t == null ? void 0 : t.isStrike) ?? !1, k = (t == null ? void 0 : t.isCode) ?? !1;
5432
5440
  return /* @__PURE__ */ I(dr, { children: [
@@ -5441,55 +5449,55 @@ function yl({
5441
5449
  ),
5442
5450
  /* @__PURE__ */ u(Nn, {}),
5443
5451
  /* @__PURE__ */ u(
5444
- xe,
5452
+ Pe,
5445
5453
  {
5446
5454
  active: b,
5447
5455
  onClick: a,
5448
- "data-tooltip": Be(n.toolbar.bold, tt.bold),
5456
+ "data-tooltip": Ie(n.toolbar.bold, it.bold),
5449
5457
  "data-testid": "toolbar-bold",
5450
5458
  "aria-label": n.aria.boldButton,
5451
5459
  children: /* @__PURE__ */ u(ti, {})
5452
5460
  }
5453
5461
  ),
5454
5462
  /* @__PURE__ */ u(
5455
- xe,
5463
+ Pe,
5456
5464
  {
5457
5465
  active: f,
5458
5466
  onClick: i,
5459
- "data-tooltip": Be(n.toolbar.italic, tt.italic),
5467
+ "data-tooltip": Ie(n.toolbar.italic, it.italic),
5460
5468
  "data-testid": "toolbar-italic",
5461
5469
  "aria-label": n.aria.italicButton,
5462
5470
  children: /* @__PURE__ */ u(ni, {})
5463
5471
  }
5464
5472
  ),
5465
5473
  /* @__PURE__ */ u(
5466
- xe,
5474
+ Pe,
5467
5475
  {
5468
5476
  active: m,
5469
5477
  onClick: s,
5470
- "data-tooltip": Be(n.toolbar.underline, tt.underline),
5478
+ "data-tooltip": Ie(n.toolbar.underline, it.underline),
5471
5479
  "data-testid": "toolbar-underline",
5472
5480
  "aria-label": n.aria.underlineButton,
5473
5481
  children: /* @__PURE__ */ u(oi, {})
5474
5482
  }
5475
5483
  ),
5476
5484
  /* @__PURE__ */ u(
5477
- xe,
5485
+ Pe,
5478
5486
  {
5479
5487
  active: C,
5480
5488
  onClick: l,
5481
- "data-tooltip": Be(n.toolbar.strike, tt.strike),
5489
+ "data-tooltip": Ie(n.toolbar.strike, it.strike),
5482
5490
  "data-testid": "toolbar-strike",
5483
5491
  "aria-label": n.aria.strikeButton,
5484
5492
  children: /* @__PURE__ */ u(ri, {})
5485
5493
  }
5486
5494
  ),
5487
5495
  /* @__PURE__ */ u(
5488
- xe,
5496
+ Pe,
5489
5497
  {
5490
5498
  active: k,
5491
5499
  onClick: p,
5492
- "data-tooltip": Be(n.toolbar.code, tt.code),
5500
+ "data-tooltip": Ie(n.toolbar.code, it.code),
5493
5501
  "data-testid": "toolbar-code",
5494
5502
  "aria-label": n.aria.codeButton,
5495
5503
  children: /* @__PURE__ */ u(ai, {})
@@ -5517,8 +5525,8 @@ function yl({
5517
5525
  )
5518
5526
  ] });
5519
5527
  }
5520
- const nt = 8;
5521
- function De(e) {
5528
+ const st = 8;
5529
+ function ze(e) {
5522
5530
  return !e.isDestroyed;
5523
5531
  }
5524
5532
  function wl(e, t) {
@@ -5528,18 +5536,18 @@ function wl(e, t) {
5528
5536
  s,
5529
5537
  b,
5530
5538
  h,
5531
- nt
5539
+ st
5532
5540
  );
5533
5541
  let m;
5534
- f === "top" ? m = s - h - nt : m = b + nt;
5542
+ f === "top" ? m = s - h - st : m = b + st;
5535
5543
  const k = So(
5536
5544
  l,
5537
5545
  p,
5538
5546
  g,
5539
5547
  "center",
5540
5548
  // Default to center alignment
5541
- nt
5542
- ).left, P = window.innerWidth, x = window.innerHeight, d = nt, A = Math.max(d, Math.min(k, P - g - d));
5549
+ st
5550
+ ).left, P = window.innerWidth, x = window.innerHeight, d = st, A = Math.max(d, Math.min(k, P - g - d));
5543
5551
  return { top: Math.max(d, Math.min(m, x - h - d)), left: A, visible: !0 };
5544
5552
  }
5545
5553
  function kl({
@@ -5548,39 +5556,39 @@ function kl({
5548
5556
  children: n,
5549
5557
  onVisibilityChange: o
5550
5558
  }) {
5551
- const r = G(null), a = G(!1), i = G(0), s = G(!1), [l, p] = W({
5559
+ const r = G(null), a = G(!1), i = G(0), s = G(!1), [l, p] = V({
5552
5560
  top: 0,
5553
5561
  left: 0,
5554
5562
  visible: !1
5555
- }), [c, g] = W(
5563
+ }), [c, g] = V(
5556
5564
  null
5557
- ), [h, b] = W(!1), f = G([]), m = nn(() => !De(e) || a.current || !h ? !1 : Ft(e), [e, c, h]), C = N(() => {
5558
- if (!De(e)) return;
5565
+ ), [h, b] = V(!1), f = G([]), m = nn(() => !ze(e) || a.current || !h ? !1 : Ft(e), [e, c, h]), C = z(() => {
5566
+ if (!ze(e)) return;
5559
5567
  const x = Mo(e);
5560
5568
  g(x);
5561
- }, [e]), k = N(() => {
5569
+ }, [e]), k = z(() => {
5562
5570
  if (!m || !r.current) {
5563
5571
  p((x) => ({ ...x, visible: !1 }));
5564
5572
  return;
5565
5573
  }
5566
5574
  Z(() => {
5567
- if (!De(e)) return;
5575
+ if (!ze(e)) return;
5568
5576
  const x = wl(e, r.current);
5569
5577
  p(x);
5570
5578
  });
5571
5579
  }, [e, m]);
5572
5580
  Y(() => {
5573
- if (!De(e)) return;
5581
+ if (!ze(e)) return;
5574
5582
  const d = e.view.dom.closest(".pubwave-editor"), A = (M) => {
5575
- const S = M.target, R = r.current;
5576
- if (R && S && R.contains(S)) {
5583
+ const O = M.target, _ = r.current;
5584
+ if (_ && O && _.contains(O)) {
5577
5585
  a.current = !1;
5578
5586
  return;
5579
5587
  }
5580
- d && S && d.contains(S) ? s.current = !0 : s.current = !1, a.current = !0, b(!1);
5588
+ d && O && d.contains(O) ? s.current = !0 : s.current = !1, a.current = !0, b(!1);
5581
5589
  }, w = (M) => {
5582
- const S = Date.now(), L = S - i.current < 300;
5583
- i.current = S;
5590
+ const O = Date.now(), L = O - i.current < 300;
5591
+ i.current = O;
5584
5592
  const v = M.target, T = r.current;
5585
5593
  if (T && v && T.contains(v)) {
5586
5594
  a.current = !1;
@@ -5591,16 +5599,16 @@ function kl({
5591
5599
  return;
5592
5600
  }
5593
5601
  setTimeout(() => {
5594
- De(e) && (Ft(e) ? (C(), b(!0), Z(() => {
5602
+ ze(e) && (Ft(e) ? (C(), b(!0), Z(() => {
5595
5603
  k();
5596
- })) : (b(!1), p((H) => ({ ...H, visible: !1 }))));
5604
+ })) : (b(!1), p((N) => ({ ...N, visible: !1 }))));
5597
5605
  }, L ? 100 : 10);
5598
5606
  };
5599
5607
  return document.addEventListener("mousedown", A), document.addEventListener("mouseup", w), () => {
5600
5608
  document.removeEventListener("mousedown", A), document.removeEventListener("mouseup", w);
5601
5609
  };
5602
5610
  }, [e, C, k]), Y(() => {
5603
- if (!De(e)) return;
5611
+ if (!ze(e)) return;
5604
5612
  C();
5605
5613
  const x = () => {
5606
5614
  !a.current && h && C();
@@ -5628,7 +5636,7 @@ function kl({
5628
5636
  window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0);
5629
5637
  };
5630
5638
  }, [m, k]);
5631
- const P = _e();
5639
+ const P = We();
5632
5640
  return Y(() => {
5633
5641
  if (!Et()) {
5634
5642
  if (!m || !l.visible || !r.current) {
@@ -5640,7 +5648,7 @@ function kl({
5640
5648
  r.current.querySelectorAll("[data-tooltip]").forEach((d) => {
5641
5649
  const A = d.getAttribute("data-tooltip");
5642
5650
  if (A) {
5643
- const w = Me(d, {
5651
+ const w = Re(d, {
5644
5652
  content: A,
5645
5653
  placement: "top",
5646
5654
  delay: [300, 0],
@@ -5654,11 +5662,11 @@ function kl({
5654
5662
  f.current.forEach((x) => x.destroy()), f.current = [];
5655
5663
  };
5656
5664
  }
5657
- }, [m, l.visible, P]), De(e) ? /* @__PURE__ */ u(
5665
+ }, [m, l.visible, P]), ze(e) ? /* @__PURE__ */ u(
5658
5666
  "div",
5659
5667
  {
5660
5668
  ref: r,
5661
- className: Ye(
5669
+ className: ot(
5662
5670
  "pubwave-toolbar",
5663
5671
  m && l.visible ? "pubwave-toolbar--visible" : "pubwave-toolbar--hidden",
5664
5672
  t
@@ -5667,11 +5675,11 @@ function kl({
5667
5675
  position: "fixed",
5668
5676
  top: l.top,
5669
5677
  left: l.left,
5670
- zIndex: _.zIndex.toolbar,
5678
+ zIndex: $.zIndex.toolbar,
5671
5679
  opacity: m && l.visible ? 1 : 0,
5672
5680
  pointerEvents: m && l.visible ? "auto" : "none",
5673
5681
  transform: m && l.visible ? "translateY(0)" : "translateY(4px)",
5674
- transition: `opacity ${_.transition.fast}, transform ${_.transition.fast}`,
5682
+ transition: `opacity ${$.transition.fast}, transform ${$.transition.fast}`,
5675
5683
  // Ensure toolbar is above editor container and can receive clicks
5676
5684
  isolation: "isolate"
5677
5685
  },
@@ -5736,7 +5744,7 @@ function Cl(e, t, n) {
5736
5744
  return null;
5737
5745
  }
5738
5746
  function Tl({ editor: e }) {
5739
- const t = G(null), n = G(null), o = G(!1), r = G(null), [a, i] = W(!1), [s, l] = W(!1), [p, c] = W({ top: 0 }), [g, h] = W(!1), [b, f] = W(!1);
5747
+ const t = G(null), n = G(null), o = G(!1), r = G(null), [a, i] = V(!1), [s, l] = V(!1), [p, c] = V({ top: 0 }), [g, h] = V(!1), [b, f] = V(!1);
5740
5748
  Y(() => {
5741
5749
  const w = () => {
5742
5750
  h(Et()), f(window.innerWidth < xl);
@@ -5745,51 +5753,51 @@ function Tl({ editor: e }) {
5745
5753
  window.removeEventListener("resize", w);
5746
5754
  };
5747
5755
  }, []);
5748
- const m = N(() => {
5756
+ const m = z(() => {
5749
5757
  const w = t.current, M = n.current;
5750
5758
  if (!w || !M) return;
5751
- const S = w.closest(".pubwave-editor");
5752
- if (!S) return;
5753
- S.offsetHeight;
5754
- const R = S.getBoundingClientRect();
5759
+ const O = w.closest(".pubwave-editor");
5760
+ if (!O) return;
5761
+ O.offsetHeight;
5762
+ const _ = O.getBoundingClientRect();
5755
5763
  let L = 14, v = M;
5756
5764
  ["UL", "OL", "BLOCKQUOTE"].includes(M.tagName) && M.firstElementChild instanceof HTMLElement && (v = M.firstElementChild), v.offsetHeight;
5757
5765
  const T = v.getBoundingClientRect();
5758
5766
  try {
5759
- const H = window.getComputedStyle(v), z = H.lineHeight;
5760
- if (z && z !== "normal") {
5761
- const U = parseFloat(z);
5767
+ const N = window.getComputedStyle(v), H = N.lineHeight;
5768
+ if (H && H !== "normal") {
5769
+ const U = parseFloat(H);
5762
5770
  isNaN(U) || (L = U / 2);
5763
5771
  } else {
5764
- const U = parseFloat(H.fontSize);
5772
+ const U = parseFloat(N.fontSize);
5765
5773
  isNaN(U) || (L = U * 1.5 / 2);
5766
5774
  }
5767
5775
  } catch {
5768
5776
  }
5769
- const B = T.top - R.top + L;
5777
+ const B = T.top - _.top + L;
5770
5778
  !isNaN(B) && isFinite(B) && B >= 0 && c({ top: B });
5771
- }, []), C = N((w) => {
5779
+ }, []), C = z((w) => {
5772
5780
  n.current = w, i(!0), requestAnimationFrame(() => {
5773
5781
  requestAnimationFrame(() => {
5774
5782
  m();
5775
5783
  });
5776
5784
  });
5777
- }, [m]), k = N(() => {
5785
+ }, [m]), k = z(() => {
5778
5786
  o.current || (n.current = null, i(!1));
5779
- }, []), P = N(() => {
5787
+ }, []), P = z(() => {
5780
5788
  r.current && (clearTimeout(r.current), r.current = null);
5781
5789
  }, []);
5782
5790
  Y(() => {
5783
5791
  const w = e.view.dom, M = w.closest(".pubwave-editor");
5784
5792
  if (!M) return;
5785
- const S = (T) => {
5793
+ const O = (T) => {
5786
5794
  if (o.current) return;
5787
5795
  const B = T.target;
5788
5796
  if (!B || (P(), B.closest(".pubwave-block-handle")) || !w.contains(B))
5789
5797
  return;
5790
- const H = Cl(B, w, e);
5791
- H && (H !== n.current ? C(H) : i(!0));
5792
- }, R = (T) => {
5798
+ const N = Cl(B, w, e);
5799
+ N && (N !== n.current ? C(N) : i(!0));
5800
+ }, _ = (T) => {
5793
5801
  if (o.current) return;
5794
5802
  const B = T.relatedTarget;
5795
5803
  if (!B) {
@@ -5806,12 +5814,12 @@ function Tl({ editor: e }) {
5806
5814
  k();
5807
5815
  }, 150));
5808
5816
  };
5809
- w.addEventListener("mouseover", S), w.addEventListener("mouseout", R), M.addEventListener("mouseleave", L);
5817
+ w.addEventListener("mouseover", O), w.addEventListener("mouseout", _), M.addEventListener("mouseleave", L);
5810
5818
  const v = ({ transaction: T }) => {
5811
5819
  T.docChanged && !o.current && k();
5812
5820
  };
5813
5821
  return e.on("transaction", v), () => {
5814
- w.removeEventListener("mouseover", S), w.removeEventListener("mouseout", R), M.removeEventListener("mouseleave", L), e.off("transaction", v), P();
5822
+ w.removeEventListener("mouseover", O), w.removeEventListener("mouseout", _), M.removeEventListener("mouseleave", L), e.off("transaction", v), P();
5815
5823
  };
5816
5824
  }, [e, C, k, P]), Y(() => {
5817
5825
  a && n.current && requestAnimationFrame(() => {
@@ -5826,54 +5834,54 @@ function Tl({ editor: e }) {
5826
5834
  };
5827
5835
  return window.addEventListener("scroll", w, !0), () => window.removeEventListener("scroll", w, !0);
5828
5836
  }, [a, m]);
5829
- const x = N(() => {
5837
+ const x = z(() => {
5830
5838
  const w = n.current;
5831
5839
  if (w)
5832
5840
  try {
5833
- const M = e.view.posAtDOM(w, 0), S = e.state.doc.resolve(M);
5834
- let R = M;
5835
- for (let T = S.depth; T > 0; T--)
5836
- if (S.node(T).isBlock) {
5837
- R = S.start(T);
5841
+ const M = e.view.posAtDOM(w, 0), O = e.state.doc.resolve(M);
5842
+ let _ = M;
5843
+ for (let T = O.depth; T > 0; T--)
5844
+ if (O.node(T).isBlock) {
5845
+ _ = O.start(T);
5838
5846
  break;
5839
5847
  }
5840
- const v = e.state.doc.resolve(R).after(1);
5848
+ const v = e.state.doc.resolve(_).after(1);
5841
5849
  e.chain().focus().insertContentAt(v, { type: "paragraph" }).setTextSelection(v + 1).run(), setTimeout(() => {
5842
5850
  e.commands.insertContent("/");
5843
5851
  }, 10);
5844
5852
  } catch (M) {
5845
5853
  console.error("Failed to add block:", M);
5846
5854
  }
5847
- }, [e]), d = N((w) => {
5855
+ }, [e]), d = z((w) => {
5848
5856
  const M = n.current;
5849
5857
  if (!M) return;
5850
5858
  o.current = !0, requestAnimationFrame(() => {
5851
5859
  l(!0);
5852
5860
  });
5853
- const S = e.view.posAtDOM(M, 0), R = Ot(e.state.doc, S);
5854
- if (!R)
5861
+ const O = e.view.posAtDOM(M, 0), _ = Ot(e.state.doc, O);
5862
+ if (!_)
5855
5863
  return;
5856
- const L = R.pos, v = `block-${L}`;
5864
+ const L = _.pos, v = `block-${L}`;
5857
5865
  il(e, v, L), w.dataTransfer.effectAllowed = "move", w.dataTransfer.setData("application/x-pubwave-block", v), M.classList.add("pubwave-block--dragging");
5858
5866
  const T = M.cloneNode(!0);
5859
5867
  T.classList.add("pubwave-block--drag-preview"), T.style.opacity = "1";
5860
- const B = (F) => {
5861
- F.style.setProperty("color", "#9b9a97", "important"), F.style.setProperty("border-color", "#9b9a97", "important"), F.style.setProperty("--pubwave-text", "#9b9a97", "important"), Array.from(F.children).forEach((O) => {
5862
- O instanceof HTMLElement && B(O);
5868
+ const B = (j) => {
5869
+ j.style.setProperty("color", "#9b9a97", "important"), j.style.setProperty("border-color", "#9b9a97", "important"), j.style.setProperty("--pubwave-text", "#9b9a97", "important"), Array.from(j.children).forEach((S) => {
5870
+ S instanceof HTMLElement && B(S);
5863
5871
  });
5864
5872
  };
5865
5873
  B(T);
5866
- const H = M.getBoundingClientRect();
5867
- T.style.width = `${H.width}px`, T.style.position = "static", T.style.transform = "none";
5868
- const z = document.createElement("div");
5869
- z.className = "pubwave-editor";
5874
+ const N = M.getBoundingClientRect();
5875
+ T.style.width = `${N.width}px`, T.style.position = "static", T.style.transform = "none";
5876
+ const H = document.createElement("div");
5877
+ H.className = "pubwave-editor";
5870
5878
  const U = document.createElement("div");
5871
5879
  U.className = "pubwave-editor__content";
5872
- const V = document.createElement("div");
5873
- V.className = "ProseMirror", V.appendChild(T), U.appendChild(V), z.appendChild(U), z.style.position = "absolute", z.style.top = "-9999px", z.style.left = "-9999px", document.body.appendChild(z), w.dataTransfer.setDragImage(T, 0, 0), setTimeout(() => {
5874
- document.body.removeChild(z);
5880
+ const q = document.createElement("div");
5881
+ q.className = "ProseMirror", q.appendChild(T), U.appendChild(q), H.appendChild(U), H.style.position = "absolute", H.style.top = "-9999px", H.style.left = "-9999px", document.body.appendChild(H), w.dataTransfer.setDragImage(T, 0, 0), setTimeout(() => {
5882
+ document.body.removeChild(H);
5875
5883
  }, 0);
5876
- }, [e]), A = N(() => {
5884
+ }, [e]), A = z(() => {
5877
5885
  o.current = !1, l(!1), n.current && n.current.classList.remove("pubwave-block--dragging"), i(!1);
5878
5886
  }, []);
5879
5887
  return g || b || !a ? null : /* @__PURE__ */ I(
@@ -5891,8 +5899,8 @@ function Tl({ editor: e }) {
5891
5899
  alignItems: "center",
5892
5900
  gap: "2px",
5893
5901
  pointerEvents: "auto",
5894
- transition: `opacity ${_.transition.fast}`,
5895
- zIndex: _.zIndex.dragHandle,
5902
+ transition: `opacity ${$.transition.fast}`,
5903
+ zIndex: $.zIndex.dragHandle,
5896
5904
  opacity: a && !s ? 1 : 0
5897
5905
  },
5898
5906
  onMouseEnter: (w) => {
@@ -5920,11 +5928,11 @@ function Tl({ editor: e }) {
5920
5928
  alignItems: "center",
5921
5929
  justifyContent: "center",
5922
5930
  border: "none",
5923
- borderRadius: _.borderRadius.sm,
5931
+ borderRadius: $.borderRadius.sm,
5924
5932
  background: "transparent",
5925
- color: `var(--pubwave-text-muted, ${_.colors.textMuted})`,
5933
+ color: `var(--pubwave-text-muted, ${$.colors.textMuted})`,
5926
5934
  cursor: "pointer",
5927
- transition: `background-color ${_.transition.fast}, color ${_.transition.fast}`
5935
+ transition: `background-color ${$.transition.fast}, color ${$.transition.fast}`
5928
5936
  },
5929
5937
  title: "Add block",
5930
5938
  "aria-label": "Add block below",
@@ -5949,11 +5957,11 @@ function Tl({ editor: e }) {
5949
5957
  display: "flex",
5950
5958
  alignItems: "center",
5951
5959
  justifyContent: "center",
5952
- borderRadius: _.borderRadius.sm,
5960
+ borderRadius: $.borderRadius.sm,
5953
5961
  background: "transparent",
5954
- color: `var(--pubwave-text-muted, ${_.colors.textMuted})`,
5962
+ color: `var(--pubwave-text-muted, ${$.colors.textMuted})`,
5955
5963
  cursor: "grab",
5956
- transition: `background-color ${_.transition.fast}, color ${_.transition.fast}`
5964
+ transition: `background-color ${$.transition.fast}, color ${$.transition.fast}`
5957
5965
  },
5958
5966
  role: "button",
5959
5967
  tabIndex: 0,
@@ -5990,7 +5998,7 @@ function Al({
5990
5998
  return /* @__PURE__ */ I(
5991
5999
  "div",
5992
6000
  {
5993
- className: Ye(
6001
+ className: ot(
5994
6002
  "pubwave-drop-indicator",
5995
6003
  e && "pubwave-drop-indicator--visible",
5996
6004
  `pubwave-drop-indicator--${t}`,
@@ -6002,14 +6010,14 @@ function Al({
6002
6010
  left: 0,
6003
6011
  right: 0,
6004
6012
  height: "2px",
6005
- backgroundColor: `var(--pubwave-drop-indicator-color, ${_.colors.dropIndicator})`,
6013
+ backgroundColor: `var(--pubwave-drop-indicator-color, ${$.colors.dropIndicator})`,
6006
6014
  borderRadius: "1px",
6007
6015
  // Position based on before/after
6008
6016
  ...t === "before" ? { top: "-1px" } : { bottom: "-1px" },
6009
6017
  // Visibility and animation
6010
6018
  opacity: e ? 1 : 0,
6011
6019
  transform: e ? "scaleX(1)" : "scaleX(0.8)",
6012
- transition: `opacity ${_.transition.fast}, transform ${_.transition.fast}`,
6020
+ transition: `opacity ${$.transition.fast}, transform ${$.transition.fast}`,
6013
6021
  // Ensure it's above other content
6014
6022
  zIndex: 10,
6015
6023
  pointerEvents: "none"
@@ -6035,15 +6043,15 @@ function zn({ position: e, visible: t }) {
6035
6043
  width: "8px",
6036
6044
  height: "8px",
6037
6045
  borderRadius: "50%",
6038
- backgroundColor: `var(--pubwave-drop-indicator-color, ${_.colors.dropIndicator})`,
6046
+ backgroundColor: `var(--pubwave-drop-indicator-color, ${$.colors.dropIndicator})`,
6039
6047
  opacity: t ? 1 : 0,
6040
- transition: `opacity ${_.transition.fast}`
6048
+ transition: `opacity ${$.transition.fast}`
6041
6049
  }
6042
6050
  }
6043
6051
  );
6044
6052
  }
6045
6053
  function Ml({ editor: e }) {
6046
- const [t, n] = W(null), [o, r] = W(null);
6054
+ const [t, n] = V(null), [o, r] = V(null);
6047
6055
  return Y(() => {
6048
6056
  const a = oe.getState(e.state);
6049
6057
  a && n(a);
@@ -6155,7 +6163,7 @@ const tu = hr(
6155
6163
  const T = w(v);
6156
6164
  b == null || b(T);
6157
6165
  }
6158
- }), w = N(
6166
+ }), w = z(
6159
6167
  (v) => ({
6160
6168
  getState: () => ({
6161
6169
  selection: {
@@ -6202,16 +6210,16 @@ const tu = hr(
6202
6210
  () => A ? w(A) : null,
6203
6211
  [A, w]
6204
6212
  );
6205
- const [M, S] = W(!1);
6213
+ const [M, O] = V(!1);
6206
6214
  Y(() => {
6207
- S(!0);
6215
+ O(!0);
6208
6216
  }, []), Y(() => {
6209
6217
  var T;
6210
6218
  if (!((T = A == null ? void 0 : A.view) != null && T.dom)) return;
6211
6219
  const v = A.view.dom;
6212
6220
  v && v.setAttribute("data-placeholder", d);
6213
6221
  }, [A, d, i == null ? void 0 : i.locale]);
6214
- const R = [
6222
+ const _ = [
6215
6223
  "pubwave-editor",
6216
6224
  (i == null ? void 0 : i.classNamePrefix) ?? "",
6217
6225
  (i == null ? void 0 : i.containerClassName) ?? "",
@@ -6230,8 +6238,8 @@ const tu = hr(
6230
6238
  } : {}
6231
6239
  };
6232
6240
  if (m && (L["--pubwave-container-width"] = m, L.width = m, L["--pubwave-container-max-width"] = m, L.maxWidth = m), C && (L["--pubwave-container-height"] = C, L.height = C), k && (L["--pubwave-container-min-height"] = k, L.minHeight = k), i != null && i.colors) {
6233
- const { colors: v } = i, B = (v.text || "#1f2937").toLowerCase().trim(), H = B.startsWith("#f") || B.startsWith("#e") || B.includes("f1") || B.includes("f3") || B.includes("f0") || B.includes("fdf") || B.includes("ffb") || B.includes("ffc") || B.includes("ffd") || B.includes("ffe") || B.includes("fff") || B.includes("e0") || B.includes("e5") || B.includes("ecf") || B.includes("eef");
6234
- v.background && (v.background.includes("gradient") ? (L.background = v.background, H ? (L["--pubwave-surface"] = "rgba(38, 38, 38, 0.95)", L["--pubwave-bg"] = "#1a1a1a") : (L["--pubwave-surface"] = "rgba(255, 255, 255, 0.95)", L["--pubwave-bg"] = "#ffffff")) : (L["--pubwave-bg"] = v.background, L["--pubwave-surface"] = v.background)), v.text && (L["--pubwave-text"] = v.text), v.textMuted && (L["--pubwave-text-muted"] = v.textMuted), v.border && (L["--pubwave-border"] = v.border), v.primary && (L["--pubwave-primary"] = v.primary), v.linkColor && (L["--pubwave-link-color"] = v.linkColor), H ? L["--pubwave-hover"] = "rgba(255, 255, 255, 0.1)" : L["--pubwave-hover"] = "rgba(0, 0, 0, 0.05)";
6241
+ const { colors: v } = i, B = (v.text || "#1f2937").toLowerCase().trim(), N = B.startsWith("#f") || B.startsWith("#e") || B.includes("f1") || B.includes("f3") || B.includes("f0") || B.includes("fdf") || B.includes("ffb") || B.includes("ffc") || B.includes("ffd") || B.includes("ffe") || B.includes("fff") || B.includes("e0") || B.includes("e5") || B.includes("ecf") || B.includes("eef");
6242
+ v.background && (v.background.includes("gradient") ? (L.background = v.background, N ? (L["--pubwave-surface"] = "rgba(38, 38, 38, 0.95)", L["--pubwave-bg"] = "#1a1a1a") : (L["--pubwave-surface"] = "rgba(255, 255, 255, 0.95)", L["--pubwave-bg"] = "#ffffff")) : (L["--pubwave-bg"] = v.background, L["--pubwave-surface"] = v.background)), v.text && (L["--pubwave-text"] = v.text), v.textMuted && (L["--pubwave-text-muted"] = v.textMuted), v.border && (L["--pubwave-border"] = v.border), v.primary && (L["--pubwave-primary"] = v.primary), v.linkColor && (L["--pubwave-link-color"] = v.linkColor), N ? L["--pubwave-hover"] = "rgba(255, 255, 255, 0.1)" : L["--pubwave-hover"] = "rgba(0, 0, 0, 0.05)";
6235
6243
  }
6236
6244
  if (i != null && i.backgroundImage) {
6237
6245
  const v = i.backgroundImage, T = i.backgroundImageOptions || {};
@@ -6240,7 +6248,7 @@ const tu = hr(
6240
6248
  return !M || !A ? /* @__PURE__ */ u(bn, { value: { locale: x }, children: /* @__PURE__ */ u(
6241
6249
  "div",
6242
6250
  {
6243
- className: R,
6251
+ className: _,
6244
6252
  "data-testid": P,
6245
6253
  role: "application",
6246
6254
  "aria-label": Rt.editor,
@@ -6249,7 +6257,7 @@ const tu = hr(
6249
6257
  ) }) : /* @__PURE__ */ u(bn, { value: { locale: x }, children: /* @__PURE__ */ I(
6250
6258
  "div",
6251
6259
  {
6252
- className: R,
6260
+ className: _,
6253
6261
  "data-testid": P,
6254
6262
  role: "application",
6255
6263
  "aria-label": Rt.editor,
@@ -6264,62 +6272,62 @@ const tu = hr(
6264
6272
  ) });
6265
6273
  }
6266
6274
  );
6267
- function He(e) {
6275
+ function Ge(e) {
6268
6276
  return !e.isDestroyed;
6269
6277
  }
6270
6278
  function Pl(e) {
6271
- if (!He(e))
6279
+ if (!Ge(e))
6272
6280
  return { success: !1, message: "Editor not available" };
6273
6281
  const t = e.chain().focus().toggleBold().run();
6274
- return Ne(e), {
6282
+ return Ve(e), {
6275
6283
  success: t,
6276
6284
  message: t ? "Bold toggled" : "Could not toggle bold"
6277
6285
  };
6278
6286
  }
6279
6287
  function Sl(e) {
6280
- if (!He(e))
6288
+ if (!Ge(e))
6281
6289
  return { success: !1, message: "Editor not available" };
6282
6290
  const t = e.chain().focus().toggleItalic().run();
6283
- return Ne(e), {
6291
+ return Ve(e), {
6284
6292
  success: t,
6285
6293
  message: t ? "Italic toggled" : "Could not toggle italic"
6286
6294
  };
6287
6295
  }
6288
6296
  function Dl(e, t) {
6289
- if (!He(e))
6297
+ if (!Ge(e))
6290
6298
  return { success: !1, message: "Editor not available" };
6291
6299
  if (!t.trim())
6292
6300
  return { success: !1, message: "URL is required" };
6293
6301
  let n = t.trim();
6294
6302
  !/^https?:\/\//i.test(n) && !n.startsWith("/") && (n = `https://${n}`);
6295
6303
  const o = e.chain().focus().setLink({ href: n }).run();
6296
- return Ne(e), {
6304
+ return Ve(e), {
6297
6305
  success: o,
6298
6306
  message: o ? "Link added" : "Could not add link"
6299
6307
  };
6300
6308
  }
6301
6309
  function Il(e) {
6302
- if (!He(e))
6310
+ if (!Ge(e))
6303
6311
  return { success: !1, message: "Editor not available" };
6304
6312
  const t = e.chain().focus().unsetLink().run();
6305
- return Ne(e), {
6313
+ return Ve(e), {
6306
6314
  success: t,
6307
6315
  message: t ? "Link removed" : "Could not remove link"
6308
6316
  };
6309
6317
  }
6310
6318
  function Ol(e, t = window.prompt.bind(window)) {
6311
- if (!He(e))
6319
+ if (!Ge(e))
6312
6320
  return { success: !1, message: "Editor not available" };
6313
6321
  if (e.isActive("link"))
6314
6322
  return Il(e);
6315
6323
  const o = t("Enter URL:");
6316
- return o ? Dl(e, o) : (Ne(e), { success: !1, message: "Link cancelled" });
6324
+ return o ? Dl(e, o) : (Ve(e), { success: !1, message: "Link cancelled" });
6317
6325
  }
6318
6326
  function nu(e, t) {
6319
- if (!He(e))
6327
+ if (!Ge(e))
6320
6328
  return { success: !1, message: "Editor not available" };
6321
6329
  const n = e.chain().focus().setHeading({ level: t }).run();
6322
- Ne(e);
6330
+ Ve(e);
6323
6331
  const o = String(t);
6324
6332
  return {
6325
6333
  success: n,
@@ -6327,10 +6335,10 @@ function nu(e, t) {
6327
6335
  };
6328
6336
  }
6329
6337
  function ou(e) {
6330
- if (!He(e))
6338
+ if (!Ge(e))
6331
6339
  return { success: !1, message: "Editor not available" };
6332
6340
  const t = e.chain().focus().setParagraph().run();
6333
- return Ne(e), {
6341
+ return Ve(e), {
6334
6342
  success: t,
6335
6343
  message: t ? "Paragraph applied" : "Could not set paragraph"
6336
6344
  };
@@ -6374,7 +6382,7 @@ function iu({
6374
6382
  onDragEnd: r,
6375
6383
  className: a
6376
6384
  }) {
6377
- const i = G(null), [s, l] = W(!1), p = N(
6385
+ const i = G(null), [s, l] = V(!1), p = z(
6378
6386
  (f) => {
6379
6387
  if (f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/plain", e), f.dataTransfer.setData("application/x-pubwave-block", e), i.current) {
6380
6388
  const m = i.current.getBoundingClientRect();
@@ -6387,21 +6395,21 @@ function iu({
6387
6395
  o == null || o(e, f);
6388
6396
  },
6389
6397
  [e, o]
6390
- ), c = N(
6398
+ ), c = z(
6391
6399
  (f) => {
6392
6400
  l(!1), r == null || r(e, f);
6393
6401
  },
6394
6402
  [e, r]
6395
- ), g = N(() => {
6403
+ ), g = z(() => {
6396
6404
  l(!0);
6397
- }, []), h = N(() => {
6405
+ }, []), h = z(() => {
6398
6406
  l(!1);
6399
6407
  }, []), b = t || n;
6400
6408
  return /* @__PURE__ */ u(
6401
6409
  "div",
6402
6410
  {
6403
6411
  ref: i,
6404
- className: Ye(
6412
+ className: ot(
6405
6413
  "pubwave-drag-handle",
6406
6414
  b && "pubwave-drag-handle--visible",
6407
6415
  n && "pubwave-drag-handle--dragging",
@@ -6424,7 +6432,7 @@ function iu({
6424
6432
  // Visual styling
6425
6433
  cursor: n ? "grabbing" : "grab",
6426
6434
  opacity: b ? 1 : 0,
6427
- transition: `opacity ${_.transition.fast}`,
6435
+ transition: `opacity ${$.transition.fast}`,
6428
6436
  // Ensure clickable without stealing text selection
6429
6437
  userSelect: "none",
6430
6438
  WebkitUserSelect: "none"
@@ -6447,9 +6455,9 @@ function iu({
6447
6455
  display: "flex",
6448
6456
  alignItems: "center",
6449
6457
  justifyContent: "center",
6450
- borderRadius: _.borderRadius.sm,
6451
- backgroundColor: s ? `var(--pubwave-drag-handle-active-bg, ${_.colors.focus})` : "transparent",
6452
- transition: `background-color ${_.transition.fast}`
6458
+ borderRadius: $.borderRadius.sm,
6459
+ backgroundColor: s ? `var(--pubwave-drag-handle-active-bg, ${$.colors.focus})` : "transparent",
6460
+ transition: `background-color ${$.transition.fast}`
6453
6461
  },
6454
6462
  children: /* @__PURE__ */ u(Rl, {})
6455
6463
  }
@@ -6466,7 +6474,7 @@ function Rl() {
6466
6474
  viewBox: "0 0 12 16",
6467
6475
  fill: "currentColor",
6468
6476
  style: {
6469
- color: `var(--pubwave-drag-handle-color, ${_.colors.textMuted})`
6477
+ color: `var(--pubwave-drag-handle-color, ${$.colors.textMuted})`
6470
6478
  },
6471
6479
  children: [
6472
6480
  /* @__PURE__ */ u("circle", { cx: "3", cy: "3", r: "1.5" }),
@@ -6548,7 +6556,7 @@ function Hl({
6548
6556
  onDismiss: o,
6549
6557
  className: r
6550
6558
  }) {
6551
- const [a, i] = W(!0);
6559
+ const [a, i] = V(!0);
6552
6560
  Y(() => {
6553
6561
  if (n <= 0) return;
6554
6562
  const p = setTimeout(() => {
@@ -6558,18 +6566,18 @@ function Hl({
6558
6566
  clearTimeout(p);
6559
6567
  };
6560
6568
  }, [n, o]);
6561
- const s = N(() => {
6569
+ const s = z(() => {
6562
6570
  i(!1), o == null || o();
6563
6571
  }, [o]), l = {
6564
- info: _.colors.text,
6572
+ info: $.colors.text,
6565
6573
  success: "var(--pubwave-color-success, #10b981)",
6566
- error: _.colors.error,
6574
+ error: $.colors.error,
6567
6575
  warning: "var(--pubwave-color-warning, #f59e0b)"
6568
6576
  };
6569
6577
  return /* @__PURE__ */ I(
6570
6578
  "div",
6571
6579
  {
6572
- className: Ye(
6580
+ className: ot(
6573
6581
  "pubwave-toast",
6574
6582
  `pubwave-toast--${t}`,
6575
6583
  a ? "pubwave-toast--visible" : "pubwave-toast--hidden",
@@ -6580,15 +6588,15 @@ function Hl({
6580
6588
  bottom: "24px",
6581
6589
  left: "50%",
6582
6590
  transform: `translateX(-50%) translateY(${a ? "0" : "16px"})`,
6583
- padding: `${_.spacing.sm} ${_.spacing.md}`,
6584
- backgroundColor: `var(--pubwave-toast-bg, ${_.colors.surface})`,
6585
- border: `1px solid var(--pubwave-toast-border, ${_.colors.border})`,
6586
- borderRadius: _.borderRadius.md,
6587
- boxShadow: _.shadow.md,
6591
+ padding: `${$.spacing.sm} ${$.spacing.md}`,
6592
+ backgroundColor: `var(--pubwave-toast-bg, ${$.colors.surface})`,
6593
+ border: `1px solid var(--pubwave-toast-border, ${$.colors.border})`,
6594
+ borderRadius: $.borderRadius.md,
6595
+ boxShadow: $.shadow.md,
6588
6596
  color: l[t],
6589
- fontSize: _.typography.fontSizeSmall,
6597
+ fontSize: $.typography.fontSizeSmall,
6590
6598
  opacity: a ? 1 : 0,
6591
- transition: `opacity ${_.transition.normal}, transform ${_.transition.normal}`,
6599
+ transition: `opacity ${$.transition.normal}, transform ${$.transition.normal}`,
6592
6600
  zIndex: 100,
6593
6601
  maxWidth: "400px",
6594
6602
  textAlign: "center"
@@ -6604,11 +6612,11 @@ function Hl({
6604
6612
  className: "pubwave-toast__dismiss",
6605
6613
  onClick: s,
6606
6614
  style: {
6607
- marginLeft: _.spacing.sm,
6615
+ marginLeft: $.spacing.sm,
6608
6616
  padding: "0 4px",
6609
6617
  background: "none",
6610
6618
  border: "none",
6611
- color: _.colors.textMuted,
6619
+ color: $.colors.textMuted,
6612
6620
  cursor: "pointer",
6613
6621
  fontSize: "16px",
6614
6622
  lineHeight: 1
@@ -6671,7 +6679,7 @@ export {
6671
6679
  on as canUseDOM,
6672
6680
  xc as cancelDrag,
6673
6681
  jc as clearFormatting,
6674
- Ye as cn,
6682
+ ot as cn,
6675
6683
  ru as createActionHandler,
6676
6684
  _l as createAutoScroller,
6677
6685
  al as createDndPlugin,
@@ -6706,7 +6714,7 @@ export {
6706
6714
  Zc as maintainFocus,
6707
6715
  rl as moveBlock,
6708
6716
  Hc as redo,
6709
- Ne as restoreFocus,
6717
+ Ve as restoreFocus,
6710
6718
  Bt as restoreSelection,
6711
6719
  pl as saveSelection,
6712
6720
  zc as selectAll,
@@ -6722,7 +6730,7 @@ export {
6722
6730
  Sc as toggleBold,
6723
6731
  _c as toggleHeading,
6724
6732
  Dc as toggleItalic,
6725
- _ as tokens,
6733
+ $ as tokens,
6726
6734
  Il as toolbarRemoveLink,
6727
6735
  nu as toolbarSetHeading,
6728
6736
  Dl as toolbarSetLink,