@record-evolution/widget-navbar 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/widget-navbar.js +48 -1472
- package/dist/widget-navbar.js.map +1 -1
- package/package.json +8 -4
- package/src/definition-schema.d.ts +34 -7
- package/src/definition-schema.json +16 -7
- package/src/widget-navbar.ts +8 -8
package/dist/widget-navbar.js
CHANGED
|
@@ -1,1442 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return t;
|
|
15
|
-
}
|
|
16
|
-
toString() {
|
|
17
|
-
return this.cssText;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
const ee = (s) => new Ut(typeof s == "string" ? s : s + "", void 0, vt), $ = (s, ...t) => {
|
|
21
|
-
const e = s.length === 1 ? s[0] : t.reduce(((i, r, o) => i + ((a) => {
|
|
22
|
-
if (a._$cssResult$ === !0) return a.cssText;
|
|
23
|
-
if (typeof a == "number") return a;
|
|
24
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
25
|
-
})(r) + s[o + 1]), s[0]);
|
|
26
|
-
return new Ut(e, s, vt);
|
|
27
|
-
}, ie = (s, t) => {
|
|
28
|
-
if (ut) s.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
|
|
29
|
-
else for (const e of t) {
|
|
30
|
-
const i = document.createElement("style"), r = Y.litNonce;
|
|
31
|
-
r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
|
|
32
|
-
}
|
|
33
|
-
}, Ct = ut ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
34
|
-
let e = "";
|
|
35
|
-
for (const i of t.cssRules) e += i.cssText;
|
|
36
|
-
return ee(e);
|
|
37
|
-
})(s) : s;
|
|
38
|
-
const { is: re, defineProperty: se, getOwnPropertyDescriptor: oe, getOwnPropertyNames: ae, getOwnPropertySymbols: ne, getPrototypeOf: le } = Object, J = globalThis, Et = J.trustedTypes, ce = Et ? Et.emptyScript : "", de = J.reactiveElementPolyfillSupport, U = (s, t) => s, Z = { toAttribute(s, t) {
|
|
39
|
-
switch (t) {
|
|
40
|
-
case Boolean:
|
|
41
|
-
s = s ? ce : null;
|
|
42
|
-
break;
|
|
43
|
-
case Object:
|
|
44
|
-
case Array:
|
|
45
|
-
s = s == null ? s : JSON.stringify(s);
|
|
46
|
-
}
|
|
47
|
-
return s;
|
|
48
|
-
}, fromAttribute(s, t) {
|
|
49
|
-
let e = s;
|
|
50
|
-
switch (t) {
|
|
51
|
-
case Boolean:
|
|
52
|
-
e = s !== null;
|
|
53
|
-
break;
|
|
54
|
-
case Number:
|
|
55
|
-
e = s === null ? null : Number(s);
|
|
56
|
-
break;
|
|
57
|
-
case Object:
|
|
58
|
-
case Array:
|
|
59
|
-
try {
|
|
60
|
-
e = JSON.parse(s);
|
|
61
|
-
} catch {
|
|
62
|
-
e = null;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return e;
|
|
66
|
-
} }, mt = (s, t) => !re(s, t), St = { attribute: !0, type: String, converter: Z, reflect: !1, useDefault: !1, hasChanged: mt };
|
|
67
|
-
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), J.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
68
|
-
let k = class extends HTMLElement {
|
|
69
|
-
static addInitializer(t) {
|
|
70
|
-
this._$Ei(), (this.l ??= []).push(t);
|
|
71
|
-
}
|
|
72
|
-
static get observedAttributes() {
|
|
73
|
-
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
74
|
-
}
|
|
75
|
-
static createProperty(t, e = St) {
|
|
76
|
-
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
77
|
-
const i = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, i, e);
|
|
78
|
-
r !== void 0 && se(this.prototype, t, r);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
static getPropertyDescriptor(t, e, i) {
|
|
82
|
-
const { get: r, set: o } = oe(this.prototype, t) ?? { get() {
|
|
83
|
-
return this[e];
|
|
84
|
-
}, set(a) {
|
|
85
|
-
this[e] = a;
|
|
86
|
-
} };
|
|
87
|
-
return { get: r, set(a) {
|
|
88
|
-
const l = r?.call(this);
|
|
89
|
-
o?.call(this, a), this.requestUpdate(t, l, i);
|
|
90
|
-
}, configurable: !0, enumerable: !0 };
|
|
91
|
-
}
|
|
92
|
-
static getPropertyOptions(t) {
|
|
93
|
-
return this.elementProperties.get(t) ?? St;
|
|
94
|
-
}
|
|
95
|
-
static _$Ei() {
|
|
96
|
-
if (this.hasOwnProperty(U("elementProperties"))) return;
|
|
97
|
-
const t = le(this);
|
|
98
|
-
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
99
|
-
}
|
|
100
|
-
static finalize() {
|
|
101
|
-
if (this.hasOwnProperty(U("finalized"))) return;
|
|
102
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
|
|
103
|
-
const e = this.properties, i = [...ae(e), ...ne(e)];
|
|
104
|
-
for (const r of i) this.createProperty(r, e[r]);
|
|
105
|
-
}
|
|
106
|
-
const t = this[Symbol.metadata];
|
|
107
|
-
if (t !== null) {
|
|
108
|
-
const e = litPropertyMetadata.get(t);
|
|
109
|
-
if (e !== void 0) for (const [i, r] of e) this.elementProperties.set(i, r);
|
|
110
|
-
}
|
|
111
|
-
this._$Eh = /* @__PURE__ */ new Map();
|
|
112
|
-
for (const [e, i] of this.elementProperties) {
|
|
113
|
-
const r = this._$Eu(e, i);
|
|
114
|
-
r !== void 0 && this._$Eh.set(r, e);
|
|
115
|
-
}
|
|
116
|
-
this.elementStyles = this.finalizeStyles(this.styles);
|
|
117
|
-
}
|
|
118
|
-
static finalizeStyles(t) {
|
|
119
|
-
const e = [];
|
|
120
|
-
if (Array.isArray(t)) {
|
|
121
|
-
const i = new Set(t.flat(1 / 0).reverse());
|
|
122
|
-
for (const r of i) e.unshift(Ct(r));
|
|
123
|
-
} else t !== void 0 && e.push(Ct(t));
|
|
124
|
-
return e;
|
|
125
|
-
}
|
|
126
|
-
static _$Eu(t, e) {
|
|
127
|
-
const i = e.attribute;
|
|
128
|
-
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
129
|
-
}
|
|
130
|
-
constructor() {
|
|
131
|
-
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
132
|
-
}
|
|
133
|
-
_$Ev() {
|
|
134
|
-
this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
|
|
135
|
-
}
|
|
136
|
-
addController(t) {
|
|
137
|
-
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
|
|
138
|
-
}
|
|
139
|
-
removeController(t) {
|
|
140
|
-
this._$EO?.delete(t);
|
|
141
|
-
}
|
|
142
|
-
_$E_() {
|
|
143
|
-
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
144
|
-
for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
145
|
-
t.size > 0 && (this._$Ep = t);
|
|
146
|
-
}
|
|
147
|
-
createRenderRoot() {
|
|
148
|
-
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
149
|
-
return ie(t, this.constructor.elementStyles), t;
|
|
150
|
-
}
|
|
151
|
-
connectedCallback() {
|
|
152
|
-
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
|
|
153
|
-
}
|
|
154
|
-
enableUpdating(t) {
|
|
155
|
-
}
|
|
156
|
-
disconnectedCallback() {
|
|
157
|
-
this._$EO?.forEach(((t) => t.hostDisconnected?.()));
|
|
158
|
-
}
|
|
159
|
-
attributeChangedCallback(t, e, i) {
|
|
160
|
-
this._$AK(t, i);
|
|
161
|
-
}
|
|
162
|
-
_$ET(t, e) {
|
|
163
|
-
const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
|
|
164
|
-
if (r !== void 0 && i.reflect === !0) {
|
|
165
|
-
const o = (i.converter?.toAttribute !== void 0 ? i.converter : Z).toAttribute(e, i.type);
|
|
166
|
-
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
_$AK(t, e) {
|
|
170
|
-
const i = this.constructor, r = i._$Eh.get(t);
|
|
171
|
-
if (r !== void 0 && this._$Em !== r) {
|
|
172
|
-
const o = i.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : Z;
|
|
173
|
-
this._$Em = r;
|
|
174
|
-
const l = a.fromAttribute(e, o.type);
|
|
175
|
-
this[r] = l ?? this._$Ej?.get(r) ?? l, this._$Em = null;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
requestUpdate(t, e, i) {
|
|
179
|
-
if (t !== void 0) {
|
|
180
|
-
const r = this.constructor, o = this[t];
|
|
181
|
-
if (i ??= r.getPropertyOptions(t), !((i.hasChanged ?? mt)(o, e) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
|
|
182
|
-
this.C(t, e, i);
|
|
183
|
-
}
|
|
184
|
-
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
185
|
-
}
|
|
186
|
-
C(t, e, { useDefault: i, reflect: r, wrapped: o }, a) {
|
|
187
|
-
i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, a ?? e ?? this[t]), o !== !0 || a !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
188
|
-
}
|
|
189
|
-
async _$EP() {
|
|
190
|
-
this.isUpdatePending = !0;
|
|
191
|
-
try {
|
|
192
|
-
await this._$ES;
|
|
193
|
-
} catch (e) {
|
|
194
|
-
Promise.reject(e);
|
|
195
|
-
}
|
|
196
|
-
const t = this.scheduleUpdate();
|
|
197
|
-
return t != null && await t, !this.isUpdatePending;
|
|
198
|
-
}
|
|
199
|
-
scheduleUpdate() {
|
|
200
|
-
return this.performUpdate();
|
|
201
|
-
}
|
|
202
|
-
performUpdate() {
|
|
203
|
-
if (!this.isUpdatePending) return;
|
|
204
|
-
if (!this.hasUpdated) {
|
|
205
|
-
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
206
|
-
for (const [r, o] of this._$Ep) this[r] = o;
|
|
207
|
-
this._$Ep = void 0;
|
|
208
|
-
}
|
|
209
|
-
const i = this.constructor.elementProperties;
|
|
210
|
-
if (i.size > 0) for (const [r, o] of i) {
|
|
211
|
-
const { wrapped: a } = o, l = this[r];
|
|
212
|
-
a !== !0 || this._$AL.has(r) || l === void 0 || this.C(r, void 0, o, l);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
let t = !1;
|
|
216
|
-
const e = this._$AL;
|
|
217
|
-
try {
|
|
218
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((i) => i.hostUpdate?.())), this.update(e)) : this._$EM();
|
|
219
|
-
} catch (i) {
|
|
220
|
-
throw t = !1, this._$EM(), i;
|
|
221
|
-
}
|
|
222
|
-
t && this._$AE(e);
|
|
223
|
-
}
|
|
224
|
-
willUpdate(t) {
|
|
225
|
-
}
|
|
226
|
-
_$AE(t) {
|
|
227
|
-
this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
228
|
-
}
|
|
229
|
-
_$EM() {
|
|
230
|
-
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
231
|
-
}
|
|
232
|
-
get updateComplete() {
|
|
233
|
-
return this.getUpdateComplete();
|
|
234
|
-
}
|
|
235
|
-
getUpdateComplete() {
|
|
236
|
-
return this._$ES;
|
|
237
|
-
}
|
|
238
|
-
shouldUpdate(t) {
|
|
239
|
-
return !0;
|
|
240
|
-
}
|
|
241
|
-
update(t) {
|
|
242
|
-
this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
|
|
243
|
-
}
|
|
244
|
-
updated(t) {
|
|
245
|
-
}
|
|
246
|
-
firstUpdated(t) {
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[U("elementProperties")] = /* @__PURE__ */ new Map(), k[U("finalized")] = /* @__PURE__ */ new Map(), de?.({ ReactiveElement: k }), (J.reactiveElementVersions ??= []).push("2.1.1");
|
|
250
|
-
const bt = globalThis, X = bt.trustedTypes, Tt = X ? X.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Ht = "$lit$", w = `lit$${Math.random().toFixed(9).slice(2)}$`, Lt = "?" + w, he = `<${Lt}>`, R = document, H = () => R.createComment(""), L = (s) => s === null || typeof s != "object" && typeof s != "function", yt = Array.isArray, pe = (s) => yt(s) || typeof s?.[Symbol.iterator] == "function", rt = `[
|
|
251
|
-
\f\r]`, z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, It = /-->/g, Pt = />/g, T = RegExp(`>|${rt}(?:([^\\s"'>=/]+)(${rt}*=${rt}*(?:[^
|
|
252
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Rt = /'/g, kt = /"/g, Bt = /^(?:script|style|textarea|title)$/i, fe = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), A = fe(1), C = /* @__PURE__ */ Symbol.for("lit-noChange"), v = /* @__PURE__ */ Symbol.for("lit-nothing"), Ot = /* @__PURE__ */ new WeakMap(), P = R.createTreeWalker(R, 129);
|
|
253
|
-
function Ft(s, t) {
|
|
254
|
-
if (!yt(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
255
|
-
return Tt !== void 0 ? Tt.createHTML(t) : t;
|
|
256
|
-
}
|
|
257
|
-
const ue = (s, t) => {
|
|
258
|
-
const e = s.length - 1, i = [];
|
|
259
|
-
let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = z;
|
|
260
|
-
for (let l = 0; l < e; l++) {
|
|
261
|
-
const n = s[l];
|
|
262
|
-
let d, p, c = -1, f = 0;
|
|
263
|
-
for (; f < n.length && (a.lastIndex = f, p = a.exec(n), p !== null); ) f = a.lastIndex, a === z ? p[1] === "!--" ? a = It : p[1] !== void 0 ? a = Pt : p[2] !== void 0 ? (Bt.test(p[2]) && (r = RegExp("</" + p[2], "g")), a = T) : p[3] !== void 0 && (a = T) : a === T ? p[0] === ">" ? (a = r ?? z, c = -1) : p[1] === void 0 ? c = -2 : (c = a.lastIndex - p[2].length, d = p[1], a = p[3] === void 0 ? T : p[3] === '"' ? kt : Rt) : a === kt || a === Rt ? a = T : a === It || a === Pt ? a = z : (a = T, r = void 0);
|
|
264
|
-
const u = a === T && s[l + 1].startsWith("/>") ? " " : "";
|
|
265
|
-
o += a === z ? n + he : c >= 0 ? (i.push(d), n.slice(0, c) + Ht + n.slice(c) + w + u) : n + w + (c === -2 ? l : u);
|
|
266
|
-
}
|
|
267
|
-
return [Ft(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
268
|
-
};
|
|
269
|
-
class B {
|
|
270
|
-
constructor({ strings: t, _$litType$: e }, i) {
|
|
271
|
-
let r;
|
|
272
|
-
this.parts = [];
|
|
273
|
-
let o = 0, a = 0;
|
|
274
|
-
const l = t.length - 1, n = this.parts, [d, p] = ue(t, e);
|
|
275
|
-
if (this.el = B.createElement(d, i), P.currentNode = this.el.content, e === 2 || e === 3) {
|
|
276
|
-
const c = this.el.content.firstChild;
|
|
277
|
-
c.replaceWith(...c.childNodes);
|
|
278
|
-
}
|
|
279
|
-
for (; (r = P.nextNode()) !== null && n.length < l; ) {
|
|
280
|
-
if (r.nodeType === 1) {
|
|
281
|
-
if (r.hasAttributes()) for (const c of r.getAttributeNames()) if (c.endsWith(Ht)) {
|
|
282
|
-
const f = p[a++], u = r.getAttribute(c).split(w), b = /([.?@])?(.*)/.exec(f);
|
|
283
|
-
n.push({ type: 1, index: o, name: b[2], strings: u, ctor: b[1] === "." ? me : b[1] === "?" ? be : b[1] === "@" ? ye : Q }), r.removeAttribute(c);
|
|
284
|
-
} else c.startsWith(w) && (n.push({ type: 6, index: o }), r.removeAttribute(c));
|
|
285
|
-
if (Bt.test(r.tagName)) {
|
|
286
|
-
const c = r.textContent.split(w), f = c.length - 1;
|
|
287
|
-
if (f > 0) {
|
|
288
|
-
r.textContent = X ? X.emptyScript : "";
|
|
289
|
-
for (let u = 0; u < f; u++) r.append(c[u], H()), P.nextNode(), n.push({ type: 2, index: ++o });
|
|
290
|
-
r.append(c[f], H());
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
} else if (r.nodeType === 8) if (r.data === Lt) n.push({ type: 2, index: o });
|
|
294
|
-
else {
|
|
295
|
-
let c = -1;
|
|
296
|
-
for (; (c = r.data.indexOf(w, c + 1)) !== -1; ) n.push({ type: 7, index: o }), c += w.length - 1;
|
|
297
|
-
}
|
|
298
|
-
o++;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
static createElement(t, e) {
|
|
302
|
-
const i = R.createElement("template");
|
|
303
|
-
return i.innerHTML = t, i;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
function O(s, t, e = s, i) {
|
|
307
|
-
if (t === C) return t;
|
|
308
|
-
let r = i !== void 0 ? e._$Co?.[i] : e._$Cl;
|
|
309
|
-
const o = L(t) ? void 0 : t._$litDirective$;
|
|
310
|
-
return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ??= [])[i] = r : e._$Cl = r), r !== void 0 && (t = O(s, r._$AS(s, t.values), r, i)), t;
|
|
311
|
-
}
|
|
312
|
-
let ve = class {
|
|
313
|
-
constructor(t, e) {
|
|
314
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
315
|
-
}
|
|
316
|
-
get parentNode() {
|
|
317
|
-
return this._$AM.parentNode;
|
|
318
|
-
}
|
|
319
|
-
get _$AU() {
|
|
320
|
-
return this._$AM._$AU;
|
|
321
|
-
}
|
|
322
|
-
u(t) {
|
|
323
|
-
const { el: { content: e }, parts: i } = this._$AD, r = (t?.creationScope ?? R).importNode(e, !0);
|
|
324
|
-
P.currentNode = r;
|
|
325
|
-
let o = P.nextNode(), a = 0, l = 0, n = i[0];
|
|
326
|
-
for (; n !== void 0; ) {
|
|
327
|
-
if (a === n.index) {
|
|
328
|
-
let d;
|
|
329
|
-
n.type === 2 ? d = new M(o, o.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(o, n.name, n.strings, this, t) : n.type === 6 && (d = new ge(o, this, t)), this._$AV.push(d), n = i[++l];
|
|
330
|
-
}
|
|
331
|
-
a !== n?.index && (o = P.nextNode(), a++);
|
|
332
|
-
}
|
|
333
|
-
return P.currentNode = R, r;
|
|
334
|
-
}
|
|
335
|
-
p(t) {
|
|
336
|
-
let e = 0;
|
|
337
|
-
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
338
|
-
}
|
|
339
|
-
};
|
|
340
|
-
class M {
|
|
341
|
-
get _$AU() {
|
|
342
|
-
return this._$AM?._$AU ?? this._$Cv;
|
|
343
|
-
}
|
|
344
|
-
constructor(t, e, i, r) {
|
|
345
|
-
this.type = 2, this._$AH = v, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
346
|
-
}
|
|
347
|
-
get parentNode() {
|
|
348
|
-
let t = this._$AA.parentNode;
|
|
349
|
-
const e = this._$AM;
|
|
350
|
-
return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
|
|
351
|
-
}
|
|
352
|
-
get startNode() {
|
|
353
|
-
return this._$AA;
|
|
354
|
-
}
|
|
355
|
-
get endNode() {
|
|
356
|
-
return this._$AB;
|
|
357
|
-
}
|
|
358
|
-
_$AI(t, e = this) {
|
|
359
|
-
t = O(this, t, e), L(t) ? t === v || t == null || t === "" ? (this._$AH !== v && this._$AR(), this._$AH = v) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : pe(t) ? this.k(t) : this._(t);
|
|
360
|
-
}
|
|
361
|
-
O(t) {
|
|
362
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
363
|
-
}
|
|
364
|
-
T(t) {
|
|
365
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
366
|
-
}
|
|
367
|
-
_(t) {
|
|
368
|
-
this._$AH !== v && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(R.createTextNode(t)), this._$AH = t;
|
|
369
|
-
}
|
|
370
|
-
$(t) {
|
|
371
|
-
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = B.createElement(Ft(i.h, i.h[0]), this.options)), i);
|
|
372
|
-
if (this._$AH?._$AD === r) this._$AH.p(e);
|
|
373
|
-
else {
|
|
374
|
-
const o = new ve(r, this), a = o.u(this.options);
|
|
375
|
-
o.p(e), this.T(a), this._$AH = o;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
_$AC(t) {
|
|
379
|
-
let e = Ot.get(t.strings);
|
|
380
|
-
return e === void 0 && Ot.set(t.strings, e = new B(t)), e;
|
|
381
|
-
}
|
|
382
|
-
k(t) {
|
|
383
|
-
yt(this._$AH) || (this._$AH = [], this._$AR());
|
|
384
|
-
const e = this._$AH;
|
|
385
|
-
let i, r = 0;
|
|
386
|
-
for (const o of t) r === e.length ? e.push(i = new M(this.O(H()), this.O(H()), this, this.options)) : i = e[r], i._$AI(o), r++;
|
|
387
|
-
r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
|
|
388
|
-
}
|
|
389
|
-
_$AR(t = this._$AA.nextSibling, e) {
|
|
390
|
-
for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
|
|
391
|
-
const i = t.nextSibling;
|
|
392
|
-
t.remove(), t = i;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
setConnected(t) {
|
|
396
|
-
this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
class Q {
|
|
400
|
-
get tagName() {
|
|
401
|
-
return this.element.tagName;
|
|
402
|
-
}
|
|
403
|
-
get _$AU() {
|
|
404
|
-
return this._$AM._$AU;
|
|
405
|
-
}
|
|
406
|
-
constructor(t, e, i, r, o) {
|
|
407
|
-
this.type = 1, this._$AH = v, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = v;
|
|
408
|
-
}
|
|
409
|
-
_$AI(t, e = this, i, r) {
|
|
410
|
-
const o = this.strings;
|
|
411
|
-
let a = !1;
|
|
412
|
-
if (o === void 0) t = O(this, t, e, 0), a = !L(t) || t !== this._$AH && t !== C, a && (this._$AH = t);
|
|
413
|
-
else {
|
|
414
|
-
const l = t;
|
|
415
|
-
let n, d;
|
|
416
|
-
for (t = o[0], n = 0; n < o.length - 1; n++) d = O(this, l[i + n], e, n), d === C && (d = this._$AH[n]), a ||= !L(d) || d !== this._$AH[n], d === v ? t = v : t !== v && (t += (d ?? "") + o[n + 1]), this._$AH[n] = d;
|
|
417
|
-
}
|
|
418
|
-
a && !r && this.j(t);
|
|
419
|
-
}
|
|
420
|
-
j(t) {
|
|
421
|
-
t === v ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
class me extends Q {
|
|
425
|
-
constructor() {
|
|
426
|
-
super(...arguments), this.type = 3;
|
|
427
|
-
}
|
|
428
|
-
j(t) {
|
|
429
|
-
this.element[this.name] = t === v ? void 0 : t;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
class be extends Q {
|
|
433
|
-
constructor() {
|
|
434
|
-
super(...arguments), this.type = 4;
|
|
435
|
-
}
|
|
436
|
-
j(t) {
|
|
437
|
-
this.element.toggleAttribute(this.name, !!t && t !== v);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
class ye extends Q {
|
|
441
|
-
constructor(t, e, i, r, o) {
|
|
442
|
-
super(t, e, i, r, o), this.type = 5;
|
|
443
|
-
}
|
|
444
|
-
_$AI(t, e = this) {
|
|
445
|
-
if ((t = O(this, t, e, 0) ?? v) === C) return;
|
|
446
|
-
const i = this._$AH, r = t === v && i !== v || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== v && (i === v || r);
|
|
447
|
-
r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
448
|
-
}
|
|
449
|
-
handleEvent(t) {
|
|
450
|
-
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
class ge {
|
|
454
|
-
constructor(t, e, i) {
|
|
455
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
456
|
-
}
|
|
457
|
-
get _$AU() {
|
|
458
|
-
return this._$AM._$AU;
|
|
459
|
-
}
|
|
460
|
-
_$AI(t) {
|
|
461
|
-
O(this, t);
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
const _e = { I: M }, $e = bt.litHtmlPolyfillSupport;
|
|
465
|
-
$e?.(B, M), (bt.litHtmlVersions ??= []).push("3.3.1");
|
|
466
|
-
const xe = (s, t, e) => {
|
|
467
|
-
const i = e?.renderBefore ?? t;
|
|
468
|
-
let r = i._$litPart$;
|
|
469
|
-
if (r === void 0) {
|
|
470
|
-
const o = e?.renderBefore ?? null;
|
|
471
|
-
i._$litPart$ = r = new M(t.insertBefore(H(), o), o, void 0, e ?? {});
|
|
472
|
-
}
|
|
473
|
-
return r._$AI(s), r;
|
|
474
|
-
};
|
|
475
|
-
const gt = globalThis;
|
|
476
|
-
let g = class extends k {
|
|
477
|
-
constructor() {
|
|
478
|
-
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
479
|
-
}
|
|
480
|
-
createRenderRoot() {
|
|
481
|
-
const t = super.createRenderRoot();
|
|
482
|
-
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
483
|
-
}
|
|
484
|
-
update(t) {
|
|
485
|
-
const e = this.render();
|
|
486
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = xe(e, this.renderRoot, this.renderOptions);
|
|
487
|
-
}
|
|
488
|
-
connectedCallback() {
|
|
489
|
-
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
490
|
-
}
|
|
491
|
-
disconnectedCallback() {
|
|
492
|
-
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
493
|
-
}
|
|
494
|
-
render() {
|
|
495
|
-
return C;
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
g._$litElement$ = !0, g.finalized = !0, gt.litElementHydrateSupport?.({ LitElement: g });
|
|
499
|
-
const Ae = gt.litElementPolyfillSupport;
|
|
500
|
-
Ae?.({ LitElement: g });
|
|
501
|
-
(gt.litElementVersions ??= []).push("4.2.1");
|
|
502
|
-
const S = (s) => (t, e) => {
|
|
503
|
-
e !== void 0 ? e.addInitializer((() => {
|
|
504
|
-
customElements.define(s, t);
|
|
505
|
-
})) : customElements.define(s, t);
|
|
506
|
-
};
|
|
507
|
-
const we = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged: mt }, Ce = (s = we, t, e) => {
|
|
508
|
-
const { kind: i, metadata: r } = e;
|
|
509
|
-
let o = globalThis.litPropertyMetadata.get(r);
|
|
510
|
-
if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), o.set(e.name, s), i === "accessor") {
|
|
511
|
-
const { name: a } = e;
|
|
512
|
-
return { set(l) {
|
|
513
|
-
const n = t.get.call(this);
|
|
514
|
-
t.set.call(this, l), this.requestUpdate(a, n, s);
|
|
515
|
-
}, init(l) {
|
|
516
|
-
return l !== void 0 && this.C(a, void 0, s, l), l;
|
|
517
|
-
} };
|
|
518
|
-
}
|
|
519
|
-
if (i === "setter") {
|
|
520
|
-
const { name: a } = e;
|
|
521
|
-
return function(l) {
|
|
522
|
-
const n = this[a];
|
|
523
|
-
t.call(this, l), this.requestUpdate(a, n, s);
|
|
524
|
-
};
|
|
525
|
-
}
|
|
526
|
-
throw Error("Unsupported decorator location: " + i);
|
|
527
|
-
};
|
|
528
|
-
function m(s) {
|
|
529
|
-
return (t, e) => typeof e == "object" ? Ce(s, t, e) : ((i, r, o) => {
|
|
530
|
-
const a = r.hasOwnProperty(o);
|
|
531
|
-
return r.constructor.createProperty(o, i), a ? Object.getOwnPropertyDescriptor(r, o) : void 0;
|
|
532
|
-
})(s, t, e);
|
|
533
|
-
}
|
|
534
|
-
function F(s) {
|
|
535
|
-
return m({ ...s, state: !0, attribute: !1 });
|
|
536
|
-
}
|
|
537
|
-
const _t = (s, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(s, t, e), e);
|
|
538
|
-
function tt(s, t) {
|
|
539
|
-
return (e, i, r) => {
|
|
540
|
-
const o = (a) => a.renderRoot?.querySelector(s) ?? null;
|
|
541
|
-
return _t(e, i, { get() {
|
|
542
|
-
return o(this);
|
|
543
|
-
} });
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
function jt(s) {
|
|
547
|
-
return (t, e) => {
|
|
548
|
-
const { slot: i, selector: r } = s ?? {}, o = "slot" + (i ? `[name=${i}]` : ":not([name])");
|
|
549
|
-
return _t(t, e, { get() {
|
|
550
|
-
const a = this.renderRoot?.querySelector(o), l = a?.assignedElements(s) ?? [];
|
|
551
|
-
return r === void 0 ? l : l.filter(((n) => n.matches(r)));
|
|
552
|
-
} });
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
function Ee(s) {
|
|
556
|
-
return (t, e) => {
|
|
557
|
-
const { slot: i } = s ?? {}, r = "slot" + (i ? `[name=${i}]` : ":not([name])");
|
|
558
|
-
return _t(t, e, { get() {
|
|
559
|
-
return this.renderRoot?.querySelector(r)?.assignedNodes(s) ?? [];
|
|
560
|
-
} });
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
const Wt = { ATTRIBUTE: 1, CHILD: 2 }, Vt = (s) => (...t) => ({ _$litDirective$: s, values: t });
|
|
564
|
-
class Gt {
|
|
565
|
-
constructor(t) {
|
|
566
|
-
}
|
|
567
|
-
get _$AU() {
|
|
568
|
-
return this._$AM._$AU;
|
|
569
|
-
}
|
|
570
|
-
_$AT(t, e, i) {
|
|
571
|
-
this._$Ct = t, this._$AM = e, this._$Ci = i;
|
|
572
|
-
}
|
|
573
|
-
_$AS(t, e) {
|
|
574
|
-
return this.update(t, e);
|
|
575
|
-
}
|
|
576
|
-
update(t, e) {
|
|
577
|
-
return this.render(...e);
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
const { I: Se } = _e, Mt = () => document.createComment(""), D = (s, t, e) => {
|
|
581
|
-
const i = s._$AA.parentNode, r = t === void 0 ? s._$AB : t._$AA;
|
|
582
|
-
if (e === void 0) {
|
|
583
|
-
const o = i.insertBefore(Mt(), r), a = i.insertBefore(Mt(), r);
|
|
584
|
-
e = new Se(o, a, s, s.options);
|
|
585
|
-
} else {
|
|
586
|
-
const o = e._$AB.nextSibling, a = e._$AM, l = a !== s;
|
|
587
|
-
if (l) {
|
|
588
|
-
let n;
|
|
589
|
-
e._$AQ?.(s), e._$AM = s, e._$AP !== void 0 && (n = s._$AU) !== a._$AU && e._$AP(n);
|
|
590
|
-
}
|
|
591
|
-
if (o !== r || l) {
|
|
592
|
-
let n = e._$AA;
|
|
593
|
-
for (; n !== o; ) {
|
|
594
|
-
const d = n.nextSibling;
|
|
595
|
-
i.insertBefore(n, r), n = d;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
return e;
|
|
600
|
-
}, I = (s, t, e = s) => (s._$AI(t, e), s), Te = {}, Ie = (s, t = Te) => s._$AH = t, Pe = (s) => s._$AH, st = (s) => {
|
|
601
|
-
s._$AR(), s._$AA.remove();
|
|
602
|
-
};
|
|
603
|
-
const Nt = (s, t, e) => {
|
|
604
|
-
const i = /* @__PURE__ */ new Map();
|
|
605
|
-
for (let r = t; r <= e; r++) i.set(s[r], r);
|
|
606
|
-
return i;
|
|
607
|
-
}, Re = Vt(class extends Gt {
|
|
608
|
-
constructor(s) {
|
|
609
|
-
if (super(s), s.type !== Wt.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
610
|
-
}
|
|
611
|
-
dt(s, t, e) {
|
|
612
|
-
let i;
|
|
613
|
-
e === void 0 ? e = t : t !== void 0 && (i = t);
|
|
614
|
-
const r = [], o = [];
|
|
615
|
-
let a = 0;
|
|
616
|
-
for (const l of s) r[a] = i ? i(l, a) : a, o[a] = e(l, a), a++;
|
|
617
|
-
return { values: o, keys: r };
|
|
618
|
-
}
|
|
619
|
-
render(s, t, e) {
|
|
620
|
-
return this.dt(s, t, e).values;
|
|
621
|
-
}
|
|
622
|
-
update(s, [t, e, i]) {
|
|
623
|
-
const r = Pe(s), { values: o, keys: a } = this.dt(t, e, i);
|
|
624
|
-
if (!Array.isArray(r)) return this.ut = a, o;
|
|
625
|
-
const l = this.ut ??= [], n = [];
|
|
626
|
-
let d, p, c = 0, f = r.length - 1, u = 0, b = o.length - 1;
|
|
627
|
-
for (; c <= f && u <= b; ) if (r[c] === null) c++;
|
|
628
|
-
else if (r[f] === null) f--;
|
|
629
|
-
else if (l[c] === a[u]) n[u] = I(r[c], o[u]), c++, u++;
|
|
630
|
-
else if (l[f] === a[b]) n[b] = I(r[f], o[b]), f--, b--;
|
|
631
|
-
else if (l[c] === a[b]) n[b] = I(r[c], o[b]), D(s, n[b + 1], r[c]), c++, b--;
|
|
632
|
-
else if (l[f] === a[u]) n[u] = I(r[f], o[u]), D(s, r[c], r[f]), f--, u++;
|
|
633
|
-
else if (d === void 0 && (d = Nt(a, u, b), p = Nt(l, c, f)), d.has(l[c])) if (d.has(l[f])) {
|
|
634
|
-
const x = p.get(a[u]), it = x !== void 0 ? r[x] : null;
|
|
635
|
-
if (it === null) {
|
|
636
|
-
const At = D(s, r[c]);
|
|
637
|
-
I(At, o[u]), n[u] = At;
|
|
638
|
-
} else n[u] = I(it, o[u]), D(s, r[c], it), r[x] = null;
|
|
639
|
-
u++;
|
|
640
|
-
} else st(r[f]), f--;
|
|
641
|
-
else st(r[c]), c++;
|
|
642
|
-
for (; u <= b; ) {
|
|
643
|
-
const x = D(s, n[b + 1]);
|
|
644
|
-
I(x, o[u]), n[u++] = x;
|
|
645
|
-
}
|
|
646
|
-
for (; c <= f; ) {
|
|
647
|
-
const x = r[c++];
|
|
648
|
-
x !== null && st(x);
|
|
649
|
-
}
|
|
650
|
-
return this.ut = a, Ie(s, n), C;
|
|
651
|
-
}
|
|
652
|
-
});
|
|
653
|
-
function h(s, t, e, i) {
|
|
654
|
-
var r = arguments.length, o = r < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, e) : i, a;
|
|
655
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(s, t, e, i);
|
|
656
|
-
else for (var l = s.length - 1; l >= 0; l--) (a = s[l]) && (o = (r < 3 ? a(o) : r > 3 ? a(t, e, o) : a(t, e)) || o);
|
|
657
|
-
return r > 3 && o && Object.defineProperty(t, e, o), o;
|
|
658
|
-
}
|
|
659
|
-
class ke extends g {
|
|
660
|
-
render() {
|
|
661
|
-
return A`<slot></slot>`;
|
|
662
|
-
}
|
|
663
|
-
connectedCallback() {
|
|
664
|
-
if (super.connectedCallback(), this.getAttribute("aria-hidden") === "false") {
|
|
665
|
-
this.removeAttribute("aria-hidden");
|
|
666
|
-
return;
|
|
667
|
-
}
|
|
668
|
-
this.setAttribute("aria-hidden", "true");
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
const Oe = $`:host{font-size:var(--mdif4-icon-size, 24px);width:var(--mdif4-icon-size, 24px);height:var(--mdif4-icon-size, 24px);color:inherit;font-variation-settings:inherit;font-weight:400;font-family:var(--mdif4-icon-font, Material Symbols Outlined);display:inline-flex;font-style:normal;place-items:center;place-content:center;line-height:1;overflow:hidden;letter-spacing:normal;text-transform:none;user-select:none;white-space:nowrap;word-wrap:normal;flex-shrink:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}::slotted(svg){fill:currentColor}::slotted(*){height:100%;width:100%}
|
|
672
|
-
`;
|
|
673
|
-
let at = class extends ke {
|
|
674
|
-
};
|
|
675
|
-
at.styles = [Oe];
|
|
676
|
-
at = h([
|
|
677
|
-
S("mdif4-icon")
|
|
678
|
-
], at);
|
|
679
|
-
class et extends g {
|
|
680
|
-
constructor() {
|
|
681
|
-
super(...arguments), this.inset = !1, this.insetStart = !1, this.insetEnd = !1;
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
h([
|
|
685
|
-
m({ type: Boolean, reflect: !0 })
|
|
686
|
-
], et.prototype, "inset", void 0);
|
|
687
|
-
h([
|
|
688
|
-
m({ type: Boolean, reflect: !0, attribute: "inset-start" })
|
|
689
|
-
], et.prototype, "insetStart", void 0);
|
|
690
|
-
h([
|
|
691
|
-
m({ type: Boolean, reflect: !0, attribute: "inset-end" })
|
|
692
|
-
], et.prototype, "insetEnd", void 0);
|
|
693
|
-
const Me = $`:host{box-sizing:border-box;color:var(--mdif4-divider-color, var(--mdif4-sys-color-outline-variant, #cac4d0));display:flex;height:var(--mdif4-divider-thickness, 1px);width:100%}:host([inset]),:host([inset-start]){padding-inline-start:16px}:host([inset]),:host([inset-end]){padding-inline-end:16px}:host::before{background:currentColor;content:"";height:100%;width:100%}@media(forced-colors: active){:host::before{background:CanvasText}}
|
|
694
|
-
`;
|
|
695
|
-
let nt = class extends et {
|
|
696
|
-
};
|
|
697
|
-
nt.styles = [Me];
|
|
698
|
-
nt = h([
|
|
699
|
-
S("mdif4-divider")
|
|
700
|
-
], nt);
|
|
701
|
-
class Ne extends g {
|
|
702
|
-
connectedCallback() {
|
|
703
|
-
super.connectedCallback(), this.setAttribute("aria-hidden", "true");
|
|
704
|
-
}
|
|
705
|
-
render() {
|
|
706
|
-
return A`<span class="shadow"></span>`;
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
const ze = $`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--mdif4-elevation-level, 0);--_shadow-color: var(--mdif4-elevation-shadow-color, var(--mdif4-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}
|
|
710
|
-
`;
|
|
711
|
-
let lt = class extends Ne {
|
|
712
|
-
};
|
|
713
|
-
lt.styles = [ze];
|
|
714
|
-
lt = h([
|
|
715
|
-
S("mdif4-elevation")
|
|
716
|
-
], lt);
|
|
717
|
-
const Kt = /* @__PURE__ */ Symbol("attachableController");
|
|
718
|
-
let qt;
|
|
719
|
-
qt = new MutationObserver((s) => {
|
|
720
|
-
for (const t of s)
|
|
721
|
-
t.target[Kt]?.hostConnected();
|
|
722
|
-
});
|
|
723
|
-
class Yt {
|
|
724
|
-
get htmlFor() {
|
|
725
|
-
return this.host.getAttribute("for");
|
|
726
|
-
}
|
|
727
|
-
set htmlFor(t) {
|
|
728
|
-
t === null ? this.host.removeAttribute("for") : this.host.setAttribute("for", t);
|
|
729
|
-
}
|
|
730
|
-
get control() {
|
|
731
|
-
return this.host.hasAttribute("for") ? !this.htmlFor || !this.host.isConnected ? null : this.host.getRootNode().querySelector(`#${this.htmlFor}`) : this.currentControl || this.host.parentElement;
|
|
732
|
-
}
|
|
733
|
-
set control(t) {
|
|
734
|
-
t ? this.attach(t) : this.detach();
|
|
735
|
-
}
|
|
736
|
-
/**
|
|
737
|
-
* Creates a new controller for an `Attachable` element.
|
|
738
|
-
*
|
|
739
|
-
* @param host The `Attachable` element.
|
|
740
|
-
* @param onControlChange A callback with two parameters for the previous and
|
|
741
|
-
* next control. An `Attachable` element may perform setup or teardown
|
|
742
|
-
* logic whenever the control changes.
|
|
743
|
-
*/
|
|
744
|
-
constructor(t, e) {
|
|
745
|
-
this.host = t, this.onControlChange = e, this.currentControl = null, t.addController(this), t[Kt] = this, qt?.observe(t, { attributeFilter: ["for"] });
|
|
746
|
-
}
|
|
747
|
-
attach(t) {
|
|
748
|
-
t !== this.currentControl && (this.setCurrentControl(t), this.host.removeAttribute("for"));
|
|
749
|
-
}
|
|
750
|
-
detach() {
|
|
751
|
-
this.setCurrentControl(null), this.host.setAttribute("for", "");
|
|
752
|
-
}
|
|
753
|
-
/** @private */
|
|
754
|
-
hostConnected() {
|
|
755
|
-
this.setCurrentControl(this.control);
|
|
756
|
-
}
|
|
757
|
-
/** @private */
|
|
758
|
-
hostDisconnected() {
|
|
759
|
-
this.setCurrentControl(null);
|
|
760
|
-
}
|
|
761
|
-
setCurrentControl(t) {
|
|
762
|
-
this.onControlChange(this.currentControl, t), this.currentControl = t;
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
const De = ["focusin", "focusout", "pointerdown"];
|
|
766
|
-
class $t extends g {
|
|
767
|
-
constructor() {
|
|
768
|
-
super(...arguments), this.visible = !1, this.inward = !1, this.attachableController = new Yt(this, this.onControlChange.bind(this));
|
|
769
|
-
}
|
|
770
|
-
get htmlFor() {
|
|
771
|
-
return this.attachableController.htmlFor;
|
|
772
|
-
}
|
|
773
|
-
set htmlFor(t) {
|
|
774
|
-
this.attachableController.htmlFor = t;
|
|
775
|
-
}
|
|
776
|
-
get control() {
|
|
777
|
-
return this.attachableController.control;
|
|
778
|
-
}
|
|
779
|
-
set control(t) {
|
|
780
|
-
this.attachableController.control = t;
|
|
781
|
-
}
|
|
782
|
-
attach(t) {
|
|
783
|
-
this.attachableController.attach(t);
|
|
784
|
-
}
|
|
785
|
-
detach() {
|
|
786
|
-
this.attachableController.detach();
|
|
787
|
-
}
|
|
788
|
-
connectedCallback() {
|
|
789
|
-
super.connectedCallback(), this.setAttribute("aria-hidden", "true");
|
|
790
|
-
}
|
|
791
|
-
/** @private */
|
|
792
|
-
handleEvent(t) {
|
|
793
|
-
if (!t[zt]) {
|
|
794
|
-
switch (t.type) {
|
|
795
|
-
default:
|
|
796
|
-
return;
|
|
797
|
-
case "focusin":
|
|
798
|
-
this.visible = this.control?.matches(":focus-visible") ?? !1;
|
|
799
|
-
break;
|
|
800
|
-
case "focusout":
|
|
801
|
-
case "pointerdown":
|
|
802
|
-
this.visible = !1;
|
|
803
|
-
break;
|
|
804
|
-
}
|
|
805
|
-
t[zt] = !0;
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
onControlChange(t, e) {
|
|
809
|
-
for (const i of De)
|
|
810
|
-
t?.removeEventListener(i, this), e?.addEventListener(i, this);
|
|
811
|
-
}
|
|
812
|
-
update(t) {
|
|
813
|
-
t.has("visible") && this.dispatchEvent(new Event("visibility-changed")), super.update(t);
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
h([
|
|
817
|
-
m({ type: Boolean, reflect: !0 })
|
|
818
|
-
], $t.prototype, "visible", void 0);
|
|
819
|
-
h([
|
|
820
|
-
m({ type: Boolean, reflect: !0 })
|
|
821
|
-
], $t.prototype, "inward", void 0);
|
|
822
|
-
const zt = /* @__PURE__ */ Symbol("handledByFocusRing");
|
|
823
|
-
const Ue = $`:host{animation-delay:0s,calc(var(--mdif4-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--mdif4-focus-ring-duration, 600ms)*.25),calc(var(--mdif4-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--mdif4-focus-ring-color, var(--mdif4-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--mdif4-focus-ring-shape-end-end, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) + var(--mdif4-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--mdif4-focus-ring-shape-end-start, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) + var(--mdif4-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--mdif4-focus-ring-shape-start-end, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) + var(--mdif4-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--mdif4-focus-ring-shape-start-start, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) + var(--mdif4-focus-ring-outward-offset, 2px));inset:calc(-1*var(--mdif4-focus-ring-outward-offset, 2px));outline:var(--mdif4-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--mdif4-focus-ring-shape-end-end, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) - var(--mdif4-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--mdif4-focus-ring-shape-end-start, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) - var(--mdif4-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--mdif4-focus-ring-shape-start-end, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) - var(--mdif4-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--mdif4-focus-ring-shape-start-start, var(--mdif4-focus-ring-shape, var(--mdif4-sys-shape-corner-full, 9999px))) - var(--mdif4-focus-ring-inward-offset, 0px));border:var(--mdif4-focus-ring-width, 3px) solid currentColor;inset:var(--mdif4-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--mdif4-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--mdif4-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--mdif4-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--mdif4-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
|
|
824
|
-
`;
|
|
825
|
-
let ct = class extends $t {
|
|
826
|
-
};
|
|
827
|
-
ct.styles = [Ue];
|
|
828
|
-
ct = h([
|
|
829
|
-
S("mdif4-focus-ring")
|
|
830
|
-
], ct);
|
|
831
|
-
const Zt = Vt(class extends Gt {
|
|
832
|
-
constructor(s) {
|
|
833
|
-
if (super(s), s.type !== Wt.ATTRIBUTE || s.name !== "class" || s.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
834
|
-
}
|
|
835
|
-
render(s) {
|
|
836
|
-
return " " + Object.keys(s).filter(((t) => s[t])).join(" ") + " ";
|
|
837
|
-
}
|
|
838
|
-
update(s, [t]) {
|
|
839
|
-
if (this.st === void 0) {
|
|
840
|
-
this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter(((i) => i !== ""))));
|
|
841
|
-
for (const i in t) t[i] && !this.nt?.has(i) && this.st.add(i);
|
|
842
|
-
return this.render(t);
|
|
843
|
-
}
|
|
844
|
-
const e = s.element.classList;
|
|
845
|
-
for (const i of this.st) i in t || (e.remove(i), this.st.delete(i));
|
|
846
|
-
for (const i in t) {
|
|
847
|
-
const r = !!t[i];
|
|
848
|
-
r === this.st.has(i) || this.nt?.has(i) || (r ? (e.add(i), this.st.add(i)) : (e.remove(i), this.st.delete(i)));
|
|
849
|
-
}
|
|
850
|
-
return C;
|
|
851
|
-
}
|
|
852
|
-
});
|
|
853
|
-
const Xt = {
|
|
854
|
-
STANDARD: "cubic-bezier(0.2, 0, 0, 1)",
|
|
855
|
-
EMPHASIZED: "cubic-bezier(.3,0,0,1)"
|
|
856
|
-
};
|
|
857
|
-
const He = 450, Dt = 225, Le = 0.2, Be = 10, Fe = 75, je = 0.35, We = "::after", Ve = "forwards";
|
|
858
|
-
var y;
|
|
859
|
-
(function(s) {
|
|
860
|
-
s[s.INACTIVE = 0] = "INACTIVE", s[s.TOUCH_DELAY = 1] = "TOUCH_DELAY", s[s.HOLDING = 2] = "HOLDING", s[s.WAITING_FOR_CLICK = 3] = "WAITING_FOR_CLICK";
|
|
861
|
-
})(y || (y = {}));
|
|
862
|
-
const Ge = [
|
|
863
|
-
"click",
|
|
864
|
-
"contextmenu",
|
|
865
|
-
"pointercancel",
|
|
866
|
-
"pointerdown",
|
|
867
|
-
"pointerenter",
|
|
868
|
-
"pointerleave",
|
|
869
|
-
"pointerup"
|
|
870
|
-
], Ke = 150, qe = window.matchMedia("(forced-colors: active)");
|
|
871
|
-
class j extends g {
|
|
872
|
-
constructor() {
|
|
873
|
-
super(...arguments), this.disabled = !1, this.hovered = !1, this.pressed = !1, this.rippleSize = "", this.rippleScale = "", this.initialSize = 0, this.state = y.INACTIVE, this.attachableController = new Yt(this, this.onControlChange.bind(this));
|
|
874
|
-
}
|
|
875
|
-
get htmlFor() {
|
|
876
|
-
return this.attachableController.htmlFor;
|
|
877
|
-
}
|
|
878
|
-
set htmlFor(t) {
|
|
879
|
-
this.attachableController.htmlFor = t;
|
|
880
|
-
}
|
|
881
|
-
get control() {
|
|
882
|
-
return this.attachableController.control;
|
|
883
|
-
}
|
|
884
|
-
set control(t) {
|
|
885
|
-
this.attachableController.control = t;
|
|
886
|
-
}
|
|
887
|
-
attach(t) {
|
|
888
|
-
this.attachableController.attach(t);
|
|
889
|
-
}
|
|
890
|
-
detach() {
|
|
891
|
-
this.attachableController.detach();
|
|
892
|
-
}
|
|
893
|
-
connectedCallback() {
|
|
894
|
-
super.connectedCallback(), this.setAttribute("aria-hidden", "true");
|
|
895
|
-
}
|
|
896
|
-
render() {
|
|
897
|
-
const t = {
|
|
898
|
-
hovered: this.hovered,
|
|
899
|
-
pressed: this.pressed
|
|
900
|
-
};
|
|
901
|
-
return A`<div class="surface ${Zt(t)}"></div>`;
|
|
902
|
-
}
|
|
903
|
-
update(t) {
|
|
904
|
-
t.has("disabled") && this.disabled && (this.hovered = !1, this.pressed = !1), super.update(t);
|
|
905
|
-
}
|
|
906
|
-
/**
|
|
907
|
-
* TODO(b/269799771): make private
|
|
908
|
-
* @private only public for slider
|
|
909
|
-
*/
|
|
910
|
-
handlePointerenter(t) {
|
|
911
|
-
this.shouldReactToEvent(t) && (this.hovered = !0);
|
|
912
|
-
}
|
|
913
|
-
/**
|
|
914
|
-
* TODO(b/269799771): make private
|
|
915
|
-
* @private only public for slider
|
|
916
|
-
*/
|
|
917
|
-
handlePointerleave(t) {
|
|
918
|
-
this.shouldReactToEvent(t) && (this.hovered = !1, this.state !== y.INACTIVE && this.endPressAnimation());
|
|
919
|
-
}
|
|
920
|
-
handlePointerup(t) {
|
|
921
|
-
if (this.shouldReactToEvent(t)) {
|
|
922
|
-
if (this.state === y.HOLDING) {
|
|
923
|
-
this.state = y.WAITING_FOR_CLICK;
|
|
924
|
-
return;
|
|
925
|
-
}
|
|
926
|
-
if (this.state === y.TOUCH_DELAY) {
|
|
927
|
-
this.state = y.WAITING_FOR_CLICK, this.startPressAnimation(this.rippleStartEvent);
|
|
928
|
-
return;
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
async handlePointerdown(t) {
|
|
933
|
-
if (this.shouldReactToEvent(t)) {
|
|
934
|
-
if (this.rippleStartEvent = t, !this.isTouch(t)) {
|
|
935
|
-
this.state = y.WAITING_FOR_CLICK, this.startPressAnimation(t);
|
|
936
|
-
return;
|
|
937
|
-
}
|
|
938
|
-
this.state = y.TOUCH_DELAY, await new Promise((e) => {
|
|
939
|
-
setTimeout(e, Ke);
|
|
940
|
-
}), this.state === y.TOUCH_DELAY && (this.state = y.HOLDING, this.startPressAnimation(t));
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
handleClick() {
|
|
944
|
-
if (!this.disabled) {
|
|
945
|
-
if (this.state === y.WAITING_FOR_CLICK) {
|
|
946
|
-
this.endPressAnimation();
|
|
947
|
-
return;
|
|
948
|
-
}
|
|
949
|
-
this.state === y.INACTIVE && (this.startPressAnimation(), this.endPressAnimation());
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
handlePointercancel(t) {
|
|
953
|
-
this.shouldReactToEvent(t) && this.endPressAnimation();
|
|
954
|
-
}
|
|
955
|
-
handleContextmenu() {
|
|
956
|
-
this.disabled || this.endPressAnimation();
|
|
957
|
-
}
|
|
958
|
-
determineRippleSize() {
|
|
959
|
-
const { height: t, width: e } = this.getBoundingClientRect(), i = Math.max(t, e), r = Math.max(je * i, Fe), o = this.currentCSSZoom ?? 1, a = Math.floor(i * Le / o), n = Math.sqrt(e ** 2 + t ** 2) + Be;
|
|
960
|
-
this.initialSize = a;
|
|
961
|
-
const d = (n + r) / a;
|
|
962
|
-
this.rippleScale = `${d / o}`, this.rippleSize = `${a}px`;
|
|
963
|
-
}
|
|
964
|
-
getNormalizedPointerEventCoords(t) {
|
|
965
|
-
const { scrollX: e, scrollY: i } = window, { left: r, top: o } = this.getBoundingClientRect(), a = e + r, l = i + o, { pageX: n, pageY: d } = t, p = this.currentCSSZoom ?? 1;
|
|
966
|
-
return {
|
|
967
|
-
x: (n - a) / p,
|
|
968
|
-
y: (d - l) / p
|
|
969
|
-
};
|
|
970
|
-
}
|
|
971
|
-
getTranslationCoordinates(t) {
|
|
972
|
-
const { height: e, width: i } = this.getBoundingClientRect(), r = this.currentCSSZoom ?? 1, o = {
|
|
973
|
-
x: (i / r - this.initialSize) / 2,
|
|
974
|
-
y: (e / r - this.initialSize) / 2
|
|
975
|
-
};
|
|
976
|
-
let a;
|
|
977
|
-
return t instanceof PointerEvent ? a = this.getNormalizedPointerEventCoords(t) : a = {
|
|
978
|
-
x: i / r / 2,
|
|
979
|
-
y: e / r / 2
|
|
980
|
-
}, a = {
|
|
981
|
-
x: a.x - this.initialSize / 2,
|
|
982
|
-
y: a.y - this.initialSize / 2
|
|
983
|
-
}, { startPoint: a, endPoint: o };
|
|
984
|
-
}
|
|
985
|
-
startPressAnimation(t) {
|
|
986
|
-
if (!this.mdRoot)
|
|
987
|
-
return;
|
|
988
|
-
this.pressed = !0, this.growAnimation?.cancel(), this.determineRippleSize();
|
|
989
|
-
const { startPoint: e, endPoint: i } = this.getTranslationCoordinates(t), r = `${e.x}px, ${e.y}px`, o = `${i.x}px, ${i.y}px`;
|
|
990
|
-
this.growAnimation = this.mdRoot.animate({
|
|
991
|
-
top: [0, 0],
|
|
992
|
-
left: [0, 0],
|
|
993
|
-
height: [this.rippleSize, this.rippleSize],
|
|
994
|
-
width: [this.rippleSize, this.rippleSize],
|
|
995
|
-
transform: [
|
|
996
|
-
`translate(${r}) scale(1)`,
|
|
997
|
-
`translate(${o}) scale(${this.rippleScale})`
|
|
998
|
-
]
|
|
999
|
-
}, {
|
|
1000
|
-
pseudoElement: We,
|
|
1001
|
-
duration: He,
|
|
1002
|
-
easing: Xt.STANDARD,
|
|
1003
|
-
fill: Ve
|
|
1004
|
-
});
|
|
1005
|
-
}
|
|
1006
|
-
async endPressAnimation() {
|
|
1007
|
-
this.rippleStartEvent = void 0, this.state = y.INACTIVE;
|
|
1008
|
-
const t = this.growAnimation;
|
|
1009
|
-
let e = 1 / 0;
|
|
1010
|
-
if (typeof t?.currentTime == "number" ? e = t.currentTime : t?.currentTime && (e = t.currentTime.to("ms").value), e >= Dt) {
|
|
1011
|
-
this.pressed = !1;
|
|
1012
|
-
return;
|
|
1013
|
-
}
|
|
1014
|
-
await new Promise((i) => {
|
|
1015
|
-
setTimeout(i, Dt - e);
|
|
1016
|
-
}), this.growAnimation === t && (this.pressed = !1);
|
|
1017
|
-
}
|
|
1018
|
-
/**
|
|
1019
|
-
* Returns `true` if
|
|
1020
|
-
* - the ripple element is enabled
|
|
1021
|
-
* - the pointer is primary for the input type
|
|
1022
|
-
* - the pointer is the pointer that started the interaction, or will start
|
|
1023
|
-
* the interaction
|
|
1024
|
-
* - the pointer is a touch, or the pointer state has the primary button
|
|
1025
|
-
* held, or the pointer is hovering
|
|
1026
|
-
*/
|
|
1027
|
-
shouldReactToEvent(t) {
|
|
1028
|
-
if (this.disabled || !t.isPrimary || this.rippleStartEvent && this.rippleStartEvent.pointerId !== t.pointerId)
|
|
1029
|
-
return !1;
|
|
1030
|
-
if (t.type === "pointerenter" || t.type === "pointerleave")
|
|
1031
|
-
return !this.isTouch(t);
|
|
1032
|
-
const e = t.buttons === 1;
|
|
1033
|
-
return this.isTouch(t) || e;
|
|
1034
|
-
}
|
|
1035
|
-
isTouch({ pointerType: t }) {
|
|
1036
|
-
return t === "touch";
|
|
1037
|
-
}
|
|
1038
|
-
/** @private */
|
|
1039
|
-
async handleEvent(t) {
|
|
1040
|
-
if (!qe?.matches)
|
|
1041
|
-
switch (t.type) {
|
|
1042
|
-
case "click":
|
|
1043
|
-
this.handleClick();
|
|
1044
|
-
break;
|
|
1045
|
-
case "contextmenu":
|
|
1046
|
-
this.handleContextmenu();
|
|
1047
|
-
break;
|
|
1048
|
-
case "pointercancel":
|
|
1049
|
-
this.handlePointercancel(t);
|
|
1050
|
-
break;
|
|
1051
|
-
case "pointerdown":
|
|
1052
|
-
await this.handlePointerdown(t);
|
|
1053
|
-
break;
|
|
1054
|
-
case "pointerenter":
|
|
1055
|
-
this.handlePointerenter(t);
|
|
1056
|
-
break;
|
|
1057
|
-
case "pointerleave":
|
|
1058
|
-
this.handlePointerleave(t);
|
|
1059
|
-
break;
|
|
1060
|
-
case "pointerup":
|
|
1061
|
-
this.handlePointerup(t);
|
|
1062
|
-
break;
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
onControlChange(t, e) {
|
|
1066
|
-
for (const i of Ge)
|
|
1067
|
-
t?.removeEventListener(i, this), e?.addEventListener(i, this);
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
h([
|
|
1071
|
-
m({ type: Boolean, reflect: !0 })
|
|
1072
|
-
], j.prototype, "disabled", void 0);
|
|
1073
|
-
h([
|
|
1074
|
-
F()
|
|
1075
|
-
], j.prototype, "hovered", void 0);
|
|
1076
|
-
h([
|
|
1077
|
-
F()
|
|
1078
|
-
], j.prototype, "pressed", void 0);
|
|
1079
|
-
h([
|
|
1080
|
-
tt(".surface")
|
|
1081
|
-
], j.prototype, "mdRoot", void 0);
|
|
1082
|
-
const Ye = $`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--mdif4-ripple-hover-color, var(--mdif4-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--mdif4-ripple-pressed-color, var(--mdif4-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--mdif4-ripple-hover-color, var(--mdif4-sys-color-on-surface, #1d1b20));opacity:var(--mdif4-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--mdif4-ripple-pressed-opacity, 0.12);transition-duration:105ms}
|
|
1083
|
-
`;
|
|
1084
|
-
let dt = class extends j {
|
|
1085
|
-
};
|
|
1086
|
-
dt.styles = [Ye];
|
|
1087
|
-
dt = h([
|
|
1088
|
-
S("mdif4-ripple")
|
|
1089
|
-
], dt);
|
|
1090
|
-
const V = /* @__PURE__ */ Symbol("isFocusable"), ot = /* @__PURE__ */ Symbol("privateIsFocusable"), G = /* @__PURE__ */ Symbol("externalTabIndex"), K = /* @__PURE__ */ Symbol("isUpdatingTabIndex"), q = /* @__PURE__ */ Symbol("updateTabIndex");
|
|
1091
|
-
function Ze(s) {
|
|
1092
|
-
var t, e, i;
|
|
1093
|
-
class r extends s {
|
|
1094
|
-
constructor() {
|
|
1095
|
-
super(...arguments), this[t] = !0, this[e] = null, this[i] = !1;
|
|
1096
|
-
}
|
|
1097
|
-
get [V]() {
|
|
1098
|
-
return this[ot];
|
|
1099
|
-
}
|
|
1100
|
-
set [V](a) {
|
|
1101
|
-
this[V] !== a && (this[ot] = a, this[q]());
|
|
1102
|
-
}
|
|
1103
|
-
connectedCallback() {
|
|
1104
|
-
super.connectedCallback(), this[q]();
|
|
1105
|
-
}
|
|
1106
|
-
attributeChangedCallback(a, l, n) {
|
|
1107
|
-
if (a !== "tabindex") {
|
|
1108
|
-
super.attributeChangedCallback(a, l, n);
|
|
1109
|
-
return;
|
|
1110
|
-
}
|
|
1111
|
-
if (this.requestUpdate("tabIndex", Number(l ?? -1)), !this[K]) {
|
|
1112
|
-
if (!this.hasAttribute("tabindex")) {
|
|
1113
|
-
this[G] = null, this[q]();
|
|
1114
|
-
return;
|
|
1115
|
-
}
|
|
1116
|
-
this[G] = this.tabIndex;
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
[(t = ot, e = G, i = K, q)]() {
|
|
1120
|
-
const a = this[V] ? 0 : -1, l = this[G] ?? a;
|
|
1121
|
-
this[K] = !0, this.tabIndex = l, this[K] = !1;
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
return h([
|
|
1125
|
-
m({ noAccessor: !0 })
|
|
1126
|
-
], r.prototype, "tabIndex", void 0), r;
|
|
1127
|
-
}
|
|
1128
|
-
const Jt = /* @__PURE__ */ Symbol("animateIndicator"), Xe = Ze(g);
|
|
1129
|
-
class _ extends Xe {
|
|
1130
|
-
/**
|
|
1131
|
-
* @deprecated use `active`
|
|
1132
|
-
*/
|
|
1133
|
-
get selected() {
|
|
1134
|
-
return this.active;
|
|
1135
|
-
}
|
|
1136
|
-
set selected(t) {
|
|
1137
|
-
this.active = t;
|
|
1138
|
-
}
|
|
1139
|
-
constructor() {
|
|
1140
|
-
super(), this.isTab = !0, this.active = !1, this.hasIcon = !1, this.iconOnly = !1, this.fullWidthIndicator = !1, this.internals = // Cast needed for closure
|
|
1141
|
-
this.attachInternals(), this.internals.role = "tab", this.addEventListener("keydown", this.handleKeydown.bind(this));
|
|
1142
|
-
}
|
|
1143
|
-
render() {
|
|
1144
|
-
const t = A`<div class="indicator"></div>`;
|
|
1145
|
-
return A`<div
|
|
1146
|
-
class="button"
|
|
1147
|
-
role="presentation"
|
|
1148
|
-
@click=${this.handleContentClick}>
|
|
1149
|
-
<mdif4-focus-ring part="focus-ring" inward .control=${this}></mdif4-focus-ring>
|
|
1150
|
-
<mdif4-elevation part="elevation"></mdif4-elevation>
|
|
1151
|
-
<mdif4-ripple .control=${this}></mdif4-ripple>
|
|
1152
|
-
<div
|
|
1153
|
-
class="content ${Zt(this.getContentClasses())}"
|
|
1154
|
-
role="presentation">
|
|
1155
|
-
<slot name="icon" @slotchange=${this.handleIconSlotChange}></slot>
|
|
1156
|
-
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
1157
|
-
${this.fullWidthIndicator ? v : t}
|
|
1158
|
-
</div>
|
|
1159
|
-
${this.fullWidthIndicator ? t : v}
|
|
1160
|
-
</div>`;
|
|
1161
|
-
}
|
|
1162
|
-
getContentClasses() {
|
|
1163
|
-
return {
|
|
1164
|
-
"has-icon": this.hasIcon,
|
|
1165
|
-
"has-label": !this.iconOnly
|
|
1166
|
-
};
|
|
1167
|
-
}
|
|
1168
|
-
updated() {
|
|
1169
|
-
this.internals.ariaSelected = String(this.active);
|
|
1170
|
-
}
|
|
1171
|
-
async handleKeydown(t) {
|
|
1172
|
-
await 0, !t.defaultPrevented && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.click());
|
|
1173
|
-
}
|
|
1174
|
-
handleContentClick(t) {
|
|
1175
|
-
t.stopPropagation(), this.click();
|
|
1176
|
-
}
|
|
1177
|
-
[Jt](t) {
|
|
1178
|
-
if (!this.indicator)
|
|
1179
|
-
return;
|
|
1180
|
-
this.indicator.getAnimations().forEach((i) => {
|
|
1181
|
-
i.cancel();
|
|
1182
|
-
});
|
|
1183
|
-
const e = this.getKeyframes(t);
|
|
1184
|
-
e !== null && this.indicator.animate(e, {
|
|
1185
|
-
duration: 250,
|
|
1186
|
-
easing: Xt.EMPHASIZED
|
|
1187
|
-
});
|
|
1188
|
-
}
|
|
1189
|
-
getKeyframes(t) {
|
|
1190
|
-
const e = Je();
|
|
1191
|
-
if (!this.active)
|
|
1192
|
-
return e ? [{ opacity: 1 }, { transform: "none" }] : null;
|
|
1193
|
-
const i = {}, r = t.indicator?.getBoundingClientRect() ?? {}, o = r.left, a = r.width, l = this.indicator.getBoundingClientRect(), n = l.left, d = l.width, p = a / d;
|
|
1194
|
-
return !e && o !== void 0 && n !== void 0 && !isNaN(p) ? i.transform = `translateX(${(o - n).toFixed(4)}px) scaleX(${p.toFixed(4)})` : i.opacity = 0, [i, { transform: "none" }];
|
|
1195
|
-
}
|
|
1196
|
-
handleSlotChange() {
|
|
1197
|
-
this.iconOnly = !1;
|
|
1198
|
-
for (const t of this.assignedDefaultNodes) {
|
|
1199
|
-
const e = t.nodeType === Node.TEXT_NODE && !!t.wholeText.match(/\S/);
|
|
1200
|
-
if (t.nodeType === Node.ELEMENT_NODE || e)
|
|
1201
|
-
return;
|
|
1202
|
-
}
|
|
1203
|
-
this.iconOnly = !0;
|
|
1204
|
-
}
|
|
1205
|
-
handleIconSlotChange() {
|
|
1206
|
-
this.hasIcon = this.assignedIcons.length > 0;
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
h([
|
|
1210
|
-
m({ type: Boolean, reflect: !0, attribute: "mdif4-tab" })
|
|
1211
|
-
], _.prototype, "isTab", void 0);
|
|
1212
|
-
h([
|
|
1213
|
-
m({ type: Boolean, reflect: !0 })
|
|
1214
|
-
], _.prototype, "active", void 0);
|
|
1215
|
-
h([
|
|
1216
|
-
m({ type: Boolean })
|
|
1217
|
-
], _.prototype, "selected", null);
|
|
1218
|
-
h([
|
|
1219
|
-
m({ type: Boolean, attribute: "has-icon" })
|
|
1220
|
-
], _.prototype, "hasIcon", void 0);
|
|
1221
|
-
h([
|
|
1222
|
-
m({ type: Boolean, attribute: "icon-only" })
|
|
1223
|
-
], _.prototype, "iconOnly", void 0);
|
|
1224
|
-
h([
|
|
1225
|
-
tt(".indicator")
|
|
1226
|
-
], _.prototype, "indicator", void 0);
|
|
1227
|
-
h([
|
|
1228
|
-
F()
|
|
1229
|
-
], _.prototype, "fullWidthIndicator", void 0);
|
|
1230
|
-
h([
|
|
1231
|
-
Ee({ flatten: !0 })
|
|
1232
|
-
], _.prototype, "assignedDefaultNodes", void 0);
|
|
1233
|
-
h([
|
|
1234
|
-
jt({ slot: "icon", flatten: !0 })
|
|
1235
|
-
], _.prototype, "assignedIcons", void 0);
|
|
1236
|
-
function Je() {
|
|
1237
|
-
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1238
|
-
}
|
|
1239
|
-
class N extends g {
|
|
1240
|
-
/**
|
|
1241
|
-
* The currently selected tab, `null` only when there are no tab children.
|
|
1242
|
-
*
|
|
1243
|
-
* @export
|
|
1244
|
-
*/
|
|
1245
|
-
get activeTab() {
|
|
1246
|
-
return this.tabs.find((t) => t.active) ?? null;
|
|
1247
|
-
}
|
|
1248
|
-
set activeTab(t) {
|
|
1249
|
-
t && this.activateTab(t);
|
|
1250
|
-
}
|
|
1251
|
-
/**
|
|
1252
|
-
* The index of the currently selected tab.
|
|
1253
|
-
*
|
|
1254
|
-
* @export
|
|
1255
|
-
*/
|
|
1256
|
-
get activeTabIndex() {
|
|
1257
|
-
return this.tabs.findIndex((t) => t.active);
|
|
1258
|
-
}
|
|
1259
|
-
set activeTabIndex(t) {
|
|
1260
|
-
const e = () => {
|
|
1261
|
-
const i = this.tabs[t];
|
|
1262
|
-
i && this.activateTab(i);
|
|
1263
|
-
};
|
|
1264
|
-
if (!this.slotElement) {
|
|
1265
|
-
this.updateComplete.then(e);
|
|
1266
|
-
return;
|
|
1267
|
-
}
|
|
1268
|
-
e();
|
|
1269
|
-
}
|
|
1270
|
-
get focusedTab() {
|
|
1271
|
-
return this.tabs.find((t) => t.matches(":focus-within"));
|
|
1272
|
-
}
|
|
1273
|
-
constructor() {
|
|
1274
|
-
super(), this.autoActivate = !1, this.internals = // Cast needed for closure
|
|
1275
|
-
this.attachInternals(), this.internals.role = "tablist", this.addEventListener("keydown", this.handleKeydown.bind(this)), this.addEventListener("keyup", this.handleKeyup.bind(this)), this.addEventListener("focusout", this.handleFocusout.bind(this));
|
|
1276
|
-
}
|
|
1277
|
-
/**
|
|
1278
|
-
* Scrolls the toolbar, if overflowing, to the active tab, or the provided
|
|
1279
|
-
* tab.
|
|
1280
|
-
*
|
|
1281
|
-
* @param tabToScrollTo The tab that should be scrolled to. Defaults to the
|
|
1282
|
-
* active tab.
|
|
1283
|
-
* @return A Promise that resolves after the tab has been scrolled to.
|
|
1284
|
-
*/
|
|
1285
|
-
async scrollToTab(t) {
|
|
1286
|
-
await this.updateComplete;
|
|
1287
|
-
const { tabs: e } = this;
|
|
1288
|
-
if (t ??= this.activeTab, !t || !e.includes(t) || !this.tabsScrollerElement)
|
|
1289
|
-
return;
|
|
1290
|
-
for (const f of this.tabs)
|
|
1291
|
-
await f.updateComplete;
|
|
1292
|
-
const i = t.offsetLeft, r = t.offsetWidth, o = this.scrollLeft, a = this.offsetWidth, l = 48, n = i - l, d = i + r - a + l, p = Math.min(n, Math.max(d, o)), c = this.focusedTab ? "auto" : "instant";
|
|
1293
|
-
this.tabsScrollerElement.scrollTo({ behavior: c, top: 0, left: p });
|
|
1294
|
-
}
|
|
1295
|
-
render() {
|
|
1296
|
-
return A`
|
|
1297
|
-
<div class="tabs">
|
|
1298
|
-
<slot
|
|
1299
|
-
@slotchange=${this.handleSlotChange}
|
|
1300
|
-
@click=${this.handleTabClick}></slot>
|
|
1301
|
-
</div>
|
|
1302
|
-
<mdif4-divider part="divider"></mdif4-divider>
|
|
1303
|
-
`;
|
|
1304
|
-
}
|
|
1305
|
-
async handleTabClick(t) {
|
|
1306
|
-
const e = t.target;
|
|
1307
|
-
await 0, !(t.defaultPrevented || !Qe(e) || e.active) && this.activateTab(e);
|
|
1308
|
-
}
|
|
1309
|
-
activateTab(t) {
|
|
1310
|
-
const { tabs: e } = this, i = this.activeTab;
|
|
1311
|
-
if (!(!e.includes(t) || i === t)) {
|
|
1312
|
-
for (const r of e)
|
|
1313
|
-
r.active = r === t;
|
|
1314
|
-
if (i) {
|
|
1315
|
-
if (!this.dispatchEvent(new Event("change", { bubbles: !0, cancelable: !0 }))) {
|
|
1316
|
-
for (const o of e)
|
|
1317
|
-
o.active = o === i;
|
|
1318
|
-
return;
|
|
1319
|
-
}
|
|
1320
|
-
t[Jt](i);
|
|
1321
|
-
}
|
|
1322
|
-
this.updateFocusableTab(t), this.scrollToTab(t);
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
updateFocusableTab(t) {
|
|
1326
|
-
for (const e of this.tabs)
|
|
1327
|
-
e.tabIndex = e === t ? 0 : -1;
|
|
1328
|
-
}
|
|
1329
|
-
// focus item on keydown and optionally select it
|
|
1330
|
-
async handleKeydown(t) {
|
|
1331
|
-
await 0;
|
|
1332
|
-
const e = t.key === "ArrowLeft", i = t.key === "ArrowRight", r = t.key === "Home", o = t.key === "End";
|
|
1333
|
-
if (t.defaultPrevented || !e && !i && !r && !o)
|
|
1334
|
-
return;
|
|
1335
|
-
const { tabs: a } = this;
|
|
1336
|
-
if (a.length < 2)
|
|
1337
|
-
return;
|
|
1338
|
-
t.preventDefault();
|
|
1339
|
-
let l;
|
|
1340
|
-
if (r || o)
|
|
1341
|
-
l = r ? 0 : a.length - 1;
|
|
1342
|
-
else {
|
|
1343
|
-
const p = getComputedStyle(this).direction === "rtl" ? e : i, { focusedTab: c } = this;
|
|
1344
|
-
if (!c)
|
|
1345
|
-
l = p ? 0 : a.length - 1;
|
|
1346
|
-
else {
|
|
1347
|
-
const f = this.tabs.indexOf(c);
|
|
1348
|
-
l = p ? f + 1 : f - 1, l >= a.length ? l = 0 : l < 0 && (l = a.length - 1);
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
const n = a[l];
|
|
1352
|
-
n.focus(), this.autoActivate ? this.activateTab(n) : this.updateFocusableTab(n);
|
|
1353
|
-
}
|
|
1354
|
-
// scroll to item on keyup.
|
|
1355
|
-
handleKeyup() {
|
|
1356
|
-
this.scrollToTab(this.focusedTab ?? this.activeTab);
|
|
1357
|
-
}
|
|
1358
|
-
handleFocusout() {
|
|
1359
|
-
if (this.matches(":focus-within"))
|
|
1360
|
-
return;
|
|
1361
|
-
const { activeTab: t } = this;
|
|
1362
|
-
t && this.updateFocusableTab(t);
|
|
1363
|
-
}
|
|
1364
|
-
handleSlotChange() {
|
|
1365
|
-
const t = this.tabs[0];
|
|
1366
|
-
!this.activeTab && t && this.activateTab(t), this.scrollToTab(this.activeTab);
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
h([
|
|
1370
|
-
jt({ flatten: !0, selector: "[mdif4-tab]" })
|
|
1371
|
-
], N.prototype, "tabs", void 0);
|
|
1372
|
-
h([
|
|
1373
|
-
m({ type: Number, attribute: "active-tab-index" })
|
|
1374
|
-
], N.prototype, "activeTabIndex", null);
|
|
1375
|
-
h([
|
|
1376
|
-
m({ type: Boolean, attribute: "auto-activate" })
|
|
1377
|
-
], N.prototype, "autoActivate", void 0);
|
|
1378
|
-
h([
|
|
1379
|
-
tt(".tabs")
|
|
1380
|
-
], N.prototype, "tabsScrollerElement", void 0);
|
|
1381
|
-
h([
|
|
1382
|
-
tt("slot")
|
|
1383
|
-
], N.prototype, "slotElement", void 0);
|
|
1384
|
-
function Qe(s) {
|
|
1385
|
-
return s instanceof HTMLElement && s.hasAttribute("mdif4-tab");
|
|
1386
|
-
}
|
|
1387
|
-
const ti = $`:host{box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;position:relative}:host([hidden]){display:none}:host::-webkit-scrollbar{display:none}.tabs{align-items:end;display:flex;height:100%;overflow:inherit;scroll-behavior:inherit;scrollbar-width:inherit;justify-content:space-between;width:100%}::slotted(*){flex:1}::slotted([active]){z-index:1}
|
|
1388
|
-
`;
|
|
1389
|
-
let ht = class extends N {
|
|
1390
|
-
};
|
|
1391
|
-
ht.styles = [ti];
|
|
1392
|
-
ht = h([
|
|
1393
|
-
S("mdif4-tabs")
|
|
1394
|
-
], ht);
|
|
1395
|
-
class Qt extends _ {
|
|
1396
|
-
constructor() {
|
|
1397
|
-
super(...arguments), this.inlineIcon = !1;
|
|
1398
|
-
}
|
|
1399
|
-
getContentClasses() {
|
|
1400
|
-
return {
|
|
1401
|
-
...super.getContentClasses(),
|
|
1402
|
-
stacked: !this.inlineIcon
|
|
1403
|
-
};
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
h([
|
|
1407
|
-
m({ type: Boolean, attribute: "inline-icon" })
|
|
1408
|
-
], Qt.prototype, "inlineIcon", void 0);
|
|
1409
|
-
const ei = $`:host{--_active-indicator-color: var(--mdif4-primary-tab-active-indicator-color, var(--mdif4-sys-color-primary, #6750a4));--_active-indicator-height: var(--mdif4-primary-tab-active-indicator-height, 3px);--_active-indicator-shape: var(--mdif4-primary-tab-active-indicator-shape, 3px 3px 0px 0px);--_active-hover-state-layer-color: var(--mdif4-primary-tab-active-hover-state-layer-color, var(--mdif4-sys-color-primary, #6750a4));--_active-hover-state-layer-opacity: var(--mdif4-primary-tab-active-hover-state-layer-opacity, 0.08);--_active-pressed-state-layer-color: var(--mdif4-primary-tab-active-pressed-state-layer-color, var(--mdif4-sys-color-primary, #6750a4));--_active-pressed-state-layer-opacity: var(--mdif4-primary-tab-active-pressed-state-layer-opacity, 0.12);--_container-color: var(--mdif4-primary-tab-container-color, var(--mdif4-sys-color-surface, #fef7ff));--_container-elevation: var(--mdif4-primary-tab-container-elevation, 0);--_container-height: var(--mdif4-primary-tab-container-height, 48px);--_with-icon-and-label-text-container-height: var(--mdif4-primary-tab-with-icon-and-label-text-container-height, 64px);--_hover-state-layer-color: var(--mdif4-primary-tab-hover-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--mdif4-primary-tab-hover-state-layer-opacity, 0.08);--_pressed-state-layer-color: var(--mdif4-primary-tab-pressed-state-layer-color, var(--mdif4-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--mdif4-primary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--mdif4-primary-tab-active-focus-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_active-hover-icon-color: var(--mdif4-primary-tab-active-hover-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_active-icon-color: var(--mdif4-primary-tab-active-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_active-pressed-icon-color: var(--mdif4-primary-tab-active-pressed-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_icon-size: var(--mdif4-primary-tab-icon-size, 24px);--_focus-icon-color: var(--mdif4-primary-tab-focus-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--mdif4-primary-tab-hover-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_icon-color: var(--mdif4-primary-tab-icon-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--mdif4-primary-tab-pressed-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_label-text-font: var(--mdif4-primary-tab-label-text-font, var(--mdif4-sys-typescale-title-small-font, var(--mdif4-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--mdif4-primary-tab-label-text-line-height, var(--mdif4-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--mdif4-primary-tab-label-text-size, var(--mdif4-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--mdif4-primary-tab-label-text-weight, var(--mdif4-sys-typescale-title-small-weight, var(--mdif4-ref-typeface-weight-medium, 500)));--_active-focus-label-text-color: var(--mdif4-primary-tab-active-focus-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_active-hover-label-text-color: var(--mdif4-primary-tab-active-hover-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_active-label-text-color: var(--mdif4-primary-tab-active-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_active-pressed-label-text-color: var(--mdif4-primary-tab-active-pressed-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_focus-label-text-color: var(--mdif4-primary-tab-focus-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--mdif4-primary-tab-hover-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_label-text-color: var(--mdif4-primary-tab-label-text-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--mdif4-primary-tab-pressed-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--mdif4-primary-tab-container-shape-start-start, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--mdif4-primary-tab-container-shape-start-end, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--mdif4-primary-tab-container-shape-end-end, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--mdif4-primary-tab-container-shape-end-start, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)))}.content.stacked{flex-direction:column;gap:2px}.content.stacked.has-icon.has-label{height:var(--_with-icon-and-label-text-container-height)}
|
|
1410
|
-
`;
|
|
1411
|
-
const te = $`:host{display:inline-flex;align-items:center;justify-content:center;outline:none;padding:0 16px;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:middle;user-select:none;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);color:var(--_label-text-color);z-index:0;--mdif4-ripple-hover-color: var(--_hover-state-layer-color);--mdif4-ripple-hover-opacity: var(--_hover-state-layer-opacity);--mdif4-ripple-pressed-color: var(--_pressed-state-layer-color);--mdif4-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);--mdif4-elevation-level: var(--_container-elevation)}mdif4-focus-ring{--mdif4-focus-ring-shape: 8px}:host([active]) mdif4-focus-ring{margin-bottom:calc(var(--_active-indicator-height) + 1px)}.button::before{background:var(--_container-color);content:"";inset:0;position:absolute;z-index:-1}.button::before,mdif4-ripple,mdif4-elevation{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start)}.content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;height:var(--_container-height);gap:8px}.indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_active-indicator-color);border-radius:var(--_active-indicator-shape);height:var(--_active-indicator-height);inset:auto 0 0 0;opacity:0}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_icon-color);font-size:var(--_icon-size);width:var(--_icon-size);height:var(--_icon-size)}:host(:hover){color:var(--_hover-label-text-color);cursor:pointer}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus){color:var(--_focus-label-text-color)}:host(:focus) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active){color:var(--_pressed-label-text-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([active]) .indicator{opacity:1}:host([active]){color:var(--_active-label-text-color);--mdif4-ripple-hover-color: var(--_active-hover-state-layer-color);--mdif4-ripple-hover-opacity: var(--_active-hover-state-layer-opacity);--mdif4-ripple-pressed-color: var(--_active-pressed-state-layer-color);--mdif4-ripple-pressed-opacity: var(--_active-pressed-state-layer-opacity)}:host([active]) ::slotted([slot=icon]){color:var(--_active-icon-color)}:host([active]:hover){color:var(--_active-hover-label-text-color)}:host([active]:hover) ::slotted([slot=icon]){color:var(--_active-hover-icon-color)}:host([active]:focus){color:var(--_active-focus-label-text-color)}:host([active]:focus) ::slotted([slot=icon]){color:var(--_active-focus-icon-color)}:host([active]:active){color:var(--_active-pressed-label-text-color)}:host([active]:active) ::slotted([slot=icon]){color:var(--_active-pressed-icon-color)}:host,::slotted(*){white-space:nowrap}@media(forced-colors: active){.indicator{background:CanvasText}}
|
|
1412
|
-
`;
|
|
1413
|
-
let pt = class extends Qt {
|
|
1414
|
-
};
|
|
1415
|
-
pt.styles = [te, ei];
|
|
1416
|
-
pt = h([
|
|
1417
|
-
S("mdif4-primary-tab")
|
|
1418
|
-
], pt);
|
|
1419
|
-
class ii extends _ {
|
|
1420
|
-
constructor() {
|
|
1421
|
-
super(...arguments), this.fullWidthIndicator = !0;
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
const ri = $`:host{--_active-indicator-color: var(--mdif4-secondary-tab-active-indicator-color, var(--mdif4-sys-color-primary, #6750a4));--_active-indicator-height: var(--mdif4-secondary-tab-active-indicator-height, 2px);--_active-label-text-color: var(--mdif4-secondary-tab-active-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_container-color: var(--mdif4-secondary-tab-container-color, var(--mdif4-sys-color-surface, #fef7ff));--_container-elevation: var(--mdif4-secondary-tab-container-elevation, 0);--_container-height: var(--mdif4-secondary-tab-container-height, 48px);--_focus-label-text-color: var(--mdif4-secondary-tab-focus-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--mdif4-secondary-tab-hover-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--mdif4-secondary-tab-hover-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--mdif4-secondary-tab-hover-state-layer-opacity, 0.08);--_label-text-font: var(--mdif4-secondary-tab-label-text-font, var(--mdif4-sys-typescale-title-small-font, var(--mdif4-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--mdif4-secondary-tab-label-text-line-height, var(--mdif4-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--mdif4-secondary-tab-label-text-size, var(--mdif4-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--mdif4-secondary-tab-label-text-weight, var(--mdif4-sys-typescale-title-small-weight, var(--mdif4-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--mdif4-secondary-tab-pressed-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--mdif4-secondary-tab-pressed-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--mdif4-secondary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--mdif4-secondary-tab-active-focus-icon-color, );--_active-focus-label-text-color: var(--mdif4-secondary-tab-active-focus-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--mdif4-secondary-tab-active-hover-icon-color, );--_active-hover-label-text-color: var(--mdif4-secondary-tab-active-hover-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--mdif4-secondary-tab-active-hover-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-opacity: var(--mdif4-secondary-tab-active-hover-state-layer-opacity, 0.08);--_active-icon-color: var(--mdif4-secondary-tab-active-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-indicator-shape: var(--mdif4-secondary-tab-active-indicator-shape, 0);--_active-pressed-icon-color: var(--mdif4-secondary-tab-active-pressed-icon-color, );--_active-pressed-label-text-color: var(--mdif4-secondary-tab-active-pressed-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--mdif4-secondary-tab-active-pressed-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-opacity: var(--mdif4-secondary-tab-active-pressed-state-layer-opacity, 0.12);--_label-text-color: var(--mdif4-secondary-tab-label-text-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--mdif4-secondary-tab-focus-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--mdif4-secondary-tab-hover-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_icon-size: var(--mdif4-secondary-tab-icon-size, 24px);--_icon-color: var(--mdif4-secondary-tab-icon-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--mdif4-secondary-tab-pressed-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--mdif4-secondary-tab-container-shape-start-start, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--mdif4-secondary-tab-container-shape-start-end, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--mdif4-secondary-tab-container-shape-end-end, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--mdif4-secondary-tab-container-shape-end-start, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)))}
|
|
1425
|
-
`;
|
|
1426
|
-
let ft = class extends ii {
|
|
1427
|
-
};
|
|
1428
|
-
ft.styles = [te, ri];
|
|
1429
|
-
ft = h([
|
|
1430
|
-
S("mdif4-secondary-tab")
|
|
1431
|
-
], ft);
|
|
1432
|
-
var si = Object.defineProperty, W = (s, t, e, i) => {
|
|
1433
|
-
for (var r = void 0, o = s.length - 1, a; o >= 0; o--)
|
|
1434
|
-
(a = s[o]) && (r = a(t, e, r) || r);
|
|
1435
|
-
return r && si(t, e, r), r;
|
|
1436
|
-
};
|
|
1437
|
-
const xt = class xt extends g {
|
|
1
|
+
import { LitElement as u, css as m, nothing as g, html as a } from "lit";
|
|
2
|
+
import { property as l, state as d } from "lit/decorators.js";
|
|
3
|
+
import { repeat as f } from "lit/directives/repeat.js";
|
|
4
|
+
import "@material/web/icon/icon";
|
|
5
|
+
import "@material/web/tabs/tabs";
|
|
6
|
+
import "@material/web/tabs/primary-tab";
|
|
7
|
+
import "@material/web/tabs/secondary-tab";
|
|
8
|
+
var b = Object.defineProperty, n = (c, t, e, i) => {
|
|
9
|
+
for (var s = void 0, o = c.length - 1, p; o >= 0; o--)
|
|
10
|
+
(p = c[o]) && (s = p(t, e, s) || s);
|
|
11
|
+
return s && b(t, e, s), s;
|
|
12
|
+
};
|
|
13
|
+
const h = class h extends u {
|
|
1438
14
|
constructor() {
|
|
1439
|
-
super(...arguments), this.version = "1.0.
|
|
15
|
+
super(...arguments), this.version = "1.0.12";
|
|
1440
16
|
}
|
|
1441
17
|
update(t) {
|
|
1442
18
|
t.has("theme") && this.registerTheme(this.theme), super.update(t);
|
|
@@ -1471,11 +47,11 @@ const xt = class xt extends g {
|
|
|
1471
47
|
return t.startsWith("/") ? e.startsWith(i) : e.endsWith(i) || e === i;
|
|
1472
48
|
}
|
|
1473
49
|
render() {
|
|
1474
|
-
const t = this.inputData?.style?.fontSize ?? 16, e = (this.inputData?.style?.fontSize ?? 16) * 1.5, i = this.inputData?.style?.color || this.themeTitleColor || "black",
|
|
1475
|
-
return
|
|
50
|
+
const t = this.inputData?.style?.fontSize ?? 16, e = (this.inputData?.style?.fontSize ?? 16) * 1.5, i = this.inputData?.style?.color || this.themeTitleColor || "black", s = this.inputData?.style?.backgroundColor || this.themeBgColor || "white";
|
|
51
|
+
return a`
|
|
1476
52
|
<div
|
|
1477
53
|
class="wrapper"
|
|
1478
|
-
style="background-color: ${
|
|
54
|
+
style="background-color: ${s}; color: ${i};
|
|
1479
55
|
font-weight: ${this.inputData?.style?.fontWeight};
|
|
1480
56
|
font-size: ${t}px;"
|
|
1481
57
|
>
|
|
@@ -1487,36 +63,36 @@ const xt = class xt extends g {
|
|
|
1487
63
|
>
|
|
1488
64
|
${this.inputData?.title}
|
|
1489
65
|
</h2>
|
|
1490
|
-
<
|
|
1491
|
-
${
|
|
66
|
+
<md-tab class="xnav-list">
|
|
67
|
+
${f(
|
|
1492
68
|
this.inputData?.navItems || [],
|
|
1493
69
|
(o) => o.label,
|
|
1494
|
-
(o) =>
|
|
1495
|
-
<
|
|
70
|
+
(o) => a`
|
|
71
|
+
<md-secondary-tab
|
|
1496
72
|
?active=${this.matchesRoute(this.addSlashes(o))}
|
|
1497
73
|
style="font-size: ${t}px;
|
|
1498
|
-
--
|
|
74
|
+
--md-secondary-tab-container-color: ${s};
|
|
1499
75
|
color: ${i};"
|
|
1500
76
|
@click=${() => this.handleNavItemClick(this.addSlashes(o))}
|
|
1501
77
|
>
|
|
1502
|
-
${o.iconName ?
|
|
1503
|
-
<
|
|
78
|
+
${o.iconName ? a`
|
|
79
|
+
<md-icon
|
|
1504
80
|
slot="icon"
|
|
1505
81
|
style="font-size: ${e}px;width: ${e}px;color: ${i}"
|
|
1506
82
|
>
|
|
1507
83
|
${o.iconName}
|
|
1508
|
-
</
|
|
1509
|
-
` :
|
|
84
|
+
</md-icon>
|
|
85
|
+
` : g}
|
|
1510
86
|
${o.label}
|
|
1511
|
-
</
|
|
87
|
+
</md-secondary-tab>
|
|
1512
88
|
`
|
|
1513
89
|
)}
|
|
1514
|
-
</
|
|
90
|
+
</md-tab>
|
|
1515
91
|
</div>
|
|
1516
92
|
`;
|
|
1517
93
|
}
|
|
1518
94
|
};
|
|
1519
|
-
|
|
95
|
+
h.styles = m`
|
|
1520
96
|
:host {
|
|
1521
97
|
display: block;
|
|
1522
98
|
font-family: sans-serif;
|
|
@@ -1536,7 +112,7 @@ xt.styles = $`
|
|
|
1536
112
|
box-sizing: border-box;
|
|
1537
113
|
}
|
|
1538
114
|
|
|
1539
|
-
|
|
115
|
+
md-icon {
|
|
1540
116
|
font-family: 'Material Symbols Outlined';
|
|
1541
117
|
}
|
|
1542
118
|
|
|
@@ -1553,24 +129,24 @@ xt.styles = $`
|
|
|
1553
129
|
height: 48px;
|
|
1554
130
|
}
|
|
1555
131
|
`;
|
|
1556
|
-
let
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
],
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
],
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
],
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
],
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
],
|
|
1572
|
-
window.customElements.define("widget-navbar-1.0.
|
|
132
|
+
let r = h;
|
|
133
|
+
n([
|
|
134
|
+
l({ type: Object })
|
|
135
|
+
], r.prototype, "inputData");
|
|
136
|
+
n([
|
|
137
|
+
l({ type: Object })
|
|
138
|
+
], r.prototype, "theme");
|
|
139
|
+
n([
|
|
140
|
+
l({ type: String })
|
|
141
|
+
], r.prototype, "route");
|
|
142
|
+
n([
|
|
143
|
+
d()
|
|
144
|
+
], r.prototype, "themeBgColor");
|
|
145
|
+
n([
|
|
146
|
+
d()
|
|
147
|
+
], r.prototype, "themeTitleColor");
|
|
148
|
+
window.customElements.define("widget-navbar-1.0.12", r);
|
|
1573
149
|
export {
|
|
1574
|
-
|
|
150
|
+
r as WidgetNavbar
|
|
1575
151
|
};
|
|
1576
152
|
//# sourceMappingURL=widget-navbar.js.map
|