@ed.yakovich/component-library 0.0.15 → 0.0.16

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.
Files changed (126) hide show
  1. package/dist/components/Accordion/context/index.js +7 -0
  2. package/dist/components/Accordion/index.js +38 -0
  3. package/dist/components/Accordion/types/index.js +1 -0
  4. package/dist/components/Cart/index.js +35 -0
  5. package/dist/components/EquipmentSummary/context/index.js +10 -0
  6. package/dist/components/EquipmentSummary/index.js +65 -0
  7. package/dist/components/EquipmentSummary/types/index.js +1 -0
  8. package/dist/components/Grid/index.js +19 -0
  9. package/dist/components/HeroBanner/context/index.js +7 -0
  10. package/dist/components/HeroBanner/index.js +33 -0
  11. package/dist/components/HeroBanner/types/index.js +1 -0
  12. package/dist/components/InfoBanner/index.js +24 -4
  13. package/dist/components/Nav/index.js +23 -0
  14. package/dist/components/OfferCards/context/index.js +7 -0
  15. package/dist/components/OfferCards/index.js +30 -0
  16. package/dist/components/OfferCards/subComponents/OfferCard.js +62 -0
  17. package/dist/components/OfferCards/types/index.js +1 -0
  18. package/dist/components/SaleBanner/context/index.js +7 -0
  19. package/dist/components/SaleBanner/index.js +59 -0
  20. package/dist/components/SaleBanner/types/index.js +1 -0
  21. package/dist/{index-ba31999b-V1s4iffq.js → index-0d8e0844-BJzWsYCM.js} +2443 -2491
  22. package/dist/index-C9Rf5U9q.js +29143 -0
  23. package/dist/index-b30029d4-E1YxEHFH.js +12 -0
  24. package/dist/index-e6818ded-r_t6ryaW.js +57 -0
  25. package/dist/{index.esm-a7c99373-DUoLYEEM.js → index.esm-322571ff-D1REhsOg.js} +1 -1
  26. package/dist/lib/components/Accordion/context/index.d.ts +10 -0
  27. package/dist/lib/components/Accordion/index.d.ts +2 -0
  28. package/dist/lib/components/Accordion/types/index.d.ts +13 -0
  29. package/dist/lib/components/Cart/index.d.ts +6 -0
  30. package/dist/lib/components/EquipmentSummary/context/index.d.ts +10 -0
  31. package/dist/lib/components/EquipmentSummary/index.d.ts +2 -0
  32. package/dist/lib/components/EquipmentSummary/types/index.d.ts +14 -0
  33. package/dist/lib/components/Grid/index.d.ts +13 -0
  34. package/dist/lib/components/HeroBanner/context/index.d.ts +10 -0
  35. package/dist/lib/components/HeroBanner/index.d.ts +2 -0
  36. package/dist/lib/components/HeroBanner/types/index.d.ts +11 -0
  37. package/dist/lib/components/Nav/index.d.ts +8 -0
  38. package/dist/lib/components/OfferCards/context/index.d.ts +9 -0
  39. package/dist/lib/components/OfferCards/index.d.ts +2 -0
  40. package/dist/lib/components/OfferCards/subComponents/OfferCard.d.ts +3 -0
  41. package/dist/lib/components/OfferCards/types/index.d.ts +26 -0
  42. package/dist/lib/components/SaleBanner/context/index.d.ts +10 -0
  43. package/dist/lib/components/SaleBanner/index.d.ts +2 -0
  44. package/dist/lib/components/SaleBanner/types/index.d.ts +11 -0
  45. package/dist/lib/main.d.ts +13 -0
  46. package/dist/link-DO_Jvm9n.js +685 -0
  47. package/dist/main.js +32 -6
  48. package/dist/prism-accordion.entry-DeyFGNx-.js +51 -0
  49. package/dist/prism-avatar_2.entry-MLbdVrJg.js +68 -0
  50. package/dist/prism-badge.entry-BG5y7O5U.js +58 -0
  51. package/dist/prism-banner.entry-DChrjpFH.js +82 -0
  52. package/dist/prism-breadcrumb.entry-1YzYlKen.js +33 -0
  53. package/dist/prism-button_2.entry-DO8IGIoS.js +110 -0
  54. package/dist/prism-card.entry-DQ6P4TZP.js +119 -0
  55. package/dist/prism-carousel.entry-BA8zsHRW.js +3111 -0
  56. package/dist/prism-checkbox-group.entry-CP4-gghb.js +62 -0
  57. package/dist/prism-checkbox.entry-CJCy8fvC.js +99 -0
  58. package/dist/prism-data-table.entry--0djw8ls.js +10475 -0
  59. package/dist/prism-datepicker.entry-DPm7tpKB.js +249 -0
  60. package/dist/{prism-form.entry-C8VzGp6c.js → prism-form.entry-CS1zRoMt.js} +11 -11
  61. package/dist/prism-grid.entry-jcx2aMUm.js +28 -0
  62. package/dist/prism-header.entry-CBSIpa0M.js +202 -0
  63. package/dist/prism-hero.entry-B0CKL5y9.js +23 -0
  64. package/dist/prism-icon_2.entry-Aja4QGUK.js +118 -0
  65. package/dist/prism-image.entry-B--khr6E.js +38 -0
  66. package/dist/prism-input-file.entry-i5qJkwEK.js +119 -0
  67. package/dist/prism-input-otp.entry-DXoARuzH.js +63 -0
  68. package/dist/prism-input-text.entry-D4QQ-dYX.js +228 -0
  69. package/dist/prism-input-textarea.entry-eeQHnhqC.js +140 -0
  70. package/dist/prism-layout.entry-bfKqOEnU.js +20 -0
  71. package/dist/prism-lineitem.entry-YIRZPVe_.js +44 -0
  72. package/dist/prism-menu.entry-BIlRCiaA.js +231 -0
  73. package/dist/prism-modal.entry-Kc-SpAR-.js +94 -0
  74. package/dist/prism-pagination.entry-BCo9aMdq.js +60 -0
  75. package/dist/prism-popover.entry-LmDvzCiR.js +1013 -0
  76. package/dist/prism-popper.entry-BqrcyTkE.js +959 -0
  77. package/dist/prism-progress.entry-29_ezvop.js +79 -0
  78. package/dist/prism-radio-group.entry-cL6AqjTk.js +66 -0
  79. package/dist/prism-radio.entry-CM_vZFZA.js +101 -0
  80. package/dist/prism-select.entry-B6A3gk7B.js +230 -0
  81. package/dist/prism-switch.entry-CtEfKB58.js +95 -0
  82. package/dist/prism-tab.entry-DIDUhFlk.js +20 -0
  83. package/dist/prism-tabs.entry-Cj3dW5_E.js +70 -0
  84. package/dist/prism-tooltip.entry-DEdY5eRd.js +52 -0
  85. package/dist/prism-typeahead.entry-D2XrvXaG.js +1234 -0
  86. package/package.json +4 -2
  87. package/dist/index-44540db3-BN5vFHKr.js +0 -44
  88. package/dist/index-4d46d9ca-BtyZMEt1.js +0 -12
  89. package/dist/index-D9BZSjMp.js +0 -21158
  90. package/dist/prism-accordion.entry-D4g7wdXB.js +0 -51
  91. package/dist/prism-avatar_3.entry-C1H9bg9y.js +0 -335
  92. package/dist/prism-badge.entry-CWLalQsR.js +0 -56
  93. package/dist/prism-banner.entry-D1sce4tY.js +0 -105
  94. package/dist/prism-breadcrumb.entry-C282yHQl.js +0 -33
  95. package/dist/prism-button_3.entry-DIg1AEXF.js +0 -240
  96. package/dist/prism-card.entry-DaxGD-uX.js +0 -152
  97. package/dist/prism-carousel.entry-BGmaoDVM.js +0 -3346
  98. package/dist/prism-checkbox-group.entry-Dwa_mvjd.js +0 -62
  99. package/dist/prism-checkbox.entry-CZvx2AHI.js +0 -116
  100. package/dist/prism-data-table.entry-DACAS8BE.js +0 -3591
  101. package/dist/prism-datepicker.entry-CHUyjilE.js +0 -279
  102. package/dist/prism-dialog.entry-DdO9Kt32.js +0 -73
  103. package/dist/prism-drawer.entry-Dn0rvW9U.js +0 -43
  104. package/dist/prism-header.entry-D0PypuC3.js +0 -227
  105. package/dist/prism-hero.entry-DQ8G7Jb_.js +0 -23
  106. package/dist/prism-image.entry-tx9Pc3k_.js +0 -38
  107. package/dist/prism-input-file.entry-CO-2LZxG.js +0 -119
  108. package/dist/prism-input-otp.entry-ZAxExI2D.js +0 -79
  109. package/dist/prism-input-text.entry-EXsN4rgi.js +0 -278
  110. package/dist/prism-input-textarea.entry-CRqY4mr9.js +0 -145
  111. package/dist/prism-input-time.entry-BJ9he6MX.js +0 -85
  112. package/dist/prism-layout.entry-ulDWjtj8.js +0 -20
  113. package/dist/prism-lineitem.entry-DJk6X6mR.js +0 -47
  114. package/dist/prism-modal.entry-C795YZic.js +0 -95
  115. package/dist/prism-pagination.entry-DYQieAu3.js +0 -69
  116. package/dist/prism-popover.entry-BgLcACZw.js +0 -1114
  117. package/dist/prism-progress.entry-Z21rpoTm.js +0 -79
  118. package/dist/prism-radio_2.entry-C0HPCb3G.js +0 -159
  119. package/dist/prism-select.entry-B_l-ab1d.js +0 -286
  120. package/dist/prism-switch.entry-OkC8X1bD.js +0 -95
  121. package/dist/prism-tab.entry-szftB_wL.js +0 -20
  122. package/dist/prism-tabs.entry-0UR3WF52.js +0 -72
  123. package/dist/prism-text.entry-BEAZ8xEV.js +0 -28
  124. package/dist/prism-treelist.entry-UX4FM4Bi.js +0 -135
  125. package/dist/prism-typeahead.entry-CwOiAFQE.js +0 -1264
  126. package/dist/purify-9647b094-0-ZyuBNz.js +0 -572
