@orangelogic/design-system 2.72.0-pr84875.6 → 2.73.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,16 +1,16 @@
1
1
  import { a as _e, i as Vt, r as ze, x as j } from "../chunks/lit-element.jLBm65_O.js";
2
- import { n as v, C as Be } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
+ import { n as y, C as Be } from "../chunks/lib-cortex-element.CVMmyPMC.js";
3
3
  import { r as Ie } from "../chunks/state.CSDxrqLd.js";
4
- import { e as ut } from "../chunks/query.BBf1UFkC.js";
4
+ import { e as Ct } from "../chunks/query.BBf1UFkC.js";
5
5
  import { e as Me } from "../chunks/base.D76d76ww.js";
6
- import { o as Lt } from "../chunks/if-defined.BRoBj_Rp.js";
6
+ import { e as ht } from "../chunks/class-map.BiVq-cVR.js";
7
+ import { o as Dt } from "../chunks/if-defined.BRoBj_Rp.js";
7
8
  import { o as se } from "../chunks/style-map.llVFPd__.js";
8
9
  import { i as mt, p as ne, f as He, a as We } from "../chunks/browser.BHOCIF_A.js";
9
10
  import { c as ye } from "../chunks/component.styles.DMSLciL5.js";
10
11
  import { c as qe } from "../chunks/custom-element.L4WJXn1j.js";
11
12
  import { d as Ve } from "../chunks/debounce.DaHuiSGU.js";
12
13
  import { L as Ue } from "../chunks/i18n.BUW7B9hr.js";
13
- import { e as Dt } from "../chunks/class-map.BiVq-cVR.js";
14
14
  import { n as je } from "../chunks/when.Dr1es41R.js";
