@ixfx/components 0.1.1 → 0.1.3
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/bundle/index.js +837 -524
- package/bundle/index.js.map +1 -1
- package/dist/charts/plot.js +2 -2
- package/dist/charts/plot.js.map +1 -1
- package/package.json +1 -1
package/bundle/index.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { customElement, property, queryAssignedElements } from "lit/decorators.js";
|
|
2
1
|
import { Circles, degreeToRadian, radianArc, radianToDegree, radiansSum } from "ixfx/geometry.js";
|
|
3
2
|
import * as Numbers from "ixfx/numbers.js";
|
|
4
3
|
import { clamp } from "ixfx/numbers.js";
|
|
5
4
|
import { getCssVariable, getCssVariablesWithFallback } from "ixfx/dom.js";
|
|
6
|
-
import { createRef, ref } from "lit/directives/ref.js";
|
|
7
5
|
import { Trees } from "ixfx/collections.js";
|
|
8
|
-
import { join } from "lit/directives/join.js";
|
|
9
6
|
import { CanvasHelper, Colour, Drawing } from "ixfx/visual.js";
|
|
10
7
|
import { Pathed } from "ixfx";
|
|
11
|
-
import { customElement as customElement$1 } from "lit/decorators/custom-element.js";
|
|
12
|
-
import { property as property$1 } from "lit/decorators/property.js";
|
|
13
|
-
import { repeat } from "lit/directives/repeat.js";
|
|
14
8
|
|
|
15
9
|
//#region node_modules/@lit/reactive-element/css-tag.js
|
|
16
10
|
/**
|
|
@@ -18,43 +12,43 @@ import { repeat } from "lit/directives/repeat.js";
|
|
|
18
12
|
* Copyright 2019 Google LLC
|
|
19
13
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
14
|
*/
|
|
21
|
-
const t$
|
|
22
|
-
var n$
|
|
23
|
-
constructor(t$
|
|
24
|
-
if (this._$cssResult$ = !0, o$
|
|
25
|
-
this.cssText = t$
|
|
15
|
+
const t$4 = globalThis, e$5 = t$4.ShadowRoot && (void 0 === t$4.ShadyCSS || t$4.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$4 = Symbol(), o$8 = /* @__PURE__ */ new WeakMap();
|
|
16
|
+
var n$5 = class {
|
|
17
|
+
constructor(t$5, e$7, o$9) {
|
|
18
|
+
if (this._$cssResult$ = !0, o$9 !== s$4) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
19
|
+
this.cssText = t$5, this.t = e$7;
|
|
26
20
|
}
|
|
27
21
|
get styleSheet() {
|
|
28
|
-
let t$
|
|
29
|
-
const s$
|
|
30
|
-
if (e$
|
|
31
|
-
const e$
|
|
32
|
-
e$
|
|
22
|
+
let t$5 = this.o;
|
|
23
|
+
const s$5 = this.t;
|
|
24
|
+
if (e$5 && void 0 === t$5) {
|
|
25
|
+
const e$7 = void 0 !== s$5 && 1 === s$5.length;
|
|
26
|
+
e$7 && (t$5 = o$8.get(s$5)), void 0 === t$5 && ((this.o = t$5 = new CSSStyleSheet()).replaceSync(this.cssText), e$7 && o$8.set(s$5, t$5));
|
|
33
27
|
}
|
|
34
|
-
return t$
|
|
28
|
+
return t$5;
|
|
35
29
|
}
|
|
36
30
|
toString() {
|
|
37
31
|
return this.cssText;
|
|
38
32
|
}
|
|
39
33
|
};
|
|
40
|
-
const r$
|
|
41
|
-
const o$
|
|
42
|
-
if (!0 === t$
|
|
43
|
-
if ("number" == typeof t$
|
|
44
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " + t$
|
|
45
|
-
})(s$
|
|
46
|
-
return new n$
|
|
47
|
-
}, S$1 = (s$
|
|
48
|
-
if (e$
|
|
49
|
-
else for (const e$
|
|
50
|
-
const o$
|
|
51
|
-
void 0 !== n$
|
|
52
|
-
}
|
|
53
|
-
}, c$
|
|
54
|
-
let e$
|
|
55
|
-
for (const s$
|
|
56
|
-
return r$
|
|
57
|
-
})(t$
|
|
34
|
+
const r$4 = (t$5) => new n$5("string" == typeof t$5 ? t$5 : t$5 + "", void 0, s$4), i$1 = (t$5, ...e$7) => {
|
|
35
|
+
const o$9 = 1 === t$5.length ? t$5[0] : e$7.reduce(((e$8, s$5, o$10) => e$8 + ((t$6) => {
|
|
36
|
+
if (!0 === t$6._$cssResult$) return t$6.cssText;
|
|
37
|
+
if ("number" == typeof t$6) return t$6;
|
|
38
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + t$6 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
39
|
+
})(s$5) + t$5[o$10 + 1]), t$5[0]);
|
|
40
|
+
return new n$5(o$9, t$5, s$4);
|
|
41
|
+
}, S$1 = (s$5, o$9) => {
|
|
42
|
+
if (e$5) s$5.adoptedStyleSheets = o$9.map(((t$5) => t$5 instanceof CSSStyleSheet ? t$5 : t$5.styleSheet));
|
|
43
|
+
else for (const e$7 of o$9) {
|
|
44
|
+
const o$10 = document.createElement("style"), n$7 = t$4.litNonce;
|
|
45
|
+
void 0 !== n$7 && o$10.setAttribute("nonce", n$7), o$10.textContent = e$7.cssText, s$5.appendChild(o$10);
|
|
46
|
+
}
|
|
47
|
+
}, c$4 = e$5 ? (t$5) => t$5 : (t$5) => t$5 instanceof CSSStyleSheet ? ((t$6) => {
|
|
48
|
+
let e$7 = "";
|
|
49
|
+
for (const s$5 of t$6.cssRules) e$7 += s$5.cssText;
|
|
50
|
+
return r$4(e$7);
|
|
51
|
+
})(t$5) : t$5;
|
|
58
52
|
|
|
59
53
|
//#endregion
|
|
60
54
|
//#region node_modules/@lit/reactive-element/reactive-element.js
|
|
@@ -62,181 +56,181 @@ const r$1 = (t$2) => new n$1("string" == typeof t$2 ? t$2 : t$2 + "", void 0, s$
|
|
|
62
56
|
* @license
|
|
63
57
|
* Copyright 2017 Google LLC
|
|
64
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
|
-
*/ const { is: i$
|
|
66
|
-
toAttribute(t$
|
|
67
|
-
switch (s$
|
|
59
|
+
*/ const { is: i$5, defineProperty: e$6, getOwnPropertyDescriptor: h$4, getOwnPropertyNames: r$5, getOwnPropertySymbols: o$7, getPrototypeOf: n$6 } = Object, a$1 = globalThis, c$5 = a$1.trustedTypes, l$2 = c$5 ? c$5.emptyScript : "", p$2 = a$1.reactiveElementPolyfillSupport, d$2 = (t$5, s$5) => t$5, u$2 = {
|
|
60
|
+
toAttribute(t$5, s$5) {
|
|
61
|
+
switch (s$5) {
|
|
68
62
|
case Boolean:
|
|
69
|
-
t$
|
|
63
|
+
t$5 = t$5 ? l$2 : null;
|
|
70
64
|
break;
|
|
71
65
|
case Object:
|
|
72
|
-
case Array: t$
|
|
66
|
+
case Array: t$5 = null == t$5 ? t$5 : JSON.stringify(t$5);
|
|
73
67
|
}
|
|
74
|
-
return t$
|
|
68
|
+
return t$5;
|
|
75
69
|
},
|
|
76
|
-
fromAttribute(t$
|
|
77
|
-
let i$
|
|
78
|
-
switch (s$
|
|
70
|
+
fromAttribute(t$5, s$5) {
|
|
71
|
+
let i$6 = t$5;
|
|
72
|
+
switch (s$5) {
|
|
79
73
|
case Boolean:
|
|
80
|
-
i$
|
|
74
|
+
i$6 = null !== t$5;
|
|
81
75
|
break;
|
|
82
76
|
case Number:
|
|
83
|
-
i$
|
|
77
|
+
i$6 = null === t$5 ? null : Number(t$5);
|
|
84
78
|
break;
|
|
85
79
|
case Object:
|
|
86
80
|
case Array: try {
|
|
87
|
-
i$
|
|
88
|
-
} catch (t$
|
|
89
|
-
i$
|
|
81
|
+
i$6 = JSON.parse(t$5);
|
|
82
|
+
} catch (t$6) {
|
|
83
|
+
i$6 = null;
|
|
90
84
|
}
|
|
91
85
|
}
|
|
92
|
-
return i$
|
|
86
|
+
return i$6;
|
|
93
87
|
}
|
|
94
|
-
}, f$
|
|
88
|
+
}, f$2 = (t$5, s$5) => !i$5(t$5, s$5), b$1 = {
|
|
95
89
|
attribute: !0,
|
|
96
90
|
type: String,
|
|
97
|
-
converter: u$
|
|
91
|
+
converter: u$2,
|
|
98
92
|
reflect: !1,
|
|
99
93
|
useDefault: !1,
|
|
100
|
-
hasChanged: f$
|
|
94
|
+
hasChanged: f$2
|
|
101
95
|
};
|
|
102
96
|
Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
103
97
|
var y = class extends HTMLElement {
|
|
104
|
-
static addInitializer(t$
|
|
105
|
-
this._$Ei(), (this.l ??= []).push(t$
|
|
98
|
+
static addInitializer(t$5) {
|
|
99
|
+
this._$Ei(), (this.l ??= []).push(t$5);
|
|
106
100
|
}
|
|
107
101
|
static get observedAttributes() {
|
|
108
102
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
109
103
|
}
|
|
110
|
-
static createProperty(t$
|
|
111
|
-
if (s$
|
|
112
|
-
const i$
|
|
113
|
-
void 0 !== h$
|
|
104
|
+
static createProperty(t$5, s$5 = b$1) {
|
|
105
|
+
if (s$5.state && (s$5.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t$5) && ((s$5 = Object.create(s$5)).wrapped = !0), this.elementProperties.set(t$5, s$5), !s$5.noAccessor) {
|
|
106
|
+
const i$6 = Symbol(), h$5 = this.getPropertyDescriptor(t$5, i$6, s$5);
|
|
107
|
+
void 0 !== h$5 && e$6(this.prototype, t$5, h$5);
|
|
114
108
|
}
|
|
115
109
|
}
|
|
116
|
-
static getPropertyDescriptor(t$
|
|
117
|
-
const { get: e$
|
|
110
|
+
static getPropertyDescriptor(t$5, s$5, i$6) {
|
|
111
|
+
const { get: e$7, set: r$6 } = h$4(this.prototype, t$5) ?? {
|
|
118
112
|
get() {
|
|
119
|
-
return this[s$
|
|
113
|
+
return this[s$5];
|
|
120
114
|
},
|
|
121
|
-
set(t$
|
|
122
|
-
this[s$
|
|
115
|
+
set(t$6) {
|
|
116
|
+
this[s$5] = t$6;
|
|
123
117
|
}
|
|
124
118
|
};
|
|
125
119
|
return {
|
|
126
|
-
get: e$
|
|
127
|
-
set(s$
|
|
128
|
-
const h$
|
|
129
|
-
r$
|
|
120
|
+
get: e$7,
|
|
121
|
+
set(s$6) {
|
|
122
|
+
const h$5 = e$7?.call(this);
|
|
123
|
+
r$6?.call(this, s$6), this.requestUpdate(t$5, h$5, i$6);
|
|
130
124
|
},
|
|
131
125
|
configurable: !0,
|
|
132
126
|
enumerable: !0
|
|
133
127
|
};
|
|
134
128
|
}
|
|
135
|
-
static getPropertyOptions(t$
|
|
136
|
-
return this.elementProperties.get(t$
|
|
129
|
+
static getPropertyOptions(t$5) {
|
|
130
|
+
return this.elementProperties.get(t$5) ?? b$1;
|
|
137
131
|
}
|
|
138
132
|
static _$Ei() {
|
|
139
|
-
if (this.hasOwnProperty(d$
|
|
140
|
-
const t$
|
|
141
|
-
t$
|
|
133
|
+
if (this.hasOwnProperty(d$2("elementProperties"))) return;
|
|
134
|
+
const t$5 = n$6(this);
|
|
135
|
+
t$5.finalize(), void 0 !== t$5.l && (this.l = [...t$5.l]), this.elementProperties = new Map(t$5.elementProperties);
|
|
142
136
|
}
|
|
143
137
|
static finalize() {
|
|
144
|
-
if (this.hasOwnProperty(d$
|
|
145
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$
|
|
146
|
-
const t$
|
|
147
|
-
for (const i$
|
|
138
|
+
if (this.hasOwnProperty(d$2("finalized"))) return;
|
|
139
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$2("properties"))) {
|
|
140
|
+
const t$6 = this.properties, s$5 = [...r$5(t$6), ...o$7(t$6)];
|
|
141
|
+
for (const i$6 of s$5) this.createProperty(i$6, t$6[i$6]);
|
|
148
142
|
}
|
|
149
|
-
const t$
|
|
150
|
-
if (null !== t$
|
|
151
|
-
const s$
|
|
152
|
-
if (void 0 !== s$
|
|
143
|
+
const t$5 = this[Symbol.metadata];
|
|
144
|
+
if (null !== t$5) {
|
|
145
|
+
const s$5 = litPropertyMetadata.get(t$5);
|
|
146
|
+
if (void 0 !== s$5) for (const [t$6, i$6] of s$5) this.elementProperties.set(t$6, i$6);
|
|
153
147
|
}
|
|
154
148
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
155
|
-
for (const [t$
|
|
156
|
-
const i$
|
|
157
|
-
void 0 !== i$
|
|
149
|
+
for (const [t$6, s$5] of this.elementProperties) {
|
|
150
|
+
const i$6 = this._$Eu(t$6, s$5);
|
|
151
|
+
void 0 !== i$6 && this._$Eh.set(i$6, t$6);
|
|
158
152
|
}
|
|
159
153
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
160
154
|
}
|
|
161
|
-
static finalizeStyles(s$
|
|
162
|
-
const i$
|
|
163
|
-
if (Array.isArray(s$
|
|
164
|
-
const e$
|
|
165
|
-
for (const s$
|
|
166
|
-
} else void 0 !== s$
|
|
167
|
-
return i$
|
|
155
|
+
static finalizeStyles(s$5) {
|
|
156
|
+
const i$6 = [];
|
|
157
|
+
if (Array.isArray(s$5)) {
|
|
158
|
+
const e$7 = new Set(s$5.flat(Infinity).reverse());
|
|
159
|
+
for (const s$6 of e$7) i$6.unshift(c$4(s$6));
|
|
160
|
+
} else void 0 !== s$5 && i$6.push(c$4(s$5));
|
|
161
|
+
return i$6;
|
|
168
162
|
}
|
|
169
|
-
static _$Eu(t$
|
|
170
|
-
const i$
|
|
171
|
-
return !1 === i$
|
|
163
|
+
static _$Eu(t$5, s$5) {
|
|
164
|
+
const i$6 = s$5.attribute;
|
|
165
|
+
return !1 === i$6 ? void 0 : "string" == typeof i$6 ? i$6 : "string" == typeof t$5 ? t$5.toLowerCase() : void 0;
|
|
172
166
|
}
|
|
173
167
|
constructor() {
|
|
174
168
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
175
169
|
}
|
|
176
170
|
_$Ev() {
|
|
177
|
-
this._$ES = new Promise(((t$
|
|
171
|
+
this._$ES = new Promise(((t$5) => this.enableUpdating = t$5)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t$5) => t$5(this)));
|
|
178
172
|
}
|
|
179
|
-
addController(t$
|
|
180
|
-
(this._$EO ??= /* @__PURE__ */ new Set()).add(t$
|
|
173
|
+
addController(t$5) {
|
|
174
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(t$5), void 0 !== this.renderRoot && this.isConnected && t$5.hostConnected?.();
|
|
181
175
|
}
|
|
182
|
-
removeController(t$
|
|
183
|
-
this._$EO?.delete(t$
|
|
176
|
+
removeController(t$5) {
|
|
177
|
+
this._$EO?.delete(t$5);
|
|
184
178
|
}
|
|
185
179
|
_$E_() {
|
|
186
|
-
const t$
|
|
187
|
-
for (const i$
|
|
188
|
-
t$
|
|
180
|
+
const t$5 = /* @__PURE__ */ new Map(), s$5 = this.constructor.elementProperties;
|
|
181
|
+
for (const i$6 of s$5.keys()) this.hasOwnProperty(i$6) && (t$5.set(i$6, this[i$6]), delete this[i$6]);
|
|
182
|
+
t$5.size > 0 && (this._$Ep = t$5);
|
|
189
183
|
}
|
|
190
184
|
createRenderRoot() {
|
|
191
|
-
const t$
|
|
192
|
-
return S$1(t$
|
|
185
|
+
const t$5 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
186
|
+
return S$1(t$5, this.constructor.elementStyles), t$5;
|
|
193
187
|
}
|
|
194
188
|
connectedCallback() {
|
|
195
|
-
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t$
|
|
189
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t$5) => t$5.hostConnected?.()));
|
|
196
190
|
}
|
|
197
|
-
enableUpdating(t$
|
|
191
|
+
enableUpdating(t$5) {}
|
|
198
192
|
disconnectedCallback() {
|
|
199
|
-
this._$EO?.forEach(((t$
|
|
193
|
+
this._$EO?.forEach(((t$5) => t$5.hostDisconnected?.()));
|
|
200
194
|
}
|
|
201
|
-
attributeChangedCallback(t$
|
|
202
|
-
this._$AK(t$
|
|
195
|
+
attributeChangedCallback(t$5, s$5, i$6) {
|
|
196
|
+
this._$AK(t$5, i$6);
|
|
203
197
|
}
|
|
204
|
-
_$ET(t$
|
|
205
|
-
const i$
|
|
206
|
-
if (void 0 !== e$
|
|
207
|
-
const h$
|
|
208
|
-
this._$Em = t$
|
|
198
|
+
_$ET(t$5, s$5) {
|
|
199
|
+
const i$6 = this.constructor.elementProperties.get(t$5), e$7 = this.constructor._$Eu(t$5, i$6);
|
|
200
|
+
if (void 0 !== e$7 && !0 === i$6.reflect) {
|
|
201
|
+
const h$5 = (void 0 !== i$6.converter?.toAttribute ? i$6.converter : u$2).toAttribute(s$5, i$6.type);
|
|
202
|
+
this._$Em = t$5, null == h$5 ? this.removeAttribute(e$7) : this.setAttribute(e$7, h$5), this._$Em = null;
|
|
209
203
|
}
|
|
210
204
|
}
|
|
211
|
-
_$AK(t$
|
|
212
|
-
const i$
|
|
213
|
-
if (void 0 !== e$
|
|
214
|
-
const t$
|
|
215
|
-
this._$Em = e$
|
|
216
|
-
const r$
|
|
217
|
-
this[e$
|
|
205
|
+
_$AK(t$5, s$5) {
|
|
206
|
+
const i$6 = this.constructor, e$7 = i$6._$Eh.get(t$5);
|
|
207
|
+
if (void 0 !== e$7 && this._$Em !== e$7) {
|
|
208
|
+
const t$6 = i$6.getPropertyOptions(e$7), h$5 = "function" == typeof t$6.converter ? { fromAttribute: t$6.converter } : void 0 !== t$6.converter?.fromAttribute ? t$6.converter : u$2;
|
|
209
|
+
this._$Em = e$7;
|
|
210
|
+
const r$6 = h$5.fromAttribute(s$5, t$6.type);
|
|
211
|
+
this[e$7] = r$6 ?? this._$Ej?.get(e$7) ?? r$6, this._$Em = null;
|
|
218
212
|
}
|
|
219
213
|
}
|
|
220
|
-
requestUpdate(t$
|
|
221
|
-
if (void 0 !== t$
|
|
222
|
-
const e$
|
|
223
|
-
if (i$
|
|
224
|
-
this.C(t$
|
|
214
|
+
requestUpdate(t$5, s$5, i$6) {
|
|
215
|
+
if (void 0 !== t$5) {
|
|
216
|
+
const e$7 = this.constructor, h$5 = this[t$5];
|
|
217
|
+
if (i$6 ??= e$7.getPropertyOptions(t$5), !((i$6.hasChanged ?? f$2)(h$5, s$5) || i$6.useDefault && i$6.reflect && h$5 === this._$Ej?.get(t$5) && !this.hasAttribute(e$7._$Eu(t$5, i$6)))) return;
|
|
218
|
+
this.C(t$5, s$5, i$6);
|
|
225
219
|
}
|
|
226
220
|
!1 === this.isUpdatePending && (this._$ES = this._$EP());
|
|
227
221
|
}
|
|
228
|
-
C(t$
|
|
229
|
-
i$
|
|
222
|
+
C(t$5, s$5, { useDefault: i$6, reflect: e$7, wrapped: h$5 }, r$6) {
|
|
223
|
+
i$6 && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t$5) && (this._$Ej.set(t$5, r$6 ?? s$5 ?? this[t$5]), !0 !== h$5 || void 0 !== r$6) || (this._$AL.has(t$5) || (this.hasUpdated || i$6 || (s$5 = void 0), this._$AL.set(t$5, s$5)), !0 === e$7 && this._$Em !== t$5 && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t$5));
|
|
230
224
|
}
|
|
231
225
|
async _$EP() {
|
|
232
226
|
this.isUpdatePending = !0;
|
|
233
227
|
try {
|
|
234
228
|
await this._$ES;
|
|
235
|
-
} catch (t$
|
|
236
|
-
Promise.reject(t$
|
|
229
|
+
} catch (t$6) {
|
|
230
|
+
Promise.reject(t$6);
|
|
237
231
|
}
|
|
238
|
-
const t$
|
|
239
|
-
return null != t$
|
|
232
|
+
const t$5 = this.scheduleUpdate();
|
|
233
|
+
return null != t$5 && await t$5, !this.isUpdatePending;
|
|
240
234
|
}
|
|
241
235
|
scheduleUpdate() {
|
|
242
236
|
return this.performUpdate();
|
|
@@ -245,27 +239,27 @@ var y = class extends HTMLElement {
|
|
|
245
239
|
if (!this.isUpdatePending) return;
|
|
246
240
|
if (!this.hasUpdated) {
|
|
247
241
|
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
248
|
-
for (const [t$
|
|
242
|
+
for (const [t$7, s$6] of this._$Ep) this[t$7] = s$6;
|
|
249
243
|
this._$Ep = void 0;
|
|
250
244
|
}
|
|
251
|
-
const t$
|
|
252
|
-
if (t$
|
|
253
|
-
const { wrapped: t$
|
|
254
|
-
!0 !== t$
|
|
245
|
+
const t$6 = this.constructor.elementProperties;
|
|
246
|
+
if (t$6.size > 0) for (const [s$6, i$6] of t$6) {
|
|
247
|
+
const { wrapped: t$7 } = i$6, e$7 = this[s$6];
|
|
248
|
+
!0 !== t$7 || this._$AL.has(s$6) || void 0 === e$7 || this.C(s$6, void 0, i$6, e$7);
|
|
255
249
|
}
|
|
256
250
|
}
|
|
257
|
-
let t$
|
|
258
|
-
const s$
|
|
251
|
+
let t$5 = !1;
|
|
252
|
+
const s$5 = this._$AL;
|
|
259
253
|
try {
|
|
260
|
-
t$
|
|
261
|
-
} catch (s$
|
|
262
|
-
throw t$
|
|
254
|
+
t$5 = this.shouldUpdate(s$5), t$5 ? (this.willUpdate(s$5), this._$EO?.forEach(((t$6) => t$6.hostUpdate?.())), this.update(s$5)) : this._$EM();
|
|
255
|
+
} catch (s$6) {
|
|
256
|
+
throw t$5 = !1, this._$EM(), s$6;
|
|
263
257
|
}
|
|
264
|
-
t$
|
|
258
|
+
t$5 && this._$AE(s$5);
|
|
265
259
|
}
|
|
266
|
-
willUpdate(t$
|
|
267
|
-
_$AE(t$
|
|
268
|
-
this._$EO?.forEach(((t$
|
|
260
|
+
willUpdate(t$5) {}
|
|
261
|
+
_$AE(t$5) {
|
|
262
|
+
this._$EO?.forEach(((t$6) => t$6.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t$5)), this.updated(t$5);
|
|
269
263
|
}
|
|
270
264
|
_$EM() {
|
|
271
265
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -276,16 +270,16 @@ var y = class extends HTMLElement {
|
|
|
276
270
|
getUpdateComplete() {
|
|
277
271
|
return this._$ES;
|
|
278
272
|
}
|
|
279
|
-
shouldUpdate(t$
|
|
273
|
+
shouldUpdate(t$5) {
|
|
280
274
|
return !0;
|
|
281
275
|
}
|
|
282
|
-
update(t$
|
|
283
|
-
this._$Eq &&= this._$Eq.forEach(((t$
|
|
276
|
+
update(t$5) {
|
|
277
|
+
this._$Eq &&= this._$Eq.forEach(((t$6) => this._$ET(t$6, this[t$6]))), this._$EM();
|
|
284
278
|
}
|
|
285
|
-
updated(t$
|
|
286
|
-
firstUpdated(t$
|
|
279
|
+
updated(t$5) {}
|
|
280
|
+
firstUpdated(t$5) {}
|
|
287
281
|
};
|
|
288
|
-
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d$
|
|
282
|
+
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d$2("elementProperties")] = /* @__PURE__ */ new Map(), y[d$2("finalized")] = /* @__PURE__ */ new Map(), p$2?.({ ReactiveElement: y }), (a$1.reactiveElementVersions ??= []).push("2.1.1");
|
|
289
283
|
|
|
290
284
|
//#endregion
|
|
291
285
|
//#region node_modules/lit-html/lit-html.js
|
|
@@ -294,91 +288,91 @@ y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d$1("elementProp
|
|
|
294
288
|
* Copyright 2017 Google LLC
|
|
295
289
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
296
290
|
*/
|
|
297
|
-
const t = globalThis, i$
|
|
298
|
-
_$litType$: t$
|
|
299
|
-
strings: i$
|
|
300
|
-
values: s$
|
|
301
|
-
}), x = y$1(1), b = y$1(2), w = y$1(3), T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), C = r.createTreeWalker(r, 129);
|
|
302
|
-
function P(t$
|
|
303
|
-
if (!a(t$
|
|
304
|
-
return void 0 !== s$
|
|
291
|
+
const t$3 = globalThis, i$4 = t$3.trustedTypes, s$3 = i$4 ? i$4.createPolicy("lit-html", { createHTML: (t$5) => t$5 }) : void 0, e$4 = "$lit$", h$3 = `lit$${Math.random().toFixed(9).slice(2)}$`, o$6 = "?" + h$3, n$4 = `<${o$6}>`, r$3 = document, l$1 = () => r$3.createComment(""), c$3 = (t$5) => null === t$5 || "object" != typeof t$5 && "function" != typeof t$5, a = Array.isArray, u$3 = (t$5) => a(t$5) || "function" == typeof t$5?.[Symbol.iterator], d$1 = "[ \n\f\r]", f$3 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v$1 = /-->/g, _ = />/g, m$1 = RegExp(`>|${d$1}(?:([^\\s"'>=/]+)(${d$1}*=${d$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), p$1 = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y$1 = (t$5) => (i$6, ...s$5) => ({
|
|
292
|
+
_$litType$: t$5,
|
|
293
|
+
strings: i$6,
|
|
294
|
+
values: s$5
|
|
295
|
+
}), x = y$1(1), b = y$1(2), w = y$1(3), T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), C = r$3.createTreeWalker(r$3, 129);
|
|
296
|
+
function P(t$5, i$6) {
|
|
297
|
+
if (!a(t$5) || !t$5.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
298
|
+
return void 0 !== s$3 ? s$3.createHTML(i$6) : i$6;
|
|
305
299
|
}
|
|
306
|
-
const V = (t$
|
|
307
|
-
const s$
|
|
308
|
-
let r$
|
|
309
|
-
for (let i$
|
|
310
|
-
const s$
|
|
311
|
-
let a$2, u$
|
|
312
|
-
for (; y$2 < s$
|
|
313
|
-
const x$1 = c$
|
|
314
|
-
l$
|
|
315
|
-
}
|
|
316
|
-
return [P(t$
|
|
300
|
+
const V = (t$5, i$6) => {
|
|
301
|
+
const s$5 = t$5.length - 1, o$9 = [];
|
|
302
|
+
let r$6, l$3 = 2 === i$6 ? "<svg>" : 3 === i$6 ? "<math>" : "", c$6 = f$3;
|
|
303
|
+
for (let i$7 = 0; i$7 < s$5; i$7++) {
|
|
304
|
+
const s$6 = t$5[i$7];
|
|
305
|
+
let a$2, u$4, d$3 = -1, y$2 = 0;
|
|
306
|
+
for (; y$2 < s$6.length && (c$6.lastIndex = y$2, u$4 = c$6.exec(s$6), null !== u$4);) y$2 = c$6.lastIndex, c$6 === f$3 ? "!--" === u$4[1] ? c$6 = v$1 : void 0 !== u$4[1] ? c$6 = _ : void 0 !== u$4[2] ? ($.test(u$4[2]) && (r$6 = RegExp("</" + u$4[2], "g")), c$6 = m$1) : void 0 !== u$4[3] && (c$6 = m$1) : c$6 === m$1 ? ">" === u$4[0] ? (c$6 = r$6 ?? f$3, d$3 = -1) : void 0 === u$4[1] ? d$3 = -2 : (d$3 = c$6.lastIndex - u$4[2].length, a$2 = u$4[1], c$6 = void 0 === u$4[3] ? m$1 : "\"" === u$4[3] ? g : p$1) : c$6 === g || c$6 === p$1 ? c$6 = m$1 : c$6 === v$1 || c$6 === _ ? c$6 = f$3 : (c$6 = m$1, r$6 = void 0);
|
|
307
|
+
const x$1 = c$6 === m$1 && t$5[i$7 + 1].startsWith("/>") ? " " : "";
|
|
308
|
+
l$3 += c$6 === f$3 ? s$6 + n$4 : d$3 >= 0 ? (o$9.push(a$2), s$6.slice(0, d$3) + e$4 + s$6.slice(d$3) + h$3 + x$1) : s$6 + h$3 + (-2 === d$3 ? i$7 : x$1);
|
|
309
|
+
}
|
|
310
|
+
return [P(t$5, l$3 + (t$5[s$5] || "<?>") + (2 === i$6 ? "</svg>" : 3 === i$6 ? "</math>" : "")), o$9];
|
|
317
311
|
};
|
|
318
312
|
var N = class N {
|
|
319
|
-
constructor({ strings: t$
|
|
320
|
-
let r$
|
|
313
|
+
constructor({ strings: t$5, _$litType$: s$5 }, n$7) {
|
|
314
|
+
let r$6;
|
|
321
315
|
this.parts = [];
|
|
322
|
-
let c$
|
|
323
|
-
const u$
|
|
324
|
-
if (this.el = N.createElement(f$
|
|
325
|
-
const t$
|
|
326
|
-
t$
|
|
316
|
+
let c$6 = 0, a$2 = 0;
|
|
317
|
+
const u$4 = t$5.length - 1, d$3 = this.parts, [f$4, v$2] = V(t$5, s$5);
|
|
318
|
+
if (this.el = N.createElement(f$4, n$7), C.currentNode = this.el.content, 2 === s$5 || 3 === s$5) {
|
|
319
|
+
const t$6 = this.el.content.firstChild;
|
|
320
|
+
t$6.replaceWith(...t$6.childNodes);
|
|
327
321
|
}
|
|
328
|
-
for (; null !== (r$
|
|
329
|
-
if (1 === r$
|
|
330
|
-
if (r$
|
|
331
|
-
const i$
|
|
332
|
-
d$
|
|
322
|
+
for (; null !== (r$6 = C.nextNode()) && d$3.length < u$4;) {
|
|
323
|
+
if (1 === r$6.nodeType) {
|
|
324
|
+
if (r$6.hasAttributes()) for (const t$6 of r$6.getAttributeNames()) if (t$6.endsWith(e$4)) {
|
|
325
|
+
const i$6 = v$2[a$2++], s$6 = r$6.getAttribute(t$6).split(h$3), e$7 = /([.?@])?(.*)/.exec(i$6);
|
|
326
|
+
d$3.push({
|
|
333
327
|
type: 1,
|
|
334
|
-
index: c$
|
|
335
|
-
name: e$
|
|
336
|
-
strings: s$
|
|
337
|
-
ctor: "." === e$
|
|
338
|
-
}), r$
|
|
339
|
-
} else t$
|
|
328
|
+
index: c$6,
|
|
329
|
+
name: e$7[2],
|
|
330
|
+
strings: s$6,
|
|
331
|
+
ctor: "." === e$7[1] ? H : "?" === e$7[1] ? I : "@" === e$7[1] ? L : k
|
|
332
|
+
}), r$6.removeAttribute(t$6);
|
|
333
|
+
} else t$6.startsWith(h$3) && (d$3.push({
|
|
340
334
|
type: 6,
|
|
341
|
-
index: c$
|
|
342
|
-
}), r$
|
|
343
|
-
if ($.test(r$
|
|
344
|
-
const t$
|
|
345
|
-
if (s$
|
|
346
|
-
r$
|
|
347
|
-
for (let i$
|
|
335
|
+
index: c$6
|
|
336
|
+
}), r$6.removeAttribute(t$6));
|
|
337
|
+
if ($.test(r$6.tagName)) {
|
|
338
|
+
const t$6 = r$6.textContent.split(h$3), s$6 = t$6.length - 1;
|
|
339
|
+
if (s$6 > 0) {
|
|
340
|
+
r$6.textContent = i$4 ? i$4.emptyScript : "";
|
|
341
|
+
for (let i$6 = 0; i$6 < s$6; i$6++) r$6.append(t$6[i$6], l$1()), C.nextNode(), d$3.push({
|
|
348
342
|
type: 2,
|
|
349
|
-
index: ++c$
|
|
343
|
+
index: ++c$6
|
|
350
344
|
});
|
|
351
|
-
r$
|
|
345
|
+
r$6.append(t$6[s$6], l$1());
|
|
352
346
|
}
|
|
353
347
|
}
|
|
354
|
-
} else if (8 === r$
|
|
348
|
+
} else if (8 === r$6.nodeType) if (r$6.data === o$6) d$3.push({
|
|
355
349
|
type: 2,
|
|
356
|
-
index: c$
|
|
350
|
+
index: c$6
|
|
357
351
|
});
|
|
358
352
|
else {
|
|
359
|
-
let t$
|
|
360
|
-
for (; -1 !== (t$
|
|
353
|
+
let t$6 = -1;
|
|
354
|
+
for (; -1 !== (t$6 = r$6.data.indexOf(h$3, t$6 + 1));) d$3.push({
|
|
361
355
|
type: 7,
|
|
362
|
-
index: c$
|
|
363
|
-
}), t$
|
|
356
|
+
index: c$6
|
|
357
|
+
}), t$6 += h$3.length - 1;
|
|
364
358
|
}
|
|
365
|
-
c$
|
|
359
|
+
c$6++;
|
|
366
360
|
}
|
|
367
361
|
}
|
|
368
|
-
static createElement(t$
|
|
369
|
-
const s$
|
|
370
|
-
return s$
|
|
362
|
+
static createElement(t$5, i$6) {
|
|
363
|
+
const s$5 = r$3.createElement("template");
|
|
364
|
+
return s$5.innerHTML = t$5, s$5;
|
|
371
365
|
}
|
|
372
366
|
};
|
|
373
|
-
function S(t$
|
|
374
|
-
if (i$
|
|
375
|
-
let h$
|
|
376
|
-
const o$
|
|
377
|
-
return h$
|
|
367
|
+
function S(t$5, i$6, s$5 = t$5, e$7) {
|
|
368
|
+
if (i$6 === T) return i$6;
|
|
369
|
+
let h$5 = void 0 !== e$7 ? s$5._$Co?.[e$7] : s$5._$Cl;
|
|
370
|
+
const o$9 = c$3(i$6) ? void 0 : i$6._$litDirective$;
|
|
371
|
+
return h$5?.constructor !== o$9 && (h$5?._$AO?.(!1), void 0 === o$9 ? h$5 = void 0 : (h$5 = new o$9(t$5), h$5._$AT(t$5, s$5, e$7)), void 0 !== e$7 ? (s$5._$Co ??= [])[e$7] = h$5 : s$5._$Cl = h$5), void 0 !== h$5 && (i$6 = S(t$5, h$5._$AS(t$5, i$6.values), h$5, e$7)), i$6;
|
|
378
372
|
}
|
|
379
|
-
var M = class {
|
|
380
|
-
constructor(t$
|
|
381
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t$
|
|
373
|
+
var M$1 = class {
|
|
374
|
+
constructor(t$5, i$6) {
|
|
375
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t$5, this._$AM = i$6;
|
|
382
376
|
}
|
|
383
377
|
get parentNode() {
|
|
384
378
|
return this._$AM.parentNode;
|
|
@@ -386,35 +380,35 @@ var M = class {
|
|
|
386
380
|
get _$AU() {
|
|
387
381
|
return this._$AM._$AU;
|
|
388
382
|
}
|
|
389
|
-
u(t$
|
|
390
|
-
const { el: { content: i$
|
|
391
|
-
C.currentNode = e$
|
|
392
|
-
let h$
|
|
393
|
-
for (; void 0 !== l$
|
|
394
|
-
if (o$
|
|
395
|
-
let i$
|
|
396
|
-
2 === l$
|
|
383
|
+
u(t$5) {
|
|
384
|
+
const { el: { content: i$6 }, parts: s$5 } = this._$AD, e$7 = (t$5?.creationScope ?? r$3).importNode(i$6, !0);
|
|
385
|
+
C.currentNode = e$7;
|
|
386
|
+
let h$5 = C.nextNode(), o$9 = 0, n$7 = 0, l$3 = s$5[0];
|
|
387
|
+
for (; void 0 !== l$3;) {
|
|
388
|
+
if (o$9 === l$3.index) {
|
|
389
|
+
let i$7;
|
|
390
|
+
2 === l$3.type ? i$7 = new R(h$5, h$5.nextSibling, this, t$5) : 1 === l$3.type ? i$7 = new l$3.ctor(h$5, l$3.name, l$3.strings, this, t$5) : 6 === l$3.type && (i$7 = new z(h$5, this, t$5)), this._$AV.push(i$7), l$3 = s$5[++n$7];
|
|
397
391
|
}
|
|
398
|
-
o$
|
|
392
|
+
o$9 !== l$3?.index && (h$5 = C.nextNode(), o$9++);
|
|
399
393
|
}
|
|
400
|
-
return C.currentNode = r, e$
|
|
394
|
+
return C.currentNode = r$3, e$7;
|
|
401
395
|
}
|
|
402
|
-
p(t$
|
|
403
|
-
let i$
|
|
404
|
-
for (const s$
|
|
396
|
+
p(t$5) {
|
|
397
|
+
let i$6 = 0;
|
|
398
|
+
for (const s$5 of this._$AV) void 0 !== s$5 && (void 0 !== s$5.strings ? (s$5._$AI(t$5, s$5, i$6), i$6 += s$5.strings.length - 2) : s$5._$AI(t$5[i$6])), i$6++;
|
|
405
399
|
}
|
|
406
400
|
};
|
|
407
401
|
var R = class R {
|
|
408
402
|
get _$AU() {
|
|
409
403
|
return this._$AM?._$AU ?? this._$Cv;
|
|
410
404
|
}
|
|
411
|
-
constructor(t$
|
|
412
|
-
this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t$
|
|
405
|
+
constructor(t$5, i$6, s$5, e$7) {
|
|
406
|
+
this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t$5, this._$AB = i$6, this._$AM = s$5, this.options = e$7, this._$Cv = e$7?.isConnected ?? !0;
|
|
413
407
|
}
|
|
414
408
|
get parentNode() {
|
|
415
|
-
let t$
|
|
416
|
-
const i$
|
|
417
|
-
return void 0 !== i$
|
|
409
|
+
let t$5 = this._$AA.parentNode;
|
|
410
|
+
const i$6 = this._$AM;
|
|
411
|
+
return void 0 !== i$6 && 11 === t$5?.nodeType && (t$5 = i$6.parentNode), t$5;
|
|
418
412
|
}
|
|
419
413
|
get startNode() {
|
|
420
414
|
return this._$AA;
|
|
@@ -422,45 +416,45 @@ var R = class R {
|
|
|
422
416
|
get endNode() {
|
|
423
417
|
return this._$AB;
|
|
424
418
|
}
|
|
425
|
-
_$AI(t$
|
|
426
|
-
t$
|
|
419
|
+
_$AI(t$5, i$6 = this) {
|
|
420
|
+
t$5 = S(this, t$5, i$6), c$3(t$5) ? t$5 === E || null == t$5 || "" === t$5 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t$5 !== this._$AH && t$5 !== T && this._(t$5) : void 0 !== t$5._$litType$ ? this.$(t$5) : void 0 !== t$5.nodeType ? this.T(t$5) : u$3(t$5) ? this.k(t$5) : this._(t$5);
|
|
427
421
|
}
|
|
428
|
-
O(t$
|
|
429
|
-
return this._$AA.parentNode.insertBefore(t$
|
|
422
|
+
O(t$5) {
|
|
423
|
+
return this._$AA.parentNode.insertBefore(t$5, this._$AB);
|
|
430
424
|
}
|
|
431
|
-
T(t$
|
|
432
|
-
this._$AH !== t$
|
|
425
|
+
T(t$5) {
|
|
426
|
+
this._$AH !== t$5 && (this._$AR(), this._$AH = this.O(t$5));
|
|
433
427
|
}
|
|
434
|
-
_(t$
|
|
435
|
-
this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t$
|
|
428
|
+
_(t$5) {
|
|
429
|
+
this._$AH !== E && c$3(this._$AH) ? this._$AA.nextSibling.data = t$5 : this.T(r$3.createTextNode(t$5)), this._$AH = t$5;
|
|
436
430
|
}
|
|
437
|
-
$(t$
|
|
438
|
-
const { values: i$
|
|
439
|
-
if (this._$AH?._$AD === e$
|
|
431
|
+
$(t$5) {
|
|
432
|
+
const { values: i$6, _$litType$: s$5 } = t$5, e$7 = "number" == typeof s$5 ? this._$AC(t$5) : (void 0 === s$5.el && (s$5.el = N.createElement(P(s$5.h, s$5.h[0]), this.options)), s$5);
|
|
433
|
+
if (this._$AH?._$AD === e$7) this._$AH.p(i$6);
|
|
440
434
|
else {
|
|
441
|
-
const t$
|
|
442
|
-
t$
|
|
435
|
+
const t$6 = new M$1(e$7, this), s$6 = t$6.u(this.options);
|
|
436
|
+
t$6.p(i$6), this.T(s$6), this._$AH = t$6;
|
|
443
437
|
}
|
|
444
438
|
}
|
|
445
|
-
_$AC(t$
|
|
446
|
-
let i$
|
|
447
|
-
return void 0 === i$
|
|
439
|
+
_$AC(t$5) {
|
|
440
|
+
let i$6 = A.get(t$5.strings);
|
|
441
|
+
return void 0 === i$6 && A.set(t$5.strings, i$6 = new N(t$5)), i$6;
|
|
448
442
|
}
|
|
449
|
-
k(t$
|
|
443
|
+
k(t$5) {
|
|
450
444
|
a(this._$AH) || (this._$AH = [], this._$AR());
|
|
451
|
-
const i$
|
|
452
|
-
let s$
|
|
453
|
-
for (const h$
|
|
454
|
-
e$
|
|
455
|
-
}
|
|
456
|
-
_$AR(t$
|
|
457
|
-
for (this._$AP?.(!1, !0, i$
|
|
458
|
-
const i$
|
|
459
|
-
t$
|
|
445
|
+
const i$6 = this._$AH;
|
|
446
|
+
let s$5, e$7 = 0;
|
|
447
|
+
for (const h$5 of t$5) e$7 === i$6.length ? i$6.push(s$5 = new R(this.O(l$1()), this.O(l$1()), this, this.options)) : s$5 = i$6[e$7], s$5._$AI(h$5), e$7++;
|
|
448
|
+
e$7 < i$6.length && (this._$AR(s$5 && s$5._$AB.nextSibling, e$7), i$6.length = e$7);
|
|
449
|
+
}
|
|
450
|
+
_$AR(t$5 = this._$AA.nextSibling, i$6) {
|
|
451
|
+
for (this._$AP?.(!1, !0, i$6); t$5 !== this._$AB;) {
|
|
452
|
+
const i$7 = t$5.nextSibling;
|
|
453
|
+
t$5.remove(), t$5 = i$7;
|
|
460
454
|
}
|
|
461
455
|
}
|
|
462
|
-
setConnected(t$
|
|
463
|
-
void 0 === this._$AM && (this._$Cv = t$
|
|
456
|
+
setConnected(t$5) {
|
|
457
|
+
void 0 === this._$AM && (this._$Cv = t$5, this._$AP?.(t$5));
|
|
464
458
|
}
|
|
465
459
|
};
|
|
466
460
|
var k = class {
|
|
@@ -470,72 +464,72 @@ var k = class {
|
|
|
470
464
|
get _$AU() {
|
|
471
465
|
return this._$AM._$AU;
|
|
472
466
|
}
|
|
473
|
-
constructor(t$
|
|
474
|
-
this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t$
|
|
467
|
+
constructor(t$5, i$6, s$5, e$7, h$5) {
|
|
468
|
+
this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t$5, this.name = i$6, this._$AM = e$7, this.options = h$5, s$5.length > 2 || "" !== s$5[0] || "" !== s$5[1] ? (this._$AH = Array(s$5.length - 1).fill(/* @__PURE__ */ new String()), this.strings = s$5) : this._$AH = E;
|
|
475
469
|
}
|
|
476
|
-
_$AI(t$
|
|
477
|
-
const h$
|
|
478
|
-
let o$
|
|
479
|
-
if (void 0 === h$
|
|
470
|
+
_$AI(t$5, i$6 = this, s$5, e$7) {
|
|
471
|
+
const h$5 = this.strings;
|
|
472
|
+
let o$9 = !1;
|
|
473
|
+
if (void 0 === h$5) t$5 = S(this, t$5, i$6, 0), o$9 = !c$3(t$5) || t$5 !== this._$AH && t$5 !== T, o$9 && (this._$AH = t$5);
|
|
480
474
|
else {
|
|
481
|
-
const e$
|
|
482
|
-
let n$
|
|
483
|
-
for (t$
|
|
475
|
+
const e$8 = t$5;
|
|
476
|
+
let n$7, r$6;
|
|
477
|
+
for (t$5 = h$5[0], n$7 = 0; n$7 < h$5.length - 1; n$7++) r$6 = S(this, e$8[s$5 + n$7], i$6, n$7), r$6 === T && (r$6 = this._$AH[n$7]), o$9 ||= !c$3(r$6) || r$6 !== this._$AH[n$7], r$6 === E ? t$5 = E : t$5 !== E && (t$5 += (r$6 ?? "") + h$5[n$7 + 1]), this._$AH[n$7] = r$6;
|
|
484
478
|
}
|
|
485
|
-
o$
|
|
479
|
+
o$9 && !e$7 && this.j(t$5);
|
|
486
480
|
}
|
|
487
|
-
j(t$
|
|
488
|
-
t$
|
|
481
|
+
j(t$5) {
|
|
482
|
+
t$5 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t$5 ?? "");
|
|
489
483
|
}
|
|
490
484
|
};
|
|
491
485
|
var H = class extends k {
|
|
492
486
|
constructor() {
|
|
493
487
|
super(...arguments), this.type = 3;
|
|
494
488
|
}
|
|
495
|
-
j(t$
|
|
496
|
-
this.element[this.name] = t$
|
|
489
|
+
j(t$5) {
|
|
490
|
+
this.element[this.name] = t$5 === E ? void 0 : t$5;
|
|
497
491
|
}
|
|
498
492
|
};
|
|
499
493
|
var I = class extends k {
|
|
500
494
|
constructor() {
|
|
501
495
|
super(...arguments), this.type = 4;
|
|
502
496
|
}
|
|
503
|
-
j(t$
|
|
504
|
-
this.element.toggleAttribute(this.name, !!t$
|
|
497
|
+
j(t$5) {
|
|
498
|
+
this.element.toggleAttribute(this.name, !!t$5 && t$5 !== E);
|
|
505
499
|
}
|
|
506
500
|
};
|
|
507
501
|
var L = class extends k {
|
|
508
|
-
constructor(t$
|
|
509
|
-
super(t$
|
|
502
|
+
constructor(t$5, i$6, s$5, e$7, h$5) {
|
|
503
|
+
super(t$5, i$6, s$5, e$7, h$5), this.type = 5;
|
|
510
504
|
}
|
|
511
|
-
_$AI(t$
|
|
512
|
-
if ((t$
|
|
513
|
-
const s$
|
|
514
|
-
e$
|
|
505
|
+
_$AI(t$5, i$6 = this) {
|
|
506
|
+
if ((t$5 = S(this, t$5, i$6, 0) ?? E) === T) return;
|
|
507
|
+
const s$5 = this._$AH, e$7 = t$5 === E && s$5 !== E || t$5.capture !== s$5.capture || t$5.once !== s$5.once || t$5.passive !== s$5.passive, h$5 = t$5 !== E && (s$5 === E || e$7);
|
|
508
|
+
e$7 && this.element.removeEventListener(this.name, this, s$5), h$5 && this.element.addEventListener(this.name, this, t$5), this._$AH = t$5;
|
|
515
509
|
}
|
|
516
|
-
handleEvent(t$
|
|
517
|
-
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t$
|
|
510
|
+
handleEvent(t$5) {
|
|
511
|
+
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t$5) : this._$AH.handleEvent(t$5);
|
|
518
512
|
}
|
|
519
513
|
};
|
|
520
514
|
var z = class {
|
|
521
|
-
constructor(t$
|
|
522
|
-
this.element = t$
|
|
515
|
+
constructor(t$5, i$6, s$5) {
|
|
516
|
+
this.element = t$5, this.type = 6, this._$AN = void 0, this._$AM = i$6, this.options = s$5;
|
|
523
517
|
}
|
|
524
518
|
get _$AU() {
|
|
525
519
|
return this._$AM._$AU;
|
|
526
520
|
}
|
|
527
|
-
_$AI(t$
|
|
528
|
-
S(this, t$
|
|
521
|
+
_$AI(t$5) {
|
|
522
|
+
S(this, t$5);
|
|
529
523
|
}
|
|
530
524
|
};
|
|
531
525
|
const Z = {
|
|
532
|
-
M: e,
|
|
533
|
-
P: h,
|
|
534
|
-
A: o$
|
|
526
|
+
M: e$4,
|
|
527
|
+
P: h$3,
|
|
528
|
+
A: o$6,
|
|
535
529
|
C: 1,
|
|
536
530
|
L: V,
|
|
537
|
-
R: M,
|
|
538
|
-
D: u,
|
|
531
|
+
R: M$1,
|
|
532
|
+
D: u$3,
|
|
539
533
|
V: S,
|
|
540
534
|
I: R,
|
|
541
535
|
H: k,
|
|
@@ -543,16 +537,16 @@ const Z = {
|
|
|
543
537
|
U: L,
|
|
544
538
|
B: H,
|
|
545
539
|
F: z
|
|
546
|
-
}, j = t.litHtmlPolyfillSupport;
|
|
547
|
-
j?.(N, R), (t.litHtmlVersions ??= []).push("3.3.1");
|
|
548
|
-
const B = (t$
|
|
549
|
-
const e$
|
|
550
|
-
let h$
|
|
551
|
-
if (void 0 === h$
|
|
552
|
-
const t$
|
|
553
|
-
e$
|
|
554
|
-
}
|
|
555
|
-
return h$
|
|
540
|
+
}, j = t$3.litHtmlPolyfillSupport;
|
|
541
|
+
j?.(N, R), (t$3.litHtmlVersions ??= []).push("3.3.1");
|
|
542
|
+
const B = (t$5, i$6, s$5) => {
|
|
543
|
+
const e$7 = s$5?.renderBefore ?? i$6;
|
|
544
|
+
let h$5 = e$7._$litPart$;
|
|
545
|
+
if (void 0 === h$5) {
|
|
546
|
+
const t$6 = s$5?.renderBefore ?? null;
|
|
547
|
+
e$7._$litPart$ = h$5 = new R(i$6.insertBefore(l$1(), t$6), t$6, void 0, s$5 ?? {});
|
|
548
|
+
}
|
|
549
|
+
return h$5._$AI(t$5), h$5;
|
|
556
550
|
};
|
|
557
551
|
|
|
558
552
|
//#endregion
|
|
@@ -561,18 +555,18 @@ const B = (t$2, i$4, s$3) => {
|
|
|
561
555
|
* @license
|
|
562
556
|
* Copyright 2017 Google LLC
|
|
563
557
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
564
|
-
*/ const s = globalThis;
|
|
558
|
+
*/ const s$2 = globalThis;
|
|
565
559
|
var i = class extends y {
|
|
566
560
|
constructor() {
|
|
567
561
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
568
562
|
}
|
|
569
563
|
createRenderRoot() {
|
|
570
|
-
const t$
|
|
571
|
-
return this.renderOptions.renderBefore ??= t$
|
|
564
|
+
const t$5 = super.createRenderRoot();
|
|
565
|
+
return this.renderOptions.renderBefore ??= t$5.firstChild, t$5;
|
|
572
566
|
}
|
|
573
|
-
update(t$
|
|
574
|
-
const r$
|
|
575
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t$
|
|
567
|
+
update(t$5) {
|
|
568
|
+
const r$6 = this.render();
|
|
569
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t$5), this._$Do = B(r$6, this.renderRoot, this.renderOptions);
|
|
576
570
|
}
|
|
577
571
|
connectedCallback() {
|
|
578
572
|
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
@@ -584,10 +578,91 @@ var i = class extends y {
|
|
|
584
578
|
return T;
|
|
585
579
|
}
|
|
586
580
|
};
|
|
587
|
-
i._$litElement$ = !0, i["finalized"] = !0, s.litElementHydrateSupport?.({ LitElement: i });
|
|
588
|
-
const o = s.litElementPolyfillSupport;
|
|
589
|
-
o?.({ LitElement: i });
|
|
590
|
-
(s.litElementVersions ??= []).push("4.2.1");
|
|
581
|
+
i._$litElement$ = !0, i["finalized"] = !0, s$2.litElementHydrateSupport?.({ LitElement: i });
|
|
582
|
+
const o$5 = s$2.litElementPolyfillSupport;
|
|
583
|
+
o$5?.({ LitElement: i });
|
|
584
|
+
(s$2.litElementVersions ??= []).push("4.2.1");
|
|
585
|
+
|
|
586
|
+
//#endregion
|
|
587
|
+
//#region node_modules/@lit/reactive-element/decorators/custom-element.js
|
|
588
|
+
/**
|
|
589
|
+
* @license
|
|
590
|
+
* Copyright 2017 Google LLC
|
|
591
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
592
|
+
*/
|
|
593
|
+
const t = (t$5) => (e$7, o$9) => {
|
|
594
|
+
void 0 !== o$9 ? o$9.addInitializer((() => {
|
|
595
|
+
customElements.define(t$5, e$7);
|
|
596
|
+
})) : customElements.define(t$5, e$7);
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
//#endregion
|
|
600
|
+
//#region node_modules/@lit/reactive-element/decorators/property.js
|
|
601
|
+
/**
|
|
602
|
+
* @license
|
|
603
|
+
* Copyright 2017 Google LLC
|
|
604
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
605
|
+
*/ const o$4 = {
|
|
606
|
+
attribute: !0,
|
|
607
|
+
type: String,
|
|
608
|
+
converter: u$2,
|
|
609
|
+
reflect: !1,
|
|
610
|
+
hasChanged: f$2
|
|
611
|
+
}, r$2 = (t$5 = o$4, e$7, r$6) => {
|
|
612
|
+
const { kind: n$7, metadata: i$6 } = r$6;
|
|
613
|
+
let s$5 = globalThis.litPropertyMetadata.get(i$6);
|
|
614
|
+
if (void 0 === s$5 && globalThis.litPropertyMetadata.set(i$6, s$5 = /* @__PURE__ */ new Map()), "setter" === n$7 && ((t$5 = Object.create(t$5)).wrapped = !0), s$5.set(r$6.name, t$5), "accessor" === n$7) {
|
|
615
|
+
const { name: o$9 } = r$6;
|
|
616
|
+
return {
|
|
617
|
+
set(r$7) {
|
|
618
|
+
const n$8 = e$7.get.call(this);
|
|
619
|
+
e$7.set.call(this, r$7), this.requestUpdate(o$9, n$8, t$5);
|
|
620
|
+
},
|
|
621
|
+
init(e$8) {
|
|
622
|
+
return void 0 !== e$8 && this.C(o$9, void 0, t$5, e$8), e$8;
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
if ("setter" === n$7) {
|
|
627
|
+
const { name: o$9 } = r$6;
|
|
628
|
+
return function(r$7) {
|
|
629
|
+
const n$8 = this[o$9];
|
|
630
|
+
e$7.call(this, r$7), this.requestUpdate(o$9, n$8, t$5);
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
throw Error("Unsupported decorator location: " + n$7);
|
|
634
|
+
};
|
|
635
|
+
function n(t$5) {
|
|
636
|
+
return (e$7, o$9) => "object" == typeof o$9 ? r$2(t$5, e$7, o$9) : ((t$6, e$8, o$10) => {
|
|
637
|
+
const r$6 = e$8.hasOwnProperty(o$10);
|
|
638
|
+
return e$8.constructor.createProperty(o$10, t$6), r$6 ? Object.getOwnPropertyDescriptor(e$8, o$10) : void 0;
|
|
639
|
+
})(t$5, e$7, o$9);
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
//#endregion
|
|
643
|
+
//#region node_modules/@lit/reactive-element/decorators/base.js
|
|
644
|
+
/**
|
|
645
|
+
* @license
|
|
646
|
+
* Copyright 2017 Google LLC
|
|
647
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
648
|
+
*/
|
|
649
|
+
const e$3 = (e$7, t$5, c$6) => (c$6.configurable = !0, c$6.enumerable = !0, Reflect.decorate && "object" != typeof t$5 && Object.defineProperty(e$7, t$5, c$6), c$6);
|
|
650
|
+
|
|
651
|
+
//#endregion
|
|
652
|
+
//#region node_modules/@lit/reactive-element/decorators/query-assigned-elements.js
|
|
653
|
+
/**
|
|
654
|
+
* @license
|
|
655
|
+
* Copyright 2021 Google LLC
|
|
656
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
657
|
+
*/ function o(o$9) {
|
|
658
|
+
return (e$7, n$7) => {
|
|
659
|
+
const { slot: r$6, selector: s$5 } = o$9 ?? {}, c$6 = "slot" + (r$6 ? `[name=${r$6}]` : ":not([name])");
|
|
660
|
+
return e$3(e$7, n$7, { get() {
|
|
661
|
+
const t$5 = this.renderRoot?.querySelector(c$6), e$8 = t$5?.assignedElements(o$9) ?? [];
|
|
662
|
+
return void 0 === s$5 ? e$8 : e$8.filter(((t$6) => t$6.matches(s$5)));
|
|
663
|
+
} });
|
|
664
|
+
};
|
|
665
|
+
}
|
|
591
666
|
|
|
592
667
|
//#endregion
|
|
593
668
|
//#region src/util/circle-arc.ts
|
|
@@ -635,8 +710,8 @@ const precompute = (arc) => {
|
|
|
635
710
|
invert
|
|
636
711
|
};
|
|
637
712
|
};
|
|
638
|
-
const interpolatePoint = (arc, t$
|
|
639
|
-
const angle = arc.rangeRadian * t$
|
|
713
|
+
const interpolatePoint = (arc, t$5) => {
|
|
714
|
+
const angle = arc.rangeRadian * t$5;
|
|
640
715
|
return Circles.pointOnPerimeter(arc, arc.startAngle - angle);
|
|
641
716
|
};
|
|
642
717
|
const arcPart = (track, startAngle, endAngle, cw) => {
|
|
@@ -659,6 +734,168 @@ const toSvg = (arc, largeArc = true, clockwise = true) => {
|
|
|
659
734
|
return [`M ${arc.startPoint.x} ${arc.startPoint.y}`, `A ${arc.radius} ${arc.radius} ${rotation} ${largeArc ? `1` : `0`} ${clockwise ? `1` : `0`} ${arc.endPoint.x} ${arc.endPoint.y}`];
|
|
660
735
|
};
|
|
661
736
|
|
|
737
|
+
//#endregion
|
|
738
|
+
//#region node_modules/lit-html/directive-helpers.js
|
|
739
|
+
/**
|
|
740
|
+
* @license
|
|
741
|
+
* Copyright 2020 Google LLC
|
|
742
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
743
|
+
*/ const { I: t$2 } = Z, i$3 = (o$9) => null === o$9 || "object" != typeof o$9 && "function" != typeof o$9, n$3 = {
|
|
744
|
+
HTML: 1,
|
|
745
|
+
SVG: 2,
|
|
746
|
+
MATHML: 3
|
|
747
|
+
}, e$2 = (o$9, t$5) => void 0 === t$5 ? void 0 !== o$9?._$litType$ : o$9?._$litType$ === t$5, l = (o$9) => null != o$9?._$litType$?.h, d = (o$9) => void 0 !== o$9?._$litDirective$, c$2 = (o$9) => o$9?._$litDirective$, f$1 = (o$9) => void 0 === o$9.strings, r$1 = () => document.createComment(""), s = (o$9, i$6, n$7) => {
|
|
748
|
+
const e$7 = o$9._$AA.parentNode, l$3 = void 0 === i$6 ? o$9._$AB : i$6._$AA;
|
|
749
|
+
if (void 0 === n$7) {
|
|
750
|
+
const i$7 = e$7.insertBefore(r$1(), l$3), d$3 = e$7.insertBefore(r$1(), l$3);
|
|
751
|
+
n$7 = new t$2(i$7, d$3, o$9, o$9.options);
|
|
752
|
+
} else {
|
|
753
|
+
const t$5 = n$7._$AB.nextSibling, i$7 = n$7._$AM, d$3 = i$7 !== o$9;
|
|
754
|
+
if (d$3) {
|
|
755
|
+
let t$6;
|
|
756
|
+
n$7._$AQ?.(o$9), n$7._$AM = o$9, void 0 !== n$7._$AP && (t$6 = o$9._$AU) !== i$7._$AU && n$7._$AP(t$6);
|
|
757
|
+
}
|
|
758
|
+
if (t$5 !== l$3 || d$3) {
|
|
759
|
+
let o$10 = n$7._$AA;
|
|
760
|
+
for (; o$10 !== t$5;) {
|
|
761
|
+
const t$6 = o$10.nextSibling;
|
|
762
|
+
e$7.insertBefore(o$10, l$3), o$10 = t$6;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
return n$7;
|
|
767
|
+
}, v = (o$9, t$5, i$6 = o$9) => (o$9._$AI(t$5, i$6), o$9), u$1 = {}, m = (o$9, t$5 = u$1) => o$9._$AH = t$5, p = (o$9) => o$9._$AH, M = (o$9) => {
|
|
768
|
+
o$9._$AR(), o$9._$AA.remove();
|
|
769
|
+
}, h$2 = (o$9) => {
|
|
770
|
+
o$9._$AR();
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
//#endregion
|
|
774
|
+
//#region node_modules/lit-html/directive.js
|
|
775
|
+
/**
|
|
776
|
+
* @license
|
|
777
|
+
* Copyright 2017 Google LLC
|
|
778
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
779
|
+
*/
|
|
780
|
+
const t$1 = {
|
|
781
|
+
ATTRIBUTE: 1,
|
|
782
|
+
CHILD: 2,
|
|
783
|
+
PROPERTY: 3,
|
|
784
|
+
BOOLEAN_ATTRIBUTE: 4,
|
|
785
|
+
EVENT: 5,
|
|
786
|
+
ELEMENT: 6
|
|
787
|
+
}, e = (t$5) => (...e$7) => ({
|
|
788
|
+
_$litDirective$: t$5,
|
|
789
|
+
values: e$7
|
|
790
|
+
});
|
|
791
|
+
var i$2 = class {
|
|
792
|
+
constructor(t$5) {}
|
|
793
|
+
get _$AU() {
|
|
794
|
+
return this._$AM._$AU;
|
|
795
|
+
}
|
|
796
|
+
_$AT(t$5, e$7, i$6) {
|
|
797
|
+
this._$Ct = t$5, this._$AM = e$7, this._$Ci = i$6;
|
|
798
|
+
}
|
|
799
|
+
_$AS(t$5, e$7) {
|
|
800
|
+
return this.update(t$5, e$7);
|
|
801
|
+
}
|
|
802
|
+
update(t$5, e$7) {
|
|
803
|
+
return this.render(...e$7);
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
//#endregion
|
|
808
|
+
//#region node_modules/lit-html/async-directive.js
|
|
809
|
+
/**
|
|
810
|
+
* @license
|
|
811
|
+
* Copyright 2017 Google LLC
|
|
812
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
813
|
+
*/ const s$1 = (i$6, t$5) => {
|
|
814
|
+
const e$7 = i$6._$AN;
|
|
815
|
+
if (void 0 === e$7) return !1;
|
|
816
|
+
for (const i$7 of e$7) i$7._$AO?.(t$5, !1), s$1(i$7, t$5);
|
|
817
|
+
return !0;
|
|
818
|
+
}, o$3 = (i$6) => {
|
|
819
|
+
let t$5, e$7;
|
|
820
|
+
do {
|
|
821
|
+
if (void 0 === (t$5 = i$6._$AM)) break;
|
|
822
|
+
e$7 = t$5._$AN, e$7.delete(i$6), i$6 = t$5;
|
|
823
|
+
} while (0 === e$7?.size);
|
|
824
|
+
}, r = (i$6) => {
|
|
825
|
+
for (let t$5; t$5 = i$6._$AM; i$6 = t$5) {
|
|
826
|
+
let e$7 = t$5._$AN;
|
|
827
|
+
if (void 0 === e$7) t$5._$AN = e$7 = /* @__PURE__ */ new Set();
|
|
828
|
+
else if (e$7.has(i$6)) break;
|
|
829
|
+
e$7.add(i$6), c$1(t$5);
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
function h$1(i$6) {
|
|
833
|
+
void 0 !== this._$AN ? (o$3(this), this._$AM = i$6, r(this)) : this._$AM = i$6;
|
|
834
|
+
}
|
|
835
|
+
function n$2(i$6, t$5 = !1, e$7 = 0) {
|
|
836
|
+
const r$6 = this._$AH, h$5 = this._$AN;
|
|
837
|
+
if (void 0 !== h$5 && 0 !== h$5.size) if (t$5) if (Array.isArray(r$6)) for (let i$7 = e$7; i$7 < r$6.length; i$7++) s$1(r$6[i$7], !1), o$3(r$6[i$7]);
|
|
838
|
+
else null != r$6 && (s$1(r$6, !1), o$3(r$6));
|
|
839
|
+
else s$1(this, i$6);
|
|
840
|
+
}
|
|
841
|
+
const c$1 = (i$6) => {
|
|
842
|
+
i$6.type == t$1.CHILD && (i$6._$AP ??= n$2, i$6._$AQ ??= h$1);
|
|
843
|
+
};
|
|
844
|
+
var f = class extends i$2 {
|
|
845
|
+
constructor() {
|
|
846
|
+
super(...arguments), this._$AN = void 0;
|
|
847
|
+
}
|
|
848
|
+
_$AT(i$6, t$5, e$7) {
|
|
849
|
+
super._$AT(i$6, t$5, e$7), r(this), this.isConnected = i$6._$AU;
|
|
850
|
+
}
|
|
851
|
+
_$AO(i$6, t$5 = !0) {
|
|
852
|
+
i$6 !== this.isConnected && (this.isConnected = i$6, i$6 ? this.reconnected?.() : this.disconnected?.()), t$5 && (s$1(this, i$6), o$3(this));
|
|
853
|
+
}
|
|
854
|
+
setValue(t$5) {
|
|
855
|
+
if (f$1(this._$Ct)) this._$Ct._$AI(t$5, this);
|
|
856
|
+
else {
|
|
857
|
+
const i$6 = [...this._$Ct._$AH];
|
|
858
|
+
i$6[this._$Ci] = t$5, this._$Ct._$AI(i$6, this, 0);
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
disconnected() {}
|
|
862
|
+
reconnected() {}
|
|
863
|
+
};
|
|
864
|
+
|
|
865
|
+
//#endregion
|
|
866
|
+
//#region node_modules/lit-html/directives/ref.js
|
|
867
|
+
/**
|
|
868
|
+
* @license
|
|
869
|
+
* Copyright 2020 Google LLC
|
|
870
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
871
|
+
*/ const e$1 = () => new h();
|
|
872
|
+
var h = class {};
|
|
873
|
+
const o$2 = /* @__PURE__ */ new WeakMap(), n$1 = e(class extends f {
|
|
874
|
+
render(i$6) {
|
|
875
|
+
return E;
|
|
876
|
+
}
|
|
877
|
+
update(i$6, [s$5]) {
|
|
878
|
+
const e$7 = s$5 !== this.G;
|
|
879
|
+
return e$7 && void 0 !== this.G && this.rt(void 0), (e$7 || this.lt !== this.ct) && (this.G = s$5, this.ht = i$6.options?.host, this.rt(this.ct = i$6.element)), E;
|
|
880
|
+
}
|
|
881
|
+
rt(t$5) {
|
|
882
|
+
if (this.isConnected || (t$5 = void 0), "function" == typeof this.G) {
|
|
883
|
+
const i$6 = this.ht ?? globalThis;
|
|
884
|
+
let s$5 = o$2.get(i$6);
|
|
885
|
+
void 0 === s$5 && (s$5 = /* @__PURE__ */ new WeakMap(), o$2.set(i$6, s$5)), void 0 !== s$5.get(this.G) && this.G.call(this.ht, void 0), s$5.set(this.G, t$5), void 0 !== t$5 && this.G.call(this.ht, t$5);
|
|
886
|
+
} else this.G.value = t$5;
|
|
887
|
+
}
|
|
888
|
+
get lt() {
|
|
889
|
+
return "function" == typeof this.G ? o$2.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
|
|
890
|
+
}
|
|
891
|
+
disconnected() {
|
|
892
|
+
this.lt === this.ct && this.rt(void 0);
|
|
893
|
+
}
|
|
894
|
+
reconnected() {
|
|
895
|
+
this.rt(this.ct);
|
|
896
|
+
}
|
|
897
|
+
});
|
|
898
|
+
|
|
662
899
|
//#endregion
|
|
663
900
|
//#region src/util/content-editable.ts
|
|
664
901
|
const focus = (el, selectAll) => {
|
|
@@ -677,8 +914,8 @@ const focus = (el, selectAll) => {
|
|
|
677
914
|
//#endregion
|
|
678
915
|
//#region src/util/svg-editable-text.ts
|
|
679
916
|
var SvgEditLabel = class extends EventTarget {
|
|
680
|
-
textRef =
|
|
681
|
-
editorRef =
|
|
917
|
+
textRef = e$1();
|
|
918
|
+
editorRef = e$1();
|
|
682
919
|
#keyDownBound = this.#onKeyDown.bind(this);
|
|
683
920
|
#blurBound = this.#onBlur.bind(this);
|
|
684
921
|
onEditMode;
|
|
@@ -686,7 +923,7 @@ var SvgEditLabel = class extends EventTarget {
|
|
|
686
923
|
#renderLabel(data) {
|
|
687
924
|
const { fill, x: x$1, y: y$2, displayValue, anchor, hideValue } = data;
|
|
688
925
|
if (hideValue) return b``;
|
|
689
|
-
return b`<text ${
|
|
926
|
+
return b`<text ${n$1(this.textRef)} id="label-value" @click=${() => this.#onValueClick()} fill=${fill} text-anchor=${anchor} x=${x$1} y=${y$2}>${displayValue}</text>`;
|
|
690
927
|
}
|
|
691
928
|
#onValueClick() {
|
|
692
929
|
this.#onEditMode(true);
|
|
@@ -698,17 +935,17 @@ var SvgEditLabel = class extends EventTarget {
|
|
|
698
935
|
#renderEdit(data) {
|
|
699
936
|
let { anchor, editValue, x: x$1, y: y$2 } = data;
|
|
700
937
|
let w$1 = 5;
|
|
701
|
-
let h$
|
|
938
|
+
let h$5 = 5;
|
|
702
939
|
if (this.textRef.value) {
|
|
703
940
|
const bbox = this.textRef.value.getBBox();
|
|
704
941
|
x$1 = x$1 - bbox.width / 2;
|
|
705
942
|
y$2 = y$2 - bbox.height + 4.5;
|
|
706
943
|
w$1 = bbox.width + 5;
|
|
707
|
-
h$
|
|
944
|
+
h$5 = bbox.height;
|
|
708
945
|
}
|
|
709
946
|
return b`
|
|
710
|
-
<foreignObject text-anchor=${anchor} width=${w$1} height=${h$
|
|
711
|
-
<div ${
|
|
947
|
+
<foreignObject text-anchor=${anchor} width=${w$1} height=${h$5} x=${x$1} y=${y$2}>
|
|
948
|
+
<div ${n$1(this.editorRef)} @blur=${this.#blurBound} @keydown=${this.#keyDownBound} xmlns="http://www.w3.org/1999/xhtml" tab-index=0 contentEditable=true>${editValue}</div>
|
|
712
949
|
</foreignObject>`;
|
|
713
950
|
}
|
|
714
951
|
render(data) {
|
|
@@ -759,10 +996,10 @@ var SvgEditLabel = class extends EventTarget {
|
|
|
759
996
|
//#endregion
|
|
760
997
|
//#region node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js
|
|
761
998
|
function __decorate(decorators, target, key, desc) {
|
|
762
|
-
var c$
|
|
763
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r$
|
|
764
|
-
else for (var i$
|
|
765
|
-
return c$
|
|
999
|
+
var c$6 = arguments.length, r$6 = c$6 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d$3;
|
|
1000
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r$6 = Reflect.decorate(decorators, target, key, desc);
|
|
1001
|
+
else for (var i$6 = decorators.length - 1; i$6 >= 0; i$6--) if (d$3 = decorators[i$6]) r$6 = (c$6 < 3 ? d$3(r$6) : c$6 > 3 ? d$3(target, key, r$6) : d$3(target, key)) || r$6;
|
|
1002
|
+
return c$6 > 3 && r$6 && Object.defineProperty(target, key, r$6), r$6;
|
|
766
1003
|
}
|
|
767
1004
|
|
|
768
1005
|
//#endregion
|
|
@@ -785,7 +1022,7 @@ let DialElement = class DialElement$1 extends i {
|
|
|
785
1022
|
min = 0;
|
|
786
1023
|
max = 100;
|
|
787
1024
|
textRelativeHeight = 5;
|
|
788
|
-
valueLabelRef =
|
|
1025
|
+
valueLabelRef = e$1();
|
|
789
1026
|
valueLabel = {
|
|
790
1027
|
anchor: `start`,
|
|
791
1028
|
x: 0,
|
|
@@ -810,9 +1047,9 @@ let DialElement = class DialElement$1 extends i {
|
|
|
810
1047
|
};
|
|
811
1048
|
};
|
|
812
1049
|
this.#editableLabel.onInput = (value) => {
|
|
813
|
-
const f$
|
|
814
|
-
if (Number.isNaN(f$
|
|
815
|
-
this.#setValue(f$
|
|
1050
|
+
const f$4 = Number.parseFloat(value);
|
|
1051
|
+
if (Number.isNaN(f$4)) return;
|
|
1052
|
+
this.#setValue(f$4);
|
|
816
1053
|
};
|
|
817
1054
|
}
|
|
818
1055
|
#computeTextLabelPosition(vars, arc) {
|
|
@@ -876,14 +1113,14 @@ let DialElement = class DialElement$1 extends i {
|
|
|
876
1113
|
if (hiddenTrack && !this.bipolar) {
|
|
877
1114
|
let startAt = part.endAngle - .1;
|
|
878
1115
|
const arcPart$1 = arcPart(arc, startAt, arc.endAngle, true);
|
|
879
|
-
const d$
|
|
1116
|
+
const d$3 = radianArc(startAt, arc.endAngle, true);
|
|
880
1117
|
if (value > .97) arcSvgBits = toSvg(arc, largeArc, clockwise);
|
|
881
1118
|
else {
|
|
882
|
-
largeArc = d$
|
|
1119
|
+
largeArc = d$3 > Math.PI;
|
|
883
1120
|
arcSvgBits = partToSvg(arc, arcPart$1, largeArc, clockwise);
|
|
884
1121
|
}
|
|
885
1122
|
} else arcSvgBits = toSvg(arc, largeArc, clockwise);
|
|
886
|
-
const s$
|
|
1123
|
+
const s$5 = b`
|
|
887
1124
|
<path
|
|
888
1125
|
d="${arcSvgBits.join(" ")}"
|
|
889
1126
|
fill="none"
|
|
@@ -892,7 +1129,7 @@ let DialElement = class DialElement$1 extends i {
|
|
|
892
1129
|
stroke-width="${vars.track_width}"
|
|
893
1130
|
/>
|
|
894
1131
|
`;
|
|
895
|
-
return s$
|
|
1132
|
+
return s$5;
|
|
896
1133
|
}
|
|
897
1134
|
#getBipolarValue(value, arc) {
|
|
898
1135
|
if (value < .5) {
|
|
@@ -966,7 +1203,7 @@ let DialElement = class DialElement$1 extends i {
|
|
|
966
1203
|
return b`<circle r=${arc.radius * vars.knob_radius} cx=${arc.x} cy=${arc.y} fill=${vars.knob_color} />`;
|
|
967
1204
|
}
|
|
968
1205
|
#renderPoints(radius, fill, ...circles) {
|
|
969
|
-
return circles.map((c$
|
|
1206
|
+
return circles.map((c$6) => b`<circle fill=${fill} r=${radius} cx=${c$6.x} cy=${c$6.y} />`);
|
|
970
1207
|
}
|
|
971
1208
|
render() {
|
|
972
1209
|
const vars = this.resolveVariables();
|
|
@@ -1020,8 +1257,8 @@ let DialElement = class DialElement$1 extends i {
|
|
|
1020
1257
|
}
|
|
1021
1258
|
#onPointerDrag(event) {
|
|
1022
1259
|
const y$2 = event.movementY / this.clientHeight;
|
|
1023
|
-
const r$
|
|
1024
|
-
this.#setValue(this.value - r$
|
|
1260
|
+
const r$6 = this.range * y$2;
|
|
1261
|
+
this.#setValue(this.value - r$6);
|
|
1025
1262
|
}
|
|
1026
1263
|
#onDragStop() {
|
|
1027
1264
|
window.removeEventListener(`pointerup`, this.#onDragStopBound);
|
|
@@ -1122,24 +1359,24 @@ let DialElement = class DialElement$1 extends i {
|
|
|
1122
1359
|
|
|
1123
1360
|
`;
|
|
1124
1361
|
};
|
|
1125
|
-
__decorate([
|
|
1126
|
-
__decorate([
|
|
1127
|
-
__decorate([
|
|
1128
|
-
__decorate([
|
|
1129
|
-
__decorate([
|
|
1130
|
-
__decorate([
|
|
1131
|
-
__decorate([
|
|
1132
|
-
__decorate([
|
|
1133
|
-
__decorate([
|
|
1134
|
-
__decorate([
|
|
1135
|
-
__decorate([
|
|
1136
|
-
__decorate([
|
|
1137
|
-
__decorate([
|
|
1138
|
-
__decorate([
|
|
1139
|
-
__decorate([
|
|
1140
|
-
__decorate([
|
|
1141
|
-
__decorate([
|
|
1142
|
-
DialElement = __decorate([
|
|
1362
|
+
__decorate([n({ type: Number })], DialElement.prototype, "rangeAngle", void 0);
|
|
1363
|
+
__decorate([n({ type: String })], DialElement.prototype, "rangeAnchor", void 0);
|
|
1364
|
+
__decorate([n({ type: String })], DialElement.prototype, "labelPosition", void 0);
|
|
1365
|
+
__decorate([n({ type: Boolean })], DialElement.prototype, "spread", void 0);
|
|
1366
|
+
__decorate([n({ type: Boolean })], DialElement.prototype, "hideValue", void 0);
|
|
1367
|
+
__decorate([n({ type: Boolean })], DialElement.prototype, "hideTerminators", void 0);
|
|
1368
|
+
__decorate([n({ type: Boolean })], DialElement.prototype, "showKnob", void 0);
|
|
1369
|
+
__decorate([n({ type: Boolean })], DialElement.prototype, "bipolar", void 0);
|
|
1370
|
+
__decorate([n({ type: String })], DialElement.prototype, "needleStyle", void 0);
|
|
1371
|
+
__decorate([n({ type: Number })], DialElement.prototype, "value", void 0);
|
|
1372
|
+
__decorate([n({ type: Number })], DialElement.prototype, "step", void 0);
|
|
1373
|
+
__decorate([n({ type: Number })], DialElement.prototype, "stepFine", void 0);
|
|
1374
|
+
__decorate([n({ type: Number })], DialElement.prototype, "radius", void 0);
|
|
1375
|
+
__decorate([n({ type: Number })], DialElement.prototype, "min", void 0);
|
|
1376
|
+
__decorate([n({ type: Number })], DialElement.prototype, "max", void 0);
|
|
1377
|
+
__decorate([n({ type: Number })], DialElement.prototype, "textRelativeHeight", void 0);
|
|
1378
|
+
__decorate([n({ type: Object })], DialElement.prototype, "valueLabel", void 0);
|
|
1379
|
+
DialElement = __decorate([t("ixfx-dial")], DialElement);
|
|
1143
1380
|
|
|
1144
1381
|
//#endregion
|
|
1145
1382
|
//#region src/selecthorizontal.ts
|
|
@@ -1170,8 +1407,23 @@ let SelectHorizontalElement = class SelectHorizontalElement$1 extends i {
|
|
|
1170
1407
|
}
|
|
1171
1408
|
`;
|
|
1172
1409
|
};
|
|
1173
|
-
__decorate([
|
|
1174
|
-
SelectHorizontalElement = __decorate([
|
|
1410
|
+
__decorate([n({ type: Boolean })], SelectHorizontalElement.prototype, "editMode", void 0);
|
|
1411
|
+
SelectHorizontalElement = __decorate([t("ixfx-selecthorizontal-element")], SelectHorizontalElement);
|
|
1412
|
+
|
|
1413
|
+
//#endregion
|
|
1414
|
+
//#region node_modules/lit-html/directives/join.js
|
|
1415
|
+
/**
|
|
1416
|
+
* @license
|
|
1417
|
+
* Copyright 2021 Google LLC
|
|
1418
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1419
|
+
*/
|
|
1420
|
+
function* o$1(o$9, t$5) {
|
|
1421
|
+
const f$4 = "function" == typeof t$5;
|
|
1422
|
+
if (void 0 !== o$9) {
|
|
1423
|
+
let i$6 = -1;
|
|
1424
|
+
for (const n$7 of o$9) i$6 > -1 && (yield f$4 ? t$5(i$6) : t$5), i$6++, yield n$7;
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1175
1427
|
|
|
1176
1428
|
//#endregion
|
|
1177
1429
|
//#region src/crumb-navigation.ts
|
|
@@ -1180,14 +1432,14 @@ let CrumbNavigationElement = class CrumbNavigationElement$1 extends i {
|
|
|
1180
1432
|
selectedNode;
|
|
1181
1433
|
constructor() {
|
|
1182
1434
|
super();
|
|
1183
|
-
const t$
|
|
1435
|
+
const t$5 = Trees.Mutable.createNode({
|
|
1184
1436
|
key: `root`,
|
|
1185
1437
|
label: `root`
|
|
1186
1438
|
});
|
|
1187
1439
|
const nodeC = Trees.Mutable.addValue({
|
|
1188
1440
|
key: `c`,
|
|
1189
1441
|
label: `c:`
|
|
1190
|
-
}, t$
|
|
1442
|
+
}, t$5);
|
|
1191
1443
|
const nodeUsers = Trees.Mutable.addValue({
|
|
1192
1444
|
key: `users`,
|
|
1193
1445
|
label: `users`
|
|
@@ -1217,13 +1469,13 @@ let CrumbNavigationElement = class CrumbNavigationElement$1 extends i {
|
|
|
1217
1469
|
label: `reallylongoptionwow`
|
|
1218
1470
|
}, nodeUsers);
|
|
1219
1471
|
this.selectedNode = nodeUsers;
|
|
1220
|
-
this.tree = t$
|
|
1472
|
+
this.tree = t$5;
|
|
1221
1473
|
}
|
|
1222
1474
|
#previousSelectionKey = ``;
|
|
1223
1475
|
#onPartClick = (event) => {
|
|
1224
1476
|
const part = event.target.value;
|
|
1225
|
-
const n$
|
|
1226
|
-
if (n$
|
|
1477
|
+
const n$7 = Trees.Traverse.findAnyChildByValue(this.tree, part);
|
|
1478
|
+
if (n$7) this.#setSelected(n$7);
|
|
1227
1479
|
};
|
|
1228
1480
|
/**
|
|
1229
1481
|
* Sets the selected node and fires event
|
|
@@ -1260,8 +1512,8 @@ let CrumbNavigationElement = class CrumbNavigationElement$1 extends i {
|
|
|
1260
1512
|
console.warn(`Bug. No data-key attribute`);
|
|
1261
1513
|
return;
|
|
1262
1514
|
}
|
|
1263
|
-
for (const c$
|
|
1264
|
-
this.#setSelected(c$
|
|
1515
|
+
for (const c$6 of currentlySelected.childrenStore) if (c$6.value?.key === key) {
|
|
1516
|
+
this.#setSelected(c$6);
|
|
1265
1517
|
break;
|
|
1266
1518
|
}
|
|
1267
1519
|
};
|
|
@@ -1282,14 +1534,14 @@ let CrumbNavigationElement = class CrumbNavigationElement$1 extends i {
|
|
|
1282
1534
|
}
|
|
1283
1535
|
}
|
|
1284
1536
|
#scrollToValue(li) {
|
|
1285
|
-
let l$
|
|
1537
|
+
let l$3 = li.offsetLeft;
|
|
1286
1538
|
const ul = li.parentElement;
|
|
1287
1539
|
if (!ul) return;
|
|
1288
|
-
l$
|
|
1540
|
+
l$3 -= ul.offsetLeft;
|
|
1289
1541
|
const horizSelectItems = ul.parentElement;
|
|
1290
1542
|
if (!horizSelectItems) return;
|
|
1291
1543
|
horizSelectItems.scroll({
|
|
1292
|
-
left: l$
|
|
1544
|
+
left: l$3,
|
|
1293
1545
|
top: 0,
|
|
1294
1546
|
behavior: `smooth`
|
|
1295
1547
|
});
|
|
@@ -1298,31 +1550,31 @@ let CrumbNavigationElement = class CrumbNavigationElement$1 extends i {
|
|
|
1298
1550
|
horizSelect.style.minWidth = li.getBoundingClientRect().width + "px";
|
|
1299
1551
|
}
|
|
1300
1552
|
render() {
|
|
1301
|
-
const t$
|
|
1302
|
-
const sel = this.selectedNode ?? t$
|
|
1553
|
+
const t$5 = this.tree;
|
|
1554
|
+
const sel = this.selectedNode ?? t$5;
|
|
1303
1555
|
let parts = [];
|
|
1304
1556
|
parts.push(x`<div .value=${sel.value} @click=${this.#onPartClick}>${sel.value?.label}</div>`);
|
|
1305
|
-
for (const p$
|
|
1306
|
-
if (p$
|
|
1307
|
-
const v$
|
|
1308
|
-
parts.push(x`<div .value=${v$
|
|
1557
|
+
for (const p$3 of Trees.Traverse.parents(sel)) {
|
|
1558
|
+
if (p$3.value === void 0) continue;
|
|
1559
|
+
const v$2 = p$3.value;
|
|
1560
|
+
parts.push(x`<div .value=${v$2} @click=${this.#onPartClick}>${v$2.label}</div>`);
|
|
1309
1561
|
}
|
|
1310
1562
|
parts.reverse();
|
|
1311
1563
|
const currentOpt = this.#renderFinalOption();
|
|
1312
|
-
return x`<div class="parts">${
|
|
1564
|
+
return x`<div class="parts">${o$1(parts, x`<span class="separator">›</span>`)}</div>
|
|
1313
1565
|
${currentOpt}`;
|
|
1314
1566
|
}
|
|
1315
1567
|
#renderFinalOption() {
|
|
1316
|
-
const s$
|
|
1317
|
-
if (s$
|
|
1568
|
+
const s$5 = this.selectedNode;
|
|
1569
|
+
if (s$5 === void 0) {
|
|
1318
1570
|
console.warn(`No selectedNode`);
|
|
1319
1571
|
return x``;
|
|
1320
1572
|
}
|
|
1321
|
-
return this.#renderOptions(s$
|
|
1573
|
+
return this.#renderOptions(s$5, this.#previousSelectionKey);
|
|
1322
1574
|
}
|
|
1323
1575
|
#renderOptions(node, preselectKey) {
|
|
1324
1576
|
if (node.childrenStore.length === 0) return x``;
|
|
1325
|
-
const options = node.childrenStore.map((c$
|
|
1577
|
+
const options = node.childrenStore.map((c$6) => x`<li class="${c$6.value?.key === preselectKey ? `previous` : ``}" @click=${this.#onSubPartClick} data-key=${c$6.value?.key}>${c$6.value?.label}</li>`);
|
|
1326
1578
|
return x`
|
|
1327
1579
|
<span class="separator">›</span>
|
|
1328
1580
|
<div class="horiz-select">
|
|
@@ -1439,9 +1691,9 @@ let CrumbNavigationElement = class CrumbNavigationElement$1 extends i {
|
|
|
1439
1691
|
}
|
|
1440
1692
|
`;
|
|
1441
1693
|
};
|
|
1442
|
-
__decorate([
|
|
1443
|
-
__decorate([
|
|
1444
|
-
CrumbNavigationElement = __decorate([
|
|
1694
|
+
__decorate([n({ type: Object })], CrumbNavigationElement.prototype, "tree", void 0);
|
|
1695
|
+
__decorate([n({ type: Object })], CrumbNavigationElement.prototype, "selectedNode", void 0);
|
|
1696
|
+
CrumbNavigationElement = __decorate([t("ixfx-crumb-navigation")], CrumbNavigationElement);
|
|
1445
1697
|
|
|
1446
1698
|
//#endregion
|
|
1447
1699
|
//#region src/crumb-nav.ts
|
|
@@ -1493,22 +1745,22 @@ let CrumbNavElement = class CrumbNavElement$1 extends i {
|
|
|
1493
1745
|
const split = path.split(separator);
|
|
1494
1746
|
let root = ``;
|
|
1495
1747
|
let segments = [];
|
|
1496
|
-
for (const s$
|
|
1497
|
-
root += s$
|
|
1748
|
+
for (const s$5 of split) {
|
|
1749
|
+
root += s$5 + separator;
|
|
1498
1750
|
segments.push({
|
|
1499
1751
|
key: root,
|
|
1500
|
-
label: s$
|
|
1752
|
+
label: s$5
|
|
1501
1753
|
});
|
|
1502
1754
|
}
|
|
1503
1755
|
this.segments = segments;
|
|
1504
1756
|
this.editPath = path;
|
|
1505
1757
|
}
|
|
1506
|
-
renderSegment(s$
|
|
1507
|
-
const last = i$
|
|
1508
|
-
const caret = x`<div .data=${s$
|
|
1509
|
-
return x`<div class="seg ${s$
|
|
1510
|
-
<label .data=${s$
|
|
1511
|
-
${s$
|
|
1758
|
+
renderSegment(s$5, i$6) {
|
|
1759
|
+
const last = i$6 === this.segments.length - 1;
|
|
1760
|
+
const caret = x`<div .data=${s$5} @click=${this.onCaretClick} class="caret">›</div>`;
|
|
1761
|
+
return x`<div class="seg ${s$5.ensureVisible ? `chosen` : ``}" >
|
|
1762
|
+
<label .data=${s$5} title=${s$5.label} @click=${this.onLabelClick}>
|
|
1763
|
+
${s$5.label}
|
|
1512
1764
|
</label>
|
|
1513
1765
|
${last ? `` : caret}
|
|
1514
1766
|
</div>`;
|
|
@@ -1532,7 +1784,7 @@ let CrumbNavElement = class CrumbNavElement$1 extends i {
|
|
|
1532
1784
|
render() {
|
|
1533
1785
|
if (this.editing) return x`<input @keyup=${this.onInputKeyUp} @blur=${this.onInputBlur} value=${this.editPath} type="text">`;
|
|
1534
1786
|
else {
|
|
1535
|
-
const segs = this.segments.map((s$
|
|
1787
|
+
const segs = this.segments.map((s$5, index) => this.renderSegment(s$5, index));
|
|
1536
1788
|
return x`${segs}`;
|
|
1537
1789
|
}
|
|
1538
1790
|
}
|
|
@@ -1617,10 +1869,10 @@ let CrumbNavElement = class CrumbNavElement$1 extends i {
|
|
|
1617
1869
|
}
|
|
1618
1870
|
`;
|
|
1619
1871
|
};
|
|
1620
|
-
__decorate([
|
|
1621
|
-
__decorate([
|
|
1622
|
-
__decorate([
|
|
1623
|
-
CrumbNavElement = __decorate([
|
|
1872
|
+
__decorate([n({ type: Object })], CrumbNavElement.prototype, "segments", void 0);
|
|
1873
|
+
__decorate([n({ type: Boolean })], CrumbNavElement.prototype, "editing", void 0);
|
|
1874
|
+
__decorate([n({ type: String })], CrumbNavElement.prototype, "editPath", void 0);
|
|
1875
|
+
CrumbNavElement = __decorate([t("ixfx-crumb-nav")], CrumbNavElement);
|
|
1624
1876
|
|
|
1625
1877
|
//#endregion
|
|
1626
1878
|
//#region src/tabs/tab-list-item.ts
|
|
@@ -1657,8 +1909,8 @@ let TabListItemElement = class TabListItemElement$1 extends i {
|
|
|
1657
1909
|
}
|
|
1658
1910
|
`;
|
|
1659
1911
|
};
|
|
1660
|
-
__decorate([
|
|
1661
|
-
TabListItemElement = __decorate([
|
|
1912
|
+
__decorate([n({ type: Boolean })], TabListItemElement.prototype, "closeable", void 0);
|
|
1913
|
+
TabListItemElement = __decorate([t("ixfx-tab-list-item")], TabListItemElement);
|
|
1662
1914
|
|
|
1663
1915
|
//#endregion
|
|
1664
1916
|
//#region src/tabs/tab-list.ts
|
|
@@ -1691,8 +1943,8 @@ let TabListElement = class TabListElement$1 extends i {
|
|
|
1691
1943
|
for (const el of this._listItems) if (this.#isSelected(el)) return el;
|
|
1692
1944
|
}
|
|
1693
1945
|
#isSelected(el) {
|
|
1694
|
-
const v$
|
|
1695
|
-
if (v$
|
|
1946
|
+
const v$2 = el.getAttribute(`selected`);
|
|
1947
|
+
if (v$2 === null) return false;
|
|
1696
1948
|
return el.hasAttribute(`selected`);
|
|
1697
1949
|
}
|
|
1698
1950
|
selectElement(el) {
|
|
@@ -1715,13 +1967,13 @@ let TabListElement = class TabListElement$1 extends i {
|
|
|
1715
1967
|
}
|
|
1716
1968
|
#onSlotClick = (event) => {
|
|
1717
1969
|
this.focus();
|
|
1718
|
-
const t$
|
|
1970
|
+
const t$5 = event.target;
|
|
1719
1971
|
const previous = this.getSelectedElement();
|
|
1720
|
-
this.selectElement(t$
|
|
1721
|
-
const forId = t$
|
|
1972
|
+
this.selectElement(t$5);
|
|
1973
|
+
const forId = t$5.getAttribute(`for`);
|
|
1722
1974
|
this.dispatchEvent(new CustomEvent(`change`, { detail: {
|
|
1723
1975
|
previous,
|
|
1724
|
-
selected: t$
|
|
1976
|
+
selected: t$5.id,
|
|
1725
1977
|
for: forId ?? ``
|
|
1726
1978
|
} }));
|
|
1727
1979
|
};
|
|
@@ -1749,9 +2001,9 @@ let TabListElement = class TabListElement$1 extends i {
|
|
|
1749
2001
|
}
|
|
1750
2002
|
`;
|
|
1751
2003
|
};
|
|
1752
|
-
__decorate([
|
|
1753
|
-
__decorate([
|
|
1754
|
-
TabListElement = __decorate([
|
|
2004
|
+
__decorate([n({ type: Boolean })], TabListElement.prototype, "horizontal", void 0);
|
|
2005
|
+
__decorate([o()], TabListElement.prototype, "_listItems", void 0);
|
|
2006
|
+
TabListElement = __decorate([t("ixfx-tab-list")], TabListElement);
|
|
1755
2007
|
|
|
1756
2008
|
//#endregion
|
|
1757
2009
|
//#region src/tabs/tab-panel.ts
|
|
@@ -1772,7 +2024,7 @@ let TabPanelElement = class TabPanelElement$1 extends i {
|
|
|
1772
2024
|
}
|
|
1773
2025
|
`;
|
|
1774
2026
|
};
|
|
1775
|
-
TabPanelElement = __decorate([
|
|
2027
|
+
TabPanelElement = __decorate([t("ixfx-tab-panel")], TabPanelElement);
|
|
1776
2028
|
|
|
1777
2029
|
//#endregion
|
|
1778
2030
|
//#region src/tabs/tab-panels.ts
|
|
@@ -1809,9 +2061,9 @@ let TabPanelsElement = class TabPanelsElement$1 extends i {
|
|
|
1809
2061
|
if (this.onSelectedPanel) this.onSelectedPanel(el.id, el);
|
|
1810
2062
|
}
|
|
1811
2063
|
syncWithList(el) {
|
|
1812
|
-
const t$
|
|
1813
|
-
if (!t$
|
|
1814
|
-
const forEl = t$
|
|
2064
|
+
const t$5 = el.getSelectedElement();
|
|
2065
|
+
if (!t$5) return;
|
|
2066
|
+
const forEl = t$5.getAttribute(`for`);
|
|
1815
2067
|
if (!forEl) return;
|
|
1816
2068
|
this.selectPanel(forEl);
|
|
1817
2069
|
}
|
|
@@ -1835,8 +2087,8 @@ let TabPanelsElement = class TabPanelsElement$1 extends i {
|
|
|
1835
2087
|
|
|
1836
2088
|
`;
|
|
1837
2089
|
};
|
|
1838
|
-
__decorate([
|
|
1839
|
-
TabPanelsElement = __decorate([
|
|
2090
|
+
__decorate([o()], TabPanelsElement.prototype, "_listItems", void 0);
|
|
2091
|
+
TabPanelsElement = __decorate([t("ixfx-tab-panels")], TabPanelsElement);
|
|
1840
2092
|
|
|
1841
2093
|
//#endregion
|
|
1842
2094
|
//#region src/split-layout/split-layout.ts
|
|
@@ -1966,12 +2218,12 @@ let SplitLayoutElement = class SplitLayoutElement$1 extends i {
|
|
|
1966
2218
|
|
|
1967
2219
|
`;
|
|
1968
2220
|
};
|
|
1969
|
-
__decorate([
|
|
1970
|
-
__decorate([
|
|
1971
|
-
__decorate([
|
|
1972
|
-
__decorate([
|
|
1973
|
-
__decorate([
|
|
1974
|
-
SplitLayoutElement = __decorate([
|
|
2221
|
+
__decorate([n({ type: String })], SplitLayoutElement.prototype, "layout", void 0);
|
|
2222
|
+
__decorate([n({ type: String })], SplitLayoutElement.prototype, "sizeA", void 0);
|
|
2223
|
+
__decorate([n({ type: String })], SplitLayoutElement.prototype, "sizeB", void 0);
|
|
2224
|
+
__decorate([n({ type: Boolean })], SplitLayoutElement.prototype, "fixedA", void 0);
|
|
2225
|
+
__decorate([n({ type: Boolean })], SplitLayoutElement.prototype, "fixedB", void 0);
|
|
2226
|
+
SplitLayoutElement = __decorate([t("ixfx-split-layout")], SplitLayoutElement);
|
|
1975
2227
|
|
|
1976
2228
|
//#endregion
|
|
1977
2229
|
//#region src/charts/plot.ts
|
|
@@ -1992,7 +2244,7 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
1992
2244
|
#drawing;
|
|
1993
2245
|
#legendColour = ``;
|
|
1994
2246
|
#hue = 0;
|
|
1995
|
-
canvasEl =
|
|
2247
|
+
canvasEl = e$1();
|
|
1996
2248
|
seriesRanges = /* @__PURE__ */ new Map();
|
|
1997
2249
|
get series() {
|
|
1998
2250
|
return [...this.#series.values()];
|
|
@@ -2013,8 +2265,8 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2013
2265
|
static fromQuery(query) {
|
|
2014
2266
|
const el = document.querySelector(query);
|
|
2015
2267
|
if (!el) throw new Error(`Query does not match an element`);
|
|
2016
|
-
if (el.nodeName === "PLOT-ELEMENT") return el;
|
|
2017
|
-
throw new Error(`
|
|
2268
|
+
if (el.nodeName === "IXFX-PLOT-ELEMENT") return el;
|
|
2269
|
+
throw new Error(`Element is not a PlotElement ('${el.nodeName}')`);
|
|
2018
2270
|
}
|
|
2019
2271
|
/**
|
|
2020
2272
|
* Delete a series.
|
|
@@ -2024,8 +2276,8 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2024
2276
|
*/
|
|
2025
2277
|
deleteSeries(name) {
|
|
2026
2278
|
name = name.toLowerCase();
|
|
2027
|
-
const s$
|
|
2028
|
-
if (!s$
|
|
2279
|
+
const s$5 = this.#series.get(name);
|
|
2280
|
+
if (!s$5) return false;
|
|
2029
2281
|
this.#series.delete(name);
|
|
2030
2282
|
return true;
|
|
2031
2283
|
}
|
|
@@ -2036,8 +2288,8 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2036
2288
|
*/
|
|
2037
2289
|
clearSeries(name) {
|
|
2038
2290
|
name = name.toLowerCase();
|
|
2039
|
-
const s$
|
|
2040
|
-
if (!s$
|
|
2291
|
+
const s$5 = this.#series.get(name);
|
|
2292
|
+
if (!s$5) return false;
|
|
2041
2293
|
this.#series.clear();
|
|
2042
2294
|
return true;
|
|
2043
2295
|
}
|
|
@@ -2051,29 +2303,29 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2051
2303
|
* Keeps all series, but deletes their data
|
|
2052
2304
|
*/
|
|
2053
2305
|
clearData() {
|
|
2054
|
-
for (const s$
|
|
2306
|
+
for (const s$5 of this.#series.values()) s$5.clear();
|
|
2055
2307
|
}
|
|
2056
2308
|
render() {
|
|
2057
|
-
return x`<canvas ${
|
|
2309
|
+
return x`<canvas ${n$1(this.canvasEl)}></canvas>`;
|
|
2058
2310
|
}
|
|
2059
2311
|
#setupCanvas() {
|
|
2060
2312
|
if (this.#canvas !== void 0) return this.#canvas;
|
|
2061
2313
|
const canvas = this.canvasEl.value;
|
|
2062
2314
|
if (!canvas) throw new Error(`canvas element not found`);
|
|
2063
|
-
const c$
|
|
2064
|
-
this.#canvas = c$
|
|
2065
|
-
this.#drawing = Drawing.makeHelper(c$
|
|
2066
|
-
return c$
|
|
2315
|
+
const c$6 = new CanvasHelper(canvas);
|
|
2316
|
+
this.#canvas = c$6;
|
|
2317
|
+
this.#drawing = Drawing.makeHelper(c$6.ctx);
|
|
2318
|
+
return c$6;
|
|
2067
2319
|
}
|
|
2068
2320
|
connectedCallback() {
|
|
2069
2321
|
super.connectedCallback();
|
|
2070
2322
|
}
|
|
2071
2323
|
firstUpdated(_changedProperties) {
|
|
2072
2324
|
const ro = new ResizeObserver((event) => {
|
|
2073
|
-
const c$
|
|
2074
|
-
if (!c$
|
|
2325
|
+
const c$6 = this.#setupCanvas();
|
|
2326
|
+
if (!c$6) return;
|
|
2075
2327
|
const entry = event[0];
|
|
2076
|
-
c$
|
|
2328
|
+
c$6.setLogicalSize(entry.contentRect);
|
|
2077
2329
|
});
|
|
2078
2330
|
ro.observe(this);
|
|
2079
2331
|
this.updateColours();
|
|
@@ -2083,45 +2335,45 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2083
2335
|
}
|
|
2084
2336
|
plot(value, seriesName = ``, skipDrawing = false) {
|
|
2085
2337
|
if (typeof value !== "number") throw new Error(`Can only add numbers. Got: ${typeof value}`);
|
|
2086
|
-
let s$
|
|
2087
|
-
if (s$
|
|
2088
|
-
s$
|
|
2089
|
-
this.#series.set(seriesName.toLowerCase(), s$
|
|
2338
|
+
let s$5 = this.#series.get(seriesName.toLowerCase());
|
|
2339
|
+
if (s$5 === void 0) {
|
|
2340
|
+
s$5 = new PlotSeries(seriesName, this.colourGenerator(seriesName), this);
|
|
2341
|
+
this.#series.set(seriesName.toLowerCase(), s$5);
|
|
2090
2342
|
}
|
|
2091
|
-
s$
|
|
2343
|
+
s$5.push(value);
|
|
2092
2344
|
if (!this.manualDraw && !skipDrawing) this.draw();
|
|
2093
|
-
return s$
|
|
2345
|
+
return s$5;
|
|
2094
2346
|
}
|
|
2095
2347
|
/**
|
|
2096
2348
|
* Draw a set of key-value pairs as a batch.
|
|
2097
2349
|
* @param value
|
|
2098
2350
|
*/
|
|
2099
2351
|
plotObject(value) {
|
|
2100
|
-
for (const p$
|
|
2352
|
+
for (const p$3 of Pathed.getPathsAndData(value, true)) this.plot(p$3.value, p$3.path, true);
|
|
2101
2353
|
this.draw();
|
|
2102
2354
|
}
|
|
2103
2355
|
colourGenerator(_series) {
|
|
2104
|
-
const c$
|
|
2356
|
+
const c$6 = Colour.HslSpace.scalar(this.#hue, .9, .4);
|
|
2105
2357
|
this.#hue = Numbers.wrap(this.#hue + .1);
|
|
2106
|
-
return c$
|
|
2358
|
+
return c$6;
|
|
2107
2359
|
}
|
|
2108
2360
|
draw() {
|
|
2109
2361
|
if (this.paused) return;
|
|
2110
|
-
const c$
|
|
2111
|
-
const d$
|
|
2362
|
+
const c$6 = this.#canvas;
|
|
2363
|
+
const d$3 = this.#drawing;
|
|
2112
2364
|
const padding = this.padding;
|
|
2113
|
-
if (!d$
|
|
2114
|
-
c$
|
|
2115
|
-
const ctx = d$
|
|
2116
|
-
const axisYwidth = this.computeAxisYWidth(c$
|
|
2117
|
-
const remainingWidth = c$
|
|
2118
|
-
const clLegend = this.computeLegend(c$
|
|
2119
|
-
const plotHeight = c$
|
|
2365
|
+
if (!d$3 || !c$6) return;
|
|
2366
|
+
c$6.clear();
|
|
2367
|
+
const ctx = d$3.ctx;
|
|
2368
|
+
const axisYwidth = this.computeAxisYWidth(c$6);
|
|
2369
|
+
const remainingWidth = c$6.width - axisYwidth;
|
|
2370
|
+
const clLegend = this.computeLegend(c$6, remainingWidth, padding);
|
|
2371
|
+
const plotHeight = c$6.height - clLegend.bounds.height - padding;
|
|
2120
2372
|
const cy = {
|
|
2121
2373
|
width: axisYwidth,
|
|
2122
2374
|
height: plotHeight
|
|
2123
2375
|
};
|
|
2124
|
-
const cp = this.computePlot(c$
|
|
2376
|
+
const cp = this.computePlot(c$6, plotHeight, cy.width, padding);
|
|
2125
2377
|
const cl = {
|
|
2126
2378
|
...clLegend.bounds,
|
|
2127
2379
|
x: cy.width,
|
|
@@ -2132,7 +2384,7 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2132
2384
|
if (!this.hideLegend) {
|
|
2133
2385
|
ctx.save();
|
|
2134
2386
|
ctx.translate(cl.x + padding, cl.y + padding);
|
|
2135
|
-
this.drawLegend(cl, d$
|
|
2387
|
+
this.drawLegend(cl, d$3);
|
|
2136
2388
|
ctx.restore();
|
|
2137
2389
|
}
|
|
2138
2390
|
ctx.save();
|
|
@@ -2143,82 +2395,82 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2143
2395
|
const colour = Colour.toCssColour(series.colour);
|
|
2144
2396
|
switch (this.renderStyle) {
|
|
2145
2397
|
case `line`:
|
|
2146
|
-
this.drawLineSeries(data, cp, d$
|
|
2398
|
+
this.drawLineSeries(data, cp, d$3, colour);
|
|
2147
2399
|
break;
|
|
2148
|
-
default: this.drawDotSeries(data, cp, d$
|
|
2400
|
+
default: this.drawDotSeries(data, cp, d$3, colour);
|
|
2149
2401
|
}
|
|
2150
2402
|
}
|
|
2151
2403
|
ctx.restore();
|
|
2152
2404
|
}
|
|
2153
|
-
drawLegend(cl, d$
|
|
2405
|
+
drawLegend(cl, d$3) {
|
|
2154
2406
|
const textColour = this.#legendColour;
|
|
2155
2407
|
const padding = this.padding;
|
|
2156
2408
|
let x$1 = 0;
|
|
2157
2409
|
let y$2 = padding;
|
|
2158
2410
|
const swatchSize = 10;
|
|
2159
|
-
const ctx = d$
|
|
2411
|
+
const ctx = d$3.ctx;
|
|
2160
2412
|
for (const series of this.#series.values()) {
|
|
2161
2413
|
ctx.fillStyle = Colour.toCssColour(series.colour);
|
|
2162
2414
|
ctx.fillRect(x$1, y$2, swatchSize, swatchSize);
|
|
2163
2415
|
ctx.fillStyle = textColour;
|
|
2164
2416
|
x$1 += swatchSize + padding;
|
|
2165
|
-
const m$
|
|
2417
|
+
const m$2 = ctx.measureText(series.name);
|
|
2166
2418
|
ctx.textBaseline = `middle`;
|
|
2167
2419
|
ctx.fillText(series.name, x$1, y$2 + swatchSize / 2);
|
|
2168
|
-
x$1 += m$
|
|
2420
|
+
x$1 += m$2.width + padding;
|
|
2169
2421
|
if (x$1 >= cl.width) {
|
|
2170
2422
|
y$2 += 10 + padding;
|
|
2171
2423
|
x$1 = 0;
|
|
2172
2424
|
}
|
|
2173
2425
|
}
|
|
2174
2426
|
}
|
|
2175
|
-
drawLineSeries(data, cp, d$
|
|
2427
|
+
drawLineSeries(data, cp, d$3, colour) {
|
|
2176
2428
|
const pointWidth = this.streaming ? this.dataWidth : cp.width / data.length;
|
|
2177
2429
|
let x$1 = 0;
|
|
2178
2430
|
if (this.streaming) x$1 = cp.width - pointWidth * data.length;
|
|
2179
|
-
const pos = data.map((d$
|
|
2431
|
+
const pos = data.map((d$4) => {
|
|
2180
2432
|
x$1 += pointWidth;
|
|
2181
2433
|
return {
|
|
2182
2434
|
x: x$1,
|
|
2183
|
-
y: (1 - d$
|
|
2435
|
+
y: (1 - d$4) * cp.height,
|
|
2184
2436
|
radius: pointWidth
|
|
2185
2437
|
};
|
|
2186
2438
|
});
|
|
2187
|
-
const trimmed = pos.filter((p$
|
|
2188
|
-
if (p$
|
|
2439
|
+
const trimmed = pos.filter((p$3) => {
|
|
2440
|
+
if (p$3.x < 0) return false;
|
|
2189
2441
|
return true;
|
|
2190
2442
|
});
|
|
2191
|
-
d$
|
|
2443
|
+
d$3.connectedPoints(trimmed, {
|
|
2192
2444
|
strokeStyle: colour,
|
|
2193
2445
|
lineWidth: this.lineWidth
|
|
2194
2446
|
});
|
|
2195
2447
|
}
|
|
2196
|
-
drawDotSeries(data, cp, d$
|
|
2448
|
+
drawDotSeries(data, cp, d$3, colour) {
|
|
2197
2449
|
const pointWidth = this.streaming ? this.dataWidth : cp.width / data.length;
|
|
2198
2450
|
let x$1 = 0;
|
|
2199
2451
|
if (this.streaming) x$1 = cp.width - pointWidth * data.length;
|
|
2200
|
-
const pos = data.map((d$
|
|
2452
|
+
const pos = data.map((d$4) => {
|
|
2201
2453
|
x$1 += pointWidth;
|
|
2202
2454
|
return {
|
|
2203
2455
|
x: x$1,
|
|
2204
|
-
y: (1 - d$
|
|
2456
|
+
y: (1 - d$4) * cp.height,
|
|
2205
2457
|
radius: pointWidth
|
|
2206
2458
|
};
|
|
2207
2459
|
});
|
|
2208
|
-
const trimmed = pos.filter((p$
|
|
2209
|
-
if (p$
|
|
2460
|
+
const trimmed = pos.filter((p$3) => {
|
|
2461
|
+
if (p$3.x < 0) return false;
|
|
2210
2462
|
return true;
|
|
2211
2463
|
});
|
|
2212
|
-
d$
|
|
2464
|
+
d$3.dot(trimmed, {
|
|
2213
2465
|
filled: true,
|
|
2214
2466
|
fillStyle: colour
|
|
2215
2467
|
});
|
|
2216
2468
|
}
|
|
2217
|
-
computePlot(c$
|
|
2469
|
+
computePlot(c$6, plotHeight, axisYwidth, padding) {
|
|
2218
2470
|
return {
|
|
2219
2471
|
x: axisYwidth,
|
|
2220
2472
|
y: 0,
|
|
2221
|
-
width: c$
|
|
2473
|
+
width: c$6.width - axisYwidth - padding,
|
|
2222
2474
|
height: plotHeight - padding - padding
|
|
2223
2475
|
};
|
|
2224
2476
|
}
|
|
@@ -2226,7 +2478,7 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2226
2478
|
return 0;
|
|
2227
2479
|
}
|
|
2228
2480
|
#swatchSize = 10;
|
|
2229
|
-
computeLegend(c$
|
|
2481
|
+
computeLegend(c$6, maxWidth, padding) {
|
|
2230
2482
|
if (this.hideLegend) return {
|
|
2231
2483
|
bounds: {
|
|
2232
2484
|
width: 0,
|
|
@@ -2234,14 +2486,14 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2234
2486
|
},
|
|
2235
2487
|
parts: []
|
|
2236
2488
|
};
|
|
2237
|
-
const ctx = c$
|
|
2489
|
+
const ctx = c$6.ctx;
|
|
2238
2490
|
const series = [...this.#series.values()];
|
|
2239
2491
|
let largestH = 0;
|
|
2240
|
-
const sizes = series.map((s$
|
|
2492
|
+
const sizes = series.map((s$5) => {
|
|
2241
2493
|
let width = this.#swatchSize + padding;
|
|
2242
|
-
const m$
|
|
2243
|
-
width += m$
|
|
2244
|
-
const height = m$
|
|
2494
|
+
const m$2 = ctx.measureText(s$5.name);
|
|
2495
|
+
width += m$2.width;
|
|
2496
|
+
const height = m$2.emHeightAscent + m$2.emHeightDescent;
|
|
2245
2497
|
largestH = Math.max(height, largestH);
|
|
2246
2498
|
return {
|
|
2247
2499
|
width,
|
|
@@ -2252,13 +2504,13 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2252
2504
|
let x$1 = padding;
|
|
2253
2505
|
let y$2 = padding;
|
|
2254
2506
|
let usedWidthMax = 0;
|
|
2255
|
-
for (const s$
|
|
2507
|
+
for (const s$5 of sizes) {
|
|
2256
2508
|
parts.push({
|
|
2257
2509
|
x: x$1,
|
|
2258
2510
|
y: y$2,
|
|
2259
|
-
...s$
|
|
2511
|
+
...s$5
|
|
2260
2512
|
});
|
|
2261
|
-
x$1 += s$
|
|
2513
|
+
x$1 += s$5.width;
|
|
2262
2514
|
usedWidthMax = Math.max(x$1, usedWidthMax);
|
|
2263
2515
|
if (x$1 >= maxWidth) {
|
|
2264
2516
|
x$1 = padding;
|
|
@@ -2285,43 +2537,43 @@ let PlotElement = class PlotElement$1 extends i {
|
|
|
2285
2537
|
}
|
|
2286
2538
|
`;
|
|
2287
2539
|
};
|
|
2288
|
-
__decorate([
|
|
2540
|
+
__decorate([n({
|
|
2289
2541
|
attribute: `streaming`,
|
|
2290
2542
|
type: Boolean
|
|
2291
2543
|
})], PlotElement.prototype, "streaming", void 0);
|
|
2292
|
-
__decorate([
|
|
2544
|
+
__decorate([n({
|
|
2293
2545
|
attribute: `hide-legend`,
|
|
2294
2546
|
type: Boolean
|
|
2295
2547
|
})], PlotElement.prototype, "hideLegend", void 0);
|
|
2296
|
-
__decorate([
|
|
2548
|
+
__decorate([n({
|
|
2297
2549
|
attribute: `max-length`,
|
|
2298
2550
|
type: Number
|
|
2299
2551
|
})], PlotElement.prototype, "maxLength", void 0);
|
|
2300
|
-
__decorate([
|
|
2552
|
+
__decorate([n({
|
|
2301
2553
|
attribute: `data-width`,
|
|
2302
2554
|
type: Number
|
|
2303
2555
|
})], PlotElement.prototype, "dataWidth", void 0);
|
|
2304
|
-
__decorate([
|
|
2556
|
+
__decorate([n({
|
|
2305
2557
|
attribute: `fixed-max`,
|
|
2306
2558
|
type: Number
|
|
2307
2559
|
})], PlotElement.prototype, "fixedMax", void 0);
|
|
2308
|
-
__decorate([
|
|
2560
|
+
__decorate([n({
|
|
2309
2561
|
attribute: `fixed-min`,
|
|
2310
2562
|
type: Number
|
|
2311
2563
|
})], PlotElement.prototype, "fixedMin", void 0);
|
|
2312
|
-
__decorate([
|
|
2564
|
+
__decorate([n({
|
|
2313
2565
|
attribute: `line-width`,
|
|
2314
2566
|
type: Number
|
|
2315
2567
|
})], PlotElement.prototype, "lineWidth", void 0);
|
|
2316
|
-
__decorate([
|
|
2568
|
+
__decorate([n({
|
|
2317
2569
|
attribute: `render`,
|
|
2318
2570
|
type: String
|
|
2319
2571
|
})], PlotElement.prototype, "renderStyle", void 0);
|
|
2320
|
-
__decorate([
|
|
2572
|
+
__decorate([n({
|
|
2321
2573
|
attribute: `manual-draw`,
|
|
2322
2574
|
type: Boolean
|
|
2323
2575
|
})], PlotElement.prototype, "manualDraw", void 0);
|
|
2324
|
-
PlotElement = __decorate([
|
|
2576
|
+
PlotElement = __decorate([t(`ixfx-plot-element`)], PlotElement);
|
|
2325
2577
|
var PlotSeries = class {
|
|
2326
2578
|
data = [];
|
|
2327
2579
|
minSeen = Number.MAX_SAFE_INTEGER;
|
|
@@ -2345,15 +2597,15 @@ var PlotSeries = class {
|
|
|
2345
2597
|
let max = this.maxSeen;
|
|
2346
2598
|
if (Number.isNaN(min)) min = 0;
|
|
2347
2599
|
if (Number.isNaN(max)) max = 1;
|
|
2348
|
-
const s$
|
|
2349
|
-
return this.getScaledBy(s$
|
|
2600
|
+
const s$5 = Numbers.scaler(min, max);
|
|
2601
|
+
return this.getScaledBy(s$5);
|
|
2350
2602
|
}
|
|
2351
2603
|
getScaledBy(scaler) {
|
|
2352
|
-
return this.data.map((v$
|
|
2353
|
-
if (typeof v$
|
|
2354
|
-
if (Number.isNaN(v$
|
|
2355
|
-
const scaled = scaler(v$
|
|
2356
|
-
if (Number.isNaN(scaled)) throw new Error(`NaN. v: ${v$
|
|
2604
|
+
return this.data.map((v$2) => {
|
|
2605
|
+
if (typeof v$2 !== `number`) throw new Error(`Data should just be numbers. Got: ${typeof v$2}`);
|
|
2606
|
+
if (Number.isNaN(v$2)) throw new Error(`data contains NaN`);
|
|
2607
|
+
const scaled = scaler(v$2);
|
|
2608
|
+
if (Number.isNaN(scaled)) throw new Error(`NaN. v: ${v$2} scaled: ${scaled}`);
|
|
2357
2609
|
return Numbers.clamp(scaled);
|
|
2358
2610
|
});
|
|
2359
2611
|
}
|
|
@@ -2458,9 +2710,9 @@ const getSorter = (sortStyle) => {
|
|
|
2458
2710
|
};
|
|
2459
2711
|
const sorterByValueIndex = (index, reverse = false) => {
|
|
2460
2712
|
return (values) => {
|
|
2461
|
-
const s$
|
|
2462
|
-
if (reverse) return s$
|
|
2463
|
-
return s$
|
|
2713
|
+
const s$5 = values.toSorted((a$2, b$2) => defaultComparer(a$2[index], b$2[index]));
|
|
2714
|
+
if (reverse) return s$5.reverse();
|
|
2715
|
+
return s$5;
|
|
2464
2716
|
};
|
|
2465
2717
|
};
|
|
2466
2718
|
|
|
@@ -2515,6 +2767,67 @@ var FrequencyHistogramPlot = class {
|
|
|
2515
2767
|
}
|
|
2516
2768
|
};
|
|
2517
2769
|
|
|
2770
|
+
//#endregion
|
|
2771
|
+
//#region node_modules/lit-html/directives/repeat.js
|
|
2772
|
+
/**
|
|
2773
|
+
* @license
|
|
2774
|
+
* Copyright 2017 Google LLC
|
|
2775
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2776
|
+
*/
|
|
2777
|
+
const u = (e$7, s$5, t$5) => {
|
|
2778
|
+
const r$6 = /* @__PURE__ */ new Map();
|
|
2779
|
+
for (let l$3 = s$5; l$3 <= t$5; l$3++) r$6.set(e$7[l$3], l$3);
|
|
2780
|
+
return r$6;
|
|
2781
|
+
}, c = e(class extends i$2 {
|
|
2782
|
+
constructor(e$7) {
|
|
2783
|
+
if (super(e$7), e$7.type !== t$1.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
2784
|
+
}
|
|
2785
|
+
dt(e$7, s$5, t$5) {
|
|
2786
|
+
let r$6;
|
|
2787
|
+
void 0 === t$5 ? t$5 = s$5 : void 0 !== s$5 && (r$6 = s$5);
|
|
2788
|
+
const l$3 = [], o$9 = [];
|
|
2789
|
+
let i$6 = 0;
|
|
2790
|
+
for (const s$6 of e$7) l$3[i$6] = r$6 ? r$6(s$6, i$6) : i$6, o$9[i$6] = t$5(s$6, i$6), i$6++;
|
|
2791
|
+
return {
|
|
2792
|
+
values: o$9,
|
|
2793
|
+
keys: l$3
|
|
2794
|
+
};
|
|
2795
|
+
}
|
|
2796
|
+
render(e$7, s$5, t$5) {
|
|
2797
|
+
return this.dt(e$7, s$5, t$5).values;
|
|
2798
|
+
}
|
|
2799
|
+
update(s$5, [t$5, r$6, c$6]) {
|
|
2800
|
+
const d$3 = p(s$5), { values: p$3, keys: a$2 } = this.dt(t$5, r$6, c$6);
|
|
2801
|
+
if (!Array.isArray(d$3)) return this.ut = a$2, p$3;
|
|
2802
|
+
const h$5 = this.ut ??= [], v$2 = [];
|
|
2803
|
+
let m$2, y$2, x$1 = 0, j$1 = d$3.length - 1, k$1 = 0, w$1 = p$3.length - 1;
|
|
2804
|
+
for (; x$1 <= j$1 && k$1 <= w$1;) if (null === d$3[x$1]) x$1++;
|
|
2805
|
+
else if (null === d$3[j$1]) j$1--;
|
|
2806
|
+
else if (h$5[x$1] === a$2[k$1]) v$2[k$1] = v(d$3[x$1], p$3[k$1]), x$1++, k$1++;
|
|
2807
|
+
else if (h$5[j$1] === a$2[w$1]) v$2[w$1] = v(d$3[j$1], p$3[w$1]), j$1--, w$1--;
|
|
2808
|
+
else if (h$5[x$1] === a$2[w$1]) v$2[w$1] = v(d$3[x$1], p$3[w$1]), s(s$5, v$2[w$1 + 1], d$3[x$1]), x$1++, w$1--;
|
|
2809
|
+
else if (h$5[j$1] === a$2[k$1]) v$2[k$1] = v(d$3[j$1], p$3[k$1]), s(s$5, d$3[x$1], d$3[j$1]), j$1--, k$1++;
|
|
2810
|
+
else if (void 0 === m$2 && (m$2 = u(a$2, k$1, w$1), y$2 = u(h$5, x$1, j$1)), m$2.has(h$5[x$1])) if (m$2.has(h$5[j$1])) {
|
|
2811
|
+
const e$7 = y$2.get(a$2[k$1]), t$6 = void 0 !== e$7 ? d$3[e$7] : null;
|
|
2812
|
+
if (null === t$6) {
|
|
2813
|
+
const e$8 = s(s$5, d$3[x$1]);
|
|
2814
|
+
v(e$8, p$3[k$1]), v$2[k$1] = e$8;
|
|
2815
|
+
} else v$2[k$1] = v(t$6, p$3[k$1]), s(s$5, d$3[x$1], t$6), d$3[e$7] = null;
|
|
2816
|
+
k$1++;
|
|
2817
|
+
} else M(d$3[j$1]), j$1--;
|
|
2818
|
+
else M(d$3[x$1]), x$1++;
|
|
2819
|
+
for (; k$1 <= w$1;) {
|
|
2820
|
+
const e$7 = s(s$5, v$2[w$1 + 1]);
|
|
2821
|
+
v(e$7, p$3[k$1]), v$2[k$1++] = e$7;
|
|
2822
|
+
}
|
|
2823
|
+
for (; x$1 <= j$1;) {
|
|
2824
|
+
const e$7 = d$3[x$1++];
|
|
2825
|
+
null !== e$7 && M(e$7);
|
|
2826
|
+
}
|
|
2827
|
+
return this.ut = a$2, m(s$5, v$2), T;
|
|
2828
|
+
}
|
|
2829
|
+
});
|
|
2830
|
+
|
|
2518
2831
|
//#endregion
|
|
2519
2832
|
//#region src/charts/histogram-vis.ts
|
|
2520
2833
|
const jsonData = (object) => {
|
|
@@ -2522,12 +2835,12 @@ const jsonData = (object) => {
|
|
|
2522
2835
|
try {
|
|
2523
2836
|
if (typeof object === `string`) {
|
|
2524
2837
|
if (object.length === 0) return;
|
|
2525
|
-
const o$
|
|
2526
|
-
if (!Array.isArray(o$
|
|
2838
|
+
const o$9 = JSON.parse(object);
|
|
2839
|
+
if (!Array.isArray(o$9)) {
|
|
2527
2840
|
console.error(`Histogram innerText should be JSON array`);
|
|
2528
2841
|
return;
|
|
2529
2842
|
}
|
|
2530
|
-
for (const [index, element] of o$
|
|
2843
|
+
for (const [index, element] of o$9.entries()) {
|
|
2531
2844
|
if (!Array.isArray(element)) {
|
|
2532
2845
|
console.error(`Histogram array should consist of inner arrays`);
|
|
2533
2846
|
return;
|
|
@@ -2545,7 +2858,7 @@ const jsonData = (object) => {
|
|
|
2545
2858
|
return;
|
|
2546
2859
|
}
|
|
2547
2860
|
}
|
|
2548
|
-
return o$
|
|
2861
|
+
return o$9;
|
|
2549
2862
|
}
|
|
2550
2863
|
} catch (error) {
|
|
2551
2864
|
console.log(object);
|
|
@@ -2636,45 +2949,45 @@ let HistogramVis = class HistogramVis$1 extends i {
|
|
|
2636
2949
|
}
|
|
2637
2950
|
render() {
|
|
2638
2951
|
if ((this.data === void 0 || this.data.length === 0) && this.json === void 0) return x``;
|
|
2639
|
-
const d$
|
|
2640
|
-
const length = d$
|
|
2641
|
-
const highestCount = Math.max(...d$
|
|
2642
|
-
const bars = d$
|
|
2952
|
+
const d$3 = this.data ?? this.json;
|
|
2953
|
+
const length = d$3.length;
|
|
2954
|
+
const highestCount = Math.max(...d$3.map((d$4) => d$4[1]));
|
|
2955
|
+
const bars = d$3.map((kv) => ({
|
|
2643
2956
|
data: kv,
|
|
2644
2957
|
percentage: kv[1] / highestCount
|
|
2645
2958
|
}));
|
|
2646
2959
|
const xAxis = x`
|
|
2647
2960
|
<div
|
|
2648
2961
|
class="xAxis"
|
|
2649
|
-
style="grid-area: 2 / 1 / 3 / ${d$
|
|
2962
|
+
style="grid-area: 2 / 1 / 3 / ${d$3.length + 1}"
|
|
2650
2963
|
></div>
|
|
2651
2964
|
`;
|
|
2652
2965
|
const height = this.height ? `height: ${this.height};` : ``;
|
|
2653
|
-
const h$
|
|
2966
|
+
const h$5 = x`
|
|
2654
2967
|
<style>
|
|
2655
2968
|
div.chart {
|
|
2656
|
-
grid-template-columns: repeat(${d$
|
|
2969
|
+
grid-template-columns: repeat(${d$3.length}, minmax(2px, 1fr));
|
|
2657
2970
|
}
|
|
2658
2971
|
</style>
|
|
2659
2972
|
<div class="container" style="${height}">
|
|
2660
2973
|
<div class="chart">
|
|
2661
|
-
${
|
|
2974
|
+
${c(bars, (bar) => bar.data[0], (b$2, index) => this.barTemplate(b$2, index, length))}
|
|
2662
2975
|
${this.showXAxis ? xAxis : ``}
|
|
2663
2976
|
</div>
|
|
2664
2977
|
</div>
|
|
2665
2978
|
`;
|
|
2666
|
-
return h$
|
|
2979
|
+
return h$5;
|
|
2667
2980
|
}
|
|
2668
2981
|
};
|
|
2669
|
-
__decorate([
|
|
2670
|
-
__decorate([
|
|
2671
|
-
__decorate([
|
|
2672
|
-
__decorate([
|
|
2673
|
-
__decorate([
|
|
2982
|
+
__decorate([n()], HistogramVis.prototype, "data", void 0);
|
|
2983
|
+
__decorate([n()], HistogramVis.prototype, "showDataLabels", void 0);
|
|
2984
|
+
__decorate([n()], HistogramVis.prototype, "height", void 0);
|
|
2985
|
+
__decorate([n()], HistogramVis.prototype, "showXAxis", void 0);
|
|
2986
|
+
__decorate([n({
|
|
2674
2987
|
converter: jsonData,
|
|
2675
2988
|
type: Object
|
|
2676
2989
|
})], HistogramVis.prototype, "json", void 0);
|
|
2677
|
-
HistogramVis = __decorate([
|
|
2990
|
+
HistogramVis = __decorate([t(`histogram-vis`)], HistogramVis);
|
|
2678
2991
|
|
|
2679
2992
|
//#endregion
|
|
2680
2993
|
//#region src/index.ts
|