@nysds/nys-icon 1.21.0 → 1.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nys-icon.js
CHANGED
|
@@ -1,895 +1,278 @@
|
|
|
1
|
-
import { LitElement as Jn,
|
|
2
|
-
import { property as
|
|
1
|
+
import { LitElement as Jn, unsafeCSS as Qn, html as to } from "lit";
|
|
2
|
+
import { property as J, state as eo } from "lit/decorators.js";
|
|
3
3
|
/*!
|
|
4
4
|
* █▄ █ █ █ █▀▀▀█ █▀▀▄ █▀▀▀█
|
|
5
5
|
* █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
|
|
6
6
|
* █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
|
|
7
7
|
*
|
|
8
|
-
* Icon Component v1.21.
|
|
8
|
+
* Icon Component v1.21.1
|
|
9
9
|
* Part of the New York State Design System
|
|
10
10
|
* Repository: https://github.com/its-hcd/nysds
|
|
11
11
|
* License: MIT
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
/*!
|
|
14
|
+
* New York State Design System v1.21.1
|
|
15
|
+
* Description: A design system for New York State's digital products.
|
|
16
|
+
* Repository: https://github.com/its-hcd/nysds
|
|
17
|
+
* License: MIT
|
|
18
|
+
*/
|
|
19
|
+
let no = 0;
|
|
20
|
+
function oo(o) {
|
|
21
|
+
return `${o}-${Date.now()}-${no++}`;
|
|
16
22
|
}
|
|
17
|
-
|
|
18
|
-
class n extends
|
|
23
|
+
const io = (o) => {
|
|
24
|
+
class n extends o {
|
|
19
25
|
get idPrefix() {
|
|
20
26
|
return this.localName || "nys-element";
|
|
21
27
|
}
|
|
22
28
|
ensureId() {
|
|
23
|
-
this.id || (this.id =
|
|
29
|
+
this.id || (this.id = oo(this.idPrefix));
|
|
24
30
|
}
|
|
25
31
|
connectedCallback() {
|
|
26
32
|
super.connectedCallback(), this.ensureId();
|
|
27
33
|
}
|
|
28
34
|
}
|
|
29
35
|
return n;
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
}, ro = /* @__PURE__ */ io(Jn), wt = globalThis.__nysIconRegistry ??= /* @__PURE__ */ new Map(), ut = globalThis.__nysIconWatchers ??= /* @__PURE__ */ new Map();
|
|
37
|
+
let le = null, Ze = null;
|
|
38
|
+
async function so() {
|
|
39
|
+
return le || (Ze ??= import("./nys-icon.library-BxwfG3ym.js").then(
|
|
40
|
+
(o) => le = o.default
|
|
41
|
+
), Ze);
|
|
33
42
|
}
|
|
34
|
-
function
|
|
35
|
-
if (globalThis.__nysIconDefaultRegistered ||
|
|
43
|
+
function ao() {
|
|
44
|
+
if (globalThis.__nysIconDefaultRegistered || wt.has("default")) {
|
|
36
45
|
globalThis.__nysIconDefaultRegistered = !0;
|
|
37
46
|
return;
|
|
38
47
|
}
|
|
39
|
-
globalThis.__nysIconDefaultRegistered = !0,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
type: "svg",
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} });
|
|
48
|
+
globalThis.__nysIconDefaultRegistered = !0, wt.set("default", {
|
|
49
|
+
resolver: async (o) => {
|
|
50
|
+
if (!o) return;
|
|
51
|
+
const s = (await so())[o];
|
|
52
|
+
return s ? { type: "svg", content: s } : void 0;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
47
55
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
56
|
+
function Jo(o, n) {
|
|
57
|
+
wt.set(o, n), ut.get(o)?.forEach((s) => s.redraw());
|
|
50
58
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
59
|
+
function Qo(o) {
|
|
60
|
+
wt.delete(o), ut.get(o)?.forEach((n) => n.redraw());
|
|
53
61
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
62
|
+
function lo(o) {
|
|
63
|
+
return ao(), wt.get(o);
|
|
56
64
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
65
|
+
function Je(o, n) {
|
|
66
|
+
ut.has(o) || ut.set(o, /* @__PURE__ */ new Set()), ut.get(o).add(n);
|
|
59
67
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
68
|
+
function Qe(o, n) {
|
|
69
|
+
ut.get(o)?.delete(n);
|
|
62
70
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */
|
|
72
|
+
function tn(o, n) {
|
|
73
|
+
(n == null || n > o.length) && (n = o.length);
|
|
74
|
+
for (var s = 0, c = Array(n); s < n; s++) c[s] = o[s];
|
|
75
|
+
return c;
|
|
67
76
|
}
|
|
68
|
-
function
|
|
69
|
-
if (Array.isArray(
|
|
77
|
+
function co(o) {
|
|
78
|
+
if (Array.isArray(o)) return o;
|
|
70
79
|
}
|
|
71
|
-
function
|
|
72
|
-
var s =
|
|
80
|
+
function uo(o, n) {
|
|
81
|
+
var s = o == null ? null : typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
|
|
73
82
|
if (s != null) {
|
|
74
|
-
var
|
|
83
|
+
var c, u, m, T, pt = [], N = !0, mt = !1;
|
|
75
84
|
try {
|
|
76
|
-
if (
|
|
77
|
-
} catch (
|
|
78
|
-
|
|
85
|
+
if (m = (s = s.call(o)).next, n !== 0) for (; !(N = (c = m.call(s)).done) && (pt.push(c.value), pt.length !== n); N = !0) ;
|
|
86
|
+
} catch (Gt) {
|
|
87
|
+
mt = !0, u = Gt;
|
|
79
88
|
} finally {
|
|
80
89
|
try {
|
|
81
|
-
if (!
|
|
90
|
+
if (!N && s.return != null && (T = s.return(), Object(T) !== T)) return;
|
|
82
91
|
} finally {
|
|
83
|
-
if (
|
|
92
|
+
if (mt) throw u;
|
|
84
93
|
}
|
|
85
94
|
}
|
|
86
|
-
return
|
|
95
|
+
return pt;
|
|
87
96
|
}
|
|
88
97
|
}
|
|
89
|
-
function
|
|
98
|
+
function fo() {
|
|
90
99
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
91
100
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
92
101
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
102
|
+
function po(o, n) {
|
|
103
|
+
return co(o) || uo(o, n) || mo(o, n) || fo();
|
|
95
104
|
}
|
|
96
|
-
function
|
|
97
|
-
if (
|
|
98
|
-
if (typeof
|
|
99
|
-
var s = {}.toString.call(
|
|
100
|
-
return s === "Object" &&
|
|
105
|
+
function mo(o, n) {
|
|
106
|
+
if (o) {
|
|
107
|
+
if (typeof o == "string") return tn(o, n);
|
|
108
|
+
var s = {}.toString.call(o).slice(8, -1);
|
|
109
|
+
return s === "Object" && o.constructor && (s = o.constructor.name), s === "Map" || s === "Set" ? Array.from(o) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? tn(o, n) : void 0;
|
|
101
110
|
}
|
|
102
111
|
}
|
|
103
|
-
|
|
104
|
-
|
|
112
|
+
const gn = Object.entries, en = Object.setPrototypeOf, ho = Object.isFrozen, _o = Object.getPrototypeOf, go = Object.getOwnPropertyDescriptor;
|
|
113
|
+
let b = Object.freeze, S = Object.seal, ct = Object.create, yn = typeof Reflect < "u" && Reflect, he = yn.apply, _e = yn.construct;
|
|
114
|
+
b || (b = function(n) {
|
|
105
115
|
return n;
|
|
106
116
|
});
|
|
107
|
-
|
|
117
|
+
S || (S = function(n) {
|
|
108
118
|
return n;
|
|
109
119
|
});
|
|
110
|
-
|
|
111
|
-
for (var
|
|
120
|
+
he || (he = function(n, s) {
|
|
121
|
+
for (var c = arguments.length, u = new Array(c > 2 ? c - 2 : 0), m = 2; m < c; m++)
|
|
122
|
+
u[m - 2] = arguments[m];
|
|
112
123
|
return n.apply(s, u);
|
|
113
124
|
});
|
|
114
|
-
|
|
115
|
-
for (var s = arguments.length,
|
|
116
|
-
|
|
125
|
+
_e || (_e = function(n) {
|
|
126
|
+
for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
|
|
127
|
+
c[u - 1] = arguments[u];
|
|
128
|
+
return new n(...c);
|
|
117
129
|
});
|
|
118
|
-
|
|
119
|
-
function
|
|
130
|
+
const Z = A(Array.prototype.forEach), yo = A(Array.prototype.lastIndexOf), nn = A(Array.prototype.pop), Tt = A(Array.prototype.push), To = A(Array.prototype.splice), ft = Array.isArray, bt = A(String.prototype.toLowerCase), ce = A(String.prototype.toString), on = A(String.prototype.match), Et = A(String.prototype.replace), rn = A(String.prototype.indexOf), Eo = A(String.prototype.trim), Ao = A(Number.prototype.toString), bo = A(Boolean.prototype.toString), sn = typeof BigInt > "u" ? null : A(BigInt.prototype.toString), an = typeof Symbol > "u" ? null : A(Symbol.prototype.toString), D = A(Object.prototype.hasOwnProperty), At = A(Object.prototype.toString), w = A(RegExp.prototype.test), K = So(TypeError);
|
|
131
|
+
function A(o) {
|
|
120
132
|
return function(n) {
|
|
121
133
|
n instanceof RegExp && (n.lastIndex = 0);
|
|
122
|
-
for (var s = arguments.length,
|
|
123
|
-
|
|
134
|
+
for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
|
|
135
|
+
c[u - 1] = arguments[u];
|
|
136
|
+
return he(o, n, c);
|
|
124
137
|
};
|
|
125
138
|
}
|
|
126
|
-
function
|
|
139
|
+
function So(o) {
|
|
127
140
|
return function() {
|
|
128
|
-
for (var n = arguments.length, s = new Array(n),
|
|
129
|
-
|
|
141
|
+
for (var n = arguments.length, s = new Array(n), c = 0; c < n; c++)
|
|
142
|
+
s[c] = arguments[c];
|
|
143
|
+
return _e(o, s);
|
|
130
144
|
};
|
|
131
145
|
}
|
|
132
|
-
function
|
|
133
|
-
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
146
|
+
function p(o, n) {
|
|
147
|
+
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : bt;
|
|
148
|
+
if (en && en(o, null), !ft(n))
|
|
149
|
+
return o;
|
|
150
|
+
let c = n.length;
|
|
151
|
+
for (; c--; ) {
|
|
152
|
+
let u = n[c];
|
|
138
153
|
if (typeof u == "string") {
|
|
139
|
-
const
|
|
140
|
-
|
|
154
|
+
const m = s(u);
|
|
155
|
+
m !== u && (ho(n) || (n[c] = m), u = m);
|
|
141
156
|
}
|
|
142
|
-
|
|
157
|
+
o[u] = !0;
|
|
143
158
|
}
|
|
144
|
-
return
|
|
159
|
+
return o;
|
|
145
160
|
}
|
|
146
|
-
function
|
|
147
|
-
for (let n = 0; n <
|
|
148
|
-
|
|
161
|
+
function wo(o) {
|
|
162
|
+
for (let n = 0; n < o.length; n++)
|
|
163
|
+
D(o, n) || (o[n] = null);
|
|
164
|
+
return o;
|
|
149
165
|
}
|
|
150
|
-
function
|
|
151
|
-
const n =
|
|
152
|
-
for (const
|
|
153
|
-
var s =
|
|
154
|
-
const u = s[0],
|
|
155
|
-
|
|
166
|
+
function C(o) {
|
|
167
|
+
const n = ct(null);
|
|
168
|
+
for (const c of gn(o)) {
|
|
169
|
+
var s = po(c, 2);
|
|
170
|
+
const u = s[0], m = s[1];
|
|
171
|
+
D(o, u) && (ft(m) ? n[u] = wo(m) : m && typeof m == "object" && m.constructor === Object ? n[u] = C(m) : n[u] = m);
|
|
156
172
|
}
|
|
157
173
|
return n;
|
|
158
174
|
}
|
|
159
|
-
function
|
|
160
|
-
switch (typeof
|
|
175
|
+
function Oo(o) {
|
|
176
|
+
switch (typeof o) {
|
|
161
177
|
case "string":
|
|
162
|
-
return
|
|
178
|
+
return o;
|
|
163
179
|
case "number":
|
|
164
|
-
return
|
|
180
|
+
return Ao(o);
|
|
165
181
|
case "boolean":
|
|
166
|
-
return
|
|
182
|
+
return bo(o);
|
|
167
183
|
case "bigint":
|
|
168
|
-
return
|
|
184
|
+
return sn ? sn(o) : "0";
|
|
169
185
|
case "symbol":
|
|
170
|
-
return an ? an(
|
|
186
|
+
return an ? an(o) : "Symbol()";
|
|
171
187
|
case "undefined":
|
|
172
|
-
return At(
|
|
188
|
+
return At(o);
|
|
173
189
|
case "function":
|
|
174
190
|
case "object": {
|
|
175
|
-
if (
|
|
176
|
-
|
|
191
|
+
if (o === null)
|
|
192
|
+
return At(o);
|
|
193
|
+
const n = o, s = M(n, "toString");
|
|
177
194
|
if (typeof s == "function") {
|
|
178
|
-
const
|
|
179
|
-
return typeof
|
|
195
|
+
const c = s(n);
|
|
196
|
+
return typeof c == "string" ? c : At(c);
|
|
180
197
|
}
|
|
181
|
-
return At(
|
|
198
|
+
return At(o);
|
|
182
199
|
}
|
|
183
200
|
default:
|
|
184
|
-
return At(
|
|
201
|
+
return At(o);
|
|
185
202
|
}
|
|
186
203
|
}
|
|
187
|
-
function M(
|
|
188
|
-
for (;
|
|
189
|
-
const
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
|
|
204
|
+
function M(o, n) {
|
|
205
|
+
for (; o !== null; ) {
|
|
206
|
+
const c = go(o, n);
|
|
207
|
+
if (c) {
|
|
208
|
+
if (c.get)
|
|
209
|
+
return A(c.get);
|
|
210
|
+
if (typeof c.value == "function")
|
|
211
|
+
return A(c.value);
|
|
193
212
|
}
|
|
194
|
-
|
|
213
|
+
o = _o(o);
|
|
195
214
|
}
|
|
196
215
|
function s() {
|
|
197
216
|
return null;
|
|
198
217
|
}
|
|
199
218
|
return s;
|
|
200
219
|
}
|
|
201
|
-
function
|
|
220
|
+
function Ro(o) {
|
|
202
221
|
try {
|
|
203
|
-
return
|
|
222
|
+
return w(o, ""), !0;
|
|
204
223
|
} catch {
|
|
205
224
|
return !1;
|
|
206
225
|
}
|
|
207
226
|
}
|
|
208
|
-
var
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
"aside",
|
|
216
|
-
"audio",
|
|
217
|
-
"b",
|
|
218
|
-
"bdi",
|
|
219
|
-
"bdo",
|
|
220
|
-
"big",
|
|
221
|
-
"blink",
|
|
222
|
-
"blockquote",
|
|
223
|
-
"body",
|
|
224
|
-
"br",
|
|
225
|
-
"button",
|
|
226
|
-
"canvas",
|
|
227
|
-
"caption",
|
|
228
|
-
"center",
|
|
229
|
-
"cite",
|
|
230
|
-
"code",
|
|
231
|
-
"col",
|
|
232
|
-
"colgroup",
|
|
233
|
-
"content",
|
|
234
|
-
"data",
|
|
235
|
-
"datalist",
|
|
236
|
-
"dd",
|
|
237
|
-
"decorator",
|
|
238
|
-
"del",
|
|
239
|
-
"details",
|
|
240
|
-
"dfn",
|
|
241
|
-
"dialog",
|
|
242
|
-
"dir",
|
|
243
|
-
"div",
|
|
244
|
-
"dl",
|
|
245
|
-
"dt",
|
|
246
|
-
"element",
|
|
247
|
-
"em",
|
|
248
|
-
"fieldset",
|
|
249
|
-
"figcaption",
|
|
250
|
-
"figure",
|
|
251
|
-
"font",
|
|
252
|
-
"footer",
|
|
253
|
-
"form",
|
|
254
|
-
"h1",
|
|
255
|
-
"h2",
|
|
256
|
-
"h3",
|
|
257
|
-
"h4",
|
|
258
|
-
"h5",
|
|
259
|
-
"h6",
|
|
260
|
-
"head",
|
|
261
|
-
"header",
|
|
262
|
-
"hgroup",
|
|
263
|
-
"hr",
|
|
264
|
-
"html",
|
|
265
|
-
"i",
|
|
266
|
-
"img",
|
|
267
|
-
"input",
|
|
268
|
-
"ins",
|
|
269
|
-
"kbd",
|
|
270
|
-
"label",
|
|
271
|
-
"legend",
|
|
272
|
-
"li",
|
|
273
|
-
"main",
|
|
274
|
-
"map",
|
|
275
|
-
"mark",
|
|
276
|
-
"marquee",
|
|
277
|
-
"menu",
|
|
278
|
-
"menuitem",
|
|
279
|
-
"meter",
|
|
280
|
-
"nav",
|
|
281
|
-
"nobr",
|
|
282
|
-
"ol",
|
|
283
|
-
"optgroup",
|
|
284
|
-
"option",
|
|
285
|
-
"output",
|
|
286
|
-
"p",
|
|
287
|
-
"picture",
|
|
288
|
-
"pre",
|
|
289
|
-
"progress",
|
|
290
|
-
"q",
|
|
291
|
-
"rp",
|
|
292
|
-
"rt",
|
|
293
|
-
"ruby",
|
|
294
|
-
"s",
|
|
295
|
-
"samp",
|
|
296
|
-
"search",
|
|
297
|
-
"section",
|
|
298
|
-
"select",
|
|
299
|
-
"shadow",
|
|
300
|
-
"slot",
|
|
301
|
-
"small",
|
|
302
|
-
"source",
|
|
303
|
-
"spacer",
|
|
304
|
-
"span",
|
|
305
|
-
"strike",
|
|
306
|
-
"strong",
|
|
307
|
-
"style",
|
|
308
|
-
"sub",
|
|
309
|
-
"summary",
|
|
310
|
-
"sup",
|
|
311
|
-
"table",
|
|
312
|
-
"tbody",
|
|
313
|
-
"td",
|
|
314
|
-
"template",
|
|
315
|
-
"textarea",
|
|
316
|
-
"tfoot",
|
|
317
|
-
"th",
|
|
318
|
-
"thead",
|
|
319
|
-
"time",
|
|
320
|
-
"tr",
|
|
321
|
-
"track",
|
|
322
|
-
"tt",
|
|
323
|
-
"u",
|
|
324
|
-
"ul",
|
|
325
|
-
"var",
|
|
326
|
-
"video",
|
|
327
|
-
"wbr"
|
|
328
|
-
]), ce = A([
|
|
329
|
-
"svg",
|
|
330
|
-
"a",
|
|
331
|
-
"altglyph",
|
|
332
|
-
"altglyphdef",
|
|
333
|
-
"altglyphitem",
|
|
334
|
-
"animatecolor",
|
|
335
|
-
"animatemotion",
|
|
336
|
-
"animatetransform",
|
|
337
|
-
"circle",
|
|
338
|
-
"clippath",
|
|
339
|
-
"defs",
|
|
340
|
-
"desc",
|
|
341
|
-
"ellipse",
|
|
342
|
-
"enterkeyhint",
|
|
343
|
-
"exportparts",
|
|
344
|
-
"filter",
|
|
345
|
-
"font",
|
|
346
|
-
"g",
|
|
347
|
-
"glyph",
|
|
348
|
-
"glyphref",
|
|
349
|
-
"hkern",
|
|
350
|
-
"image",
|
|
351
|
-
"inputmode",
|
|
352
|
-
"line",
|
|
353
|
-
"lineargradient",
|
|
354
|
-
"marker",
|
|
355
|
-
"mask",
|
|
356
|
-
"metadata",
|
|
357
|
-
"mpath",
|
|
358
|
-
"part",
|
|
359
|
-
"path",
|
|
360
|
-
"pattern",
|
|
361
|
-
"polygon",
|
|
362
|
-
"polyline",
|
|
363
|
-
"radialgradient",
|
|
364
|
-
"rect",
|
|
365
|
-
"stop",
|
|
366
|
-
"style",
|
|
367
|
-
"switch",
|
|
368
|
-
"symbol",
|
|
369
|
-
"text",
|
|
370
|
-
"textpath",
|
|
371
|
-
"title",
|
|
372
|
-
"tref",
|
|
373
|
-
"tspan",
|
|
374
|
-
"view",
|
|
375
|
-
"vkern"
|
|
376
|
-
]), ue = A([
|
|
377
|
-
"feBlend",
|
|
378
|
-
"feColorMatrix",
|
|
379
|
-
"feComponentTransfer",
|
|
380
|
-
"feComposite",
|
|
381
|
-
"feConvolveMatrix",
|
|
382
|
-
"feDiffuseLighting",
|
|
383
|
-
"feDisplacementMap",
|
|
384
|
-
"feDistantLight",
|
|
385
|
-
"feDropShadow",
|
|
386
|
-
"feFlood",
|
|
387
|
-
"feFuncA",
|
|
388
|
-
"feFuncB",
|
|
389
|
-
"feFuncG",
|
|
390
|
-
"feFuncR",
|
|
391
|
-
"feGaussianBlur",
|
|
392
|
-
"feImage",
|
|
393
|
-
"feMerge",
|
|
394
|
-
"feMergeNode",
|
|
395
|
-
"feMorphology",
|
|
396
|
-
"feOffset",
|
|
397
|
-
"fePointLight",
|
|
398
|
-
"feSpecularLighting",
|
|
399
|
-
"feSpotLight",
|
|
400
|
-
"feTile",
|
|
401
|
-
"feTurbulence"
|
|
402
|
-
]), Or = A([
|
|
403
|
-
"animate",
|
|
404
|
-
"color-profile",
|
|
405
|
-
"cursor",
|
|
406
|
-
"discard",
|
|
407
|
-
"font-face",
|
|
408
|
-
"font-face-format",
|
|
409
|
-
"font-face-name",
|
|
410
|
-
"font-face-src",
|
|
411
|
-
"font-face-uri",
|
|
412
|
-
"foreignobject",
|
|
413
|
-
"hatch",
|
|
414
|
-
"hatchpath",
|
|
415
|
-
"mesh",
|
|
416
|
-
"meshgradient",
|
|
417
|
-
"meshpatch",
|
|
418
|
-
"meshrow",
|
|
419
|
-
"missing-glyph",
|
|
420
|
-
"script",
|
|
421
|
-
"set",
|
|
422
|
-
"solidcolor",
|
|
423
|
-
"unknown",
|
|
424
|
-
"use"
|
|
425
|
-
]), fe = A([
|
|
426
|
-
"math",
|
|
427
|
-
"menclose",
|
|
428
|
-
"merror",
|
|
429
|
-
"mfenced",
|
|
430
|
-
"mfrac",
|
|
431
|
-
"mglyph",
|
|
432
|
-
"mi",
|
|
433
|
-
"mlabeledtr",
|
|
434
|
-
"mmultiscripts",
|
|
435
|
-
"mn",
|
|
436
|
-
"mo",
|
|
437
|
-
"mover",
|
|
438
|
-
"mpadded",
|
|
439
|
-
"mphantom",
|
|
440
|
-
"mroot",
|
|
441
|
-
"mrow",
|
|
442
|
-
"ms",
|
|
443
|
-
"mspace",
|
|
444
|
-
"msqrt",
|
|
445
|
-
"mstyle",
|
|
446
|
-
"msub",
|
|
447
|
-
"msup",
|
|
448
|
-
"msubsup",
|
|
449
|
-
"mtable",
|
|
450
|
-
"mtd",
|
|
451
|
-
"mtext",
|
|
452
|
-
"mtr",
|
|
453
|
-
"munder",
|
|
454
|
-
"munderover",
|
|
455
|
-
"mprescripts"
|
|
456
|
-
]), Rr = A([
|
|
457
|
-
"maction",
|
|
458
|
-
"maligngroup",
|
|
459
|
-
"malignmark",
|
|
460
|
-
"mlongdiv",
|
|
461
|
-
"mscarries",
|
|
462
|
-
"mscarry",
|
|
463
|
-
"msgroup",
|
|
464
|
-
"mstack",
|
|
465
|
-
"msline",
|
|
466
|
-
"msrow",
|
|
467
|
-
"semantics",
|
|
468
|
-
"annotation",
|
|
469
|
-
"annotation-xml",
|
|
470
|
-
"mprescripts",
|
|
471
|
-
"none"
|
|
472
|
-
]), ln = A(["#text"]), cn = A([
|
|
473
|
-
"accept",
|
|
474
|
-
"action",
|
|
475
|
-
"align",
|
|
476
|
-
"alt",
|
|
477
|
-
"autocapitalize",
|
|
478
|
-
"autocomplete",
|
|
479
|
-
"autopictureinpicture",
|
|
480
|
-
"autoplay",
|
|
481
|
-
"background",
|
|
482
|
-
"bgcolor",
|
|
483
|
-
"border",
|
|
484
|
-
"capture",
|
|
485
|
-
"cellpadding",
|
|
486
|
-
"cellspacing",
|
|
487
|
-
"checked",
|
|
488
|
-
"cite",
|
|
489
|
-
"class",
|
|
490
|
-
"clear",
|
|
491
|
-
"color",
|
|
492
|
-
"cols",
|
|
493
|
-
"colspan",
|
|
494
|
-
"command",
|
|
495
|
-
"commandfor",
|
|
496
|
-
"controls",
|
|
497
|
-
"controlslist",
|
|
498
|
-
"coords",
|
|
499
|
-
"crossorigin",
|
|
500
|
-
"datetime",
|
|
501
|
-
"decoding",
|
|
502
|
-
"default",
|
|
503
|
-
"dir",
|
|
504
|
-
"disabled",
|
|
505
|
-
"disablepictureinpicture",
|
|
506
|
-
"disableremoteplayback",
|
|
507
|
-
"download",
|
|
508
|
-
"draggable",
|
|
509
|
-
"enctype",
|
|
510
|
-
"enterkeyhint",
|
|
511
|
-
"exportparts",
|
|
512
|
-
"face",
|
|
513
|
-
"for",
|
|
514
|
-
"headers",
|
|
515
|
-
"height",
|
|
516
|
-
"hidden",
|
|
517
|
-
"high",
|
|
518
|
-
"href",
|
|
519
|
-
"hreflang",
|
|
520
|
-
"id",
|
|
521
|
-
"inert",
|
|
522
|
-
"inputmode",
|
|
523
|
-
"integrity",
|
|
524
|
-
"ismap",
|
|
525
|
-
"kind",
|
|
526
|
-
"label",
|
|
527
|
-
"lang",
|
|
528
|
-
"list",
|
|
529
|
-
"loading",
|
|
530
|
-
"loop",
|
|
531
|
-
"low",
|
|
532
|
-
"max",
|
|
533
|
-
"maxlength",
|
|
534
|
-
"media",
|
|
535
|
-
"method",
|
|
536
|
-
"min",
|
|
537
|
-
"minlength",
|
|
538
|
-
"multiple",
|
|
539
|
-
"muted",
|
|
540
|
-
"name",
|
|
541
|
-
"nonce",
|
|
542
|
-
"noshade",
|
|
543
|
-
"novalidate",
|
|
544
|
-
"nowrap",
|
|
545
|
-
"open",
|
|
546
|
-
"optimum",
|
|
547
|
-
"part",
|
|
548
|
-
"pattern",
|
|
549
|
-
"placeholder",
|
|
550
|
-
"playsinline",
|
|
551
|
-
"popover",
|
|
552
|
-
"popovertarget",
|
|
553
|
-
"popovertargetaction",
|
|
554
|
-
"poster",
|
|
555
|
-
"preload",
|
|
556
|
-
"pubdate",
|
|
557
|
-
"radiogroup",
|
|
558
|
-
"readonly",
|
|
559
|
-
"rel",
|
|
560
|
-
"required",
|
|
561
|
-
"rev",
|
|
562
|
-
"reversed",
|
|
563
|
-
"role",
|
|
564
|
-
"rows",
|
|
565
|
-
"rowspan",
|
|
566
|
-
"spellcheck",
|
|
567
|
-
"scope",
|
|
568
|
-
"selected",
|
|
569
|
-
"shape",
|
|
570
|
-
"size",
|
|
571
|
-
"sizes",
|
|
572
|
-
"slot",
|
|
573
|
-
"span",
|
|
574
|
-
"srclang",
|
|
575
|
-
"start",
|
|
576
|
-
"src",
|
|
577
|
-
"srcset",
|
|
578
|
-
"step",
|
|
579
|
-
"style",
|
|
580
|
-
"summary",
|
|
581
|
-
"tabindex",
|
|
582
|
-
"title",
|
|
583
|
-
"translate",
|
|
584
|
-
"type",
|
|
585
|
-
"usemap",
|
|
586
|
-
"valign",
|
|
587
|
-
"value",
|
|
588
|
-
"width",
|
|
589
|
-
"wrap",
|
|
590
|
-
"xmlns"
|
|
591
|
-
]), pe = A([
|
|
592
|
-
"accent-height",
|
|
593
|
-
"accumulate",
|
|
594
|
-
"additive",
|
|
595
|
-
"alignment-baseline",
|
|
596
|
-
"amplitude",
|
|
597
|
-
"ascent",
|
|
598
|
-
"attributename",
|
|
599
|
-
"attributetype",
|
|
600
|
-
"azimuth",
|
|
601
|
-
"basefrequency",
|
|
602
|
-
"baseline-shift",
|
|
603
|
-
"begin",
|
|
604
|
-
"bias",
|
|
605
|
-
"by",
|
|
606
|
-
"class",
|
|
607
|
-
"clip",
|
|
608
|
-
"clippathunits",
|
|
609
|
-
"clip-path",
|
|
610
|
-
"clip-rule",
|
|
611
|
-
"color",
|
|
612
|
-
"color-interpolation",
|
|
613
|
-
"color-interpolation-filters",
|
|
614
|
-
"color-profile",
|
|
615
|
-
"color-rendering",
|
|
616
|
-
"cx",
|
|
617
|
-
"cy",
|
|
618
|
-
"d",
|
|
619
|
-
"dx",
|
|
620
|
-
"dy",
|
|
621
|
-
"diffuseconstant",
|
|
622
|
-
"direction",
|
|
623
|
-
"display",
|
|
624
|
-
"divisor",
|
|
625
|
-
"dominant-baseline",
|
|
626
|
-
"dur",
|
|
627
|
-
"edgemode",
|
|
628
|
-
"elevation",
|
|
629
|
-
"end",
|
|
630
|
-
"exponent",
|
|
631
|
-
"fill",
|
|
632
|
-
"fill-opacity",
|
|
633
|
-
"fill-rule",
|
|
634
|
-
"filter",
|
|
635
|
-
"filterunits",
|
|
636
|
-
"flood-color",
|
|
637
|
-
"flood-opacity",
|
|
638
|
-
"font-family",
|
|
639
|
-
"font-size",
|
|
640
|
-
"font-size-adjust",
|
|
641
|
-
"font-stretch",
|
|
642
|
-
"font-style",
|
|
643
|
-
"font-variant",
|
|
644
|
-
"font-weight",
|
|
645
|
-
"fx",
|
|
646
|
-
"fy",
|
|
647
|
-
"g1",
|
|
648
|
-
"g2",
|
|
649
|
-
"glyph-name",
|
|
650
|
-
"glyphref",
|
|
651
|
-
"gradientunits",
|
|
652
|
-
"gradienttransform",
|
|
653
|
-
"height",
|
|
654
|
-
"href",
|
|
655
|
-
"id",
|
|
656
|
-
"image-rendering",
|
|
657
|
-
"in",
|
|
658
|
-
"in2",
|
|
659
|
-
"intercept",
|
|
660
|
-
"k",
|
|
661
|
-
"k1",
|
|
662
|
-
"k2",
|
|
663
|
-
"k3",
|
|
664
|
-
"k4",
|
|
665
|
-
"kerning",
|
|
666
|
-
"keypoints",
|
|
667
|
-
"keysplines",
|
|
668
|
-
"keytimes",
|
|
669
|
-
"lang",
|
|
670
|
-
"lengthadjust",
|
|
671
|
-
"letter-spacing",
|
|
672
|
-
"kernelmatrix",
|
|
673
|
-
"kernelunitlength",
|
|
674
|
-
"lighting-color",
|
|
675
|
-
"local",
|
|
676
|
-
"marker-end",
|
|
677
|
-
"marker-mid",
|
|
678
|
-
"marker-start",
|
|
679
|
-
"markerheight",
|
|
680
|
-
"markerunits",
|
|
681
|
-
"markerwidth",
|
|
682
|
-
"maskcontentunits",
|
|
683
|
-
"maskunits",
|
|
684
|
-
"max",
|
|
685
|
-
"mask",
|
|
686
|
-
"mask-type",
|
|
687
|
-
"media",
|
|
688
|
-
"method",
|
|
689
|
-
"mode",
|
|
690
|
-
"min",
|
|
691
|
-
"name",
|
|
692
|
-
"numoctaves",
|
|
693
|
-
"offset",
|
|
694
|
-
"operator",
|
|
695
|
-
"opacity",
|
|
696
|
-
"order",
|
|
697
|
-
"orient",
|
|
698
|
-
"orientation",
|
|
699
|
-
"origin",
|
|
700
|
-
"overflow",
|
|
701
|
-
"paint-order",
|
|
702
|
-
"path",
|
|
703
|
-
"pathlength",
|
|
704
|
-
"patterncontentunits",
|
|
705
|
-
"patterntransform",
|
|
706
|
-
"patternunits",
|
|
707
|
-
"pointer-events",
|
|
708
|
-
"points",
|
|
709
|
-
"preservealpha",
|
|
710
|
-
"preserveaspectratio",
|
|
711
|
-
"primitiveunits",
|
|
712
|
-
"r",
|
|
713
|
-
"rx",
|
|
714
|
-
"ry",
|
|
715
|
-
"radius",
|
|
716
|
-
"refx",
|
|
717
|
-
"refy",
|
|
718
|
-
"repeatcount",
|
|
719
|
-
"repeatdur",
|
|
720
|
-
"restart",
|
|
721
|
-
"result",
|
|
722
|
-
"rotate",
|
|
723
|
-
"scale",
|
|
724
|
-
"seed",
|
|
725
|
-
"shape-rendering",
|
|
726
|
-
"slope",
|
|
727
|
-
"specularconstant",
|
|
728
|
-
"specularexponent",
|
|
729
|
-
"spreadmethod",
|
|
730
|
-
"startoffset",
|
|
731
|
-
"stddeviation",
|
|
732
|
-
"stitchtiles",
|
|
733
|
-
"stop-color",
|
|
734
|
-
"stop-opacity",
|
|
735
|
-
"stroke-dasharray",
|
|
736
|
-
"stroke-dashoffset",
|
|
737
|
-
"stroke-linecap",
|
|
738
|
-
"stroke-linejoin",
|
|
739
|
-
"stroke-miterlimit",
|
|
740
|
-
"stroke-opacity",
|
|
741
|
-
"stroke",
|
|
742
|
-
"stroke-width",
|
|
743
|
-
"style",
|
|
744
|
-
"surfacescale",
|
|
745
|
-
"systemlanguage",
|
|
746
|
-
"tabindex",
|
|
747
|
-
"tablevalues",
|
|
748
|
-
"targetx",
|
|
749
|
-
"targety",
|
|
750
|
-
"transform",
|
|
751
|
-
"transform-origin",
|
|
752
|
-
"text-anchor",
|
|
753
|
-
"text-decoration",
|
|
754
|
-
"text-orientation",
|
|
755
|
-
"text-rendering",
|
|
756
|
-
"textlength",
|
|
757
|
-
"type",
|
|
758
|
-
"u1",
|
|
759
|
-
"u2",
|
|
760
|
-
"unicode",
|
|
761
|
-
"values",
|
|
762
|
-
"vector-effect",
|
|
763
|
-
"viewbox",
|
|
764
|
-
"visibility",
|
|
765
|
-
"version",
|
|
766
|
-
"vert-adv-y",
|
|
767
|
-
"vert-origin-x",
|
|
768
|
-
"vert-origin-y",
|
|
769
|
-
"width",
|
|
770
|
-
"word-spacing",
|
|
771
|
-
"wrap",
|
|
772
|
-
"writing-mode",
|
|
773
|
-
"xchannelselector",
|
|
774
|
-
"ychannelselector",
|
|
775
|
-
"x",
|
|
776
|
-
"x1",
|
|
777
|
-
"x2",
|
|
778
|
-
"xmlns",
|
|
779
|
-
"y",
|
|
780
|
-
"y1",
|
|
781
|
-
"y2",
|
|
782
|
-
"z",
|
|
783
|
-
"zoomandpan"
|
|
784
|
-
]), un = A([
|
|
785
|
-
"accent",
|
|
786
|
-
"accentunder",
|
|
787
|
-
"align",
|
|
788
|
-
"bevelled",
|
|
789
|
-
"close",
|
|
790
|
-
"columnalign",
|
|
791
|
-
"columnlines",
|
|
792
|
-
"columnspacing",
|
|
793
|
-
"columnspan",
|
|
794
|
-
"denomalign",
|
|
795
|
-
"depth",
|
|
796
|
-
"dir",
|
|
797
|
-
"display",
|
|
798
|
-
"displaystyle",
|
|
799
|
-
"encoding",
|
|
800
|
-
"fence",
|
|
801
|
-
"frame",
|
|
802
|
-
"height",
|
|
803
|
-
"href",
|
|
804
|
-
"id",
|
|
805
|
-
"largeop",
|
|
806
|
-
"length",
|
|
807
|
-
"linethickness",
|
|
808
|
-
"lquote",
|
|
809
|
-
"lspace",
|
|
810
|
-
"mathbackground",
|
|
811
|
-
"mathcolor",
|
|
812
|
-
"mathsize",
|
|
813
|
-
"mathvariant",
|
|
814
|
-
"maxsize",
|
|
815
|
-
"minsize",
|
|
816
|
-
"movablelimits",
|
|
817
|
-
"notation",
|
|
818
|
-
"numalign",
|
|
819
|
-
"open",
|
|
820
|
-
"rowalign",
|
|
821
|
-
"rowlines",
|
|
822
|
-
"rowspacing",
|
|
823
|
-
"rowspan",
|
|
824
|
-
"rspace",
|
|
825
|
-
"rquote",
|
|
826
|
-
"scriptlevel",
|
|
827
|
-
"scriptminsize",
|
|
828
|
-
"scriptsizemultiplier",
|
|
829
|
-
"selection",
|
|
830
|
-
"separator",
|
|
831
|
-
"separators",
|
|
832
|
-
"stretchy",
|
|
833
|
-
"subscriptshift",
|
|
834
|
-
"supscriptshift",
|
|
835
|
-
"symmetric",
|
|
836
|
-
"voffset",
|
|
837
|
-
"width",
|
|
838
|
-
"xmlns"
|
|
839
|
-
]), Ht = A([
|
|
840
|
-
"xlink:href",
|
|
841
|
-
"xml:id",
|
|
842
|
-
"xlink:title",
|
|
843
|
-
"xml:space",
|
|
844
|
-
"xmlns:xlink"
|
|
845
|
-
]), Lr = E(/{{[\w\W]*|^[\w\W]*}}/g), Ir = E(/<%[\w\W]*|^[\w\W]*%>/g), Dr = E(/\${[\w\W]*/g), Nr = E(/^data-[\-\w.\u00B7-\uFFFF]+$/), Cr = E(/^aria-[\-\w]+$/), fn = E(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Mr = E(/^(?:\w+script|data):/i), xr = E(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Pr = E(/^html$/i), zr = E(/^[a-z][.\w]*(-[.\w]+)+$/i), pn = E(/<[/\w!]/g), mn = E(/<[/\w]/g), kr = E(/<\/no(script|embed|frames)/i), Ur = E(/\/>/i), D = {
|
|
227
|
+
const ln = b(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ue = b(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), fe = b(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Lo = b(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), pe = b(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Io = b(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), cn = b(["#text"]), un = b(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), me = b(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "pointer-events", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), fn = b(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Ht = b(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Do = S(/{{[\w\W]*|^[\w\W]*}}/g), No = S(/<%[\w\W]*|^[\w\W]*%>/g), vo = S(/\${[\w\W]*/g), Co = S(/^data-[\-\w.\u00B7-\uFFFF]+$/), Mo = S(/^aria-[\-\w]+$/), pn = S(
|
|
228
|
+
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
229
|
+
// eslint-disable-line no-useless-escape
|
|
230
|
+
), xo = S(/^(?:\w+script|data):/i), Po = S(
|
|
231
|
+
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
232
|
+
// eslint-disable-line no-control-regex
|
|
233
|
+
), zo = S(/^html$/i), ko = S(/^[a-z][.\w]*(-[.\w]+)+$/i), mn = S(/<[/\w!]/g), dn = S(/<[/\w]/g), Uo = S(/<\/no(script|embed|frames)/i), Fo = S(/\/>/i), v = {
|
|
846
234
|
element: 1,
|
|
847
235
|
attribute: 2,
|
|
848
236
|
text: 3,
|
|
849
237
|
cdataSection: 4,
|
|
850
238
|
entityReference: 5,
|
|
239
|
+
// Deprecated
|
|
851
240
|
entityNode: 6,
|
|
241
|
+
// Deprecated
|
|
852
242
|
processingInstruction: 7,
|
|
853
243
|
comment: 8,
|
|
854
244
|
document: 9,
|
|
855
245
|
documentType: 10,
|
|
856
246
|
documentFragment: 11,
|
|
857
247
|
notation: 12
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
"plaintext",
|
|
866
|
-
"noscript"
|
|
867
|
-
], Fr = A(d({}, yn)), Hr = (function() {
|
|
868
|
-
const r = {};
|
|
869
|
-
return J(yn, (n) => {
|
|
870
|
-
r[n] = E(new RegExp("</" + n + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
871
|
-
}), A(r);
|
|
872
|
-
})(), Gr = function() {
|
|
248
|
+
// Deprecated
|
|
249
|
+
}, Tn = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"], Ho = b(p({}, Tn)), Go = (function() {
|
|
250
|
+
const o = {};
|
|
251
|
+
return Z(Tn, (n) => {
|
|
252
|
+
o[n] = S(new RegExp("</" + n + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
253
|
+
}), b(o);
|
|
254
|
+
})(), Wo = function() {
|
|
873
255
|
return typeof window > "u" ? null : window;
|
|
874
|
-
},
|
|
875
|
-
if (typeof n != "object" || typeof n.createPolicy != "function")
|
|
876
|
-
|
|
256
|
+
}, Bo = function(n, s) {
|
|
257
|
+
if (typeof n != "object" || typeof n.createPolicy != "function")
|
|
258
|
+
return null;
|
|
259
|
+
let c = null;
|
|
877
260
|
const u = "data-tt-policy-suffix";
|
|
878
|
-
s && s.hasAttribute(u) && (
|
|
879
|
-
const
|
|
261
|
+
s && s.hasAttribute(u) && (c = s.getAttribute(u));
|
|
262
|
+
const m = "dompurify" + (c ? "#" + c : "");
|
|
880
263
|
try {
|
|
881
|
-
return n.createPolicy(
|
|
882
|
-
createHTML(
|
|
883
|
-
return
|
|
264
|
+
return n.createPolicy(m, {
|
|
265
|
+
createHTML(T) {
|
|
266
|
+
return T;
|
|
884
267
|
},
|
|
885
|
-
createScriptURL(
|
|
886
|
-
return
|
|
268
|
+
createScriptURL(T) {
|
|
269
|
+
return T;
|
|
887
270
|
}
|
|
888
271
|
});
|
|
889
272
|
} catch {
|
|
890
|
-
return console.warn("TrustedTypes policy " +
|
|
273
|
+
return console.warn("TrustedTypes policy " + m + " could not be created."), null;
|
|
891
274
|
}
|
|
892
|
-
},
|
|
275
|
+
}, hn = function() {
|
|
893
276
|
return {
|
|
894
277
|
afterSanitizeAttributes: [],
|
|
895
278
|
afterSanitizeElements: [],
|
|
@@ -901,70 +284,60 @@ var sn = A([
|
|
|
901
284
|
uponSanitizeElement: [],
|
|
902
285
|
uponSanitizeShadowNode: []
|
|
903
286
|
};
|
|
904
|
-
},
|
|
905
|
-
return
|
|
906
|
-
},
|
|
907
|
-
const u =
|
|
908
|
-
return u && typeof u == "object" ?
|
|
287
|
+
}, G = function(n, s, c, u) {
|
|
288
|
+
return D(n, s) && ft(n[s]) ? p(u.base ? C(u.base) : {}, n[s], u.transform) : c;
|
|
289
|
+
}, de = function(n, s, c) {
|
|
290
|
+
const u = D(n, s) ? n[s] : void 0;
|
|
291
|
+
return u && typeof u == "object" ? C(u) : c();
|
|
909
292
|
};
|
|
910
|
-
function
|
|
911
|
-
let
|
|
912
|
-
const n = (
|
|
913
|
-
if (n.version = "3.4.14", n.removed = [], !
|
|
293
|
+
function En() {
|
|
294
|
+
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Wo();
|
|
295
|
+
const n = (r) => En(r);
|
|
296
|
+
if (n.version = "3.4.14", n.removed = [], !o || !o.document || o.document.nodeType !== v.document || !o.Element)
|
|
914
297
|
return n.isSupported = !1, n;
|
|
915
|
-
let s =
|
|
916
|
-
const
|
|
917
|
-
|
|
918
|
-
const
|
|
919
|
-
|
|
920
|
-
const
|
|
298
|
+
let s = o.document;
|
|
299
|
+
const c = s, u = c.currentScript;
|
|
300
|
+
o.DocumentFragment;
|
|
301
|
+
const m = o.HTMLTemplateElement, T = o.Node, pt = o.Element, N = o.NodeFilter, mt = o.NamedNodeMap;
|
|
302
|
+
mt === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
|
|
303
|
+
const Gt = o.DOMParser, Ot = o.trustedTypes, Y = pt.prototype, bn = M(Y, "cloneNode"), Wt = M(Y, "remove"), Sn = M(Y, "nextSibling"), Q = M(Y, "childNodes"), tt = M(Y, "parentNode"), ye = M(Y, "shadowRoot"), Bt = M(Y, "attributes"), $ = T && T.prototype ? M(T.prototype, "nodeType") : null, et = T && T.prototype ? M(T.prototype, "nodeName") : null, Rt = T && T.prototype ? M(T.prototype, "ownerDocument") : null, dt = function(t) {
|
|
921
304
|
return $ ? $(t) : t.nodeType;
|
|
922
|
-
},
|
|
923
|
-
return
|
|
305
|
+
}, Yt = function(t) {
|
|
306
|
+
return et ? et(t) : t.nodeName;
|
|
924
307
|
};
|
|
925
|
-
if (typeof
|
|
926
|
-
const
|
|
927
|
-
|
|
308
|
+
if (typeof m == "function") {
|
|
309
|
+
const r = s.createElement("template");
|
|
310
|
+
r.content && r.content.ownerDocument && (s = r.content.ownerDocument);
|
|
928
311
|
}
|
|
929
|
-
let
|
|
930
|
-
const
|
|
931
|
-
if (ht > 0)
|
|
932
|
-
|
|
933
|
-
|
|
312
|
+
let R, j = "", $t, Te = !1, ht = 0;
|
|
313
|
+
const Ee = function() {
|
|
314
|
+
if (ht > 0)
|
|
315
|
+
throw K('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
|
|
316
|
+
}, nt = function(t) {
|
|
317
|
+
Ee(), ht++;
|
|
934
318
|
try {
|
|
935
|
-
return
|
|
319
|
+
return R.createHTML(t);
|
|
936
320
|
} finally {
|
|
937
321
|
ht--;
|
|
938
322
|
}
|
|
939
|
-
},
|
|
940
|
-
|
|
323
|
+
}, wn = function(t) {
|
|
324
|
+
Ee(), ht++;
|
|
941
325
|
try {
|
|
942
|
-
return
|
|
326
|
+
return R.createScriptURL(t);
|
|
943
327
|
} finally {
|
|
944
328
|
ht--;
|
|
945
329
|
}
|
|
946
|
-
},
|
|
947
|
-
return
|
|
948
|
-
},
|
|
949
|
-
let h =
|
|
950
|
-
n.isSupported = typeof
|
|
951
|
-
const
|
|
952
|
-
let
|
|
953
|
-
const
|
|
954
|
-
...sn,
|
|
955
|
-
...ce,
|
|
956
|
-
...ue,
|
|
957
|
-
...fe,
|
|
958
|
-
...ln
|
|
959
|
-
]);
|
|
330
|
+
}, On = function() {
|
|
331
|
+
return Te || ($t = Bo(Ot, u), Te = !0), $t;
|
|
332
|
+
}, Lt = s, jt = Lt.implementation, Ae = Lt.createNodeIterator, Rn = Lt.createDocumentFragment, Ln = Lt.getElementsByTagName, In = c.importNode;
|
|
333
|
+
let h = hn();
|
|
334
|
+
n.isSupported = typeof gn == "function" && typeof tt == "function" && jt && jt.createHTMLDocument !== void 0;
|
|
335
|
+
const Dn = Do, Nn = No, vn = vo, Cn = Co, Mn = Mo, xn = xo, be = Po, Pn = ko;
|
|
336
|
+
let Se = pn, _ = null;
|
|
337
|
+
const Xt = p({}, [...ln, ...ue, ...fe, ...pe, ...cn]);
|
|
960
338
|
let g = null;
|
|
961
|
-
const
|
|
962
|
-
|
|
963
|
-
...pe,
|
|
964
|
-
...un,
|
|
965
|
-
...Ht
|
|
966
|
-
]);
|
|
967
|
-
let x = Object.seal(ft(null, {
|
|
339
|
+
const Vt = p({}, [...un, ...me, ...fn, ...Ht]);
|
|
340
|
+
let x = Object.seal(ct(null, {
|
|
968
341
|
tagNameCheck: {
|
|
969
342
|
writable: !0,
|
|
970
343
|
configurable: !1,
|
|
@@ -983,8 +356,8 @@ function Tn() {
|
|
|
983
356
|
enumerable: !0,
|
|
984
357
|
value: !1
|
|
985
358
|
}
|
|
986
|
-
})), _t = null,
|
|
987
|
-
const
|
|
359
|
+
})), _t = null, we = null;
|
|
360
|
+
const U = Object.seal(ct(null, {
|
|
988
361
|
tagCheck: {
|
|
989
362
|
writable: !0,
|
|
990
363
|
configurable: !1,
|
|
@@ -998,10 +371,10 @@ function Tn() {
|
|
|
998
371
|
value: null
|
|
999
372
|
}
|
|
1000
373
|
}));
|
|
1001
|
-
let
|
|
1002
|
-
const
|
|
1003
|
-
let
|
|
1004
|
-
const
|
|
374
|
+
let Oe = !0, qt = !0, Re = !1, Le = !0, F = !1, X = !0, V = !1, Kt = !1, It = null, Dt = null, Zt = !1, ot = !1, Nt = !1, vt = !1, Ie = !0, De = !1;
|
|
375
|
+
const Ne = "user-content-";
|
|
376
|
+
let Jt = !0, Qt = !1, it = {}, rt = null;
|
|
377
|
+
const ve = p({}, [
|
|
1005
378
|
"annotation-xml",
|
|
1006
379
|
"audio",
|
|
1007
380
|
"colgroup",
|
|
@@ -1020,6 +393,15 @@ function Tn() {
|
|
|
1020
393
|
"noscript",
|
|
1021
394
|
"plaintext",
|
|
1022
395
|
"script",
|
|
396
|
+
// <selectedcontent> mirrors the selected <option>'s subtree, cloned by
|
|
397
|
+
// the UA (customizable <select>) — including any on* handlers — and the
|
|
398
|
+
// engine re-mirrors synchronously whenever a removal changes which
|
|
399
|
+
// option/selectedcontent is current, even inside DOMPurify's inert
|
|
400
|
+
// DOMParser document. Hoisting its children on removal re-inserts a fresh
|
|
401
|
+
// mirror target ahead of the walk, which the engine refills, looping
|
|
402
|
+
// forever (DoS) and amplifying output. Dropping its content on removal
|
|
403
|
+
// (rather than hoisting) breaks that cascade; the content is a duplicate
|
|
404
|
+
// of the option, which is sanitized on its own. See campaign-3 F1/F6.
|
|
1023
405
|
"selectedcontent",
|
|
1024
406
|
"style",
|
|
1025
407
|
"svg",
|
|
@@ -1029,112 +411,95 @@ function Tn() {
|
|
|
1029
411
|
"video",
|
|
1030
412
|
"xmp"
|
|
1031
413
|
]);
|
|
1032
|
-
let
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
const xe = d({}, [
|
|
1043
|
-
"alt",
|
|
1044
|
-
"class",
|
|
1045
|
-
"for",
|
|
1046
|
-
"id",
|
|
1047
|
-
"label",
|
|
1048
|
-
"name",
|
|
1049
|
-
"pattern",
|
|
1050
|
-
"placeholder",
|
|
1051
|
-
"role",
|
|
1052
|
-
"summary",
|
|
1053
|
-
"title",
|
|
1054
|
-
"value",
|
|
1055
|
-
"style",
|
|
1056
|
-
"xmlns"
|
|
1057
|
-
]), Ct = "http://www.w3.org/1998/Math/MathML", Mt = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
|
|
1058
|
-
let lt = P, Qt = !1, te = null;
|
|
1059
|
-
const zn = d({}, [
|
|
1060
|
-
Ct,
|
|
1061
|
-
Mt,
|
|
1062
|
-
P
|
|
1063
|
-
], le), Pe = A([
|
|
1064
|
-
"mi",
|
|
1065
|
-
"mo",
|
|
1066
|
-
"mn",
|
|
1067
|
-
"ms",
|
|
1068
|
-
"mtext"
|
|
1069
|
-
]);
|
|
1070
|
-
let ee = d({}, Pe);
|
|
1071
|
-
const ze = A(["annotation-xml"]);
|
|
1072
|
-
let ne = d({}, ze);
|
|
1073
|
-
const kn = d({}, [
|
|
1074
|
-
"title",
|
|
1075
|
-
"style",
|
|
1076
|
-
"font",
|
|
1077
|
-
"a",
|
|
1078
|
-
"script"
|
|
1079
|
-
]);
|
|
414
|
+
let Ce = null;
|
|
415
|
+
const Me = p({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
416
|
+
let xe = null;
|
|
417
|
+
const Pe = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Ct = "http://www.w3.org/1998/Math/MathML", Mt = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
|
|
418
|
+
let st = P, te = !1, ee = null;
|
|
419
|
+
const zn = p({}, [Ct, Mt, P], ce), ze = b(["mi", "mo", "mn", "ms", "mtext"]);
|
|
420
|
+
let ne = p({}, ze);
|
|
421
|
+
const ke = b(["annotation-xml"]);
|
|
422
|
+
let oe = p({}, ke);
|
|
423
|
+
const kn = p({}, ["title", "style", "font", "a", "script"]);
|
|
1080
424
|
let gt = null;
|
|
1081
425
|
const Un = ["application/xhtml+xml", "text/html"], Fn = "text/html";
|
|
1082
|
-
let
|
|
1083
|
-
const Hn = s.createElement("form"),
|
|
426
|
+
let E = null, at = null;
|
|
427
|
+
const Hn = s.createElement("form"), Ue = function(t) {
|
|
1084
428
|
return t instanceof RegExp || t instanceof Function;
|
|
1085
|
-
},
|
|
429
|
+
}, ie = function() {
|
|
1086
430
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1087
|
-
if (
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
}),
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
431
|
+
if (at && at === t)
|
|
432
|
+
return;
|
|
433
|
+
(!t || typeof t != "object") && (t = {}), t = C(t), gt = // eslint-disable-next-line unicorn/prefer-includes
|
|
434
|
+
Un.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Fn : t.PARSER_MEDIA_TYPE, E = gt === "application/xhtml+xml" ? ce : bt, _ = G(t, "ALLOWED_TAGS", Xt, {
|
|
435
|
+
transform: E
|
|
436
|
+
}), g = G(t, "ALLOWED_ATTR", Vt, {
|
|
437
|
+
transform: E
|
|
438
|
+
}), ee = G(t, "ALLOWED_NAMESPACES", zn, {
|
|
439
|
+
transform: ce
|
|
440
|
+
}), xe = G(t, "ADD_URI_SAFE_ATTR", Pe, {
|
|
441
|
+
transform: E,
|
|
442
|
+
base: Pe
|
|
443
|
+
}), Ce = G(t, "ADD_DATA_URI_TAGS", Me, {
|
|
444
|
+
transform: E,
|
|
445
|
+
base: Me
|
|
446
|
+
}), rt = G(t, "FORBID_CONTENTS", ve, {
|
|
447
|
+
transform: E
|
|
448
|
+
}), _t = G(t, "FORBID_TAGS", C({}), {
|
|
449
|
+
transform: E
|
|
450
|
+
}), we = G(t, "FORBID_ATTR", C({}), {
|
|
451
|
+
transform: E
|
|
452
|
+
}), it = D(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? C(t.USE_PROFILES) : t.USE_PROFILES : !1, Oe = t.ALLOW_ARIA_ATTR !== !1, qt = t.ALLOW_DATA_ATTR !== !1, Re = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Le = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, F = t.SAFE_FOR_TEMPLATES || !1, X = t.SAFE_FOR_XML !== !1, V = t.WHOLE_DOCUMENT || !1, ot = t.RETURN_DOM || !1, Nt = t.RETURN_DOM_FRAGMENT || !1, vt = t.RETURN_TRUSTED_TYPE || !1, Zt = t.FORCE_BODY || !1, Ie = t.SANITIZE_DOM !== !1, De = t.SANITIZE_NAMED_PROPS || !1, Jt = t.KEEP_CONTENT !== !1, Qt = t.IN_PLACE || !1, Se = Ro(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : pn, st = typeof t.NAMESPACE == "string" ? t.NAMESPACE : P, ne = de(
|
|
453
|
+
t,
|
|
454
|
+
"MATHML_TEXT_INTEGRATION_POINTS",
|
|
455
|
+
() => p({}, ze)
|
|
456
|
+
// Default built-in map
|
|
457
|
+
), oe = de(
|
|
458
|
+
t,
|
|
459
|
+
"HTML_INTEGRATION_POINTS",
|
|
460
|
+
() => p({}, ke)
|
|
461
|
+
// Default built-in map
|
|
462
|
+
);
|
|
463
|
+
const e = de(t, "CUSTOM_ELEMENT_HANDLING", () => ct(null));
|
|
464
|
+
if (x = ct(null), D(e, "tagNameCheck") && Ue(e.tagNameCheck) && (x.tagNameCheck = e.tagNameCheck), D(e, "attributeNameCheck") && Ue(e.attributeNameCheck) && (x.attributeNameCheck = e.attributeNameCheck), D(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (x.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), S(x), F && (qt = !1), Nt && (ot = !0), it && (_ = p({}, cn), g = ct(null), it.html === !0 && (p(_, ln), p(g, un)), it.svg === !0 && (p(_, ue), p(g, me), p(g, Ht)), it.svgFilters === !0 && (p(_, fe), p(g, me), p(g, Ht)), it.mathMl === !0 && (p(_, pe), p(g, fn), p(g, Ht))), U.tagCheck = null, U.attributeCheck = null, D(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? U.tagCheck = t.ADD_TAGS : ft(t.ADD_TAGS) && (_ === Xt && (_ = C(_)), p(_, t.ADD_TAGS, E))), D(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? U.attributeCheck = t.ADD_ATTR : ft(t.ADD_ATTR) && (g === Vt && (g = C(g)), p(g, t.ADD_ATTR, E))), D(t, "ADD_FORBID_CONTENTS") && ft(t.ADD_FORBID_CONTENTS) && (rt === ve && (rt = C(rt)), p(rt, t.ADD_FORBID_CONTENTS, E)), Jt && (_["#text"] = !0), V && p(_, ["html", "head", "body"]), _.table && (p(_, ["tbody"]), delete _t.tbody), t.TRUSTED_TYPES_POLICY) {
|
|
465
|
+
if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
466
|
+
throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
467
|
+
if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
468
|
+
throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
469
|
+
const i = R;
|
|
470
|
+
R = t.TRUSTED_TYPES_POLICY;
|
|
1105
471
|
try {
|
|
1106
|
-
|
|
472
|
+
j = nt("");
|
|
1107
473
|
} catch (a) {
|
|
1108
|
-
throw
|
|
474
|
+
throw R = i, a;
|
|
1109
475
|
}
|
|
1110
|
-
} else t.TRUSTED_TYPES_POLICY === null ? (
|
|
1111
|
-
|
|
1112
|
-
},
|
|
1113
|
-
|
|
1114
|
-
...ue,
|
|
1115
|
-
...Or
|
|
1116
|
-
]), Fe = d({}, [...fe, ...Rr]), Gn = function(t, e, i) {
|
|
1117
|
-
return e.namespaceURI === P ? t === "svg" : e.namespaceURI === Ct ? t === "svg" && (i === "annotation-xml" || ee[i]) : !!Ue[t];
|
|
476
|
+
} else t.TRUSTED_TYPES_POLICY === null ? (R = void 0, j = "") : (R === void 0 && (R = On()), R && typeof j == "string" && (j = nt("")));
|
|
477
|
+
b && b(t), at = t;
|
|
478
|
+
}, Fe = p({}, [...ue, ...fe, ...Lo]), He = p({}, [...pe, ...Io]), Gn = function(t, e, i) {
|
|
479
|
+
return e.namespaceURI === P ? t === "svg" : e.namespaceURI === Ct ? t === "svg" && (i === "annotation-xml" || ne[i]) : !!Fe[t];
|
|
1118
480
|
}, Wn = function(t, e, i) {
|
|
1119
|
-
return e.namespaceURI === P ? t === "math" : e.namespaceURI === Mt ? t === "math" &&
|
|
481
|
+
return e.namespaceURI === P ? t === "math" : e.namespaceURI === Mt ? t === "math" && oe[i] : !!He[t];
|
|
1120
482
|
}, Bn = function(t, e, i) {
|
|
1121
|
-
return e.namespaceURI === Mt && !
|
|
1122
|
-
},
|
|
1123
|
-
let e =
|
|
483
|
+
return e.namespaceURI === Mt && !oe[i] || e.namespaceURI === Ct && !ne[i] ? !1 : !He[t] && (kn[t] || !Fe[t]);
|
|
484
|
+
}, Yn = function(t) {
|
|
485
|
+
let e = tt(t);
|
|
1124
486
|
(!e || !e.tagName) && (e = {
|
|
1125
|
-
namespaceURI:
|
|
487
|
+
namespaceURI: st,
|
|
1126
488
|
tagName: "template"
|
|
1127
489
|
});
|
|
1128
|
-
const i =
|
|
1129
|
-
return
|
|
1130
|
-
},
|
|
1131
|
-
Tt(n.removed, {
|
|
490
|
+
const i = bt(t.tagName), a = bt(e.tagName);
|
|
491
|
+
return ee[t.namespaceURI] ? t.namespaceURI === Mt ? Gn(i, e, a) : t.namespaceURI === Ct ? Wn(i, e, a) : t.namespaceURI === P ? Bn(i, e, a) : !!(gt === "application/xhtml+xml" && ee[t.namespaceURI]) : !1;
|
|
492
|
+
}, H = function(t) {
|
|
493
|
+
Tt(n.removed, {
|
|
494
|
+
element: t
|
|
495
|
+
});
|
|
1132
496
|
try {
|
|
1133
|
-
|
|
497
|
+
tt(t).removeChild(t);
|
|
1134
498
|
} catch {
|
|
1135
|
-
if (
|
|
499
|
+
if (Wt(t), !tt(t))
|
|
500
|
+
throw K("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
1136
501
|
}
|
|
1137
|
-
},
|
|
502
|
+
}, Ge = function(t, e, i) {
|
|
1138
503
|
try {
|
|
1139
504
|
t.removeAttributeNode(e);
|
|
1140
505
|
} catch {
|
|
@@ -1145,29 +510,31 @@ function Tn() {
|
|
|
1145
510
|
}
|
|
1146
511
|
}, xt = function(t) {
|
|
1147
512
|
Pt(t);
|
|
1148
|
-
const e =
|
|
513
|
+
const e = Q(t);
|
|
1149
514
|
if (e) {
|
|
1150
515
|
const a = [];
|
|
1151
|
-
|
|
1152
|
-
Tt(a,
|
|
1153
|
-
}),
|
|
516
|
+
Z(e, (l) => {
|
|
517
|
+
Tt(a, l);
|
|
518
|
+
}), Z(a, (l) => {
|
|
1154
519
|
try {
|
|
1155
|
-
|
|
520
|
+
Wt(l);
|
|
1156
521
|
} catch {
|
|
1157
522
|
}
|
|
1158
523
|
});
|
|
1159
524
|
}
|
|
1160
|
-
const i =
|
|
1161
|
-
if (i)
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
525
|
+
const i = Bt(t);
|
|
526
|
+
if (i)
|
|
527
|
+
for (let a = i.length - 1; a >= 0; --a) {
|
|
528
|
+
const l = i[a], f = l && l.name;
|
|
529
|
+
typeof f == "string" && Ge(t, l, f);
|
|
530
|
+
}
|
|
531
|
+
}, q = function(t, e, i) {
|
|
532
|
+
if (!i)
|
|
533
|
+
try {
|
|
534
|
+
i = e.getAttributeNode(t);
|
|
535
|
+
} catch {
|
|
536
|
+
i = null;
|
|
537
|
+
}
|
|
1171
538
|
Tt(n.removed, {
|
|
1172
539
|
attribute: i || null,
|
|
1173
540
|
from: e
|
|
@@ -1181,196 +548,251 @@ function Tn() {
|
|
|
1181
548
|
}
|
|
1182
549
|
}
|
|
1183
550
|
if (t === "is")
|
|
1184
|
-
if (ot ||
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
551
|
+
if (ot || Nt)
|
|
552
|
+
try {
|
|
553
|
+
H(e);
|
|
554
|
+
} catch {
|
|
555
|
+
}
|
|
556
|
+
else
|
|
557
|
+
try {
|
|
558
|
+
e.setAttribute(t, "");
|
|
559
|
+
} catch {
|
|
560
|
+
}
|
|
561
|
+
}, $n = function(t) {
|
|
562
|
+
const e = Bt(t);
|
|
1194
563
|
if (e)
|
|
1195
564
|
for (let i = e.length - 1; i >= 0; --i) {
|
|
1196
|
-
const a = e[i],
|
|
1197
|
-
typeof
|
|
565
|
+
const a = e[i], l = a && a.name;
|
|
566
|
+
typeof l != "string" || g[E(l)] || Ge(t, a, l);
|
|
1198
567
|
}
|
|
1199
568
|
}, Pt = function(t) {
|
|
1200
569
|
const e = [t];
|
|
1201
570
|
for (; e.length > 0; ) {
|
|
1202
571
|
const i = e.pop();
|
|
1203
|
-
dt(i) ===
|
|
1204
|
-
const
|
|
1205
|
-
if (
|
|
572
|
+
dt(i) === v.element && $n(i);
|
|
573
|
+
const l = Q(i);
|
|
574
|
+
if (l)
|
|
575
|
+
for (let f = l.length - 1; f >= 0; --f)
|
|
576
|
+
e.push(l[f]);
|
|
1206
577
|
}
|
|
1207
|
-
},
|
|
1208
|
-
return
|
|
1209
|
-
},
|
|
1210
|
-
if (!
|
|
578
|
+
}, We = function(t, e) {
|
|
579
|
+
return X ? t === "patchsrc" ? !0 : t === "for" && e !== "label" && e !== "output" : !1;
|
|
580
|
+
}, jn = function(t) {
|
|
581
|
+
if (!X)
|
|
582
|
+
return;
|
|
1211
583
|
const e = [t];
|
|
1212
584
|
for (; e.length > 0; ) {
|
|
1213
585
|
const i = e.pop(), a = dt(i);
|
|
1214
|
-
if (a ===
|
|
586
|
+
if (a === v.processingInstruction || a === v.comment && w(dn, i.data)) {
|
|
1215
587
|
try {
|
|
1216
|
-
|
|
588
|
+
Wt(i);
|
|
1217
589
|
} catch {
|
|
1218
590
|
}
|
|
1219
591
|
continue;
|
|
1220
592
|
}
|
|
1221
|
-
if (a ===
|
|
1222
|
-
const f = i,
|
|
593
|
+
if (a === v.element) {
|
|
594
|
+
const f = i, d = E(Yt(i));
|
|
1223
595
|
try {
|
|
1224
|
-
f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") &&
|
|
596
|
+
f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && We("for", d) && f.removeAttribute("for");
|
|
1225
597
|
} catch {
|
|
1226
598
|
}
|
|
1227
599
|
}
|
|
1228
|
-
const
|
|
1229
|
-
if (
|
|
600
|
+
const l = Q(i);
|
|
601
|
+
if (l)
|
|
602
|
+
for (let f = l.length - 1; f >= 0; --f)
|
|
603
|
+
e.push(l[f]);
|
|
1230
604
|
}
|
|
1231
|
-
},
|
|
605
|
+
}, Be = function(t) {
|
|
1232
606
|
let e = null, i = null;
|
|
1233
|
-
if (
|
|
607
|
+
if (Zt)
|
|
608
|
+
t = "<remove></remove>" + t;
|
|
1234
609
|
else {
|
|
1235
|
-
const f =
|
|
610
|
+
const f = on(t, /^[\r\n\t ]+/);
|
|
1236
611
|
i = f && f[0];
|
|
1237
612
|
}
|
|
1238
|
-
gt === "application/xhtml+xml" &&
|
|
1239
|
-
const a =
|
|
1240
|
-
if (
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
613
|
+
gt === "application/xhtml+xml" && st === P && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
|
|
614
|
+
const a = R ? nt(t) : t;
|
|
615
|
+
if (st === P)
|
|
616
|
+
try {
|
|
617
|
+
e = new Gt().parseFromString(a, gt);
|
|
618
|
+
} catch {
|
|
619
|
+
}
|
|
1244
620
|
if (!e || !e.documentElement) {
|
|
1245
|
-
e =
|
|
621
|
+
e = jt.createDocument(st, "template", null);
|
|
1246
622
|
try {
|
|
1247
|
-
e.documentElement.innerHTML =
|
|
623
|
+
e.documentElement.innerHTML = te ? j : a;
|
|
1248
624
|
} catch {
|
|
1249
625
|
}
|
|
1250
626
|
}
|
|
1251
|
-
const
|
|
1252
|
-
return t && i &&
|
|
1253
|
-
},
|
|
1254
|
-
const e =
|
|
1255
|
-
return
|
|
627
|
+
const l = e.body || e.documentElement;
|
|
628
|
+
return t && i && l.insertBefore(s.createTextNode(i), l.childNodes[0] || null), st === P ? Ln.call(e, V ? "html" : "body")[0] : V ? e.documentElement : l;
|
|
629
|
+
}, Ye = function(t) {
|
|
630
|
+
const e = Rt ? Rt(t) : t.ownerDocument;
|
|
631
|
+
return Ae.call(
|
|
632
|
+
e || t,
|
|
633
|
+
t,
|
|
634
|
+
// eslint-disable-next-line no-bitwise
|
|
635
|
+
N.SHOW_ELEMENT | N.SHOW_COMMENT | N.SHOW_TEXT | N.SHOW_PROCESSING_INSTRUCTION | N.SHOW_CDATA_SECTION,
|
|
636
|
+
null
|
|
637
|
+
);
|
|
1256
638
|
}, zt = function(t) {
|
|
1257
|
-
return t =
|
|
1258
|
-
},
|
|
639
|
+
return t = Et(t, Dn, " "), t = Et(t, Nn, " "), t = Et(t, vn, " "), t;
|
|
640
|
+
}, re = function(t) {
|
|
1259
641
|
var e;
|
|
1260
642
|
t.normalize();
|
|
1261
|
-
const i =
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
643
|
+
const i = Rt ? Rt(t) : t.ownerDocument, a = Ae.call(
|
|
644
|
+
i || t,
|
|
645
|
+
t,
|
|
646
|
+
// eslint-disable-next-line no-bitwise
|
|
647
|
+
N.SHOW_TEXT | N.SHOW_COMMENT | N.SHOW_CDATA_SECTION | N.SHOW_PROCESSING_INSTRUCTION,
|
|
648
|
+
null
|
|
649
|
+
);
|
|
650
|
+
let l = a.nextNode();
|
|
651
|
+
for (; l; )
|
|
652
|
+
l.data = zt(l.data), l = a.nextNode();
|
|
1265
653
|
const f = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
|
|
1266
|
-
f &&
|
|
1267
|
-
|
|
654
|
+
f && Z(f, (d) => {
|
|
655
|
+
lt(d.content) && re(d.content);
|
|
1268
656
|
});
|
|
1269
657
|
}, kt = function(t) {
|
|
1270
|
-
const e =
|
|
1271
|
-
return typeof e != "string" ||
|
|
1272
|
-
|
|
1273
|
-
|
|
658
|
+
const e = et ? et(t) : null;
|
|
659
|
+
return typeof e != "string" || E(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
|
|
660
|
+
// prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
|
|
661
|
+
// makes the direct read diverge from the cached read; a clean form
|
|
662
|
+
// (same-realm OR foreign-realm) has both reads pointing at the same
|
|
663
|
+
// canonical NamedNodeMap.
|
|
664
|
+
t.attributes !== Bt(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
|
|
665
|
+
// returns the integer 1 for any Element regardless of realm; direct
|
|
666
|
+
// read on a clobbered form (e.g. <input name="nodeType">) returns
|
|
667
|
+
// the named child element. Cheap addition — nodeType is read from
|
|
668
|
+
// an internal slot, no serialization cost — and removes a residual
|
|
669
|
+
// clobbering surface used by several mXSS / PI / comment branches
|
|
670
|
+
// in _sanitizeElements that compare currentNode.nodeType directly.
|
|
671
|
+
t.nodeType !== $(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
|
|
672
|
+
// "childNodes" shadows the prototype getter. Direct reads of
|
|
673
|
+
// form.childNodes from a clobbered form return the named child
|
|
674
|
+
// instead of the real NodeList, so any walk that reads it directly
|
|
675
|
+
// skips the form's real children. Compare the direct read to the
|
|
676
|
+
// cached Node.prototype getter — when the form's named-property
|
|
677
|
+
// getter intercepts the read, the two values differ and we flag
|
|
678
|
+
// the form. This catches every clobbering child type (input,
|
|
679
|
+
// select, etc.) regardless of whether the named child happens to
|
|
680
|
+
// carry a numeric .length, which a typeof-based probe would miss
|
|
681
|
+
// (e.g. HTMLSelectElement.length is a defined unsigned-long).
|
|
682
|
+
t.childNodes !== Q(t);
|
|
683
|
+
}, lt = function(t) {
|
|
684
|
+
if (!$ || typeof t != "object" || t === null)
|
|
685
|
+
return !1;
|
|
1274
686
|
try {
|
|
1275
|
-
return $(t) ===
|
|
687
|
+
return $(t) === v.documentFragment;
|
|
1276
688
|
} catch {
|
|
1277
689
|
return !1;
|
|
1278
690
|
}
|
|
1279
691
|
}, yt = function(t) {
|
|
1280
|
-
if (!$ || typeof t != "object" || t === null)
|
|
692
|
+
if (!$ || typeof t != "object" || t === null)
|
|
693
|
+
return !1;
|
|
1281
694
|
try {
|
|
1282
695
|
return typeof $(t) == "number";
|
|
1283
696
|
} catch {
|
|
1284
697
|
return !1;
|
|
1285
698
|
}
|
|
1286
699
|
};
|
|
1287
|
-
function z(
|
|
1288
|
-
|
|
1289
|
-
i.call(n, t, e,
|
|
700
|
+
function z(r, t, e) {
|
|
701
|
+
r.length !== 0 && Z(r, (i) => {
|
|
702
|
+
i.call(n, t, e, at);
|
|
1290
703
|
});
|
|
1291
704
|
}
|
|
1292
705
|
const Xn = function(t, e) {
|
|
1293
|
-
return !!(
|
|
706
|
+
return !!(X && t.hasChildNodes() && !yt(t.firstElementChild) && w(mn, t.textContent) && w(mn, t.innerHTML) || X && t.namespaceURI === P && Ho[e] && (yt(t.firstElementChild) || typeof t.textContent == "string" && w(Go[e], t.textContent)) || t.nodeType === v.processingInstruction || X && t.nodeType === v.comment && w(dn, t.data));
|
|
1294
707
|
}, Ut = function(t, e) {
|
|
1295
|
-
if (t instanceof RegExp)
|
|
708
|
+
if (t instanceof RegExp)
|
|
709
|
+
return w(t, e);
|
|
1296
710
|
if (t instanceof Function) {
|
|
1297
|
-
for (var i = arguments.length, a = new Array(i > 2 ? i - 2 : 0),
|
|
711
|
+
for (var i = arguments.length, a = new Array(i > 2 ? i - 2 : 0), l = 2; l < i; l++)
|
|
712
|
+
a[l - 2] = arguments[l];
|
|
1298
713
|
return !!t(e, ...a);
|
|
1299
714
|
}
|
|
1300
715
|
return !1;
|
|
1301
716
|
}, Vn = function(t, e, i) {
|
|
1302
|
-
if (!_t[e] &&
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
717
|
+
if (!_t[e] && qe(e) && Ut(x.tagNameCheck, e))
|
|
718
|
+
return !1;
|
|
719
|
+
if (Jt && !rt[e]) {
|
|
720
|
+
const a = tt(t), l = Q(t);
|
|
721
|
+
if (l && a) {
|
|
722
|
+
const f = l.length;
|
|
723
|
+
for (let d = f - 1; d >= 0; --d) {
|
|
724
|
+
const y = t === i ? bn(l[d], !0) : l[d];
|
|
725
|
+
a.insertBefore(y, Sn(t));
|
|
1310
726
|
}
|
|
1311
727
|
}
|
|
1312
728
|
}
|
|
1313
|
-
return
|
|
1314
|
-
},
|
|
1315
|
-
return t.length === 0 ? e : e === i || e === a ?
|
|
1316
|
-
},
|
|
1317
|
-
return t === e ||
|
|
1318
|
-
},
|
|
1319
|
-
if (z(h.beforeSanitizeElements, t, null),
|
|
729
|
+
return H(t), !0;
|
|
730
|
+
}, $e = function(t, e, i, a) {
|
|
731
|
+
return t.length === 0 ? e : e === i || e === a ? C(e) : e;
|
|
732
|
+
}, je = function(t, e) {
|
|
733
|
+
return t === e || tt(t) !== null ? !1 : (Qt && Pt(t), !0);
|
|
734
|
+
}, Xe = function(t, e) {
|
|
735
|
+
if (z(h.beforeSanitizeElements, t, null), je(t, e))
|
|
736
|
+
return !0;
|
|
1320
737
|
if (kt(t))
|
|
1321
|
-
return
|
|
1322
|
-
const i =
|
|
1323
|
-
if (_ =
|
|
738
|
+
return H(t), !0;
|
|
739
|
+
const i = E(Yt(t));
|
|
740
|
+
if (_ = $e(h.uponSanitizeElement, _, Xt, It), z(h.uponSanitizeElement, t, {
|
|
1324
741
|
tagName: i,
|
|
1325
742
|
allowedTags: _
|
|
1326
|
-
}),
|
|
743
|
+
}), je(t, e))
|
|
744
|
+
return !0;
|
|
1327
745
|
if (Xn(t, i))
|
|
1328
|
-
return
|
|
1329
|
-
if (_t[i] || !(
|
|
1330
|
-
const
|
|
1331
|
-
return
|
|
746
|
+
return H(t), !0;
|
|
747
|
+
if (_t[i] || !(U.tagCheck instanceof Function && U.tagCheck(i)) && !_[i]) {
|
|
748
|
+
const l = Vn(t, i, e);
|
|
749
|
+
return l === !1 && z(h.afterSanitizeElements, t, null), l;
|
|
1332
750
|
}
|
|
1333
|
-
if (dt(t) ===
|
|
1334
|
-
return
|
|
1335
|
-
if (
|
|
1336
|
-
const
|
|
1337
|
-
t.textContent !==
|
|
751
|
+
if (dt(t) === v.element && !Yn(t) || (i === "noscript" || i === "noembed" || i === "noframes") && w(Uo, t.innerHTML))
|
|
752
|
+
return H(t), !0;
|
|
753
|
+
if (F && t.nodeType === v.text) {
|
|
754
|
+
const l = zt(t.textContent);
|
|
755
|
+
t.textContent !== l && (Tt(n.removed, {
|
|
756
|
+
element: t.cloneNode()
|
|
757
|
+
}), t.textContent = l);
|
|
1338
758
|
}
|
|
1339
759
|
return z(h.afterSanitizeElements, t, null), !1;
|
|
1340
|
-
},
|
|
1341
|
-
if (
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
]),
|
|
1354
|
-
return !qn[
|
|
760
|
+
}, Ve = function(t, e, i) {
|
|
761
|
+
if (we[e] || We(e, t) || Ie && (e === "id" || e === "name") && (i in s || i in Hn))
|
|
762
|
+
return !1;
|
|
763
|
+
const a = g[e] || U.attributeCheck instanceof Function && U.attributeCheck(e, t);
|
|
764
|
+
return qt && w(Cn, e) || Oe && w(Mn, e) ? !0 : a ? xe[e] || w(Se, Et(i, be, "")) || (e === "src" || e === "xlink:href" || e === "href") && t !== "script" && rn(i, "data:") === 0 && Ce[t] || Re && !w(xn, Et(i, be, "")) ? !0 : !i : (
|
|
765
|
+
// Condition a) covers a basically valid custom element tag name whose
|
|
766
|
+
// tag passes the configured tagNameCheck and whose attribute name
|
|
767
|
+
// passes the configured attributeNameCheck ...
|
|
768
|
+
qe(t) && Ut(x.tagNameCheck, t) && Ut(x.attributeNameCheck, e, t) || // Condition b) covers an `is` attribute whose value passes the
|
|
769
|
+
// configured tagNameCheck while customized built-in elements are
|
|
770
|
+
// allowed.
|
|
771
|
+
e === "is" && x.allowCustomizedBuiltInElements && Ut(x.tagNameCheck, i)
|
|
772
|
+
);
|
|
773
|
+
}, qn = p({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), qe = function(t) {
|
|
774
|
+
return !qn[bt(t)] && w(Pn, t);
|
|
1355
775
|
}, Kn = function(t, e, i, a) {
|
|
1356
|
-
if (
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
776
|
+
if (R && typeof Ot == "object" && typeof Ot.getAttributeType == "function" && !i)
|
|
777
|
+
switch (Ot.getAttributeType(t, e)) {
|
|
778
|
+
case "TrustedHTML":
|
|
779
|
+
return nt(a);
|
|
780
|
+
case "TrustedScriptURL":
|
|
781
|
+
return wn(a);
|
|
782
|
+
}
|
|
1362
783
|
return a;
|
|
1363
784
|
}, Zn = function(t, e, i, a) {
|
|
1364
785
|
try {
|
|
1365
|
-
i ? t.setAttributeNS(i, e, a) : t.setAttribute(e, a), kt(t) ?
|
|
786
|
+
i ? t.setAttributeNS(i, e, a) : t.setAttribute(e, a), kt(t) ? H(t) : nn(n.removed);
|
|
1366
787
|
} catch {
|
|
1367
|
-
|
|
788
|
+
q(e, t);
|
|
1368
789
|
}
|
|
1369
|
-
},
|
|
790
|
+
}, Ke = function(t) {
|
|
1370
791
|
z(h.beforeSanitizeAttributes, t, null);
|
|
1371
792
|
const e = t.attributes;
|
|
1372
|
-
if (!e || kt(t))
|
|
1373
|
-
|
|
793
|
+
if (!e || kt(t))
|
|
794
|
+
return;
|
|
795
|
+
g = $e(h.uponSanitizeAttribute, g, Vt, Dt);
|
|
1374
796
|
const i = {
|
|
1375
797
|
attrName: "",
|
|
1376
798
|
attrValue: "",
|
|
@@ -1379,45 +801,45 @@ function Tn() {
|
|
|
1379
801
|
forceKeepAttr: void 0
|
|
1380
802
|
};
|
|
1381
803
|
let a = e.length;
|
|
1382
|
-
const
|
|
804
|
+
const l = E(t.nodeName);
|
|
1383
805
|
for (; a--; ) {
|
|
1384
|
-
const f = e[a],
|
|
1385
|
-
let
|
|
1386
|
-
if (i.attrName =
|
|
1387
|
-
|
|
806
|
+
const f = e[a], d = f.name, y = f.namespaceURI, L = f.value, I = E(d), ae = L;
|
|
807
|
+
let O = d === "value" ? ae : Eo(ae);
|
|
808
|
+
if (i.attrName = I, i.attrValue = O, i.keepAttr = !0, i.forceKeepAttr = void 0, z(h.uponSanitizeAttribute, t, i), O = i.attrValue, De && (I === "id" || I === "name") && rn(O, Ne) !== 0 && (q(d, t, f), O = Ne + O), X && w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, O)) {
|
|
809
|
+
q(d, t, f);
|
|
1388
810
|
continue;
|
|
1389
811
|
}
|
|
1390
|
-
if (
|
|
1391
|
-
|
|
812
|
+
if (I === "attributename" && on(O, "href")) {
|
|
813
|
+
q(d, t, f);
|
|
1392
814
|
continue;
|
|
1393
815
|
}
|
|
1394
816
|
if (!i.forceKeepAttr) {
|
|
1395
817
|
if (!i.keepAttr) {
|
|
1396
|
-
|
|
818
|
+
q(d, t, f);
|
|
1397
819
|
continue;
|
|
1398
820
|
}
|
|
1399
|
-
if (!
|
|
1400
|
-
|
|
821
|
+
if (!Le && w(Fo, O)) {
|
|
822
|
+
q(d, t, f);
|
|
1401
823
|
continue;
|
|
1402
824
|
}
|
|
1403
|
-
if (
|
|
1404
|
-
|
|
825
|
+
if (F && (O = zt(O)), !Ve(l, I, O)) {
|
|
826
|
+
q(d, t, f);
|
|
1405
827
|
continue;
|
|
1406
828
|
}
|
|
1407
|
-
|
|
829
|
+
O = Kn(l, I, y, O), O !== ae && Zn(t, d, y, O);
|
|
1408
830
|
}
|
|
1409
831
|
}
|
|
1410
832
|
z(h.afterSanitizeAttributes, t, null);
|
|
1411
833
|
}, Ft = function(t) {
|
|
1412
834
|
let e = null;
|
|
1413
|
-
const i =
|
|
835
|
+
const i = Ye(t);
|
|
1414
836
|
for (z(h.beforeSanitizeShadowDOM, t, null); e = i.nextNode(); )
|
|
1415
|
-
if (z(h.uponSanitizeShadowNode, e, null),
|
|
1416
|
-
const a =
|
|
1417
|
-
|
|
837
|
+
if (z(h.uponSanitizeShadowNode, e, null), Xe(e, t), Ke(e), lt(e.content) && Ft(e.content), dt(e) === v.element) {
|
|
838
|
+
const a = ye(e);
|
|
839
|
+
lt(a) && (se(a), Ft(a));
|
|
1418
840
|
}
|
|
1419
841
|
z(h.afterSanitizeShadowDOM, t, null);
|
|
1420
|
-
},
|
|
842
|
+
}, se = function(t) {
|
|
1421
843
|
const e = [{
|
|
1422
844
|
node: t,
|
|
1423
845
|
shadow: null
|
|
@@ -1428,161 +850,158 @@ function Tn() {
|
|
|
1428
850
|
Ft(i.shadow);
|
|
1429
851
|
continue;
|
|
1430
852
|
}
|
|
1431
|
-
const a = i.node,
|
|
1432
|
-
if (
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
853
|
+
const a = i.node, f = dt(a) === v.element, d = Q(a);
|
|
854
|
+
if (d)
|
|
855
|
+
for (let y = d.length - 1; y >= 0; --y)
|
|
856
|
+
e.push({
|
|
857
|
+
node: d[y],
|
|
858
|
+
shadow: null
|
|
859
|
+
});
|
|
860
|
+
if (f) {
|
|
861
|
+
const y = et ? et(a) : null;
|
|
862
|
+
if (typeof y == "string" && E(y) === "template") {
|
|
863
|
+
const L = a.content;
|
|
864
|
+
lt(L) && e.push({
|
|
865
|
+
node: L,
|
|
1442
866
|
shadow: null
|
|
1443
867
|
});
|
|
1444
868
|
}
|
|
1445
869
|
}
|
|
1446
|
-
if (
|
|
1447
|
-
const
|
|
1448
|
-
|
|
870
|
+
if (f) {
|
|
871
|
+
const y = ye(a);
|
|
872
|
+
lt(y) && e.push({
|
|
1449
873
|
node: null,
|
|
1450
|
-
shadow:
|
|
874
|
+
shadow: y
|
|
1451
875
|
}, {
|
|
1452
|
-
node:
|
|
876
|
+
node: y,
|
|
1453
877
|
shadow: null
|
|
1454
878
|
});
|
|
1455
879
|
}
|
|
1456
880
|
}
|
|
1457
881
|
};
|
|
1458
|
-
return n.sanitize = function(
|
|
1459
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, i = null, a = null,
|
|
1460
|
-
if (
|
|
1461
|
-
throw
|
|
1462
|
-
if (!n.isSupported)
|
|
1463
|
-
|
|
1464
|
-
|
|
882
|
+
return n.sanitize = function(r) {
|
|
883
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, i = null, a = null, l = null;
|
|
884
|
+
if (te = !r, te && (r = "<!-->"), typeof r != "string" && !yt(r) && (r = Oo(r), typeof r != "string"))
|
|
885
|
+
throw K("dirty is not a string, aborting");
|
|
886
|
+
if (!n.isSupported)
|
|
887
|
+
return r;
|
|
888
|
+
Kt ? (_ = It, g = Dt) : ie(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (_ = C(_)), h.uponSanitizeAttribute.length > 0 && (g = C(g)), n.removed = [];
|
|
889
|
+
const f = Qt && typeof r != "string" && yt(r);
|
|
1465
890
|
if (f) {
|
|
1466
|
-
|
|
1467
|
-
const
|
|
1468
|
-
if (typeof
|
|
1469
|
-
const
|
|
1470
|
-
if (!_[
|
|
1471
|
-
throw xt(
|
|
891
|
+
jn(r);
|
|
892
|
+
const L = Yt(r);
|
|
893
|
+
if (typeof L == "string") {
|
|
894
|
+
const I = E(L);
|
|
895
|
+
if (!_[I] || _t[I])
|
|
896
|
+
throw xt(r), K("root node is forbidden and cannot be sanitized in-place");
|
|
1472
897
|
}
|
|
1473
|
-
if (kt(
|
|
1474
|
-
throw xt(
|
|
898
|
+
if (kt(r))
|
|
899
|
+
throw xt(r), K("root node is clobbered and cannot be sanitized in-place");
|
|
1475
900
|
try {
|
|
1476
|
-
|
|
1477
|
-
} catch (
|
|
1478
|
-
throw xt(
|
|
901
|
+
se(r);
|
|
902
|
+
} catch (I) {
|
|
903
|
+
throw xt(r), I;
|
|
1479
904
|
}
|
|
1480
|
-
} else if (yt(
|
|
1481
|
-
e =
|
|
905
|
+
} else if (yt(r))
|
|
906
|
+
e = Be("<!---->"), i = e.ownerDocument.importNode(r, !0), i.nodeType === v.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? e = i : e.appendChild(i), se(i);
|
|
1482
907
|
else {
|
|
1483
|
-
if (!ot && !
|
|
1484
|
-
|
|
908
|
+
if (!ot && !F && !V && // eslint-disable-next-line unicorn/prefer-includes
|
|
909
|
+
r.indexOf("<") === -1)
|
|
910
|
+
return R && vt ? nt(r) : r;
|
|
911
|
+
if (e = Be(r), !e)
|
|
912
|
+
return ot ? null : vt ? j : "";
|
|
1485
913
|
}
|
|
1486
|
-
e &&
|
|
1487
|
-
const
|
|
914
|
+
e && Zt && H(e.firstChild);
|
|
915
|
+
const d = f ? r : e;
|
|
1488
916
|
try {
|
|
1489
|
-
const
|
|
1490
|
-
for (; a =
|
|
1491
|
-
|
|
1492
|
-
} catch (
|
|
1493
|
-
throw f && (xt(
|
|
1494
|
-
|
|
1495
|
-
})),
|
|
917
|
+
const L = Ye(d);
|
|
918
|
+
for (; a = L.nextNode(); )
|
|
919
|
+
Xe(a, d), Ke(a), lt(a.content) && Ft(a.content);
|
|
920
|
+
} catch (L) {
|
|
921
|
+
throw f && (xt(r), Z(n.removed, (I) => {
|
|
922
|
+
I.element && Pt(I.element);
|
|
923
|
+
})), L;
|
|
1496
924
|
}
|
|
1497
925
|
if (f)
|
|
1498
|
-
return
|
|
1499
|
-
|
|
1500
|
-
}),
|
|
926
|
+
return Z(n.removed, (L) => {
|
|
927
|
+
L.element && Pt(L.element);
|
|
928
|
+
}), F && re(r), r;
|
|
1501
929
|
if (ot) {
|
|
1502
|
-
if (
|
|
1503
|
-
for (
|
|
1504
|
-
|
|
1505
|
-
|
|
930
|
+
if (F && re(e), Nt)
|
|
931
|
+
for (l = Rn.call(e.ownerDocument); e.firstChild; )
|
|
932
|
+
l.appendChild(e.firstChild);
|
|
933
|
+
else
|
|
934
|
+
l = e;
|
|
935
|
+
return (g.shadowroot || g.shadowrootmode) && (l = In.call(c, l, !0)), l;
|
|
1506
936
|
}
|
|
1507
|
-
let
|
|
1508
|
-
return
|
|
1509
|
-
` +
|
|
937
|
+
let y = V ? e.outerHTML : e.innerHTML;
|
|
938
|
+
return V && _["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && w(zo, e.ownerDocument.doctype.name) && (y = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
|
|
939
|
+
` + y), F && (y = zt(y)), R && vt ? nt(y) : y;
|
|
1510
940
|
}, n.setConfig = function() {
|
|
1511
|
-
let
|
|
1512
|
-
|
|
941
|
+
let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
942
|
+
ie(r), Kt = !0, It = _, Dt = g;
|
|
1513
943
|
}, n.clearConfig = function() {
|
|
1514
|
-
|
|
1515
|
-
}, n.isValidAttribute = function(
|
|
1516
|
-
|
|
1517
|
-
const i =
|
|
1518
|
-
return
|
|
1519
|
-
}, n.addHook = function(
|
|
1520
|
-
typeof t == "function" &&
|
|
1521
|
-
}, n.removeHook = function(
|
|
1522
|
-
if (
|
|
944
|
+
at = null, Kt = !1, It = null, Dt = null, R = $t, j = "";
|
|
945
|
+
}, n.isValidAttribute = function(r, t, e) {
|
|
946
|
+
at || ie({});
|
|
947
|
+
const i = E(r), a = E(t);
|
|
948
|
+
return Ve(i, a, e);
|
|
949
|
+
}, n.addHook = function(r, t) {
|
|
950
|
+
typeof t == "function" && D(h, r) && Tt(h[r], t);
|
|
951
|
+
}, n.removeHook = function(r, t) {
|
|
952
|
+
if (D(h, r)) {
|
|
1523
953
|
if (t !== void 0) {
|
|
1524
|
-
const e =
|
|
1525
|
-
return e === -1 ? void 0 :
|
|
954
|
+
const e = yo(h[r], t);
|
|
955
|
+
return e === -1 ? void 0 : To(h[r], e, 1)[0];
|
|
1526
956
|
}
|
|
1527
|
-
return
|
|
957
|
+
return nn(h[r]);
|
|
1528
958
|
}
|
|
1529
|
-
}, n.removeHooks = function(
|
|
1530
|
-
|
|
959
|
+
}, n.removeHooks = function(r) {
|
|
960
|
+
D(h, r) && (h[r] = []);
|
|
1531
961
|
}, n.removeAllHooks = function() {
|
|
1532
|
-
h =
|
|
962
|
+
h = hn();
|
|
1533
963
|
}, n;
|
|
1534
964
|
}
|
|
1535
|
-
var
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
svgFilters: !0
|
|
1541
|
-
},
|
|
965
|
+
var Yo = En();
|
|
966
|
+
const St = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map();
|
|
967
|
+
function An(o, n) {
|
|
968
|
+
const s = Yo.sanitize(o, {
|
|
969
|
+
USE_PROFILES: { svg: !0, svgFilters: !0 },
|
|
1542
970
|
FORBID_TAGS: ["script", "use"],
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
]
|
|
1550
|
-
}), l = new DOMParser().parseFromString(s, "image/svg+xml").documentElement;
|
|
1551
|
-
if (!(l instanceof SVGElement)) throw new Error(`Invalid SVG from ${n}`);
|
|
1552
|
-
return l;
|
|
1553
|
-
}
|
|
1554
|
-
async function jr(r) {
|
|
1555
|
-
const n = await fetch(r);
|
|
1556
|
-
if (!n.ok) throw new Error(`Failed to load icon: ${n.status}`);
|
|
1557
|
-
return bn(await n.text(), r);
|
|
1558
|
-
}
|
|
1559
|
-
async function hn(r) {
|
|
1560
|
-
return St.has(r) || St.set(r, jr(r)), (await St.get(r)).cloneNode(!0);
|
|
971
|
+
// <use> can SSRF to external hrefs
|
|
972
|
+
FORBID_ATTR: ["onload", "onerror", "onbegin", "href", "xlink:href"]
|
|
973
|
+
}), m = new DOMParser().parseFromString(s, "image/svg+xml").documentElement;
|
|
974
|
+
if (!(m instanceof SVGElement))
|
|
975
|
+
throw new Error(`Invalid SVG from ${n}`);
|
|
976
|
+
return m;
|
|
1561
977
|
}
|
|
1562
|
-
function
|
|
1563
|
-
|
|
1564
|
-
|
|
978
|
+
async function $o(o) {
|
|
979
|
+
const n = await fetch(o);
|
|
980
|
+
if (!n.ok)
|
|
981
|
+
throw new Error(`Failed to load icon: ${n.status}`);
|
|
982
|
+
return An(await n.text(), o);
|
|
1565
983
|
}
|
|
1566
|
-
function
|
|
1567
|
-
|
|
984
|
+
async function _n(o) {
|
|
985
|
+
return St.has(o) || St.set(o, $o(o)), (await St.get(o)).cloneNode(!0);
|
|
1568
986
|
}
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
987
|
+
function jo(o) {
|
|
988
|
+
let n = ge.get(o);
|
|
989
|
+
return n || (n = An(o, "inline SVG source"), ge.set(o, n)), n.cloneNode(!0);
|
|
1572
990
|
}
|
|
1573
|
-
function
|
|
1574
|
-
|
|
1575
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") p = Reflect.decorate(r, n, s, l);
|
|
1576
|
-
else for (var k = r.length - 1; k >= 0; k--) (y = r[k]) && (p = (u < 3 ? y(p) : u > 3 ? y(n, s, p) : y(n, s)) || p);
|
|
1577
|
-
return u > 3 && p && Object.defineProperty(n, s, p), p;
|
|
991
|
+
function ti(o) {
|
|
992
|
+
o ? St.delete(o) : (St.clear(), ge.clear());
|
|
1578
993
|
}
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
994
|
+
const Xo = ":host{display:inline-block;width:fit-content;height:fit-content;--_nys-icon-size: var( --nys-icon-size, .7em );box-sizing:content-box!important;vertical-align:middle}@supports (font-size: 1cap){:host{--_nys-icon-size: var(--nys-icon-size, 1cap)}}.nys-icon--svg{width:var(--_nys-icon-size, 1em);height:var(--_nys-icon-size, 1em);display:block;white-space:nowrap}.nys-icon--xs{width:calc(var(--_nys-icon-size) * .75);height:calc(var(--_nys-icon-size) * .75)}.nys-icon--sm{width:calc(var(--_nys-icon-size) * .875);height:calc(var(--_nys-icon-size) * .875)}.nys-icon--md{width:var(--_nys-icon-size);height:var(--_nys-icon-size)}.nys-icon--lg{width:calc(var(--_nys-icon-size) * 1.125);height:calc(var(--_nys-icon-size) * 1.125)}.nys-icon--xl{width:calc(var(--_nys-icon-size) * 1.25);height:calc(var(--_nys-icon-size) * 1.25)}.nys-icon--2xl{width:calc(var(--_nys-icon-size) * 1.5);height:calc(var(--_nys-icon-size) * 1.5)}.nys-icon--3xl{width:calc(var(--_nys-icon-size) * 1.875);height:calc(var(--_nys-icon-size) * 1.875)}.nys-icon--4xl{width:calc(var(--_nys-icon-size) * 2.25);height:calc(var(--_nys-icon-size) * 2.25)}.nys-icon--5xl{width:calc(var(--_nys-icon-size) * 3);height:calc(var(--_nys-icon-size) * 3)}.nys-icon--12{width:.75rem;height:.75rem}.nys-icon--14{width:.875rem;height:.875rem}.nys-icon--16{width:1rem;height:1rem}.nys-icon--18{width:1.125rem;height:1.125rem}.nys-icon--20{width:1.25rem;height:1.25rem}.nys-icon--24{width:1.5rem;height:1.5rem}.nys-icon--32{width:2rem;height:2rem}.nys-icon--40{width:2.5rem;height:2.5rem}.nys-icon--50{width:3.125rem;height:3.125rem}.nys-icon--flip-horizontal{transform:scaleX(-1)}.nys-icon--flip-vertical{transform:scaleY(-1)}.nys-icon--flip-both{transform:scale(-1)}";
|
|
995
|
+
var Vo = Object.defineProperty, B = (o, n, s, c) => {
|
|
996
|
+
for (var u = void 0, m = o.length - 1, T; m >= 0; m--)
|
|
997
|
+
(T = o[m]) && (u = T(n, s, u) || u);
|
|
998
|
+
return u && Vo(n, s, u), u;
|
|
999
|
+
}, W;
|
|
1000
|
+
const k = (W = class extends ro {
|
|
1001
|
+
constructor() {
|
|
1002
|
+
super(...arguments), this.name = "", this.library = "default", this.ariaLabel = "", this.rotate = "0", this.flip = "", this.color = "", this.size = "md", this._svg = null, this._loadSeq = 0, this._loadPromise = null;
|
|
1585
1003
|
}
|
|
1004
|
+
/** Resolves when the current icon load (if any) is complete. */
|
|
1586
1005
|
get updateComplete() {
|
|
1587
1006
|
return (async () => {
|
|
1588
1007
|
const n = await super.updateComplete;
|
|
@@ -1590,29 +1009,34 @@ var U = class An extends or {
|
|
|
1590
1009
|
})();
|
|
1591
1010
|
}
|
|
1592
1011
|
connectedCallback() {
|
|
1593
|
-
super.connectedCallback(), this._reflectHostSemantics(),
|
|
1012
|
+
super.connectedCallback(), this._reflectHostSemantics(), Je(this.library, this);
|
|
1594
1013
|
}
|
|
1595
1014
|
disconnectedCallback() {
|
|
1596
|
-
super.disconnectedCallback(),
|
|
1015
|
+
super.disconnectedCallback(), Qe(this.library, this);
|
|
1597
1016
|
}
|
|
1017
|
+
/** Called by the icon library registry when the current library changes. */
|
|
1598
1018
|
redraw() {
|
|
1599
1019
|
this._loadIcon();
|
|
1600
1020
|
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Lit calls firstUpdated after the first render, once all reactive
|
|
1023
|
+
* properties (including those set from the template) are resolved.
|
|
1024
|
+
* This guarantees the initial _loadIcon runs with the correct name
|
|
1025
|
+
* and library values, avoiding the race where updated() might not
|
|
1026
|
+
* fire for properties that equal their defaults.
|
|
1027
|
+
*/
|
|
1601
1028
|
firstUpdated() {
|
|
1602
1029
|
this._loadIcon();
|
|
1603
1030
|
}
|
|
1604
|
-
static {
|
|
1605
|
-
this._validName = /^[a-zA-Z0-9_-]+$/;
|
|
1606
|
-
}
|
|
1607
1031
|
updated(n) {
|
|
1608
|
-
if (n.has("name") && !
|
|
1032
|
+
if (n.has("name") && !W._validName.test(this.name)) {
|
|
1609
1033
|
console.warn(`nys-icon: invalid name "${this.name}" — ignored`), this._svg = null;
|
|
1610
1034
|
return;
|
|
1611
1035
|
}
|
|
1612
1036
|
if (n.has("name") || n.has("library")) {
|
|
1613
1037
|
if (n.has("library")) {
|
|
1614
1038
|
const s = n.get("library");
|
|
1615
|
-
s &&
|
|
1039
|
+
s && Qe(s, this), Je(this.library, this);
|
|
1616
1040
|
}
|
|
1617
1041
|
this._loadIcon();
|
|
1618
1042
|
}
|
|
@@ -1621,19 +1045,19 @@ var U = class An extends or {
|
|
|
1621
1045
|
_loadIcon() {
|
|
1622
1046
|
const n = ++this._loadSeq;
|
|
1623
1047
|
this._loadPromise = (async () => {
|
|
1624
|
-
const s =
|
|
1048
|
+
const s = lo(this.library);
|
|
1625
1049
|
if (!s || !this.name) {
|
|
1626
1050
|
this._svg = null;
|
|
1627
1051
|
return;
|
|
1628
1052
|
}
|
|
1629
1053
|
try {
|
|
1630
|
-
const
|
|
1054
|
+
const c = await s.resolver(this.name);
|
|
1631
1055
|
if (n !== this._loadSeq) return;
|
|
1632
|
-
if (!
|
|
1056
|
+
if (!c) {
|
|
1633
1057
|
this._svg = null;
|
|
1634
1058
|
return;
|
|
1635
1059
|
}
|
|
1636
|
-
const u = typeof
|
|
1060
|
+
const u = typeof c == "string" ? await _n(c) : c.type === "url" ? await _n(c.href) : jo(c.content);
|
|
1637
1061
|
if (n !== this._loadSeq) return;
|
|
1638
1062
|
s.mutator?.(u), this._applyAttributes(u), this._svg = u;
|
|
1639
1063
|
} catch {
|
|
@@ -1644,34 +1068,56 @@ var U = class An extends or {
|
|
|
1644
1068
|
_applyAttributes(n) {
|
|
1645
1069
|
n.setAttribute("role", "img"), this.ariaLabel ? (n.setAttribute("aria-label", this.ariaLabel), n.removeAttribute("aria-hidden")) : (n.setAttribute("aria-hidden", "true"), n.removeAttribute("aria-label")), this.rotate && this.rotate !== "0" ? n.style.rotate = `${this.rotate}deg` : n.style.removeProperty("rotate"), n.style.color = this.color || "currentcolor", n.classList.add(`nys-icon--${this.size}`), n.classList.add("nys-icon--svg"), this.flip && n.classList.add(`nys-icon--flip-${this.flip}`), this._reflectHostSemantics();
|
|
1646
1070
|
}
|
|
1071
|
+
/**
|
|
1072
|
+
* Reflects the icon's accessible state onto the host:
|
|
1073
|
+
* - Labeled icon -> role="img" + aria-label, no aria-hidden.
|
|
1074
|
+
* - Decorative -> aria-hidden="true", no role/label.
|
|
1075
|
+
*
|
|
1076
|
+
* These are reflected as host *attributes* (rather than via
|
|
1077
|
+
* ElementInternals) on purpose: aria-hidden / role / aria-label in
|
|
1078
|
+
* attribute form have universal, consistent assistive-technology support,
|
|
1079
|
+
* whereas AT support for these states set through ElementInternals is still
|
|
1080
|
+
* uneven across browser/screen-reader combinations. The host role/label
|
|
1081
|
+
* therefore depend on runtime state (ariaLabel), so defaultRole stays null.
|
|
1082
|
+
*/
|
|
1647
1083
|
_reflectHostSemantics() {
|
|
1648
1084
|
this.ariaLabel ? (this.setAttribute("role", "img"), this.setAttribute("aria-label", this.ariaLabel), this.removeAttribute("aria-hidden")) : (this.removeAttribute("role"), this.removeAttribute("aria-label"), this.setAttribute("aria-hidden", "true"));
|
|
1649
1085
|
}
|
|
1650
1086
|
render() {
|
|
1651
|
-
return this._svg ?
|
|
1087
|
+
return this._svg ? to`${this._svg}` : null;
|
|
1652
1088
|
}
|
|
1653
|
-
};
|
|
1654
|
-
|
|
1655
|
-
type: String,
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1089
|
+
}, W.styles = Qn(Xo), W._validName = /^[a-zA-Z0-9_-]+$/, W);
|
|
1090
|
+
B([
|
|
1091
|
+
J({ type: String, reflect: !0 })
|
|
1092
|
+
], k.prototype, "name");
|
|
1093
|
+
B([
|
|
1094
|
+
J({ type: String, reflect: !0 })
|
|
1095
|
+
], k.prototype, "library");
|
|
1096
|
+
B([
|
|
1097
|
+
J({ type: String })
|
|
1098
|
+
], k.prototype, "ariaLabel");
|
|
1099
|
+
B([
|
|
1100
|
+
J({ type: String })
|
|
1101
|
+
], k.prototype, "rotate");
|
|
1102
|
+
B([
|
|
1103
|
+
J({ type: String })
|
|
1104
|
+
], k.prototype, "flip");
|
|
1105
|
+
B([
|
|
1106
|
+
J({ type: String })
|
|
1107
|
+
], k.prototype, "color");
|
|
1108
|
+
B([
|
|
1109
|
+
J({ type: String })
|
|
1110
|
+
], k.prototype, "size");
|
|
1111
|
+
B([
|
|
1112
|
+
eo()
|
|
1113
|
+
], k.prototype, "_svg");
|
|
1114
|
+
let qo = k;
|
|
1115
|
+
customElements.get("nys-icon") || customElements.define("nys-icon", qo);
|
|
1669
1116
|
export {
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1117
|
+
qo as NysIcon,
|
|
1118
|
+
ti as clearIconCache,
|
|
1119
|
+
lo as getIconLibrary,
|
|
1120
|
+
Jo as registerIconLibrary,
|
|
1121
|
+
Qo as unregisterIconLibrary
|
|
1675
1122
|
};
|
|
1676
|
-
|
|
1677
|
-
//# sourceMappingURL=nys-icon.js.map
|
|
1123
|
+
//# sourceMappingURL=nys-icon.js.map
|