@decidables/detectable-elements 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,13 +9,13 @@
9
9
  * Copyright 2019 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
11
  */
12
- const t$1 = window,
12
+ const t$1 = globalThis,
13
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
- constructor(t, e, n) {
18
- if (this._$cssResult$ = !0, n !== s$3) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
14
+ s$2 = Symbol(),
15
+ o$3 = new WeakMap();
16
+ let n$2 = class n {
17
+ constructor(t, e, o) {
18
+ if (this._$cssResult$ = !0, o !== s$2) 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() {
@@ -23,7 +23,7 @@
23
23
  const s = this.t;
24
24
  if (e$2 && void 0 === t) {
25
25
  const e = void 0 !== s && 1 === s.length;
26
- e && (t = n$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$3.set(s, t));
26
+ e && (t = o$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$3.set(s, t));
27
27
  }
28
28
  return t;
29
29
  }
@@ -31,26 +31,26 @@
31
31
  return this.cssText;
32
32
  }
33
33
  };
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 => {
34
+ const r$3 = t => new n$2("string" == typeof t ? t : t + "", void 0, s$2),
35
+ i$2 = (t, ...e) => {
36
+ const o = 1 === t.length ? t[0] : e.reduce((e, s, o) => e + (t => {
37
37
  if (!0 === t._$cssResult$) return t.cssText;
38
38
  if ("number" == typeof t) return t;
39
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);
40
+ })(s) + t[o + 1], t[0]);
41
+ return new n$2(o, t, s$2);
42
42
  },
43
- S$1 = (s, n) => {
44
- e$2 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
45
- const n = document.createElement("style"),
46
- o = t$1.litNonce;
47
- void 0 !== o && n.setAttribute("nonce", o), n.textContent = e.cssText, s.appendChild(n);
48
- });
43
+ S$1 = (s, o) => {
44
+ if (e$2) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
45
+ const o = document.createElement("style"),
46
+ n = t$1.litNonce;
47
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
48
+ }
49
49
  },
50
- c$1 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
50
+ c$2 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
51
51
  let e = "";
52
52
  for (const s of t.cssRules) e += s.cssText;
53
- return r$2(e);
53
+ return r$3(e);
54
54
  })(t) : t;
55
55
 
