@sheetxl/utils-react 0.7.17 → 0.7.18

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,12 +1,12 @@
1
1
  /**
2
- * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.17
2
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.18
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { CommonUtils as t, DefaultNotifier as e, Notifier as n, InternalClipboard as o, ClipboardUtils as i, MimeType as r } from "@sheetxl/utils";
7
+ import { CommonUtils as t, DefaultNotifier as e, Notifier as n, InternalClipboard as o, ClipboardUtils as r, MimeType as i } from "@sheetxl/utils";
8
8
  import * as s from "detect-it";
9
- import l, { useRef as a, useReducer as c, useMemo as h, useEffect as u, useState as d, memo as p, forwardRef as f, useCallback as m, createContext as _, useContext as g, useLayoutEffect as y, createElement as v, useImperativeHandle as w, Component as b } from "react";
9
+ import l, { useRef as a, useReducer as c, useMemo as h, useEffect as u, useState as d, memo as p, forwardRef as m, useCallback as f, createContext as _, useContext as g, useLayoutEffect as y, createElement as v, useImperativeHandle as w, Component as b } from "react";
10
10
  import { jsx as x, jsxs as S, Fragment as E } from "react/jsx-runtime";
11
11
  import { mergeRefs as L } from "react-merge-refs";
12
12
  import { useMeasure as M } from "react-use";
@@ -121,37 +121,37 @@ class $ {
121
121
  _applyProps(t2) {
122
122
  let e2 = {}, n2 = this;
123
123
  return Object.keys(t2).forEach((o2) => {
124
- let i2 = t2[o2];
125
- n2["_" + o2] !== i2 && (n2["_" + o2] = e2[o2] = i2);
124
+ let r2 = t2[o2];
125
+ n2["_" + o2] !== r2 && (n2["_" + o2] = e2[o2] = r2);
126
126
  }), e2;
127
127
  }
128
128
  }
129
- class I extends $ {
129
+ class K extends $ {
130
130
  }
131
- const K = /* @__PURE__ */ new Set(["INPUT", "TEXTAREA", "SELECT"]), O = {};
131
+ const O = /* @__PURE__ */ new Set(["INPUT", "TEXTAREA", "SELECT"]), I = {};
132
132
  function N() {
133
133
  return s;
134
134
  }
