@justeattakeaway/pie-modal 0.14.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { nothing as g, unsafeCSS as E, LitElement as D } from "lit";
2
- import { html as h, unsafeStatic as T } from "lit/static-html.js";
3
- import { property as s, query as A } from "lit/decorators.js";
4
- import { property as F } from "lit/decorators/property.js";
5
- var R = Object.defineProperty, j = Object.getOwnPropertyDescriptor, I = (n, e, t, i) => {
6
- for (var o = i > 1 ? void 0 : i ? j(e, t) : e, a = n.length - 1, d; a >= 0; a--)
7
- (d = n[a]) && (o = (i ? d(e, t, o) : d(o)) || o);
8
- return i && o && R(e, t, o), o;
1
+ import { nothing as b, unsafeCSS as at, LitElement as lt } from "lit";
2
+ import { html as _, unsafeStatic as dt } from "lit/static-html.js";
3
+ import { property as v, query as ct } from "lit/decorators.js";
4
+ import { property as ht } from "lit/decorators/property.js";
5
+ var ut = Object.defineProperty, pt = Object.getOwnPropertyDescriptor, ft = (i, e, t, o) => {
6
+ for (var n = o > 1 ? void 0 : o ? pt(e, t) : e, r = i.length - 1, s; r >= 0; r--)
7
+ (s = i[r]) && (n = (o ? s(e, t, n) : s(n)) || n);
8
+ return o && n && ut(e, t, n), n;
9
9
  };
10
- const q = (n) => {
11
- class e extends n {
10
+ const gt = (i) => {
11
+ class e extends i {
12
12
  constructor() {
13
13
  super(...arguments), this.dir = "ltr";
14
14
  }
@@ -22,154 +22,1334 @@ const q = (n) => {
22
22
  * will not be reactive and is only computed once
23
23
  */
24
24
  get isRTL() {
25
- var i;
26
- return this.dir === "ltr" ? !1 : this.dir === "rtl" || ((i = window == null ? void 0 : window.getComputedStyle(this)) == null ? void 0 : i.direction) === "rtl";
25
+ var o;
26
+ return this.dir === "ltr" ? !1 : this.dir === "rtl" || ((o = window == null ? void 0 : window.getComputedStyle(this)) == null ? void 0 : o.direction) === "rtl";
27
27
  }
28
28
  }
29
- return I([
30
- F({ type: String, reflect: !0 })
29
+ return ft([
30
+ ht({ type: String, reflect: !0 })
31
31
  ], e.prototype, "dir", 2), e;
32
- }, B = (n, e, t) => function(o, a) {
33
- const d = `#${a}`;
34
- Object.defineProperty(o, a, {
32
+ }, _e = (i, e, t) => function(n, r) {
33
+ const s = `#${r}`;
34
+ Object.defineProperty(n, r, {
35
35
  get() {
36
- return this[d];
36
+ return this[s];
37
37
  },
38
- set(p) {
39
- const u = this[d];
40
- e.includes(p) ? this[d] = p : (console.error(
41
- `<${n}> Invalid value "${p}" provided for property "${a}".`,
38
+ set(l) {
39
+ const a = this[s];
40
+ e.includes(l) ? this[s] = l : (console.error(
41
+ `<${i}> Invalid value "${l}" provided for property "${r}".`,
42
42
  `Must be one of: ${e.join(" | ")}.`,
43
43
  `Falling back to default value: "${t}"`
44
- ), this[d] = t), this.requestUpdate(a, u);
44
+ ), this[s] = t), this.requestUpdate(r, a);
45
45
  }
46
46
  });
47
- }, V = (n) => function(t, i) {
48
- const o = `#${i}`;
49
- Object.defineProperty(t, i, {
47
+ }, vt = (i) => function(t, o) {
48
+ const n = `#${o}`;
49
+ Object.defineProperty(t, o, {
50
50
  get() {
51
- return this[o];
51
+ return this[n];
52
52
  },
53
- set(a) {
54
- const d = this[o];
55
- (a == null || typeof a == "string" && a.trim() === "") && console.error(`<${n}> Missing required attribute "${i}"`), this[o] = a, this.requestUpdate(i, d);
53
+ set(r) {
54
+ const s = this[n];
55
+ (r == null || typeof r == "string" && r.trim() === "") && console.error(`<${i}> Missing required attribute "${o}"`), this[n] = r, this.requestUpdate(o, s);
56
56
  }
57
57
  });
58
58
  };
59
- function N(n) {
60
- if (Array.isArray(n)) {
61
- for (var e = 0, t = Array(n.length); e < n.length; e++)
62
- t[e] = n[e];
59
+ function mt(i) {
60
+ if (Array.isArray(i)) {
61
+ for (var e = 0, t = Array(i.length); e < i.length; e++)
62
+ t[e] = i[e];
63
63
  return t;
64
64
  } else
65
- return Array.from(n);
65
+ return Array.from(i);
66
66
  }
67
- var O = !1;
67
+ var we = !1;
68
68
  if (typeof window < "u") {
69
- var S = {
69
+ var xe = {
70
70
  get passive() {
71
- O = !0;
71
+ we = !0;
72
72
  }
73
73
  };
74
- window.addEventListener("testPassive", null, S), window.removeEventListener("testPassive", null, S);
74
+ window.addEventListener("testPassive", null, xe), window.removeEventListener("testPassive", null, xe);
75
75
  }
76
- var w = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), m = [], k = !1, M = -1, f = void 0, c = void 0, v = void 0, $ = function(e) {
77
- return m.some(function(t) {
76
+ var Q = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), x = [], ee = !1, qe = -1, R = void 0, S = void 0, H = void 0, We = function(e) {
77
+ return x.some(function(t) {
78
78
  return !!(t.options.allowTouchMove && t.options.allowTouchMove(e));
79
79
  });
80
- }, x = function(e) {
80
+ }, te = function(e) {
81
81
  var t = e || window.event;
82
- return $(t.target) || t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
83
- }, H = function(e) {
84
- if (v === void 0) {
85
- var t = !!e && e.reserveScrollBarGap === !0, i = window.innerWidth - document.documentElement.clientWidth;
86
- if (t && i > 0) {
87
- var o = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
88
- v = document.body.style.paddingRight, document.body.style.paddingRight = o + i + "px";
82
+ return We(t.target) || t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
83
+ }, bt = function(e) {
84
+ if (H === void 0) {
85
+ var t = !!e && e.reserveScrollBarGap === !0, o = window.innerWidth - document.documentElement.clientWidth;
86
+ if (t && o > 0) {
87
+ var n = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"), 10);
88
+ H = document.body.style.paddingRight, document.body.style.paddingRight = n + o + "px";
89
89
  }
90
90
  }
91
- f === void 0 && (f = document.body.style.overflow, document.body.style.overflow = "hidden");
92
- }, W = function() {
93
- v !== void 0 && (document.body.style.paddingRight = v, v = void 0), f !== void 0 && (document.body.style.overflow = f, f = void 0);
94
- }, Y = function() {
91
+ R === void 0 && (R = document.body.style.overflow, document.body.style.overflow = "hidden");
92
+ }, yt = function() {
93
+ H !== void 0 && (document.body.style.paddingRight = H, H = void 0), R !== void 0 && (document.body.style.overflow = R, R = void 0);
94
+ }, _t = function() {
95
95
  return window.requestAnimationFrame(function() {
96
- if (c === void 0) {
97
- c = {
96
+ if (S === void 0) {
97
+ S = {
98
98
  position: document.body.style.position,
99
99
  top: document.body.style.top,
100
100
  left: document.body.style.left
101
101
  };
102
- var e = window, t = e.scrollY, i = e.scrollX, o = e.innerHeight;
103
- document.body.style.position = "fixed", document.body.style.top = -t, document.body.style.left = -i, setTimeout(function() {
102
+ var e = window, t = e.scrollY, o = e.scrollX, n = e.innerHeight;
103
+ document.body.style.position = "fixed", document.body.style.top = -t, document.body.style.left = -o, setTimeout(function() {
104
104
  return window.requestAnimationFrame(function() {
105
- var a = o - window.innerHeight;
106
- a && t >= o && (document.body.style.top = -(t + a));
105
+ var r = n - window.innerHeight;
106
+ r && t >= n && (document.body.style.top = -(t + r));
107
107
  });
108
108
  }, 300);
109
109
  }
110
110
  });
111
- }, U = function() {
112
- if (c !== void 0) {
111
+ }, wt = function() {
112
+ if (S !== void 0) {
113
113
  var e = -parseInt(document.body.style.top, 10), t = -parseInt(document.body.style.left, 10);
114
- document.body.style.position = c.position, document.body.style.top = c.top, document.body.style.left = c.left, window.scrollTo(t, e), c = void 0;
114
+ document.body.style.position = S.position, document.body.style.top = S.top, document.body.style.left = S.left, window.scrollTo(t, e), S = void 0;
115
115
  }
116
- }, X = function(e) {
116
+ }, $t = function(e) {
117
117
  return e ? e.scrollHeight - e.scrollTop <= e.clientHeight : !1;
118
- }, G = function(e, t) {
119
- var i = e.targetTouches[0].clientY - M;
120
- return $(e.target) ? !1 : t && t.scrollTop === 0 && i > 0 || X(t) && i < 0 ? x(e) : (e.stopPropagation(), !0);
121
- }, J = function(e, t) {
118
+ }, At = function(e, t) {
119
+ var o = e.targetTouches[0].clientY - qe;
120
+ return We(e.target) ? !1 : t && t.scrollTop === 0 && o > 0 || $t(t) && o < 0 ? te(e) : (e.stopPropagation(), !0);
121
+ }, Et = function(e, t) {
122
122
  if (!e) {
123
123
  console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
124
124
  return;
125
125
  }
126
- if (!m.some(function(o) {
127
- return o.targetElement === e;
126
+ if (!x.some(function(n) {
127
+ return n.targetElement === e;
128
128
  })) {
129
- var i = {
129
+ var o = {
130
130
  targetElement: e,
131
131
  options: t || {}
132
132
  };
133
- m = [].concat(N(m), [i]), w ? Y() : H(t), w && (e.ontouchstart = function(o) {
134
- o.targetTouches.length === 1 && (M = o.targetTouches[0].clientY);
135
- }, e.ontouchmove = function(o) {
136
- o.targetTouches.length === 1 && G(o, e);
137
- }, k || (document.addEventListener("touchmove", x, O ? { passive: !1 } : void 0), k = !0));
133
+ x = [].concat(mt(x), [o]), Q ? _t() : bt(t), Q && (e.ontouchstart = function(n) {
134
+ n.targetTouches.length === 1 && (qe = n.targetTouches[0].clientY);
135
+ }, e.ontouchmove = function(n) {
136
+ n.targetTouches.length === 1 && At(n, e);
137
+ }, ee || (document.addEventListener("touchmove", te, we ? { passive: !1 } : void 0), ee = !0));
138
138
  }
139
- }, Q = function(e) {
139
+ }, St = function(e) {
140
140
  if (!e) {
141
141
  console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");
142
142
  return;
143
143
  }
144
- m = m.filter(function(t) {
144
+ x = x.filter(function(t) {
145
145
  return t.targetElement !== e;
146
- }), w && (e.ontouchstart = null, e.ontouchmove = null, k && m.length === 0 && (document.removeEventListener("touchmove", x, O ? { passive: !1 } : void 0), k = !1)), w ? U() : W();
146
+ }), Q && (e.ontouchstart = null, e.ontouchmove = null, ee && x.length === 0 && (document.removeEventListener("touchmove", te, we ? { passive: !1 } : void 0), ee = !1)), Q ? wt() : yt();
147
+ };
148
+ function w(i, e, t, o) {
149
+ var n = arguments.length, r = n < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, s;
150
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
151
+ r = Reflect.decorate(i, e, t, o);
152
+ else
153
+ for (var l = i.length - 1; l >= 0; l--)
154
+ (s = i[l]) && (r = (n < 3 ? s(r) : n > 3 ? s(e, t, r) : s(e, t)) || r);
155
+ return n > 3 && r && Object.defineProperty(e, t, r), r;
156
+ }
157
+ /**
158
+ * @license
159
+ * Copyright 2019 Google LLC
160
+ * SPDX-License-Identifier: BSD-3-Clause
161
+ */
162
+ const J = window, $e = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ae = Symbol(), Ce = /* @__PURE__ */ new WeakMap();
163
+ let Ke = class {
164
+ constructor(e, t, o) {
165
+ if (this._$cssResult$ = !0, o !== Ae)
166
+ throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
167
+ this.cssText = e, this.t = t;
168
+ }
169
+ get styleSheet() {
170
+ let e = this.o;
171
+ const t = this.t;
172
+ if ($e && e === void 0) {
173
+ const o = t !== void 0 && t.length === 1;
174
+ o && (e = Ce.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), o && Ce.set(t, e));
175
+ }
176
+ return e;
177
+ }
178
+ toString() {
179
+ return this.cssText;
180
+ }
181
+ };
182
+ const kt = (i) => new Ke(typeof i == "string" ? i : i + "", void 0, Ae), Ee = (i, ...e) => {
183
+ const t = i.length === 1 ? i[0] : e.reduce((o, n, r) => o + ((s) => {
184
+ if (s._$cssResult$ === !0)
185
+ return s.cssText;
186
+ if (typeof s == "number")
187
+ return s;
188
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
189
+ })(n) + i[r + 1], i[0]);
190
+ return new Ke(t, i, Ae);
191
+ }, xt = (i, e) => {
192
+ $e ? i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet) : e.forEach((t) => {
193
+ const o = document.createElement("style"), n = J.litNonce;
194
+ n !== void 0 && o.setAttribute("nonce", n), o.textContent = t.cssText, i.appendChild(o);
195
+ });
196
+ }, Me = $e ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
197
+ let t = "";
198
+ for (const o of e.cssRules)
199
+ t += o.cssText;
200
+ return kt(t);
201
+ })(i) : i;
202
+ /**
203
+ * @license
204
+ * Copyright 2017 Google LLC
205
+ * SPDX-License-Identifier: BSD-3-Clause
206
+ */
207
+ var ae;
208
+ const ie = window, ze = ie.trustedTypes, Ct = ze ? ze.emptyScript : "", Oe = ie.reactiveElementPolyfillSupport, me = { toAttribute(i, e) {
209
+ switch (e) {
210
+ case Boolean:
211
+ i = i ? Ct : null;
212
+ break;
213
+ case Object:
214
+ case Array:
215
+ i = i == null ? i : JSON.stringify(i);
216
+ }
217
+ return i;
218
+ }, fromAttribute(i, e) {
219
+ let t = i;
220
+ switch (e) {
221
+ case Boolean:
222
+ t = i !== null;
223
+ break;
224
+ case Number:
225
+ t = i === null ? null : Number(i);
226
+ break;
227
+ case Object:
228
+ case Array:
229
+ try {
230
+ t = JSON.parse(i);
231
+ } catch {
232
+ t = null;
233
+ }
234
+ }
235
+ return t;
236
+ } }, Ye = (i, e) => e !== i && (e == e || i == i), le = { attribute: !0, type: String, converter: me, reflect: !1, hasChanged: Ye }, be = "finalized";
237
+ let O = class extends HTMLElement {
238
+ constructor() {
239
+ super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
240
+ }
241
+ static addInitializer(e) {
242
+ var t;
243
+ this.finalize(), ((t = this.h) !== null && t !== void 0 ? t : this.h = []).push(e);
244
+ }
245
+ static get observedAttributes() {
246
+ this.finalize();
247
+ const e = [];
248
+ return this.elementProperties.forEach((t, o) => {
249
+ const n = this._$Ep(o, t);
250
+ n !== void 0 && (this._$Ev.set(n, o), e.push(n));
251
+ }), e;
252
+ }
253
+ static createProperty(e, t = le) {
254
+ if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(e, t), !t.noAccessor && !this.prototype.hasOwnProperty(e)) {
255
+ const o = typeof e == "symbol" ? Symbol() : "__" + e, n = this.getPropertyDescriptor(e, o, t);
256
+ n !== void 0 && Object.defineProperty(this.prototype, e, n);
257
+ }
258
+ }
259
+ static getPropertyDescriptor(e, t, o) {
260
+ return { get() {
261
+ return this[t];
262
+ }, set(n) {
263
+ const r = this[e];
264
+ this[t] = n, this.requestUpdate(e, r, o);
265
+ }, configurable: !0, enumerable: !0 };
266
+ }
267
+ static getPropertyOptions(e) {
268
+ return this.elementProperties.get(e) || le;
269
+ }
270
+ static finalize() {
271
+ if (this.hasOwnProperty(be))
272
+ return !1;
273
+ this[be] = !0;
274
+ const e = Object.getPrototypeOf(this);
275
+ if (e.finalize(), e.h !== void 0 && (this.h = [...e.h]), this.elementProperties = new Map(e.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
276
+ const t = this.properties, o = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
277
+ for (const n of o)
278
+ this.createProperty(n, t[n]);
279
+ }
280
+ return this.elementStyles = this.finalizeStyles(this.styles), !0;
281
+ }
282
+ static finalizeStyles(e) {
283
+ const t = [];
284
+ if (Array.isArray(e)) {
285
+ const o = new Set(e.flat(1 / 0).reverse());
286
+ for (const n of o)
287
+ t.unshift(Me(n));
288
+ } else
289
+ e !== void 0 && t.push(Me(e));
290
+ return t;
291
+ }
292
+ static _$Ep(e, t) {
293
+ const o = t.attribute;
294
+ return o === !1 ? void 0 : typeof o == "string" ? o : typeof e == "string" ? e.toLowerCase() : void 0;
295
+ }
296
+ u() {
297
+ var e;
298
+ this._$E_ = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (e = this.constructor.h) === null || e === void 0 || e.forEach((t) => t(this));
299
+ }
300
+ addController(e) {
301
+ var t, o;
302
+ ((t = this._$ES) !== null && t !== void 0 ? t : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((o = e.hostConnected) === null || o === void 0 || o.call(e));
303
+ }
304
+ removeController(e) {
305
+ var t;
306
+ (t = this._$ES) === null || t === void 0 || t.splice(this._$ES.indexOf(e) >>> 0, 1);
307
+ }
308
+ _$Eg() {
309
+ this.constructor.elementProperties.forEach((e, t) => {
310
+ this.hasOwnProperty(t) && (this._$Ei.set(t, this[t]), delete this[t]);
311
+ });
312
+ }
313
+ createRenderRoot() {
314
+ var e;
315
+ const t = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
316
+ return xt(t, this.constructor.elementStyles), t;
317
+ }
318
+ connectedCallback() {
319
+ var e;
320
+ this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$ES) === null || e === void 0 || e.forEach((t) => {
321
+ var o;
322
+ return (o = t.hostConnected) === null || o === void 0 ? void 0 : o.call(t);
323
+ });
324
+ }
325
+ enableUpdating(e) {
326
+ }
327
+ disconnectedCallback() {
328
+ var e;
329
+ (e = this._$ES) === null || e === void 0 || e.forEach((t) => {
330
+ var o;
331
+ return (o = t.hostDisconnected) === null || o === void 0 ? void 0 : o.call(t);
332
+ });
333
+ }
334
+ attributeChangedCallback(e, t, o) {
335
+ this._$AK(e, o);
336
+ }
337
+ _$EO(e, t, o = le) {
338
+ var n;
339
+ const r = this.constructor._$Ep(e, o);
340
+ if (r !== void 0 && o.reflect === !0) {
341
+ const s = (((n = o.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? o.converter : me).toAttribute(t, o.type);
342
+ this._$El = e, s == null ? this.removeAttribute(r) : this.setAttribute(r, s), this._$El = null;
343
+ }
344
+ }
345
+ _$AK(e, t) {
346
+ var o;
347
+ const n = this.constructor, r = n._$Ev.get(e);
348
+ if (r !== void 0 && this._$El !== r) {
349
+ const s = n.getPropertyOptions(r), l = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((o = s.converter) === null || o === void 0 ? void 0 : o.fromAttribute) !== void 0 ? s.converter : me;
350
+ this._$El = r, this[r] = l.fromAttribute(t, s.type), this._$El = null;
351
+ }
352
+ }
353
+ requestUpdate(e, t, o) {
354
+ let n = !0;
355
+ e !== void 0 && (((o = o || this.constructor.getPropertyOptions(e)).hasChanged || Ye)(this[e], t) ? (this._$AL.has(e) || this._$AL.set(e, t), o.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, o))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
356
+ }
357
+ async _$Ej() {
358
+ this.isUpdatePending = !0;
359
+ try {
360
+ await this._$E_;
361
+ } catch (t) {
362
+ Promise.reject(t);
363
+ }
364
+ const e = this.scheduleUpdate();
365
+ return e != null && await e, !this.isUpdatePending;
366
+ }
367
+ scheduleUpdate() {
368
+ return this.performUpdate();
369
+ }
370
+ performUpdate() {
371
+ var e;
372
+ if (!this.isUpdatePending)
373
+ return;
374
+ this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, r) => this[r] = n), this._$Ei = void 0);
375
+ let t = !1;
376
+ const o = this._$AL;
377
+ try {
378
+ t = this.shouldUpdate(o), t ? (this.willUpdate(o), (e = this._$ES) === null || e === void 0 || e.forEach((n) => {
379
+ var r;
380
+ return (r = n.hostUpdate) === null || r === void 0 ? void 0 : r.call(n);
381
+ }), this.update(o)) : this._$Ek();
382
+ } catch (n) {
383
+ throw t = !1, this._$Ek(), n;
384
+ }
385
+ t && this._$AE(o);
386
+ }
387
+ willUpdate(e) {
388
+ }
389
+ _$AE(e) {
390
+ var t;
391
+ (t = this._$ES) === null || t === void 0 || t.forEach((o) => {
392
+ var n;
393
+ return (n = o.hostUpdated) === null || n === void 0 ? void 0 : n.call(o);
394
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
395
+ }
396
+ _$Ek() {
397
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
398
+ }
399
+ get updateComplete() {
400
+ return this.getUpdateComplete();
401
+ }
402
+ getUpdateComplete() {
403
+ return this._$E_;
404
+ }
405
+ shouldUpdate(e) {
406
+ return !0;
407
+ }
408
+ update(e) {
409
+ this._$EC !== void 0 && (this._$EC.forEach((t, o) => this._$EO(o, this[o], t)), this._$EC = void 0), this._$Ek();
410
+ }
411
+ updated(e) {
412
+ }
413
+ firstUpdated(e) {
414
+ }
147
415
  };
148
- const Z = `*,*:before,*:after{box-sizing:border-box}@keyframes rotate360{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.c-modal{--modal-size-s: 450px;--modal-size-m: 600px;--modal-size-l: 1080px;--modal-border-radius: var(--dt-radius-rounded-d);--modal-font: var(--dt-font-interactive-m-family);--modal-bg-color: var(--dt-color-container-default);--modal-elevation: var(--dt-elevation-04);border-radius:var(--modal-border-radius);border:none;box-shadow:var(--modal-elevation);font-family:var(--modal-font);background-color:var(--modal-bg-color);padding:0;--modal-margin-none: var(--dt-spacing-none);--modal-margin-small: var(--dt-spacing-g);--modal-margin-large: var(--dt-spacing-j);--modal-margin-block: var(--modal-margin-small);--modal-block-size: fit-content;--modal-inline-size: 75%;--modal-max-block-size: calc(100vh - calc(var(--modal-margin-block) * 2));--modal-max-inline-size: var(--modal-size-m);block-size:var(--modal-block-size);inline-size:var(--modal-inline-size);max-block-size:var(--modal-max-block-size);max-inline-size:var(--modal-max-inline-size)}.c-modal:focus-visible{outline:none}@media (max-width: 768px){.c-modal pie-icon-button{--btn-dimension: 40px}}.c-modal[open]{display:flex;flex-direction:column}@media (min-width: 768px){.c-modal{--modal-margin-block: var(--modal-margin-large)}}.c-modal[size=small]{--modal-max-inline-size: var(--modal-size-s)}@media (min-width: 768px){.c-modal[size=small]{--modal-margin-block: var(--modal-margin-large)}}@media (max-width: 767px){.c-modal[size=medium][isfullwidthbelowmid]{--modal-margin-block: var(--modal-margin-none);--modal-border-radius: var(--dt-radius-rounded-none);--modal-block-size: 100%;--modal-inline-size: 100%;--modal-max-inline-size: 100%}}.c-modal[size=large]{--modal-inline-size: 75%;--modal-max-inline-size: var(--modal-size-l);--modal-margin-block: var(--modal-margin-large)}@media (max-width: 767px){.c-modal[size=large]{--modal-margin-block: var(--modal-margin-none);--modal-border-radius: var(--dt-radius-rounded-none);--modal-block-size: 100%;--modal-inline-size: 100%}}.c-modal[position=top]{margin-block-start:var(--dt-spacing-j)}@media (max-width: 767px){.c-modal[position=top][isfullwidthbelowmid]{margin-block-start:var(--dt-spacing-none)}}.c-modal::backdrop{background:rgba(0,0,0,.5)}.c-modal .c-modal-footer{--modal-button-spacing: var(--dt-spacing-d);--modal-footer-padding: var(--dt-spacing-d);display:flex;flex-flow:row-reverse;flex-wrap:wrap;gap:var(--modal-button-spacing);padding:var(--modal-footer-padding)}@media (min-width: 768px){.c-modal .c-modal-footer{--modal-footer-padding: var(--dt-spacing-e)}}.c-modal .c-modal-header{padding-inline:var(--dt-spacing-d);padding-block:14px;display:grid;grid-template-areas:"back heading close" ". heading .";grid-template-columns:minmax(0,max-content) minmax(0,1fr) minmax(0,max-content);align-items:center}@media (min-width: 768px){.c-modal .c-modal-header{padding-inline:var(--dt-spacing-e);padding-block:20px}}.c-modal[hasbackbutton] .c-modal-header{padding-block:var(--dt-spacing-b);padding-inline-start:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[hasbackbutton] .c-modal-header{padding-block:var(--dt-spacing-c);padding-inline-start:var(--dt-spacing-c)}}.c-modal[isdismissible] .c-modal-header{padding-block:var(--dt-spacing-b);padding-inline-end:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[isdismissible] .c-modal-header{padding-block:var(--dt-spacing-c);padding-inline-end:var(--dt-spacing-c)}}.c-modal .c-modal-heading{--modal-header-font-size: calc(var(--dt-font-heading-m-size--wide) * 1px);--modal-header-font-line-height: calc(var(--dt-font-heading-m-line-height--wide) * 1px);--modal-header-font-weight: var(--dt-font-heading-m-weight);font-size:var(--modal-header-font-size);line-height:var(--modal-header-font-line-height);font-weight:var(--modal-header-font-weight);margin:0;grid-area:heading}.c-modal[hasbackbutton] .c-modal-heading{padding-inline-start:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[hasbackbutton] .c-modal-heading{padding-inline-start:var(--dt-spacing-c)}}.c-modal[isdismissible] .c-modal-heading{padding-inline-end:var(--dt-spacing-d)}@media (min-width: 768px){.c-modal[isdismissible] .c-modal-heading{padding-inline-end:var(--dt-spacing-e)}}.c-modal .c-modal-backBtn{grid-area:back}.c-modal .c-modal-closeBtn{grid-area:close}.c-modal .c-modal-content{--modal-content-font-size: calc(var(--dt-font-size-16) * 1px);--modal-content-font-weight: var(--dt-font-weight-regular);--modal-content-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--modal-content-padding: var(--dt-spacing-e);--modal-content-padding-block: var(--dt-spacing-a);--spinner-size: 48px;--spinner-border-width: 6px;--spinner-base-color-h: var(--dt-color-content-interactive-secondary-h);--spinner-base-color-s: var(--dt-color-content-interactive-secondary-s);--spinner-base-color-l: var(--dt-color-content-interactive-secondary-l);--spinner-left-color-opacity: .35;--spinner-left-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), var(--spinner-left-color-opacity));--spinner-right-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), 1);--spinner-animation-duration: 1.15s;--spinner-animation-timing-function: linear;--spinner-animation-iteration-count: infinite;position:relative;min-block-size:var(--dt-spacing-j);font-size:var(--modal-content-font-size);line-height:var(--modal-content-line-height);font-weight:var(--modal-content-font-weight);padding-inline:var(--modal-content-padding);padding-block:var(--modal-content-padding-block);overflow-y:auto}.c-modal .c-modal-content--scrollable{background:linear-gradient(to bottom,transparent,var(--dt-color-container-default) 75%) center bottom,linear-gradient(transparent,var(--dt-color-border-strong)) center bottom;background-repeat:no-repeat;background-size:100% 48px,100% 12px;background-attachment:local,scroll}.c-modal .c-modal-content:before{content:"";position:absolute;left:50%;top:50%;translate:-50% -50%;height:var(--spinner-size);width:var(--spinner-size);display:block;background-color:transparent;border-radius:50%;border-color:var(--spinner-left-color) var(--spinner-right-color) var(--spinner-right-color) var(--spinner-left-color);border-width:var(--spinner-border-width);border-style:solid;will-change:transform;opacity:0}.c-modal[isLoading] .c-modal-content:before{animation:rotate360 var(--spinner-animation-duration) var(--spinner-animation-timing-function) var(--spinner-animation-iteration-count);opacity:1}.c-modal[isLoading] .c-modal-content .c-modal-contentInner{opacity:0}
149
- `, K = ["h1", "h2", "h3", "h4", "h5", "h6"], ee = ["small", "medium", "large"], te = ["top", "center"], _ = "pie-modal-close", y = "pie-modal-open", z = "pie-modal-back";
150
- var oe = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, l = (n, e, t, i) => {
151
- for (var o = i > 1 ? void 0 : i ? ie(e, t) : e, a = n.length - 1, d; a >= 0; a--)
152
- (d = n[a]) && (o = (i ? d(e, t, o) : d(o)) || o);
153
- return i && o && oe(e, t, o), o;
416
+ O[be] = !0, O.elementProperties = /* @__PURE__ */ new Map(), O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, Oe == null || Oe({ ReactiveElement: O }), ((ae = ie.reactiveElementVersions) !== null && ae !== void 0 ? ae : ie.reactiveElementVersions = []).push("1.6.2");
417
+ /**
418
+ * @license
419
+ * Copyright 2017 Google LLC
420
+ * SPDX-License-Identifier: BSD-3-Clause
421
+ */
422
+ var de;
423
+ const oe = window, D = oe.trustedTypes, Pe = D ? D.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ye = "$lit$", $ = `lit$${(Math.random() + "").slice(9)}$`, Ze = "?" + $, Mt = `<${Ze}>`, M = document, F = () => M.createComment(""), j = (i) => i === null || typeof i != "object" && typeof i != "function", Xe = Array.isArray, zt = (i) => Xe(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", ce = `[
424
+ \f\r]`, N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, De = /-->/g, Le = />/g, E = RegExp(`>|${ce}(?:([^\\s"'>=/]+)(${ce}*=${ce}*(?:[^
425
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Te = /'/g, Ie = /"/g, Ge = /^(?:script|style|textarea|title)$/i, Ot = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), Se = Ot(1), L = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), Be = /* @__PURE__ */ new WeakMap(), k = M.createTreeWalker(M, 129, null, !1), Pt = (i, e) => {
426
+ const t = i.length - 1, o = [];
427
+ let n, r = e === 2 ? "<svg>" : "", s = N;
428
+ for (let a = 0; a < t; a++) {
429
+ const d = i[a];
430
+ let y, h, u = -1, m = 0;
431
+ for (; m < d.length && (s.lastIndex = m, h = s.exec(d), h !== null); )
432
+ m = s.lastIndex, s === N ? h[1] === "!--" ? s = De : h[1] !== void 0 ? s = Le : h[2] !== void 0 ? (Ge.test(h[2]) && (n = RegExp("</" + h[2], "g")), s = E) : h[3] !== void 0 && (s = E) : s === E ? h[0] === ">" ? (s = n ?? N, u = -1) : h[1] === void 0 ? u = -2 : (u = s.lastIndex - h[2].length, y = h[1], s = h[3] === void 0 ? E : h[3] === '"' ? Ie : Te) : s === Ie || s === Te ? s = E : s === De || s === Le ? s = N : (s = E, n = void 0);
433
+ const A = s === E && i[a + 1].startsWith("/>") ? " " : "";
434
+ r += s === N ? d + Mt : u >= 0 ? (o.push(y), d.slice(0, u) + ye + d.slice(u) + $ + A) : d + $ + (u === -2 ? (o.push(void 0), a) : A);
435
+ }
436
+ const l = r + (i[t] || "<?>") + (e === 2 ? "</svg>" : "");
437
+ if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
438
+ throw Error("invalid template strings array");
439
+ return [Pe !== void 0 ? Pe.createHTML(l) : l, o];
440
+ };
441
+ class V {
442
+ constructor({ strings: e, _$litType$: t }, o) {
443
+ let n;
444
+ this.parts = [];
445
+ let r = 0, s = 0;
446
+ const l = e.length - 1, a = this.parts, [d, y] = Pt(e, t);
447
+ if (this.el = V.createElement(d, o), k.currentNode = this.el.content, t === 2) {
448
+ const h = this.el.content, u = h.firstChild;
449
+ u.remove(), h.append(...u.childNodes);
450
+ }
451
+ for (; (n = k.nextNode()) !== null && a.length < l; ) {
452
+ if (n.nodeType === 1) {
453
+ if (n.hasAttributes()) {
454
+ const h = [];
455
+ for (const u of n.getAttributeNames())
456
+ if (u.endsWith(ye) || u.startsWith($)) {
457
+ const m = y[s++];
458
+ if (h.push(u), m !== void 0) {
459
+ const A = n.getAttribute(m.toLowerCase() + ye).split($), X = /([.?@])?(.*)/.exec(m);
460
+ a.push({ type: 1, index: r, name: X[2], strings: A, ctor: X[1] === "." ? Lt : X[1] === "?" ? It : X[1] === "@" ? Bt : se });
461
+ } else
462
+ a.push({ type: 6, index: r });
463
+ }
464
+ for (const u of h)
465
+ n.removeAttribute(u);
466
+ }
467
+ if (Ge.test(n.tagName)) {
468
+ const h = n.textContent.split($), u = h.length - 1;
469
+ if (u > 0) {
470
+ n.textContent = D ? D.emptyScript : "";
471
+ for (let m = 0; m < u; m++)
472
+ n.append(h[m], F()), k.nextNode(), a.push({ type: 2, index: ++r });
473
+ n.append(h[u], F());
474
+ }
475
+ }
476
+ } else if (n.nodeType === 8)
477
+ if (n.data === Ze)
478
+ a.push({ type: 2, index: r });
479
+ else {
480
+ let h = -1;
481
+ for (; (h = n.data.indexOf($, h + 1)) !== -1; )
482
+ a.push({ type: 7, index: r }), h += $.length - 1;
483
+ }
484
+ r++;
485
+ }
486
+ }
487
+ static createElement(e, t) {
488
+ const o = M.createElement("template");
489
+ return o.innerHTML = e, o;
490
+ }
491
+ }
492
+ function T(i, e, t = i, o) {
493
+ var n, r, s, l;
494
+ if (e === L)
495
+ return e;
496
+ let a = o !== void 0 ? (n = t._$Co) === null || n === void 0 ? void 0 : n[o] : t._$Cl;
497
+ const d = j(e) ? void 0 : e._$litDirective$;
498
+ return (a == null ? void 0 : a.constructor) !== d && ((r = a == null ? void 0 : a._$AO) === null || r === void 0 || r.call(a, !1), d === void 0 ? a = void 0 : (a = new d(i), a._$AT(i, t, o)), o !== void 0 ? ((s = (l = t)._$Co) !== null && s !== void 0 ? s : l._$Co = [])[o] = a : t._$Cl = a), a !== void 0 && (e = T(i, a._$AS(i, e.values), a, o)), e;
499
+ }
500
+ class Dt {
501
+ constructor(e, t) {
502
+ this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
503
+ }
504
+ get parentNode() {
505
+ return this._$AM.parentNode;
506
+ }
507
+ get _$AU() {
508
+ return this._$AM._$AU;
509
+ }
510
+ u(e) {
511
+ var t;
512
+ const { el: { content: o }, parts: n } = this._$AD, r = ((t = e == null ? void 0 : e.creationScope) !== null && t !== void 0 ? t : M).importNode(o, !0);
513
+ k.currentNode = r;
514
+ let s = k.nextNode(), l = 0, a = 0, d = n[0];
515
+ for (; d !== void 0; ) {
516
+ if (l === d.index) {
517
+ let y;
518
+ d.type === 2 ? y = new q(s, s.nextSibling, this, e) : d.type === 1 ? y = new d.ctor(s, d.name, d.strings, this, e) : d.type === 6 && (y = new Nt(s, this, e)), this._$AV.push(y), d = n[++a];
519
+ }
520
+ l !== (d == null ? void 0 : d.index) && (s = k.nextNode(), l++);
521
+ }
522
+ return k.currentNode = M, r;
523
+ }
524
+ v(e) {
525
+ let t = 0;
526
+ for (const o of this._$AV)
527
+ o !== void 0 && (o.strings !== void 0 ? (o._$AI(e, o, t), t += o.strings.length - 2) : o._$AI(e[t])), t++;
528
+ }
529
+ }
530
+ class q {
531
+ constructor(e, t, o, n) {
532
+ var r;
533
+ this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = o, this.options = n, this._$Cp = (r = n == null ? void 0 : n.isConnected) === null || r === void 0 || r;
534
+ }
535
+ get _$AU() {
536
+ var e, t;
537
+ return (t = (e = this._$AM) === null || e === void 0 ? void 0 : e._$AU) !== null && t !== void 0 ? t : this._$Cp;
538
+ }
539
+ get parentNode() {
540
+ let e = this._$AA.parentNode;
541
+ const t = this._$AM;
542
+ return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e;
543
+ }
544
+ get startNode() {
545
+ return this._$AA;
546
+ }
547
+ get endNode() {
548
+ return this._$AB;
549
+ }
550
+ _$AI(e, t = this) {
551
+ e = T(this, e, t), j(e) ? e === p || e == null || e === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : e !== this._$AH && e !== L && this._(e) : e._$litType$ !== void 0 ? this.g(e) : e.nodeType !== void 0 ? this.$(e) : zt(e) ? this.T(e) : this._(e);
552
+ }
553
+ k(e) {
554
+ return this._$AA.parentNode.insertBefore(e, this._$AB);
555
+ }
556
+ $(e) {
557
+ this._$AH !== e && (this._$AR(), this._$AH = this.k(e));
558
+ }
559
+ _(e) {
560
+ this._$AH !== p && j(this._$AH) ? this._$AA.nextSibling.data = e : this.$(M.createTextNode(e)), this._$AH = e;
561
+ }
562
+ g(e) {
563
+ var t;
564
+ const { values: o, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = V.createElement(n.h, this.options)), n);
565
+ if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === r)
566
+ this._$AH.v(o);
567
+ else {
568
+ const s = new Dt(r, this), l = s.u(this.options);
569
+ s.v(o), this.$(l), this._$AH = s;
570
+ }
571
+ }
572
+ _$AC(e) {
573
+ let t = Be.get(e.strings);
574
+ return t === void 0 && Be.set(e.strings, t = new V(e)), t;
575
+ }
576
+ T(e) {
577
+ Xe(this._$AH) || (this._$AH = [], this._$AR());
578
+ const t = this._$AH;
579
+ let o, n = 0;
580
+ for (const r of e)
581
+ n === t.length ? t.push(o = new q(this.k(F()), this.k(F()), this, this.options)) : o = t[n], o._$AI(r), n++;
582
+ n < t.length && (this._$AR(o && o._$AB.nextSibling, n), t.length = n);
583
+ }
584
+ _$AR(e = this._$AA.nextSibling, t) {
585
+ var o;
586
+ for ((o = this._$AP) === null || o === void 0 || o.call(this, !1, !0, t); e && e !== this._$AB; ) {
587
+ const n = e.nextSibling;
588
+ e.remove(), e = n;
589
+ }
590
+ }
591
+ setConnected(e) {
592
+ var t;
593
+ this._$AM === void 0 && (this._$Cp = e, (t = this._$AP) === null || t === void 0 || t.call(this, e));
594
+ }
595
+ }
596
+ class se {
597
+ constructor(e, t, o, n, r) {
598
+ this.type = 1, this._$AH = p, this._$AN = void 0, this.element = e, this.name = t, this._$AM = n, this.options = r, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = p;
599
+ }
600
+ get tagName() {
601
+ return this.element.tagName;
602
+ }
603
+ get _$AU() {
604
+ return this._$AM._$AU;
605
+ }
606
+ _$AI(e, t = this, o, n) {
607
+ const r = this.strings;
608
+ let s = !1;
609
+ if (r === void 0)
610
+ e = T(this, e, t, 0), s = !j(e) || e !== this._$AH && e !== L, s && (this._$AH = e);
611
+ else {
612
+ const l = e;
613
+ let a, d;
614
+ for (e = r[0], a = 0; a < r.length - 1; a++)
615
+ d = T(this, l[o + a], t, a), d === L && (d = this._$AH[a]), s || (s = !j(d) || d !== this._$AH[a]), d === p ? e = p : e !== p && (e += (d ?? "") + r[a + 1]), this._$AH[a] = d;
616
+ }
617
+ s && !n && this.j(e);
618
+ }
619
+ j(e) {
620
+ e === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
621
+ }
622
+ }
623
+ class Lt extends se {
624
+ constructor() {
625
+ super(...arguments), this.type = 3;
626
+ }
627
+ j(e) {
628
+ this.element[this.name] = e === p ? void 0 : e;
629
+ }
630
+ }
631
+ const Tt = D ? D.emptyScript : "";
632
+ class It extends se {
633
+ constructor() {
634
+ super(...arguments), this.type = 4;
635
+ }
636
+ j(e) {
637
+ e && e !== p ? this.element.setAttribute(this.name, Tt) : this.element.removeAttribute(this.name);
638
+ }
639
+ }
640
+ class Bt extends se {
641
+ constructor(e, t, o, n, r) {
642
+ super(e, t, o, n, r), this.type = 5;
643
+ }
644
+ _$AI(e, t = this) {
645
+ var o;
646
+ if ((e = (o = T(this, e, t, 0)) !== null && o !== void 0 ? o : p) === L)
647
+ return;
648
+ const n = this._$AH, r = e === p && n !== p || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, s = e !== p && (n === p || r);
649
+ r && this.element.removeEventListener(this.name, this, n), s && this.element.addEventListener(this.name, this, e), this._$AH = e;
650
+ }
651
+ handleEvent(e) {
652
+ var t, o;
653
+ typeof this._$AH == "function" ? this._$AH.call((o = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && o !== void 0 ? o : this.element, e) : this._$AH.handleEvent(e);
654
+ }
655
+ }
656
+ class Nt {
657
+ constructor(e, t, o) {
658
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = o;
659
+ }
660
+ get _$AU() {
661
+ return this._$AM._$AU;
662
+ }
663
+ _$AI(e) {
664
+ T(this, e);
665
+ }
666
+ }
667
+ const Ne = oe.litHtmlPolyfillSupport;
668
+ Ne == null || Ne(V, q), ((de = oe.litHtmlVersions) !== null && de !== void 0 ? de : oe.litHtmlVersions = []).push("2.7.4");
669
+ const Rt = (i, e, t) => {
670
+ var o, n;
671
+ const r = (o = t == null ? void 0 : t.renderBefore) !== null && o !== void 0 ? o : e;
672
+ let s = r._$litPart$;
673
+ if (s === void 0) {
674
+ const l = (n = t == null ? void 0 : t.renderBefore) !== null && n !== void 0 ? n : null;
675
+ r._$litPart$ = s = new q(e.insertBefore(F(), l), l, void 0, t ?? {});
676
+ }
677
+ return s._$AI(i), s;
154
678
  };
155
- const b = "pie-modal";
156
- class r extends q(D) {
679
+ /**
680
+ * @license
681
+ * Copyright 2017 Google LLC
682
+ * SPDX-License-Identifier: BSD-3-Clause
683
+ */
684
+ var he, ue;
685
+ class C extends O {
157
686
  constructor() {
158
- super(), this.headingLevel = "h2", this.isDismissible = !1, this.hasBackButton = !1, this.isFullWidthBelowMid = !1, this.isOpen = !1, this.isLoading = !1, this.size = "medium", this.position = "center", this._backButtonClicked = !1, this._handleDialogCancelEvent = (e) => {
687
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
688
+ }
689
+ createRenderRoot() {
690
+ var e, t;
691
+ const o = super.createRenderRoot();
692
+ return (e = (t = this.renderOptions).renderBefore) !== null && e !== void 0 || (t.renderBefore = o.firstChild), o;
693
+ }
694
+ update(e) {
695
+ const t = this.render();
696
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Rt(t, this.renderRoot, this.renderOptions);
697
+ }
698
+ connectedCallback() {
699
+ var e;
700
+ super.connectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!0);
701
+ }
702
+ disconnectedCallback() {
703
+ var e;
704
+ super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
705
+ }
706
+ render() {
707
+ return L;
708
+ }
709
+ }
710
+ C.finalized = !0, C._$litElement$ = !0, (he = globalThis.litElementHydrateSupport) === null || he === void 0 || he.call(globalThis, { LitElement: C });
711
+ const Re = globalThis.litElementPolyfillSupport;
712
+ Re == null || Re({ LitElement: C });
713
+ ((ue = globalThis.litElementVersions) !== null && ue !== void 0 ? ue : globalThis.litElementVersions = []).push("3.3.2");
714
+ /**
715
+ * @license
716
+ * Copyright 2017 Google LLC
717
+ * SPDX-License-Identifier: BSD-3-Clause
718
+ */
719
+ const Ht = (i, e) => e.kind === "method" && e.descriptor && !("value" in e.descriptor) ? { ...e, finisher(t) {
720
+ t.createProperty(e.key, i);
721
+ } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e.key, initializer() {
722
+ typeof e.initializer == "function" && (this[e.key] = e.initializer.call(this));
723
+ }, finisher(t) {
724
+ t.createProperty(e.key, i);
725
+ } }, Ut = (i, e, t) => {
726
+ e.constructor.createProperty(t, i);
727
+ };
728
+ function B(i) {
729
+ return (e, t) => t !== void 0 ? Ut(i, e, t) : Ht(i, e);
730
+ }
731
+ /**
732
+ * @license
733
+ * Copyright 2017 Google LLC
734
+ * SPDX-License-Identifier: BSD-3-Clause
735
+ */
736
+ const Ft = ({ finisher: i, descriptor: e }) => (t, o) => {
737
+ var n;
738
+ if (o === void 0) {
739
+ const r = (n = t.originalKey) !== null && n !== void 0 ? n : t.key, s = e != null ? { kind: "method", placement: "prototype", key: r, descriptor: e(t.key) } : { ...t, key: r };
740
+ return i != null && (s.finisher = function(l) {
741
+ i(l, r);
742
+ }), s;
743
+ }
744
+ {
745
+ const r = t.constructor;
746
+ e !== void 0 && Object.defineProperty(t, o, e(o)), i == null || i(r, o);
747
+ }
748
+ };
749
+ /**
750
+ * @license
751
+ * Copyright 2017 Google LLC
752
+ * SPDX-License-Identifier: BSD-3-Clause
753
+ */
754
+ function ke(i, e) {
755
+ return Ft({ descriptor: (t) => {
756
+ const o = { get() {
757
+ var n, r;
758
+ return (r = (n = this.renderRoot) === null || n === void 0 ? void 0 : n.querySelector(i)) !== null && r !== void 0 ? r : null;
759
+ }, enumerable: !0, configurable: !0 };
760
+ if (e) {
761
+ const n = typeof t == "symbol" ? Symbol() : "__" + t;
762
+ o.get = function() {
763
+ var r, s;
764
+ return this[n] === void 0 && (this[n] = (s = (r = this.renderRoot) === null || r === void 0 ? void 0 : r.querySelector(i)) !== null && s !== void 0 ? s : null), this[n];
765
+ };
766
+ }
767
+ return o;
768
+ } });
769
+ }
770
+ /**
771
+ * @license
772
+ * Copyright 2021 Google LLC
773
+ * SPDX-License-Identifier: BSD-3-Clause
774
+ */
775
+ var pe;
776
+ ((pe = window.HTMLSlotElement) === null || pe === void 0 ? void 0 : pe.prototype.assignedElements) != null;
777
+ const ne = {
778
+ xs: 16,
779
+ s: 20,
780
+ m: 24,
781
+ l: 28,
782
+ xl: 32,
783
+ xxl: 40
784
+ }, Je = Object.keys(ne), Qe = "xs", et = 8, re = 32;
785
+ function jt(i, e, t) {
786
+ const o = parseInt(i, 10), n = o % t === 0;
787
+ return o >= e && n;
788
+ }
789
+ const tt = {
790
+ large: (i) => jt(i, re, et),
791
+ regular: (i) => Je.includes(i)
792
+ };
793
+ function Vt(i) {
794
+ const e = tt.large(i);
795
+ return { isValid: e, size: e ? i : re };
796
+ }
797
+ function qt(i) {
798
+ const e = tt.regular(i), t = e ? ne[i] : ne[Qe];
799
+ return { isValid: e, size: t };
800
+ }
801
+ const I = (i, e, t, o) => {
802
+ const n = i.endsWith("Large") || i.endsWith("-large");
803
+ let r, s;
804
+ if (t) {
805
+ if ({ isValid: r, size: s } = n ? Vt(t) : qt(t), !r) {
806
+ const l = n ? `Invalid prop "size" value supplied to "${o}". The prop value should be a number equal or greater than ${re} and multiple of ${et}.` : `Invalid prop "size" value supplied to "${o}". The prop value should be one of the following values: ${Je.join(", ")}.`;
807
+ console.error(l);
808
+ }
809
+ } else
810
+ s = n ? re : ne[Qe];
811
+ return {
812
+ class: [i, e].filter(Boolean).join(" "),
813
+ width: s,
814
+ height: s
815
+ };
816
+ }, He = "icon-close";
817
+ class W extends C {
818
+ constructor() {
819
+ super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--close";
820
+ }
821
+ connectedCallback() {
822
+ var e, t, o;
823
+ if (super.connectedCallback(), ((e = this._svg) === null || e === void 0 ? void 0 : e.getAttribute("width")) === null) {
824
+ const n = I("c-pieIcon c-pieIcon--close", "", null, "IconClose");
825
+ (t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height);
826
+ }
827
+ }
828
+ updated(e) {
829
+ var t, o;
830
+ let n;
831
+ e.has("size") && (n = I("c-pieIcon c-pieIcon--close", "", this.size, "IconClose"), (t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height));
832
+ }
833
+ render() {
834
+ return Se`<svg xmlns="http://www.w3.org/2000/svg" role="presentation" focusable="false" fill="currentColor" viewBox="0 0 16 16" class="c-pieIcon c-pieIcon--close"><path d="M11.868 3.205 8 7.072 4.133 3.205l-.928.927L7.073 8l-3.868 3.867.928.928L8 8.927l3.868 3.868.927-.928L8.928 8l3.867-3.868-.927-.927Z"></path></svg>`;
835
+ }
836
+ }
837
+ W.styles = Ee`
838
+ :host-context(pie-icon-button) svg,
839
+ :host-context(pie-button) svg {
840
+ display: block;
841
+ width: var(--btn-icon-size);
842
+ height: var(--btn-icon-size);
843
+ }
844
+ `;
845
+ w([
846
+ B({ type: String, reflect: !0 })
847
+ ], W.prototype, "size", void 0);
848
+ w([
849
+ B({ type: String, reflect: !0 })
850
+ ], W.prototype, "class", void 0);
851
+ w([
852
+ ke("svg")
853
+ ], W.prototype, "_svg", void 0);
854
+ customElements.get(He) === void 0 && customElements.define(He, W);
855
+ const Ue = "icon-chevron-left";
856
+ class K extends C {
857
+ constructor() {
858
+ super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--chevronLeft";
859
+ }
860
+ connectedCallback() {
861
+ var e, t, o;
862
+ if (super.connectedCallback(), ((e = this._svg) === null || e === void 0 ? void 0 : e.getAttribute("width")) === null) {
863
+ const n = I("c-pieIcon c-pieIcon--chevronLeft", "", null, "IconChevronLeft");
864
+ (t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height);
865
+ }
866
+ }
867
+ updated(e) {
868
+ var t, o;
869
+ let n;
870
+ e.has("size") && (n = I("c-pieIcon c-pieIcon--chevronLeft", "", this.size, "IconChevronLeft"), (t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height));
871
+ }
872
+ render() {
873
+ return Se`<svg xmlns="http://www.w3.org/2000/svg" role="presentation" focusable="false" fill="currentColor" viewBox="0 0 16 16" class="c-pieIcon c-pieIcon--chevronLeft"><path d="M10.96 2.82 5.605 8l5.399 5.197-.875.963-5.565-5.364a1.164 1.164 0 0 1 0-1.671l5.495-5.25.901.945Z"></path></svg>`;
874
+ }
875
+ }
876
+ K.styles = Ee`
877
+ :host-context(pie-icon-button) svg,
878
+ :host-context(pie-button) svg {
879
+ display: block;
880
+ width: var(--btn-icon-size);
881
+ height: var(--btn-icon-size);
882
+ }
883
+ `;
884
+ w([
885
+ B({ type: String, reflect: !0 })
886
+ ], K.prototype, "size", void 0);
887
+ w([
888
+ B({ type: String, reflect: !0 })
889
+ ], K.prototype, "class", void 0);
890
+ w([
891
+ ke("svg")
892
+ ], K.prototype, "_svg", void 0);
893
+ customElements.get(Ue) === void 0 && customElements.define(Ue, K);
894
+ const Fe = "icon-chevron-right";
895
+ class Y extends C {
896
+ constructor() {
897
+ super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--chevronRight";
898
+ }
899
+ connectedCallback() {
900
+ var e, t, o;
901
+ if (super.connectedCallback(), ((e = this._svg) === null || e === void 0 ? void 0 : e.getAttribute("width")) === null) {
902
+ const n = I("c-pieIcon c-pieIcon--chevronRight", "", null, "IconChevronRight");
903
+ (t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height);
904
+ }
905
+ }
906
+ updated(e) {
907
+ var t, o;
908
+ let n;
909
+ e.has("size") && (n = I("c-pieIcon c-pieIcon--chevronRight", "", this.size, "IconChevronRight"), (t = this._svg) === null || t === void 0 || t.setAttribute("width", n.width), (o = this._svg) === null || o === void 0 || o.setAttribute("height", n.height));
910
+ }
911
+ render() {
912
+ return Se`<svg xmlns="http://www.w3.org/2000/svg" role="presentation" focusable="false" fill="currentColor" viewBox="0 0 16 16" class="c-pieIcon c-pieIcon--chevronRight"><path d="M5.044 13.18 10.399 8 5 2.82l.875-.962 5.539 5.346a1.164 1.164 0 0 1 0 1.636l-5.469 5.285-.901-.945Z"></path></svg>`;
913
+ }
914
+ }
915
+ Y.styles = Ee`
916
+ :host-context(pie-icon-button) svg,
917
+ :host-context(pie-button) svg {
918
+ display: block;
919
+ width: var(--btn-icon-size);
920
+ height: var(--btn-icon-size);
921
+ }
922
+ `;
923
+ w([
924
+ B({ type: String, reflect: !0 })
925
+ ], Y.prototype, "size", void 0);
926
+ w([
927
+ B({ type: String, reflect: !0 })
928
+ ], Y.prototype, "class", void 0);
929
+ w([
930
+ ke("svg")
931
+ ], Y.prototype, "_svg", void 0);
932
+ customElements.get(Fe) === void 0 && customElements.define(Fe, Y);
933
+ var P = window.CustomEvent;
934
+ (!P || typeof P == "object") && (P = function(e, t) {
935
+ t = t || {};
936
+ var o = document.createEvent("CustomEvent");
937
+ return o.initCustomEvent(e, !!t.bubbles, !!t.cancelable, t.detail || null), o;
938
+ }, P.prototype = window.Event.prototype);
939
+ function it(i, e) {
940
+ var t = "on" + e.type.toLowerCase();
941
+ return typeof i[t] == "function" && i[t](e), i.dispatchEvent(e);
942
+ }
943
+ function Wt(i) {
944
+ for (; i && i !== document.body; ) {
945
+ var e = window.getComputedStyle(i), t = function(o, n) {
946
+ return !(e[o] === void 0 || e[o] === n);
947
+ };
948
+ if (e.opacity < 1 || t("zIndex", "auto") || t("transform", "none") || t("mixBlendMode", "normal") || t("filter", "none") || t("perspective", "none") || e.isolation === "isolate" || e.position === "fixed" || e.webkitOverflowScrolling === "touch")
949
+ return !0;
950
+ i = i.parentElement;
951
+ }
952
+ return !1;
953
+ }
954
+ function U(i) {
955
+ for (; i; ) {
956
+ if (i.localName === "dialog")
957
+ return (
958
+ /** @type {HTMLDialogElement} */
959
+ i
960
+ );
961
+ i.parentElement ? i = i.parentElement : i.parentNode ? i = i.parentNode.host : i = null;
962
+ }
963
+ return null;
964
+ }
965
+ function ot(i) {
966
+ for (; i && i.shadowRoot && i.shadowRoot.activeElement; )
967
+ i = i.shadowRoot.activeElement;
968
+ i && i.blur && i !== document.body && i.blur();
969
+ }
970
+ function Kt(i, e) {
971
+ for (var t = 0; t < i.length; ++t)
972
+ if (i[t] === e)
973
+ return !0;
974
+ return !1;
975
+ }
976
+ function fe(i) {
977
+ return !i || !i.hasAttribute("method") ? !1 : i.getAttribute("method").toLowerCase() === "dialog";
978
+ }
979
+ function nt(i) {
980
+ var e = ["button", "input", "keygen", "select", "textarea"], t = e.map(function(s) {
981
+ return s + ":not([disabled])";
982
+ });
983
+ t.push('[tabindex]:not([disabled]):not([tabindex=""])');
984
+ var o = i.querySelector(t.join(", "));
985
+ if (!o && "attachShadow" in Element.prototype)
986
+ for (var n = i.querySelectorAll("*"), r = 0; r < n.length && !(n[r].tagName && n[r].shadowRoot && (o = nt(n[r].shadowRoot), o)); r++)
987
+ ;
988
+ return o;
989
+ }
990
+ function je(i) {
991
+ return i.isConnected || document.body.contains(i);
992
+ }
993
+ function rt(i) {
994
+ if (i.submitter)
995
+ return i.submitter;
996
+ var e = i.target;
997
+ if (!(e instanceof HTMLFormElement))
998
+ return null;
999
+ var t = c.formSubmitter;
1000
+ if (!t) {
1001
+ var o = i.target, n = "getRootNode" in o && o.getRootNode() || document;
1002
+ t = n.activeElement;
1003
+ }
1004
+ return !t || t.form !== e ? null : t;
1005
+ }
1006
+ function Yt(i) {
1007
+ if (!i.defaultPrevented) {
1008
+ var e = (
1009
+ /** @type {!HTMLFormElement} */
1010
+ i.target
1011
+ ), t = c.imagemapUseValue, o = rt(i);
1012
+ t === null && o && (t = o.value);
1013
+ var n = U(e);
1014
+ if (n) {
1015
+ var r = o && o.getAttribute("formmethod") || e.getAttribute("method");
1016
+ r === "dialog" && (i.preventDefault(), t != null ? n.close(t) : n.close());
1017
+ }
1018
+ }
1019
+ }
1020
+ function st(i) {
1021
+ if (this.dialog_ = i, this.replacedStyleTop_ = !1, this.openAsModal_ = !1, i.hasAttribute("role") || i.setAttribute("role", "dialog"), i.show = this.show.bind(this), i.showModal = this.showModal.bind(this), i.close = this.close.bind(this), i.addEventListener("submit", Yt, !1), "returnValue" in i || (i.returnValue = ""), "MutationObserver" in window) {
1022
+ var e = new MutationObserver(this.maybeHideModal.bind(this));
1023
+ e.observe(i, { attributes: !0, attributeFilter: ["open"] });
1024
+ } else {
1025
+ var t = !1, o = function() {
1026
+ t ? this.downgradeModal() : this.maybeHideModal(), t = !1;
1027
+ }.bind(this), n, r = function(s) {
1028
+ if (s.target === i) {
1029
+ var l = "DOMNodeRemoved";
1030
+ t |= s.type.substr(0, l.length) === l, window.clearTimeout(n), n = window.setTimeout(o, 0);
1031
+ }
1032
+ };
1033
+ ["DOMAttrModified", "DOMNodeRemoved", "DOMNodeRemovedFromDocument"].forEach(function(s) {
1034
+ i.addEventListener(s, r);
1035
+ });
1036
+ }
1037
+ Object.defineProperty(i, "open", {
1038
+ set: this.setOpen.bind(this),
1039
+ get: i.hasAttribute.bind(i, "open")
1040
+ }), this.backdrop_ = document.createElement("div"), this.backdrop_.className = "backdrop", this.backdrop_.addEventListener("mouseup", this.backdropMouseEvent_.bind(this)), this.backdrop_.addEventListener("mousedown", this.backdropMouseEvent_.bind(this)), this.backdrop_.addEventListener("click", this.backdropMouseEvent_.bind(this));
1041
+ }
1042
+ st.prototype = /** @type {HTMLDialogElement.prototype} */
1043
+ {
1044
+ get dialog() {
1045
+ return this.dialog_;
1046
+ },
1047
+ /**
1048
+ * Maybe remove this dialog from the modal top layer. This is called when
1049
+ * a modal dialog may no longer be tenable, e.g., when the dialog is no
1050
+ * longer open or is no longer part of the DOM.
1051
+ */
1052
+ maybeHideModal: function() {
1053
+ this.dialog_.hasAttribute("open") && je(this.dialog_) || this.downgradeModal();
1054
+ },
1055
+ /**
1056
+ * Remove this dialog from the modal top layer, leaving it as a non-modal.
1057
+ */
1058
+ downgradeModal: function() {
1059
+ this.openAsModal_ && (this.openAsModal_ = !1, this.dialog_.style.zIndex = "", this.replacedStyleTop_ && (this.dialog_.style.top = "", this.replacedStyleTop_ = !1), this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_), c.dm.removeDialog(this));
1060
+ },
1061
+ /**
1062
+ * @param {boolean} value whether to open or close this dialog
1063
+ */
1064
+ setOpen: function(i) {
1065
+ i ? this.dialog_.hasAttribute("open") || this.dialog_.setAttribute("open", "") : (this.dialog_.removeAttribute("open"), this.maybeHideModal());
1066
+ },
1067
+ /**
1068
+ * Handles mouse events ('mouseup', 'mousedown', 'click') on the fake .backdrop element, redirecting them as if
1069
+ * they were on the dialog itself.
1070
+ *
1071
+ * @param {!Event} e to redirect
1072
+ */
1073
+ backdropMouseEvent_: function(i) {
1074
+ if (this.dialog_.hasAttribute("tabindex"))
1075
+ this.dialog_.focus();
1076
+ else {
1077
+ var e = document.createElement("div");
1078
+ this.dialog_.insertBefore(e, this.dialog_.firstChild), e.tabIndex = -1, e.focus(), this.dialog_.removeChild(e);
1079
+ }
1080
+ var t = document.createEvent("MouseEvents");
1081
+ t.initMouseEvent(
1082
+ i.type,
1083
+ i.bubbles,
1084
+ i.cancelable,
1085
+ window,
1086
+ i.detail,
1087
+ i.screenX,
1088
+ i.screenY,
1089
+ i.clientX,
1090
+ i.clientY,
1091
+ i.ctrlKey,
1092
+ i.altKey,
1093
+ i.shiftKey,
1094
+ i.metaKey,
1095
+ i.button,
1096
+ i.relatedTarget
1097
+ ), this.dialog_.dispatchEvent(t), i.stopPropagation();
1098
+ },
1099
+ /**
1100
+ * Focuses on the first focusable element within the dialog. This will always blur the current
1101
+ * focus, even if nothing within the dialog is found.
1102
+ */
1103
+ focus_: function() {
1104
+ var i = this.dialog_.querySelector("[autofocus]:not([disabled])");
1105
+ !i && this.dialog_.tabIndex >= 0 && (i = this.dialog_), i || (i = nt(this.dialog_)), ot(document.activeElement), i && i.focus();
1106
+ },
1107
+ /**
1108
+ * Sets the zIndex for the backdrop and dialog.
1109
+ *
1110
+ * @param {number} dialogZ
1111
+ * @param {number} backdropZ
1112
+ */
1113
+ updateZIndex: function(i, e) {
1114
+ if (i < e)
1115
+ throw new Error("dialogZ should never be < backdropZ");
1116
+ this.dialog_.style.zIndex = i, this.backdrop_.style.zIndex = e;
1117
+ },
1118
+ /**
1119
+ * Shows the dialog. If the dialog is already open, this does nothing.
1120
+ */
1121
+ show: function() {
1122
+ this.dialog_.open || (this.setOpen(!0), this.focus_());
1123
+ },
1124
+ /**
1125
+ * Show this dialog modally.
1126
+ */
1127
+ showModal: function() {
1128
+ if (this.dialog_.hasAttribute("open"))
1129
+ throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");
1130
+ if (!je(this.dialog_))
1131
+ throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");
1132
+ if (!c.dm.pushDialog(this))
1133
+ throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");
1134
+ Wt(this.dialog_.parentElement) && console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"), this.setOpen(!0), this.openAsModal_ = !0, c.needsCentering(this.dialog_) ? (c.reposition(this.dialog_), this.replacedStyleTop_ = !0) : this.replacedStyleTop_ = !1, this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling), this.focus_();
1135
+ },
1136
+ /**
1137
+ * Closes this HTMLDialogElement. This is optional vs clearing the open
1138
+ * attribute, however this fires a 'close' event.
1139
+ *
1140
+ * @param {string=} opt_returnValue to use as the returnValue
1141
+ */
1142
+ close: function(i) {
1143
+ if (!this.dialog_.hasAttribute("open"))
1144
+ throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");
1145
+ this.setOpen(!1), i !== void 0 && (this.dialog_.returnValue = i);
1146
+ var e = new P("close", {
1147
+ bubbles: !1,
1148
+ cancelable: !1
1149
+ });
1150
+ it(this.dialog_, e);
1151
+ }
1152
+ };
1153
+ var c = {};
1154
+ c.reposition = function(i) {
1155
+ var e = document.body.scrollTop || document.documentElement.scrollTop, t = e + (window.innerHeight - i.offsetHeight) / 2;
1156
+ i.style.top = Math.max(e, t) + "px";
1157
+ };
1158
+ c.isInlinePositionSetByStylesheet = function(i) {
1159
+ for (var e = 0; e < document.styleSheets.length; ++e) {
1160
+ var t = document.styleSheets[e], o = null;
1161
+ try {
1162
+ o = t.cssRules;
1163
+ } catch {
1164
+ }
1165
+ if (o)
1166
+ for (var n = 0; n < o.length; ++n) {
1167
+ var r = o[n], s = null;
1168
+ try {
1169
+ s = document.querySelectorAll(r.selectorText);
1170
+ } catch {
1171
+ }
1172
+ if (!(!s || !Kt(s, i))) {
1173
+ var l = r.style.getPropertyValue("top"), a = r.style.getPropertyValue("bottom");
1174
+ if (l && l !== "auto" || a && a !== "auto")
1175
+ return !0;
1176
+ }
1177
+ }
1178
+ }
1179
+ return !1;
1180
+ };
1181
+ c.needsCentering = function(i) {
1182
+ var e = window.getComputedStyle(i);
1183
+ return e.position !== "absolute" || i.style.top !== "auto" && i.style.top !== "" || i.style.bottom !== "auto" && i.style.bottom !== "" ? !1 : !c.isInlinePositionSetByStylesheet(i);
1184
+ };
1185
+ c.forceRegisterDialog = function(i) {
1186
+ if ((window.HTMLDialogElement || i.showModal) && console.warn("This browser already supports <dialog>, the polyfill may not work correctly", i), i.localName !== "dialog")
1187
+ throw new Error("Failed to register dialog: The element is not a dialog.");
1188
+ new st(
1189
+ /** @type {!HTMLDialogElement} */
1190
+ i
1191
+ );
1192
+ };
1193
+ c.registerDialog = function(i) {
1194
+ i.showModal || c.forceRegisterDialog(i);
1195
+ };
1196
+ c.DialogManager = function() {
1197
+ this.pendingDialogStack = [];
1198
+ var i = this.checkDOM_.bind(this);
1199
+ this.overlay = document.createElement("div"), this.overlay.className = "_dialog_overlay", this.overlay.addEventListener("click", function(e) {
1200
+ this.forwardTab_ = void 0, e.stopPropagation(), i([]);
1201
+ }.bind(this)), this.handleKey_ = this.handleKey_.bind(this), this.handleFocus_ = this.handleFocus_.bind(this), this.zIndexLow_ = 1e5, this.zIndexHigh_ = 1e5 + 150, this.forwardTab_ = void 0, "MutationObserver" in window && (this.mo_ = new MutationObserver(function(e) {
1202
+ var t = [];
1203
+ e.forEach(function(o) {
1204
+ for (var n = 0, r; r = o.removedNodes[n]; ++n) {
1205
+ if (r instanceof Element)
1206
+ r.localName === "dialog" && t.push(r);
1207
+ else
1208
+ continue;
1209
+ t = t.concat(r.querySelectorAll("dialog"));
1210
+ }
1211
+ }), t.length && i(t);
1212
+ }));
1213
+ };
1214
+ c.DialogManager.prototype.blockDocument = function() {
1215
+ document.documentElement.addEventListener("focus", this.handleFocus_, !0), document.addEventListener("keydown", this.handleKey_), this.mo_ && this.mo_.observe(document, { childList: !0, subtree: !0 });
1216
+ };
1217
+ c.DialogManager.prototype.unblockDocument = function() {
1218
+ document.documentElement.removeEventListener("focus", this.handleFocus_, !0), document.removeEventListener("keydown", this.handleKey_), this.mo_ && this.mo_.disconnect();
1219
+ };
1220
+ c.DialogManager.prototype.updateStacking = function() {
1221
+ for (var i = this.zIndexHigh_, e = 0, t; t = this.pendingDialogStack[e]; ++e)
1222
+ t.updateZIndex(--i, --i), e === 0 && (this.overlay.style.zIndex = --i);
1223
+ var o = this.pendingDialogStack[0];
1224
+ if (o) {
1225
+ var n = o.dialog.parentNode || document.body;
1226
+ n.appendChild(this.overlay);
1227
+ } else
1228
+ this.overlay.parentNode && this.overlay.parentNode.removeChild(this.overlay);
1229
+ };
1230
+ c.DialogManager.prototype.containedByTopDialog_ = function(i) {
1231
+ for (; i = U(i); ) {
1232
+ for (var e = 0, t; t = this.pendingDialogStack[e]; ++e)
1233
+ if (t.dialog === i)
1234
+ return e === 0;
1235
+ i = i.parentElement;
1236
+ }
1237
+ return !1;
1238
+ };
1239
+ c.DialogManager.prototype.handleFocus_ = function(i) {
1240
+ var e = i.composedPath ? i.composedPath()[0] : i.target;
1241
+ if (!this.containedByTopDialog_(e) && document.activeElement !== document.documentElement && (i.preventDefault(), i.stopPropagation(), ot(
1242
+ /** @type {Element} */
1243
+ e
1244
+ ), this.forwardTab_ !== void 0)) {
1245
+ var t = this.pendingDialogStack[0], o = t.dialog, n = o.compareDocumentPosition(e);
1246
+ return n & Node.DOCUMENT_POSITION_PRECEDING && (this.forwardTab_ ? t.focus_() : e !== document.documentElement && document.documentElement.focus()), !1;
1247
+ }
1248
+ };
1249
+ c.DialogManager.prototype.handleKey_ = function(i) {
1250
+ if (this.forwardTab_ = void 0, i.keyCode === 27) {
1251
+ i.preventDefault(), i.stopPropagation();
1252
+ var e = new P("cancel", {
1253
+ bubbles: !1,
1254
+ cancelable: !0
1255
+ }), t = this.pendingDialogStack[0];
1256
+ t && it(t.dialog, e) && t.dialog.close();
1257
+ } else
1258
+ i.keyCode === 9 && (this.forwardTab_ = !i.shiftKey);
1259
+ };
1260
+ c.DialogManager.prototype.checkDOM_ = function(i) {
1261
+ var e = this.pendingDialogStack.slice();
1262
+ e.forEach(function(t) {
1263
+ i.indexOf(t.dialog) !== -1 ? t.downgradeModal() : t.maybeHideModal();
1264
+ });
1265
+ };
1266
+ c.DialogManager.prototype.pushDialog = function(i) {
1267
+ var e = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;
1268
+ return this.pendingDialogStack.length >= e ? !1 : (this.pendingDialogStack.unshift(i) === 1 && this.blockDocument(), this.updateStacking(), !0);
1269
+ };
1270
+ c.DialogManager.prototype.removeDialog = function(i) {
1271
+ var e = this.pendingDialogStack.indexOf(i);
1272
+ e !== -1 && (this.pendingDialogStack.splice(e, 1), this.pendingDialogStack.length === 0 && this.unblockDocument(), this.updateStacking());
1273
+ };
1274
+ c.dm = new c.DialogManager();
1275
+ c.formSubmitter = null;
1276
+ c.imagemapUseValue = null;
1277
+ if (window.HTMLDialogElement === void 0) {
1278
+ var Ve = document.createElement("form");
1279
+ if (Ve.setAttribute("method", "dialog"), Ve.method !== "dialog") {
1280
+ var z = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "method");
1281
+ if (z) {
1282
+ var Zt = z.get;
1283
+ z.get = function() {
1284
+ return fe(this) ? "dialog" : Zt.call(this);
1285
+ };
1286
+ var Xt = z.set;
1287
+ z.set = function(i) {
1288
+ return typeof i == "string" && i.toLowerCase() === "dialog" ? this.setAttribute("method", i) : Xt.call(this, i);
1289
+ }, Object.defineProperty(HTMLFormElement.prototype, "method", z);
1290
+ }
1291
+ }
1292
+ document.addEventListener("click", function(i) {
1293
+ if (c.formSubmitter = null, c.imagemapUseValue = null, !i.defaultPrevented) {
1294
+ var e = (
1295
+ /** @type {Element} */
1296
+ i.target
1297
+ );
1298
+ if ("composedPath" in i) {
1299
+ var t = i.composedPath();
1300
+ e = t.shift() || e;
1301
+ }
1302
+ if (!(!e || !fe(e.form))) {
1303
+ var o = e.type === "submit" && ["button", "input"].indexOf(e.localName) > -1;
1304
+ if (!o) {
1305
+ if (!(e.localName === "input" && e.type === "image"))
1306
+ return;
1307
+ c.imagemapUseValue = i.offsetX + "," + i.offsetY;
1308
+ }
1309
+ var n = U(e);
1310
+ n && (c.formSubmitter = e);
1311
+ }
1312
+ }
1313
+ }, !1), document.addEventListener("submit", function(i) {
1314
+ var e = i.target, t = U(e);
1315
+ if (!t) {
1316
+ var o = rt(i), n = o && o.getAttribute("formmethod") || e.getAttribute("method");
1317
+ n === "dialog" && i.preventDefault();
1318
+ }
1319
+ });
1320
+ var Gt = HTMLFormElement.prototype.submit, Jt = function() {
1321
+ if (!fe(this))
1322
+ return Gt.call(this);
1323
+ var i = U(this);
1324
+ i && i.close();
1325
+ };
1326
+ HTMLFormElement.prototype.submit = Jt;
1327
+ }
1328
+ const Qt = `dialog{position:absolute;left:0;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border:solid;padding:1em;background:white;color:#000;display:block}dialog:not([open]){display:none}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.1)}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}*,*:before,*:after{box-sizing:border-box}@keyframes rotate360{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.c-modal{--modal-size-s: 450px;--modal-size-m: 600px;--modal-size-l: 1080px;--modal-border-radius: var(--dt-radius-rounded-d);--modal-font: var(--dt-font-interactive-m-family);--modal-bg-color: var(--dt-color-container-default);--modal-elevation: var(--dt-elevation-04);text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-font-smoothing:antialiased;border-radius:var(--modal-border-radius);border:none;box-shadow:var(--modal-elevation);font-family:var(--modal-font);background-color:var(--modal-bg-color);padding:0;--modal-margin-none: var(--dt-spacing-none);--modal-margin-small: var(--dt-spacing-g);--modal-margin-large: var(--dt-spacing-j);--modal-margin-block: var(--modal-margin-small);--modal-block-size: fit-content;--modal-inline-size: 75%;--modal-max-block-size: calc(100vh - calc(var(--modal-margin-block) * 2));--modal-max-inline-size: var(--modal-size-m);block-size:var(--modal-block-size);inline-size:var(--modal-inline-size);max-block-size:var(--modal-max-block-size);max-inline-size:var(--modal-max-inline-size)}.c-modal:focus-visible{outline:none}@media (max-width: 768px){.c-modal pie-icon-button{--btn-dimension: 40px}}.c-modal[open]{display:flex;flex-direction:column}@media (min-width: 768px){.c-modal{--modal-margin-block: var(--modal-margin-large)}}.c-modal[size=small]{--modal-max-inline-size: var(--modal-size-s)}@media (min-width: 768px){.c-modal[size=small]{--modal-margin-block: var(--modal-margin-large)}}@media (max-width: 767px){.c-modal[size=medium][isfullwidthbelowmid]{--modal-margin-block: var(--modal-margin-none);--modal-border-radius: var(--dt-radius-rounded-none);--modal-block-size: 100%;--modal-inline-size: 100%;--modal-max-inline-size: 100%}}.c-modal[size=large]{--modal-inline-size: 75%;--modal-max-inline-size: var(--modal-size-l);--modal-margin-block: var(--modal-margin-large)}@media (max-width: 767px){.c-modal[size=large]{--modal-margin-block: var(--modal-margin-none);--modal-border-radius: var(--dt-radius-rounded-none);--modal-block-size: 100%;--modal-inline-size: 100%}}.c-modal[position=top]{margin-block-start:var(--dt-spacing-j)}@media (max-width: 767px){.c-modal[position=top][isfullwidthbelowmid]{margin-block-start:var(--dt-spacing-none)}}.c-modal::backdrop{background:rgba(0,0,0,.5)}.c-modal .c-modal-footer{--modal-button-spacing: var(--dt-spacing-d);--modal-footer-padding: var(--dt-spacing-d);display:flex;flex-flow:row-reverse;flex-wrap:wrap;gap:var(--modal-button-spacing);padding:var(--modal-footer-padding)}@media (min-width: 768px){.c-modal .c-modal-footer{--modal-footer-padding: var(--dt-spacing-e)}}@media (max-width: 767px){.c-modal[hasstackedactions] .c-modal-footer{flex-direction:column}}.c-modal .c-modal-header{padding-inline:var(--dt-spacing-d);padding-block:14px;display:grid;grid-template-areas:"back heading close" ". heading .";grid-template-columns:minmax(0,max-content) minmax(0,1fr) minmax(0,max-content);align-items:center}@media (min-width: 768px){.c-modal .c-modal-header{padding-inline:var(--dt-spacing-e);padding-block:20px}}.c-modal[hasbackbutton] .c-modal-header{padding-block:var(--dt-spacing-b);padding-inline-start:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[hasbackbutton] .c-modal-header{padding-block:var(--dt-spacing-c);padding-inline-start:var(--dt-spacing-c)}}.c-modal[isdismissible] .c-modal-header{padding-block:var(--dt-spacing-b);padding-inline-end:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[isdismissible] .c-modal-header{padding-block:var(--dt-spacing-c);padding-inline-end:var(--dt-spacing-c)}}.c-modal .c-modal-heading{--modal-header-font-size: calc(var(--dt-font-heading-m-size--wide) * 1px);--modal-header-font-line-height: calc(var(--dt-font-heading-m-line-height--wide) * 1px);--modal-header-font-weight: var(--dt-font-heading-m-weight);font-size:var(--modal-header-font-size);line-height:var(--modal-header-font-line-height);font-weight:var(--modal-header-font-weight);margin:0;grid-area:heading}.c-modal[hasbackbutton] .c-modal-heading{padding-inline-start:var(--dt-spacing-b)}@media (min-width: 768px){.c-modal[hasbackbutton] .c-modal-heading{padding-inline-start:var(--dt-spacing-c)}}.c-modal[isdismissible] .c-modal-heading{padding-inline-end:var(--dt-spacing-d)}@media (min-width: 768px){.c-modal[isdismissible] .c-modal-heading{padding-inline-end:var(--dt-spacing-e)}}.c-modal .c-modal-backBtn{grid-area:back}.c-modal .c-modal-closeBtn{grid-area:close}.c-modal[isfooterpinned] .c-modal-content,.c-modal .c-modal-scrollContainer{overflow-y:auto}.c-modal .c-modal-scrollContainer{--bg-scroll-start: linear-gradient(var(--dt-color-container-default) 30%, rgba(255, 255, 255, 0));--bg-scroll-end: linear-gradient(rgba(255, 255, 255, 0), var(--dt-color-container-default) 70%) 0 100%;--bg-scroll-top: radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0));--bg-scroll-bottom: radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0)) 0 100%;--bg-size-scroll-start: 100% 40px;--bg-size-scroll-end: 100% 40px;--bg-size-scroll-top: 100% 16px;--bg-size-scroll-bottom: 100% 16px;background:var(--bg-scroll-start),var(--bg-scroll-end),var(--bg-scroll-top),var(--bg-scroll-bottom);background-repeat:no-repeat;background-color:var(--dt-color-container-default);background-size:var(--bg-size-scroll-start),var(--bg-size-scroll-end),var(--bg-size-scroll-top),var(--bg-size-scroll-bottom);background-attachment:local,local,scroll,scroll}.c-modal .c-modal-content{--modal-content-font-size: calc(var(--dt-font-size-16) * 1px);--modal-content-font-weight: var(--dt-font-weight-regular);--modal-content-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--modal-content-padding: var(--dt-spacing-e);--modal-content-padding-block: var(--dt-spacing-a);--spinner-size: 48px;--spinner-border-width: 6px;--spinner-base-color-h: var(--dt-color-content-interactive-secondary-h);--spinner-base-color-s: var(--dt-color-content-interactive-secondary-s);--spinner-base-color-l: var(--dt-color-content-interactive-secondary-l);--spinner-left-color-opacity: .35;--spinner-left-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), var(--spinner-left-color-opacity));--spinner-right-color: hsl(var(--spinner-base-color-h), var(--spinner-base-color-s), var(--spinner-base-color-l), 1);--spinner-animation-duration: 1.15s;--spinner-animation-timing-function: linear;--spinner-animation-iteration-count: infinite;position:relative;min-block-size:var(--dt-spacing-j);font-size:var(--modal-content-font-size);line-height:var(--modal-content-line-height);font-weight:var(--modal-content-font-weight);padding-inline:var(--modal-content-padding);padding-block:var(--modal-content-padding-block)}.c-modal .c-modal-content--scrollable{background:linear-gradient(to bottom,transparent,var(--dt-color-container-default) 75%) center bottom,linear-gradient(transparent,var(--dt-color-border-strong)) center bottom;background-repeat:no-repeat;background-size:100% 48px,100% 12px;background-attachment:local,scroll}.c-modal .c-modal-content:before{content:"";position:absolute;left:50%;top:50%;translate:-50% -50%;height:var(--spinner-size);width:var(--spinner-size);display:block;background-color:transparent;border-radius:50%;border-color:var(--spinner-left-color) var(--spinner-right-color) var(--spinner-right-color) var(--spinner-left-color);border-width:var(--spinner-border-width);border-style:solid;will-change:transform;opacity:0}.c-modal[isLoading] .c-modal-content:before{animation:rotate360 var(--spinner-animation-duration) var(--spinner-animation-timing-function) var(--spinner-animation-iteration-count);opacity:1}.c-modal[isLoading] .c-modal-content .c-modal-contentInner{opacity:0}
1329
+ `, ei = ["h1", "h2", "h3", "h4", "h5", "h6"], ti = ["small", "medium", "large"], ii = ["top", "center"], ge = "pie-modal-close", G = "pie-modal-open", ve = "pie-modal-back";
1330
+ var oi = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, g = (i, e, t, o) => {
1331
+ for (var n = o > 1 ? void 0 : o ? ni(e, t) : e, r = i.length - 1, s; r >= 0; r--)
1332
+ (s = i[r]) && (n = (o ? s(e, t, n) : s(n)) || n);
1333
+ return o && n && oi(e, t, n), n;
1334
+ };
1335
+ const Z = "pie-modal";
1336
+ class f extends gt(lt) {
1337
+ constructor() {
1338
+ super(), this.headingLevel = "h2", this.hasBackButton = !1, this.hasStackedActions = !1, this.isDismissible = !1, this.isFooterPinned = !0, this.isFullWidthBelowMid = !1, this.isLoading = !1, this.isOpen = !1, this.position = "center", this.size = "medium", this._backButtonClicked = !1, this._handleDialogCancelEvent = (e) => {
159
1339
  this.isDismissible || e.preventDefault();
160
1340
  }, this._handleDialogLightDismiss = (e) => {
161
- var u;
1341
+ var a;
162
1342
  if (!this.isDismissible)
163
1343
  return;
164
- const t = (u = this._dialog) == null ? void 0 : u.getBoundingClientRect(), {
165
- top: i = 0,
166
- bottom: o = 0,
167
- left: a = 0,
168
- right: d = 0
1344
+ const t = (a = this._dialog) == null ? void 0 : a.getBoundingClientRect(), {
1345
+ top: o = 0,
1346
+ bottom: n = 0,
1347
+ left: r = 0,
1348
+ right: s = 0
169
1349
  } = t || {};
170
- if (i === 0 && o === 0 && a === 0 && d === 0)
1350
+ if (o === 0 && n === 0 && r === 0 && s === 0)
171
1351
  return;
172
- (e.clientY < i || e.clientY > o || e.clientX < a || e.clientX > d) && (this.isOpen = !1);
1352
+ (e.clientY < o || e.clientY > n || e.clientX < r || e.clientX > s) && (this.isOpen = !1);
173
1353
  }, this._dispatchModalCustomEvent = (e) => {
174
1354
  const t = new CustomEvent(e, {
175
1355
  bubbles: !0,
@@ -179,16 +1359,15 @@ class r extends q(D) {
179
1359
  }, this.addEventListener("click", (e) => this._handleDialogLightDismiss(e));
180
1360
  }
181
1361
  connectedCallback() {
182
- super.connectedCallback(), document.addEventListener(y, this._handleModalOpened.bind(this)), document.addEventListener(_, this._handleModalClosed.bind(this)), document.addEventListener(z, this._handleModalClosed.bind(this));
1362
+ super.connectedCallback(), document.addEventListener(G, this._handleModalOpened.bind(this)), document.addEventListener(ge, this._handleModalClosed.bind(this)), document.addEventListener(ve, this._handleModalClosed.bind(this));
183
1363
  }
184
1364
  disconnectedCallback() {
185
- document.removeEventListener(y, this._handleModalOpened.bind(this)), document.removeEventListener(_, this._handleModalClosed.bind(this)), document.removeEventListener(z, this._handleModalClosed.bind(this)), super.disconnectedCallback();
1365
+ document.removeEventListener(G, this._handleModalOpened.bind(this)), document.removeEventListener(ge, this._handleModalClosed.bind(this)), document.removeEventListener(ve, this._handleModalClosed.bind(this)), super.disconnectedCallback();
186
1366
  }
187
1367
  firstUpdated(e) {
188
- var t, i;
189
- (t = this._dialog) == null || t.addEventListener("cancel", (o) => this._handleDialogCancelEvent(o)), this._handleModalOpenStateOnFirstRender(e), (i = this._dialog) == null || i.addEventListener("close", () => {
1368
+ this._dialog && (c.registerDialog(this._dialog), this._dialog.addEventListener("cancel", (t) => this._handleDialogCancelEvent(t)), this._dialog.addEventListener("close", () => {
190
1369
  this.isOpen = !1;
191
- });
1370
+ })), this._handleModalOpenStateOnFirstRender(e);
192
1371
  }
193
1372
  updated(e) {
194
1373
  this._handleModalOpenStateChanged(e);
@@ -197,33 +1376,33 @@ class r extends q(D) {
197
1376
  * Opens the dialog element and disables page scrolling
198
1377
  */
199
1378
  _handleModalOpened() {
200
- var e, t, i;
201
- J(this), !((e = this._dialog) != null && e.hasAttribute("open") || !((t = this._dialog) != null && t.isConnected)) && ((i = this._dialog) == null || i.showModal());
1379
+ var e, t, o;
1380
+ Et(this), !((e = this._dialog) != null && e.hasAttribute("open") || !((t = this._dialog) != null && t.isConnected)) && ((o = this._dialog) == null || o.showModal());
202
1381
  }
203
1382
  /**
204
1383
  * Closes the dialog element and re-enables page scrolling
205
1384
  */
206
1385
  _handleModalClosed() {
207
1386
  var e;
208
- Q(this), (e = this._dialog) == null || e.close(), this._returnFocus();
1387
+ St(this), (e = this._dialog) == null || e.close(), this._returnFocus();
209
1388
  }
210
1389
  // Handles the value of the isOpen property on first render of the component
211
1390
  _handleModalOpenStateOnFirstRender(e) {
212
- e.get("isOpen") === void 0 && this.isOpen && this._dispatchModalCustomEvent(y);
1391
+ e.get("isOpen") === void 0 && this.isOpen && this._dispatchModalCustomEvent(G);
213
1392
  }
214
1393
  // Handles changes to the modal isOpen property by dispatching any appropriate events
215
1394
  _handleModalOpenStateChanged(e) {
216
1395
  const t = e.get("isOpen");
217
- t !== void 0 && (t ? this._backButtonClicked ? (this._backButtonClicked = !1, this._dispatchModalCustomEvent(z)) : this._dispatchModalCustomEvent(_) : this._dispatchModalCustomEvent(y));
1396
+ t !== void 0 && (t ? this._backButtonClicked ? (this._backButtonClicked = !1, this._dispatchModalCustomEvent(ve)) : this._dispatchModalCustomEvent(ge) : this._dispatchModalCustomEvent(G));
218
1397
  }
219
1398
  /**
220
1399
  * Return focus to the specified element, providing the selector is valid
221
1400
  * and the chosen element can be found.
222
1401
  */
223
1402
  _returnFocus() {
224
- var t, i;
1403
+ var t, o;
225
1404
  const e = (t = this.returnFocusAfterCloseSelector) == null ? void 0 : t.trim();
226
- e && ((i = document.querySelector(e)) == null || i.focus());
1405
+ e && ((o = document.querySelector(e)) == null || o.focus());
227
1406
  }
228
1407
  /**
229
1408
  * Template for the close button element. Called within the
@@ -232,15 +1411,18 @@ class r extends q(D) {
232
1411
  * @private
233
1412
  */
234
1413
  renderCloseButton() {
235
- return h`
1414
+ var e;
1415
+ return _`
236
1416
  <pie-icon-button
237
1417
  @click="${() => {
238
1418
  this.isOpen = !1;
239
1419
  }}"
240
1420
  variant="ghost-secondary"
241
1421
  class="c-modal-closeBtn"
242
- data-test-id="modal-close-button"><icon-close /></pie-icon-button>
243
- `;
1422
+ aria-label="${((e = this.aria) == null ? void 0 : e.close) || b}"
1423
+ data-test-id="modal-close-button">
1424
+ <icon-close></icon-close>
1425
+ </pie-icon-button>`;
244
1426
  }
245
1427
  /**
246
1428
  * Template for the back button element. Called within the
@@ -249,15 +1431,17 @@ class r extends q(D) {
249
1431
  * @private
250
1432
  */
251
1433
  renderBackButton() {
252
- return h`
1434
+ var e;
1435
+ return _`
253
1436
  <pie-icon-button
254
1437
  @click="${() => {
255
1438
  this._backButtonClicked = !0, this.isOpen = !1;
256
1439
  }}"
257
1440
  variant="ghost-secondary"
258
1441
  class="c-modal-backBtn"
1442
+ aria-label="${((e = this.aria) == null ? void 0 : e.back) || b}"
259
1443
  data-test-id="modal-back-button">
260
- ${this.isRTL ? h`<icon-chevron-right />` : h`<icon-chevron-left />`}
1444
+ ${this.isRTL ? _`<icon-chevron-right></icon-chevron-right>` : _`<icon-chevron-left></icon-chevron-left>`}
261
1445
  </pie-icon-button>
262
1446
  `;
263
1447
  }
@@ -271,116 +1455,170 @@ class r extends q(D) {
271
1455
  * @private
272
1456
  */
273
1457
  renderLeadingAction() {
274
- const { text: e = "Confirm", variant: t = "primary", ariaLabel: i } = this.leadingAction;
275
- return e ? h`
1458
+ const { text: e, variant: t = "primary", ariaLabel: o } = this.leadingAction;
1459
+ return e ? _`
276
1460
  <pie-button
277
- variant="${t}"
278
- aria-label="${i || g}"
279
- type="submit"
280
- @click="${() => {
281
- var o;
282
- return (o = this._dialog) == null ? void 0 : o.close("leading");
1461
+ variant="${t}"
1462
+ aria-label="${o || b}"
1463
+ type="submit"
1464
+ ?isFullWidth="${this.hasStackedActions}"
1465
+ @click="${() => {
1466
+ var n;
1467
+ return (n = this._dialog) == null ? void 0 : n.close("leading");
283
1468
  }}"
284
- data-test-id="modal-leading-action">
1469
+ data-test-id="modal-leading-action">
285
1470
  ${e}
286
- </pie-button>
287
- ` : g;
1471
+ </pie-button>
1472
+ ` : b;
1473
+ }
1474
+ /**
1475
+ * Render supportingAction button depending on prop availability.
1476
+ *
1477
+ * 1. If the prop `supportingAction` is not provided, the button is not rendered.
1478
+ * 2. If the prop `supportingAction` is provided but any of the optional properties
1479
+ * are not provided, they fall back to their default values.
1480
+ * 3. If `supportingAction` is provided but not `leadingAction`, log a warning and do
1481
+ * not render `supportingAction`.
1482
+ *
1483
+ * @private
1484
+ */
1485
+ renderSupportingAction() {
1486
+ const { text: e, variant: t = "ghost", ariaLabel: o } = this.supportingAction;
1487
+ return e ? this.leadingAction ? _`
1488
+ <pie-button
1489
+ variant="${t}"
1490
+ aria-label="${o || b}"
1491
+ type="reset"
1492
+ ?isFullWidth="${this.hasStackedActions}"
1493
+ @click="${() => {
1494
+ var n;
1495
+ return (n = this._dialog) == null ? void 0 : n.close("supporting");
1496
+ }}"
1497
+ data-test-id="modal-supporting-action">
1498
+ ${e}
1499
+ </pie-button>
1500
+ ` : (console.warn("Use `leadingAction` instead of `supportingAction`. `supportingAction` is being ignored."), b) : b;
1501
+ }
1502
+ /**
1503
+ * Renders the modal inner content and footer of the modal.
1504
+ * @private
1505
+ */
1506
+ renderModalContentAndFooter() {
1507
+ return _`
1508
+ <article class="c-modal-content c-modal-content--scrollable">
1509
+ <div class="c-modal-contentInner">
1510
+ <slot></slot>
1511
+ </div>
1512
+ </article>
1513
+ <footer class="c-modal-footer">
1514
+ ${this.leadingAction ? this.renderLeadingAction() : b}
1515
+ ${this.supportingAction ? this.renderSupportingAction() : b}
1516
+ </footer>`;
288
1517
  }
289
1518
  render() {
290
1519
  const {
291
- hasBackButton: e,
292
- heading: t,
293
- headingLevel: i = "h2",
294
- isDismissible: o,
1520
+ aria: e,
1521
+ hasBackButton: t,
1522
+ hasStackedActions: o,
1523
+ heading: n,
1524
+ headingLevel: r = "h2",
1525
+ isDismissible: s,
1526
+ isFooterPinned: l,
295
1527
  isFullWidthBelowMid: a,
296
1528
  isLoading: d,
297
- size: p,
298
- leadingAction: u,
299
- position: P
300
- } = this, C = T(i);
301
- return h`
1529
+ leadingAction: y,
1530
+ position: h,
1531
+ size: u,
1532
+ supportingAction: m
1533
+ } = this, A = dt(r);
1534
+ return _`
302
1535
  <dialog
303
1536
  id="dialog"
304
1537
  class="c-modal"
305
- data-test-id="pie-modal"
306
- size="${p}"
307
- position="${P}"
308
- ?hasBackButton=${e}
309
- ?isDismissible=${o}
1538
+ size="${u}"
1539
+ position="${h}"
1540
+ ?hasActions=${y || m}
1541
+ ?hasBackButton=${t}
1542
+ ?hasStackedActions=${o}
1543
+ ?isDismissible=${s}
1544
+ ?isFooterPinned=${l}
310
1545
  ?isFullWidthBelowMid=${a}
311
1546
  ?isLoading=${d}
1547
+ aria-busy="${d ? "true" : "false"}"
1548
+ aria-label="${d && (e == null ? void 0 : e.loading) || b}"
312
1549
  data-test-id="pie-modal">
313
1550
  <header class="c-modal-header">
314
- ${e ? this.renderBackButton() : g}
315
- <${C} class="c-modal-heading">
316
- ${t}
317
- </${C}>
318
- ${o ? this.renderCloseButton() : g}
1551
+ ${t ? this.renderBackButton() : b}
1552
+ <${A} class="c-modal-heading">
1553
+ ${n}
1554
+ </${A}>
1555
+ ${s ? this.renderCloseButton() : b}
319
1556
  </header>
320
- <article class="c-modal-content c-modal-content--scrollable">
321
- <div class="c-modal-contentInner">
322
- <slot></slot>
323
- </div>
324
- </article>
325
- <footer class="c-modal-footer">
326
- ${u ? this.renderLeadingAction() : g}
327
- <pie-button
328
- variant="ghost"
329
- type="reset"
330
- @click="${() => {
331
- var L;
332
- return (L = this._dialog) == null ? void 0 : L.close("supporting");
333
- }}"
334
- data-test-id="modal-supporting-action">
335
- Cancel
336
- </pie-button>
337
- </footer>
1557
+ ${// We need to wrap the remaining content in a shared scrollable container if the footer is not pinned
1558
+ l ? this.renderModalContentAndFooter() : _`
1559
+ <div class="c-modal-scrollContainer">
1560
+ ${this.renderModalContentAndFooter()}
1561
+ </div>
1562
+ `}
338
1563
  </dialog>`;
339
1564
  }
340
1565
  }
341
- r.styles = E(Z);
342
- l([
343
- s({ type: String }),
344
- V(b)
345
- ], r.prototype, "heading", 2);
346
- l([
347
- s(),
348
- B(b, K, "h2")
349
- ], r.prototype, "headingLevel", 2);
350
- l([
351
- s({ type: Boolean, reflect: !0 })
352
- ], r.prototype, "isDismissible", 2);
353
- l([
354
- s({ type: Boolean })
355
- ], r.prototype, "hasBackButton", 2);
356
- l([
357
- s({ type: Boolean })
358
- ], r.prototype, "isFullWidthBelowMid", 2);
359
- l([
360
- s({ type: Boolean })
361
- ], r.prototype, "isOpen", 2);
362
- l([
363
- s({ type: Boolean, reflect: !0 })
364
- ], r.prototype, "isLoading", 2);
365
- l([
366
- s()
367
- ], r.prototype, "returnFocusAfterCloseSelector", 2);
368
- l([
369
- s(),
370
- B(b, ee, "medium")
371
- ], r.prototype, "size", 2);
372
- l([
373
- s()
374
- ], r.prototype, "leadingAction", 2);
375
- l([
376
- B(b, te, "center")
377
- ], r.prototype, "position", 2);
378
- l([
379
- A("dialog")
380
- ], r.prototype, "_dialog", 2);
381
- customElements.define(b, r);
1566
+ f.styles = at(Qt);
1567
+ g([
1568
+ v({ type: Object })
1569
+ ], f.prototype, "aria", 2);
1570
+ g([
1571
+ v({ type: String }),
1572
+ vt(Z)
1573
+ ], f.prototype, "heading", 2);
1574
+ g([
1575
+ v(),
1576
+ _e(Z, ei, "h2")
1577
+ ], f.prototype, "headingLevel", 2);
1578
+ g([
1579
+ v({ type: Boolean })
1580
+ ], f.prototype, "hasBackButton", 2);
1581
+ g([
1582
+ v({ type: Boolean })
1583
+ ], f.prototype, "hasStackedActions", 2);
1584
+ g([
1585
+ v({ type: Boolean, reflect: !0 })
1586
+ ], f.prototype, "isDismissible", 2);
1587
+ g([
1588
+ v({ type: Boolean })
1589
+ ], f.prototype, "isFooterPinned", 2);
1590
+ g([
1591
+ v({ type: Boolean })
1592
+ ], f.prototype, "isFullWidthBelowMid", 2);
1593
+ g([
1594
+ v({ type: Boolean, reflect: !0 })
1595
+ ], f.prototype, "isLoading", 2);
1596
+ g([
1597
+ v({ type: Boolean })
1598
+ ], f.prototype, "isOpen", 2);
1599
+ g([
1600
+ v({ type: Object })
1601
+ ], f.prototype, "leadingAction", 2);
1602
+ g([
1603
+ v(),
1604
+ _e(Z, ii, "center")
1605
+ ], f.prototype, "position", 2);
1606
+ g([
1607
+ v()
1608
+ ], f.prototype, "returnFocusAfterCloseSelector", 2);
1609
+ g([
1610
+ v(),
1611
+ _e(Z, ti, "medium")
1612
+ ], f.prototype, "size", 2);
1613
+ g([
1614
+ v({ type: Object })
1615
+ ], f.prototype, "supportingAction", 2);
1616
+ g([
1617
+ ct("dialog")
1618
+ ], f.prototype, "_dialog", 2);
1619
+ customElements.define(Z, f);
382
1620
  export {
383
- r as PieModal,
384
- K as headingLevels,
385
- ee as sizes
1621
+ f as PieModal,
1622
+ ei as headingLevels,
1623
+ ti as sizes
386
1624
  };