@@ -1,1114 +0,0 @@
1
- import { r as Mt, c as Nt, h as B, H as Bt, g as Vt } from "./index-D9BZSjMp.js";
2
- import { g as $t } from "./index-44540db3-BN5vFHKr.js";
3
- /*!
4
- * Copyright (c) 2025 Comcast. Prism UI - v8.28.0 - made with ❤️ in Philadelphia
5
- */
6
- const X = Math.min, V = Math.max, rt = Math.round, ot = Math.floor, R = (t) => ({
7
- x: t,
8
- y: t
9
- }), Ht = {
10
- left: "right",
11
- right: "left",
12
- bottom: "top",
13
- top: "bottom"
14
- }, jt = {
15
- start: "end",
16
- end: "start"
17
- };
18
- function ft(t, e, o) {
19
- return V(t, X(e, o));
20
- }
21
- function Z(t, e) {
22
- return typeof t == "function" ? t(e) : t;
23
- }
24
- function $(t) {
25
- return t.split("-")[0];
26
- }
27
- function tt(t) {
28
- return t.split("-")[1];
29
- }
30
- function St(t) {
31
- return t === "x" ? "y" : "x";
32
- }
33
- function ut(t) {
34
- return t === "y" ? "height" : "width";
35
- }
36
- const Xt = /* @__PURE__ */ new Set(["top", "bottom"]);
37
- function z(t) {
38
- return Xt.has($(t)) ? "y" : "x";
39
- }
40
- function ht(t) {
41
- return St(z(t));
42
- }
43
- function qt(t, e, o) {
44
- o === void 0 && (o = !1);
45
- const r = tt(t), i = ht(t), n = ut(i);
46
- let s = i === "x" ? r === (o ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
47
- return e.reference[n] > e.floating[n] && (s = it(s)), [s, it(s)];
48
- }
49
- function Yt(t) {
50
- const e = it(t);
51
- return [dt(t), e, dt(e)];
52
- }
53
- function dt(t) {
54
- return t.replace(/start|end/g, (e) => jt[e]);
55
- }
56
- const yt = ["left", "right"], xt = ["right", "left"], Kt = ["top", "bottom"], Gt = ["bottom", "top"];
57
- function Jt(t, e, o) {
58
- switch (t) {
59
- case "top":
60
- case "bottom":
61
- return o ? e ? xt : yt : e ? yt : xt;
62
- case "left":
63
- case "right":
64
- return e ? Kt : Gt;
65
- default:
66
- return [];
67
- }
68
- }
69
- function Qt(t, e, o, r) {
70
- const i = tt(t);
71
- let n = Jt($(t), o === "start", r);
72
- return i && (n = n.map((s) => s + "-" + i), e && (n = n.concat(n.map(dt)))), n;
73
- }
74
- function it(t) {
75
- return t.replace(/left|right|bottom|top/g, (e) => Ht[e]);
76
- }
77
- function Zt(t) {
78
- return {
79
- top: 0,
80
- right: 0,
81
- bottom: 0,
82
- left: 0,
83
- ...t
84
- };
85
- }
86
- function Ot(t) {
87
- return typeof t != "number" ? Zt(t) : {
88
- top: t,
89
- right: t,
90
- bottom: t,
91
- left: t
92
- };
93
- }
94
- function nt(t) {
95
- const {
96
- x: e,
97
- y: o,
98
- width: r,
99
- height: i
100
- } = t;
101
- return {
102
- width: r,
103
- height: i,
104
- top: o,
105
- left: e,
106
- right: e + r,
107
- bottom: o + i,
108
- x: e,
109
- y: o
110
- };
111
- }
112
- function wt(t, e, o) {
113
- let {
114
- reference: r,
115
- floating: i
116
- } = t;
117
- const n = z(e), s = ht(e), a = ut(s), l = $(e), c = n === "y", d = r.x + r.width / 2 - i.width / 2, f = r.y + r.height / 2 - i.height / 2, u = r[a] / 2 - i[a] / 2;
118
- let p;
119
- switch (l) {
120
- case "top":
121
- p = {
122
- x: d,
123
- y: r.y - i.height
124
- };
125
- break;
126
- case "bottom":
127
- p = {
128
- x: d,
129
- y: r.y + r.height
130
- };
131
- break;
132
- case "right":
133
- p = {
134
- x: r.x + r.width,
135
- y: f
136
- };
137
- break;
138
- case "left":
139
- p = {
140
- x: r.x - i.width,
141
- y: f
142
- };
143
- break;
144
- default:
145
- p = {
146
- x: r.x,
147
- y: r.y
148
- };
149
- }
150
- switch (tt(e)) {
151
- case "start":
152
- p[s] -= u * (o && c ? -1 : 1);
153
- break;
154
- case "end":
155
- p[s] += u * (o && c ? -1 : 1);
156
- break;
157
- }
158
- return p;
159
- }
160
- const te = async (t, e, o) => {
161
- const {
162
- placement: r = "bottom",
163
- strategy: i = "absolute",
164
- middleware: n = [],
165
- platform: s
166
- } = o, a = n.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(e));
167
- let c = await s.getElementRects({
168
- reference: t,
169
- floating: e,
170
- strategy: i
171
- }), {
172
- x: d,
173
- y: f
174
- } = wt(c, r, l), u = r, p = {}, m = 0;
175
- for (let h = 0; h < a.length; h++) {
176
- const {
177
- name: v,
178
- fn: g
179
- } = a[h], {
180
- x: b,
181
- y,
182
- data: w,
183
- reset: x
184
- } = await g({
185
- x: d,
186
- y: f,
187
- initialPlacement: r,
188
- placement: u,
189
- strategy: i,
190
- middlewareData: p,
191
- rects: c,
192
- platform: s,
193
- elements: {
194
- reference: t,
195
- floating: e
196
- }
197
- });
198
- d = b ?? d, f = y ?? f, p = {
199
- ...p,
200
- [v]: {
201
- ...p[v],
202
- ...w
203
- }
204
- }, x && m <= 50 && (m++, typeof x == "object" && (x.placement && (u = x.placement), x.rects && (c = x.rects === !0 ? await s.getElementRects({
205
- reference: t,
206
- floating: e,
207
- strategy: i
208
- }) : x.rects), {
209
- x: d,
210
- y: f
211
- } = wt(c, u, l)), h = -1);
212
- }
213
- return {
214
- x: d,
215
- y: f,
216
- placement: u,
217
- strategy: i,
218
- middlewareData: p
219
- };
220
- };
221
- async function Rt(t, e) {
222
- var o;
223
- e === void 0 && (e = {});
224
- const {
225
- x: r,
226
- y: i,
227
- platform: n,
228
- rects: s,
229
- elements: a,
230
- strategy: l
231
- } = t, {
232
- boundary: c = "clippingAncestors",
233
- rootBoundary: d = "viewport",
234
- elementContext: f = "floating",
235
- altBoundary: u = !1,
236
- padding: p = 0
237
- } = Z(e, t), m = Ot(p), v = a[u ? f === "floating" ? "reference" : "floating" : f], g = nt(await n.getClippingRect({
238
- element: (o = await (n.isElement == null ? void 0 : n.isElement(v))) == null || o ? v : v.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(a.floating)),
239
- boundary: c,
240
- rootBoundary: d,
241
- strategy: l
242
- })), b = f === "floating" ? {
243
- x: r,
244
- y: i,
245
- width: s.floating.width,
246
- height: s.floating.height
247
- } : s.reference, y = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(a.floating)), w = await (n.isElement == null ? void 0 : n.isElement(y)) ? await (n.getScale == null ? void 0 : n.getScale(y)) || {
248
- x: 1,
249
- y: 1
250
- } : {
251
- x: 1,
252
- y: 1
253
- }, x = nt(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
254
- elements: a,
255
- rect: b,
256
- offsetParent: y,
257
- strategy: l
258
- }) : b);
259
- return {
260
- top: (g.top - x.top + m.top) / w.y,
261
- bottom: (x.bottom - g.bottom + m.bottom) / w.y,
262
- left: (g.left - x.left + m.left) / w.x,
263
- right: (x.right - g.right + m.right) / w.x
264
- };
265
- }
266
- const ee = (t) => ({
267
- name: "arrow",
268
- options: t,
269
- async fn(e) {
270
- const {
271
- x: o,
272
- y: r,
273
- placement: i,
274
- rects: n,
275
- platform: s,
276
- elements: a,
277
- middlewareData: l
278
- } = e, {
279
- element: c,
280
- padding: d = 0
281
- } = Z(t, e) || {};
282
- if (c == null)
283
- return {};
284
- const f = Ot(d), u = {
285
- x: o,
286
- y: r
287
- }, p = ht(i), m = ut(p), h = await s.getDimensions(c), v = p === "y", g = v ? "top" : "left", b = v ? "bottom" : "right", y = v ? "clientHeight" : "clientWidth", w = n.reference[m] + n.reference[p] - u[p] - n.floating[m], x = u[p] - n.reference[p], I = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
288
- let L = I ? I[y] : 0;
289
- (!L || !await (s.isElement == null ? void 0 : s.isElement(I))) && (L = a.floating[y] || n.floating[m]);
290
- const K = w / 2 - x / 2, W = L / 2 - h[m] / 2 - 1, T = X(f[g], W), G = X(f[b], W), M = T, J = L - h[m] - G, E = L / 2 - h[m] / 2 + K, N = ft(M, E, J), P = !l.arrow && tt(i) != null && E !== N && n.reference[m] / 2 - (E < M ? T : G) - h[m] / 2 < 0, A = P ? E < M ? E - M : E - J : 0;
291
- return {
292
- [p]: u[p] + A,
293
- data: {
294
- [p]: N,
295
- centerOffset: E - N - A,
296
- ...P && {
297
- alignmentOffset: A
298
- }
299
- },
300
- reset: P
301
- };
302
- }
303
- }), oe = function(t) {
304
- return t === void 0 && (t = {}), {
305
- name: "flip",
306
- options: t,
307
- async fn(e) {
308
- var o, r;
309
- const {
310
- placement: i,
311
- middlewareData: n,
312
- rects: s,
313
- initialPlacement: a,
314
- platform: l,
315
- elements: c
316
- } = e, {
317
- mainAxis: d = !0,
318
- crossAxis: f = !0,
319
- fallbackPlacements: u,
320
- fallbackStrategy: p = "bestFit",
321
- fallbackAxisSideDirection: m = "none",
322
- flipAlignment: h = !0,
323
- ...v
324
- } = Z(t, e);
325
- if ((o = n.arrow) != null && o.alignmentOffset)
326
- return {};
327
- const g = $(i), b = z(a), y = $(a) === a, w = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), x = u || (y || !h ? [it(a)] : Yt(a)), I = m !== "none";
328
- !u && I && x.push(...Qt(a, h, m, w));
329
- const L = [a, ...x], K = await Rt(e, v), W = [];
330
- let T = ((r = n.flip) == null ? void 0 : r.overflows) || [];
331
- if (d && W.push(K[g]), f) {
332
- const E = qt(i, s, w);
333
- W.push(K[E[0]], K[E[1]]);
334
- }
335
- if (T = [...T, {
336
- placement: i,
337
- overflows: W
338
- }], !W.every((E) => E <= 0)) {
339
- var G, M;
340
- const E = (((G = n.flip) == null ? void 0 : G.index) || 0) + 1, N = L[E];
341
- if (N && (!(f === "alignment" ? b !== z(N) : !1) || // We leave the current main axis only if every placement on that axis
342
- // overflows the main axis.
343
- T.every((k) => z(k.placement) === b ? k.overflows[0] > 0 : !0)))
344
- return {
345
- data: {
346
- index: E,
347
- overflows: T
348
- },
349
- reset: {
350
- placement: N
351
- }
352
- };
353
- let P = (M = T.filter((A) => A.overflows[0] <= 0).sort((A, k) => A.overflows[1] - k.overflows[1])[0]) == null ? void 0 : M.placement;
354
- if (!P)
355
- switch (p) {
356
- case "bestFit": {
357
- var J;
358
- const A = (J = T.filter((k) => {
359
- if (I) {
360
- const D = z(k.placement);
361
- return D === b || // Create a bias to the `y` side axis due to horizontal
362
- // reading directions favoring greater width.
363
- D === "y";
364
- }
365
- return !0;
366
- }).map((k) => [k.placement, k.overflows.filter((D) => D > 0).reduce((D, Wt) => D + Wt, 0)]).sort((k, D) => k[1] - D[1])[0]) == null ? void 0 : J[0];
367
- A && (P = A);
368
- break;
369
- }
370
- case "initialPlacement":
371
- P = a;
372
- break;
373
- }
374
- if (i !== P)
375
- return {
376
- reset: {
377
- placement: P
378
- }
379
- };
380
- }
381
- return {};
382
- }
383
- };
384
- }, re = /* @__PURE__ */ new Set(["left", "top"]);
385
- async function ie(t, e) {
386
- const {
387
- placement: o,
388
- platform: r,
389
- elements: i
390
- } = t, n = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), s = $(o), a = tt(o), l = z(o) === "y", c = re.has(s) ? -1 : 1, d = n && l ? -1 : 1, f = Z(e, t);
391
- let {
392
- mainAxis: u,
393
- crossAxis: p,
394
- alignmentAxis: m
395
- } = typeof f == "number" ? {
396
- mainAxis: f,
397
- crossAxis: 0,
398
- alignmentAxis: null
399
- } : {
400
- mainAxis: f.mainAxis || 0,
401
- crossAxis: f.crossAxis || 0,
402
- alignmentAxis: f.alignmentAxis
403
- };
404
- return a && typeof m == "number" && (p = a === "end" ? m * -1 : m), l ? {
405
- x: p * d,
406
- y: u * c
407
- } : {
408
- x: u * c,
409
- y: p * d
410
- };
411
- }
412
- const ne = function(t) {
413
- return t === void 0 && (t = 0), {
414
- name: "offset",
415
- options: t,
416
- async fn(e) {
417
- var o, r;
418
- const {
419
- x: i,
420
- y: n,
421
- placement: s,
422
- middlewareData: a
423
- } = e, l = await ie(e, t);
424
- return s === ((o = a.offset) == null ? void 0 : o.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
425
- x: i + l.x,
426
- y: n + l.y,
427
- data: {
428
- ...l,
429
- placement: s
430
- }
431
- };
432
- }
433
- };
434
- }, se = function(t) {
435
- return t === void 0 && (t = {}), {
436
- name: "shift",
437
- options: t,
438
- async fn(e) {
439
- const {
440
- x: o,
441
- y: r,
442
- placement: i
443
- } = e, {
444
- mainAxis: n = !0,
445
- crossAxis: s = !1,
446
- limiter: a = {
447
- fn: (v) => {
448
- let {
449
- x: g,
450
- y: b
451
- } = v;
452
- return {
453
- x: g,
454
- y: b
455
- };
456
- }
457
- },
458
- ...l
459
- } = Z(t, e), c = {
460
- x: o,
461
- y: r
462
- }, d = await Rt(e, l), f = z($(i)), u = St(f);
463
- let p = c[u], m = c[f];
464
- if (n) {
465
- const v = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", b = p + d[v], y = p - d[g];
466
- p = ft(b, p, y);
467
- }
468
- if (s) {
469
- const v = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", b = m + d[v], y = m - d[g];
470
- m = ft(b, m, y);
471
- }
472
- const h = a.fn({
473
- ...e,
474
- [u]: p,
475
- [f]: m
476
- });
477
- return {
478
- ...h,
479
- data: {
480
- x: h.x - o,
481
- y: h.y - r,
482
- enabled: {
483
- [u]: n,
484
- [f]: s
485
- }
486
- }
487
- };
488
- }
489
- };
490
- };
491
- function st() {
492
- return typeof window < "u";
493
- }
494
- function Y(t) {
495
- return Ct(t) ? (t.nodeName || "").toLowerCase() : "#document";
496
- }
497
- function _(t) {
498
- var e;
499
- return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
500
- }
501
- function F(t) {
502
- var e;
503
- return (e = (Ct(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
504
- }
505
- function Ct(t) {
506
- return st() ? t instanceof Node || t instanceof _(t).Node : !1;
507
- }
508
- function S(t) {
509
- return st() ? t instanceof Element || t instanceof _(t).Element : !1;
510
- }
511
- function C(t) {
512
- return st() ? t instanceof HTMLElement || t instanceof _(t).HTMLElement : !1;
513
- }
514
- function Et(t) {
515
- return !st() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof _(t).ShadowRoot;
516
- }
517
- const ae = /* @__PURE__ */ new Set(["inline", "contents"]);
518
- function et(t) {
519
- const {
520
- overflow: e,
521
- overflowX: o,
522
- overflowY: r,
523
- display: i
524
- } = O(t);
525
- return /auto|scroll|overlay|hidden|clip/.test(e + r + o) && !ae.has(i);
526
- }
527
- const ce = /* @__PURE__ */ new Set(["table", "td", "th"]);
528
- function le(t) {
529
- return ce.has(Y(t));
530
- }
531
- const pe = [":popover-open", ":modal"];
532
- function at(t) {
533
- return pe.some((e) => {
534
- try {
535
- return t.matches(e);
536
- } catch {
537
- return !1;
538
- }
539
- });
540
- }
541
- const fe = ["transform", "translate", "scale", "rotate", "perspective"], de = ["transform", "translate", "scale", "rotate", "perspective", "filter"], me = ["paint", "layout", "strict", "content"];
542
- function gt(t) {
543
- const e = vt(), o = S(t) ? O(t) : t;
544
- return fe.some((r) => o[r] ? o[r] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || de.some((r) => (o.willChange || "").includes(r)) || me.some((r) => (o.contain || "").includes(r));
545
- }
546
- function ue(t) {
547
- let e = U(t);
548
- for (; C(e) && !q(e); ) {
549
- if (gt(e))
550
- return e;
551
- if (at(e))
552
- return null;
553
- e = U(e);
554
- }
555
- return null;
556
- }
557
- function vt() {
558
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
559
- }
560
- const he = /* @__PURE__ */ new Set(["html", "body", "#document"]);
561
- function q(t) {
562
- return he.has(Y(t));
563
- }
564
- function O(t) {
565
- return _(t).getComputedStyle(t);
566
- }
567
- function ct(t) {
568
- return S(t) ? {
569
- scrollLeft: t.scrollLeft,
570
- scrollTop: t.scrollTop
571
- } : {
572
- scrollLeft: t.scrollX,
573
- scrollTop: t.scrollY
574
- };
575
- }
576
- function U(t) {
577
- if (Y(t) === "html")
578
- return t;
579
- const e = (
580
- // Step into the shadow DOM of the parent of a slotted node.
581
- t.assignedSlot || // DOM Element detected.
582
- t.parentNode || // ShadowRoot detected.
583
- Et(t) && t.host || // Fallback.
584
- F(t)
585
- );
586
- return Et(e) ? e.host : e;
587
- }
588
- function Ft(t) {
589
- const e = U(t);
590
- return q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : C(e) && et(e) ? e : Ft(e);
591
- }
592
- function Q(t, e, o) {
593
- var r;
594
- e === void 0 && (e = []), o === void 0 && (o = !0);
595
- const i = Ft(t), n = i === ((r = t.ownerDocument) == null ? void 0 : r.body), s = _(i);
596
- if (n) {
597
- const a = mt(s);
598
- return e.concat(s, s.visualViewport || [], et(i) ? i : [], a && o ? Q(a) : []);
599
- }
600
- return e.concat(i, Q(i, [], o));
601
- }
602
- function mt(t) {
603
- return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
604
- }
605
- function It(t) {
606
- const e = O(t);
607
- let o = parseFloat(e.width) || 0, r = parseFloat(e.height) || 0;
608
- const i = C(t), n = i ? t.offsetWidth : o, s = i ? t.offsetHeight : r, a = rt(o) !== n || rt(r) !== s;
609
- return a && (o = n, r = s), {
610
- width: o,
611
- height: r,
612
- $: a
613
- };
614
- }
615
- function bt(t) {
616
- return S(t) ? t : t.contextElement;
617
- }
618
- function j(t) {
619
- const e = bt(t);
620
- if (!C(e))
621
- return R(1);
622
- const o = e.getBoundingClientRect(), {
623
- width: r,
624
- height: i,
625
- $: n
626
- } = It(e);
627
- let s = (n ? rt(o.width) : o.width) / r, a = (n ? rt(o.height) : o.height) / i;
628
- return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
629
- x: s,
630
- y: a
631
- };
632
- }
633
- const ge = /* @__PURE__ */ R(0);
634
- function Tt(t) {
635
- const e = _(t);
636
- return !vt() || !e.visualViewport ? ge : {
637
- x: e.visualViewport.offsetLeft,
638
- y: e.visualViewport.offsetTop
639
- };
640
- }
641
- function ve(t, e, o) {
642
- return e === void 0 && (e = !1), !o || e && o !== _(t) ? !1 : e;
643
- }
644
- function H(t, e, o, r) {
645
- e === void 0 && (e = !1), o === void 0 && (o = !1);
646
- const i = t.getBoundingClientRect(), n = bt(t);
647
- let s = R(1);
648
- e && (r ? S(r) && (s = j(r)) : s = j(t));
649
- const a = ve(n, o, r) ? Tt(n) : R(0);
650
- let l = (i.left + a.x) / s.x, c = (i.top + a.y) / s.y, d = i.width / s.x, f = i.height / s.y;
651
- if (n) {
652
- const u = _(n), p = r && S(r) ? _(r) : r;
653
- let m = u, h = mt(m);
654
- for (; h && r && p !== m; ) {
655
- const v = j(h), g = h.getBoundingClientRect(), b = O(h), y = g.left + (h.clientLeft + parseFloat(b.paddingLeft)) * v.x, w = g.top + (h.clientTop + parseFloat(b.paddingTop)) * v.y;
656
- l *= v.x, c *= v.y, d *= v.x, f *= v.y, l += y, c += w, m = _(h), h = mt(m);
657
- }
658
- }
659
- return nt({
660
- width: d,
661
- height: f,
662
- x: l,
663
- y: c
664
- });
665
- }
666
- function lt(t, e) {
667
- const o = ct(t).scrollLeft;
668
- return e ? e.left + o : H(F(t)).left + o;
669
- }
670
- function Pt(t, e) {
671
- const o = t.getBoundingClientRect(), r = o.left + e.scrollLeft - lt(t, o), i = o.top + e.scrollTop;
672
- return {
673
- x: r,
674
- y: i
675
- };
676
- }
677
- function be(t) {
678
- let {
679
- elements: e,
680
- rect: o,
681
- offsetParent: r,
682
- strategy: i
683
- } = t;
684
- const n = i === "fixed", s = F(r), a = e ? at(e.floating) : !1;
685
- if (r === s || a && n)
686
- return o;
687
- let l = {
688
- scrollLeft: 0,
689
- scrollTop: 0
690
- }, c = R(1);
691
- const d = R(0), f = C(r);
692
- if ((f || !f && !n) && ((Y(r) !== "body" || et(s)) && (l = ct(r)), C(r))) {
693
- const p = H(r);
694
- c = j(r), d.x = p.x + r.clientLeft, d.y = p.y + r.clientTop;
695
- }
696
- const u = s && !f && !n ? Pt(s, l) : R(0);
697
- return {
698
- width: o.width * c.x,
699
- height: o.height * c.y,
700
- x: o.x * c.x - l.scrollLeft * c.x + d.x + u.x,
701
- y: o.y * c.y - l.scrollTop * c.y + d.y + u.y
702
- };
703
- }
704
- function ye(t) {
705
- return Array.from(t.getClientRects());
706
- }
707
- function xe(t) {
708
- const e = F(t), o = ct(t), r = t.ownerDocument.body, i = V(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), n = V(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
709
- let s = -o.scrollLeft + lt(t);
710
- const a = -o.scrollTop;
711
- return O(r).direction === "rtl" && (s += V(e.clientWidth, r.clientWidth) - i), {
712
- width: i,
713
- height: n,
714
- x: s,
715
- y: a
716
- };
717
- }
718
- const _t = 25;
719
- function we(t, e) {
720
- const o = _(t), r = F(t), i = o.visualViewport;
721
- let n = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
722
- if (i) {
723
- n = i.width, s = i.height;
724
- const d = vt();
725
- (!d || d && e === "fixed") && (a = i.offsetLeft, l = i.offsetTop);
726
- }
727
- const c = lt(r);
728
- if (c <= 0) {
729
- const d = r.ownerDocument, f = d.body, u = getComputedStyle(f), p = d.compatMode === "CSS1Compat" && parseFloat(u.marginLeft) + parseFloat(u.marginRight) || 0, m = Math.abs(r.clientWidth - f.clientWidth - p);
730
- m <= _t && (n -= m);
731
- } else c <= _t && (n += c);
732
- return {
733
- width: n,
734
- height: s,
735
- x: a,
736
- y: l
737
- };
738
- }
739
- const Ee = /* @__PURE__ */ new Set(["absolute", "fixed"]);
740
- function _e(t, e) {
741
- const o = H(t, !0, e === "fixed"), r = o.top + t.clientTop, i = o.left + t.clientLeft, n = C(t) ? j(t) : R(1), s = t.clientWidth * n.x, a = t.clientHeight * n.y, l = i * n.x, c = r * n.y;
742
- return {
743
- width: s,
744
- height: a,
745
- x: l,
746
- y: c
747
- };
748
- }
749
- function Lt(t, e, o) {
750
- let r;
751
- if (e === "viewport")
752
- r = we(t, o);
753
- else if (e === "document")
754
- r = xe(F(t));
755
- else if (S(e))
756
- r = _e(e, o);
757
- else {
758
- const i = Tt(t);
759
- r = {
760
- x: e.x - i.x,
761
- y: e.y - i.y,
762
- width: e.width,
763
- height: e.height
764
- };
765
- }
766
- return nt(r);
767
- }
768
- function Dt(t, e) {
769
- const o = U(t);
770
- return o === e || !S(o) || q(o) ? !1 : O(o).position === "fixed" || Dt(o, e);
771
- }
772
- function Le(t, e) {
773
- const o = e.get(t);
774
- if (o)
775
- return o;
776
- let r = Q(t, [], !1).filter((a) => S(a) && Y(a) !== "body"), i = null;
777
- const n = O(t).position === "fixed";
778
- let s = n ? U(t) : t;
779
- for (; S(s) && !q(s); ) {
780
- const a = O(s), l = gt(s);
781
- !l && a.position === "fixed" && (i = null), (n ? !l && !i : !l && a.position === "static" && !!i && Ee.has(i.position) || et(s) && !l && Dt(t, s)) ? r = r.filter((d) => d !== s) : i = a, s = U(s);
782
- }
783
- return e.set(t, r), r;
784
- }
785
- function Ae(t) {
786
- let {
787
- element: e,
788
- boundary: o,
789
- rootBoundary: r,
790
- strategy: i
791
- } = t;
792
- const s = [...o === "clippingAncestors" ? at(e) ? [] : Le(e, this._c) : [].concat(o), r], a = s[0], l = s.reduce((c, d) => {
793
- const f = Lt(e, d, i);
794
- return c.top = V(f.top, c.top), c.right = X(f.right, c.right), c.bottom = X(f.bottom, c.bottom), c.left = V(f.left, c.left), c;
795
- }, Lt(e, a, i));
796
- return {
797
- width: l.right - l.left,
798
- height: l.bottom - l.top,
799
- x: l.left,
800
- y: l.top
801
- };
802
- }
803
- function ke(t) {
804
- const {
805
- width: e,
806
- height: o
807
- } = It(t);
808
- return {
809
- width: e,
810
- height: o
811
- };
812
- }
813
- function Se(t, e, o) {
814
- const r = C(e), i = F(e), n = o === "fixed", s = H(t, !0, n, e);
815
- let a = {
816
- scrollLeft: 0,
817
- scrollTop: 0
818
- };
819
- const l = R(0);
820
- function c() {
821
- l.x = lt(i);
822
- }
823
- if (r || !r && !n)
824
- if ((Y(e) !== "body" || et(i)) && (a = ct(e)), r) {
825
- const p = H(e, !0, n, e);
826
- l.x = p.x + e.clientLeft, l.y = p.y + e.clientTop;
827
- } else i && c();
828
- n && !r && i && c();
829
- const d = i && !r && !n ? Pt(i, a) : R(0), f = s.left + a.scrollLeft - l.x - d.x, u = s.top + a.scrollTop - l.y - d.y;
830
- return {
831
- x: f,
832
- y: u,
833
- width: s.width,
834
- height: s.height
835
- };
836
- }
837
- function pt(t) {
838
- return O(t).position === "static";
839
- }
840
- function At(t, e) {
841
- if (!C(t) || O(t).position === "fixed")
842
- return null;
843
- if (e)
844
- return e(t);
845
- let o = t.offsetParent;
846
- return F(t) === o && (o = o.ownerDocument.body), o;
847
- }
848
- function zt(t, e) {
849
- const o = _(t);
850
- if (at(t))
851
- return o;
852
- if (!C(t)) {
853
- let i = U(t);
854
- for (; i && !q(i); ) {
855
- if (S(i) && !pt(i))
856
- return i;
857
- i = U(i);
858
- }
859
- return o;
860
- }
861
- let r = At(t, e);
862
- for (; r && le(r) && pt(r); )
863
- r = At(r, e);
864
- return r && q(r) && pt(r) && !gt(r) ? o : r || ue(t) || o;
865
- }
866
- const Oe = async function(t) {
867
- const e = this.getOffsetParent || zt, o = this.getDimensions, r = await o(t.floating);
868
- return {
869
- reference: Se(t.reference, await e(t.floating), t.strategy),
870
- floating: {
871
- x: 0,
872
- y: 0,
873
- width: r.width,
874
- height: r.height
875
- }
876
- };
877
- };
878
- function Re(t) {
879
- return O(t).direction === "rtl";
880
- }
881
- const Ce = {
882
- convertOffsetParentRelativeRectToViewportRelativeRect: be,
883
- getDocumentElement: F,
884
- getClippingRect: Ae,
885
- getOffsetParent: zt,
886
- getElementRects: Oe,
887
- getClientRects: ye,
888
- getDimensions: ke,
889
- getScale: j,
890
- isElement: S,
891
- isRTL: Re
892
- };
893
- function Ut(t, e) {
894
- return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
895
- }
896
- function Fe(t, e) {
897
- let o = null, r;
898
- const i = F(t);
899
- function n() {
900
- var a;
901
- clearTimeout(r), (a = o) == null || a.disconnect(), o = null;
902
- }
903
- function s(a, l) {
904
- a === void 0 && (a = !1), l === void 0 && (l = 1), n();
905
- const c = t.getBoundingClientRect(), {
906
- left: d,
907
- top: f,
908
- width: u,
909
- height: p
910
- } = c;
911
- if (a || e(), !u || !p)
912
- return;
913
- const m = ot(f), h = ot(i.clientWidth - (d + u)), v = ot(i.clientHeight - (f + p)), g = ot(d), y = {
914
- rootMargin: -m + "px " + -h + "px " + -v + "px " + -g + "px",
915
- threshold: V(0, X(1, l)) || 1
916
- };
917
- let w = !0;
918
- function x(I) {
919
- const L = I[0].intersectionRatio;
920
- if (L !== l) {
921
- if (!w)
922
- return s();
923
- L ? s(!1, L) : r = setTimeout(() => {
924
- s(!1, 1e-7);
925
- }, 1e3);
926
- }
927
- L === 1 && !Ut(c, t.getBoundingClientRect()) && s(), w = !1;
928
- }
929
- try {
930
- o = new IntersectionObserver(x, {
931
- ...y,
932
- // Handle <iframe>s
933
- root: i.ownerDocument
934
- });
935
- } catch {
936
- o = new IntersectionObserver(x, y);
937
- }
938
- o.observe(t);
939
- }
940
- return s(!0), n;
941
- }
942
- function kt(t, e, o, r) {
943
- r === void 0 && (r = {});
944
- const {
945
- ancestorScroll: i = !0,
946
- ancestorResize: n = !0,
947
- elementResize: s = typeof ResizeObserver == "function",
948
- layoutShift: a = typeof IntersectionObserver == "function",
949
- animationFrame: l = !1
950
- } = r, c = bt(t), d = i || n ? [...c ? Q(c) : [], ...Q(e)] : [];
951
- d.forEach((g) => {
952
- i && g.addEventListener("scroll", o, {
953
- passive: !0
954
- }), n && g.addEventListener("resize", o);
955
- });
956
- const f = c && a ? Fe(c, o) : null;
957
- let u = -1, p = null;
958
- s && (p = new ResizeObserver((g) => {
959
- let [b] = g;
960
- b && b.target === c && p && (p.unobserve(e), cancelAnimationFrame(u), u = requestAnimationFrame(() => {
961
- var y;
962
- (y = p) == null || y.observe(e);
963
- })), o();
964
- }), c && !l && p.observe(c), p.observe(e));
965
- let m, h = l ? H(t) : null;
966
- l && v();
967
- function v() {
968
- const g = H(t);
969
- h && !Ut(h, g) && o(), h = g, m = requestAnimationFrame(v);
970
- }
971
- return o(), () => {
972
- var g;
973
- d.forEach((b) => {
974
- i && b.removeEventListener("scroll", o), n && b.removeEventListener("resize", o);
975
- }), f == null || f(), (g = p) == null || g.disconnect(), p = null, l && cancelAnimationFrame(m);
976
- };
977
- }
978
- const Ie = ne, Te = se, Pe = oe, De = ee, ze = (t, e, o) => {
979
- const r = /* @__PURE__ */ new Map(), i = {
980
- platform: Ce,
981
- ...o
982
- }, n = {
983
- ...i.platform,
984
- _c: r
985
- };
986
- return te(t, e, {
987
- ...i,
988
- platform: n
989
- });
990
- }, Ue = ".sc-prism-popover-h{display:inline-block;max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content}.floatingui.sc-prism-popover{border:1px solid color-mix(in srgb,var(--prism-color-border-secondary-base) var(--prism-alpha-tertiary-percentage),transparent);border-radius:var(--prism-popover-border-size-radius,var(--prism-radius-size-sm));box-shadow:var(--prism-shadow-xs-hover);display:none;left:0;padding:var(--prism-popover-spacing-padding,var(--prism-spacer-size-sm) var(--prism-spacer-size-lg));position:absolute;top:0;width:-webkit-max-content;width:-moz-max-content;width:max-content}.floatingui[data-as=tooltip].sc-prism-popover{z-index:var(--prism-layout-z-index-tooltip)}.floatingui[data-as=context].sc-prism-popover{z-index:var(--prism-layout-z-index-popover)}.floatingui.open.sc-prism-popover{display:block}.popover-arrow.sc-prism-popover{display:none}.popover-arrow.on.sc-prism-popover{background-color:var(--prism-color-material-secondary-base);border:1px solid color-mix(in srgb,var(--prism-color-border-secondary-base) var(--prism-alpha-tertiary-percentage),transparent);display:block;height:.5rem;position:absolute;transform:rotate(45deg);width:.5rem;z-index:(--prism-layout-z-index-base)}.floatingui.context-primary-brand-inverse.sc-prism-popover,.floatingui.context-primary-brand-inverse.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-brand-primary-inverse-base);border:1px solid color-mix(in srgb,var(--prism-color-border-brand-primary-inverse-base) var(--prism-alpha-tertiary-percentage),transparent);color:var(--prism-color-text-primary-inverse-base)}.floatingui.context-primary-inverse.sc-prism-popover,.floatingui.context-primary-inverse.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-primary-inverse-base)}.floatingui.context-primary-inverse.sc-prism-popover,.floatingui.context-primary-inverse.sc-prism-popover .popover-arrow.sc-prism-popover,.floatingui.context-secondary-inverse.sc-prism-popover,.floatingui.context-secondary-inverse.sc-prism-popover .popover-arrow.sc-prism-popover{border:1px solid color-mix(in srgb,var(--prism-color-border-primary-inverse-base) var(--prism-alpha-tertiary-percentage),transparent);color:var(--prism-color-text-primary-inverse-base)}.floatingui.context-secondary-inverse.sc-prism-popover,.floatingui.context-secondary-inverse.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-secondary-inverse-base)}.floatingui.context-primary.sc-prism-popover,.floatingui.context-primary.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-primary-base);border:1px solid color-mix(in srgb,var(--prism-color-border-primary-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.context-secondary.sc-prism-popover,.floatingui.context-secondary.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-secondary-base);border:1px solid color-mix(in srgb,var(--prism-color-border-secondary-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.context-danger.sc-prism-popover,.floatingui.context-danger.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-danger-base);border:1px solid color-mix(in srgb,var(--prism-color-border-danger-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.context-info.sc-prism-popover,.floatingui.context-info.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-info-base);border:1px solid color-mix(in srgb,var(--prism-color-border-info-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.context-caution.sc-prism-popover,.floatingui.context-caution.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-caution-base);border:1px solid color-mix(in srgb,var(--prism-color-border-caution-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.context-success.sc-prism-popover,.floatingui.context-success.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-success-base);border:1px solid color-mix(in srgb,var(--prism-color-border-success-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.tooltip-primary-brand-inverse.sc-prism-popover{color:var(--prism-color-text-primary-inverse-base)}.floatingui.tooltip-primary-brand-inverse.sc-prism-popover,.floatingui.tooltip-primary-brand-inverse.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-brand-primary-inverse-base)}.floatingui.tooltip-primary-brand.sc-prism-popover,.floatingui.tooltip-primary-brand.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-brand-primary-base);border:1px solid color-mix(in srgb,var(--prism-color-border-brand-primary-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.tooltip-secondary-brand.sc-prism-popover,.floatingui.tooltip-secondary-brand.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-brand-secondary-base);border:1px solid color-mix(in srgb,var(--prism-color-border-brand-secondary-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.tooltip-primary.sc-prism-popover,.floatingui.tooltip-primary.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-primary-base);border:1px solid color-mix(in srgb,var(--prism-color-border-primary-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.tooltip-primary-inverse.sc-prism-popover,.floatingui.tooltip-primary-inverse.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-primary-inverse-base)}.floatingui.tooltip-primary-inverse.sc-prism-popover,.floatingui.tooltip-primary-inverse.sc-prism-popover .popover-arrow.sc-prism-popover,.floatingui.tooltip-secondary-inverse.sc-prism-popover,.floatingui.tooltip-secondary-inverse.sc-prism-popover .popover-arrow.sc-prism-popover{border:1px solid color-mix(in srgb,var(--prism-color-border-primary-inverse-base) var(--prism-alpha-tertiary-percentage),transparent);color:var(--prism-color-text-primary-inverse-base)}.floatingui.tooltip-secondary-inverse.sc-prism-popover,.floatingui.tooltip-secondary-inverse.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-secondary-inverse-base)}.floatingui.tooltip-secondary.sc-prism-popover,.floatingui.tooltip-secondary.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-secondary-base);border:1px solid color-mix(in srgb,var(--prism-color-border-secondary-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.tooltip-success.sc-prism-popover,.floatingui.tooltip-success.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-success-base);border:1px solid color-mix(in srgb,var(--prism-color-border-success-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.tooltip-danger.sc-prism-popover,.floatingui.tooltip-danger.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-danger-base);border:1px solid color-mix(in srgb,var(--prism-color-border-danger-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.tooltip-info.sc-prism-popover,.floatingui.tooltip-info.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-info-base);border:1px solid color-mix(in srgb,var(--prism-color-border-info-base) var(--prism-alpha-tertiary-percentage),transparent)}.floatingui.tooltip-caution.sc-prism-popover,.floatingui.tooltip-caution.sc-prism-popover .popover-arrow.sc-prism-popover{background-color:var(--prism-color-material-caution-base);border:1px solid color-mix(in srgb,var(--prism-color-border-caution-base) var(--prism-alpha-tertiary-percentage),transparent)}.container.sc-prism-popover{width:100%}@media (min-width:640px){.container.sc-prism-popover{max-width:640px}}@media (min-width:768px){.container.sc-prism-popover{max-width:768px}}@media (min-width:1024px){.container.sc-prism-popover{max-width:1024px}}@media (min-width:1280px){.container.sc-prism-popover{max-width:1280px}}@media (min-width:1536px){.container.sc-prism-popover{max-width:1536px}}", We = Ue, Me = class {
991
- constructor(t) {
992
- Mt(this, t), this.prismWatch = Nt(this, "prismWatch", 7), this._popoverId = $t(), this._slots = { reference: !1 }, this._hasInitializedSlot = !1, this.placement = "right-end", this.prismId = `popover-${this._popoverId}`, this.offset = 2, this.shift = 2, this.as = "tooltip", this.label = void 0, this.icon = "info", this.iconTone = "primary", this.iconDisplay = "fill", this.tooltipTone = "primary-brand-inverse", this.contextTone = "secondary", this.arrow = !0, this.open = !1, this.size = void 0, this.iconSize = void 0;
993
- }
994
- /** @internal */
995
- watchMultipleNumbers() {
996
- this._computeFloatingUI();
997
- }
998
- watchOpen() {
999
- this.prismWatch.emit({ name: "popover-changed", type: this.as, action: "open-watch", open: this.open, id: this.prismId });
1000
- }
1001
- /** Public Method to Show */
1002
- async show() {
1003
- this.open = !0;
1004
- }
1005
- /** Public Method to Close */
1006
- async hide() {
1007
- this.open = !1;
1008
- }
1009
- /** @internal */
1010
- _computeFloatingUI() {
1011
- this._floatingElement && ze(this._referenceElement, this._floatingElement, {
1012
- placement: this.placement,
1013
- middleware: [Ie(this.offset), Pe(), Te({ padding: this.shift }), De({ element: this._arrowElement })]
1014
- }).then(({ x: t, y: e, placement: o, middlewareData: r }) => {
1015
- Object.assign(this._floatingElement.style, {
1016
- left: `${t}px`,
1017
- top: `${e}px`
1018
- });
1019
- const { x: i, y: n } = r.arrow, s = {
1020
- top: "bottom",
1021
- right: "left",
1022
- bottom: "top",
1023
- left: "right"
1024
- }[o.split("-")[0]];
1025
- Object.assign(this._arrowElement.style, {
1026
- left: i != null ? `${i}px` : "",
1027
- top: n != null ? `${n}px` : "",
1028
- right: "",
1029
- bottom: "",
1030
- [s]: "-5px",
1031
- borderLeftWidth: o.split("-")[0] === "bottom" || o.split("-")[0] === "right" ? "1px" : "0",
1032
- borderTopWidth: o.split("-")[0] === "bottom" || o.split("-")[0] === "left" ? "1px" : "0",
1033
- borderRightWidth: o.split("-")[0] === "top" || o.split("-")[0] === "left" ? "1px" : "0",
1034
- borderBottomWidth: o.split("-")[0] === "top" || o.split("-")[0] === "right" ? "1px" : "0"
1035
- });
1036
- });
1037
- }
1038
- /** @internal */
1039
- _showFloatingUI(t) {
1040
- t && (this.open = this.as === "context" ? !this.open : !0), this.as === "context" && this._slots.reference && (this._referenceElement.tagName.toLowerCase() === "prism-button" ? this._referenceElement.setAttribute("expanded", this.open.toString()) : this._referenceElement.setAttribute("aria-expanded", this.open.toString())), kt(this._referenceElement, this._floatingElement, this._computeFloatingUI.bind(this));
1041
- }
1042
- /** @internal */
1043
- _hideFloatingUI() {
1044
- this.open = !1;
1045
- }
1046
- componentDidRender() {
1047
- this._computeFloatingUI();
1048
- }
1049
- /**
1050
- * @internal
1051
- * When a slot is used for the reference element, it has to receive focus and other interactive events
1052
- * This is only for the initial setup
1053
- */
1054
- _handleReferenceEvents(t) {
1055
- let e = ["prism-button", "button", "a", "input"];
1056
- switch (t && !e.includes(t.tagName.toLowerCase()) && (this._referenceElement = t.querySelectorAll(e.join(","))[0]), t && e.includes(t.tagName.toLowerCase()) && (this._referenceElement = t), this._referenceElement.tagName.toLowerCase()) {
1057
- case "prism-button":
1058
- this.as === "tooltip" && (this._referenceElement.addEventListener("prismFocus", this._showFloatingUI.bind(this)), this._referenceElement.addEventListener("prismBlur", this._hideFloatingUI.bind(this)), this._referenceElement.addEventListener("mouseenter", this._showFloatingUI.bind(this)), this._referenceElement.setAttribute("describedby", this.prismId)), this.as === "context" && (this._referenceElement.addEventListener("prismClick", this._showFloatingUI.bind(this)), this._referenceElement.setAttribute("expanded", this.open.toString())), this.label && this._referenceElement.setAttribute("label", this.label);
1059
- break;
1060
- case "button":
1061
- case "a":
1062
- this.as === "tooltip" && (this._referenceElement.addEventListener("focus", this._showFloatingUI.bind(this)), this._referenceElement.addEventListener("blur", this._hideFloatingUI.bind(this)), this._referenceElement.addEventListener("mouseenter", this._showFloatingUI.bind(this)), this._referenceElement.setAttribute("aria-describedby", this.prismId)), this.as === "context" && (this._referenceElement.addEventListener("click", this._showFloatingUI.bind(this)), this._referenceElement.setAttribute("aria-expanded", this.open.toString())), this.label && this._referenceElement.setAttribute("aria-label", this.label);
1063
- break;
1064
- case "input":
1065
- this.as === "tooltip" && (this._referenceElement.addEventListener("focus", this._showFloatingUI.bind(this)), this._referenceElement.addEventListener("blur", this._hideFloatingUI.bind(this)), this._referenceElement.addEventListener("mouseenter", this._showFloatingUI.bind(this)), this._referenceElement.setAttribute("aria-describedby", this.prismId));
1066
- }
1067
- }
1068
- /** @internal */
1069
- _listenerFloatingUI(t) {
1070
- const e = t instanceof KeyboardEvent && t.key === "Escape", o = t.type === "mouseleave" && this.as === "tooltip", r = (t.type === "mousedown" || t.type === "focus" || t instanceof KeyboardEvent) && !this.el.contains(t.target);
1071
- (e || o || r) && this._hideFloatingUI();
1072
- }
1073
- connectedCallback() {
1074
- this._keydownListener = (t) => this._listenerFloatingUI(t), this._mouseleaveListener = (t) => this._listenerFloatingUI(t), this._mousedownListener = (t) => this._listenerFloatingUI(t), this.el.addEventListener("keydown", this._keydownListener), this.el.addEventListener("mouseleave", this._mouseleaveListener), document.addEventListener("mousedown", this._mousedownListener), document.addEventListener("keydown", this._keydownListener), document.addEventListener("focus", this._keydownListener, !0);
1075
- }
1076
- componentWillRender() {
1077
- if (!this._hasInitializedSlot) {
1078
- const t = this.el.querySelector('[slot="reference"]');
1079
- this._slots.reference = !!t, this._slots.reference && t && (this._handleReferenceEvents(t), this._hasInitializedSlot = !0);
1080
- }
1081
- }
1082
- componentDidLoad() {
1083
- if (!this._hasInitializedSlot) {
1084
- const t = this.el.querySelector('[slot="reference"]');
1085
- this._slots.reference = !!t, this._slots.reference && t && (this._handleReferenceEvents(t), this._hasInitializedSlot = !0);
1086
- }
1087
- this._referenceElement && this._floatingElement && kt(this._referenceElement, this._floatingElement, this._computeFloatingUI.bind(this));
1088
- }
1089
- disconnectedCallback() {
1090
- this.el.removeEventListener("keydown", this._keydownListener), this.el.removeEventListener("mouseleave", this._mouseleaveListener), document.removeEventListener("mousedown", this._mousedownListener), document.removeEventListener("keydown", this._keydownListener), document.removeEventListener("focus", this._keydownListener, !0);
1091
- }
1092
- render() {
1093
- return B(Bt, { key: "746c5494265b29e5162b730a97ddf959c51cbc55" }, this._slots.reference ? B("slot", { name: "reference" }) : B("prism-button", { id: "button", onPrismFocus: this.as === "tooltip" ? this._showFloatingUI.bind(this) : void 0, onPrismBlur: this.as === "tooltip" ? this._hideFloatingUI.bind(this) : void 0, onMouseEnter: this.as === "tooltip" ? this._showFloatingUI.bind(this) : void 0, onPrismClick: this.as === "context" ? this._showFloatingUI.bind(this) : void 0, describedby: this.as === "tooltip" ? this.prismId : void 0, display: "ghost-icon", label: this.label, size: this.size, ref: (t) => this._referenceElement = t, expanded: this.as === "context" ? this.open : void 0 }, B("prism-icon", { size: this.iconSize, name: this.icon, tone: this.iconTone, display: this.iconDisplay, role: "presentation" })), B("div", { key: "ae2de95311a5d313bccf78e9aa3c178a4a272006", ref: (t) => this._floatingElement = t, id: this.prismId, "data-as": this.as, class: {
1094
- open: this.open,
1095
- floatingui: !0,
1096
- [`tooltip-${this.tooltipTone}`]: this.as === "tooltip",
1097
- [`context-${this.contextTone}`]: this.as === "context"
1098
- }, role: this.as === "tooltip" ? "tooltip" : void 0 }, B("slot", { key: "b573d70610827470688dc4369d152fcdf55bdd3d" }), B("span", { key: "cd0d591d464d1b182e0a2fa5e68bf7155fbb3646", ref: (t) => this._arrowElement = t, class: { "popover-arrow": !0, on: this.arrow === !0 } })));
1099
- }
1100
- get el() {
1101
- return Vt(this);
1102
- }
1103
- static get watchers() {
1104
- return {
1105
- offset: ["watchMultipleNumbers"],
1106
- shift: ["watchMultipleNumbers"],
1107
- open: ["watchOpen"]
1108
- };
1109
- }
1110
- };
1111
- Me.style = We;
1112
- export {
1113
- Me as prism_popover
1114
- };