135
135
  const H = (e2) => "BracketLeft" === e2 ? "[" : "BracketRight" === e2 ? "]" : t.camelToPrettyCase(e2), R = (t2, e2) => {
136
136
  let n2 = false, o2 = false;
137
- const i2 = { nativeEvent: t2, currentTarget: e2 || t2.currentTarget, target: t2.target, bubbles: t2.bubbles, cancelable: t2.cancelable, defaultPrevented: t2.defaultPrevented, eventPhase: t2.eventPhase, isTrusted: t2.isTrusted, preventDefault: () => {
137
+ const r2 = { nativeEvent: t2, currentTarget: e2 || t2.currentTarget, target: t2.target, bubbles: t2.bubbles, cancelable: t2.cancelable, defaultPrevented: t2.defaultPrevented, eventPhase: t2.eventPhase, isTrusted: t2.isTrusted, preventDefault: () => {
138
138
  n2 = true, t2.preventDefault();
139
139
  }, isDefaultPrevented: () => n2, stopPropagation: () => {
140
140
  o2 = true, t2.stopPropagation();
141
141
  }, isPropagationStopped: () => o2, persist: () => {
142
142
  }, timeStamp: t2.timeStamp, type: t2.type };
143
- for (const e3 in t2) e3 in i2 || "function" == typeof t2[e3] || (i2[e3] = t2[e3]);
144
- return i2;
145
- }, W = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: O, boundPixel: function(t2, e2 = false, n2 = 0) {
143
+ for (const e3 in t2) e3 in r2 || "function" == typeof t2[e3] || (r2[e3] = t2[e3]);
144
+ return r2;
145
+ }, W = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: I, boundPixel: function(t2, e2 = false, n2 = 0) {
146
146
  return t2;
147
- }, createSyntheticEvent: R, detectIt: N, focusableNodeNames: K, toPrettyKeyCode: H }, Symbol.toStringTag, { value: "Module" }));
147
+ }, createSyntheticEvent: R, detectIt: N, focusableNodeNames: O, toPrettyKeyCode: H }, Symbol.toStringTag, { value: "Module" }));
148
148
  class V {
149
149
  constructor(e2, n2) {
150
150
  this._target = null, this._groupKey = null, this._root = null, this._parent = null, this._uuid = t.uuidV4(), this._target = e2, this._groupKey = n2 ?? null, this._root = this, this._nodes = /* @__PURE__ */ new Map(), this._nodes.set(n2, this), this._children = /* @__PURE__ */ new Map(), this._listeners = /* @__PURE__ */ new Set(), this._commandsByKey = /* @__PURE__ */ new Map(), this._commandsByShortcut = /* @__PURE__ */ new Map();
151
151
  const o2 = this;
152
152
  this._unListenersByCommand = /* @__PURE__ */ new Map(), this._listenersByKey = /* @__PURE__ */ new Map(), this._commandsPropertyListener = (t2, e3) => {
153
- const n3 = o2._root._listenersByKey, i2 = e3.key(), r2 = n3.get(i2);
154
- r2 && o2._notifyCommands(r2, "onCommandChange", e3);
153
+ const n3 = o2._root._listenersByKey, r2 = e3.key(), i2 = n3.get(r2);
154
+ i2 && o2._notifyCommands(i2, "onCommandChange", e3);
155
155
  };
156
156
  }
157
157
  _getCommand(t2) {
@@ -160,9 +160,9 @@ class V {
160
160
  }
161
161
  getCommand(t2, e2 = false) {
162
162
  const n2 = this._root._focused;
163
- let o2 = n2, i2 = n2 === this;
164
- for (; !i2 && o2; ) o2 === this && (i2 = true), o2 = o2._parent;
165
- return (i2 ? n2 : this)._getCommand(t2);
163
+ let o2 = n2, r2 = n2 === this;
164
+ for (; !r2 && o2; ) o2 === this && (r2 = true), o2 = o2._parent;
165
+ return (r2 ? n2 : this)._getCommand(t2);
166
166
  }
167
167
  createChildGroup(t2, e2, n2) {
168
168
  let o2;
@@ -174,12 +174,12 @@ class V {
174
174
  }
175
175
  }
176
176
  o2 || (o2 = new V(t2, e2), o2._parent = this, o2._root = this._root, o2._unListenersByCommand = null, o2._listenersByKey = null, o2._commandsPropertyListener = null);
177
- const i2 = (t3, o3) => {
177
+ const r2 = (t3, o3) => {
178
178
  !t3.has(e2) || n2 ? t3.set(e2, o3) : void 0 === n2 && console.warn("commandGroup already registered", e2);
179
179
  };
180
- i2(this._root._nodes, o2);
181
- let r2 = this._parent;
182
- for (; r2; ) i2(this._nodes, o2), r2 = r2._parent;
180
+ r2(this._root._nodes, o2);
181
+ let i2 = this._parent;
182
+ for (; i2; ) r2(this._nodes, o2), i2 = i2._parent;
183
183
  return this._children.set(e2, o2), this._notify("onGroupChange"), o2;
184
184
  }
185
185
  getKey() {
@@ -189,7 +189,7 @@ class V {
189
189
  return this._nodes.get(t2);
190
190
  }
191
191
  _addCommands(t2, e2 = void 0) {
192
- const n2 = this._commandsByKey, o2 = this._commandsByShortcut, i2 = this._root._commandsPropertyListener, r2 = this._root._unListenersByCommand;
192
+ const n2 = this._commandsByKey, o2 = this._commandsByShortcut, r2 = this._root._commandsPropertyListener, i2 = this._root._unListenersByCommand;
193
193
  for (let s2 = 0; s2 < t2.length; s2++) {
194
194
  const l2 = t2[s2], a2 = l2.key();
195
195
  if (n2.has(a2) && !e2) {
@@ -197,16 +197,16 @@ class V {
197
197
  continue;
198
198
  }
199
199
  n2.set(a2, l2);
200
- let c2 = r2.get(l2);
201
- c2 && (c2(), r2.delete(l2));
202
- const h2 = l2.addPropertyListener(i2);
203
- r2.set(l2, h2);
200
+ let c2 = i2.get(l2);
201
+ c2 && (c2(), i2.delete(l2));
202
+ const h2 = l2.addPropertyListener(r2);
203
+ i2.set(l2, h2);
204
204
  const u2 = l2.shortcut();
205
205
  if (!u2) continue;
206
206
  const d2 = Array.isArray(u2) ? u2 : [u2];
207
207
  for (let t3 = 0; t3 < d2.length; t3++) {
208
- const n3 = X(d2[t3]), i3 = o2.get(n3);
209
- i3 && !e2 && void 0 === e2 && console.warn(`Shortcut already registered: ${n3}, ${a2}, ${i3}.`), o2.set(n3, a2);
208
+ const n3 = X(d2[t3]), r3 = o2.get(n3);
209
+ r3 && !e2 && void 0 === e2 && console.warn(`Shortcut already registered: ${n3}, ${a2}, ${r3}.`), o2.set(n3, a2);
210
210
  }
211
211
  }
212
212
  }
@@ -242,10 +242,10 @@ class V {
242
242
  t2.altKey && e2.push(A.Alt), t2.shiftKey && e2.push(A.Shift), t2.ctrlKey && e2.push(A.Ctrl), t2.metaKey && e2.push(A.Meta);
243
243
  let n2 = X({ key: t2.code, modifiers: e2 });
244
244
  const o2 = this._commandsByShortcut;
245
- let i2 = o2.get(n2);
246
- i2 || (n2 = X({ key: t2.key, modifiers: e2 }), i2 = o2.get(n2)), !i2 && t2.code.startsWith("Digit") && (n2 = X({ key: t2.code.substring(5, t2.code.length), modifiers: e2 }), i2 = this._commandsByShortcut.get(n2)), !i2 && t2.code.startsWith("Key") && (i2 = X({ key: t2.code.substring(3, t2.code.length), modifiers: e2 }), i2 = o2.get(n2));
247
- let r2 = null;
248
- return i2 && (r2 = this._commandsByKey.get(i2), r2 && r2.disabled() && (r2 = null), !r2 || r2.target() && r2.target().contains(t2.target) || (r2 = null)), r2 || (this._parent?.findCommandByEvent(t2) ?? null);
245
+ let r2 = o2.get(n2);
246
+ r2 || (n2 = X({ key: t2.key, modifiers: e2 }), r2 = o2.get(n2)), !r2 && t2.code.startsWith("Digit") && (n2 = X({ key: t2.code.substring(5, t2.code.length), modifiers: e2 }), r2 = this._commandsByShortcut.get(n2)), !r2 && t2.code.startsWith("Key") && (r2 = X({ key: t2.code.substring(3, t2.code.length), modifiers: e2 }), r2 = o2.get(n2));
247
+ let i2 = null;
248
+ return r2 && (i2 = this._commandsByKey.get(r2), i2 && i2.disabled() && (i2 = null), !i2 || i2.target() && i2.target().contains(t2.target) || (i2 = null)), i2 || (this._parent?.findCommandByEvent(t2) ?? null);
249
249
  }
250
250
  dispatchToFocusedCommand(t2) {
251
251
  const e2 = this.getActive();
@@ -261,18 +261,18 @@ class V {
261
261
  return this._parent;
262
262
  }
263
263
  addListener(t2, e2) {
264
- const n2 = this._listeners, o2 = e2?.keys, i2 = this._root._listenersByKey;
264
+ const n2 = this._listeners, o2 = e2?.keys, r2 = this._root._listenersByKey;
265
265
  if (o2 && !t2.onCommandChange) throw new Error("keys were provided but the listener does not contain 'onCommandChange'.");
266
- let r2 = null;
266
+ let i2 = null;
267
267
  if (o2) for (let e3 = 0; e3 < o2.length; e3++) {
268
268
  const n3 = o2[e3];
269
269
  if (!n3) continue;
270
- let s2 = i2.get(n3);
271
- s2 || (s2 = /* @__PURE__ */ new Set(), i2.set(n3, s2)), r2 || (r2 = []), r2.push(s2), s2.add(t2);
270
+ let s2 = r2.get(n3);
271
+ s2 || (s2 = /* @__PURE__ */ new Set(), r2.set(n3, s2)), i2 || (i2 = []), i2.push(s2), s2.add(t2);
272
272
  }
273
273
  return n2.add(t2), () => {
274
- if (r2) for (let e3 = 0; e3 < r2.length; e3++) {
275
- r2[e3].delete(t2);
274
+ if (i2) for (let e3 = 0; e3 < i2.length; e3++) {
275
+ i2[e3].delete(t2);
276
276
  }
277
277
  n2.delete(t2);
278
278
  };
@@ -311,85 +311,85 @@ const F = t.getOS() === t.OSType.MacOS || t.getOS() === t.OSType.IOS ? "Cmd" : "
311
311
  function Y(e2, n2 = null) {
312
312
  const o2 = a(n2);
313
313
  o2.current = n2;
314
- const [i2, r2] = c((t2) => t2 + 1, 0), s2 = h(() => Array.isArray(e2) ? e2 : [e2], [e2]);
314
+ const [r2, i2] = c((t2) => t2 + 1, 0), s2 = h(() => Array.isArray(e2) ? e2 : [e2], [e2]);
315
315
  return u(() => {
316
316
  if (!s2 || 0 === s2.length) return;
317
317
  const e3 = (t2, e4) => {
318
- o2.current?.onChange?.(e4), r2();
318
+ o2.current?.onChange?.(e4), i2();
319
319
  };
320
- let i3 = null;
321
- n2 && (i3 = { onExecute(t2, e4) {
320
+ let r3 = null;
321
+ n2 && (r3 = { onExecute(t2, e4) {
322
322
  o2.current?.onExecute?.(t2, e4);
323
323
  }, onError(t2, e4, n3) {
324
324
  o2.current?.onError?.(t2, e4, n3);
325
325
  } });
326
326
  const l2 = /* @__PURE__ */ new Set();
327
- for (let o3 = 0; o3 < s2.length; o3++) l2.add(s2[o3]?.addPropertyListener(t.debounce(e3, 0), true)), n2 && l2.add(s2[o3]?.addExecuteListener(i3));
327
+ for (let o3 = 0; o3 < s2.length; o3++) l2.add(s2[o3]?.addPropertyListener(t.debounce(e3, 0), true)), n2 && l2.add(s2[o3]?.addExecuteListener(r3));
328
328
  return () => {
329
329
  l2.forEach((t2) => {
330
330
  t2?.();
331
331
  });
332
332
  };
333
- }, [e2]), i2;
333
+ }, [e2]), r2;
334
334
  }
335
335
  const U = (e2, n2) => {
336
336
  if (!n2 || !e2 || 0 === n2.length) return t.EmptyArray;
337
- const o2 = n2.length, i2 = new Array(o2);
337
+ const o2 = n2.length, r2 = new Array(o2);
338
338
  for (let t2 = 0; t2 < o2; t2++) {
339
- const o3 = n2[t2], r2 = o3 ? e2.getCommand(o3) : null;
340
- i2[t2] = r2;
339
+ const o3 = n2[t2], i2 = o3 ? e2.getCommand(o3) : null;
340
+ r2[t2] = i2;
341
341
  }
342
- return i2;
342
+ return r2;
343
343
  };
344
344
  function G(t2, e2 = null, n2 = null, o2) {
345
- const i2 = a(n2);
346
- i2.current = n2, e2 && !Array.isArray(e2) && (e2 = [e2]);
347
- const [r2, s2] = d(U(t2, e2)), l2 = o2 ? [...o2, t2] : [t2];
345
+ const r2 = a(n2);
346
+ r2.current = n2, e2 && !Array.isArray(e2) && (e2 = [e2]);
347
+ const [i2, s2] = d(U(t2, e2)), l2 = o2 ? [...o2, t2] : [t2];
348
348
  return u(() => {
349
349
  const n3 = { onGroupChange: () => {
350
350
  const n4 = U(t2, e2);
351
- s2(n4), i2.current?.onChange?.(this);
351
+ s2(n4), r2.current?.onChange?.(this);
352
352
  } };
353
353
  let o3;
354
354
  e2 && e2.length > 0 && (o3 = { keys: e2 }, n3.onCommandChange = (n4, o4) => {
355
- i2.current?.onChange?.(t2), s2(U(t2, e2));
355
+ r2.current?.onChange?.(t2), s2(U(t2, e2));
356
356
  });
357
- const r3 = t2?.addListener(n3, o3), l3 = U(t2, e2);
358
- return s2(l3), i2.current?.onChange && i2.current?.onChange(t2), () => {
359
- r3?.();
357
+ const i3 = t2?.addListener(n3, o3), l3 = U(t2, e2);
358
+ return s2(l3), r2.current?.onChange && r2.current?.onChange(t2), () => {
359
+ i3?.();
360
360
  };
361
- }, l2), r2;
361
+ }, l2), i2;
362
362
  }
363
- const q = { Toolbar: "toolbar", Menuitem: "menuitem" }, Z = { BottomEnd: "bottom-end", BottomStart: "bottom-start", Bottom: "bottom", LeftEnd: "left-end", LeftStart: "left-start", Left: "left", RightEnd: "right-end", RightStart: "right-start", Right: "right", TopEnd: "top-end", TopStart: "top-start", Top: "top" }, J = p(f((t2, e2) => {
364
- const { refFocusStart: n2, ...o2 } = t2, i2 = a(null), r2 = m(() => {
363
+ const q = { Toolbar: "toolbar", Menuitem: "menuitem" }, Z = { BottomEnd: "bottom-end", BottomStart: "bottom-start", Bottom: "bottom", LeftEnd: "left-end", LeftStart: "left-start", Left: "left", RightEnd: "right-end", RightStart: "right-start", Right: "right", TopEnd: "top-end", TopStart: "top-start", Top: "top" }, J = p(m((t2, e2) => {
364
+ const { refFocusStart: n2, ...o2 } = t2, r2 = a(null), i2 = f(() => {
365
365
  if (n2) return void n2?.current?.focus();
366
- const t3 = i2.current.parentElement.children;
366
+ const t3 = r2.current.parentElement.children;
367
367
  let e3 = [];
368
368
  const o3 = t3.length;
369
- for (let n3 = 0; n3 < o3 && t3[n3] !== i2.current; n3++) {
370
- const o4 = t3[n3], i3 = o4.getAttribute("tabindex");
371
- if (null == i3 || "-1" === i3) continue;
372
- "true" !== o4.getAttribute("disabled") && (o4.focus && e3.push({ tabindex: parseInt(i3), child: o4 }));
369
+ for (let n3 = 0; n3 < o3 && t3[n3] !== r2.current; n3++) {
370
+ const o4 = t3[n3], r3 = o4.getAttribute("tabindex");
371
+ if (null == r3 || "-1" === r3) continue;
372
+ "true" !== o4.getAttribute("disabled") && (o4.focus && e3.push({ tabindex: parseInt(r3), child: o4 }));
373
373
  }
374
374
  0 !== e3.length && (e3.sort(function(t4, e4) {
375
375
  return t4.tabindex - e4.tabindex;
376
376
  }), e3[0].child.focus());
377
377
  }, [n2]);
378
- return x("div", { tabIndex: 0, ref: L([i2, e2]), onFocus: r2, ...o2 });
378
+ return x("div", { tabIndex: 0, ref: L([r2, e2]), onFocus: i2, ...o2 });
379
379
  }));
380
- const Q = p(f((t2, e2) => {
381
- const { className: n2, style: o2, children: i2, radius: r2 = 4, strokeWidth: s2 = 1, strokeColor: c2 = "grey", ...u2 } = t2, [d2, { width: p2, height: f2 }] = M(), m2 = a(null), _2 = (t3, e3 = 0) => {
382
- const n3 = t3 / 2, o3 = f2 - n3 + e3;
380
+ const Q = p(m((t2, e2) => {
381
+ const { className: n2, style: o2, children: r2, radius: i2 = 4, strokeWidth: s2 = 1, strokeColor: c2 = "grey", ...u2 } = t2, [d2, { width: p2, height: m2 }] = M(), f2 = a(null), _2 = (t3, e3 = 0) => {
382
+ const n3 = t3 / 2, o3 = m2 - n3 + e3;
383
383
  return (function(t4, e4, n4 = false) {
384
384
  if (0 === e4) return t4;
385
385
  function o4(t5, e5, n5) {
386
- let o5 = e5.x - t5.x, r4 = e5.y - t5.y, s4 = Math.sqrt(o5 * o5 + r4 * r4);
387
- return i3(t5, e5, Math.min(1, n5 / s4));
386
+ let o5 = e5.x - t5.x, i4 = e5.y - t5.y, s4 = Math.sqrt(o5 * o5 + i4 * i4);
387
+ return r3(t5, e5, Math.min(1, n5 / s4));
388
388
  }
389
- function i3(t5, e5, n5) {
389
+ function r3(t5, e5, n5) {
390
390
  return { x: t5.x + (e5.x - t5.x) * n5, y: t5.y + (e5.y - t5.y) * n5 };
391
391
  }
392
- function r3(t5, e5) {
392
+ function i3(t5, e5) {
393
393
  t5.length > 2 && (t5[t5.length - 2] = e5.x, t5[t5.length - 1] = e5.y);
394
394
  }
395
395
  function s3(t5) {
@@ -407,27 +407,27 @@ const Q = p(f((t2, e2) => {
407
407
  for (let t6 = 1; t6 < l2.length; t6++) {
408
408
  let h2 = a2[a2.length - 1], u3 = l2[t6], d3 = u3 === c3 ? l2[1] : l2[t6 + 1];
409
409
  if (d3 && h2 && h2.length > 2 && "L" === u3[0] && d3.length > 2 && "L" === d3[0]) {
410
- let t7, l3, c4 = s3(h2), p3 = s3(u3), f3 = s3(d3);
411
- n4 ? (t7 = i3(p3, h2.origPoint || c4, e4), l3 = i3(p3, d3.origPoint || f3, e4)) : (t7 = o4(p3, c4, e4), l3 = o4(p3, f3, e4)), r3(u3, t7), u3.origPoint = p3, a2.push(u3);
412
- let m3 = i3(t7, p3, 0.5), _3 = i3(p3, l3, 0.5), g3 = ["C", m3.x, m3.y, _3.x, _3.y, l3.x, l3.y];
410
+ let t7, l3, c4 = s3(h2), p3 = s3(u3), m3 = s3(d3);
411
+ n4 ? (t7 = r3(p3, h2.origPoint || c4, e4), l3 = r3(p3, d3.origPoint || m3, e4)) : (t7 = o4(p3, c4, e4), l3 = o4(p3, m3, e4)), i3(u3, t7), u3.origPoint = p3, a2.push(u3);
412
+ let f3 = r3(t7, p3, 0.5), _3 = r3(p3, l3, 0.5), g3 = ["C", f3.x, f3.y, _3.x, _3.y, l3.x, l3.y];
413
413
  g3.origPoint = p3, a2.push(g3);
414
414
  } else a2.push(u3);
415
415
  }
416
416
  if (c3) {
417
417
  let t6 = s3(a2[a2.length - 1]);
418
- a2.push(["Z"]), r3(a2[0], t6);
418
+ a2.push(["Z"]), i3(a2[0], t6);
419
419
  }
420
420
  } else a2 = l2;
421
421
  return a2.reduce(function(t5, e5) {
422
422
  return t5 + e5.join(" ") + " ";
423
423
  }, "");
424
- })(`${`M 0 ${n3} L ${r2 - 0.5} ${n3} L ${r2 - 0.5} ${o3} L ${2 * r2} ${o3}`} ${`L ${p2 - 2 * r2} ${o3}`} ${`M ${p2 - 2 * r2} ${o3} L ${p2 - r2} ${o3} L ${p2 - r2} ${n3} L ${p2} ${n3}`}`, r2);
425
- }, g2 = h(() => _2(s2), [p2, f2, r2, s2]), y2 = h(() => {
426
- if (0 === r2) return;
427
- const t3 = r2 / 2;
428
- return _2(r2) + `L ${p2} 0 L 0 0 L 0 ${t3}`;
429
- }, [g2, r2, s2]), v2 = h(() => ({ style: { clipPath: `path('${y2}')` } }), [y2]);
430
- return S("div", { className: n2, style: { display: "flex", flexDirection: "row", ...o2 }, ...u2, ref: L([m2, d2, e2]), children: [l.isValidElement(i2) ? l.cloneElement(i2, v2) : x(E, {}), x("svg", { style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, width: p2, height: f2, viewBox: `0 0 ${p2} ${f2}`, children: x("path", { d: g2, stroke: c2, fill: "none", vectorEffect: "non-scaling-stroke", strokeWidth: s2 }) })] });
424
+ })(`${`M 0 ${n3} L ${i2 - 0.5} ${n3} L ${i2 - 0.5} ${o3} L ${2 * i2} ${o3}`} ${`L ${p2 - 2 * i2} ${o3}`} ${`M ${p2 - 2 * i2} ${o3} L ${p2 - i2} ${o3} L ${p2 - i2} ${n3} L ${p2} ${n3}`}`, i2);
425
+ }, g2 = h(() => _2(s2), [p2, m2, i2, s2]), y2 = h(() => {
426
+ if (0 === i2) return;
427
+ const t3 = i2 / 2;
428
+ return _2(i2) + `L ${p2} 0 L 0 0 L 0 ${t3}`;
429
+ }, [g2, i2, s2]), v2 = h(() => ({ style: { clipPath: `path('${y2}')` } }), [y2]);
430
+ return S("div", { className: n2, style: { display: "flex", flexDirection: "row", ...o2 }, ...u2, ref: L([f2, d2, e2]), children: [l.isValidElement(r2) ? l.cloneElement(r2, v2) : x(E, {}), x("svg", { style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, width: p2, height: m2, viewBox: `0 0 ${p2} ${m2}`, children: x("path", { d: g2, stroke: c2, fill: "none", vectorEffect: "non-scaling-stroke", strokeWidth: s2 }) })] });
431
431
  })), tt = { Default: "default", Error: "error", Success: "success", Warning: "warning", Info: "info" };
432
432
  class et extends e {
433
433
  setOverrides(t2) {
@@ -470,27 +470,27 @@ const nt = _(new et()), ot = ({ children: t2, notifier: e2 }) => (l.useEffect(()
470
470
  return n.setOverrides(e2), () => {
471
471
  n.setOverrides(t3);
472
472
  };
473
- }, [e2]), l.createElement(nt.Provider, { value: e2 }, t2)), it = () => g(nt), rt = 3, st = 0.5, lt = 50, at = (t2) => ({ x: t2.x, y: t2.y, width: t2.width, height: t2.height, top: t2.top, left: t2.left, right: t2.right, bottom: t2.bottom });
473
+ }, [e2]), l.createElement(nt.Provider, { value: e2 }, t2)), rt = () => g(nt), it = 3, st = 0.5, lt = 50, at = (t2) => ({ x: t2.x, y: t2.y, width: t2.width, height: t2.height, top: t2.top, left: t2.left, right: t2.right, bottom: t2.bottom });
474
474
  function ct(t2 = {}) {
475
- const { threshold: e2 = st, stillnessThreshold: n2 = rt, maxHierarchyDepth: o2 = lt } = t2, [i2, r2] = M(), s2 = a(null), [l2, h2] = c((t3) => t3 + 1, 0), p2 = a(void 0), f2 = a({ x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0 }), _2 = m((t3) => {
476
- s2.current = t3, "function" == typeof i2 && i2(t3);
477
- }, [i2]), [g2, y2] = d(r2);
475
+ const { threshold: e2 = st, stillnessThreshold: n2 = it, maxHierarchyDepth: o2 = lt } = t2, [r2, i2] = M(), s2 = a(null), [l2, h2] = c((t3) => t3 + 1, 0), p2 = a(void 0), m2 = a({ x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0 }), _2 = f((t3) => {
476
+ s2.current = t3, "function" == typeof r2 && r2(t3);
477
+ }, [r2]), [g2, y2] = d(i2);
478
478
  return u(() => {
479
- r2 && !g2 && y2(r2);
480
- }, [r2, g2]), u(() => {
479
+ i2 && !g2 && y2(i2);
480
+ }, [i2, g2]), u(() => {
481
481
  const t3 = s2.current;
482
482
  if (!t3) return;
483
- let i3 = false, r3 = 0;
483
+ let r3 = false, i3 = 0;
484
484
  const l3 = () => {
485
485
  if (!t3) return;
486
- const o3 = t3.getBoundingClientRect(), s3 = f2.current;
487
- Math.abs(o3.x - s3.x) > e2 || Math.abs(o3.y - s3.y) > e2 || Math.abs(o3.width - s3.width) > e2 || Math.abs(o3.height - s3.height) > e2 ? (i3 || (i3 = true, y2(at(o3)), h2()), r3 = 0) : r3++, i3 && r3 >= n2 && (i3 = false, y2(at(o3)), h2()), f2.current = at(o3), p2.current = requestAnimationFrame(l3);
486
+ const o3 = t3.getBoundingClientRect(), s3 = m2.current;
487
+ Math.abs(o3.x - s3.x) > e2 || Math.abs(o3.y - s3.y) > e2 || Math.abs(o3.width - s3.width) > e2 || Math.abs(o3.height - s3.height) > e2 ? (r3 || (r3 = true, y2(at(o3)), h2()), i3 = 0) : i3++, r3 && i3 >= n2 && (r3 = false, y2(at(o3)), h2()), m2.current = at(o3), p2.current = requestAnimationFrame(l3);
488
488
  };
489
489
  p2.current = requestAnimationFrame(l3);
490
490
  const a2 = (t4) => {
491
- i3 = true, h2();
491
+ r3 = true, h2();
492
492
  }, c2 = (t4) => {
493
- i3 = false, r3 = n2, h2();
493
+ r3 = false, i3 = n2, h2();
494
494
  };
495
495
  let u2 = t3;
496
496
  const d2 = [];
@@ -500,13 +500,13 @@ function ct(t2 = {}) {
500
500
  t4.removeEventListener("animationstart", a2, true), t4.removeEventListener("animationend", c2, true), t4.removeEventListener("transitionstart", a2, true), t4.removeEventListener("transitionend", c2, true);
501
501
  });
502
502
  };
503
- }, [l2, r2, e2, n2, o2]), [_2, g2];
503
+ }, [l2, i2, e2, n2, o2]), [_2, g2];
504
504
  }
505
505
  const ht = (t2, e2) => {
506
- const n2 = m((...e3) => t2?.(...e3), e2), o2 = a(null);
506
+ const n2 = f((...e3) => t2?.(...e3), e2), o2 = a(null);
507
507
  o2.current = n2;
508
- const i2 = m((...t3) => o2.current?.(...t3), []);
509
- if (o2.current) return i2;
508
+ const r2 = f((...t3) => o2.current?.(...t3), []);
509
+ if (o2.current) return r2;
510
510
  };
511
511
  function ut(t2) {
512
512
  const [e2, n2] = d("undefined" != typeof window ? window.devicePixelRatio : 1), o2 = a(null);
@@ -523,8 +523,8 @@ function ut(t2) {
523
523
  }
524
524
  function dt(t2) {
525
525
  if ("undefined" == typeof window) return 1;
526
- const { defaultDpr: e2 = 1, maxDpr: n2 = 3, round: o2 = true } = t2 || {}, i2 = "undefined" != typeof window && "number" == typeof window.devicePixelRatio ? window.devicePixelRatio : e2;
527
- return Math.min(Math.max(1, o2 ? Math.floor(i2) : i2), n2);
526
+ const { defaultDpr: e2 = 1, maxDpr: n2 = 3, round: o2 = true } = t2 || {}, r2 = "undefined" != typeof window && "number" == typeof window.devicePixelRatio ? window.devicePixelRatio : e2;
527
+ return Math.min(Math.max(1, o2 ? Math.floor(r2) : r2), n2);
528
528
  }
529
529
  function pt(t2, e2, n2) {
530
530
  const o2 = ht(e2, [e2]);
@@ -537,9 +537,9 @@ function pt(t2, e2, n2) {
537
537
  };
538
538
  }, [t2]);
539
539
  }
540
- let ft = 0;
541
- function mt() {
542
- const [t2, e2] = d(!!document.fullscreenElement), n2 = m(() => {
540
+ let mt = 0;
541
+ function ft() {
542
+ const [t2, e2] = d(!!document.fullscreenElement), n2 = f(() => {
543
543
  const t3 = document.fullscreenElement;
544
544
  return t3 ? t3.querySelector(".fullscreen-portal-root") || t3 : document.body;
545
545
  }, []);
@@ -550,42 +550,42 @@ function mt() {
550
550
  let n3 = t4.querySelector(".fullscreen-portal-root");
551
551
  n3 || (n3 = document.createElement("div"), n3.className = "fullscreen-portal-root _fullscreen-portal-root_1mjsr_4", t4.appendChild(n3));
552
552
  }
553
- return ft++, t3(), document.addEventListener("fullscreenchange", t3), () => {
554
- document.removeEventListener("fullscreenchange", t3), ft--, ft <= 0 && (document.querySelectorAll(".fullscreen-portal-root").forEach((t4) => {
553
+ return mt++, t3(), document.addEventListener("fullscreenchange", t3), () => {
554
+ document.removeEventListener("fullscreenchange", t3), mt--, mt <= 0 && (document.querySelectorAll(".fullscreen-portal-root").forEach((t4) => {
555
555
  t4.parentNode && t4.parentNode.removeChild(t4);
556
- }), ft = 0);
556
+ }), mt = 0);
557
557
  };
558
558
  }, []), { getPortalContainer: n2, isFullscreen: t2 };
559
559
  }
560
560
  function _t(t2) {
561
561
  if (!t2) throw new Error("must have a PointerHandlerOptions");
562
- const { onPointerDown: e2, onPointerUp: n2, onPointerMoveOrWait: o2, processTouch: i2 = false, consumeTouch: r2 = true } = t2, s2 = ht(e2, [e2]), l2 = ht(n2, [n2]), c2 = ht(o2, [o2]), h2 = a(false), d2 = t2?.timerInitial ?? 230, p2 = t2?.timerContinuous ?? d2 / 2, f2 = a(null), _2 = a(null), g2 = a(null), y2 = a(null), v2 = m(() => {
562
+ const { onPointerDown: e2, onPointerUp: n2, onPointerMoveOrWait: o2, processTouch: r2 = false, consumeTouch: i2 = true } = t2, s2 = ht(e2, [e2]), l2 = ht(n2, [n2]), c2 = ht(o2, [o2]), h2 = a(false), d2 = t2?.timerInitial ?? 230, p2 = t2?.timerContinuous ?? d2 / 2, m2 = a(null), _2 = a(null), g2 = a(null), y2 = a(null), v2 = f(() => {
563
563
  y2.current && (clearTimeout(y2.current), y2.current = null);
564
- }, []), w2 = m((t3) => {
564
+ }, []), w2 = f((t3) => {
565
565
  y2.current = setTimeout(() => {
566
566
  window.requestAnimationFrame(() => {
567
567
  if (false === h2.current) return;
568
- const t4 = _2.current, e3 = f2.current, n3 = R(t4, e3.currentTarget);
568
+ const t4 = _2.current, e3 = m2.current, n3 = R(t4, e3.currentTarget);
569
569
  c2?.(n3, g2.current, e3);
570
570
  }), w2(p2);
571
571
  }, t3 ?? d2);
572
572
  }, []);
573
573
  u(() => () => v2(), []);
574
- const b2 = i2 ? "pointer" : "mouse", x2 = m((t3) => {
574
+ const b2 = r2 ? "pointer" : "mouse", x2 = f((t3) => {
575
575
  t3.stopPropagation(), t3.stopImmediatePropagation(), t3.preventDefault();
576
576
  }, []), S2 = ht((t3) => {
577
577
  document.removeEventListener(`${b2}move`, M2), document.removeEventListener(`${b2}up`, S2), document.removeEventListener("keydown", T2), document.removeEventListener("keyup", C2), document.removeEventListener("touchstart", x2, { capture: true }), document.removeEventListener("touchmove", x2, { capture: true }), window.removeEventListener("blur", E2), v2(), window.requestAnimationFrame(() => {
578
578
  if (false === h2.current) return;
579
579
  h2.current = false;
580
- const e3 = t3, n3 = f2.current, o3 = R(e3, n3.currentTarget);
580
+ const e3 = t3, n3 = m2.current, o3 = R(e3, n3.currentTarget);
581
581
  l2?.(o3, g2.current, n3), g2.current = null;
582
582
  });
583
- }, []), E2 = m(() => {
583
+ }, []), E2 = f(() => {
584
584
  false !== h2.current && (h2.current = false, S2(_2.current));
585
585
  }, []), L2 = ht(() => {
586
586
  v2(), w2(p2), window.requestAnimationFrame(() => {
587
587
  if (false === h2.current) return;
588
- const t3 = _2.current, e3 = f2.current, n3 = R(t3, e3.currentTarget);
588
+ const t3 = _2.current, e3 = m2.current, n3 = R(t3, e3.currentTarget);
589
589
  c2?.(n3, g2.current, e3);
590
590
  });
591
591
  }, [p2]), M2 = ht((t3) => {
@@ -598,8 +598,8 @@ function _t(t2) {
598
598
  return ht((t3) => {
599
599
  if (t3.isDefaultPrevented()) return;
600
600
  g2.current = { ctrlKey: t3.ctrlKey, shiftKey: t3.shiftKey, altKey: t3.altKey, metaKey: t3.metaKey };
601
- false !== s2(t3, g2.current) && (f2.current = t3, _2.current = t3.nativeEvent, document.addEventListener(`${b2}up`, S2, { passive: false }), document.addEventListener(`${b2}move`, M2, { passive: false }), document.addEventListener("keydown", T2, { passive: false }), document.addEventListener("keyup", C2, { passive: false }), window.addEventListener("blur", E2, { passive: true }), i2 && r2 && (document.addEventListener("touchstart", x2, { passive: false, capture: true }), document.addEventListener("touchmove", x2, { passive: false, capture: true })), h2.current = true, w2(d2));
602
- }, [d2, i2]);
601
+ false !== s2(t3, g2.current) && (m2.current = t3, _2.current = t3.nativeEvent, document.addEventListener(`${b2}up`, S2, { passive: false }), document.addEventListener(`${b2}move`, M2, { passive: false }), document.addEventListener("keydown", T2, { passive: false }), document.addEventListener("keyup", C2, { passive: false }), window.addEventListener("blur", E2, { passive: true }), r2 && i2 && (document.addEventListener("touchstart", x2, { passive: false, capture: true }), document.addEventListener("touchmove", x2, { passive: false, capture: true })), h2.current = true, w2(d2));
602
+ }, [d2, r2]);
603
603
  }
604
604
  function gt(t2, e2) {
605
605
  return _t({ onPointerDown: t2, onPointerMoveOrWait: (e3, n2, o2) => {
@@ -609,10 +609,10 @@ function gt(t2, e2) {
609
609
  const yt = ({ initValue: t2, useHookBody: e2, applyStateChange: n2 }) => {
610
610
  const o2 = a(t2);
611
611
  if ("function" != typeof e2) throw new Error("function expected as hook body parameter. got " + typeof e2);
612
- const i2 = e2();
612
+ const r2 = e2();
613
613
  return y(() => {
614
- o2.current !== i2 && (o2.current = i2, n2(i2));
615
- }, [n2, i2]), null;
614
+ o2.current !== r2 && (o2.current = r2, n2(r2));
615
+ }, [n2, r2]), null;
616
616
  }, vt = (t2) => {
617
617
  console && console.warn && console.warn(t2);
618
618
  }, wt = "object" == typeof self && self.self === self && self || "object" == typeof global && global.global === global && global || void 0;
@@ -623,11 +623,11 @@ const Et = [], Lt = [], Mt = () => {
623
623
  const [e2, n2] = d([]), o2 = a([]);
624
624
  return o2.current = e2, t2 || false !== xt || (St = true), u(() => {
625
625
  let e3 = true;
626
- function i2() {
627
- if (e3) return Lt[0] !== i2 ? (t2 || true !== xt || vt("SingletonHooksContainer is mounted after some singleton hook has been used.Your SingletonHooksContainer will not be used in favor of internal one."), void n2((t3) => [])) : void n2([...Et]);
626
+ function r2() {
627
+ if (e3) return Lt[0] !== r2 ? (t2 || true !== xt || vt("SingletonHooksContainer is mounted after some singleton hook has been used.Your SingletonHooksContainer will not be used in favor of internal one."), void n2((t3) => [])) : void n2([...Et]);
628
628
  }
629
- return Lt.push(i2), Mt(), () => {
630
- e3 = false, o2.current?.length > 0 && vt("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), Lt.splice(Lt.indexOf(i2), 1), Mt();
629
+ return Lt.push(r2), Mt(), () => {
630
+ e3 = false, o2.current?.length > 0 && vt("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), Lt.splice(Lt.indexOf(r2), 1), Mt();
631
631
  };
632
632
  }, [t2]), x(E, { children: e2.map(({ hook: t3, key: e3 }) => v(yt, { ...t3, key: e3 })) });
633
633
  }, Ct = (t2) => {
@@ -643,14 +643,14 @@ const Et = [], Lt = [], Mt = () => {
643
643
  };
644
644
  let kt = null;
645
645
  kt || (kt = (t2, e2, n2 = {}) => {
646
- let o2, i2, r2 = false, s2 = false, l2 = [], { unmountIfNoConsumers: a2 = false } = n2;
646
+ let o2, r2, i2 = false, s2 = false, l2 = [], { unmountIfNoConsumers: a2 = false } = n2;
647
647
  const c2 = (t3) => {
648
- i2 = t3, k(() => l2.forEach((e3) => e3(t3)));
649
- }, h2 = () => (s2 || (i2 = "function" == typeof t2 ? t2() : t2, s2 = true), i2);
648
+ r2 = t3, k(() => l2.forEach((e3) => e3(t3)));
649
+ }, h2 = () => (s2 || (r2 = "function" == typeof t2 ? t2() : t2, s2 = true), r2);
650
650
  return () => {
651
651
  const [n3, s3] = d(h2);
652
- return u(() => (r2 || (r2 = true, o2 = Ct({ initValue: t2, useHookBody: e2, applyStateChange: c2 })), l2.push(s3), i2 !== n3 && s3(i2), () => {
653
- l2.splice(l2.indexOf(s3), 1), 0 === l2.length && a2 && (o2(), r2 = false);
652
+ return u(() => (i2 || (i2 = true, o2 = Ct({ initValue: t2, useHookBody: e2, applyStateChange: c2 })), l2.push(s3), r2 !== n3 && s3(r2), () => {
653
+ l2.splice(l2.indexOf(s3), 1), 0 === l2.length && a2 && (o2(), i2 = false);
654
654
  }), []), n3;
655
655
  };
656
656
  });
@@ -672,11 +672,11 @@ const At = Pt(null, () => {
672
672
  const [t2, e2] = d(o.Global);
673
673
  return { setClipboard: (t3) => e2(t3), getClipboard: () => t2, refNativeCopy: a(null), refNativeLastKey: a(null) };
674
674
  }), $t = (e2) => {
675
- const { source: n2, target: s2, onPaste: l2, onClipboardUpdate: a2, commands: c2 } = e2, d2 = it(), p2 = ht(a2, [a2]), f2 = ht(l2, [l2]), { getClipboard: _2, refNativeCopy: g2 } = Bt(), y2 = _2();
675
+ const { source: n2, target: s2, onPaste: l2, onClipboardUpdate: a2, commands: c2 } = e2, d2 = rt(), p2 = ht(a2, [a2]), m2 = ht(l2, [l2]), { getClipboard: _2, refNativeCopy: g2 } = Bt(), y2 = _2();
676
676
  h(() => {
677
677
  const t2 = n2?.element, e3 = s2?.element ?? n2?.element;
678
678
  if (!c2) return;
679
- const o2 = [new I("cut", t2, { label: "Cut", description: "Remove the selection and put it on the clipboard so you can paste it somewhere else.", icon: "cut", shortcut: { key: "X", modifiers: [A.Ctrl] } }), new I("copy", t2, { label: "Copy", description: "Put a copy of the selection on the clipboard so you can paste it somewhere else.", icon: "copy", shortcut: { key: "C", modifiers: [A.Ctrl] } }), new I("paste", e3, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste.yellow", shortcut: [{ key: "V", modifiers: [A.Ctrl] }, { key: "F8", modifiers: [A.Ctrl] }] })];
679
+ const o2 = [new K("cut", t2, { label: "Cut", description: "Remove the selection and put it on the clipboard so you can paste it somewhere else.", icon: "cut", shortcut: { key: "X", modifiers: [A.Ctrl] } }), new K("copy", t2, { label: "Copy", description: "Put a copy of the selection on the clipboard so you can paste it somewhere else.", icon: "copy", shortcut: { key: "C", modifiers: [A.Ctrl] } }), new K("paste", e3, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste.yellow", shortcut: [{ key: "V", modifiers: [A.Ctrl] }, { key: "F8", modifiers: [A.Ctrl] }] })];
680
680
  c2?.addCommands(o2, true);
681
681
  }, [c2]);
682
682
  const v2 = ht(async (t2) => {
@@ -697,44 +697,44 @@ const At = Pt(null, () => {
697
697
  d2.showError?.(t3);
698
698
  }
699
699
  }
700
- }, [n2?.element, d2]), b2 = m(() => {
700
+ }, [n2?.element, d2]), b2 = f(() => {
701
701
  w2({ isCut: true });
702
702
  }, []), x2 = ht(async (t2, e3, n3) => {
703
703
  try {
704
704
  if (false === await t2.doPaste(e3, n3)) return;
705
- f2?.(e3, n3);
705
+ m2?.(e3, n3);
706
706
  } catch (t3) {
707
707
  d2.showError?.(t3);
708
708
  }
709
- }, [f2]), S2 = ht(async (e3, n3, o2) => {
710
- const i2 = s2?.element?.();
711
- if (i2 && await t.whenFocus(i2), !e3 && !n3) return;
712
- const r2 = await d2.showBusy?.("Pasting...");
709
+ }, [m2]), S2 = ht(async (e3, n3, o2) => {
710
+ const r2 = s2?.element?.();
711
+ if (r2 && await t.whenFocus(r2), !e3 && !n3) return;
712
+ const i2 = await d2.showBusy?.("Pasting...");
713
713
  if (n3) try {
714
- return await x2(s2, n3, o2), void r2?.();
714
+ return await x2(s2, n3, o2), void i2?.();
715
715
  } catch (t2) {
716
- r2?.(), d2.showError?.(t2);
716
+ i2?.(), d2.showError?.(t2);
717
717
  }
718
718
  let l3, a3 = s2.importFromExternal;
719
719
  a3 || (a3 = (t2, n4) => ({ getItemType: () => "text", toText: () => e3.text, isClipboardItem: true }));
720
720
  try {
721
721
  l3 = await a3(e3, { isCut: false });
722
722
  } catch (t2) {
723
- r2?.(), d2.showError?.(t2);
723
+ i2?.(), d2.showError?.(t2);
724
724
  }
725
725
  if (l3) try {
726
726
  const t2 = await Promise.resolve(l3);
727
- await x2(s2, t2, o2), r2?.();
727
+ await x2(s2, t2, o2), i2?.();
728
728
  } catch (t2) {
729
- r2?.(), d2.showError?.(t2);
729
+ i2?.(), d2.showError?.(t2);
730
730
  }
731
- else r2?.();
731
+ else i2?.();
732
732
  }, [x2, s2, d2]), E2 = ht(async (t2) => {
733
733
  if (s2?.element) try {
734
734
  const e3 = await y2.readReference();
735
735
  if (e3) return void await S2(null, e3, t2);
736
736
  const n3 = [];
737
- n3[0] = await i.readStringFromClipboard(y2, r.plain), n3[1] = await i.readHTMLFromClipboard(y2, r.html), n3[2] = await i.readBlobFromClipboard(y2, r.png);
737
+ n3[0] = await r.readStringFromClipboard(y2, i.plain), n3[1] = await r.readHTMLFromClipboard(y2, i.html), n3[2] = await r.readBlobFromClipboard(y2, i.png);
738
738
  const o2 = { text: n3[0] ?? null, html: n3[1] ?? null, image: n3[2] ?? null };
739
739
  await S2(o2, null, t2);
740
740
  } catch (t3) {
@@ -762,7 +762,7 @@ const At = Pt(null, () => {
762
762
  c2?.getCommand("cut")?.updateCallback(b2).update({ disabled: !n2 || !s2 }), c2?.getCommand("copy")?.updateCallback(w2).update({ disabled: !n2 }), c2?.getCommand("paste")?.updateCallback(E2).update({ disabled: !s2 });
763
763
  }, [n2, s2, c2]), { paste: E2, copy: w2, clipboard: y2 };
764
764
  };
765
- function It(t2, e2 = true) {
765
+ function Kt(t2, e2 = true) {
766
766
  const n2 = a(t2);
767
767
  u(() => {
768
768
  if (e2) {
@@ -772,15 +772,15 @@ function It(t2, e2 = true) {
772
772
  n2.current = t2;
773
773
  });
774
774
  }
775
- let Kt = false, Ot = 0;
775
+ let Ot = false, It = 0;
776
776
  var Nt = "undefined" != typeof document ? y : u;
777
- const Ht = () => "sheetxl-ui-" + Ot++;
777
+ const Ht = () => "sheetxl-ui-" + It++;
778
778
  const Rt = l["useId".toString()], Wt = null != Rt ? Rt : function() {
779
- const [t2, e2] = l.useState(() => Kt ? Ht() : void 0);
779
+ const [t2, e2] = l.useState(() => Ot ? Ht() : void 0);
780
780
  return Nt(() => {
781
781
  null == t2 && e2(Ht());
782
782
  }, []), l.useEffect(() => {
783
- Kt || (Kt = true);
783
+ Ot || (Ot = true);
784
784
  }, []), t2;
785
785
  }, Vt = [];
786
786
  function Ft(t2, e2, n2 = Vt) {
@@ -789,22 +789,22 @@ function Ft(t2, e2, n2 = Vt) {
789
789
  if (!o2.current) return;
790
790
  const t3 = o2.current, n3 = e2?.();
791
791
  if (!n3 || "object" != typeof n3) throw new Error("attributes must return a plain object of values");
792
- const i2 = Object.keys(n3), r2 = i2.length;
793
- for (let e3 = 0; e3 < r2; e3++) {
794
- const o3 = i2[e3], r3 = n3[o3];
795
- Object.defineProperty(t3, o3, { value: r3, writable: true, configurable: true, enumerable: true });
792
+ const r2 = Object.keys(n3), i2 = r2.length;
793
+ for (let e3 = 0; e3 < i2; e3++) {
794
+ const o3 = r2[e3], i3 = n3[o3];
795
+ Object.defineProperty(t3, o3, { value: i3, writable: true, configurable: true, enumerable: true });
796
796
  }
797
797
  return t3;
798
798
  }, n2), o2;
799
799
  }
800
800
  const jt = "Undo the last action.", Xt = "Repeat the last action or undo the redo.", Yt = (t2) => `Redo ${t2}`, Ut = ({ manager: t2, commands: e2, disabled: n2 }) => {
801
- const o2 = it(), i2 = ht((e3) => {
801
+ const o2 = rt(), r2 = ht((e3) => {
802
802
  try {
803
803
  t2?.undo(e3);
804
804
  } catch (t3) {
805
805
  o2.error(t3);
806
806
  }
807
- }, [t2]), r2 = ht((e3) => {
807
+ }, [t2]), i2 = ht((e3) => {
808
808
  try {
809
809
  t2?.redo(e3);
810
810
  } catch (t3) {
@@ -814,23 +814,23 @@ const jt = "Undo the last action.", Xt = "Repeat the last action or undo the red
814
814
  return h(() => {
815
815
  if (!e2) return;
816
816
  const t3 = { contains: (t4) => true, focus() {
817
- } }, n3 = [new $("undo", t3, { label: "Undo", description: jt, shortcut: { key: "z", modifiers: [A.Ctrl] }, disabled: true }, i2), new $("redo", t3, { label: "Redo", description: Xt, shortcut: [{ key: "y", modifiers: [A.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [A.Alt] }], disabled: true }, r2)];
817
+ } }, n3 = [new $("undo", t3, { label: "Undo", description: jt, shortcut: { key: "z", modifiers: [A.Ctrl] }, disabled: true }, r2), new $("redo", t3, { label: "Redo", description: Xt, shortcut: [{ key: "y", modifiers: [A.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [A.Alt] }], disabled: true }, i2)];
818
818
  e2?.addCommands(n3, true);
819
819
  }, [e2]), u(() => {
820
820
  if (!e2) return;
821
821
  const o3 = () => {
822
- const o4 = t2?.getTopUndoDescription(), i4 = {};
823
- var r3;
824
- e2.getCommand("undo").update({ disabled: n2 || !t2 || !t2.hasUndo(), description: o4 ? (r3 = o4, `Undo ${r3}`) : jt, state: i4, context: { undoManager: t2 } });
822
+ const o4 = t2?.getTopUndoDescription(), r4 = {};
823
+ var i3;
824
+ e2.getCommand("undo").update({ disabled: n2 || !t2 || !t2.hasUndo(), description: o4 ? (i3 = o4, `Undo ${i3}`) : jt, state: r4, context: { undoManager: t2 } });
825
825
  const s2 = t2?.getTopRedoDescription();
826
- e2.getCommand("redo").update({ disabled: n2 || !t2 || !t2.hasRedo(), description: s2 ? Yt(s2) : Xt, state: i4, context: { undoManager: t2 } });
826
+ e2.getCommand("redo").update({ disabled: n2 || !t2 || !t2.hasRedo(), description: s2 ? Yt(s2) : Xt, state: r4, context: { undoManager: t2 } });
827
827
  };
828
828
  if (o3(), !t2) return;
829
- const i3 = t2.addListener({ onStackChange() {
829
+ const r3 = t2.addListener({ onStackChange() {
830
830
  o3();
831
831
  } });
832
- return () => i3?.();
833
- }, [t2, e2, n2]), { undo: i2, redo: r2 };
832
+ return () => r3?.();
833
+ }, [t2, e2, n2]), { undo: r2, redo: i2 };
834
834
  };
835
835
  class Gt extends b {
836
836
  static getDerivedStateFromError() {
@@ -844,7 +844,7 @@ class Gt extends b {
844
844
  }
845
845
  }
846
846
  const qt = ({ children: t2 }) => {
847
- const e2 = it(), n2 = m((t3) => {
847
+ const e2 = rt(), n2 = f((t3) => {
848
848
  e2.showError(t3);
849
849
  }, [e2]);
850
850
  return x(Gt, { onError: n2, children: t2 });
@@ -866,7 +866,7 @@ class Zt {
866
866
  }
867
867
  }
868
868
  const Jt = ({ children: t2 }) => {
869
- const e2 = it();
869
+ const e2 = rt();
870
870
  return u(() => {
871
871
  const t3 = new Zt(e2);
872
872
  return () => {
@@ -874,61 +874,61 @@ const Jt = ({ children: t2 }) => {
874
874
  };
875
875
  }, [e2]), x(E, { children: t2 });
876
876
  }, Qt = () => null, te = {}, ee = (t2) => {
877
- const { onPointerDown: e2, style: n2, splitDirection: o2, paddingBefore: i2 = 0, paddingAfter: r2 = 0, disabled: s2, key: l2, hitAreaProps: a2 = te, ...c2 } = t2, h2 = "row" === o2, { style: u2, className: d2, ...p2 } = a2;
878
- return x("div", { style: { ...n2, position: "relative" }, ...c2, children: x("div", { className: T("hit-box", d2), style: { left: (h2 ? -i2 : 0) + "px", width: `calc(100% + ${h2 ? i2 + r2 : 0}px)`, top: (h2 ? 0 : -i2) + "px", height: `calc(100% + ${h2 ? 0 : i2 + r2}px)`, position: "absolute", ...u2 }, onPointerDown: s2 ? void 0 : e2, ...p2 }) }, l2);
879
- }, ne = {}, oe = (t2, e2, n2 = true) => null === t2 ? null : null !== t2.pixels ? n2 ? t2.pixels : e2 - t2.pixels : (n2 ? t2.percent : 100 - t2.percent) / 100 * e2, ie = (t2, e2 = true) => t2?.percent ? `${e2 ? t2.percent : 100 - t2.percent}%` : t2?.pixels ? `${t2.pixels}px` : void 0, re = (t2, e2) => {
877
+ const { onPointerDown: e2, style: n2, splitDirection: o2, paddingBefore: r2 = 0, paddingAfter: i2 = 0, disabled: s2, key: l2, hitAreaProps: a2 = te, ...c2 } = t2, h2 = "row" === o2, { style: u2, className: d2, ...p2 } = a2;
878
+ return x("div", { style: { ...n2, position: "relative" }, ...c2, children: x("div", { className: T("hit-box", d2), style: { left: (h2 ? -r2 : 0) + "px", width: `calc(100% + ${h2 ? r2 + i2 : 0}px)`, top: (h2 ? 0 : -r2) + "px", height: `calc(100% + ${h2 ? 0 : r2 + i2}px)`, position: "absolute", ...u2 }, onPointerDown: s2 ? void 0 : e2, ...p2 }) }, l2);
879
+ }, ne = {}, oe = (t2, e2, n2 = true) => null === t2 ? null : null !== t2.pixels ? n2 ? t2.pixels : e2 - t2.pixels : (n2 ? t2.percent : 100 - t2.percent) / 100 * e2, re = (t2, e2 = true) => t2?.percent ? `${e2 ? t2.percent : 100 - t2.percent}%` : t2?.pixels ? `${t2.pixels}px` : void 0, ie = (t2, e2) => {
880
880
  if (null == t2) return null;
881
881
  const n2 = { percent: null, pixels: null };
882
882
  let o2 = e2;
883
883
  return "string" == typeof t2 && ((t2 = t2.trim().toLowerCase()).endsWith("px") ? (t2 = t2.substring(0, t2.length - 2), o2 = false) : t2.endsWith("%") && (t2 = t2.substring(0, t2.length - 1), o2 = true), t2 = parseFloat(t2)), o2 ? n2.percent = t2 : n2.pixels = t2, Object.freeze(n2);
884
- }, se = p(f((t2, e2) => {
885
- const { elementBefore: n2, elementAfter: o2, splitDirection: i2 = "row", fixedPane: r2 = null, position: s2, onPositionChange: c2, minBefore: p2, maxBefore: f2, minAfter: m2, maxAfter: _2, children: g2, className: y2, style: v2, disabled: w2 = false, onDragStart: b2, onDragResize: E2, onDragFinish: C2, resizerProps: k2 = ne, paneProps: P2 = ne, paneBeforeProps: D2 = ne, paneAfterProps: A2 = ne, createResizer: z2 = ee } = t2;
884
+ }, se = p(m((t2, e2) => {
885
+ const { elementBefore: n2, elementAfter: o2, splitDirection: r2 = "row", fixedPane: i2 = null, position: s2, onPositionChange: c2, minBefore: p2, maxBefore: m2, minAfter: f2, maxAfter: _2, children: g2, className: y2, style: v2, disabled: w2 = false, onDragStart: b2, onDragResize: E2, onDragFinish: C2, resizerProps: k2 = ne, paneProps: P2 = ne, paneBeforeProps: D2 = ne, paneAfterProps: A2 = ne, createResizer: z2 = ee } = t2;
886
886
  if (g2) throw new Error("Use elementBefore and elementAfter instead of children.");
887
887
  const B2 = h(() => l.isValidElement(o2) && l.isValidElement(n2), [o2, n2]), $2 = h(() => {
888
888
  let t3 = null;
889
- r2 && ("before" === r2 ? t3 = 0 : "after" === r2 && (t3 = 1));
889
+ i2 && ("before" === i2 ? t3 = 0 : "after" === i2 && (t3 = 1));
890
890
  const e3 = null === t3;
891
- return { fixedPaneOffset: t3, isPercent: e3, minBefore: re(p2, e3), maxBefore: re(f2, e3), minAfter: re(m2, e3), maxAfter: re(_2, e3) };
892
- }, [p2, f2, m2, _2]), I2 = ht(c2, [c2]), [K2, O2] = d(() => re(s2, null === r2));
891
+ return { fixedPaneOffset: t3, isPercent: e3, minBefore: ie(p2, e3), maxBefore: ie(m2, e3), minAfter: ie(f2, e3), maxAfter: ie(_2, e3) };
892
+ }, [p2, m2, f2, _2]), K2 = ht(c2, [c2]), [O2, I2] = d(() => ie(s2, null === i2));
893
893
  u(() => {
894
- O2(re(s2, null === r2));
895
- }, [s2, r2]);
896
- const [N2, { width: H2, height: R2 }] = M(), [W2, { width: V2, height: F2 }] = M(), j2 = "row" === i2 ? V2 : F2, X2 = "row" === i2 ? H2 : R2, Y2 = h(() => ((t3, e3, n3, o3) => {
897
- const i3 = [null, null], r3 = [null, null];
898
- if (t3 || (t3 = { percent: null === o3.fixedPaneOffset ? 50 : null, pixels: null === o3.fixedPaneOffset ? null : 0 }), 0 === e3) return null != t3?.pixels ? 1 !== o3.fixedPaneOffset ? (i3[0] = t3?.pixels, r3[1] = 100) : (i3[1] = t3?.pixels - n3, r3[0] = 100) : null != t3?.percent && (1 !== o3.fixedPaneOffset ? (r3[0] = t3?.percent, r3[1] = 100 - t3?.percent) : (r3[1] = t3?.percent, r3[0] = 100 - t3?.percent)), { percents: r3, pixels: i3, minBefore: ie(o3.minBefore, true), maxBefore: ie(o3.maxBefore, true), minAfter: ie(o3.minAfter), maxAfter: ie(o3.maxAfter) };
894
+ I2(ie(s2, null === i2));
895
+ }, [s2, i2]);
896
+ const [N2, { width: H2, height: R2 }] = M(), [W2, { width: V2, height: F2 }] = M(), j2 = "row" === r2 ? V2 : F2, X2 = "row" === r2 ? H2 : R2, Y2 = h(() => ((t3, e3, n3, o3) => {
897
+ const r3 = [null, null], i3 = [null, null];
898
+ if (t3 || (t3 = { percent: null === o3.fixedPaneOffset ? 50 : null, pixels: null === o3.fixedPaneOffset ? null : 0 }), 0 === e3) return null != t3?.pixels ? 1 !== o3.fixedPaneOffset ? (r3[0] = t3?.pixels, i3[1] = 100) : (r3[1] = t3?.pixels - n3, i3[0] = 100) : null != t3?.percent && (1 !== o3.fixedPaneOffset ? (i3[0] = t3?.percent, i3[1] = 100 - t3?.percent) : (i3[1] = t3?.percent, i3[0] = 100 - t3?.percent)), { percents: i3, pixels: r3, minBefore: re(o3.minBefore, true), maxBefore: re(o3.maxBefore, true), minAfter: re(o3.minAfter), maxAfter: re(o3.maxAfter) };
899
899
  let s3 = oe(t3, e3, 1 !== o3.fixedPaneOffset), l2 = e3 - n3, a2 = oe(o3.minBefore, l2, true) ?? 0, c3 = oe(o3.maxBefore, l2, true) ?? l2, h2 = 0, u2 = 0, d2 = 0, p3 = l2;
900
- h2 = (oe(o3.maxAfter, e3, false) ?? n3) - n3, u2 = oe(o3.minAfter, e3, false) ?? e3, d2 = Math.max(a2, h2), p3 = Math.min(c3, u2), s3 = Math.max(d2, Math.min(s3, p3)), u2 = Math.min(l2 - s3, oe(o3.maxAfter, l2 - s3, true) ?? l2), h2 = Math.min(l2 - s3, oe(o3.minAfter, l2 - s3, true) ?? l2), i3[0] = s3, i3[1] = l2 - i3[0];
901
- const f3 = Math.max(0, Math.min(100, s3 / l2 * 100));
902
- return r3[0] = f3, r3[1] = 100 - r3[0], { percents: r3, pixels: i3, minBefore: `${a2}px`, minAfter: `${h2}px`, maxBefore: `${i3[0]}px`, maxAfter: `${i3[1]}px` };
903
- })(K2, X2, j2, $2), [$2, K2, X2, j2, i2]), [U2, G2] = d(false), q2 = ht(b2, [b2]), Z2 = ht(E2, [E2]), J2 = ht(C2, [C2]), Q2 = a(null), tt2 = a(null), et2 = a(null), { style: nt2, className: ot2, ...it2 } = P2, rt2 = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...nt2 }, { className: st2, style: lt2, ...at2 } = D2, { className: ct2, style: ut2, ...dt2 } = A2, pt2 = { flex: "1 1 100%", width: "100%", ...v2, flexDirection: i2, display: "flex" }, { className: ft2, style: mt2, onPointerDown: _t2, ...gt2 } = k2, yt2 = ht((t3) => {
904
- const e3 = re(t3, null === r2);
905
- O2(e3);
906
- }, [r2]), vt2 = ht((t3) => {
900
+ h2 = (oe(o3.maxAfter, e3, false) ?? n3) - n3, u2 = oe(o3.minAfter, e3, false) ?? e3, d2 = Math.max(a2, h2), p3 = Math.min(c3, u2), s3 = Math.max(d2, Math.min(s3, p3)), u2 = Math.min(l2 - s3, oe(o3.maxAfter, l2 - s3, true) ?? l2), h2 = Math.min(l2 - s3, oe(o3.minAfter, l2 - s3, true) ?? l2), r3[0] = s3, r3[1] = l2 - r3[0];
901
+ const m3 = Math.max(0, Math.min(100, s3 / l2 * 100));
902
+ return i3[0] = m3, i3[1] = 100 - i3[0], { percents: i3, pixels: r3, minBefore: `${a2}px`, minAfter: `${h2}px`, maxBefore: `${r3[0]}px`, maxAfter: `${r3[1]}px` };
903
+ })(O2, X2, j2, $2), [$2, O2, X2, j2, r2]), [U2, G2] = d(false), q2 = ht(b2, [b2]), Z2 = ht(E2, [E2]), J2 = ht(C2, [C2]), Q2 = a(null), tt2 = a(null), et2 = a(null), { style: nt2, className: ot2, ...rt2 } = P2, it2 = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...nt2 }, { className: st2, style: lt2, ...at2 } = D2, { className: ct2, style: ut2, ...dt2 } = A2, pt2 = { flex: "1 1 100%", width: "100%", ...v2, flexDirection: r2, display: "flex" }, { className: mt2, style: ft2, onPointerDown: _t2, ...gt2 } = k2, yt2 = ht((t3) => {
904
+ const e3 = ie(t3, null === i2);
905
+ I2(e3);
906
+ }, [i2]), vt2 = ht((t3) => {
907
907
  if (w2 || !U2) return;
908
908
  const e3 = xt2.current?.getBoundingClientRect();
909
909
  let n3 = 0;
910
- n3 = "row" === i2 ? (t3.clientX ?? t3.touches?.[0]?.clientX) - e3.x : (t3.clientY ?? t3.touches?.[0]?.clientY) - e3.y, n3 = Math.max(0, Math.min(X2, n3)), 1 === $2.fixedPaneOffset && (n3 = X2 - n3), s2 && K2.pixels === n3 || O2({ pixels: n3, percent: null }), Z2?.(n3), t3.stopPropagation(), t3.preventDefault();
911
- }, [$2, i2, w2, U2, K2, X2]), wt2 = ht((t3) => {
910
+ n3 = "row" === r2 ? (t3.clientX ?? t3.touches?.[0]?.clientX) - e3.x : (t3.clientY ?? t3.touches?.[0]?.clientY) - e3.y, n3 = Math.max(0, Math.min(X2, n3)), 1 === $2.fixedPaneOffset && (n3 = X2 - n3), s2 && O2.pixels === n3 || I2({ pixels: n3, percent: null }), Z2?.(n3), t3.stopPropagation(), t3.preventDefault();
911
+ }, [$2, r2, w2, U2, O2, X2]), wt2 = ht((t3) => {
912
912
  if (document.removeEventListener("pointermove", vt2), document.removeEventListener("touchmove", vt2), document.removeEventListener("pointerup", wt2), !U2) return;
913
- if (G2(false), !K2) return;
914
- J2(K2.pixels);
915
- if (!re(s2, null === r2) || K2.pixels !== s2) {
916
- const t4 = { ...K2 };
917
- null === t4.percent && (t4.percent = t4.pixels / X2 * 100), I2(t4);
913
+ if (G2(false), !O2) return;
914
+ J2(O2.pixels);
915
+ if (!ie(s2, null === i2) || O2.pixels !== s2) {
916
+ const t4 = { ...O2 };
917
+ null === t4.percent && (t4.percent = t4.pixels / X2 * 100), K2(t4);
918
918
  }
919
919
  t3.stopPropagation(), t3.preventDefault();
920
- }, [K2, U2, s2, r2, X2]), bt2 = ht((t3) => {
920
+ }, [O2, U2, s2, i2, X2]), bt2 = ht((t3) => {
921
921
  _t2?.(t3), t3.defaultPrevented || w2 || U2 || (G2(true), q2(), document.addEventListener("pointermove", vt2, { passive: false }), document.addEventListener("touchmove", vt2, { passive: false }), document.addEventListener("pointerup", wt2, { passive: false }));
922
- }, [_t2]), xt2 = Ft(e2, () => ({ setPosition: yt2, isSplitPane: () => true }), []), St2 = h(() => B2 ? z2?.({ key: "resizer", ref: L([W2, tt2]), className: T("resizer", ft2), onPointerDownCapture: bt2, style: { cursor: w2 ? void 0 : "row" === i2 ? "ew-resize" : "ns-resize", minWidth: "row" === i2 ? "2px" : void 0, minHeight: "row" !== i2 ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...mt2 }, splitDirection: i2, disabled: w2, ...gt2 }) : null, [B2, ft2, gt2, i2, mt2, w2]), Et2 = "row" === i2 ? "Width" : "Height", Lt2 = h(() => {
922
+ }, [_t2]), xt2 = Ft(e2, () => ({ setPosition: yt2, isSplitPane: () => true }), []), St2 = h(() => B2 ? z2?.({ key: "resizer", ref: L([W2, tt2]), className: T("resizer", mt2), onPointerDownCapture: bt2, style: { cursor: w2 ? void 0 : "row" === r2 ? "ew-resize" : "ns-resize", minWidth: "row" === r2 ? "2px" : void 0, minHeight: "row" !== r2 ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...ft2 }, splitDirection: r2, disabled: w2, ...gt2 }) : null, [B2, mt2, gt2, r2, ft2, w2]), Et2 = "row" === r2 ? "Width" : "Height", Lt2 = h(() => {
923
923
  if (!n2) return null;
924
- const t3 = { ...rt2, ...lt2, flex: 0 === $2.fixedPaneOffset && null !== Y2?.pixels[0] ? `0 0 ${Math.round(Y2?.pixels[0])}px` : `1 1 ${Math.round(Y2?.percents[0] ?? 100)}%`, [`min${Et2}`]: Y2?.minBefore, [`max${Et2}`]: o2 ? Y2?.maxBefore : "100%" };
925
- return x("div", { ref: Q2, className: T("before", ot2, st2), style: t3, ...it2, ...at2, children: n2 }, "before");
924
+ const t3 = { ...it2, ...lt2, flex: 0 === $2.fixedPaneOffset && null !== Y2?.pixels[0] ? `0 0 ${Math.round(Y2?.pixels[0])}px` : `1 1 ${Math.round(Y2?.percents[0] ?? 100)}%`, [`min${Et2}`]: Y2?.minBefore, [`max${Et2}`]: o2 ? Y2?.maxBefore : "100%" };
925
+ return x("div", { ref: Q2, className: T("before", ot2, st2), style: t3, ...rt2, ...at2, children: n2 }, "before");
926
926
  }, [n2, P2, D2, $2, Y2]), Mt2 = h(() => {
927
927
  if (!o2) return null;
928
- const t3 = { ...rt2, ...ut2, flex: 1 === $2.fixedPaneOffset && null !== Y2?.pixels[1] ? `0 0 ${Math.round(Y2?.pixels[1])}px` : `1 1 ${Math.round(Y2?.percents[1] ?? 100)}%`, [`min${Et2}`]: Y2?.minAfter, [`max${Et2}`]: n2 ? Y2?.maxAfter : "100%" };
929
- return x("div", { ref: et2, className: T("after", ot2, ct2), style: t3, ...it2, ...dt2, children: o2 }, "after");
928
+ const t3 = { ...it2, ...ut2, flex: 1 === $2.fixedPaneOffset && null !== Y2?.pixels[1] ? `0 0 ${Math.round(Y2?.pixels[1])}px` : `1 1 ${Math.round(Y2?.percents[1] ?? 100)}%`, [`min${Et2}`]: Y2?.minAfter, [`max${Et2}`]: n2 ? Y2?.maxAfter : "100%" };
929
+ return x("div", { ref: et2, className: T("after", ot2, ct2), style: t3, ...rt2, ...dt2, children: o2 }, "after");
930
930
  }, [o2, P2, A2, $2, Y2]);
931
- return S("div", { ref: L([N2, xt2]), className: T("splitPane", "row" === i2 ? "vertical" : "horizontal", { dragging: U2 }, y2), style: pt2, children: [Lt2, St2, Mt2] });
931
+ return S("div", { ref: L([N2, xt2]), className: T("splitPane", "row" === r2 ? "vertical" : "horizontal", { dragging: U2 }, y2), style: pt2, children: [Lt2, St2, Mt2] });
932
932
  }));
933
933
  function le(t2) {
934
934
  if ("function" == typeof t2) return t2;
@@ -1009,14 +1009,14 @@ function ce(t2) {
1009
1009
  function he(t2) {
1010
1010
  try {
1011
1011
  if ("undefined" != typeof DOMParser) {
1012
- const e3 = new DOMParser().parseFromString(t2, "image/svg+xml"), n3 = e3.querySelector("svg"), o3 = n3?.getAttribute("viewBox") ?? void 0, i3 = [];
1012
+ const e3 = new DOMParser().parseFromString(t2, "image/svg+xml"), n3 = e3.querySelector("svg"), o3 = n3?.getAttribute("viewBox") ?? void 0, r3 = [];
1013
1013
  return e3.querySelectorAll("path").forEach((t3) => {
1014
1014
  const e4 = t3.getAttribute("d");
1015
1015
  if (!e4) return;
1016
1016
  const n4 = { d: e4 }, o4 = t3.getAttribute("class");
1017
1017
  o4 && (n4.className = o4);
1018
- const r3 = t3.getAttribute("fill");
1019
- r3 && "none" !== r3 && (n4.fill = r3);
1018
+ const i3 = t3.getAttribute("fill");
1019
+ i3 && "none" !== i3 && (n4.fill = i3);
1020
1020
  const s2 = t3.getAttribute("stroke");
1021
1021
  s2 && (n4.stroke = s2);
1022
1022
  const l2 = t3.getAttribute("opacity");
@@ -1024,14 +1024,14 @@ function he(t2) {
1024
1024
  const a2 = t3.getAttribute("fill-rule");
1025
1025
  a2 && (n4.fillRule = a2);
1026
1026
  const c2 = t3.getAttribute("clip-rule");
1027
- c2 && (n4.clipRule = c2), i3.push(n4);
1028
- }), { viewBox: o3, paths: i3 };
1027
+ c2 && (n4.clipRule = c2), r3.push(n4);
1028
+ }), { viewBox: o3, paths: r3 };
1029
1029
  }
1030
1030
  } catch {
1031
1031
  }
1032
- const e2 = t2.match(/viewBox="([^"]+)"/i), n2 = e2 ? e2[1] : void 0, o2 = [], i2 = /<path\b[^>]*\sd="([^"]+)"[^>]*>/gi;
1033
- let r2;
1034
- for (; r2 = i2.exec(t2); ) o2.push({ d: r2[1] });
1032
+ const e2 = t2.match(/viewBox="([^"]+)"/i), n2 = e2 ? e2[1] : void 0, o2 = [], r2 = /<path\b[^>]*\sd="([^"]+)"[^>]*>/gi;
1033
+ let i2;
1034
+ for (; i2 = r2.exec(t2); ) o2.push({ d: i2[1] });
1035
1035
  return { viewBox: n2, paths: o2 };
1036
1036
  }
1037
1037
  function ue(t2) {
@@ -1039,10 +1039,10 @@ function ue(t2) {
1039
1039
  for (const [n3, o3] of Object.entries(t2.icons)) e2[n3] = ce(o3);
1040
1040
  const n2 = { label: t2.meta?.label ?? "Unnamed", version: t2.meta?.version ?? "1.0.0", license: t2.meta?.license ?? "MIT", defaultViewBox: "0 0 24 24", extends: t2.meta?.extends ?? [] };
1041
1041
  n2.extends.includes("base") || n2.extends.push("base");
1042
- const o2 = { meta: n2, icons: e2 }, i2 = t2.overrides;
1043
- if (i2) {
1042
+ const o2 = { meta: n2, icons: e2 }, r2 = t2.overrides;
1043
+ if (r2) {
1044
1044
  const t3 = {};
1045
- for (const [e3, n3] of Object.entries(i2)) {
1045
+ for (const [e3, n3] of Object.entries(r2)) {
1046
1046
  const o3 = {};
1047
1047
  for (const [t4, e4] of Object.entries(n3)) o3[t4] = ce(e4);
1048
1048
  t3[e3] = o3;
@@ -1054,7 +1054,7 @@ function ue(t2) {
1054
1054
  function de() {
1055
1055
  const t2 = /* @__PURE__ */ new Map(), e2 = /* @__PURE__ */ new Map();
1056
1056
  let n2 = "base", o2 = /* @__PURE__ */ new Map();
1057
- async function i2(e3) {
1057
+ async function r2(e3) {
1058
1058
  const o3 = t2.get(e3 ?? n2);
1059
1059
  if (!o3) throw new Error(`Icon pack not registered: ${e3}`);
1060
1060
  if (!o3.pack) {
@@ -1070,25 +1070,25 @@ function de() {
1070
1070
  await o3.loading;
1071
1071
  }
1072
1072
  }
1073
- function r2(t3) {
1073
+ function i2(t3) {
1074
1074
  const e3 = t3.indexOf(":");
1075
1075
  return e3 > 0 ? { ns: t3.slice(0, e3), key: t3.slice(e3 + 1) } : { key: t3 };
1076
1076
  }
1077
1077
  function s2(n3, o3) {
1078
- const i3 = [n3, ...t2.get(n3)?.pack?.meta.extends ?? []];
1079
- for (const n4 of i3) {
1080
- const i4 = t2.get(n4);
1081
- if (!i4?.pack) continue;
1082
- const { icons: r3 } = i4.pack, s3 = r3[e2.get(n4)?.get(o3) ?? o3] ?? r3[o3];
1083
- if (s3) return { glyph: s3, pack: i4.pack, packKey: n4 };
1078
+ const r3 = [n3, ...t2.get(n3)?.pack?.meta.extends ?? []];
1079
+ for (const n4 of r3) {
1080
+ const r4 = t2.get(n4);
1081
+ if (!r4?.pack) continue;
1082
+ const { icons: i3 } = r4.pack, s3 = i3[e2.get(n4)?.get(o3) ?? o3] ?? i3[o3];
1083
+ if (s3) return { glyph: s3, pack: r4.pack, packKey: n4 };
1084
1084
  }
1085
1085
  return null;
1086
1086
  }
1087
1087
  function l2(e3, o3) {
1088
- const i3 = o3?.packKey ?? n2;
1088
+ const r3 = o3?.packKey ?? n2;
1089
1089
  if (o3?.packKey) return s2(o3.packKey, e3);
1090
1090
  if (!e3) return null;
1091
- const { ns: l3, key: a2 } = r2(e3);
1091
+ const { ns: l3, key: a2 } = i2(e3);
1092
1092
  if (l3) {
1093
1093
  const e4 = t2.get(l3)?.pack;
1094
1094
  if (e4) {
@@ -1101,14 +1101,14 @@ function de() {
1101
1101
  }
1102
1102
  return null;
1103
1103
  }
1104
- return s2(i3, e3);
1104
+ return s2(r3, e3);
1105
1105
  }
1106
1106
  return { register: function(e3, o3) {
1107
- const i3 = t2.get(e3) ?? {};
1108
- "function" == typeof o3 ? i3.loader = o3 : i3.pack = ue(o3), t2.set(e3, i3), n2 || (n2 = e3);
1107
+ const r3 = t2.get(e3) ?? {};
1108
+ "function" == typeof o3 ? r3.loader = o3 : r3.pack = ue(o3), t2.set(e3, r3), n2 || (n2 = e3);
1109
1109
  }, prefetch: async function(t3 = n2) {
1110
1110
  const e3 = Array.isArray(t3) ? t3 : [t3];
1111
- await Promise.all(e3.map(i2));
1111
+ await Promise.all(e3.map(r2));
1112
1112
  }, setActive: function(t3) {
1113
1113
  n2 = t3;
1114
1114
  for (const e3 of o2.keys()) try {
@@ -1120,19 +1120,19 @@ function de() {
1120
1120
  }, resolve: async function(e3, o3) {
1121
1121
  let s3 = l2(e3, o3);
1122
1122
  if (s3) return s3;
1123
- const a2 = o3?.packKey ?? n2, { ns: c2 } = r2(e3);
1123
+ const a2 = o3?.packKey ?? n2, { ns: c2 } = i2(e3);
1124
1124
  if (o3?.packKey) {
1125
- if (await i2(a2), s3 = l2(e3, o3), s3) return s3;
1125
+ if (await r2(a2), s3 = l2(e3, o3), s3) return s3;
1126
1126
  const n3 = t2.get(a2)?.pack?.meta?.extends ?? [];
1127
- if (n3.length && (await Promise.all(n3.map(i2)), s3 = l2(e3, o3), s3)) return s3;
1127
+ if (n3.length && (await Promise.all(n3.map(r2)), s3 = l2(e3, o3), s3)) return s3;
1128
1128
  } else if (c2) {
1129
- if (await i2(c2), s3 = l2(e3, o3), s3) return s3;
1129
+ if (await r2(c2), s3 = l2(e3, o3), s3) return s3;
1130
1130
  const n3 = t2.get(c2)?.pack?.meta?.extends ?? [];
1131
- if (n3.length && (await Promise.all(n3.map(i2)), s3 = l2(e3, o3), s3)) return s3;
1131
+ if (n3.length && (await Promise.all(n3.map(r2)), s3 = l2(e3, o3), s3)) return s3;
1132
1132
  } else {
1133
- if (await i2(a2), s3 = l2(e3, o3), s3) return s3;
1133
+ if (await r2(a2), s3 = l2(e3, o3), s3) return s3;
1134
1134
  const n3 = t2.get(a2)?.pack?.meta?.extends ?? [];
1135
- if (n3.length && (await Promise.all(n3.map(i2)), s3 = l2(e3, o3), s3)) return s3;
1135
+ if (n3.length && (await Promise.all(n3.map(r2)), s3 = l2(e3, o3), s3)) return s3;
1136
1136
  }
1137
1137
  return null;
1138
1138
  }, registerAlias: function(t3, n3, o3) {
@@ -1159,52 +1159,52 @@ function de() {
1159
1159
  }
1160
1160
  se.displayName = "SplitPane";
1161
1161
  const pe = de();
1162
- pe.register("base", () => import("./Cy9MGJ5ivkJxyauG.mjs"));
1163
- const fe = (t2) => x("svg", { ...t2, children: x("path", {}) }), me = { Icon: "_Icon_17dpm_10" }, _e = p((e2) => {
1164
- const { iconKey: n2, packKey: o2, className: i2, style: r2, role: s2, title: a2, size: c2, ariaHidden: u2, sourceProps: d2, children: p2, ...f2 } = e2, [m2, _2] = l.useState(null);
1162
+ pe.register("base", () => import("./C_7-Y_1zhHsxTW9L.mjs"));
1163
+ const me = (t2) => x("svg", { ...t2, children: x("path", {}) }), fe = { Icon: "_Icon_17dpm_10" }, _e = p((e2) => {
1164
+ const { iconKey: n2, packKey: o2, className: r2, style: i2, role: s2, title: a2, size: c2, ariaHidden: u2, sourceProps: d2, children: p2, ...m2 } = e2, [f2, _2] = l.useState(null);
1165
1165
  l.useEffect(() => {
1166
- let e3 = true, i3 = o2, r3 = n2;
1167
- if (!r3) {
1168
- const e4 = pe.getPack(i3);
1169
- return void _2({ glyph: e4 ? { svg: t.EmptyArray } : void 0, pack: e4 ?? void 0, packKey: i3 ?? pe.getActive() });
1166
+ let e3 = true, r3 = o2, i3 = n2;
1167
+ if (!i3) {
1168
+ const e4 = pe.getPack(r3);
1169
+ return void _2({ glyph: e4 ? { svg: t.EmptyArray } : void 0, pack: e4 ?? void 0, packKey: r3 ?? pe.getActive() });
1170
1170
  }
1171
- if (r3.includes(":")) {
1172
- const [t2, e4] = r3.split(":");
1173
- i3 = t2, r3 = e4;
1171
+ if (i3.includes(":")) {
1172
+ const [t2, e4] = i3.split(":");
1173
+ r3 = t2, i3 = e4;
1174
1174
  }
1175
- return pe.resolve(r3, { packKey: i3 }).then((t2) => {
1175
+ return pe.resolve(i3, { packKey: r3 }).then((t2) => {
1176
1176
  e3 && _2(t2);
1177
1177
  }), () => {
1178
1178
  e3 = false;
1179
1179
  };
1180
1180
  }, [n2, o2]);
1181
- const g2 = m2?.pack, y2 = m2?.glyph, v2 = m2?.packKey;
1181
+ const g2 = f2?.pack, y2 = f2?.glyph, v2 = f2?.packKey;
1182
1182
  let w2 = y2 ? y2.svg : void 0;
1183
- const b2 = y2 && !w2 ? y2.url : void 0, S2 = !y2 || w2 || b2 ? void 0 : y2.emoji, E2 = null != c2 ? "number" == typeof c2 ? `${c2}px` : c2 : void 0, L2 = h(() => [me.Icon, "icon", i2].filter(Boolean).join(" "), [i2]), M2 = h(() => {
1184
- const t2 = { ...r2 };
1183
+ const b2 = y2 && !w2 ? y2.url : void 0, S2 = !y2 || w2 || b2 ? void 0 : y2.emoji, E2 = null != c2 ? "number" == typeof c2 ? `${c2}px` : c2 : void 0, L2 = h(() => [fe.Icon, "icon", r2].filter(Boolean).join(" "), [r2]), M2 = h(() => {
1184
+ const t2 = { ...i2 };
1185
1185
  return t2["--icon-size"] = E2, t2;
1186
- }, [r2, E2]), T2 = s2 ?? (a2 ? "img" : "presentation"), C2 = u2 ?? (!a2 || void 0), k2 = (t2) => x("span", { className: L2, style: M2, role: T2, "aria-hidden": C2, title: a2, "data-icon-glyph": n2, "data-icon-pack": v2, ...f2, children: t2 });
1186
+ }, [i2, E2]), T2 = s2 ?? (a2 ? "img" : "presentation"), C2 = u2 ?? (!a2 || void 0), k2 = (t2) => x("span", { className: L2, style: M2, role: T2, "aria-hidden": C2, title: a2, "data-icon-glyph": n2, "data-icon-pack": v2, ...m2, children: t2 });
1187
1187
  if (p2) return k2(p2);
1188
1188
  if (S2) return k2(x("span", { children: "string" == typeof S2 ? S2 : S2.text }));
1189
1189
  if (b2) return k2(x("img", { src: b2.src, alt: a2 ?? "" }));
1190
1190
  if (y2 && "react" in y2) {
1191
- const t2 = y2.react, e3 = { className: L2, style: M2, role: T2, "aria-hidden": C2, title: a2, ...f2, ...d2 };
1191
+ const t2 = y2.react, e3 = { className: L2, style: M2, role: T2, "aria-hidden": C2, title: a2, ...m2, ...d2 };
1192
1192
  return k2(x(t2, { ...e3 }));
1193
1193
  }
1194
1194
  const P2 = { viewBox: w2?.viewBox ?? g2?.meta.defaultViewBox ?? "0 0 24 24" };
1195
1195
  if ("function" == typeof w2) {
1196
- return k2(w2(P2) ?? x(fe, { ...P2 }));
1196
+ return k2(w2(P2) ?? x(me, { ...P2 }));
1197
1197
  }
1198
- if (!w2) return k2(x(fe, { ...P2 }));
1198
+ if (!w2) return k2(x(me, { ...P2 }));
1199
1199
  const D2 = w2.paths;
1200
1200
  return k2(x("svg", { ...P2, children: D2 ? D2.map((t2, e3) => x("path", { d: t2.d, className: t2.className, fill: t2.fill, stroke: t2.stroke, opacity: t2.opacity, fillRule: t2.fillRule, clipRule: t2.clipRule }, e3)) : null }));
1201
1201
  });
1202
1202
  function ge(t2) {
1203
- const { isWalking: e2 = false, themedType: n2 = "info", speed: o2 = 120, dashGap: i2 = 3, dashLength: r2 = 5, iconKey: s2, packKey: l2, style: a2, className: c2, ...u2 } = t2, d2 = h(() => {
1203
+ const { isWalking: e2 = false, themedType: n2 = "info", speed: o2 = 120, dashGap: r2 = 3, dashLength: i2 = 5, iconKey: s2, packKey: l2, style: a2, className: c2, ...u2 } = t2, d2 = h(() => {
1204
1204
  if (!e2) return;
1205
- const t3 = { "--walk-duration": `${o2 * (i2 + r2)}ms`, "--walk-dash-length": `${r2}px`, "--walk-dash-gap": `${i2}px` };
1205
+ const t3 = { "--walk-duration": `${o2 * (r2 + i2)}ms`, "--walk-dash-length": `${i2}px`, "--walk-dash-gap": `${r2}px` };
1206
1206
  return n2 && "accent" !== n2 && (t3["--icon-accent"] = `var(--icon-${n2})`), t3;
1207
- }, [e2, o2, i2, r2, n2]), p2 = h(() => e2 ? c2 + " walking" : c2, [e2, c2]);
1207
+ }, [e2, o2, r2, i2, n2]), p2 = h(() => e2 ? c2 + " walking" : c2, [e2, c2]);
1208
1208
  return x(_e, { iconKey: s2, packKey: l2, className: p2, style: { ...a2, ...d2 }, ...u2 });
1209
1209
  }
1210
1210
  class ye {
@@ -1225,10 +1225,10 @@ const ve = _(null), we = { parse: (t2) => t2 ? JSON.parse(t2) : null, stringify:
1225
1225
  }, subscribeKey: () => () => {
1226
1226
  } };
1227
1227
  function xe(t2, e2, n2 = Se) {
1228
- const { store: o2, namespace: i2, serializer: r2, debounceMs: s2, subscribeKey: l2 } = g(ve) || be, c2 = n2.serializer ?? r2 ?? we, p2 = h(() => `${i2}:${t2}`, [i2, t2]), f2 = a(null), m2 = `${p2}::v`, [_2, y2] = d(() => {
1228
+ const { store: o2, namespace: r2, serializer: i2, debounceMs: s2, subscribeKey: l2 } = g(ve) || be, c2 = n2.serializer ?? i2 ?? we, p2 = h(() => `${r2}:${t2}`, [r2, t2]), m2 = a(null), f2 = `${p2}::v`, [_2, y2] = d(() => {
1229
1229
  let t3;
1230
1230
  try {
1231
- if ("undefined" != typeof window && "localStorage" in window && p2.startsWith(i2)) {
1231
+ if ("undefined" != typeof window && "localStorage" in window && p2.startsWith(r2)) {
1232
1232
  const e3 = window.localStorage?.getItem(p2) ?? null;
1233
1233
  null != e3 && (t3 = c2.parse(e3));
1234
1234
  }
@@ -1243,25 +1243,25 @@ function xe(t2, e2, n2 = Se) {
1243
1243
  u(() => {
1244
1244
  let t3 = true;
1245
1245
  return (async () => {
1246
- const [i3, r3] = await Promise.all([o2.getItem(p2), o2.getItem(m2)]);
1246
+ const [r3, i3] = await Promise.all([o2.getItem(p2), o2.getItem(f2)]);
1247
1247
  let s3;
1248
1248
  try {
1249
- s3 = null == i3 ? void 0 : c2.parse(i3);
1249
+ s3 = null == r3 ? void 0 : c2.parse(r3);
1250
1250
  } catch {
1251
1251
  }
1252
- const l3 = null == r3 ? void 0 : Number.parseInt(r3, 10);
1252
+ const l3 = null == i3 ? void 0 : Number.parseInt(i3, 10);
1253
1253
  if (void 0 === s3) {
1254
1254
  if (!n2.lazy && void 0 !== e2) {
1255
- s3 = "function" == typeof e2 ? e2() : e2, await o2.setItem(p2, c2.stringify(s3)), null != n2.version && await o2.setItem(m2, String(n2.version));
1255
+ s3 = "function" == typeof e2 ? e2() : e2, await o2.setItem(p2, c2.stringify(s3)), null != n2.version && await o2.setItem(f2, String(n2.version));
1256
1256
  }
1257
1257
  } else if (null != n2.version && void 0 !== l3 && l3 !== n2.version && n2.migrate) {
1258
- s3 = n2.migrate(s3, l3), await o2.setItem(p2, c2.stringify(s3)), await o2.setItem(m2, String(n2.version));
1258
+ s3 = n2.migrate(s3, l3), await o2.setItem(p2, c2.stringify(s3)), await o2.setItem(f2, String(n2.version));
1259
1259
  }
1260
1260
  t3 && void 0 !== s3 && y2(s3);
1261
1261
  })(), () => {
1262
1262
  t3 = false;
1263
1263
  };
1264
- }, [o2, p2, m2, n2.version, n2.migrate, n2.lazy]), u(() => l2(t2, async () => {
1264
+ }, [o2, p2, f2, n2.version, n2.migrate, n2.lazy]), u(() => l2(t2, async () => {
1265
1265
  const t3 = await o2.getItem(p2);
1266
1266
  if (null != t3) try {
1267
1267
  y2(c2.parse(t3));
@@ -1269,17 +1269,17 @@ function xe(t2, e2, n2 = Se) {
1269
1269
  }
1270
1270
  }), [o2, p2, l2, t2]);
1271
1271
  const v2 = async (t3) => {
1272
- await o2.setItem(p2, c2.stringify(t3)), null != n2.version && await o2.setItem(m2, String(n2.version));
1272
+ await o2.setItem(p2, c2.stringify(t3)), null != n2.version && await o2.setItem(f2, String(n2.version));
1273
1273
  };
1274
1274
  return [_2, (t3) => {
1275
1275
  y2((e3) => {
1276
1276
  const n3 = "function" == typeof t3 ? t3(e3) : t3;
1277
- return f2.current && clearTimeout(f2.current), s2 > 0 ? f2.current = setTimeout(() => {
1277
+ return m2.current && clearTimeout(m2.current), s2 > 0 ? m2.current = setTimeout(() => {
1278
1278
  v2(n3);
1279
1279
  }, s2) : v2(n3), n3;
1280
1280
  });
1281
1281
  }, () => {
1282
- if (f2.current && clearTimeout(f2.current), o2.removeItem(p2), o2.removeItem(m2), void 0 !== e2) {
1282
+ if (m2.current && clearTimeout(m2.current), o2.removeItem(p2), o2.removeItem(f2), void 0 !== e2) {
1283
1283
  const t3 = "function" == typeof e2 ? e2() : e2;
1284
1284
  y2(t3);
1285
1285
  } else y2(void 0);
@@ -1287,7 +1287,7 @@ function xe(t2, e2, n2 = Se) {
1287
1287
  }
1288
1288
  const Se = {};
1289
1289
  function Ee(t2) {
1290
- const { store: e2, namespace: n2 = "", serializer: o2 = Le, debounceMs: i2 = 0, crossTabSync: r2 = true, children: s2 } = t2, l2 = h(() => "undefined" == typeof window ? new ye() : e2 ?? new ye(), [e2]), c2 = a(/* @__PURE__ */ new Map()), d2 = h(() => ({ store: l2, namespace: n2, serializer: o2, debounceMs: i2, crossTabSync: r2, notify(t3) {
1290
+ const { store: e2, namespace: n2 = "", serializer: o2 = Le, debounceMs: r2 = 0, crossTabSync: i2 = true, children: s2 } = t2, l2 = h(() => "undefined" == typeof window ? new ye() : e2 ?? new ye(), [e2]), c2 = a(/* @__PURE__ */ new Map()), d2 = h(() => ({ store: l2, namespace: n2, serializer: o2, debounceMs: r2, crossTabSync: i2, notify(t3) {
1291
1291
  const e3 = c2.current.get(t3);
1292
1292
  e3 && e3.forEach((t4) => t4());
1293
1293
  }, subscribeKey(t3, e3) {
@@ -1296,7 +1296,7 @@ function Ee(t2) {
1296
1296
  const o4 = n3.get(t3);
1297
1297
  o4 && (o4.delete(e3), 0 === o4.size && n3.delete(t3));
1298
1298
  };
1299
- } }), [l2, n2, o2, i2, r2]);
1299
+ } }), [l2, n2, o2, r2, i2]);
1300
1300
  return u(() => {
1301
1301
  if (d2.crossTabSync && d2.store.subscribe) return d2.store.subscribe((t3) => {
1302
1302
  if (!t3.startsWith(d2.namespace + ":")) return;
@@ -1336,99 +1336,105 @@ class Me {
1336
1336
  return window.addEventListener("storage", e2), () => window.removeEventListener("storage", e2);
1337
1337
  }
1338
1338
  }
1339
- const Te = { Horizontal: "horizontal", Vertical: "vertical" }, Ce = { scrollbar: "_scrollbar_15caq_24", track: "_track_15caq_34", thumb: "_thumb_15caq_46", "scrollbar-button": "_scrollbar-button_15caq_86", "touch-thumb": "_touch-thumb_15caq_121" }, ke = "M 5.4951012,0.62494002 7.1746358,3.4734472 8.8557603,6.3226744 c 0.13425,0.2277477 0.18228,0.4945506 0.1356,0.7535218 -0.04665,0.2589712 -0.18504,0.4935661 -0.3908099,0.6625402 C 8.3948254,7.9076371 8.1348905,8.0001761 7.8664506,7.9999997 H 1.1503225 c -0.30278993,0 -0.59312985,-0.117841 -0.80720983,-0.3275159 -0.2140799,-0.2097042 -0.3343649,-0.4941244 -0.3343649,-0.7907107 -4.5e-4,-0.1955399 0.05205,-0.3876855 0.152205,-0.55688 L 1.8390472,3.4734031 3.5178618,0.62488125 C 3.7217717,0.27898385 4.0986166,0.0658413 4.5064365,0.0658413 c 0.4078199,0 0.7846648,0.21314255 0.9885747,0.55903995 z", Pe = "M 0.6632643,3.5136438 3.5117715,1.8341092 6.3609987,0.15298466 c 0.2277477,-0.13425 0.4945506,-0.18228 0.7535218,-0.1356 0.2589712,0.04665 0.4935661,0.18504 0.6625402,0.3908099 0.1689007,0.205725 0.2614397,0.4656599 0.2612633,0.73409984 v 6.7161281 c 0,0.3027899 -0.117841,0.5931298 -0.3275159,0.8072098 -0.2097042,0.2140799 -0.4941244,0.3343649 -0.7907107,0.3343649 -0.1955399,4.5e-4 -0.3876855,-0.05205 -0.55688,-0.152205 L 3.5117274,7.1696978 0.6632056,5.4908832 C 0.31730817,5.2869733 0.10416562,4.9101284 0.10416562,4.5023085 c 0,-0.4078199 0.21314255,-0.7846648 0.55903998,-0.9885747 z", De = { transform: "rotate(180deg)" }, Ae = (t2) => {
1340
- const { style: e2, orientation: n2 = Te.Vertical, disabled: o2, ...i2 } = t2, r2 = n2 === Te.Vertical ? ke : Pe;
1341
- return x("button", { style: e2, className: T(Ce["scrollbar-button"], n2, "scroll-button"), disabled: o2, ...i2, children: x("svg", { width: "9", height: "9", viewBox: "0 0 9 9", children: x("path", { d: r2 }) }) });
1339
+ const Te = { Horizontal: "horizontal", Vertical: "vertical" }, Ce = { scrollbar: "_scrollbar_gqxsx_24", track: "_track_gqxsx_35", thumb: "_thumb_gqxsx_47", "scrollbar-button": "_scrollbar-button_gqxsx_89", "touch-thumb": "_touch-thumb_gqxsx_124" }, ke = "M 5.4951012,0.62494002 7.1746358,3.4734472 8.8557603,6.3226744 c 0.13425,0.2277477 0.18228,0.4945506 0.1356,0.7535218 -0.04665,0.2589712 -0.18504,0.4935661 -0.3908099,0.6625402 C 8.3948254,7.9076371 8.1348905,8.0001761 7.8664506,7.9999997 H 1.1503225 c -0.30278993,0 -0.59312985,-0.117841 -0.80720983,-0.3275159 -0.2140799,-0.2097042 -0.3343649,-0.4941244 -0.3343649,-0.7907107 -4.5e-4,-0.1955399 0.05205,-0.3876855 0.152205,-0.55688 L 1.8390472,3.4734031 3.5178618,0.62488125 C 3.7217717,0.27898385 4.0986166,0.0658413 4.5064365,0.0658413 c 0.4078199,0 0.7846648,0.21314255 0.9885747,0.55903995 z", Pe = "M 0.6632643,3.5136438 3.5117715,1.8341092 6.3609987,0.15298466 c 0.2277477,-0.13425 0.4945506,-0.18228 0.7535218,-0.1356 0.2589712,0.04665 0.4935661,0.18504 0.6625402,0.3908099 0.1689007,0.205725 0.2614397,0.4656599 0.2612633,0.73409984 v 6.7161281 c 0,0.3027899 -0.117841,0.5931298 -0.3275159,0.8072098 -0.2097042,0.2140799 -0.4941244,0.3343649 -0.7907107,0.3343649 -0.1955399,4.5e-4 -0.3876855,-0.05205 -0.55688,-0.152205 L 3.5117274,7.1696978 0.6632056,5.4908832 C 0.31730817,5.2869733 0.10416562,4.9101284 0.10416562,4.5023085 c 0,-0.4078199 0.21314255,-0.7846648 0.55903998,-0.9885747 z", De = { transform: "rotate(180deg)" }, Ae = (t2) => {
1340
+ const { style: e2, orientation: n2 = Te.Vertical, disabled: o2, ...r2 } = t2, i2 = n2 === Te.Vertical ? ke : Pe;
1341
+ return x("button", { style: e2, className: T(Ce["scrollbar-button"], n2, "scroll-button"), disabled: o2, ...r2, children: x("svg", { width: "9", height: "9", viewBox: "0 0 9 9", children: x("path", { d: i2 }) }) });
1342
1342
  }, ze = (t2) => {
1343
- const { style: e2, orientation: n2 = Te.Vertical, disabled: o2, ...i2 } = t2, r2 = n2 === Te.Vertical ? ke : Pe;
1344
- return x("button", { style: e2, className: T(Ce["scrollbar-button"], n2, "scroll-button"), disabled: o2, ...i2, children: x("svg", { width: "9", height: "9", viewBox: "0 0 9 9", style: De, children: x("path", { d: r2 }) }) });
1343
+ const { style: e2, orientation: n2 = Te.Vertical, disabled: o2, ...r2 } = t2, i2 = n2 === Te.Vertical ? ke : Pe;
1344
+ return x("button", { style: e2, className: T(Ce["scrollbar-button"], n2, "scroll-button"), disabled: o2, ...r2, children: x("svg", { width: "9", height: "9", viewBox: "0 0 9 9", style: De, children: x("path", { d: i2 }) }) });
1345
1345
  }, Be = (t2) => {
1346
- const { style: e2, orientation: n2 = Te.Vertical, ...o2 } = t2, i2 = n2 === Te.Vertical;
1347
- return x("div", { style: { display: "flex", justifyContent: "center", alignItems: "end", transition: "fill-opacity 1s", zIndex: 1, width: "24px", height: "24px", ...e2 }, className: `scrollbar-button ${i2 ? "vertical" : "horizontal"} edge`, ...o2, children: x("svg", { width: "24", height: "24", viewBox: "0 0 24 24", transform: i2 ? "rotate(90) " : "", children: x("path", { style: { transition: "opacity 240ms ease 0s", opacity: t2.disabled ? 0 : 1 }, d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }) }) });
1348
- }, $e = N().supportsTouchEvents, Ie = p(f((t2, e2) => {
1349
- const { borderColor: n2 = "var(--sxl-app-color-primary, rgb(33, 115, 70))", backgroundColor: o2 = "var(--sxl-app-color-background, white)", fillColor: i2 = "var(--sxl-app-color-grey, grey)", borderWidth: r2 = 3, size: s2 = 22, style: l2, className: c2, onPointerDown: p2, onPointerMove: f2, onPointerUp: m2, orientation: _2 = Te.Vertical, offset: g2 = 0, currentTouchAnchor: y2, elementParent: v2, elementRoot: w2, key: b2, ...M2 } = t2;
1346
+ const { style: e2, orientation: n2 = Te.Vertical, ...o2 } = t2, r2 = n2 === Te.Vertical;
1347
+ return x("div", { style: { display: "flex", justifyContent: "center", alignItems: "end", transition: "fill-opacity 1s", zIndex: 1, width: "24px", height: "24px", ...e2 }, className: `scrollbar-button ${r2 ? "vertical" : "horizontal"} edge`, ...o2, children: x("svg", { width: "24", height: "24", viewBox: "0 0 24 24", transform: r2 ? "rotate(90) " : "", children: x("path", { style: { transition: "opacity 240ms ease 0s", opacity: t2.disabled ? 0 : 1 }, d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }) }) });
1348
+ }, $e = N().supportsTouchEvents, Ke = p(m((t2, e2) => {
1349
+ const { borderColor: n2 = "var(--sxl-app-color-primary, rgb(33, 115, 70))", backgroundColor: o2 = "var(--sxl-app-color-background, white)", fillColor: r2 = "var(--sxl-app-color-grey, grey)", borderWidth: i2 = 3, size: s2 = 22, style: l2, className: c2, onPointerDown: p2, onPointerMove: m2, onPointerUp: f2, orientation: _2 = Te.Vertical, offset: g2 = 0, currentTouchAnchor: y2, elementParent: v2, elementRoot: w2, key: b2, ...M2 } = t2;
1350
1350
  if (!$e) return null;
1351
- const C2 = ht(p2, [p2]), k2 = ht(f2, [f2]), D2 = ht(m2, [m2]), A2 = _2 === Te.Vertical, [z2, B2] = d(false), $2 = _t(h(() => ({ processTouch: true, consumeTouch: true, onPointerDown: (t3, e3) => {
1351
+ const C2 = ht(p2, [p2]), k2 = ht(m2, [m2]), D2 = ht(f2, [f2]), A2 = _2 === Te.Vertical, [z2, B2] = d(false), $2 = _t(h(() => ({ processTouch: true, consumeTouch: true, onPointerDown: (t3, e3) => {
1352
1352
  B2(true), C2?.(t3), t3.preventDefault(), t3.stopPropagation();
1353
1353
  }, onPointerMoveOrWait: (t3, e3, n3) => {
1354
1354
  k2?.(t3);
1355
1355
  }, onPointerUp: (t3, e3, n3) => {
1356
1356
  B2(false), D2?.(n3), t3.preventDefault(), t3.stopPropagation();
1357
- } }), [])), I2 = h(() => {
1358
- const t3 = s2 / 2 + r2 / 2 + 6;
1357
+ } }), [])), K2 = h(() => {
1358
+ const t3 = s2 / 2 + i2 / 2 + 6;
1359
1359
  return { x: A2 ? -t3 : g2 + s2, y: A2 ? g2 + s2 : -t3, width: 0, height: 0 };
1360
- }, [A2, g2, s2]), [K2, { y: O2, x: N2 }] = ct(), H2 = a(null), { getPortalContainer: R2, isFullscreen: W2 } = mt(), [V2, F2] = d(null);
1360
+ }, [A2, g2, s2]), [O2, { y: I2, x: N2 }] = ct(), H2 = a(null), { getPortalContainer: R2, isFullscreen: W2 } = ft(), [V2, F2] = d(null);
1361
1361
  return u(() => {
1362
1362
  const t3 = H2.current?.getBoundingClientRect();
1363
1363
  if (!t3) return void F2(null);
1364
1364
  let a2 = 0, h2 = 0, u2 = v2;
1365
1365
  for (; u2; ) a2 += u2.scrollLeft, h2 += u2.scrollTop, u2 = w2 && u2 === w2.parentElement ? null : u2.parentElement;
1366
- F2(P(x("div", { className: T("touch-thumb", Ce["touch-thumb"], c2, Ce, { dragging: z2 }), ref: e2, style: { left: a2 + (t3?.x ?? 0) - (s2 + r2) / 2, top: h2 + (t3?.y ?? 0) - (s2 + r2) / 2, width: A2 ? s2 : 1.8 * s2, height: A2 ? 1.8 * s2 : s2, borderWidth: `${r2}px`, boxShadow: z2 ? `${o2} 0px 0px 0px 1.5px` : void 0, borderStyle: "solid", borderColor: n2, backgroundColor: o2, opacity: y2 ? 0 : void 0, transitionDuration: "160ms", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${i2}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center center", ...l2 }, tabIndex: -1, onPointerDown: $2, ...M2 }), w2 ?? R2(), b2));
1367
- }, [O2, z2, n2, o2, i2, N2, I2?.x, I2?.y, I2?.width, I2?.height, c2, y2, o2, s2, r2, n2, v2, W2, b2]), I2 ? S(E, { children: [x("div", { ref: L([K2, H2]), style: { position: "absolute", left: I2.x, top: I2.y, opacity: 0 } }), V2] }) : null;
1366
+ F2(P(x("div", { className: T("touch-thumb", Ce["touch-thumb"], c2, Ce, { dragging: z2 }), ref: e2, style: { left: a2 + (t3?.x ?? 0) - (s2 + i2) / 2, top: h2 + (t3?.y ?? 0) - (s2 + i2) / 2, width: A2 ? s2 : 1.8 * s2, height: A2 ? 1.8 * s2 : s2, borderWidth: `${i2}px`, boxShadow: z2 ? `${o2} 0px 0px 0px 1.5px` : void 0, borderStyle: "solid", borderColor: n2, backgroundColor: o2, opacity: y2 ? 0 : void 0, transitionDuration: "160ms", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${r2}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center center", ...l2 }, tabIndex: -1, onPointerDown: $2, ...M2 }), w2 ?? R2(), b2));
1367
+ }, [I2, z2, n2, o2, r2, N2, K2?.x, K2?.y, K2?.width, K2?.height, c2, y2, o2, s2, i2, n2, v2, W2, b2]), K2 ? S(E, { children: [x("div", { ref: L([O2, H2]), style: { position: "absolute", left: K2.x, top: K2.y, opacity: 0 } }), V2] }) : null;
1368
1368
  }));
1369
- Ie.displayName = "TouchThumbHandle";
1370
- const Ke = 24, Oe = p(f((t2, e2) => {
1371
- const { offset: n2 = 0, totalSize: o2 = 0, viewportSize: i2 = 0, style: r2, className: s2, orientation: l2 = Te.Vertical, onScrollOffset: c2, onScroll: p2, showCustomScrollButtons: f2, scrollButtonIncrement: _2 = 200, scrollButtonInitialRepeatDelay: g2 = 260, scrollButtonAdditionalRepeatDelay: y2 = 120, minThumbSize: v2 = Ke, maxThumbSize: w2, createScrollStartButton: b2 = Ae, createScrollEndButton: C2 = ze, touchThumbProps: k2, thumbProps: P2, onMouseDown: D2, ...A2 } = t2, z2 = "touch" === N().primaryInput, B2 = f2 ?? !z2;
1369
+ Ke.displayName = "TouchThumbHandle";
1370
+ const Oe = 24, Ie = p(m((t2, e2) => {
1371
+ const { offset: n2 = 0, totalSize: o2 = 0, viewportSize: r2 = 0, style: i2, className: s2, orientation: l2 = Te.Vertical, onScrollOffset: c2, onScroll: p2, showCustomScrollButtons: m2, scrollButtonIncrement: _2 = 200, scrollButtonInitialRepeatDelay: g2 = 260, scrollButtonAdditionalRepeatDelay: y2 = 120, minThumbSize: v2 = Oe, maxThumbSize: w2, createScrollStartButton: b2 = Ae, createScrollEndButton: C2 = ze, touchThumbProps: k2, thumbProps: P2, onMouseDown: D2, ...A2 } = t2, z2 = "touch" === N().primaryInput, B2 = m2 ?? !z2;
1372
1372
  ht(p2, [p2]);
1373
- const [$2, I2] = d({ offset: 0, length: 0 }), K2 = a(-1), O2 = l2 === Te.Vertical, [H2, { width: R2, height: W2 }] = M(), V2 = O2 ? W2 : R2, F2 = ht((t3, e3, n3) => {
1374
- if (0 === e3 || 0 === n3) return void I2({ offset: 0, length: v2 });
1375
- const o3 = n3 / V2, i3 = e3 / o3, r3 = Math.min(Math.max(v2, i3), Math.min(V2, w2 ?? Number.MAX_SAFE_INTEGER)), s3 = t3 / o3;
1376
- return { offset: Math.min(Math.max(0, s3), V2 - r3), length: r3 };
1373
+ const [$2, K2] = d({ offset: 0, length: 0, disabled: false }), O2 = a(-1), I2 = l2 === Te.Vertical, [H2, { width: R2, height: W2 }] = M(), V2 = I2 ? W2 : R2, F2 = ht((t3, e3, n3) => {
1374
+ if (0 === e3 || 0 === n3) {
1375
+ const t4 = { offset: 0, length: v2, disabled: true };
1376
+ return K2(t4), t4;
1377
+ }
1378
+ if (e3 >= n3) return { offset: 0, length: V2, disabled: true };
1379
+ const o3 = n3 / V2, r3 = e3 / o3, i3 = Math.min(Math.max(v2, r3), Math.min(V2, w2 ?? Number.MAX_SAFE_INTEGER)), s3 = t3 / o3;
1380
+ return { offset: Math.min(Math.max(0, s3), V2 - i3), length: i3, disabled: false };
1377
1381
  }, [V2, v2, w2]), j2 = ht((t3) => {
1378
1382
  const e3 = o2 / V2, n3 = Math.round(t3 * e3);
1379
- I2(F2(n3, i2, o2)), c2?.(n3, i2, o2), K2.current = t3;
1380
- }, [c2, i2, o2, V2, $2]), X2 = ht((t3) => {
1381
- I2(F2(t3, i2, o2)), c2?.(t3, i2, o2), K2.current = t3;
1382
- }, [c2, i2, o2]);
1383
+ K2(F2(n3, r2, o2)), c2?.(n3, r2, o2), O2.current = t3;
1384
+ }, [c2, r2, o2, V2, $2]), X2 = ht((t3) => {
1385
+ K2(F2(t3, r2, o2)), c2?.(t3, r2, o2), O2.current = t3;
1386
+ }, [c2, r2, o2]);
1383
1387
  u(() => {
1384
- K2.current !== n2 && 0 !== V2 && (K2.current = -1, I2(F2(n2, i2, o2)));
1388
+ O2.current !== n2 && 0 !== V2 && (O2.current = -1, K2(F2(n2, r2, o2)));
1385
1389
  }, [n2]), u(() => {
1386
- 0 !== V2 && I2(F2(n2, i2, o2));
1387
- }, [i2, o2, O2, V2]);
1388
- const Y2 = Math.max(0, o2 - i2), [U2, G2] = d(false), q2 = a(0), Z2 = a(0), J2 = Ft(e2, () => ({ isScrollbar: () => true }), []), Q2 = ht((t3) => {
1389
- G2(true), q2.current = O2 ? t3.clientY : t3.clientX, Z2.current = $2.offset;
1390
- }, [O2, $2]), tt2 = ht((t3) => {
1390
+ 0 !== V2 && K2(F2(n2, r2, o2));
1391
+ }, [r2, o2, I2, V2]);
1392
+ const Y2 = Math.max(0, o2 - r2), [U2, G2] = d(false), q2 = a(0), Z2 = a(0), J2 = Ft(e2, () => ({ isScrollbar: () => true }), []), Q2 = ht((t3) => {
1393
+ G2(true), q2.current = I2 ? t3.clientY : t3.clientX, Z2.current = $2.offset;
1394
+ }, [I2, $2]), tt2 = ht((t3) => {
1391
1395
  t3.currentTarget.setPointerCapture(t3.pointerId), Q2(t3), t3.stopPropagation();
1392
1396
  }, [D2]), et2 = ht((t3) => {
1393
1397
  if (!U2) return;
1394
- const e3 = (O2 ? t3.clientY : t3.clientX) - q2.current, n3 = Z2.current + e3;
1398
+ const e3 = (I2 ? t3.clientY : t3.clientX) - q2.current, n3 = Z2.current + e3;
1395
1399
  j2(n3);
1396
- }, [U2, O2]), nt2 = ht((t3) => {
1400
+ }, [U2, I2]), nt2 = ht((t3) => {
1397
1401
  et2(t3);
1398
1402
  }, []), ot2 = ht((t3) => {
1399
1403
  G2(false);
1400
- }, []), it2 = ht((t3) => {
1404
+ }, []), rt2 = ht((t3) => {
1401
1405
  try {
1402
1406
  t3.currentTarget.releasePointerCapture(t3.pointerId);
1403
1407
  } catch {
1404
1408
  }
1405
1409
  ot2(t3);
1406
- }, []), rt2 = ht((t3) => {
1410
+ }, []), it2 = ht((t3) => {
1407
1411
  if (!t3.currentTarget) return;
1408
- const e3 = t3.currentTarget.getBoundingClientRect(), n3 = O2 ? t3.clientY - e3.top : t3.clientX - e3.left;
1412
+ const e3 = t3.currentTarget.getBoundingClientRect(), n3 = I2 ? t3.clientY - e3.top : t3.clientX - e3.left;
1409
1413
  j2(n3);
1410
- }, [O2, $2, i2, o2]), st2 = ht((t3) => {
1411
- const e3 = Math.max(1, Math.floor(0.9 * i2));
1412
- O2 ? ("ArrowDown" === t3.key && j2(Math.min(Y2, n2 + 1)), "ArrowUp" === t3.key && j2(Math.max(0, n2 - 1)), "PageDown" === t3.key && j2(Math.min(Y2, n2 + e3)), "PageUp" === t3.key && j2(Math.max(0, n2 - e3)), "Home" === t3.key && j2(0), "End" === t3.key && j2(Y2)) : ("ArrowRight" === t3.key && j2(Math.min(Y2, n2 + 1)), "ArrowLeft" === t3.key && j2(Math.max(0, n2 - 1)), "PageDown" === t3.key && j2(Math.min(Y2, n2 + e3)), "PageUp" === t3.key && j2(Math.max(0, n2 - e3)), "Home" === t3.key && j2(0), "End" === t3.key && j2(Y2));
1413
- }, [O2, i2, o2, n2, Y2]), lt2 = a(null), at2 = h(() => {
1414
- const t3 = x("div", { ...P2, className: T(Ce.thumb), ref: lt2, role: "slider", "aria-label": O2 ? "Rows" : "Columns", "aria-orientation": O2 ? "vertical" : "horizontal", "aria-valuemin": 0, "aria-valuemax": Y2, "aria-valuenow": n2, tabIndex: 0, style: { ...P2?.style, position: "relative", [O2 ? "height" : "width"]: `${$2.length}px`, [O2 ? "width" : "height"]: "100%", transform: O2 ? `translateY(${$2.offset}px)` : `translateX(${$2.offset}px)`, [O2 ? "minHeight" : "minWidth"]: `${v2}px` }, onMouseDown: D2, onPointerDown: tt2, onPointerMove: nt2, onPointerUp: it2 });
1415
- return z2 ? S(E, { children: [t3, x(Ie, { ...k2, offset: $2.offset, orientation: O2 ? Te.Vertical : Te.Horizontal, onPointerDown: Q2, onPointerMove: et2, onPointerUp: ot2 })] }) : t3;
1416
- }, [$2, v2, Y2, n2, O2, z2, D2, k2, P2]), [ct2, ut2] = d(null), dt2 = ht(() => {
1414
+ }, [I2, $2, r2, o2]), st2 = ht((t3) => {
1415
+ const e3 = Math.max(1, Math.floor(0.9 * r2));
1416
+ I2 ? ("ArrowDown" === t3.key && j2(Math.min(Y2, n2 + 1)), "ArrowUp" === t3.key && j2(Math.max(0, n2 - 1)), "PageDown" === t3.key && j2(Math.min(Y2, n2 + e3)), "PageUp" === t3.key && j2(Math.max(0, n2 - e3)), "Home" === t3.key && j2(0), "End" === t3.key && j2(Y2)) : ("ArrowRight" === t3.key && j2(Math.min(Y2, n2 + 1)), "ArrowLeft" === t3.key && j2(Math.max(0, n2 - 1)), "PageDown" === t3.key && j2(Math.min(Y2, n2 + e3)), "PageUp" === t3.key && j2(Math.max(0, n2 - e3)), "Home" === t3.key && j2(0), "End" === t3.key && j2(Y2));
1417
+ }, [I2, r2, o2, n2, Y2]), lt2 = a(null), at2 = h(() => {
1418
+ const t3 = $2.disabled;
1419
+ if (t3) return null;
1420
+ const e3 = x("div", { ...P2, className: T(Ce.thumb, { disabled: t3 }), ref: lt2, role: "slider", "aria-label": I2 ? "Rows" : "Columns", "aria-orientation": I2 ? "vertical" : "horizontal", "aria-valuemin": 0, "aria-valuemax": Y2, "aria-valuenow": n2, tabIndex: 0, style: { ...P2?.style, position: "relative", [I2 ? "height" : "width"]: `${$2.length}px`, [I2 ? "width" : "height"]: "100%", transform: I2 ? `translateY(${$2.offset}px)` : `translateX(${$2.offset}px)`, [I2 ? "minHeight" : "minWidth"]: `${v2}px` }, onMouseDown: D2, onPointerDown: tt2, onPointerMove: nt2, onPointerUp: rt2 });
1421
+ return !z2 || t3 ? e3 : S(E, { children: [e3, x(Ke, { ...k2, offset: $2.offset, orientation: I2 ? Te.Vertical : Te.Horizontal, onPointerDown: Q2, onPointerMove: et2, onPointerUp: ot2 })] });
1422
+ }, [$2, v2, Y2, n2, I2, z2, D2, k2, P2]), [ct2, ut2] = d(null), dt2 = ht(() => {
1417
1423
  let t3;
1418
- t3 = "function" == typeof _2 ? _2(n2, i2, o2) : n2 - _2;
1424
+ t3 = "function" == typeof _2 ? _2(n2, r2, o2) : n2 - _2;
1419
1425
  const e3 = Math.max(0, t3);
1420
1426
  return X2(e3), ut2(e3), e3;
1421
- }, [_2, n2, i2, o2]), pt2 = ht(() => {
1427
+ }, [_2, n2, r2, o2]), pt2 = ht(() => {
1422
1428
  let t3;
1423
- t3 = "function" == typeof _2 ? _2(n2, i2, o2) : n2 + _2;
1429
+ t3 = "function" == typeof _2 ? _2(n2, r2, o2) : n2 + _2;
1424
1430
  const e3 = Math.min(Y2, t3);
1425
1431
  return X2(e3), ut2(e3), e3;
1426
- }, [_2, n2, Y2, i2, o2]), ft2 = a(null), mt2 = a(null), _t2 = m(() => {
1427
- ft2.current && (clearTimeout(ft2.current), ft2.current = null, mt2.current = null);
1428
- }, []), gt2 = m((t3, e3, n3, o3 = g2) => {
1429
- mt2.current = t3, ft2.current = setTimeout(() => {
1432
+ }, [_2, n2, Y2, r2, o2]), mt2 = a(null), ft2 = a(null), _t2 = f(() => {
1433
+ mt2.current && (clearTimeout(mt2.current), mt2.current = null, ft2.current = null);
1434
+ }, []), gt2 = f((t3, e3, n3, o3 = g2) => {
1435
+ ft2.current = t3, mt2.current = setTimeout(() => {
1430
1436
  const t4 = n3 ? dt2() : pt2();
1431
- t4 !== mt2.current ? gt2(t4, false, n3, y2) : _t2();
1437
+ t4 !== ft2.current ? gt2(t4, false, n3, y2) : _t2();
1432
1438
  }, e3 ? 0 : o3);
1433
1439
  }, [dt2, pt2, _t2]);
1434
1440
  u(() => () => _t2(), [_t2]);
@@ -1440,40 +1446,40 @@ const Ke = 24, Oe = p(f((t2, e2) => {
1440
1446
  if (!B2) return null;
1441
1447
  const t3 = { orientation: l2, disabled: n2 >= Y2, onMouseUp: _t2, onMouseLeave: _t2, onMouseDown: () => gt2(n2, true, false) };
1442
1448
  return C2?.(t3);
1443
- }, [B2, l2, n2, Y2, ct2]), wt2 = O2 ? "vertical" : "horizontal";
1444
- return S("div", { ref: L([J2, e2]), className: T(s2, Ce.scrollbar, wt2, { dragging: U2, "has-touch-thumb": z2 }), style: r2, ...A2, children: [yt2, x("div", { ref: H2, role: "scrollbar", "aria-orientation": wt2, "aria-valuemin": 0, "aria-valuemax": Y2, "aria-valuenow": n2, tabIndex: 0, className: T(Ce.track, "track", wt2), onMouseDown: D2, onPointerDown: rt2, onKeyDown: st2, children: at2 }), vt2] });
1449
+ }, [B2, l2, n2, Y2, ct2]), wt2 = I2 ? "vertical" : "horizontal";
1450
+ return S("div", { ref: L([J2, e2]), className: T(s2, Ce.scrollbar, wt2, { dragging: U2, "has-touch-thumb": z2 }), style: i2, ...A2, children: [yt2, x("div", { ref: H2, role: "scrollbar", "aria-orientation": wt2, "aria-valuemin": 0, "aria-valuemax": Y2, "aria-valuenow": n2, tabIndex: 0, className: T(Ce.track, "track", wt2), onMouseDown: D2, onPointerDown: it2, onKeyDown: st2, children: at2 }), vt2] });
1445
1451
  }));
1446
1452
  let Ne = Date.now, He = 1e3, Re = {}, We = 1;
1447
1453
  const Ve = (t2) => {
1448
1454
  let e2 = null !== Re[t2];
1449
1455
  return e2 && (Re[t2] = null), e2;
1450
- }, Fe = (t2, e2, n2, o2 = 0, i2) => {
1451
- let r2 = Ne(), s2 = r2, l2 = 0, a2 = 0, c2 = 0, h2 = We++;
1456
+ }, Fe = (t2, e2, n2, o2 = 0, r2) => {
1457
+ let i2 = Ne(), s2 = i2, l2 = 0, a2 = 0, c2 = 0, h2 = We++;
1452
1458
  if (h2 % 20 == 0) {
1453
1459
  const t3 = {};
1454
1460
  for (let e3 in Re) t3[e3] = true;
1455
1461
  Re = t3;
1456
1462
  }
1457
1463
  const u2 = function(d2) {
1458
- let p2 = true !== d2, f2 = Ne(), m2 = true;
1464
+ let p2 = true !== d2, m2 = Ne(), f2 = true;
1459
1465
  try {
1460
- m2 = (!e2 || e2(h2)) ?? true;
1466
+ f2 = (!e2 || e2(h2)) ?? true;
1461
1467
  } catch (t3) {
1462
- m2 = false;
1468
+ f2 = false;
1463
1469
  }
1464
- if (!Re[h2] || !m2) return Re[h2] = null, void n2?.(60 - a2 / ((f2 - r2) / He), h2, false);
1470
+ if (!Re[h2] || !f2) return Re[h2] = null, void n2?.(60 - a2 / ((m2 - i2) / He), h2, false);
1465
1471
  if (p2) {
1466
- c2 = Math.round((f2 - s2) / 16.666666666666668) - 1;
1472
+ c2 = Math.round((m2 - s2) / 16.666666666666668) - 1;
1467
1473
  for (let t3 = 0; t3 < Math.min(c2, 4); t3++) u2(true), a2++;
1468
1474
  }
1469
- o2 && (l2 = (f2 - r2) / o2, l2 > 1 && (l2 = 1));
1470
- let _2 = i2 ? i2(l2) : l2, g2 = false;
1475
+ o2 && (l2 = (m2 - i2) / o2, l2 > 1 && (l2 = 1));
1476
+ let _2 = r2 ? r2(l2) : l2, g2 = false;
1471
1477
  try {
1472
- g2 = t2(_2, f2, p2);
1478
+ g2 = t2(_2, m2, p2);
1473
1479
  } catch (t3) {
1474
1480
  g2 = false;
1475
1481
  }
1476
- false !== g2 && 1 !== l2 || !p2 ? p2 && (s2 = f2, requestAnimationFrame(u2)) : (Re[h2] = null, n2?.(60 - a2 / ((f2 - r2) / He), h2, 1 === l2 || null == o2));
1482
+ false !== g2 && 1 !== l2 || !p2 ? p2 && (s2 = m2, requestAnimationFrame(u2)) : (Re[h2] = null, n2?.(60 - a2 / ((m2 - i2) / He), h2, 1 === l2 || null == o2));
1477
1483
  };
1478
1484
  return Re[h2] = true, requestAnimationFrame(u2), h2;
1479
1485
  }, je = function(t2) {
@@ -1504,17 +1510,17 @@ class Ye {
1504
1510
  getScrollMax() {
1505
1511
  return { left: this.__maxScrollLeft, top: this.__maxScrollTop };
1506
1512
  }
1507
- zoomTo(t2, e2 = false, n2, o2, i2) {
1513
+ zoomTo(t2, e2 = false, n2, o2, r2) {
1508
1514
  if (!this.options.zooming) throw new Error("Zooming is not enabled!");
1509
- i2 && (this.__zoomComplete = i2), this.__isDecelerating && (Ve(this.__isDecelerating), this.__isDecelerating = 0);
1510
- const r2 = this.__zoomLevel;
1515
+ r2 && (this.__zoomComplete = r2), this.__isDecelerating && (Ve(this.__isDecelerating), this.__isDecelerating = 0);
1516
+ const i2 = this.__zoomLevel;
1511
1517
  void 0 === n2 && (n2 = this.__clientWidth / 2), void 0 === o2 && (o2 = this.__clientHeight / 2), t2 = Math.max(Math.min(t2, this.options.maxZoom), this.options.minZoom), this.__computeScrollMax(t2);
1512
- const s2 = t2 / r2;
1518
+ const s2 = t2 / i2;
1513
1519
  let l2 = s2 * (this.__scrollLeft + n2) - n2, a2 = s2 * (this.__scrollTop + o2) - o2;
1514
1520
  l2 > this.__maxScrollLeft ? l2 = this.__maxScrollLeft : l2 < 0 && (l2 = 0), a2 > this.__maxScrollTop ? a2 = this.__maxScrollTop : a2 < 0 && (a2 = 0), this.__publish(l2, a2, t2, e2);
1515
1521
  }
1516
- zoomBy(t2, e2 = false, n2 = 0, o2 = 0, i2) {
1517
- this.zoomTo(this.__zoomLevel * t2, e2, n2, o2, i2);
1522
+ zoomBy(t2, e2 = false, n2 = 0, o2 = 0, r2) {
1523
+ this.zoomTo(this.__zoomLevel * t2, e2, n2, o2, r2);
1518
1524
  }
1519
1525
  scrollTo(t2, e2, n2 = false, o2 = 1) {
1520
1526
  if (this.__isDecelerating && (Ve(this.__isDecelerating), this.__isDecelerating = 0), void 0 !== o2 && o2 !== this.__zoomLevel) {
@@ -1524,34 +1530,34 @@ class Ye {
1524
1530
  this.options.scrollingX ? this.options.paging ? t2 = Math.round(t2 / this.__clientWidth) * this.__clientWidth : this.options.snapping && (t2 = Math.round(t2 / this.__snapWidth) * this.__snapWidth) : t2 = this.__scrollLeft, this.options.scrollingY ? this.options.paging ? e2 = Math.round(e2 / this.__clientHeight) * this.__clientHeight : this.options.snapping && (e2 = Math.round(e2 / this.__snapHeight) * this.__snapHeight) : e2 = this.__scrollTop, t2 = Math.max(Math.min(this.__maxScrollLeft, t2), 0), e2 = Math.max(Math.min(this.__maxScrollTop, e2), 0), t2 === this.__scrollLeft && e2 === this.__scrollTop && (n2 = false), this.__publish(t2, e2, o2, n2);
1525
1531
  }
1526
1532
  scrollBy(t2 = 0, e2 = 0, n2 = false) {
1527
- const o2 = this.__isAnimating ? this.__scheduledLeft : this.__scrollLeft, i2 = this.__isAnimating ? this.__scheduledTop : this.__scrollTop;
1528
- this.scrollTo(o2 + (t2 || 0), i2 + (e2 || 0), n2);
1533
+ const o2 = this.__isAnimating ? this.__scheduledLeft : this.__scrollLeft, r2 = this.__isAnimating ? this.__scheduledTop : this.__scrollTop;
1534
+ this.scrollTo(o2 + (t2 || 0), r2 + (e2 || 0), n2);
1529
1535
  }
1530
1536
  doMouseZoom(t2, e2, n2, o2) {
1531
- const i2 = t2 > 0 ? 0.97 : 1.03;
1532
- return this.zoomTo(this.__zoomLevel * i2, false, n2 - this.__clientLeft, o2 - this.__clientTop);
1537
+ const r2 = t2 > 0 ? 0.97 : 1.03;
1538
+ return this.zoomTo(this.__zoomLevel * r2, false, n2 - this.__clientLeft, o2 - this.__clientTop);
1533
1539
  }
1534
1540
  doTouchStart(t2, e2) {
1535
1541
  if (void 0 === t2.length) throw new Error("Invalid touch list: " + t2);
1536
1542
  if (e2 instanceof Date && (e2 = e2.valueOf()), "number" != typeof e2) throw new Error("Invalid timestamp value: " + e2);
1537
1543
  let n2, o2;
1538
1544
  this.__interruptedAnimation = true, this.__isDecelerating && (Ve(this.__isDecelerating), this.__isDecelerating = 0, this.__interruptedAnimation = true), this.__isAnimating && (Ve(this.__isAnimating), this.__isAnimating = 0, this.__interruptedAnimation = true);
1539
- let i2 = 1 === t2.length;
1540
- i2 ? (n2 = t2[0].pageX, o2 = t2[0].pageY) : (n2 = Math.abs(t2[0].pageX + t2[1].pageX) / 2, o2 = Math.abs(t2[0].pageY + t2[1].pageY) / 2), this.__initialTouchLeft = n2, this.__initialTouchTop = o2, this.__zoomLevelStart = this.__zoomLevel, this.__lastTouchLeft = n2, this.__lastTouchTop = o2, this.__lastTouchMove = e2, this.__lastScale = 1, this.__enableScrollX = !i2 && this.options.scrollingX, this.__enableScrollY = !i2 && this.options.scrollingY, this.__isTracking = true, this.__didDecelerationComplete = false, this.__isDragging = !i2, this.__isSingleTouch = i2, this.__positions = [];
1545
+ let r2 = 1 === t2.length;
1546
+ r2 ? (n2 = t2[0].pageX, o2 = t2[0].pageY) : (n2 = Math.abs(t2[0].pageX + t2[1].pageX) / 2, o2 = Math.abs(t2[0].pageY + t2[1].pageY) / 2), this.__initialTouchLeft = n2, this.__initialTouchTop = o2, this.__zoomLevelStart = this.__zoomLevel, this.__lastTouchLeft = n2, this.__lastTouchTop = o2, this.__lastTouchMove = e2, this.__lastScale = 1, this.__enableScrollX = !r2 && this.options.scrollingX, this.__enableScrollY = !r2 && this.options.scrollingY, this.__isTracking = true, this.__didDecelerationComplete = false, this.__isDragging = !r2, this.__isSingleTouch = r2, this.__positions = [];
1541
1547
  }
1542
1548
  doTouchMove(t2, e2, n2 = 1) {
1543
1549
  if (void 0 === t2.length) throw new Error("Invalid touch list: " + t2);
1544
1550
  if (e2 instanceof Date && (e2 = e2.valueOf()), "number" != typeof e2) throw new Error("Invalid timestamp value: " + e2);
1545
1551
  if (!this.__isTracking) return;
1546
- let o2, i2;
1547
- 2 === t2.length ? (o2 = Math.abs(t2[0].pageX + t2[1].pageX) / 2, i2 = Math.abs(t2[0].pageY + t2[1].pageY) / 2) : (o2 = t2[0].pageX, i2 = t2[0].pageY);
1548
- let r2 = this.__positions;
1552
+ let o2, r2;
1553
+ 2 === t2.length ? (o2 = Math.abs(t2[0].pageX + t2[1].pageX) / 2, r2 = Math.abs(t2[0].pageY + t2[1].pageY) / 2) : (o2 = t2[0].pageX, r2 = t2[0].pageY);
1554
+ let i2 = this.__positions;
1549
1555
  if (this.__isDragging) {
1550
- let t3 = o2 - this.__lastTouchLeft, s2 = i2 - this.__lastTouchTop, l2 = this.__scrollLeft, a2 = this.__scrollTop, c2 = this.__zoomLevel;
1556
+ let t3 = o2 - this.__lastTouchLeft, s2 = r2 - this.__lastTouchTop, l2 = this.__scrollLeft, a2 = this.__scrollTop, c2 = this.__zoomLevel;
1551
1557
  if (void 0 !== n2 && this.options.zooming) {
1552
1558
  let t4 = c2;
1553
1559
  if (c2 = c2 / this.__lastScale * n2, c2 = Math.max(Math.min(c2, this.options.maxZoom), this.options.minZoom), t4 !== c2) {
1554
- let e3 = o2 - this.__clientLeft, n3 = i2 - this.__clientTop;
1560
+ let e3 = o2 - this.__clientLeft, n3 = r2 - this.__clientTop;
1555
1561
  l2 = (e3 + l2) * c2 / t4 - e3, a2 = (n3 + a2) * c2 / t4 - n3, this.__computeScrollMax(c2);
1556
1562
  }
1557
1563
  }
@@ -1565,12 +1571,12 @@ class Ye {
1565
1571
  const t4 = this.__maxScrollTop;
1566
1572
  (a2 > t4 || a2 < 0) && (this.options.bouncing ? a2 += s2 / 2 * this.options.speedMultiplier : a2 = a2 > t4 ? t4 : 0);
1567
1573
  }
1568
- r2.length > 60 && r2.splice(0, 30), r2.push(l2, a2, e2), this.__publish(l2, a2, c2);
1574
+ i2.length > 60 && i2.splice(0, 30), i2.push(l2, a2, e2), this.__publish(l2, a2, c2);
1569
1575
  } else {
1570
- let t3 = this.options.locking ? 3 : 0, n3 = 5, s2 = Math.abs(o2 - this.__initialTouchLeft), l2 = Math.abs(i2 - this.__initialTouchTop);
1571
- this.__enableScrollX = this.options.scrollingX && s2 >= t3, this.__enableScrollY = this.options.scrollingY && l2 >= t3, r2.push(this.__scrollLeft, this.__scrollTop, e2), this.__isDragging = (this.__enableScrollX || this.__enableScrollY) && (s2 >= n3 || l2 >= n3), this.__isDragging && (this.__interruptedAnimation = false);
1576
+ let t3 = this.options.locking ? 3 : 0, n3 = 5, s2 = Math.abs(o2 - this.__initialTouchLeft), l2 = Math.abs(r2 - this.__initialTouchTop);
1577
+ this.__enableScrollX = this.options.scrollingX && s2 >= t3, this.__enableScrollY = this.options.scrollingY && l2 >= t3, i2.push(this.__scrollLeft, this.__scrollTop, e2), this.__isDragging = (this.__enableScrollX || this.__enableScrollY) && (s2 >= n3 || l2 >= n3), this.__isDragging && (this.__interruptedAnimation = false);
1572
1578
  }
1573
- this.__lastTouchLeft = o2, this.__lastTouchTop = i2, this.__lastTouchMove = e2, this.__lastScale = n2;
1579
+ this.__lastTouchLeft = o2, this.__lastTouchTop = r2, this.__lastTouchMove = e2, this.__lastScale = n2;
1574
1580
  }
1575
1581
  doTouchEnd(t2) {
1576
1582
  if (t2 instanceof Date && (t2 = t2.valueOf()), "number" != typeof t2) throw new Error("Invalid timestamp value: " + t2);
@@ -1579,8 +1585,8 @@ class Ye {
1579
1585
  let e2 = this.__positions, n2 = e2.length - 1, o2 = n2;
1580
1586
  for (let t3 = n2; t3 > 0 && e2[t3] > this.__lastTouchMove - 100; t3 -= 3) o2 = t3;
1581
1587
  if (o2 !== n2) {
1582
- const i2 = e2[n2] - e2[o2], r2 = this.__scrollLeft - e2[o2 - 2], s2 = this.__scrollTop - e2[o2 - 1];
1583
- this.__decelerationVelocityX = r2 / i2 * (1e3 / 60), this.__decelerationVelocityY = s2 / i2 * (1e3 / 60);
1588
+ const r2 = e2[n2] - e2[o2], i2 = this.__scrollLeft - e2[o2 - 2], s2 = this.__scrollTop - e2[o2 - 1];
1589
+ this.__decelerationVelocityX = i2 / r2 * (1e3 / 60), this.__decelerationVelocityY = s2 / r2 * (1e3 / 60);
1584
1590
  const l2 = this.options.paging || this.options.snapping ? 4 : 1;
1585
1591
  (Math.abs(this.__decelerationVelocityX) > l2 || Math.abs(this.__decelerationVelocityY) > l2) && this.__startDeceleration(t2);
1586
1592
  } else this.options.scrollingComplete?.();
@@ -1589,17 +1595,17 @@ class Ye {
1589
1595
  }
1590
1596
  }
1591
1597
  __publish(t2, e2, n2, o2 = false) {
1592
- const i2 = this.__isAnimating;
1593
- if (i2 && (Ve(i2), this.__isAnimating = 0), o2 && this.options.animating) {
1598
+ const r2 = this.__isAnimating;
1599
+ if (r2 && (Ve(r2), this.__isAnimating = 0), o2 && this.options.animating) {
1594
1600
  this.__scheduledLeft = t2, this.__scheduledTop = e2, this.__scheduledZoom = n2;
1595
- const o3 = this.__scrollLeft, r2 = this.__scrollTop, s2 = this.__zoomLevel, l2 = t2 - o3, a2 = e2 - r2, c2 = n2 - s2, h2 = function(t3, e3, n3) {
1596
- n3 && (this.__scrollLeft = o3 + l2 * t3, this.__scrollTop = r2 + a2 * t3, this.__zoomLevel = s2 + c2 * t3, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
1601
+ const o3 = this.__scrollLeft, i2 = this.__scrollTop, s2 = this.__zoomLevel, l2 = t2 - o3, a2 = e2 - i2, c2 = n2 - s2, h2 = function(t3, e3, n3) {
1602
+ n3 && (this.__scrollLeft = o3 + l2 * t3, this.__scrollTop = i2 + a2 * t3, this.__zoomLevel = s2 + c2 * t3, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
1597
1603
  }.bind(this), u2 = function(t3) {
1598
1604
  return this.__isAnimating === t3;
1599
1605
  }.bind(this), d2 = function(t3, e3, n3) {
1600
1606
  e3 === this.__isAnimating && (this.__isAnimating = false), (this.__didDecelerationComplete || n3) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
1601
1607
  }.bind(this);
1602
- this.__isAnimating = Fe(h2, u2, d2, this.options.animationDuration, i2 ? je : Xe);
1608
+ this.__isAnimating = Fe(h2, u2, d2, this.options.animationDuration, r2 ? je : Xe);
1603
1609
  } else this.__scheduledLeft = this.__scrollLeft = t2, this.__scheduledTop = this.__scrollTop = e2, this.__scheduledZoom = this.__zoomLevel = n2, this.__callback && this.__callback(t2, e2, n2), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
1604
1610
  }
1605
1611
  __computeScrollMax(t2 = this.__zoomLevel) {
@@ -1615,10 +1621,10 @@ class Ye {
1615
1621
  }.bind(this), n2 = this.options.snapping ? 4 : 0.1, o2 = function() {
1616
1622
  const t3 = Math.abs(this.__decelerationVelocityX) >= n2 || Math.abs(this.__decelerationVelocityY) >= n2;
1617
1623
  return t3 || (this.__didDecelerationComplete = true), t3;
1618
- }.bind(this), i2 = function(t3, e3, n3) {
1624
+ }.bind(this), r2 = function(t3, e3, n3) {
1619
1625
  this.__isDecelerating = 0, this.__didDecelerationComplete && this.options.scrollingComplete?.(), this.scrollTo(this.__scrollLeft, this.__scrollTop, this.options.snapping);
1620
1626
  }.bind(this);
1621
- this.__isDecelerating = Fe(e2, o2, i2);
1627
+ this.__isDecelerating = Fe(e2, o2, r2);
1622
1628
  }
1623
1629
  __stepThroughDeceleration(t2) {
1624
1630
  let e2 = this.__scrollLeft + this.__decelerationVelocityX, n2 = this.__scrollTop + this.__decelerationVelocityY;
@@ -1633,83 +1639,83 @@ class Ye {
1633
1639
  this.__decelerationVelocityX *= t3, this.__decelerationVelocityY *= t3;
1634
1640
  }
1635
1641
  if (this.options.bouncing) {
1636
- let t3 = 0, o2 = 0, i2 = this.options.penetrationDeceleration, r2 = this.options.penetrationAcceleration;
1637
- e2 < this.__minDecelerationScrollLeft ? t3 = this.__minDecelerationScrollLeft - e2 : e2 > this.__maxDecelerationScrollLeft && (t3 = this.__maxDecelerationScrollLeft - e2), n2 < this.__minDecelerationScrollTop ? o2 = this.__minDecelerationScrollTop - n2 : n2 > this.__maxDecelerationScrollTop && (o2 = this.__maxDecelerationScrollTop - n2), 0 !== t3 && (t3 * this.__decelerationVelocityX <= 0 ? this.__decelerationVelocityX += t3 * i2 : this.__decelerationVelocityX = t3 * r2), 0 !== o2 && (o2 * this.__decelerationVelocityY <= 0 ? this.__decelerationVelocityY += o2 * i2 : this.__decelerationVelocityY = o2 * r2);
1642
+ let t3 = 0, o2 = 0, r2 = this.options.penetrationDeceleration, i2 = this.options.penetrationAcceleration;
1643
+ e2 < this.__minDecelerationScrollLeft ? t3 = this.__minDecelerationScrollLeft - e2 : e2 > this.__maxDecelerationScrollLeft && (t3 = this.__maxDecelerationScrollLeft - e2), n2 < this.__minDecelerationScrollTop ? o2 = this.__minDecelerationScrollTop - n2 : n2 > this.__maxDecelerationScrollTop && (o2 = this.__maxDecelerationScrollTop - n2), 0 !== t3 && (t3 * this.__decelerationVelocityX <= 0 ? this.__decelerationVelocityX += t3 * r2 : this.__decelerationVelocityX = t3 * i2), 0 !== o2 && (o2 * this.__decelerationVelocityY <= 0 ? this.__decelerationVelocityY += o2 * r2 : this.__decelerationVelocityY = o2 * i2);
1638
1644
  }
1639
1645
  }
1640
1646
  }
1641
- const Ue = (t2, e2) => x(Oe, { ...t2, ref: e2 }), Ge = Object.freeze(Object.defineProperty({ __proto__: null, defaultCreateScrollbar: Ue, getScrollTo: (t2, e2, n2, o2, i2 = 0) => {
1642
- for (let i3 = 0; i3 < n2.length; i3++) {
1643
- const r2 = n2[i3].getBoundingClientRect();
1644
- let s2 = r2.left - e2, l2 = s2 + r2.width;
1647
+ const Ue = (t2, e2) => x(Ie, { ...t2, ref: e2 }), Ge = Object.freeze(Object.defineProperty({ __proto__: null, defaultCreateScrollbar: Ue, getScrollTo: (t2, e2, n2, o2, r2 = 0) => {
1648
+ for (let r3 = 0; r3 < n2.length; r3++) {
1649
+ const i2 = n2[r3].getBoundingClientRect();
1650
+ let s2 = i2.left - e2, l2 = s2 + i2.width;
1645
1651
  if (o2) {
1646
1652
  if (s2 < t2 && l2 >= t2) return s2;
1647
1653
  } else if (Math.ceil(l2) > Math.ceil(t2) + 2) return l2;
1648
1654
  }
1649
- return i2;
1650
- } }, Symbol.toStringTag, { value: "Module" })), qe = ({ width: t2, height: e2 }) => x("div", { className: "corner", style: { minWidth: `${t2}px`, width: `${t2}px`, minHeight: `${e2}px`, height: `${e2}px` } }), Ze = p(f((t2, e2) => {
1651
- const { children: n2, viewport: o2, onScrollViewport: i2, showHorizontalScrollbar: r2 = true, showVerticalScrollbar: s2 = true, createScrollCorner: l2 = qe, createHorizontalScrollbar: c2 = Ue, createVerticalScrollbar: d2 = Ue, style: p2, touchElement: f2, disableTouch: _2, ...g2 } = t2, y2 = r2 && c2, v2 = s2 && d2, w2 = ht(i2, [i2]), b2 = Ft(e2, () => ({ isScrollPane: () => true }), []), L2 = a(null);
1655
+ return r2;
1656
+ } }, Symbol.toStringTag, { value: "Module" })), qe = "_scrollpane_1fbi8_2", Ze = "_vertical-container_1fbi8_7", Je = "_horizontal-corner-container_1fbi8_12", Qe = "_horizontal-container_1fbi8_20", tn = "_scrollbar-sizer_1fbi8_26", en = "_scrollpane-content_1fbi8_34", nn = "_scrollpane-content-element_1fbi8_43", on = ({ width: t2, height: e2 }) => x("div", { className: "corner", style: { minWidth: `${t2}px`, width: `${t2}px`, minHeight: `${e2}px`, height: `${e2}px` } }), rn = p(m((t2, e2) => {
1657
+ const { children: n2, viewport: o2, onScrollViewport: r2, showHorizontalScrollbar: i2 = true, showVerticalScrollbar: s2 = true, createScrollCorner: l2 = on, createHorizontalScrollbar: c2 = Ue, createVerticalScrollbar: d2 = Ue, style: p2, className: m2, touchElement: _2, disableTouch: g2, ...y2 } = t2, v2 = i2 && c2, w2 = s2 && d2, b2 = ht(r2, [r2]), L2 = Ft(e2, () => ({ isScrollPane: () => true }), []), C2 = a(null);
1652
1658
  u(() => {
1653
- L2.current && (L2.current.__scrollTop === o2?.top && L2.current.__scrollLeft === o2?.left || L2.current.__isDecelerating || L2.current?.scrollTo(o2?.left, o2?.top, false));
1654
- }, [o2?.left, o2?.top, f2]);
1655
- const T2 = m((t3, e3) => {
1656
- w2?.({ left: t3, top: e3 });
1657
- }, []), C2 = m((t3) => {
1658
- L2.current?.doTouchStart(t3.touches, t3.timeStamp);
1659
- }, []), k2 = m((t3) => {
1660
- t3.preventDefault(), L2.current?.doTouchMove(t3.touches, t3.timeStamp);
1661
- }, []), P2 = m((t3) => {
1662
- L2.current?.doTouchEnd(t3.timeStamp);
1663
- }, []), D2 = m(({ containerWidth: t3, containerHeight: e3, totalWidth: n3, totalHeight: o3 }) => {
1664
- L2.current.setDimensions(t3, e3, n3, o3);
1659
+ C2.current && (C2.current.__scrollTop === o2?.top && C2.current.__scrollLeft === o2?.left || C2.current.__isDecelerating || C2.current?.scrollTo(o2?.left, o2?.top, false));
1660
+ }, [o2?.left, o2?.top, _2]);
1661
+ const k2 = f((t3, e3) => {
1662
+ b2?.({ left: t3, top: e3 });
1663
+ }, []), P2 = f((t3) => {
1664
+ C2.current?.doTouchStart(t3.touches, t3.timeStamp);
1665
+ }, []), D2 = f((t3) => {
1666
+ t3.preventDefault(), C2.current?.doTouchMove(t3.touches, t3.timeStamp);
1667
+ }, []), A2 = f((t3) => {
1668
+ C2.current?.doTouchEnd(t3.timeStamp);
1669
+ }, []), z2 = f(({ containerWidth: t3, containerHeight: e3, totalWidth: n3, totalHeight: o3 }) => {
1670
+ C2.current.setDimensions(t3, e3, n3, o3);
1665
1671
  }, []);
1666
1672
  u(() => {
1667
- const t3 = f2 ?? b2.current;
1668
- if (!_2 && N().supportsTouchEvents && t3 && o2) {
1669
- if (!L2.current) {
1673
+ const t3 = _2 ?? L2.current;
1674
+ if (!g2 && N().supportsTouchEvents && t3 && o2) {
1675
+ if (!C2.current) {
1670
1676
  const t4 = { scrollingX: true, scrollingY: true, decelerationRate: 0.95, penetrationAcceleration: 0.08 };
1671
- L2.current = new Ye(T2, t4);
1677
+ C2.current = new Ye(k2, t4);
1672
1678
  }
1673
- N().supportsTouchEvents && (t3.addEventListener("touchstart", C2), t3.addEventListener("touchend", P2), t3.addEventListener("touchmove", k2)), D2({ containerWidth: o2?.width, containerHeight: o2?.height, totalWidth: o2?.totalWidth, totalHeight: o2?.totalHeight });
1679
+ N().supportsTouchEvents && (t3.addEventListener("touchstart", P2), t3.addEventListener("touchend", A2), t3.addEventListener("touchmove", D2)), z2({ containerWidth: o2?.width, containerHeight: o2?.height, totalWidth: o2?.totalWidth, totalHeight: o2?.totalHeight });
1674
1680
  }
1675
1681
  return () => {
1676
- t3?.removeEventListener("touchstart", C2), t3?.removeEventListener("touchend", P2), t3?.removeEventListener("touchmove", k2);
1682
+ t3?.removeEventListener("touchstart", P2), t3?.removeEventListener("touchend", A2), t3?.removeEventListener("touchmove", D2);
1677
1683
  };
1678
- }, [o2?.width, o2?.height, o2?.totalWidth, o2?.totalHeight, _2, f2]);
1679
- const [A2, { width: z2 }] = M(), [B2, { height: $2 }] = M(), I2 = h(() => {
1680
- if (!v2) return null;
1684
+ }, [o2?.width, o2?.height, o2?.totalWidth, o2?.totalHeight, g2, _2]);
1685
+ const [B2, { width: $2 }] = M(), [K2, { height: O2 }] = M(), I2 = h(() => {
1686
+ if (!w2) return null;
1681
1687
  const t3 = d2({ orientation: Te.Vertical, offset: o2?.top, viewportSize: o2?.height, totalSize: o2?.totalHeight, onScrollOffset: (t4) => {
1682
- w2?.({ top: t4 });
1688
+ b2?.({ top: t4 });
1683
1689
  } });
1684
- return x("div", { style: { display: "flex", flex: "0" }, ref: A2, children: t3 });
1685
- }, [d2, o2?.top, o2?.height, o2?.totalHeight]), K2 = h(() => {
1686
- if (!y2) return null;
1690
+ return x("div", { className: T("vertical-container", Ze), ref: B2, children: t3 });
1691
+ }, [d2, o2?.top, o2?.height, o2?.totalHeight]), H2 = h(() => {
1692
+ if (!v2) return null;
1687
1693
  const t3 = c2({ orientation: Te.Horizontal, offset: o2?.left, viewportSize: o2?.width, totalSize: o2?.totalWidth, onScrollOffset: (t4) => {
1688
- w2?.({ left: t4 });
1694
+ b2?.({ left: t4 });
1689
1695
  } });
1690
- return S("div", { style: { display: "flex", flex: "none", flexDirection: "row", alignItems: "stretch", justifyContent: "center" }, children: [x("div", { style: { display: "flex", flex: "1 1 100%", flexDirection: "column", width: `calc(100% - ${z2}px)` }, children: x("div", { ref: B2, className: "sizer", children: t3 }) }), v2 ? l2({ width: z2, height: $2 }) : x(E, {})] });
1691
- }, [c2, o2?.left, o2?.width, o2?.totalWidth, v2, l2, z2, $2]);
1692
- return x("div", { style: { position: "relative", display: "flex", minWidth: v2 ? `${z2}px` : void 0, minHeight: y2 ? `${$2}px` : void 0, ...p2 }, ...g2, ref: b2, children: S("div", { style: { position: "relative", width: "100%", flex: "1 1 100%", display: "flex", flexDirection: "column", boxSizing: "border-box" }, children: [S("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: [x("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: n2 }), v2 ? I2 : x(E, {})] }), y2 ? K2 : x(E, {})] }) });
1696
+ return S("div", { className: T("horizontal-corner-container", Je), children: [x("div", { className: T("horizontal-container", Qe), style: { width: `calc(100% - ${$2}px)` }, children: x("div", { ref: K2, className: T("scrollbar-sizer", tn), children: t3 }) }), w2 ? l2({ width: $2, height: O2 }) : x(E, {})] });
1697
+ }, [c2, o2?.left, o2?.width, o2?.totalWidth, w2, l2, $2, O2]);
1698
+ return x("div", { className: T(m2, "scrollpane", qe), style: { minWidth: w2 ? `${$2}px` : void 0, minHeight: v2 ? `${O2}px` : void 0, ...p2 }, ...y2, ref: L2, children: S("div", { className: T("scrollpane-content", en), children: [S("div", { className: T("scrollpane-content-element", nn), children: [x("div", { className: T("scrollpane-content-element", nn), children: n2 }), w2 ? I2 : x(E, {})] }), v2 ? H2 : x(E, {})] }) });
1693
1699
  }));
1694
- Ze.displayName = "ScrollPane";
1695
- const Je = 300, Qe = 100, tn = 1e6, en = 100, nn = 50, on = p(f((t2, e2) => {
1696
- const { offset: n2 = 0, viewportSize: o2 = 0, totalSize: i2 = 0, minSize: r2 = 0, endGap: s2 = Je, endScrollIncrement: l2 = Qe, style: a2 = O, onMouseDown: c2, onScrollOffset: u2, onScroll: p2, scaleLimit: f2 = tn, scaleFactor: _2 = en, precisionFactor: g2 = nn, createScrollbar: y2 = Ue, ...v2 } = t2;
1700
+ rn.displayName = "ScrollPane";
1701
+ const sn = 300, ln = 100, an = 1e6, cn = 100, hn = 50, un = p(m((t2, e2) => {
1702
+ const { offset: n2 = 0, viewportSize: o2 = 0, totalSize: r2 = 0, minSize: i2 = 0, endGap: s2 = sn, endScrollIncrement: l2 = ln, style: a2 = I, onMouseDown: c2, onScrollOffset: u2, onScroll: p2, scaleLimit: m2 = an, scaleFactor: _2 = cn, precisionFactor: g2 = hn, createScrollbar: y2 = Ue, ...v2 } = t2;
1697
1703
  p2 && console.warn("onScroll not supported for VirtualScrollbar. Use onScrollOffset instead");
1698
1704
  const w2 = ht(c2, [c2]), [b2, x2] = d(false), S2 = h(() => {
1699
- const t3 = 0 === f2 ? i2 : Math.min(i2 ?? 0, Math.max(r2 ?? 0, (n2 ?? 0) + (o2 ?? 0)) + (s2 ?? 0)), e3 = 0 !== f2 && t3 > f2 ? _2 : 1, l3 = e3 / g2, a3 = Math.ceil(t3 / e3);
1700
- return { offset: Math.ceil(n2 / e3), totalSize: a3, viewportSize: Math.ceil(o2 / e3), scaledOffset: n2, scaledTotalSize: i2, scaledViewportSize: o2, factor: e3, precision: l3 };
1701
- }, [n2, i2, o2, b2, r2, s2, l2]), E2 = ht((t3, e3, n3) => {
1705
+ const t3 = 0 === m2 ? r2 : Math.min(r2 ?? 0, Math.max(i2 ?? 0, (n2 ?? 0) + (o2 ?? 0)) + (s2 ?? 0)), e3 = 0 !== m2 && t3 > m2 ? _2 : 1, l3 = e3 / g2, a3 = Math.ceil(t3 / e3);
1706
+ return { offset: Math.ceil(n2 / e3), totalSize: a3, viewportSize: Math.ceil(o2 / e3), scaledOffset: n2, scaledTotalSize: r2, scaledViewportSize: o2, factor: e3, precision: l3 };
1707
+ }, [n2, r2, o2, b2, i2, s2, l2]), E2 = ht((t3, e3, n3) => {
1702
1708
  const o3 = S2.offset;
1703
1709
  Math.abs(t3 - o3) < S2.precision && (t3 = o3), u2?.(t3 * S2.factor, o3, S2.viewportSize);
1704
- }, [u2, S2]), L2 = m((t3) => {
1705
- }, []), M2 = m((t3) => {
1710
+ }, [u2, S2]), L2 = f((t3) => {
1711
+ }, []), M2 = f((t3) => {
1706
1712
  document.removeEventListener("mousemove", L2), document.removeEventListener("mouseup", M2), x2(false);
1707
- }, []), T2 = m((t3) => {
1713
+ }, []), T2 = f((t3) => {
1708
1714
  x2(true), w2?.(t3), document.addEventListener("mousemove", L2, { passive: true }), document.addEventListener("mouseup", M2, { passive: true });
1709
1715
  }, [L2, M2]);
1710
1716
  return Ue({ style: a2, ...v2, offset: S2.offset, totalSize: S2.totalSize, viewportSize: S2.viewportSize, onMouseDown: T2, onScrollOffset: E2 }, e2);
1711
1717
  }));
1712
- on.displayName = "VirtualScrollbar";
1718
+ un.displayName = "VirtualScrollbar";
1713
1719
  export {
1714
1720
  $ as Command,
1715
1721
  q as CommandButtonType,
@@ -1731,19 +1737,19 @@ export {
1731
1737
  qt as ReactErrorBoundary,
1732
1738
  W as ReactUtils,
1733
1739
  Q as RoundedTab,
1734
- Ze as ScrollPane,
1740
+ rn as ScrollPane,
1735
1741
  Ge as ScrollUtils,
1736
- Oe as Scrollbar,
1742
+ Ie as Scrollbar,
1737
1743
  Te as ScrollbarOrientation,
1738
- I as SimpleCommand,
1744
+ K as SimpleCommand,
1739
1745
  se as SplitPane,
1740
1746
  ee as SplitPaneResizer,
1741
1747
  Z as ToolTipPlacement,
1742
1748
  Jt as UncaughtErrorBoundary,
1743
- on as VirtualScrollbar,
1749
+ un as VirtualScrollbar,
1744
1750
  ge as WalkingIcon,
1745
1751
  de as createDynamicIconService,
1746
- qe as defaultCreateScrollCorner,
1752
+ on as defaultCreateScrollCorner,
1747
1753
  Be as defaultCreateScrollEdgeButton,
1748
1754
  ze as defaultCreateScrollEndButton,
1749
1755
  Ae as defaultCreateScrollStartButton,
@@ -1756,15 +1762,15 @@ export {
1756
1762
  $t as useCopyPaste,
1757
1763
  ut as useDevicePixelRatio,
1758
1764
  zt as useEditMode,
1759
- mt as useFullscreenPortal,
1765
+ ft as useFullscreenPortal,
1760
1766
  Bt as useGlobalClipboard,
1761
1767
  Wt as useId,
1762
1768
  Ft as useImperativeElement,
1763
1769
  gt as useMouseDownAndHoldListener,
1764
- it as useNotifier,
1770
+ rt as useNotifier,
1765
1771
  pt as useOnClickOrFocusAway,
1766
1772
  xe as usePersistenceState,
1767
1773
  _t as useSynchronizedPointerHandler,
1768
- It as useTraceUpdate,
1774
+ Kt as useTraceUpdate,
1769
1775
  Ut as useUndoManager
1770
1776
  };