@record-evolution/widget-value 1.0.27 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/widget-value.d.ts +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/widget-value.js +330 -328
- package/dist/widget-value.js.map +1 -1
- package/package.json +29 -25
- package/src/default-data.json +14 -6
- package/src/definition-schema.d.ts +23 -15
- package/src/definition-schema.json +56 -42
- package/src/widget-value.ts +17 -17
package/dist/widget-value.js
CHANGED
|
@@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
16
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
17
17
|
|
|
18
18
|
function __decorate(decorators, target, key, desc) {
|
|
19
19
|
var c = arguments.length,
|
|
@@ -32,21 +32,21 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
32
32
|
* Copyright 2019 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
34
|
*/
|
|
35
|
-
const t$
|
|
36
|
-
e$
|
|
37
|
-
s
|
|
38
|
-
o$
|
|
35
|
+
const t$1 = globalThis,
|
|
36
|
+
e$2 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
37
|
+
s = Symbol(),
|
|
38
|
+
o$2 = new WeakMap();
|
|
39
39
|
let n$3 = class n {
|
|
40
40
|
constructor(t, e, o) {
|
|
41
|
-
if (this._$cssResult$ = !0, o !== s
|
|
41
|
+
if (this._$cssResult$ = !0, o !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
42
42
|
this.cssText = t, this.t = e;
|
|
43
43
|
}
|
|
44
44
|
get styleSheet() {
|
|
45
45
|
let t = this.o;
|
|
46
46
|
const s = this.t;
|
|
47
|
-
if (e$
|
|
47
|
+
if (e$2 && void 0 === t) {
|
|
48
48
|
const e = void 0 !== s && 1 === s.length;
|
|
49
|
-
e && (t = o$
|
|
49
|
+
e && (t = o$2.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$2.set(s, t));
|
|
50
50
|
}
|
|
51
51
|
return t;
|
|
52
52
|
}
|
|
@@ -54,26 +54,26 @@ let n$3 = class n {
|
|
|
54
54
|
return this.cssText;
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
const r$
|
|
58
|
-
i$
|
|
57
|
+
const r$3 = t => new n$3("string" == typeof t ? t : t + "", void 0, s),
|
|
58
|
+
i$2 = (t, ...e) => {
|
|
59
59
|
const o = 1 === t.length ? t[0] : e.reduce((e, s, o) => e + (t => {
|
|
60
60
|
if (!0 === t._$cssResult$) return t.cssText;
|
|
61
61
|
if ("number" == typeof t) return t;
|
|
62
62
|
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.");
|
|
63
63
|
})(s) + t[o + 1], t[0]);
|
|
64
|
-
return new n$3(o, t, s
|
|
64
|
+
return new n$3(o, t, s);
|
|
65
65
|
},
|
|
66
66
|
S$1 = (s, o) => {
|
|
67
|
-
if (e$
|
|
67
|
+
if (e$2) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
|
|
68
68
|
const o = document.createElement("style"),
|
|
69
|
-
n = t$
|
|
69
|
+
n = t$1.litNonce;
|
|
70
70
|
void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
c$
|
|
73
|
+
c$2 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
74
74
|
let e = "";
|
|
75
75
|
for (const s of t.cssRules) e += s.cssText;
|
|
76
|
-
return r$
|
|
76
|
+
return r$3(e);
|
|
77
77
|
})(t) : t;
|
|
78
78
|
|
|
79
79
|
/**
|
|
@@ -82,23 +82,23 @@ const r$6 = t => new n$3("string" == typeof t ? t : t + "", void 0, s$3),
|
|
|
82
82
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
83
83
|
*/
|
|
84
84
|
const {
|
|
85
|
-
is: i$
|
|
86
|
-
defineProperty: e$
|
|
87
|
-
getOwnPropertyDescriptor: r$
|
|
85
|
+
is: i$1,
|
|
86
|
+
defineProperty: e$1,
|
|
87
|
+
getOwnPropertyDescriptor: r$2,
|
|
88
88
|
getOwnPropertyNames: h$2,
|
|
89
|
-
getOwnPropertySymbols: o$
|
|
89
|
+
getOwnPropertySymbols: o$1,
|
|
90
90
|
getPrototypeOf: n$2
|
|
91
91
|
} = Object,
|
|
92
|
-
a
|
|
93
|
-
c$
|
|
94
|
-
l
|
|
95
|
-
p
|
|
96
|
-
d
|
|
97
|
-
u
|
|
92
|
+
a = globalThis,
|
|
93
|
+
c$1 = a.trustedTypes,
|
|
94
|
+
l = c$1 ? c$1.emptyScript : "",
|
|
95
|
+
p = a.reactiveElementPolyfillSupport,
|
|
96
|
+
d = (t, s) => t,
|
|
97
|
+
u = {
|
|
98
98
|
toAttribute(t, s) {
|
|
99
99
|
switch (s) {
|
|
100
100
|
case Boolean:
|
|
101
|
-
t = t ? l
|
|
101
|
+
t = t ? l : null;
|
|
102
102
|
break;
|
|
103
103
|
case Object:
|
|
104
104
|
case Array:
|
|
@@ -126,15 +126,15 @@ const {
|
|
|
126
126
|
return i;
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
|
-
f$
|
|
130
|
-
y
|
|
129
|
+
f$2 = (t, s) => !i$1(t, s),
|
|
130
|
+
y = {
|
|
131
131
|
attribute: !0,
|
|
132
132
|
type: String,
|
|
133
|
-
converter: u
|
|
133
|
+
converter: u,
|
|
134
134
|
reflect: !1,
|
|
135
|
-
hasChanged: f$
|
|
135
|
+
hasChanged: f$2
|
|
136
136
|
};
|
|
137
|
-
Symbol.metadata ??= Symbol("metadata"), a
|
|
137
|
+
Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= new WeakMap();
|
|
138
138
|
class b extends HTMLElement {
|
|
139
139
|
static addInitializer(t) {
|
|
140
140
|
this._$Ei(), (this.l ??= []).push(t);
|
|
@@ -142,18 +142,18 @@ class b extends HTMLElement {
|
|
|
142
142
|
static get observedAttributes() {
|
|
143
143
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
144
144
|
}
|
|
145
|
-
static createProperty(t, s = y
|
|
145
|
+
static createProperty(t, s = y) {
|
|
146
146
|
if (s.state && (s.attribute = !1), this._$Ei(), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
147
147
|
const i = Symbol(),
|
|
148
148
|
r = this.getPropertyDescriptor(t, i, s);
|
|
149
|
-
void 0 !== r && e$
|
|
149
|
+
void 0 !== r && e$1(this.prototype, t, r);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
static getPropertyDescriptor(t, s, i) {
|
|
153
153
|
const {
|
|
154
154
|
get: e,
|
|
155
155
|
set: h
|
|
156
|
-
} = r$
|
|
156
|
+
} = r$2(this.prototype, t) ?? {
|
|
157
157
|
get() {
|
|
158
158
|
return this[s];
|
|
159
159
|
},
|
|
@@ -174,18 +174,18 @@ class b extends HTMLElement {
|
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
static getPropertyOptions(t) {
|
|
177
|
-
return this.elementProperties.get(t) ?? y
|
|
177
|
+
return this.elementProperties.get(t) ?? y;
|
|
178
178
|
}
|
|
179
179
|
static _$Ei() {
|
|
180
|
-
if (this.hasOwnProperty(d
|
|
180
|
+
if (this.hasOwnProperty(d("elementProperties"))) return;
|
|
181
181
|
const t = n$2(this);
|
|
182
182
|
t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
183
183
|
}
|
|
184
184
|
static finalize() {
|
|
185
|
-
if (this.hasOwnProperty(d
|
|
186
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d
|
|
185
|
+
if (this.hasOwnProperty(d("finalized"))) return;
|
|
186
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d("properties"))) {
|
|
187
187
|
const t = this.properties,
|
|
188
|
-
s = [...h$2(t), ...o$
|
|
188
|
+
s = [...h$2(t), ...o$1(t)];
|
|
189
189
|
for (const i of s) this.createProperty(i, t[i]);
|
|
190
190
|
}
|
|
191
191
|
const t = this[Symbol.metadata];
|
|
@@ -204,8 +204,8 @@ class b extends HTMLElement {
|
|
|
204
204
|
const i = [];
|
|
205
205
|
if (Array.isArray(s)) {
|
|
206
206
|
const e = new Set(s.flat(1 / 0).reverse());
|
|
207
|
-
for (const s of e) i.unshift(c$
|
|
208
|
-
} else void 0 !== s && i.push(c$
|
|
207
|
+
for (const s of e) i.unshift(c$2(s));
|
|
208
|
+
} else void 0 !== s && i.push(c$2(s));
|
|
209
209
|
return i;
|
|
210
210
|
}
|
|
211
211
|
static _$Eu(t, s) {
|
|
@@ -216,13 +216,13 @@ class b extends HTMLElement {
|
|
|
216
216
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
217
217
|
}
|
|
218
218
|
_$Ev() {
|
|
219
|
-
this._$
|
|
219
|
+
this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
|
|
220
220
|
}
|
|
221
221
|
addController(t) {
|
|
222
|
-
(this._$
|
|
222
|
+
(this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
|
|
223
223
|
}
|
|
224
224
|
removeController(t) {
|
|
225
|
-
this._$
|
|
225
|
+
this._$EO?.delete(t);
|
|
226
226
|
}
|
|
227
227
|
_$E_() {
|
|
228
228
|
const t = new Map(),
|
|
@@ -235,20 +235,20 @@ class b extends HTMLElement {
|
|
|
235
235
|
return S$1(t, this.constructor.elementStyles), t;
|
|
236
236
|
}
|
|
237
237
|
connectedCallback() {
|
|
238
|
-
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$
|
|
238
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(t => t.hostConnected?.());
|
|
239
239
|
}
|
|
240
240
|
enableUpdating(t) {}
|
|
241
241
|
disconnectedCallback() {
|
|
242
|
-
this._$
|
|
242
|
+
this._$EO?.forEach(t => t.hostDisconnected?.());
|
|
243
243
|
}
|
|
244
244
|
attributeChangedCallback(t, s, i) {
|
|
245
245
|
this._$AK(t, i);
|
|
246
246
|
}
|
|
247
|
-
_$
|
|
247
|
+
_$EC(t, s) {
|
|
248
248
|
const i = this.constructor.elementProperties.get(t),
|
|
249
249
|
e = this.constructor._$Eu(t, i);
|
|
250
250
|
if (void 0 !== e && !0 === i.reflect) {
|
|
251
|
-
const r = (void 0 !== i.converter?.toAttribute ? i.converter : u
|
|
251
|
+
const r = (void 0 !== i.converter?.toAttribute ? i.converter : u).toAttribute(s, i.type);
|
|
252
252
|
this._$Em = t, null == r ? this.removeAttribute(e) : this.setAttribute(e, r), this._$Em = null;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
@@ -259,24 +259,24 @@ class b extends HTMLElement {
|
|
|
259
259
|
const t = i.getPropertyOptions(e),
|
|
260
260
|
r = "function" == typeof t.converter ? {
|
|
261
261
|
fromAttribute: t.converter
|
|
262
|
-
} : void 0 !== t.converter?.fromAttribute ? t.converter : u
|
|
262
|
+
} : void 0 !== t.converter?.fromAttribute ? t.converter : u;
|
|
263
263
|
this._$Em = e, this[e] = r.fromAttribute(s, t.type), this._$Em = null;
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
requestUpdate(t, s, i
|
|
266
|
+
requestUpdate(t, s, i) {
|
|
267
267
|
if (void 0 !== t) {
|
|
268
|
-
if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$
|
|
269
|
-
this.
|
|
268
|
+
if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$2)(this[t], s)) return;
|
|
269
|
+
this.P(t, s, i);
|
|
270
270
|
}
|
|
271
|
-
!1 === this.isUpdatePending && (this._$
|
|
271
|
+
!1 === this.isUpdatePending && (this._$ES = this._$ET());
|
|
272
272
|
}
|
|
273
|
-
|
|
273
|
+
P(t, s, i) {
|
|
274
274
|
this._$AL.has(t) || this._$AL.set(t, s), !0 === i.reflect && this._$Em !== t && (this._$Ej ??= new Set()).add(t);
|
|
275
275
|
}
|
|
276
|
-
async _$
|
|
276
|
+
async _$ET() {
|
|
277
277
|
this.isUpdatePending = !0;
|
|
278
278
|
try {
|
|
279
|
-
await this._$
|
|
279
|
+
await this._$ES;
|
|
280
280
|
} catch (t) {
|
|
281
281
|
Promise.reject(t);
|
|
282
282
|
}
|
|
@@ -289,179 +289,179 @@ class b extends HTMLElement {
|
|
|
289
289
|
performUpdate() {
|
|
290
290
|
if (!this.isUpdatePending) return;
|
|
291
291
|
if (!this.hasUpdated) {
|
|
292
|
-
if (this._$Ep) {
|
|
292
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
293
293
|
for (const [t, s] of this._$Ep) this[t] = s;
|
|
294
294
|
this._$Ep = void 0;
|
|
295
295
|
}
|
|
296
296
|
const t = this.constructor.elementProperties;
|
|
297
|
-
if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.
|
|
297
|
+
if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.P(s, this[s], i);
|
|
298
298
|
}
|
|
299
299
|
let t = !1;
|
|
300
300
|
const s = this._$AL;
|
|
301
301
|
try {
|
|
302
|
-
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$
|
|
302
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EU();
|
|
303
303
|
} catch (s) {
|
|
304
|
-
throw t = !1, this._$
|
|
304
|
+
throw t = !1, this._$EU(), s;
|
|
305
305
|
}
|
|
306
306
|
t && this._$AE(s);
|
|
307
307
|
}
|
|
308
308
|
willUpdate(t) {}
|
|
309
309
|
_$AE(t) {
|
|
310
|
-
this._$
|
|
310
|
+
this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
311
311
|
}
|
|
312
|
-
_$
|
|
312
|
+
_$EU() {
|
|
313
313
|
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
314
314
|
}
|
|
315
315
|
get updateComplete() {
|
|
316
316
|
return this.getUpdateComplete();
|
|
317
317
|
}
|
|
318
318
|
getUpdateComplete() {
|
|
319
|
-
return this._$
|
|
319
|
+
return this._$ES;
|
|
320
320
|
}
|
|
321
321
|
shouldUpdate(t) {
|
|
322
322
|
return !0;
|
|
323
323
|
}
|
|
324
324
|
update(t) {
|
|
325
|
-
this._$Ej &&= this._$Ej.forEach(t => this._$
|
|
325
|
+
this._$Ej &&= this._$Ej.forEach(t => this._$EC(t, this[t])), this._$EU();
|
|
326
326
|
}
|
|
327
327
|
updated(t) {}
|
|
328
328
|
firstUpdated(t) {}
|
|
329
329
|
}
|
|
330
330
|
b.elementStyles = [], b.shadowRootOptions = {
|
|
331
331
|
mode: "open"
|
|
332
|
-
}, b[d
|
|
332
|
+
}, b[d("elementProperties")] = new Map(), b[d("finalized")] = new Map(), p?.({
|
|
333
333
|
ReactiveElement: b
|
|
334
|
-
}), (a
|
|
334
|
+
}), (a.reactiveElementVersions ??= []).push("2.0.4");
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
337
|
* @license
|
|
338
338
|
* Copyright 2017 Google LLC
|
|
339
339
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
340
340
|
*/
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
const n$1 = globalThis,
|
|
342
|
+
c = n$1.trustedTypes,
|
|
343
|
+
h$1 = c ? c.createPolicy("lit-html", {
|
|
344
344
|
createHTML: t => t
|
|
345
345
|
}) : void 0,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
346
|
+
f$1 = "$lit$",
|
|
347
|
+
v = `lit$${Math.random().toFixed(9).slice(2)}$`,
|
|
348
|
+
m = "?" + v,
|
|
349
|
+
_ = `<${m}>`,
|
|
350
|
+
w = document,
|
|
351
|
+
lt$1 = () => w.createComment(""),
|
|
352
|
+
st = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
353
|
+
g = Array.isArray,
|
|
354
|
+
$ = t => g(t) || "function" == typeof t?.[Symbol.iterator],
|
|
355
|
+
x = "[ \t\n\f\r]",
|
|
356
|
+
T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
357
|
+
E = /-->/g,
|
|
358
|
+
k = />/g,
|
|
359
|
+
O = RegExp(`>|${x}(?:([^\\s"'>=/]+)(${x}*=${x}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
360
|
+
S = /'/g,
|
|
361
|
+
j = /"/g,
|
|
362
|
+
M = /^(?:script|style|textarea|title)$/i,
|
|
363
|
+
P = t => (i, ...s) => ({
|
|
364
364
|
_$litType$: t,
|
|
365
365
|
strings: i,
|
|
366
366
|
values: s
|
|
367
367
|
}),
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
function
|
|
374
|
-
if (!
|
|
375
|
-
return void 0 !==
|
|
368
|
+
ke = P(1),
|
|
369
|
+
R = Symbol.for("lit-noChange"),
|
|
370
|
+
D = Symbol.for("lit-nothing"),
|
|
371
|
+
V = new WeakMap(),
|
|
372
|
+
I = w.createTreeWalker(w, 129);
|
|
373
|
+
function N(t, i) {
|
|
374
|
+
if (!g(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
375
|
+
return void 0 !== h$1 ? h$1.createHTML(i) : i;
|
|
376
376
|
}
|
|
377
|
-
const
|
|
377
|
+
const U = (t, i) => {
|
|
378
378
|
const s = t.length - 1,
|
|
379
|
-
|
|
380
|
-
let
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
e = [];
|
|
380
|
+
let h,
|
|
381
|
+
o = 2 === i ? "<svg>" : 3 === i ? "<math>" : "",
|
|
382
|
+
n = T;
|
|
383
383
|
for (let i = 0; i < s; i++) {
|
|
384
384
|
const s = t[i];
|
|
385
|
-
let
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
for (;
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
return [
|
|
385
|
+
let r,
|
|
386
|
+
l,
|
|
387
|
+
c = -1,
|
|
388
|
+
a = 0;
|
|
389
|
+
for (; a < s.length && (n.lastIndex = a, l = n.exec(s), null !== l);) a = n.lastIndex, n === T ? "!--" === l[1] ? n = E : void 0 !== l[1] ? n = k : void 0 !== l[2] ? (M.test(l[2]) && (h = RegExp("</" + l[2], "g")), n = O) : void 0 !== l[3] && (n = O) : n === O ? ">" === l[0] ? (n = h ?? T, c = -1) : void 0 === l[1] ? c = -2 : (c = n.lastIndex - l[2].length, r = l[1], n = void 0 === l[3] ? O : '"' === l[3] ? j : S) : n === j || n === S ? n = O : n === E || n === k ? n = T : (n = O, h = void 0);
|
|
390
|
+
const u = n === O && t[i + 1].startsWith("/>") ? " " : "";
|
|
391
|
+
o += n === T ? s + _ : c >= 0 ? (e.push(r), s.slice(0, c) + f$1 + s.slice(c) + v + u) : s + v + (-2 === c ? i : u);
|
|
392
|
+
}
|
|
393
|
+
return [N(t, o + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), e];
|
|
394
394
|
};
|
|
395
|
-
class
|
|
395
|
+
class B {
|
|
396
396
|
constructor({
|
|
397
397
|
strings: t,
|
|
398
|
-
_$litType$:
|
|
399
|
-
},
|
|
400
|
-
let
|
|
398
|
+
_$litType$: i
|
|
399
|
+
}, s) {
|
|
400
|
+
let e;
|
|
401
401
|
this.parts = [];
|
|
402
|
-
let
|
|
403
|
-
|
|
404
|
-
const
|
|
405
|
-
|
|
406
|
-
[
|
|
407
|
-
if (this.el =
|
|
402
|
+
let h = 0,
|
|
403
|
+
o = 0;
|
|
404
|
+
const n = t.length - 1,
|
|
405
|
+
r = this.parts,
|
|
406
|
+
[l, a] = U(t, i);
|
|
407
|
+
if (this.el = B.createElement(l, s), I.currentNode = this.el.content, 2 === i || 3 === i) {
|
|
408
408
|
const t = this.el.content.firstChild;
|
|
409
409
|
t.replaceWith(...t.childNodes);
|
|
410
410
|
}
|
|
411
|
-
for (; null !== (
|
|
412
|
-
if (1 ===
|
|
413
|
-
if (
|
|
414
|
-
const i =
|
|
415
|
-
s =
|
|
416
|
-
|
|
417
|
-
|
|
411
|
+
for (; null !== (e = I.nextNode()) && r.length < n;) {
|
|
412
|
+
if (1 === e.nodeType) {
|
|
413
|
+
if (e.hasAttributes()) for (const t of e.getAttributeNames()) if (t.endsWith(f$1)) {
|
|
414
|
+
const i = a[o++],
|
|
415
|
+
s = e.getAttribute(t).split(v),
|
|
416
|
+
n = /([.?@])?(.*)/.exec(i);
|
|
417
|
+
r.push({
|
|
418
418
|
type: 1,
|
|
419
|
-
index:
|
|
420
|
-
name:
|
|
419
|
+
index: h,
|
|
420
|
+
name: n[2],
|
|
421
421
|
strings: s,
|
|
422
|
-
ctor: "." ===
|
|
423
|
-
}),
|
|
424
|
-
} else t.startsWith(
|
|
422
|
+
ctor: "." === n[1] ? Y : "?" === n[1] ? Z : "@" === n[1] ? q : G
|
|
423
|
+
}), e.removeAttribute(t);
|
|
424
|
+
} else t.startsWith(v) && (r.push({
|
|
425
425
|
type: 6,
|
|
426
|
-
index:
|
|
427
|
-
}),
|
|
428
|
-
if (
|
|
429
|
-
const t =
|
|
430
|
-
|
|
431
|
-
if (
|
|
432
|
-
|
|
433
|
-
for (let
|
|
426
|
+
index: h
|
|
427
|
+
}), e.removeAttribute(t));
|
|
428
|
+
if (M.test(e.tagName)) {
|
|
429
|
+
const t = e.textContent.split(v),
|
|
430
|
+
i = t.length - 1;
|
|
431
|
+
if (i > 0) {
|
|
432
|
+
e.textContent = c ? c.emptyScript : "";
|
|
433
|
+
for (let s = 0; s < i; s++) e.append(t[s], lt$1()), I.nextNode(), r.push({
|
|
434
434
|
type: 2,
|
|
435
|
-
index: ++
|
|
435
|
+
index: ++h
|
|
436
436
|
});
|
|
437
|
-
|
|
437
|
+
e.append(t[i], lt$1());
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
} else if (8 ===
|
|
440
|
+
} else if (8 === e.nodeType) if (e.data === m) r.push({
|
|
441
441
|
type: 2,
|
|
442
|
-
index:
|
|
442
|
+
index: h
|
|
443
443
|
});else {
|
|
444
444
|
let t = -1;
|
|
445
|
-
for (; -1 !== (t =
|
|
445
|
+
for (; -1 !== (t = e.data.indexOf(v, t + 1));) r.push({
|
|
446
446
|
type: 7,
|
|
447
|
-
index:
|
|
448
|
-
}), t +=
|
|
447
|
+
index: h
|
|
448
|
+
}), t += v.length - 1;
|
|
449
449
|
}
|
|
450
|
-
|
|
450
|
+
h++;
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
static createElement(t, i) {
|
|
454
|
-
const s =
|
|
454
|
+
const s = w.createElement("template");
|
|
455
455
|
return s.innerHTML = t, s;
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
function
|
|
459
|
-
if (i ===
|
|
460
|
-
let h = void 0 !== e ? s.
|
|
461
|
-
const o =
|
|
462
|
-
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.
|
|
458
|
+
function z(t, i, s = t, e) {
|
|
459
|
+
if (i === R) return i;
|
|
460
|
+
let h = void 0 !== e ? s.o?.[e] : s.l;
|
|
461
|
+
const o = st(i) ? void 0 : i._$litDirective$;
|
|
462
|
+
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.o ??= [])[e] = h : s.l = h), void 0 !== h && (i = z(t, h._$AS(t, i.values), h, e)), i;
|
|
463
463
|
}
|
|
464
|
-
class
|
|
464
|
+
class F {
|
|
465
465
|
constructor(t, i) {
|
|
466
466
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
467
467
|
}
|
|
@@ -478,32 +478,32 @@ class S {
|
|
|
478
478
|
},
|
|
479
479
|
parts: s
|
|
480
480
|
} = this._$AD,
|
|
481
|
-
e = (t?.creationScope ??
|
|
482
|
-
|
|
483
|
-
let h =
|
|
481
|
+
e = (t?.creationScope ?? w).importNode(i, !0);
|
|
482
|
+
I.currentNode = e;
|
|
483
|
+
let h = I.nextNode(),
|
|
484
484
|
o = 0,
|
|
485
485
|
n = 0,
|
|
486
|
-
|
|
487
|
-
for (; void 0 !==
|
|
488
|
-
if (o ===
|
|
486
|
+
r = s[0];
|
|
487
|
+
for (; void 0 !== r;) {
|
|
488
|
+
if (o === r.index) {
|
|
489
489
|
let i;
|
|
490
|
-
2 ===
|
|
490
|
+
2 === r.type ? i = new et$1(h, h.nextSibling, this, t) : 1 === r.type ? i = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i = new K(h, this, t)), this._$AV.push(i), r = s[++n];
|
|
491
491
|
}
|
|
492
|
-
o !==
|
|
492
|
+
o !== r?.index && (h = I.nextNode(), o++);
|
|
493
493
|
}
|
|
494
|
-
return
|
|
494
|
+
return I.currentNode = w, e;
|
|
495
495
|
}
|
|
496
496
|
p(t) {
|
|
497
497
|
let i = 0;
|
|
498
498
|
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++;
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
class
|
|
501
|
+
let et$1 = class et {
|
|
502
502
|
get _$AU() {
|
|
503
|
-
return this._$AM?._$AU ?? this.
|
|
503
|
+
return this._$AM?._$AU ?? this.v;
|
|
504
504
|
}
|
|
505
505
|
constructor(t, i, s, e) {
|
|
506
|
-
this.type = 2, this._$AH =
|
|
506
|
+
this.type = 2, this._$AH = D, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this.v = e?.isConnected ?? !0;
|
|
507
507
|
}
|
|
508
508
|
get parentNode() {
|
|
509
509
|
let t = this._$AA.parentNode;
|
|
@@ -517,39 +517,39 @@ class M {
|
|
|
517
517
|
return this._$AB;
|
|
518
518
|
}
|
|
519
519
|
_$AI(t, i = this) {
|
|
520
|
-
t =
|
|
520
|
+
t = z(this, t, i), st(t) ? t === D || null == t || "" === t ? (this._$AH !== D && this._$AR(), this._$AH = D) : t !== this._$AH && t !== R && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : $(t) ? this.k(t) : this._(t);
|
|
521
521
|
}
|
|
522
|
-
|
|
522
|
+
O(t) {
|
|
523
523
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
524
524
|
}
|
|
525
|
-
|
|
526
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.
|
|
525
|
+
T(t) {
|
|
526
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
527
527
|
}
|
|
528
528
|
_(t) {
|
|
529
|
-
this._$AH !==
|
|
529
|
+
this._$AH !== D && st(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
|
|
530
530
|
}
|
|
531
|
-
|
|
531
|
+
$(t) {
|
|
532
532
|
const {
|
|
533
533
|
values: i,
|
|
534
534
|
_$litType$: s
|
|
535
535
|
} = t,
|
|
536
|
-
e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el =
|
|
536
|
+
e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = B.createElement(N(s.h, s.h[0]), this.options)), s);
|
|
537
537
|
if (this._$AH?._$AD === e) this._$AH.p(i);else {
|
|
538
|
-
const t = new
|
|
538
|
+
const t = new F(e, this),
|
|
539
539
|
s = t.u(this.options);
|
|
540
|
-
t.p(i), this
|
|
540
|
+
t.p(i), this.T(s), this._$AH = t;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
_$AC(t) {
|
|
544
|
-
let i =
|
|
545
|
-
return void 0 === i &&
|
|
544
|
+
let i = V.get(t.strings);
|
|
545
|
+
return void 0 === i && V.set(t.strings, i = new B(t)), i;
|
|
546
546
|
}
|
|
547
|
-
|
|
548
|
-
|
|
547
|
+
k(t) {
|
|
548
|
+
g(this._$AH) || (this._$AH = [], this._$AR());
|
|
549
549
|
const i = this._$AH;
|
|
550
550
|
let s,
|
|
551
551
|
e = 0;
|
|
552
|
-
for (const h of t) e === i.length ? i.push(s = new
|
|
552
|
+
for (const h of t) e === i.length ? i.push(s = new et(this.O(lt$1()), this.O(lt$1()), this, this.options)) : s = i[e], s._$AI(h), e++;
|
|
553
553
|
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
554
554
|
}
|
|
555
555
|
_$AR(t = this._$AA.nextSibling, i) {
|
|
@@ -559,10 +559,10 @@ class M {
|
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
setConnected(t) {
|
|
562
|
-
void 0 === this._$AM && (this.
|
|
562
|
+
void 0 === this._$AM && (this.v = t, this._$AP?.(t));
|
|
563
563
|
}
|
|
564
|
-
}
|
|
565
|
-
class
|
|
564
|
+
};
|
|
565
|
+
class G {
|
|
566
566
|
get tagName() {
|
|
567
567
|
return this.element.tagName;
|
|
568
568
|
}
|
|
@@ -570,54 +570,54 @@ class R {
|
|
|
570
570
|
return this._$AM._$AU;
|
|
571
571
|
}
|
|
572
572
|
constructor(t, i, s, e, h) {
|
|
573
|
-
this.type = 1, this._$AH =
|
|
573
|
+
this.type = 1, this._$AH = D, 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 = D;
|
|
574
574
|
}
|
|
575
575
|
_$AI(t, i = this, s, e) {
|
|
576
576
|
const h = this.strings;
|
|
577
577
|
let o = !1;
|
|
578
|
-
if (void 0 === h) t =
|
|
578
|
+
if (void 0 === h) t = z(this, t, i, 0), o = !st(t) || t !== this._$AH && t !== R, o && (this._$AH = t);else {
|
|
579
579
|
const e = t;
|
|
580
580
|
let n, r;
|
|
581
|
-
for (t = h[0], n = 0; n < h.length - 1; n++) r =
|
|
581
|
+
for (t = h[0], n = 0; n < h.length - 1; n++) r = z(this, e[s + n], i, n), r === R && (r = this._$AH[n]), o ||= !st(r) || r !== this._$AH[n], r === D ? t = D : t !== D && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
|
|
582
582
|
}
|
|
583
|
-
o && !e && this.
|
|
583
|
+
o && !e && this.j(t);
|
|
584
584
|
}
|
|
585
|
-
|
|
586
|
-
t ===
|
|
585
|
+
j(t) {
|
|
586
|
+
t === D ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
class
|
|
589
|
+
class Y extends G {
|
|
590
590
|
constructor() {
|
|
591
591
|
super(...arguments), this.type = 3;
|
|
592
592
|
}
|
|
593
|
-
|
|
594
|
-
this.element[this.name] = t ===
|
|
593
|
+
j(t) {
|
|
594
|
+
this.element[this.name] = t === D ? void 0 : t;
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
class
|
|
597
|
+
class Z extends G {
|
|
598
598
|
constructor() {
|
|
599
599
|
super(...arguments), this.type = 4;
|
|
600
600
|
}
|
|
601
|
-
|
|
602
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
601
|
+
j(t) {
|
|
602
|
+
this.element.toggleAttribute(this.name, !!t && t !== D);
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
class
|
|
605
|
+
class q extends G {
|
|
606
606
|
constructor(t, i, s, e, h) {
|
|
607
607
|
super(t, i, s, e, h), this.type = 5;
|
|
608
608
|
}
|
|
609
609
|
_$AI(t, i = this) {
|
|
610
|
-
if ((t =
|
|
610
|
+
if ((t = z(this, t, i, 0) ?? D) === R) return;
|
|
611
611
|
const s = this._$AH,
|
|
612
|
-
e = t ===
|
|
613
|
-
h = t !==
|
|
612
|
+
e = t === D && s !== D || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
|
|
613
|
+
h = t !== D && (s === D || e);
|
|
614
614
|
e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
615
615
|
}
|
|
616
616
|
handleEvent(t) {
|
|
617
617
|
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
class
|
|
620
|
+
class K {
|
|
621
621
|
constructor(t, i, s) {
|
|
622
622
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
623
623
|
}
|
|
@@ -625,33 +625,33 @@ class L {
|
|
|
625
625
|
return this._$AM._$AU;
|
|
626
626
|
}
|
|
627
627
|
_$AI(t) {
|
|
628
|
-
|
|
628
|
+
z(this, t);
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
const
|
|
632
|
-
|
|
633
|
-
P:
|
|
634
|
-
A:
|
|
631
|
+
const si = {
|
|
632
|
+
M: f$1,
|
|
633
|
+
P: v,
|
|
634
|
+
A: m,
|
|
635
635
|
C: 1,
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
V:
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
636
|
+
L: U,
|
|
637
|
+
R: F,
|
|
638
|
+
D: $,
|
|
639
|
+
V: z,
|
|
640
|
+
I: et$1,
|
|
641
|
+
H: G,
|
|
642
|
+
N: Z,
|
|
643
|
+
U: q,
|
|
644
|
+
B: Y,
|
|
645
|
+
F: K
|
|
646
646
|
},
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
const
|
|
647
|
+
Re = n$1.litHtmlPolyfillSupport;
|
|
648
|
+
Re?.(B, et$1), (n$1.litHtmlVersions ??= []).push("3.2.0");
|
|
649
|
+
const Q = (t, i, s) => {
|
|
650
650
|
const e = s?.renderBefore ?? i;
|
|
651
651
|
let h = e._$litPart$;
|
|
652
652
|
if (void 0 === h) {
|
|
653
653
|
const t = s?.renderBefore ?? null;
|
|
654
|
-
e._$litPart$ = h = new
|
|
654
|
+
e._$litPart$ = h = new et$1(i.insertBefore(lt$1(), t), t, void 0, s ?? {});
|
|
655
655
|
}
|
|
656
656
|
return h._$AI(t), h;
|
|
657
657
|
};
|
|
@@ -661,45 +661,45 @@ const j = (t, i, s) => {
|
|
|
661
661
|
* Copyright 2017 Google LLC
|
|
662
662
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
663
663
|
*/
|
|
664
|
-
|
|
664
|
+
class h extends b {
|
|
665
665
|
constructor() {
|
|
666
666
|
super(...arguments), this.renderOptions = {
|
|
667
667
|
host: this
|
|
668
|
-
}, this.
|
|
668
|
+
}, this.o = void 0;
|
|
669
669
|
}
|
|
670
670
|
createRenderRoot() {
|
|
671
671
|
const t = super.createRenderRoot();
|
|
672
672
|
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
673
673
|
}
|
|
674
674
|
update(t) {
|
|
675
|
-
const
|
|
676
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this.
|
|
675
|
+
const e = this.render();
|
|
676
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this.o = Q(e, this.renderRoot, this.renderOptions);
|
|
677
677
|
}
|
|
678
678
|
connectedCallback() {
|
|
679
|
-
super.connectedCallback(), this.
|
|
679
|
+
super.connectedCallback(), this.o?.setConnected(!0);
|
|
680
680
|
}
|
|
681
681
|
disconnectedCallback() {
|
|
682
|
-
super.disconnectedCallback(), this.
|
|
682
|
+
super.disconnectedCallback(), this.o?.setConnected(!1);
|
|
683
683
|
}
|
|
684
684
|
render() {
|
|
685
|
-
return
|
|
685
|
+
return R;
|
|
686
686
|
}
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
LitElement:
|
|
687
|
+
}
|
|
688
|
+
h._$litElement$ = !0, h["finalized"] = !0, globalThis.litElementHydrateSupport?.({
|
|
689
|
+
LitElement: h
|
|
690
690
|
});
|
|
691
|
-
const
|
|
692
|
-
|
|
693
|
-
LitElement:
|
|
691
|
+
const f = globalThis.litElementPolyfillSupport;
|
|
692
|
+
f?.({
|
|
693
|
+
LitElement: h
|
|
694
694
|
});
|
|
695
|
-
(globalThis.litElementVersions ??= []).push("4.0
|
|
695
|
+
(globalThis.litElementVersions ??= []).push("4.1.0");
|
|
696
696
|
|
|
697
697
|
/**
|
|
698
698
|
* @license
|
|
699
699
|
* Copyright 2017 Google LLC
|
|
700
700
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
701
701
|
*/
|
|
702
|
-
const t
|
|
702
|
+
const t = {
|
|
703
703
|
ATTRIBUTE: 1,
|
|
704
704
|
CHILD: 2,
|
|
705
705
|
PROPERTY: 3,
|
|
@@ -717,7 +717,7 @@ class i {
|
|
|
717
717
|
return this._$AM._$AU;
|
|
718
718
|
}
|
|
719
719
|
_$AT(t, e, i) {
|
|
720
|
-
this.
|
|
720
|
+
this.t = t, this._$AM = e, this.i = i;
|
|
721
721
|
}
|
|
722
722
|
_$AS(t, e) {
|
|
723
723
|
return this.update(t, e);
|
|
@@ -733,39 +733,39 @@ class i {
|
|
|
733
733
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
734
734
|
*/
|
|
735
735
|
const {
|
|
736
|
-
|
|
737
|
-
} =
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
const
|
|
741
|
-
|
|
742
|
-
if (void 0 ===
|
|
743
|
-
const
|
|
744
|
-
|
|
745
|
-
|
|
736
|
+
I: et
|
|
737
|
+
} = si,
|
|
738
|
+
lt = () => document.createComment(""),
|
|
739
|
+
at = (o, t, i) => {
|
|
740
|
+
const n = o._$AA.parentNode,
|
|
741
|
+
e = void 0 === t ? o._$AB : t._$AA;
|
|
742
|
+
if (void 0 === i) {
|
|
743
|
+
const t = n.insertBefore(lt(), e),
|
|
744
|
+
l = n.insertBefore(lt(), e);
|
|
745
|
+
i = new et(t, l, o, o.options);
|
|
746
746
|
} else {
|
|
747
|
-
const t =
|
|
748
|
-
|
|
749
|
-
c =
|
|
747
|
+
const t = i._$AB.nextSibling,
|
|
748
|
+
l = i._$AM,
|
|
749
|
+
c = l !== o;
|
|
750
750
|
if (c) {
|
|
751
751
|
let t;
|
|
752
|
-
|
|
752
|
+
i._$AQ?.(o), i._$AM = o, void 0 !== i._$AP && (t = o._$AU) !== l._$AU && i._$AP(t);
|
|
753
753
|
}
|
|
754
|
-
if (t !==
|
|
755
|
-
let o =
|
|
754
|
+
if (t !== e || c) {
|
|
755
|
+
let o = i._$AA;
|
|
756
756
|
for (; o !== t;) {
|
|
757
757
|
const t = o.nextSibling;
|
|
758
|
-
|
|
758
|
+
n.insertBefore(o, e), o = t;
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
|
-
return
|
|
762
|
+
return i;
|
|
763
763
|
},
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
764
|
+
ct = (o, t, i = o) => (o._$AI(t, i), o),
|
|
765
|
+
ht = {},
|
|
766
|
+
dt = (o, t = ht) => o._$AH = t,
|
|
767
|
+
ut = o => o._$AH,
|
|
768
|
+
pt = o => {
|
|
769
769
|
o._$AP?.(!1, !0);
|
|
770
770
|
let t = o._$AA;
|
|
771
771
|
const i = o._$AB.nextSibling;
|
|
@@ -780,16 +780,16 @@ const {
|
|
|
780
780
|
* Copyright 2017 Google LLC
|
|
781
781
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
782
782
|
*/
|
|
783
|
-
const
|
|
783
|
+
const Jt = (e, s, t) => {
|
|
784
784
|
const r = new Map();
|
|
785
785
|
for (let l = s; l <= t; l++) r.set(e[l], l);
|
|
786
786
|
return r;
|
|
787
787
|
},
|
|
788
|
-
|
|
788
|
+
Qt = e(class extends i {
|
|
789
789
|
constructor(e) {
|
|
790
|
-
if (super(e), e.type !== t
|
|
790
|
+
if (super(e), e.type !== t.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
791
791
|
}
|
|
792
|
-
|
|
792
|
+
dt(e, s, t) {
|
|
793
793
|
let r;
|
|
794
794
|
void 0 === t ? t = s : void 0 !== s && (r = s);
|
|
795
795
|
const l = [],
|
|
@@ -802,43 +802,43 @@ const u = (e, s, t) => {
|
|
|
802
802
|
};
|
|
803
803
|
}
|
|
804
804
|
render(e, s, t) {
|
|
805
|
-
return this.
|
|
805
|
+
return this.dt(e, s, t).values;
|
|
806
806
|
}
|
|
807
|
-
update(s,
|
|
808
|
-
const
|
|
807
|
+
update(e, [s, t, r]) {
|
|
808
|
+
const l = ut(e),
|
|
809
809
|
{
|
|
810
|
-
values:
|
|
811
|
-
keys:
|
|
812
|
-
} = this.
|
|
813
|
-
if (!Array.isArray(
|
|
814
|
-
const
|
|
815
|
-
|
|
816
|
-
let
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
for (;
|
|
823
|
-
if (
|
|
824
|
-
const
|
|
825
|
-
t = void 0 !==
|
|
810
|
+
values: o,
|
|
811
|
+
keys: i
|
|
812
|
+
} = this.dt(s, t, r);
|
|
813
|
+
if (!Array.isArray(l)) return this.ut = i, o;
|
|
814
|
+
const n = this.ut ??= [],
|
|
815
|
+
f = [];
|
|
816
|
+
let u,
|
|
817
|
+
c,
|
|
818
|
+
d = 0,
|
|
819
|
+
p = l.length - 1,
|
|
820
|
+
a = 0,
|
|
821
|
+
h = o.length - 1;
|
|
822
|
+
for (; d <= p && a <= h;) if (null === l[d]) d++;else if (null === l[p]) p--;else if (n[d] === i[a]) f[a] = ct(l[d], o[a]), d++, a++;else if (n[p] === i[h]) f[h] = ct(l[p], o[h]), p--, h--;else if (n[d] === i[h]) f[h] = ct(l[d], o[h]), at(e, f[h + 1], l[d]), d++, h--;else if (n[p] === i[a]) f[a] = ct(l[p], o[a]), at(e, l[d], l[p]), p--, a++;else if (void 0 === u && (u = Jt(i, a, h), c = Jt(n, d, p)), u.has(n[d])) {
|
|
823
|
+
if (u.has(n[p])) {
|
|
824
|
+
const s = c.get(i[a]),
|
|
825
|
+
t = void 0 !== s ? l[s] : null;
|
|
826
826
|
if (null === t) {
|
|
827
|
-
const
|
|
828
|
-
|
|
829
|
-
} else
|
|
830
|
-
|
|
831
|
-
} else
|
|
832
|
-
} else
|
|
833
|
-
for (;
|
|
834
|
-
const
|
|
835
|
-
|
|
827
|
+
const s = at(e, l[d]);
|
|
828
|
+
ct(s, o[a]), f[a] = s;
|
|
829
|
+
} else f[a] = ct(t, o[a]), at(e, l[d], t), l[s] = null;
|
|
830
|
+
a++;
|
|
831
|
+
} else pt(l[p]), p--;
|
|
832
|
+
} else pt(l[d]), d++;
|
|
833
|
+
for (; a <= h;) {
|
|
834
|
+
const s = at(e, f[h + 1]);
|
|
835
|
+
ct(s, o[a]), f[a++] = s;
|
|
836
836
|
}
|
|
837
|
-
for (;
|
|
838
|
-
const e = d
|
|
839
|
-
null !== e &&
|
|
837
|
+
for (; d <= p;) {
|
|
838
|
+
const e = l[d++];
|
|
839
|
+
null !== e && pt(e);
|
|
840
840
|
}
|
|
841
|
-
return this.
|
|
841
|
+
return this.ut = i, dt(e, f), R;
|
|
842
842
|
}
|
|
843
843
|
});
|
|
844
844
|
|
|
@@ -850,9 +850,9 @@ const u = (e, s, t) => {
|
|
|
850
850
|
const o = {
|
|
851
851
|
attribute: !0,
|
|
852
852
|
type: String,
|
|
853
|
-
converter: u
|
|
853
|
+
converter: u,
|
|
854
854
|
reflect: !1,
|
|
855
|
-
hasChanged: f$
|
|
855
|
+
hasChanged: f$2
|
|
856
856
|
},
|
|
857
857
|
r$1 = (t = o, e, r) => {
|
|
858
858
|
const {
|
|
@@ -870,7 +870,7 @@ const o = {
|
|
|
870
870
|
e.set.call(this, r), this.requestUpdate(o, n, t);
|
|
871
871
|
},
|
|
872
872
|
init(e) {
|
|
873
|
-
return void 0 !== e && this.
|
|
873
|
+
return void 0 !== e && this.P(o, void 0, t), e;
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
876
|
}
|
|
@@ -908,12 +908,12 @@ function r(r) {
|
|
|
908
908
|
});
|
|
909
909
|
}
|
|
910
910
|
|
|
911
|
-
class WidgetValue extends
|
|
911
|
+
class WidgetValue extends h {
|
|
912
912
|
constructor() {
|
|
913
913
|
super();
|
|
914
914
|
this.dataSets = new Map();
|
|
915
915
|
this.textActive = true;
|
|
916
|
-
this.version = '1.
|
|
916
|
+
this.version = '1.1.5';
|
|
917
917
|
this.origWidth = 0;
|
|
918
918
|
this.origHeight = 0;
|
|
919
919
|
this.resizeObserver = new ResizeObserver(this.adjustSizes.bind(this));
|
|
@@ -984,18 +984,20 @@ class WidgetValue extends s$1 {
|
|
|
984
984
|
const boxes = Array.from((_d = this === null || this === void 0 ? void 0 : this.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelectorAll('.value-container > .single-value'));
|
|
985
985
|
boxes === null || boxes === void 0 ? void 0 : boxes.forEach((box) => box.setAttribute('style', `width:${modifier * width}px; height:${modifier * height}px; padding:${modifier * 6}px`));
|
|
986
986
|
boxes === null || boxes === void 0 ? void 0 : boxes.forEach((n) => {
|
|
987
|
+
var _a, _b;
|
|
987
988
|
const label = n.getAttribute('label');
|
|
988
989
|
const ds = this.dataSets.get(label !== null && label !== void 0 ? label : '');
|
|
989
990
|
const numberText = n.querySelector('.current-value');
|
|
990
|
-
numberText.setAttribute('style', `font-size: ${32 * modifier}px; ${(ds === null || ds === void 0 ? void 0 : ds.valueColor) ? 'color: ' + (ds === null || ds === void 0 ? void 0 : ds.valueColor) : ''}`);
|
|
991
|
+
numberText.setAttribute('style', `font-size: ${32 * modifier}px; ${((_a = ds === null || ds === void 0 ? void 0 : ds.styling) === null || _a === void 0 ? void 0 : _a.valueColor) ? 'color: ' + ((_b = ds === null || ds === void 0 ? void 0 : ds.styling) === null || _b === void 0 ? void 0 : _b.valueColor) : ''}`);
|
|
991
992
|
});
|
|
992
993
|
boxes === null || boxes === void 0 ? void 0 : boxes.forEach((n) => {
|
|
994
|
+
var _a, _b, _c, _d;
|
|
993
995
|
const label = n.getAttribute('label');
|
|
994
996
|
const ds = this.dataSets.get(label !== null && label !== void 0 ? label : '');
|
|
995
997
|
const labelText = n.querySelector('.label');
|
|
996
|
-
labelText.setAttribute('style', `font-size: ${26 * modifier}px; ${(ds === null || ds === void 0 ? void 0 : ds.labelColor) ? 'color: ' + (ds === null || ds === void 0 ? void 0 : ds.labelColor) : ''}`);
|
|
998
|
+
labelText.setAttribute('style', `font-size: ${26 * modifier}px; ${((_a = ds === null || ds === void 0 ? void 0 : ds.styling) === null || _a === void 0 ? void 0 : _a.labelColor) ? 'color: ' + ((_b = ds === null || ds === void 0 ? void 0 : ds.styling) === null || _b === void 0 ? void 0 : _b.labelColor) : ''}`);
|
|
997
999
|
const unitText = n.querySelector('.unit');
|
|
998
|
-
unitText.setAttribute('style', `font-size: ${26 * modifier}px; ${(ds === null || ds === void 0 ? void 0 : ds.labelColor) ? 'color: ' + (ds === null || ds === void 0 ? void 0 : ds.labelColor) : ''}`);
|
|
1000
|
+
unitText.setAttribute('style', `font-size: ${26 * modifier}px; ${((_c = ds === null || ds === void 0 ? void 0 : ds.styling) === null || _c === void 0 ? void 0 : _c.labelColor) ? 'color: ' + ((_d = ds === null || ds === void 0 ? void 0 : ds.styling) === null || _d === void 0 ? void 0 : _d.labelColor) : ''}`);
|
|
999
1001
|
});
|
|
1000
1002
|
this.textActive = true;
|
|
1001
1003
|
}
|
|
@@ -1014,35 +1016,35 @@ class WidgetValue extends s$1 {
|
|
|
1014
1016
|
const distincts = [...new Set((_a = ds.data) === null || _a === void 0 ? void 0 : _a.map((d) => d.pivot))].sort();
|
|
1015
1017
|
ds.needleValue = undefined;
|
|
1016
1018
|
distincts.forEach((piv) => {
|
|
1017
|
-
var _a, _b
|
|
1019
|
+
var _a, _b;
|
|
1018
1020
|
const prefix = piv ? `${piv} - ` : '';
|
|
1019
1021
|
const pds = {
|
|
1020
|
-
label:
|
|
1022
|
+
label: prefix + ds.label,
|
|
1021
1023
|
order: ds.order,
|
|
1022
1024
|
unit: ds.unit,
|
|
1023
1025
|
precision: ds.precision,
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
data: distincts.length === 1 ? ds.data : (_b = ds.data) === null || _b === void 0 ? void 0 : _b.filter((d) => d.pivot === piv),
|
|
1026
|
+
advanced: ds.advanced,
|
|
1027
|
+
styling: ds.styling,
|
|
1028
|
+
data: distincts.length === 1 ? ds.data : (_a = ds.data) === null || _a === void 0 ? void 0 : _a.filter((d) => d.pivot === piv),
|
|
1028
1029
|
needleValue: undefined
|
|
1029
1030
|
};
|
|
1030
|
-
this.dataSets.set((
|
|
1031
|
+
this.dataSets.set((_b = pds.label) !== null && _b !== void 0 ? _b : '', pds);
|
|
1031
1032
|
});
|
|
1032
1033
|
});
|
|
1033
1034
|
// filter latest values and calculate average
|
|
1034
1035
|
this.dataSets.forEach((ds, label) => {
|
|
1035
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
const
|
|
1036
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
1037
|
+
(_a = ds.advanced) !== null && _a !== void 0 ? _a : (ds.advanced = {});
|
|
1038
|
+
if (typeof ((_b = ds.advanced) === null || _b === void 0 ? void 0 : _b.averageLatest) !== 'number' || !isNaN((_c = ds.advanced) === null || _c === void 0 ? void 0 : _c.averageLatest))
|
|
1039
|
+
ds.advanced.averageLatest = 1;
|
|
1040
|
+
const data = (_g = (_d = ds === null || ds === void 0 ? void 0 : ds.data) === null || _d === void 0 ? void 0 : _d.slice(0, (_f = (_e = ds === null || ds === void 0 ? void 0 : ds.advanced) === null || _e === void 0 ? void 0 : _e.averageLatest) !== null && _f !== void 0 ? _f : 1)) !== null && _g !== void 0 ? _g : [];
|
|
1041
|
+
const values = ((_j = (_h = data === null || data === void 0 ? void 0 : data.map((d) => d.value)) === null || _h === void 0 ? void 0 : _h.filter((p) => p !== undefined)) !== null && _j !== void 0 ? _j : []);
|
|
1040
1042
|
const average = values.reduce((p, c) => p + c, 0) / values.length;
|
|
1041
1043
|
// Check age of data Latency
|
|
1042
|
-
const tsp = Date.parse((
|
|
1044
|
+
const tsp = Date.parse((_l = (_k = data === null || data === void 0 ? void 0 : data[0]) === null || _k === void 0 ? void 0 : _k.tsp) !== null && _l !== void 0 ? _l : '');
|
|
1043
1045
|
if (isNaN(tsp)) {
|
|
1044
1046
|
const now = new Date().getTime();
|
|
1045
|
-
if (now - tsp > ((
|
|
1047
|
+
if (now - tsp > ((_o = (_m = ds.advanced) === null || _m === void 0 ? void 0 : _m.maxLatency) !== null && _o !== void 0 ? _o : Infinity) * 1000)
|
|
1046
1048
|
ds.needleValue = undefined;
|
|
1047
1049
|
}
|
|
1048
1050
|
ds.needleValue = average;
|
|
@@ -1053,21 +1055,21 @@ class WidgetValue extends s$1 {
|
|
|
1053
1055
|
// console.log('Value Datasets', this.dataSets)
|
|
1054
1056
|
}
|
|
1055
1057
|
render() {
|
|
1056
|
-
var _a, _b, _c, _d
|
|
1057
|
-
return
|
|
1058
|
+
var _a, _b, _c, _d;
|
|
1059
|
+
return ke `
|
|
1058
1060
|
<div class="wrapper">
|
|
1059
1061
|
<header>
|
|
1060
|
-
<h3 class="paging" ?active=${(
|
|
1061
|
-
${(
|
|
1062
|
+
<h3 class="paging" ?active=${(_a = this.inputData) === null || _a === void 0 ? void 0 : _a.title}>
|
|
1063
|
+
${(_b = this.inputData) === null || _b === void 0 ? void 0 : _b.title}
|
|
1062
1064
|
</h3>
|
|
1063
|
-
<p class="paging" ?active=${(
|
|
1064
|
-
${(
|
|
1065
|
+
<p class="paging" ?active=${(_c = this.inputData) === null || _c === void 0 ? void 0 : _c.subTitle}>
|
|
1066
|
+
${(_d = this.inputData) === null || _d === void 0 ? void 0 : _d.subTitle}
|
|
1065
1067
|
</p>
|
|
1066
1068
|
</header>
|
|
1067
1069
|
<div class="sizing-container">
|
|
1068
|
-
${
|
|
1070
|
+
${Qt(this.dataSets, ([label]) => label, ([label, ds]) => {
|
|
1069
1071
|
var _a, _b;
|
|
1070
|
-
return
|
|
1072
|
+
return ke `
|
|
1071
1073
|
<div class="single-value" label="${label}">
|
|
1072
1074
|
<div class="label paging" ?active=${this.textActive}>${label}</div>
|
|
1073
1075
|
<span class="current-value paging" ?active=${this.textActive}>
|
|
@@ -1081,9 +1083,9 @@ class WidgetValue extends s$1 {
|
|
|
1081
1083
|
})}
|
|
1082
1084
|
</div>
|
|
1083
1085
|
<div class="value-container">
|
|
1084
|
-
${
|
|
1086
|
+
${Qt([...this.dataSets.entries()].sort(), ([label]) => label, ([label, ds]) => {
|
|
1085
1087
|
var _a, _b;
|
|
1086
|
-
return
|
|
1088
|
+
return ke `
|
|
1087
1089
|
<div class="single-value" label="${label}">
|
|
1088
1090
|
<div class="label paging" ?active=${this.textActive}>${label}</div>
|
|
1089
1091
|
<span class="current-value paging" ?active=${this.textActive}>
|
|
@@ -1100,7 +1102,7 @@ class WidgetValue extends s$1 {
|
|
|
1100
1102
|
`;
|
|
1101
1103
|
}
|
|
1102
1104
|
}
|
|
1103
|
-
WidgetValue.styles = i$
|
|
1105
|
+
WidgetValue.styles = i$2 `
|
|
1104
1106
|
:host {
|
|
1105
1107
|
display: block;
|
|
1106
1108
|
font-family: sans-serif;
|
|
@@ -1205,7 +1207,7 @@ __decorate([
|
|
|
1205
1207
|
__decorate([
|
|
1206
1208
|
r()
|
|
1207
1209
|
], WidgetValue.prototype, "labelText", void 0);
|
|
1208
|
-
window.customElements.define('widget-value-1.
|
|
1210
|
+
window.customElements.define('widget-value-1.1.5', WidgetValue);
|
|
1209
1211
|
|
|
1210
1212
|
export { WidgetValue };
|
|
1211
1213
|
//# sourceMappingURL=widget-value.js.map
|