@covalent/components 8.0.0 → 8.1.0-beta.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/_commonjsHelpers-2367a3a2.js +1 -0
- package/_commonjsHelpers-de2741aa.mjs +28 -0
- package/action-ribbon.mjs +2 -2
- package/alert.mjs +2 -2
- package/app-shell/app-shell.d.ts +2 -0
- package/app-shell/app-shell.d.ts.map +1 -1
- package/app-shell.js +1 -1
- package/app-shell.mjs +22 -12
- package/button.mjs +3 -3
- package/check-list-item.js +8 -6
- package/check-list-item.mjs +34 -28
- package/checkbox.mjs +4 -4
- package/chip-13877bb8.mjs +3116 -0
- package/chip-3c12a33d.js +493 -0
- package/chip-set.js +76 -0
- package/chip-set.mjs +532 -0
- package/chip.js +1 -0
- package/chip.mjs +12 -0
- package/circular-progress.mjs +1 -1
- package/code-snippet.js +13 -1
- package/code-snippet.mjs +12252 -7
- package/{dialog-3ca1b701.mjs → dialog-3444dd4d.mjs} +8 -8
- package/dialog.mjs +2 -2
- package/drawer.mjs +2 -2
- package/empty-state.js +1 -1
- package/empty-state.mjs +3 -3
- package/expansion-panel-item.js +25 -0
- package/expansion-panel-item.mjs +107 -0
- package/expansion-panel.js +7 -0
- package/expansion-panel.mjs +59 -0
- package/{form-element-ffcf59ff.mjs → form-element-7353b3c4.mjs} +1 -1
- package/formfield.js +80 -0
- package/formfield.mjs +277 -0
- package/{foundation-39dc72d2.mjs → foundation-eff81c1e.mjs} +1 -1
- package/icon-button.mjs +2 -2
- package/icon-check-toggle.mjs +4 -4
- package/icon-radio-toggle.mjs +4 -4
- package/icon.mjs +2 -2
- package/index.js +1 -568
- package/index.mjs +113 -3728
- package/linear-progress.mjs +4 -4
- package/list/check-list-item.d.ts.map +1 -1
- package/list/radio-list-item.d.ts.map +1 -1
- package/{mwc-list-item.css-b0009fc7.mjs → list-item-1fc0d619.mjs} +3 -1
- package/{mwc-list-item.css-25adc0c4.js → list-item-209613bf.js} +2 -1
- package/list-item.js +7 -1
- package/list-item.mjs +29 -8
- package/list.js +1 -1
- package/list.mjs +5 -5
- package/menu.mjs +5 -5
- package/{mwc-checkbox-base-f10fd709.mjs → mwc-checkbox-base-afeeff16.mjs} +3 -3
- package/{mwc-drawer-base-135de8a5.mjs → mwc-drawer-base-0c2b4060.mjs} +1 -1
- package/{mwc-icon-bf656cf5.mjs → mwc-icon-28b10c70.mjs} +1 -1
- package/{mwc-line-ripple-directive-b24a914e.mjs → mwc-line-ripple-directive-315e996d.mjs} +1 -1
- package/{mwc-list-base-76e37212.mjs → mwc-list-base-8aa5bfd8.mjs} +2 -2
- package/{mwc-list-item-base-fe4398c3.mjs → mwc-list-item-base-bf1a075b.mjs} +2 -2
- package/{mwc-menu-base-c4bc88ea.mjs → mwc-menu-base-872420a4.mjs} +2 -2
- package/{mwc-radio-base-a374fbd9.mjs → mwc-radio-base-18a887dd.mjs} +3 -3
- package/{mwc-slider.css-8b6f275c.mjs → mwc-slider.css-03537082.mjs} +3 -3
- package/{mwc-tab-base-be0c887f.mjs → mwc-tab-base-cd1570e4.mjs} +2 -2
- package/{mwc-top-app-bar-base-55da3fe4.mjs → mwc-top-app-bar-base-c7380903.mjs} +1 -1
- package/nav-list-item.js +2 -2
- package/nav-list-item.mjs +29 -29
- package/package.json +16 -1
- package/radio-list-item.js +8 -6
- package/radio-list-item.mjs +36 -30
- package/radio.mjs +4 -4
- package/{ripple-handlers-f37f21cf.mjs → ripple-handlers-38a43e50.mjs} +1 -1
- package/select.mjs +8 -8
- package/side-sheet.mjs +2 -2
- package/slider-range.mjs +4 -4
- package/slider.mjs +8 -8
- package/snackbar.mjs +1 -1
- package/style.css +1 -1
- package/switch.mjs +3 -3
- package/tab-bar.mjs +3 -3
- package/tab.mjs +3 -3
- package/textarea.mjs +4 -4
- package/textfield/textfield.d.ts +1 -0
- package/textfield/textfield.d.ts.map +1 -1
- package/{textfield-63d1859a.mjs → textfield-a2e37241.mjs} +3 -3
- package/textfield.js +1 -1
- package/textfield.mjs +7 -4
- package/toolbar.mjs +2 -2
- package/tooltip.mjs +1 -1
- package/top-app-bar-fixed.mjs +2 -2
- package/top-app-bar.mjs +2 -2
- package/tree-list-item.mjs +2 -2
- package/{tslib.es6-f3e988cd.mjs → tslib.es6-226581a4.mjs} +5 -5
- package/code-snippet-2137b11c.js +0 -13
- package/code-snippet-ccca324f.mjs +0 -12278
- package/list-item-04b6ffa1.js +0 -8
- package/list-item-1c4f9e23.mjs +0 -32
@@ -0,0 +1,3116 @@
|
|
1
|
+
var ee = Object.defineProperty;
|
2
|
+
var ie = (t, e, i) => e in t ? ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
3
|
+
var p = (t, e, i) => (ie(t, typeof e != "symbol" ? e + "" : e, i), i);
|
4
|
+
import { s as ne, x as Y, i as re, r as oe, e as ae } from "./query-assigned-elements-4a39219d.mjs";
|
5
|
+
import { a as ce } from "./utils-2932417c.mjs";
|
6
|
+
import { _ as U, a as S, c as G, d as L, e as se, f as le } from "./tslib.es6-226581a4.mjs";
|
7
|
+
import { n as z } from "./property-9b6ea53b.mjs";
|
8
|
+
import { i as de } from "./query-d843aa92.mjs";
|
9
|
+
import { o as ue } from "./class-map-4b94b017.mjs";
|
10
|
+
import { g } from "./_commonjsHelpers-de2741aa.mjs";
|
11
|
+
var O = {};
|
12
|
+
/**
|
13
|
+
* @license
|
14
|
+
* SPDX-License-Identifier: Apache-2.0
|
15
|
+
*/
|
16
|
+
const w = {};
|
17
|
+
function H(t) {
|
18
|
+
if (t !== w)
|
19
|
+
throw new Error("Bad secret");
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* @license
|
23
|
+
* SPDX-License-Identifier: Apache-2.0
|
24
|
+
*/
|
25
|
+
class Lt {
|
26
|
+
constructor() {
|
27
|
+
// @ts-ignore: error TS6133: 'brand' is declared but its value is never read.
|
28
|
+
p(this, "brand");
|
29
|
+
}
|
30
|
+
// To prevent structural typing.
|
31
|
+
}
|
32
|
+
class Ft extends Lt {
|
33
|
+
constructor(i, n) {
|
34
|
+
super();
|
35
|
+
p(this, "privateDoNotAccessOrElseWrappedAttrPrefix");
|
36
|
+
process.env.NODE_ENV !== "production" && H(n), this.privateDoNotAccessOrElseWrappedAttrPrefix = i;
|
37
|
+
}
|
38
|
+
toString() {
|
39
|
+
return this.privateDoNotAccessOrElseWrappedAttrPrefix;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
function xt(t) {
|
43
|
+
return new Ft(t, w);
|
44
|
+
}
|
45
|
+
function Ut(t) {
|
46
|
+
if (t instanceof Ft)
|
47
|
+
return t.privateDoNotAccessOrElseWrappedAttrPrefix;
|
48
|
+
{
|
49
|
+
let e = "";
|
50
|
+
throw process.env.NODE_ENV !== "production" && (e = "Unexpected type when unwrapping SafeAttributePrefix"), new Error(e);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
const pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
54
|
+
__proto__: null,
|
55
|
+
SafeAttributePrefix: Lt,
|
56
|
+
createAttributePrefix: xt,
|
57
|
+
unwrapAttributePrefix: Ut
|
58
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
59
|
+
/**
|
60
|
+
* @license
|
61
|
+
* SPDX-License-Identifier: Apache-2.0
|
62
|
+
*/
|
63
|
+
function V(t, e, i) {
|
64
|
+
if (!Array.isArray(t) || !Array.isArray(t.raw) || !e && t.length !== 1)
|
65
|
+
throw new TypeError(i);
|
66
|
+
}
|
67
|
+
/**
|
68
|
+
* @license
|
69
|
+
* SPDX-License-Identifier: Apache-2.0
|
70
|
+
*/
|
71
|
+
const he = [
|
72
|
+
"href",
|
73
|
+
"rel",
|
74
|
+
"src",
|
75
|
+
"srcdoc",
|
76
|
+
"action",
|
77
|
+
"formaction",
|
78
|
+
"sandbox",
|
79
|
+
"cite",
|
80
|
+
"poster",
|
81
|
+
"icon"
|
82
|
+
];
|
83
|
+
/**
|
84
|
+
* @license
|
85
|
+
* SPDX-License-Identifier: Apache-2.0
|
86
|
+
*/
|
87
|
+
function me(t) {
|
88
|
+
process.env.NODE_ENV !== "production" && V(t, !0, "safeAttr is a template literal tag function and should be called using the tagged template syntax. For example, safeAttr`foo`;");
|
89
|
+
const e = t[0].toLowerCase();
|
90
|
+
if (process.env.NODE_ENV !== "production") {
|
91
|
+
if (e.indexOf("on") === 0 || "on".indexOf(e) === 0)
|
92
|
+
throw new Error(`Prefix '${t[0]}' does not guarantee the attribute to be safe as it is also a prefix for event handler attributesPlease use 'addEventListener' to set event handlers.`);
|
93
|
+
he.forEach((i) => {
|
94
|
+
if (i.indexOf(e) === 0)
|
95
|
+
throw new Error(`Prefix '${t[0]}' does not guarantee the attribute to be safe as it is also a prefix for the security sensitive attribute '${i}'. Please use native or safe DOM APIs to set the attribute.`);
|
96
|
+
});
|
97
|
+
}
|
98
|
+
return xt(e);
|
99
|
+
}
|
100
|
+
const fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
101
|
+
__proto__: null,
|
102
|
+
safeAttrPrefix: me
|
103
|
+
}, Symbol.toStringTag, { value: "Module" })), ve = /* @__PURE__ */ g(fe);
|
104
|
+
/**
|
105
|
+
* @license
|
106
|
+
* SPDX-License-Identifier: Apache-2.0
|
107
|
+
*/
|
108
|
+
let zt = "google#safe";
|
109
|
+
function ge() {
|
110
|
+
if (typeof window < "u")
|
111
|
+
return window.trustedTypes;
|
112
|
+
}
|
113
|
+
function q() {
|
114
|
+
return zt !== "" ? ge() ?? null : null;
|
115
|
+
}
|
116
|
+
let Q;
|
117
|
+
function st() {
|
118
|
+
var t;
|
119
|
+
if (Q === void 0)
|
120
|
+
try {
|
121
|
+
Q = ((t = q()) == null ? void 0 : t.createPolicy(zt, {
|
122
|
+
createHTML: (e) => e,
|
123
|
+
createScript: (e) => e,
|
124
|
+
createScriptURL: (e) => e
|
125
|
+
})) ?? null;
|
126
|
+
} catch {
|
127
|
+
Q = null;
|
128
|
+
}
|
129
|
+
return Q;
|
130
|
+
}
|
131
|
+
/**
|
132
|
+
* @license
|
133
|
+
* SPDX-License-Identifier: Apache-2.0
|
134
|
+
*/
|
135
|
+
class lt {
|
136
|
+
constructor(e, i) {
|
137
|
+
p(this, "privateDoNotAccessOrElseWrappedHtml");
|
138
|
+
process.env.NODE_ENV !== "production" && H(i), this.privateDoNotAccessOrElseWrappedHtml = e;
|
139
|
+
}
|
140
|
+
toString() {
|
141
|
+
return this.privateDoNotAccessOrElseWrappedHtml.toString();
|
142
|
+
}
|
143
|
+
}
|
144
|
+
function Ht(t, e) {
|
145
|
+
return e ?? new lt(t, w);
|
146
|
+
}
|
147
|
+
const _e = typeof window !== void 0 ? window.TrustedHTML : void 0, Mt = _e ?? lt;
|
148
|
+
function M(t) {
|
149
|
+
var i;
|
150
|
+
const e = t;
|
151
|
+
return Ht(e, (i = st()) == null ? void 0 : i.createHTML(e));
|
152
|
+
}
|
153
|
+
const ye = /* @__PURE__ */ (() => {
|
154
|
+
var t;
|
155
|
+
return Ht("", (t = q()) == null ? void 0 : t.emptyHTML);
|
156
|
+
})();
|
157
|
+
function be(t) {
|
158
|
+
return t instanceof Mt;
|
159
|
+
}
|
160
|
+
function dt(t) {
|
161
|
+
var e;
|
162
|
+
if ((e = q()) != null && e.isHTML(t))
|
163
|
+
return t;
|
164
|
+
if (t instanceof lt)
|
165
|
+
return t.privateDoNotAccessOrElseWrappedHtml;
|
166
|
+
{
|
167
|
+
let i = "";
|
168
|
+
throw process.env.NODE_ENV !== "production" && (i = "Unexpected type when unwrapping SafeHtml"), new Error(i);
|
169
|
+
}
|
170
|
+
}
|
171
|
+
const Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
172
|
+
__proto__: null,
|
173
|
+
EMPTY_HTML: ye,
|
174
|
+
SafeHtml: Mt,
|
175
|
+
createHtml: M,
|
176
|
+
isHtml: be,
|
177
|
+
unwrapHtml: dt
|
178
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
179
|
+
/**
|
180
|
+
* @license
|
181
|
+
* SPDX-License-Identifier: Apache-2.0
|
182
|
+
*/
|
183
|
+
class ut {
|
184
|
+
constructor(e, i) {
|
185
|
+
p(this, "privateDoNotAccessOrElseWrappedResourceUrl");
|
186
|
+
process.env.NODE_ENV !== "production" && H(i), this.privateDoNotAccessOrElseWrappedResourceUrl = e;
|
187
|
+
}
|
188
|
+
toString() {
|
189
|
+
return this.privateDoNotAccessOrElseWrappedResourceUrl.toString();
|
190
|
+
}
|
191
|
+
}
|
192
|
+
const Ae = typeof window !== void 0 ? window.TrustedScriptURL : void 0, kt = Ae ?? ut;
|
193
|
+
function K(t) {
|
194
|
+
var n;
|
195
|
+
const e = t;
|
196
|
+
return ((n = st()) == null ? void 0 : n.createScriptURL(e)) ?? new ut(e, w);
|
197
|
+
}
|
198
|
+
function Se(t) {
|
199
|
+
return t instanceof kt;
|
200
|
+
}
|
201
|
+
function ot(t) {
|
202
|
+
var e;
|
203
|
+
if ((e = q()) != null && e.isScriptURL(t))
|
204
|
+
return t;
|
205
|
+
if (t instanceof ut)
|
206
|
+
return t.privateDoNotAccessOrElseWrappedResourceUrl;
|
207
|
+
{
|
208
|
+
let i = "";
|
209
|
+
throw process.env.NODE_ENV !== "production" && (i = "Unexpected type when unwrapping TrustedResourceUrl"), new Error(i);
|
210
|
+
}
|
211
|
+
}
|
212
|
+
const we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
213
|
+
__proto__: null,
|
214
|
+
TrustedResourceUrl: kt,
|
215
|
+
createResourceUrl: K,
|
216
|
+
isResourceUrl: Se,
|
217
|
+
unwrapResourceUrl: ot
|
218
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
219
|
+
/**
|
220
|
+
* @license
|
221
|
+
* SPDX-License-Identifier: Apache-2.0
|
222
|
+
*/
|
223
|
+
class pt {
|
224
|
+
constructor(e, i) {
|
225
|
+
p(this, "privateDoNotAccessOrElseWrappedScript");
|
226
|
+
process.env.NODE_ENV !== "production" && H(i), this.privateDoNotAccessOrElseWrappedScript = e;
|
227
|
+
}
|
228
|
+
toString() {
|
229
|
+
return this.privateDoNotAccessOrElseWrappedScript.toString();
|
230
|
+
}
|
231
|
+
}
|
232
|
+
function Bt(t, e) {
|
233
|
+
return e ?? new pt(t, w);
|
234
|
+
}
|
235
|
+
const Te = typeof window !== void 0 ? window.TrustedScript : void 0, Gt = Te ?? pt;
|
236
|
+
function Z(t) {
|
237
|
+
var i;
|
238
|
+
const e = t;
|
239
|
+
return Bt(e, (i = st()) == null ? void 0 : i.createScript(e));
|
240
|
+
}
|
241
|
+
const Re = /* @__PURE__ */ (() => {
|
242
|
+
var t;
|
243
|
+
return Bt("", (t = q()) == null ? void 0 : t.emptyScript);
|
244
|
+
})();
|
245
|
+
function Ie(t) {
|
246
|
+
return t instanceof Gt;
|
247
|
+
}
|
248
|
+
function at(t) {
|
249
|
+
var e;
|
250
|
+
if ((e = q()) != null && e.isScript(t))
|
251
|
+
return t;
|
252
|
+
if (t instanceof pt)
|
253
|
+
return t.privateDoNotAccessOrElseWrappedScript;
|
254
|
+
{
|
255
|
+
let i = "";
|
256
|
+
throw process.env.NODE_ENV !== "production" && (i = "Unexpected type when unwrapping SafeScript"), new Error(i);
|
257
|
+
}
|
258
|
+
}
|
259
|
+
const De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
260
|
+
__proto__: null,
|
261
|
+
EMPTY_SCRIPT: Re,
|
262
|
+
SafeScript: Gt,
|
263
|
+
createScript: Z,
|
264
|
+
isScript: Ie,
|
265
|
+
unwrapScript: at
|
266
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
267
|
+
/**
|
268
|
+
* @license
|
269
|
+
* SPDX-License-Identifier: Apache-2.0
|
270
|
+
*/
|
271
|
+
function Oe(t, e = {}) {
|
272
|
+
let i = j(t);
|
273
|
+
return e.preserveSpaces && (i = i.replace(/(^|[\r\n\t ]) /g, "$1 ")), e.preserveNewlines && (i = i.replace(/(\r\n|\n|\r)/g, "<br>")), e.preserveTabs && (i = i.replace(/(\t+)/g, '<span style="white-space:pre">$1</span>')), M(i);
|
274
|
+
}
|
275
|
+
function Ne(t, e = {}) {
|
276
|
+
const i = at(t).toString();
|
277
|
+
let n = "<script";
|
278
|
+
return e.id && (n += ` id="${j(e.id)}"`), e.nonce && (n += ` nonce="${j(e.nonce)}"`), e.type && (n += ` type="${j(e.type)}"`), n += `>${i}<\/script>`, M(n);
|
279
|
+
}
|
280
|
+
function Pe(t, e, i) {
|
281
|
+
const n = ot(t).toString();
|
282
|
+
let r = `<script src="${j(n)}"`;
|
283
|
+
return e && (r += " async"), i && (r += ` nonce="${j(i)}"`), r += "><\/script>", M(r);
|
284
|
+
}
|
285
|
+
function j(t) {
|
286
|
+
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
287
|
+
}
|
288
|
+
function Ce(t) {
|
289
|
+
return M(t.map(dt).join(""));
|
290
|
+
}
|
291
|
+
const Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
292
|
+
__proto__: null,
|
293
|
+
concatHtmls: Ce,
|
294
|
+
createScript: Ne,
|
295
|
+
createScriptSrc: Pe,
|
296
|
+
htmlEscape: Oe
|
297
|
+
}, Symbol.toStringTag, { value: "Module" })), Fe = /* @__PURE__ */ g(Le);
|
298
|
+
/**
|
299
|
+
* @license
|
300
|
+
* SPDX-License-Identifier: Apache-2.0
|
301
|
+
*/
|
302
|
+
function xe(t) {
|
303
|
+
let e;
|
304
|
+
try {
|
305
|
+
e = new URL(t);
|
306
|
+
} catch {
|
307
|
+
return "https:";
|
308
|
+
}
|
309
|
+
return e.protocol;
|
310
|
+
}
|
311
|
+
const Ue = ["data:", "http:", "https:", "mailto:", "ftp:"];
|
312
|
+
function ze(t) {
|
313
|
+
const e = xe(t);
|
314
|
+
return e !== void 0 && Ue.indexOf(e.toLowerCase()) !== -1 ? t : "about:invalid#zClosurez";
|
315
|
+
}
|
316
|
+
/**
|
317
|
+
* @license
|
318
|
+
* SPDX-License-Identifier: Apache-2.0
|
319
|
+
*/
|
320
|
+
class Wt {
|
321
|
+
constructor() {
|
322
|
+
// @ts-ignore: error TS6133: 'brand' is declared but its value is never read.
|
323
|
+
p(this, "brand");
|
324
|
+
}
|
325
|
+
// To prevent structural typing.
|
326
|
+
}
|
327
|
+
class ht extends Wt {
|
328
|
+
constructor(i, n) {
|
329
|
+
super();
|
330
|
+
p(this, "privateDoNotAccessOrElseWrappedStyle");
|
331
|
+
process.env.NODE_ENV !== "production" && H(n), this.privateDoNotAccessOrElseWrappedStyle = i;
|
332
|
+
}
|
333
|
+
toString() {
|
334
|
+
return this.privateDoNotAccessOrElseWrappedStyle;
|
335
|
+
}
|
336
|
+
}
|
337
|
+
function mt(t) {
|
338
|
+
return new ht(t, w);
|
339
|
+
}
|
340
|
+
function He(t) {
|
341
|
+
return t instanceof ht;
|
342
|
+
}
|
343
|
+
function jt(t) {
|
344
|
+
if (t instanceof ht)
|
345
|
+
return t.privateDoNotAccessOrElseWrappedStyle;
|
346
|
+
{
|
347
|
+
let e = "";
|
348
|
+
throw process.env.NODE_ENV !== "production" && (e = "Unexpected type when unwrapping SafeStyle"), new Error(e);
|
349
|
+
}
|
350
|
+
}
|
351
|
+
const Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
352
|
+
__proto__: null,
|
353
|
+
SafeStyle: Wt,
|
354
|
+
createStyle: mt,
|
355
|
+
isStyle: He,
|
356
|
+
unwrapStyle: jt
|
357
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
358
|
+
/**
|
359
|
+
* @license
|
360
|
+
* SPDX-License-Identifier: Apache-2.0
|
361
|
+
*/
|
362
|
+
function ke(t, e) {
|
363
|
+
Ge(t) && Be(t), t.innerHTML = dt(e);
|
364
|
+
}
|
365
|
+
function Kt(t, e, i, n) {
|
366
|
+
if (t.length === 0)
|
367
|
+
throw new Error("No prefixes are provided");
|
368
|
+
const r = t.map((a) => Ut(a)), o = i.toLowerCase();
|
369
|
+
if (r.every((a) => o.indexOf(a) !== 0))
|
370
|
+
throw new Error(`Attribute "${i}" does not match any of the allowed prefixes.`);
|
371
|
+
e.setAttribute(i, n);
|
372
|
+
}
|
373
|
+
function Be(t) {
|
374
|
+
if (t.tagName.toLowerCase() === "script")
|
375
|
+
throw new Error("Use setTextContent with a SafeScript.");
|
376
|
+
if (t.tagName.toLowerCase() === "style")
|
377
|
+
throw new Error("Use setTextContent with a SafeStyleSheet.");
|
378
|
+
}
|
379
|
+
function Ge(t) {
|
380
|
+
return t.tagName !== void 0;
|
381
|
+
}
|
382
|
+
/**
|
383
|
+
* @license
|
384
|
+
* SPDX-License-Identifier: Apache-2.0
|
385
|
+
*/
|
386
|
+
function We(t) {
|
387
|
+
const e = document.createElement("template"), i = M(t);
|
388
|
+
return ke(e, i), e.content;
|
389
|
+
}
|
390
|
+
/**
|
391
|
+
* @license
|
392
|
+
* SPDX-License-Identifier: Apache-2.0
|
393
|
+
*/
|
394
|
+
function yt(t) {
|
395
|
+
const e = t.nodeName;
|
396
|
+
return typeof e == "string" ? e : "FORM";
|
397
|
+
}
|
398
|
+
function bt(t) {
|
399
|
+
return t.nodeType === Node.TEXT_NODE;
|
400
|
+
}
|
401
|
+
function Et(t) {
|
402
|
+
const e = t.nodeType;
|
403
|
+
return e === Node.ELEMENT_NODE || typeof e != "number";
|
404
|
+
}
|
405
|
+
/**
|
406
|
+
* @license
|
407
|
+
* SPDX-License-Identifier: Apache-2.0
|
408
|
+
*/
|
409
|
+
class C {
|
410
|
+
constructor(e, i, n, r) {
|
411
|
+
p(this, "allowedElements");
|
412
|
+
p(this, "elementPolicies");
|
413
|
+
p(this, "allowedGlobalAttributes");
|
414
|
+
p(this, "globalAttributePolicies");
|
415
|
+
this.allowedElements = e, this.elementPolicies = i, this.allowedGlobalAttributes = n, this.globalAttributePolicies = r;
|
416
|
+
}
|
417
|
+
isAllowedElement(e) {
|
418
|
+
return e.toLowerCase() !== "form" && (this.allowedElements.has(e) || this.elementPolicies.has(e));
|
419
|
+
}
|
420
|
+
getAttributePolicy(e, i) {
|
421
|
+
const n = this.elementPolicies.get(i);
|
422
|
+
return n != null && n.has(e) ? n.get(e) : this.allowedGlobalAttributes.has(e) ? { policyAction: d.KEEP } : this.globalAttributePolicies.get(e) || { policyAction: d.DROP };
|
423
|
+
}
|
424
|
+
}
|
425
|
+
var d;
|
426
|
+
(function(t) {
|
427
|
+
t[t.DROP = 0] = "DROP", t[t.KEEP = 1] = "KEEP", t[t.KEEP_AND_SANITIZE_URL = 2] = "KEEP_AND_SANITIZE_URL", t[t.KEEP_AND_NORMALIZE = 3] = "KEEP_AND_NORMALIZE", t[t.KEEP_AND_SANITIZE_STYLE = 4] = "KEEP_AND_SANITIZE_STYLE";
|
428
|
+
})(d || (d = {}));
|
429
|
+
/**
|
430
|
+
* @license
|
431
|
+
* SPDX-License-Identifier: Apache-2.0
|
432
|
+
*/
|
433
|
+
const $t = new C(/* @__PURE__ */ new Set([
|
434
|
+
"ARTICLE",
|
435
|
+
"SECTION",
|
436
|
+
"NAV",
|
437
|
+
"ASIDE",
|
438
|
+
"H1",
|
439
|
+
"H2",
|
440
|
+
"H3",
|
441
|
+
"H4",
|
442
|
+
"H5",
|
443
|
+
"H6",
|
444
|
+
"HEADER",
|
445
|
+
"FOOTER",
|
446
|
+
"ADDRESS",
|
447
|
+
"P",
|
448
|
+
"HR",
|
449
|
+
"PRE",
|
450
|
+
"BLOCKQUOTE",
|
451
|
+
"OL",
|
452
|
+
"UL",
|
453
|
+
"LH",
|
454
|
+
"LI",
|
455
|
+
"DL",
|
456
|
+
"DT",
|
457
|
+
"DD",
|
458
|
+
"FIGURE",
|
459
|
+
"FIGCAPTION",
|
460
|
+
"MAIN",
|
461
|
+
"DIV",
|
462
|
+
"EM",
|
463
|
+
"STRONG",
|
464
|
+
"SMALL",
|
465
|
+
"S",
|
466
|
+
"CITE",
|
467
|
+
"Q",
|
468
|
+
"DFN",
|
469
|
+
"ABBR",
|
470
|
+
"RUBY",
|
471
|
+
"RB",
|
472
|
+
"RT",
|
473
|
+
"RTC",
|
474
|
+
"RP",
|
475
|
+
"DATA",
|
476
|
+
"TIME",
|
477
|
+
"CODE",
|
478
|
+
"VAR",
|
479
|
+
"SAMP",
|
480
|
+
"KBD",
|
481
|
+
"SUB",
|
482
|
+
"SUP",
|
483
|
+
"I",
|
484
|
+
"B",
|
485
|
+
"U",
|
486
|
+
"MARK",
|
487
|
+
"BDI",
|
488
|
+
"BDO",
|
489
|
+
"SPAN",
|
490
|
+
"BR",
|
491
|
+
"WBR",
|
492
|
+
"INS",
|
493
|
+
"DEL",
|
494
|
+
"PICTURE",
|
495
|
+
"PARAM",
|
496
|
+
"TRACK",
|
497
|
+
"MAP",
|
498
|
+
"TABLE",
|
499
|
+
"CAPTION",
|
500
|
+
"COLGROUP",
|
501
|
+
"COL",
|
502
|
+
"TBODY",
|
503
|
+
"THEAD",
|
504
|
+
"TFOOT",
|
505
|
+
"TR",
|
506
|
+
"TD",
|
507
|
+
"TH",
|
508
|
+
"SELECT",
|
509
|
+
"DATALIST",
|
510
|
+
"OPTGROUP",
|
511
|
+
"OPTION",
|
512
|
+
"OUTPUT",
|
513
|
+
"PROGRESS",
|
514
|
+
"METER",
|
515
|
+
"FIELDSET",
|
516
|
+
"LEGEND",
|
517
|
+
"DETAILS",
|
518
|
+
"SUMMARY",
|
519
|
+
"MENU",
|
520
|
+
"DIALOG",
|
521
|
+
"SLOT",
|
522
|
+
"CANVAS",
|
523
|
+
"FONT",
|
524
|
+
"CENTER"
|
525
|
+
]), /* @__PURE__ */ new Map([
|
526
|
+
[
|
527
|
+
"A",
|
528
|
+
/* @__PURE__ */ new Map([
|
529
|
+
["href", { policyAction: d.KEEP_AND_SANITIZE_URL }]
|
530
|
+
])
|
531
|
+
],
|
532
|
+
[
|
533
|
+
"AREA",
|
534
|
+
/* @__PURE__ */ new Map([
|
535
|
+
["href", { policyAction: d.KEEP_AND_SANITIZE_URL }]
|
536
|
+
])
|
537
|
+
],
|
538
|
+
[
|
539
|
+
"LINK",
|
540
|
+
/* @__PURE__ */ new Map([
|
541
|
+
[
|
542
|
+
"href",
|
543
|
+
{
|
544
|
+
policyAction: d.KEEP_AND_SANITIZE_URL,
|
545
|
+
conditions: /* @__PURE__ */ new Map([[
|
546
|
+
"rel",
|
547
|
+
/* @__PURE__ */ new Set([
|
548
|
+
"alternate",
|
549
|
+
"author",
|
550
|
+
"bookmark",
|
551
|
+
"canonical",
|
552
|
+
"cite",
|
553
|
+
"help",
|
554
|
+
"icon",
|
555
|
+
"license",
|
556
|
+
"next",
|
557
|
+
"prefetch",
|
558
|
+
"dns-prefetch",
|
559
|
+
"prerender",
|
560
|
+
"preconnect",
|
561
|
+
"preload",
|
562
|
+
"prev",
|
563
|
+
"search",
|
564
|
+
"subresource"
|
565
|
+
])
|
566
|
+
]])
|
567
|
+
}
|
568
|
+
]
|
569
|
+
])
|
570
|
+
],
|
571
|
+
[
|
572
|
+
"SOURCE",
|
573
|
+
/* @__PURE__ */ new Map([
|
574
|
+
["src", { policyAction: d.KEEP_AND_SANITIZE_URL }]
|
575
|
+
])
|
576
|
+
],
|
577
|
+
[
|
578
|
+
"IMG",
|
579
|
+
/* @__PURE__ */ new Map([
|
580
|
+
["src", { policyAction: d.KEEP_AND_SANITIZE_URL }]
|
581
|
+
])
|
582
|
+
],
|
583
|
+
[
|
584
|
+
"VIDEO",
|
585
|
+
/* @__PURE__ */ new Map([
|
586
|
+
["src", { policyAction: d.KEEP_AND_SANITIZE_URL }]
|
587
|
+
])
|
588
|
+
],
|
589
|
+
[
|
590
|
+
"AUDIO",
|
591
|
+
/* @__PURE__ */ new Map([
|
592
|
+
["src", { policyAction: d.KEEP_AND_SANITIZE_URL }]
|
593
|
+
])
|
594
|
+
]
|
595
|
+
]), /* @__PURE__ */ new Set([
|
596
|
+
"title",
|
597
|
+
"aria-atomic",
|
598
|
+
"aria-autocomplete",
|
599
|
+
"aria-busy",
|
600
|
+
"aria-checked",
|
601
|
+
"aria-current",
|
602
|
+
"aria-disabled",
|
603
|
+
"aria-dropeffect",
|
604
|
+
"aria-expanded",
|
605
|
+
"aria-haspopup",
|
606
|
+
"aria-hidden",
|
607
|
+
"aria-invalid",
|
608
|
+
"aria-label",
|
609
|
+
"aria-level",
|
610
|
+
"aria-live",
|
611
|
+
"aria-multiline",
|
612
|
+
"aria-multiselectable",
|
613
|
+
"aria-orientation",
|
614
|
+
"aria-posinset",
|
615
|
+
"aria-pressed",
|
616
|
+
"aria-readonly",
|
617
|
+
"aria-relevant",
|
618
|
+
"aria-required",
|
619
|
+
"aria-selected",
|
620
|
+
"aria-setsize",
|
621
|
+
"aria-sort",
|
622
|
+
"aria-valuemax",
|
623
|
+
"aria-valuemin",
|
624
|
+
"aria-valuenow",
|
625
|
+
"aria-valuetext",
|
626
|
+
"alt",
|
627
|
+
"align",
|
628
|
+
"autocapitalize",
|
629
|
+
"autocomplete",
|
630
|
+
"autocorrect",
|
631
|
+
"autofocus",
|
632
|
+
"autoplay",
|
633
|
+
"bgcolor",
|
634
|
+
"border",
|
635
|
+
"cellpadding",
|
636
|
+
"cellspacing",
|
637
|
+
"checked",
|
638
|
+
"color",
|
639
|
+
"cols",
|
640
|
+
"colspan",
|
641
|
+
"controls",
|
642
|
+
"datetime",
|
643
|
+
"disabled",
|
644
|
+
"download",
|
645
|
+
"draggable",
|
646
|
+
"enctype",
|
647
|
+
"face",
|
648
|
+
"formenctype",
|
649
|
+
"frameborder",
|
650
|
+
"height",
|
651
|
+
"hreflang",
|
652
|
+
"hidden",
|
653
|
+
"ismap",
|
654
|
+
"label",
|
655
|
+
"lang",
|
656
|
+
"loop",
|
657
|
+
"max",
|
658
|
+
"maxlength",
|
659
|
+
"media",
|
660
|
+
"minlength",
|
661
|
+
"min",
|
662
|
+
"multiple",
|
663
|
+
"muted",
|
664
|
+
"nonce",
|
665
|
+
"open",
|
666
|
+
"placeholder",
|
667
|
+
"preload",
|
668
|
+
"rel",
|
669
|
+
"required",
|
670
|
+
"reversed",
|
671
|
+
"role",
|
672
|
+
"rows",
|
673
|
+
"rowspan",
|
674
|
+
"selected",
|
675
|
+
"shape",
|
676
|
+
"size",
|
677
|
+
"sizes",
|
678
|
+
"slot",
|
679
|
+
"span",
|
680
|
+
"spellcheck",
|
681
|
+
"start",
|
682
|
+
"step",
|
683
|
+
"summary",
|
684
|
+
"translate",
|
685
|
+
"type",
|
686
|
+
"valign",
|
687
|
+
"value",
|
688
|
+
"width",
|
689
|
+
"wrap",
|
690
|
+
"itemscope",
|
691
|
+
"itemtype",
|
692
|
+
"itemid",
|
693
|
+
"itemprop",
|
694
|
+
"itemref"
|
695
|
+
]), /* @__PURE__ */ new Map([
|
696
|
+
[
|
697
|
+
"dir",
|
698
|
+
{
|
699
|
+
policyAction: d.KEEP_AND_NORMALIZE,
|
700
|
+
conditions: /* @__PURE__ */ new Map([[
|
701
|
+
"dir",
|
702
|
+
/* @__PURE__ */ new Set([
|
703
|
+
"auto",
|
704
|
+
"ltr",
|
705
|
+
"rtl"
|
706
|
+
])
|
707
|
+
]])
|
708
|
+
}
|
709
|
+
],
|
710
|
+
[
|
711
|
+
"async",
|
712
|
+
{
|
713
|
+
policyAction: d.KEEP_AND_NORMALIZE,
|
714
|
+
conditions: /* @__PURE__ */ new Map([[
|
715
|
+
"async",
|
716
|
+
/* @__PURE__ */ new Set([
|
717
|
+
"async"
|
718
|
+
])
|
719
|
+
]])
|
720
|
+
}
|
721
|
+
],
|
722
|
+
["cite", { policyAction: d.KEEP_AND_SANITIZE_URL }],
|
723
|
+
[
|
724
|
+
"loading",
|
725
|
+
{
|
726
|
+
policyAction: d.KEEP_AND_NORMALIZE,
|
727
|
+
conditions: /* @__PURE__ */ new Map([[
|
728
|
+
"loading",
|
729
|
+
/* @__PURE__ */ new Set([
|
730
|
+
"eager",
|
731
|
+
"lazy"
|
732
|
+
])
|
733
|
+
]])
|
734
|
+
}
|
735
|
+
],
|
736
|
+
["poster", { policyAction: d.KEEP_AND_SANITIZE_URL }],
|
737
|
+
[
|
738
|
+
"target",
|
739
|
+
{
|
740
|
+
policyAction: d.KEEP_AND_NORMALIZE,
|
741
|
+
conditions: /* @__PURE__ */ new Map([[
|
742
|
+
"target",
|
743
|
+
/* @__PURE__ */ new Set([
|
744
|
+
"_self",
|
745
|
+
"_blank"
|
746
|
+
])
|
747
|
+
]])
|
748
|
+
}
|
749
|
+
]
|
750
|
+
]));
|
751
|
+
/**
|
752
|
+
* @license
|
753
|
+
* SPDX-License-Identifier: Apache-2.0
|
754
|
+
*/
|
755
|
+
class ft {
|
756
|
+
constructor(e, i) {
|
757
|
+
p(this, "sanitizerTable");
|
758
|
+
p(this, "changes", []);
|
759
|
+
this.sanitizerTable = e, H(i);
|
760
|
+
}
|
761
|
+
sanitizeAssertUnchanged(e) {
|
762
|
+
this.changes = [];
|
763
|
+
const i = this.sanitize(e);
|
764
|
+
if (this.changes.length !== 0) {
|
765
|
+
let n = "";
|
766
|
+
throw process.env.NODE_ENV !== "production" && (n = `Unexpected change to HTML value as a result of sanitization. Input: "${e}", sanitized output: "${i}"
|
767
|
+
List of changes:${this.changes.join(`
|
768
|
+
`)}`), new Error(n);
|
769
|
+
}
|
770
|
+
return i;
|
771
|
+
}
|
772
|
+
sanitize(e) {
|
773
|
+
const i = document.createElement("span");
|
774
|
+
i.appendChild(this.sanitizeToFragment(e));
|
775
|
+
let n = new XMLSerializer().serializeToString(i);
|
776
|
+
return n = n.slice(n.indexOf(">") + 1, n.lastIndexOf("</")), M(n);
|
777
|
+
}
|
778
|
+
sanitizeToFragment(e) {
|
779
|
+
const i = We(e), n = document.createTreeWalker(
|
780
|
+
i,
|
781
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,
|
782
|
+
// IE10 and IE11 won't accept a proper `NodeFilter` interface, and
|
783
|
+
// expect the filtering function to be passed directly. It seems that
|
784
|
+
// other browsers also do not mind getting the function directly. see
|
785
|
+
// https://stackoverflow.com/q/38245898
|
786
|
+
(c) => this.nodeFilter(c),
|
787
|
+
// @ts-ignore: error TS2554: Expected 1-3 arguments, but got 4.
|
788
|
+
!1
|
789
|
+
);
|
790
|
+
let r = n.nextNode();
|
791
|
+
const o = document.createDocumentFragment();
|
792
|
+
let a = o;
|
793
|
+
for (; r !== null; ) {
|
794
|
+
let c;
|
795
|
+
if (bt(r))
|
796
|
+
c = this.sanitizeTextNode(r);
|
797
|
+
else if (Et(r))
|
798
|
+
c = this.sanitizeElementNode(r);
|
799
|
+
else
|
800
|
+
throw new Error("Node is not of type text or element");
|
801
|
+
if (a.appendChild(c), r = n.firstChild(), r)
|
802
|
+
a = c;
|
803
|
+
else
|
804
|
+
for (; !(r = n.nextSibling()) && (r = n.parentNode()); )
|
805
|
+
a = a.parentNode;
|
806
|
+
}
|
807
|
+
return o;
|
808
|
+
}
|
809
|
+
sanitizeTextNode(e) {
|
810
|
+
return document.createTextNode(e.data);
|
811
|
+
}
|
812
|
+
sanitizeElementNode(e) {
|
813
|
+
const i = yt(e), n = document.createElement(i), r = e.attributes;
|
814
|
+
for (const { name: o, value: a } of r) {
|
815
|
+
const c = this.sanitizerTable.getAttributePolicy(o, i);
|
816
|
+
if (!this.satisfiesAllConditions(c.conditions, r)) {
|
817
|
+
this.recordChange(`Not all conditions satisfied for attribute: ${o}.`);
|
818
|
+
continue;
|
819
|
+
}
|
820
|
+
switch (c.policyAction) {
|
821
|
+
case d.KEEP:
|
822
|
+
n.setAttribute(o, a);
|
823
|
+
break;
|
824
|
+
case d.KEEP_AND_SANITIZE_URL:
|
825
|
+
const l = ze(a);
|
826
|
+
l !== a && this.recordChange(`Url in attribute ${o} was modified during sanitization. Original url:"${a}" was sanitized to: "${l}"`), n.setAttribute(o, l);
|
827
|
+
break;
|
828
|
+
case d.KEEP_AND_NORMALIZE:
|
829
|
+
n.setAttribute(o, a.toLowerCase());
|
830
|
+
break;
|
831
|
+
case d.KEEP_AND_SANITIZE_STYLE:
|
832
|
+
n.setAttribute(o, a);
|
833
|
+
break;
|
834
|
+
case d.DROP:
|
835
|
+
this.recordChange(`Attribute: ${o} was dropped`);
|
836
|
+
break;
|
837
|
+
default:
|
838
|
+
Ve(c.policyAction, "Unhandled AttributePolicyAction case");
|
839
|
+
}
|
840
|
+
}
|
841
|
+
return n;
|
842
|
+
}
|
843
|
+
nodeFilter(e) {
|
844
|
+
if (bt(e))
|
845
|
+
return NodeFilter.FILTER_ACCEPT;
|
846
|
+
if (!Et(e))
|
847
|
+
return NodeFilter.FILTER_REJECT;
|
848
|
+
const i = yt(e);
|
849
|
+
return i === null ? (this.recordChange(`Node name was null for node: ${e}`), NodeFilter.FILTER_REJECT) : this.sanitizerTable.isAllowedElement(i) ? NodeFilter.FILTER_ACCEPT : (this.recordChange(`Element: ${i} was dropped`), NodeFilter.FILTER_REJECT);
|
850
|
+
}
|
851
|
+
recordChange(e) {
|
852
|
+
process.env.NODE_ENV !== "production" ? this.changes.push(e) : this.changes.length === 0 && this.changes.push("");
|
853
|
+
}
|
854
|
+
satisfiesAllConditions(e, i) {
|
855
|
+
var n;
|
856
|
+
if (!e)
|
857
|
+
return !0;
|
858
|
+
for (const [r, o] of e) {
|
859
|
+
const a = (n = i.getNamedItem(r)) == null ? void 0 : n.value;
|
860
|
+
if (a && !o.has(a))
|
861
|
+
return !1;
|
862
|
+
}
|
863
|
+
return !0;
|
864
|
+
}
|
865
|
+
}
|
866
|
+
const vt = /* @__PURE__ */ (() => new ft($t, w))();
|
867
|
+
function je(t) {
|
868
|
+
return vt.sanitize(t);
|
869
|
+
}
|
870
|
+
function Ke(t) {
|
871
|
+
return vt.sanitizeAssertUnchanged(t);
|
872
|
+
}
|
873
|
+
function $e(t) {
|
874
|
+
return vt.sanitizeToFragment(t);
|
875
|
+
}
|
876
|
+
function Ve(t, e = `unexpected value ${t}!`) {
|
877
|
+
throw new Error(e);
|
878
|
+
}
|
879
|
+
const qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
880
|
+
__proto__: null,
|
881
|
+
HtmlSanitizerImpl: ft,
|
882
|
+
sanitizeHtml: je,
|
883
|
+
sanitizeHtmlAssertUnchanged: Ke,
|
884
|
+
sanitizeHtmlToFragment: $e
|
885
|
+
}, Symbol.toStringTag, { value: "Module" })), Ye = /* @__PURE__ */ g(qe);
|
886
|
+
/**
|
887
|
+
* @license
|
888
|
+
* SPDX-License-Identifier: Apache-2.0
|
889
|
+
*/
|
890
|
+
class Xe {
|
891
|
+
constructor() {
|
892
|
+
p(this, "sanitizerTable");
|
893
|
+
// To denote if the builder has called build() and therefore should make no
|
894
|
+
// further changes to the sanitizer table.
|
895
|
+
p(this, "calledBuild", !1);
|
896
|
+
this.sanitizerTable = $t;
|
897
|
+
}
|
898
|
+
/** Builder option to restrict allowed elements to a smaller subset. */
|
899
|
+
onlyAllowElements(e) {
|
900
|
+
const i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
|
901
|
+
for (let r of e) {
|
902
|
+
if (r = r.toUpperCase(), !this.sanitizerTable.isAllowedElement(r))
|
903
|
+
throw new Error(`Element: ${r}, is not allowed by html5_contract.textpb`);
|
904
|
+
const o = this.sanitizerTable.elementPolicies.get(r);
|
905
|
+
o !== void 0 ? n.set(r, o) : i.add(r);
|
906
|
+
}
|
907
|
+
return this.sanitizerTable = new C(i, n, this.sanitizerTable.allowedGlobalAttributes, this.sanitizerTable.globalAttributePolicies), this;
|
908
|
+
}
|
909
|
+
/**
|
910
|
+
* Builder option to restrict allowed attributes to a smaller subset.
|
911
|
+
*
|
912
|
+
* If the attribute isn't currently allowed then it won't be added.
|
913
|
+
*/
|
914
|
+
onlyAllowAttributes(e) {
|
915
|
+
const i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
916
|
+
for (const o of e)
|
917
|
+
this.sanitizerTable.allowedGlobalAttributes.has(o) && i.add(o), this.sanitizerTable.globalAttributePolicies.has(o) && n.set(o, this.sanitizerTable.globalAttributePolicies.get(o));
|
918
|
+
for (const [o, a] of this.sanitizerTable.elementPolicies.entries()) {
|
919
|
+
const c = /* @__PURE__ */ new Map();
|
920
|
+
for (const [l, v] of a.entries())
|
921
|
+
e.has(l) && c.set(l, v);
|
922
|
+
r.set(o, c);
|
923
|
+
}
|
924
|
+
return this.sanitizerTable = new C(this.sanitizerTable.allowedElements, r, i, n), this;
|
925
|
+
}
|
926
|
+
/**
|
927
|
+
* Allows the set of data attributes passed.
|
928
|
+
*
|
929
|
+
* These values must be prefixed with "data-"
|
930
|
+
*
|
931
|
+
* If called with onlyAllowElements or onlyAllowAttributes, those methods must
|
932
|
+
* be called first.
|
933
|
+
*/
|
934
|
+
allowDataAttributes(e) {
|
935
|
+
const i = new Set(this.sanitizerTable.allowedGlobalAttributes);
|
936
|
+
for (const n of e) {
|
937
|
+
if (n.indexOf("data-") !== 0)
|
938
|
+
throw new Error(`data attribute: ${n} does not begin with the prefix "data-"`);
|
939
|
+
i.add(n);
|
940
|
+
}
|
941
|
+
return this.sanitizerTable = new C(this.sanitizerTable.allowedElements, this.sanitizerTable.elementPolicies, i, this.sanitizerTable.globalAttributePolicies), this;
|
942
|
+
}
|
943
|
+
/**
|
944
|
+
* Preserves style attributes. Note that the sanitizer won't parse and
|
945
|
+
* sanitize the values but keep them as they are. In particular this means
|
946
|
+
* that the code will be able to call functions that could do undesirable
|
947
|
+
* things (e.g. `url` to trigger a network request), as well as any custom
|
948
|
+
* properties or functions defined by the application.
|
949
|
+
*/
|
950
|
+
allowStyleAttributes() {
|
951
|
+
const e = new Map(this.sanitizerTable.globalAttributePolicies);
|
952
|
+
return e.set("style", { policyAction: d.KEEP_AND_SANITIZE_STYLE }), this.sanitizerTable = new C(this.sanitizerTable.allowedElements, this.sanitizerTable.elementPolicies, this.sanitizerTable.allowedGlobalAttributes, e), this;
|
953
|
+
}
|
954
|
+
/**
|
955
|
+
* Preserves the class attribute on all elements. This means contents can
|
956
|
+
* adopt CSS styles from other page elements and possibly mask themselves as
|
957
|
+
* legitimate UI elements, which can lead to phishing.
|
958
|
+
*/
|
959
|
+
allowClassAttributes() {
|
960
|
+
const e = new Map(this.sanitizerTable.globalAttributePolicies);
|
961
|
+
return e.set("class", { policyAction: d.KEEP }), this.sanitizerTable = new C(this.sanitizerTable.allowedElements, this.sanitizerTable.elementPolicies, this.sanitizerTable.allowedGlobalAttributes, e), this;
|
962
|
+
}
|
963
|
+
/**
|
964
|
+
* Preserves id attributes. This carries moderate risk as it allows an
|
965
|
+
* element to override other elements with the same ID.
|
966
|
+
*/
|
967
|
+
allowIdAttributes() {
|
968
|
+
const e = new Map(this.sanitizerTable.globalAttributePolicies);
|
969
|
+
return e.set("id", { policyAction: d.KEEP }), this.sanitizerTable = new C(this.sanitizerTable.allowedElements, this.sanitizerTable.elementPolicies, this.sanitizerTable.allowedGlobalAttributes, e), this;
|
970
|
+
}
|
971
|
+
build() {
|
972
|
+
if (this.calledBuild)
|
973
|
+
throw new Error("this sanitizer has already called build");
|
974
|
+
return this.calledBuild = !0, new ft(this.sanitizerTable, w);
|
975
|
+
}
|
976
|
+
}
|
977
|
+
const Ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
978
|
+
__proto__: null,
|
979
|
+
HtmlSanitizerBuilder: Xe
|
980
|
+
}, Symbol.toStringTag, { value: "Module" })), Je = /* @__PURE__ */ g(Ze);
|
981
|
+
/**
|
982
|
+
* @license
|
983
|
+
* SPDX-License-Identifier: Apache-2.0
|
984
|
+
*/
|
985
|
+
function Qe(t) {
|
986
|
+
if (!(/^https:\/\//.test(t) || /^\/\//.test(t)))
|
987
|
+
return !1;
|
988
|
+
const e = t.indexOf("//") + 2, i = t.indexOf("/", e);
|
989
|
+
if (i <= e)
|
990
|
+
throw new Error("Can't interpolate data in a url's origin, Please make sure to fully specify the origin, terminated with '/'.");
|
991
|
+
const n = t.substring(e, i);
|
992
|
+
if (!/^[0-9a-z.:-]+$/i.test(n))
|
993
|
+
throw new Error("The origin contains unsupported characters.");
|
994
|
+
if (!/^[^:]*(:[0-9]+)?$/i.test(n))
|
995
|
+
throw new Error("Invalid port number.");
|
996
|
+
if (!/(^|\.)[a-z][^.]*$/i.test(n))
|
997
|
+
throw new Error("The top-level domain must start with a letter.");
|
998
|
+
return !0;
|
999
|
+
}
|
1000
|
+
function ti(t) {
|
1001
|
+
if (!/^about:blank/.test(t))
|
1002
|
+
return !1;
|
1003
|
+
if (t !== "about:blank" && !/^about:blank#/.test(t))
|
1004
|
+
throw new Error("The about url is invalid.");
|
1005
|
+
return !0;
|
1006
|
+
}
|
1007
|
+
function ei(t) {
|
1008
|
+
if (!/^\//.test(t))
|
1009
|
+
return !1;
|
1010
|
+
if (t === "/" || t.length > 1 && t[1] !== "/" && t[1] !== "\\")
|
1011
|
+
return !0;
|
1012
|
+
throw new Error("The path start in the url is invalid.");
|
1013
|
+
}
|
1014
|
+
function ii(t, ...e) {
|
1015
|
+
if (process.env.NODE_ENV !== "production" && V(t, !0, "trustedResourceUrl is a template literal tag function and can only be called as such (e.g. trustedResourceUrl`/somepath.js`)"), e.length === 0)
|
1016
|
+
return K(t[0]);
|
1017
|
+
const i = t[0].toLowerCase();
|
1018
|
+
if (process.env.NODE_ENV !== "production") {
|
1019
|
+
if (/^data:/.test(i))
|
1020
|
+
throw new Error("Data URLs cannot have expressions in the template literal input.");
|
1021
|
+
if (!Qe(i) && !ei(i) && !ti(i))
|
1022
|
+
throw new Error("Trying to interpolate expressions in an unsupported url format.");
|
1023
|
+
}
|
1024
|
+
const n = [t[0]];
|
1025
|
+
for (let r = 0; r < e.length; r++)
|
1026
|
+
n.push(encodeURIComponent(e[r])), n.push(t[r + 1]);
|
1027
|
+
return K(n.join(""));
|
1028
|
+
}
|
1029
|
+
function ni(t, e) {
|
1030
|
+
let i = ot(t).toString();
|
1031
|
+
if (/#/.test(i)) {
|
1032
|
+
let r = "";
|
1033
|
+
throw process.env.NODE_ENV !== "production" && (r = `Found a hash in url (${i}), appending not supported`), new Error(r);
|
1034
|
+
}
|
1035
|
+
let n = /\?/.test(i) ? "&" : "?";
|
1036
|
+
return e.forEach((r, o) => {
|
1037
|
+
const a = r instanceof Array ? r : [r];
|
1038
|
+
for (let c = 0; c < a.length; c++) {
|
1039
|
+
const l = a[c];
|
1040
|
+
l != null && (i += n + encodeURIComponent(o) + "=" + encodeURIComponent(String(l)), n = "&");
|
1041
|
+
}
|
1042
|
+
}), K(i);
|
1043
|
+
}
|
1044
|
+
const ri = /[^#]*/;
|
1045
|
+
function oi(t, e) {
|
1046
|
+
const i = ot(t).toString();
|
1047
|
+
return K(ri.exec(i)[0] + "#" + e);
|
1048
|
+
}
|
1049
|
+
function ai(t) {
|
1050
|
+
const e = at(t).toString(), i = new Blob([e], { type: "text/javascript" });
|
1051
|
+
return K(URL.createObjectURL(i));
|
1052
|
+
}
|
1053
|
+
const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1054
|
+
__proto__: null,
|
1055
|
+
appendParams: ni,
|
1056
|
+
blobUrlFromScript: ai,
|
1057
|
+
replaceFragment: oi,
|
1058
|
+
trustedResourceUrl: ii
|
1059
|
+
}, Symbol.toStringTag, { value: "Module" })), si = /* @__PURE__ */ g(ci);
|
1060
|
+
/**
|
1061
|
+
* @license
|
1062
|
+
* SPDX-License-Identifier: Apache-2.0
|
1063
|
+
*/
|
1064
|
+
function li(t) {
|
1065
|
+
return process.env.NODE_ENV !== "production" && V(t, !1, "safeScript is a template literal tag function that only accepts template literals without expressions. For example, safeScript`foo`;"), Z(t[0]);
|
1066
|
+
}
|
1067
|
+
function di(t) {
|
1068
|
+
return Z(t.map(at).join(""));
|
1069
|
+
}
|
1070
|
+
function Vt(t) {
|
1071
|
+
return Z(JSON.stringify(t).replace(/</g, "\\x3c"));
|
1072
|
+
}
|
1073
|
+
function ui(t, ...e) {
|
1074
|
+
if (process.env.NODE_ENV !== "production") {
|
1075
|
+
if (e.some((i) => i !== ""))
|
1076
|
+
throw new Error("safeScriptWithArgs only allows empty string expressions to enable inline comments.");
|
1077
|
+
V(t, !0, "safeScriptWithArgs is a template literal tag function that only accepts template literals. For example, safeScriptWithArgs`foo`;");
|
1078
|
+
}
|
1079
|
+
return (...i) => {
|
1080
|
+
const n = i.map((r) => Vt(r).toString());
|
1081
|
+
return Z(`(${t.join("")})(${n.join(",")})`);
|
1082
|
+
};
|
1083
|
+
}
|
1084
|
+
const pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1085
|
+
__proto__: null,
|
1086
|
+
concatScripts: di,
|
1087
|
+
safeScript: li,
|
1088
|
+
safeScriptWithArgs: ui,
|
1089
|
+
scriptFromJson: Vt
|
1090
|
+
}, Symbol.toStringTag, { value: "Module" })), hi = /* @__PURE__ */ g(pi);
|
1091
|
+
/**
|
1092
|
+
* @license
|
1093
|
+
* SPDX-License-Identifier: Apache-2.0
|
1094
|
+
*/
|
1095
|
+
function mi(t) {
|
1096
|
+
process.env.NODE_ENV !== "production" && V(t, !1, "safeStyle is a template literal tag function that only accepts template literals without expressions. For example, safeStyle`foo`;");
|
1097
|
+
const e = t[0];
|
1098
|
+
if (process.env.NODE_ENV !== "production") {
|
1099
|
+
if (/[<>]/.test(e))
|
1100
|
+
throw new Error("Forbidden characters in style string: " + e);
|
1101
|
+
if (!/;$/.test(e))
|
1102
|
+
throw new Error('Style string does not end with ";": ' + e);
|
1103
|
+
if (!/:/.test(e))
|
1104
|
+
throw new Error('Style string should contain one or more ":": ' + e);
|
1105
|
+
}
|
1106
|
+
return mt(e);
|
1107
|
+
}
|
1108
|
+
function fi(t) {
|
1109
|
+
return mt(t.map(jt).join(""));
|
1110
|
+
}
|
1111
|
+
const vi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1112
|
+
__proto__: null,
|
1113
|
+
concatStyles: fi,
|
1114
|
+
safeStyle: mi
|
1115
|
+
}, Symbol.toStringTag, { value: "Module" })), gi = /* @__PURE__ */ g(vi);
|
1116
|
+
/**
|
1117
|
+
* @license
|
1118
|
+
* SPDX-License-Identifier: Apache-2.0
|
1119
|
+
*/
|
1120
|
+
class qt {
|
1121
|
+
constructor() {
|
1122
|
+
// @ts-ignore: error TS6133: 'brand' is declared but its value is never read.
|
1123
|
+
p(this, "brand");
|
1124
|
+
}
|
1125
|
+
// To prevent structural typing.
|
1126
|
+
}
|
1127
|
+
class gt extends qt {
|
1128
|
+
constructor(i, n) {
|
1129
|
+
super();
|
1130
|
+
p(this, "privateDoNotAccessOrElseWrappedStyleSheet");
|
1131
|
+
process.env.NODE_ENV !== "production" && H(n), this.privateDoNotAccessOrElseWrappedStyleSheet = i;
|
1132
|
+
}
|
1133
|
+
toString() {
|
1134
|
+
return this.privateDoNotAccessOrElseWrappedStyleSheet;
|
1135
|
+
}
|
1136
|
+
}
|
1137
|
+
function _t(t) {
|
1138
|
+
return new gt(t, w);
|
1139
|
+
}
|
1140
|
+
function _i(t) {
|
1141
|
+
return t instanceof gt;
|
1142
|
+
}
|
1143
|
+
function Yt(t) {
|
1144
|
+
if (t instanceof gt)
|
1145
|
+
return t.privateDoNotAccessOrElseWrappedStyleSheet;
|
1146
|
+
{
|
1147
|
+
let e = "";
|
1148
|
+
throw process.env.NODE_ENV !== "production" && (e = "Unexpected type when unwrapping SafeStyleSheet"), new Error(e);
|
1149
|
+
}
|
1150
|
+
}
|
1151
|
+
const yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1152
|
+
__proto__: null,
|
1153
|
+
SafeStyleSheet: qt,
|
1154
|
+
createStyleSheet: _t,
|
1155
|
+
isStyleSheet: _i,
|
1156
|
+
unwrapStyleSheet: Yt
|
1157
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
1158
|
+
/**
|
1159
|
+
* @license
|
1160
|
+
* SPDX-License-Identifier: Apache-2.0
|
1161
|
+
*/
|
1162
|
+
function bi(t) {
|
1163
|
+
process.env.NODE_ENV !== "production" && V(t, !1, "safeStyleSheet is a template literal tag function that only accepts template literals without expressions. For example, safeStyleSheet`foo`;");
|
1164
|
+
const e = t[0];
|
1165
|
+
if (process.env.NODE_ENV !== "production" && /[<>]/.test(e))
|
1166
|
+
throw new Error("Forbidden characters in styleSheet string: " + e);
|
1167
|
+
return _t(e);
|
1168
|
+
}
|
1169
|
+
function Ei(t) {
|
1170
|
+
return _t(t.map(Yt).join(""));
|
1171
|
+
}
|
1172
|
+
const Ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1173
|
+
__proto__: null,
|
1174
|
+
concatStyleSheets: Ei,
|
1175
|
+
safeStyleSheet: bi
|
1176
|
+
}, Symbol.toStringTag, { value: "Module" })), Si = /* @__PURE__ */ g(Ai), wi = /* @__PURE__ */ g(pe), Ti = /* @__PURE__ */ g(Ee), Ri = /* @__PURE__ */ g(we), Ii = /* @__PURE__ */ g(De), Di = /* @__PURE__ */ g(Me), Oi = /* @__PURE__ */ g(yi);
|
1177
|
+
(function(t) {
|
1178
|
+
/**
|
1179
|
+
* @license
|
1180
|
+
* SPDX-License-Identifier: Apache-2.0
|
1181
|
+
*/
|
1182
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.unwrapStyleSheet = t.SafeStyleSheet = t.isStyleSheet = t.unwrapStyle = t.SafeStyle = t.isStyle = t.unwrapScript = t.SafeScript = t.isScript = t.EMPTY_SCRIPT = t.unwrapResourceUrl = t.TrustedResourceUrl = t.isResourceUrl = t.unwrapHtml = t.SafeHtml = t.isHtml = t.EMPTY_HTML = t.unwrapAttributePrefix = t.SafeAttributePrefix = t.safeStyleSheet = t.concatStyleSheets = t.safeStyle = t.concatStyles = t.scriptFromJson = t.safeScriptWithArgs = t.safeScript = t.concatScripts = t.trustedResourceUrl = t.replaceFragment = t.blobUrlFromScript = t.appendParams = t.HtmlSanitizerBuilder = t.sanitizeHtmlToFragment = t.sanitizeHtmlAssertUnchanged = t.sanitizeHtml = t.htmlEscape = t.createScriptSrc = t.createScript = t.concatHtmls = t.safeAttrPrefix = void 0;
|
1183
|
+
var e = ve;
|
1184
|
+
Object.defineProperty(t, "safeAttrPrefix", { enumerable: !0, get: function() {
|
1185
|
+
return e.safeAttrPrefix;
|
1186
|
+
} });
|
1187
|
+
var i = Fe;
|
1188
|
+
Object.defineProperty(t, "concatHtmls", { enumerable: !0, get: function() {
|
1189
|
+
return i.concatHtmls;
|
1190
|
+
} }), Object.defineProperty(t, "createScript", { enumerable: !0, get: function() {
|
1191
|
+
return i.createScript;
|
1192
|
+
} }), Object.defineProperty(t, "createScriptSrc", { enumerable: !0, get: function() {
|
1193
|
+
return i.createScriptSrc;
|
1194
|
+
} }), Object.defineProperty(t, "htmlEscape", { enumerable: !0, get: function() {
|
1195
|
+
return i.htmlEscape;
|
1196
|
+
} });
|
1197
|
+
var n = Ye;
|
1198
|
+
Object.defineProperty(t, "sanitizeHtml", { enumerable: !0, get: function() {
|
1199
|
+
return n.sanitizeHtml;
|
1200
|
+
} }), Object.defineProperty(t, "sanitizeHtmlAssertUnchanged", { enumerable: !0, get: function() {
|
1201
|
+
return n.sanitizeHtmlAssertUnchanged;
|
1202
|
+
} }), Object.defineProperty(t, "sanitizeHtmlToFragment", { enumerable: !0, get: function() {
|
1203
|
+
return n.sanitizeHtmlToFragment;
|
1204
|
+
} });
|
1205
|
+
var r = Je;
|
1206
|
+
Object.defineProperty(t, "HtmlSanitizerBuilder", { enumerable: !0, get: function() {
|
1207
|
+
return r.HtmlSanitizerBuilder;
|
1208
|
+
} });
|
1209
|
+
var o = si;
|
1210
|
+
Object.defineProperty(t, "appendParams", { enumerable: !0, get: function() {
|
1211
|
+
return o.appendParams;
|
1212
|
+
} }), Object.defineProperty(t, "blobUrlFromScript", { enumerable: !0, get: function() {
|
1213
|
+
return o.blobUrlFromScript;
|
1214
|
+
} }), Object.defineProperty(t, "replaceFragment", { enumerable: !0, get: function() {
|
1215
|
+
return o.replaceFragment;
|
1216
|
+
} }), Object.defineProperty(t, "trustedResourceUrl", { enumerable: !0, get: function() {
|
1217
|
+
return o.trustedResourceUrl;
|
1218
|
+
} });
|
1219
|
+
var a = hi;
|
1220
|
+
Object.defineProperty(t, "concatScripts", { enumerable: !0, get: function() {
|
1221
|
+
return a.concatScripts;
|
1222
|
+
} }), Object.defineProperty(t, "safeScript", { enumerable: !0, get: function() {
|
1223
|
+
return a.safeScript;
|
1224
|
+
} }), Object.defineProperty(t, "safeScriptWithArgs", { enumerable: !0, get: function() {
|
1225
|
+
return a.safeScriptWithArgs;
|
1226
|
+
} }), Object.defineProperty(t, "scriptFromJson", { enumerable: !0, get: function() {
|
1227
|
+
return a.scriptFromJson;
|
1228
|
+
} });
|
1229
|
+
var c = gi;
|
1230
|
+
Object.defineProperty(t, "concatStyles", { enumerable: !0, get: function() {
|
1231
|
+
return c.concatStyles;
|
1232
|
+
} }), Object.defineProperty(t, "safeStyle", { enumerable: !0, get: function() {
|
1233
|
+
return c.safeStyle;
|
1234
|
+
} });
|
1235
|
+
var l = Si;
|
1236
|
+
Object.defineProperty(t, "concatStyleSheets", { enumerable: !0, get: function() {
|
1237
|
+
return l.concatStyleSheets;
|
1238
|
+
} }), Object.defineProperty(t, "safeStyleSheet", { enumerable: !0, get: function() {
|
1239
|
+
return l.safeStyleSheet;
|
1240
|
+
} });
|
1241
|
+
var v = wi;
|
1242
|
+
Object.defineProperty(t, "SafeAttributePrefix", { enumerable: !0, get: function() {
|
1243
|
+
return v.SafeAttributePrefix;
|
1244
|
+
} }), Object.defineProperty(t, "unwrapAttributePrefix", { enumerable: !0, get: function() {
|
1245
|
+
return v.unwrapAttributePrefix;
|
1246
|
+
} });
|
1247
|
+
var y = Ti;
|
1248
|
+
Object.defineProperty(t, "EMPTY_HTML", { enumerable: !0, get: function() {
|
1249
|
+
return y.EMPTY_HTML;
|
1250
|
+
} }), Object.defineProperty(t, "isHtml", { enumerable: !0, get: function() {
|
1251
|
+
return y.isHtml;
|
1252
|
+
} }), Object.defineProperty(t, "SafeHtml", { enumerable: !0, get: function() {
|
1253
|
+
return y.SafeHtml;
|
1254
|
+
} }), Object.defineProperty(t, "unwrapHtml", { enumerable: !0, get: function() {
|
1255
|
+
return y.unwrapHtml;
|
1256
|
+
} });
|
1257
|
+
var I = Ri;
|
1258
|
+
Object.defineProperty(t, "isResourceUrl", { enumerable: !0, get: function() {
|
1259
|
+
return I.isResourceUrl;
|
1260
|
+
} }), Object.defineProperty(t, "TrustedResourceUrl", { enumerable: !0, get: function() {
|
1261
|
+
return I.TrustedResourceUrl;
|
1262
|
+
} }), Object.defineProperty(t, "unwrapResourceUrl", { enumerable: !0, get: function() {
|
1263
|
+
return I.unwrapResourceUrl;
|
1264
|
+
} });
|
1265
|
+
var P = Ii;
|
1266
|
+
Object.defineProperty(t, "EMPTY_SCRIPT", { enumerable: !0, get: function() {
|
1267
|
+
return P.EMPTY_SCRIPT;
|
1268
|
+
} }), Object.defineProperty(t, "isScript", { enumerable: !0, get: function() {
|
1269
|
+
return P.isScript;
|
1270
|
+
} }), Object.defineProperty(t, "SafeScript", { enumerable: !0, get: function() {
|
1271
|
+
return P.SafeScript;
|
1272
|
+
} }), Object.defineProperty(t, "unwrapScript", { enumerable: !0, get: function() {
|
1273
|
+
return P.unwrapScript;
|
1274
|
+
} });
|
1275
|
+
var k = Di;
|
1276
|
+
Object.defineProperty(t, "isStyle", { enumerable: !0, get: function() {
|
1277
|
+
return k.isStyle;
|
1278
|
+
} }), Object.defineProperty(t, "SafeStyle", { enumerable: !0, get: function() {
|
1279
|
+
return k.SafeStyle;
|
1280
|
+
} }), Object.defineProperty(t, "unwrapStyle", { enumerable: !0, get: function() {
|
1281
|
+
return k.unwrapStyle;
|
1282
|
+
} });
|
1283
|
+
var B = Oi;
|
1284
|
+
Object.defineProperty(t, "isStyleSheet", { enumerable: !0, get: function() {
|
1285
|
+
return B.isStyleSheet;
|
1286
|
+
} }), Object.defineProperty(t, "SafeStyleSheet", { enumerable: !0, get: function() {
|
1287
|
+
return B.SafeStyleSheet;
|
1288
|
+
} }), Object.defineProperty(t, "unwrapStyleSheet", { enumerable: !0, get: function() {
|
1289
|
+
return B.unwrapStyleSheet;
|
1290
|
+
} });
|
1291
|
+
})(O);
|
1292
|
+
/**
|
1293
|
+
* @license
|
1294
|
+
* Copyright 2020 Google Inc.
|
1295
|
+
*
|
1296
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
1297
|
+
* of this software and associated documentation files (the "Software"), to deal
|
1298
|
+
* in the Software without restriction, including without limitation the rights
|
1299
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1300
|
+
* copies of the Software, and to permit persons to whom the Software is
|
1301
|
+
* furnished to do so, subject to the following conditions:
|
1302
|
+
*
|
1303
|
+
* The above copyright notice and this permission notice shall be included in
|
1304
|
+
* all copies or substantial portions of the Software.
|
1305
|
+
*
|
1306
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1307
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1308
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1309
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1310
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1311
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1312
|
+
* THE SOFTWARE.
|
1313
|
+
*/
|
1314
|
+
var Ni = (
|
1315
|
+
/** @class */
|
1316
|
+
function() {
|
1317
|
+
function t() {
|
1318
|
+
this.rafIDs = /* @__PURE__ */ new Map();
|
1319
|
+
}
|
1320
|
+
return t.prototype.request = function(e, i) {
|
1321
|
+
var n = this;
|
1322
|
+
this.cancel(e);
|
1323
|
+
var r = requestAnimationFrame(function(o) {
|
1324
|
+
n.rafIDs.delete(e), i(o);
|
1325
|
+
});
|
1326
|
+
this.rafIDs.set(e, r);
|
1327
|
+
}, t.prototype.cancel = function(e) {
|
1328
|
+
var i = this.rafIDs.get(e);
|
1329
|
+
i && (cancelAnimationFrame(i), this.rafIDs.delete(e));
|
1330
|
+
}, t.prototype.cancelAll = function() {
|
1331
|
+
var e = this;
|
1332
|
+
this.rafIDs.forEach(function(i, n) {
|
1333
|
+
e.cancel(n);
|
1334
|
+
});
|
1335
|
+
}, t.prototype.getQueue = function() {
|
1336
|
+
var e = [];
|
1337
|
+
return this.rafIDs.forEach(function(i, n) {
|
1338
|
+
e.push(n);
|
1339
|
+
}), e;
|
1340
|
+
}, t;
|
1341
|
+
}()
|
1342
|
+
);
|
1343
|
+
/**
|
1344
|
+
* @license
|
1345
|
+
* Copyright 2016 Google Inc.
|
1346
|
+
*
|
1347
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
1348
|
+
* of this software and associated documentation files (the "Software"), to deal
|
1349
|
+
* in the Software without restriction, including without limitation the rights
|
1350
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1351
|
+
* copies of the Software, and to permit persons to whom the Software is
|
1352
|
+
* furnished to do so, subject to the following conditions:
|
1353
|
+
*
|
1354
|
+
* The above copyright notice and this permission notice shall be included in
|
1355
|
+
* all copies or substantial portions of the Software.
|
1356
|
+
*
|
1357
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1358
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1359
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1360
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1361
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1362
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1363
|
+
* THE SOFTWARE.
|
1364
|
+
*/
|
1365
|
+
var ct = (
|
1366
|
+
/** @class */
|
1367
|
+
function() {
|
1368
|
+
function t(e) {
|
1369
|
+
e === void 0 && (e = {}), this.adapter = e;
|
1370
|
+
}
|
1371
|
+
return Object.defineProperty(t, "cssClasses", {
|
1372
|
+
get: function() {
|
1373
|
+
return {};
|
1374
|
+
},
|
1375
|
+
enumerable: !1,
|
1376
|
+
configurable: !0
|
1377
|
+
}), Object.defineProperty(t, "strings", {
|
1378
|
+
get: function() {
|
1379
|
+
return {};
|
1380
|
+
},
|
1381
|
+
enumerable: !1,
|
1382
|
+
configurable: !0
|
1383
|
+
}), Object.defineProperty(t, "numbers", {
|
1384
|
+
get: function() {
|
1385
|
+
return {};
|
1386
|
+
},
|
1387
|
+
enumerable: !1,
|
1388
|
+
configurable: !0
|
1389
|
+
}), Object.defineProperty(t, "defaultAdapter", {
|
1390
|
+
get: function() {
|
1391
|
+
return {};
|
1392
|
+
},
|
1393
|
+
enumerable: !1,
|
1394
|
+
configurable: !0
|
1395
|
+
}), t.prototype.init = function() {
|
1396
|
+
}, t.prototype.destroy = function() {
|
1397
|
+
}, t;
|
1398
|
+
}()
|
1399
|
+
);
|
1400
|
+
/**
|
1401
|
+
* @license
|
1402
|
+
* Copyright 2020 Google Inc.
|
1403
|
+
*
|
1404
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
1405
|
+
* of this software and associated documentation files (the "Software"), to deal
|
1406
|
+
* in the Software without restriction, including without limitation the rights
|
1407
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1408
|
+
* copies of the Software, and to permit persons to whom the Software is
|
1409
|
+
* furnished to do so, subject to the following conditions:
|
1410
|
+
*
|
1411
|
+
* The above copyright notice and this permission notice shall be included in
|
1412
|
+
* all copies or substantial portions of the Software.
|
1413
|
+
*
|
1414
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1415
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1416
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1417
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1418
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1419
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1420
|
+
* THE SOFTWARE.
|
1421
|
+
*/
|
1422
|
+
var s = {
|
1423
|
+
UNKNOWN: "Unknown",
|
1424
|
+
BACKSPACE: "Backspace",
|
1425
|
+
ENTER: "Enter",
|
1426
|
+
SPACEBAR: "Spacebar",
|
1427
|
+
PAGE_UP: "PageUp",
|
1428
|
+
PAGE_DOWN: "PageDown",
|
1429
|
+
END: "End",
|
1430
|
+
HOME: "Home",
|
1431
|
+
ARROW_LEFT: "ArrowLeft",
|
1432
|
+
ARROW_UP: "ArrowUp",
|
1433
|
+
ARROW_RIGHT: "ArrowRight",
|
1434
|
+
ARROW_DOWN: "ArrowDown",
|
1435
|
+
DELETE: "Delete",
|
1436
|
+
ESCAPE: "Escape",
|
1437
|
+
TAB: "Tab"
|
1438
|
+
}, m = /* @__PURE__ */ new Set();
|
1439
|
+
m.add(s.BACKSPACE);
|
1440
|
+
m.add(s.ENTER);
|
1441
|
+
m.add(s.SPACEBAR);
|
1442
|
+
m.add(s.PAGE_UP);
|
1443
|
+
m.add(s.PAGE_DOWN);
|
1444
|
+
m.add(s.END);
|
1445
|
+
m.add(s.HOME);
|
1446
|
+
m.add(s.ARROW_LEFT);
|
1447
|
+
m.add(s.ARROW_UP);
|
1448
|
+
m.add(s.ARROW_RIGHT);
|
1449
|
+
m.add(s.ARROW_DOWN);
|
1450
|
+
m.add(s.DELETE);
|
1451
|
+
m.add(s.ESCAPE);
|
1452
|
+
m.add(s.TAB);
|
1453
|
+
var _ = {
|
1454
|
+
BACKSPACE: 8,
|
1455
|
+
ENTER: 13,
|
1456
|
+
SPACEBAR: 32,
|
1457
|
+
PAGE_UP: 33,
|
1458
|
+
PAGE_DOWN: 34,
|
1459
|
+
END: 35,
|
1460
|
+
HOME: 36,
|
1461
|
+
ARROW_LEFT: 37,
|
1462
|
+
ARROW_UP: 38,
|
1463
|
+
ARROW_RIGHT: 39,
|
1464
|
+
ARROW_DOWN: 40,
|
1465
|
+
DELETE: 46,
|
1466
|
+
ESCAPE: 27,
|
1467
|
+
TAB: 9
|
1468
|
+
}, f = /* @__PURE__ */ new Map();
|
1469
|
+
f.set(_.BACKSPACE, s.BACKSPACE);
|
1470
|
+
f.set(_.ENTER, s.ENTER);
|
1471
|
+
f.set(_.SPACEBAR, s.SPACEBAR);
|
1472
|
+
f.set(_.PAGE_UP, s.PAGE_UP);
|
1473
|
+
f.set(_.PAGE_DOWN, s.PAGE_DOWN);
|
1474
|
+
f.set(_.END, s.END);
|
1475
|
+
f.set(_.HOME, s.HOME);
|
1476
|
+
f.set(_.ARROW_LEFT, s.ARROW_LEFT);
|
1477
|
+
f.set(_.ARROW_UP, s.ARROW_UP);
|
1478
|
+
f.set(_.ARROW_RIGHT, s.ARROW_RIGHT);
|
1479
|
+
f.set(_.ARROW_DOWN, s.ARROW_DOWN);
|
1480
|
+
f.set(_.DELETE, s.DELETE);
|
1481
|
+
f.set(_.ESCAPE, s.ESCAPE);
|
1482
|
+
f.set(_.TAB, s.TAB);
|
1483
|
+
var T = /* @__PURE__ */ new Set();
|
1484
|
+
T.add(s.PAGE_UP);
|
1485
|
+
T.add(s.PAGE_DOWN);
|
1486
|
+
T.add(s.END);
|
1487
|
+
T.add(s.HOME);
|
1488
|
+
T.add(s.ARROW_LEFT);
|
1489
|
+
T.add(s.ARROW_UP);
|
1490
|
+
T.add(s.ARROW_RIGHT);
|
1491
|
+
T.add(s.ARROW_DOWN);
|
1492
|
+
function Xt(t) {
|
1493
|
+
var e = t.key;
|
1494
|
+
if (m.has(e))
|
1495
|
+
return e;
|
1496
|
+
var i = f.get(t.keyCode);
|
1497
|
+
return i || s.UNKNOWN;
|
1498
|
+
}
|
1499
|
+
function Pi(t) {
|
1500
|
+
return T.has(Xt(t));
|
1501
|
+
}
|
1502
|
+
/**
|
1503
|
+
* @license
|
1504
|
+
* Copyright 2020 Google Inc.
|
1505
|
+
*
|
1506
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
1507
|
+
* of this software and associated documentation files (the "Software"), to deal
|
1508
|
+
* in the Software without restriction, including without limitation the rights
|
1509
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1510
|
+
* copies of the Software, and to permit persons to whom the Software is
|
1511
|
+
* furnished to do so, subject to the following conditions:
|
1512
|
+
*
|
1513
|
+
* The above copyright notice and this permission notice shall be included in
|
1514
|
+
* all copies or substantial portions of the Software.
|
1515
|
+
*
|
1516
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1517
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1518
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1519
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1520
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1521
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1522
|
+
* THE SOFTWARE.
|
1523
|
+
*/
|
1524
|
+
var X;
|
1525
|
+
(function(t) {
|
1526
|
+
t.PRIMARY_ACTION = "mdc-evolution-chip__action--primary", t.TRAILING_ACTION = "mdc-evolution-chip__action--trailing", t.CHIP_ROOT = "mdc-evolution-chip";
|
1527
|
+
})(X || (X = {}));
|
1528
|
+
var A;
|
1529
|
+
(function(t) {
|
1530
|
+
t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.CLICK = 1] = "CLICK", t[t.BACKSPACE_KEY = 2] = "BACKSPACE_KEY", t[t.DELETE_KEY = 3] = "DELETE_KEY", t[t.SPACEBAR_KEY = 4] = "SPACEBAR_KEY", t[t.ENTER_KEY = 5] = "ENTER_KEY";
|
1531
|
+
})(A || (A = {}));
|
1532
|
+
var b;
|
1533
|
+
(function(t) {
|
1534
|
+
t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.PRIMARY = 1] = "PRIMARY", t[t.TRAILING = 2] = "TRAILING";
|
1535
|
+
})(b || (b = {}));
|
1536
|
+
var $;
|
1537
|
+
(function(t) {
|
1538
|
+
t.INTERACTION = "MDCChipAction:interaction", t.NAVIGATION = "MDCChipAction:navigation";
|
1539
|
+
})($ || ($ = {}));
|
1540
|
+
var x;
|
1541
|
+
(function(t) {
|
1542
|
+
t[t.FOCUSABLE = 0] = "FOCUSABLE", t[t.FOCUSABLE_AND_FOCUSED = 1] = "FOCUSABLE_AND_FOCUSED", t[t.NOT_FOCUSABLE = 2] = "NOT_FOCUSABLE";
|
1543
|
+
})(x || (x = {}));
|
1544
|
+
var h;
|
1545
|
+
(function(t) {
|
1546
|
+
t.ARIA_DISABLED = "aria-disabled", t.ARIA_HIDDEN = "aria-hidden", t.ARIA_SELECTED = "aria-selected", t.DATA_DELETABLE = "data-mdc-deletable", t.DISABLED = "disabled", t.ROLE = "role", t.TAB_INDEX = "tabindex";
|
1547
|
+
})(h || (h = {}));
|
1548
|
+
/**
|
1549
|
+
* @license
|
1550
|
+
* Copyright 2016 Google Inc.
|
1551
|
+
*
|
1552
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
1553
|
+
* of this software and associated documentation files (the "Software"), to deal
|
1554
|
+
* in the Software without restriction, including without limitation the rights
|
1555
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1556
|
+
* copies of the Software, and to permit persons to whom the Software is
|
1557
|
+
* furnished to do so, subject to the following conditions:
|
1558
|
+
*
|
1559
|
+
* The above copyright notice and this permission notice shall be included in
|
1560
|
+
* all copies or substantial portions of the Software.
|
1561
|
+
*
|
1562
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1563
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1564
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1565
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1566
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1567
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1568
|
+
* THE SOFTWARE.
|
1569
|
+
*/
|
1570
|
+
var u;
|
1571
|
+
(function(t) {
|
1572
|
+
t.SELECTING = "mdc-evolution-chip--selecting", t.DESELECTING = "mdc-evolution-chip--deselecting", t.SELECTING_WITH_PRIMARY_ICON = "mdc-evolution-chip--selecting-with-primary-icon", t.DESELECTING_WITH_PRIMARY_ICON = "mdc-evolution-chip--deselecting-with-primary-icon", t.DISABLED = "mdc-evolution-chip--disabled", t.ENTER = "mdc-evolution-chip--enter", t.EXIT = "mdc-evolution-chip--exit", t.SELECTED = "mdc-evolution-chip--selected", t.HIDDEN = "mdc-evolution-chip--hidden", t.WITH_PRIMARY_ICON = "mdc-evolution-chip--with-primary-icon";
|
1573
|
+
})(u || (u = {}));
|
1574
|
+
var W;
|
1575
|
+
(function(t) {
|
1576
|
+
t.INTERACTION = "MDCChip:interaction", t.NAVIGATION = "MDCChip:navigation", t.ANIMATION = "MDCChip:animation";
|
1577
|
+
})(W || (W = {}));
|
1578
|
+
var nt;
|
1579
|
+
(function(t) {
|
1580
|
+
t.DATA_REMOVED_ANNOUNCEMENT = "data-mdc-removed-announcement", t.DATA_ADDED_ANNOUNCEMENT = "data-mdc-added-announcement";
|
1581
|
+
})(nt || (nt = {}));
|
1582
|
+
var D;
|
1583
|
+
(function(t) {
|
1584
|
+
t.ENTER = "mdc-evolution-chip-enter", t.EXIT = "mdc-evolution-chip-exit";
|
1585
|
+
})(D || (D = {}));
|
1586
|
+
/**
|
1587
|
+
* @license
|
1588
|
+
* Copyright 2020 Google Inc.
|
1589
|
+
*
|
1590
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
1591
|
+
* of this software and associated documentation files (the "Software"), to deal
|
1592
|
+
* in the Software without restriction, including without limitation the rights
|
1593
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1594
|
+
* copies of the Software, and to permit persons to whom the Software is
|
1595
|
+
* furnished to do so, subject to the following conditions:
|
1596
|
+
*
|
1597
|
+
* The above copyright notice and this permission notice shall be included in
|
1598
|
+
* all copies or substantial portions of the Software.
|
1599
|
+
*
|
1600
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1601
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1602
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1603
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1604
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1605
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1606
|
+
* THE SOFTWARE.
|
1607
|
+
*/
|
1608
|
+
var F;
|
1609
|
+
(function(t) {
|
1610
|
+
t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT";
|
1611
|
+
})(F || (F = {}));
|
1612
|
+
var E;
|
1613
|
+
(function(t) {
|
1614
|
+
t.SELECTION = "selection", t.EXIT = "exit";
|
1615
|
+
})(E || (E = {}));
|
1616
|
+
var Ci = (
|
1617
|
+
/** @class */
|
1618
|
+
function(t) {
|
1619
|
+
U(e, t);
|
1620
|
+
function e(i) {
|
1621
|
+
var n = t.call(this, S(S({}, e.defaultAdapter), i)) || this;
|
1622
|
+
return n.animFrame = new Ni(), n;
|
1623
|
+
}
|
1624
|
+
return Object.defineProperty(e, "defaultAdapter", {
|
1625
|
+
get: function() {
|
1626
|
+
return {
|
1627
|
+
addClass: function() {
|
1628
|
+
},
|
1629
|
+
emitEvent: function() {
|
1630
|
+
},
|
1631
|
+
getActions: function() {
|
1632
|
+
return [];
|
1633
|
+
},
|
1634
|
+
getAttribute: function() {
|
1635
|
+
return null;
|
1636
|
+
},
|
1637
|
+
getElementID: function() {
|
1638
|
+
return "";
|
1639
|
+
},
|
1640
|
+
getOffsetWidth: function() {
|
1641
|
+
return 0;
|
1642
|
+
},
|
1643
|
+
hasClass: function() {
|
1644
|
+
return !1;
|
1645
|
+
},
|
1646
|
+
isActionDisabled: function() {
|
1647
|
+
return !1;
|
1648
|
+
},
|
1649
|
+
isActionFocusable: function() {
|
1650
|
+
return !1;
|
1651
|
+
},
|
1652
|
+
isActionSelectable: function() {
|
1653
|
+
return !1;
|
1654
|
+
},
|
1655
|
+
isActionSelected: function() {
|
1656
|
+
return !1;
|
1657
|
+
},
|
1658
|
+
isRTL: function() {
|
1659
|
+
return !1;
|
1660
|
+
},
|
1661
|
+
removeClass: function() {
|
1662
|
+
},
|
1663
|
+
setActionDisabled: function() {
|
1664
|
+
},
|
1665
|
+
setActionFocus: function() {
|
1666
|
+
},
|
1667
|
+
setActionSelected: function() {
|
1668
|
+
},
|
1669
|
+
setStyleProperty: function() {
|
1670
|
+
}
|
1671
|
+
};
|
1672
|
+
},
|
1673
|
+
enumerable: !1,
|
1674
|
+
configurable: !0
|
1675
|
+
}), e.prototype.destroy = function() {
|
1676
|
+
this.animFrame.cancelAll();
|
1677
|
+
}, e.prototype.getElementID = function() {
|
1678
|
+
return this.adapter.getElementID();
|
1679
|
+
}, e.prototype.setDisabled = function(i) {
|
1680
|
+
var n, r, o = this.getActions();
|
1681
|
+
try {
|
1682
|
+
for (var a = G(o), c = a.next(); !c.done; c = a.next()) {
|
1683
|
+
var l = c.value;
|
1684
|
+
this.adapter.setActionDisabled(l, i);
|
1685
|
+
}
|
1686
|
+
} catch (v) {
|
1687
|
+
n = { error: v };
|
1688
|
+
} finally {
|
1689
|
+
try {
|
1690
|
+
c && !c.done && (r = a.return) && r.call(a);
|
1691
|
+
} finally {
|
1692
|
+
if (n)
|
1693
|
+
throw n.error;
|
1694
|
+
}
|
1695
|
+
}
|
1696
|
+
i ? this.adapter.addClass(u.DISABLED) : this.adapter.removeClass(u.DISABLED);
|
1697
|
+
}, e.prototype.isDisabled = function() {
|
1698
|
+
var i, n, r = this.getActions();
|
1699
|
+
try {
|
1700
|
+
for (var o = G(r), a = o.next(); !a.done; a = o.next()) {
|
1701
|
+
var c = a.value;
|
1702
|
+
if (this.adapter.isActionDisabled(c))
|
1703
|
+
return !0;
|
1704
|
+
}
|
1705
|
+
} catch (l) {
|
1706
|
+
i = { error: l };
|
1707
|
+
} finally {
|
1708
|
+
try {
|
1709
|
+
a && !a.done && (n = o.return) && n.call(o);
|
1710
|
+
} finally {
|
1711
|
+
if (i)
|
1712
|
+
throw i.error;
|
1713
|
+
}
|
1714
|
+
}
|
1715
|
+
return !1;
|
1716
|
+
}, e.prototype.getActions = function() {
|
1717
|
+
return this.adapter.getActions();
|
1718
|
+
}, e.prototype.isActionFocusable = function(i) {
|
1719
|
+
return this.adapter.isActionFocusable(i);
|
1720
|
+
}, e.prototype.isActionSelectable = function(i) {
|
1721
|
+
return this.adapter.isActionSelectable(i);
|
1722
|
+
}, e.prototype.isActionSelected = function(i) {
|
1723
|
+
return this.adapter.isActionSelected(i);
|
1724
|
+
}, e.prototype.setActionFocus = function(i, n) {
|
1725
|
+
this.adapter.setActionFocus(i, n);
|
1726
|
+
}, e.prototype.setActionSelected = function(i, n) {
|
1727
|
+
this.adapter.setActionSelected(i, n), this.animateSelection(n);
|
1728
|
+
}, e.prototype.startAnimation = function(i) {
|
1729
|
+
if (i === D.ENTER) {
|
1730
|
+
this.adapter.addClass(u.ENTER);
|
1731
|
+
return;
|
1732
|
+
}
|
1733
|
+
if (i === D.EXIT) {
|
1734
|
+
this.adapter.addClass(u.EXIT);
|
1735
|
+
return;
|
1736
|
+
}
|
1737
|
+
}, e.prototype.handleAnimationEnd = function(i) {
|
1738
|
+
var n = this, r = i.animationName;
|
1739
|
+
if (r === D.ENTER) {
|
1740
|
+
this.adapter.removeClass(u.ENTER), this.adapter.emitEvent(W.ANIMATION, {
|
1741
|
+
chipID: this.getElementID(),
|
1742
|
+
animation: D.ENTER,
|
1743
|
+
addedAnnouncement: this.getAddedAnnouncement(),
|
1744
|
+
isComplete: !0
|
1745
|
+
});
|
1746
|
+
return;
|
1747
|
+
}
|
1748
|
+
if (r === D.EXIT) {
|
1749
|
+
this.adapter.removeClass(u.EXIT), this.adapter.addClass(u.HIDDEN);
|
1750
|
+
var o = this.adapter.getOffsetWidth();
|
1751
|
+
this.adapter.setStyleProperty("width", o + "px"), this.animFrame.request(E.EXIT, function() {
|
1752
|
+
n.animFrame.request(E.EXIT, function() {
|
1753
|
+
n.adapter.setStyleProperty("width", "0");
|
1754
|
+
});
|
1755
|
+
});
|
1756
|
+
}
|
1757
|
+
}, e.prototype.handleTransitionEnd = function() {
|
1758
|
+
this.adapter.hasClass(u.HIDDEN) && this.adapter.emitEvent(W.ANIMATION, {
|
1759
|
+
chipID: this.getElementID(),
|
1760
|
+
animation: D.EXIT,
|
1761
|
+
removedAnnouncement: this.getRemovedAnnouncement(),
|
1762
|
+
isComplete: !0
|
1763
|
+
});
|
1764
|
+
}, e.prototype.handleActionInteraction = function(i) {
|
1765
|
+
var n = i.detail, r = n.source, o = n.actionID, a = this.adapter.isActionSelectable(r), c = this.adapter.isActionSelected(r);
|
1766
|
+
this.adapter.emitEvent(W.INTERACTION, {
|
1767
|
+
chipID: this.getElementID(),
|
1768
|
+
shouldRemove: this.shouldRemove(n),
|
1769
|
+
actionID: o,
|
1770
|
+
isSelectable: a,
|
1771
|
+
isSelected: c,
|
1772
|
+
source: r
|
1773
|
+
});
|
1774
|
+
}, e.prototype.handleActionNavigation = function(i) {
|
1775
|
+
var n = i.detail, r = n.source, o = n.key, a = this.adapter.isRTL(), c = this.adapter.isActionFocusable(b.TRAILING), l = this.adapter.isActionFocusable(b.PRIMARY), v = this.directionFromKey(o, a), y = r === b.PRIMARY && v === F.RIGHT && c, I = r === b.TRAILING && v === F.LEFT && l;
|
1776
|
+
if (y) {
|
1777
|
+
this.navigateActions({ from: r, to: b.TRAILING });
|
1778
|
+
return;
|
1779
|
+
}
|
1780
|
+
if (I) {
|
1781
|
+
this.navigateActions({ from: r, to: b.PRIMARY });
|
1782
|
+
return;
|
1783
|
+
}
|
1784
|
+
this.adapter.emitEvent(W.NAVIGATION, {
|
1785
|
+
chipID: this.getElementID(),
|
1786
|
+
isRTL: a,
|
1787
|
+
source: r,
|
1788
|
+
key: o
|
1789
|
+
});
|
1790
|
+
}, e.prototype.directionFromKey = function(i, n) {
|
1791
|
+
var r = i === s.ARROW_LEFT, o = i === s.ARROW_RIGHT;
|
1792
|
+
return !n && r || n && o ? F.LEFT : !n && o || n && r ? F.RIGHT : F.UNSPECIFIED;
|
1793
|
+
}, e.prototype.navigateActions = function(i) {
|
1794
|
+
this.adapter.setActionFocus(i.from, x.NOT_FOCUSABLE), this.adapter.setActionFocus(i.to, x.FOCUSABLE_AND_FOCUSED);
|
1795
|
+
}, e.prototype.shouldRemove = function(i) {
|
1796
|
+
var n = i.source, r = i.trigger;
|
1797
|
+
return r === A.BACKSPACE_KEY || r === A.DELETE_KEY ? !0 : n === b.TRAILING;
|
1798
|
+
}, e.prototype.getRemovedAnnouncement = function() {
|
1799
|
+
var i = this.adapter.getAttribute(nt.DATA_REMOVED_ANNOUNCEMENT);
|
1800
|
+
return i || void 0;
|
1801
|
+
}, e.prototype.getAddedAnnouncement = function() {
|
1802
|
+
var i = this.adapter.getAttribute(nt.DATA_ADDED_ANNOUNCEMENT);
|
1803
|
+
return i || void 0;
|
1804
|
+
}, e.prototype.animateSelection = function(i) {
|
1805
|
+
var n = this;
|
1806
|
+
this.resetAnimationStyles(), this.animFrame.request(E.SELECTION, function() {
|
1807
|
+
n.animFrame.request(E.SELECTION, function() {
|
1808
|
+
n.updateSelectionStyles(i);
|
1809
|
+
});
|
1810
|
+
});
|
1811
|
+
}, e.prototype.resetAnimationStyles = function() {
|
1812
|
+
this.adapter.removeClass(u.SELECTING), this.adapter.removeClass(u.DESELECTING), this.adapter.removeClass(u.SELECTING_WITH_PRIMARY_ICON), this.adapter.removeClass(u.DESELECTING_WITH_PRIMARY_ICON);
|
1813
|
+
}, e.prototype.updateSelectionStyles = function(i) {
|
1814
|
+
var n = this, r = this.adapter.hasClass(u.WITH_PRIMARY_ICON);
|
1815
|
+
if (r && i) {
|
1816
|
+
this.adapter.addClass(u.SELECTING_WITH_PRIMARY_ICON), this.animFrame.request(E.SELECTION, function() {
|
1817
|
+
n.adapter.addClass(u.SELECTED);
|
1818
|
+
});
|
1819
|
+
return;
|
1820
|
+
}
|
1821
|
+
if (r && !i) {
|
1822
|
+
this.adapter.addClass(u.DESELECTING_WITH_PRIMARY_ICON), this.animFrame.request(E.SELECTION, function() {
|
1823
|
+
n.adapter.removeClass(u.SELECTED);
|
1824
|
+
});
|
1825
|
+
return;
|
1826
|
+
}
|
1827
|
+
if (i) {
|
1828
|
+
this.adapter.addClass(u.SELECTING), this.animFrame.request(E.SELECTION, function() {
|
1829
|
+
n.adapter.addClass(u.SELECTED);
|
1830
|
+
});
|
1831
|
+
return;
|
1832
|
+
}
|
1833
|
+
if (!i) {
|
1834
|
+
this.adapter.addClass(u.DESELECTING), this.animFrame.request(E.SELECTION, function() {
|
1835
|
+
n.adapter.removeClass(u.SELECTED);
|
1836
|
+
});
|
1837
|
+
return;
|
1838
|
+
}
|
1839
|
+
}, e;
|
1840
|
+
}(ct)
|
1841
|
+
);
|
1842
|
+
/**
|
1843
|
+
* @license
|
1844
|
+
* Copyright 2016 Google Inc.
|
1845
|
+
*
|
1846
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
1847
|
+
* of this software and associated documentation files (the "Software"), to deal
|
1848
|
+
* in the Software without restriction, including without limitation the rights
|
1849
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1850
|
+
* copies of the Software, and to permit persons to whom the Software is
|
1851
|
+
* furnished to do so, subject to the following conditions:
|
1852
|
+
*
|
1853
|
+
* The above copyright notice and this permission notice shall be included in
|
1854
|
+
* all copies or substantial portions of the Software.
|
1855
|
+
*
|
1856
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1857
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1858
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1859
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1860
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1861
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1862
|
+
* THE SOFTWARE.
|
1863
|
+
*/
|
1864
|
+
function Li(t) {
|
1865
|
+
return String(t).replace(/\-([a-z])/g, function(e, i) {
|
1866
|
+
return i.toUpperCase();
|
1867
|
+
});
|
1868
|
+
}
|
1869
|
+
var Zt = (
|
1870
|
+
/** @class */
|
1871
|
+
function() {
|
1872
|
+
function t(e, i) {
|
1873
|
+
for (var n = [], r = 2; r < arguments.length; r++)
|
1874
|
+
n[r - 2] = arguments[r];
|
1875
|
+
this.root = e, this.initialize.apply(this, se([], le(n))), this.foundation = i === void 0 ? this.getDefaultFoundation() : i, this.foundation.init(), this.initialSyncWithDOM();
|
1876
|
+
}
|
1877
|
+
return t.attachTo = function(e) {
|
1878
|
+
return new t(e, new ct({}));
|
1879
|
+
}, t.prototype.initialize = function() {
|
1880
|
+
}, t.prototype.getDefaultFoundation = function() {
|
1881
|
+
throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class");
|
1882
|
+
}, t.prototype.initialSyncWithDOM = function() {
|
1883
|
+
}, t.prototype.destroy = function() {
|
1884
|
+
this.foundation.destroy();
|
1885
|
+
}, t.prototype.listen = function(e, i, n) {
|
1886
|
+
this.root.addEventListener(e, i, n);
|
1887
|
+
}, t.prototype.unlisten = function(e, i, n) {
|
1888
|
+
this.root.removeEventListener(e, i, n);
|
1889
|
+
}, t.prototype.emit = function(e, i, n) {
|
1890
|
+
n === void 0 && (n = !1);
|
1891
|
+
var r;
|
1892
|
+
typeof CustomEvent == "function" ? r = new CustomEvent(e, {
|
1893
|
+
bubbles: n,
|
1894
|
+
detail: i
|
1895
|
+
}) : (r = document.createEvent("CustomEvent"), r.initCustomEvent(e, n, !1, i)), this.root.dispatchEvent(r);
|
1896
|
+
}, t.prototype.safeSetAttribute = function(e, i, n) {
|
1897
|
+
if (i.toLowerCase() === "tabindex")
|
1898
|
+
e.tabIndex = Number(n);
|
1899
|
+
else if (i.indexOf("data-") === 0) {
|
1900
|
+
var r = Li(i.replace(/^data-/, ""));
|
1901
|
+
e.dataset[r] = n;
|
1902
|
+
} else
|
1903
|
+
Kt([O.safeAttrPrefix(At || (At = L(["aria-"], ["aria-"]))), O.safeAttrPrefix(St || (St = L(["role"], ["role"])))], e, i, n);
|
1904
|
+
}, t;
|
1905
|
+
}()
|
1906
|
+
), At, St;
|
1907
|
+
/**
|
1908
|
+
* @license
|
1909
|
+
* Copyright 2018 Google Inc.
|
1910
|
+
*
|
1911
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
1912
|
+
* of this software and associated documentation files (the "Software"), to deal
|
1913
|
+
* in the Software without restriction, including without limitation the rights
|
1914
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1915
|
+
* copies of the Software, and to permit persons to whom the Software is
|
1916
|
+
* furnished to do so, subject to the following conditions:
|
1917
|
+
*
|
1918
|
+
* The above copyright notice and this permission notice shall be included in
|
1919
|
+
* all copies or substantial portions of the Software.
|
1920
|
+
*
|
1921
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1922
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1923
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1924
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1925
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1926
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1927
|
+
* THE SOFTWARE.
|
1928
|
+
*/
|
1929
|
+
function Fi(t, e) {
|
1930
|
+
if (t.closest)
|
1931
|
+
return t.closest(e);
|
1932
|
+
for (var i = t; i; ) {
|
1933
|
+
if (Jt(i, e))
|
1934
|
+
return i;
|
1935
|
+
i = i.parentElement;
|
1936
|
+
}
|
1937
|
+
return null;
|
1938
|
+
}
|
1939
|
+
function Jt(t, e) {
|
1940
|
+
var i = t.matches || t.webkitMatchesSelector || t.msMatchesSelector;
|
1941
|
+
return i.call(t, e);
|
1942
|
+
}
|
1943
|
+
/**
|
1944
|
+
* @license
|
1945
|
+
* Copyright 2019 Google Inc.
|
1946
|
+
*
|
1947
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
1948
|
+
* of this software and associated documentation files (the "Software"), to deal
|
1949
|
+
* in the Software without restriction, including without limitation the rights
|
1950
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1951
|
+
* copies of the Software, and to permit persons to whom the Software is
|
1952
|
+
* furnished to do so, subject to the following conditions:
|
1953
|
+
*
|
1954
|
+
* The above copyright notice and this permission notice shall be included in
|
1955
|
+
* all copies or substantial portions of the Software.
|
1956
|
+
*
|
1957
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1958
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1959
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1960
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1961
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1962
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1963
|
+
* THE SOFTWARE.
|
1964
|
+
*/
|
1965
|
+
function tt(t) {
|
1966
|
+
return t === void 0 && (t = window), xi(t) ? { passive: !0 } : !1;
|
1967
|
+
}
|
1968
|
+
function xi(t) {
|
1969
|
+
t === void 0 && (t = window);
|
1970
|
+
var e = !1;
|
1971
|
+
try {
|
1972
|
+
var i = {
|
1973
|
+
// This function will be called when the browser
|
1974
|
+
// attempts to access the passive property.
|
1975
|
+
get passive() {
|
1976
|
+
return e = !0, !1;
|
1977
|
+
}
|
1978
|
+
}, n = function() {
|
1979
|
+
};
|
1980
|
+
t.document.addEventListener("test", n, i), t.document.removeEventListener("test", n, i);
|
1981
|
+
} catch {
|
1982
|
+
e = !1;
|
1983
|
+
}
|
1984
|
+
return e;
|
1985
|
+
}
|
1986
|
+
/**
|
1987
|
+
* @license
|
1988
|
+
* Copyright 2016 Google Inc.
|
1989
|
+
*
|
1990
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
1991
|
+
* of this software and associated documentation files (the "Software"), to deal
|
1992
|
+
* in the Software without restriction, including without limitation the rights
|
1993
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1994
|
+
* copies of the Software, and to permit persons to whom the Software is
|
1995
|
+
* furnished to do so, subject to the following conditions:
|
1996
|
+
*
|
1997
|
+
* The above copyright notice and this permission notice shall be included in
|
1998
|
+
* all copies or substantial portions of the Software.
|
1999
|
+
*
|
2000
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2001
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2002
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2003
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2004
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2005
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2006
|
+
* THE SOFTWARE.
|
2007
|
+
*/
|
2008
|
+
var Ui = {
|
2009
|
+
// Ripple is a special case where the "root" component is really a "mixin" of
|
2010
|
+
// sorts,
|
2011
|
+
// given that it's an 'upgrade' to an existing component. That being said it
|
2012
|
+
// is the root
|
2013
|
+
// CSS class that all other CSS classes derive from.
|
2014
|
+
BG_FOCUSED: "mdc-ripple-upgraded--background-focused",
|
2015
|
+
FG_ACTIVATION: "mdc-ripple-upgraded--foreground-activation",
|
2016
|
+
FG_DEACTIVATION: "mdc-ripple-upgraded--foreground-deactivation",
|
2017
|
+
ROOT: "mdc-ripple-upgraded",
|
2018
|
+
UNBOUNDED: "mdc-ripple-upgraded--unbounded"
|
2019
|
+
}, zi = {
|
2020
|
+
VAR_FG_SCALE: "--mdc-ripple-fg-scale",
|
2021
|
+
VAR_FG_SIZE: "--mdc-ripple-fg-size",
|
2022
|
+
VAR_FG_TRANSLATE_END: "--mdc-ripple-fg-translate-end",
|
2023
|
+
VAR_FG_TRANSLATE_START: "--mdc-ripple-fg-translate-start",
|
2024
|
+
VAR_LEFT: "--mdc-ripple-left",
|
2025
|
+
VAR_TOP: "--mdc-ripple-top"
|
2026
|
+
}, wt = {
|
2027
|
+
DEACTIVATION_TIMEOUT_MS: 225,
|
2028
|
+
// animation duration)
|
2029
|
+
FG_DEACTIVATION_MS: 150,
|
2030
|
+
// (i.e. deactivation animation duration)
|
2031
|
+
INITIAL_ORIGIN_SCALE: 0.6,
|
2032
|
+
PADDING: 10,
|
2033
|
+
TAP_DELAY_MS: 300
|
2034
|
+
// Delay between touch and simulated mouse events on touch devices
|
2035
|
+
}, et;
|
2036
|
+
function Hi(t, e) {
|
2037
|
+
e === void 0 && (e = !1);
|
2038
|
+
var i = t.CSS, n = et;
|
2039
|
+
if (typeof et == "boolean" && !e)
|
2040
|
+
return et;
|
2041
|
+
var r = i && typeof i.supports == "function";
|
2042
|
+
if (!r)
|
2043
|
+
return !1;
|
2044
|
+
var o = i.supports("--css-vars", "yes"), a = i.supports("(--css-vars: yes)") && i.supports("color", "#00000000");
|
2045
|
+
return n = o || a, e || (et = n), n;
|
2046
|
+
}
|
2047
|
+
function Mi(t, e, i) {
|
2048
|
+
if (!t)
|
2049
|
+
return { x: 0, y: 0 };
|
2050
|
+
var n = e.x, r = e.y, o = n + i.left, a = r + i.top, c, l;
|
2051
|
+
if (t.type === "touchstart") {
|
2052
|
+
var v = t;
|
2053
|
+
c = v.changedTouches[0].pageX - o, l = v.changedTouches[0].pageY - a;
|
2054
|
+
} else {
|
2055
|
+
var y = t;
|
2056
|
+
c = y.pageX - o, l = y.pageY - a;
|
2057
|
+
}
|
2058
|
+
return { x: c, y: l };
|
2059
|
+
}
|
2060
|
+
/**
|
2061
|
+
* @license
|
2062
|
+
* Copyright 2016 Google Inc.
|
2063
|
+
*
|
2064
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
2065
|
+
* of this software and associated documentation files (the "Software"), to deal
|
2066
|
+
* in the Software without restriction, including without limitation the rights
|
2067
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2068
|
+
* copies of the Software, and to permit persons to whom the Software is
|
2069
|
+
* furnished to do so, subject to the following conditions:
|
2070
|
+
*
|
2071
|
+
* The above copyright notice and this permission notice shall be included in
|
2072
|
+
* all copies or substantial portions of the Software.
|
2073
|
+
*
|
2074
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2075
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2076
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2077
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2078
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2079
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2080
|
+
* THE SOFTWARE.
|
2081
|
+
*/
|
2082
|
+
var Tt = [
|
2083
|
+
"touchstart",
|
2084
|
+
"pointerdown",
|
2085
|
+
"mousedown",
|
2086
|
+
"keydown"
|
2087
|
+
], Rt = [
|
2088
|
+
"touchend",
|
2089
|
+
"pointerup",
|
2090
|
+
"mouseup",
|
2091
|
+
"contextmenu"
|
2092
|
+
], it = [], Qt = (
|
2093
|
+
/** @class */
|
2094
|
+
function(t) {
|
2095
|
+
U(e, t);
|
2096
|
+
function e(i) {
|
2097
|
+
var n = t.call(this, S(S({}, e.defaultAdapter), i)) || this;
|
2098
|
+
return n.activationAnimationHasEnded = !1, n.activationTimer = 0, n.fgDeactivationRemovalTimer = 0, n.fgScale = "0", n.frame = { width: 0, height: 0 }, n.initialSize = 0, n.layoutFrame = 0, n.maxRadius = 0, n.unboundedCoords = { left: 0, top: 0 }, n.activationState = n.defaultActivationState(), n.activationTimerCallback = function() {
|
2099
|
+
n.activationAnimationHasEnded = !0, n.runDeactivationUXLogicIfReady();
|
2100
|
+
}, n.activateHandler = function(r) {
|
2101
|
+
n.activateImpl(r);
|
2102
|
+
}, n.deactivateHandler = function() {
|
2103
|
+
n.deactivateImpl();
|
2104
|
+
}, n.focusHandler = function() {
|
2105
|
+
n.handleFocus();
|
2106
|
+
}, n.blurHandler = function() {
|
2107
|
+
n.handleBlur();
|
2108
|
+
}, n.resizeHandler = function() {
|
2109
|
+
n.layout();
|
2110
|
+
}, n;
|
2111
|
+
}
|
2112
|
+
return Object.defineProperty(e, "cssClasses", {
|
2113
|
+
get: function() {
|
2114
|
+
return Ui;
|
2115
|
+
},
|
2116
|
+
enumerable: !1,
|
2117
|
+
configurable: !0
|
2118
|
+
}), Object.defineProperty(e, "strings", {
|
2119
|
+
get: function() {
|
2120
|
+
return zi;
|
2121
|
+
},
|
2122
|
+
enumerable: !1,
|
2123
|
+
configurable: !0
|
2124
|
+
}), Object.defineProperty(e, "numbers", {
|
2125
|
+
get: function() {
|
2126
|
+
return wt;
|
2127
|
+
},
|
2128
|
+
enumerable: !1,
|
2129
|
+
configurable: !0
|
2130
|
+
}), Object.defineProperty(e, "defaultAdapter", {
|
2131
|
+
get: function() {
|
2132
|
+
return {
|
2133
|
+
addClass: function() {
|
2134
|
+
},
|
2135
|
+
browserSupportsCssVars: function() {
|
2136
|
+
return !0;
|
2137
|
+
},
|
2138
|
+
computeBoundingRect: function() {
|
2139
|
+
return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
|
2140
|
+
},
|
2141
|
+
containsEventTarget: function() {
|
2142
|
+
return !0;
|
2143
|
+
},
|
2144
|
+
deregisterDocumentInteractionHandler: function() {
|
2145
|
+
},
|
2146
|
+
deregisterInteractionHandler: function() {
|
2147
|
+
},
|
2148
|
+
deregisterResizeHandler: function() {
|
2149
|
+
},
|
2150
|
+
getWindowPageOffset: function() {
|
2151
|
+
return { x: 0, y: 0 };
|
2152
|
+
},
|
2153
|
+
isSurfaceActive: function() {
|
2154
|
+
return !0;
|
2155
|
+
},
|
2156
|
+
isSurfaceDisabled: function() {
|
2157
|
+
return !0;
|
2158
|
+
},
|
2159
|
+
isUnbounded: function() {
|
2160
|
+
return !0;
|
2161
|
+
},
|
2162
|
+
registerDocumentInteractionHandler: function() {
|
2163
|
+
},
|
2164
|
+
registerInteractionHandler: function() {
|
2165
|
+
},
|
2166
|
+
registerResizeHandler: function() {
|
2167
|
+
},
|
2168
|
+
removeClass: function() {
|
2169
|
+
},
|
2170
|
+
updateCssVariable: function() {
|
2171
|
+
}
|
2172
|
+
};
|
2173
|
+
},
|
2174
|
+
enumerable: !1,
|
2175
|
+
configurable: !0
|
2176
|
+
}), e.prototype.init = function() {
|
2177
|
+
var i = this, n = this.supportsPressRipple();
|
2178
|
+
if (this.registerRootHandlers(n), n) {
|
2179
|
+
var r = e.cssClasses, o = r.ROOT, a = r.UNBOUNDED;
|
2180
|
+
requestAnimationFrame(function() {
|
2181
|
+
i.adapter.addClass(o), i.adapter.isUnbounded() && (i.adapter.addClass(a), i.layoutInternal());
|
2182
|
+
});
|
2183
|
+
}
|
2184
|
+
}, e.prototype.destroy = function() {
|
2185
|
+
var i = this;
|
2186
|
+
if (this.supportsPressRipple()) {
|
2187
|
+
this.activationTimer && (clearTimeout(this.activationTimer), this.activationTimer = 0, this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)), this.fgDeactivationRemovalTimer && (clearTimeout(this.fgDeactivationRemovalTimer), this.fgDeactivationRemovalTimer = 0, this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));
|
2188
|
+
var n = e.cssClasses, r = n.ROOT, o = n.UNBOUNDED;
|
2189
|
+
requestAnimationFrame(function() {
|
2190
|
+
i.adapter.removeClass(r), i.adapter.removeClass(o), i.removeCssVars();
|
2191
|
+
});
|
2192
|
+
}
|
2193
|
+
this.deregisterRootHandlers(), this.deregisterDeactivationHandlers();
|
2194
|
+
}, e.prototype.activate = function(i) {
|
2195
|
+
this.activateImpl(i);
|
2196
|
+
}, e.prototype.deactivate = function() {
|
2197
|
+
this.deactivateImpl();
|
2198
|
+
}, e.prototype.layout = function() {
|
2199
|
+
var i = this;
|
2200
|
+
this.layoutFrame && cancelAnimationFrame(this.layoutFrame), this.layoutFrame = requestAnimationFrame(function() {
|
2201
|
+
i.layoutInternal(), i.layoutFrame = 0;
|
2202
|
+
});
|
2203
|
+
}, e.prototype.setUnbounded = function(i) {
|
2204
|
+
var n = e.cssClasses.UNBOUNDED;
|
2205
|
+
i ? this.adapter.addClass(n) : this.adapter.removeClass(n);
|
2206
|
+
}, e.prototype.handleFocus = function() {
|
2207
|
+
var i = this;
|
2208
|
+
requestAnimationFrame(function() {
|
2209
|
+
i.adapter.addClass(e.cssClasses.BG_FOCUSED);
|
2210
|
+
});
|
2211
|
+
}, e.prototype.handleBlur = function() {
|
2212
|
+
var i = this;
|
2213
|
+
requestAnimationFrame(function() {
|
2214
|
+
i.adapter.removeClass(e.cssClasses.BG_FOCUSED);
|
2215
|
+
});
|
2216
|
+
}, e.prototype.supportsPressRipple = function() {
|
2217
|
+
return this.adapter.browserSupportsCssVars();
|
2218
|
+
}, e.prototype.defaultActivationState = function() {
|
2219
|
+
return {
|
2220
|
+
activationEvent: void 0,
|
2221
|
+
hasDeactivationUXRun: !1,
|
2222
|
+
isActivated: !1,
|
2223
|
+
isProgrammatic: !1,
|
2224
|
+
wasActivatedByPointer: !1,
|
2225
|
+
wasElementMadeActive: !1
|
2226
|
+
};
|
2227
|
+
}, e.prototype.registerRootHandlers = function(i) {
|
2228
|
+
var n, r;
|
2229
|
+
if (i) {
|
2230
|
+
try {
|
2231
|
+
for (var o = G(Tt), a = o.next(); !a.done; a = o.next()) {
|
2232
|
+
var c = a.value;
|
2233
|
+
this.adapter.registerInteractionHandler(c, this.activateHandler);
|
2234
|
+
}
|
2235
|
+
} catch (l) {
|
2236
|
+
n = { error: l };
|
2237
|
+
} finally {
|
2238
|
+
try {
|
2239
|
+
a && !a.done && (r = o.return) && r.call(o);
|
2240
|
+
} finally {
|
2241
|
+
if (n)
|
2242
|
+
throw n.error;
|
2243
|
+
}
|
2244
|
+
}
|
2245
|
+
this.adapter.isUnbounded() && this.adapter.registerResizeHandler(this.resizeHandler);
|
2246
|
+
}
|
2247
|
+
this.adapter.registerInteractionHandler("focus", this.focusHandler), this.adapter.registerInteractionHandler("blur", this.blurHandler);
|
2248
|
+
}, e.prototype.registerDeactivationHandlers = function(i) {
|
2249
|
+
var n, r;
|
2250
|
+
if (i.type === "keydown")
|
2251
|
+
this.adapter.registerInteractionHandler("keyup", this.deactivateHandler);
|
2252
|
+
else
|
2253
|
+
try {
|
2254
|
+
for (var o = G(Rt), a = o.next(); !a.done; a = o.next()) {
|
2255
|
+
var c = a.value;
|
2256
|
+
this.adapter.registerDocumentInteractionHandler(c, this.deactivateHandler);
|
2257
|
+
}
|
2258
|
+
} catch (l) {
|
2259
|
+
n = { error: l };
|
2260
|
+
} finally {
|
2261
|
+
try {
|
2262
|
+
a && !a.done && (r = o.return) && r.call(o);
|
2263
|
+
} finally {
|
2264
|
+
if (n)
|
2265
|
+
throw n.error;
|
2266
|
+
}
|
2267
|
+
}
|
2268
|
+
}, e.prototype.deregisterRootHandlers = function() {
|
2269
|
+
var i, n;
|
2270
|
+
try {
|
2271
|
+
for (var r = G(Tt), o = r.next(); !o.done; o = r.next()) {
|
2272
|
+
var a = o.value;
|
2273
|
+
this.adapter.deregisterInteractionHandler(a, this.activateHandler);
|
2274
|
+
}
|
2275
|
+
} catch (c) {
|
2276
|
+
i = { error: c };
|
2277
|
+
} finally {
|
2278
|
+
try {
|
2279
|
+
o && !o.done && (n = r.return) && n.call(r);
|
2280
|
+
} finally {
|
2281
|
+
if (i)
|
2282
|
+
throw i.error;
|
2283
|
+
}
|
2284
|
+
}
|
2285
|
+
this.adapter.deregisterInteractionHandler("focus", this.focusHandler), this.adapter.deregisterInteractionHandler("blur", this.blurHandler), this.adapter.isUnbounded() && this.adapter.deregisterResizeHandler(this.resizeHandler);
|
2286
|
+
}, e.prototype.deregisterDeactivationHandlers = function() {
|
2287
|
+
var i, n;
|
2288
|
+
this.adapter.deregisterInteractionHandler("keyup", this.deactivateHandler);
|
2289
|
+
try {
|
2290
|
+
for (var r = G(Rt), o = r.next(); !o.done; o = r.next()) {
|
2291
|
+
var a = o.value;
|
2292
|
+
this.adapter.deregisterDocumentInteractionHandler(a, this.deactivateHandler);
|
2293
|
+
}
|
2294
|
+
} catch (c) {
|
2295
|
+
i = { error: c };
|
2296
|
+
} finally {
|
2297
|
+
try {
|
2298
|
+
o && !o.done && (n = r.return) && n.call(r);
|
2299
|
+
} finally {
|
2300
|
+
if (i)
|
2301
|
+
throw i.error;
|
2302
|
+
}
|
2303
|
+
}
|
2304
|
+
}, e.prototype.removeCssVars = function() {
|
2305
|
+
var i = this, n = e.strings, r = Object.keys(n);
|
2306
|
+
r.forEach(function(o) {
|
2307
|
+
o.indexOf("VAR_") === 0 && i.adapter.updateCssVariable(n[o], null);
|
2308
|
+
});
|
2309
|
+
}, e.prototype.activateImpl = function(i) {
|
2310
|
+
var n = this;
|
2311
|
+
if (!this.adapter.isSurfaceDisabled()) {
|
2312
|
+
var r = this.activationState;
|
2313
|
+
if (!r.isActivated) {
|
2314
|
+
var o = this.previousActivationEvent, a = o && i !== void 0 && o.type !== i.type;
|
2315
|
+
if (!a) {
|
2316
|
+
r.isActivated = !0, r.isProgrammatic = i === void 0, r.activationEvent = i, r.wasActivatedByPointer = r.isProgrammatic ? !1 : i !== void 0 && (i.type === "mousedown" || i.type === "touchstart" || i.type === "pointerdown");
|
2317
|
+
var c = i !== void 0 && it.length > 0 && it.some(function(l) {
|
2318
|
+
return n.adapter.containsEventTarget(l);
|
2319
|
+
});
|
2320
|
+
if (c) {
|
2321
|
+
this.resetActivationState();
|
2322
|
+
return;
|
2323
|
+
}
|
2324
|
+
i !== void 0 && (it.push(i.target), this.registerDeactivationHandlers(i)), r.wasElementMadeActive = this.checkElementMadeActive(i), r.wasElementMadeActive && this.animateActivation(), requestAnimationFrame(function() {
|
2325
|
+
it = [], !r.wasElementMadeActive && i !== void 0 && (i.key === " " || i.keyCode === 32) && (r.wasElementMadeActive = n.checkElementMadeActive(i), r.wasElementMadeActive && n.animateActivation()), r.wasElementMadeActive || (n.activationState = n.defaultActivationState());
|
2326
|
+
});
|
2327
|
+
}
|
2328
|
+
}
|
2329
|
+
}
|
2330
|
+
}, e.prototype.checkElementMadeActive = function(i) {
|
2331
|
+
return i !== void 0 && i.type === "keydown" ? this.adapter.isSurfaceActive() : !0;
|
2332
|
+
}, e.prototype.animateActivation = function() {
|
2333
|
+
var i = this, n = e.strings, r = n.VAR_FG_TRANSLATE_START, o = n.VAR_FG_TRANSLATE_END, a = e.cssClasses, c = a.FG_DEACTIVATION, l = a.FG_ACTIVATION, v = e.numbers.DEACTIVATION_TIMEOUT_MS;
|
2334
|
+
this.layoutInternal();
|
2335
|
+
var y = "", I = "";
|
2336
|
+
if (!this.adapter.isUnbounded()) {
|
2337
|
+
var P = this.getFgTranslationCoordinates(), k = P.startPoint, B = P.endPoint;
|
2338
|
+
y = k.x + "px, " + k.y + "px", I = B.x + "px, " + B.y + "px";
|
2339
|
+
}
|
2340
|
+
this.adapter.updateCssVariable(r, y), this.adapter.updateCssVariable(o, I), clearTimeout(this.activationTimer), clearTimeout(this.fgDeactivationRemovalTimer), this.rmBoundedActivationClasses(), this.adapter.removeClass(c), this.adapter.computeBoundingRect(), this.adapter.addClass(l), this.activationTimer = setTimeout(function() {
|
2341
|
+
i.activationTimerCallback();
|
2342
|
+
}, v);
|
2343
|
+
}, e.prototype.getFgTranslationCoordinates = function() {
|
2344
|
+
var i = this.activationState, n = i.activationEvent, r = i.wasActivatedByPointer, o;
|
2345
|
+
r ? o = Mi(n, this.adapter.getWindowPageOffset(), this.adapter.computeBoundingRect()) : o = {
|
2346
|
+
x: this.frame.width / 2,
|
2347
|
+
y: this.frame.height / 2
|
2348
|
+
}, o = {
|
2349
|
+
x: o.x - this.initialSize / 2,
|
2350
|
+
y: o.y - this.initialSize / 2
|
2351
|
+
};
|
2352
|
+
var a = {
|
2353
|
+
x: this.frame.width / 2 - this.initialSize / 2,
|
2354
|
+
y: this.frame.height / 2 - this.initialSize / 2
|
2355
|
+
};
|
2356
|
+
return { startPoint: o, endPoint: a };
|
2357
|
+
}, e.prototype.runDeactivationUXLogicIfReady = function() {
|
2358
|
+
var i = this, n = e.cssClasses.FG_DEACTIVATION, r = this.activationState, o = r.hasDeactivationUXRun, a = r.isActivated, c = o || !a;
|
2359
|
+
c && this.activationAnimationHasEnded && (this.rmBoundedActivationClasses(), this.adapter.addClass(n), this.fgDeactivationRemovalTimer = setTimeout(function() {
|
2360
|
+
i.adapter.removeClass(n);
|
2361
|
+
}, wt.FG_DEACTIVATION_MS));
|
2362
|
+
}, e.prototype.rmBoundedActivationClasses = function() {
|
2363
|
+
var i = e.cssClasses.FG_ACTIVATION;
|
2364
|
+
this.adapter.removeClass(i), this.activationAnimationHasEnded = !1, this.adapter.computeBoundingRect();
|
2365
|
+
}, e.prototype.resetActivationState = function() {
|
2366
|
+
var i = this;
|
2367
|
+
this.previousActivationEvent = this.activationState.activationEvent, this.activationState = this.defaultActivationState(), setTimeout(function() {
|
2368
|
+
return i.previousActivationEvent = void 0;
|
2369
|
+
}, e.numbers.TAP_DELAY_MS);
|
2370
|
+
}, e.prototype.deactivateImpl = function() {
|
2371
|
+
var i = this, n = this.activationState;
|
2372
|
+
if (n.isActivated) {
|
2373
|
+
var r = S({}, n);
|
2374
|
+
n.isProgrammatic ? (requestAnimationFrame(function() {
|
2375
|
+
i.animateDeactivation(r);
|
2376
|
+
}), this.resetActivationState()) : (this.deregisterDeactivationHandlers(), requestAnimationFrame(function() {
|
2377
|
+
i.activationState.hasDeactivationUXRun = !0, i.animateDeactivation(r), i.resetActivationState();
|
2378
|
+
}));
|
2379
|
+
}
|
2380
|
+
}, e.prototype.animateDeactivation = function(i) {
|
2381
|
+
var n = i.wasActivatedByPointer, r = i.wasElementMadeActive;
|
2382
|
+
(n || r) && this.runDeactivationUXLogicIfReady();
|
2383
|
+
}, e.prototype.layoutInternal = function() {
|
2384
|
+
var i = this;
|
2385
|
+
this.frame = this.adapter.computeBoundingRect();
|
2386
|
+
var n = Math.max(this.frame.height, this.frame.width), r = function() {
|
2387
|
+
var a = Math.sqrt(Math.pow(i.frame.width, 2) + Math.pow(i.frame.height, 2));
|
2388
|
+
return a + e.numbers.PADDING;
|
2389
|
+
};
|
2390
|
+
this.maxRadius = this.adapter.isUnbounded() ? n : r();
|
2391
|
+
var o = Math.floor(n * e.numbers.INITIAL_ORIGIN_SCALE);
|
2392
|
+
this.adapter.isUnbounded() && o % 2 !== 0 ? this.initialSize = o - 1 : this.initialSize = o, this.fgScale = "" + this.maxRadius / this.initialSize, this.updateLayoutCssVars();
|
2393
|
+
}, e.prototype.updateLayoutCssVars = function() {
|
2394
|
+
var i = e.strings, n = i.VAR_FG_SIZE, r = i.VAR_LEFT, o = i.VAR_TOP, a = i.VAR_FG_SCALE;
|
2395
|
+
this.adapter.updateCssVariable(n, this.initialSize + "px"), this.adapter.updateCssVariable(a, this.fgScale), this.adapter.isUnbounded() && (this.unboundedCoords = {
|
2396
|
+
left: Math.round(this.frame.width / 2 - this.initialSize / 2),
|
2397
|
+
top: Math.round(this.frame.height / 2 - this.initialSize / 2)
|
2398
|
+
}, this.adapter.updateCssVariable(r, this.unboundedCoords.left + "px"), this.adapter.updateCssVariable(o, this.unboundedCoords.top + "px"));
|
2399
|
+
}, e;
|
2400
|
+
}(ct)
|
2401
|
+
);
|
2402
|
+
/**
|
2403
|
+
* @license
|
2404
|
+
* Copyright 2016 Google Inc.
|
2405
|
+
*
|
2406
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
2407
|
+
* of this software and associated documentation files (the "Software"), to deal
|
2408
|
+
* in the Software without restriction, including without limitation the rights
|
2409
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2410
|
+
* copies of the Software, and to permit persons to whom the Software is
|
2411
|
+
* furnished to do so, subject to the following conditions:
|
2412
|
+
*
|
2413
|
+
* The above copyright notice and this permission notice shall be included in
|
2414
|
+
* all copies or substantial portions of the Software.
|
2415
|
+
*
|
2416
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2417
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2418
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2419
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2420
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2421
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2422
|
+
* THE SOFTWARE.
|
2423
|
+
*/
|
2424
|
+
var It = (
|
2425
|
+
/** @class */
|
2426
|
+
function(t) {
|
2427
|
+
U(e, t);
|
2428
|
+
function e() {
|
2429
|
+
var i = t !== null && t.apply(this, arguments) || this;
|
2430
|
+
return i.disabled = !1, i;
|
2431
|
+
}
|
2432
|
+
return e.attachTo = function(i, n) {
|
2433
|
+
n === void 0 && (n = {
|
2434
|
+
isUnbounded: void 0
|
2435
|
+
});
|
2436
|
+
var r = new e(i);
|
2437
|
+
return n.isUnbounded !== void 0 && (r.unbounded = n.isUnbounded), r;
|
2438
|
+
}, e.createAdapter = function(i) {
|
2439
|
+
return {
|
2440
|
+
addClass: function(n) {
|
2441
|
+
i.root.classList.add(n);
|
2442
|
+
},
|
2443
|
+
browserSupportsCssVars: function() {
|
2444
|
+
return Hi(window);
|
2445
|
+
},
|
2446
|
+
computeBoundingRect: function() {
|
2447
|
+
return i.root.getBoundingClientRect();
|
2448
|
+
},
|
2449
|
+
containsEventTarget: function(n) {
|
2450
|
+
return i.root.contains(n);
|
2451
|
+
},
|
2452
|
+
deregisterDocumentInteractionHandler: function(n, r) {
|
2453
|
+
document.documentElement.removeEventListener(n, r, tt());
|
2454
|
+
},
|
2455
|
+
deregisterInteractionHandler: function(n, r) {
|
2456
|
+
i.root.removeEventListener(n, r, tt());
|
2457
|
+
},
|
2458
|
+
deregisterResizeHandler: function(n) {
|
2459
|
+
window.removeEventListener("resize", n);
|
2460
|
+
},
|
2461
|
+
getWindowPageOffset: function() {
|
2462
|
+
return { x: window.pageXOffset, y: window.pageYOffset };
|
2463
|
+
},
|
2464
|
+
isSurfaceActive: function() {
|
2465
|
+
return Jt(i.root, ":active");
|
2466
|
+
},
|
2467
|
+
isSurfaceDisabled: function() {
|
2468
|
+
return !!i.disabled;
|
2469
|
+
},
|
2470
|
+
isUnbounded: function() {
|
2471
|
+
return !!i.unbounded;
|
2472
|
+
},
|
2473
|
+
registerDocumentInteractionHandler: function(n, r) {
|
2474
|
+
document.documentElement.addEventListener(n, r, tt());
|
2475
|
+
},
|
2476
|
+
registerInteractionHandler: function(n, r) {
|
2477
|
+
i.root.addEventListener(n, r, tt());
|
2478
|
+
},
|
2479
|
+
registerResizeHandler: function(n) {
|
2480
|
+
window.addEventListener("resize", n);
|
2481
|
+
},
|
2482
|
+
removeClass: function(n) {
|
2483
|
+
i.root.classList.remove(n);
|
2484
|
+
},
|
2485
|
+
updateCssVariable: function(n, r) {
|
2486
|
+
i.root.style.setProperty(n, r);
|
2487
|
+
}
|
2488
|
+
};
|
2489
|
+
}, Object.defineProperty(e.prototype, "unbounded", {
|
2490
|
+
get: function() {
|
2491
|
+
return !!this.isUnbounded;
|
2492
|
+
},
|
2493
|
+
set: function(i) {
|
2494
|
+
this.isUnbounded = !!i, this.setUnbounded();
|
2495
|
+
},
|
2496
|
+
enumerable: !1,
|
2497
|
+
configurable: !0
|
2498
|
+
}), e.prototype.activate = function() {
|
2499
|
+
this.foundation.activate();
|
2500
|
+
}, e.prototype.deactivate = function() {
|
2501
|
+
this.foundation.deactivate();
|
2502
|
+
}, e.prototype.layout = function() {
|
2503
|
+
this.foundation.layout();
|
2504
|
+
}, e.prototype.getDefaultFoundation = function() {
|
2505
|
+
return new Qt(e.createAdapter(this));
|
2506
|
+
}, e.prototype.initialSyncWithDOM = function() {
|
2507
|
+
var i = this.root;
|
2508
|
+
this.isUnbounded = "mdcRippleIsUnbounded" in i.dataset;
|
2509
|
+
}, e.prototype.setUnbounded = function() {
|
2510
|
+
this.foundation.setUnbounded(!!this.isUnbounded);
|
2511
|
+
}, e;
|
2512
|
+
}(Zt)
|
2513
|
+
);
|
2514
|
+
/**
|
2515
|
+
* @license
|
2516
|
+
* Copyright 2020 Google Inc.
|
2517
|
+
*
|
2518
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
2519
|
+
* of this software and associated documentation files (the "Software"), to deal
|
2520
|
+
* in the Software without restriction, including without limitation the rights
|
2521
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2522
|
+
* copies of the Software, and to permit persons to whom the Software is
|
2523
|
+
* furnished to do so, subject to the following conditions:
|
2524
|
+
*
|
2525
|
+
* The above copyright notice and this permission notice shall be included in
|
2526
|
+
* all copies or substantial portions of the Software.
|
2527
|
+
*
|
2528
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2529
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2530
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2531
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2532
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2533
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2534
|
+
* THE SOFTWARE.
|
2535
|
+
*/
|
2536
|
+
function ki(t, e) {
|
2537
|
+
var i = Number(e.replace("px", ""));
|
2538
|
+
return Number.isNaN(i) ? t : {
|
2539
|
+
width: t.width + i,
|
2540
|
+
height: t.height,
|
2541
|
+
top: t.top,
|
2542
|
+
right: t.right,
|
2543
|
+
bottom: t.bottom,
|
2544
|
+
left: t.left
|
2545
|
+
};
|
2546
|
+
}
|
2547
|
+
var Bi = "--mdc-chip-graphic-selected-width";
|
2548
|
+
/**
|
2549
|
+
* @license
|
2550
|
+
* Copyright 2020 Google Inc.
|
2551
|
+
*
|
2552
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
2553
|
+
* of this software and associated documentation files (the "Software"), to deal
|
2554
|
+
* in the Software without restriction, including without limitation the rights
|
2555
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2556
|
+
* copies of the Software, and to permit persons to whom the Software is
|
2557
|
+
* furnished to do so, subject to the following conditions:
|
2558
|
+
*
|
2559
|
+
* The above copyright notice and this permission notice shall be included in
|
2560
|
+
* all copies or substantial portions of the Software.
|
2561
|
+
*
|
2562
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2563
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2564
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2565
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2566
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2567
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2568
|
+
* THE SOFTWARE.
|
2569
|
+
*/
|
2570
|
+
var J = /* @__PURE__ */ new Map();
|
2571
|
+
J.set(s.SPACEBAR, A.SPACEBAR_KEY);
|
2572
|
+
J.set(s.ENTER, A.ENTER_KEY);
|
2573
|
+
J.set(s.DELETE, A.DELETE_KEY);
|
2574
|
+
J.set(s.BACKSPACE, A.BACKSPACE_KEY);
|
2575
|
+
var te = (
|
2576
|
+
/** @class */
|
2577
|
+
function(t) {
|
2578
|
+
U(e, t);
|
2579
|
+
function e(i) {
|
2580
|
+
return t.call(this, S(S({}, e.defaultAdapter), i)) || this;
|
2581
|
+
}
|
2582
|
+
return Object.defineProperty(e, "defaultAdapter", {
|
2583
|
+
get: function() {
|
2584
|
+
return {
|
2585
|
+
emitEvent: function() {
|
2586
|
+
},
|
2587
|
+
focus: function() {
|
2588
|
+
},
|
2589
|
+
getAttribute: function() {
|
2590
|
+
return null;
|
2591
|
+
},
|
2592
|
+
getElementID: function() {
|
2593
|
+
return "";
|
2594
|
+
},
|
2595
|
+
removeAttribute: function() {
|
2596
|
+
},
|
2597
|
+
setAttribute: function() {
|
2598
|
+
}
|
2599
|
+
};
|
2600
|
+
},
|
2601
|
+
enumerable: !1,
|
2602
|
+
configurable: !0
|
2603
|
+
}), e.prototype.handleClick = function() {
|
2604
|
+
this.isDisabled() || this.emitInteraction(A.CLICK);
|
2605
|
+
}, e.prototype.handleKeydown = function(i) {
|
2606
|
+
var n = Xt(i);
|
2607
|
+
if (this.shouldNotifyInteractionFromKey(n)) {
|
2608
|
+
i.preventDefault(), this.emitInteraction(this.getTriggerFromKey(n));
|
2609
|
+
return;
|
2610
|
+
}
|
2611
|
+
if (Pi(i)) {
|
2612
|
+
i.preventDefault(), this.emitNavigation(n);
|
2613
|
+
return;
|
2614
|
+
}
|
2615
|
+
return !0;
|
2616
|
+
}, e.prototype.setDisabled = function(i) {
|
2617
|
+
if (this.isSelectable()) {
|
2618
|
+
this.adapter.setAttribute(h.ARIA_DISABLED, "" + i);
|
2619
|
+
return;
|
2620
|
+
}
|
2621
|
+
i ? this.adapter.setAttribute(h.DISABLED, "true") : this.adapter.removeAttribute(h.DISABLED);
|
2622
|
+
}, e.prototype.isDisabled = function() {
|
2623
|
+
return this.adapter.getAttribute(h.ARIA_DISABLED) === "true" || this.adapter.getAttribute(h.DISABLED) !== null;
|
2624
|
+
}, e.prototype.setFocus = function(i) {
|
2625
|
+
if (this.isFocusable()) {
|
2626
|
+
if (i === x.FOCUSABLE_AND_FOCUSED) {
|
2627
|
+
this.adapter.setAttribute(h.TAB_INDEX, "0"), this.adapter.focus();
|
2628
|
+
return;
|
2629
|
+
}
|
2630
|
+
if (i === x.FOCUSABLE) {
|
2631
|
+
this.adapter.setAttribute(h.TAB_INDEX, "0");
|
2632
|
+
return;
|
2633
|
+
}
|
2634
|
+
if (i === x.NOT_FOCUSABLE) {
|
2635
|
+
this.adapter.setAttribute(h.TAB_INDEX, "-1");
|
2636
|
+
return;
|
2637
|
+
}
|
2638
|
+
}
|
2639
|
+
}, e.prototype.isFocusable = function() {
|
2640
|
+
return !(this.isDisabled() || this.adapter.getAttribute(h.ARIA_HIDDEN) === "true");
|
2641
|
+
}, e.prototype.setSelected = function(i) {
|
2642
|
+
this.isSelectable() && this.adapter.setAttribute(h.ARIA_SELECTED, "" + i);
|
2643
|
+
}, e.prototype.isSelected = function() {
|
2644
|
+
return this.adapter.getAttribute(h.ARIA_SELECTED) === "true";
|
2645
|
+
}, e.prototype.emitInteraction = function(i) {
|
2646
|
+
this.adapter.emitEvent($.INTERACTION, {
|
2647
|
+
actionID: this.adapter.getElementID(),
|
2648
|
+
source: this.actionType(),
|
2649
|
+
trigger: i
|
2650
|
+
});
|
2651
|
+
}, e.prototype.emitNavigation = function(i) {
|
2652
|
+
this.adapter.emitEvent($.NAVIGATION, {
|
2653
|
+
source: this.actionType(),
|
2654
|
+
key: i
|
2655
|
+
});
|
2656
|
+
}, e.prototype.shouldNotifyInteractionFromKey = function(i) {
|
2657
|
+
var n = i === s.ENTER || i === s.SPACEBAR, r = i === s.BACKSPACE || i === s.DELETE;
|
2658
|
+
return !!(n || r && this.shouldEmitInteractionOnRemoveKey());
|
2659
|
+
}, e.prototype.getTriggerFromKey = function(i) {
|
2660
|
+
var n = J.get(i);
|
2661
|
+
return n || A.UNSPECIFIED;
|
2662
|
+
}, e;
|
2663
|
+
}(ct)
|
2664
|
+
);
|
2665
|
+
/**
|
2666
|
+
* @license
|
2667
|
+
* Copyright 2020 Google Inc.
|
2668
|
+
*
|
2669
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
2670
|
+
* of this software and associated documentation files (the "Software"), to deal
|
2671
|
+
* in the Software without restriction, including without limitation the rights
|
2672
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2673
|
+
* copies of the Software, and to permit persons to whom the Software is
|
2674
|
+
* furnished to do so, subject to the following conditions:
|
2675
|
+
*
|
2676
|
+
* The above copyright notice and this permission notice shall be included in
|
2677
|
+
* all copies or substantial portions of the Software.
|
2678
|
+
*
|
2679
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2680
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2681
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2682
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2683
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2684
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2685
|
+
* THE SOFTWARE.
|
2686
|
+
*/
|
2687
|
+
var Gi = (
|
2688
|
+
/** @class */
|
2689
|
+
function(t) {
|
2690
|
+
U(e, t);
|
2691
|
+
function e() {
|
2692
|
+
return t !== null && t.apply(this, arguments) || this;
|
2693
|
+
}
|
2694
|
+
return e.prototype.isSelectable = function() {
|
2695
|
+
return this.adapter.getAttribute(h.ROLE) === "option";
|
2696
|
+
}, e.prototype.actionType = function() {
|
2697
|
+
return b.PRIMARY;
|
2698
|
+
}, e.prototype.shouldEmitInteractionOnRemoveKey = function() {
|
2699
|
+
return this.adapter.getAttribute(h.DATA_DELETABLE) === "true";
|
2700
|
+
}, e;
|
2701
|
+
}(te)
|
2702
|
+
);
|
2703
|
+
/**
|
2704
|
+
* @license
|
2705
|
+
* Copyright 2020 Google Inc.
|
2706
|
+
*
|
2707
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
2708
|
+
* of this software and associated documentation files (the "Software"), to deal
|
2709
|
+
* in the Software without restriction, including without limitation the rights
|
2710
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2711
|
+
* copies of the Software, and to permit persons to whom the Software is
|
2712
|
+
* furnished to do so, subject to the following conditions:
|
2713
|
+
*
|
2714
|
+
* The above copyright notice and this permission notice shall be included in
|
2715
|
+
* all copies or substantial portions of the Software.
|
2716
|
+
*
|
2717
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2718
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2719
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2720
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2721
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2722
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2723
|
+
* THE SOFTWARE.
|
2724
|
+
*/
|
2725
|
+
var Wi = (
|
2726
|
+
/** @class */
|
2727
|
+
function(t) {
|
2728
|
+
U(e, t);
|
2729
|
+
function e() {
|
2730
|
+
return t !== null && t.apply(this, arguments) || this;
|
2731
|
+
}
|
2732
|
+
return e.prototype.isSelectable = function() {
|
2733
|
+
return !1;
|
2734
|
+
}, e.prototype.actionType = function() {
|
2735
|
+
return b.TRAILING;
|
2736
|
+
}, e.prototype.shouldEmitInteractionOnRemoveKey = function() {
|
2737
|
+
return !0;
|
2738
|
+
}, e;
|
2739
|
+
}(te)
|
2740
|
+
);
|
2741
|
+
/**
|
2742
|
+
* @license
|
2743
|
+
* Copyright 2020 Google Inc.
|
2744
|
+
*
|
2745
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
2746
|
+
* of this software and associated documentation files (the "Software"), to deal
|
2747
|
+
* in the Software without restriction, including without limitation the rights
|
2748
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2749
|
+
* copies of the Software, and to permit persons to whom the Software is
|
2750
|
+
* furnished to do so, subject to the following conditions:
|
2751
|
+
*
|
2752
|
+
* The above copyright notice and this permission notice shall be included in
|
2753
|
+
* all copies or substantial portions of the Software.
|
2754
|
+
*
|
2755
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2756
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2757
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2758
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2759
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2760
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2761
|
+
* THE SOFTWARE.
|
2762
|
+
*/
|
2763
|
+
var ji = [
|
2764
|
+
O.safeAttrPrefix(Dt || (Dt = L(["aria-"], ["aria-"]))),
|
2765
|
+
O.safeAttrPrefix(Ot || (Ot = L(["data-"], ["data-"]))),
|
2766
|
+
O.safeAttrPrefix(Nt || (Nt = L(["disabled"], ["disabled"]))),
|
2767
|
+
O.safeAttrPrefix(Pt || (Pt = L(["role"], ["role"]))),
|
2768
|
+
O.safeAttrPrefix(Ct || (Ct = L(["tabindex"], ["tabindex"])))
|
2769
|
+
], Ki = (
|
2770
|
+
/** @class */
|
2771
|
+
function(t) {
|
2772
|
+
U(e, t);
|
2773
|
+
function e() {
|
2774
|
+
var i = t !== null && t.apply(this, arguments) || this;
|
2775
|
+
return i.rootHTML = i.root, i;
|
2776
|
+
}
|
2777
|
+
return e.attachTo = function(i) {
|
2778
|
+
return new e(i);
|
2779
|
+
}, Object.defineProperty(e.prototype, "ripple", {
|
2780
|
+
get: function() {
|
2781
|
+
return this.rippleInstance;
|
2782
|
+
},
|
2783
|
+
enumerable: !1,
|
2784
|
+
configurable: !0
|
2785
|
+
}), e.prototype.initialize = function(i) {
|
2786
|
+
var n = this;
|
2787
|
+
i === void 0 && (i = function(o, a) {
|
2788
|
+
return new It(o, a);
|
2789
|
+
});
|
2790
|
+
var r = S(S({}, It.createAdapter(this)), { computeBoundingRect: function() {
|
2791
|
+
return n.computeRippleClientRect();
|
2792
|
+
} });
|
2793
|
+
this.rippleInstance = i(this.root, new Qt(r));
|
2794
|
+
}, e.prototype.initialSyncWithDOM = function() {
|
2795
|
+
var i = this;
|
2796
|
+
this.handleClick = function() {
|
2797
|
+
i.foundation.handleClick();
|
2798
|
+
}, this.handleKeydown = function(n) {
|
2799
|
+
i.foundation.handleKeydown(n);
|
2800
|
+
}, this.listen("click", this.handleClick), this.listen("keydown", this.handleKeydown);
|
2801
|
+
}, e.prototype.destroy = function() {
|
2802
|
+
this.ripple.destroy(), this.unlisten("click", this.handleClick), this.unlisten("keydown", this.handleKeydown), t.prototype.destroy.call(this);
|
2803
|
+
}, e.prototype.getDefaultFoundation = function() {
|
2804
|
+
var i = this, n = {
|
2805
|
+
emitEvent: function(r, o) {
|
2806
|
+
i.emit(
|
2807
|
+
r,
|
2808
|
+
o,
|
2809
|
+
!0
|
2810
|
+
/* shouldBubble */
|
2811
|
+
);
|
2812
|
+
},
|
2813
|
+
focus: function() {
|
2814
|
+
i.rootHTML.focus();
|
2815
|
+
},
|
2816
|
+
getAttribute: function(r) {
|
2817
|
+
return i.root.getAttribute(r);
|
2818
|
+
},
|
2819
|
+
getElementID: function() {
|
2820
|
+
return i.root.id;
|
2821
|
+
},
|
2822
|
+
removeAttribute: function(r) {
|
2823
|
+
i.root.removeAttribute(r);
|
2824
|
+
},
|
2825
|
+
setAttribute: function(r, o) {
|
2826
|
+
Kt(ji, i.root, r, o);
|
2827
|
+
}
|
2828
|
+
};
|
2829
|
+
return this.root.classList.contains(X.TRAILING_ACTION) ? new Wi(n) : new Gi(n);
|
2830
|
+
}, e.prototype.setDisabled = function(i) {
|
2831
|
+
this.foundation.setDisabled(i);
|
2832
|
+
}, e.prototype.isDisabled = function() {
|
2833
|
+
return this.foundation.isDisabled();
|
2834
|
+
}, e.prototype.setFocus = function(i) {
|
2835
|
+
this.foundation.setFocus(i);
|
2836
|
+
}, e.prototype.isFocusable = function() {
|
2837
|
+
return this.foundation.isFocusable();
|
2838
|
+
}, e.prototype.setSelected = function(i) {
|
2839
|
+
this.foundation.setSelected(i);
|
2840
|
+
}, e.prototype.isSelected = function() {
|
2841
|
+
return this.foundation.isSelected();
|
2842
|
+
}, e.prototype.isSelectable = function() {
|
2843
|
+
return this.foundation.isSelectable();
|
2844
|
+
}, e.prototype.actionType = function() {
|
2845
|
+
return this.foundation.actionType();
|
2846
|
+
}, e.prototype.computeRippleClientRect = function() {
|
2847
|
+
if (this.root.classList.contains(X.PRIMARY_ACTION)) {
|
2848
|
+
var i = Fi(this.root, "." + X.CHIP_ROOT);
|
2849
|
+
if (!i)
|
2850
|
+
return this.root.getBoundingClientRect();
|
2851
|
+
var n = window.getComputedStyle(i).getPropertyValue(Bi);
|
2852
|
+
return ki(i.getBoundingClientRect(), n);
|
2853
|
+
}
|
2854
|
+
return this.root.getBoundingClientRect();
|
2855
|
+
}, e;
|
2856
|
+
}(Zt)
|
2857
|
+
), Dt, Ot, Nt, Pt, Ct, $i = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, N = (t, e, i, n) => {
|
2858
|
+
for (var r = n > 1 ? void 0 : n ? Vi(e, i) : e, o = t.length - 1, a; o >= 0; o--)
|
2859
|
+
(a = t[o]) && (r = (n ? a(e, i, r) : a(r)) || r);
|
2860
|
+
return n && r && $i(e, i, r), r;
|
2861
|
+
};
|
2862
|
+
let qi = 0;
|
2863
|
+
class R extends ne {
|
2864
|
+
constructor() {
|
2865
|
+
super(), this.mdcFoundationClass = Ci, this.label = "", this.icon = "", this.trailingIcon = !1, this.avatar = !1, this.disabled = !1, this.filter = !1, this.chipId = qi++;
|
2866
|
+
}
|
2867
|
+
render() {
|
2868
|
+
const e = {
|
2869
|
+
"mdc-evolution-chip": !0,
|
2870
|
+
"mdc-evolution-chip--disabled": this.disabled,
|
2871
|
+
"mdc-evolution-chip--with-trailing-action": this.trailingIcon,
|
2872
|
+
"mdc-evolution-chip--with-primary-graphic": !this.trailingIcon && this.icon,
|
2873
|
+
"mdc-evolution-chip--with-primary-icon": this.icon && !this.filter,
|
2874
|
+
"mdc-evolution-chip--filter": this.filter,
|
2875
|
+
"mdc-evolution-chip--selectable": this.filter,
|
2876
|
+
"mdc-evolution-chip--with-avatar": this.avatar,
|
2877
|
+
secondary: this.state === "secondary",
|
2878
|
+
negative: this.state === "negative",
|
2879
|
+
caution: this.state === "caution"
|
2880
|
+
};
|
2881
|
+
return Y`
|
2882
|
+
<span
|
2883
|
+
class="${ue(e)}"
|
2884
|
+
role="${this.filter ? "presentation" : "row"}"
|
2885
|
+
id="cv-chip-${this.chipId}"
|
2886
|
+
>
|
2887
|
+
<span
|
2888
|
+
class="mdc-evolution-chip__cell mdc-evolution-chip__cell--primary"
|
2889
|
+
role="${this.filter ? "presentation" : "gridcell"}"
|
2890
|
+
>
|
2891
|
+
<button
|
2892
|
+
class="mdc-evolution-chip__action mdc-evolution-chip__action--primary"
|
2893
|
+
role="${this.filter ? "option" : ""}"
|
2894
|
+
type="button"
|
2895
|
+
tabindex="-1"
|
2896
|
+
>
|
2897
|
+
<span
|
2898
|
+
class="mdc-evolution-chip__ripple mdc-evolution-chip__ripple--primary"
|
2899
|
+
></span>
|
2900
|
+
${!this.trailingIcon && this.icon || this.filter ? this.renderGraphic() : ""}
|
2901
|
+
<span class="mdc-evolution-chip__text-label">${this.label}</span>
|
2902
|
+
</button>
|
2903
|
+
</span>
|
2904
|
+
${this.trailingIcon ? this.renderTrailing() : ""}
|
2905
|
+
</span>
|
2906
|
+
`;
|
2907
|
+
}
|
2908
|
+
async firstUpdated() {
|
2909
|
+
this.mdcFoundation !== void 0 && this.mdcFoundation.destroy(), this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter()), this.actions = /* @__PURE__ */ new Map();
|
2910
|
+
const e = this.mdcRoot.querySelectorAll(
|
2911
|
+
".mdc-evolution-chip__action"
|
2912
|
+
);
|
2913
|
+
for (let i = 0; i < e.length; i++) {
|
2914
|
+
const n = new Ki(e[i]);
|
2915
|
+
this.actions.set(n.actionType(), n), e[i].addEventListener(
|
2916
|
+
$.INTERACTION,
|
2917
|
+
(r) => {
|
2918
|
+
var o;
|
2919
|
+
(o = this.mdcFoundation) == null || o.handleActionInteraction(r);
|
2920
|
+
}
|
2921
|
+
), e[i].addEventListener($.NAVIGATION, (r) => {
|
2922
|
+
var o;
|
2923
|
+
(o = this.mdcFoundation) == null || o.handleActionNavigation(r);
|
2924
|
+
});
|
2925
|
+
}
|
2926
|
+
}
|
2927
|
+
renderGraphic() {
|
2928
|
+
const e = this.filter ? this.renderCheckMark() : this.renderIcon();
|
2929
|
+
return Y`<span class="mdc-evolution-chip__graphic">
|
2930
|
+
${e}
|
2931
|
+
</span>`;
|
2932
|
+
}
|
2933
|
+
renderCheckMark() {
|
2934
|
+
return Y` <span class="mdc-evolution-chip__checkmark">
|
2935
|
+
<svg class="mdc-evolution-chip__checkmark-svg" viewBox="-2 -3 30 30">
|
2936
|
+
<path
|
2937
|
+
class="mdc-evolution-chip__checkmark-path"
|
2938
|
+
fill="none"
|
2939
|
+
d="M1.73,12.91 8.1,19.28 22.79,4.59"
|
2940
|
+
/>
|
2941
|
+
</svg>
|
2942
|
+
</span>`;
|
2943
|
+
}
|
2944
|
+
renderIcon(e = !1) {
|
2945
|
+
return Y` <span
|
2946
|
+
class="mdc-evolution-chip__icon mdc-evolution-chip__icon--${e ? "trailing" : "primary"}"
|
2947
|
+
>
|
2948
|
+
${this.icon}
|
2949
|
+
</span>`;
|
2950
|
+
}
|
2951
|
+
renderTrailing() {
|
2952
|
+
return Y` <span
|
2953
|
+
class="mdc-evolution-chip__cell mdc-evolution-chip__cell--trailing"
|
2954
|
+
role="gridcell"
|
2955
|
+
>
|
2956
|
+
<button
|
2957
|
+
class="mdc-evolution-chip__action mdc-evolution-chip__action--trailing"
|
2958
|
+
type="button"
|
2959
|
+
tabindex="-1"
|
2960
|
+
data-mdc-deletable="true"
|
2961
|
+
aria-label="Remove ${this.label}"
|
2962
|
+
>
|
2963
|
+
<span
|
2964
|
+
class="mdc-evolution-chip__ripple mdc-evolution-chip__ripple--trailing"
|
2965
|
+
></span>
|
2966
|
+
${this.renderIcon(!0)}
|
2967
|
+
</button>
|
2968
|
+
</span>`;
|
2969
|
+
}
|
2970
|
+
createAdapter() {
|
2971
|
+
return {
|
2972
|
+
...ce(this.mdcRoot),
|
2973
|
+
emitEvent: (e, i) => this.dispatchEvent(
|
2974
|
+
new CustomEvent(e, { bubbles: !0, detail: i })
|
2975
|
+
),
|
2976
|
+
/** Returns the child actions provided by the chip. */
|
2977
|
+
getActions: () => {
|
2978
|
+
const e = [];
|
2979
|
+
for (const [i] of this.actions)
|
2980
|
+
e.push(i);
|
2981
|
+
return e;
|
2982
|
+
},
|
2983
|
+
/** Returns the value for the given attribute, if it exists. */
|
2984
|
+
getAttribute: (e) => this.mdcRoot.getAttribute(e),
|
2985
|
+
/** Returns the ID of the root element. */
|
2986
|
+
getElementID: () => this.mdcRoot.getAttribute("id") ?? "",
|
2987
|
+
/** Returns the offset width of the root element. */
|
2988
|
+
getOffsetWidth: () => this.mdcRoot.offsetWidth,
|
2989
|
+
/** Returns true if the root element has the given class. */
|
2990
|
+
hasClass: (e) => this.mdcRoot.classList.contains(e),
|
2991
|
+
/** Proxies to the MDCChipAction#isSelectable method. */
|
2992
|
+
isActionSelectable: (e) => {
|
2993
|
+
var i;
|
2994
|
+
return ((i = this.actions.get(e)) == null ? void 0 : i.isSelectable()) ?? !0;
|
2995
|
+
},
|
2996
|
+
/** Proxies to the MDCChipAction#isSelected method. */
|
2997
|
+
isActionSelected: (e) => {
|
2998
|
+
var i;
|
2999
|
+
return ((i = this.actions.get(e)) == null ? void 0 : i.isSelected()) ?? !1;
|
3000
|
+
},
|
3001
|
+
/** Proxies to the MDCChipAction#isFocusable method. */
|
3002
|
+
isActionFocusable: (e) => {
|
3003
|
+
var i;
|
3004
|
+
return ((i = this.actions.get(e)) == null ? void 0 : i.isFocusable()) ?? !0;
|
3005
|
+
},
|
3006
|
+
/** Proxies to the MDCChipAction#isDisabled method. */
|
3007
|
+
isActionDisabled: (e) => {
|
3008
|
+
var i;
|
3009
|
+
return ((i = this.actions.get(e)) == null ? void 0 : i.isDisabled()) ?? !1;
|
3010
|
+
},
|
3011
|
+
/** Returns true if the text direction is right-to-left. */
|
3012
|
+
isRTL: () => window.getComputedStyle(this.mdcRoot).getPropertyValue("direction") === "rtl",
|
3013
|
+
/** Proxies to the MDCChipAction#setDisabled method. */
|
3014
|
+
setActionDisabled: (e, i) => {
|
3015
|
+
var n;
|
3016
|
+
return (n = this.actions.get(e)) == null ? void 0 : n.setDisabled(i);
|
3017
|
+
},
|
3018
|
+
/** Proxies to the MDCChipAction#setFocus method. */
|
3019
|
+
setActionFocus: (e, i) => {
|
3020
|
+
var n;
|
3021
|
+
return (n = this.actions.get(e)) == null ? void 0 : n.setFocus(i);
|
3022
|
+
},
|
3023
|
+
/** Proxies to the MDCChipAction#setSelected method. */
|
3024
|
+
setActionSelected: (e, i) => {
|
3025
|
+
var n;
|
3026
|
+
return (n = this.actions.get(e)) == null ? void 0 : n.setSelected(i);
|
3027
|
+
},
|
3028
|
+
/** Sets the style property to the given value. */
|
3029
|
+
setStyleProperty: (e, i) => this.mdcRoot.style.setProperty(e, i)
|
3030
|
+
};
|
3031
|
+
}
|
3032
|
+
getActions() {
|
3033
|
+
var e;
|
3034
|
+
return ((e = this.mdcFoundation) == null ? void 0 : e.getActions()) ?? [];
|
3035
|
+
}
|
3036
|
+
getElementID() {
|
3037
|
+
var e;
|
3038
|
+
return ((e = this.mdcFoundation) == null ? void 0 : e.getElementID()) ?? "";
|
3039
|
+
}
|
3040
|
+
isActionFocusable(e) {
|
3041
|
+
var i;
|
3042
|
+
return ((i = this.mdcFoundation) == null ? void 0 : i.isActionFocusable(e)) ?? !1;
|
3043
|
+
}
|
3044
|
+
isActionSelectable(e) {
|
3045
|
+
var i;
|
3046
|
+
return ((i = this.mdcFoundation) == null ? void 0 : i.isActionSelectable(e)) ?? !1;
|
3047
|
+
}
|
3048
|
+
isActionSelected(e) {
|
3049
|
+
var i;
|
3050
|
+
return ((i = this.mdcFoundation) == null ? void 0 : i.isActionSelected(e)) ?? !1;
|
3051
|
+
}
|
3052
|
+
setActionFocus(e, i) {
|
3053
|
+
var n;
|
3054
|
+
return (n = this.mdcFoundation) == null ? void 0 : n.setActionFocus(e, i);
|
3055
|
+
}
|
3056
|
+
setActionSelected(e, i) {
|
3057
|
+
var n;
|
3058
|
+
return (n = this.mdcFoundation) == null ? void 0 : n.setActionSelected(e, i);
|
3059
|
+
}
|
3060
|
+
startAnimation(e) {
|
3061
|
+
var i;
|
3062
|
+
return (i = this.mdcFoundation) == null ? void 0 : i.startAnimation(e);
|
3063
|
+
}
|
3064
|
+
}
|
3065
|
+
N([
|
3066
|
+
de(".mdc-evolution-chip")
|
3067
|
+
], R.prototype, "mdcRoot", 2);
|
3068
|
+
N([
|
3069
|
+
z()
|
3070
|
+
], R.prototype, "label", 2);
|
3071
|
+
N([
|
3072
|
+
z({ type: String })
|
3073
|
+
], R.prototype, "icon", 2);
|
3074
|
+
N([
|
3075
|
+
z({ type: Boolean, reflect: !0 })
|
3076
|
+
], R.prototype, "trailingIcon", 2);
|
3077
|
+
N([
|
3078
|
+
z({ type: Boolean, reflect: !0 })
|
3079
|
+
], R.prototype, "avatar", 2);
|
3080
|
+
N([
|
3081
|
+
z({ type: Boolean, reflect: !0 })
|
3082
|
+
], R.prototype, "disabled", 2);
|
3083
|
+
N([
|
3084
|
+
z({ type: Boolean, reflect: !0 })
|
3085
|
+
], R.prototype, "filter", 2);
|
3086
|
+
N([
|
3087
|
+
z()
|
3088
|
+
], R.prototype, "state", 2);
|
3089
|
+
const Yi = `.mdc-evolution-chip,.mdc-evolution-chip__cell,.mdc-evolution-chip__action{display:inline-flex;align-items:center}.mdc-evolution-chip{position:relative;max-width:100%}.mdc-evolution-chip .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-evolution-chip__cell,.mdc-evolution-chip__action{height:100%}.mdc-evolution-chip__cell--primary{overflow-x:hidden}.mdc-evolution-chip__cell--trailing{flex:1 0 auto}.mdc-evolution-chip__action{align-items:center;background:none;border:none;box-sizing:content-box;cursor:pointer;display:inline-flex;justify-content:center;outline:none;padding:0;text-decoration:none;color:inherit}.mdc-evolution-chip__action--presentational{cursor:auto}.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{pointer-events:none}.mdc-evolution-chip__action--primary{overflow-x:hidden}.mdc-evolution-chip__action--trailing{position:relative;overflow:visible}.mdc-evolution-chip__action--primary:before{box-sizing:border-box;content:"";height:100%;left:0;position:absolute;pointer-events:none;top:0;width:100%;z-index:1}.mdc-evolution-chip--touch{margin-top:8px;margin-bottom:8px}.mdc-evolution-chip__action-touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-evolution-chip__text-label{white-space:nowrap;-webkit-user-select:none;user-select:none;text-overflow:ellipsis;overflow:hidden}.mdc-evolution-chip__graphic{align-items:center;display:inline-flex;justify-content:center;overflow:hidden;pointer-events:none;position:relative;flex:1 0 auto}.mdc-evolution-chip__checkmark{position:absolute;opacity:0;top:50%;left:50%}.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--selected):not(.mdc-evolution-chip--with-primary-icon) .mdc-evolution-chip__graphic{width:0}.mdc-evolution-chip__checkmark-background{opacity:0}.mdc-evolution-chip__checkmark-svg{display:block}.mdc-evolution-chip__checkmark-path{stroke-width:2px;stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke:currentColor}.mdc-evolution-chip--selecting .mdc-evolution-chip__graphic{transition:width .15s 0ms cubic-bezier(.4,0,.2,1)}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark{transition:transform .15s 0ms cubic-bezier(.4,0,.2,1);transform:translate(-75%,-50%)}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset .15s 45ms cubic-bezier(.4,0,.2,1)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__graphic{transition:width .1s 0ms cubic-bezier(.4,0,.2,1)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__checkmark{transition:opacity 50ms 0ms linear,transform .1s 0ms cubic-bezier(.4,0,.2,1);transform:translate(-75%,-50%)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}.mdc-evolution-chip--selecting-with-primary-icon .mdc-evolution-chip__icon--primary{transition:opacity 75ms 0ms cubic-bezier(.4,0,.2,1)}.mdc-evolution-chip--selecting-with-primary-icon .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset .15s 75ms cubic-bezier(.4,0,.2,1)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__icon--primary{transition:opacity .15s 75ms cubic-bezier(.4,0,.2,1)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__checkmark{transition:opacity 75ms 0ms cubic-bezier(.4,0,.2,1);transform:translate(-50%,-50%)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}.mdc-evolution-chip--selected .mdc-evolution-chip__icon--primary{opacity:0}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{transform:translate(-50%,-50%);opacity:1}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}@keyframes mdc-evolution-chip-enter{0%{transform:scale(.8);opacity:.4}to{transform:scale(1);opacity:1}}.mdc-evolution-chip--enter{animation:mdc-evolution-chip-enter .1s 0ms cubic-bezier(0,0,.2,1)}@keyframes mdc-evolution-chip-exit{0%{opacity:1}to{opacity:0}}.mdc-evolution-chip--exit{animation:mdc-evolution-chip-exit 75ms 0ms cubic-bezier(.4,0,1,1)}.mdc-evolution-chip--hidden{opacity:0;pointer-events:none;transition:width .15s 0ms cubic-bezier(.4,0,1,1)}.mdc-evolution-chip{height:32px;border-radius:16px;background-color:#e0e0e0}.mdc-evolution-chip .mdc-evolution-chip__ripple{border-radius:16px}.mdc-evolution-chip .mdc-evolution-chip__action--primary:before{border-radius:16px}.mdc-evolution-chip .mdc-evolution-chip__icon--primary{border-radius:16px}.mdc-evolution-chip .mdc-evolution-chip__action--primary,[dir=rtl] .mdc-evolution-chip .mdc-evolution-chip__action--primary,.mdc-evolution-chip .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:12px}.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic,[dir=rtl] .mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic,.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic[dir=rtl]{padding-left:6px;padding-right:6px}.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary,.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:0}.mdc-evolution-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,[dir=rtl] .mdc-evolution-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mdc-evolution-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mdc-evolution-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mdc-evolution-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mdc-evolution-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mdc-evolution-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}[dir=rtl] .mdc-evolution-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mdc-evolution-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:12px}.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic,[dir=rtl] .mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic,.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic[dir=rtl]{padding-left:6px;padding-right:6px}.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,[dir=rtl] .mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,[dir=rtl] .mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mdc-evolution-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:0}.mdc-evolution-chip .mdc-evolution-chip__text-label,.mdc-evolution-chip .mdc-evolution-chip__icon--primary,.mdc-evolution-chip .mdc-evolution-chip__checkmark,.mdc-evolution-chip .mdc-evolution-chip__icon--trailing{color:#000000de}.mdc-evolution-chip .mdc-evolution-chip__text-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit)}.mdc-evolution-chip.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--with-primary-icon){--mdc-chip-graphic-selected-width: 20px}.mdc-evolution-chip .mdc-evolution-chip__graphic,.mdc-evolution-chip .mdc-evolution-chip__icon--primary{height:20px;width:20px;font-size:20px}.mdc-evolution-chip .mdc-evolution-chip__checkmark{height:20px;width:20px}.mdc-evolution-chip .mdc-evolution-chip__icon--trailing{height:18px;width:18px;font-size:18px}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-evolution-chip.mdc-evolution-chip .mdc-evolution-chip__action--primary:before{border-color:CanvasText}.mdc-evolution-chip.mdc-evolution-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary:before{border-color:GrayText}.mdc-evolution-chip.mdc-evolution-chip.mdc-evolution-chip--selected .mdc-evolution-chip__action--primary:before{border-color:CanvasText}.mdc-evolution-chip.mdc-evolution-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary:before{border-color:GrayText}.mdc-evolution-chip.mdc-evolution-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label,.mdc-evolution-chip.mdc-evolution-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label,.mdc-evolution-chip.mdc-evolution-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--primary,.mdc-evolution-chip.mdc-evolution-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark,.mdc-evolution-chip.mdc-evolution-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{color:GrayText}.mdc-evolution-chip.mdc-evolution-chip.mdc-evolution-chip--disabled,.mdc-evolution-chip.mdc-evolution-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled{background-color:Canvas}}.mdc-evolution-chip .mdc-evolution-chip__focus-ring{display:none}.mdc-evolution-chip .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational).mdc-ripple-upgraded--background-focused .mdc-evolution-chip__focus-ring,.mdc-evolution-chip .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__focus-ring{z-index:1;display:block;pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-evolution-chip .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational).mdc-ripple-upgraded--background-focused .mdc-evolution-chip__focus-ring,.mdc-evolution-chip .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__focus-ring{border-color:CanvasText}}.mdc-evolution-chip .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational).mdc-ripple-upgraded--background-focused .mdc-evolution-chip__focus-ring:after,.mdc-evolution-chip .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__focus-ring:after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-evolution-chip .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational).mdc-ripple-upgraded--background-focused .mdc-evolution-chip__focus-ring:after,.mdc-evolution-chip .mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__focus-ring:after{border-color:CanvasText}}.mdc-evolution-chip .mdc-evolution-chip__action--trailing:not(.mdc-evolution-chip__action--presentational).mdc-ripple-upgraded--background-focused .mdc-evolution-chip__focus-ring,.mdc-evolution-chip .mdc-evolution-chip__action--trailing:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__focus-ring{z-index:1;display:block;pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:calc(100% + 4px);width:calc(100% - 4px)}@media screen and (forced-colors: active){.mdc-evolution-chip .mdc-evolution-chip__action--trailing:not(.mdc-evolution-chip__action--presentational).mdc-ripple-upgraded--background-focused .mdc-evolution-chip__focus-ring,.mdc-evolution-chip .mdc-evolution-chip__action--trailing:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__focus-ring{border-color:CanvasText}}.mdc-evolution-chip .mdc-evolution-chip__action--trailing:not(.mdc-evolution-chip__action--presentational).mdc-ripple-upgraded--background-focused .mdc-evolution-chip__focus-ring:after,.mdc-evolution-chip .mdc-evolution-chip__action--trailing:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__focus-ring:after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-evolution-chip .mdc-evolution-chip__action--trailing:not(.mdc-evolution-chip__action--presentational).mdc-ripple-upgraded--background-focused .mdc-evolution-chip__focus-ring:after,.mdc-evolution-chip .mdc-evolution-chip__action--trailing:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__focus-ring:after{border-color:CanvasText}}.mdc-evolution-chip--filter.mdc-evolution-chip--selected{background-color:#cecece}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic[dir=rtl]{padding-left:8px;padding-right:4px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic[dir=rtl]{padding-left:8px;padding-right:4px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--with-primary-icon){--mdc-chip-graphic-selected-width: 24px}.mdc-evolution-chip--with-avatar .mdc-evolution-chip__graphic,.mdc-evolution-chip--with-avatar .mdc-evolution-chip__icon--primary{height:24px;width:24px;font-size:24px}.mdc-evolution-chip__action--primary .mdc-evolution-chip__ripple:before,.mdc-evolution-chip__action--primary .mdc-evolution-chip__ripple:after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-evolution-chip__action--primary:hover .mdc-evolution-chip__ripple:before,.mdc-evolution-chip__action--primary.mdc-ripple-surface--hover .mdc-evolution-chip__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-evolution-chip__action--primary.mdc-ripple-upgraded--background-focused .mdc-evolution-chip__ripple:before,.mdc-evolution-chip__action--primary:not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__ripple:before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-evolution-chip__action--primary:not(.mdc-ripple-upgraded) .mdc-evolution-chip__ripple:after{transition:opacity .15s linear}.mdc-evolution-chip__action--primary:not(.mdc-ripple-upgraded):active .mdc-evolution-chip__ripple:after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-evolution-chip__action--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity: var(--mdc-ripple-press-opacity, .12)}.mdc-evolution-chip__action--trailing .mdc-evolution-chip__ripple:before,.mdc-evolution-chip__action--trailing .mdc-evolution-chip__ripple:after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-evolution-chip__action--trailing:hover .mdc-evolution-chip__ripple:before,.mdc-evolution-chip__action--trailing.mdc-ripple-surface--hover .mdc-evolution-chip__ripple:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-evolution-chip__action--trailing.mdc-ripple-upgraded--background-focused .mdc-evolution-chip__ripple:before,.mdc-evolution-chip__action--trailing:not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__ripple:before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-evolution-chip__action--trailing:not(.mdc-ripple-upgraded) .mdc-evolution-chip__ripple:after{transition:opacity .15s linear}.mdc-evolution-chip__action--trailing:not(.mdc-ripple-upgraded):active .mdc-evolution-chip__ripple:after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-evolution-chip__action--trailing.mdc-ripple-upgraded{--mdc-ripple-fg-opacity: var(--mdc-ripple-press-opacity, .12)}.mdc-evolution-chip__ripple--trailing{height:18px;width:18px}.mdc-evolution-chip__action{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-evolution-chip__action .mdc-evolution-chip__ripple:before,.mdc-evolution-chip__action .mdc-evolution-chip__ripple:after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-evolution-chip__action .mdc-evolution-chip__ripple:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-evolution-chip__action .mdc-evolution-chip__ripple:after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-evolution-chip__action.mdc-ripple-upgraded .mdc-evolution-chip__ripple:before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-evolution-chip__action.mdc-ripple-upgraded .mdc-evolution-chip__ripple:after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-evolution-chip__action.mdc-ripple-upgraded--unbounded .mdc-evolution-chip__ripple:after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-evolution-chip__action.mdc-ripple-upgraded--foreground-activation .mdc-evolution-chip__ripple:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-evolution-chip__action.mdc-ripple-upgraded--foreground-deactivation .mdc-evolution-chip__ripple:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-evolution-chip__action .mdc-evolution-chip__ripple:before,.mdc-evolution-chip__action .mdc-evolution-chip__ripple:after{top:-50%;left:-50%;width:200%;height:200%}.mdc-evolution-chip__action.mdc-ripple-upgraded .mdc-evolution-chip__ripple:after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-evolution-chip__ripple{position:absolute;box-sizing:content-box;overflow:hidden;pointer-events:none}.mdc-evolution-chip__ripple--primary{height:100%;width:100%;top:0;left:0}.mdc-evolution-chip__ripple--trailing{top:50%;transform:translateY(-50%)}.mdc-evolution-chip{background-color:var(--mdc-theme-surface-neutral)}.mdc-evolution-chip .mdc-evolution-chip__text-label{color:var(--mdc-theme-text-primary-on-background)}.mdc-evolution-chip .mdc-evolution-chip__icon{font-family:var(--mdc-icon-font, "Material Symbols Rounded");color:var(--mdc-theme-text-icon-on-background)}.mdc-evolution-chip .mdc-evolution-chip__checkmark-path{stroke:var(--mdc-theme-text-icon-on-background)}.mdc-evolution-chip.mdc-evolution-chip--selected{background-color:var(--mdc-theme-surface-primary)}.mdc-evolution-chip.negative{background-color:var(--mdc-theme-surface-negative)}.mdc-evolution-chip.caution{background-color:var(--mdc-theme-surface-caution)}.mdc-evolution-chip.secondary{background-color:var(--mdc-theme-surface-secondary)}
|
3090
|
+
`;
|
3091
|
+
var Xi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, Ji = (t, e, i, n) => {
|
3092
|
+
for (var r = n > 1 ? void 0 : n ? Zi(e, i) : e, o = t.length - 1, a; o >= 0; o--)
|
3093
|
+
(a = t[o]) && (r = (n ? a(e, i, r) : a(r)) || r);
|
3094
|
+
return n && r && Xi(e, i, r), r;
|
3095
|
+
};
|
3096
|
+
let rt = class extends R {
|
3097
|
+
};
|
3098
|
+
rt.styles = [
|
3099
|
+
re`
|
3100
|
+
${oe(Yi)}
|
3101
|
+
`
|
3102
|
+
];
|
3103
|
+
rt = Ji([
|
3104
|
+
ae("cv-chip")
|
3105
|
+
], rt);
|
3106
|
+
const sn = rt;
|
3107
|
+
export {
|
3108
|
+
rt as C,
|
3109
|
+
s as K,
|
3110
|
+
D as M,
|
3111
|
+
x as a,
|
3112
|
+
b,
|
3113
|
+
ct as c,
|
3114
|
+
W as d,
|
3115
|
+
sn as e
|
3116
|
+
};
|