@floegence/floe-webapp-core 0.56.1 → 0.56.2

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.
@@ -1,16 +1,16 @@
1
- import { insert as k, createComponent as w, memo as be, effect as P, template as A, addEventListener as U, use as se, classList as it, setAttribute as s, style as he, spread as dt, mergeProps as st, className as De, setStyleProperty as xe, delegateEvents as ut } from "solid-js/web";
1
+ import { insert as k, createComponent as g, memo as be, effect as P, template as A, addEventListener as U, use as se, classList as it, setAttribute as s, style as he, spread as dt, mergeProps as st, className as De, setStyleProperty as xe, delegateEvents as ut } from "solid-js/web";
2
2
  import { CANVAS_WHEEL_INTERACTIVE_ATTR as vt } from "../ui/localInteractionSurface.js";
3
3
  import { CompositionToolbar as Fe, CompositionIcon as ue, CompositionDivider as mt } from "./WorkbenchCompositionToolbar.js";
4
4
  import { useWorkbenchCompositionText as _e, WorkbenchCompositionActionsContext as We } from "./workbenchCompositionMessages.js";
5
5
  import { SurfaceAnchoredLayer as Ae } from "../ui/SurfaceAnchoredLayer.js";
6
- import { createSignal as re, createMemo as j, For as de, Show as oe, createEffect as fe, onCleanup as ye, useContext as Ne, untrack as Pe, batch as Te } from "solid-js";
7
- import { GripVertical as Ge, Check as ot, ChevronDown as ht, Minus as gt, Plus as wt } from "../icons/index.js";
6
+ import { createSignal as re, createMemo as O, For as de, Show as oe, createEffect as fe, onCleanup as ye, useContext as Ne, untrack as Pe, batch as Te } from "solid-js";
7
+ import { GripVertical as Ge, Check as ot, ChevronDown as ht, Minus as wt, Plus as gt } from "../icons/index.js";
8
8
  import { startHotInteraction as rt } from "../../utils/hotInteraction.js";
9
9
  import { startPointerSession as at } from "../ui/pointerSession.js";
10
10
  import { WORKBENCH_DEFAULT_TEXT_COLOR as bt, WORKBENCH_STICKY_NOTE_COLORS as ft, WORKBENCH_BACKGROUND_MATERIALS as yt, WORKBENCH_REGION_COLOR_OPTIONS as ct, WORKBENCH_TEXT_FONT_OPTIONS as Ie, WORKBENCH_TEXT_COLOR_OPTIONS as kt } from "./workbenchOptions.js";
11
11
  import { compareWorkbenchLayerRenderOrder as xt, createWorkbenchWidgetSurfaceMetrics as $t } from "./workbenchHelpers.js";
