@decidables/decidables-elements 0.3.2 → 0.3.4
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/CHANGELOG.md +16 -0
- package/lib/decidablesElements.esm.js +954 -1091
- package/lib/decidablesElements.esm.js.map +1 -1
- package/lib/decidablesElements.esm.min.js +70 -60
- package/lib/decidablesElements.esm.min.js.map +1 -1
- package/lib/decidablesElements.umd.js +954 -1093
- package/lib/decidablesElements.umd.js.map +1 -1
- package/lib/decidablesElements.umd.min.js +70 -60
- package/lib/decidablesElements.umd.min.js.map +1 -1
- package/package.json +5 -5
|
@@ -9,789 +9,915 @@
|
|
|
9
9
|
* Copyright 2019 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
|
-
const t$
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
constructor(t, n) {
|
|
18
|
-
if (this._$cssResult$ = !0, n !==
|
|
19
|
-
this.cssText = t;
|
|
12
|
+
const t$2 = window,
|
|
13
|
+
e$4 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
14
|
+
s$5 = Symbol(),
|
|
15
|
+
n$5 = new WeakMap();
|
|
16
|
+
let o$5 = class o {
|
|
17
|
+
constructor(t, e, n) {
|
|
18
|
+
if (this._$cssResult$ = !0, n !== s$5) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
19
|
+
this.cssText = t, this.t = e;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
21
|
get styleSheet() {
|
|
23
|
-
let
|
|
24
|
-
|
|
22
|
+
let t = this.o;
|
|
23
|
+
const s = this.t;
|
|
24
|
+
if (e$4 && void 0 === t) {
|
|
25
|
+
const e = void 0 !== s && 1 === s.length;
|
|
26
|
+
e && (t = n$5.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$5.set(s, t));
|
|
27
|
+
}
|
|
28
|
+
return t;
|
|
25
29
|
}
|
|
26
|
-
|
|
27
30
|
toString() {
|
|
28
31
|
return this.cssText;
|
|
29
32
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const n = document.createElement("style"),
|
|
45
|
-
s = window.litNonce;
|
|
46
|
-
void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
S$1 = t$1 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
50
|
-
let e = "";
|
|
51
|
-
|
|
52
|
-
for (const n of t.cssRules) e += n.cssText;
|
|
53
|
-
|
|
54
|
-
return o$3(e);
|
|
55
|
-
})(t) : t;
|
|
33
|
+
};
|
|
34
|
+
const r$4 = t => new o$5("string" == typeof t ? t : t + "", void 0, s$5),
|
|
35
|
+
S$2 = (s, n) => {
|
|
36
|
+
e$4 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
|
|
37
|
+
const n = document.createElement("style"),
|
|
38
|
+
o = t$2.litNonce;
|
|
39
|
+
void 0 !== o && n.setAttribute("nonce", o), n.textContent = e.cssText, s.appendChild(n);
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
c$1 = e$4 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
43
|
+
let e = "";
|
|
44
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
45
|
+
return r$4(e);
|
|
46
|
+
})(t) : t;
|
|
56
47
|
|
|
57
48
|
/**
|
|
58
49
|
* @license
|
|
59
50
|
* Copyright 2017 Google LLC
|
|
60
51
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
61
52
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
53
|
+
var s$4;
|
|
54
|
+
const e$3 = window,
|
|
55
|
+
r$3 = e$3.trustedTypes,
|
|
56
|
+
h$2 = r$3 ? r$3.emptyScript : "",
|
|
57
|
+
o$4 = e$3.reactiveElementPolyfillSupport,
|
|
58
|
+
n$4 = {
|
|
59
|
+
toAttribute(t, i) {
|
|
60
|
+
switch (i) {
|
|
61
|
+
case Boolean:
|
|
62
|
+
t = t ? h$2 : null;
|
|
63
|
+
break;
|
|
64
|
+
case Object:
|
|
65
|
+
case Array:
|
|
66
|
+
t = null == t ? t : JSON.stringify(t);
|
|
67
|
+
}
|
|
68
|
+
return t;
|
|
69
|
+
},
|
|
70
|
+
fromAttribute(t, i) {
|
|
71
|
+
let s = t;
|
|
72
|
+
switch (i) {
|
|
73
|
+
case Boolean:
|
|
74
|
+
s = null !== t;
|
|
75
|
+
break;
|
|
76
|
+
case Number:
|
|
77
|
+
s = null === t ? null : Number(t);
|
|
78
|
+
break;
|
|
79
|
+
case Object:
|
|
80
|
+
case Array:
|
|
81
|
+
try {
|
|
82
|
+
s = JSON.parse(t);
|
|
83
|
+
} catch (t) {
|
|
84
|
+
s = null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return s;
|
|
78
88
|
}
|
|
79
|
-
|
|
80
|
-
return t;
|
|
81
89
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
case Number:
|
|
92
|
-
s = null === t ? null : Number(t);
|
|
93
|
-
break;
|
|
94
|
-
|
|
95
|
-
case Object:
|
|
96
|
-
case Array:
|
|
97
|
-
try {
|
|
98
|
-
s = JSON.parse(t);
|
|
99
|
-
} catch (t) {
|
|
100
|
-
s = null;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return s;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
n$2 = (t, i) => i !== t && (i == i || t == t),
|
|
110
|
-
l$3 = {
|
|
111
|
-
attribute: !0,
|
|
112
|
-
type: String,
|
|
113
|
-
converter: o$2,
|
|
114
|
-
reflect: !1,
|
|
115
|
-
hasChanged: n$2
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
class a$1 extends HTMLElement {
|
|
90
|
+
a$2 = (t, i) => i !== t && (i == i || t == t),
|
|
91
|
+
l$4 = {
|
|
92
|
+
attribute: !0,
|
|
93
|
+
type: String,
|
|
94
|
+
converter: n$4,
|
|
95
|
+
reflect: !1,
|
|
96
|
+
hasChanged: a$2
|
|
97
|
+
};
|
|
98
|
+
let d$1 = class d extends HTMLElement {
|
|
119
99
|
constructor() {
|
|
120
|
-
super(), this._$
|
|
100
|
+
super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
121
101
|
}
|
|
122
|
-
|
|
123
102
|
static addInitializer(t) {
|
|
124
103
|
var i;
|
|
125
|
-
null !== (i = this.
|
|
104
|
+
this.finalize(), (null !== (i = this.h) && void 0 !== i ? i : this.h = []).push(t);
|
|
126
105
|
}
|
|
127
|
-
|
|
128
106
|
static get observedAttributes() {
|
|
129
107
|
this.finalize();
|
|
130
108
|
const t = [];
|
|
131
109
|
return this.elementProperties.forEach((i, s) => {
|
|
132
|
-
const e = this._$
|
|
133
|
-
|
|
134
|
-
void 0 !== e && (this._$Eu.set(e, s), t.push(e));
|
|
110
|
+
const e = this._$Ep(s, i);
|
|
111
|
+
void 0 !== e && (this._$Ev.set(e, s), t.push(e));
|
|
135
112
|
}), t;
|
|
136
113
|
}
|
|
137
|
-
|
|
138
|
-
static createProperty(t, i = l$3) {
|
|
114
|
+
static createProperty(t, i = l$4) {
|
|
139
115
|
if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
140
116
|
const s = "symbol" == typeof t ? Symbol() : "__" + t,
|
|
141
|
-
|
|
117
|
+
e = this.getPropertyDescriptor(t, s, i);
|
|
142
118
|
void 0 !== e && Object.defineProperty(this.prototype, t, e);
|
|
143
119
|
}
|
|
144
120
|
}
|
|
145
|
-
|
|
146
121
|
static getPropertyDescriptor(t, i, s) {
|
|
147
122
|
return {
|
|
148
123
|
get() {
|
|
149
124
|
return this[i];
|
|
150
125
|
},
|
|
151
|
-
|
|
152
126
|
set(e) {
|
|
153
127
|
const r = this[t];
|
|
154
128
|
this[i] = e, this.requestUpdate(t, r, s);
|
|
155
129
|
},
|
|
156
|
-
|
|
157
130
|
configurable: !0,
|
|
158
131
|
enumerable: !0
|
|
159
132
|
};
|
|
160
133
|
}
|
|
161
|
-
|
|
162
134
|
static getPropertyOptions(t) {
|
|
163
|
-
return this.elementProperties.get(t) || l$
|
|
135
|
+
return this.elementProperties.get(t) || l$4;
|
|
164
136
|
}
|
|
165
|
-
|
|
166
137
|
static finalize() {
|
|
167
138
|
if (this.hasOwnProperty("finalized")) return !1;
|
|
168
139
|
this.finalized = !0;
|
|
169
140
|
const t = Object.getPrototypeOf(this);
|
|
170
|
-
|
|
171
|
-
if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
|
|
141
|
+
if (t.finalize(), void 0 !== t.h && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = new Map(), this.hasOwnProperty("properties")) {
|
|
172
142
|
const t = this.properties,
|
|
173
|
-
|
|
174
|
-
|
|
143
|
+
i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
175
144
|
for (const s of i) this.createProperty(s, t[s]);
|
|
176
145
|
}
|
|
177
|
-
|
|
178
146
|
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
179
147
|
}
|
|
180
|
-
|
|
181
148
|
static finalizeStyles(i) {
|
|
182
149
|
const s = [];
|
|
183
|
-
|
|
184
150
|
if (Array.isArray(i)) {
|
|
185
151
|
const e = new Set(i.flat(1 / 0).reverse());
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
} else void 0 !== i && s.push(S$1(i));
|
|
189
|
-
|
|
152
|
+
for (const i of e) s.unshift(c$1(i));
|
|
153
|
+
} else void 0 !== i && s.push(c$1(i));
|
|
190
154
|
return s;
|
|
191
155
|
}
|
|
192
|
-
|
|
193
|
-
static _$Eh(t, i) {
|
|
156
|
+
static _$Ep(t, i) {
|
|
194
157
|
const s = i.attribute;
|
|
195
158
|
return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
196
159
|
}
|
|
197
|
-
|
|
198
|
-
o() {
|
|
160
|
+
u() {
|
|
199
161
|
var t;
|
|
200
|
-
this._$
|
|
162
|
+
this._$E_ = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Eg(), this.requestUpdate(), null === (t = this.constructor.h) || void 0 === t || t.forEach(t => t(this));
|
|
201
163
|
}
|
|
202
|
-
|
|
203
164
|
addController(t) {
|
|
204
165
|
var i, s;
|
|
205
|
-
(null !== (i = this._$
|
|
166
|
+
(null !== (i = this._$ES) && void 0 !== i ? i : this._$ES = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
|
|
206
167
|
}
|
|
207
|
-
|
|
208
168
|
removeController(t) {
|
|
209
169
|
var i;
|
|
210
|
-
null === (i = this._$
|
|
170
|
+
null === (i = this._$ES) || void 0 === i || i.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
211
171
|
}
|
|
212
|
-
|
|
213
|
-
_$Em() {
|
|
172
|
+
_$Eg() {
|
|
214
173
|
this.constructor.elementProperties.forEach((t, i) => {
|
|
215
|
-
this.hasOwnProperty(i) && (this._$
|
|
174
|
+
this.hasOwnProperty(i) && (this._$Ei.set(i, this[i]), delete this[i]);
|
|
216
175
|
});
|
|
217
176
|
}
|
|
218
|
-
|
|
219
177
|
createRenderRoot() {
|
|
220
178
|
var t;
|
|
221
179
|
const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
222
|
-
return
|
|
180
|
+
return S$2(s, this.constructor.elementStyles), s;
|
|
223
181
|
}
|
|
224
|
-
|
|
225
182
|
connectedCallback() {
|
|
226
183
|
var t;
|
|
227
|
-
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$
|
|
184
|
+
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
228
185
|
var i;
|
|
229
186
|
return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
|
|
230
187
|
});
|
|
231
188
|
}
|
|
232
|
-
|
|
233
189
|
enableUpdating(t) {}
|
|
234
|
-
|
|
235
190
|
disconnectedCallback() {
|
|
236
191
|
var t;
|
|
237
|
-
null === (t = this._$
|
|
192
|
+
null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
238
193
|
var i;
|
|
239
194
|
return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
|
|
240
195
|
});
|
|
241
196
|
}
|
|
242
|
-
|
|
243
197
|
attributeChangedCallback(t, i, s) {
|
|
244
198
|
this._$AK(t, s);
|
|
245
199
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
if (void 0 !== h && !0 === s.reflect) {
|
|
253
|
-
const n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$2.toAttribute)(i, s.type);
|
|
254
|
-
this._$Ei = t, null == n ? this.removeAttribute(h) : this.setAttribute(h, n), this._$Ei = null;
|
|
200
|
+
_$EO(t, i, s = l$4) {
|
|
201
|
+
var e;
|
|
202
|
+
const r = this.constructor._$Ep(t, s);
|
|
203
|
+
if (void 0 !== r && !0 === s.reflect) {
|
|
204
|
+
const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$4).toAttribute(i, s.type);
|
|
205
|
+
this._$El = t, null == h ? this.removeAttribute(r) : this.setAttribute(r, h), this._$El = null;
|
|
255
206
|
}
|
|
256
207
|
}
|
|
257
|
-
|
|
258
208
|
_$AK(t, i) {
|
|
259
|
-
var s
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
this._$Ei = n, this[n] = a(i, t.type), this._$Ei = null;
|
|
209
|
+
var s;
|
|
210
|
+
const e = this.constructor,
|
|
211
|
+
r = e._$Ev.get(t);
|
|
212
|
+
if (void 0 !== r && this._$El !== r) {
|
|
213
|
+
const t = e.getPropertyOptions(r),
|
|
214
|
+
h = "function" == typeof t.converter ? {
|
|
215
|
+
fromAttribute: t.converter
|
|
216
|
+
} : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$4;
|
|
217
|
+
this._$El = r, this[r] = h.fromAttribute(i, t.type), this._$El = null;
|
|
269
218
|
}
|
|
270
219
|
}
|
|
271
|
-
|
|
272
220
|
requestUpdate(t, i, s) {
|
|
273
221
|
let e = !0;
|
|
274
|
-
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged ||
|
|
222
|
+
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || a$2)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$El !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$E_ = this._$Ej());
|
|
275
223
|
}
|
|
276
|
-
|
|
277
|
-
async _$E_() {
|
|
224
|
+
async _$Ej() {
|
|
278
225
|
this.isUpdatePending = !0;
|
|
279
|
-
|
|
280
226
|
try {
|
|
281
|
-
await this._$
|
|
227
|
+
await this._$E_;
|
|
282
228
|
} catch (t) {
|
|
283
229
|
Promise.reject(t);
|
|
284
230
|
}
|
|
285
|
-
|
|
286
231
|
const t = this.scheduleUpdate();
|
|
287
232
|
return null != t && (await t), !this.isUpdatePending;
|
|
288
233
|
}
|
|
289
|
-
|
|
290
234
|
scheduleUpdate() {
|
|
291
235
|
return this.performUpdate();
|
|
292
236
|
}
|
|
293
|
-
|
|
294
237
|
performUpdate() {
|
|
295
238
|
var t;
|
|
296
239
|
if (!this.isUpdatePending) return;
|
|
297
|
-
this.hasUpdated, this._$
|
|
240
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((t, i) => this[i] = t), this._$Ei = void 0);
|
|
298
241
|
let i = !1;
|
|
299
242
|
const s = this._$AL;
|
|
300
|
-
|
|
301
243
|
try {
|
|
302
|
-
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$
|
|
244
|
+
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
303
245
|
var i;
|
|
304
246
|
return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
|
|
305
|
-
}), this.update(s)) : this._$
|
|
247
|
+
}), this.update(s)) : this._$Ek();
|
|
306
248
|
} catch (t) {
|
|
307
|
-
throw i = !1, this._$
|
|
249
|
+
throw i = !1, this._$Ek(), t;
|
|
308
250
|
}
|
|
309
|
-
|
|
310
251
|
i && this._$AE(s);
|
|
311
252
|
}
|
|
312
|
-
|
|
313
253
|
willUpdate(t) {}
|
|
314
|
-
|
|
315
254
|
_$AE(t) {
|
|
316
255
|
var i;
|
|
317
|
-
null === (i = this._$
|
|
256
|
+
null === (i = this._$ES) || void 0 === i || i.forEach(t => {
|
|
318
257
|
var i;
|
|
319
258
|
return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
|
|
320
259
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
321
260
|
}
|
|
322
|
-
|
|
323
|
-
_$EU() {
|
|
261
|
+
_$Ek() {
|
|
324
262
|
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
325
263
|
}
|
|
326
|
-
|
|
327
264
|
get updateComplete() {
|
|
328
265
|
return this.getUpdateComplete();
|
|
329
266
|
}
|
|
330
|
-
|
|
331
267
|
getUpdateComplete() {
|
|
332
|
-
return this._$
|
|
268
|
+
return this._$E_;
|
|
333
269
|
}
|
|
334
|
-
|
|
335
270
|
shouldUpdate(t) {
|
|
336
271
|
return !0;
|
|
337
272
|
}
|
|
338
|
-
|
|
339
273
|
update(t) {
|
|
340
|
-
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$
|
|
274
|
+
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$EO(i, this[i], t)), this._$EC = void 0), this._$Ek();
|
|
341
275
|
}
|
|
342
|
-
|
|
343
276
|
updated(t) {}
|
|
344
|
-
|
|
345
277
|
firstUpdated(t) {}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = {
|
|
278
|
+
};
|
|
279
|
+
d$1.finalized = !0, d$1.elementProperties = new Map(), d$1.elementStyles = [], d$1.shadowRootOptions = {
|
|
350
280
|
mode: "open"
|
|
351
|
-
}, null ==
|
|
352
|
-
ReactiveElement:
|
|
353
|
-
}), (null !== (s$
|
|
281
|
+
}, null == o$4 || o$4({
|
|
282
|
+
ReactiveElement: d$1
|
|
283
|
+
}), (null !== (s$4 = e$3.reactiveElementVersions) && void 0 !== s$4 ? s$4 : e$3.reactiveElementVersions = []).push("1.6.1");
|
|
354
284
|
|
|
355
285
|
/**
|
|
356
286
|
* @license
|
|
357
287
|
* Copyright 2017 Google LLC
|
|
358
288
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
359
289
|
*/
|
|
360
|
-
var t;
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
const s = t[i];
|
|
416
|
-
let o,
|
|
417
|
-
u,
|
|
418
|
-
p = -1,
|
|
419
|
-
$ = 0;
|
|
420
|
-
|
|
421
|
-
for (; $ < s.length && (d.lastIndex = $, u = d.exec(s), null !== u);) $ = d.lastIndex, d === c ? "!--" === u[1] ? d = v : void 0 !== u[1] ? d = a : void 0 !== u[2] ? (g.test(u[2]) && (h = RegExp("</" + u[2], "g")), d = f) : void 0 !== u[3] && (d = f) : d === f ? ">" === u[0] ? (d = null != h ? h : c, p = -1) : void 0 === u[1] ? p = -2 : (p = d.lastIndex - u[2].length, o = u[1], d = void 0 === u[3] ? f : '"' === u[3] ? m : _$7) : d === m || d === _$7 ? d = f : d === v || d === a ? d = c : (d = f, h = void 0);
|
|
422
|
-
|
|
423
|
-
const y = d === f && t[i + 1].startsWith("/>") ? " " : "";
|
|
424
|
-
r += d === c ? s + n$1 : p >= 0 ? (l.push(o), s.slice(0, p) + "$lit$" + s.slice(p) + e + y) : s + e + (-2 === p ? (l.push(void 0), i) : y);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
const u = r + (t[o] || "<?>") + (2 === i ? "</svg>" : "");
|
|
428
|
-
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
429
|
-
return [void 0 !== s$1 ? s$1.createHTML(u) : u, l];
|
|
430
|
-
};
|
|
431
|
-
|
|
432
|
-
class E {
|
|
290
|
+
var t$1;
|
|
291
|
+
const i$1 = window,
|
|
292
|
+
s$3 = i$1.trustedTypes,
|
|
293
|
+
e$2 = s$3 ? s$3.createPolicy("lit-html", {
|
|
294
|
+
createHTML: t => t
|
|
295
|
+
}) : void 0,
|
|
296
|
+
o$3 = "$lit$",
|
|
297
|
+
n$3 = `lit$${(Math.random() + "").slice(9)}$`,
|
|
298
|
+
l$3 = "?" + n$3,
|
|
299
|
+
h$1 = `<${l$3}>`,
|
|
300
|
+
r$2 = document,
|
|
301
|
+
d = () => r$2.createComment(""),
|
|
302
|
+
u = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
303
|
+
c = Array.isArray,
|
|
304
|
+
v = t => c(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
|
|
305
|
+
a$1 = "[ \t\n\f\r]",
|
|
306
|
+
f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
307
|
+
_ = /-->/g,
|
|
308
|
+
m = />/g,
|
|
309
|
+
p = RegExp(`>|${a$1}(?:([^\\s"'>=/]+)(${a$1}*=${a$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
310
|
+
g = /'/g,
|
|
311
|
+
$ = /"/g,
|
|
312
|
+
y = /^(?:script|style|textarea|title)$/i,
|
|
313
|
+
w = t => (i, ...s) => ({
|
|
314
|
+
_$litType$: t,
|
|
315
|
+
strings: i,
|
|
316
|
+
values: s
|
|
317
|
+
}),
|
|
318
|
+
x = w(1),
|
|
319
|
+
b = w(2),
|
|
320
|
+
T = Symbol.for("lit-noChange"),
|
|
321
|
+
A = Symbol.for("lit-nothing"),
|
|
322
|
+
E = new WeakMap(),
|
|
323
|
+
C = r$2.createTreeWalker(r$2, 129, null, !1),
|
|
324
|
+
P = (t, i) => {
|
|
325
|
+
const s = t.length - 1,
|
|
326
|
+
l = [];
|
|
327
|
+
let r,
|
|
328
|
+
d = 2 === i ? "<svg>" : "",
|
|
329
|
+
u = f;
|
|
330
|
+
for (let i = 0; i < s; i++) {
|
|
331
|
+
const s = t[i];
|
|
332
|
+
let e,
|
|
333
|
+
c,
|
|
334
|
+
v = -1,
|
|
335
|
+
a = 0;
|
|
336
|
+
for (; a < s.length && (u.lastIndex = a, c = u.exec(s), null !== c);) a = u.lastIndex, u === f ? "!--" === c[1] ? u = _ : void 0 !== c[1] ? u = m : void 0 !== c[2] ? (y.test(c[2]) && (r = RegExp("</" + c[2], "g")), u = p) : void 0 !== c[3] && (u = p) : u === p ? ">" === c[0] ? (u = null != r ? r : f, v = -1) : void 0 === c[1] ? v = -2 : (v = u.lastIndex - c[2].length, e = c[1], u = void 0 === c[3] ? p : '"' === c[3] ? $ : g) : u === $ || u === g ? u = p : u === _ || u === m ? u = f : (u = p, r = void 0);
|
|
337
|
+
const w = u === p && t[i + 1].startsWith("/>") ? " " : "";
|
|
338
|
+
d += u === f ? s + h$1 : v >= 0 ? (l.push(e), s.slice(0, v) + o$3 + s.slice(v) + n$3 + w) : s + n$3 + (-2 === v ? (l.push(void 0), i) : w);
|
|
339
|
+
}
|
|
340
|
+
const c = d + (t[s] || "<?>") + (2 === i ? "</svg>" : "");
|
|
341
|
+
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
342
|
+
return [void 0 !== e$2 ? e$2.createHTML(c) : c, l];
|
|
343
|
+
};
|
|
344
|
+
class V {
|
|
433
345
|
constructor({
|
|
434
346
|
strings: t,
|
|
435
|
-
_$litType$:
|
|
436
|
-
},
|
|
437
|
-
let
|
|
347
|
+
_$litType$: i
|
|
348
|
+
}, e) {
|
|
349
|
+
let h;
|
|
438
350
|
this.parts = [];
|
|
439
351
|
let r = 0,
|
|
440
|
-
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
if (this.el = E.createElement(v, n), A.currentNode = this.el.content, 2 === s) {
|
|
352
|
+
u = 0;
|
|
353
|
+
const c = t.length - 1,
|
|
354
|
+
v = this.parts,
|
|
355
|
+
[a, f] = P(t, i);
|
|
356
|
+
if (this.el = V.createElement(a, e), C.currentNode = this.el.content, 2 === i) {
|
|
446
357
|
const t = this.el.content,
|
|
447
|
-
|
|
358
|
+
i = t.firstChild;
|
|
448
359
|
i.remove(), t.append(...i.childNodes);
|
|
449
360
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
if (l.hasAttributes()) {
|
|
361
|
+
for (; null !== (h = C.nextNode()) && v.length < c;) {
|
|
362
|
+
if (1 === h.nodeType) {
|
|
363
|
+
if (h.hasAttributes()) {
|
|
454
364
|
const t = [];
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
const s = a[d++];
|
|
458
|
-
|
|
365
|
+
for (const i of h.getAttributeNames()) if (i.endsWith(o$3) || i.startsWith(n$3)) {
|
|
366
|
+
const s = f[u++];
|
|
459
367
|
if (t.push(i), void 0 !== s) {
|
|
460
|
-
const t =
|
|
461
|
-
|
|
462
|
-
|
|
368
|
+
const t = h.getAttribute(s.toLowerCase() + o$3).split(n$3),
|
|
369
|
+
i = /([.?@])?(.*)/.exec(s);
|
|
370
|
+
v.push({
|
|
463
371
|
type: 1,
|
|
464
372
|
index: r,
|
|
465
373
|
name: i[2],
|
|
466
374
|
strings: t,
|
|
467
|
-
ctor: "." === i[1] ?
|
|
375
|
+
ctor: "." === i[1] ? k : "?" === i[1] ? I : "@" === i[1] ? L : R
|
|
468
376
|
});
|
|
469
|
-
} else
|
|
377
|
+
} else v.push({
|
|
470
378
|
type: 6,
|
|
471
379
|
index: r
|
|
472
380
|
});
|
|
473
381
|
}
|
|
474
|
-
|
|
475
|
-
for (const i of t) l.removeAttribute(i);
|
|
382
|
+
for (const i of t) h.removeAttribute(i);
|
|
476
383
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
l.textContent = i ? i.emptyScript : "";
|
|
484
|
-
|
|
485
|
-
for (let i = 0; i < s; i++) l.append(t[i], h()), A.nextNode(), c.push({
|
|
384
|
+
if (y.test(h.tagName)) {
|
|
385
|
+
const t = h.textContent.split(n$3),
|
|
386
|
+
i = t.length - 1;
|
|
387
|
+
if (i > 0) {
|
|
388
|
+
h.textContent = s$3 ? s$3.emptyScript : "";
|
|
389
|
+
for (let s = 0; s < i; s++) h.append(t[s], d()), C.nextNode(), v.push({
|
|
486
390
|
type: 2,
|
|
487
391
|
index: ++r
|
|
488
392
|
});
|
|
489
|
-
|
|
490
|
-
l.append(t[s], h());
|
|
393
|
+
h.append(t[i], d());
|
|
491
394
|
}
|
|
492
395
|
}
|
|
493
|
-
} else if (8 ===
|
|
396
|
+
} else if (8 === h.nodeType) if (h.data === l$3) v.push({
|
|
494
397
|
type: 2,
|
|
495
398
|
index: r
|
|
496
399
|
});else {
|
|
497
400
|
let t = -1;
|
|
498
|
-
|
|
499
|
-
for (; -1 !== (t = l.data.indexOf(e, t + 1));) c.push({
|
|
401
|
+
for (; -1 !== (t = h.data.indexOf(n$3, t + 1));) v.push({
|
|
500
402
|
type: 7,
|
|
501
403
|
index: r
|
|
502
|
-
}), t +=
|
|
404
|
+
}), t += n$3.length - 1;
|
|
503
405
|
}
|
|
504
|
-
|
|
505
406
|
r++;
|
|
506
407
|
}
|
|
507
408
|
}
|
|
508
|
-
|
|
509
409
|
static createElement(t, i) {
|
|
510
|
-
const s =
|
|
410
|
+
const s = r$2.createElement("template");
|
|
511
411
|
return s.innerHTML = t, s;
|
|
512
412
|
}
|
|
513
|
-
|
|
514
413
|
}
|
|
515
|
-
|
|
516
|
-
function P(t, i, s = t, e) {
|
|
414
|
+
function N(t, i, s = t, e) {
|
|
517
415
|
var o, n, l, h;
|
|
518
|
-
if (i ===
|
|
519
|
-
let
|
|
520
|
-
const
|
|
521
|
-
return (null ==
|
|
416
|
+
if (i === T) return i;
|
|
417
|
+
let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
|
|
418
|
+
const d = u(i) ? void 0 : i._$litDirective$;
|
|
419
|
+
return (null == r ? void 0 : r.constructor) !== d && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === d ? r = void 0 : (r = new d(t), r._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Co) && void 0 !== l ? l : h._$Co = [])[e] = r : s._$Cl = r), void 0 !== r && (i = N(t, r._$AS(t, i.values), r, e)), i;
|
|
522
420
|
}
|
|
523
|
-
|
|
524
|
-
class V {
|
|
421
|
+
let S$1 = class S {
|
|
525
422
|
constructor(t, i) {
|
|
526
|
-
this.
|
|
423
|
+
this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
527
424
|
}
|
|
528
|
-
|
|
529
425
|
get parentNode() {
|
|
530
426
|
return this._$AM.parentNode;
|
|
531
427
|
}
|
|
532
|
-
|
|
533
428
|
get _$AU() {
|
|
534
429
|
return this._$AM._$AU;
|
|
535
430
|
}
|
|
536
|
-
|
|
537
|
-
p(t) {
|
|
431
|
+
v(t) {
|
|
538
432
|
var i;
|
|
539
433
|
const {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
let n =
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
434
|
+
el: {
|
|
435
|
+
content: s
|
|
436
|
+
},
|
|
437
|
+
parts: e
|
|
438
|
+
} = this._$AD,
|
|
439
|
+
o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r$2).importNode(s, !0);
|
|
440
|
+
C.currentNode = o;
|
|
441
|
+
let n = C.nextNode(),
|
|
442
|
+
l = 0,
|
|
443
|
+
h = 0,
|
|
444
|
+
d = e[0];
|
|
552
445
|
for (; void 0 !== d;) {
|
|
553
|
-
if (
|
|
446
|
+
if (l === d.index) {
|
|
554
447
|
let i;
|
|
555
|
-
2 === d.type ? i = new
|
|
448
|
+
2 === d.type ? i = new M(n, n.nextSibling, this, t) : 1 === d.type ? i = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (i = new z(n, this, t)), this.u.push(i), d = e[++h];
|
|
556
449
|
}
|
|
557
|
-
|
|
558
|
-
h !== (null == d ? void 0 : d.index) && (n = A.nextNode(), h++);
|
|
450
|
+
l !== (null == d ? void 0 : d.index) && (n = C.nextNode(), l++);
|
|
559
451
|
}
|
|
560
|
-
|
|
561
452
|
return o;
|
|
562
453
|
}
|
|
563
|
-
|
|
564
|
-
m(t) {
|
|
454
|
+
p(t) {
|
|
565
455
|
let i = 0;
|
|
566
|
-
|
|
567
|
-
for (const s of this.v) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
456
|
+
for (const s of this.u) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
568
457
|
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
class N {
|
|
458
|
+
};
|
|
459
|
+
class M {
|
|
573
460
|
constructor(t, i, s, e) {
|
|
574
461
|
var o;
|
|
575
|
-
this.type = 2, this._$AH =
|
|
462
|
+
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cm = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
|
|
576
463
|
}
|
|
577
|
-
|
|
578
464
|
get _$AU() {
|
|
579
465
|
var t, i;
|
|
580
|
-
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$
|
|
466
|
+
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cm;
|
|
581
467
|
}
|
|
582
|
-
|
|
583
468
|
get parentNode() {
|
|
584
469
|
let t = this._$AA.parentNode;
|
|
585
470
|
const i = this._$AM;
|
|
586
|
-
return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;
|
|
471
|
+
return void 0 !== i && 11 === (null == t ? void 0 : t.nodeType) && (t = i.parentNode), t;
|
|
587
472
|
}
|
|
588
|
-
|
|
589
473
|
get startNode() {
|
|
590
474
|
return this._$AA;
|
|
591
475
|
}
|
|
592
|
-
|
|
593
476
|
get endNode() {
|
|
594
477
|
return this._$AB;
|
|
595
478
|
}
|
|
596
|
-
|
|
597
479
|
_$AI(t, i = this) {
|
|
598
|
-
t =
|
|
480
|
+
t = N(this, t, i), u(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== T && this.g(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : v(t) ? this.k(t) : this.g(t);
|
|
599
481
|
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
return this._$AA.parentNode.insertBefore(t, i);
|
|
482
|
+
S(t) {
|
|
483
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
603
484
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.A(t));
|
|
485
|
+
T(t) {
|
|
486
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
|
|
607
487
|
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.k(l$2.createTextNode(t)), this._$AH = t;
|
|
488
|
+
g(t) {
|
|
489
|
+
this._$AH !== A && u(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$2.createTextNode(t)), this._$AH = t;
|
|
611
490
|
}
|
|
612
|
-
|
|
613
|
-
T(t) {
|
|
491
|
+
$(t) {
|
|
614
492
|
var i;
|
|
615
493
|
const {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.
|
|
621
|
-
const t = new
|
|
622
|
-
|
|
623
|
-
t.
|
|
494
|
+
values: s,
|
|
495
|
+
_$litType$: e
|
|
496
|
+
} = t,
|
|
497
|
+
o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = V.createElement(e.h, this.options)), e);
|
|
498
|
+
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.p(s);else {
|
|
499
|
+
const t = new S$1(o, this),
|
|
500
|
+
i = t.v(this.options);
|
|
501
|
+
t.p(s), this.T(i), this._$AH = t;
|
|
624
502
|
}
|
|
625
503
|
}
|
|
626
|
-
|
|
627
504
|
_$AC(t) {
|
|
628
|
-
let i =
|
|
629
|
-
return void 0 === i &&
|
|
505
|
+
let i = E.get(t.strings);
|
|
506
|
+
return void 0 === i && E.set(t.strings, i = new V(t)), i;
|
|
630
507
|
}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
d(this._$AH) || (this._$AH = [], this._$AR());
|
|
508
|
+
k(t) {
|
|
509
|
+
c(this._$AH) || (this._$AH = [], this._$AR());
|
|
634
510
|
const i = this._$AH;
|
|
635
511
|
let s,
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
for (const o of t) e === i.length ? i.push(s = new N(this.A(h()), this.A(h()), this, this.options)) : s = i[e], s._$AI(o), e++;
|
|
639
|
-
|
|
512
|
+
e = 0;
|
|
513
|
+
for (const o of t) e === i.length ? i.push(s = new M(this.S(d()), this.S(d()), this, this.options)) : s = i[e], s._$AI(o), e++;
|
|
640
514
|
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
641
515
|
}
|
|
642
|
-
|
|
643
516
|
_$AR(t = this._$AA.nextSibling, i) {
|
|
644
517
|
var s;
|
|
645
|
-
|
|
646
518
|
for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
|
|
647
519
|
const i = t.nextSibling;
|
|
648
520
|
t.remove(), t = i;
|
|
649
521
|
}
|
|
650
522
|
}
|
|
651
|
-
|
|
652
523
|
setConnected(t) {
|
|
653
524
|
var i;
|
|
654
|
-
void 0 === this._$AM && (this._$
|
|
525
|
+
void 0 === this._$AM && (this._$Cm = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
|
|
655
526
|
}
|
|
656
|
-
|
|
657
527
|
}
|
|
658
|
-
|
|
659
|
-
class S {
|
|
528
|
+
class R {
|
|
660
529
|
constructor(t, i, s, e, o) {
|
|
661
|
-
this.type = 1, this._$AH =
|
|
530
|
+
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = o, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = A;
|
|
662
531
|
}
|
|
663
|
-
|
|
664
532
|
get tagName() {
|
|
665
533
|
return this.element.tagName;
|
|
666
534
|
}
|
|
667
|
-
|
|
668
535
|
get _$AU() {
|
|
669
536
|
return this._$AM._$AU;
|
|
670
537
|
}
|
|
671
|
-
|
|
672
538
|
_$AI(t, i = this, s, e) {
|
|
673
539
|
const o = this.strings;
|
|
674
540
|
let n = !1;
|
|
675
|
-
if (void 0 === o) t =
|
|
541
|
+
if (void 0 === o) t = N(this, t, i, 0), n = !u(t) || t !== this._$AH && t !== T, n && (this._$AH = t);else {
|
|
676
542
|
const e = t;
|
|
677
543
|
let l, h;
|
|
544
|
+
for (t = o[0], l = 0; l < o.length - 1; l++) h = N(this, e[s + l], i, l), h === T && (h = this._$AH[l]), n || (n = !u(h) || h !== this._$AH[l]), h === A ? t = A : t !== A && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
|
|
545
|
+
}
|
|
546
|
+
n && !e && this.j(t);
|
|
547
|
+
}
|
|
548
|
+
j(t) {
|
|
549
|
+
t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
class k extends R {
|
|
553
|
+
constructor() {
|
|
554
|
+
super(...arguments), this.type = 3;
|
|
555
|
+
}
|
|
556
|
+
j(t) {
|
|
557
|
+
this.element[this.name] = t === A ? void 0 : t;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
const H = s$3 ? s$3.emptyScript : "";
|
|
561
|
+
class I extends R {
|
|
562
|
+
constructor() {
|
|
563
|
+
super(...arguments), this.type = 4;
|
|
564
|
+
}
|
|
565
|
+
j(t) {
|
|
566
|
+
t && t !== A ? this.element.setAttribute(this.name, H) : this.element.removeAttribute(this.name);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
class L extends R {
|
|
570
|
+
constructor(t, i, s, e, o) {
|
|
571
|
+
super(t, i, s, e, o), this.type = 5;
|
|
572
|
+
}
|
|
573
|
+
_$AI(t, i = this) {
|
|
574
|
+
var s;
|
|
575
|
+
if ((t = null !== (s = N(this, t, i, 0)) && void 0 !== s ? s : A) === T) return;
|
|
576
|
+
const e = this._$AH,
|
|
577
|
+
o = t === A && e !== A || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
|
|
578
|
+
n = t !== A && (e === A || o);
|
|
579
|
+
o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
580
|
+
}
|
|
581
|
+
handleEvent(t) {
|
|
582
|
+
var i, s;
|
|
583
|
+
"function" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
class z {
|
|
587
|
+
constructor(t, i, s) {
|
|
588
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
589
|
+
}
|
|
590
|
+
get _$AU() {
|
|
591
|
+
return this._$AM._$AU;
|
|
592
|
+
}
|
|
593
|
+
_$AI(t) {
|
|
594
|
+
N(this, t);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
const j = i$1.litHtmlPolyfillSupport;
|
|
598
|
+
null == j || j(V, M), (null !== (t$1 = i$1.litHtmlVersions) && void 0 !== t$1 ? t$1 : i$1.litHtmlVersions = []).push("2.7.0");
|
|
599
|
+
const B = (t, i, s) => {
|
|
600
|
+
var e, o;
|
|
601
|
+
const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
|
|
602
|
+
let l = n._$litPart$;
|
|
603
|
+
if (void 0 === l) {
|
|
604
|
+
const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
|
|
605
|
+
n._$litPart$ = l = new M(i.insertBefore(d(), t), t, void 0, null != s ? s : {});
|
|
606
|
+
}
|
|
607
|
+
return l._$AI(t), l;
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* @license
|
|
612
|
+
* Copyright 2019 Google LLC
|
|
613
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
614
|
+
*/
|
|
615
|
+
const t = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
616
|
+
e$1 = Symbol(),
|
|
617
|
+
n$2 = new Map();
|
|
618
|
+
let s$2 = class s {
|
|
619
|
+
constructor(t, n) {
|
|
620
|
+
if (this._$cssResult$ = !0, n !== e$1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
621
|
+
this.cssText = t;
|
|
622
|
+
}
|
|
623
|
+
get styleSheet() {
|
|
624
|
+
let e = n$2.get(this.cssText);
|
|
625
|
+
return t && void 0 === e && (n$2.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
|
|
626
|
+
}
|
|
627
|
+
toString() {
|
|
628
|
+
return this.cssText;
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
const o$2 = t => new s$2("string" == typeof t ? t : t + "", e$1),
|
|
632
|
+
r$1 = (t, ...n) => {
|
|
633
|
+
const o = 1 === t.length ? t[0] : n.reduce((e, n, s) => e + (t => {
|
|
634
|
+
if (!0 === t._$cssResult$) return t.cssText;
|
|
635
|
+
if ("number" == typeof t) return t;
|
|
636
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
637
|
+
})(n) + t[s + 1], t[0]);
|
|
638
|
+
return new s$2(o, e$1);
|
|
639
|
+
},
|
|
640
|
+
i = (e, n) => {
|
|
641
|
+
t ? e.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(t => {
|
|
642
|
+
const n = document.createElement("style"),
|
|
643
|
+
s = window.litNonce;
|
|
644
|
+
void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
|
|
645
|
+
});
|
|
646
|
+
},
|
|
647
|
+
S = t ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
648
|
+
let e = "";
|
|
649
|
+
for (const n of t.cssRules) e += n.cssText;
|
|
650
|
+
return o$2(e);
|
|
651
|
+
})(t) : t;
|
|
678
652
|
|
|
679
|
-
|
|
653
|
+
/**
|
|
654
|
+
* @license
|
|
655
|
+
* Copyright 2017 Google LLC
|
|
656
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
657
|
+
*/
|
|
658
|
+
var s$1;
|
|
659
|
+
const e = window.trustedTypes,
|
|
660
|
+
r = e ? e.emptyScript : "",
|
|
661
|
+
h = window.reactiveElementPolyfillSupport,
|
|
662
|
+
o$1 = {
|
|
663
|
+
toAttribute(t, i) {
|
|
664
|
+
switch (i) {
|
|
665
|
+
case Boolean:
|
|
666
|
+
t = t ? r : null;
|
|
667
|
+
break;
|
|
668
|
+
case Object:
|
|
669
|
+
case Array:
|
|
670
|
+
t = null == t ? t : JSON.stringify(t);
|
|
671
|
+
}
|
|
672
|
+
return t;
|
|
673
|
+
},
|
|
674
|
+
fromAttribute(t, i) {
|
|
675
|
+
let s = t;
|
|
676
|
+
switch (i) {
|
|
677
|
+
case Boolean:
|
|
678
|
+
s = null !== t;
|
|
679
|
+
break;
|
|
680
|
+
case Number:
|
|
681
|
+
s = null === t ? null : Number(t);
|
|
682
|
+
break;
|
|
683
|
+
case Object:
|
|
684
|
+
case Array:
|
|
685
|
+
try {
|
|
686
|
+
s = JSON.parse(t);
|
|
687
|
+
} catch (t) {
|
|
688
|
+
s = null;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
return s;
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
n$1 = (t, i) => i !== t && (i == i || t == t),
|
|
695
|
+
l$2 = {
|
|
696
|
+
attribute: !0,
|
|
697
|
+
type: String,
|
|
698
|
+
converter: o$1,
|
|
699
|
+
reflect: !1,
|
|
700
|
+
hasChanged: n$1
|
|
701
|
+
};
|
|
702
|
+
class a extends HTMLElement {
|
|
703
|
+
constructor() {
|
|
704
|
+
super(), this._$Et = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$Ei = null, this.o();
|
|
705
|
+
}
|
|
706
|
+
static addInitializer(t) {
|
|
707
|
+
var i;
|
|
708
|
+
null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
|
|
709
|
+
}
|
|
710
|
+
static get observedAttributes() {
|
|
711
|
+
this.finalize();
|
|
712
|
+
const t = [];
|
|
713
|
+
return this.elementProperties.forEach((i, s) => {
|
|
714
|
+
const e = this._$Eh(s, i);
|
|
715
|
+
void 0 !== e && (this._$Eu.set(e, s), t.push(e));
|
|
716
|
+
}), t;
|
|
717
|
+
}
|
|
718
|
+
static createProperty(t, i = l$2) {
|
|
719
|
+
if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
720
|
+
const s = "symbol" == typeof t ? Symbol() : "__" + t,
|
|
721
|
+
e = this.getPropertyDescriptor(t, s, i);
|
|
722
|
+
void 0 !== e && Object.defineProperty(this.prototype, t, e);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
static getPropertyDescriptor(t, i, s) {
|
|
726
|
+
return {
|
|
727
|
+
get() {
|
|
728
|
+
return this[i];
|
|
729
|
+
},
|
|
730
|
+
set(e) {
|
|
731
|
+
const r = this[t];
|
|
732
|
+
this[i] = e, this.requestUpdate(t, r, s);
|
|
733
|
+
},
|
|
734
|
+
configurable: !0,
|
|
735
|
+
enumerable: !0
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
static getPropertyOptions(t) {
|
|
739
|
+
return this.elementProperties.get(t) || l$2;
|
|
740
|
+
}
|
|
741
|
+
static finalize() {
|
|
742
|
+
if (this.hasOwnProperty("finalized")) return !1;
|
|
743
|
+
this.finalized = !0;
|
|
744
|
+
const t = Object.getPrototypeOf(this);
|
|
745
|
+
if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
|
|
746
|
+
const t = this.properties,
|
|
747
|
+
i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
748
|
+
for (const s of i) this.createProperty(s, t[s]);
|
|
749
|
+
}
|
|
750
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
751
|
+
}
|
|
752
|
+
static finalizeStyles(i) {
|
|
753
|
+
const s = [];
|
|
754
|
+
if (Array.isArray(i)) {
|
|
755
|
+
const e = new Set(i.flat(1 / 0).reverse());
|
|
756
|
+
for (const i of e) s.unshift(S(i));
|
|
757
|
+
} else void 0 !== i && s.push(S(i));
|
|
758
|
+
return s;
|
|
759
|
+
}
|
|
760
|
+
static _$Eh(t, i) {
|
|
761
|
+
const s = i.attribute;
|
|
762
|
+
return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
763
|
+
}
|
|
764
|
+
o() {
|
|
765
|
+
var t;
|
|
766
|
+
this._$Ep = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Em(), this.requestUpdate(), null === (t = this.constructor.l) || void 0 === t || t.forEach(t => t(this));
|
|
767
|
+
}
|
|
768
|
+
addController(t) {
|
|
769
|
+
var i, s;
|
|
770
|
+
(null !== (i = this._$Eg) && void 0 !== i ? i : this._$Eg = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
|
|
771
|
+
}
|
|
772
|
+
removeController(t) {
|
|
773
|
+
var i;
|
|
774
|
+
null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
|
|
775
|
+
}
|
|
776
|
+
_$Em() {
|
|
777
|
+
this.constructor.elementProperties.forEach((t, i) => {
|
|
778
|
+
this.hasOwnProperty(i) && (this._$Et.set(i, this[i]), delete this[i]);
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
createRenderRoot() {
|
|
782
|
+
var t;
|
|
783
|
+
const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
784
|
+
return i(s, this.constructor.elementStyles), s;
|
|
785
|
+
}
|
|
786
|
+
connectedCallback() {
|
|
787
|
+
var t;
|
|
788
|
+
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
789
|
+
var i;
|
|
790
|
+
return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
enableUpdating(t) {}
|
|
794
|
+
disconnectedCallback() {
|
|
795
|
+
var t;
|
|
796
|
+
null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
797
|
+
var i;
|
|
798
|
+
return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
attributeChangedCallback(t, i, s) {
|
|
802
|
+
this._$AK(t, s);
|
|
803
|
+
}
|
|
804
|
+
_$ES(t, i, s = l$2) {
|
|
805
|
+
var e, r;
|
|
806
|
+
const h = this.constructor._$Eh(t, s);
|
|
807
|
+
if (void 0 !== h && !0 === s.reflect) {
|
|
808
|
+
const n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$1.toAttribute)(i, s.type);
|
|
809
|
+
this._$Ei = t, null == n ? this.removeAttribute(h) : this.setAttribute(h, n), this._$Ei = null;
|
|
680
810
|
}
|
|
681
|
-
n && !e && this.C(t);
|
|
682
811
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
812
|
+
_$AK(t, i) {
|
|
813
|
+
var s, e, r;
|
|
814
|
+
const h = this.constructor,
|
|
815
|
+
n = h._$Eu.get(t);
|
|
816
|
+
if (void 0 !== n && this._$Ei !== n) {
|
|
817
|
+
const t = h.getPropertyOptions(n),
|
|
818
|
+
l = t.converter,
|
|
819
|
+
a = null !== (r = null !== (e = null === (s = l) || void 0 === s ? void 0 : s.fromAttribute) && void 0 !== e ? e : "function" == typeof l ? l : null) && void 0 !== r ? r : o$1.fromAttribute;
|
|
820
|
+
this._$Ei = n, this[n] = a(i, t.type), this._$Ei = null;
|
|
821
|
+
}
|
|
686
822
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
class M extends S {
|
|
691
|
-
constructor() {
|
|
692
|
-
super(...arguments), this.type = 3;
|
|
823
|
+
requestUpdate(t, i, s) {
|
|
824
|
+
let e = !0;
|
|
825
|
+
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$1)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$E_());
|
|
693
826
|
}
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
827
|
+
async _$E_() {
|
|
828
|
+
this.isUpdatePending = !0;
|
|
829
|
+
try {
|
|
830
|
+
await this._$Ep;
|
|
831
|
+
} catch (t) {
|
|
832
|
+
Promise.reject(t);
|
|
833
|
+
}
|
|
834
|
+
const t = this.scheduleUpdate();
|
|
835
|
+
return null != t && (await t), !this.isUpdatePending;
|
|
697
836
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
const k = i ? i.emptyScript : "";
|
|
702
|
-
|
|
703
|
-
class H extends S {
|
|
704
|
-
constructor() {
|
|
705
|
-
super(...arguments), this.type = 4;
|
|
837
|
+
scheduleUpdate() {
|
|
838
|
+
return this.performUpdate();
|
|
706
839
|
}
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
840
|
+
performUpdate() {
|
|
841
|
+
var t;
|
|
842
|
+
if (!this.isUpdatePending) return;
|
|
843
|
+
this.hasUpdated, this._$Et && (this._$Et.forEach((t, i) => this[i] = t), this._$Et = void 0);
|
|
844
|
+
let i = !1;
|
|
845
|
+
const s = this._$AL;
|
|
846
|
+
try {
|
|
847
|
+
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
848
|
+
var i;
|
|
849
|
+
return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
|
|
850
|
+
}), this.update(s)) : this._$EU();
|
|
851
|
+
} catch (t) {
|
|
852
|
+
throw i = !1, this._$EU(), t;
|
|
853
|
+
}
|
|
854
|
+
i && this._$AE(s);
|
|
710
855
|
}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
856
|
+
willUpdate(t) {}
|
|
857
|
+
_$AE(t) {
|
|
858
|
+
var i;
|
|
859
|
+
null === (i = this._$Eg) || void 0 === i || i.forEach(t => {
|
|
860
|
+
var i;
|
|
861
|
+
return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
|
|
862
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
717
863
|
}
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
var s;
|
|
721
|
-
if ((t = null !== (s = P(this, t, i, 0)) && void 0 !== s ? s : w) === b) return;
|
|
722
|
-
const e = this._$AH,
|
|
723
|
-
o = t === w && e !== w || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
|
|
724
|
-
n = t !== w && (e === w || o);
|
|
725
|
-
o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
864
|
+
_$EU() {
|
|
865
|
+
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
726
866
|
}
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
var i, s;
|
|
730
|
-
"function" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);
|
|
867
|
+
get updateComplete() {
|
|
868
|
+
return this.getUpdateComplete();
|
|
731
869
|
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
class L {
|
|
736
|
-
constructor(t, i, s) {
|
|
737
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
870
|
+
getUpdateComplete() {
|
|
871
|
+
return this._$Ep;
|
|
738
872
|
}
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
return this._$AM._$AU;
|
|
873
|
+
shouldUpdate(t) {
|
|
874
|
+
return !0;
|
|
742
875
|
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
P(this, t);
|
|
876
|
+
update(t) {
|
|
877
|
+
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$ES(i, this[i], t)), this._$EC = void 0), this._$EU();
|
|
746
878
|
}
|
|
747
|
-
|
|
879
|
+
updated(t) {}
|
|
880
|
+
firstUpdated(t) {}
|
|
748
881
|
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
null ==
|
|
882
|
+
a.finalized = !0, a.elementProperties = new Map(), a.elementStyles = [], a.shadowRootOptions = {
|
|
883
|
+
mode: "open"
|
|
884
|
+
}, null == h || h({
|
|
885
|
+
ReactiveElement: a
|
|
886
|
+
}), (null !== (s$1 = globalThis.reactiveElementVersions) && void 0 !== s$1 ? s$1 : globalThis.reactiveElementVersions = []).push("1.3.1");
|
|
752
887
|
|
|
753
888
|
/**
|
|
754
889
|
* @license
|
|
755
890
|
* Copyright 2017 Google LLC
|
|
756
891
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
757
892
|
*/
|
|
758
|
-
|
|
759
893
|
var l$1, o;
|
|
760
|
-
|
|
761
|
-
class s extends a$1 {
|
|
894
|
+
class s extends a {
|
|
762
895
|
constructor() {
|
|
763
896
|
super(...arguments), this.renderOptions = {
|
|
764
897
|
host: this
|
|
765
|
-
}, this._$
|
|
898
|
+
}, this._$Do = void 0;
|
|
766
899
|
}
|
|
767
|
-
|
|
768
900
|
createRenderRoot() {
|
|
769
901
|
var t, e;
|
|
770
902
|
const i = super.createRenderRoot();
|
|
771
903
|
return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
|
|
772
904
|
}
|
|
773
|
-
|
|
774
905
|
update(t) {
|
|
775
906
|
const i = this.render();
|
|
776
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$
|
|
907
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(i, this.renderRoot, this.renderOptions);
|
|
777
908
|
}
|
|
778
|
-
|
|
779
909
|
connectedCallback() {
|
|
780
910
|
var t;
|
|
781
|
-
super.connectedCallback(), null === (t = this._$
|
|
911
|
+
super.connectedCallback(), null === (t = this._$Do) || void 0 === t || t.setConnected(!0);
|
|
782
912
|
}
|
|
783
|
-
|
|
784
913
|
disconnectedCallback() {
|
|
785
914
|
var t;
|
|
786
|
-
super.disconnectedCallback(), null === (t = this._$
|
|
915
|
+
super.disconnectedCallback(), null === (t = this._$Do) || void 0 === t || t.setConnected(!1);
|
|
787
916
|
}
|
|
788
|
-
|
|
789
917
|
render() {
|
|
790
|
-
return
|
|
918
|
+
return T;
|
|
791
919
|
}
|
|
792
|
-
|
|
793
920
|
}
|
|
794
|
-
|
|
795
921
|
s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
|
|
796
922
|
LitElement: s
|
|
797
923
|
});
|
|
@@ -799,29 +925,25 @@
|
|
|
799
925
|
null == n || n({
|
|
800
926
|
LitElement: s
|
|
801
927
|
});
|
|
802
|
-
(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.
|
|
928
|
+
(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.0");
|
|
803
929
|
|
|
804
930
|
var noop = {
|
|
805
931
|
value: () => {}
|
|
806
932
|
};
|
|
807
|
-
|
|
808
933
|
function dispatch() {
|
|
809
934
|
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
|
810
935
|
if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
|
|
811
936
|
_[t] = [];
|
|
812
937
|
}
|
|
813
|
-
|
|
814
938
|
return new Dispatch(_);
|
|
815
939
|
}
|
|
816
|
-
|
|
817
940
|
function Dispatch(_) {
|
|
818
941
|
this._ = _;
|
|
819
942
|
}
|
|
820
|
-
|
|
821
943
|
function parseTypenames$1(typenames, types) {
|
|
822
944
|
return typenames.trim().split(/^|\s+/).map(function (t) {
|
|
823
945
|
var name = "",
|
|
824
|
-
|
|
946
|
+
i = t.indexOf(".");
|
|
825
947
|
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
826
948
|
if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
827
949
|
return {
|
|
@@ -830,53 +952,45 @@
|
|
|
830
952
|
};
|
|
831
953
|
});
|
|
832
954
|
}
|
|
833
|
-
|
|
834
955
|
Dispatch.prototype = dispatch.prototype = {
|
|
835
956
|
constructor: Dispatch,
|
|
836
957
|
on: function (typename, callback) {
|
|
837
958
|
var _ = this._,
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
959
|
+
T = parseTypenames$1(typename + "", _),
|
|
960
|
+
t,
|
|
961
|
+
i = -1,
|
|
962
|
+
n = T.length;
|
|
842
963
|
|
|
964
|
+
// If no callback was specified, return the callback of the given type and name.
|
|
843
965
|
if (arguments.length < 2) {
|
|
844
966
|
while (++i < n) if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
|
|
845
|
-
|
|
846
967
|
return;
|
|
847
|
-
}
|
|
848
|
-
// Otherwise, if a null callback was specified, remove callbacks of the given name.
|
|
849
|
-
|
|
968
|
+
}
|
|
850
969
|
|
|
970
|
+
// If a type was specified, set the callback for the given type and name.
|
|
971
|
+
// Otherwise, if a null callback was specified, remove callbacks of the given name.
|
|
851
972
|
if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
|
|
852
|
-
|
|
853
973
|
while (++i < n) {
|
|
854
974
|
if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback);else if (callback == null) for (t in _) _[t] = set$1(_[t], typename.name, null);
|
|
855
975
|
}
|
|
856
|
-
|
|
857
976
|
return this;
|
|
858
977
|
},
|
|
859
978
|
copy: function () {
|
|
860
979
|
var copy = {},
|
|
861
|
-
|
|
862
|
-
|
|
980
|
+
_ = this._;
|
|
863
981
|
for (var t in _) copy[t] = _[t].slice();
|
|
864
|
-
|
|
865
982
|
return new Dispatch(copy);
|
|
866
983
|
},
|
|
867
984
|
call: function (type, that) {
|
|
868
985
|
if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
|
|
869
986
|
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
870
|
-
|
|
871
987
|
for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
872
988
|
},
|
|
873
989
|
apply: function (type, that, args) {
|
|
874
990
|
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
875
|
-
|
|
876
991
|
for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
877
992
|
}
|
|
878
993
|
};
|
|
879
|
-
|
|
880
994
|
function get$1(type, name) {
|
|
881
995
|
for (var i = 0, n = type.length, c; i < n; ++i) {
|
|
882
996
|
if ((c = type[i]).name === name) {
|
|
@@ -884,7 +998,6 @@
|
|
|
884
998
|
}
|
|
885
999
|
}
|
|
886
1000
|
}
|
|
887
|
-
|
|
888
1001
|
function set$1(type, name, callback) {
|
|
889
1002
|
for (var i = 0, n = type.length; i < n; ++i) {
|
|
890
1003
|
if (type[i].name === name) {
|
|
@@ -892,7 +1005,6 @@
|
|
|
892
1005
|
break;
|
|
893
1006
|
}
|
|
894
1007
|
}
|
|
895
|
-
|
|
896
1008
|
if (callback != null) type.push({
|
|
897
1009
|
name: name,
|
|
898
1010
|
value: callback
|
|
@@ -911,7 +1023,7 @@
|
|
|
911
1023
|
|
|
912
1024
|
function namespace (name) {
|
|
913
1025
|
var prefix = name += "",
|
|
914
|
-
|
|
1026
|
+
i = prefix.indexOf(":");
|
|
915
1027
|
if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
|
|
916
1028
|
return namespaces.hasOwnProperty(prefix) ? {
|
|
917
1029
|
space: namespaces[prefix],
|
|
@@ -922,24 +1034,21 @@
|
|
|
922
1034
|
function creatorInherit(name) {
|
|
923
1035
|
return function () {
|
|
924
1036
|
var document = this.ownerDocument,
|
|
925
|
-
|
|
1037
|
+
uri = this.namespaceURI;
|
|
926
1038
|
return uri === xhtml && document.documentElement.namespaceURI === xhtml ? document.createElement(name) : document.createElementNS(uri, name);
|
|
927
1039
|
};
|
|
928
1040
|
}
|
|
929
|
-
|
|
930
1041
|
function creatorFixed(fullname) {
|
|
931
1042
|
return function () {
|
|
932
1043
|
return this.ownerDocument.createElementNS(fullname.space, fullname.local);
|
|
933
1044
|
};
|
|
934
1045
|
}
|
|
935
|
-
|
|
936
1046
|
function creator (name) {
|
|
937
1047
|
var fullname = namespace(name);
|
|
938
1048
|
return (fullname.local ? creatorFixed : creatorInherit)(fullname);
|
|
939
1049
|
}
|
|
940
1050
|
|
|
941
1051
|
function none() {}
|
|
942
|
-
|
|
943
1052
|
function selector (selector) {
|
|
944
1053
|
return selector == null ? none : function () {
|
|
945
1054
|
return this.querySelector(selector);
|
|
@@ -948,7 +1057,6 @@
|
|
|
948
1057
|
|
|
949
1058
|
function selection_select (select) {
|
|
950
1059
|
if (typeof select !== "function") select = selector(select);
|
|
951
|
-
|
|
952
1060
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
953
1061
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
954
1062
|
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
@@ -957,7 +1065,6 @@
|
|
|
957
1065
|
}
|
|
958
1066
|
}
|
|
959
1067
|
}
|
|
960
|
-
|
|
961
1068
|
return new Selection$1(subgroups, this._parents);
|
|
962
1069
|
}
|
|
963
1070
|
|
|
@@ -974,7 +1081,6 @@
|
|
|
974
1081
|
function empty() {
|
|
975
1082
|
return [];
|
|
976
1083
|
}
|
|
977
|
-
|
|
978
1084
|
function selectorAll (selector) {
|
|
979
1085
|
return selector == null ? empty : function () {
|
|
980
1086
|
return this.querySelectorAll(selector);
|
|
@@ -986,10 +1092,8 @@
|
|
|
986
1092
|
return array(select.apply(this, arguments));
|
|
987
1093
|
};
|
|
988
1094
|
}
|
|
989
|
-
|
|
990
1095
|
function selection_selectAll (select) {
|
|
991
1096
|
if (typeof select === "function") select = arrayAll(select);else select = selectorAll(select);
|
|
992
|
-
|
|
993
1097
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
994
1098
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
995
1099
|
if (node = group[i]) {
|
|
@@ -998,7 +1102,6 @@
|
|
|
998
1102
|
}
|
|
999
1103
|
}
|
|
1000
1104
|
}
|
|
1001
|
-
|
|
1002
1105
|
return new Selection$1(subgroups, parents);
|
|
1003
1106
|
}
|
|
1004
1107
|
|
|
@@ -1014,40 +1117,33 @@
|
|
|
1014
1117
|
}
|
|
1015
1118
|
|
|
1016
1119
|
var find = Array.prototype.find;
|
|
1017
|
-
|
|
1018
1120
|
function childFind(match) {
|
|
1019
1121
|
return function () {
|
|
1020
1122
|
return find.call(this.children, match);
|
|
1021
1123
|
};
|
|
1022
1124
|
}
|
|
1023
|
-
|
|
1024
1125
|
function childFirst() {
|
|
1025
1126
|
return this.firstElementChild;
|
|
1026
1127
|
}
|
|
1027
|
-
|
|
1028
1128
|
function selection_selectChild (match) {
|
|
1029
1129
|
return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match)));
|
|
1030
1130
|
}
|
|
1031
1131
|
|
|
1032
1132
|
var filter = Array.prototype.filter;
|
|
1033
|
-
|
|
1034
1133
|
function children() {
|
|
1035
1134
|
return Array.from(this.children);
|
|
1036
1135
|
}
|
|
1037
|
-
|
|
1038
1136
|
function childrenFilter(match) {
|
|
1039
1137
|
return function () {
|
|
1040
1138
|
return filter.call(this.children, match);
|
|
1041
1139
|
};
|
|
1042
1140
|
}
|
|
1043
|
-
|
|
1044
1141
|
function selection_selectChildren (match) {
|
|
1045
1142
|
return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match)));
|
|
1046
1143
|
}
|
|
1047
1144
|
|
|
1048
1145
|
function selection_filter (match) {
|
|
1049
1146
|
if (typeof match !== "function") match = matcher(match);
|
|
1050
|
-
|
|
1051
1147
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
1052
1148
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
1053
1149
|
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
@@ -1055,7 +1151,6 @@
|
|
|
1055
1151
|
}
|
|
1056
1152
|
}
|
|
1057
1153
|
}
|
|
1058
|
-
|
|
1059
1154
|
return new Selection$1(subgroups, this._parents);
|
|
1060
1155
|
}
|
|
1061
1156
|
|
|
@@ -1097,12 +1192,13 @@
|
|
|
1097
1192
|
|
|
1098
1193
|
function bindIndex(parent, group, enter, update, exit, data) {
|
|
1099
1194
|
var i = 0,
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1195
|
+
node,
|
|
1196
|
+
groupLength = group.length,
|
|
1197
|
+
dataLength = data.length;
|
|
1198
|
+
|
|
1199
|
+
// Put any non-null nodes that fit into update.
|
|
1103
1200
|
// Put any null nodes into enter.
|
|
1104
1201
|
// Put any remaining data into enter.
|
|
1105
|
-
|
|
1106
1202
|
for (; i < dataLength; ++i) {
|
|
1107
1203
|
if (node = group[i]) {
|
|
1108
1204
|
node.__data__ = data[i];
|
|
@@ -1110,44 +1206,42 @@
|
|
|
1110
1206
|
} else {
|
|
1111
1207
|
enter[i] = new EnterNode(parent, data[i]);
|
|
1112
1208
|
}
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1209
|
+
}
|
|
1115
1210
|
|
|
1211
|
+
// Put any non-null nodes that don’t fit into exit.
|
|
1116
1212
|
for (; i < groupLength; ++i) {
|
|
1117
1213
|
if (node = group[i]) {
|
|
1118
1214
|
exit[i] = node;
|
|
1119
1215
|
}
|
|
1120
1216
|
}
|
|
1121
1217
|
}
|
|
1122
|
-
|
|
1123
1218
|
function bindKey(parent, group, enter, update, exit, data, key) {
|
|
1124
1219
|
var i,
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1220
|
+
node,
|
|
1221
|
+
nodeByKeyValue = new Map(),
|
|
1222
|
+
groupLength = group.length,
|
|
1223
|
+
dataLength = data.length,
|
|
1224
|
+
keyValues = new Array(groupLength),
|
|
1225
|
+
keyValue;
|
|
1226
|
+
|
|
1227
|
+
// Compute the key for each node.
|
|
1131
1228
|
// If multiple nodes have the same key, the duplicates are added to exit.
|
|
1132
|
-
|
|
1133
1229
|
for (i = 0; i < groupLength; ++i) {
|
|
1134
1230
|
if (node = group[i]) {
|
|
1135
1231
|
keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
|
|
1136
|
-
|
|
1137
1232
|
if (nodeByKeyValue.has(keyValue)) {
|
|
1138
1233
|
exit[i] = node;
|
|
1139
1234
|
} else {
|
|
1140
1235
|
nodeByKeyValue.set(keyValue, node);
|
|
1141
1236
|
}
|
|
1142
1237
|
}
|
|
1143
|
-
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
// Compute the key for each datum.
|
|
1144
1241
|
// If there a node associated with this key, join and add it to update.
|
|
1145
1242
|
// If there is not (or the key is a duplicate), add it to enter.
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
1243
|
for (i = 0; i < dataLength; ++i) {
|
|
1149
1244
|
keyValue = key.call(parent, data[i], i, data) + "";
|
|
1150
|
-
|
|
1151
1245
|
if (node = nodeByKeyValue.get(keyValue)) {
|
|
1152
1246
|
update[i] = node;
|
|
1153
1247
|
node.__data__ = data[i];
|
|
@@ -1155,62 +1249,58 @@
|
|
|
1155
1249
|
} else {
|
|
1156
1250
|
enter[i] = new EnterNode(parent, data[i]);
|
|
1157
1251
|
}
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1252
|
+
}
|
|
1160
1253
|
|
|
1254
|
+
// Add any remaining nodes that were not bound to data to exit.
|
|
1161
1255
|
for (i = 0; i < groupLength; ++i) {
|
|
1162
1256
|
if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
|
|
1163
1257
|
exit[i] = node;
|
|
1164
1258
|
}
|
|
1165
1259
|
}
|
|
1166
1260
|
}
|
|
1167
|
-
|
|
1168
1261
|
function datum(node) {
|
|
1169
1262
|
return node.__data__;
|
|
1170
1263
|
}
|
|
1171
|
-
|
|
1172
1264
|
function selection_data (value, key) {
|
|
1173
1265
|
if (!arguments.length) return Array.from(this, datum);
|
|
1174
1266
|
var bind = key ? bindKey : bindIndex,
|
|
1175
|
-
|
|
1176
|
-
|
|
1267
|
+
parents = this._parents,
|
|
1268
|
+
groups = this._groups;
|
|
1177
1269
|
if (typeof value !== "function") value = constant$1(value);
|
|
1178
|
-
|
|
1179
1270
|
for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
|
|
1180
1271
|
var parent = parents[j],
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
|
|
1272
|
+
group = groups[j],
|
|
1273
|
+
groupLength = group.length,
|
|
1274
|
+
data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),
|
|
1275
|
+
dataLength = data.length,
|
|
1276
|
+
enterGroup = enter[j] = new Array(dataLength),
|
|
1277
|
+
updateGroup = update[j] = new Array(dataLength),
|
|
1278
|
+
exitGroup = exit[j] = new Array(groupLength);
|
|
1279
|
+
bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
|
|
1280
|
+
|
|
1281
|
+
// Now connect the enter nodes to their following update node, such that
|
|
1189
1282
|
// appendChild can insert the materialized enter node before this node,
|
|
1190
1283
|
// rather than at the end of the parent node.
|
|
1191
|
-
|
|
1192
1284
|
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
|
|
1193
1285
|
if (previous = enterGroup[i0]) {
|
|
1194
1286
|
if (i0 >= i1) i1 = i0 + 1;
|
|
1195
|
-
|
|
1196
1287
|
while (!(next = updateGroup[i1]) && ++i1 < dataLength);
|
|
1197
|
-
|
|
1198
1288
|
previous._next = next || null;
|
|
1199
1289
|
}
|
|
1200
1290
|
}
|
|
1201
1291
|
}
|
|
1202
|
-
|
|
1203
1292
|
update = new Selection$1(update, parents);
|
|
1204
1293
|
update._enter = enter;
|
|
1205
1294
|
update._exit = exit;
|
|
1206
1295
|
return update;
|
|
1207
|
-
}
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
// Given some data, this returns an array-like view of it: an object that
|
|
1208
1299
|
// exposes a length property and allows numeric indexing. Note that unlike
|
|
1209
1300
|
// selectAll, this isn’t worried about “live” collections because the resulting
|
|
1210
1301
|
// array will only be used briefly while data is being bound. (It is possible to
|
|
1211
1302
|
// cause the data to change while iterating by using a key function, but please
|
|
1212
1303
|
// don’t; we’d rather avoid a gratuitous copy.)
|
|
1213
|
-
|
|
1214
1304
|
function arraylike(data) {
|
|
1215
1305
|
return typeof data === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
|
|
1216
1306
|
: Array.from(data); // Map, Set, iterable, string, or anything else
|
|
@@ -1222,28 +1312,24 @@
|
|
|
1222
1312
|
|
|
1223
1313
|
function selection_join (onenter, onupdate, onexit) {
|
|
1224
1314
|
var enter = this.enter(),
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1315
|
+
update = this,
|
|
1316
|
+
exit = this.exit();
|
|
1228
1317
|
if (typeof onenter === "function") {
|
|
1229
1318
|
enter = onenter(enter);
|
|
1230
1319
|
if (enter) enter = enter.selection();
|
|
1231
1320
|
} else {
|
|
1232
1321
|
enter = enter.append(onenter + "");
|
|
1233
1322
|
}
|
|
1234
|
-
|
|
1235
1323
|
if (onupdate != null) {
|
|
1236
1324
|
update = onupdate(update);
|
|
1237
1325
|
if (update) update = update.selection();
|
|
1238
1326
|
}
|
|
1239
|
-
|
|
1240
1327
|
if (onexit == null) exit.remove();else onexit(exit);
|
|
1241
1328
|
return enter && update ? enter.merge(update).order() : update;
|
|
1242
1329
|
}
|
|
1243
1330
|
|
|
1244
1331
|
function selection_merge (context) {
|
|
1245
1332
|
var selection = context.selection ? context.selection() : context;
|
|
1246
|
-
|
|
1247
1333
|
for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
|
|
1248
1334
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
1249
1335
|
if (node = group0[i] || group1[i]) {
|
|
@@ -1251,11 +1337,9 @@
|
|
|
1251
1337
|
}
|
|
1252
1338
|
}
|
|
1253
1339
|
}
|
|
1254
|
-
|
|
1255
1340
|
for (; j < m0; ++j) {
|
|
1256
1341
|
merges[j] = groups0[j];
|
|
1257
1342
|
}
|
|
1258
|
-
|
|
1259
1343
|
return new Selection$1(merges, this._parents);
|
|
1260
1344
|
}
|
|
1261
1345
|
|
|
@@ -1268,30 +1352,24 @@
|
|
|
1268
1352
|
}
|
|
1269
1353
|
}
|
|
1270
1354
|
}
|
|
1271
|
-
|
|
1272
1355
|
return this;
|
|
1273
1356
|
}
|
|
1274
1357
|
|
|
1275
1358
|
function selection_sort (compare) {
|
|
1276
1359
|
if (!compare) compare = ascending;
|
|
1277
|
-
|
|
1278
1360
|
function compareNode(a, b) {
|
|
1279
1361
|
return a && b ? compare(a.__data__, b.__data__) : !a - !b;
|
|
1280
1362
|
}
|
|
1281
|
-
|
|
1282
1363
|
for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
|
|
1283
1364
|
for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
1284
1365
|
if (node = group[i]) {
|
|
1285
1366
|
sortgroup[i] = node;
|
|
1286
1367
|
}
|
|
1287
1368
|
}
|
|
1288
|
-
|
|
1289
1369
|
sortgroup.sort(compareNode);
|
|
1290
1370
|
}
|
|
1291
|
-
|
|
1292
1371
|
return new Selection$1(sortgroups, this._parents).order();
|
|
1293
1372
|
}
|
|
1294
|
-
|
|
1295
1373
|
function ascending(a, b) {
|
|
1296
1374
|
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
1297
1375
|
}
|
|
@@ -1314,16 +1392,12 @@
|
|
|
1314
1392
|
if (node) return node;
|
|
1315
1393
|
}
|
|
1316
1394
|
}
|
|
1317
|
-
|
|
1318
1395
|
return null;
|
|
1319
1396
|
}
|
|
1320
1397
|
|
|
1321
1398
|
function selection_size () {
|
|
1322
1399
|
let size = 0;
|
|
1323
|
-
|
|
1324
1400
|
for (const node of this) ++size; // eslint-disable-line no-unused-vars
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
1401
|
return size;
|
|
1328
1402
|
}
|
|
1329
1403
|
|
|
@@ -1337,7 +1411,6 @@
|
|
|
1337
1411
|
if (node = group[i]) callback.call(node, node.__data__, i, group);
|
|
1338
1412
|
}
|
|
1339
1413
|
}
|
|
1340
|
-
|
|
1341
1414
|
return this;
|
|
1342
1415
|
}
|
|
1343
1416
|
|
|
@@ -1346,47 +1419,39 @@
|
|
|
1346
1419
|
this.removeAttribute(name);
|
|
1347
1420
|
};
|
|
1348
1421
|
}
|
|
1349
|
-
|
|
1350
1422
|
function attrRemoveNS$1(fullname) {
|
|
1351
1423
|
return function () {
|
|
1352
1424
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
1353
1425
|
};
|
|
1354
1426
|
}
|
|
1355
|
-
|
|
1356
1427
|
function attrConstant$1(name, value) {
|
|
1357
1428
|
return function () {
|
|
1358
1429
|
this.setAttribute(name, value);
|
|
1359
1430
|
};
|
|
1360
1431
|
}
|
|
1361
|
-
|
|
1362
1432
|
function attrConstantNS$1(fullname, value) {
|
|
1363
1433
|
return function () {
|
|
1364
1434
|
this.setAttributeNS(fullname.space, fullname.local, value);
|
|
1365
1435
|
};
|
|
1366
1436
|
}
|
|
1367
|
-
|
|
1368
1437
|
function attrFunction$1(name, value) {
|
|
1369
1438
|
return function () {
|
|
1370
1439
|
var v = value.apply(this, arguments);
|
|
1371
1440
|
if (v == null) this.removeAttribute(name);else this.setAttribute(name, v);
|
|
1372
1441
|
};
|
|
1373
1442
|
}
|
|
1374
|
-
|
|
1375
1443
|
function attrFunctionNS$1(fullname, value) {
|
|
1376
1444
|
return function () {
|
|
1377
1445
|
var v = value.apply(this, arguments);
|
|
1378
1446
|
if (v == null) this.removeAttributeNS(fullname.space, fullname.local);else this.setAttributeNS(fullname.space, fullname.local, v);
|
|
1379
1447
|
};
|
|
1380
1448
|
}
|
|
1381
|
-
|
|
1382
1449
|
function selection_attr (name, value) {
|
|
1383
1450
|
var fullname = namespace(name);
|
|
1384
|
-
|
|
1385
1451
|
if (arguments.length < 2) {
|
|
1386
1452
|
var node = this.node();
|
|
1387
1453
|
return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);
|
|
1388
1454
|
}
|
|
1389
|
-
|
|
1390
1455
|
return this.each((value == null ? fullname.local ? attrRemoveNS$1 : attrRemove$1 : typeof value === "function" ? fullname.local ? attrFunctionNS$1 : attrFunction$1 : fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, value));
|
|
1391
1456
|
}
|
|
1392
1457
|
|
|
@@ -1401,20 +1466,17 @@
|
|
|
1401
1466
|
this.style.removeProperty(name);
|
|
1402
1467
|
};
|
|
1403
1468
|
}
|
|
1404
|
-
|
|
1405
1469
|
function styleConstant$1(name, value, priority) {
|
|
1406
1470
|
return function () {
|
|
1407
1471
|
this.style.setProperty(name, value, priority);
|
|
1408
1472
|
};
|
|
1409
1473
|
}
|
|
1410
|
-
|
|
1411
1474
|
function styleFunction$1(name, value, priority) {
|
|
1412
1475
|
return function () {
|
|
1413
1476
|
var v = value.apply(this, arguments);
|
|
1414
1477
|
if (v == null) this.style.removeProperty(name);else this.style.setProperty(name, v, priority);
|
|
1415
1478
|
};
|
|
1416
1479
|
}
|
|
1417
|
-
|
|
1418
1480
|
function selection_style (name, value, priority) {
|
|
1419
1481
|
return arguments.length > 1 ? this.each((value == null ? styleRemove$1 : typeof value === "function" ? styleFunction$1 : styleConstant$1)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name);
|
|
1420
1482
|
}
|
|
@@ -1427,20 +1489,17 @@
|
|
|
1427
1489
|
delete this[name];
|
|
1428
1490
|
};
|
|
1429
1491
|
}
|
|
1430
|
-
|
|
1431
1492
|
function propertyConstant(name, value) {
|
|
1432
1493
|
return function () {
|
|
1433
1494
|
this[name] = value;
|
|
1434
1495
|
};
|
|
1435
1496
|
}
|
|
1436
|
-
|
|
1437
1497
|
function propertyFunction(name, value) {
|
|
1438
1498
|
return function () {
|
|
1439
1499
|
var v = value.apply(this, arguments);
|
|
1440
1500
|
if (v == null) delete this[name];else this[name] = v;
|
|
1441
1501
|
};
|
|
1442
1502
|
}
|
|
1443
|
-
|
|
1444
1503
|
function selection_property (name, value) {
|
|
1445
1504
|
return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];
|
|
1446
1505
|
}
|
|
@@ -1448,32 +1507,25 @@
|
|
|
1448
1507
|
function classArray(string) {
|
|
1449
1508
|
return string.trim().split(/^|\s+/);
|
|
1450
1509
|
}
|
|
1451
|
-
|
|
1452
1510
|
function classList(node) {
|
|
1453
1511
|
return node.classList || new ClassList(node);
|
|
1454
1512
|
}
|
|
1455
|
-
|
|
1456
1513
|
function ClassList(node) {
|
|
1457
1514
|
this._node = node;
|
|
1458
1515
|
this._names = classArray(node.getAttribute("class") || "");
|
|
1459
1516
|
}
|
|
1460
|
-
|
|
1461
1517
|
ClassList.prototype = {
|
|
1462
1518
|
add: function (name) {
|
|
1463
1519
|
var i = this._names.indexOf(name);
|
|
1464
|
-
|
|
1465
1520
|
if (i < 0) {
|
|
1466
1521
|
this._names.push(name);
|
|
1467
|
-
|
|
1468
1522
|
this._node.setAttribute("class", this._names.join(" "));
|
|
1469
1523
|
}
|
|
1470
1524
|
},
|
|
1471
1525
|
remove: function (name) {
|
|
1472
1526
|
var i = this._names.indexOf(name);
|
|
1473
|
-
|
|
1474
1527
|
if (i >= 0) {
|
|
1475
1528
|
this._names.splice(i, 1);
|
|
1476
|
-
|
|
1477
1529
|
this._node.setAttribute("class", this._names.join(" "));
|
|
1478
1530
|
}
|
|
1479
1531
|
},
|
|
@@ -1481,74 +1533,59 @@
|
|
|
1481
1533
|
return this._names.indexOf(name) >= 0;
|
|
1482
1534
|
}
|
|
1483
1535
|
};
|
|
1484
|
-
|
|
1485
1536
|
function classedAdd(node, names) {
|
|
1486
1537
|
var list = classList(node),
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1538
|
+
i = -1,
|
|
1539
|
+
n = names.length;
|
|
1490
1540
|
while (++i < n) list.add(names[i]);
|
|
1491
1541
|
}
|
|
1492
|
-
|
|
1493
1542
|
function classedRemove(node, names) {
|
|
1494
1543
|
var list = classList(node),
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1544
|
+
i = -1,
|
|
1545
|
+
n = names.length;
|
|
1498
1546
|
while (++i < n) list.remove(names[i]);
|
|
1499
1547
|
}
|
|
1500
|
-
|
|
1501
1548
|
function classedTrue(names) {
|
|
1502
1549
|
return function () {
|
|
1503
1550
|
classedAdd(this, names);
|
|
1504
1551
|
};
|
|
1505
1552
|
}
|
|
1506
|
-
|
|
1507
1553
|
function classedFalse(names) {
|
|
1508
1554
|
return function () {
|
|
1509
1555
|
classedRemove(this, names);
|
|
1510
1556
|
};
|
|
1511
1557
|
}
|
|
1512
|
-
|
|
1513
1558
|
function classedFunction(names, value) {
|
|
1514
1559
|
return function () {
|
|
1515
1560
|
(value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
|
|
1516
1561
|
};
|
|
1517
1562
|
}
|
|
1518
|
-
|
|
1519
1563
|
function selection_classed (name, value) {
|
|
1520
1564
|
var names = classArray(name + "");
|
|
1521
|
-
|
|
1522
1565
|
if (arguments.length < 2) {
|
|
1523
1566
|
var list = classList(this.node()),
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1567
|
+
i = -1,
|
|
1568
|
+
n = names.length;
|
|
1527
1569
|
while (++i < n) if (!list.contains(names[i])) return false;
|
|
1528
|
-
|
|
1529
1570
|
return true;
|
|
1530
1571
|
}
|
|
1531
|
-
|
|
1532
1572
|
return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
|
|
1533
1573
|
}
|
|
1534
1574
|
|
|
1535
1575
|
function textRemove() {
|
|
1536
1576
|
this.textContent = "";
|
|
1537
1577
|
}
|
|
1538
|
-
|
|
1539
1578
|
function textConstant$1(value) {
|
|
1540
1579
|
return function () {
|
|
1541
1580
|
this.textContent = value;
|
|
1542
1581
|
};
|
|
1543
1582
|
}
|
|
1544
|
-
|
|
1545
1583
|
function textFunction$1(value) {
|
|
1546
1584
|
return function () {
|
|
1547
1585
|
var v = value.apply(this, arguments);
|
|
1548
1586
|
this.textContent = v == null ? "" : v;
|
|
1549
1587
|
};
|
|
1550
1588
|
}
|
|
1551
|
-
|
|
1552
1589
|
function selection_text (value) {
|
|
1553
1590
|
return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction$1 : textConstant$1)(value)) : this.node().textContent;
|
|
1554
1591
|
}
|
|
@@ -1556,20 +1593,17 @@
|
|
|
1556
1593
|
function htmlRemove() {
|
|
1557
1594
|
this.innerHTML = "";
|
|
1558
1595
|
}
|
|
1559
|
-
|
|
1560
1596
|
function htmlConstant(value) {
|
|
1561
1597
|
return function () {
|
|
1562
1598
|
this.innerHTML = value;
|
|
1563
1599
|
};
|
|
1564
1600
|
}
|
|
1565
|
-
|
|
1566
1601
|
function htmlFunction(value) {
|
|
1567
1602
|
return function () {
|
|
1568
1603
|
var v = value.apply(this, arguments);
|
|
1569
1604
|
this.innerHTML = v == null ? "" : v;
|
|
1570
1605
|
};
|
|
1571
1606
|
}
|
|
1572
|
-
|
|
1573
1607
|
function selection_html (value) {
|
|
1574
1608
|
return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;
|
|
1575
1609
|
}
|
|
@@ -1577,7 +1611,6 @@
|
|
|
1577
1611
|
function raise() {
|
|
1578
1612
|
if (this.nextSibling) this.parentNode.appendChild(this);
|
|
1579
1613
|
}
|
|
1580
|
-
|
|
1581
1614
|
function selection_raise () {
|
|
1582
1615
|
return this.each(raise);
|
|
1583
1616
|
}
|
|
@@ -1585,7 +1618,6 @@
|
|
|
1585
1618
|
function lower() {
|
|
1586
1619
|
if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
1587
1620
|
}
|
|
1588
|
-
|
|
1589
1621
|
function selection_lower () {
|
|
1590
1622
|
return this.each(lower);
|
|
1591
1623
|
}
|
|
@@ -1600,10 +1632,9 @@
|
|
|
1600
1632
|
function constantNull() {
|
|
1601
1633
|
return null;
|
|
1602
1634
|
}
|
|
1603
|
-
|
|
1604
1635
|
function selection_insert (name, before) {
|
|
1605
1636
|
var create = typeof name === "function" ? name : creator(name),
|
|
1606
|
-
|
|
1637
|
+
select = before == null ? constantNull : typeof before === "function" ? before : selector(before);
|
|
1607
1638
|
return this.select(function () {
|
|
1608
1639
|
return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
|
|
1609
1640
|
});
|
|
@@ -1613,23 +1644,20 @@
|
|
|
1613
1644
|
var parent = this.parentNode;
|
|
1614
1645
|
if (parent) parent.removeChild(this);
|
|
1615
1646
|
}
|
|
1616
|
-
|
|
1617
1647
|
function selection_remove () {
|
|
1618
1648
|
return this.each(remove);
|
|
1619
1649
|
}
|
|
1620
1650
|
|
|
1621
1651
|
function selection_cloneShallow() {
|
|
1622
1652
|
var clone = this.cloneNode(false),
|
|
1623
|
-
|
|
1653
|
+
parent = this.parentNode;
|
|
1624
1654
|
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
1625
1655
|
}
|
|
1626
|
-
|
|
1627
1656
|
function selection_cloneDeep() {
|
|
1628
1657
|
var clone = this.cloneNode(true),
|
|
1629
|
-
|
|
1658
|
+
parent = this.parentNode;
|
|
1630
1659
|
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
1631
1660
|
}
|
|
1632
|
-
|
|
1633
1661
|
function selection_clone (deep) {
|
|
1634
1662
|
return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
|
|
1635
1663
|
}
|
|
@@ -1643,11 +1671,10 @@
|
|
|
1643
1671
|
listener.call(this, event, this.__data__);
|
|
1644
1672
|
};
|
|
1645
1673
|
}
|
|
1646
|
-
|
|
1647
1674
|
function parseTypenames(typenames) {
|
|
1648
1675
|
return typenames.trim().split(/^|\s+/).map(function (t) {
|
|
1649
1676
|
var name = "",
|
|
1650
|
-
|
|
1677
|
+
i = t.indexOf(".");
|
|
1651
1678
|
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
1652
1679
|
return {
|
|
1653
1680
|
type: t,
|
|
@@ -1655,12 +1682,10 @@
|
|
|
1655
1682
|
};
|
|
1656
1683
|
});
|
|
1657
1684
|
}
|
|
1658
|
-
|
|
1659
1685
|
function onRemove(typename) {
|
|
1660
1686
|
return function () {
|
|
1661
1687
|
var on = this.__on;
|
|
1662
1688
|
if (!on) return;
|
|
1663
|
-
|
|
1664
1689
|
for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
|
|
1665
1690
|
if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
|
|
1666
1691
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
@@ -1668,16 +1693,14 @@
|
|
|
1668
1693
|
on[++i] = o;
|
|
1669
1694
|
}
|
|
1670
1695
|
}
|
|
1671
|
-
|
|
1672
1696
|
if (++i) on.length = i;else delete this.__on;
|
|
1673
1697
|
};
|
|
1674
1698
|
}
|
|
1675
|
-
|
|
1676
1699
|
function onAdd(typename, value, options) {
|
|
1677
1700
|
return function () {
|
|
1678
1701
|
var on = this.__on,
|
|
1679
|
-
|
|
1680
|
-
|
|
1702
|
+
o,
|
|
1703
|
+
listener = contextListener(value);
|
|
1681
1704
|
if (on) for (var j = 0, m = on.length; j < m; ++j) {
|
|
1682
1705
|
if ((o = on[j]).type === typename.type && o.name === typename.name) {
|
|
1683
1706
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
@@ -1697,16 +1720,13 @@
|
|
|
1697
1720
|
if (!on) this.__on = [o];else on.push(o);
|
|
1698
1721
|
};
|
|
1699
1722
|
}
|
|
1700
|
-
|
|
1701
1723
|
function selection_on (typename, value, options) {
|
|
1702
1724
|
var typenames = parseTypenames(typename + ""),
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1725
|
+
i,
|
|
1726
|
+
n = typenames.length,
|
|
1727
|
+
t;
|
|
1707
1728
|
if (arguments.length < 2) {
|
|
1708
1729
|
var on = this.node().__on;
|
|
1709
|
-
|
|
1710
1730
|
if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
|
|
1711
1731
|
for (i = 0, o = on[j]; i < n; ++i) {
|
|
1712
1732
|
if ((t = typenames[i]).type === o.type && t.name === o.name) {
|
|
@@ -1716,40 +1736,32 @@
|
|
|
1716
1736
|
}
|
|
1717
1737
|
return;
|
|
1718
1738
|
}
|
|
1719
|
-
|
|
1720
1739
|
on = value ? onAdd : onRemove;
|
|
1721
|
-
|
|
1722
1740
|
for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
|
|
1723
|
-
|
|
1724
1741
|
return this;
|
|
1725
1742
|
}
|
|
1726
1743
|
|
|
1727
1744
|
function dispatchEvent(node, type, params) {
|
|
1728
1745
|
var window = defaultView(node),
|
|
1729
|
-
|
|
1730
|
-
|
|
1746
|
+
event = window.CustomEvent;
|
|
1731
1747
|
if (typeof event === "function") {
|
|
1732
1748
|
event = new event(type, params);
|
|
1733
1749
|
} else {
|
|
1734
1750
|
event = window.document.createEvent("Event");
|
|
1735
1751
|
if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;else event.initEvent(type, false, false);
|
|
1736
1752
|
}
|
|
1737
|
-
|
|
1738
1753
|
node.dispatchEvent(event);
|
|
1739
1754
|
}
|
|
1740
|
-
|
|
1741
1755
|
function dispatchConstant(type, params) {
|
|
1742
1756
|
return function () {
|
|
1743
1757
|
return dispatchEvent(this, type, params);
|
|
1744
1758
|
};
|
|
1745
1759
|
}
|
|
1746
|
-
|
|
1747
1760
|
function dispatchFunction(type, params) {
|
|
1748
1761
|
return function () {
|
|
1749
1762
|
return dispatchEvent(this, type, params.apply(this, arguments));
|
|
1750
1763
|
};
|
|
1751
1764
|
}
|
|
1752
|
-
|
|
1753
1765
|
function selection_dispatch (type, params) {
|
|
1754
1766
|
return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params));
|
|
1755
1767
|
}
|
|
@@ -1767,15 +1779,12 @@
|
|
|
1767
1779
|
this._groups = groups;
|
|
1768
1780
|
this._parents = parents;
|
|
1769
1781
|
}
|
|
1770
|
-
|
|
1771
1782
|
function selection() {
|
|
1772
1783
|
return new Selection$1([[document.documentElement]], root);
|
|
1773
1784
|
}
|
|
1774
|
-
|
|
1775
1785
|
function selection_selection() {
|
|
1776
1786
|
return this;
|
|
1777
1787
|
}
|
|
1778
|
-
|
|
1779
1788
|
Selection$1.prototype = selection.prototype = {
|
|
1780
1789
|
constructor: Selection$1,
|
|
1781
1790
|
select: selection_select,
|
|
@@ -1825,9 +1834,7 @@
|
|
|
1825
1834
|
}
|
|
1826
1835
|
function extend(parent, definition) {
|
|
1827
1836
|
var prototype = Object.create(parent.prototype);
|
|
1828
|
-
|
|
1829
1837
|
for (var key in definition) prototype[key] = definition[key];
|
|
1830
|
-
|
|
1831
1838
|
return prototype;
|
|
1832
1839
|
}
|
|
1833
1840
|
|
|
@@ -1835,15 +1842,15 @@
|
|
|
1835
1842
|
var darker = 0.7;
|
|
1836
1843
|
var brighter = 1 / darker;
|
|
1837
1844
|
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1845
|
+
reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
1846
|
+
reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
1847
|
+
reHex = /^#([0-9a-f]{3,8})$/,
|
|
1848
|
+
reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
|
|
1849
|
+
reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
|
|
1850
|
+
reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
|
|
1851
|
+
reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
|
|
1852
|
+
reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
|
|
1853
|
+
reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
|
|
1847
1854
|
var named = {
|
|
1848
1855
|
aliceblue: 0xf0f8ff,
|
|
1849
1856
|
antiquewhite: 0xfaebd7,
|
|
@@ -2008,19 +2015,15 @@
|
|
|
2008
2015
|
formatRgb: color_formatRgb,
|
|
2009
2016
|
toString: color_formatRgb
|
|
2010
2017
|
});
|
|
2011
|
-
|
|
2012
2018
|
function color_formatHex() {
|
|
2013
2019
|
return this.rgb().formatHex();
|
|
2014
2020
|
}
|
|
2015
|
-
|
|
2016
2021
|
function color_formatHsl() {
|
|
2017
2022
|
return hslConvert(this).formatHsl();
|
|
2018
2023
|
}
|
|
2019
|
-
|
|
2020
2024
|
function color_formatRgb() {
|
|
2021
2025
|
return this.rgb().formatRgb();
|
|
2022
2026
|
}
|
|
2023
|
-
|
|
2024
2027
|
function color(format) {
|
|
2025
2028
|
var m, l;
|
|
2026
2029
|
format = (format + "").trim().toLowerCase();
|
|
@@ -2038,16 +2041,13 @@
|
|
|
2038
2041
|
: named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
|
|
2039
2042
|
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
|
|
2040
2043
|
}
|
|
2041
|
-
|
|
2042
2044
|
function rgbn(n) {
|
|
2043
2045
|
return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
2044
2046
|
}
|
|
2045
|
-
|
|
2046
2047
|
function rgba(r, g, b, a) {
|
|
2047
2048
|
if (a <= 0) r = g = b = NaN;
|
|
2048
2049
|
return new Rgb(r, g, b, a);
|
|
2049
2050
|
}
|
|
2050
|
-
|
|
2051
2051
|
function rgbConvert(o) {
|
|
2052
2052
|
if (!(o instanceof Color)) o = color(o);
|
|
2053
2053
|
if (!o) return new Rgb();
|
|
@@ -2084,27 +2084,22 @@
|
|
|
2084
2084
|
formatRgb: rgb_formatRgb,
|
|
2085
2085
|
toString: rgb_formatRgb
|
|
2086
2086
|
}));
|
|
2087
|
-
|
|
2088
2087
|
function rgb_formatHex() {
|
|
2089
2088
|
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
|
2090
2089
|
}
|
|
2091
|
-
|
|
2092
2090
|
function rgb_formatRgb() {
|
|
2093
2091
|
var a = this.opacity;
|
|
2094
2092
|
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
2095
2093
|
return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")");
|
|
2096
2094
|
}
|
|
2097
|
-
|
|
2098
2095
|
function hex(value) {
|
|
2099
2096
|
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
2100
2097
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
2101
2098
|
}
|
|
2102
|
-
|
|
2103
2099
|
function hsla(h, s, l, a) {
|
|
2104
2100
|
if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN;
|
|
2105
2101
|
return new Hsl(h, s, l, a);
|
|
2106
2102
|
}
|
|
2107
|
-
|
|
2108
2103
|
function hslConvert(o) {
|
|
2109
2104
|
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
2110
2105
|
if (!(o instanceof Color)) o = color(o);
|
|
@@ -2112,14 +2107,13 @@
|
|
|
2112
2107
|
if (o instanceof Hsl) return o;
|
|
2113
2108
|
o = o.rgb();
|
|
2114
2109
|
var r = o.r / 255,
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2110
|
+
g = o.g / 255,
|
|
2111
|
+
b = o.b / 255,
|
|
2112
|
+
min = Math.min(r, g, b),
|
|
2113
|
+
max = Math.max(r, g, b),
|
|
2114
|
+
h = NaN,
|
|
2115
|
+
s = max - min,
|
|
2116
|
+
l = (max + min) / 2;
|
|
2123
2117
|
if (s) {
|
|
2124
2118
|
if (r === max) h = (g - b) / s + (g < b) * 6;else if (g === max) h = (b - r) / s + 2;else h = (r - g) / s + 4;
|
|
2125
2119
|
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
@@ -2127,20 +2121,17 @@
|
|
|
2127
2121
|
} else {
|
|
2128
2122
|
s = l > 0 && l < 1 ? 0 : h;
|
|
2129
2123
|
}
|
|
2130
|
-
|
|
2131
2124
|
return new Hsl(h, s, l, o.opacity);
|
|
2132
2125
|
}
|
|
2133
2126
|
function hsl(h, s, l, opacity) {
|
|
2134
2127
|
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
2135
2128
|
}
|
|
2136
|
-
|
|
2137
2129
|
function Hsl(h, s, l, opacity) {
|
|
2138
2130
|
this.h = +h;
|
|
2139
2131
|
this.s = +s;
|
|
2140
2132
|
this.l = +l;
|
|
2141
2133
|
this.opacity = +opacity;
|
|
2142
2134
|
}
|
|
2143
|
-
|
|
2144
2135
|
define(Hsl, hsl, extend(Color, {
|
|
2145
2136
|
brighter: function (k) {
|
|
2146
2137
|
k = k == null ? brighter : Math.pow(brighter, k);
|
|
@@ -2152,10 +2143,10 @@
|
|
|
2152
2143
|
},
|
|
2153
2144
|
rgb: function () {
|
|
2154
2145
|
var h = this.h % 360 + (this.h < 0) * 360,
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2146
|
+
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
2147
|
+
l = this.l,
|
|
2148
|
+
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
2149
|
+
m1 = 2 * l - m2;
|
|
2159
2150
|
return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
|
2160
2151
|
},
|
|
2161
2152
|
displayable: function () {
|
|
@@ -2167,8 +2158,8 @@
|
|
|
2167
2158
|
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
|
2168
2159
|
}
|
|
2169
2160
|
}));
|
|
2170
|
-
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
2171
2161
|
|
|
2162
|
+
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
2172
2163
|
function hsl2rgb(h, m1, m2) {
|
|
2173
2164
|
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
|
2174
2165
|
}
|
|
@@ -2180,7 +2171,6 @@
|
|
|
2180
2171
|
return a + t * d;
|
|
2181
2172
|
};
|
|
2182
2173
|
}
|
|
2183
|
-
|
|
2184
2174
|
function exponential(a, b, y) {
|
|
2185
2175
|
return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) {
|
|
2186
2176
|
return Math.pow(a + t * b, y);
|
|
@@ -2198,12 +2188,11 @@
|
|
|
2198
2188
|
|
|
2199
2189
|
var interpolateRgb = (function rgbGamma(y) {
|
|
2200
2190
|
var color = gamma(y);
|
|
2201
|
-
|
|
2202
2191
|
function rgb$1(start, end) {
|
|
2203
2192
|
var r = color((start = rgb(start)).r, (end = rgb(end)).r),
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2193
|
+
g = color(start.g, end.g),
|
|
2194
|
+
b = color(start.b, end.b),
|
|
2195
|
+
opacity = nogamma(start.opacity, end.opacity);
|
|
2207
2196
|
return function (t) {
|
|
2208
2197
|
start.r = r(t);
|
|
2209
2198
|
start.g = g(t);
|
|
@@ -2212,7 +2201,6 @@
|
|
|
2212
2201
|
return start + "";
|
|
2213
2202
|
};
|
|
2214
2203
|
}
|
|
2215
|
-
|
|
2216
2204
|
rgb$1.gamma = rgbGamma;
|
|
2217
2205
|
return rgb$1;
|
|
2218
2206
|
})(1);
|
|
@@ -2224,38 +2212,36 @@
|
|
|
2224
2212
|
}
|
|
2225
2213
|
|
|
2226
2214
|
var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
|
|
2227
|
-
|
|
2228
|
-
|
|
2215
|
+
reB = new RegExp(reA.source, "g");
|
|
2229
2216
|
function zero(b) {
|
|
2230
2217
|
return function () {
|
|
2231
2218
|
return b;
|
|
2232
2219
|
};
|
|
2233
2220
|
}
|
|
2234
|
-
|
|
2235
2221
|
function one(b) {
|
|
2236
2222
|
return function (t) {
|
|
2237
2223
|
return b(t) + "";
|
|
2238
2224
|
};
|
|
2239
2225
|
}
|
|
2240
|
-
|
|
2241
2226
|
function interpolateString (a, b) {
|
|
2242
2227
|
var bi = reA.lastIndex = reB.lastIndex = 0,
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
// Coerce inputs to strings.
|
|
2228
|
+
// scan index for next number in b
|
|
2229
|
+
am,
|
|
2230
|
+
// current match in a
|
|
2231
|
+
bm,
|
|
2232
|
+
// current match in b
|
|
2233
|
+
bs,
|
|
2234
|
+
// string preceding current number in b, if any
|
|
2235
|
+
i = -1,
|
|
2236
|
+
// index in s
|
|
2237
|
+
s = [],
|
|
2238
|
+
// string constants and placeholders
|
|
2239
|
+
q = []; // number interpolators
|
|
2256
2240
|
|
|
2257
|
-
|
|
2241
|
+
// Coerce inputs to strings.
|
|
2242
|
+
a = a + "", b = b + "";
|
|
2258
2243
|
|
|
2244
|
+
// Interpolate pairs of numbers in a & b.
|
|
2259
2245
|
while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
|
|
2260
2246
|
if ((bs = bm.index) > bi) {
|
|
2261
2247
|
// a string precedes the next number in b
|
|
@@ -2263,7 +2249,6 @@
|
|
|
2263
2249
|
if (s[i]) s[i] += bs; // coalesce with previous string
|
|
2264
2250
|
else s[++i] = bs;
|
|
2265
2251
|
}
|
|
2266
|
-
|
|
2267
2252
|
if ((am = am[0]) === (bm = bm[0])) {
|
|
2268
2253
|
// numbers in a & b match
|
|
2269
2254
|
if (s[i]) s[i] += bm; // coalesce with previous string
|
|
@@ -2276,22 +2261,20 @@
|
|
|
2276
2261
|
x: interpolateNumber(am, bm)
|
|
2277
2262
|
});
|
|
2278
2263
|
}
|
|
2279
|
-
|
|
2280
2264
|
bi = reB.lastIndex;
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2265
|
+
}
|
|
2283
2266
|
|
|
2267
|
+
// Add remains of b.
|
|
2284
2268
|
if (bi < b.length) {
|
|
2285
2269
|
bs = b.slice(bi);
|
|
2286
2270
|
if (s[i]) s[i] += bs; // coalesce with previous string
|
|
2287
2271
|
else s[++i] = bs;
|
|
2288
|
-
}
|
|
2289
|
-
// Otherwise, interpolate each of the numbers and rejoin the string.
|
|
2290
|
-
|
|
2272
|
+
}
|
|
2291
2273
|
|
|
2274
|
+
// Special optimization for only a single match.
|
|
2275
|
+
// Otherwise, interpolate each of the numbers and rejoin the string.
|
|
2292
2276
|
return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {
|
|
2293
2277
|
for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
|
|
2294
|
-
|
|
2295
2278
|
return s.join("");
|
|
2296
2279
|
});
|
|
2297
2280
|
}
|
|
@@ -2322,8 +2305,8 @@
|
|
|
2322
2305
|
}
|
|
2323
2306
|
|
|
2324
2307
|
var svgNode;
|
|
2325
|
-
/* eslint-disable no-undef */
|
|
2326
2308
|
|
|
2309
|
+
/* eslint-disable no-undef */
|
|
2327
2310
|
function parseCss(value) {
|
|
2328
2311
|
const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
|
|
2329
2312
|
return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
|
|
@@ -2341,7 +2324,6 @@
|
|
|
2341
2324
|
function pop(s) {
|
|
2342
2325
|
return s.length ? s.pop() + " " : "";
|
|
2343
2326
|
}
|
|
2344
|
-
|
|
2345
2327
|
function translate(xa, ya, xb, yb, s, q) {
|
|
2346
2328
|
if (xa !== xb || ya !== yb) {
|
|
2347
2329
|
var i = s.push("translate(", null, pxComma, null, pxParen);
|
|
@@ -2356,11 +2338,9 @@
|
|
|
2356
2338
|
s.push("translate(" + xb + pxComma + yb + pxParen);
|
|
2357
2339
|
}
|
|
2358
2340
|
}
|
|
2359
|
-
|
|
2360
2341
|
function rotate(a, b, s, q) {
|
|
2361
2342
|
if (a !== b) {
|
|
2362
2343
|
if (a - b > 180) b += 360;else if (b - a > 180) a += 360; // shortest path
|
|
2363
|
-
|
|
2364
2344
|
q.push({
|
|
2365
2345
|
i: s.push(pop(s) + "rotate(", null, degParen) - 2,
|
|
2366
2346
|
x: interpolateNumber(a, b)
|
|
@@ -2369,7 +2349,6 @@
|
|
|
2369
2349
|
s.push(pop(s) + "rotate(" + b + degParen);
|
|
2370
2350
|
}
|
|
2371
2351
|
}
|
|
2372
|
-
|
|
2373
2352
|
function skewX(a, b, s, q) {
|
|
2374
2353
|
if (a !== b) {
|
|
2375
2354
|
q.push({
|
|
@@ -2380,7 +2359,6 @@
|
|
|
2380
2359
|
s.push(pop(s) + "skewX(" + b + degParen);
|
|
2381
2360
|
}
|
|
2382
2361
|
}
|
|
2383
|
-
|
|
2384
2362
|
function scale(xa, ya, xb, yb, s, q) {
|
|
2385
2363
|
if (xa !== xb || ya !== yb) {
|
|
2386
2364
|
var i = s.push(pop(s) + "scale(", null, ",", null, ")");
|
|
@@ -2395,59 +2373,51 @@
|
|
|
2395
2373
|
s.push(pop(s) + "scale(" + xb + "," + yb + ")");
|
|
2396
2374
|
}
|
|
2397
2375
|
}
|
|
2398
|
-
|
|
2399
2376
|
return function (a, b) {
|
|
2400
2377
|
var s = [],
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2378
|
+
// string constants and placeholders
|
|
2379
|
+
q = []; // number interpolators
|
|
2404
2380
|
a = parse(a), b = parse(b);
|
|
2405
2381
|
translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
|
|
2406
2382
|
rotate(a.rotate, b.rotate, s, q);
|
|
2407
2383
|
skewX(a.skewX, b.skewX, s, q);
|
|
2408
2384
|
scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
|
|
2409
2385
|
a = b = null; // gc
|
|
2410
|
-
|
|
2411
2386
|
return function (t) {
|
|
2412
2387
|
var i = -1,
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2388
|
+
n = q.length,
|
|
2389
|
+
o;
|
|
2416
2390
|
while (++i < n) s[(o = q[i]).i] = o.x(t);
|
|
2417
|
-
|
|
2418
2391
|
return s.join("");
|
|
2419
2392
|
};
|
|
2420
2393
|
};
|
|
2421
2394
|
}
|
|
2422
|
-
|
|
2423
2395
|
var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
|
|
2424
2396
|
var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
|
|
2425
2397
|
|
|
2426
2398
|
var frame = 0,
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2399
|
+
// is an animation frame pending?
|
|
2400
|
+
timeout$1 = 0,
|
|
2401
|
+
// is a timeout pending?
|
|
2402
|
+
interval = 0,
|
|
2403
|
+
// are any timers active?
|
|
2404
|
+
pokeDelay = 1000,
|
|
2405
|
+
// how frequently we check for clock skew
|
|
2406
|
+
taskHead,
|
|
2407
|
+
taskTail,
|
|
2408
|
+
clockLast = 0,
|
|
2409
|
+
clockNow = 0,
|
|
2410
|
+
clockSkew = 0,
|
|
2411
|
+
clock = typeof performance === "object" && performance.now ? performance : Date,
|
|
2412
|
+
setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
|
|
2413
|
+
setTimeout(f, 17);
|
|
2414
|
+
};
|
|
2443
2415
|
function now() {
|
|
2444
2416
|
return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
|
|
2445
2417
|
}
|
|
2446
|
-
|
|
2447
2418
|
function clearNow() {
|
|
2448
2419
|
clockNow = 0;
|
|
2449
2420
|
}
|
|
2450
|
-
|
|
2451
2421
|
function Timer() {
|
|
2452
2422
|
this._call = this._time = this._next = null;
|
|
2453
2423
|
}
|
|
@@ -2456,12 +2426,10 @@
|
|
|
2456
2426
|
restart: function (callback, delay, time) {
|
|
2457
2427
|
if (typeof callback !== "function") throw new TypeError("callback is not a function");
|
|
2458
2428
|
time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
|
|
2459
|
-
|
|
2460
2429
|
if (!this._next && taskTail !== this) {
|
|
2461
2430
|
if (taskTail) taskTail._next = this;else taskHead = this;
|
|
2462
2431
|
taskTail = this;
|
|
2463
2432
|
}
|
|
2464
|
-
|
|
2465
2433
|
this._call = callback;
|
|
2466
2434
|
this._time = time;
|
|
2467
2435
|
sleep();
|
|
@@ -2481,24 +2449,18 @@
|
|
|
2481
2449
|
}
|
|
2482
2450
|
function timerFlush() {
|
|
2483
2451
|
now(); // Get the current time, if not already set.
|
|
2484
|
-
|
|
2485
2452
|
++frame; // Pretend we’ve set an alarm, if we haven’t already.
|
|
2486
|
-
|
|
2487
2453
|
var t = taskHead,
|
|
2488
|
-
|
|
2489
|
-
|
|
2454
|
+
e;
|
|
2490
2455
|
while (t) {
|
|
2491
2456
|
if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);
|
|
2492
2457
|
t = t._next;
|
|
2493
2458
|
}
|
|
2494
|
-
|
|
2495
2459
|
--frame;
|
|
2496
2460
|
}
|
|
2497
|
-
|
|
2498
2461
|
function wake() {
|
|
2499
2462
|
clockNow = (clockLast = clock.now()) + clockSkew;
|
|
2500
2463
|
frame = timeout$1 = 0;
|
|
2501
|
-
|
|
2502
2464
|
try {
|
|
2503
2465
|
timerFlush();
|
|
2504
2466
|
} finally {
|
|
@@ -2507,19 +2469,16 @@
|
|
|
2507
2469
|
clockNow = 0;
|
|
2508
2470
|
}
|
|
2509
2471
|
}
|
|
2510
|
-
|
|
2511
2472
|
function poke() {
|
|
2512
2473
|
var now = clock.now(),
|
|
2513
|
-
|
|
2474
|
+
delay = now - clockLast;
|
|
2514
2475
|
if (delay > pokeDelay) clockSkew -= delay, clockLast = now;
|
|
2515
2476
|
}
|
|
2516
|
-
|
|
2517
2477
|
function nap() {
|
|
2518
2478
|
var t0,
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2479
|
+
t1 = taskHead,
|
|
2480
|
+
t2,
|
|
2481
|
+
time = Infinity;
|
|
2523
2482
|
while (t1) {
|
|
2524
2483
|
if (t1._call) {
|
|
2525
2484
|
if (time > t1._time) time = t1._time;
|
|
@@ -2529,17 +2488,13 @@
|
|
|
2529
2488
|
t1 = t0 ? t0._next = t2 : taskHead = t2;
|
|
2530
2489
|
}
|
|
2531
2490
|
}
|
|
2532
|
-
|
|
2533
2491
|
taskTail = t0;
|
|
2534
2492
|
sleep(time);
|
|
2535
2493
|
}
|
|
2536
|
-
|
|
2537
2494
|
function sleep(time) {
|
|
2538
2495
|
if (frame) return; // Soonest alarm already set, or will be.
|
|
2539
|
-
|
|
2540
2496
|
if (timeout$1) timeout$1 = clearTimeout(timeout$1);
|
|
2541
2497
|
var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
|
|
2542
|
-
|
|
2543
2498
|
if (delay > 24) {
|
|
2544
2499
|
if (time < Infinity) timeout$1 = setTimeout(wake, time - clock.now() - clockSkew);
|
|
2545
2500
|
if (interval) interval = clearInterval(interval);
|
|
@@ -2602,129 +2557,122 @@
|
|
|
2602
2557
|
if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
|
|
2603
2558
|
return schedule;
|
|
2604
2559
|
}
|
|
2605
|
-
|
|
2606
2560
|
function create(node, id, self) {
|
|
2607
2561
|
var schedules = node.__transition,
|
|
2608
|
-
|
|
2609
|
-
// Note the actual delay is not known until the first callback!
|
|
2562
|
+
tween;
|
|
2610
2563
|
|
|
2564
|
+
// Initialize the self timer when the transition is created.
|
|
2565
|
+
// Note the actual delay is not known until the first callback!
|
|
2611
2566
|
schedules[id] = self;
|
|
2612
2567
|
self.timer = timer(schedule, 0, self.time);
|
|
2613
|
-
|
|
2614
2568
|
function schedule(elapsed) {
|
|
2615
2569
|
self.state = SCHEDULED;
|
|
2616
|
-
self.timer.restart(start, self.delay, self.time);
|
|
2570
|
+
self.timer.restart(start, self.delay, self.time);
|
|
2617
2571
|
|
|
2572
|
+
// If the elapsed delay is less than our first sleep, start immediately.
|
|
2618
2573
|
if (self.delay <= elapsed) start(elapsed - self.delay);
|
|
2619
2574
|
}
|
|
2620
|
-
|
|
2621
2575
|
function start(elapsed) {
|
|
2622
|
-
var i, j, n, o;
|
|
2576
|
+
var i, j, n, o;
|
|
2623
2577
|
|
|
2578
|
+
// If the state is not SCHEDULED, then we previously errored on start.
|
|
2624
2579
|
if (self.state !== SCHEDULED) return stop();
|
|
2625
|
-
|
|
2626
2580
|
for (i in schedules) {
|
|
2627
2581
|
o = schedules[i];
|
|
2628
|
-
if (o.name !== self.name) continue;
|
|
2582
|
+
if (o.name !== self.name) continue;
|
|
2583
|
+
|
|
2584
|
+
// While this element already has a starting transition during this frame,
|
|
2629
2585
|
// defer starting an interrupting transition until that transition has a
|
|
2630
2586
|
// chance to tick (and possibly end); see d3/d3-transition#54!
|
|
2587
|
+
if (o.state === STARTED) return timeout(start);
|
|
2631
2588
|
|
|
2632
|
-
|
|
2633
|
-
|
|
2589
|
+
// Interrupt the active transition, if any.
|
|
2634
2590
|
if (o.state === RUNNING) {
|
|
2635
2591
|
o.state = ENDED;
|
|
2636
2592
|
o.timer.stop();
|
|
2637
2593
|
o.on.call("interrupt", node, node.__data__, o.index, o.group);
|
|
2638
2594
|
delete schedules[i];
|
|
2639
|
-
}
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
// Cancel any pre-empted transitions.
|
|
2640
2598
|
else if (+i < id) {
|
|
2641
2599
|
o.state = ENDED;
|
|
2642
2600
|
o.timer.stop();
|
|
2643
2601
|
o.on.call("cancel", node, node.__data__, o.index, o.group);
|
|
2644
2602
|
delete schedules[i];
|
|
2645
2603
|
}
|
|
2646
|
-
}
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
// Defer the first tick to end of the current frame; see d3/d3#1576.
|
|
2647
2607
|
// Note the transition may be canceled after start and before the first tick!
|
|
2648
2608
|
// Note this must be scheduled before the start event; see d3/d3-transition#16!
|
|
2649
2609
|
// Assuming this is successful, subsequent callbacks go straight to tick.
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
2610
|
timeout(function () {
|
|
2653
2611
|
if (self.state === STARTED) {
|
|
2654
2612
|
self.state = RUNNING;
|
|
2655
2613
|
self.timer.restart(tick, self.delay, self.time);
|
|
2656
2614
|
tick(elapsed);
|
|
2657
2615
|
}
|
|
2658
|
-
});
|
|
2659
|
-
// Note this must be done before the tween are initialized.
|
|
2616
|
+
});
|
|
2660
2617
|
|
|
2618
|
+
// Dispatch the start event.
|
|
2619
|
+
// Note this must be done before the tween are initialized.
|
|
2661
2620
|
self.state = STARTING;
|
|
2662
2621
|
self.on.call("start", node, node.__data__, self.index, self.group);
|
|
2663
2622
|
if (self.state !== STARTING) return; // interrupted
|
|
2623
|
+
self.state = STARTED;
|
|
2664
2624
|
|
|
2665
|
-
|
|
2666
|
-
|
|
2625
|
+
// Initialize the tween, deleting null tween.
|
|
2667
2626
|
tween = new Array(n = self.tween.length);
|
|
2668
|
-
|
|
2669
2627
|
for (i = 0, j = -1; i < n; ++i) {
|
|
2670
2628
|
if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
|
|
2671
2629
|
tween[++j] = o;
|
|
2672
2630
|
}
|
|
2673
2631
|
}
|
|
2674
|
-
|
|
2675
2632
|
tween.length = j + 1;
|
|
2676
2633
|
}
|
|
2677
|
-
|
|
2678
2634
|
function tick(elapsed) {
|
|
2679
2635
|
var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2636
|
+
i = -1,
|
|
2637
|
+
n = tween.length;
|
|
2683
2638
|
while (++i < n) {
|
|
2684
2639
|
tween[i].call(node, t);
|
|
2685
|
-
}
|
|
2686
|
-
|
|
2640
|
+
}
|
|
2687
2641
|
|
|
2642
|
+
// Dispatch the end event.
|
|
2688
2643
|
if (self.state === ENDING) {
|
|
2689
2644
|
self.on.call("end", node, node.__data__, self.index, self.group);
|
|
2690
2645
|
stop();
|
|
2691
2646
|
}
|
|
2692
2647
|
}
|
|
2693
|
-
|
|
2694
2648
|
function stop() {
|
|
2695
2649
|
self.state = ENDED;
|
|
2696
2650
|
self.timer.stop();
|
|
2697
2651
|
delete schedules[id];
|
|
2698
|
-
|
|
2699
2652
|
for (var i in schedules) return; // eslint-disable-line no-unused-vars
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
2653
|
delete node.__transition;
|
|
2703
2654
|
}
|
|
2704
2655
|
}
|
|
2705
2656
|
|
|
2706
2657
|
function interrupt (node, name) {
|
|
2707
2658
|
var schedules = node.__transition,
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2659
|
+
schedule,
|
|
2660
|
+
active,
|
|
2661
|
+
empty = true,
|
|
2662
|
+
i;
|
|
2712
2663
|
if (!schedules) return;
|
|
2713
2664
|
name = name == null ? null : name + "";
|
|
2714
|
-
|
|
2715
2665
|
for (i in schedules) {
|
|
2716
2666
|
if ((schedule = schedules[i]).name !== name) {
|
|
2717
2667
|
empty = false;
|
|
2718
2668
|
continue;
|
|
2719
2669
|
}
|
|
2720
|
-
|
|
2721
2670
|
active = schedule.state > STARTING && schedule.state < ENDING;
|
|
2722
2671
|
schedule.state = ENDED;
|
|
2723
2672
|
schedule.timer.stop();
|
|
2724
2673
|
schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
|
|
2725
2674
|
delete schedules[i];
|
|
2726
2675
|
}
|
|
2727
|
-
|
|
2728
2676
|
if (empty) delete node.__transition;
|
|
2729
2677
|
}
|
|
2730
2678
|
|
|
@@ -2738,13 +2686,13 @@
|
|
|
2738
2686
|
var tween0, tween1;
|
|
2739
2687
|
return function () {
|
|
2740
2688
|
var schedule = set(this, id),
|
|
2741
|
-
|
|
2689
|
+
tween = schedule.tween;
|
|
2690
|
+
|
|
2691
|
+
// If this node shared tween with the previous node,
|
|
2742
2692
|
// just assign the updated shared tween and we’re done!
|
|
2743
2693
|
// Otherwise, copy-on-write.
|
|
2744
|
-
|
|
2745
2694
|
if (tween !== tween0) {
|
|
2746
2695
|
tween1 = tween0 = tween;
|
|
2747
|
-
|
|
2748
2696
|
for (var i = 0, n = tween1.length; i < n; ++i) {
|
|
2749
2697
|
if (tween1[i].name === name) {
|
|
2750
2698
|
tween1 = tween1.slice();
|
|
@@ -2753,56 +2701,47 @@
|
|
|
2753
2701
|
}
|
|
2754
2702
|
}
|
|
2755
2703
|
}
|
|
2756
|
-
|
|
2757
2704
|
schedule.tween = tween1;
|
|
2758
2705
|
};
|
|
2759
2706
|
}
|
|
2760
|
-
|
|
2761
2707
|
function tweenFunction(id, name, value) {
|
|
2762
2708
|
var tween0, tween1;
|
|
2763
2709
|
if (typeof value !== "function") throw new Error();
|
|
2764
2710
|
return function () {
|
|
2765
2711
|
var schedule = set(this, id),
|
|
2766
|
-
|
|
2712
|
+
tween = schedule.tween;
|
|
2713
|
+
|
|
2714
|
+
// If this node shared tween with the previous node,
|
|
2767
2715
|
// just assign the updated shared tween and we’re done!
|
|
2768
2716
|
// Otherwise, copy-on-write.
|
|
2769
|
-
|
|
2770
2717
|
if (tween !== tween0) {
|
|
2771
2718
|
tween1 = (tween0 = tween).slice();
|
|
2772
|
-
|
|
2773
2719
|
for (var t = {
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2720
|
+
name: name,
|
|
2721
|
+
value: value
|
|
2722
|
+
}, i = 0, n = tween1.length; i < n; ++i) {
|
|
2777
2723
|
if (tween1[i].name === name) {
|
|
2778
2724
|
tween1[i] = t;
|
|
2779
2725
|
break;
|
|
2780
2726
|
}
|
|
2781
2727
|
}
|
|
2782
|
-
|
|
2783
2728
|
if (i === n) tween1.push(t);
|
|
2784
2729
|
}
|
|
2785
|
-
|
|
2786
2730
|
schedule.tween = tween1;
|
|
2787
2731
|
};
|
|
2788
2732
|
}
|
|
2789
|
-
|
|
2790
2733
|
function transition_tween (name, value) {
|
|
2791
2734
|
var id = this._id;
|
|
2792
2735
|
name += "";
|
|
2793
|
-
|
|
2794
2736
|
if (arguments.length < 2) {
|
|
2795
2737
|
var tween = get(this.node(), id).tween;
|
|
2796
|
-
|
|
2797
2738
|
for (var i = 0, n = tween.length, t; i < n; ++i) {
|
|
2798
2739
|
if ((t = tween[i]).name === name) {
|
|
2799
2740
|
return t.value;
|
|
2800
2741
|
}
|
|
2801
2742
|
}
|
|
2802
|
-
|
|
2803
2743
|
return null;
|
|
2804
2744
|
}
|
|
2805
|
-
|
|
2806
2745
|
return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
|
|
2807
2746
|
}
|
|
2808
2747
|
function tweenValue(transition, name, value) {
|
|
@@ -2826,62 +2765,56 @@
|
|
|
2826
2765
|
this.removeAttribute(name);
|
|
2827
2766
|
};
|
|
2828
2767
|
}
|
|
2829
|
-
|
|
2830
2768
|
function attrRemoveNS(fullname) {
|
|
2831
2769
|
return function () {
|
|
2832
2770
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
2833
2771
|
};
|
|
2834
2772
|
}
|
|
2835
|
-
|
|
2836
2773
|
function attrConstant(name, interpolate, value1) {
|
|
2837
2774
|
var string00,
|
|
2838
|
-
|
|
2839
|
-
|
|
2775
|
+
string1 = value1 + "",
|
|
2776
|
+
interpolate0;
|
|
2840
2777
|
return function () {
|
|
2841
2778
|
var string0 = this.getAttribute(name);
|
|
2842
2779
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
2843
2780
|
};
|
|
2844
2781
|
}
|
|
2845
|
-
|
|
2846
2782
|
function attrConstantNS(fullname, interpolate, value1) {
|
|
2847
2783
|
var string00,
|
|
2848
|
-
|
|
2849
|
-
|
|
2784
|
+
string1 = value1 + "",
|
|
2785
|
+
interpolate0;
|
|
2850
2786
|
return function () {
|
|
2851
2787
|
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2852
2788
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
2853
2789
|
};
|
|
2854
2790
|
}
|
|
2855
|
-
|
|
2856
2791
|
function attrFunction(name, interpolate, value) {
|
|
2857
2792
|
var string00, string10, interpolate0;
|
|
2858
2793
|
return function () {
|
|
2859
2794
|
var string0,
|
|
2860
|
-
|
|
2861
|
-
|
|
2795
|
+
value1 = value(this),
|
|
2796
|
+
string1;
|
|
2862
2797
|
if (value1 == null) return void this.removeAttribute(name);
|
|
2863
2798
|
string0 = this.getAttribute(name);
|
|
2864
2799
|
string1 = value1 + "";
|
|
2865
2800
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2866
2801
|
};
|
|
2867
2802
|
}
|
|
2868
|
-
|
|
2869
2803
|
function attrFunctionNS(fullname, interpolate, value) {
|
|
2870
2804
|
var string00, string10, interpolate0;
|
|
2871
2805
|
return function () {
|
|
2872
2806
|
var string0,
|
|
2873
|
-
|
|
2874
|
-
|
|
2807
|
+
value1 = value(this),
|
|
2808
|
+
string1;
|
|
2875
2809
|
if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
2876
2810
|
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2877
2811
|
string1 = value1 + "";
|
|
2878
2812
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2879
2813
|
};
|
|
2880
2814
|
}
|
|
2881
|
-
|
|
2882
2815
|
function transition_attr (name, value) {
|
|
2883
2816
|
var fullname = namespace(name),
|
|
2884
|
-
|
|
2817
|
+
i = fullname === "transform" ? interpolateTransformSvg : interpolate;
|
|
2885
2818
|
return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
|
|
2886
2819
|
}
|
|
2887
2820
|
|
|
@@ -2890,39 +2823,31 @@
|
|
|
2890
2823
|
this.setAttribute(name, i.call(this, t));
|
|
2891
2824
|
};
|
|
2892
2825
|
}
|
|
2893
|
-
|
|
2894
2826
|
function attrInterpolateNS(fullname, i) {
|
|
2895
2827
|
return function (t) {
|
|
2896
2828
|
this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
|
|
2897
2829
|
};
|
|
2898
2830
|
}
|
|
2899
|
-
|
|
2900
2831
|
function attrTweenNS(fullname, value) {
|
|
2901
2832
|
var t0, i0;
|
|
2902
|
-
|
|
2903
2833
|
function tween() {
|
|
2904
2834
|
var i = value.apply(this, arguments);
|
|
2905
2835
|
if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
|
|
2906
2836
|
return t0;
|
|
2907
2837
|
}
|
|
2908
|
-
|
|
2909
2838
|
tween._value = value;
|
|
2910
2839
|
return tween;
|
|
2911
2840
|
}
|
|
2912
|
-
|
|
2913
2841
|
function attrTween(name, value) {
|
|
2914
2842
|
var t0, i0;
|
|
2915
|
-
|
|
2916
2843
|
function tween() {
|
|
2917
2844
|
var i = value.apply(this, arguments);
|
|
2918
2845
|
if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
|
|
2919
2846
|
return t0;
|
|
2920
2847
|
}
|
|
2921
|
-
|
|
2922
2848
|
tween._value = value;
|
|
2923
2849
|
return tween;
|
|
2924
2850
|
}
|
|
2925
|
-
|
|
2926
2851
|
function transition_attrTween (name, value) {
|
|
2927
2852
|
var key = "attr." + name;
|
|
2928
2853
|
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
@@ -2937,13 +2862,11 @@
|
|
|
2937
2862
|
init(this, id).delay = +value.apply(this, arguments);
|
|
2938
2863
|
};
|
|
2939
2864
|
}
|
|
2940
|
-
|
|
2941
2865
|
function delayConstant(id, value) {
|
|
2942
2866
|
return value = +value, function () {
|
|
2943
2867
|
init(this, id).delay = value;
|
|
2944
2868
|
};
|
|
2945
2869
|
}
|
|
2946
|
-
|
|
2947
2870
|
function transition_delay (value) {
|
|
2948
2871
|
var id = this._id;
|
|
2949
2872
|
return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id, value)) : get(this.node(), id).delay;
|
|
@@ -2954,13 +2877,11 @@
|
|
|
2954
2877
|
set(this, id).duration = +value.apply(this, arguments);
|
|
2955
2878
|
};
|
|
2956
2879
|
}
|
|
2957
|
-
|
|
2958
2880
|
function durationConstant(id, value) {
|
|
2959
2881
|
return value = +value, function () {
|
|
2960
2882
|
set(this, id).duration = value;
|
|
2961
2883
|
};
|
|
2962
2884
|
}
|
|
2963
|
-
|
|
2964
2885
|
function transition_duration (value) {
|
|
2965
2886
|
var id = this._id;
|
|
2966
2887
|
return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id, value)) : get(this.node(), id).duration;
|
|
@@ -2972,7 +2893,6 @@
|
|
|
2972
2893
|
set(this, id).ease = value;
|
|
2973
2894
|
};
|
|
2974
2895
|
}
|
|
2975
|
-
|
|
2976
2896
|
function transition_ease (value) {
|
|
2977
2897
|
var id = this._id;
|
|
2978
2898
|
return arguments.length ? this.each(easeConstant(id, value)) : get(this.node(), id).ease;
|
|
@@ -2985,7 +2905,6 @@
|
|
|
2985
2905
|
set(this, id).ease = v;
|
|
2986
2906
|
};
|
|
2987
2907
|
}
|
|
2988
|
-
|
|
2989
2908
|
function transition_easeVarying (value) {
|
|
2990
2909
|
if (typeof value !== "function") throw new Error();
|
|
2991
2910
|
return this.each(easeVarying(this._id, value));
|
|
@@ -2993,7 +2912,6 @@
|
|
|
2993
2912
|
|
|
2994
2913
|
function transition_filter (match) {
|
|
2995
2914
|
if (typeof match !== "function") match = matcher(match);
|
|
2996
|
-
|
|
2997
2915
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
2998
2916
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
2999
2917
|
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
@@ -3001,13 +2919,11 @@
|
|
|
3001
2919
|
}
|
|
3002
2920
|
}
|
|
3003
2921
|
}
|
|
3004
|
-
|
|
3005
2922
|
return new Transition(subgroups, this._parents, this._name, this._id);
|
|
3006
2923
|
}
|
|
3007
2924
|
|
|
3008
2925
|
function transition_merge (transition) {
|
|
3009
2926
|
if (transition._id !== this._id) throw new Error();
|
|
3010
|
-
|
|
3011
2927
|
for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
|
|
3012
2928
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
3013
2929
|
if (node = group0[i] || group1[i]) {
|
|
@@ -3015,11 +2931,9 @@
|
|
|
3015
2931
|
}
|
|
3016
2932
|
}
|
|
3017
2933
|
}
|
|
3018
|
-
|
|
3019
2934
|
for (; j < m0; ++j) {
|
|
3020
2935
|
merges[j] = groups0[j];
|
|
3021
2936
|
}
|
|
3022
|
-
|
|
3023
2937
|
return new Transition(merges, this._parents, this._name, this._id);
|
|
3024
2938
|
}
|
|
3025
2939
|
|
|
@@ -3030,22 +2944,21 @@
|
|
|
3030
2944
|
return !t || t === "start";
|
|
3031
2945
|
});
|
|
3032
2946
|
}
|
|
3033
|
-
|
|
3034
2947
|
function onFunction(id, name, listener) {
|
|
3035
2948
|
var on0,
|
|
3036
|
-
|
|
3037
|
-
|
|
2949
|
+
on1,
|
|
2950
|
+
sit = start(name) ? init : set;
|
|
3038
2951
|
return function () {
|
|
3039
2952
|
var schedule = sit(this, id),
|
|
3040
|
-
|
|
2953
|
+
on = schedule.on;
|
|
2954
|
+
|
|
2955
|
+
// If this node shared a dispatch with the previous node,
|
|
3041
2956
|
// just assign the updated shared dispatch and we’re done!
|
|
3042
2957
|
// Otherwise, copy-on-write.
|
|
3043
|
-
|
|
3044
2958
|
if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
|
|
3045
2959
|
schedule.on = on1;
|
|
3046
2960
|
};
|
|
3047
2961
|
}
|
|
3048
|
-
|
|
3049
2962
|
function transition_on (name, listener) {
|
|
3050
2963
|
var id = this._id;
|
|
3051
2964
|
return arguments.length < 2 ? get(this.node(), id).on.on(name) : this.each(onFunction(id, name, listener));
|
|
@@ -3054,22 +2967,18 @@
|
|
|
3054
2967
|
function removeFunction(id) {
|
|
3055
2968
|
return function () {
|
|
3056
2969
|
var parent = this.parentNode;
|
|
3057
|
-
|
|
3058
2970
|
for (var i in this.__transition) if (+i !== id) return;
|
|
3059
|
-
|
|
3060
2971
|
if (parent) parent.removeChild(this);
|
|
3061
2972
|
};
|
|
3062
2973
|
}
|
|
3063
|
-
|
|
3064
2974
|
function transition_remove () {
|
|
3065
2975
|
return this.on("end.remove", removeFunction(this._id));
|
|
3066
2976
|
}
|
|
3067
2977
|
|
|
3068
2978
|
function transition_select (select) {
|
|
3069
2979
|
var name = this._name,
|
|
3070
|
-
|
|
2980
|
+
id = this._id;
|
|
3071
2981
|
if (typeof select !== "function") select = selector(select);
|
|
3072
|
-
|
|
3073
2982
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
3074
2983
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
3075
2984
|
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
@@ -3079,15 +2988,13 @@
|
|
|
3079
2988
|
}
|
|
3080
2989
|
}
|
|
3081
2990
|
}
|
|
3082
|
-
|
|
3083
2991
|
return new Transition(subgroups, this._parents, name, id);
|
|
3084
2992
|
}
|
|
3085
2993
|
|
|
3086
2994
|
function transition_selectAll (select) {
|
|
3087
2995
|
var name = this._name,
|
|
3088
|
-
|
|
2996
|
+
id = this._id;
|
|
3089
2997
|
if (typeof select !== "function") select = selectorAll(select);
|
|
3090
|
-
|
|
3091
2998
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
3092
2999
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3093
3000
|
if (node = group[i]) {
|
|
@@ -3096,13 +3003,11 @@
|
|
|
3096
3003
|
schedule(child, name, id, k, children, inherit);
|
|
3097
3004
|
}
|
|
3098
3005
|
}
|
|
3099
|
-
|
|
3100
3006
|
subgroups.push(children);
|
|
3101
3007
|
parents.push(node);
|
|
3102
3008
|
}
|
|
3103
3009
|
}
|
|
3104
3010
|
}
|
|
3105
|
-
|
|
3106
3011
|
return new Transition(subgroups, parents, name, id);
|
|
3107
3012
|
}
|
|
3108
3013
|
|
|
@@ -3115,57 +3020,53 @@
|
|
|
3115
3020
|
var string00, string10, interpolate0;
|
|
3116
3021
|
return function () {
|
|
3117
3022
|
var string0 = styleValue(this, name),
|
|
3118
|
-
|
|
3023
|
+
string1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
3119
3024
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);
|
|
3120
3025
|
};
|
|
3121
3026
|
}
|
|
3122
|
-
|
|
3123
3027
|
function styleRemove(name) {
|
|
3124
3028
|
return function () {
|
|
3125
3029
|
this.style.removeProperty(name);
|
|
3126
3030
|
};
|
|
3127
3031
|
}
|
|
3128
|
-
|
|
3129
3032
|
function styleConstant(name, interpolate, value1) {
|
|
3130
3033
|
var string00,
|
|
3131
|
-
|
|
3132
|
-
|
|
3034
|
+
string1 = value1 + "",
|
|
3035
|
+
interpolate0;
|
|
3133
3036
|
return function () {
|
|
3134
3037
|
var string0 = styleValue(this, name);
|
|
3135
3038
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
3136
3039
|
};
|
|
3137
3040
|
}
|
|
3138
|
-
|
|
3139
3041
|
function styleFunction(name, interpolate, value) {
|
|
3140
3042
|
var string00, string10, interpolate0;
|
|
3141
3043
|
return function () {
|
|
3142
3044
|
var string0 = styleValue(this, name),
|
|
3143
|
-
|
|
3144
|
-
|
|
3045
|
+
value1 = value(this),
|
|
3046
|
+
string1 = value1 + "";
|
|
3145
3047
|
if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
3146
3048
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
3147
3049
|
};
|
|
3148
3050
|
}
|
|
3149
|
-
|
|
3150
3051
|
function styleMaybeRemove(id, name) {
|
|
3151
3052
|
var on0,
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3053
|
+
on1,
|
|
3054
|
+
listener0,
|
|
3055
|
+
key = "style." + name,
|
|
3056
|
+
event = "end." + key,
|
|
3057
|
+
remove;
|
|
3157
3058
|
return function () {
|
|
3158
3059
|
var schedule = set(this, id),
|
|
3159
|
-
|
|
3160
|
-
|
|
3060
|
+
on = schedule.on,
|
|
3061
|
+
listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;
|
|
3062
|
+
|
|
3063
|
+
// If this node shared a dispatch with the previous node,
|
|
3161
3064
|
// just assign the updated shared dispatch and we’re done!
|
|
3162
3065
|
// Otherwise, copy-on-write.
|
|
3163
|
-
|
|
3164
3066
|
if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
|
|
3165
3067
|
schedule.on = on1;
|
|
3166
3068
|
};
|
|
3167
3069
|
}
|
|
3168
|
-
|
|
3169
3070
|
function transition_style (name, value, priority) {
|
|
3170
3071
|
var i = (name += "") === "transform" ? interpolateTransformCss : interpolate;
|
|
3171
3072
|
return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove(name)) : typeof value === "function" ? this.styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(name, i, value), priority).on("end.style." + name, null);
|
|
@@ -3176,20 +3077,16 @@
|
|
|
3176
3077
|
this.style.setProperty(name, i.call(this, t), priority);
|
|
3177
3078
|
};
|
|
3178
3079
|
}
|
|
3179
|
-
|
|
3180
3080
|
function styleTween(name, value, priority) {
|
|
3181
3081
|
var t, i0;
|
|
3182
|
-
|
|
3183
3082
|
function tween() {
|
|
3184
3083
|
var i = value.apply(this, arguments);
|
|
3185
3084
|
if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
|
|
3186
3085
|
return t;
|
|
3187
3086
|
}
|
|
3188
|
-
|
|
3189
3087
|
tween._value = value;
|
|
3190
3088
|
return tween;
|
|
3191
3089
|
}
|
|
3192
|
-
|
|
3193
3090
|
function transition_styleTween (name, value, priority) {
|
|
3194
3091
|
var key = "style." + (name += "");
|
|
3195
3092
|
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
@@ -3203,14 +3100,12 @@
|
|
|
3203
3100
|
this.textContent = value;
|
|
3204
3101
|
};
|
|
3205
3102
|
}
|
|
3206
|
-
|
|
3207
3103
|
function textFunction(value) {
|
|
3208
3104
|
return function () {
|
|
3209
3105
|
var value1 = value(this);
|
|
3210
3106
|
this.textContent = value1 == null ? "" : value1;
|
|
3211
3107
|
};
|
|
3212
3108
|
}
|
|
3213
|
-
|
|
3214
3109
|
function transition_text (value) {
|
|
3215
3110
|
return this.tween("text", typeof value === "function" ? textFunction(tweenValue(this, "text", value)) : textConstant(value == null ? "" : value + ""));
|
|
3216
3111
|
}
|
|
@@ -3220,20 +3115,16 @@
|
|
|
3220
3115
|
this.textContent = i.call(this, t);
|
|
3221
3116
|
};
|
|
3222
3117
|
}
|
|
3223
|
-
|
|
3224
3118
|
function textTween(value) {
|
|
3225
3119
|
var t0, i0;
|
|
3226
|
-
|
|
3227
3120
|
function tween() {
|
|
3228
3121
|
var i = value.apply(this, arguments);
|
|
3229
3122
|
if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
|
|
3230
3123
|
return t0;
|
|
3231
3124
|
}
|
|
3232
|
-
|
|
3233
3125
|
tween._value = value;
|
|
3234
3126
|
return tween;
|
|
3235
3127
|
}
|
|
3236
|
-
|
|
3237
3128
|
function transition_textTween (value) {
|
|
3238
3129
|
var key = "text";
|
|
3239
3130
|
if (arguments.length < 1) return (key = this.tween(key)) && key._value;
|
|
@@ -3244,9 +3135,8 @@
|
|
|
3244
3135
|
|
|
3245
3136
|
function transition_transition () {
|
|
3246
3137
|
var name = this._name,
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3138
|
+
id0 = this._id,
|
|
3139
|
+
id1 = newId();
|
|
3250
3140
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
3251
3141
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3252
3142
|
if (node = group[i]) {
|
|
@@ -3260,44 +3150,41 @@
|
|
|
3260
3150
|
}
|
|
3261
3151
|
}
|
|
3262
3152
|
}
|
|
3263
|
-
|
|
3264
3153
|
return new Transition(groups, this._parents, name, id1);
|
|
3265
3154
|
}
|
|
3266
3155
|
|
|
3267
3156
|
function transition_end () {
|
|
3268
3157
|
var on0,
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3158
|
+
on1,
|
|
3159
|
+
that = this,
|
|
3160
|
+
id = that._id,
|
|
3161
|
+
size = that.size();
|
|
3273
3162
|
return new Promise(function (resolve, reject) {
|
|
3274
3163
|
var cancel = {
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3164
|
+
value: reject
|
|
3165
|
+
},
|
|
3166
|
+
end = {
|
|
3167
|
+
value: function () {
|
|
3168
|
+
if (--size === 0) resolve();
|
|
3169
|
+
}
|
|
3170
|
+
};
|
|
3282
3171
|
that.each(function () {
|
|
3283
3172
|
var schedule = set(this, id),
|
|
3284
|
-
|
|
3173
|
+
on = schedule.on;
|
|
3174
|
+
|
|
3175
|
+
// If this node shared a dispatch with the previous node,
|
|
3285
3176
|
// just assign the updated shared dispatch and we’re done!
|
|
3286
3177
|
// Otherwise, copy-on-write.
|
|
3287
|
-
|
|
3288
3178
|
if (on !== on0) {
|
|
3289
3179
|
on1 = (on0 = on).copy();
|
|
3290
|
-
|
|
3291
3180
|
on1._.cancel.push(cancel);
|
|
3292
|
-
|
|
3293
3181
|
on1._.interrupt.push(cancel);
|
|
3294
|
-
|
|
3295
3182
|
on1._.end.push(end);
|
|
3296
3183
|
}
|
|
3297
|
-
|
|
3298
3184
|
schedule.on = on1;
|
|
3299
|
-
});
|
|
3185
|
+
});
|
|
3300
3186
|
|
|
3187
|
+
// The selection was empty, resolve end immediately
|
|
3301
3188
|
if (size === 0) resolve();
|
|
3302
3189
|
});
|
|
3303
3190
|
}
|
|
@@ -3357,28 +3244,22 @@
|
|
|
3357
3244
|
duration: 250,
|
|
3358
3245
|
ease: cubicInOut
|
|
3359
3246
|
};
|
|
3360
|
-
|
|
3361
3247
|
function inherit(node, id) {
|
|
3362
3248
|
var timing;
|
|
3363
|
-
|
|
3364
3249
|
while (!(timing = node.__transition) || !(timing = timing[id])) {
|
|
3365
3250
|
if (!(node = node.parentNode)) {
|
|
3366
3251
|
throw new Error(`transition ${id} not found`);
|
|
3367
3252
|
}
|
|
3368
3253
|
}
|
|
3369
|
-
|
|
3370
3254
|
return timing;
|
|
3371
3255
|
}
|
|
3372
|
-
|
|
3373
3256
|
function selection_transition (name) {
|
|
3374
3257
|
var id, timing;
|
|
3375
|
-
|
|
3376
3258
|
if (name instanceof Transition) {
|
|
3377
3259
|
id = name._id, name = name._name;
|
|
3378
3260
|
} else {
|
|
3379
3261
|
id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
|
|
3380
3262
|
}
|
|
3381
|
-
|
|
3382
3263
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
3383
3264
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3384
3265
|
if (node = group[i]) {
|
|
@@ -3386,36 +3267,67 @@
|
|
|
3386
3267
|
}
|
|
3387
3268
|
}
|
|
3388
3269
|
}
|
|
3389
|
-
|
|
3390
3270
|
return new Transition(groups, this._parents, name, id);
|
|
3391
3271
|
}
|
|
3392
3272
|
|
|
3393
3273
|
selection.prototype.interrupt = selection_interrupt;
|
|
3394
3274
|
selection.prototype.transition = selection_transition;
|
|
3395
3275
|
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3276
|
+
function Transform(k, x, y) {
|
|
3277
|
+
this.k = k;
|
|
3278
|
+
this.x = x;
|
|
3279
|
+
this.y = y;
|
|
3280
|
+
}
|
|
3281
|
+
Transform.prototype = {
|
|
3282
|
+
constructor: Transform,
|
|
3283
|
+
scale: function (k) {
|
|
3284
|
+
return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
|
|
3285
|
+
},
|
|
3286
|
+
translate: function (x, y) {
|
|
3287
|
+
return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);
|
|
3288
|
+
},
|
|
3289
|
+
apply: function (point) {
|
|
3290
|
+
return [point[0] * this.k + this.x, point[1] * this.k + this.y];
|
|
3291
|
+
},
|
|
3292
|
+
applyX: function (x) {
|
|
3293
|
+
return x * this.k + this.x;
|
|
3294
|
+
},
|
|
3295
|
+
applyY: function (y) {
|
|
3296
|
+
return y * this.k + this.y;
|
|
3297
|
+
},
|
|
3298
|
+
invert: function (location) {
|
|
3299
|
+
return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
|
|
3300
|
+
},
|
|
3301
|
+
invertX: function (x) {
|
|
3302
|
+
return (x - this.x) / this.k;
|
|
3303
|
+
},
|
|
3304
|
+
invertY: function (y) {
|
|
3305
|
+
return (y - this.y) / this.k;
|
|
3306
|
+
},
|
|
3307
|
+
rescaleX: function (x) {
|
|
3308
|
+
return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));
|
|
3309
|
+
},
|
|
3310
|
+
rescaleY: function (y) {
|
|
3311
|
+
return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));
|
|
3312
|
+
},
|
|
3313
|
+
toString: function () {
|
|
3314
|
+
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
3315
|
+
}
|
|
3316
|
+
};
|
|
3317
|
+
Transform.prototype;
|
|
3318
|
+
|
|
3406
3319
|
/*
|
|
3407
3320
|
DecidablesElement Base Class - Not intended for instantiation!
|
|
3408
3321
|
<decidables-element>
|
|
3409
3322
|
*/
|
|
3410
|
-
|
|
3411
3323
|
class DecidablesElement extends s {
|
|
3412
3324
|
getComputedStyleValue(property) {
|
|
3413
3325
|
return getComputedStyle(this).getPropertyValue(property).trim();
|
|
3414
3326
|
}
|
|
3415
|
-
|
|
3416
3327
|
firstUpdated(changedProperties) {
|
|
3417
|
-
super.firstUpdated(changedProperties);
|
|
3328
|
+
super.firstUpdated(changedProperties);
|
|
3418
3329
|
|
|
3330
|
+
// Use focus highlighting if keyboard is used at all
|
|
3419
3331
|
select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', event => {
|
|
3420
3332
|
const element = event.currentTarget;
|
|
3421
3333
|
select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
|
|
@@ -3424,7 +3336,6 @@
|
|
|
3424
3336
|
select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
|
|
3425
3337
|
});
|
|
3426
3338
|
}
|
|
3427
|
-
|
|
3428
3339
|
static get greys() {
|
|
3429
3340
|
const grey = '#999999';
|
|
3430
3341
|
const greys = {};
|
|
@@ -3439,13 +3350,11 @@
|
|
|
3439
3350
|
greys.black = '#000000';
|
|
3440
3351
|
return greys;
|
|
3441
3352
|
}
|
|
3442
|
-
|
|
3443
3353
|
static get shadows() {
|
|
3444
3354
|
// Material Design elevation styles
|
|
3445
3355
|
// References:
|
|
3446
3356
|
// https://github.com/material-components/material-components-web/tree/master/packages/mdc-elevation
|
|
3447
3357
|
// https://codepen.io/hanger/pen/yOGvQp
|
|
3448
|
-
|
|
3449
3358
|
/* eslint-disable key-spacing, object-curly-newline */
|
|
3450
3359
|
return {
|
|
3451
3360
|
elevations: [0, 2, 4, 8, 16],
|
|
@@ -3578,29 +3487,27 @@
|
|
|
3578
3487
|
const ambientS = rotate ? `${-ambientM.y}px ${ambientM.y / 2}px ${ambientM.b}px ${ambientM.s}px` : `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
|
|
3579
3488
|
return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
|
|
3580
3489
|
}
|
|
3581
|
-
|
|
3582
3490
|
static get svgFilters() {
|
|
3583
|
-
const shadows = DecidablesElement.shadows;
|
|
3584
|
-
/* eslint-disable-line prefer-destructuring */
|
|
3491
|
+
const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
|
|
3585
3492
|
|
|
3586
3493
|
const filters = shadows.elevations.map(z => {
|
|
3587
|
-
return
|
|
3588
|
-
<filter id=${
|
|
3494
|
+
return b`
|
|
3495
|
+
<filter id=${`shadow-${z}`} x="-250%" y="-250%" width="600%" height="600%">
|
|
3589
3496
|
<feComponentTransfer in="SourceAlpha" result="solid">
|
|
3590
3497
|
<feFuncA type="table" tableValues="0 1 1"/>
|
|
3591
3498
|
</feComponentTransfer>
|
|
3592
|
-
<feOffset in="solid" result="offU" dx=${
|
|
3593
|
-
<feOffset in="solid" result="offP" dx=${
|
|
3594
|
-
<feOffset in="solid" result="offA" dx=${
|
|
3595
|
-
${0}
|
|
3596
|
-
${0}
|
|
3597
|
-
${0}
|
|
3598
|
-
<feGaussianBlur in=${0} result="blurU" stdDeviation=${
|
|
3599
|
-
<feGaussianBlur in=${0} result="blurP" stdDeviation=${
|
|
3600
|
-
<feGaussianBlur in=${0} result="blurA" stdDeviation=${
|
|
3601
|
-
<feFlood in="SourceGraphic" result="opU" flood-color=${
|
|
3602
|
-
<feFlood in="SourceGraphic" result="opP" flood-color=${
|
|
3603
|
-
<feFlood in="SourceGraphic" result="opA" flood-color=${
|
|
3499
|
+
<feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
|
|
3500
|
+
<feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
|
|
3501
|
+
<feOffset in="solid" result="offA" dx=${shadows.mapAmbient[z].y / 2} dy=${shadows.mapAmbient[z].y} />
|
|
3502
|
+
${shadows.mapUmbra[z].s === 0 ? b`` : b`<feMorphology in="offU" result="spreadU" operator=${shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapUmbra[z].s)} />`}
|
|
3503
|
+
${shadows.mapPenumbra[z].s === 0 ? b`` : b`<feMorphology in="offP" result="spreadP" operator=${shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapPenumbra[z].s)} />`}
|
|
3504
|
+
${shadows.mapAmbient[z].s === 0 ? b`` : b`<feMorphology in="offA" result="spreadA" operator=${shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapAmbient[z].s)} />`}
|
|
3505
|
+
<feGaussianBlur in=${shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU'} result="blurU" stdDeviation=${shadows.mapUmbra[z].b / 2} />
|
|
3506
|
+
<feGaussianBlur in=${shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP'} result="blurP" stdDeviation=${shadows.mapPenumbra[z].b / 2} />
|
|
3507
|
+
<feGaussianBlur in=${shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA'} result="blurA" stdDeviation=${shadows.mapAmbient[z].b / 2} />
|
|
3508
|
+
<feFlood in="SourceGraphic" result="opU" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityUmbra + shadows.opacityBoost} />
|
|
3509
|
+
<feFlood in="SourceGraphic" result="opP" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityPenumbra + shadows.opacityBoost} />
|
|
3510
|
+
<feFlood in="SourceGraphic" result="opA" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityAmbient + shadows.opacityBoost} />
|
|
3604
3511
|
<feComposite in="opU" in2="blurU" result="shU" operator="in" />
|
|
3605
3512
|
<feComposite in="opP" in2="blurP" result="shP" operator="in" />
|
|
3606
3513
|
<feComposite in="opA" in2="blurA" result="shA" operator="in" />
|
|
@@ -3614,36 +3521,35 @@
|
|
|
3614
3521
|
<feMergeNode in="finalA" />
|
|
3615
3522
|
<feMergeNode in="SourceGraphic" />
|
|
3616
3523
|
</feMerge>
|
|
3617
|
-
</filter
|
|
3524
|
+
</filter>`;
|
|
3618
3525
|
});
|
|
3619
|
-
return
|
|
3526
|
+
return b`
|
|
3620
3527
|
<svg class="defs">
|
|
3621
3528
|
<defs>
|
|
3622
|
-
${
|
|
3529
|
+
${filters}
|
|
3623
3530
|
</defs>
|
|
3624
3531
|
</svg>
|
|
3625
|
-
|
|
3532
|
+
`;
|
|
3626
3533
|
}
|
|
3627
|
-
|
|
3628
3534
|
static get styles() {
|
|
3629
|
-
return r$
|
|
3535
|
+
return r$1`
|
|
3630
3536
|
:host {
|
|
3631
|
-
---shadow-0: var(--shadow-0, ${0});
|
|
3632
|
-
---shadow-2: var(--shadow-2, ${
|
|
3633
|
-
---shadow-4: var(--shadow-4, ${
|
|
3634
|
-
---shadow-8: var(--shadow-8, ${
|
|
3635
|
-
|
|
3636
|
-
---color-background: var(--color-background, ${
|
|
3637
|
-
---color-border: var(--color-border, ${
|
|
3638
|
-
---color-text: var(--color-text, ${
|
|
3639
|
-
---color-text-inverse: var(--color-text-inverse, ${
|
|
3640
|
-
---color-link: var(--color-link, ${
|
|
3641
|
-
---color-element-background: var(--color-element-background, ${
|
|
3642
|
-
---color-element-disabled: var(--color-element-disabled, ${
|
|
3643
|
-
---color-element-enabled: var(--color-element-enabled, ${
|
|
3644
|
-
---color-element-selected: var(--color-element-selected, ${
|
|
3645
|
-
---color-element-border: var(--color-element-border, ${
|
|
3646
|
-
---color-element-emphasis: var(--color-element-emphasis, ${
|
|
3537
|
+
---shadow-0: var(--shadow-0, ${o$2(this.cssBoxShadow(0))});
|
|
3538
|
+
---shadow-2: var(--shadow-2, ${o$2(this.cssBoxShadow(2))});
|
|
3539
|
+
---shadow-4: var(--shadow-4, ${o$2(this.cssBoxShadow(4))});
|
|
3540
|
+
---shadow-8: var(--shadow-8, ${o$2(this.cssBoxShadow(8))});
|
|
3541
|
+
|
|
3542
|
+
---color-background: var(--color-background, ${o$2(this.greys.white)});
|
|
3543
|
+
---color-border: var(--color-border, ${o$2(this.greys.light75)});
|
|
3544
|
+
---color-text: var(--color-text, ${o$2(this.greys.dark75)});
|
|
3545
|
+
---color-text-inverse: var(--color-text-inverse, ${o$2(this.greys.white)});
|
|
3546
|
+
---color-link: var(--color-link, ${o$2(this.greys.dark25)});
|
|
3547
|
+
---color-element-background: var(--color-element-background, ${o$2(this.greys.light75)});
|
|
3548
|
+
---color-element-disabled: var(--color-element-disabled, ${o$2(this.greys.light50)});
|
|
3549
|
+
---color-element-enabled: var(--color-element-enabled, ${o$2(this.greys.dark25)});
|
|
3550
|
+
---color-element-selected: var(--color-element-selected, ${o$2(this.greys.grey)});
|
|
3551
|
+
---color-element-border: var(--color-element-border, ${o$2(this.greys.dark50)});
|
|
3552
|
+
---color-element-emphasis: var(--color-element-emphasis, ${o$2(this.greys.dark75)});
|
|
3647
3553
|
|
|
3648
3554
|
---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
|
|
3649
3555
|
---font-family-math: var(--font-family-math, "Source Serif", serif);
|
|
@@ -3683,14 +3589,10 @@
|
|
|
3683
3589
|
width: 0;
|
|
3684
3590
|
height: 0;
|
|
3685
3591
|
}
|
|
3686
|
-
|
|
3592
|
+
`;
|
|
3687
3593
|
}
|
|
3688
|
-
|
|
3689
3594
|
}
|
|
3690
3595
|
|
|
3691
|
-
let _$5 = t => t,
|
|
3692
|
-
_t$5,
|
|
3693
|
-
_t2$5;
|
|
3694
3596
|
class DecidablesButton extends DecidablesElement {
|
|
3695
3597
|
static get properties() {
|
|
3696
3598
|
return {
|
|
@@ -3701,15 +3603,14 @@
|
|
|
3701
3603
|
}
|
|
3702
3604
|
};
|
|
3703
3605
|
}
|
|
3704
|
-
|
|
3705
3606
|
constructor() {
|
|
3706
|
-
super();
|
|
3607
|
+
super();
|
|
3707
3608
|
|
|
3609
|
+
// Attributes
|
|
3708
3610
|
this.disabled = false;
|
|
3709
3611
|
}
|
|
3710
|
-
|
|
3711
3612
|
static get styles() {
|
|
3712
|
-
return [super.styles, r$
|
|
3613
|
+
return [super.styles, r$1`
|
|
3713
3614
|
:host {
|
|
3714
3615
|
margin: 0.25rem;
|
|
3715
3616
|
}
|
|
@@ -3762,17 +3663,15 @@
|
|
|
3762
3663
|
outline: none;
|
|
3763
3664
|
box-shadow: var(---shadow-8);
|
|
3764
3665
|
}
|
|
3765
|
-
`
|
|
3666
|
+
`];
|
|
3766
3667
|
}
|
|
3767
|
-
|
|
3768
3668
|
render() {
|
|
3769
|
-
return
|
|
3770
|
-
<button ?disabled=${
|
|
3669
|
+
return x`
|
|
3670
|
+
<button ?disabled=${this.disabled}>
|
|
3771
3671
|
<slot></slot>
|
|
3772
3672
|
</button>
|
|
3773
|
-
|
|
3673
|
+
`;
|
|
3774
3674
|
}
|
|
3775
|
-
|
|
3776
3675
|
}
|
|
3777
3676
|
customElements.define('decidables-button', DecidablesButton);
|
|
3778
3677
|
|
|
@@ -3781,12 +3680,8 @@
|
|
|
3781
3680
|
* Copyright 2018 Google LLC
|
|
3782
3681
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3783
3682
|
*/
|
|
3683
|
+
const l = l => null != l ? l : A;
|
|
3784
3684
|
|
|
3785
|
-
const l = l => null != l ? l : w;
|
|
3786
|
-
|
|
3787
|
-
let _$4 = t => t,
|
|
3788
|
-
_t$4,
|
|
3789
|
-
_t2$4;
|
|
3790
3685
|
class DecidablesSlider extends DecidablesElement {
|
|
3791
3686
|
static get properties() {
|
|
3792
3687
|
return {
|
|
@@ -3817,17 +3712,16 @@
|
|
|
3817
3712
|
}
|
|
3818
3713
|
};
|
|
3819
3714
|
}
|
|
3820
|
-
|
|
3821
3715
|
constructor() {
|
|
3822
|
-
super();
|
|
3716
|
+
super();
|
|
3823
3717
|
|
|
3718
|
+
// Attributes
|
|
3824
3719
|
this.disabled = false;
|
|
3825
3720
|
this.max = undefined;
|
|
3826
3721
|
this.min = undefined;
|
|
3827
3722
|
this.step = undefined;
|
|
3828
3723
|
this.value = undefined;
|
|
3829
3724
|
}
|
|
3830
|
-
|
|
3831
3725
|
changed(event) {
|
|
3832
3726
|
this.value = event.target.value;
|
|
3833
3727
|
this.dispatchEvent(new CustomEvent('change', {
|
|
@@ -3837,17 +3731,15 @@
|
|
|
3837
3731
|
bubbles: true
|
|
3838
3732
|
}));
|
|
3839
3733
|
}
|
|
3840
|
-
|
|
3841
3734
|
inputted(event) {
|
|
3842
3735
|
this.value = event.target.value;
|
|
3843
3736
|
}
|
|
3844
|
-
|
|
3845
3737
|
static get styles() {
|
|
3846
|
-
return [super.styles, r$
|
|
3738
|
+
return [super.styles, r$1`
|
|
3847
3739
|
:host {
|
|
3848
|
-
---shadow-2-rotate: var(--shadow-2-rotate, ${
|
|
3849
|
-
---shadow-4-rotate: var(--shadow-4-rotate, ${
|
|
3850
|
-
---shadow-8-rotate: var(--shadow-8-rotate, ${
|
|
3740
|
+
---shadow-2-rotate: var(--shadow-2-rotate, ${o$2(this.cssBoxShadow(2, true, false))});
|
|
3741
|
+
---shadow-4-rotate: var(--shadow-4-rotate, ${o$2(this.cssBoxShadow(4, true, false))});
|
|
3742
|
+
---shadow-8-rotate: var(--shadow-8-rotate, ${o$2(this.cssBoxShadow(8, true, false))});
|
|
3851
3743
|
|
|
3852
3744
|
display: flex;
|
|
3853
3745
|
|
|
@@ -4093,27 +3985,22 @@
|
|
|
4093
3985
|
:host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
|
|
4094
3986
|
box-shadow: var(---shadow-8-rotate);
|
|
4095
3987
|
}
|
|
4096
|
-
`
|
|
3988
|
+
`];
|
|
4097
3989
|
}
|
|
4098
|
-
|
|
4099
3990
|
render() {
|
|
4100
|
-
return
|
|
3991
|
+
return x`
|
|
4101
3992
|
<label for="slider">
|
|
4102
3993
|
<slot></slot>
|
|
4103
3994
|
</label>
|
|
4104
3995
|
<div class="range">
|
|
4105
|
-
<input type="range" id="slider" min=${
|
|
3996
|
+
<input type="range" id="slider" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
|
|
4106
3997
|
</div>
|
|
4107
|
-
<decidables-spinner min=${
|
|
4108
|
-
|
|
3998
|
+
<decidables-spinner min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
|
|
3999
|
+
`;
|
|
4109
4000
|
}
|
|
4110
|
-
|
|
4111
4001
|
}
|
|
4112
4002
|
customElements.define('decidables-slider', DecidablesSlider);
|
|
4113
4003
|
|
|
4114
|
-
let _$3 = t => t,
|
|
4115
|
-
_t$3,
|
|
4116
|
-
_t2$3;
|
|
4117
4004
|
class DecidablesSpinner extends DecidablesElement {
|
|
4118
4005
|
static get properties() {
|
|
4119
4006
|
return {
|
|
@@ -4144,23 +4031,21 @@
|
|
|
4144
4031
|
}
|
|
4145
4032
|
};
|
|
4146
4033
|
}
|
|
4147
|
-
|
|
4148
4034
|
constructor() {
|
|
4149
|
-
super();
|
|
4035
|
+
super();
|
|
4150
4036
|
|
|
4037
|
+
// Attributes
|
|
4151
4038
|
this.disabled = false;
|
|
4152
4039
|
this.max = undefined;
|
|
4153
4040
|
this.min = undefined;
|
|
4154
4041
|
this.step = undefined;
|
|
4155
4042
|
this.value = undefined;
|
|
4156
4043
|
}
|
|
4157
|
-
|
|
4158
4044
|
inputted(event) {
|
|
4159
4045
|
this.value = event.target.value;
|
|
4160
4046
|
}
|
|
4161
|
-
|
|
4162
4047
|
static get styles() {
|
|
4163
|
-
return [super.styles, r$
|
|
4048
|
+
return [super.styles, r$1`
|
|
4164
4049
|
:host {
|
|
4165
4050
|
---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
|
|
4166
4051
|
---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
|
|
@@ -4239,24 +4124,19 @@
|
|
|
4239
4124
|
margin: 0;
|
|
4240
4125
|
-webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
|
|
4241
4126
|
}
|
|
4242
|
-
`
|
|
4127
|
+
`];
|
|
4243
4128
|
}
|
|
4244
|
-
|
|
4245
4129
|
render() {
|
|
4246
|
-
return
|
|
4130
|
+
return x`
|
|
4247
4131
|
<label>
|
|
4248
4132
|
<slot></slot>
|
|
4249
|
-
<input ?disabled=${
|
|
4133
|
+
<input ?disabled=${this.disabled} type="number" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
|
|
4250
4134
|
</label>
|
|
4251
|
-
|
|
4135
|
+
`;
|
|
4252
4136
|
}
|
|
4253
|
-
|
|
4254
4137
|
}
|
|
4255
4138
|
customElements.define('decidables-spinner', DecidablesSpinner);
|
|
4256
4139
|
|
|
4257
|
-
let _$2 = t => t,
|
|
4258
|
-
_t$2,
|
|
4259
|
-
_t2$2;
|
|
4260
4140
|
class DecidablesSwitch extends DecidablesElement {
|
|
4261
4141
|
static get properties() {
|
|
4262
4142
|
return {
|
|
@@ -4272,14 +4152,13 @@
|
|
|
4272
4152
|
}
|
|
4273
4153
|
};
|
|
4274
4154
|
}
|
|
4275
|
-
|
|
4276
4155
|
constructor() {
|
|
4277
|
-
super();
|
|
4156
|
+
super();
|
|
4278
4157
|
|
|
4158
|
+
// Attributes
|
|
4279
4159
|
this.checked = false;
|
|
4280
4160
|
this.disabled = false;
|
|
4281
4161
|
}
|
|
4282
|
-
|
|
4283
4162
|
changed(event) {
|
|
4284
4163
|
this.checked = event.target.checked;
|
|
4285
4164
|
this.dispatchEvent(new CustomEvent('change', {
|
|
@@ -4289,9 +4168,8 @@
|
|
|
4289
4168
|
bubbles: true
|
|
4290
4169
|
}));
|
|
4291
4170
|
}
|
|
4292
|
-
|
|
4293
4171
|
static get styles() {
|
|
4294
|
-
return [super.styles, r$
|
|
4172
|
+
return [super.styles, r$1`
|
|
4295
4173
|
:host {
|
|
4296
4174
|
display: flex;
|
|
4297
4175
|
|
|
@@ -4410,27 +4288,22 @@
|
|
|
4410
4288
|
:host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
|
|
4411
4289
|
box-shadow: var(---shadow-8);
|
|
4412
4290
|
}
|
|
4413
|
-
`
|
|
4291
|
+
`];
|
|
4414
4292
|
}
|
|
4415
|
-
|
|
4416
4293
|
render() {
|
|
4417
|
-
return
|
|
4418
|
-
<input type="checkbox" id="switch" ?checked=${
|
|
4294
|
+
return x`
|
|
4295
|
+
<input type="checkbox" id="switch" ?checked=${this.checked} ?disabled=${this.disabled} @change=${this.changed.bind(this)}>
|
|
4419
4296
|
<label for="switch">
|
|
4420
4297
|
<slot name="off-label"></slot>
|
|
4421
4298
|
</label>
|
|
4422
4299
|
<label for="switch">
|
|
4423
4300
|
<slot></slot>
|
|
4424
4301
|
</label>
|
|
4425
|
-
|
|
4302
|
+
`;
|
|
4426
4303
|
}
|
|
4427
|
-
|
|
4428
4304
|
}
|
|
4429
4305
|
customElements.define('decidables-switch', DecidablesSwitch);
|
|
4430
4306
|
|
|
4431
|
-
let _$1 = t => t,
|
|
4432
|
-
_t$1,
|
|
4433
|
-
_t2$1;
|
|
4434
4307
|
class DecidablesToggle extends DecidablesElement {
|
|
4435
4308
|
static get properties() {
|
|
4436
4309
|
return {
|
|
@@ -4441,15 +4314,14 @@
|
|
|
4441
4314
|
}
|
|
4442
4315
|
};
|
|
4443
4316
|
}
|
|
4444
|
-
|
|
4445
4317
|
constructor() {
|
|
4446
|
-
super();
|
|
4318
|
+
super();
|
|
4447
4319
|
|
|
4320
|
+
// Attributes
|
|
4448
4321
|
this.disabled = false;
|
|
4449
4322
|
}
|
|
4450
|
-
|
|
4451
4323
|
static get styles() {
|
|
4452
|
-
return [super.styles, r$
|
|
4324
|
+
return [super.styles, r$1`
|
|
4453
4325
|
fieldset {
|
|
4454
4326
|
display: flex;
|
|
4455
4327
|
|
|
@@ -4466,24 +4338,19 @@
|
|
|
4466
4338
|
legend {
|
|
4467
4339
|
text-align: center;
|
|
4468
4340
|
}
|
|
4469
|
-
`
|
|
4341
|
+
`];
|
|
4470
4342
|
}
|
|
4471
|
-
|
|
4472
4343
|
render() {
|
|
4473
|
-
return
|
|
4474
|
-
<fieldset ?disabled=${
|
|
4344
|
+
return x`
|
|
4345
|
+
<fieldset ?disabled=${this.disabled}>
|
|
4475
4346
|
<legend><slot name="label"></slot></legend>
|
|
4476
4347
|
<slot></slot>
|
|
4477
4348
|
</fieldset>
|
|
4478
|
-
|
|
4349
|
+
`;
|
|
4479
4350
|
}
|
|
4480
|
-
|
|
4481
4351
|
}
|
|
4482
4352
|
customElements.define('decidables-toggle', DecidablesToggle);
|
|
4483
4353
|
|
|
4484
|
-
let _ = t => t,
|
|
4485
|
-
_t,
|
|
4486
|
-
_t2;
|
|
4487
4354
|
class DecidablesToggleOption extends DecidablesElement {
|
|
4488
4355
|
static get properties() {
|
|
4489
4356
|
return {
|
|
@@ -4509,16 +4376,15 @@
|
|
|
4509
4376
|
}
|
|
4510
4377
|
};
|
|
4511
4378
|
}
|
|
4512
|
-
|
|
4513
4379
|
constructor() {
|
|
4514
|
-
super();
|
|
4380
|
+
super();
|
|
4515
4381
|
|
|
4382
|
+
// Attributes
|
|
4516
4383
|
this.checked = false;
|
|
4517
4384
|
this.disabled = false;
|
|
4518
4385
|
this.name = undefined;
|
|
4519
4386
|
this.value = undefined;
|
|
4520
4387
|
}
|
|
4521
|
-
|
|
4522
4388
|
changed(event) {
|
|
4523
4389
|
this.checked = event.target.checked;
|
|
4524
4390
|
this.dispatchEvent(new CustomEvent('change', {
|
|
@@ -4529,9 +4395,8 @@
|
|
|
4529
4395
|
bubbles: true
|
|
4530
4396
|
}));
|
|
4531
4397
|
}
|
|
4532
|
-
|
|
4533
4398
|
static get styles() {
|
|
4534
|
-
return [super.styles, r$
|
|
4399
|
+
return [super.styles, r$1`
|
|
4535
4400
|
:host {
|
|
4536
4401
|
display: flex;
|
|
4537
4402
|
}
|
|
@@ -4624,18 +4489,16 @@
|
|
|
4624
4489
|
outline: none;
|
|
4625
4490
|
box-shadow: var(---shadow-8);
|
|
4626
4491
|
}
|
|
4627
|
-
`
|
|
4492
|
+
`];
|
|
4628
4493
|
}
|
|
4629
|
-
|
|
4630
4494
|
render() {
|
|
4631
|
-
return
|
|
4632
|
-
<input type="radio" id="toggle-option" name=${
|
|
4495
|
+
return x`
|
|
4496
|
+
<input type="radio" id="toggle-option" name=${this.name} value=${this.value} .checked=${this.checked} @change=${this.changed.bind(this)}>
|
|
4633
4497
|
<label for="toggle-option">
|
|
4634
4498
|
<slot></slot>
|
|
4635
4499
|
</label>
|
|
4636
|
-
|
|
4500
|
+
`;
|
|
4637
4501
|
}
|
|
4638
|
-
|
|
4639
4502
|
}
|
|
4640
4503
|
customElements.define('decidables-toggle-option', DecidablesToggleOption);
|
|
4641
4504
|
|
|
@@ -4679,7 +4542,5 @@
|
|
|
4679
4542
|
exports.DecidablesToggle = DecidablesToggle;
|
|
4680
4543
|
exports.DecidablesToggleOption = DecidablesToggleOption;
|
|
4681
4544
|
|
|
4682
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4683
|
-
|
|
4684
4545
|
}));
|
|
4685
4546
|
//# sourceMappingURL=decidablesElements.umd.js.map
|