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