@kong-ui-public/dashboard-renderer 6.1.5 → 6.2.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.
@@ -1,11 +1,11 @@
1
1
  var Bt = Object.defineProperty;
2
- var it = (u) => {
2
+ var st = (u) => {
3
3
  throw TypeError(u);
4
4
  };
5
5
  var $t = (u, e, t) => e in u ? Bt(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
6
- var st = (u, e, t) => $t(u, typeof e != "symbol" ? e + "" : e, t), Be = (u, e, t) => e.has(u) || it("Cannot " + t);
7
- var _ = (u, e, t) => (Be(u, e, "read from private field"), t ? t.call(u) : e.get(u)), M = (u, e, t) => e.has(u) ? it("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(u) : e.set(u, t), H = (u, e, t, i) => (Be(u, e, "write to private field"), i ? i.call(u, t) : e.set(u, t), t), P = (u, e, t) => (Be(u, e, "access private method"), t);
8
- var ye = (u, e, t, i) => ({
6
+ var rt = (u, e, t) => $t(u, typeof e != "symbol" ? e + "" : e, t), Ge = (u, e, t) => e.has(u) || st("Cannot " + t);
7
+ var _ = (u, e, t) => (Ge(u, e, "read from private field"), t ? t.call(u) : e.get(u)), M = (u, e, t) => e.has(u) ? st("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(u) : e.set(u, t), H = (u, e, t, i) => (Ge(u, e, "write to private field"), i ? i.call(u, t) : e.set(u, t), t), P = (u, e, t) => (Ge(u, e, "access private method"), t);
8
+ var _e = (u, e, t, i) => ({
9
9
  set _(s) {
10
10
  H(u, e, s, t);
11
11
  },
@@ -13,27 +13,27 @@ var ye = (u, e, t, i) => ({
13
13
  return _(u, e, i);
14
14
  }
15
15
  });
16
- import { ref as U, watchEffect as vt, inject as pe, provide as Gt, defineComponent as K, onUnmounted as Fe, computed as A, watch as We, resolveComponent as oe, createBlock as O, renderSlot as Le, createCommentVNode as Y, unref as D, openBlock as R, withCtx as I, createTextVNode as Me, toDisplayString as J, useCssVars as Ve, createElementVNode as re, normalizeClass as Ke, createVNode as ie, mergeProps as _t, createSlots as Ye, createElementBlock as F, normalizeProps as Ut, guardReactiveProps as Ft, defineAsyncComponent as Wt, onMounted as Xe, nextTick as wt, resolveDynamicComponent as bt, Fragment as Et, renderList as xt, normalizeStyle as rt, mergeModels as nt, useModel as Vt } from "vue";
17
- import { stripUnknownFilters as Kt, Timeframe as Yt, TimePeriods as Ct, TIMEFRAME_LOOKUP as Xt, formatTime as ot, msToGranularity as $e } from "@kong-ui-public/analytics-utilities";
18
- import { SimpleChart as jt, AnalyticsChart as Qt, TopNTable as Zt, CsvExportModal as Jt } from "@kong-ui-public/analytics-chart";
19
- import ei from "swrv";
16
+ import { ref as U, watchEffect as _t, inject as ye, provide as Gt, defineComponent as K, onUnmounted as Ve, computed as A, watch as Ke, resolveComponent as ae, createBlock as O, renderSlot as Ie, createCommentVNode as Y, unref as D, openBlock as R, withCtx as I, createTextVNode as Pe, toDisplayString as J, useCssVars as Ye, createElementVNode as ne, normalizeClass as Xe, createVNode as ie, mergeProps as wt, createSlots as je, createElementBlock as F, normalizeProps as Ut, guardReactiveProps as Ft, defineAsyncComponent as Wt, onMounted as Qe, nextTick as bt, resolveDynamicComponent as Et, Fragment as xt, renderList as Ct, normalizeStyle as nt, mergeModels as ot, useModel as Vt, getCurrentInstance as Kt } from "vue";
17
+ import { stripUnknownFilters as Yt, Timeframe as Xt, TimePeriods as Rt, TIMEFRAME_LOOKUP as jt, formatTime as at, msToGranularity as Ue } from "@kong-ui-public/analytics-utilities";
18
+ import { SimpleChart as Qt, AnalyticsChart as Zt, TopNTable as Jt, CsvExportModal as ei } from "@kong-ui-public/analytics-chart";
19
+ import ti from "swrv";
20
20
  import "axios";
21
- import { createI18n as ti, i18nTComponent as ii } from "@kong-ui-public/i18n";
22
- import { useAnalyticsConfigStore as Rt } from "@kong-ui-public/analytics-config-store";
23
- import { MetricsProvider as si, MetricsConsumer as ri } from "@kong-ui-public/analytics-metric-provider";
24
- import { WarningIcon as ni, EditIcon as oi, MoreIcon as ai } from "@kong/icons";
25
- var Tt = /* @__PURE__ */ ((u) => (u.VALIDATING = "VALIDATING", u.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", u.PENDING = "PENDING", u.SUCCESS = "SUCCESS", u.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", u.ERROR = "ERROR", u.STALE_IF_ERROR = "STALE_IF_ERROR", u))(Tt || {});
26
- const li = (u) => {
21
+ import { createI18n as ii, i18nTComponent as si } from "@kong-ui-public/i18n";
22
+ import { useAnalyticsConfigStore as Tt } from "@kong-ui-public/analytics-config-store";
23
+ import { MetricsProvider as ri, MetricsConsumer as ni } from "@kong-ui-public/analytics-metric-provider";
24
+ import { WarningIcon as oi, EditIcon as ai, MoreIcon as li } from "@kong/icons";
25
+ var zt = /* @__PURE__ */ ((u) => (u.VALIDATING = "VALIDATING", u.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", u.PENDING = "PENDING", u.SUCCESS = "SUCCESS", u.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", u.ERROR = "ERROR", u.STALE_IF_ERROR = "STALE_IF_ERROR", u))(zt || {});
26
+ const hi = (u) => {
27
27
  var e, t, i, s, r;
28
28
  return u ? !!// TODO: revisit: currently only the first check ever matters?
29
29
  ((e = Object.keys(u)) != null && e.length || (t = u.data) != null && t.length || (s = (i = u.data) == null ? void 0 : i.data) != null && s.length || !((r = u.data) != null && r.data) && typeof u.data == "object" && Object.keys(u == null ? void 0 : u.data).length) : !1;
30
30
  };
31
- function hi(u = U({}), e, t, i = li) {
31
+ function di(u = U({}), e, t, i = hi) {
32
32
  const s = U(
33
33
  "PENDING"
34
34
  /* PENDING */
35
35
  );
36
- return vt(() => {
36
+ return _t(() => {
37
37
  const r = i(u.value);
38
38
  if (u.value && r && t.value) {
39
39
  s.value = "VALIDATING_HAS_DATA";
@@ -62,10 +62,10 @@ function hi(u = U({}), e, t, i = li) {
62
62
  u.value === void 0 && e && (s.value = "ERROR");
63
63
  }), {
64
64
  state: s,
65
- swrvState: Tt
65
+ swrvState: zt
66
66
  };
67
67
  }
68
- const di = {
68
+ const ui = {
69
69
  noQueryBridge: "No query bridge provided. Unable to render dashboard.",
70
70
  trendRange: {
71
71
  "24h": "Last 24-hour summary",
@@ -76,14 +76,14 @@ const di = {
76
76
  duplicateTile: "Duplicate",
77
77
  remove: "Remove",
78
78
  delete: "Delete"
79
- }, ui = {
79
+ }, ci = {
80
80
  forbidden: "You do not have permission to query this data.",
81
81
  timeRangeExceeded: "The time range for this report is outside of your organization's data retention period",
82
82
  timeout: "Query timed out. Consider querying a shorter time range."
83
- }, ci = {
83
+ }, fi = {
84
84
  defaultFilename: "Chart export",
85
85
  exportAsCsv: "Export as CSV"
86
- }, fi = "Explore", gi = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", mi = {
86
+ }, gi = "Explore", mi = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", pi = {
87
87
  daily: "1 day",
88
88
  fiveMinutely: "5 minutes",
89
89
  hourly: "1 hour",
@@ -95,45 +95,45 @@ const di = {
95
95
  twelveHourly: "12 hours",
96
96
  twoHourly: "2 hours",
97
97
  weekly: "1 week"
98
- }, pi = {
99
- renderer: di,
100
- queryDataProvider: ui,
101
- csvExport: ci,
102
- jumpToExplore: fi,
103
- query_aged_out_warning: gi,
104
- granularities: mi
98
+ }, yi = {
99
+ renderer: ui,
100
+ queryDataProvider: ci,
101
+ csvExport: fi,
102
+ jumpToExplore: gi,
103
+ query_aged_out_warning: mi,
104
+ granularities: pi
105
105
  };
106
- function yi() {
107
- const u = ti("en-us", pi);
106
+ function vi() {
107
+ const u = ii("en-us", yi);
108
108
  return {
109
109
  i18n: u,
110
- i18nT: ii(u)
110
+ i18nT: si(u)
111
111
  // Translation component <i18n-t>
112
112
  };
113
113
  }
114
- const Ie = 170, zt = 6, le = "analytics-query-provider", at = "{entity-id}", vi = "{cp-id}", _i = "{timeframe}", wi = 30 * 1e3;
115
- function bi() {
116
- const u = pe(le);
114
+ const qe = 170, Dt = 6, he = "analytics-query-provider", lt = "{entity-id}", _i = "{cp-id}", wi = "{timeframe}", bi = 30 * 1e3;
115
+ function Ei() {
116
+ const u = ye(he);
117
117
  return {
118
118
  evaluateFeatureFlag: (t, i) => u ? u.evaluateFeatureFlagFn(t, i) : i
119
119
  };
120
120
  }
121
- function Ei(u) {
121
+ function xi(u) {
122
122
  return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
123
123
  }
124
- var Dt = { exports: {} };
124
+ var St = { exports: {} };
125
125
  (function(u) {
126
126
  var e = Object.prototype.hasOwnProperty, t = "~";
127
127
  function i() {
128
128
  }
129
129
  Object.create && (i.prototype = /* @__PURE__ */ Object.create(null), new i().__proto__ || (t = !1));
130
- function s(d, h, a) {
131
- this.fn = d, this.context = h, this.once = a || !1;
130
+ function s(d, h, l) {
131
+ this.fn = d, this.context = h, this.once = l || !1;
132
132
  }
133
- function r(d, h, a, l, f) {
134
- if (typeof a != "function")
133
+ function r(d, h, l, a, f) {
134
+ if (typeof l != "function")
135
135
  throw new TypeError("The listener must be a function");
136
- var m = new s(a, l || d, f), p = t ? t + h : h;
136
+ var m = new s(l, a || d, f), p = t ? t + h : h;
137
137
  return d._events[p] ? d._events[p].fn ? d._events[p] = [d._events[p], m] : d._events[p].push(m) : (d._events[p] = m, d._eventsCount++), d;
138
138
  }
139
139
  function o(d, h) {
@@ -143,22 +143,22 @@ var Dt = { exports: {} };
143
143
  this._events = new i(), this._eventsCount = 0;
144
144
  }
145
145
  n.prototype.eventNames = function() {
146
- var h = [], a, l;
146
+ var h = [], l, a;
147
147
  if (this._eventsCount === 0) return h;
148
- for (l in a = this._events)
149
- e.call(a, l) && h.push(t ? l.slice(1) : l);
150
- return Object.getOwnPropertySymbols ? h.concat(Object.getOwnPropertySymbols(a)) : h;
148
+ for (a in l = this._events)
149
+ e.call(l, a) && h.push(t ? a.slice(1) : a);
150
+ return Object.getOwnPropertySymbols ? h.concat(Object.getOwnPropertySymbols(l)) : h;
151
151
  }, n.prototype.listeners = function(h) {
152
- var a = t ? t + h : h, l = this._events[a];
153
- if (!l) return [];
154
- if (l.fn) return [l.fn];
155
- for (var f = 0, m = l.length, p = new Array(m); f < m; f++)
156
- p[f] = l[f].fn;
152
+ var l = t ? t + h : h, a = this._events[l];
153
+ if (!a) return [];
154
+ if (a.fn) return [a.fn];
155
+ for (var f = 0, m = a.length, p = new Array(m); f < m; f++)
156
+ p[f] = a[f].fn;
157
157
  return p;
158
158
  }, n.prototype.listenerCount = function(h) {
159
- var a = t ? t + h : h, l = this._events[a];
160
- return l ? l.fn ? 1 : l.length : 0;
161
- }, n.prototype.emit = function(h, a, l, f, m, p) {
159
+ var l = t ? t + h : h, a = this._events[l];
160
+ return a ? a.fn ? 1 : a.length : 0;
161
+ }, n.prototype.emit = function(h, l, a, f, m, p) {
162
162
  var y = t ? t + h : h;
163
163
  if (!this._events[y]) return !1;
164
164
  var g = this._events[y], T = arguments.length, k, x;
@@ -167,15 +167,15 @@ var Dt = { exports: {} };
167
167
  case 1:
168
168
  return g.fn.call(g.context), !0;
169
169
  case 2:
170
- return g.fn.call(g.context, a), !0;
170
+ return g.fn.call(g.context, l), !0;
171
171
  case 3:
172
- return g.fn.call(g.context, a, l), !0;
172
+ return g.fn.call(g.context, l, a), !0;
173
173
  case 4:
174
- return g.fn.call(g.context, a, l, f), !0;
174
+ return g.fn.call(g.context, l, a, f), !0;
175
175
  case 5:
176
- return g.fn.call(g.context, a, l, f, m), !0;
176
+ return g.fn.call(g.context, l, a, f, m), !0;
177
177
  case 6:
178
- return g.fn.call(g.context, a, l, f, m, p), !0;
178
+ return g.fn.call(g.context, l, a, f, m, p), !0;
179
179
  }
180
180
  for (x = 1, k = new Array(T - 1); x < T; x++)
181
181
  k[x - 1] = arguments[x];
@@ -188,13 +188,13 @@ var Dt = { exports: {} };
188
188
  g[x].fn.call(g[x].context);
189
189
  break;
190
190
  case 2:
191
- g[x].fn.call(g[x].context, a);
191
+ g[x].fn.call(g[x].context, l);
192
192
  break;
193
193
  case 3:
194
- g[x].fn.call(g[x].context, a, l);
194
+ g[x].fn.call(g[x].context, l, a);
195
195
  break;
196
196
  case 4:
197
- g[x].fn.call(g[x].context, a, l, f);
197
+ g[x].fn.call(g[x].context, l, a, f);
198
198
  break;
199
199
  default:
200
200
  if (!k) for (C = 1, k = new Array(T - 1); C < T; C++)
@@ -203,46 +203,46 @@ var Dt = { exports: {} };
203
203
  }
204
204
  }
205
205
  return !0;
206
- }, n.prototype.on = function(h, a, l) {
207
- return r(this, h, a, l, !1);
208
- }, n.prototype.once = function(h, a, l) {
209
- return r(this, h, a, l, !0);
210
- }, n.prototype.removeListener = function(h, a, l, f) {
206
+ }, n.prototype.on = function(h, l, a) {
207
+ return r(this, h, l, a, !1);
208
+ }, n.prototype.once = function(h, l, a) {
209
+ return r(this, h, l, a, !0);
210
+ }, n.prototype.removeListener = function(h, l, a, f) {
211
211
  var m = t ? t + h : h;
212
212
  if (!this._events[m]) return this;
213
- if (!a)
213
+ if (!l)
214
214
  return o(this, m), this;
215
215
  var p = this._events[m];
216
216
  if (p.fn)
217
- p.fn === a && (!f || p.once) && (!l || p.context === l) && o(this, m);
217
+ p.fn === l && (!f || p.once) && (!a || p.context === a) && o(this, m);
218
218
  else {
219
219
  for (var y = 0, g = [], T = p.length; y < T; y++)
220
- (p[y].fn !== a || f && !p[y].once || l && p[y].context !== l) && g.push(p[y]);
220
+ (p[y].fn !== l || f && !p[y].once || a && p[y].context !== a) && g.push(p[y]);
221
221
  g.length ? this._events[m] = g.length === 1 ? g[0] : g : o(this, m);
222
222
  }
223
223
  return this;
224
224
  }, n.prototype.removeAllListeners = function(h) {
225
- var a;
226
- return h ? (a = t ? t + h : h, this._events[a] && o(this, a)) : (this._events = new i(), this._eventsCount = 0), this;
225
+ var l;
226
+ return h ? (l = t ? t + h : h, this._events[l] && o(this, l)) : (this._events = new i(), this._eventsCount = 0), this;
227
227
  }, n.prototype.off = n.prototype.removeListener, n.prototype.addListener = n.prototype.on, n.prefixed = t, n.EventEmitter = n, u.exports = n;
228
- })(Dt);
229
- var xi = Dt.exports;
230
- const Ci = /* @__PURE__ */ Ei(xi);
231
- class St extends Error {
228
+ })(St);
229
+ var Ci = St.exports;
230
+ const Ri = /* @__PURE__ */ xi(Ci);
231
+ class kt extends Error {
232
232
  constructor(e) {
233
233
  super(e), this.name = "TimeoutError";
234
234
  }
235
235
  }
236
- class Ri extends Error {
236
+ class Ti extends Error {
237
237
  constructor(e) {
238
238
  super(), this.name = "AbortError", this.message = e;
239
239
  }
240
240
  }
241
- const lt = (u) => globalThis.DOMException === void 0 ? new Ri(u) : new DOMException(u), ht = (u) => {
242
- const e = u.reason === void 0 ? lt("This operation was aborted.") : u.reason;
243
- return e instanceof Error ? e : lt(e);
241
+ const ht = (u) => globalThis.DOMException === void 0 ? new Ti(u) : new DOMException(u), dt = (u) => {
242
+ const e = u.reason === void 0 ? ht("This operation was aborted.") : u.reason;
243
+ return e instanceof Error ? e : ht(e);
244
244
  };
245
- function Ti(u, e) {
245
+ function zi(u, e) {
246
246
  const {
247
247
  milliseconds: t,
248
248
  fallback: i,
@@ -250,35 +250,35 @@ function Ti(u, e) {
250
250
  customTimers: r = { setTimeout, clearTimeout }
251
251
  } = e;
252
252
  let o, n;
253
- const h = new Promise((a, l) => {
253
+ const h = new Promise((l, a) => {
254
254
  if (typeof t != "number" || Math.sign(t) !== 1)
255
255
  throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);
256
256
  if (e.signal) {
257
257
  const { signal: m } = e;
258
- m.aborted && l(ht(m)), n = () => {
259
- l(ht(m));
258
+ m.aborted && a(dt(m)), n = () => {
259
+ a(dt(m));
260
260
  }, m.addEventListener("abort", n, { once: !0 });
261
261
  }
262
262
  if (t === Number.POSITIVE_INFINITY) {
263
- u.then(a, l);
263
+ u.then(l, a);
264
264
  return;
265
265
  }
266
- const f = new St();
266
+ const f = new kt();
267
267
  o = r.setTimeout.call(void 0, () => {
268
268
  if (i) {
269
269
  try {
270
- a(i());
270
+ l(i());
271
271
  } catch (m) {
272
- l(m);
272
+ a(m);
273
273
  }
274
274
  return;
275
275
  }
276
- typeof u.cancel == "function" && u.cancel(), s === !1 ? a() : s instanceof Error ? l(s) : (f.message = s ?? `Promise timed out after ${t} milliseconds`, l(f));
276
+ typeof u.cancel == "function" && u.cancel(), s === !1 ? l() : s instanceof Error ? a(s) : (f.message = s ?? `Promise timed out after ${t} milliseconds`, a(f));
277
277
  }, t), (async () => {
278
278
  try {
279
- a(await u);
279
+ l(await u);
280
280
  } catch (m) {
281
- l(m);
281
+ a(m);
282
282
  }
283
283
  })();
284
284
  }).finally(() => {
@@ -288,7 +288,7 @@ function Ti(u, e) {
288
288
  r.clearTimeout.call(void 0, o), o = void 0;
289
289
  }, h;
290
290
  }
291
- function zi(u, e, t) {
291
+ function Di(u, e, t) {
292
292
  let i = 0, s = u.length;
293
293
  for (; s > 0; ) {
294
294
  const r = Math.trunc(s / 2);
@@ -298,7 +298,7 @@ function zi(u, e, t) {
298
298
  return i;
299
299
  }
300
300
  var X;
301
- class Di {
301
+ class Si {
302
302
  constructor() {
303
303
  M(this, X, []);
304
304
  }
@@ -316,7 +316,7 @@ class Di {
316
316
  _(this, X).push(i);
317
317
  return;
318
318
  }
319
- const s = zi(_(this, X), i, (r, o) => o.priority - r.priority);
319
+ const s = Di(_(this, X), i, (r, o) => o.priority - r.priority);
320
320
  _(this, X).splice(s, 0, i);
321
321
  }
322
322
  setPriority(e, t) {
@@ -338,57 +338,57 @@ class Di {
338
338
  }
339
339
  }
340
340
  X = new WeakMap();
341
- var de, ue, ne, we, ce, be, j, fe, G, Ee, Q, ge, se, xe, Oe, z, kt, Nt, At, Ht, Ot, Te, Ge, Ue, ze, Lt, De;
342
- class Si extends Ci {
341
+ var ue, ce, oe, Ee, fe, xe, j, ge, G, Ce, Q, me, re, Re, Me, z, Nt, At, Ht, Ot, Lt, De, Fe, We, Se, Mt, ke;
342
+ class ki extends Ri {
343
343
  // TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
344
344
  constructor(t) {
345
345
  var i, s;
346
346
  super();
347
347
  M(this, z);
348
- M(this, de);
349
348
  M(this, ue);
350
- M(this, ne, 0);
351
- M(this, we);
352
349
  M(this, ce);
353
- M(this, be, 0);
354
- M(this, j);
350
+ M(this, oe, 0);
351
+ M(this, Ee);
355
352
  M(this, fe);
353
+ M(this, xe, 0);
354
+ M(this, j);
355
+ M(this, ge);
356
356
  M(this, G);
357
- M(this, Ee);
357
+ M(this, Ce);
358
358
  M(this, Q, 0);
359
359
  // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
360
- M(this, ge);
361
- M(this, se);
362
- M(this, xe);
360
+ M(this, me);
361
+ M(this, re);
362
+ M(this, Re);
363
363
  // Use to assign a unique identifier to a promise function, if not explicitly specified
364
- M(this, Oe, 1n);
364
+ M(this, Me, 1n);
365
365
  /**
366
366
  Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
367
367
 
368
368
  Applies to each future operation.
369
369
  */
370
- st(this, "timeout");
370
+ rt(this, "timeout");
371
371
  if (t = {
372
372
  carryoverConcurrencyCount: !1,
373
373
  intervalCap: Number.POSITIVE_INFINITY,
374
374
  interval: 0,
375
375
  concurrency: Number.POSITIVE_INFINITY,
376
376
  autoStart: !0,
377
- queueClass: Di,
377
+ queueClass: Si,
378
378
  ...t
379
379
  }, !(typeof t.intervalCap == "number" && t.intervalCap >= 1))
380
380
  throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${((i = t.intervalCap) == null ? void 0 : i.toString()) ?? ""}\` (${typeof t.intervalCap})`);
381
381
  if (t.interval === void 0 || !(Number.isFinite(t.interval) && t.interval >= 0))
382
382
  throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${((s = t.interval) == null ? void 0 : s.toString()) ?? ""}\` (${typeof t.interval})`);
383
- H(this, de, t.carryoverConcurrencyCount), H(this, ue, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), H(this, we, t.intervalCap), H(this, ce, t.interval), H(this, G, new t.queueClass()), H(this, Ee, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, H(this, xe, t.throwOnTimeout === !0), H(this, se, t.autoStart === !1);
383
+ H(this, ue, t.carryoverConcurrencyCount), H(this, ce, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), H(this, Ee, t.intervalCap), H(this, fe, t.interval), H(this, G, new t.queueClass()), H(this, Ce, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, H(this, Re, t.throwOnTimeout === !0), H(this, re, t.autoStart === !1);
384
384
  }
385
385
  get concurrency() {
386
- return _(this, ge);
386
+ return _(this, me);
387
387
  }
388
388
  set concurrency(t) {
389
389
  if (!(typeof t == "number" && t >= 1))
390
390
  throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);
391
- H(this, ge, t), P(this, z, ze).call(this);
391
+ H(this, me, t), P(this, z, Se).call(this);
392
392
  }
393
393
  /**
394
394
  Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
@@ -430,30 +430,30 @@ class Si extends Ci {
430
430
  _(this, G).setPriority(t, i);
431
431
  }
432
432
  async add(t, i = {}) {
433
- return i.id ?? (i.id = (ye(this, Oe)._++).toString()), i = {
433
+ return i.id ?? (i.id = (_e(this, Me)._++).toString()), i = {
434
434
  timeout: this.timeout,
435
- throwOnTimeout: _(this, xe),
435
+ throwOnTimeout: _(this, Re),
436
436
  ...i
437
437
  }, new Promise((s, r) => {
438
438
  _(this, G).enqueue(async () => {
439
439
  var o;
440
- ye(this, Q)._++, ye(this, ne)._++;
440
+ _e(this, Q)._++, _e(this, oe)._++;
441
441
  try {
442
442
  (o = i.signal) == null || o.throwIfAborted();
443
443
  let n = t({ signal: i.signal });
444
- i.timeout && (n = Ti(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, P(this, z, Lt).call(this, i.signal)]));
444
+ i.timeout && (n = zi(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, P(this, z, Mt).call(this, i.signal)]));
445
445
  const d = await n;
446
446
  s(d), this.emit("completed", d);
447
447
  } catch (n) {
448
- if (n instanceof St && !i.throwOnTimeout) {
448
+ if (n instanceof kt && !i.throwOnTimeout) {
449
449
  s();
450
450
  return;
451
451
  }
452
452
  r(n), this.emit("error", n);
453
453
  } finally {
454
- P(this, z, At).call(this);
454
+ P(this, z, Ht).call(this);
455
455
  }
456
- }, i), this.emit("add"), P(this, z, Te).call(this);
456
+ }, i), this.emit("add"), P(this, z, De).call(this);
457
457
  });
458
458
  }
459
459
  async addAll(t, i) {
@@ -463,19 +463,19 @@ class Si extends Ci {
463
463
  Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
464
464
  */
465
465
  start() {
466
- return _(this, se) ? (H(this, se, !1), P(this, z, ze).call(this), this) : this;
466
+ return _(this, re) ? (H(this, re, !1), P(this, z, Se).call(this), this) : this;
467
467
  }
468
468
  /**
469
469
  Put queue execution on hold.
470
470
  */
471
471
  pause() {
472
- H(this, se, !0);
472
+ H(this, re, !0);
473
473
  }
474
474
  /**
475
475
  Clear the queue.
476
476
  */
477
477
  clear() {
478
- H(this, G, new (_(this, Ee))());
478
+ H(this, G, new (_(this, Ce))());
479
479
  }
480
480
  /**
481
481
  Can be called multiple times. Useful if you for example add additional items at a later time.
@@ -483,7 +483,7 @@ class Si extends Ci {
483
483
  @returns A promise that settles when the queue becomes empty.
484
484
  */
485
485
  async onEmpty() {
486
- _(this, G).size !== 0 && await P(this, z, De).call(this, "empty");
486
+ _(this, G).size !== 0 && await P(this, z, ke).call(this, "empty");
487
487
  }
488
488
  /**
489
489
  @returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
@@ -493,7 +493,7 @@ class Si extends Ci {
493
493
  Note that this only limits the number of items waiting to start. There could still be up to `concurrency` jobs already running that this call does not include in its calculation.
494
494
  */
495
495
  async onSizeLessThan(t) {
496
- _(this, G).size < t || await P(this, z, De).call(this, "next", () => _(this, G).size < t);
496
+ _(this, G).size < t || await P(this, z, ke).call(this, "next", () => _(this, G).size < t);
497
497
  }
498
498
  /**
499
499
  The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.
@@ -501,7 +501,7 @@ class Si extends Ci {
501
501
  @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
502
502
  */
503
503
  async onIdle() {
504
- _(this, Q) === 0 && _(this, G).size === 0 || await P(this, z, De).call(this, "idle");
504
+ _(this, Q) === 0 && _(this, G).size === 0 || await P(this, z, ke).call(this, "idle");
505
505
  }
506
506
  /**
507
507
  Size of the queue, the number of queued items waiting to run.
@@ -527,59 +527,59 @@ class Si extends Ci {
527
527
  Whether the queue is currently paused.
528
528
  */
529
529
  get isPaused() {
530
- return _(this, se);
530
+ return _(this, re);
531
531
  }
532
532
  }
533
- de = new WeakMap(), ue = new WeakMap(), ne = new WeakMap(), we = new WeakMap(), ce = new WeakMap(), be = new WeakMap(), j = new WeakMap(), fe = new WeakMap(), G = new WeakMap(), Ee = new WeakMap(), Q = new WeakMap(), ge = new WeakMap(), se = new WeakMap(), xe = new WeakMap(), Oe = new WeakMap(), z = new WeakSet(), kt = function() {
534
- return _(this, ue) || _(this, ne) < _(this, we);
535
- }, Nt = function() {
536
- return _(this, Q) < _(this, ge);
533
+ ue = new WeakMap(), ce = new WeakMap(), oe = new WeakMap(), Ee = new WeakMap(), fe = new WeakMap(), xe = new WeakMap(), j = new WeakMap(), ge = new WeakMap(), G = new WeakMap(), Ce = new WeakMap(), Q = new WeakMap(), me = new WeakMap(), re = new WeakMap(), Re = new WeakMap(), Me = new WeakMap(), z = new WeakSet(), Nt = function() {
534
+ return _(this, ce) || _(this, oe) < _(this, Ee);
537
535
  }, At = function() {
538
- ye(this, Q)._--, P(this, z, Te).call(this), this.emit("next");
536
+ return _(this, Q) < _(this, me);
539
537
  }, Ht = function() {
540
- P(this, z, Ue).call(this), P(this, z, Ge).call(this), H(this, fe, void 0);
538
+ _e(this, Q)._--, P(this, z, De).call(this), this.emit("next");
541
539
  }, Ot = function() {
540
+ P(this, z, We).call(this), P(this, z, Fe).call(this), H(this, ge, void 0);
541
+ }, Lt = function() {
542
542
  const t = Date.now();
543
543
  if (_(this, j) === void 0) {
544
- const i = _(this, be) - t;
544
+ const i = _(this, xe) - t;
545
545
  if (i < 0)
546
- H(this, ne, _(this, de) ? _(this, Q) : 0);
546
+ H(this, oe, _(this, ue) ? _(this, Q) : 0);
547
547
  else
548
- return _(this, fe) === void 0 && H(this, fe, setTimeout(() => {
549
- P(this, z, Ht).call(this);
548
+ return _(this, ge) === void 0 && H(this, ge, setTimeout(() => {
549
+ P(this, z, Ot).call(this);
550
550
  }, i)), !0;
551
551
  }
552
552
  return !1;
553
- }, Te = function() {
553
+ }, De = function() {
554
554
  if (_(this, G).size === 0)
555
555
  return _(this, j) && clearInterval(_(this, j)), H(this, j, void 0), this.emit("empty"), _(this, Q) === 0 && this.emit("idle"), !1;
556
- if (!_(this, se)) {
557
- const t = !_(this, z, Ot);
558
- if (_(this, z, kt) && _(this, z, Nt)) {
556
+ if (!_(this, re)) {
557
+ const t = !_(this, z, Lt);
558
+ if (_(this, z, Nt) && _(this, z, At)) {
559
559
  const i = _(this, G).dequeue();
560
- return i ? (this.emit("active"), i(), t && P(this, z, Ge).call(this), !0) : !1;
560
+ return i ? (this.emit("active"), i(), t && P(this, z, Fe).call(this), !0) : !1;
561
561
  }
562
562
  }
563
563
  return !1;
564
- }, Ge = function() {
565
- _(this, ue) || _(this, j) !== void 0 || (H(this, j, setInterval(() => {
566
- P(this, z, Ue).call(this);
567
- }, _(this, ce))), H(this, be, Date.now() + _(this, ce)));
568
- }, Ue = function() {
569
- _(this, ne) === 0 && _(this, Q) === 0 && _(this, j) && (clearInterval(_(this, j)), H(this, j, void 0)), H(this, ne, _(this, de) ? _(this, Q) : 0), P(this, z, ze).call(this);
564
+ }, Fe = function() {
565
+ _(this, ce) || _(this, j) !== void 0 || (H(this, j, setInterval(() => {
566
+ P(this, z, We).call(this);
567
+ }, _(this, fe))), H(this, xe, Date.now() + _(this, fe)));
568
+ }, We = function() {
569
+ _(this, oe) === 0 && _(this, Q) === 0 && _(this, j) && (clearInterval(_(this, j)), H(this, j, void 0)), H(this, oe, _(this, ue) ? _(this, Q) : 0), P(this, z, Se).call(this);
570
570
  }, /**
571
571
  Executes all queued functions until it reaches the limit.
572
572
  */
573
- ze = function() {
574
- for (; P(this, z, Te).call(this); )
573
+ Se = function() {
574
+ for (; P(this, z, De).call(this); )
575
575
  ;
576
- }, Lt = async function(t) {
576
+ }, Mt = async function(t) {
577
577
  return new Promise((i, s) => {
578
578
  t.addEventListener("abort", () => {
579
579
  s(t.reason);
580
580
  }, { once: !0 });
581
581
  });
582
- }, De = async function(t, i) {
582
+ }, ke = async function(t, i) {
583
583
  return new Promise((s) => {
584
584
  const r = () => {
585
585
  i && !i() || (this.off(t, r), s());
@@ -587,15 +587,15 @@ ze = function() {
587
587
  this.on(t, r);
588
588
  });
589
589
  };
590
- const ki = () => {
591
- const u = Rt(), e = pe(le);
590
+ const Ni = () => {
591
+ const u = Tt(), e = ye(he);
592
592
  if (!e)
593
593
  return;
594
594
  if (e.queryFnOverride) {
595
595
  console.warn("Detected incorrect use of useRequestQueue. This composable should not be used in nested components. Please discuss with team-data or report an issue if you feel you have a use case.");
596
596
  return;
597
597
  }
598
- const t = new Si({
598
+ const t = new ki({
599
599
  carryoverConcurrencyCount: !0,
600
600
  concurrency: u.maxParallelRequests,
601
601
  interval: u.requestInterval,
@@ -605,12 +605,12 @@ const ki = () => {
605
605
  queryFnOverride: !0,
606
606
  queryFn: (s, r) => t.add(() => e.queryFn(s, r), { throwOnTimeout: !0 })
607
607
  };
608
- Gt(le, i);
609
- }, me = {
610
- useI18n: yi,
611
- useEvaluateFeatureFlag: bi,
612
- useRequestQueue: ki
613
- }, je = /* @__PURE__ */ K({
608
+ Gt(he, i);
609
+ }, pe = {
610
+ useI18n: vi,
611
+ useEvaluateFeatureFlag: Ei,
612
+ useRequestQueue: Ni
613
+ }, Ze = /* @__PURE__ */ K({
614
614
  __name: "QueryDataProvider",
615
615
  props: {
616
616
  context: {},
@@ -620,14 +620,14 @@ const ki = () => {
620
620
  },
621
621
  emits: ["chart-data", "queryComplete"],
622
622
  setup(u, { emit: e }) {
623
- const t = u, i = e, { i18n: s } = me.useI18n(), r = pe(le), o = () => t.queryReady && r ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, n = new AbortController();
624
- Fe(() => {
623
+ const t = u, i = e, { i18n: s } = pe.useI18n(), r = ye(he), o = () => t.queryReady && r ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, n = new AbortController();
624
+ Ve(() => {
625
625
  n.abort();
626
626
  });
627
627
  const d = (T, k, x) => {
628
628
  const L = [];
629
- return k && L.push(...k), L.push(...Kt(T, x)), L;
630
- }, { data: h, error: a, isValidating: l } = ei(o, async () => {
629
+ return k && L.push(...k), L.push(...Yt(T, x)), L;
630
+ }, { data: h, error: l, isValidating: a } = ti(o, async () => {
631
631
  var T, k, x, L;
632
632
  try {
633
633
  let {
@@ -661,11 +661,11 @@ const ki = () => {
661
661
  }, {
662
662
  refreshInterval: t.context.refreshInterval,
663
663
  revalidateOnFocus: !1
664
- }), { state: f, swrvState: m } = hi(h, a, l), p = U(null), y = A(() => f.value === m.ERROR || !!p.value), g = A(() => !t.queryReady || f.value === m.PENDING);
665
- return We(h, (T) => {
664
+ }), { state: f, swrvState: m } = di(h, l, a), p = U(null), y = A(() => f.value === m.ERROR || !!p.value), g = A(() => !t.queryReady || f.value === m.PENDING);
665
+ return Ke(h, (T) => {
666
666
  T && i("chart-data", T);
667
667
  }), (T, k) => {
668
- const x = oe("KSkeleton"), L = oe("KEmptyState");
668
+ const x = ae("KSkeleton"), L = ae("KEmptyState");
669
669
  return g.value || !D(h) && !y.value ? (R(), O(x, {
670
670
  key: 0,
671
671
  class: "chart-skeleton",
@@ -677,16 +677,16 @@ const ki = () => {
677
677
  "icon-variant": "error"
678
678
  }, {
679
679
  default: I(() => [
680
- Me(J(p.value), 1)
680
+ Pe(J(p.value), 1)
681
681
  ]),
682
682
  _: 1
683
- })) : D(h) ? Le(T.$slots, "default", {
683
+ })) : D(h) ? Ie(T.$slots, "default", {
684
684
  key: 2,
685
685
  data: D(h)
686
686
  }) : Y("", !0);
687
687
  };
688
688
  }
689
- }), Ni = /* @__PURE__ */ K({
689
+ }), Ai = /* @__PURE__ */ K({
690
690
  __name: "SimpleChartRenderer",
691
691
  props: {
692
692
  query: {},
@@ -697,21 +697,21 @@ const ki = () => {
697
697
  refreshCounter: {}
698
698
  },
699
699
  setup(u) {
700
- Ve((i) => ({
700
+ Ye((i) => ({
701
701
  "088169ae": `${i.height}px`
702
702
  }));
703
703
  const e = u, t = A(() => e.chartOptions.type === "single_value");
704
- return (i, s) => (R(), O(je, {
704
+ return (i, s) => (R(), O(Ze, {
705
705
  context: i.context,
706
706
  query: i.query,
707
707
  "query-ready": i.queryReady,
708
708
  "refresh-counter": i.refreshCounter
709
709
  }, {
710
710
  default: I(({ data: r }) => [
711
- re("div", {
712
- class: Ke(["analytics-chart", { "single-value": t.value }])
711
+ ne("div", {
712
+ class: Xe(["analytics-chart", { "single-value": t.value }])
713
713
  }, [
714
- ie(D(jt), {
714
+ ie(D(Qt), {
715
715
  "chart-data": r,
716
716
  "chart-options": i.chartOptions,
717
717
  "synthetics-data-key": t.value ? void 0 : i.chartOptions.synthetics_data_key
@@ -721,12 +721,12 @@ const ki = () => {
721
721
  _: 1
722
722
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
723
723
  }
724
- }), he = (u, e) => {
724
+ }), de = (u, e) => {
725
725
  const t = u.__vccOpts || u;
726
726
  for (const [i, s] of e)
727
727
  t[i] = s;
728
728
  return t;
729
- }, dt = /* @__PURE__ */ he(Ni, [["__scopeId", "data-v-1e9ff912"]]), Ai = { class: "analytics-chart" }, Hi = /* @__PURE__ */ K({
729
+ }, ut = /* @__PURE__ */ de(Ai, [["__scopeId", "data-v-1e9ff912"]]), Hi = { class: "analytics-chart" }, Oi = /* @__PURE__ */ K({
730
730
  __name: "BaseAnalyticsChartRenderer",
731
731
  props: {
732
732
  query: {},
@@ -739,45 +739,45 @@ const ki = () => {
739
739
  },
740
740
  emits: ["edit-tile", "chart-data", "zoom-time-range"],
741
741
  setup(u, { emit: e }) {
742
- const t = u, i = e, { i18n: s } = me.useI18n(), { evaluateFeatureFlag: r } = me.useEvaluateFeatureFlag(), o = r("explore-v4-fine-granularity", !1), n = A(() => ({
742
+ const t = u, i = e, { i18n: s } = pe.useI18n(), { evaluateFeatureFlag: r } = pe.useEvaluateFeatureFlag(), o = r("explore-v4-fine-granularity", !1), n = A(() => ({
743
743
  type: t.chartOptions.type,
744
744
  stacked: t.chartOptions.stacked ?? !1,
745
745
  chartDatasetColors: t.chartOptions.chart_dataset_colors,
746
746
  threshold: t.chartOptions.threshold
747
- })), d = () => {
747
+ })), d = A(() => o && t.context.zoomable && !t.query.time_range), h = () => {
748
748
  i("edit-tile");
749
- }, h = (a) => {
749
+ }, l = (a) => {
750
750
  i("chart-data", a);
751
751
  };
752
- return (a, l) => {
753
- const f = oe("KDropdownItem");
754
- return R(), O(je, {
752
+ return (a, f) => {
753
+ const m = ae("KDropdownItem");
754
+ return R(), O(Ze, {
755
755
  context: a.context,
756
756
  query: a.query,
757
757
  "query-ready": a.queryReady,
758
758
  "refresh-counter": a.refreshCounter,
759
- onChartData: h
759
+ onChartData: l
760
760
  }, {
761
- default: I(({ data: m }) => [
762
- re("div", Ai, [
763
- ie(D(Qt), _t({
761
+ default: I(({ data: p }) => [
762
+ ne("div", Hi, [
763
+ ie(D(Zt), wt({
764
764
  "allow-csv-export": a.chartOptions.allow_csv_export,
765
- "chart-data": m,
765
+ "chart-data": p,
766
766
  "chart-options": n.value,
767
767
  "legend-position": "bottom",
768
768
  "show-menu": a.context.editable,
769
769
  "synthetics-data-key": a.chartOptions.synthetics_data_key,
770
- "timeseries-zoom": D(o) && !a.query.time_range,
770
+ "timeseries-zoom": d.value,
771
771
  "tooltip-title": ""
772
772
  }, a.extraProps, {
773
- onZoomTimeRange: l[0] || (l[0] = (p) => i("zoom-time-range", p))
774
- }), Ye({ _: 2 }, [
773
+ onZoomTimeRange: f[0] || (f[0] = (y) => i("zoom-time-range", y))
774
+ }), je({ _: 2 }, [
775
775
  a.context.editable ? {
776
776
  name: "menu-items",
777
777
  fn: I(() => [
778
- ie(f, { onClick: d }, {
778
+ ie(m, { onClick: h }, {
779
779
  default: I(() => [
780
- Me(J(D(s).t("renderer.edit")), 1)
780
+ Pe(J(D(s).t("renderer.edit")), 1)
781
781
  ]),
782
782
  _: 1
783
783
  })
@@ -791,7 +791,7 @@ const ki = () => {
791
791
  }, 8, ["context", "query", "query-ready", "refresh-counter"]);
792
792
  };
793
793
  }
794
- }), Qe = /* @__PURE__ */ he(Hi, [["__scopeId", "data-v-02fd51d1"]]), ut = /* @__PURE__ */ K({
794
+ }), Je = /* @__PURE__ */ de(Oi, [["__scopeId", "data-v-5a151d86"]]), ct = /* @__PURE__ */ K({
795
795
  __name: "BarChartRenderer",
796
796
  props: {
797
797
  query: {},
@@ -802,7 +802,7 @@ const ki = () => {
802
802
  refreshCounter: {}
803
803
  },
804
804
  setup(u) {
805
- return (e, t) => (R(), O(Qe, {
805
+ return (e, t) => (R(), O(Je, {
806
806
  "chart-options": e.chartOptions,
807
807
  context: e.context,
808
808
  "extra-props": { showAnnotations: !1 },
@@ -812,7 +812,7 @@ const ki = () => {
812
812
  "refresh-counter": e.refreshCounter
813
813
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
814
814
  }
815
- }), ct = /* @__PURE__ */ K({
815
+ }), ft = /* @__PURE__ */ K({
816
816
  __name: "TimeseriesChartRenderer",
817
817
  props: {
818
818
  query: {},
@@ -825,7 +825,7 @@ const ki = () => {
825
825
  emits: ["zoom-time-range"],
826
826
  setup(u, { emit: e }) {
827
827
  const t = e;
828
- return (i, s) => (R(), O(Qe, {
828
+ return (i, s) => (R(), O(Je, {
829
829
  "chart-options": i.chartOptions,
830
830
  context: i.context,
831
831
  height: i.height,
@@ -835,7 +835,7 @@ const ki = () => {
835
835
  onZoomTimeRange: s[0] || (s[0] = (r) => t("zoom-time-range", r))
836
836
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
837
837
  }
838
- }), Oi = { class: "metric-card-tile-wrapper" }, Li = /* @__PURE__ */ K({
838
+ }), Li = { class: "metric-card-tile-wrapper" }, Mi = /* @__PURE__ */ K({
839
839
  __name: "GoldenSignalsRenderer",
840
840
  props: {
841
841
  query: {},
@@ -849,7 +849,7 @@ const ki = () => {
849
849
  const e = u, t = A(() => {
850
850
  const s = e.context.timeSpec;
851
851
  if (s.type === "absolute")
852
- return new Yt({
852
+ return new Xt({
853
853
  key: "custom",
854
854
  timeframeText: "custom",
855
855
  display: "custom",
@@ -861,7 +861,7 @@ const ki = () => {
861
861
  isRelative: !1,
862
862
  allowedTiers: ["free", "plus", "enterprise"]
863
863
  });
864
- const r = Ct.get(s.time_range);
864
+ const r = Rt.get(s.time_range);
865
865
  if (!r)
866
866
  throw new Error("Unknown time range");
867
867
  return r;
@@ -883,27 +883,27 @@ const ki = () => {
883
883
  refreshCounter: e.refreshCounter
884
884
  };
885
885
  });
886
- return (s, r) => (R(), F("div", Oi, [
887
- ie(D(si), Ut(Ft(i.value)), {
886
+ return (s, r) => (R(), F("div", Li, [
887
+ ie(D(ri), Ut(Ft(i.value)), {
888
888
  default: I(() => [
889
- ie(D(ri))
889
+ ie(D(ni))
890
890
  ]),
891
891
  _: 1
892
892
  }, 16)
893
893
  ]));
894
894
  }
895
- }), Mi = /* @__PURE__ */ he(Li, [["__scopeId", "data-v-b7e09724"]]), ft = "#6c7489", Ii = "12px", gt = "20px", Mt = "20px", Pi = {
895
+ }), Ii = /* @__PURE__ */ de(Mi, [["__scopeId", "data-v-b7e09724"]]), gt = "#6c7489", Pi = "12px", mt = "20px", It = "20px", qi = {
896
896
  class: "fallback-entity-link",
897
897
  "data-testid": "entity-link-parent"
898
- }, mt = /* @__PURE__ */ K({
898
+ }, pt = /* @__PURE__ */ K({
899
899
  __name: "FallbackEntityLink",
900
900
  props: {
901
901
  entityLinkData: {}
902
902
  },
903
903
  setup(u) {
904
- return (e, t) => (R(), F("div", Pi, J(e.entityLinkData.label), 1));
904
+ return (e, t) => (R(), F("div", qi, J(e.entityLinkData.label), 1));
905
905
  }
906
- }), qi = /* @__PURE__ */ K({
906
+ }), Bi = /* @__PURE__ */ K({
907
907
  __name: "TopNTableRenderer",
908
908
  props: {
909
909
  query: {},
@@ -914,35 +914,35 @@ const ki = () => {
914
914
  refreshCounter: {}
915
915
  },
916
916
  setup(u) {
917
- const e = u, t = pe(le), i = Wt(async () => {
917
+ const e = u, t = ye(he), i = Wt(async () => {
918
918
  if (t != null && t.fetchComponent)
919
919
  try {
920
920
  return await t.fetchComponent("EntityLink");
921
921
  } catch {
922
- return mt;
922
+ return pt;
923
923
  }
924
- return mt;
924
+ return pt;
925
925
  }), s = (r) => {
926
926
  var o;
927
927
  if ((o = e.chartOptions) != null && o.entity_link)
928
928
  if (r.id.includes(":")) {
929
929
  const [n, d] = r.id.split(":");
930
- return e.chartOptions.entity_link.replace(vi, n).replace(at, d);
930
+ return e.chartOptions.entity_link.replace(_i, n).replace(lt, d);
931
931
  } else
932
- return e.chartOptions.entity_link.replace(at, r.id);
932
+ return e.chartOptions.entity_link.replace(lt, r.id);
933
933
  return "";
934
934
  };
935
- return (r, o) => (R(), O(je, {
935
+ return (r, o) => (R(), O(Ze, {
936
936
  context: r.context,
937
937
  query: r.query,
938
938
  "query-ready": r.queryReady,
939
939
  "refresh-counter": r.refreshCounter
940
940
  }, {
941
941
  default: I(({ data: n }) => [
942
- ie(D(Zt), {
942
+ ie(D(Jt), {
943
943
  data: n,
944
944
  "synthetics-data-key": r.chartOptions.synthetics_data_key
945
- }, Ye({ _: 2 }, [
945
+ }, je({ _: 2 }, [
946
946
  e.chartOptions.entity_link ? {
947
947
  name: "name",
948
948
  fn: I(({ record: d }) => [
@@ -962,7 +962,7 @@ const ki = () => {
962
962
  _: 1
963
963
  }, 8, ["context", "query", "query-ready", "refresh-counter"]));
964
964
  }
965
- }), Bi = /* @__PURE__ */ K({
965
+ }), $i = /* @__PURE__ */ K({
966
966
  __name: "DonutChartRenderer",
967
967
  props: {
968
968
  query: {},
@@ -973,7 +973,7 @@ const ki = () => {
973
973
  refreshCounter: {}
974
974
  },
975
975
  setup(u) {
976
- return (e, t) => (R(), O(Qe, {
976
+ return (e, t) => (R(), O(Je, {
977
977
  "chart-options": e.chartOptions,
978
978
  context: e.context,
979
979
  height: e.height,
@@ -982,33 +982,33 @@ const ki = () => {
982
982
  "refresh-counter": e.refreshCounter
983
983
  }, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
984
984
  }
985
- }), $i = ["data-testid"], Gi = {
985
+ }), Gi = ["data-testid"], Ui = {
986
986
  key: 0,
987
987
  class: "tile-header"
988
- }, Ui = ["data-testid"], Fi = { class: "badge-text" }, Wi = ["data-testid"], Vi = { class: "delete-option" }, Ki = ["data-testid"], Yi = ["data-testid"], Xi = /* @__PURE__ */ K({
988
+ }, Fi = ["data-testid"], Wi = { class: "badge-text" }, Vi = ["data-testid"], Ki = { class: "delete-option" }, Yi = ["data-testid"], Xi = ["data-testid"], ji = /* @__PURE__ */ K({
989
989
  __name: "DashboardTile",
990
990
  props: {
991
991
  definition: {},
992
992
  context: {},
993
- height: { default: Ie },
993
+ height: { default: qe },
994
994
  queryReady: { type: Boolean },
995
995
  refreshCounter: {},
996
996
  tileId: {}
997
997
  },
998
998
  emits: ["edit-tile", "duplicate-tile", "remove-tile", "zoom-time-range"],
999
999
  setup(u, { emit: e }) {
1000
- Ve((v) => ({
1000
+ Ye((v) => ({
1001
1001
  "55e9146d": `${v.height}px`
1002
1002
  }));
1003
- const t = parseInt(Mt, 10), i = u, s = e, r = pe(le), { i18n: o } = me.useI18n(), n = U(), d = U(!1), h = U(), a = U(!1), l = U("");
1004
- Xe(async () => {
1003
+ const t = parseInt(It, 10), i = u, s = e, r = ye(he), { i18n: o } = pe.useI18n(), n = U(), d = U(!1), h = U(), l = U(!1), a = U("");
1004
+ Qe(async () => {
1005
1005
  var v;
1006
- l.value = await ((v = r == null ? void 0 : r.exploreBaseUrl) == null ? void 0 : v.call(r)) ?? "";
1007
- }), We(() => i.definition, async () => {
1008
- await wt(), h.value && (a.value = h.value.scrollWidth > h.value.clientWidth);
1006
+ a.value = await ((v = r == null ? void 0 : r.exploreBaseUrl) == null ? void 0 : v.call(r)) ?? "";
1007
+ }), Ke(() => i.definition, async () => {
1008
+ await bt(), h.value && (l.value = h.value.scrollWidth > h.value.clientWidth);
1009
1009
  }, { immediate: !0, deep: !0 });
1010
1010
  const f = A(() => {
1011
- if (!l.value || !i.definition.query || !y.value)
1011
+ if (!a.value || !i.definition.query || !y.value)
1012
1012
  return "";
1013
1013
  const v = [...i.context.filters, ...i.definition.query.filters ?? []], W = i.definition.query.dimensions ?? [], B = {
1014
1014
  filters: v,
@@ -1016,19 +1016,19 @@ const ki = () => {
1016
1016
  dimensions: W,
1017
1017
  time_range: i.definition.query.time_range || i.context.timeSpec,
1018
1018
  granularity: i.definition.query.granularity || L.value
1019
- }, qe = ["api_usage", "llm_usage"].includes(i.definition.query.datasource) ? i.definition.query.datasource : "api_usage";
1020
- return `${l.value}?q=${JSON.stringify(B)}&d=${qe}&c=${i.definition.chart.type}`;
1019
+ }, $e = ["api_usage", "llm_usage"].includes(i.definition.query.datasource) ? i.definition.query.datasource : "api_usage";
1020
+ return `${a.value}?q=${JSON.stringify(B)}&d=${$e}&c=${i.definition.chart.type}`;
1021
1021
  }), m = A(() => o.t("csvExport.defaultFilename")), p = A(() => y.value && (g.value || i.context.editable) || !!x.value), y = A(() => !["golden_signals", "top_n", "gauge"].includes(i.definition.chart.type)), g = A(() => !!f.value || "allow_csv_export" in i.definition.chart && i.definition.chart.allow_csv_export || i.context.editable), T = {
1022
- timeseries_line: ct,
1023
- timeseries_bar: ct,
1024
- horizontal_bar: ut,
1025
- vertical_bar: ut,
1026
- gauge: dt,
1027
- donut: Bi,
1028
- golden_signals: Mi,
1029
- top_n: qi,
1022
+ timeseries_line: ft,
1023
+ timeseries_bar: ft,
1024
+ horizontal_bar: ct,
1025
+ vertical_bar: ct,
1026
+ gauge: ut,
1027
+ donut: $i,
1028
+ golden_signals: Ii,
1029
+ top_n: Bi,
1030
1030
  slottable: void 0,
1031
- single_value: dt
1031
+ single_value: ut
1032
1032
  }, k = A(() => {
1033
1033
  const v = T[i.definition.chart.type];
1034
1034
  return v && {
@@ -1046,20 +1046,20 @@ const ki = () => {
1046
1046
  var W;
1047
1047
  const v = (W = i.definition.query) == null ? void 0 : W.time_range;
1048
1048
  if ((v == null ? void 0 : v.type) === "relative") {
1049
- const B = Ct.get(Xt[v.time_range]);
1049
+ const B = Rt.get(jt[v.time_range]);
1050
1050
  return B ? B.display : (console.warn("Did not recognize the given relative time range:", v.time_range), v.time_range);
1051
1051
  } else if ((v == null ? void 0 : v.type) === "absolute") {
1052
1052
  const B = v.tz || "Etc/UTC";
1053
- return `${ot(v.start, { short: !0, tz: B })} - ${ot(v.end, { short: !0, tz: B })}`;
1053
+ return `${at(v.start, { short: !0, tz: B })} - ${at(v.end, { short: !0, tz: B })}`;
1054
1054
  }
1055
1055
  return null;
1056
- }), L = A(() => n.value ? $e(n.value.meta.granularity_ms) : void 0), C = A(() => ["timeseries_line", "timeseries_bar"].includes(i.definition.chart.type)), E = A(() => {
1056
+ }), L = A(() => n.value ? Ue(n.value.meta.granularity_ms) : void 0), C = A(() => ["timeseries_line", "timeseries_bar"].includes(i.definition.chart.type)), E = A(() => {
1057
1057
  var B;
1058
- const v = i.definition.query.granularity, W = $e(((B = n.value) == null ? void 0 : B.meta.granularity_ms) || 0);
1058
+ const v = i.definition.query.granularity, W = Ue(((B = n.value) == null ? void 0 : B.meta.granularity_ms) || 0);
1059
1059
  return C.value && v !== W;
1060
1060
  }), N = A(() => {
1061
1061
  var B;
1062
- const v = $e(((B = n.value) == null ? void 0 : B.meta.granularity_ms) || 0), W = i.definition.query.granularity;
1062
+ const v = Ue(((B = n.value) == null ? void 0 : B.meta.granularity_ms) || 0), W = i.definition.query.granularity;
1063
1063
  return o.t("query_aged_out_warning", {
1064
1064
  currentGranularity: o.t(`granularities.${v}`),
1065
1065
  savedGranularity: o.t(`granularities.${W}`)
@@ -1068,30 +1068,30 @@ const ki = () => {
1068
1068
  s("edit-tile", i.definition);
1069
1069
  }, q = () => {
1070
1070
  s("duplicate-tile", i.definition);
1071
- }, ae = () => {
1071
+ }, se = () => {
1072
1072
  s("remove-tile", i.definition);
1073
- }, Ce = (v) => {
1073
+ }, le = (v) => {
1074
1074
  n.value = v;
1075
- }, et = (v) => {
1075
+ }, ve = (v) => {
1076
1076
  d.value = v;
1077
- }, Pt = () => {
1078
- et(!0);
1077
+ }, Te = () => {
1078
+ ve(!0);
1079
1079
  };
1080
1080
  return (v, W) => {
1081
- const B = oe("KTooltip"), qe = oe("KBadge"), Re = oe("KDropdownItem"), qt = oe("KDropdown");
1081
+ const B = ae("KTooltip"), $e = ae("KBadge"), ze = ae("KDropdownItem"), qt = ae("KDropdown");
1082
1082
  return R(), F("div", {
1083
- class: Ke(["tile-boundary", { editable: v.context.editable }]),
1083
+ class: Xe(["tile-boundary", { editable: v.context.editable }]),
1084
1084
  "data-testid": `tile-${v.tileId}`
1085
1085
  }, [
1086
- v.definition.chart.type !== "slottable" ? (R(), F("div", Gi, [
1086
+ v.definition.chart.type !== "slottable" ? (R(), F("div", Ui, [
1087
1087
  ie(B, {
1088
1088
  class: "title-tooltip",
1089
- disabled: !a.value,
1089
+ disabled: !l.value,
1090
1090
  "max-width": "500",
1091
1091
  text: v.definition.chart.chart_title
1092
1092
  }, {
1093
1093
  default: I(() => [
1094
- re("div", {
1094
+ ne("div", {
1095
1095
  ref_key: "titleRef",
1096
1096
  ref: h,
1097
1097
  class: "title"
@@ -1104,31 +1104,31 @@ const ki = () => {
1104
1104
  class: "tile-actions",
1105
1105
  "data-testid": `tile-actions-${v.tileId}`
1106
1106
  }, [
1107
- x.value ? (R(), O(qe, {
1107
+ x.value ? (R(), O($e, {
1108
1108
  key: 0,
1109
1109
  "data-testid": "time-range-badge",
1110
1110
  tooltip: E.value ? N.value : void 0,
1111
1111
  "tooltip-attributes": { maxWidth: "320px" }
1112
- }, Ye({
1112
+ }, je({
1113
1113
  default: I(() => [
1114
- re("span", Fi, J(x.value), 1)
1114
+ ne("span", Wi, J(x.value), 1)
1115
1115
  ]),
1116
1116
  _: 2
1117
1117
  }, [
1118
1118
  E.value ? {
1119
1119
  name: "icon",
1120
1120
  fn: I(() => [
1121
- ie(D(ni), { size: D(Ii) }, null, 8, ["size"])
1121
+ ie(D(oi), { size: D(Pi) }, null, 8, ["size"])
1122
1122
  ]),
1123
1123
  key: "0"
1124
1124
  } : void 0
1125
1125
  ]), 1032, ["tooltip"])) : Y("", !0),
1126
- y.value && v.context.editable ? (R(), O(D(oi), {
1126
+ y.value && v.context.editable ? (R(), O(D(ai), {
1127
1127
  key: 1,
1128
1128
  class: "edit-icon",
1129
- color: D(ft),
1129
+ color: D(gt),
1130
1130
  "data-testid": `edit-tile-${v.tileId}`,
1131
- size: D(gt),
1131
+ size: D(mt),
1132
1132
  onClick: S
1133
1133
  }, null, 8, ["color", "data-testid", "size"])) : Y("", !0),
1134
1134
  y.value && g.value ? (R(), O(qt, {
@@ -1138,82 +1138,82 @@ const ki = () => {
1138
1138
  "kpop-attributes": { placement: "bottom-end" }
1139
1139
  }, {
1140
1140
  items: I(() => [
1141
- f.value ? (R(), O(Re, {
1141
+ f.value ? (R(), O(ze, {
1142
1142
  key: 0,
1143
1143
  "data-testid": `chart-jump-to-explore-${v.tileId}`,
1144
1144
  item: { label: D(o).t("jumpToExplore"), to: f.value }
1145
1145
  }, null, 8, ["data-testid", "item"])) : Y("", !0),
1146
- !("allowCsvExport" in v.definition.chart) || v.definition.chart.allowCsvExport ? (R(), O(Re, {
1146
+ !("allowCsvExport" in v.definition.chart) || v.definition.chart.allowCsvExport ? (R(), O(ze, {
1147
1147
  key: 1,
1148
1148
  class: "chart-export-button",
1149
1149
  "data-testid": `chart-csv-export-${v.tileId}`,
1150
- onClick: W[0] || (W[0] = (tt) => Pt())
1150
+ onClick: W[0] || (W[0] = (it) => Te())
1151
1151
  }, {
1152
1152
  default: I(() => [
1153
- re("span", {
1153
+ ne("span", {
1154
1154
  class: "chart-export-trigger",
1155
1155
  "data-testid": `csv-export-button-${v.tileId}`
1156
- }, J(D(o).t("csvExport.exportAsCsv")), 9, Wi)
1156
+ }, J(D(o).t("csvExport.exportAsCsv")), 9, Vi)
1157
1157
  ]),
1158
1158
  _: 1
1159
1159
  }, 8, ["data-testid"])) : Y("", !0),
1160
- v.context.editable ? (R(), O(Re, {
1160
+ v.context.editable ? (R(), O(ze, {
1161
1161
  key: 2,
1162
1162
  "data-testid": `duplicate-tile-${v.tileId}`,
1163
1163
  onClick: q
1164
1164
  }, {
1165
1165
  default: I(() => [
1166
- Me(J(D(o).t("renderer.duplicateTile")), 1)
1166
+ Pe(J(D(o).t("renderer.duplicateTile")), 1)
1167
1167
  ]),
1168
1168
  _: 1
1169
1169
  }, 8, ["data-testid"])) : Y("", !0),
1170
- v.context.editable ? (R(), O(Re, {
1170
+ v.context.editable ? (R(), O(ze, {
1171
1171
  key: 3,
1172
1172
  "data-testid": `remove-tile-${v.tileId}`,
1173
- onClick: ae
1173
+ onClick: se
1174
1174
  }, {
1175
1175
  default: I(() => [
1176
- re("span", Vi, J(D(o).t("renderer.delete")), 1)
1176
+ ne("span", Ki, J(D(o).t("renderer.delete")), 1)
1177
1177
  ]),
1178
1178
  _: 1
1179
1179
  }, 8, ["data-testid"])) : Y("", !0)
1180
1180
  ]),
1181
1181
  default: I(() => [
1182
- ie(D(ai), {
1182
+ ie(D(li), {
1183
1183
  class: "kebab-action-menu",
1184
- color: D(ft),
1184
+ color: D(gt),
1185
1185
  "data-testid": `kebab-action-menu-${v.tileId}`,
1186
- size: D(gt)
1186
+ size: D(mt)
1187
1187
  }, null, 8, ["color", "data-testid", "size"])
1188
1188
  ]),
1189
1189
  _: 1
1190
1190
  }, 8, ["data-testid"])) : Y("", !0)
1191
- ], 8, Ui)) : "description" in v.definition.chart ? (R(), F("div", {
1191
+ ], 8, Fi)) : "description" in v.definition.chart ? (R(), F("div", {
1192
1192
  key: 1,
1193
1193
  class: "header-description",
1194
1194
  "data-testid": `tile-description-${v.tileId}`
1195
- }, J(v.definition.chart.description), 9, Ki)) : Y("", !0),
1196
- d.value ? (R(), O(D(Jt), {
1195
+ }, J(v.definition.chart.description), 9, Yi)) : Y("", !0),
1196
+ d.value ? (R(), O(D(ei), {
1197
1197
  key: 2,
1198
1198
  "chart-data": n.value,
1199
1199
  "data-testid": `csv-export-modal-${v.tileId}`,
1200
1200
  filename: m.value,
1201
- onToggleModal: et
1201
+ onToggleModal: ve
1202
1202
  }, null, 8, ["chart-data", "data-testid", "filename"])) : Y("", !0)
1203
1203
  ])) : Y("", !0),
1204
- re("div", {
1204
+ ne("div", {
1205
1205
  class: "tile-content",
1206
1206
  "data-testid": `tile-content-${v.tileId}`
1207
1207
  }, [
1208
- k.value ? (R(), O(bt(k.value.component), _t({ key: 0 }, k.value.rendererProps, {
1209
- onChartData: Ce,
1210
- onZoomTimeRange: W[1] || (W[1] = (tt) => s("zoom-time-range", tt))
1208
+ k.value ? (R(), O(Et(k.value.component), wt({ key: 0 }, k.value.rendererProps, {
1209
+ onChartData: le,
1210
+ onZoomTimeRange: W[1] || (W[1] = (it) => s("zoom-time-range", it))
1211
1211
  }), null, 16)) : Y("", !0)
1212
- ], 8, Yi)
1213
- ], 10, $i);
1212
+ ], 8, Xi)
1213
+ ], 10, Gi);
1214
1214
  };
1215
1215
  }
1216
- }), ji = /* @__PURE__ */ he(Xi, [["__scopeId", "data-v-e4d72a27"]]), Qi = (u, e) => {
1216
+ }), Qi = /* @__PURE__ */ de(ji, [["__scopeId", "data-v-e4d72a27"]]), Zi = (u, e) => {
1217
1217
  let t = 0;
1218
1218
  const i = /* @__PURE__ */ new Map();
1219
1219
  e.forEach((r) => {
@@ -1224,13 +1224,13 @@ const ki = () => {
1224
1224
  for (let r = 0; r < t; r++)
1225
1225
  i.get(r) ? s.push("auto") : s.push(`${u}px`);
1226
1226
  return s;
1227
- }, Zi = /* @__PURE__ */ K({
1227
+ }, Ji = /* @__PURE__ */ K({
1228
1228
  __name: "GridLayout",
1229
1229
  props: {
1230
1230
  tileHeight: {
1231
1231
  type: Number,
1232
1232
  required: !1,
1233
- default: () => Ie
1233
+ default: () => qe
1234
1234
  },
1235
1235
  tiles: {
1236
1236
  type: Array,
@@ -1238,8 +1238,8 @@ const ki = () => {
1238
1238
  }
1239
1239
  },
1240
1240
  setup(u) {
1241
- Ve((n) => ({
1242
- "2a38e79e": D(zt),
1241
+ Ye((n) => ({
1242
+ "2a38e79e": D(Dt),
1243
1243
  "4cc71de6": r.value
1244
1244
  }));
1245
1245
  const e = u, t = U(null), i = U(0), s = new ResizeObserver((n) => {
@@ -1247,12 +1247,12 @@ const ki = () => {
1247
1247
  !Array.isArray(n) || !n.length || (i.value = n[0].contentRect.width);
1248
1248
  });
1249
1249
  });
1250
- Xe(() => {
1250
+ Qe(() => {
1251
1251
  t.value && s.observe(t.value);
1252
- }), Fe(() => {
1252
+ }), Ve(() => {
1253
1253
  t.value && s.unobserve(t.value);
1254
1254
  });
1255
- const r = A(() => Qi(e.tileHeight, e.tiles).join(" ")), o = A(() => e.tiles.map((n, d) => ({
1255
+ const r = A(() => Zi(e.tileHeight, e.tiles).join(" ")), o = A(() => e.tiles.map((n, d) => ({
1256
1256
  key: `tile-${d}`,
1257
1257
  tile: n,
1258
1258
  style: {
@@ -1267,22 +1267,22 @@ const ki = () => {
1267
1267
  ref: t,
1268
1268
  class: "kong-ui-public-grid-layout"
1269
1269
  }, [
1270
- (R(!0), F(Et, null, xt(o.value, (h) => (R(), F("div", {
1270
+ (R(!0), F(xt, null, Ct(o.value, (h) => (R(), F("div", {
1271
1271
  key: h.key,
1272
- class: Ke(["grid-cell", {
1272
+ class: Xe(["grid-cell", {
1273
1273
  "empty-cell": !h.tile
1274
1274
  }]),
1275
- style: rt(h.style)
1275
+ style: nt(h.style)
1276
1276
  }, [
1277
- Le(n.$slots, "tile", {
1278
- style: rt(h.style),
1277
+ Ie(n.$slots, "tile", {
1278
+ style: nt(h.style),
1279
1279
  tile: h.tile
1280
1280
  }, void 0, !0)
1281
1281
  ], 6))), 128))
1282
1282
  ], 512));
1283
1283
  }
1284
- }), Ji = /* @__PURE__ */ he(Zi, [["__scopeId", "data-v-354b7177"]]);
1285
- function es(u, e, t, i, s) {
1284
+ }), es = /* @__PURE__ */ de(Ji, [["__scopeId", "data-v-354b7177"]]);
1285
+ function ts(u, e, t, i, s) {
1286
1286
  const r = (...o) => (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(u, o));
1287
1287
  return r.prototype = e.prototype, r;
1288
1288
  }
@@ -1674,8 +1674,8 @@ class ee {
1674
1674
  if (i.locked || this._loading || e._moving && !e._skipDown && t.y > e.y && !this.float && // can take space we had, or before where we're going
1675
1675
  (!this.collide(i, { ...i, y: e.y }, e) || !this.collide(i, { ...i, y: t.y - i.h }, e))) {
1676
1676
  e._skipDown = e._skipDown || t.y > e.y;
1677
- const a = { ...t, y: i.y + i.h, ...n };
1678
- h = this._loading && c.samePos(e, a) ? !0 : this.moveNode(e, a), (i.locked || this._loading) && h ? c.copyPos(t, e) : !i.locked && h && s.pack && (this._packNodes(), t.y = i.y + i.h, c.copyPos(e, t)), o = o || h;
1677
+ const l = { ...t, y: i.y + i.h, ...n };
1678
+ h = this._loading && c.samePos(e, l) ? !0 : this.moveNode(e, l), (i.locked || this._loading) && h ? c.copyPos(t, e) : !i.locked && h && s.pack && (this._packNodes(), t.y = i.y + i.h, c.copyPos(e, t)), o = o || h;
1679
1679
  } else
1680
1680
  h = this.moveNode(i, { ...i, y: t.y + t.h, skip: e, ...n });
1681
1681
  if (!h)
@@ -1704,9 +1704,9 @@ class ee {
1704
1704
  if (d.locked || !d._rect)
1705
1705
  break;
1706
1706
  const h = d._rect;
1707
- let a = Number.MAX_VALUE, l = Number.MAX_VALUE;
1708
- s.y < h.y ? a = (r.y + r.h - h.y) / h.h : s.y + s.h > h.y + h.h && (a = (h.y + h.h - r.y) / h.h), s.x < h.x ? l = (r.x + r.w - h.x) / h.w : s.x + s.w > h.x + h.w && (l = (h.x + h.w - r.x) / h.w);
1709
- const f = Math.min(l, a);
1707
+ let l = Number.MAX_VALUE, a = Number.MAX_VALUE;
1708
+ s.y < h.y ? l = (r.y + r.h - h.y) / h.h : s.y + s.h > h.y + h.h && (l = (h.y + h.h - r.y) / h.h), s.x < h.x ? a = (r.x + r.w - h.x) / h.w : s.x + s.w > h.x + h.w && (a = (h.x + h.w - r.x) / h.w);
1709
+ const f = Math.min(a, l);
1710
1710
  f > n && (n = f, o = d);
1711
1711
  }
1712
1712
  return t.collide = o, o;
@@ -1884,8 +1884,8 @@ class ee {
1884
1884
  const d = n % i, h = Math.floor(n / i);
1885
1885
  if (d + e.w > i)
1886
1886
  continue;
1887
- const a = { x: d, y: h, w: e.w, h: e.h };
1888
- t.find((l) => c.isIntercepted(a, l)) || ((e.x !== d || e.y !== h) && (e._dirty = !0), e.x = d, e.y = h, delete e.autoPosition, o = !0);
1887
+ const l = { x: d, y: h, w: e.w, h: e.h };
1888
+ t.find((a) => c.isIntercepted(l, a)) || ((e.x !== d || e.y !== h) && (e._dirty = !0), e.x = d, e.y = h, delete e.autoPosition, o = !0);
1889
1889
  }
1890
1890
  return o;
1891
1891
  }
@@ -1952,7 +1952,7 @@ class ee {
1952
1952
  }
1953
1953
  /** return true if the passed in node was actually moved (checks for no-op and locked) */
1954
1954
  moveNode(e, t) {
1955
- var h, a;
1955
+ var h, l;
1956
1956
  if (!e || /*node.locked ||*/
1957
1957
  !t)
1958
1958
  return !1;
@@ -1964,9 +1964,9 @@ class ee {
1964
1964
  const o = c.copyPos({}, e), n = this.collideAll(e, r, t.skip);
1965
1965
  let d = !0;
1966
1966
  if (n.length) {
1967
- const l = e._moving && !t.nested;
1968
- let f = l ? this.directionCollideCoverage(e, t, n) : n[0];
1969
- if (l && f && ((a = (h = e.grid) == null ? void 0 : h.opts) != null && a.subGridDynamic) && !e.grid._isTemp) {
1967
+ const a = e._moving && !t.nested;
1968
+ let f = a ? this.directionCollideCoverage(e, t, n) : n[0];
1969
+ if (a && f && ((l = (h = e.grid) == null ? void 0 : h.opts) != null && l.subGridDynamic) && !e.grid._isTemp) {
1970
1970
  const m = c.areaIntercept(t.rect, f._rect), p = c.area(t.rect), y = c.area(f._rect);
1971
1971
  m / (p < y ? p : y) > 0.8 && (f.grid.makeSubGrid(f.el, void 0, e), f = void 0);
1972
1972
  }
@@ -1990,7 +1990,7 @@ class ee {
1990
1990
  var o;
1991
1991
  const i = (o = this._layouts) == null ? void 0 : o.length, s = i && this.column !== i - 1 ? this._layouts[i - 1] : null, r = [];
1992
1992
  return this.sortNodes(), this.nodes.forEach((n) => {
1993
- const d = s == null ? void 0 : s.find((a) => a._id === n._id), h = { ...n, ...d || {} };
1993
+ const d = s == null ? void 0 : s.find((l) => l._id === n._id), h = { ...n, ...d || {} };
1994
1994
  c.removeInternalForSave(h, !e), t && t(n, h), r.push(h);
1995
1995
  }), r;
1996
1996
  }
@@ -2031,18 +2031,18 @@ class ee {
2031
2031
  let r = [], o = s ? this.nodes : c.sort(this.nodes, -1);
2032
2032
  if (t > e && this._layouts) {
2033
2033
  const d = this._layouts[t] || [], h = this._layouts.length - 1;
2034
- !d.length && e !== h && ((n = this._layouts[h]) != null && n.length) && (e = h, this._layouts[h].forEach((a) => {
2035
- const l = o.find((f) => f._id === a._id);
2036
- l && (!s && !a.autoPosition && (l.x = a.x ?? l.x, l.y = a.y ?? l.y), l.w = a.w ?? l.w, (a.x == null || a.y === void 0) && (l.autoPosition = !0));
2037
- })), d.forEach((a) => {
2038
- const l = o.findIndex((f) => f._id === a._id);
2039
- if (l !== -1) {
2040
- const f = o[l];
2034
+ !d.length && e !== h && ((n = this._layouts[h]) != null && n.length) && (e = h, this._layouts[h].forEach((l) => {
2035
+ const a = o.find((f) => f._id === l._id);
2036
+ a && (!s && !l.autoPosition && (a.x = l.x ?? a.x, a.y = l.y ?? a.y), a.w = l.w ?? a.w, (l.x == null || l.y === void 0) && (a.autoPosition = !0));
2037
+ })), d.forEach((l) => {
2038
+ const a = o.findIndex((f) => f._id === l._id);
2039
+ if (a !== -1) {
2040
+ const f = o[a];
2041
2041
  if (s) {
2042
- f.w = a.w;
2042
+ f.w = l.w;
2043
2043
  return;
2044
2044
  }
2045
- (a.autoPosition || isNaN(a.x) || isNaN(a.y)) && this.findEmptyPosition(a, r), a.autoPosition || (f.x = a.x ?? f.x, f.y = a.y ?? f.y, f.w = a.w ?? f.w, r.push(f)), o.splice(l, 1);
2045
+ (l.autoPosition || isNaN(l.x) || isNaN(l.y)) && this.findEmptyPosition(l, r), l.autoPosition || (f.x = l.x ?? f.x, f.y = l.y ?? f.y, f.w = l.w ?? f.w, r.push(f)), o.splice(a, 1);
2046
2046
  }
2047
2047
  });
2048
2048
  }
@@ -2053,9 +2053,9 @@ class ee {
2053
2053
  if (typeof i == "function")
2054
2054
  i(t, e, r, o);
2055
2055
  else {
2056
- const d = s || i === "none" ? 1 : t / e, h = i === "move" || i === "moveScale", a = i === "scale" || i === "moveScale";
2057
- o.forEach((l) => {
2058
- l.x = t === 1 ? 0 : h ? Math.round(l.x * d) : Math.min(l.x, t - 1), l.w = t === 1 || e === 1 ? 1 : a ? Math.round(l.w * d) || 1 : Math.min(l.w, t), r.push(l);
2056
+ const d = s || i === "none" ? 1 : t / e, h = i === "move" || i === "moveScale", l = i === "scale" || i === "moveScale";
2057
+ o.forEach((a) => {
2058
+ a.x = t === 1 ? 0 : h ? Math.round(a.x * d) : Math.min(a.x, t - 1), a.w = t === 1 || e === 1 ? 1 : l ? Math.round(a.w * d) || 1 : Math.min(a.w, t), r.push(a);
2059
2059
  }), o = [];
2060
2060
  }
2061
2061
  r = c.sort(r, -1), this._inColumnResize = !0, this.nodes = [], r.forEach((d) => {
@@ -2146,7 +2146,7 @@ class b {
2146
2146
  const Z = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2147
2147
  class te {
2148
2148
  }
2149
- function Se(u, e) {
2149
+ function Ne(u, e) {
2150
2150
  if (u.touches.length > 1)
2151
2151
  return;
2152
2152
  u.cancelable && u.preventDefault();
@@ -2184,7 +2184,7 @@ function Se(u, e) {
2184
2184
  // relatedTarget
2185
2185
  ), u.target.dispatchEvent(i);
2186
2186
  }
2187
- function It(u, e) {
2187
+ function Pt(u, e) {
2188
2188
  u.cancelable && u.preventDefault();
2189
2189
  const t = document.createEvent("MouseEvents");
2190
2190
  t.initMouseEvent(
@@ -2220,46 +2220,46 @@ function It(u, e) {
2220
2220
  // relatedTarget
2221
2221
  ), u.target.dispatchEvent(t);
2222
2222
  }
2223
- function ke(u) {
2224
- te.touchHandled || (te.touchHandled = !0, Se(u, "mousedown"));
2223
+ function Ae(u) {
2224
+ te.touchHandled || (te.touchHandled = !0, Ne(u, "mousedown"));
2225
2225
  }
2226
- function Ne(u) {
2227
- te.touchHandled && Se(u, "mousemove");
2226
+ function He(u) {
2227
+ te.touchHandled && Ne(u, "mousemove");
2228
2228
  }
2229
- function Ae(u) {
2229
+ function Oe(u) {
2230
2230
  if (!te.touchHandled)
2231
2231
  return;
2232
2232
  te.pointerLeaveTimeout && (window.clearTimeout(te.pointerLeaveTimeout), delete te.pointerLeaveTimeout);
2233
2233
  const e = !!b.dragElement;
2234
- Se(u, "mouseup"), e || Se(u, "click"), te.touchHandled = !1;
2234
+ Ne(u, "mouseup"), e || Ne(u, "click"), te.touchHandled = !1;
2235
2235
  }
2236
- function He(u) {
2236
+ function Le(u) {
2237
2237
  u.pointerType !== "mouse" && u.target.releasePointerCapture(u.pointerId);
2238
2238
  }
2239
- function pt(u) {
2240
- b.dragElement && u.pointerType !== "mouse" && It(u, "mouseenter");
2241
- }
2242
2239
  function yt(u) {
2240
+ b.dragElement && u.pointerType !== "mouse" && Pt(u, "mouseenter");
2241
+ }
2242
+ function vt(u) {
2243
2243
  b.dragElement && u.pointerType !== "mouse" && (te.pointerLeaveTimeout = window.setTimeout(() => {
2244
- delete te.pointerLeaveTimeout, It(u, "mouseleave");
2244
+ delete te.pointerLeaveTimeout, Pt(u, "mouseleave");
2245
2245
  }, 10));
2246
2246
  }
2247
- class Pe {
2247
+ class Be {
2248
2248
  constructor(e, t, i) {
2249
2249
  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();
2250
2250
  }
2251
2251
  /** @internal */
2252
2252
  _init() {
2253
2253
  const e = this.el = document.createElement("div");
2254
- return e.classList.add("ui-resizable-handle"), e.classList.add(`${Pe.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), Z && (this.el.addEventListener("touchstart", ke), this.el.addEventListener("pointerdown", He)), this;
2254
+ return e.classList.add("ui-resizable-handle"), e.classList.add(`${Be.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), Z && (this.el.addEventListener("touchstart", Ae), this.el.addEventListener("pointerdown", Le)), this;
2255
2255
  }
2256
2256
  /** call this when resize handle needs to be removed and cleaned up */
2257
2257
  destroy() {
2258
- return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), Z && (this.el.removeEventListener("touchstart", ke), this.el.removeEventListener("pointerdown", He)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2258
+ return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), Z && (this.el.removeEventListener("touchstart", Ae), this.el.removeEventListener("pointerdown", Le)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2259
2259
  }
2260
2260
  /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
2261
2261
  _mouseDown(e) {
2262
- this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), Z && (this.el.addEventListener("touchmove", Ne), this.el.addEventListener("touchend", Ae)), e.stopPropagation(), e.preventDefault();
2262
+ this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), Z && (this.el.addEventListener("touchmove", He), this.el.addEventListener("touchend", Oe)), e.stopPropagation(), e.preventDefault();
2263
2263
  }
2264
2264
  /** @internal */
2265
2265
  _mouseMove(e) {
@@ -2268,7 +2268,7 @@ class Pe {
2268
2268
  }
2269
2269
  /** @internal */
2270
2270
  _mouseUp(e) {
2271
- this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), Z && (this.el.removeEventListener("touchmove", Ne), this.el.removeEventListener("touchend", Ae)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2271
+ this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), Z && (this.el.removeEventListener("touchmove", He), this.el.removeEventListener("touchend", Oe)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2272
2272
  }
2273
2273
  /** @internal call when keys are being pressed - use Esc to cancel */
2274
2274
  _keyEvent(e) {
@@ -2280,8 +2280,8 @@ class Pe {
2280
2280
  return this.option[e] && this.option[e](t), this;
2281
2281
  }
2282
2282
  }
2283
- Pe.prefix = "ui-resizable-";
2284
- class Ze {
2283
+ Be.prefix = "ui-resizable-";
2284
+ class et {
2285
2285
  constructor() {
2286
2286
  this._eventRegister = {};
2287
2287
  }
@@ -2309,7 +2309,7 @@ class Ze {
2309
2309
  return this._eventRegister[e](t);
2310
2310
  }
2311
2311
  }
2312
- class ve extends Ze {
2312
+ class we extends et {
2313
2313
  // have to be public else complains for HTMLElementExtendOpt ?
2314
2314
  constructor(e, t = {}) {
2315
2315
  super(), this.el = e, this.option = t, this.rectScale = { x: 1, y: 1 }, this._ui = () => {
@@ -2379,7 +2379,7 @@ class ve extends Ze {
2379
2379
  }
2380
2380
  /** @internal */
2381
2381
  _setupHandlers() {
2382
- return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new Pe(this.el, e, {
2382
+ return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new Be(this.el, e, {
2383
2383
  start: (t) => {
2384
2384
  this._resizeStart(t);
2385
2385
  },
@@ -2410,7 +2410,7 @@ class ve extends Ze {
2410
2410
  }
2411
2411
  /** @internal */
2412
2412
  _setupHelper() {
2413
- this.elOriginStyleVal = ve._originStyleProp.map((i) => this.el.style[i]), this.parentOriginStylePosition = this.el.parentElement.style.position;
2413
+ this.elOriginStyleVal = we._originStyleProp.map((i) => this.el.style[i]), this.parentOriginStylePosition = this.el.parentElement.style.position;
2414
2414
  const e = this.el.parentElement, t = c.getValuesFromTransformedElement(e);
2415
2415
  return this.rectScale = {
2416
2416
  x: t.xScale,
@@ -2419,7 +2419,7 @@ class ve extends Ze {
2419
2419
  }
2420
2420
  /** @internal */
2421
2421
  _cleanHelper() {
2422
- return ve._originStyleProp.forEach((e, t) => {
2422
+ return we._originStyleProp.forEach((e, t) => {
2423
2423
  this.el.style[e] = this.elOriginStyleVal[t] || null;
2424
2424
  }), this.el.parentElement.style.position = this.parentOriginStylePosition || null, this;
2425
2425
  }
@@ -2438,8 +2438,8 @@ class ve extends Ze {
2438
2438
  }
2439
2439
  /** @internal constrain the size to the set min/max values */
2440
2440
  _constrainSize(e, t, i, s) {
2441
- const r = this.option, o = (i ? r.maxWidthMoveLeft : r.maxWidth) || Number.MAX_SAFE_INTEGER, n = r.minWidth / this.rectScale.x || e, d = (s ? r.maxHeightMoveUp : r.maxHeight) || Number.MAX_SAFE_INTEGER, h = r.minHeight / this.rectScale.y || t, a = Math.min(o, Math.max(n, e)), l = Math.min(d, Math.max(h, t));
2442
- return { width: a, height: l };
2441
+ const r = this.option, o = (i ? r.maxWidthMoveLeft : r.maxWidth) || Number.MAX_SAFE_INTEGER, n = r.minWidth / this.rectScale.x || e, d = (s ? r.maxHeightMoveUp : r.maxHeight) || Number.MAX_SAFE_INTEGER, h = r.minHeight / this.rectScale.y || t, l = Math.min(o, Math.max(n, e)), a = Math.min(d, Math.max(h, t));
2442
+ return { width: l, height: a };
2443
2443
  }
2444
2444
  /** @internal */
2445
2445
  _applyChange() {
@@ -2458,9 +2458,9 @@ class ve extends Ze {
2458
2458
  return this.handlers.forEach((e) => e.destroy()), delete this.handlers, this;
2459
2459
  }
2460
2460
  }
2461
- ve._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
2462
- const ts = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
2463
- class _e extends Ze {
2461
+ we._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
2462
+ const is = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
2463
+ class be extends et {
2464
2464
  constructor(e, t = {}) {
2465
2465
  var r;
2466
2466
  super(), this.el = e, this.option = t, this.dragTransform = {
@@ -2480,12 +2480,12 @@ class _e extends Ze {
2480
2480
  }
2481
2481
  enable() {
2482
2482
  this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
2483
- e.addEventListener("mousedown", this._mouseDown), Z && (e.addEventListener("touchstart", ke), e.addEventListener("pointerdown", He));
2483
+ e.addEventListener("mousedown", this._mouseDown), Z && (e.addEventListener("touchstart", Ae), e.addEventListener("pointerdown", Le));
2484
2484
  }), this.el.classList.remove("ui-draggable-disabled"));
2485
2485
  }
2486
2486
  disable(e = !1) {
2487
2487
  this.disabled !== !0 && (super.disable(), this.dragEls.forEach((t) => {
2488
- t.removeEventListener("mousedown", this._mouseDown), Z && (t.removeEventListener("touchstart", ke), t.removeEventListener("pointerdown", He));
2488
+ t.removeEventListener("mousedown", this._mouseDown), Z && (t.removeEventListener("touchstart", Ae), t.removeEventListener("pointerdown", Le));
2489
2489
  }), e || this.el.classList.add("ui-draggable-disabled"));
2490
2490
  }
2491
2491
  destroy() {
@@ -2497,7 +2497,7 @@ class _e extends Ze {
2497
2497
  /** @internal call when mouse goes down before a dragstart happens */
2498
2498
  _mouseDown(e) {
2499
2499
  if (!b.mouseHandled)
2500
- return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(ts) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete b.dragElement, delete b.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), Z && (e.currentTarget.addEventListener("touchmove", Ne), e.currentTarget.addEventListener("touchend", Ae)), e.preventDefault(), document.activeElement && document.activeElement.blur(), b.mouseHandled = !0), !0;
2500
+ return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(is) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete b.dragElement, delete b.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), Z && (e.currentTarget.addEventListener("touchmove", He), e.currentTarget.addEventListener("touchend", Oe)), e.preventDefault(), document.activeElement && document.activeElement.blur(), b.mouseHandled = !0), !0;
2501
2501
  }
2502
2502
  /** @internal method to call actual drag event */
2503
2503
  _callDrag(e) {
@@ -2528,7 +2528,7 @@ class _e extends Ze {
2528
2528
  /** @internal call when the mouse gets released to drop the item at current location */
2529
2529
  _mouseUp(e) {
2530
2530
  var t, i;
2531
- if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), Z && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", Ne, !0), e.currentTarget.removeEventListener("touchend", Ae, !0)), this.dragging) {
2531
+ if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), Z && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", He, !0), e.currentTarget.removeEventListener("touchend", Oe, !0)), this.dragging) {
2532
2532
  delete this.dragging, (t = this.el.gridstackNode) == null || delete t._origRotate, document.removeEventListener("keydown", this._keyEvent), ((i = b.dropElement) == null ? void 0 : i.el) === this.el.parentElement && delete b.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
2533
2533
  const s = c.initEvent(e, { target: this.el, type: "dragstop" });
2534
2534
  this.option.stop && this.option.stop(s), this.triggerEvent("dragstop", s), b.dropElement && b.dropElement.drop(e);
@@ -2550,7 +2550,7 @@ class _e extends Ze {
2550
2550
  /** @internal create a clone copy (or user defined method) of the original drag item if set */
2551
2551
  _createHelper() {
2552
2552
  let e = this.el;
2553
- return typeof this.option.helper == "function" ? e = this.option.helper(this.el) : this.option.helper === "clone" && (e = c.cloneNode(this.el)), document.body.contains(e) || c.appendTo(e, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle = _e.originStyleProp.map((t) => this.el.style[t]), e;
2553
+ return typeof this.option.helper == "function" ? e = this.option.helper(this.el) : this.option.helper === "clone" && (e = c.cloneNode(this.el)), document.body.contains(e) || c.appendTo(e, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle = be.originStyleProp.map((t) => this.el.style[t]), e;
2554
2554
  }
2555
2555
  /** @internal set the fix position of the dragged item */
2556
2556
  _setupHelperStyle(e) {
@@ -2567,7 +2567,7 @@ class _e extends Ze {
2567
2567
  const e = (t = this.helper) == null ? void 0 : t.gridstackNode;
2568
2568
  if (!(e != null && e._isAboutToRemove) && this.dragElementOriginStyle) {
2569
2569
  const i = this.helper, s = this.dragElementOriginStyle.transition || null;
2570
- i.style.transition = this.dragElementOriginStyle.transition = "none", _e.originStyleProp.forEach((r) => i.style[r] = this.dragElementOriginStyle[r] || null), setTimeout(() => i.style.transition = s, 50);
2570
+ i.style.transition = this.dragElementOriginStyle.transition = "none", be.originStyleProp.forEach((r) => i.style[r] = this.dragElementOriginStyle[r] || null), setTimeout(() => i.style.transition = s, 50);
2571
2571
  }
2572
2572
  return delete this.dragElementOriginStyle, this;
2573
2573
  }
@@ -2609,8 +2609,8 @@ class _e extends Ze {
2609
2609
  };
2610
2610
  }
2611
2611
  }
2612
- _e.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
2613
- class is extends Ze {
2612
+ be.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
2613
+ class ss extends et {
2614
2614
  constructor(e, t = {}) {
2615
2615
  super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
2616
2616
  }
@@ -2621,10 +2621,10 @@ class is extends Ze {
2621
2621
  super.off(e);
2622
2622
  }
2623
2623
  enable() {
2624
- 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), Z && (this.el.addEventListener("pointerenter", pt), this.el.addEventListener("pointerleave", yt)));
2624
+ 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), Z && (this.el.addEventListener("pointerenter", yt), this.el.addEventListener("pointerleave", vt)));
2625
2625
  }
2626
2626
  disable(e = !1) {
2627
- 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), Z && (this.el.removeEventListener("pointerenter", pt), this.el.removeEventListener("pointerleave", yt)));
2627
+ 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), Z && (this.el.removeEventListener("pointerenter", yt), this.el.removeEventListener("pointerleave", vt)));
2628
2628
  }
2629
2629
  destroy() {
2630
2630
  this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
@@ -2676,9 +2676,9 @@ class is extends Ze {
2676
2676
  };
2677
2677
  }
2678
2678
  }
2679
- class Je {
2679
+ class tt {
2680
2680
  static init(e) {
2681
- return e.ddElement || (e.ddElement = new Je(e)), e.ddElement;
2681
+ return e.ddElement || (e.ddElement = new tt(e)), e.ddElement;
2682
2682
  }
2683
2683
  constructor(e) {
2684
2684
  this.el = e;
@@ -2690,25 +2690,25 @@ class Je {
2690
2690
  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;
2691
2691
  }
2692
2692
  setupDraggable(e) {
2693
- return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new _e(this.el, e), this;
2693
+ return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new be(this.el, e), this;
2694
2694
  }
2695
2695
  cleanDraggable() {
2696
2696
  return this.ddDraggable && (this.ddDraggable.destroy(), delete this.ddDraggable), this;
2697
2697
  }
2698
2698
  setupResizable(e) {
2699
- return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new ve(this.el, e), this;
2699
+ return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new we(this.el, e), this;
2700
2700
  }
2701
2701
  cleanResizable() {
2702
2702
  return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
2703
2703
  }
2704
2704
  setupDroppable(e) {
2705
- return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new is(this.el, e), this;
2705
+ return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new ss(this.el, e), this;
2706
2706
  }
2707
2707
  cleanDroppable() {
2708
2708
  return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
2709
2709
  }
2710
2710
  }
2711
- class ss {
2711
+ class rs {
2712
2712
  resizable(e, t, i, s) {
2713
2713
  return this._getDDElements(e).forEach((r) => {
2714
2714
  if (t === "disable" || t === "enable")
@@ -2789,7 +2789,7 @@ class ss {
2789
2789
  const i = c.getElements(e);
2790
2790
  if (!i.length)
2791
2791
  return [];
2792
- const s = i.map((r) => r.ddElement || (t ? Je.init(r) : null));
2792
+ const s = i.map((r) => r.ddElement || (t ? tt.init(r) : null));
2793
2793
  return t || s.filter((r) => r), s;
2794
2794
  }
2795
2795
  }
@@ -2800,7 +2800,7 @@ class ss {
2800
2800
  * Copyright (c) 2021-2024 Alain Dumesny
2801
2801
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
2802
2802
  */
2803
- const $ = new ss();
2803
+ const $ = new rs();
2804
2804
  class w {
2805
2805
  /**
2806
2806
  * initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
@@ -2877,11 +2877,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2877
2877
  * @param opts grid options - public for classes to access, but use methods to modify!
2878
2878
  */
2879
2879
  constructor(e, t = {}) {
2880
- var l, f, m;
2880
+ var a, f, m;
2881
2881
  this.el = e, this.opts = t, this.animationDelay = 310, this._gsEventHandler = {}, this._extraDragRow = 0, this.dragTransform = { xScale: 1, yScale: 1, xOffset: 0, yOffset: 0 }, e.gridstack = this, this.opts = t = t || {}, e.classList.contains("grid-stack") || this.el.classList.add("grid-stack"), t.row && (t.minRow = t.maxRow = t.row, delete t.row);
2882
2882
  const i = c.toNumber(e.getAttribute("gs-row"));
2883
2883
  t.column === "auto" && delete t.column, t.alwaysShowResizeHandle !== void 0 && (t._alwaysShowResizeHandle = t.alwaysShowResizeHandle);
2884
- let s = (l = t.columnOpts) == null ? void 0 : l.breakpoints;
2884
+ let s = (a = t.columnOpts) == null ? void 0 : a.breakpoints;
2885
2885
  const r = t;
2886
2886
  if (r.oneColumnModeDomSort && (delete r.oneColumnModeDomSort, console.log("warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.")), r.oneColumnSize || r.disableOneColumnMode === !1) {
2887
2887
  const p = r.oneColumnSize || 768;
@@ -2909,8 +2909,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2909
2909
  e.getAttribute("gs-animate") && (n.animate = c.toBool(e.getAttribute("gs-animate"))), t = c.defaults(t, n), this._initMargin(), this.checkDynamicColumn(), this.el.classList.add("gs-" + t.column), t.rtl === "auto" && (t.rtl = e.style.direction === "rtl"), t.rtl && this.el.classList.add("grid-stack-rtl");
2910
2910
  const d = this.el.closest("." + V.itemClass), h = d == null ? void 0 : d.gridstackNode;
2911
2911
  h && (h.subGrid = this, this.parentGridNode = h, this.el.classList.add("grid-stack-nested"), h.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== V.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = Z), this._styleSheetClass = "gs-id-" + ee._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
2912
- const a = t.engineClass || w.engineClass || ee;
2913
- if (this.engine = new a({
2912
+ const l = t.engineClass || w.engineClass || ee;
2913
+ if (this.engine = new l({
2914
2914
  column: this.getColumn(),
2915
2915
  float: t.float,
2916
2916
  maxRow: t.maxRow,
@@ -2988,13 +2988,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
2988
2988
  }), r.subGridOpts = t;
2989
2989
  let d;
2990
2990
  t.column === "auto" && (d = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
2991
- let h = r.el.querySelector(".grid-stack-item-content"), a, l;
2992
- if (s && (this._removeDD(r.el), l = { ...r, x: 0, y: 0 }, c.removeInternalForSave(l), delete l.subGridOpts, r.content && (l.content = r.content, delete r.content), w.addRemoveCB ? a = w.addRemoveCB(this.el, l, !0, !1) : (a = c.createDiv(["grid-stack-item"]), a.appendChild(h), h = c.createDiv(["grid-stack-item-content"], r.el)), this._prepareDragDropByNode(r)), i) {
2991
+ let h = r.el.querySelector(".grid-stack-item-content"), l, a;
2992
+ if (s && (this._removeDD(r.el), a = { ...r, x: 0, y: 0 }, c.removeInternalForSave(a), delete a.subGridOpts, r.content && (a.content = r.content, delete r.content), w.addRemoveCB ? l = w.addRemoveCB(this.el, a, !0, !1) : (l = c.createDiv(["grid-stack-item"]), l.appendChild(h), h = c.createDiv(["grid-stack-item-content"], r.el)), this._prepareDragDropByNode(r)), i) {
2993
2993
  const g = d ? t.column : r.w, T = r.h + i.h, k = r.el.style;
2994
2994
  k.transition = "none", this.update(r.el, { w: g, h: T }), setTimeout(() => k.transition = null);
2995
2995
  }
2996
2996
  const f = r.subGrid = w.addGrid(h, t);
2997
- return i != null && i._moving && (f._isTemp = !0), d && (f._autoColumn = !0), s && f.makeWidget(a, l), i && (i._moving ? window.setTimeout(() => c.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
2997
+ return i != null && i._moving && (f._isTemp = !0), d && (f._autoColumn = !0), s && f.makeWidget(l, a), i && (i._moving ? window.setTimeout(() => c.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
2998
2998
  }
2999
2999
  /**
3000
3000
  * called when an item was converted into a nested grid to accommodate a dragged over item, but then item leaves - return back
@@ -3050,33 +3050,33 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3050
3050
  var h;
3051
3051
  e = c.cloneDeep(e);
3052
3052
  const i = this.getColumn();
3053
- e.forEach((a) => {
3054
- a.w = a.w || 1, a.h = a.h || 1;
3053
+ e.forEach((l) => {
3054
+ l.w = l.w || 1, l.h = l.h || 1;
3055
3055
  }), e = c.sort(e), this.engine.skipCacheUpdate = this._ignoreLayoutsNodeChange = !0;
3056
3056
  let s = 0;
3057
- e.forEach((a) => {
3058
- s = Math.max(s, (a.x || 0) + a.w);
3057
+ e.forEach((l) => {
3058
+ s = Math.max(s, (l.x || 0) + l.w);
3059
3059
  }), s > this.engine.defaultColumn && (this.engine.defaultColumn = s), s > i && this.engine.cacheLayout(e, s, !0);
3060
3060
  const r = w.addRemoveCB;
3061
3061
  typeof t == "function" && (w.addRemoveCB = t);
3062
3062
  const o = [];
3063
3063
  this.batchUpdate();
3064
3064
  const n = !this.engine.nodes.length;
3065
- n && this.setAnimation(!1), !n && t && [...this.engine.nodes].forEach((l) => {
3066
- if (!l.id)
3065
+ n && this.setAnimation(!1), !n && t && [...this.engine.nodes].forEach((a) => {
3066
+ if (!a.id)
3067
3067
  return;
3068
- c.find(e, l.id) || (w.addRemoveCB && w.addRemoveCB(this.el, l, !1, !1), o.push(l), this.removeWidget(l.el, !0, !1));
3068
+ c.find(e, a.id) || (w.addRemoveCB && w.addRemoveCB(this.el, a, !1, !1), o.push(a), this.removeWidget(a.el, !0, !1));
3069
3069
  }), this.engine._loading = !0;
3070
3070
  const d = [];
3071
- return this.engine.nodes = this.engine.nodes.filter((a) => c.find(e, a.id) ? (d.push(a), !1) : !0), e.forEach((a) => {
3071
+ return this.engine.nodes = this.engine.nodes.filter((l) => c.find(e, l.id) ? (d.push(l), !1) : !0), e.forEach((l) => {
3072
3072
  var f;
3073
- const l = c.find(d, a.id);
3074
- if (l) {
3075
- if (c.shouldSizeToContent(l) && (a.h = l.h), this.engine.nodeBoundFix(a), (a.autoPosition || a.x === void 0 || a.y === void 0) && (a.w = a.w || l.w, a.h = a.h || l.h, this.engine.findEmptyPosition(a)), this.engine.nodes.push(l), c.samePos(l, a) && this.engine.nodes.length > 1 && (this.moveNode(l, { ...a, forceCollide: !0 }), c.copyPos(a, l)), this.update(l.el, a), (f = a.subGridOpts) != null && f.children) {
3076
- const m = l.el.querySelector(".grid-stack");
3077
- m && m.gridstack && m.gridstack.load(a.subGridOpts.children);
3073
+ const a = c.find(d, l.id);
3074
+ if (a) {
3075
+ if (c.shouldSizeToContent(a) && (l.h = a.h), this.engine.nodeBoundFix(l), (l.autoPosition || l.x === void 0 || l.y === void 0) && (l.w = l.w || a.w, l.h = l.h || a.h, this.engine.findEmptyPosition(l)), this.engine.nodes.push(a), c.samePos(a, l) && this.engine.nodes.length > 1 && (this.moveNode(a, { ...l, forceCollide: !0 }), c.copyPos(l, a)), this.update(a.el, l), (f = l.subGridOpts) != null && f.children) {
3076
+ const m = a.el.querySelector(".grid-stack");
3077
+ m && m.gridstack && m.gridstack.load(l.subGridOpts.children);
3078
3078
  }
3079
- } else t && this.addWidget(a);
3079
+ } else t && this.addWidget(l);
3080
3080
  }), delete this.engine._loading, this.engine.removedNodes = o, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ? w.addRemoveCB = r : delete w.addRemoveCB, n && ((h = this.opts) != null && h.animate) && this.setAnimation(this.opts.animate, !0), this;
3081
3081
  }
3082
3082
  /**
@@ -3354,7 +3354,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3354
3354
  return t = { x: i[s++], y: i[s++], w: i[s++], h: i[s++] }, this.update(e, t);
3355
3355
  }
3356
3356
  return w.getElements(e).forEach((i) => {
3357
- var a;
3357
+ var l;
3358
3358
  const s = i == null ? void 0 : i.gridstackNode;
3359
3359
  if (!s)
3360
3360
  return;
@@ -3362,18 +3362,18 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3362
3362
  this.engine.nodeBoundFix(r), delete r.autoPosition;
3363
3363
  const o = ["x", "y", "w", "h"];
3364
3364
  let n;
3365
- if (o.some((l) => r[l] !== void 0 && r[l] !== s[l]) && (n = {}, o.forEach((l) => {
3366
- n[l] = r[l] !== void 0 ? r[l] : s[l], delete r[l];
3365
+ if (o.some((a) => r[a] !== void 0 && r[a] !== s[a]) && (n = {}, o.forEach((a) => {
3366
+ n[a] = r[a] !== void 0 ? r[a] : s[a], delete r[a];
3367
3367
  })), !n && (r.minW || r.minH || r.maxW || r.maxH) && (n = {}), r.content !== void 0) {
3368
- const l = i.querySelector(".grid-stack-item-content");
3369
- l && l.textContent !== r.content && (s.content = r.content, w.renderCB(l, r), (a = s.subGrid) != null && a.el && (l.appendChild(s.subGrid.el), s.subGrid.opts.styleInHead || s.subGrid._updateStyles(!0))), delete r.content;
3368
+ const a = i.querySelector(".grid-stack-item-content");
3369
+ a && a.textContent !== r.content && (s.content = r.content, w.renderCB(a, r), (l = s.subGrid) != null && l.el && (a.appendChild(s.subGrid.el), s.subGrid.opts.styleInHead || s.subGrid._updateStyles(!0))), delete r.content;
3370
3370
  }
3371
3371
  let d = !1, h = !1;
3372
- for (const l in r)
3373
- l[0] !== "_" && s[l] !== r[l] && (s[l] = r[l], d = !0, h = h || !this.opts.staticGrid && (l === "noResize" || l === "noMove" || l === "locked"));
3372
+ for (const a in r)
3373
+ a[0] !== "_" && s[a] !== r[a] && (s[a] = r[a], d = !0, h = h || !this.opts.staticGrid && (a === "noResize" || a === "noMove" || a === "locked"));
3374
3374
  if (c.sanitizeMinMax(s), n) {
3375
- const l = n.w !== void 0 && n.w !== s.w;
3376
- this.moveNode(s, n), l && s.subGrid ? s.subGrid.onResize(this.hasAnimationCSS() ? s.w : void 0) : this.resizeToContentCheck(l, s), delete s._orig;
3375
+ const a = n.w !== void 0 && n.w !== s.w;
3376
+ this.moveNode(s, n), a && s.subGrid ? s.subGrid.onResize(this.hasAnimationCSS() ? s.w : void 0) : this.resizeToContentCheck(a, s), delete s._orig;
3377
3377
  }
3378
3378
  (n || d) && this._writeAttr(i, s), h && this._prepareDragDropByNode(s);
3379
3379
  }), this;
@@ -3425,9 +3425,9 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3425
3425
  if (d === h)
3426
3426
  return;
3427
3427
  r += h - d;
3428
- let a = Math.ceil(r / s);
3429
- const l = Number.isInteger(t.sizeToContent) ? t.sizeToContent : 0;
3430
- l && a > l && (a = l, e.classList.add("size-to-content-max")), t.minH && a < t.minH ? a = t.minH : t.maxH && a > t.maxH && (a = t.maxH), a !== t.h && (i._ignoreLayoutsNodeChange = !0, i.moveNode(t, { h: a }), delete i._ignoreLayoutsNodeChange);
3428
+ let l = Math.ceil(r / s);
3429
+ const a = Number.isInteger(t.sizeToContent) ? t.sizeToContent : 0;
3430
+ a && l > a && (l = a, e.classList.add("size-to-content-max")), t.minH && l < t.minH ? l = t.minH : t.maxH && l > t.maxH && (l = t.maxH), l !== t.h && (i._ignoreLayoutsNodeChange = !0, i.moveNode(t, { h: l }), delete i._ignoreLayoutsNodeChange);
3431
3431
  }
3432
3432
  /** call the user resize (so they can do extra work) else our build in version */
3433
3433
  resizeToContentCBCheck(e) {
@@ -3548,8 +3548,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3548
3548
  }), !this._styles)
3549
3549
  return this;
3550
3550
  this._styles._max = 0, c.addCSSRule(this._styles, r, `height: ${i}${s}`);
3551
- const n = this.opts.marginTop + this.opts.marginUnit, d = this.opts.marginBottom + this.opts.marginUnit, h = this.opts.marginRight + this.opts.marginUnit, a = this.opts.marginLeft + this.opts.marginUnit, l = `${r} > .grid-stack-item-content`, f = `.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;
3552
- c.addCSSRule(this._styles, l, `top: ${n}; right: ${h}; bottom: ${d}; left: ${a};`), c.addCSSRule(this._styles, f, `top: ${n}; right: ${h}; bottom: ${d}; left: ${a};`), c.addCSSRule(this._styles, `${r} > .ui-resizable-n`, `top: ${n};`), c.addCSSRule(this._styles, `${r} > .ui-resizable-s`, `bottom: ${d}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-ne`, `right: ${h}; top: ${n}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-e`, `right: ${h}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-se`, `right: ${h}; bottom: ${d}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-nw`, `left: ${a}; top: ${n}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-w`, `left: ${a}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-sw`, `left: ${a}; bottom: ${d}`);
3551
+ const n = this.opts.marginTop + this.opts.marginUnit, d = this.opts.marginBottom + this.opts.marginUnit, h = this.opts.marginRight + this.opts.marginUnit, l = this.opts.marginLeft + this.opts.marginUnit, a = `${r} > .grid-stack-item-content`, f = `.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;
3552
+ c.addCSSRule(this._styles, a, `top: ${n}; right: ${h}; bottom: ${d}; left: ${l};`), c.addCSSRule(this._styles, f, `top: ${n}; right: ${h}; bottom: ${d}; left: ${l};`), c.addCSSRule(this._styles, `${r} > .ui-resizable-n`, `top: ${n};`), c.addCSSRule(this._styles, `${r} > .ui-resizable-s`, `bottom: ${d}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-ne`, `right: ${h}; top: ${n}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-e`, `right: ${h}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-se`, `right: ${h}; bottom: ${d}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-nw`, `left: ${l}; top: ${n}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-w`, `left: ${l}`), c.addCSSRule(this._styles, `${r} > .ui-resizable-sw`, `left: ${l}; bottom: ${d}`);
3553
3553
  }
3554
3554
  if (t = t || this._styles._max, t > this._styles._max) {
3555
3555
  const o = (n) => i * n + s;
@@ -3794,9 +3794,9 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3794
3794
  o.style.left = m.x + (this.dragTransform.xScale - 1) * (s.clientX - m.x) / this.dragTransform.xScale + "px", o.style.top = m.y + (this.dragTransform.yScale - 1) * (s.clientY - m.y) / this.dragTransform.yScale + "px", o.style.transformOrigin = "0px 0px";
3795
3795
  }
3796
3796
  let { top: d, left: h } = o.getBoundingClientRect();
3797
- const a = this.el.getBoundingClientRect();
3798
- h -= a.left, d -= a.top;
3799
- const l = {
3797
+ const l = this.el.getBoundingClientRect();
3798
+ h -= l.left, d -= l.top;
3799
+ const a = {
3800
3800
  position: {
3801
3801
  top: d * this.dragTransform.xScale,
3802
3802
  left: h * this.dragTransform.yScale
@@ -3810,9 +3810,9 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3810
3810
  }
3811
3811
  n._willFitPos && (c.copyPos(n, n._willFitPos), delete n._willFitPos);
3812
3812
  }
3813
- this._onStartMoving(o, s, l, n, t, e);
3813
+ this._onStartMoving(o, s, a, n, t, e);
3814
3814
  } else
3815
- this._dragOrResize(o, s, l, n, t, e);
3815
+ this._dragOrResize(o, s, a, n, t, e);
3816
3816
  };
3817
3817
  return $.droppable(this.el, {
3818
3818
  accept: (s) => {
@@ -3839,12 +3839,12 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3839
3839
  if ((n == null ? void 0 : n.grid) === this && !n._temporaryRemoved)
3840
3840
  return !1;
3841
3841
  if (n != null && n.grid && n.grid !== this && !n._temporaryRemoved && n.grid._leave(r, o), o = o || r, t = this.cellWidth(), e = this.getCellHeight(!0), !n) {
3842
- const a = o.getAttribute("data-gs-widget") || o.getAttribute("gridstacknode");
3843
- if (a) {
3842
+ const l = o.getAttribute("data-gs-widget") || o.getAttribute("gridstacknode");
3843
+ if (l) {
3844
3844
  try {
3845
- n = JSON.parse(a);
3845
+ n = JSON.parse(l);
3846
3846
  } catch {
3847
- console.error("Gridstack dropover: Bad JSON format: ", a);
3847
+ console.error("Gridstack dropover: Bad JSON format: ", l);
3848
3848
  }
3849
3849
  o.removeAttribute("data-gs-widget"), o.removeAttribute("gridstacknode");
3850
3850
  }
@@ -3864,17 +3864,17 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3864
3864
  return !1;
3865
3865
  const d = !!this.placeholder.parentElement, h = r !== o;
3866
3866
  this.placeholder.remove(), delete this.placeholder.gridstackNode;
3867
- const a = d && this.opts.animate;
3868
- a && this.setAnimation(!1);
3869
- const l = r._gridstackNodeOrig;
3870
- if (delete r._gridstackNodeOrig, d && (l != null && l.grid) && l.grid !== this) {
3871
- const g = l.grid;
3872
- g.engine.removeNodeFromLayoutCache(l), g.engine.removedNodes.push(l), g._triggerRemoveEvent()._triggerChangeEvent(), g.parentGridNode && !g.engine.nodes.length && g.opts.subGridDynamic && g.removeAsSubGrid();
3867
+ const l = d && this.opts.animate;
3868
+ l && this.setAnimation(!1);
3869
+ const a = r._gridstackNodeOrig;
3870
+ if (delete r._gridstackNodeOrig, d && (a != null && a.grid) && a.grid !== this) {
3871
+ const g = a.grid;
3872
+ g.engine.removeNodeFromLayoutCache(a), g.engine.removedNodes.push(a), g._triggerRemoveEvent()._triggerChangeEvent(), g.parentGridNode && !g.engine.nodes.length && g.opts.subGridDynamic && g.removeAsSubGrid();
3873
3873
  }
3874
3874
  if (!n || (d && (this.engine.cleanupNode(n), n.grid = this), (m = n.grid) == null || delete m._isTemp, $.off(r, "drag"), o !== r ? (o.remove(), r = o) : r.remove(), this._removeDD(r), !d))
3875
3875
  return !1;
3876
3876
  const f = (y = (p = n.subGrid) == null ? void 0 : p.el) == null ? void 0 : y.gridstack;
3877
- return c.copyPos(n, this._readAttr(this.placeholder)), c.removePositioningStyles(r), h && (n.content || n.subGridOpts || w.addRemoveCB) ? (delete n.el, r = this.addWidget(n)) : (this._prepareElement(r, !0, n), this.el.appendChild(r), this.resizeToContentCheck(!1, n), f && (f.parentGridNode = n, f.opts.styleInHead || f._updateStyles(!0)), this._updateContainerHeight()), this.engine.addedNodes.push(n), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, l && l.grid ? l : void 0, n), a && this.setAnimation(this.opts.animate, !0), !1;
3877
+ return c.copyPos(n, this._readAttr(this.placeholder)), c.removePositioningStyles(r), h && (n.content || n.subGridOpts || w.addRemoveCB) ? (delete n.el, r = this.addWidget(n)) : (this._prepareElement(r, !0, n), this.el.appendChild(r), this.resizeToContentCheck(!1, n), f && (f.parentGridNode = n, f.opts.styleInHead || f._updateStyles(!0)), this._updateContainerHeight()), this.engine.addedNodes.push(n), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, a && a.grid ? a : void 0, n), l && this.setAnimation(this.opts.animate, !0), !1;
3878
3878
  }), this;
3879
3879
  }
3880
3880
  /** @internal mark item for removal */
@@ -3898,20 +3898,20 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3898
3898
  return e._initDD && (this._removeDD(t), delete e._initDD), t.classList.add("ui-draggable-disabled", "ui-resizable-disabled"), this;
3899
3899
  if (!e._initDD) {
3900
3900
  let r, o;
3901
- const n = (a, l) => {
3902
- this._gsEventHandler[a.type] && this._gsEventHandler[a.type](a, a.target), r = this.cellWidth(), o = this.getCellHeight(!0), this._onStartMoving(t, a, l, e, r, o);
3903
- }, d = (a, l) => {
3904
- this._dragOrResize(t, a, l, e, r, o);
3905
- }, h = (a) => {
3901
+ const n = (l, a) => {
3902
+ this._gsEventHandler[l.type] && this._gsEventHandler[l.type](l, l.target), r = this.cellWidth(), o = this.getCellHeight(!0), this._onStartMoving(t, l, a, e, r, o);
3903
+ }, d = (l, a) => {
3904
+ this._dragOrResize(t, l, a, e, r, o);
3905
+ }, h = (l) => {
3906
3906
  this.placeholder.remove(), delete this.placeholder.gridstackNode, delete e._moving, delete e._event, delete e._lastTried;
3907
- const l = e.w !== e._orig.w, f = a.target;
3907
+ const a = e.w !== e._orig.w, f = l.target;
3908
3908
  if (!(!f.gridstackNode || f.gridstackNode.grid !== this)) {
3909
3909
  if (e.el = f, e._isAboutToRemove) {
3910
3910
  const m = t.gridstackNode.grid;
3911
- m._gsEventHandler[a.type] && m._gsEventHandler[a.type](a, f), m.engine.nodes.push(e), m.removeWidget(t, !0, !0);
3911
+ m._gsEventHandler[l.type] && m._gsEventHandler[l.type](l, f), m.engine.nodes.push(e), m.removeWidget(t, !0, !0);
3912
3912
  } else
3913
- c.removePositioningStyles(f), e._temporaryRemoved ? (c.copyPos(e, e._orig), this._writePosAttr(f, e), this.engine.addNode(e)) : this._writePosAttr(f, e), this._gsEventHandler[a.type] && this._gsEventHandler[a.type](a, f);
3914
- this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), a.type === "resizestop" && (Number.isInteger(e.sizeToContent) && (e.sizeToContent = e.h), this.resizeToContentCheck(l, e));
3913
+ c.removePositioningStyles(f), e._temporaryRemoved ? (c.copyPos(e, e._orig), this._writePosAttr(f, e), this.engine.addNode(e)) : this._writePosAttr(f, e), this._gsEventHandler[l.type] && this._gsEventHandler[l.type](l, f);
3914
+ this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), l.type === "resizestop" && (Number.isInteger(e.sizeToContent) && (e.sizeToContent = e.h), this.resizeToContentCheck(a, e));
3915
3915
  }
3916
3916
  };
3917
3917
  $.draggable(t, {
@@ -3949,14 +3949,14 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3949
3949
  /** @internal handles actual drag/resize */
3950
3950
  _dragOrResize(e, t, i, s, r, o) {
3951
3951
  const n = { ...s._orig };
3952
- let d, h = this.opts.marginLeft, a = this.opts.marginRight, l = this.opts.marginTop, f = this.opts.marginBottom;
3952
+ let d, h = this.opts.marginLeft, l = this.opts.marginRight, a = this.opts.marginTop, f = this.opts.marginBottom;
3953
3953
  const m = Math.round(o * 0.1), p = Math.round(r * 0.1);
3954
- if (h = Math.min(h, p), a = Math.min(a, p), l = Math.min(l, m), f = Math.min(f, m), t.type === "drag") {
3954
+ if (h = Math.min(h, p), l = Math.min(l, p), a = Math.min(a, m), f = Math.min(f, m), t.type === "drag") {
3955
3955
  if (s._temporaryRemoved)
3956
3956
  return;
3957
3957
  const g = i.position.top - s._prevYPix;
3958
3958
  s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && c.updateScrollPosition(e, i.position, g);
3959
- const T = i.position.left + (i.position.left > s._lastUiPosition.left ? -a : h), k = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : l);
3959
+ const T = i.position.left + (i.position.left > s._lastUiPosition.left ? -l : h), k = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : a);
3960
3960
  n.x = Math.round(T / r), n.y = Math.round(k / o);
3961
3961
  const x = this._extraDragRow;
3962
3962
  if (this.engine.collide(s, n)) {
@@ -3968,20 +3968,20 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3968
3968
  if (this._extraDragRow !== x && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
3969
3969
  return;
3970
3970
  } else if (t.type === "resize") {
3971
- if (n.x < 0 || (c.updateScrollResize(t, e, o), n.w = Math.round((i.size.width - h) / r), n.h = Math.round((i.size.height - l) / o), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
3971
+ if (n.x < 0 || (c.updateScrollResize(t, e, o), n.w = Math.round((i.size.width - h) / r), n.h = Math.round((i.size.height - a) / o), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
3972
3972
  return;
3973
- const g = i.position.left + h, T = i.position.top + l;
3973
+ const g = i.position.left + h, T = i.position.top + a;
3974
3974
  n.x = Math.round(g / r), n.y = Math.round(T / o), d = !0;
3975
3975
  }
3976
3976
  s._event = t, s._lastTried = n;
3977
3977
  const y = {
3978
3978
  x: i.position.left + h,
3979
- y: i.position.top + l,
3980
- w: (i.size ? i.size.width : s.w * r) - h - a,
3981
- h: (i.size ? i.size.height : s.h * o) - l - f
3979
+ y: i.position.top + a,
3980
+ w: (i.size ? i.size.width : s.w * r) - h - l,
3981
+ h: (i.size ? i.size.height : s.h * o) - a - f
3982
3982
  };
3983
3983
  if (this.engine.moveNodeCheck(s, { ...n, cellWidth: r, cellHeight: o, rect: y, resizing: d })) {
3984
- s._lastUiPosition = i.position, this.engine.cacheRects(r, o, l, a, f, h), delete s._skipDown, d && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
3984
+ s._lastUiPosition = i.position, this.engine.cacheRects(r, o, a, l, f, h), delete s._skipDown, d && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
3985
3985
  const g = t.target;
3986
3986
  this._writePosAttr(g, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, g);
3987
3987
  }
@@ -3997,7 +3997,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3997
3997
  }
3998
3998
  // legacy method removed
3999
3999
  commit() {
4000
- return es(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4000
+ return ts(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4001
4001
  }
4002
4002
  }
4003
4003
  w.renderCB = (u, e) => {
@@ -4007,11 +4007,11 @@ w.resizeToContentParent = ".grid-stack-item-content";
4007
4007
  w.Utils = c;
4008
4008
  w.Engine = ee;
4009
4009
  w.GDRev = "11.3.0";
4010
- const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { class: "grid-stack-item-content" }, os = /* @__PURE__ */ K({
4010
+ const ns = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], os = { class: "grid-stack-item-content" }, as = /* @__PURE__ */ K({
4011
4011
  __name: "DraggableGridLayout",
4012
4012
  props: {
4013
4013
  tiles: {},
4014
- tileHeight: { default: Ie }
4014
+ tileHeight: { default: qe }
4015
4015
  },
4016
4016
  emits: ["update-tiles"],
4017
4017
  setup(u, { expose: e, emit: t }) {
@@ -4028,25 +4028,25 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4028
4028
  size: { cols: Number(p.w), rows: Number(p.h) }
4029
4029
  }
4030
4030
  };
4031
- }).filter((p) => p !== void 0), a = (m, p) => {
4031
+ }).filter((p) => p !== void 0), l = (m, p) => {
4032
4032
  n && (h(p).forEach((g) => {
4033
4033
  o.value.set(`${g.id}`, g);
4034
4034
  }), s("update-tiles", Array.from(o.value.values())));
4035
- }, l = (m, p) => {
4035
+ }, a = (m, p) => {
4036
4036
  p.forEach((y) => {
4037
4037
  var g;
4038
4038
  o.value.delete(`${(g = y.el) == null ? void 0 : g.getAttribute("data-id")}`);
4039
4039
  }), s("update-tiles", Array.from(o.value.values()));
4040
4040
  };
4041
- Xe(() => {
4041
+ Qe(() => {
4042
4042
  r.value && (n = w.init({
4043
4043
  margin: 10,
4044
- column: zt,
4044
+ column: Dt,
4045
4045
  cellHeight: i.tileHeight,
4046
4046
  resizable: { handles: "se, sw" },
4047
4047
  handle: ".tile-header"
4048
- }, r.value), n.on("change", a), n.on("added", a), n.on("removed", l));
4049
- }), Fe(() => {
4048
+ }, r.value), n.on("change", l), n.on("added", l), n.on("removed", a));
4049
+ }), Ve(() => {
4050
4050
  n && n.destroy(!1);
4051
4051
  });
4052
4052
  const f = (m) => {
@@ -4055,17 +4055,17 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4055
4055
  p && n.removeWidget(p);
4056
4056
  }
4057
4057
  };
4058
- return We(() => i.tiles.length, async (m, p) => {
4058
+ return Ke(() => i.tiles.length, async (m, p) => {
4059
4059
  if (m > p && n) {
4060
4060
  const y = i.tiles.slice(p);
4061
4061
  for (const g of y)
4062
- o.value.set(`${g.id}`, g), await wt(), n.makeWidget(d(g.id), {
4062
+ o.value.set(`${g.id}`, g), await bt(), n.makeWidget(d(g.id), {
4063
4063
  autoPosition: !0,
4064
4064
  w: g.layout.size.cols,
4065
4065
  h: g.layout.size.rows
4066
4066
  });
4067
4067
  }
4068
- }), vt(() => {
4068
+ }), _t(() => {
4069
4069
  i.tiles.forEach((m) => {
4070
4070
  o.value.set(`${m.id}`, m);
4071
4071
  });
@@ -4074,7 +4074,7 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4074
4074
  ref: r,
4075
4075
  class: "grid-stack"
4076
4076
  }, [
4077
- (R(!0), F(Et, null, xt(i.tiles, (y) => (R(), F("div", {
4077
+ (R(!0), F(xt, null, Ct(i.tiles, (y) => (R(), F("div", {
4078
4078
  key: y.id,
4079
4079
  class: "grid-stack-item",
4080
4080
  "data-id": `${y.id}`,
@@ -4085,40 +4085,40 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4085
4085
  "gs-x": y.layout.position.col,
4086
4086
  "gs-y": y.layout.position.row
4087
4087
  }, [
4088
- re("div", ns, [
4089
- Le(m.$slots, "tile", { tile: y }, void 0, !0)
4088
+ ne("div", os, [
4089
+ Ie(m.$slots, "tile", { tile: y }, void 0, !0)
4090
4090
  ])
4091
- ], 8, rs))), 128))
4091
+ ], 8, ns))), 128))
4092
4092
  ], 512));
4093
4093
  }
4094
- }), as = /* @__PURE__ */ he(os, [["__scopeId", "data-v-a68d6821"]]), ls = { class: "kong-ui-public-dashboard-renderer" }, hs = {
4094
+ }), ls = /* @__PURE__ */ de(as, [["__scopeId", "data-v-a68d6821"]]), hs = { class: "kong-ui-public-dashboard-renderer" }, ds = {
4095
4095
  key: 0,
4096
4096
  class: "tile-container slottable-tile"
4097
- }, ds = /* @__PURE__ */ K({
4097
+ }, us = /* @__PURE__ */ K({
4098
4098
  __name: "DashboardRenderer",
4099
- props: /* @__PURE__ */ nt({
4099
+ props: /* @__PURE__ */ ot({
4100
4100
  context: {}
4101
4101
  }, {
4102
4102
  modelValue: { required: !0 },
4103
4103
  modelModifiers: {}
4104
4104
  }),
4105
- emits: /* @__PURE__ */ nt(["edit-tile", "zoom-time-range"], ["update:modelValue"]),
4105
+ emits: /* @__PURE__ */ ot(["edit-tile", "zoom-time-range"], ["update:modelValue"]),
4106
4106
  setup(u, { expose: e, emit: t }) {
4107
- const i = u, s = t, r = Vt(u, "modelValue"), { i18n: o } = me.useI18n(), n = U(0), d = U(null), h = pe(le);
4108
- h || (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements")), me.useRequestQueue();
4109
- const a = Rt(), l = A(() => i.context.timeSpec ? i.context.timeSpec : {
4107
+ const i = u, s = t, r = Vt(u, "modelValue"), { i18n: o } = pe.useI18n(), n = U(0), d = U(null), h = ye(he);
4108
+ h || (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements")), pe.useRequestQueue();
4109
+ const l = Tt(), a = A(() => i.context.timeSpec ? i.context.timeSpec : {
4110
4110
  type: "relative",
4111
- time_range: a.defaultQueryTimeForOrg
4112
- }), f = A(() => !!i.context.timeSpec || !a.loading), m = (E, N) => {
4111
+ time_range: l.defaultQueryTimeForOrg
4112
+ }), f = A(() => !!i.context.timeSpec || !l.loading), m = (E, N) => {
4113
4113
  const S = E.layout.position.row - N.layout.position.row;
4114
4114
  return S !== 0 ? S : E.layout.position.col - N.layout.position.col;
4115
4115
  }, p = A(() => r.value.tiles.map((E) => {
4116
4116
  var S;
4117
4117
  let N = E.definition;
4118
4118
  if ("description" in N.chart) {
4119
- const q = (S = N.chart.description) == null ? void 0 : S.replace(_i, () => {
4120
- const Ce = `renderer.trendRange.${l.value.type === "absolute" ? "custom" : l.value.time_range}`;
4121
- return o.te(Ce) ? o.t(Ce) : "";
4119
+ const q = (S = N.chart.description) == null ? void 0 : S.replace(wi, () => {
4120
+ const le = `renderer.trendRange.${a.value.type === "absolute" ? "custom" : a.value.time_range}`;
4121
+ return o.te(le) ? o.t(le) : "";
4122
4122
  });
4123
4123
  N = {
4124
4124
  ...N,
@@ -4140,14 +4140,18 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4140
4140
  id: E.id ?? crypto.randomUUID()
4141
4141
  };
4142
4142
  })), y = A(() => {
4143
+ var le, ve, Te;
4143
4144
  let { tz: E, refreshInterval: N, editable: S } = i.context;
4144
4145
  const q = [...i.context.filters ?? [], ...r.value.preset_filters ?? []];
4145
- return E || (E = new Intl.DateTimeFormat().resolvedOptions().timeZone), N === void 0 && (N = wi), S === void 0 && (S = !1), {
4146
+ E || (E = new Intl.DateTimeFormat().resolvedOptions().timeZone), N === void 0 && (N = bi), S === void 0 && (S = !1);
4147
+ const se = !!((Te = (ve = (le = Kt()) == null ? void 0 : le.vnode) == null ? void 0 : ve.props) != null && Te.onZoomTimeRange);
4148
+ return {
4146
4149
  filters: q,
4147
4150
  tz: E,
4148
- timeSpec: l.value,
4151
+ timeSpec: a.value,
4149
4152
  refreshInterval: N,
4150
- editable: S
4153
+ editable: S,
4154
+ zoomable: se
4151
4155
  };
4152
4156
  }), g = (E) => {
4153
4157
  s("edit-tile", E);
@@ -4185,9 +4189,9 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4185
4189
  r.value.tiles = N.sort(m);
4186
4190
  };
4187
4191
  return e({ refresh: L }), (E, N) => {
4188
- const S = oe("KAlert");
4189
- return R(), F("div", ls, [
4190
- D(h) ? (R(), O(bt(E.context.editable ? as : Ji), {
4192
+ const S = ae("KAlert");
4193
+ return R(), F("div", hs, [
4194
+ D(h) ? (R(), O(Et(E.context.editable ? ls : es), {
4191
4195
  key: 1,
4192
4196
  ref_key: "gridLayoutRef",
4193
4197
  ref: d,
@@ -4196,21 +4200,21 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4196
4200
  onUpdateTiles: C
4197
4201
  }, {
4198
4202
  tile: I(({ tile: q }) => [
4199
- q.meta.chart.type === "slottable" ? (R(), F("div", hs, [
4200
- Le(E.$slots, q.meta.chart.id, {}, void 0, !0)
4201
- ])) : (R(), O(ji, {
4203
+ q.meta.chart.type === "slottable" ? (R(), F("div", ds, [
4204
+ Ie(E.$slots, q.meta.chart.id, {}, void 0, !0)
4205
+ ])) : (R(), O(Qi, {
4202
4206
  key: 1,
4203
4207
  class: "tile-container",
4204
4208
  context: y.value,
4205
4209
  definition: q.meta,
4206
- height: q.layout.size.rows * (r.value.tile_height || D(Ie)) + parseInt(D(Mt), 10),
4210
+ height: q.layout.size.rows * (r.value.tile_height || D(qe)) + parseInt(D(It), 10),
4207
4211
  "query-ready": f.value,
4208
4212
  "refresh-counter": n.value,
4209
4213
  "tile-id": q.id,
4210
- onDuplicateTile: (ae) => k(q),
4211
- onEditTile: (ae) => g(q),
4212
- onRemoveTile: (ae) => x(q),
4213
- onZoomTimeRange: N[0] || (N[0] = (ae) => s("zoom-time-range", ae))
4214
+ onDuplicateTile: (se) => k(q),
4215
+ onEditTile: (se) => g(q),
4216
+ onRemoveTile: (se) => x(q),
4217
+ onZoomTimeRange: N[0] || (N[0] = (se) => s("zoom-time-range", se))
4214
4218
  }, null, 8, ["context", "definition", "height", "query-ready", "refresh-counter", "tile-id", "onDuplicateTile", "onEditTile", "onRemoveTile"]))
4215
4219
  ]),
4216
4220
  _: 3
@@ -4219,22 +4223,22 @@ const rs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ns = { cl
4219
4223
  appearance: "danger"
4220
4224
  }, {
4221
4225
  default: I(() => [
4222
- Me(J(D(o).t("renderer.noQueryBridge")), 1)
4226
+ Pe(J(D(o).t("renderer.noQueryBridge")), 1)
4223
4227
  ]),
4224
4228
  _: 1
4225
4229
  }))
4226
4230
  ]);
4227
4231
  };
4228
4232
  }
4229
- }), bs = /* @__PURE__ */ he(ds, [["__scopeId", "data-v-e90ae04b"]]);
4233
+ }), Es = /* @__PURE__ */ de(us, [["__scopeId", "data-v-b36476ce"]]);
4230
4234
  export {
4231
- vi as CP_ID_TOKEN,
4232
- zt as DASHBOARD_COLS,
4233
- Ie as DEFAULT_TILE_HEIGHT,
4234
- wi as DEFAULT_TILE_REFRESH_INTERVAL_MS,
4235
- bs as DashboardRenderer,
4236
- at as ENTITY_ID_TOKEN,
4237
- Ji as GridLayout,
4238
- le as INJECT_QUERY_PROVIDER,
4239
- _i as TIMEFRAME_TOKEN
4235
+ _i as CP_ID_TOKEN,
4236
+ Dt as DASHBOARD_COLS,
4237
+ qe as DEFAULT_TILE_HEIGHT,
4238
+ bi as DEFAULT_TILE_REFRESH_INTERVAL_MS,
4239
+ Es as DashboardRenderer,
4240
+ lt as ENTITY_ID_TOKEN,
4241
+ es as GridLayout,
4242
+ he as INJECT_QUERY_PROVIDER,
4243
+ wi as TIMEFRAME_TOKEN
4240
4244
  };