@decidables/detectable-elements 0.2.5 → 0.2.7

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.
@@ -3,21 +3,21 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const t$3 = window,
7
- e$5 = t$3.ShadowRoot && (void 0 === t$3.ShadyCSS || t$3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
8
- s$6 = Symbol(),
9
- n$6 = new WeakMap();
10
- let o$6 = class o {
11
- constructor(t, e, n) {
12
- if (this._$cssResult$ = !0, n !== s$6) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
6
+ const t$1 = globalThis,
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$2 = Symbol(),
9
+ o$3 = new WeakMap();
10
+ let n$2 = class n {
11
+ constructor(t, e, o) {
12
+ if (this._$cssResult$ = !0, o !== s$2) 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$5 && void 0 === t) {
18
+ if (e$2 && void 0 === t) {
19
19
  const e = void 0 !== s && 1 === s.length;
20
- e && (t = n$6.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$6.set(s, t));
20
+ e && (t = o$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$3.set(s, t));
21
21
  }
22
22
  return t;
23
23
  }
@@ -25,18 +25,26 @@ let o$6 = class o {
25
25
  return this.cssText;
26
26
  }
27
27
  };
28
- const r$5 = t => new o$6("string" == typeof t ? t : t + "", void 0, s$6),
29
- S$3 = (s, n) => {
30
- e$5 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
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
- });
28
+ const r$3 = t => new n$2("string" == typeof t ? t : t + "", void 0, s$2),
29
+ i$2 = (t, ...e) => {
30
+ const o = 1 === t.length ? t[0] : e.reduce((e, s, o) => e + (t => {
31
+ if (!0 === t._$cssResult$) return t.cssText;
32
+ if ("number" == typeof t) return t;
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.");
34
+ })(s) + t[o + 1], t[0]);
35
+ return new n$2(o, t, s$2);
35
36
  },
36
- c$2 = e$5 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
37
+ S$1 = (s, o) => {
38
+ if (e$2) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
39
+ const o = document.createElement("style"),
40
+ n = t$1.litNonce;
41
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
42
+ }
43
+ },
44
+ c$2 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
37
45
  let e = "";
38
46
  for (const s of t.cssRules) e += s.cssText;
39
- return r$5(e);
47
+ return r$3(e);
40
48
  })(t) : t;
41
49
 
42
50
  /**
@@ -44,16 +52,24 @@ const r$5 = t => new o$6("string" == typeof t ? t : t + "", void 0, s$6),
44
52
  * Copyright 2017 Google LLC
45
53
  * SPDX-License-Identifier: BSD-3-Clause
46
54
  */
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
+ const {
56
+ is: i$1,
57
+ defineProperty: e$1,
58
+ getOwnPropertyDescriptor: r$2,
59
+ getOwnPropertyNames: h$1,
60
+ getOwnPropertySymbols: o$2,
61
+ getPrototypeOf: n$1
62
+ } = Object,
63
+ a$1 = globalThis,
64
+ c$1 = a$1.trustedTypes,
65
+ l$1 = c$1 ? c$1.emptyScript : "",
66
+ p$1 = a$1.reactiveElementPolyfillSupport,
67
+ d$1 = (t, s) => t,
68
+ u$1 = {
69
+ toAttribute(t, s) {
70
+ switch (s) {
55
71
  case Boolean:
56
- t = t ? h$3 : null;
72
+ t = t ? l$1 : null;
57
73
  break;
58
74
  case Object:
59
75
  case Array:
@@ -61,752 +77,177 @@ const e$4 = window,
61
77
  }
62
78
  return t;
63
79
  },
64
- fromAttribute(t, i) {
65
- let s = t;
66
- switch (i) {
80
+ fromAttribute(t, s) {
81
+ let i = t;
82
+ switch (s) {
67
83
  case Boolean:
68
- s = null !== t;
84
+ i = null !== t;
69
85
  break;
70
86
  case Number:
71
- s = null === t ? null : Number(t);
87
+ i = null === t ? null : Number(t);
72
88
  break;
73
89
  case Object:
74
90
  case Array:
75
91
  try {
76
- s = JSON.parse(t);
92
+ i = JSON.parse(t);
77
93
  } catch (t) {
78
- s = null;
94
+ i = null;
79
95
  }
80
96
  }
81
- return s;
97
+ return i;
82
98
  }
83
99
  },
84
- a$3 = (t, i) => i !== t && (i == i || t == t),
85
- l$5 = {
100
+ f$1 = (t, s) => !i$1(t, s),
101
+ y$2 = {
86
102
  attribute: !0,
87
103
  type: String,
88
- converter: n$5,
104
+ converter: u$1,
89
105
  reflect: !1,
90
- hasChanged: a$3
106
+ hasChanged: f$1
91
107
  };
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
- }
108
+ Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap();
109
+ let b$1 = class b extends HTMLElement {
96
110
  static addInitializer(t) {
97
- var i;
98
- this.finalize(), (null !== (i = this.h) && void 0 !== i ? i : this.h = []).push(t);
111
+ this._$Ei(), (this.l ??= []).push(t);
99
112
  }
100
113
  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);
114
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
115
+ }
116
+ static createProperty(t, s = y$2) {
117
+ if (s.state && (s.attribute = !1), this._$Ei(), this.elementProperties.set(t, s), !s.noAccessor) {
118
+ const i = Symbol(),
119
+ r = this.getPropertyDescriptor(t, i, s);
120
+ void 0 !== r && e$1(this.prototype, t, r);
113
121
  }
114
122
  }
115
- static getPropertyDescriptor(t, i, s) {
123
+ static getPropertyDescriptor(t, s, i) {
124
+ const {
125
+ get: e,
126
+ set: h
127
+ } = r$2(this.prototype, t) ?? {
128
+ get() {
129
+ return this[s];
130
+ },
131
+ set(t) {
132
+ this[s] = t;
133
+ }
134
+ };
116
135
  return {
117
136
  get() {
118
- return this[i];
137
+ return e?.call(this);
119
138
  },
120
- set(e) {
121
- const r = this[t];
122
- this[i] = e, this.requestUpdate(t, r, s);
139
+ set(s) {
140
+ const r = e?.call(this);
141
+ h.call(this, s), this.requestUpdate(t, r, i);
123
142
  },
124
143
  configurable: !0,
125
144
  enumerable: !0
126
145
  };
127
146
  }
128
147
  static getPropertyOptions(t) {
129
- return this.elementProperties.get(t) || l$5;
148
+ return this.elementProperties.get(t) ?? y$2;
149
+ }
150
+ static _$Ei() {
151
+ if (this.hasOwnProperty(d$1("elementProperties"))) return;
152
+ const t = n$1(this);
153
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
130
154
  }
131
155
  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")) {
156
+ if (this.hasOwnProperty(d$1("finalized"))) return;
157
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
136
158
  const t = this.properties,
137
- i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
138
- for (const s of i) this.createProperty(s, t[s]);
159
+ s = [...h$1(t), ...o$2(t)];
160
+ for (const i of s) this.createProperty(i, t[i]);
139
161
  }
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);
162
+ const t = this[Symbol.metadata];
163
+ if (null !== t) {
164
+ const s = litPropertyMetadata.get(t);
165
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
224
166
  }
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;
167
+ this._$Eh = new Map();
168
+ for (const [t, s] of this.elementProperties) {
169
+ const i = this._$Eu(t, s);
170
+ void 0 !== i && this._$Eh.set(i, t);
534
171
  }
535
- n && !e && this.j(t);
172
+ this.elementStyles = this.finalizeStyles(this.styles);
536
173
  }
537
- j(t) {
538
- t === A$1 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
174
+ static finalizeStyles(s) {
175
+ const i = [];
176
+ if (Array.isArray(s)) {
177
+ const e = new Set(s.flat(1 / 0).reverse());
178
+ for (const s of e) i.unshift(c$2(s));
179
+ } else void 0 !== s && i.push(c$2(s));
180
+ return i;
539
181
  }
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;
182
+ static _$Eu(t, s) {
183
+ const i = s.attribute;
184
+ return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
547
185
  }
548
- };
549
- const I$1 = s$4 ? s$4.emptyScript : "";
550
- let L$1 = class L extends k$1 {
551
186
  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 => {
613
- if (!0 === t._$cssResult$) return t.cssText;
614
- if ("number" == typeof t) return t;
615
- 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
- })(n) + t[s + 1], t[0]);
617
- return new s$3(o, e$2);
618
- },
619
- i$1 = (e, n) => {
620
- t$1 ? e.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(t => {
621
- const n = document.createElement("style"),
622
- s = window.litNonce;
623
- void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
624
- });
625
- },
626
- S$1 = t$1 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
627
- let e = "";
628
- for (const n of t.cssRules) e += n.cssText;
629
- return o$3(e);
630
- })(t) : t;
631
-
632
- /**
633
- * @license
634
- * Copyright 2017 Google LLC
635
- * SPDX-License-Identifier: BSD-3-Clause
636
- */
637
- var s$2;
638
- const e$1 = window.trustedTypes,
639
- r$1 = e$1 ? e$1.emptyScript : "",
640
- h$1 = window.reactiveElementPolyfillSupport,
641
- o$2 = {
642
- toAttribute(t, i) {
643
- switch (i) {
644
- case Boolean:
645
- t = t ? r$1 : null;
646
- break;
647
- case Object:
648
- case Array:
649
- t = null == t ? t : JSON.stringify(t);
650
- }
651
- return t;
652
- },
653
- fromAttribute(t, i) {
654
- let s = t;
655
- switch (i) {
656
- case Boolean:
657
- s = null !== t;
658
- break;
659
- case Number:
660
- s = null === t ? null : Number(t);
661
- break;
662
- case Object:
663
- case Array:
664
- try {
665
- s = JSON.parse(t);
666
- } catch (t) {
667
- s = null;
668
- }
669
- }
670
- return s;
671
- }
672
- },
673
- n$2 = (t, i) => i !== t && (i == i || t == t),
674
- l$3 = {
675
- attribute: !0,
676
- type: String,
677
- converter: o$2,
678
- reflect: !1,
679
- hasChanged: n$2
680
- };
681
- let a$1 = class a extends HTMLElement {
682
- constructor() {
683
- super(), this._$Et = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$Ei = null, this.o();
684
- }
685
- static addInitializer(t) {
686
- var i;
687
- null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
688
- }
689
- static get observedAttributes() {
690
- this.finalize();
691
- const t = [];
692
- return this.elementProperties.forEach((i, s) => {
693
- const e = this._$Eh(s, i);
694
- void 0 !== e && (this._$Eu.set(e, s), t.push(e));
695
- }), t;
696
- }
697
- static createProperty(t, i = l$3) {
698
- if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
699
- const s = "symbol" == typeof t ? Symbol() : "__" + t,
700
- e = this.getPropertyDescriptor(t, s, i);
701
- void 0 !== e && Object.defineProperty(this.prototype, t, e);
702
- }
703
- }
704
- static getPropertyDescriptor(t, i, s) {
705
- return {
706
- get() {
707
- return this[i];
708
- },
709
- set(e) {
710
- const r = this[t];
711
- this[i] = e, this.requestUpdate(t, r, s);
712
- },
713
- configurable: !0,
714
- enumerable: !0
715
- };
716
- }
717
- static getPropertyOptions(t) {
718
- return this.elementProperties.get(t) || l$3;
719
- }
720
- static finalize() {
721
- if (this.hasOwnProperty("finalized")) return !1;
722
- this.finalized = !0;
723
- const t = Object.getPrototypeOf(this);
724
- if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
725
- const t = this.properties,
726
- i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
727
- for (const s of i) this.createProperty(s, t[s]);
728
- }
729
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
730
- }
731
- static finalizeStyles(i) {
732
- const s = [];
733
- if (Array.isArray(i)) {
734
- const e = new Set(i.flat(1 / 0).reverse());
735
- for (const i of e) s.unshift(S$1(i));
736
- } else void 0 !== i && s.push(S$1(i));
737
- return s;
738
- }
739
- static _$Eh(t, i) {
740
- const s = i.attribute;
741
- return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
187
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
742
188
  }
