@keenmate/web-multiselect 1.12.0-rc02 → 1.12.0-rc03

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,7 +1,7 @@
1
1
  var mt = Object.defineProperty;
2
2
  var ht = (s, e, t) => e in s ? mt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
3
  var d = (s, e, t) => ht(s, typeof e != "symbol" ? e + "" : e, t);
4
- const ie = Math.min, F = Math.max, re = Math.round, se = Math.floor, M = (s) => ({
4
+ const ie = Math.min, F = Math.max, re = Math.round, se = Math.floor, P = (s) => ({
5
5
  x: s,
6
6
  y: s
7
7
  }), pt = {
@@ -13,7 +13,7 @@ const ie = Math.min, F = Math.max, re = Math.round, se = Math.floor, M = (s) =>
13
13
  start: "end",
14
14
  end: "start"
15
15
  };
16
- function ze(s, e, t) {
16
+ function Ve(s, e, t) {
17
17
  return F(s, ie(e, t));
18
18
  }
19
19
  function le(s, e) {
@@ -41,22 +41,22 @@ function qe(s) {
41
41
  function bt(s, e, t) {
42
42
  t === void 0 && (t = !1);
43
43
  const o = ce(s), i = qe(s), r = Ke(i);
44
- let n = i === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
45
- return e.reference[r] > e.floating[r] && (n = ne(n)), [n, ne(n)];
44
+ let a = i === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
45
+ return e.reference[r] > e.floating[r] && (a = ae(a)), [a, ae(a)];
46
46
  }
47
47
  function ft(s) {
48
- const e = ne(s);
48
+ const e = ae(s);
49
49
  return [fe(s), e, fe(e)];
50
50
  }
51
51
  function fe(s) {
52
52
  return s.replace(/start|end/g, (e) => ut[e]);
53
53
  }
54
- const Ve = ["left", "right"], Be = ["right", "left"], vt = ["top", "bottom"], _t = ["bottom", "top"];
55
- function wt(s, e, t) {
54
+ const ze = ["left", "right"], Be = ["right", "left"], vt = ["top", "bottom"], _t = ["bottom", "top"];
55
+ function kt(s, e, t) {
56
56
  switch (s) {
57
57
  case "top":
58
58
  case "bottom":
59
- return t ? e ? Be : Ve : e ? Ve : Be;
59
+ return t ? e ? Be : ze : e ? ze : Be;
60
60
  case "left":
61
61
  case "right":
62
62
  return e ? vt : _t;
@@ -64,15 +64,15 @@ function wt(s, e, t) {
64
64
  return [];
65
65
  }
66
66
  }
67
- function kt(s, e, t, o) {
67
+ function yt(s, e, t, o) {
68
68
  const i = ce(s);
69
- let r = wt(N(s), t === "start", o);
70
- return i && (r = r.map((n) => n + "-" + i), e && (r = r.concat(r.map(fe)))), r;
69
+ let r = kt(N(s), t === "start", o);
70
+ return i && (r = r.map((a) => a + "-" + i), e && (r = r.concat(r.map(fe)))), r;
71
71
  }
72
- function ne(s) {
72
+ function ae(s) {
73
73
  return s.replace(/left|right|bottom|top/g, (e) => pt[e]);
74
74
  }
75
- function yt(s) {
75
+ function wt(s) {
76
76
  return {
77
77
  top: 0,
78
78
  right: 0,
@@ -82,14 +82,14 @@ function yt(s) {
82
82
  };
83
83
  }
84
84
  function xt(s) {
85
- return typeof s != "number" ? yt(s) : {
85
+ return typeof s != "number" ? wt(s) : {
86
86
  top: s,
87
87
  right: s,
88
88
  bottom: s,
89
89
  left: s
90
90
  };
91
91
  }
92
- function ae(s) {
92
+ function ne(s) {
93
93
  const {
94
94
  x: e,
95
95
  y: t,
@@ -112,7 +112,7 @@ function De(s, e, t) {
112
112
  reference: o,
113
113
  floating: i
114
114
  } = s;
115
- const r = B(e), n = qe(e), a = Ke(n), l = N(e), c = r === "y", m = o.x + o.width / 2 - i.width / 2, p = o.y + o.height / 2 - i.height / 2, u = o[a] / 2 - i[a] / 2;
115
+ const r = B(e), a = qe(e), n = Ke(a), l = N(e), c = r === "y", m = o.x + o.width / 2 - i.width / 2, p = o.y + o.height / 2 - i.height / 2, u = o[n] / 2 - i[n] / 2;
116
116
  let h;
117
117
  switch (l) {
118
118
  case "top":
@@ -147,10 +147,10 @@ function De(s, e, t) {
147
147
  }
148
148
  switch (ce(e)) {
149
149
  case "start":
150
- h[n] -= u * (t && c ? -1 : 1);
150
+ h[a] -= u * (t && c ? -1 : 1);
151
151
  break;
152
152
  case "end":
153
- h[n] += u * (t && c ? -1 : 1);
153
+ h[a] += u * (t && c ? -1 : 1);
154
154
  break;
155
155
  }
156
156
  return h;
@@ -160,9 +160,9 @@ const Ct = async (s, e, t) => {
160
160
  placement: o = "bottom",
161
161
  strategy: i = "absolute",
162
162
  middleware: r = [],
163
- platform: n
164
- } = t, a = r.filter(Boolean), l = await (n.isRTL == null ? void 0 : n.isRTL(e));
165
- let c = await n.getElementRects({
163
+ platform: a
164
+ } = t, n = r.filter(Boolean), l = await (a.isRTL == null ? void 0 : a.isRTL(e));
165
+ let c = await a.getElementRects({
166
166
  reference: s,
167
167
  floating: e,
168
168
  strategy: i
@@ -170,15 +170,15 @@ const Ct = async (s, e, t) => {
170
170
  x: m,
171
171
  y: p
172
172
  } = De(c, o, l), u = o, h = {}, g = 0;
173
- for (let b = 0; b < a.length; b++) {
173
+ for (let b = 0; b < n.length; b++) {
174
174
  const {
175
175
  name: f,
176
176
  fn: v
177
- } = a[b], {
178
- x: w,
179
- y: k,
177
+ } = n[b], {
178
+ x: k,
179
+ y,
180
180
  data: C,
181
- reset: y
181
+ reset: w
182
182
  } = await v({
183
183
  x: m,
184
184
  y: p,
@@ -187,23 +187,23 @@ const Ct = async (s, e, t) => {
187
187
  strategy: i,
188
188
  middlewareData: h,
189
189
  rects: c,
190
- platform: n,
190
+ platform: a,
191
191
  elements: {
192
192
  reference: s,
193
193
  floating: e
194
194
  }
195
195
  });
196
- m = w ?? m, p = k ?? p, h = {
196
+ m = k ?? m, p = y ?? p, h = {
197
197
  ...h,
198
198
  [f]: {
199
199
  ...h[f],
200
200
  ...C
201
201
  }
202
- }, y && g <= 50 && (g++, typeof y == "object" && (y.placement && (u = y.placement), y.rects && (c = y.rects === !0 ? await n.getElementRects({
202
+ }, w && g <= 50 && (g++, typeof w == "object" && (w.placement && (u = w.placement), w.rects && (c = w.rects === !0 ? await a.getElementRects({
203
203
  reference: s,
204
204
  floating: e,
205
205
  strategy: i
206
- }) : y.rects), {
206
+ }) : w.rects), {
207
207
  x: m,
208
208
  y: p
209
209
  } = De(c, u, l)), b = -1);
@@ -223,8 +223,8 @@ async function Ye(s, e) {
223
223
  x: o,
224
224
  y: i,
225
225
  platform: r,
226
- rects: n,
227
- elements: a,
226
+ rects: a,
227
+ elements: n,
228
228
  strategy: l
229
229
  } = s, {
230
230
  boundary: c = "clippingAncestors",
@@ -232,33 +232,33 @@ async function Ye(s, e) {
232
232
  elementContext: p = "floating",
233
233
  altBoundary: u = !1,
234
234
  padding: h = 0
235
- } = le(e, s), g = xt(h), f = a[u ? p === "floating" ? "reference" : "floating" : p], v = ae(await r.getClippingRect({
236
- element: (t = await (r.isElement == null ? void 0 : r.isElement(f))) == null || t ? f : f.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
235
+ } = le(e, s), g = xt(h), f = n[u ? p === "floating" ? "reference" : "floating" : p], v = ne(await r.getClippingRect({
236
+ element: (t = await (r.isElement == null ? void 0 : r.isElement(f))) == null || t ? f : f.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(n.floating)),
237
237
  boundary: c,
238
238
  rootBoundary: m,
239
239
  strategy: l
240
- })), w = p === "floating" ? {
240
+ })), k = p === "floating" ? {
241
241
  x: o,
242
242
  y: i,
243
- width: n.floating.width,
244
- height: n.floating.height
245
- } : n.reference, k = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), C = await (r.isElement == null ? void 0 : r.isElement(k)) ? await (r.getScale == null ? void 0 : r.getScale(k)) || {
243
+ width: a.floating.width,
244
+ height: a.floating.height
245
+ } : a.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(n.floating)), C = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
246
246
  x: 1,
247
247
  y: 1
248
248
  } : {
249
249
  x: 1,
250
250
  y: 1
251
- }, y = ae(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
252
- elements: a,
253
- rect: w,
254
- offsetParent: k,
251
+ }, w = ne(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
252
+ elements: n,
253
+ rect: k,
254
+ offsetParent: y,
255
255
  strategy: l
256
- }) : w);
256
+ }) : k);
257
257
  return {
258
- top: (v.top - y.top + g.top) / C.y,
259
- bottom: (y.bottom - v.bottom + g.bottom) / C.y,
260
- left: (v.left - y.left + g.left) / C.x,
261
- right: (y.right - v.right + g.right) / C.x
258
+ top: (v.top - w.top + g.top) / C.y,
259
+ bottom: (w.bottom - v.bottom + g.bottom) / C.y,
260
+ left: (v.left - w.left + g.left) / C.x,
261
+ right: (w.right - v.right + g.right) / C.x
262
262
  };
263
263
  }
264
264
  const St = function(s) {
@@ -270,8 +270,8 @@ const St = function(s) {
270
270
  const {
271
271
  placement: i,
272
272
  middlewareData: r,
273
- rects: n,
274
- initialPlacement: a,
273
+ rects: a,
274
+ initialPlacement: n,
275
275
  platform: l,
276
276
  elements: c
277
277
  } = e, {
@@ -285,23 +285,23 @@ const St = function(s) {
285
285
  } = le(s, e);
286
286
  if ((t = r.arrow) != null && t.alignmentOffset)
287
287
  return {};
288
- const v = N(i), w = B(a), k = N(a) === a, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), y = u || (k || !b ? [ne(a)] : ft(a)), Y = g !== "none";
289
- !u && Y && y.push(...kt(a, b, g, C));
290
- const j = [a, ...y], ue = await Ye(e, f), te = [];
288
+ const v = N(i), k = B(n), y = N(n) === n, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), w = u || (y || !b ? [ae(n)] : ft(n)), Y = g !== "none";
289
+ !u && Y && w.push(...yt(n, b, g, C));
290
+ const j = [n, ...w], ue = await Ye(e, f), te = [];
291
291
  let G = ((o = r.flip) == null ? void 0 : o.overflows) || [];
292
292
  if (m && te.push(ue[v]), p) {
293
- const $ = bt(i, n, C);
293
+ const $ = bt(i, a, C);
294
294
  te.push(ue[$[0]], ue[$[1]]);
295
295
  }
296
296
  if (G = [...G, {
297
297
  placement: i,
298
298
  overflows: te
299
299
  }], !te.every(($) => $ <= 0)) {
300
- var Pe, Me;
301
- const $ = (((Pe = r.flip) == null ? void 0 : Pe.index) || 0) + 1, ge = j[$];
302
- if (ge && (!(p === "alignment" ? w !== B(ge) : !1) || // We leave the current main axis only if every placement on that axis
300
+ var Ae, Pe;
301
+ const $ = (((Ae = r.flip) == null ? void 0 : Ae.index) || 0) + 1, ge = j[$];
302
+ if (ge && (!(p === "alignment" ? k !== B(ge) : !1) || // We leave the current main axis only if every placement on that axis
303
303
  // overflows the main axis.
304
- G.every((I) => B(I.placement) === w ? I.overflows[0] > 0 : !0)))
304
+ G.every((I) => B(I.placement) === k ? I.overflows[0] > 0 : !0)))
305
305
  return {
306
306
  data: {
307
307
  index: $,
@@ -311,25 +311,25 @@ const St = function(s) {
311
311
  placement: ge
312
312
  }
313
313
  };
314
- let J = (Me = G.filter((R) => R.overflows[0] <= 0).sort((R, I) => R.overflows[1] - I.overflows[1])[0]) == null ? void 0 : Me.placement;
314
+ let J = (Pe = G.filter((R) => R.overflows[0] <= 0).sort((R, I) => R.overflows[1] - I.overflows[1])[0]) == null ? void 0 : Pe.placement;
315
315
  if (!J)
316
316
  switch (h) {
317
317
  case "bestFit": {
318
318
  var Ee;
319
319
  const R = (Ee = G.filter((I) => {
320
320
  if (Y) {
321
- const V = B(I.placement);
322
- return V === w || // Create a bias to the `y` side axis due to horizontal
321
+ const z = B(I.placement);
322
+ return z === k || // Create a bias to the `y` side axis due to horizontal
323
323
  // reading directions favoring greater width.
324
- V === "y";
324
+ z === "y";
325
325
  }
326
326
  return !0;
327
- }).map((I) => [I.placement, I.overflows.filter((V) => V > 0).reduce((V, dt) => V + dt, 0)]).sort((I, V) => I[1] - V[1])[0]) == null ? void 0 : Ee[0];
327
+ }).map((I) => [I.placement, I.overflows.filter((z) => z > 0).reduce((z, dt) => z + dt, 0)]).sort((I, z) => I[1] - z[1])[0]) == null ? void 0 : Ee[0];
328
328
  R && (J = R);
329
329
  break;
330
330
  }
331
331
  case "initialPlacement":
332
- J = a;
332
+ J = n;
333
333
  break;
334
334
  }
335
335
  if (i !== J)
@@ -348,7 +348,7 @@ async function It(s, e) {
348
348
  placement: t,
349
349
  platform: o,
350
350
  elements: i
351
- } = s, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), n = N(t), a = ce(t), l = B(t) === "y", c = Tt.has(n) ? -1 : 1, m = r && l ? -1 : 1, p = le(e, s);
351
+ } = s, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), a = N(t), n = ce(t), l = B(t) === "y", c = Tt.has(a) ? -1 : 1, m = r && l ? -1 : 1, p = le(e, s);
352
352
  let {
353
353
  mainAxis: u,
354
354
  crossAxis: h,
@@ -362,7 +362,7 @@ async function It(s, e) {
362
362
  crossAxis: p.crossAxis || 0,
363
363
  alignmentAxis: p.alignmentAxis
364
364
  };
365
- return a && typeof g == "number" && (h = a === "end" ? g * -1 : g), l ? {
365
+ return n && typeof g == "number" && (h = n === "end" ? g * -1 : g), l ? {
366
366
  x: h * m,
367
367
  y: u * c
368
368
  } : {
@@ -379,15 +379,15 @@ const Ot = function(s) {
379
379
  const {
380
380
  x: i,
381
381
  y: r,
382
- placement: n,
383
- middlewareData: a
382
+ placement: a,
383
+ middlewareData: n
384
384
  } = e, l = await It(e, s);
385
- return n === ((t = a.offset) == null ? void 0 : t.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
385
+ return a === ((t = n.offset) == null ? void 0 : t.placement) && (o = n.arrow) != null && o.alignmentOffset ? {} : {
386
386
  x: i + l.x,
387
387
  y: r + l.y,
388
388
  data: {
389
389
  ...l,
390
- placement: n
390
+ placement: a
391
391
  }
392
392
  };
393
393
  }
@@ -403,16 +403,16 @@ const Ot = function(s) {
403
403
  placement: i
404
404
  } = e, {
405
405
  mainAxis: r = !0,
406
- crossAxis: n = !1,
407
- limiter: a = {
406
+ crossAxis: a = !1,
407
+ limiter: n = {
408
408
  fn: (f) => {
409
409
  let {
410
410
  x: v,
411
- y: w
411
+ y: k
412
412
  } = f;
413
413
  return {
414
414
  x: v,
415
- y: w
415
+ y: k
416
416
  };
417
417
  }
418
418
  },
@@ -423,14 +423,14 @@ const Ot = function(s) {
423
423
  }, m = await Ye(e, l), p = B(N(i)), u = Ue(p);
424
424
  let h = c[u], g = c[p];
425
425
  if (r) {
426
- const f = u === "y" ? "top" : "left", v = u === "y" ? "bottom" : "right", w = h + m[f], k = h - m[v];
427
- h = ze(w, h, k);
426
+ const f = u === "y" ? "top" : "left", v = u === "y" ? "bottom" : "right", k = h + m[f], y = h - m[v];
427
+ h = Ve(k, h, y);
428
428
  }
429
- if (n) {
430
- const f = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", w = g + m[f], k = g - m[v];
431
- g = ze(w, g, k);
429
+ if (a) {
430
+ const f = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", k = g + m[f], y = g - m[v];
431
+ g = Ve(k, g, y);
432
432
  }
433
- const b = a.fn({
433
+ const b = n.fn({
434
434
  ...e,
435
435
  [u]: h,
436
436
  [p]: g
@@ -442,7 +442,7 @@ const Ot = function(s) {
442
442
  y: b.y - o,
443
443
  enabled: {
444
444
  [u]: r,
445
- [p]: n
445
+ [p]: a
446
446
  }
447
447
  }
448
448
  };
@@ -459,7 +459,7 @@ function T(s) {
459
459
  var e;
460
460
  return (s == null || (e = s.ownerDocument) == null ? void 0 : e.defaultView) || window;
461
461
  }
462
- function z(s) {
462
+ function V(s) {
463
463
  var e;
464
464
  return (e = (Je(s) ? s.ownerDocument : s.document) || window.document) == null ? void 0 : e.documentElement;
465
465
  }
@@ -475,19 +475,19 @@ function E(s) {
475
475
  function $e(s) {
476
476
  return !de() || typeof ShadowRoot > "u" ? !1 : s instanceof ShadowRoot || s instanceof T(s).ShadowRoot;
477
477
  }
478
- const At = /* @__PURE__ */ new Set(["inline", "contents"]);
478
+ const Mt = /* @__PURE__ */ new Set(["inline", "contents"]);
479
479
  function ee(s) {
480
480
  const {
481
481
  overflow: e,
482
482
  overflowX: t,
483
483
  overflowY: o,
484
484
  display: i
485
- } = A(s);
486
- return /auto|scroll|overlay|hidden|clip/.test(e + o + t) && !At.has(i);
485
+ } = M(s);
486
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + t) && !Mt.has(i);
487
487
  }
488
- const Pt = /* @__PURE__ */ new Set(["table", "td", "th"]);
489
- function Mt(s) {
490
- return Pt.has(q(s));
488
+ const At = /* @__PURE__ */ new Set(["table", "td", "th"]);
489
+ function Pt(s) {
490
+ return At.has(q(s));
491
491
  }
492
492
  const Et = [":popover-open", ":modal"];
493
493
  function me(s) {
@@ -499,10 +499,10 @@ function me(s) {
499
499
  }
500
500
  });
501
501
  }
502
- const zt = ["transform", "translate", "scale", "rotate", "perspective"], Vt = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Bt = ["paint", "layout", "strict", "content"];
502
+ const Vt = ["transform", "translate", "scale", "rotate", "perspective"], zt = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Bt = ["paint", "layout", "strict", "content"];
503
503
  function Te(s) {
504
- const e = Ie(), t = L(s) ? A(s) : s;
505
- return zt.some((o) => t[o] ? t[o] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || Vt.some((o) => (t.willChange || "").includes(o)) || Bt.some((o) => (t.contain || "").includes(o));
504
+ const e = Ie(), t = L(s) ? M(s) : s;
505
+ return Vt.some((o) => t[o] ? t[o] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || zt.some((o) => (t.willChange || "").includes(o)) || Bt.some((o) => (t.contain || "").includes(o));
506
506
  }
507
507
  function Dt(s) {
508
508
  let e = D(s);
@@ -522,7 +522,7 @@ const $t = /* @__PURE__ */ new Set(["html", "body", "#document"]);
522
522
  function K(s) {
523
523
  return $t.has(q(s));
524
524
  }
525
- function A(s) {
525
+ function M(s) {
526
526
  return T(s).getComputedStyle(s);
527
527
  }
528
528
  function he(s) {
@@ -542,7 +542,7 @@ function D(s) {
542
542
  s.assignedSlot || // DOM Element detected.
543
543
  s.parentNode || // ShadowRoot detected.
544
544
  $e(s) && s.host || // Fallback.
545
- z(s)
545
+ V(s)
546
546
  );
547
547
  return $e(e) ? e.host : e;
548
548
  }
@@ -553,10 +553,10 @@ function Xe(s) {
553
553
  function Z(s, e, t) {
554
554
  var o;
555
555
  e === void 0 && (e = []), t === void 0 && (t = !0);
556
- const i = Xe(s), r = i === ((o = s.ownerDocument) == null ? void 0 : o.body), n = T(i);
556
+ const i = Xe(s), r = i === ((o = s.ownerDocument) == null ? void 0 : o.body), a = T(i);
557
557
  if (r) {
558
- const a = ve(n);
559
- return e.concat(n, n.visualViewport || [], ee(i) ? i : [], a && t ? Z(a) : []);
558
+ const n = ve(a);
559
+ return e.concat(a, a.visualViewport || [], ee(i) ? i : [], n && t ? Z(n) : []);
560
560
  }
561
561
  return e.concat(i, Z(i, [], t));
562
562
  }
@@ -564,13 +564,13 @@ function ve(s) {
564
564
  return s.parent && Object.getPrototypeOf(s.parent) ? s.frameElement : null;
565
565
  }
566
566
  function Ze(s) {
567
- const e = A(s);
567
+ const e = M(s);
568
568
  let t = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
569
- const i = E(s), r = i ? s.offsetWidth : t, n = i ? s.offsetHeight : o, a = re(t) !== r || re(o) !== n;
570
- return a && (t = r, o = n), {
569
+ const i = E(s), r = i ? s.offsetWidth : t, a = i ? s.offsetHeight : o, n = re(t) !== r || re(o) !== a;
570
+ return n && (t = r, o = a), {
571
571
  width: t,
572
572
  height: o,
573
- $: a
573
+ $: n
574
574
  };
575
575
  }
576
576
  function Oe(s) {
@@ -579,19 +579,19 @@ function Oe(s) {
579
579
  function U(s) {
580
580
  const e = Oe(s);
581
581
  if (!E(e))
582
- return M(1);
582
+ return P(1);
583
583
  const t = e.getBoundingClientRect(), {
584
584
  width: o,
585
585
  height: i,
586
586
  $: r
587
587
  } = Ze(e);
588
- let n = (r ? re(t.width) : t.width) / o, a = (r ? re(t.height) : t.height) / i;
589
- return (!n || !Number.isFinite(n)) && (n = 1), (!a || !Number.isFinite(a)) && (a = 1), {
590
- x: n,
591
- y: a
588
+ let a = (r ? re(t.width) : t.width) / o, n = (r ? re(t.height) : t.height) / i;
589
+ return (!a || !Number.isFinite(a)) && (a = 1), (!n || !Number.isFinite(n)) && (n = 1), {
590
+ x: a,
591
+ y: n
592
592
  };
593
593
  }
594
- const Rt = /* @__PURE__ */ M(0);
594
+ const Rt = /* @__PURE__ */ P(0);
595
595
  function Qe(s) {
596
596
  const e = T(s);
597
597
  return !Ie() || !e.visualViewport ? Rt : {
@@ -605,19 +605,19 @@ function Ht(s, e, t) {
605
605
  function W(s, e, t, o) {
606
606
  e === void 0 && (e = !1), t === void 0 && (t = !1);
607
607
  const i = s.getBoundingClientRect(), r = Oe(s);
608
- let n = M(1);
609
- e && (o ? L(o) && (n = U(o)) : n = U(s));
610
- const a = Ht(r, t, o) ? Qe(r) : M(0);
611
- let l = (i.left + a.x) / n.x, c = (i.top + a.y) / n.y, m = i.width / n.x, p = i.height / n.y;
608
+ let a = P(1);
609
+ e && (o ? L(o) && (a = U(o)) : a = U(s));
610
+ const n = Ht(r, t, o) ? Qe(r) : P(0);
611
+ let l = (i.left + n.x) / a.x, c = (i.top + n.y) / a.y, m = i.width / a.x, p = i.height / a.y;
612
612
  if (r) {
613
613
  const u = T(r), h = o && L(o) ? T(o) : o;
614
614
  let g = u, b = ve(g);
615
615
  for (; b && o && h !== g; ) {
616
- const f = U(b), v = b.getBoundingClientRect(), w = A(b), k = v.left + (b.clientLeft + parseFloat(w.paddingLeft)) * f.x, C = v.top + (b.clientTop + parseFloat(w.paddingTop)) * f.y;
617
- l *= f.x, c *= f.y, m *= f.x, p *= f.y, l += k, c += C, g = T(b), b = ve(g);
616
+ const f = U(b), v = b.getBoundingClientRect(), k = M(b), y = v.left + (b.clientLeft + parseFloat(k.paddingLeft)) * f.x, C = v.top + (b.clientTop + parseFloat(k.paddingTop)) * f.y;
617
+ l *= f.x, c *= f.y, m *= f.x, p *= f.y, l += y, c += C, g = T(b), b = ve(g);
618
618
  }
619
619
  }
620
- return ae({
620
+ return ne({
621
621
  width: m,
622
622
  height: p,
623
623
  x: l,
@@ -626,7 +626,7 @@ function W(s, e, t, o) {
626
626
  }
627
627
  function pe(s, e) {
628
628
  const t = he(s).scrollLeft;
629
- return e ? e.left + t : W(z(s)).left + t;
629
+ return e ? e.left + t : W(V(s)).left + t;
630
630
  }
631
631
  function et(s, e) {
632
632
  const t = s.getBoundingClientRect(), o = t.left + e.scrollLeft - pe(s, t), i = t.top + e.scrollTop;
@@ -642,19 +642,19 @@ function Ft(s) {
642
642
  offsetParent: o,
643
643
  strategy: i
644
644
  } = s;
645
- const r = i === "fixed", n = z(o), a = e ? me(e.floating) : !1;
646
- if (o === n || a && r)
645
+ const r = i === "fixed", a = V(o), n = e ? me(e.floating) : !1;
646
+ if (o === a || n && r)
647
647
  return t;
648
648
  let l = {
649
649
  scrollLeft: 0,
650
650
  scrollTop: 0
651
- }, c = M(1);
652
- const m = M(0), p = E(o);
653
- if ((p || !p && !r) && ((q(o) !== "body" || ee(n)) && (l = he(o)), E(o))) {
651
+ }, c = P(1);
652
+ const m = P(0), p = E(o);
653
+ if ((p || !p && !r) && ((q(o) !== "body" || ee(a)) && (l = he(o)), E(o))) {
654
654
  const h = W(o);
655
655
  c = U(o), m.x = h.x + o.clientLeft, m.y = h.y + o.clientTop;
656
656
  }
657
- const u = n && !p && !r ? et(n, l) : M(0);
657
+ const u = a && !p && !r ? et(a, l) : P(0);
658
658
  return {
659
659
  width: t.width * c.x,
660
660
  height: t.height * c.y,
@@ -666,24 +666,24 @@ function Nt(s) {
666
666
  return Array.from(s.getClientRects());
667
667
  }
668
668
  function Wt(s) {
669
- const e = z(s), t = he(s), o = s.ownerDocument.body, i = F(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = F(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
670
- let n = -t.scrollLeft + pe(s);
671
- const a = -t.scrollTop;
672
- return A(o).direction === "rtl" && (n += F(e.clientWidth, o.clientWidth) - i), {
669
+ const e = V(s), t = he(s), o = s.ownerDocument.body, i = F(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = F(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
670
+ let a = -t.scrollLeft + pe(s);
671
+ const n = -t.scrollTop;
672
+ return M(o).direction === "rtl" && (a += F(e.clientWidth, o.clientWidth) - i), {
673
673
  width: i,
674
674
  height: r,
675
- x: n,
676
- y: a
675
+ x: a,
676
+ y: n
677
677
  };
678
678
  }
679
679
  const Re = 25;
680
680
  function jt(s, e) {
681
- const t = T(s), o = z(s), i = t.visualViewport;
682
- let r = o.clientWidth, n = o.clientHeight, a = 0, l = 0;
681
+ const t = T(s), o = V(s), i = t.visualViewport;
682
+ let r = o.clientWidth, a = o.clientHeight, n = 0, l = 0;
683
683
  if (i) {
684
- r = i.width, n = i.height;
684
+ r = i.width, a = i.height;
685
685
  const m = Ie();
686
- (!m || m && e === "fixed") && (a = i.offsetLeft, l = i.offsetTop);
686
+ (!m || m && e === "fixed") && (n = i.offsetLeft, l = i.offsetTop);
687
687
  }
688
688
  const c = pe(o);
689
689
  if (c <= 0) {
@@ -692,17 +692,17 @@ function jt(s, e) {
692
692
  } else c <= Re && (r += c);
693
693
  return {
694
694
  width: r,
695
- height: n,
696
- x: a,
695
+ height: a,
696
+ x: n,
697
697
  y: l
698
698
  };
699
699
  }
700
700
  const Gt = /* @__PURE__ */ new Set(["absolute", "fixed"]);
701
701
  function Ut(s, e) {
702
- const t = W(s, !0, e === "fixed"), o = t.top + s.clientTop, i = t.left + s.clientLeft, r = E(s) ? U(s) : M(1), n = s.clientWidth * r.x, a = s.clientHeight * r.y, l = i * r.x, c = o * r.y;
702
+ const t = W(s, !0, e === "fixed"), o = t.top + s.clientTop, i = t.left + s.clientLeft, r = E(s) ? U(s) : P(1), a = s.clientWidth * r.x, n = s.clientHeight * r.y, l = i * r.x, c = o * r.y;
703
703
  return {
704
- width: n,
705
- height: a,
704
+ width: a,
705
+ height: n,
706
706
  x: l,
707
707
  y: c
708
708
  };
@@ -712,7 +712,7 @@ function He(s, e, t) {
712
712
  if (e === "viewport")
713
713
  o = jt(s, t);
714
714
  else if (e === "document")
715
- o = Wt(z(s));
715
+ o = Wt(V(s));
716
716
  else if (L(e))
717
717
  o = Ut(e, t);
718
718
  else {
@@ -724,22 +724,22 @@ function He(s, e, t) {
724
724
  height: e.height
725
725
  };
726
726
  }
727
- return ae(o);
727
+ return ne(o);
728
728
  }
729
729
  function tt(s, e) {
730
730
  const t = D(s);
731
- return t === e || !L(t) || K(t) ? !1 : A(t).position === "fixed" || tt(t, e);
731
+ return t === e || !L(t) || K(t) ? !1 : M(t).position === "fixed" || tt(t, e);
732
732
  }
733
733
  function Kt(s, e) {
734
734
  const t = e.get(s);
735
735
  if (t)
736
736
  return t;
737
- let o = Z(s, [], !1).filter((a) => L(a) && q(a) !== "body"), i = null;
738
- const r = A(s).position === "fixed";
739
- let n = r ? D(s) : s;
740
- for (; L(n) && !K(n); ) {
741
- const a = A(n), l = Te(n);
742
- !l && a.position === "fixed" && (i = null), (r ? !l && !i : !l && a.position === "static" && !!i && Gt.has(i.position) || ee(n) && !l && tt(s, n)) ? o = o.filter((m) => m !== n) : i = a, n = D(n);
737
+ let o = Z(s, [], !1).filter((n) => L(n) && q(n) !== "body"), i = null;
738
+ const r = M(s).position === "fixed";
739
+ let a = r ? D(s) : s;
740
+ for (; L(a) && !K(a); ) {
741
+ const n = M(a), l = Te(a);
742
+ !l && n.position === "fixed" && (i = null), (r ? !l && !i : !l && n.position === "static" && !!i && Gt.has(i.position) || ee(a) && !l && tt(s, a)) ? o = o.filter((m) => m !== a) : i = n, a = D(a);
743
743
  }
744
744
  return e.set(s, o), o;
745
745
  }
@@ -750,10 +750,10 @@ function qt(s) {
750
750
  rootBoundary: o,
751
751
  strategy: i
752
752
  } = s;
753
- const n = [...t === "clippingAncestors" ? me(e) ? [] : Kt(e, this._c) : [].concat(t), o], a = n[0], l = n.reduce((c, m) => {
753
+ const a = [...t === "clippingAncestors" ? me(e) ? [] : Kt(e, this._c) : [].concat(t), o], n = a[0], l = a.reduce((c, m) => {
754
754
  const p = He(e, m, i);
755
755
  return c.top = F(p.top, c.top), c.right = ie(p.right, c.right), c.bottom = ie(p.bottom, c.bottom), c.left = F(p.left, c.left), c;
756
- }, He(e, a, i));
756
+ }, He(e, n, i));
757
757
  return {
758
758
  width: l.right - l.left,
759
759
  height: l.bottom - l.top,
@@ -772,39 +772,39 @@ function Yt(s) {
772
772
  };
773
773
  }
774
774
  function Jt(s, e, t) {
775
- const o = E(e), i = z(e), r = t === "fixed", n = W(s, !0, r, e);
776
- let a = {
775
+ const o = E(e), i = V(e), r = t === "fixed", a = W(s, !0, r, e);
776
+ let n = {
777
777
  scrollLeft: 0,
778
778
  scrollTop: 0
779
779
  };
780
- const l = M(0);
780
+ const l = P(0);
781
781
  function c() {
782
782
  l.x = pe(i);
783
783
  }
784
784
  if (o || !o && !r)
785
- if ((q(e) !== "body" || ee(i)) && (a = he(e)), o) {
785
+ if ((q(e) !== "body" || ee(i)) && (n = he(e)), o) {
786
786
  const h = W(e, !0, r, e);
787
787
  l.x = h.x + e.clientLeft, l.y = h.y + e.clientTop;
788
788
  } else i && c();
789
789
  r && !o && i && c();
790
- const m = i && !o && !r ? et(i, a) : M(0), p = n.left + a.scrollLeft - l.x - m.x, u = n.top + a.scrollTop - l.y - m.y;
790
+ const m = i && !o && !r ? et(i, n) : P(0), p = a.left + n.scrollLeft - l.x - m.x, u = a.top + n.scrollTop - l.y - m.y;
791
791
  return {
792
792
  x: p,
793
793
  y: u,
794
- width: n.width,
795
- height: n.height
794
+ width: a.width,
795
+ height: a.height
796
796
  };
797
797
  }
798
798
  function be(s) {
799
- return A(s).position === "static";
799
+ return M(s).position === "static";
800
800
  }
801
801
  function Fe(s, e) {
802
- if (!E(s) || A(s).position === "fixed")
802
+ if (!E(s) || M(s).position === "fixed")
803
803
  return null;
804
804
  if (e)
805
805
  return e(s);
806
806
  let t = s.offsetParent;
807
- return z(s) === t && (t = t.ownerDocument.body), t;
807
+ return V(s) === t && (t = t.ownerDocument.body), t;
808
808
  }
809
809
  function st(s, e) {
810
810
  const t = T(s);
@@ -820,7 +820,7 @@ function st(s, e) {
820
820
  return t;
821
821
  }
822
822
  let o = Fe(s, e);
823
- for (; o && Mt(o) && be(o); )
823
+ for (; o && Pt(o) && be(o); )
824
824
  o = Fe(o, e);
825
825
  return o && K(o) && be(o) && !Te(o) ? t : o || Dt(s) || t;
826
826
  }
@@ -837,11 +837,11 @@ const Xt = async function(s) {
837
837
  };
838
838
  };
839
839
  function Zt(s) {
840
- return A(s).direction === "rtl";
840
+ return M(s).direction === "rtl";
841
841
  }
842
842
  const ot = {
843
843
  convertOffsetParentRelativeRectToViewportRelativeRect: Ft,
844
- getDocumentElement: z,
844
+ getDocumentElement: V,
845
845
  getClippingRect: qt,
846
846
  getOffsetParent: st,
847
847
  getElementRects: Xt,
@@ -856,57 +856,57 @@ function it(s, e) {
856
856
  }
857
857
  function Qt(s, e) {
858
858
  let t = null, o;
859
- const i = z(s);
859
+ const i = V(s);
860
860
  function r() {
861
- var a;
862
- clearTimeout(o), (a = t) == null || a.disconnect(), t = null;
861
+ var n;
862
+ clearTimeout(o), (n = t) == null || n.disconnect(), t = null;
863
863
  }
864
- function n(a, l) {
865
- a === void 0 && (a = !1), l === void 0 && (l = 1), r();
864
+ function a(n, l) {
865
+ n === void 0 && (n = !1), l === void 0 && (l = 1), r();
866
866
  const c = s.getBoundingClientRect(), {
867
867
  left: m,
868
868
  top: p,
869
869
  width: u,
870
870
  height: h
871
871
  } = c;
872
- if (a || e(), !u || !h)
872
+ if (n || e(), !u || !h)
873
873
  return;
874
- const g = se(p), b = se(i.clientWidth - (m + u)), f = se(i.clientHeight - (p + h)), v = se(m), k = {
874
+ const g = se(p), b = se(i.clientWidth - (m + u)), f = se(i.clientHeight - (p + h)), v = se(m), y = {
875
875
  rootMargin: -g + "px " + -b + "px " + -f + "px " + -v + "px",
876
876
  threshold: F(0, ie(1, l)) || 1
877
877
  };
878
878
  let C = !0;
879
- function y(Y) {
879
+ function w(Y) {
880
880
  const j = Y[0].intersectionRatio;
881
881
  if (j !== l) {
882
882
  if (!C)
883
- return n();
884
- j ? n(!1, j) : o = setTimeout(() => {
885
- n(!1, 1e-7);
883
+ return a();
884
+ j ? a(!1, j) : o = setTimeout(() => {
885
+ a(!1, 1e-7);
886
886
  }, 1e3);
887
887
  }
888
- j === 1 && !it(c, s.getBoundingClientRect()) && n(), C = !1;
888
+ j === 1 && !it(c, s.getBoundingClientRect()) && a(), C = !1;
889
889
  }
890
890
  try {
891
- t = new IntersectionObserver(y, {
892
- ...k,
891
+ t = new IntersectionObserver(w, {
892
+ ...y,
893
893
  // Handle <iframe>s
894
894
  root: i.ownerDocument
895
895
  });
896
896
  } catch {
897
- t = new IntersectionObserver(y, k);
897
+ t = new IntersectionObserver(w, y);
898
898
  }
899
899
  t.observe(s);
900
900
  }
901
- return n(!0), r;
901
+ return a(!0), r;
902
902
  }
903
903
  function _e(s, e, t, o) {
904
904
  o === void 0 && (o = {});
905
905
  const {
906
906
  ancestorScroll: i = !0,
907
907
  ancestorResize: r = !0,
908
- elementResize: n = typeof ResizeObserver == "function",
909
- layoutShift: a = typeof IntersectionObserver == "function",
908
+ elementResize: a = typeof ResizeObserver == "function",
909
+ layoutShift: n = typeof IntersectionObserver == "function",
910
910
  animationFrame: l = !1
911
911
  } = o, c = Oe(s), m = i || r ? [...c ? Z(c) : [], ...Z(e)] : [];
912
912
  m.forEach((v) => {
@@ -914,13 +914,13 @@ function _e(s, e, t, o) {
914
914
  passive: !0
915
915
  }), r && v.addEventListener("resize", t);
916
916
  });
917
- const p = c && a ? Qt(c, t) : null;
917
+ const p = c && n ? Qt(c, t) : null;
918
918
  let u = -1, h = null;
919
- n && (h = new ResizeObserver((v) => {
920
- let [w] = v;
921
- w && w.target === c && h && (h.unobserve(e), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
922
- var k;
923
- (k = h) == null || k.observe(e);
919
+ a && (h = new ResizeObserver((v) => {
920
+ let [k] = v;
921
+ k && k.target === c && h && (h.unobserve(e), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
922
+ var y;
923
+ (y = h) == null || y.observe(e);
924
924
  })), t();
925
925
  }), c && !l && h.observe(c), h.observe(e));
926
926
  let g, b = l ? W(s) : null;
@@ -931,12 +931,12 @@ function _e(s, e, t, o) {
931
931
  }
932
932
  return t(), () => {
933
933
  var v;
934
- m.forEach((w) => {
935
- i && w.removeEventListener("scroll", t), r && w.removeEventListener("resize", t);
934
+ m.forEach((k) => {
935
+ i && k.removeEventListener("scroll", t), r && k.removeEventListener("resize", t);
936
936
  }), p == null || p(), (v = h) == null || v.disconnect(), h = null, l && cancelAnimationFrame(g);
937
937
  };
938
938
  }
939
- const we = Ot, ke = Lt, rt = St, ye = (s, e, t) => {
939
+ const ke = Ot, ye = Lt, rt = St, we = (s, e, t) => {
940
940
  const o = /* @__PURE__ */ new Map(), i = {
941
941
  platform: ot,
942
942
  ...t
@@ -949,7 +949,7 @@ const we = Ot, ke = Lt, rt = St, ye = (s, e, t) => {
949
949
  platform: r
950
950
  });
951
951
  };
952
- var nt = function() {
952
+ var at = function() {
953
953
  }, O = "undefined", es = typeof window !== O && typeof window.navigator !== O && /Trident\/|MSIE /.test(window.navigator.userAgent), xe = [
954
954
  "trace",
955
955
  "debug",
@@ -973,12 +973,12 @@ function ts() {
973
973
  console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
974
974
  }
975
975
  function ss(s) {
976
- return s === "debug" && (s = "log"), typeof console === O ? !1 : s === "trace" && es ? ts : console[s] !== void 0 ? Ne(console, s) : console.log !== void 0 ? Ne(console, "log") : nt;
976
+ return s === "debug" && (s = "log"), typeof console === O ? !1 : s === "trace" && es ? ts : console[s] !== void 0 ? Ne(console, s) : console.log !== void 0 ? Ne(console, "log") : at;
977
977
  }
978
978
  function X() {
979
979
  for (var s = this.getLevel(), e = 0; e < xe.length; e++) {
980
980
  var t = xe[e];
981
- this[t] = e < s ? nt : this.methodFactory(t, s, this.name);
981
+ this[t] = e < s ? at : this.methodFactory(t, s, this.name);
982
982
  }
983
983
  if (this.log = this.debug, typeof console === O && s < this.levels.SILENT)
984
984
  return "No console available for logging";
@@ -991,33 +991,33 @@ function os(s) {
991
991
  function is(s, e, t) {
992
992
  return ss(s) || os.apply(this, arguments);
993
993
  }
994
- function at(s, e) {
995
- var t = this, o, i, r, n = "loglevel";
996
- typeof s == "string" ? n += ":" + s : typeof s == "symbol" && (n = void 0);
997
- function a(u) {
994
+ function nt(s, e) {
995
+ var t = this, o, i, r, a = "loglevel";
996
+ typeof s == "string" ? a += ":" + s : typeof s == "symbol" && (a = void 0);
997
+ function n(u) {
998
998
  var h = (xe[u] || "silent").toUpperCase();
999
- if (!(typeof window === O || !n)) {
999
+ if (!(typeof window === O || !a)) {
1000
1000
  try {
1001
- window.localStorage[n] = h;
1001
+ window.localStorage[a] = h;
1002
1002
  return;
1003
1003
  } catch {
1004
1004
  }
1005
1005
  try {
1006
- window.document.cookie = encodeURIComponent(n) + "=" + h + ";";
1006
+ window.document.cookie = encodeURIComponent(a) + "=" + h + ";";
1007
1007
  } catch {
1008
1008
  }
1009
1009
  }
1010
1010
  }
1011
1011
  function l() {
1012
1012
  var u;
1013
- if (!(typeof window === O || !n)) {
1013
+ if (!(typeof window === O || !a)) {
1014
1014
  try {
1015
- u = window.localStorage[n];
1015
+ u = window.localStorage[a];
1016
1016
  } catch {
1017
1017
  }
1018
1018
  if (typeof u === O)
1019
1019
  try {
1020
- var h = window.document.cookie, g = encodeURIComponent(n), b = h.indexOf(g + "=");
1020
+ var h = window.document.cookie, g = encodeURIComponent(a), b = h.indexOf(g + "=");
1021
1021
  b !== -1 && (u = /^([^;]+)/.exec(
1022
1022
  h.slice(b + g.length + 1)
1023
1023
  )[1]);
@@ -1027,13 +1027,13 @@ function at(s, e) {
1027
1027
  }
1028
1028
  }
1029
1029
  function c() {
1030
- if (!(typeof window === O || !n)) {
1030
+ if (!(typeof window === O || !a)) {
1031
1031
  try {
1032
- window.localStorage.removeItem(n);
1032
+ window.localStorage.removeItem(a);
1033
1033
  } catch {
1034
1034
  }
1035
1035
  try {
1036
- window.document.cookie = encodeURIComponent(n) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
1036
+ window.document.cookie = encodeURIComponent(a) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
1037
1037
  } catch {
1038
1038
  }
1039
1039
  }
@@ -1054,7 +1054,7 @@ function at(s, e) {
1054
1054
  }, t.methodFactory = e || is, t.getLevel = function() {
1055
1055
  return r ?? i ?? o;
1056
1056
  }, t.setLevel = function(u, h) {
1057
- return r = m(u), h !== !1 && a(r), X.call(t);
1057
+ return r = m(u), h !== !1 && n(r), X.call(t);
1058
1058
  }, t.setDefaultLevel = function(u) {
1059
1059
  i = m(u), l() || t.setLevel(u, !1);
1060
1060
  }, t.resetLevel = function() {
@@ -1073,12 +1073,12 @@ function at(s, e) {
1073
1073
  var p = l();
1074
1074
  p != null && (r = m(p)), X.call(t);
1075
1075
  }
1076
- _ = new at();
1076
+ _ = new nt();
1077
1077
  _.getLogger = function(e) {
1078
1078
  if (typeof e != "symbol" && typeof e != "string" || e === "")
1079
1079
  throw new TypeError("You must supply a name when creating a logger.");
1080
1080
  var t = Q[e];
1081
- return t || (t = Q[e] = new at(
1081
+ return t || (t = Q[e] = new nt(
1082
1082
  e,
1083
1083
  _.methodFactory
1084
1084
  )), t;
@@ -1091,12 +1091,12 @@ _.getLoggers = function() {
1091
1091
  return Q;
1092
1092
  };
1093
1093
  _.default = _;
1094
- var ns = function(s) {
1094
+ var as = function(s) {
1095
1095
  for (var e = 1, t = arguments.length, o; e < t; e++)
1096
1096
  for (o in arguments[e])
1097
1097
  Object.prototype.hasOwnProperty.call(arguments[e], o) && (s[o] = arguments[e][o]);
1098
1098
  return s;
1099
- }, as = {
1099
+ }, ns = {
1100
1100
  template: "[%t] %l:",
1101
1101
  levelFormatter: function(s) {
1102
1102
  return s.toUpperCase();
@@ -1115,20 +1115,20 @@ var ns = function(s) {
1115
1115
  }, cs = function(s, e) {
1116
1116
  if (!s || !s.setLevel)
1117
1117
  throw new TypeError("Argument is not a logger");
1118
- var t = s.methodFactory, o = s.name || "", i = H[o] || H[""] || as;
1119
- function r(n, a, l) {
1120
- var c = t(n, a, l), m = H[l] || H[""], p = m.template.indexOf("%t") !== -1, u = m.template.indexOf("%l") !== -1, h = m.template.indexOf("%n") !== -1;
1118
+ var t = s.methodFactory, o = s.name || "", i = H[o] || H[""] || ns;
1119
+ function r(a, n, l) {
1120
+ var c = t(a, n, l), m = H[l] || H[""], p = m.template.indexOf("%t") !== -1, u = m.template.indexOf("%l") !== -1, h = m.template.indexOf("%n") !== -1;
1121
1121
  return function() {
1122
1122
  for (var g = "", b = arguments.length, f = Array(b), v = 0; v < b; v++)
1123
1123
  f[v] = arguments[v];
1124
1124
  if (o || !H[l]) {
1125
- var w = m.timestampFormatter(/* @__PURE__ */ new Date()), k = m.levelFormatter(n), C = m.nameFormatter(l);
1126
- m.format ? g += m.format(k, C, w) : (g += m.template, p && (g = g.replace(/%t/, w)), u && (g = g.replace(/%l/, k)), h && (g = g.replace(/%n/, C))), f.length && typeof f[0] == "string" ? f[0] = g + " " + f[0] : f.unshift(g);
1125
+ var k = m.timestampFormatter(/* @__PURE__ */ new Date()), y = m.levelFormatter(a), C = m.nameFormatter(l);
1126
+ m.format ? g += m.format(y, C, k) : (g += m.template, p && (g = g.replace(/%t/, k)), u && (g = g.replace(/%l/, y)), h && (g = g.replace(/%n/, C))), f.length && typeof f[0] == "string" ? f[0] = g + " " + f[0] : f.unshift(g);
1127
1127
  }
1128
1128
  c.apply(void 0, f);
1129
1129
  };
1130
1130
  }
1131
- return H[o] || (s.methodFactory = r), e = e || {}, e.template && (e.format = void 0), H[o] = ns({}, i, e), s.setLevel(s.getLevel()), lt || s.warn(
1131
+ return H[o] || (s.methodFactory = r), e = e || {}, e.template && (e.format = void 0), H[o] = as({}, i, e), s.setLevel(s.getLevel()), lt || s.warn(
1132
1132
  "It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"
1133
1133
  ), s;
1134
1134
  }, ds = {
@@ -1148,14 +1148,14 @@ const ms = {
1148
1148
  ds.reg(_);
1149
1149
  const hs = (s) => s.toTimeString().split(" ")[0] + "." + s.getMilliseconds().toString().padStart(3, "0"), ps = _.methodFactory;
1150
1150
  _.methodFactory = function(s, e, t) {
1151
- const o = ps(s, e, t), r = `color: ${ms[s] || "#666"}; font-weight: bold;`, n = "color: inherit;";
1152
- return function(...a) {
1151
+ const o = ps(s, e, t), r = `color: ${ms[s] || "#666"}; font-weight: bold;`, a = "color: inherit;";
1152
+ return function(...n) {
1153
1153
  const l = hs(/* @__PURE__ */ new Date()), c = s.toUpperCase(), m = t ? `%c[${l}]%c %c[${c}]%c %c[${t}]%c` : `%c[${l}]%c %c[${c}]%c`;
1154
- o(m, ...t ? [r, n, r, n, r, n] : [r, n, r, n], ...a);
1154
+ o(m, ...t ? [r, a, r, a, r, a] : [r, a, r, a], ...n);
1155
1155
  };
1156
1156
  };
1157
1157
  typeof _.setDefaultLevel == "function" ? _.setDefaultLevel("silent") : _.setLevel("silent", !1);
1158
- const oe = _.getLogger("MULTISELECT:INIT"), x = _.getLogger("MULTISELECT:DATA"), P = _.getLogger("MULTISELECT:UI"), S = _.getLogger("MULTISELECT:INTERACTION"), us = [
1158
+ const oe = _.getLogger("MULTISELECT:INIT"), x = _.getLogger("MULTISELECT:DATA"), A = _.getLogger("MULTISELECT:UI"), S = _.getLogger("MULTISELECT:INTERACTION"), us = [
1159
1159
  "MULTISELECT:INIT",
1160
1160
  "MULTISELECT:DATA",
1161
1161
  "MULTISELECT:UI",
@@ -1240,8 +1240,8 @@ class We {
1240
1240
  this.visibleStart = e, this.visibleEnd = t, this.onVisibleRangeChange && this.onVisibleRangeChange(e, t);
1241
1241
  let o = "";
1242
1242
  for (let i = e; i < t; i++) {
1243
- const r = this.items[i], n = this.renderItem(r, i), a = i * this.itemHeight;
1244
- o += `<div class="ms__virtual-item" style="position: absolute; top: ${a}px; left: 0; right: 0; height: ${this.itemHeight}px;" data-index="${i}">`, o += n, o += "</div>";
1243
+ const r = this.items[i], a = this.renderItem(r, i), n = i * this.itemHeight;
1244
+ o += `<div class="ms__virtual-item" style="position: absolute; top: ${n}px; left: 0; right: 0; height: ${this.itemHeight}px;" data-index="${i}">`, o += a, o += "</div>";
1245
1245
  }
1246
1246
  this.viewport.innerHTML = o;
1247
1247
  }
@@ -1330,13 +1330,13 @@ class _s {
1330
1330
  show() {
1331
1331
  var e;
1332
1332
  (e = this.onBeforeShow) == null || e.call(this), this.element.classList.add(this.visibleClass), this.positionCleanup && this.positionCleanup(), this.positionCleanup = _e(this.trigger, this.element, () => {
1333
- ye(this.trigger, this.element, {
1333
+ we(this.trigger, this.element, {
1334
1334
  placement: this.placement,
1335
1335
  strategy: "fixed",
1336
1336
  middleware: [
1337
- we(this.offsetDistance),
1337
+ ke(this.offsetDistance),
1338
1338
  rt(),
1339
- ke({ padding: 8 })
1339
+ ye({ padding: 8 })
1340
1340
  ]
1341
1341
  }).then(({ x: t, y: o }) => {
1342
1342
  Object.assign(this.element.style, {
@@ -1357,7 +1357,7 @@ class _s {
1357
1357
  this.showTimer !== null && clearTimeout(this.showTimer), this.hideTimer !== null && clearTimeout(this.hideTimer), this.showTimer = null, this.hideTimer = null, this.positionCleanup && (this.positionCleanup(), this.positionCleanup = null), this.trigger.removeEventListener("mouseenter", this.handleMouseEnter), this.trigger.removeEventListener("mouseleave", this.handleMouseLeave), this.element.remove();
1358
1358
  }
1359
1359
  }
1360
- function ws(s) {
1360
+ function ks(s) {
1361
1361
  let e = s;
1362
1362
  for (; e && !(e === document.body || e === document.documentElement); ) {
1363
1363
  if (e instanceof Element) {
@@ -1371,7 +1371,7 @@ function ws(s) {
1371
1371
  }
1372
1372
  return window;
1373
1373
  }
1374
- function ks(s, e, t) {
1374
+ function ys(s, e, t) {
1375
1375
  let o = s;
1376
1376
  for (; o && !(o === document.body || o === document.documentElement); ) {
1377
1377
  if (o instanceof Element) {
@@ -1383,7 +1383,7 @@ function ks(s, e, t) {
1383
1383
  }
1384
1384
  return null;
1385
1385
  }
1386
- function ys(s) {
1386
+ function ws(s) {
1387
1387
  const e = getComputedStyle(s), t = [];
1388
1388
  e.transform !== "none" && t.push(`transform: ${e.transform}`), e.perspective !== "none" && t.push(`perspective: ${e.perspective}`), e.filter !== "none" && t.push(`filter: ${e.filter}`);
1389
1389
  const o = e.backdropFilter;
@@ -1598,12 +1598,12 @@ class xs {
1598
1598
  hasAncestorDir: r,
1599
1599
  isRTL: this.isRTL
1600
1600
  }), this.effectiveBadgesPosition = this.options.badgesPosition || "bottom", this.isRTL && (this.effectiveBadgesPosition === "left" ? this.effectiveBadgesPosition = "right" : this.effectiveBadgesPosition === "right" && (this.effectiveBadgesPosition = "left")), this.element.classList.add("ms"), this.isRTL && (this.element.classList.add("ms--rtl"), oe.debug(`[${this.instanceId}] Added ms--rtl class to element`)), (!this.options.isCheckboxesShown || !this.options.isMultipleEnabled) && this.element.classList.add("ms--no-checkboxes");
1601
- const n = document.createElement("div");
1602
- n.className = "ms__input-wrapper", this.input = document.createElement("input"), this.input.type = "text", this.input.className = "ms__input", this.input.placeholder = this.options.searchPlaceholder, this.input.autocomplete = "off", this.options.searchInputMode === "readonly" ? this.input.readOnly = !0 : this.options.searchInputMode === "hidden" && (this.input.style.display = "none");
1603
- const a = document.createElement("span");
1604
- a.className = "ms__toggle", a.innerHTML = "▼", this.counter = document.createElement("span"), this.counter.className = "ms__counter", this.counter.style.display = "none", n.appendChild(this.input), n.appendChild(this.counter), n.appendChild(a), this.badgesContainer = document.createElement("div"), this.badgesContainer.className = "ms__badges";
1601
+ const a = document.createElement("div");
1602
+ a.className = "ms__input-wrapper", this.input = document.createElement("input"), this.input.type = "text", this.input.className = "ms__input", this.input.placeholder = this.options.searchPlaceholder, this.input.autocomplete = "off", this.options.searchInputMode === "readonly" ? this.input.readOnly = !0 : this.options.searchInputMode === "hidden" && (this.input.style.display = "none");
1603
+ const n = document.createElement("span");
1604
+ n.className = "ms__toggle", n.innerHTML = "▼", this.counter = document.createElement("span"), this.counter.className = "ms__counter", this.counter.style.display = "none", a.appendChild(this.input), a.appendChild(this.counter), a.appendChild(n), this.badgesContainer = document.createElement("div"), this.badgesContainer.className = "ms__badges";
1605
1605
  const l = document.createElement("div");
1606
- l.className = "ms__wrapper", (this.effectiveBadgesPosition === "left" || this.effectiveBadgesPosition === "right") && l.classList.add("ms__wrapper--inline"), l.appendChild(n), l.appendChild(this.badgesContainer), this.element.appendChild(l), this.dropdown = document.createElement("div"), this.dropdown.className = "ms__dropdown", this.dropdownInner = document.createElement("div"), this.dropdownInner.className = "ms__dropdown-inner", this.dropdown.appendChild(this.dropdownInner), e.appendChild(this.dropdown), this.options.searchHint && (this.hint = document.createElement("div"), this.hint.className = "ms__hint", this.hint.textContent = this.options.searchHint, e.appendChild(this.hint)), this.selectedPopover = document.createElement("div"), this.selectedPopover.className = "ms__selected-popover", e.appendChild(this.selectedPopover), this.renderDropdown();
1606
+ l.className = "ms__wrapper", (this.effectiveBadgesPosition === "left" || this.effectiveBadgesPosition === "right") && l.classList.add("ms__wrapper--inline"), l.appendChild(a), l.appendChild(this.badgesContainer), this.element.appendChild(l), this.dropdown = document.createElement("div"), this.dropdown.className = "ms__dropdown", this.dropdownInner = document.createElement("div"), this.dropdownInner.className = "ms__dropdown-inner", this.dropdown.appendChild(this.dropdownInner), e.appendChild(this.dropdown), this.options.searchHint && (this.hint = document.createElement("div"), this.hint.className = "ms__hint", this.hint.textContent = this.options.searchHint, e.appendChild(this.hint)), this.selectedPopover = document.createElement("div"), this.selectedPopover.className = "ms__selected-popover", e.appendChild(this.selectedPopover), this.renderDropdown();
1607
1607
  }
1608
1608
  /**
1609
1609
  * Check if virtual scroll should be used
@@ -1642,8 +1642,8 @@ class xs {
1642
1642
  if (this.options.renderGroupLabelContentCallback) {
1643
1643
  const r = this.options.renderGroupLabelContentCallback(i);
1644
1644
  if (r instanceof HTMLElement) {
1645
- const n = document.createElement("div");
1646
- n.className = "ms__group-label", n.appendChild(r), e += n.outerHTML;
1645
+ const a = document.createElement("div");
1646
+ a.className = "ms__group-label", a.appendChild(r), e += a.outerHTML;
1647
1647
  } else
1648
1648
  e += `<div class="ms__group-label">${r}</div>`;
1649
1649
  } else
@@ -1690,7 +1690,7 @@ class xs {
1690
1690
  renderActionsHTML() {
1691
1691
  const e = this.options.actionButtons;
1692
1692
  if (!this.options.isMultipleEnabled || !e || e.length === 0) return "";
1693
- const t = this.options.isActionsSticky ? " ms__actions--sticky" : "", o = this.options.actionsLayout === "wrap" ? " ms__actions--wrap" : "", i = e.map((r, n) => {
1693
+ const t = this.options.isActionsSticky ? " ms__actions--sticky" : "", o = this.options.actionsLayout === "wrap" ? " ms__actions--wrap" : "", i = e.map((r, a) => {
1694
1694
  if (!(r.isVisibleCallback ? r.isVisibleCallback(this) : r.isVisible ?? !0)) return "";
1695
1695
  const c = (r.isDisabledCallback ? r.isDisabledCallback(this) : r.isDisabled ?? !1) ? " disabled" : "", m = r.getTextCallback ? r.getTextCallback(this) : r.text;
1696
1696
  let p = "";
@@ -1698,26 +1698,26 @@ class xs {
1698
1698
  const u = r.getClassCallback(this);
1699
1699
  p = Array.isArray(u) ? ` ${u.join(" ")}` : u ? ` ${u}` : "";
1700
1700
  } else r.cssClass && (p = ` ${r.cssClass}`);
1701
- return `<button type="button"${c} class="ms__action-btn${p}" data-action="${r.action}" data-button-index="${n}">${m}</button>`;
1701
+ return `<button type="button"${c} class="ms__action-btn${p}" data-action="${r.action}" data-button-index="${a}">${m}</button>`;
1702
1702
  }).join("");
1703
1703
  return `<div class="ms__actions${t}${o}">${i}</div>`;
1704
1704
  }
1705
1705
  renderOption(e, t) {
1706
- const o = this.getItemValue(e), i = this.getItemDisplayValue(e), r = this.getItemIcon(e), n = this.getItemSubtitle(e), a = this.getItemDisabled(e), l = this.selectedValues.has(String(o)), c = t === this.focusedIndex, m = this.matchingIndices.has(t), p = ["ms__option"];
1707
- l && p.push("ms__option--selected"), c && p.push("ms__option--focused"), m && p.push("ms__option--matched"), a && p.push("ms__option--disabled");
1706
+ const o = this.getItemValue(e), i = this.getItemDisplayValue(e), r = this.getItemIcon(e), a = this.getItemSubtitle(e), n = this.getItemDisabled(e), l = this.selectedValues.has(String(o)), c = t === this.focusedIndex, m = this.matchingIndices.has(t), p = ["ms__option"];
1707
+ l && p.push("ms__option--selected"), c && p.push("ms__option--focused"), m && p.push("ms__option--matched"), n && p.push("ms__option--disabled");
1708
1708
  const u = this.options.checkboxAlign && this.options.checkboxAlign !== "center" ? ` data-checkbox-align="${this.options.checkboxAlign}"` : "";
1709
1709
  let h = `<div class="${p.join(" ")}" data-value="${o}" data-index="${t}"${u}>`;
1710
- if (this.options.isCheckboxesShown && this.options.isMultipleEnabled && (h += `<input type="checkbox" class="ms__checkbox" ${l ? "checked" : ""} ${a ? "disabled" : ""}>`), h += '<div class="ms__option-content">', this.options.renderOptionContentCallback) {
1710
+ if (this.options.isCheckboxesShown && this.options.isMultipleEnabled && (h += `<input type="checkbox" class="ms__checkbox" ${l ? "checked" : ""} ${n ? "disabled" : ""}>`), h += '<div class="ms__option-content">', this.options.renderOptionContentCallback) {
1711
1711
  const g = {
1712
1712
  index: t,
1713
1713
  isSelected: l,
1714
1714
  isFocused: c,
1715
1715
  isMatched: m,
1716
- isDisabled: a
1716
+ isDisabled: n
1717
1717
  }, b = this.options.renderOptionContentCallback(e, g);
1718
1718
  typeof b == "string" ? h += b : h += b.outerHTML;
1719
1719
  } else
1720
- r && (h += `<span class="ms__option-icon">${r}</span>`), h += '<div class="ms__option-text">', h += `<div class="ms__option-title">${this.highlightMatch(i, this.searchTerm)}</div>`, n && (h += `<div class="ms__option-subtitle">${n}</div>`), h += "</div>";
1720
+ r && (h += `<span class="ms__option-icon">${r}</span>`), h += '<div class="ms__option-text">', h += `<div class="ms__option-title">${this.highlightMatch(i, this.searchTerm)}</div>`, a && (h += `<div class="ms__option-subtitle">${a}</div>`), h += "</div>";
1721
1721
  return h += "</div>", h += "</div>", h;
1722
1722
  }
1723
1723
  highlightMatch(e, t) {
@@ -1756,21 +1756,21 @@ class xs {
1756
1756
  this.badgesContainer.className = `ms__badges ms__badges--${this.effectiveBadgesPosition}`, this.badgesContainer.innerHTML = e.map((r) => this.renderBadgeHTML(r, { displayMode: "badges", isInPopover: !1 })).join("");
1757
1757
  else if (o === "partial") {
1758
1758
  this.badgesContainer.className = `ms__badges ms__badges--${this.effectiveBadgesPosition}`;
1759
- const r = this.options.badgesMaxVisible || 3, n = e.slice(0, r), a = t - r, l = n.map((m) => this.renderBadgeHTML(m, { displayMode: "partial", isInPopover: !1 })).join("");
1759
+ const r = this.options.badgesMaxVisible || 3, a = e.slice(0, r), n = t - r, l = a.map((m) => this.renderBadgeHTML(m, { displayMode: "partial", isInPopover: !1 })).join("");
1760
1760
  let c = "";
1761
- a > 0 && (c = `
1761
+ n > 0 && (c = `
1762
1762
  <div class="ms__badge ms__badge--counter ms__badge--more" data-action="show-selected">
1763
- <span class="ms__badge-text">${this.options.getCounterCallback ? this.options.getCounterCallback(t, a) : `+${a} more`}</span>
1764
- <button type="button" class="ms__badge-remove" data-action="remove-hidden" aria-label="Remove ${a} hidden items"></button>
1763
+ <span class="ms__badge-text">${this.options.getCounterCallback ? this.options.getCounterCallback(t, n) : `+${n} more`}</span>
1764
+ <button type="button" class="ms__badge-remove" data-action="remove-hidden" aria-label="Remove ${n} hidden items"></button>
1765
1765
  </div>
1766
1766
  `), this.badgesContainer.innerHTML = l + c;
1767
1767
  } else if (o === "compact")
1768
1768
  if (this.badgesContainer.className = `ms__badges ms__badges--${this.effectiveBadgesPosition}`, t > 0) {
1769
- const r = e[0], n = this.getItemBadgeDisplayValue(r), a = t - 1;
1770
- let l = n;
1771
- if (a > 0) {
1772
- const c = this.options.getCounterCallback ? this.options.getCounterCallback(t, a) : `+${a} more`;
1773
- l = `${n} (${c})`;
1769
+ const r = e[0], a = this.getItemBadgeDisplayValue(r), n = t - 1;
1770
+ let l = a;
1771
+ if (n > 0) {
1772
+ const c = this.options.getCounterCallback ? this.options.getCounterCallback(t, n) : `+${n} more`;
1773
+ l = `${a} (${c})`;
1774
1774
  }
1775
1775
  this.badgesContainer.innerHTML = `
1776
1776
  <div class="ms__badge" data-action="show-selected">
@@ -1856,8 +1856,8 @@ class xs {
1856
1856
  else {
1857
1857
  this.filteredOptions = [...this.allOptions], this.matchingIndices.clear();
1858
1858
  let r = -1;
1859
- this.allOptions.forEach((n, a) => {
1860
- this.getItemSearchValue(n).toLowerCase().includes(i) && (this.matchingIndices.add(a), r === -1 && (r = a));
1859
+ this.allOptions.forEach((a, n) => {
1860
+ this.getItemSearchValue(a).toLowerCase().includes(i) && (this.matchingIndices.add(n), r === -1 && (r = n));
1861
1861
  }), r >= 0 ? (this.focusedIndex = r, x.debug(`[${this.instanceId}] Navigate mode: ${this.matchingIndices.size} matches, jumped to index ${r}`)) : x.debug(`[${this.instanceId}] Navigate mode: No matches found, keeping previous focus`);
1862
1862
  }
1863
1863
  }
@@ -1918,21 +1918,21 @@ class xs {
1918
1918
  else if (r === "clear-all")
1919
1919
  this.clearAll();
1920
1920
  else if (r === "custom") {
1921
- const n = parseInt(t.dataset.buttonIndex || "-1"), a = (i = this.options.actionButtons) == null ? void 0 : i[n];
1922
- a != null && a.onClick && a.onClick(this);
1921
+ const a = parseInt(t.dataset.buttonIndex || "-1"), n = (i = this.options.actionButtons) == null ? void 0 : i[a];
1922
+ n != null && n.onClick && n.onClick(this);
1923
1923
  }
1924
1924
  return;
1925
1925
  }
1926
1926
  const o = e.target.closest(".ms__option");
1927
1927
  if (o && !o.classList.contains("ms__option--disabled")) {
1928
1928
  e.preventDefault();
1929
- const r = o.dataset.value, n = this.filteredOptions.findIndex((a) => String(this.getItemValue(a)) === r);
1929
+ const r = o.dataset.value, a = this.filteredOptions.findIndex((n) => String(this.getItemValue(n)) === r);
1930
1930
  S.debug(`[${this.instanceId}] Option clicked:`, {
1931
1931
  value: r,
1932
- optionIndex: n,
1932
+ optionIndex: a,
1933
1933
  closeOnSelect: this.options.isCloseOnSelect,
1934
1934
  placeholder: this.options.searchPlaceholder
1935
- }), n >= 0 && (this.focusedIndex = n, this.toggleOption(this.filteredOptions[n]), this.isOpen && this.input.focus());
1935
+ }), a >= 0 && (this.focusedIndex = a, this.toggleOption(this.filteredOptions[a]), this.isOpen && this.input.focus());
1936
1936
  }
1937
1937
  }
1938
1938
  handleBadgeClick(e) {
@@ -1952,8 +1952,8 @@ class xs {
1952
1952
  Array.from(this.selectedOptions.values()).slice(l).forEach((p) => this.deselectOption(p));
1953
1953
  return;
1954
1954
  }
1955
- const n = i.dataset.value, a = this.selectedOptions.get(n);
1956
- a && this.deselectOption(a);
1955
+ const a = i.dataset.value, n = this.selectedOptions.get(a);
1956
+ n && this.deselectOption(n);
1957
1957
  return;
1958
1958
  }
1959
1959
  if (e.target.closest(".ms__badge--more") && !e.target.closest(".ms__badge-remove")) {
@@ -1965,9 +1965,9 @@ class xs {
1965
1965
  var i;
1966
1966
  const t = e.composedPath();
1967
1967
  if (this.showSelectedPopover && !t.some(
1968
- (n) => n instanceof Node && (this.selectedPopover.contains(n) || this.counter.contains(n) || n.closest && n.closest('[data-action="show-selected"]'))
1968
+ (a) => a instanceof Node && (this.selectedPopover.contains(a) || this.counter.contains(a) || a.closest && a.closest('[data-action="show-selected"]'))
1969
1969
  )) {
1970
- P.debug(`[${this.instanceId}] Closing selected popover due to click outside`), this.hideSelectedPopover();
1970
+ A.debug(`[${this.instanceId}] Closing selected popover due to click outside`), this.hideSelectedPopover();
1971
1971
  return;
1972
1972
  }
1973
1973
  if (!this.isOpen) return;
@@ -2084,10 +2084,10 @@ class xs {
2084
2084
  this.options.selectCallback && t.forEach((i) => this.options.selectCallback(i)), this.options.deselectCallback && o.forEach((i) => this.options.deselectCallback(i)), (t.length > 0 || o.length > 0) && this.options.changeCallback && this.options.changeCallback(this.getSelected());
2085
2085
  }
2086
2086
  open() {
2087
- P.debug(`[${this.instanceId}] open() called`, { isOpen: this.isOpen }), !this.isOpen && (this.isOpen = !0, this.element.classList.add("ms--open"), this.dropdown.classList.add("ms__dropdown--visible"), P.info(`[${this.instanceId}] Dropdown opened`), this.input.placeholder = this.options.searchPlaceholder, !this.options.isMultipleEnabled && this.options.isSearchEnabled && (this.input.value = ""), this.options.searchCallback && this.options.isKeepOptionsOnSearch && !this.searchTerm && (this.filteredOptions = [...this.allOptions], P.debug(`[${this.instanceId}] Showing ${this.allOptions.length} initial options on open`)), this.renderDropdown(), this.positionDropdown(), this.hint && (this.hint.classList.add("ms__hint--visible"), this.positionHint()));
2087
+ A.debug(`[${this.instanceId}] open() called`, { isOpen: this.isOpen }), !this.isOpen && (this.isOpen = !0, this.element.classList.add("ms--open"), this.dropdown.classList.add("ms__dropdown--visible"), A.info(`[${this.instanceId}] Dropdown opened`), this.input.placeholder = this.options.searchPlaceholder, !this.options.isMultipleEnabled && this.options.isSearchEnabled && (this.input.value = ""), this.options.searchCallback && this.options.isKeepOptionsOnSearch && !this.searchTerm && (this.filteredOptions = [...this.allOptions], A.debug(`[${this.instanceId}] Showing ${this.allOptions.length} initial options on open`)), this.renderDropdown(), this.positionDropdown(), this.hint && (this.hint.classList.add("ms__hint--visible"), this.positionHint()));
2088
2088
  }
2089
2089
  close() {
2090
- P.debug(`[${this.instanceId}] close() called`, { isOpen: this.isOpen }), this.isOpen && (this.isOpen = !1, this.element.classList.remove("ms--open"), this.dropdown.classList.remove("ms__dropdown--visible"), this.hint && this.hint.classList.remove("ms__hint--visible"), this.options.shouldKeepSearchOnClose || (this.searchTerm = "", (this.options.isMultipleEnabled || this.options.isSearchEnabled) && (this.input.value = ""), this.filteredOptions = [...this.allOptions]), this.focusedIndex = -1, this.renderBadges(), this.dropdownCleanup && (this.dropdownCleanup(), this.dropdownCleanup = null), this.hintCleanup && (this.hintCleanup(), this.hintCleanup = null), this.dropdownPlacement = null, P.debug(`[${this.instanceId}] Dropdown closed`));
2090
+ A.debug(`[${this.instanceId}] close() called`, { isOpen: this.isOpen }), this.isOpen && (this.isOpen = !1, this.element.classList.remove("ms--open"), this.dropdown.classList.remove("ms__dropdown--visible"), this.hint && this.hint.classList.remove("ms__hint--visible"), this.options.shouldKeepSearchOnClose || (this.searchTerm = "", (this.options.isMultipleEnabled || this.options.isSearchEnabled) && (this.input.value = ""), this.filteredOptions = [...this.allOptions]), this.focusedIndex = -1, this.renderBadges(), this.dropdownCleanup && (this.dropdownCleanup(), this.dropdownCleanup = null), this.hintCleanup && (this.hintCleanup(), this.hintCleanup = null), this.dropdownPlacement = null, A.debug(`[${this.instanceId}] Dropdown closed`));
2091
2091
  }
2092
2092
  /**
2093
2093
  * Anchor a floating panel (dropdown or selected-items popover) below/above the input with
@@ -2099,17 +2099,17 @@ class xs {
2099
2099
  anchorFloatingPanel(e, t) {
2100
2100
  const o = {
2101
2101
  ...ot,
2102
- getOffsetParent: () => ws(this.input)
2102
+ getOffsetParent: () => ks(this.input)
2103
2103
  };
2104
2104
  return _e(this.input, e, () => {
2105
2105
  var l;
2106
2106
  e.style.width = `${this.input.offsetWidth}px`, this.options.dropdownMinWidth && (e.style.minWidth = this.options.dropdownMinWidth), t.applyMaxWidth && this.options.dropdownMaxWidth && (e.style.maxWidth = this.options.dropdownMaxWidth);
2107
- const i = ((l = t.isLocked) == null ? void 0 : l.call(t)) ?? !0, r = t.getPlacement(), n = i && r ? r : "bottom-start", a = [
2108
- we(4),
2107
+ const i = ((l = t.isLocked) == null ? void 0 : l.call(t)) ?? !0, r = t.getPlacement(), a = i && r ? r : "bottom-start", n = [
2108
+ ke(4),
2109
2109
  ...i && r ? [] : [rt()],
2110
- ke({ padding: 8 })
2110
+ ye({ padding: 8 })
2111
2111
  ];
2112
- ye(this.input, e, { placement: n, strategy: "fixed", middleware: a, platform: o }).then(({ x: c, y: m, placement: p }) => {
2112
+ we(this.input, e, { placement: a, strategy: "fixed", middleware: n, platform: o }).then(({ x: c, y: m, placement: p }) => {
2113
2113
  var u;
2114
2114
  r || t.setPlacement(p), Object.assign(e.style, {
2115
2115
  position: "fixed",
@@ -2132,19 +2132,19 @@ class xs {
2132
2132
  */
2133
2133
  verifyPanelLanded(e, t, o) {
2134
2134
  if (this.positioningDriftWarned) return;
2135
- const i = e.getBoundingClientRect(), r = i.x - t, n = i.y - o;
2136
- if (Math.abs(r) < 1 && Math.abs(n) < 1) return;
2135
+ const i = e.getBoundingClientRect(), r = i.x - t, a = i.y - o;
2136
+ if (Math.abs(r) < 1 && Math.abs(a) < 1) return;
2137
2137
  this.positioningDriftWarned = !0;
2138
- const a = ks(this.input, r, n), l = a ? `<${a.tagName.toLowerCase()}${a.id ? "#" + a.id : ""}${typeof a.className == "string" && a.className ? "." + a.className.split(/\s+/).filter(Boolean).slice(0, 2).join(".") : ""}>` : "an ancestor element (could not auto-identify)", c = a ? ys(a) : "";
2138
+ const n = ys(this.input, r, a), l = n ? `<${n.tagName.toLowerCase()}${n.id ? "#" + n.id : ""}${typeof n.className == "string" && n.className ? "." + n.className.split(/\s+/).filter(Boolean).slice(0, 2).join(".") : ""}>` : "an ancestor element (could not auto-identify)", c = n ? ws(n) : "";
2139
2139
  console.warn(
2140
- `[@keenmate/web-multiselect] Dropdown panel rendered ${r.toFixed(0)}px / ${n.toFixed(0)}px away from where the library positioned it. Most likely culprit: ${l}` + (c ? ` (has ${c})` : "") + ".\nAn ancestor of <web-multiselect> establishes a fixed-positioning containing block that the library's heuristic doesn't recognize. Fix on your side: replace the property with `transform: translateZ(0)` on that ancestor, OR move the trigger out of that ancestor's subtree. If neither is acceptable, please file an issue at https://github.com/keenmate/web-multiselect/issues with the ancestor's computed CSS."
2140
+ `[@keenmate/web-multiselect] Dropdown panel rendered ${r.toFixed(0)}px / ${a.toFixed(0)}px away from where the library positioned it. Most likely culprit: ${l}` + (c ? ` (has ${c})` : "") + ".\nAn ancestor of <web-multiselect> establishes a fixed-positioning containing block that the library's heuristic doesn't recognize. Fix on your side: replace the property with `transform: translateZ(0)` on that ancestor, OR move the trigger out of that ancestor's subtree. If neither is acceptable, please file an issue at https://github.com/keenmate/web-multiselect/issues with the ancestor's computed CSS."
2141
2141
  );
2142
2142
  }
2143
2143
  positionDropdown() {
2144
2144
  this.dropdownCleanup = this.anchorFloatingPanel(this.dropdown, {
2145
2145
  getPlacement: () => this.dropdownPlacement,
2146
2146
  setPlacement: (e) => {
2147
- this.dropdownPlacement = e, P.debug(`[${this.instanceId}] Locked dropdown placement:`, e);
2147
+ this.dropdownPlacement = e, A.debug(`[${this.instanceId}] Locked dropdown placement:`, e);
2148
2148
  },
2149
2149
  isLocked: () => !!this.options.isPlacementLocked,
2150
2150
  applyMaxWidth: !0,
@@ -2159,13 +2159,13 @@ class xs {
2159
2159
  this.hint,
2160
2160
  () => {
2161
2161
  let e = "top-start";
2162
- this.dropdownPlacement && (this.dropdownPlacement.startsWith("bottom") ? e = this.dropdownPlacement.replace("bottom", "top") : this.dropdownPlacement.startsWith("top") && (e = this.dropdownPlacement.replace("top", "bottom"))), ye(this.input, this.hint, {
2162
+ this.dropdownPlacement && (this.dropdownPlacement.startsWith("bottom") ? e = this.dropdownPlacement.replace("bottom", "top") : this.dropdownPlacement.startsWith("top") && (e = this.dropdownPlacement.replace("top", "bottom"))), we(this.input, this.hint, {
2163
2163
  placement: e,
2164
2164
  strategy: "fixed",
2165
2165
  middleware: [
2166
- we(4),
2166
+ ke(4),
2167
2167
  // Don't use flip() - we want hint to stay opposite of dropdown
2168
- ke({ padding: 8 })
2168
+ ye({ padding: 8 })
2169
2169
  ]
2170
2170
  }).then(({ x: t, y: o }) => {
2171
2171
  Object.assign(this.hint.style, {
@@ -2207,13 +2207,13 @@ class xs {
2207
2207
  this.showSelectedPopover ? this.hideSelectedPopover() : this.showPopover();
2208
2208
  }
2209
2209
  showPopover() {
2210
- P.debug(`[${this.instanceId}] showPopover() called`), this.isOpen && this.close(), this.showSelectedPopover = !0, this.renderSelectedPopover(), this.selectedPopover.classList.add("ms__selected-popover--visible");
2210
+ A.debug(`[${this.instanceId}] showPopover() called`), this.isOpen && this.close(), this.showSelectedPopover = !0, this.renderSelectedPopover(), this.selectedPopover.classList.add("ms__selected-popover--visible");
2211
2211
  const e = this.options.virtualScrollThreshold ?? 100;
2212
2212
  this.selectedValues.size >= e && this.selectedPopover.classList.add("ms__selected-popover--virtual"), this.positionSelectedPopover();
2213
2213
  }
2214
2214
  hideSelectedPopover() {
2215
2215
  var e;
2216
- P.debug(`[${this.instanceId}] hideSelectedPopover() called`), this.showSelectedPopover = !1, this.selectedPopover.classList.remove("ms__selected-popover--visible"), this.selectedPopover.classList.remove("ms__selected-popover--virtual"), this.selectedPopoverPlacement = null, this.selectedPopoverVirtualScroll && (this.selectedPopoverVirtualScroll.destroy(), this.selectedPopoverVirtualScroll = null, this.selectedPopoverContainer = null), this.selectedPopoverCleanup && (this.selectedPopoverCleanup(), this.selectedPopoverCleanup = null);
2216
+ A.debug(`[${this.instanceId}] hideSelectedPopover() called`), this.showSelectedPopover = !1, this.selectedPopover.classList.remove("ms__selected-popover--visible"), this.selectedPopover.classList.remove("ms__selected-popover--virtual"), this.selectedPopoverPlacement = null, this.selectedPopoverVirtualScroll && (this.selectedPopoverVirtualScroll.destroy(), this.selectedPopoverVirtualScroll = null, this.selectedPopoverContainer = null), this.selectedPopoverCleanup && (this.selectedPopoverCleanup(), this.selectedPopoverCleanup = null);
2217
2217
  for (const t of Array.from(this.tooltips.keys()))
2218
2218
  t.startsWith("popover-") && ((e = this.tooltips.get(t)) == null || e.destroy(), this.tooltips.delete(t));
2219
2219
  }
@@ -2235,27 +2235,27 @@ class xs {
2235
2235
  }
2236
2236
  renderSelectedPopoverVirtual(e, t) {
2237
2237
  if (this.selectedPopoverVirtualScroll) {
2238
- const a = this.selectedPopover.querySelector(".ms__selected-popover-header span");
2239
- a && (a.textContent = `Selected Items (${t})`);
2238
+ const n = this.selectedPopover.querySelector(".ms__selected-popover-header span");
2239
+ n && (n.textContent = `Selected Items (${t})`);
2240
2240
  } else {
2241
- const a = this.options.badgeHeight ?? 36, l = `
2241
+ const n = this.options.badgeHeight ?? 36, l = `
2242
2242
  <div class="ms__selected-popover-header">
2243
2243
  <span>Selected Items (${t})</span>
2244
2244
  <button type="button" class="ms__selected-popover-close" aria-label="Close"></button>
2245
2245
  </div>
2246
- <div class="ms__selected-popover-body ms__selected-popover-body--virtual" style="height: 18rem; overflow-y: auto; position: relative; --ms-badge-height-virtual: ${a}px;"></div>
2246
+ <div class="ms__selected-popover-body ms__selected-popover-body--virtual" style="height: 18rem; overflow-y: auto; position: relative; --ms-badge-height-virtual: ${n}px;"></div>
2247
2247
  `;
2248
2248
  this.selectedPopover.innerHTML = l, this.selectedPopoverContainer = this.selectedPopover.querySelector(".ms__selected-popover-body");
2249
2249
  }
2250
2250
  if (!this.selectedPopoverContainer) return;
2251
- const r = (this.options.badgeHeight ?? 36) + 4, n = this.options.virtualScrollBuffer ?? 10;
2251
+ const r = (this.options.badgeHeight ?? 36) + 4, a = this.options.virtualScrollBuffer ?? 10;
2252
2252
  requestAnimationFrame(() => {
2253
2253
  this.selectedPopoverContainer && (this.selectedPopoverVirtualScroll ? this.selectedPopoverVirtualScroll.setItems(e) : this.selectedPopoverVirtualScroll = new We({
2254
2254
  container: this.selectedPopoverContainer,
2255
2255
  itemHeight: r,
2256
2256
  items: e,
2257
- renderItem: (a) => this.renderBadgeHTML(a, { displayMode: this.options.badgesDisplayMode || "badges", isInPopover: !0 }),
2258
- bufferSize: n,
2257
+ renderItem: (n) => this.renderBadgeHTML(n, { displayMode: this.options.badgesDisplayMode || "badges", isInPopover: !0 }),
2258
+ bufferSize: a,
2259
2259
  onVisibleRangeChange: () => {
2260
2260
  this.attachBadgeTooltips(this.selectedPopoverContainer);
2261
2261
  }
@@ -2283,15 +2283,15 @@ class xs {
2283
2283
  i = typeof c == "string" ? c : c.outerHTML;
2284
2284
  } else
2285
2285
  i = this.getItemBadgeDisplayValue(e);
2286
- const n = t.isInPopover ? this.options.getSelectedItemClassCallback || this.options.getBadgeClassCallback : this.options.getBadgeClassCallback;
2287
- let a = "ms__badge";
2288
- if (n) {
2289
- const c = n(e), m = Array.isArray(c) ? c : [c];
2290
- a += " " + m.filter((p) => p).join(" ");
2286
+ const a = t.isInPopover ? this.options.getSelectedItemClassCallback || this.options.getBadgeClassCallback : this.options.getBadgeClassCallback;
2287
+ let n = "ms__badge";
2288
+ if (a) {
2289
+ const c = a(e), m = Array.isArray(c) ? c : [c];
2290
+ n += " " + m.filter((p) => p).join(" ");
2291
2291
  }
2292
2292
  const l = this.getItemBadgeDisplayValue(e);
2293
2293
  return `
2294
- <div class="${a}">
2294
+ <div class="${n}">
2295
2295
  <span class="ms__badge-text">${i}</span>
2296
2296
  <button type="button" class="ms__badge-remove" data-value="${o}" aria-label="Remove ${l}"></button>
2297
2297
  </div>
@@ -2313,7 +2313,7 @@ class xs {
2313
2313
  this.selectedPopoverCleanup = this.anchorFloatingPanel(this.selectedPopover, {
2314
2314
  getPlacement: () => this.selectedPopoverPlacement,
2315
2315
  setPlacement: (e) => {
2316
- this.selectedPopoverPlacement = e, P.debug(`[${this.instanceId}] Locked popover placement:`, e);
2316
+ this.selectedPopoverPlacement = e, A.debug(`[${this.instanceId}] Locked popover placement:`, e);
2317
2317
  }
2318
2318
  });
2319
2319
  }
@@ -2432,12 +2432,12 @@ ${o}` : t;
2432
2432
  attachBadgeTooltips(e) {
2433
2433
  if (!this.options.isBadgeTooltipsEnabled) return;
2434
2434
  const t = !!e, o = e || this.badgesContainer, i = t ? "popover-" : "";
2435
- if (o.querySelectorAll(".ms__badge:not(.ms__badge--more)").forEach((n) => {
2436
- const a = n.querySelector(".ms__badge-remove");
2437
- if (!a) return;
2438
- const l = a.dataset.value, c = this.selectedOptions.get(l);
2435
+ if (o.querySelectorAll(".ms__badge:not(.ms__badge--more)").forEach((a) => {
2436
+ const n = a.querySelector(".ms__badge-remove");
2437
+ if (!n) return;
2438
+ const l = n.dataset.value, c = this.selectedOptions.get(l);
2439
2439
  if (!c) return;
2440
- const m = `${i}${l}`, p = `${i}${l}-remove`, u = n.querySelector(".ms__badge-text");
2440
+ const m = `${i}${l}`, p = `${i}${l}-remove`, u = a.querySelector(".ms__badge-text");
2441
2441
  u && this.spawnTooltip({
2442
2442
  id: m,
2443
2443
  trigger: u,
@@ -2446,7 +2446,7 @@ ${o}` : t;
2446
2446
  const h = this.getItemBadgeDisplayValue(c);
2447
2447
  this.spawnTooltip({
2448
2448
  id: p,
2449
- trigger: a,
2449
+ trigger: n,
2450
2450
  content: this.buildRemoveButtonTooltipText(h, c),
2451
2451
  // Keep parent badge tooltip from overlapping the remove-button tooltip.
2452
2452
  onBeforeShow: () => {
@@ -2455,12 +2455,12 @@ ${o}` : t;
2455
2455
  }
2456
2456
  });
2457
2457
  }), !t) {
2458
- const n = this.badgesContainer.querySelector(".ms__badge--more"), a = n == null ? void 0 : n.querySelector(".ms__badge-remove");
2459
- if (a && a.dataset.action === "remove-hidden") {
2458
+ const a = this.badgesContainer.querySelector(".ms__badge--more"), n = a == null ? void 0 : a.querySelector(".ms__badge-remove");
2459
+ if (n && n.dataset.action === "remove-hidden") {
2460
2460
  const l = this.options.badgesMaxVisible || 3, c = this.selectedOptions.size - l;
2461
2461
  this.spawnTooltip({
2462
2462
  id: "more-badge-remove",
2463
- trigger: a,
2463
+ trigger: n,
2464
2464
  content: this.buildRemoveButtonTooltipText(`${c} hidden items`)
2465
2465
  });
2466
2466
  }
@@ -2471,12 +2471,12 @@ ${o}` : t;
2471
2471
  var c, m;
2472
2472
  const o = t, i = o.dataset.action;
2473
2473
  if (!i) return;
2474
- const r = parseInt(o.dataset.buttonIndex || "-1"), n = r >= 0 ? (c = this.options.actionButtons) == null ? void 0 : c[r] : (m = this.options.actionButtons) == null ? void 0 : m.find((p) => p.action === i);
2475
- if (!n) return;
2476
- const a = n.getTooltipCallback ? n.getTooltipCallback(this) : n.tooltip;
2474
+ const r = parseInt(o.dataset.buttonIndex || "-1"), a = r >= 0 ? (c = this.options.actionButtons) == null ? void 0 : c[r] : (m = this.options.actionButtons) == null ? void 0 : m.find((p) => p.action === i);
2477
2475
  if (!a) return;
2476
+ const n = a.getTooltipCallback ? a.getTooltipCallback(this) : a.tooltip;
2477
+ if (!n) return;
2478
2478
  const l = `action-${r >= 0 ? r : i}`;
2479
- this.spawnTooltip({ id: l, trigger: o, content: a });
2479
+ this.spawnTooltip({ id: l, trigger: o, content: n });
2480
2480
  });
2481
2481
  }
2482
2482
  /**
@@ -2622,6 +2622,13 @@ const Cs = `@layer variables,component,overrides;@layer variables{:host{display:
2622
2622
  { key: "subtitleMember", field: "_subtitleMember" },
2623
2623
  { key: "groupMember", field: "_groupMember" },
2624
2624
  { key: "disabledMember", field: "_disabledMember" }
2625
+ ], Is = [
2626
+ { key: "valueMember", member: "value" },
2627
+ { key: "displayValueMember", member: "label" },
2628
+ { key: "groupMember", member: "group" },
2629
+ { key: "iconMember", member: "icon" },
2630
+ { key: "subtitleMember", member: "subtitle" },
2631
+ { key: "disabledMember", member: "disabled" }
2625
2632
  ];
2626
2633
  function Ge(s, e) {
2627
2634
  if (e === null || e === "")
@@ -2653,7 +2660,7 @@ const Se = /* @__PURE__ */ new Set();
2653
2660
  function ct() {
2654
2661
  return Array.from(Se);
2655
2662
  }
2656
- class Ae extends Ss {
2663
+ class Me extends Ss {
2657
2664
  constructor() {
2658
2665
  super();
2659
2666
  d(this, "picker");
@@ -2662,6 +2669,7 @@ class Ae extends Ss {
2662
2669
  d(this, "internals");
2663
2670
  // Properties for complex data (not attributes)
2664
2671
  d(this, "_options");
2672
+ d(this, "_hasDeclarativeOptions", !1);
2665
2673
  // Member/Callback properties
2666
2674
  d(this, "_valueMember");
2667
2675
  d(this, "_getValueCallback");
@@ -2736,22 +2744,22 @@ class Ae extends Ss {
2736
2744
  connectedCallback() {
2737
2745
  Se.add(this), this.render();
2738
2746
  const t = this.parseDeclarativeOptions();
2739
- t && (this._options && this._options.length > 0 && x.warn("[MultiSelectElement] Both declarative <option> elements and programmatic .options detected. Using declarative options."), this._options = t), this.initializePicker();
2747
+ t && (this._options && this._options.length > 0 && x.warn("[MultiSelectElement] Both declarative <option> elements and programmatic .options detected. Using declarative options."), this._options = t, this._hasDeclarativeOptions = !0), this.initializePicker();
2740
2748
  }
2741
2749
  disconnectedCallback() {
2742
2750
  Se.delete(this), this.picker && this.picker.destroy();
2743
2751
  }
2744
2752
  attributeChangedCallback(t, o, i) {
2745
- var n;
2753
+ var a;
2746
2754
  if (o === i || !this.picker || t === "initial-values") return;
2747
2755
  if (t === "show-debug-info") {
2748
- const a = this.shadow.querySelector(".ms__debug-info");
2749
- a && a.remove(), i === "true" && this.renderDebugInfo();
2756
+ const n = this.shadow.querySelector(".ms__debug-info");
2757
+ n && n.remove(), i === "true" && this.renderDebugInfo();
2750
2758
  return;
2751
2759
  }
2752
2760
  const r = Ts.get(t);
2753
2761
  if (r) {
2754
- const a = Ge(r, i), l = (n = je.find((u) => u.key === r.key)) == null ? void 0 : n.field, c = a === void 0 && l ? this[l] : a, m = { [r.key]: c };
2762
+ const n = Ge(r, i), l = (a = je.find((u) => u.key === r.key)) == null ? void 0 : a.field, c = n === void 0 && l ? this[l] : n, m = { [r.key]: c };
2755
2763
  if (this.picker.updateOptions(m)) return;
2756
2764
  }
2757
2765
  this.reinitialize();
@@ -2766,20 +2774,20 @@ class Ae extends Ss {
2766
2774
  o.className = "ms__debug-info";
2767
2775
  const i = document.createElement("details"), r = document.createElement("summary");
2768
2776
  r.textContent = "Debug Info";
2769
- const n = document.createElement("div");
2770
- n.className = "ms__debug-stats", i.appendChild(r), i.appendChild(n), o.appendChild(i), this.shadow.appendChild(o), this.updateDebugInfo();
2777
+ const a = document.createElement("div");
2778
+ a.className = "ms__debug-stats", i.appendChild(r), i.appendChild(a), o.appendChild(i), this.shadow.appendChild(o), this.updateDebugInfo();
2771
2779
  }
2772
2780
  updateDebugInfo() {
2773
2781
  var h, g;
2774
2782
  const t = this.shadow.querySelector(".ms__debug-stats");
2775
2783
  if (!t || !this.picker) return;
2776
- const o = "1.12.0-rc02", i = ct().length, n = this.picker.getSelected().length, a = ((h = this._options) == null ? void 0 : h.length) || 0, l = this.picker, c = l.isOpen || !1, m = l.searchTerm || "", p = l.isLoading || !1, u = ((g = l.filteredOptions) == null ? void 0 : g.length) || 0;
2784
+ const o = "1.12.0-rc03", i = ct().length, a = this.picker.getSelected().length, n = ((h = this._options) == null ? void 0 : h.length) || 0, l = this.picker, c = l.isOpen || !1, m = l.searchTerm || "", p = l.isLoading || !1, u = ((g = l.filteredOptions) == null ? void 0 : g.length) || 0;
2777
2785
  t.innerHTML = `
2778
2786
  <span>Version: ${o}</span>
2779
2787
  <span>Total Instances: ${i}</span>
2780
- <span>Options: ${a}</span>
2788
+ <span>Options: ${n}</span>
2781
2789
  <span>Filtered: ${u}</span>
2782
- <span>Selected: ${n}</span>
2790
+ <span>Selected: ${a}</span>
2783
2791
  <span>Dropdown: ${c ? "Open" : "Closed"}</span>
2784
2792
  <span>Search: ${m || "none"}</span>
2785
2793
  <span>Loading: ${p ? "Yes" : "No"}</span>
@@ -2792,7 +2800,7 @@ class Ae extends Ss {
2792
2800
  * Returns array of options in the format expected by the picker
2793
2801
  */
2794
2802
  parseDeclarativeOptions() {
2795
- var r, n, a, l;
2803
+ var r, a, n, l;
2796
2804
  const t = [], o = Array.from(this.children);
2797
2805
  if (o.length === 0)
2798
2806
  return null;
@@ -2801,14 +2809,14 @@ class Ae extends Ss {
2801
2809
  if (c.tagName === "OPTION") {
2802
2810
  const m = c, p = {
2803
2811
  value: m.value || ((r = m.textContent) == null ? void 0 : r.trim()) || "",
2804
- label: ((n = m.textContent) == null ? void 0 : n.trim()) || m.value || ""
2812
+ label: ((a = m.textContent) == null ? void 0 : a.trim()) || m.value || ""
2805
2813
  };
2806
2814
  m.hasAttribute("selected") && (this._declarativeSelectedValues || (this._declarativeSelectedValues = []), this._declarativeSelectedValues.push(p.value)), m.hasAttribute("disabled") && (p.disabled = !0), m.hasAttribute("data-icon") && (p.icon = m.getAttribute("data-icon")), m.hasAttribute("data-subtitle") && (p.subtitle = m.getAttribute("data-subtitle")), t.push(p), i = !0;
2807
2815
  } else if (c.tagName === "OPTGROUP") {
2808
2816
  const m = c, p = m.label || m.getAttribute("label") || "Group", u = Array.from(m.querySelectorAll("option"));
2809
2817
  for (const h of u) {
2810
2818
  const g = {
2811
- value: h.value || ((a = h.textContent) == null ? void 0 : a.trim()) || "",
2819
+ value: h.value || ((n = h.textContent) == null ? void 0 : n.trim()) || "",
2812
2820
  label: ((l = h.textContent) == null ? void 0 : l.trim()) || h.value || "",
2813
2821
  group: p
2814
2822
  };
@@ -2835,24 +2843,36 @@ class Ae extends Ss {
2835
2843
  if (o && this._options === void 0)
2836
2844
  try {
2837
2845
  t = JSON.parse(o);
2838
- } catch (n) {
2839
- x.error("[MultiSelectElement] Failed to parse data-options:", n);
2846
+ } catch (a) {
2847
+ x.error("[MultiSelectElement] Failed to parse data-options:", a);
2840
2848
  }
2841
2849
  let i;
2842
2850
  if (this._declarativeSelectedValues && this._declarativeSelectedValues.length > 0)
2843
2851
  i = this._declarativeSelectedValues, x.debug(`[MultiSelectElement] Using ${i.length} declaratively selected values`);
2844
2852
  else {
2845
- const n = this.getAttribute("initial-values");
2846
- if (n)
2853
+ const a = this.getAttribute("initial-values");
2854
+ if (a)
2847
2855
  try {
2848
- i = JSON.parse(n);
2849
- } catch (a) {
2850
- x.error("[MultiSelectElement] Failed to parse initial-values:", a);
2856
+ i = JSON.parse(a);
2857
+ } catch (n) {
2858
+ x.error("[MultiSelectElement] Failed to parse initial-values:", n);
2851
2859
  }
2852
2860
  }
2853
2861
  const r = this.parseAttributesFromTable();
2854
- for (const { key: n, field: a } of je)
2855
- r[n] === void 0 && (r[n] = this[a]);
2862
+ for (const { key: a, field: n } of je)
2863
+ r[a] === void 0 && (r[a] = this[n]);
2864
+ if (this._hasDeclarativeOptions) {
2865
+ const a = {
2866
+ valueMember: this._getValueCallback,
2867
+ displayValueMember: this._getDisplayValueCallback,
2868
+ groupMember: this._getGroupCallback,
2869
+ iconMember: this._getIconCallback,
2870
+ subtitleMember: this._getSubtitleCallback,
2871
+ disabledMember: this._getDisabledCallback
2872
+ };
2873
+ for (const { key: n, member: l } of Is)
2874
+ r[n] === void 0 && !a[n] && (r[n] = l);
2875
+ }
2856
2876
  if (Object.assign(r, {
2857
2877
  actionButtons: this._actionButtons,
2858
2878
  getValueCallback: this._getValueCallback,
@@ -2874,35 +2894,41 @@ class Ae extends Ss {
2874
2894
  getValueFormatCallback: this._getValueFormatCallback,
2875
2895
  getBadgeTooltipCallback: this._getBadgeTooltipCallback,
2876
2896
  getRemoveButtonTooltipCallback: this._getRemoveButtonTooltipCallback,
2877
- getCounterCallback: this._getCounterCallback || ((n, a) => a !== void 0 ? `+${a} more` : `${n} selected`),
2897
+ getCounterCallback: this._getCounterCallback || ((a, n) => n !== void 0 ? `+${n} more` : `${a} selected`),
2878
2898
  options: this._options ?? t,
2879
2899
  beforeSearchCallback: this._beforeSearchCallback,
2880
2900
  searchCallback: this._searchCallback,
2881
2901
  addNewCallback: this._addNewCallback,
2882
- selectCallback: (n) => {
2883
- var a;
2884
- this._selectCallback && this._selectCallback(n), this.dispatchEvent(new CustomEvent("select", {
2902
+ selectCallback: (a) => {
2903
+ var n;
2904
+ this._selectCallback && this._selectCallback(a), this.dispatchEvent(new CustomEvent("select", {
2905
+ bubbles: !0,
2906
+ composed: !0,
2885
2907
  detail: {
2886
- option: n,
2887
- selectedOptions: (a = this.picker) == null ? void 0 : a.getSelected(),
2908
+ option: a,
2909
+ selectedOptions: (n = this.picker) == null ? void 0 : n.getSelected(),
2888
2910
  selectedValues: this.collectSelectedValues()
2889
2911
  }
2890
2912
  }));
2891
2913
  },
2892
- deselectCallback: (n) => {
2893
- var a;
2894
- this._deselectCallback && this._deselectCallback(n), this.dispatchEvent(new CustomEvent("deselect", {
2914
+ deselectCallback: (a) => {
2915
+ var n;
2916
+ this._deselectCallback && this._deselectCallback(a), this.dispatchEvent(new CustomEvent("deselect", {
2917
+ bubbles: !0,
2918
+ composed: !0,
2895
2919
  detail: {
2896
- option: n,
2897
- selectedOptions: (a = this.picker) == null ? void 0 : a.getSelected(),
2920
+ option: a,
2921
+ selectedOptions: (n = this.picker) == null ? void 0 : n.getSelected(),
2898
2922
  selectedValues: this.collectSelectedValues()
2899
2923
  }
2900
2924
  }));
2901
2925
  },
2902
- changeCallback: (n) => {
2903
- this._changeCallback && this._changeCallback(n), this.dispatchEvent(new CustomEvent("change", {
2926
+ changeCallback: (a) => {
2927
+ this._changeCallback && this._changeCallback(a), this.dispatchEvent(new CustomEvent("change", {
2928
+ bubbles: !0,
2929
+ composed: !0,
2904
2930
  detail: {
2905
- selectedOptions: n,
2931
+ selectedOptions: a,
2906
2932
  selectedValues: this.collectSelectedValues()
2907
2933
  }
2908
2934
  }));
@@ -2912,10 +2938,10 @@ class Ae extends Ss {
2912
2938
  // Pass host element (this) for hidden inputs in light DOM
2913
2939
  hostElement: this
2914
2940
  }), i && (this.containerElement.dataset.initialValues = JSON.stringify(i)), this.picker = new xs(this.containerElement, r), this._customStylesCallback) {
2915
- const n = this._customStylesCallback();
2916
- if (n) {
2917
- const a = document.createElement("style");
2918
- a.className = "ms-custom-styles", a.textContent = n, this.shadow.insertBefore(a, this.shadow.firstChild);
2941
+ const a = this._customStylesCallback();
2942
+ if (a) {
2943
+ const n = document.createElement("style");
2944
+ n.className = "ms-custom-styles", n.textContent = a, this.shadow.insertBefore(n, this.shadow.firstChild);
2919
2945
  }
2920
2946
  }
2921
2947
  }
@@ -3246,13 +3272,13 @@ class Ae extends Ss {
3246
3272
  // makes `form.reset()`, `form.elements`, and (in the future) constraint
3247
3273
  // validation actually do something. Without this flag the element is
3248
3274
  // invisible to the form lifecycle even when it has a `name`.
3249
- d(Ae, "formAssociated", !0);
3250
- typeof window < "u" && typeof customElements < "u" && (customElements.get("web-multiselect") || customElements.define("web-multiselect", Ae));
3275
+ d(Me, "formAssociated", !0);
3276
+ typeof window < "u" && typeof customElements < "u" && (customElements.get("web-multiselect") || customElements.define("web-multiselect", Me));
3251
3277
  typeof window < "u" && (window.components = window.components || {}, window.components["web-multiselect"] = {
3252
- version: () => "1.12.0-rc02",
3278
+ version: () => "1.12.0-rc03",
3253
3279
  config: {
3254
3280
  name: "@keenmate/web-multiselect",
3255
- version: "1.12.0-rc02",
3281
+ version: "1.12.0-rc03",
3256
3282
  author: "Keenmate",
3257
3283
  license: "MIT",
3258
3284
  repository: "git+https://github.com/keenmate/web-multiselect.git",
@@ -3266,13 +3292,13 @@ typeof window < "u" && (window.components = window.components || {}, window.comp
3266
3292
  getCategories: () => [...us]
3267
3293
  },
3268
3294
  register: () => {
3269
- typeof customElements < "u" && !customElements.get("web-multiselect") && customElements.define("web-multiselect", Ae);
3295
+ typeof customElements < "u" && !customElements.get("web-multiselect") && customElements.define("web-multiselect", Me);
3270
3296
  },
3271
3297
  getInstances: () => ct()
3272
3298
  });
3273
3299
  export {
3274
3300
  us as LOGGING_CATEGORIES,
3275
- Ae as MultiSelectElement,
3301
+ Me as MultiSelectElement,
3276
3302
  xs as WebMultiSelect,
3277
3303
  x as dataLogger,
3278
3304
  bs as disableLogging,
@@ -3281,5 +3307,5 @@ export {
3281
3307
  S as interactionLogger,
3282
3308
  vs as setCategoryLevel,
3283
3309
  fs as setLogLevel,
3284
- P as uiLogger
3310
+ A as uiLogger
3285
3311
  };