@decidables/detectable-elements 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,21 +9,21 @@
9
9
  * Copyright 2019 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
11
  */
12
- const t$2 = window,
13
- e$4 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
14
- s$5 = Symbol(),
15
- n$5 = new WeakMap();
16
- let o$5 = class o {
12
+ const t$1 = window,
13
+ e$2 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
14
+ s$3 = Symbol(),
15
+ n$3 = new WeakMap();
16
+ let o$3 = class o {
17
17
  constructor(t, e, n) {
18
- if (this._$cssResult$ = !0, n !== s$5) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
18
+ if (this._$cssResult$ = !0, n !== s$3) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
19
19
  this.cssText = t, this.t = e;
20
20
  }
21
21
  get styleSheet() {
22
22
  let t = this.o;
23
23
  const s = this.t;
24
- if (e$4 && void 0 === t) {
24
+ if (e$2 && void 0 === t) {
25
25
  const e = void 0 !== s && 1 === s.length;
26
- e && (t = n$5.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$5.set(s, t));
26
+ e && (t = n$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$3.set(s, t));
27
27
  }
28
28
  return t;
29
29
  }
@@ -31,18 +31,26 @@
31
31
  return this.cssText;
32
32
  }
33
33
  };
34
- const r$4 = t => new o$5("string" == typeof t ? t : t + "", void 0, s$5),
35
- S$2 = (s, n) => {
36
- e$4 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
34
+ const r$2 = t => new o$3("string" == typeof t ? t : t + "", void 0, s$3),
35
+ i$1 = (t, ...e) => {
36
+ const n = 1 === t.length ? t[0] : e.reduce((e, s, n) => e + (t => {
37
+ if (!0 === t._$cssResult$) return t.cssText;
38
+ if ("number" == typeof t) return t;
39
+ 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.");
40
+ })(s) + t[n + 1], t[0]);
41
+ return new o$3(n, t, s$3);
42
+ },
43
+ S$1 = (s, n) => {
44
+ e$2 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
37
45
  const n = document.createElement("style"),
38
- o = t$2.litNonce;
46
+ o = t$1.litNonce;
39
47
  void 0 !== o && n.setAttribute("nonce", o), n.textContent = e.cssText, s.appendChild(n);
40
48
  });
41
49
  },
42
- c$1 = e$4 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
50
+ c$1 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
43
51
  let e = "";
44
52
  for (const s of t.cssRules) e += s.cssText;
45
- return r$4(e);
53
+ return r$2(e);
46
54
  })(t) : t;
47
55
 
48
56
  /**
@@ -50,16 +58,16 @@
50
58
  * Copyright 2017 Google LLC
51
59
  * SPDX-License-Identifier: BSD-3-Clause
52
60
  */
53
- var s$4;
54
- const e$3 = window,
55
- r$3 = e$3.trustedTypes,
56
- h$2 = r$3 ? r$3.emptyScript : "",
57
- o$4 = e$3.reactiveElementPolyfillSupport,
58
- n$4 = {
61
+ var s$2;
62
+ const e$1 = window,
63
+ r$1 = e$1.trustedTypes,
64
+ h$1 = r$1 ? r$1.emptyScript : "",
65
+ o$2 = e$1.reactiveElementPolyfillSupport,
66
+ n$2 = {
59
67
  toAttribute(t, i) {
60
68
  switch (i) {
61
69
  case Boolean:
62
- t = t ? h$2 : null;
70
+ t = t ? h$1 : null;
63
71
  break;
64
72
  case Object:
65
73
  case Array:
@@ -87,17 +95,18 @@
87
95
  return s;
88
96
  }
89
97
  },
90
- a$2 = (t, i) => i !== t && (i == i || t == t),
91
- l$4 = {
98
+ a$1 = (t, i) => i !== t && (i == i || t == t),
99
+ l$3 = {
92
100
  attribute: !0,
93
101
  type: String,
94
- converter: n$4,
102
+ converter: n$2,
95
103
  reflect: !1,
96
- hasChanged: a$2
97
- };
98
- let d$1 = class d extends HTMLElement {
104
+ hasChanged: a$1
105
+ },
106
+ d$1 = "finalized";
107
+ let u$1 = class u extends HTMLElement {
99
108
  constructor() {
100
- super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
109
+ super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
101
110
  }
102
111
  static addInitializer(t) {
103
112
  var i;
@@ -111,7 +120,7 @@
111
120
  void 0 !== e && (this._$Ev.set(e, s), t.push(e));
112
121
  }), t;
113
122
  }
114
- static createProperty(t, i = l$4) {
123
+ static createProperty(t, i = l$3) {
115
124
  if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
116
125
  const s = "symbol" == typeof t ? Symbol() : "__" + t,
117
126
  e = this.getPropertyDescriptor(t, s, i);
@@ -132,11 +141,11 @@
132
141
  };
133
142
  }
134
143
  static getPropertyOptions(t) {
135
- return this.elementProperties.get(t) || l$4;
144
+ return this.elementProperties.get(t) || l$3;
136
145
  }
137
146
  static finalize() {
138
- if (this.hasOwnProperty("finalized")) return !1;
139
- this.finalized = !0;
147
+ if (this.hasOwnProperty(d$1)) return !1;
148
+ this[d$1] = !0;
140
149
  const t = Object.getPrototypeOf(this);
141
150
  if (t.finalize(), void 0 !== t.h && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = new Map(), this.hasOwnProperty("properties")) {
142
151
  const t = this.properties,
@@ -157,7 +166,7 @@
157
166
  const s = i.attribute;
158
167
  return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
159
168
  }
160
- u() {
169
+ _$Eu() {
161
170
  var t;
162
171
  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));
163
172
  }
@@ -177,7 +186,7 @@
177
186
  createRenderRoot() {
178
187
  var t;
179
188
  const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
180
- return S$2(s, this.constructor.elementStyles), s;
189
+ return S$1(s, this.constructor.elementStyles), s;
181
190
  }
182
191
  connectedCallback() {
183
192
  var t;
@@ -197,11 +206,11 @@
197
206
  attributeChangedCallback(t, i, s) {
198
207
  this._$AK(t, s);
199
208
  }
200
- _$EO(t, i, s = l$4) {
209
+ _$EO(t, i, s = l$3) {
201
210
  var e;
202
211
  const r = this.constructor._$Ep(t, s);
203
212
  if (void 0 !== r && !0 === s.reflect) {
204
- const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$4).toAttribute(i, s.type);
213
+ const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$2).toAttribute(i, s.type);
205
214
  this._$El = t, null == h ? this.removeAttribute(r) : this.setAttribute(r, h), this._$El = null;
206
215
  }
207
216
  }
@@ -213,13 +222,13 @@
213
222
  const t = e.getPropertyOptions(r),
214
223
  h = "function" == typeof t.converter ? {
215
224
  fromAttribute: t.converter
216
- } : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$4;
225
+ } : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$2;
217
226
  this._$El = r, this[r] = h.fromAttribute(i, t.type), this._$El = null;
218
227
  }
219
228
  }
220
229
  requestUpdate(t, i, s) {
221
230
  let e = !0;
222
- void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || a$2)(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());
231
+ void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || a$1)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$El !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$E_ = this._$Ej());
223
232
  }
224
233
  async _$Ej() {
225
234
  this.isUpdatePending = !0;
@@ -276,37 +285,37 @@
276
285
  updated(t) {}
277
286
  firstUpdated(t) {}
278
287
  };
279
- d$1.finalized = !0, d$1.elementProperties = new Map(), d$1.elementStyles = [], d$1.shadowRootOptions = {
288
+ u$1[d$1] = !0, u$1.elementProperties = new Map(), u$1.elementStyles = [], u$1.shadowRootOptions = {
280
289
  mode: "open"
281
- }, null == o$4 || o$4({
282
- ReactiveElement: d$1
283
- }), (null !== (s$4 = e$3.reactiveElementVersions) && void 0 !== s$4 ? s$4 : e$3.reactiveElementVersions = []).push("1.6.1");
290
+ }, null == o$2 || o$2({
291
+ ReactiveElement: u$1
292
+ }), (null !== (s$2 = e$1.reactiveElementVersions) && void 0 !== s$2 ? s$2 : e$1.reactiveElementVersions = []).push("1.6.3");
284
293
 
285
294
  /**
286
295
  * @license
287
296
  * Copyright 2017 Google LLC
288
297
  * SPDX-License-Identifier: BSD-3-Clause
289
298
  */
