@archbase/layout 4.0.44 → 4.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { Menu as dt, Loader as te, useMantineTheme as ee, useComputedColorScheme as ie, Box as oe, ActionIcon as ne, useMantineColorScheme as re } from "@mantine/core";
2
- import { Card as Mi, Container as Bi, Group as Ii, Stack as Oi } from "@mantine/core";
1
+ import { Menu as at, Loader as te, useMantineTheme as ee, useComputedColorScheme as ie, Box as oe, ActionIcon as ne, useMantineColorScheme as re } from "@mantine/core";
2
+ import { Card as Mi, Container as Ii, Group as Oi, Stack as Di } from "@mantine/core";
3
3
  import { jsx as a, jsxs as F, Fragment as Et } from "react/jsx-runtime";
4
4
  import * as h from "prop-types";
5
5
  import * as O from "react";
6
- import W, { useRef as ot, useState as U, useEffect as it, useCallback as kt, useMemo as Ht } from "react";
6
+ import W, { useRef as ot, useState as q, useEffect as et, useCallback as Ht, useMemo as Wt } from "react";
7
7
  import { ResizeSensor as se } from "css-element-queries";
8
8
  import { useWindowSize as le } from "usehooks-ts";
9
- import { useArchbaseTranslation as Wt } from "@archbase/core";
9
+ import { useArchbaseTranslation as Ft } from "@archbase/core";
10
10
  import { useElementSize as ae } from "@mantine/hooks";
11
- import { PanelGroup as Ft, Panel as jt, PanelResizeHandle as Vt } from "react-resizable-panels";
11
+ import { PanelGroup as Vt, Panel as $t, PanelResizeHandle as qt } from "react-resizable-panels";
12
12
  import { IconPinnedOff as de, IconPinned as ce } from "@tabler/icons-react";
13
13
  import { MosaicWindow as he, Mosaic as ue } from "react-mosaic-component";
14
14
  import "react-mosaic-component/react-mosaic-component.css";
15
15
  import { DockviewReact as fe } from "dockview-react";