15
15
  /**
16
16
  * @license
@@ -89,7 +89,7 @@ function Qe(e, t, o) {
89
89
  (r) => !o.find((n) => r === n)
90
90
  ), s.length ? e.setAttribute(t, s.join(" ")) : e.removeAttribute(t);
91
91
  }
92
- function $t(e, t, o) {
92
+ function Nt(e, t, o) {
93
93
  const i = Array.isArray(o) ? o : [o], s = e.getAttribute(t), r = s ? s.split(/\s+/) : [];
94
94
  return i.every((a) => r.indexOf(a) > -1) ? () => {
95
95
  } : (r.push(...i), e.setAttribute(t, r.join(" ")), () => Qe(e, t, i));
@@ -230,7 +230,7 @@ const wt = new hi(), it = () => {
230
230
  function k() {
231
231
  return new Promise((e) => requestAnimationFrame(() => e()));
232
232
  }
233
- class ht extends Ge {
233
+ class dt extends Ge {
234
234
  constructor() {
235
235
  super(...arguments), this.dispose = it, this.offset = 0, this.willPreventClose = !1;
236
236
  }
@@ -308,7 +308,7 @@ class ht extends Ge {
308
308
  document.dispatchEvent(t);
309
309
  }
310
310
  static async open(t, o, i, s) {
311
- await Promise.resolve().then(() => Ne);
311
+ await Promise.resolve().then(() => Fe);
312
312
  const r = arguments.length === 2, n = i || t, a = new this();
313
313
  let l = !1;
314
314
  a.dispose = () => {
@@ -329,7 +329,7 @@ class ht extends Ge {
329
329
  });
330
330
  if (!r && n && s) {
331
331
  const u = t, p = o, f = s;
332
- return ht.applyOptions(a, {
332
+ return dt.applyOptions(a, {
333
333
  ...f,
334
334
  delayed: f.delayed || n.hasAttribute("delayed"),
335
335
  trigger: f.virtualTrigger || u,
@@ -337,7 +337,7 @@ class ht extends Ge {
337
337
  }), u.insertAdjacentElement("afterend", a), await a.updateComplete, a.open = !0, a.dispose;
338
338
  }
339
339
  const d = o;
340
- return a.append(n), ht.applyOptions(a, {
340
+ return a.append(n), dt.applyOptions(a, {
341
341
  ...d,
342
342
  delayed: d.delayed || n.hasAttribute("delayed")
343
343
  }), a.updateComplete.then(() => {
@@ -443,12 +443,12 @@ class _ extends Event {
443
443
  };
444
444
  }
445
445
  }
446
- class Ct {
446
+ class Ot {
447
447
  constructor(t, o) {
448
448
  this.x = 0, this.y = 0, this.x = t, this.y = o;
449
449
  }
450
450
  updateBoundingClientRect(t, o) {
451
- this.x = t, this.y = o, ht.update();
451
+ this.x = t, this.y = o, dt.update();
452
452
  }
453
453
  getBoundingClientRect() {
454
454
  return {
@@ -506,7 +506,7 @@ function pi(e) {
506
506
  if (!this.isConnected || i !== this.open)
507
507
  return;
508
508
  const h = async () => {
509
- const d = this.triggerElement instanceof Ct;
509
+ const d = this.triggerElement instanceof Ot;
510
510
  this.dispatchEvent(
511
511
  new _(c, this, {
512
512
  interaction: this.type,
@@ -583,7 +583,7 @@ function ui(e) {
583
583
  })
584
584
  ), l > 0)
585
585
  return;
586
- const h = this.triggerElement instanceof Ct;
586
+ const h = this.triggerElement instanceof Ot;
587
587
  this.dispatchEvent(
588
588
  new _(c, this, {
589
589
  interaction: this.type,
@@ -713,7 +713,7 @@ function gi(e) {
713
713
  if (this.open !== i)
714
714
  return;
715
715
  await k();
716
- const u = this.triggerElement instanceof Ct;
716
+ const u = this.triggerElement instanceof Ot;
717
717
  this.dispatchEvent(
718
718
  new _(c, this, {
719
719
  interaction: this.type,
@@ -1028,13 +1028,13 @@ const Ti = async (e, t, o) => {
1028
1028
  for (let g = 0; g < a.length; g++) {
1029
1029
  const {
1030
1030
  name: m,
1031
- fn: y
1031
+ fn: v
1032
1032
  } = a[g], {
1033
1033
  x,
1034
1034
  y: E,
1035
1035
  data: C,
1036
1036
  reset: P
1037
- } = await y({
1037
+ } = await v({
1038
1038
  x: h,
1039
1039
  y: d,
1040
1040
  initialPlacement: i,
@@ -1071,7 +1071,7 @@ const Ti = async (e, t, o) => {
1071
1071
  middlewareData: p
1072
1072
  };
1073
1073
  };
1074
- async function dt(e, t) {
1074
+ async function pt(e, t) {
1075
1075
  var o;
1076
1076
  t === void 0 && (t = {});
1077
1077
  const {
@@ -1087,7 +1087,7 @@ async function dt(e, t) {
1087
1087
  elementContext: d = "floating",
1088
1088
  altBoundary: u = !1,
1089
1089
  padding: p = 0
1090
- } = st(t, e), f = we(p), m = a[u ? d === "floating" ? "reference" : "floating" : d], y = Pt(await r.getClippingRect({
1090
+ } = st(t, e), f = we(p), m = a[u ? d === "floating" ? "reference" : "floating" : d], v = Pt(await r.getClippingRect({
1091
1091
  element: (o = await (r.isElement == null ? void 0 : r.isElement(m))) == null || o ? m : m.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
1092
1092
  boundary: c,
1093
1093
  rootBoundary: h,
@@ -1110,10 +1110,10 @@ async function dt(e, t) {
1110
1110
  strategy: l
1111
1111
  }) : x);
1112
1112
  return {
1113
- top: (y.top - P.top + f.top) / C.y,
1114
- bottom: (P.bottom - y.bottom + f.bottom) / C.y,
1115
- left: (y.left - P.left + f.left) / C.x,
1116
- right: (P.right - y.right + f.right) / C.x
1113
+ top: (v.top - P.top + f.top) / C.y,
1114
+ bottom: (P.bottom - v.bottom + f.bottom) / C.y,
1115
+ left: (v.left - P.left + f.left) / C.x,
1116
+ right: (P.right - v.right + f.right) / C.x
1117
1117
  };
1118
1118
  }
1119
1119
  const Li = (e) => ({
@@ -1137,17 +1137,17 @@ const Li = (e) => ({
1137
1137
  const d = we(h), u = {
1138
1138
  x: o,
1139
1139
  y: i
1140
- }, p = Zt(s), f = Jt(p), g = await n.getDimensions(c), m = p === "y", y = m ? "top" : "left", x = m ? "bottom" : "right", E = m ? "clientHeight" : "clientWidth", C = r.reference[f] + r.reference[p] - u[p] - r.floating[f], P = u[p] - r.reference[p], F = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(c));
1141
- let O = F ? F[E] : 0;
1142
- (!O || !await (n.isElement == null ? void 0 : n.isElement(F))) && (O = a.floating[E] || r.floating[f]);
1143
- const V = C / 2 - P / 2, I = O / 2 - g[f] / 2 - 1, D = J(d[y], I), X = J(d[x], I), M = D, G = O - g[f] - X, S = O / 2 - g[f] / 2 + V, et = _t(M, S, G), U = !l.arrow && at(s) != null && S !== et && r.reference[f] / 2 - (S < M ? D : X) - g[f] / 2 < 0, N = U ? S < M ? S - M : S - G : 0;
1140
+ }, p = Zt(s), f = Jt(p), g = await n.getDimensions(c), m = p === "y", v = m ? "top" : "left", x = m ? "bottom" : "right", E = m ? "clientHeight" : "clientWidth", C = r.reference[f] + r.reference[p] - u[p] - r.floating[f], P = u[p] - r.reference[p], $ = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(c));
1141
+ let A = $ ? $[E] : 0;
1142
+ (!A || !await (n.isElement == null ? void 0 : n.isElement($))) && (A = a.floating[E] || r.floating[f]);
1143
+ const V = C / 2 - P / 2, I = A / 2 - g[f] / 2 - 1, D = J(d[v], I), X = J(d[x], I), M = D, G = A - g[f] - X, R = A / 2 - g[f] / 2 + V, et = _t(M, R, G), U = !l.arrow && at(s) != null && R !== et && r.reference[f] / 2 - (R < M ? D : X) - g[f] / 2 < 0, F = U ? R < M ? R - M : R - G : 0;
1144
1144
  return {
1145
- [p]: u[p] + N,
1145
+ [p]: u[p] + F,
1146
1146
  data: {
1147
1147
  [p]: et,
1148
- centerOffset: S - et - N,
1148
+ centerOffset: R - et - F,
1149
1149
  ...U && {
1150
- alignmentOffset: N
1150
+ alignmentOffset: F
1151
1151
  }
1152
1152
  },
1153
1153
  reset: U
@@ -1177,47 +1177,47 @@ const Li = (e) => ({
1177
1177
  } = st(e, t);
1178
1178
  if ((o = r.arrow) != null && o.alignmentOffset)
1179
1179
  return {};
1180
- const y = Z(s), x = Y(a), E = Z(a) === a, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), P = u || (E || !g ? [Et(a)] : Pi(a)), F = f !== "none";
1181
- !u && F && P.push(...Si(a, g, f, C));
1182
- const O = [a, ...P], V = await dt(t, m), I = [];
1180
+ const v = Z(s), x = Y(a), E = Z(a) === a, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), P = u || (E || !g ? [Et(a)] : Pi(a)), $ = f !== "none";
1181
+ !u && $ && P.push(...Si(a, g, f, C));
1182
+ const A = [a, ...P], V = await pt(t, m), I = [];
1183
1183
  let D = ((i = r.flip) == null ? void 0 : i.overflows) || [];
1184
- if (h && I.push(V[y]), d) {
1185
- const S = Ei(s, n, C);
1186
- I.push(V[S[0]], V[S[1]]);
1184
+ if (h && I.push(V[v]), d) {
1185
+ const R = Ei(s, n, C);
1186
+ I.push(V[R[0]], V[R[1]]);
1187
1187
  }
1188
1188
  if (D = [...D, {
1189
1189
  placement: s,
1190
1190
  overflows: I
1191
- }], !I.every((S) => S <= 0)) {
1191
+ }], !I.every((R) => R <= 0)) {
1192
1192
  var X, M;
1193
- const S = (((X = r.flip) == null ? void 0 : X.index) || 0) + 1, et = O[S];
1193
+ const R = (((X = r.flip) == null ? void 0 : X.index) || 0) + 1, et = A[R];
1194
1194
  if (et && (!(d === "alignment" ? x !== Y(et) : !1) || // We leave the current main axis only if every placement on that axis
1195
1195
  // overflows the main axis.
1196
- D.every(($) => Y($.placement) === x ? $.overflows[0] > 0 : !0)))
1196
+ D.every((N) => Y(N.placement) === x ? N.overflows[0] > 0 : !0)))
1197
1197
  return {
1198
1198
  data: {
1199
- index: S,
1199
+ index: R,
1200
1200
  overflows: D
1201
1201
  },
1202
1202
  reset: {
1203
1203
  placement: et
1204
1204
  }
1205
1205
  };
1206
- let U = (M = D.filter((N) => N.overflows[0] <= 0).sort((N, $) => N.overflows[1] - $.overflows[1])[0]) == null ? void 0 : M.placement;
1206
+ let U = (M = D.filter((F) => F.overflows[0] <= 0).sort((F, N) => F.overflows[1] - N.overflows[1])[0]) == null ? void 0 : M.placement;
1207
1207
  if (!U)
1208
1208
  switch (p) {
1209
1209
  case "bestFit": {
1210
1210
  var G;
1211
- const N = (G = D.filter(($) => {
1212
- if (F) {
1213
- const Q = Y($.placement);
1211
+ const F = (G = D.filter((N) => {
1212
+ if ($) {
1213
+ const Q = Y(N.placement);
1214
1214
  return Q === x || // Create a bias to the `y` side axis due to horizontal
1215
1215
  // reading directions favoring greater width.
1216
1216
  Q === "y";
1217
1217
  }
1218
1218
  return !0;
1219
- }).map(($) => [$.placement, $.overflows.filter((Q) => Q > 0).reduce((Q, $e) => Q + $e, 0)]).sort(($, Q) => $[1] - Q[1])[0]) == null ? void 0 : G[0];
1220
- N && (U = N);
1219
+ }).map((N) => [N.placement, N.overflows.filter((Q) => Q > 0).reduce((Q, Ne) => Q + Ne, 0)]).sort((N, Q) => N[1] - Q[1])[0]) == null ? void 0 : G[0];
1220
+ F && (U = F);
1221
1221
  break;
1222
1222
  }
1223
1223
  case "initialPlacement":
@@ -1259,7 +1259,7 @@ const ki = function(e) {
1259
1259
  } = st(e, t);
1260
1260
  switch (i) {
1261
1261
  case "referenceHidden": {
1262
- const r = await dt(t, {
1262
+ const r = await pt(t, {
1263
1263
  ...s,
1264
1264
  elementContext: "reference"
1265
1265
  }), n = pe(r, o.reference);
@@ -1271,7 +1271,7 @@ const ki = function(e) {
1271
1271
  };
1272
1272
  }
1273
1273
  case "escaped": {
1274
- const r = await dt(t, {
1274
+ const r = await pt(t, {
1275
1275
  ...s,
1276
1276
  altBoundary: !0
1277
1277
  }), n = pe(r, o.floating);
@@ -1287,13 +1287,13 @@ const ki = function(e) {
1287
1287
  }
1288
1288
  }
1289
1289
  };
1290
- }, Fi = /* @__PURE__ */ new Set(["left", "top"]);
1291
- async function Ni(e, t) {
1290
+ }, $i = /* @__PURE__ */ new Set(["left", "top"]);
1291
+ async function Fi(e, t) {
1292
1292
  const {
1293
1293
  placement: o,
1294
1294
  platform: i,
1295
1295
  elements: s
1296
- } = e, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), n = Z(o), a = at(o), l = Y(o) === "y", c = Fi.has(n) ? -1 : 1, h = r && l ? -1 : 1, d = st(t, e);
1296
+ } = e, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), n = Z(o), a = at(o), l = Y(o) === "y", c = $i.has(n) ? -1 : 1, h = r && l ? -1 : 1, d = st(t, e);
1297
1297
  let {
1298
1298
  mainAxis: u,
1299
1299
  crossAxis: p,
@@ -1315,7 +1315,7 @@ async function Ni(e, t) {
1315
1315
  y: p * h
1316
1316
  };
1317
1317
  }