290
- var t$1;
291
- const i$1 = window,
292
- s$3 = i$1.trustedTypes,
293
- e$2 = s$3 ? s$3.createPolicy("lit-html", {
299
+ var t;
300
+ const i = window,
301
+ s$1 = i.trustedTypes,
302
+ e = s$1 ? s$1.createPolicy("lit-html", {
294
303
  createHTML: t => t
295
304
  }) : void 0,
296
- o$3 = "$lit$",
297
- n$3 = `lit$${(Math.random() + "").slice(9)}$`,
298
- l$3 = "?" + n$3,
299
- h$1 = `<${l$3}>`,
300
- r$2 = document,
301
- d = () => r$2.createComment(""),
302
- u = t => null === t || "object" != typeof t && "function" != typeof t,
305
+ o$1 = "$lit$",
306
+ n$1 = `lit$${(Math.random() + "").slice(9)}$`,
307
+ l$2 = "?" + n$1,
308
+ h = `<${l$2}>`,
309
+ r = document,
310
+ u = () => r.createComment(""),
311
+ d = t => null === t || "object" != typeof t && "function" != typeof t,
303
312
  c = Array.isArray,
304
313
  v = t => c(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
305
- a$1 = "[ \t\n\f\r]",
314
+ a = "[ \t\n\f\r]",
306
315
  f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
307
316
  _ = /-->/g,
308
317
  m = />/g,
309
- p = RegExp(`>|${a$1}(?:([^\\s"'>=/]+)(${a$1}*=${a$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
318
+ p = RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
310
319
  g = /'/g,
311
320
  $ = /"/g,
312
321
  y$1 = /^(?:script|style|textarea|title)$/i,
@@ -320,28 +329,30 @@
320
329
  T = Symbol.for("lit-noChange"),
321
330
  A = Symbol.for("lit-nothing"),
322
331
  E = new WeakMap(),
323
- C = r$2.createTreeWalker(r$2, 129, null, !1),
324
- P = (t, i) => {
325
- const s = t.length - 1,
326
- l = [];
327
- let r,
328
- d = 2 === i ? "<svg>" : "",
329
- u = f;
330
- for (let i = 0; i < s; i++) {
331
- const s = t[i];
332
- let e,
333
- c,
334
- v = -1,
335
- a = 0;
336
- 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);
337
- const w = u === p && t[i + 1].startsWith("/>") ? " " : "";
338
- d += u === f ? s + h$1 : v >= 0 ? (l.push(e), s.slice(0, v) + o$3 + s.slice(v) + n$3 + w) : s + n$3 + (-2 === v ? (l.push(void 0), i) : w);
339
- }
340
- const c = d + (t[s] || "<?>") + (2 === i ? "</svg>" : "");
341
- if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
342
- return [void 0 !== e$2 ? e$2.createHTML(c) : c, l];
343
- };
344
- class V {
332
+ C = r.createTreeWalker(r, 129, null, !1);
333
+ function P(t, i) {
334
+ if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
335
+ return void 0 !== e ? e.createHTML(i) : i;
336
+ }
337
+ const V = (t, i) => {
338
+ const s = t.length - 1,
339
+ e = [];
340
+ let l,
341
+ r = 2 === i ? "<svg>" : "",
342
+ u = f;
343
+ for (let i = 0; i < s; i++) {
344
+ const s = t[i];
345
+ let d,
346
+ c,
347
+ v = -1,
348
+ a = 0;
349
+ for (; a < s.length && (u.lastIndex = a, c = u.exec(s), null !== c);) a = u.lastIndex, u === f ? "!--" === c[1] ? u = _ : void 0 !== c[1] ? u = m : void 0 !== c[2] ? (y$1.test(c[2]) && (l = RegExp("</" + c[2], "g")), u = p) : void 0 !== c[3] && (u = p) : u === p ? ">" === c[0] ? (u = null != l ? l : f, v = -1) : void 0 === c[1] ? v = -2 : (v = u.lastIndex - c[2].length, d = c[1], u = void 0 === c[3] ? p : '"' === c[3] ? $ : g) : u === $ || u === g ? u = p : u === _ || u === m ? u = f : (u = p, l = void 0);
350
+ const w = u === p && t[i + 1].startsWith("/>") ? " " : "";
351
+ r += u === f ? s + h : v >= 0 ? (e.push(d), s.slice(0, v) + o$1 + s.slice(v) + n$1 + w) : s + n$1 + (-2 === v ? (e.push(void 0), i) : w);
352
+ }
353
+ return [P(t, r + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), e];
354
+ };
355
+ class N {
345
356
  constructor({
346
357
  strings: t,
347
358
  _$litType$: i
@@ -349,11 +360,11 @@
349
360
  let h;
350
361
  this.parts = [];
351
362
  let r = 0,
352
- u = 0;
363
+ d = 0;
353
364
  const c = t.length - 1,
354
365
  v = this.parts,
355
- [a, f] = P(t, i);
356
- if (this.el = V.createElement(a, e), C.currentNode = this.el.content, 2 === i) {
366
+ [a, f] = V(t, i);
367
+ if (this.el = N.createElement(a, e), C.currentNode = this.el.content, 2 === i) {
357
368
  const t = this.el.content,
358
369
  i = t.firstChild;
359
370
  i.remove(), t.append(...i.childNodes);
@@ -362,17 +373,17 @@
362
373
  if (1 === h.nodeType) {
363
374
  if (h.hasAttributes()) {
364
375
  const t = [];
365
- for (const i of h.getAttributeNames()) if (i.endsWith(o$3) || i.startsWith(n$3)) {
366
- const s = f[u++];
376
+ for (const i of h.getAttributeNames()) if (i.endsWith(o$1) || i.startsWith(n$1)) {
377
+ const s = f[d++];
367
378
  if (t.push(i), void 0 !== s) {
368
- const t = h.getAttribute(s.toLowerCase() + o$3).split(n$3),
379
+ const t = h.getAttribute(s.toLowerCase() + o$1).split(n$1),
369
380
  i = /([.?@])?(.*)/.exec(s);
370
381
  v.push({
371
382
  type: 1,
372
383
  index: r,
373
384
  name: i[2],
374
385
  strings: t,
375
- ctor: "." === i[1] ? k : "?" === i[1] ? I : "@" === i[1] ? L : R
386
+ ctor: "." === i[1] ? H : "?" === i[1] ? L : "@" === i[1] ? z : k
376
387
  });
377
388
  } else v.push({
378
389
  type: 6,
@@ -382,45 +393,45 @@
382
393
  for (const i of t) h.removeAttribute(i);
383
394
  }
384
395
  if (y$1.test(h.tagName)) {
385
- const t = h.textContent.split(n$3),
396
+ const t = h.textContent.split(n$1),
386
397
  i = t.length - 1;
387
398
  if (i > 0) {
388
- h.textContent = s$3 ? s$3.emptyScript : "";
389
- for (let s = 0; s < i; s++) h.append(t[s], d()), C.nextNode(), v.push({
399
+ h.textContent = s$1 ? s$1.emptyScript : "";
400
+ for (let s = 0; s < i; s++) h.append(t[s], u()), C.nextNode(), v.push({
390
401
  type: 2,
391
402
  index: ++r
392
403
  });
393
- h.append(t[i], d());
404
+ h.append(t[i], u());
394
405
  }
395
406
  }
396
- } else if (8 === h.nodeType) if (h.data === l$3) v.push({
407
+ } else if (8 === h.nodeType) if (h.data === l$2) v.push({
397
408
  type: 2,
398
409
  index: r
399
410
  });else {
400
411
  let t = -1;
401
- for (; -1 !== (t = h.data.indexOf(n$3, t + 1));) v.push({
412
+ for (; -1 !== (t = h.data.indexOf(n$1, t + 1));) v.push({
402
413
  type: 7,
403
414
  index: r
404
- }), t += n$3.length - 1;
415
+ }), t += n$1.length - 1;
405
416
  }
406
417
  r++;
407
418
  }
408
419
  }
409
420
  static createElement(t, i) {
410
- const s = r$2.createElement("template");
421
+ const s = r.createElement("template");
411
422
  return s.innerHTML = t, s;
412
423
  }
413
424
  }
414
- function N(t, i, s = t, e) {
425
+ function S(t, i, s = t, e) {
415
426
  var o, n, l, h;
416
427
  if (i === T) return i;
417
428
  let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
418
- const d = u(i) ? void 0 : i._$litDirective$;
419
- 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;
429
+ const u = d(i) ? void 0 : i._$litDirective$;
430
+ return (null == r ? void 0 : r.constructor) !== u && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === u ? r = void 0 : (r = new u(t), r._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Co) && void 0 !== l ? l : h._$Co = [])[e] = r : s._$Cl = r), void 0 !== r && (i = S(t, r._$AS(t, i.values), r, e)), i;
420
431
  }
421
- let S$1 = class S {
432
+ class M {
422
433
  constructor(t, i) {
423
- this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
434
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
424
435
  }
425
436
  get parentNode() {
426
437
  return this._$AM.parentNode;
@@ -428,7 +439,7 @@
428
439
  get _$AU() {
429
440
  return this._$AM._$AU;
430
441
  }
431
- v(t) {
442
+ u(t) {
432
443
  var i;
433
444
  const {
434
445
  el: {
@@ -436,34 +447,34 @@
436
447
  },
437
448
  parts: e
438
449
  } = this._$AD,
439
- o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r$2).importNode(s, !0);
450
+ o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r).importNode(s, !0);
440
451
  C.currentNode = o;
441
452
  let n = C.nextNode(),
442
453
  l = 0,
443
454
  h = 0,
444
- d = e[0];
445
- for (; void 0 !== d;) {
446
- if (l === d.index) {
455
+ u = e[0];
456
+ for (; void 0 !== u;) {
457
+ if (l === u.index) {
447
458
  let i;
448
- 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];
459
+ 2 === u.type ? i = new R(n, n.nextSibling, this, t) : 1 === u.type ? i = new u.ctor(n, u.name, u.strings, this, t) : 6 === u.type && (i = new Z(n, this, t)), this._$AV.push(i), u = e[++h];
449
460
  }
450
- l !== (null == d ? void 0 : d.index) && (n = C.nextNode(), l++);
461
+ l !== (null == u ? void 0 : u.index) && (n = C.nextNode(), l++);
451
462
  }
452
- return o;
463
+ return C.currentNode = r, o;
453
464
  }
454
- p(t) {
465
+ v(t) {
455
466
  let i = 0;
456
- 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++;
467
+ 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++;
457
468
  }
458
- };
459
- class M {
469
+ }
470
+ class R {
460
471
  constructor(t, i, s, e) {
461
472
  var o;
462
- 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;
473
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cp = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
463
474
  }
464
475
  get _$AU() {
465
476
  var t, i;
466
- return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cm;
477
+ return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cp;
467
478
  }
468
479
  get parentNode() {
469
480
  let t = this._$AA.parentNode;
@@ -477,40 +488,40 @@
477
488
  return this._$AB;
478
489
  }
479
490
  _$AI(t, i = this) {
480
- 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);
491
+ t = S(this, t, i), d(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== T && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : v(t) ? this.T(t) : this._(t);
481
492
  }
482
- S(t) {
493
+ k(t) {
483
494
  return this._$AA.parentNode.insertBefore(t, this._$AB);
484
495
  }
485
- T(t) {
486
- this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
496
+ $(t) {
497
+ this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
487
498
  }
488
- g(t) {
489
- this._$AH !== A && u(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$2.createTextNode(t)), this._$AH = t;
499
+ _(t) {
500
+ this._$AH !== A && d(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r.createTextNode(t)), this._$AH = t;
490
501
  }
491
- $(t) {
502
+ g(t) {
492
503
  var i;
493
504
  const {
494
505
  values: s,
495
506
  _$litType$: e
496
507
  } = t,
497
- o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = V.createElement(e.h, this.options)), e);
498
- if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.p(s);else {
499
- const t = new S$1(o, this),
500
- i = t.v(this.options);
501
- t.p(s), this.T(i), this._$AH = t;
508
+ o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = N.createElement(P(e.h, e.h[0]), this.options)), e);
509
+ if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.v(s);else {
510
+ const t = new M(o, this),
511
+ i = t.u(this.options);
512
+ t.v(s), this.$(i), this._$AH = t;
502
513
  }
503
514
  }
504
515
  _$AC(t) {
505
516
  let i = E.get(t.strings);
506
- return void 0 === i && E.set(t.strings, i = new V(t)), i;
517
+ return void 0 === i && E.set(t.strings, i = new N(t)), i;
507
518
  }
508
- k(t) {
519
+ T(t) {
509
520
  c(this._$AH) || (this._$AH = [], this._$AR());
510
521
  const i = this._$AH;
511
522
  let s,
512
523
  e = 0;
513
- 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 o of t) e === i.length ? i.push(s = new R(this.k(u()), this.k(u()), this, this.options)) : s = i[e], s._$AI(o), e++;
514
525
  e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
515
526
  }
516
527
  _$AR(t = this._$AA.nextSibling, i) {
@@ -522,10 +533,10 @@
522
533
  }
523
534
  setConnected(t) {
524
535
  var i;
525
- void 0 === this._$AM && (this._$Cm = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
536
+ void 0 === this._$AM && (this._$Cp = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
526
537
  }
527
538
  }
528
- class R {
539
+ class k {
529
540
  constructor(t, i, s, e, o) {
530
541
  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;
531
542
  }
@@ -538,10 +549,10 @@
538
549
  _$AI(t, i = this, s, e) {
539
550
  const o = this.strings;
540
551
  let n = !1;
541
- if (void 0 === o) t = N(this, t, i, 0), n = !u(t) || t !== this._$AH && t !== T, n && (this._$AH = t);else {
552
+ if (void 0 === o) t = S(this, t, i, 0), n = !d(t) || t !== this._$AH && t !== T, n && (this._$AH = t);else {
542
553
  const e = t;
543
554
  let l, h;
544
- 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;
555
+ for (t = o[0], l = 0; l < o.length - 1; l++) h = S(this, e[s + l], i, l), h === T && (h = this._$AH[l]), n || (n = !d(h) || h !== this._$AH[l]), h === A ? t = A : t !== A && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
545
556
  }
546
557
  n && !e && this.j(t);
547
558
  }
@@ -549,7 +560,7 @@
549
560
  t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
550
561
  }
551
562
  }
552
- class k extends R {
563
+ class H extends k {
553
564
  constructor() {
554
565
  super(...arguments), this.type = 3;
555
566
  }
@@ -557,22 +568,22 @@
557
568
  this.element[this.name] = t === A ? void 0 : t;
558
569
  }
559
570
  }
560
- const H = s$3 ? s$3.emptyScript : "";
561
- class I extends R {
571
+ const I = s$1 ? s$1.emptyScript : "";
572
+ class L extends k {
562
573
  constructor() {
563
574
  super(...arguments), this.type = 4;
564
575
  }
565
576
  j(t) {
566
- t && t !== A ? this.element.setAttribute(this.name, H) : this.element.removeAttribute(this.name);
577
+ t && t !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name);
567
578
  }
568
579
  }
569
- class L extends R {
580
+ class z extends k {
570
581
  constructor(t, i, s, e, o) {
571
582
  super(t, i, s, e, o), this.type = 5;
572
583
  }
573
584
  _$AI(t, i = this) {
574
585
  var s;
575
- if ((t = null !== (s = N(this, t, i, 0)) && void 0 !== s ? s : A) === T) return;
586
+ if ((t = null !== (s = S(this, t, i, 0)) && void 0 !== s ? s : A) === T) return;
576
587
  const e = this._$AH,
577
588
  o = t === A && e !== A || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
578
589
  n = t !== A && (e === A || o);
@@ -583,7 +594,7 @@
583
594
  "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);
584
595
  }
585
596
  }
586
- class z {
597
+ class Z {
587
598
  constructor(t, i, s) {
588
599
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
589
600
  }
@@ -591,307 +602,29 @@
591
602
  return this._$AM._$AU;
592
603
  }
593
604
  _$AI(t) {
594
- N(this, t);
605
+ S(this, t);
595
606
  }
596
607
  }
597
- const j = i$1.litHtmlPolyfillSupport;
598
- null == j || j(V, M), (null !== (t$1 = i$1.litHtmlVersions) && void 0 !== t$1 ? t$1 : i$1.litHtmlVersions = []).push("2.7.0");
599
- const B = (t, i, s) => {
608
+ const B = i.litHtmlPolyfillSupport;
609
+ null == B || B(N, R), (null !== (t = i.litHtmlVersions) && void 0 !== t ? t : i.litHtmlVersions = []).push("2.8.0");
610
+ const D = (t, i, s) => {
600
611
  var e, o;
601
612
  const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
602
613
  let l = n._$litPart$;
603
614
  if (void 0 === l) {
604
615
  const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
605
- n._$litPart$ = l = new M(i.insertBefore(d(), t), t, void 0, null != s ? s : {});
616
+ n._$litPart$ = l = new R(i.insertBefore(u(), t), t, void 0, null != s ? s : {});
606
617
  }
607
618
  return l._$AI(t), l;
608
619
  };
609
620
 
610
- /**
611
- * @license
612
- * Copyright 2019 Google LLC
613
- * SPDX-License-Identifier: BSD-3-Clause
614
- */
615
- const t = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
616
- e$1 = Symbol(),
617
- n$2 = new Map();
618
- let s$2 = class s {
619
- constructor(t, n) {
620
- if (this._$cssResult$ = !0, n !== e$1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
621
- this.cssText = t;
622
- }
623
- get styleSheet() {
624
- let e = n$2.get(this.cssText);
625
- return t && void 0 === e && (n$2.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
626
- }
627
- toString() {
628
- return this.cssText;
629
- }
630
- };
631
- const o$2 = t => new s$2("string" == typeof t ? t : t + "", e$1),
632
- r$1 = (t, ...n) => {
633
- const o = 1 === t.length ? t[0] : n.reduce((e, n, s) => e + (t => {
634
- if (!0 === t._$cssResult$) return t.cssText;
635
- if ("number" == typeof t) return t;
636
- 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.");
637
- })(n) + t[s + 1], t[0]);
638
- return new s$2(o, e$1);
639
- },
640
- i = (e, n) => {
641
- t ? e.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(t => {
642
- const n = document.createElement("style"),
643
- s = window.litNonce;
644
- void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
645
- });
646
- },
647
- S = t ? t => t : t => t instanceof CSSStyleSheet ? (t => {
648
- let e = "";
649
- for (const n of t.cssRules) e += n.cssText;
650
- return o$2(e);
651
- })(t) : t;
652
-
653
- /**
654
- * @license
655
- * Copyright 2017 Google LLC
656
- * SPDX-License-Identifier: BSD-3-Clause
657
- */
658
- var s$1;
659
- const e = window.trustedTypes,
660
- r = e ? e.emptyScript : "",
661
- h = window.reactiveElementPolyfillSupport,
662
- o$1 = {
663
- toAttribute(t, i) {
664
- switch (i) {
665
- case Boolean:
666
- t = t ? r : null;
667
- break;
668
- case Object:
669
- case Array:
670
- t = null == t ? t : JSON.stringify(t);
671
- }
672
- return t;
673
- },
674
- fromAttribute(t, i) {
675
- let s = t;
676
- switch (i) {
677
- case Boolean:
678
- s = null !== t;
679
- break;
680
- case Number:
681
- s = null === t ? null : Number(t);
682
- break;
683
- case Object:
684
- case Array:
685
- try {
686
- s = JSON.parse(t);
687
- } catch (t) {
688
- s = null;
689
- }
690
- }
691
- return s;
692
- }
693
- },
694
- n$1 = (t, i) => i !== t && (i == i || t == t),
695
- l$2 = {
696
- attribute: !0,
697
- type: String,
698
- converter: o$1,
699
- reflect: !1,
700
- hasChanged: n$1
701
- };
702
- class a extends HTMLElement {
703
- constructor() {
704
- super(), this._$Et = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$Ei = null, this.o();
705
- }
706
- static addInitializer(t) {
707
- var i;
708
- null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
709
- }
710
- static get observedAttributes() {
711
- this.finalize();
712
- const t = [];
713
- return this.elementProperties.forEach((i, s) => {
714
- const e = this._$Eh(s, i);
715
- void 0 !== e && (this._$Eu.set(e, s), t.push(e));
716
- }), t;
717
- }
718
- static createProperty(t, i = l$2) {
719
- if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
720
- const s = "symbol" == typeof t ? Symbol() : "__" + t,
721
- e = this.getPropertyDescriptor(t, s, i);
722
- void 0 !== e && Object.defineProperty(this.prototype, t, e);
723
- }
724
- }
725
- static getPropertyDescriptor(t, i, s) {
726
- return {
727
- get() {
728
- return this[i];
729
- },
730
- set(e) {
731
- const r = this[t];
732
- this[i] = e, this.requestUpdate(t, r, s);
733
- },
734
- configurable: !0,
735
- enumerable: !0
736
- };
737
- }
738
- static getPropertyOptions(t) {
739
- return this.elementProperties.get(t) || l$2;
740
- }
741
- static finalize() {
742
- if (this.hasOwnProperty("finalized")) return !1;
743
- this.finalized = !0;
744
- const t = Object.getPrototypeOf(this);
745
- if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
746
- const t = this.properties,
747
- i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
748
- for (const s of i) this.createProperty(s, t[s]);
749
- }
750
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
751
- }
752
- static finalizeStyles(i) {
753
- const s = [];
754
- if (Array.isArray(i)) {
755
- const e = new Set(i.flat(1 / 0).reverse());
756
- for (const i of e) s.unshift(S(i));
757
- } else void 0 !== i && s.push(S(i));
758
- return s;
759
- }
760
- static _$Eh(t, i) {
761
- const s = i.attribute;
762
- return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
763
- }
764
- o() {
765
- var t;
766
- 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));
767
- }
768
- addController(t) {
769
- var i, s;
770
- (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));
771
- }
772
- removeController(t) {
773
- var i;
774
- null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
775
- }
776
- _$Em() {
777
- this.constructor.elementProperties.forEach((t, i) => {
778
- this.hasOwnProperty(i) && (this._$Et.set(i, this[i]), delete this[i]);
779
- });
780
- }
781
- createRenderRoot() {
782
- var t;
783
- const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
784
- return i(s, this.constructor.elementStyles), s;
785
- }
786
- connectedCallback() {
787
- var t;
788
- void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
789
- var i;
790
- return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
791
- });
792
- }
793
- enableUpdating(t) {}
794
- disconnectedCallback() {
795
- var t;
796
- null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
797
- var i;
798
- return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
799
- });
800
- }
801
- attributeChangedCallback(t, i, s) {
802
- this._$AK(t, s);
803
- }
804
- _$ES(t, i, s = l$2) {
805
- var e, r;
806
- const h = this.constructor._$Eh(t, s);
807
- if (void 0 !== h && !0 === s.reflect) {
808
- const n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$1.toAttribute)(i, s.type);
809
- this._$Ei = t, null == n ? this.removeAttribute(h) : this.setAttribute(h, n), this._$Ei = null;
810
- }
811
- }
812
- _$AK(t, i) {
813
- var s, e, r;
814
- const h = this.constructor,
815
- n = h._$Eu.get(t);
816
- if (void 0 !== n && this._$Ei !== n) {
817
- const t = h.getPropertyOptions(n),
818
- l = t.converter,
819
- 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$1.fromAttribute;
820
- this._$Ei = n, this[n] = a(i, t.type), this._$Ei = null;
821
- }
822
- }
823
- requestUpdate(t, i, s) {
824
- let e = !0;
825
- void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$1)(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_());
826
- }
827
- async _$E_() {
828
- this.isUpdatePending = !0;
829
- try {
830
- await this._$Ep;
831
- } catch (t) {
832
- Promise.reject(t);
833
- }
834
- const t = this.scheduleUpdate();
835
- return null != t && (await t), !this.isUpdatePending;
836
- }
837
- scheduleUpdate() {
838
- return this.performUpdate();
839
- }
840
- performUpdate() {
841
- var t;
842
- if (!this.isUpdatePending) return;
843
- this.hasUpdated, this._$Et && (this._$Et.forEach((t, i) => this[i] = t), this._$Et = void 0);
844
- let i = !1;
845
- const s = this._$AL;
846
- try {
847
- i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
848
- var i;
849
- return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
850
- }), this.update(s)) : this._$EU();
851
- } catch (t) {
852
- throw i = !1, this._$EU(), t;
853
- }
854
- i && this._$AE(s);
855
- }
856
- willUpdate(t) {}
857
- _$AE(t) {
858
- var i;
859
- null === (i = this._$Eg) || void 0 === i || i.forEach(t => {
860
- var i;
861
- return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
862
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
863
- }
864
- _$EU() {
865
- this._$AL = new Map(), this.isUpdatePending = !1;
866
- }
867
- get updateComplete() {
868
- return this.getUpdateComplete();
869
- }
870
- getUpdateComplete() {
871
- return this._$Ep;
872
- }
873
- shouldUpdate(t) {
874
- return !0;
875
- }
876
- update(t) {
877
- void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$ES(i, this[i], t)), this._$EC = void 0), this._$EU();
878
- }
879
- updated(t) {}
880
- firstUpdated(t) {}
881
- }
882
- a.finalized = !0, a.elementProperties = new Map(), a.elementStyles = [], a.shadowRootOptions = {
883
- mode: "open"
884
- }, null == h || h({
885
- ReactiveElement: a
886
- }), (null !== (s$1 = globalThis.reactiveElementVersions) && void 0 !== s$1 ? s$1 : globalThis.reactiveElementVersions = []).push("1.3.1");
887
-
888
621
  /**
889
622
  * @license
890
623
  * Copyright 2017 Google LLC
891
624
  * SPDX-License-Identifier: BSD-3-Clause
892
625
  */
893
626
  var l$1, o;
894
- class s extends a {
627
+ class s extends u$1 {
895
628
  constructor() {
896
629
  super(...arguments), this.renderOptions = {
897
630
  host: this
@@ -904,7 +637,7 @@
904
637
  }
905
638
  update(t) {
906
639
  const i = this.render();
907
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(i, this.renderRoot, this.renderOptions);
640
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = D(i, this.renderRoot, this.renderOptions);
908
641
  }
909
642
  connectedCallback() {
910
643
  var t;
@@ -925,20 +658,32 @@
925
658
  null == n || n({
926
659
  LitElement: s
927
660
  });
928
- (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.0");
661
+ (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.3");
929
662
 
930
663
  function ascending$2(a, b) {
931
664
  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
932
665
  }
933
666
 
667
+ function descending(a, b) {
668
+ return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
669
+ }
670
+
934
671
  function bisector(f) {
935
- let delta = f;
936
- let compare1 = f;
937
- let compare2 = f;
672
+ let compare1, compare2, delta;
673
+
674
+ // If an accessor is specified, promote it to a comparator. In this case we
675
+ // can test whether the search value is (self-) comparable. We can’t do this
676
+ // for a comparator (except for specific, known comparators) because we can’t
677
+ // tell if the comparator is symmetric, and an asymmetric comparator can’t be
678
+ // used to test whether a single value is comparable.
938
679
  if (f.length !== 2) {
939
- delta = (d, x) => f(d) - x;
940
680
  compare1 = ascending$2;
941
681
  compare2 = (d, x) => ascending$2(f(d), x);
682
+ delta = (d, x) => f(d) - x;
683
+ } else {
684
+ compare1 = f === ascending$2 || f === descending ? f : zero$1;
685
+ compare2 = f;
686
+ delta = f;
942
687
  }
943
688
  function left(a, x, lo = 0, hi = a.length) {
944
689
  if (lo < hi) {
@@ -970,6 +715,9 @@
970
715
  right
971
716
  };
972
717
  }
718
+ function zero$1() {
719
+ return 0;
720
+ }
973
721
 
974
722
  function number$2(x) {
975
723
  return x === null ? NaN : +x;
@@ -980,7 +728,7 @@
980
728
  bisector(number$2).center;
981
729
  var bisect = bisectRight;
982
730
 
983
- function count$1(values, valueof) {
731
+ function count(values, valueof) {
984
732
  let count = 0;
985
733
  if (valueof === undefined) {
986
734
  for (let value of values) {
@@ -999,7 +747,7 @@
999
747
  return count;
1000
748
  }
1001
749
 
1002
- function extent$1(values, valueof) {
750
+ function extent(values, valueof) {
1003
751
  let min;
1004
752
  let max;
1005
753
  if (valueof === undefined) {
@@ -1086,56 +834,63 @@
1086
834
  return () => x;
1087
835
  }
1088
836
 
1089
- var e10$1 = Math.sqrt(50),
1090
- e5$1 = Math.sqrt(10),
1091
- e2$1 = Math.sqrt(2);
1092
- function ticks$1(start, stop, count) {
1093
- var reverse,
1094
- i = -1,
1095
- n,
1096
- ticks,
1097
- step;
837
+ const e10 = Math.sqrt(50),
838
+ e5 = Math.sqrt(10),
839
+ e2 = Math.sqrt(2);
840
+ function tickSpec(start, stop, count) {
841
+ const step = (stop - start) / Math.max(0, count),
842
+ power = Math.floor(Math.log10(step)),
843
+ error = step / Math.pow(10, power),
844
+ factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
845
+ let i1, i2, inc;
846
+ if (power < 0) {
847
+ inc = Math.pow(10, -power) / factor;
848
+ i1 = Math.round(start * inc);
849
+ i2 = Math.round(stop * inc);
850
+ if (i1 / inc < start) ++i1;
851
+ if (i2 / inc > stop) --i2;
852
+ inc = -inc;
853
+ } else {
854
+ inc = Math.pow(10, power) * factor;
855
+ i1 = Math.round(start / inc);
856
+ i2 = Math.round(stop / inc);
857
+ if (i1 * inc < start) ++i1;
858
+ if (i2 * inc > stop) --i2;
859
+ }
860
+ if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
861
+ return [i1, i2, inc];
862
+ }
863
+ function ticks(start, stop, count) {
1098
864
  stop = +stop, start = +start, count = +count;
1099
- if (start === stop && count > 0) return [start];
1100
- if (reverse = stop < start) n = start, start = stop, stop = n;
1101
- if ((step = tickIncrement$1(start, stop, count)) === 0 || !isFinite(step)) return [];
1102
- if (step > 0) {
1103
- let r0 = Math.round(start / step),
1104
- r1 = Math.round(stop / step);
1105
- if (r0 * step < start) ++r0;
1106
- if (r1 * step > stop) --r1;
1107
- ticks = new Array(n = r1 - r0 + 1);
1108
- while (++i < n) ticks[i] = (r0 + i) * step;
865
+ if (!(count > 0)) return [];
866
+ if (start === stop) return [start];
867
+ const reverse = stop < start,
868
+ [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
869
+ if (!(i2 >= i1)) return [];
870
+ const n = i2 - i1 + 1,
871
+ ticks = new Array(n);
872
+ if (reverse) {
873
+ 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;
1109
874
  } else {
1110
- step = -step;
1111
- let r0 = Math.round(start * step),
1112
- r1 = Math.round(stop * step);
1113
- if (r0 / step < start) ++r0;
1114
- if (r1 / step > stop) --r1;
1115
- ticks = new Array(n = r1 - r0 + 1);
1116
- while (++i < n) ticks[i] = (r0 + i) / step;
1117
- }
1118
- if (reverse) ticks.reverse();
875
+ 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;
876
+ }
1119
877
  return ticks;
1120
878
  }
1121
- function tickIncrement$1(start, stop, count) {
1122
- var step = (stop - start) / Math.max(0, count),
1123
- power = Math.floor(Math.log(step) / Math.LN10),
1124
- error = step / Math.pow(10, power);
1125
- 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);
879
+ function tickIncrement(start, stop, count) {
880
+ stop = +stop, start = +start, count = +count;
881
+ return tickSpec(start, stop, count)[2];
1126
882
  }
1127
- function tickStep$1(start, stop, count) {
1128
- var step0 = Math.abs(stop - start) / Math.max(0, count),
1129
- step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
1130
- error = step0 / step1;
1131
- if (error >= e10$1) step1 *= 10;else if (error >= e5$1) step1 *= 5;else if (error >= e2$1) step1 *= 2;
1132
- return stop < start ? -step1 : step1;
883
+ function tickStep(start, stop, count) {
884
+ stop = +stop, start = +start, count = +count;
885
+ const reverse = stop < start,
886
+ inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);
887
+ return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
1133
888
  }
1134
889
 
1135
890
  function nice(start, stop, count) {
1136
891
  let prestep;
1137
892
  while (true) {
1138
- const step = tickIncrement$1(start, stop, count);
893
+ const step = tickIncrement(start, stop, count);
1139
894
  if (step === prestep || step === 0 || !isFinite(step)) {
1140
895
  return [start, stop];
1141
896
  } else if (step > 0) {
@@ -1149,19 +904,20 @@
1149
904
  }
1150
905
  }
1151
906
 
1152
- function thresholdSturges$1(values) {
1153
- return Math.ceil(Math.log(count$1(values)) / Math.LN2) + 1;
907
+ function thresholdSturges(values) {
908
+ return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);
1154
909
  }
1155
910
 
1156
911
  function bin() {
1157
912
  var value = identity$6,
1158
- domain = extent$1,
1159
- threshold = thresholdSturges$1;
913
+ domain = extent,
914
+ threshold = thresholdSturges;
1160
915
  function histogram(data) {
1161
916
  if (!Array.isArray(data)) data = Array.from(data);
1162
917
  var i,
1163
918
  n = data.length,
1164
919
  x,
920
+ step,
1165
921
  values = new Array(n);
1166
922
  for (i = 0; i < n; ++i) {
1167
923
  values[i] = value(data[i], i, data);
@@ -1176,8 +932,13 @@
1176
932
  if (!Array.isArray(tz)) {
1177
933
  const max = x1,
1178
934
  tn = +tz;
1179
- if (domain === extent$1) [x0, x1] = nice(x0, x1, tn);
1180
- tz = ticks$1(x0, x1, tn);
935
+ if (domain === extent) [x0, x1] = nice(x0, x1, tn);
936
+ tz = ticks(x0, x1, tn);
937
+
938
+ // If the domain is aligned with the first tick (which it will by
939
+ // default), then we can use quantization rather than bisection to bin
940
+ // values, which is substantially faster.
941
+ if (tz[0] <= x0) step = tickIncrement(x0, x1, tn);
1181
942
 
1182
943
  // If the last threshold is coincident with the domain’s upper bound, the
1183
944
  // last bin will be zero-width. If the default domain is used, and this
@@ -1187,8 +948,8 @@
1187
948
  // coerce values or the domain to numbers, and thus must be careful to
1188
949
  // compare order (>=) rather than strict equality (===)!
1189
950
  if (tz[tz.length - 1] >= x1) {
1190
- if (max >= x1 && domain === extent$1) {
1191
- const step = tickIncrement$1(x0, x1, tn);
951
+ if (max >= x1 && domain === extent) {
952
+ const step = tickIncrement(x0, x1, tn);
1192
953
  if (isFinite(step)) {
1193
954
  if (step > 0) {
1194
955
  x1 = (Math.floor(x1 / step) + 1) * step;
@@ -1203,9 +964,13 @@
1203
964
  }
1204
965
 
1205
966
  // Remove any thresholds outside the domain.
1206
- var m = tz.length;
1207
- while (tz[0] <= x0) tz.shift(), --m;
1208
- while (tz[m - 1] > x1) tz.pop(), --m;
967
+ // Be careful not to mutate an array owned by the user!
968
+ var m = tz.length,
969
+ a = 0,
970
+ b = m;
971
+ while (tz[a] <= x0) ++a;
972
+ while (tz[b - 1] > x1) --b;
973
+ if (a || b < m) tz = tz.slice(a, b), m = b - a;
1209
974
  var bins = new Array(m + 1),
1210
975
  bin;
1211
976
 
@@ -1217,10 +982,26 @@
1217
982
  }
1218
983
 
1219
984
  // Assign data to bins by value, ignoring any outside the domain.
1220
- for (i = 0; i < n; ++i) {
1221
- x = values[i];
1222
- if (x != null && x0 <= x && x <= x1) {
1223
- bins[bisect(tz, x, 0, m)].push(data[i]);
985
+ if (isFinite(step)) {
986
+ if (step > 0) {
987
+ for (i = 0; i < n; ++i) {
988
+ if ((x = values[i]) != null && x0 <= x && x <= x1) {
989
+ bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]);
990
+ }
991
+ }
992
+ } else if (step < 0) {
993
+ for (i = 0; i < n; ++i) {
994
+ if ((x = values[i]) != null && x0 <= x && x <= x1) {
995
+ const j = Math.floor((x0 - x) * step);
996
+ bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding
997
+ }
998
+ }
999
+ }
1000
+ } else {
1001
+ for (i = 0; i < n; ++i) {
1002
+ if ((x = values[i]) != null && x0 <= x && x <= x1) {
1003
+ bins[bisect(tz, x, 0, m)].push(data[i]);
1004
+ }
1224
1005
  }
1225
1006
  }
1226
1007
  return bins;
@@ -1232,7 +1013,7 @@
1232
1013
  return arguments.length ? (domain = typeof _ === "function" ? _ : constant$5([_[0], _[1]]), histogram) : domain;
1233
1014
  };
1234
1015
  histogram.thresholds = function (_) {
1235
- return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$5(slice$1.call(_)) : constant$5(_), histogram) : threshold;
1016
+ return arguments.length ? (threshold = typeof _ === "function" ? _ : constant$5(Array.isArray(_) ? slice$1.call(_) : _), histogram) : threshold;
1236
1017
  };
1237
1018
  return histogram;
1238
1019
  }
@@ -2609,15 +2390,15 @@
2609
2390
  var darker = 0.7;
2610
2391
  var brighter = 1 / darker;
2611
2392
  var reI = "\\s*([+-]?\\d+)\\s*",
2612
- reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
2613
- reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
2393
+ reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
2394
+ reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
2614
2395
  reHex = /^#([0-9a-f]{3,8})$/,
2615
- reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
2616
- reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
2617
- reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
2618
- reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
2619
- reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
2620
- reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
2396
+ reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
2397
+ reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
2398
+ reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
2399
+ reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
2400
+ reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
2401
+ reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
2621
2402
  var named = {
2622
2403
  aliceblue: 0xf0f8ff,
2623
2404
  antiquewhite: 0xfaebd7,
@@ -2769,15 +2550,16 @@
2769
2550
  yellowgreen: 0x9acd32
2770
2551
  };
2771
2552
  define(Color, color, {
2772
- copy: function (channels) {
2553
+ copy(channels) {
2773
2554
  return Object.assign(new this.constructor(), this, channels);
2774
2555
  },
2775
- displayable: function () {
2556
+ displayable() {
2776
2557
  return this.rgb().displayable();
2777
2558
  },
2778
2559
  hex: color_formatHex,
2779
2560
  // Deprecated! Use color.formatHex.
2780
2561
  formatHex: color_formatHex,
2562
+ formatHex8: color_formatHex8,
2781
2563
  formatHsl: color_formatHsl,
2782
2564
  formatRgb: color_formatRgb,
2783
2565
  toString: color_formatRgb
@@ -2785,6 +2567,9 @@
2785
2567
  function color_formatHex() {
2786
2568
  return this.rgb().formatHex();
2787
2569
  }
2570
+ function color_formatHex8() {
2571
+ return this.rgb().formatHex8();
2572
+ }
2788
2573
  function color_formatHsl() {
2789
2574
  return hslConvert(this).formatHsl();
2790
2575
  }
@@ -2831,36 +2616,48 @@
2831
2616
  this.opacity = +opacity;
2832
2617
  }
2833
2618
  define(Rgb, rgb, extend(Color, {
2834
- brighter: function (k) {
2619
+ brighter(k) {
2835
2620
  k = k == null ? brighter : Math.pow(brighter, k);
2836
2621
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2837
2622
  },
2838
- darker: function (k) {
2623
+ darker(k) {
2839
2624
  k = k == null ? darker : Math.pow(darker, k);
2840
2625
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2841
2626
  },
2842
- rgb: function () {
2627
+ rgb() {
2843
2628
  return this;
2844
2629
  },
2845
- displayable: function () {
2630
+ clamp() {
2631
+ return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
2632
+ },
2633
+ displayable() {
2846
2634
  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;
2847
2635
  },
2848
2636
  hex: rgb_formatHex,
2849
2637
  // Deprecated! Use color.formatHex.
2850
2638
  formatHex: rgb_formatHex,
2639
+ formatHex8: rgb_formatHex8,
2851
2640
  formatRgb: rgb_formatRgb,
2852
2641
  toString: rgb_formatRgb
2853
2642
  }));
2854
2643
  function rgb_formatHex() {
2855
- return "#" + hex(this.r) + hex(this.g) + hex(this.b);
2644
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
2645
+ }
2646
+ function rgb_formatHex8() {
2647
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
2856
2648
  }
2857
2649
  function rgb_formatRgb() {
2858
- var a = this.opacity;
2859
- a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2860
- 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 + ")");
2650
+ const a = clampa(this.opacity);
2651
+ return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
2652
+ }
2653
+ function clampa(opacity) {
2654
+ return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
2655
+ }
2656
+ function clampi(value) {
2657
+ return Math.max(0, Math.min(255, Math.round(value) || 0));
2861
2658
  }
2862
2659
  function hex(value) {
2863
- value = Math.max(0, Math.min(255, Math.round(value) || 0));
2660
+ value = clampi(value);
2864
2661
  return (value < 16 ? "0" : "") + value.toString(16);
2865
2662
  }
2866
2663
  function hsla(h, s, l, a) {
@@ -2900,15 +2697,15 @@
2900
2697
  this.opacity = +opacity;
2901
2698
  }
2902
2699
  define(Hsl, hsl, extend(Color, {
2903
- brighter: function (k) {
2700
+ brighter(k) {
2904
2701
  k = k == null ? brighter : Math.pow(brighter, k);
2905
2702
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
2906
2703
  },
2907
- darker: function (k) {
2704
+ darker(k) {
2908
2705
  k = k == null ? darker : Math.pow(darker, k);
2909
2706
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
2910
2707
  },
2911
- rgb: function () {
2708
+ rgb() {
2912
2709
  var h = this.h % 360 + (this.h < 0) * 360,
2913
2710
  s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
2914
2711
  l = this.l,
@@ -2916,15 +2713,24 @@
2916
2713
  m1 = 2 * l - m2;
2917
2714
  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);
2918
2715
  },
2919
- displayable: function () {
2716
+ clamp() {
2717
+ return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
2718
+ },
2719
+ displayable() {
2920
2720
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
2921
2721
  },
2922
- formatHsl: function () {
2923
- var a = this.opacity;
2924
- a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2925
- return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
2722
+ formatHsl() {
2723
+ const a = clampa(this.opacity);
2724
+ return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
2926
2725
  }
2927
2726
  }));
2727
+ function clamph(value) {
2728
+ value = (value || 0) % 360;
2729
+ return value < 0 ? value + 360 : value;
2730
+ }
2731
+ function clampt(value) {
2732
+ return Math.max(0, Math.min(1, value || 0));
2733
+ }
2928
2734
 
2929
2735
  /* From FvD 13.37, CSS Color Module Level 3 */
2930
2736
  function hsl2rgb(h, m1, m2) {
@@ -4135,38 +3941,56 @@
4135
3941
  tau$1 = 2 * pi$1,
4136
3942
  epsilon$1 = 1e-6,
4137
3943
  tauEpsilon = tau$1 - epsilon$1;
4138
- function Path() {
4139
- this._x0 = this._y0 =
4140
- // start of current subpath
4141
- this._x1 = this._y1 = null; // end of current subpath
4142
- this._ = "";
4143
- }
4144
- function path() {
4145
- return new Path();
4146
- }
4147
- Path.prototype = path.prototype = {
4148
- constructor: Path,
4149
- moveTo: function (x, y) {
4150
- this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y);
4151
- },
4152
- closePath: function () {
3944
+ function append$1(strings) {
3945
+ this._ += strings[0];
3946
+ for (let i = 1, n = strings.length; i < n; ++i) {
3947
+ this._ += arguments[i] + strings[i];
3948
+ }
3949
+ }
3950
+ function appendRound$1(digits) {
3951
+ let d = Math.floor(digits);
3952
+ if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
3953
+ if (d > 15) return append$1;
3954
+ const k = 10 ** d;
3955
+ return function (strings) {
3956
+ this._ += strings[0];
3957
+ for (let i = 1, n = strings.length; i < n; ++i) {
3958
+ this._ += Math.round(arguments[i] * k) / k + strings[i];
3959
+ }
3960
+ };
3961
+ }
3962
+ class Path {
3963
+ constructor(digits) {
3964
+ this._x0 = this._y0 =
3965
+ // start of current subpath
3966
+ this._x1 = this._y1 = null; // end of current subpath
3967
+ this._ = "";
3968
+ this._append = digits == null ? append$1 : appendRound$1(digits);
3969
+ }
3970
+ moveTo(x, y) {
3971
+ this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;
3972
+ }
3973
+ closePath() {
4153
3974
  if (this._x1 !== null) {
4154
3975
  this._x1 = this._x0, this._y1 = this._y0;
4155
- this._ += "Z";
3976
+ this._append`Z`;
4156
3977
  }
4157
- },
4158
- lineTo: function (x, y) {
4159
- this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y);
4160
- },
4161
- quadraticCurveTo: function (x1, y1, x, y) {
4162
- this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x) + "," + (this._y1 = +y);
4163
- },
4164
- bezierCurveTo: function (x1, y1, x2, y2, x, y) {
4165
- this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x) + "," + (this._y1 = +y);
4166
- },
4167
- arcTo: function (x1, y1, x2, y2, r) {
3978
+ }
3979
+ lineTo(x, y) {
3980
+ this._append`L${this._x1 = +x},${this._y1 = +y}`;
3981
+ }
3982
+ quadraticCurveTo(x1, y1, x, y) {
3983
+ this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;
3984
+ }
3985
+ bezierCurveTo(x1, y1, x2, y2, x, y) {
3986
+ this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;
3987
+ }
3988
+ arcTo(x1, y1, x2, y2, r) {
4168
3989
  x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
4169
- var x0 = this._x1,
3990
+
3991
+ // Is the radius negative? Error.
3992
+ if (r < 0) throw new Error(`negative radius: ${r}`);
3993
+ let x0 = this._x1,
4170
3994
  y0 = this._y1,
4171
3995
  x21 = x2 - x1,
4172
3996
  y21 = y2 - y1,
@@ -4174,12 +3998,9 @@
4174
3998
  y01 = y0 - y1,
4175
3999
  l01_2 = x01 * x01 + y01 * y01;
4176
4000
 
4177
- // Is the radius negative? Error.
4178
- if (r < 0) throw new Error("negative radius: " + r);
4179
-
4180
4001
  // Is this path empty? Move to (x1,y1).
4181
4002
  if (this._x1 === null) {
4182
- this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
4003
+ this._append`M${this._x1 = x1},${this._y1 = y1}`;
4183
4004
  }
4184
4005
 
4185
4006
  // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
@@ -4189,12 +4010,12 @@
4189
4010
  // Equivalently, is (x1,y1) coincident with (x2,y2)?
4190
4011
  // Or, is the radius zero? Line to (x1,y1).
4191
4012
  else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon$1) || !r) {
4192
- this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
4013
+ this._append`L${this._x1 = x1},${this._y1 = y1}`;
4193
4014
  }
4194
4015
 
4195
4016
  // Otherwise, draw an arc!
4196
4017
  else {
4197
- var x20 = x2 - x0,
4018
+ let x20 = x2 - x0,
4198
4019
  y20 = y2 - y0,
4199
4020
  l21_2 = x21 * x21 + y21 * y21,
4200
4021
  l20_2 = x20 * x20 + y20 * y20,
@@ -4206,31 +4027,31 @@
4206
4027
 
4207
4028
  // If the start tangent is not coincident with (x0,y0), line to.
4208
4029
  if (Math.abs(t01 - 1) > epsilon$1) {
4209
- this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
4030
+ this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;
4210
4031
  }
4211
- this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
4032
+ this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
4212
4033
  }
4213
- },
4214
- arc: function (x, y, r, a0, a1, ccw) {
4034
+ }
4035
+ arc(x, y, r, a0, a1, ccw) {
4215
4036
  x = +x, y = +y, r = +r, ccw = !!ccw;
4216
- var dx = r * Math.cos(a0),
4037
+
4038
+ // Is the radius negative? Error.
4039
+ if (r < 0) throw new Error(`negative radius: ${r}`);
4040
+ let dx = r * Math.cos(a0),
4217
4041
  dy = r * Math.sin(a0),
4218
4042
  x0 = x + dx,
4219
4043
  y0 = y + dy,
4220
4044
  cw = 1 ^ ccw,
4221
4045
  da = ccw ? a0 - a1 : a1 - a0;
4222
4046
 
4223
- // Is the radius negative? Error.
4224
- if (r < 0) throw new Error("negative radius: " + r);
4225
-
4226
4047
  // Is this path empty? Move to (x0,y0).
4227
4048
  if (this._x1 === null) {
4228
- this._ += "M" + x0 + "," + y0;
4049
+ this._append`M${x0},${y0}`;
4229
4050
  }
4230
4051
 
4231
4052
  // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
4232
4053
  else if (Math.abs(this._x1 - x0) > epsilon$1 || Math.abs(this._y1 - y0) > epsilon$1) {
4233
- this._ += "L" + x0 + "," + y0;
4054
+ this._append`L${x0},${y0}`;
4234
4055
  }
4235
4056
 
4236
4057
  // Is this arc empty? We’re done.
@@ -4241,119 +4062,20 @@
4241
4062
 
4242
4063
  // Is this a complete circle? Draw two arcs to complete the circle.
4243
4064
  if (da > tauEpsilon) {
4244
- this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
4065
+ this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;
4245
4066
  }
4246
4067
 
4247
4068
  // Is this arc non-empty? Draw an arc!
4248
4069
  else if (da > epsilon$1) {
4249
- this._ += "A" + r + "," + r + ",0," + +(da >= pi$1) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
4070
+ this._append`A${r},${r},0,${+(da >= pi$1)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;
4250
4071
  }
4251
- },
4252
- rect: function (x, y, w, h) {
4253
- this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + +w + "v" + +h + "h" + -w + "Z";
4254
- },
4255
- toString: function () {
4256
- return this._;
4257
4072
  }
4258
- };
4259
-
4260
- function count(values, valueof) {
4261
- let count = 0;
4262
- if (valueof === undefined) {
4263
- for (let value of values) {
4264
- if (value != null && (value = +value) >= value) {
4265
- ++count;
4266
- }
4267
- }
4268
- } else {
4269
- let index = -1;
4270
- for (let value of values) {
4271
- if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {
4272
- ++count;
4273
- }
4274
- }
4073
+ rect(x, y, w, h) {
4074
+ this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;
4275
4075
  }
4276
- return count;
4277
- }
4278
-
4279
- function extent(values, valueof) {
4280
- let min;
4281
- let max;
4282
- if (valueof === undefined) {
4283
- for (const value of values) {
4284
- if (value != null) {
4285
- if (min === undefined) {
4286
- if (value >= value) min = max = value;
4287
- } else {
4288
- if (min > value) min = value;
4289
- if (max < value) max = value;
4290
- }
4291
- }
4292
- }
4293
- } else {
4294
- let index = -1;
4295
- for (let value of values) {
4296
- if ((value = valueof(value, ++index, values)) != null) {
4297
- if (min === undefined) {
4298
- if (value >= value) min = max = value;
4299
- } else {
4300
- if (min > value) min = value;
4301
- if (max < value) max = value;
4302
- }
4303
- }
4304
- }
4076
+ toString() {
4077
+ return this._;
4305
4078
  }
4306
- return [min, max];
4307
- }
4308
-
4309
- var e10 = Math.sqrt(50),
4310
- e5 = Math.sqrt(10),
4311
- e2 = Math.sqrt(2);
4312
- function ticks(start, stop, count) {
4313
- var reverse,
4314
- i = -1,
4315
- n,
4316
- ticks,
4317
- step;
4318
- stop = +stop, start = +start, count = +count;
4319
- if (start === stop && count > 0) return [start];
4320
- if (reverse = stop < start) n = start, start = stop, stop = n;
4321
- if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
4322
- if (step > 0) {
4323
- let r0 = Math.round(start / step),
4324
- r1 = Math.round(stop / step);
4325
- if (r0 * step < start) ++r0;
4326
- if (r1 * step > stop) --r1;
4327
- ticks = new Array(n = r1 - r0 + 1);
4328
- while (++i < n) ticks[i] = (r0 + i) * step;
4329
- } else {
4330
- step = -step;
4331
- let r0 = Math.round(start * step),
4332
- r1 = Math.round(stop * step);
4333
- if (r0 / step < start) ++r0;
4334
- if (r1 / step > stop) --r1;
4335
- ticks = new Array(n = r1 - r0 + 1);
4336
- while (++i < n) ticks[i] = (r0 + i) / step;
4337
- }
4338
- if (reverse) ticks.reverse();
4339
- return ticks;
4340
- }
4341
- function tickIncrement(start, stop, count) {
4342
- var step = (stop - start) / Math.max(0, count),
4343
- power = Math.floor(Math.log(step) / Math.LN10),
4344
- error = step / Math.pow(10, power);
4345
- 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);
4346
- }
4347
- function tickStep(start, stop, count) {
4348
- var step0 = Math.abs(stop - start) / Math.max(0, count),
4349
- step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
4350
- error = step0 / step1;
4351
- if (error >= e10) step1 *= 10;else if (error >= e5) step1 *= 5;else if (error >= e2) step1 *= 2;
4352
- return stop < start ? -step1 : step1;
4353
- }
4354
-
4355
- function thresholdSturges(values) {
4356
- return Math.ceil(Math.log(count(values)) / Math.LN2) + 1;
4357
4079
  }
4358
4080
 
4359
4081
  var array$1 = Array.prototype;
@@ -4420,9 +4142,10 @@
4420
4142
 
4421
4143
  // Convert number of thresholds into uniform thresholds.
4422
4144
  if (!Array.isArray(tz)) {
4423
- const e = extent(values),
4424
- ts = tickStep(e[0], e[1], tz);
4425
- tz = ticks(Math.floor(e[0] / ts) * ts, Math.floor(e[1] / ts - 1) * ts, tz);
4145
+ const e = extent(values, finite);
4146
+ tz = ticks(...nice(e[0], e[1], tz), tz);
4147
+ while (tz[tz.length - 1] >= e[1]) tz.pop();
4148
+ while (tz[1] < e[0]) tz.shift();
4426
4149
  } else {
4427
4150
  tz = tz.slice().sort(ascending);
4428
4151
  }
@@ -4432,10 +4155,12 @@
4432
4155
  // Accumulate, smooth contour rings, assign holes to exterior rings.
4433
4156
  // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js
4434
4157
  function contour(values, value) {
4158
+ const v = value == null ? NaN : +value;
4159
+ if (isNaN(v)) throw new Error(`invalid value: ${value}`);
4435
4160
  var polygons = [],
4436
4161
  holes = [];
4437
- isorings(values, value, function (ring) {
4438
- smooth(ring, values, value);
4162
+ isorings(values, v, function (ring) {
4163
+ smooth(ring, values, v);
4439
4164
  if (area(ring) > 0) polygons.push([ring]);else holes.push(ring);
4440
4165
  });
4441
4166
  holes.forEach(function (hole) {
@@ -4467,10 +4192,10 @@
4467
4192
 
4468
4193
  // Special case for the first row (y = -1, t2 = t3 = 0).
4469
4194
  x = y = -1;
4470
- t1 = values[0] >= value;
4195
+ t1 = above(values[0], value);
4471
4196
  cases[t1 << 1].forEach(stitch);
4472
4197
  while (++x < dx - 1) {
4473
- t0 = t1, t1 = values[x + 1] >= value;
4198
+ t0 = t1, t1 = above(values[x + 1], value);
4474
4199
  cases[t0 | t1 << 1].forEach(stitch);
4475
4200
  }
4476
4201
  cases[t1 << 0].forEach(stitch);
@@ -4478,12 +4203,12 @@
4478
4203
  // General case for the intermediate rows.
4479
4204
  while (++y < dy - 1) {
4480
4205
  x = -1;
4481
- t1 = values[y * dx + dx] >= value;
4482
- t2 = values[y * dx] >= value;
4206
+ t1 = above(values[y * dx + dx], value);
4207
+ t2 = above(values[y * dx], value);
4483
4208
  cases[t1 << 1 | t2 << 2].forEach(stitch);
4484
4209
  while (++x < dx - 1) {
4485
- t0 = t1, t1 = values[y * dx + dx + x + 1] >= value;
4486
- t3 = t2, t2 = values[y * dx + x + 1] >= value;
4210
+ t0 = t1, t1 = above(values[y * dx + dx + x + 1], value);
4211
+ t3 = t2, t2 = above(values[y * dx + x + 1], value);
4487
4212
  cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);
4488
4213
  }
4489
4214
  cases[t1 | t2 << 3].forEach(stitch);
@@ -4494,7 +4219,7 @@
4494
4219
  t2 = values[y * dx] >= value;
4495
4220
  cases[t2 << 2].forEach(stitch);
4496
4221
  while (++x < dx - 1) {
4497
- t3 = t2, t2 = values[y * dx + x + 1] >= value;
4222
+ t3 = t2, t2 = above(values[y * dx + x + 1], value);
4498
4223
  cases[t2 << 2 | t3 << 3].forEach(stitch);
4499
4224
  }
4500
4225
  cases[t2 << 3].forEach(stitch);
@@ -4561,15 +4286,12 @@
4561
4286
  y = point[1],
4562
4287
  xt = x | 0,
4563
4288
  yt = y | 0,
4564
- v0,
4565
- v1 = values[yt * dx + xt];
4289
+ v1 = valid(values[yt * dx + xt]);
4566
4290
  if (x > 0 && x < dx && xt === x) {
4567
- v0 = values[yt * dx + xt - 1];
4568
- point[0] = x + (value - v0) / (v1 - v0) - 0.5;
4291
+ point[0] = smooth1(x, valid(values[yt * dx + xt - 1]), v1, value);
4569
4292
  }
4570
4293
  if (y > 0 && y < dy && yt === y) {
4571
- v0 = values[(yt - 1) * dx + xt];
4572
- point[1] = y + (value - v0) / (v1 - v0) - 0.5;
4294
+ point[1] = smooth1(y, valid(values[(yt - 1) * dx + xt]), v1, value);
4573
4295
  }
4574
4296
  });
4575
4297
  }
@@ -4590,6 +4312,28 @@
4590
4312
  return contours;
4591
4313
  }
4592
4314
 
4315
+ // When computing the extent, ignore infinite values (as well as invalid ones).
4316
+ function finite(x) {
4317
+ return isFinite(x) ? x : NaN;
4318
+ }
4319
+
4320
+ // Is the (possibly invalid) x greater than or equal to the (known valid) value?
4321
+ // Treat any invalid value as below negative infinity.
4322
+ function above(x, value) {
4323
+ return x == null ? false : +x >= value;
4324
+ }
4325
+
4326
+ // During smoothing, treat any invalid value as negative infinity.
4327
+ function valid(v) {
4328
+ return v == null || isNaN(v = +v) ? -Infinity : v;
4329
+ }
4330
+ function smooth1(x, v0, v1, value) {
4331
+ const a = value - v0;
4332
+ const b = v1 - v0;
4333
+ const d = isFinite(a) || isFinite(b) ? a / b : Math.sign(a) / Math.sign(b);
4334
+ return isNaN(d) ? x : x + d - 0.5;
4335
+ }
4336
+
4593
4337
  function formatDecimal (x) {
4594
4338
  return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
4595
4339
  }
@@ -5546,66 +5290,96 @@
5546
5290
  }
5547
5291
  var pathMeasure = lengthStream;
5548
5292
 
5549
- function PathString() {
5550
- this._string = [];
5551
- }
5552
- PathString.prototype = {
5553
- _radius: 4.5,
5554
- _circle: circle(4.5),
5555
- pointRadius: function (_) {
5556
- if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;
5293
+ // Simple caching for constant-radius points.
5294
+ let cacheDigits, cacheAppend, cacheRadius, cacheCircle;
5295
+ class PathString {
5296
+ constructor(digits) {
5297
+ this._append = digits == null ? append : appendRound(digits);
5298
+ this._radius = 4.5;
5299
+ this._ = "";
5300
+ }
5301
+ pointRadius(_) {
5302
+ this._radius = +_;
5557
5303
  return this;
5558
- },
5559
- polygonStart: function () {
5304
+ }
5305
+ polygonStart() {
5560
5306
  this._line = 0;
5561
- },
5562
- polygonEnd: function () {
5307
+ }
5308
+ polygonEnd() {
5563
5309
  this._line = NaN;
5564
- },
5565
- lineStart: function () {
5310
+ }
5311
+ lineStart() {
5566
5312
  this._point = 0;
5567
- },
5568
- lineEnd: function () {
5569
- if (this._line === 0) this._string.push("Z");
5313
+ }
5314
+ lineEnd() {
5315
+ if (this._line === 0) this._ += "Z";
5570
5316
  this._point = NaN;
5571
- },
5572
- point: function (x, y) {
5317
+ }
5318
+ point(x, y) {
5573
5319
  switch (this._point) {
5574
5320
  case 0:
5575
5321
  {
5576
- this._string.push("M", x, ",", y);
5322
+ this._append`M${x},${y}`;
5577
5323
  this._point = 1;
5578
5324
  break;
5579
5325
  }
5580
5326
  case 1:
5581
5327
  {
5582
- this._string.push("L", x, ",", y);
5328
+ this._append`L${x},${y}`;
5583
5329
  break;
5584
5330
  }
5585
5331
  default:
5586
5332
  {
5587
- if (this._circle == null) this._circle = circle(this._radius);
5588
- this._string.push("M", x, ",", y, this._circle);
5333
+ this._append`M${x},${y}`;
5334
+ if (this._radius !== cacheRadius || this._append !== cacheAppend) {
5335
+ const r = this._radius;
5336
+ const s = this._;
5337
+ this._ = ""; // stash the old string so we can cache the circle path fragment
5338
+ this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;
5339
+ cacheRadius = r;
5340
+ cacheAppend = this._append;
5341
+ cacheCircle = this._;
5342
+ this._ = s;
5343
+ }
5344
+ this._ += cacheCircle;
5589
5345
  break;
5590
5346
  }
5591
5347
  }
5592
- },
5593
- result: function () {
5594
- if (this._string.length) {
5595
- var result = this._string.join("");
5596
- this._string = [];
5597
- return result;
5598
- } else {
5599
- return null;
5600
- }
5601
5348
  }
5602
- };
5603
- function circle(radius) {
5604
- return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius + "z";
5349
+ result() {
5350
+ const result = this._;
5351
+ this._ = "";
5352
+ return result.length ? result : null;
5353
+ }
5354
+ }
5355
+ function append(strings) {
5356
+ let i = 1;
5357
+ this._ += strings[0];
5358
+ for (const j = strings.length; i < j; ++i) {
5359
+ this._ += arguments[i] + strings[i];
5360
+ }
5361
+ }
5362
+ function appendRound(digits) {
5363
+ const d = Math.floor(digits);
5364
+ if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);
5365
+ if (d > 15) return append;
5366
+ if (d !== cacheDigits) {
5367
+ const k = 10 ** d;
5368
+ cacheDigits = d;
5369
+ cacheAppend = function append(strings) {
5370
+ let i = 1;
5371
+ this._ += strings[0];
5372
+ for (const j = strings.length; i < j; ++i) {
5373
+ this._ += Math.round(arguments[i] * k) / k + strings[i];
5374
+ }
5375
+ };
5376
+ }
5377
+ return cacheAppend;
5605
5378
  }
5606
5379
 
5607
5380
  function index (projection, context) {
5608
- var pointRadius = 4.5,
5381
+ let digits = 3,
5382
+ pointRadius = 4.5,
5609
5383
  projectionStream,
5610
5384
  contextStream;
5611
5385
  function path(object) {
@@ -5632,11 +5406,13 @@
5632
5406
  return pathCentroid.result();
5633
5407
  };
5634
5408
  path.projection = function (_) {
5635
- return arguments.length ? (projectionStream = _ == null ? (projection = null, identity$2) : (projection = _).stream, path) : projection;
5409
+ if (!arguments.length) return projection;
5410
+ projectionStream = _ == null ? (projection = null, identity$2) : (projection = _).stream;
5411
+ return path;
5636
5412
  };
5637
5413
  path.context = function (_) {
5638
5414
  if (!arguments.length) return context;
5639
- contextStream = _ == null ? (context = null, new PathString()) : new PathContext(context = _);
5415
+ contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);
5640
5416
  if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius);
5641
5417
  return path;
5642
5418
  };
@@ -5645,7 +5421,17 @@
5645
5421
  pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_);
5646
5422
  return path;
5647
5423
  };
5648
- return path.projection(projection).context(context);
5424
+ path.digits = function (_) {
5425
+ if (!arguments.length) return digits;
5426
+ if (_ == null) digits = null;else {
5427
+ const d = Math.floor(_);
5428
+ if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
5429
+ digits = d;
5430
+ }
5431
+ if (context === null) contextStream = new PathString(digits);
5432
+ return path;
5433
+ };
5434
+ return path.projection(projection).digits(digits).context(context);
5649
5435
  }