743
- o() {
744
- var t;
745
- this._$Ep = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Em(), this.requestUpdate(), null === (t = this.constructor.l) || void 0 === t || t.forEach(t => t(this));
189
+ _$Ev() {
190
+ this._$Eg = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$ES(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
746
191
  }
747
192
  addController(t) {
748
- var i, s;
749
- (null !== (i = this._$Eg) && void 0 !== i ? i : this._$Eg = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
193
+ (this._$E_ ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
750
194
  }
751
195
  removeController(t) {
752
- var i;
753
- null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
196
+ this._$E_?.delete(t);
754
197
  }
755
- _$Em() {
756
- this.constructor.elementProperties.forEach((t, i) => {
757
- this.hasOwnProperty(i) && (this._$Et.set(i, this[i]), delete this[i]);
758
- });
198
+ _$ES() {
199
+ const t = new Map(),
200
+ s = this.constructor.elementProperties;
201
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
202
+ t.size > 0 && (this._$Ep = t);
759
203
  }
760
204
  createRenderRoot() {
761
- var t;
762
- const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
763
- return i$1(s, this.constructor.elementStyles), s;
205
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
206
+ return S$1(t, this.constructor.elementStyles), t;
764
207
  }
765
208
  connectedCallback() {
766
- var t;
767
- void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
768
- var i;
769
- return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
770
- });
209
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$E_?.forEach(t => t.hostConnected?.());
771
210
  }
772
211
  enableUpdating(t) {}
773
212
  disconnectedCallback() {
774
- var t;
775
- null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
776
- var i;
777
- return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
778
- });
213
+ this._$E_?.forEach(t => t.hostDisconnected?.());
779
214
  }
780
- attributeChangedCallback(t, i, s) {
781
- this._$AK(t, s);
215
+ attributeChangedCallback(t, s, i) {
216
+ this._$AK(t, i);
782
217
  }
783
- _$ES(t, i, s = l$3) {
784
- var e, r;
785
- const h = this.constructor._$Eh(t, s);
786
- if (void 0 !== h && !0 === s.reflect) {
787
- const n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$2.toAttribute)(i, s.type);
788
- this._$Ei = t, null == n ? this.removeAttribute(h) : this.setAttribute(h, n), this._$Ei = null;
218
+ _$EO(t, s) {
219
+ const i = this.constructor.elementProperties.get(t),
220
+ e = this.constructor._$Eu(t, i);
221
+ if (void 0 !== e && !0 === i.reflect) {
222
+ const r = (void 0 !== i.converter?.toAttribute ? i.converter : u$1).toAttribute(s, i.type);
223
+ this._$Em = t, null == r ? this.removeAttribute(e) : this.setAttribute(e, r), this._$Em = null;
224
+ }
225
+ }
226
+ _$AK(t, s) {
227
+ const i = this.constructor,
228
+ e = i._$Eh.get(t);
229
+ if (void 0 !== e && this._$Em !== e) {
230
+ const t = i.getPropertyOptions(e),
231
+ r = "function" == typeof t.converter ? {
232
+ fromAttribute: t.converter
233
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u$1;
234
+ this._$Em = e, this[e] = r.fromAttribute(s, t.type), this._$Em = null;
789
235
  }
790
236
  }
791
- _$AK(t, i) {
792
- var s, e, r;
793
- const h = this.constructor,
794
- n = h._$Eu.get(t);
795
- if (void 0 !== n && this._$Ei !== n) {
796
- const t = h.getPropertyOptions(n),
797
- l = t.converter,
798
- a = null !== (r = null !== (e = null === (s = l) || void 0 === s ? void 0 : s.fromAttribute) && void 0 !== e ? e : "function" == typeof l ? l : null) && void 0 !== r ? r : o$2.fromAttribute;
799
- this._$Ei = n, this[n] = a(i, t.type), this._$Ei = null;
237
+ requestUpdate(t, s, i, e = !1, r) {
238
+ if (void 0 !== t) {
239
+ if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(e ? r : this[t], s)) return;
240
+ this.C(t, s, i);
800
241
  }
242
+ !1 === this.isUpdatePending && (this._$Eg = this._$EP());
801
243
  }
802
- requestUpdate(t, i, s) {
803
- let e = !0;
804
- void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$2)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$E_());
244
+ C(t, s, i) {
245
+ this._$AL.has(t) || this._$AL.set(t, s), !0 === i.reflect && this._$Em !== t && (this._$Ej ??= new Set()).add(t);
805
246
  }
806
- async _$E_() {
247
+ async _$EP() {
807
248
  this.isUpdatePending = !0;
808
249
  try {
809
- await this._$Ep;
250
+ await this._$Eg;
810
251
  } catch (t) {
811
252
  Promise.reject(t);
812
253
  }
@@ -817,192 +258,184 @@ let a$1 = class a extends HTMLElement {
817
258
  return this.performUpdate();
818
259
  }
819
260
  performUpdate() {
820
- var t;
821
261
  if (!this.isUpdatePending) return;
822
- this.hasUpdated, this._$Et && (this._$Et.forEach((t, i) => this[i] = t), this._$Et = void 0);
823
- let i = !1;
262
+ if (!this.hasUpdated) {
263
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
264
+ for (const [t, s] of this._$Ep) this[t] = s;
265
+ this._$Ep = void 0;
266
+ }
267
+ const t = this.constructor.elementProperties;
268
+ if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.C(s, this[s], i);
269
+ }
270
+ let t = !1;
824
271
  const s = this._$AL;
825
272
  try {
826
- i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
827
- var i;
828
- return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
829
- }), this.update(s)) : this._$EU();
830
- } catch (t) {
831
- throw i = !1, this._$EU(), t;
273
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$E_?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$ET();
274
+ } catch (s) {
275
+ throw t = !1, this._$ET(), s;
832
276
  }
833
- i && this._$AE(s);
277
+ t && this._$AE(s);
834
278
  }
835
279
  willUpdate(t) {}
836
280
  _$AE(t) {
837
- var i;
838
- null === (i = this._$Eg) || void 0 === i || i.forEach(t => {
839
- var i;
840
- return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
841
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
281
+ this._$E_?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
842
282
  }
843
- _$EU() {
283
+ _$ET() {
844
284
  this._$AL = new Map(), this.isUpdatePending = !1;
845
285
  }
846
286
  get updateComplete() {
847
287
  return this.getUpdateComplete();
848
288
  }
849
289
  getUpdateComplete() {
850
- return this._$Ep;
290
+ return this._$Eg;
851
291
  }
852
292
  shouldUpdate(t) {
853
293
  return !0;
854
294
  }
855
295
  update(t) {
856
- void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$ES(i, this[i], t)), this._$EC = void 0), this._$EU();
296
+ this._$Ej &&= this._$Ej.forEach(t => this._$EO(t, this[t])), this._$ET();
857
297
  }
858
298
  updated(t) {}
859
299
  firstUpdated(t) {}
860
300
  };
861
- a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = {
301
+ b$1.elementStyles = [], b$1.shadowRootOptions = {
862
302
  mode: "open"
863
- }, null == h$1 || h$1({
864
- ReactiveElement: a$1
865
- }), (null !== (s$2 = globalThis.reactiveElementVersions) && void 0 !== s$2 ? s$2 : globalThis.reactiveElementVersions = []).push("1.3.1");
303
+ }, b$1[d$1("elementProperties")] = new Map(), b$1[d$1("finalized")] = new Map(), p$1?.({
304
+ ReactiveElement: b$1
305
+ }), (a$1.reactiveElementVersions ??= []).push("2.0.2");
866
306
 
867
307
  /**
868
308
  * @license
869
309
  * Copyright 2017 Google LLC
870
310
  * SPDX-License-Identifier: BSD-3-Clause
871
311
  */
872
- var t;
873
- const i = window,
874
- s$1 = i.trustedTypes,
875
- e = s$1 ? s$1.createPolicy("lit-html", {
312
+ const t = globalThis,
313
+ i = t.trustedTypes,
314
+ s$1 = i ? i.createPolicy("lit-html", {
876
315
  createHTML: t => t
877
316
  }) : void 0,
878
- o$1 = "$lit$",
879
- n$1 = `lit$${(Math.random() + "").slice(9)}$`,
880
- l$2 = "?" + n$1,
881
- h = `<${l$2}>`,
882
- r = document,
883
- d = () => r.createComment(""),
884
- u = t => null === t || "object" != typeof t && "function" != typeof t,
885
- c = Array.isArray,
886
- v = t => c(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
887
- a = "[ \t\n\f\r]",
317
+ e = "$lit$",
318
+ h = `lit$${(Math.random() + "").slice(9)}$`,
319
+ o$1 = "?" + h,
320
+ n = `<${o$1}>`,
321
+ r$1 = document,
322
+ l = () => r$1.createComment(""),
323
+ c = t => null === t || "object" != typeof t && "function" != typeof t,
324
+ a = Array.isArray,
325
+ u = t => a(t) || "function" == typeof t?.[Symbol.iterator],
326
+ d = "[ \t\n\f\r]",
888
327
  f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
889
- _ = /-->/g,
890
- m = />/g,
891
- p = RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
892
- g = /'/g,
893
- $ = /"/g,
894
- y$1 = /^(?:script|style|textarea|title)$/i,
895
- w = t => (i, ...s) => ({
328
+ v = /-->/g,
329
+ _ = />/g,
330
+ m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
331
+ p = /'/g,
332
+ g = /"/g,
333
+ $ = /^(?:script|style|textarea|title)$/i,
334
+ y$1 = t => (i, ...s) => ({
896
335
  _$litType$: t,
897
336
  strings: i,
898
337
  values: s
899
338
  }),
900
- x$1 = w(1),
901
- b = w(2),
902
- T = Symbol.for("lit-noChange"),
903
- A = Symbol.for("lit-nothing"),
904
- E = new WeakMap(),
905
- C = r.createTreeWalker(r, 129, null, !1),
906
- P = (t, i) => {
907
- const s = t.length - 1,
908
- l = [];
909
- let r,
910
- d = 2 === i ? "<svg>" : "",
911
- u = f;
912
- for (let i = 0; i < s; i++) {
913
- const s = t[i];
914
- let e,
915
- c,
916
- v = -1,
917
- a = 0;
918
- 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]) && (r = RegExp("</" + c[2], "g")), u = p) : void 0 !== c[3] && (u = p) : u === p ? ">" === c[0] ? (u = null != r ? r : f, v = -1) : void 0 === c[1] ? v = -2 : (v = u.lastIndex - c[2].length, e = c[1], u = void 0 === c[3] ? p : '"' === c[3] ? $ : g) : u === $ || u === g ? u = p : u === _ || u === m ? u = f : (u = p, r = void 0);
919
- const w = u === p && t[i + 1].startsWith("/>") ? " " : "";
920
- d += u === f ? s + h : v >= 0 ? (l.push(e), s.slice(0, v) + o$1 + s.slice(v) + n$1 + w) : s + n$1 + (-2 === v ? (l.push(void 0), i) : w);
921
- }
922
- const c = d + (t[s] || "<?>") + (2 === i ? "</svg>" : "");
923
- if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
924
- return [void 0 !== e ? e.createHTML(c) : c, l];
925
- };
339
+ x$1 = y$1(1),
340
+ b = y$1(2),
341
+ w = Symbol.for("lit-noChange"),
342
+ T = Symbol.for("lit-nothing"),
343
+ A = new WeakMap(),
344
+ E = r$1.createTreeWalker(r$1, 129);
345
+ function C(t, i) {
346
+ if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
347
+ return void 0 !== s$1 ? s$1.createHTML(i) : i;
348
+ }
349
+ const P = (t, i) => {
350
+ const s = t.length - 1,
351
+ o = [];
352
+ let r,
353
+ l = 2 === i ? "<svg>" : "",
354
+ c = f;
355
+ for (let i = 0; i < s; i++) {
356
+ const s = t[i];
357
+ let a,
358
+ u,
359
+ d = -1,
360
+ y = 0;
361
+ for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r ?? f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
362
+ const x = c === m && t[i + 1].startsWith("/>") ? " " : "";
363
+ l += c === f ? s + n : d >= 0 ? (o.push(a), s.slice(0, d) + e + s.slice(d) + h + x) : s + h + (-2 === d ? i : x);
364
+ }
365
+ return [C(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), o];
366
+ };
926
367
  class V {
927
368
  constructor({
928
369
  strings: t,
929
- _$litType$: i
930
- }, e) {
931
- let h;
370
+ _$litType$: s
371
+ }, n) {
372
+ let r;
932
373
  this.parts = [];
933
- let r = 0,
934
- u = 0;
935
- const c = t.length - 1,
936
- v = this.parts,
937
- [a, f] = P(t, i);
938
- if (this.el = V.createElement(a, e), C.currentNode = this.el.content, 2 === i) {
939
- const t = this.el.content,
940
- i = t.firstChild;
941
- i.remove(), t.append(...i.childNodes);
374
+ let c = 0,
375
+ a = 0;
376
+ const u = t.length - 1,
377
+ d = this.parts,
378
+ [f, v] = P(t, s);
379
+ if (this.el = V.createElement(f, n), E.currentNode = this.el.content, 2 === s) {
380
+ const t = this.el.content.firstChild;
381
+ t.replaceWith(...t.childNodes);
942
382
  }
943
- for (; null !== (h = C.nextNode()) && v.length < c;) {
944
- if (1 === h.nodeType) {
945
- if (h.hasAttributes()) {
946
- const t = [];
947
- for (const i of h.getAttributeNames()) if (i.endsWith(o$1) || i.startsWith(n$1)) {
948
- const s = f[u++];
949
- if (t.push(i), void 0 !== s) {
950
- const t = h.getAttribute(s.toLowerCase() + o$1).split(n$1),
951
- i = /([.?@])?(.*)/.exec(s);
952
- v.push({
953
- type: 1,
954
- index: r,
955
- name: i[2],
956
- strings: t,
957
- ctor: "." === i[1] ? k : "?" === i[1] ? I : "@" === i[1] ? L : R
958
- });
959
- } else v.push({
960
- type: 6,
961
- index: r
962
- });
963
- }
964
- for (const i of t) h.removeAttribute(i);
965
- }
966
- if (y$1.test(h.tagName)) {
967
- const t = h.textContent.split(n$1),
968
- i = t.length - 1;
969
- if (i > 0) {
970
- h.textContent = s$1 ? s$1.emptyScript : "";
971
- for (let s = 0; s < i; s++) h.append(t[s], d()), C.nextNode(), v.push({
383
+ for (; null !== (r = E.nextNode()) && d.length < u;) {
384
+ if (1 === r.nodeType) {
385
+ if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e)) {
386
+ const i = v[a++],
387
+ s = r.getAttribute(t).split(h),
388
+ e = /([.?@])?(.*)/.exec(i);
389
+ d.push({
390
+ type: 1,
391
+ index: c,
392
+ name: e[2],
393
+ strings: s,
394
+ ctor: "." === e[1] ? k : "?" === e[1] ? H : "@" === e[1] ? I : R
395
+ }), r.removeAttribute(t);
396
+ } else t.startsWith(h) && (d.push({
397
+ type: 6,
398
+ index: c
399
+ }), r.removeAttribute(t));
400
+ if ($.test(r.tagName)) {
401
+ const t = r.textContent.split(h),
402
+ s = t.length - 1;
403
+ if (s > 0) {
404
+ r.textContent = i ? i.emptyScript : "";
405
+ for (let i = 0; i < s; i++) r.append(t[i], l()), E.nextNode(), d.push({
972
406
  type: 2,
973
- index: ++r
407
+ index: ++c
974
408
  });
975
- h.append(t[i], d());
409
+ r.append(t[s], l());
976
410
  }
977
411
  }
978
- } else if (8 === h.nodeType) if (h.data === l$2) v.push({
412
+ } else if (8 === r.nodeType) if (r.data === o$1) d.push({
979
413
  type: 2,
980
- index: r
414
+ index: c
981
415
  });else {
982
416
  let t = -1;
983
- for (; -1 !== (t = h.data.indexOf(n$1, t + 1));) v.push({
417
+ for (; -1 !== (t = r.data.indexOf(h, t + 1));) d.push({
984
418
  type: 7,
985
- index: r
986
- }), t += n$1.length - 1;
419
+ index: c
420
+ }), t += h.length - 1;
987
421
  }
988
- r++;
422
+ c++;
989
423
  }
990
424
  }
991
425
  static createElement(t, i) {
992
- const s = r.createElement("template");
426
+ const s = r$1.createElement("template");
993
427
  return s.innerHTML = t, s;
994
428
  }
995
429
  }
996
430
  function N(t, i, s = t, e) {
997
- var o, n, l, h;
998
- if (i === T) return i;
999
- let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
1000
- const d = u(i) ? void 0 : i._$litDirective$;
1001
- return (null == r ? void 0 : r.constructor) !== d && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === d ? r = void 0 : (r = new d(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 = N(t, r._$AS(t, i.values), r, e)), i;
431
+ if (i === w) return i;
432
+ let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
433
+ const o = c(i) ? void 0 : i._$litDirective$;
434
+ return h?.constructor !== o && (h?._$AO?.(!1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = N(t, h._$AS(t, i.values), h, e)), i;
1002
435
  }
1003
436
  class S {
1004
437
  constructor(t, i) {
1005
- this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
438
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
1006
439
  }
1007
440
  get parentNode() {
1008
441
  return this._$AM.parentNode;
@@ -1010,47 +443,44 @@ class S {
1010
443
  get _$AU() {
1011
444
  return this._$AM._$AU;
1012
445
  }
1013
- v(t) {
1014
- var i;
446
+ u(t) {
1015
447
  const {
1016
448
  el: {
1017
- content: s
449
+ content: i
1018
450
  },
1019
- parts: e
451
+ parts: s
1020
452
  } = this._$AD,
1021
- o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r).importNode(s, !0);
1022
- C.currentNode = o;
1023
- let n = C.nextNode(),
1024
- l = 0,
1025
- h = 0,
1026
- d = e[0];
1027
- for (; void 0 !== d;) {
1028
- if (l === d.index) {
453
+ e = (t?.creationScope ?? r$1).importNode(i, !0);
454
+ E.currentNode = e;
455
+ let h = E.nextNode(),
456
+ o = 0,
457
+ n = 0,
458
+ l = s[0];
459
+ for (; void 0 !== l;) {
460
+ if (o === l.index) {
1029
461
  let i;
1030
- 2 === d.type ? i = new M(n, n.nextSibling, this, t) : 1 === d.type ? i = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (i = new z(n, this, t)), this.u.push(i), d = e[++h];
462
+ 2 === l.type ? i = new M(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new L(h, this, t)), this._$AV.push(i), l = s[++n];
1031
463
  }
1032
- l !== (null == d ? void 0 : d.index) && (n = C.nextNode(), l++);
464
+ o !== l?.index && (h = E.nextNode(), o++);
1033
465
  }
1034
- return o;
466
+ return E.currentNode = r$1, e;
1035
467
  }
1036
468
  p(t) {
1037
469
  let i = 0;
1038
- for (const s of this.u) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
470
+ 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
471
  }
1040
472
  }
1041
473
  class M {
1042
- constructor(t, i, s, e) {
1043
- 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._$Cm = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
1045
- }
1046
474
  get _$AU() {
1047
- var t, i;
1048
- return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cm;
475
+ return this._$AM?._$AU ?? this._$Cv;
476
+ }
477
+ constructor(t, i, s, e) {
478
+ this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
1049
479
  }
1050
480
  get parentNode() {
1051
481
  let t = this._$AA.parentNode;
1052
482
  const i = this._$AM;
1053
- return void 0 !== i && 11 === (null == t ? void 0 : t.nodeType) && (t = i.parentNode), t;
483
+ return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
1054
484
  }
1055
485
  get startNode() {
1056
486
  return this._$AA;
@@ -1059,113 +489,107 @@ class M {
1059
489
  return this._$AB;
1060
490
  }
1061
491
  _$AI(t, i = this) {
1062
- t = N(this, t, i), u(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== T && this.g(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : v(t) ? this.k(t) : this.g(t);
492
+ t = N(this, t, i), c(t) ? t === T || null == t || "" === t ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== w && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : u(t) ? this.T(t) : this._(t);
1063
493
  }
1064
- S(t) {
494
+ k(t) {
1065
495
  return this._$AA.parentNode.insertBefore(t, this._$AB);
1066
496
  }
1067
- T(t) {
1068
- this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
497
+ $(t) {
498
+ this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
1069
499
  }
1070
- g(t) {
1071
- this._$AH !== A && u(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r.createTextNode(t)), this._$AH = t;
500
+ _(t) {
501
+ this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r$1.createTextNode(t)), this._$AH = t;
1072
502
  }
1073
- $(t) {
1074
- var i;
503
+ g(t) {
1075
504
  const {
1076
- values: s,
1077
- _$litType$: e
505
+ values: i,
506
+ _$litType$: s
1078
507
  } = t,
1079
- o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = V.createElement(e.h, this.options)), e);
1080
- if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.p(s);else {
1081
- const t = new S(o, this),
1082
- i = t.v(this.options);
1083
- t.p(s), this.T(i), this._$AH = t;
508
+ e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = V.createElement(C(s.h, s.h[0]), this.options)), s);
509
+ if (this._$AH?._$AD === e) this._$AH.p(i);else {
510
+ const t = new S(e, this),
511
+ s = t.u(this.options);
512
+ t.p(i), this.$(s), this._$AH = t;
1084
513
  }
1085
514
  }
1086
515
  _$AC(t) {
1087
- let i = E.get(t.strings);
1088
- return void 0 === i && E.set(t.strings, i = new V(t)), i;
516
+ let i = A.get(t.strings);
517
+ return void 0 === i && A.set(t.strings, i = new V(t)), i;
1089
518
  }
1090
- k(t) {
1091
- c(this._$AH) || (this._$AH = [], this._$AR());
519
+ T(t) {
520
+ a(this._$AH) || (this._$AH = [], this._$AR());
1092
521
  const i = this._$AH;
1093
522
  let s,
1094
523
  e = 0;
1095
- for (const o of t) e === i.length ? i.push(s = new M(this.S(d()), this.S(d()), this, this.options)) : s = i[e], s._$AI(o), e++;
524
+ for (const h of t) e === i.length ? i.push(s = new M(this.k(l()), this.k(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
1096
525
  e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
1097
526
  }
1098
527
  _$AR(t = this._$AA.nextSibling, i) {
1099
- var s;
1100
- for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
528
+ for (this._$AP?.(!1, !0, i); t && t !== this._$AB;) {
1101
529
  const i = t.nextSibling;
1102
530
  t.remove(), t = i;
1103
531
  }
1104
532
  }
1105
533
  setConnected(t) {
1106
- var i;
1107
- void 0 === this._$AM && (this._$Cm = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
534
+ void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
1108
535
  }
1109
536
  }
1110
537
  class R {
1111
- constructor(t, i, s, e, o) {
1112
- 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
- }
1114
538
  get tagName() {
1115
539
  return this.element.tagName;
1116
540
  }
1117
541
  get _$AU() {
1118
542
  return this._$AM._$AU;
1119
543
  }
544
+ constructor(t, i, s, e, h) {
545
+ this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = T;
546
+ }
1120
547
  _$AI(t, i = this, s, e) {
1121
- const o = this.strings;
1122
- let n = !1;
1123
- if (void 0 === o) t = N(this, t, i, 0), n = !u(t) || t !== this._$AH && t !== T, n && (this._$AH = t);else {
548
+ const h = this.strings;
549
+ let o = !1;
550
+ if (void 0 === h) t = N(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== w, o && (this._$AH = t);else {
1124
551
  const e = t;
1125
- let l, h;
1126
- for (t = o[0], l = 0; l < o.length - 1; l++) h = N(this, e[s + l], i, l), h === T && (h = this._$AH[l]), n || (n = !u(h) || h !== this._$AH[l]), h === A ? t = A : t !== A && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
552
+ let n, r;
553
+ for (t = h[0], n = 0; n < h.length - 1; n++) r = N(this, e[s + n], i, n), r === w && (r = this._$AH[n]), o ||= !c(r) || r !== this._$AH[n], r === T ? t = T : t !== T && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
1127
554
  }
1128
- n && !e && this.j(t);
555
+ o && !e && this.O(t);
1129
556
  }
1130
- j(t) {
1131
- t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
557
+ O(t) {
558
+ t === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
1132
559
  }
1133
560
  }
1134
561
  class k extends R {
1135
562
  constructor() {
1136
563
  super(...arguments), this.type = 3;
1137
564
  }
1138
- j(t) {
1139
- this.element[this.name] = t === A ? void 0 : t;
565
+ O(t) {
566
+ this.element[this.name] = t === T ? void 0 : t;
1140
567
  }
1141
568
  }
1142
- const H = s$1 ? s$1.emptyScript : "";
1143
- class I extends R {
569
+ class H extends R {
1144
570
  constructor() {
1145
571
  super(...arguments), this.type = 4;
1146
572
  }
1147
- j(t) {
1148
- t && t !== A ? this.element.setAttribute(this.name, H) : this.element.removeAttribute(this.name);
573
+ O(t) {
574
+ this.element.toggleAttribute(this.name, !!t && t !== T);
1149
575
  }
1150
576
  }
1151
- class L extends R {
1152
- constructor(t, i, s, e, o) {
1153
- super(t, i, s, e, o), this.type = 5;
577
+ class I extends R {
578
+ constructor(t, i, s, e, h) {
579
+ super(t, i, s, e, h), this.type = 5;
1154
580
  }
1155
581
  _$AI(t, i = this) {
1156
- var s;
1157
- if ((t = null !== (s = N(this, t, i, 0)) && void 0 !== s ? s : A) === T) return;
1158
- const e = this._$AH,
1159
- o = t === A && e !== A || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
1160
- n = t !== A && (e === A || o);
1161
- o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
582
+ if ((t = N(this, t, i, 0) ?? T) === w) return;
583
+ const s = this._$AH,
584
+ e = t === T && s !== T || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
585
+ h = t !== T && (s === T || e);
586
+ e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
1162
587
  }
1163
588
  handleEvent(t) {
1164
- var i, s;
1165
- "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);
589
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
1166
590
  }
1167
591
  }
1168
- class z {
592
+ class L {
1169
593
  constructor(t, i, s) {
1170
594
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
1171
595
  }
@@ -1176,17 +600,16 @@ class z {
1176
600
  N(this, t);
1177
601
  }
1178
602
  }
1179
- const j = i.litHtmlPolyfillSupport;
1180
- null == j || j(V, M), (null !== (t = i.litHtmlVersions) && void 0 !== t ? t : i.litHtmlVersions = []).push("2.7.0");
1181
- const B = (t, i, s) => {
1182
- var e, o;
1183
- const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
1184
- let l = n._$litPart$;
1185
- if (void 0 === l) {
1186
- const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
1187
- n._$litPart$ = l = new M(i.insertBefore(d(), t), t, void 0, null != s ? s : {});
603
+ const Z = t.litHtmlPolyfillSupport;
604
+ Z?.(V, M), (t.litHtmlVersions ??= []).push("3.1.0");
605
+ const j = (t, i, s) => {
606
+ const e = s?.renderBefore ?? i;
607
+ let h = e._$litPart$;
608
+ if (void 0 === h) {
609
+ const t = s?.renderBefore ?? null;
610
+ e._$litPart$ = h = new M(i.insertBefore(l(), t), t, void 0, s ?? {});
1188
611
  }
1189
- return l._$AI(t), l;
612
+ return h._$AI(t), h;
1190
613
  };
1191
614
 
1192
615
  /**
@@ -1194,55 +617,63 @@ const B = (t, i, s) => {
1194
617
  * Copyright 2017 Google LLC
1195
618
  * SPDX-License-Identifier: BSD-3-Clause
1196
619
  */
1197
- var l$1, o;
1198
- class s extends a$1 {
620
+ class s extends b$1 {
1199
621
  constructor() {
1200
622
  super(...arguments), this.renderOptions = {
1201
623
  host: this
1202
624
  }, this._$Do = void 0;
1203
625
  }
1204
626
  createRenderRoot() {
1205
- var t, e;
1206
- const i = super.createRenderRoot();
1207
- return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
627
+ const t = super.createRenderRoot();
628
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
1208
629
  }
1209
630
  update(t) {
1210
631
  const i = this.render();
1211
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(i, this.renderRoot, this.renderOptions);
632
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = j(i, this.renderRoot, this.renderOptions);
1212
633
  }
1213
634
  connectedCallback() {
1214
- var t;
1215
- super.connectedCallback(), null === (t = this._$Do) || void 0 === t || t.setConnected(!0);
635
+ super.connectedCallback(), this._$Do?.setConnected(!0);
1216
636
  }
1217
637
  disconnectedCallback() {
1218
- var t;
1219
- super.disconnectedCallback(), null === (t = this._$Do) || void 0 === t || t.setConnected(!1);
638
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
1220
639
  }
1221
640
  render() {
1222
- return T;
641
+ return w;
1223
642
  }
1224
643
  }
1225
- s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
644
+ s._$litElement$ = !0, s[("finalized")] = !0, globalThis.litElementHydrateSupport?.({
1226
645
  LitElement: s
1227
646
  });
1228
- const n = globalThis.litElementPolyfillSupport;
1229
- null == n || n({
647
+ const r = globalThis.litElementPolyfillSupport;
648
+ r?.({
1230
649
  LitElement: s
1231
650
  });
1232
- (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.0");
651
+ (globalThis.litElementVersions ??= []).push("4.0.2");
1233
652
 
1234
653
  function ascending$2(a, b) {
1235
654
  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
1236
655
  }
1237
656
 
657
+ function descending(a, b) {
658
+ return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
659
+ }
660
+
1238
661
  function bisector(f) {
1239
- let delta = f;
1240
- let compare1 = f;
1241
- let compare2 = f;
662
+ let compare1, compare2, delta;
663
+
664
+ // If an accessor is specified, promote it to a comparator. In this case we
665
+ // can test whether the search value is (self-) comparable. We can’t do this
666
+ // for a comparator (except for specific, known comparators) because we can’t
667
+ // tell if the comparator is symmetric, and an asymmetric comparator can’t be
668
+ // used to test whether a single value is comparable.
1242
669
  if (f.length !== 2) {
1243
- delta = (d, x) => f(d) - x;
1244
670
  compare1 = ascending$2;
1245
671
  compare2 = (d, x) => ascending$2(f(d), x);
672
+ delta = (d, x) => f(d) - x;
673
+ } else {
674
+ compare1 = f === ascending$2 || f === descending ? f : zero$1;
675
+ compare2 = f;
676
+ delta = f;
1246
677
  }
1247
678
  function left(a, x, lo = 0, hi = a.length) {
1248
679
  if (lo < hi) {
@@ -1274,6 +705,9 @@ function bisector(f) {
1274
705
  right
1275
706
  };
1276
707
  }
708
+ function zero$1() {
709
+ return 0;
710
+ }
1277
711
 
1278
712
  function number$2(x) {
1279
713
  return x === null ? NaN : +x;
@@ -1284,7 +718,7 @@ const bisectRight = ascendingBisect.right;
1284
718
  bisector(number$2).center;
1285
719
  var bisect = bisectRight;
1286
720
 
1287
- function count$1(values, valueof) {
721
+ function count(values, valueof) {
1288
722
  let count = 0;
1289
723
  if (valueof === undefined) {
1290
724
  for (let value of values) {
@@ -1303,7 +737,7 @@ function count$1(values, valueof) {
1303
737
  return count;
1304
738
  }
1305
739
 
1306
- function extent$1(values, valueof) {
740
+ function extent(values, valueof) {
1307
741
  let min;
1308
742
  let max;
1309
743
  if (valueof === undefined) {
@@ -1390,56 +824,63 @@ function constant$5(x) {
1390
824
  return () => x;
1391
825
  }
1392
826
 
1393
- var e10$1 = Math.sqrt(50),
1394
- e5$1 = Math.sqrt(10),
1395
- e2$1 = Math.sqrt(2);
1396
- function ticks$1(start, stop, count) {
1397
- var reverse,
1398
- i = -1,
1399
- n,
1400
- ticks,
1401
- step;
827
+ const e10 = Math.sqrt(50),
828
+ e5 = Math.sqrt(10),
829
+ e2 = Math.sqrt(2);
830
+ function tickSpec(start, stop, count) {
831
+ const step = (stop - start) / Math.max(0, count),
832
+ power = Math.floor(Math.log10(step)),
833
+ error = step / Math.pow(10, power),
834
+ factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
835
+ let i1, i2, inc;
836
+ if (power < 0) {
837
+ inc = Math.pow(10, -power) / factor;
838
+ i1 = Math.round(start * inc);
839
+ i2 = Math.round(stop * inc);
840
+ if (i1 / inc < start) ++i1;
841
+ if (i2 / inc > stop) --i2;
842
+ inc = -inc;
843
+ } else {
844
+ inc = Math.pow(10, power) * factor;
845
+ i1 = Math.round(start / inc);
846
+ i2 = Math.round(stop / inc);
847
+ if (i1 * inc < start) ++i1;
848
+ if (i2 * inc > stop) --i2;
849
+ }
850
+ if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
851
+ return [i1, i2, inc];
852
+ }
853
+ function ticks(start, stop, count) {
1402
854
  stop = +stop, start = +start, count = +count;
1403
- if (start === stop && count > 0) return [start];
1404
- if (reverse = stop < start) n = start, start = stop, stop = n;
1405
- if ((step = tickIncrement$1(start, stop, count)) === 0 || !isFinite(step)) return [];
1406
- if (step > 0) {
1407
- let r0 = Math.round(start / step),
1408
- r1 = Math.round(stop / step);
1409
- if (r0 * step < start) ++r0;
1410
- if (r1 * step > stop) --r1;
1411
- ticks = new Array(n = r1 - r0 + 1);
1412
- while (++i < n) ticks[i] = (r0 + i) * step;
855
+ if (!(count > 0)) return [];
856
+ if (start === stop) return [start];
857
+ const reverse = stop < start,
858
+ [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
859
+ if (!(i2 >= i1)) return [];
860
+ const n = i2 - i1 + 1,
861
+ ticks = new Array(n);
862
+ if (reverse) {
863
+ 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
864
  } else {
1414
- step = -step;
1415
- let r0 = Math.round(start * step),
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();
865
+ 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;
866
+ }
1423
867
  return ticks;
1424
868
  }
1425
- function tickIncrement$1(start, stop, count) {
1426
- var step = (stop - start) / Math.max(0, count),
1427
- power = Math.floor(Math.log(step) / Math.LN10),
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);
869
+ function tickIncrement(start, stop, count) {
870
+ stop = +stop, start = +start, count = +count;
871
+ return tickSpec(start, stop, count)[2];
1430
872
  }
1431
- function tickStep$1(start, stop, count) {
1432
- var step0 = Math.abs(stop - start) / Math.max(0, count),
1433
- step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
1434
- error = step0 / step1;
1435
- if (error >= e10$1) step1 *= 10;else if (error >= e5$1) step1 *= 5;else if (error >= e2$1) step1 *= 2;
1436
- return stop < start ? -step1 : step1;
873
+ function tickStep(start, stop, count) {
874
+ stop = +stop, start = +start, count = +count;
875
+ const reverse = stop < start,
876
+ inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);
877
+ return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
1437
878
  }
1438
879
 
1439
880
  function nice(start, stop, count) {
1440
881
  let prestep;
1441
882
  while (true) {
1442
- const step = tickIncrement$1(start, stop, count);
883
+ const step = tickIncrement(start, stop, count);
1443
884
  if (step === prestep || step === 0 || !isFinite(step)) {
1444
885
  return [start, stop];
1445
886
  } else if (step > 0) {
@@ -1453,19 +894,20 @@ function nice(start, stop, count) {
1453
894
  }
1454
895
  }
1455
896
 
1456
- function thresholdSturges$1(values) {
1457
- return Math.ceil(Math.log(count$1(values)) / Math.LN2) + 1;
897
+ function thresholdSturges(values) {
898
+ return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);
1458
899
  }
1459
900
 
1460
901
  function bin() {
1461
902
  var value = identity$6,
1462
- domain = extent$1,
1463
- threshold = thresholdSturges$1;
903
+ domain = extent,
904
+ threshold = thresholdSturges;
1464
905
  function histogram(data) {
1465
906
  if (!Array.isArray(data)) data = Array.from(data);
1466
907
  var i,
1467
908
  n = data.length,
1468
909
  x,
910
+ step,
1469
911
  values = new Array(n);
1470
912
  for (i = 0; i < n; ++i) {
1471
913
  values[i] = value(data[i], i, data);
@@ -1480,8 +922,13 @@ function bin() {
1480
922
  if (!Array.isArray(tz)) {
1481
923
  const max = x1,
1482
924
  tn = +tz;
1483
- if (domain === extent$1) [x0, x1] = nice(x0, x1, tn);
1484
- tz = ticks$1(x0, x1, tn);
925
+ if (domain === extent) [x0, x1] = nice(x0, x1, tn);
926
+ tz = ticks(x0, x1, tn);
927
+
928
+ // If the domain is aligned with the first tick (which it will by
929
+ // default), then we can use quantization rather than bisection to bin
930
+ // values, which is substantially faster.
931
+ if (tz[0] <= x0) step = tickIncrement(x0, x1, tn);
1485
932
 
1486
933
  // If the last threshold is coincident with the domain’s upper bound, the
1487
934
  // last bin will be zero-width. If the default domain is used, and this
@@ -1491,8 +938,8 @@ function bin() {
1491
938
  // coerce values or the domain to numbers, and thus must be careful to
1492
939
  // compare order (>=) rather than strict equality (===)!
1493
940
  if (tz[tz.length - 1] >= x1) {
1494
- if (max >= x1 && domain === extent$1) {
1495
- const step = tickIncrement$1(x0, x1, tn);
941
+ if (max >= x1 && domain === extent) {
942
+ const step = tickIncrement(x0, x1, tn);
1496
943
  if (isFinite(step)) {
1497
944
  if (step > 0) {
1498
945
  x1 = (Math.floor(x1 / step) + 1) * step;
@@ -1507,9 +954,13 @@ function bin() {
1507
954
  }
1508
955
 
1509
956
  // Remove any thresholds outside the domain.
1510
- var m = tz.length;
1511
- while (tz[0] <= x0) tz.shift(), --m;
1512
- while (tz[m - 1] > x1) tz.pop(), --m;
957
+ // Be careful not to mutate an array owned by the user!
958
+ var m = tz.length,
959
+ a = 0,
960
+ b = m;
961
+ while (tz[a] <= x0) ++a;
962
+ while (tz[b - 1] > x1) --b;
963
+ if (a || b < m) tz = tz.slice(a, b), m = b - a;
1513
964
  var bins = new Array(m + 1),
1514
965
  bin;
1515
966
 
@@ -1521,10 +972,26 @@ function bin() {
1521
972
  }
1522
973
 
1523
974
  // Assign data to bins by value, ignoring any outside the domain.
1524
- for (i = 0; i < n; ++i) {
1525
- x = values[i];
1526
- if (x != null && x0 <= x && x <= x1) {
1527
- bins[bisect(tz, x, 0, m)].push(data[i]);
975
+ if (isFinite(step)) {
976
+ if (step > 0) {
977
+ for (i = 0; i < n; ++i) {
978
+ if ((x = values[i]) != null && x0 <= x && x <= x1) {
979
+ bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]);
980
+ }
981
+ }
982
+ } else if (step < 0) {
983
+ for (i = 0; i < n; ++i) {
984
+ if ((x = values[i]) != null && x0 <= x && x <= x1) {
985
+ const j = Math.floor((x0 - x) * step);
986
+ bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding
987
+ }
988
+ }
989
+ }
990
+ } else {
991
+ for (i = 0; i < n; ++i) {
992
+ if ((x = values[i]) != null && x0 <= x && x <= x1) {
993
+ bins[bisect(tz, x, 0, m)].push(data[i]);
994
+ }
1528
995
  }
1529
996
  }
1530
997
  return bins;
@@ -1536,7 +1003,7 @@ function bin() {
1536
1003
  return arguments.length ? (domain = typeof _ === "function" ? _ : constant$5([_[0], _[1]]), histogram) : domain;
1537
1004
  };
1538
1005
  histogram.thresholds = function (_) {
1539
- return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$5(slice$1.call(_)) : constant$5(_), histogram) : threshold;
1006
+ return arguments.length ? (threshold = typeof _ === "function" ? _ : constant$5(Array.isArray(_) ? slice$1.call(_) : _), histogram) : threshold;
1540
1007
  };
1541
1008
  return histogram;
1542
1009
  }
@@ -2913,15 +2380,15 @@ function Color() {}
2913
2380
  var darker = 0.7;
2914
2381
  var brighter = 1 / darker;
2915
2382
  var reI = "\\s*([+-]?\\d+)\\s*",
2916
- reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
2917
- reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
2383
+ reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
2384
+ reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
2918
2385
  reHex = /^#([0-9a-f]{3,8})$/,
2919
- reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
2920
- reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
2921
- reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
2922
- reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
2923
- reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
2924
- reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
2386
+ reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
2387
+ reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
2388
+ reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
2389
+ reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
2390
+ reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
2391
+ reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
2925
2392
  var named = {
2926
2393
  aliceblue: 0xf0f8ff,
2927
2394
  antiquewhite: 0xfaebd7,
@@ -3073,15 +2540,16 @@ var named = {
3073
2540
  yellowgreen: 0x9acd32
3074
2541
  };
3075
2542
  define(Color, color, {
3076
- copy: function (channels) {
2543
+ copy(channels) {
3077
2544
  return Object.assign(new this.constructor(), this, channels);
3078
2545
  },
3079
- displayable: function () {
2546
+ displayable() {
3080
2547
  return this.rgb().displayable();
3081
2548
  },
3082
2549
  hex: color_formatHex,
3083
2550
  // Deprecated! Use color.formatHex.
3084
2551
  formatHex: color_formatHex,
2552
+ formatHex8: color_formatHex8,
3085
2553
  formatHsl: color_formatHsl,
3086
2554
  formatRgb: color_formatRgb,
3087
2555
  toString: color_formatRgb
@@ -3089,6 +2557,9 @@ define(Color, color, {
3089
2557
  function color_formatHex() {
3090
2558
  return this.rgb().formatHex();
3091
2559
  }
2560
+ function color_formatHex8() {
2561
+ return this.rgb().formatHex8();
2562
+ }
3092
2563
  function color_formatHsl() {
3093
2564
  return hslConvert(this).formatHsl();
3094
2565
  }
@@ -3135,36 +2606,48 @@ function Rgb(r, g, b, opacity) {
3135
2606
  this.opacity = +opacity;
3136
2607
  }
3137
2608
  define(Rgb, rgb, extend(Color, {
3138
- brighter: function (k) {
2609
+ brighter(k) {
3139
2610
  k = k == null ? brighter : Math.pow(brighter, k);
3140
2611
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
3141
2612
  },
3142
- darker: function (k) {
2613
+ darker(k) {
3143
2614
  k = k == null ? darker : Math.pow(darker, k);
3144
2615
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
3145
2616
  },
3146
- rgb: function () {
2617
+ rgb() {
3147
2618
  return this;
3148
2619
  },
3149
- displayable: function () {
2620
+ clamp() {
2621
+ return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
2622
+ },
2623
+ displayable() {
3150
2624
  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
2625
  },
3152
2626
  hex: rgb_formatHex,
3153
2627
  // Deprecated! Use color.formatHex.
3154
2628
  formatHex: rgb_formatHex,
2629
+ formatHex8: rgb_formatHex8,
3155
2630
  formatRgb: rgb_formatRgb,
3156
2631
  toString: rgb_formatRgb
3157
2632
  }));
3158
2633
  function rgb_formatHex() {
3159
- return "#" + hex(this.r) + hex(this.g) + hex(this.b);
2634
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
2635
+ }
2636
+ function rgb_formatHex8() {
2637
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
3160
2638
  }
3161
2639
  function rgb_formatRgb() {
3162
- var a = this.opacity;
3163
- a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
3164
- return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")");
2640
+ const a = clampa(this.opacity);
2641
+ return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
2642
+ }
2643
+ function clampa(opacity) {
2644
+ return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
2645
+ }
2646
+ function clampi(value) {
2647
+ return Math.max(0, Math.min(255, Math.round(value) || 0));
3165
2648
  }
3166
2649
  function hex(value) {
3167
- value = Math.max(0, Math.min(255, Math.round(value) || 0));
2650
+ value = clampi(value);
3168
2651
  return (value < 16 ? "0" : "") + value.toString(16);
3169
2652
  }
3170
2653
  function hsla(h, s, l, a) {
@@ -3204,15 +2687,15 @@ function Hsl(h, s, l, opacity) {
3204
2687
  this.opacity = +opacity;
3205
2688
  }
3206
2689
  define(Hsl, hsl, extend(Color, {
3207
- brighter: function (k) {
2690
+ brighter(k) {
3208
2691
  k = k == null ? brighter : Math.pow(brighter, k);
3209
2692
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
3210
2693
  },
3211
- darker: function (k) {
2694
+ darker(k) {
3212
2695
  k = k == null ? darker : Math.pow(darker, k);
3213
2696
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
3214
2697
  },
3215
- rgb: function () {
2698
+ rgb() {
3216
2699
  var h = this.h % 360 + (this.h < 0) * 360,
3217
2700
  s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
3218
2701
  l = this.l,
@@ -3220,15 +2703,24 @@ define(Hsl, hsl, extend(Color, {
3220
2703
  m1 = 2 * l - m2;
3221
2704
  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
2705
  },
3223
- displayable: function () {
2706
+ clamp() {
2707
+ return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
2708
+ },
2709
+ displayable() {
3224
2710
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
3225
2711
  },
3226
- formatHsl: function () {
3227
- var a = this.opacity;
3228
- a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
3229
- return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
2712
+ formatHsl() {
2713
+ const a = clampa(this.opacity);
2714
+ return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
3230
2715
  }
3231
2716
  }));
2717
+ function clamph(value) {
2718
+ value = (value || 0) % 360;
2719
+ return value < 0 ? value + 360 : value;
2720
+ }
2721
+ function clampt(value) {
2722
+ return Math.max(0, Math.min(1, value || 0));
2723
+ }
3232
2724
 
3233
2725
  /* From FvD 13.37, CSS Color Module Level 3 */
3234
2726
  function hsl2rgb(h, m1, m2) {
@@ -4439,38 +3931,56 @@ const pi$1 = Math.PI,
4439
3931
  tau$1 = 2 * pi$1,
4440
3932
  epsilon$1 = 1e-6,
4441
3933
  tauEpsilon = tau$1 - epsilon$1;
4442
- function Path() {
4443
- this._x0 = this._y0 =
4444
- // start of current subpath
4445
- this._x1 = this._y1 = null; // end of current subpath
4446
- this._ = "";
4447
- }
4448
- function path() {
4449
- return new Path();
4450
- }
4451
- Path.prototype = path.prototype = {
4452
- constructor: Path,
4453
- moveTo: function (x, y) {
4454
- this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y);
4455
- },
4456
- closePath: function () {
3934
+ function append$1(strings) {
3935
+ this._ += strings[0];
3936
+ for (let i = 1, n = strings.length; i < n; ++i) {
3937
+ this._ += arguments[i] + strings[i];
3938
+ }
3939
+ }
3940
+ function appendRound$1(digits) {
3941
+ let d = Math.floor(digits);
3942
+ if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
3943
+ if (d > 15) return append$1;
3944
+ const k = 10 ** d;
3945
+ return function (strings) {
3946
+ this._ += strings[0];
3947
+ for (let i = 1, n = strings.length; i < n; ++i) {
3948
+ this._ += Math.round(arguments[i] * k) / k + strings[i];
3949
+ }
3950
+ };
3951
+ }
3952
+ class Path {
3953
+ constructor(digits) {
3954
+ this._x0 = this._y0 =
3955
+ // start of current subpath
3956
+ this._x1 = this._y1 = null; // end of current subpath
3957
+ this._ = "";
3958
+ this._append = digits == null ? append$1 : appendRound$1(digits);
3959
+ }
3960
+ moveTo(x, y) {
3961
+ this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;
3962
+ }
3963
+ closePath() {
4457
3964
  if (this._x1 !== null) {
4458
3965
  this._x1 = this._x0, this._y1 = this._y0;
4459
- this._ += "Z";
3966
+ this._append`Z`;
4460
3967
  }
4461
- },
4462
- lineTo: function (x, y) {
4463
- this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y);
4464
- },
4465
- quadraticCurveTo: function (x1, y1, x, y) {
4466
- this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x) + "," + (this._y1 = +y);
4467
- },
4468
- bezierCurveTo: function (x1, y1, x2, y2, x, y) {
4469
- this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x) + "," + (this._y1 = +y);
4470
- },
4471
- arcTo: function (x1, y1, x2, y2, r) {
3968
+ }
3969
+ lineTo(x, y) {
3970
+ this._append`L${this._x1 = +x},${this._y1 = +y}`;
3971
+ }
3972
+ quadraticCurveTo(x1, y1, x, y) {
3973
+ this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;
3974
+ }
3975
+ bezierCurveTo(x1, y1, x2, y2, x, y) {
3976
+ this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;
3977
+ }
3978
+ arcTo(x1, y1, x2, y2, r) {
4472
3979
  x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
4473
- var x0 = this._x1,
3980
+
3981
+ // Is the radius negative? Error.
3982
+ if (r < 0) throw new Error(`negative radius: ${r}`);
3983
+ let x0 = this._x1,
4474
3984
  y0 = this._y1,
4475
3985
  x21 = x2 - x1,
4476
3986
  y21 = y2 - y1,
@@ -4478,12 +3988,9 @@ Path.prototype = path.prototype = {
4478
3988
  y01 = y0 - y1,
4479
3989
  l01_2 = x01 * x01 + y01 * y01;
4480
3990
 
4481
- // Is the radius negative? Error.
4482
- if (r < 0) throw new Error("negative radius: " + r);
4483
-
4484
3991
  // Is this path empty? Move to (x1,y1).
4485
3992
  if (this._x1 === null) {
4486
- this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
3993
+ this._append`M${this._x1 = x1},${this._y1 = y1}`;
4487
3994
  }
4488
3995
 
4489
3996
  // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
@@ -4493,12 +4000,12 @@ Path.prototype = path.prototype = {
4493
4000
  // Equivalently, is (x1,y1) coincident with (x2,y2)?
4494
4001
  // Or, is the radius zero? Line to (x1,y1).
4495
4002
  else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon$1) || !r) {
4496
- this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
4003
+ this._append`L${this._x1 = x1},${this._y1 = y1}`;
4497
4004
  }
4498
4005
 
4499
4006
  // Otherwise, draw an arc!
4500
4007
  else {
4501
- var x20 = x2 - x0,
4008
+ let x20 = x2 - x0,
4502
4009
  y20 = y2 - y0,
4503
4010
  l21_2 = x21 * x21 + y21 * y21,
4504
4011
  l20_2 = x20 * x20 + y20 * y20,
@@ -4510,31 +4017,31 @@ Path.prototype = path.prototype = {
4510
4017
 
4511
4018
  // If the start tangent is not coincident with (x0,y0), line to.
4512
4019
  if (Math.abs(t01 - 1) > epsilon$1) {
4513
- this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
4020
+ this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;
4514
4021
  }
4515
- this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
4022
+ this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
4516
4023
  }
4517
- },
4518
- arc: function (x, y, r, a0, a1, ccw) {
4024
+ }
4025
+ arc(x, y, r, a0, a1, ccw) {
4519
4026
  x = +x, y = +y, r = +r, ccw = !!ccw;
4520
- var dx = r * Math.cos(a0),
4027
+
4028
+ // Is the radius negative? Error.
4029
+ if (r < 0) throw new Error(`negative radius: ${r}`);
4030
+ let dx = r * Math.cos(a0),
4521
4031
  dy = r * Math.sin(a0),
4522
4032
  x0 = x + dx,
4523
4033
  y0 = y + dy,
4524
4034
  cw = 1 ^ ccw,
4525
4035
  da = ccw ? a0 - a1 : a1 - a0;
4526
4036
 
4527
- // Is the radius negative? Error.
4528
- if (r < 0) throw new Error("negative radius: " + r);
4529
-
4530
4037
  // Is this path empty? Move to (x0,y0).
4531
4038
  if (this._x1 === null) {
4532
- this._ += "M" + x0 + "," + y0;
4039
+ this._append`M${x0},${y0}`;
4533
4040
  }
4534
4041
 
4535
4042
  // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
4536
4043
  else if (Math.abs(this._x1 - x0) > epsilon$1 || Math.abs(this._y1 - y0) > epsilon$1) {
4537
- this._ += "L" + x0 + "," + y0;
4044
+ this._append`L${x0},${y0}`;
4538
4045
  }
4539
4046
 
4540
4047
  // Is this arc empty? We’re done.
@@ -4545,119 +4052,20 @@ Path.prototype = path.prototype = {
4545
4052
 
4546
4053
  // Is this a complete circle? Draw two arcs to complete the circle.
4547
4054
  if (da > tauEpsilon) {
4548
- this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
4055
+ 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
4056
  }
4550
4057
 
4551
4058
  // Is this arc non-empty? Draw an arc!
4552
4059
  else if (da > epsilon$1) {
4553
- this._ += "A" + r + "," + r + ",0," + +(da >= pi$1) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
4060
+ 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
4061
  }
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
4062
  }
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
- }
4063
+ rect(x, y, w, h) {
4064
+ this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;
4579
4065
  }
4580
- return count;
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
- }
4066
+ toString() {
4067
+ return this._;
4609
4068
  }
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
4069
  }
4662
4070
 
4663
4071
  var array$1 = Array.prototype;
@@ -4724,9 +4132,10 @@ function Contours () {
4724
4132
 
4725
4133
  // Convert number of thresholds into uniform thresholds.
4726
4134
  if (!Array.isArray(tz)) {
4727
- const e = extent(values),
4728
- ts = tickStep(e[0], e[1], tz);
4729
- tz = ticks(Math.floor(e[0] / ts) * ts, Math.floor(e[1] / ts - 1) * ts, tz);
4135
+ const e = extent(values, finite);
4136
+ tz = ticks(...nice(e[0], e[1], tz), tz);
4137
+ while (tz[tz.length - 1] >= e[1]) tz.pop();
4138
+ while (tz[1] < e[0]) tz.shift();
4730
4139
  } else {
4731
4140
  tz = tz.slice().sort(ascending);
4732
4141
  }
@@ -4736,10 +4145,12 @@ function Contours () {
4736
4145
  // Accumulate, smooth contour rings, assign holes to exterior rings.
4737
4146
  // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js
4738
4147
  function contour(values, value) {
4148
+ const v = value == null ? NaN : +value;
4149
+ if (isNaN(v)) throw new Error(`invalid value: ${value}`);
4739
4150
  var polygons = [],
4740
4151
  holes = [];
4741
- isorings(values, value, function (ring) {
4742
- smooth(ring, values, value);
4152
+ isorings(values, v, function (ring) {
4153
+ smooth(ring, values, v);
4743
4154
  if (area(ring) > 0) polygons.push([ring]);else holes.push(ring);
4744
4155
  });
4745
4156
  holes.forEach(function (hole) {
@@ -4771,10 +4182,10 @@ function Contours () {
4771
4182
 
4772
4183
  // Special case for the first row (y = -1, t2 = t3 = 0).
4773
4184
  x = y = -1;
4774
- t1 = values[0] >= value;
4185
+ t1 = above(values[0], value);
4775
4186
  cases[t1 << 1].forEach(stitch);
4776
4187
  while (++x < dx - 1) {
4777
- t0 = t1, t1 = values[x + 1] >= value;
4188
+ t0 = t1, t1 = above(values[x + 1], value);
4778
4189
  cases[t0 | t1 << 1].forEach(stitch);
4779
4190
  }
4780
4191
  cases[t1 << 0].forEach(stitch);
@@ -4782,12 +4193,12 @@ function Contours () {
4782
4193
  // General case for the intermediate rows.
4783
4194
  while (++y < dy - 1) {
4784
4195
  x = -1;
4785
- t1 = values[y * dx + dx] >= value;
4786
- t2 = values[y * dx] >= value;
4196
+ t1 = above(values[y * dx + dx], value);
4197
+ t2 = above(values[y * dx], value);
4787
4198
  cases[t1 << 1 | t2 << 2].forEach(stitch);
4788
4199
  while (++x < dx - 1) {
4789
- t0 = t1, t1 = values[y * dx + dx + x + 1] >= value;
4790
- t3 = t2, t2 = values[y * dx + x + 1] >= value;
4200
+ t0 = t1, t1 = above(values[y * dx + dx + x + 1], value);
4201
+ t3 = t2, t2 = above(values[y * dx + x + 1], value);
4791
4202
  cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);
4792
4203
  }
4793
4204
  cases[t1 | t2 << 3].forEach(stitch);
@@ -4798,7 +4209,7 @@ function Contours () {
4798
4209
  t2 = values[y * dx] >= value;
4799
4210
  cases[t2 << 2].forEach(stitch);
4800
4211
  while (++x < dx - 1) {
4801
- t3 = t2, t2 = values[y * dx + x + 1] >= value;
4212
+ t3 = t2, t2 = above(values[y * dx + x + 1], value);
4802
4213
  cases[t2 << 2 | t3 << 3].forEach(stitch);
4803
4214
  }
4804
4215
  cases[t2 << 3].forEach(stitch);
@@ -4865,15 +4276,12 @@ function Contours () {
4865
4276
  y = point[1],
4866
4277
  xt = x | 0,
4867
4278
  yt = y | 0,
4868
- v0,
4869
- v1 = values[yt * dx + xt];
4279
+ v1 = valid(values[yt * dx + xt]);
4870
4280
  if (x > 0 && x < dx && xt === x) {
4871
- v0 = values[yt * dx + xt - 1];
4872
- point[0] = x + (value - v0) / (v1 - v0) - 0.5;
4281
+ point[0] = smooth1(x, valid(values[yt * dx + xt - 1]), v1, value);
4873
4282
  }
4874
4283
  if (y > 0 && y < dy && yt === y) {
4875
- v0 = values[(yt - 1) * dx + xt];
4876
- point[1] = y + (value - v0) / (v1 - v0) - 0.5;
4284
+ point[1] = smooth1(y, valid(values[(yt - 1) * dx + xt]), v1, value);
4877
4285
  }
4878
4286
  });
4879
4287
  }
@@ -4894,6 +4302,28 @@ function Contours () {
4894
4302
  return contours;
4895
4303
  }
4896
4304
 
4305
+ // When computing the extent, ignore infinite values (as well as invalid ones).
4306
+ function finite(x) {
4307
+ return isFinite(x) ? x : NaN;
4308
+ }
4309
+
4310
+ // Is the (possibly invalid) x greater than or equal to the (known valid) value?
4311
+ // Treat any invalid value as below negative infinity.
4312
+ function above(x, value) {
4313
+ return x == null ? false : +x >= value;
4314
+ }
4315
+
4316
+ // During smoothing, treat any invalid value as negative infinity.
4317
+ function valid(v) {
4318
+ return v == null || isNaN(v = +v) ? -Infinity : v;
4319
+ }
4320
+ function smooth1(x, v0, v1, value) {
4321
+ const a = value - v0;
4322
+ const b = v1 - v0;
4323
+ const d = isFinite(a) || isFinite(b) ? a / b : Math.sign(a) / Math.sign(b);
4324
+ return isNaN(d) ? x : x + d - 0.5;
4325
+ }
4326
+
4897
4327
  function formatDecimal (x) {
4898
4328
  return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
4899
4329
  }
@@ -5490,7 +4920,6 @@ function clipRectangle(x0, y0, x1, y1) {
5490
4920
  function corner(p, direction) {
5491
4921
  return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3 : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1 : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon
5492
4922
  }
5493
-
5494
4923
  function compareIntersection(a, b) {
5495
4924
  return comparePoint(a.x, b.x);
5496
4925
  }
@@ -5850,66 +5279,96 @@ function lengthPoint(x, y) {
5850
5279
  }
5851
5280
  var pathMeasure = lengthStream;
5852
5281
 
5853
- function PathString() {
5854
- this._string = [];
5855
- }
5856
- PathString.prototype = {
5857
- _radius: 4.5,
5858
- _circle: circle(4.5),
5859
- pointRadius: function (_) {
5860
- if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;
5282
+ // Simple caching for constant-radius points.
5283
+ let cacheDigits, cacheAppend, cacheRadius, cacheCircle;
5284
+ class PathString {
5285
+ constructor(digits) {
5286
+ this._append = digits == null ? append : appendRound(digits);
5287
+ this._radius = 4.5;
5288
+ this._ = "";
5289
+ }
5290
+ pointRadius(_) {
5291
+ this._radius = +_;
5861
5292
  return this;
5862
- },
5863
- polygonStart: function () {
5293
+ }
5294
+ polygonStart() {
5864
5295
  this._line = 0;
5865
- },
5866
- polygonEnd: function () {
5296
+ }
5297
+ polygonEnd() {
5867
5298
  this._line = NaN;
5868
- },
5869
- lineStart: function () {
5299
+ }
5300
+ lineStart() {
5870
5301
  this._point = 0;
5871
- },
5872
- lineEnd: function () {
5873
- if (this._line === 0) this._string.push("Z");
5302
+ }
5303
+ lineEnd() {
5304
+ if (this._line === 0) this._ += "Z";
5874
5305
  this._point = NaN;
5875
- },
5876
- point: function (x, y) {
5306
+ }
5307
+ point(x, y) {
5877
5308
  switch (this._point) {
5878
5309
  case 0:
5879
5310
  {
5880
- this._string.push("M", x, ",", y);
5311
+ this._append`M${x},${y}`;
5881
5312
  this._point = 1;
5882
5313
  break;
5883
5314
  }
5884
5315
  case 1:
5885
5316
  {
5886
- this._string.push("L", x, ",", y);
5317
+ this._append`L${x},${y}`;
5887
5318
  break;
5888
5319
  }
5889
5320
  default:
5890
5321
  {
5891
- if (this._circle == null) this._circle = circle(this._radius);
5892
- this._string.push("M", x, ",", y, this._circle);
5322
+ this._append`M${x},${y}`;
5323
+ if (this._radius !== cacheRadius || this._append !== cacheAppend) {
5324
+ const r = this._radius;
5325
+ const s = this._;
5326
+ this._ = ""; // stash the old string so we can cache the circle path fragment
5327
+ this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;
5328
+ cacheRadius = r;
5329
+ cacheAppend = this._append;
5330
+ cacheCircle = this._;
5331
+ this._ = s;
5332
+ }
5333
+ this._ += cacheCircle;
5893
5334
  break;
5894
5335
  }
5895
5336
  }
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
5337
  }
5906
- };
5907
- function circle(radius) {
5908
- return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius + "z";
5338
+ result() {
5339
+ const result = this._;
5340
+ this._ = "";
5341
+ return result.length ? result : null;
5342
+ }
5343
+ }
5344
+ function append(strings) {
5345
+ let i = 1;
5346
+ this._ += strings[0];
5347
+ for (const j = strings.length; i < j; ++i) {
5348
+ this._ += arguments[i] + strings[i];
5349
+ }
5350
+ }
5351
+ function appendRound(digits) {
5352
+ const d = Math.floor(digits);
5353
+ if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);
5354
+ if (d > 15) return append;
5355
+ if (d !== cacheDigits) {
5356
+ const k = 10 ** d;
5357
+ cacheDigits = d;
5358
+ cacheAppend = function append(strings) {
5359
+ let i = 1;
5360
+ this._ += strings[0];
5361
+ for (const j = strings.length; i < j; ++i) {
5362
+ this._ += Math.round(arguments[i] * k) / k + strings[i];
5363
+ }
5364
+ };
5365
+ }
5366
+ return cacheAppend;
5909
5367
  }
5910
5368
 
5911
5369
  function index (projection, context) {
5912
- var pointRadius = 4.5,
5370
+ let digits = 3,
5371
+ pointRadius = 4.5,
5913
5372
  projectionStream,
5914
5373
  contextStream;
5915
5374
  function path(object) {
@@ -5936,11 +5395,13 @@ function index (projection, context) {
5936
5395
  return pathCentroid.result();
5937
5396
  };
5938
5397
  path.projection = function (_) {
5939
- return arguments.length ? (projectionStream = _ == null ? (projection = null, identity$2) : (projection = _).stream, path) : projection;
5398
+ if (!arguments.length) return projection;
5399
+ projectionStream = _ == null ? (projection = null, identity$2) : (projection = _).stream;
5400
+ return path;
5940
5401
  };
5941
5402
  path.context = function (_) {
5942
5403
  if (!arguments.length) return context;
5943
- contextStream = _ == null ? (context = null, new PathString()) : new PathContext(context = _);
5404
+ contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);
5944
5405
  if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius);
5945
5406
  return path;
5946
5407
  };
@@ -5949,7 +5410,17 @@ function index (projection, context) {
5949
5410
  pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_);
5950
5411
  return path;
5951
5412
  };
5952
- return path.projection(projection).context(context);
5413
+ path.digits = function (_) {
5414
+ if (!arguments.length) return digits;
5415
+ if (_ == null) digits = null;else {
5416
+ const d = Math.floor(_);
5417
+ if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
5418
+ digits = d;
5419
+ }
5420
+ if (context === null) contextStream = new PathString(digits);
5421
+ return path;
5422
+ };
5423
+ return path.projection(projection).digits(digits).context(context);
5953
5424
  }
5954
5425
 
5955
5426
  function transformer$1(methods) {
@@ -6244,7 +5715,7 @@ function continuous() {
6244
5715
  }
6245
5716
 
6246
5717
  function tickFormat(start, stop, count, specifier) {
6247
- var step = tickStep$1(start, stop, count),
5718
+ var step = tickStep(start, stop, count),
6248
5719
  precision;
6249
5720
  specifier = formatSpecifier(specifier == null ? ",f" : specifier);
6250
5721
  switch (specifier.type) {
@@ -6277,7 +5748,7 @@ function linearish(scale) {
6277
5748
  var domain = scale.domain;
6278
5749
  scale.ticks = function (count) {
6279
5750
  var d = domain();
6280
- return ticks$1(d[0], d[d.length - 1], count == null ? 10 : count);
5751
+ return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
6281
5752
  };
6282
5753
  scale.tickFormat = function (count, specifier) {
6283
5754
  var d = domain();
@@ -6298,7 +5769,7 @@ function linearish(scale) {
6298
5769
  step = i0, i0 = i1, i1 = step;
6299
5770
  }
6300
5771
  while (maxIter-- > 0) {
6301
- step = tickIncrement$1(start, stop, count);
5772
+ step = tickIncrement(start, stop, count);
6302
5773
  if (step === prestep) {
6303
5774
  d[i0] = start;
6304
5775
  d[i1] = stop;
@@ -6343,6 +5814,22 @@ function constant (x) {
6343
5814
  };
6344
5815
  }
6345
5816
 
5817
+ function withPath(shape) {
5818
+ let digits = 3;
5819
+ shape.digits = function (_) {
5820
+ if (!arguments.length) return digits;
5821
+ if (_ == null) {
5822
+ digits = null;
5823
+ } else {
5824
+ const d = Math.floor(_);
5825
+ if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
5826
+ digits = d;
5827
+ }
5828
+ return shape;
5829
+ };
5830
+ return () => new Path(digits);
5831
+ }
5832
+
6346
5833
  function array (x) {
6347
5834
  return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like
6348
5835
  : Array.from(x); // Map, Set, iterable, string, or anything else
@@ -6396,7 +5883,8 @@ function line (x$1, y$1) {
6396
5883
  var defined = constant(true),
6397
5884
  context = null,
6398
5885
  curve = curveLinear,
6399
- output = null;
5886
+ output = null,
5887
+ path = withPath(line);
6400
5888
  x$1 = typeof x$1 === "function" ? x$1 : x$1 === undefined ? x : constant(x$1);
6401
5889
  y$1 = typeof y$1 === "function" ? y$1 : y$1 === undefined ? y : constant(y$1);
6402
5890
  function line(data) {
@@ -6630,7 +6118,6 @@ class DecidablesElement extends s {
6630
6118
  };
6631
6119
  /* eslint-enable key-spacing, object-curly-newline */
6632
6120
  }
6633
-
6634
6121
  static cssBoxShadow(elevation, rotate = false, inverse = false) {
6635
6122
  const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
6636
6123
  const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
@@ -6646,6 +6133,48 @@ class DecidablesElement extends s {
6646
6133
  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
6134
  return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
6648
6135
  }
6136
+ static get svgDefs() {
6137
+ const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
6138
+
6139
+ const filters = shadows.elevations.map(z => {
6140
+ return `
6141
+ <filter id=${`shadow-${z}`} filterUnits="userSpaceOnUse" x="-100%" y="-100%" width="200%" height="200%">
6142
+ <feComponentTransfer in="SourceAlpha" result="solid">
6143
+ <feFuncA type="table" tableValues="0 1 1"/>
6144
+ </feComponentTransfer>
6145
+ <feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
6146
+ <feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
6147
+ <feOffset in="solid" result="offA" dx=${shadows.mapAmbient[z].y / 2} dy=${shadows.mapAmbient[z].y} />
6148
+ ${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)} />`}
6149
+ ${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)} />`}
6150
+ ${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)} />`}
6151
+ <feGaussianBlur in=${shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU'} result="blurU" stdDeviation=${shadows.mapUmbra[z].b / 2} />
6152
+ <feGaussianBlur in=${shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP'} result="blurP" stdDeviation=${shadows.mapPenumbra[z].b / 2} />
6153
+ <feGaussianBlur in=${shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA'} result="blurA" stdDeviation=${shadows.mapAmbient[z].b / 2} />
6154
+ <feFlood in="SourceGraphic" result="opU" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityUmbra + shadows.opacityBoost} />
6155
+ <feFlood in="SourceGraphic" result="opP" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityPenumbra + shadows.opacityBoost} />
6156
+ <feFlood in="SourceGraphic" result="opA" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityAmbient + shadows.opacityBoost} />
6157
+ <feComposite in="opU" in2="blurU" result="shU" operator="in" />
6158
+ <feComposite in="opP" in2="blurP" result="shP" operator="in" />
6159
+ <feComposite in="opA" in2="blurA" result="shA" operator="in" />
6160
+ <feMorphology in="solid" result="smaller" operator="erode" radius="1" />
6161
+ <feComposite in="shU" in2="smaller" result="finalU" operator="out" />
6162
+ <feComposite in="shP" in2="smaller" result="finalP" operator="out" />
6163
+ <feComposite in="shA" in2="smaller" result="finalA" operator="out" />
6164
+ <feMerge>
6165
+ <feMergeNode in="finalU" />
6166
+ <feMergeNode in="finalP" />
6167
+ <feMergeNode in="finalA" />
6168
+ <feMergeNode in="SourceGraphic" />
6169
+ </feMerge>
6170
+ </filter>`;
6171
+ });
6172
+ return `
6173
+ <defs>
6174
+ ${filters}
6175
+ </defs>
6176
+ `;
6177
+ }
6649
6178
  static get svgFilters() {
6650
6179
  const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
6651
6180
 
@@ -6653,7 +6182,7 @@ class DecidablesElement extends s {
6653
6182
  return b`
6654
6183
  <filter id=${`shadow-${z}`} x="-250%" y="-250%" width="600%" height="600%">
6655
6184
  <feComponentTransfer in="SourceAlpha" result="solid">
6656
- <feFuncA type="table" tableValues="0 1 1"/>
6185
+ <feFuncA type="table" tableValues="0 1 1"/>
6657
6186
  </feComponentTransfer>
6658
6187
  <feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
6659
6188
  <feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
@@ -6691,24 +6220,24 @@ class DecidablesElement extends s {
6691
6220
  `;
6692
6221
  }
6693
6222
  static get styles() {
6694
- return r$2`
6223
+ return i$2`
6695
6224
  :host {
6696
- ---shadow-0: var(--shadow-0, ${o$3(this.cssBoxShadow(0))});
6697
- ---shadow-2: var(--shadow-2, ${o$3(this.cssBoxShadow(2))});
6698
- ---shadow-4: var(--shadow-4, ${o$3(this.cssBoxShadow(4))});
6699
- ---shadow-8: var(--shadow-8, ${o$3(this.cssBoxShadow(8))});
6700
-
6701
- ---color-background: var(--color-background, ${o$3(this.greys.white)});
6702
- ---color-border: var(--color-border, ${o$3(this.greys.light75)});
6703
- ---color-text: var(--color-text, ${o$3(this.greys.dark75)});
6704
- ---color-text-inverse: var(--color-text-inverse, ${o$3(this.greys.white)});
6705
- ---color-link: var(--color-link, ${o$3(this.greys.dark25)});
6706
- ---color-element-background: var(--color-element-background, ${o$3(this.greys.light75)});
6707
- ---color-element-disabled: var(--color-element-disabled, ${o$3(this.greys.light50)});
6708
- ---color-element-enabled: var(--color-element-enabled, ${o$3(this.greys.dark25)});
6709
- ---color-element-selected: var(--color-element-selected, ${o$3(this.greys.grey)});
6710
- ---color-element-border: var(--color-element-border, ${o$3(this.greys.dark50)});
6711
- ---color-element-emphasis: var(--color-element-emphasis, ${o$3(this.greys.dark75)});
6225
+ ---shadow-0: var(--shadow-0, ${r$3(this.cssBoxShadow(0))});
6226
+ ---shadow-2: var(--shadow-2, ${r$3(this.cssBoxShadow(2))});
6227
+ ---shadow-4: var(--shadow-4, ${r$3(this.cssBoxShadow(4))});
6228
+ ---shadow-8: var(--shadow-8, ${r$3(this.cssBoxShadow(8))});
6229
+
6230
+ ---color-background: var(--color-background, ${r$3(this.greys.white)});
6231
+ ---color-border: var(--color-border, ${r$3(this.greys.light75)});
6232
+ ---color-text: var(--color-text, ${r$3(this.greys.dark75)});
6233
+ ---color-text-inverse: var(--color-text-inverse, ${r$3(this.greys.white)});
6234
+ ---color-link: var(--color-link, ${r$3(this.greys.dark25)});
6235
+ ---color-element-background: var(--color-element-background, ${r$3(this.greys.light75)});
6236
+ ---color-element-disabled: var(--color-element-disabled, ${r$3(this.greys.light50)});
6237
+ ---color-element-enabled: var(--color-element-enabled, ${r$3(this.greys.dark25)});
6238
+ ---color-element-selected: var(--color-element-selected, ${r$3(this.greys.grey)});
6239
+ ---color-element-border: var(--color-element-border, ${r$3(this.greys.dark50)});
6240
+ ---color-element-emphasis: var(--color-element-emphasis, ${r$3(this.greys.dark75)});
6712
6241
 
6713
6242
  ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
6714
6243
  ---font-family-math: var(--font-family-math, "Source Serif", serif);
@@ -6769,7 +6298,7 @@ class DecidablesButton extends DecidablesElement {
6769
6298
  this.disabled = false;
6770
6299
  }
6771
6300
  static get styles() {
6772
- return [super.styles, r$2`
6301
+ return [super.styles, i$2`
6773
6302
  :host {
6774
6303
  margin: 0.25rem;
6775
6304
  }
@@ -6839,7 +6368,7 @@ customElements.define('decidables-button', DecidablesButton);
6839
6368
  * Copyright 2018 Google LLC
6840
6369
  * SPDX-License-Identifier: BSD-3-Clause
6841
6370
  */
6842
- const l = l => null != l ? l : A$1;
6371
+ const o = o => o ?? T;
6843
6372
 
6844
6373
  class DecidablesSlider extends DecidablesElement {
6845
6374
  static get properties() {
@@ -6894,11 +6423,11 @@ class DecidablesSlider extends DecidablesElement {
6894
6423
  this.value = event.target.value;
6895
6424
  }
6896
6425
  static get styles() {
6897
- return [super.styles, r$2`
6426
+ return [super.styles, i$2`
6898
6427
  :host {
6899
- ---shadow-2-rotate: var(--shadow-2-rotate, ${o$3(this.cssBoxShadow(2, true, false))});
6900
- ---shadow-4-rotate: var(--shadow-4-rotate, ${o$3(this.cssBoxShadow(4, true, false))});
6901
- ---shadow-8-rotate: var(--shadow-8-rotate, ${o$3(this.cssBoxShadow(8, true, false))});
6428
+ ---shadow-2-rotate: var(--shadow-2-rotate, ${r$3(this.cssBoxShadow(2, true, false))});
6429
+ ---shadow-4-rotate: var(--shadow-4-rotate, ${r$3(this.cssBoxShadow(4, true, false))});
6430
+ ---shadow-8-rotate: var(--shadow-8-rotate, ${r$3(this.cssBoxShadow(8, true, false))});
6902
6431
 
6903
6432
  display: flex;
6904
6433
 
@@ -7152,9 +6681,9 @@ class DecidablesSlider extends DecidablesElement {
7152
6681
  <slot></slot>
7153
6682
  </label>
7154
6683
  <div class="range">
7155
- <input type="range" id="slider" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
6684
+ <input type="range" id="slider" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
7156
6685
  </div>
7157
- <decidables-spinner min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
6686
+ <decidables-spinner min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
7158
6687
  `;
7159
6688
  }
7160
6689
  }
@@ -7204,12 +6733,15 @@ class DecidablesSpinner extends DecidablesElement {
7204
6733
  this.value = event.target.value;
7205
6734
  }
7206
6735
  static get styles() {
7207
- return [super.styles, r$2`
6736
+ return [super.styles, i$2`
7208
6737
  :host {
7209
6738
  ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
7210
6739
  ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
7211
6740
  ---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
7212
6741
 
6742
+ ---decidables-spinner-postfix: var(--decidables-spinner-postfix, "");
6743
+ ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0);
6744
+
7213
6745
  display: block;
7214
6746
  }
7215
6747
 
@@ -7237,8 +6769,20 @@ class DecidablesSpinner extends DecidablesElement {
7237
6769
  content: var(---decidables-spinner-prefix);
7238
6770
  }
7239
6771
 
6772
+ label::after {
6773
+ position: absolute;
6774
+ right: 0.25rem;
6775
+ bottom: 1px;
6776
+
6777
+ font-size: var(---decidables-spinner-font-size);
6778
+ line-height: normal;
6779
+
6780
+ content: var(---decidables-spinner-postfix);
6781
+ }
6782
+
7240
6783
  input[type=number] {
7241
6784
  width: var(---decidables-spinner-input-width);
6785
+ padding-right: var(---decidables-spinner-postfix-padding);
7242
6786
 
7243
6787
  font-family: var(---font-family-base);
7244
6788
  font-size: var(---decidables-spinner-font-size);
@@ -7289,7 +6833,7 @@ class DecidablesSpinner extends DecidablesElement {
7289
6833
  return x$1`
7290
6834
  <label>
7291
6835
  <slot></slot>
7292
- <input ?disabled=${this.disabled} type="number" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
6836
+ <input ?disabled=${this.disabled} type="number" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
7293
6837
  </label>
7294
6838
  `;
7295
6839
  }
@@ -7328,7 +6872,7 @@ class DecidablesSwitch extends DecidablesElement {
7328
6872
  }));
7329
6873
  }
7330
6874
  static get styles() {
7331
- return [super.styles, r$2`
6875
+ return [super.styles, i$2`
7332
6876
  :host {
7333
6877
  display: flex;
7334
6878
 
@@ -7480,7 +7024,7 @@ class DecidablesToggle extends DecidablesElement {
7480
7024
  this.disabled = false;
7481
7025
  }
7482
7026
  static get styles() {
7483
- return [super.styles, r$2`
7027
+ return [super.styles, i$2`
7484
7028
  fieldset {
7485
7029
  display: flex;
7486
7030
 
@@ -7555,7 +7099,7 @@ class DecidablesToggleOption extends DecidablesElement {
7555
7099
  }));
7556
7100
  }
7557
7101
  static get styles() {
7558
- return [super.styles, r$2`
7102
+ return [super.styles, i$2`
7559
7103
  :host {
7560
7104
  display: flex;
7561
7105
  }
@@ -7691,6 +7235,50 @@ const DecidablesConverterSet = {
7691
7235
  }
7692
7236
  };
7693
7237
 
7238
+ function DecidablesMixinResizeable(superClass) {
7239
+ return class extends superClass {
7240
+ static get properties() {
7241
+ return {
7242
+ width: {
7243
+ attribute: false,
7244
+ type: Number,
7245
+ reflect: false
7246
+ },
7247
+ height: {
7248
+ attribute: false,
7249
+ type: Number,
7250
+ reflect: false
7251
+ },
7252
+ rem: {
7253
+ attribute: false,
7254
+ type: Number,
7255
+ reflect: false
7256
+ }
7257
+ };
7258
+ }
7259
+ constructor() {
7260
+ super();
7261
+ this.width = NaN;
7262
+ this.height = NaN;
7263
+ this.rem = NaN;
7264
+ }
7265
+ getDimensions() {
7266
+ this.width = parseFloat(this.getComputedStyleValue('width'), 10);
7267
+ this.height = parseFloat(this.getComputedStyleValue('height'), 10);
7268
+ this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
7269
+ }
7270
+ connectedCallback() {
7271
+ super.connectedCallback();
7272
+ this.resizeObserver = new ResizeObserver(this.getDimensions.bind(this));
7273
+ this.resizeObserver.observe(this);
7274
+ }
7275
+ disconnectedCallback() {
7276
+ this.resizeObserver.unobserve(this);
7277
+ super.disconnectedCallback();
7278
+ }
7279
+ };
7280
+ }
7281
+
7694
7282
  /*
7695
7283
  DetectableElement Base Class - Not intended for instantiation!
7696
7284
  <detectable-element>
@@ -7741,55 +7329,55 @@ class DetectableElement extends DecidablesElement {
7741
7329
  }, {});
7742
7330
  }
7743
7331
  static get styles() {
7744
- return [super.styles, r$2`
7332
+ return [super.styles, i$2`
7745
7333
  :host {
7746
- ---color-h: var(--color-h, ${o$3(this.colors.h)});
7747
- ---color-m: var(--color-m, ${o$3(this.colors.m)});
7748
- ---color-fa: var(--color-fa, ${o$3(this.colors.fa)});
7749
- ---color-cr: var(--color-cr, ${o$3(this.colors.cr)});
7750
- ---color-hr: var(--color-hr, ${o$3(this.colors.hr)});
7751
- ---color-far: var(--color-far, ${o$3(this.colors.far)});
7752
- ---color-acc: var(--color-acc, ${o$3(this.colors.acc)});
7753
- ---color-d: var(--color-d, ${o$3(this.colors.d)});
7754
- ---color-c: var(--color-c, ${o$3(this.colors.c)});
7755
- ---color-s: var(--color-s, ${o$3(this.colors.s)});
7756
- ---color-present: var(--color-present, ${o$3(this.colors.present)});
7757
- ---color-absent: var(--color-absent, ${o$3(this.colors.absent)});
7758
- ---color-correct: var(--color-correct, ${o$3(this.colors.correct)});
7759
- ---color-error: var(--color-error, ${o$3(this.colors.error)});
7760
- ---color-nr: var(--color-nr, ${o$3(this.colors.nr)});
7761
-
7762
- ---color-h-light: var(--color-h-light, ${o$3(this.lights.h)});
7763
- ---color-m-light: var(--color-m-light, ${o$3(this.lights.m)});
7764
- ---color-fa-light: var(--color-fa-light, ${o$3(this.lights.fa)});
7765
- ---color-cr-light: var(--color-cr-light, ${o$3(this.lights.cr)});
7766
- ---color-hr-light: var(--color-hr-light, ${o$3(this.lights.hr)});
7767
- ---color-far-light: var(--color-far-light, ${o$3(this.lights.far)});
7768
- ---color-acc-light: var(--color-acc-light, ${o$3(this.lights.acc)});
7769
- ---color-d-light: var(--color-d-light, ${o$3(this.lights.d)});
7770
- ---color-c-light: var(--color-c-light, ${o$3(this.lights.c)});
7771
- ---color-s-light: var(--color-s-light, ${o$3(this.lights.s)});
7772
- ---color-present-light: var(--color-present-light, ${o$3(this.lights.present)});
7773
- ---color-absent-light: var(--color-absent-light, ${o$3(this.lights.absent)});
7774
- ---color-correct-light: var(--color-correct-light, ${o$3(this.lights.correct)});
7775
- ---color-error-light: var(--color-error-light, ${o$3(this.lights.error)});
7776
- ---color-nr-light: var(--color-nr-light, ${o$3(this.lights.nr)});
7777
-
7778
- ---color-h-dark: var(--color-h-dark, ${o$3(this.darks.h)});
7779
- ---color-m-dark: var(--color-m-dark, ${o$3(this.darks.m)});
7780
- ---color-fa-dark: var(--color-fa-dark, ${o$3(this.darks.fa)});
7781
- ---color-cr-dark: var(--color-cr-dark, ${o$3(this.darks.cr)});
7782
- ---color-hr-dark: var(--color-hr-dark, ${o$3(this.darks.hr)});
7783
- ---color-far-dark: var(--color-far-dark, ${o$3(this.darks.far)});
7784
- ---color-acc-dark: var(--color-acc-dark, ${o$3(this.darks.acc)});
7785
- ---color-d-dark: var(--color-d-dark, ${o$3(this.darks.d)});
7786
- ---color-c-dark: var(--color-c-dark, ${o$3(this.darks.c)});
7787
- ---color-s-dark: var(--color-s-dark, ${o$3(this.darks.s)});
7788
- ---color-present-dark: var(--color-present-dark, ${o$3(this.darks.present)});
7789
- ---color-absent-dark: var(--color-absent-dark, ${o$3(this.darks.absent)});
7790
- ---color-correct-dark: var(--color-correct-dark, ${o$3(this.darks.correct)});
7791
- ---color-error-dark: var(--color-error-dark, ${o$3(this.darks.error)});
7792
- ---color-nr-dark: var(--color-nr-dark, ${o$3(this.darks.nr)});
7334
+ ---color-h: var(--color-h, ${r$3(this.colors.h)});
7335
+ ---color-m: var(--color-m, ${r$3(this.colors.m)});
7336
+ ---color-fa: var(--color-fa, ${r$3(this.colors.fa)});
7337
+ ---color-cr: var(--color-cr, ${r$3(this.colors.cr)});
7338
+ ---color-hr: var(--color-hr, ${r$3(this.colors.hr)});
7339
+ ---color-far: var(--color-far, ${r$3(this.colors.far)});
7340
+ ---color-acc: var(--color-acc, ${r$3(this.colors.acc)});
7341
+ ---color-d: var(--color-d, ${r$3(this.colors.d)});
7342
+ ---color-c: var(--color-c, ${r$3(this.colors.c)});
7343
+ ---color-s: var(--color-s, ${r$3(this.colors.s)});
7344
+ ---color-present: var(--color-present, ${r$3(this.colors.present)});
7345
+ ---color-absent: var(--color-absent, ${r$3(this.colors.absent)});
7346
+ ---color-correct: var(--color-correct, ${r$3(this.colors.correct)});
7347
+ ---color-error: var(--color-error, ${r$3(this.colors.error)});
7348
+ ---color-nr: var(--color-nr, ${r$3(this.colors.nr)});
7349
+
7350
+ ---color-h-light: var(--color-h-light, ${r$3(this.lights.h)});
7351
+ ---color-m-light: var(--color-m-light, ${r$3(this.lights.m)});
7352
+ ---color-fa-light: var(--color-fa-light, ${r$3(this.lights.fa)});
7353
+ ---color-cr-light: var(--color-cr-light, ${r$3(this.lights.cr)});
7354
+ ---color-hr-light: var(--color-hr-light, ${r$3(this.lights.hr)});
7355
+ ---color-far-light: var(--color-far-light, ${r$3(this.lights.far)});
7356
+ ---color-acc-light: var(--color-acc-light, ${r$3(this.lights.acc)});
7357
+ ---color-d-light: var(--color-d-light, ${r$3(this.lights.d)});
7358
+ ---color-c-light: var(--color-c-light, ${r$3(this.lights.c)});
7359
+ ---color-s-light: var(--color-s-light, ${r$3(this.lights.s)});
7360
+ ---color-present-light: var(--color-present-light, ${r$3(this.lights.present)});
7361
+ ---color-absent-light: var(--color-absent-light, ${r$3(this.lights.absent)});
7362
+ ---color-correct-light: var(--color-correct-light, ${r$3(this.lights.correct)});
7363
+ ---color-error-light: var(--color-error-light, ${r$3(this.lights.error)});
7364
+ ---color-nr-light: var(--color-nr-light, ${r$3(this.lights.nr)});
7365
+
7366
+ ---color-h-dark: var(--color-h-dark, ${r$3(this.darks.h)});
7367
+ ---color-m-dark: var(--color-m-dark, ${r$3(this.darks.m)});
7368
+ ---color-fa-dark: var(--color-fa-dark, ${r$3(this.darks.fa)});
7369
+ ---color-cr-dark: var(--color-cr-dark, ${r$3(this.darks.cr)});
7370
+ ---color-hr-dark: var(--color-hr-dark, ${r$3(this.darks.hr)});
7371
+ ---color-far-dark: var(--color-far-dark, ${r$3(this.darks.far)});
7372
+ ---color-acc-dark: var(--color-acc-dark, ${r$3(this.darks.acc)});
7373
+ ---color-d-dark: var(--color-d-dark, ${r$3(this.darks.d)});
7374
+ ---color-c-dark: var(--color-c-dark, ${r$3(this.darks.c)});
7375
+ ---color-s-dark: var(--color-s-dark, ${r$3(this.darks.s)});
7376
+ ---color-present-dark: var(--color-present-dark, ${r$3(this.darks.present)});
7377
+ ---color-absent-dark: var(--color-absent-dark, ${r$3(this.darks.absent)});
7378
+ ---color-correct-dark: var(--color-correct-dark, ${r$3(this.darks.correct)});
7379
+ ---color-error-dark: var(--color-error-dark, ${r$3(this.darks.error)});
7380
+ ---color-nr-dark: var(--color-nr-dark, ${r$3(this.darks.nr)});
7793
7381
  }
7794
7382
  `];
7795
7383
  }
@@ -7803,7 +7391,7 @@ class DetectableElement extends DecidablesElement {
7803
7391
  Dots; Coherence;
7804
7392
  # Direction, Speed, Lifetime
7805
7393
  */
7806
- class RDKTask extends DetectableElement {
7394
+ class RDKTask extends DecidablesMixinResizeable(DetectableElement) {
7807
7395
  static get properties() {
7808
7396
  return {
7809
7397
  coherence: {
@@ -7860,21 +7448,6 @@ class RDKTask extends DetectableElement {
7860
7448
  attribute: false,
7861
7449
  type: Number,
7862
7450
  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
7451
  }
7879
7452
  };
7880
7453
  }
@@ -7896,10 +7469,6 @@ class RDKTask extends DetectableElement {
7896
7469
  this.lifetime = 400; // Lifetime of each dot in milliseconds
7897
7470
  this.speed = 50; // Rate of dot movement in pixels per second
7898
7471
 
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
7472
  // Private
7904
7473
  this.firstUpdate = true;
7905
7474
  this.COHERENT = 0; // "Constant" for index to coherent dots
@@ -7923,9 +7492,8 @@ class RDKTask extends DetectableElement {
7923
7492
  this.xScale = undefined; // D3 Scale for x-axis
7924
7493
  this.yScale = undefined; // D3 Scale for y-axis
7925
7494
  }
7926
-
7927
7495
  static get styles() {
7928
- return [super.styles, r$2`
7496
+ return [super.styles, i$2`
7929
7497
  :host {
7930
7498
  display: inline-block;
7931
7499
 
@@ -7976,27 +7544,6 @@ class RDKTask extends DetectableElement {
7976
7544
  /* eslint-disable-line class-methods-use-this */
7977
7545
  return x$1``;
7978
7546
  }
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
7547
  update(changedProperties) {
8001
7548
  super.update(changedProperties);
8002
7549
 
@@ -11678,12 +11225,10 @@ var jstat = {exports: {}};
11678
11225
  if (Q2[0].length === undefined) {
11679
11226
  Q2 = [Q2]; // The confusing jStat.multifly implementation threat nature process again.
11680
11227
  }
11681
-
11682
11228
  var x = jStat.multiply(jStat.multiply(RI, Q2), b);
11683
11229
  if (x.length === undefined) {
11684
11230
  x = [[x]]; // The confusing jStat.multifly implementation threat nature process again.
11685
11231
  }
11686
-
11687
11232
  if (array_mode) return x.map(function (i) {
11688
11233
  return i[0];
11689
11234
  });
@@ -12790,7 +12335,7 @@ class SDTMath {
12790
12335
  Styles:
12791
12336
  ??
12792
12337
  */
12793
- class ROCSpace extends DetectableElement {
12338
+ class ROCSpace extends DecidablesMixinResizeable(DetectableElement) {
12794
12339
  static get properties() {
12795
12340
  return {
12796
12341
  contour: {
@@ -12842,21 +12387,6 @@ class ROCSpace extends DetectableElement {
12842
12387
  attribute: false,
12843
12388
  type: Number,
12844
12389
  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
12390
  }
12861
12391
  };
12862
12392
  }
@@ -12888,9 +12418,6 @@ class ROCSpace extends DetectableElement {
12888
12418
  this.pointArray = [];
12889
12419
  this.isoDArray = [];
12890
12420
  this.isoCArray = [];
12891
- this.width = NaN;
12892
- this.height = NaN;
12893
- this.rem = NaN;
12894
12421
  this.alignState();
12895
12422
  }
12896
12423
  alignState() {
@@ -12977,7 +12504,7 @@ class ROCSpace extends DetectableElement {
12977
12504
  this.requestUpdate();
12978
12505
  }
12979
12506
  static get styles() {
12980
- return [super.styles, r$2`
12507
+ return [super.styles, i$2`
12981
12508
  :host {
12982
12509
  display: inline-block;
12983
12510
 
@@ -13117,27 +12644,6 @@ class ROCSpace extends DetectableElement {
13117
12644
  ${DetectableElement.svgFilters}
13118
12645
  `;
13119
12646
  }
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
12647
  update(changedProperties) {
13142
12648
  super.update(changedProperties);
13143
12649
  this.alignState();
@@ -13270,7 +12776,7 @@ class ROCSpace extends DetectableElement {
13270
12776
  const contours = Contours().size([n, n]).thresholds(contourThresholds);
13271
12777
  const contourColorStart = this.getComputedStyleValue(this.contour === 'bias' ? '---color-element-background' : this.contour === 'sensitivity' ? '---color-d' : this.contour === 'accuracy' ? '---color-acc-dark' : null);
13272
12778
  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$1(contourThresholds)).interpolate(() => {
12779
+ const contourColor = linear().domain(extent(contourThresholds)).interpolate(() => {
13274
12780
  return interpolateRgb(contourColorStart, contourColorEnd);
13275
12781
  });
13276
12782
  // DATA-JOIN
@@ -13569,7 +13075,6 @@ class ROCSpace extends DetectableElement {
13569
13075
  break;
13570
13076
  // no-op
13571
13077
  }
13572
-
13573
13078
  hr = this.zRoc ? SDTMath.zhr2Hr(hr) : hr;
13574
13079
  far = this.zRoc ? SDTMath.zfar2Far(far) : far;
13575
13080
  // Clamp FAR and HR to ROC Space
@@ -13814,7 +13319,7 @@ class DetectableControl extends DetectableElement {
13814
13319
  this.state = 'ended';
13815
13320
  }
13816
13321
  static get styles() {
13817
- return [super.styles, r$2`
13322
+ return [super.styles, i$2`
13818
13323
  :host {
13819
13324
  display: inline-block;
13820
13325
  }
@@ -13893,7 +13398,7 @@ customElements.define('detectable-control', DetectableControl);
13893
13398
  Styles:
13894
13399
  ??
13895
13400
  */
13896
- class SDTModel extends DetectableElement {
13401
+ class SDTModel extends DecidablesMixinResizeable(DetectableElement) {
13897
13402
  static get properties() {
13898
13403
  return {
13899
13404
  color: {
@@ -13970,21 +13475,6 @@ class SDTModel extends DetectableElement {
13970
13475
  attribute: false,
13971
13476
  type: Array,
13972
13477
  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
13478
  }
13989
13479
  };
13990
13480
  }
@@ -14012,10 +13502,6 @@ class SDTModel extends DetectableElement {
14012
13502
  this.responses = ['present', 'absent']; // Allowable values of trial.response
14013
13503
  this.trials = []; // Array of simulated trials
14014
13504
 
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
13505
  // Private
14020
13506
  this.muN = NaN; // Mean of noise distribution
14021
13507
  this.muS = NaN; // Mean of signal distribution
@@ -14084,7 +13570,7 @@ class SDTModel extends DetectableElement {
14084
13570
  }
14085
13571
  }
14086
13572
  static get styles() {
14087
- return [super.styles, r$2`
13573
+ return [super.styles, i$2`
14088
13574
  :host {
14089
13575
  display: inline-block;
14090
13576
 
@@ -14350,27 +13836,6 @@ class SDTModel extends DetectableElement {
14350
13836
  bubbles: true
14351
13837
  }));
14352
13838
  }
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
13839
  update(changedProperties) {
14375
13840
  super.update(changedProperties);
14376
13841
  this.alignState();
@@ -15346,7 +14811,6 @@ class DetectableResponse extends DetectableElement {
15346
14811
 
15347
14812
  this.nr = 0; // Count of No Response trials
15348
14813
  }
15349
-
15350
14814
  get trialPayoff() {
15351
14815
  switch (this.outcome) {
15352
14816
  case 'h':
@@ -15444,7 +14908,7 @@ class DetectableResponse extends DetectableElement {
15444
14908
  this.e = 0;
15445
14909
  }
15446
14910
  static get styles() {
15447
- return [super.styles, r$2`
14911
+ return [super.styles, i$2`
15448
14912
  :host {
15449
14913
  display: inline-block;
15450
14914
  }
@@ -15731,7 +15195,6 @@ class DetectableTable extends DetectableElement {
15731
15195
  this.crPayoff = undefined; // Correct Rejection payoff
15732
15196
  this.faPayoff = undefined; // False Alarm payoff
15733
15197
  }
15734
-
15735
15198
  alignState() {
15736
15199
  this.hr = SDTMath.hM2Hr(this.h, this.m);
15737
15200
  this.far = SDTMath.faCr2Far(this.fa, this.cr);
@@ -15838,7 +15301,7 @@ class DetectableTable extends DetectableElement {
15838
15301
  this.sendEvent();
15839
15302
  }
15840
15303
  static get styles() {
15841
- return [super.styles, r$2`
15304
+ return [super.styles, i$2`
15842
15305
  :host {
15843
15306
  display: inline-block;
15844
15307
  }
@@ -16211,7 +15674,7 @@ class SDTEquation extends DetectableElement {
16211
15674
  this.numeric = false;
16212
15675
  }
16213
15676
  static get styles() {
16214
- return [super.styles, r$2`
15677
+ return [super.styles, i$2`
16215
15678
  :host {
16216
15679
  display: block;
16217
15680
 
@@ -17566,7 +17029,7 @@ customElements.define('sdt-equation-mcr2fomr', SDTEquationMCr2Fomr);
17566
17029
  */
17567
17030
  class SDTExample extends DetectableElement {
17568
17031
  static get styles() {
17569
- return [super.styles, r$2`
17032
+ return [super.styles, i$2`
17570
17033
  :host {
17571
17034
  display: inline-block;
17572
17035