@nextrap/nte-nav 0.2.3 → 0.2.7
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 +27 -0
- package/index.css +1 -1
- package/index.js +459 -447
- package/lib/nte-nav.d.ts +7 -6
- package/lib/nte-navbar.d.ts +1 -0
- package/package.json +4 -3
package/index.js
CHANGED
|
@@ -1,4 +1,74 @@
|
|
|
1
|
-
|
|
1
|
+
var Dt = function(s, t, e, i) {
|
|
2
|
+
function n(r) {
|
|
3
|
+
return r instanceof e ? r : new e(function(o) {
|
|
4
|
+
o(r);
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return new (e || (e = Promise))(function(r, o) {
|
|
8
|
+
function l(h) {
|
|
9
|
+
try {
|
|
10
|
+
d(i.next(h));
|
|
11
|
+
} catch (c) {
|
|
12
|
+
o(c);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function a(h) {
|
|
16
|
+
try {
|
|
17
|
+
d(i.throw(h));
|
|
18
|
+
} catch (c) {
|
|
19
|
+
o(c);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function d(h) {
|
|
23
|
+
h.done ? r(h.value) : n(h.value).then(l, a);
|
|
24
|
+
}
|
|
25
|
+
d((i = i.apply(s, t || [])).next());
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
function Et() {
|
|
29
|
+
return Dt(this, void 0, void 0, function* () {
|
|
30
|
+
return new Promise((s) => {
|
|
31
|
+
if (document.readyState === "complete" || document.readyState === "interactive")
|
|
32
|
+
return s("loaded");
|
|
33
|
+
document.addEventListener("DOMContentLoaded", () => s("DOMContentLoaded"));
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
var zt = function(s, t, e, i) {
|
|
38
|
+
function n(r) {
|
|
39
|
+
return r instanceof e ? r : new e(function(o) {
|
|
40
|
+
o(r);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return new (e || (e = Promise))(function(r, o) {
|
|
44
|
+
function l(h) {
|
|
45
|
+
try {
|
|
46
|
+
d(i.next(h));
|
|
47
|
+
} catch (c) {
|
|
48
|
+
o(c);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function a(h) {
|
|
52
|
+
try {
|
|
53
|
+
d(i.throw(h));
|
|
54
|
+
} catch (c) {
|
|
55
|
+
o(c);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function d(h) {
|
|
59
|
+
h.done ? r(h.value) : n(h.value).then(l, a);
|
|
60
|
+
}
|
|
61
|
+
d((i = i.apply(s, t || [])).next());
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
function lt(s) {
|
|
65
|
+
return zt(this, void 0, void 0, function* () {
|
|
66
|
+
return new Promise((t) => {
|
|
67
|
+
window.setTimeout(() => t(), s);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
class St {
|
|
2
72
|
/**
|
|
3
73
|
*
|
|
4
74
|
* @param delay Debounce delay in milliseconds
|
|
@@ -28,39 +98,39 @@ const C = {
|
|
|
28
98
|
xl: { name: "xl", minWidth: 1200 },
|
|
29
99
|
xxl: { name: "xxl", minWidth: 1400 }
|
|
30
100
|
};
|
|
31
|
-
let
|
|
101
|
+
let k = C.xs;
|
|
32
102
|
function K() {
|
|
33
|
-
const
|
|
103
|
+
const s = window.innerWidth;
|
|
34
104
|
let t = C.xs;
|
|
35
105
|
for (const e in C) {
|
|
36
|
-
const
|
|
37
|
-
|
|
106
|
+
const i = C[e];
|
|
107
|
+
s >= i.minWidth && (t = i);
|
|
38
108
|
}
|
|
39
109
|
return t;
|
|
40
110
|
}
|
|
41
|
-
function
|
|
42
|
-
if (typeof
|
|
43
|
-
if (
|
|
111
|
+
function ht(s) {
|
|
112
|
+
if (typeof s == "string" && s.endsWith("px") && (s = parseInt(s.replace("px", ""))), typeof s == "string") {
|
|
113
|
+
if (s = C[s], !s)
|
|
44
114
|
throw new Error(
|
|
45
|
-
`Breakpoint ${
|
|
115
|
+
`Breakpoint ${s} not found. Defined breakpoints are: ${Object.keys(C).join(", ")}`
|
|
46
116
|
);
|
|
47
|
-
} else typeof
|
|
48
|
-
return window.innerWidth >=
|
|
117
|
+
} else typeof s == "number" && (s = { name: "c", minWidth: s });
|
|
118
|
+
return window.innerWidth >= s.minWidth;
|
|
49
119
|
}
|
|
50
120
|
if (!window.__nextrap_current_breakpoint) {
|
|
51
121
|
window.__nextrap_current_breakpoint = K();
|
|
52
|
-
const
|
|
122
|
+
const s = new St(200, 500);
|
|
53
123
|
window.addEventListener("resize", async () => {
|
|
54
|
-
if (await
|
|
55
|
-
|
|
124
|
+
if (await s.wait(), k !== K()) {
|
|
125
|
+
k = K(), window.__nextrap_current_breakpoint = k;
|
|
56
126
|
const t = new CustomEvent("breakpoint-changed", {
|
|
57
|
-
detail: { breakpoint:
|
|
127
|
+
detail: { breakpoint: k }
|
|
58
128
|
});
|
|
59
|
-
console.log("Breakpoint changed",
|
|
129
|
+
console.log("Breakpoint changed", k), window.dispatchEvent(t);
|
|
60
130
|
}
|
|
61
131
|
});
|
|
62
132
|
}
|
|
63
|
-
class
|
|
133
|
+
class it {
|
|
64
134
|
/**
|
|
65
135
|
* Checks recursively if the element is visible.
|
|
66
136
|
*
|
|
@@ -72,8 +142,8 @@ class Et {
|
|
|
72
142
|
if (t instanceof HTMLElement && (t.offsetWidth > 0 || t.offsetHeight > 0 || t.tagName === "IMG"))
|
|
73
143
|
return !0;
|
|
74
144
|
if (!t.children) return !1;
|
|
75
|
-
for (const
|
|
76
|
-
if (this.isVisible(
|
|
145
|
+
for (const i of t.children)
|
|
146
|
+
if (this.isVisible(i)) return !0;
|
|
77
147
|
return !1;
|
|
78
148
|
}
|
|
79
149
|
/**
|
|
@@ -90,7 +160,7 @@ class Et {
|
|
|
90
160
|
*/
|
|
91
161
|
static isEmptySlot(t) {
|
|
92
162
|
const e = t.assignedElements({ flatten: !0 });
|
|
93
|
-
return e.length === 0 ? !0 : e.every((
|
|
163
|
+
return e.length === 0 ? !0 : e.every((i) => !this.isVisible(i));
|
|
94
164
|
}
|
|
95
165
|
static observeEmptySlots(t) {
|
|
96
166
|
const e = t.shadowRoot;
|
|
@@ -110,18 +180,18 @@ class Et {
|
|
|
110
180
|
* Copyright 2019 Google LLC
|
|
111
181
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
182
|
*/
|
|
113
|
-
const
|
|
114
|
-
let
|
|
115
|
-
constructor(t, e,
|
|
116
|
-
if (this._$cssResult$ = !0,
|
|
183
|
+
const W = globalThis, nt = W.ShadowRoot && (W.ShadyCSS === void 0 || W.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ct = Symbol(), ct = /* @__PURE__ */ new WeakMap();
|
|
184
|
+
let Tt = class {
|
|
185
|
+
constructor(t, e, i) {
|
|
186
|
+
if (this._$cssResult$ = !0, i !== Ct) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
117
187
|
this.cssText = t, this.t = e;
|
|
118
188
|
}
|
|
119
189
|
get styleSheet() {
|
|
120
190
|
let t = this.o;
|
|
121
191
|
const e = this.t;
|
|
122
|
-
if (
|
|
123
|
-
const
|
|
124
|
-
|
|
192
|
+
if (nt && t === void 0) {
|
|
193
|
+
const i = e !== void 0 && e.length === 1;
|
|
194
|
+
i && (t = ct.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ct.set(e, t));
|
|
125
195
|
}
|
|
126
196
|
return t;
|
|
127
197
|
}
|
|
@@ -129,98 +199,98 @@ let Ct = class {
|
|
|
129
199
|
return this.cssText;
|
|
130
200
|
}
|
|
131
201
|
};
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
202
|
+
const P = (s) => new Tt(typeof s == "string" ? s : s + "", void 0, Ct), It = (s, t) => {
|
|
203
|
+
if (nt) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
134
204
|
else for (const e of t) {
|
|
135
|
-
const
|
|
136
|
-
n !== void 0 &&
|
|
205
|
+
const i = document.createElement("style"), n = W.litNonce;
|
|
206
|
+
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, s.appendChild(i);
|
|
137
207
|
}
|
|
138
|
-
},
|
|
208
|
+
}, dt = nt ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
139
209
|
let e = "";
|
|
140
|
-
for (const
|
|
141
|
-
return
|
|
142
|
-
})(
|
|
210
|
+
for (const i of t.cssRules) e += i.cssText;
|
|
211
|
+
return P(e);
|
|
212
|
+
})(s) : s;
|
|
143
213
|
/**
|
|
144
214
|
* @license
|
|
145
215
|
* Copyright 2017 Google LLC
|
|
146
216
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
147
217
|
*/
|
|
148
|
-
const { is:
|
|
218
|
+
const { is: Wt, defineProperty: Bt, getOwnPropertyDescriptor: Gt, getOwnPropertyNames: qt, getOwnPropertySymbols: Vt, getPrototypeOf: Yt } = Object, m = globalThis, pt = m.trustedTypes, Ft = pt ? pt.emptyScript : "", Z = m.reactiveElementPolyfillSupport, M = (s, t) => s, B = { toAttribute(s, t) {
|
|
149
219
|
switch (t) {
|
|
150
220
|
case Boolean:
|
|
151
|
-
|
|
221
|
+
s = s ? Ft : null;
|
|
152
222
|
break;
|
|
153
223
|
case Object:
|
|
154
224
|
case Array:
|
|
155
|
-
|
|
225
|
+
s = s == null ? s : JSON.stringify(s);
|
|
156
226
|
}
|
|
157
|
-
return
|
|
158
|
-
}, fromAttribute(
|
|
159
|
-
let e =
|
|
227
|
+
return s;
|
|
228
|
+
}, fromAttribute(s, t) {
|
|
229
|
+
let e = s;
|
|
160
230
|
switch (t) {
|
|
161
231
|
case Boolean:
|
|
162
|
-
e =
|
|
232
|
+
e = s !== null;
|
|
163
233
|
break;
|
|
164
234
|
case Number:
|
|
165
|
-
e =
|
|
235
|
+
e = s === null ? null : Number(s);
|
|
166
236
|
break;
|
|
167
237
|
case Object:
|
|
168
238
|
case Array:
|
|
169
239
|
try {
|
|
170
|
-
e = JSON.parse(
|
|
240
|
+
e = JSON.parse(s);
|
|
171
241
|
} catch {
|
|
172
242
|
e = null;
|
|
173
243
|
}
|
|
174
244
|
}
|
|
175
245
|
return e;
|
|
176
|
-
} },
|
|
246
|
+
} }, rt = (s, t) => !Wt(s, t), ut = { attribute: !0, type: String, converter: B, reflect: !1, useDefault: !1, hasChanged: rt };
|
|
177
247
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), m.litPropertyMetadata ?? (m.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
178
|
-
let
|
|
248
|
+
let y = class extends HTMLElement {
|
|
179
249
|
static addInitializer(t) {
|
|
180
250
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
181
251
|
}
|
|
182
252
|
static get observedAttributes() {
|
|
183
253
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
184
254
|
}
|
|
185
|
-
static createProperty(t, e =
|
|
255
|
+
static createProperty(t, e = ut) {
|
|
186
256
|
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) {
|
|
187
|
-
const
|
|
188
|
-
n !== void 0 &&
|
|
257
|
+
const i = Symbol(), n = this.getPropertyDescriptor(t, i, e);
|
|
258
|
+
n !== void 0 && Bt(this.prototype, t, n);
|
|
189
259
|
}
|
|
190
260
|
}
|
|
191
|
-
static getPropertyDescriptor(t, e,
|
|
192
|
-
const { get: n, set: r } =
|
|
261
|
+
static getPropertyDescriptor(t, e, i) {
|
|
262
|
+
const { get: n, set: r } = Gt(this.prototype, t) ?? { get() {
|
|
193
263
|
return this[e];
|
|
194
264
|
}, set(o) {
|
|
195
265
|
this[e] = o;
|
|
196
266
|
} };
|
|
197
267
|
return { get: n, set(o) {
|
|
198
268
|
const l = n == null ? void 0 : n.call(this);
|
|
199
|
-
r == null || r.call(this, o), this.requestUpdate(t, l,
|
|
269
|
+
r == null || r.call(this, o), this.requestUpdate(t, l, i);
|
|
200
270
|
}, configurable: !0, enumerable: !0 };
|
|
201
271
|
}
|
|
202
272
|
static getPropertyOptions(t) {
|
|
203
|
-
return this.elementProperties.get(t) ??
|
|
273
|
+
return this.elementProperties.get(t) ?? ut;
|
|
204
274
|
}
|
|
205
275
|
static _$Ei() {
|
|
206
276
|
if (this.hasOwnProperty(M("elementProperties"))) return;
|
|
207
|
-
const t =
|
|
277
|
+
const t = Yt(this);
|
|
208
278
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
209
279
|
}
|
|
210
280
|
static finalize() {
|
|
211
281
|
if (this.hasOwnProperty(M("finalized"))) return;
|
|
212
282
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
|
|
213
|
-
const e = this.properties,
|
|
214
|
-
for (const n of
|
|
283
|
+
const e = this.properties, i = [...qt(e), ...Vt(e)];
|
|
284
|
+
for (const n of i) this.createProperty(n, e[n]);
|
|
215
285
|
}
|
|
216
286
|
const t = this[Symbol.metadata];
|
|
217
287
|
if (t !== null) {
|
|
218
288
|
const e = litPropertyMetadata.get(t);
|
|
219
|
-
if (e !== void 0) for (const [
|
|
289
|
+
if (e !== void 0) for (const [i, n] of e) this.elementProperties.set(i, n);
|
|
220
290
|
}
|
|
221
291
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
222
|
-
for (const [e,
|
|
223
|
-
const n = this._$Eu(e,
|
|
292
|
+
for (const [e, i] of this.elementProperties) {
|
|
293
|
+
const n = this._$Eu(e, i);
|
|
224
294
|
n !== void 0 && this._$Eh.set(n, e);
|
|
225
295
|
}
|
|
226
296
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
@@ -228,14 +298,14 @@ let b = class extends HTMLElement {
|
|
|
228
298
|
static finalizeStyles(t) {
|
|
229
299
|
const e = [];
|
|
230
300
|
if (Array.isArray(t)) {
|
|
231
|
-
const
|
|
232
|
-
for (const n of
|
|
233
|
-
} else t !== void 0 && e.push(
|
|
301
|
+
const i = new Set(t.flat(1 / 0).reverse());
|
|
302
|
+
for (const n of i) e.unshift(dt(n));
|
|
303
|
+
} else t !== void 0 && e.push(dt(t));
|
|
234
304
|
return e;
|
|
235
305
|
}
|
|
236
306
|
static _$Eu(t, e) {
|
|
237
|
-
const
|
|
238
|
-
return
|
|
307
|
+
const i = e.attribute;
|
|
308
|
+
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
239
309
|
}
|
|
240
310
|
constructor() {
|
|
241
311
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
@@ -254,18 +324,18 @@ let b = class extends HTMLElement {
|
|
|
254
324
|
}
|
|
255
325
|
_$E_() {
|
|
256
326
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
257
|
-
for (const
|
|
327
|
+
for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
258
328
|
t.size > 0 && (this._$Ep = t);
|
|
259
329
|
}
|
|
260
330
|
createRenderRoot() {
|
|
261
331
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
262
|
-
return
|
|
332
|
+
return It(t, this.constructor.elementStyles), t;
|
|
263
333
|
}
|
|
264
334
|
connectedCallback() {
|
|
265
335
|
var t;
|
|
266
336
|
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
267
|
-
var
|
|
268
|
-
return (
|
|
337
|
+
var i;
|
|
338
|
+
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
|
269
339
|
});
|
|
270
340
|
}
|
|
271
341
|
enableUpdating(t) {
|
|
@@ -273,40 +343,42 @@ let b = class extends HTMLElement {
|
|
|
273
343
|
disconnectedCallback() {
|
|
274
344
|
var t;
|
|
275
345
|
(t = this._$EO) == null || t.forEach((e) => {
|
|
276
|
-
var
|
|
277
|
-
return (
|
|
346
|
+
var i;
|
|
347
|
+
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
|
278
348
|
});
|
|
279
349
|
}
|
|
280
|
-
attributeChangedCallback(t, e,
|
|
281
|
-
this._$AK(t,
|
|
350
|
+
attributeChangedCallback(t, e, i) {
|
|
351
|
+
this._$AK(t, i);
|
|
282
352
|
}
|
|
283
353
|
_$ET(t, e) {
|
|
284
354
|
var r;
|
|
285
|
-
const
|
|
286
|
-
if (n !== void 0 &&
|
|
287
|
-
const o = (((r =
|
|
355
|
+
const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
|
|
356
|
+
if (n !== void 0 && i.reflect === !0) {
|
|
357
|
+
const o = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : B).toAttribute(e, i.type);
|
|
288
358
|
this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
|
|
289
359
|
}
|
|
290
360
|
}
|
|
291
361
|
_$AK(t, e) {
|
|
292
362
|
var r, o;
|
|
293
|
-
const
|
|
363
|
+
const i = this.constructor, n = i._$Eh.get(t);
|
|
294
364
|
if (n !== void 0 && this._$Em !== n) {
|
|
295
|
-
const l =
|
|
296
|
-
this._$Em = n
|
|
365
|
+
const l = i.getPropertyOptions(n), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((r = l.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? l.converter : B;
|
|
366
|
+
this._$Em = n;
|
|
367
|
+
const d = a.fromAttribute(e, l.type);
|
|
368
|
+
this[n] = d ?? ((o = this._$Ej) == null ? void 0 : o.get(n)) ?? d, this._$Em = null;
|
|
297
369
|
}
|
|
298
370
|
}
|
|
299
|
-
requestUpdate(t, e,
|
|
371
|
+
requestUpdate(t, e, i) {
|
|
300
372
|
var n;
|
|
301
373
|
if (t !== void 0) {
|
|
302
374
|
const r = this.constructor, o = this[t];
|
|
303
|
-
if (
|
|
304
|
-
this.C(t, e,
|
|
375
|
+
if (i ?? (i = r.getPropertyOptions(t)), !((i.hasChanged ?? rt)(o, e) || i.useDefault && i.reflect && o === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(r._$Eu(t, i)))) return;
|
|
376
|
+
this.C(t, e, i);
|
|
305
377
|
}
|
|
306
378
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
307
379
|
}
|
|
308
|
-
C(t, e, { useDefault:
|
|
309
|
-
|
|
380
|
+
C(t, e, { useDefault: i, reflect: n, wrapped: r }, o) {
|
|
381
|
+
i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), r !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), n === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
310
382
|
}
|
|
311
383
|
async _$EP() {
|
|
312
384
|
this.isUpdatePending = !0;
|
|
@@ -322,7 +394,7 @@ let b = class extends HTMLElement {
|
|
|
322
394
|
return this.performUpdate();
|
|
323
395
|
}
|
|
324
396
|
performUpdate() {
|
|
325
|
-
var
|
|
397
|
+
var i;
|
|
326
398
|
if (!this.isUpdatePending) return;
|
|
327
399
|
if (!this.hasUpdated) {
|
|
328
400
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
@@ -338,7 +410,7 @@ let b = class extends HTMLElement {
|
|
|
338
410
|
let t = !1;
|
|
339
411
|
const e = this._$AL;
|
|
340
412
|
try {
|
|
341
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (
|
|
413
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((n) => {
|
|
342
414
|
var r;
|
|
343
415
|
return (r = n.hostUpdate) == null ? void 0 : r.call(n);
|
|
344
416
|
}), this.update(e)) : this._$EM();
|
|
@@ -351,9 +423,9 @@ let b = class extends HTMLElement {
|
|
|
351
423
|
}
|
|
352
424
|
_$AE(t) {
|
|
353
425
|
var e;
|
|
354
|
-
(e = this._$EO) == null || e.forEach((
|
|
426
|
+
(e = this._$EO) == null || e.forEach((i) => {
|
|
355
427
|
var n;
|
|
356
|
-
return (n =
|
|
428
|
+
return (n = i.hostUpdated) == null ? void 0 : n.call(i);
|
|
357
429
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
358
430
|
}
|
|
359
431
|
_$EM() {
|
|
@@ -376,56 +448,56 @@ let b = class extends HTMLElement {
|
|
|
376
448
|
firstUpdated(t) {
|
|
377
449
|
}
|
|
378
450
|
};
|
|
379
|
-
|
|
451
|
+
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[M("elementProperties")] = /* @__PURE__ */ new Map(), y[M("finalized")] = /* @__PURE__ */ new Map(), Z == null || Z({ ReactiveElement: y }), (m.reactiveElementVersions ?? (m.reactiveElementVersions = [])).push("2.1.1");
|
|
380
452
|
/**
|
|
381
453
|
* @license
|
|
382
454
|
* Copyright 2017 Google LLC
|
|
383
455
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
384
456
|
*/
|
|
385
|
-
const
|
|
386
|
-
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
387
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
388
|
-
function Mt(
|
|
389
|
-
if (!
|
|
390
|
-
return
|
|
457
|
+
const U = globalThis, G = U.trustedTypes, ft = G ? G.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Pt = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, kt = "?" + v, Jt = `<${kt}>`, x = document, H = () => x.createComment(""), L = (s) => s === null || typeof s != "object" && typeof s != "function", ot = Array.isArray, Kt = (s) => ot(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Q = `[
|
|
458
|
+
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, vt = /-->/g, mt = />/g, _ = RegExp(`>|${Q}(?:([^\\s"'>=/]+)(${Q}*=${Q}*(?:[^
|
|
459
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), gt = /'/g, $t = /"/g, Ot = /^(?:script|style|textarea|title)$/i, Zt = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), R = Zt(1), E = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), _t = /* @__PURE__ */ new WeakMap(), b = x.createTreeWalker(x, 129);
|
|
460
|
+
function Mt(s, t) {
|
|
461
|
+
if (!ot(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
462
|
+
return ft !== void 0 ? ft.createHTML(t) : t;
|
|
391
463
|
}
|
|
392
|
-
const
|
|
393
|
-
const e =
|
|
464
|
+
const Qt = (s, t) => {
|
|
465
|
+
const e = s.length - 1, i = [];
|
|
394
466
|
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = O;
|
|
395
467
|
for (let l = 0; l < e; l++) {
|
|
396
|
-
const a =
|
|
468
|
+
const a = s[l];
|
|
397
469
|
let d, h, c = -1, u = 0;
|
|
398
|
-
for (; u < a.length && (o.lastIndex = u, h = o.exec(a), h !== null); ) u = o.lastIndex, o === O ? h[1] === "!--" ? o =
|
|
399
|
-
const f = o ===
|
|
400
|
-
r += o === O ? a +
|
|
470
|
+
for (; u < a.length && (o.lastIndex = u, h = o.exec(a), h !== null); ) u = o.lastIndex, o === O ? h[1] === "!--" ? o = vt : h[1] !== void 0 ? o = mt : h[2] !== void 0 ? (Ot.test(h[2]) && (n = RegExp("</" + h[2], "g")), o = _) : h[3] !== void 0 && (o = _) : o === _ ? h[0] === ">" ? (o = n ?? O, c = -1) : h[1] === void 0 ? c = -2 : (c = o.lastIndex - h[2].length, d = h[1], o = h[3] === void 0 ? _ : h[3] === '"' ? $t : gt) : o === $t || o === gt ? o = _ : o === vt || o === mt ? o = O : (o = _, n = void 0);
|
|
471
|
+
const f = o === _ && s[l + 1].startsWith("/>") ? " " : "";
|
|
472
|
+
r += o === O ? a + Jt : c >= 0 ? (i.push(d), a.slice(0, c) + Pt + a.slice(c) + v + f) : a + v + (c === -2 ? l : f);
|
|
401
473
|
}
|
|
402
|
-
return [Mt(
|
|
474
|
+
return [Mt(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
403
475
|
};
|
|
404
|
-
class
|
|
405
|
-
constructor({ strings: t, _$litType$: e },
|
|
476
|
+
class j {
|
|
477
|
+
constructor({ strings: t, _$litType$: e }, i) {
|
|
406
478
|
let n;
|
|
407
479
|
this.parts = [];
|
|
408
480
|
let r = 0, o = 0;
|
|
409
|
-
const l = t.length - 1, a = this.parts, [d, h] =
|
|
410
|
-
if (this.el =
|
|
481
|
+
const l = t.length - 1, a = this.parts, [d, h] = Qt(t, e);
|
|
482
|
+
if (this.el = j.createElement(d, i), b.currentNode = this.el.content, e === 2 || e === 3) {
|
|
411
483
|
const c = this.el.content.firstChild;
|
|
412
484
|
c.replaceWith(...c.childNodes);
|
|
413
485
|
}
|
|
414
|
-
for (; (n =
|
|
486
|
+
for (; (n = b.nextNode()) !== null && a.length < l; ) {
|
|
415
487
|
if (n.nodeType === 1) {
|
|
416
488
|
if (n.hasAttributes()) for (const c of n.getAttributeNames()) if (c.endsWith(Pt)) {
|
|
417
|
-
const u = h[o++], f = n.getAttribute(c).split(v),
|
|
418
|
-
a.push({ type: 1, index: r, name:
|
|
489
|
+
const u = h[o++], f = n.getAttribute(c).split(v), I = /([.?@])?(.*)/.exec(u);
|
|
490
|
+
a.push({ type: 1, index: r, name: I[2], strings: f, ctor: I[1] === "." ? te : I[1] === "?" ? ee : I[1] === "@" ? se : Y }), n.removeAttribute(c);
|
|
419
491
|
} else c.startsWith(v) && (a.push({ type: 6, index: r }), n.removeAttribute(c));
|
|
420
492
|
if (Ot.test(n.tagName)) {
|
|
421
493
|
const c = n.textContent.split(v), u = c.length - 1;
|
|
422
494
|
if (u > 0) {
|
|
423
495
|
n.textContent = G ? G.emptyScript : "";
|
|
424
|
-
for (let f = 0; f < u; f++) n.append(c[f],
|
|
425
|
-
n.append(c[u],
|
|
496
|
+
for (let f = 0; f < u; f++) n.append(c[f], H()), b.nextNode(), a.push({ type: 2, index: ++r });
|
|
497
|
+
n.append(c[u], H());
|
|
426
498
|
}
|
|
427
499
|
}
|
|
428
|
-
} else if (n.nodeType === 8) if (n.data ===
|
|
500
|
+
} else if (n.nodeType === 8) if (n.data === kt) a.push({ type: 2, index: r });
|
|
429
501
|
else {
|
|
430
502
|
let c = -1;
|
|
431
503
|
for (; (c = n.data.indexOf(v, c + 1)) !== -1; ) a.push({ type: 7, index: r }), c += v.length - 1;
|
|
@@ -434,18 +506,18 @@ class R {
|
|
|
434
506
|
}
|
|
435
507
|
}
|
|
436
508
|
static createElement(t, e) {
|
|
437
|
-
const
|
|
438
|
-
return
|
|
509
|
+
const i = x.createElement("template");
|
|
510
|
+
return i.innerHTML = t, i;
|
|
439
511
|
}
|
|
440
512
|
}
|
|
441
|
-
function
|
|
513
|
+
function T(s, t, e = s, i) {
|
|
442
514
|
var o, l;
|
|
443
515
|
if (t === E) return t;
|
|
444
|
-
let n =
|
|
445
|
-
const r =
|
|
446
|
-
return (n == null ? void 0 : n.constructor) !== r && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), r === void 0 ? n = void 0 : (n = new r(
|
|
516
|
+
let n = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
|
517
|
+
const r = L(t) ? void 0 : t._$litDirective$;
|
|
518
|
+
return (n == null ? void 0 : n.constructor) !== r && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), r === void 0 ? n = void 0 : (n = new r(s), n._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t = T(s, n._$AS(s, t.values), n, i)), t;
|
|
447
519
|
}
|
|
448
|
-
class
|
|
520
|
+
class Xt {
|
|
449
521
|
constructor(t, e) {
|
|
450
522
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
451
523
|
}
|
|
@@ -456,21 +528,21 @@ class Kt {
|
|
|
456
528
|
return this._$AM._$AU;
|
|
457
529
|
}
|
|
458
530
|
u(t) {
|
|
459
|
-
const { el: { content: e }, parts:
|
|
460
|
-
|
|
461
|
-
let r =
|
|
531
|
+
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? x).importNode(e, !0);
|
|
532
|
+
b.currentNode = n;
|
|
533
|
+
let r = b.nextNode(), o = 0, l = 0, a = i[0];
|
|
462
534
|
for (; a !== void 0; ) {
|
|
463
535
|
if (o === a.index) {
|
|
464
536
|
let d;
|
|
465
|
-
a.type === 2 ? d = new D(r, r.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (d = new
|
|
537
|
+
a.type === 2 ? d = new D(r, r.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (d = new ie(r, this, t)), this._$AV.push(d), a = i[++l];
|
|
466
538
|
}
|
|
467
|
-
o !== (a == null ? void 0 : a.index) && (r =
|
|
539
|
+
o !== (a == null ? void 0 : a.index) && (r = b.nextNode(), o++);
|
|
468
540
|
}
|
|
469
|
-
return
|
|
541
|
+
return b.currentNode = x, n;
|
|
470
542
|
}
|
|
471
543
|
p(t) {
|
|
472
544
|
let e = 0;
|
|
473
|
-
for (const
|
|
545
|
+
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++;
|
|
474
546
|
}
|
|
475
547
|
}
|
|
476
548
|
class D {
|
|
@@ -478,8 +550,8 @@ class D {
|
|
|
478
550
|
var t;
|
|
479
551
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
480
552
|
}
|
|
481
|
-
constructor(t, e,
|
|
482
|
-
this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM =
|
|
553
|
+
constructor(t, e, i, n) {
|
|
554
|
+
this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
|
|
483
555
|
}
|
|
484
556
|
get parentNode() {
|
|
485
557
|
let t = this._$AA.parentNode;
|
|
@@ -493,7 +565,7 @@ class D {
|
|
|
493
565
|
return this._$AB;
|
|
494
566
|
}
|
|
495
567
|
_$AI(t, e = this) {
|
|
496
|
-
t =
|
|
568
|
+
t = T(this, t, e), L(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Kt(t) ? this.k(t) : this._(t);
|
|
497
569
|
}
|
|
498
570
|
O(t) {
|
|
499
571
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -502,31 +574,31 @@ class D {
|
|
|
502
574
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
503
575
|
}
|
|
504
576
|
_(t) {
|
|
505
|
-
this._$AH !== p &&
|
|
577
|
+
this._$AH !== p && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(x.createTextNode(t)), this._$AH = t;
|
|
506
578
|
}
|
|
507
579
|
$(t) {
|
|
508
580
|
var r;
|
|
509
|
-
const { values: e, _$litType$:
|
|
581
|
+
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = j.createElement(Mt(i.h, i.h[0]), this.options)), i);
|
|
510
582
|
if (((r = this._$AH) == null ? void 0 : r._$AD) === n) this._$AH.p(e);
|
|
511
583
|
else {
|
|
512
|
-
const o = new
|
|
584
|
+
const o = new Xt(n, this), l = o.u(this.options);
|
|
513
585
|
o.p(e), this.T(l), this._$AH = o;
|
|
514
586
|
}
|
|
515
587
|
}
|
|
516
588
|
_$AC(t) {
|
|
517
|
-
let e =
|
|
518
|
-
return e === void 0 &&
|
|
589
|
+
let e = _t.get(t.strings);
|
|
590
|
+
return e === void 0 && _t.set(t.strings, e = new j(t)), e;
|
|
519
591
|
}
|
|
520
592
|
k(t) {
|
|
521
|
-
|
|
593
|
+
ot(this._$AH) || (this._$AH = [], this._$AR());
|
|
522
594
|
const e = this._$AH;
|
|
523
|
-
let
|
|
524
|
-
for (const r of t) n === e.length ? e.push(
|
|
525
|
-
n < e.length && (this._$AR(
|
|
595
|
+
let i, n = 0;
|
|
596
|
+
for (const r of t) n === e.length ? e.push(i = new D(this.O(H()), this.O(H()), this, this.options)) : i = e[n], i._$AI(r), n++;
|
|
597
|
+
n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
|
|
526
598
|
}
|
|
527
599
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
528
|
-
var
|
|
529
|
-
for ((
|
|
600
|
+
var i;
|
|
601
|
+
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t !== this._$AB; ) {
|
|
530
602
|
const n = t.nextSibling;
|
|
531
603
|
t.remove(), t = n;
|
|
532
604
|
}
|
|
@@ -543,17 +615,17 @@ class Y {
|
|
|
543
615
|
get _$AU() {
|
|
544
616
|
return this._$AM._$AU;
|
|
545
617
|
}
|
|
546
|
-
constructor(t, e,
|
|
547
|
-
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r,
|
|
618
|
+
constructor(t, e, i, n, r) {
|
|
619
|
+
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = p;
|
|
548
620
|
}
|
|
549
|
-
_$AI(t, e = this,
|
|
621
|
+
_$AI(t, e = this, i, n) {
|
|
550
622
|
const r = this.strings;
|
|
551
623
|
let o = !1;
|
|
552
|
-
if (r === void 0) t =
|
|
624
|
+
if (r === void 0) t = T(this, t, e, 0), o = !L(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
|
|
553
625
|
else {
|
|
554
626
|
const l = t;
|
|
555
627
|
let a, d;
|
|
556
|
-
for (t = r[0], a = 0; a < r.length - 1; a++) d =
|
|
628
|
+
for (t = r[0], a = 0; a < r.length - 1; a++) d = T(this, l[i + a], e, a), d === E && (d = this._$AH[a]), o || (o = !L(d) || d !== this._$AH[a]), d === p ? t = p : t !== p && (t += (d ?? "") + r[a + 1]), this._$AH[a] = d;
|
|
557
629
|
}
|
|
558
630
|
o && !n && this.j(t);
|
|
559
631
|
}
|
|
@@ -561,7 +633,7 @@ class Y {
|
|
|
561
633
|
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
562
634
|
}
|
|
563
635
|
}
|
|
564
|
-
class
|
|
636
|
+
class te extends Y {
|
|
565
637
|
constructor() {
|
|
566
638
|
super(...arguments), this.type = 3;
|
|
567
639
|
}
|
|
@@ -569,7 +641,7 @@ class Zt extends Y {
|
|
|
569
641
|
this.element[this.name] = t === p ? void 0 : t;
|
|
570
642
|
}
|
|
571
643
|
}
|
|
572
|
-
class
|
|
644
|
+
class ee extends Y {
|
|
573
645
|
constructor() {
|
|
574
646
|
super(...arguments), this.type = 4;
|
|
575
647
|
}
|
|
@@ -577,49 +649,49 @@ class Qt extends Y {
|
|
|
577
649
|
this.element.toggleAttribute(this.name, !!t && t !== p);
|
|
578
650
|
}
|
|
579
651
|
}
|
|
580
|
-
class
|
|
581
|
-
constructor(t, e,
|
|
582
|
-
super(t, e,
|
|
652
|
+
class se extends Y {
|
|
653
|
+
constructor(t, e, i, n, r) {
|
|
654
|
+
super(t, e, i, n, r), this.type = 5;
|
|
583
655
|
}
|
|
584
656
|
_$AI(t, e = this) {
|
|
585
|
-
if ((t =
|
|
586
|
-
const
|
|
587
|
-
n && this.element.removeEventListener(this.name, this,
|
|
657
|
+
if ((t = T(this, t, e, 0) ?? p) === E) return;
|
|
658
|
+
const i = this._$AH, n = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== p && (i === p || n);
|
|
659
|
+
n && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
588
660
|
}
|
|
589
661
|
handleEvent(t) {
|
|
590
662
|
var e;
|
|
591
663
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
592
664
|
}
|
|
593
665
|
}
|
|
594
|
-
class
|
|
595
|
-
constructor(t, e,
|
|
596
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options =
|
|
666
|
+
class ie {
|
|
667
|
+
constructor(t, e, i) {
|
|
668
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
597
669
|
}
|
|
598
670
|
get _$AU() {
|
|
599
671
|
return this._$AM._$AU;
|
|
600
672
|
}
|
|
601
673
|
_$AI(t) {
|
|
602
|
-
|
|
674
|
+
T(this, t);
|
|
603
675
|
}
|
|
604
676
|
}
|
|
605
|
-
const X =
|
|
606
|
-
X == null || X(
|
|
607
|
-
const
|
|
608
|
-
const
|
|
609
|
-
let n =
|
|
677
|
+
const X = U.litHtmlPolyfillSupport;
|
|
678
|
+
X == null || X(j, D), (U.litHtmlVersions ?? (U.litHtmlVersions = [])).push("3.3.1");
|
|
679
|
+
const ne = (s, t, e) => {
|
|
680
|
+
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
681
|
+
let n = i._$litPart$;
|
|
610
682
|
if (n === void 0) {
|
|
611
683
|
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
612
|
-
|
|
684
|
+
i._$litPart$ = n = new D(t.insertBefore(H(), r), r, void 0, e ?? {});
|
|
613
685
|
}
|
|
614
|
-
return n._$AI(
|
|
686
|
+
return n._$AI(s), n;
|
|
615
687
|
};
|
|
616
688
|
/**
|
|
617
689
|
* @license
|
|
618
690
|
* Copyright 2017 Google LLC
|
|
619
691
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
620
692
|
*/
|
|
621
|
-
const
|
|
622
|
-
let
|
|
693
|
+
const w = globalThis;
|
|
694
|
+
let g = class extends y {
|
|
623
695
|
constructor() {
|
|
624
696
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
625
697
|
}
|
|
@@ -630,7 +702,7 @@ let $ = class extends b {
|
|
|
630
702
|
}
|
|
631
703
|
update(t) {
|
|
632
704
|
const e = this.render();
|
|
633
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
705
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ne(e, this.renderRoot, this.renderOptions);
|
|
634
706
|
}
|
|
635
707
|
connectedCallback() {
|
|
636
708
|
var t;
|
|
@@ -644,65 +716,65 @@ let $ = class extends b {
|
|
|
644
716
|
return E;
|
|
645
717
|
}
|
|
646
718
|
};
|
|
647
|
-
var
|
|
648
|
-
|
|
649
|
-
const tt =
|
|
650
|
-
tt == null || tt({ LitElement:
|
|
651
|
-
(
|
|
719
|
+
var xt;
|
|
720
|
+
g._$litElement$ = !0, g.finalized = !0, (xt = w.litElementHydrateSupport) == null || xt.call(w, { LitElement: g });
|
|
721
|
+
const tt = w.litElementPolyfillSupport;
|
|
722
|
+
tt == null || tt({ LitElement: g });
|
|
723
|
+
(w.litElementVersions ?? (w.litElementVersions = [])).push("4.2.1");
|
|
652
724
|
/**
|
|
653
725
|
* @license
|
|
654
726
|
* Copyright 2017 Google LLC
|
|
655
727
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
656
728
|
*/
|
|
657
|
-
const F = (
|
|
729
|
+
const F = (s) => (t, e) => {
|
|
658
730
|
e !== void 0 ? e.addInitializer(() => {
|
|
659
|
-
customElements.define(
|
|
660
|
-
}) : customElements.define(
|
|
731
|
+
customElements.define(s, t);
|
|
732
|
+
}) : customElements.define(s, t);
|
|
661
733
|
};
|
|
662
734
|
/**
|
|
663
735
|
* @license
|
|
664
736
|
* Copyright 2017 Google LLC
|
|
665
737
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
666
738
|
*/
|
|
667
|
-
const
|
|
668
|
-
const { kind:
|
|
739
|
+
const re = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged: rt }, oe = (s = re, t, e) => {
|
|
740
|
+
const { kind: i, metadata: n } = e;
|
|
669
741
|
let r = globalThis.litPropertyMetadata.get(n);
|
|
670
|
-
if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()),
|
|
742
|
+
if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), r.set(e.name, s), i === "accessor") {
|
|
671
743
|
const { name: o } = e;
|
|
672
744
|
return { set(l) {
|
|
673
745
|
const a = t.get.call(this);
|
|
674
|
-
t.set.call(this, l), this.requestUpdate(o, a,
|
|
746
|
+
t.set.call(this, l), this.requestUpdate(o, a, s);
|
|
675
747
|
}, init(l) {
|
|
676
|
-
return l !== void 0 && this.C(o, void 0,
|
|
748
|
+
return l !== void 0 && this.C(o, void 0, s, l), l;
|
|
677
749
|
} };
|
|
678
750
|
}
|
|
679
|
-
if (
|
|
751
|
+
if (i === "setter") {
|
|
680
752
|
const { name: o } = e;
|
|
681
753
|
return function(l) {
|
|
682
754
|
const a = this[o];
|
|
683
|
-
t.call(this, l), this.requestUpdate(o, a,
|
|
755
|
+
t.call(this, l), this.requestUpdate(o, a, s);
|
|
684
756
|
};
|
|
685
757
|
}
|
|
686
|
-
throw Error("Unsupported decorator location: " +
|
|
758
|
+
throw Error("Unsupported decorator location: " + i);
|
|
687
759
|
};
|
|
688
|
-
function S(
|
|
689
|
-
return (t, e) => typeof e == "object" ?
|
|
760
|
+
function S(s) {
|
|
761
|
+
return (t, e) => typeof e == "object" ? oe(s, t, e) : ((i, n, r) => {
|
|
690
762
|
const o = n.hasOwnProperty(r);
|
|
691
|
-
return n.constructor.createProperty(r,
|
|
692
|
-
})(
|
|
763
|
+
return n.constructor.createProperty(r, i), o ? Object.getOwnPropertyDescriptor(n, r) : void 0;
|
|
764
|
+
})(s, t, e);
|
|
693
765
|
}
|
|
694
766
|
/**
|
|
695
767
|
* @license
|
|
696
768
|
* Copyright 2017 Google LLC
|
|
697
769
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
698
770
|
*/
|
|
699
|
-
function
|
|
700
|
-
return S({ ...
|
|
771
|
+
function Ut(s) {
|
|
772
|
+
return S({ ...s, state: !0, attribute: !1 });
|
|
701
773
|
}
|
|
702
|
-
function
|
|
774
|
+
function ae(s, t) {
|
|
703
775
|
const e = document.createElement("template");
|
|
704
|
-
return e.innerHTML =
|
|
705
|
-
get(
|
|
776
|
+
return e.innerHTML = s.trim(), t.append(e.content.cloneNode(!0)), new Proxy({}, {
|
|
777
|
+
get(i, n) {
|
|
706
778
|
if (n === "fragment")
|
|
707
779
|
return t;
|
|
708
780
|
if (typeof n == "string") {
|
|
@@ -714,109 +786,39 @@ function ne(i, t) {
|
|
|
714
786
|
}
|
|
715
787
|
});
|
|
716
788
|
}
|
|
717
|
-
const
|
|
789
|
+
const at = class at extends y {
|
|
718
790
|
constructor(t) {
|
|
719
791
|
super();
|
|
720
792
|
const e = this.createRenderRoot();
|
|
721
|
-
this.$ =
|
|
793
|
+
this.$ = ae(t, e);
|
|
722
794
|
}
|
|
723
795
|
connectedCallback() {
|
|
724
796
|
super.connectedCallback();
|
|
725
797
|
let t = this.css;
|
|
726
798
|
Array.isArray(t) || (t = [t]);
|
|
727
|
-
const e = t.map((
|
|
799
|
+
const e = t.map((i) => i instanceof Tt ? i.styleSheet : P(i).styleSheet);
|
|
728
800
|
this.shadowRoot.adoptedStyleSheets = e;
|
|
729
801
|
}
|
|
730
802
|
};
|
|
731
|
-
|
|
803
|
+
at.DEFINITION = {
|
|
732
804
|
classes: [],
|
|
733
805
|
attributes: {}
|
|
734
806
|
};
|
|
735
|
-
let
|
|
736
|
-
var re = function(i, t, e, s) {
|
|
737
|
-
function n(r) {
|
|
738
|
-
return r instanceof e ? r : new e(function(o) {
|
|
739
|
-
o(r);
|
|
740
|
-
});
|
|
741
|
-
}
|
|
742
|
-
return new (e || (e = Promise))(function(r, o) {
|
|
743
|
-
function l(h) {
|
|
744
|
-
try {
|
|
745
|
-
d(s.next(h));
|
|
746
|
-
} catch (c) {
|
|
747
|
-
o(c);
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
function a(h) {
|
|
751
|
-
try {
|
|
752
|
-
d(s.throw(h));
|
|
753
|
-
} catch (c) {
|
|
754
|
-
o(c);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
function d(h) {
|
|
758
|
-
h.done ? r(h.value) : n(h.value).then(l, a);
|
|
759
|
-
}
|
|
760
|
-
d((s = s.apply(i, t || [])).next());
|
|
761
|
-
});
|
|
762
|
-
};
|
|
763
|
-
function oe() {
|
|
764
|
-
return re(this, void 0, void 0, function* () {
|
|
765
|
-
return new Promise((i) => {
|
|
766
|
-
if (document.readyState === "complete" || document.readyState === "interactive")
|
|
767
|
-
return i("loaded");
|
|
768
|
-
document.addEventListener("DOMContentLoaded", () => i("DOMContentLoaded"));
|
|
769
|
-
});
|
|
770
|
-
});
|
|
771
|
-
}
|
|
772
|
-
var ae = function(i, t, e, s) {
|
|
773
|
-
function n(r) {
|
|
774
|
-
return r instanceof e ? r : new e(function(o) {
|
|
775
|
-
o(r);
|
|
776
|
-
});
|
|
777
|
-
}
|
|
778
|
-
return new (e || (e = Promise))(function(r, o) {
|
|
779
|
-
function l(h) {
|
|
780
|
-
try {
|
|
781
|
-
d(s.next(h));
|
|
782
|
-
} catch (c) {
|
|
783
|
-
o(c);
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
function a(h) {
|
|
787
|
-
try {
|
|
788
|
-
d(s.throw(h));
|
|
789
|
-
} catch (c) {
|
|
790
|
-
o(c);
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
function d(h) {
|
|
794
|
-
h.done ? r(h.value) : n(h.value).then(l, a);
|
|
795
|
-
}
|
|
796
|
-
d((s = s.apply(i, t || [])).next());
|
|
797
|
-
});
|
|
798
|
-
};
|
|
799
|
-
function _t(i) {
|
|
800
|
-
return ae(this, void 0, void 0, function* () {
|
|
801
|
-
return new Promise((t) => {
|
|
802
|
-
window.setTimeout(() => t(), i);
|
|
803
|
-
});
|
|
804
|
-
});
|
|
805
|
-
}
|
|
807
|
+
let yt = at;
|
|
806
808
|
/**
|
|
807
809
|
* @license
|
|
808
810
|
* Copyright 2017 Google LLC
|
|
809
811
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
810
812
|
*/
|
|
811
|
-
const
|
|
812
|
-
class
|
|
813
|
+
const Nt = { ATTRIBUTE: 1, CHILD: 2 }, Ht = (s) => (...t) => ({ _$litDirective$: s, values: t });
|
|
814
|
+
class Lt {
|
|
813
815
|
constructor(t) {
|
|
814
816
|
}
|
|
815
817
|
get _$AU() {
|
|
816
818
|
return this._$AM._$AU;
|
|
817
819
|
}
|
|
818
|
-
_$AT(t, e,
|
|
819
|
-
this._$Ct = t, this._$AM = e, this._$Ci =
|
|
820
|
+
_$AT(t, e, i) {
|
|
821
|
+
this._$Ct = t, this._$AM = e, this._$Ci = i;
|
|
820
822
|
}
|
|
821
823
|
_$AS(t, e) {
|
|
822
824
|
return this.update(t, e);
|
|
@@ -830,22 +832,22 @@ class Ht {
|
|
|
830
832
|
* Copyright 2018 Google LLC
|
|
831
833
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
832
834
|
*/
|
|
833
|
-
const
|
|
834
|
-
constructor(
|
|
835
|
+
const bt = Ht(class extends Lt {
|
|
836
|
+
constructor(s) {
|
|
835
837
|
var t;
|
|
836
|
-
if (super(
|
|
838
|
+
if (super(s), s.type !== Nt.ATTRIBUTE || s.name !== "class" || ((t = s.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
837
839
|
}
|
|
838
|
-
render(
|
|
839
|
-
return " " + Object.keys(
|
|
840
|
+
render(s) {
|
|
841
|
+
return " " + Object.keys(s).filter((t) => s[t]).join(" ") + " ";
|
|
840
842
|
}
|
|
841
|
-
update(
|
|
842
|
-
var
|
|
843
|
+
update(s, [t]) {
|
|
844
|
+
var i, n;
|
|
843
845
|
if (this.st === void 0) {
|
|
844
|
-
this.st = /* @__PURE__ */ new Set(),
|
|
845
|
-
for (const r in t) t[r] && !((
|
|
846
|
+
this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((r) => r !== "")));
|
|
847
|
+
for (const r in t) t[r] && !((i = this.nt) != null && i.has(r)) && this.st.add(r);
|
|
846
848
|
return this.render(t);
|
|
847
849
|
}
|
|
848
|
-
const e =
|
|
850
|
+
const e = s.element.classList;
|
|
849
851
|
for (const r of this.st) r in t || (e.remove(r), this.st.delete(r));
|
|
850
852
|
for (const r in t) {
|
|
851
853
|
const o = !!t[r];
|
|
@@ -853,15 +855,17 @@ const yt = Nt(class extends Ht {
|
|
|
853
855
|
}
|
|
854
856
|
return E;
|
|
855
857
|
}
|
|
856
|
-
}), le = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--backdrop: rgba(var(--nt-dark-rgb), .5);--header-background: var(--nt-soft-primary);--background-color: var(--nt-white);--shadow-color: rgba(var(--nt-dark-rgb), .5);--padding: var(--nt-space);position:fixed;top:0;right:0;bottom:0;width:
|
|
857
|
-
var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, J = (
|
|
858
|
-
for (var n =
|
|
859
|
-
(o =
|
|
860
|
-
return
|
|
858
|
+
}), le = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--backdrop: rgba(var(--nt-dark-rgb), .5);--header-background: var(--nt-soft-primary);--background-color: var(--nt-white);--shadow-color: rgba(var(--nt-dark-rgb), .5);--padding: var(--nt-space);position:fixed;top:0;right:0;bottom:0;width:50%;min-width:300px;max-width:500px;z-index:9990;padding:0;display:block}:host[opened]{display:block}#offcanvas{display:flex;flex-direction:column;width:100%;height:100%;overflow:scroll;background-color:var(--background-color);box-shadow:0 0 10px var(--shadow-color);transition:transform .2s ease-in-out;transform:translate(0)}#offcanvas.closed{transform:translate(100%)}#header{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--header-background);flex-grow:0;padding:var(--padding)}#header:has(>slot[empty]){display:none}#main{display:flex;width:100%;flex-grow:1;padding:var(--padding);min-height:200px;overflow:auto;height:100%}#footer{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:center;margin-top:auto;flex-grow:0;padding:var(--padding)}#footer:has(>slot[empty]){display:none}#backdrop{opacity:1;transition:opacity .2s ease-in-out;position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--backdrop);z-index:-1;display:block}#backdrop.closed{opacity:0}";
|
|
859
|
+
var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, J = (s, t, e, i) => {
|
|
860
|
+
for (var n = i > 1 ? void 0 : i ? ce(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
861
|
+
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
862
|
+
return i && n && he(t, e, n), n;
|
|
861
863
|
};
|
|
862
|
-
let
|
|
864
|
+
let A = class extends g {
|
|
863
865
|
constructor() {
|
|
864
|
-
super(
|
|
866
|
+
super(), this.backdrop = !0, this.opened = !1, this.closedClass = !0, this.addEventListener("click", (s) => {
|
|
867
|
+
s === void 0 || !s.target || !(s.target instanceof HTMLElement) || s.target.closest("[data-nt-dismiss='offcanvas']") !== null && this.close();
|
|
868
|
+
});
|
|
865
869
|
}
|
|
866
870
|
static get is() {
|
|
867
871
|
return "nte-offcanvas";
|
|
@@ -878,23 +882,23 @@ let _ = class extends $ {
|
|
|
878
882
|
toggle() {
|
|
879
883
|
this.opened = !this.opened;
|
|
880
884
|
}
|
|
881
|
-
async updated(
|
|
882
|
-
|
|
885
|
+
async updated(s) {
|
|
886
|
+
s.has("opened") && (this.opened ? (this.style.display = "block", await lt(1), it.observeEmptySlots(this), this.closedClass = !1) : (this.closedClass = !0, await lt(400), this.style.display = "none"));
|
|
883
887
|
}
|
|
884
888
|
render() {
|
|
885
|
-
return
|
|
889
|
+
return R`
|
|
886
890
|
<div
|
|
887
891
|
id="backdrop"
|
|
888
892
|
part="backdrop"
|
|
889
893
|
@click=${() => this.opened = !1}
|
|
890
|
-
class=${
|
|
894
|
+
class=${bt({ closed: this.closedClass })}
|
|
891
895
|
></div>
|
|
892
896
|
<div
|
|
893
897
|
id="offcanvas"
|
|
894
898
|
part="offcanvas"
|
|
895
899
|
role="dialog"
|
|
896
900
|
aria-modal="true"
|
|
897
|
-
class=${
|
|
901
|
+
class=${bt({ closed: this.closedClass })}
|
|
898
902
|
?backdrop="${this.backdrop}"
|
|
899
903
|
>
|
|
900
904
|
<div id="header">
|
|
@@ -912,151 +916,160 @@ let _ = class extends $ {
|
|
|
912
916
|
`;
|
|
913
917
|
}
|
|
914
918
|
};
|
|
915
|
-
|
|
919
|
+
A.styles = [P(le)];
|
|
916
920
|
J([
|
|
917
921
|
S({ type: Boolean, reflect: !0 })
|
|
918
|
-
],
|
|
922
|
+
], A.prototype, "backdrop", 2);
|
|
919
923
|
J([
|
|
920
924
|
S({ type: Boolean, reflect: !0 })
|
|
921
|
-
],
|
|
925
|
+
], A.prototype, "opened", 2);
|
|
922
926
|
J([
|
|
923
|
-
|
|
924
|
-
],
|
|
925
|
-
|
|
926
|
-
F(
|
|
927
|
-
],
|
|
928
|
-
const de = ":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text-color);--hover-color: var(--nt-primary);--hover-text-color: var(--nt-text-on-primary);--transition: .2s ease-in-out;--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text);--justify-content: center;--sidemenu-bg: var(--nt-soft-primary);--justify-sidebar-burger: flex-end}";
|
|
929
|
-
var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor,
|
|
930
|
-
for (var n =
|
|
931
|
-
(o =
|
|
932
|
-
return
|
|
927
|
+
Ut()
|
|
928
|
+
], A.prototype, "closedClass", 2);
|
|
929
|
+
A = J([
|
|
930
|
+
F(A.is)
|
|
931
|
+
], A);
|
|
932
|
+
const de = ":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text-color);--hover-color: var(--nt-primary);--hover-text-color: var(--nt-text-on-primary);--transition: .2s ease-in-out;--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text);--justify-content: center;--sidemenu-bg: var(--nt-soft-primary);--justify-sidebar-burger: flex-end;--height: auto;height:var(--height);display:block}nav{height:100%}#main{height:100%}";
|
|
933
|
+
var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, z = (s, t, e, i) => {
|
|
934
|
+
for (var n = i > 1 ? void 0 : i ? ue(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
935
|
+
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
936
|
+
return i && n && pe(t, e, n), n;
|
|
933
937
|
};
|
|
934
|
-
let
|
|
938
|
+
let $ = class extends g {
|
|
935
939
|
constructor() {
|
|
936
|
-
super(), this.mode = "
|
|
937
|
-
|
|
938
|
-
|
|
940
|
+
super(), this.mode = "slave", this.breakpoint = "99999px", this.transferTo = "", this._isTransferred = !1;
|
|
941
|
+
}
|
|
942
|
+
getOffcanvas() {
|
|
943
|
+
return this.transferTo ? document.querySelector(this.transferTo) : null;
|
|
944
|
+
}
|
|
945
|
+
getOffcanvasNav() {
|
|
946
|
+
const s = this.getOffcanvas();
|
|
947
|
+
return s ? s.querySelector("nte-nav") : null;
|
|
939
948
|
}
|
|
940
949
|
render() {
|
|
941
|
-
|
|
942
|
-
<div class="nt-nav-links" id="main" part="main">
|
|
943
|
-
<slot id="main-slot"></slot>
|
|
944
|
-
</div>
|
|
945
|
-
`;
|
|
946
|
-
return L` <nav>
|
|
950
|
+
return R` <nav>
|
|
947
951
|
<slot
|
|
948
|
-
?hidden=${!this.
|
|
952
|
+
?hidden=${!this._isTransferred}
|
|
949
953
|
name="burger"
|
|
950
954
|
open
|
|
951
955
|
aria-haspopup="true"
|
|
952
956
|
id="burger"
|
|
953
957
|
class="burger"
|
|
954
|
-
@click=${() =>
|
|
958
|
+
@click=${() => {
|
|
959
|
+
var s;
|
|
960
|
+
return (s = this.getOffcanvas()) == null ? void 0 : s.open();
|
|
961
|
+
}}
|
|
955
962
|
>
|
|
956
963
|
<!-- fallback icon -->
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
964
|
+
${this._isTransferred ? R`<div style="display:flex; align-items: center; justify-content: center;">
|
|
965
|
+
<div id="text"><slot name="menu-text"></slot></div>
|
|
966
|
+
<nte-burger id="open-burger"></nte-burger>
|
|
967
|
+
</div>` : ""}
|
|
961
968
|
</slot>
|
|
962
|
-
|
|
969
|
+
<div class="nt-nav-links" id="main" part="main">
|
|
970
|
+
<slot id="main-slot"></slot>
|
|
971
|
+
</div>
|
|
963
972
|
</nav>`;
|
|
964
973
|
}
|
|
965
|
-
|
|
966
|
-
var
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
}
|
|
974
|
+
transferToElement(s) {
|
|
975
|
+
var i;
|
|
976
|
+
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("#main-slot");
|
|
977
|
+
Array.from(t.assignedElements({ flatten: !0 })).forEach((n) => {
|
|
978
|
+
n instanceof HTMLElement && s.appendChild(n);
|
|
979
|
+
});
|
|
971
980
|
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
981
|
+
updated(s) {
|
|
982
|
+
var t, e;
|
|
983
|
+
super.updated(s), this._isTransferred ? this.transferToElement(
|
|
984
|
+
this.getOffcanvasNav() ?? (() => {
|
|
985
|
+
throw new Error("No offcanvas nav found");
|
|
986
|
+
})()
|
|
987
|
+
) : ((t = this.getOffcanvasNav()) == null || t.transferToElement(this), (e = this.getOffcanvas()) == null || e.close());
|
|
977
988
|
}
|
|
978
|
-
|
|
979
|
-
|
|
989
|
+
firstUpdated(s) {
|
|
990
|
+
super.firstUpdated(s);
|
|
991
|
+
const t = this.classList;
|
|
992
|
+
!t.contains("nav-vertical") && !t.contains("nav-horizontal") && t.add(this.closest("nte-offcanvas") === null ? "nav-horizontal" : "nav-vertical");
|
|
980
993
|
}
|
|
981
|
-
connectedCallback() {
|
|
982
|
-
super.connectedCallback(), this.
|
|
983
|
-
|
|
984
|
-
}));
|
|
994
|
+
async connectedCallback() {
|
|
995
|
+
await Et(), super.connectedCallback(), this.mode !== "slave" && this.transferTo !== "" && (this._isTransferred = !1, this.breakpoint !== "" && (ht(this.breakpoint) || (this._isTransferred = !0), window.addEventListener("breakpoint-changed", (s) => {
|
|
996
|
+
ht(this.breakpoint) ? this._isTransferred = !1 : this._isTransferred = !0;
|
|
997
|
+
})));
|
|
985
998
|
}
|
|
986
999
|
};
|
|
987
|
-
|
|
1000
|
+
$.DEFINITION = {
|
|
988
1001
|
classes: ["align-left", "align-right", "align-center"],
|
|
989
1002
|
attributes: {}
|
|
990
1003
|
};
|
|
991
|
-
|
|
992
|
-
|
|
1004
|
+
$.styles = [P(de)];
|
|
1005
|
+
z([
|
|
993
1006
|
S({ type: String, reflect: !0 })
|
|
994
|
-
],
|
|
995
|
-
|
|
1007
|
+
], $.prototype, "mode", 2);
|
|
1008
|
+
z([
|
|
996
1009
|
S({ type: String, reflect: !0 })
|
|
997
|
-
],
|
|
998
|
-
|
|
999
|
-
S({ type: String, reflect: !0 })
|
|
1000
|
-
],
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
],
|
|
1004
|
-
|
|
1010
|
+
], $.prototype, "breakpoint", 2);
|
|
1011
|
+
z([
|
|
1012
|
+
S({ type: String, reflect: !0, attribute: "transfer-to" })
|
|
1013
|
+
], $.prototype, "transferTo", 2);
|
|
1014
|
+
z([
|
|
1015
|
+
Ut()
|
|
1016
|
+
], $.prototype, "_isTransferred", 2);
|
|
1017
|
+
$ = z([
|
|
1005
1018
|
F("nte-nav")
|
|
1006
|
-
],
|
|
1019
|
+
], $);
|
|
1007
1020
|
/**
|
|
1008
1021
|
* @license
|
|
1009
1022
|
* Copyright 2020 Google LLC
|
|
1010
1023
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1011
1024
|
*/
|
|
1012
|
-
const fe = (
|
|
1025
|
+
const fe = (s) => s.strings === void 0;
|
|
1013
1026
|
/**
|
|
1014
1027
|
* @license
|
|
1015
1028
|
* Copyright 2017 Google LLC
|
|
1016
1029
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1017
1030
|
*/
|
|
1018
|
-
const
|
|
1019
|
-
var
|
|
1020
|
-
const e =
|
|
1031
|
+
const N = (s, t) => {
|
|
1032
|
+
var i;
|
|
1033
|
+
const e = s._$AN;
|
|
1021
1034
|
if (e === void 0) return !1;
|
|
1022
|
-
for (const n of e) (
|
|
1035
|
+
for (const n of e) (i = n._$AO) == null || i.call(n, t, !1), N(n, t);
|
|
1023
1036
|
return !0;
|
|
1024
|
-
},
|
|
1037
|
+
}, q = (s) => {
|
|
1025
1038
|
let t, e;
|
|
1026
1039
|
do {
|
|
1027
|
-
if ((t =
|
|
1028
|
-
e = t._$AN, e.delete(
|
|
1040
|
+
if ((t = s._$AM) === void 0) break;
|
|
1041
|
+
e = t._$AN, e.delete(s), s = t;
|
|
1029
1042
|
} while ((e == null ? void 0 : e.size) === 0);
|
|
1030
|
-
},
|
|
1031
|
-
for (let t; t =
|
|
1043
|
+
}, Rt = (s) => {
|
|
1044
|
+
for (let t; t = s._$AM; s = t) {
|
|
1032
1045
|
let e = t._$AN;
|
|
1033
1046
|
if (e === void 0) t._$AN = e = /* @__PURE__ */ new Set();
|
|
1034
|
-
else if (e.has(
|
|
1035
|
-
e.add(
|
|
1047
|
+
else if (e.has(s)) break;
|
|
1048
|
+
e.add(s), ge(t);
|
|
1036
1049
|
}
|
|
1037
1050
|
};
|
|
1038
|
-
function ve(
|
|
1039
|
-
this._$AN !== void 0 ? (
|
|
1051
|
+
function ve(s) {
|
|
1052
|
+
this._$AN !== void 0 ? (q(this), this._$AM = s, Rt(this)) : this._$AM = s;
|
|
1040
1053
|
}
|
|
1041
|
-
function me(
|
|
1042
|
-
const
|
|
1043
|
-
if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(
|
|
1044
|
-
else
|
|
1045
|
-
else
|
|
1054
|
+
function me(s, t = !1, e = 0) {
|
|
1055
|
+
const i = this._$AH, n = this._$AN;
|
|
1056
|
+
if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(i)) for (let r = e; r < i.length; r++) N(i[r], !1), q(i[r]);
|
|
1057
|
+
else i != null && (N(i, !1), q(i));
|
|
1058
|
+
else N(this, s);
|
|
1046
1059
|
}
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1060
|
+
const ge = (s) => {
|
|
1061
|
+
s.type == Nt.CHILD && (s._$AP ?? (s._$AP = me), s._$AQ ?? (s._$AQ = ve));
|
|
1049
1062
|
};
|
|
1050
|
-
class
|
|
1063
|
+
class $e extends Lt {
|
|
1051
1064
|
constructor() {
|
|
1052
1065
|
super(...arguments), this._$AN = void 0;
|
|
1053
1066
|
}
|
|
1054
|
-
_$AT(t, e,
|
|
1055
|
-
super._$AT(t, e,
|
|
1067
|
+
_$AT(t, e, i) {
|
|
1068
|
+
super._$AT(t, e, i), Rt(this), this.isConnected = t._$AU;
|
|
1056
1069
|
}
|
|
1057
1070
|
_$AO(t, e = !0) {
|
|
1058
|
-
var
|
|
1059
|
-
t !== this.isConnected && (this.isConnected = t, t ? (
|
|
1071
|
+
var i, n;
|
|
1072
|
+
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (N(this, t), q(this));
|
|
1060
1073
|
}
|
|
1061
1074
|
setValue(t) {
|
|
1062
1075
|
if (fe(this._$Ct)) this._$Ct._$AI(t, this);
|
|
@@ -1075,28 +1088,28 @@ class _e extends Ht {
|
|
|
1075
1088
|
* Copyright 2020 Google LLC
|
|
1076
1089
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1077
1090
|
*/
|
|
1078
|
-
const
|
|
1079
|
-
class
|
|
1091
|
+
const wt = () => new _e();
|
|
1092
|
+
class _e {
|
|
1080
1093
|
}
|
|
1081
|
-
const et = /* @__PURE__ */ new WeakMap(),
|
|
1082
|
-
render(
|
|
1094
|
+
const et = /* @__PURE__ */ new WeakMap(), At = Ht(class extends $e {
|
|
1095
|
+
render(s) {
|
|
1083
1096
|
return p;
|
|
1084
1097
|
}
|
|
1085
|
-
update(
|
|
1086
|
-
var
|
|
1098
|
+
update(s, [t]) {
|
|
1099
|
+
var i;
|
|
1087
1100
|
const e = t !== this.G;
|
|
1088
|
-
return e && this.G !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.G = t, this.ht = (
|
|
1101
|
+
return e && this.G !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.G = t, this.ht = (i = s.options) == null ? void 0 : i.host, this.rt(this.ct = s.element)), p;
|
|
1089
1102
|
}
|
|
1090
|
-
rt(
|
|
1091
|
-
if (this.isConnected || (
|
|
1103
|
+
rt(s) {
|
|
1104
|
+
if (this.isConnected || (s = void 0), typeof this.G == "function") {
|
|
1092
1105
|
const t = this.ht ?? globalThis;
|
|
1093
1106
|
let e = et.get(t);
|
|
1094
|
-
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), et.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ht, void 0), e.set(this.G,
|
|
1095
|
-
} else this.G.value =
|
|
1107
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), et.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ht, void 0), e.set(this.G, s), s !== void 0 && this.G.call(this.ht, s);
|
|
1108
|
+
} else this.G.value = s;
|
|
1096
1109
|
}
|
|
1097
1110
|
get lt() {
|
|
1098
|
-
var
|
|
1099
|
-
return typeof this.G == "function" ? (
|
|
1111
|
+
var s, t;
|
|
1112
|
+
return typeof this.G == "function" ? (s = et.get(this.ht ?? globalThis)) == null ? void 0 : s.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
|
1100
1113
|
}
|
|
1101
1114
|
disconnected() {
|
|
1102
1115
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -1104,15 +1117,15 @@ const et = /* @__PURE__ */ new WeakMap(), bt = Nt(class extends _e {
|
|
|
1104
1117
|
reconnected() {
|
|
1105
1118
|
this.rt(this.ct);
|
|
1106
1119
|
}
|
|
1107
|
-
}),
|
|
1108
|
-
var be = Object.defineProperty, we = Object.getOwnPropertyDescriptor,
|
|
1109
|
-
for (var n =
|
|
1110
|
-
(o =
|
|
1111
|
-
return
|
|
1120
|
+
}), ye = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--bg: transparent;--spacer-bg: transparent;--container-width: var(--nt-container-width, 100%);--brand-height: 80px;margin:0}#wrapper{position:absolute;left:0;top:0;right:0;width:100%}#spacer{position:relative;top:0;left:0;width:100%;height:var(--brand-height);background-color:var(--spacer-bg)}#navbar{position:absolute;top:0;width:100%;height:auto;background-color:var(--bg);z-index:1000}#main{width:100%;display:block}";
|
|
1121
|
+
var be = Object.defineProperty, we = Object.getOwnPropertyDescriptor, jt = (s, t, e, i) => {
|
|
1122
|
+
for (var n = i > 1 ? void 0 : i ? we(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1123
|
+
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
1124
|
+
return i && n && be(t, e, n), n;
|
|
1112
1125
|
};
|
|
1113
|
-
let
|
|
1126
|
+
let V = class extends g {
|
|
1114
1127
|
constructor() {
|
|
1115
|
-
super(), this.navbarRef =
|
|
1128
|
+
super(), this.navbarRef = wt(), this.spacerRef = wt(), this.scrollThreshold = 0, this._lastScrollY = window.scrollY, this._scrollUpPixels = 0, this._debouncer = new St(100, 300), document.addEventListener(
|
|
1116
1129
|
"scroll",
|
|
1117
1130
|
async () => {
|
|
1118
1131
|
this.updateScrollState();
|
|
@@ -1124,77 +1137,74 @@ let q = class extends $ {
|
|
|
1124
1137
|
return "nte-navbar";
|
|
1125
1138
|
}
|
|
1126
1139
|
updateScrollState() {
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1129
|
-
this.classList.add("state-scrolled-top"), this.classList.remove("state-pre-scrolled");
|
|
1130
|
-
return;
|
|
1131
|
-
} else
|
|
1132
|
-
this.classList.remove("state-scrolled-top"), this.classList.remove("state-scrolling-up");
|
|
1133
|
-
i < this._lastScrollY ? (this.classList.add("state-scrolling-up"), this.classList.remove("state-scrolling-down")) : (this.classList.remove("state-scrolling-up"), this.classList.add("state-scrolling-down")), i > this.scrollThreshold ? (this.classList.add("state-scrolled"), this.classList.remove("state-pre-scrolled")) : (this.classList.add("state-pre-scrolled"), this.classList.remove("state-scrolled")), this._lastScrollY = i;
|
|
1140
|
+
const s = window.scrollY;
|
|
1141
|
+
s > 1 ? this.classList.add("is-scrolled") : this.classList.remove("is-scrolled"), s < this._lastScrollY ? (this._scrollUpPixels += this._lastScrollY - s, this._scrollUpPixels > 10 && s < this.scrollThreshold && this.classList.add("is-scrolling-up")) : (this._scrollUpPixels = 0, this.classList.remove("is-scrolling-up")), s > this.scrollThreshold ? this.classList.add("is-below-threshold") : this.classList.remove("is-below-threshold"), this._lastScrollY = s;
|
|
1134
1142
|
}
|
|
1135
1143
|
async connectedCallback() {
|
|
1136
|
-
this.updateScrollState(), await
|
|
1144
|
+
this.updateScrollState(), await Et(), super.connectedCallback();
|
|
1137
1145
|
}
|
|
1138
1146
|
// Adjust the spacer height on every render
|
|
1139
|
-
updated(
|
|
1140
|
-
super.updated(
|
|
1147
|
+
updated(s) {
|
|
1148
|
+
super.updated(s);
|
|
1141
1149
|
const t = this.navbarRef.value, e = this.spacerRef.value;
|
|
1142
1150
|
t && e && (e.style.height = `${t.offsetHeight}px`);
|
|
1143
1151
|
}
|
|
1144
|
-
firstUpdated(
|
|
1145
|
-
|
|
1152
|
+
firstUpdated(s) {
|
|
1153
|
+
it.observeEmptySlots(this);
|
|
1146
1154
|
}
|
|
1147
1155
|
render() {
|
|
1148
|
-
return
|
|
1156
|
+
return R`
|
|
1149
1157
|
<div id="wrapper" part="wrapper">
|
|
1150
|
-
<div id="spacer" part="spacer" ${
|
|
1151
|
-
<div id="navbar" part="navbar" ${
|
|
1152
|
-
<div id="
|
|
1153
|
-
<
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
<
|
|
1157
|
-
<slot></slot>
|
|
1158
|
-
</div>
|
|
1158
|
+
<div id="spacer" part="spacer" ${At(this.spacerRef)}></div>
|
|
1159
|
+
<div id="navbar" part="navbar" ${At(this.navbarRef)}>
|
|
1160
|
+
<div id="brand" part="brand">
|
|
1161
|
+
<slot name="brand"></slot>
|
|
1162
|
+
</div>
|
|
1163
|
+
<div id="main">
|
|
1164
|
+
<slot></slot>
|
|
1159
1165
|
</div>
|
|
1160
1166
|
</div>
|
|
1161
1167
|
</div>
|
|
1162
1168
|
`;
|
|
1163
1169
|
}
|
|
1164
1170
|
};
|
|
1165
|
-
|
|
1166
|
-
|
|
1171
|
+
V.styles = [P(ye)];
|
|
1172
|
+
jt([
|
|
1167
1173
|
S({ type: Number, attribute: "scroll-threshold", reflect: !0 })
|
|
1168
|
-
],
|
|
1169
|
-
|
|
1174
|
+
], V.prototype, "scrollThreshold", 2);
|
|
1175
|
+
V = jt([
|
|
1170
1176
|
F("nte-navbar")
|
|
1171
|
-
],
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1177
|
+
], V);
|
|
1178
|
+
const Ae = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--container-width: var(--nt-container-width, 100%);--background: transparent;--text-color: var(--nt-text);--height: auto;display:block;height:100%}:host(.hide-on-scroll){transition:max-height .3s ease-in-out;max-height:100px}:host(.hide-on-scroll.is-scrolled){max-height:0;overflow:hidden}#main{height:var(--height);transition:height .2s ease-in-out;overflow:visible;width:100%;display:flex;background:var(--background)}#container{width:var(--container-width);margin:0 auto;display:flex}#container #brand{width:auto;align-items:start;display:flex;height:100%;justify-items:center}#container #brand:has(slot[empty]){display:none}#container #brand slot::slotted(img){height:var(--brand-height);width:auto}#container #nav{display:flex;flex-grow:1;justify-content:end;align-items:center;gap:1rem}";
|
|
1179
|
+
var xe = Object.getOwnPropertyDescriptor, Ee = (s, t, e, i) => {
|
|
1180
|
+
for (var n = i > 1 ? void 0 : i ? xe(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1181
|
+
(o = s[r]) && (n = o(n) || n);
|
|
1175
1182
|
return n;
|
|
1176
1183
|
};
|
|
1177
|
-
let
|
|
1184
|
+
let st = class extends g {
|
|
1178
1185
|
static get is() {
|
|
1179
1186
|
return "nte-navbar-line";
|
|
1180
1187
|
}
|
|
1181
|
-
createRenderRoot() {
|
|
1182
|
-
return this.attachShadow({ mode: "open" });
|
|
1183
|
-
}
|
|
1184
1188
|
connectedCallback() {
|
|
1185
|
-
super.connectedCallback()
|
|
1189
|
+
super.connectedCallback(), window.addEventListener(
|
|
1190
|
+
"scroll",
|
|
1191
|
+
() => {
|
|
1192
|
+
window.scrollY > 0 ? this.classList.add("is-scrolled") : this.classList.remove("is-scrolled");
|
|
1193
|
+
},
|
|
1194
|
+
{ passive: !0 }
|
|
1195
|
+
);
|
|
1196
|
+
}
|
|
1197
|
+
firstUpdated(s) {
|
|
1198
|
+
it.observeEmptySlots(this);
|
|
1186
1199
|
}
|
|
1187
1200
|
render() {
|
|
1188
|
-
return
|
|
1189
|
-
<div id="main">
|
|
1190
|
-
<div id="
|
|
1191
|
-
<div id="
|
|
1192
|
-
<slot name="
|
|
1201
|
+
return R`
|
|
1202
|
+
<div id="main" part="main">
|
|
1203
|
+
<div id="container" part="container">
|
|
1204
|
+
<div id="brand" part="brand">
|
|
1205
|
+
<slot name="brand"></slot>
|
|
1193
1206
|
</div>
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
<div id="navbar" part="navbar">
|
|
1197
|
-
<div id="container" part="container">
|
|
1207
|
+
<div id="nav" part="nav">
|
|
1198
1208
|
<slot></slot>
|
|
1199
1209
|
</div>
|
|
1200
1210
|
</div>
|
|
@@ -1202,10 +1212,12 @@ let wt = class extends $ {
|
|
|
1202
1212
|
`;
|
|
1203
1213
|
}
|
|
1204
1214
|
};
|
|
1205
|
-
|
|
1215
|
+
st.styles = [P(Ae)];
|
|
1216
|
+
st = Ee([
|
|
1206
1217
|
F("nte-navbar-line")
|
|
1207
|
-
],
|
|
1218
|
+
], st);
|
|
1219
|
+
console.log("Loading nte-nav...");
|
|
1208
1220
|
export {
|
|
1209
|
-
|
|
1210
|
-
|
|
1221
|
+
$ as NteNav,
|
|
1222
|
+
V as NteNavbar
|
|
1211
1223
|
};
|