5650
5436
 
5651
5437
  function transformer$1(methods) {
@@ -5940,7 +5726,7 @@
5940
5726
  }
5941
5727
 
5942
5728
  function tickFormat(start, stop, count, specifier) {
5943
- var step = tickStep$1(start, stop, count),
5729
+ var step = tickStep(start, stop, count),
5944
5730
  precision;
5945
5731
  specifier = formatSpecifier(specifier == null ? ",f" : specifier);
5946
5732
  switch (specifier.type) {
@@ -5973,7 +5759,7 @@
5973
5759
  var domain = scale.domain;
5974
5760
  scale.ticks = function (count) {
5975
5761
  var d = domain();
5976
- return ticks$1(d[0], d[d.length - 1], count == null ? 10 : count);
5762
+ return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
5977
5763
  };
5978
5764
  scale.tickFormat = function (count, specifier) {
5979
5765
  var d = domain();
@@ -5994,7 +5780,7 @@
5994
5780
  step = i0, i0 = i1, i1 = step;
5995
5781
  }
5996
5782
  while (maxIter-- > 0) {
5997
- step = tickIncrement$1(start, stop, count);
5783
+ step = tickIncrement(start, stop, count);
5998
5784
  if (step === prestep) {
5999
5785
  d[i0] = start;
6000
5786
  d[i1] = stop;
@@ -6039,6 +5825,22 @@
6039
5825
  };
6040
5826
  }
6041
5827
 
5828
+ function withPath(shape) {
5829
+ let digits = 3;
5830
+ shape.digits = function (_) {
5831
+ if (!arguments.length) return digits;
5832
+ if (_ == null) {
5833
+ digits = null;
5834
+ } else {
5835
+ const d = Math.floor(_);
5836
+ if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
5837
+ digits = d;
5838
+ }
5839
+ return shape;
5840
+ };
5841
+ return () => new Path(digits);
5842
+ }
5843
+
6042
5844
  function array (x) {
6043
5845
  return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like
6044
5846
  : Array.from(x); // Map, Set, iterable, string, or anything else
@@ -6092,7 +5894,8 @@
6092
5894
  var defined = constant(true),
6093
5895
  context = null,
6094
5896
  curve = curveLinear,
6095
- output = null;
5897
+ output = null,
5898
+ path = withPath(line);
6096
5899
  x$1 = typeof x$1 === "function" ? x$1 : x$1 === undefined ? x : constant(x$1);
6097
5900
  y$1 = typeof y$1 === "function" ? y$1 : y$1 === undefined ? y : constant(y$1);
6098
5901
  function line(data) {
@@ -6342,6 +6145,48 @@
6342
6145
  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`;
6343
6146
  return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
6344
6147
  }
6148
+ static get svgDefs() {
6149
+ const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
6150
+
6151
+ const filters = shadows.elevations.map(z => {
6152
+ return `
6153
+ <filter id=${`shadow-${z}`} filterUnits="userSpaceOnUse" x="-100%" y="-100%" width="200%" height="200%">
6154
+ <feComponentTransfer in="SourceAlpha" result="solid">
6155
+ <feFuncA type="table" tableValues="0 1 1"/>
6156
+ </feComponentTransfer>
6157
+ <feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
6158
+ <feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
6159
+ <feOffset in="solid" result="offA" dx=${shadows.mapAmbient[z].y / 2} dy=${shadows.mapAmbient[z].y} />
6160
+ ${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)} />`}
6161
+ ${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)} />`}
6162
+ ${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)} />`}
6163
+ <feGaussianBlur in=${shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU'} result="blurU" stdDeviation=${shadows.mapUmbra[z].b / 2} />
6164
+ <feGaussianBlur in=${shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP'} result="blurP" stdDeviation=${shadows.mapPenumbra[z].b / 2} />
6165
+ <feGaussianBlur in=${shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA'} result="blurA" stdDeviation=${shadows.mapAmbient[z].b / 2} />
6166
+ <feFlood in="SourceGraphic" result="opU" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityUmbra + shadows.opacityBoost} />
6167
+ <feFlood in="SourceGraphic" result="opP" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityPenumbra + shadows.opacityBoost} />
6168
+ <feFlood in="SourceGraphic" result="opA" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityAmbient + shadows.opacityBoost} />
6169
+ <feComposite in="opU" in2="blurU" result="shU" operator="in" />
6170
+ <feComposite in="opP" in2="blurP" result="shP" operator="in" />
6171
+ <feComposite in="opA" in2="blurA" result="shA" operator="in" />
6172
+ <feMorphology in="solid" result="smaller" operator="erode" radius="1" />
6173
+ <feComposite in="shU" in2="smaller" result="finalU" operator="out" />
6174
+ <feComposite in="shP" in2="smaller" result="finalP" operator="out" />
6175
+ <feComposite in="shA" in2="smaller" result="finalA" operator="out" />
6176
+ <feMerge>
6177
+ <feMergeNode in="finalU" />
6178
+ <feMergeNode in="finalP" />
6179
+ <feMergeNode in="finalA" />
6180
+ <feMergeNode in="SourceGraphic" />
6181
+ </feMerge>
6182
+ </filter>`;
6183
+ });
6184
+ return `
6185
+ <defs>
6186
+ ${filters}
6187
+ </defs>
6188
+ `;
6189
+ }
6345
6190
  static get svgFilters() {
6346
6191
  const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
6347
6192
 
@@ -6349,7 +6194,7 @@
6349
6194
  return b`
6350
6195
  <filter id=${`shadow-${z}`} x="-250%" y="-250%" width="600%" height="600%">
6351
6196
  <feComponentTransfer in="SourceAlpha" result="solid">
6352
- <feFuncA type="table" tableValues="0 1 1"/>
6197
+ <feFuncA type="table" tableValues="0 1 1"/>
6353
6198
  </feComponentTransfer>
6354
6199
  <feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
6355
6200
  <feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
@@ -6387,24 +6232,24 @@
6387
6232
  `;
6388
6233
  }
