@factorialco/f0-react 1.300.0 → 1.301.0

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/f0.js CHANGED
@@ -1,126 +1,217 @@
1
- import { S as Be, a as At, f as Ee, L as J, b as Tt, A as Lt, i as ae, c as Ye, d as Xe, E as Mt, g as he, e as Ht, h as Bt, C as Ft, j as Wt, k as V, l as Je, u as It, G as Gt, m as Ut, n as Fe, o as $t, p as Ze, q as jt, B as Qe, X as et, Y as Ne, r as Kt, s as tt, t as Vt, v as qt, w as Yt, x as Xt, y as Jt, z as Zt, D as Qt, F as ei, H as We, I as ti, J as Z, K as Ce, M as ii, N as si, P as ri, O as F, Q as ni, R as oi, T as ai, U as li, V as hi, W as di, Z as ci, _ as it, $ as ui, a0 as de, a1 as st, a2 as rt, a3 as fi, a4 as nt, a5 as ot, a6 as at, a7 as lt, a8 as gi, a9 as pi, aa as ht, ab as mi, ac as B, ad as vi, ae as dt, af as yi, ag as ct, ah as bi, ai as _i, aj as xi, ak as wi, al as Ei, am as Ci, an as Ri, ao as Ni, ap as ut, aq as q, ar as ft, as as zi, at as Di, au as Ie, av as Si, aw as gt, ax as Pi, ay as ki, az as Oi, aA as Ai, aB as Ti, aC as Li, aD as Mi, aE as Hi, aF as Bi, aG as Fi, aH as Wi, aI as Ii } from "./hooks-CxaQvlbP.js";
2
- import { bb as yr, bo as br, bx as _r, aJ as xr, aK as wr, aL as Er, aM as Cr, aN as Rr, aO as Nr, aP as zr, aQ as Dr, aS as Sr, aT as Pr, aU as kr, aV as Or, aW as Ar, aX as Tr, aY as Lr, bt as Mr, a_ as Hr, a$ as Br, b2 as Fr, b3 as Wr, b4 as Ir, b5 as Gr, b8 as Ur, b9 as $r, ba as jr, bd as Kr, b1 as Vr, bc as qr, b7 as Yr, bu as Xr, bn as Jr, bi as Zr, bl as Qr, bh as en, by as tn, bg as sn, bf as rn, aR as nn, aZ as on, b0 as an, b6 as ln, be as hn, bj as dn, bp as cn, bq as un, br as fn, bz as gn, bk as pn, bs as mn, bw as vn, bm as yn, bv as bn } from "./hooks-CxaQvlbP.js";
3
- import { jsx as g, jsxs as N, Fragment as be } from "react/jsx-runtime";
4
- import S, { PureComponent as Gi, useState as L, forwardRef as $, createElement as Ge, useRef as Q, useImperativeHandle as pt, Children as Ui, createContext as _e, useContext as mt, useCallback as K, useEffect as ce, useLayoutEffect as Ue, useMemo as vt } from "react";
5
- import { createPortal as $i } from "react-dom";
6
- import { defaultTranslations as xn } from "./i18n-provider-defaults.js";
7
- import './f0.css';const js = [
1
+ import { L as Ze, C as Tt, c as G, a as Qe, b as U, S as We, d as At, f as ke, e as ae, g as Lt, A as Mt, i as ge, h as et, j as tt, E as Ht, k as me, l as Bt, m as Ft, n as It, o as Wt, p as te, q as it, u as Gt, G as Ut, r as $t, s as Ge, t as jt, v as st, w as Kt, B as rt, X as nt, Y as Te, x as qt, y as ot, z as Vt, D as Yt, F as Xt, H as Jt, I as Zt, J as Qt, K as ei, M as ti, N as Ue, O as ii, P as le, Q as Oe, R as si, T as ri, U as ni, V as oi, W as ai, Z as li, _ as hi, $ as di, a0 as ci, a1 as ui, a2 as at, a3 as fi, a4 as ve, a5 as lt, a6 as ht, a7 as gi, a8 as dt, a9 as ct, aa as ut, ab as ft, ac as pi, ad as mi, ae as vi, af as yi, ag as bi, ah as _i, ai as gt, aj as xi, ak as wi, al as Ei, am as Ci, an as Ri, ao as Ni, ap as zi, aq as Si, ar as pt, as as se, at as mt, au as Di, av as ki, aw as $e, ax as Oi, ay as vt, az as Pi, aA as Ti, aB as Ai, aC as Li, aD as Mi, aE as Hi, aF as Bi, aG as Fi, aH as Ii, aI as Wi, aJ as Gi, aK as Ui } from "./hooks-CKH69X_Y.js";
2
+ import { bd as Cr, bq as Rr, bz as Nr, aL as zr, aM as Sr, aN as Dr, aO as kr, aP as Or, aQ as Pr, aR as Tr, aS as Ar, aU as Lr, aV as Mr, aW as Hr, aX as Br, aY as Fr, aZ as Ir, a_ as Wr, bv as Gr, b0 as Ur, b1 as $r, b4 as jr, b5 as Kr, b6 as qr, b7 as Vr, ba as Yr, bb as Xr, bc as Jr, bf as Zr, b3 as Qr, be as en, b9 as tn, bw as sn, bp as rn, bk as nn, bn as on, bj as an, bA as ln, bi as hn, bh as dn, aT as cn, a$ as un, b2 as fn, b8 as gn, bg as pn, bl as mn, br as vn, bs as yn, bt as bn, bB as _n, bm as xn, bu as wn, by as En, bo as Cn, bx as Rn } from "./hooks-CKH69X_Y.js";
3
+ import { jsx as g, jsxs as O, Fragment as Ne } from "react/jsx-runtime";
4
+ import T, { forwardRef as ee, useRef as X, useImperativeHandle as $i, Children as ji, PureComponent as Ki, useState as B, createElement as je, createContext as ze, useContext as yt, useMemo as ye, useEffect as V, useCallback as Ae, useLayoutEffect as Ke } from "react";
5
+ import { createPortal as qi } from "react-dom";
6
+ import { defaultTranslations as zn } from "./i18n-provider-defaults.js";
7
+ import './f0.css';const Vi = {
8
+ xs: 1,
9
+ sm: 2,
10
+ md: 2,
11
+ lg: 2
12
+ }, Yi = ee(function({ widgets: e, children: t }, i) {
13
+ const s = X(null);
14
+ $i(i, () => s.current);
15
+ const r = ji.toArray(e).filter((n) => !!n).map((n, o) => g("div", {
16
+ className: "h-full @5xl:h-auto [&>div]:h-full",
17
+ children: n
18
+ }, o));
19
+ return g(Ze, {
20
+ layout: "home",
21
+ children: O("div", {
22
+ ref: s,
23
+ className: "@container",
24
+ children: [O("div", {
25
+ className: "flex flex-col gap-6 px-5 pt-4 @md:pt-2 @5xl:hidden",
26
+ children: [g(Tt, {
27
+ columns: Vi,
28
+ showArrows: !1,
29
+ children: r
30
+ }), g("main", {
31
+ children: t
32
+ })]
33
+ }), O("div", {
34
+ className: "hidden grid-cols-3 gap-5 px-6 pb-6 pt-2 @5xl:grid",
35
+ children: [g("div", {
36
+ className: "col-span-3 flex flex-row gap-5 *:flex-1",
37
+ children: r.slice(0, 3)
38
+ }), g("main", {
39
+ className: "col-span-2",
40
+ children: t
41
+ }), g("div", {
42
+ className: "flex flex-1 flex-col gap-5",
43
+ children: r.slice(3)
44
+ })]
45
+ })]
46
+ })
47
+ });
48
+ }), Xi = ee(function({ children: e, sideContent: t, mainColumnPosition: i = "left", sticky: s = !1 }, r) {
49
+ return g("div", {
50
+ ref: r,
51
+ className: "h-full",
52
+ children: O("div", {
53
+ className: G("flex h-full max-w-full overflow-auto text-f1-foreground md:flex-row", "flex-col", "overflow-y-auto", s && "md:sticky md:top-0 md:max-h-full"),
54
+ children: [g("main", {
55
+ className: G("sm:min-h-xs order-2 h-fit border-0 px-4 py-5 sm:flex-1 sm:border-solid md:order-2 md:px-6", s ? "md:h-full md:max-h-full md:overflow-y-auto" : "min-h-full", i === "right" ? "sm:border-l sm:border-l-f1-border-secondary" : "sm:border-r sm:border-r-f1-border-secondary", "border-t border-solid border-t-f1-border-secondary sm:border-t-0"),
56
+ children: e
57
+ }), g(Ji, {
58
+ sticky: s,
59
+ className: G("order-1", i === "right" ? "md:order-1" : "md:order-3"),
60
+ children: t
61
+ })]
62
+ })
63
+ });
64
+ }), Ji = ({ children: a, className: e }) => g("aside", {
65
+ className: G("min-w-30 py-5 pl-4 pr-4 sm:basis-1/4 sm:pb-6 md:max-w-80 md:pl-2", e),
66
+ children: a
67
+ }), Zi = Qe({
68
+ base: "relative flex min-h-full w-full flex-1 flex-col gap-4 place-self-center overflow-y-auto px-6 py-5",
69
+ variants: {
70
+ variant: {
71
+ narrow: "max-w-screen-lg"
72
+ }
73
+ }
74
+ }), bt = T.forwardRef(({ children: a, variant: e, className: t, ...i }, s) => g(Ze, {
75
+ layout: "standard",
76
+ children: g("section", {
77
+ ref: s,
78
+ className: G("relative flex-1 overflow-auto", t),
79
+ ...i,
80
+ children: g("div", {
81
+ className: G(Zi({
82
+ variant: e
83
+ })),
84
+ children: a
85
+ })
86
+ })
87
+ }));
88
+ bt.displayName = "StandardLayout";
89
+ const Js = U({
90
+ name: "StandardLayout",
91
+ type: "layout"
92
+ }, bt), Zs = U({
93
+ name: "TwoColumnLayout",
94
+ type: "layout"
95
+ }, Xi), Qs = U({
96
+ name: "HomeLayout",
97
+ type: "layout"
98
+ }, Yi), er = [
8
99
  "person",
9
100
  "team",
10
101
  "company",
11
102
  "file",
12
103
  "flag"
13
104
  ];
14
- function Y(a) {
105
+ function re(a) {
15
106
  "@babel/helpers - typeof";
16
- return Y = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
107
+ return re = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
17
108
  return typeof e;
18
109
  } : function(e) {
19
110
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
20
- }, Y(a);
111
+ }, re(a);
21
112
  }
22
- function ji(a, e) {
113
+ function Qi(a, e) {
23
114
  if (!(a instanceof e))
24
115
  throw new TypeError("Cannot call a class as a function");
25
116
  }
26
- function Ki(a, e) {
117
+ function es(a, e) {
27
118
  for (var t = 0; t < e.length; t++) {
28
119
  var i = e[t];
29
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, _t(i.key), i);
120
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, wt(i.key), i);
30
121
  }
31
122
  }