1318
- const $i = function(e) {
1318
+ const Ni = function(e) {
1319
1319
  return e === void 0 && (e = 0), {
1320
1320
  name: "offset",
1321
1321
  options: e,
@@ -1326,7 +1326,7 @@ const $i = function(e) {
1326
1326
  y: r,
1327
1327
  placement: n,
1328
1328
  middlewareData: a
1329
- } = t, l = await Ni(t, e);
1329
+ } = t, l = await Fi(t, e);
1330
1330
  return n === ((o = a.offset) == null ? void 0 : o.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
1331
1331
  x: s + l.x,
1332
1332
  y: r + l.y,
@@ -1352,11 +1352,11 @@ const $i = function(e) {
1352
1352
  limiter: a = {
1353
1353
  fn: (m) => {
1354
1354
  let {
1355
- x: y,
1355
+ x: v,
1356
1356
  y: x
1357
1357
  } = m;
1358
1358
  return {
1359
- x: y,
1359
+ x: v,
1360
1360
  y: x
1361
1361
  };
1362
1362
  }
@@ -1365,14 +1365,14 @@ const $i = function(e) {
1365
1365
  } = st(e, t), c = {
1366
1366
  x: o,
1367
1367
  y: i
1368
- }, h = await dt(t, l), d = Y(Z(s)), u = be(d);
1368
+ }, h = await pt(t, l), d = Y(Z(s)), u = be(d);
1369
1369
  let p = c[u], f = c[d];
1370
1370
  if (r) {
1371
- const m = u === "y" ? "top" : "left", y = u === "y" ? "bottom" : "right", x = p + h[m], E = p - h[y];
1371
+ const m = u === "y" ? "top" : "left", v = u === "y" ? "bottom" : "right", x = p + h[m], E = p - h[v];
1372
1372
  p = _t(x, p, E);
1373
1373
  }
1374
1374
  if (n) {
1375
- const m = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", x = f + h[m], E = f - h[y];
1375
+ const m = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", x = f + h[m], E = f - h[v];
1376
1376
  f = _t(x, f, E);
1377
1377
  }
1378
1378
  const g = a.fn({
@@ -1408,22 +1408,22 @@ const $i = function(e) {
1408
1408
  apply: l = () => {
1409
1409
  },
1410
1410
  ...c
1411
- } = st(e, t), h = await dt(t, c), d = Z(s), u = at(s), p = Y(s) === "y", {
1411
+ } = st(e, t), h = await pt(t, c), d = Z(s), u = at(s), p = Y(s) === "y", {
1412
1412
  width: f,
1413
1413
  height: g
1414
1414
  } = r.floating;
1415
- let m, y;
1416
- d === "top" || d === "bottom" ? (m = d, y = u === (await (n.isRTL == null ? void 0 : n.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = d, m = u === "end" ? "top" : "bottom");
1417
- const x = g - h.top - h.bottom, E = f - h.left - h.right, C = J(g - h[m], x), P = J(f - h[y], E), F = !t.middlewareData.shift;
1418
- let O = C, V = P;
1419
- if ((o = t.middlewareData.shift) != null && o.enabled.x && (V = E), (i = t.middlewareData.shift) != null && i.enabled.y && (O = x), F && !u) {
1415
+ let m, v;
1416
+ d === "top" || d === "bottom" ? (m = d, v = u === (await (n.isRTL == null ? void 0 : n.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (v = d, m = u === "end" ? "top" : "bottom");
1417
+ const x = g - h.top - h.bottom, E = f - h.left - h.right, C = J(g - h[m], x), P = J(f - h[v], E), $ = !t.middlewareData.shift;
1418
+ let A = C, V = P;
1419
+ if ((o = t.middlewareData.shift) != null && o.enabled.x && (V = E), (i = t.middlewareData.shift) != null && i.enabled.y && (A = x), $ && !u) {
1420
1420
  const D = T(h.left, 0), X = T(h.right, 0), M = T(h.top, 0), G = T(h.bottom, 0);
1421
- p ? V = f - 2 * (D !== 0 || X !== 0 ? D + X : T(h.left, h.right)) : O = g - 2 * (M !== 0 || G !== 0 ? M + G : T(h.top, h.bottom));
1421
+ p ? V = f - 2 * (D !== 0 || X !== 0 ? D + X : T(h.left, h.right)) : A = g - 2 * (M !== 0 || G !== 0 ? M + G : T(h.top, h.bottom));
1422
1422
  }
1423
1423
  await l({
1424
1424
  ...t,
1425
1425
  availableWidth: V,
1426
- availableHeight: O
1426
+ availableHeight: A
1427
1427
  });
1428
1428
  const I = await n.getDimensions(a.floating);
1429
1429
  return f !== I.width || g !== I.height ? {
@@ -1434,7 +1434,7 @@ const $i = function(e) {
1434
1434
  }
1435
1435
  };
1436
1436
  };
1437
- function Ot() {
1437
+ function At() {
1438
1438
  return typeof window < "u";
1439
1439
  }
1440
1440
  function lt(e) {
@@ -1449,16 +1449,16 @@ function q(e) {
1449
1449
  return (t = (xe(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1450
1450
  }
1451
1451
  function xe(e) {
1452
- return Ot() ? e instanceof Node || e instanceof L(e).Node : !1;
1452
+ return At() ? e instanceof Node || e instanceof L(e).Node : !1;
1453
1453
  }
1454
1454
  function z(e) {
1455
- return Ot() ? e instanceof Element || e instanceof L(e).Element : !1;
1455
+ return At() ? e instanceof Element || e instanceof L(e).Element : !1;
1456
1456
  }
1457
1457
  function W(e) {
1458
- return Ot() ? e instanceof HTMLElement || e instanceof L(e).HTMLElement : !1;
1458
+ return At() ? e instanceof HTMLElement || e instanceof L(e).HTMLElement : !1;
1459
1459
  }
1460
1460
  function fe(e) {
1461
- return !Ot() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof L(e).ShadowRoot;
1461
+ return !At() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof L(e).ShadowRoot;
1462
1462
  }
1463
1463
  const Bi = /* @__PURE__ */ new Set(["inline", "contents"]);
1464
1464
  function gt(e) {
@@ -1475,7 +1475,7 @@ function Mi(e) {
1475
1475
  return Ii.has(lt(e));
1476
1476
  }
1477
1477
  const Hi = [":popover-open", ":modal"];
1478
- function At(e) {
1478
+ function St(e) {
1479
1479
  return Hi.some((t) => {
1480
1480
  try {
1481
1481
  return e.matches(t);
@@ -1485,16 +1485,16 @@ function At(e) {
1485
1485
  });
1486
1486
  }
1487
1487
  const Wi = ["transform", "translate", "scale", "rotate", "perspective"], qi = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Vi = ["paint", "layout", "strict", "content"];
1488
- function St(e) {
1488
+ function Rt(e) {
1489
1489
  const t = te(), o = z(e) ? B(e) : e;
1490
1490
  return Wi.some((i) => o[i] ? o[i] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !t && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !t && (o.filter ? o.filter !== "none" : !1) || qi.some((i) => (o.willChange || "").includes(i)) || Vi.some((i) => (o.contain || "").includes(i));
1491
1491
  }
1492
1492
  function Ui(e) {
1493
1493
  let t = tt(e);
1494
1494
  for (; W(t) && !rt(t); ) {
1495
- if (St(t))
1495
+ if (Rt(t))
1496
1496
  return t;
1497
- if (At(t))
1497
+ if (St(t))
1498
1498
  return null;
1499
1499
  t = tt(t);
1500
1500
  }
@@ -1510,7 +1510,7 @@ function rt(e) {
1510
1510
  function B(e) {
1511
1511
  return L(e).getComputedStyle(e);
1512
1512
  }
1513
- function Rt(e) {
1513
+ function Tt(e) {
1514
1514
  return z(e) ? {
1515
1515
  scrollLeft: e.scrollLeft,
1516
1516
  scrollTop: e.scrollTop
@@ -1535,15 +1535,15 @@ function Ee(e) {
1535
1535
  const t = tt(e);
1536
1536
  return rt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : W(t) && gt(t) ? t : Ee(t);
1537
1537
  }
1538
- function pt(e, t, o) {
1538
+ function ut(e, t, o) {
1539
1539
  var i;
1540
1540
  t === void 0 && (t = []), o === void 0 && (o = !0);
1541
1541
  const s = Ee(e), r = s === ((i = e.ownerDocument) == null ? void 0 : i.body), n = L(s);
1542
1542
  if (r) {
1543
1543
  const a = Bt(n);
1544
- return t.concat(n, n.visualViewport || [], gt(s) ? s : [], a && o ? pt(a) : []);
1544
+ return t.concat(n, n.visualViewport || [], gt(s) ? s : [], a && o ? ut(a) : []);
1545
1545
  }
1546
- return t.concat(s, pt(s, [], o));
1546
+ return t.concat(s, ut(s, [], o));
1547
1547
  }
1548
1548
  function Bt(e) {
1549
1549
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
@@ -1598,7 +1598,7 @@ function ot(e, t, o, i) {
1598
1598
  const u = L(r), p = i && z(i) ? L(i) : i;
1599
1599
  let f = u, g = Bt(f);
1600
1600
  for (; g && i && p !== f; ) {
1601
- const m = nt(g), y = g.getBoundingClientRect(), x = B(g), E = y.left + (g.clientLeft + parseFloat(x.paddingLeft)) * m.x, C = y.top + (g.clientTop + parseFloat(x.paddingTop)) * m.y;
1601
+ const m = nt(g), v = g.getBoundingClientRect(), x = B(g), E = v.left + (g.clientLeft + parseFloat(x.paddingLeft)) * m.x, C = v.top + (g.clientTop + parseFloat(x.paddingTop)) * m.y;
1602
1602
  l *= m.x, c *= m.y, h *= m.x, d *= m.y, l += E, c += C, f = L(g), g = Bt(f);
1603
1603
  }
1604
1604
  }
@@ -1610,7 +1610,7 @@ function ot(e, t, o, i) {
1610
1610
  });
1611
1611
  }
1612
1612
  function ie(e, t) {
1613
- const o = Rt(e).scrollLeft;
1613
+ const o = Tt(e).scrollLeft;
1614
1614
  return t ? t.left + o : ot(q(e)).left + o;
1615
1615
  }
1616
1616
  function Oe(e, t, o) {
@@ -1631,7 +1631,7 @@ function Xi(e) {
1631
1631
  offsetParent: i,
1632
1632
  strategy: s
1633
1633
  } = e;
1634
- const r = s === "fixed", n = q(i), a = t ? At(t.floating) : !1;
1634
+ const r = s === "fixed", n = q(i), a = t ? St(t.floating) : !1;
1635
1635
  if (i === n || a && r)
1636
1636
  return o;
1637
1637
  let l = {
@@ -1639,7 +1639,7 @@ function Xi(e) {
1639
1639
  scrollTop: 0
1640
1640
  }, c = H(1);
1641
1641
  const h = H(0), d = W(i);
1642
- if ((d || !d && !r) && ((lt(i) !== "body" || gt(n)) && (l = Rt(i)), W(i))) {
1642
+ if ((d || !d && !r) && ((lt(i) !== "body" || gt(n)) && (l = Tt(i)), W(i))) {
1643
1643
  const p = ot(i);
1644
1644
  c = nt(i), h.x = p.x + i.clientLeft, h.y = p.y + i.clientTop;
1645
1645
  }
@@ -1655,7 +1655,7 @@ function Gi(e) {
1655
1655
  return Array.from(e.getClientRects());
1656
1656
  }
1657
1657
  function Qi(e) {
1658
- const t = q(e), o = Rt(e), i = e.ownerDocument.body, s = T(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = T(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
1658
+ const t = q(e), o = Tt(e), i = e.ownerDocument.body, s = T(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = T(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
1659
1659
  let n = -o.scrollLeft + ie(e);
1660
1660
  const a = -o.scrollTop;
1661
1661
  return B(i).direction === "rtl" && (n += T(t.clientWidth, i.clientWidth) - s), {
@@ -1717,11 +1717,11 @@ function eo(e, t) {
1717
1717
  const o = t.get(e);
1718
1718
  if (o)
1719
1719
  return o;
1720
- let i = pt(e, [], !1).filter((a) => z(a) && lt(a) !== "body"), s = null;
1720
+ let i = ut(e, [], !1).filter((a) => z(a) && lt(a) !== "body"), s = null;
1721
1721
  const r = B(e).position === "fixed";
1722
1722
  let n = r ? tt(e) : e;
1723
1723
  for (; z(n) && !rt(n); ) {
1724
- const a = B(n), l = St(n);
1724
+ const a = B(n), l = Rt(n);
1725
1725
  !l && a.position === "fixed" && (s = null), (r ? !l && !s : !l && a.position === "static" && !!s && Zi.has(s.position) || gt(n) && !l && Ae(e, n)) ? i = i.filter((h) => h !== n) : s = a, n = tt(n);
1726
1726
  }
1727
1727
  return t.set(e, i), i;
@@ -1733,7 +1733,7 @@ function io(e) {
1733
1733
  rootBoundary: i,
1734
1734
  strategy: s
1735
1735
  } = e;
1736
- const n = [...o === "clippingAncestors" ? At(t) ? [] : eo(t, this._c) : [].concat(o), i], a = n[0], l = n.reduce((c, h) => {
1736
+ const n = [...o === "clippingAncestors" ? St(t) ? [] : eo(t, this._c) : [].concat(o), i], a = n[0], l = n.reduce((c, h) => {
1737
1737
  const d = ge(t, h, s);
1738
1738
  return c.top = T(d.top, c.top), c.right = J(d.right, c.right), c.bottom = J(d.bottom, c.bottom), c.left = T(d.left, c.left), c;
1739
1739
  }, ge(t, a, s));
@@ -1765,7 +1765,7 @@ function so(e, t, o) {
1765
1765
  l.x = ie(s);
1766
1766
  }
1767
1767
  if (i || !i && !r)
1768
- if ((lt(t) !== "body" || gt(s)) && (a = Rt(t)), i) {
1768
+ if ((lt(t) !== "body" || gt(s)) && (a = Tt(t)), i) {
1769
1769
  const p = ot(t, !0, r, t);
1770
1770
  l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop;
1771
1771
  } else s && c();
@@ -1778,7 +1778,7 @@ function so(e, t, o) {
1778
1778
  height: n.height
1779
1779
  };
1780
1780
  }
1781
- function Ft(e) {
1781
+ function $t(e) {
1782
1782
  return B(e).position === "static";
1783
1783
  }
1784
1784
  function me(e, t) {
@@ -1791,21 +1791,21 @@ function me(e, t) {
1791
1791
  }
1792
1792
  function Se(e, t) {
1793
1793
  const o = L(e);
1794
- if (At(e))
1794
+ if (St(e))
1795
1795
  return o;
1796
1796
  if (!W(e)) {
1797
1797
  let s = tt(e);
1798
1798
  for (; s && !rt(s); ) {
1799
- if (z(s) && !Ft(s))
1799
+ if (z(s) && !$t(s))
1800
1800
  return s;
1801
1801
  s = tt(s);
1802
1802
  }
1803
1803
  return o;
1804
1804
  }
1805
1805
  let i = me(e, t);
1806
- for (; i && Mi(i) && Ft(i); )
1806
+ for (; i && Mi(i) && $t(i); )
1807
1807
  i = me(i, t);
1808
- return i && rt(i) && Ft(i) && !St(i) ? o : i || Ui(e) || o;
1808
+ return i && rt(i) && $t(i) && !Rt(i) ? o : i || Ui(e) || o;
1809
1809
  }
1810
1810
  const no = async function(e) {
1811
1811
  const t = this.getOffsetParent || Se, o = this.getDimensions, i = await o(e.floating);
@@ -1854,21 +1854,21 @@ function ao(e, t) {
1854
1854
  } = c;
1855
1855
  if (a || t(), !u || !p)
1856
1856
  return;
1857
- const f = yt(d), g = yt(s.clientWidth - (h + u)), m = yt(s.clientHeight - (d + p)), y = yt(h), E = {
1858
- rootMargin: -f + "px " + -g + "px " + -m + "px " + -y + "px",
1857
+ const f = yt(d), g = yt(s.clientWidth - (h + u)), m = yt(s.clientHeight - (d + p)), v = yt(h), E = {
1858
+ rootMargin: -f + "px " + -g + "px " + -m + "px " + -v + "px",
1859
1859
  threshold: T(0, J(1, l)) || 1
1860
1860
  };
1861
1861
  let C = !0;
1862
- function P(F) {
1863
- const O = F[0].intersectionRatio;
1864
- if (O !== l) {
1862
+ function P($) {
1863
+ const A = $[0].intersectionRatio;
1864
+ if (A !== l) {
1865
1865
  if (!C)
1866
1866
  return n();
1867
- O ? n(!1, O) : i = setTimeout(() => {
1867
+ A ? n(!1, A) : i = setTimeout(() => {
1868
1868
  n(!1, 1e-7);
1869
1869
  }, 1e3);
1870
1870
  }
1871
- O === 1 && !Re(c, e.getBoundingClientRect()) && n(), C = !1;
1871
+ A === 1 && !Re(c, e.getBoundingClientRect()) && n(), C = !1;
1872
1872
  }
1873
1873
  try {
1874
1874
  o = new IntersectionObserver(P, {
@@ -1891,16 +1891,16 @@ function Mt(e, t, o, i) {
1891
1891
  elementResize: n = typeof ResizeObserver == "function",
1892
1892
  layoutShift: a = typeof IntersectionObserver == "function",
1893
1893
  animationFrame: l = !1
1894
- } = i, c = ee(e), h = s || r ? [...c ? pt(c) : [], ...pt(t)] : [];
1895
- h.forEach((y) => {
1896
- s && y.addEventListener("scroll", o, {
1894
+ } = i, c = ee(e), h = s || r ? [...c ? ut(c) : [], ...ut(t)] : [];
1895
+ h.forEach((v) => {
1896
+ s && v.addEventListener("scroll", o, {
1897
1897
  passive: !0
1898
- }), r && y.addEventListener("resize", o);
1898
+ }), r && v.addEventListener("resize", o);
1899
1899
  });
1900
1900
  const d = c && a ? ao(c, o) : null;
1901
1901
  let u = -1, p = null;
1902
- n && (p = new ResizeObserver((y) => {
1903
- let [x] = y;
1902
+ n && (p = new ResizeObserver((v) => {
1903
+ let [x] = v;
1904
1904
  x && x.target === c && p && (p.unobserve(t), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
1905
1905
  var E;
1906
1906
  (E = p) == null || E.observe(t);
@@ -1909,17 +1909,17 @@ function Mt(e, t, o, i) {
1909
1909
  let f, g = l ? ot(e) : null;
1910
1910
  l && m();
1911
1911
  function m() {
1912
- const y = ot(e);
1913
- g && !Re(g, y) && o(), g = y, f = requestAnimationFrame(m);
1912
+ const v = ot(e);
1913
+ g && !Re(g, v) && o(), g = v, f = requestAnimationFrame(m);
1914
1914
  }
1915
1915
  return o(), () => {
1916
- var y;
1916
+ var v;
1917
1917
  h.forEach((x) => {
1918
1918
  s && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
1919
- }), d?.(), (y = p) == null || y.disconnect(), p = null, l && cancelAnimationFrame(f);
1919
+ }), d?.(), (v = p) == null || v.disconnect(), p = null, l && cancelAnimationFrame(f);
1920
1920
  };
1921
1921
  }
1922
- const Ht = $i, Te = _i, Wt = Di, qt = zi, lo = ki, Le = Li, De = (e, t, o) => {
1922
+ const Ht = Ni, Te = _i, Wt = Di, qt = zi, lo = ki, Le = Li, De = (e, t, o) => {
1923
1923
  const i = /* @__PURE__ */ new Map(), s = {
1924
1924
  platform: It,
1925
1925
  ...o
@@ -2017,9 +2017,9 @@ class po {
2017
2017
  Math.floor(u)
2018
2018
  ), m = f.height;
2019
2019
  this.initialHeight = this.isConstrained && this.initialHeight || m, this.isConstrained = m < this.initialHeight || g <= m;
2020
- const y = this.isConstrained ? `${g}px` : "";
2020
+ const v = this.isConstrained ? `${g}px` : "";
2021
2021
  Object.assign(o.style, {
2022
- maxHeight: y,
2022
+ maxHeight: v,
2023
2023
  maxWidth: `${Math.floor(p)}px`
2024
2024
  });
2025
2025
  },
@@ -2074,7 +2074,7 @@ class po {
2074
2074
  );
2075
2075
  }
2076
2076
  }
2077
- var Tt = /* @__PURE__ */ ((e) => (e.Click = "click", e.Hover = "hover", e.LongPress = "longpress", e))(Tt || {});
2077
+ var Lt = /* @__PURE__ */ ((e) => (e.Click = "click", e.Hover = "hover", e.LongPress = "longpress", e))(Lt || {});
2078
2078
  class oe {
2079
2079
  constructor(t, { handleOverlayReady: o, isPersistent: i, overlay: s }) {
2080
2080
  this.target = t, this.isLazilyOpen = !1, this.isPersistent = !1, this.isPersistent = !!i, this.handleOverlayReady = o, this.isPersistent && this.init(), this.overlay = s;
@@ -2097,7 +2097,7 @@ class oe {
2097
2097
  t && (customElements.whenDefined("cx-overlay").then(async () => {
2098
2098
  const { Overlay: o } = await Promise.resolve().then(() => Oo);
2099
2099
  this.overlay = new o(), this.overlay.open = !0;
2100
- }), Promise.resolve().then(() => Ne));
2100
+ }), Promise.resolve().then(() => Fe));
2101
2101
  }
2102
2102
  }
2103
2103
  get overlay() {
@@ -2136,7 +2136,7 @@ const uo = 300, ke = {
2136
2136
  };
2137
2137
  class fo extends oe {
2138
2138
  constructor() {
2139
- super(...arguments), this.type = Tt.LongPress, this.longpressState = null, this.releaseDescription = it, this.handlePointerup = () => {
2139
+ super(...arguments), this.type = Lt.LongPress, this.longpressState = null, this.releaseDescription = it, this.handlePointerup = () => {
2140
2140
  clearTimeout(this.timeout), this.target && (this.longpressState = this.overlay?.state === "opening" ? "pressed" : null, document.removeEventListener("pointerup", this.handlePointerup), document.removeEventListener("pointercancel", this.handlePointerup));
2141
2141
  };
2142
2142
  }
@@ -2194,7 +2194,7 @@ class fo extends oe {
2194
2194
  o.textContent = ke[i], o.slot = "longpress-describedby-descriptor";
2195
2195
  const s = t.getRootNode(), r = this.overlay.getRootNode();
2196
2196
  s === r ? this.overlay.append(o) : (o.hidden = !("host" in s), t.insertAdjacentElement("afterend", o));
2197
- const n = $t(
2197
+ const n = Nt(
2198
2198
  t,
2199
2199
  "aria-describedby",
2200
2200
  [o.id]
@@ -2305,6 +2305,24 @@ governing permissions and limitations under the License.
2305
2305
  visibility: visible !important;
2306
2306
  }
2307
2307
 
2308
+ .dialog.defer-slotted-visibility > slot::slotted(*) {
2309
+ /**
2310
+ * filter:opacity(0) paints the whole subtree as one group — descendants cannot opt out
2311
+ * with visibility:visible (unlike visibility:hidden on an ancestor).
2312
+ */
2313
+ filter: opacity(0);
2314
+ pointer-events: none;
2315
+ visibility: hidden !important;
2316
+ translate: -200vw -200vh;
2317
+ }
2318
+
2319
+ .dialog.defer-slotted-visibility.defer-slotted-opened > slot::slotted(*) {
2320
+ filter: none;
2321
+ pointer-events: auto;
2322
+ visibility: visible !important;
2323
+ translate: none;
2324
+ }
2325
+
2308
2326
  /**
2309
2327
  * Offset the transition displacement from the trigger edge by
2310
2328
  * padding the equivelent distance off of the opposite edge.
@@ -2416,7 +2434,7 @@ class mo extends Event {
2416
2434
  const yo = Symbol("remove-slottable-request");
2417
2435
  class vo extends oe {
2418
2436
  constructor() {
2419
- super(...arguments), this.type = Tt.Click, this.preventNextToggle = !1;
2437
+ super(...arguments), this.type = Lt.Click, this.preventNextToggle = !1;
2420
2438
  }
2421
2439
  handleClick() {
2422
2440
  this.preventNextToggle || (this.open = !this.open), this.preventNextToggle = !1;
@@ -2439,7 +2457,7 @@ class vo extends oe {
2439
2457
  const bo = 300;
2440
2458
  class wo extends oe {
2441
2459
  constructor() {
2442
- super(...arguments), this.type = Tt.Hover, this.elementIds = [], this.focusedin = !1, this.pointerentered = !1;
2460
+ super(...arguments), this.type = Lt.Hover, this.elementIds = [], this.focusedin = !1, this.pointerentered = !1;
2443
2461
  }
2444
2462
  handleTargetFocusin() {
2445
2463
  this.target.matches(":focus-visible") && (this.open = !0, this.focusedin = !0);
@@ -2468,7 +2486,7 @@ class wo extends oe {
2468
2486
  t === i ? this.prepareOverlayRelativeDescription() : t === o && this.prepareContentRelativeDescription();
2469
2487
  }
2470
2488
  prepareOverlayRelativeDescription() {
2471
- const t = $t(
2489
+ const t = Nt(
2472
2490
  this.target,
2473
2491
  "aria-describedby",
2474
2492
  [this.overlay.id]
@@ -2480,7 +2498,7 @@ class wo extends oe {
2480
2498
  prepareContentRelativeDescription() {
2481
2499
  const t = [], o = this.overlay.elements.map((s) => (t.push(s.id), s.id || (s.id = `${this.overlay.tagName.toLowerCase()}-helper-${Ut()}`), s.id));
2482
2500
  this.elementIds = t;
2483
- const i = $t(
2501
+ const i = Nt(
2484
2502
  this.target,
2485
2503
  "aria-describedby",
2486
2504
  o
@@ -2537,18 +2555,18 @@ const xo = {
2537
2555
  hover: wo,
2538
2556
  longpress: fo
2539
2557
  };
2540
- var Eo = Object.defineProperty, Po = Object.getOwnPropertyDescriptor, R = (e, t, o, i) => {
2558
+ var Eo = Object.defineProperty, Po = Object.getOwnPropertyDescriptor, S = (e, t, o, i) => {
2541
2559
  for (var s = i > 1 ? void 0 : i ? Po(t, o) : t, r = e.length - 1, n; r >= 0; r--)
2542
2560
  (n = e[r]) && (s = (i ? n(t, o, s) : n(s)) || s);
2543
2561
  return i && s && Eo(t, o, s), s;
2544
2562
  };
2545
2563
  const Co = "showPopover" in document.createElement("div");
2546
- let ct = pi(ht);
2564
+ let ct = pi(dt);
2547
2565
  Co ? ct = gi(ct) : ct = ui(ct);
2548
2566
  var K;
2549
- const A = (K = class extends ct {
2567
+ const O = (K = class extends ct {
2550
2568
  constructor() {
2551
- super(), this._delayed = !1, this._disabled = !1, this.offset = 0, this._open = !1, this.lastRequestSlottableState = !1, this.receivesFocus = "auto", this._state = "closed", this.triggerElement = null, this.type = "auto", this.wasOpen = !1, this.closeOnFocusOut = (t) => {
2569
+ super(), this._delayed = !1, this.deferSlottedVisibility = !1, this._disabled = !1, this.offset = 0, this._open = !1, this.lastRequestSlottableState = !1, this.receivesFocus = "auto", this._state = "closed", this.triggerElement = null, this.type = "auto", this.wasOpen = !1, this.closeOnFocusOut = (t) => {
2552
2570
  if (!t.relatedTarget)
2553
2571
  return;
2554
2572
  const o = new Event("overlay-relation-query", {
@@ -2573,7 +2591,7 @@ const A = (K = class extends ct {
2573
2591
  this._disabled = t, t ? (this.strategy?.abort(), this.wasOpen = this.open, this.open = !1) : (this.bindEvents(), this.open = this.open || this.wasOpen, this.wasOpen = !1);
2574
2592
  }
2575
2593
  get hasNonVirtualTrigger() {
2576
- return !!this.triggerElement && !(this.triggerElement instanceof Ct);
2594
+ return !!this.triggerElement && !(this.triggerElement instanceof Ot);
2577
2595
  }
2578
2596
  get placementController() {
2579
2597
  return this._placementController || (this._placementController = new po(this)), this._placementController;
@@ -2730,15 +2748,23 @@ const A = (K = class extends ct {
2730
2748
  "--swc-overlay-open-count": K.openCount.toString()
2731
2749
  };
2732
2750
  }
2751
+ /** Reveal deferred slotted content only after the overlay reaches the opened state. */
2752
+ get deferSlottedOpened() {
2753
+ return this.deferSlottedVisibility && this.state === "opened";
2754
+ }
2733
2755
  handleClose() {
2734
2756
  this.open = !1;
2735
2757
  }
2736
2758
  renderDialog() {
2737
2759
  return j`
2738
2760
  <dialog
2739
- class="dialog"
2761
+ class=${ht({
2762
+ "defer-slotted-opened": this.deferSlottedOpened,
2763
+ "defer-slotted-visibility": this.deferSlottedVisibility,
2764
+ dialog: !0
2765
+ })}
2740
2766
  part="dialog"
2741
- placement=${Lt(
2767
+ placement=${Dt(
2742
2768
  this.requiresPosition ? this.placement || "right" : void 0
2743
2769
  )}
2744
2770
  style=${se(this.dialogStyleMap)}
@@ -2754,12 +2780,16 @@ const A = (K = class extends ct {
2754
2780
  renderPopover() {
2755
2781
  return j`
2756
2782
  <div
2757
- class="dialog"
2783
+ class=${ht({
2784
+ "defer-slotted-opened": this.deferSlottedOpened,
2785
+ "defer-slotted-visibility": this.deferSlottedVisibility,
2786
+ dialog: !0
2787
+ })}
2758
2788
  part="dialog"
2759
- placement=${Lt(
2789
+ placement=${Dt(
2760
2790
  this.requiresPosition ? this.placement || "right" : void 0
2761
2791
  )}
2762
- popover=${Lt(this.popoverValue)}
2792
+ popover=${Dt(this.popoverValue)}
2763
2793
  style=${se(this.dialogStyleMap)}
2764
2794
  @beforetoggle=${this.handleBeforetoggle}
2765
2795
  @close=${this.handleBrowserClose}
@@ -2788,77 +2818,80 @@ const A = (K = class extends ct {
2788
2818
  ${ze(go)}
2789
2819
  `
2790
2820
  ], K.openCount = 1, K);
2791
- R([
2792
- v({ type: Boolean })
2793
- ], A.prototype, "delayed", 1);
2794
- R([
2795
- ut(".dialog")
2796
- ], A.prototype, "dialogEl", 2);
2797
- R([
2798
- v({ type: Boolean })
2799
- ], A.prototype, "disabled", 1);
2800
- R([
2821
+ S([
2822
+ y({ type: Boolean })
2823
+ ], O.prototype, "delayed", 1);
2824
+ S([
2825
+ y({ attribute: "defer-slotted-visibility", type: Boolean })
2826
+ ], O.prototype, "deferSlottedVisibility", 2);
2827
+ S([
2828
+ Ct(".dialog")
2829
+ ], O.prototype, "dialogEl", 2);
2830
+ S([
2831
+ y({ type: Boolean })
2832
+ ], O.prototype, "disabled", 1);
2833
+ S([
2801
2834
  Ye({
2802
2835
  flatten: !0,
2803
2836
  selector: ':not([slot="longpress-describedby-descriptor"], slot)'
2804
2837
  // gather only elements slotted into the default slot
2805
2838
  })
2806
- ], A.prototype, "elements", 2);
2807
- R([
2808
- v({ type: Number })
2809
- ], A.prototype, "offset", 2);
2810
- R([
2811
- v({ reflect: !0, type: Boolean })
2812
- ], A.prototype, "open", 1);
2813
- R([
2814
- v()
2815
- ], A.prototype, "placement", 2);
2816
- R([
2817
- v({ attribute: "receives-focus" })
2818
- ], A.prototype, "receivesFocus", 2);
2819
- R([
2820
- ut("slot")
2821
- ], A.prototype, "slotEl", 2);
2822
- R([
2839
+ ], O.prototype, "elements", 2);
2840
+ S([
2841
+ y({ type: Number })
2842
+ ], O.prototype, "offset", 2);
2843
+ S([
2844
+ y({ reflect: !0, type: Boolean })
2845
+ ], O.prototype, "open", 1);
2846
+ S([
2847
+ y()
2848
+ ], O.prototype, "placement", 2);
2849
+ S([
2850
+ y({ attribute: "receives-focus" })
2851
+ ], O.prototype, "receivesFocus", 2);
2852
+ S([
2853
+ Ct("slot")
2854
+ ], O.prototype, "slotEl", 2);
2855
+ S([
2823
2856
  Ie()
2824
- ], A.prototype, "state", 1);
2825
- R([
2826
- v({ attribute: "tip-padding", type: Number })
2827
- ], A.prototype, "tipPadding", 2);
2828
- R([
2829
- v()
2830
- ], A.prototype, "trigger", 2);
2831
- R([
2832
- v({ attribute: "trigger-element" })
2833
- ], A.prototype, "triggerElement", 2);
2834
- R([
2835
- v({ attribute: "trigger-interaction" })
2836
- ], A.prototype, "triggerInteraction", 2);
2837
- R([
2838
- v()
2839
- ], A.prototype, "type", 2);
2840
- let Fe = A;
2857
+ ], O.prototype, "state", 1);
2858
+ S([
2859
+ y({ attribute: "tip-padding", type: Number })
2860
+ ], O.prototype, "tipPadding", 2);
2861
+ S([
2862
+ y()
2863
+ ], O.prototype, "trigger", 2);
2864
+ S([
2865
+ y({ attribute: "trigger-element" })
2866
+ ], O.prototype, "triggerElement", 2);
2867
+ S([
2868
+ y({ attribute: "trigger-interaction" })
2869
+ ], O.prototype, "triggerInteraction", 2);
2870
+ S([
2871
+ y()
2872
+ ], O.prototype, "type", 2);
2873
+ let $e = O;
2841
2874
  const Oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2842
2875
  __proto__: null,
2843
2876
  LONGPRESS_INSTRUCTIONS: ke,
2844
- Overlay: Fe
2877
+ Overlay: $e
2845
2878
  }, Symbol.toStringTag, { value: "Module" }));
2846
- Je("cx-overlay", Fe);
2847
- const Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2879
+ Je("cx-overlay", $e);
2880
+ const Fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2848
2881
  __proto__: null
2849
2882
  }, Symbol.toStringTag, { value: "Module" }));
2850
2883
  function Ao(e) {
2851
2884
  return So(e);
2852
2885
  }
2853
- function Nt(e) {
2886
+ function Ft(e) {
2854
2887
  return e.assignedSlot ? e.assignedSlot : e.parentNode instanceof ShadowRoot ? e.parentNode.host : e.parentNode;
2855
2888
  }
2856
2889
  function So(e) {
2857
- for (let t = e; t; t = Nt(t)) if (t instanceof Element && getComputedStyle(t).display === "none") return null;
2858
- for (let t = Nt(e); t; t = Nt(t)) {
2890
+ for (let t = e; t; t = Ft(t)) if (t instanceof Element && getComputedStyle(t).display === "none") return null;
2891
+ for (let t = Ft(e); t; t = Ft(t)) {
2859
2892
  if (!(t instanceof Element)) continue;
2860
2893
  const o = getComputedStyle(t);
2861
- if (o.display !== "contents" && (o.position !== "static" || St(o) || t.tagName === "BODY"))
2894
+ if (o.display !== "contents" && (o.position !== "static" || Rt(o) || t.tagName === "BODY"))
2862
2895
  return t;
2863
2896
  }
2864
2897
  return null;
@@ -2989,7 +3022,12 @@ let b = class extends Be {
2989
3022
  }
2990
3023
  }
2991
3024
  async updated(e) {
2992
- super.updated(e), e.has("active") && (this.active ? (this.start(), this.emit("cx-opened")) : this.stop()), e.has("anchor") && this.handleAnchorChange(), this.active && (await this.updateComplete, this.reposition());
3025
+ super.updated(e), e.has("active") && (this.active ? (this.start(), this.strategy !== "overlay" && this.emit("cx-opened")) : this.stop()), e.has("anchor") && this.handleAnchorChange(), this.active && (await this.updateComplete, this.reposition());
3026
+ }
3027
+ async handleOverlayOpened() {
3028
+ await this.updateComplete, await new Promise((e) => {
3029
+ requestAnimationFrame(() => e());
3030
+ }), this.active && this.emit("cx-opened");
2993
3031
  }
2994
3032
  async handleAnchorChange() {
2995
3033
  if (await this.stop(), this.anchor && typeof this.anchor == "string") {
@@ -3134,12 +3172,14 @@ let b = class extends Be {
3134
3172
  render() {
3135
3173
  const e = j`<cx-overlay
3136
3174
  ?open=${this.active}
3175
+ defer-slotted-visibility
3137
3176
  placement="bottom"
3138
3177
  type="manual"
3178
+ @cx-opened=${this.handleOverlayOpened}
3139
3179
  >
3140
3180
  <div
3141
3181
  part="popup"
3142
- class=${Dt({
3182
+ class=${ht({
3143
3183
  popup: !0,
3144
3184
  "popup--active": this.active,
3145
3185
  "popup--has-arrow": this.arrow,
@@ -3160,7 +3200,7 @@ let b = class extends Be {
3160
3200
 
3161
3201
  <span
3162
3202
  part="hover-bridge"
3163
- class=${Dt({
3203
+ class=${ht({
3164
3204
  "popup-hover-bridge": !0,
3165
3205
  "popup-hover-bridge--visible": this.hoverBridge && this.active
3166
3206
  })}
@@ -3171,7 +3211,7 @@ let b = class extends Be {
3171
3211
  () => e,
3172
3212
  () => j`<div
3173
3213
  part="popup"
3174
- class=${Dt({
3214
+ class=${ht({
3175
3215
  popup: !0,
3176
3216
  "popup--active": this.active,
3177
3217
  "popup--fixed": this.strategy === "fixed",
@@ -3192,55 +3232,52 @@ let b = class extends Be {
3192
3232
  };
3193
3233
  b.styles = [ye, Ro];
3194
3234
  w([
3195
- ut(".popup")
3235
+ Ct(".popup")
3196
3236
  ], b.prototype, "popup", 2);
3197
3237
  w([
3198
- ut(".popup__arrow")
3238
+ Ct(".popup__arrow")
3199
3239
  ], b.prototype, "arrowEl", 2);
3200
3240
  w([
3201
- ut("cx-overlay")
3202
- ], b.prototype, "overlay", 2);
3203
- w([
3204
- v()
3241
+ y()
3205
3242
  ], b.prototype, "anchor", 2);
3206
3243
  w([
3207
- v({ reflect: !0, type: Boolean })
3244
+ y({ reflect: !0, type: Boolean })
3208
3245
  ], b.prototype, "active", 2);
3209
3246
  w([
3210
- v({ reflect: !0 })
3247
+ y({ reflect: !0 })
3211
3248
  ], b.prototype, "placement", 2);
3212
3249
  w([
3213
- v({ reflect: !0 })
3250
+ y({ reflect: !0 })
3214
3251
  ], b.prototype, "strategy", 2);
3215
3252
  w([
3216
- v({ type: Number })
3253
+ y({ type: Number })
3217
3254
  ], b.prototype, "distance", 2);
3218
3255
  w([
3219
- v({ type: Number })
3256
+ y({ type: Number })
3220
3257
  ], b.prototype, "skidding", 2);
3221
3258
  w([
3222
- v({ type: Boolean })
3259
+ y({ type: Boolean })
3223
3260
  ], b.prototype, "arrow", 2);
3224
3261
  w([
3225
- v({ attribute: "arrow-placement" })
3262
+ y({ attribute: "arrow-placement" })
3226
3263
  ], b.prototype, "arrowPlacement", 2);
3227
3264
  w([
3228
- v({ attribute: "arrow-padding", type: Number })
3265
+ y({ attribute: "arrow-padding", type: Number })
3229
3266
  ], b.prototype, "arrowPadding", 2);
3230
3267
  w([
3231
- v({ type: Boolean })
3268
+ y({ type: Boolean })
3232
3269
  ], b.prototype, "flip", 2);
3233
3270
  w([
3234
- v({ type: Boolean })
3271
+ y({ type: Boolean })
3235
3272
  ], b.prototype, "hide", 2);
3236
3273
  w([
3237
- v({ attribute: "hide-boundary", type: Object })
3274
+ y({ attribute: "hide-boundary", type: Object })
3238
3275
  ], b.prototype, "hideBoundary", 2);
3239
3276
  w([
3240
- v({ attribute: "hide-boundary-strategy" })
3277
+ y({ attribute: "hide-boundary-strategy" })
3241
3278
  ], b.prototype, "hideBoundaryStrategy", 2);
3242
3279
  w([
3243
- v({
3280
+ y({
3244
3281
  attribute: "flip-fallback-placements",
3245
3282
  converter: {
3246
3283
  fromAttribute: (e) => e.split(" ").map((t) => t.trim()).filter((t) => t !== ""),
@@ -3249,43 +3286,43 @@ w([
3249
3286
  })
3250
3287
  ], b.prototype, "flipFallbackPlacements", 2);
3251
3288
  w([
3252
- v({ attribute: "flip-fallback-strategy" })
3289
+ y({ attribute: "flip-fallback-strategy" })
3253
3290
  ], b.prototype, "flipFallbackStrategy", 2);
3254
3291
  w([
3255
- v({ attribute: "flip-boundary", type: Object })
3292
+ y({ attribute: "flip-boundary", type: Object })
3256
3293
  ], b.prototype, "flipBoundary", 2);
3257
3294
  w([
3258
- v({ attribute: "flip-padding", type: Number })
3295
+ y({ attribute: "flip-padding", type: Number })
3259
3296
  ], b.prototype, "flipPadding", 2);
3260
3297
  w([
3261
- v({ type: Boolean })
3298
+ y({ type: Boolean })
3262
3299
  ], b.prototype, "shift", 2);
3263
3300
  w([
3264
- v({ attribute: "shift-boundary", type: Object })
3301
+ y({ attribute: "shift-boundary", type: Object })
3265
3302
  ], b.prototype, "shiftBoundary", 2);
3266
3303
  w([
3267
- v({ attribute: "shift-padding", type: Number })
3304
+ y({ attribute: "shift-padding", type: Number })
3268
3305
  ], b.prototype, "shiftPadding", 2);
3269
3306
  w([
3270
- v({ attribute: "auto-size" })
3307
+ y({ attribute: "auto-size" })
3271
3308
  ], b.prototype, "autoSize", 2);
3272
3309
  w([
3273
- v()
3310
+ y()
3274
3311
  ], b.prototype, "sync", 2);
3275
3312
  w([
3276
- v({ attribute: "sync-element" })
3313
+ y({ attribute: "sync-element" })
3277
3314
  ], b.prototype, "syncElement", 2);
3278
3315
  w([
3279
- v({ attribute: "auto-size-boundary", type: Object })
3316
+ y({ attribute: "auto-size-boundary", type: Object })
3280
3317
  ], b.prototype, "autoSizeBoundary", 2);
3281
3318
  w([
3282
- v({ attribute: "auto-size-padding", type: Number })
3319
+ y({ attribute: "auto-size-padding", type: Number })
3283
3320
  ], b.prototype, "autoSizePadding", 2);
3284
3321
  w([
3285
- v({ attribute: "hover-bridge", type: Boolean })
3322
+ y({ attribute: "hover-bridge", type: Boolean })
3286
3323
  ], b.prototype, "hoverBridge", 2);
3287
3324
  w([
3288
- v({ attribute: "auto-width-factor" })
3325
+ y({ attribute: "auto-width-factor" })
3289
3326
  ], b.prototype, "autoWidthFactor", 2);
3290
3327
  w([
3291
3328
  Ve(200)