@decidables/decidables-elements 0.0.4 → 0.2.0
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 +45 -0
- package/LICENSE.md +641 -750
- package/README.md +20 -9
- package/lib/decidablesElements.esm.js +2010 -2235
- package/lib/decidablesElements.esm.js.map +1 -1
- package/lib/decidablesElements.esm.min.js +757 -3
- package/lib/decidablesElements.esm.min.js.map +1 -1
- package/lib/decidablesElements.umd.js +2011 -2236
- package/lib/decidablesElements.umd.js.map +1 -1
- package/lib/decidablesElements.umd.min.js +757 -3
- package/lib/decidablesElements.umd.min.js.map +1 -1
- package/package.json +10 -7
- package/src/decidables-element.js +2 -26
- package/src/slider.js +2 -2
- package/src/switch.js +3 -3
- package/src/toggle-option.js +2 -2
|
@@ -1,1632 +1,873 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const t$1 = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
7
|
+
e$2 = Symbol(),
|
|
8
|
+
n$3 = new Map();
|
|
3
9
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
+
class s$3 {
|
|
11
|
+
constructor(t, n) {
|
|
12
|
+
if (this._$cssResult$ = !0, n !== e$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
13
|
+
this.cssText = t;
|
|
14
|
+
}
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var value = info.value;
|
|
15
|
-
} catch (error) {
|
|
16
|
-
reject(error);
|
|
17
|
-
return;
|
|
16
|
+
get styleSheet() {
|
|
17
|
+
let e = n$3.get(this.cssText);
|
|
18
|
+
return t$1 && void 0 === e && (n$3.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} else {
|
|
23
|
-
Promise.resolve(value).then(_next, _throw);
|
|
21
|
+
toString() {
|
|
22
|
+
return this.cssText;
|
|
24
23
|
}
|
|
24
|
+
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
const o$3 = t => new s$3("string" == typeof t ? t : t + "", e$2),
|
|
28
|
+
r$2 = (t, ...n) => {
|
|
29
|
+
const o = 1 === t.length ? t[0] : n.reduce((e, n, s) => e + (t => {
|
|
30
|
+
if (!0 === t._$cssResult$) return t.cssText;
|
|
31
|
+
if ("number" == typeof t) return t;
|
|
32
|
+
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.");
|
|
33
|
+
})(n) + t[s + 1], t[0]);
|
|
34
|
+
return new s$3(o, e$2);
|
|
35
|
+
},
|
|
36
|
+
i$1 = (e, n) => {
|
|
37
|
+
t$1 ? e.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(t => {
|
|
38
|
+
const n = document.createElement("style"),
|
|
39
|
+
s = window.litNonce;
|
|
40
|
+
void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
S$1 = t$1 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
44
|
+
let e = "";
|
|
33
45
|
|
|
34
|
-
|
|
35
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
36
|
-
}
|
|
46
|
+
for (const n of t.cssRules) e += n.cssText;
|
|
37
47
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
48
|
+
return o$3(e);
|
|
49
|
+
})(t) : t;
|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
51
|
+
/**
|
|
52
|
+
* @license
|
|
53
|
+
* Copyright 2017 Google LLC
|
|
54
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
+
*/
|
|
46
56
|
|
|
47
|
-
|
|
48
|
-
if (!(instance instanceof Constructor)) {
|
|
49
|
-
throw new TypeError("Cannot call a class as a function");
|
|
50
|
-
}
|
|
51
|
-
}
|
|
57
|
+
var s$2;
|
|
52
58
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
const e$1 = window.trustedTypes,
|
|
60
|
+
r$1 = e$1 ? e$1.emptyScript : "",
|
|
61
|
+
h$1 = window.reactiveElementPolyfillSupport,
|
|
62
|
+
o$2 = {
|
|
63
|
+
toAttribute(t, i) {
|
|
64
|
+
switch (i) {
|
|
65
|
+
case Boolean:
|
|
66
|
+
t = t ? r$1 : null;
|
|
67
|
+
break;
|
|
62
68
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
writable: false
|
|
68
|
-
});
|
|
69
|
-
return Constructor;
|
|
70
|
-
}
|
|
69
|
+
case Object:
|
|
70
|
+
case Array:
|
|
71
|
+
t = null == t ? t : JSON.stringify(t);
|
|
72
|
+
}
|
|
71
73
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Object.defineProperty(obj, key, {
|
|
75
|
-
value: value,
|
|
76
|
-
enumerable: true,
|
|
77
|
-
configurable: true,
|
|
78
|
-
writable: true
|
|
79
|
-
});
|
|
80
|
-
} else {
|
|
81
|
-
obj[key] = value;
|
|
82
|
-
}
|
|
74
|
+
return t;
|
|
75
|
+
},
|
|
83
76
|
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
fromAttribute(t, i) {
|
|
78
|
+
let s = t;
|
|
86
79
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
switch (i) {
|
|
81
|
+
case Boolean:
|
|
82
|
+
s = null !== t;
|
|
83
|
+
break;
|
|
91
84
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
writable: true,
|
|
96
|
-
configurable: true
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
Object.defineProperty(subClass, "prototype", {
|
|
100
|
-
writable: false
|
|
101
|
-
});
|
|
102
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
103
|
-
}
|
|
85
|
+
case Number:
|
|
86
|
+
s = null === t ? null : Number(t);
|
|
87
|
+
break;
|
|
104
88
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
89
|
+
case Object:
|
|
90
|
+
case Array:
|
|
91
|
+
try {
|
|
92
|
+
s = JSON.parse(t);
|
|
93
|
+
} catch (t) {
|
|
94
|
+
s = null;
|
|
95
|
+
}
|
|
111
96
|
|
|
112
|
-
|
|
113
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
114
|
-
o.__proto__ = p;
|
|
115
|
-
return o;
|
|
116
|
-
};
|
|
97
|
+
}
|
|
117
98
|
|
|
118
|
-
|
|
119
|
-
}
|
|
99
|
+
return s;
|
|
100
|
+
}
|
|
120
101
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
102
|
+
},
|
|
103
|
+
n$2 = (t, i) => i !== t && (i == i || t == t),
|
|
104
|
+
l$3 = {
|
|
105
|
+
attribute: !0,
|
|
106
|
+
type: String,
|
|
107
|
+
converter: o$2,
|
|
108
|
+
reflect: !1,
|
|
109
|
+
hasChanged: n$2
|
|
110
|
+
};
|
|
125
111
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
} catch (e) {
|
|
130
|
-
return false;
|
|
112
|
+
class a$1 extends HTMLElement {
|
|
113
|
+
constructor() {
|
|
114
|
+
super(), this._$Et = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$Ei = null, this.o();
|
|
131
115
|
}
|
|
132
|
-
}
|
|
133
116
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
} else {
|
|
138
|
-
_construct = function _construct(Parent, args, Class) {
|
|
139
|
-
var a = [null];
|
|
140
|
-
a.push.apply(a, args);
|
|
141
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
142
|
-
var instance = new Constructor();
|
|
143
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
144
|
-
return instance;
|
|
145
|
-
};
|
|
117
|
+
static addInitializer(t) {
|
|
118
|
+
var i;
|
|
119
|
+
null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
|
|
146
120
|
}
|
|
147
121
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function _wrapNativeSuper(Class) {
|
|
156
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
122
|
+
static get observedAttributes() {
|
|
123
|
+
this.finalize();
|
|
124
|
+
const t = [];
|
|
125
|
+
return this.elementProperties.forEach((i, s) => {
|
|
126
|
+
const e = this._$Eh(s, i);
|
|
157
127
|
|
|
158
|
-
|
|
159
|
-
|
|
128
|
+
void 0 !== e && (this._$Eu.set(e, s), t.push(e));
|
|
129
|
+
}), t;
|
|
130
|
+
}
|
|
160
131
|
|
|
161
|
-
|
|
162
|
-
|
|
132
|
+
static createProperty(t, i = l$3) {
|
|
133
|
+
if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
134
|
+
const s = "symbol" == typeof t ? Symbol() : "__" + t,
|
|
135
|
+
e = this.getPropertyDescriptor(t, s, i);
|
|
136
|
+
void 0 !== e && Object.defineProperty(this.prototype, t, e);
|
|
163
137
|
}
|
|
138
|
+
}
|
|
164
139
|
|
|
165
|
-
|
|
166
|
-
|
|
140
|
+
static getPropertyDescriptor(t, i, s) {
|
|
141
|
+
return {
|
|
142
|
+
get() {
|
|
143
|
+
return this[i];
|
|
144
|
+
},
|
|
167
145
|
|
|
168
|
-
|
|
169
|
-
|
|
146
|
+
set(e) {
|
|
147
|
+
const r = this[t];
|
|
148
|
+
this[i] = e, this.requestUpdate(t, r, s);
|
|
149
|
+
},
|
|
170
150
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
151
|
+
configurable: !0,
|
|
152
|
+
enumerable: !0
|
|
153
|
+
};
|
|
154
|
+
}
|
|
174
155
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
enumerable: false,
|
|
179
|
-
writable: true,
|
|
180
|
-
configurable: true
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
return _setPrototypeOf(Wrapper, Class);
|
|
184
|
-
};
|
|
156
|
+
static getPropertyOptions(t) {
|
|
157
|
+
return this.elementProperties.get(t) || l$3;
|
|
158
|
+
}
|
|
185
159
|
|
|
186
|
-
|
|
187
|
-
|
|
160
|
+
static finalize() {
|
|
161
|
+
if (this.hasOwnProperty("finalized")) return !1;
|
|
162
|
+
this.finalized = !0;
|
|
163
|
+
const t = Object.getPrototypeOf(this);
|
|
188
164
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
165
|
+
if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
|
|
166
|
+
const t = this.properties,
|
|
167
|
+
i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
193
168
|
|
|
194
|
-
|
|
195
|
-
}
|
|
169
|
+
for (const s of i) this.createProperty(s, t[s]);
|
|
170
|
+
}
|
|
196
171
|
|
|
197
|
-
|
|
198
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
199
|
-
return call;
|
|
200
|
-
} else if (call !== void 0) {
|
|
201
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
172
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
202
173
|
}
|
|
203
174
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
function _createSuper(Derived) {
|
|
208
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
175
|
+
static finalizeStyles(i) {
|
|
176
|
+
const s = [];
|
|
209
177
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
result;
|
|
178
|
+
if (Array.isArray(i)) {
|
|
179
|
+
const e = new Set(i.flat(1 / 0).reverse());
|
|
213
180
|
|
|
214
|
-
|
|
215
|
-
|
|
181
|
+
for (const i of e) s.unshift(S$1(i));
|
|
182
|
+
} else void 0 !== i && s.push(S$1(i));
|
|
216
183
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
result = Super.apply(this, arguments);
|
|
220
|
-
}
|
|
184
|
+
return s;
|
|
185
|
+
}
|
|
221
186
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
187
|
+
static _$Eh(t, i) {
|
|
188
|
+
const s = i.attribute;
|
|
189
|
+
return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
190
|
+
}
|
|
225
191
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
if (object === null) break;
|
|
192
|
+
o() {
|
|
193
|
+
var t;
|
|
194
|
+
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));
|
|
230
195
|
}
|
|
231
196
|
|
|
232
|
-
|
|
233
|
-
|
|
197
|
+
addController(t) {
|
|
198
|
+
var i, s;
|
|
199
|
+
(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));
|
|
200
|
+
}
|
|
234
201
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
_get = function _get(target, property, receiver) {
|
|
240
|
-
var base = _superPropBase(target, property);
|
|
202
|
+
removeController(t) {
|
|
203
|
+
var i;
|
|
204
|
+
null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
|
|
205
|
+
}
|
|
241
206
|
|
|
242
|
-
|
|
243
|
-
|
|
207
|
+
_$Em() {
|
|
208
|
+
this.constructor.elementProperties.forEach((t, i) => {
|
|
209
|
+
this.hasOwnProperty(i) && (this._$Et.set(i, this[i]), delete this[i]);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
244
212
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
213
|
+
createRenderRoot() {
|
|
214
|
+
var t;
|
|
215
|
+
const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
216
|
+
return i$1(s, this.constructor.elementStyles), s;
|
|
217
|
+
}
|
|
248
218
|
|
|
249
|
-
|
|
250
|
-
|
|
219
|
+
connectedCallback() {
|
|
220
|
+
var t;
|
|
221
|
+
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
222
|
+
var i;
|
|
223
|
+
return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
|
|
224
|
+
});
|
|
251
225
|
}
|
|
252
226
|
|
|
253
|
-
|
|
254
|
-
}
|
|
227
|
+
enableUpdating(t) {}
|
|
255
228
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
229
|
+
disconnectedCallback() {
|
|
230
|
+
var t;
|
|
231
|
+
null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
232
|
+
var i;
|
|
233
|
+
return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
|
|
234
|
+
});
|
|
259
235
|
}
|
|
260
236
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
}));
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
function _slicedToArray(arr, i) {
|
|
269
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
270
|
-
}
|
|
237
|
+
attributeChangedCallback(t, i, s) {
|
|
238
|
+
this._$AK(t, s);
|
|
239
|
+
}
|
|
271
240
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
241
|
+
_$ES(t, i, s = l$3) {
|
|
242
|
+
var e, r;
|
|
275
243
|
|
|
276
|
-
|
|
277
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
278
|
-
}
|
|
244
|
+
const h = this.constructor._$Eh(t, s);
|
|
279
245
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
246
|
+
if (void 0 !== h && !0 === s.reflect) {
|
|
247
|
+
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);
|
|
248
|
+
this._$Ei = t, null == n ? this.removeAttribute(h) : this.setAttribute(h, n), this._$Ei = null;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
283
251
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
252
|
+
_$AK(t, i) {
|
|
253
|
+
var s, e, r;
|
|
287
254
|
|
|
288
|
-
|
|
289
|
-
|
|
255
|
+
const h = this.constructor,
|
|
256
|
+
n = h._$Eu.get(t);
|
|
290
257
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
258
|
+
if (void 0 !== n && this._$Ei !== n) {
|
|
259
|
+
const t = h.getPropertyOptions(n),
|
|
260
|
+
l = t.converter,
|
|
261
|
+
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$2.fromAttribute;
|
|
262
|
+
this._$Ei = n, this[n] = a(i, t.type), this._$Ei = null;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
295
265
|
|
|
296
|
-
|
|
266
|
+
requestUpdate(t, i, s) {
|
|
267
|
+
let e = !0;
|
|
268
|
+
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$2)(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_());
|
|
269
|
+
}
|
|
297
270
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
_arr.push(_s.value);
|
|
271
|
+
async _$E_() {
|
|
272
|
+
this.isUpdatePending = !0;
|
|
301
273
|
|
|
302
|
-
if (i && _arr.length === i) break;
|
|
303
|
-
}
|
|
304
|
-
} catch (err) {
|
|
305
|
-
_d = true;
|
|
306
|
-
_e = err;
|
|
307
|
-
} finally {
|
|
308
274
|
try {
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
|
|
275
|
+
await this._$Ep;
|
|
276
|
+
} catch (t) {
|
|
277
|
+
Promise.reject(t);
|
|
312
278
|
}
|
|
313
|
-
}
|
|
314
279
|
|
|
315
|
-
|
|
316
|
-
|
|
280
|
+
const t = this.scheduleUpdate();
|
|
281
|
+
return null != t && (await t), !this.isUpdatePending;
|
|
282
|
+
}
|
|
317
283
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
322
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
323
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
324
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
325
|
-
}
|
|
284
|
+
scheduleUpdate() {
|
|
285
|
+
return this.performUpdate();
|
|
286
|
+
}
|
|
326
287
|
|
|
327
|
-
|
|
328
|
-
|
|
288
|
+
performUpdate() {
|
|
289
|
+
var t;
|
|
290
|
+
if (!this.isUpdatePending) return;
|
|
291
|
+
this.hasUpdated, this._$Et && (this._$Et.forEach((t, i) => this[i] = t), this._$Et = void 0);
|
|
292
|
+
let i = !1;
|
|
293
|
+
const s = this._$AL;
|
|
329
294
|
|
|
330
|
-
|
|
295
|
+
try {
|
|
296
|
+
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
297
|
+
var i;
|
|
298
|
+
return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
|
|
299
|
+
}), this.update(s)) : this._$EU();
|
|
300
|
+
} catch (t) {
|
|
301
|
+
throw i = !1, this._$EU(), t;
|
|
302
|
+
}
|
|
331
303
|
|
|
332
|
-
|
|
333
|
-
}
|
|
304
|
+
i && this._$AE(s);
|
|
305
|
+
}
|
|
334
306
|
|
|
335
|
-
|
|
336
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
337
|
-
}
|
|
307
|
+
willUpdate(t) {}
|
|
338
308
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
309
|
+
_$AE(t) {
|
|
310
|
+
var i;
|
|
311
|
+
null === (i = this._$Eg) || void 0 === i || i.forEach(t => {
|
|
312
|
+
var i;
|
|
313
|
+
return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
|
|
314
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
315
|
+
}
|
|
342
316
|
|
|
343
|
-
|
|
344
|
-
|
|
317
|
+
_$EU() {
|
|
318
|
+
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
319
|
+
}
|
|
345
320
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
var i = 0;
|
|
321
|
+
get updateComplete() {
|
|
322
|
+
return this.getUpdateComplete();
|
|
323
|
+
}
|
|
350
324
|
|
|
351
|
-
|
|
325
|
+
getUpdateComplete() {
|
|
326
|
+
return this._$Ep;
|
|
327
|
+
}
|
|
352
328
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
if (i >= o.length) return {
|
|
357
|
-
done: true
|
|
358
|
-
};
|
|
359
|
-
return {
|
|
360
|
-
done: false,
|
|
361
|
-
value: o[i++]
|
|
362
|
-
};
|
|
363
|
-
},
|
|
364
|
-
e: function (e) {
|
|
365
|
-
throw e;
|
|
366
|
-
},
|
|
367
|
-
f: F
|
|
368
|
-
};
|
|
369
|
-
}
|
|
329
|
+
shouldUpdate(t) {
|
|
330
|
+
return !0;
|
|
331
|
+
}
|
|
370
332
|
|
|
371
|
-
|
|
333
|
+
update(t) {
|
|
334
|
+
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$ES(i, this[i], t)), this._$EC = void 0), this._$EU();
|
|
372
335
|
}
|
|
373
336
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
s: function () {
|
|
379
|
-
it = it.call(o);
|
|
380
|
-
},
|
|
381
|
-
n: function () {
|
|
382
|
-
var step = it.next();
|
|
383
|
-
normalCompletion = step.done;
|
|
384
|
-
return step;
|
|
385
|
-
},
|
|
386
|
-
e: function (e) {
|
|
387
|
-
didErr = true;
|
|
388
|
-
err = e;
|
|
389
|
-
},
|
|
390
|
-
f: function () {
|
|
391
|
-
try {
|
|
392
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
393
|
-
} finally {
|
|
394
|
-
if (didErr) throw err;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
};
|
|
337
|
+
updated(t) {}
|
|
338
|
+
|
|
339
|
+
firstUpdated(t) {}
|
|
340
|
+
|
|
398
341
|
}
|
|
399
342
|
|
|
343
|
+
a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = {
|
|
344
|
+
mode: "open"
|
|
345
|
+
}, null == h$1 || h$1({
|
|
346
|
+
ReactiveElement: a$1
|
|
347
|
+
}), (null !== (s$2 = globalThis.reactiveElementVersions) && void 0 !== s$2 ? s$2 : globalThis.reactiveElementVersions = []).push("1.3.1");
|
|
348
|
+
|
|
400
349
|
/**
|
|
401
350
|
* @license
|
|
402
|
-
* Copyright
|
|
351
|
+
* Copyright 2017 Google LLC
|
|
403
352
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
404
353
|
*/
|
|
405
|
-
var t
|
|
406
|
-
e$2 = Symbol(),
|
|
407
|
-
n$3 = new Map();
|
|
354
|
+
var t;
|
|
408
355
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
356
|
+
const i = globalThis.trustedTypes,
|
|
357
|
+
s$1 = i ? i.createPolicy("lit-html", {
|
|
358
|
+
createHTML: t => t
|
|
359
|
+
}) : void 0,
|
|
360
|
+
e = `lit$${(Math.random() + "").slice(9)}$`,
|
|
361
|
+
o$1 = "?" + e,
|
|
362
|
+
n$1 = `<${o$1}>`,
|
|
363
|
+
l$2 = document,
|
|
364
|
+
h = (t = "") => l$2.createComment(t),
|
|
365
|
+
r = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
366
|
+
d = Array.isArray,
|
|
367
|
+
u = t => {
|
|
368
|
+
var i;
|
|
369
|
+
return d(t) || "function" == typeof (null === (i = t) || void 0 === i ? void 0 : i[Symbol.iterator]);
|
|
370
|
+
},
|
|
371
|
+
c = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
372
|
+
v = /-->/g,
|
|
373
|
+
a = />/g,
|
|
374
|
+
f = />|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,
|
|
375
|
+
_$7 = /'/g,
|
|
376
|
+
m = /"/g,
|
|
377
|
+
g = /^(?:script|style|textarea|title)$/i,
|
|
378
|
+
p = t => (i, ...s) => ({
|
|
379
|
+
_$litType$: t,
|
|
380
|
+
strings: i,
|
|
381
|
+
values: s
|
|
382
|
+
}),
|
|
383
|
+
$ = p(1),
|
|
384
|
+
y = p(2),
|
|
385
|
+
b = Symbol.for("lit-noChange"),
|
|
386
|
+
w = Symbol.for("lit-nothing"),
|
|
387
|
+
T = new WeakMap(),
|
|
388
|
+
x = (t, i, s) => {
|
|
389
|
+
var e, o;
|
|
390
|
+
const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
|
|
391
|
+
let l = n._$litPart$;
|
|
412
392
|
|
|
413
|
-
|
|
414
|
-
|
|
393
|
+
if (void 0 === l) {
|
|
394
|
+
const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
|
|
395
|
+
n._$litPart$ = l = new N(i.insertBefore(h(), t), t, void 0, null != s ? s : {});
|
|
415
396
|
}
|
|
416
397
|
|
|
417
|
-
|
|
418
|
-
key: "styleSheet",
|
|
419
|
-
get: function get() {
|
|
420
|
-
var e = n$3.get(this.cssText);
|
|
421
|
-
return t$1 && void 0 === e && (n$3.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
|
|
422
|
-
}
|
|
423
|
-
}, {
|
|
424
|
-
key: "toString",
|
|
425
|
-
value: function toString() {
|
|
426
|
-
return this.cssText;
|
|
427
|
-
}
|
|
428
|
-
}]);
|
|
429
|
-
|
|
430
|
-
return s;
|
|
431
|
-
}();
|
|
432
|
-
|
|
433
|
-
var o$3 = function o(t) {
|
|
434
|
-
return new s$3("string" == typeof t ? t : t + "", e$2);
|
|
435
|
-
},
|
|
436
|
-
r$2 = function r(t) {
|
|
437
|
-
for (var _len = arguments.length, n = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
438
|
-
n[_key - 1] = arguments[_key];
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
var o = 1 === t.length ? t[0] : n.reduce(function (e, n, s) {
|
|
442
|
-
return e + function (t) {
|
|
443
|
-
if (!0 === t._$cssResult$) return t.cssText;
|
|
444
|
-
if ("number" == typeof t) return t;
|
|
445
|
-
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.");
|
|
446
|
-
}(n) + t[s + 1];
|
|
447
|
-
}, t[0]);
|
|
448
|
-
return new s$3(o, e$2);
|
|
449
|
-
},
|
|
450
|
-
i$1 = function i(e, n) {
|
|
451
|
-
t$1 ? e.adoptedStyleSheets = n.map(function (t) {
|
|
452
|
-
return t instanceof CSSStyleSheet ? t : t.styleSheet;
|
|
453
|
-
}) : n.forEach(function (t) {
|
|
454
|
-
var n = document.createElement("style"),
|
|
455
|
-
s = window.litNonce;
|
|
456
|
-
void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
|
|
457
|
-
});
|
|
398
|
+
return l._$AI(t), l;
|
|
458
399
|
},
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
400
|
+
A = l$2.createTreeWalker(l$2, 129, null, !1),
|
|
401
|
+
C = (t, i) => {
|
|
402
|
+
const o = t.length - 1,
|
|
403
|
+
l = [];
|
|
404
|
+
let h,
|
|
405
|
+
r = 2 === i ? "<svg>" : "",
|
|
406
|
+
d = c;
|
|
464
407
|
|
|
465
|
-
|
|
466
|
-
|
|
408
|
+
for (let i = 0; i < o; i++) {
|
|
409
|
+
const s = t[i];
|
|
410
|
+
let o,
|
|
411
|
+
u,
|
|
412
|
+
p = -1,
|
|
413
|
+
$ = 0;
|
|
467
414
|
|
|
468
|
-
|
|
469
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
470
|
-
var _n = _step.value;
|
|
471
|
-
e += _n.cssText;
|
|
472
|
-
}
|
|
473
|
-
} catch (err) {
|
|
474
|
-
_iterator.e(err);
|
|
475
|
-
} finally {
|
|
476
|
-
_iterator.f();
|
|
477
|
-
}
|
|
415
|
+
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);
|
|
478
416
|
|
|
479
|
-
|
|
480
|
-
|
|
417
|
+
const y = d === f && t[i + 1].startsWith("/>") ? " " : "";
|
|
418
|
+
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);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
const u = r + (t[o] || "<?>") + (2 === i ? "</svg>" : "");
|
|
422
|
+
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
423
|
+
return [void 0 !== s$1 ? s$1.createHTML(u) : u, l];
|
|
481
424
|
};
|
|
482
425
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
426
|
+
class E {
|
|
427
|
+
constructor({
|
|
428
|
+
strings: t,
|
|
429
|
+
_$litType$: s
|
|
430
|
+
}, n) {
|
|
431
|
+
let l;
|
|
432
|
+
this.parts = [];
|
|
433
|
+
let r = 0,
|
|
434
|
+
d = 0;
|
|
435
|
+
const u = t.length - 1,
|
|
436
|
+
c = this.parts,
|
|
437
|
+
[v, a] = C(t, s);
|
|
488
438
|
|
|
489
|
-
|
|
439
|
+
if (this.el = E.createElement(v, n), A.currentNode = this.el.content, 2 === s) {
|
|
440
|
+
const t = this.el.content,
|
|
441
|
+
i = t.firstChild;
|
|
442
|
+
i.remove(), t.append(...i.childNodes);
|
|
443
|
+
}
|
|
490
444
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
445
|
+
for (; null !== (l = A.nextNode()) && c.length < u;) {
|
|
446
|
+
if (1 === l.nodeType) {
|
|
447
|
+
if (l.hasAttributes()) {
|
|
448
|
+
const t = [];
|
|
449
|
+
|
|
450
|
+
for (const i of l.getAttributeNames()) if (i.endsWith("$lit$") || i.startsWith(e)) {
|
|
451
|
+
const s = a[d++];
|
|
452
|
+
|
|
453
|
+
if (t.push(i), void 0 !== s) {
|
|
454
|
+
const t = l.getAttribute(s.toLowerCase() + "$lit$").split(e),
|
|
455
|
+
i = /([.?@])?(.*)/.exec(s);
|
|
456
|
+
c.push({
|
|
457
|
+
type: 1,
|
|
458
|
+
index: r,
|
|
459
|
+
name: i[2],
|
|
460
|
+
strings: t,
|
|
461
|
+
ctor: "." === i[1] ? M : "?" === i[1] ? H : "@" === i[1] ? I : S
|
|
462
|
+
});
|
|
463
|
+
} else c.push({
|
|
464
|
+
type: 6,
|
|
465
|
+
index: r
|
|
466
|
+
});
|
|
467
|
+
}
|
|
500
468
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
t = null == t ? t : JSON.stringify(t);
|
|
504
|
-
}
|
|
469
|
+
for (const i of t) l.removeAttribute(i);
|
|
470
|
+
}
|
|
505
471
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
var s = t;
|
|
472
|
+
if (g.test(l.tagName)) {
|
|
473
|
+
const t = l.textContent.split(e),
|
|
474
|
+
s = t.length - 1;
|
|
510
475
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
s = null !== t;
|
|
514
|
-
break;
|
|
476
|
+
if (s > 0) {
|
|
477
|
+
l.textContent = i ? i.emptyScript : "";
|
|
515
478
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
479
|
+
for (let i = 0; i < s; i++) l.append(t[i], h()), A.nextNode(), c.push({
|
|
480
|
+
type: 2,
|
|
481
|
+
index: ++r
|
|
482
|
+
});
|
|
519
483
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
try {
|
|
523
|
-
s = JSON.parse(t);
|
|
524
|
-
} catch (t) {
|
|
525
|
-
s = null;
|
|
484
|
+
l.append(t[s], h());
|
|
485
|
+
}
|
|
526
486
|
}
|
|
487
|
+
} else if (8 === l.nodeType) if (l.data === o$1) c.push({
|
|
488
|
+
type: 2,
|
|
489
|
+
index: r
|
|
490
|
+
});else {
|
|
491
|
+
let t = -1;
|
|
492
|
+
|
|
493
|
+
for (; -1 !== (t = l.data.indexOf(e, t + 1));) c.push({
|
|
494
|
+
type: 7,
|
|
495
|
+
index: r
|
|
496
|
+
}), t += e.length - 1;
|
|
497
|
+
}
|
|
527
498
|
|
|
499
|
+
r++;
|
|
528
500
|
}
|
|
501
|
+
}
|
|
529
502
|
|
|
530
|
-
|
|
503
|
+
static createElement(t, i) {
|
|
504
|
+
const s = l$2.createElement("template");
|
|
505
|
+
return s.innerHTML = t, s;
|
|
531
506
|
}
|
|
532
|
-
},
|
|
533
|
-
n$2 = function n(t, i) {
|
|
534
|
-
return i !== t && (i == i || t == t);
|
|
535
|
-
},
|
|
536
|
-
l$3 = {
|
|
537
|
-
attribute: !0,
|
|
538
|
-
type: String,
|
|
539
|
-
converter: o$2,
|
|
540
|
-
reflect: !1,
|
|
541
|
-
hasChanged: n$2
|
|
542
|
-
};
|
|
543
507
|
|
|
544
|
-
|
|
545
|
-
_inherits(a, _HTMLElement);
|
|
508
|
+
}
|
|
546
509
|
|
|
547
|
-
|
|
510
|
+
function P(t, i, s = t, e) {
|
|
511
|
+
var o, n, l, h;
|
|
512
|
+
if (i === b) return i;
|
|
513
|
+
let d = void 0 !== e ? null === (o = s._$Cl) || void 0 === o ? void 0 : o[e] : s._$Cu;
|
|
514
|
+
const u = r(i) ? void 0 : i._$litDirective$;
|
|
515
|
+
return (null == d ? void 0 : d.constructor) !== u && (null === (n = null == d ? void 0 : d._$AO) || void 0 === n || n.call(d, !1), void 0 === u ? d = void 0 : (d = new u(t), d._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Cl) && void 0 !== l ? l : h._$Cl = [])[e] = d : s._$Cu = d), void 0 !== d && (i = P(t, d._$AS(t, i.values), d, e)), i;
|
|
516
|
+
}
|
|
548
517
|
|
|
549
|
-
|
|
550
|
-
|
|
518
|
+
class V {
|
|
519
|
+
constructor(t, i) {
|
|
520
|
+
this.v = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
521
|
+
}
|
|
551
522
|
|
|
552
|
-
|
|
523
|
+
get parentNode() {
|
|
524
|
+
return this._$AM.parentNode;
|
|
525
|
+
}
|
|
553
526
|
|
|
554
|
-
|
|
555
|
-
return
|
|
527
|
+
get _$AU() {
|
|
528
|
+
return this._$AM._$AU;
|
|
556
529
|
}
|
|
557
530
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
531
|
+
p(t) {
|
|
532
|
+
var i;
|
|
533
|
+
const {
|
|
534
|
+
el: {
|
|
535
|
+
content: s
|
|
536
|
+
},
|
|
537
|
+
parts: e
|
|
538
|
+
} = this._$AD,
|
|
539
|
+
o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : l$2).importNode(s, !0);
|
|
540
|
+
A.currentNode = o;
|
|
541
|
+
let n = A.nextNode(),
|
|
542
|
+
h = 0,
|
|
543
|
+
r = 0,
|
|
544
|
+
d = e[0];
|
|
545
|
+
|
|
546
|
+
for (; void 0 !== d;) {
|
|
547
|
+
if (h === d.index) {
|
|
548
|
+
let i;
|
|
549
|
+
2 === d.type ? i = new N(n, n.nextSibling, this, t) : 1 === d.type ? i = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (i = new L(n, this, t)), this.v.push(i), d = e[++r];
|
|
550
|
+
}
|
|
562
551
|
|
|
563
|
-
|
|
564
|
-
this._$Ep = new Promise(function (t) {
|
|
565
|
-
return _this2.enableUpdating = t;
|
|
566
|
-
}), this._$AL = new Map(), this._$Em(), this.requestUpdate(), null === (t = this.constructor.l) || void 0 === t || t.forEach(function (t) {
|
|
567
|
-
return t(_this2);
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
}, {
|
|
571
|
-
key: "addController",
|
|
572
|
-
value: function addController(t) {
|
|
573
|
-
var i, s;
|
|
574
|
-
(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));
|
|
575
|
-
}
|
|
576
|
-
}, {
|
|
577
|
-
key: "removeController",
|
|
578
|
-
value: function removeController(t) {
|
|
579
|
-
var i;
|
|
580
|
-
null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
|
|
552
|
+
h !== (null == d ? void 0 : d.index) && (n = A.nextNode(), h++);
|
|
581
553
|
}
|
|
582
|
-
}, {
|
|
583
|
-
key: "_$Em",
|
|
584
|
-
value: function _$Em() {
|
|
585
|
-
var _this3 = this;
|
|
586
554
|
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
}, {
|
|
592
|
-
key: "createRenderRoot",
|
|
593
|
-
value: function createRenderRoot() {
|
|
594
|
-
var t;
|
|
595
|
-
var s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
596
|
-
return i$1(s, this.constructor.elementStyles), s;
|
|
597
|
-
}
|
|
598
|
-
}, {
|
|
599
|
-
key: "connectedCallback",
|
|
600
|
-
value: function connectedCallback() {
|
|
601
|
-
var t;
|
|
602
|
-
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {
|
|
603
|
-
var i;
|
|
604
|
-
return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
|
|
605
|
-
});
|
|
606
|
-
}
|
|
607
|
-
}, {
|
|
608
|
-
key: "enableUpdating",
|
|
609
|
-
value: function enableUpdating(t) {}
|
|
610
|
-
}, {
|
|
611
|
-
key: "disconnectedCallback",
|
|
612
|
-
value: function disconnectedCallback() {
|
|
613
|
-
var t;
|
|
614
|
-
null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {
|
|
615
|
-
var i;
|
|
616
|
-
return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
|
-
}, {
|
|
620
|
-
key: "attributeChangedCallback",
|
|
621
|
-
value: function attributeChangedCallback(t, i, s) {
|
|
622
|
-
this._$AK(t, s);
|
|
623
|
-
}
|
|
624
|
-
}, {
|
|
625
|
-
key: "_$ES",
|
|
626
|
-
value: function _$ES(t, i) {
|
|
627
|
-
var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : l$3;
|
|
628
|
-
var e, r;
|
|
555
|
+
return o;
|
|
556
|
+
}
|
|
629
557
|
|
|
630
|
-
|
|
558
|
+
m(t) {
|
|
559
|
+
let i = 0;
|
|
631
560
|
|
|
632
|
-
|
|
633
|
-
|
|
561
|
+
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++;
|
|
562
|
+
}
|
|
634
563
|
|
|
635
|
-
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
}, {
|
|
639
|
-
key: "_$AK",
|
|
640
|
-
value: function _$AK(t, i) {
|
|
641
|
-
var s, e, r;
|
|
564
|
+
}
|
|
642
565
|
|
|
643
|
-
|
|
644
|
-
|
|
566
|
+
class N {
|
|
567
|
+
constructor(t, i, s, e) {
|
|
568
|
+
var o;
|
|
569
|
+
this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cg = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
|
|
570
|
+
}
|
|
645
571
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
572
|
+
get _$AU() {
|
|
573
|
+
var t, i;
|
|
574
|
+
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cg;
|
|
575
|
+
}
|
|
650
576
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
value: function requestUpdate(t, i, s) {
|
|
657
|
-
var e = !0;
|
|
658
|
-
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$2)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$E_ && (this._$E_ = new Map()), this._$E_.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$EC());
|
|
659
|
-
}
|
|
660
|
-
}, {
|
|
661
|
-
key: "_$EC",
|
|
662
|
-
value: function () {
|
|
663
|
-
var _$EC2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
664
|
-
var t;
|
|
665
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
666
|
-
while (1) {
|
|
667
|
-
switch (_context.prev = _context.next) {
|
|
668
|
-
case 0:
|
|
669
|
-
this.isUpdatePending = !0;
|
|
670
|
-
_context.prev = 1;
|
|
671
|
-
_context.next = 4;
|
|
672
|
-
return this._$Ep;
|
|
673
|
-
|
|
674
|
-
case 4:
|
|
675
|
-
_context.next = 9;
|
|
676
|
-
break;
|
|
677
|
-
|
|
678
|
-
case 6:
|
|
679
|
-
_context.prev = 6;
|
|
680
|
-
_context.t0 = _context["catch"](1);
|
|
681
|
-
Promise.reject(_context.t0);
|
|
682
|
-
|
|
683
|
-
case 9:
|
|
684
|
-
t = this.scheduleUpdate();
|
|
685
|
-
_context.t1 = null != t;
|
|
686
|
-
|
|
687
|
-
if (!_context.t1) {
|
|
688
|
-
_context.next = 14;
|
|
689
|
-
break;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
_context.next = 14;
|
|
693
|
-
return t;
|
|
694
|
-
|
|
695
|
-
case 14:
|
|
696
|
-
return _context.abrupt("return", !this.isUpdatePending);
|
|
697
|
-
|
|
698
|
-
case 15:
|
|
699
|
-
case "end":
|
|
700
|
-
return _context.stop();
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
}, _callee, this, [[1, 6]]);
|
|
704
|
-
}));
|
|
577
|
+
get parentNode() {
|
|
578
|
+
let t = this._$AA.parentNode;
|
|
579
|
+
const i = this._$AM;
|
|
580
|
+
return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;
|
|
581
|
+
}
|
|
705
582
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
583
|
+
get startNode() {
|
|
584
|
+
return this._$AA;
|
|
585
|
+
}
|
|
709
586
|
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
}
|
|
713
|
-
key: "scheduleUpdate",
|
|
714
|
-
value: function scheduleUpdate() {
|
|
715
|
-
return this.performUpdate();
|
|
716
|
-
}
|
|
717
|
-
}, {
|
|
718
|
-
key: "performUpdate",
|
|
719
|
-
value: function performUpdate() {
|
|
720
|
-
var _this4 = this;
|
|
721
|
-
|
|
722
|
-
var t;
|
|
723
|
-
if (!this.isUpdatePending) return;
|
|
724
|
-
this.hasUpdated, this._$Et && (this._$Et.forEach(function (t, i) {
|
|
725
|
-
return _this4[i] = t;
|
|
726
|
-
}), this._$Et = void 0);
|
|
727
|
-
var i = !1;
|
|
728
|
-
var s = this._$AL;
|
|
729
|
-
|
|
730
|
-
try {
|
|
731
|
-
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {
|
|
732
|
-
var i;
|
|
733
|
-
return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
|
|
734
|
-
}), this.update(s)) : this._$EU();
|
|
735
|
-
} catch (t) {
|
|
736
|
-
throw i = !1, this._$EU(), t;
|
|
737
|
-
}
|
|
587
|
+
get endNode() {
|
|
588
|
+
return this._$AB;
|
|
589
|
+
}
|
|
738
590
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
}
|
|
742
|
-
key: "willUpdate",
|
|
743
|
-
value: function willUpdate(t) {}
|
|
744
|
-
}, {
|
|
745
|
-
key: "_$AE",
|
|
746
|
-
value: function _$AE(t) {
|
|
747
|
-
var i;
|
|
748
|
-
null === (i = this._$Eg) || void 0 === i || i.forEach(function (t) {
|
|
749
|
-
var i;
|
|
750
|
-
return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
|
|
751
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
752
|
-
}
|
|
753
|
-
}, {
|
|
754
|
-
key: "_$EU",
|
|
755
|
-
value: function _$EU() {
|
|
756
|
-
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
757
|
-
}
|
|
758
|
-
}, {
|
|
759
|
-
key: "updateComplete",
|
|
760
|
-
get: function get() {
|
|
761
|
-
return this.getUpdateComplete();
|
|
762
|
-
}
|
|
763
|
-
}, {
|
|
764
|
-
key: "getUpdateComplete",
|
|
765
|
-
value: function getUpdateComplete() {
|
|
766
|
-
return this._$Ep;
|
|
767
|
-
}
|
|
768
|
-
}, {
|
|
769
|
-
key: "shouldUpdate",
|
|
770
|
-
value: function shouldUpdate(t) {
|
|
771
|
-
return !0;
|
|
772
|
-
}
|
|
773
|
-
}, {
|
|
774
|
-
key: "update",
|
|
775
|
-
value: function update(t) {
|
|
776
|
-
var _this5 = this;
|
|
777
|
-
|
|
778
|
-
void 0 !== this._$E_ && (this._$E_.forEach(function (t, i) {
|
|
779
|
-
return _this5._$ES(i, _this5[i], t);
|
|
780
|
-
}), this._$E_ = void 0), this._$EU();
|
|
781
|
-
}
|
|
782
|
-
}, {
|
|
783
|
-
key: "updated",
|
|
784
|
-
value: function updated(t) {}
|
|
785
|
-
}, {
|
|
786
|
-
key: "firstUpdated",
|
|
787
|
-
value: function firstUpdated(t) {}
|
|
788
|
-
}], [{
|
|
789
|
-
key: "addInitializer",
|
|
790
|
-
value: function addInitializer(t) {
|
|
791
|
-
var i;
|
|
792
|
-
null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
|
|
793
|
-
}
|
|
794
|
-
}, {
|
|
795
|
-
key: "observedAttributes",
|
|
796
|
-
get: function get() {
|
|
797
|
-
var _this6 = this;
|
|
798
|
-
|
|
799
|
-
this.finalize();
|
|
800
|
-
var t = [];
|
|
801
|
-
return this.elementProperties.forEach(function (i, s) {
|
|
802
|
-
var e = _this6._$Eh(s, i);
|
|
803
|
-
|
|
804
|
-
void 0 !== e && (_this6._$Eu.set(e, s), t.push(e));
|
|
805
|
-
}), t;
|
|
806
|
-
}
|
|
807
|
-
}, {
|
|
808
|
-
key: "createProperty",
|
|
809
|
-
value: function createProperty(t) {
|
|
810
|
-
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : l$3;
|
|
591
|
+
_$AI(t, i = this) {
|
|
592
|
+
t = P(this, t, i), r(t) ? t === w || null == t || "" === t ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== b && this.$(t) : void 0 !== t._$litType$ ? this.T(t) : void 0 !== t.nodeType ? this.k(t) : u(t) ? this.S(t) : this.$(t);
|
|
593
|
+
}
|
|
811
594
|
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
595
|
+
A(t, i = this._$AB) {
|
|
596
|
+
return this._$AA.parentNode.insertBefore(t, i);
|
|
597
|
+
}
|
|
815
598
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
}, {
|
|
820
|
-
key: "getPropertyDescriptor",
|
|
821
|
-
value: function getPropertyDescriptor(t, i, s) {
|
|
822
|
-
return {
|
|
823
|
-
get: function get() {
|
|
824
|
-
return this[i];
|
|
825
|
-
},
|
|
826
|
-
set: function set(e) {
|
|
827
|
-
var r = this[t];
|
|
828
|
-
this[i] = e, this.requestUpdate(t, r, s);
|
|
829
|
-
},
|
|
830
|
-
configurable: !0,
|
|
831
|
-
enumerable: !0
|
|
832
|
-
};
|
|
833
|
-
}
|
|
834
|
-
}, {
|
|
835
|
-
key: "getPropertyOptions",
|
|
836
|
-
value: function getPropertyOptions(t) {
|
|
837
|
-
return this.elementProperties.get(t) || l$3;
|
|
838
|
-
}
|
|
839
|
-
}, {
|
|
840
|
-
key: "finalize",
|
|
841
|
-
value: function finalize() {
|
|
842
|
-
if (this.hasOwnProperty("finalized")) return !1;
|
|
843
|
-
this.finalized = !0;
|
|
844
|
-
var t = Object.getPrototypeOf(this);
|
|
599
|
+
k(t) {
|
|
600
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.A(t));
|
|
601
|
+
}
|
|
845
602
|
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
603
|
+
$(t) {
|
|
604
|
+
this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.k(l$2.createTextNode(t)), this._$AH = t;
|
|
605
|
+
}
|
|
849
606
|
|
|
850
|
-
|
|
851
|
-
|
|
607
|
+
T(t) {
|
|
608
|
+
var i;
|
|
609
|
+
const {
|
|
610
|
+
values: s,
|
|
611
|
+
_$litType$: e
|
|
612
|
+
} = t,
|
|
613
|
+
o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = E.createElement(e.h, this.options)), e);
|
|
614
|
+
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.m(s);else {
|
|
615
|
+
const t = new V(o, this),
|
|
616
|
+
i = t.p(this.options);
|
|
617
|
+
t.m(s), this.k(i), this._$AH = t;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
852
620
|
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
}
|
|
858
|
-
} catch (err) {
|
|
859
|
-
_iterator.e(err);
|
|
860
|
-
} finally {
|
|
861
|
-
_iterator.f();
|
|
862
|
-
}
|
|
863
|
-
}
|
|
621
|
+
_$AC(t) {
|
|
622
|
+
let i = T.get(t.strings);
|
|
623
|
+
return void 0 === i && T.set(t.strings, i = new E(t)), i;
|
|
624
|
+
}
|
|
864
625
|
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
var s = [];
|
|
626
|
+
S(t) {
|
|
627
|
+
d(this._$AH) || (this._$AH = [], this._$AR());
|
|
628
|
+
const i = this._$AH;
|
|
629
|
+
let s,
|
|
630
|
+
e = 0;
|
|
871
631
|
|
|
872
|
-
|
|
873
|
-
var _e2 = new Set(i.flat(1 / 0).reverse());
|
|
632
|
+
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++;
|
|
874
633
|
|
|
875
|
-
|
|
876
|
-
|
|
634
|
+
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
635
|
+
}
|
|
877
636
|
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
var _i2 = _step2.value;
|
|
881
|
-
s.unshift(S$1(_i2));
|
|
882
|
-
}
|
|
883
|
-
} catch (err) {
|
|
884
|
-
_iterator2.e(err);
|
|
885
|
-
} finally {
|
|
886
|
-
_iterator2.f();
|
|
887
|
-
}
|
|
888
|
-
} else void 0 !== i && s.push(S$1(i));
|
|
637
|
+
_$AR(t = this._$AA.nextSibling, i) {
|
|
638
|
+
var s;
|
|
889
639
|
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
key: "_$Eh",
|
|
894
|
-
value: function _$Eh(t, i) {
|
|
895
|
-
var s = i.attribute;
|
|
896
|
-
return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
640
|
+
for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
|
|
641
|
+
const i = t.nextSibling;
|
|
642
|
+
t.remove(), t = i;
|
|
897
643
|
}
|
|
898
|
-
}
|
|
644
|
+
}
|
|
899
645
|
|
|
900
|
-
|
|
901
|
-
|
|
646
|
+
setConnected(t) {
|
|
647
|
+
var i;
|
|
648
|
+
void 0 === this._$AM && (this._$Cg = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
|
|
649
|
+
}
|
|
902
650
|
|
|
903
|
-
|
|
904
|
-
mode: "open"
|
|
905
|
-
}, null == h$1 || h$1({
|
|
906
|
-
ReactiveElement: a$1
|
|
907
|
-
}), (null !== (s$2 = globalThis.reactiveElementVersions) && void 0 !== s$2 ? s$2 : globalThis.reactiveElementVersions = []).push("1.1.2");
|
|
651
|
+
}
|
|
908
652
|
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
*/
|
|
914
|
-
var t;
|
|
653
|
+
class S {
|
|
654
|
+
constructor(t, i, s, e, o) {
|
|
655
|
+
this.type = 1, this._$AH = w, 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 = w;
|
|
656
|
+
}
|
|
915
657
|
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
createHTML: function createHTML(t) {
|
|
919
|
-
return t;
|
|
658
|
+
get tagName() {
|
|
659
|
+
return this.element.tagName;
|
|
920
660
|
}
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
u = function u(t) {
|
|
935
|
-
var i;
|
|
936
|
-
return d(t) || "function" == typeof (null === (i = t) || void 0 === i ? void 0 : i[Symbol.iterator]);
|
|
937
|
-
},
|
|
938
|
-
c = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
939
|
-
v = /-->/g,
|
|
940
|
-
a = />/g,
|
|
941
|
-
f = />|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,
|
|
942
|
-
_ = /'/g,
|
|
943
|
-
m = /"/g,
|
|
944
|
-
g = /^(?:script|style|textarea)$/i,
|
|
945
|
-
p = function p(t) {
|
|
946
|
-
return function (i) {
|
|
947
|
-
for (var _len = arguments.length, s = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
948
|
-
s[_key - 1] = arguments[_key];
|
|
661
|
+
|
|
662
|
+
get _$AU() {
|
|
663
|
+
return this._$AM._$AU;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
_$AI(t, i = this, s, e) {
|
|
667
|
+
const o = this.strings;
|
|
668
|
+
let n = !1;
|
|
669
|
+
if (void 0 === o) t = P(this, t, i, 0), n = !r(t) || t !== this._$AH && t !== b, n && (this._$AH = t);else {
|
|
670
|
+
const e = t;
|
|
671
|
+
let l, h;
|
|
672
|
+
|
|
673
|
+
for (t = o[0], l = 0; l < o.length - 1; l++) h = P(this, e[s + l], i, l), h === b && (h = this._$AH[l]), n || (n = !r(h) || h !== this._$AH[l]), h === w ? t = w : t !== w && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
|
|
949
674
|
}
|
|
675
|
+
n && !e && this.C(t);
|
|
676
|
+
}
|
|
950
677
|
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
values: s
|
|
955
|
-
};
|
|
956
|
-
};
|
|
957
|
-
},
|
|
958
|
-
$ = p(1),
|
|
959
|
-
y = p(2),
|
|
960
|
-
b = Symbol.for("lit-noChange"),
|
|
961
|
-
w = Symbol.for("lit-nothing"),
|
|
962
|
-
T = new WeakMap(),
|
|
963
|
-
x = function x(t, i, s) {
|
|
964
|
-
var e, o;
|
|
965
|
-
var n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
|
|
966
|
-
var l = n._$litPart$;
|
|
678
|
+
C(t) {
|
|
679
|
+
t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
|
|
680
|
+
}
|
|
967
681
|
|
|
968
|
-
|
|
969
|
-
var _t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
|
|
682
|
+
}
|
|
970
683
|
|
|
971
|
-
|
|
684
|
+
class M extends S {
|
|
685
|
+
constructor() {
|
|
686
|
+
super(...arguments), this.type = 3;
|
|
972
687
|
}
|
|
973
688
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
C = function C(t, i) {
|
|
978
|
-
var o = t.length - 1,
|
|
979
|
-
l = [];
|
|
980
|
-
var h,
|
|
981
|
-
r = 2 === i ? "<svg>" : "",
|
|
982
|
-
d = c;
|
|
689
|
+
C(t) {
|
|
690
|
+
this.element[this.name] = t === w ? void 0 : t;
|
|
691
|
+
}
|
|
983
692
|
|
|
984
|
-
|
|
985
|
-
var _s = t[_i];
|
|
693
|
+
}
|
|
986
694
|
|
|
987
|
-
|
|
988
|
-
_u = void 0,
|
|
989
|
-
_p = -1,
|
|
990
|
-
_$ = 0;
|
|
695
|
+
const k = i ? i.emptyScript : "";
|
|
991
696
|
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
697
|
+
class H extends S {
|
|
698
|
+
constructor() {
|
|
699
|
+
super(...arguments), this.type = 4;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
C(t) {
|
|
703
|
+
t && t !== w ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name);
|
|
704
|
+
}
|
|
995
705
|
|
|
996
|
-
|
|
706
|
+
}
|
|
997
707
|
|
|
998
|
-
|
|
708
|
+
class I extends S {
|
|
709
|
+
constructor(t, i, s, e, o) {
|
|
710
|
+
super(t, i, s, e, o), this.type = 5;
|
|
999
711
|
}
|
|
1000
712
|
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
713
|
+
_$AI(t, i = this) {
|
|
714
|
+
var s;
|
|
715
|
+
if ((t = null !== (s = P(this, t, i, 0)) && void 0 !== s ? s : w) === b) return;
|
|
716
|
+
const e = this._$AH,
|
|
717
|
+
o = t === w && e !== w || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
|
|
718
|
+
n = t !== w && (e === w || o);
|
|
719
|
+
o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
720
|
+
}
|
|
1005
721
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
722
|
+
handleEvent(t) {
|
|
723
|
+
var i, s;
|
|
724
|
+
"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);
|
|
725
|
+
}
|
|
1010
726
|
|
|
1011
|
-
|
|
727
|
+
}
|
|
1012
728
|
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
729
|
+
class L {
|
|
730
|
+
constructor(t, i, s) {
|
|
731
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
732
|
+
}
|
|
1017
733
|
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
_C2 = _slicedToArray(_C, 2),
|
|
1022
|
-
v = _C2[0],
|
|
1023
|
-
a = _C2[1];
|
|
734
|
+
get _$AU() {
|
|
735
|
+
return this._$AM._$AU;
|
|
736
|
+
}
|
|
1024
737
|
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
_i2.remove(), _t2.append.apply(_t2, _toConsumableArray(_i2.childNodes));
|
|
1029
|
-
}
|
|
738
|
+
_$AI(t) {
|
|
739
|
+
P(this, t);
|
|
740
|
+
}
|
|
1030
741
|
|
|
1031
|
-
|
|
1032
|
-
if (1 === l.nodeType) {
|
|
1033
|
-
if (l.hasAttributes()) {
|
|
1034
|
-
var _t3 = [];
|
|
1035
|
-
|
|
1036
|
-
var _iterator = _createForOfIteratorHelper(l.getAttributeNames()),
|
|
1037
|
-
_step;
|
|
1038
|
-
|
|
1039
|
-
try {
|
|
1040
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1041
|
-
var _i5 = _step.value;
|
|
1042
|
-
|
|
1043
|
-
if (_i5.endsWith("$lit$") || _i5.startsWith(e)) {
|
|
1044
|
-
var _s2 = a[d++];
|
|
1045
|
-
|
|
1046
|
-
if (_t3.push(_i5), void 0 !== _s2) {
|
|
1047
|
-
var _t5 = l.getAttribute(_s2.toLowerCase() + "$lit$").split(e),
|
|
1048
|
-
_i6 = /([.?@])?(.*)/.exec(_s2);
|
|
1049
|
-
|
|
1050
|
-
c.push({
|
|
1051
|
-
type: 1,
|
|
1052
|
-
index: r,
|
|
1053
|
-
name: _i6[2],
|
|
1054
|
-
strings: _t5,
|
|
1055
|
-
ctor: "." === _i6[1] ? M : "?" === _i6[1] ? H : "@" === _i6[1] ? I : S
|
|
1056
|
-
});
|
|
1057
|
-
} else c.push({
|
|
1058
|
-
type: 6,
|
|
1059
|
-
index: r
|
|
1060
|
-
});
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
} catch (err) {
|
|
1064
|
-
_iterator.e(err);
|
|
1065
|
-
} finally {
|
|
1066
|
-
_iterator.f();
|
|
1067
|
-
}
|
|
742
|
+
}
|
|
1068
743
|
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
l.removeAttribute(_i4);
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
744
|
+
const z = window.litHtmlPolyfillSupport;
|
|
745
|
+
null == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t ? t : globalThis.litHtmlVersions = []).push("2.2.1");
|
|
1074
746
|
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
747
|
+
/**
|
|
748
|
+
* @license
|
|
749
|
+
* Copyright 2017 Google LLC
|
|
750
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
751
|
+
*/
|
|
1078
752
|
|
|
1079
|
-
|
|
1080
|
-
l.textContent = i ? i.emptyScript : "";
|
|
753
|
+
var l$1, o;
|
|
1081
754
|
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
755
|
+
class s extends a$1 {
|
|
756
|
+
constructor() {
|
|
757
|
+
super(...arguments), this.renderOptions = {
|
|
758
|
+
host: this
|
|
759
|
+
}, this._$Dt = void 0;
|
|
760
|
+
}
|
|
1088
761
|
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
index: r
|
|
1095
|
-
});else {
|
|
1096
|
-
var _t7 = -1;
|
|
762
|
+
createRenderRoot() {
|
|
763
|
+
var t, e;
|
|
764
|
+
const i = super.createRenderRoot();
|
|
765
|
+
return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
|
|
766
|
+
}
|
|
1097
767
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
}), _t7 += e.length - 1;
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
768
|
+
update(t) {
|
|
769
|
+
const i = this.render();
|
|
770
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Dt = x(i, this.renderRoot, this.renderOptions);
|
|
771
|
+
}
|
|
1105
772
|
|
|
1106
|
-
|
|
1107
|
-
|
|
773
|
+
connectedCallback() {
|
|
774
|
+
var t;
|
|
775
|
+
super.connectedCallback(), null === (t = this._$Dt) || void 0 === t || t.setConnected(!0);
|
|
1108
776
|
}
|
|
1109
777
|
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
return s.innerHTML = t, s;
|
|
1115
|
-
}
|
|
1116
|
-
}]);
|
|
778
|
+
disconnectedCallback() {
|
|
779
|
+
var t;
|
|
780
|
+
super.disconnectedCallback(), null === (t = this._$Dt) || void 0 === t || t.setConnected(!1);
|
|
781
|
+
}
|
|
1117
782
|
|
|
1118
|
-
|
|
1119
|
-
|
|
783
|
+
render() {
|
|
784
|
+
return b;
|
|
785
|
+
}
|
|
1120
786
|
|
|
1121
|
-
function P(t, i) {
|
|
1122
|
-
var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : t;
|
|
1123
|
-
var e = arguments.length > 3 ? arguments[3] : undefined;
|
|
1124
|
-
var o, n, l, h;
|
|
1125
|
-
if (i === b) return i;
|
|
1126
|
-
var d = void 0 !== e ? null === (o = s._$Cl) || void 0 === o ? void 0 : o[e] : s._$Cu;
|
|
1127
|
-
var u = r(i) ? void 0 : i._$litDirective$;
|
|
1128
|
-
return (null == d ? void 0 : d.constructor) !== u && (null === (n = null == d ? void 0 : d._$AO) || void 0 === n || n.call(d, !1), void 0 === u ? d = void 0 : (d = new u(t), d._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Cl) && void 0 !== l ? l : h._$Cl = [])[e] = d : s._$Cu = d), void 0 !== d && (i = P(t, d._$AS(t, i.values), d, e)), i;
|
|
1129
787
|
}
|
|
1130
788
|
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
789
|
+
s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
|
|
790
|
+
LitElement: s
|
|
791
|
+
});
|
|
792
|
+
const n = globalThis.litElementPolyfillSupport;
|
|
793
|
+
null == n || n({
|
|
794
|
+
LitElement: s
|
|
795
|
+
});
|
|
796
|
+
(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.2.0");
|
|
797
|
+
|
|
798
|
+
var noop = {
|
|
799
|
+
value: () => {}
|
|
800
|
+
};
|
|
1134
801
|
|
|
1135
|
-
|
|
802
|
+
function dispatch() {
|
|
803
|
+
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
|
804
|
+
if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
|
|
805
|
+
_[t] = [];
|
|
1136
806
|
}
|
|
1137
807
|
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
get: function get() {
|
|
1141
|
-
return this._$AM.parentNode;
|
|
1142
|
-
}
|
|
1143
|
-
}, {
|
|
1144
|
-
key: "_$AU",
|
|
1145
|
-
get: function get() {
|
|
1146
|
-
return this._$AM._$AU;
|
|
1147
|
-
}
|
|
1148
|
-
}, {
|
|
1149
|
-
key: "p",
|
|
1150
|
-
value: function p(t) {
|
|
1151
|
-
var i;
|
|
1152
|
-
var _this$_$AD = this._$AD,
|
|
1153
|
-
s = _this$_$AD.el.content,
|
|
1154
|
-
e = _this$_$AD.parts,
|
|
1155
|
-
o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : l$2).importNode(s, !0);
|
|
1156
|
-
A.currentNode = o;
|
|
1157
|
-
var n = A.nextNode(),
|
|
1158
|
-
h = 0,
|
|
1159
|
-
r = 0,
|
|
1160
|
-
d = e[0];
|
|
808
|
+
return new Dispatch(_);
|
|
809
|
+
}
|
|
1161
810
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
811
|
+
function Dispatch(_) {
|
|
812
|
+
this._ = _;
|
|
813
|
+
}
|
|
1165
814
|
|
|
1166
|
-
|
|
1167
|
-
|
|
815
|
+
function parseTypenames$1(typenames, types) {
|
|
816
|
+
return typenames.trim().split(/^|\s+/).map(function (t) {
|
|
817
|
+
var name = "",
|
|
818
|
+
i = t.indexOf(".");
|
|
819
|
+
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
820
|
+
if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
821
|
+
return {
|
|
822
|
+
type: t,
|
|
823
|
+
name: name
|
|
824
|
+
};
|
|
825
|
+
});
|
|
826
|
+
}
|
|
1168
827
|
|
|
1169
|
-
|
|
1170
|
-
|
|
828
|
+
Dispatch.prototype = dispatch.prototype = {
|
|
829
|
+
constructor: Dispatch,
|
|
830
|
+
on: function (typename, callback) {
|
|
831
|
+
var _ = this._,
|
|
832
|
+
T = parseTypenames$1(typename + "", _),
|
|
833
|
+
t,
|
|
834
|
+
i = -1,
|
|
835
|
+
n = T.length; // If no callback was specified, return the callback of the given type and name.
|
|
1171
836
|
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
}, {
|
|
1175
|
-
key: "m",
|
|
1176
|
-
value: function m(t) {
|
|
1177
|
-
var i = 0;
|
|
1178
|
-
|
|
1179
|
-
var _iterator2 = _createForOfIteratorHelper(this.v),
|
|
1180
|
-
_step2;
|
|
1181
|
-
|
|
1182
|
-
try {
|
|
1183
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
1184
|
-
var _s4 = _step2.value;
|
|
1185
|
-
void 0 !== _s4 && (void 0 !== _s4.strings ? (_s4._$AI(t, _s4, i), i += _s4.strings.length - 2) : _s4._$AI(t[i])), i++;
|
|
1186
|
-
}
|
|
1187
|
-
} catch (err) {
|
|
1188
|
-
_iterator2.e(err);
|
|
1189
|
-
} finally {
|
|
1190
|
-
_iterator2.f();
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
}]);
|
|
837
|
+
if (arguments.length < 2) {
|
|
838
|
+
while (++i < n) if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
|
|
1194
839
|
|
|
1195
|
-
|
|
1196
|
-
}
|
|
840
|
+
return;
|
|
841
|
+
} // If a type was specified, set the callback for the given type and name.
|
|
842
|
+
// Otherwise, if a null callback was specified, remove callbacks of the given name.
|
|
1197
843
|
|
|
1198
|
-
var N = /*#__PURE__*/function () {
|
|
1199
|
-
function N(t, i, s, e) {
|
|
1200
|
-
_classCallCheck(this, N);
|
|
1201
844
|
|
|
1202
|
-
|
|
1203
|
-
this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cg = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
|
|
1204
|
-
}
|
|
845
|
+
if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
|
|
1205
846
|
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
get: function get() {
|
|
1209
|
-
var t, i;
|
|
1210
|
-
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cg;
|
|
1211
|
-
}
|
|
1212
|
-
}, {
|
|
1213
|
-
key: "parentNode",
|
|
1214
|
-
get: function get() {
|
|
1215
|
-
var t = this._$AA.parentNode;
|
|
1216
|
-
var i = this._$AM;
|
|
1217
|
-
return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;
|
|
1218
|
-
}
|
|
1219
|
-
}, {
|
|
1220
|
-
key: "startNode",
|
|
1221
|
-
get: function get() {
|
|
1222
|
-
return this._$AA;
|
|
1223
|
-
}
|
|
1224
|
-
}, {
|
|
1225
|
-
key: "endNode",
|
|
1226
|
-
get: function get() {
|
|
1227
|
-
return this._$AB;
|
|
1228
|
-
}
|
|
1229
|
-
}, {
|
|
1230
|
-
key: "_$AI",
|
|
1231
|
-
value: function _$AI(t) {
|
|
1232
|
-
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
|
|
1233
|
-
t = P(this, t, i), r(t) ? t === w || null == t || "" === t ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== b && this.$(t) : void 0 !== t._$litType$ ? this.T(t) : void 0 !== t.nodeType ? this.S(t) : u(t) ? this.A(t) : this.$(t);
|
|
1234
|
-
}
|
|
1235
|
-
}, {
|
|
1236
|
-
key: "M",
|
|
1237
|
-
value: function M(t) {
|
|
1238
|
-
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._$AB;
|
|
1239
|
-
return this._$AA.parentNode.insertBefore(t, i);
|
|
1240
|
-
}
|
|
1241
|
-
}, {
|
|
1242
|
-
key: "S",
|
|
1243
|
-
value: function S(t) {
|
|
1244
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.M(t));
|
|
1245
|
-
}
|
|
1246
|
-
}, {
|
|
1247
|
-
key: "$",
|
|
1248
|
-
value: function $(t) {
|
|
1249
|
-
this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.S(l$2.createTextNode(t)), this._$AH = t;
|
|
1250
|
-
}
|
|
1251
|
-
}, {
|
|
1252
|
-
key: "T",
|
|
1253
|
-
value: function T(t) {
|
|
1254
|
-
var i;
|
|
1255
|
-
var s = t.values,
|
|
1256
|
-
e = t._$litType$,
|
|
1257
|
-
o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = E.createElement(e.h, this.options)), e);
|
|
1258
|
-
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.m(s);else {
|
|
1259
|
-
var _t8 = new V(o, this),
|
|
1260
|
-
_i9 = _t8.p(this.options);
|
|
1261
|
-
|
|
1262
|
-
_t8.m(s), this.S(_i9), this._$AH = _t8;
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
}, {
|
|
1266
|
-
key: "_$AC",
|
|
1267
|
-
value: function _$AC(t) {
|
|
1268
|
-
var i = T.get(t.strings);
|
|
1269
|
-
return void 0 === i && T.set(t.strings, i = new E(t)), i;
|
|
1270
|
-
}
|
|
1271
|
-
}, {
|
|
1272
|
-
key: "A",
|
|
1273
|
-
value: function A(t) {
|
|
1274
|
-
d(this._$AH) || (this._$AH = [], this._$AR());
|
|
1275
|
-
var i = this._$AH;
|
|
1276
|
-
var s,
|
|
1277
|
-
e = 0;
|
|
1278
|
-
|
|
1279
|
-
var _iterator3 = _createForOfIteratorHelper(t),
|
|
1280
|
-
_step3;
|
|
1281
|
-
|
|
1282
|
-
try {
|
|
1283
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
1284
|
-
var _o2 = _step3.value;
|
|
1285
|
-
e === i.length ? i.push(s = new N(this.M(h()), this.M(h()), this, this.options)) : s = i[e], s._$AI(_o2), e++;
|
|
1286
|
-
}
|
|
1287
|
-
} catch (err) {
|
|
1288
|
-
_iterator3.e(err);
|
|
1289
|
-
} finally {
|
|
1290
|
-
_iterator3.f();
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
1294
|
-
}
|
|
1295
|
-
}, {
|
|
1296
|
-
key: "_$AR",
|
|
1297
|
-
value: function _$AR() {
|
|
1298
|
-
var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._$AA.nextSibling;
|
|
1299
|
-
var i = arguments.length > 1 ? arguments[1] : undefined;
|
|
1300
|
-
var s;
|
|
1301
|
-
|
|
1302
|
-
for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
|
|
1303
|
-
var _i10 = t.nextSibling;
|
|
1304
|
-
t.remove(), t = _i10;
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
}, {
|
|
1308
|
-
key: "setConnected",
|
|
1309
|
-
value: function setConnected(t) {
|
|
1310
|
-
var i;
|
|
1311
|
-
void 0 === this._$AM && (this._$Cg = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
|
|
1312
|
-
}
|
|
1313
|
-
}]);
|
|
1314
|
-
|
|
1315
|
-
return N;
|
|
1316
|
-
}();
|
|
1317
|
-
|
|
1318
|
-
var S = /*#__PURE__*/function () {
|
|
1319
|
-
function S(t, i, s, e, o) {
|
|
1320
|
-
_classCallCheck(this, S);
|
|
1321
|
-
|
|
1322
|
-
this.type = 1, this._$AH = w, 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 = w;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
_createClass(S, [{
|
|
1326
|
-
key: "tagName",
|
|
1327
|
-
get: function get() {
|
|
1328
|
-
return this.element.tagName;
|
|
1329
|
-
}
|
|
1330
|
-
}, {
|
|
1331
|
-
key: "_$AU",
|
|
1332
|
-
get: function get() {
|
|
1333
|
-
return this._$AM._$AU;
|
|
1334
|
-
}
|
|
1335
|
-
}, {
|
|
1336
|
-
key: "_$AI",
|
|
1337
|
-
value: function _$AI(t) {
|
|
1338
|
-
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
|
|
1339
|
-
var s = arguments.length > 2 ? arguments[2] : undefined;
|
|
1340
|
-
var e = arguments.length > 3 ? arguments[3] : undefined;
|
|
1341
|
-
var o = this.strings;
|
|
1342
|
-
var n = !1;
|
|
1343
|
-
if (void 0 === o) t = P(this, t, i, 0), n = !r(t) || t !== this._$AH && t !== b, n && (this._$AH = t);else {
|
|
1344
|
-
var _e = t;
|
|
1345
|
-
|
|
1346
|
-
var _l, _h;
|
|
1347
|
-
|
|
1348
|
-
for (t = o[0], _l = 0; _l < o.length - 1; _l++) {
|
|
1349
|
-
_h = P(this, _e[s + _l], i, _l), _h === b && (_h = this._$AH[_l]), n || (n = !r(_h) || _h !== this._$AH[_l]), _h === w ? t = w : t !== w && (t += (null != _h ? _h : "") + o[_l + 1]), this._$AH[_l] = _h;
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
n && !e && this.k(t);
|
|
1353
|
-
}
|
|
1354
|
-
}, {
|
|
1355
|
-
key: "k",
|
|
1356
|
-
value: function k(t) {
|
|
1357
|
-
t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
|
|
1358
|
-
}
|
|
1359
|
-
}]);
|
|
1360
|
-
|
|
1361
|
-
return S;
|
|
1362
|
-
}();
|
|
1363
|
-
|
|
1364
|
-
var M = /*#__PURE__*/function (_S) {
|
|
1365
|
-
_inherits(M, _S);
|
|
1366
|
-
|
|
1367
|
-
var _super = _createSuper(M);
|
|
1368
|
-
|
|
1369
|
-
function M() {
|
|
1370
|
-
var _this;
|
|
1371
|
-
|
|
1372
|
-
_classCallCheck(this, M);
|
|
1373
|
-
|
|
1374
|
-
_this = _super.apply(this, arguments), _this.type = 3;
|
|
1375
|
-
return _this;
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
_createClass(M, [{
|
|
1379
|
-
key: "k",
|
|
1380
|
-
value: function k(t) {
|
|
1381
|
-
this.element[this.name] = t === w ? void 0 : t;
|
|
1382
|
-
}
|
|
1383
|
-
}]);
|
|
1384
|
-
|
|
1385
|
-
return M;
|
|
1386
|
-
}(S);
|
|
1387
|
-
|
|
1388
|
-
var _k = i ? i.emptyScript : "";
|
|
1389
|
-
|
|
1390
|
-
var H = /*#__PURE__*/function (_S2) {
|
|
1391
|
-
_inherits(H, _S2);
|
|
1392
|
-
|
|
1393
|
-
var _super2 = _createSuper(H);
|
|
1394
|
-
|
|
1395
|
-
function H() {
|
|
1396
|
-
var _this2;
|
|
1397
|
-
|
|
1398
|
-
_classCallCheck(this, H);
|
|
1399
|
-
|
|
1400
|
-
_this2 = _super2.apply(this, arguments), _this2.type = 4;
|
|
1401
|
-
return _this2;
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
_createClass(H, [{
|
|
1405
|
-
key: "k",
|
|
1406
|
-
value: function k(t) {
|
|
1407
|
-
t && t !== w ? this.element.setAttribute(this.name, _k) : this.element.removeAttribute(this.name);
|
|
1408
|
-
}
|
|
1409
|
-
}]);
|
|
1410
|
-
|
|
1411
|
-
return H;
|
|
1412
|
-
}(S);
|
|
1413
|
-
|
|
1414
|
-
var I = /*#__PURE__*/function (_S3) {
|
|
1415
|
-
_inherits(I, _S3);
|
|
1416
|
-
|
|
1417
|
-
var _super3 = _createSuper(I);
|
|
1418
|
-
|
|
1419
|
-
function I(t, i, s, e, o) {
|
|
1420
|
-
var _this3;
|
|
1421
|
-
|
|
1422
|
-
_classCallCheck(this, I);
|
|
1423
|
-
|
|
1424
|
-
_this3 = _super3.call(this, t, i, s, e, o), _this3.type = 5;
|
|
1425
|
-
return _this3;
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
_createClass(I, [{
|
|
1429
|
-
key: "_$AI",
|
|
1430
|
-
value: function _$AI(t) {
|
|
1431
|
-
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
|
|
1432
|
-
var s;
|
|
1433
|
-
if ((t = null !== (s = P(this, t, i, 0)) && void 0 !== s ? s : w) === b) return;
|
|
1434
|
-
var e = this._$AH,
|
|
1435
|
-
o = t === w && e !== w || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
|
|
1436
|
-
n = t !== w && (e === w || o);
|
|
1437
|
-
o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
1438
|
-
}
|
|
1439
|
-
}, {
|
|
1440
|
-
key: "handleEvent",
|
|
1441
|
-
value: function handleEvent(t) {
|
|
1442
|
-
var i, s;
|
|
1443
|
-
"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);
|
|
1444
|
-
}
|
|
1445
|
-
}]);
|
|
1446
|
-
|
|
1447
|
-
return I;
|
|
1448
|
-
}(S);
|
|
1449
|
-
|
|
1450
|
-
var L = /*#__PURE__*/function () {
|
|
1451
|
-
function L(t, i, s) {
|
|
1452
|
-
_classCallCheck(this, L);
|
|
1453
|
-
|
|
1454
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
_createClass(L, [{
|
|
1458
|
-
key: "_$AU",
|
|
1459
|
-
get: function get() {
|
|
1460
|
-
return this._$AM._$AU;
|
|
1461
|
-
}
|
|
1462
|
-
}, {
|
|
1463
|
-
key: "_$AI",
|
|
1464
|
-
value: function _$AI(t) {
|
|
1465
|
-
P(this, t);
|
|
1466
|
-
}
|
|
1467
|
-
}]);
|
|
1468
|
-
|
|
1469
|
-
return L;
|
|
1470
|
-
}();
|
|
1471
|
-
|
|
1472
|
-
var z = window.litHtmlPolyfillSupport;
|
|
1473
|
-
null == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t ? t : globalThis.litHtmlVersions = []).push("2.1.1");
|
|
1474
|
-
|
|
1475
|
-
/**
|
|
1476
|
-
* @license
|
|
1477
|
-
* Copyright 2017 Google LLC
|
|
1478
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1479
|
-
*/
|
|
1480
|
-
|
|
1481
|
-
var l$1, o;
|
|
1482
|
-
|
|
1483
|
-
var s = /*#__PURE__*/function (_t) {
|
|
1484
|
-
_inherits(s, _t);
|
|
1485
|
-
|
|
1486
|
-
var _super = _createSuper(s);
|
|
1487
|
-
|
|
1488
|
-
function s() {
|
|
1489
|
-
var _this;
|
|
1490
|
-
|
|
1491
|
-
_classCallCheck(this, s);
|
|
1492
|
-
|
|
1493
|
-
_this = _super.apply(this, arguments), _this.renderOptions = {
|
|
1494
|
-
host: _assertThisInitialized(_this)
|
|
1495
|
-
}, _this._$Dt = void 0;
|
|
1496
|
-
return _this;
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
_createClass(s, [{
|
|
1500
|
-
key: "createRenderRoot",
|
|
1501
|
-
value: function createRenderRoot() {
|
|
1502
|
-
var t, e;
|
|
1503
|
-
|
|
1504
|
-
var i = _get(_getPrototypeOf(s.prototype), "createRenderRoot", this).call(this);
|
|
1505
|
-
|
|
1506
|
-
return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
|
|
1507
|
-
}
|
|
1508
|
-
}, {
|
|
1509
|
-
key: "update",
|
|
1510
|
-
value: function update(t) {
|
|
1511
|
-
var i = this.render();
|
|
1512
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), _get(_getPrototypeOf(s.prototype), "update", this).call(this, t), this._$Dt = x(i, this.renderRoot, this.renderOptions);
|
|
1513
|
-
}
|
|
1514
|
-
}, {
|
|
1515
|
-
key: "connectedCallback",
|
|
1516
|
-
value: function connectedCallback() {
|
|
1517
|
-
var t;
|
|
1518
|
-
_get(_getPrototypeOf(s.prototype), "connectedCallback", this).call(this), null === (t = this._$Dt) || void 0 === t || t.setConnected(!0);
|
|
1519
|
-
}
|
|
1520
|
-
}, {
|
|
1521
|
-
key: "disconnectedCallback",
|
|
1522
|
-
value: function disconnectedCallback() {
|
|
1523
|
-
var t;
|
|
1524
|
-
_get(_getPrototypeOf(s.prototype), "disconnectedCallback", this).call(this), null === (t = this._$Dt) || void 0 === t || t.setConnected(!1);
|
|
1525
|
-
}
|
|
1526
|
-
}, {
|
|
1527
|
-
key: "render",
|
|
1528
|
-
value: function render() {
|
|
1529
|
-
return b;
|
|
1530
|
-
}
|
|
1531
|
-
}]);
|
|
1532
|
-
|
|
1533
|
-
return s;
|
|
1534
|
-
}(a$1);
|
|
1535
|
-
|
|
1536
|
-
s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
|
|
1537
|
-
LitElement: s
|
|
1538
|
-
});
|
|
1539
|
-
var n = globalThis.litElementPolyfillSupport;
|
|
1540
|
-
null == n || n({
|
|
1541
|
-
LitElement: s
|
|
1542
|
-
});
|
|
1543
|
-
(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.1.1");
|
|
1544
|
-
|
|
1545
|
-
var noop = {
|
|
1546
|
-
value: function value() {}
|
|
1547
|
-
};
|
|
1548
|
-
|
|
1549
|
-
function dispatch() {
|
|
1550
|
-
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
|
1551
|
-
if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
|
|
1552
|
-
_[t] = [];
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
return new Dispatch(_);
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
function Dispatch(_) {
|
|
1559
|
-
this._ = _;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
function parseTypenames$1(typenames, types) {
|
|
1563
|
-
return typenames.trim().split(/^|\s+/).map(function (t) {
|
|
1564
|
-
var name = "",
|
|
1565
|
-
i = t.indexOf(".");
|
|
1566
|
-
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
1567
|
-
if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
1568
|
-
return {
|
|
1569
|
-
type: t,
|
|
1570
|
-
name: name
|
|
1571
|
-
};
|
|
1572
|
-
});
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
Dispatch.prototype = dispatch.prototype = {
|
|
1576
|
-
constructor: Dispatch,
|
|
1577
|
-
on: function on(typename, callback) {
|
|
1578
|
-
var _ = this._,
|
|
1579
|
-
T = parseTypenames$1(typename + "", _),
|
|
1580
|
-
t,
|
|
1581
|
-
i = -1,
|
|
1582
|
-
n = T.length; // If no callback was specified, return the callback of the given type and name.
|
|
1583
|
-
|
|
1584
|
-
if (arguments.length < 2) {
|
|
1585
|
-
while (++i < n) {
|
|
1586
|
-
if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
return;
|
|
1590
|
-
} // If a type was specified, set the callback for the given type and name.
|
|
1591
|
-
// Otherwise, if a null callback was specified, remove callbacks of the given name.
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
|
|
1595
|
-
|
|
1596
|
-
while (++i < n) {
|
|
1597
|
-
if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback);else if (callback == null) for (t in _) {
|
|
1598
|
-
_[t] = set$1(_[t], typename.name, null);
|
|
1599
|
-
}
|
|
847
|
+
while (++i < n) {
|
|
848
|
+
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);
|
|
1600
849
|
}
|
|
1601
850
|
|
|
1602
851
|
return this;
|
|
1603
852
|
},
|
|
1604
|
-
copy: function
|
|
853
|
+
copy: function () {
|
|
1605
854
|
var copy = {},
|
|
1606
855
|
_ = this._;
|
|
1607
856
|
|
|
1608
|
-
for (var t in _)
|
|
1609
|
-
copy[t] = _[t].slice();
|
|
1610
|
-
}
|
|
857
|
+
for (var t in _) copy[t] = _[t].slice();
|
|
1611
858
|
|
|
1612
859
|
return new Dispatch(copy);
|
|
1613
860
|
},
|
|
1614
|
-
call: function
|
|
1615
|
-
if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i)
|
|
1616
|
-
args[i] = arguments[i + 2];
|
|
1617
|
-
}
|
|
861
|
+
call: function (type, that) {
|
|
862
|
+
if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
|
|
1618
863
|
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
1619
864
|
|
|
1620
|
-
for (t = this._[type], i = 0, n = t.length; i < n; ++i)
|
|
1621
|
-
t[i].value.apply(that, args);
|
|
1622
|
-
}
|
|
865
|
+
for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
1623
866
|
},
|
|
1624
|
-
apply: function
|
|
867
|
+
apply: function (type, that, args) {
|
|
1625
868
|
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
1626
869
|
|
|
1627
|
-
for (var t = this._[type], i = 0, n = t.length; i < n; ++i)
|
|
1628
|
-
t[i].value.apply(that, args);
|
|
1629
|
-
}
|
|
870
|
+
for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
1630
871
|
}
|
|
1631
872
|
};
|
|
1632
873
|
|
|
@@ -1828,16 +1069,16 @@ function EnterNode(parent, datum) {
|
|
|
1828
1069
|
}
|
|
1829
1070
|
EnterNode.prototype = {
|
|
1830
1071
|
constructor: EnterNode,
|
|
1831
|
-
appendChild: function
|
|
1072
|
+
appendChild: function (child) {
|
|
1832
1073
|
return this._parent.insertBefore(child, this._next);
|
|
1833
1074
|
},
|
|
1834
|
-
insertBefore: function
|
|
1075
|
+
insertBefore: function (child, next) {
|
|
1835
1076
|
return this._parent.insertBefore(child, next);
|
|
1836
1077
|
},
|
|
1837
|
-
querySelector: function
|
|
1078
|
+
querySelector: function (selector) {
|
|
1838
1079
|
return this._parent.querySelector(selector);
|
|
1839
1080
|
},
|
|
1840
|
-
querySelectorAll: function
|
|
1081
|
+
querySelectorAll: function (selector) {
|
|
1841
1082
|
return this._parent.querySelectorAll(selector);
|
|
1842
1083
|
}
|
|
1843
1084
|
};
|
|
@@ -1946,8 +1187,7 @@ function selection_data (value, key) {
|
|
|
1946
1187
|
if (previous = enterGroup[i0]) {
|
|
1947
1188
|
if (i0 >= i1) i1 = i0 + 1;
|
|
1948
1189
|
|
|
1949
|
-
while (!(next = updateGroup[i1]) && ++i1 < dataLength)
|
|
1950
|
-
}
|
|
1190
|
+
while (!(next = updateGroup[i1]) && ++i1 < dataLength);
|
|
1951
1191
|
|
|
1952
1192
|
previous._next = next || null;
|
|
1953
1193
|
}
|
|
@@ -1966,7 +1206,7 @@ function selection_data (value, key) {
|
|
|
1966
1206
|
// don’t; we’d rather avoid a gratuitous copy.)
|
|
1967
1207
|
|
|
1968
1208
|
function arraylike(data) {
|
|
1969
|
-
return
|
|
1209
|
+
return typeof data === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
|
|
1970
1210
|
: Array.from(data); // Map, Set, iterable, string, or anything else
|
|
1971
1211
|
}
|
|
1972
1212
|
|
|
@@ -2073,22 +1313,10 @@ function selection_node () {
|
|
|
2073
1313
|
}
|
|
2074
1314
|
|
|
2075
1315
|
function selection_size () {
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
var _iterator = _createForOfIteratorHelper(this),
|
|
2079
|
-
_step;
|
|
1316
|
+
let size = 0;
|
|
2080
1317
|
|
|
2081
|
-
|
|
2082
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2083
|
-
var node = _step.value;
|
|
2084
|
-
++size;
|
|
2085
|
-
} // eslint-disable-line no-unused-vars
|
|
1318
|
+
for (const node of this) ++size; // eslint-disable-line no-unused-vars
|
|
2086
1319
|
|
|
2087
|
-
} catch (err) {
|
|
2088
|
-
_iterator.e(err);
|
|
2089
|
-
} finally {
|
|
2090
|
-
_iterator.f();
|
|
2091
|
-
}
|
|
2092
1320
|
|
|
2093
1321
|
return size;
|
|
2094
1322
|
}
|
|
@@ -2225,7 +1453,7 @@ function ClassList(node) {
|
|
|
2225
1453
|
}
|
|
2226
1454
|
|
|
2227
1455
|
ClassList.prototype = {
|
|
2228
|
-
add: function
|
|
1456
|
+
add: function (name) {
|
|
2229
1457
|
var i = this._names.indexOf(name);
|
|
2230
1458
|
|
|
2231
1459
|
if (i < 0) {
|
|
@@ -2234,7 +1462,7 @@ ClassList.prototype = {
|
|
|
2234
1462
|
this._node.setAttribute("class", this._names.join(" "));
|
|
2235
1463
|
}
|
|
2236
1464
|
},
|
|
2237
|
-
remove: function
|
|
1465
|
+
remove: function (name) {
|
|
2238
1466
|
var i = this._names.indexOf(name);
|
|
2239
1467
|
|
|
2240
1468
|
if (i >= 0) {
|
|
@@ -2243,7 +1471,7 @@ ClassList.prototype = {
|
|
|
2243
1471
|
this._node.setAttribute("class", this._names.join(" "));
|
|
2244
1472
|
}
|
|
2245
1473
|
},
|
|
2246
|
-
contains: function
|
|
1474
|
+
contains: function (name) {
|
|
2247
1475
|
return this._names.indexOf(name) >= 0;
|
|
2248
1476
|
}
|
|
2249
1477
|
};
|
|
@@ -2253,9 +1481,7 @@ function classedAdd(node, names) {
|
|
|
2253
1481
|
i = -1,
|
|
2254
1482
|
n = names.length;
|
|
2255
1483
|
|
|
2256
|
-
while (++i < n)
|
|
2257
|
-
list.add(names[i]);
|
|
2258
|
-
}
|
|
1484
|
+
while (++i < n) list.add(names[i]);
|
|
2259
1485
|
}
|
|
2260
1486
|
|
|
2261
1487
|
function classedRemove(node, names) {
|
|
@@ -2263,9 +1489,7 @@ function classedRemove(node, names) {
|
|
|
2263
1489
|
i = -1,
|
|
2264
1490
|
n = names.length;
|
|
2265
1491
|
|
|
2266
|
-
while (++i < n)
|
|
2267
|
-
list.remove(names[i]);
|
|
2268
|
-
}
|
|
1492
|
+
while (++i < n) list.remove(names[i]);
|
|
2269
1493
|
}
|
|
2270
1494
|
|
|
2271
1495
|
function classedTrue(names) {
|
|
@@ -2294,9 +1518,7 @@ function selection_classed (name, value) {
|
|
|
2294
1518
|
i = -1,
|
|
2295
1519
|
n = names.length;
|
|
2296
1520
|
|
|
2297
|
-
while (++i < n)
|
|
2298
|
-
if (!list.contains(names[i])) return false;
|
|
2299
|
-
}
|
|
1521
|
+
while (++i < n) if (!list.contains(names[i])) return false;
|
|
2300
1522
|
|
|
2301
1523
|
return true;
|
|
2302
1524
|
}
|
|
@@ -2491,9 +1713,7 @@ function selection_on (typename, value, options) {
|
|
|
2491
1713
|
|
|
2492
1714
|
on = value ? onAdd : onRemove;
|
|
2493
1715
|
|
|
2494
|
-
for (i = 0; i < n; ++i)
|
|
2495
|
-
this.each(on(typenames[i], value, options));
|
|
2496
|
-
}
|
|
1716
|
+
for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
|
|
2497
1717
|
|
|
2498
1718
|
return this;
|
|
2499
1719
|
}
|
|
@@ -2528,54 +1748,12 @@ function selection_dispatch (type, params) {
|
|
|
2528
1748
|
return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params));
|
|
2529
1749
|
}
|
|
2530
1750
|
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
2536
|
-
while (1) {
|
|
2537
|
-
switch (_context.prev = _context.next) {
|
|
2538
|
-
case 0:
|
|
2539
|
-
groups = this._groups, j = 0, m = groups.length;
|
|
2540
|
-
|
|
2541
|
-
case 1:
|
|
2542
|
-
if (!(j < m)) {
|
|
2543
|
-
_context.next = 13;
|
|
2544
|
-
break;
|
|
2545
|
-
}
|
|
2546
|
-
|
|
2547
|
-
group = groups[j], i = 0, n = group.length;
|
|
2548
|
-
|
|
2549
|
-
case 3:
|
|
2550
|
-
if (!(i < n)) {
|
|
2551
|
-
_context.next = 10;
|
|
2552
|
-
break;
|
|
2553
|
-
}
|
|
2554
|
-
|
|
2555
|
-
if (!(node = group[i])) {
|
|
2556
|
-
_context.next = 7;
|
|
2557
|
-
break;
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
_context.next = 7;
|
|
2561
|
-
return node;
|
|
2562
|
-
|
|
2563
|
-
case 7:
|
|
2564
|
-
++i;
|
|
2565
|
-
_context.next = 3;
|
|
2566
|
-
break;
|
|
2567
|
-
|
|
2568
|
-
case 10:
|
|
2569
|
-
++j;
|
|
2570
|
-
_context.next = 1;
|
|
2571
|
-
break;
|
|
2572
|
-
|
|
2573
|
-
case 13:
|
|
2574
|
-
case "end":
|
|
2575
|
-
return _context.stop();
|
|
2576
|
-
}
|
|
1751
|
+
function* selection_iterator () {
|
|
1752
|
+
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
1753
|
+
for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
|
|
1754
|
+
if (node = group[i]) yield node;
|
|
2577
1755
|
}
|
|
2578
|
-
}
|
|
1756
|
+
}
|
|
2579
1757
|
}
|
|
2580
1758
|
|
|
2581
1759
|
var root = [null];
|
|
@@ -2592,7 +1770,7 @@ function selection_selection() {
|
|
|
2592
1770
|
return this;
|
|
2593
1771
|
}
|
|
2594
1772
|
|
|
2595
|
-
Selection$1.prototype = selection.prototype =
|
|
1773
|
+
Selection$1.prototype = selection.prototype = {
|
|
2596
1774
|
constructor: Selection$1,
|
|
2597
1775
|
select: selection_select,
|
|
2598
1776
|
selectAll: selection_selectAll,
|
|
@@ -2627,8 +1805,9 @@ Selection$1.prototype = selection.prototype = _defineProperty({
|
|
|
2627
1805
|
clone: selection_clone,
|
|
2628
1806
|
datum: selection_datum,
|
|
2629
1807
|
on: selection_on,
|
|
2630
|
-
dispatch: selection_dispatch
|
|
2631
|
-
|
|
1808
|
+
dispatch: selection_dispatch,
|
|
1809
|
+
[Symbol.iterator]: selection_iterator
|
|
1810
|
+
};
|
|
2632
1811
|
|
|
2633
1812
|
function select (selector) {
|
|
2634
1813
|
return typeof selector === "string" ? new Selection$1([[document.querySelector(selector)]], [document.documentElement]) : new Selection$1([[selector]], root);
|
|
@@ -2641,17 +1820,14 @@ function define (constructor, factory, prototype) {
|
|
|
2641
1820
|
function extend(parent, definition) {
|
|
2642
1821
|
var prototype = Object.create(parent.prototype);
|
|
2643
1822
|
|
|
2644
|
-
for (var key in definition)
|
|
2645
|
-
prototype[key] = definition[key];
|
|
2646
|
-
}
|
|
1823
|
+
for (var key in definition) prototype[key] = definition[key];
|
|
2647
1824
|
|
|
2648
1825
|
return prototype;
|
|
2649
1826
|
}
|
|
2650
1827
|
|
|
2651
1828
|
function Color() {}
|
|
2652
|
-
var
|
|
2653
|
-
|
|
2654
|
-
var _brighter = 1 / _darker;
|
|
1829
|
+
var darker = 0.7;
|
|
1830
|
+
var brighter = 1 / darker;
|
|
2655
1831
|
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
2656
1832
|
reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
2657
1833
|
reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
@@ -2813,10 +1989,10 @@ var named = {
|
|
|
2813
1989
|
yellowgreen: 0x9acd32
|
|
2814
1990
|
};
|
|
2815
1991
|
define(Color, color, {
|
|
2816
|
-
copy: function
|
|
1992
|
+
copy: function (channels) {
|
|
2817
1993
|
return Object.assign(new this.constructor(), this, channels);
|
|
2818
1994
|
},
|
|
2819
|
-
displayable: function
|
|
1995
|
+
displayable: function () {
|
|
2820
1996
|
return this.rgb().displayable();
|
|
2821
1997
|
},
|
|
2822
1998
|
hex: color_formatHex,
|
|
@@ -2882,18 +2058,18 @@ function Rgb(r, g, b, opacity) {
|
|
|
2882
2058
|
this.opacity = +opacity;
|
|
2883
2059
|
}
|
|
2884
2060
|
define(Rgb, rgb, extend(Color, {
|
|
2885
|
-
brighter: function
|
|
2886
|
-
k = k == null ?
|
|
2061
|
+
brighter: function (k) {
|
|
2062
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
2887
2063
|
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
2888
2064
|
},
|
|
2889
|
-
darker: function
|
|
2890
|
-
k = k == null ?
|
|
2065
|
+
darker: function (k) {
|
|
2066
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
2891
2067
|
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
2892
2068
|
},
|
|
2893
|
-
rgb: function
|
|
2069
|
+
rgb: function () {
|
|
2894
2070
|
return this;
|
|
2895
2071
|
},
|
|
2896
|
-
displayable: function
|
|
2072
|
+
displayable: function () {
|
|
2897
2073
|
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
2898
2074
|
},
|
|
2899
2075
|
hex: rgb_formatHex,
|
|
@@ -2960,15 +2136,15 @@ function Hsl(h, s, l, opacity) {
|
|
|
2960
2136
|
}
|
|
2961
2137
|
|
|
2962
2138
|
define(Hsl, hsl, extend(Color, {
|
|
2963
|
-
brighter: function
|
|
2964
|
-
k = k == null ?
|
|
2139
|
+
brighter: function (k) {
|
|
2140
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
2965
2141
|
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
2966
2142
|
},
|
|
2967
|
-
darker: function
|
|
2968
|
-
k = k == null ?
|
|
2143
|
+
darker: function (k) {
|
|
2144
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
2969
2145
|
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
2970
2146
|
},
|
|
2971
|
-
rgb: function
|
|
2147
|
+
rgb: function () {
|
|
2972
2148
|
var h = this.h % 360 + (this.h < 0) * 360,
|
|
2973
2149
|
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
2974
2150
|
l = this.l,
|
|
@@ -2976,10 +2152,10 @@ define(Hsl, hsl, extend(Color, {
|
|
|
2976
2152
|
m1 = 2 * l - m2;
|
|
2977
2153
|
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);
|
|
2978
2154
|
},
|
|
2979
|
-
displayable: function
|
|
2155
|
+
displayable: function () {
|
|
2980
2156
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
2981
2157
|
},
|
|
2982
|
-
formatHsl: function
|
|
2158
|
+
formatHsl: function () {
|
|
2983
2159
|
var a = this.opacity;
|
|
2984
2160
|
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
2985
2161
|
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
|
@@ -2991,11 +2167,7 @@ function hsl2rgb(h, m1, m2) {
|
|
|
2991
2167
|
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
|
2992
2168
|
}
|
|
2993
2169
|
|
|
2994
|
-
var constant = (
|
|
2995
|
-
return function () {
|
|
2996
|
-
return x;
|
|
2997
|
-
};
|
|
2998
|
-
});
|
|
2170
|
+
var constant = (x => () => x);
|
|
2999
2171
|
|
|
3000
2172
|
function linear(a, d) {
|
|
3001
2173
|
return function (t) {
|
|
@@ -3112,9 +2284,7 @@ function interpolateString (a, b) {
|
|
|
3112
2284
|
|
|
3113
2285
|
|
|
3114
2286
|
return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {
|
|
3115
|
-
for (var i = 0, o; i < b; ++i)
|
|
3116
|
-
s[(o = q[i]).i] = o.x(t);
|
|
3117
|
-
}
|
|
2287
|
+
for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
|
|
3118
2288
|
|
|
3119
2289
|
return s.join("");
|
|
3120
2290
|
});
|
|
@@ -3149,7 +2319,7 @@ var svgNode;
|
|
|
3149
2319
|
/* eslint-disable no-undef */
|
|
3150
2320
|
|
|
3151
2321
|
function parseCss(value) {
|
|
3152
|
-
|
|
2322
|
+
const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
|
|
3153
2323
|
return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
|
|
3154
2324
|
}
|
|
3155
2325
|
function parseSvg(value) {
|
|
@@ -3237,9 +2407,7 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
|
|
|
3237
2407
|
n = q.length,
|
|
3238
2408
|
o;
|
|
3239
2409
|
|
|
3240
|
-
while (++i < n)
|
|
3241
|
-
s[(o = q[i]).i] = o.x(t);
|
|
3242
|
-
}
|
|
2410
|
+
while (++i < n) s[(o = q[i]).i] = o.x(t);
|
|
3243
2411
|
|
|
3244
2412
|
return s.join("");
|
|
3245
2413
|
};
|
|
@@ -3262,8 +2430,8 @@ taskHead,
|
|
|
3262
2430
|
clockLast = 0,
|
|
3263
2431
|
clockNow = 0,
|
|
3264
2432
|
clockSkew = 0,
|
|
3265
|
-
clock =
|
|
3266
|
-
setFrame =
|
|
2433
|
+
clock = typeof performance === "object" && performance.now ? performance : Date,
|
|
2434
|
+
setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
|
|
3267
2435
|
setTimeout(f, 17);
|
|
3268
2436
|
};
|
|
3269
2437
|
function now() {
|
|
@@ -3279,7 +2447,7 @@ function Timer() {
|
|
|
3279
2447
|
}
|
|
3280
2448
|
Timer.prototype = timer.prototype = {
|
|
3281
2449
|
constructor: Timer,
|
|
3282
|
-
restart: function
|
|
2450
|
+
restart: function (callback, delay, time) {
|
|
3283
2451
|
if (typeof callback !== "function") throw new TypeError("callback is not a function");
|
|
3284
2452
|
time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
|
|
3285
2453
|
|
|
@@ -3292,7 +2460,7 @@ Timer.prototype = timer.prototype = {
|
|
|
3292
2460
|
this._time = time;
|
|
3293
2461
|
sleep();
|
|
3294
2462
|
},
|
|
3295
|
-
stop: function
|
|
2463
|
+
stop: function () {
|
|
3296
2464
|
if (this._call) {
|
|
3297
2465
|
this._call = null;
|
|
3298
2466
|
this._time = Infinity;
|
|
@@ -3378,7 +2546,7 @@ function sleep(time) {
|
|
|
3378
2546
|
function timeout (callback, delay, time) {
|
|
3379
2547
|
var t = new Timer();
|
|
3380
2548
|
delay = delay == null ? 0 : +delay;
|
|
3381
|
-
t.restart(
|
|
2549
|
+
t.restart(elapsed => {
|
|
3382
2550
|
t.stop();
|
|
3383
2551
|
callback(elapsed + delay);
|
|
3384
2552
|
}, delay, time);
|
|
@@ -3522,9 +2690,7 @@ function create(node, id, self) {
|
|
|
3522
2690
|
self.timer.stop();
|
|
3523
2691
|
delete schedules[id];
|
|
3524
2692
|
|
|
3525
|
-
for (var i in schedules)
|
|
3526
|
-
return;
|
|
3527
|
-
} // eslint-disable-line no-unused-vars
|
|
2693
|
+
for (var i in schedules) return; // eslint-disable-line no-unused-vars
|
|
3528
2694
|
|
|
3529
2695
|
|
|
3530
2696
|
delete node.__transition;
|
|
@@ -3883,9 +3049,7 @@ function removeFunction(id) {
|
|
|
3883
3049
|
return function () {
|
|
3884
3050
|
var parent = this.parentNode;
|
|
3885
3051
|
|
|
3886
|
-
for (var i in this.__transition)
|
|
3887
|
-
if (+i !== id) return;
|
|
3888
|
-
}
|
|
3052
|
+
for (var i in this.__transition) if (+i !== id) return;
|
|
3889
3053
|
|
|
3890
3054
|
if (parent) parent.removeChild(this);
|
|
3891
3055
|
};
|
|
@@ -4091,782 +3255,1393 @@ function transition_transition () {
|
|
|
4091
3255
|
}
|
|
4092
3256
|
}
|
|
4093
3257
|
|
|
4094
|
-
return new Transition(groups, this._parents, name, id1);
|
|
4095
|
-
}
|
|
3258
|
+
return new Transition(groups, this._parents, name, id1);
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
function transition_end () {
|
|
3262
|
+
var on0,
|
|
3263
|
+
on1,
|
|
3264
|
+
that = this,
|
|
3265
|
+
id = that._id,
|
|
3266
|
+
size = that.size();
|
|
3267
|
+
return new Promise(function (resolve, reject) {
|
|
3268
|
+
var cancel = {
|
|
3269
|
+
value: reject
|
|
3270
|
+
},
|
|
3271
|
+
end = {
|
|
3272
|
+
value: function () {
|
|
3273
|
+
if (--size === 0) resolve();
|
|
3274
|
+
}
|
|
3275
|
+
};
|
|
3276
|
+
that.each(function () {
|
|
3277
|
+
var schedule = set(this, id),
|
|
3278
|
+
on = schedule.on; // If this node shared a dispatch with the previous node,
|
|
3279
|
+
// just assign the updated shared dispatch and we’re done!
|
|
3280
|
+
// Otherwise, copy-on-write.
|
|
3281
|
+
|
|
3282
|
+
if (on !== on0) {
|
|
3283
|
+
on1 = (on0 = on).copy();
|
|
3284
|
+
|
|
3285
|
+
on1._.cancel.push(cancel);
|
|
3286
|
+
|
|
3287
|
+
on1._.interrupt.push(cancel);
|
|
3288
|
+
|
|
3289
|
+
on1._.end.push(end);
|
|
3290
|
+
}
|
|
3291
|
+
|
|
3292
|
+
schedule.on = on1;
|
|
3293
|
+
}); // The selection was empty, resolve end immediately
|
|
3294
|
+
|
|
3295
|
+
if (size === 0) resolve();
|
|
3296
|
+
});
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
var id = 0;
|
|
3300
|
+
function Transition(groups, parents, name, id) {
|
|
3301
|
+
this._groups = groups;
|
|
3302
|
+
this._parents = parents;
|
|
3303
|
+
this._name = name;
|
|
3304
|
+
this._id = id;
|
|
3305
|
+
}
|
|
3306
|
+
function newId() {
|
|
3307
|
+
return ++id;
|
|
3308
|
+
}
|
|
3309
|
+
var selection_prototype = selection.prototype;
|
|
3310
|
+
Transition.prototype = {
|
|
3311
|
+
constructor: Transition,
|
|
3312
|
+
select: transition_select,
|
|
3313
|
+
selectAll: transition_selectAll,
|
|
3314
|
+
selectChild: selection_prototype.selectChild,
|
|
3315
|
+
selectChildren: selection_prototype.selectChildren,
|
|
3316
|
+
filter: transition_filter,
|
|
3317
|
+
merge: transition_merge,
|
|
3318
|
+
selection: transition_selection,
|
|
3319
|
+
transition: transition_transition,
|
|
3320
|
+
call: selection_prototype.call,
|
|
3321
|
+
nodes: selection_prototype.nodes,
|
|
3322
|
+
node: selection_prototype.node,
|
|
3323
|
+
size: selection_prototype.size,
|
|
3324
|
+
empty: selection_prototype.empty,
|
|
3325
|
+
each: selection_prototype.each,
|
|
3326
|
+
on: transition_on,
|
|
3327
|
+
attr: transition_attr,
|
|
3328
|
+
attrTween: transition_attrTween,
|
|
3329
|
+
style: transition_style,
|
|
3330
|
+
styleTween: transition_styleTween,
|
|
3331
|
+
text: transition_text,
|
|
3332
|
+
textTween: transition_textTween,
|
|
3333
|
+
remove: transition_remove,
|
|
3334
|
+
tween: transition_tween,
|
|
3335
|
+
delay: transition_delay,
|
|
3336
|
+
duration: transition_duration,
|
|
3337
|
+
ease: transition_ease,
|
|
3338
|
+
easeVarying: transition_easeVarying,
|
|
3339
|
+
end: transition_end,
|
|
3340
|
+
[Symbol.iterator]: selection_prototype[Symbol.iterator]
|
|
3341
|
+
};
|
|
3342
|
+
|
|
3343
|
+
function cubicInOut(t) {
|
|
3344
|
+
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
|
|
3345
|
+
}
|
|
3346
|
+
|
|
3347
|
+
var defaultTiming = {
|
|
3348
|
+
time: null,
|
|
3349
|
+
// Set on use.
|
|
3350
|
+
delay: 0,
|
|
3351
|
+
duration: 250,
|
|
3352
|
+
ease: cubicInOut
|
|
3353
|
+
};
|
|
3354
|
+
|
|
3355
|
+
function inherit(node, id) {
|
|
3356
|
+
var timing;
|
|
3357
|
+
|
|
3358
|
+
while (!(timing = node.__transition) || !(timing = timing[id])) {
|
|
3359
|
+
if (!(node = node.parentNode)) {
|
|
3360
|
+
throw new Error(`transition ${id} not found`);
|
|
3361
|
+
}
|
|
3362
|
+
}
|
|
3363
|
+
|
|
3364
|
+
return timing;
|
|
3365
|
+
}
|
|
3366
|
+
|
|
3367
|
+
function selection_transition (name) {
|
|
3368
|
+
var id, timing;
|
|
3369
|
+
|
|
3370
|
+
if (name instanceof Transition) {
|
|
3371
|
+
id = name._id, name = name._name;
|
|
3372
|
+
} else {
|
|
3373
|
+
id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
|
|
3374
|
+
}
|
|
3375
|
+
|
|
3376
|
+
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
3377
|
+
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3378
|
+
if (node = group[i]) {
|
|
3379
|
+
schedule(node, name, id, i, group, timing || inherit(node, id));
|
|
3380
|
+
}
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
return new Transition(groups, this._parents, name, id);
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3387
|
+
selection.prototype.interrupt = selection_interrupt;
|
|
3388
|
+
selection.prototype.transition = selection_transition;
|
|
3389
|
+
|
|
3390
|
+
let _$6 = t => t,
|
|
3391
|
+
_t$6,
|
|
3392
|
+
_t2$6,
|
|
3393
|
+
_t3,
|
|
3394
|
+
_t4,
|
|
3395
|
+
_t5,
|
|
3396
|
+
_t6,
|
|
3397
|
+
_t7,
|
|
3398
|
+
_t8,
|
|
3399
|
+
_t9;
|
|
3400
|
+
/*
|
|
3401
|
+
DecidablesElement Base Class - Not intended for instantiation!
|
|
3402
|
+
<decidables-element>
|
|
3403
|
+
*/
|
|
3404
|
+
|
|
3405
|
+
class DecidablesElement extends s {
|
|
3406
|
+
getComputedStyleValue(property) {
|
|
3407
|
+
return getComputedStyle(this).getPropertyValue(property).trim();
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3410
|
+
firstUpdated(changedProperties) {
|
|
3411
|
+
super.firstUpdated(changedProperties); // Use focus highlighting if keyboard is used at all
|
|
3412
|
+
|
|
3413
|
+
select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', event => {
|
|
3414
|
+
const element = event.currentTarget;
|
|
3415
|
+
select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
|
|
3416
|
+
}).on('keydown.keyboard', event => {
|
|
3417
|
+
const element = event.currentTarget;
|
|
3418
|
+
select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
|
|
3419
|
+
});
|
|
3420
|
+
}
|
|
3421
|
+
|
|
3422
|
+
static get greys() {
|
|
3423
|
+
const grey = '#999999';
|
|
3424
|
+
const greys = {};
|
|
3425
|
+
greys.white = '#ffffff';
|
|
3426
|
+
greys.light75 = interpolateRgb(grey, '#ffffff')(0.75);
|
|
3427
|
+
greys.light50 = interpolateRgb(grey, '#ffffff')(0.5);
|
|
3428
|
+
greys.light25 = interpolateRgb(grey, '#ffffff')(0.25);
|
|
3429
|
+
greys.grey = grey;
|
|
3430
|
+
greys.dark25 = interpolateRgb(grey, '#000000')(0.25);
|
|
3431
|
+
greys.dark50 = interpolateRgb(grey, '#000000')(0.5);
|
|
3432
|
+
greys.dark75 = interpolateRgb(grey, '#000000')(0.75);
|
|
3433
|
+
greys.black = '#000000';
|
|
3434
|
+
return greys;
|
|
3435
|
+
}
|
|
3436
|
+
|
|
3437
|
+
static get shadows() {
|
|
3438
|
+
// Material Design elevation styles
|
|
3439
|
+
// References:
|
|
3440
|
+
// https://github.com/material-components/material-components-web/tree/master/packages/mdc-elevation
|
|
3441
|
+
// https://codepen.io/hanger/pen/yOGvQp
|
|
3442
|
+
|
|
3443
|
+
/* eslint-disable key-spacing, object-curly-newline */
|
|
3444
|
+
return {
|
|
3445
|
+
elevations: [0, 2, 4, 8, 16],
|
|
3446
|
+
baselineColor: '#000000',
|
|
3447
|
+
baselineColorString: '0, 0, 0',
|
|
3448
|
+
inverseBaselineColor: '#FFFFFF',
|
|
3449
|
+
inverseBaselineColorString: '255, 255, 255',
|
|
3450
|
+
opacityUmbra: 0.2,
|
|
3451
|
+
opacityPenumbra: 0.14,
|
|
3452
|
+
opacityAmbient: 0.12,
|
|
3453
|
+
opacityBoost: 0.2,
|
|
3454
|
+
mapUmbra: {
|
|
3455
|
+
// $mdc-elevation-umbra-map
|
|
3456
|
+
0: {
|
|
3457
|
+
x: 0,
|
|
3458
|
+
y: 0,
|
|
3459
|
+
b: 0,
|
|
3460
|
+
s: 0
|
|
3461
|
+
},
|
|
3462
|
+
// offset-x, offset-y, blur-radius, spread-radius
|
|
3463
|
+
2: {
|
|
3464
|
+
x: 0,
|
|
3465
|
+
y: 3,
|
|
3466
|
+
b: 1,
|
|
3467
|
+
s: -2
|
|
3468
|
+
},
|
|
3469
|
+
4: {
|
|
3470
|
+
x: 0,
|
|
3471
|
+
y: 2,
|
|
3472
|
+
b: 4,
|
|
3473
|
+
s: -1
|
|
3474
|
+
},
|
|
3475
|
+
8: {
|
|
3476
|
+
x: 0,
|
|
3477
|
+
y: 5,
|
|
3478
|
+
b: 5,
|
|
3479
|
+
s: -3
|
|
3480
|
+
},
|
|
3481
|
+
16: {
|
|
3482
|
+
x: 0,
|
|
3483
|
+
y: 8,
|
|
3484
|
+
b: 10,
|
|
3485
|
+
s: -5
|
|
3486
|
+
}
|
|
3487
|
+
},
|
|
3488
|
+
mapPenumbra: {
|
|
3489
|
+
// $mdc-elevation-penumbra-map
|
|
3490
|
+
0: {
|
|
3491
|
+
x: 0,
|
|
3492
|
+
y: 0,
|
|
3493
|
+
b: 0,
|
|
3494
|
+
s: 0
|
|
3495
|
+
},
|
|
3496
|
+
// offset-x, offset-y, blur-radius, spread-radius
|
|
3497
|
+
2: {
|
|
3498
|
+
x: 0,
|
|
3499
|
+
y: 2,
|
|
3500
|
+
b: 2,
|
|
3501
|
+
s: 0
|
|
3502
|
+
},
|
|
3503
|
+
4: {
|
|
3504
|
+
x: 0,
|
|
3505
|
+
y: 4,
|
|
3506
|
+
b: 5,
|
|
3507
|
+
s: 0
|
|
3508
|
+
},
|
|
3509
|
+
8: {
|
|
3510
|
+
x: 0,
|
|
3511
|
+
y: 8,
|
|
3512
|
+
b: 10,
|
|
3513
|
+
s: 1
|
|
3514
|
+
},
|
|
3515
|
+
16: {
|
|
3516
|
+
x: 0,
|
|
3517
|
+
y: 16,
|
|
3518
|
+
b: 24,
|
|
3519
|
+
s: 2
|
|
3520
|
+
}
|
|
3521
|
+
},
|
|
3522
|
+
mapAmbient: {
|
|
3523
|
+
// $mdc-elevation-ambient-map
|
|
3524
|
+
0: {
|
|
3525
|
+
x: 0,
|
|
3526
|
+
y: 0,
|
|
3527
|
+
b: 0,
|
|
3528
|
+
s: 0
|
|
3529
|
+
},
|
|
3530
|
+
// offset-x, offset-y, blur-radius, spread-radius
|
|
3531
|
+
2: {
|
|
3532
|
+
x: 0,
|
|
3533
|
+
y: 1,
|
|
3534
|
+
b: 5,
|
|
3535
|
+
s: 0
|
|
3536
|
+
},
|
|
3537
|
+
4: {
|
|
3538
|
+
x: 0,
|
|
3539
|
+
y: 1,
|
|
3540
|
+
b: 10,
|
|
3541
|
+
s: 0
|
|
3542
|
+
},
|
|
3543
|
+
8: {
|
|
3544
|
+
x: 0,
|
|
3545
|
+
y: 3,
|
|
3546
|
+
b: 14,
|
|
3547
|
+
s: 2
|
|
3548
|
+
},
|
|
3549
|
+
16: {
|
|
3550
|
+
x: 0,
|
|
3551
|
+
y: 6,
|
|
3552
|
+
b: 30,
|
|
3553
|
+
s: 5
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
};
|
|
3557
|
+
/* eslint-enable key-spacing, object-curly-newline */
|
|
3558
|
+
}
|
|
3559
|
+
|
|
3560
|
+
static cssBoxShadow(elevation, rotate = false, inverse = false) {
|
|
3561
|
+
const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
|
|
3562
|
+
const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
|
|
3563
|
+
const ambientO = this.shadows.opacityAmbient + this.shadows.opacityBoost;
|
|
3564
|
+
const umbraC = inverse ? `rgba(${this.shadows.inverseBaselineColorString}, ${umbraO})` : `rgba(${this.shadows.baselineColorString}, ${umbraO})`;
|
|
3565
|
+
const penumbraC = inverse ? `rgba(${this.shadows.inverseBaselineColorString}, ${penumbraO})` : `rgba(${this.shadows.baselineColorString}, ${penumbraO})`;
|
|
3566
|
+
const ambientC = inverse ? `rgba(${this.shadows.inverseBaselineColorString}, ${ambientO})` : `rgba(${this.shadows.baselineColorString}, ${ambientO})`;
|
|
3567
|
+
const umbraM = this.shadows.mapUmbra[elevation];
|
|
3568
|
+
const penumbraM = this.shadows.mapPenumbra[elevation];
|
|
3569
|
+
const ambientM = this.shadows.mapAmbient[elevation];
|
|
3570
|
+
const umbraS = rotate ? `${-umbraM.y}px ${umbraM.y / 2}px ${umbraM.b}px ${umbraM.s}px` : `${umbraM.y / 2}px ${umbraM.y}px ${umbraM.b}px ${umbraM.s}px`;
|
|
3571
|
+
const penumbraS = rotate ? `${-penumbraM.y}px ${penumbraM.y / 2}px ${penumbraM.b}px ${penumbraM.s}px` : `${penumbraM.y / 2}px ${penumbraM.y}px ${penumbraM.b}px ${penumbraM.s}px`;
|
|
3572
|
+
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`;
|
|
3573
|
+
return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
|
|
3574
|
+
}
|
|
3575
|
+
|
|
3576
|
+
static get svgFilters() {
|
|
3577
|
+
const shadows = DecidablesElement.shadows; // eslint-disable-line prefer-destructuring
|
|
3578
|
+
|
|
3579
|
+
const filters = shadows.elevations.map(z => {
|
|
3580
|
+
return y(_t$6 || (_t$6 = _$6`
|
|
3581
|
+
<filter id=${0} x="-250%" y="-250%" width="600%" height="600%">
|
|
3582
|
+
<feComponentTransfer in="SourceAlpha" result="solid">
|
|
3583
|
+
<feFuncA type="table" tableValues="0 1 1"/>
|
|
3584
|
+
</feComponentTransfer>
|
|
3585
|
+
<feOffset in="solid" result="offU" dx=${0} dy=${0} />
|
|
3586
|
+
<feOffset in="solid" result="offP" dx=${0} dy=${0} />
|
|
3587
|
+
<feOffset in="solid" result="offA" dx=${0} dy=${0} />
|
|
3588
|
+
${0}
|
|
3589
|
+
${0}
|
|
3590
|
+
${0}
|
|
3591
|
+
<feGaussianBlur in=${0} result="blurU" stdDeviation=${0} />
|
|
3592
|
+
<feGaussianBlur in=${0} result="blurP" stdDeviation=${0} />
|
|
3593
|
+
<feGaussianBlur in=${0} result="blurA" stdDeviation=${0} />
|
|
3594
|
+
<feFlood in="SourceGraphic" result="opU" flood-color=${0} flood-opacity=${0} />
|
|
3595
|
+
<feFlood in="SourceGraphic" result="opP" flood-color=${0} flood-opacity=${0} />
|
|
3596
|
+
<feFlood in="SourceGraphic" result="opA" flood-color=${0} flood-opacity=${0} />
|
|
3597
|
+
<feComposite in="opU" in2="blurU" result="shU" operator="in" />
|
|
3598
|
+
<feComposite in="opP" in2="blurP" result="shP" operator="in" />
|
|
3599
|
+
<feComposite in="opA" in2="blurA" result="shA" operator="in" />
|
|
3600
|
+
<feMorphology in="solid" result="smaller" operator="erode" radius="1" />
|
|
3601
|
+
<feComposite in="shU" in2="smaller" result="finalU" operator="out" />
|
|
3602
|
+
<feComposite in="shP" in2="smaller" result="finalP" operator="out" />
|
|
3603
|
+
<feComposite in="shA" in2="smaller" result="finalA" operator="out" />
|
|
3604
|
+
<feMerge>
|
|
3605
|
+
<feMergeNode in="finalU" />
|
|
3606
|
+
<feMergeNode in="finalP" />
|
|
3607
|
+
<feMergeNode in="finalA" />
|
|
3608
|
+
<feMergeNode in="SourceGraphic" />
|
|
3609
|
+
</feMerge>
|
|
3610
|
+
</filter>`), `shadow-${z}`, shadows.mapUmbra[z].y / 2, shadows.mapUmbra[z].y, shadows.mapPenumbra[z].y / 2, shadows.mapPenumbra[z].y, shadows.mapAmbient[z].y / 2, shadows.mapAmbient[z].y, shadows.mapUmbra[z].s === 0 ? y(_t2$6 || (_t2$6 = _$6``)) : y(_t3 || (_t3 = _$6`<feMorphology in="offU" result="spreadU" operator=${0} radius=${0} />`), shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapUmbra[z].s)), shadows.mapPenumbra[z].s === 0 ? y(_t4 || (_t4 = _$6``)) : y(_t5 || (_t5 = _$6`<feMorphology in="offP" result="spreadP" operator=${0} radius=${0} />`), shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapPenumbra[z].s)), shadows.mapAmbient[z].s === 0 ? y(_t6 || (_t6 = _$6``)) : y(_t7 || (_t7 = _$6`<feMorphology in="offA" result="spreadA" operator=${0} radius=${0} />`), shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapAmbient[z].s)), shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU', shadows.mapUmbra[z].b / 2, shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP', shadows.mapPenumbra[z].b / 2, shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA', shadows.mapAmbient[z].b / 2, shadows.baselineColor, shadows.opacityUmbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityPenumbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityAmbient + shadows.opacityBoost);
|
|
3611
|
+
});
|
|
3612
|
+
return y(_t8 || (_t8 = _$6`
|
|
3613
|
+
<svg class="defs">
|
|
3614
|
+
<defs>
|
|
3615
|
+
${0}
|
|
3616
|
+
</defs>
|
|
3617
|
+
</svg>
|
|
3618
|
+
`), filters);
|
|
3619
|
+
}
|
|
3620
|
+
|
|
3621
|
+
static get styles() {
|
|
3622
|
+
return r$2(_t9 || (_t9 = _$6`
|
|
3623
|
+
:host {
|
|
3624
|
+
---shadow-0: var(--shadow-0, ${0});
|
|
3625
|
+
---shadow-2: var(--shadow-2, ${0});
|
|
3626
|
+
---shadow-4: var(--shadow-4, ${0});
|
|
3627
|
+
---shadow-8: var(--shadow-8, ${0});
|
|
3628
|
+
|
|
3629
|
+
---color-background: var(--color-background, ${0});
|
|
3630
|
+
---color-border: var(--color-border, ${0});
|
|
3631
|
+
---color-text: var(--color-text, ${0});
|
|
3632
|
+
---color-text-inverse: var(--color-text-inverse, ${0});
|
|
3633
|
+
---color-link: var(--color-link, ${0});
|
|
3634
|
+
---color-element-background: var(--color-element-background, ${0});
|
|
3635
|
+
---color-element-disabled: var(--color-element-disabled, ${0});
|
|
3636
|
+
---color-element-enabled: var(--color-element-enabled, ${0});
|
|
3637
|
+
---color-element-selected: var(--color-element-selected, ${0});
|
|
3638
|
+
---color-element-border: var(--color-element-border, ${0});
|
|
3639
|
+
---color-element-emphasis: var(--color-element-emphasis, ${0});
|
|
3640
|
+
|
|
3641
|
+
---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
|
|
3642
|
+
---font-family-math: var(--font-family-math, "Source Serif", serif);
|
|
3643
|
+
|
|
3644
|
+
---transition-duration: var(--transition-duration, 500ms);
|
|
3645
|
+
|
|
3646
|
+
font-family: var(---font-family-base);
|
|
3647
|
+
}
|
|
3648
|
+
|
|
3649
|
+
:host,
|
|
3650
|
+
:host *,
|
|
3651
|
+
:host *::before,
|
|
3652
|
+
:host *::after {
|
|
3653
|
+
box-sizing: border-box;
|
|
3654
|
+
}
|
|
3655
|
+
|
|
3656
|
+
.math-greek {
|
|
3657
|
+
font-family: var(---font-family-math);
|
|
3658
|
+
font-style: normal;
|
|
3659
|
+
}
|
|
3660
|
+
|
|
3661
|
+
.math-num {
|
|
3662
|
+
font-family: var(---font-family-base);
|
|
3663
|
+
font-style: normal;
|
|
3664
|
+
}
|
|
3665
|
+
|
|
3666
|
+
.math-var {
|
|
3667
|
+
font-family: var(---font-family-math);
|
|
3668
|
+
font-style: italic;
|
|
3669
|
+
}
|
|
3670
|
+
|
|
3671
|
+
.defs {
|
|
3672
|
+
display: block;
|
|
3673
|
+
|
|
3674
|
+
width: 0;
|
|
3675
|
+
height: 0;
|
|
3676
|
+
}
|
|
3677
|
+
`), o$3(this.cssBoxShadow(0)), o$3(this.cssBoxShadow(2)), o$3(this.cssBoxShadow(4)), o$3(this.cssBoxShadow(8)), o$3(this.greys.white), o$3(this.greys.light75), o$3(this.greys.dark75), o$3(this.greys.white), o$3(this.greys.dark25), o$3(this.greys.light75), o$3(this.greys.light50), o$3(this.greys.grey), o$3(this.greys.dark25), o$3(this.greys.dark50), o$3(this.greys.dark75));
|
|
3678
|
+
}
|
|
3679
|
+
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
let _$5 = t => t,
|
|
3683
|
+
_t$5,
|
|
3684
|
+
_t2$5;
|
|
3685
|
+
class DecidablesButton extends DecidablesElement {
|
|
3686
|
+
static get properties() {
|
|
3687
|
+
return {
|
|
3688
|
+
disabled: {
|
|
3689
|
+
attribute: 'disabled',
|
|
3690
|
+
type: Boolean,
|
|
3691
|
+
reflect: true
|
|
3692
|
+
}
|
|
3693
|
+
};
|
|
3694
|
+
}
|
|
3695
|
+
|
|
3696
|
+
constructor() {
|
|
3697
|
+
super(); // Attributes
|
|
3698
|
+
|
|
3699
|
+
this.disabled = false;
|
|
3700
|
+
}
|
|
3701
|
+
|
|
3702
|
+
static get styles() {
|
|
3703
|
+
return [super.styles, r$2(_t$5 || (_t$5 = _$5`
|
|
3704
|
+
:host {
|
|
3705
|
+
margin: 0.25rem;
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
button {
|
|
3709
|
+
width: 100%;
|
|
3710
|
+
height: 100%;
|
|
3711
|
+
padding: 0.375rem 0.75rem;
|
|
3712
|
+
|
|
3713
|
+
font-family: var(---font-family-base);
|
|
3714
|
+
font-size: 1.125rem;
|
|
3715
|
+
line-height: 1.5;
|
|
3716
|
+
color: var(---color-text-inverse);
|
|
3717
|
+
|
|
3718
|
+
border: 0;
|
|
3719
|
+
border-radius: 0.25rem;
|
|
3720
|
+
outline: none;
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3723
|
+
button:disabled {
|
|
3724
|
+
background-color: var(--decidables-button-background-color, var(---color-element-disabled));
|
|
3725
|
+
outline: none;
|
|
3726
|
+
box-shadow: none;
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
button:enabled {
|
|
3730
|
+
cursor: pointer;
|
|
3731
|
+
|
|
3732
|
+
background-color: var(--decidables-button-background-color, var(---color-element-enabled));
|
|
3733
|
+
outline: none;
|
|
3734
|
+
box-shadow: var(---shadow-2);
|
|
3735
|
+
}
|
|
3736
|
+
|
|
3737
|
+
button:enabled:hover {
|
|
3738
|
+
outline: none;
|
|
3739
|
+
box-shadow: var(---shadow-4);
|
|
3740
|
+
}
|
|
3741
|
+
|
|
3742
|
+
button:enabled:active {
|
|
3743
|
+
outline: none;
|
|
3744
|
+
box-shadow: var(---shadow-8);
|
|
3745
|
+
}
|
|
3746
|
+
|
|
3747
|
+
:host(.keyboard) button:enabled:focus {
|
|
3748
|
+
outline: none;
|
|
3749
|
+
box-shadow: var(---shadow-4);
|
|
3750
|
+
}
|
|
3751
|
+
|
|
3752
|
+
:host(.keyboard) button:enabled:focus:active {
|
|
3753
|
+
outline: none;
|
|
3754
|
+
box-shadow: var(---shadow-8);
|
|
3755
|
+
}
|
|
3756
|
+
`))];
|
|
3757
|
+
}
|
|
3758
|
+
|
|
3759
|
+
render() {
|
|
3760
|
+
return $(_t2$5 || (_t2$5 = _$5`
|
|
3761
|
+
<button ?disabled=${0}>
|
|
3762
|
+
<slot></slot>
|
|
3763
|
+
</button>
|
|
3764
|
+
`), this.disabled);
|
|
3765
|
+
}
|
|
3766
|
+
|
|
3767
|
+
}
|
|
3768
|
+
customElements.define('decidables-button', DecidablesButton);
|
|
3769
|
+
|
|
3770
|
+
/**
|
|
3771
|
+
* @license
|
|
3772
|
+
* Copyright 2018 Google LLC
|
|
3773
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3774
|
+
*/
|
|
3775
|
+
|
|
3776
|
+
const l = l => null != l ? l : w;
|
|
3777
|
+
|
|
3778
|
+
let _$4 = t => t,
|
|
3779
|
+
_t$4,
|
|
3780
|
+
_t2$4;
|
|
3781
|
+
class DecidablesSlider extends DecidablesElement {
|
|
3782
|
+
static get properties() {
|
|
3783
|
+
return {
|
|
3784
|
+
disabled: {
|
|
3785
|
+
attribute: 'disabled',
|
|
3786
|
+
type: Boolean,
|
|
3787
|
+
reflect: true
|
|
3788
|
+
},
|
|
3789
|
+
max: {
|
|
3790
|
+
attribute: 'max',
|
|
3791
|
+
type: Number,
|
|
3792
|
+
reflect: true
|
|
3793
|
+
},
|
|
3794
|
+
min: {
|
|
3795
|
+
attribute: 'min',
|
|
3796
|
+
type: Number,
|
|
3797
|
+
reflect: true
|
|
3798
|
+
},
|
|
3799
|
+
step: {
|
|
3800
|
+
attribute: 'step',
|
|
3801
|
+
type: Number,
|
|
3802
|
+
reflect: true
|
|
3803
|
+
},
|
|
3804
|
+
value: {
|
|
3805
|
+
attribute: 'value',
|
|
3806
|
+
type: Number,
|
|
3807
|
+
reflect: true
|
|
3808
|
+
}
|
|
3809
|
+
};
|
|
3810
|
+
}
|
|
3811
|
+
|
|
3812
|
+
constructor() {
|
|
3813
|
+
super(); // Attributes
|
|
3814
|
+
|
|
3815
|
+
this.disabled = false;
|
|
3816
|
+
this.max = undefined;
|
|
3817
|
+
this.min = undefined;
|
|
3818
|
+
this.step = undefined;
|
|
3819
|
+
this.value = undefined;
|
|
3820
|
+
}
|
|
3821
|
+
|
|
3822
|
+
changed(event) {
|
|
3823
|
+
this.value = event.target.value;
|
|
3824
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
3825
|
+
detail: {
|
|
3826
|
+
value: this.value
|
|
3827
|
+
},
|
|
3828
|
+
bubbles: true
|
|
3829
|
+
}));
|
|
3830
|
+
}
|
|
3831
|
+
|
|
3832
|
+
inputted(event) {
|
|
3833
|
+
this.value = event.target.value;
|
|
3834
|
+
}
|
|
3835
|
+
|
|
3836
|
+
static get styles() {
|
|
3837
|
+
return [super.styles, r$2(_t$4 || (_t$4 = _$4`
|
|
3838
|
+
:host {
|
|
3839
|
+
---shadow-2-rotate: var(--shadow-2-rotate, ${0});
|
|
3840
|
+
---shadow-4-rotate: var(--shadow-4-rotate, ${0});
|
|
3841
|
+
---shadow-8-rotate: var(--shadow-8-rotate, ${0});
|
|
3842
|
+
|
|
3843
|
+
display: flex;
|
|
3844
|
+
|
|
3845
|
+
flex-direction: column;
|
|
3846
|
+
|
|
3847
|
+
align-items: center;
|
|
3848
|
+
justify-content: center;
|
|
3849
|
+
}
|
|
3850
|
+
|
|
3851
|
+
label {
|
|
3852
|
+
margin: 0.25rem 0.25rem 0;
|
|
3853
|
+
}
|
|
3854
|
+
|
|
3855
|
+
.range {
|
|
3856
|
+
display: inline-block;
|
|
3857
|
+
|
|
3858
|
+
width: 3.5rem;
|
|
3859
|
+
height: 4.75rem;
|
|
3860
|
+
margin: 0 0.25rem 0.25rem;
|
|
3861
|
+
}
|
|
3862
|
+
|
|
3863
|
+
decidables-spinner {
|
|
3864
|
+
--decidables-spinner-input-width: 3.5rem;
|
|
3865
|
+
|
|
3866
|
+
margin: 0 0.25rem 0.25rem;
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3869
|
+
/* Adapted from http://danielstern.ca/range.css/#/ */
|
|
3870
|
+
/* Overall */
|
|
3871
|
+
input[type=range] {
|
|
3872
|
+
width: 4.75rem;
|
|
3873
|
+
height: 3.5rem;
|
|
3874
|
+
padding: 0;
|
|
3875
|
+
margin: 0;
|
|
3876
|
+
|
|
3877
|
+
background-color: unset;
|
|
3878
|
+
|
|
3879
|
+
transform: rotate(-90deg);
|
|
3880
|
+
transform-origin: 2.375rem 2.375rem;
|
|
3881
|
+
|
|
3882
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
3883
|
+
-webkit-appearance: none;
|
|
3884
|
+
}
|
|
3885
|
+
|
|
3886
|
+
input[type=range]:enabled {
|
|
3887
|
+
cursor: ns-resize;
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
input[type=range]:focus {
|
|
3891
|
+
outline: none;
|
|
3892
|
+
}
|
|
3893
|
+
|
|
3894
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3895
|
+
input[type=range]::-ms-tooltip {
|
|
3896
|
+
display: none;
|
|
3897
|
+
}
|
|
3898
|
+
|
|
3899
|
+
/* Track */
|
|
3900
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3901
|
+
input[type=range]::-webkit-slider-runnable-track {
|
|
3902
|
+
width: 100%;
|
|
3903
|
+
height: 4px;
|
|
3904
|
+
|
|
3905
|
+
background: var(---color-element-disabled);
|
|
3906
|
+
border: 0;
|
|
3907
|
+
border-radius: 2px;
|
|
3908
|
+
box-shadow: none;
|
|
3909
|
+
}
|
|
3910
|
+
|
|
3911
|
+
input[type=range]:focus::-webkit-slider-runnable-track {
|
|
3912
|
+
background: var(---color-element-disabled);
|
|
3913
|
+
}
|
|
3914
|
+
|
|
3915
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3916
|
+
input[type=range]::-moz-range-track {
|
|
3917
|
+
width: 100%;
|
|
3918
|
+
height: 4px;
|
|
3919
|
+
|
|
3920
|
+
background: var(---color-element-disabled);
|
|
3921
|
+
border: 0;
|
|
3922
|
+
border-radius: 2px;
|
|
3923
|
+
box-shadow: none;
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3926
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3927
|
+
input[type=range]::-ms-track {
|
|
3928
|
+
width: 100%;
|
|
3929
|
+
height: 4px;
|
|
3930
|
+
|
|
3931
|
+
color: transparent;
|
|
3932
|
+
|
|
3933
|
+
background: transparent;
|
|
3934
|
+
border-color: transparent;
|
|
3935
|
+
}
|
|
3936
|
+
|
|
3937
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3938
|
+
input[type=range]::-ms-fill-lower {
|
|
3939
|
+
background: #cccccc;
|
|
3940
|
+
/* background: var(---color-element-disabled); */
|
|
3941
|
+
border: 0;
|
|
3942
|
+
border-radius: 2px;
|
|
3943
|
+
box-shadow: none;
|
|
3944
|
+
}
|
|
3945
|
+
|
|
3946
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3947
|
+
input[type=range]::-ms-fill-upper {
|
|
3948
|
+
background: #cccccc;
|
|
3949
|
+
/* background: var(---color-element-disabled); */
|
|
3950
|
+
border: 0;
|
|
3951
|
+
border-radius: 2px;
|
|
3952
|
+
box-shadow: none;
|
|
3953
|
+
}
|
|
3954
|
+
|
|
3955
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3956
|
+
input[type=range]:focus::-ms-fill-lower {
|
|
3957
|
+
background: var(---color-element-disabled);
|
|
3958
|
+
}
|
|
3959
|
+
|
|
3960
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3961
|
+
input[type=range]:focus::-ms-fill-upper {
|
|
3962
|
+
background: var(---color-element-disabled);
|
|
3963
|
+
}
|
|
3964
|
+
|
|
3965
|
+
/* Thumb */
|
|
3966
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3967
|
+
input[type=range]::-webkit-slider-thumb {
|
|
3968
|
+
width: 10px;
|
|
3969
|
+
height: 20px;
|
|
3970
|
+
margin-top: -8px;
|
|
3971
|
+
|
|
3972
|
+
border: 0;
|
|
3973
|
+
border-radius: 4px;
|
|
3974
|
+
|
|
3975
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
3976
|
+
-webkit-appearance: none;
|
|
3977
|
+
}
|
|
3978
|
+
|
|
3979
|
+
input[type=range]:disabled::-webkit-slider-thumb {
|
|
3980
|
+
background: var(---color-element-disabled);
|
|
3981
|
+
box-shadow: none;
|
|
3982
|
+
}
|
|
3983
|
+
|
|
3984
|
+
input[type=range]:enabled::-webkit-slider-thumb {
|
|
3985
|
+
background: var(---color-element-enabled);
|
|
3986
|
+
box-shadow: var(---shadow-2-rotate);
|
|
3987
|
+
}
|
|
3988
|
+
|
|
3989
|
+
input[type=range]:enabled:hover::-webkit-slider-thumb {
|
|
3990
|
+
box-shadow: var(---shadow-4-rotate);
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3993
|
+
input[type=range]:enabled:active::-webkit-slider-thumb {
|
|
3994
|
+
box-shadow: var(---shadow-8-rotate);
|
|
3995
|
+
}
|
|
3996
|
+
|
|
3997
|
+
:host(.keyboard) input[type=range]:enabled:focus::-webkit-slider-thumb {
|
|
3998
|
+
box-shadow: var(---shadow-4-rotate);
|
|
3999
|
+
}
|
|
4000
|
+
|
|
4001
|
+
:host(.keyboard) input[type=range]:focus:active::-webkit-slider-thumb {
|
|
4002
|
+
box-shadow: var(---shadow-8-rotate);
|
|
4003
|
+
}
|
|
4004
|
+
|
|
4005
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4006
|
+
input[type=range]::-moz-range-thumb {
|
|
4007
|
+
width: 10px;
|
|
4008
|
+
height: 20px;
|
|
4009
|
+
|
|
4010
|
+
border: 0;
|
|
4011
|
+
border-radius: 4px;
|
|
4012
|
+
}
|
|
4013
|
+
|
|
4014
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4015
|
+
input[type=range]:disabled::-moz-range-thumb {
|
|
4016
|
+
background: var(---color-element-disabled);
|
|
4017
|
+
box-shadow: none;
|
|
4018
|
+
}
|
|
4019
|
+
|
|
4020
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4021
|
+
input[type=range]:enabled::-moz-range-thumb {
|
|
4022
|
+
background: var(---color-element-enabled);
|
|
4023
|
+
box-shadow: var(---shadow-2-rotate);
|
|
4024
|
+
}
|
|
4025
|
+
|
|
4026
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4027
|
+
input[type=range]:enabled:hover::-moz-range-thumb {
|
|
4028
|
+
box-shadow: var(---shadow-4-rotate);
|
|
4029
|
+
}
|
|
4030
|
+
|
|
4031
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4032
|
+
input[type=range]:enabled:active::-moz-range-thumb {
|
|
4033
|
+
box-shadow: var(---shadow-8-rotate);
|
|
4034
|
+
}
|
|
4035
|
+
|
|
4036
|
+
:host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {
|
|
4037
|
+
box-shadow: var(---shadow-4-rotate);
|
|
4038
|
+
}
|
|
4039
|
+
|
|
4040
|
+
:host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {
|
|
4041
|
+
box-shadow: var(---shadow-8-rotate);
|
|
4042
|
+
}
|
|
4043
|
+
|
|
4044
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4045
|
+
input[type=range]::-ms-thumb {
|
|
4046
|
+
width: 10px;
|
|
4047
|
+
height: 20px;
|
|
4048
|
+
margin-top: 0;
|
|
4049
|
+
|
|
4050
|
+
background: #999999;
|
|
4051
|
+
/* background: var(---color-element-enabled); */
|
|
4052
|
+
border: 0;
|
|
4053
|
+
border-radius: 4px;
|
|
4054
|
+
box-shadow: var(---shadow-2-rotate);
|
|
4055
|
+
}
|
|
4056
|
+
|
|
4057
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4058
|
+
input[type=range]:disabled::-ms-thumb {
|
|
4059
|
+
background: var(---color-element-disabled);
|
|
4060
|
+
box-shadow: none;
|
|
4061
|
+
}
|
|
4062
|
+
|
|
4063
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4064
|
+
input[type=range]:enabled::-ms-thumb {
|
|
4065
|
+
background: var(---color-element-enabled);
|
|
4066
|
+
box-shadow: var(---shadow-2-rotate);
|
|
4067
|
+
}
|
|
4068
|
+
|
|
4069
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4070
|
+
input[type=range]:enabled:hover::-ms-thumb {
|
|
4071
|
+
box-shadow: var(---shadow-4-rotate);
|
|
4072
|
+
}
|
|
4073
|
+
|
|
4074
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4075
|
+
input[type=range]:enabled:active::-ms-thumb {
|
|
4076
|
+
box-shadow: var(---shadow-8-rotate);
|
|
4077
|
+
}
|
|
4078
|
+
|
|
4079
|
+
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
4080
|
+
:host(.keyboard) input[type=range]:enabled:focus::-ms-thumb {
|
|
4081
|
+
box-shadow: var(---shadow-4-rotate);
|
|
4082
|
+
}
|
|
4083
|
+
|
|
4084
|
+
:host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
|
|
4085
|
+
box-shadow: var(---shadow-8-rotate);
|
|
4086
|
+
}
|
|
4087
|
+
`), o$3(this.cssBoxShadow(2, true, false)), o$3(this.cssBoxShadow(4, true, false)), o$3(this.cssBoxShadow(8, true, false)))];
|
|
4088
|
+
}
|
|
4089
|
+
|
|
4090
|
+
render() {
|
|
4091
|
+
return $(_t2$4 || (_t2$4 = _$4`
|
|
4092
|
+
<label for="slider">
|
|
4093
|
+
<slot></slot>
|
|
4094
|
+
</label>
|
|
4095
|
+
<div class="range">
|
|
4096
|
+
<input type="range" id="slider" min=${0} max=${0} step=${0} .value=${0} @change=${0} @input=${0}>
|
|
4097
|
+
</div>
|
|
4098
|
+
<decidables-spinner min=${0} max=${0} step=${0} .value=${0} @input=${0}></decidables-spinner>
|
|
4099
|
+
`), l(this.min), l(this.max), l(this.step), this.value, this.changed.bind(this), this.inputted.bind(this), l(this.min), l(this.max), l(this.step), this.value, this.inputted.bind(this));
|
|
4100
|
+
}
|
|
4101
|
+
|
|
4102
|
+
}
|
|
4103
|
+
customElements.define('decidables-slider', DecidablesSlider);
|
|
4104
|
+
|
|
4105
|
+
let _$3 = t => t,
|
|
4106
|
+
_t$3,
|
|
4107
|
+
_t2$3;
|
|
4108
|
+
class DecidablesSpinner extends DecidablesElement {
|
|
4109
|
+
static get properties() {
|
|
4110
|
+
return {
|
|
4111
|
+
disabled: {
|
|
4112
|
+
attribute: 'disabled',
|
|
4113
|
+
type: Boolean,
|
|
4114
|
+
reflect: true
|
|
4115
|
+
},
|
|
4116
|
+
max: {
|
|
4117
|
+
attribute: 'max',
|
|
4118
|
+
type: Number,
|
|
4119
|
+
reflect: true
|
|
4120
|
+
},
|
|
4121
|
+
min: {
|
|
4122
|
+
attribute: 'min',
|
|
4123
|
+
type: Number,
|
|
4124
|
+
reflect: true
|
|
4125
|
+
},
|
|
4126
|
+
step: {
|
|
4127
|
+
attribute: 'step',
|
|
4128
|
+
type: Number,
|
|
4129
|
+
reflect: true
|
|
4130
|
+
},
|
|
4131
|
+
value: {
|
|
4132
|
+
attribute: 'value',
|
|
4133
|
+
type: Number,
|
|
4134
|
+
reflect: true
|
|
4135
|
+
}
|
|
4136
|
+
};
|
|
4137
|
+
}
|
|
4138
|
+
|
|
4139
|
+
constructor() {
|
|
4140
|
+
super(); // Attributes
|
|
4141
|
+
|
|
4142
|
+
this.disabled = false;
|
|
4143
|
+
this.max = undefined;
|
|
4144
|
+
this.min = undefined;
|
|
4145
|
+
this.step = undefined;
|
|
4146
|
+
this.value = undefined;
|
|
4147
|
+
}
|
|
4148
|
+
|
|
4149
|
+
inputted(event) {
|
|
4150
|
+
this.value = event.target.value;
|
|
4151
|
+
}
|
|
4096
4152
|
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
return new Promise(function (resolve, reject) {
|
|
4104
|
-
var cancel = {
|
|
4105
|
-
value: reject
|
|
4106
|
-
},
|
|
4107
|
-
end = {
|
|
4108
|
-
value: function value() {
|
|
4109
|
-
if (--size === 0) resolve();
|
|
4110
|
-
}
|
|
4111
|
-
};
|
|
4112
|
-
that.each(function () {
|
|
4113
|
-
var schedule = set(this, id),
|
|
4114
|
-
on = schedule.on; // If this node shared a dispatch with the previous node,
|
|
4115
|
-
// just assign the updated shared dispatch and we’re done!
|
|
4116
|
-
// Otherwise, copy-on-write.
|
|
4153
|
+
static get styles() {
|
|
4154
|
+
return [super.styles, r$2(_t$3 || (_t$3 = _$3`
|
|
4155
|
+
:host {
|
|
4156
|
+
---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
|
|
4157
|
+
---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
|
|
4158
|
+
---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
|
|
4117
4159
|
|
|
4118
|
-
|
|
4119
|
-
|
|
4160
|
+
display: block;
|
|
4161
|
+
}
|
|
4120
4162
|
|
|
4121
|
-
|
|
4163
|
+
label {
|
|
4164
|
+
position: relative;
|
|
4165
|
+
display: flex;
|
|
4122
4166
|
|
|
4123
|
-
|
|
4167
|
+
flex-direction: column;
|
|
4124
4168
|
|
|
4125
|
-
|
|
4126
|
-
}
|
|
4169
|
+
align-items: center;
|
|
4127
4170
|
|
|
4128
|
-
|
|
4129
|
-
}); // The selection was empty, resolve end immediately
|
|
4171
|
+
margin: 0;
|
|
4130
4172
|
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
}
|
|
4173
|
+
font-size: 0.75rem;
|
|
4174
|
+
}
|
|
4134
4175
|
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
this._name = name;
|
|
4140
|
-
this._id = id;
|
|
4141
|
-
}
|
|
4142
|
-
function newId() {
|
|
4143
|
-
return ++id;
|
|
4144
|
-
}
|
|
4145
|
-
var selection_prototype = selection.prototype;
|
|
4146
|
-
Transition.prototype = _defineProperty({
|
|
4147
|
-
constructor: Transition,
|
|
4148
|
-
select: transition_select,
|
|
4149
|
-
selectAll: transition_selectAll,
|
|
4150
|
-
selectChild: selection_prototype.selectChild,
|
|
4151
|
-
selectChildren: selection_prototype.selectChildren,
|
|
4152
|
-
filter: transition_filter,
|
|
4153
|
-
merge: transition_merge,
|
|
4154
|
-
selection: transition_selection,
|
|
4155
|
-
transition: transition_transition,
|
|
4156
|
-
call: selection_prototype.call,
|
|
4157
|
-
nodes: selection_prototype.nodes,
|
|
4158
|
-
node: selection_prototype.node,
|
|
4159
|
-
size: selection_prototype.size,
|
|
4160
|
-
empty: selection_prototype.empty,
|
|
4161
|
-
each: selection_prototype.each,
|
|
4162
|
-
on: transition_on,
|
|
4163
|
-
attr: transition_attr,
|
|
4164
|
-
attrTween: transition_attrTween,
|
|
4165
|
-
style: transition_style,
|
|
4166
|
-
styleTween: transition_styleTween,
|
|
4167
|
-
text: transition_text,
|
|
4168
|
-
textTween: transition_textTween,
|
|
4169
|
-
remove: transition_remove,
|
|
4170
|
-
tween: transition_tween,
|
|
4171
|
-
delay: transition_delay,
|
|
4172
|
-
duration: transition_duration,
|
|
4173
|
-
ease: transition_ease,
|
|
4174
|
-
easeVarying: transition_easeVarying,
|
|
4175
|
-
end: transition_end
|
|
4176
|
-
}, Symbol.iterator, selection_prototype[Symbol.iterator]);
|
|
4176
|
+
label::before {
|
|
4177
|
+
position: absolute;
|
|
4178
|
+
bottom: 1px;
|
|
4179
|
+
left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);
|
|
4177
4180
|
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
}
|
|
4181
|
+
font-size: var(---decidables-spinner-font-size);
|
|
4182
|
+
line-height: normal;
|
|
4181
4183
|
|
|
4182
|
-
var
|
|
4183
|
-
|
|
4184
|
-
// Set on use.
|
|
4185
|
-
delay: 0,
|
|
4186
|
-
duration: 250,
|
|
4187
|
-
ease: cubicInOut
|
|
4188
|
-
};
|
|
4184
|
+
content: var(---decidables-spinner-prefix);
|
|
4185
|
+
}
|
|
4189
4186
|
|
|
4190
|
-
|
|
4191
|
-
|
|
4187
|
+
input[type=number] {
|
|
4188
|
+
width: var(---decidables-spinner-input-width);
|
|
4192
4189
|
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4190
|
+
font-family: var(---font-family-base);
|
|
4191
|
+
font-size: var(---decidables-spinner-font-size);
|
|
4192
|
+
color: inherit;
|
|
4193
|
+
text-align: right;
|
|
4194
|
+
|
|
4195
|
+
background: none;
|
|
4196
|
+
border: 0;
|
|
4197
|
+
border-radius: 0;
|
|
4198
|
+
outline: none;
|
|
4199
|
+
box-shadow: var(---shadow-2);
|
|
4200
|
+
|
|
4201
|
+
-webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
|
|
4202
|
+
}
|
|
4203
|
+
|
|
4204
|
+
input[type=number]:hover {
|
|
4205
|
+
box-shadow: var(---shadow-4);
|
|
4206
|
+
}
|
|
4207
|
+
|
|
4208
|
+
input[type=number]:focus,
|
|
4209
|
+
input[type=number]:active {
|
|
4210
|
+
box-shadow: var(---shadow-8);
|
|
4211
|
+
}
|
|
4212
|
+
|
|
4213
|
+
input[type=number]:disabled {
|
|
4214
|
+
color: var(---color-text);
|
|
4215
|
+
|
|
4216
|
+
border: 0;
|
|
4217
|
+
box-shadow: none;
|
|
4218
|
+
|
|
4219
|
+
/* HACK: Use correct text color in Safari */
|
|
4220
|
+
-webkit-opacity: 1;
|
|
4221
|
+
/* HACK: Hide spinners in disabled input for Firefox and Safari */
|
|
4222
|
+
-moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */
|
|
4223
|
+
/* HACK: Use correct text color in Safari */
|
|
4224
|
+
-webkit-text-fill-color: var(---color-text);
|
|
4225
|
+
}
|
|
4226
|
+
|
|
4227
|
+
/* HACK: Hide spinners in disabled input for Firefox and Safari */
|
|
4228
|
+
input[type=number]:disabled::-webkit-outer-spin-button,
|
|
4229
|
+
input[type=number]:disabled::-webkit-inner-spin-button {
|
|
4230
|
+
margin: 0;
|
|
4231
|
+
-webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
|
|
4232
|
+
}
|
|
4233
|
+
`))];
|
|
4234
|
+
}
|
|
4235
|
+
|
|
4236
|
+
render() {
|
|
4237
|
+
return $(_t2$3 || (_t2$3 = _$3`
|
|
4238
|
+
<label>
|
|
4239
|
+
<slot></slot>
|
|
4240
|
+
<input ?disabled=${0} type="number" min=${0} max=${0} step=${0} .value=${0} @input=${0}>
|
|
4241
|
+
</label>
|
|
4242
|
+
`), this.disabled, l(this.min), l(this.max), l(this.step), this.value, this.inputted.bind(this));
|
|
4197
4243
|
}
|
|
4198
4244
|
|
|
4199
|
-
return timing;
|
|
4200
4245
|
}
|
|
4246
|
+
customElements.define('decidables-spinner', DecidablesSpinner);
|
|
4201
4247
|
|
|
4202
|
-
|
|
4203
|
-
|
|
4248
|
+
let _$2 = t => t,
|
|
4249
|
+
_t$2,
|
|
4250
|
+
_t2$2;
|
|
4251
|
+
class DecidablesSwitch extends DecidablesElement {
|
|
4252
|
+
static get properties() {
|
|
4253
|
+
return {
|
|
4254
|
+
checked: {
|
|
4255
|
+
attribute: 'checked',
|
|
4256
|
+
type: Boolean,
|
|
4257
|
+
reflect: true
|
|
4258
|
+
},
|
|
4259
|
+
disabled: {
|
|
4260
|
+
attribute: 'disabled',
|
|
4261
|
+
type: Boolean,
|
|
4262
|
+
reflect: true
|
|
4263
|
+
}
|
|
4264
|
+
};
|
|
4265
|
+
}
|
|
4204
4266
|
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4267
|
+
constructor() {
|
|
4268
|
+
super(); // Attributes
|
|
4269
|
+
|
|
4270
|
+
this.checked = false;
|
|
4271
|
+
this.disabled = false;
|
|
4209
4272
|
}
|
|
4210
4273
|
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4274
|
+
changed(event) {
|
|
4275
|
+
this.checked = event.target.checked;
|
|
4276
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
4277
|
+
detail: {
|
|
4278
|
+
checked: this.checked
|
|
4279
|
+
},
|
|
4280
|
+
bubbles: true
|
|
4281
|
+
}));
|
|
4217
4282
|
}
|
|
4218
4283
|
|
|
4219
|
-
|
|
4220
|
-
|
|
4284
|
+
static get styles() {
|
|
4285
|
+
return [super.styles, r$2(_t$2 || (_t$2 = _$2`
|
|
4286
|
+
:host {
|
|
4287
|
+
display: flex;
|
|
4221
4288
|
|
|
4222
|
-
|
|
4223
|
-
selection.prototype.transition = selection_transition;
|
|
4289
|
+
flex-direction: column;
|
|
4224
4290
|
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
<decidables-element>
|
|
4229
|
-
*/
|
|
4291
|
+
align-items: center;
|
|
4292
|
+
justify-content: center;
|
|
4293
|
+
}
|
|
4230
4294
|
|
|
4231
|
-
|
|
4232
|
-
|
|
4295
|
+
/* Adapted from https://codepen.io/guuslieben/pen/YyPRVP */
|
|
4296
|
+
input[type=checkbox] {
|
|
4297
|
+
/* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */
|
|
4298
|
+
position: absolute;
|
|
4233
4299
|
|
|
4234
|
-
|
|
4300
|
+
width: 1px;
|
|
4301
|
+
height: 1px;
|
|
4302
|
+
padding: 0;
|
|
4303
|
+
margin: -1px;
|
|
4304
|
+
overflow: hidden;
|
|
4305
|
+
clip: rect(0 0 0 0);
|
|
4235
4306
|
|
|
4236
|
-
|
|
4237
|
-
var _this;
|
|
4307
|
+
white-space: nowrap;
|
|
4238
4308
|
|
|
4239
|
-
|
|
4309
|
+
border: 0;
|
|
4310
|
+
clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
|
|
4311
|
+
}
|
|
4240
4312
|
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
return _this;
|
|
4244
|
-
}
|
|
4313
|
+
input[type=checkbox] + label {
|
|
4314
|
+
order: 1;
|
|
4245
4315
|
|
|
4246
|
-
|
|
4247
|
-
key: "getComputedStyleValue",
|
|
4248
|
-
value: function getComputedStyleValue(property) {
|
|
4249
|
-
// HACK: IE11 requires use of polyfill interface to get custom property value in Javascript
|
|
4250
|
-
if (window.ShadyCSS) {
|
|
4251
|
-
return window.ShadyCSS.getComputedStyleValue(this, property);
|
|
4252
|
-
}
|
|
4316
|
+
margin: 0 0.25rem 0.25rem;
|
|
4253
4317
|
|
|
4254
|
-
|
|
4255
|
-
}
|
|
4256
|
-
}, {
|
|
4257
|
-
key: "firstUpdated",
|
|
4258
|
-
value: function firstUpdated(changedProperties) {
|
|
4259
|
-
_get(_getPrototypeOf(DecidablesElement.prototype), "firstUpdated", this).call(this, changedProperties); // Use focus highlighting if keyboard is used at all
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', function (event) {
|
|
4263
|
-
var element = event.currentTarget;
|
|
4264
|
-
select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
|
|
4265
|
-
}).on('keydown.keyboard', function (event) {
|
|
4266
|
-
var element = event.currentTarget;
|
|
4267
|
-
select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
|
|
4268
|
-
});
|
|
4269
|
-
}
|
|
4270
|
-
}], [{
|
|
4271
|
-
key: "uniqueId",
|
|
4272
|
-
get: // HACK: Create a unique ID for each DecidablesElement
|
|
4273
|
-
// This is needed because Edge/IE11 don't have real Shadow DOM, so IDs leak
|
|
4274
|
-
// out of elements and collide if there is more than one of an element on a
|
|
4275
|
-
// page. Known issue for checkbox/switches and the id/for pattern on <input>
|
|
4276
|
-
// and <label>
|
|
4277
|
-
function get() {
|
|
4278
|
-
DecidablesElement.ID += 1;
|
|
4279
|
-
return DecidablesElement.ID;
|
|
4280
|
-
}
|
|
4281
|
-
}, {
|
|
4282
|
-
key: "greys",
|
|
4283
|
-
get: function get() {
|
|
4284
|
-
var grey = '#999999';
|
|
4285
|
-
var greys = {};
|
|
4286
|
-
greys.white = '#ffffff';
|
|
4287
|
-
greys.light75 = interpolateRgb(grey, '#ffffff')(0.75);
|
|
4288
|
-
greys.light50 = interpolateRgb(grey, '#ffffff')(0.5);
|
|
4289
|
-
greys.light25 = interpolateRgb(grey, '#ffffff')(0.25);
|
|
4290
|
-
greys.grey = grey;
|
|
4291
|
-
greys.dark25 = interpolateRgb(grey, '#000000')(0.25);
|
|
4292
|
-
greys.dark50 = interpolateRgb(grey, '#000000')(0.5);
|
|
4293
|
-
greys.dark75 = interpolateRgb(grey, '#000000')(0.75);
|
|
4294
|
-
greys.black = '#000000';
|
|
4295
|
-
return greys;
|
|
4296
|
-
}
|
|
4297
|
-
}, {
|
|
4298
|
-
key: "shadows",
|
|
4299
|
-
get: function get() {
|
|
4300
|
-
// Material Design elevation styles
|
|
4301
|
-
// References:
|
|
4302
|
-
// https://github.com/material-components/material-components-web/tree/master/packages/mdc-elevation
|
|
4303
|
-
// https://codepen.io/hanger/pen/yOGvQp
|
|
4304
|
-
|
|
4305
|
-
/* eslint-disable key-spacing, object-curly-newline */
|
|
4306
|
-
return {
|
|
4307
|
-
elevations: [0, 2, 4, 8, 16],
|
|
4308
|
-
baselineColor: '#000000',
|
|
4309
|
-
baselineColorString: '0, 0, 0',
|
|
4310
|
-
inverseBaselineColor: '#FFFFFF',
|
|
4311
|
-
inverseBaselineColorString: '255, 255, 255',
|
|
4312
|
-
opacityUmbra: 0.2,
|
|
4313
|
-
opacityPenumbra: 0.14,
|
|
4314
|
-
opacityAmbient: 0.12,
|
|
4315
|
-
opacityBoost: 0.2,
|
|
4316
|
-
mapUmbra: {
|
|
4317
|
-
// $mdc-elevation-umbra-map
|
|
4318
|
-
0: {
|
|
4319
|
-
x: 0,
|
|
4320
|
-
y: 0,
|
|
4321
|
-
b: 0,
|
|
4322
|
-
s: 0
|
|
4323
|
-
},
|
|
4324
|
-
// offset-x, offset-y, blur-radius, spread-radius
|
|
4325
|
-
2: {
|
|
4326
|
-
x: 0,
|
|
4327
|
-
y: 3,
|
|
4328
|
-
b: 1,
|
|
4329
|
-
s: -2
|
|
4330
|
-
},
|
|
4331
|
-
4: {
|
|
4332
|
-
x: 0,
|
|
4333
|
-
y: 2,
|
|
4334
|
-
b: 4,
|
|
4335
|
-
s: -1
|
|
4336
|
-
},
|
|
4337
|
-
8: {
|
|
4338
|
-
x: 0,
|
|
4339
|
-
y: 5,
|
|
4340
|
-
b: 5,
|
|
4341
|
-
s: -3
|
|
4342
|
-
},
|
|
4343
|
-
16: {
|
|
4344
|
-
x: 0,
|
|
4345
|
-
y: 8,
|
|
4346
|
-
b: 10,
|
|
4347
|
-
s: -5
|
|
4348
|
-
}
|
|
4349
|
-
},
|
|
4350
|
-
mapPenumbra: {
|
|
4351
|
-
// $mdc-elevation-penumbra-map
|
|
4352
|
-
0: {
|
|
4353
|
-
x: 0,
|
|
4354
|
-
y: 0,
|
|
4355
|
-
b: 0,
|
|
4356
|
-
s: 0
|
|
4357
|
-
},
|
|
4358
|
-
// offset-x, offset-y, blur-radius, spread-radius
|
|
4359
|
-
2: {
|
|
4360
|
-
x: 0,
|
|
4361
|
-
y: 2,
|
|
4362
|
-
b: 2,
|
|
4363
|
-
s: 0
|
|
4364
|
-
},
|
|
4365
|
-
4: {
|
|
4366
|
-
x: 0,
|
|
4367
|
-
y: 4,
|
|
4368
|
-
b: 5,
|
|
4369
|
-
s: 0
|
|
4370
|
-
},
|
|
4371
|
-
8: {
|
|
4372
|
-
x: 0,
|
|
4373
|
-
y: 8,
|
|
4374
|
-
b: 10,
|
|
4375
|
-
s: 1
|
|
4376
|
-
},
|
|
4377
|
-
16: {
|
|
4378
|
-
x: 0,
|
|
4379
|
-
y: 16,
|
|
4380
|
-
b: 24,
|
|
4381
|
-
s: 2
|
|
4382
|
-
}
|
|
4383
|
-
},
|
|
4384
|
-
mapAmbient: {
|
|
4385
|
-
// $mdc-elevation-ambient-map
|
|
4386
|
-
0: {
|
|
4387
|
-
x: 0,
|
|
4388
|
-
y: 0,
|
|
4389
|
-
b: 0,
|
|
4390
|
-
s: 0
|
|
4391
|
-
},
|
|
4392
|
-
// offset-x, offset-y, blur-radius, spread-radius
|
|
4393
|
-
2: {
|
|
4394
|
-
x: 0,
|
|
4395
|
-
y: 1,
|
|
4396
|
-
b: 5,
|
|
4397
|
-
s: 0
|
|
4398
|
-
},
|
|
4399
|
-
4: {
|
|
4400
|
-
x: 0,
|
|
4401
|
-
y: 1,
|
|
4402
|
-
b: 10,
|
|
4403
|
-
s: 0
|
|
4404
|
-
},
|
|
4405
|
-
8: {
|
|
4406
|
-
x: 0,
|
|
4407
|
-
y: 3,
|
|
4408
|
-
b: 14,
|
|
4409
|
-
s: 2
|
|
4410
|
-
},
|
|
4411
|
-
16: {
|
|
4412
|
-
x: 0,
|
|
4413
|
-
y: 6,
|
|
4414
|
-
b: 30,
|
|
4415
|
-
s: 5
|
|
4416
|
-
}
|
|
4318
|
+
font-weight: 400;
|
|
4417
4319
|
}
|
|
4418
|
-
};
|
|
4419
|
-
/* eslint-enable key-spacing, object-curly-newline */
|
|
4420
|
-
}
|
|
4421
|
-
}, {
|
|
4422
|
-
key: "cssBoxShadow",
|
|
4423
|
-
value: function cssBoxShadow(elevation) {
|
|
4424
|
-
var rotate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4425
|
-
var inverse = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
4426
|
-
var umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
|
|
4427
|
-
var penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
|
|
4428
|
-
var ambientO = this.shadows.opacityAmbient + this.shadows.opacityBoost;
|
|
4429
|
-
var umbraC = inverse ? "rgba(".concat(this.shadows.inverseBaselineColorString, ", ").concat(umbraO, ")") : "rgba(".concat(this.shadows.baselineColorString, ", ").concat(umbraO, ")");
|
|
4430
|
-
var penumbraC = inverse ? "rgba(".concat(this.shadows.inverseBaselineColorString, ", ").concat(penumbraO, ")") : "rgba(".concat(this.shadows.baselineColorString, ", ").concat(penumbraO, ")");
|
|
4431
|
-
var ambientC = inverse ? "rgba(".concat(this.shadows.inverseBaselineColorString, ", ").concat(ambientO, ")") : "rgba(".concat(this.shadows.baselineColorString, ", ").concat(ambientO, ")");
|
|
4432
|
-
var umbraM = this.shadows.mapUmbra[elevation];
|
|
4433
|
-
var penumbraM = this.shadows.mapPenumbra[elevation];
|
|
4434
|
-
var ambientM = this.shadows.mapAmbient[elevation];
|
|
4435
|
-
var umbraS = rotate ? "".concat(-umbraM.y, "px ").concat(umbraM.y / 2, "px ").concat(umbraM.b, "px ").concat(umbraM.s, "px") : "".concat(umbraM.y / 2, "px ").concat(umbraM.y, "px ").concat(umbraM.b, "px ").concat(umbraM.s, "px");
|
|
4436
|
-
var penumbraS = rotate ? "".concat(-penumbraM.y, "px ").concat(penumbraM.y / 2, "px ").concat(penumbraM.b, "px ").concat(penumbraM.s, "px") : "".concat(penumbraM.y / 2, "px ").concat(penumbraM.y, "px ").concat(penumbraM.b, "px ").concat(penumbraM.s, "px");
|
|
4437
|
-
var ambientS = rotate ? "".concat(-ambientM.y, "px ").concat(ambientM.y / 2, "px ").concat(ambientM.b, "px ").concat(ambientM.s, "px") : "".concat(ambientM.y / 2, "px ").concat(ambientM.y, "px ").concat(ambientM.b, "px ").concat(ambientM.s, "px");
|
|
4438
|
-
return "".concat(umbraS, " ").concat(umbraC, ", ").concat(penumbraS, " ").concat(penumbraC, ", ").concat(ambientS, " ").concat(ambientC);
|
|
4439
|
-
}
|
|
4440
|
-
}, {
|
|
4441
|
-
key: "svgFilters",
|
|
4442
|
-
get: function get() {
|
|
4443
|
-
var shadows = DecidablesElement.shadows; // eslint-disable-line prefer-destructuring
|
|
4444
|
-
|
|
4445
|
-
var erodeRadius = 1;
|
|
4446
|
-
var filters = shadows.elevations.map(function (z) {
|
|
4447
|
-
return y(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n <filter id=", " x=\"-250%\" y=\"-250%\" width=\"600%\" height=\"600%\">\n <feComponentTransfer in=\"SourceAlpha\" result=\"solid\">\n <feFuncA type=\"table\" tableValues=\"0 1 1\"/>\n </feComponentTransfer>\n <feOffset in=\"solid\" result=\"offU\" dx=", " dy=", " />\n <feOffset in=\"solid\" result=\"offP\" dx=", " dy=", " />\n <feOffset in=\"solid\" result=\"offA\" dx=", " dy=", " />\n ", "\n ", "\n ", "\n <feGaussianBlur in=", " result=\"blurU\" stdDeviation=", " />\n <feGaussianBlur in=", " result=\"blurP\" stdDeviation=", " />\n <feGaussianBlur in=", " result=\"blurA\" stdDeviation=", " />\n <feFlood in=\"SourceGraphic\" result=\"opU\" flood-color=", " flood-opacity=", " />\n <feFlood in=\"SourceGraphic\" result=\"opP\" flood-color=", " flood-opacity=", " />\n <feFlood in=\"SourceGraphic\" result=\"opA\" flood-color=", " flood-opacity=", " />\n <feComposite in=\"opU\" in2=\"blurU\" result=\"shU\" operator=\"in\" />\n <feComposite in=\"opP\" in2=\"blurP\" result=\"shP\" operator=\"in\" />\n <feComposite in=\"opA\" in2=\"blurA\" result=\"shA\" operator=\"in\" />\n <!-- HACK Edge: Using a dynamic value for erode radius stops Edge from corrupting the \"radius\" value! -->\n <feMorphology in=\"solid\" result=\"smaller\" operator=\"erode\" radius=", " />\n <feComposite in=\"shU\" in2=\"smaller\" result=\"finalU\" operator=\"out\" />\n <feComposite in=\"shP\" in2=\"smaller\" result=\"finalP\" operator=\"out\" />\n <feComposite in=\"shA\" in2=\"smaller\" result=\"finalA\" operator=\"out\" />\n <feMerge>\n <feMergeNode in=\"finalU\" />\n <feMergeNode in=\"finalP\" />\n <feMergeNode in=\"finalA\" />\n <feMergeNode in=\"SourceGraphic\" />\n </feMerge>\n </filter>"])), "shadow-".concat(z), shadows.mapUmbra[z].y / 2, shadows.mapUmbra[z].y, shadows.mapPenumbra[z].y / 2, shadows.mapPenumbra[z].y, shadows.mapAmbient[z].y / 2, shadows.mapAmbient[z].y, shadows.mapUmbra[z].s === 0 ? y(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral([""]))) : y(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["<feMorphology in=\"offU\" result=\"spreadU\" operator=", " radius=", " />"])), shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapUmbra[z].s)), shadows.mapPenumbra[z].s === 0 ? y(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([""]))) : y(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["<feMorphology in=\"offP\" result=\"spreadP\" operator=", " radius=", " />"])), shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapPenumbra[z].s)), shadows.mapAmbient[z].s === 0 ? y(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""]))) : y(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["<feMorphology in=\"offA\" result=\"spreadA\" operator=", " radius=", " />"])), shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapAmbient[z].s)), shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU', shadows.mapUmbra[z].b / 2, shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP', shadows.mapPenumbra[z].b / 2, shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA', shadows.mapAmbient[z].b / 2, shadows.baselineColor, shadows.opacityUmbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityPenumbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityAmbient + shadows.opacityBoost, erodeRadius);
|
|
4448
|
-
});
|
|
4449
|
-
return y(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n <svg class=\"defs\">\n <defs>\n ", "\n </defs>\n </svg>\n "])), filters);
|
|
4450
|
-
}
|
|
4451
|
-
}, {
|
|
4452
|
-
key: "styles",
|
|
4453
|
-
get: function get() {
|
|
4454
|
-
return r$2(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n :host {\n ---shadow-0: var(--shadow-0, ", ");\n ---shadow-2: var(--shadow-2, ", ");\n ---shadow-4: var(--shadow-4, ", ");\n ---shadow-8: var(--shadow-8, ", ");\n\n ---color-background: var(--color-background, ", ");\n ---color-border: var(--color-border, ", ");\n ---color-text: var(--color-text, ", ");\n ---color-text-inverse: var(--color-text-inverse, ", ");\n ---color-link: var(--color-link, ", ");\n ---color-element-background: var(--color-element-background, ", ");\n ---color-element-disabled: var(--color-element-disabled, ", ");\n ---color-element-enabled: var(--color-element-enabled, ", ");\n ---color-element-selected: var(--color-element-selected, ", ");\n ---color-element-border: var(--color-element-border, ", ");\n ---color-element-emphasis: var(--color-element-emphasis, ", ");\n\n ---font-family-base: var(--font-family-base, \"Source Sans\", sans-serif);\n ---font-family-math: var(--font-family-math, \"Source Serif\", serif);\n\n ---transition-duration: var(--transition-duration, 500ms);\n\n font-family: var(---font-family-base);\n }\n\n :host,\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: border-box;\n }\n\n .math-greek {\n font-family: var(---font-family-math);\n font-style: normal;\n }\n\n .math-num {\n font-family: var(---font-family-base);\n font-style: normal;\n }\n\n .math-var {\n font-family: var(---font-family-math);\n font-style: italic;\n }\n\n .defs {\n display: block;\n\n width: 0;\n height: 0;\n }\n "])), o$3(this.cssBoxShadow(0)), o$3(this.cssBoxShadow(2)), o$3(this.cssBoxShadow(4)), o$3(this.cssBoxShadow(8)), o$3(this.greys.white), o$3(this.greys.light75), o$3(this.greys.dark75), o$3(this.greys.white), o$3(this.greys.dark25), o$3(this.greys.light75), o$3(this.greys.light50), o$3(this.greys.grey), o$3(this.greys.dark25), o$3(this.greys.dark50), o$3(this.greys.dark75));
|
|
4455
|
-
}
|
|
4456
|
-
}]);
|
|
4457
4320
|
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
DecidablesElement.ID = 0;
|
|
4321
|
+
input[type=checkbox] + label + label {
|
|
4322
|
+
position: relative;
|
|
4461
4323
|
|
|
4462
|
-
|
|
4324
|
+
min-width: 24px;
|
|
4325
|
+
padding: 0 0 36px;
|
|
4326
|
+
margin: 0.25rem 0.25rem 0;
|
|
4463
4327
|
|
|
4464
|
-
|
|
4465
|
-
_inherits(DecidablesButton, _DecidablesElement);
|
|
4328
|
+
font-weight: 400;
|
|
4466
4329
|
|
|
4467
|
-
|
|
4330
|
+
outline: none;
|
|
4331
|
+
}
|
|
4468
4332
|
|
|
4469
|
-
|
|
4470
|
-
|
|
4333
|
+
input[type=checkbox] + label + label::before,
|
|
4334
|
+
input[type=checkbox] + label + label::after {
|
|
4335
|
+
position: absolute;
|
|
4471
4336
|
|
|
4472
|
-
|
|
4337
|
+
left: 50%;
|
|
4473
4338
|
|
|
4474
|
-
|
|
4339
|
+
margin: 0;
|
|
4475
4340
|
|
|
4476
|
-
|
|
4477
|
-
return _this;
|
|
4478
|
-
}
|
|
4341
|
+
content: "";
|
|
4479
4342
|
|
|
4480
|
-
|
|
4481
|
-
key: "render",
|
|
4482
|
-
value: function render() {
|
|
4483
|
-
return $(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n <button ?disabled=", ">\n <slot></slot>\n </button>\n "])), this.disabled);
|
|
4484
|
-
}
|
|
4485
|
-
}], [{
|
|
4486
|
-
key: "properties",
|
|
4487
|
-
get: function get() {
|
|
4488
|
-
return {
|
|
4489
|
-
disabled: {
|
|
4490
|
-
attribute: 'disabled',
|
|
4491
|
-
type: Boolean,
|
|
4492
|
-
reflect: true
|
|
4493
|
-
}
|
|
4494
|
-
};
|
|
4495
|
-
}
|
|
4496
|
-
}, {
|
|
4497
|
-
key: "styles",
|
|
4498
|
-
get: function get() {
|
|
4499
|
-
return [_get(_getPrototypeOf(DecidablesButton), "styles", this), r$2(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n :host {\n margin: 0.25rem;\n }\n\n button {\n width: 100%;\n height: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n\n border: 0;\n border-radius: 0.25rem;\n outline: none;\n }\n\n button:disabled {\n background-color: var(--decidables-button-background-color, var(---color-element-disabled));\n outline: none;\n box-shadow: none;\n }\n\n button:enabled {\n cursor: pointer;\n\n background-color: var(--decidables-button-background-color, var(---color-element-enabled));\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n button:enabled:hover {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n button:enabled:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(.keyboard) button:enabled:focus {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) button:enabled:focus:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))];
|
|
4500
|
-
}
|
|
4501
|
-
}]);
|
|
4343
|
+
outline: 0;
|
|
4502
4344
|
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4345
|
+
transition: all var(---transition-duration) ease;
|
|
4346
|
+
transform: translate(-50%, 0);
|
|
4347
|
+
}
|
|
4506
4348
|
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
* Copyright 2018 Google LLC
|
|
4510
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4511
|
-
*/
|
|
4349
|
+
input[type=checkbox] + label + label::before {
|
|
4350
|
+
bottom: 1px;
|
|
4512
4351
|
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
};
|
|
4352
|
+
width: 8px;
|
|
4353
|
+
height: 34px;
|
|
4516
4354
|
|
|
4517
|
-
var
|
|
4355
|
+
background-color: var(---color-element-disabled);
|
|
4356
|
+
border-radius: 4px;
|
|
4357
|
+
}
|
|
4518
4358
|
|
|
4519
|
-
|
|
4520
|
-
|
|
4359
|
+
input[type=checkbox] + label + label::after {
|
|
4360
|
+
bottom: 0;
|
|
4521
4361
|
|
|
4522
|
-
|
|
4362
|
+
width: 18px;
|
|
4363
|
+
height: 18px;
|
|
4523
4364
|
|
|
4524
|
-
|
|
4525
|
-
|
|
4365
|
+
background-color: var(---color-element-enabled);
|
|
4366
|
+
border-radius: 50%;
|
|
4367
|
+
box-shadow: var(---shadow-2);
|
|
4368
|
+
}
|
|
4526
4369
|
|
|
4527
|
-
|
|
4370
|
+
input[type=checkbox]:checked + label + label::after {
|
|
4371
|
+
transform: translate(-50%, -100%);
|
|
4372
|
+
}
|
|
4528
4373
|
|
|
4529
|
-
|
|
4374
|
+
input[type=checkbox]:disabled + label + label::after {
|
|
4375
|
+
background-color: var(---color-element-disabled);
|
|
4376
|
+
box-shadow: none;
|
|
4377
|
+
}
|
|
4530
4378
|
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
_this.value = undefined;
|
|
4536
|
-
return _this;
|
|
4537
|
-
}
|
|
4379
|
+
input[type=checkbox]:enabled + label,
|
|
4380
|
+
input[type=checkbox]:enabled + label + label {
|
|
4381
|
+
cursor: pointer;
|
|
4382
|
+
}
|
|
4538
4383
|
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
this.value = event.target.value;
|
|
4543
|
-
this.dispatchEvent(new CustomEvent('change', {
|
|
4544
|
-
detail: {
|
|
4545
|
-
value: this.value
|
|
4546
|
-
},
|
|
4547
|
-
bubbles: true
|
|
4548
|
-
}));
|
|
4549
|
-
}
|
|
4550
|
-
}, {
|
|
4551
|
-
key: "inputted",
|
|
4552
|
-
value: function inputted(event) {
|
|
4553
|
-
this.value = event.target.value;
|
|
4554
|
-
}
|
|
4555
|
-
}, {
|
|
4556
|
-
key: "render",
|
|
4557
|
-
value: function render() {
|
|
4558
|
-
return $(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n <label for=", ">\n <slot></slot>\n </label>\n <div class=\"range\">\n <input type=\"range\" id=", " min=", " max=", " step=", " .value=", " @change=", " @input=", ">\n </div>\n <decidables-spinner min=", " max=", " step=", " .value=", " @input=", "></decidables-spinner>\n "])), "".concat(this.uniqueId, "-slider"), "".concat(this.uniqueId, "-slider"), l(this.min), l(this.max), l(this.step), this.value, this.changed.bind(this), this.inputted.bind(this), l(this.min), l(this.max), l(this.step), this.value, this.inputted.bind(this));
|
|
4559
|
-
}
|
|
4560
|
-
}], [{
|
|
4561
|
-
key: "properties",
|
|
4562
|
-
get: function get() {
|
|
4563
|
-
return {
|
|
4564
|
-
disabled: {
|
|
4565
|
-
attribute: 'disabled',
|
|
4566
|
-
type: Boolean,
|
|
4567
|
-
reflect: true
|
|
4568
|
-
},
|
|
4569
|
-
max: {
|
|
4570
|
-
attribute: 'max',
|
|
4571
|
-
type: Number,
|
|
4572
|
-
reflect: true
|
|
4573
|
-
},
|
|
4574
|
-
min: {
|
|
4575
|
-
attribute: 'min',
|
|
4576
|
-
type: Number,
|
|
4577
|
-
reflect: true
|
|
4578
|
-
},
|
|
4579
|
-
step: {
|
|
4580
|
-
attribute: 'step',
|
|
4581
|
-
type: Number,
|
|
4582
|
-
reflect: true
|
|
4583
|
-
},
|
|
4584
|
-
value: {
|
|
4585
|
-
attribute: 'value',
|
|
4586
|
-
type: Number,
|
|
4587
|
-
reflect: true
|
|
4384
|
+
input[type=checkbox]:enabled + label:hover + label::after,
|
|
4385
|
+
input[type=checkbox]:enabled + label + label:hover::after {
|
|
4386
|
+
box-shadow: var(---shadow-4);
|
|
4588
4387
|
}
|
|
4589
|
-
};
|
|
4590
|
-
}
|
|
4591
|
-
}, {
|
|
4592
|
-
key: "styles",
|
|
4593
|
-
get: function get() {
|
|
4594
|
-
return [_get(_getPrototypeOf(DecidablesSlider), "styles", this), r$2(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral(["\n :host {\n ---shadow-2-rotate: var(--shadow-2-rotate, ", ");\n ---shadow-4-rotate: var(--shadow-4-rotate, ", ");\n ---shadow-8-rotate: var(--shadow-8-rotate, ", ");\n\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n justify-content: center;\n }\n\n label {\n margin: 0.25rem 0.25rem 0;\n }\n\n .range {\n display: inline-block;\n\n width: 3.5rem;\n height: 4.75rem;\n margin: 0 0.25rem 0.25rem;\n }\n\n decidables-spinner {\n --decidables-spinner-input-width: 3.5rem;\n\n margin: 0 0.25rem 0.25rem;\n }\n\n /* Adapted from http://danielstern.ca/range.css/#/ */\n /* Overall */\n input[type=range] {\n width: 4.75rem;\n height: 3.5rem;\n padding: 0;\n margin: 0;\n\n background-color: unset;\n\n transform: rotate(-90deg);\n transform-origin: 2.375rem 2.375rem;\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-appearance: none;\n }\n\n input[type=range]:enabled {\n cursor: ns-resize;\n }\n\n input[type=range]:focus {\n outline: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-tooltip {\n display: none;\n }\n\n /* Track */\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-webkit-slider-runnable-track {\n width: 100%;\n height: 4px;\n\n background: var(---color-element-disabled);\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n input[type=range]:focus::-webkit-slider-runnable-track {\n background: var(---color-element-disabled);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-moz-range-track {\n width: 100%;\n height: 4px;\n\n background: var(---color-element-disabled);\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-track {\n width: 100%;\n height: 4px;\n\n color: transparent;\n\n background: transparent;\n border-color: transparent;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-fill-lower {\n background: #cccccc;\n /* background: var(---color-element-disabled); */\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-fill-upper {\n background: #cccccc;\n /* background: var(---color-element-disabled); */\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:focus::-ms-fill-lower {\n background: var(---color-element-disabled);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:focus::-ms-fill-upper {\n background: var(---color-element-disabled);\n }\n\n /* Thumb */\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-webkit-slider-thumb {\n width: 10px;\n height: 20px;\n margin-top: -8px;\n\n border: 0;\n border-radius: 4px;\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-appearance: none;\n }\n\n input[type=range]:disabled::-webkit-slider-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n input[type=range]:enabled::-webkit-slider-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n input[type=range]:enabled:hover::-webkit-slider-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n input[type=range]:enabled:active::-webkit-slider-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus::-webkit-slider-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:focus:active::-webkit-slider-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-moz-range-thumb {\n width: 10px;\n height: 20px;\n\n border: 0;\n border-radius: 4px;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:disabled::-moz-range-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled::-moz-range-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:hover::-moz-range-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:active::-moz-range-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-thumb {\n width: 10px;\n height: 20px;\n margin-top: 0;\n\n background: #999999;\n /* background: var(---color-element-enabled); */\n border: 0;\n border-radius: 4px;\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:disabled::-ms-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled::-ms-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:hover::-ms-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:active::-ms-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n :host(.keyboard) input[type=range]:enabled:focus::-ms-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n "])), o$3(this.cssBoxShadow(2, true, false)), o$3(this.cssBoxShadow(4, true, false)), o$3(this.cssBoxShadow(8, true, false)))];
|
|
4595
|
-
}
|
|
4596
|
-
}]);
|
|
4597
4388
|
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4389
|
+
input[type=checkbox]:enabled + label:active + label::after,
|
|
4390
|
+
input[type=checkbox]:enabled + label + label:active::after {
|
|
4391
|
+
box-shadow: var(---shadow-8);
|
|
4392
|
+
}
|
|
4601
4393
|
|
|
4602
|
-
|
|
4394
|
+
/* stylelint-disable-next-line selector-max-compound-selectors */
|
|
4395
|
+
:host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {
|
|
4396
|
+
box-shadow: var(---shadow-4);
|
|
4397
|
+
}
|
|
4603
4398
|
|
|
4604
|
-
|
|
4605
|
-
|
|
4399
|
+
/* stylelint-disable-next-line selector-max-compound-selectors */
|
|
4400
|
+
:host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,
|
|
4401
|
+
:host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
|
|
4402
|
+
box-shadow: var(---shadow-8);
|
|
4403
|
+
}
|
|
4404
|
+
`))];
|
|
4405
|
+
}
|
|
4606
4406
|
|
|
4607
|
-
|
|
4407
|
+
render() {
|
|
4408
|
+
return $(_t2$2 || (_t2$2 = _$2`
|
|
4409
|
+
<input type="checkbox" id="switch" ?checked=${0} ?disabled=${0} @change=${0}>
|
|
4410
|
+
<label for="switch">
|
|
4411
|
+
<slot name="off-label"></slot>
|
|
4412
|
+
</label>
|
|
4413
|
+
<label for="switch">
|
|
4414
|
+
<slot></slot>
|
|
4415
|
+
</label>
|
|
4416
|
+
`), this.checked, this.disabled, this.changed.bind(this));
|
|
4417
|
+
}
|
|
4608
4418
|
|
|
4609
|
-
|
|
4610
|
-
|
|
4419
|
+
}
|
|
4420
|
+
customElements.define('decidables-switch', DecidablesSwitch);
|
|
4611
4421
|
|
|
4612
|
-
|
|
4422
|
+
let _$1 = t => t,
|
|
4423
|
+
_t$1,
|
|
4424
|
+
_t2$1;
|
|
4425
|
+
class DecidablesToggle extends DecidablesElement {
|
|
4426
|
+
static get properties() {
|
|
4427
|
+
return {
|
|
4428
|
+
disabled: {
|
|
4429
|
+
attribute: 'disabled',
|
|
4430
|
+
type: Boolean,
|
|
4431
|
+
reflect: true
|
|
4432
|
+
}
|
|
4433
|
+
};
|
|
4434
|
+
}
|
|
4613
4435
|
|
|
4614
|
-
|
|
4436
|
+
constructor() {
|
|
4437
|
+
super(); // Attributes
|
|
4615
4438
|
|
|
4616
|
-
|
|
4617
|
-
_this.max = undefined;
|
|
4618
|
-
_this.min = undefined;
|
|
4619
|
-
_this.step = undefined;
|
|
4620
|
-
_this.value = undefined;
|
|
4621
|
-
return _this;
|
|
4439
|
+
this.disabled = false;
|
|
4622
4440
|
}
|
|
4623
4441
|
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
}
|
|
4629
|
-
}, {
|
|
4630
|
-
key: "render",
|
|
4631
|
-
value: function render() {
|
|
4632
|
-
return $(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n <label>\n <slot></slot>\n <input ?disabled=", " type=\"number\" min=", " max=", " step=", " .value=", " @input=", ">\n </label>\n "])), this.disabled, l(this.min), l(this.max), l(this.step), this.value, this.inputted.bind(this));
|
|
4633
|
-
}
|
|
4634
|
-
}], [{
|
|
4635
|
-
key: "properties",
|
|
4636
|
-
get: function get() {
|
|
4637
|
-
return {
|
|
4638
|
-
disabled: {
|
|
4639
|
-
attribute: 'disabled',
|
|
4640
|
-
type: Boolean,
|
|
4641
|
-
reflect: true
|
|
4642
|
-
},
|
|
4643
|
-
max: {
|
|
4644
|
-
attribute: 'max',
|
|
4645
|
-
type: Number,
|
|
4646
|
-
reflect: true
|
|
4647
|
-
},
|
|
4648
|
-
min: {
|
|
4649
|
-
attribute: 'min',
|
|
4650
|
-
type: Number,
|
|
4651
|
-
reflect: true
|
|
4652
|
-
},
|
|
4653
|
-
step: {
|
|
4654
|
-
attribute: 'step',
|
|
4655
|
-
type: Number,
|
|
4656
|
-
reflect: true
|
|
4657
|
-
},
|
|
4658
|
-
value: {
|
|
4659
|
-
attribute: 'value',
|
|
4660
|
-
type: Number,
|
|
4661
|
-
reflect: true
|
|
4662
|
-
}
|
|
4663
|
-
};
|
|
4664
|
-
}
|
|
4665
|
-
}, {
|
|
4666
|
-
key: "styles",
|
|
4667
|
-
get: function get() {
|
|
4668
|
-
return [_get(_getPrototypeOf(DecidablesSpinner), "styles", this), r$2(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n :host {\n ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);\n ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);\n ---decidables-spinner-prefix: var(--decidables-spinner-prefix, \"\");\n\n display: block;\n }\n\n label {\n position: relative;\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n\n margin: 0;\n\n font-size: 0.75rem;\n }\n\n label::before {\n position: absolute;\n bottom: 1px;\n left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);\n\n font-size: var(---decidables-spinner-font-size);\n line-height: normal;\n\n content: var(---decidables-spinner-prefix);\n }\n\n input[type=number] {\n width: var(---decidables-spinner-input-width);\n\n font-family: var(---font-family-base);\n font-size: var(---decidables-spinner-font-size);\n color: inherit;\n text-align: right;\n\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n box-shadow: var(---shadow-2);\n\n -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */\n }\n\n input[type=number]:hover {\n box-shadow: var(---shadow-4);\n }\n\n input[type=number]:focus,\n input[type=number]:active {\n box-shadow: var(---shadow-8);\n }\n\n input[type=number]:disabled {\n color: var(---color-text);\n\n border: 0;\n box-shadow: none;\n\n /* HACK: Use correct text color in Safari */\n -webkit-opacity: 1;\n /* HACK: Hide spinners in disabled input for Firefox and Safari */\n -moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */\n /* HACK: Use correct text color in Safari */\n -webkit-text-fill-color: var(---color-text);\n }\n\n /* HACK: Hide spinners in disabled input for Firefox and Safari */\n input[type=number]:disabled::-webkit-outer-spin-button,\n input[type=number]:disabled::-webkit-inner-spin-button {\n margin: 0;\n -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */\n }\n "])))];
|
|
4669
|
-
}
|
|
4670
|
-
}]);
|
|
4442
|
+
static get styles() {
|
|
4443
|
+
return [super.styles, r$2(_t$1 || (_t$1 = _$1`
|
|
4444
|
+
fieldset {
|
|
4445
|
+
display: flex;
|
|
4671
4446
|
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4447
|
+
flex-direction: column;
|
|
4448
|
+
|
|
4449
|
+
align-items: stretch;
|
|
4450
|
+
justify-content: center;
|
|
4451
|
+
|
|
4452
|
+
margin: 0.25rem;
|
|
4453
|
+
|
|
4454
|
+
border: 0;
|
|
4455
|
+
}
|
|
4675
4456
|
|
|
4676
|
-
|
|
4457
|
+
legend {
|
|
4458
|
+
text-align: center;
|
|
4459
|
+
}
|
|
4460
|
+
`))];
|
|
4461
|
+
}
|
|
4677
4462
|
|
|
4678
|
-
|
|
4679
|
-
|
|
4463
|
+
render() {
|
|
4464
|
+
return $(_t2$1 || (_t2$1 = _$1`
|
|
4465
|
+
<fieldset ?disabled=${0}>
|
|
4466
|
+
<legend><slot name="label"></slot></legend>
|
|
4467
|
+
<slot></slot>
|
|
4468
|
+
</fieldset>
|
|
4469
|
+
`), this.disabled);
|
|
4470
|
+
}
|
|
4680
4471
|
|
|
4681
|
-
|
|
4472
|
+
}
|
|
4473
|
+
customElements.define('decidables-toggle', DecidablesToggle);
|
|
4682
4474
|
|
|
4683
|
-
|
|
4684
|
-
|
|
4475
|
+
let _ = t => t,
|
|
4476
|
+
_t,
|
|
4477
|
+
_t2;
|
|
4478
|
+
class DecidablesToggleOption extends DecidablesElement {
|
|
4479
|
+
static get properties() {
|
|
4480
|
+
return {
|
|
4481
|
+
checked: {
|
|
4482
|
+
attribute: 'checked',
|
|
4483
|
+
type: Boolean,
|
|
4484
|
+
reflect: true
|
|
4485
|
+
},
|
|
4486
|
+
disabled: {
|
|
4487
|
+
attribute: 'disabled',
|
|
4488
|
+
type: Boolean,
|
|
4489
|
+
reflect: true
|
|
4490
|
+
},
|
|
4491
|
+
name: {
|
|
4492
|
+
attribute: 'name',
|
|
4493
|
+
type: String,
|
|
4494
|
+
reflect: true
|
|
4495
|
+
},
|
|
4496
|
+
value: {
|
|
4497
|
+
attribute: 'value',
|
|
4498
|
+
type: String,
|
|
4499
|
+
reflect: true
|
|
4500
|
+
}
|
|
4501
|
+
};
|
|
4502
|
+
}
|
|
4685
4503
|
|
|
4686
|
-
|
|
4504
|
+
constructor() {
|
|
4505
|
+
super(); // Attributes
|
|
4687
4506
|
|
|
4688
|
-
|
|
4507
|
+
this.checked = false;
|
|
4508
|
+
this.disabled = false;
|
|
4509
|
+
this.name = undefined;
|
|
4510
|
+
this.value = undefined;
|
|
4511
|
+
}
|
|
4689
4512
|
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4513
|
+
changed(event) {
|
|
4514
|
+
this.checked = event.target.checked;
|
|
4515
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
4516
|
+
detail: {
|
|
4517
|
+
checked: this.checked,
|
|
4518
|
+
value: this.value
|
|
4519
|
+
},
|
|
4520
|
+
bubbles: true
|
|
4521
|
+
}));
|
|
4693
4522
|
}
|
|
4694
4523
|
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
this.dispatchEvent(new CustomEvent('change', {
|
|
4700
|
-
detail: {
|
|
4701
|
-
checked: this.checked
|
|
4702
|
-
},
|
|
4703
|
-
bubbles: true
|
|
4704
|
-
}));
|
|
4705
|
-
}
|
|
4706
|
-
}, {
|
|
4707
|
-
key: "render",
|
|
4708
|
-
value: function render() {
|
|
4709
|
-
return $(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n <input type=\"checkbox\" id=", " ?checked=", " ?disabled=", " @change=", ">\n <label for=", ">\n <slot name=\"off-label\"></slot>\n </label>\n <label for=", ">\n <slot></slot>\n </label>\n "])), "".concat(this.uniqueId, "-checkbox"), this.checked, this.disabled, this.changed.bind(this), "".concat(this.uniqueId, "-checkbox"), "".concat(this.uniqueId, "-checkbox"));
|
|
4710
|
-
}
|
|
4711
|
-
}], [{
|
|
4712
|
-
key: "properties",
|
|
4713
|
-
get: function get() {
|
|
4714
|
-
return {
|
|
4715
|
-
checked: {
|
|
4716
|
-
attribute: 'checked',
|
|
4717
|
-
type: Boolean,
|
|
4718
|
-
reflect: true
|
|
4719
|
-
},
|
|
4720
|
-
disabled: {
|
|
4721
|
-
attribute: 'disabled',
|
|
4722
|
-
type: Boolean,
|
|
4723
|
-
reflect: true
|
|
4524
|
+
static get styles() {
|
|
4525
|
+
return [super.styles, r$2(_t || (_t = _`
|
|
4526
|
+
:host {
|
|
4527
|
+
display: flex;
|
|
4724
4528
|
}
|
|
4725
|
-
};
|
|
4726
|
-
}
|
|
4727
|
-
}, {
|
|
4728
|
-
key: "styles",
|
|
4729
|
-
get: function get() {
|
|
4730
|
-
return [_get(_getPrototypeOf(DecidablesSwitch), "styles", this), r$2(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n :host {\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n justify-content: center;\n }\n\n /* Adapted from https://codepen.io/guuslieben/pen/YyPRVP */\n input[type=checkbox] {\n /* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */\n position: absolute;\n\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n\n white-space: nowrap;\n\n border: 0;\n clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */\n }\n\n input[type=checkbox] + label {\n order: 1;\n\n margin: 0 0.25rem 0.25rem;\n\n font-weight: 400;\n }\n\n input[type=checkbox] + label + label {\n position: relative;\n\n min-width: 24px;\n padding: 0 0 36px;\n margin: 0.25rem 0.25rem 0;\n\n font-weight: 400;\n\n outline: none;\n }\n\n input[type=checkbox] + label + label::before,\n input[type=checkbox] + label + label::after {\n position: absolute;\n\n left: 50%;\n\n margin: 0;\n\n content: \"\";\n\n outline: 0;\n\n transition: all var(---transition-duration) ease;\n transform: translate(-50%, 0);\n }\n\n input[type=checkbox] + label + label::before {\n bottom: 1px;\n\n width: 8px;\n height: 34px;\n\n background-color: var(---color-element-disabled);\n border-radius: 4px;\n }\n\n input[type=checkbox] + label + label::after {\n bottom: 0;\n\n width: 18px;\n height: 18px;\n\n background-color: var(---color-element-enabled);\n border-radius: 50%;\n box-shadow: var(---shadow-2);\n }\n\n input[type=checkbox]:checked + label + label::after {\n transform: translate(-50%, -100%);\n }\n\n input[type=checkbox]:disabled + label + label::after {\n background-color: var(---color-element-disabled);\n box-shadow: none;\n }\n\n input[type=checkbox]:enabled + label,\n input[type=checkbox]:enabled + label + label {\n cursor: pointer;\n }\n\n input[type=checkbox]:enabled + label:hover + label::after,\n input[type=checkbox]:enabled + label + label:hover::after {\n box-shadow: var(---shadow-4);\n }\n\n input[type=checkbox]:enabled + label:active + label::after,\n input[type=checkbox]:enabled + label + label:active::after {\n box-shadow: var(---shadow-8);\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n :host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {\n box-shadow: var(---shadow-4);\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,\n :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {\n box-shadow: var(---shadow-8);\n }\n "])))];
|
|
4731
|
-
}
|
|
4732
|
-
}]);
|
|
4733
4529
|
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4530
|
+
input[type=radio] {
|
|
4531
|
+
/* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */
|
|
4532
|
+
position: absolute;
|
|
4737
4533
|
|
|
4738
|
-
|
|
4534
|
+
width: 1px;
|
|
4535
|
+
height: 1px;
|
|
4536
|
+
padding: 0;
|
|
4537
|
+
margin: -1px;
|
|
4538
|
+
overflow: hidden;
|
|
4539
|
+
clip: rect(0 0 0 0);
|
|
4739
4540
|
|
|
4740
|
-
|
|
4741
|
-
_inherits(DecidablesToggle, _DecidablesElement);
|
|
4541
|
+
white-space: nowrap;
|
|
4742
4542
|
|
|
4743
|
-
|
|
4543
|
+
border: 0;
|
|
4544
|
+
clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
|
|
4545
|
+
}
|
|
4744
4546
|
|
|
4745
|
-
|
|
4746
|
-
|
|
4547
|
+
input[type=radio] + label {
|
|
4548
|
+
width: 100%;
|
|
4549
|
+
padding: 0.375rem 0.75rem;
|
|
4747
4550
|
|
|
4748
|
-
|
|
4551
|
+
font-family: var(---font-family-base);
|
|
4552
|
+
font-size: 1.125rem;
|
|
4553
|
+
line-height: 1.5;
|
|
4554
|
+
color: var(---color-text-inverse);
|
|
4555
|
+
text-align: center;
|
|
4749
4556
|
|
|
4750
|
-
|
|
4557
|
+
cursor: pointer;
|
|
4751
4558
|
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4559
|
+
background-color: var(---color-element-enabled);
|
|
4560
|
+
border: 0;
|
|
4561
|
+
border-radius: 0;
|
|
4562
|
+
outline: none;
|
|
4755
4563
|
|
|
4756
|
-
|
|
4757
|
-
key: "render",
|
|
4758
|
-
value: function render() {
|
|
4759
|
-
return $(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n <fieldset ?disabled=", ">\n <legend><slot name=\"label\"></slot></legend>\n <slot></slot>\n </fieldset>\n "])), this.disabled);
|
|
4760
|
-
}
|
|
4761
|
-
}], [{
|
|
4762
|
-
key: "properties",
|
|
4763
|
-
get: function get() {
|
|
4764
|
-
return {
|
|
4765
|
-
disabled: {
|
|
4766
|
-
attribute: 'disabled',
|
|
4767
|
-
type: Boolean,
|
|
4768
|
-
reflect: true
|
|
4564
|
+
box-shadow: var(---shadow-2);
|
|
4769
4565
|
}
|
|
4770
|
-
};
|
|
4771
|
-
}
|
|
4772
|
-
}, {
|
|
4773
|
-
key: "styles",
|
|
4774
|
-
get: function get() {
|
|
4775
|
-
return [_get(_getPrototypeOf(DecidablesToggle), "styles", this), r$2(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n fieldset {\n display: flex;\n\n flex-direction: column;\n\n align-items: stretch;\n justify-content: center;\n\n margin: 0.25rem;\n\n border: 0;\n }\n\n legend {\n text-align: center;\n }\n "])))];
|
|
4776
|
-
}
|
|
4777
|
-
}]);
|
|
4778
4566
|
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4567
|
+
input[type=radio]:checked + label {
|
|
4568
|
+
background-color: var(---color-element-selected);
|
|
4569
|
+
outline: none;
|
|
4570
|
+
box-shadow: var(---shadow-2);
|
|
4571
|
+
}
|
|
4782
4572
|
|
|
4783
|
-
|
|
4573
|
+
input[type=radio] + label:hover {
|
|
4574
|
+
z-index: 1;
|
|
4784
4575
|
|
|
4785
|
-
|
|
4786
|
-
|
|
4576
|
+
outline: none;
|
|
4577
|
+
box-shadow: var(---shadow-4);
|
|
4578
|
+
}
|
|
4787
4579
|
|
|
4788
|
-
|
|
4580
|
+
input[type=radio] + label:active {
|
|
4581
|
+
z-index: 2;
|
|
4789
4582
|
|
|
4790
|
-
|
|
4791
|
-
|
|
4583
|
+
outline: none;
|
|
4584
|
+
box-shadow: var(---shadow-8);
|
|
4585
|
+
}
|
|
4792
4586
|
|
|
4793
|
-
|
|
4587
|
+
:host(:first-of-type) input[type=radio] + label {
|
|
4588
|
+
border-top-left-radius: 0.25rem;
|
|
4589
|
+
border-top-right-radius: 0.25rem;
|
|
4590
|
+
}
|
|
4794
4591
|
|
|
4795
|
-
|
|
4592
|
+
:host(:last-of-type) input[type=radio] + label {
|
|
4593
|
+
border-bottom-right-radius: 0.25rem;
|
|
4594
|
+
border-bottom-left-radius: 0.25rem;
|
|
4595
|
+
}
|
|
4796
4596
|
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
_this.name = undefined;
|
|
4800
|
-
_this.value = undefined;
|
|
4801
|
-
return _this;
|
|
4802
|
-
}
|
|
4597
|
+
:host(.keyboard) input[type=radio]:focus + label {
|
|
4598
|
+
z-index: 1;
|
|
4803
4599
|
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
value: function changed(event) {
|
|
4807
|
-
this.checked = event.target.checked;
|
|
4808
|
-
this.dispatchEvent(new CustomEvent('change', {
|
|
4809
|
-
detail: {
|
|
4810
|
-
checked: this.checked,
|
|
4811
|
-
value: this.value
|
|
4812
|
-
},
|
|
4813
|
-
bubbles: true
|
|
4814
|
-
}));
|
|
4815
|
-
}
|
|
4816
|
-
}, {
|
|
4817
|
-
key: "render",
|
|
4818
|
-
value: function render() {
|
|
4819
|
-
return $(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <input type=\"radio\" id=", " name=", " value=", " .checked=", " @change=", ">\n <label for=", ">\n <slot></slot>\n </label>\n "])), "".concat(this.uniqueId, "-radio"), this.name, this.value, this.checked, this.changed.bind(this), "".concat(this.uniqueId, "-radio"));
|
|
4820
|
-
}
|
|
4821
|
-
}], [{
|
|
4822
|
-
key: "properties",
|
|
4823
|
-
get: function get() {
|
|
4824
|
-
return {
|
|
4825
|
-
checked: {
|
|
4826
|
-
attribute: 'checked',
|
|
4827
|
-
type: Boolean,
|
|
4828
|
-
reflect: true
|
|
4829
|
-
},
|
|
4830
|
-
disabled: {
|
|
4831
|
-
attribute: 'disabled',
|
|
4832
|
-
type: Boolean,
|
|
4833
|
-
reflect: true
|
|
4834
|
-
},
|
|
4835
|
-
name: {
|
|
4836
|
-
attribute: 'name',
|
|
4837
|
-
type: String,
|
|
4838
|
-
reflect: true
|
|
4839
|
-
},
|
|
4840
|
-
value: {
|
|
4841
|
-
attribute: 'value',
|
|
4842
|
-
type: String,
|
|
4843
|
-
reflect: true
|
|
4600
|
+
outline: none;
|
|
4601
|
+
box-shadow: var(---shadow-4);
|
|
4844
4602
|
}
|
|
4845
|
-
};
|
|
4846
|
-
}
|
|
4847
|
-
}, {
|
|
4848
|
-
key: "styles",
|
|
4849
|
-
get: function get() {
|
|
4850
|
-
return [_get(_getPrototypeOf(DecidablesToggleOption), "styles", this), r$2(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n :host {\n display: flex;\n }\n\n input[type=radio] {\n /* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */\n position: absolute;\n\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n\n white-space: nowrap;\n\n border: 0;\n clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */\n }\n\n input[type=radio] + label {\n width: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n text-align: center;\n\n cursor: pointer;\n\n background-color: var(---color-element-enabled);\n border: 0;\n border-radius: 0;\n outline: none;\n\n box-shadow: var(---shadow-2);\n }\n\n input[type=radio]:checked + label {\n background-color: var(---color-element-selected);\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n input[type=radio] + label:hover {\n z-index: 1;\n\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n input[type=radio] + label:active {\n z-index: 2;\n\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(:first-of-type) input[type=radio] + label {\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem;\n }\n\n :host(:last-of-type) input[type=radio] + label {\n border-bottom-right-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem;\n }\n\n :host(.keyboard) input[type=radio]:focus + label {\n z-index: 1;\n\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) input[type=radio]:focus:checked + label {\n z-index: 1;\n\n background-color: var(---color-element-selected);\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) input[type=radio]:focus + label:active {\n z-index: 2;\n\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))];
|
|
4851
|
-
}
|
|
4852
|
-
}]);
|
|
4853
4603
|
|
|
4854
|
-
|
|
4855
|
-
|
|
4604
|
+
:host(.keyboard) input[type=radio]:focus:checked + label {
|
|
4605
|
+
z-index: 1;
|
|
4606
|
+
|
|
4607
|
+
background-color: var(---color-element-selected);
|
|
4608
|
+
outline: none;
|
|
4609
|
+
box-shadow: var(---shadow-4);
|
|
4610
|
+
}
|
|
4611
|
+
|
|
4612
|
+
:host(.keyboard) input[type=radio]:focus + label:active {
|
|
4613
|
+
z-index: 2;
|
|
4614
|
+
|
|
4615
|
+
outline: none;
|
|
4616
|
+
box-shadow: var(---shadow-8);
|
|
4617
|
+
}
|
|
4618
|
+
`))];
|
|
4619
|
+
}
|
|
4620
|
+
|
|
4621
|
+
render() {
|
|
4622
|
+
return $(_t2 || (_t2 = _`
|
|
4623
|
+
<input type="radio" id="toggle-option" name=${0} value=${0} .checked=${0} @change=${0}>
|
|
4624
|
+
<label for="toggle-option">
|
|
4625
|
+
<slot></slot>
|
|
4626
|
+
</label>
|
|
4627
|
+
`), this.name, this.value, this.checked, this.changed.bind(this));
|
|
4628
|
+
}
|
|
4629
|
+
|
|
4630
|
+
}
|
|
4856
4631
|
customElements.define('decidables-toggle-option', DecidablesToggleOption);
|
|
4857
4632
|
|
|
4858
4633
|
/*
|
|
4859
4634
|
Attribute: Space-separated sequence of numbers
|
|
4860
4635
|
Property: Array of numbers
|
|
4861
4636
|
*/
|
|
4862
|
-
|
|
4863
|
-
fromAttribute:
|
|
4864
|
-
return value.split(/\s+/).map(
|
|
4637
|
+
const DecidablesConverterArray = {
|
|
4638
|
+
fromAttribute: value => {
|
|
4639
|
+
return value.split(/\s+/).map(item => {
|
|
4865
4640
|
return Number.parseFloat(item);
|
|
4866
4641
|
});
|
|
4867
4642
|
},
|
|
4868
|
-
toAttribute:
|
|
4869
|
-
return value.length ? value.map(
|
|
4643
|
+
toAttribute: value => {
|
|
4644
|
+
return value.length ? value.map(item => {
|
|
4870
4645
|
return item.toFixed(3);
|
|
4871
4646
|
}).join(' ') : null;
|
|
4872
4647
|
}
|
|
@@ -4876,12 +4651,12 @@ var DecidablesConverterArray = {
|
|
|
4876
4651
|
Attribute: Space-separated sequence of strings
|
|
4877
4652
|
Property: Set of strings
|
|
4878
4653
|
*/
|
|
4879
|
-
|
|
4880
|
-
fromAttribute:
|
|
4654
|
+
const DecidablesConverterSet = {
|
|
4655
|
+
fromAttribute: value => {
|
|
4881
4656
|
return new Set(value.split(/\s+/));
|
|
4882
4657
|
},
|
|
4883
|
-
toAttribute:
|
|
4884
|
-
return value.size ?
|
|
4658
|
+
toAttribute: value => {
|
|
4659
|
+
return value.size ? [...value].join(' ') : null;
|
|
4885
4660
|
}
|
|
4886
4661
|
};
|
|
4887
4662
|
|