@florid-kit/components 0.3.17 → 0.3.18
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/index.js +75 -56
- package/index.mjs +371 -350
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
*/
|
|
6
6
|
const W = globalThis, at = W.ShadowRoot && (W.ShadyCSS === void 0 || W.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, lt = Symbol(), ut = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let At = class {
|
|
8
|
-
constructor(t, e,
|
|
9
|
-
if (this._$cssResult$ = !0,
|
|
8
|
+
constructor(t, e, s) {
|
|
9
|
+
if (this._$cssResult$ = !0, s !== lt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = t, this.t = e;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let t = this.o;
|
|
14
14
|
const e = this.t;
|
|
15
15
|
if (at && t === void 0) {
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const s = e !== void 0 && e.length === 1;
|
|
17
|
+
s && (t = ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && ut.set(e, t));
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
20
|
}
|
|
@@ -22,59 +22,59 @@ let At = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const Pt = (
|
|
26
|
-
const e =
|
|
27
|
-
if (
|
|
28
|
-
if (typeof
|
|
29
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
30
|
-
})(
|
|
31
|
-
return new At(e,
|
|
32
|
-
}, Bt = (
|
|
33
|
-
if (at)
|
|
25
|
+
const Pt = (o) => new At(typeof o == "string" ? o : o + "", void 0, lt), E = (o, ...t) => {
|
|
26
|
+
const e = o.length === 1 ? o[0] : t.reduce((s, n, i) => s + ((r) => {
|
|
27
|
+
if (r._$cssResult$ === !0) return r.cssText;
|
|
28
|
+
if (typeof r == "number") return r;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
+
})(n) + o[i + 1], o[0]);
|
|
31
|
+
return new At(e, o, lt);
|
|
32
|
+
}, Bt = (o, t) => {
|
|
33
|
+
if (at) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const s = document.createElement("style"), n = W.litNonce;
|
|
36
|
+
n !== void 0 && s.setAttribute("nonce", n), s.textContent = e.cssText, o.appendChild(s);
|
|
37
37
|
}
|
|
38
|
-
}, ft = at ? (
|
|
38
|
+
}, ft = at ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
|
-
for (const
|
|
40
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
41
41
|
return Pt(e);
|
|
42
|
-
})(
|
|
42
|
+
})(o) : o;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: kt, defineProperty: Ot, getOwnPropertyDescriptor: Ht, getOwnPropertyNames: Mt, getOwnPropertySymbols: It, getPrototypeOf:
|
|
48
|
+
const { is: kt, defineProperty: Ot, getOwnPropertyDescriptor: Ht, getOwnPropertyNames: Mt, getOwnPropertySymbols: It, getPrototypeOf: zt } = Object, S = globalThis, gt = S.trustedTypes, Ut = gt ? gt.emptyScript : "", tt = S.reactiveElementPolyfillSupport, N = (o, t) => o, G = { toAttribute(o, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
|
|
51
|
+
o = o ? Ut : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
55
|
-
|
|
55
|
+
o = o == null ? o : JSON.stringify(o);
|
|
56
56
|
}
|
|
57
|
-
return
|
|
58
|
-
}, fromAttribute(
|
|
59
|
-
let e =
|
|
57
|
+
return o;
|
|
58
|
+
}, fromAttribute(o, t) {
|
|
59
|
+
let e = o;
|
|
60
60
|
switch (t) {
|
|
61
61
|
case Boolean:
|
|
62
|
-
e =
|
|
62
|
+
e = o !== null;
|
|
63
63
|
break;
|
|
64
64
|
case Number:
|
|
65
|
-
e =
|
|
65
|
+
e = o === null ? null : Number(o);
|
|
66
66
|
break;
|
|
67
67
|
case Object:
|
|
68
68
|
case Array:
|
|
69
69
|
try {
|
|
70
|
-
e = JSON.parse(
|
|
70
|
+
e = JSON.parse(o);
|
|
71
71
|
} catch {
|
|
72
72
|
e = null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} }, ct = (
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
76
|
+
} }, ct = (o, t) => !kt(o, t), vt = { attribute: !0, type: String, converter: G, reflect: !1, useDefault: !1, hasChanged: ct };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), S.litPropertyMetadata ?? (S.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let M = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
@@ -84,19 +84,19 @@ let M = class extends HTMLElement {
|
|
|
84
84
|
}
|
|
85
85
|
static createProperty(t, e = vt) {
|
|
86
86
|
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) {
|
|
87
|
-
const
|
|
88
|
-
|
|
87
|
+
const s = Symbol(), n = this.getPropertyDescriptor(t, s, e);
|
|
88
|
+
n !== void 0 && Ot(this.prototype, t, n);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
static getPropertyDescriptor(t, e,
|
|
92
|
-
const { get:
|
|
91
|
+
static getPropertyDescriptor(t, e, s) {
|
|
92
|
+
const { get: n, set: i } = Ht(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
|
-
}, set(
|
|
95
|
-
this[e] =
|
|
94
|
+
}, set(r) {
|
|
95
|
+
this[e] = r;
|
|
96
96
|
} };
|
|
97
|
-
return { get:
|
|
98
|
-
const c =
|
|
99
|
-
|
|
97
|
+
return { get: n, set(r) {
|
|
98
|
+
const c = n == null ? void 0 : n.call(this);
|
|
99
|
+
i == null || i.call(this, r), this.requestUpdate(t, c, s);
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
@@ -104,38 +104,38 @@ let M = class extends HTMLElement {
|
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
106
|
if (this.hasOwnProperty(N("elementProperties"))) return;
|
|
107
|
-
const t =
|
|
107
|
+
const t = zt(this);
|
|
108
108
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
111
|
if (this.hasOwnProperty(N("finalized"))) return;
|
|
112
112
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(N("properties"))) {
|
|
113
|
-
const e = this.properties,
|
|
114
|
-
for (const
|
|
113
|
+
const e = this.properties, s = [...Mt(e), ...It(e)];
|
|
114
|
+
for (const n of s) this.createProperty(n, e[n]);
|
|
115
115
|
}
|
|
116
116
|
const t = this[Symbol.metadata];
|
|
117
117
|
if (t !== null) {
|
|
118
118
|
const e = litPropertyMetadata.get(t);
|
|
119
|
-
if (e !== void 0) for (const [
|
|
119
|
+
if (e !== void 0) for (const [s, n] of e) this.elementProperties.set(s, n);
|
|
120
120
|
}
|
|
121
121
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const [e,
|
|
123
|
-
const
|
|
124
|
-
|
|
122
|
+
for (const [e, s] of this.elementProperties) {
|
|
123
|
+
const n = this._$Eu(e, s);
|
|
124
|
+
n !== void 0 && this._$Eh.set(n, e);
|
|
125
125
|
}
|
|
126
126
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
127
|
}
|
|
128
128
|
static finalizeStyles(t) {
|
|
129
129
|
const e = [];
|
|
130
130
|
if (Array.isArray(t)) {
|
|
131
|
-
const
|
|
132
|
-
for (const
|
|
131
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
|
132
|
+
for (const n of s) e.unshift(ft(n));
|
|
133
133
|
} else t !== void 0 && e.push(ft(t));
|
|
134
134
|
return e;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(t, e) {
|
|
137
|
-
const
|
|
138
|
-
return
|
|
137
|
+
const s = e.attribute;
|
|
138
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
139
139
|
}
|
|
140
140
|
constructor() {
|
|
141
141
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
@@ -154,7 +154,7 @@ let M = class extends HTMLElement {
|
|
|
154
154
|
}
|
|
155
155
|
_$E_() {
|
|
156
156
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
157
|
-
for (const
|
|
157
|
+
for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
158
158
|
t.size > 0 && (this._$Ep = t);
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
@@ -164,8 +164,8 @@ let M = class extends HTMLElement {
|
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var t;
|
|
166
166
|
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
167
|
-
var
|
|
168
|
-
return (
|
|
167
|
+
var s;
|
|
168
|
+
return (s = e.hostConnected) == null ? void 0 : s.call(e);
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
enableUpdating(t) {
|
|
@@ -173,40 +173,40 @@ let M = class extends HTMLElement {
|
|
|
173
173
|
disconnectedCallback() {
|
|
174
174
|
var t;
|
|
175
175
|
(t = this._$EO) == null || t.forEach((e) => {
|
|
176
|
-
var
|
|
177
|
-
return (
|
|
176
|
+
var s;
|
|
177
|
+
return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
attributeChangedCallback(t, e,
|
|
181
|
-
this._$AK(t,
|
|
180
|
+
attributeChangedCallback(t, e, s) {
|
|
181
|
+
this._$AK(t, s);
|
|
182
182
|
}
|
|
183
183
|
_$ET(t, e) {
|
|
184
|
-
var
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const
|
|
188
|
-
this._$Em = t,
|
|
184
|
+
var i;
|
|
185
|
+
const s = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, s);
|
|
186
|
+
if (n !== void 0 && s.reflect === !0) {
|
|
187
|
+
const r = (((i = s.converter) == null ? void 0 : i.toAttribute) !== void 0 ? s.converter : G).toAttribute(e, s.type);
|
|
188
|
+
this._$Em = t, r == null ? this.removeAttribute(n) : this.setAttribute(n, r), this._$Em = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
_$AK(t, e) {
|
|
192
|
-
var
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
const c =
|
|
196
|
-
this._$Em =
|
|
192
|
+
var i, r;
|
|
193
|
+
const s = this.constructor, n = s._$Eh.get(t);
|
|
194
|
+
if (n !== void 0 && this._$Em !== n) {
|
|
195
|
+
const c = s.getPropertyOptions(n), a = typeof c.converter == "function" ? { fromAttribute: c.converter } : ((i = c.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? c.converter : G;
|
|
196
|
+
this._$Em = n, this[n] = a.fromAttribute(e, c.type) ?? ((r = this._$Ej) == null ? void 0 : r.get(n)) ?? null, this._$Em = null;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
requestUpdate(t, e,
|
|
200
|
-
var
|
|
199
|
+
requestUpdate(t, e, s) {
|
|
200
|
+
var n;
|
|
201
201
|
if (t !== void 0) {
|
|
202
|
-
const
|
|
203
|
-
if (
|
|
204
|
-
this.C(t, e,
|
|
202
|
+
const i = this.constructor, r = this[t];
|
|
203
|
+
if (s ?? (s = i.getPropertyOptions(t)), !((s.hasChanged ?? ct)(r, e) || s.useDefault && s.reflect && r === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(i._$Eu(t, s)))) return;
|
|
204
|
+
this.C(t, e, s);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
207
207
|
}
|
|
208
|
-
C(t, e, { useDefault:
|
|
209
|
-
|
|
208
|
+
C(t, e, { useDefault: s, reflect: n, wrapped: i }, r) {
|
|
209
|
+
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, r ?? e ?? this[t]), i !== !0 || r !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), n === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
210
210
|
}
|
|
211
211
|
async _$EP() {
|
|
212
212
|
this.isUpdatePending = !0;
|
|
@@ -222,28 +222,28 @@ let M = class extends HTMLElement {
|
|
|
222
222
|
return this.performUpdate();
|
|
223
223
|
}
|
|
224
224
|
performUpdate() {
|
|
225
|
-
var
|
|
225
|
+
var s;
|
|
226
226
|
if (!this.isUpdatePending) return;
|
|
227
227
|
if (!this.hasUpdated) {
|
|
228
228
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
229
|
-
for (const [
|
|
229
|
+
for (const [i, r] of this._$Ep) this[i] = r;
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
|
-
const
|
|
233
|
-
if (
|
|
234
|
-
const { wrapped: c } =
|
|
235
|
-
c !== !0 || this._$AL.has(
|
|
232
|
+
const n = this.constructor.elementProperties;
|
|
233
|
+
if (n.size > 0) for (const [i, r] of n) {
|
|
234
|
+
const { wrapped: c } = r, a = this[i];
|
|
235
|
+
c !== !0 || this._$AL.has(i) || a === void 0 || this.C(i, void 0, r, a);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
let t = !1;
|
|
239
239
|
const e = this._$AL;
|
|
240
240
|
try {
|
|
241
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (
|
|
242
|
-
var
|
|
243
|
-
return (
|
|
241
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((n) => {
|
|
242
|
+
var i;
|
|
243
|
+
return (i = n.hostUpdate) == null ? void 0 : i.call(n);
|
|
244
244
|
}), this.update(e)) : this._$EM();
|
|
245
|
-
} catch (
|
|
246
|
-
throw t = !1, this._$EM(),
|
|
245
|
+
} catch (n) {
|
|
246
|
+
throw t = !1, this._$EM(), n;
|
|
247
247
|
}
|
|
248
248
|
t && this._$AE(e);
|
|
249
249
|
}
|
|
@@ -251,9 +251,9 @@ let M = class extends HTMLElement {
|
|
|
251
251
|
}
|
|
252
252
|
_$AE(t) {
|
|
253
253
|
var e;
|
|
254
|
-
(e = this._$EO) == null || e.forEach((
|
|
255
|
-
var
|
|
256
|
-
return (
|
|
254
|
+
(e = this._$EO) == null || e.forEach((s) => {
|
|
255
|
+
var n;
|
|
256
|
+
return (n = s.hostUpdated) == null ? void 0 : n.call(s);
|
|
257
257
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
258
258
|
}
|
|
259
259
|
_$EM() {
|
|
@@ -276,74 +276,74 @@ let M = class extends HTMLElement {
|
|
|
276
276
|
firstUpdated(t) {
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
M.elementStyles = [], M.shadowRootOptions = { mode: "open" }, M[N("elementProperties")] = /* @__PURE__ */ new Map(), M[N("finalized")] = /* @__PURE__ */ new Map(), tt == null || tt({ ReactiveElement: M }), (
|
|
279
|
+
M.elementStyles = [], M.shadowRootOptions = { mode: "open" }, M[N("elementProperties")] = /* @__PURE__ */ new Map(), M[N("finalized")] = /* @__PURE__ */ new Map(), tt == null || tt({ ReactiveElement: M }), (S.reactiveElementVersions ?? (S.reactiveElementVersions = [])).push("2.1.0");
|
|
280
280
|
/**
|
|
281
281
|
* @license
|
|
282
282
|
* Copyright 2017 Google LLC
|
|
283
283
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
284
284
|
*/
|
|
285
|
-
const j = globalThis,
|
|
285
|
+
const j = globalThis, K = j.trustedTypes, bt = K ? K.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, St = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Et = "?" + A, Tt = `<${Et}>`, k = document, R = () => k.createComment(""), F = (o) => o === null || typeof o != "object" && typeof o != "function", ht = Array.isArray, Dt = (o) => ht(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", et = `[
|
|
286
286
|
\f\r]`, D = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, yt = /-->/g, $t = />/g, L = RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
|
|
287
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, wt = /"/g, Ct = /^(?:script|style|textarea|title)$/i, Nt = (
|
|
288
|
-
function Lt(
|
|
289
|
-
if (!ht(
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, wt = /"/g, Ct = /^(?:script|style|textarea|title)$/i, Nt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), p = Nt(1), O = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), _t = /* @__PURE__ */ new WeakMap(), P = k.createTreeWalker(k, 129);
|
|
288
|
+
function Lt(o, t) {
|
|
289
|
+
if (!ht(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
290
|
return bt !== void 0 ? bt.createHTML(t) : t;
|
|
291
291
|
}
|
|
292
|
-
const jt = (
|
|
293
|
-
const e =
|
|
294
|
-
let
|
|
292
|
+
const jt = (o, t) => {
|
|
293
|
+
const e = o.length - 1, s = [];
|
|
294
|
+
let n, i = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = D;
|
|
295
295
|
for (let c = 0; c < e; c++) {
|
|
296
|
-
const a =
|
|
297
|
-
let f, g,
|
|
298
|
-
for (; w < a.length && (
|
|
299
|
-
const x =
|
|
300
|
-
|
|
296
|
+
const a = o[c];
|
|
297
|
+
let f, g, d = -1, w = 0;
|
|
298
|
+
for (; w < a.length && (r.lastIndex = w, g = r.exec(a), g !== null); ) w = r.lastIndex, r === D ? g[1] === "!--" ? r = yt : g[1] !== void 0 ? r = $t : g[2] !== void 0 ? (Ct.test(g[2]) && (n = RegExp("</" + g[2], "g")), r = L) : g[3] !== void 0 && (r = L) : r === L ? g[0] === ">" ? (r = n ?? D, d = -1) : g[1] === void 0 ? d = -2 : (d = r.lastIndex - g[2].length, f = g[1], r = g[3] === void 0 ? L : g[3] === '"' ? wt : mt) : r === wt || r === mt ? r = L : r === yt || r === $t ? r = D : (r = L, n = void 0);
|
|
299
|
+
const x = r === L && o[c + 1].startsWith("/>") ? " " : "";
|
|
300
|
+
i += r === D ? a + Tt : d >= 0 ? (s.push(f), a.slice(0, d) + St + a.slice(d) + A + x) : a + A + (d === -2 ? c : x);
|
|
301
301
|
}
|
|
302
|
-
return [Lt(
|
|
302
|
+
return [Lt(o, i + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
303
303
|
};
|
|
304
304
|
class V {
|
|
305
|
-
constructor({ strings: t, _$litType$: e },
|
|
306
|
-
let
|
|
305
|
+
constructor({ strings: t, _$litType$: e }, s) {
|
|
306
|
+
let n;
|
|
307
307
|
this.parts = [];
|
|
308
|
-
let
|
|
308
|
+
let i = 0, r = 0;
|
|
309
309
|
const c = t.length - 1, a = this.parts, [f, g] = jt(t, e);
|
|
310
|
-
if (this.el = V.createElement(f,
|
|
311
|
-
const
|
|
312
|
-
|
|
310
|
+
if (this.el = V.createElement(f, s), P.currentNode = this.el.content, e === 2 || e === 3) {
|
|
311
|
+
const d = this.el.content.firstChild;
|
|
312
|
+
d.replaceWith(...d.childNodes);
|
|
313
313
|
}
|
|
314
|
-
for (; (
|
|
315
|
-
if (
|
|
316
|
-
if (
|
|
317
|
-
const w = g[
|
|
318
|
-
a.push({ type: 1, index:
|
|
319
|
-
} else
|
|
320
|
-
if (Ct.test(
|
|
321
|
-
const
|
|
314
|
+
for (; (n = P.nextNode()) !== null && a.length < c; ) {
|
|
315
|
+
if (n.nodeType === 1) {
|
|
316
|
+
if (n.hasAttributes()) for (const d of n.getAttributeNames()) if (d.endsWith(St)) {
|
|
317
|
+
const w = g[r++], x = n.getAttribute(d).split(A), q = /([.?@])?(.*)/.exec(w);
|
|
318
|
+
a.push({ type: 1, index: i, name: q[2], strings: x, ctor: q[1] === "." ? Ft : q[1] === "?" ? Vt : q[1] === "@" ? Zt : J }), n.removeAttribute(d);
|
|
319
|
+
} else d.startsWith(A) && (a.push({ type: 6, index: i }), n.removeAttribute(d));
|
|
320
|
+
if (Ct.test(n.tagName)) {
|
|
321
|
+
const d = n.textContent.split(A), w = d.length - 1;
|
|
322
322
|
if (w > 0) {
|
|
323
|
-
|
|
324
|
-
for (let x = 0; x < w; x++)
|
|
325
|
-
|
|
323
|
+
n.textContent = K ? K.emptyScript : "";
|
|
324
|
+
for (let x = 0; x < w; x++) n.append(d[x], R()), P.nextNode(), a.push({ type: 2, index: ++i });
|
|
325
|
+
n.append(d[w], R());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
} else if (
|
|
328
|
+
} else if (n.nodeType === 8) if (n.data === Et) a.push({ type: 2, index: i });
|
|
329
329
|
else {
|
|
330
|
-
let
|
|
331
|
-
for (; (
|
|
330
|
+
let d = -1;
|
|
331
|
+
for (; (d = n.data.indexOf(A, d + 1)) !== -1; ) a.push({ type: 7, index: i }), d += A.length - 1;
|
|
332
332
|
}
|
|
333
|
-
|
|
333
|
+
i++;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
static createElement(t, e) {
|
|
337
|
-
const
|
|
338
|
-
return
|
|
337
|
+
const s = k.createElement("template");
|
|
338
|
+
return s.innerHTML = t, s;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
function I(
|
|
342
|
-
var
|
|
341
|
+
function I(o, t, e = o, s) {
|
|
342
|
+
var r, c;
|
|
343
343
|
if (t === O) return t;
|
|
344
|
-
let
|
|
345
|
-
const
|
|
346
|
-
return (
|
|
344
|
+
let n = s !== void 0 ? (r = e._$Co) == null ? void 0 : r[s] : e._$Cl;
|
|
345
|
+
const i = F(t) ? void 0 : t._$litDirective$;
|
|
346
|
+
return (n == null ? void 0 : n.constructor) !== i && ((c = n == null ? void 0 : n._$AO) == null || c.call(n, !1), i === void 0 ? n = void 0 : (n = new i(o), n._$AT(o, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = n : e._$Cl = n), n !== void 0 && (t = I(o, n._$AS(o, t.values), n, s)), t;
|
|
347
347
|
}
|
|
348
348
|
class Rt {
|
|
349
349
|
constructor(t, e) {
|
|
@@ -356,21 +356,21 @@ class Rt {
|
|
|
356
356
|
return this._$AM._$AU;
|
|
357
357
|
}
|
|
358
358
|
u(t) {
|
|
359
|
-
const { el: { content: e }, parts:
|
|
360
|
-
P.currentNode =
|
|
361
|
-
let
|
|
359
|
+
const { el: { content: e }, parts: s } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? k).importNode(e, !0);
|
|
360
|
+
P.currentNode = n;
|
|
361
|
+
let i = P.nextNode(), r = 0, c = 0, a = s[0];
|
|
362
362
|
for (; a !== void 0; ) {
|
|
363
|
-
if (
|
|
363
|
+
if (r === a.index) {
|
|
364
364
|
let f;
|
|
365
|
-
a.type === 2 ? f = new Z(
|
|
365
|
+
a.type === 2 ? f = new Z(i, i.nextSibling, this, t) : a.type === 1 ? f = new a.ctor(i, a.name, a.strings, this, t) : a.type === 6 && (f = new qt(i, this, t)), this._$AV.push(f), a = s[++c];
|
|
366
366
|
}
|
|
367
|
-
|
|
367
|
+
r !== (a == null ? void 0 : a.index) && (i = P.nextNode(), r++);
|
|
368
368
|
}
|
|
369
|
-
return P.currentNode = k,
|
|
369
|
+
return P.currentNode = k, n;
|
|
370
370
|
}
|
|
371
371
|
p(t) {
|
|
372
372
|
let e = 0;
|
|
373
|
-
for (const
|
|
373
|
+
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
class Z {
|
|
@@ -378,8 +378,8 @@ class Z {
|
|
|
378
378
|
var t;
|
|
379
379
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
380
380
|
}
|
|
381
|
-
constructor(t, e,
|
|
382
|
-
this.type = 2, this._$AH = h, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM =
|
|
381
|
+
constructor(t, e, s, n) {
|
|
382
|
+
this.type = 2, this._$AH = h, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
|
|
383
383
|
}
|
|
384
384
|
get parentNode() {
|
|
385
385
|
let t = this._$AA.parentNode;
|
|
@@ -405,12 +405,12 @@ class Z {
|
|
|
405
405
|
this._$AH !== h && F(this._$AH) ? this._$AA.nextSibling.data = t : this.T(k.createTextNode(t)), this._$AH = t;
|
|
406
406
|
}
|
|
407
407
|
$(t) {
|
|
408
|
-
var
|
|
409
|
-
const { values: e, _$litType$:
|
|
410
|
-
if (((
|
|
408
|
+
var i;
|
|
409
|
+
const { values: e, _$litType$: s } = t, n = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = V.createElement(Lt(s.h, s.h[0]), this.options)), s);
|
|
410
|
+
if (((i = this._$AH) == null ? void 0 : i._$AD) === n) this._$AH.p(e);
|
|
411
411
|
else {
|
|
412
|
-
const
|
|
413
|
-
|
|
412
|
+
const r = new Rt(n, this), c = r.u(this.options);
|
|
413
|
+
r.p(e), this.T(c), this._$AH = r;
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
_$AC(t) {
|
|
@@ -420,15 +420,15 @@ class Z {
|
|
|
420
420
|
k(t) {
|
|
421
421
|
ht(this._$AH) || (this._$AH = [], this._$AR());
|
|
422
422
|
const e = this._$AH;
|
|
423
|
-
let
|
|
424
|
-
for (const
|
|
425
|
-
|
|
423
|
+
let s, n = 0;
|
|
424
|
+
for (const i of t) n === e.length ? e.push(s = new Z(this.O(R()), this.O(R()), this, this.options)) : s = e[n], s._$AI(i), n++;
|
|
425
|
+
n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
|
|
426
426
|
}
|
|
427
427
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
428
|
-
var
|
|
429
|
-
for ((
|
|
430
|
-
const
|
|
431
|
-
t.remove(), t =
|
|
428
|
+
var s;
|
|
429
|
+
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
430
|
+
const n = t.nextSibling;
|
|
431
|
+
t.remove(), t = n;
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
setConnected(t) {
|
|
@@ -436,32 +436,32 @@ class Z {
|
|
|
436
436
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
class
|
|
439
|
+
class J {
|
|
440
440
|
get tagName() {
|
|
441
441
|
return this.element.tagName;
|
|
442
442
|
}
|
|
443
443
|
get _$AU() {
|
|
444
444
|
return this._$AM._$AU;
|
|
445
445
|
}
|
|
446
|
-
constructor(t, e,
|
|
447
|
-
this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM =
|
|
446
|
+
constructor(t, e, s, n, i) {
|
|
447
|
+
this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = i, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = h;
|
|
448
448
|
}
|
|
449
|
-
_$AI(t, e = this,
|
|
450
|
-
const
|
|
451
|
-
let
|
|
452
|
-
if (
|
|
449
|
+
_$AI(t, e = this, s, n) {
|
|
450
|
+
const i = this.strings;
|
|
451
|
+
let r = !1;
|
|
452
|
+
if (i === void 0) t = I(this, t, e, 0), r = !F(t) || t !== this._$AH && t !== O, r && (this._$AH = t);
|
|
453
453
|
else {
|
|
454
454
|
const c = t;
|
|
455
455
|
let a, f;
|
|
456
|
-
for (t =
|
|
456
|
+
for (t = i[0], a = 0; a < i.length - 1; a++) f = I(this, c[s + a], e, a), f === O && (f = this._$AH[a]), r || (r = !F(f) || f !== this._$AH[a]), f === h ? t = h : t !== h && (t += (f ?? "") + i[a + 1]), this._$AH[a] = f;
|
|
457
457
|
}
|
|
458
|
-
|
|
458
|
+
r && !n && this.j(t);
|
|
459
459
|
}
|
|
460
460
|
j(t) {
|
|
461
461
|
t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
class Ft extends
|
|
464
|
+
class Ft extends J {
|
|
465
465
|
constructor() {
|
|
466
466
|
super(...arguments), this.type = 3;
|
|
467
467
|
}
|
|
@@ -469,7 +469,7 @@ class Ft extends G {
|
|
|
469
469
|
this.element[this.name] = t === h ? void 0 : t;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
class Vt extends
|
|
472
|
+
class Vt extends J {
|
|
473
473
|
constructor() {
|
|
474
474
|
super(...arguments), this.type = 4;
|
|
475
475
|
}
|
|
@@ -477,14 +477,14 @@ class Vt extends G {
|
|
|
477
477
|
this.element.toggleAttribute(this.name, !!t && t !== h);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
class Zt extends
|
|
481
|
-
constructor(t, e,
|
|
482
|
-
super(t, e,
|
|
480
|
+
class Zt extends J {
|
|
481
|
+
constructor(t, e, s, n, i) {
|
|
482
|
+
super(t, e, s, n, i), this.type = 5;
|
|
483
483
|
}
|
|
484
484
|
_$AI(t, e = this) {
|
|
485
485
|
if ((t = I(this, t, e, 0) ?? h) === O) return;
|
|
486
|
-
const
|
|
487
|
-
|
|
486
|
+
const s = this._$AH, n = t === h && s !== h || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, i = t !== h && (s === h || n);
|
|
487
|
+
n && this.element.removeEventListener(this.name, this, s), i && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
488
488
|
}
|
|
489
489
|
handleEvent(t) {
|
|
490
490
|
var e;
|
|
@@ -492,8 +492,8 @@ class Zt extends G {
|
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
class qt {
|
|
495
|
-
constructor(t, e,
|
|
496
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options =
|
|
495
|
+
constructor(t, e, s) {
|
|
496
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
497
497
|
}
|
|
498
498
|
get _$AU() {
|
|
499
499
|
return this._$AM._$AU;
|
|
@@ -502,16 +502,16 @@ class qt {
|
|
|
502
502
|
I(this, t);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
const Wt = (
|
|
508
|
-
const
|
|
509
|
-
let
|
|
510
|
-
if (
|
|
511
|
-
const
|
|
512
|
-
|
|
513
|
-
}
|
|
514
|
-
return
|
|
505
|
+
const st = j.litHtmlPolyfillSupport;
|
|
506
|
+
st == null || st(V, Z), (j.litHtmlVersions ?? (j.litHtmlVersions = [])).push("3.3.0");
|
|
507
|
+
const Wt = (o, t, e) => {
|
|
508
|
+
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
509
|
+
let n = s._$litPart$;
|
|
510
|
+
if (n === void 0) {
|
|
511
|
+
const i = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
512
|
+
s._$litPart$ = n = new Z(t.insertBefore(R(), i), i, void 0, e ?? {});
|
|
513
|
+
}
|
|
514
|
+
return n._$AI(o), n;
|
|
515
515
|
};
|
|
516
516
|
/**
|
|
517
517
|
* @license
|
|
@@ -546,57 +546,57 @@ let $ = class extends M {
|
|
|
546
546
|
};
|
|
547
547
|
var xt;
|
|
548
548
|
$._$litElement$ = !0, $.finalized = !0, (xt = B.litElementHydrateSupport) == null || xt.call(B, { LitElement: $ });
|
|
549
|
-
const
|
|
550
|
-
|
|
549
|
+
const nt = B.litElementPolyfillSupport;
|
|
550
|
+
nt == null || nt({ LitElement: $ });
|
|
551
551
|
(B.litElementVersions ?? (B.litElementVersions = [])).push("4.2.0");
|
|
552
552
|
/**
|
|
553
553
|
* @license
|
|
554
554
|
* Copyright 2017 Google LLC
|
|
555
555
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
556
556
|
*/
|
|
557
|
-
const T = (
|
|
557
|
+
const T = (o) => (t, e) => {
|
|
558
558
|
e !== void 0 ? e.addInitializer(() => {
|
|
559
|
-
customElements.define(
|
|
560
|
-
}) : customElements.define(
|
|
559
|
+
customElements.define(o, t);
|
|
560
|
+
}) : customElements.define(o, t);
|
|
561
561
|
};
|
|
562
562
|
/**
|
|
563
563
|
* @license
|
|
564
564
|
* Copyright 2017 Google LLC
|
|
565
565
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
566
566
|
*/
|
|
567
|
-
const
|
|
568
|
-
const { kind:
|
|
569
|
-
let
|
|
570
|
-
if (
|
|
571
|
-
const { name:
|
|
567
|
+
const Gt = { attribute: !0, type: String, converter: G, reflect: !1, hasChanged: ct }, Kt = (o = Gt, t, e) => {
|
|
568
|
+
const { kind: s, metadata: n } = e;
|
|
569
|
+
let i = globalThis.litPropertyMetadata.get(n);
|
|
570
|
+
if (i === void 0 && globalThis.litPropertyMetadata.set(n, i = /* @__PURE__ */ new Map()), s === "setter" && ((o = Object.create(o)).wrapped = !0), i.set(e.name, o), s === "accessor") {
|
|
571
|
+
const { name: r } = e;
|
|
572
572
|
return { set(c) {
|
|
573
573
|
const a = t.get.call(this);
|
|
574
|
-
t.set.call(this, c), this.requestUpdate(
|
|
574
|
+
t.set.call(this, c), this.requestUpdate(r, a, o);
|
|
575
575
|
}, init(c) {
|
|
576
|
-
return c !== void 0 && this.C(
|
|
576
|
+
return c !== void 0 && this.C(r, void 0, o, c), c;
|
|
577
577
|
} };
|
|
578
578
|
}
|
|
579
|
-
if (
|
|
580
|
-
const { name:
|
|
579
|
+
if (s === "setter") {
|
|
580
|
+
const { name: r } = e;
|
|
581
581
|
return function(c) {
|
|
582
|
-
const a = this[
|
|
583
|
-
t.call(this, c), this.requestUpdate(
|
|
582
|
+
const a = this[r];
|
|
583
|
+
t.call(this, c), this.requestUpdate(r, a, o);
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
throw Error("Unsupported decorator location: " +
|
|
586
|
+
throw Error("Unsupported decorator location: " + s);
|
|
587
587
|
};
|
|
588
|
-
function l(
|
|
589
|
-
return (t, e) => typeof e == "object" ?
|
|
590
|
-
const
|
|
591
|
-
return
|
|
592
|
-
})(
|
|
588
|
+
function l(o) {
|
|
589
|
+
return (t, e) => typeof e == "object" ? Kt(o, t, e) : ((s, n, i) => {
|
|
590
|
+
const r = n.hasOwnProperty(i);
|
|
591
|
+
return n.constructor.createProperty(i, s), r ? Object.getOwnPropertyDescriptor(n, i) : void 0;
|
|
592
|
+
})(o, t, e);
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const Xt = E`
|
|
595
595
|
outline: 1px dashed var(--button-border-color);
|
|
596
596
|
outline-offset: 2px;
|
|
597
597
|
outline: dashed black;
|
|
598
598
|
`;
|
|
599
|
-
|
|
599
|
+
E`
|
|
600
600
|
:host * {
|
|
601
601
|
box-sizing: border-box;
|
|
602
602
|
}
|
|
@@ -606,12 +606,12 @@ S`
|
|
|
606
606
|
* Copyright 2023 Google LLC
|
|
607
607
|
* SPDX-License-Identifier: Apache-2.0
|
|
608
608
|
*/
|
|
609
|
-
const
|
|
610
|
-
function
|
|
609
|
+
const pt = Symbol("internals"), ot = Symbol("privateInternals");
|
|
610
|
+
function Jt(o) {
|
|
611
611
|
var t;
|
|
612
|
-
class e extends
|
|
613
|
-
get [(t =
|
|
614
|
-
return this[
|
|
612
|
+
class e extends o {
|
|
613
|
+
get [(t = pt, t)]() {
|
|
614
|
+
return this[ot] || (this[ot] = this.attachInternals()), this[ot];
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
return e;
|
|
@@ -621,19 +621,19 @@ function Gt(n) {
|
|
|
621
621
|
* Copyright 2023 Google LLC
|
|
622
622
|
* SPDX-License-Identifier: Apache-2.0
|
|
623
623
|
*/
|
|
624
|
-
function Qt(
|
|
625
|
-
|
|
624
|
+
function Qt(o) {
|
|
625
|
+
o.addInitializer((t) => {
|
|
626
626
|
const e = t;
|
|
627
|
-
e.addEventListener("click", async (
|
|
628
|
-
const { type:
|
|
629
|
-
if (!(!
|
|
627
|
+
e.addEventListener("click", async (s) => {
|
|
628
|
+
const { type: n, [pt]: i } = e, { form: r } = i;
|
|
629
|
+
if (!(!r || n === "button") && (await new Promise((c) => {
|
|
630
630
|
setTimeout(c);
|
|
631
|
-
}), !
|
|
632
|
-
if (
|
|
633
|
-
|
|
631
|
+
}), !s.defaultPrevented)) {
|
|
632
|
+
if (n === "reset") {
|
|
633
|
+
r.reset();
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
636
|
-
|
|
636
|
+
r.addEventListener(
|
|
637
637
|
"submit",
|
|
638
638
|
(c) => {
|
|
639
639
|
Object.defineProperty(c, "submitter", {
|
|
@@ -643,7 +643,7 @@ function Qt(n) {
|
|
|
643
643
|
});
|
|
644
644
|
},
|
|
645
645
|
{ capture: !0, once: !0 }
|
|
646
|
-
),
|
|
646
|
+
), i.setFormValue(e.value), r.requestSubmit();
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
649
|
});
|
|
@@ -653,15 +653,15 @@ function Qt(n) {
|
|
|
653
653
|
* Copyright 2017 Google LLC
|
|
654
654
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
655
655
|
*/
|
|
656
|
-
const Yt = { CHILD: 2 }, te = (
|
|
656
|
+
const Yt = { CHILD: 2 }, te = (o) => (...t) => ({ _$litDirective$: o, values: t });
|
|
657
657
|
class ee {
|
|
658
658
|
constructor(t) {
|
|
659
659
|
}
|
|
660
660
|
get _$AU() {
|
|
661
661
|
return this._$AM._$AU;
|
|
662
662
|
}
|
|
663
|
-
_$AT(t, e,
|
|
664
|
-
this._$Ct = t, this._$AM = e, this._$Ci =
|
|
663
|
+
_$AT(t, e, s) {
|
|
664
|
+
this._$Ct = t, this._$AM = e, this._$Ci = s;
|
|
665
665
|
}
|
|
666
666
|
_$AS(t, e) {
|
|
667
667
|
return this.update(t, e);
|
|
@@ -675,7 +675,7 @@ class ee {
|
|
|
675
675
|
* Copyright 2017 Google LLC
|
|
676
676
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
677
677
|
*/
|
|
678
|
-
class
|
|
678
|
+
class rt extends ee {
|
|
679
679
|
constructor(t) {
|
|
680
680
|
if (super(t), this.it = h, t.type !== Yt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
681
681
|
}
|
|
@@ -689,28 +689,28 @@ class it extends ee {
|
|
|
689
689
|
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
|
|
692
|
+
rt.directiveName = "unsafeHTML", rt.resultType = 1;
|
|
693
693
|
/**
|
|
694
694
|
* @license
|
|
695
695
|
* Copyright 2017 Google LLC
|
|
696
696
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
697
697
|
*/
|
|
698
|
-
class
|
|
698
|
+
class it extends rt {
|
|
699
699
|
}
|
|
700
|
-
|
|
701
|
-
const
|
|
700
|
+
it.directiveName = "unsafeSVG", it.resultType = 2;
|
|
701
|
+
const X = te(it), se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
702
702
|
<path d="M8 3.6275C7.06799 0.971489 3.25399 -0.0226278 1.67414 2.30983C0.0877404 4.65197 1.67414 6.99412 2.62598 8.33249C3.0147 8.87905 8 14 8 14C8 14 12.9853 8.87905 13.374 8.33249C14.3259 6.99412 15.9123 4.65197 14.3259 2.30983C12.746 -0.0226277 8.97167 0.971489 8 3.6275Z" stroke="#3F2B2E" stroke-linecap="round"/>
|
|
703
703
|
</svg>
|
|
704
|
-
`,
|
|
704
|
+
`, ne = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
705
705
|
<path d="M16 8L4 0V16L16 8Z" fill="#3F2B2E"/>
|
|
706
706
|
</svg>
|
|
707
|
-
`,
|
|
707
|
+
`, oe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
708
708
|
<path d="M12.2266 8.16162C11.0953 9.26599 8.72489 11.8788 5.11546 16L4.63062 15.7172C5.78886 13.4007 7.17607 10.8283 8.79223 8C7.17607 5.17172 5.78886 2.59933 4.63062 0.282827L5.11546 0C8.72489 4.12121 11.0953 6.73401 12.2266 7.83838V8.16162Z" fill="#3F2B2E"/>
|
|
709
709
|
</svg>
|
|
710
|
-
`,
|
|
710
|
+
`, re = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
711
711
|
<path d="M5 7.83838C6.02128 6.73401 8.16109 4.12121 11.4195 0L11.8571 0.282829C10.8116 2.59933 9.55927 5.17172 8.1003 8C9.55927 10.8283 10.8115 13.4007 11.8571 15.7172L11.4195 16C8.16109 11.8788 6.02128 9.266 5 8.16162L5 7.83838Z" fill="#3F2B2E"/>
|
|
712
712
|
</svg>
|
|
713
|
-
`,
|
|
713
|
+
`, ie = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
714
714
|
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834ZM7.98873 10.328L10.6602 12.2353L9.64573 9.15787L12.2721 7.28568H9.02576L8 4.17317L6.97424 7.28568H3.72786L6.35427 9.15787L5.33977 12.2353L8.01127 10.328H7.98873Z" fill="#3F2B2E"/>
|
|
715
715
|
</svg>
|
|
716
716
|
`, ae = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -725,62 +725,83 @@ const J = te(rt), oe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="no
|
|
|
725
725
|
`, he = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
726
726
|
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834Z" fill="#3F2B2E"/>
|
|
727
727
|
</svg>
|
|
728
|
-
`,
|
|
728
|
+
`, pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
729
729
|
<path d="M2 2L14 14" stroke="#3F2B2E"/>
|
|
730
730
|
<path d="M14 2L2 14" stroke="#3F2B2E"/>
|
|
731
731
|
</svg>
|
|
732
|
-
`,
|
|
732
|
+
`, de = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
733
733
|
<path d="M7.12506 1C10.5018 1 13.2509 3.74834 13.251 7.125C13.2511 8.59738 12.7172 10.0206 11.7491 11.1299L14.8731 14.2539C15.0433 14.4253 15.0435 14.7018 14.8731 14.873C14.7913 14.9555 14.6797 15.002 14.5635 15.002C14.4475 15.0019 14.3357 14.9554 14.254 14.873L11.1309 11.749C10.0555 12.6818 8.6564 13.251 7.12506 13.251C3.7484 13.2508 1.00006 10.5017 1.00006 7.125C1.00025 3.74846 3.74852 1.00019 7.12506 1ZM7.12506 1.875C4.22971 1.87522 1.87506 4.23058 1.87506 7.12598C1.87532 10.0212 4.22987 12.3758 7.12506 12.376C10.0204 12.376 12.3758 10.0213 12.376 7.12598C12.376 4.23044 10.0206 1.875 7.12506 1.875Z" fill="#3F2B2E"/>
|
|
734
734
|
</svg>
|
|
735
|
-
`,
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
735
|
+
`, ue = `<?xml version="1.0" encoding="utf-8"?>
|
|
736
|
+
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
737
|
+
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
738
|
+
viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
|
|
739
|
+
<style type="text/css">
|
|
740
|
+
.st0{fill:#001022;}
|
|
741
|
+
</style>
|
|
742
|
+
<path class="st0" d="M27.3,19.3h-6.7v-6.7c0-0.4-0.3-0.7-0.7-0.7s-0.7,0.3-0.7,0.7v6.7h-6.7c-0.4,0-0.7,0.3-0.7,0.7s0.3,0.7,0.7,0.7
|
|
743
|
+
h6.7v6.7c0,0.4,0.3,0.7,0.7,0.7s0.7-0.3,0.7-0.7v-6.7h6.7c0.4,0,0.7-0.3,0.7-0.7S27.7,19.3,27.3,19.3z"/>
|
|
744
|
+
</svg>
|
|
745
|
+
`, fe = `<?xml version="1.0" encoding="utf-8"?>
|
|
746
|
+
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
747
|
+
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
748
|
+
viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
|
|
749
|
+
<style type="text/css">
|
|
750
|
+
.st0{fill:#001022;}
|
|
751
|
+
</style>
|
|
752
|
+
<path class="st0" d="M27.3,20.7H12.7c-0.4,0-0.7-0.3-0.7-0.7s0.3-0.7,0.7-0.7h14.7c0.4,0,0.7,0.3,0.7,0.7S27.7,20.7,27.3,20.7z"/>
|
|
753
|
+
</svg>
|
|
754
|
+
`, dt = {
|
|
755
|
+
wishlist: se,
|
|
756
|
+
playerv: ne,
|
|
757
|
+
chevronRight: oe,
|
|
758
|
+
chevronLeft: re,
|
|
759
|
+
icoPlus: ue,
|
|
760
|
+
icoMinus: fe,
|
|
761
|
+
"star-0": ie,
|
|
741
762
|
"star-25": ae,
|
|
742
763
|
"star-50": le,
|
|
743
764
|
"star-75": ce,
|
|
744
765
|
"star-100": he,
|
|
745
|
-
cross:
|
|
746
|
-
search:
|
|
766
|
+
cross: pe,
|
|
767
|
+
search: de
|
|
747
768
|
};
|
|
748
|
-
var
|
|
749
|
-
for (var
|
|
750
|
-
(
|
|
751
|
-
return
|
|
769
|
+
var ge = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, C = (o, t, e, s) => {
|
|
770
|
+
for (var n = s > 1 ? void 0 : s ? ve(t, e) : t, i = o.length - 1, r; i >= 0; i--)
|
|
771
|
+
(r = o[i]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
772
|
+
return s && n && ge(t, e, n), n;
|
|
752
773
|
};
|
|
753
774
|
let m = class extends $ {
|
|
754
775
|
constructor() {
|
|
755
776
|
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1;
|
|
756
777
|
}
|
|
757
|
-
updated(
|
|
758
|
-
super.updated(
|
|
778
|
+
updated(o) {
|
|
779
|
+
super.updated(o), this.style.setProperty("--icon-stroke-width", this.strokewidth);
|
|
759
780
|
}
|
|
760
781
|
render() {
|
|
761
|
-
const
|
|
782
|
+
const o = dt[this.icon] ?? "", t = `icon-${this.icon}`, e = o.replace(
|
|
762
783
|
"<svg",
|
|
763
784
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
764
785
|
);
|
|
765
|
-
return
|
|
766
|
-
${this.type === "span" ?
|
|
786
|
+
return p`
|
|
787
|
+
${this.type === "span" ? p`
|
|
767
788
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
768
|
-
${
|
|
789
|
+
${X(e)}
|
|
769
790
|
</span>
|
|
770
|
-
` :
|
|
791
|
+
` : p`
|
|
771
792
|
<button
|
|
772
793
|
type="button"
|
|
773
794
|
aria-label="icon"
|
|
774
795
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
775
796
|
?disabled="${this.disabled}"
|
|
776
797
|
>
|
|
777
|
-
${
|
|
798
|
+
${X(e)}
|
|
778
799
|
</button>
|
|
779
800
|
`}
|
|
780
801
|
`;
|
|
781
802
|
}
|
|
782
803
|
};
|
|
783
|
-
m.styles =
|
|
804
|
+
m.styles = E`
|
|
784
805
|
:host {
|
|
785
806
|
display: inline-flex;
|
|
786
807
|
justify-content: center;
|
|
@@ -962,31 +983,31 @@ C([
|
|
|
962
983
|
m = C([
|
|
963
984
|
T("o-icon-button")
|
|
964
985
|
], m);
|
|
965
|
-
var
|
|
966
|
-
for (var
|
|
967
|
-
(
|
|
968
|
-
return
|
|
986
|
+
var be = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, v = (o, t, e, s) => {
|
|
987
|
+
for (var n = s > 1 ? void 0 : s ? ye(t, e) : t, i = o.length - 1, r; i >= 0; i--)
|
|
988
|
+
(r = o[i]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
989
|
+
return s && n && be(t, e, n), n;
|
|
969
990
|
};
|
|
970
|
-
const
|
|
971
|
-
let u = class extends
|
|
991
|
+
const $e = Jt($);
|
|
992
|
+
let u = class extends $e {
|
|
972
993
|
constructor() {
|
|
973
994
|
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.text = "", this.textsecond = "", this.fullwidth = !1, this.disabled = !1, this.iconstrokewidth = "1", this.startIcon = !1, this.endIcon = !1, this.iconSize = "small", this.icon = "", this.href = "", this.target = "";
|
|
974
995
|
}
|
|
975
996
|
get name() {
|
|
976
997
|
return this.getAttribute("name") ?? "";
|
|
977
998
|
}
|
|
978
|
-
set name(
|
|
979
|
-
this.setAttribute("name",
|
|
999
|
+
set name(o) {
|
|
1000
|
+
this.setAttribute("name", o);
|
|
980
1001
|
}
|
|
981
1002
|
get form() {
|
|
982
|
-
return this[
|
|
1003
|
+
return this[pt].form;
|
|
983
1004
|
}
|
|
984
1005
|
render() {
|
|
985
1006
|
return this.href ? this.renderLink() : this.renderButton();
|
|
986
1007
|
}
|
|
987
|
-
renderIcon(
|
|
988
|
-
return this.icon ?
|
|
989
|
-
class=${
|
|
1008
|
+
renderIcon(o) {
|
|
1009
|
+
return this.icon ? p`<o-icon-button
|
|
1010
|
+
class=${o === "start" ? "icon-start" : "icon-end"}
|
|
990
1011
|
icon=${this.icon}
|
|
991
1012
|
bgstyle="${this.variant === "primary" ? "none-light" : "none-contrast"}"
|
|
992
1013
|
size="${this.iconSize}"
|
|
@@ -997,21 +1018,21 @@ let u = class extends be {
|
|
|
997
1018
|
></o-icon-button>` : h;
|
|
998
1019
|
}
|
|
999
1020
|
renderButton() {
|
|
1000
|
-
const
|
|
1001
|
-
return
|
|
1021
|
+
const o = this.text || this.textsecond;
|
|
1022
|
+
return p`
|
|
1002
1023
|
<button class="button" ?disabled=${this.disabled}>
|
|
1003
1024
|
${this.startIcon ? this.renderIcon("start") : h}
|
|
1004
|
-
${
|
|
1005
|
-
${this.text ?
|
|
1006
|
-
${this.textsecond ?
|
|
1007
|
-
` :
|
|
1025
|
+
${o ? p`
|
|
1026
|
+
${this.text ? p`<span>${this.text}</span>` : h}
|
|
1027
|
+
${this.textsecond ? p`<span>${this.textsecond}</span>` : h}
|
|
1028
|
+
` : p`<slot></slot>`}
|
|
1008
1029
|
${this.endIcon ? this.renderIcon("end") : h}
|
|
1009
1030
|
</button>
|
|
1010
1031
|
`;
|
|
1011
1032
|
}
|
|
1012
1033
|
renderLink() {
|
|
1013
|
-
const
|
|
1014
|
-
return
|
|
1034
|
+
const o = this.text || this.textsecond;
|
|
1035
|
+
return p`
|
|
1015
1036
|
<a
|
|
1016
1037
|
href=${this.href}
|
|
1017
1038
|
target=${this.target || h}
|
|
@@ -1019,10 +1040,10 @@ let u = class extends be {
|
|
|
1019
1040
|
?disabled=${this.disabled}
|
|
1020
1041
|
>
|
|
1021
1042
|
${this.startIcon ? this.renderIcon("start") : h}
|
|
1022
|
-
${
|
|
1023
|
-
${this.text ?
|
|
1024
|
-
${this.textsecond ?
|
|
1025
|
-
` :
|
|
1043
|
+
${o ? p`
|
|
1044
|
+
${this.text ? p`<span>${this.text}</span>` : h}
|
|
1045
|
+
${this.textsecond ? p`<span>${this.textsecond}</span>` : h}
|
|
1046
|
+
` : p`<slot></slot>`}
|
|
1026
1047
|
${this.endIcon ? this.renderIcon("end") : h}
|
|
1027
1048
|
</a>
|
|
1028
1049
|
`;
|
|
@@ -1030,7 +1051,7 @@ let u = class extends be {
|
|
|
1030
1051
|
};
|
|
1031
1052
|
Qt(u);
|
|
1032
1053
|
u.formAssociated = !0;
|
|
1033
|
-
u.styles =
|
|
1054
|
+
u.styles = E`
|
|
1034
1055
|
:host {
|
|
1035
1056
|
--button-border: transparent;
|
|
1036
1057
|
cursor: pointer;
|
|
@@ -1127,7 +1148,7 @@ u.styles = S`
|
|
|
1127
1148
|
}
|
|
1128
1149
|
|
|
1129
1150
|
.button:focus-visible {
|
|
1130
|
-
${
|
|
1151
|
+
${Xt};
|
|
1131
1152
|
}
|
|
1132
1153
|
|
|
1133
1154
|
span + span::before {
|
|
@@ -1205,21 +1226,21 @@ v([
|
|
|
1205
1226
|
u = v([
|
|
1206
1227
|
T("o-button")
|
|
1207
1228
|
], u);
|
|
1208
|
-
var
|
|
1209
|
-
for (var
|
|
1210
|
-
(
|
|
1211
|
-
return
|
|
1229
|
+
var me = Object.defineProperty, we = Object.getOwnPropertyDescriptor, Q = (o, t, e, s) => {
|
|
1230
|
+
for (var n = s > 1 ? void 0 : s ? we(t, e) : t, i = o.length - 1, r; i >= 0; i--)
|
|
1231
|
+
(r = o[i]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
1232
|
+
return s && n && me(t, e, n), n;
|
|
1212
1233
|
};
|
|
1213
|
-
let
|
|
1234
|
+
let z = class extends $ {
|
|
1214
1235
|
constructor() {
|
|
1215
1236
|
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist";
|
|
1216
1237
|
}
|
|
1217
1238
|
render() {
|
|
1218
|
-
const
|
|
1239
|
+
const o = dt.wishlist.replace(
|
|
1219
1240
|
"<svg",
|
|
1220
1241
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1221
1242
|
);
|
|
1222
|
-
return
|
|
1243
|
+
return p`
|
|
1223
1244
|
<button
|
|
1224
1245
|
type="button"
|
|
1225
1246
|
aria-describedby="${this.ariaDescribedBy}"
|
|
@@ -1227,11 +1248,11 @@ let U = class extends $ {
|
|
|
1227
1248
|
@click="${this.handleClick}"
|
|
1228
1249
|
>
|
|
1229
1250
|
<span class="sr-only">${this.label}</span>
|
|
1230
|
-
${
|
|
1251
|
+
${X(o)}
|
|
1231
1252
|
</button>
|
|
1232
1253
|
`;
|
|
1233
1254
|
}
|
|
1234
|
-
handleClick(
|
|
1255
|
+
handleClick(o) {
|
|
1235
1256
|
this.toggleStatus(), this.dispatchEvent(new MouseEvent("click", {
|
|
1236
1257
|
bubbles: !0,
|
|
1237
1258
|
composed: !0
|
|
@@ -1240,17 +1261,17 @@ let U = class extends $ {
|
|
|
1240
1261
|
toggleStatus() {
|
|
1241
1262
|
this.status = this.status == "empty" ? "filled" : "empty";
|
|
1242
1263
|
}
|
|
1243
|
-
setStatus(
|
|
1244
|
-
this.status =
|
|
1264
|
+
setStatus(o) {
|
|
1265
|
+
this.status = o, this.requestUpdate();
|
|
1245
1266
|
}
|
|
1246
|
-
setAriaDescribedBy(
|
|
1247
|
-
this.ariaDescribedBy =
|
|
1267
|
+
setAriaDescribedBy(o) {
|
|
1268
|
+
this.ariaDescribedBy = o, this.requestUpdate();
|
|
1248
1269
|
}
|
|
1249
|
-
setLabel(
|
|
1250
|
-
this.label =
|
|
1270
|
+
setLabel(o) {
|
|
1271
|
+
this.label = o, this.requestUpdate();
|
|
1251
1272
|
}
|
|
1252
1273
|
};
|
|
1253
|
-
|
|
1274
|
+
z.styles = E`
|
|
1254
1275
|
:host {
|
|
1255
1276
|
display: inline-flex;
|
|
1256
1277
|
justify-content: center;
|
|
@@ -1307,29 +1328,29 @@ U.styles = S`
|
|
|
1307
1328
|
`;
|
|
1308
1329
|
Q([
|
|
1309
1330
|
l({ type: String, reflect: !0 })
|
|
1310
|
-
],
|
|
1331
|
+
], z.prototype, "status", 2);
|
|
1311
1332
|
Q([
|
|
1312
1333
|
l({ type: String, reflect: !0 })
|
|
1313
|
-
],
|
|
1334
|
+
], z.prototype, "ariaDescribedBy", 2);
|
|
1314
1335
|
Q([
|
|
1315
1336
|
l({ type: String, reflect: !0 })
|
|
1316
|
-
],
|
|
1317
|
-
|
|
1337
|
+
], z.prototype, "label", 2);
|
|
1338
|
+
z = Q([
|
|
1318
1339
|
T("o-wishlist-button")
|
|
1319
|
-
],
|
|
1320
|
-
var
|
|
1321
|
-
for (var
|
|
1322
|
-
(
|
|
1323
|
-
return
|
|
1340
|
+
], z);
|
|
1341
|
+
var _e = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, H = (o, t, e, s) => {
|
|
1342
|
+
for (var n = s > 1 ? void 0 : s ? xe(t, e) : t, i = o.length - 1, r; i >= 0; i--)
|
|
1343
|
+
(r = o[i]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
1344
|
+
return s && n && _e(t, e, n), n;
|
|
1324
1345
|
};
|
|
1325
1346
|
let _ = class extends $ {
|
|
1326
1347
|
constructor() {
|
|
1327
1348
|
super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1;
|
|
1328
1349
|
}
|
|
1329
1350
|
render() {
|
|
1330
|
-
return
|
|
1351
|
+
return p`
|
|
1331
1352
|
<a href="${this.href}" target="${this.target}">
|
|
1332
|
-
${this.endIcon && this.reverseEndIcon ?
|
|
1353
|
+
${this.endIcon && this.reverseEndIcon ? p`
|
|
1333
1354
|
<o-icon-button
|
|
1334
1355
|
icon="chevronLeft"
|
|
1335
1356
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1339,7 +1360,7 @@ let _ = class extends $ {
|
|
|
1339
1360
|
></o-icon-button>
|
|
1340
1361
|
` : null}
|
|
1341
1362
|
<span class="link-text"><slot></slot></span>
|
|
1342
|
-
${this.endIcon && !this.reverseEndIcon ?
|
|
1363
|
+
${this.endIcon && !this.reverseEndIcon ? p`
|
|
1343
1364
|
<o-icon-button
|
|
1344
1365
|
icon="chevronRight"
|
|
1345
1366
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1352,7 +1373,7 @@ let _ = class extends $ {
|
|
|
1352
1373
|
`;
|
|
1353
1374
|
}
|
|
1354
1375
|
};
|
|
1355
|
-
_.styles =
|
|
1376
|
+
_.styles = E`
|
|
1356
1377
|
:host([template="standard"]) a {
|
|
1357
1378
|
color: var(--color-content-action-secondary);
|
|
1358
1379
|
font-size: var(--font-size-200);
|
|
@@ -1461,39 +1482,39 @@ H([
|
|
|
1461
1482
|
_ = H([
|
|
1462
1483
|
T("o-link")
|
|
1463
1484
|
], _);
|
|
1464
|
-
var
|
|
1465
|
-
for (var
|
|
1466
|
-
(
|
|
1467
|
-
return
|
|
1485
|
+
var Ae = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, Y = (o, t, e, s) => {
|
|
1486
|
+
for (var n = s > 1 ? void 0 : s ? Se(t, e) : t, i = o.length - 1, r; i >= 0; i--)
|
|
1487
|
+
(r = o[i]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
1488
|
+
return s && n && Ae(t, e, n), n;
|
|
1468
1489
|
};
|
|
1469
|
-
let
|
|
1490
|
+
let U = class extends $ {
|
|
1470
1491
|
constructor() {
|
|
1471
1492
|
super(...arguments), this.rating = 0;
|
|
1472
1493
|
}
|
|
1473
1494
|
getStarKeys() {
|
|
1474
|
-
const
|
|
1495
|
+
const o = [];
|
|
1475
1496
|
for (let t = 0; t < 5; t++) {
|
|
1476
1497
|
const e = this.rating - t;
|
|
1477
|
-
let
|
|
1478
|
-
e >= 1 ?
|
|
1498
|
+
let s;
|
|
1499
|
+
e >= 1 ? s = 100 : e <= 0 ? s = 0 : s = Math.round(e * 100 / 25) * 25, o.push(`star-${s}`);
|
|
1479
1500
|
}
|
|
1480
|
-
return
|
|
1501
|
+
return o;
|
|
1481
1502
|
}
|
|
1482
1503
|
render() {
|
|
1483
|
-
const
|
|
1484
|
-
return
|
|
1504
|
+
const o = this.getStarKeys();
|
|
1505
|
+
return p`
|
|
1485
1506
|
<div class="rating">
|
|
1486
1507
|
<div class="stars">
|
|
1487
|
-
${
|
|
1488
|
-
(t) =>
|
|
1508
|
+
${o.map(
|
|
1509
|
+
(t) => p`<span class="star">${X(dt[t] ?? "")}</span>`
|
|
1489
1510
|
)}
|
|
1490
1511
|
</div>
|
|
1491
|
-
${this.reviewCount != null && this.href != null ?
|
|
1512
|
+
${this.reviewCount != null && this.href != null ? p`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
|
|
1492
1513
|
</div>
|
|
1493
1514
|
`;
|
|
1494
1515
|
}
|
|
1495
1516
|
};
|
|
1496
|
-
|
|
1517
|
+
U.styles = E`
|
|
1497
1518
|
svg {
|
|
1498
1519
|
width: 12px;
|
|
1499
1520
|
height: 12px;
|
|
@@ -1529,25 +1550,25 @@ z.styles = S`
|
|
|
1529
1550
|
`;
|
|
1530
1551
|
Y([
|
|
1531
1552
|
l({ type: Number })
|
|
1532
|
-
],
|
|
1553
|
+
], U.prototype, "rating", 2);
|
|
1533
1554
|
Y([
|
|
1534
1555
|
l({ type: String })
|
|
1535
|
-
],
|
|
1556
|
+
], U.prototype, "reviewCount", 2);
|
|
1536
1557
|
Y([
|
|
1537
1558
|
l({ type: String })
|
|
1538
|
-
],
|
|
1539
|
-
|
|
1559
|
+
], U.prototype, "href", 2);
|
|
1560
|
+
U = Y([
|
|
1540
1561
|
T("o-rating")
|
|
1541
|
-
],
|
|
1542
|
-
var
|
|
1543
|
-
for (var
|
|
1544
|
-
(
|
|
1545
|
-
return
|
|
1562
|
+
], U);
|
|
1563
|
+
var Ee = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, y = (o, t, e, s) => {
|
|
1564
|
+
for (var n = s > 1 ? void 0 : s ? Ce(t, e) : t, i = o.length - 1, r; i >= 0; i--)
|
|
1565
|
+
(r = o[i]) && (n = (s ? r(t, e, n) : r(n)) || n);
|
|
1566
|
+
return s && n && Ee(t, e, n), n;
|
|
1546
1567
|
};
|
|
1547
1568
|
let b = class extends $ {
|
|
1548
1569
|
constructor() {
|
|
1549
|
-
super(...arguments), this.open = !1, this.showHeader = !0, this.showFooter = !0, this.headerTitle = "", this.closeButtonLabel = "Close the modal", this.firstButtonLabel = "First Button", this.firstButtonVariant = "primary", this.secondaryButtonLabel = "Second Button", this.secondaryButtonVariant = "primary", this.previousFocusedElement = null, this.handleKeyDown = (
|
|
1550
|
-
this.open && (
|
|
1570
|
+
super(...arguments), this.open = !1, this.showHeader = !0, this.showFooter = !0, this.headerTitle = "", this.closeButtonLabel = "Close the modal", this.firstButtonLabel = "First Button", this.firstButtonVariant = "primary", this.secondaryButtonLabel = "Second Button", this.secondaryButtonVariant = "primary", this.previousFocusedElement = null, this.handleKeyDown = (o) => {
|
|
1571
|
+
this.open && (o.key === "Escape" ? this.closePanel() : o.key === "Tab" && this.trapFocus(o));
|
|
1551
1572
|
};
|
|
1552
1573
|
}
|
|
1553
1574
|
connectedCallback() {
|
|
@@ -1556,29 +1577,29 @@ let b = class extends $ {
|
|
|
1556
1577
|
disconnectedCallback() {
|
|
1557
1578
|
window.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
|
|
1558
1579
|
}
|
|
1559
|
-
trapFocus(
|
|
1580
|
+
trapFocus(o) {
|
|
1560
1581
|
const t = this.getFocusableElements();
|
|
1561
1582
|
if (t.length === 0) return;
|
|
1562
|
-
const e = t[0],
|
|
1563
|
-
|
|
1583
|
+
const e = t[0], s = t[t.length - 1];
|
|
1584
|
+
o.shiftKey && document.activeElement === e ? (o.preventDefault(), s.focus()) : !o.shiftKey && document.activeElement === s && (o.preventDefault(), e.focus());
|
|
1564
1585
|
}
|
|
1565
1586
|
getFocusableElements() {
|
|
1566
|
-
const
|
|
1567
|
-
return
|
|
1568
|
-
|
|
1587
|
+
const o = this.renderRoot.querySelector(".panel");
|
|
1588
|
+
return o ? Array.from(
|
|
1589
|
+
o.querySelectorAll(
|
|
1569
1590
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1570
1591
|
)
|
|
1571
1592
|
).filter((t) => !t.hasAttribute("disabled")) : [];
|
|
1572
1593
|
}
|
|
1573
1594
|
openPanel() {
|
|
1574
1595
|
this.previousFocusedElement = document.activeElement, this.open = !0, this.updateComplete.then(() => {
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1596
|
+
const o = this.getFocusableElements()[0];
|
|
1597
|
+
o == null || o.focus();
|
|
1577
1598
|
});
|
|
1578
1599
|
}
|
|
1579
1600
|
closePanel() {
|
|
1580
|
-
var
|
|
1581
|
-
this.open = !1, (
|
|
1601
|
+
var o;
|
|
1602
|
+
this.open = !1, (o = this.previousFocusedElement) == null || o.focus(), this.dispatchEvent(
|
|
1582
1603
|
new CustomEvent("close", { bubbles: !0, composed: !0 })
|
|
1583
1604
|
);
|
|
1584
1605
|
}
|
|
@@ -1589,7 +1610,7 @@ let b = class extends $ {
|
|
|
1589
1610
|
typeof this.onSecondaryButtonClick == "function" && this.onSecondaryButtonClick(), this.closePanel();
|
|
1590
1611
|
}
|
|
1591
1612
|
render() {
|
|
1592
|
-
return
|
|
1613
|
+
return p`
|
|
1593
1614
|
<div class="overlay" @click=${this.closePanel}></div>
|
|
1594
1615
|
<div
|
|
1595
1616
|
class="panel"
|
|
@@ -1599,7 +1620,7 @@ let b = class extends $ {
|
|
|
1599
1620
|
>
|
|
1600
1621
|
<o-icon-button icon="cross" size="medium" class="close-btn" @click=${this.closePanel} aria-label="${this.closeButtonLabel}"></o-icon-button>
|
|
1601
1622
|
|
|
1602
|
-
${this.showHeader ?
|
|
1623
|
+
${this.showHeader ? p`
|
|
1603
1624
|
<div class="header">
|
|
1604
1625
|
<span id="panel-title" class="panel-title">${this.headerTitle}</span>
|
|
1605
1626
|
</div>
|
|
@@ -1609,9 +1630,9 @@ let b = class extends $ {
|
|
|
1609
1630
|
<slot></slot>
|
|
1610
1631
|
</div>
|
|
1611
1632
|
|
|
1612
|
-
${this.showFooter && this.firstButtonVariant && this.firstButtonLabel || this.secondaryButtonVariant && this.secondaryButtonLabel ?
|
|
1633
|
+
${this.showFooter && this.firstButtonVariant && this.firstButtonLabel || this.secondaryButtonVariant && this.secondaryButtonLabel ? p`
|
|
1613
1634
|
<div class="footer">
|
|
1614
|
-
${this.firstButtonVariant && this.firstButtonLabel ?
|
|
1635
|
+
${this.firstButtonVariant && this.firstButtonLabel ? p`
|
|
1615
1636
|
<o-button
|
|
1616
1637
|
customclass="full"
|
|
1617
1638
|
variant="${this.firstButtonVariant}"
|
|
@@ -1621,7 +1642,7 @@ let b = class extends $ {
|
|
|
1621
1642
|
</o-button>
|
|
1622
1643
|
` : null}
|
|
1623
1644
|
|
|
1624
|
-
${this.secondaryButtonVariant && this.secondaryButtonLabel ?
|
|
1645
|
+
${this.secondaryButtonVariant && this.secondaryButtonLabel ? p`
|
|
1625
1646
|
<o-button
|
|
1626
1647
|
customclass="full"
|
|
1627
1648
|
variant="${this.secondaryButtonVariant}"
|
|
@@ -1636,7 +1657,7 @@ let b = class extends $ {
|
|
|
1636
1657
|
`;
|
|
1637
1658
|
}
|
|
1638
1659
|
};
|
|
1639
|
-
b.styles =
|
|
1660
|
+
b.styles = E`
|
|
1640
1661
|
:host {
|
|
1641
1662
|
position: fixed;
|
|
1642
1663
|
top: 0;
|