6389
6234
  static get styles() {
6390
- return r$1`
6235
+ return i$1`
6391
6236
  :host {
6392
- ---shadow-0: var(--shadow-0, ${o$2(this.cssBoxShadow(0))});
6393
- ---shadow-2: var(--shadow-2, ${o$2(this.cssBoxShadow(2))});
6394
- ---shadow-4: var(--shadow-4, ${o$2(this.cssBoxShadow(4))});
6395
- ---shadow-8: var(--shadow-8, ${o$2(this.cssBoxShadow(8))});
6396
-
6397
- ---color-background: var(--color-background, ${o$2(this.greys.white)});
6398
- ---color-border: var(--color-border, ${o$2(this.greys.light75)});
6399
- ---color-text: var(--color-text, ${o$2(this.greys.dark75)});
6400
- ---color-text-inverse: var(--color-text-inverse, ${o$2(this.greys.white)});
6401
- ---color-link: var(--color-link, ${o$2(this.greys.dark25)});
6402
- ---color-element-background: var(--color-element-background, ${o$2(this.greys.light75)});
6403
- ---color-element-disabled: var(--color-element-disabled, ${o$2(this.greys.light50)});
6404
- ---color-element-enabled: var(--color-element-enabled, ${o$2(this.greys.dark25)});
6405
- ---color-element-selected: var(--color-element-selected, ${o$2(this.greys.grey)});
6406
- ---color-element-border: var(--color-element-border, ${o$2(this.greys.dark50)});
6407
- ---color-element-emphasis: var(--color-element-emphasis, ${o$2(this.greys.dark75)});
6237
+ ---shadow-0: var(--shadow-0, ${r$2(this.cssBoxShadow(0))});
6238
+ ---shadow-2: var(--shadow-2, ${r$2(this.cssBoxShadow(2))});
6239
+ ---shadow-4: var(--shadow-4, ${r$2(this.cssBoxShadow(4))});
6240
+ ---shadow-8: var(--shadow-8, ${r$2(this.cssBoxShadow(8))});
6241
+
6242
+ ---color-background: var(--color-background, ${r$2(this.greys.white)});
6243
+ ---color-border: var(--color-border, ${r$2(this.greys.light75)});
6244
+ ---color-text: var(--color-text, ${r$2(this.greys.dark75)});
6245
+ ---color-text-inverse: var(--color-text-inverse, ${r$2(this.greys.white)});
6246
+ ---color-link: var(--color-link, ${r$2(this.greys.dark25)});
6247
+ ---color-element-background: var(--color-element-background, ${r$2(this.greys.light75)});
6248
+ ---color-element-disabled: var(--color-element-disabled, ${r$2(this.greys.light50)});
6249
+ ---color-element-enabled: var(--color-element-enabled, ${r$2(this.greys.dark25)});
6250
+ ---color-element-selected: var(--color-element-selected, ${r$2(this.greys.grey)});
6251
+ ---color-element-border: var(--color-element-border, ${r$2(this.greys.dark50)});
6252
+ ---color-element-emphasis: var(--color-element-emphasis, ${r$2(this.greys.dark75)});
6408
6253
 
6409
6254
  ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
6410
6255
  ---font-family-math: var(--font-family-math, "Source Serif", serif);
@@ -6465,7 +6310,7 @@
6465
6310
  this.disabled = false;
6466
6311
  }
6467
6312
  static get styles() {
6468
- return [super.styles, r$1`
6313
+ return [super.styles, i$1`
6469
6314
  :host {
6470
6315
  margin: 0.25rem;
6471
6316
  }
@@ -6590,11 +6435,11 @@
6590
6435
  this.value = event.target.value;
6591
6436
  }
6592
6437
  static get styles() {
6593
- return [super.styles, r$1`
6438
+ return [super.styles, i$1`
6594
6439
  :host {
6595
- ---shadow-2-rotate: var(--shadow-2-rotate, ${o$2(this.cssBoxShadow(2, true, false))});
6596
- ---shadow-4-rotate: var(--shadow-4-rotate, ${o$2(this.cssBoxShadow(4, true, false))});
6597
- ---shadow-8-rotate: var(--shadow-8-rotate, ${o$2(this.cssBoxShadow(8, true, false))});
6440
+ ---shadow-2-rotate: var(--shadow-2-rotate, ${r$2(this.cssBoxShadow(2, true, false))});
6441
+ ---shadow-4-rotate: var(--shadow-4-rotate, ${r$2(this.cssBoxShadow(4, true, false))});
6442
+ ---shadow-8-rotate: var(--shadow-8-rotate, ${r$2(this.cssBoxShadow(8, true, false))});
6598
6443
 
6599
6444
  display: flex;
6600
6445
 
@@ -6900,12 +6745,15 @@
6900
6745
  this.value = event.target.value;
6901
6746
  }
6902
6747
  static get styles() {
6903
- return [super.styles, r$1`
6748
+ return [super.styles, i$1`
6904
6749
  :host {
6905
6750
  ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
6906
6751
  ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
6907
6752
  ---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
6908
6753
 
6754
+ ---decidables-spinner-postfix: var(--decidables-spinner-postfix, "");
6755
+ ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0);
6756
+
6909
6757
  display: block;
6910
6758
  }
6911
6759
 
@@ -6933,8 +6781,20 @@
6933
6781
  content: var(---decidables-spinner-prefix);
6934
6782
  }
6935
6783
 
6784
+ label::after {
6785
+ position: absolute;
6786
+ right: 0.25rem;
6787
+ bottom: 1px;
6788
+
6789
+ font-size: var(---decidables-spinner-font-size);
6790
+ line-height: normal;
6791
+
6792
+ content: var(---decidables-spinner-postfix);
6793
+ }
6794
+
6936
6795
  input[type=number] {
6937
6796
  width: var(---decidables-spinner-input-width);
6797
+ padding-right: var(---decidables-spinner-postfix-padding);
6938
6798
 
6939
6799
  font-family: var(---font-family-base);
6940
6800
  font-size: var(---decidables-spinner-font-size);
@@ -7024,7 +6884,7 @@
7024
6884
  }));
7025
6885
  }
7026
6886
  static get styles() {
7027
- return [super.styles, r$1`
6887
+ return [super.styles, i$1`
7028
6888
  :host {
7029
6889
  display: flex;
7030
6890
 
@@ -7176,7 +7036,7 @@
7176
7036
  this.disabled = false;
7177
7037
  }
7178
7038
  static get styles() {
7179
- return [super.styles, r$1`
7039
+ return [super.styles, i$1`
7180
7040
  fieldset {
7181
7041
  display: flex;
7182
7042
 
@@ -7251,7 +7111,7 @@
7251
7111
  }));
7252
7112
  }
7253
7113
  static get styles() {
7254
- return [super.styles, r$1`
7114
+ return [super.styles, i$1`
7255
7115
  :host {
7256
7116
  display: flex;
7257
7117
  }
@@ -7387,6 +7247,50 @@
7387
7247
  }
7388
7248
  };
7389
7249
 
7250
+ function DecidablesMixinResizeable(superClass) {
7251
+ return class extends superClass {
7252
+ static get properties() {
7253
+ return {
7254
+ width: {
7255
+ attribute: false,
7256
+ type: Number,
7257
+ reflect: false
7258
+ },
7259
+ height: {
7260
+ attribute: false,
7261
+ type: Number,
7262
+ reflect: false
7263
+ },
7264
+ rem: {
7265
+ attribute: false,
7266
+ type: Number,
7267
+ reflect: false
7268
+ }
7269
+ };
7270
+ }
7271
+ constructor() {
7272
+ super();
7273
+ this.width = NaN;
7274
+ this.height = NaN;
7275
+ this.rem = NaN;
7276
+ }
7277
+ getDimensions() {
7278
+ this.width = parseFloat(this.getComputedStyleValue('width'), 10);
7279
+ this.height = parseFloat(this.getComputedStyleValue('height'), 10);
7280
+ this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
7281
+ }
7282
+ connectedCallback() {
7283
+ super.connectedCallback();
7284
+ this.resizeObserver = new ResizeObserver(this.getDimensions.bind(this));
7285
+ this.resizeObserver.observe(this);
7286
+ }
7287
+ disconnectedCallback() {
7288
+ this.resizeObserver.unobserve(this);
7289
+ super.disconnectedCallback();
7290
+ }
7291
+ };
7292
+ }
7293
+
7390
7294
  /*
7391
7295
  DetectableElement Base Class - Not intended for instantiation!
7392
7296
  <detectable-element>
@@ -7437,55 +7341,55 @@
7437
7341
  }, {});
7438
7342
  }
7439
7343
  static get styles() {
7440
- return [super.styles, r$1`
7344
+ return [super.styles, i$1`
7441
7345
  :host {
7442
- ---color-h: var(--color-h, ${o$2(this.colors.h)});
7443
- ---color-m: var(--color-m, ${o$2(this.colors.m)});
7444
- ---color-fa: var(--color-fa, ${o$2(this.colors.fa)});
7445
- ---color-cr: var(--color-cr, ${o$2(this.colors.cr)});
7446
- ---color-hr: var(--color-hr, ${o$2(this.colors.hr)});
7447
- ---color-far: var(--color-far, ${o$2(this.colors.far)});
7448
- ---color-acc: var(--color-acc, ${o$2(this.colors.acc)});
7449
- ---color-d: var(--color-d, ${o$2(this.colors.d)});
7450
- ---color-c: var(--color-c, ${o$2(this.colors.c)});
7451
- ---color-s: var(--color-s, ${o$2(this.colors.s)});
7452
- ---color-present: var(--color-present, ${o$2(this.colors.present)});
7453
- ---color-absent: var(--color-absent, ${o$2(this.colors.absent)});
7454
- ---color-correct: var(--color-correct, ${o$2(this.colors.correct)});
7455
- ---color-error: var(--color-error, ${o$2(this.colors.error)});
7456
- ---color-nr: var(--color-nr, ${o$2(this.colors.nr)});
7457
-
7458
- ---color-h-light: var(--color-h-light, ${o$2(this.lights.h)});
7459
- ---color-m-light: var(--color-m-light, ${o$2(this.lights.m)});
7460
- ---color-fa-light: var(--color-fa-light, ${o$2(this.lights.fa)});
7461
- ---color-cr-light: var(--color-cr-light, ${o$2(this.lights.cr)});
7462
- ---color-hr-light: var(--color-hr-light, ${o$2(this.lights.hr)});
7463
- ---color-far-light: var(--color-far-light, ${o$2(this.lights.far)});
7464
- ---color-acc-light: var(--color-acc-light, ${o$2(this.lights.acc)});
7465
- ---color-d-light: var(--color-d-light, ${o$2(this.lights.d)});
7466
- ---color-c-light: var(--color-c-light, ${o$2(this.lights.c)});
7467
- ---color-s-light: var(--color-s-light, ${o$2(this.lights.s)});
7468
- ---color-present-light: var(--color-present-light, ${o$2(this.lights.present)});
7469
- ---color-absent-light: var(--color-absent-light, ${o$2(this.lights.absent)});
7470
- ---color-correct-light: var(--color-correct-light, ${o$2(this.lights.correct)});
7471
- ---color-error-light: var(--color-error-light, ${o$2(this.lights.error)});
7472
- ---color-nr-light: var(--color-nr-light, ${o$2(this.lights.nr)});
7473
-
7474
- ---color-h-dark: var(--color-h-dark, ${o$2(this.darks.h)});
7475
- ---color-m-dark: var(--color-m-dark, ${o$2(this.darks.m)});
7476
- ---color-fa-dark: var(--color-fa-dark, ${o$2(this.darks.fa)});
7477
- ---color-cr-dark: var(--color-cr-dark, ${o$2(this.darks.cr)});
7478
- ---color-hr-dark: var(--color-hr-dark, ${o$2(this.darks.hr)});
7479
- ---color-far-dark: var(--color-far-dark, ${o$2(this.darks.far)});
7480
- ---color-acc-dark: var(--color-acc-dark, ${o$2(this.darks.acc)});
7481
- ---color-d-dark: var(--color-d-dark, ${o$2(this.darks.d)});
7482
- ---color-c-dark: var(--color-c-dark, ${o$2(this.darks.c)});
7483
- ---color-s-dark: var(--color-s-dark, ${o$2(this.darks.s)});
7484
- ---color-present-dark: var(--color-present-dark, ${o$2(this.darks.present)});
7485
- ---color-absent-dark: var(--color-absent-dark, ${o$2(this.darks.absent)});
7486
- ---color-correct-dark: var(--color-correct-dark, ${o$2(this.darks.correct)});
7487
- ---color-error-dark: var(--color-error-dark, ${o$2(this.darks.error)});
7488
- ---color-nr-dark: var(--color-nr-dark, ${o$2(this.darks.nr)});
7346
+ ---color-h: var(--color-h, ${r$2(this.colors.h)});
7347
+ ---color-m: var(--color-m, ${r$2(this.colors.m)});
7348
+ ---color-fa: var(--color-fa, ${r$2(this.colors.fa)});
7349
+ ---color-cr: var(--color-cr, ${r$2(this.colors.cr)});
7350
+ ---color-hr: var(--color-hr, ${r$2(this.colors.hr)});
7351
+ ---color-far: var(--color-far, ${r$2(this.colors.far)});
7352
+ ---color-acc: var(--color-acc, ${r$2(this.colors.acc)});
7353
+ ---color-d: var(--color-d, ${r$2(this.colors.d)});
7354
+ ---color-c: var(--color-c, ${r$2(this.colors.c)});
7355
+ ---color-s: var(--color-s, ${r$2(this.colors.s)});
7356
+ ---color-present: var(--color-present, ${r$2(this.colors.present)});
7357
+ ---color-absent: var(--color-absent, ${r$2(this.colors.absent)});
7358
+ ---color-correct: var(--color-correct, ${r$2(this.colors.correct)});
7359
+ ---color-error: var(--color-error, ${r$2(this.colors.error)});
7360
+ ---color-nr: var(--color-nr, ${r$2(this.colors.nr)});
7361
+
7362
+ ---color-h-light: var(--color-h-light, ${r$2(this.lights.h)});
7363
+ ---color-m-light: var(--color-m-light, ${r$2(this.lights.m)});
7364
+ ---color-fa-light: var(--color-fa-light, ${r$2(this.lights.fa)});
7365
+ ---color-cr-light: var(--color-cr-light, ${r$2(this.lights.cr)});
7366
+ ---color-hr-light: var(--color-hr-light, ${r$2(this.lights.hr)});
7367
+ ---color-far-light: var(--color-far-light, ${r$2(this.lights.far)});
7368
+ ---color-acc-light: var(--color-acc-light, ${r$2(this.lights.acc)});
7369
+ ---color-d-light: var(--color-d-light, ${r$2(this.lights.d)});
7370
+ ---color-c-light: var(--color-c-light, ${r$2(this.lights.c)});
7371
+ ---color-s-light: var(--color-s-light, ${r$2(this.lights.s)});
7372
+ ---color-present-light: var(--color-present-light, ${r$2(this.lights.present)});
7373
+ ---color-absent-light: var(--color-absent-light, ${r$2(this.lights.absent)});
7374
+ ---color-correct-light: var(--color-correct-light, ${r$2(this.lights.correct)});
7375
+ ---color-error-light: var(--color-error-light, ${r$2(this.lights.error)});
7376
+ ---color-nr-light: var(--color-nr-light, ${r$2(this.lights.nr)});
7377
+
7378
+ ---color-h-dark: var(--color-h-dark, ${r$2(this.darks.h)});
7379
+ ---color-m-dark: var(--color-m-dark, ${r$2(this.darks.m)});
7380
+ ---color-fa-dark: var(--color-fa-dark, ${r$2(this.darks.fa)});
7381
+ ---color-cr-dark: var(--color-cr-dark, ${r$2(this.darks.cr)});
7382
+ ---color-hr-dark: var(--color-hr-dark, ${r$2(this.darks.hr)});
7383
+ ---color-far-dark: var(--color-far-dark, ${r$2(this.darks.far)});
7384
+ ---color-acc-dark: var(--color-acc-dark, ${r$2(this.darks.acc)});
7385
+ ---color-d-dark: var(--color-d-dark, ${r$2(this.darks.d)});
7386
+ ---color-c-dark: var(--color-c-dark, ${r$2(this.darks.c)});
7387
+ ---color-s-dark: var(--color-s-dark, ${r$2(this.darks.s)});
7388
+ ---color-present-dark: var(--color-present-dark, ${r$2(this.darks.present)});
7389
+ ---color-absent-dark: var(--color-absent-dark, ${r$2(this.darks.absent)});
7390
+ ---color-correct-dark: var(--color-correct-dark, ${r$2(this.darks.correct)});
7391
+ ---color-error-dark: var(--color-error-dark, ${r$2(this.darks.error)});
7392
+ ---color-nr-dark: var(--color-nr-dark, ${r$2(this.darks.nr)});
7489
7393
  }
7490
7394
  `];
7491
7395
  }
@@ -7499,7 +7403,7 @@
7499
7403
  Dots; Coherence;
7500
7404
  # Direction, Speed, Lifetime
7501
7405
  */
7502
- class RDKTask extends DetectableElement {
7406
+ class RDKTask extends DecidablesMixinResizeable(DetectableElement) {
7503
7407
  static get properties() {
7504
7408
  return {
7505
7409
  coherence: {
@@ -7556,21 +7460,6 @@
7556
7460
  attribute: false,
7557
7461
  type: Number,
7558
7462
  reflect: false
7559
- },
7560
- width: {
7561
- attribute: false,
7562
- type: Number,
7563
- reflect: false
7564
- },
7565
- height: {
7566
- attribute: false,
7567
- type: Number,
7568
- reflect: false
7569
- },
7570
- rem: {
7571
- attribute: false,
7572
- type: Number,
7573
- reflect: false
7574
7463
  }
7575
7464
  };
7576
7465
  }
@@ -7592,10 +7481,6 @@
7592
7481
  this.lifetime = 400; // Lifetime of each dot in milliseconds
7593
7482
  this.speed = 50; // Rate of dot movement in pixels per second
7594
7483
 
7595
- this.width = NaN; // Width of component in pixels
7596
- this.height = NaN; // Height of component in pixels
7597
- this.rem = NaN; // Pixels per rem for component
7598
-
7599
7484
  // Private
7600
7485
  this.firstUpdate = true;
7601
7486
  this.COHERENT = 0; // "Constant" for index to coherent dots
@@ -7621,7 +7506,7 @@
7621
7506
  }
7622
7507
 
7623
7508
  static get styles() {
7624
- return [super.styles, r$1`
7509
+ return [super.styles, i$1`
7625
7510
  :host {
7626
7511
  display: inline-block;
7627
7512
 
@@ -7672,27 +7557,6 @@
7672
7557
  /* eslint-disable-line class-methods-use-this */
7673
7558
  return x$1``;
7674
7559
  }
7675
- getDimensions() {
7676
- this.width = parseFloat(this.getComputedStyleValue('width'), 10);
7677
- this.height = parseFloat(this.getComputedStyleValue('height'), 10);
7678
- this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
7679
- // console.log(`rdk-task: width = ${this.width}, height = ${this.height}, rem = ${this.rem}`);
7680
- }
7681
-
7682
- connectedCallback() {
7683
- super.connectedCallback();
7684
- window.addEventListener('resize', this.getDimensions.bind(this));
7685
- }
7686
- disconnectedCallback() {
7687
- window.removeEventListener('resize', this.getDimensions.bind(this));
7688
- super.disconnectedCallback();
7689
- }
7690
- firstUpdated(changedProperties) {
7691
- super.firstUpdated(changedProperties);
7692
-
7693
- // Get the width and height after initial render/update has occurred
7694
- this.getDimensions();
7695
- }
7696
7560
  update(changedProperties) {
7697
7561
  super.update(changedProperties);
7698
7562
 
@@ -8003,11 +7867,11 @@
8003
7867
 
8004
7868
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
8005
7869
 
8006
- var jstatExports = {};
8007
- var jstat = {
8008
- get exports(){ return jstatExports; },
8009
- set exports(v){ jstatExports = v; },
8010
- };
7870
+ function getDefaultExportFromCjs (x) {
7871
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
7872
+ }
7873
+
7874
+ var jstat = {exports: {}};
8011
7875
 
8012
7876
  (function (module, exports) {
8013
7877
  (function (window, factory) {
@@ -12281,6 +12145,8 @@
12281
12145
  return jStat;
12282
12146
  });
12283
12147
  })(jstat);
12148
+ var jstatExports = jstat.exports;
12149
+ var jStat = /*@__PURE__*/getDefaultExportFromCjs(jstatExports);
12284
12150
 
12285
12151
  /*
12286
12152
  SDTMath Static Class - Not intended for instantiation!
@@ -12400,28 +12266,28 @@
12400
12266
  return m / (m + cr);
12401
12267
  }
12402
12268
  static hrFar2D(hr, far, s = 1) {
12403
- if (s === 1) return jstatExports.normal.inv(hr, 0, 1) - jstatExports.normal.inv(far, 0, 1);
12404
- return Math.sqrt(2 / (s * s + 1)) * (s * jstatExports.normal.inv(hr, 0, 1) - jstatExports.normal.inv(far, 0, 1));
12269
+ if (s === 1) return jStat.normal.inv(hr, 0, 1) - jStat.normal.inv(far, 0, 1);
12270
+ return Math.sqrt(2 / (s * s + 1)) * (s * jStat.normal.inv(hr, 0, 1) - jStat.normal.inv(far, 0, 1));
12405
12271
  }
12406
12272
  static hrFar2C(hr, far, s = 1) {
12407
- if (s === 1) return -(jstatExports.normal.inv(hr, 0, 1) + jstatExports.normal.inv(far, 0, 1)) / 2;
12408
- return Math.sqrt(2 / (s * s + 1)) * (s / (s + 1)) * -(jstatExports.normal.inv(hr, 0, 1) + jstatExports.normal.inv(far, 0, 1));
12273
+ if (s === 1) return -(jStat.normal.inv(hr, 0, 1) + jStat.normal.inv(far, 0, 1)) / 2;
12274
+ return Math.sqrt(2 / (s * s + 1)) * (s / (s + 1)) * -(jStat.normal.inv(hr, 0, 1) + jStat.normal.inv(far, 0, 1));
12409
12275
  }
12410
12276
  static dC2Hr(d, c, s = 1) {
12411
- if (s === 1) return jstatExports.normal.cdf(d / 2 - c, 0, 1);
12412
- return jstatExports.normal.cdf(Math.sqrt((s * s + 1) / 2) * (d / (1 + s) - c / s), 0, 1);
12277
+ if (s === 1) return jStat.normal.cdf(d / 2 - c, 0, 1);
12278
+ return jStat.normal.cdf(Math.sqrt((s * s + 1) / 2) * (d / (1 + s) - c / s), 0, 1);
12413
12279
  }
12414
12280
  static dC2Far(d, c, s = 1) {
12415
- if (s === 1) return jstatExports.normal.cdf(-(d / 2 + c), 0, 1);
12416
- return jstatExports.normal.cdf(Math.sqrt((s * s + 1) / 2) * -(d / (1 + s) + c), 0, 1);
12281
+ if (s === 1) return jStat.normal.cdf(-(d / 2 + c), 0, 1);
12282
+ return jStat.normal.cdf(Math.sqrt((s * s + 1) / 2) * -(d / (1 + s) + c), 0, 1);
12417
12283
  }
12418
12284
  static dFar2Hr(d, far, s = 1) {
12419
- if (s === 1) return jstatExports.normal.cdf(d + jstatExports.normal.inv(far, 0, 1), 0, 1);
12420
- return jstatExports.normal.cdf((Math.sqrt((s * s + 1) / 2) * d + jstatExports.normal.inv(far, 0, 1)) / s, 0, 1);
12285
+ if (s === 1) return jStat.normal.cdf(d + jStat.normal.inv(far, 0, 1), 0, 1);
12286
+ return jStat.normal.cdf((Math.sqrt((s * s + 1) / 2) * d + jStat.normal.inv(far, 0, 1)) / s, 0, 1);
12421
12287
  }
12422
12288
  static cFar2Hr(c, far, s = 1) {
12423
- if (s === 1) return jstatExports.normal.cdf(-(2 * c) - jstatExports.normal.inv(far, 0, 1), 0, 1);
12424
- return jstatExports.normal.cdf(-Math.sqrt((s * s + 1) / 2) * ((s + 1) / s) * c - jstatExports.normal.inv(far, 0, 1), 0, 1);
12289
+ if (s === 1) return jStat.normal.cdf(-(2 * c) - jStat.normal.inv(far, 0, 1), 0, 1);
12290
+ return jStat.normal.cdf(-Math.sqrt((s * s + 1) / 2) * ((s + 1) / s) * c - jStat.normal.inv(far, 0, 1), 0, 1);
12425
12291
  }
12426
12292
  static d2MuN(d, s = 1) {
12427
12293
  if (s === 1) return -d / 2;
@@ -12454,16 +12320,16 @@
12454
12320
  return 1 / (h * Math.sqrt(2 * Math.PI));
12455
12321
  }
12456
12322
  static hr2Zhr(hr) {
12457
- return jstatExports.normal.inv(hr, 0, 1);
12323
+ return jStat.normal.inv(hr, 0, 1);
12458
12324
  }
12459
12325
  static far2Zfar(far) {
12460
- return jstatExports.normal.inv(far, 0, 1);
12326
+ return jStat.normal.inv(far, 0, 1);
12461
12327
  }
12462
12328
  static zhr2Hr(zhr) {
12463
- return jstatExports.normal.cdf(zhr, 0, 1);
12329
+ return jStat.normal.cdf(zhr, 0, 1);
12464
12330
  }
12465
12331
  static zfar2Far(zfar) {
12466
- return jstatExports.normal.cdf(zfar, 0, 1);
12332
+ return jStat.normal.cdf(zfar, 0, 1);
12467
12333
  }
12468
12334
  }
12469
12335
 
@@ -12484,7 +12350,7 @@
12484
12350
  Styles:
12485
12351
  ??
12486
12352
  */
12487
- class ROCSpace extends DetectableElement {
12353
+ class ROCSpace extends DecidablesMixinResizeable(DetectableElement) {
12488
12354
  static get properties() {
12489
12355
  return {
12490
12356
  contour: {
@@ -12536,21 +12402,6 @@
12536
12402
  attribute: false,
12537
12403
  type: Number,
12538
12404
  reflect: false
12539
- },
12540
- width: {
12541
- attribute: false,
12542
- type: Number,
12543
- reflect: false
12544
- },
12545
- height: {
12546
- attribute: false,
12547
- type: Number,
12548
- reflect: false
12549
- },
12550
- rem: {
12551
- attribute: false,
12552
- type: Number,
12553
- reflect: false
12554
12405
  }
12555
12406
  };
12556
12407
  }
@@ -12582,9 +12433,6 @@
12582
12433
  this.pointArray = [];
12583
12434
  this.isoDArray = [];
12584
12435
  this.isoCArray = [];
12585
- this.width = NaN;
12586
- this.height = NaN;
12587
- this.rem = NaN;
12588
12436
  this.alignState();
12589
12437
  }
12590
12438
  alignState() {
@@ -12671,7 +12519,7 @@
12671
12519
  this.requestUpdate();
12672
12520
  }
12673
12521
  static get styles() {
12674
- return [super.styles, r$1`
12522
+ return [super.styles, i$1`
12675
12523
  :host {
12676
12524
  display: inline-block;
12677
12525
 
@@ -12811,27 +12659,6 @@
12811
12659
  ${DetectableElement.svgFilters}
12812
12660
  `;
12813
12661
  }
12814
- getDimensions() {
12815
- this.width = parseFloat(this.getComputedStyleValue('width'), 10);
12816
- this.height = parseFloat(this.getComputedStyleValue('height'), 10);
12817
- this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
12818
- // console.log(`roc-space: width = ${this.width}, height = ${this.height}, rem = ${this.rem}`);
12819
- }
12820
-
12821
- connectedCallback() {
12822
- super.connectedCallback();
12823
- window.addEventListener('resize', this.getDimensions.bind(this));
12824
- }
12825
- disconnectedCallback() {
12826
- window.removeEventListener('resize', this.getDimensions.bind(this));
12827
- super.disconnectedCallback();
12828
- }
12829
- firstUpdated(changedProperties) {
12830
- super.firstUpdated(changedProperties);
12831
-
12832
- // Get the width and height after initial render/update has occurred
12833
- this.getDimensions();
12834
- }
12835
12662
  update(changedProperties) {
12836
12663
  super.update(changedProperties);
12837
12664
  this.alignState();
@@ -12964,7 +12791,7 @@
12964
12791
  const contours = Contours().size([n, n]).thresholds(contourThresholds);
12965
12792
  const contourColorStart = this.getComputedStyleValue(this.contour === 'bias' ? '---color-element-background' : this.contour === 'sensitivity' ? '---color-d' : this.contour === 'accuracy' ? '---color-acc-dark' : null);
12966
12793
  const contourColorEnd = this.getComputedStyleValue(this.contour === 'bias' ? '---color-c' : this.contour === 'sensitivity' ? '---color-element-background' : this.contour === 'accuracy' ? '---color-element-background' : null);
12967
- const contourColor = linear().domain(extent$1(contourThresholds)).interpolate(() => {
12794
+ const contourColor = linear().domain(extent(contourThresholds)).interpolate(() => {
12968
12795
  return interpolateRgb(contourColorStart, contourColorEnd);
12969
12796
  });
12970
12797
  // DATA-JOIN
@@ -13404,7 +13231,7 @@
13404
13231
  reflect: true
13405
13232
  },
13406
13233
  state: {
13407
- atribute: false,
13234
+ attribute: false,
13408
13235
  type: String,
13409
13236
  reflect: false
13410
13237
  }
@@ -13508,7 +13335,7 @@
13508
13335
  this.state = 'ended';
13509
13336
  }
13510
13337
  static get styles() {
13511
- return [super.styles, r$1`
13338
+ return [super.styles, i$1`
13512
13339
  :host {
13513
13340
  display: inline-block;
13514
13341
  }
@@ -13587,7 +13414,7 @@
13587
13414
  Styles:
13588
13415
  ??
13589
13416
  */
13590
- class SDTModel extends DetectableElement {
13417
+ class SDTModel extends DecidablesMixinResizeable(DetectableElement) {
13591
13418
  static get properties() {
13592
13419
  return {
13593
13420
  color: {
@@ -13664,21 +13491,6 @@
13664
13491
  attribute: false,
13665
13492
  type: Array,
13666
13493
  reflect: false
13667
- },
13668
- width: {
13669
- attribute: false,
13670
- type: Number,
13671
- reflect: false
13672
- },
13673
- height: {
13674
- attribute: false,
13675
- type: Number,
13676
- reflect: false
13677
- },
13678
- rem: {
13679
- attribute: false,
13680
- type: Number,
13681
- reflect: false
13682
13494
  }
13683
13495
  };
13684
13496
  }
@@ -13706,10 +13518,6 @@
13706
13518
  this.responses = ['present', 'absent']; // Allowable values of trial.response
13707
13519
  this.trials = []; // Array of simulated trials
13708
13520
 
13709
- this.width = NaN; // Width of component in pixels
13710
- this.height = NaN; // Height of component in pixels
13711
- this.rem = NaN; // Pixels per rem for component
13712
-
13713
13521
  // Private
13714
13522
  this.muN = NaN; // Mean of noise distribution
13715
13523
  this.muS = NaN; // Mean of signal distribution
@@ -13743,7 +13551,7 @@
13743
13551
  trial.duration = duration;
13744
13552
  trial.wait = wait;
13745
13553
  trial.iti = iti;
13746
- trial.evidence = jstatExports.normal.sample(0, 1);
13554
+ trial.evidence = jStat.normal.sample(0, 1);
13747
13555
  this.alignTrial(trial);
13748
13556
  this.trials.push(trial);
13749
13557
  this.requestUpdate();
@@ -13778,7 +13586,7 @@
13778
13586
  }
13779
13587
  }
13780
13588
  static get styles() {
13781
- return [super.styles, r$1`
13589
+ return [super.styles, i$1`
13782
13590
  :host {
13783
13591
  display: inline-block;
13784
13592
 
@@ -14044,27 +13852,6 @@
14044
13852
  bubbles: true
14045
13853
  }));
14046
13854
  }
14047
- getDimensions() {
14048
- this.width = parseFloat(this.getComputedStyleValue('width'), 10);
14049
- this.height = parseFloat(this.getComputedStyleValue('height'), 10);
14050
- this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
14051
- // console.log(`sdt-model: width = ${this.width}, height = ${this.height}, rem = ${this.rem}`);
14052
- }
14053
-
14054
- connectedCallback() {
14055
- super.connectedCallback();
14056
- window.addEventListener('resize', this.getDimensions.bind(this));
14057
- }
14058
- disconnectedCallback() {
14059
- window.removeEventListener('resize', this.getDimensions.bind(this));
14060
- super.disconnectedCallback();
14061
- }
14062
- firstUpdated(changedProperties) {
14063
- super.firstUpdated(changedProperties);
14064
-
14065
- // Get the width and height after initial render/update has occurred
14066
- this.getDimensions();
14067
- }
14068
13855
  update(changedProperties) {
14069
13856
  super.update(changedProperties);
14070
13857
  this.alignState();
@@ -14359,12 +14146,12 @@
14359
14146
  const correctRejections = range(xScale.domain()[0], SDTMath.c2L(element.c, element.s), 0.05).map(e => {
14360
14147
  return {
14361
14148
  e: e,
14362
- p: jstatExports.normal.pdf(e, SDTMath.d2MuN(element.d, element.s), 1)
14149
+ p: jStat.normal.pdf(e, SDTMath.d2MuN(element.d, element.s), 1)
14363
14150
  };
14364
14151
  });
14365
14152
  correctRejections.push({
14366
14153
  e: SDTMath.c2L(element.c, element.s),
14367
- p: jstatExports.normal.pdf(SDTMath.c2L(element.c, element.s), SDTMath.d2MuN(element.d, element.s), 1)
14154
+ p: jStat.normal.pdf(SDTMath.c2L(element.c, element.s), SDTMath.d2MuN(element.d, element.s), 1)
14368
14155
  });
14369
14156
  correctRejections.push({
14370
14157
  e: SDTMath.c2L(element.c, element.s),
@@ -14394,12 +14181,12 @@
14394
14181
  const falseAlarms = range(SDTMath.c2L(element.c, element.s), xScale.domain()[1], 0.05).map(e => {
14395
14182
  return {
14396
14183
  e: e,
14397
- p: jstatExports.normal.pdf(e, SDTMath.d2MuN(element.d, element.s), 1)
14184
+ p: jStat.normal.pdf(e, SDTMath.d2MuN(element.d, element.s), 1)
14398
14185
  };
14399
14186
  });
14400
14187
  falseAlarms.push({
14401
14188
  e: xScale.domain()[1],
14402
- p: jstatExports.normal.pdf(xScale.domain()[1], SDTMath.d2MuN(element.d, element.s), 1)
14189
+ p: jStat.normal.pdf(xScale.domain()[1], SDTMath.d2MuN(element.d, element.s), 1)
14403
14190
  });
14404
14191
  falseAlarms.push({
14405
14192
  e: xScale.domain()[1],
@@ -14427,12 +14214,12 @@
14427
14214
  const noise = range(xScale.domain()[0], xScale.domain()[1], 0.05).map(e => {
14428
14215
  return {
14429
14216
  e: e,
14430
- p: jstatExports.normal.pdf(e, SDTMath.d2MuN(element.d, element.s), 1)
14217
+ p: jStat.normal.pdf(e, SDTMath.d2MuN(element.d, element.s), 1)
14431
14218
  };
14432
14219
  });
14433
14220
  noise.push({
14434
14221
  e: xScale.domain()[1],
14435
- p: jstatExports.normal.pdf(xScale.domain()[1], SDTMath.d2MuN(element.d, element.s), 1)
14222
+ p: jStat.normal.pdf(xScale.domain()[1], SDTMath.d2MuN(element.d, element.s), 1)
14436
14223
  });
14437
14224
  return line$1(noise);
14438
14225
  };
@@ -14509,12 +14296,12 @@
14509
14296
  const misses = range(xScale.domain()[0], SDTMath.c2L(element.c, element.s), 0.05).map(e => {
14510
14297
  return {
14511
14298
  e: e,
14512
- p: jstatExports.normal.pdf(e, SDTMath.d2MuS(element.d, element.s), element.s)
14299
+ p: jStat.normal.pdf(e, SDTMath.d2MuS(element.d, element.s), element.s)
14513
14300
  };
14514
14301
  });
14515
14302
  misses.push({
14516
14303
  e: SDTMath.c2L(element.c, element.s),
14517
- p: jstatExports.normal.pdf(SDTMath.c2L(element.c, element.s), SDTMath.d2MuS(element.d, element.s), element.s)
14304
+ p: jStat.normal.pdf(SDTMath.c2L(element.c, element.s), SDTMath.d2MuS(element.d, element.s), element.s)
14518
14305
  });
14519
14306
  misses.push({
14520
14307
  e: SDTMath.c2L(element.c, element.s),
@@ -14544,12 +14331,12 @@
14544
14331
  const hits = range(SDTMath.c2L(element.c, element.s), xScale.domain()[1], 0.05).map(e => {
14545
14332
  return {
14546
14333
  e: e,
14547
- p: jstatExports.normal.pdf(e, SDTMath.d2MuS(element.d, element.s), element.s)
14334
+ p: jStat.normal.pdf(e, SDTMath.d2MuS(element.d, element.s), element.s)
14548
14335
  };
14549
14336
  });
14550
14337
  hits.push({
14551
14338
  e: xScale.domain()[1],
14552
- p: jstatExports.normal.pdf(xScale.domain()[1], SDTMath.d2MuS(element.d, element.s), element.s)
14339
+ p: jStat.normal.pdf(xScale.domain()[1], SDTMath.d2MuS(element.d, element.s), element.s)
14553
14340
  });
14554
14341
  hits.push({
14555
14342
  e: xScale.domain()[1],
@@ -14577,12 +14364,12 @@
14577
14364
  const signal = range(xScale.domain()[0], xScale.domain()[1], 0.05).map(e => {
14578
14365
  return {
14579
14366
  e: e,
14580
- p: jstatExports.normal.pdf(e, SDTMath.d2MuS(element.d, element.s), element.s)
14367
+ p: jStat.normal.pdf(e, SDTMath.d2MuS(element.d, element.s), element.s)
14581
14368
  };
14582
14369
  });
14583
14370
  signal.push({
14584
14371
  e: xScale.domain()[1],
14585
- p: jstatExports.normal.pdf(xScale.domain()[1], SDTMath.d2MuS(element.d, element.s), element.s)
14372
+ p: jStat.normal.pdf(xScale.domain()[1], SDTMath.d2MuS(element.d, element.s), element.s)
14586
14373
  });
14587
14374
  return line$1(signal);
14588
14375
  };
@@ -14664,13 +14451,13 @@
14664
14451
  sLabel.append('tspan').classed('value', true);
14665
14452
  // MERGE
14666
14453
  const sMerge = sEnter.merge(sUpdate);
14667
- sMerge.select('.line').transition().duration(this.drag ? 0 : transitionDuration).ease(cubicOut).attr('x1', xScale(this.muS - this.s)).attr('y1', yScale(jstatExports.normal.pdf(this.s, 0, this.s)) + 10 / this.s) // FIX - no hardcoding
14668
- .attr('x2', xScale(this.muS + this.s)).attr('y2', yScale(jstatExports.normal.pdf(this.s, 0, this.s)) + 10 / this.s); // FIX - no hardcoding
14669
- sMerge.select('.cap-left').transition().duration(this.drag ? 0 : transitionDuration).ease(cubicOut).attr('x1', xScale(this.muS - this.s)).attr('y1', yScale(jstatExports.normal.pdf(this.s, 0, this.s)) + 10 / this.s + 5) // FIX - no hardcoding
14670
- .attr('x2', xScale(this.muS - this.s)).attr('y2', yScale(jstatExports.normal.pdf(this.s, 0, this.s)) + 10 / this.s - 5); // FIX - no hardcoding
14671
- sMerge.select('.cap-right').transition().duration(this.drag ? 0 : transitionDuration).ease(cubicOut).attr('x1', xScale(this.muS + this.s)).attr('y1', yScale(jstatExports.normal.pdf(this.s, 0, this.s)) + 10 / this.s + 5) // FIX - no hardcoding
14672
- .attr('x2', xScale(this.muS + this.s)).attr('y2', yScale(jstatExports.normal.pdf(this.s, 0, this.s)) + 10 / this.s - 5); // FIX - no hardcoding
14673
- const sLabelTransition = sMerge.select('.label').transition().duration(this.drag ? 0 : transitionDuration).ease(cubicOut).attr('x', xScale(this.muS)).attr('y', yScale(jstatExports.normal.pdf(this.s, 0, this.s)) + 10 / this.s - 3); // FIX - no hardcoding
14454
+ sMerge.select('.line').transition().duration(this.drag ? 0 : transitionDuration).ease(cubicOut).attr('x1', xScale(this.muS - this.s)).attr('y1', yScale(jStat.normal.pdf(this.s, 0, this.s)) + 10 / this.s) // FIX - no hardcoding
14455
+ .attr('x2', xScale(this.muS + this.s)).attr('y2', yScale(jStat.normal.pdf(this.s, 0, this.s)) + 10 / this.s); // FIX - no hardcoding
14456
+ sMerge.select('.cap-left').transition().duration(this.drag ? 0 : transitionDuration).ease(cubicOut).attr('x1', xScale(this.muS - this.s)).attr('y1', yScale(jStat.normal.pdf(this.s, 0, this.s)) + 10 / this.s + 5) // FIX - no hardcoding
14457
+ .attr('x2', xScale(this.muS - this.s)).attr('y2', yScale(jStat.normal.pdf(this.s, 0, this.s)) + 10 / this.s - 5); // FIX - no hardcoding
14458
+ sMerge.select('.cap-right').transition().duration(this.drag ? 0 : transitionDuration).ease(cubicOut).attr('x1', xScale(this.muS + this.s)).attr('y1', yScale(jStat.normal.pdf(this.s, 0, this.s)) + 10 / this.s + 5) // FIX - no hardcoding
14459
+ .attr('x2', xScale(this.muS + this.s)).attr('y2', yScale(jStat.normal.pdf(this.s, 0, this.s)) + 10 / this.s - 5); // FIX - no hardcoding
14460
+ const sLabelTransition = sMerge.select('.label').transition().duration(this.drag ? 0 : transitionDuration).ease(cubicOut).attr('x', xScale(this.muS)).attr('y', yScale(jStat.normal.pdf(this.s, 0, this.s)) + 10 / this.s - 3); // FIX - no hardcoding
14674
14461
  sLabelTransition.select('.value').tween('text', (datum, index, elements) => {
14675
14462
  const element = elements[index];
14676
14463
  const interpolateS = interpolate$1(element.s !== undefined ? element.s : this.s, this.s);
@@ -15138,7 +14925,7 @@
15138
14925
  this.e = 0;
15139
14926
  }
15140
14927
  static get styles() {
15141
- return [super.styles, r$1`
14928
+ return [super.styles, i$1`
15142
14929
  :host {
15143
14930
  display: inline-block;
15144
14931
  }
@@ -15532,7 +15319,7 @@
15532
15319
  this.sendEvent();
15533
15320
  }
15534
15321
  static get styles() {
15535
- return [super.styles, r$1`
15322
+ return [super.styles, i$1`
15536
15323
  :host {
15537
15324
  display: inline-block;
15538
15325
  }
@@ -15905,7 +15692,7 @@
15905
15692
  this.numeric = false;
15906
15693
  }
15907
15694
  static get styles() {
15908
- return [super.styles, r$1`
15695
+ return [super.styles, i$1`
15909
15696
  :host {
15910
15697
  display: block;
15911
15698
 
@@ -17260,7 +17047,7 @@
17260
17047
  */
17261
17048
  class SDTExample extends DetectableElement {
17262
17049
  static get styles() {
17263
- return [super.styles, r$1`
17050
+ return [super.styles, i$1`
17264
17051
  :host {
17265
17052
  display: inline-block;
17266
17053