@decidables/detectable-elements 0.2.5 → 0.2.6
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/CHANGELOG.md +9 -0
- package/lib/detectableElements.esm.js +723 -1248
- package/lib/detectableElements.esm.js.map +1 -1
- package/lib/detectableElements.esm.min.js +225 -227
- package/lib/detectableElements.esm.min.js.map +1 -1
- package/lib/detectableElements.umd.js +725 -1250
- package/lib/detectableElements.umd.js.map +1 -1
- package/lib/detectableElements.umd.min.js +225 -227
- package/lib/detectableElements.umd.min.js.map +1 -1
- package/package.json +3 -3
- package/src/components/rdk-task.js +3 -45
- package/src/components/roc-space.js +2 -45
- package/src/components/sdt-model.js +2 -45
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const t$
|
|
7
|
-
e$
|
|
8
|
-
s$
|
|
9
|
-
n$
|
|
10
|
-
let o$
|
|
6
|
+
const t$1 = window,
|
|
7
|
+
e$2 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
8
|
+
s$3 = Symbol(),
|
|
9
|
+
n$3 = new WeakMap();
|
|
10
|
+
let o$3 = class o {
|
|
11
11
|
constructor(t, e, n) {
|
|
12
|
-
if (this._$cssResult$ = !0, n !== s$
|
|
12
|
+
if (this._$cssResult$ = !0, n !== s$3) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
13
13
|
this.cssText = t, this.t = e;
|
|
14
14
|
}
|
|
15
15
|
get styleSheet() {
|
|
16
16
|
let t = this.o;
|
|
17
17
|
const s = this.t;
|
|
18
|
-
if (e$
|
|
18
|
+
if (e$2 && void 0 === t) {
|
|
19
19
|
const e = void 0 !== s && 1 === s.length;
|
|
20
|
-
e && (t = n$
|
|
20
|
+
e && (t = n$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$3.set(s, t));
|
|
21
21
|
}
|
|
22
22
|
return t;
|
|
23
23
|
}
|
|
@@ -25,608 +25,26 @@ let o$6 = class o {
|
|
|
25
25
|
return this.cssText;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
const r$
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const n = document.createElement("style"),
|
|
32
|
-
o = t$3.litNonce;
|
|
33
|
-
void 0 !== o && n.setAttribute("nonce", o), n.textContent = e.cssText, s.appendChild(n);
|
|
34
|
-
});
|
|
35
|
-
},
|
|
36
|
-
c$2 = e$5 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
37
|
-
let e = "";
|
|
38
|
-
for (const s of t.cssRules) e += s.cssText;
|
|
39
|
-
return r$5(e);
|
|
40
|
-
})(t) : t;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @license
|
|
44
|
-
* Copyright 2017 Google LLC
|
|
45
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
-
*/
|
|
47
|
-
var s$5;
|
|
48
|
-
const e$4 = window,
|
|
49
|
-
r$4 = e$4.trustedTypes,
|
|
50
|
-
h$3 = r$4 ? r$4.emptyScript : "",
|
|
51
|
-
o$5 = e$4.reactiveElementPolyfillSupport,
|
|
52
|
-
n$5 = {
|
|
53
|
-
toAttribute(t, i) {
|
|
54
|
-
switch (i) {
|
|
55
|
-
case Boolean:
|
|
56
|
-
t = t ? h$3 : null;
|
|
57
|
-
break;
|
|
58
|
-
case Object:
|
|
59
|
-
case Array:
|
|
60
|
-
t = null == t ? t : JSON.stringify(t);
|
|
61
|
-
}
|
|
62
|
-
return t;
|
|
63
|
-
},
|
|
64
|
-
fromAttribute(t, i) {
|
|
65
|
-
let s = t;
|
|
66
|
-
switch (i) {
|
|
67
|
-
case Boolean:
|
|
68
|
-
s = null !== t;
|
|
69
|
-
break;
|
|
70
|
-
case Number:
|
|
71
|
-
s = null === t ? null : Number(t);
|
|
72
|
-
break;
|
|
73
|
-
case Object:
|
|
74
|
-
case Array:
|
|
75
|
-
try {
|
|
76
|
-
s = JSON.parse(t);
|
|
77
|
-
} catch (t) {
|
|
78
|
-
s = null;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return s;
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
a$3 = (t, i) => i !== t && (i == i || t == t),
|
|
85
|
-
l$5 = {
|
|
86
|
-
attribute: !0,
|
|
87
|
-
type: String,
|
|
88
|
-
converter: n$5,
|
|
89
|
-
reflect: !1,
|
|
90
|
-
hasChanged: a$3
|
|
91
|
-
};
|
|
92
|
-
let d$2 = class d extends HTMLElement {
|
|
93
|
-
constructor() {
|
|
94
|
-
super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
95
|
-
}
|
|
96
|
-
static addInitializer(t) {
|
|
97
|
-
var i;
|
|
98
|
-
this.finalize(), (null !== (i = this.h) && void 0 !== i ? i : this.h = []).push(t);
|
|
99
|
-
}
|
|
100
|
-
static get observedAttributes() {
|
|
101
|
-
this.finalize();
|
|
102
|
-
const t = [];
|
|
103
|
-
return this.elementProperties.forEach((i, s) => {
|
|
104
|
-
const e = this._$Ep(s, i);
|
|
105
|
-
void 0 !== e && (this._$Ev.set(e, s), t.push(e));
|
|
106
|
-
}), t;
|
|
107
|
-
}
|
|
108
|
-
static createProperty(t, i = l$5) {
|
|
109
|
-
if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
110
|
-
const s = "symbol" == typeof t ? Symbol() : "__" + t,
|
|
111
|
-
e = this.getPropertyDescriptor(t, s, i);
|
|
112
|
-
void 0 !== e && Object.defineProperty(this.prototype, t, e);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
static getPropertyDescriptor(t, i, s) {
|
|
116
|
-
return {
|
|
117
|
-
get() {
|
|
118
|
-
return this[i];
|
|
119
|
-
},
|
|
120
|
-
set(e) {
|
|
121
|
-
const r = this[t];
|
|
122
|
-
this[i] = e, this.requestUpdate(t, r, s);
|
|
123
|
-
},
|
|
124
|
-
configurable: !0,
|
|
125
|
-
enumerable: !0
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
static getPropertyOptions(t) {
|
|
129
|
-
return this.elementProperties.get(t) || l$5;
|
|
130
|
-
}
|
|
131
|
-
static finalize() {
|
|
132
|
-
if (this.hasOwnProperty("finalized")) return !1;
|
|
133
|
-
this.finalized = !0;
|
|
134
|
-
const t = Object.getPrototypeOf(this);
|
|
135
|
-
if (t.finalize(), void 0 !== t.h && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = new Map(), this.hasOwnProperty("properties")) {
|
|
136
|
-
const t = this.properties,
|
|
137
|
-
i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
138
|
-
for (const s of i) this.createProperty(s, t[s]);
|
|
139
|
-
}
|
|
140
|
-
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
141
|
-
}
|
|
142
|
-
static finalizeStyles(i) {
|
|
143
|
-
const s = [];
|
|
144
|
-
if (Array.isArray(i)) {
|
|
145
|
-
const e = new Set(i.flat(1 / 0).reverse());
|
|
146
|
-
for (const i of e) s.unshift(c$2(i));
|
|
147
|
-
} else void 0 !== i && s.push(c$2(i));
|
|
148
|
-
return s;
|
|
149
|
-
}
|
|
150
|
-
static _$Ep(t, i) {
|
|
151
|
-
const s = i.attribute;
|
|
152
|
-
return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
153
|
-
}
|
|
154
|
-
u() {
|
|
155
|
-
var t;
|
|
156
|
-
this._$E_ = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Eg(), this.requestUpdate(), null === (t = this.constructor.h) || void 0 === t || t.forEach(t => t(this));
|
|
157
|
-
}
|
|
158
|
-
addController(t) {
|
|
159
|
-
var i, s;
|
|
160
|
-
(null !== (i = this._$ES) && void 0 !== i ? i : this._$ES = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
|
|
161
|
-
}
|
|
162
|
-
removeController(t) {
|
|
163
|
-
var i;
|
|
164
|
-
null === (i = this._$ES) || void 0 === i || i.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
165
|
-
}
|
|
166
|
-
_$Eg() {
|
|
167
|
-
this.constructor.elementProperties.forEach((t, i) => {
|
|
168
|
-
this.hasOwnProperty(i) && (this._$Ei.set(i, this[i]), delete this[i]);
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
createRenderRoot() {
|
|
172
|
-
var t;
|
|
173
|
-
const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
174
|
-
return S$3(s, this.constructor.elementStyles), s;
|
|
175
|
-
}
|
|
176
|
-
connectedCallback() {
|
|
177
|
-
var t;
|
|
178
|
-
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
179
|
-
var i;
|
|
180
|
-
return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
enableUpdating(t) {}
|
|
184
|
-
disconnectedCallback() {
|
|
185
|
-
var t;
|
|
186
|
-
null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
187
|
-
var i;
|
|
188
|
-
return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
attributeChangedCallback(t, i, s) {
|
|
192
|
-
this._$AK(t, s);
|
|
193
|
-
}
|
|
194
|
-
_$EO(t, i, s = l$5) {
|
|
195
|
-
var e;
|
|
196
|
-
const r = this.constructor._$Ep(t, s);
|
|
197
|
-
if (void 0 !== r && !0 === s.reflect) {
|
|
198
|
-
const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$5).toAttribute(i, s.type);
|
|
199
|
-
this._$El = t, null == h ? this.removeAttribute(r) : this.setAttribute(r, h), this._$El = null;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
_$AK(t, i) {
|
|
203
|
-
var s;
|
|
204
|
-
const e = this.constructor,
|
|
205
|
-
r = e._$Ev.get(t);
|
|
206
|
-
if (void 0 !== r && this._$El !== r) {
|
|
207
|
-
const t = e.getPropertyOptions(r),
|
|
208
|
-
h = "function" == typeof t.converter ? {
|
|
209
|
-
fromAttribute: t.converter
|
|
210
|
-
} : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$5;
|
|
211
|
-
this._$El = r, this[r] = h.fromAttribute(i, t.type), this._$El = null;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
requestUpdate(t, i, s) {
|
|
215
|
-
let e = !0;
|
|
216
|
-
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || a$3)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$El !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$E_ = this._$Ej());
|
|
217
|
-
}
|
|
218
|
-
async _$Ej() {
|
|
219
|
-
this.isUpdatePending = !0;
|
|
220
|
-
try {
|
|
221
|
-
await this._$E_;
|
|
222
|
-
} catch (t) {
|
|
223
|
-
Promise.reject(t);
|
|
224
|
-
}
|
|
225
|
-
const t = this.scheduleUpdate();
|
|
226
|
-
return null != t && (await t), !this.isUpdatePending;
|
|
227
|
-
}
|
|
228
|
-
scheduleUpdate() {
|
|
229
|
-
return this.performUpdate();
|
|
230
|
-
}
|
|
231
|
-
performUpdate() {
|
|
232
|
-
var t;
|
|
233
|
-
if (!this.isUpdatePending) return;
|
|
234
|
-
this.hasUpdated, this._$Ei && (this._$Ei.forEach((t, i) => this[i] = t), this._$Ei = void 0);
|
|
235
|
-
let i = !1;
|
|
236
|
-
const s = this._$AL;
|
|
237
|
-
try {
|
|
238
|
-
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
239
|
-
var i;
|
|
240
|
-
return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
|
|
241
|
-
}), this.update(s)) : this._$Ek();
|
|
242
|
-
} catch (t) {
|
|
243
|
-
throw i = !1, this._$Ek(), t;
|
|
244
|
-
}
|
|
245
|
-
i && this._$AE(s);
|
|
246
|
-
}
|
|
247
|
-
willUpdate(t) {}
|
|
248
|
-
_$AE(t) {
|
|
249
|
-
var i;
|
|
250
|
-
null === (i = this._$ES) || void 0 === i || i.forEach(t => {
|
|
251
|
-
var i;
|
|
252
|
-
return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
|
|
253
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
254
|
-
}
|
|
255
|
-
_$Ek() {
|
|
256
|
-
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
257
|
-
}
|
|
258
|
-
get updateComplete() {
|
|
259
|
-
return this.getUpdateComplete();
|
|
260
|
-
}
|
|
261
|
-
getUpdateComplete() {
|
|
262
|
-
return this._$E_;
|
|
263
|
-
}
|
|
264
|
-
shouldUpdate(t) {
|
|
265
|
-
return !0;
|
|
266
|
-
}
|
|
267
|
-
update(t) {
|
|
268
|
-
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$EO(i, this[i], t)), this._$EC = void 0), this._$Ek();
|
|
269
|
-
}
|
|
270
|
-
updated(t) {}
|
|
271
|
-
firstUpdated(t) {}
|
|
272
|
-
};
|
|
273
|
-
d$2.finalized = !0, d$2.elementProperties = new Map(), d$2.elementStyles = [], d$2.shadowRootOptions = {
|
|
274
|
-
mode: "open"
|
|
275
|
-
}, null == o$5 || o$5({
|
|
276
|
-
ReactiveElement: d$2
|
|
277
|
-
}), (null !== (s$5 = e$4.reactiveElementVersions) && void 0 !== s$5 ? s$5 : e$4.reactiveElementVersions = []).push("1.6.1");
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* @license
|
|
281
|
-
* Copyright 2017 Google LLC
|
|
282
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
283
|
-
*/
|
|
284
|
-
var t$2;
|
|
285
|
-
const i$2 = window,
|
|
286
|
-
s$4 = i$2.trustedTypes,
|
|
287
|
-
e$3 = s$4 ? s$4.createPolicy("lit-html", {
|
|
288
|
-
createHTML: t => t
|
|
289
|
-
}) : void 0,
|
|
290
|
-
o$4 = "$lit$",
|
|
291
|
-
n$4 = `lit$${(Math.random() + "").slice(9)}$`,
|
|
292
|
-
l$4 = "?" + n$4,
|
|
293
|
-
h$2 = `<${l$4}>`,
|
|
294
|
-
r$3 = document,
|
|
295
|
-
u$1 = () => r$3.createComment(""),
|
|
296
|
-
d$1 = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
297
|
-
c$1 = Array.isArray,
|
|
298
|
-
v$1 = t => c$1(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
|
|
299
|
-
a$2 = "[ \t\n\f\r]",
|
|
300
|
-
f$1 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
301
|
-
_$1 = /-->/g,
|
|
302
|
-
m$1 = />/g,
|
|
303
|
-
p$1 = RegExp(`>|${a$2}(?:([^\\s"'>=/]+)(${a$2}*=${a$2}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
304
|
-
g$1 = /'/g,
|
|
305
|
-
$$1 = /"/g,
|
|
306
|
-
y$2 = /^(?:script|style|textarea|title)$/i,
|
|
307
|
-
T$1 = Symbol.for("lit-noChange"),
|
|
308
|
-
A$1 = Symbol.for("lit-nothing"),
|
|
309
|
-
E$1 = new WeakMap(),
|
|
310
|
-
C$1 = r$3.createTreeWalker(r$3, 129, null, !1);
|
|
311
|
-
function P$1(t, i) {
|
|
312
|
-
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
313
|
-
return void 0 !== e$3 ? e$3.createHTML(i) : i;
|
|
314
|
-
}
|
|
315
|
-
const V$1 = (t, i) => {
|
|
316
|
-
const s = t.length - 1,
|
|
317
|
-
e = [];
|
|
318
|
-
let l,
|
|
319
|
-
r = 2 === i ? "<svg>" : "",
|
|
320
|
-
u = f$1;
|
|
321
|
-
for (let i = 0; i < s; i++) {
|
|
322
|
-
const s = t[i];
|
|
323
|
-
let d,
|
|
324
|
-
c,
|
|
325
|
-
v = -1,
|
|
326
|
-
a = 0;
|
|
327
|
-
for (; a < s.length && (u.lastIndex = a, c = u.exec(s), null !== c);) a = u.lastIndex, u === f$1 ? "!--" === c[1] ? u = _$1 : void 0 !== c[1] ? u = m$1 : void 0 !== c[2] ? (y$2.test(c[2]) && (l = RegExp("</" + c[2], "g")), u = p$1) : void 0 !== c[3] && (u = p$1) : u === p$1 ? ">" === c[0] ? (u = null != l ? l : f$1, v = -1) : void 0 === c[1] ? v = -2 : (v = u.lastIndex - c[2].length, d = c[1], u = void 0 === c[3] ? p$1 : '"' === c[3] ? $$1 : g$1) : u === $$1 || u === g$1 ? u = p$1 : u === _$1 || u === m$1 ? u = f$1 : (u = p$1, l = void 0);
|
|
328
|
-
const w = u === p$1 && t[i + 1].startsWith("/>") ? " " : "";
|
|
329
|
-
r += u === f$1 ? s + h$2 : v >= 0 ? (e.push(d), s.slice(0, v) + o$4 + s.slice(v) + n$4 + w) : s + n$4 + (-2 === v ? (e.push(void 0), i) : w);
|
|
330
|
-
}
|
|
331
|
-
return [P$1(t, r + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), e];
|
|
332
|
-
};
|
|
333
|
-
let N$1 = class N {
|
|
334
|
-
constructor({
|
|
335
|
-
strings: t,
|
|
336
|
-
_$litType$: i
|
|
337
|
-
}, e) {
|
|
338
|
-
let h;
|
|
339
|
-
this.parts = [];
|
|
340
|
-
let r = 0,
|
|
341
|
-
d = 0;
|
|
342
|
-
const c = t.length - 1,
|
|
343
|
-
v = this.parts,
|
|
344
|
-
[a, f] = V$1(t, i);
|
|
345
|
-
if (this.el = N.createElement(a, e), C$1.currentNode = this.el.content, 2 === i) {
|
|
346
|
-
const t = this.el.content,
|
|
347
|
-
i = t.firstChild;
|
|
348
|
-
i.remove(), t.append(...i.childNodes);
|
|
349
|
-
}
|
|
350
|
-
for (; null !== (h = C$1.nextNode()) && v.length < c;) {
|
|
351
|
-
if (1 === h.nodeType) {
|
|
352
|
-
if (h.hasAttributes()) {
|
|
353
|
-
const t = [];
|
|
354
|
-
for (const i of h.getAttributeNames()) if (i.endsWith(o$4) || i.startsWith(n$4)) {
|
|
355
|
-
const s = f[d++];
|
|
356
|
-
if (t.push(i), void 0 !== s) {
|
|
357
|
-
const t = h.getAttribute(s.toLowerCase() + o$4).split(n$4),
|
|
358
|
-
i = /([.?@])?(.*)/.exec(s);
|
|
359
|
-
v.push({
|
|
360
|
-
type: 1,
|
|
361
|
-
index: r,
|
|
362
|
-
name: i[2],
|
|
363
|
-
strings: t,
|
|
364
|
-
ctor: "." === i[1] ? H$1 : "?" === i[1] ? L$1 : "@" === i[1] ? z$1 : k$1
|
|
365
|
-
});
|
|
366
|
-
} else v.push({
|
|
367
|
-
type: 6,
|
|
368
|
-
index: r
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
for (const i of t) h.removeAttribute(i);
|
|
372
|
-
}
|
|
373
|
-
if (y$2.test(h.tagName)) {
|
|
374
|
-
const t = h.textContent.split(n$4),
|
|
375
|
-
i = t.length - 1;
|
|
376
|
-
if (i > 0) {
|
|
377
|
-
h.textContent = s$4 ? s$4.emptyScript : "";
|
|
378
|
-
for (let s = 0; s < i; s++) h.append(t[s], u$1()), C$1.nextNode(), v.push({
|
|
379
|
-
type: 2,
|
|
380
|
-
index: ++r
|
|
381
|
-
});
|
|
382
|
-
h.append(t[i], u$1());
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
} else if (8 === h.nodeType) if (h.data === l$4) v.push({
|
|
386
|
-
type: 2,
|
|
387
|
-
index: r
|
|
388
|
-
});else {
|
|
389
|
-
let t = -1;
|
|
390
|
-
for (; -1 !== (t = h.data.indexOf(n$4, t + 1));) v.push({
|
|
391
|
-
type: 7,
|
|
392
|
-
index: r
|
|
393
|
-
}), t += n$4.length - 1;
|
|
394
|
-
}
|
|
395
|
-
r++;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
static createElement(t, i) {
|
|
399
|
-
const s = r$3.createElement("template");
|
|
400
|
-
return s.innerHTML = t, s;
|
|
401
|
-
}
|
|
402
|
-
};
|
|
403
|
-
function S$2(t, i, s = t, e) {
|
|
404
|
-
var o, n, l, h;
|
|
405
|
-
if (i === T$1) return i;
|
|
406
|
-
let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
|
|
407
|
-
const u = d$1(i) ? void 0 : i._$litDirective$;
|
|
408
|
-
return (null == r ? void 0 : r.constructor) !== u && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === u ? r = void 0 : (r = new u(t), r._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Co) && void 0 !== l ? l : h._$Co = [])[e] = r : s._$Cl = r), void 0 !== r && (i = S$2(t, r._$AS(t, i.values), r, e)), i;
|
|
409
|
-
}
|
|
410
|
-
let M$1 = class M {
|
|
411
|
-
constructor(t, i) {
|
|
412
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
413
|
-
}
|
|
414
|
-
get parentNode() {
|
|
415
|
-
return this._$AM.parentNode;
|
|
416
|
-
}
|
|
417
|
-
get _$AU() {
|
|
418
|
-
return this._$AM._$AU;
|
|
419
|
-
}
|
|
420
|
-
u(t) {
|
|
421
|
-
var i;
|
|
422
|
-
const {
|
|
423
|
-
el: {
|
|
424
|
-
content: s
|
|
425
|
-
},
|
|
426
|
-
parts: e
|
|
427
|
-
} = this._$AD,
|
|
428
|
-
o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r$3).importNode(s, !0);
|
|
429
|
-
C$1.currentNode = o;
|
|
430
|
-
let n = C$1.nextNode(),
|
|
431
|
-
l = 0,
|
|
432
|
-
h = 0,
|
|
433
|
-
u = e[0];
|
|
434
|
-
for (; void 0 !== u;) {
|
|
435
|
-
if (l === u.index) {
|
|
436
|
-
let i;
|
|
437
|
-
2 === u.type ? i = new R$1(n, n.nextSibling, this, t) : 1 === u.type ? i = new u.ctor(n, u.name, u.strings, this, t) : 6 === u.type && (i = new Z(n, this, t)), this._$AV.push(i), u = e[++h];
|
|
438
|
-
}
|
|
439
|
-
l !== (null == u ? void 0 : u.index) && (n = C$1.nextNode(), l++);
|
|
440
|
-
}
|
|
441
|
-
return C$1.currentNode = r$3, o;
|
|
442
|
-
}
|
|
443
|
-
v(t) {
|
|
444
|
-
let i = 0;
|
|
445
|
-
for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
let R$1 = class R {
|
|
449
|
-
constructor(t, i, s, e) {
|
|
450
|
-
var o;
|
|
451
|
-
this.type = 2, this._$AH = A$1, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cp = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
|
|
452
|
-
}
|
|
453
|
-
get _$AU() {
|
|
454
|
-
var t, i;
|
|
455
|
-
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cp;
|
|
456
|
-
}
|
|
457
|
-
get parentNode() {
|
|
458
|
-
let t = this._$AA.parentNode;
|
|
459
|
-
const i = this._$AM;
|
|
460
|
-
return void 0 !== i && 11 === (null == t ? void 0 : t.nodeType) && (t = i.parentNode), t;
|
|
461
|
-
}
|
|
462
|
-
get startNode() {
|
|
463
|
-
return this._$AA;
|
|
464
|
-
}
|
|
465
|
-
get endNode() {
|
|
466
|
-
return this._$AB;
|
|
467
|
-
}
|
|
468
|
-
_$AI(t, i = this) {
|
|
469
|
-
t = S$2(this, t, i), d$1(t) ? t === A$1 || null == t || "" === t ? (this._$AH !== A$1 && this._$AR(), this._$AH = A$1) : t !== this._$AH && t !== T$1 && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : v$1(t) ? this.T(t) : this._(t);
|
|
470
|
-
}
|
|
471
|
-
k(t) {
|
|
472
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
473
|
-
}
|
|
474
|
-
$(t) {
|
|
475
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
476
|
-
}
|
|
477
|
-
_(t) {
|
|
478
|
-
this._$AH !== A$1 && d$1(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r$3.createTextNode(t)), this._$AH = t;
|
|
479
|
-
}
|
|
480
|
-
g(t) {
|
|
481
|
-
var i;
|
|
482
|
-
const {
|
|
483
|
-
values: s,
|
|
484
|
-
_$litType$: e
|
|
485
|
-
} = t,
|
|
486
|
-
o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = N$1.createElement(P$1(e.h, e.h[0]), this.options)), e);
|
|
487
|
-
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.v(s);else {
|
|
488
|
-
const t = new M$1(o, this),
|
|
489
|
-
i = t.u(this.options);
|
|
490
|
-
t.v(s), this.$(i), this._$AH = t;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
_$AC(t) {
|
|
494
|
-
let i = E$1.get(t.strings);
|
|
495
|
-
return void 0 === i && E$1.set(t.strings, i = new N$1(t)), i;
|
|
496
|
-
}
|
|
497
|
-
T(t) {
|
|
498
|
-
c$1(this._$AH) || (this._$AH = [], this._$AR());
|
|
499
|
-
const i = this._$AH;
|
|
500
|
-
let s,
|
|
501
|
-
e = 0;
|
|
502
|
-
for (const o of t) e === i.length ? i.push(s = new R(this.k(u$1()), this.k(u$1()), this, this.options)) : s = i[e], s._$AI(o), e++;
|
|
503
|
-
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
504
|
-
}
|
|
505
|
-
_$AR(t = this._$AA.nextSibling, i) {
|
|
506
|
-
var s;
|
|
507
|
-
for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
|
|
508
|
-
const i = t.nextSibling;
|
|
509
|
-
t.remove(), t = i;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
setConnected(t) {
|
|
513
|
-
var i;
|
|
514
|
-
void 0 === this._$AM && (this._$Cp = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
|
|
515
|
-
}
|
|
516
|
-
};
|
|
517
|
-
let k$1 = class k {
|
|
518
|
-
constructor(t, i, s, e, o) {
|
|
519
|
-
this.type = 1, this._$AH = A$1, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = o, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = A$1;
|
|
520
|
-
}
|
|
521
|
-
get tagName() {
|
|
522
|
-
return this.element.tagName;
|
|
523
|
-
}
|
|
524
|
-
get _$AU() {
|
|
525
|
-
return this._$AM._$AU;
|
|
526
|
-
}
|
|
527
|
-
_$AI(t, i = this, s, e) {
|
|
528
|
-
const o = this.strings;
|
|
529
|
-
let n = !1;
|
|
530
|
-
if (void 0 === o) t = S$2(this, t, i, 0), n = !d$1(t) || t !== this._$AH && t !== T$1, n && (this._$AH = t);else {
|
|
531
|
-
const e = t;
|
|
532
|
-
let l, h;
|
|
533
|
-
for (t = o[0], l = 0; l < o.length - 1; l++) h = S$2(this, e[s + l], i, l), h === T$1 && (h = this._$AH[l]), n || (n = !d$1(h) || h !== this._$AH[l]), h === A$1 ? t = A$1 : t !== A$1 && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
|
|
534
|
-
}
|
|
535
|
-
n && !e && this.j(t);
|
|
536
|
-
}
|
|
537
|
-
j(t) {
|
|
538
|
-
t === A$1 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
|
|
539
|
-
}
|
|
540
|
-
};
|
|
541
|
-
let H$1 = class H extends k$1 {
|
|
542
|
-
constructor() {
|
|
543
|
-
super(...arguments), this.type = 3;
|
|
544
|
-
}
|
|
545
|
-
j(t) {
|
|
546
|
-
this.element[this.name] = t === A$1 ? void 0 : t;
|
|
547
|
-
}
|
|
548
|
-
};
|
|
549
|
-
const I$1 = s$4 ? s$4.emptyScript : "";
|
|
550
|
-
let L$1 = class L extends k$1 {
|
|
551
|
-
constructor() {
|
|
552
|
-
super(...arguments), this.type = 4;
|
|
553
|
-
}
|
|
554
|
-
j(t) {
|
|
555
|
-
t && t !== A$1 ? this.element.setAttribute(this.name, I$1) : this.element.removeAttribute(this.name);
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
let z$1 = class z extends k$1 {
|
|
559
|
-
constructor(t, i, s, e, o) {
|
|
560
|
-
super(t, i, s, e, o), this.type = 5;
|
|
561
|
-
}
|
|
562
|
-
_$AI(t, i = this) {
|
|
563
|
-
var s;
|
|
564
|
-
if ((t = null !== (s = S$2(this, t, i, 0)) && void 0 !== s ? s : A$1) === T$1) return;
|
|
565
|
-
const e = this._$AH,
|
|
566
|
-
o = t === A$1 && e !== A$1 || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
|
|
567
|
-
n = t !== A$1 && (e === A$1 || o);
|
|
568
|
-
o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
569
|
-
}
|
|
570
|
-
handleEvent(t) {
|
|
571
|
-
var i, s;
|
|
572
|
-
"function" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);
|
|
573
|
-
}
|
|
574
|
-
};
|
|
575
|
-
class Z {
|
|
576
|
-
constructor(t, i, s) {
|
|
577
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
578
|
-
}
|
|
579
|
-
get _$AU() {
|
|
580
|
-
return this._$AM._$AU;
|
|
581
|
-
}
|
|
582
|
-
_$AI(t) {
|
|
583
|
-
S$2(this, t);
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
const B$1 = i$2.litHtmlPolyfillSupport;
|
|
587
|
-
null == B$1 || B$1(N$1, R$1), (null !== (t$2 = i$2.litHtmlVersions) && void 0 !== t$2 ? t$2 : i$2.litHtmlVersions = []).push("2.8.0");
|
|
588
|
-
|
|
589
|
-
/**
|
|
590
|
-
* @license
|
|
591
|
-
* Copyright 2019 Google LLC
|
|
592
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
593
|
-
*/
|
|
594
|
-
const t$1 = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
595
|
-
e$2 = Symbol(),
|
|
596
|
-
n$3 = new Map();
|
|
597
|
-
let s$3 = class s {
|
|
598
|
-
constructor(t, n) {
|
|
599
|
-
if (this._$cssResult$ = !0, n !== e$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
600
|
-
this.cssText = t;
|
|
601
|
-
}
|
|
602
|
-
get styleSheet() {
|
|
603
|
-
let e = n$3.get(this.cssText);
|
|
604
|
-
return t$1 && void 0 === e && (n$3.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
|
|
605
|
-
}
|
|
606
|
-
toString() {
|
|
607
|
-
return this.cssText;
|
|
608
|
-
}
|
|
609
|
-
};
|
|
610
|
-
const o$3 = t => new s$3("string" == typeof t ? t : t + "", e$2),
|
|
611
|
-
r$2 = (t, ...n) => {
|
|
612
|
-
const o = 1 === t.length ? t[0] : n.reduce((e, n, s) => e + (t => {
|
|
28
|
+
const r$2 = t => new o$3("string" == typeof t ? t : t + "", void 0, s$3),
|
|
29
|
+
i$1 = (t, ...e) => {
|
|
30
|
+
const n = 1 === t.length ? t[0] : e.reduce((e, s, n) => e + (t => {
|
|
613
31
|
if (!0 === t._$cssResult$) return t.cssText;
|
|
614
32
|
if ("number" == typeof t) return t;
|
|
615
33
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
616
|
-
})(
|
|
617
|
-
return new
|
|
34
|
+
})(s) + t[n + 1], t[0]);
|
|
35
|
+
return new o$3(n, t, s$3);
|
|
618
36
|
},
|
|
619
|
-
|
|
620
|
-
|
|
37
|
+
S$1 = (s, n) => {
|
|
38
|
+
e$2 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
|
|
621
39
|
const n = document.createElement("style"),
|
|
622
|
-
|
|
623
|
-
void 0 !==
|
|
40
|
+
o = t$1.litNonce;
|
|
41
|
+
void 0 !== o && n.setAttribute("nonce", o), n.textContent = e.cssText, s.appendChild(n);
|
|
624
42
|
});
|
|
625
43
|
},
|
|
626
|
-
|
|
44
|
+
c$1 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
627
45
|
let e = "";
|
|
628
|
-
for (const
|
|
629
|
-
return
|
|
46
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
47
|
+
return r$2(e);
|
|
630
48
|
})(t) : t;
|
|
631
49
|
|
|
632
50
|
/**
|
|
@@ -635,14 +53,15 @@ const o$3 = t => new s$3("string" == typeof t ? t : t + "", e$2),
|
|
|
635
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
636
54
|
*/
|
|
637
55
|
var s$2;
|
|
638
|
-
const e$1 = window
|
|
639
|
-
r$1 = e$1
|
|
640
|
-
h$1 =
|
|
641
|
-
o$2 =
|
|
56
|
+
const e$1 = window,
|
|
57
|
+
r$1 = e$1.trustedTypes,
|
|
58
|
+
h$1 = r$1 ? r$1.emptyScript : "",
|
|
59
|
+
o$2 = e$1.reactiveElementPolyfillSupport,
|
|
60
|
+
n$2 = {
|
|
642
61
|
toAttribute(t, i) {
|
|
643
62
|
switch (i) {
|
|
644
63
|
case Boolean:
|
|
645
|
-
t = t ?
|
|
64
|
+
t = t ? h$1 : null;
|
|
646
65
|
break;
|
|
647
66
|
case Object:
|
|
648
67
|
case Array:
|
|
@@ -670,28 +89,29 @@ const e$1 = window.trustedTypes,
|
|
|
670
89
|
return s;
|
|
671
90
|
}
|
|
672
91
|
},
|
|
673
|
-
|
|
92
|
+
a$1 = (t, i) => i !== t && (i == i || t == t),
|
|
674
93
|
l$3 = {
|
|
675
94
|
attribute: !0,
|
|
676
95
|
type: String,
|
|
677
|
-
converter:
|
|
96
|
+
converter: n$2,
|
|
678
97
|
reflect: !1,
|
|
679
|
-
hasChanged:
|
|
680
|
-
}
|
|
681
|
-
|
|
98
|
+
hasChanged: a$1
|
|
99
|
+
},
|
|
100
|
+
d$1 = "finalized";
|
|
101
|
+
let u$1 = class u extends HTMLElement {
|
|
682
102
|
constructor() {
|
|
683
|
-
super(), this._$
|
|
103
|
+
super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
684
104
|
}
|
|
685
105
|
static addInitializer(t) {
|
|
686
106
|
var i;
|
|
687
|
-
null !== (i = this.
|
|
107
|
+
this.finalize(), (null !== (i = this.h) && void 0 !== i ? i : this.h = []).push(t);
|
|
688
108
|
}
|
|
689
109
|
static get observedAttributes() {
|
|
690
110
|
this.finalize();
|
|
691
111
|
const t = [];
|
|
692
112
|
return this.elementProperties.forEach((i, s) => {
|
|
693
|
-
const e = this._$
|
|
694
|
-
void 0 !== e && (this._$
|
|
113
|
+
const e = this._$Ep(s, i);
|
|
114
|
+
void 0 !== e && (this._$Ev.set(e, s), t.push(e));
|
|
695
115
|
}), t;
|
|
696
116
|
}
|
|
697
117
|
static createProperty(t, i = l$3) {
|
|
@@ -718,10 +138,10 @@ let a$1 = class a extends HTMLElement {
|
|
|
718
138
|
return this.elementProperties.get(t) || l$3;
|
|
719
139
|
}
|
|
720
140
|
static finalize() {
|
|
721
|
-
if (this.hasOwnProperty(
|
|
722
|
-
this
|
|
141
|
+
if (this.hasOwnProperty(d$1)) return !1;
|
|
142
|
+
this[d$1] = !0;
|
|
723
143
|
const t = Object.getPrototypeOf(this);
|
|
724
|
-
if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$
|
|
144
|
+
if (t.finalize(), void 0 !== t.h && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = new Map(), this.hasOwnProperty("properties")) {
|
|
725
145
|
const t = this.properties,
|
|
726
146
|
i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
727
147
|
for (const s of i) this.createProperty(s, t[s]);
|
|
@@ -732,39 +152,39 @@ let a$1 = class a extends HTMLElement {
|
|
|
732
152
|
const s = [];
|
|
733
153
|
if (Array.isArray(i)) {
|
|
734
154
|
const e = new Set(i.flat(1 / 0).reverse());
|
|
735
|
-
for (const i of e) s.unshift(
|
|
736
|
-
} else void 0 !== i && s.push(
|
|
155
|
+
for (const i of e) s.unshift(c$1(i));
|
|
156
|
+
} else void 0 !== i && s.push(c$1(i));
|
|
737
157
|
return s;
|
|
738
158
|
}
|
|
739
|
-
static _$
|
|
159
|
+
static _$Ep(t, i) {
|
|
740
160
|
const s = i.attribute;
|
|
741
161
|
return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
742
162
|
}
|
|
743
|
-
|
|
163
|
+
_$Eu() {
|
|
744
164
|
var t;
|
|
745
|
-
this._$
|
|
165
|
+
this._$E_ = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Eg(), this.requestUpdate(), null === (t = this.constructor.h) || void 0 === t || t.forEach(t => t(this));
|
|
746
166
|
}
|
|
747
167
|
addController(t) {
|
|
748
168
|
var i, s;
|
|
749
|
-
(null !== (i = this._$
|
|
169
|
+
(null !== (i = this._$ES) && void 0 !== i ? i : this._$ES = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
|
|
750
170
|
}
|
|
751
171
|
removeController(t) {
|
|
752
172
|
var i;
|
|
753
|
-
null === (i = this._$
|
|
173
|
+
null === (i = this._$ES) || void 0 === i || i.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
754
174
|
}
|
|
755
|
-
_$
|
|
175
|
+
_$Eg() {
|
|
756
176
|
this.constructor.elementProperties.forEach((t, i) => {
|
|
757
|
-
this.hasOwnProperty(i) && (this._$
|
|
177
|
+
this.hasOwnProperty(i) && (this._$Ei.set(i, this[i]), delete this[i]);
|
|
758
178
|
});
|
|
759
179
|
}
|
|
760
180
|
createRenderRoot() {
|
|
761
181
|
var t;
|
|
762
182
|
const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
763
|
-
return
|
|
183
|
+
return S$1(s, this.constructor.elementStyles), s;
|
|
764
184
|
}
|
|
765
185
|
connectedCallback() {
|
|
766
186
|
var t;
|
|
767
|
-
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$
|
|
187
|
+
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
768
188
|
var i;
|
|
769
189
|
return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
|
|
770
190
|
});
|
|
@@ -772,7 +192,7 @@ let a$1 = class a extends HTMLElement {
|
|
|
772
192
|
enableUpdating(t) {}
|
|
773
193
|
disconnectedCallback() {
|
|
774
194
|
var t;
|
|
775
|
-
null === (t = this._$
|
|
195
|
+
null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
776
196
|
var i;
|
|
777
197
|
return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
|
|
778
198
|
});
|
|
@@ -780,33 +200,34 @@ let a$1 = class a extends HTMLElement {
|
|
|
780
200
|
attributeChangedCallback(t, i, s) {
|
|
781
201
|
this._$AK(t, s);
|
|
782
202
|
}
|
|
783
|
-
_$
|
|
784
|
-
var e
|
|
785
|
-
const
|
|
786
|
-
if (void 0 !==
|
|
787
|
-
const
|
|
788
|
-
this._$
|
|
203
|
+
_$EO(t, i, s = l$3) {
|
|
204
|
+
var e;
|
|
205
|
+
const r = this.constructor._$Ep(t, s);
|
|
206
|
+
if (void 0 !== r && !0 === s.reflect) {
|
|
207
|
+
const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$2).toAttribute(i, s.type);
|
|
208
|
+
this._$El = t, null == h ? this.removeAttribute(r) : this.setAttribute(r, h), this._$El = null;
|
|
789
209
|
}
|
|
790
210
|
}
|
|
791
211
|
_$AK(t, i) {
|
|
792
|
-
var s
|
|
793
|
-
const
|
|
794
|
-
|
|
795
|
-
if (void 0 !==
|
|
796
|
-
const t =
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
212
|
+
var s;
|
|
213
|
+
const e = this.constructor,
|
|
214
|
+
r = e._$Ev.get(t);
|
|
215
|
+
if (void 0 !== r && this._$El !== r) {
|
|
216
|
+
const t = e.getPropertyOptions(r),
|
|
217
|
+
h = "function" == typeof t.converter ? {
|
|
218
|
+
fromAttribute: t.converter
|
|
219
|
+
} : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$2;
|
|
220
|
+
this._$El = r, this[r] = h.fromAttribute(i, t.type), this._$El = null;
|
|
800
221
|
}
|
|
801
222
|
}
|
|
802
223
|
requestUpdate(t, i, s) {
|
|
803
224
|
let e = !0;
|
|
804
|
-
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged ||
|
|
225
|
+
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || a$1)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$El !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$E_ = this._$Ej());
|
|
805
226
|
}
|
|
806
|
-
async _$
|
|
227
|
+
async _$Ej() {
|
|
807
228
|
this.isUpdatePending = !0;
|
|
808
229
|
try {
|
|
809
|
-
await this._$
|
|
230
|
+
await this._$E_;
|
|
810
231
|
} catch (t) {
|
|
811
232
|
Promise.reject(t);
|
|
812
233
|
}
|
|
@@ -819,50 +240,50 @@ let a$1 = class a extends HTMLElement {
|
|
|
819
240
|
performUpdate() {
|
|
820
241
|
var t;
|
|
821
242
|
if (!this.isUpdatePending) return;
|
|
822
|
-
this.hasUpdated, this._$
|
|
243
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((t, i) => this[i] = t), this._$Ei = void 0);
|
|
823
244
|
let i = !1;
|
|
824
245
|
const s = this._$AL;
|
|
825
246
|
try {
|
|
826
|
-
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$
|
|
247
|
+
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
827
248
|
var i;
|
|
828
249
|
return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
|
|
829
|
-
}), this.update(s)) : this._$
|
|
250
|
+
}), this.update(s)) : this._$Ek();
|
|
830
251
|
} catch (t) {
|
|
831
|
-
throw i = !1, this._$
|
|
252
|
+
throw i = !1, this._$Ek(), t;
|
|
832
253
|
}
|
|
833
254
|
i && this._$AE(s);
|
|
834
255
|
}
|
|
835
256
|
willUpdate(t) {}
|
|
836
257
|
_$AE(t) {
|
|
837
258
|
var i;
|
|
838
|
-
null === (i = this._$
|
|
259
|
+
null === (i = this._$ES) || void 0 === i || i.forEach(t => {
|
|
839
260
|
var i;
|
|
840
261
|
return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
|
|
841
262
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
842
263
|
}
|
|
843
|
-
_$
|
|
264
|
+
_$Ek() {
|
|
844
265
|
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
845
266
|
}
|
|
846
267
|
get updateComplete() {
|
|
847
268
|
return this.getUpdateComplete();
|
|
848
269
|
}
|
|
849
270
|
getUpdateComplete() {
|
|
850
|
-
return this._$
|
|
271
|
+
return this._$E_;
|
|
851
272
|
}
|
|
852
273
|
shouldUpdate(t) {
|
|
853
274
|
return !0;
|
|
854
275
|
}
|
|
855
276
|
update(t) {
|
|
856
|
-
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$
|
|
277
|
+
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$EO(i, this[i], t)), this._$EC = void 0), this._$Ek();
|
|
857
278
|
}
|
|
858
279
|
updated(t) {}
|
|
859
280
|
firstUpdated(t) {}
|
|
860
281
|
};
|
|
861
|
-
|
|
282
|
+
u$1[d$1] = !0, u$1.elementProperties = new Map(), u$1.elementStyles = [], u$1.shadowRootOptions = {
|
|
862
283
|
mode: "open"
|
|
863
|
-
}, null ==
|
|
864
|
-
ReactiveElement:
|
|
865
|
-
}), (null !== (s$2 =
|
|
284
|
+
}, null == o$2 || o$2({
|
|
285
|
+
ReactiveElement: u$1
|
|
286
|
+
}), (null !== (s$2 = e$1.reactiveElementVersions) && void 0 !== s$2 ? s$2 : e$1.reactiveElementVersions = []).push("1.6.3");
|
|
866
287
|
|
|
867
288
|
/**
|
|
868
289
|
* @license
|
|
@@ -880,8 +301,8 @@ const i = window,
|
|
|
880
301
|
l$2 = "?" + n$1,
|
|
881
302
|
h = `<${l$2}>`,
|
|
882
303
|
r = document,
|
|
883
|
-
|
|
884
|
-
|
|
304
|
+
u = () => r.createComment(""),
|
|
305
|
+
d = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
885
306
|
c = Array.isArray,
|
|
886
307
|
v = t => c(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
|
|
887
308
|
a = "[ \t\n\f\r]",
|
|
@@ -902,28 +323,30 @@ const i = window,
|
|
|
902
323
|
T = Symbol.for("lit-noChange"),
|
|
903
324
|
A = Symbol.for("lit-nothing"),
|
|
904
325
|
E = new WeakMap(),
|
|
905
|
-
C = r.createTreeWalker(r, 129, null, !1)
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
}
|
|
926
|
-
|
|
326
|
+
C = r.createTreeWalker(r, 129, null, !1);
|
|
327
|
+
function P(t, i) {
|
|
328
|
+
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
329
|
+
return void 0 !== e ? e.createHTML(i) : i;
|
|
330
|
+
}
|
|
331
|
+
const V = (t, i) => {
|
|
332
|
+
const s = t.length - 1,
|
|
333
|
+
e = [];
|
|
334
|
+
let l,
|
|
335
|
+
r = 2 === i ? "<svg>" : "",
|
|
336
|
+
u = f;
|
|
337
|
+
for (let i = 0; i < s; i++) {
|
|
338
|
+
const s = t[i];
|
|
339
|
+
let d,
|
|
340
|
+
c,
|
|
341
|
+
v = -1,
|
|
342
|
+
a = 0;
|
|
343
|
+
for (; a < s.length && (u.lastIndex = a, c = u.exec(s), null !== c);) a = u.lastIndex, u === f ? "!--" === c[1] ? u = _ : void 0 !== c[1] ? u = m : void 0 !== c[2] ? (y$1.test(c[2]) && (l = RegExp("</" + c[2], "g")), u = p) : void 0 !== c[3] && (u = p) : u === p ? ">" === c[0] ? (u = null != l ? l : f, v = -1) : void 0 === c[1] ? v = -2 : (v = u.lastIndex - c[2].length, d = c[1], u = void 0 === c[3] ? p : '"' === c[3] ? $ : g) : u === $ || u === g ? u = p : u === _ || u === m ? u = f : (u = p, l = void 0);
|
|
344
|
+
const w = u === p && t[i + 1].startsWith("/>") ? " " : "";
|
|
345
|
+
r += u === f ? s + h : v >= 0 ? (e.push(d), s.slice(0, v) + o$1 + s.slice(v) + n$1 + w) : s + n$1 + (-2 === v ? (e.push(void 0), i) : w);
|
|
346
|
+
}
|
|
347
|
+
return [P(t, r + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), e];
|
|
348
|
+
};
|
|
349
|
+
class N {
|
|
927
350
|
constructor({
|
|
928
351
|
strings: t,
|
|
929
352
|
_$litType$: i
|
|
@@ -931,11 +354,11 @@ class V {
|
|
|
931
354
|
let h;
|
|
932
355
|
this.parts = [];
|
|
933
356
|
let r = 0,
|
|
934
|
-
|
|
357
|
+
d = 0;
|
|
935
358
|
const c = t.length - 1,
|
|
936
359
|
v = this.parts,
|
|
937
|
-
[a, f] =
|
|
938
|
-
if (this.el =
|
|
360
|
+
[a, f] = V(t, i);
|
|
361
|
+
if (this.el = N.createElement(a, e), C.currentNode = this.el.content, 2 === i) {
|
|
939
362
|
const t = this.el.content,
|
|
940
363
|
i = t.firstChild;
|
|
941
364
|
i.remove(), t.append(...i.childNodes);
|
|
@@ -945,7 +368,7 @@ class V {
|
|
|
945
368
|
if (h.hasAttributes()) {
|
|
946
369
|
const t = [];
|
|
947
370
|
for (const i of h.getAttributeNames()) if (i.endsWith(o$1) || i.startsWith(n$1)) {
|
|
948
|
-
const s = f[
|
|
371
|
+
const s = f[d++];
|
|
949
372
|
if (t.push(i), void 0 !== s) {
|
|
950
373
|
const t = h.getAttribute(s.toLowerCase() + o$1).split(n$1),
|
|
951
374
|
i = /([.?@])?(.*)/.exec(s);
|
|
@@ -954,7 +377,7 @@ class V {
|
|
|
954
377
|
index: r,
|
|
955
378
|
name: i[2],
|
|
956
379
|
strings: t,
|
|
957
|
-
ctor: "." === i[1] ?
|
|
380
|
+
ctor: "." === i[1] ? H : "?" === i[1] ? L : "@" === i[1] ? z : k
|
|
958
381
|
});
|
|
959
382
|
} else v.push({
|
|
960
383
|
type: 6,
|
|
@@ -968,11 +391,11 @@ class V {
|
|
|
968
391
|
i = t.length - 1;
|
|
969
392
|
if (i > 0) {
|
|
970
393
|
h.textContent = s$1 ? s$1.emptyScript : "";
|
|
971
|
-
for (let s = 0; s < i; s++) h.append(t[s],
|
|
394
|
+
for (let s = 0; s < i; s++) h.append(t[s], u()), C.nextNode(), v.push({
|
|
972
395
|
type: 2,
|
|
973
396
|
index: ++r
|
|
974
397
|
});
|
|
975
|
-
h.append(t[i],
|
|
398
|
+
h.append(t[i], u());
|
|
976
399
|
}
|
|
977
400
|
}
|
|
978
401
|
} else if (8 === h.nodeType) if (h.data === l$2) v.push({
|
|
@@ -993,16 +416,16 @@ class V {
|
|
|
993
416
|
return s.innerHTML = t, s;
|
|
994
417
|
}
|
|
995
418
|
}
|
|
996
|
-
function
|
|
419
|
+
function S(t, i, s = t, e) {
|
|
997
420
|
var o, n, l, h;
|
|
998
421
|
if (i === T) return i;
|
|
999
422
|
let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
|
|
1000
|
-
const
|
|
1001
|
-
return (null == r ? void 0 : r.constructor) !==
|
|
423
|
+
const u = d(i) ? void 0 : i._$litDirective$;
|
|
424
|
+
return (null == r ? void 0 : r.constructor) !== u && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === u ? r = void 0 : (r = new u(t), r._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Co) && void 0 !== l ? l : h._$Co = [])[e] = r : s._$Cl = r), void 0 !== r && (i = S(t, r._$AS(t, i.values), r, e)), i;
|
|
1002
425
|
}
|
|
1003
|
-
class
|
|
426
|
+
class M {
|
|
1004
427
|
constructor(t, i) {
|
|
1005
|
-
this.
|
|
428
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
1006
429
|
}
|
|
1007
430
|
get parentNode() {
|
|
1008
431
|
return this._$AM.parentNode;
|
|
@@ -1010,7 +433,7 @@ class S {
|
|
|
1010
433
|
get _$AU() {
|
|
1011
434
|
return this._$AM._$AU;
|
|
1012
435
|
}
|
|
1013
|
-
|
|
436
|
+
u(t) {
|
|
1014
437
|
var i;
|
|
1015
438
|
const {
|
|
1016
439
|
el: {
|
|
@@ -1023,29 +446,29 @@ class S {
|
|
|
1023
446
|
let n = C.nextNode(),
|
|
1024
447
|
l = 0,
|
|
1025
448
|
h = 0,
|
|
1026
|
-
|
|
1027
|
-
for (; void 0 !==
|
|
1028
|
-
if (l ===
|
|
449
|
+
u = e[0];
|
|
450
|
+
for (; void 0 !== u;) {
|
|
451
|
+
if (l === u.index) {
|
|
1029
452
|
let i;
|
|
1030
|
-
2 ===
|
|
453
|
+
2 === u.type ? i = new R(n, n.nextSibling, this, t) : 1 === u.type ? i = new u.ctor(n, u.name, u.strings, this, t) : 6 === u.type && (i = new Z(n, this, t)), this._$AV.push(i), u = e[++h];
|
|
1031
454
|
}
|
|
1032
|
-
l !== (null ==
|
|
455
|
+
l !== (null == u ? void 0 : u.index) && (n = C.nextNode(), l++);
|
|
1033
456
|
}
|
|
1034
|
-
return o;
|
|
457
|
+
return C.currentNode = r, o;
|
|
1035
458
|
}
|
|
1036
|
-
|
|
459
|
+
v(t) {
|
|
1037
460
|
let i = 0;
|
|
1038
|
-
for (const s of this.
|
|
461
|
+
for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
1039
462
|
}
|
|
1040
463
|
}
|
|
1041
|
-
class
|
|
464
|
+
class R {
|
|
1042
465
|
constructor(t, i, s, e) {
|
|
1043
466
|
var o;
|
|
1044
|
-
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$
|
|
467
|
+
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cp = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
|
|
1045
468
|
}
|
|
1046
469
|
get _$AU() {
|
|
1047
470
|
var t, i;
|
|
1048
|
-
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$
|
|
471
|
+
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cp;
|
|
1049
472
|
}
|
|
1050
473
|
get parentNode() {
|
|
1051
474
|
let t = this._$AA.parentNode;
|
|
@@ -1059,40 +482,40 @@ class M {
|
|
|
1059
482
|
return this._$AB;
|
|
1060
483
|
}
|
|
1061
484
|
_$AI(t, i = this) {
|
|
1062
|
-
t =
|
|
485
|
+
t = S(this, t, i), d(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== T && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : v(t) ? this.T(t) : this._(t);
|
|
1063
486
|
}
|
|
1064
|
-
|
|
487
|
+
k(t) {
|
|
1065
488
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
1066
489
|
}
|
|
1067
|
-
|
|
1068
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.
|
|
490
|
+
$(t) {
|
|
491
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
1069
492
|
}
|
|
1070
|
-
|
|
1071
|
-
this._$AH !== A &&
|
|
493
|
+
_(t) {
|
|
494
|
+
this._$AH !== A && d(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r.createTextNode(t)), this._$AH = t;
|
|
1072
495
|
}
|
|
1073
|
-
|
|
496
|
+
g(t) {
|
|
1074
497
|
var i;
|
|
1075
498
|
const {
|
|
1076
499
|
values: s,
|
|
1077
500
|
_$litType$: e
|
|
1078
501
|
} = t,
|
|
1079
|
-
o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el =
|
|
1080
|
-
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.
|
|
1081
|
-
const t = new
|
|
1082
|
-
i = t.
|
|
1083
|
-
t.
|
|
502
|
+
o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = N.createElement(P(e.h, e.h[0]), this.options)), e);
|
|
503
|
+
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.v(s);else {
|
|
504
|
+
const t = new M(o, this),
|
|
505
|
+
i = t.u(this.options);
|
|
506
|
+
t.v(s), this.$(i), this._$AH = t;
|
|
1084
507
|
}
|
|
1085
508
|
}
|
|
1086
509
|
_$AC(t) {
|
|
1087
510
|
let i = E.get(t.strings);
|
|
1088
|
-
return void 0 === i && E.set(t.strings, i = new
|
|
511
|
+
return void 0 === i && E.set(t.strings, i = new N(t)), i;
|
|
1089
512
|
}
|
|
1090
|
-
|
|
513
|
+
T(t) {
|
|
1091
514
|
c(this._$AH) || (this._$AH = [], this._$AR());
|
|
1092
515
|
const i = this._$AH;
|
|
1093
516
|
let s,
|
|
1094
517
|
e = 0;
|
|
1095
|
-
for (const o of t) e === i.length ? i.push(s = new
|
|
518
|
+
for (const o of t) e === i.length ? i.push(s = new R(this.k(u()), this.k(u()), this, this.options)) : s = i[e], s._$AI(o), e++;
|
|
1096
519
|
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
1097
520
|
}
|
|
1098
521
|
_$AR(t = this._$AA.nextSibling, i) {
|
|
@@ -1104,10 +527,10 @@ class M {
|
|
|
1104
527
|
}
|
|
1105
528
|
setConnected(t) {
|
|
1106
529
|
var i;
|
|
1107
|
-
void 0 === this._$AM && (this._$
|
|
530
|
+
void 0 === this._$AM && (this._$Cp = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
|
|
1108
531
|
}
|
|
1109
532
|
}
|
|
1110
|
-
class
|
|
533
|
+
class k {
|
|
1111
534
|
constructor(t, i, s, e, o) {
|
|
1112
535
|
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = o, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = A;
|
|
1113
536
|
}
|
|
@@ -1120,10 +543,10 @@ class R {
|
|
|
1120
543
|
_$AI(t, i = this, s, e) {
|
|
1121
544
|
const o = this.strings;
|
|
1122
545
|
let n = !1;
|
|
1123
|
-
if (void 0 === o) t =
|
|
546
|
+
if (void 0 === o) t = S(this, t, i, 0), n = !d(t) || t !== this._$AH && t !== T, n && (this._$AH = t);else {
|
|
1124
547
|
const e = t;
|
|
1125
548
|
let l, h;
|
|
1126
|
-
for (t = o[0], l = 0; l < o.length - 1; l++) h =
|
|
549
|
+
for (t = o[0], l = 0; l < o.length - 1; l++) h = S(this, e[s + l], i, l), h === T && (h = this._$AH[l]), n || (n = !d(h) || h !== this._$AH[l]), h === A ? t = A : t !== A && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
|
|
1127
550
|
}
|
|
1128
551
|
n && !e && this.j(t);
|
|
1129
552
|
}
|
|
@@ -1131,7 +554,7 @@ class R {
|
|
|
1131
554
|
t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
|
|
1132
555
|
}
|
|
1133
556
|
}
|
|
1134
|
-
class
|
|
557
|
+
class H extends k {
|
|
1135
558
|
constructor() {
|
|
1136
559
|
super(...arguments), this.type = 3;
|
|
1137
560
|
}
|
|
@@ -1139,22 +562,22 @@ class k extends R {
|
|
|
1139
562
|
this.element[this.name] = t === A ? void 0 : t;
|
|
1140
563
|
}
|
|
1141
564
|
}
|
|
1142
|
-
const
|
|
1143
|
-
class
|
|
565
|
+
const I = s$1 ? s$1.emptyScript : "";
|
|
566
|
+
class L extends k {
|
|
1144
567
|
constructor() {
|
|
1145
568
|
super(...arguments), this.type = 4;
|
|
1146
569
|
}
|
|
1147
570
|
j(t) {
|
|
1148
|
-
t && t !== A ? this.element.setAttribute(this.name,
|
|
571
|
+
t && t !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name);
|
|
1149
572
|
}
|
|
1150
573
|
}
|
|
1151
|
-
class
|
|
574
|
+
class z extends k {
|
|
1152
575
|
constructor(t, i, s, e, o) {
|
|
1153
576
|
super(t, i, s, e, o), this.type = 5;
|
|
1154
577
|
}
|
|
1155
578
|
_$AI(t, i = this) {
|
|
1156
579
|
var s;
|
|
1157
|
-
if ((t = null !== (s =
|
|
580
|
+
if ((t = null !== (s = S(this, t, i, 0)) && void 0 !== s ? s : A) === T) return;
|
|
1158
581
|
const e = this._$AH,
|
|
1159
582
|
o = t === A && e !== A || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
|
|
1160
583
|
n = t !== A && (e === A || o);
|
|
@@ -1165,7 +588,7 @@ class L extends R {
|
|
|
1165
588
|
"function" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);
|
|
1166
589
|
}
|
|
1167
590
|
}
|
|
1168
|
-
class
|
|
591
|
+
class Z {
|
|
1169
592
|
constructor(t, i, s) {
|
|
1170
593
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
1171
594
|
}
|
|
@@ -1173,18 +596,18 @@ class z {
|
|
|
1173
596
|
return this._$AM._$AU;
|
|
1174
597
|
}
|
|
1175
598
|
_$AI(t) {
|
|
1176
|
-
|
|
599
|
+
S(this, t);
|
|
1177
600
|
}
|
|
1178
601
|
}
|
|
1179
|
-
const
|
|
1180
|
-
null ==
|
|
1181
|
-
const
|
|
602
|
+
const B = i.litHtmlPolyfillSupport;
|
|
603
|
+
null == B || B(N, R), (null !== (t = i.litHtmlVersions) && void 0 !== t ? t : i.litHtmlVersions = []).push("2.8.0");
|
|
604
|
+
const D = (t, i, s) => {
|
|
1182
605
|
var e, o;
|
|
1183
606
|
const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
|
|
1184
607
|
let l = n._$litPart$;
|
|
1185
608
|
if (void 0 === l) {
|
|
1186
609
|
const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
|
|
1187
|
-
n._$litPart$ = l = new
|
|
610
|
+
n._$litPart$ = l = new R(i.insertBefore(u(), t), t, void 0, null != s ? s : {});
|
|
1188
611
|
}
|
|
1189
612
|
return l._$AI(t), l;
|
|
1190
613
|
};
|
|
@@ -1195,7 +618,7 @@ const B = (t, i, s) => {
|
|
|
1195
618
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1196
619
|
*/
|
|
1197
620
|
var l$1, o;
|
|
1198
|
-
class s extends
|
|
621
|
+
class s extends u$1 {
|
|
1199
622
|
constructor() {
|
|
1200
623
|
super(...arguments), this.renderOptions = {
|
|
1201
624
|
host: this
|
|
@@ -1208,7 +631,7 @@ class s extends a$1 {
|
|
|
1208
631
|
}
|
|
1209
632
|
update(t) {
|
|
1210
633
|
const i = this.render();
|
|
1211
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
634
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = D(i, this.renderRoot, this.renderOptions);
|
|
1212
635
|
}
|
|
1213
636
|
connectedCallback() {
|
|
1214
637
|
var t;
|
|
@@ -1229,20 +652,32 @@ const n = globalThis.litElementPolyfillSupport;
|
|
|
1229
652
|
null == n || n({
|
|
1230
653
|
LitElement: s
|
|
1231
654
|
});
|
|
1232
|
-
(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.
|
|
655
|
+
(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.3");
|
|
1233
656
|
|
|
1234
657
|
function ascending$2(a, b) {
|
|
1235
658
|
return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
1236
659
|
}
|
|
1237
660
|
|
|
661
|
+
function descending(a, b) {
|
|
662
|
+
return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
|
|
663
|
+
}
|
|
664
|
+
|
|
1238
665
|
function bisector(f) {
|
|
1239
|
-
let
|
|
1240
|
-
|
|
1241
|
-
|
|
666
|
+
let compare1, compare2, delta;
|
|
667
|
+
|
|
668
|
+
// If an accessor is specified, promote it to a comparator. In this case we
|
|
669
|
+
// can test whether the search value is (self-) comparable. We can’t do this
|
|
670
|
+
// for a comparator (except for specific, known comparators) because we can’t
|
|
671
|
+
// tell if the comparator is symmetric, and an asymmetric comparator can’t be
|
|
672
|
+
// used to test whether a single value is comparable.
|
|
1242
673
|
if (f.length !== 2) {
|
|
1243
|
-
delta = (d, x) => f(d) - x;
|
|
1244
674
|
compare1 = ascending$2;
|
|
1245
675
|
compare2 = (d, x) => ascending$2(f(d), x);
|
|
676
|
+
delta = (d, x) => f(d) - x;
|
|
677
|
+
} else {
|
|
678
|
+
compare1 = f === ascending$2 || f === descending ? f : zero$1;
|
|
679
|
+
compare2 = f;
|
|
680
|
+
delta = f;
|
|
1246
681
|
}
|
|
1247
682
|
function left(a, x, lo = 0, hi = a.length) {
|
|
1248
683
|
if (lo < hi) {
|
|
@@ -1274,6 +709,9 @@ function bisector(f) {
|
|
|
1274
709
|
right
|
|
1275
710
|
};
|
|
1276
711
|
}
|
|
712
|
+
function zero$1() {
|
|
713
|
+
return 0;
|
|
714
|
+
}
|
|
1277
715
|
|
|
1278
716
|
function number$2(x) {
|
|
1279
717
|
return x === null ? NaN : +x;
|
|
@@ -1284,7 +722,7 @@ const bisectRight = ascendingBisect.right;
|
|
|
1284
722
|
bisector(number$2).center;
|
|
1285
723
|
var bisect = bisectRight;
|
|
1286
724
|
|
|
1287
|
-
function count
|
|
725
|
+
function count(values, valueof) {
|
|
1288
726
|
let count = 0;
|
|
1289
727
|
if (valueof === undefined) {
|
|
1290
728
|
for (let value of values) {
|
|
@@ -1303,7 +741,7 @@ function count$1(values, valueof) {
|
|
|
1303
741
|
return count;
|
|
1304
742
|
}
|
|
1305
743
|
|
|
1306
|
-
function extent
|
|
744
|
+
function extent(values, valueof) {
|
|
1307
745
|
let min;
|
|
1308
746
|
let max;
|
|
1309
747
|
if (valueof === undefined) {
|
|
@@ -1390,56 +828,63 @@ function constant$5(x) {
|
|
|
1390
828
|
return () => x;
|
|
1391
829
|
}
|
|
1392
830
|
|
|
1393
|
-
|
|
1394
|
-
e5
|
|
1395
|
-
e2
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
831
|
+
const e10 = Math.sqrt(50),
|
|
832
|
+
e5 = Math.sqrt(10),
|
|
833
|
+
e2 = Math.sqrt(2);
|
|
834
|
+
function tickSpec(start, stop, count) {
|
|
835
|
+
const step = (stop - start) / Math.max(0, count),
|
|
836
|
+
power = Math.floor(Math.log10(step)),
|
|
837
|
+
error = step / Math.pow(10, power),
|
|
838
|
+
factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
|
|
839
|
+
let i1, i2, inc;
|
|
840
|
+
if (power < 0) {
|
|
841
|
+
inc = Math.pow(10, -power) / factor;
|
|
842
|
+
i1 = Math.round(start * inc);
|
|
843
|
+
i2 = Math.round(stop * inc);
|
|
844
|
+
if (i1 / inc < start) ++i1;
|
|
845
|
+
if (i2 / inc > stop) --i2;
|
|
846
|
+
inc = -inc;
|
|
847
|
+
} else {
|
|
848
|
+
inc = Math.pow(10, power) * factor;
|
|
849
|
+
i1 = Math.round(start / inc);
|
|
850
|
+
i2 = Math.round(stop / inc);
|
|
851
|
+
if (i1 * inc < start) ++i1;
|
|
852
|
+
if (i2 * inc > stop) --i2;
|
|
853
|
+
}
|
|
854
|
+
if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
|
|
855
|
+
return [i1, i2, inc];
|
|
856
|
+
}
|
|
857
|
+
function ticks(start, stop, count) {
|
|
1402
858
|
stop = +stop, start = +start, count = +count;
|
|
1403
|
-
if (
|
|
1404
|
-
if (
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
ticks =
|
|
1412
|
-
while (++i < n) ticks[i] = (r0 + i) * step;
|
|
859
|
+
if (!(count > 0)) return [];
|
|
860
|
+
if (start === stop) return [start];
|
|
861
|
+
const reverse = stop < start,
|
|
862
|
+
[i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
|
|
863
|
+
if (!(i2 >= i1)) return [];
|
|
864
|
+
const n = i2 - i1 + 1,
|
|
865
|
+
ticks = new Array(n);
|
|
866
|
+
if (reverse) {
|
|
867
|
+
if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;
|
|
1413
868
|
} else {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
r1 = Math.round(stop * step);
|
|
1417
|
-
if (r0 / step < start) ++r0;
|
|
1418
|
-
if (r1 / step > stop) --r1;
|
|
1419
|
-
ticks = new Array(n = r1 - r0 + 1);
|
|
1420
|
-
while (++i < n) ticks[i] = (r0 + i) / step;
|
|
1421
|
-
}
|
|
1422
|
-
if (reverse) ticks.reverse();
|
|
869
|
+
if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;
|
|
870
|
+
}
|
|
1423
871
|
return ticks;
|
|
1424
872
|
}
|
|
1425
|
-
function tickIncrement
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
error = step / Math.pow(10, power);
|
|
1429
|
-
return power >= 0 ? (error >= e10$1 ? 10 : error >= e5$1 ? 5 : error >= e2$1 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error >= e10$1 ? 10 : error >= e5$1 ? 5 : error >= e2$1 ? 2 : 1);
|
|
873
|
+
function tickIncrement(start, stop, count) {
|
|
874
|
+
stop = +stop, start = +start, count = +count;
|
|
875
|
+
return tickSpec(start, stop, count)[2];
|
|
1430
876
|
}
|
|
1431
|
-
function tickStep
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
return stop < start ? -step1 : step1;
|
|
877
|
+
function tickStep(start, stop, count) {
|
|
878
|
+
stop = +stop, start = +start, count = +count;
|
|
879
|
+
const reverse = stop < start,
|
|
880
|
+
inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);
|
|
881
|
+
return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
|
|
1437
882
|
}
|
|
1438
883
|
|
|
1439
884
|
function nice(start, stop, count) {
|
|
1440
885
|
let prestep;
|
|
1441
886
|
while (true) {
|
|
1442
|
-
const step = tickIncrement
|
|
887
|
+
const step = tickIncrement(start, stop, count);
|
|
1443
888
|
if (step === prestep || step === 0 || !isFinite(step)) {
|
|
1444
889
|
return [start, stop];
|
|
1445
890
|
} else if (step > 0) {
|
|
@@ -1453,19 +898,20 @@ function nice(start, stop, count) {
|
|
|
1453
898
|
}
|
|
1454
899
|
}
|
|
1455
900
|
|
|
1456
|
-
function thresholdSturges
|
|
1457
|
-
return Math.ceil(Math.log(count
|
|
901
|
+
function thresholdSturges(values) {
|
|
902
|
+
return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);
|
|
1458
903
|
}
|
|
1459
904
|
|
|
1460
905
|
function bin() {
|
|
1461
906
|
var value = identity$6,
|
|
1462
|
-
domain = extent
|
|
1463
|
-
threshold = thresholdSturges
|
|
907
|
+
domain = extent,
|
|
908
|
+
threshold = thresholdSturges;
|
|
1464
909
|
function histogram(data) {
|
|
1465
910
|
if (!Array.isArray(data)) data = Array.from(data);
|
|
1466
911
|
var i,
|
|
1467
912
|
n = data.length,
|
|
1468
913
|
x,
|
|
914
|
+
step,
|
|
1469
915
|
values = new Array(n);
|
|
1470
916
|
for (i = 0; i < n; ++i) {
|
|
1471
917
|
values[i] = value(data[i], i, data);
|
|
@@ -1480,8 +926,13 @@ function bin() {
|
|
|
1480
926
|
if (!Array.isArray(tz)) {
|
|
1481
927
|
const max = x1,
|
|
1482
928
|
tn = +tz;
|
|
1483
|
-
if (domain === extent
|
|
1484
|
-
tz = ticks
|
|
929
|
+
if (domain === extent) [x0, x1] = nice(x0, x1, tn);
|
|
930
|
+
tz = ticks(x0, x1, tn);
|
|
931
|
+
|
|
932
|
+
// If the domain is aligned with the first tick (which it will by
|
|
933
|
+
// default), then we can use quantization rather than bisection to bin
|
|
934
|
+
// values, which is substantially faster.
|
|
935
|
+
if (tz[0] <= x0) step = tickIncrement(x0, x1, tn);
|
|
1485
936
|
|
|
1486
937
|
// If the last threshold is coincident with the domain’s upper bound, the
|
|
1487
938
|
// last bin will be zero-width. If the default domain is used, and this
|
|
@@ -1491,8 +942,8 @@ function bin() {
|
|
|
1491
942
|
// coerce values or the domain to numbers, and thus must be careful to
|
|
1492
943
|
// compare order (>=) rather than strict equality (===)!
|
|
1493
944
|
if (tz[tz.length - 1] >= x1) {
|
|
1494
|
-
if (max >= x1 && domain === extent
|
|
1495
|
-
const step = tickIncrement
|
|
945
|
+
if (max >= x1 && domain === extent) {
|
|
946
|
+
const step = tickIncrement(x0, x1, tn);
|
|
1496
947
|
if (isFinite(step)) {
|
|
1497
948
|
if (step > 0) {
|
|
1498
949
|
x1 = (Math.floor(x1 / step) + 1) * step;
|
|
@@ -1507,9 +958,13 @@ function bin() {
|
|
|
1507
958
|
}
|
|
1508
959
|
|
|
1509
960
|
// Remove any thresholds outside the domain.
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
961
|
+
// Be careful not to mutate an array owned by the user!
|
|
962
|
+
var m = tz.length,
|
|
963
|
+
a = 0,
|
|
964
|
+
b = m;
|
|
965
|
+
while (tz[a] <= x0) ++a;
|
|
966
|
+
while (tz[b - 1] > x1) --b;
|
|
967
|
+
if (a || b < m) tz = tz.slice(a, b), m = b - a;
|
|
1513
968
|
var bins = new Array(m + 1),
|
|
1514
969
|
bin;
|
|
1515
970
|
|
|
@@ -1521,10 +976,26 @@ function bin() {
|
|
|
1521
976
|
}
|
|
1522
977
|
|
|
1523
978
|
// Assign data to bins by value, ignoring any outside the domain.
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
979
|
+
if (isFinite(step)) {
|
|
980
|
+
if (step > 0) {
|
|
981
|
+
for (i = 0; i < n; ++i) {
|
|
982
|
+
if ((x = values[i]) != null && x0 <= x && x <= x1) {
|
|
983
|
+
bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
} else if (step < 0) {
|
|
987
|
+
for (i = 0; i < n; ++i) {
|
|
988
|
+
if ((x = values[i]) != null && x0 <= x && x <= x1) {
|
|
989
|
+
const j = Math.floor((x0 - x) * step);
|
|
990
|
+
bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
} else {
|
|
995
|
+
for (i = 0; i < n; ++i) {
|
|
996
|
+
if ((x = values[i]) != null && x0 <= x && x <= x1) {
|
|
997
|
+
bins[bisect(tz, x, 0, m)].push(data[i]);
|
|
998
|
+
}
|
|
1528
999
|
}
|
|
1529
1000
|
}
|
|
1530
1001
|
return bins;
|
|
@@ -1536,7 +1007,7 @@ function bin() {
|
|
|
1536
1007
|
return arguments.length ? (domain = typeof _ === "function" ? _ : constant$5([_[0], _[1]]), histogram) : domain;
|
|
1537
1008
|
};
|
|
1538
1009
|
histogram.thresholds = function (_) {
|
|
1539
|
-
return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ?
|
|
1010
|
+
return arguments.length ? (threshold = typeof _ === "function" ? _ : constant$5(Array.isArray(_) ? slice$1.call(_) : _), histogram) : threshold;
|
|
1540
1011
|
};
|
|
1541
1012
|
return histogram;
|
|
1542
1013
|
}
|
|
@@ -2913,15 +2384,15 @@ function Color() {}
|
|
|
2913
2384
|
var darker = 0.7;
|
|
2914
2385
|
var brighter = 1 / darker;
|
|
2915
2386
|
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
2916
|
-
reN = "\\s*([+-]?\\d
|
|
2917
|
-
reP = "\\s*([+-]?\\d
|
|
2387
|
+
reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
2388
|
+
reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
2918
2389
|
reHex = /^#([0-9a-f]{3,8})$/,
|
|
2919
|
-
reRgbInteger = new RegExp(
|
|
2920
|
-
reRgbPercent = new RegExp(
|
|
2921
|
-
reRgbaInteger = new RegExp(
|
|
2922
|
-
reRgbaPercent = new RegExp(
|
|
2923
|
-
reHslPercent = new RegExp(
|
|
2924
|
-
reHslaPercent = new RegExp(
|
|
2390
|
+
reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
|
|
2391
|
+
reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
|
|
2392
|
+
reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
|
|
2393
|
+
reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
|
|
2394
|
+
reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
|
|
2395
|
+
reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
|
2925
2396
|
var named = {
|
|
2926
2397
|
aliceblue: 0xf0f8ff,
|
|
2927
2398
|
antiquewhite: 0xfaebd7,
|
|
@@ -3073,15 +2544,16 @@ var named = {
|
|
|
3073
2544
|
yellowgreen: 0x9acd32
|
|
3074
2545
|
};
|
|
3075
2546
|
define(Color, color, {
|
|
3076
|
-
copy
|
|
2547
|
+
copy(channels) {
|
|
3077
2548
|
return Object.assign(new this.constructor(), this, channels);
|
|
3078
2549
|
},
|
|
3079
|
-
displayable
|
|
2550
|
+
displayable() {
|
|
3080
2551
|
return this.rgb().displayable();
|
|
3081
2552
|
},
|
|
3082
2553
|
hex: color_formatHex,
|
|
3083
2554
|
// Deprecated! Use color.formatHex.
|
|
3084
2555
|
formatHex: color_formatHex,
|
|
2556
|
+
formatHex8: color_formatHex8,
|
|
3085
2557
|
formatHsl: color_formatHsl,
|
|
3086
2558
|
formatRgb: color_formatRgb,
|
|
3087
2559
|
toString: color_formatRgb
|
|
@@ -3089,6 +2561,9 @@ define(Color, color, {
|
|
|
3089
2561
|
function color_formatHex() {
|
|
3090
2562
|
return this.rgb().formatHex();
|
|
3091
2563
|
}
|
|
2564
|
+
function color_formatHex8() {
|
|
2565
|
+
return this.rgb().formatHex8();
|
|
2566
|
+
}
|
|
3092
2567
|
function color_formatHsl() {
|
|
3093
2568
|
return hslConvert(this).formatHsl();
|
|
3094
2569
|
}
|
|
@@ -3135,36 +2610,48 @@ function Rgb(r, g, b, opacity) {
|
|
|
3135
2610
|
this.opacity = +opacity;
|
|
3136
2611
|
}
|
|
3137
2612
|
define(Rgb, rgb, extend(Color, {
|
|
3138
|
-
brighter
|
|
2613
|
+
brighter(k) {
|
|
3139
2614
|
k = k == null ? brighter : Math.pow(brighter, k);
|
|
3140
2615
|
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
3141
2616
|
},
|
|
3142
|
-
darker
|
|
2617
|
+
darker(k) {
|
|
3143
2618
|
k = k == null ? darker : Math.pow(darker, k);
|
|
3144
2619
|
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
3145
2620
|
},
|
|
3146
|
-
rgb
|
|
2621
|
+
rgb() {
|
|
3147
2622
|
return this;
|
|
3148
2623
|
},
|
|
3149
|
-
|
|
2624
|
+
clamp() {
|
|
2625
|
+
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
|
2626
|
+
},
|
|
2627
|
+
displayable() {
|
|
3150
2628
|
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
3151
2629
|
},
|
|
3152
2630
|
hex: rgb_formatHex,
|
|
3153
2631
|
// Deprecated! Use color.formatHex.
|
|
3154
2632
|
formatHex: rgb_formatHex,
|
|
2633
|
+
formatHex8: rgb_formatHex8,
|
|
3155
2634
|
formatRgb: rgb_formatRgb,
|
|
3156
2635
|
toString: rgb_formatRgb
|
|
3157
2636
|
}));
|
|
3158
2637
|
function rgb_formatHex() {
|
|
3159
|
-
return
|
|
2638
|
+
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
|
2639
|
+
}
|
|
2640
|
+
function rgb_formatHex8() {
|
|
2641
|
+
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
3160
2642
|
}
|
|
3161
2643
|
function rgb_formatRgb() {
|
|
3162
|
-
|
|
3163
|
-
a
|
|
3164
|
-
|
|
2644
|
+
const a = clampa(this.opacity);
|
|
2645
|
+
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
|
2646
|
+
}
|
|
2647
|
+
function clampa(opacity) {
|
|
2648
|
+
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
|
2649
|
+
}
|
|
2650
|
+
function clampi(value) {
|
|
2651
|
+
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
3165
2652
|
}
|
|
3166
2653
|
function hex(value) {
|
|
3167
|
-
value =
|
|
2654
|
+
value = clampi(value);
|
|
3168
2655
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
3169
2656
|
}
|
|
3170
2657
|
function hsla(h, s, l, a) {
|
|
@@ -3204,15 +2691,15 @@ function Hsl(h, s, l, opacity) {
|
|
|
3204
2691
|
this.opacity = +opacity;
|
|
3205
2692
|
}
|
|
3206
2693
|
define(Hsl, hsl, extend(Color, {
|
|
3207
|
-
brighter
|
|
2694
|
+
brighter(k) {
|
|
3208
2695
|
k = k == null ? brighter : Math.pow(brighter, k);
|
|
3209
2696
|
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
3210
2697
|
},
|
|
3211
|
-
darker
|
|
2698
|
+
darker(k) {
|
|
3212
2699
|
k = k == null ? darker : Math.pow(darker, k);
|
|
3213
2700
|
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
3214
2701
|
},
|
|
3215
|
-
rgb
|
|
2702
|
+
rgb() {
|
|
3216
2703
|
var h = this.h % 360 + (this.h < 0) * 360,
|
|
3217
2704
|
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
3218
2705
|
l = this.l,
|
|
@@ -3220,15 +2707,24 @@ define(Hsl, hsl, extend(Color, {
|
|
|
3220
2707
|
m1 = 2 * l - m2;
|
|
3221
2708
|
return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
|
3222
2709
|
},
|
|
3223
|
-
|
|
2710
|
+
clamp() {
|
|
2711
|
+
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
|
2712
|
+
},
|
|
2713
|
+
displayable() {
|
|
3224
2714
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
3225
2715
|
},
|
|
3226
|
-
formatHsl
|
|
3227
|
-
|
|
3228
|
-
a
|
|
3229
|
-
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
|
2716
|
+
formatHsl() {
|
|
2717
|
+
const a = clampa(this.opacity);
|
|
2718
|
+
return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
|
3230
2719
|
}
|
|
3231
2720
|
}));
|
|
2721
|
+
function clamph(value) {
|
|
2722
|
+
value = (value || 0) % 360;
|
|
2723
|
+
return value < 0 ? value + 360 : value;
|
|
2724
|
+
}
|
|
2725
|
+
function clampt(value) {
|
|
2726
|
+
return Math.max(0, Math.min(1, value || 0));
|
|
2727
|
+
}
|
|
3232
2728
|
|
|
3233
2729
|
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
3234
2730
|
function hsl2rgb(h, m1, m2) {
|
|
@@ -4439,38 +3935,56 @@ const pi$1 = Math.PI,
|
|
|
4439
3935
|
tau$1 = 2 * pi$1,
|
|
4440
3936
|
epsilon$1 = 1e-6,
|
|
4441
3937
|
tauEpsilon = tau$1 - epsilon$1;
|
|
4442
|
-
function
|
|
4443
|
-
this.
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
}
|
|
4448
|
-
function
|
|
4449
|
-
|
|
4450
|
-
}
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
this._ +=
|
|
4455
|
-
|
|
4456
|
-
|
|
3938
|
+
function append$1(strings) {
|
|
3939
|
+
this._ += strings[0];
|
|
3940
|
+
for (let i = 1, n = strings.length; i < n; ++i) {
|
|
3941
|
+
this._ += arguments[i] + strings[i];
|
|
3942
|
+
}
|
|
3943
|
+
}
|
|
3944
|
+
function appendRound$1(digits) {
|
|
3945
|
+
let d = Math.floor(digits);
|
|
3946
|
+
if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
|
|
3947
|
+
if (d > 15) return append$1;
|
|
3948
|
+
const k = 10 ** d;
|
|
3949
|
+
return function (strings) {
|
|
3950
|
+
this._ += strings[0];
|
|
3951
|
+
for (let i = 1, n = strings.length; i < n; ++i) {
|
|
3952
|
+
this._ += Math.round(arguments[i] * k) / k + strings[i];
|
|
3953
|
+
}
|
|
3954
|
+
};
|
|
3955
|
+
}
|
|
3956
|
+
class Path {
|
|
3957
|
+
constructor(digits) {
|
|
3958
|
+
this._x0 = this._y0 =
|
|
3959
|
+
// start of current subpath
|
|
3960
|
+
this._x1 = this._y1 = null; // end of current subpath
|
|
3961
|
+
this._ = "";
|
|
3962
|
+
this._append = digits == null ? append$1 : appendRound$1(digits);
|
|
3963
|
+
}
|
|
3964
|
+
moveTo(x, y) {
|
|
3965
|
+
this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;
|
|
3966
|
+
}
|
|
3967
|
+
closePath() {
|
|
4457
3968
|
if (this._x1 !== null) {
|
|
4458
3969
|
this._x1 = this._x0, this._y1 = this._y0;
|
|
4459
|
-
this.
|
|
3970
|
+
this._append`Z`;
|
|
4460
3971
|
}
|
|
4461
|
-
}
|
|
4462
|
-
lineTo
|
|
4463
|
-
this.
|
|
4464
|
-
}
|
|
4465
|
-
quadraticCurveTo
|
|
4466
|
-
this.
|
|
4467
|
-
}
|
|
4468
|
-
bezierCurveTo
|
|
4469
|
-
this.
|
|
4470
|
-
}
|
|
4471
|
-
arcTo
|
|
3972
|
+
}
|
|
3973
|
+
lineTo(x, y) {
|
|
3974
|
+
this._append`L${this._x1 = +x},${this._y1 = +y}`;
|
|
3975
|
+
}
|
|
3976
|
+
quadraticCurveTo(x1, y1, x, y) {
|
|
3977
|
+
this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;
|
|
3978
|
+
}
|
|
3979
|
+
bezierCurveTo(x1, y1, x2, y2, x, y) {
|
|
3980
|
+
this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;
|
|
3981
|
+
}
|
|
3982
|
+
arcTo(x1, y1, x2, y2, r) {
|
|
4472
3983
|
x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
|
|
4473
|
-
|
|
3984
|
+
|
|
3985
|
+
// Is the radius negative? Error.
|
|
3986
|
+
if (r < 0) throw new Error(`negative radius: ${r}`);
|
|
3987
|
+
let x0 = this._x1,
|
|
4474
3988
|
y0 = this._y1,
|
|
4475
3989
|
x21 = x2 - x1,
|
|
4476
3990
|
y21 = y2 - y1,
|
|
@@ -4478,12 +3992,9 @@ Path.prototype = path.prototype = {
|
|
|
4478
3992
|
y01 = y0 - y1,
|
|
4479
3993
|
l01_2 = x01 * x01 + y01 * y01;
|
|
4480
3994
|
|
|
4481
|
-
// Is the radius negative? Error.
|
|
4482
|
-
if (r < 0) throw new Error("negative radius: " + r);
|
|
4483
|
-
|
|
4484
3995
|
// Is this path empty? Move to (x1,y1).
|
|
4485
3996
|
if (this._x1 === null) {
|
|
4486
|
-
this.
|
|
3997
|
+
this._append`M${this._x1 = x1},${this._y1 = y1}`;
|
|
4487
3998
|
}
|
|
4488
3999
|
|
|
4489
4000
|
// Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
|
|
@@ -4493,12 +4004,12 @@ Path.prototype = path.prototype = {
|
|
|
4493
4004
|
// Equivalently, is (x1,y1) coincident with (x2,y2)?
|
|
4494
4005
|
// Or, is the radius zero? Line to (x1,y1).
|
|
4495
4006
|
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon$1) || !r) {
|
|
4496
|
-
this.
|
|
4007
|
+
this._append`L${this._x1 = x1},${this._y1 = y1}`;
|
|
4497
4008
|
}
|
|
4498
4009
|
|
|
4499
4010
|
// Otherwise, draw an arc!
|
|
4500
4011
|
else {
|
|
4501
|
-
|
|
4012
|
+
let x20 = x2 - x0,
|
|
4502
4013
|
y20 = y2 - y0,
|
|
4503
4014
|
l21_2 = x21 * x21 + y21 * y21,
|
|
4504
4015
|
l20_2 = x20 * x20 + y20 * y20,
|
|
@@ -4510,31 +4021,31 @@ Path.prototype = path.prototype = {
|
|
|
4510
4021
|
|
|
4511
4022
|
// If the start tangent is not coincident with (x0,y0), line to.
|
|
4512
4023
|
if (Math.abs(t01 - 1) > epsilon$1) {
|
|
4513
|
-
this.
|
|
4024
|
+
this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;
|
|
4514
4025
|
}
|
|
4515
|
-
this.
|
|
4026
|
+
this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
|
|
4516
4027
|
}
|
|
4517
|
-
}
|
|
4518
|
-
arc
|
|
4028
|
+
}
|
|
4029
|
+
arc(x, y, r, a0, a1, ccw) {
|
|
4519
4030
|
x = +x, y = +y, r = +r, ccw = !!ccw;
|
|
4520
|
-
|
|
4031
|
+
|
|
4032
|
+
// Is the radius negative? Error.
|
|
4033
|
+
if (r < 0) throw new Error(`negative radius: ${r}`);
|
|
4034
|
+
let dx = r * Math.cos(a0),
|
|
4521
4035
|
dy = r * Math.sin(a0),
|
|
4522
4036
|
x0 = x + dx,
|
|
4523
4037
|
y0 = y + dy,
|
|
4524
4038
|
cw = 1 ^ ccw,
|
|
4525
4039
|
da = ccw ? a0 - a1 : a1 - a0;
|
|
4526
4040
|
|
|
4527
|
-
// Is the radius negative? Error.
|
|
4528
|
-
if (r < 0) throw new Error("negative radius: " + r);
|
|
4529
|
-
|
|
4530
4041
|
// Is this path empty? Move to (x0,y0).
|
|
4531
4042
|
if (this._x1 === null) {
|
|
4532
|
-
this.
|
|
4043
|
+
this._append`M${x0},${y0}`;
|
|
4533
4044
|
}
|
|
4534
4045
|
|
|
4535
4046
|
// Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
|
|
4536
4047
|
else if (Math.abs(this._x1 - x0) > epsilon$1 || Math.abs(this._y1 - y0) > epsilon$1) {
|
|
4537
|
-
this.
|
|
4048
|
+
this._append`L${x0},${y0}`;
|
|
4538
4049
|
}
|
|
4539
4050
|
|
|
4540
4051
|
// Is this arc empty? We’re done.
|
|
@@ -4545,119 +4056,20 @@ Path.prototype = path.prototype = {
|
|
|
4545
4056
|
|
|
4546
4057
|
// Is this a complete circle? Draw two arcs to complete the circle.
|
|
4547
4058
|
if (da > tauEpsilon) {
|
|
4548
|
-
this.
|
|
4059
|
+
this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;
|
|
4549
4060
|
}
|
|
4550
4061
|
|
|
4551
4062
|
// Is this arc non-empty? Draw an arc!
|
|
4552
4063
|
else if (da > epsilon$1) {
|
|
4553
|
-
this.
|
|
4064
|
+
this._append`A${r},${r},0,${+(da >= pi$1)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;
|
|
4554
4065
|
}
|
|
4555
|
-
},
|
|
4556
|
-
rect: function (x, y, w, h) {
|
|
4557
|
-
this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + +w + "v" + +h + "h" + -w + "Z";
|
|
4558
|
-
},
|
|
4559
|
-
toString: function () {
|
|
4560
|
-
return this._;
|
|
4561
4066
|
}
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
function count(values, valueof) {
|
|
4565
|
-
let count = 0;
|
|
4566
|
-
if (valueof === undefined) {
|
|
4567
|
-
for (let value of values) {
|
|
4568
|
-
if (value != null && (value = +value) >= value) {
|
|
4569
|
-
++count;
|
|
4570
|
-
}
|
|
4571
|
-
}
|
|
4572
|
-
} else {
|
|
4573
|
-
let index = -1;
|
|
4574
|
-
for (let value of values) {
|
|
4575
|
-
if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {
|
|
4576
|
-
++count;
|
|
4577
|
-
}
|
|
4578
|
-
}
|
|
4067
|
+
rect(x, y, w, h) {
|
|
4068
|
+
this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;
|
|
4579
4069
|
}
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
function extent(values, valueof) {
|
|
4584
|
-
let min;
|
|
4585
|
-
let max;
|
|
4586
|
-
if (valueof === undefined) {
|
|
4587
|
-
for (const value of values) {
|
|
4588
|
-
if (value != null) {
|
|
4589
|
-
if (min === undefined) {
|
|
4590
|
-
if (value >= value) min = max = value;
|
|
4591
|
-
} else {
|
|
4592
|
-
if (min > value) min = value;
|
|
4593
|
-
if (max < value) max = value;
|
|
4594
|
-
}
|
|
4595
|
-
}
|
|
4596
|
-
}
|
|
4597
|
-
} else {
|
|
4598
|
-
let index = -1;
|
|
4599
|
-
for (let value of values) {
|
|
4600
|
-
if ((value = valueof(value, ++index, values)) != null) {
|
|
4601
|
-
if (min === undefined) {
|
|
4602
|
-
if (value >= value) min = max = value;
|
|
4603
|
-
} else {
|
|
4604
|
-
if (min > value) min = value;
|
|
4605
|
-
if (max < value) max = value;
|
|
4606
|
-
}
|
|
4607
|
-
}
|
|
4608
|
-
}
|
|
4070
|
+
toString() {
|
|
4071
|
+
return this._;
|
|
4609
4072
|
}
|
|
4610
|
-
return [min, max];
|
|
4611
|
-
}
|
|
4612
|
-
|
|
4613
|
-
var e10 = Math.sqrt(50),
|
|
4614
|
-
e5 = Math.sqrt(10),
|
|
4615
|
-
e2 = Math.sqrt(2);
|
|
4616
|
-
function ticks(start, stop, count) {
|
|
4617
|
-
var reverse,
|
|
4618
|
-
i = -1,
|
|
4619
|
-
n,
|
|
4620
|
-
ticks,
|
|
4621
|
-
step;
|
|
4622
|
-
stop = +stop, start = +start, count = +count;
|
|
4623
|
-
if (start === stop && count > 0) return [start];
|
|
4624
|
-
if (reverse = stop < start) n = start, start = stop, stop = n;
|
|
4625
|
-
if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
|
|
4626
|
-
if (step > 0) {
|
|
4627
|
-
let r0 = Math.round(start / step),
|
|
4628
|
-
r1 = Math.round(stop / step);
|
|
4629
|
-
if (r0 * step < start) ++r0;
|
|
4630
|
-
if (r1 * step > stop) --r1;
|
|
4631
|
-
ticks = new Array(n = r1 - r0 + 1);
|
|
4632
|
-
while (++i < n) ticks[i] = (r0 + i) * step;
|
|
4633
|
-
} else {
|
|
4634
|
-
step = -step;
|
|
4635
|
-
let r0 = Math.round(start * step),
|
|
4636
|
-
r1 = Math.round(stop * step);
|
|
4637
|
-
if (r0 / step < start) ++r0;
|
|
4638
|
-
if (r1 / step > stop) --r1;
|
|
4639
|
-
ticks = new Array(n = r1 - r0 + 1);
|
|
4640
|
-
while (++i < n) ticks[i] = (r0 + i) / step;
|
|
4641
|
-
}
|
|
4642
|
-
if (reverse) ticks.reverse();
|
|
4643
|
-
return ticks;
|
|
4644
|
-
}
|
|
4645
|
-
function tickIncrement(start, stop, count) {
|
|
4646
|
-
var step = (stop - start) / Math.max(0, count),
|
|
4647
|
-
power = Math.floor(Math.log(step) / Math.LN10),
|
|
4648
|
-
error = step / Math.pow(10, power);
|
|
4649
|
-
return power >= 0 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
|
|
4650
|
-
}
|
|
4651
|
-
function tickStep(start, stop, count) {
|
|
4652
|
-
var step0 = Math.abs(stop - start) / Math.max(0, count),
|
|
4653
|
-
step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
|
|
4654
|
-
error = step0 / step1;
|
|
4655
|
-
if (error >= e10) step1 *= 10;else if (error >= e5) step1 *= 5;else if (error >= e2) step1 *= 2;
|
|
4656
|
-
return stop < start ? -step1 : step1;
|
|
4657
|
-
}
|
|
4658
|
-
|
|
4659
|
-
function thresholdSturges(values) {
|
|
4660
|
-
return Math.ceil(Math.log(count(values)) / Math.LN2) + 1;
|
|
4661
4073
|
}
|
|
4662
4074
|
|
|
4663
4075
|
var array$1 = Array.prototype;
|
|
@@ -4724,9 +4136,10 @@ function Contours () {
|
|
|
4724
4136
|
|
|
4725
4137
|
// Convert number of thresholds into uniform thresholds.
|
|
4726
4138
|
if (!Array.isArray(tz)) {
|
|
4727
|
-
const e = extent(values)
|
|
4728
|
-
|
|
4729
|
-
|
|
4139
|
+
const e = extent(values, finite);
|
|
4140
|
+
tz = ticks(...nice(e[0], e[1], tz), tz);
|
|
4141
|
+
while (tz[tz.length - 1] >= e[1]) tz.pop();
|
|
4142
|
+
while (tz[1] < e[0]) tz.shift();
|
|
4730
4143
|
} else {
|
|
4731
4144
|
tz = tz.slice().sort(ascending);
|
|
4732
4145
|
}
|
|
@@ -4736,10 +4149,12 @@ function Contours () {
|
|
|
4736
4149
|
// Accumulate, smooth contour rings, assign holes to exterior rings.
|
|
4737
4150
|
// Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js
|
|
4738
4151
|
function contour(values, value) {
|
|
4152
|
+
const v = value == null ? NaN : +value;
|
|
4153
|
+
if (isNaN(v)) throw new Error(`invalid value: ${value}`);
|
|
4739
4154
|
var polygons = [],
|
|
4740
4155
|
holes = [];
|
|
4741
|
-
isorings(values,
|
|
4742
|
-
smooth(ring, values,
|
|
4156
|
+
isorings(values, v, function (ring) {
|
|
4157
|
+
smooth(ring, values, v);
|
|
4743
4158
|
if (area(ring) > 0) polygons.push([ring]);else holes.push(ring);
|
|
4744
4159
|
});
|
|
4745
4160
|
holes.forEach(function (hole) {
|
|
@@ -4771,10 +4186,10 @@ function Contours () {
|
|
|
4771
4186
|
|
|
4772
4187
|
// Special case for the first row (y = -1, t2 = t3 = 0).
|
|
4773
4188
|
x = y = -1;
|
|
4774
|
-
t1 = values[0]
|
|
4189
|
+
t1 = above(values[0], value);
|
|
4775
4190
|
cases[t1 << 1].forEach(stitch);
|
|
4776
4191
|
while (++x < dx - 1) {
|
|
4777
|
-
t0 = t1, t1 = values[x + 1]
|
|
4192
|
+
t0 = t1, t1 = above(values[x + 1], value);
|
|
4778
4193
|
cases[t0 | t1 << 1].forEach(stitch);
|
|
4779
4194
|
}
|
|
4780
4195
|
cases[t1 << 0].forEach(stitch);
|
|
@@ -4782,12 +4197,12 @@ function Contours () {
|
|
|
4782
4197
|
// General case for the intermediate rows.
|
|
4783
4198
|
while (++y < dy - 1) {
|
|
4784
4199
|
x = -1;
|
|
4785
|
-
t1 = values[y * dx + dx]
|
|
4786
|
-
t2 = values[y * dx]
|
|
4200
|
+
t1 = above(values[y * dx + dx], value);
|
|
4201
|
+
t2 = above(values[y * dx], value);
|
|
4787
4202
|
cases[t1 << 1 | t2 << 2].forEach(stitch);
|
|
4788
4203
|
while (++x < dx - 1) {
|
|
4789
|
-
t0 = t1, t1 = values[y * dx + dx + x + 1]
|
|
4790
|
-
t3 = t2, t2 = values[y * dx + x + 1]
|
|
4204
|
+
t0 = t1, t1 = above(values[y * dx + dx + x + 1], value);
|
|
4205
|
+
t3 = t2, t2 = above(values[y * dx + x + 1], value);
|
|
4791
4206
|
cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);
|
|
4792
4207
|
}
|
|
4793
4208
|
cases[t1 | t2 << 3].forEach(stitch);
|
|
@@ -4798,7 +4213,7 @@ function Contours () {
|
|
|
4798
4213
|
t2 = values[y * dx] >= value;
|
|
4799
4214
|
cases[t2 << 2].forEach(stitch);
|
|
4800
4215
|
while (++x < dx - 1) {
|
|
4801
|
-
t3 = t2, t2 = values[y * dx + x + 1]
|
|
4216
|
+
t3 = t2, t2 = above(values[y * dx + x + 1], value);
|
|
4802
4217
|
cases[t2 << 2 | t3 << 3].forEach(stitch);
|
|
4803
4218
|
}
|
|
4804
4219
|
cases[t2 << 3].forEach(stitch);
|
|
@@ -4865,15 +4280,12 @@ function Contours () {
|
|
|
4865
4280
|
y = point[1],
|
|
4866
4281
|
xt = x | 0,
|
|
4867
4282
|
yt = y | 0,
|
|
4868
|
-
|
|
4869
|
-
v1 = values[yt * dx + xt];
|
|
4283
|
+
v1 = valid(values[yt * dx + xt]);
|
|
4870
4284
|
if (x > 0 && x < dx && xt === x) {
|
|
4871
|
-
|
|
4872
|
-
point[0] = x + (value - v0) / (v1 - v0) - 0.5;
|
|
4285
|
+
point[0] = smooth1(x, valid(values[yt * dx + xt - 1]), v1, value);
|
|
4873
4286
|
}
|
|
4874
4287
|
if (y > 0 && y < dy && yt === y) {
|
|
4875
|
-
|
|
4876
|
-
point[1] = y + (value - v0) / (v1 - v0) - 0.5;
|
|
4288
|
+
point[1] = smooth1(y, valid(values[(yt - 1) * dx + xt]), v1, value);
|
|
4877
4289
|
}
|
|
4878
4290
|
});
|
|
4879
4291
|
}
|
|
@@ -4894,6 +4306,28 @@ function Contours () {
|
|
|
4894
4306
|
return contours;
|
|
4895
4307
|
}
|
|
4896
4308
|
|
|
4309
|
+
// When computing the extent, ignore infinite values (as well as invalid ones).
|
|
4310
|
+
function finite(x) {
|
|
4311
|
+
return isFinite(x) ? x : NaN;
|
|
4312
|
+
}
|
|
4313
|
+
|
|
4314
|
+
// Is the (possibly invalid) x greater than or equal to the (known valid) value?
|
|
4315
|
+
// Treat any invalid value as below negative infinity.
|
|
4316
|
+
function above(x, value) {
|
|
4317
|
+
return x == null ? false : +x >= value;
|
|
4318
|
+
}
|
|
4319
|
+
|
|
4320
|
+
// During smoothing, treat any invalid value as negative infinity.
|
|
4321
|
+
function valid(v) {
|
|
4322
|
+
return v == null || isNaN(v = +v) ? -Infinity : v;
|
|
4323
|
+
}
|
|
4324
|
+
function smooth1(x, v0, v1, value) {
|
|
4325
|
+
const a = value - v0;
|
|
4326
|
+
const b = v1 - v0;
|
|
4327
|
+
const d = isFinite(a) || isFinite(b) ? a / b : Math.sign(a) / Math.sign(b);
|
|
4328
|
+
return isNaN(d) ? x : x + d - 0.5;
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4897
4331
|
function formatDecimal (x) {
|
|
4898
4332
|
return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
|
|
4899
4333
|
}
|
|
@@ -5850,66 +5284,96 @@ function lengthPoint(x, y) {
|
|
|
5850
5284
|
}
|
|
5851
5285
|
var pathMeasure = lengthStream;
|
|
5852
5286
|
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5287
|
+
// Simple caching for constant-radius points.
|
|
5288
|
+
let cacheDigits, cacheAppend, cacheRadius, cacheCircle;
|
|
5289
|
+
class PathString {
|
|
5290
|
+
constructor(digits) {
|
|
5291
|
+
this._append = digits == null ? append : appendRound(digits);
|
|
5292
|
+
this._radius = 4.5;
|
|
5293
|
+
this._ = "";
|
|
5294
|
+
}
|
|
5295
|
+
pointRadius(_) {
|
|
5296
|
+
this._radius = +_;
|
|
5861
5297
|
return this;
|
|
5862
|
-
}
|
|
5863
|
-
polygonStart
|
|
5298
|
+
}
|
|
5299
|
+
polygonStart() {
|
|
5864
5300
|
this._line = 0;
|
|
5865
|
-
}
|
|
5866
|
-
polygonEnd
|
|
5301
|
+
}
|
|
5302
|
+
polygonEnd() {
|
|
5867
5303
|
this._line = NaN;
|
|
5868
|
-
}
|
|
5869
|
-
lineStart
|
|
5304
|
+
}
|
|
5305
|
+
lineStart() {
|
|
5870
5306
|
this._point = 0;
|
|
5871
|
-
}
|
|
5872
|
-
lineEnd
|
|
5873
|
-
if (this._line === 0) this.
|
|
5307
|
+
}
|
|
5308
|
+
lineEnd() {
|
|
5309
|
+
if (this._line === 0) this._ += "Z";
|
|
5874
5310
|
this._point = NaN;
|
|
5875
|
-
}
|
|
5876
|
-
point
|
|
5311
|
+
}
|
|
5312
|
+
point(x, y) {
|
|
5877
5313
|
switch (this._point) {
|
|
5878
5314
|
case 0:
|
|
5879
5315
|
{
|
|
5880
|
-
this.
|
|
5316
|
+
this._append`M${x},${y}`;
|
|
5881
5317
|
this._point = 1;
|
|
5882
5318
|
break;
|
|
5883
5319
|
}
|
|
5884
5320
|
case 1:
|
|
5885
5321
|
{
|
|
5886
|
-
this.
|
|
5322
|
+
this._append`L${x},${y}`;
|
|
5887
5323
|
break;
|
|
5888
5324
|
}
|
|
5889
5325
|
default:
|
|
5890
5326
|
{
|
|
5891
|
-
|
|
5892
|
-
this.
|
|
5327
|
+
this._append`M${x},${y}`;
|
|
5328
|
+
if (this._radius !== cacheRadius || this._append !== cacheAppend) {
|
|
5329
|
+
const r = this._radius;
|
|
5330
|
+
const s = this._;
|
|
5331
|
+
this._ = ""; // stash the old string so we can cache the circle path fragment
|
|
5332
|
+
this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;
|
|
5333
|
+
cacheRadius = r;
|
|
5334
|
+
cacheAppend = this._append;
|
|
5335
|
+
cacheCircle = this._;
|
|
5336
|
+
this._ = s;
|
|
5337
|
+
}
|
|
5338
|
+
this._ += cacheCircle;
|
|
5893
5339
|
break;
|
|
5894
5340
|
}
|
|
5895
5341
|
}
|
|
5896
|
-
},
|
|
5897
|
-
result: function () {
|
|
5898
|
-
if (this._string.length) {
|
|
5899
|
-
var result = this._string.join("");
|
|
5900
|
-
this._string = [];
|
|
5901
|
-
return result;
|
|
5902
|
-
} else {
|
|
5903
|
-
return null;
|
|
5904
|
-
}
|
|
5905
5342
|
}
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5343
|
+
result() {
|
|
5344
|
+
const result = this._;
|
|
5345
|
+
this._ = "";
|
|
5346
|
+
return result.length ? result : null;
|
|
5347
|
+
}
|
|
5348
|
+
}
|
|
5349
|
+
function append(strings) {
|
|
5350
|
+
let i = 1;
|
|
5351
|
+
this._ += strings[0];
|
|
5352
|
+
for (const j = strings.length; i < j; ++i) {
|
|
5353
|
+
this._ += arguments[i] + strings[i];
|
|
5354
|
+
}
|
|
5355
|
+
}
|
|
5356
|
+
function appendRound(digits) {
|
|
5357
|
+
const d = Math.floor(digits);
|
|
5358
|
+
if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);
|
|
5359
|
+
if (d > 15) return append;
|
|
5360
|
+
if (d !== cacheDigits) {
|
|
5361
|
+
const k = 10 ** d;
|
|
5362
|
+
cacheDigits = d;
|
|
5363
|
+
cacheAppend = function append(strings) {
|
|
5364
|
+
let i = 1;
|
|
5365
|
+
this._ += strings[0];
|
|
5366
|
+
for (const j = strings.length; i < j; ++i) {
|
|
5367
|
+
this._ += Math.round(arguments[i] * k) / k + strings[i];
|
|
5368
|
+
}
|
|
5369
|
+
};
|
|
5370
|
+
}
|
|
5371
|
+
return cacheAppend;
|
|
5909
5372
|
}
|
|
5910
5373
|
|
|
5911
5374
|
function index (projection, context) {
|
|
5912
|
-
|
|
5375
|
+
let digits = 3,
|
|
5376
|
+
pointRadius = 4.5,
|
|
5913
5377
|
projectionStream,
|
|
5914
5378
|
contextStream;
|
|
5915
5379
|
function path(object) {
|
|
@@ -5936,11 +5400,13 @@ function index (projection, context) {
|
|
|
5936
5400
|
return pathCentroid.result();
|
|
5937
5401
|
};
|
|
5938
5402
|
path.projection = function (_) {
|
|
5939
|
-
|
|
5403
|
+
if (!arguments.length) return projection;
|
|
5404
|
+
projectionStream = _ == null ? (projection = null, identity$2) : (projection = _).stream;
|
|
5405
|
+
return path;
|
|
5940
5406
|
};
|
|
5941
5407
|
path.context = function (_) {
|
|
5942
5408
|
if (!arguments.length) return context;
|
|
5943
|
-
contextStream = _ == null ? (context = null, new PathString()) : new PathContext(context = _);
|
|
5409
|
+
contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);
|
|
5944
5410
|
if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius);
|
|
5945
5411
|
return path;
|
|
5946
5412
|
};
|
|
@@ -5949,7 +5415,17 @@ function index (projection, context) {
|
|
|
5949
5415
|
pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_);
|
|
5950
5416
|
return path;
|
|
5951
5417
|
};
|
|
5952
|
-
|
|
5418
|
+
path.digits = function (_) {
|
|
5419
|
+
if (!arguments.length) return digits;
|
|
5420
|
+
if (_ == null) digits = null;else {
|
|
5421
|
+
const d = Math.floor(_);
|
|
5422
|
+
if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
|
|
5423
|
+
digits = d;
|
|
5424
|
+
}
|
|
5425
|
+
if (context === null) contextStream = new PathString(digits);
|
|
5426
|
+
return path;
|
|
5427
|
+
};
|
|
5428
|
+
return path.projection(projection).digits(digits).context(context);
|
|
5953
5429
|
}
|
|
5954
5430
|
|
|
5955
5431
|
function transformer$1(methods) {
|
|
@@ -6244,7 +5720,7 @@ function continuous() {
|
|
|
6244
5720
|
}
|
|
6245
5721
|
|
|
6246
5722
|
function tickFormat(start, stop, count, specifier) {
|
|
6247
|
-
var step = tickStep
|
|
5723
|
+
var step = tickStep(start, stop, count),
|
|
6248
5724
|
precision;
|
|
6249
5725
|
specifier = formatSpecifier(specifier == null ? ",f" : specifier);
|
|
6250
5726
|
switch (specifier.type) {
|
|
@@ -6277,7 +5753,7 @@ function linearish(scale) {
|
|
|
6277
5753
|
var domain = scale.domain;
|
|
6278
5754
|
scale.ticks = function (count) {
|
|
6279
5755
|
var d = domain();
|
|
6280
|
-
return ticks
|
|
5756
|
+
return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
|
|
6281
5757
|
};
|
|
6282
5758
|
scale.tickFormat = function (count, specifier) {
|
|
6283
5759
|
var d = domain();
|
|
@@ -6298,7 +5774,7 @@ function linearish(scale) {
|
|
|
6298
5774
|
step = i0, i0 = i1, i1 = step;
|
|
6299
5775
|
}
|
|
6300
5776
|
while (maxIter-- > 0) {
|
|
6301
|
-
step = tickIncrement
|
|
5777
|
+
step = tickIncrement(start, stop, count);
|
|
6302
5778
|
if (step === prestep) {
|
|
6303
5779
|
d[i0] = start;
|
|
6304
5780
|
d[i1] = stop;
|
|
@@ -6343,6 +5819,22 @@ function constant (x) {
|
|
|
6343
5819
|
};
|
|
6344
5820
|
}
|
|
6345
5821
|
|
|
5822
|
+
function withPath(shape) {
|
|
5823
|
+
let digits = 3;
|
|
5824
|
+
shape.digits = function (_) {
|
|
5825
|
+
if (!arguments.length) return digits;
|
|
5826
|
+
if (_ == null) {
|
|
5827
|
+
digits = null;
|
|
5828
|
+
} else {
|
|
5829
|
+
const d = Math.floor(_);
|
|
5830
|
+
if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
|
|
5831
|
+
digits = d;
|
|
5832
|
+
}
|
|
5833
|
+
return shape;
|
|
5834
|
+
};
|
|
5835
|
+
return () => new Path(digits);
|
|
5836
|
+
}
|
|
5837
|
+
|
|
6346
5838
|
function array (x) {
|
|
6347
5839
|
return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like
|
|
6348
5840
|
: Array.from(x); // Map, Set, iterable, string, or anything else
|
|
@@ -6396,7 +5888,8 @@ function line (x$1, y$1) {
|
|
|
6396
5888
|
var defined = constant(true),
|
|
6397
5889
|
context = null,
|
|
6398
5890
|
curve = curveLinear,
|
|
6399
|
-
output = null
|
|
5891
|
+
output = null,
|
|
5892
|
+
path = withPath(line);
|
|
6400
5893
|
x$1 = typeof x$1 === "function" ? x$1 : x$1 === undefined ? x : constant(x$1);
|
|
6401
5894
|
y$1 = typeof y$1 === "function" ? y$1 : y$1 === undefined ? y : constant(y$1);
|
|
6402
5895
|
function line(data) {
|
|
@@ -6646,6 +6139,48 @@ class DecidablesElement extends s {
|
|
|
6646
6139
|
const ambientS = rotate ? `${-ambientM.y}px ${ambientM.y / 2}px ${ambientM.b}px ${ambientM.s}px` : `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
|
|
6647
6140
|
return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
|
|
6648
6141
|
}
|
|
6142
|
+
static get svgDefs() {
|
|
6143
|
+
const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
|
|
6144
|
+
|
|
6145
|
+
const filters = shadows.elevations.map(z => {
|
|
6146
|
+
return `
|
|
6147
|
+
<filter id=${`shadow-${z}`} filterUnits="userSpaceOnUse" x="-100%" y="-100%" width="200%" height="200%">
|
|
6148
|
+
<feComponentTransfer in="SourceAlpha" result="solid">
|
|
6149
|
+
<feFuncA type="table" tableValues="0 1 1"/>
|
|
6150
|
+
</feComponentTransfer>
|
|
6151
|
+
<feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
|
|
6152
|
+
<feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
|
|
6153
|
+
<feOffset in="solid" result="offA" dx=${shadows.mapAmbient[z].y / 2} dy=${shadows.mapAmbient[z].y} />
|
|
6154
|
+
${shadows.mapUmbra[z].s === 0 ? '' : `<feMorphology in="offU" result="spreadU" operator=${shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapUmbra[z].s)} />`}
|
|
6155
|
+
${shadows.mapPenumbra[z].s === 0 ? '' : `<feMorphology in="offP" result="spreadP" operator=${shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapPenumbra[z].s)} />`}
|
|
6156
|
+
${shadows.mapAmbient[z].s === 0 ? '' : `<feMorphology in="offA" result="spreadA" operator=${shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapAmbient[z].s)} />`}
|
|
6157
|
+
<feGaussianBlur in=${shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU'} result="blurU" stdDeviation=${shadows.mapUmbra[z].b / 2} />
|
|
6158
|
+
<feGaussianBlur in=${shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP'} result="blurP" stdDeviation=${shadows.mapPenumbra[z].b / 2} />
|
|
6159
|
+
<feGaussianBlur in=${shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA'} result="blurA" stdDeviation=${shadows.mapAmbient[z].b / 2} />
|
|
6160
|
+
<feFlood in="SourceGraphic" result="opU" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityUmbra + shadows.opacityBoost} />
|
|
6161
|
+
<feFlood in="SourceGraphic" result="opP" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityPenumbra + shadows.opacityBoost} />
|
|
6162
|
+
<feFlood in="SourceGraphic" result="opA" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityAmbient + shadows.opacityBoost} />
|
|
6163
|
+
<feComposite in="opU" in2="blurU" result="shU" operator="in" />
|
|
6164
|
+
<feComposite in="opP" in2="blurP" result="shP" operator="in" />
|
|
6165
|
+
<feComposite in="opA" in2="blurA" result="shA" operator="in" />
|
|
6166
|
+
<feMorphology in="solid" result="smaller" operator="erode" radius="1" />
|
|
6167
|
+
<feComposite in="shU" in2="smaller" result="finalU" operator="out" />
|
|
6168
|
+
<feComposite in="shP" in2="smaller" result="finalP" operator="out" />
|
|
6169
|
+
<feComposite in="shA" in2="smaller" result="finalA" operator="out" />
|
|
6170
|
+
<feMerge>
|
|
6171
|
+
<feMergeNode in="finalU" />
|
|
6172
|
+
<feMergeNode in="finalP" />
|
|
6173
|
+
<feMergeNode in="finalA" />
|
|
6174
|
+
<feMergeNode in="SourceGraphic" />
|
|
6175
|
+
</feMerge>
|
|
6176
|
+
</filter>`;
|
|
6177
|
+
});
|
|
6178
|
+
return `
|
|
6179
|
+
<defs>
|
|
6180
|
+
${filters}
|
|
6181
|
+
</defs>
|
|
6182
|
+
`;
|
|
6183
|
+
}
|
|
6649
6184
|
static get svgFilters() {
|
|
6650
6185
|
const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
|
|
6651
6186
|
|
|
@@ -6653,7 +6188,7 @@ class DecidablesElement extends s {
|
|
|
6653
6188
|
return b`
|
|
6654
6189
|
<filter id=${`shadow-${z}`} x="-250%" y="-250%" width="600%" height="600%">
|
|
6655
6190
|
<feComponentTransfer in="SourceAlpha" result="solid">
|
|
6656
|
-
<feFuncA
|
|
6191
|
+
<feFuncA type="table" tableValues="0 1 1"/>
|
|
6657
6192
|
</feComponentTransfer>
|
|
6658
6193
|
<feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
|
|
6659
6194
|
<feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
|
|
@@ -6691,24 +6226,24 @@ class DecidablesElement extends s {
|
|
|
6691
6226
|
`;
|
|
6692
6227
|
}
|
|
6693
6228
|
static get styles() {
|
|
6694
|
-
return
|
|
6229
|
+
return i$1`
|
|
6695
6230
|
:host {
|
|
6696
|
-
---shadow-0: var(--shadow-0, ${
|
|
6697
|
-
---shadow-2: var(--shadow-2, ${
|
|
6698
|
-
---shadow-4: var(--shadow-4, ${
|
|
6699
|
-
---shadow-8: var(--shadow-8, ${
|
|
6700
|
-
|
|
6701
|
-
---color-background: var(--color-background, ${
|
|
6702
|
-
---color-border: var(--color-border, ${
|
|
6703
|
-
---color-text: var(--color-text, ${
|
|
6704
|
-
---color-text-inverse: var(--color-text-inverse, ${
|
|
6705
|
-
---color-link: var(--color-link, ${
|
|
6706
|
-
---color-element-background: var(--color-element-background, ${
|
|
6707
|
-
---color-element-disabled: var(--color-element-disabled, ${
|
|
6708
|
-
---color-element-enabled: var(--color-element-enabled, ${
|
|
6709
|
-
---color-element-selected: var(--color-element-selected, ${
|
|
6710
|
-
---color-element-border: var(--color-element-border, ${
|
|
6711
|
-
---color-element-emphasis: var(--color-element-emphasis, ${
|
|
6231
|
+
---shadow-0: var(--shadow-0, ${r$2(this.cssBoxShadow(0))});
|
|
6232
|
+
---shadow-2: var(--shadow-2, ${r$2(this.cssBoxShadow(2))});
|
|
6233
|
+
---shadow-4: var(--shadow-4, ${r$2(this.cssBoxShadow(4))});
|
|
6234
|
+
---shadow-8: var(--shadow-8, ${r$2(this.cssBoxShadow(8))});
|
|
6235
|
+
|
|
6236
|
+
---color-background: var(--color-background, ${r$2(this.greys.white)});
|
|
6237
|
+
---color-border: var(--color-border, ${r$2(this.greys.light75)});
|
|
6238
|
+
---color-text: var(--color-text, ${r$2(this.greys.dark75)});
|
|
6239
|
+
---color-text-inverse: var(--color-text-inverse, ${r$2(this.greys.white)});
|
|
6240
|
+
---color-link: var(--color-link, ${r$2(this.greys.dark25)});
|
|
6241
|
+
---color-element-background: var(--color-element-background, ${r$2(this.greys.light75)});
|
|
6242
|
+
---color-element-disabled: var(--color-element-disabled, ${r$2(this.greys.light50)});
|
|
6243
|
+
---color-element-enabled: var(--color-element-enabled, ${r$2(this.greys.dark25)});
|
|
6244
|
+
---color-element-selected: var(--color-element-selected, ${r$2(this.greys.grey)});
|
|
6245
|
+
---color-element-border: var(--color-element-border, ${r$2(this.greys.dark50)});
|
|
6246
|
+
---color-element-emphasis: var(--color-element-emphasis, ${r$2(this.greys.dark75)});
|
|
6712
6247
|
|
|
6713
6248
|
---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
|
|
6714
6249
|
---font-family-math: var(--font-family-math, "Source Serif", serif);
|
|
@@ -6769,7 +6304,7 @@ class DecidablesButton extends DecidablesElement {
|
|
|
6769
6304
|
this.disabled = false;
|
|
6770
6305
|
}
|
|
6771
6306
|
static get styles() {
|
|
6772
|
-
return [super.styles,
|
|
6307
|
+
return [super.styles, i$1`
|
|
6773
6308
|
:host {
|
|
6774
6309
|
margin: 0.25rem;
|
|
6775
6310
|
}
|
|
@@ -6839,7 +6374,7 @@ customElements.define('decidables-button', DecidablesButton);
|
|
|
6839
6374
|
* Copyright 2018 Google LLC
|
|
6840
6375
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6841
6376
|
*/
|
|
6842
|
-
const l = l => null != l ? l : A
|
|
6377
|
+
const l = l => null != l ? l : A;
|
|
6843
6378
|
|
|
6844
6379
|
class DecidablesSlider extends DecidablesElement {
|
|
6845
6380
|
static get properties() {
|
|
@@ -6894,11 +6429,11 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
6894
6429
|
this.value = event.target.value;
|
|
6895
6430
|
}
|
|
6896
6431
|
static get styles() {
|
|
6897
|
-
return [super.styles,
|
|
6432
|
+
return [super.styles, i$1`
|
|
6898
6433
|
:host {
|
|
6899
|
-
---shadow-2-rotate: var(--shadow-2-rotate, ${
|
|
6900
|
-
---shadow-4-rotate: var(--shadow-4-rotate, ${
|
|
6901
|
-
---shadow-8-rotate: var(--shadow-8-rotate, ${
|
|
6434
|
+
---shadow-2-rotate: var(--shadow-2-rotate, ${r$2(this.cssBoxShadow(2, true, false))});
|
|
6435
|
+
---shadow-4-rotate: var(--shadow-4-rotate, ${r$2(this.cssBoxShadow(4, true, false))});
|
|
6436
|
+
---shadow-8-rotate: var(--shadow-8-rotate, ${r$2(this.cssBoxShadow(8, true, false))});
|
|
6902
6437
|
|
|
6903
6438
|
display: flex;
|
|
6904
6439
|
|
|
@@ -7204,12 +6739,15 @@ class DecidablesSpinner extends DecidablesElement {
|
|
|
7204
6739
|
this.value = event.target.value;
|
|
7205
6740
|
}
|
|
7206
6741
|
static get styles() {
|
|
7207
|
-
return [super.styles,
|
|
6742
|
+
return [super.styles, i$1`
|
|
7208
6743
|
:host {
|
|
7209
6744
|
---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
|
|
7210
6745
|
---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
|
|
7211
6746
|
---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
|
|
7212
6747
|
|
|
6748
|
+
---decidables-spinner-postfix: var(--decidables-spinner-postfix, "");
|
|
6749
|
+
---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0);
|
|
6750
|
+
|
|
7213
6751
|
display: block;
|
|
7214
6752
|
}
|
|
7215
6753
|
|
|
@@ -7237,8 +6775,20 @@ class DecidablesSpinner extends DecidablesElement {
|
|
|
7237
6775
|
content: var(---decidables-spinner-prefix);
|
|
7238
6776
|
}
|
|
7239
6777
|
|
|
6778
|
+
label::after {
|
|
6779
|
+
position: absolute;
|
|
6780
|
+
right: 0.25rem;
|
|
6781
|
+
bottom: 1px;
|
|
6782
|
+
|
|
6783
|
+
font-size: var(---decidables-spinner-font-size);
|
|
6784
|
+
line-height: normal;
|
|
6785
|
+
|
|
6786
|
+
content: var(---decidables-spinner-postfix);
|
|
6787
|
+
}
|
|
6788
|
+
|
|
7240
6789
|
input[type=number] {
|
|
7241
6790
|
width: var(---decidables-spinner-input-width);
|
|
6791
|
+
padding-right: var(---decidables-spinner-postfix-padding);
|
|
7242
6792
|
|
|
7243
6793
|
font-family: var(---font-family-base);
|
|
7244
6794
|
font-size: var(---decidables-spinner-font-size);
|
|
@@ -7328,7 +6878,7 @@ class DecidablesSwitch extends DecidablesElement {
|
|
|
7328
6878
|
}));
|
|
7329
6879
|
}
|
|
7330
6880
|
static get styles() {
|
|
7331
|
-
return [super.styles,
|
|
6881
|
+
return [super.styles, i$1`
|
|
7332
6882
|
:host {
|
|
7333
6883
|
display: flex;
|
|
7334
6884
|
|
|
@@ -7480,7 +7030,7 @@ class DecidablesToggle extends DecidablesElement {
|
|
|
7480
7030
|
this.disabled = false;
|
|
7481
7031
|
}
|
|
7482
7032
|
static get styles() {
|
|
7483
|
-
return [super.styles,
|
|
7033
|
+
return [super.styles, i$1`
|
|
7484
7034
|
fieldset {
|
|
7485
7035
|
display: flex;
|
|
7486
7036
|
|
|
@@ -7555,7 +7105,7 @@ class DecidablesToggleOption extends DecidablesElement {
|
|
|
7555
7105
|
}));
|
|
7556
7106
|
}
|
|
7557
7107
|
static get styles() {
|
|
7558
|
-
return [super.styles,
|
|
7108
|
+
return [super.styles, i$1`
|
|
7559
7109
|
:host {
|
|
7560
7110
|
display: flex;
|
|
7561
7111
|
}
|
|
@@ -7691,6 +7241,50 @@ const DecidablesConverterSet = {
|
|
|
7691
7241
|
}
|
|
7692
7242
|
};
|
|
7693
7243
|
|
|
7244
|
+
function DecidablesMixinResizeable(superClass) {
|
|
7245
|
+
return class extends superClass {
|
|
7246
|
+
static get properties() {
|
|
7247
|
+
return {
|
|
7248
|
+
width: {
|
|
7249
|
+
attribute: false,
|
|
7250
|
+
type: Number,
|
|
7251
|
+
reflect: false
|
|
7252
|
+
},
|
|
7253
|
+
height: {
|
|
7254
|
+
attribute: false,
|
|
7255
|
+
type: Number,
|
|
7256
|
+
reflect: false
|
|
7257
|
+
},
|
|
7258
|
+
rem: {
|
|
7259
|
+
attribute: false,
|
|
7260
|
+
type: Number,
|
|
7261
|
+
reflect: false
|
|
7262
|
+
}
|
|
7263
|
+
};
|
|
7264
|
+
}
|
|
7265
|
+
constructor() {
|
|
7266
|
+
super();
|
|
7267
|
+
this.width = NaN;
|
|
7268
|
+
this.height = NaN;
|
|
7269
|
+
this.rem = NaN;
|
|
7270
|
+
}
|
|
7271
|
+
getDimensions() {
|
|
7272
|
+
this.width = parseFloat(this.getComputedStyleValue('width'), 10);
|
|
7273
|
+
this.height = parseFloat(this.getComputedStyleValue('height'), 10);
|
|
7274
|
+
this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
|
|
7275
|
+
}
|
|
7276
|
+
connectedCallback() {
|
|
7277
|
+
super.connectedCallback();
|
|
7278
|
+
this.resizeObserver = new ResizeObserver(this.getDimensions.bind(this));
|
|
7279
|
+
this.resizeObserver.observe(this);
|
|
7280
|
+
}
|
|
7281
|
+
disconnectedCallback() {
|
|
7282
|
+
this.resizeObserver.unobserve(this);
|
|
7283
|
+
super.disconnectedCallback();
|
|
7284
|
+
}
|
|
7285
|
+
};
|
|
7286
|
+
}
|
|
7287
|
+
|
|
7694
7288
|
/*
|
|
7695
7289
|
DetectableElement Base Class - Not intended for instantiation!
|
|
7696
7290
|
<detectable-element>
|
|
@@ -7741,55 +7335,55 @@ class DetectableElement extends DecidablesElement {
|
|
|
7741
7335
|
}, {});
|
|
7742
7336
|
}
|
|
7743
7337
|
static get styles() {
|
|
7744
|
-
return [super.styles,
|
|
7338
|
+
return [super.styles, i$1`
|
|
7745
7339
|
:host {
|
|
7746
|
-
---color-h: var(--color-h, ${
|
|
7747
|
-
---color-m: var(--color-m, ${
|
|
7748
|
-
---color-fa: var(--color-fa, ${
|
|
7749
|
-
---color-cr: var(--color-cr, ${
|
|
7750
|
-
---color-hr: var(--color-hr, ${
|
|
7751
|
-
---color-far: var(--color-far, ${
|
|
7752
|
-
---color-acc: var(--color-acc, ${
|
|
7753
|
-
---color-d: var(--color-d, ${
|
|
7754
|
-
---color-c: var(--color-c, ${
|
|
7755
|
-
---color-s: var(--color-s, ${
|
|
7756
|
-
---color-present: var(--color-present, ${
|
|
7757
|
-
---color-absent: var(--color-absent, ${
|
|
7758
|
-
---color-correct: var(--color-correct, ${
|
|
7759
|
-
---color-error: var(--color-error, ${
|
|
7760
|
-
---color-nr: var(--color-nr, ${
|
|
7761
|
-
|
|
7762
|
-
---color-h-light: var(--color-h-light, ${
|
|
7763
|
-
---color-m-light: var(--color-m-light, ${
|
|
7764
|
-
---color-fa-light: var(--color-fa-light, ${
|
|
7765
|
-
---color-cr-light: var(--color-cr-light, ${
|
|
7766
|
-
---color-hr-light: var(--color-hr-light, ${
|
|
7767
|
-
---color-far-light: var(--color-far-light, ${
|
|
7768
|
-
---color-acc-light: var(--color-acc-light, ${
|
|
7769
|
-
---color-d-light: var(--color-d-light, ${
|
|
7770
|
-
---color-c-light: var(--color-c-light, ${
|
|
7771
|
-
---color-s-light: var(--color-s-light, ${
|
|
7772
|
-
---color-present-light: var(--color-present-light, ${
|
|
7773
|
-
---color-absent-light: var(--color-absent-light, ${
|
|
7774
|
-
---color-correct-light: var(--color-correct-light, ${
|
|
7775
|
-
---color-error-light: var(--color-error-light, ${
|
|
7776
|
-
---color-nr-light: var(--color-nr-light, ${
|
|
7777
|
-
|
|
7778
|
-
---color-h-dark: var(--color-h-dark, ${
|
|
7779
|
-
---color-m-dark: var(--color-m-dark, ${
|
|
7780
|
-
---color-fa-dark: var(--color-fa-dark, ${
|
|
7781
|
-
---color-cr-dark: var(--color-cr-dark, ${
|
|
7782
|
-
---color-hr-dark: var(--color-hr-dark, ${
|
|
7783
|
-
---color-far-dark: var(--color-far-dark, ${
|
|
7784
|
-
---color-acc-dark: var(--color-acc-dark, ${
|
|
7785
|
-
---color-d-dark: var(--color-d-dark, ${
|
|
7786
|
-
---color-c-dark: var(--color-c-dark, ${
|
|
7787
|
-
---color-s-dark: var(--color-s-dark, ${
|
|
7788
|
-
---color-present-dark: var(--color-present-dark, ${
|
|
7789
|
-
---color-absent-dark: var(--color-absent-dark, ${
|
|
7790
|
-
---color-correct-dark: var(--color-correct-dark, ${
|
|
7791
|
-
---color-error-dark: var(--color-error-dark, ${
|
|
7792
|
-
---color-nr-dark: var(--color-nr-dark, ${
|
|
7340
|
+
---color-h: var(--color-h, ${r$2(this.colors.h)});
|
|
7341
|
+
---color-m: var(--color-m, ${r$2(this.colors.m)});
|
|
7342
|
+
---color-fa: var(--color-fa, ${r$2(this.colors.fa)});
|
|
7343
|
+
---color-cr: var(--color-cr, ${r$2(this.colors.cr)});
|
|
7344
|
+
---color-hr: var(--color-hr, ${r$2(this.colors.hr)});
|
|
7345
|
+
---color-far: var(--color-far, ${r$2(this.colors.far)});
|
|
7346
|
+
---color-acc: var(--color-acc, ${r$2(this.colors.acc)});
|
|
7347
|
+
---color-d: var(--color-d, ${r$2(this.colors.d)});
|
|
7348
|
+
---color-c: var(--color-c, ${r$2(this.colors.c)});
|
|
7349
|
+
---color-s: var(--color-s, ${r$2(this.colors.s)});
|
|
7350
|
+
---color-present: var(--color-present, ${r$2(this.colors.present)});
|
|
7351
|
+
---color-absent: var(--color-absent, ${r$2(this.colors.absent)});
|
|
7352
|
+
---color-correct: var(--color-correct, ${r$2(this.colors.correct)});
|
|
7353
|
+
---color-error: var(--color-error, ${r$2(this.colors.error)});
|
|
7354
|
+
---color-nr: var(--color-nr, ${r$2(this.colors.nr)});
|
|
7355
|
+
|
|
7356
|
+
---color-h-light: var(--color-h-light, ${r$2(this.lights.h)});
|
|
7357
|
+
---color-m-light: var(--color-m-light, ${r$2(this.lights.m)});
|
|
7358
|
+
---color-fa-light: var(--color-fa-light, ${r$2(this.lights.fa)});
|
|
7359
|
+
---color-cr-light: var(--color-cr-light, ${r$2(this.lights.cr)});
|
|
7360
|
+
---color-hr-light: var(--color-hr-light, ${r$2(this.lights.hr)});
|
|
7361
|
+
---color-far-light: var(--color-far-light, ${r$2(this.lights.far)});
|
|
7362
|
+
---color-acc-light: var(--color-acc-light, ${r$2(this.lights.acc)});
|
|
7363
|
+
---color-d-light: var(--color-d-light, ${r$2(this.lights.d)});
|
|
7364
|
+
---color-c-light: var(--color-c-light, ${r$2(this.lights.c)});
|
|
7365
|
+
---color-s-light: var(--color-s-light, ${r$2(this.lights.s)});
|
|
7366
|
+
---color-present-light: var(--color-present-light, ${r$2(this.lights.present)});
|
|
7367
|
+
---color-absent-light: var(--color-absent-light, ${r$2(this.lights.absent)});
|
|
7368
|
+
---color-correct-light: var(--color-correct-light, ${r$2(this.lights.correct)});
|
|
7369
|
+
---color-error-light: var(--color-error-light, ${r$2(this.lights.error)});
|
|
7370
|
+
---color-nr-light: var(--color-nr-light, ${r$2(this.lights.nr)});
|
|
7371
|
+
|
|
7372
|
+
---color-h-dark: var(--color-h-dark, ${r$2(this.darks.h)});
|
|
7373
|
+
---color-m-dark: var(--color-m-dark, ${r$2(this.darks.m)});
|
|
7374
|
+
---color-fa-dark: var(--color-fa-dark, ${r$2(this.darks.fa)});
|
|
7375
|
+
---color-cr-dark: var(--color-cr-dark, ${r$2(this.darks.cr)});
|
|
7376
|
+
---color-hr-dark: var(--color-hr-dark, ${r$2(this.darks.hr)});
|
|
7377
|
+
---color-far-dark: var(--color-far-dark, ${r$2(this.darks.far)});
|
|
7378
|
+
---color-acc-dark: var(--color-acc-dark, ${r$2(this.darks.acc)});
|
|
7379
|
+
---color-d-dark: var(--color-d-dark, ${r$2(this.darks.d)});
|
|
7380
|
+
---color-c-dark: var(--color-c-dark, ${r$2(this.darks.c)});
|
|
7381
|
+
---color-s-dark: var(--color-s-dark, ${r$2(this.darks.s)});
|
|
7382
|
+
---color-present-dark: var(--color-present-dark, ${r$2(this.darks.present)});
|
|
7383
|
+
---color-absent-dark: var(--color-absent-dark, ${r$2(this.darks.absent)});
|
|
7384
|
+
---color-correct-dark: var(--color-correct-dark, ${r$2(this.darks.correct)});
|
|
7385
|
+
---color-error-dark: var(--color-error-dark, ${r$2(this.darks.error)});
|
|
7386
|
+
---color-nr-dark: var(--color-nr-dark, ${r$2(this.darks.nr)});
|
|
7793
7387
|
}
|
|
7794
7388
|
`];
|
|
7795
7389
|
}
|
|
@@ -7803,7 +7397,7 @@ class DetectableElement extends DecidablesElement {
|
|
|
7803
7397
|
Dots; Coherence;
|
|
7804
7398
|
# Direction, Speed, Lifetime
|
|
7805
7399
|
*/
|
|
7806
|
-
class RDKTask extends DetectableElement {
|
|
7400
|
+
class RDKTask extends DecidablesMixinResizeable(DetectableElement) {
|
|
7807
7401
|
static get properties() {
|
|
7808
7402
|
return {
|
|
7809
7403
|
coherence: {
|
|
@@ -7860,21 +7454,6 @@ class RDKTask extends DetectableElement {
|
|
|
7860
7454
|
attribute: false,
|
|
7861
7455
|
type: Number,
|
|
7862
7456
|
reflect: false
|
|
7863
|
-
},
|
|
7864
|
-
width: {
|
|
7865
|
-
attribute: false,
|
|
7866
|
-
type: Number,
|
|
7867
|
-
reflect: false
|
|
7868
|
-
},
|
|
7869
|
-
height: {
|
|
7870
|
-
attribute: false,
|
|
7871
|
-
type: Number,
|
|
7872
|
-
reflect: false
|
|
7873
|
-
},
|
|
7874
|
-
rem: {
|
|
7875
|
-
attribute: false,
|
|
7876
|
-
type: Number,
|
|
7877
|
-
reflect: false
|
|
7878
7457
|
}
|
|
7879
7458
|
};
|
|
7880
7459
|
}
|
|
@@ -7896,10 +7475,6 @@ class RDKTask extends DetectableElement {
|
|
|
7896
7475
|
this.lifetime = 400; // Lifetime of each dot in milliseconds
|
|
7897
7476
|
this.speed = 50; // Rate of dot movement in pixels per second
|
|
7898
7477
|
|
|
7899
|
-
this.width = NaN; // Width of component in pixels
|
|
7900
|
-
this.height = NaN; // Height of component in pixels
|
|
7901
|
-
this.rem = NaN; // Pixels per rem for component
|
|
7902
|
-
|
|
7903
7478
|
// Private
|
|
7904
7479
|
this.firstUpdate = true;
|
|
7905
7480
|
this.COHERENT = 0; // "Constant" for index to coherent dots
|
|
@@ -7925,7 +7500,7 @@ class RDKTask extends DetectableElement {
|
|
|
7925
7500
|
}
|
|
7926
7501
|
|
|
7927
7502
|
static get styles() {
|
|
7928
|
-
return [super.styles,
|
|
7503
|
+
return [super.styles, i$1`
|
|
7929
7504
|
:host {
|
|
7930
7505
|
display: inline-block;
|
|
7931
7506
|
|
|
@@ -7976,27 +7551,6 @@ class RDKTask extends DetectableElement {
|
|
|
7976
7551
|
/* eslint-disable-line class-methods-use-this */
|
|
7977
7552
|
return x$1``;
|
|
7978
7553
|
}
|
|
7979
|
-
getDimensions() {
|
|
7980
|
-
this.width = parseFloat(this.getComputedStyleValue('width'), 10);
|
|
7981
|
-
this.height = parseFloat(this.getComputedStyleValue('height'), 10);
|
|
7982
|
-
this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
|
|
7983
|
-
// console.log(`rdk-task: width = ${this.width}, height = ${this.height}, rem = ${this.rem}`);
|
|
7984
|
-
}
|
|
7985
|
-
|
|
7986
|
-
connectedCallback() {
|
|
7987
|
-
super.connectedCallback();
|
|
7988
|
-
window.addEventListener('resize', this.getDimensions.bind(this));
|
|
7989
|
-
}
|
|
7990
|
-
disconnectedCallback() {
|
|
7991
|
-
window.removeEventListener('resize', this.getDimensions.bind(this));
|
|
7992
|
-
super.disconnectedCallback();
|
|
7993
|
-
}
|
|
7994
|
-
firstUpdated(changedProperties) {
|
|
7995
|
-
super.firstUpdated(changedProperties);
|
|
7996
|
-
|
|
7997
|
-
// Get the width and height after initial render/update has occurred
|
|
7998
|
-
this.getDimensions();
|
|
7999
|
-
}
|
|
8000
7554
|
update(changedProperties) {
|
|
8001
7555
|
super.update(changedProperties);
|
|
8002
7556
|
|
|
@@ -12790,7 +12344,7 @@ class SDTMath {
|
|
|
12790
12344
|
Styles:
|
|
12791
12345
|
??
|
|
12792
12346
|
*/
|
|
12793
|
-
class ROCSpace extends DetectableElement {
|
|
12347
|
+
class ROCSpace extends DecidablesMixinResizeable(DetectableElement) {
|
|
12794
12348
|
static get properties() {
|
|
12795
12349
|
return {
|
|
12796
12350
|
contour: {
|
|
@@ -12842,21 +12396,6 @@ class ROCSpace extends DetectableElement {
|
|
|
12842
12396
|
attribute: false,
|
|
12843
12397
|
type: Number,
|
|
12844
12398
|
reflect: false
|
|
12845
|
-
},
|
|
12846
|
-
width: {
|
|
12847
|
-
attribute: false,
|
|
12848
|
-
type: Number,
|
|
12849
|
-
reflect: false
|
|
12850
|
-
},
|
|
12851
|
-
height: {
|
|
12852
|
-
attribute: false,
|
|
12853
|
-
type: Number,
|
|
12854
|
-
reflect: false
|
|
12855
|
-
},
|
|
12856
|
-
rem: {
|
|
12857
|
-
attribute: false,
|
|
12858
|
-
type: Number,
|
|
12859
|
-
reflect: false
|
|
12860
12399
|
}
|
|
12861
12400
|
};
|
|
12862
12401
|
}
|
|
@@ -12888,9 +12427,6 @@ class ROCSpace extends DetectableElement {
|
|
|
12888
12427
|
this.pointArray = [];
|
|
12889
12428
|
this.isoDArray = [];
|
|
12890
12429
|
this.isoCArray = [];
|
|
12891
|
-
this.width = NaN;
|
|
12892
|
-
this.height = NaN;
|
|
12893
|
-
this.rem = NaN;
|
|
12894
12430
|
this.alignState();
|
|
12895
12431
|
}
|
|
12896
12432
|
alignState() {
|
|
@@ -12977,7 +12513,7 @@ class ROCSpace extends DetectableElement {
|
|
|
12977
12513
|
this.requestUpdate();
|
|
12978
12514
|
}
|
|
12979
12515
|
static get styles() {
|
|
12980
|
-
return [super.styles,
|
|
12516
|
+
return [super.styles, i$1`
|
|
12981
12517
|
:host {
|
|
12982
12518
|
display: inline-block;
|
|
12983
12519
|
|
|
@@ -13117,27 +12653,6 @@ class ROCSpace extends DetectableElement {
|
|
|
13117
12653
|
${DetectableElement.svgFilters}
|
|
13118
12654
|
`;
|
|
13119
12655
|
}
|
|
13120
|
-
getDimensions() {
|
|
13121
|
-
this.width = parseFloat(this.getComputedStyleValue('width'), 10);
|
|
13122
|
-
this.height = parseFloat(this.getComputedStyleValue('height'), 10);
|
|
13123
|
-
this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
|
|
13124
|
-
// console.log(`roc-space: width = ${this.width}, height = ${this.height}, rem = ${this.rem}`);
|
|
13125
|
-
}
|
|
13126
|
-
|
|
13127
|
-
connectedCallback() {
|
|
13128
|
-
super.connectedCallback();
|
|
13129
|
-
window.addEventListener('resize', this.getDimensions.bind(this));
|
|
13130
|
-
}
|
|
13131
|
-
disconnectedCallback() {
|
|
13132
|
-
window.removeEventListener('resize', this.getDimensions.bind(this));
|
|
13133
|
-
super.disconnectedCallback();
|
|
13134
|
-
}
|
|
13135
|
-
firstUpdated(changedProperties) {
|
|
13136
|
-
super.firstUpdated(changedProperties);
|
|
13137
|
-
|
|
13138
|
-
// Get the width and height after initial render/update has occurred
|
|
13139
|
-
this.getDimensions();
|
|
13140
|
-
}
|
|
13141
12656
|
update(changedProperties) {
|
|
13142
12657
|
super.update(changedProperties);
|
|
13143
12658
|
this.alignState();
|
|
@@ -13270,7 +12785,7 @@ class ROCSpace extends DetectableElement {
|
|
|
13270
12785
|
const contours = Contours().size([n, n]).thresholds(contourThresholds);
|
|
13271
12786
|
const contourColorStart = this.getComputedStyleValue(this.contour === 'bias' ? '---color-element-background' : this.contour === 'sensitivity' ? '---color-d' : this.contour === 'accuracy' ? '---color-acc-dark' : null);
|
|
13272
12787
|
const contourColorEnd = this.getComputedStyleValue(this.contour === 'bias' ? '---color-c' : this.contour === 'sensitivity' ? '---color-element-background' : this.contour === 'accuracy' ? '---color-element-background' : null);
|
|
13273
|
-
const contourColor = linear().domain(extent
|
|
12788
|
+
const contourColor = linear().domain(extent(contourThresholds)).interpolate(() => {
|
|
13274
12789
|
return interpolateRgb(contourColorStart, contourColorEnd);
|
|
13275
12790
|
});
|
|
13276
12791
|
// DATA-JOIN
|
|
@@ -13814,7 +13329,7 @@ class DetectableControl extends DetectableElement {
|
|
|
13814
13329
|
this.state = 'ended';
|
|
13815
13330
|
}
|
|
13816
13331
|
static get styles() {
|
|
13817
|
-
return [super.styles,
|
|
13332
|
+
return [super.styles, i$1`
|
|
13818
13333
|
:host {
|
|
13819
13334
|
display: inline-block;
|
|
13820
13335
|
}
|
|
@@ -13893,7 +13408,7 @@ customElements.define('detectable-control', DetectableControl);
|
|
|
13893
13408
|
Styles:
|
|
13894
13409
|
??
|
|
13895
13410
|
*/
|
|
13896
|
-
class SDTModel extends DetectableElement {
|
|
13411
|
+
class SDTModel extends DecidablesMixinResizeable(DetectableElement) {
|
|
13897
13412
|
static get properties() {
|
|
13898
13413
|
return {
|
|
13899
13414
|
color: {
|
|
@@ -13970,21 +13485,6 @@ class SDTModel extends DetectableElement {
|
|
|
13970
13485
|
attribute: false,
|
|
13971
13486
|
type: Array,
|
|
13972
13487
|
reflect: false
|
|
13973
|
-
},
|
|
13974
|
-
width: {
|
|
13975
|
-
attribute: false,
|
|
13976
|
-
type: Number,
|
|
13977
|
-
reflect: false
|
|
13978
|
-
},
|
|
13979
|
-
height: {
|
|
13980
|
-
attribute: false,
|
|
13981
|
-
type: Number,
|
|
13982
|
-
reflect: false
|
|
13983
|
-
},
|
|
13984
|
-
rem: {
|
|
13985
|
-
attribute: false,
|
|
13986
|
-
type: Number,
|
|
13987
|
-
reflect: false
|
|
13988
13488
|
}
|
|
13989
13489
|
};
|
|
13990
13490
|
}
|
|
@@ -14012,10 +13512,6 @@ class SDTModel extends DetectableElement {
|
|
|
14012
13512
|
this.responses = ['present', 'absent']; // Allowable values of trial.response
|
|
14013
13513
|
this.trials = []; // Array of simulated trials
|
|
14014
13514
|
|
|
14015
|
-
this.width = NaN; // Width of component in pixels
|
|
14016
|
-
this.height = NaN; // Height of component in pixels
|
|
14017
|
-
this.rem = NaN; // Pixels per rem for component
|
|
14018
|
-
|
|
14019
13515
|
// Private
|
|
14020
13516
|
this.muN = NaN; // Mean of noise distribution
|
|
14021
13517
|
this.muS = NaN; // Mean of signal distribution
|
|
@@ -14084,7 +13580,7 @@ class SDTModel extends DetectableElement {
|
|
|
14084
13580
|
}
|
|
14085
13581
|
}
|
|
14086
13582
|
static get styles() {
|
|
14087
|
-
return [super.styles,
|
|
13583
|
+
return [super.styles, i$1`
|
|
14088
13584
|
:host {
|
|
14089
13585
|
display: inline-block;
|
|
14090
13586
|
|
|
@@ -14350,27 +13846,6 @@ class SDTModel extends DetectableElement {
|
|
|
14350
13846
|
bubbles: true
|
|
14351
13847
|
}));
|
|
14352
13848
|
}
|
|
14353
|
-
getDimensions() {
|
|
14354
|
-
this.width = parseFloat(this.getComputedStyleValue('width'), 10);
|
|
14355
|
-
this.height = parseFloat(this.getComputedStyleValue('height'), 10);
|
|
14356
|
-
this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
|
|
14357
|
-
// console.log(`sdt-model: width = ${this.width}, height = ${this.height}, rem = ${this.rem}`);
|
|
14358
|
-
}
|
|
14359
|
-
|
|
14360
|
-
connectedCallback() {
|
|
14361
|
-
super.connectedCallback();
|
|
14362
|
-
window.addEventListener('resize', this.getDimensions.bind(this));
|
|
14363
|
-
}
|
|
14364
|
-
disconnectedCallback() {
|
|
14365
|
-
window.removeEventListener('resize', this.getDimensions.bind(this));
|
|
14366
|
-
super.disconnectedCallback();
|
|
14367
|
-
}
|
|
14368
|
-
firstUpdated(changedProperties) {
|
|
14369
|
-
super.firstUpdated(changedProperties);
|
|
14370
|
-
|
|
14371
|
-
// Get the width and height after initial render/update has occurred
|
|
14372
|
-
this.getDimensions();
|
|
14373
|
-
}
|
|
14374
13849
|
update(changedProperties) {
|
|
14375
13850
|
super.update(changedProperties);
|
|
14376
13851
|
this.alignState();
|
|
@@ -15444,7 +14919,7 @@ class DetectableResponse extends DetectableElement {
|
|
|
15444
14919
|
this.e = 0;
|
|
15445
14920
|
}
|
|
15446
14921
|
static get styles() {
|
|
15447
|
-
return [super.styles,
|
|
14922
|
+
return [super.styles, i$1`
|
|
15448
14923
|
:host {
|
|
15449
14924
|
display: inline-block;
|
|
15450
14925
|
}
|
|
@@ -15838,7 +15313,7 @@ class DetectableTable extends DetectableElement {
|
|
|
15838
15313
|
this.sendEvent();
|
|
15839
15314
|
}
|
|
15840
15315
|
static get styles() {
|
|
15841
|
-
return [super.styles,
|
|
15316
|
+
return [super.styles, i$1`
|
|
15842
15317
|
:host {
|
|
15843
15318
|
display: inline-block;
|
|
15844
15319
|
}
|
|
@@ -16211,7 +15686,7 @@ class SDTEquation extends DetectableElement {
|
|
|
16211
15686
|
this.numeric = false;
|
|
16212
15687
|
}
|
|
16213
15688
|
static get styles() {
|
|
16214
|
-
return [super.styles,
|
|
15689
|
+
return [super.styles, i$1`
|
|
16215
15690
|
:host {
|
|
16216
15691
|
display: block;
|
|
16217
15692
|
|
|
@@ -17566,7 +17041,7 @@ customElements.define('sdt-equation-mcr2fomr', SDTEquationMCr2Fomr);
|
|
|
17566
17041
|
*/
|
|
17567
17042
|
class SDTExample extends DetectableElement {
|
|
17568
17043
|
static get styles() {
|
|
17569
|
-
return [super.styles,
|
|
17044
|
+
return [super.styles, i$1`
|
|
17570
17045
|
:host {
|
|
17571
17046
|
display: inline-block;
|
|
17572
17047
|
|