16
- function zi({ children: t }) {
16
+ function wi({ children: t }) {
17
17
  return /* @__PURE__ */ a("form", { children: t });
18
18
  }
19
- var A = /* @__PURE__ */ ((t) => (t.ViewPort = "viewport", t.Fixed = "fixed", t.Fill = "fill", t.Positioned = "positioned", t.Anchored = "anchored", t.Custom = "custom", t))(A || {}), C = /* @__PURE__ */ ((t) => (t.Left = "anchor-left", t.Right = "anchor-right", t.Top = "anchor-top", t.Bottom = "anchor-bottom", t))(C || {}), mt = /* @__PURE__ */ ((t) => (t[t.Horizontal = 0] = "Horizontal", t[t.Vertical = 1] = "Vertical", t))(mt || {}), y = /* @__PURE__ */ ((t) => (t.All = "resize-all", t.Left = "resize-left", t.Right = "resize-right", t.Top = "resize-top", t.Bottom = "resize-bottom", t.TopLeft = "resize-topleft", t.TopRight = "resize-topright", t.BottomLeft = "resize-bottomleft", t.BottomRight = "resize-bottomright", t))(y || {}), rt = /* @__PURE__ */ ((t) => (t.OverlayInside = "overlay-inside", t.Inside = "inside", t.OverlayBoundary = "overlay-boundary", t))(rt || {}), st = /* @__PURE__ */ ((t) => (t.None = "none", t.Vertical = "vertical", t.HorizontalVertical = "horizontalVertical", t))(st || {}), zt = /* @__PURE__ */ ((t) => (t.Mouse = "mousemove", t.Touch = "touchmove", t))(zt || {}), wt = /* @__PURE__ */ ((t) => (t.Mouse = "mouseup", t.Touch = "touchend", t))(wt || {});
19
+ var L = /* @__PURE__ */ ((t) => (t.ViewPort = "viewport", t.Fixed = "fixed", t.Fill = "fill", t.Positioned = "positioned", t.Anchored = "anchored", t.Custom = "custom", t))(L || {}), x = /* @__PURE__ */ ((t) => (t.Left = "anchor-left", t.Right = "anchor-right", t.Top = "anchor-top", t.Bottom = "anchor-bottom", t))(x || {}), ft = /* @__PURE__ */ ((t) => (t[t.Horizontal = 0] = "Horizontal", t[t.Vertical = 1] = "Vertical", t))(ft || {}), v = /* @__PURE__ */ ((t) => (t.All = "resize-all", t.Left = "resize-left", t.Right = "resize-right", t.Top = "resize-top", t.Bottom = "resize-bottom", t.TopLeft = "resize-topleft", t.TopRight = "resize-topright", t.BottomLeft = "resize-bottomleft", t.BottomRight = "resize-bottomright", t))(v || {}), st = /* @__PURE__ */ ((t) => (t.OverlayInside = "overlay-inside", t.Inside = "inside", t.OverlayBoundary = "overlay-boundary", t))(st || {}), lt = /* @__PURE__ */ ((t) => (t.None = "none", t.Vertical = "vertical", t.HorizontalVertical = "horizontalVertical", t))(lt || {}), zt = /* @__PURE__ */ ((t) => (t.Mouse = "mousemove", t.Touch = "touchmove", t))(zt || {}), wt = /* @__PURE__ */ ((t) => (t.Mouse = "mouseup", t.Touch = "touchend", t))(wt || {});
20
20
  function me(t, ...i) {
21
21
  const o = /* @__PURE__ */ Object.create(null);
22
22
  i.forEach((u) => {
@@ -31,20 +31,20 @@ function ge() {
31
31
  let t = Math.random() * 46656 | 0, i = Math.random() * 46656 | 0;
32
32
  return ("000" + t.toString(36)).slice(-3) + ("000" + i.toString(36)).slice(-3);
33
33
  }
34
- function $t(t) {
34
+ function Bt(t) {
35
35
  return typeof t == "string" ? t : `${t}px`;
36
36
  }
37
- function v(t, i) {
37
+ function R(t, i) {
38
38
  if (t.size === 0 && t.adjusted.length === 0 && t.resized === 0)
39
39
  return "0px";
40
40
  const o = [];
41
- if (t.size !== void 0 && o.push($t(t.size)), t.adjusted.forEach((n) => o.push($t(n))), t.resized !== 0 && o.push($t(t.resized)), o.length !== 0)
41
+ if (t.size !== void 0 && o.push(Bt(t.size)), t.adjusted.forEach((n) => o.push(Bt(n))), t.resized !== 0 && o.push(Bt(t.resized)), o.length !== 0)
42
42
  return o.length === 1 ? o[0] : i ? o.join(" + ") : `calc(${o.join(" + ")})`;
43
43
  }
44
44
  function J(...t) {
45
45
  return t.find((i) => i != null);
46
46
  }
47
- function Ct(t, i) {
47
+ function xt(t, i) {
48
48
  if (t.length !== i.length)
49
49
  return !1;
50
50
  for (var o = 0, n = t.length; o < n; o++)
@@ -63,41 +63,41 @@ function be(t, i) {
63
63
  function pe(t) {
64
64
  const i = [], o = {
65
65
  position: t.position,
66
- left: v(t.left),
67
- top: v(t.top),
68
- right: v(t.right),
69
- bottom: v(t.bottom),
70
- width: v(t.width),
71
- height: v(t.height),
66
+ left: R(t.left),
67
+ top: R(t.top),
68
+ right: R(t.right),
69
+ bottom: R(t.bottom),
70
+ width: R(t.width),
71
+ height: R(t.height),
72
72
  zIndex: t.zIndex
73
73
  }, n = [];
74
74
  o.position && n.push(`position: ${o.position};`), o.left && n.push(`left: ${o.left};`), o.top && n.push(`top: ${o.top};`), o.right && n.push(`right: ${o.right};`), o.bottom && n.push(`bottom: ${o.bottom};`), o.width && n.push(`width: ${o.width};`), o.height && n.push(`height: ${o.height};`), o.zIndex && n.push(`z-index: ${o.zIndex};`), t.allowOverflow && n.push("overflow: visible;"), n.length > 0 && i.push(`#${t.id} { ${n.join(" ")} }`), t.scrollable && i.push(`#${t.id} > .spaces-space-inner { overflow: auto; touch-action: auto; }`);
75
75
  let u = 0;
76
- const d = `${t.handleSize}px`, r = `-${t.touchHandleSize / 2 - t.handleSize / 2}px`, b = `${t.touchHandleSize / 2 - t.handleSize / 2}px`;
76
+ const d = `${t.handleSize}px`, r = `-${t.touchHandleSize / 2 - t.handleSize / 2}px`, p = `${t.touchHandleSize / 2 - t.handleSize / 2}px`;
77
77
  switch (t.handlePlacement) {
78
- case rt.Inside:
79
- case rt.OverlayInside:
80
- u = t.handleSize, t.type === A.Positioned && (u = 0);
78
+ case st.Inside:
79
+ case st.OverlayInside:
80
+ u = t.handleSize, t.type === L.Positioned && (u = 0);
81
81
  break;
82
- case rt.OverlayBoundary:
82
+ case st.OverlayBoundary:
83
83
  u = t.handleSize / 2;
84
84
  break;
85
85
  }
86
86
  const e = `${u}px`, l = (s, f) => {
87
87
  const m = [];
88
88
  f.left && m.push(`left: ${f.left}`), f.top && m.push(`top: ${f.top}`), f.right && m.push(`right: ${f.right}`), f.bottom && m.push(`bottom: ${f.bottom}`), f.width && m.push(`width: ${f.width}`), f.height && m.push(`height: ${f.height}`), i.push(`#${t.id}-${s} { ${m.join("; ")}}`);
89
- }, p = () => t.type === A.Positioned ? t.width.size && t.height.size : t.orientation == mt.Horizontal ? t.width.size : t.height.size;
89
+ }, z = () => t.type === L.Positioned ? t.width.size && t.height.size : t.orientation == ft.Horizontal ? t.width.size : t.height.size;
90
90
  return t.canResizeLeft && (t.anchor ? l("ml", {
91
- right: `calc(${v(t.right, !0)} + ${v(t.width)} - ${e})`,
91
+ right: `calc(${R(t.right, !0)} + ${R(t.width)} - ${e})`,
92
92
  top: "0",
93
93
  bottom: "0",
94
94
  width: d
95
95
  }) : l("ml", {
96
- left: `calc(${v(t.left, !0)} - ${e})`,
97
- top: v(t.top),
98
- bottom: v(t.bottom),
96
+ left: `calc(${R(t.left, !0)} - ${e})`,
97
+ top: R(t.top),
98
+ bottom: R(t.bottom),
99
99
  width: d,
100
- height: v(t.height)
100
+ height: R(t.height)
101
101
  }), l("ml:after", {
102
102
  left: r,
103
103
  right: r,
@@ -106,60 +106,60 @@ function pe(t) {
106
106
  })), t.canResizeTop && (t.anchor ? (l("mt", {
107
107
  left: "0",
108
108
  right: "0",
109
- bottom: `calc(${v(t.bottom)} + ${v(t.height)} - ${e})`,
109
+ bottom: `calc(${R(t.bottom)} + ${R(t.height)} - ${e})`,
110
110
  height: d
111
111
  }), l("mt:after", {
112
112
  top: r,
113
113
  bottom: r,
114
114
  left: r,
115
- width: v(t.width),
115
+ width: R(t.width),
116
116
  right: r
117
117
  })) : (l("mt", {
118
- top: `calc(${v(t.top, !0)} - ${e})`,
119
- left: v(t.left),
120
- right: v(t.right),
121
- width: v(t.width),
118
+ top: `calc(${R(t.top, !0)} - ${e})`,
119
+ left: R(t.left),
120
+ right: R(t.right),
121
+ width: R(t.width),
122
122
  height: d
123
- }), p() ? l("mt:after", {
123
+ }), z() ? l("mt:after", {
124
124
  top: r,
125
125
  bottom: r,
126
126
  left: r,
127
- width: `calc(${v(t.width, !0)} - ${e}) + ${b}`,
127
+ width: `calc(${R(t.width, !0)} - ${e}) + ${p}`,
128
128
  right: r
129
129
  }) : l("mt:after", {
130
130
  top: r,
131
131
  bottom: r,
132
132
  left: r,
133
- width: v(t.width),
133
+ width: R(t.width),
134
134
  right: r
135
- }))), t.canResizeRight && (p() ? l("mr", {
136
- left: `calc(${v(t.left, !0)} + ${v(t.width, !0)} - ${d} + ${e})`,
137
- top: v(t.top),
138
- bottom: v(t.bottom),
135
+ }))), t.canResizeRight && (z() ? l("mr", {
136
+ left: `calc(${R(t.left, !0)} + ${R(t.width, !0)} - ${d} + ${e})`,
137
+ top: R(t.top),
138
+ bottom: R(t.bottom),
139
139
  width: d,
140
- height: v(t.height)
140
+ height: R(t.height)
141
141
  }) : l("mr", {
142
- right: `calc(${v(t.right, !0)} - ${e})`,
143
- top: v(t.top),
144
- bottom: v(t.bottom),
142
+ right: `calc(${R(t.right, !0)} - ${e})`,
143
+ top: R(t.top),
144
+ bottom: R(t.bottom),
145
145
  width: d,
146
- height: v(t.height)
146
+ height: R(t.height)
147
147
  }), l("mr:after", {
148
148
  left: r,
149
149
  right: r,
150
150
  top: r,
151
151
  bottom: r
152
- })), t.canResizeBottom && (p() ? l("mb", {
153
- top: `calc(${v(t.top, !0)} + ${v(t.height, !0)} - ${d} + ${e})`,
154
- left: v(t.left),
155
- right: v(t.right),
156
- width: v(t.width),
152
+ })), t.canResizeBottom && (z() ? l("mb", {
153
+ top: `calc(${R(t.top, !0)} + ${R(t.height, !0)} - ${d} + ${e})`,
154
+ left: R(t.left),
155
+ right: R(t.right),
156
+ width: R(t.width),
157
157
  height: d
158
158
  }) : l("mb", {
159
- bottom: `calc(${v(t.bottom, !0)} - ${e})`,
160
- left: v(t.left),
161
- right: v(t.right),
162
- width: v(t.width),
159
+ bottom: `calc(${R(t.bottom, !0)} - ${e})`,
160
+ left: R(t.left),
161
+ right: R(t.right),
162
+ width: R(t.width),
163
163
  height: d
164
164
  }), l("mb:after", {
165
165
  top: r,
@@ -167,8 +167,8 @@ function pe(t) {
167
167
  left: r,
168
168
  right: r
169
169
  })), t.canResizeTopLeft && (l("mtl", {
170
- left: `calc(${v(t.left, !0)} - ${e})`,
171
- top: v(t.top),
170
+ left: `calc(${R(t.left, !0)} - ${e})`,
171
+ top: R(t.top),
172
172
  width: d,
173
173
  height: d
174
174
  }), l("mtl:after", {
@@ -176,14 +176,14 @@ function pe(t) {
176
176
  bottom: r,
177
177
  left: r,
178
178
  right: r
179
- })), t.canResizeTopRight && (p() ? l("mtr", {
180
- left: `calc(${v(t.left, !0)} + ${v(t.width, !0)} - ${d} + ${e})`,
181
- top: v(t.top),
179
+ })), t.canResizeTopRight && (z() ? l("mtr", {
180
+ left: `calc(${R(t.left, !0)} + ${R(t.width, !0)} - ${d} + ${e})`,
181
+ top: R(t.top),
182
182
  width: d,
183
183
  height: d
184
184
  }) : l("mtr", {
185
- right: `calc(${v(t.right, !0)} - ${e})`,
186
- top: v(t.top),
185
+ right: `calc(${R(t.right, !0)} - ${e})`,
186
+ top: R(t.top),
187
187
  width: d,
188
188
  height: d
189
189
  }), l("mtr:after", {
@@ -191,14 +191,14 @@ function pe(t) {
191
191
  bottom: r,
192
192
  left: r,
193
193
  right: r
194
- })), t.canResizeBottomLeft && (p() ? l("mbl", {
195
- top: `calc(${v(t.top, !0)} + ${v(t.height, !0)} - ${d} + ${e})`,
196
- left: v(t.left),
194
+ })), t.canResizeBottomLeft && (z() ? l("mbl", {
195
+ top: `calc(${R(t.top, !0)} + ${R(t.height, !0)} - ${d} + ${e})`,
196
+ left: R(t.left),
197
197
  width: d,
198
198
  height: d
199
199
  }) : l("mbl", {
200
- bottom: `calc(${v(t.bottom, !0)} - ${e})`,
201
- left: v(t.left),
200
+ bottom: `calc(${R(t.bottom, !0)} - ${e})`,
201
+ left: R(t.left),
202
202
  width: d,
203
203
  height: d
204
204
  }), l("mbl:after", {
@@ -206,14 +206,14 @@ function pe(t) {
206
206
  bottom: r,
207
207
  left: r,
208
208
  right: r
209
- })), t.canResizeBottomRight && (p() ? l("mbr", {
210
- left: `calc(${v(t.left, !0)} + ${v(t.width, !0)} - ${d} + ${e})`,
211
- top: `calc(${v(t.top, !0)} + ${v(t.height, !0)} - ${d} + ${e})`,
209
+ })), t.canResizeBottomRight && (z() ? l("mbr", {
210
+ left: `calc(${R(t.left, !0)} + ${R(t.width, !0)} - ${d} + ${e})`,
211
+ top: `calc(${R(t.top, !0)} + ${R(t.height, !0)} - ${d} + ${e})`,
212
212
  width: d,
213
213
  height: d
214
214
  }) : l("mbr", {
215
- right: `calc(${v(t.right, !0)} - ${e})`,
216
- bottom: `calc(${v(t.bottom, !0)} - ${e})`,
215
+ right: `calc(${R(t.right, !0)} - ${e})`,
216
+ bottom: `calc(${R(t.bottom, !0)} - ${e})`,
217
217
  width: d,
218
218
  height: d
219
219
  }), l("mbr:after", {
@@ -225,7 +225,7 @@ function pe(t) {
225
225
  }
226
226
  function yt(t) {
227
227
  const i = pe(t);
228
- if (qt())
228
+ if (Ut())
229
229
  t.ssrStyle = i;
230
230
  else {
231
231
  const o = document.getElementById(`style_${t.id}`);
@@ -241,49 +241,49 @@ function ze(t) {
241
241
  const i = document.getElementById(`style_${t.id}`);
242
242
  i && document.head.removeChild(i);
243
243
  }
244
- function qt() {
244
+ function Ut() {
245
245
  return !(typeof document < "u" && document);
246
246
  }
247
- function Rt(t) {
248
- return t === y.Left || t === y.Right;
247
+ function vt(t) {
248
+ return t === v.Left || t === v.Right;
249
249
  }
250
- function Q(t, i, o, n, u, d) {
251
- const r = i === y.Right || i === y.Bottom ? (m) => -m : (m) => m, b = Rt(i) ? n.width : n.height, e = o.resized, l = b.resized, p = Rt(i) ? t.width : t.height, s = J(n.minimumSize, 20) - p + 0, f = n.maximumSize ? n.maximumSize - p + 0 : void 0;
252
- return (m, z) => {
253
- let c = (Rt(i) ? u : d) - (Rt(i) ? m : z), g = r(c);
254
- n.type !== A.Positioned && (g = Math.max(r(c), s), g < s && (g = s), typeof f == "number" && g > f && (g = f)), o.size !== void 0 ? (o.resized = r(-c) + e, b.size && (b.resized = r(c) + l)) : b.resized = g + l;
250
+ function tt(t, i, o, n, u, d) {
251
+ const r = i === v.Right || i === v.Bottom ? (m) => -m : (m) => m, p = vt(i) ? n.width : n.height, e = o.resized, l = p.resized, z = vt(i) ? t.width : t.height, s = J(n.minimumSize, 20) - z + 0, f = n.maximumSize ? n.maximumSize - z + 0 : void 0;
252
+ return (m, w) => {
253
+ let c = (vt(i) ? u : d) - (vt(i) ? m : w), g = r(c);
254
+ n.type !== L.Positioned && (g = Math.max(r(c), s), g < s && (g = s), typeof f == "number" && g > f && (g = f)), o.size !== void 0 ? (o.resized = r(-c) + e, p.size && (p.resized = r(c) + l)) : p.resized = g + l;
255
255
  };
256
256
  }
257
257
  function we(t, i, o, n) {
258
258
  const u = i.element.getBoundingClientRect();
259
259
  switch (t) {
260
- case y.Left:
261
- return Q(u, t, i.left, i, o, n);
262
- case y.Right:
263
- return Q(u, t, i.right, i, o, n);
264
- case y.Bottom:
265
- return Q(u, t, i.bottom, i, o, n);
266
- case y.Top:
267
- return Q(u, t, i.top, i, o, n);
268
- case y.TopLeft:
269
- const d = Q(u, y.Top, i.top, i, o, n), r = Q(u, y.Left, i.left, i, o, n);
270
- return (m, z) => {
271
- d(m, z), r(m, z);
260
+ case v.Left:
261
+ return tt(u, t, i.left, i, o, n);
262
+ case v.Right:
263
+ return tt(u, t, i.right, i, o, n);
264
+ case v.Bottom:
265
+ return tt(u, t, i.bottom, i, o, n);
266
+ case v.Top:
267
+ return tt(u, t, i.top, i, o, n);
268
+ case v.TopLeft:
269
+ const d = tt(u, v.Top, i.top, i, o, n), r = tt(u, v.Left, i.left, i, o, n);
270
+ return (m, w) => {
271
+ d(m, w), r(m, w);
272
272
  };
273
- case y.TopRight:
274
- const b = Q(u, y.Top, i.top, i, o, n), e = Q(u, y.Right, i.right, i, o, n);
275
- return (m, z) => {
276
- b(m, z), e(m, z);
273
+ case v.TopRight:
274
+ const p = tt(u, v.Top, i.top, i, o, n), e = tt(u, v.Right, i.right, i, o, n);
275
+ return (m, w) => {
276
+ p(m, w), e(m, w);
277
277
  };
278
- case y.BottomLeft:
279
- const l = Q(u, y.Bottom, i.bottom, i, o, n), p = Q(u, y.Left, i.left, i, o, n);
280
- return (m, z) => {
281
- l(m, z), p(m, z);
278
+ case v.BottomLeft:
279
+ const l = tt(u, v.Bottom, i.bottom, i, o, n), z = tt(u, v.Left, i.left, i, o, n);
280
+ return (m, w) => {
281
+ l(m, w), z(m, w);
282
282
  };
283
- case y.BottomRight:
284
- const s = Q(u, y.Bottom, i.bottom, i, o, n), f = Q(u, y.Right, i.right, i, o, n);
285
- return (m, z) => {
286
- s(m, z), f(m, z);
283
+ case v.BottomRight:
284
+ const s = tt(u, v.Bottom, i.bottom, i, o, n), f = tt(u, v.Right, i.right, i, o, n);
285
+ return (m, w) => {
286
+ s(m, w), f(m, w);
287
287
  };
288
288
  default:
289
289
  throw `Resize type ${t} not supported`;
@@ -291,7 +291,7 @@ function we(t, i, o, n) {
291
291
  }
292
292
  function ye(t) {
293
293
  return {
294
- startResize(i, o, n, u, d, r, b) {
294
+ startResize(i, o, n, u, d, r, p) {
295
295
  if (n.onResizeStart) {
296
296
  const g = n.onResizeStart(o);
297
297
  if (typeof g == "boolean" && !g)
@@ -299,60 +299,60 @@ function ye(t) {
299
299
  }
300
300
  const e = r(i), l = we(o, n, e.x, e.y);
301
301
  n.resizing = !0, n.updateParent();
302
- let p = 0, s = 0, f = !1;
303
- const m = (g, R) => {
304
- l(g, R), t.updateStyles(n);
305
- }, z = (g) => {
302
+ let z = 0, s = 0, f = !1;
303
+ const m = (g, y) => {
304
+ l(g, y), t.updateStyles(n);
305
+ }, w = (g) => {
306
306
  f = !0;
307
- const R = r(g);
308
- p = R.x, s = R.y, g.preventDefault(), window.requestAnimationFrame(() => {
309
- n.resizing && m(p, s);
307
+ const y = r(g);
308
+ z = y.x, s = y.y, g.preventDefault(), window.requestAnimationFrame(() => {
309
+ n.resizing && m(z, s);
310
310
  });
311
311
  }, c = () => {
312
- n.resizing = !1, f && m(p, s), window.removeEventListener(d, z), window.removeEventListener(u, c), n.updateParent();
313
- const g = b || n.onResizeEnd;
312
+ n.resizing = !1, f && m(z, s), window.removeEventListener(d, w), window.removeEventListener(u, c), n.updateParent();
313
+ const g = p || n.onResizeEnd;
314
314
  if (g) {
315
- const R = n.element.getBoundingClientRect();
316
- g(Math.floor(Rt(o) ? R.width : R.height), R, o);
315
+ const y = n.element.getBoundingClientRect();
316
+ g(Math.floor(vt(o) ? y.width : y.height), y, o);
317
317
  }
318
318
  };
319
- window.addEventListener(d, z), window.addEventListener(u, c);
319
+ window.addEventListener(d, w), window.addEventListener(u, c);
320
320
  }
321
321
  };
322
322
  }
323
- function Re(t) {
323
+ function ve(t) {
324
324
  function i(o, n, u, d, r) {
325
- const b = -(n - d), e = -(u - r);
326
- o.left.adjusted = [b], o.top.adjusted = [e], o.right.size && (o.right.adjusted = [-b]), o.bottom.size && (o.bottom.adjusted = [-e]), t.updateStyles(o);
325
+ const p = -(n - d), e = -(u - r);
326
+ o.left.adjusted = [p], o.top.adjusted = [e], o.right.size && (o.right.adjusted = [-p]), o.bottom.size && (o.bottom.adjusted = [-e]), t.updateStyles(o);
327
327
  }
328
328
  return {
329
- startDrag(o, n, u, d, r, b) {
329
+ startDrag(o, n, u, d, r, p) {
330
330
  if (n.element) {
331
- const e = r(o), l = n.left.adjusted.length === 0 ? 0 : n.left.adjusted[0], p = n.top.adjusted.length === 0 ? 0 : n.top.adjusted[0], s = e.x - l, f = e.y - p;
332
- let m = 0, z = 0, c = !1;
333
- const g = (I, L) => i(n, s, f, I, L), R = be(g, 5), S = (I) => {
331
+ const e = r(o), l = n.left.adjusted.length === 0 ? 0 : n.left.adjusted[0], z = n.top.adjusted.length === 0 ? 0 : n.top.adjusted[0], s = e.x - l, f = e.y - z;
332
+ let m = 0, w = 0, c = !1;
333
+ const g = (M, j) => i(n, s, f, M, j), y = be(g, 5), S = (M) => {
334
334
  c = !0;
335
- const L = r(I);
336
- m = L.x, z = L.y, I.preventDefault(), R(m, z);
337
- }, w = () => {
338
- if (c && g(m, z), window.removeEventListener(d, S), window.removeEventListener(u, w), b) {
339
- const I = n.parentId && t.getSpace(n.parentId)?.element.getBoundingClientRect() || {
335
+ const j = r(M);
336
+ m = j.x, w = j.y, M.preventDefault(), y(m, w);
337
+ }, b = () => {
338
+ if (c && g(m, w), window.removeEventListener(d, S), window.removeEventListener(u, b), p) {
339
+ const M = n.parentId && t.getSpace(n.parentId)?.element.getBoundingClientRect() || {
340
340
  left: 0,
341
341
  top: 0
342
- }, L = (({ left: N, top: x, right: T, bottom: P, width: k, height: E }) => ({ left: N, top: x, right: T, bottom: P, width: k, height: E }))(
342
+ }, j = (({ left: N, top: T, right: C, bottom: D, width: P, height: E }) => ({ left: N, top: T, right: C, bottom: D, width: P, height: E }))(
343
343
  n.element.getBoundingClientRect()
344
344
  );
345
- b(
345
+ p(
346
346
  {
347
- ...L,
348
- left: L.left - I.left,
349
- top: L.top - I.top
347
+ ...j,
348
+ left: j.left - M.left,
349
+ top: j.top - M.top
350
350
  },
351
351
  c
352
352
  );
353
353
  }
354
354
  };
355
- window.addEventListener(d, S), window.addEventListener(u, w);
355
+ window.addEventListener(d, S), window.addEventListener(u, b);
356
356
  }
357
357
  }
358
358
  };
@@ -367,41 +367,41 @@ const bt = {
367
367
  dimension: { left: 0, top: 0, right: 0, bottom: 0, width: 0, height: 0, x: 0, y: 0, toJSON: () => "" },
368
368
  handleSize: 5,
369
369
  touchHandleSize: 5,
370
- handlePlacement: rt.OverlayInside,
370
+ handlePlacement: st.OverlayInside,
371
371
  adjustLeft: () => !1,
372
372
  adjustRight: () => !1,
373
373
  adjustTop: () => !1,
374
374
  adjustBottom: () => !1,
375
375
  adjustEdge: () => !1,
376
376
  anchoredChildren: () => []
377
- }, ve = [C.Left, C.Top, C.Right, C.Bottom];
377
+ }, Re = [x.Left, x.Top, x.Right, x.Bottom];
378
378
  function _t(t) {
379
- return t === A.ViewPort ? "fixed" : t === A.Fixed ? "relative" : "absolute";
379
+ return t === L.ViewPort ? "fixed" : t === L.Fixed ? "relative" : "absolute";
380
380
  }
381
381
  function Nt(t) {
382
- return t === C.Bottom || t === C.Top ? mt.Vertical : mt.Horizontal;
382
+ return t === x.Bottom || t === x.Top ? ft.Vertical : ft.Horizontal;
383
383
  }
384
384
  function Se(t) {
385
385
  return [
386
386
  {
387
- anchor: C.Left,
387
+ anchor: x.Left,
388
388
  update: t.adjustLeft
389
389
  },
390
390
  {
391
- anchor: C.Top,
391
+ anchor: x.Top,
392
392
  update: t.adjustTop
393
393
  },
394
394
  {
395
- anchor: C.Right,
395
+ anchor: x.Right,
396
396
  update: t.adjustRight
397
397
  },
398
398
  {
399
- anchor: C.Bottom,
399
+ anchor: x.Bottom,
400
400
  update: t.adjustBottom
401
401
  }
402
402
  ];
403
403
  }
404
- function ut(t) {
404
+ function ht(t) {
405
405
  return { size: t, adjusted: [], resized: 0 };
406
406
  }
407
407
  function Te() {
@@ -409,34 +409,34 @@ function Te() {
409
409
  const i = (e) => {
410
410
  t = e;
411
411
  }, o = (e) => n().find((l) => l.id === e), n = () => t, u = (e) => {
412
- const l = (z, c, g) => g.indexOf(z) === c, s = ((z) => {
412
+ const l = (w, c, g) => g.indexOf(w) === c, s = ((w) => {
413
413
  let c = [];
414
- return ve.forEach((g) => {
415
- const R = z.filter((w) => w.anchor !== void 0 && w.anchor === g);
416
- R.map((w) => w.zIndex).filter(l).forEach((w) => {
417
- const I = R.filter((T) => T.zIndex === w), L = I.filter((T) => T.order !== void 0), N = I.filter((T) => T.order === void 0);
418
- var x = L.length > 0 ? L.map((T) => T.order).reduce((T, P) => Math.max(T, P)) : 0;
419
- c = [...c, ...L, ...N.map((T, P) => ({ ...T, order: x + P + 1 }))];
414
+ return Re.forEach((g) => {
415
+ const y = w.filter((b) => b.anchor !== void 0 && b.anchor === g);
416
+ y.map((b) => b.zIndex).filter(l).forEach((b) => {
417
+ const M = y.filter((C) => C.zIndex === b), j = M.filter((C) => C.order !== void 0), N = M.filter((C) => C.order === void 0);
418
+ var T = j.length > 0 ? j.map((C) => C.order).reduce((C, D) => Math.max(C, D)) : 0;
419
+ c = [...c, ...j, ...N.map((C, D) => ({ ...C, order: T + D + 1 }))];
420
420
  });
421
- }), [...c, ...z.filter((g) => g.anchor === void 0)];
421
+ }), [...c, ...w.filter((g) => g.anchor === void 0)];
422
422
  })(e.children);
423
423
  for (var f = 0, m = s.length; f < m; f++) {
424
- const z = s[f];
424
+ const w = s[f];
425
425
  let c = !1;
426
- if (z.type === A.Fill)
427
- Se(z).forEach((g) => {
428
- const R = [];
429
- e.anchoredChildren(s, g.anchor, z.zIndex).forEach((w) => {
430
- w.orientation === mt.Vertical ? (w.height.size && R.push(w.height.size), w.height.resized && R.push(w.height.resized)) : (w.width.size && R.push(w.width.size), w.width.resized && R.push(w.width.resized));
431
- }), g.update(R) && (c = !0);
426
+ if (w.type === L.Fill)
427
+ Se(w).forEach((g) => {
428
+ const y = [];
429
+ e.anchoredChildren(s, g.anchor, w.zIndex).forEach((b) => {
430
+ b.orientation === ft.Vertical ? (b.height.size && y.push(b.height.size), b.height.resized && y.push(b.height.resized)) : (b.width.size && y.push(b.width.size), b.width.resized && y.push(b.width.resized));
431
+ }), g.update(y) && (c = !0);
432
432
  });
433
- else if (z.type === A.Anchored) {
433
+ else if (w.type === L.Anchored) {
434
434
  const g = [];
435
- e.anchoredChildren(s, z.anchor, z.zIndex).filter((S) => S.id !== z.id && S.order <= z.order).forEach((S) => {
436
- S.orientation === mt.Vertical ? (S.height.size && g.push(S.height.size), S.height.resized && g.push(S.height.resized)) : (S.width.size && g.push(S.width.size), S.width.resized && g.push(S.width.resized));
437
- }), z.adjustEdge(g) && (c = !0);
435
+ e.anchoredChildren(s, w.anchor, w.zIndex).filter((S) => S.id !== w.id && S.order <= w.order).forEach((S) => {
436
+ S.orientation === ft.Vertical ? (S.height.size && g.push(S.height.size), S.height.resized && g.push(S.height.resized)) : (S.width.size && g.push(S.width.size), S.width.resized && g.push(S.width.resized));
437
+ }), w.adjustEdge(g) && (c = !0);
438
438
  }
439
- c && yt(z);
439
+ c && yt(w);
440
440
  }
441
441
  }, d = {
442
442
  getSpaces: n,
@@ -451,7 +451,7 @@ function Te() {
451
451
  removeSpace: (e) => {
452
452
  if (i(n().filter((l) => l.id !== e.id)), e.parentId) {
453
453
  const l = o(e.parentId);
454
- l && (l.children = l.children.filter((p) => p.id !== e.id), u(l));
454
+ l && (l.children = l.children.filter((z) => z.id !== e.id), u(l));
455
455
  }
456
456
  ze(e);
457
457
  },
@@ -464,25 +464,25 @@ function Te() {
464
464
  },
465
465
  updateSpace: (e, l) => {
466
466
  const {
467
- type: p,
467
+ type: z,
468
468
  anchor: s,
469
469
  order: f,
470
470
  zIndex: m,
471
- scrollable: z,
471
+ scrollable: w,
472
472
  position: c,
473
473
  centerContent: g,
474
- minimumSize: R,
474
+ minimumSize: y,
475
475
  maximumSize: S,
476
- handleSize: w,
477
- touchHandleSize: I,
478
- handlePlacement: L,
476
+ handleSize: b,
477
+ touchHandleSize: M,
478
+ handlePlacement: j,
479
479
  allowOverflow: N
480
- } = l, x = c && c.leftResizable || !1, T = c && c.rightResizable || !1, P = c && c.topResizable || !1, k = c && c.bottomResizable || !1, E = c && c.topLeftResizable || !1, K = c && c.topRightResizable || !1, _ = c && c.bottomLeftResizable || !1, tt = c && c.bottomRightResizable || !1;
481
- let $ = !1;
482
- if (e.type !== p && (e.type = p, e.position = _t(p), $ = !0), e.anchor !== s && (e.anchor = s, e.orientation = Nt(s), $ = !0, p === A.Anchored && (s === C.Left ? e.adjustEdge = e.adjustLeft : s === C.Top ? e.adjustEdge = e.adjustTop : s === C.Right ? e.adjustEdge = e.adjustRight : s === C.Bottom && (e.adjustEdge = e.adjustBottom))), e.left.size !== (c && c.left) && (e.left.size = c && c.left, e.left.resized = 0, e.left.adjusted = [], $ = !0), e.right.size !== (c && c.right) && (e.right.size = c && c.right, e.right.resized = 0, e.right.adjusted = [], $ = !0), e.top.size !== (c && c.top) && (e.top.size = c && c.top, e.top.resized = 0, e.top.adjusted = [], $ = !0), e.bottom.size !== (c && c.bottom) && (e.bottom.size = c && c.bottom, e.bottom.resized = 0, e.bottom.adjusted = [], $ = !0), e.width.size !== (c && c.width) && (e.width.size = c && c.width, e.width.resized = 0, e.width.adjusted = [], $ = !0), e.height.size !== (c && c.height) && (e.height.size = c && c.height, e.height.resized = 0, e.height.adjusted = [], $ = !0), J(e.order, 0) !== J(f, 0) && (e.order = J(f, 0), $ = !0), J(e.zIndex, 0) !== J(m, 0) && (e.zIndex = J(m, 0), $ = !0), J(e.scrollable, !1) !== J(z, !1) && (e.scrollable = J(z, !1), $ = !0), e.minimumSize !== R && (e.minimumSize = R, $ = !0), e.maximumSize !== S && (e.maximumSize = S, $ = !0), J(e.centerContent, st.None) !== J(g, st.None) && (e.centerContent = J(g, st.None), $ = !0), e.handleSize !== w && (e.handleSize = w || bt.handleSize, $ = !0), e.touchHandleSize !== I && (e.touchHandleSize = I || bt.touchHandleSize, $ = !0), e.handlePlacement !== L && (e.handlePlacement = L || bt.handlePlacement, $ = !0), e.canResizeBottom !== k && (e.canResizeBottom = k, $ = !0), e.canResizeTop !== P && (e.canResizeTop = P, $ = !0), e.canResizeLeft !== x && (e.canResizeLeft = x, $ = !0), e.canResizeRight !== T && (e.canResizeRight = T, $ = !0), e.canResizeTopLeft !== E && (e.canResizeTopLeft = E, $ = !0), e.canResizeTopRight !== K && (e.canResizeTopRight = K, $ = !0), e.canResizeBottomLeft !== _ && (e.canResizeBottomLeft = _, $ = !0), e.canResizeBottomRight !== tt && (e.canResizeBottomRight = tt, $ = !0), e.allowOverflow !== N && (e.allowOverflow = N || bt.allowOverflow, $ = !0), $) {
480
+ } = l, T = c && c.leftResizable || !1, C = c && c.rightResizable || !1, D = c && c.topResizable || !1, P = c && c.bottomResizable || !1, E = c && c.topLeftResizable || !1, Z = c && c.topRightResizable || !1, k = c && c.bottomLeftResizable || !1, it = c && c.bottomRightResizable || !1;
481
+ let B = !1;
482
+ if (e.type !== z && (e.type = z, e.position = _t(z), B = !0), e.anchor !== s && (e.anchor = s, e.orientation = Nt(s), B = !0, z === L.Anchored && (s === x.Left ? e.adjustEdge = e.adjustLeft : s === x.Top ? e.adjustEdge = e.adjustTop : s === x.Right ? e.adjustEdge = e.adjustRight : s === x.Bottom && (e.adjustEdge = e.adjustBottom))), e.left.size !== (c && c.left) && (e.left.size = c && c.left, e.left.resized = 0, e.left.adjusted = [], B = !0), e.right.size !== (c && c.right) && (e.right.size = c && c.right, e.right.resized = 0, e.right.adjusted = [], B = !0), e.top.size !== (c && c.top) && (e.top.size = c && c.top, e.top.resized = 0, e.top.adjusted = [], B = !0), e.bottom.size !== (c && c.bottom) && (e.bottom.size = c && c.bottom, e.bottom.resized = 0, e.bottom.adjusted = [], B = !0), e.width.size !== (c && c.width) && (e.width.size = c && c.width, e.width.resized = 0, e.width.adjusted = [], B = !0), e.height.size !== (c && c.height) && (e.height.size = c && c.height, e.height.resized = 0, e.height.adjusted = [], B = !0), J(e.order, 0) !== J(f, 0) && (e.order = J(f, 0), B = !0), J(e.zIndex, 0) !== J(m, 0) && (e.zIndex = J(m, 0), B = !0), J(e.scrollable, !1) !== J(w, !1) && (e.scrollable = J(w, !1), B = !0), e.minimumSize !== y && (e.minimumSize = y, B = !0), e.maximumSize !== S && (e.maximumSize = S, B = !0), J(e.centerContent, lt.None) !== J(g, lt.None) && (e.centerContent = J(g, lt.None), B = !0), e.handleSize !== b && (e.handleSize = b || bt.handleSize, B = !0), e.touchHandleSize !== M && (e.touchHandleSize = M || bt.touchHandleSize, B = !0), e.handlePlacement !== j && (e.handlePlacement = j || bt.handlePlacement, B = !0), e.canResizeBottom !== P && (e.canResizeBottom = P, B = !0), e.canResizeTop !== D && (e.canResizeTop = D, B = !0), e.canResizeLeft !== T && (e.canResizeLeft = T, B = !0), e.canResizeRight !== C && (e.canResizeRight = C, B = !0), e.canResizeTopLeft !== E && (e.canResizeTopLeft = E, B = !0), e.canResizeTopRight !== Z && (e.canResizeTopRight = Z, B = !0), e.canResizeBottomLeft !== k && (e.canResizeBottomLeft = k, B = !0), e.canResizeBottomRight !== it && (e.canResizeBottomRight = it, B = !0), e.allowOverflow !== N && (e.allowOverflow = N || bt.allowOverflow, B = !0), B) {
483
483
  if (e.parentId) {
484
- const V = o(e.parentId);
485
- V && u(V);
484
+ const U = o(e.parentId);
485
+ U && u(U);
486
486
  }
487
487
  yt(e);
488
488
  }
@@ -492,17 +492,17 @@ function Te() {
492
492
  startTouchResize: () => null,
493
493
  startMouseDrag: () => null,
494
494
  startTouchDrag: () => null
495
- }, r = ye(d), b = Re(d);
496
- return d.createSpace = (e, l, p) => {
497
- const { position: s, anchor: f, type: m, ...z } = l, c = s && s.rightResizable || !1, g = s && s.leftResizable || !1, R = s && s.bottomResizable || !1, S = s && s.topResizable || !1, w = s && s.topLeftResizable || !1, I = s && s.topRightResizable || !1, L = s && s.bottomLeftResizable || !1, N = s && s.bottomRightResizable || !1, x = {
495
+ }, r = ye(d), p = ve(d);
496
+ return d.createSpace = (e, l, z) => {
497
+ const { position: s, anchor: f, type: m, ...w } = l, c = s && s.rightResizable || !1, g = s && s.leftResizable || !1, y = s && s.bottomResizable || !1, S = s && s.topResizable || !1, b = s && s.topLeftResizable || !1, M = s && s.topRightResizable || !1, j = s && s.bottomLeftResizable || !1, N = s && s.bottomRightResizable || !1, T = {
498
498
  ...bt,
499
- ...z,
499
+ ...w,
500
500
  store: d,
501
- update: p,
501
+ update: z,
502
502
  updateParent: () => {
503
503
  if (e) {
504
- const T = d.getSpace(e);
505
- T && T.update();
504
+ const C = d.getSpace(e);
505
+ C && C.update();
506
506
  }
507
507
  },
508
508
  parentId: e,
@@ -511,25 +511,25 @@ function Te() {
511
511
  type: m,
512
512
  orientation: Nt(f),
513
513
  position: _t(m),
514
- left: ut(s && s.left),
515
- right: ut(s && s.right),
516
- top: ut(s && s.top),
517
- bottom: ut(s && s.bottom),
518
- width: ut(s && s.width),
519
- height: ut(s && s.height),
514
+ left: ht(s && s.left),
515
+ right: ht(s && s.right),
516
+ top: ht(s && s.top),
517
+ bottom: ht(s && s.bottom),
518
+ width: ht(s && s.width),
519
+ height: ht(s && s.height),
520
520
  canResizeLeft: c,
521
521
  canResizeRight: g,
522
- canResizeTop: R,
522
+ canResizeTop: y,
523
523
  canResizeBottom: S,
524
- canResizeTopLeft: w,
525
- canResizeTopRight: I,
526
- canResizeBottomLeft: L,
524
+ canResizeTopLeft: b,
525
+ canResizeTopRight: M,
526
+ canResizeBottomLeft: j,
527
527
  canResizeBottomRight: N
528
528
  };
529
- return x.anchoredChildren = (T, P, k) => T.filter((E) => E.type === A.Anchored && E.anchor === P && E.zIndex === k), x.adjustLeft = (T) => Ct(x.left.adjusted, T) ? !1 : (x.left.adjusted = T, !0), x.adjustRight = (T) => Ct(x.right.adjusted, T) ? !1 : (x.right.adjusted = T, !0), x.adjustTop = (T) => Ct(x.top.adjusted, T) ? !1 : (x.top.adjusted = T, !0), x.adjustBottom = (T) => Ct(x.bottom.adjusted, T) ? !1 : (x.bottom.adjusted = T, !0), m === A.Anchored && (f === C.Left ? x.adjustEdge = x.adjustLeft : f === C.Top ? x.adjustEdge = x.adjustTop : f === C.Right ? x.adjustEdge = x.adjustRight : f === C.Bottom && (x.adjustEdge = x.adjustBottom)), x;
530
- }, d.startMouseResize = (e, l, p, s) => {
529
+ return T.anchoredChildren = (C, D, P) => C.filter((E) => E.type === L.Anchored && E.anchor === D && E.zIndex === P), T.adjustLeft = (C) => xt(T.left.adjusted, C) ? !1 : (T.left.adjusted = C, !0), T.adjustRight = (C) => xt(T.right.adjusted, C) ? !1 : (T.right.adjusted = C, !0), T.adjustTop = (C) => xt(T.top.adjusted, C) ? !1 : (T.top.adjusted = C, !0), T.adjustBottom = (C) => xt(T.bottom.adjusted, C) ? !1 : (T.bottom.adjusted = C, !0), m === L.Anchored && (f === x.Left ? T.adjustEdge = T.adjustLeft : f === x.Top ? T.adjustEdge = T.adjustTop : f === x.Right ? T.adjustEdge = T.adjustRight : f === x.Bottom && (T.adjustEdge = T.adjustBottom)), T;
530
+ }, d.startMouseResize = (e, l, z, s) => {
531
531
  r.startResize(
532
- p,
532
+ z,
533
533
  e,
534
534
  l,
535
535
  wt.Mouse,
@@ -540,9 +540,9 @@ function Te() {
540
540
  }),
541
541
  s
542
542
  );
543
- }, d.startTouchResize = (e, l, p, s) => {
543
+ }, d.startTouchResize = (e, l, z, s) => {
544
544
  r.startResize(
545
- p,
545
+ z,
546
546
  e,
547
547
  l,
548
548
  wt.Touch,
@@ -553,8 +553,8 @@ function Te() {
553
553
  }),
554
554
  s
555
555
  );
556
- }, d.startMouseDrag = (e, l, p) => {
557
- b.startDrag(
556
+ }, d.startMouseDrag = (e, l, z) => {
557
+ p.startDrag(
558
558
  l,
559
559
  e,
560
560
  wt.Mouse,
@@ -563,10 +563,10 @@ function Te() {
563
563
  x: s.clientX,
564
564
  y: s.clientY
565
565
  }),
566
- p
566
+ z
567
567
  );
568
- }, d.startTouchDrag = (e, l, p) => {
569
- b.startDrag(
568
+ }, d.startTouchDrag = (e, l, z) => {
569
+ p.startDrag(
570
570
  l,
571
571
  e,
572
572
  wt.Touch,
@@ -575,21 +575,21 @@ function Te() {
575
575
  x: s.touches[0].clientX,
576
576
  y: s.touches[0].clientY
577
577
  }),
578
- p
578
+ z
579
579
  );
580
580
  }, d;
581
581
  }
582
- const Ut = (t) => {
583
- const i = ot(void 0), o = ot(!1), n = ot(!1), [u, d] = U(0);
584
- o.current && (n.current = !0), it(() => (o.current || (i.current = t(), o.current = !0), d((r) => r + 1), () => {
582
+ const Xt = (t) => {
583
+ const i = ot(void 0), o = ot(!1), n = ot(!1), [u, d] = q(0);
584
+ o.current && (n.current = !0), et(() => (o.current || (i.current = t(), o.current = !0), d((r) => r + 1), () => {
585
585
  n.current && i.current && i.current();
586
586
  }), []);
587
- }, Mt = O.createContext(void 0), Bt = O.createContext(void 0), At = O.createContext(void 0), Xt = O.createContext({}), Gt = Te(), vt = {
587
+ }, jt = O.createContext(void 0), Mt = O.createContext(void 0), At = O.createContext(void 0), Gt = O.createContext({}), Jt = Te(), Rt = {
588
588
  id: h.string,
589
589
  className: h.string,
590
590
  style: h.oneOfType([h.object, h.array]),
591
591
  as: h.any,
592
- centerContent: h.oneOf([st.None, st.Vertical, st.HorizontalVertical]),
592
+ centerContent: h.oneOf([lt.None, lt.Vertical, lt.HorizontalVertical]),
593
593
  zIndex: h.number,
594
594
  scrollable: h.bool,
595
595
  trackSize: h.bool,
@@ -605,14 +605,14 @@ const Ut = (t) => {
605
605
  onTouchMove: h.func,
606
606
  onTouchEnd: h.func
607
607
  };
608
- function xe() {
608
+ function Ce() {
609
609
  const [, t] = O.useState(0);
610
610
  return O.useCallback(() => {
611
611
  t((i) => i + 1);
612
612
  }, []);
613
613
  }
614
- function Jt() {
615
- if (ft) {
614
+ function Zt() {
615
+ if (ut) {
616
616
  if (O.version && O.version.startsWith("18"))
617
617
  return `s${O.useId().replace(/\:/g, "")}`;
618
618
  if (typeof O.useId == "function")
@@ -620,18 +620,18 @@ function Jt() {
620
620
  }
621
621
  return `s${ge()}`;
622
622
  }
623
- function Ce(t) {
624
- const i = Gt, o = xe(), n = O.useContext(Mt), u = O.useContext(At), { debug: d } = O.useContext(Xt), r = Jt(), [b] = O.useState(t.id || r), e = O.useRef(null), l = O.useRef(void 0), [p, s] = O.useState();
625
- let f = i.getSpace(b);
623
+ function xe(t) {
624
+ const i = Jt, o = Ce(), n = O.useContext(jt), u = O.useContext(At), { debug: d } = O.useContext(Gt), r = Zt(), [p] = O.useState(t.id || r), e = O.useRef(null), l = O.useRef(void 0), [z, s] = O.useState();
625
+ let f = i.getSpace(p);
626
626
  d && console.table(i.getSpaces());
627
627
  const m = {
628
628
  ...t,
629
- id: b,
629
+ id: p,
630
630
  zIndex: J(t.zIndex, u)
631
631
  };
632
632
  f ? i.updateSpace(f, m) : (f = i.createSpace(n, m, o), i.addSpace(f));
633
- const z = Le(i, f);
634
- return Ut(() => {
633
+ const w = Le(i, f);
634
+ return Xt(() => {
635
635
  const c = e.current ? e.current.getBoundingClientRect() : new DOMRect();
636
636
  return f.dimension = {
637
637
  ...c,
@@ -652,25 +652,25 @@ function Ce(t) {
652
652
  })), () => {
653
653
  l.current && l.current.detach(), i.removeSpace(f);
654
654
  };
655
- }), { space: f, resizeHandles: z, domRect: p, elementRef: e };
655
+ }), { space: f, resizeHandles: w, domRect: z, elementRef: e };
656
656
  }
657
657
  const Ae = [
658
- { id: "ml", className: "resize-left", resizeType: y.Left, condition: (t) => t.canResizeLeft },
659
- { id: "mr", className: "resize-right", resizeType: y.Right, condition: (t) => t.canResizeRight },
660
- { id: "mt", className: "resize-top", resizeType: y.Top, condition: (t) => t.canResizeTop },
661
- { id: "mb", className: "resize-bottom", resizeType: y.Bottom, condition: (t) => t.canResizeBottom },
662
- { id: "mtl", className: "resize-top-left", resizeType: y.TopLeft, condition: (t) => t.canResizeTopLeft },
663
- { id: "mtr", className: "resize-top-right", resizeType: y.TopRight, condition: (t) => t.canResizeTopRight },
658
+ { id: "ml", className: "resize-left", resizeType: v.Left, condition: (t) => t.canResizeLeft },
659
+ { id: "mr", className: "resize-right", resizeType: v.Right, condition: (t) => t.canResizeRight },
660
+ { id: "mt", className: "resize-top", resizeType: v.Top, condition: (t) => t.canResizeTop },
661
+ { id: "mb", className: "resize-bottom", resizeType: v.Bottom, condition: (t) => t.canResizeBottom },
662
+ { id: "mtl", className: "resize-top-left", resizeType: v.TopLeft, condition: (t) => t.canResizeTopLeft },
663
+ { id: "mtr", className: "resize-top-right", resizeType: v.TopRight, condition: (t) => t.canResizeTopRight },
664
664
  {
665
665
  id: "mbl",
666
666
  className: "resize-bottom-left",
667
- resizeType: y.BottomLeft,
667
+ resizeType: v.BottomLeft,
668
668
  condition: (t) => t.canResizeBottomLeft
669
669
  },
670
670
  {
671
671
  id: "mbr",
672
672
  className: "resize-bottom-right",
673
- resizeType: y.BottomRight,
673
+ resizeType: v.BottomRight,
674
674
  condition: (t) => t.canResizeBottomRight
675
675
  }
676
676
  ];
@@ -680,8 +680,8 @@ function Le(t, i) {
680
680
  id: `${i.id}-${u}`,
681
681
  key: u,
682
682
  className: `spaces-resize-handle ${d}`,
683
- onMouseDown: (b) => t.startMouseResize(r, i, b),
684
- onTouchStart: (b) => t.startTouchResize(r, i, b)
683
+ onMouseDown: (p) => t.startMouseResize(r, i, p),
684
+ onTouchStart: (p) => t.startTouchResize(r, i, p)
685
685
  });
686
686
  };
687
687
  return Ae.forEach((u) => {
@@ -690,14 +690,14 @@ function Le(t, i) {
690
690
  mouseHandles: o
691
691
  };
692
692
  }
693
- function wi() {
694
- const t = Gt, i = O.useContext(Mt), o = i ? t.getSpace(i) : void 0, n = O.useContext(Bt), u = O.useContext(At), d = O.useCallback(
695
- (p, s) => o ? t.startMouseDrag(o, p, s) : null,
693
+ function yi() {
694
+ const t = Jt, i = O.useContext(jt), o = i ? t.getSpace(i) : void 0, n = O.useContext(Mt), u = O.useContext(At), d = O.useCallback(
695
+ (z, s) => o ? t.startMouseDrag(o, z, s) : null,
696
696
  [i]
697
697
  ), r = O.useCallback(
698
- (p, s) => o ? t.startTouchDrag(o, p, s) : null,
698
+ (z, s) => o ? t.startTouchDrag(o, z, s) : null,
699
699
  [i]
700
- ), b = O.useCallback(() => o ? t.updateStyles(o) : null, [i]);
700
+ ), p = O.useCallback(() => o ? t.updateStyles(o) : null, [i]);
701
701
  return {
702
702
  size: {
703
703
  ...{ width: 0, height: 0, x: 0, y: 0 },
@@ -706,108 +706,108 @@ function wi() {
706
706
  layer: u || 0,
707
707
  startMouseDrag: d,
708
708
  startTouchDrag: r,
709
- forceUpdate: b
709
+ forceUpdate: p
710
710
  };
711
711
  }
712
- let ft = !1;
713
- function yi() {
714
- ft = !0;
712
+ let ut = !1;
713
+ function vi() {
714
+ ut = !0;
715
715
  }
716
- const $e = (t) => /* @__PURE__ */ a("div", { className: "spaces-centered", children: t.children }), je = (t) => /* @__PURE__ */ a("div", { className: "spaces-centered-vertically", children: t.children });
717
- function Me(t, i) {
716
+ const Be = (t) => /* @__PURE__ */ a("div", { className: "spaces-centered", children: t.children }), $e = (t) => /* @__PURE__ */ a("div", { className: "spaces-centered-vertically", children: t.children });
717
+ function je(t, i) {
718
718
  switch (i) {
719
- case st.Vertical:
720
- return /* @__PURE__ */ a(je, { children: t });
721
- case st.HorizontalVertical:
719
+ case lt.Vertical:
722
720
  return /* @__PURE__ */ a($e, { children: t });
721
+ case lt.HorizontalVertical:
722
+ return /* @__PURE__ */ a(Be, { children: t });
723
723
  }
724
724
  return t;
725
725
  }
726
- class Y extends O.Component {
726
+ class K extends O.Component {
727
727
  _react_spaces_uniqueid;
728
728
  render() {
729
- return /* @__PURE__ */ a(Be, { ...this.props, wrapperInstance: this });
729
+ return /* @__PURE__ */ a(Me, { ...this.props, wrapperInstance: this });
730
730
  }
731
731
  }
732
- const Be = (t) => {
732
+ const Me = (t) => {
733
733
  let i = t.id ?? t.wrapperInstance._react_spaces_uniqueid;
734
- const [o, n] = O.useState(!!ft), u = Jt();
734
+ const [o, n] = O.useState(!!ut), u = Zt();
735
735
  i || (t.wrapperInstance._react_spaces_uniqueid = u, i = t.wrapperInstance._react_spaces_uniqueid);
736
736
  const {
737
737
  style: d,
738
738
  className: r,
739
- onClick: b,
739
+ onClick: p,
740
740
  onDoubleClick: e,
741
741
  onMouseDown: l,
742
- onMouseEnter: p,
742
+ onMouseEnter: z,
743
743
  onMouseLeave: s,
744
744
  onMouseMove: f,
745
745
  onTouchStart: m,
746
- onTouchMove: z,
746
+ onTouchMove: w,
747
747
  onTouchEnd: c,
748
748
  children: g,
749
- handleRender: R
749
+ handleRender: y
750
750
  } = t, S = {
751
- onClick: b,
751
+ onClick: p,
752
752
  onDoubleClick: e,
753
753
  onMouseDown: l,
754
- onMouseEnter: p,
754
+ onMouseEnter: z,
755
755
  onMouseLeave: s,
756
756
  onMouseMove: f,
757
757
  onTouchStart: m,
758
- onTouchMove: z,
758
+ onTouchMove: w,
759
759
  onTouchEnd: c
760
- }, { space: w, domRect: I, elementRef: L, resizeHandles: N } = Ce({
760
+ }, { space: b, domRect: M, elementRef: j, resizeHandles: N } = xe({
761
761
  ...t,
762
762
  id: i
763
763
  });
764
- if (ft && !qt()) {
765
- const _ = document.getElementById(`style_${i}_ssr`);
766
- _ && (w.ssrStyle = _.innerHTML), yt(w);
764
+ if (ut && !Ut()) {
765
+ const k = document.getElementById(`style_${i}_ssr`);
766
+ k && (b.ssrStyle = k.innerHTML), yt(b);
767
767
  }
768
- Ut(() => {
769
- w.element = L.current, ft && o && n(!1);
768
+ Xt(() => {
769
+ b.element = j.current, ut && o && n(!1);
770
770
  });
771
- const x = r ? r.split(" ").map((_) => _.trim()) : [], T = [
771
+ const T = r ? r.split(" ").map((k) => k.trim()) : [], C = [
772
772
  "spaces-space",
773
- w.children.find((_) => _.resizing) ? "spaces-resizing" : void 0,
774
- w.type === A.Fixed ? "spaces-fixedsize-layout" : void 0,
775
- w.type === A.ViewPort ? "spaces-fullpage-layout" : void 0,
776
- ...x.map((_) => `${_}-container`)
777
- ].filter((_) => _), P = ["spaces-space-inner", ...x];
778
- let k = d;
779
- w.handlePlacement === rt.Inside && (k = {
773
+ b.children.find((k) => k.resizing) ? "spaces-resizing" : void 0,
774
+ b.type === L.Fixed ? "spaces-fixedsize-layout" : void 0,
775
+ b.type === L.ViewPort ? "spaces-fullpage-layout" : void 0,
776
+ ...T.map((k) => `${k}-container`)
777
+ ].filter((k) => k), D = ["spaces-space-inner", ...T];
778
+ let P = d;
779
+ b.handlePlacement === st.Inside && (P = {
780
780
  ...d,
781
- left: w.anchor === C.Right ? w.handleSize : void 0,
782
- right: w.anchor === C.Left ? w.handleSize : void 0,
783
- top: w.anchor === C.Bottom ? w.handleSize : void 0,
784
- bottom: w.anchor === C.Top ? w.handleSize : void 0
781
+ left: b.anchor === x.Right ? b.handleSize : void 0,
782
+ right: b.anchor === x.Left ? b.handleSize : void 0,
783
+ top: b.anchor === x.Bottom ? b.handleSize : void 0,
784
+ bottom: b.anchor === x.Top ? b.handleSize : void 0
785
785
  });
786
- const E = Me(g, t.centerContent), K = {
787
- id: w.id,
788
- ref: L,
789
- className: T.join(" "),
786
+ const E = je(g, t.centerContent), Z = {
787
+ id: b.id,
788
+ ref: j,
789
+ className: C.join(" "),
790
790
  ...S
791
791
  };
792
792
  return /* @__PURE__ */ F(Et, { children: [
793
- N.mouseHandles.map((_) => R?.(_) || /* @__PURE__ */ a("div", { ..._ })),
794
- ft && w.ssrStyle && o && /* @__PURE__ */ a("style", { id: `style_${w.id}_ssr`, children: w.ssrStyle }),
793
+ N.mouseHandles.map((k) => y?.(k) || /* @__PURE__ */ a("div", { ...k })),
794
+ ut && b.ssrStyle && o && /* @__PURE__ */ a("style", { id: `style_${b.id}_ssr`, children: b.ssrStyle }),
795
795
  O.createElement(
796
796
  t.as || "div",
797
- K,
798
- /* @__PURE__ */ a("div", { className: P.join(" "), style: k, children: /* @__PURE__ */ a(Mt.Provider, { value: w.id, children: /* @__PURE__ */ a(At.Provider, { value: void 0, children: /* @__PURE__ */ a(Bt.Provider, { value: I, children: E }) }) }) })
797
+ Z,
798
+ /* @__PURE__ */ a("div", { className: D.join(" "), style: P, children: /* @__PURE__ */ a(jt.Provider, { value: b.id, children: /* @__PURE__ */ a(At.Provider, { value: void 0, children: /* @__PURE__ */ a(Mt.Provider, { value: M, children: E }) }) }) })
799
799
  )
800
800
  ] });
801
801
  }, St = {
802
- ...vt,
802
+ ...Rt,
803
803
  size: h.oneOfType([h.string, h.number]).isRequired,
804
804
  order: h.number,
805
805
  handleSize: h.number,
806
806
  touchHandleSize: h.number,
807
807
  handlePlacement: h.oneOf([
808
- rt.Inside,
809
- rt.OverlayBoundary,
810
- rt.OverlayInside
808
+ st.Inside,
809
+ st.OverlayBoundary,
810
+ st.OverlayInside
811
811
  ]),
812
812
  handleRender: h.func,
813
813
  minimumSize: h.number,
@@ -818,98 +818,98 @@ const Be = (t) => {
818
818
  ...St,
819
819
  resizable: h.bool
820
820
  }, Ie = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
821
- Y,
821
+ K,
822
822
  {
823
823
  ...o,
824
- type: A.Anchored,
825
- anchor: C.Left,
824
+ type: L.Anchored,
825
+ anchor: x.Left,
826
826
  position: { left: 0, top: 0, bottom: 0, rightResizable: !0, width: i },
827
827
  children: t
828
828
  }
829
829
  );
830
830
  Ie.propTypes = St;
831
831
  const Oe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
832
- Y,
832
+ K,
833
833
  {
834
834
  ...n,
835
- type: A.Anchored,
836
- anchor: C.Left,
835
+ type: L.Anchored,
836
+ anchor: x.Left,
837
837
  position: { left: 0, top: 0, bottom: 0, rightResizable: o, width: t },
838
838
  children: i
839
839
  }
840
840
  );
841
841
  Oe.propTypes = Tt;
842
842
  const De = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
843
- Y,
843
+ K,
844
844
  {
845
845
  ...o,
846
- type: A.Anchored,
847
- anchor: C.Top,
846
+ type: L.Anchored,
847
+ anchor: x.Top,
848
848
  position: { left: 0, top: 0, right: 0, bottomResizable: !0, height: i },
849
849
  children: t
850
850
  }
851
851
  );
852
852
  De.propTypes = St;
853
- const _e = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
854
- Y,
853
+ const ke = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
854
+ K,
855
855
  {
856
856
  ...n,
857
- type: A.Anchored,
858
- anchor: C.Top,
857
+ type: L.Anchored,
858
+ anchor: x.Top,
859
859
  position: { left: 0, top: 0, right: 0, bottomResizable: o, height: t },
860
860
  children: i
861
861
  }
862
862
  );
863
- _e.propTypes = Tt;
864
- const Ne = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
865
- Y,
863
+ ke.propTypes = Tt;
864
+ const _e = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
865
+ K,
866
866
  {
867
867
  ...o,
868
- type: A.Anchored,
869
- anchor: C.Right,
868
+ type: L.Anchored,
869
+ anchor: x.Right,
870
870
  position: { bottom: 0, top: 0, right: 0, leftResizable: !0, width: i },
871
871
  children: t
872
872
  }
873
873
  );
874
- Ne.propTypes = St;
875
- const Pe = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
876
- Y,
874
+ _e.propTypes = St;
875
+ const Ne = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
876
+ K,
877
877
  {
878
878
  ...n,
879
- type: A.Anchored,
880
- anchor: C.Right,
879
+ type: L.Anchored,
880
+ anchor: x.Right,
881
881
  position: { bottom: 0, top: 0, right: 0, leftResizable: o, width: t },
882
882
  children: i
883
883
  }
884
884
  );
885
- Pe.propTypes = Tt;
886
- const Ee = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
887
- Y,
885
+ Ne.propTypes = Tt;
886
+ const Pe = ({ children: t, size: i, ...o }) => /* @__PURE__ */ a(
887
+ K,
888
888
  {
889
889
  ...o,
890
- type: A.Anchored,
891
- anchor: C.Bottom,
890
+ type: L.Anchored,
891
+ anchor: x.Bottom,
892
892
  position: { bottom: 0, left: 0, right: 0, topResizable: !0, height: i },
893
893
  children: t
894
894
  }
895
895
  );
896
- Ee.propTypes = St;
897
- const ke = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
898
- Y,
896
+ Pe.propTypes = St;
897
+ const Ee = ({ size: t, children: i, resizable: o, ...n }) => /* @__PURE__ */ a(
898
+ K,
899
899
  {
900
900
  ...n,
901
- type: A.Anchored,
902
- anchor: C.Bottom,
901
+ type: L.Anchored,
902
+ anchor: x.Bottom,
903
903
  position: { bottom: 0, left: 0, right: 0, topResizable: o, height: t },
904
904
  children: i
905
905
  }
906
906
  );
907
- ke.propTypes = Tt;
907
+ Ee.propTypes = Tt;
908
908
  const He = me(
909
909
  {
910
910
  ...Tt,
911
- type: h.oneOf([A.Positioned, A.Fill, A.Anchored]),
912
- anchor: h.oneOf([C.Left, C.Top, C.Right, C.Bottom]),
911
+ type: h.oneOf([L.Positioned, L.Fill, L.Anchored]),
912
+ anchor: h.oneOf([x.Left, x.Top, x.Right, x.Bottom]),
913
913
  anchorSize: h.oneOfType([h.string, h.number]),
914
914
  left: h.oneOfType([h.string, h.number]),
915
915
  top: h.oneOfType([h.string, h.number]),
@@ -928,42 +928,42 @@ const He = me(
928
928
  right: u,
929
929
  bottom: d,
930
930
  width: r,
931
- height: b,
931
+ height: p,
932
932
  anchorSize: e,
933
933
  anchor: l,
934
- resizable: p,
934
+ resizable: z,
935
935
  resizeTypes: s,
936
936
  ...f
937
937
  }) => {
938
938
  let m;
939
- return i = i || A.Fill, i === A.Positioned ? m = {
939
+ return i = i || L.Fill, i === L.Positioned ? m = {
940
940
  left: o,
941
941
  top: n,
942
942
  right: u,
943
943
  bottom: d,
944
944
  width: r,
945
- height: b,
946
- leftResizable: s && (s.includes(y.Left) || s.includes(y.All)),
947
- topResizable: s && (s.includes(y.Top) || s.includes(y.All)),
948
- rightResizable: s && (s.includes(y.Right) || s.includes(y.All)),
949
- bottomResizable: s && (s.includes(y.Bottom) || s.includes(y.All)),
950
- topLeftResizable: s && (s.includes(y.TopLeft) || s.includes(y.All)),
951
- topRightResizable: s && (s.includes(y.TopRight) || s.includes(y.All)),
952
- bottomLeftResizable: s && (s.includes(y.BottomLeft) || s.includes(y.All)),
953
- bottomRightResizable: s && (s.includes(y.BottomRight) || s.includes(y.All))
954
- } : l === C.Left ? (m = { left: 0, top: 0, bottom: 0, width: e, rightResizable: p }, i = A.Anchored) : l === C.Right ? (m = { right: 0, top: 0, bottom: 0, width: e, leftResizable: p }, i = A.Anchored) : l === C.Top ? (m = { left: 0, top: 0, right: 0, height: e, bottomResizable: p }, i = A.Anchored) : l === C.Bottom ? (m = { left: 0, bottom: 0, right: 0, height: e, topResizable: p }, i = A.Anchored) : (m = {
945
+ height: p,
946
+ leftResizable: s && (s.includes(v.Left) || s.includes(v.All)),
947
+ topResizable: s && (s.includes(v.Top) || s.includes(v.All)),
948
+ rightResizable: s && (s.includes(v.Right) || s.includes(v.All)),
949
+ bottomResizable: s && (s.includes(v.Bottom) || s.includes(v.All)),
950
+ topLeftResizable: s && (s.includes(v.TopLeft) || s.includes(v.All)),
951
+ topRightResizable: s && (s.includes(v.TopRight) || s.includes(v.All)),
952
+ bottomLeftResizable: s && (s.includes(v.BottomLeft) || s.includes(v.All)),
953
+ bottomRightResizable: s && (s.includes(v.BottomRight) || s.includes(v.All))
954
+ } : l === x.Left ? (m = { left: 0, top: 0, bottom: 0, width: e, rightResizable: z }, i = L.Anchored) : l === x.Right ? (m = { right: 0, top: 0, bottom: 0, width: e, leftResizable: z }, i = L.Anchored) : l === x.Top ? (m = { left: 0, top: 0, right: 0, height: e, bottomResizable: z }, i = L.Anchored) : l === x.Bottom ? (m = { left: 0, bottom: 0, right: 0, height: e, topResizable: z }, i = L.Anchored) : (m = {
955
955
  left: 0,
956
956
  top: 0,
957
957
  bottom: 0,
958
958
  right: 0
959
- }, i = A.Fill), /* @__PURE__ */ a(Y, { ...f, type: i, anchor: l, position: m, children: t });
959
+ }, i = L.Fill), /* @__PURE__ */ a(K, { ...f, type: i, anchor: l, position: m, children: t });
960
960
  };
961
961
  We.propTypes = He;
962
- const Fe = (t) => /* @__PURE__ */ a(Y, { ...t, type: A.Fill, position: { left: 0, top: 0, right: 0, bottom: 0 }, children: t.children });
963
- Fe.propTypes = vt;
964
- const Ve = ({ width: t, height: i, children: o, ...n }) => /* @__PURE__ */ a(Y, { ...n, type: A.Fixed, position: { width: t, height: i }, children: o });
962
+ const Fe = (t) => /* @__PURE__ */ a(K, { ...t, type: L.Fill, position: { left: 0, top: 0, right: 0, bottom: 0 }, children: t.children });
963
+ Fe.propTypes = Rt;
964
+ const Ve = ({ width: t, height: i, children: o, ...n }) => /* @__PURE__ */ a(K, { ...n, type: L.Fixed, position: { width: t, height: i }, children: o });
965
965
  Ve.propTypes = {
966
- ...vt,
966
+ ...Rt,
967
967
  width: h.oneOfType([h.string, h.number]),
968
968
  height: h.oneOfType([h.string, h.number]).isRequired
969
969
  };
@@ -971,35 +971,35 @@ const qe = (t) => /* @__PURE__ */ a(At.Provider, { value: t.zIndex, children: t.
971
971
  qe.propTypes = {
972
972
  zIndex: h.number.isRequired
973
973
  };
974
- const Ue = ({ left: t, top: i, right: o, bottom: n, width: u, height: d, resizable: r, ...b }) => {
974
+ const Ue = ({ left: t, top: i, right: o, bottom: n, width: u, height: d, resizable: r, ...p }) => {
975
975
  const e = r || [];
976
976
  return /* @__PURE__ */ a(
977
- Y,
977
+ K,
978
978
  {
979
- ...b,
980
- type: A.Positioned,
979
+ ...p,
980
+ type: L.Positioned,
981
981
  position: {
982
982
  left: t,
983
983
  top: i,
984
984
  right: o,
985
985
  bottom: n,
986
- leftResizable: e.includes(y.Left) || e.includes(y.All),
987
- topResizable: e.includes(y.Top) || e.includes(y.All),
988
- rightResizable: e.includes(y.Right) || e.includes(y.All),
989
- bottomResizable: e.includes(y.Bottom) || e.includes(y.All),
990
- topLeftResizable: e.includes(y.TopLeft) || e.includes(y.All),
991
- topRightResizable: e.includes(y.TopRight) || e.includes(y.All),
992
- bottomLeftResizable: e.includes(y.BottomLeft) || e.includes(y.All),
993
- bottomRightResizable: e.includes(y.BottomRight) || e.includes(y.All),
986
+ leftResizable: e.includes(v.Left) || e.includes(v.All),
987
+ topResizable: e.includes(v.Top) || e.includes(v.All),
988
+ rightResizable: e.includes(v.Right) || e.includes(v.All),
989
+ bottomResizable: e.includes(v.Bottom) || e.includes(v.All),
990
+ topLeftResizable: e.includes(v.TopLeft) || e.includes(v.All),
991
+ topRightResizable: e.includes(v.TopRight) || e.includes(v.All),
992
+ bottomLeftResizable: e.includes(v.BottomLeft) || e.includes(v.All),
993
+ bottomRightResizable: e.includes(v.BottomRight) || e.includes(v.All),
994
994
  width: u,
995
995
  height: d
996
996
  },
997
- children: b.children
997
+ children: p.children
998
998
  }
999
999
  );
1000
1000
  };
1001
1001
  Ue.propTypes = {
1002
- ...vt,
1002
+ ...Rt,
1003
1003
  left: h.oneOfType([h.string, h.number]),
1004
1004
  top: h.oneOfType([h.string, h.number]),
1005
1005
  right: h.oneOfType([h.string, h.number]),
@@ -1009,17 +1009,17 @@ Ue.propTypes = {
1009
1009
  resizable: h.array
1010
1010
  };
1011
1011
  const Ri = (t) => {
1012
- const i = O.useContext(Bt);
1012
+ const i = O.useContext(Mt);
1013
1013
  return i ? t.children(i) : t.children({ left: 0, top: 0, right: 0, bottom: 0, width: 0, height: 0, x: 0, y: 0, toJSON: () => "" });
1014
- }, Xe = ({ left: t, top: i, right: o, bottom: n, children: u, ...d }) => /* @__PURE__ */ a(Y, { ...d, type: A.ViewPort, position: { left: t || 0, top: i || 0, right: o || 0, bottom: n || 0 }, children: u });
1014
+ }, Xe = ({ left: t, top: i, right: o, bottom: n, children: u, ...d }) => /* @__PURE__ */ a(K, { ...d, type: L.ViewPort, position: { left: t || 0, top: i || 0, right: o || 0, bottom: n || 0 }, children: u });
1015
1015
  Xe.propTypes = {
1016
- ...vt,
1016
+ ...Rt,
1017
1017
  left: h.oneOfType([h.string, h.number]),
1018
1018
  top: h.oneOfType([h.string, h.number]),
1019
1019
  right: h.oneOfType([h.string, h.number]),
1020
1020
  bottom: h.oneOfType([h.string, h.number])
1021
1021
  };
1022
- const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i, children: t }), Ge = (t) => {
1022
+ const Si = ({ children: t, ...i }) => /* @__PURE__ */ a(Gt.Provider, { value: i, children: t }), Ge = (t) => {
1023
1023
  const {
1024
1024
  favicon: i,
1025
1025
  title: o,
@@ -1027,66 +1027,66 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1027
1027
  activeTab: u,
1028
1028
  position: d,
1029
1029
  contentWidth: r,
1030
- onClick: b,
1030
+ onClick: p,
1031
1031
  onClose: e,
1032
1032
  setDragging: l,
1033
- tabsContentWidth: p,
1033
+ tabsContentWidth: z,
1034
1034
  animateTabMove: s,
1035
1035
  isDragging: f,
1036
1036
  index: m,
1037
- sorting: z,
1037
+ sorting: w,
1038
1038
  showButtonClose: c,
1039
1039
  closing: g,
1040
- onCloseAllTabs: R,
1040
+ onCloseAllTabs: y,
1041
1041
  onCloseLeftTabs: S,
1042
- onCloseRightTabs: w,
1043
- onCloseOtherTabs: I,
1044
- totalTabs: L
1045
- } = t, { t: N } = Wt("archbase"), [x, T] = U(0), [P, k] = U(!1), [E, K] = U(null), [_, tt] = U(null), [$, V] = U(!1), [et, lt] = U(0), [nt, X] = U(!1), j = ot(null), D = 9, H = 84, q = 60, G = 48;
1046
- it(() => (document.addEventListener("mousemove", B), document.addEventListener("mouseup", at), () => {
1047
- document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", at);
1048
- })), it(() => {
1049
- P || setTimeout(() => k(!0), 500);
1050
- }, [P]), it(() => {
1051
- T(r + 2 * D);
1042
+ onCloseRightTabs: b,
1043
+ onCloseOtherTabs: M,
1044
+ totalTabs: j
1045
+ } = t, { t: N } = Ft("archbase"), [T, C] = q(0), [D, P] = q(!1), [E, Z] = q(null), [k, it] = q(null), [B, U] = q(!1), [Q, nt] = q(0), [rt, G] = q(!1), mt = ot(null), A = 9, _ = 84, H = 60, V = 48;
1046
+ et(() => (document.addEventListener("mousemove", X), document.addEventListener("mouseup", I), () => {
1047
+ document.removeEventListener("mousemove", X), document.removeEventListener("mouseup", I);
1048
+ })), et(() => {
1049
+ D || setTimeout(() => P(!0), 500);
1050
+ }, [D]), et(() => {
1051
+ C(r + 2 * A);
1052
1052
  }, [r]);
1053
- const M = (Z) => {
1054
- Z.button === 0 && (l(!0), tt(Z.pageX), V(!1), lt(d));
1055
- }, B = (Z) => {
1056
- if (_ != null && f) {
1057
- let ht = et - D + (Z.pageX - _);
1058
- ht < 0 && (ht = 0), ht > p - x && (ht = p - x), K(ht), !z && s(ht);
1053
+ const $ = (Y) => {
1054
+ Y.button === 0 && (l(!0), it(Y.pageX), U(!1), nt(d));
1055
+ }, X = (Y) => {
1056
+ if (k != null && f) {
1057
+ let ct = Q - A + (Y.pageX - k);
1058
+ ct < 0 && (ct = 0), ct > z - T && (ct = z - T), Z(ct), !w && s(ct);
1059
1059
  }
1060
- }, at = (Z) => {
1061
- _ != null && f && (tt(null), K(null), l(!1), V(!0));
1062
- }, [ct, gt] = U(d - D);
1063
- it(() => {
1064
- gt(d ? d - D : 0);
1060
+ }, I = (Y) => {
1061
+ k != null && f && (it(null), Z(null), l(!1), U(!0));
1062
+ }, [dt, It] = q(d - A);
1063
+ et(() => {
1064
+ It(d ? d - A : 0);
1065
1065
  }, [m, d]);
1066
- const xt = () => {
1067
- I && I(t.id), X(!1);
1066
+ const gt = () => {
1067
+ M && M(t.id), G(!1);
1068
+ }, Ct = () => {
1069
+ S && S(t.id), G(!1);
1068
1070
  }, Lt = () => {
1069
- S && S(t.id), X(!1);
1070
- }, Yt = () => {
1071
- w && w(t.id), X(!1);
1071
+ b && b(t.id), G(!1);
1072
1072
  }, Kt = () => {
1073
- R && R(), X(!1);
1074
- }, Qt = (Z) => {
1075
- Z.preventDefault(), X(!0);
1076
- }, It = m > 0, Ot = L !== void 0 && m < L - 1, Dt = (L || 0) > 1;
1073
+ y && y(), G(!1);
1074
+ }, Qt = (Y) => {
1075
+ Y.preventDefault(), G(!0);
1076
+ }, Ot = m > 0, Dt = j !== void 0 && m < j - 1, kt = (j || 0) > 1;
1077
1077
  return /* @__PURE__ */ F(
1078
1078
  "div",
1079
1079
  {
1080
- className: `archbase_tab ${P ? "" : " archbase_tab-was-just-added"}${_ == null && !u ? " archbase_tab-was-just-dragged" : ""}`,
1080
+ className: `archbase_tab ${D ? "" : " archbase_tab-was-just-added"}${k == null && !u ? " archbase_tab-was-just-dragged" : ""}`,
1081
1081
  style: {
1082
- transform: `translate3d(${E ?? ct}px, 0, 0)`,
1083
- width: `${x}px`
1082
+ transform: `translate3d(${E ?? dt}px, 0, 0)`,
1083
+ width: `${T}px`
1084
1084
  },
1085
1085
  "tab-active": u !== !1 ? "" : null,
1086
- "is-small": r < H ? "" : null,
1087
- "is-smaller": r < q ? "" : null,
1088
- "is-mini": r < G ? "" : null,
1089
- ref: j,
1086
+ "is-small": r < _ ? "" : null,
1087
+ "is-smaller": r < H ? "" : null,
1088
+ "is-mini": r < V ? "" : null,
1089
+ ref: mt,
1090
1090
  onContextMenu: Qt,
1091
1091
  children: [
1092
1092
  /* @__PURE__ */ a("div", { className: "archbase_tab-dividers" }),
@@ -1102,17 +1102,17 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1102
1102
  /* @__PURE__ */ F("div", { className: "archbase_tab-content", children: [
1103
1103
  !!i && /* @__PURE__ */ a("div", { className: "archbase_tab-favicon", style: { backgroundImage: `url(${i})` } }),
1104
1104
  /* @__PURE__ */ a("div", { className: "archbase_tab-title", children: n ?? o }),
1105
- /* @__PURE__ */ a("div", { className: "archbase_tab-drag-handle", title: n ?? o, onClick: b, onPointerDown: (Z) => b(Z), onMouseUp: at, onMouseMove: B, onMouseDown: M }),
1106
- (R || S || w || I) && /* @__PURE__ */ F(dt, { shadow: "md", width: 200, opened: nt, onChange: X, position: "bottom-end", children: [
1107
- /* @__PURE__ */ a(dt.Target, { children: /* @__PURE__ */ a("div", { className: "archbase_tab-dropdown", onClick: (Z) => {
1108
- Z.stopPropagation(), X(!nt);
1105
+ /* @__PURE__ */ a("div", { className: "archbase_tab-drag-handle", title: n ?? o, onClick: p, onPointerDown: (Y) => p(Y), onMouseUp: I, onMouseMove: X, onMouseDown: $ }),
1106
+ (y || S || b || M) && /* @__PURE__ */ F(at, { shadow: "md", width: 200, opened: rt, onChange: G, position: "bottom-end", children: [
1107
+ /* @__PURE__ */ a(at.Target, { children: /* @__PURE__ */ a("div", { className: "archbase_tab-dropdown", onClick: (Y) => {
1108
+ Y.stopPropagation(), G(!rt);
1109
1109
  } }) }),
1110
- /* @__PURE__ */ F(dt.Dropdown, { children: [
1111
- Dt && /* @__PURE__ */ a(dt.Item, { onClick: xt, children: String(N("tabs.closeOthers")) }),
1112
- It && /* @__PURE__ */ a(dt.Item, { onClick: Lt, children: String(N("tabs.closeLeft")) }),
1113
- Ot && /* @__PURE__ */ a(dt.Item, { onClick: Yt, children: String(N("tabs.closeRight")) }),
1114
- (Dt || It || Ot) && /* @__PURE__ */ a(dt.Divider, {}),
1115
- /* @__PURE__ */ a(dt.Item, { onClick: Kt, children: String(N("tabs.closeAll")) })
1110
+ /* @__PURE__ */ F(at.Dropdown, { children: [
1111
+ kt && /* @__PURE__ */ a(at.Item, { onClick: gt, children: String(N("tabs.closeOthers")) }),
1112
+ Ot && /* @__PURE__ */ a(at.Item, { onClick: Ct, children: String(N("tabs.closeLeft")) }),
1113
+ Dt && /* @__PURE__ */ a(at.Item, { onClick: Lt, children: String(N("tabs.closeRight")) }),
1114
+ (kt || Ot || Dt) && /* @__PURE__ */ a(at.Divider, {}),
1115
+ /* @__PURE__ */ a(at.Item, { onClick: Kt, children: String(N("tabs.closeAll")) })
1116
1116
  ] })
1117
1117
  ] }),
1118
1118
  c ? g ? /* @__PURE__ */ a(
@@ -1123,86 +1123,96 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1123
1123
  "aria-label": "closing",
1124
1124
  children: /* @__PURE__ */ a(te, { size: 12 })
1125
1125
  }
1126
- ) : /* @__PURE__ */ a("div", { className: "archbase_tab-close", onClick: (Z) => {
1127
- e(Z);
1126
+ ) : /* @__PURE__ */ a("div", { className: "archbase_tab-close", onClick: (Y) => {
1127
+ e(Y);
1128
1128
  } }) : null
1129
1129
  ] })
1130
1130
  ]
1131
1131
  }
1132
1132
  );
1133
- }, Si = (t) => {
1134
- const { currentTabs: i, onTabChange: o, activeTab: n, onTabClose: u, className: d, style: r, dark: b, onClick: e, buttonCloseOnlyActiveTab: l = !1, onCloseAllTabs: p, onCloseLeftTabs: s, onCloseRightTabs: f, onCloseOtherTabs: m } = t, [z, c] = U([]), [g, R] = U([]), [S, w] = U(i || []), [I, L] = U(!1), [N, x] = U(!1), T = ot(null), { width: P, height: k } = le(), E = 9, K = 1, _ = 24, tt = 240;
1135
- it(() => {
1136
- c(V()), R(et(V()));
1137
- }, []), it(() => {
1138
- $();
1139
- }, [JSON.stringify(S), P, k]), it(() => {
1140
- i && w(i);
1133
+ }, Je = (t) => t ? [
1134
+ ["--archbase-tabs-bar-bg", t.barBackground],
1135
+ ["--archbase-tabs-tab-bg", t.tabBackground],
1136
+ ["--archbase-tabs-tab-active-bg", t.tabActiveBackground],
1137
+ ["--archbase-tabs-title", t.titleColor],
1138
+ ["--archbase-tabs-title-active", t.titleActiveColor],
1139
+ ["--archbase-tabs-tab-active-accent", t.activeAccentColor],
1140
+ ["--archbase-tabs-divider", t.dividerColor],
1141
+ ["--archbase-tabs-bottom-bar-bg", t.bottomBarBackground]
1142
+ ].reduce((o, [n, u]) => (u && (o[n] = u), o), {}) : {}, Ti = (t) => {
1143
+ const { currentTabs: i, onTabChange: o, activeTab: n, onTabClose: u, className: d, style: r, dark: p, onClick: e, colors: l, buttonCloseOnlyActiveTab: z = !1, onCloseAllTabs: s, onCloseLeftTabs: f, onCloseRightTabs: m, onCloseOtherTabs: w } = t, [c, g] = q([]), [y, S] = q([]), [b, M] = q(i || []), [j, N] = q(!1), [T, C] = q(!1), D = ot(null), { width: P, height: E } = le(), Z = 9, k = 1, it = 24, B = 240;
1144
+ et(() => {
1145
+ g(Q()), S(nt(Q()));
1146
+ }, []), et(() => {
1147
+ U();
1148
+ }, [JSON.stringify(b), P, E]), et(() => {
1149
+ i && M(i);
1141
1150
  }, [JSON.stringify(i)]);
1142
- const $ = () => {
1143
- const j = V();
1144
- j && (c(j), R(et(j)));
1145
- }, V = () => {
1146
- const j = [];
1147
- if (T.current) {
1148
- const D = S.length, H = T.current.clientWidth, q = (D - 1) * K, G = (H - 2 * E + q) / D, M = Math.max(_, Math.min(tt, G)), B = Math.floor(M), at = B * D + 2 * E - q;
1149
- let gt = H - at;
1150
- for (let xt = 0; xt < D; xt += 1) {
1151
- const Lt = B < tt && gt > 0 ? 1 : 0;
1152
- j.push(B + Lt), gt > 0 && (gt -= 1);
1151
+ const U = () => {
1152
+ const A = Q();
1153
+ A && (g(A), S(nt(A)));
1154
+ }, Q = () => {
1155
+ const A = [];
1156
+ if (D.current) {
1157
+ const _ = b.length, H = D.current.clientWidth, V = (_ - 1) * k, $ = (H - 2 * Z + V) / _, X = Math.max(it, Math.min(B, $)), I = Math.floor(X), dt = I * _ + 2 * Z - V;
1158
+ let gt = H - dt;
1159
+ for (let Ct = 0; Ct < _; Ct += 1) {
1160
+ const Lt = I < B && gt > 0 ? 1 : 0;
1161
+ A.push(I + Lt), gt > 0 && (gt -= 1);
1153
1162
  }
1154
1163
  }
1155
- return j;
1156
- }, et = (j) => {
1157
- const D = [], H = j || z;
1158
- let q = E;
1159
- return H.forEach((G, M) => {
1160
- const B = M * K;
1161
- D.push(q - B), q += G;
1162
- }), D;
1163
- }, lt = (j, D) => {
1164
- L(!0);
1165
- let H = 1 / 0, q = -1, G = [];
1166
- g.forEach((M, B) => {
1167
- Math.abs(j - M) < H && (H = Math.abs(j - M), q = B);
1168
- }), q = Math.max(0, Math.min(g.length, q)), D != q && (g.forEach((M, B) => {
1169
- B == D ? G[B] = S[q > D ? B + 1 : B - 1] : D > B && B >= q ? G[B] = S[B + 1] : D < B && B <= q ? G[B] = S[B - 1] : G[B] = S[B];
1170
- }), nt(G) && o(G)), L(!1);
1171
- }, nt = (j) => new Set(j).size === j.length, X = (j) => {
1172
- u ? u(j) : o(S.filter((D, H) => H != j));
1164
+ return A;
1165
+ }, nt = (A) => {
1166
+ const _ = [], H = A || c;
1167
+ let V = Z;
1168
+ return H.forEach(($, X) => {
1169
+ const I = X * k;
1170
+ _.push(V - I), V += $;
1171
+ }), _;
1172
+ }, rt = (A, _) => {
1173
+ N(!0);
1174
+ let H = 1 / 0, V = -1, $ = [];
1175
+ y.forEach((X, I) => {
1176
+ Math.abs(A - X) < H && (H = Math.abs(A - X), V = I);
1177
+ }), V = Math.max(0, Math.min(y.length, V)), _ != V && (y.forEach((X, I) => {
1178
+ I == _ ? $[I] = b[V > _ ? I + 1 : I - 1] : _ > I && I >= V ? $[I] = b[I + 1] : _ < I && I <= V ? $[I] = b[I - 1] : $[I] = b[I];
1179
+ }), G($) && o($)), N(!1);
1180
+ }, G = (A) => new Set(A).size === A.length, mt = (A) => {
1181
+ u ? u(A) : o(b.filter((_, H) => H != A));
1173
1182
  };
1174
1183
  return /* @__PURE__ */ a("div", { className: d, style: r, children: /* @__PURE__ */ F(
1175
1184
  "div",
1176
1185
  {
1177
- className: `archbase_tabs${b ? " archbase_tabs-dark-theme" : ""}${N ? "" : " archbase_tabs-is-sorting"}`,
1186
+ className: `archbase_tabs${p ? " archbase_tabs-dark-theme" : ""}${T ? "" : " archbase_tabs-is-sorting"}`,
1187
+ style: Je(l),
1178
1188
  children: [
1179
- /* @__PURE__ */ a("div", { className: "archbase_tabs_content", ref: T, children: !!S && S.map((j, D) => !!g[D] && /* @__PURE__ */ a(
1189
+ /* @__PURE__ */ a("div", { className: "archbase_tabs_content", ref: D, children: !!b && b.map((A, _) => !!y[_] && /* @__PURE__ */ a(
1180
1190
  Ge,
1181
1191
  {
1182
- favicon: j.favicon,
1183
- title: j.title,
1184
- customTitle: j.customTitle,
1185
- activeTab: n === j.key,
1186
- position: g[D],
1187
- contentWidth: z[D],
1188
- onClick: (H) => e(j.key),
1189
- onClose: (H) => X(j.key),
1190
- setDragging: x,
1191
- showButtonClose: l ? n === j.key : !0,
1192
- closing: j.closing,
1193
- tabsContentWidth: T.current && T.current.clientWidth,
1194
- animateTabMove: (H) => lt(H, D),
1195
- isDragging: N,
1196
- id: j.key,
1197
- index: D,
1198
- sorting: I,
1199
- onCloseAllTabs: p,
1200
- onCloseLeftTabs: s,
1201
- onCloseRightTabs: f,
1202
- onCloseOtherTabs: m,
1203
- totalTabs: S.length
1192
+ favicon: A.favicon,
1193
+ title: A.title,
1194
+ customTitle: A.customTitle,
1195
+ activeTab: n === A.key,
1196
+ position: y[_],
1197
+ contentWidth: c[_],
1198
+ onClick: (H) => e(A.key),
1199
+ onClose: (H) => mt(A.key),
1200
+ setDragging: C,
1201
+ showButtonClose: z ? n === A.key : !0,
1202
+ closing: A.closing,
1203
+ tabsContentWidth: D.current && D.current.clientWidth,
1204
+ animateTabMove: (H) => rt(H, _),
1205
+ isDragging: T,
1206
+ id: A.key,
1207
+ index: _,
1208
+ sorting: j,
1209
+ onCloseAllTabs: s,
1210
+ onCloseLeftTabs: f,
1211
+ onCloseRightTabs: m,
1212
+ onCloseOtherTabs: w,
1213
+ totalTabs: b.length
1204
1214
  },
1205
- j.key
1215
+ A.key
1206
1216
  )) }),
1207
1217
  /* @__PURE__ */ a("div", { className: "archbase_tabs-bottom-bar" })
1208
1218
  ]
@@ -1214,7 +1224,7 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1214
1224
  const n = parseInt(o.style.zIndex);
1215
1225
  t = Math.max(isNaN(n) ? 0 : n, t);
1216
1226
  }), t + 1;
1217
- }, Ti = (t) => {
1227
+ }, Ci = (t) => {
1218
1228
  const i = Object.assign(
1219
1229
  {
1220
1230
  id: t.id && t.id.length ? t.id : Date.now().toString(),
@@ -1244,52 +1254,52 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1244
1254
  t
1245
1255
  );
1246
1256
  i.id || (i.id = Date.now().toString()), Object.freeze(i);
1247
- const [o, n] = W.useState(i.height), [u, d] = W.useState(i.width), [r, b] = W.useState(i.top || 0), [e, l] = W.useState(i.left || 0), [p, s] = W.useState(0), [f, m] = W.useState(0), [z, c] = W.useState(!1), [g, R] = W.useState(!1), [S, w] = W.useState("▁"), [I, L] = W.useState("□"), [N, x] = W.useState(""), [T, P] = W.useState(pt()), [k, E] = W.useState(1), { ref: K, width: _, height: tt } = ae(), $ = W.useRef(null), V = ot(o), et = ot(u), lt = ot(r), nt = ot(e), X = 500, j = (M) => {
1248
- m(M.clientY - r), s(M.clientX - e), P(pt()), E(0.5);
1249
- }, D = (M) => {
1250
- l((M.clientX || M.screenX || e + p) - p), b((M.clientY || M.screenY || r + f) - f);
1251
- }, H = (M) => {
1252
- l((M.clientX || M.screenX) - p), b((M.clientY || M.screenY) - f), E(1);
1253
- }, q = () => {
1254
- if (x(`${X}ms ease-in-out`), z)
1255
- V.current = o, b(lt.current || 0), l(nt.current || 0), c(!1), w("▁"), R(!1);
1257
+ const [o, n] = W.useState(i.height), [u, d] = W.useState(i.width), [r, p] = W.useState(i.top || 0), [e, l] = W.useState(i.left || 0), [z, s] = W.useState(0), [f, m] = W.useState(0), [w, c] = W.useState(!1), [g, y] = W.useState(!1), [S, b] = W.useState("▁"), [M, j] = W.useState("□"), [N, T] = W.useState(""), [C, D] = W.useState(pt()), [P, E] = W.useState(1), { ref: Z, width: k, height: it } = ae(), B = W.useRef(null), U = ot(o), Q = ot(u), nt = ot(r), rt = ot(e), G = 500, mt = ($) => {
1258
+ m($.clientY - r), s($.clientX - e), D(pt()), E(0.5);
1259
+ }, A = ($) => {
1260
+ l(($.clientX || $.screenX || e + z) - z), p(($.clientY || $.screenY || r + f) - f);
1261
+ }, _ = ($) => {
1262
+ l(($.clientX || $.screenX) - z), p(($.clientY || $.screenY) - f), E(1);
1263
+ }, H = () => {
1264
+ if (T(`${G}ms ease-in-out`), w)
1265
+ U.current = o, p(nt.current || 0), l(rt.current || 0), c(!1), b("▁"), y(!1);
1256
1266
  else {
1257
- V.current = 32, g || (nt.current = e, lt.current = r);
1258
- const M = document.getElementById(i.id)?.parentElement;
1259
- et.current = u;
1260
- let B = (M?.clientHeight || window.innerHeight) - V.current - 4;
1261
- const at = (M?.clientWidth || window.innerWidth) - et.current - 4, ct = document.elementFromPoint(
1262
- at + et.current / 2,
1263
- B + V.current / 2
1267
+ U.current = 32, g || (rt.current = e, nt.current = r);
1268
+ const $ = document.getElementById(i.id)?.parentElement;
1269
+ Q.current = u;
1270
+ let X = ($?.clientHeight || window.innerHeight) - U.current - 4;
1271
+ const I = ($?.clientWidth || window.innerWidth) - Q.current - 4, dt = document.elementFromPoint(
1272
+ I + Q.current / 2,
1273
+ X + U.current / 2
1264
1274
  );
1265
- ct && ["archbase-window-container", "windowTitle"].includes(ct?.className || "") && (B -= ct?.clientHeight + 4), b(B), l(at), c(!0), w("◰"), R(!1);
1275
+ dt && ["archbase-window-container", "windowTitle"].includes(dt?.className || "") && (X -= dt?.clientHeight + 4), p(X), l(I), c(!0), b("◰"), y(!1);
1266
1276
  }
1267
- P(pt()), setTimeout(x, X + 1, "");
1268
- }, G = () => {
1269
- x(`${X}ms ease-in-out`);
1270
- const M = document.getElementById(i.id)?.parentElement;
1271
- g ? (V.current = o, et.current = u, b(lt.current || 0), l(nt.current || 0), R(!1), L("□"), c(!1), w("▁")) : (V.current = M?.clientHeight || window.innerHeight, et.current = M?.clientWidth || window.innerWidth, z || (nt.current = e, lt.current = r), b(M?.offsetTop || 0), l(M?.offsetLeft || 0), R(!0), L("❐"), c(!1), w("▁")), P(pt()), setTimeout(x, X + 1, "");
1277
+ D(pt()), setTimeout(T, G + 1, "");
1278
+ }, V = () => {
1279
+ T(`${G}ms ease-in-out`);
1280
+ const $ = document.getElementById(i.id)?.parentElement;
1281
+ g ? (U.current = o, Q.current = u, p(nt.current || 0), l(rt.current || 0), y(!1), j("□"), c(!1), b("▁")) : (U.current = $?.clientHeight || window.innerHeight, Q.current = $?.clientWidth || window.innerWidth, w || (rt.current = e, nt.current = r), p($?.offsetTop || 0), l($?.offsetLeft || 0), y(!0), j("❐"), c(!1), b("▁")), D(pt()), setTimeout(T, G + 1, "");
1272
1282
  };
1273
- return it(() => {
1274
- !g && !z && (d(_), n(tt));
1275
- }, [_, tt, g, z]), /* @__PURE__ */ F(
1283
+ return et(() => {
1284
+ !g && !w && (d(k), n(it));
1285
+ }, [k, it, g, w]), /* @__PURE__ */ F(
1276
1286
  "div",
1277
1287
  {
1278
1288
  id: i.id,
1279
1289
  className: "archbase-window-container",
1280
1290
  style: {
1281
- height: V.current,
1282
- width: et.current,
1291
+ height: U.current,
1292
+ width: Q.current,
1283
1293
  top: r,
1284
1294
  left: e,
1285
1295
  resize: i.resizable ? "both" : "none",
1286
1296
  transition: N,
1287
- zIndex: T,
1288
- opacity: k
1297
+ zIndex: C,
1298
+ opacity: P
1289
1299
  },
1290
- ref: K,
1300
+ ref: Z,
1291
1301
  onClick: () => {
1292
- P(pt());
1302
+ D(pt());
1293
1303
  },
1294
1304
  children: [
1295
1305
  i.titleBar && /* @__PURE__ */ F(
@@ -1298,7 +1308,7 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1298
1308
  className: "title-bar",
1299
1309
  "data-parent": i.id,
1300
1310
  style: {
1301
- opacity: k
1311
+ opacity: P
1302
1312
  },
1303
1313
  children: [
1304
1314
  i.titleBar.icon && /* @__PURE__ */ a("span", { className: "icon", children: i.titleBar.icon }),
@@ -1307,17 +1317,17 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1307
1317
  {
1308
1318
  className: "windowTitle",
1309
1319
  draggable: !0,
1310
- onDragStart: j,
1311
- onDrag: D,
1312
- onDragEnd: H,
1313
- style: { opacity: Math.floor(k) },
1314
- ref: $,
1320
+ onDragStart: mt,
1321
+ onDrag: A,
1322
+ onDragEnd: _,
1323
+ style: { opacity: Math.floor(P) },
1324
+ ref: B,
1315
1325
  children: i.titleBar.title
1316
1326
  }
1317
1327
  ),
1318
1328
  i.titleBar.buttons && /* @__PURE__ */ F("span", { className: "buttonContainer", children: [
1319
- i.titleBar.buttons.minimize && /* @__PURE__ */ a("span", { className: "windowButton", onClick: q, children: S }),
1320
- i.titleBar.buttons.maximize && /* @__PURE__ */ a("span", { className: "windowButton", onClick: G, children: I }),
1329
+ i.titleBar.buttons.minimize && /* @__PURE__ */ a("span", { className: "windowButton", onClick: H, children: S }),
1330
+ i.titleBar.buttons.maximize && /* @__PURE__ */ a("span", { className: "windowButton", onClick: V, children: M }),
1321
1331
  !!i.titleBar.buttons.close && /* @__PURE__ */ a("span", { className: "windowButton", onClick: i.titleBar.buttons.close, children: "⨯" })
1322
1332
  ] })
1323
1333
  ]
@@ -1331,7 +1341,7 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1331
1341
  ref: t.innerRef,
1332
1342
  style: {
1333
1343
  height: "100%",
1334
- opacity: k,
1344
+ opacity: P,
1335
1345
  ...i.style
1336
1346
  },
1337
1347
  children: i.children
@@ -1348,17 +1358,17 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1348
1358
  splitterHoverColor: u,
1349
1359
  style: d,
1350
1360
  className: r,
1351
- autoSaveId: b
1361
+ autoSaveId: p
1352
1362
  }) => {
1353
1363
  const e = i === "row" ? "horizontal" : "vertical";
1354
1364
  return /* @__PURE__ */ a(
1355
- Ft,
1365
+ Vt,
1356
1366
  {
1357
1367
  direction: e,
1358
- autoSaveId: b,
1368
+ autoSaveId: p,
1359
1369
  style: { height: "100%", ...d },
1360
1370
  className: r,
1361
- children: W.Children.map(t, (l) => W.isValidElement(l) && l.type === Je ? W.cloneElement(l, {
1371
+ children: W.Children.map(t, (l) => W.isValidElement(l) && l.type === Ze ? W.cloneElement(l, {
1362
1372
  _splitterSize: o,
1363
1373
  _splitterColor: n,
1364
1374
  _splitterHoverColor: u,
@@ -1366,7 +1376,7 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1366
1376
  }) : l)
1367
1377
  }
1368
1378
  );
1369
- }, Ci = ({
1379
+ }, Ai = ({
1370
1380
  children: t,
1371
1381
  minSize: i,
1372
1382
  maxSize: o,
@@ -1375,39 +1385,39 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1375
1385
  style: d,
1376
1386
  className: r
1377
1387
  }) => {
1378
- const b = (e) => {
1388
+ const p = (e) => {
1379
1389
  if (e !== void 0)
1380
1390
  return typeof e == "string" ? parseFloat(e) : e;
1381
1391
  };
1382
1392
  return /* @__PURE__ */ a(
1383
- jt,
1393
+ $t,
1384
1394
  {
1385
- defaultSize: b(n),
1386
- minSize: b(i),
1387
- maxSize: b(o),
1395
+ defaultSize: p(n),
1396
+ minSize: p(i),
1397
+ maxSize: p(o),
1388
1398
  collapsible: u,
1389
1399
  style: d,
1390
1400
  className: r,
1391
1401
  children: t
1392
1402
  }
1393
1403
  );
1394
- }, Je = ({
1404
+ }, Ze = ({
1395
1405
  style: t,
1396
1406
  className: i,
1397
1407
  ...o
1398
1408
  }) => {
1399
- const n = ee(), d = ie() === "dark", r = o._splitterSize ?? 4, b = o._splitterColor ?? (d ? n.colors.dark[4] : n.colors.gray[3]);
1409
+ const n = ee(), d = ie() === "dark", r = o._splitterSize ?? 4, p = o._splitterColor ?? (d ? n.colors.dark[4] : n.colors.gray[3]);
1400
1410
  o._splitterHoverColor ?? n.colors.blue[5];
1401
1411
  const l = (o._direction ?? "horizontal") === "horizontal";
1402
1412
  return /* @__PURE__ */ a(
1403
- Vt,
1413
+ qt,
1404
1414
  {
1405
1415
  className: i,
1406
1416
  style: {
1407
1417
  display: "flex",
1408
1418
  alignItems: "center",
1409
1419
  justifyContent: "center",
1410
- backgroundColor: b,
1420
+ backgroundColor: p,
1411
1421
  transition: "background-color 150ms ease",
1412
1422
  ...l ? { width: Number(r), cursor: "col-resize" } : { height: Number(r), cursor: "row-resize" },
1413
1423
  ...t
@@ -1425,7 +1435,7 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1425
1435
  )
1426
1436
  }
1427
1437
  );
1428
- }, Ai = ({
1438
+ }, Li = ({
1429
1439
  children: t,
1430
1440
  title: i,
1431
1441
  reducedTitle: o,
@@ -1433,28 +1443,28 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1433
1443
  backgroundColor: u = "transparent",
1434
1444
  hiddenBackgroundColor: d = "#ccc",
1435
1445
  withBorder: r = !1,
1436
- hiddenWidth: b = "30px",
1446
+ hiddenWidth: p = "30px",
1437
1447
  position: e = "right",
1438
1448
  onShow: l,
1439
- onHide: p,
1449
+ onHide: z,
1440
1450
  defaultIsDocked: s = !1,
1441
1451
  defaultIsVisible: f = !1
1442
1452
  }) => {
1443
- const [m, z] = U(s), [c, g] = U(f), R = () => z(!m), S = () => {
1453
+ const [m, w] = q(s), [c, g] = q(f), y = () => w(!m), S = () => {
1444
1454
  !m && !c && (g(!0), l && l());
1445
- }, w = () => {
1446
- !m && c && (g(!1), p && p());
1455
+ }, b = () => {
1456
+ !m && c && (g(!1), z && z());
1447
1457
  };
1448
- it(() => {
1449
- f ? S() : w();
1458
+ et(() => {
1459
+ f ? S() : b();
1450
1460
  }, [f]);
1451
- const I = {
1461
+ const M = {
1452
1462
  writingMode: "vertical-rl",
1453
1463
  transform: "rotate(360deg)",
1454
1464
  margin: "10px 0",
1455
1465
  alignSelf: "flex-center",
1456
1466
  cursor: "pointer"
1457
- }, L = {
1467
+ }, j = {
1458
1468
  writingMode: "vertical-rl",
1459
1469
  transform: "rotate(180deg)",
1460
1470
  margin: "10px 0",
@@ -1478,7 +1488,7 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1478
1488
  {
1479
1489
  onMouseOver: S,
1480
1490
  style: {
1481
- width: c || m ? "0px" : b,
1491
+ width: c || m ? "0px" : p,
1482
1492
  height: "100%",
1483
1493
  backgroundColor: d,
1484
1494
  cursor: "pointer",
@@ -1489,13 +1499,13 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1489
1499
  alignItems: "center"
1490
1500
  },
1491
1501
  children: !c && !m && // @ts-ignore
1492
- /* @__PURE__ */ a("span", { style: e === "right" ? I : L, children: o })
1502
+ /* @__PURE__ */ a("span", { style: e === "right" ? M : j, children: o })
1493
1503
  }
1494
1504
  ),
1495
1505
  /* @__PURE__ */ a(
1496
1506
  "div",
1497
1507
  {
1498
- onMouseLeave: w,
1508
+ onMouseLeave: b,
1499
1509
  style: {
1500
1510
  width: c || m ? n : "0px",
1501
1511
  height: "100%",
@@ -1517,7 +1527,7 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1517
1527
  },
1518
1528
  children: [
1519
1529
  /* @__PURE__ */ a("span", { children: i }),
1520
- /* @__PURE__ */ a(ne, { onClick: R, children: m ? /* @__PURE__ */ a(de, { size: 16 }) : /* @__PURE__ */ a(ce, { size: 16 }) })
1530
+ /* @__PURE__ */ a(ne, { onClick: y, children: m ? /* @__PURE__ */ a(de, { size: 16 }) : /* @__PURE__ */ a(ce, { size: 16 }) })
1521
1531
  ]
1522
1532
  }
1523
1533
  ),
@@ -1528,7 +1538,7 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1528
1538
  ]
1529
1539
  }
1530
1540
  );
1531
- }, Ze = ({
1541
+ }, Ye = ({
1532
1542
  panels: t,
1533
1543
  initialLayout: i,
1534
1544
  onChange: o,
@@ -1536,27 +1546,27 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1536
1546
  zeroStateView: u,
1537
1547
  resize: d = { minimumPaneSizePercentage: 10 },
1538
1548
  style: r,
1539
- className: b,
1549
+ className: p,
1540
1550
  height: e,
1541
1551
  width: l
1542
1552
  }) => {
1543
- const { colorScheme: p } = re(), s = p === "dark", f = kt(
1544
- (z, c) => {
1545
- const g = t[z];
1553
+ const { colorScheme: z } = re(), s = z === "dark", f = Ht(
1554
+ (w, c) => {
1555
+ const g = t[w];
1546
1556
  if (!g)
1547
1557
  return /* @__PURE__ */ F("div", { children: [
1548
1558
  "Panel not found: ",
1549
- z
1559
+ w
1550
1560
  ] });
1551
- const R = g.closable !== !1, S = /* @__PURE__ */ F("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
1561
+ const y = g.closable !== !1, S = /* @__PURE__ */ F("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
1552
1562
  g.icon && /* @__PURE__ */ a("span", { style: { display: "inline-flex" }, children: g.icon }),
1553
1563
  /* @__PURE__ */ a("span", { children: g.title })
1554
- ] }), w = [];
1555
- g.toolbarControls && w.push(...g.toolbarControls), R && w.push(
1564
+ ] }), b = [];
1565
+ g.toolbarControls && b.push(...g.toolbarControls), y && b.push(
1556
1566
  /* @__PURE__ */ a(
1557
1567
  "button",
1558
1568
  {
1559
- onClick: () => n?.(z),
1569
+ onClick: () => n?.(w),
1560
1570
  title: "Close",
1561
1571
  style: {
1562
1572
  background: "none",
@@ -1572,14 +1582,14 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1572
1582
  "close"
1573
1583
  )
1574
1584
  );
1575
- const I = typeof g.component == "function" ? g.component() : g.component;
1585
+ const M = typeof g.component == "function" ? g.component() : g.component;
1576
1586
  return /* @__PURE__ */ a(
1577
1587
  he,
1578
1588
  {
1579
1589
  path: c,
1580
1590
  title: S,
1581
- toolbarControls: w.length > 0 ? w : void 0,
1582
- children: I
1591
+ toolbarControls: b.length > 0 ? b : void 0,
1592
+ children: M
1583
1593
  }
1584
1594
  );
1585
1595
  },
@@ -1590,20 +1600,20 @@ const vi = ({ children: t, ...i }) => /* @__PURE__ */ a(Xt.Provider, { value: i,
1590
1600
  width: l ?? "100%",
1591
1601
  ...r
1592
1602
  };
1593
- return /* @__PURE__ */ a("div", { style: m, className: b, children: /* @__PURE__ */ a(
1603
+ return /* @__PURE__ */ a("div", { style: m, className: p, children: /* @__PURE__ */ a(
1594
1604
  ue,
1595
1605
  {
1596
1606
  renderTile: f,
1597
1607
  value: i,
1598
- onChange: (z) => o?.(z ?? null),
1608
+ onChange: (w) => o?.(w ?? null),
1599
1609
  zeroStateView: u || void 0,
1600
1610
  resize: d,
1601
1611
  className: s ? "mosaic-blueprint-theme bp4-dark" : "mosaic-blueprint-theme"
1602
1612
  }
1603
1613
  ) });
1604
1614
  };
1605
- Ze.displayName = "ArchbaseMosaicLayout";
1606
- const Ye = ({
1615
+ Ye.displayName = "ArchbaseMosaicLayout";
1616
+ const Ke = ({
1607
1617
  children: t,
1608
1618
  id: i,
1609
1619
  defaultSize: o,
@@ -1611,11 +1621,11 @@ const Ye = ({
1611
1621
  maxSize: u,
1612
1622
  collapsible: d = !1,
1613
1623
  collapsedSize: r = 0,
1614
- order: b,
1624
+ order: p,
1615
1625
  style: e,
1616
1626
  className: l
1617
1627
  }) => /* @__PURE__ */ a(
1618
- jt,
1628
+ $t,
1619
1629
  {
1620
1630
  id: i,
1621
1631
  defaultSize: o,
@@ -1623,14 +1633,14 @@ const Ye = ({
1623
1633
  maxSize: u,
1624
1634
  collapsible: d,
1625
1635
  collapsedSize: r,
1626
- order: b,
1636
+ order: p,
1627
1637
  style: e,
1628
1638
  className: l,
1629
1639
  children: t
1630
1640
  }
1631
1641
  );
1632
- Ye.displayName = "ArchbaseResizablePanel";
1633
- const Zt = ({
1642
+ Ke.displayName = "ArchbaseResizablePanel";
1643
+ const Yt = ({
1634
1644
  direction: t = "horizontal",
1635
1645
  size: i = 4,
1636
1646
  className: o,
@@ -1649,7 +1659,7 @@ const Zt = ({
1649
1659
  flexDirection: u ? "row" : "column",
1650
1660
  alignItems: "center",
1651
1661
  justifyContent: "center"
1652
- }, b = {
1662
+ }, p = {
1653
1663
  width: 3,
1654
1664
  height: 3,
1655
1665
  borderRadius: "50%",
@@ -1657,20 +1667,20 @@ const Zt = ({
1657
1667
  transition: "background-color 150ms ease"
1658
1668
  };
1659
1669
  return /* @__PURE__ */ a(
1660
- Vt,
1670
+ qt,
1661
1671
  {
1662
1672
  className: o,
1663
1673
  style: d,
1664
1674
  children: n && /* @__PURE__ */ F("span", { style: r, "aria-hidden": !0, children: [
1665
- /* @__PURE__ */ a("span", { style: b }),
1666
- /* @__PURE__ */ a("span", { style: b }),
1667
- /* @__PURE__ */ a("span", { style: b })
1675
+ /* @__PURE__ */ a("span", { style: p }),
1676
+ /* @__PURE__ */ a("span", { style: p }),
1677
+ /* @__PURE__ */ a("span", { style: p })
1668
1678
  ] })
1669
1679
  }
1670
1680
  );
1671
1681
  };
1672
- Zt.displayName = "ArchbaseResizableHandle";
1673
- const Ke = ({
1682
+ Yt.displayName = "ArchbaseResizableHandle";
1683
+ const Qe = ({
1674
1684
  direction: t = "horizontal",
1675
1685
  panels: i,
1676
1686
  onLayout: o,
@@ -1678,18 +1688,18 @@ const Ke = ({
1678
1688
  handleSize: u = 4,
1679
1689
  handleClassName: d,
1680
1690
  showHandleGrip: r = !0,
1681
- style: b,
1691
+ style: p,
1682
1692
  className: e,
1683
1693
  height: l,
1684
- width: p
1694
+ width: z
1685
1695
  }) => {
1686
1696
  const s = {
1687
1697
  height: l ?? "100%",
1688
- width: p ?? "100%",
1689
- ...b
1698
+ width: z ?? "100%",
1699
+ ...p
1690
1700
  };
1691
1701
  return /* @__PURE__ */ a(
1692
- Ft,
1702
+ Vt,
1693
1703
  {
1694
1704
  direction: t,
1695
1705
  onLayout: o,
@@ -1698,7 +1708,7 @@ const Ke = ({
1698
1708
  className: e,
1699
1709
  children: i.map((f, m) => /* @__PURE__ */ F(W.Fragment, { children: [
1700
1710
  /* @__PURE__ */ a(
1701
- jt,
1711
+ $t,
1702
1712
  {
1703
1713
  id: f.id,
1704
1714
  defaultSize: f.defaultSize,
@@ -1711,7 +1721,7 @@ const Ke = ({
1711
1721
  }
1712
1722
  ),
1713
1723
  m < i.length - 1 && /* @__PURE__ */ a(
1714
- Zt,
1724
+ Yt,
1715
1725
  {
1716
1726
  direction: t,
1717
1727
  size: u,
@@ -1723,8 +1733,8 @@ const Ke = ({
1723
1733
  }
1724
1734
  );
1725
1735
  };
1726
- Ke.displayName = "ArchbaseResizableLayout";
1727
- function Qe({
1736
+ Qe.displayName = "ArchbaseResizableLayout";
1737
+ function ti({
1728
1738
  components: t,
1729
1739
  defaultLayout: i,
1730
1740
  watermark: o,
@@ -1732,76 +1742,76 @@ function Qe({
1732
1742
  autoHideHeaders: u = !1,
1733
1743
  onLayoutChange: d,
1734
1744
  onPanelClose: r,
1735
- onPanelOpen: b,
1745
+ onPanelOpen: p,
1736
1746
  style: e,
1737
1747
  className: l,
1738
- height: p = "600px",
1748
+ height: z = "600px",
1739
1749
  disabled: s = !1
1740
1750
  }) {
1741
- const { t: f } = Wt(), m = ot(null), z = Ht(() => {
1751
+ const { t: f } = Ft(), m = ot(null), w = Wt(() => {
1742
1752
  const g = {};
1743
- for (const R of Object.values(t))
1744
- g[R.id] = (S) => /* @__PURE__ */ a(
1745
- ti,
1753
+ for (const y of Object.values(t))
1754
+ g[y.id] = (S) => /* @__PURE__ */ a(
1755
+ ei,
1746
1756
  {
1747
- component: R,
1757
+ component: y,
1748
1758
  api: S.api,
1749
- onClose: () => r?.(R.id)
1759
+ onClose: () => r?.(y.id)
1750
1760
  }
1751
1761
  );
1752
1762
  return g;
1753
- }, [t, r]), c = kt((g) => {
1763
+ }, [t, r]), c = Ht((g) => {
1754
1764
  if (m.current = g.api, i && typeof i != "string")
1755
1765
  try {
1756
1766
  g.api.fromJSON(i);
1757
- } catch (R) {
1758
- console.warn("Failed to load default layout:", R);
1767
+ } catch (y) {
1768
+ console.warn("Failed to load default layout:", y);
1759
1769
  }
1760
1770
  if (!i && Object.keys(t).length > 0) {
1761
- const R = Object.values(t)[0];
1771
+ const y = Object.values(t)[0];
1762
1772
  try {
1763
1773
  g.api.addPanel({
1764
- id: R.id,
1765
- component: R.id,
1766
- title: R.title
1774
+ id: y.id,
1775
+ component: y.id,
1776
+ title: y.title
1767
1777
  });
1768
1778
  } catch (S) {
1769
1779
  console.warn("Failed to add initial panel:", S);
1770
1780
  }
1771
1781
  }
1772
1782
  }, [i, t]);
1773
- return it(() => {
1783
+ return et(() => {
1774
1784
  if (!m.current)
1775
1785
  return;
1776
1786
  const g = [];
1777
1787
  if (d) {
1778
- const R = m.current.onDidLayoutChange(() => {
1788
+ const y = m.current.onDidLayoutChange(() => {
1779
1789
  d(m.current.toJSON());
1780
1790
  });
1781
- g.push(R);
1791
+ g.push(y);
1782
1792
  }
1783
1793
  if (r) {
1784
- const R = m.current.onDidRemovePanel((S) => {
1794
+ const y = m.current.onDidRemovePanel((S) => {
1785
1795
  r(S.panel.id);
1786
1796
  });
1787
- g.push(R);
1797
+ g.push(y);
1788
1798
  }
1789
1799
  return () => {
1790
- g.forEach((R) => R.dispose());
1800
+ g.forEach((y) => y.dispose());
1791
1801
  };
1792
1802
  }, [d, r]), /* @__PURE__ */ a(
1793
1803
  "div",
1794
1804
  {
1795
1805
  style: {
1796
1806
  width: "100%",
1797
- height: p,
1807
+ height: z,
1798
1808
  ...e
1799
1809
  },
1800
1810
  className: l,
1801
1811
  children: /* @__PURE__ */ a(
1802
1812
  fe,
1803
1813
  {
1804
- components: z,
1814
+ components: w,
1805
1815
  onReady: c,
1806
1816
  hideBorders: n,
1807
1817
  watermarkComponent: o ? () => /* @__PURE__ */ a("div", { style: {
@@ -1818,7 +1828,7 @@ function Qe({
1818
1828
  }
1819
1829
  );
1820
1830
  }
1821
- function ti({ component: t, api: i, onClose: o }) {
1831
+ function ei({ component: t, api: i, onClose: o }) {
1822
1832
  const n = t.component;
1823
1833
  return /* @__PURE__ */ a("div", { style: { height: "100%", overflow: "auto" }, children: /* @__PURE__ */ a(
1824
1834
  n,
@@ -1829,7 +1839,7 @@ function ti({ component: t, api: i, onClose: o }) {
1829
1839
  }
1830
1840
  ) });
1831
1841
  }
1832
- function Li({
1842
+ function Bi({
1833
1843
  preset: t,
1834
1844
  components: i = {},
1835
1845
  onPanelClose: o,
@@ -1838,12 +1848,12 @@ function Li({
1838
1848
  className: d,
1839
1849
  height: r
1840
1850
  }) {
1841
- const { layout: b, components: e } = Ht(() => ei(t, i), [t, i]);
1851
+ const { layout: p, components: e } = Wt(() => ii(t, i), [t, i]);
1842
1852
  return /* @__PURE__ */ a(
1843
- Qe,
1853
+ ti,
1844
1854
  {
1845
1855
  components: e,
1846
- defaultLayout: b,
1856
+ defaultLayout: p,
1847
1857
  onPanelClose: o,
1848
1858
  onPanelOpen: n,
1849
1859
  style: u,
@@ -1852,9 +1862,9 @@ function Li({
1852
1862
  }
1853
1863
  );
1854
1864
  }
1855
- function ei(t, i) {
1865
+ function ii(t, i) {
1856
1866
  const o = {
1857
- ...ii(),
1867
+ ...oi(),
1858
1868
  ...i
1859
1869
  };
1860
1870
  let n;
@@ -1863,20 +1873,20 @@ function ei(t, i) {
1863
1873
  n = Pt(o);
1864
1874
  break;
1865
1875
  case "ide":
1866
- n = oi(o);
1876
+ n = ni(o);
1867
1877
  break;
1868
1878
  case "explorer":
1869
- n = ni(o);
1879
+ n = ri(o);
1870
1880
  break;
1871
1881
  case "analytics":
1872
- n = ri(o);
1882
+ n = si(o);
1873
1883
  break;
1874
1884
  default:
1875
1885
  n = Pt(o);
1876
1886
  }
1877
1887
  return { layout: n, components: o };
1878
1888
  }
1879
- function ii() {
1889
+ function oi() {
1880
1890
  return {
1881
1891
  // Dashboard
1882
1892
  overview: {
@@ -2012,7 +2022,7 @@ function Pt(t) {
2012
2022
  }
2013
2023
  };
2014
2024
  }
2015
- function oi(t) {
2025
+ function ni(t) {
2016
2026
  return {
2017
2027
  root: {
2018
2028
  type: "branch",
@@ -2093,7 +2103,7 @@ function oi(t) {
2093
2103
  }
2094
2104
  };
2095
2105
  }
2096
- function ni(t) {
2106
+ function ri(t) {
2097
2107
  return {
2098
2108
  root: {
2099
2109
  type: "branch",
@@ -2124,7 +2134,7 @@ function ni(t) {
2124
2134
  }
2125
2135
  };
2126
2136
  }
2127
- function ri(t) {
2137
+ function si(t) {
2128
2138
  return {
2129
2139
  root: {
2130
2140
  type: "branch",
@@ -2178,24 +2188,24 @@ function ri(t) {
2178
2188
  };
2179
2189
  }
2180
2190
  export {
2181
- C as AnchorType,
2182
- Si as ArchbaseAdvancedTabs,
2191
+ x as AnchorType,
2192
+ Ti as ArchbaseAdvancedTabs,
2183
2193
  Mi as ArchbaseCard,
2184
- Bi as ArchbaseContainer,
2185
- Qe as ArchbaseDockLayout,
2186
- Li as ArchbaseDockLayoutPreset,
2187
- Ai as ArchbaseDockableContainer,
2188
- Ti as ArchbaseFloatingWindow,
2189
- zi as ArchbaseForm,
2190
- Ii as ArchbaseGroup,
2191
- Ze as ArchbaseMosaicLayout,
2192
- Zt as ArchbaseResizableHandle,
2193
- Ke as ArchbaseResizableLayout,
2194
- Ye as ArchbaseResizablePanel,
2195
- ke as ArchbaseSpaceBottom,
2196
- Ee as ArchbaseSpaceBottomResizable,
2197
- $e as ArchbaseSpaceCentered,
2198
- je as ArchbaseSpaceCenteredVertically,
2194
+ Ii as ArchbaseContainer,
2195
+ ti as ArchbaseDockLayout,
2196
+ Bi as ArchbaseDockLayoutPreset,
2197
+ Li as ArchbaseDockableContainer,
2198
+ Ci as ArchbaseFloatingWindow,
2199
+ wi as ArchbaseForm,
2200
+ Oi as ArchbaseGroup,
2201
+ Ye as ArchbaseMosaicLayout,
2202
+ Yt as ArchbaseResizableHandle,
2203
+ Qe as ArchbaseResizableLayout,
2204
+ Ke as ArchbaseResizablePanel,
2205
+ Ee as ArchbaseSpaceBottom,
2206
+ Pe as ArchbaseSpaceBottomResizable,
2207
+ Be as ArchbaseSpaceCentered,
2208
+ $e as ArchbaseSpaceCenteredVertically,
2199
2209
  We as ArchbaseSpaceCustom,
2200
2210
  Fe as ArchbaseSpaceFill,
2201
2211
  Ve as ArchbaseSpaceFixed,
@@ -2203,23 +2213,23 @@ export {
2203
2213
  qe as ArchbaseSpaceLayer,
2204
2214
  Oe as ArchbaseSpaceLeft,
2205
2215
  Ie as ArchbaseSpaceLeftResizable,
2206
- vi as ArchbaseSpaceOptions,
2216
+ Si as ArchbaseSpaceOptions,
2207
2217
  Ue as ArchbaseSpacePositioned,
2208
- Pe as ArchbaseSpaceRight,
2209
- Ne as ArchbaseSpaceRightResizable,
2210
- _e as ArchbaseSpaceTop,
2218
+ Ne as ArchbaseSpaceRight,
2219
+ _e as ArchbaseSpaceRightResizable,
2220
+ ke as ArchbaseSpaceTop,
2211
2221
  De as ArchbaseSpaceTopResizable,
2212
2222
  Xe as ArchbaseSpaceViewPort,
2213
2223
  xi as ArchbaseSplitPane,
2214
- Ci as ArchbaseSplitPanePane,
2215
- Je as ArchbaseSplitPaneResizer,
2216
- Oi as ArchbaseStack,
2217
- st as CenterType,
2218
- rt as ResizeHandlePlacement,
2219
- y as ResizeType,
2220
- A as Type,
2224
+ Ai as ArchbaseSplitPanePane,
2225
+ Ze as ArchbaseSplitPaneResizer,
2226
+ Di as ArchbaseStack,
2227
+ lt as CenterType,
2228
+ st as ResizeHandlePlacement,
2229
+ v as ResizeType,
2230
+ L as Type,
2221
2231
  Tt as anchoredProps,
2222
- yi as enabledSsrSupport,
2232
+ vi as enabledSsrSupport,
2223
2233
  St as resizableProps,
2224
- wi as useArchbaseCurrentSpace
2234
+ yi as useArchbaseCurrentSpace
2225
2235
  };