56
56
  /**
@@ -58,16 +58,24 @@
58
58
  * Copyright 2017 Google LLC
59
59
  * SPDX-License-Identifier: BSD-3-Clause
60
60
  */
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 = {
67
- toAttribute(t, i) {
68
- switch (i) {
61
+ const {
62
+ is: i$1,
63
+ defineProperty: e$1,
64
+ getOwnPropertyDescriptor: r$2,
65
+ getOwnPropertyNames: h$1,
66
+ getOwnPropertySymbols: o$2,
67
+ getPrototypeOf: n$1
68
+ } = Object,
69
+ a$1 = globalThis,
70
+ c$1 = a$1.trustedTypes,
71
+ l$1 = c$1 ? c$1.emptyScript : "",
72
+ p$1 = a$1.reactiveElementPolyfillSupport,
73
+ d$1 = (t, s) => t,
74
+ u$1 = {
75
+ toAttribute(t, s) {
76
+ switch (s) {
69
77
  case Boolean:
70
- t = t ? h$1 : null;
78
+ t = t ? l$1 : null;
71
79
  break;
72
80
  case Object:
73
81
  case Array:
@@ -75,165 +83,177 @@
75
83
  }
76
84
  return t;
77
85
  },
78
- fromAttribute(t, i) {
79
- let s = t;
80
- switch (i) {
86
+ fromAttribute(t, s) {
87
+ let i = t;
88
+ switch (s) {
81
89
  case Boolean:
82
- s = null !== t;
90
+ i = null !== t;
83
91
  break;
84
92
  case Number:
85
- s = null === t ? null : Number(t);
93
+ i = null === t ? null : Number(t);
86
94
  break;
87
95
  case Object:
88
96
  case Array:
89
97
  try {
90
- s = JSON.parse(t);
98
+ i = JSON.parse(t);
91
99
  } catch (t) {
92
- s = null;
100
+ i = null;
93
101
  }
94
102
  }
95
- return s;
103
+ return i;
96
104
  }
97
105
  },
98
- a$1 = (t, i) => i !== t && (i == i || t == t),
99
- l$3 = {
106
+ f$1 = (t, s) => !i$1(t, s),
107
+ y$2 = {
100
108
  attribute: !0,
101
109
  type: String,
102
- converter: n$2,
110
+ converter: u$1,
103
111
  reflect: !1,
104
- hasChanged: a$1
105
- },
106
- d$1 = "finalized";
107
- let u$1 = class u extends HTMLElement {
108
- constructor() {
109
- super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
110
- }
112
+ hasChanged: f$1
113
+ };
114
+ Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap();
115
+ let b$1 = class b extends HTMLElement {
111
116
  static addInitializer(t) {
112
- var i;
113
- this.finalize(), (null !== (i = this.h) && void 0 !== i ? i : this.h = []).push(t);
117
+ this._$Ei(), (this.l ??= []).push(t);
114
118
  }
115
119
  static get observedAttributes() {
116
- this.finalize();
117
- const t = [];
118
- return this.elementProperties.forEach((i, s) => {
119
- const e = this._$Ep(s, i);
120
- void 0 !== e && (this._$Ev.set(e, s), t.push(e));
121
- }), t;
122
- }
123
- static createProperty(t, i = l$3) {
124
- if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
125
- const s = "symbol" == typeof t ? Symbol() : "__" + t,
126
- e = this.getPropertyDescriptor(t, s, i);
127
- void 0 !== e && Object.defineProperty(this.prototype, t, e);
120
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
121
+ }
122
+ static createProperty(t, s = y$2) {
123
+ if (s.state && (s.attribute = !1), this._$Ei(), this.elementProperties.set(t, s), !s.noAccessor) {
124
+ const i = Symbol(),
125
+ r = this.getPropertyDescriptor(t, i, s);
126
+ void 0 !== r && e$1(this.prototype, t, r);
128
127
  }
129
128
  }
130
- static getPropertyDescriptor(t, i, s) {
129
+ static getPropertyDescriptor(t, s, i) {
130
+ const {
131
+ get: e,
132
+ set: h
133
+ } = r$2(this.prototype, t) ?? {
134
+ get() {
135
+ return this[s];
136
+ },
137
+ set(t) {
138
+ this[s] = t;
139
+ }
140
+ };
131
141
  return {
132
142
  get() {
133
- return this[i];
143
+ return e?.call(this);
134
144
  },
135
- set(e) {
136
- const r = this[t];
137
- this[i] = e, this.requestUpdate(t, r, s);
145
+ set(s) {
146
+ const r = e?.call(this);
147
+ h.call(this, s), this.requestUpdate(t, r, i);
138
148
  },
139
149
  configurable: !0,
140
150
  enumerable: !0
141
151
  };
142
152
  }
143
153
  static getPropertyOptions(t) {
144
- return this.elementProperties.get(t) || l$3;
154
+ return this.elementProperties.get(t) ?? y$2;
155
+ }
156
+ static _$Ei() {
157
+ if (this.hasOwnProperty(d$1("elementProperties"))) return;
158
+ const t = n$1(this);
159
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
145
160
  }
146
161
  static finalize() {
147
- if (this.hasOwnProperty(d$1)) return !1;
148
- this[d$1] = !0;
149
- const t = Object.getPrototypeOf(this);
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")) {
162
+ if (this.hasOwnProperty(d$1("finalized"))) return;
163
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
151
164
  const t = this.properties,
152
- i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
153
- for (const s of i) this.createProperty(s, t[s]);
165
+ s = [...h$1(t), ...o$2(t)];
166
+ for (const i of s) this.createProperty(i, t[i]);
154
167
  }
155
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
156
- }
157
- static finalizeStyles(i) {
158
- const s = [];
159
- if (Array.isArray(i)) {
160
- const e = new Set(i.flat(1 / 0).reverse());
161
- for (const i of e) s.unshift(c$1(i));
162
- } else void 0 !== i && s.push(c$1(i));
163
- return s;
168
+ const t = this[Symbol.metadata];
169
+ if (null !== t) {
170
+ const s = litPropertyMetadata.get(t);
171
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
172
+ }
173
+ this._$Eh = new Map();
174
+ for (const [t, s] of this.elementProperties) {
175
+ const i = this._$Eu(t, s);
176
+ void 0 !== i && this._$Eh.set(i, t);
177
+ }
178
+ this.elementStyles = this.finalizeStyles(this.styles);
164
179
  }
165
- static _$Ep(t, i) {
166
- const s = i.attribute;
167
- return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
180
+ static finalizeStyles(s) {
181
+ const i = [];
182
+ if (Array.isArray(s)) {
183
+ const e = new Set(s.flat(1 / 0).reverse());
184
+ for (const s of e) i.unshift(c$2(s));
185
+ } else void 0 !== s && i.push(c$2(s));
186
+ return i;
168
187
  }
169
- _$Eu() {
170
- var t;
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));
188
+ static _$Eu(t, s) {
189
+ const i = s.attribute;
190
+ return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
191
+ }
192
+ constructor() {
193
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
194
+ }
195
+ _$Ev() {
196
+ this._$Eg = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$ES(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
172
197
  }
173
198
  addController(t) {
174
- var i, s;
175
- (null !== (i = this._$ES) && void 0 !== i ? i : this._$ES = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
199
+ (this._$E_ ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
176
200
  }
177
201
  removeController(t) {
178
- var i;
179
- null === (i = this._$ES) || void 0 === i || i.splice(this._$ES.indexOf(t) >>> 0, 1);
202
+ this._$E_?.delete(t);
180
203
  }
181
- _$Eg() {
182
- this.constructor.elementProperties.forEach((t, i) => {
183
- this.hasOwnProperty(i) && (this._$Ei.set(i, this[i]), delete this[i]);
184
- });
204
+ _$ES() {
205
+ const t = new Map(),
206
+ s = this.constructor.elementProperties;
207
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
208
+ t.size > 0 && (this._$Ep = t);
185
209
  }
186
210
  createRenderRoot() {
187
- var t;
188
- const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
189
- return S$1(s, this.constructor.elementStyles), s;
211
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
212
+ return S$1(t, this.constructor.elementStyles), t;
190
213
  }
191
214
  connectedCallback() {
192
- var t;
193
- void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
194
- var i;
195
- return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
196
- });
215
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$E_?.forEach(t => t.hostConnected?.());
197
216
  }
198
217
  enableUpdating(t) {}
199
218
  disconnectedCallback() {
200
- var t;
201
- null === (t = this._$ES) || void 0 === t || t.forEach(t => {
202
- var i;
203
- return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
204
- });
219
+ this._$E_?.forEach(t => t.hostDisconnected?.());
205
220
  }
206
- attributeChangedCallback(t, i, s) {
207
- this._$AK(t, s);
221
+ attributeChangedCallback(t, s, i) {
222
+ this._$AK(t, i);
208
223
  }
209
- _$EO(t, i, s = l$3) {
210
- var e;
211
- const r = this.constructor._$Ep(t, s);
212
- if (void 0 !== r && !0 === s.reflect) {
213
- const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$2).toAttribute(i, s.type);
214
- this._$El = t, null == h ? this.removeAttribute(r) : this.setAttribute(r, h), this._$El = null;
224
+ _$EO(t, s) {
225
+ const i = this.constructor.elementProperties.get(t),
226
+ e = this.constructor._$Eu(t, i);
227
+ if (void 0 !== e && !0 === i.reflect) {
228
+ const r = (void 0 !== i.converter?.toAttribute ? i.converter : u$1).toAttribute(s, i.type);
229
+ this._$Em = t, null == r ? this.removeAttribute(e) : this.setAttribute(e, r), this._$Em = null;
215
230
  }
216
231
  }
217
- _$AK(t, i) {
218
- var s;
219
- const e = this.constructor,
220
- r = e._$Ev.get(t);
221
- if (void 0 !== r && this._$El !== r) {
222
- const t = e.getPropertyOptions(r),
223
- h = "function" == typeof t.converter ? {
232
+ _$AK(t, s) {
233
+ const i = this.constructor,
234
+ e = i._$Eh.get(t);
235
+ if (void 0 !== e && this._$Em !== e) {
236
+ const t = i.getPropertyOptions(e),
237
+ r = "function" == typeof t.converter ? {
224
238
  fromAttribute: t.converter
225
- } : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$2;
226
- this._$El = r, this[r] = h.fromAttribute(i, t.type), this._$El = null;
239
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u$1;
240
+ this._$Em = e, this[e] = r.fromAttribute(s, t.type), this._$Em = null;
241
+ }
242
+ }
243
+ requestUpdate(t, s, i, e = !1, r) {
244
+ if (void 0 !== t) {
245
+ if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(e ? r : this[t], s)) return;
246
+ this.C(t, s, i);
227
247
  }
248
+ !1 === this.isUpdatePending && (this._$Eg = this._$EP());
228
249
  }
229
- requestUpdate(t, i, s) {
230
- let e = !0;
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());
250
+ C(t, s, i) {
251
+ this._$AL.has(t) || this._$AL.set(t, s), !0 === i.reflect && this._$Em !== t && (this._$Ej ??= new Set()).add(t);
232
252
  }
233
- async _$Ej() {
253
+ async _$EP() {
234
254
  this.isUpdatePending = !0;
235
255
  try {
236
- await this._$E_;
256
+ await this._$Eg;
237
257
  } catch (t) {
238
258
  Promise.reject(t);
239
259
  }
@@ -244,192 +264,182 @@
244
264
  return this.performUpdate();
245
265
  }
246
266
  performUpdate() {
247
- var t;
248
267
  if (!this.isUpdatePending) return;
249
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((t, i) => this[i] = t), this._$Ei = void 0);
250
- let i = !1;
268
+ if (!this.hasUpdated) {
269
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
270
+ for (const [t, s] of this._$Ep) this[t] = s;
271
+ this._$Ep = void 0;
272
+ }
273
+ const t = this.constructor.elementProperties;
274
+ if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.C(s, this[s], i);
275
+ }
276
+ let t = !1;
251
277
  const s = this._$AL;
252
278
  try {
253
- i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
254
- var i;
255
- return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
256
- }), this.update(s)) : this._$Ek();
257
- } catch (t) {
258
- throw i = !1, this._$Ek(), t;
279
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$E_?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$ET();
280
+ } catch (s) {
281
+ throw t = !1, this._$ET(), s;
259
282
  }
260
- i && this._$AE(s);
283
+ t && this._$AE(s);
261
284
  }
262
285
  willUpdate(t) {}
263
286
  _$AE(t) {
264
- var i;
265
- null === (i = this._$ES) || void 0 === i || i.forEach(t => {
266
- var i;
267
- return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
268
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
287
+ this._$E_?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
269
288
  }
270
- _$Ek() {
289
+ _$ET() {
271
290
  this._$AL = new Map(), this.isUpdatePending = !1;
272
291
  }
273
292
  get updateComplete() {
274
293
  return this.getUpdateComplete();
275
294
  }
276
295
  getUpdateComplete() {
277
- return this._$E_;
296
+ return this._$Eg;
278
297
  }
279
298
  shouldUpdate(t) {
280
299
  return !0;
281
300
  }
282
301
  update(t) {
283
- void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$EO(i, this[i], t)), this._$EC = void 0), this._$Ek();
302
+ this._$Ej &&= this._$Ej.forEach(t => this._$EO(t, this[t])), this._$ET();
284
303
  }
285
304
  updated(t) {}
286
305
  firstUpdated(t) {}
287
306
  };
288
- u$1[d$1] = !0, u$1.elementProperties = new Map(), u$1.elementStyles = [], u$1.shadowRootOptions = {
307
+ b$1.elementStyles = [], b$1.shadowRootOptions = {
289
308
  mode: "open"
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");
309
+ }, b$1[d$1("elementProperties")] = new Map(), b$1[d$1("finalized")] = new Map(), p$1?.({
310
+ ReactiveElement: b$1
311
+ }), (a$1.reactiveElementVersions ??= []).push("2.0.2");
293
312
 
294
313
  /**
295
314
  * @license
296
315
  * Copyright 2017 Google LLC
297
316
  * SPDX-License-Identifier: BSD-3-Clause
298
317
  */
299
- var t;
300
- const i = window,
301
- s$1 = i.trustedTypes,
302
- e = s$1 ? s$1.createPolicy("lit-html", {
318
+ const t = globalThis,
319
+ i = t.trustedTypes,
320
+ s$1 = i ? i.createPolicy("lit-html", {
303
321
  createHTML: t => t
304
322
  }) : void 0,
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,
312
- c = Array.isArray,
313
- v = t => c(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
314
- a = "[ \t\n\f\r]",
323
+ e = "$lit$",
324
+ h = `lit$${(Math.random() + "").slice(9)}$`,
325
+ o$1 = "?" + h,
326
+ n = `<${o$1}>`,
327
+ r$1 = document,
328
+ l = () => r$1.createComment(""),
329
+ c = t => null === t || "object" != typeof t && "function" != typeof t,
330
+ a = Array.isArray,
331
+ u = t => a(t) || "function" == typeof t?.[Symbol.iterator],
332
+ d = "[ \t\n\f\r]",
315
333
  f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
316
- _ = /-->/g,
317
- m = />/g,
318
- p = RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
319
- g = /'/g,
320
- $ = /"/g,
321
- y$1 = /^(?:script|style|textarea|title)$/i,
322
- w = t => (i, ...s) => ({
334
+ v = /-->/g,
335
+ _ = />/g,
336
+ m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
337
+ p = /'/g,
338
+ g = /"/g,
339
+ $ = /^(?:script|style|textarea|title)$/i,
340
+ y$1 = t => (i, ...s) => ({
323
341
  _$litType$: t,
324
342
  strings: i,
325
343
  values: s
326
344
  }),
327
- x$1 = w(1),
328
- b = w(2),
329
- T = Symbol.for("lit-noChange"),
330
- A = Symbol.for("lit-nothing"),
331
- E = new WeakMap(),
332
- C = r.createTreeWalker(r, 129, null, !1);
333
- function P(t, i) {
345
+ x$1 = y$1(1),
346
+ b = y$1(2),
347
+ w = Symbol.for("lit-noChange"),
348
+ T = Symbol.for("lit-nothing"),
349
+ A = new WeakMap(),
350
+ E = r$1.createTreeWalker(r$1, 129);
351
+ function C(t, i) {
334
352
  if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
335
- return void 0 !== e ? e.createHTML(i) : i;
353
+ return void 0 !== s$1 ? s$1.createHTML(i) : i;
336
354
  }
337
- const V = (t, i) => {
355
+ const P = (t, i) => {
338
356
  const s = t.length - 1,
339
- e = [];
340
- let l,
341
- r = 2 === i ? "<svg>" : "",
342
- u = f;
357
+ o = [];
358
+ let r,
359
+ l = 2 === i ? "<svg>" : "",
360
+ c = f;
343
361
  for (let i = 0; i < s; i++) {
344
362
  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];
363
+ let a,
364
+ u,
365
+ d = -1,
366
+ y = 0;
367
+ for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r ?? f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
368
+ const x = c === m && t[i + 1].startsWith("/>") ? " " : "";
369
+ l += c === f ? s + n : d >= 0 ? (o.push(a), s.slice(0, d) + e + s.slice(d) + h + x) : s + h + (-2 === d ? i : x);
370
+ }
371
+ return [C(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), o];
354
372
  };
355
- class N {
373
+ class V {
356
374
  constructor({
357
375
  strings: t,
358
- _$litType$: i
359
- }, e) {
360
- let h;
376
+ _$litType$: s
377
+ }, n) {
378
+ let r;
361
379
  this.parts = [];
362
- let r = 0,
363
- d = 0;
364
- const c = t.length - 1,
365
- v = this.parts,
366
- [a, f] = V(t, i);
367
- if (this.el = N.createElement(a, e), C.currentNode = this.el.content, 2 === i) {
368
- const t = this.el.content,
369
- i = t.firstChild;
370
- i.remove(), t.append(...i.childNodes);
380
+ let c = 0,
381
+ a = 0;
382
+ const u = t.length - 1,
383
+ d = this.parts,
384
+ [f, v] = P(t, s);
385
+ if (this.el = V.createElement(f, n), E.currentNode = this.el.content, 2 === s) {
386
+ const t = this.el.content.firstChild;
387
+ t.replaceWith(...t.childNodes);
371
388
  }
372
- for (; null !== (h = C.nextNode()) && v.length < c;) {
373
- if (1 === h.nodeType) {
374
- if (h.hasAttributes()) {
375
- const t = [];
376
- for (const i of h.getAttributeNames()) if (i.endsWith(o$1) || i.startsWith(n$1)) {
377
- const s = f[d++];
378
- if (t.push(i), void 0 !== s) {
379
- const t = h.getAttribute(s.toLowerCase() + o$1).split(n$1),
380
- i = /([.?@])?(.*)/.exec(s);
381
- v.push({
382
- type: 1,
383
- index: r,
384
- name: i[2],
385
- strings: t,
386
- ctor: "." === i[1] ? H : "?" === i[1] ? L : "@" === i[1] ? z : k
387
- });
388
- } else v.push({
389
- type: 6,
390
- index: r
391
- });
392
- }
393
- for (const i of t) h.removeAttribute(i);
394
- }
395
- if (y$1.test(h.tagName)) {
396
- const t = h.textContent.split(n$1),
397
- i = t.length - 1;
398
- if (i > 0) {
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({
389
+ for (; null !== (r = E.nextNode()) && d.length < u;) {
390
+ if (1 === r.nodeType) {
391
+ if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e)) {
392
+ const i = v[a++],
393
+ s = r.getAttribute(t).split(h),
394
+ e = /([.?@])?(.*)/.exec(i);
395
+ d.push({
396
+ type: 1,
397
+ index: c,
398
+ name: e[2],
399
+ strings: s,
400
+ ctor: "." === e[1] ? k : "?" === e[1] ? H : "@" === e[1] ? I : R
401
+ }), r.removeAttribute(t);
402
+ } else t.startsWith(h) && (d.push({
403
+ type: 6,
404
+ index: c
405
+ }), r.removeAttribute(t));
406
+ if ($.test(r.tagName)) {
407
+ const t = r.textContent.split(h),
408
+ s = t.length - 1;
409
+ if (s > 0) {
410
+ r.textContent = i ? i.emptyScript : "";
411
+ for (let i = 0; i < s; i++) r.append(t[i], l()), E.nextNode(), d.push({
401
412
  type: 2,
402
- index: ++r
413
+ index: ++c
403
414
  });
404
- h.append(t[i], u());
415
+ r.append(t[s], l());
405
416
  }
406
417
  }
407
- } else if (8 === h.nodeType) if (h.data === l$2) v.push({
418
+ } else if (8 === r.nodeType) if (r.data === o$1) d.push({
408
419
  type: 2,
409
- index: r
420
+ index: c
410
421
  });else {
411
422
  let t = -1;
412
- for (; -1 !== (t = h.data.indexOf(n$1, t + 1));) v.push({
423
+ for (; -1 !== (t = r.data.indexOf(h, t + 1));) d.push({
413
424
  type: 7,
414
- index: r
415
- }), t += n$1.length - 1;
425
+ index: c
426
+ }), t += h.length - 1;
416
427
  }
417
- r++;
428
+ c++;
418
429
  }
419
430
  }
420
431
  static createElement(t, i) {
421
- const s = r.createElement("template");
432
+ const s = r$1.createElement("template");
422
433
  return s.innerHTML = t, s;
423
434
  }
424
435
  }
425
- function S(t, i, s = t, e) {
426
- var o, n, l, h;
427
- if (i === T) return i;
428
- let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
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;
436
+ function N(t, i, s = t, e) {
437
+ if (i === w) return i;
438
+ let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
439
+ const o = c(i) ? void 0 : i._$litDirective$;
440
+ return h?.constructor !== o && (h?._$AO?.(!1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = N(t, h._$AS(t, i.values), h, e)), i;
431
441
  }
432
- class M {
442
+ class S {
433
443
  constructor(t, i) {
434
444
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
435
445
  }
@@ -440,46 +450,43 @@
440
450
  return this._$AM._$AU;
441
451
  }
442
452
  u(t) {
443
- var i;
444
453
  const {
445
454
  el: {
446
- content: s
455
+ content: i
447
456
  },
448
- parts: e
457
+ parts: s
449
458
  } = this._$AD,
450
- o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r).importNode(s, !0);
451
- C.currentNode = o;
452
- let n = C.nextNode(),
453
- l = 0,
454
- h = 0,
455
- u = e[0];
456
- for (; void 0 !== u;) {
457
- if (l === u.index) {
459
+ e = (t?.creationScope ?? r$1).importNode(i, !0);
460
+ E.currentNode = e;
461
+ let h = E.nextNode(),
462
+ o = 0,
463
+ n = 0,
464
+ l = s[0];
465
+ for (; void 0 !== l;) {
466
+ if (o === l.index) {
458
467
  let i;
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];
468
+ 2 === l.type ? i = new M(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new L(h, this, t)), this._$AV.push(i), l = s[++n];
460
469
  }
461
- l !== (null == u ? void 0 : u.index) && (n = C.nextNode(), l++);
470
+ o !== l?.index && (h = E.nextNode(), o++);
462
471
  }
463
- return C.currentNode = r, o;
472
+ return E.currentNode = r$1, e;
464
473
  }
465
- v(t) {
474
+ p(t) {
466
475
  let i = 0;
467
476
  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++;
468
477
  }
469
478
  }
470
- class R {
471
- constructor(t, i, s, e) {
472
- var 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;
474
- }
479
+ class M {
475
480
  get _$AU() {
476
- var t, i;
477
- return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cp;
481
+ return this._$AM?._$AU ?? this._$Cv;
482
+ }
483
+ constructor(t, i, s, e) {
484
+ this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
478
485
  }
479
486
  get parentNode() {
480
487
  let t = this._$AA.parentNode;
481
488
  const i = this._$AM;
482
- return void 0 !== i && 11 === (null == t ? void 0 : t.nodeType) && (t = i.parentNode), t;
489
+ return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
483
490
  }
484
491
  get startNode() {
485
492
  return this._$AA;
@@ -488,7 +495,7 @@
488
495
  return this._$AB;
489
496
  }
490
497
  _$AI(t, i = this) {
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);
498
+ t = N(this, t, i), c(t) ? t === T || null == t || "" === t ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== w && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : u(t) ? this.T(t) : this._(t);
492
499
  }
493
500
  k(t) {
494
501
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -497,104 +504,98 @@
497
504
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
498
505
  }
499
506
  _(t) {
500
- this._$AH !== A && d(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r.createTextNode(t)), this._$AH = t;
507
+ this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r$1.createTextNode(t)), this._$AH = t;
501
508
  }
502
509
  g(t) {
503
- var i;
504
510
  const {
505
- values: s,
506
- _$litType$: e
511
+ values: i,
512
+ _$litType$: s
507
513
  } = 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;
514
+ e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = V.createElement(C(s.h, s.h[0]), this.options)), s);
515
+ if (this._$AH?._$AD === e) this._$AH.p(i);else {
516
+ const t = new S(e, this),
517
+ s = t.u(this.options);
518
+ t.p(i), this.$(s), this._$AH = t;
513
519
  }
514
520
  }
515
521
  _$AC(t) {
516
- let i = E.get(t.strings);
517
- return void 0 === i && E.set(t.strings, i = new N(t)), i;
522
+ let i = A.get(t.strings);
523
+ return void 0 === i && A.set(t.strings, i = new V(t)), i;
518
524
  }
519
525
  T(t) {
520
- c(this._$AH) || (this._$AH = [], this._$AR());
526
+ a(this._$AH) || (this._$AH = [], this._$AR());
521
527
  const i = this._$AH;
522
528
  let s,
523
529
  e = 0;
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++;
530
+ for (const h of t) e === i.length ? i.push(s = new M(this.k(l()), this.k(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
525
531
  e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
526
532
  }
527
533
  _$AR(t = this._$AA.nextSibling, i) {
528
- var s;
529
- for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
534
+ for (this._$AP?.(!1, !0, i); t && t !== this._$AB;) {
530
535
  const i = t.nextSibling;
531
536
  t.remove(), t = i;
532
537
  }
533
538
  }
534
539
  setConnected(t) {
535
- var i;
536
- void 0 === this._$AM && (this._$Cp = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
540
+ void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
537
541
  }
538
542
  }
539
- class k {
540
- constructor(t, i, s, e, o) {
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;
542
- }
543
+ class R {
543
544
  get tagName() {
544
545
  return this.element.tagName;
545
546
  }
546
547
  get _$AU() {
547
548
  return this._$AM._$AU;
548
549
  }
550
+ constructor(t, i, s, e, h) {
551
+ this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = T;
552
+ }
549
553
  _$AI(t, i = this, s, e) {
550
- const o = this.strings;
551
- let n = !1;
552
- if (void 0 === o) t = S(this, t, i, 0), n = !d(t) || t !== this._$AH && t !== T, n && (this._$AH = t);else {
554
+ const h = this.strings;
555
+ let o = !1;
556
+ if (void 0 === h) t = N(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== w, o && (this._$AH = t);else {
553
557
  const e = t;
554
- let 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;
558
+ let n, r;
559
+ for (t = h[0], n = 0; n < h.length - 1; n++) r = N(this, e[s + n], i, n), r === w && (r = this._$AH[n]), o ||= !c(r) || r !== this._$AH[n], r === T ? t = T : t !== T && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
556
560
  }
557
- n && !e && this.j(t);
561
+ o && !e && this.O(t);
558
562
  }
559
- j(t) {
560
- t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
563
+ O(t) {
564
+ t === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
561
565
  }
562
566
  }
563
- class H extends k {
567
+ class k extends R {
564
568
  constructor() {
565
569
  super(...arguments), this.type = 3;
566
570
  }
567
- j(t) {
568
- this.element[this.name] = t === A ? void 0 : t;
571
+ O(t) {
572
+ this.element[this.name] = t === T ? void 0 : t;
569
573
  }
570
574
  }
571
- const I = s$1 ? s$1.emptyScript : "";
572
- class L extends k {
575
+ class H extends R {
573
576
  constructor() {
574
577
  super(...arguments), this.type = 4;
575
578
  }
576
- j(t) {
577
- t && t !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name);
579
+ O(t) {
580
+ this.element.toggleAttribute(this.name, !!t && t !== T);
578
581
  }
579
582
  }
580
- class z extends k {
581
- constructor(t, i, s, e, o) {
582
- super(t, i, s, e, o), this.type = 5;
583
+ class I extends R {
584
+ constructor(t, i, s, e, h) {
585
+ super(t, i, s, e, h), this.type = 5;
583
586
  }
584
587
  _$AI(t, i = this) {
585
- var s;
586
- if ((t = null !== (s = S(this, t, i, 0)) && void 0 !== s ? s : A) === T) return;
587
- const e = this._$AH,
588
- o = t === A && e !== A || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
589
- n = t !== A && (e === A || o);
590
- o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
588
+ if ((t = N(this, t, i, 0) ?? T) === w) return;
589
+ const s = this._$AH,
590
+ e = t === T && s !== T || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
591
+ h = t !== T && (s === T || e);
592
+ e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
591
593
  }
592
594
  handleEvent(t) {
593
- var i, s;
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);
595
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
595
596
  }
596
597
  }
597
- class Z {
598
+ class L {
598
599
  constructor(t, i, s) {
599
600
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
600
601
  }
@@ -602,20 +603,19 @@
602
603
  return this._$AM._$AU;
603
604
  }
604
605
  _$AI(t) {
605
- S(this, t);
606
+ N(this, t);
606
607
  }
607
608
  }
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) => {
611
- var e, o;
612
- const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
613
- let l = n._$litPart$;
614
- if (void 0 === l) {
615
- const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
616
- n._$litPart$ = l = new R(i.insertBefore(u(), t), t, void 0, null != s ? s : {});
609
+ const Z = t.litHtmlPolyfillSupport;
610
+ Z?.(V, M), (t.litHtmlVersions ??= []).push("3.1.0");
611
+ const j = (t, i, s) => {
612
+ const e = s?.renderBefore ?? i;
613
+ let h = e._$litPart$;
614
+ if (void 0 === h) {
615
+ const t = s?.renderBefore ?? null;
616
+ e._$litPart$ = h = new M(i.insertBefore(l(), t), t, void 0, s ?? {});
617
617
  }
618
- return l._$AI(t), l;
618
+ return h._$AI(t), h;
619
619
  };
620
620
 
621
621
  /**
@@ -623,42 +623,38 @@
623
623
  * Copyright 2017 Google LLC
624
624
  * SPDX-License-Identifier: BSD-3-Clause
625
625
  */
626
- var l$1, o;
627
- class s extends u$1 {
626
+ class s extends b$1 {
628
627
  constructor() {
629
628
  super(...arguments), this.renderOptions = {
630
629
  host: this
631
630
  }, this._$Do = void 0;
632
631
  }
633
632
  createRenderRoot() {
634
- var t, e;
635
- const i = super.createRenderRoot();
636
- return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
633
+ const t = super.createRenderRoot();
634
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
637
635
  }
638
636
  update(t) {
639
637
  const i = this.render();
640
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = D(i, this.renderRoot, this.renderOptions);
638
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = j(i, this.renderRoot, this.renderOptions);
641
639
  }
642
640
  connectedCallback() {
643
- var t;
644
- super.connectedCallback(), null === (t = this._$Do) || void 0 === t || t.setConnected(!0);
641
+ super.connectedCallback(), this._$Do?.setConnected(!0);
645
642
  }
646
643
  disconnectedCallback() {
647
- var t;
648
- super.disconnectedCallback(), null === (t = this._$Do) || void 0 === t || t.setConnected(!1);
644
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
649
645
  }
650
646
  render() {
651
- return T;
647
+ return w;
652
648
  }
653
649
  }
654
- s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
650
+ s._$litElement$ = !0, s[("finalized")] = !0, globalThis.litElementHydrateSupport?.({
655
651
  LitElement: s
656
652
  });
657
- const n = globalThis.litElementPolyfillSupport;
658
- null == n || n({
653
+ const r = globalThis.litElementPolyfillSupport;
654
+ r?.({
659
655
  LitElement: s
660
656
  });
661
- (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.3");
657
+ (globalThis.litElementVersions ??= []).push("4.0.2");
662
658
 
663
659
  function ascending$2(a, b) {
664
660
  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
@@ -4930,7 +4926,6 @@
4930
4926
  function corner(p, direction) {
4931
4927
  return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3 : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1 : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon
4932
4928
  }
4933
-
4934
4929
  function compareIntersection(a, b) {
4935
4930
  return comparePoint(a.x, b.x);
4936
4931
  }
@@ -6129,7 +6124,6 @@
6129
6124
  };
6130
6125
  /* eslint-enable key-spacing, object-curly-newline */
6131
6126
  }
6132
-
6133
6127
  static cssBoxShadow(elevation, rotate = false, inverse = false) {
6134
6128
  const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
6135
6129
  const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
@@ -6232,24 +6226,24 @@
6232
6226
  `;
6233
6227
  }
6234
6228
  static get styles() {
6235
- return i$1`
6229
+ return i$2`
6236
6230
  :host {
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)});
6231
+ ---shadow-0: var(--shadow-0, ${r$3(this.cssBoxShadow(0))});
6232
+ ---shadow-2: var(--shadow-2, ${r$3(this.cssBoxShadow(2))});
6233
+ ---shadow-4: var(--shadow-4, ${r$3(this.cssBoxShadow(4))});
6234
+ ---shadow-8: var(--shadow-8, ${r$3(this.cssBoxShadow(8))});
6235
+
6236
+ ---color-background: var(--color-background, ${r$3(this.greys.white)});
6237
+ ---color-border: var(--color-border, ${r$3(this.greys.light75)});
6238
+ ---color-text: var(--color-text, ${r$3(this.greys.dark75)});
6239
+ ---color-text-inverse: var(--color-text-inverse, ${r$3(this.greys.white)});
6240
+ ---color-link: var(--color-link, ${r$3(this.greys.dark25)});
6241
+ ---color-element-background: var(--color-element-background, ${r$3(this.greys.light75)});
6242
+ ---color-element-disabled: var(--color-element-disabled, ${r$3(this.greys.light50)});
6243
+ ---color-element-enabled: var(--color-element-enabled, ${r$3(this.greys.dark25)});
6244
+ ---color-element-selected: var(--color-element-selected, ${r$3(this.greys.grey)});
6245
+ ---color-element-border: var(--color-element-border, ${r$3(this.greys.dark50)});
6246
+ ---color-element-emphasis: var(--color-element-emphasis, ${r$3(this.greys.dark75)});
6253
6247
 
6254
6248
  ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
6255
6249
  ---font-family-math: var(--font-family-math, "Source Serif", serif);
@@ -6310,7 +6304,7 @@
6310
6304
  this.disabled = false;
6311
6305
  }
6312
6306
  static get styles() {
6313
- return [super.styles, i$1`
6307
+ return [super.styles, i$2`
6314
6308
  :host {
6315
6309
  margin: 0.25rem;
6316
6310
  }
@@ -6380,7 +6374,7 @@
6380
6374
  * Copyright 2018 Google LLC
6381
6375
  * SPDX-License-Identifier: BSD-3-Clause
6382
6376
  */
6383
- const l = l => null != l ? l : A;
6377
+ const o = o => o ?? T;
6384
6378
 
6385
6379
  class DecidablesSlider extends DecidablesElement {
6386
6380
  static get properties() {
@@ -6435,11 +6429,11 @@
6435
6429
  this.value = event.target.value;
6436
6430
  }
6437
6431
  static get styles() {
6438
- return [super.styles, i$1`
6432
+ return [super.styles, i$2`
6439
6433
  :host {
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))});
6434
+ ---shadow-2-rotate: var(--shadow-2-rotate, ${r$3(this.cssBoxShadow(2, true, false))});
6435
+ ---shadow-4-rotate: var(--shadow-4-rotate, ${r$3(this.cssBoxShadow(4, true, false))});
6436
+ ---shadow-8-rotate: var(--shadow-8-rotate, ${r$3(this.cssBoxShadow(8, true, false))});
6443
6437
 
6444
6438
  display: flex;
6445
6439
 
@@ -6693,9 +6687,9 @@
6693
6687
  <slot></slot>
6694
6688
  </label>
6695
6689
  <div class="range">
6696
- <input type="range" id="slider" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
6690
+ <input type="range" id="slider" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
6697
6691
  </div>
6698
- <decidables-spinner min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
6692
+ <decidables-spinner min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
6699
6693
  `;
6700
6694
  }
6701
6695
  }
@@ -6745,7 +6739,7 @@
6745
6739
  this.value = event.target.value;
6746
6740
  }
6747
6741
  static get styles() {
6748
- return [super.styles, i$1`
6742
+ return [super.styles, i$2`
6749
6743
  :host {
6750
6744
  ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
6751
6745
  ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
@@ -6845,7 +6839,7 @@
6845
6839
  return x$1`
6846
6840
  <label>
6847
6841
  <slot></slot>
6848
- <input ?disabled=${this.disabled} type="number" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
6842
+ <input ?disabled=${this.disabled} type="number" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
6849
6843
  </label>
6850
6844
  `;
6851
6845
  }
@@ -6884,7 +6878,7 @@
6884
6878
  }));
6885
6879
  }
6886
6880
  static get styles() {
6887
- return [super.styles, i$1`
6881
+ return [super.styles, i$2`
6888
6882
  :host {
6889
6883
  display: flex;
6890
6884
 
@@ -7036,7 +7030,7 @@
7036
7030
  this.disabled = false;
7037
7031
  }
7038
7032
  static get styles() {
7039
- return [super.styles, i$1`
7033
+ return [super.styles, i$2`
7040
7034
  fieldset {
7041
7035
  display: flex;
7042
7036
 
@@ -7111,7 +7105,7 @@
7111
7105
  }));
7112
7106
  }
7113
7107
  static get styles() {
7114
- return [super.styles, i$1`
7108
+ return [super.styles, i$2`
7115
7109
  :host {
7116
7110
  display: flex;
7117
7111
  }
@@ -7341,55 +7335,55 @@
7341
7335
  }, {});
7342
7336
  }
7343
7337
  static get styles() {
7344
- return [super.styles, i$1`
7338
+ return [super.styles, i$2`
7345
7339
  :host {
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)});
7340
+ ---color-h: var(--color-h, ${r$3(this.colors.h)});
7341
+ ---color-m: var(--color-m, ${r$3(this.colors.m)});
7342
+ ---color-fa: var(--color-fa, ${r$3(this.colors.fa)});
7343
+ ---color-cr: var(--color-cr, ${r$3(this.colors.cr)});
7344
+ ---color-hr: var(--color-hr, ${r$3(this.colors.hr)});
7345
+ ---color-far: var(--color-far, ${r$3(this.colors.far)});
7346
+ ---color-acc: var(--color-acc, ${r$3(this.colors.acc)});
7347
+ ---color-d: var(--color-d, ${r$3(this.colors.d)});
7348
+ ---color-c: var(--color-c, ${r$3(this.colors.c)});
7349
+ ---color-s: var(--color-s, ${r$3(this.colors.s)});
7350
+ ---color-present: var(--color-present, ${r$3(this.colors.present)});
7351
+ ---color-absent: var(--color-absent, ${r$3(this.colors.absent)});
7352
+ ---color-correct: var(--color-correct, ${r$3(this.colors.correct)});
7353
+ ---color-error: var(--color-error, ${r$3(this.colors.error)});
7354
+ ---color-nr: var(--color-nr, ${r$3(this.colors.nr)});
7355
+
7356
+ ---color-h-light: var(--color-h-light, ${r$3(this.lights.h)});
7357
+ ---color-m-light: var(--color-m-light, ${r$3(this.lights.m)});
7358
+ ---color-fa-light: var(--color-fa-light, ${r$3(this.lights.fa)});
7359
+ ---color-cr-light: var(--color-cr-light, ${r$3(this.lights.cr)});
7360
+ ---color-hr-light: var(--color-hr-light, ${r$3(this.lights.hr)});
7361
+ ---color-far-light: var(--color-far-light, ${r$3(this.lights.far)});
7362
+ ---color-acc-light: var(--color-acc-light, ${r$3(this.lights.acc)});
7363
+ ---color-d-light: var(--color-d-light, ${r$3(this.lights.d)});
7364
+ ---color-c-light: var(--color-c-light, ${r$3(this.lights.c)});
7365
+ ---color-s-light: var(--color-s-light, ${r$3(this.lights.s)});
7366
+ ---color-present-light: var(--color-present-light, ${r$3(this.lights.present)});
7367
+ ---color-absent-light: var(--color-absent-light, ${r$3(this.lights.absent)});
7368
+ ---color-correct-light: var(--color-correct-light, ${r$3(this.lights.correct)});
7369
+ ---color-error-light: var(--color-error-light, ${r$3(this.lights.error)});
7370
+ ---color-nr-light: var(--color-nr-light, ${r$3(this.lights.nr)});
7371
+
7372
+ ---color-h-dark: var(--color-h-dark, ${r$3(this.darks.h)});
7373
+ ---color-m-dark: var(--color-m-dark, ${r$3(this.darks.m)});
7374
+ ---color-fa-dark: var(--color-fa-dark, ${r$3(this.darks.fa)});
7375
+ ---color-cr-dark: var(--color-cr-dark, ${r$3(this.darks.cr)});
7376
+ ---color-hr-dark: var(--color-hr-dark, ${r$3(this.darks.hr)});
7377
+ ---color-far-dark: var(--color-far-dark, ${r$3(this.darks.far)});
7378
+ ---color-acc-dark: var(--color-acc-dark, ${r$3(this.darks.acc)});
7379
+ ---color-d-dark: var(--color-d-dark, ${r$3(this.darks.d)});
7380
+ ---color-c-dark: var(--color-c-dark, ${r$3(this.darks.c)});
7381
+ ---color-s-dark: var(--color-s-dark, ${r$3(this.darks.s)});
7382
+ ---color-present-dark: var(--color-present-dark, ${r$3(this.darks.present)});
7383
+ ---color-absent-dark: var(--color-absent-dark, ${r$3(this.darks.absent)});
7384
+ ---color-correct-dark: var(--color-correct-dark, ${r$3(this.darks.correct)});
7385
+ ---color-error-dark: var(--color-error-dark, ${r$3(this.darks.error)});
7386
+ ---color-nr-dark: var(--color-nr-dark, ${r$3(this.darks.nr)});
7393
7387
  }
7394
7388
  `];
7395
7389
  }
@@ -7504,9 +7498,8 @@
7504
7498
  this.xScale = undefined; // D3 Scale for x-axis
7505
7499
  this.yScale = undefined; // D3 Scale for y-axis
7506
7500
  }
7507
-
7508
7501
  static get styles() {
7509
- return [super.styles, i$1`
7502
+ return [super.styles, i$2`
7510
7503
  :host {
7511
7504
  display: inline-block;
7512
7505
 
@@ -11238,12 +11231,10 @@
11238
11231
  if (Q2[0].length === undefined) {
11239
11232
  Q2 = [Q2]; // The confusing jStat.multifly implementation threat nature process again.
11240
11233
  }
11241
-
11242
11234
  var x = jStat.multiply(jStat.multiply(RI, Q2), b);
11243
11235
  if (x.length === undefined) {
11244
11236
  x = [[x]]; // The confusing jStat.multifly implementation threat nature process again.
11245
11237
  }
11246
-
11247
11238
  if (array_mode) return x.map(function (i) {
11248
11239
  return i[0];
11249
11240
  });
@@ -12519,7 +12510,7 @@
12519
12510
  this.requestUpdate();
12520
12511
  }
12521
12512
  static get styles() {
12522
- return [super.styles, i$1`
12513
+ return [super.styles, i$2`
12523
12514
  :host {
12524
12515
  display: inline-block;
12525
12516
 
@@ -13090,7 +13081,6 @@
13090
13081
  break;
13091
13082
  // no-op
13092
13083
  }
13093
-
13094
13084
  hr = this.zRoc ? SDTMath.zhr2Hr(hr) : hr;
13095
13085
  far = this.zRoc ? SDTMath.zfar2Far(far) : far;
13096
13086
  // Clamp FAR and HR to ROC Space
@@ -13335,7 +13325,7 @@
13335
13325
  this.state = 'ended';
13336
13326
  }
13337
13327
  static get styles() {
13338
- return [super.styles, i$1`
13328
+ return [super.styles, i$2`
13339
13329
  :host {
13340
13330
  display: inline-block;
13341
13331
  }
@@ -13586,7 +13576,7 @@
13586
13576
  }
13587
13577
  }
13588
13578
  static get styles() {
13589
- return [super.styles, i$1`
13579
+ return [super.styles, i$2`
13590
13580
  :host {
13591
13581
  display: inline-block;
13592
13582
 
@@ -14827,7 +14817,6 @@
14827
14817
 
14828
14818
  this.nr = 0; // Count of No Response trials
14829
14819
  }
14830
-
14831
14820
  get trialPayoff() {
14832
14821
  switch (this.outcome) {
14833
14822
  case 'h':
@@ -14925,7 +14914,7 @@
14925
14914
  this.e = 0;
14926
14915
  }
14927
14916
  static get styles() {
14928
- return [super.styles, i$1`
14917
+ return [super.styles, i$2`
14929
14918
  :host {
14930
14919
  display: inline-block;
14931
14920
  }
@@ -15212,7 +15201,6 @@
15212
15201
  this.crPayoff = undefined; // Correct Rejection payoff
15213
15202
  this.faPayoff = undefined; // False Alarm payoff
15214
15203
  }
15215
-
15216
15204
  alignState() {
15217
15205
  this.hr = SDTMath.hM2Hr(this.h, this.m);
15218
15206
  this.far = SDTMath.faCr2Far(this.fa, this.cr);
@@ -15319,7 +15307,7 @@
15319
15307
  this.sendEvent();
15320
15308
  }
15321
15309
  static get styles() {
15322
- return [super.styles, i$1`
15310
+ return [super.styles, i$2`
15323
15311
  :host {
15324
15312
  display: inline-block;
15325
15313
  }
@@ -15692,7 +15680,7 @@
15692
15680
  this.numeric = false;
15693
15681
  }
15694
15682
  static get styles() {
15695
- return [super.styles, i$1`
15683
+ return [super.styles, i$2`
15696
15684
  :host {
15697
15685
  display: block;
15698
15686
 
@@ -17047,7 +17035,7 @@
17047
17035
  */
17048
17036
  class SDTExample extends DetectableElement {
17049
17037
  static get styles() {
17050
- return [super.styles, i$1`
17038
+ return [super.styles, i$2`
17051
17039
  :host {
17052
17040
  display: inline-block;
17053
17041