32
- function Vi(a, e, t) {
33
- return e && Ki(a.prototype, e), Object.defineProperty(a, "prototype", { writable: !1 }), a;
123
+ function ts(a, e, t) {
124
+ return e && es(a.prototype, e), Object.defineProperty(a, "prototype", { writable: !1 }), a;
34
125
  }
35
- function qi(a, e, t) {
36
- return e = ue(e), Yi(a, yt() ? Reflect.construct(e, t || [], ue(a).constructor) : e.apply(a, t));
126
+ function is(a, e, t) {
127
+ return e = be(e), ss(a, _t() ? Reflect.construct(e, t || [], be(a).constructor) : e.apply(a, t));
37
128
  }
38
- function Yi(a, e) {
39
- if (e && (Y(e) === "object" || typeof e == "function"))
129
+ function ss(a, e) {
130
+ if (e && (re(e) === "object" || typeof e == "function"))
40
131
  return e;
41
132
  if (e !== void 0)
42
133
  throw new TypeError("Derived constructors may only return object or undefined");
43
- return Xi(a);
134
+ return rs(a);
44
135
  }
45
- function Xi(a) {
136
+ function rs(a) {
46
137
  if (a === void 0)
47
138
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
48
139
  return a;
49
140
  }
50
- function yt() {
141
+ function _t() {
51
142
  try {
52
143
  var a = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
53
144
  }));
54
145
  } catch {
55
146
  }
56
- return (yt = function() {
147
+ return (_t = function() {
57
148
  return !!a;
58
149
  })();
59
150
  }
60
- function ue(a) {
61
- return ue = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
151
+ function be(a) {
152
+ return be = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
62
153
  return t.__proto__ || Object.getPrototypeOf(t);
63
- }, ue(a);
154
+ }, be(a);
64
155
  }
65
- function Ji(a, e) {
156
+ function ns(a, e) {
66
157
  if (typeof e != "function" && e !== null)
67
158
  throw new TypeError("Super expression must either be null or a function");
68
- a.prototype = Object.create(e && e.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), Object.defineProperty(a, "prototype", { writable: !1 }), e && ze(a, e);
159
+ a.prototype = Object.create(e && e.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), Object.defineProperty(a, "prototype", { writable: !1 }), e && Le(a, e);
69
160
  }
70
- function ze(a, e) {
71
- return ze = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
161
+ function Le(a, e) {
162
+ return Le = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
72
163
  return i.__proto__ = s, i;
73
- }, ze(a, e);
164
+ }, Le(a, e);
74
165
  }
75
- function bt(a, e, t) {
76
- return e = _t(e), e in a ? Object.defineProperty(a, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[e] = t, a;
166
+ function xt(a, e, t) {
167
+ return e = wt(e), e in a ? Object.defineProperty(a, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[e] = t, a;
77
168
  }
78
- function _t(a) {
79
- var e = Zi(a, "string");
80
- return Y(e) == "symbol" ? e : e + "";
169
+ function wt(a) {
170
+ var e = os(a, "string");
171
+ return re(e) == "symbol" ? e : e + "";
81
172
  }
82
- function Zi(a, e) {
83
- if (Y(a) != "object" || !a) return a;
173
+ function os(a, e) {
174
+ if (re(a) != "object" || !a) return a;
84
175
  var t = a[Symbol.toPrimitive];
85
176
  if (t !== void 0) {
86
177
  var i = t.call(a, e);
87
- if (Y(i) != "object") return i;
178
+ if (re(i) != "object") return i;
88
179
  throw new TypeError("@@toPrimitive must return a primitive value.");
89
180
  }
90
181
  return String(a);
91
182
  }
92
- var xe = /* @__PURE__ */ function(a) {
183
+ var Se = /* @__PURE__ */ function(a) {
93
184
  function e() {
94
- return ji(this, e), qi(this, e, arguments);
185
+ return Qi(this, e), is(this, e, arguments);
95
186
  }
96
- return Ji(e, a), Vi(e, [{
187
+ return ns(e, a), ts(e, [{
97
188
  key: "render",
98
189
  value: function() {
99
190
  return null;
100
191
  }
101
192
  }]);
102
- }(S.Component);
103
- bt(xe, "displayName", "ZAxis");
104
- bt(xe, "defaultProps", {
193
+ }(T.Component);
194
+ xt(Se, "displayName", "ZAxis");
195
+ xt(Se, "defaultProps", {
105
196
  zAxisId: 0,
106
197
  range: [64, 64],
107
198
  scale: "auto",
108
199
  type: "number"
109
200
  });
110
- var Qi = ["option", "isActive"];
111
- function ee() {
112
- return ee = Object.assign ? Object.assign.bind() : function(a) {
201
+ var as = ["option", "isActive"];
202
+ function he() {
203
+ return he = Object.assign ? Object.assign.bind() : function(a) {
113
204
  for (var e = 1; e < arguments.length; e++) {
114
205
  var t = arguments[e];
115
206
  for (var i in t)
116
207
  Object.prototype.hasOwnProperty.call(t, i) && (a[i] = t[i]);
117
208
  }
118
209
  return a;
119
- }, ee.apply(this, arguments);
210
+ }, he.apply(this, arguments);
120
211
  }
121
- function es(a, e) {
212
+ function ls(a, e) {
122
213
  if (a == null) return {};
123
- var t = ts(a, e), i, s;
214
+ var t = hs(a, e), i, s;
124
215
  if (Object.getOwnPropertySymbols) {
125
216
  var r = Object.getOwnPropertySymbols(a);
126
217
  for (s = 0; s < r.length; s++)
@@ -128,7 +219,7 @@ function es(a, e) {
128
219
  }
129
220
  return t;
130
221
  }
131
- function ts(a, e) {
222
+ function hs(a, e) {
132
223
  if (a == null) return {};
133
224
  var t = {};
134
225
  for (var i in a)
@@ -138,39 +229,39 @@ function ts(a, e) {
138
229
  }
139
230
  return t;
140
231
  }
141
- function is(a) {
142
- var e = a.option, t = a.isActive, i = es(a, Qi);
143
- return typeof e == "string" ? /* @__PURE__ */ S.createElement(Be, ee({
144
- option: /* @__PURE__ */ S.createElement(At, ee({
232
+ function ds(a) {
233
+ var e = a.option, t = a.isActive, i = ls(a, as);
234
+ return typeof e == "string" ? /* @__PURE__ */ T.createElement(We, he({
235
+ option: /* @__PURE__ */ T.createElement(At, he({
145
236
  type: e
146
237
  }, i)),
147
238
  isActive: t,
148
239
  shapeType: "symbols"
149
- }, i)) : /* @__PURE__ */ S.createElement(Be, ee({
240
+ }, i)) : /* @__PURE__ */ T.createElement(We, he({
150
241
  option: e,
151
242
  isActive: t,
152
243
  shapeType: "symbols"
153
244
  }, i));
154
245
  }
155
- function X(a) {
246
+ function ne(a) {
156
247
  "@babel/helpers - typeof";
157
- return X = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
248
+ return ne = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
158
249
  return typeof e;
159
250
  } : function(e) {
160
251
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
161
- }, X(a);
252
+ }, ne(a);
162
253
  }
163
- function te() {
164
- return te = Object.assign ? Object.assign.bind() : function(a) {
254
+ function de() {
255
+ return de = Object.assign ? Object.assign.bind() : function(a) {
165
256
  for (var e = 1; e < arguments.length; e++) {
166
257
  var t = arguments[e];
167
258
  for (var i in t)
168
259
  Object.prototype.hasOwnProperty.call(t, i) && (a[i] = t[i]);
169
260
  }
170
261
  return a;
171
- }, te.apply(this, arguments);
262
+ }, de.apply(this, arguments);
172
263
  }
173
- function $e(a, e) {
264
+ function qe(a, e) {
174
265
  var t = Object.keys(a);
175
266
  if (Object.getOwnPropertySymbols) {
176
267
  var i = Object.getOwnPropertySymbols(a);
@@ -180,128 +271,128 @@ function $e(a, e) {
180
271
  }
181
272
  return t;
182
273
  }
183
- function T(a) {
274
+ function I(a) {
184
275
  for (var e = 1; e < arguments.length; e++) {
185
276
  var t = arguments[e] != null ? arguments[e] : {};
186
- e % 2 ? $e(Object(t), !0).forEach(function(i) {
187
- j(a, i, t[i]);
188
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : $e(Object(t)).forEach(function(i) {
277
+ e % 2 ? qe(Object(t), !0).forEach(function(i) {
278
+ Y(a, i, t[i]);
279
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : qe(Object(t)).forEach(function(i) {
189
280
  Object.defineProperty(a, i, Object.getOwnPropertyDescriptor(t, i));
190
281
  });
191
282
  }
192
283
  return a;
193
284
  }
194
- function ss(a, e) {
285
+ function cs(a, e) {
195
286
  if (!(a instanceof e))
196
287
  throw new TypeError("Cannot call a class as a function");
197
288
  }
198
- function je(a, e) {
289
+ function Ve(a, e) {
199
290
  for (var t = 0; t < e.length; t++) {
200
291
  var i = e[t];
201
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, wt(i.key), i);
292
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(a, Ct(i.key), i);
202
293
  }
203
294
  }
204
- function rs(a, e, t) {
205
- return e && je(a.prototype, e), t && je(a, t), Object.defineProperty(a, "prototype", { writable: !1 }), a;
295
+ function us(a, e, t) {
296
+ return e && Ve(a.prototype, e), t && Ve(a, t), Object.defineProperty(a, "prototype", { writable: !1 }), a;
206
297
  }
207
- function ns(a, e, t) {
208
- return e = fe(e), os(a, xt() ? Reflect.construct(e, t || [], fe(a).constructor) : e.apply(a, t));
298
+ function fs(a, e, t) {
299
+ return e = _e(e), gs(a, Et() ? Reflect.construct(e, t || [], _e(a).constructor) : e.apply(a, t));
209
300
  }
210
- function os(a, e) {
211
- if (e && (X(e) === "object" || typeof e == "function"))
301
+ function gs(a, e) {
302
+ if (e && (ne(e) === "object" || typeof e == "function"))
212
303
  return e;
213
304
  if (e !== void 0)
214
305
  throw new TypeError("Derived constructors may only return object or undefined");
215
- return as(a);
306
+ return ps(a);
216
307
  }
217
- function as(a) {
308
+ function ps(a) {
218
309
  if (a === void 0)
219
310
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
220
311
  return a;
221
312
  }
222
- function xt() {
313
+ function Et() {
223
314
  try {
224
315
  var a = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
225
316
  }));
226
317
  } catch {
227
318
  }
228
- return (xt = function() {
319
+ return (Et = function() {
229
320
  return !!a;
230
321
  })();
231
322
  }
232
- function fe(a) {
233
- return fe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
323
+ function _e(a) {
324
+ return _e = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
234
325
  return t.__proto__ || Object.getPrototypeOf(t);
235
- }, fe(a);
326
+ }, _e(a);
236
327
  }
237
- function ls(a, e) {
328
+ function ms(a, e) {
238
329
  if (typeof e != "function" && e !== null)
239
330
  throw new TypeError("Super expression must either be null or a function");
240
- a.prototype = Object.create(e && e.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), Object.defineProperty(a, "prototype", { writable: !1 }), e && De(a, e);
331
+ a.prototype = Object.create(e && e.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), Object.defineProperty(a, "prototype", { writable: !1 }), e && Me(a, e);
241
332
  }
242
- function De(a, e) {
243
- return De = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
333
+ function Me(a, e) {
334
+ return Me = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
244
335
  return i.__proto__ = s, i;
245
- }, De(a, e);
336
+ }, Me(a, e);
246
337
  }
247
- function j(a, e, t) {
248
- return e = wt(e), e in a ? Object.defineProperty(a, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[e] = t, a;
338
+ function Y(a, e, t) {
339
+ return e = Ct(e), e in a ? Object.defineProperty(a, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[e] = t, a;
249
340
  }
250
- function wt(a) {
251
- var e = hs(a, "string");
252
- return X(e) == "symbol" ? e : e + "";
341
+ function Ct(a) {
342
+ var e = vs(a, "string");
343
+ return ne(e) == "symbol" ? e : e + "";
253
344
  }
254
- function hs(a, e) {
255
- if (X(a) != "object" || !a) return a;
345
+ function vs(a, e) {
346
+ if (ne(a) != "object" || !a) return a;
256
347
  var t = a[Symbol.toPrimitive];
257
348
  if (t !== void 0) {
258
349
  var i = t.call(a, e);
259
- if (X(i) != "object") return i;
350
+ if (ne(i) != "object") return i;
260
351
  throw new TypeError("@@toPrimitive must return a primitive value.");
261
352
  }
262
353
  return String(a);
263
354
  }
264
- var re = /* @__PURE__ */ function(a) {
355
+ var fe = /* @__PURE__ */ function(a) {
265
356
  function e() {
266
357
  var t;
267
- ss(this, e);
358
+ cs(this, e);
268
359
  for (var i = arguments.length, s = new Array(i), r = 0; r < i; r++)
269
360
  s[r] = arguments[r];
270
- return t = ns(this, e, [].concat(s)), j(t, "state", {
361
+ return t = fs(this, e, [].concat(s)), Y(t, "state", {
271
362
  isAnimationFinished: !1
272
- }), j(t, "handleAnimationEnd", function() {
363
+ }), Y(t, "handleAnimationEnd", function() {
273
364
  t.setState({
274
365
  isAnimationFinished: !0
275
366
  });
276
- }), j(t, "handleAnimationStart", function() {
367
+ }), Y(t, "handleAnimationStart", function() {
277
368
  t.setState({
278
369
  isAnimationFinished: !1
279
370
  });
280
- }), j(t, "id", It("recharts-scatter-")), t;
371
+ }), Y(t, "id", Gt("recharts-scatter-")), t;
281
372
  }
282
- return ls(e, a), rs(e, [{
373
+ return ms(e, a), us(e, [{
283
374
  key: "renderSymbolsStatically",
284
375
  value: function(i) {
285
- var s = this, r = this.props, n = r.shape, o = r.activeShape, h = r.activeIndex, c = Ee(this.props, !1);
376
+ var s = this, r = this.props, n = r.shape, o = r.activeShape, h = r.activeIndex, c = ke(this.props, !1);
286
377
  return i.map(function(l, d) {
287
- var f = h === d, p = f ? o : n, m = T(T({}, c), l);
288
- return /* @__PURE__ */ S.createElement(J, te({
378
+ var f = h === d, p = f ? o : n, y = I(I({}, c), l);
379
+ return /* @__PURE__ */ T.createElement(ae, de({
289
380
  className: "recharts-scatter-symbol",
290
381
  key: "symbol-".concat(l == null ? void 0 : l.cx, "-").concat(l == null ? void 0 : l.cy, "-").concat(l == null ? void 0 : l.size, "-").concat(d)
291
- }, Tt(s.props, l, d), {
382
+ }, Lt(s.props, l, d), {
292
383
  role: "img"
293
- }), /* @__PURE__ */ S.createElement(is, te({
384
+ }), /* @__PURE__ */ T.createElement(ds, de({
294
385
  option: p,
295
386
  isActive: f,
296
387
  key: "symbol-".concat(d)
297
- }, m)));
388
+ }, y)));
298
389
  });
299
390
  }
300
391
  }, {
301
392
  key: "renderSymbolsWithAnimation",
302
393
  value: function() {
303
394
  var i = this, s = this.props, r = s.points, n = s.isAnimationActive, o = s.animationBegin, h = s.animationDuration, c = s.animationEasing, l = s.animationId, d = this.state.prevPoints;
304
- return /* @__PURE__ */ S.createElement(Lt, {
395
+ return /* @__PURE__ */ T.createElement(Mt, {
305
396
  begin: o,
306
397
  duration: h,
307
398
  isActive: n,
@@ -316,29 +407,29 @@ var re = /* @__PURE__ */ function(a) {
316
407
  onAnimationEnd: this.handleAnimationEnd,
317
408
  onAnimationStart: this.handleAnimationStart
318
409
  }, function(f) {
319
- var p = f.t, m = r.map(function(v, b) {
320
- var w = d && d[b];
321
- if (w) {
322
- var C = ae(w.cx, v.cx), E = ae(w.cy, v.cy), D = ae(w.size, v.size);
323
- return T(T({}, v), {}, {
324
- cx: C(p),
325
- cy: E(p),
326
- size: D(p)
410
+ var p = f.t, y = r.map(function(C, S) {
411
+ var D = d && d[S];
412
+ if (D) {
413
+ var R = ge(D.cx, C.cx), w = ge(D.cy, C.cy), E = ge(D.size, C.size);
414
+ return I(I({}, C), {}, {
415
+ cx: R(p),
416
+ cy: w(p),
417
+ size: E(p)
327
418
  });
328
419
  }
329
- var R = ae(0, v.size);
330
- return T(T({}, v), {}, {
331
- size: R(p)
420
+ var v = ge(0, C.size);
421
+ return I(I({}, C), {}, {
422
+ size: v(p)
332
423
  });
333
424
  });
334
- return /* @__PURE__ */ S.createElement(J, null, i.renderSymbolsStatically(m));
425
+ return /* @__PURE__ */ T.createElement(ae, null, i.renderSymbolsStatically(y));
335
426
  });
336
427
  }
337
428
  }, {
338
429
  key: "renderSymbols",
339
430
  value: function() {
340
431
  var i = this.props, s = i.points, r = i.isAnimationActive, n = this.state.prevPoints;
341
- return r && s && s.length && (!n || !Ye(n, s)) ? this.renderSymbolsWithAnimation() : this.renderSymbolsStatically(s);
432
+ return r && s && s.length && (!n || !et(n, s)) ? this.renderSymbolsWithAnimation() : this.renderSymbolsStatically(s);
342
433
  }
343
434
  }, {
344
435
  key: "renderErrorBar",
@@ -346,21 +437,21 @@ var re = /* @__PURE__ */ function(a) {
346
437
  var i = this.props.isAnimationActive;
347
438
  if (i && !this.state.isAnimationFinished)
348
439
  return null;
349
- var s = this.props, r = s.points, n = s.xAxis, o = s.yAxis, h = s.children, c = Xe(h, Mt);
440
+ var s = this.props, r = s.points, n = s.xAxis, o = s.yAxis, h = s.children, c = tt(h, Ht);
350
441
  return c ? c.map(function(l, d) {
351
- var f = l.props, p = f.direction, m = f.dataKey;
352
- return /* @__PURE__ */ S.cloneElement(l, {
353
- key: "".concat(p, "-").concat(m, "-").concat(r[d]),
442
+ var f = l.props, p = f.direction, y = f.dataKey;
443
+ return /* @__PURE__ */ T.cloneElement(l, {
444
+ key: "".concat(p, "-").concat(y, "-").concat(r[d]),
354
445
  data: r,
355
446
  xAxis: n,
356
447
  yAxis: o,
357
448
  layout: p === "x" ? "vertical" : "horizontal",
358
- dataPointFormatter: function(b, w) {
449
+ dataPointFormatter: function(S, D) {
359
450
  return {
360
- x: b.cx,
361
- y: b.cy,
362
- value: p === "x" ? +b.node.x : +b.node.y,
363
- errorVal: he(b, w)
451
+ x: S.cx,
452
+ y: S.cy,
453
+ value: p === "x" ? +S.node.x : +S.node.y,
454
+ errorVal: me(S, D)
364
455
  };
365
456
  }
366
457
  });
@@ -369,35 +460,35 @@ var re = /* @__PURE__ */ function(a) {
369
460
  }, {
370
461
  key: "renderLine",
371
462
  value: function() {
372
- var i = this.props, s = i.points, r = i.line, n = i.lineType, o = i.lineJointType, h = Ee(this.props, !1), c = Ee(r, !1), l, d;
463
+ var i = this.props, s = i.points, r = i.line, n = i.lineType, o = i.lineJointType, h = ke(this.props, !1), c = ke(r, !1), l, d;
373
464
  if (n === "joint")
374
- l = s.map(function(E) {
465
+ l = s.map(function(w) {
375
466
  return {
376
- x: E.cx,
377
- y: E.cy
467
+ x: w.cx,
468
+ y: w.cy
378
469
  };
379
470
  });
380
471
  else if (n === "fitting") {
381
- var f = Ht(s), p = f.xmin, m = f.xmax, v = f.a, b = f.b, w = function(D) {
382
- return v * D + b;
472
+ var f = Bt(s), p = f.xmin, y = f.xmax, C = f.a, S = f.b, D = function(E) {
473
+ return C * E + S;
383
474
  };
384
475
  l = [{
385
476
  x: p,
386
- y: w(p)
477
+ y: D(p)
387
478
  }, {
388
- x: m,
389
- y: w(m)
479
+ x: y,
480
+ y: D(y)
390
481
  }];
391
482
  }
392
- var C = T(T(T({}, h), {}, {
483
+ var R = I(I(I({}, h), {}, {
393
484
  fill: "none",
394
485
  stroke: h && h.fill
395
486
  }, c), {}, {
396
487
  points: l
397
488
  });
398
- return /* @__PURE__ */ S.isValidElement(r) ? d = /* @__PURE__ */ S.cloneElement(r, C) : Bt(r) ? d = r(C) : d = /* @__PURE__ */ S.createElement(Ft, te({}, C, {
489
+ return /* @__PURE__ */ T.isValidElement(r) ? d = /* @__PURE__ */ T.cloneElement(r, R) : Ft(r) ? d = r(R) : d = /* @__PURE__ */ T.createElement(It, de({}, R, {
399
490
  type: o
400
- })), /* @__PURE__ */ S.createElement(J, {
491
+ })), /* @__PURE__ */ T.createElement(ae, {
401
492
  className: "recharts-scatter-line",
402
493
  key: "recharts-scatter-line"
403
494
  }, d);
@@ -405,23 +496,23 @@ var re = /* @__PURE__ */ function(a) {
405
496
  }, {
406
497
  key: "render",
407
498
  value: function() {
408
- var i = this.props, s = i.hide, r = i.points, n = i.line, o = i.className, h = i.xAxis, c = i.yAxis, l = i.left, d = i.top, f = i.width, p = i.height, m = i.id, v = i.isAnimationActive;
499
+ var i = this.props, s = i.hide, r = i.points, n = i.line, o = i.className, h = i.xAxis, c = i.yAxis, l = i.left, d = i.top, f = i.width, p = i.height, y = i.id, C = i.isAnimationActive;
409
500
  if (s || !r || !r.length)
410
501
  return null;
411
- var b = this.state.isAnimationFinished, w = Wt("recharts-scatter", o), C = h && h.allowDataOverflow, E = c && c.allowDataOverflow, D = C || E, R = V(m) ? this.id : m;
412
- return /* @__PURE__ */ S.createElement(J, {
413
- className: w,
414
- clipPath: D ? "url(#clipPath-".concat(R, ")") : null
415
- }, C || E ? /* @__PURE__ */ S.createElement("defs", null, /* @__PURE__ */ S.createElement("clipPath", {
416
- id: "clipPath-".concat(R)
417
- }, /* @__PURE__ */ S.createElement("rect", {
418
- x: C ? l : l - f / 2,
419
- y: E ? d : d - p / 2,
420
- width: C ? f : f * 2,
421
- height: E ? p : p * 2
422
- }))) : null, n && this.renderLine(), this.renderErrorBar(), /* @__PURE__ */ S.createElement(J, {
502
+ var S = this.state.isAnimationFinished, D = Wt("recharts-scatter", o), R = h && h.allowDataOverflow, w = c && c.allowDataOverflow, E = R || w, v = te(y) ? this.id : y;
503
+ return /* @__PURE__ */ T.createElement(ae, {
504
+ className: D,
505
+ clipPath: E ? "url(#clipPath-".concat(v, ")") : null
506
+ }, R || w ? /* @__PURE__ */ T.createElement("defs", null, /* @__PURE__ */ T.createElement("clipPath", {
507
+ id: "clipPath-".concat(v)
508
+ }, /* @__PURE__ */ T.createElement("rect", {
509
+ x: R ? l : l - f / 2,
510
+ y: w ? d : d - p / 2,
511
+ width: R ? f : f * 2,
512
+ height: w ? p : p * 2
513
+ }))) : null, n && this.renderLine(), this.renderErrorBar(), /* @__PURE__ */ T.createElement(ae, {
423
514
  key: "recharts-scatter-symbols"
424
- }, this.renderSymbols()), (!v || b) && Je.renderCallByParent(this.props, r));
515
+ }, this.renderSymbols()), (!C || S) && it.renderCallByParent(this.props, r));
425
516
  }
426
517
  }], [{
427
518
  key: "getDerivedStateFromProps",
@@ -435,9 +526,9 @@ var re = /* @__PURE__ */ function(a) {
435
526
  } : null;
436
527
  }
437
528
  }]);
438
- }(Gi);
439
- j(re, "displayName", "Scatter");
440
- j(re, "defaultProps", {
529
+ }(Ki);
530
+ Y(fe, "displayName", "Scatter");
531
+ Y(fe, "defaultProps", {
441
532
  xAxisId: 0,
442
533
  yAxisId: 0,
443
534
  zAxisId: 0,
@@ -447,95 +538,95 @@ j(re, "defaultProps", {
447
538
  data: [],
448
539
  shape: "circle",
449
540
  hide: !1,
450
- isAnimationActive: !Gt.isSsr,
541
+ isAnimationActive: !Ut.isSsr,
451
542
  animationBegin: 0,
452
543
  animationDuration: 400,
453
544
  animationEasing: "linear"
454
545
  });
455
- j(re, "getComposedData", function(a) {
456
- var e = a.xAxis, t = a.yAxis, i = a.zAxis, s = a.item, r = a.displayedData, n = a.xAxisTicks, o = a.yAxisTicks, h = a.offset, c = s.props.tooltipType, l = Xe(s.props.children, Ut), d = V(e.dataKey) ? s.props.dataKey : e.dataKey, f = V(t.dataKey) ? s.props.dataKey : t.dataKey, p = i && i.dataKey, m = i ? i.range : xe.defaultProps.range, v = m && m[0], b = e.scale.bandwidth ? e.scale.bandwidth() : 0, w = t.scale.bandwidth ? t.scale.bandwidth() : 0, C = r.map(function(E, D) {
457
- var R = he(E, d), k = he(E, f), O = !V(p) && he(E, p) || "-", G = [{
458
- name: V(e.dataKey) ? s.props.name : e.name || e.dataKey,
546
+ Y(fe, "getComposedData", function(a) {
547
+ var e = a.xAxis, t = a.yAxis, i = a.zAxis, s = a.item, r = a.displayedData, n = a.xAxisTicks, o = a.yAxisTicks, h = a.offset, c = s.props.tooltipType, l = tt(s.props.children, $t), d = te(e.dataKey) ? s.props.dataKey : e.dataKey, f = te(t.dataKey) ? s.props.dataKey : t.dataKey, p = i && i.dataKey, y = i ? i.range : Se.defaultProps.range, C = y && y[0], S = e.scale.bandwidth ? e.scale.bandwidth() : 0, D = t.scale.bandwidth ? t.scale.bandwidth() : 0, R = r.map(function(w, E) {
548
+ var v = me(w, d), k = me(w, f), P = !te(p) && me(w, p) || "-", A = [{
549
+ name: te(e.dataKey) ? s.props.name : e.name || e.dataKey,
459
550
  unit: e.unit || "",
460
- value: R,
461
- payload: E,
551
+ value: v,
552
+ payload: w,
462
553
  dataKey: d,
463
554
  type: c
464
555
  }, {
465
- name: V(t.dataKey) ? s.props.name : t.name || t.dataKey,
556
+ name: te(t.dataKey) ? s.props.name : t.name || t.dataKey,
466
557
  unit: t.unit || "",
467
558
  value: k,
468
- payload: E,
559
+ payload: w,
469
560
  dataKey: f,
470
561
  type: c
471
562
  }];
472
- O !== "-" && G.push({
563
+ P !== "-" && A.push({
473
564
  name: i.name || i.dataKey,
474
565
  unit: i.unit || "",
475
- value: O,
476
- payload: E,
566
+ value: P,
567
+ payload: w,
477
568
  dataKey: p,
478
569
  type: c
479
570
  });
480
- var M = Fe({
571
+ var z = Ge({
481
572
  axis: e,
482
573
  ticks: n,
483
- bandSize: b,
484
- entry: E,
485
- index: D,
574
+ bandSize: S,
575
+ entry: w,
576
+ index: E,
486
577
  dataKey: d
487
- }), W = Fe({
578
+ }), x = Ge({
488
579
  axis: t,
489
580
  ticks: o,
490
- bandSize: w,
491
- entry: E,
492
- index: D,
581
+ bandSize: D,
582
+ entry: w,
583
+ index: E,
493
584
  dataKey: f
494
- }), x = O !== "-" ? i.scale(O) : v, z = Math.sqrt(Math.max(x, 0) / Math.PI);
495
- return T(T({}, E), {}, {
496
- cx: M,
497
- cy: W,
498
- x: M - z,
499
- y: W - z,
585
+ }), m = P !== "-" ? i.scale(P) : C, b = Math.sqrt(Math.max(m, 0) / Math.PI);
586
+ return I(I({}, w), {}, {
587
+ cx: z,
588
+ cy: x,
589
+ x: z - b,
590
+ y: x - b,
500
591
  xAxis: e,
501
592
  yAxis: t,
502
593
  zAxis: i,
503
- width: 2 * z,
504
- height: 2 * z,
505
- size: x,
594
+ width: 2 * b,
595
+ height: 2 * b,
596
+ size: m,
506
597
  node: {
507
- x: R,
598
+ x: v,
508
599
  y: k,
509
- z: O
600
+ z: P
510
601
  },
511
- tooltipPayload: G,
602
+ tooltipPayload: A,
512
603
  tooltipPosition: {
513
- x: M,
514
- y: W
604
+ x: z,
605
+ y: x
515
606
  },
516
- payload: E
517
- }, l && l[D] && l[D].props);
607
+ payload: w
608
+ }, l && l[E] && l[E].props);
518
609
  });
519
- return T({
520
- points: C
610
+ return I({
611
+ points: R
521
612
  }, h);
522
613
  });
523
- var ds = $t({
614
+ var ys = jt({
524
615
  chartName: "ComposedChart",
525
- GraphicalChild: [Ze, jt, Qe, re],
616
+ GraphicalChild: [st, Kt, rt, fe],
526
617
  axisComponents: [{
527
618
  axisType: "xAxis",
528
- AxisComp: et
619
+ AxisComp: nt
529
620
  }, {
530
621
  axisType: "yAxis",
531
- AxisComp: Ne
622
+ AxisComp: Te
532
623
  }, {
533
624
  axisType: "zAxis",
534
- AxisComp: xe
625
+ AxisComp: Se
535
626
  }],
536
- formatAxisMap: Kt
627
+ formatAxisMap: qt
537
628
  });
538
- const cs = (a) => {
629
+ const bs = (a) => {
539
630
  const e = (t) => {
540
631
  const { cx: i, cy: s, fill: r, payload: n } = t, o = () => {
541
632
  if (!n) return "-";
@@ -559,18 +650,18 @@ const cs = (a) => {
559
650
  });
560
651
  };
561
652
  return e.displayName = `Scatter-${a}`, e;
562
- }, us = ({ dataConfig: a, data: e, xAxis: t, yAxis: i = {
653
+ }, _s = ({ dataConfig: a, data: e, xAxis: t, yAxis: i = {
563
654
  hide: !0
564
- }, label: s = !1, hideTooltip: r = !1, hideGrid: n = !1, aspect: o, legend: h, showValueUnderLabel: c = !1, bar: l, line: d, scatter: f, onClick: p }, m) => {
565
- var O, G, M, W;
566
- const v = Vt(e), b = l != null && l.categories ? Array.isArray(l.categories) ? l.categories : [l.categories] : [], w = d != null && d.categories ? Array.isArray(d.categories) ? d.categories : [d.categories] : [], C = f != null && f.categories ? Array.isArray(f.categories) ? f.categories : [f.categories] : [], E = [...b, ...w, ...C], D = Math.max(...v.flatMap((x) => E.map((z) => qt(i != null && i.tickFormatter ? i.tickFormatter(`${x[z]}`) : `${x[z]}`)))), R = [l, d, f].filter((x) => (x == null ? void 0 : x.axisPosition) === "left"), k = [l, d, f].filter((x) => (x == null ? void 0 : x.axisPosition) === "right");
567
- return g(Yt, {
655
+ }, label: s = !1, hideTooltip: r = !1, hideGrid: n = !1, aspect: o, legend: h, showValueUnderLabel: c = !1, bar: l, line: d, scatter: f, onClick: p }, y) => {
656
+ var P, A, z, x;
657
+ const C = Vt(e), S = l != null && l.categories ? Array.isArray(l.categories) ? l.categories : [l.categories] : [], D = d != null && d.categories ? Array.isArray(d.categories) ? d.categories : [d.categories] : [], R = f != null && f.categories ? Array.isArray(f.categories) ? f.categories : [f.categories] : [], w = [...S, ...D, ...R], E = Math.max(...C.flatMap((m) => w.map((b) => Yt(i != null && i.tickFormatter ? i.tickFormatter(`${m[b]}`) : `${m[b]}`)))), v = [l, d, f].filter((m) => (m == null ? void 0 : m.axisPosition) === "left"), k = [l, d, f].filter((m) => (m == null ? void 0 : m.axisPosition) === "right");
658
+ return g(Xt, {
568
659
  config: a,
569
- ref: m,
660
+ ref: y,
570
661
  aspect: o,
571
- children: N(ds, {
662
+ children: O(ys, {
572
663
  accessibilityLayer: !0,
573
- data: v,
664
+ data: C,
574
665
  margin: {
575
666
  left: i && !i.hide ? 0 : 12,
576
667
  right: 12,
@@ -578,100 +669,100 @@ const cs = (a) => {
578
669
  bottom: c ? 24 : 12
579
670
  },
580
671
  stackOffset: void 0,
581
- onClick: (x) => {
582
- if (!p || !x.activeLabel || !x.activePayload)
672
+ onClick: (m) => {
673
+ if (!p || !m.activeLabel || !m.activePayload)
583
674
  return;
584
- const z = {
585
- label: x.activeLabel,
675
+ const b = {
676
+ label: m.activeLabel,
586
677
  values: {}
587
678
  };
588
- for (const ne of x.activePayload)
589
- z.values[ne.name] = ne.value;
590
- p(z);
679
+ for (const L of m.activePayload)
680
+ b.values[L.name] = L.value;
681
+ p(b);
591
682
  },
592
- children: [!r && g(Xt, {
593
- ...Jt(),
594
- content: g(Zt, {
683
+ children: [!r && g(Jt, {
684
+ ...Zt(),
685
+ content: g(Qt, {
595
686
  yAxisFormatter: i.tickFormatter
596
687
  })
597
- }), !n && g(Qt, {
598
- ...ei()
599
- }), R.length > 0 && g(Ne, {
600
- ...We(i),
688
+ }), !n && g(ei, {
689
+ ...ti()
690
+ }), v.length > 0 && g(Te, {
691
+ ...Ue(i),
601
692
  tick: !0,
602
- width: i.width ?? D + 20 + (k.length > 0 && ((O = R[0]) != null && O.axisLabel) ? 20 : 0),
603
- hide: i.hide || R.some((x) => x == null ? void 0 : x.hideAxis),
604
- label: (G = R[0]) != null && G.axisLabel ? {
605
- value: R[0].axisLabel,
693
+ width: i.width ?? E + 20 + (k.length > 0 && ((P = v[0]) != null && P.axisLabel) ? 20 : 0),
694
+ hide: i.hide || v.some((m) => m == null ? void 0 : m.hideAxis),
695
+ label: (A = v[0]) != null && A.axisLabel ? {
696
+ value: v[0].axisLabel,
606
697
  angle: -90,
607
698
  position: "insideLeft"
608
699
  } : void 0
609
- }), k.length > 0 && g(Ne, {
610
- ...We(i),
700
+ }), k.length > 0 && g(Te, {
701
+ ...Ue(i),
611
702
  yAxisId: "right",
612
703
  orientation: "right",
613
704
  tick: !0,
614
- width: i.width ?? D + 20 + (R.length > 0 && ((M = k[0]) != null && M.axisLabel) ? 20 : 0),
615
- hide: i.hide || k.some((x) => x == null ? void 0 : x.hideAxis),
616
- label: (W = k[0]) != null && W.axisLabel ? {
705
+ width: i.width ?? E + 20 + (v.length > 0 && ((z = k[0]) != null && z.axisLabel) ? 20 : 0),
706
+ hide: i.hide || k.some((m) => m == null ? void 0 : m.hideAxis),
707
+ label: (x = k[0]) != null && x.axisLabel ? {
617
708
  value: k[0].axisLabel,
618
709
  angle: 90,
619
710
  position: "insideRight"
620
711
  } : void 0
621
- }), g(et, {
622
- ...ti(t),
712
+ }), g(nt, {
713
+ ...ii(t),
623
714
  hide: t == null ? void 0 : t.hide,
624
- tick: c ? (x) => {
625
- var Me, He;
626
- const { x: z, y: ne, payload: Te } = x, Le = ((Me = e.find((Ot) => Ot.label === Te.value)) == null ? void 0 : Me.values) || "", oe = Object.keys(Le).length === 1 ? (He = Object.values(Le)) == null ? void 0 : He[0] : void 0, kt = oe !== void 0 && i.tickFormatter ? i.tickFormatter(`${oe}`) : oe.toLocaleString();
627
- return N("g", {
628
- transform: `translate(${z},${ne})`,
715
+ tick: c ? (m) => {
716
+ var M, K;
717
+ const { x: b, y: L, payload: J } = m, Z = ((M = e.find((Pt) => Pt.label === J.value)) == null ? void 0 : M.values) || "", Q = Object.keys(Z).length === 1 ? (K = Object.values(Z)) == null ? void 0 : K[0] : void 0, oe = Q !== void 0 && i.tickFormatter ? i.tickFormatter(`${Q}`) : Q.toLocaleString();
718
+ return O("g", {
719
+ transform: `translate(${b},${L})`,
629
720
  children: [g("text", {
630
721
  x: 0,
631
722
  y: 0,
632
723
  dy: 12,
633
724
  textAnchor: "middle",
634
725
  className: "text-sm font-medium !text-f1-foreground-secondary",
635
- children: Te.value
636
- }), !!oe && g("text", {
726
+ children: J.value
727
+ }), !!Q && g("text", {
637
728
  x: 0,
638
729
  y: 0,
639
730
  dy: 28,
640
731
  textAnchor: "middle",
641
732
  className: "!fill-f1-foreground text-sm font-medium",
642
- children: kt
733
+ children: oe
643
734
  })]
644
735
  });
645
736
  } : void 0
646
- }), b.map((x, z) => g(Qe, {
737
+ }), S.map((m, b) => g(rt, {
647
738
  isAnimationActive: !1,
648
- dataKey: String(x),
649
- fill: a[x].color ? Z(a[x].color) : Ce(z),
739
+ dataKey: String(m),
740
+ fill: a[m].color ? le(a[m].color) : Oe(b),
650
741
  radius: 4,
651
742
  maxBarSize: 32,
652
- children: s && g(Je, {
743
+ children: s && g(it, {
653
744
  position: "top",
654
745
  offset: 10,
655
746
  className: "fill-f1-foreground",
656
747
  fontSize: 12
657
- }, `label-${String(x)}`)
658
- }, `bar-${String(x)}`)), w.map((x, z) => g(Ze, {
748
+ }, `label-${String(m)}`)
749
+ }, `bar-${String(m)}`)), D.map((m, b) => g(st, {
659
750
  type: (d == null ? void 0 : d.lineType) ?? "natural",
660
- dataKey: String(x),
661
- stroke: a[x].color ? Z(a[x].color) : Ce(b.length + z),
751
+ dataKey: String(m),
752
+ stroke: a[m].color ? le(a[m].color) : Oe(S.length + b),
662
753
  strokeWidth: 2,
663
754
  dot: (d == null ? void 0 : d.dot) ?? !1,
664
755
  isAnimationActive: !1,
665
756
  yAxisId: (d == null ? void 0 : d.axisPosition) === "right" ? "right" : void 0
666
- }, `line-${String(x)}`)), C.map((x, z) => g(re, {
667
- dataKey: String(x),
668
- fill: a[x].color ? Z(a[x].color) : Ce(b.length + w.length + z),
757
+ }, `line-${String(m)}`)), R.map((m, b) => g(fe, {
758
+ dataKey: String(m),
759
+ fill: a[m].color ? le(a[m].color) : Oe(S.length + D.length + b),
669
760
  r: 4,
670
761
  isAnimationActive: !1,
671
762
  yAxisId: (f == null ? void 0 : f.axisPosition) === "right" ? "right" : void 0,
672
- shape: cs(String(x))
673
- }, `scatter-${String(x)}`)), h && g(ii, {
674
- content: g(si, {
763
+ shape: bs(String(m))
764
+ }, `scatter-${String(m)}`)), h && g(si, {
765
+ content: g(ri, {
675
766
  nameKey: "label"
676
767
  }),
677
768
  align: "center",
@@ -681,14 +772,14 @@ const cs = (a) => {
681
772
  })]
682
773
  })
683
774
  });
684
- }, fs = tt(us), gs = ({ value: a, max: e = 100, label: t, color: i }, s) => {
685
- const r = i ? Z(i) : Z("categorical-1"), n = a / e * 100;
686
- return N("div", {
775
+ }, xs = ot(_s), ws = ({ value: a, max: e = 100, label: t, color: i }, s) => {
776
+ const r = i ? le(i) : le("categorical-1"), n = a / e * 100;
777
+ return O("div", {
687
778
  className: "flex items-center space-x-2",
688
779
  "aria-live": "polite",
689
780
  children: [g("div", {
690
781
  className: "flex-grow",
691
- children: g(ri, {
782
+ children: g(ni, {
692
783
  color: r,
693
784
  value: n,
694
785
  className: "w-full",
@@ -702,80 +793,80 @@ const cs = (a) => {
702
793
  children: t
703
794
  })]
704
795
  });
705
- }, ps = tt(gs), Ks = F(
796
+ }, Es = ot(ws), tr = U(
706
797
  {
707
798
  name: "AreaChart",
708
799
  type: "info"
709
800
  },
710
- di
711
- ), Vs = F(
801
+ oi
802
+ ), ir = U(
712
803
  {
713
804
  name: "BarChart",
714
805
  type: "info"
715
806
  },
716
- ni
717
- ), qs = F(
807
+ ai
808
+ ), sr = U(
718
809
  {
719
810
  name: "CategoryBarChart",
720
811
  type: "info"
721
812
  },
722
- oi
723
- ), Ys = F(
813
+ li
814
+ ), rr = U(
724
815
  {
725
816
  name: "LineChart",
726
817
  type: "info"
727
818
  },
728
- ai
729
- ), Xs = F(
819
+ hi
820
+ ), nr = U(
730
821
  {
731
822
  name: "PieChart",
732
823
  type: "info"
733
824
  },
734
- li
735
- ), Js = F(
825
+ di
826
+ ), or = U(
736
827
  {
737
828
  name: "VerticalBarChart",
738
829
  type: "info"
739
830
  },
740
- hi
741
- ), Zs = F(
831
+ ci
832
+ ), ar = U(
742
833
  {
743
834
  name: "ProgressBarChart",
744
835
  type: "info"
745
836
  },
746
- ps
747
- ), Qs = F(
837
+ Es
838
+ ), lr = U(
748
839
  {
749
840
  name: "ComboChart",
750
841
  type: "info"
751
842
  },
752
- fs
753
- ), er = ci.filter(
843
+ xs
844
+ ), hr = ui.filter(
754
845
  (a) => a !== "ai"
755
- ), tr = it, ir = ["default", "outline", "neutral"], sr = it, rr = ["sm", "md", "lg"], nr = ui, Se = ({ count: a, list: e }) => {
756
- const [t, i] = L(!1), s = g(de, {
846
+ ), dr = at, cr = ["default", "outline", "neutral"], ur = at, fr = ["sm", "md", "lg"], gr = fi, He = ({ count: a, list: e }) => {
847
+ const [t, i] = B(!1), s = g(ve, {
757
848
  label: `+${a}`
758
849
  });
759
- return e != null && e.length ? N(st, {
850
+ return e != null && e.length ? O(lt, {
760
851
  open: t,
761
852
  onOpenChange: i,
762
- children: [g(rt, {
853
+ children: [g(ht, {
763
854
  asChild: !0,
764
855
  children: g("button", {
765
- className: fi("inline-flex flex-shrink-0 items-center"),
856
+ className: gi("inline-flex flex-shrink-0 items-center"),
766
857
  children: s
767
858
  })
768
- }), g(nt, {
859
+ }), g(dt, {
769
860
  className: "rounded-md border border-solid border-f1-border-secondary p-1 shadow-md",
770
861
  align: "end",
771
- children: N(ot, {
862
+ children: O(ct, {
772
863
  className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[172px] flex-col",
773
864
  children: [e.map((r, n) => g("div", {
774
865
  className: "flex w-[220px] min-w-0 items-center gap-1.5 px-2 py-1 [&:first-child]:pt-2 [&:last-child]:pb-2",
775
- children: g(de, {
866
+ children: g(ve, {
776
867
  ...r
777
868
  })
778
- }, n)), g(at, {
869
+ }, n)), g(ut, {
779
870
  orientation: "vertical",
780
871
  className: "[&_div]:bg-f1-background"
781
872
  })]
@@ -783,17 +874,17 @@ const cs = (a) => {
783
874
  })]
784
875
  }) : s;
785
876
  };
786
- Se.displayName = "ChipCounter";
787
- const Et = ({ chips: a, max: e = 4, remainingCount: t, layout: i = "compact" }) => {
877
+ He.displayName = "ChipCounter";
878
+ const Rt = ({ chips: a, max: e = 4, remainingCount: t, layout: i = "compact" }) => {
788
879
  if (i === "fill")
789
- return g(gi, {
880
+ return g(pi, {
790
881
  items: a,
791
- renderListItem: (h) => g(de, {
882
+ renderListItem: (h) => g(ve, {
792
883
  ...h
793
884
  }),
794
885
  renderDropdownItem: () => null,
795
886
  forceShowingOverflowIndicator: t !== void 0,
796
- renderOverflowIndicator: (h) => g(Se, {
887
+ renderOverflowIndicator: (h) => g(He, {
797
888
  count: (t ?? 0) + h,
798
889
  list: t ? void 0 : a.slice(a.length - h)
799
890
  }),
@@ -801,18 +892,18 @@ const Et = ({ chips: a, max: e = 4, remainingCount: t, layout: i = "compact" })
801
892
  className: "flex-1"
802
893
  });
803
894
  const s = a.slice(0, e), r = a.slice(e), n = t ?? a.length - e, o = n > 0;
804
- return N("div", {
895
+ return O("div", {
805
896
  className: "flex items-center gap-2",
806
- children: [s.map((h, c) => g(de, {
897
+ children: [s.map((h, c) => g(ve, {
807
898
  ...h
808
- }, c)), o && g(Se, {
899
+ }, c)), o && g(He, {
809
900
  count: n,
810
901
  list: t ? void 0 : r
811
902
  })]
812
903
  });
813
904
  };
814
- Et.displayName = "F0ChipList";
815
- const or = lt("F0ChipList", Et), ar = pi, Re = ht({
905
+ Rt.displayName = "F0ChipList";
906
+ const pr = ft("F0ChipList", Rt), mr = mi, Pe = Qe({
816
907
  base: "text-base text-f1-foreground",
817
908
  variants: {
818
909
  variant: {
@@ -853,7 +944,7 @@ const or = lt("F0ChipList", Et), ar = pi, Re = ht({
853
944
  variant: "body",
854
945
  align: "left"
855
946
  }
856
- }), ms = {
947
+ }), Cs = {
857
948
  "heading-large": "h1",
858
949
  heading: "h2",
859
950
  body: "p",
@@ -872,15 +963,15 @@ const or = lt("F0ChipList", Et), ar = pi, Re = ht({
872
963
  "positive-strong": "p",
873
964
  "info-strong": "p",
874
965
  code: "code"
875
- }, Pe = $(({ content: a, variant: e, align: t, className: i, as: s, ellipsis: r, noEllipsisTooltip: n, markdown: o, ...h }, c) => {
876
- const l = s ?? ms[e ?? "body"];
966
+ }, Be = ee(({ content: a, variant: e, align: t, className: i, as: s, ellipsis: r, noEllipsisTooltip: n, markdown: o, ...h }, c) => {
967
+ const l = s ?? Cs[e ?? "body"];
877
968
  if (r !== void 0)
878
- return g(mi, {
969
+ return g(vi, {
879
970
  ref: c,
880
971
  lines: typeof r == "number" ? r : 1,
881
972
  noTooltip: n,
882
973
  tag: l,
883
- className: B(Re({
974
+ className: G(Pe({
884
975
  variant: e,
885
976
  align: t
886
977
  }), i),
@@ -889,10 +980,10 @@ const or = lt("F0ChipList", Et), ar = pi, Re = ht({
889
980
  children: a
890
981
  });
891
982
  if (o) {
892
- const d = vi(a);
893
- return Ge(l, {
983
+ const d = yi(a);
984
+ return je(l, {
894
985
  ...h,
895
- className: B(Re({
986
+ className: G(Pe({
896
987
  variant: e,
897
988
  align: t
898
989
  }), i),
@@ -902,234 +993,383 @@ const or = lt("F0ChipList", Et), ar = pi, Re = ht({
902
993
  }
903
994
  });
904
995
  }
905
- return Ge(l, {
996
+ return je(l, {
906
997
  ...h,
907
- className: B(Re({
998
+ className: G(Pe({
908
999
  variant: e,
909
1000
  align: t
910
1001
  }), i),
911
1002
  ref: c
912
1003
  }, a);
913
1004
  });
914
- Pe.displayName = "Text";
915
- const vs = $((a, e) => g(Pe, {
1005
+ Be.displayName = "Text";
1006
+ const Rs = ee((a, e) => g(Be, {
916
1007
  ref: e,
917
1008
  variant: "heading",
918
1009
  ...a
919
1010
  }));
920
- vs.displayName = "F0Heading";
921
- const ys = $((a, e) => g(Pe, {
1011
+ Rs.displayName = "F0Heading";
1012
+ const Ns = ee((a, e) => g(Be, {
922
1013
  ref: e,
923
1014
  markdown: a.markdown ?? !0,
924
1015
  ...a
925
1016
  }));
926
- ys.displayName = "F0Text";
927
- const bs = {
928
- xs: 1,
929
- sm: 2,
930
- md: 2,
931
- lg: 2
932
- }, _s = $(function({ widgets: e, children: t }, i) {
933
- const s = Q(null);
934
- pt(i, () => s.current);
935
- const r = Ui.toArray(e).filter((n) => !!n).map((n, o) => g("div", {
936
- className: "h-full @5xl:h-auto [&>div]:h-full",
937
- children: n
938
- }, o));
939
- return g(dt, {
940
- layout: "home",
941
- children: N("div", {
942
- ref: s,
943
- className: "@container",
944
- children: [N("div", {
945
- className: "flex flex-col gap-6 px-5 pt-4 @md:pt-2 @5xl:hidden",
946
- children: [g(yi, {
947
- columns: bs,
948
- showArrows: !1,
949
- children: r
950
- }), g("main", {
951
- children: t
952
- })]
953
- }), N("div", {
954
- className: "hidden grid-cols-3 gap-5 px-6 pb-6 pt-2 @5xl:grid",
955
- children: [g("div", {
956
- className: "col-span-3 flex flex-row gap-5 *:flex-1",
957
- children: r.slice(0, 3)
958
- }), g("main", {
959
- className: "col-span-2",
960
- children: t
961
- }), g("div", {
962
- className: "flex flex-1 flex-col gap-5",
963
- children: r.slice(3)
964
- })]
965
- })]
966
- })
967
- });
968
- }), xs = $(function({ children: e, sideContent: t, mainColumnPosition: i = "left", sticky: s = !1 }, r) {
969
- return g("div", {
970
- ref: r,
971
- className: "h-full",
972
- children: N("div", {
973
- className: B("flex h-full max-w-full overflow-auto text-f1-foreground md:flex-row", "flex-col", "overflow-y-auto", s && "md:sticky md:top-0 md:max-h-full"),
974
- children: [g("main", {
975
- className: B("sm:min-h-xs order-2 h-fit border-0 px-4 py-5 sm:flex-1 sm:border-solid md:order-2 md:px-6", s ? "md:h-full md:max-h-full md:overflow-y-auto" : "min-h-full", i === "right" ? "sm:border-l sm:border-l-f1-border-secondary" : "sm:border-r sm:border-r-f1-border-secondary", "border-t border-solid border-t-f1-border-secondary sm:border-t-0"),
976
- children: e
977
- }), g(ws, {
978
- sticky: s,
979
- className: B("order-1", i === "right" ? "md:order-1" : "md:order-3"),
980
- children: t
981
- })]
982
- })
983
- });
984
- }), ws = ({ children: a, className: e }) => g("aside", {
985
- className: B("min-w-30 py-5 pl-4 pr-4 sm:basis-1/4 sm:pb-6 md:max-w-80 md:pl-2", e),
986
- children: a
987
- }), Es = ht({
988
- base: "relative flex min-h-full w-full flex-1 flex-col gap-4 place-self-center overflow-y-auto px-6 py-5",
989
- variants: {
990
- variant: {
991
- narrow: "max-w-screen-lg"
992
- }
993
- }
994
- }), Ct = S.forwardRef(({ children: a, variant: e, className: t, ...i }, s) => g(dt, {
995
- layout: "standard",
996
- children: g("section", {
997
- ref: s,
998
- className: B("relative flex-1 overflow-auto", t),
999
- ...i,
1000
- children: g("div", {
1001
- className: B(Es({
1002
- variant: e
1003
- })),
1004
- children: a
1005
- })
1006
- })
1007
- }));
1008
- Ct.displayName = "StandardLayout";
1009
- const lr = F({
1010
- name: "StandardLayout",
1011
- type: "layout"
1012
- }, Ct), hr = F({
1013
- name: "TwoColumnLayout",
1014
- type: "layout"
1015
- }, xs), dr = F({
1016
- name: "HomeLayout",
1017
- type: "layout"
1018
- }, _s), Rt = _e(null);
1019
- function ke() {
1020
- const a = mt(Rt);
1017
+ Ns.displayName = "F0Text";
1018
+ const Nt = ze(null);
1019
+ function zt() {
1020
+ const a = yt(Nt);
1021
1021
  if (!a)
1022
1022
  throw new Error(
1023
1023
  "useGridStackContext must be used within a GridStackProvider"
1024
1024
  );
1025
1025
  return a;
1026
1026
  }
1027
- function Cs({ children: a, initialOptions: e, onResizeStop: t, onChange: i }) {
1028
- const [s, r] = L(null), [n, o] = L(() => {
1029
- var v;
1030
- const p = /* @__PURE__ */ new Map(), m = (b) => {
1031
- var w, C;
1032
- b.id && ((w = b.renderFn) != null && w.call(b)) && p.set(b.id, b), (C = b.subGridOpts) != null && C.children && b.subGridOpts.children.forEach((E) => {
1033
- m(E);
1027
+ function zs(a) {
1028
+ const { content: e, ...t } = a;
1029
+ return e !== void 0 ? {
1030
+ ...t,
1031
+ //To avoid and issue with GridStack's deepClone, we need to set _originalContent to null
1032
+ _originalContent: null,
1033
+ content: () => document.createElement("div")
1034
+ } : t;
1035
+ }
1036
+ function ie(a) {
1037
+ var t;
1038
+ const e = zs(a);
1039
+ return (t = a.subGridOpts) != null && t.children && (e.subGridOpts = {
1040
+ ...a.subGridOpts,
1041
+ children: a.subGridOpts.children.map(
1042
+ (i) => ie(i)
1043
+ )
1044
+ }), e;
1045
+ }
1046
+ const Ss = ["noMove", "noResize", "locked", "w", "h", "x", "y"], q = 200;
1047
+ function Ds(a) {
1048
+ const e = a.cloneNode(!0);
1049
+ return a.querySelectorAll("canvas").forEach((i) => {
1050
+ if (i.width > 0 && i.height > 0)
1051
+ try {
1052
+ const s = i.toDataURL("image/png"), r = e.querySelectorAll("canvas"), n = Array.from(a.querySelectorAll("canvas")).indexOf(i), o = r[n];
1053
+ if (o && o.parentElement) {
1054
+ const h = document.createElement("img");
1055
+ h.src = s, h.style.width = `${i.width}px`, h.style.height = `${i.height}px`, h.style.display = "block", i.className && (h.className = i.className), i.id && (h.id = i.id), o.parentElement.replaceChild(h, o);
1056
+ }
1057
+ } catch (s) {
1058
+ console.warn("Failed to convert canvas to image:", s);
1059
+ }
1060
+ }), e.innerHTML;
1061
+ }
1062
+ function ks({ children: a, options: e, onResizeStop: t, onChange: i, widgets: s }) {
1063
+ const [r, n] = B(null), o = X(null), h = ye(() => ({
1064
+ ...e,
1065
+ children: (s || []).map((R) => ie(R))
1066
+ }), [e, s]), [c, l] = B(() => {
1067
+ const R = /* @__PURE__ */ new Map(), w = s || [], E = (v) => {
1068
+ var k;
1069
+ v.id && v.content && R.set(v.id, v.content), (k = v.subGridOpts) != null && k.children && v.subGridOpts.children.forEach((P) => {
1070
+ E(P);
1034
1071
  });
1035
1072
  };
1036
- return (v = e.children) == null || v.forEach((b) => {
1037
- m(b);
1038
- }), p;
1039
- }), h = K(() => {
1040
- if (!s)
1073
+ return w.forEach((v) => {
1074
+ E(v);
1075
+ }), R;
1076
+ }), d = X(c);
1077
+ V(() => {
1078
+ d.current = c;
1079
+ }, [c]);
1080
+ const [f, p] = B(() => {
1081
+ const R = /* @__PURE__ */ new Map(), w = s || [], E = (v) => {
1082
+ var k;
1083
+ v.id && v._originalContent !== void 0 && R.set(v.id, v._originalContent), (k = v.subGridOpts) != null && k.children && v.subGridOpts.children.forEach((P) => {
1084
+ E(P);
1085
+ });
1086
+ };
1087
+ return w.forEach((v) => {
1088
+ E(v);
1089
+ }), R;
1090
+ }), y = X(f);
1091
+ V(() => {
1092
+ y.current = f;
1093
+ }, [f]);
1094
+ const [C, S] = B(() => {
1095
+ const R = /* @__PURE__ */ new Map(), w = s || [], E = (v) => {
1096
+ var k;
1097
+ if (v.id) {
1098
+ const P = ie(v);
1099
+ R.set(v.id, P);
1100
+ }
1101
+ (k = v.subGridOpts) != null && k.children && v.subGridOpts.children.forEach((P) => {
1102
+ E(P);
1103
+ });
1104
+ };
1105
+ return w.forEach((v) => {
1106
+ E(v);
1107
+ }), R;
1108
+ });
1109
+ bi(() => {
1110
+ if (!r) return;
1111
+ const R = r.save();
1112
+ if (!Array.isArray(R))
1113
+ return;
1114
+ const w = R.map((z) => z.id), E = s || [], v = E.map((z) => z.id), k = E.filter((z) => !w.includes(z.id));
1115
+ k.length > 0 && (k.forEach((z) => {
1116
+ z.content && d.current.set(z.id, z.content), z._originalContent !== void 0 && y.current.set(z.id, z._originalContent);
1117
+ }), k.forEach((z) => {
1118
+ const x = ie(z);
1119
+ r.addWidget(x);
1120
+ }), S((z) => {
1121
+ const x = new Map(z);
1122
+ return k.forEach((m) => {
1123
+ const b = ie(m);
1124
+ x.set(m.id, b);
1125
+ }), x;
1126
+ }), l((z) => {
1127
+ const x = new Map(z);
1128
+ return k.forEach((m) => {
1129
+ m.content && x.set(m.id, m.content);
1130
+ }), x;
1131
+ }), p((z) => {
1132
+ const x = new Map(z);
1133
+ return k.forEach((m) => {
1134
+ m._originalContent !== void 0 && x.set(m.id, m._originalContent);
1135
+ }), x;
1136
+ }));
1137
+ const P = R.filter((z) => !v.includes(z.id));
1138
+ if (P.length > 0) {
1139
+ const z = P.map((x) => x.id).filter(Boolean);
1140
+ z.forEach((x) => {
1141
+ setTimeout(() => {
1142
+ d.current.delete(x), y.current.delete(x);
1143
+ }, q);
1144
+ }), P.forEach((x) => {
1145
+ const m = r.el.querySelector(`[gs-id="${x.id}"]`);
1146
+ m && setTimeout(() => {
1147
+ r.removeWidget(m, !0);
1148
+ }, q);
1149
+ }), S((x) => {
1150
+ const m = new Map(x);
1151
+ return z.forEach((b) => {
1152
+ setTimeout(() => {
1153
+ m.delete(b);
1154
+ }, q);
1155
+ }), m;
1156
+ }), l((x) => {
1157
+ const m = new Map(x);
1158
+ return z.forEach((b) => {
1159
+ if (m.get(b)) {
1160
+ const J = r.el.querySelector(`[gs-id="${b}"] .grid-stack-item-content`);
1161
+ let Z = "";
1162
+ J && (Z = Ds(J)), m.set(b, g(_i.div, {
1163
+ className: "h-full w-full",
1164
+ initial: {
1165
+ opacity: 1,
1166
+ scale: 1,
1167
+ filter: "blur(0px)"
1168
+ },
1169
+ animate: {
1170
+ opacity: 0,
1171
+ scale: 0.85,
1172
+ filter: "blur(14px)"
1173
+ },
1174
+ exit: {
1175
+ opacity: 0,
1176
+ scale: 0.85,
1177
+ filter: "blur(14px)"
1178
+ },
1179
+ transition: {
1180
+ opacity: {
1181
+ duration: q / 1e3,
1182
+ ease: [0.32, 0, 0.67, 0]
1183
+ },
1184
+ scale: {
1185
+ duration: q / 1e3,
1186
+ ease: [0.65, 0, 0.35, 1]
1187
+ },
1188
+ filter: {
1189
+ duration: q / 1e3,
1190
+ ease: "linear"
1191
+ }
1192
+ },
1193
+ dangerouslySetInnerHTML: {
1194
+ __html: Z
1195
+ }
1196
+ }));
1197
+ }
1198
+ setTimeout(() => {
1199
+ m.delete(b);
1200
+ }, q);
1201
+ }), m;
1202
+ }), p((x) => {
1203
+ const m = new Map(x);
1204
+ return z.forEach((b) => {
1205
+ setTimeout(() => {
1206
+ m.delete(b);
1207
+ }, q);
1208
+ }), m;
1209
+ });
1210
+ }
1211
+ const A = E.filter((z) => w.includes(z.id));
1212
+ if (A.length > 0) {
1213
+ const z = [];
1214
+ A.forEach((x) => {
1215
+ const m = R.find((L) => L.id === x.id);
1216
+ if (!m)
1217
+ return;
1218
+ const b = Ss.filter((L) => m[L] !== x[L]);
1219
+ if (b.length > 0) {
1220
+ const L = {}, J = ["w", "h", "x", "y"], Z = ["noMove", "noResize", "locked"], Q = b.filter((M) => J.includes(M)), oe = b.filter((M) => Z.includes(M));
1221
+ if (Q.length > 0 && oe.length > 0 && Q.length + oe.length === b.length ? oe.forEach((M) => {
1222
+ const K = x[M];
1223
+ K !== void 0 && (L[M] = K);
1224
+ }) : b.forEach((M) => {
1225
+ const K = x[M];
1226
+ K !== void 0 && (L[M] = K);
1227
+ }), Object.keys(L).length > 0) {
1228
+ const M = r.el.querySelector(`[gs-id="${x.id}"]`);
1229
+ M && z.push({
1230
+ id: x.id,
1231
+ element: M,
1232
+ updateOptions: L
1233
+ });
1234
+ }
1235
+ }
1236
+ }), A.forEach((x) => {
1237
+ x.content && d.current.set(x.id, x.content), x._originalContent !== void 0 && y.current.set(x.id, x._originalContent);
1238
+ }), z.forEach(({ element: x, updateOptions: m }) => {
1239
+ try {
1240
+ r.update(x, m);
1241
+ } catch (b) {
1242
+ console.warn("Error updating widget:", b);
1243
+ }
1244
+ }), S((x) => {
1245
+ const m = new Map(x);
1246
+ return A.forEach((b) => {
1247
+ const L = ie(b);
1248
+ m.set(b.id, L);
1249
+ }), m;
1250
+ }), l((x) => {
1251
+ const m = new Map(x);
1252
+ return A.forEach((b) => {
1253
+ b.content && m.set(b.id, b.content);
1254
+ }), m;
1255
+ }), p((x) => {
1256
+ const m = new Map(x);
1257
+ return A.forEach((b) => {
1258
+ b._originalContent !== void 0 && m.set(b.id, b._originalContent);
1259
+ }), m;
1260
+ });
1261
+ }
1262
+ }, [s]), V(() => {
1263
+ if (!r || !h.handle) return;
1264
+ r.opts && (r.opts.handle = h.handle);
1265
+ const R = setTimeout(() => {
1266
+ var w;
1267
+ if (r && r.el && h.handle && r.el.querySelectorAll(h.handle).length > 0)
1268
+ try {
1269
+ !((w = r.opts) != null && w.disableResize) && (r.disable(!1), r.enable(!1));
1270
+ } catch {
1271
+ }
1272
+ }, 0);
1273
+ return () => clearTimeout(R);
1274
+ }, [r, h.handle, h.children]);
1275
+ const D = Ae(() => {
1276
+ if (!r)
1277
+ return;
1278
+ const R = r.save();
1279
+ if (Array.isArray(R)) {
1280
+ const w = R.map((E) => {
1281
+ const v = E.id;
1282
+ if (!v) return null;
1283
+ const k = d.current.get(v), P = y.current.get(v), A = E;
1284
+ return {
1285
+ ...E,
1286
+ id: v,
1287
+ w: E.w ?? 1,
1288
+ h: E.h ?? 1,
1289
+ x: E.x ?? 0,
1290
+ y: E.y ?? 0,
1291
+ meta: A.meta,
1292
+ _originalContent: P,
1293
+ content: k ?? g("div", {
1294
+ children: "No content"
1295
+ })
1296
+ };
1297
+ }).filter((E) => E !== null);
1298
+ i == null || i(w);
1299
+ }
1300
+ }, [r]);
1301
+ return V(() => {
1302
+ if (!r || !r.el || !r.el.parentElement)
1041
1303
  return;
1042
- const p = s.save();
1043
- Array.isArray(p) && (i == null || i(p.map((m) => ({
1044
- id: m.id ?? "",
1045
- meta: m.meta,
1046
- w: m.w ?? 1,
1047
- h: m.h ?? 1,
1048
- x: m.x ?? 0,
1049
- y: m.y ?? 0
1050
- }))));
1051
- }, [s]);
1052
- ce(() => {
1053
- if (!s) return;
1054
- const p = (m, v) => {
1055
- t == null || t(m, v);
1304
+ const R = (w, E) => {
1305
+ t == null || t(w, E);
1056
1306
  };
1057
- return s.on("resizestop", p), s.on("change added removed", h), () => {
1058
- s.off("resizestop"), s.off("change added removed");
1307
+ try {
1308
+ r.on("resizestop", R), r.on("change added removed", D);
1309
+ } catch (w) {
1310
+ console.error("Error attaching GridStack event listeners:", w);
1311
+ return;
1312
+ }
1313
+ return () => {
1314
+ const w = o.current;
1315
+ if (w && w.el)
1316
+ try {
1317
+ w.off("resizestop"), w.off("change added removed");
1318
+ } catch (E) {
1319
+ console.warn("Error cleaning up GridStack event listeners:", E);
1320
+ }
1059
1321
  };
1060
- }, [s, t, h]), ce(() => {
1061
- s && h();
1062
- }, [s]);
1063
- const c = K((p) => {
1064
- s == null || s.addWidget(p), o((m) => {
1065
- const v = new Map(m);
1066
- return v.set(p.id, p), v;
1067
- });
1068
- }, [s]), l = K((p) => {
1069
- s == null || s.addWidget(p), o((m) => {
1070
- var b, w;
1071
- const v = new Map(m);
1072
- return (w = (b = p.subGridOpts) == null ? void 0 : b.children) == null || w.forEach((C) => {
1073
- v.set(C.id, C);
1074
- }), v;
1075
- });
1076
- }, [s]), d = K((p) => {
1077
- const m = document.body.querySelector(`[gs-id="${p}"]`);
1078
- m && (s == null || s.removeWidget(m)), o((v) => {
1079
- const b = new Map(v);
1080
- return b.delete(p), b;
1081
- });
1082
- }, [s]), f = K(() => {
1083
- s == null || s.removeAll(), o(/* @__PURE__ */ new Map());
1084
- }, [s]);
1085
- return g(Rt.Provider, {
1322
+ }, [r, t, D]), V(() => {
1323
+ o.current = r;
1324
+ }, [r]), V(() => {
1325
+ r && r.el && r.el.parentElement && D();
1326
+ }, [r]), g(Nt.Provider, {
1086
1327
  value: {
1087
- initialOptions: e,
1088
- gridStack: s,
1089
- addWidget: c,
1090
- removeWidget: d,
1091
- addSubGrid: l,
1092
- removeAll: f,
1328
+ options: h,
1329
+ gridStack: r,
1093
1330
  _gridStack: {
1094
- value: s,
1095
- set: r
1331
+ value: r,
1332
+ set: n
1096
1333
  },
1097
1334
  _rawWidgetMetaMap: {
1098
- value: n,
1099
- set: o
1335
+ value: C,
1336
+ set: S
1337
+ },
1338
+ _reactContentMap: {
1339
+ value: c,
1340
+ set: l
1100
1341
  }
1101
1342
  },
1102
1343
  children: a
1103
1344
  });
1104
1345
  }
1105
- const Nt = _e(null);
1106
- function Rs() {
1107
- const a = mt(Nt);
1346
+ const St = ze(null);
1347
+ function Os() {
1348
+ const a = yt(St);
1108
1349
  if (!a)
1109
1350
  throw new Error(
1110
1351
  "useGridStackRenderContext must be used within a GridStackProvider"
1111
1352
  );
1112
1353
  return a;
1113
1354
  }
1114
- const Ns = _e(null);
1115
- function zs() {
1116
- const { _rawWidgetMetaMap: a } = ke(), { getWidgetContainer: e } = Rs();
1117
- return g(be, {
1355
+ const Ps = ze(null);
1356
+ function Ts() {
1357
+ const { _reactContentMap: a } = zt(), { getWidgetContainer: e } = Os();
1358
+ return g(Ne, {
1118
1359
  children: Array.from(a.value.entries()).map(([t, i]) => {
1119
- var r;
1120
1360
  const s = e(t);
1121
- return s ? g(Ns.Provider, {
1361
+ return s ? g(Ps.Provider, {
1122
1362
  value: {
1123
1363
  widget: {
1124
1364
  id: t
1125
1365
  }
1126
1366
  },
1127
- children: $i((r = i.renderFn) == null ? void 0 : r.call(i), s)
1128
- }, t) : null;
1367
+ children: i && qi(i, s)
1368
+ }, t) : (console.error(`Widget container not found for widget ${t}`), null);
1129
1369
  })
1130
1370
  });
1131
1371
  }
1132
- function Ds(a, e, t, i, s) {
1372
+ function As(a, e, t, i, s) {
1133
1373
  const r = (...n) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + s + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(a, n));
1134
1374
  return r.prototype = e.prototype, r;
1135
1375
  }
@@ -1632,7 +1872,7 @@ class u {
1632
1872
  return !(!e || e.w === e.h || e.locked || e.noResize || (t = e.grid) != null && t.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
1633
1873
  }
1634
1874
  }
1635
- class U {
1875
+ class j {
1636
1876
  constructor(e = {}) {
1637
1877
  this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
1638
1878
  }
@@ -1944,7 +2184,7 @@ class U {
1944
2184
  * console.log('Node prepared at:', prepared.x, prepared.y);
1945
2185
  */
1946
2186
  prepareNode(e, t) {
1947
- e._id = e._id ?? U._idSeq++;
2187
+ e._id = e._id ?? j._idSeq++;
1948
2188
  const i = e.id;
1949
2189
  if (i) {
1950
2190
  let r = 1;
@@ -2144,7 +2384,7 @@ class U {
2144
2384
  if (t.pack = !0, !this.maxRow)
2145
2385
  return this.moveNode(e, t);
2146
2386
  let i;
2147
- const s = new U({
2387
+ const s = new j({
2148
2388
  column: this.column,
2149
2389
  float: this.float,
2150
2390
  nodes: this.nodes.map((n) => n._id === e._id ? (i = { ...n }, i) : { ...n })
@@ -2166,7 +2406,7 @@ class U {
2166
2406
  willItFit(e) {
2167
2407
  if (delete e._willFitPos, !this.maxRow)
2168
2408
  return !0;
2169
- const t = new U({
2409
+ const t = new j({
2170
2410
  column: this.column,
2171
2411
  float: this.float,
2172
2412
  nodes: this.nodes.map((s) => ({ ...s }))
@@ -2194,8 +2434,8 @@ class U {
2194
2434
  const d = e._moving && !t.nested;
2195
2435
  let f = d ? this.directionCollideCoverage(e, t, o) : o[0];
2196
2436
  if (d && f && ((l = (c = e.grid) == null ? void 0 : c.opts) != null && l.subGridDynamic) && !e.grid._isTemp) {
2197
- const p = u.areaIntercept(t.rect, f._rect), m = u.area(t.rect), v = u.area(f._rect);
2198
- p / (m < v ? m : v) > 0.8 && (f.grid.makeSubGrid(f.el, void 0, e), f = void 0);
2437
+ const p = u.areaIntercept(t.rect, f._rect), y = u.area(t.rect), C = u.area(f._rect);
2438
+ p / (y < C ? y : C) > 0.8 && (f.grid.makeSubGrid(f.el, void 0, e), f = void 0);
2199
2439
  }
2200
2440
  f ? h = !this._fixCollisions(e, r, f, t) : (h = !1, i && delete t.pack);
2201
2441
  }
@@ -2310,7 +2550,7 @@ class U {
2310
2550
  return e.forEach((r, n) => {
2311
2551
  if (r._id === void 0) {
2312
2552
  const o = r.id ? this.nodes.find((h) => h.id === r.id) : void 0;
2313
- r._id = (o == null ? void 0 : o._id) ?? U._idSeq++;
2553
+ r._id = (o == null ? void 0 : o._id) ?? j._idSeq++;
2314
2554
  }
2315
2555
  s[n] = { x: r.x, y: r.y, w: r.w, _id: r._id };
2316
2556
  }), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
@@ -2321,7 +2561,7 @@ class U {
2321
2561
  * @param column corresponding column index to save it under
2322
2562
  */
2323
2563
  cacheOneLayout(e, t) {
2324
- e._id = e._id ?? U._idSeq++;
2564
+ e._id = e._id ?? j._idSeq++;
2325
2565
  const i = { x: e.x, y: e.y, w: e.w, _id: e._id };
2326
2566
  (e.autoPosition || e.x === void 0) && (delete i.x, delete i.y, e.autoPosition && (i.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[t] = this._layouts[t] || [];
2327
2567
  const s = this.findCacheLayout(e, t);
@@ -2345,8 +2585,8 @@ class U {
2345
2585
  return this;
2346
2586
  }
2347
2587
  }
2348
- U._idSeq = 0;
2349
- const A = {
2588
+ j._idSeq = 0;
2589
+ const F = {
2350
2590
  alwaysShowResizeHandle: "mobile",
2351
2591
  animate: !0,
2352
2592
  auto: !0,
@@ -2375,57 +2615,57 @@ const A = {
2375
2615
  // staticGrid: false,
2376
2616
  //removable
2377
2617
  };
2378
- class _ {
2618
+ class N {
2379
2619
  }
2380
- const H = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2381
- class I {
2620
+ const W = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2621
+ class $ {
2382
2622
  }
2383
- function ge(a, e) {
2623
+ function xe(a, e) {
2384
2624
  a.touches.length > 1 || (a.cancelable && a.preventDefault(), u.simulateMouseEvent(a.changedTouches[0], e));
2385
2625
  }
2386
- function zt(a, e) {
2626
+ function Dt(a, e) {
2387
2627
  a.cancelable && a.preventDefault(), u.simulateMouseEvent(a, e);
2388
2628
  }
2389
- function pe(a) {
2390
- I.touchHandled || (I.touchHandled = !0, ge(a, "mousedown"));
2629
+ function we(a) {
2630
+ $.touchHandled || ($.touchHandled = !0, xe(a, "mousedown"));
2391
2631
  }
2392
- function me(a) {
2393
- I.touchHandled && ge(a, "mousemove");
2632
+ function Ee(a) {
2633
+ $.touchHandled && xe(a, "mousemove");
2394
2634
  }
2395
- function ve(a) {
2396
- if (!I.touchHandled)
2635
+ function Ce(a) {
2636
+ if (!$.touchHandled)
2397
2637
  return;
2398
- I.pointerLeaveTimeout && (window.clearTimeout(I.pointerLeaveTimeout), delete I.pointerLeaveTimeout);
2399
- const e = !!_.dragElement;
2400
- ge(a, "mouseup"), e || ge(a, "click"), I.touchHandled = !1;
2638
+ $.pointerLeaveTimeout && (window.clearTimeout($.pointerLeaveTimeout), delete $.pointerLeaveTimeout);
2639
+ const e = !!N.dragElement;
2640
+ xe(a, "mouseup"), e || xe(a, "click"), $.touchHandled = !1;
2401
2641
  }
2402
- function ye(a) {
2642
+ function Re(a) {
2403
2643
  a.pointerType !== "mouse" && a.target.releasePointerCapture(a.pointerId);
2404
2644
  }
2405
- function Ke(a) {
2406
- _.dragElement && a.pointerType !== "mouse" && zt(a, "mouseenter");
2645
+ function Ye(a) {
2646
+ N.dragElement && a.pointerType !== "mouse" && Dt(a, "mouseenter");
2407
2647
  }
2408
- function Ve(a) {
2409
- _.dragElement && a.pointerType !== "mouse" && (I.pointerLeaveTimeout = window.setTimeout(() => {
2410
- delete I.pointerLeaveTimeout, zt(a, "mouseleave");
2648
+ function Xe(a) {
2649
+ N.dragElement && a.pointerType !== "mouse" && ($.pointerLeaveTimeout = window.setTimeout(() => {
2650
+ delete $.pointerLeaveTimeout, Dt(a, "mouseleave");
2411
2651
  }, 10));
2412
2652
  }
2413
- class we {
2653
+ class De {
2414
2654
  constructor(e, t, i) {
2415
2655
  this.host = e, this.dir = t, this.option = i, this.moving = !1, this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this._init();
2416
2656
  }
2417
2657
  /** @internal */
2418
2658
  _init() {
2419
2659
  const e = this.el = document.createElement("div");
2420
- return e.classList.add("ui-resizable-handle"), e.classList.add(`${we.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), H && (this.el.addEventListener("touchstart", pe), this.el.addEventListener("pointerdown", ye)), this;
2660
+ return e.classList.add("ui-resizable-handle"), e.classList.add(`${De.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), W && (this.el.addEventListener("touchstart", we), this.el.addEventListener("pointerdown", Re)), this;
2421
2661
  }
2422
2662
  /** call this when resize handle needs to be removed and cleaned up */
2423
2663
  destroy() {
2424
- return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), H && (this.el.removeEventListener("touchstart", pe), this.el.removeEventListener("pointerdown", ye)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2664
+ return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), W && (this.el.removeEventListener("touchstart", we), this.el.removeEventListener("pointerdown", Re)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2425
2665
  }
2426
2666
  /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
2427
2667
  _mouseDown(e) {
2428
- this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), H && (this.el.addEventListener("touchmove", me), this.el.addEventListener("touchend", ve)), e.stopPropagation(), e.preventDefault();
2668
+ this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), W && (this.el.addEventListener("touchmove", Ee), this.el.addEventListener("touchend", Ce)), e.stopPropagation(), e.preventDefault();
2429
2669
  }
2430
2670
  /** @internal */
2431
2671
  _mouseMove(e) {
@@ -2434,7 +2674,7 @@ class we {
2434
2674
  }
2435
2675
  /** @internal */
2436
2676
  _mouseUp(e) {
2437
- this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), H && (this.el.removeEventListener("touchmove", me), this.el.removeEventListener("touchend", ve)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2677
+ this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), W && (this.el.removeEventListener("touchmove", Ee), this.el.removeEventListener("touchend", Ce)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2438
2678
  }
2439
2679
  /** @internal call when keys are being pressed - use Esc to cancel */
2440
2680
  _keyEvent(e) {
@@ -2446,8 +2686,8 @@ class we {
2446
2686
  return this.option[e] && this.option[e](t), this;
2447
2687
  }
2448
2688
  }
2449
- we.prefix = "ui-resizable-";
2450
- class Oe {
2689
+ De.prefix = "ui-resizable-";
2690
+ class Fe {
2451
2691
  constructor() {
2452
2692
  this._eventRegister = {};
2453
2693
  }
@@ -2508,7 +2748,7 @@ class Oe {
2508
2748
  return this._eventRegister[e](t);
2509
2749
  }
2510
2750
  }
2511
- class ie extends Oe {
2751
+ class ce extends Fe {
2512
2752
  // have to be public else complains for HTMLElementExtendOpt ?
2513
2753
  constructor(e, t = {}) {
2514
2754
  super(), this.el = e, this.option = t, this.rectScale = { x: 1, y: 1 }, this._ui = () => {
@@ -2564,21 +2804,21 @@ class ie extends Oe {
2564
2804
  }
2565
2805
  /** @internal turns auto hide on/off */
2566
2806
  _setupAutoHide(e) {
2567
- return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), _.overResizeElement === this && delete _.overResizeElement), this;
2807
+ return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), N.overResizeElement === this && delete N.overResizeElement), this;
2568
2808
  }
2569
2809
  /** @internal */
2570
2810
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2571
2811
  _mouseOver(e) {
2572
- _.overResizeElement || _.dragElement || (_.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
2812
+ N.overResizeElement || N.dragElement || (N.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
2573
2813
  }
2574
2814
  /** @internal */
2575
2815
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2576
2816
  _mouseOut(e) {
2577
- _.overResizeElement === this && (delete _.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
2817
+ N.overResizeElement === this && (delete N.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
2578
2818
  }
2579
2819
  /** @internal */
2580
2820
  _setupHandlers() {
2581
- return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new we(this.el, e, {
2821
+ return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new De(this.el, e, {
2582
2822
  start: (t) => {
2583
2823
  this._resizeStart(t);
2584
2824
  },
@@ -2609,7 +2849,7 @@ class ie extends Oe {
2609
2849
  }
2610
2850
  /** @internal */
2611
2851
  _setupHelper() {
2612
- this.elOriginStyleVal = ie._originStyleProp.map((i) => this.el.style[i]), this.parentOriginStylePosition = this.el.parentElement.style.position;
2852
+ this.elOriginStyleVal = ce._originStyleProp.map((i) => this.el.style[i]), this.parentOriginStylePosition = this.el.parentElement.style.position;
2613
2853
  const e = this.el.parentElement, t = u.getValuesFromTransformedElement(e);
2614
2854
  return this.rectScale = {
2615
2855
  x: t.xScale,
@@ -2618,7 +2858,7 @@ class ie extends Oe {
2618
2858
  }
2619
2859
  /** @internal */
2620
2860
  _cleanHelper() {
2621
- return ie._originStyleProp.forEach((e, t) => {
2861
+ return ce._originStyleProp.forEach((e, t) => {
2622
2862
  this.el.style[e] = this.elOriginStyleVal[t] || null;
2623
2863
  }), this.el.parentElement.style.position = this.parentOriginStylePosition || null, this;
2624
2864
  }
@@ -2657,9 +2897,9 @@ class ie extends Oe {
2657
2897
  return this.handlers.forEach((e) => e.destroy()), delete this.handlers, this;
2658
2898
  }
2659
2899
  }
2660
- ie._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
2661
- const Ss = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
2662
- class se extends Oe {
2900
+ ce._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
2901
+ const Ls = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
2902
+ class ue extends Fe {
2663
2903
  constructor(e, t = {}) {
2664
2904
  var r;
2665
2905
  super(), this.el = e, this.option = t, this.dragTransform = {
@@ -2679,12 +2919,12 @@ class se extends Oe {
2679
2919
  }
2680
2920
  enable() {
2681
2921
  this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
2682
- e.addEventListener("mousedown", this._mouseDown), H && (e.addEventListener("touchstart", pe), e.addEventListener("pointerdown", ye));
2922
+ e.addEventListener("mousedown", this._mouseDown), W && (e.addEventListener("touchstart", we), e.addEventListener("pointerdown", Re));
2683
2923
  }), this.el.classList.remove("ui-draggable-disabled"));
2684
2924
  }
2685
2925
  disable(e = !1) {
2686
2926
  this.disabled !== !0 && (super.disable(), this.dragEls.forEach((t) => {
2687
- t.removeEventListener("mousedown", this._mouseDown), H && (t.removeEventListener("touchstart", pe), t.removeEventListener("pointerdown", ye));
2927
+ t.removeEventListener("mousedown", this._mouseDown), W && (t.removeEventListener("touchstart", we), t.removeEventListener("pointerdown", Re));
2688
2928
  }), e || this.el.classList.add("ui-draggable-disabled"));
2689
2929
  }
2690
2930
  destroy() {
@@ -2695,8 +2935,8 @@ class se extends Oe {
2695
2935
  }
2696
2936
  /** @internal call when mouse goes down before a dragstart happens */
2697
2937
  _mouseDown(e) {
2698
- if (!_.mouseHandled)
2699
- return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Ss) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete _.dragElement, delete _.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), H && (e.currentTarget.addEventListener("touchmove", me), e.currentTarget.addEventListener("touchend", ve)), e.preventDefault(), document.activeElement && document.activeElement.blur(), _.mouseHandled = !0), !0;
2938
+ if (!N.mouseHandled)
2939
+ return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Ls) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete N.dragElement, delete N.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), W && (e.currentTarget.addEventListener("touchmove", Ee), e.currentTarget.addEventListener("touchend", Ce)), e.preventDefault(), document.activeElement && document.activeElement.blur(), N.mouseHandled = !0), !0;
2700
2940
  }
2701
2941
  /** @internal method to call actual drag event */
2702
2942
  _callDrag(e) {
@@ -2710,15 +2950,15 @@ class se extends Oe {
2710
2950
  var i;
2711
2951
  const t = this.mouseDownEvent;
2712
2952
  if (this.lastDrag = e, this.dragging)
2713
- if (this._dragFollow(e), _.pauseDrag) {
2714
- const s = Number.isInteger(_.pauseDrag) ? _.pauseDrag : 100;
2953
+ if (this._dragFollow(e), N.pauseDrag) {
2954
+ const s = Number.isInteger(N.pauseDrag) ? N.pauseDrag : 100;
2715
2955
  this.dragTimeout && window.clearTimeout(this.dragTimeout), this.dragTimeout = window.setTimeout(() => this._callDrag(e), s);
2716
2956
  } else
2717
2957
  this._callDrag(e);
2718
2958
  else if (Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 3) {
2719
- this.dragging = !0, _.dragElement = this;
2959
+ this.dragging = !0, N.dragElement = this;
2720
2960
  const s = (i = this.el.gridstackNode) == null ? void 0 : i.grid;
2721
- s ? _.dropElement = s.el.ddElement.ddDroppable : delete _.dropElement, this.helper = this._createHelper(), this._setupHelperContainmentStyle(), this.dragTransform = u.getValuesFromTransformedElement(this.helperContainment), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment), this._setupHelperStyle(e);
2961
+ s ? N.dropElement = s.el.ddElement.ddDroppable : delete N.dropElement, this.helper = this._createHelper(), this._setupHelperContainmentStyle(), this.dragTransform = u.getValuesFromTransformedElement(this.helperContainment), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment), this._setupHelperStyle(e);
2722
2962
  const r = u.initEvent(e, { target: this.el, type: "dragstart" });
2723
2963
  this.option.start && this.option.start(r, this.ui()), this.triggerEvent("dragstart", r), document.addEventListener("keydown", this._keyEvent);
2724
2964
  }
@@ -2727,17 +2967,17 @@ class se extends Oe {
2727
2967
  /** @internal call when the mouse gets released to drop the item at current location */
2728
2968
  _mouseUp(e) {
2729
2969
  var t, i;
2730
- if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), H && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", me, !0), e.currentTarget.removeEventListener("touchend", ve, !0)), this.dragging) {
2731
- delete this.dragging, (t = this.el.gridstackNode) == null || delete t._origRotate, document.removeEventListener("keydown", this._keyEvent), ((i = _.dropElement) == null ? void 0 : i.el) === this.el.parentElement && delete _.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
2970
+ if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), W && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", Ee, !0), e.currentTarget.removeEventListener("touchend", Ce, !0)), this.dragging) {
2971
+ delete this.dragging, (t = this.el.gridstackNode) == null || delete t._origRotate, document.removeEventListener("keydown", this._keyEvent), ((i = N.dropElement) == null ? void 0 : i.el) === this.el.parentElement && delete N.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
2732
2972
  const s = u.initEvent(e, { target: this.el, type: "dragstop" });
2733
- this.option.stop && this.option.stop(s), this.triggerEvent("dragstop", s), _.dropElement && _.dropElement.drop(e);
2973
+ this.option.stop && this.option.stop(s), this.triggerEvent("dragstop", s), N.dropElement && N.dropElement.drop(e);
2734
2974
  }
2735
- delete this.helper, delete this.mouseDownEvent, delete _.dragElement, delete _.dropElement, delete _.mouseHandled, e.preventDefault();
2975
+ delete this.helper, delete this.mouseDownEvent, delete N.dragElement, delete N.dropElement, delete N.mouseHandled, e.preventDefault();
2736
2976
  }
2737
2977
  /** @internal call when keys are being pressed - use Esc to cancel, R to rotate */
2738
2978
  _keyEvent(e) {
2739
2979
  var s, r;
2740
- const t = this.el.gridstackNode, i = (t == null ? void 0 : t.grid) || ((r = (s = _.dropElement) == null ? void 0 : s.el) == null ? void 0 : r.gridstack);
2980
+ const t = this.el.gridstackNode, i = (t == null ? void 0 : t.grid) || ((r = (s = N.dropElement) == null ? void 0 : s.el) == null ? void 0 : r.gridstack);
2741
2981
  if (e.key === "Escape")
2742
2982
  t && t._origRotate && (t._orig = t._origRotate, delete t._origRotate), i == null || i.cancelDrag(), this._mouseUp(this.mouseDownEvent);
2743
2983
  else if (t && i && (e.key === "r" || e.key === "R")) {
@@ -2749,7 +2989,7 @@ class se extends Oe {
2749
2989
  /** @internal create a clone copy (or user defined method) of the original drag item if set */
2750
2990
  _createHelper() {
2751
2991
  let e = this.el;
2752
- return typeof this.option.helper == "function" ? e = this.option.helper(this.el) : this.option.helper === "clone" && (e = u.cloneNode(this.el)), e.parentElement || u.appendTo(e, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle = se.originStyleProp.map((t) => this.el.style[t]), e;
2992
+ return typeof this.option.helper == "function" ? e = this.option.helper(this.el) : this.option.helper === "clone" && (e = u.cloneNode(this.el)), e.parentElement || u.appendTo(e, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle = ue.originStyleProp.map((t) => this.el.style[t]), e;
2753
2993
  }
2754
2994
  /** @internal set the fix position of the dragged item */
2755
2995
  _setupHelperStyle(e) {
@@ -2767,7 +3007,7 @@ class se extends Oe {
2767
3007
  const e = (s = this.helper) == null ? void 0 : s.gridstackNode;
2768
3008
  if (!(e != null && e._isAboutToRemove) && this.dragElementOriginStyle) {
2769
3009
  const r = this.helper, n = this.dragElementOriginStyle.transition || null;
2770
- r.style.transition = this.dragElementOriginStyle.transition = "none", se.originStyleProp.forEach((o) => r.style[o] = this.dragElementOriginStyle[o] || null), setTimeout(() => r.style.transition = n, 50);
3010
+ r.style.transition = this.dragElementOriginStyle.transition = "none", ue.originStyleProp.forEach((o) => r.style[o] = this.dragElementOriginStyle[o] || null), setTimeout(() => r.style.transition = n, 50);
2771
3011
  }
2772
3012
  return delete this.dragElementOriginStyle, this;
2773
3013
  }
@@ -2809,8 +3049,8 @@ class se extends Oe {
2809
3049
  };
2810
3050
  }
2811
3051
  }
2812
- se.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
2813
- class Ps extends Oe {
3052
+ ue.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
3053
+ class Ms extends Fe {
2814
3054
  constructor(e, t = {}) {
2815
3055
  super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
2816
3056
  }
@@ -2821,10 +3061,10 @@ class Ps extends Oe {
2821
3061
  super.off(e);
2822
3062
  }
2823
3063
  enable() {
2824
- this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), H && (this.el.addEventListener("pointerenter", Ke), this.el.addEventListener("pointerleave", Ve)));
3064
+ this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), W && (this.el.addEventListener("pointerenter", Ye), this.el.addEventListener("pointerleave", Xe)));
2825
3065
  }
2826
3066
  disable(e = !1) {
2827
- this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), H && (this.el.removeEventListener("pointerenter", Ke), this.el.removeEventListener("pointerleave", Ve)));
3067
+ this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), W && (this.el.removeEventListener("pointerenter", Ye), this.el.removeEventListener("pointerleave", Xe)));
2828
3068
  }
2829
3069
  destroy() {
2830
3070
  this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
@@ -2834,20 +3074,20 @@ class Ps extends Oe {
2834
3074
  }
2835
3075
  /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */
2836
3076
  _mouseEnter(e) {
2837
- if (!_.dragElement || !this._canDrop(_.dragElement.el))
3077
+ if (!N.dragElement || !this._canDrop(N.dragElement.el))
2838
3078
  return;
2839
- e.preventDefault(), e.stopPropagation(), _.dropElement && _.dropElement !== this && _.dropElement._mouseLeave(e, !0), _.dropElement = this;
3079
+ e.preventDefault(), e.stopPropagation(), N.dropElement && N.dropElement !== this && N.dropElement._mouseLeave(e, !0), N.dropElement = this;
2840
3080
  const t = u.initEvent(e, { target: this.el, type: "dropover" });
2841
- this.option.over && this.option.over(t, this._ui(_.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
3081
+ this.option.over && this.option.over(t, this._ui(N.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
2842
3082
  }
2843
3083
  /** @internal called when the item is leaving our area, stop tracking if we had moving item */
2844
3084
  _mouseLeave(e, t = !1) {
2845
3085
  var s;
2846
- if (!_.dragElement || _.dropElement !== this)
3086
+ if (!N.dragElement || N.dropElement !== this)
2847
3087
  return;
2848
3088
  e.preventDefault(), e.stopPropagation();
2849
3089
  const i = u.initEvent(e, { target: this.el, type: "dropout" });
2850
- if (this.option.out && this.option.out(i, this._ui(_.dragElement)), this.triggerEvent("dropout", i), _.dropElement === this && (delete _.dropElement, !t)) {
3090
+ if (this.option.out && this.option.out(i, this._ui(N.dragElement)), this.triggerEvent("dropout", i), N.dropElement === this && (delete N.dropElement, !t)) {
2851
3091
  let r, n = this.el.parentElement;
2852
3092
  for (; !r && n; )
2853
3093
  r = (s = n.ddElement) == null ? void 0 : s.ddDroppable, n = n.parentElement;
@@ -2858,7 +3098,7 @@ class Ps extends Oe {
2858
3098
  drop(e) {
2859
3099
  e.preventDefault();
2860
3100
  const t = u.initEvent(e, { target: this.el, type: "drop" });
2861
- this.option.drop && this.option.drop(t, this._ui(_.dragElement)), this.triggerEvent("drop", t);
3101
+ this.option.drop && this.option.drop(t, this._ui(N.dragElement)), this.triggerEvent("drop", t);
2862
3102
  }
2863
3103
  /** @internal true if element matches the string/method accept option */
2864
3104
  _canDrop(e) {
@@ -2876,9 +3116,9 @@ class Ps extends Oe {
2876
3116
  };
2877
3117
  }
2878
3118
  }
2879
- class Ae {
3119
+ class Ie {
2880
3120
  static init(e) {
2881
- return e.ddElement || (e.ddElement = new Ae(e)), e.ddElement;
3121
+ return e.ddElement || (e.ddElement = new Ie(e)), e.ddElement;
2882
3122
  }
2883
3123
  constructor(e) {
2884
3124
  this.el = e;
@@ -2890,25 +3130,25 @@ class Ae {
2890
3130
  return this.ddDraggable && ["drag", "dragstart", "dragstop"].indexOf(e) > -1 ? this.ddDraggable.off(e) : this.ddDroppable && ["drop", "dropover", "dropout"].indexOf(e) > -1 ? this.ddDroppable.off(e) : this.ddResizable && ["resizestart", "resize", "resizestop"].indexOf(e) > -1 && this.ddResizable.off(e), this;
2891
3131
  }
2892
3132
  setupDraggable(e) {
2893
- return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new se(this.el, e), this;
3133
+ return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new ue(this.el, e), this;
2894
3134
  }
2895
3135
  cleanDraggable() {
2896
3136
  return this.ddDraggable && (this.ddDraggable.destroy(), delete this.ddDraggable), this;
2897
3137
  }
2898
3138
  setupResizable(e) {
2899
- return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new ie(this.el, e), this;
3139
+ return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new ce(this.el, e), this;
2900
3140
  }
2901
3141
  cleanResizable() {
2902
3142
  return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
2903
3143
  }
2904
3144
  setupDroppable(e) {
2905
- return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Ps(this.el, e), this;
3145
+ return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Ms(this.el, e), this;
2906
3146
  }
2907
3147
  cleanDroppable() {
2908
3148
  return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
2909
3149
  }
2910
3150
  }
2911
- class ks {
3151
+ class Hs {
2912
3152
  /**
2913
3153
  * Enable/disable/configure resizing for grid elements.
2914
3154
  *
@@ -3004,7 +3244,7 @@ class ks {
3004
3244
  }
3005
3245
  on(e, t, i) {
3006
3246
  return this._getDDElements(e).forEach((s) => s.on(t, (r) => {
3007
- i(r, _.dragElement ? _.dragElement.el : r.target, _.dragElement ? _.dragElement.helper : null);
3247
+ i(r, N.dragElement ? N.dragElement.el : r.target, N.dragElement ? N.dragElement.helper : null);
3008
3248
  })), this;
3009
3249
  }
3010
3250
  off(e, t) {
@@ -3013,7 +3253,7 @@ class ks {
3013
3253
  /** @internal returns a list of DD elements, creating them on the fly by default unless option is to destroy or disable */
3014
3254
  _getDDElements(e, t) {
3015
3255
  const i = e.gridstack || t !== "destroy" && t !== "disable", s = u.getElements(e);
3016
- return s.length ? s.map((n) => n.ddElement || (i ? Ae.init(n) : null)).filter((n) => n) : [];
3256
+ return s.length ? s.map((n) => n.ddElement || (i ? Ie.init(n) : null)).filter((n) => n) : [];
3017
3257
  }
3018
3258
  }
3019
3259
  /*!
@@ -3023,8 +3263,8 @@ class ks {
3023
3263
  * Copyright (c) 2021-2025 Alain Dumesny
3024
3264
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
3025
3265
  */
3026
- const P = new ks();
3027
- class y {
3266
+ const H = new Hs();
3267
+ class _ {
3028
3268
  /**
3029
3269
  * initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
3030
3270
  * simply return the existing instance (ignore any passed options). There is also an initAll() version that support
@@ -3041,8 +3281,8 @@ class y {
3041
3281
  static init(e = {}, t = ".grid-stack") {
3042
3282
  if (typeof document > "u")
3043
3283
  return null;
3044
- const i = y.getGridElement(t);
3045
- return i ? (i.gridstack || (i.gridstack = new y(i, u.cloneDeep(e))), i.gridstack) : (console.error(typeof t == "string" ? 'GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
3284
+ const i = _.getGridElement(t);
3285
+ return i ? (i.gridstack || (i.gridstack = new _(i, u.cloneDeep(e))), i.gridstack) : (console.error(typeof t == "string" ? 'GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
3046
3286
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.` : "GridStack.init() no grid element was passed."), null);
3047
3287
  }
3048
3288
  /**
@@ -3056,8 +3296,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3056
3296
  */
3057
3297
  static initAll(e = {}, t = ".grid-stack") {
3058
3298
  const i = [];
3059
- return typeof document > "u" || (y.getGridElements(t).forEach((s) => {
3060
- s.gridstack || (s.gridstack = new y(s, u.cloneDeep(e))), i.push(s.gridstack);
3299
+ return typeof document > "u" || (_.getGridElements(t).forEach((s) => {
3300
+ s.gridstack || (s.gridstack = new _(s, u.cloneDeep(e))), i.push(s.gridstack);
3061
3301
  }), i.length === 0 && console.error('GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
3062
3302
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)), i;
3063
3303
  }
@@ -3076,14 +3316,14 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3076
3316
  const n = i.gridstack;
3077
3317
  return t && (n.opts = { ...n.opts, ...t }), t.children !== void 0 && n.load(t.children), n;
3078
3318
  }
3079
- return (!e.classList.contains("grid-stack") || y.addRemoveCB) && (y.addRemoveCB ? i = y.addRemoveCB(e, t, !0, !0) : i = u.createDiv(["grid-stack", t.class], e)), y.init(t, i);
3319
+ return (!e.classList.contains("grid-stack") || _.addRemoveCB) && (_.addRemoveCB ? i = _.addRemoveCB(e, t, !0, !0) : i = u.createDiv(["grid-stack", t.class], e)), _.init(t, i);
3080
3320
  }
3081
3321
  /** call this method to register your engine instead of the default one.
3082
3322
  * See instead `GridStackOptions.engineClass` if you only need to
3083
3323
  * replace just one instance.
3084
3324
  */
3085
3325
  static registerEngine(e) {
3086
- y.engineClass = e;
3326
+ _.engineClass = e;
3087
3327
  }
3088
3328
  /**
3089
3329
  * @internal create placeholder DIV as needed
@@ -3091,7 +3331,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3091
3331
  */
3092
3332
  get placeholder() {
3093
3333
  if (!this._placeholder) {
3094
- this._placeholder = u.createDiv([this.opts.placeholderClass, A.itemClass, this.opts.itemClass]);
3334
+ this._placeholder = u.createDiv([this.opts.placeholderClass, F.itemClass, this.opts.itemClass]);
3095
3335
  const e = u.createDiv(["placeholder-content"], this._placeholder);
3096
3336
  this.opts.placeholderText && (e.textContent = this.opts.placeholderText);
3097
3337
  }
@@ -3113,31 +3353,31 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3113
3353
  !s.columnWidth && !(l != null && l.length) ? delete t.columnOpts : (s.columnMax = s.columnMax || 12, (l == null ? void 0 : l.length) > 1 && l.sort((d, f) => (f.w || 0) - (d.w || 0)));
3114
3354
  }
3115
3355
  const r = {
3116
- ...u.cloneDeep(A),
3117
- column: u.toNumber(e.getAttribute("gs-column")) || A.column,
3118
- minRow: i || u.toNumber(e.getAttribute("gs-min-row")) || A.minRow,
3119
- maxRow: i || u.toNumber(e.getAttribute("gs-max-row")) || A.maxRow,
3120
- staticGrid: u.toBool(e.getAttribute("gs-static")) || A.staticGrid,
3356
+ ...u.cloneDeep(F),
3357
+ column: u.toNumber(e.getAttribute("gs-column")) || F.column,
3358
+ minRow: i || u.toNumber(e.getAttribute("gs-min-row")) || F.minRow,
3359
+ maxRow: i || u.toNumber(e.getAttribute("gs-max-row")) || F.maxRow,
3360
+ staticGrid: u.toBool(e.getAttribute("gs-static")) || F.staticGrid,
3121
3361
  sizeToContent: u.toBool(e.getAttribute("gs-size-to-content")) || void 0,
3122
3362
  draggable: {
3123
- handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || A.draggable.handle
3363
+ handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || F.draggable.handle
3124
3364
  },
3125
3365
  removableOptions: {
3126
- accept: t.itemClass || A.removableOptions.accept,
3127
- decline: A.removableOptions.decline
3366
+ accept: t.itemClass || F.removableOptions.accept,
3367
+ decline: F.removableOptions.decline
3128
3368
  }
3129
3369
  };
3130
3370
  e.getAttribute("gs-animate") && (r.animate = u.toBool(e.getAttribute("gs-animate"))), t = u.defaults(t, r), this._initMargin(), this.checkDynamicColumn(), this._updateColumnVar(t), t.rtl === "auto" && (t.rtl = e.style.direction === "rtl"), t.rtl && this.el.classList.add("grid-stack-rtl");
3131
- const n = this.el.closest("." + A.itemClass), o = n == null ? void 0 : n.gridstackNode;
3371
+ const n = this.el.closest("." + F.itemClass), o = n == null ? void 0 : n.gridstackNode;
3132
3372
  if (o && (o.subGrid = this, this.parentGridNode = o, this.el.classList.add("grid-stack-nested"), o.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial")
3133
3373
  this.cellHeight(void 0);
3134
3374
  else {
3135
- typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== A.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit);
3375
+ typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== F.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit);
3136
3376
  const l = t.cellHeight;
3137
3377
  delete t.cellHeight, this.cellHeight(l);
3138
3378
  }
3139
- t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = H), this._setStaticClass();
3140
- const h = t.engineClass || y.engineClass || U;
3379
+ t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = W), this._setStaticClass();
3380
+ const h = t.engineClass || _.engineClass || j;
3141
3381
  if (this.engine = new h({
3142
3382
  column: this.getColumn(),
3143
3383
  float: t.float,
@@ -3152,7 +3392,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3152
3392
  const l = t.children;
3153
3393
  delete t.children, l.length && this.load(l);
3154
3394
  }
3155
- this.setAnimation(), t.subGridDynamic && !_.pauseDrag && (_.pauseDrag = !0), ((c = t.draggable) == null ? void 0 : c.pause) !== void 0 && (_.pauseDrag = t.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
3395
+ this.setAnimation(), t.subGridDynamic && !N.pauseDrag && (N.pauseDrag = !0), ((c = t.draggable) == null ? void 0 : c.pause) !== void 0 && (N.pauseDrag = t.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
3156
3396
  }
3157
3397
  _updateColumnVar(e = this.opts) {
3158
3398
  this.el.classList.add("gs-" + e.column), typeof e.column == "number" && this.el.style.setProperty("--gs-column-width", `${100 / e.column}%`);
@@ -3180,7 +3420,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3180
3420
  if (e.ELEMENT_NODE)
3181
3421
  return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"), this.makeWidget(e);
3182
3422
  let t, i = e;
3183
- if (i.grid = this, i.el ? t = i.el : y.addRemoveCB ? t = y.addRemoveCB(this.el, e, !0, !1) : t = this.createWidgetDivs(i), !t)
3423
+ if (i.grid = this, i.el ? t = i.el : _.addRemoveCB ? t = _.addRemoveCB(this.el, e, !0, !1) : t = this.createWidgetDivs(i), !t)
3184
3424
  return;
3185
3425
  if (i = t.gridstackNode, i && t.parentElement === this.el && this.engine.nodes.find((r) => r._id === i._id))
3186
3426
  return t;
@@ -3200,11 +3440,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3200
3440
  const t = u.createDiv(["grid-stack-item", this.opts.itemClass]), i = u.createDiv(["grid-stack-item-content"], t);
3201
3441
  return u.lazyLoad(e) ? e.visibleObservable || (e.visibleObservable = new IntersectionObserver(([s]) => {
3202
3442
  var r, n;
3203
- s.isIntersecting && ((r = e.visibleObservable) == null || r.disconnect(), delete e.visibleObservable, y.renderCB(i, e), (n = e.grid) == null || n.prepareDragDrop(e.el));
3443
+ s.isIntersecting && ((r = e.visibleObservable) == null || r.disconnect(), delete e.visibleObservable, _.renderCB(i, e), (n = e.grid) == null || n.prepareDragDrop(e.el));
3204
3444
  }), window.setTimeout(() => {
3205
3445
  var s;
3206
3446
  return (s = e.visibleObservable) == null ? void 0 : s.observe(t);
3207
- })) : y.renderCB(i, e), t;
3447
+ })) : _.renderCB(i, e), t;
3208
3448
  }
3209
3449
  /**
3210
3450
  * Convert an existing gridItem element into a sub-grid with the given (optional) options, else inherit them
@@ -3216,13 +3456,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3216
3456
  * @returns newly created grid
3217
3457
  */
3218
3458
  makeSubGrid(e, t, i, s = !0) {
3219
- var p, m, v;
3459
+ var p, y, C;
3220
3460
  let r = e.gridstackNode;
3221
3461
  if (r || (r = this.makeWidget(e).gridstackNode), (p = r.subGrid) != null && p.el)
3222
3462
  return r.subGrid;
3223
3463
  let n, o = this;
3224
3464
  for (; o && !n; )
3225
- n = (m = o.opts) == null ? void 0 : m.subGridOpts, o = (v = o.parentGridNode) == null ? void 0 : v.grid;
3465
+ n = (y = o.opts) == null ? void 0 : y.subGridOpts, o = (C = o.parentGridNode) == null ? void 0 : C.grid;
3226
3466
  t = u.cloneDeep({
3227
3467
  // by default sub-grid inherit from us | parent, other than id, children, etc...
3228
3468
  ...this.opts,
@@ -3238,11 +3478,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3238
3478
  let h;
3239
3479
  t.column === "auto" && (h = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
3240
3480
  let c = r.el.querySelector(".grid-stack-item-content"), l, d;
3241
- if (s && (this._removeDD(r.el), d = { ...r, x: 0, y: 0 }, u.removeInternalForSave(d), delete d.subGridOpts, r.content && (d.content = r.content, delete r.content), y.addRemoveCB ? l = y.addRemoveCB(this.el, d, !0, !1) : (l = u.createDiv(["grid-stack-item"]), l.appendChild(c), c = u.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
3242
- const b = h ? t.column : r.w, w = r.h + i.h, C = r.el.style;
3243
- C.transition = "none", this.update(r.el, { w: b, h: w }), setTimeout(() => C.transition = null);
3481
+ if (s && (this._removeDD(r.el), d = { ...r, x: 0, y: 0 }, u.removeInternalForSave(d), delete d.subGridOpts, r.content && (d.content = r.content, delete r.content), _.addRemoveCB ? l = _.addRemoveCB(this.el, d, !0, !1) : (l = u.createDiv(["grid-stack-item"]), l.appendChild(c), c = u.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
3482
+ const S = h ? t.column : r.w, D = r.h + i.h, R = r.el.style;
3483
+ R.transition = "none", this.update(r.el, { w: S, h: D }), setTimeout(() => R.transition = null);
3244
3484
  }
3245
- const f = r.subGrid = y.addGrid(c, t);
3485
+ const f = r.subGrid = _.addGrid(c, t);
3246
3486
  return i != null && i._moving && (f._isTemp = !0), h && (f._autoColumn = !0), s && f.makeWidget(l, d), i && (i._moving ? window.setTimeout(() => u.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
3247
3487
  }
3248
3488
  /**
@@ -3269,7 +3509,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3269
3509
  * NOTE2: nested grids will ALWAYS save to the container size to be in sync with parent.
3270
3510
  * @returns list of widgets or full grid option, including .children list of widgets
3271
3511
  */
3272
- save(e = !0, t = !1, i = y.saveCB, s) {
3512
+ save(e = !0, t = !1, i = _.saveCB, s) {
3273
3513
  const r = this.engine.save(e, i, s);
3274
3514
  if (r.forEach((n) => {
3275
3515
  var o;
@@ -3285,7 +3525,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3285
3525
  const n = u.cloneDeep(this.opts);
3286
3526
  n.marginBottom === n.marginTop && n.marginRight === n.marginLeft && n.marginTop === n.marginRight && (n.margin = n.marginTop, delete n.marginTop, delete n.marginRight, delete n.marginBottom, delete n.marginLeft), n.rtl === (this.el.style.direction === "rtl") && (n.rtl = "auto"), this._isAutoCellHeight && (n.cellHeight = "auto"), this._autoColumn && (n.column = "auto");
3287
3527
  const o = n._alwaysShowResizeHandle;
3288
- return delete n._alwaysShowResizeHandle, o !== void 0 ? n.alwaysShowResizeHandle = o : delete n.alwaysShowResizeHandle, u.removeInternalAndSame(n, A), n.children = r, n;
3528
+ return delete n._alwaysShowResizeHandle, o !== void 0 ? n.alwaysShowResizeHandle = o : delete n.alwaysShowResizeHandle, u.removeInternalAndSame(n, F), n.children = r, n;
3289
3529
  }
3290
3530
  return r;
3291
3531
  }
@@ -3324,7 +3564,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3324
3564
  *
3325
3565
  * @see {@link http://gridstackjs.com/demo/serialization.html} for complete example
3326
3566
  */
3327
- load(e, t = y.addRemoveCB || !0) {
3567
+ load(e, t = _.addRemoveCB || !0) {
3328
3568
  e = u.cloneDeep(e);
3329
3569
  const i = this.getColumn();
3330
3570
  e.forEach((l) => {
@@ -3334,15 +3574,15 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3334
3574
  e.forEach((l) => {
3335
3575
  s = Math.max(s, (l.x || 0) + l.w);
3336
3576
  }), s > this.engine.defaultColumn && (this.engine.defaultColumn = s), s > i && (this.engine.nodes.length === 0 && this.responseLayout ? (this.engine.nodes = e, this.engine.columnChanged(s, i, this.responseLayout), e = this.engine.nodes, this.engine.nodes = [], delete this.responseLayout) : this.engine.cacheLayout(e, s, !0));
3337
- const r = y.addRemoveCB;
3338
- typeof t == "function" && (y.addRemoveCB = t);
3577
+ const r = _.addRemoveCB;
3578
+ typeof t == "function" && (_.addRemoveCB = t);
3339
3579
  const n = [];
3340
3580
  this.batchUpdate();
3341
3581
  const o = !this.engine.nodes.length, h = o && this.opts.animate;
3342
3582
  h && this.setAnimation(!1), !o && t && [...this.engine.nodes].forEach((d) => {
3343
3583
  if (!d.id)
3344
3584
  return;
3345
- u.find(e, d.id) || (y.addRemoveCB && y.addRemoveCB(this.el, d, !1, !1), n.push(d), this.removeWidget(d.el, !0, !1));
3585
+ u.find(e, d.id) || (_.addRemoveCB && _.addRemoveCB(this.el, d, !1, !1), n.push(d), this.removeWidget(d.el, !0, !1));
3346
3586
  }), this.engine._loading = !0;
3347
3587
  const c = [];
3348
3588
  return this.engine.nodes = this.engine.nodes.filter((l) => u.find(e, l.id) ? (c.push(l), !1) : !0), e.forEach((l) => {
@@ -3354,7 +3594,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3354
3594
  p && p.gridstack && p.gridstack.load(l.subGridOpts.children);
3355
3595
  }
3356
3596
  } else t && this.addWidget(l);
3357
- }), delete this.engine._loading, this.engine.removedNodes = n, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ? y.addRemoveCB = r : delete y.addRemoveCB, h && this.setAnimation(!0, !0), this;
3597
+ }), delete this.engine._loading, this.engine.removedNodes = n, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ? _.addRemoveCB = r : delete _.addRemoveCB, h && this.setAnimation(!0, !0), this;
3358
3598
  }
3359
3599
  /**
3360
3600
  * use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
@@ -3670,7 +3910,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3670
3910
  * grid.makeWidget(element, {x: 0, y: 1, w: 4, h: 2});
3671
3911
  */
3672
3912
  makeWidget(e, t) {
3673
- const i = y.getElement(e);
3913
+ const i = _.getElement(e);
3674
3914
  if (!i || i.gridstackNode)
3675
3915
  return i;
3676
3916
  i.parentElement || this.el.appendChild(i), this._prepareElement(i, !0, t);
@@ -3709,11 +3949,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3709
3949
  * @param triggerEvent if `false` (quiet mode) element will not be added to removed list and no 'removed' callbacks will be called (Default? true).
3710
3950
  */
3711
3951
  removeWidget(e, t = !0, i = !0) {
3712
- return e ? (y.getElements(e).forEach((s) => {
3952
+ return e ? (_.getElements(e).forEach((s) => {
3713
3953
  if (s.parentElement && s.parentElement !== this.el)
3714
3954
  return;
3715
3955
  let r = s.gridstackNode;
3716
- r || (r = this.engine.nodes.find((n) => s === n.el)), r && (t && y.addRemoveCB && y.addRemoveCB(this.el, r, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(r, t, i), t && s.parentElement && s.remove());
3956
+ r || (r = this.engine.nodes.find((n) => s === n.el)), r && (t && _.addRemoveCB && _.addRemoveCB(this.el, r, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(r, t, i), t && s.parentElement && s.remove());
3717
3957
  }), i && (this._triggerRemoveEvent(), this._triggerChangeEvent()), this) : (console.error("Error: GridStack.removeWidget(undefined) called"), this);
3718
3958
  }
3719
3959
  /**
@@ -3723,7 +3963,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3723
3963
  */
3724
3964
  removeAll(e = !0, t = !0) {
3725
3965
  return this.engine.nodes.forEach((i) => {
3726
- e && y.addRemoveCB && y.addRemoveCB(this.el, i, !1, !1), delete i.el.gridstackNode, this.opts.staticGrid || this._removeDD(i.el);
3966
+ e && _.addRemoveCB && _.addRemoveCB(this.el, i, !1, !1), delete i.el.gridstackNode, this.opts.staticGrid || this._removeDD(i.el);
3727
3967
  }), this.engine.removeAll(e, t), t && this._triggerRemoveEvent(), this;
3728
3968
  }
3729
3969
  /**
@@ -3789,7 +4029,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3789
4029
  * });
3790
4030
  */
3791
4031
  update(e, t) {
3792
- return y.getElements(e).forEach((i) => {
4032
+ return _.getElements(e).forEach((i) => {
3793
4033
  var l;
3794
4034
  const s = i == null ? void 0 : i.gridstackNode;
3795
4035
  if (!s)
@@ -3802,7 +4042,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3802
4042
  o[d] = r[d] !== void 0 ? r[d] : s[d], delete r[d];
3803
4043
  })), !o && (r.minW || r.minH || r.maxW || r.maxH) && (o = {}), r.content !== void 0) {
3804
4044
  const d = i.querySelector(".grid-stack-item-content");
3805
- d && d.textContent !== r.content && (s.content = r.content, y.renderCB(d, r), (l = s.subGrid) != null && l.el && (d.appendChild(s.subGrid.el), s.subGrid._updateContainerHeight())), delete r.content;
4045
+ d && d.textContent !== r.content && (s.content = r.content, _.renderCB(d, r), (l = s.subGrid) != null && l.el && (d.appendChild(s.subGrid.el), s.subGrid._updateContainerHeight())), delete r.content;
3806
4046
  }
3807
4047
  let h = !1, c = !1;
3808
4048
  for (const d in r)
@@ -3811,7 +4051,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3811
4051
  const d = o.w !== void 0 && o.w !== s.w;
3812
4052
  this.moveNode(s, o), d && s.subGrid ? s.subGrid.onResize(this.hasAnimationCSS() ? s.w : void 0) : this.resizeToContentCheck(d, s), delete s._orig;
3813
4053
  }
3814
- (o || h) && this._writeAttr(i, s), c && this.prepareDragDrop(s.el), y.updateCB && y.updateCB(s);
4054
+ (o || h) && this._writeAttr(i, s), c && this.prepareDragDrop(s.el), _.updateCB && _.updateCB(s);
3815
4055
  }), this;
3816
4056
  }
3817
4057
  moveNode(e, t) {
@@ -3850,24 +4090,24 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3850
4090
  if (!s)
3851
4091
  return;
3852
4092
  let r = t.h ? t.h * s : e.clientHeight, n;
3853
- if (t.resizeToContentParent && (n = e.querySelector(t.resizeToContentParent)), n || (n = e.querySelector(y.resizeToContentParent)), !n)
4093
+ if (t.resizeToContentParent && (n = e.querySelector(t.resizeToContentParent)), n || (n = e.querySelector(_.resizeToContentParent)), !n)
3854
4094
  return;
3855
4095
  const o = e.clientHeight - n.clientHeight, h = t.h ? t.h * s - o : n.clientHeight;
3856
4096
  let c;
3857
4097
  if (t.subGrid) {
3858
4098
  c = t.subGrid.getRow() * t.subGrid.getCellHeight(!0);
3859
- const m = t.subGrid.el.getBoundingClientRect(), v = e.getBoundingClientRect();
3860
- c += m.top - v.top;
4099
+ const y = t.subGrid.el.getBoundingClientRect(), C = e.getBoundingClientRect();
4100
+ c += y.top - C.top;
3861
4101
  } else {
3862
4102
  if ((p = (f = t.subGridOpts) == null ? void 0 : f.children) != null && p.length)
3863
4103
  return;
3864
4104
  {
3865
- const m = n.firstElementChild;
3866
- if (!m) {
3867
- console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${y.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
4105
+ const y = n.firstElementChild;
4106
+ if (!y) {
4107
+ console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${_.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
3868
4108
  return;
3869
4109
  }
3870
- c = m.getBoundingClientRect().height || h;
4110
+ c = y.getBoundingClientRect().height || h;
3871
4111
  }
3872
4112
  }
3873
4113
  if (h === c)
@@ -3879,7 +4119,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3879
4119
  }
3880
4120
  /** call the user resize (so they can do extra work) else our build in version */
3881
4121
  resizeToContentCBCheck(e) {
3882
- y.resizeToContentCB ? y.resizeToContentCB(e) : this.resizeToContent(e);
4122
+ _.resizeToContentCB ? _.resizeToContentCB(e) : this.resizeToContent(e);
3883
4123
  }
3884
4124
  /**
3885
4125
  * Rotate widgets by swapping their width and height. This is typically called when the user presses 'r' during dragging.
@@ -3897,7 +4137,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3897
4137
  * grid.rotate(widget, { left: 50, top: 30 });
3898
4138
  */
3899
4139
  rotate(e, t) {
3900
- return y.getElements(e).forEach((i) => {
4140
+ return _.getElements(e).forEach((i) => {
3901
4141
  const s = i.gridstackNode;
3902
4142
  if (!u.canBeRotated(s))
3903
4143
  return;
@@ -4034,7 +4274,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4034
4274
  }
4035
4275
  /** @internal */
4036
4276
  _prepareElement(e, t = !1, i) {
4037
- i = i || this._readAttr(e), e.gridstackNode = i, i.el = e, i.grid = this, i = this.engine.addNode(i, t), this._writeAttr(e, i), e.classList.add(A.itemClass, this.opts.itemClass);
4277
+ i = i || this._readAttr(e), e.gridstackNode = i, i.el = e, i.grid = this, i = this.engine.addNode(i, t), this._writeAttr(e, i), e.classList.add(F.itemClass, this.opts.itemClass);
4038
4278
  const s = u.shouldSizeToContent(i);
4039
4279
  return s ? e.classList.add("size-to-content") : e.classList.remove("size-to-content"), s && this.resizeToContentCheck(!1, i), u.lazyLoad(i) || this.prepareDragDrop(i.el), this;
4040
4280
  }
@@ -4122,7 +4362,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4122
4362
  }
4123
4363
  /** @internal */
4124
4364
  static getGridElement(e) {
4125
- return y.getElement(e);
4365
+ return _.getElement(e);
4126
4366
  }
4127
4367
  /** @internal */
4128
4368
  static getGridElements(e) {
@@ -4153,7 +4393,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4153
4393
  * // Access drag & drop functionality
4154
4394
  */
4155
4395
  static getDD() {
4156
- return P;
4396
+ return H;
4157
4397
  }
4158
4398
  /**
4159
4399
  * call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
@@ -4165,8 +4405,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4165
4405
  * @param root optional root which defaults to document (for shadow dom pass the parent HTMLDocument)
4166
4406
  */
4167
4407
  static setupDragIn(e, t, i, s = document) {
4168
- (t == null ? void 0 : t.pause) !== void 0 && (_.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? u.getElements(e, s) : e).forEach((n, o) => {
4169
- P.isDraggable(n) || P.dragIn(n, t), i != null && i[o] && (n.gridstackNode = i[o]);
4408
+ (t == null ? void 0 : t.pause) !== void 0 && (N.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? u.getElements(e, s) : e).forEach((n, o) => {
4409
+ H.isDraggable(n) || H.dragIn(n, t), i != null && i[o] && (n.gridstackNode = i[o]);
4170
4410
  });
4171
4411
  }
4172
4412
  /**
@@ -4188,7 +4428,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4188
4428
  * grid.movable('#fixed-widget', false);
4189
4429
  */
4190
4430
  movable(e, t) {
4191
- return this.opts.staticGrid ? this : (y.getElements(e).forEach((i) => {
4431
+ return this.opts.staticGrid ? this : (_.getElements(e).forEach((i) => {
4192
4432
  const s = i.gridstackNode;
4193
4433
  s && (t ? delete s.noMove : s.noMove = !0, this.prepareDragDrop(s.el));
4194
4434
  }), this);
@@ -4209,7 +4449,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4209
4449
  * grid.resizable('#fixed-size-widget', false);
4210
4450
  */
4211
4451
  resizable(e, t) {
4212
- return this.opts.staticGrid ? this : (y.getElements(e).forEach((i) => {
4452
+ return this.opts.staticGrid ? this : (_.getElements(e).forEach((i) => {
4213
4453
  const s = i.gridstackNode;
4214
4454
  s && (t ? delete s.noResize : s.noResize = !0, this.prepareDragDrop(s.el));
4215
4455
  }), this);
@@ -4314,16 +4554,16 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4314
4554
  cancelDrag() {
4315
4555
  var t;
4316
4556
  const e = (t = this._placeholder) == null ? void 0 : t.gridstackNode;
4317
- e && (e._isExternal ? (e._isAboutToRemove = !0, this.engine.removeNode(e)) : e._isAboutToRemove && y._itemRemoving(e.el, !1), this.engine.restoreInitial());
4557
+ e && (e._isExternal ? (e._isAboutToRemove = !0, this.engine.removeNode(e)) : e._isAboutToRemove && _._itemRemoving(e.el, !1), this.engine.restoreInitial());
4318
4558
  }
4319
4559
  /** @internal removes any drag&drop present (called during destroy) */
4320
4560
  _removeDD(e) {
4321
- return P.draggable(e, "destroy").resizable(e, "destroy"), e.gridstackNode && delete e.gridstackNode._initDD, delete e.ddElement, this;
4561
+ return H.draggable(e, "destroy").resizable(e, "destroy"), e.gridstackNode && delete e.gridstackNode._initDD, delete e.ddElement, this;
4322
4562
  }
4323
4563
  /** @internal called to add drag over to support widgets being added externally */
4324
4564
  _setupAcceptWidget() {
4325
4565
  if (this.opts.staticGrid || !this.opts.acceptWidgets && !this.opts.removable)
4326
- return P.droppable(this.el, "destroy"), this;
4566
+ return H.droppable(this.el, "destroy"), this;
4327
4567
  let e, t;
4328
4568
  const i = (s, r, n) => {
4329
4569
  var f;
@@ -4348,7 +4588,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4348
4588
  if (o._temporaryRemoved) {
4349
4589
  if (o.x = Math.max(0, Math.round(c / t)), o.y = Math.max(0, Math.round(h / e)), delete o.autoPosition, this.engine.nodeBoundFix(o), !this.engine.willItFit(o)) {
4350
4590
  if (o.autoPosition = !0, !this.engine.willItFit(o)) {
4351
- P.off(r, "drag");
4591
+ H.off(r, "drag");
4352
4592
  return;
4353
4593
  }
4354
4594
  o._willFitPos && (u.copyPos(o, o._willFitPos), delete o._willFitPos);
@@ -4357,7 +4597,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4357
4597
  } else
4358
4598
  this._dragOrResize(n, s, d, o, t, e);
4359
4599
  };
4360
- return P.droppable(this.el, {
4600
+ return H.droppable(this.el, {
4361
4601
  accept: (s) => {
4362
4602
  const r = s.gridstackNode || this._readAttr(s, !1);
4363
4603
  if ((r == null ? void 0 : r.grid) === this)
@@ -4396,12 +4636,12 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4396
4636
  o.grid || (o.el || (o = { ...o }), o._isExternal = !0, n.gridstackNode = o);
4397
4637
  const h = o.w || Math.round(n.offsetWidth / t) || 1, c = o.h || Math.round(n.offsetHeight / e) || 1;
4398
4638
  return o.grid && o.grid !== this ? (r._gridstackNodeOrig || (r._gridstackNodeOrig = o), r.gridstackNode = o = { ...o, w: h, h: c, grid: this }, delete o.x, delete o.y, this.engine.cleanupNode(o).nodeBoundFix(o), o._initDD = o._isExternal = // DOM needs to be re-parented on a drop
4399
- o._temporaryRemoved = !0) : (o.w = h, o.h = c, o._temporaryRemoved = !0), y._itemRemoving(o.el, !1), P.on(r, "drag", i), i(s, r, n), !1;
4639
+ o._temporaryRemoved = !0) : (o.w = h, o.h = c, o._temporaryRemoved = !0), _._itemRemoving(o.el, !1), H.on(r, "drag", i), i(s, r, n), !1;
4400
4640
  }).on(this.el, "dropout", (s, r, n) => {
4401
4641
  const o = (n == null ? void 0 : n.gridstackNode) || r.gridstackNode;
4402
4642
  return o && (!o.grid || o.grid === this) && (this._leave(r, n), this._isTemp && this.removeAsSubGrid(o)), !1;
4403
4643
  }).on(this.el, "drop", (s, r, n) => {
4404
- var f, p, m;
4644
+ var f, p, y;
4405
4645
  const o = (n == null ? void 0 : n.gridstackNode) || r.gridstackNode;
4406
4646
  if ((o == null ? void 0 : o.grid) === this && !o._isExternal)
4407
4647
  return !1;
@@ -4409,13 +4649,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4409
4649
  this.placeholder.remove(), delete this.placeholder.gridstackNode, h && this.opts.animate && (this.setAnimation(!1), this.setAnimation(!0, !0));
4410
4650
  const l = r._gridstackNodeOrig;
4411
4651
  if (delete r._gridstackNodeOrig, h && (l != null && l.grid) && l.grid !== this) {
4412
- const v = l.grid;
4413
- v.engine.removeNodeFromLayoutCache(l), v.engine.removedNodes.push(l), v._triggerRemoveEvent()._triggerChangeEvent(), v.parentGridNode && !v.engine.nodes.length && v.opts.subGridDynamic && v.removeAsSubGrid();
4652
+ const C = l.grid;
4653
+ C.engine.removeNodeFromLayoutCache(l), C.engine.removedNodes.push(l), C._triggerRemoveEvent()._triggerChangeEvent(), C.parentGridNode && !C.engine.nodes.length && C.opts.subGridDynamic && C.removeAsSubGrid();
4414
4654
  }
4415
- if (!o || (h && (this.engine.cleanupNode(o), o.grid = this), (f = o.grid) == null || delete f._isTemp, P.off(r, "drag"), n !== r ? (n.remove(), r = n) : r.remove(), this._removeDD(r), !h))
4655
+ if (!o || (h && (this.engine.cleanupNode(o), o.grid = this), (f = o.grid) == null || delete f._isTemp, H.off(r, "drag"), n !== r ? (n.remove(), r = n) : r.remove(), this._removeDD(r), !h))
4416
4656
  return !1;
4417
- const d = (m = (p = o.subGrid) == null ? void 0 : p.el) == null ? void 0 : m.gridstack;
4418
- return u.copyPos(o, this._readAttr(this.placeholder)), u.removePositioningStyles(r), c && (o.content || o.subGridOpts || y.addRemoveCB) ? (delete o.el, r = this.addWidget(o)) : (this._prepareElement(r, !0, o), this.el.appendChild(r), this.resizeToContentCheck(!1, o), d && (d.parentGridNode = o), this._updateContainerHeight()), this.engine.addedNodes.push(o), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, l && l.grid ? l : void 0, o), !1;
4657
+ const d = (y = (p = o.subGrid) == null ? void 0 : p.el) == null ? void 0 : y.gridstack;
4658
+ return u.copyPos(o, this._readAttr(this.placeholder)), u.removePositioningStyles(r), c && (o.content || o.subGridOpts || _.addRemoveCB) ? (delete o.el, r = this.addWidget(o)) : (this._prepareElement(r, !0, o), this.el.appendChild(r), this.resizeToContentCheck(!1, o), d && (d.parentGridNode = o), this._updateContainerHeight()), this.engine.addedNodes.push(o), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, l && l.grid ? l : void 0, o), !1;
4419
4659
  }), this;
4420
4660
  }
4421
4661
  /** @internal mark item for removal */
@@ -4430,7 +4670,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4430
4670
  if (typeof this.opts.removable != "string")
4431
4671
  return this;
4432
4672
  const e = document.querySelector(this.opts.removable);
4433
- return e ? (!this.opts.staticGrid && !P.isDroppable(e) && P.droppable(e, this.opts.removableOptions).on(e, "dropover", (t, i) => y._itemRemoving(i, !0)).on(e, "dropout", (t, i) => y._itemRemoving(i, !1)), this) : this;
4673
+ return e ? (!this.opts.staticGrid && !H.isDroppable(e) && H.droppable(e, this.opts.removableOptions).on(e, "dropover", (t, i) => _._itemRemoving(i, !0)).on(e, "dropout", (t, i) => _._itemRemoving(i, !1)), this) : this;
4434
4674
  }
4435
4675
  /**
4436
4676
  * prepares the element for drag&drop - this is normally called by makeWidget() unless are are delay loading
@@ -4452,17 +4692,17 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4452
4692
  this._dragOrResize(e, f, p, i, o, h);
4453
4693
  }, d = (f) => {
4454
4694
  this.placeholder.remove(), delete this.placeholder.gridstackNode, delete i._moving, delete i._resizing, delete i._event, delete i._lastTried;
4455
- const p = i.w !== i._orig.w, m = f.target;
4456
- if (!(!m.gridstackNode || m.gridstackNode.grid !== this)) {
4457
- if (i.el = m, i._isAboutToRemove) {
4458
- const v = e.gridstackNode.grid;
4459
- v._gsEventHandler[f.type] && v._gsEventHandler[f.type](f, m), v.engine.nodes.push(i), v.removeWidget(e, !0, !0);
4695
+ const p = i.w !== i._orig.w, y = f.target;
4696
+ if (!(!y.gridstackNode || y.gridstackNode.grid !== this)) {
4697
+ if (i.el = y, i._isAboutToRemove) {
4698
+ const C = e.gridstackNode.grid;
4699
+ C._gsEventHandler[f.type] && C._gsEventHandler[f.type](f, y), C.engine.nodes.push(i), C.removeWidget(e, !0, !0);
4460
4700
  } else
4461
- u.removePositioningStyles(m), i._temporaryRemoved ? (this._writePosAttr(m, i), this.engine.addNode(i)) : this._writePosAttr(m, i), this.triggerEvent(f, m);
4701
+ u.removePositioningStyles(y), i._temporaryRemoved ? (this._writePosAttr(y, i), this.engine.addNode(i)) : this._writePosAttr(y, i), this.triggerEvent(f, y);
4462
4702
  this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), f.type === "resizestop" && (Number.isInteger(i.sizeToContent) && (i.sizeToContent = i.h), this.resizeToContentCheck(p, i));
4463
4703
  }
4464
4704
  };
4465
- P.draggable(e, {
4705
+ H.draggable(e, {
4466
4706
  start: c,
4467
4707
  stop: d,
4468
4708
  drag: l
@@ -4472,7 +4712,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4472
4712
  resize: l
4473
4713
  }), i._initDD = !0;
4474
4714
  }
4475
- return P.draggable(e, s ? "disable" : "enable").resizable(e, r ? "disable" : "enable"), this;
4715
+ return H.draggable(e, s ? "disable" : "enable").resizable(e, r ? "disable" : "enable"), this;
4476
4716
  }
4477
4717
  /** @internal handles actual drag/resize start */
4478
4718
  _onStartMoving(e, t, i, s, r, n) {
@@ -4491,47 +4731,47 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4491
4731
  };
4492
4732
  if (s.el = this.placeholder, s._lastUiPosition = i.position, s._prevYPix = i.position.top, s._moving = t.type === "dragstart", s._resizing = t.type === "resizestart", delete s._lastTried, t.type === "dropover" && s._temporaryRemoved && (this.engine.addNode(s), s._moving = !0), this.engine.cacheRects(r, n, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart") {
4493
4733
  const h = this.getColumn() - s.x, c = (this.opts.maxRow || Number.MAX_SAFE_INTEGER) - s.y;
4494
- P.resizable(e, "option", "minWidth", r * Math.min(s.minW || 1, h)).resizable(e, "option", "minHeight", n * Math.min(s.minH || 1, c)).resizable(e, "option", "maxWidth", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, h)).resizable(e, "option", "maxWidthMoveLeft", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, s.x + s.w)).resizable(e, "option", "maxHeight", n * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, c)).resizable(e, "option", "maxHeightMoveUp", n * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, s.y + s.h));
4734
+ H.resizable(e, "option", "minWidth", r * Math.min(s.minW || 1, h)).resizable(e, "option", "minHeight", n * Math.min(s.minH || 1, c)).resizable(e, "option", "maxWidth", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, h)).resizable(e, "option", "maxWidthMoveLeft", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, s.x + s.w)).resizable(e, "option", "maxHeight", n * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, c)).resizable(e, "option", "maxHeightMoveUp", n * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, s.y + s.h));
4495
4735
  }
4496
4736
  }
4497
4737
  /** @internal handles actual drag/resize */
4498
4738
  _dragOrResize(e, t, i, s, r, n) {
4499
4739
  const o = { ...s._orig };
4500
4740
  let h, c = this.opts.marginLeft, l = this.opts.marginRight, d = this.opts.marginTop, f = this.opts.marginBottom;
4501
- const p = Math.round(n * 0.1), m = Math.round(r * 0.1);
4502
- if (c = Math.min(c, m), l = Math.min(l, m), d = Math.min(d, p), f = Math.min(f, p), t.type === "drag") {
4741
+ const p = Math.round(n * 0.1), y = Math.round(r * 0.1);
4742
+ if (c = Math.min(c, y), l = Math.min(l, y), d = Math.min(d, p), f = Math.min(f, p), t.type === "drag") {
4503
4743
  if (s._temporaryRemoved)
4504
4744
  return;
4505
- const b = i.position.top - s._prevYPix;
4506
- s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && u.updateScrollPosition(e, i.position, b);
4507
- const w = i.position.left + (i.position.left > s._lastUiPosition.left ? -l : c), C = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : d);
4508
- o.x = Math.round(w / r), o.y = Math.round(C / n);
4509
- const E = this._extraDragRow;
4745
+ const S = i.position.top - s._prevYPix;
4746
+ s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && u.updateScrollPosition(e, i.position, S);
4747
+ const D = i.position.left + (i.position.left > s._lastUiPosition.left ? -l : c), R = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : d);
4748
+ o.x = Math.round(D / r), o.y = Math.round(R / n);
4749
+ const w = this._extraDragRow;
4510
4750
  if (this.engine.collide(s, o)) {
4511
- const D = this.getRow();
4512
- let R = Math.max(0, o.y + s.h - D);
4513
- this.opts.maxRow && D + R > this.opts.maxRow && (R = Math.max(0, this.opts.maxRow - D)), this._extraDragRow = R;
4751
+ const E = this.getRow();
4752
+ let v = Math.max(0, o.y + s.h - E);
4753
+ this.opts.maxRow && E + v > this.opts.maxRow && (v = Math.max(0, this.opts.maxRow - E)), this._extraDragRow = v;
4514
4754
  } else
4515
4755
  this._extraDragRow = 0;
4516
- if (this._extraDragRow !== E && this._updateContainerHeight(), s.x === o.x && s.y === o.y)
4756
+ if (this._extraDragRow !== w && this._updateContainerHeight(), s.x === o.x && s.y === o.y)
4517
4757
  return;
4518
4758
  } else if (t.type === "resize") {
4519
4759
  if (o.x < 0 || (u.updateScrollResize(t, e, n), o.w = Math.round((i.size.width - c) / r), o.h = Math.round((i.size.height - d) / n), s.w === o.w && s.h === o.h) || s._lastTried && s._lastTried.w === o.w && s._lastTried.h === o.h)
4520
4760
  return;
4521
- const b = i.position.left + c, w = i.position.top + d;
4522
- o.x = Math.round(b / r), o.y = Math.round(w / n), h = !0;
4761
+ const S = i.position.left + c, D = i.position.top + d;
4762
+ o.x = Math.round(S / r), o.y = Math.round(D / n), h = !0;
4523
4763
  }
4524
4764
  s._event = t, s._lastTried = o;
4525
- const v = {
4765
+ const C = {
4526
4766
  x: i.position.left + c,
4527
4767
  y: i.position.top + d,
4528
4768
  w: (i.size ? i.size.width : s.w * r) - c - l,
4529
4769
  h: (i.size ? i.size.height : s.h * n) - d - f
4530
4770
  };
4531
- if (this.engine.moveNodeCheck(s, { ...o, cellWidth: r, cellHeight: n, rect: v, resizing: h })) {
4771
+ if (this.engine.moveNodeCheck(s, { ...o, cellWidth: r, cellHeight: n, rect: C, resizing: h })) {
4532
4772
  s._lastUiPosition = i.position, this.engine.cacheRects(r, n, d, l, f, c), delete s._skipDown, h && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
4533
- const b = t.target;
4534
- s._sidebarOrig || this._writePosAttr(b, s), this.triggerEvent(t, b);
4773
+ const S = t.target;
4774
+ s._sidebarOrig || this._writePosAttr(S, s), this.triggerEvent(t, S);
4535
4775
  }
4536
4776
  }
4537
4777
  /** call given event callback on our main top-most grid (if we're nested) */
@@ -4548,55 +4788,66 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4548
4788
  _leave(e, t) {
4549
4789
  t = t || e;
4550
4790
  const i = t.gridstackNode;
4551
- if (!i || (t.style.transform = t.style.transformOrigin = null, P.off(e, "drag"), i._temporaryRemoved))
4791
+ if (!i || (t.style.transform = t.style.transformOrigin = null, H.off(e, "drag"), i._temporaryRemoved))
4552
4792
  return;
4553
4793
  i._temporaryRemoved = !0, this.engine.removeNode(i), i.el = i._isExternal && t ? t : e;
4554
4794
  const s = i._sidebarOrig;
4555
- i._isExternal && this.engine.cleanupNode(i), i._sidebarOrig = s, this.opts.removable === !0 && y._itemRemoving(e, !0), e._gridstackNodeOrig ? (e.gridstackNode = e._gridstackNodeOrig, delete e._gridstackNodeOrig) : i._isExternal && this.engine.restoreInitial();
4795
+ i._isExternal && this.engine.cleanupNode(i), i._sidebarOrig = s, this.opts.removable === !0 && _._itemRemoving(e, !0), e._gridstackNodeOrig ? (e.gridstackNode = e._gridstackNodeOrig, delete e._gridstackNodeOrig) : i._isExternal && this.engine.restoreInitial();
4556
4796
  }
4557
4797
  // legacy method removed
4558
4798
  commit() {
4559
- return Ds(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4799
+ return As(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4560
4800
  }
4561
4801
  }
4562
- y.renderCB = (a, e) => {
4802
+ _.renderCB = (a, e) => {
4563
4803
  a && (e != null && e.content) && (a.textContent = e.content);
4564
4804
  };
4565
- y.resizeToContentParent = ".grid-stack-item-content";
4566
- y.Utils = u;
4567
- y.Engine = U;
4568
- y.GDRev = "12.3.2";
4569
- const le = /* @__PURE__ */ new WeakMap();
4570
- function Os({ children: a }) {
4571
- const { _gridStack: { value: e, set: t }, initialOptions: i } = ke(), s = Q(/* @__PURE__ */ new Map()), r = Q(null), n = Q(i), o = K((c, l) => {
4572
- if (l.id && l.grid) {
4573
- let d = le.get(l.grid);
4574
- d || (d = /* @__PURE__ */ new Map(), le.set(l.grid, d)), d.set(l.id, c), s.current.set(l.id, c);
4805
+ _.resizeToContentParent = ".grid-stack-item-content";
4806
+ _.Utils = u;
4807
+ _.Engine = j;
4808
+ _.GDRev = "12.3.2";
4809
+ const pe = /* @__PURE__ */ new WeakMap();
4810
+ function Bs({ children: a }) {
4811
+ const { _gridStack: { value: e, set: t }, options: i } = zt(), s = X(/* @__PURE__ */ new Map()), r = X(null), n = X(i), o = Ae((l, d) => {
4812
+ if (d.id && d.grid) {
4813
+ let f = pe.get(d.grid);
4814
+ f || (f = /* @__PURE__ */ new Map(), pe.set(d.grid, f)), f.set(d.id, l), s.current.set(d.id, l);
4815
+ }
4816
+ }, []), h = Ae(() => {
4817
+ if (r.current) {
4818
+ _.renderCB = o;
4819
+ const l = _.init(n.current, r.current);
4820
+ return l && n.current.handle && l.opts && (l.opts.handle = n.current.handle), l;
4575
4821
  }
4576
- }, []), h = K(() => r.current ? (y.renderCB = o, y.init(n.current, r.current)) : null, [o]);
4577
- return Ue(() => {
4578
- if (!Ye(i, n.current) && e)
4822
+ return null;
4823
+ }, [o]), c = (l, d) => {
4824
+ const { children: f, ...p } = l, { children: y, ...C } = d;
4825
+ return et(p, C);
4826
+ };
4827
+ return Ke(() => {
4828
+ if (!c(i, n.current) && e)
4579
4829
  try {
4580
- e.removeAll(!1), e.destroy(!1), s.current.clear(), le.delete(e), n.current = i, t(h());
4581
- } catch (c) {
4582
- console.error("Error reinitializing gridstack", c);
4830
+ e.removeAll(!1), e.destroy(!1), s.current.clear(), pe.delete(e), n.current = i, t(null);
4831
+ } catch (l) {
4832
+ console.error("Error destroying gridstack", l);
4583
4833
  }
4584
- }, [i, e, h, t]), Ue(() => {
4585
- if (!e)
4834
+ else e && (n.current = i, i.handle && e.opts && (e.opts.handle = i.handle));
4835
+ }, [i, e, t]), Ke(() => {
4836
+ if (!e && r.current)
4586
4837
  try {
4587
4838
  t(h());
4588
- } catch (c) {
4589
- console.error("Error initializing gridstack", c);
4839
+ } catch (l) {
4840
+ console.error("Error initializing gridstack", l);
4590
4841
  }
4591
- }, [e, h, t]), g(Nt.Provider, {
4592
- value: vt(() => ({
4593
- getWidgetContainer: (c) => {
4842
+ }, [e, h, t]), g(St.Provider, {
4843
+ value: ye(() => ({
4844
+ getWidgetContainer: (l) => {
4594
4845
  if (e) {
4595
- const l = le.get(e);
4596
- if (l != null && l.has(c))
4597
- return l.get(c) || null;
4846
+ const d = pe.get(e);
4847
+ if (d != null && d.has(l))
4848
+ return d.get(l) || null;
4598
4849
  }
4599
- return s.current.get(c) || null;
4850
+ return s.current.get(l) || null;
4600
4851
  }
4601
4852
  }), [e]),
4602
4853
  children: g("div", {
@@ -4605,72 +4856,76 @@ function Os({ children: a }) {
4605
4856
  })
4606
4857
  });
4607
4858
  }
4608
- const Dt = $((a, e) => {
4609
- const t = ke();
4610
- return pt(e, () => ({
4611
- addWidget: t.addWidget,
4612
- removeWidget: t.removeWidget,
4613
- addSubGrid: t.addSubGrid,
4614
- removeAll: t.removeAll
4615
- }), [t]), null;
4616
- });
4617
- Dt.displayName = "RefHandler";
4618
- const St = $(({ options: a, widgets: e, onChange: t }, i) => {
4619
- const s = vt(() => ({
4859
+ const kt = ({ options: a, widgets: e, onChange: t, className: i }) => {
4860
+ const s = ye(() => JSON.stringify(e.map((h) => {
4861
+ var c, l;
4862
+ return {
4863
+ id: h.id,
4864
+ w: h.w,
4865
+ h: h.h,
4866
+ x: h.x,
4867
+ y: h.y,
4868
+ noMove: h.noMove,
4869
+ noResize: h.noResize,
4870
+ locked: h.locked,
4871
+ content: ((c = h.content) == null ? void 0 : c.toString()) ?? "",
4872
+ _originalContent: ((l = h._originalContent) == null ? void 0 : l.toString()) ?? "",
4873
+ allowedSizes: h.allowedSizes
4874
+ };
4875
+ })), [e]), r = ye(() => ({
4620
4876
  ...a,
4621
- children: e
4622
- }), [e]), r = (o, h, c) => {
4623
- let l = c[0], d = 1 / 0;
4624
- for (const f of c) {
4625
- const p = f.w - o, m = f.h - h, v = p * p + m * m;
4626
- v < d && (d = v, l = f);
4877
+ class: i
4878
+ }), [a, s, i]), n = (h, c, l) => {
4879
+ let d = l[0], f = 1 / 0;
4880
+ for (const p of l) {
4881
+ const y = p.w - h, C = p.h - c, S = y * y + C * C;
4882
+ S < f && (f = S, d = p);
4627
4883
  }
4628
- return l;
4884
+ return d;
4629
4885
  };
4630
- return N(Cs, {
4631
- initialOptions: s,
4632
- onResizeStop: (o, h) => {
4633
- var f, p;
4634
- const c = h.gridstackNode;
4635
- if (!c) return;
4636
- const l = ((f = h.gridstackNode) == null ? void 0 : f.allowedSizes) ?? [];
4637
- if (l.length === 0)
4886
+ return g(ks, {
4887
+ options: r,
4888
+ widgets: e,
4889
+ onResizeStop: (h, c) => {
4890
+ var p, y;
4891
+ const l = c.gridstackNode;
4892
+ if (!l) return;
4893
+ const d = ((p = c.gridstackNode) == null ? void 0 : p.allowedSizes) ?? [];
4894
+ if (d.length === 0)
4638
4895
  return;
4639
- const d = r(c.w ?? 1, c.h ?? 1, l);
4640
- (c.w !== d.w || c.h !== d.h) && ((p = c.grid) == null || p.update(h, {
4641
- w: d.w,
4642
- h: d.h
4896
+ const f = n(l.w ?? 1, l.h ?? 1, d ?? []);
4897
+ (l.w !== f.w || l.h !== f.h) && ((y = l.grid) == null || y.update(c, {
4898
+ w: f.w,
4899
+ h: f.h
4643
4900
  }));
4644
4901
  },
4645
4902
  onChange: t,
4646
- children: [g(Dt, {
4647
- ref: i
4648
- }), g(Os, {
4649
- children: g(zs, {})
4650
- })]
4903
+ children: g(Bs, {
4904
+ children: g(Ts, {})
4905
+ })
4651
4906
  });
4652
- });
4653
- St.displayName = "F0GridStack";
4654
- const cr = lt(
4907
+ };
4908
+ kt.displayName = "F0GridStack";
4909
+ const vr = ft(
4655
4910
  "F0GridStack",
4656
- St
4657
- ), As = ({ benefits: a }) => g("div", {
4911
+ kt
4912
+ ), Fs = ({ benefits: a }) => g("div", {
4658
4913
  className: "flex flex-col gap-2",
4659
- children: a.map((e, t) => g(Ts, {
4914
+ children: a.map((e, t) => g(Is, {
4660
4915
  text: e
4661
4916
  }, t))
4662
- }), Ts = ({ text: a }) => N("div", {
4917
+ }), Is = ({ text: a }) => O("div", {
4663
4918
  className: "flex flex-row items-start gap-2",
4664
- children: [g(xi, {
4665
- icon: wi,
4919
+ children: [g(Ei, {
4920
+ icon: Ci,
4666
4921
  size: "md",
4667
4922
  className: "text-f1-icon-positive"
4668
4923
  }), g("span", {
4669
4924
  children: a
4670
4925
  })]
4671
- }), Pt = $(({ title: a, image: e, benefits: t, actions: i, withShadow: s = !0, module: r, moduleName: n, tag: o, promoTag: h }, c) => N("div", {
4926
+ }), Ot = ee(({ title: a, image: e, benefits: t, actions: i, withShadow: s = !0, module: r, moduleName: n, tag: o, promoTag: h }, c) => O("div", {
4672
4927
  ref: c,
4673
- className: B("bg-white flex flex-row rounded-xl border border-f1-border-secondary", s && "shadow-md"),
4928
+ className: G("bg-white flex flex-row rounded-xl border border-f1-border-secondary", s && "shadow-md"),
4674
4929
  children: [g("div", {
4675
4930
  className: "aspect-auto flex-shrink-0 overflow-hidden rounded-xl py-1 pl-1",
4676
4931
  children: g("img", {
@@ -4678,26 +4933,26 @@ const cr = lt(
4678
4933
  alt: "",
4679
4934
  className: "h-full w-full rounded-lg object-cover"
4680
4935
  })
4681
- }), N("div", {
4936
+ }), O("div", {
4682
4937
  className: "flex flex-col justify-center gap-8 px-8 py-5",
4683
- children: [N("div", {
4938
+ children: [O("div", {
4684
4939
  className: "flex flex-col gap-5",
4685
- children: [N("div", {
4940
+ children: [O("div", {
4686
4941
  className: "flex flex-col gap-2",
4687
- children: [N("div", {
4942
+ children: [O("div", {
4688
4943
  className: "flex flex-row items-center gap-2",
4689
- children: [r && g(ct, {
4944
+ children: [r && g(gt, {
4690
4945
  module: r
4691
4946
  }), n && g("p", {
4692
4947
  className: "text-base font-medium text-f1-foreground",
4693
4948
  children: n
4694
4949
  })]
4695
- }), (o || h) && N("div", {
4950
+ }), (o || h) && O("div", {
4696
4951
  className: "flex justify-start gap-2",
4697
- children: [o && g(bi, {
4952
+ children: [o && g(xi, {
4698
4953
  icon: o.icon,
4699
4954
  text: o.label
4700
- }), h && g(_i, {
4955
+ }), h && g(wi, {
4701
4956
  variant: h.variant || "positive",
4702
4957
  text: h.label
4703
4958
  })]
@@ -4705,7 +4960,7 @@ const cr = lt(
4705
4960
  className: "font-bold text-xl text-f1-foreground",
4706
4961
  children: a
4707
4962
  })]
4708
- }), g(As, {
4963
+ }), g(Fs, {
4709
4964
  benefits: t
4710
4965
  })]
4711
4966
  }), i && g("div", {
@@ -4714,38 +4969,38 @@ const cr = lt(
4714
4969
  })]
4715
4970
  })]
4716
4971
  }));
4717
- Pt.displayName = "ProductBlankslate";
4718
- function Ls({ isOpen: a, onClose: e, title: t, children: i, module: s, portalContainer: r }) {
4719
- const [n, o] = L(a);
4720
- return ce(() => {
4972
+ Ot.displayName = "ProductBlankslate";
4973
+ function Ws({ isOpen: a, onClose: e, title: t, children: i, module: s, portalContainer: r }) {
4974
+ const [n, o] = B(a);
4975
+ return V(() => {
4721
4976
  o(a);
4722
- }, [a]), g(Ei, {
4977
+ }, [a]), g(Ri, {
4723
4978
  open: n,
4724
4979
  onOpenChange: (c) => {
4725
4980
  o(c), c || e();
4726
4981
  },
4727
4982
  modal: !0,
4728
- children: N(Ci, {
4983
+ children: O(Ni, {
4729
4984
  className: "max-h-[620px] w-[760px] overflow-y-auto overflow-x-hidden bg-f1-background",
4730
4985
  container: r,
4731
- children: [N("div", {
4986
+ children: [O("div", {
4732
4987
  className: "flex flex-row items-center justify-between px-4 py-4",
4733
- children: [N(Ri, {
4988
+ children: [O(zi, {
4734
4989
  className: "flex flex-row items-center gap-2 text-lg font-semibold text-f1-foreground",
4735
- children: [s && g(ct, {
4990
+ children: [s && g(gt, {
4736
4991
  module: s,
4737
4992
  size: "lg"
4738
4993
  }), t]
4739
- }), g(Ni, {
4994
+ }), g(Si, {
4740
4995
  variant: "outline",
4741
- icon: ut,
4996
+ icon: pt,
4742
4997
  onClick: e,
4743
4998
  label: "Close modal",
4744
4999
  hideLabel: !0
4745
5000
  })]
4746
- }), N(ot, {
5001
+ }), O(ct, {
4747
5002
  className: "[*[data-state=visible]_div]:bg-f1-background flex max-h-[512px] flex-col",
4748
- children: [i, g(at, {
5003
+ children: [i, g(ut, {
4749
5004
  orientation: "vertical",
4750
5005
  className: "[&_div]:bg-f1-background"
4751
5006
  })]
@@ -4753,47 +5008,47 @@ function Ls({ isOpen: a, onClose: e, title: t, children: i, module: s, portalCon
4753
5008
  })
4754
5009
  });
4755
5010
  }
4756
- function ur({ isOpen: a, onClose: e, title: t, image: i, benefits: s, errorMessage: r, successMessage: n, loadingState: o, nextSteps: h, closeLabel: c, primaryAction: l, modalTitle: d, modalModule: f, secondaryAction: p, portalContainer: m, tag: v, promoTag: b, showResponseDialog: w = !0 }) {
4757
- const [C, E] = L(a), [D, R] = L(null), [k, O] = L(!1), G = async () => {
5011
+ function yr({ isOpen: a, onClose: e, title: t, image: i, benefits: s, errorMessage: r, successMessage: n, loadingState: o, nextSteps: h, closeLabel: c, primaryAction: l, modalTitle: d, modalModule: f, secondaryAction: p, portalContainer: y, tag: C, promoTag: S, showResponseDialog: D = !0 }) {
5012
+ const [R, w] = B(a), [E, v] = B(null), [k, P] = B(!1), A = async () => {
4758
5013
  if (l != null && l.onClick) {
4759
- O(!0);
5014
+ P(!0);
4760
5015
  try {
4761
- await l.onClick(), E(!1), w && R("success");
5016
+ await l.onClick(), w(!1), D && v("success");
4762
5017
  } catch {
4763
- w && R("error");
5018
+ D && v("error");
4764
5019
  } finally {
4765
- O(!1);
5020
+ P(!1);
4766
5021
  }
4767
5022
  }
4768
- }, M = () => {
4769
- E(!1), e == null || e();
4770
- }, W = k;
4771
- return N(be, {
4772
- children: [g(Ls, {
4773
- isOpen: C,
4774
- onClose: M,
5023
+ }, z = () => {
5024
+ w(!1), e == null || e();
5025
+ }, x = k;
5026
+ return O(Ne, {
5027
+ children: [g(Ws, {
5028
+ isOpen: R,
5029
+ onClose: z,
4775
5030
  title: d,
4776
5031
  module: f,
4777
- portalContainer: m,
5032
+ portalContainer: y,
4778
5033
  children: g("div", {
4779
5034
  className: "pb-4 pl-4",
4780
- children: g(Pt, {
5035
+ children: g(Ot, {
4781
5036
  title: t,
4782
5037
  image: i,
4783
5038
  benefits: s,
4784
5039
  withShadow: !1,
4785
- tag: v,
4786
- promoTag: b,
4787
- actions: N("div", {
5040
+ tag: C,
5041
+ promoTag: S,
5042
+ actions: O("div", {
4788
5043
  className: "flex gap-3",
4789
- children: [l && g(q, {
5044
+ children: [l && g(se, {
4790
5045
  variant: l.variant,
4791
- label: W ? o.label : l.label,
5046
+ label: x ? o.label : l.label,
4792
5047
  icon: l.icon || void 0,
4793
- onClick: G,
5048
+ onClick: A,
4794
5049
  loading: l.loading,
4795
5050
  size: l.size
4796
- }), p && g(q, {
5051
+ }), p && g(se, {
4797
5052
  onClick: p.onClick,
4798
5053
  label: p.label,
4799
5054
  variant: p.variant,
@@ -4803,46 +5058,46 @@ function ur({ isOpen: a, onClose: e, title: t, image: i, benefits: s, errorMessa
4803
5058
  })
4804
5059
  })
4805
5060
  })
4806
- }), D && w && g(ft, {
5061
+ }), E && D && g(mt, {
4807
5062
  open: !0,
4808
5063
  onClose: () => {
4809
- M(), R(null);
5064
+ z(), v(null);
4810
5065
  },
4811
- success: D === "success",
5066
+ success: E === "success",
4812
5067
  errorMessage: r,
4813
5068
  successMessage: n,
4814
5069
  nextSteps: h,
4815
5070
  closeLabel: c,
4816
- portalContainer: m
5071
+ portalContainer: y
4817
5072
  })]
4818
5073
  });
4819
5074
  }
4820
- function Ms({ mediaUrl: a, title: e, description: t, onClose: i, dismissible: s, width: r, trackVisibility: n, actions: o, showConfirmation: h = !0 }) {
4821
- const [c, l] = L(!1), d = () => {
5075
+ function Gs({ mediaUrl: a, title: e, description: t, onClose: i, dismissible: s, width: r, trackVisibility: n, actions: o, showConfirmation: h = !0 }) {
5076
+ const [c, l] = B(!1), d = () => {
4822
5077
  l(!0), i && i();
4823
5078
  };
4824
- ce(() => {
5079
+ V(() => {
4825
5080
  n && n(!c);
4826
5081
  }, [n, c]);
4827
5082
  const f = a == null ? void 0 : a.includes(".mp4");
4828
- return g(be, {
4829
- children: c ? null : N(zi, {
5083
+ return g(Ne, {
5084
+ children: c ? null : O(Di, {
4830
5085
  style: {
4831
5086
  width: r
4832
5087
  },
4833
5088
  className: "relative bg-f1-background p-1",
4834
- children: [N(Di, {
5089
+ children: [O(ki, {
4835
5090
  children: [s && g("div", {
4836
5091
  className: "absolute right-2 top-2 z-10",
4837
- children: g(q, {
5092
+ children: g(se, {
4838
5093
  variant: "ghost",
4839
- icon: ut,
5094
+ icon: pt,
4840
5095
  size: "sm",
4841
5096
  hideLabel: !0,
4842
5097
  onClick: d,
4843
5098
  label: "Close"
4844
5099
  })
4845
- }), N("div", {
5100
+ }), O("div", {
4846
5101
  children: [g("div", {
4847
5102
  children: a && (f ? g("video", {
4848
5103
  src: a,
@@ -4856,20 +5111,20 @@ function Ms({ mediaUrl: a, title: e, description: t, onClose: i, dismissible: s,
4856
5111
  alt: e,
4857
5112
  className: "h-full w-full rounded-md"
4858
5113
  }))
4859
- }), N("div", {
5114
+ }), O("div", {
4860
5115
  className: "flex flex-col gap-[2px] p-3",
4861
- children: [g(Ie, {
5116
+ children: [g($e, {
4862
5117
  className: "text-lg font-medium",
4863
5118
  children: e
4864
- }), g(Ie, {
5119
+ }), g($e, {
4865
5120
  className: "line-clamp-3 text-base font-normal text-f1-foreground-secondary",
4866
5121
  children: t
4867
5122
  })]
4868
5123
  })]
4869
5124
  })]
4870
- }), o && g(Si, {
5125
+ }), o && g(Oi, {
4871
5126
  className: "p-3",
4872
- children: o.map((p) => p.type === "upsell" ? g(gt, {
5127
+ children: o.map((p) => p.type === "upsell" ? g(vt, {
4873
5128
  label: p.label,
4874
5129
  onRequest: p.onClick,
4875
5130
  errorMessage: p.errorMessage,
@@ -4879,7 +5134,7 @@ function Ms({ mediaUrl: a, title: e, description: t, onClose: i, dismissible: s,
4879
5134
  closeLabel: p.closeLabel,
4880
5135
  showConfirmation: h && p.showConfirmation,
4881
5136
  variant: p.variant
4882
- }, p.label) : g(q, {
5137
+ }, p.label) : g(se, {
4883
5138
  label: p.label,
4884
5139
  onClick: p.onClick,
4885
5140
  variant: p.variant
@@ -4888,8 +5143,8 @@ function Ms({ mediaUrl: a, title: e, description: t, onClose: i, dismissible: s,
4888
5143
  })
4889
5144
  });
4890
5145
  }
4891
- const Hs = $(function({ primaryAction: e, secondaryAction: t, ...i }, s) {
4892
- const r = (h) => h.variant === "promote" ? g(gt, {
5146
+ const Us = ee(function({ primaryAction: e, secondaryAction: t, ...i }, s) {
5147
+ const r = (h) => h.variant === "promote" ? g(vt, {
4893
5148
  label: h.label,
4894
5149
  onRequest: async () => {
4895
5150
  await h.onClick();
@@ -4902,14 +5157,14 @@ const Hs = $(function({ primaryAction: e, secondaryAction: t, ...i }, s) {
4902
5157
  showIcon: h.showIcon,
4903
5158
  showConfirmation: h.showConfirmation,
4904
5159
  variant: h.variant
4905
- }) : g(q, {
5160
+ }) : g(se, {
4906
5161
  onClick: h.onClick,
4907
5162
  label: h.label,
4908
5163
  variant: h.variant || "default",
4909
5164
  size: "md",
4910
5165
  icon: h.icon
4911
5166
  }), n = (e == null ? void 0 : e.variant) !== "promote" ? e : void 0, o = (t == null ? void 0 : t.variant) !== "promote" ? t : void 0;
4912
- return N(Pi, {
5167
+ return O(Pi, {
4913
5168
  ref: s,
4914
5169
  ...i,
4915
5170
  primaryAction: n,
@@ -4917,44 +5172,44 @@ const Hs = $(function({ primaryAction: e, secondaryAction: t, ...i }, s) {
4917
5172
  children: [(e == null ? void 0 : e.variant) === "promote" && r(e), (t == null ? void 0 : t.variant) === "promote" && r(t)]
4918
5173
  });
4919
5174
  });
4920
- Hs.displayName = "UpsellingBanner";
4921
- function fr({ isOpen: a, setIsOpen: e, label: t, variant: i = "promote", size: s = "md", showIcon: r = !0, side: n = "right", align: o = "center", icon: h = ki, mediaUrl: c, title: l, description: d, width: f = "300px", trackVisibility: p, actions: m, onClick: v, hideLabel: b = !1 }) {
4922
- const [w, C] = L(!1), [E, D] = L(null), [R, k] = L(null), O = (z) => {
4923
- e(z), v && v();
4924
- }, G = async (z) => {
4925
- if (z.type === "upsell") {
4926
- k(z);
5175
+ Us.displayName = "UpsellingBanner";
5176
+ function br({ isOpen: a, setIsOpen: e, label: t, variant: i = "promote", size: s = "md", showIcon: r = !0, side: n = "right", align: o = "center", icon: h = Ti, mediaUrl: c, title: l, description: d, width: f = "300px", trackVisibility: p, actions: y, onClick: C, hideLabel: S = !1 }) {
5177
+ const [D, R] = B(!1), [w, E] = B(null), [v, k] = B(null), P = (b) => {
5178
+ e(b), C && C();
5179
+ }, A = async (b) => {
5180
+ if (b.type === "upsell") {
5181
+ k(b);
4927
5182
  try {
4928
- await z.onClick(), z.showConfirmation && (C(!0), D("success"));
5183
+ await b.onClick(), b.showConfirmation && (R(!0), E("success"));
4929
5184
  } catch {
4930
- C(!0), D("error");
5185
+ R(!0), E("error");
4931
5186
  }
4932
5187
  }
4933
- }, M = () => {
4934
- D(null), C(!1), k(null), e(!1);
4935
- }, W = a && !w, x = m == null ? void 0 : m.map((z) => z.type === "upsell" ? {
4936
- ...z,
4937
- onClick: () => G(z)
4938
- } : z);
4939
- return N(be, {
4940
- children: [N(st, {
4941
- open: W,
4942
- onOpenChange: O,
4943
- children: [g(rt, {
5188
+ }, z = () => {
5189
+ E(null), R(!1), k(null), e(!1);
5190
+ }, x = a && !D, m = y == null ? void 0 : y.map((b) => b.type === "upsell" ? {
5191
+ ...b,
5192
+ onClick: () => A(b)
5193
+ } : b);
5194
+ return O(Ne, {
5195
+ children: [O(lt, {
5196
+ open: x,
5197
+ onOpenChange: P,
5198
+ children: [g(ht, {
4944
5199
  asChild: !0,
4945
- children: g(q, {
5200
+ children: g(se, {
4946
5201
  variant: i,
4947
5202
  label: t,
4948
5203
  size: s,
4949
5204
  icon: r ? h : void 0,
4950
5205
  onClick: () => e(a),
4951
- hideLabel: b
5206
+ hideLabel: S
4952
5207
  })
4953
- }), g(nt, {
5208
+ }), g(dt, {
4954
5209
  side: n,
4955
5210
  align: o,
4956
5211
  className: "w-fit border-none bg-transparent p-2 shadow-none",
4957
- children: g(Ms, {
5212
+ children: g(Gs, {
4958
5213
  mediaUrl: c,
4959
5214
  title: l,
4960
5215
  description: d,
@@ -4962,60 +5217,60 @@ function fr({ isOpen: a, setIsOpen: e, label: t, variant: i = "promote", size: s
4962
5217
  dismissible: !1,
4963
5218
  width: f,
4964
5219
  trackVisibility: p,
4965
- actions: x,
5220
+ actions: m,
4966
5221
  showConfirmation: !1
4967
5222
  })
4968
5223
  })]
4969
- }), (R == null ? void 0 : R.type) === "upsell" && R.showConfirmation && E && g(ft, {
5224
+ }), (v == null ? void 0 : v.type) === "upsell" && v.showConfirmation && w && g(mt, {
4970
5225
  open: !0,
4971
- onClose: M,
4972
- success: E === "success",
4973
- errorMessage: R.errorMessage,
4974
- successMessage: R.successMessage,
4975
- nextSteps: R.nextSteps,
4976
- closeLabel: R.closeLabel,
5226
+ onClose: z,
5227
+ success: w === "success",
5228
+ errorMessage: v.errorMessage,
5229
+ successMessage: v.successMessage,
5230
+ nextSteps: v.nextSteps,
5231
+ closeLabel: v.closeLabel,
4977
5232
  portalContainer: null
4978
5233
  })]
4979
5234
  });
4980
5235
  }
4981
- const Bs = _e(null), Fs = ({ children: a, fullScreen: e = !0 }) => {
4982
- const t = Q(null), [i, s] = L(t.current);
4983
- return Ii(() => {
5236
+ const $s = ze(null), js = ({ children: a, fullScreen: e = !0 }) => {
5237
+ const t = X(null), [i, s] = B(t.current);
5238
+ return Ui(() => {
4984
5239
  s(t.current);
4985
- }, []), g(Bs.Provider, {
5240
+ }, []), g($s.Provider, {
4986
5241
  value: {
4987
5242
  element: i
4988
5243
  },
4989
5244
  children: g("div", {
4990
5245
  ref: t,
4991
5246
  id: "f0-layout",
4992
- className: B({
5247
+ className: G({
4993
5248
  "flex h-screen w-screen flex-col bg-[#F5F6F8] dark:bg-[#0D1625]": e
4994
5249
  }),
4995
5250
  children: a
4996
5251
  })
4997
5252
  });
4998
- }, Ws = ({ children: a }) => g(Wi, {
5253
+ }, Ks = ({ children: a }) => g(Gi, {
4999
5254
  reducedMotion: "user",
5000
5255
  children: a
5001
- }), gr = ({ children: a, layout: e, link: t, privacyModeInitiallyEnabled: i, image: s, i18n: r, l10n: n, isDev: o = !1, dataCollectionStorageHandler: h, showExperimentalWarnings: c = !1 }) => g(Ws, {
5002
- children: g(Oi, {
5256
+ }), _r = ({ children: a, layout: e, link: t, privacyModeInitiallyEnabled: i, image: s, i18n: r, l10n: n, isDev: o = !1, dataCollectionStorageHandler: h, showExperimentalWarnings: c = !1 }) => g(Ks, {
5257
+ children: g(Ai, {
5003
5258
  isDev: o,
5004
5259
  showExperimentalWarnings: c,
5005
- children: g(Ai, {
5260
+ children: g(Li, {
5006
5261
  ...n,
5007
- children: g(Ti, {
5262
+ children: g(Mi, {
5008
5263
  ...r,
5009
- children: g(Li, {
5264
+ children: g(Hi, {
5010
5265
  ...t,
5011
- children: g(Fs, {
5266
+ children: g(js, {
5012
5267
  ...e,
5013
- children: g(Mi, {
5014
- children: g(Hi, {
5268
+ children: g(Bi, {
5269
+ children: g(Fi, {
5015
5270
  initiallyEnabled: i,
5016
- children: g(Bi, {
5271
+ children: g(Ii, {
5017
5272
  ...s,
5018
- children: g(Fi, {
5273
+ children: g(Wi, {
5019
5274
  handler: h,
5020
5275
  children: a
5021
5276
  })
@@ -5027,108 +5282,108 @@ const Bs = _e(null), Fs = ({ children: a, fullScreen: e = !0 }) => {
5027
5282
  })
5028
5283
  })
5029
5284
  })
5030
- }), qe = (a) => `datacollection-${a}`, pr = {
5285
+ }), Je = (a) => `datacollection-${a}`, xr = {
5031
5286
  get: async (a) => JSON.parse(
5032
- localStorage.getItem(qe(a)) ?? "{}"
5287
+ localStorage.getItem(Je(a)) ?? "{}"
5033
5288
  ),
5034
5289
  set: async (a, e) => {
5035
- localStorage.setItem(qe(a), JSON.stringify(e));
5290
+ localStorage.setItem(Je(a), JSON.stringify(e));
5036
5291
  }
5037
5292
  };
5038
5293
  export {
5039
- Ks as AreaChart,
5040
- yr as Await,
5041
- Vs as BarChart,
5042
- qs as CategoryBarChart,
5043
- Qs as ComboChart,
5044
- br as DndProvider,
5045
- _r as EmojiImage,
5046
- xr as F0Avatar,
5047
- wr as F0AvatarAlert,
5048
- Er as F0AvatarCompany,
5049
- Cr as F0AvatarDate,
5050
- Rr as F0AvatarEmoji,
5051
- Nr as F0AvatarFile,
5052
- zr as F0AvatarIcon,
5053
- Dr as F0AvatarList,
5054
- ct as F0AvatarModule,
5055
- Sr as F0AvatarPerson,
5056
- Pr as F0AvatarTeam,
5057
- q as F0Button,
5058
- kr as F0ButtonDropdown,
5059
- Or as F0ButtonToggle,
5060
- Ar as F0Card,
5061
- Tr as F0Checkbox,
5062
- or as F0ChipList,
5063
- Lr as F0DatePicker,
5064
- Mr as F0EventCatcherProvider,
5065
- cr as F0GridStack,
5066
- vs as F0Heading,
5067
- xi as F0Icon,
5068
- Hr as F0Link,
5069
- gr as F0Provider,
5070
- Br as F0Select,
5071
- Fr as F0TagAlert,
5072
- Wr as F0TagBalance,
5073
- Ir as F0TagCompany,
5074
- Gr as F0TagDot,
5075
- Ur as F0TagList,
5076
- $r as F0TagPerson,
5077
- bi as F0TagRaw,
5078
- _i as F0TagStatus,
5079
- jr as F0TagTeam,
5080
- ys as F0Text,
5081
- Kr as GROUP_ID_SYMBOL,
5082
- dr as HomeLayout,
5083
- Ys as LineChart,
5084
- Vr as OneFilterPicker,
5085
- Xs as PieChart,
5086
- Hi as PrivacyModeProvider,
5087
- Pt as ProductBlankslate,
5088
- qr as ProductCard,
5089
- ur as ProductModal,
5090
- Ms as ProductWidget,
5091
- Zs as ProgressBarChart,
5092
- lr as StandardLayout,
5093
- Yr as TagCounter,
5094
- hr as TwoColumnLayout,
5095
- ft as UpsellRequestResponseDialog,
5096
- Hs as UpsellingBanner,
5097
- gt as UpsellingButton,
5098
- fr as UpsellingPopover,
5099
- Js as VerticalBarChart,
5100
- js as avatarVariants,
5101
- Xr as buildTranslations,
5102
- sr as buttonDropdownSizes,
5103
- ir as buttonDropdownVariants,
5104
- tr as buttonSizes,
5105
- rr as buttonToggleSizes,
5106
- er as buttonVariants,
5107
- Jr as createAtlaskitDriver,
5108
- Zr as createDataSourceDefinition,
5109
- pr as dataCollectionLocalStorageHandler,
5110
- ar as datepickerSizes,
5111
- xn as defaultTranslations,
5112
- lt as experimental,
5113
- Qr as getAnimationVariants,
5114
- en as getDataSourcePaginationType,
5115
- tn as getEmojiLabel,
5116
- sn as isInfiniteScrollPagination,
5117
- rn as isPageBasedPagination,
5118
- nr as linkVariants,
5119
- nn as modules,
5120
- on as predefinedPresets,
5121
- an as selectSizes,
5122
- ln as tagDotColors,
5123
- hn as useData,
5124
- dn as useDataSource,
5125
- cn as useDndEvents,
5126
- un as useDraggable,
5127
- fn as useDroppableList,
5128
- gn as useEmojiConfetti,
5129
- pn as useGroups,
5130
- mn as usePrivacyMode,
5131
- vn as useReducedMotion,
5132
- yn as useSelectable,
5133
- bn as useXRay
5294
+ tr as AreaChart,
5295
+ Cr as Await,
5296
+ ir as BarChart,
5297
+ sr as CategoryBarChart,
5298
+ lr as ComboChart,
5299
+ Rr as DndProvider,
5300
+ Nr as EmojiImage,
5301
+ zr as F0Avatar,
5302
+ Sr as F0AvatarAlert,
5303
+ Dr as F0AvatarCompany,
5304
+ kr as F0AvatarDate,
5305
+ Or as F0AvatarEmoji,
5306
+ Pr as F0AvatarFile,
5307
+ Tr as F0AvatarIcon,
5308
+ Ar as F0AvatarList,
5309
+ gt as F0AvatarModule,
5310
+ Lr as F0AvatarPerson,
5311
+ Mr as F0AvatarTeam,
5312
+ se as F0Button,
5313
+ Hr as F0ButtonDropdown,
5314
+ Br as F0ButtonToggle,
5315
+ Fr as F0Card,
5316
+ Ir as F0Checkbox,
5317
+ pr as F0ChipList,
5318
+ Wr as F0DatePicker,
5319
+ Gr as F0EventCatcherProvider,
5320
+ vr as F0GridStack,
5321
+ Rs as F0Heading,
5322
+ Ei as F0Icon,
5323
+ Ur as F0Link,
5324
+ _r as F0Provider,
5325
+ $r as F0Select,
5326
+ jr as F0TagAlert,
5327
+ Kr as F0TagBalance,
5328
+ qr as F0TagCompany,
5329
+ Vr as F0TagDot,
5330
+ Yr as F0TagList,
5331
+ Xr as F0TagPerson,
5332
+ xi as F0TagRaw,
5333
+ wi as F0TagStatus,
5334
+ Jr as F0TagTeam,
5335
+ Ns as F0Text,
5336
+ Zr as GROUP_ID_SYMBOL,
5337
+ Qs as HomeLayout,
5338
+ rr as LineChart,
5339
+ Qr as OneFilterPicker,
5340
+ nr as PieChart,
5341
+ Fi as PrivacyModeProvider,
5342
+ Ot as ProductBlankslate,
5343
+ en as ProductCard,
5344
+ yr as ProductModal,
5345
+ Gs as ProductWidget,
5346
+ ar as ProgressBarChart,
5347
+ Js as StandardLayout,
5348
+ tn as TagCounter,
5349
+ Zs as TwoColumnLayout,
5350
+ mt as UpsellRequestResponseDialog,
5351
+ Us as UpsellingBanner,
5352
+ vt as UpsellingButton,
5353
+ br as UpsellingPopover,
5354
+ or as VerticalBarChart,
5355
+ er as avatarVariants,
5356
+ sn as buildTranslations,
5357
+ ur as buttonDropdownSizes,
5358
+ cr as buttonDropdownVariants,
5359
+ dr as buttonSizes,
5360
+ fr as buttonToggleSizes,
5361
+ hr as buttonVariants,
5362
+ rn as createAtlaskitDriver,
5363
+ nn as createDataSourceDefinition,
5364
+ xr as dataCollectionLocalStorageHandler,
5365
+ mr as datepickerSizes,
5366
+ zn as defaultTranslations,
5367
+ ft as experimental,
5368
+ on as getAnimationVariants,
5369
+ an as getDataSourcePaginationType,
5370
+ ln as getEmojiLabel,
5371
+ hn as isInfiniteScrollPagination,
5372
+ dn as isPageBasedPagination,
5373
+ gr as linkVariants,
5374
+ cn as modules,
5375
+ un as predefinedPresets,
5376
+ fn as selectSizes,
5377
+ gn as tagDotColors,
5378
+ pn as useData,
5379
+ mn as useDataSource,
5380
+ vn as useDndEvents,
5381
+ yn as useDraggable,
5382
+ bn as useDroppableList,
5383
+ _n as useEmojiConfetti,
5384
+ xn as useGroups,
5385
+ wn as usePrivacyMode,
5386
+ En as useReducedMotion,
5387
+ Cn as useSelectable,
5388
+ Rn as useXRay
5134
5389
  };