12
- import { createOwnerSafePropAccessor as l } from "./workbenchOwnerSafeAccessors.js";
13
- var Ct = /* @__PURE__ */ A("<span class=workbench-note-preview><span class=workbench-preview-writing>"), _t = /* @__PURE__ */ A("<div class=workbench-sticky__title role=textbox aria-multiline=true data-floe-workbench-text-selection-surface=true data-floe-workbench-sticky-local=true data-wb-text-editor=plain data-wb-part=content>"), St = /* @__PURE__ */ A("<div class=workbench-composition-selection aria-hidden=true>"), zt = /* @__PURE__ */ A('<button type=button class="workbench-layer-resize workbench-sticky__resize">'), pt = /* @__PURE__ */ A("<article class=workbench-sticky data-floe-canvas-interactive=true data-floe-workbench-widget-root=true data-wb-plane=work data-wb-object-kind=sticky tabindex=0><div class=workbench-sticky__surface data-floe-input-surface=true><button type=button class=workbench-sticky__grip data-floe-workbench-sticky-local=true data-wb-part=move></button><div class=workbench-sticky__content><div class=workbench-sticky__body role=textbox aria-multiline=true data-floe-workbench-text-selection-surface=true data-wb-text-editor=plain data-floe-workbench-sticky-local=true data-wb-part=content>"), lt = /* @__PURE__ */ A("<div class=workbench-color-options>"), Et = /* @__PURE__ */ A("<button type=button class=workbench-style-choice>"), we = /* @__PURE__ */ A("<button type=button>"), He = /* @__PURE__ */ A("<button type=button class=is-danger>"), Rt = /* @__PURE__ */ A("<article class=workbench-text-annotation data-floe-input-surface=true data-wb-plane=annotation data-wb-object-kind=text data-wb-part=body><div class=workbench-text-annotation__content data-floe-workbench-text-selection-surface=true data-wb-text-editor=plain data-wb-part=content>"), Pt = /* @__PURE__ */ A("<article class=workbench-background-region data-wb-plane=background data-wb-object-kind=region data-wb-part=body><div class=workbench-background-region__label data-floe-input-surface=true><div role=textbox data-floe-workbench-text-selection-surface=true></div></div><button type=button class=workbench-region-grip>"), Tt = /* @__PURE__ */ A("<select><option value=more>"), Mt = /* @__PURE__ */ A('<div class="workbench-layer-control workbench-layer-control--text"data-floe-canvas-interactive=true data-wb-plane=overlay data-wb-object-kind=text data-wb-part=toolbar><div class="workbench-layer-control__selection is-text"aria-hidden=true></div><button type=button class=workbench-text-move data-wb-part=move></button><button type=button class=workbench-layer-resize data-wb-part=resize>'), Lt = /* @__PURE__ */ A("<div class=workbench-text-font-popover role=menu>"), It = /* @__PURE__ */ A("<div class=workbench-text-font-picker data-floe-canvas-interactive=true><button type=button aria-haspopup=menu class=workbench-text-font-trigger><span class=workbench-text-font-trigger__sample>Aa</span><span class=workbench-text-font-trigger__label>"), jt = /* @__PURE__ */ A("<div class=workbench-text-size-stepper role=group><button type=button class=workbench-text-size-stepper__button></button><input class=workbench-text-annotation__size-input type=text inputmode=numeric pattern=[0-9]*><button type=button class=workbench-text-size-stepper__button>"), Ot = /* @__PURE__ */ A("<button type=button role=menuitemradio class=workbench-text-font-option><span class=workbench-text-font-option__sample>Aa</span><span class=workbench-text-font-option__label>"), Dt = /* @__PURE__ */ A("<button type=button class=workbench-layer-swatch>"), Ft = /* @__PURE__ */ A("<option>"), Wt = /* @__PURE__ */ A("<button type=button class=workbench-name-trigger><span>"), At = /* @__PURE__ */ A('<div class="workbench-layer-control workbench-layer-control--region"data-floe-canvas-interactive=true data-wb-plane=overlay data-wb-object-kind=region data-wb-part=toolbar><div class="workbench-layer-control__selection is-region"aria-hidden=true></div><button type=button class=workbench-layer-resize data-wb-part=resize>'), Nt = /* @__PURE__ */ A("<span class=workbench-region-preview-mat><span>"), Gt = /* @__PURE__ */ A("<button type=button class=workbench-style-choice><span class=workbench-region-preview-mat><span>"), Ht = /* @__PURE__ */ A("<label><input type=range min=8 max=100>"), Bt = /* @__PURE__ */ A("<div aria-hidden=true data-wb-plane=overlay data-wb-object-kind=region-outline>"), Xt = /* @__PURE__ */ A("<div class=workbench-region-visibility-outline-layer aria-hidden=true>"), Yt = /* @__PURE__ */ A("<div class=workbench-background-layer>"), Ut = /* @__PURE__ */ A("<div class=workbench-annotation-layer>"), Kt = /* @__PURE__ */ A("<div class=workbench-control-overlay-layer data-wb-plane=overlay>");
12
+ import { createOwnerSafePropAccessor as c } from "./workbenchOwnerSafeAccessors.js";
13
+ var Ct = /* @__PURE__ */ A("<span class=workbench-note-preview><span class=workbench-preview-writing>"), _t = /* @__PURE__ */ A("<div class=workbench-sticky__title role=textbox aria-multiline=true data-floe-workbench-text-selection-surface=true data-floe-workbench-sticky-local=true data-wb-text-editor=plain data-wb-part=content>"), St = /* @__PURE__ */ A("<div class=workbench-composition-selection aria-hidden=true>"), zt = /* @__PURE__ */ A('<button type=button class="workbench-layer-resize workbench-sticky__resize">'), pt = /* @__PURE__ */ A("<article class=workbench-sticky data-floe-canvas-interactive=true data-floe-workbench-widget-root=true data-wb-plane=work data-wb-object-kind=sticky tabindex=0><div class=workbench-sticky__surface data-floe-input-surface=true><button type=button class=workbench-sticky__grip data-floe-workbench-sticky-local=true data-wb-part=move></button><div class=workbench-sticky__content><div class=workbench-sticky__body role=textbox aria-multiline=true data-floe-workbench-text-selection-surface=true data-wb-text-editor=plain data-floe-workbench-sticky-local=true data-wb-part=content>"), lt = /* @__PURE__ */ A("<div class=workbench-color-options>"), Et = /* @__PURE__ */ A("<button type=button class=workbench-style-choice>"), ge = /* @__PURE__ */ A("<button type=button>"), He = /* @__PURE__ */ A("<button type=button class=is-danger>"), Rt = /* @__PURE__ */ A("<article class=workbench-text-annotation data-floe-input-surface=true data-wb-plane=annotation data-wb-object-kind=text data-wb-part=body><div class=workbench-text-annotation__content data-floe-workbench-text-selection-surface=true data-wb-text-editor=plain data-wb-part=content>"), Pt = /* @__PURE__ */ A("<article class=workbench-background-region data-wb-plane=background data-wb-object-kind=region data-wb-part=body><div class=workbench-background-region__label data-floe-input-surface=true><div role=textbox data-floe-workbench-text-selection-surface=true></div></div><button type=button class=workbench-region-grip>"), Tt = /* @__PURE__ */ A("<select><option value=more>"), Mt = /* @__PURE__ */ A('<div class="workbench-layer-control workbench-layer-control--text"data-floe-canvas-interactive=true data-wb-plane=overlay data-wb-object-kind=text data-wb-part=toolbar><div class="workbench-layer-control__selection is-text"aria-hidden=true></div><button type=button class=workbench-text-move data-wb-part=move></button><button type=button class=workbench-layer-resize data-wb-part=resize>'), Lt = /* @__PURE__ */ A("<div class=workbench-text-font-popover role=menu>"), It = /* @__PURE__ */ A("<div class=workbench-text-font-picker data-floe-canvas-interactive=true><button type=button aria-haspopup=menu class=workbench-text-font-trigger><span class=workbench-text-font-trigger__sample>Aa</span><span class=workbench-text-font-trigger__label>"), jt = /* @__PURE__ */ A("<div class=workbench-text-size-stepper role=group><button type=button class=workbench-text-size-stepper__button></button><input class=workbench-text-annotation__size-input type=text inputmode=numeric pattern=[0-9]*><button type=button class=workbench-text-size-stepper__button>"), Ot = /* @__PURE__ */ A("<button type=button role=menuitemradio class=workbench-text-font-option><span class=workbench-text-font-option__sample>Aa</span><span class=workbench-text-font-option__label>"), Dt = /* @__PURE__ */ A("<button type=button class=workbench-layer-swatch>"), Ft = /* @__PURE__ */ A("<option>"), Wt = /* @__PURE__ */ A("<button type=button class=workbench-name-trigger><span>"), At = /* @__PURE__ */ A('<div class="workbench-layer-control workbench-layer-control--region"data-floe-canvas-interactive=true data-wb-plane=overlay data-wb-object-kind=region data-wb-part=toolbar><div class="workbench-layer-control__selection is-region"aria-hidden=true></div><button type=button class=workbench-layer-resize data-wb-part=resize>'), Nt = /* @__PURE__ */ A("<span class=workbench-region-preview-mat><span>"), Gt = /* @__PURE__ */ A("<button type=button class=workbench-style-choice><span class=workbench-region-preview-mat><span>"), Ht = /* @__PURE__ */ A("<label><input type=range min=8 max=100>"), Bt = /* @__PURE__ */ A("<div aria-hidden=true data-wb-plane=overlay data-wb-object-kind=region-outline>"), Xt = /* @__PURE__ */ A("<div class=workbench-region-visibility-outline-layer aria-hidden=true>"), Yt = /* @__PURE__ */ A("<div class=workbench-background-layer>"), Ut = /* @__PURE__ */ A("<div class=workbench-annotation-layer>"), Kt = /* @__PURE__ */ A("<div class=workbench-control-overlay-layer data-wb-plane=overlay>");
14
14
  const Vt = 190, qt = 132, Jt = 180, Qt = 120, Zt = 96, en = 42, tn = {
15
15
  amber: "is-amber",
16
16
  sage: "is-sage",
@@ -22,13 +22,13 @@ const Vt = 190, qt = 132, Jt = 180, Qt = 120, Zt = 96, en = 42, tn = {
22
22
  function Sn() {
23
23
  const e = /* @__PURE__ */ new Map(), [t, r] = re(0);
24
24
  return {
25
- register(u, o) {
26
- return e.set(u, o), r((i) => i + 1), () => {
27
- e.get(u) === o && (e.delete(u), r((i) => i + 1));
25
+ register(v, o) {
26
+ return e.set(v, o), r((i) => i + 1), () => {
27
+ e.get(v) === o && (e.delete(v), r((i) => i + 1));
28
28
  };
29
29
  },
30
- get(u) {
31
- return t(), e.get(u);
30
+ get(v) {
31
+ return t(), e.get(v);
32
32
  }
33
33
  };
34
34
  }
@@ -39,20 +39,20 @@ function Xe(e) {
39
39
  return new Map(e.map((t) => [t.id, t]));
40
40
  }
41
41
  function nn(e, t) {
42
- const r = e.findIndex((u) => u === t);
42
+ const r = e.findIndex((v) => v === t);
43
43
  return e[(r + 1) % e.length] ?? e[0];
44
44
  }
45
45
  function on(e, t, r) {
46
46
  fe(() => {
47
47
  if (!e() || typeof document > "u") return;
48
- const u = (i) => {
48
+ const v = (i) => {
49
49
  const x = t();
50
50
  x && i.target instanceof Node && x.contains(i.target) || r();
51
51
  }, o = (i) => {
52
52
  i.key === "Escape" && r();
53
53
  };
54
- document.addEventListener("pointerdown", u, !0), document.addEventListener("keydown", o), ye(() => {
55
- document.removeEventListener("pointerdown", u, !0), document.removeEventListener("keydown", o);
54
+ document.addEventListener("pointerdown", v, !0), document.addEventListener("keydown", o), ye(() => {
55
+ document.removeEventListener("pointerdown", v, !0), document.removeEventListener("keydown", o);
56
56
  });
57
57
  });
58
58
  }
@@ -62,38 +62,38 @@ function tt(e, t) {
62
62
  return r === t || t.contains(r);
63
63
  }
64
64
  function Me(e) {
65
- const [t, r] = re(), [u, o] = re(!1), [i, x] = re(!1);
65
+ const [t, r] = re(), [v, o] = re(!1), [i, x] = re(!1);
66
66
  let z;
67
- const O = () => t()?.textContent ?? "", B = (g) => r(g), D = (g) => {
68
- const d = e.singleLine ? (g.textContent ?? "").trim() : g.innerHTML ?? "";
67
+ const D = () => t()?.textContent ?? "", B = (w) => r(w), F = (w) => {
68
+ const d = e.singleLine ? (w.textContent ?? "").trim() : w.innerHTML ?? "";
69
69
  d !== e.value() && e.onCommit(d);
70
70
  };
71
71
  fe(() => {
72
- const g = t();
73
- if (!g || u() || i()) return;
72
+ const w = t();
73
+ if (!w || v() || i()) return;
74
74
  const d = e.value();
75
- (g.innerHTML ?? "") !== d && (e.singleLine ? g.textContent = d : g.innerHTML = d);
75
+ (w.innerHTML ?? "") !== d && (e.singleLine ? w.textContent = d : w.innerHTML = d);
76
76
  }), fe(() => {
77
- const g = t();
78
- if (!g || !i()) return;
79
- const d = (m) => {
80
- m.composedPath().includes(g) || g.blur();
81
- }, T = g.ownerDocument;
77
+ const w = t();
78
+ if (!w || !i()) return;
79
+ const d = (h) => {
80
+ h.composedPath().includes(w) || w.blur();
81
+ }, T = w.ownerDocument;
82
82
  T.addEventListener("pointerdown", d, !0), ye(() => T.removeEventListener("pointerdown", d, !0));
83
83
  });
84
84
  const p = () => {
85
85
  x(!0);
86
- }, Y = (g) => {
86
+ }, Y = (w) => {
87
87
  const d = document.getSelection();
88
- tt(d, g.currentTarget) && (z = d.getRangeAt(0).cloneRange()), u() || D(g.currentTarget), x(!1);
89
- }, E = (g) => {
90
- if (g.stopPropagation(), u() || g.isComposing || g.keyCode === 229) return;
91
- const d = g.ctrlKey || g.metaKey;
92
- g.key === "Escape" || g.key === "Enter" && (d || e.singleLine) ? (g.preventDefault(), g.currentTarget.blur()) : d && g.key === "b" ? (g.preventDefault(), document.execCommand("bold", !1)) : d && g.key === "i" && (g.preventDefault(), document.execCommand("italic", !1));
93
- }, L = () => {
88
+ tt(d, w.currentTarget) && (z = d.getRangeAt(0).cloneRange()), v() || F(w.currentTarget), x(!1);
89
+ }, E = (w) => {
90
+ if (w.stopPropagation(), v() || w.isComposing || w.keyCode === 229) return;
91
+ const d = w.ctrlKey || w.metaKey;
92
+ w.key === "Escape" || w.key === "Enter" && (d || e.singleLine) ? (w.preventDefault(), w.currentTarget.blur()) : d && w.key === "b" ? (w.preventDefault(), document.execCommand("bold", !1)) : d && w.key === "i" && (w.preventDefault(), document.execCommand("italic", !1));
93
+ }, I = () => {
94
94
  o(!0);
95
- }, C = (g) => {
96
- document.activeElement !== g.currentTarget && D(g.currentTarget), o(!1);
95
+ }, C = (w) => {
96
+ document.activeElement !== w.currentTarget && F(w.currentTarget), o(!1);
97
97
  }, G = () => {
98
98
  x(!0), t()?.focus({
99
99
  preventScroll: !0
@@ -103,21 +103,21 @@ function Me(e) {
103
103
  bind: B,
104
104
  blur: () => t()?.blur(),
105
105
  isFocused: i,
106
- readText: O,
106
+ readText: D,
107
107
  focus: G,
108
- insertTextAtSelection: (g) => {
108
+ insertTextAtSelection: (w) => {
109
109
  const d = t();
110
110
  if (!d) return;
111
- const T = document.getSelection(), m = tt(T, d) ? T.getRangeAt(0).cloneRange() : void 0, c = z && d.contains(z.commonAncestorContainer) ? z : void 0, h = m ?? c?.cloneRange() ?? document.createRange();
112
- if (G(), !m && !c && (h.selectNodeContents(d), h.collapse(!1)), T?.removeAllRanges(), T?.addRange(h), document.execCommand?.("insertText", !1, g)) return;
113
- h.deleteContents();
114
- const n = document.createTextNode(g);
115
- h.insertNode(n), h.setStartAfter(n), h.collapse(!0), T?.removeAllRanges(), T?.addRange(h);
111
+ const T = document.getSelection(), h = tt(T, d) ? T.getRangeAt(0).cloneRange() : void 0, l = z && d.contains(z.commonAncestorContainer) ? z : void 0, u = h ?? l?.cloneRange() ?? document.createRange();
112
+ if (G(), !h && !l && (u.selectNodeContents(d), u.collapse(!1)), T?.removeAllRanges(), T?.addRange(u), document.execCommand?.("insertText", !1, w)) return;
113
+ u.deleteContents();
114
+ const n = document.createTextNode(w);
115
+ u.insertNode(n), u.setStartAfter(n), u.collapse(!0), T?.removeAllRanges(), T?.addRange(u);
116
116
  },
117
117
  handleFocus: p,
118
118
  handleBlur: Y,
119
119
  handleKeyDown: E,
120
- handleCompositionStart: L,
120
+ handleCompositionStart: I,
121
121
  handleCompositionEnd: C
122
122
  };
123
123
  }
@@ -193,40 +193,40 @@ function Ee(e) {
193
193
  };
194
194
  }
195
195
  function Le(e) {
196
- const t = l(() => e.readPosition()), r = l(() => e.readGeometry?.() ?? {
196
+ const t = c(() => e.readPosition()), r = c(() => e.readGeometry?.() ?? {
197
197
  width: 0,
198
198
  height: 0
199
- }), u = l(() => e.viewportScale()), o = l(() => e.onCommitMove), i = l(() => e.onPreviewMove), x = l(() => e.onPreviewEnd), z = l(() => e.onInteractionStart), O = l(() => e.onInteractionEnd), B = l(() => e.onCommitStart), [D, p] = re(null);
199
+ }), v = c(() => e.viewportScale()), o = c(() => e.onCommitMove), i = c(() => e.onPreviewMove), x = c(() => e.onPreviewEnd), z = c(() => e.onInteractionStart), D = c(() => e.onInteractionEnd), B = c(() => e.onCommitStart), [F, p] = re(null);
200
200
  let Y;
201
201
  return ye(() => {
202
202
  Y?.stop({
203
203
  reason: "manual_stop",
204
204
  commit: !1
205
- }), Y = void 0, Pe(D)?.stopInteraction();
205
+ }), Y = void 0, Pe(F)?.stopInteraction();
206
206
  }), {
207
- position: j(() => {
208
- const C = D();
207
+ position: O(() => {
208
+ const C = F();
209
209
  return C ? {
210
210
  x: C.worldX,
211
211
  y: C.worldY
212
212
  } : t();
213
213
  }),
214
- isDragging: () => D() !== null,
214
+ isDragging: () => F() !== null,
215
215
  beginDrag: (C) => {
216
216
  if (C.button !== 0) return;
217
217
  C.preventDefault(), C.stopPropagation(), Y?.stop({
218
218
  reason: "manual_stop",
219
219
  commit: !1
220
220
  });
221
- const G = t(), q = Math.max(u(), 1e-3), g = rt({
221
+ const G = t(), q = Math.max(v(), 1e-3), w = rt({
222
222
  kind: "drag",
223
223
  cursor: "grabbing"
224
224
  });
225
225
  let d = !1;
226
226
  z()?.();
227
227
  const T = () => {
228
- d || (d = !0, g(), O()?.());
229
- }, m = r(), c = i(), h = x(), n = B(), F = o();
228
+ d || (d = !0, w(), D()?.());
229
+ }, h = r(), l = i(), u = x(), n = B(), L = o();
230
230
  p({
231
231
  pointerId: C.pointerId,
232
232
  startClientX: C.clientX,
@@ -242,7 +242,7 @@ function Le(e) {
242
242
  pointerEvent: C,
243
243
  captureEl: C.currentTarget,
244
244
  onMove: (X) => {
245
- let I = null;
245
+ let j = null;
246
246
  Te(() => {
247
247
  p((S) => {
248
248
  if (!S || S.pointerId !== X.pointerId) return S;
@@ -250,33 +250,33 @@ function Le(e) {
250
250
  x: S.startWorldX + (X.clientX - S.startClientX) / S.scale,
251
251
  y: S.startWorldY + (X.clientY - S.startClientY) / S.scale
252
252
  };
253
- return I = {
253
+ return j = {
254
254
  x: S.startWorldX + (X.clientX - S.startClientX) / S.scale,
255
255
  y: S.startWorldY + (X.clientY - S.startClientY) / S.scale,
256
- width: m.width,
257
- height: m.height
256
+ width: h.width,
257
+ height: h.height
258
258
  }, {
259
259
  ...S,
260
260
  worldX: te.x,
261
261
  worldY: te.y,
262
262
  moved: S.moved || Math.abs(te.x - S.startWorldX) > 2 || Math.abs(te.y - S.startWorldY) > 2
263
263
  };
264
- }), I && c?.(I);
264
+ }), j && l?.(j);
265
265
  });
266
266
  },
267
267
  onEnd: ({
268
268
  commit: X
269
269
  }) => {
270
- const I = Pe(D);
270
+ const j = Pe(F);
271
271
  Te(() => {
272
- if (I && X) {
272
+ if (j && X) {
273
273
  const S = {
274
- x: I.worldX,
275
- y: I.worldY
274
+ x: j.worldX,
275
+ y: j.worldY
276
276
  };
277
- n?.(S), I.moved && F(S);
277
+ n?.(S), j.moved && L(S);
278
278
  }
279
- I?.stopInteraction(), p(null), Y = void 0, h?.();
279
+ j?.stopInteraction(), p(null), Y = void 0, u?.();
280
280
  });
281
281
  }
282
282
  });
@@ -284,72 +284,72 @@ function Le(e) {
284
284
  };
285
285
  }
286
286
  function Ye(e) {
287
- const t = l(() => e.readSize()), r = l(() => e.viewportScale()), u = l(() => e.onCommitResize), o = l(() => e.onPreviewResize), i = l(() => e.onPreviewEnd), x = l(() => e.onInteractionStart), z = l(() => e.onInteractionEnd), [O, B] = re(null);
288
- let D;
287
+ const t = c(() => e.readSize()), r = c(() => e.viewportScale()), v = c(() => e.onCommitResize), o = c(() => e.onPreviewResize), i = c(() => e.onPreviewEnd), x = c(() => e.onInteractionStart), z = c(() => e.onInteractionEnd), [D, B] = re(null);
288
+ let F;
289
289
  return ye(() => {
290
- D?.stop({
290
+ F?.stop({
291
291
  reason: "manual_stop",
292
292
  commit: !1
293
- }), D = void 0, Pe(O)?.stopInteraction();
293
+ }), F = void 0, Pe(D)?.stopInteraction();
294
294
  }), {
295
- size: j(() => {
296
- const E = O();
295
+ size: O(() => {
296
+ const E = D();
297
297
  return E ? {
298
298
  width: E.width,
299
299
  height: E.height
300
300
  } : t();
301
301
  }),
302
- isResizing: () => O() !== null,
302
+ isResizing: () => D() !== null,
303
303
  beginResize: (E) => {
304
304
  if (E.button !== 0) return;
305
- E.preventDefault(), E.stopPropagation(), D?.stop({
305
+ E.preventDefault(), E.stopPropagation(), F?.stop({
306
306
  reason: "manual_stop",
307
307
  commit: !1
308
308
  });
309
- const L = t(), C = Math.max(r(), 1e-3), G = rt({
309
+ const I = t(), C = Math.max(r(), 1e-3), G = rt({
310
310
  kind: "resize",
311
311
  cursor: "nwse-resize"
312
312
  });
313
313
  let q = !1;
314
314
  x()?.();
315
- const g = () => {
315
+ const w = () => {
316
316
  q || (q = !0, G(), z()?.());
317
- }, d = o(), T = i(), m = u();
317
+ }, d = o(), T = i(), h = v();
318
318
  B({
319
319
  pointerId: E.pointerId,
320
320
  startClientX: E.clientX,
321
321
  startClientY: E.clientY,
322
- startWidth: L.width,
323
- startHeight: L.height,
324
- width: L.width,
325
- height: L.height,
322
+ startWidth: I.width,
323
+ startHeight: I.height,
324
+ width: I.width,
325
+ height: I.height,
326
326
  scale: C,
327
- stopInteraction: g
328
- }), D = at({
327
+ stopInteraction: w
328
+ }), F = at({
329
329
  pointerEvent: E,
330
330
  captureEl: E.currentTarget,
331
- onMove: (c) => {
332
- let h = null;
331
+ onMove: (l) => {
332
+ let u = null;
333
333
  Te(() => {
334
- B((n) => !n || n.pointerId !== c.pointerId ? n : (h = {
335
- width: Math.max(e.minWidth, n.startWidth + (c.clientX - n.startClientX) / n.scale),
336
- height: Math.max(e.minHeight, n.startHeight + (c.clientY - n.startClientY) / n.scale)
334
+ B((n) => !n || n.pointerId !== l.pointerId ? n : (u = {
335
+ width: Math.max(e.minWidth, n.startWidth + (l.clientX - n.startClientX) / n.scale),
336
+ height: Math.max(e.minHeight, n.startHeight + (l.clientY - n.startClientY) / n.scale)
337
337
  }, {
338
338
  ...n,
339
- width: h.width,
340
- height: h.height
341
- })), h && d?.(h);
339
+ width: u.width,
340
+ height: u.height
341
+ })), u && d?.(u);
342
342
  });
343
343
  },
344
344
  onEnd: ({
345
- commit: c
345
+ commit: l
346
346
  }) => {
347
- const h = Pe(O);
347
+ const u = Pe(D);
348
348
  Te(() => {
349
- h && c && m({
350
- width: h.width,
351
- height: h.height
352
- }), h?.stopInteraction(), B(null), D = void 0, T?.();
349
+ u && l && h({
350
+ width: u.width,
351
+ height: u.height
352
+ }), u?.stopInteraction(), B(null), F = void 0, T?.();
353
353
  });
354
354
  }
355
355
  });
@@ -360,8 +360,8 @@ function nt(e) {
360
360
  return (() => {
361
361
  var t = Ct();
362
362
  return P((r) => {
363
- var u = e.color, o = e.material;
364
- return u !== r.e && s(t, "data-note-color", r.e = u), o !== r.t && s(t, "data-note-material", r.t = o), r;
363
+ var v = e.color, o = e.material;
364
+ return v !== r.e && s(t, "data-note-color", r.e = v), o !== r.t && s(t, "data-note-material", r.t = o), r;
365
365
  }, {
366
366
  e: void 0,
367
367
  t: void 0
@@ -369,21 +369,21 @@ function nt(e) {
369
369
  })();
370
370
  }
371
371
  function zn(e) {
372
- const t = _e(), [r, u] = re(), o = l(() => e.item), i = l(() => e.selected), x = l(() => e.viewportScale), z = l(() => e.projectedViewport), O = l(() => e.surfaceReady ?? !0), B = l(() => e.renderLayer), D = l(() => e.topRenderLayer), p = l(() => e.locked), Y = l(() => e.filtered), E = l(() => e.visualFront ?? !1), L = l(() => e.onSelect), C = l(() => e.onContextMenu), G = l(() => e.onClaimVisualFrontOwner), q = l(() => e.onCommitFront), g = l(() => e.onCommitMove), d = l(() => e.onCommitResize), T = l(() => e.onUpdate), m = l(() => e.onDelete), c = l(() => e.onLayoutInteractionStart), h = l(() => e.onLayoutInteractionEnd), n = Me({
372
+ const t = _e(), [r, v] = re(), o = c(() => e.item), i = c(() => e.selected), x = c(() => e.viewportScale), z = c(() => e.projectedViewport), D = c(() => e.surfaceReady ?? !0), B = c(() => e.renderLayer), F = c(() => e.topRenderLayer), p = c(() => e.locked), Y = c(() => e.filtered), E = c(() => e.visualFront ?? !1), I = c(() => e.onSelect), C = c(() => e.onContextMenu), G = c(() => e.onClaimVisualFrontOwner), q = c(() => e.onCommitFront), w = c(() => e.onCommitMove), d = c(() => e.onCommitResize), T = c(() => e.onUpdate), h = c(() => e.onDelete), l = c(() => e.onLayoutInteractionStart), u = c(() => e.onLayoutInteractionEnd), n = Me({
373
373
  value: () => o().body,
374
374
  onCommit: ($) => T()(o().id, {
375
375
  body: $
376
376
  })
377
- }), F = Me({
377
+ }), L = Me({
378
378
  value: () => o().title ?? "",
379
379
  onCommit: ($) => T()(o().id, {
380
380
  title: $
381
381
  })
382
382
  });
383
383
  fe(() => {
384
- p() && (F.blur(), n.blur());
384
+ p() && (L.blur(), n.blur());
385
385
  });
386
- const [X, I] = re("body"), S = Ne(We), te = () => F.isFocused() || n.isFocused(), [ne, ae] = re(!1);
386
+ const [X, j] = re("body"), S = Ne(We), te = () => L.isFocused() || n.isFocused(), [ne, ae] = re(!1);
387
387
  let _;
388
388
  const J = () => {
389
389
  typeof window > "u" || _ === void 0 || (window.clearTimeout(_), _ = void 0);
@@ -395,20 +395,20 @@ function zn(e) {
395
395
  ye(() => J());
396
396
  const ve = async () => {
397
397
  typeof navigator > "u" || !navigator.clipboard?.writeText || (await navigator.clipboard.writeText(n.readText()), ce());
398
- }, v = ($) => {
398
+ }, m = ($) => {
399
399
  if ($.button !== 0) return;
400
400
  const ie = o();
401
- L()(ie.id), !p() && ($.target instanceof Element && $.target.closest('[data-floe-workbench-sticky-local="true"]') || (G()?.(ie.id), b.beginDrag($)));
401
+ I()(ie.id), !p() && ($.target instanceof Element && $.target.closest('[data-floe-workbench-sticky-local="true"]') || (G()?.(ie.id), b.beginDrag($)));
402
402
  }, b = Le({
403
403
  viewportScale: x,
404
404
  readPosition: () => ({
405
405
  x: o().x,
406
406
  y: o().y
407
407
  }),
408
- onCommitMove: ($) => g()(o().id, $),
408
+ onCommitMove: ($) => w()(o().id, $),
409
409
  onCommitStart: () => q()?.(o().id),
410
- onInteractionStart: () => c()?.(),
411
- onInteractionEnd: () => h()?.()
410
+ onInteractionStart: () => l()?.(),
411
+ onInteractionEnd: () => u()?.()
412
412
  }), y = Ye({
413
413
  viewportScale: x,
414
414
  readSize: () => ({
@@ -418,9 +418,9 @@ function zn(e) {
418
418
  minWidth: Vt,
419
419
  minHeight: qt,
420
420
  onCommitResize: ($) => d()(o().id, $),
421
- onInteractionStart: () => c()?.(),
422
- onInteractionEnd: () => h()?.()
423
- }), W = j(() => b.position()), H = j(() => y.size()), f = j(() => {
421
+ onInteractionStart: () => l()?.(),
422
+ onInteractionEnd: () => u()?.()
423
+ }), W = O(() => b.position()), H = O(() => y.size()), f = O(() => {
424
424
  const $ = z();
425
425
  if ($)
426
426
  return $t({
@@ -430,43 +430,43 @@ function zn(e) {
430
430
  worldWidth: H().width,
431
431
  worldHeight: H().height,
432
432
  viewport: $(),
433
- ready: O()
433
+ ready: D()
434
434
  });
435
- }), K = j(() => f()?.rect.viewportScale ?? Math.max(x(), 1e-3)), Z = j(() => ({
435
+ }), K = O(() => f()?.rect.viewportScale ?? Math.max(x(), 1e-3)), Z = O(() => ({
436
436
  "--workbench-layer-control-inverse-scale": `${1 / K()}`,
437
437
  width: `${H().width}px`,
438
438
  height: `${H().height}px`,
439
439
  transform: z() ? `translate(${f()?.rect.screenX ?? 0}px, ${f()?.rect.screenY ?? 0}px) scale(${K()})` : `translate(${W().x}px, ${W().y}px)`,
440
440
  "transform-origin": "0 0",
441
- "z-index": `${i() || E() || b.isDragging() || y.isResizing() ? D() + 1 : B()}`
441
+ "z-index": `${i() || E() || b.isDragging() || y.isResizing() ? F() + 1 : B()}`
442
442
  }));
443
443
  return (() => {
444
444
  var $ = pt(), ie = $.firstChild, N = ie.firstChild, le = N.nextSibling, ee = le.firstChild;
445
445
  $.$$contextmenu = (a) => {
446
446
  a.preventDefault(), a.stopPropagation(), C()?.(a, o());
447
- }, $.addEventListener("focus", () => L()(o().id)), $.$$pointerdown = v, se(u, $), N.$$pointerdown = (a) => {
447
+ }, $.addEventListener("focus", () => I()(o().id)), $.$$pointerdown = m, se(v, $), N.$$pointerdown = (a) => {
448
448
  if (p()) return;
449
449
  const M = o();
450
- L()(M.id), G()?.(M.id), b.beginDrag(a);
451
- }, k(N, w(Ge, {
450
+ I()(M.id), G()?.(M.id), b.beginDrag(a);
451
+ }, k(N, g(Ge, {
452
452
  class: "w-3.5 h-3.5"
453
453
  })), dt(le, st(() => ({
454
454
  [vt]: i() ? "true" : void 0
455
- })), !1, !0), k(le, w(oe, {
455
+ })), !1, !0), k(le, g(oe, {
456
456
  get when() {
457
457
  return o().title !== void 0;
458
458
  },
459
459
  get children() {
460
460
  var a = _t();
461
- U(a, "compositionend", F.handleCompositionEnd), U(a, "compositionstart", F.handleCompositionStart), U(a, "keydown", F.handleKeyDown, !0), U(a, "blur", F.handleBlur), a.addEventListener("focus", (R) => {
462
- I("title"), F.handleFocus(R);
461
+ U(a, "compositionend", L.handleCompositionEnd), U(a, "compositionstart", L.handleCompositionStart), U(a, "keydown", L.handleKeyDown, !0), U(a, "blur", L.handleBlur), a.addEventListener("focus", (R) => {
462
+ j("title"), L.handleFocus(R);
463
463
  }), a.$$pointerdown = (R) => {
464
- R.stopPropagation(), L()(o().id);
464
+ R.stopPropagation(), I()(o().id);
465
465
  };
466
- var M = F.bind;
467
- return typeof M == "function" ? se(M, a) : F.bind = a, s(a, "spellcheck", !1), P((R) => {
468
- var V = !p(), me = t("stickyTitle"), ge = t("textPlaceholder");
469
- return V !== R.e && s(a, "contenteditable", R.e = V), me !== R.t && s(a, "aria-label", R.t = me), ge !== R.a && s(a, "data-placeholder", R.a = ge), R;
466
+ var M = L.bind;
467
+ return typeof M == "function" ? se(M, a) : L.bind = a, s(a, "spellcheck", !1), P((R) => {
468
+ var V = !p(), me = t("stickyTitle"), we = t("textPlaceholder");
469
+ return V !== R.e && s(a, "contenteditable", R.e = V), me !== R.t && s(a, "aria-label", R.t = me), we !== R.a && s(a, "data-placeholder", R.a = we), R;
470
470
  }, {
471
471
  e: void 0,
472
472
  t: void 0,
@@ -474,17 +474,17 @@ function zn(e) {
474
474
  }), a;
475
475
  }
476
476
  }), ee), U(ee, "compositionend", n.handleCompositionEnd), U(ee, "compositionstart", n.handleCompositionStart), U(ee, "keydown", n.handleKeyDown, !0), U(ee, "blur", n.handleBlur), ee.addEventListener("focus", (a) => {
477
- I("body"), n.handleFocus(a);
477
+ j("body"), n.handleFocus(a);
478
478
  }), ee.$$pointerdown = (a) => {
479
- a.stopPropagation(), L()(o().id);
479
+ a.stopPropagation(), I()(o().id);
480
480
  };
481
481
  var ke = n.bind;
482
- return typeof ke == "function" ? se(ke, ee) : n.bind = ee, s(ee, "spellcheck", !1), k($, w(oe, {
482
+ return typeof ke == "function" ? se(ke, ee) : n.bind = ee, s(ee, "spellcheck", !1), k($, g(oe, {
483
483
  get when() {
484
484
  return be(() => !!i())() && !p();
485
485
  },
486
486
  get children() {
487
- return w(Ae, {
487
+ return g(Ae, {
488
488
  reservedSpace: {
489
489
  top: 64,
490
490
  narrowTop: 106,
@@ -498,15 +498,15 @@ function zn(e) {
498
498
  },
499
499
  class: "workbench-object-tools",
500
500
  get children() {
501
- return w(Fe, {
501
+ return g(Fe, {
502
502
  kind: "sticky",
503
- onInsertEmoji: (a) => (X() === "title" && o().title !== void 0 ? F : n).insertTextAtSelection(a),
503
+ onInsertEmoji: (a) => (X() === "title" && o().title !== void 0 ? L : n).insertTextAtSelection(a),
504
504
  materials: ["tint", "tab", "ruled"],
505
505
  get material() {
506
506
  return o().material ?? "tint";
507
507
  },
508
508
  materialLabel: (a) => t("useStickyMaterial", t(a)),
509
- preview: (a) => w(nt, {
509
+ preview: (a) => g(nt, {
510
510
  get color() {
511
511
  return o().color;
512
512
  },
@@ -518,20 +518,20 @@ function zn(e) {
518
518
  get palette() {
519
519
  return (() => {
520
520
  var a = lt();
521
- return k(a, w(de, {
521
+ return k(a, g(de, {
522
522
  each: ft,
523
523
  children: (M) => (() => {
524
524
  var R = Et();
525
525
  return R.$$click = () => T()(o().id, {
526
526
  color: M
527
- }), R.$$pointerdown = Q, k(R, w(nt, {
527
+ }), R.$$pointerdown = Q, k(R, g(nt, {
528
528
  color: M,
529
529
  get material() {
530
530
  return o().material ?? "tint";
531
531
  }
532
- }), null), k(R, w(ot, {}), null), P((V) => {
533
- var me = t("stickyColor", t(M)), ge = o().color === M;
534
- return me !== V.e && s(R, "aria-label", V.e = me), ge !== V.t && s(R, "aria-pressed", V.t = ge), V;
532
+ }), null), k(R, g(ot, {}), null), P((V) => {
533
+ var me = t("stickyColor", t(M)), we = o().color === M;
534
+ return me !== V.e && s(R, "aria-label", V.e = me), we !== V.t && s(R, "aria-pressed", V.t = we), V;
535
535
  }, {
536
536
  e: void 0,
537
537
  t: void 0
@@ -541,12 +541,12 @@ function zn(e) {
541
541
  })();
542
542
  },
543
543
  get actions() {
544
- return [w(oe, {
544
+ return [g(oe, {
545
545
  when: S,
546
546
  get fallback() {
547
547
  return (() => {
548
- var a = we();
549
- return a.$$click = ve, a.$$pointerdown = Q, k(a, w(ue, {
548
+ var a = ge();
549
+ return a.$$click = ve, a.$$pointerdown = Q, k(a, g(ue, {
550
550
  name: "copy"
551
551
  })), P((M) => {
552
552
  var R = t("copySticky"), V = !!ne();
@@ -558,11 +558,11 @@ function zn(e) {
558
558
  })();
559
559
  },
560
560
  get children() {
561
- var a = we();
561
+ var a = ge();
562
562
  return a.$$click = () => S?.duplicate({
563
563
  kind: "sticky_note",
564
564
  id: o().id
565
- }), a.$$pointerdown = Q, k(a, w(ue, {
565
+ }), a.$$pointerdown = Q, k(a, g(ue, {
566
566
  name: "copy"
567
567
  })), P((M) => {
568
568
  var R = t("duplicate"), V = t("duplicate");
@@ -574,7 +574,7 @@ function zn(e) {
574
574
  }
575
575
  }), (() => {
576
576
  var a = He();
577
- return a.$$click = () => m()(o().id), a.$$pointerdown = Q, k(a, w(ue, {
577
+ return a.$$click = () => h()(o().id), a.$$pointerdown = Q, k(a, g(ue, {
578
578
  name: "trash"
579
579
  })), P((M) => {
580
580
  var R = t("deleteSticky"), V = t("deleteSticky");
@@ -589,14 +589,14 @@ function zn(e) {
589
589
  }
590
590
  });
591
591
  }
592
- }), null), k($, w(oe, {
592
+ }), null), k($, g(oe, {
593
593
  get when() {
594
594
  return i();
595
595
  },
596
596
  get children() {
597
597
  return St();
598
598
  }
599
- }), null), k($, w(oe, {
599
+ }), null), k($, g(oe, {
600
600
  get when() {
601
601
  return !p();
602
602
  },
@@ -614,8 +614,8 @@ function zn(e) {
614
614
  "is-copied": ne(),
615
615
  "is-editing": te(),
616
616
  [tn[o().color]]: !0
617
- }, R = o().id, V = o().id, me = o().id, ge = Z(), Ue = o().color, Ke = o().material ?? "tint", Ve = t("dragSticky"), qe = p(), Je = t("textPlaceholder"), Qe = !p(), Ze = p() ? "true" : void 0, et = t("stickyBody");
618
- return a.e = it($, M, a.e), R !== a.t && s($, "data-floe-workbench-widget-id", a.t = R), V !== a.a && s($, "data-wb-object-id", a.a = V), me !== a.o && s($, "data-floe-workbench-sticky-id", a.o = me), a.i = he($, ge, a.i), Ue !== a.n && s(ie, "data-note-color", a.n = Ue), Ke !== a.s && s(ie, "data-note-material", a.s = Ke), Ve !== a.h && s(N, "aria-label", a.h = Ve), qe !== a.r && (N.disabled = a.r = qe), Je !== a.d && s(ee, "data-placeholder", a.d = Je), Qe !== a.l && s(ee, "contenteditable", a.l = Qe), Ze !== a.u && s(ee, "aria-disabled", a.u = Ze), et !== a.c && s(ee, "aria-label", a.c = et), a;
617
+ }, R = o().id, V = o().id, me = o().id, we = Z(), Ue = o().color, Ke = o().material ?? "tint", Ve = t("dragSticky"), qe = p(), Je = t("textPlaceholder"), Qe = !p(), Ze = p() ? "true" : void 0, et = t("stickyBody");
618
+ return a.e = it($, M, a.e), R !== a.t && s($, "data-floe-workbench-widget-id", a.t = R), V !== a.a && s($, "data-wb-object-id", a.a = V), me !== a.o && s($, "data-floe-workbench-sticky-id", a.o = me), a.i = he($, we, a.i), Ue !== a.n && s(ie, "data-note-color", a.n = Ue), Ke !== a.s && s(ie, "data-note-material", a.s = Ke), Ve !== a.h && s(N, "aria-label", a.h = Ve), qe !== a.r && (N.disabled = a.r = qe), Je !== a.d && s(ee, "data-placeholder", a.d = Je), Qe !== a.l && s(ee, "contenteditable", a.l = Qe), Ze !== a.u && s(ee, "aria-disabled", a.u = Ze), et !== a.c && s(ee, "aria-label", a.c = et), a;
619
619
  }, {
620
620
  e: void 0,
621
621
  t: void 0,
@@ -634,27 +634,27 @@ function zn(e) {
634
634
  })();
635
635
  }
636
636
  function cn(e) {
637
- const t = _e(), r = l(() => e.item), u = l(() => e.selected), o = l(() => e.editable), i = l(() => e.viewportScale), x = l(() => e.viewport ?? {
637
+ const t = _e(), r = c(() => e.item), v = c(() => e.selected), o = c(() => e.editable), i = c(() => e.viewportScale), x = c(() => e.viewport ?? {
638
638
  x: 0,
639
639
  y: 0,
640
640
  scale: 1
641
- }), z = l(() => e.projection), O = l(() => e.preview), B = l(() => e.textEditorRegistry), D = l(() => e.onPreviewGeometry), p = l(() => e.onSelect), Y = l(() => e.onContextMenu), E = l(() => e.onCommitMove), L = l(() => e.onUpdate), C = Me({
641
+ }), z = c(() => e.projection), D = c(() => e.preview), B = c(() => e.textEditorRegistry), F = c(() => e.onPreviewGeometry), p = c(() => e.onSelect), Y = c(() => e.onContextMenu), E = c(() => e.onCommitMove), I = c(() => e.onUpdate), C = Me({
642
642
  value: () => r().text,
643
- onCommit: (m) => L()(r().id, {
644
- text: m
643
+ onCommit: (h) => I()(r().id, {
644
+ text: h
645
645
  })
646
646
  });
647
647
  fe(() => {
648
- const m = B();
649
- if (!m) return;
650
- const c = m.register(r().id, {
648
+ const h = B();
649
+ if (!h) return;
650
+ const l = h.register(r().id, {
651
651
  focus: C.focus,
652
652
  blur: C.blur,
653
653
  isFocused: C.isFocused,
654
654
  insertTextAtSelection: C.insertTextAtSelection,
655
655
  readText: C.readText
656
656
  });
657
- ye(c);
657
+ ye(l);
658
658
  });
659
659
  const G = Le({
660
660
  viewportScale: i,
@@ -666,26 +666,26 @@ function cn(e) {
666
666
  width: r().width,
667
667
  height: r().height
668
668
  }),
669
- onCommitMove: (m) => E()(r().id, m),
670
- onPreviewMove: (m) => D()?.({
669
+ onCommitMove: (h) => E()(r().id, h),
670
+ onPreviewMove: (h) => F()?.({
671
671
  kind: "annotation",
672
672
  id: r().id,
673
- ...m
673
+ ...h
674
674
  }),
675
- onPreviewEnd: () => D()?.(null)
676
- }), q = j(() => {
677
- const m = r(), c = Se(O(), "annotation", m.id);
675
+ onPreviewEnd: () => F()?.(null)
676
+ }), q = O(() => {
677
+ const h = r(), l = Se(D(), "annotation", h.id);
678
678
  return ze({
679
679
  geometry: Ee({
680
- preview: c,
680
+ preview: l,
681
681
  position: G.position(),
682
- width: m.width,
683
- height: m.height
682
+ width: h.width,
683
+ height: h.height
684
684
  }),
685
685
  viewport: x(),
686
686
  projection: z()
687
687
  });
688
- }), g = j(() => z() === "screen" ? Math.max(x().scale, 1e-3) : 1), d = j(() => ({
688
+ }), w = O(() => z() === "screen" ? Math.max(x().scale, 1e-3) : 1), d = O(() => ({
689
689
  ...pe(q()),
690
690
  "z-index": `${r().z_index}`,
691
691
  "--workbench-text-color": r().color,
@@ -698,24 +698,24 @@ function cn(e) {
698
698
  "--workbench-text-weight": `${r().font_weight}`,
699
699
  "--workbench-text-align": r().align,
700
700
  "--workbench-text-family": r().font_family,
701
- "--workbench-text-content-scale": `${g()}`,
702
- "--workbench-text-content-inverse-scale": `${1 / g()}`
703
- })), T = (m) => {
704
- !o() || m.button !== 0 || m.target instanceof Element && m.target.closest(".workbench-text-annotation__content") || (m.stopPropagation(), p()(r().id));
701
+ "--workbench-text-content-scale": `${w()}`,
702
+ "--workbench-text-content-inverse-scale": `${1 / w()}`
703
+ })), T = (h) => {
704
+ !o() || h.button !== 0 || h.target instanceof Element && h.target.closest(".workbench-text-annotation__content") || (h.stopPropagation(), p()(r().id));
705
705
  };
706
706
  return (() => {
707
- var m = Rt(), c = m.firstChild;
708
- m.$$contextmenu = (n) => {
707
+ var h = Rt(), l = h.firstChild;
708
+ h.$$contextmenu = (n) => {
709
709
  o() && (n.preventDefault(), n.stopPropagation(), p()(r().id), Y()?.(n, r()));
710
- }, m.$$pointerdown = T, U(c, "compositionend", C.handleCompositionEnd), U(c, "compositionstart", C.handleCompositionStart), U(c, "blur", C.handleBlur), U(c, "keydown", C.handleKeyDown, !0), c.addEventListener("focus", (n) => {
710
+ }, h.$$pointerdown = T, U(l, "compositionend", C.handleCompositionEnd), U(l, "compositionstart", C.handleCompositionStart), U(l, "blur", C.handleBlur), U(l, "keydown", C.handleKeyDown, !0), l.addEventListener("focus", (n) => {
711
711
  C.handleFocus(n), o() && p()(r().id);
712
- }), c.$$pointerdown = (n) => {
712
+ }), l.$$pointerdown = (n) => {
713
713
  !o() || n.button !== 0 || p()(r().id);
714
714
  };
715
- var h = C.bind;
716
- return typeof h == "function" ? se(h, c) : C.bind = c, s(c, "spellcheck", !1), P((n) => {
717
- var F = !!u(), X = !!o(), I = o() ? "true" : void 0, S = r().id, te = d(), ne = o() ? "plaintext-only" : !1, ae = o() ? 0 : void 0, _ = o() ? "textbox" : void 0, J = t("textContent"), ce = o() ? "true" : void 0, ve = o() ? void 0 : "true";
718
- return F !== n.e && m.classList.toggle("is-selected", n.e = F), X !== n.t && m.classList.toggle("is-editable", n.t = X), I !== n.a && s(m, "data-floe-canvas-interactive", n.a = I), S !== n.o && s(m, "data-wb-object-id", n.o = S), n.i = he(m, te, n.i), ne !== n.n && s(c, "contenteditable", n.n = ne), ae !== n.s && s(c, "tabindex", n.s = ae), _ !== n.h && s(c, "role", n.h = _), J !== n.r && s(c, "aria-label", n.r = J), ce !== n.d && s(c, "aria-multiline", n.d = ce), ve !== n.l && s(c, "aria-disabled", n.l = ve), n;
715
+ var u = C.bind;
716
+ return typeof u == "function" ? se(u, l) : C.bind = l, s(l, "spellcheck", !1), P((n) => {
717
+ var L = !!v(), X = !!o(), j = o() ? "true" : void 0, S = r().id, te = d(), ne = o() ? "plaintext-only" : !1, ae = o() ? 0 : void 0, _ = o() ? "textbox" : void 0, J = t("textContent"), ce = o() ? "true" : void 0, ve = o() ? void 0 : "true";
718
+ return L !== n.e && h.classList.toggle("is-selected", n.e = L), X !== n.t && h.classList.toggle("is-editable", n.t = X), j !== n.a && s(h, "data-floe-canvas-interactive", n.a = j), S !== n.o && s(h, "data-wb-object-id", n.o = S), n.i = he(h, te, n.i), ne !== n.n && s(l, "contenteditable", n.n = ne), ae !== n.s && s(l, "tabindex", n.s = ae), _ !== n.h && s(l, "role", n.h = _), J !== n.r && s(l, "aria-label", n.r = J), ce !== n.d && s(l, "aria-multiline", n.d = ce), ve !== n.l && s(l, "aria-disabled", n.l = ve), n;
719
719
  }, {
720
720
  e: void 0,
721
721
  t: void 0,
@@ -728,15 +728,15 @@ function cn(e) {
728
728
  r: void 0,
729
729
  d: void 0,
730
730
  l: void 0
731
- }), m;
731
+ }), h;
732
732
  })();
733
733
  }
734
734
  function ln(e) {
735
- const t = _e(), r = l(() => e.item), u = l(() => e.selected), o = l(() => e.editable), i = l(() => e.viewportScale), x = l(() => e.viewport ?? {
735
+ const t = _e(), r = c(() => e.item), v = c(() => e.selected), o = c(() => e.editable), i = c(() => e.viewportScale), x = c(() => e.viewport ?? {
736
736
  x: 0,
737
737
  y: 0,
738
738
  scale: 1
739
- }), z = l(() => e.projection), O = l(() => e.preview), B = l(() => e.onPreviewGeometry), D = l(() => e.onSelect), p = l(() => e.onContextMenu), Y = l(() => e.onCommitMove), E = Me({
739
+ }), z = c(() => e.projection), D = c(() => e.preview), B = c(() => e.onPreviewGeometry), F = c(() => e.onSelect), p = c(() => e.onContextMenu), Y = c(() => e.onCommitMove), E = Me({
740
740
  value: () => r().name,
741
741
  singleLine: !0,
742
742
  onCommit: (d) => e.onUpdate?.(r().id, {
@@ -747,7 +747,7 @@ function ln(e) {
747
747
  const d = e.textEditorRegistry?.register(r().id, E);
748
748
  ye(() => d?.());
749
749
  });
750
- const L = Le({
750
+ const I = Le({
751
751
  viewportScale: i,
752
752
  readPosition: () => ({
753
753
  x: r().x,
@@ -764,45 +764,45 @@ function ln(e) {
764
764
  ...d
765
765
  }),
766
766
  onPreviewEnd: () => B()?.(null)
767
- }), C = j(() => {
768
- const d = r(), T = Se(O(), "background_layer", d.id);
767
+ }), C = O(() => {
768
+ const d = r(), T = Se(D(), "background_layer", d.id);
769
769
  return ze({
770
770
  geometry: Ee({
771
771
  preview: T,
772
- position: L.position(),
772
+ position: I.position(),
773
773
  width: d.width,
774
774
  height: d.height
775
775
  }),
776
776
  viewport: x(),
777
777
  projection: z()
778
778
  });
779
- }), G = j(() => z() === "screen" ? Math.max(x().scale, 1e-3) : 1), q = j(() => ({
779
+ }), G = O(() => z() === "screen" ? Math.max(x().scale, 1e-3) : 1), q = O(() => ({
780
780
  ...pe(C()),
781
781
  "z-index": `${r().z_index}`,
782
782
  "--workbench-layer-control-inverse-scale": `${1 / C().scale}`,
783
783
  "--workbench-region-content-scale": `${G()}`,
784
784
  "--workbench-region-content-inverse-scale": `${1 / G()}`,
785
785
  ...Ce(r())
786
- })), g = (d) => {
787
- !o() || d.button !== 0 || d.target instanceof Element && d.target.closest(".workbench-background-region__label, .workbench-background-region__toolbar, .workbench-layer-resize") || (D()(r().id), L.beginDrag(d));
786
+ })), w = (d) => {
787
+ !o() || d.button !== 0 || d.target instanceof Element && d.target.closest(".workbench-background-region__label, .workbench-background-region__toolbar, .workbench-layer-resize") || (F()(r().id), I.beginDrag(d));
788
788
  };
789
789
  return (() => {
790
- var d = Pt(), T = d.firstChild, m = T.firstChild, c = T.nextSibling;
790
+ var d = Pt(), T = d.firstChild, h = T.firstChild, l = T.nextSibling;
791
791
  d.$$contextmenu = (n) => {
792
- o() && (n.preventDefault(), n.stopPropagation(), D()(r().id), p()?.(n, r()));
793
- }, d.addEventListener("focus", () => o() && D()(r().id)), d.$$pointerdown = g, U(m, "compositionend", E.handleCompositionEnd), U(m, "compositionstart", E.handleCompositionStart), U(m, "keydown", E.handleKeyDown, !0), U(m, "blur", E.handleBlur), U(m, "focus", E.handleFocus), m.$$pointerdown = (n) => {
794
- n.stopPropagation(), D()(r().id);
792
+ o() && (n.preventDefault(), n.stopPropagation(), F()(r().id), p()?.(n, r()));
793
+ }, d.addEventListener("focus", () => o() && F()(r().id)), d.$$pointerdown = w, U(h, "compositionend", E.handleCompositionEnd), U(h, "compositionstart", E.handleCompositionStart), U(h, "keydown", E.handleKeyDown, !0), U(h, "blur", E.handleBlur), U(h, "focus", E.handleFocus), h.$$pointerdown = (n) => {
794
+ n.stopPropagation(), F()(r().id);
795
795
  };
796
- var h = E.bind;
797
- return typeof h == "function" ? se(h, m) : E.bind = m, c.$$pointerdown = g, k(c, w(Ge, {})), P((n) => {
798
- var F = {
799
- "is-selected": u(),
796
+ var u = E.bind;
797
+ return typeof u == "function" ? se(u, h) : E.bind = h, l.$$pointerdown = w, k(l, g(Ge, {})), P((n) => {
798
+ var L = {
799
+ "is-selected": v(),
800
800
  "is-editing": E.isFocused(),
801
801
  "is-editable": o(),
802
- "is-transforming": L.isDragging(),
802
+ "is-transforming": I.isDragging(),
803
803
  [`is-material-${r().material}`]: !0
804
- }, X = o() ? "true" : void 0, I = r().id, S = q(), te = o() ? 0 : void 0, ne = !r().name.trim() && !E.isFocused(), ae = o() ? "plaintext-only" : !1, _ = t("regionName"), J = t("regionPlaceholder"), ce = t("moveRegion");
805
- return n.e = it(d, F, n.e), X !== n.t && s(d, "data-floe-canvas-interactive", n.t = X), I !== n.a && s(d, "data-wb-object-id", n.a = I), n.o = he(d, S, n.o), te !== n.i && s(d, "tabindex", n.i = te), ne !== n.n && T.classList.toggle("is-empty", n.n = ne), ae !== n.s && s(m, "contenteditable", n.s = ae), _ !== n.h && s(m, "aria-label", n.h = _), J !== n.r && s(m, "data-placeholder", n.r = J), ce !== n.d && s(c, "aria-label", n.d = ce), n;
804
+ }, X = o() ? "true" : void 0, j = r().id, S = q(), te = o() ? 0 : void 0, ne = !r().name.trim() && !E.isFocused(), ae = o() ? "plaintext-only" : !1, _ = t("regionName"), J = t("regionPlaceholder"), ce = t("moveRegion");
805
+ return n.e = it(d, L, n.e), X !== n.t && s(d, "data-floe-canvas-interactive", n.t = X), j !== n.a && s(d, "data-wb-object-id", n.a = j), n.o = he(d, S, n.o), te !== n.i && s(d, "tabindex", n.i = te), ne !== n.n && T.classList.toggle("is-empty", n.n = ne), ae !== n.s && s(h, "contenteditable", n.s = ae), _ !== n.h && s(h, "aria-label", n.h = _), J !== n.r && s(h, "data-placeholder", n.r = J), ce !== n.d && s(l, "aria-label", n.d = ce), n;
806
806
  }, {
807
807
  e: void 0,
808
808
  t: void 0,
@@ -818,13 +818,13 @@ function ln(e) {
818
818
  })();
819
819
  }
820
820
  function dn(e) {
821
- const t = _e(), r = Ne(We), [u, o] = re(), i = l(() => e.item), x = () => e.textEditorRegistry?.get(i().id), z = l(() => e.viewportScale), O = l(() => e.viewport ?? {
821
+ const t = _e(), r = Ne(We), [v, o] = re(), i = c(() => e.item), x = () => e.textEditorRegistry?.get(i().id), z = c(() => e.viewportScale), D = c(() => e.viewport ?? {
822
822
  x: 0,
823
823
  y: 0,
824
824
  scale: 1
825
- }), B = l(() => e.projection), D = l(() => e.preview), p = l(() => e.onPreviewGeometry), Y = l(() => e.onCommitMove), E = l(() => e.onCommitResize), L = l(() => e.onUpdate), C = l(() => e.onDelete);
825
+ }), B = c(() => e.projection), F = c(() => e.preview), p = c(() => e.onPreviewGeometry), Y = c(() => e.onCommitMove), E = c(() => e.onCommitResize), I = c(() => e.onUpdate), C = c(() => e.onDelete);
826
826
  let G, q;
827
- const [g, d] = re(!1), [T, m] = re(""), [c, h] = re(!1), n = j(() => Ie.find((_) => _.fontFamily === i().font_family) ?? Ie[0]), F = Le({
827
+ const [w, d] = re(!1), [T, h] = re(""), [l, u] = re(!1), n = O(() => Ie.find((_) => _.fontFamily === i().font_family) ?? Ie[0]), L = Le({
828
828
  viewportScale: z,
829
829
  readPosition: () => ({
830
830
  x: i().x,
@@ -859,26 +859,26 @@ function dn(e) {
859
859
  height: _.height
860
860
  }),
861
861
  onPreviewEnd: () => p()?.(null)
862
- }), I = j(() => {
863
- const _ = i(), J = Se(D(), "annotation", _.id);
862
+ }), j = O(() => {
863
+ const _ = i(), J = Se(F(), "annotation", _.id);
864
864
  return ze({
865
865
  geometry: Ee({
866
866
  preview: J,
867
- position: F.position(),
867
+ position: L.position(),
868
868
  width: X.size().width,
869
869
  height: X.size().height
870
870
  }),
871
- viewport: O(),
871
+ viewport: D(),
872
872
  projection: B()
873
873
  });
874
- }), S = j(() => ({
875
- ...pe(I()),
874
+ }), S = O(() => ({
875
+ ...pe(j()),
876
876
  "z-index": `${i().z_index}`,
877
- "--workbench-layer-control-inverse-scale": `${1 / Math.max(I().scale, 1e-3)}`
877
+ "--workbench-layer-control-inverse-scale": `${1 / Math.max(j().scale, 1e-3)}`
878
878
  })), te = () => nn(["left", "center", "right"], i().align), ne = (_) => {
879
879
  if (!Number.isFinite(_)) return;
880
880
  const J = rn(_);
881
- m(String(J)), L()(i().id, {
881
+ h(String(J)), I()(i().id, {
882
882
  font_size: J
883
883
  });
884
884
  }, ae = () => {
@@ -887,160 +887,158 @@ function dn(e) {
887
887
  ne(J);
888
888
  return;
889
889
  }
890
- m(String(i().font_size));
890
+ h(String(i().font_size));
891
891
  };
892
892
  return fe(() => {
893
- typeof document < "u" && document.activeElement === G || m(String(i().font_size));
894
- }), on(c, () => q, () => h(!1)), (() => {
893
+ typeof document < "u" && document.activeElement === G || h(String(i().font_size));
894
+ }), on(l, () => q, () => u(!1)), (() => {
895
895
  var _ = Mt(), J = _.firstChild, ce = J.nextSibling, ve = ce.nextSibling;
896
- return se(o, _), U(ce, "pointerdown", F.beginDrag, !0), k(ce, w(Ge, {})), k(_, w(Ae, {
896
+ return se(o, _), U(ce, "pointerdown", L.beginDrag, !0), k(ce, g(Ge, {})), k(_, g(Ae, {
897
897
  reservedSpace: {
898
898
  top: 64,
899
899
  narrowTop: 106,
900
900
  bottom: 86
901
901
  },
902
902
  get anchor() {
903
- return u();
903
+ return v();
904
904
  },
905
905
  get revision() {
906
906
  return S();
907
907
  },
908
908
  class: "workbench-object-tools",
909
909
  get children() {
910
- return w(Fe, {
910
+ return g(Fe, {
911
911
  kind: "text",
912
- onInsertEmoji: (v) => x()?.insertTextAtSelection(v),
912
+ onInsertEmoji: (m) => x()?.insertTextAtSelection(m),
913
913
  get moreOpen() {
914
- return g();
914
+ return w();
915
915
  },
916
916
  onMoreClose: () => d(!1),
917
- get more() {
918
- return [(() => {
919
- var v = It(), b = v.firstChild, y = b.firstChild, W = y.nextSibling;
920
- v.$$click = Oe, v.$$pointerdown = je;
921
- var H = q;
922
- return typeof H == "function" ? se(H, v) : q = v, b.$$click = (f) => {
923
- $e(f), h((K) => !K);
924
- }, b.$$pointerdown = Q, k(W, () => t(n().id)), k(b, w(ht, {
925
- class: "workbench-text-font-trigger__icon"
926
- }), null), k(v, w(oe, {
927
- get when() {
928
- return c();
929
- },
930
- get children() {
931
- var f = Lt();
932
- return k(f, w(de, {
933
- each: Ie,
934
- children: (K) => (() => {
935
- var Z = Ot(), $ = Z.firstChild, ie = $.nextSibling;
936
- return Z.$$click = (N) => {
937
- $e(N), L()(i().id, {
938
- font_family: K.fontFamily,
939
- font_weight: K.fontWeight
940
- }), h(!1);
941
- }, Z.$$pointerdown = Q, k(ie, () => t(K.id)), P((N) => {
942
- var le = i().font_family === K.fontFamily, ee = t("useFont", t(K.id)), ke = t("fontPreview", t(K.id)), a = i().font_family === K.fontFamily, M = K.fontFamily, R = `${K.fontWeight}`;
943
- return le !== N.e && s(Z, "aria-checked", N.e = le), ee !== N.t && s(Z, "aria-label", N.t = ee), ke !== N.a && s(Z, "title", N.a = ke), a !== N.o && Z.classList.toggle("is-active", N.o = a), M !== N.i && xe($, "font-family", N.i = M), R !== N.n && xe($, "font-weight", N.n = R), N;
944
- }, {
945
- e: void 0,
946
- t: void 0,
947
- a: void 0,
948
- o: void 0,
949
- i: void 0,
950
- n: void 0
951
- }), Z;
952
- })()
953
- })), P(() => s(f, "aria-label", t("boldFont"))), f;
954
- }
955
- }), null), P((f) => {
956
- var K = t("chooseFont"), Z = c(), $ = t("chooseFont"), ie = n().fontFamily, N = `${n().fontWeight}`;
957
- return K !== f.e && s(b, "aria-label", f.e = K), Z !== f.t && s(b, "aria-expanded", f.t = Z), $ !== f.a && s(b, "title", f.a = $), ie !== f.o && xe(y, "font-family", f.o = ie), N !== f.i && xe(y, "font-weight", f.i = N), f;
958
- }, {
959
- e: void 0,
960
- t: void 0,
961
- a: void 0,
962
- o: void 0,
963
- i: void 0
964
- }), v;
965
- })(), (() => {
966
- var v = jt(), b = v.firstChild, y = b.nextSibling, W = y.nextSibling;
967
- v.$$click = Oe, v.$$pointerdown = je, b.$$click = (f) => {
968
- $e(f), ne(i().font_size - 1);
969
- }, b.$$pointerdown = Q, k(b, w(gt, {
970
- class: "w-3 h-3"
971
- })), y.$$keydown = (f) => {
972
- f.key === "Enter" && (f.preventDefault(), ae(), f.currentTarget.blur());
973
- }, y.addEventListener("blur", ae), y.$$input = (f) => m(f.currentTarget.value), y.$$click = Oe, y.$$pointerdown = je;
974
- var H = G;
975
- return typeof H == "function" ? se(H, y) : G = y, W.$$click = (f) => {
976
- $e(f), ne(i().font_size + 1);
977
- }, W.$$pointerdown = Q, k(W, w(wt, {
978
- class: "w-3 h-3"
979
- })), P((f) => {
980
- var K = t("textSize"), Z = t("decreaseSize"), $ = t("decreaseSize"), ie = t("sizeValue"), N = t("increaseSize"), le = t("increaseSize");
981
- return K !== f.e && s(v, "aria-label", f.e = K), Z !== f.t && s(b, "aria-label", f.t = Z), $ !== f.a && s(b, "title", f.a = $), ie !== f.o && s(y, "aria-label", f.o = ie), N !== f.i && s(W, "aria-label", f.i = N), le !== f.n && s(W, "title", f.n = le), f;
917
+ more: () => [(() => {
918
+ var m = It(), b = m.firstChild, y = b.firstChild, W = y.nextSibling;
919
+ m.$$click = Oe, m.$$pointerdown = je;
920
+ var H = q;
921
+ return typeof H == "function" ? se(H, m) : q = m, b.$$click = (f) => {
922
+ $e(f), u((K) => !K);
923
+ }, b.$$pointerdown = Q, k(W, () => t(n().id)), k(b, g(ht, {
924
+ class: "workbench-text-font-trigger__icon"
925
+ }), null), k(m, g(oe, {
926
+ get when() {
927
+ return l();
928
+ },
929
+ get children() {
930
+ var f = Lt();
931
+ return k(f, g(de, {
932
+ each: Ie,
933
+ children: (K) => (() => {
934
+ var Z = Ot(), $ = Z.firstChild, ie = $.nextSibling;
935
+ return Z.$$click = (N) => {
936
+ $e(N), I()(i().id, {
937
+ font_family: K.fontFamily,
938
+ font_weight: K.fontWeight
939
+ }), u(!1);
940
+ }, Z.$$pointerdown = Q, k(ie, () => t(K.id)), P((N) => {
941
+ var le = i().font_family === K.fontFamily, ee = t("useFont", t(K.id)), ke = t("fontPreview", t(K.id)), a = i().font_family === K.fontFamily, M = K.fontFamily, R = `${K.fontWeight}`;
942
+ return le !== N.e && s(Z, "aria-checked", N.e = le), ee !== N.t && s(Z, "aria-label", N.t = ee), ke !== N.a && s(Z, "title", N.a = ke), a !== N.o && Z.classList.toggle("is-active", N.o = a), M !== N.i && xe($, "font-family", N.i = M), R !== N.n && xe($, "font-weight", N.n = R), N;
943
+ }, {
944
+ e: void 0,
945
+ t: void 0,
946
+ a: void 0,
947
+ o: void 0,
948
+ i: void 0,
949
+ n: void 0
950
+ }), Z;
951
+ })()
952
+ })), P(() => s(f, "aria-label", t("boldFont"))), f;
953
+ }
954
+ }), null), P((f) => {
955
+ var K = t("chooseFont"), Z = l(), $ = t("chooseFont"), ie = n().fontFamily, N = `${n().fontWeight}`;
956
+ return K !== f.e && s(b, "aria-label", f.e = K), Z !== f.t && s(b, "aria-expanded", f.t = Z), $ !== f.a && s(b, "title", f.a = $), ie !== f.o && xe(y, "font-family", f.o = ie), N !== f.i && xe(y, "font-weight", f.i = N), f;
957
+ }, {
958
+ e: void 0,
959
+ t: void 0,
960
+ a: void 0,
961
+ o: void 0,
962
+ i: void 0
963
+ }), m;
964
+ })(), (() => {
965
+ var m = jt(), b = m.firstChild, y = b.nextSibling, W = y.nextSibling;
966
+ m.$$click = Oe, m.$$pointerdown = je, b.$$click = (f) => {
967
+ $e(f), ne(i().font_size - 1);
968
+ }, b.$$pointerdown = Q, k(b, g(wt, {
969
+ class: "w-3 h-3"
970
+ })), y.$$keydown = (f) => {
971
+ f.key === "Enter" && (f.preventDefault(), ae(), f.currentTarget.blur());
972
+ }, y.addEventListener("blur", ae), y.$$input = (f) => h(f.currentTarget.value), y.$$click = Oe, y.$$pointerdown = je;
973
+ var H = G;
974
+ return typeof H == "function" ? se(H, y) : G = y, W.$$click = (f) => {
975
+ $e(f), ne(i().font_size + 1);
976
+ }, W.$$pointerdown = Q, k(W, g(gt, {
977
+ class: "w-3 h-3"
978
+ })), P((f) => {
979
+ var K = t("textSize"), Z = t("decreaseSize"), $ = t("decreaseSize"), ie = t("sizeValue"), N = t("increaseSize"), le = t("increaseSize");
980
+ return K !== f.e && s(m, "aria-label", f.e = K), Z !== f.t && s(b, "aria-label", f.t = Z), $ !== f.a && s(b, "title", f.a = $), ie !== f.o && s(y, "aria-label", f.o = ie), N !== f.i && s(W, "aria-label", f.i = N), le !== f.n && s(W, "title", f.n = le), f;
981
+ }, {
982
+ e: void 0,
983
+ t: void 0,
984
+ a: void 0,
985
+ o: void 0,
986
+ i: void 0,
987
+ n: void 0
988
+ }), P(() => y.value = T()), m;
989
+ })(), g(de, {
990
+ each: kt,
991
+ children: (m) => (() => {
992
+ var b = Dt();
993
+ return b.$$click = (y) => {
994
+ $e(y), I()(i().id, {
995
+ color: m
996
+ });
997
+ }, b.$$pointerdown = Q, xe(b, "background", m), P((y) => {
998
+ var W = t("textColor", m), H = i().color === m;
999
+ return W !== y.e && s(b, "aria-label", y.e = W), H !== y.t && b.classList.toggle("is-active", y.t = H), y;
982
1000
  }, {
983
1001
  e: void 0,
984
- t: void 0,
985
- a: void 0,
986
- o: void 0,
987
- i: void 0,
988
- n: void 0
989
- }), P(() => y.value = T()), v;
990
- })(), w(de, {
991
- each: kt,
992
- children: (v) => (() => {
993
- var b = Dt();
994
- return b.$$click = (y) => {
995
- $e(y), L()(i().id, {
996
- color: v
997
- });
998
- }, b.$$pointerdown = Q, xe(b, "background", v), P((y) => {
999
- var W = t("textColor", v), H = i().color === v;
1000
- return W !== y.e && s(b, "aria-label", y.e = W), H !== y.t && b.classList.toggle("is-active", y.t = H), y;
1001
- }, {
1002
- e: void 0,
1003
- t: void 0
1004
- }), b;
1005
- })()
1006
- }), (() => {
1007
- var v = we();
1008
- return v.$$click = () => L()(i().id, {
1009
- align: te()
1010
- }), v.$$pointerdown = Q, k(v, () => t(i().align)), v;
1011
- })()];
1012
- },
1002
+ t: void 0
1003
+ }), b;
1004
+ })()
1005
+ }), (() => {
1006
+ var m = ge();
1007
+ return m.$$click = () => I()(i().id, {
1008
+ align: te()
1009
+ }), m.$$pointerdown = Q, k(m, () => t(i().align)), m;
1010
+ })()],
1013
1011
  get actions() {
1014
- return [w(oe, {
1012
+ return [g(oe, {
1015
1013
  when: r,
1016
1014
  get children() {
1017
- var v = we();
1018
- return v.$$click = () => r?.duplicate({
1015
+ var m = ge();
1016
+ return m.$$click = () => r?.duplicate({
1019
1017
  kind: "annotation",
1020
1018
  id: i().id
1021
- }), v.$$pointerdown = Q, k(v, w(ue, {
1019
+ }), m.$$pointerdown = Q, k(m, g(ue, {
1022
1020
  name: "copy"
1023
1021
  })), P((b) => {
1024
1022
  var y = t("duplicate"), W = t("duplicate");
1025
- return y !== b.e && s(v, "aria-label", b.e = y), W !== b.t && s(v, "title", b.t = W), b;
1023
+ return y !== b.e && s(m, "aria-label", b.e = y), W !== b.t && s(m, "title", b.t = W), b;
1026
1024
  }, {
1027
1025
  e: void 0,
1028
1026
  t: void 0
1029
- }), v;
1027
+ }), m;
1030
1028
  }
1031
1029
  }), (() => {
1032
- var v = He();
1033
- return v.$$click = () => C()(i().id), v.$$pointerdown = Q, k(v, w(ue, {
1030
+ var m = He();
1031
+ return m.$$click = () => C()(i().id), m.$$pointerdown = Q, k(m, g(ue, {
1034
1032
  name: "trash"
1035
- })), P(() => s(v, "aria-label", t("deleteText"))), v;
1033
+ })), P(() => s(m, "aria-label", t("deleteText"))), m;
1036
1034
  })()];
1037
1035
  },
1038
1036
  get children() {
1039
1037
  return [(() => {
1040
- var v = Tt(), b = v.firstChild;
1041
- return v.addEventListener("change", (y) => {
1038
+ var m = Tt(), b = m.firstChild;
1039
+ return m.addEventListener("change", (y) => {
1042
1040
  if (y.currentTarget.value === "more") {
1043
- d(!g());
1041
+ d(!w());
1044
1042
  return;
1045
1043
  }
1046
1044
  const W = {
@@ -1049,40 +1047,40 @@ function dn(e) {
1049
1047
  body: 18,
1050
1048
  caption: 14
1051
1049
  }, H = y.currentTarget.value;
1052
- L()(i().id, {
1050
+ I()(i().id, {
1053
1051
  font_size: W[H],
1054
1052
  font_weight: H === "title" || H === "heading" ? 560 : 400
1055
1053
  });
1056
- }), k(v, w(de, {
1054
+ }), k(m, g(de, {
1057
1055
  each: ["title", "heading", "body", "caption"],
1058
1056
  children: (y) => (() => {
1059
1057
  var W = Ft();
1060
1058
  return W.value = y, k(W, () => t(y)), W;
1061
1059
  })()
1062
- }), b), k(b, () => t("more")), P(() => s(v, "aria-label", t("typography"))), P(() => v.value = i().font_size >= 40 ? "title" : i().font_size >= 24 ? "heading" : i().font_size >= 16 ? "body" : "caption"), v;
1063
- })(), w(de, {
1060
+ }), b), k(b, () => t("more")), P(() => s(m, "aria-label", t("typography"))), P(() => m.value = i().font_size >= 40 ? "title" : i().font_size >= 24 ? "heading" : i().font_size >= 16 ? "body" : "caption"), m;
1061
+ })(), g(de, {
1064
1062
  each: ["left", "center"],
1065
- children: (v) => (() => {
1066
- var b = we();
1067
- return b.$$click = () => L()(i().id, {
1068
- align: v
1069
- }), b.$$pointerdown = Q, k(b, w(ue, {
1070
- name: v
1063
+ children: (m) => (() => {
1064
+ var b = ge();
1065
+ return b.$$click = () => I()(i().id, {
1066
+ align: m
1067
+ }), b.$$pointerdown = Q, k(b, g(ue, {
1068
+ name: m
1071
1069
  })), P((y) => {
1072
- var W = t(v), H = i().align === v;
1070
+ var W = t(m), H = i().align === m;
1073
1071
  return W !== y.e && s(b, "aria-label", y.e = W), H !== y.t && s(b, "aria-pressed", y.t = H), y;
1074
1072
  }, {
1075
1073
  e: void 0,
1076
1074
  t: void 0
1077
1075
  }), b;
1078
1076
  })()
1079
- }), w(mt, {})];
1077
+ }), g(mt, {})];
1080
1078
  }
1081
1079
  });
1082
1080
  }
1083
- }), ve), U(ve, "pointerdown", X.beginResize, !0), P((v) => {
1081
+ }), ve), U(ve, "pointerdown", X.beginResize, !0), P((m) => {
1084
1082
  var b = i().id, y = S(), W = t("moveText"), H = t("resizeText");
1085
- return b !== v.e && s(_, "data-wb-object-id", v.e = b), v.t = he(_, y, v.t), W !== v.a && s(ce, "aria-label", v.a = W), H !== v.o && s(ve, "aria-label", v.o = H), v;
1083
+ return b !== m.e && s(_, "data-wb-object-id", m.e = b), m.t = he(_, y, m.t), W !== m.a && s(ce, "aria-label", m.a = W), H !== m.o && s(ve, "aria-label", m.o = H), m;
1086
1084
  }, {
1087
1085
  e: void 0,
1088
1086
  t: void 0,
@@ -1092,12 +1090,12 @@ function dn(e) {
1092
1090
  })();
1093
1091
  }
1094
1092
  function sn(e) {
1095
- const t = _e(), r = Ne(We), [u, o] = re(), i = l(() => e.item), x = () => e.textEditorRegistry?.get(i().id), z = () => x()?.isFocused() ?? !1, O = l(() => e.viewportScale), B = l(() => e.viewport ?? {
1093
+ const t = _e(), r = Ne(We), [v, o] = re(), i = c(() => e.item), x = () => e.textEditorRegistry?.get(i().id), z = () => x()?.isFocused() ?? !1, D = c(() => e.viewportScale), B = c(() => e.viewport ?? {
1096
1094
  x: 0,
1097
1095
  y: 0,
1098
1096
  scale: 1
1099
- }), D = l(() => e.projection), p = l(() => e.preview), Y = l(() => e.onPreviewGeometry), E = l(() => e.onCommitResize), L = l(() => e.onUpdate), C = l(() => e.onDelete), G = Ye({
1100
- viewportScale: O,
1097
+ }), F = c(() => e.projection), p = c(() => e.preview), Y = c(() => e.onPreviewGeometry), E = c(() => e.onCommitResize), I = c(() => e.onUpdate), C = c(() => e.onDelete), G = Ye({
1098
+ viewportScale: D,
1101
1099
  readSize: () => ({
1102
1100
  width: i().width,
1103
1101
  height: i().height
@@ -1114,7 +1112,7 @@ function sn(e) {
1114
1112
  height: d.height
1115
1113
  }),
1116
1114
  onPreviewEnd: () => Y()?.(null)
1117
- }), q = j(() => {
1115
+ }), q = O(() => {
1118
1116
  const d = i(), T = Se(p(), "background_layer", d.id);
1119
1117
  return ze({
1120
1118
  geometry: Ee({
@@ -1127,63 +1125,63 @@ function sn(e) {
1127
1125
  height: G.size().height
1128
1126
  }),
1129
1127
  viewport: B(),
1130
- projection: D()
1128
+ projection: F()
1131
1129
  });
1132
- }), g = j(() => ({
1130
+ }), w = O(() => ({
1133
1131
  ...pe(q()),
1134
1132
  "z-index": `${i().z_index}`,
1135
1133
  "--workbench-layer-control-inverse-scale": `${1 / Math.max(q().scale, 1e-3)}`,
1136
1134
  ...Ce(i())
1137
1135
  }));
1138
1136
  return (() => {
1139
- var d = At(), T = d.firstChild, m = T.nextSibling;
1140
- return se(o, d), k(d, w(Ae, {
1137
+ var d = At(), T = d.firstChild, h = T.nextSibling;
1138
+ return se(o, d), k(d, g(Ae, {
1141
1139
  reservedSpace: {
1142
1140
  top: 64,
1143
1141
  narrowTop: 106,
1144
1142
  bottom: 86
1145
1143
  },
1146
1144
  get anchor() {
1147
- return u();
1145
+ return v();
1148
1146
  },
1149
1147
  get revision() {
1150
- return g();
1148
+ return w();
1151
1149
  },
1152
1150
  get topOffset() {
1153
1151
  return be(() => !!(i().name.trim() || z()))() ? 34 * B().scale : 0;
1154
1152
  },
1155
1153
  class: "workbench-object-tools",
1156
1154
  get children() {
1157
- return w(Fe, {
1155
+ return g(Fe, {
1158
1156
  kind: "region",
1159
- onInsertEmoji: (c) => x()?.insertTextAtSelection(c),
1157
+ onInsertEmoji: (l) => x()?.insertTextAtSelection(l),
1160
1158
  materials: yt,
1161
1159
  get material() {
1162
1160
  return i().material;
1163
1161
  },
1164
- materialLabel: (c) => t("useRegionMaterial", t(c)),
1165
- preview: (c) => (() => {
1166
- var h = Nt(), n = h.firstChild;
1167
- return De(n, `workbench-region-material__sample is-material-${c}`), P((F) => he(n, Ce(i()), F)), h;
1162
+ materialLabel: (l) => t("useRegionMaterial", t(l)),
1163
+ preview: (l) => (() => {
1164
+ var u = Nt(), n = u.firstChild;
1165
+ return De(n, `workbench-region-material__sample is-material-${l}`), P((L) => he(n, Ce(i()), L)), u;
1168
1166
  })(),
1169
- onMaterial: (c) => L()(i().id, {
1170
- material: c
1167
+ onMaterial: (l) => I()(i().id, {
1168
+ material: l
1171
1169
  }),
1172
1170
  get palette() {
1173
1171
  return (() => {
1174
- var c = lt();
1175
- return k(c, w(de, {
1172
+ var l = lt();
1173
+ return k(l, g(de, {
1176
1174
  each: ct,
1177
- children: (h) => (() => {
1178
- var n = Gt(), F = n.firstChild, X = F.firstChild;
1179
- return n.$$click = () => L()(i().id, {
1180
- fill: h.fill
1181
- }), n.$$pointerdown = Q, k(n, w(ot, {}), null), P((I) => {
1182
- var S = t("regionColor", t(h.color)), te = i().fill === h.fill, ne = `workbench-region-material__sample is-material-${i().material}`, ae = Ce({
1175
+ children: (u) => (() => {
1176
+ var n = Gt(), L = n.firstChild, X = L.firstChild;
1177
+ return n.$$click = () => I()(i().id, {
1178
+ fill: u.fill
1179
+ }), n.$$pointerdown = Q, k(n, g(ot, {}), null), P((j) => {
1180
+ var S = t("regionColor", t(u.color)), te = i().fill === u.fill, ne = `workbench-region-material__sample is-material-${i().material}`, ae = Ce({
1183
1181
  ...i(),
1184
- fill: h.fill
1182
+ fill: u.fill
1185
1183
  });
1186
- return S !== I.e && s(n, "aria-label", I.e = S), te !== I.t && s(n, "aria-pressed", I.t = te), ne !== I.a && De(X, I.a = ne), I.o = he(X, ae, I.o), I;
1184
+ return S !== j.e && s(n, "aria-label", j.e = S), te !== j.t && s(n, "aria-pressed", j.t = te), ne !== j.a && De(X, j.a = ne), j.o = he(X, ae, j.o), j;
1187
1185
  }, {
1188
1186
  e: void 0,
1189
1187
  t: void 0,
@@ -1191,58 +1189,58 @@ function sn(e) {
1191
1189
  o: void 0
1192
1190
  }), n;
1193
1191
  })()
1194
- })), c;
1192
+ })), l;
1195
1193
  })();
1196
1194
  },
1197
- get more() {
1198
- return [(() => {
1199
- var c = Ht(), h = c.firstChild;
1200
- return k(c, () => t("opacity"), h), h.$$input = (n) => L()(i().id, {
1201
- opacity: Number(n.currentTarget.value) / 100
1202
- }), P(() => s(h, "aria-label", t("opacity"))), P(() => h.value = Math.round(i().opacity * 100)), c;
1203
- })(), (() => {
1204
- var c = we();
1205
- return c.$$click = () => L()(i().id, {
1195
+ more: (l) => [(() => {
1196
+ var u = Ht(), n = u.firstChild;
1197
+ return k(u, () => t("opacity"), n), n.$$input = (L) => I()(i().id, {
1198
+ opacity: Number(L.currentTarget.value) / 100
1199
+ }), P(() => s(n, "aria-label", t("opacity"))), P(() => n.value = Math.round(i().opacity * 100)), u;
1200
+ })(), (() => {
1201
+ var u = ge();
1202
+ return u.$$click = () => {
1203
+ l(), I()(i().id, {
1206
1204
  name: ""
1207
- }), c.$$pointerdown = Q, k(c, () => t("clearName")), P(() => c.disabled = !i().name.trim()), c;
1208
- })()];
1209
- },
1205
+ });
1206
+ }, u.$$pointerdown = Q, k(u, () => t("clearName")), P(() => u.disabled = !i().name.trim()), u;
1207
+ })()],
1210
1208
  get actions() {
1211
- return [w(oe, {
1209
+ return [g(oe, {
1212
1210
  when: r,
1213
1211
  get children() {
1214
- var c = we();
1215
- return c.$$click = () => r?.duplicate({
1212
+ var l = ge();
1213
+ return l.$$click = () => r?.duplicate({
1216
1214
  kind: "background_layer",
1217
1215
  id: i().id
1218
- }), c.$$pointerdown = Q, k(c, w(ue, {
1216
+ }), l.$$pointerdown = Q, k(l, g(ue, {
1219
1217
  name: "copy"
1220
- })), P((h) => {
1221
- var n = t("duplicate"), F = t("duplicate");
1222
- return n !== h.e && s(c, "aria-label", h.e = n), F !== h.t && s(c, "title", h.t = F), h;
1218
+ })), P((u) => {
1219
+ var n = t("duplicate"), L = t("duplicate");
1220
+ return n !== u.e && s(l, "aria-label", u.e = n), L !== u.t && s(l, "title", u.t = L), u;
1223
1221
  }, {
1224
1222
  e: void 0,
1225
1223
  t: void 0
1226
- }), c;
1224
+ }), l;
1227
1225
  }
1228
1226
  }), (() => {
1229
- var c = He();
1230
- return c.$$click = () => C()(i().id), c.$$pointerdown = Q, k(c, w(ue, {
1227
+ var l = He();
1228
+ return l.$$click = () => C()(i().id), l.$$pointerdown = Q, k(l, g(ue, {
1231
1229
  name: "trash"
1232
- })), P(() => s(c, "aria-label", t("deleteRegion"))), c;
1230
+ })), P(() => s(l, "aria-label", t("deleteRegion"))), l;
1233
1231
  })()];
1234
1232
  },
1235
1233
  get children() {
1236
- var c = Wt(), h = c.firstChild;
1237
- return c.$$click = () => x()?.focus(), c.$$pointerdown = Q, k(c, w(ue, {
1234
+ var l = Wt(), u = l.firstChild;
1235
+ return l.$$click = () => x()?.focus(), l.$$pointerdown = Q, k(l, g(ue, {
1238
1236
  name: "text"
1239
- }), h), k(h, () => t(i().name.trim() ? "regionName" : "addName")), c;
1237
+ }), u), k(u, () => t(i().name.trim() ? "regionName" : "addName")), l;
1240
1238
  }
1241
1239
  });
1242
1240
  }
1243
- }), m), U(m, "pointerdown", G.beginResize, !0), P((c) => {
1244
- var h = i().id, n = g(), F = t("resizeRegion");
1245
- return h !== c.e && s(d, "data-wb-object-id", c.e = h), c.t = he(d, n, c.t), F !== c.a && s(m, "aria-label", c.a = F), c;
1241
+ }), h), U(h, "pointerdown", G.beginResize, !0), P((l) => {
1242
+ var u = i().id, n = w(), L = t("resizeRegion");
1243
+ return u !== l.e && s(d, "data-wb-object-id", l.e = u), l.t = he(d, n, l.t), L !== l.a && s(h, "aria-label", l.a = L), l;
1246
1244
  }, {
1247
1245
  e: void 0,
1248
1246
  t: void 0,
@@ -1251,11 +1249,11 @@ function sn(e) {
1251
1249
  })();
1252
1250
  }
1253
1251
  function un(e) {
1254
- const t = l(() => e.item), r = l(() => e.viewport), u = l(() => e.projection), o = l(() => e.preview), i = j(() => {
1255
- const z = t(), O = Se(o(), "background_layer", z.id);
1252
+ const t = c(() => e.item), r = c(() => e.viewport), v = c(() => e.projection), o = c(() => e.preview), i = O(() => {
1253
+ const z = t(), D = Se(o(), "background_layer", z.id);
1256
1254
  return ze({
1257
1255
  geometry: Ee({
1258
- preview: O,
1256
+ preview: D,
1259
1257
  position: {
1260
1258
  x: z.x,
1261
1259
  y: z.y
@@ -1264,18 +1262,18 @@ function un(e) {
1264
1262
  height: z.height
1265
1263
  }),
1266
1264
  viewport: r(),
1267
- projection: u()
1265
+ projection: v()
1268
1266
  });
1269
- }), x = j(() => ({
1267
+ }), x = O(() => ({
1270
1268
  ...pe(i()),
1271
1269
  "--workbench-layer-control-inverse-scale": `${1 / Math.max(i().scale, 1e-3)}`,
1272
1270
  ...Ce(t())
1273
1271
  }));
1274
1272
  return (() => {
1275
1273
  var z = Bt();
1276
- return P((O) => {
1277
- var B = `workbench-region-visibility-outline is-material-${t().material}`, D = !!e.selected, p = t().id, Y = x();
1278
- return B !== O.e && De(z, O.e = B), D !== O.t && z.classList.toggle("is-selected-region", O.t = D), p !== O.a && s(z, "data-wb-object-id", O.a = p), O.o = he(z, Y, O.o), O;
1274
+ return P((D) => {
1275
+ var B = `workbench-region-visibility-outline is-material-${t().material}`, F = !!e.selected, p = t().id, Y = x();
1276
+ return B !== D.e && De(z, D.e = B), F !== D.t && z.classList.toggle("is-selected-region", D.t = F), p !== D.a && s(z, "data-wb-object-id", D.a = p), D.o = he(z, Y, D.o), D;
1279
1277
  }, {
1280
1278
  e: void 0,
1281
1279
  t: void 0,
@@ -1285,20 +1283,20 @@ function un(e) {
1285
1283
  })();
1286
1284
  }
1287
1285
  function vn(e) {
1288
- const t = j(() => Xe(e.items)), r = j(() => Be(e.items).map((u) => u.id));
1286
+ const t = O(() => Xe(e.items)), r = O(() => Be(e.items).map((v) => v.id));
1289
1287
  return (() => {
1290
- var u = Xt();
1291
- return k(u, w(de, {
1288
+ var v = Xt();
1289
+ return k(v, g(de, {
1292
1290
  get each() {
1293
1291
  return r();
1294
1292
  },
1295
1293
  children: (o) => {
1296
- const i = j(() => t().get(o) ?? null);
1297
- return w(oe, {
1294
+ const i = O(() => t().get(o) ?? null);
1295
+ return g(oe, {
1298
1296
  get when() {
1299
1297
  return i();
1300
1298
  },
1301
- children: (x) => w(un, {
1299
+ children: (x) => g(un, {
1302
1300
  get item() {
1303
1301
  return x();
1304
1302
  },
@@ -1317,24 +1315,24 @@ function vn(e) {
1317
1315
  })
1318
1316
  });
1319
1317
  }
1320
- })), u;
1318
+ })), v;
1321
1319
  })();
1322
1320
  }
1323
1321
  function pn(e) {
1324
- const t = j(() => Xe(e.items)), r = j(() => Be(e.items).map((u) => u.id));
1322
+ const t = O(() => Xe(e.items)), r = O(() => Be(e.items).map((v) => v.id));
1325
1323
  return (() => {
1326
- var u = Yt();
1327
- return k(u, w(de, {
1324
+ var v = Yt();
1325
+ return k(v, g(de, {
1328
1326
  get each() {
1329
1327
  return r();
1330
1328
  },
1331
1329
  children: (o) => {
1332
- const i = j(() => t().get(o) ?? null);
1333
- return w(oe, {
1330
+ const i = O(() => t().get(o) ?? null);
1331
+ return g(oe, {
1334
1332
  get when() {
1335
1333
  return i();
1336
1334
  },
1337
- children: (x) => w(ln, {
1335
+ children: (x) => g(ln, {
1338
1336
  get item() {
1339
1337
  return x();
1340
1338
  },
@@ -1379,28 +1377,28 @@ function pn(e) {
1379
1377
  }
1380
1378
  })), P((o) => {
1381
1379
  var i = !!e.editable, x = !!e.filtered;
1382
- return i !== o.e && u.classList.toggle("is-editable", o.e = i), x !== o.t && u.classList.toggle("is-filtered-out", o.t = x), o;
1380
+ return i !== o.e && v.classList.toggle("is-editable", o.e = i), x !== o.t && v.classList.toggle("is-filtered-out", o.t = x), o;
1383
1381
  }, {
1384
1382
  e: void 0,
1385
1383
  t: void 0
1386
- }), u;
1384
+ }), v;
1387
1385
  })();
1388
1386
  }
1389
1387
  function En(e) {
1390
- const t = j(() => Xe(e.items)), r = j(() => Be(e.items).map((u) => u.id));
1388
+ const t = O(() => Xe(e.items)), r = O(() => Be(e.items).map((v) => v.id));
1391
1389
  return (() => {
1392
- var u = Ut();
1393
- return k(u, w(de, {
1390
+ var v = Ut();
1391
+ return k(v, g(de, {
1394
1392
  get each() {
1395
1393
  return r();
1396
1394
  },
1397
1395
  children: (o) => {
1398
- const i = j(() => t().get(o) ?? null);
1399
- return w(oe, {
1396
+ const i = O(() => t().get(o) ?? null);
1397
+ return g(oe, {
1400
1398
  get when() {
1401
1399
  return i();
1402
1400
  },
1403
- children: (x) => w(cn, {
1401
+ children: (x) => g(cn, {
1404
1402
  get item() {
1405
1403
  return x();
1406
1404
  },
@@ -1445,23 +1443,23 @@ function En(e) {
1445
1443
  }
1446
1444
  })), P((o) => {
1447
1445
  var i = !!e.editable, x = !!e.filtered;
1448
- return i !== o.e && u.classList.toggle("is-editable", o.e = i), x !== o.t && u.classList.toggle("is-filtered-out", o.t = x), o;
1446
+ return i !== o.e && v.classList.toggle("is-editable", o.e = i), x !== o.t && v.classList.toggle("is-filtered-out", o.t = x), o;
1449
1447
  }, {
1450
1448
  e: void 0,
1451
1449
  t: void 0
1452
- }), u;
1450
+ }), v;
1453
1451
  })();
1454
1452
  }
1455
1453
  function Rn(e) {
1456
- const t = j(() => e.selectedObject?.kind === "annotation" ? e.annotations.find((u) => u.id === e.selectedObject?.id && u.kind === "text") ?? null : null), r = j(() => e.selectedObject?.kind === "background_layer" ? e.backgroundLayers.find((u) => u.id === e.selectedObject?.id) ?? null : null);
1454
+ const t = O(() => e.selectedObject?.kind === "annotation" ? e.annotations.find((v) => v.id === e.selectedObject?.id && v.kind === "text") ?? null : null), r = O(() => e.selectedObject?.kind === "background_layer" ? e.backgroundLayers.find((v) => v.id === e.selectedObject?.id) ?? null : null);
1457
1455
  return (() => {
1458
- var u = Kt();
1459
- return k(u, w(oe, {
1456
+ var v = Kt();
1457
+ return k(v, g(oe, {
1460
1458
  get when() {
1461
1459
  return e.showRegionOutlines;
1462
1460
  },
1463
1461
  get children() {
1464
- return w(vn, {
1462
+ return g(vn, {
1465
1463
  get items() {
1466
1464
  return e.backgroundLayers;
1467
1465
  },
@@ -1479,11 +1477,11 @@ function Rn(e) {
1479
1477
  }
1480
1478
  });
1481
1479
  }
1482
- }), null), k(u, w(oe, {
1480
+ }), null), k(v, g(oe, {
1483
1481
  get when() {
1484
1482
  return be(() => !!e.editable)() && r();
1485
1483
  },
1486
- children: (o) => w(sn, {
1484
+ children: (o) => g(sn, {
1487
1485
  get textEditorRegistry() {
1488
1486
  return e.textEditorRegistry;
1489
1487
  },
@@ -1515,11 +1513,11 @@ function Rn(e) {
1515
1513
  return e.onDeleteBackgroundLayer;
1516
1514
  }
1517
1515
  })
1518
- }), null), k(u, w(oe, {
1516
+ }), null), k(v, g(oe, {
1519
1517
  get when() {
1520
1518
  return be(() => !!e.editable)() && t();
1521
1519
  },
1522
- children: (o) => w(dn, {
1520
+ children: (o) => g(dn, {
1523
1521
  get item() {
1524
1522
  return o();
1525
1523
  },
@@ -1554,7 +1552,7 @@ function Rn(e) {
1554
1552
  return e.onDeleteAnnotation;
1555
1553
  }
1556
1554
  })
1557
- }), null), P(() => u.classList.toggle("is-editable", !!e.editable)), u;
1555
+ }), null), P(() => v.classList.toggle("is-editable", !!e.editable)), v;
1558
1556
  })();
1559
1557
  }
1560
1558
  ut(["pointerdown", "contextmenu", "keydown", "click", "input"]);