@justeattakeaway/pie-modal 0.18.0 → 0.19.1
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 +19 -0
- package/dist/index.js +695 -692
- package/dist/react.d.ts +21 -0
- package/dist/react.js +53 -1569
- package/package.json +2 -1
- package/src/defs.ts +16 -0
- package/src/index.ts +17 -2
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { nothing as
|
|
2
|
-
import { html as _, unsafeStatic as
|
|
3
|
-
import { property as v, query 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 y, unsafeCSS as le, LitElement as de } from "lit";
|
|
2
|
+
import { html as _, unsafeStatic as ce } from "lit/static-html.js";
|
|
3
|
+
import { property as v, query as he } from "lit/decorators.js";
|
|
4
|
+
import { property as ue } from "lit/decorators/property.js";
|
|
5
|
+
var pe = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, fe = (i, t, e, o) => {
|
|
6
|
+
for (var n = o > 1 ? void 0 : o ? ge(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 && pe(t, e, n), n;
|
|
9
9
|
};
|
|
10
|
-
const
|
|
11
|
-
class
|
|
10
|
+
const me = (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 fe([
|
|
30
|
+
ue({ 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
|
+
}, ve = (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,342 +56,342 @@ const gt = (i) => {
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
-
function
|
|
59
|
+
function be(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),
|
|
77
|
-
return
|
|
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), k = [], tt = !1, qt = -1, B = void 0, E = void 0, R = void 0, Wt = function(t) {
|
|
77
|
+
return k.some(function(e) {
|
|
78
|
+
return !!(e.options.allowTouchMove && e.options.allowTouchMove(t));
|
|
79
79
|
});
|
|
80
|
-
},
|
|
81
|
-
var
|
|
82
|
-
return
|
|
83
|
-
},
|
|
84
|
-
if (
|
|
85
|
-
var
|
|
86
|
-
if (
|
|
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
|
+
}, ye = function(t) {
|
|
84
|
+
if (R === void 0) {
|
|
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
|
+
R = document.body.style.paddingRight, document.body.style.paddingRight = n + o + "px";
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
},
|
|
91
|
+
B === void 0 && (B = document.body.style.overflow, document.body.style.overflow = "hidden");
|
|
92
|
+
}, _e = function() {
|
|
93
|
+
R !== void 0 && (document.body.style.paddingRight = R, R = void 0), B !== void 0 && (document.body.style.overflow = B, B = void 0);
|
|
94
|
+
}, we = function() {
|
|
95
95
|
return window.requestAnimationFrame(function() {
|
|
96
|
-
if (
|
|
97
|
-
|
|
96
|
+
if (E === void 0) {
|
|
97
|
+
E = {
|
|
98
98
|
position: document.body.style.position,
|
|
99
99
|
top: document.body.style.top,
|
|
100
100
|
left: document.body.style.left
|
|
101
101
|
};
|
|
102
|
-
var
|
|
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
|
-
},
|
|
112
|
-
if (
|
|
113
|
-
var
|
|
114
|
-
document.body.style.position =
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
return
|
|
118
|
-
},
|
|
119
|
-
var o =
|
|
120
|
-
return
|
|
121
|
-
},
|
|
122
|
-
if (!
|
|
111
|
+
}, $e = function() {
|
|
112
|
+
if (E !== void 0) {
|
|
113
|
+
var t = -parseInt(document.body.style.top, 10), e = -parseInt(document.body.style.left, 10);
|
|
114
|
+
document.body.style.position = E.position, document.body.style.top = E.top, document.body.style.left = E.left, window.scrollTo(e, t), E = void 0;
|
|
115
|
+
}
|
|
116
|
+
}, Ae = function(t) {
|
|
117
|
+
return t ? t.scrollHeight - t.scrollTop <= t.clientHeight : !1;
|
|
118
|
+
}, Ee = function(t, e) {
|
|
119
|
+
var o = t.targetTouches[0].clientY - qt;
|
|
120
|
+
return Wt(t.target) ? !1 : e && e.scrollTop === 0 && o > 0 || Ae(e) && o < 0 ? et(t) : (t.stopPropagation(), !0);
|
|
121
|
+
}, Se = 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
|
-
if (!
|
|
127
|
-
return n.targetElement ===
|
|
126
|
+
if (!k.some(function(n) {
|
|
127
|
+
return n.targetElement === t;
|
|
128
128
|
})) {
|
|
129
129
|
var o = {
|
|
130
|
-
targetElement:
|
|
131
|
-
options:
|
|
130
|
+
targetElement: t,
|
|
131
|
+
options: e || {}
|
|
132
132
|
};
|
|
133
|
-
|
|
134
|
-
n.targetTouches.length === 1 && (
|
|
135
|
-
},
|
|
136
|
-
n.targetTouches.length === 1 &&
|
|
137
|
-
},
|
|
133
|
+
k = [].concat(be(k), [o]), Q ? we() : ye(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 && Ee(n, t);
|
|
137
|
+
}, tt || (document.addEventListener("touchmove", et, wt ? { passive: !1 } : void 0), tt = !0));
|
|
138
138
|
}
|
|
139
|
-
},
|
|
140
|
-
if (!
|
|
139
|
+
}, ke = 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
|
-
|
|
145
|
-
return
|
|
146
|
-
}), Q && (
|
|
144
|
+
k = k.filter(function(e) {
|
|
145
|
+
return e.targetElement !== t;
|
|
146
|
+
}), Q && (t.ontouchstart = null, t.ontouchmove = null, tt && k.length === 0 && (document.removeEventListener("touchmove", et, wt ? { passive: !1 } : void 0), tt = !1)), Q ? $e() : _e();
|
|
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 xe = (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
|
+
}, Ce = (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 xe(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, Me = zt ? zt.emptyScript : "", Ot = it.reactiveElementPolyfillSupport, vt = { toAttribute(i, t) {
|
|
209
|
+
switch (t) {
|
|
210
210
|
case Boolean:
|
|
211
|
-
i = i ?
|
|
211
|
+
i = i ? Me : 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
|
-
} },
|
|
237
|
-
let
|
|
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
|
+
let z = class extends HTMLElement {
|
|
238
238
|
constructor() {
|
|
239
|
-
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.
|
|
239
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
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
|
-
|
|
297
|
-
var
|
|
298
|
-
this._$E_ = new Promise((
|
|
296
|
+
_$Eu() {
|
|
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 Ce(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,104 +402,107 @@ 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
|
-
|
|
416
|
+
z[bt] = !0, z.elementProperties = /* @__PURE__ */ new Map(), z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, Ot == null || Ot({ ReactiveElement: z }), ((at = it.reactiveElementVersions) !== null && at !== void 0 ? at : it.reactiveElementVersions = []).push("1.6.3");
|
|
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]`, N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
425
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
426
|
-
|
|
427
|
-
let n, r = e === 2 ? "<svg>" : "", s = N;
|
|
428
|
-
for (let a = 0; a < t; a++) {
|
|
429
|
-
const d = i[a];
|
|
430
|
-
let y, h, u = -1, m = 0;
|
|
431
|
-
for (; m < d.length && (s.lastIndex = m, h = s.exec(d), h !== null); )
|
|
432
|
-
m = s.lastIndex, s === N ? h[1] === "!--" ? s = De : h[1] !== void 0 ? s = Le : h[2] !== void 0 ? (Ge.test(h[2]) && (n = RegExp("</" + h[2], "g")), s = E) : h[3] !== void 0 && (s = E) : s === E ? h[0] === ">" ? (s = n ?? N, u = -1) : h[1] === void 0 ? u = -2 : (u = s.lastIndex - h[2].length, y = h[1], s = h[3] === void 0 ? E : h[3] === '"' ? Ie : Te) : s === Ie || s === Te ? s = E : s === De || s === Le ? s = N : (s = E, n = void 0);
|
|
433
|
-
const A = s === E && i[a + 1].startsWith("/>") ? " " : "";
|
|
434
|
-
r += s === N ? d + Mt : u >= 0 ? (o.push(y), d.slice(0, u) + ye + d.slice(u) + $ + A) : d + $ + (u === -2 ? (o.push(void 0), a) : A);
|
|
435
|
-
}
|
|
436
|
-
const l = r + (i[t] || "<?>") + (e === 2 ? "</svg>" : "");
|
|
422
|
+
var dt;
|
|
423
|
+
const ot = window, P = ot.trustedTypes, Pt = P ? P.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, yt = "$lit$", $ = `lit$${(Math.random() + "").slice(9)}$`, Zt = "?" + $, ze = `<${Zt}>`, C = document, U = () => C.createComment(""), F = (i) => i === null || typeof i != "object" && typeof i != "function", Gt = Array.isArray, Oe = (i) => Gt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", ct = `[
|
|
424
|
+
\f\r]`, N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dt = /-->/g, Lt = />/g, A = RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
|
425
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Tt = /'/g, It = /"/g, Xt = /^(?:script|style|textarea|title)$/i, Pe = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), St = Pe(1), D = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), Nt = /* @__PURE__ */ new WeakMap(), S = C.createTreeWalker(C, 129, null, !1);
|
|
426
|
+
function Jt(i, t) {
|
|
437
427
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
438
428
|
throw Error("invalid template strings array");
|
|
439
|
-
return
|
|
429
|
+
return Pt !== void 0 ? Pt.createHTML(t) : t;
|
|
430
|
+
}
|
|
431
|
+
const De = (i, t) => {
|
|
432
|
+
const e = i.length - 1, o = [];
|
|
433
|
+
let n, r = t === 2 ? "<svg>" : "", s = N;
|
|
434
|
+
for (let l = 0; l < e; l++) {
|
|
435
|
+
const a = i[l];
|
|
436
|
+
let d, h, u = -1, p = 0;
|
|
437
|
+
for (; p < a.length && (s.lastIndex = p, h = s.exec(a), h !== null); )
|
|
438
|
+
p = s.lastIndex, s === N ? h[1] === "!--" ? s = Dt : h[1] !== void 0 ? s = Lt : h[2] !== void 0 ? (Xt.test(h[2]) && (n = RegExp("</" + h[2], "g")), s = A) : h[3] !== void 0 && (s = A) : s === A ? h[0] === ">" ? (s = n ?? N, u = -1) : h[1] === void 0 ? u = -2 : (u = s.lastIndex - h[2].length, d = h[1], s = h[3] === void 0 ? A : h[3] === '"' ? It : Tt) : s === It || s === Tt ? s = A : s === Dt || s === Lt ? s = N : (s = A, n = void 0);
|
|
439
|
+
const b = s === A && i[l + 1].startsWith("/>") ? " " : "";
|
|
440
|
+
r += s === N ? a + ze : u >= 0 ? (o.push(d), a.slice(0, u) + yt + a.slice(u) + $ + b) : a + $ + (u === -2 ? (o.push(void 0), l) : b);
|
|
441
|
+
}
|
|
442
|
+
return [Jt(i, r + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), o];
|
|
440
443
|
};
|
|
441
|
-
class
|
|
442
|
-
constructor({ strings:
|
|
444
|
+
class j {
|
|
445
|
+
constructor({ strings: t, _$litType$: e }, o) {
|
|
443
446
|
let n;
|
|
444
447
|
this.parts = [];
|
|
445
448
|
let r = 0, s = 0;
|
|
446
|
-
const l =
|
|
447
|
-
if (this.el =
|
|
448
|
-
const
|
|
449
|
-
|
|
449
|
+
const l = t.length - 1, a = this.parts, [d, h] = De(t, e);
|
|
450
|
+
if (this.el = j.createElement(d, o), S.currentNode = this.el.content, e === 2) {
|
|
451
|
+
const u = this.el.content, p = u.firstChild;
|
|
452
|
+
p.remove(), u.append(...p.childNodes);
|
|
450
453
|
}
|
|
451
|
-
for (; (n =
|
|
454
|
+
for (; (n = S.nextNode()) !== null && a.length < l; ) {
|
|
452
455
|
if (n.nodeType === 1) {
|
|
453
456
|
if (n.hasAttributes()) {
|
|
454
|
-
const
|
|
455
|
-
for (const
|
|
456
|
-
if (
|
|
457
|
-
const
|
|
458
|
-
if (
|
|
459
|
-
const
|
|
460
|
-
a.push({ type: 1, index: r, name:
|
|
457
|
+
const u = [];
|
|
458
|
+
for (const p of n.getAttributeNames())
|
|
459
|
+
if (p.endsWith(yt) || p.startsWith($)) {
|
|
460
|
+
const b = h[s++];
|
|
461
|
+
if (u.push(p), b !== void 0) {
|
|
462
|
+
const Z = n.getAttribute(b.toLowerCase() + yt).split($), G = /([.?@])?(.*)/.exec(b);
|
|
463
|
+
a.push({ type: 1, index: r, name: G[2], strings: Z, ctor: G[1] === "." ? Te : G[1] === "?" ? Ne : G[1] === "@" ? Be : st });
|
|
461
464
|
} else
|
|
462
465
|
a.push({ type: 6, index: r });
|
|
463
466
|
}
|
|
464
|
-
for (const
|
|
465
|
-
n.removeAttribute(
|
|
467
|
+
for (const p of u)
|
|
468
|
+
n.removeAttribute(p);
|
|
466
469
|
}
|
|
467
|
-
if (
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
470
|
-
n.textContent =
|
|
471
|
-
for (let
|
|
472
|
-
n.append(
|
|
473
|
-
n.append(
|
|
470
|
+
if (Xt.test(n.tagName)) {
|
|
471
|
+
const u = n.textContent.split($), p = u.length - 1;
|
|
472
|
+
if (p > 0) {
|
|
473
|
+
n.textContent = P ? P.emptyScript : "";
|
|
474
|
+
for (let b = 0; b < p; b++)
|
|
475
|
+
n.append(u[b], U()), S.nextNode(), a.push({ type: 2, index: ++r });
|
|
476
|
+
n.append(u[p], U());
|
|
474
477
|
}
|
|
475
478
|
}
|
|
476
479
|
} else if (n.nodeType === 8)
|
|
477
|
-
if (n.data ===
|
|
480
|
+
if (n.data === Zt)
|
|
478
481
|
a.push({ type: 2, index: r });
|
|
479
482
|
else {
|
|
480
|
-
let
|
|
481
|
-
for (; (
|
|
482
|
-
a.push({ type: 7, index: r }),
|
|
483
|
+
let u = -1;
|
|
484
|
+
for (; (u = n.data.indexOf($, u + 1)) !== -1; )
|
|
485
|
+
a.push({ type: 7, index: r }), u += $.length - 1;
|
|
483
486
|
}
|
|
484
487
|
r++;
|
|
485
488
|
}
|
|
486
489
|
}
|
|
487
|
-
static createElement(
|
|
488
|
-
const o =
|
|
489
|
-
return o.innerHTML =
|
|
490
|
+
static createElement(t, e) {
|
|
491
|
+
const o = C.createElement("template");
|
|
492
|
+
return o.innerHTML = t, o;
|
|
490
493
|
}
|
|
491
494
|
}
|
|
492
|
-
function
|
|
495
|
+
function L(i, t, e = i, o) {
|
|
493
496
|
var n, r, s, l;
|
|
494
|
-
if (
|
|
495
|
-
return
|
|
496
|
-
let a = o !== void 0 ? (n =
|
|
497
|
-
const d =
|
|
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,
|
|
497
|
+
if (t === D)
|
|
498
|
+
return t;
|
|
499
|
+
let a = o !== void 0 ? (n = e._$Co) === null || n === void 0 ? void 0 : n[o] : e._$Cl;
|
|
500
|
+
const d = F(t) ? void 0 : t._$litDirective$;
|
|
501
|
+
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 = L(i, a._$AS(i, t.values), a, o)), t;
|
|
499
502
|
}
|
|
500
|
-
class
|
|
501
|
-
constructor(
|
|
502
|
-
this._$AV = [], this._$AN = void 0, this._$AD =
|
|
503
|
+
class Le {
|
|
504
|
+
constructor(t, e) {
|
|
505
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
503
506
|
}
|
|
504
507
|
get parentNode() {
|
|
505
508
|
return this._$AM.parentNode;
|
|
@@ -507,39 +510,39 @@ class Dt {
|
|
|
507
510
|
get _$AU() {
|
|
508
511
|
return this._$AM._$AU;
|
|
509
512
|
}
|
|
510
|
-
u(
|
|
511
|
-
var
|
|
512
|
-
const { el: { content: o }, parts: n } = this._$AD, r = ((
|
|
513
|
-
|
|
514
|
-
let s =
|
|
513
|
+
u(t) {
|
|
514
|
+
var e;
|
|
515
|
+
const { el: { content: o }, parts: n } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : C).importNode(o, !0);
|
|
516
|
+
S.currentNode = r;
|
|
517
|
+
let s = S.nextNode(), l = 0, a = 0, d = n[0];
|
|
515
518
|
for (; d !== void 0; ) {
|
|
516
519
|
if (l === d.index) {
|
|
517
|
-
let
|
|
518
|
-
d.type === 2 ?
|
|
520
|
+
let h;
|
|
521
|
+
d.type === 2 ? h = new V(s, s.nextSibling, this, t) : d.type === 1 ? h = new d.ctor(s, d.name, d.strings, this, t) : d.type === 6 && (h = new Re(s, this, t)), this._$AV.push(h), d = n[++a];
|
|
519
522
|
}
|
|
520
|
-
l !== (d == null ? void 0 : d.index) && (s =
|
|
523
|
+
l !== (d == null ? void 0 : d.index) && (s = S.nextNode(), l++);
|
|
521
524
|
}
|
|
522
|
-
return
|
|
525
|
+
return S.currentNode = C, r;
|
|
523
526
|
}
|
|
524
|
-
v(
|
|
525
|
-
let
|
|
527
|
+
v(t) {
|
|
528
|
+
let e = 0;
|
|
526
529
|
for (const o of this._$AV)
|
|
527
|
-
o !== void 0 && (o.strings !== void 0 ? (o._$AI(
|
|
530
|
+
o !== void 0 && (o.strings !== void 0 ? (o._$AI(t, o, e), e += o.strings.length - 2) : o._$AI(t[e])), e++;
|
|
528
531
|
}
|
|
529
532
|
}
|
|
530
|
-
class
|
|
531
|
-
constructor(
|
|
533
|
+
class V {
|
|
534
|
+
constructor(t, e, o, n) {
|
|
532
535
|
var r;
|
|
533
|
-
this.type = 2, this._$AH =
|
|
536
|
+
this.type = 2, this._$AH = g, 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
537
|
}
|
|
535
538
|
get _$AU() {
|
|
536
|
-
var
|
|
537
|
-
return (
|
|
539
|
+
var t, e;
|
|
540
|
+
return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
|
|
538
541
|
}
|
|
539
542
|
get parentNode() {
|
|
540
|
-
let
|
|
541
|
-
const
|
|
542
|
-
return
|
|
543
|
+
let t = this._$AA.parentNode;
|
|
544
|
+
const e = this._$AM;
|
|
545
|
+
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
|
543
546
|
}
|
|
544
547
|
get startNode() {
|
|
545
548
|
return this._$AA;
|
|
@@ -547,55 +550,55 @@ class q {
|
|
|
547
550
|
get endNode() {
|
|
548
551
|
return this._$AB;
|
|
549
552
|
}
|
|
550
|
-
_$AI(
|
|
551
|
-
|
|
553
|
+
_$AI(t, e = this) {
|
|
554
|
+
t = L(this, t, e), F(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== D && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Oe(t) ? this.T(t) : this._(t);
|
|
552
555
|
}
|
|
553
|
-
k(
|
|
554
|
-
return this._$AA.parentNode.insertBefore(
|
|
556
|
+
k(t) {
|
|
557
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
555
558
|
}
|
|
556
|
-
$(
|
|
557
|
-
this._$AH !==
|
|
559
|
+
$(t) {
|
|
560
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
558
561
|
}
|
|
559
|
-
_(
|
|
560
|
-
this._$AH !==
|
|
562
|
+
_(t) {
|
|
563
|
+
this._$AH !== g && F(this._$AH) ? this._$AA.nextSibling.data = t : this.$(C.createTextNode(t)), this._$AH = t;
|
|
561
564
|
}
|
|
562
|
-
g(
|
|
563
|
-
var
|
|
564
|
-
const { values: o, _$litType$: n } =
|
|
565
|
-
if (((
|
|
565
|
+
g(t) {
|
|
566
|
+
var e;
|
|
567
|
+
const { values: o, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = j.createElement(Jt(n.h, n.h[0]), this.options)), n);
|
|
568
|
+
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
|
|
566
569
|
this._$AH.v(o);
|
|
567
570
|
else {
|
|
568
|
-
const s = new
|
|
571
|
+
const s = new Le(r, this), l = s.u(this.options);
|
|
569
572
|
s.v(o), this.$(l), this._$AH = s;
|
|
570
573
|
}
|
|
571
574
|
}
|
|
572
|
-
_$AC(
|
|
573
|
-
let
|
|
574
|
-
return
|
|
575
|
+
_$AC(t) {
|
|
576
|
+
let e = Nt.get(t.strings);
|
|
577
|
+
return e === void 0 && Nt.set(t.strings, e = new j(t)), e;
|
|
575
578
|
}
|
|
576
|
-
T(
|
|
577
|
-
|
|
578
|
-
const
|
|
579
|
+
T(t) {
|
|
580
|
+
Gt(this._$AH) || (this._$AH = [], this._$AR());
|
|
581
|
+
const e = this._$AH;
|
|
579
582
|
let o, n = 0;
|
|
580
|
-
for (const r of
|
|
581
|
-
n ===
|
|
582
|
-
n <
|
|
583
|
+
for (const r of t)
|
|
584
|
+
n === e.length ? e.push(o = new V(this.k(U()), this.k(U()), this, this.options)) : o = e[n], o._$AI(r), n++;
|
|
585
|
+
n < e.length && (this._$AR(o && o._$AB.nextSibling, n), e.length = n);
|
|
583
586
|
}
|
|
584
|
-
_$AR(
|
|
587
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
|
585
588
|
var o;
|
|
586
|
-
for ((o = this._$AP) === null || o === void 0 || o.call(this, !1, !0,
|
|
587
|
-
const n =
|
|
588
|
-
|
|
589
|
+
for ((o = this._$AP) === null || o === void 0 || o.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
590
|
+
const n = t.nextSibling;
|
|
591
|
+
t.remove(), t = n;
|
|
589
592
|
}
|
|
590
593
|
}
|
|
591
|
-
setConnected(
|
|
592
|
-
var
|
|
593
|
-
this._$AM === void 0 && (this._$Cp =
|
|
594
|
+
setConnected(t) {
|
|
595
|
+
var e;
|
|
596
|
+
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
|
594
597
|
}
|
|
595
598
|
}
|
|
596
|
-
class
|
|
597
|
-
constructor(
|
|
598
|
-
this.type = 1, this._$AH =
|
|
599
|
+
class st {
|
|
600
|
+
constructor(t, e, o, n, r) {
|
|
601
|
+
this.type = 1, this._$AH = g, 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 = g;
|
|
599
602
|
}
|
|
600
603
|
get tagName() {
|
|
601
604
|
return this.element.tagName;
|
|
@@ -603,76 +606,76 @@ class se {
|
|
|
603
606
|
get _$AU() {
|
|
604
607
|
return this._$AM._$AU;
|
|
605
608
|
}
|
|
606
|
-
_$AI(
|
|
609
|
+
_$AI(t, e = this, o, n) {
|
|
607
610
|
const r = this.strings;
|
|
608
611
|
let s = !1;
|
|
609
612
|
if (r === void 0)
|
|
610
|
-
|
|
613
|
+
t = L(this, t, e, 0), s = !F(t) || t !== this._$AH && t !== D, s && (this._$AH = t);
|
|
611
614
|
else {
|
|
612
|
-
const l =
|
|
615
|
+
const l = t;
|
|
613
616
|
let a, d;
|
|
614
|
-
for (
|
|
615
|
-
d =
|
|
617
|
+
for (t = r[0], a = 0; a < r.length - 1; a++)
|
|
618
|
+
d = L(this, l[o + a], e, a), d === D && (d = this._$AH[a]), s || (s = !F(d) || d !== this._$AH[a]), d === g ? t = g : t !== g && (t += (d ?? "") + r[a + 1]), this._$AH[a] = d;
|
|
616
619
|
}
|
|
617
|
-
s && !n && this.j(
|
|
620
|
+
s && !n && this.j(t);
|
|
618
621
|
}
|
|
619
|
-
j(
|
|
620
|
-
|
|
622
|
+
j(t) {
|
|
623
|
+
t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
621
624
|
}
|
|
622
625
|
}
|
|
623
|
-
class
|
|
626
|
+
class Te extends st {
|
|
624
627
|
constructor() {
|
|
625
628
|
super(...arguments), this.type = 3;
|
|
626
629
|
}
|
|
627
|
-
j(
|
|
628
|
-
this.element[this.name] =
|
|
630
|
+
j(t) {
|
|
631
|
+
this.element[this.name] = t === g ? void 0 : t;
|
|
629
632
|
}
|
|
630
633
|
}
|
|
631
|
-
const
|
|
632
|
-
class
|
|
634
|
+
const Ie = P ? P.emptyScript : "";
|
|
635
|
+
class Ne extends st {
|
|
633
636
|
constructor() {
|
|
634
637
|
super(...arguments), this.type = 4;
|
|
635
638
|
}
|
|
636
|
-
j(
|
|
637
|
-
|
|
639
|
+
j(t) {
|
|
640
|
+
t && t !== g ? this.element.setAttribute(this.name, Ie) : this.element.removeAttribute(this.name);
|
|
638
641
|
}
|
|
639
642
|
}
|
|
640
|
-
class
|
|
641
|
-
constructor(
|
|
642
|
-
super(
|
|
643
|
+
class Be extends st {
|
|
644
|
+
constructor(t, e, o, n, r) {
|
|
645
|
+
super(t, e, o, n, r), this.type = 5;
|
|
643
646
|
}
|
|
644
|
-
_$AI(
|
|
647
|
+
_$AI(t, e = this) {
|
|
645
648
|
var o;
|
|
646
|
-
if ((
|
|
649
|
+
if ((t = (o = L(this, t, e, 0)) !== null && o !== void 0 ? o : g) === D)
|
|
647
650
|
return;
|
|
648
|
-
const n = this._$AH, r =
|
|
649
|
-
r && this.element.removeEventListener(this.name, this, n), s && this.element.addEventListener(this.name, this,
|
|
651
|
+
const n = this._$AH, r = t === g && n !== g || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, s = t !== g && (n === g || r);
|
|
652
|
+
r && this.element.removeEventListener(this.name, this, n), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
650
653
|
}
|
|
651
|
-
handleEvent(
|
|
652
|
-
var
|
|
653
|
-
typeof this._$AH == "function" ? this._$AH.call((o = (
|
|
654
|
+
handleEvent(t) {
|
|
655
|
+
var e, o;
|
|
656
|
+
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
657
|
}
|
|
655
658
|
}
|
|
656
|
-
class
|
|
657
|
-
constructor(
|
|
658
|
-
this.element =
|
|
659
|
+
class Re {
|
|
660
|
+
constructor(t, e, o) {
|
|
661
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = o;
|
|
659
662
|
}
|
|
660
663
|
get _$AU() {
|
|
661
664
|
return this._$AM._$AU;
|
|
662
665
|
}
|
|
663
|
-
_$AI(
|
|
664
|
-
|
|
666
|
+
_$AI(t) {
|
|
667
|
+
L(this, t);
|
|
665
668
|
}
|
|
666
669
|
}
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
const
|
|
670
|
+
const Bt = ot.litHtmlPolyfillSupport;
|
|
671
|
+
Bt == null || Bt(j, V), ((dt = ot.litHtmlVersions) !== null && dt !== void 0 ? dt : ot.litHtmlVersions = []).push("2.8.0");
|
|
672
|
+
const He = (i, t, e) => {
|
|
670
673
|
var o, n;
|
|
671
|
-
const r = (o =
|
|
674
|
+
const r = (o = e == null ? void 0 : e.renderBefore) !== null && o !== void 0 ? o : t;
|
|
672
675
|
let s = r._$litPart$;
|
|
673
676
|
if (s === void 0) {
|
|
674
|
-
const l = (n =
|
|
675
|
-
r._$litPart$ = s = new
|
|
677
|
+
const l = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : null;
|
|
678
|
+
r._$litPart$ = s = new V(t.insertBefore(U(), l), l, void 0, e ?? {});
|
|
676
679
|
}
|
|
677
680
|
return s._$AI(i), s;
|
|
678
681
|
};
|
|
@@ -681,69 +684,69 @@ const Rt = (i, e, t) => {
|
|
|
681
684
|
* Copyright 2017 Google LLC
|
|
682
685
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
683
686
|
*/
|
|
684
|
-
var
|
|
685
|
-
class
|
|
687
|
+
var ht, ut;
|
|
688
|
+
class x extends z {
|
|
686
689
|
constructor() {
|
|
687
690
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
688
691
|
}
|
|
689
692
|
createRenderRoot() {
|
|
690
|
-
var
|
|
693
|
+
var t, e;
|
|
691
694
|
const o = super.createRenderRoot();
|
|
692
|
-
return (
|
|
695
|
+
return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = o.firstChild), o;
|
|
693
696
|
}
|
|
694
|
-
update(
|
|
695
|
-
const
|
|
696
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(
|
|
697
|
+
update(t) {
|
|
698
|
+
const e = this.render();
|
|
699
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = He(e, this.renderRoot, this.renderOptions);
|
|
697
700
|
}
|
|
698
701
|
connectedCallback() {
|
|
699
|
-
var
|
|
700
|
-
super.connectedCallback(), (
|
|
702
|
+
var t;
|
|
703
|
+
super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
|
|
701
704
|
}
|
|
702
705
|
disconnectedCallback() {
|
|
703
|
-
var
|
|
704
|
-
super.disconnectedCallback(), (
|
|
706
|
+
var t;
|
|
707
|
+
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
705
708
|
}
|
|
706
709
|
render() {
|
|
707
|
-
return
|
|
710
|
+
return D;
|
|
708
711
|
}
|
|
709
712
|
}
|
|
710
|
-
|
|
711
|
-
const
|
|
712
|
-
|
|
713
|
-
((
|
|
713
|
+
x.finalized = !0, x._$litElement$ = !0, (ht = globalThis.litElementHydrateSupport) === null || ht === void 0 || ht.call(globalThis, { LitElement: x });
|
|
714
|
+
const Rt = globalThis.litElementPolyfillSupport;
|
|
715
|
+
Rt == null || Rt({ LitElement: x });
|
|
716
|
+
((ut = globalThis.litElementVersions) !== null && ut !== void 0 ? ut : globalThis.litElementVersions = []).push("3.3.3");
|
|
714
717
|
/**
|
|
715
718
|
* @license
|
|
716
719
|
* Copyright 2017 Google LLC
|
|
717
720
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
718
721
|
*/
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey:
|
|
722
|
-
typeof
|
|
723
|
-
}, finisher(
|
|
724
|
-
|
|
725
|
-
} },
|
|
726
|
-
|
|
722
|
+
const Ue = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
|
|
723
|
+
e.createProperty(t.key, i);
|
|
724
|
+
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
725
|
+
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
726
|
+
}, finisher(e) {
|
|
727
|
+
e.createProperty(t.key, i);
|
|
728
|
+
} }, Fe = (i, t, e) => {
|
|
729
|
+
t.constructor.createProperty(e, i);
|
|
727
730
|
};
|
|
728
|
-
function
|
|
729
|
-
return (
|
|
731
|
+
function I(i) {
|
|
732
|
+
return (t, e) => e !== void 0 ? Fe(i, t, e) : Ue(i, t);
|
|
730
733
|
}
|
|
731
734
|
/**
|
|
732
735
|
* @license
|
|
733
736
|
* Copyright 2017 Google LLC
|
|
734
737
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
735
738
|
*/
|
|
736
|
-
const
|
|
739
|
+
const je = ({ finisher: i, descriptor: t }) => (e, o) => {
|
|
737
740
|
var n;
|
|
738
741
|
if (o === void 0) {
|
|
739
|
-
const r = (n =
|
|
742
|
+
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
743
|
return i != null && (s.finisher = function(l) {
|
|
741
744
|
i(l, r);
|
|
742
745
|
}), s;
|
|
743
746
|
}
|
|
744
747
|
{
|
|
745
|
-
const r =
|
|
746
|
-
|
|
748
|
+
const r = e.constructor;
|
|
749
|
+
t !== void 0 && Object.defineProperty(e, o, t(o)), i == null || i(r, o);
|
|
747
750
|
}
|
|
748
751
|
};
|
|
749
752
|
/**
|
|
@@ -751,14 +754,14 @@ const Ft = ({ finisher: i, descriptor: e }) => (t, o) => {
|
|
|
751
754
|
* Copyright 2017 Google LLC
|
|
752
755
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
753
756
|
*/
|
|
754
|
-
function
|
|
755
|
-
return
|
|
757
|
+
function kt(i, t) {
|
|
758
|
+
return je({ descriptor: (e) => {
|
|
756
759
|
const o = { get() {
|
|
757
760
|
var n, r;
|
|
758
761
|
return (r = (n = this.renderRoot) === null || n === void 0 ? void 0 : n.querySelector(i)) !== null && r !== void 0 ? r : null;
|
|
759
762
|
}, enumerable: !0, configurable: !0 };
|
|
760
|
-
if (
|
|
761
|
-
const n = typeof
|
|
763
|
+
if (t) {
|
|
764
|
+
const n = typeof e == "symbol" ? Symbol() : "__" + e;
|
|
762
765
|
o.get = function() {
|
|
763
766
|
var r, s;
|
|
764
767
|
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 +775,69 @@ function ke(i, e) {
|
|
|
772
775
|
* Copyright 2021 Google LLC
|
|
773
776
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
774
777
|
*/
|
|
775
|
-
var
|
|
776
|
-
((
|
|
777
|
-
const
|
|
778
|
+
var pt;
|
|
779
|
+
((pt = window.HTMLSlotElement) === null || pt === void 0 ? void 0 : pt.prototype.assignedElements) != null;
|
|
780
|
+
const nt = {
|
|
778
781
|
xs: 16,
|
|
779
782
|
s: 20,
|
|
780
783
|
m: 24,
|
|
781
784
|
l: 28,
|
|
782
785
|
xl: 32,
|
|
783
786
|
xxl: 40
|
|
784
|
-
},
|
|
785
|
-
function
|
|
786
|
-
const o = parseInt(i, 10), n = o %
|
|
787
|
-
return o >=
|
|
787
|
+
}, Qt = Object.keys(nt), te = "xs", ee = 8, rt = 32;
|
|
788
|
+
function Ve(i, t, e) {
|
|
789
|
+
const o = parseInt(i, 10), n = o % e === 0;
|
|
790
|
+
return o >= t && n;
|
|
788
791
|
}
|
|
789
|
-
const
|
|
790
|
-
large: (i) =>
|
|
791
|
-
regular: (i) =>
|
|
792
|
+
const ie = {
|
|
793
|
+
large: (i) => Ve(i, rt, ee),
|
|
794
|
+
regular: (i) => Qt.includes(i)
|
|
792
795
|
};
|
|
793
|
-
function
|
|
794
|
-
const
|
|
795
|
-
return { isValid:
|
|
796
|
+
function qe(i) {
|
|
797
|
+
const t = ie.large(i);
|
|
798
|
+
return { isValid: t, size: t ? i : rt };
|
|
796
799
|
}
|
|
797
|
-
function
|
|
798
|
-
const
|
|
799
|
-
return { isValid:
|
|
800
|
+
function We(i) {
|
|
801
|
+
const t = ie.regular(i), e = t ? nt[i] : nt[te];
|
|
802
|
+
return { isValid: t, size: e };
|
|
800
803
|
}
|
|
801
|
-
const
|
|
804
|
+
const T = (i, t, e, o) => {
|
|
802
805
|
const n = i.endsWith("Large") || i.endsWith("-large");
|
|
803
806
|
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 ${
|
|
807
|
+
if (e) {
|
|
808
|
+
if ({ isValid: r, size: s } = n ? qe(e) : We(e), !r) {
|
|
809
|
+
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 ${ee}.` : `Invalid prop "size" value supplied to "${o}". The prop value should be one of the following values: ${Qt.join(", ")}.`;
|
|
807
810
|
console.error(l);
|
|
808
811
|
}
|
|
809
812
|
} else
|
|
810
|
-
s = n ?
|
|
813
|
+
s = n ? rt : nt[te];
|
|
811
814
|
return {
|
|
812
|
-
class: [i,
|
|
815
|
+
class: [i, t].filter(Boolean).join(" "),
|
|
813
816
|
width: s,
|
|
814
817
|
height: s
|
|
815
818
|
};
|
|
816
|
-
},
|
|
817
|
-
class
|
|
819
|
+
}, Ht = "icon-close";
|
|
820
|
+
class q extends x {
|
|
818
821
|
constructor() {
|
|
819
822
|
super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--close";
|
|
820
823
|
}
|
|
821
824
|
connectedCallback() {
|
|
822
|
-
var
|
|
823
|
-
if (super.connectedCallback(), ((
|
|
824
|
-
const n =
|
|
825
|
-
(
|
|
825
|
+
var t, e, o;
|
|
826
|
+
if (super.connectedCallback(), ((t = this._svg) === null || t === void 0 ? void 0 : t.getAttribute("width")) === null) {
|
|
827
|
+
const n = T("c-pieIcon c-pieIcon--close", "", null, "IconClose");
|
|
828
|
+
(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
829
|
}
|
|
827
830
|
}
|
|
828
|
-
updated(
|
|
829
|
-
var
|
|
831
|
+
updated(t) {
|
|
832
|
+
var e, o;
|
|
830
833
|
let n;
|
|
831
|
-
|
|
834
|
+
t.has("size") && (n = T("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
835
|
}
|
|
833
836
|
render() {
|
|
834
|
-
return
|
|
837
|
+
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
838
|
}
|
|
836
839
|
}
|
|
837
|
-
|
|
840
|
+
q.styles = Et`
|
|
838
841
|
:host-context(pie-icon-button) svg,
|
|
839
842
|
:host-context(pie-button) svg {
|
|
840
843
|
display: block;
|
|
@@ -843,37 +846,37 @@ W.styles = Ee`
|
|
|
843
846
|
}
|
|
844
847
|
`;
|
|
845
848
|
w([
|
|
846
|
-
|
|
847
|
-
],
|
|
849
|
+
I({ type: String, reflect: !0 })
|
|
850
|
+
], q.prototype, "size", void 0);
|
|
848
851
|
w([
|
|
849
|
-
|
|
850
|
-
],
|
|
852
|
+
I({ type: String, reflect: !0 })
|
|
853
|
+
], q.prototype, "class", void 0);
|
|
851
854
|
w([
|
|
852
|
-
|
|
853
|
-
],
|
|
854
|
-
customElements.get(
|
|
855
|
-
const
|
|
856
|
-
class
|
|
855
|
+
kt("svg")
|
|
856
|
+
], q.prototype, "_svg", void 0);
|
|
857
|
+
customElements.get(Ht) === void 0 && customElements.define(Ht, q);
|
|
858
|
+
const Ut = "icon-chevron-left";
|
|
859
|
+
class W extends x {
|
|
857
860
|
constructor() {
|
|
858
861
|
super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--chevronLeft";
|
|
859
862
|
}
|
|
860
863
|
connectedCallback() {
|
|
861
|
-
var
|
|
862
|
-
if (super.connectedCallback(), ((
|
|
863
|
-
const n =
|
|
864
|
-
(
|
|
864
|
+
var t, e, o;
|
|
865
|
+
if (super.connectedCallback(), ((t = this._svg) === null || t === void 0 ? void 0 : t.getAttribute("width")) === null) {
|
|
866
|
+
const n = T("c-pieIcon c-pieIcon--chevronLeft", "", null, "IconChevronLeft");
|
|
867
|
+
(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
868
|
}
|
|
866
869
|
}
|
|
867
|
-
updated(
|
|
868
|
-
var
|
|
870
|
+
updated(t) {
|
|
871
|
+
var e, o;
|
|
869
872
|
let n;
|
|
870
|
-
|
|
873
|
+
t.has("size") && (n = T("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
874
|
}
|
|
872
875
|
render() {
|
|
873
|
-
return
|
|
876
|
+
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
877
|
}
|
|
875
878
|
}
|
|
876
|
-
|
|
879
|
+
W.styles = Et`
|
|
877
880
|
:host-context(pie-icon-button) svg,
|
|
878
881
|
:host-context(pie-button) svg {
|
|
879
882
|
display: block;
|
|
@@ -882,37 +885,37 @@ K.styles = Ee`
|
|
|
882
885
|
}
|
|
883
886
|
`;
|
|
884
887
|
w([
|
|
885
|
-
|
|
886
|
-
],
|
|
888
|
+
I({ type: String, reflect: !0 })
|
|
889
|
+
], W.prototype, "size", void 0);
|
|
887
890
|
w([
|
|
888
|
-
|
|
889
|
-
],
|
|
891
|
+
I({ type: String, reflect: !0 })
|
|
892
|
+
], W.prototype, "class", void 0);
|
|
890
893
|
w([
|
|
891
|
-
|
|
892
|
-
],
|
|
893
|
-
customElements.get(
|
|
894
|
-
const
|
|
895
|
-
class
|
|
894
|
+
kt("svg")
|
|
895
|
+
], W.prototype, "_svg", void 0);
|
|
896
|
+
customElements.get(Ut) === void 0 && customElements.define(Ut, W);
|
|
897
|
+
const Ft = "icon-chevron-right";
|
|
898
|
+
class K extends x {
|
|
896
899
|
constructor() {
|
|
897
900
|
super(...arguments), this.size = "xs", this.class = "c-pieIcon c-pieIcon--chevronRight";
|
|
898
901
|
}
|
|
899
902
|
connectedCallback() {
|
|
900
|
-
var
|
|
901
|
-
if (super.connectedCallback(), ((
|
|
902
|
-
const n =
|
|
903
|
-
(
|
|
903
|
+
var t, e, o;
|
|
904
|
+
if (super.connectedCallback(), ((t = this._svg) === null || t === void 0 ? void 0 : t.getAttribute("width")) === null) {
|
|
905
|
+
const n = T("c-pieIcon c-pieIcon--chevronRight", "", null, "IconChevronRight");
|
|
906
|
+
(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
907
|
}
|
|
905
908
|
}
|
|
906
|
-
updated(
|
|
907
|
-
var
|
|
909
|
+
updated(t) {
|
|
910
|
+
var e, o;
|
|
908
911
|
let n;
|
|
909
|
-
|
|
912
|
+
t.has("size") && (n = T("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
913
|
}
|
|
911
914
|
render() {
|
|
912
|
-
return
|
|
915
|
+
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
916
|
}
|
|
914
917
|
}
|
|
915
|
-
|
|
918
|
+
K.styles = Et`
|
|
916
919
|
:host-context(pie-icon-button) svg,
|
|
917
920
|
:host-context(pie-button) svg {
|
|
918
921
|
display: block;
|
|
@@ -921,37 +924,37 @@ Y.styles = Ee`
|
|
|
921
924
|
}
|
|
922
925
|
`;
|
|
923
926
|
w([
|
|
924
|
-
|
|
925
|
-
],
|
|
927
|
+
I({ type: String, reflect: !0 })
|
|
928
|
+
], K.prototype, "size", void 0);
|
|
926
929
|
w([
|
|
927
|
-
|
|
928
|
-
],
|
|
930
|
+
I({ type: String, reflect: !0 })
|
|
931
|
+
], K.prototype, "class", void 0);
|
|
929
932
|
w([
|
|
930
|
-
|
|
931
|
-
],
|
|
932
|
-
customElements.get(
|
|
933
|
-
var
|
|
934
|
-
(!
|
|
935
|
-
|
|
933
|
+
kt("svg")
|
|
934
|
+
], K.prototype, "_svg", void 0);
|
|
935
|
+
customElements.get(Ft) === void 0 && customElements.define(Ft, K);
|
|
936
|
+
var O = window.CustomEvent;
|
|
937
|
+
(!O || typeof O == "object") && (O = function(t, e) {
|
|
938
|
+
e = e || {};
|
|
936
939
|
var o = document.createEvent("CustomEvent");
|
|
937
|
-
return o.initCustomEvent(
|
|
938
|
-
},
|
|
939
|
-
function
|
|
940
|
-
var
|
|
941
|
-
return typeof i[
|
|
940
|
+
return o.initCustomEvent(t, !!e.bubbles, !!e.cancelable, e.detail || null), o;
|
|
941
|
+
}, O.prototype = window.Event.prototype);
|
|
942
|
+
function oe(i, t) {
|
|
943
|
+
var e = "on" + t.type.toLowerCase();
|
|
944
|
+
return typeof i[e] == "function" && i[e](t), i.dispatchEvent(t);
|
|
942
945
|
}
|
|
943
|
-
function
|
|
946
|
+
function Ke(i) {
|
|
944
947
|
for (; i && i !== document.body; ) {
|
|
945
|
-
var
|
|
946
|
-
return !(
|
|
948
|
+
var t = window.getComputedStyle(i), e = function(o, n) {
|
|
949
|
+
return !(t[o] === void 0 || t[o] === n);
|
|
947
950
|
};
|
|
948
|
-
if (
|
|
951
|
+
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
952
|
return !0;
|
|
950
953
|
i = i.parentElement;
|
|
951
954
|
}
|
|
952
955
|
return !1;
|
|
953
956
|
}
|
|
954
|
-
function
|
|
957
|
+
function H(i) {
|
|
955
958
|
for (; i; ) {
|
|
956
959
|
if (i.localName === "dialog")
|
|
957
960
|
return (
|
|
@@ -962,72 +965,72 @@ function U(i) {
|
|
|
962
965
|
}
|
|
963
966
|
return null;
|
|
964
967
|
}
|
|
965
|
-
function
|
|
968
|
+
function ne(i) {
|
|
966
969
|
for (; i && i.shadowRoot && i.shadowRoot.activeElement; )
|
|
967
970
|
i = i.shadowRoot.activeElement;
|
|
968
971
|
i && i.blur && i !== document.body && i.blur();
|
|
969
972
|
}
|
|
970
|
-
function
|
|
971
|
-
for (var
|
|
972
|
-
if (i[
|
|
973
|
+
function Ye(i, t) {
|
|
974
|
+
for (var e = 0; e < i.length; ++e)
|
|
975
|
+
if (i[e] === t)
|
|
973
976
|
return !0;
|
|
974
977
|
return !1;
|
|
975
978
|
}
|
|
976
|
-
function
|
|
979
|
+
function gt(i) {
|
|
977
980
|
return !i || !i.hasAttribute("method") ? !1 : i.getAttribute("method").toLowerCase() === "dialog";
|
|
978
981
|
}
|
|
979
|
-
function
|
|
980
|
-
var
|
|
982
|
+
function re(i) {
|
|
983
|
+
var t = ["button", "input", "keygen", "select", "textarea"], e = t.map(function(s) {
|
|
981
984
|
return s + ":not([disabled])";
|
|
982
985
|
});
|
|
983
|
-
|
|
984
|
-
var o = i.querySelector(
|
|
986
|
+
e.push('[tabindex]:not([disabled]):not([tabindex=""])');
|
|
987
|
+
var o = i.querySelector(e.join(", "));
|
|
985
988
|
if (!o && "attachShadow" in Element.prototype)
|
|
986
|
-
for (var n = i.querySelectorAll("*"), r = 0; r < n.length && !(n[r].tagName && n[r].shadowRoot && (o =
|
|
989
|
+
for (var n = i.querySelectorAll("*"), r = 0; r < n.length && !(n[r].tagName && n[r].shadowRoot && (o = re(n[r].shadowRoot), o)); r++)
|
|
987
990
|
;
|
|
988
991
|
return o;
|
|
989
992
|
}
|
|
990
|
-
function
|
|
993
|
+
function jt(i) {
|
|
991
994
|
return i.isConnected || document.body.contains(i);
|
|
992
995
|
}
|
|
993
|
-
function
|
|
996
|
+
function se(i) {
|
|
994
997
|
if (i.submitter)
|
|
995
998
|
return i.submitter;
|
|
996
|
-
var
|
|
997
|
-
if (!(
|
|
999
|
+
var t = i.target;
|
|
1000
|
+
if (!(t instanceof HTMLFormElement))
|
|
998
1001
|
return null;
|
|
999
|
-
var
|
|
1000
|
-
if (!
|
|
1002
|
+
var e = c.formSubmitter;
|
|
1003
|
+
if (!e) {
|
|
1001
1004
|
var o = i.target, n = "getRootNode" in o && o.getRootNode() || document;
|
|
1002
|
-
|
|
1005
|
+
e = n.activeElement;
|
|
1003
1006
|
}
|
|
1004
|
-
return !
|
|
1007
|
+
return !e || e.form !== t ? null : e;
|
|
1005
1008
|
}
|
|
1006
|
-
function
|
|
1009
|
+
function Ze(i) {
|
|
1007
1010
|
if (!i.defaultPrevented) {
|
|
1008
|
-
var
|
|
1011
|
+
var t = (
|
|
1009
1012
|
/** @type {!HTMLFormElement} */
|
|
1010
1013
|
i.target
|
|
1011
|
-
),
|
|
1012
|
-
|
|
1013
|
-
var n =
|
|
1014
|
+
), e = c.imagemapUseValue, o = se(i);
|
|
1015
|
+
e === null && o && (e = o.value);
|
|
1016
|
+
var n = H(t);
|
|
1014
1017
|
if (n) {
|
|
1015
|
-
var r = o && o.getAttribute("formmethod") ||
|
|
1016
|
-
r === "dialog" && (i.preventDefault(),
|
|
1018
|
+
var r = o && o.getAttribute("formmethod") || t.getAttribute("method");
|
|
1019
|
+
r === "dialog" && (i.preventDefault(), e != null ? n.close(e) : n.close());
|
|
1017
1020
|
}
|
|
1018
1021
|
}
|
|
1019
1022
|
}
|
|
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
|
-
|
|
1023
|
+
function ae(i) {
|
|
1024
|
+
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", Ze, !1), "returnValue" in i || (i.returnValue = ""), "MutationObserver" in window) {
|
|
1025
|
+
var t = new MutationObserver(this.maybeHideModal.bind(this));
|
|
1026
|
+
t.observe(i, { attributes: !0, attributeFilter: ["open"] });
|
|
1024
1027
|
} else {
|
|
1025
|
-
var
|
|
1026
|
-
|
|
1028
|
+
var e = !1, o = function() {
|
|
1029
|
+
e ? this.downgradeModal() : this.maybeHideModal(), e = !1;
|
|
1027
1030
|
}.bind(this), n, r = function(s) {
|
|
1028
1031
|
if (s.target === i) {
|
|
1029
1032
|
var l = "DOMNodeRemoved";
|
|
1030
|
-
|
|
1033
|
+
e |= s.type.substr(0, l.length) === l, window.clearTimeout(n), n = window.setTimeout(o, 0);
|
|
1031
1034
|
}
|
|
1032
1035
|
};
|
|
1033
1036
|
["DOMAttrModified", "DOMNodeRemoved", "DOMNodeRemovedFromDocument"].forEach(function(s) {
|
|
@@ -1039,7 +1042,7 @@ function st(i) {
|
|
|
1039
1042
|
get: i.hasAttribute.bind(i, "open")
|
|
1040
1043
|
}), 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
1044
|
}
|
|
1042
|
-
|
|
1045
|
+
ae.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
1043
1046
|
{
|
|
1044
1047
|
get dialog() {
|
|
1045
1048
|
return this.dialog_;
|
|
@@ -1050,7 +1053,7 @@ st.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
|
1050
1053
|
* longer open or is no longer part of the DOM.
|
|
1051
1054
|
*/
|
|
1052
1055
|
maybeHideModal: function() {
|
|
1053
|
-
this.dialog_.hasAttribute("open") &&
|
|
1056
|
+
this.dialog_.hasAttribute("open") && jt(this.dialog_) || this.downgradeModal();
|
|
1054
1057
|
},
|
|
1055
1058
|
/**
|
|
1056
1059
|
* Remove this dialog from the modal top layer, leaving it as a non-modal.
|
|
@@ -1074,11 +1077,11 @@ st.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
|
1074
1077
|
if (this.dialog_.hasAttribute("tabindex"))
|
|
1075
1078
|
this.dialog_.focus();
|
|
1076
1079
|
else {
|
|
1077
|
-
var
|
|
1078
|
-
this.dialog_.insertBefore(
|
|
1080
|
+
var t = document.createElement("div");
|
|
1081
|
+
this.dialog_.insertBefore(t, this.dialog_.firstChild), t.tabIndex = -1, t.focus(), this.dialog_.removeChild(t);
|
|
1079
1082
|
}
|
|
1080
|
-
var
|
|
1081
|
-
|
|
1083
|
+
var e = document.createEvent("MouseEvents");
|
|
1084
|
+
e.initMouseEvent(
|
|
1082
1085
|
i.type,
|
|
1083
1086
|
i.bubbles,
|
|
1084
1087
|
i.cancelable,
|
|
@@ -1094,7 +1097,7 @@ st.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
|
1094
1097
|
i.metaKey,
|
|
1095
1098
|
i.button,
|
|
1096
1099
|
i.relatedTarget
|
|
1097
|
-
), this.dialog_.dispatchEvent(
|
|
1100
|
+
), this.dialog_.dispatchEvent(e), i.stopPropagation();
|
|
1098
1101
|
},
|
|
1099
1102
|
/**
|
|
1100
1103
|
* Focuses on the first focusable element within the dialog. This will always blur the current
|
|
@@ -1102,7 +1105,7 @@ st.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
|
1102
1105
|
*/
|
|
1103
1106
|
focus_: function() {
|
|
1104
1107
|
var i = this.dialog_.querySelector("[autofocus]:not([disabled])");
|
|
1105
|
-
!i && this.dialog_.tabIndex >= 0 && (i = this.dialog_), i || (i =
|
|
1108
|
+
!i && this.dialog_.tabIndex >= 0 && (i = this.dialog_), i || (i = re(this.dialog_)), ne(document.activeElement), i && i.focus();
|
|
1106
1109
|
},
|
|
1107
1110
|
/**
|
|
1108
1111
|
* Sets the zIndex for the backdrop and dialog.
|
|
@@ -1110,10 +1113,10 @@ st.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
|
1110
1113
|
* @param {number} dialogZ
|
|
1111
1114
|
* @param {number} backdropZ
|
|
1112
1115
|
*/
|
|
1113
|
-
updateZIndex: function(i,
|
|
1114
|
-
if (i <
|
|
1116
|
+
updateZIndex: function(i, t) {
|
|
1117
|
+
if (i < t)
|
|
1115
1118
|
throw new Error("dialogZ should never be < backdropZ");
|
|
1116
|
-
this.dialog_.style.zIndex = i, this.backdrop_.style.zIndex =
|
|
1119
|
+
this.dialog_.style.zIndex = i, this.backdrop_.style.zIndex = t;
|
|
1117
1120
|
},
|
|
1118
1121
|
/**
|
|
1119
1122
|
* Shows the dialog. If the dialog is already open, this does nothing.
|
|
@@ -1127,11 +1130,11 @@ st.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
|
1127
1130
|
showModal: function() {
|
|
1128
1131
|
if (this.dialog_.hasAttribute("open"))
|
|
1129
1132
|
throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");
|
|
1130
|
-
if (!
|
|
1133
|
+
if (!jt(this.dialog_))
|
|
1131
1134
|
throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");
|
|
1132
1135
|
if (!c.dm.pushDialog(this))
|
|
1133
1136
|
throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");
|
|
1134
|
-
|
|
1137
|
+
Ke(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
1138
|
},
|
|
1136
1139
|
/**
|
|
1137
1140
|
* Closes this HTMLDialogElement. This is optional vs clearing the open
|
|
@@ -1143,23 +1146,23 @@ st.prototype = /** @type {HTMLDialogElement.prototype} */
|
|
|
1143
1146
|
if (!this.dialog_.hasAttribute("open"))
|
|
1144
1147
|
throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");
|
|
1145
1148
|
this.setOpen(!1), i !== void 0 && (this.dialog_.returnValue = i);
|
|
1146
|
-
var
|
|
1149
|
+
var t = new O("close", {
|
|
1147
1150
|
bubbles: !1,
|
|
1148
1151
|
cancelable: !1
|
|
1149
1152
|
});
|
|
1150
|
-
|
|
1153
|
+
oe(this.dialog_, t);
|
|
1151
1154
|
}
|
|
1152
1155
|
};
|
|
1153
1156
|
var c = {};
|
|
1154
1157
|
c.reposition = function(i) {
|
|
1155
|
-
var
|
|
1156
|
-
i.style.top = Math.max(
|
|
1158
|
+
var t = document.body.scrollTop || document.documentElement.scrollTop, e = t + (window.innerHeight - i.offsetHeight) / 2;
|
|
1159
|
+
i.style.top = Math.max(t, e) + "px";
|
|
1157
1160
|
};
|
|
1158
1161
|
c.isInlinePositionSetByStylesheet = function(i) {
|
|
1159
|
-
for (var
|
|
1160
|
-
var
|
|
1162
|
+
for (var t = 0; t < document.styleSheets.length; ++t) {
|
|
1163
|
+
var e = document.styleSheets[t], o = null;
|
|
1161
1164
|
try {
|
|
1162
|
-
o =
|
|
1165
|
+
o = e.cssRules;
|
|
1163
1166
|
} catch {
|
|
1164
1167
|
}
|
|
1165
1168
|
if (o)
|
|
@@ -1169,7 +1172,7 @@ c.isInlinePositionSetByStylesheet = function(i) {
|
|
|
1169
1172
|
s = document.querySelectorAll(r.selectorText);
|
|
1170
1173
|
} catch {
|
|
1171
1174
|
}
|
|
1172
|
-
if (!(!s || !
|
|
1175
|
+
if (!(!s || !Ye(s, i))) {
|
|
1173
1176
|
var l = r.style.getPropertyValue("top"), a = r.style.getPropertyValue("bottom");
|
|
1174
1177
|
if (l && l !== "auto" || a && a !== "auto")
|
|
1175
1178
|
return !0;
|
|
@@ -1179,13 +1182,13 @@ c.isInlinePositionSetByStylesheet = function(i) {
|
|
|
1179
1182
|
return !1;
|
|
1180
1183
|
};
|
|
1181
1184
|
c.needsCentering = function(i) {
|
|
1182
|
-
var
|
|
1183
|
-
return
|
|
1185
|
+
var t = window.getComputedStyle(i);
|
|
1186
|
+
return t.position !== "absolute" || i.style.top !== "auto" && i.style.top !== "" || i.style.bottom !== "auto" && i.style.bottom !== "" ? !1 : !c.isInlinePositionSetByStylesheet(i);
|
|
1184
1187
|
};
|
|
1185
1188
|
c.forceRegisterDialog = function(i) {
|
|
1186
1189
|
if ((window.HTMLDialogElement || i.showModal) && console.warn("This browser already supports <dialog>, the polyfill may not work correctly", i), i.localName !== "dialog")
|
|
1187
1190
|
throw new Error("Failed to register dialog: The element is not a dialog.");
|
|
1188
|
-
new
|
|
1191
|
+
new ae(
|
|
1189
1192
|
/** @type {!HTMLDialogElement} */
|
|
1190
1193
|
i
|
|
1191
1194
|
);
|
|
@@ -1196,19 +1199,19 @@ c.registerDialog = function(i) {
|
|
|
1196
1199
|
c.DialogManager = function() {
|
|
1197
1200
|
this.pendingDialogStack = [];
|
|
1198
1201
|
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
|
-
|
|
1202
|
+
this.overlay = document.createElement("div"), this.overlay.className = "_dialog_overlay", this.overlay.addEventListener("click", function(t) {
|
|
1203
|
+
this.forwardTab_ = void 0, t.stopPropagation(), i([]);
|
|
1204
|
+
}.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) {
|
|
1205
|
+
var e = [];
|
|
1206
|
+
t.forEach(function(o) {
|
|
1204
1207
|
for (var n = 0, r; r = o.removedNodes[n]; ++n) {
|
|
1205
1208
|
if (r instanceof Element)
|
|
1206
|
-
r.localName === "dialog" &&
|
|
1209
|
+
r.localName === "dialog" && e.push(r);
|
|
1207
1210
|
else
|
|
1208
1211
|
continue;
|
|
1209
|
-
|
|
1212
|
+
e = e.concat(r.querySelectorAll("dialog"));
|
|
1210
1213
|
}
|
|
1211
|
-
}),
|
|
1214
|
+
}), e.length && i(e);
|
|
1212
1215
|
}));
|
|
1213
1216
|
};
|
|
1214
1217
|
c.DialogManager.prototype.blockDocument = function() {
|
|
@@ -1218,8 +1221,8 @@ c.DialogManager.prototype.unblockDocument = function() {
|
|
|
1218
1221
|
document.documentElement.removeEventListener("focus", this.handleFocus_, !0), document.removeEventListener("keydown", this.handleKey_), this.mo_ && this.mo_.disconnect();
|
|
1219
1222
|
};
|
|
1220
1223
|
c.DialogManager.prototype.updateStacking = function() {
|
|
1221
|
-
for (var i = this.zIndexHigh_,
|
|
1222
|
-
|
|
1224
|
+
for (var i = this.zIndexHigh_, t = 0, e; e = this.pendingDialogStack[t]; ++t)
|
|
1225
|
+
e.updateZIndex(--i, --i), t === 0 && (this.overlay.style.zIndex = --i);
|
|
1223
1226
|
var o = this.pendingDialogStack[0];
|
|
1224
1227
|
if (o) {
|
|
1225
1228
|
var n = o.dialog.parentNode || document.body;
|
|
@@ -1228,181 +1231,185 @@ c.DialogManager.prototype.updateStacking = function() {
|
|
|
1228
1231
|
this.overlay.parentNode && this.overlay.parentNode.removeChild(this.overlay);
|
|
1229
1232
|
};
|
|
1230
1233
|
c.DialogManager.prototype.containedByTopDialog_ = function(i) {
|
|
1231
|
-
for (; i =
|
|
1232
|
-
for (var
|
|
1233
|
-
if (
|
|
1234
|
-
return
|
|
1234
|
+
for (; i = H(i); ) {
|
|
1235
|
+
for (var t = 0, e; e = this.pendingDialogStack[t]; ++t)
|
|
1236
|
+
if (e.dialog === i)
|
|
1237
|
+
return t === 0;
|
|
1235
1238
|
i = i.parentElement;
|
|
1236
1239
|
}
|
|
1237
1240
|
return !1;
|
|
1238
1241
|
};
|
|
1239
1242
|
c.DialogManager.prototype.handleFocus_ = function(i) {
|
|
1240
|
-
var
|
|
1241
|
-
if (!this.containedByTopDialog_(
|
|
1243
|
+
var t = i.composedPath ? i.composedPath()[0] : i.target;
|
|
1244
|
+
if (!this.containedByTopDialog_(t) && document.activeElement !== document.documentElement && (i.preventDefault(), i.stopPropagation(), ne(
|
|
1242
1245
|
/** @type {Element} */
|
|
1243
|
-
|
|
1246
|
+
t
|
|
1244
1247
|
), this.forwardTab_ !== void 0)) {
|
|
1245
|
-
var
|
|
1246
|
-
return n & Node.DOCUMENT_POSITION_PRECEDING && (this.forwardTab_ ?
|
|
1248
|
+
var e = this.pendingDialogStack[0], o = e.dialog, n = o.compareDocumentPosition(t);
|
|
1249
|
+
return n & Node.DOCUMENT_POSITION_PRECEDING && (this.forwardTab_ ? e.focus_() : t !== document.documentElement && document.documentElement.focus()), !1;
|
|
1247
1250
|
}
|
|
1248
1251
|
};
|
|
1249
1252
|
c.DialogManager.prototype.handleKey_ = function(i) {
|
|
1250
1253
|
if (this.forwardTab_ = void 0, i.keyCode === 27) {
|
|
1251
1254
|
i.preventDefault(), i.stopPropagation();
|
|
1252
|
-
var
|
|
1255
|
+
var t = new O("cancel", {
|
|
1253
1256
|
bubbles: !1,
|
|
1254
1257
|
cancelable: !0
|
|
1255
|
-
}),
|
|
1256
|
-
|
|
1258
|
+
}), e = this.pendingDialogStack[0];
|
|
1259
|
+
e && oe(e.dialog, t) && e.dialog.close();
|
|
1257
1260
|
} else
|
|
1258
1261
|
i.keyCode === 9 && (this.forwardTab_ = !i.shiftKey);
|
|
1259
1262
|
};
|
|
1260
1263
|
c.DialogManager.prototype.checkDOM_ = function(i) {
|
|
1261
|
-
var
|
|
1262
|
-
|
|
1263
|
-
i.indexOf(
|
|
1264
|
+
var t = this.pendingDialogStack.slice();
|
|
1265
|
+
t.forEach(function(e) {
|
|
1266
|
+
i.indexOf(e.dialog) !== -1 ? e.downgradeModal() : e.maybeHideModal();
|
|
1264
1267
|
});
|
|
1265
1268
|
};
|
|
1266
1269
|
c.DialogManager.prototype.pushDialog = function(i) {
|
|
1267
|
-
var
|
|
1268
|
-
return this.pendingDialogStack.length >=
|
|
1270
|
+
var t = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;
|
|
1271
|
+
return this.pendingDialogStack.length >= t ? !1 : (this.pendingDialogStack.unshift(i) === 1 && this.blockDocument(), this.updateStacking(), !0);
|
|
1269
1272
|
};
|
|
1270
1273
|
c.DialogManager.prototype.removeDialog = function(i) {
|
|
1271
|
-
var
|
|
1272
|
-
|
|
1274
|
+
var t = this.pendingDialogStack.indexOf(i);
|
|
1275
|
+
t !== -1 && (this.pendingDialogStack.splice(t, 1), this.pendingDialogStack.length === 0 && this.unblockDocument(), this.updateStacking());
|
|
1273
1276
|
};
|
|
1274
1277
|
c.dm = new c.DialogManager();
|
|
1275
1278
|
c.formSubmitter = null;
|
|
1276
1279
|
c.imagemapUseValue = null;
|
|
1277
1280
|
if (window.HTMLDialogElement === void 0) {
|
|
1278
|
-
var
|
|
1279
|
-
if (
|
|
1280
|
-
var
|
|
1281
|
-
if (
|
|
1282
|
-
var
|
|
1283
|
-
|
|
1284
|
-
return
|
|
1281
|
+
var Vt = document.createElement("form");
|
|
1282
|
+
if (Vt.setAttribute("method", "dialog"), Vt.method !== "dialog") {
|
|
1283
|
+
var M = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "method");
|
|
1284
|
+
if (M) {
|
|
1285
|
+
var Ge = M.get;
|
|
1286
|
+
M.get = function() {
|
|
1287
|
+
return gt(this) ? "dialog" : Ge.call(this);
|
|
1285
1288
|
};
|
|
1286
|
-
var
|
|
1287
|
-
|
|
1288
|
-
return typeof i == "string" && i.toLowerCase() === "dialog" ? this.setAttribute("method", i) :
|
|
1289
|
-
}, Object.defineProperty(HTMLFormElement.prototype, "method",
|
|
1289
|
+
var Xe = M.set;
|
|
1290
|
+
M.set = function(i) {
|
|
1291
|
+
return typeof i == "string" && i.toLowerCase() === "dialog" ? this.setAttribute("method", i) : Xe.call(this, i);
|
|
1292
|
+
}, Object.defineProperty(HTMLFormElement.prototype, "method", M);
|
|
1290
1293
|
}
|
|
1291
1294
|
}
|
|
1292
1295
|
document.addEventListener("click", function(i) {
|
|
1293
1296
|
if (c.formSubmitter = null, c.imagemapUseValue = null, !i.defaultPrevented) {
|
|
1294
|
-
var
|
|
1297
|
+
var t = (
|
|
1295
1298
|
/** @type {Element} */
|
|
1296
1299
|
i.target
|
|
1297
1300
|
);
|
|
1298
1301
|
if ("composedPath" in i) {
|
|
1299
|
-
var
|
|
1300
|
-
|
|
1302
|
+
var e = i.composedPath();
|
|
1303
|
+
t = e.shift() || t;
|
|
1301
1304
|
}
|
|
1302
|
-
if (!(!
|
|
1303
|
-
var o =
|
|
1305
|
+
if (!(!t || !gt(t.form))) {
|
|
1306
|
+
var o = t.type === "submit" && ["button", "input"].indexOf(t.localName) > -1;
|
|
1304
1307
|
if (!o) {
|
|
1305
|
-
if (!(
|
|
1308
|
+
if (!(t.localName === "input" && t.type === "image"))
|
|
1306
1309
|
return;
|
|
1307
1310
|
c.imagemapUseValue = i.offsetX + "," + i.offsetY;
|
|
1308
1311
|
}
|
|
1309
|
-
var n =
|
|
1310
|
-
n && (c.formSubmitter =
|
|
1312
|
+
var n = H(t);
|
|
1313
|
+
n && (c.formSubmitter = t);
|
|
1311
1314
|
}
|
|
1312
1315
|
}
|
|
1313
1316
|
}, !1), document.addEventListener("submit", function(i) {
|
|
1314
|
-
var
|
|
1315
|
-
if (!
|
|
1316
|
-
var o =
|
|
1317
|
+
var t = i.target, e = H(t);
|
|
1318
|
+
if (!e) {
|
|
1319
|
+
var o = se(i), n = o && o.getAttribute("formmethod") || t.getAttribute("method");
|
|
1317
1320
|
n === "dialog" && i.preventDefault();
|
|
1318
1321
|
}
|
|
1319
1322
|
});
|
|
1320
|
-
var
|
|
1321
|
-
if (!
|
|
1322
|
-
return
|
|
1323
|
-
var i =
|
|
1323
|
+
var Je = HTMLFormElement.prototype.submit, Qe = function() {
|
|
1324
|
+
if (!gt(this))
|
|
1325
|
+
return Je.call(this);
|
|
1326
|
+
var i = H(this);
|
|
1324
1327
|
i && i.close();
|
|
1325
1328
|
};
|
|
1326
|
-
HTMLFormElement.prototype.submit =
|
|
1329
|
+
HTMLFormElement.prototype.submit = Qe;
|
|
1327
1330
|
}
|
|
1328
|
-
const
|
|
1329
|
-
`, ei = ["h1", "h2", "h3", "h4", "h5", "h6"],
|
|
1330
|
-
var
|
|
1331
|
-
for (var n = o > 1 ? void 0 : o ?
|
|
1332
|
-
(s = i[r]) && (n = (o ? s(
|
|
1333
|
-
return o && n &&
|
|
1331
|
+
const ti = `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}
|
|
1332
|
+
`, ei = ["h1", "h2", "h3", "h4", "h5", "h6"], ii = ["small", "medium", "large"], oi = ["top", "center"], ft = "pie-modal-close", X = "pie-modal-open", mt = "pie-modal-back", ni = "pie-modal-leading-action-click", ri = "pie-modal-supporting-action-click";
|
|
1333
|
+
var si = Object.defineProperty, ai = Object.getOwnPropertyDescriptor, m = (i, t, e, o) => {
|
|
1334
|
+
for (var n = o > 1 ? void 0 : o ? ai(t, e) : t, r = i.length - 1, s; r >= 0; r--)
|
|
1335
|
+
(s = i[r]) && (n = (o ? s(t, e, n) : s(n)) || n);
|
|
1336
|
+
return o && n && si(t, e, n), n;
|
|
1334
1337
|
};
|
|
1335
|
-
const
|
|
1336
|
-
class f extends
|
|
1338
|
+
const Y = "pie-modal";
|
|
1339
|
+
class f extends me(de) {
|
|
1337
1340
|
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 = (
|
|
1341
|
+
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) => {
|
|
1342
|
+
this.isDismissible || t.preventDefault();
|
|
1343
|
+
}, this._handleDialogLightDismiss = (t) => {
|
|
1341
1344
|
var a;
|
|
1342
1345
|
if (!this.isDismissible)
|
|
1343
1346
|
return;
|
|
1344
|
-
const
|
|
1347
|
+
const e = (a = this._dialog) == null ? void 0 : a.getBoundingClientRect(), {
|
|
1345
1348
|
top: o = 0,
|
|
1346
1349
|
bottom: n = 0,
|
|
1347
1350
|
left: r = 0,
|
|
1348
1351
|
right: s = 0
|
|
1349
|
-
} =
|
|
1352
|
+
} = e || {};
|
|
1350
1353
|
if (o === 0 && n === 0 && r === 0 && s === 0)
|
|
1351
1354
|
return;
|
|
1352
|
-
(
|
|
1353
|
-
}, this._dispatchModalCustomEvent = (
|
|
1354
|
-
const
|
|
1355
|
+
(t.clientY < o || t.clientY > n || t.clientX < r || t.clientX > s) && (this.isOpen = !1);
|
|
1356
|
+
}, this._dispatchModalCustomEvent = (t) => {
|
|
1357
|
+
const e = new CustomEvent(t, {
|
|
1355
1358
|
bubbles: !0,
|
|
1356
1359
|
composed: !0
|
|
1357
1360
|
});
|
|
1358
|
-
this.dispatchEvent(
|
|
1359
|
-
}, this.addEventListener("click", (
|
|
1361
|
+
this.dispatchEvent(e);
|
|
1362
|
+
}, this.addEventListener("click", (t) => this._handleDialogLightDismiss(t));
|
|
1360
1363
|
}
|
|
1361
1364
|
connectedCallback() {
|
|
1362
|
-
super.connectedCallback(), document.addEventListener(
|
|
1365
|
+
super.connectedCallback(), document.addEventListener(X, this._handleModalOpened.bind(this)), document.addEventListener(ft, this._handleModalClosed.bind(this)), document.addEventListener(mt, this._handleModalClosed.bind(this));
|
|
1363
1366
|
}
|
|
1364
1367
|
disconnectedCallback() {
|
|
1365
|
-
document.removeEventListener(
|
|
1368
|
+
document.removeEventListener(X, this._handleModalOpened.bind(this)), document.removeEventListener(ft, this._handleModalClosed.bind(this)), document.removeEventListener(mt, this._handleModalClosed.bind(this)), super.disconnectedCallback();
|
|
1366
1369
|
}
|
|
1367
|
-
firstUpdated(
|
|
1368
|
-
this._dialog && (c.registerDialog(this._dialog), this._dialog.addEventListener("cancel", (
|
|
1370
|
+
firstUpdated(t) {
|
|
1371
|
+
this._dialog && (c.registerDialog(this._dialog), this._dialog.addEventListener("cancel", (e) => this._handleDialogCancelEvent(e)), this._dialog.addEventListener("close", () => {
|
|
1369
1372
|
this.isOpen = !1;
|
|
1370
|
-
})), this._handleModalOpenStateOnFirstRender(
|
|
1373
|
+
})), this._handleModalOpenStateOnFirstRender(t);
|
|
1371
1374
|
}
|
|
1372
|
-
updated(
|
|
1373
|
-
this._handleModalOpenStateChanged(
|
|
1375
|
+
updated(t) {
|
|
1376
|
+
this._handleModalOpenStateChanged(t);
|
|
1374
1377
|
}
|
|
1375
1378
|
/**
|
|
1376
1379
|
* Opens the dialog element and disables page scrolling
|
|
1377
1380
|
*/
|
|
1378
1381
|
_handleModalOpened() {
|
|
1379
|
-
var
|
|
1380
|
-
|
|
1382
|
+
var t, e, o;
|
|
1383
|
+
Se(this), !((t = this._dialog) != null && t.hasAttribute("open") || !((e = this._dialog) != null && e.isConnected)) && ((o = this._dialog) == null || o.showModal());
|
|
1381
1384
|
}
|
|
1382
1385
|
/**
|
|
1383
1386
|
* Closes the dialog element and re-enables page scrolling
|
|
1384
1387
|
*/
|
|
1385
1388
|
_handleModalClosed() {
|
|
1386
|
-
var
|
|
1387
|
-
|
|
1389
|
+
var t;
|
|
1390
|
+
ke(this), (t = this._dialog) == null || t.close(), this._returnFocus();
|
|
1388
1391
|
}
|
|
1389
1392
|
// Handles the value of the isOpen property on first render of the component
|
|
1390
|
-
_handleModalOpenStateOnFirstRender(
|
|
1391
|
-
|
|
1393
|
+
_handleModalOpenStateOnFirstRender(t) {
|
|
1394
|
+
t.get("isOpen") === void 0 && this.isOpen && this._dispatchModalCustomEvent(X);
|
|
1392
1395
|
}
|
|
1393
1396
|
// Handles changes to the modal isOpen property by dispatching any appropriate events
|
|
1394
|
-
_handleModalOpenStateChanged(
|
|
1395
|
-
const
|
|
1396
|
-
|
|
1397
|
+
_handleModalOpenStateChanged(t) {
|
|
1398
|
+
const e = t.get("isOpen");
|
|
1399
|
+
e !== void 0 && (e ? this._backButtonClicked ? (this._backButtonClicked = !1, this._dispatchModalCustomEvent(mt)) : this._dispatchModalCustomEvent(ft) : this._dispatchModalCustomEvent(X));
|
|
1400
|
+
}
|
|
1401
|
+
_handleActionClick(t) {
|
|
1402
|
+
var e, o;
|
|
1403
|
+
t === "leading" ? ((e = this._dialog) == null || e.close("leading"), this._dispatchModalCustomEvent(ni)) : t === "supporting" && ((o = this._dialog) == null || o.close("supporting"), this._dispatchModalCustomEvent(ri));
|
|
1397
1404
|
}
|
|
1398
1405
|
/**
|
|
1399
1406
|
* Return focus to the specified element, providing the selector is valid
|
|
1400
1407
|
* and the chosen element can be found.
|
|
1401
1408
|
*/
|
|
1402
1409
|
_returnFocus() {
|
|
1403
|
-
var
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1410
|
+
var e, o;
|
|
1411
|
+
const t = (e = this.returnFocusAfterCloseSelector) == null ? void 0 : e.trim();
|
|
1412
|
+
t && ((o = document.querySelector(t)) == null || o.focus());
|
|
1406
1413
|
}
|
|
1407
1414
|
/**
|
|
1408
1415
|
* Template for the close button element. Called within the
|
|
@@ -1411,7 +1418,7 @@ class f extends gt(lt) {
|
|
|
1411
1418
|
* @private
|
|
1412
1419
|
*/
|
|
1413
1420
|
renderCloseButton() {
|
|
1414
|
-
var
|
|
1421
|
+
var t;
|
|
1415
1422
|
return _`
|
|
1416
1423
|
<pie-icon-button
|
|
1417
1424
|
@click="${() => {
|
|
@@ -1419,7 +1426,7 @@ class f extends gt(lt) {
|
|
|
1419
1426
|
}}"
|
|
1420
1427
|
variant="ghost-secondary"
|
|
1421
1428
|
class="c-modal-closeBtn"
|
|
1422
|
-
aria-label="${((
|
|
1429
|
+
aria-label="${((t = this.aria) == null ? void 0 : t.close) || y}"
|
|
1423
1430
|
data-test-id="modal-close-button">
|
|
1424
1431
|
<icon-close></icon-close>
|
|
1425
1432
|
</pie-icon-button>`;
|
|
@@ -1431,7 +1438,7 @@ class f extends gt(lt) {
|
|
|
1431
1438
|
* @private
|
|
1432
1439
|
*/
|
|
1433
1440
|
renderBackButton() {
|
|
1434
|
-
var
|
|
1441
|
+
var t;
|
|
1435
1442
|
return _`
|
|
1436
1443
|
<pie-icon-button
|
|
1437
1444
|
@click="${() => {
|
|
@@ -1439,7 +1446,7 @@ class f extends gt(lt) {
|
|
|
1439
1446
|
}}"
|
|
1440
1447
|
variant="ghost-secondary"
|
|
1441
1448
|
class="c-modal-backBtn"
|
|
1442
|
-
aria-label="${((
|
|
1449
|
+
aria-label="${((t = this.aria) == null ? void 0 : t.back) || y}"
|
|
1443
1450
|
data-test-id="modal-back-button">
|
|
1444
1451
|
${this.isRTL ? _`<icon-chevron-right></icon-chevron-right>` : _`<icon-chevron-left></icon-chevron-left>`}
|
|
1445
1452
|
</pie-icon-button>
|
|
@@ -1455,21 +1462,18 @@ class f extends gt(lt) {
|
|
|
1455
1462
|
* @private
|
|
1456
1463
|
*/
|
|
1457
1464
|
renderLeadingAction() {
|
|
1458
|
-
const { text:
|
|
1459
|
-
return
|
|
1465
|
+
const { text: t, variant: e = "primary", ariaLabel: o } = this.leadingAction;
|
|
1466
|
+
return t ? _`
|
|
1460
1467
|
<pie-button
|
|
1461
|
-
variant="${
|
|
1462
|
-
aria-label="${o ||
|
|
1468
|
+
variant="${e}"
|
|
1469
|
+
aria-label="${o || y}"
|
|
1463
1470
|
type="submit"
|
|
1464
1471
|
?isFullWidth="${this.hasStackedActions}"
|
|
1465
|
-
@click="${() =>
|
|
1466
|
-
var n;
|
|
1467
|
-
return (n = this._dialog) == null ? void 0 : n.close("leading");
|
|
1468
|
-
}}"
|
|
1472
|
+
@click="${() => this._handleActionClick("leading")}"
|
|
1469
1473
|
data-test-id="modal-leading-action">
|
|
1470
|
-
${
|
|
1474
|
+
${t}
|
|
1471
1475
|
</pie-button>
|
|
1472
|
-
` :
|
|
1476
|
+
` : y;
|
|
1473
1477
|
}
|
|
1474
1478
|
/**
|
|
1475
1479
|
* Render supportingAction button depending on prop availability.
|
|
@@ -1483,21 +1487,18 @@ class f extends gt(lt) {
|
|
|
1483
1487
|
* @private
|
|
1484
1488
|
*/
|
|
1485
1489
|
renderSupportingAction() {
|
|
1486
|
-
const { text:
|
|
1487
|
-
return
|
|
1490
|
+
const { text: t, variant: e = "ghost", ariaLabel: o } = this.supportingAction;
|
|
1491
|
+
return t ? this.leadingAction ? _`
|
|
1488
1492
|
<pie-button
|
|
1489
|
-
variant="${
|
|
1490
|
-
aria-label="${o ||
|
|
1493
|
+
variant="${e}"
|
|
1494
|
+
aria-label="${o || y}"
|
|
1491
1495
|
type="reset"
|
|
1492
1496
|
?isFullWidth="${this.hasStackedActions}"
|
|
1493
|
-
@click="${() =>
|
|
1494
|
-
var n;
|
|
1495
|
-
return (n = this._dialog) == null ? void 0 : n.close("supporting");
|
|
1496
|
-
}}"
|
|
1497
|
+
@click="${() => this._handleActionClick("supporting")}"
|
|
1497
1498
|
data-test-id="modal-supporting-action">
|
|
1498
|
-
${
|
|
1499
|
+
${t}
|
|
1499
1500
|
</pie-button>
|
|
1500
|
-
` : (console.warn("Use `leadingAction` instead of `supportingAction`. `supportingAction` is being ignored."),
|
|
1501
|
+
` : (console.warn("Use `leadingAction` instead of `supportingAction`. `supportingAction` is being ignored."), y) : y;
|
|
1501
1502
|
}
|
|
1502
1503
|
/**
|
|
1503
1504
|
* Renders the modal inner content and footer of the modal.
|
|
@@ -1511,14 +1512,14 @@ class f extends gt(lt) {
|
|
|
1511
1512
|
</div>
|
|
1512
1513
|
</article>
|
|
1513
1514
|
<footer class="c-modal-footer">
|
|
1514
|
-
${this.leadingAction ? this.renderLeadingAction() :
|
|
1515
|
-
${this.supportingAction ? this.renderSupportingAction() :
|
|
1515
|
+
${this.leadingAction ? this.renderLeadingAction() : y}
|
|
1516
|
+
${this.supportingAction ? this.renderSupportingAction() : y}
|
|
1516
1517
|
</footer>`;
|
|
1517
1518
|
}
|
|
1518
1519
|
render() {
|
|
1519
1520
|
const {
|
|
1520
|
-
aria:
|
|
1521
|
-
hasBackButton:
|
|
1521
|
+
aria: t,
|
|
1522
|
+
hasBackButton: e,
|
|
1522
1523
|
hasStackedActions: o,
|
|
1523
1524
|
heading: n,
|
|
1524
1525
|
headingLevel: r = "h2",
|
|
@@ -1526,33 +1527,33 @@ class f extends gt(lt) {
|
|
|
1526
1527
|
isFooterPinned: l,
|
|
1527
1528
|
isFullWidthBelowMid: a,
|
|
1528
1529
|
isLoading: d,
|
|
1529
|
-
leadingAction:
|
|
1530
|
-
position:
|
|
1531
|
-
size:
|
|
1532
|
-
supportingAction:
|
|
1533
|
-
} = this,
|
|
1530
|
+
leadingAction: h,
|
|
1531
|
+
position: u,
|
|
1532
|
+
size: p,
|
|
1533
|
+
supportingAction: b
|
|
1534
|
+
} = this, Z = ce(r);
|
|
1534
1535
|
return _`
|
|
1535
1536
|
<dialog
|
|
1536
1537
|
id="dialog"
|
|
1537
1538
|
class="c-modal"
|
|
1538
|
-
size="${
|
|
1539
|
-
position="${
|
|
1540
|
-
?hasActions=${
|
|
1541
|
-
?hasBackButton=${
|
|
1539
|
+
size="${p}"
|
|
1540
|
+
position="${u}"
|
|
1541
|
+
?hasActions=${h || b}
|
|
1542
|
+
?hasBackButton=${e}
|
|
1542
1543
|
?hasStackedActions=${o}
|
|
1543
1544
|
?isDismissible=${s}
|
|
1544
1545
|
?isFooterPinned=${l}
|
|
1545
1546
|
?isFullWidthBelowMid=${a}
|
|
1546
1547
|
?isLoading=${d}
|
|
1547
1548
|
aria-busy="${d ? "true" : "false"}"
|
|
1548
|
-
aria-label="${d && (
|
|
1549
|
+
aria-label="${d && (t == null ? void 0 : t.loading) || y}"
|
|
1549
1550
|
data-test-id="pie-modal">
|
|
1550
1551
|
<header class="c-modal-header">
|
|
1551
|
-
${
|
|
1552
|
-
<${
|
|
1552
|
+
${e ? this.renderBackButton() : y}
|
|
1553
|
+
<${Z} class="c-modal-heading">
|
|
1553
1554
|
${n}
|
|
1554
|
-
</${
|
|
1555
|
-
${s ? this.renderCloseButton() :
|
|
1555
|
+
</${Z}>
|
|
1556
|
+
${s ? this.renderCloseButton() : y}
|
|
1556
1557
|
</header>
|
|
1557
1558
|
${// We need to wrap the remaining content in a shared scrollable container if the footer is not pinned
|
|
1558
1559
|
l ? this.renderModalContentAndFooter() : _`
|
|
@@ -1563,66 +1564,68 @@ class f extends gt(lt) {
|
|
|
1563
1564
|
</dialog>`;
|
|
1564
1565
|
}
|
|
1565
1566
|
}
|
|
1566
|
-
f.styles =
|
|
1567
|
-
|
|
1567
|
+
f.styles = le(ti);
|
|
1568
|
+
m([
|
|
1568
1569
|
v({ type: Object })
|
|
1569
1570
|
], f.prototype, "aria", 2);
|
|
1570
|
-
|
|
1571
|
+
m([
|
|
1571
1572
|
v({ type: String }),
|
|
1572
|
-
|
|
1573
|
+
ve(Y)
|
|
1573
1574
|
], f.prototype, "heading", 2);
|
|
1574
|
-
|
|
1575
|
+
m([
|
|
1575
1576
|
v(),
|
|
1576
|
-
|
|
1577
|
+
_t(Y, ei, "h2")
|
|
1577
1578
|
], f.prototype, "headingLevel", 2);
|
|
1578
|
-
|
|
1579
|
+
m([
|
|
1579
1580
|
v({ type: Boolean })
|
|
1580
1581
|
], f.prototype, "hasBackButton", 2);
|
|
1581
|
-
|
|
1582
|
+
m([
|
|
1582
1583
|
v({ type: Boolean })
|
|
1583
1584
|
], f.prototype, "hasStackedActions", 2);
|
|
1584
|
-
|
|
1585
|
+
m([
|
|
1585
1586
|
v({ type: Boolean, reflect: !0 })
|
|
1586
1587
|
], f.prototype, "isDismissible", 2);
|
|
1587
|
-
|
|
1588
|
+
m([
|
|
1588
1589
|
v({ type: Boolean })
|
|
1589
1590
|
], f.prototype, "isFooterPinned", 2);
|
|
1590
|
-
|
|
1591
|
+
m([
|
|
1591
1592
|
v({ type: Boolean })
|
|
1592
1593
|
], f.prototype, "isFullWidthBelowMid", 2);
|
|
1593
|
-
|
|
1594
|
+
m([
|
|
1594
1595
|
v({ type: Boolean, reflect: !0 })
|
|
1595
1596
|
], f.prototype, "isLoading", 2);
|
|
1596
|
-
|
|
1597
|
+
m([
|
|
1597
1598
|
v({ type: Boolean })
|
|
1598
1599
|
], f.prototype, "isOpen", 2);
|
|
1599
|
-
|
|
1600
|
+
m([
|
|
1600
1601
|
v({ type: Object })
|
|
1601
1602
|
], f.prototype, "leadingAction", 2);
|
|
1602
|
-
|
|
1603
|
+
m([
|
|
1603
1604
|
v(),
|
|
1604
|
-
|
|
1605
|
+
_t(Y, oi, "center")
|
|
1605
1606
|
], f.prototype, "position", 2);
|
|
1606
|
-
|
|
1607
|
+
m([
|
|
1607
1608
|
v()
|
|
1608
1609
|
], f.prototype, "returnFocusAfterCloseSelector", 2);
|
|
1609
|
-
|
|
1610
|
+
m([
|
|
1610
1611
|
v(),
|
|
1611
|
-
|
|
1612
|
+
_t(Y, ii, "medium")
|
|
1612
1613
|
], f.prototype, "size", 2);
|
|
1613
|
-
|
|
1614
|
+
m([
|
|
1614
1615
|
v({ type: Object })
|
|
1615
1616
|
], f.prototype, "supportingAction", 2);
|
|
1616
|
-
|
|
1617
|
-
|
|
1617
|
+
m([
|
|
1618
|
+
he("dialog")
|
|
1618
1619
|
], f.prototype, "_dialog", 2);
|
|
1619
|
-
customElements.define(
|
|
1620
|
+
customElements.define(Y, f);
|
|
1620
1621
|
export {
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1622
|
+
mt as ON_MODAL_BACK_EVENT,
|
|
1623
|
+
ft as ON_MODAL_CLOSE_EVENT,
|
|
1624
|
+
ni as ON_MODAL_LEADING_ACTION_CLICK,
|
|
1625
|
+
X as ON_MODAL_OPEN_EVENT,
|
|
1626
|
+
ri as ON_MODAL_SUPPORTING_ACTION_CLICK,
|
|
1624
1627
|
f as PieModal,
|
|
1625
1628
|
ei as headingLevels,
|
|
1626
|
-
|
|
1627
|
-
|
|
1629
|
+
oi as positions,
|
|
1630
|
+
ii as sizes
|
|
1628
1631
|
};
|